给单据增加订金字段和页面功能逻辑
This commit is contained in:
@@ -232,7 +232,7 @@
|
|||||||
{ title: '付款', dataIndex: 'changeAmount',width:60},
|
{ title: '付款', dataIndex: 'changeAmount',width:60},
|
||||||
{ title: '欠款', dataIndex: 'debt',width:60,
|
{ title: '欠款', dataIndex: 'debt',width:60,
|
||||||
customRender:function (text,record,index) {
|
customRender:function (text,record,index) {
|
||||||
let debt = record.discountLastMoney + record.otherMoney - record.changeAmount
|
let debt = record.discountLastMoney + record.otherMoney - (record.deposit + record.changeAmount)
|
||||||
return debt? debt.toFixed(2):''
|
return debt? debt.toFixed(2):''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -205,6 +205,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{ title: '支付订金', dataIndex: 'changeAmount',width:60},
|
||||||
{ title: '状态', dataIndex: 'status', width: 80, align: "center",
|
{ title: '状态', dataIndex: 'status', width: 80, align: "center",
|
||||||
scopedSlots: { customRender: 'customRenderStatus' }
|
scopedSlots: { customRender: 'customRenderStatus' }
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -211,6 +211,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{ title: '收取订金', dataIndex: 'changeAmount',width:60},
|
||||||
{ title: '状态', dataIndex: 'status', width: 70, align: "center",
|
{ title: '状态', dataIndex: 'status', width: 70, align: "center",
|
||||||
scopedSlots: { customRender: 'customRenderStatus' }
|
scopedSlots: { customRender: 'customRenderStatus' }
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -232,7 +232,7 @@
|
|||||||
{ title: '收款', dataIndex: 'changeAmount',width:60},
|
{ title: '收款', dataIndex: 'changeAmount',width:60},
|
||||||
{ title: '欠款', dataIndex: 'debt',width:60,
|
{ title: '欠款', dataIndex: 'debt',width:60,
|
||||||
customRender:function (text,record,index) {
|
customRender:function (text,record,index) {
|
||||||
let debt = record.discountLastMoney + record.otherMoney - record.changeAmount
|
let debt = record.discountLastMoney + record.otherMoney - (record.deposit + record.changeAmount)
|
||||||
return debt? debt.toFixed(2):''
|
return debt? debt.toFixed(2):''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -237,8 +237,21 @@
|
|||||||
{{model.discountLastMoney}}
|
{{model.discountLastMoney}}
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
|
<a-col :span="6"></a-col>
|
||||||
|
</a-row>
|
||||||
|
<a-row class="form-row" :gutter="24">
|
||||||
<a-col :span="6">
|
<a-col :span="6">
|
||||||
|
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="结算账户">
|
||||||
|
{{model.accountName}}
|
||||||
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
|
<a-col :span="6">
|
||||||
|
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="支付订金">
|
||||||
|
{{model.changeAmount}}
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="6"></a-col>
|
||||||
|
<a-col :span="6"></a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
</section>
|
</section>
|
||||||
</template>
|
</template>
|
||||||
@@ -314,6 +327,11 @@
|
|||||||
{{model.accountName}}
|
{{model.accountName}}
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
|
<a-col v-if="model.deposit" :span="6">
|
||||||
|
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="扣除订金">
|
||||||
|
{{model.deposit}}
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
<a-col :span="6">
|
<a-col :span="6">
|
||||||
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="本次付款">
|
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="本次付款">
|
||||||
{{model.changeAmount}}
|
{{model.changeAmount}}
|
||||||
@@ -324,8 +342,6 @@
|
|||||||
{{model.debt}}
|
{{model.debt}}
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="6">
|
|
||||||
</a-col>
|
|
||||||
</a-row>
|
</a-row>
|
||||||
</section>
|
</section>
|
||||||
</template>
|
</template>
|
||||||
@@ -476,8 +492,21 @@
|
|||||||
{{model.discountLastMoney}}
|
{{model.discountLastMoney}}
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
|
<a-col :span="6"></a-col>
|
||||||
|
</a-row>
|
||||||
|
<a-row class="form-row" :gutter="24">
|
||||||
<a-col :span="6">
|
<a-col :span="6">
|
||||||
|
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="结算账户">
|
||||||
|
{{model.accountName}}
|
||||||
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
|
<a-col :span="6">
|
||||||
|
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="收取订金">
|
||||||
|
{{model.changeAmount}}
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="6"></a-col>
|
||||||
|
<a-col :span="6"></a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
</section>
|
</section>
|
||||||
</template>
|
</template>
|
||||||
@@ -553,6 +582,11 @@
|
|||||||
{{model.accountName}}
|
{{model.accountName}}
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
|
<a-col v-if="model.deposit" :span="6">
|
||||||
|
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="扣除订金">
|
||||||
|
{{model.deposit}}
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
<a-col :span="6">
|
<a-col :span="6">
|
||||||
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="本次收款">
|
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="本次收款">
|
||||||
{{model.changeAmount}}
|
{{model.changeAmount}}
|
||||||
@@ -563,6 +597,9 @@
|
|||||||
{{model.debt}}
|
{{model.debt}}
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
|
<a-col :span="6"></a-col>
|
||||||
|
</a-row>
|
||||||
|
<a-row class="form-row" :gutter="24">
|
||||||
<a-col :span="6">
|
<a-col :span="6">
|
||||||
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="销售人员">
|
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="销售人员">
|
||||||
{{model.salesManStr}}
|
{{model.salesManStr}}
|
||||||
@@ -1358,7 +1395,7 @@
|
|||||||
} else {
|
} else {
|
||||||
this.model.getAmount = this.model.changeAmount
|
this.model.getAmount = this.model.changeAmount
|
||||||
}
|
}
|
||||||
this.model.debt = (this.model.discountLastMoney + this.model.otherMoney - this.model.changeAmount).toFixed(2)
|
this.model.debt = (this.model.discountLastMoney + this.model.otherMoney - this.model.deposit - this.model.changeAmount).toFixed(2)
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.form.setFieldsValue(pick(this.model,'id'))
|
this.form.setFieldsValue(pick(this.model,'id'))
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -111,6 +111,7 @@
|
|||||||
linkNumber: '',
|
linkNumber: '',
|
||||||
organId: '',
|
organId: '',
|
||||||
discount: '',
|
discount: '',
|
||||||
|
deposit: '',
|
||||||
remark: '',
|
remark: '',
|
||||||
queryParam: {
|
queryParam: {
|
||||||
number: "",
|
number: "",
|
||||||
@@ -231,12 +232,13 @@
|
|||||||
this.linkNumber = record.number
|
this.linkNumber = record.number
|
||||||
this.organId = record.organId
|
this.organId = record.organId
|
||||||
this.discount = record.discount
|
this.discount = record.discount
|
||||||
|
this.deposit = record.changeAmount - record.finishDeposit
|
||||||
this.remark = record.remark
|
this.remark = record.remark
|
||||||
this.loadDetailData(1)
|
this.loadDetailData(1)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
this.getSelectBillDetailRows();
|
this.getSelectBillDetailRows();
|
||||||
this.$emit('ok', this.selectBillDetailRows, this.linkNumber, this.organId, this.discount, this.remark)
|
this.$emit('ok', this.selectBillDetailRows, this.linkNumber, this.organId, this.discount, this.deposit, this.remark)
|
||||||
this.close();
|
this.close();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -46,6 +46,7 @@ export const BillListMixin = {
|
|||||||
//复制单据的时候需要移除关联单据的相关信息
|
//复制单据的时候需要移除关联单据的相关信息
|
||||||
record.linkNumber = ''
|
record.linkNumber = ''
|
||||||
record.billType = ''
|
record.billType = ''
|
||||||
|
record.deposit = ''
|
||||||
this.$refs.modalForm.edit(record);
|
this.$refs.modalForm.edit(record);
|
||||||
this.$refs.modalForm.title = "复制新增";
|
this.$refs.modalForm.title = "复制新增";
|
||||||
this.$refs.modalForm.disableSubmit = false;
|
this.$refs.modalForm.disableSubmit = false;
|
||||||
|
|||||||
@@ -212,9 +212,10 @@ export const BillModalMixin = {
|
|||||||
this.accountIdList = idList
|
this.accountIdList = idList
|
||||||
this.accountMoneyList = moneyList
|
this.accountMoneyList = moneyList
|
||||||
let discountLastMoney = this.form.getFieldValue('discountLastMoney')-0
|
let discountLastMoney = this.form.getFieldValue('discountLastMoney')-0
|
||||||
let otherMoney = this.form.getFieldValue('otherMoney')-0
|
let otherMoney = this.form.getFieldValue('otherMoney')?this.form.getFieldValue('otherMoney')-0:0
|
||||||
let debt = (discountLastMoney + otherMoney - allPrice).toFixed(2)
|
let debt = (discountLastMoney + otherMoney - allPrice).toFixed(2)
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
|
allPrice = this.prefixNo === 'CGDD' || this.prefixNo === 'XSDD'?0:allPrice
|
||||||
this.form.setFieldsValue({'changeAmount':allPrice, 'debt':debt})
|
this.form.setFieldsValue({'changeAmount':allPrice, 'debt':debt})
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@@ -553,11 +554,16 @@ export const BillModalMixin = {
|
|||||||
autoChangePrice(target) {
|
autoChangePrice(target) {
|
||||||
let allTaxLastMoney = target.statisticsColumns.taxLastMoney-0
|
let allTaxLastMoney = target.statisticsColumns.taxLastMoney-0
|
||||||
let discount = this.form.getFieldValue('discount')-0
|
let discount = this.form.getFieldValue('discount')-0
|
||||||
let otherMoney = this.form.getFieldValue('otherMoney')-0
|
let otherMoney = this.form.getFieldValue('otherMoney')?this.form.getFieldValue('otherMoney')-0:0
|
||||||
|
let deposit = this.form.getFieldValue('deposit')
|
||||||
let discountMoney = (discount*0.01*allTaxLastMoney).toFixed(2)-0
|
let discountMoney = (discount*0.01*allTaxLastMoney).toFixed(2)-0
|
||||||
let discountLastMoney = (allTaxLastMoney-discountMoney).toFixed(2)-0
|
let discountLastMoney = (allTaxLastMoney-discountMoney).toFixed(2)-0
|
||||||
let changeAmountNew = (discountLastMoney + otherMoney).toFixed(2)-0
|
let changeAmountNew = (discountLastMoney + otherMoney).toFixed(2)-0
|
||||||
|
if(deposit) {
|
||||||
|
changeAmountNew = (changeAmountNew - deposit).toFixed(2)-0
|
||||||
|
}
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
|
changeAmountNew = this.prefixNo === 'CGDD' || this.prefixNo === 'XSDD'?0:changeAmountNew
|
||||||
this.form.setFieldsValue({'discount':discount,'discountMoney':discountMoney,'discountLastMoney':discountLastMoney,
|
this.form.setFieldsValue({'discount':discount,'discountMoney':discountMoney,'discountLastMoney':discountLastMoney,
|
||||||
'changeAmount':changeAmountNew,'debt':0})
|
'changeAmount':changeAmountNew,'debt':0})
|
||||||
});
|
});
|
||||||
@@ -565,12 +571,17 @@ export const BillModalMixin = {
|
|||||||
//改变优惠率
|
//改变优惠率
|
||||||
onKeyUpDiscount(e) {
|
onKeyUpDiscount(e) {
|
||||||
const value = e.target.value-0
|
const value = e.target.value-0
|
||||||
let otherMoney = this.form.getFieldValue('otherMoney')-0
|
let otherMoney = this.form.getFieldValue('otherMoney')?this.form.getFieldValue('otherMoney')-0:0
|
||||||
|
let deposit = this.form.getFieldValue('deposit')
|
||||||
let allTaxLastMoney = this.$refs.materialDataTable.statisticsColumns.taxLastMoney-0
|
let allTaxLastMoney = this.$refs.materialDataTable.statisticsColumns.taxLastMoney-0
|
||||||
let discountMoneyNew = (allTaxLastMoney*value*0.01).toFixed(2)-0
|
let discountMoneyNew = (allTaxLastMoney*value*0.01).toFixed(2)-0
|
||||||
let discountLastMoneyNew = (allTaxLastMoney - discountMoneyNew).toFixed(2)-0
|
let discountLastMoneyNew = (allTaxLastMoney - discountMoneyNew).toFixed(2)-0
|
||||||
let changeAmountNew = (discountLastMoneyNew + otherMoney).toFixed(2)-0
|
let changeAmountNew = (discountLastMoneyNew + otherMoney).toFixed(2)-0
|
||||||
|
if(deposit) {
|
||||||
|
changeAmountNew = (changeAmountNew - deposit).toFixed(2)-0
|
||||||
|
}
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
|
changeAmountNew = this.prefixNo === 'CGDD' || this.prefixNo === 'XSDD'?0:changeAmountNew
|
||||||
this.form.setFieldsValue({'discountMoney':discountMoneyNew,'discountLastMoney':discountLastMoneyNew,
|
this.form.setFieldsValue({'discountMoney':discountMoneyNew,'discountLastMoney':discountLastMoneyNew,
|
||||||
'changeAmount':changeAmountNew,'debt':0})
|
'changeAmount':changeAmountNew,'debt':0})
|
||||||
});
|
});
|
||||||
@@ -578,12 +589,17 @@ export const BillModalMixin = {
|
|||||||
//改变付款优惠
|
//改变付款优惠
|
||||||
onKeyUpDiscountMoney(e) {
|
onKeyUpDiscountMoney(e) {
|
||||||
const value = e.target.value-0
|
const value = e.target.value-0
|
||||||
let otherMoney = this.form.getFieldValue('otherMoney')-0
|
let otherMoney = this.form.getFieldValue('otherMoney')?this.form.getFieldValue('otherMoney')-0:0
|
||||||
|
let deposit = this.form.getFieldValue('deposit')
|
||||||
let allTaxLastMoney = this.$refs.materialDataTable.statisticsColumns.taxLastMoney-0
|
let allTaxLastMoney = this.$refs.materialDataTable.statisticsColumns.taxLastMoney-0
|
||||||
let discountNew = (value/allTaxLastMoney*100).toFixed(2)-0
|
let discountNew = (value/allTaxLastMoney*100).toFixed(2)-0
|
||||||
let discountLastMoneyNew = (allTaxLastMoney - value).toFixed(2)-0
|
let discountLastMoneyNew = (allTaxLastMoney - value).toFixed(2)-0
|
||||||
let changeAmountNew = (discountLastMoneyNew + otherMoney).toFixed(2)-0
|
let changeAmountNew = (discountLastMoneyNew + otherMoney).toFixed(2)-0
|
||||||
|
if(deposit) {
|
||||||
|
changeAmountNew = (changeAmountNew - deposit).toFixed(2)-0
|
||||||
|
}
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
|
changeAmountNew = this.prefixNo === 'CGDD' || this.prefixNo === 'XSDD'?0:changeAmountNew
|
||||||
this.form.setFieldsValue({'discount':discountNew,'discountLastMoney':discountLastMoneyNew,
|
this.form.setFieldsValue({'discount':discountNew,'discountLastMoney':discountLastMoneyNew,
|
||||||
'changeAmount':changeAmountNew,'debt':0})
|
'changeAmount':changeAmountNew,'debt':0})
|
||||||
});
|
});
|
||||||
@@ -592,7 +608,24 @@ export const BillModalMixin = {
|
|||||||
onKeyUpOtherMoney(e) {
|
onKeyUpOtherMoney(e) {
|
||||||
const value = e.target.value-0
|
const value = e.target.value-0
|
||||||
let discountLastMoney = this.form.getFieldValue('discountLastMoney')-0
|
let discountLastMoney = this.form.getFieldValue('discountLastMoney')-0
|
||||||
|
let deposit = this.form.getFieldValue('deposit')
|
||||||
let changeAmountNew = (discountLastMoney + value).toFixed(2)-0
|
let changeAmountNew = (discountLastMoney + value).toFixed(2)-0
|
||||||
|
if(deposit) {
|
||||||
|
changeAmountNew = (changeAmountNew - deposit).toFixed(2)-0
|
||||||
|
}
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.form.setFieldsValue({'changeAmount':changeAmountNew, 'debt':0})
|
||||||
|
});
|
||||||
|
},
|
||||||
|
//改变扣除订金
|
||||||
|
onKeyUpDeposit(e){
|
||||||
|
const value = e.target.value-0
|
||||||
|
let discountLastMoney = this.form.getFieldValue('discountLastMoney')-0
|
||||||
|
let otherMoney = this.form.getFieldValue('otherMoney')?this.form.getFieldValue('otherMoney')-0:0
|
||||||
|
let changeAmountNew = (discountLastMoney + otherMoney).toFixed(2)-0
|
||||||
|
if(value) {
|
||||||
|
changeAmountNew = (changeAmountNew - value).toFixed(2)-0
|
||||||
|
}
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.form.setFieldsValue({'changeAmount':changeAmountNew, 'debt':0})
|
this.form.setFieldsValue({'changeAmount':changeAmountNew, 'debt':0})
|
||||||
});
|
});
|
||||||
@@ -601,8 +634,12 @@ export const BillModalMixin = {
|
|||||||
onKeyUpChangeAmount(e) {
|
onKeyUpChangeAmount(e) {
|
||||||
const value = e.target.value-0
|
const value = e.target.value-0
|
||||||
let discountLastMoney = this.form.getFieldValue('discountLastMoney')-0
|
let discountLastMoney = this.form.getFieldValue('discountLastMoney')-0
|
||||||
let otherMoney = this.form.getFieldValue('otherMoney')-0
|
let otherMoney = this.form.getFieldValue('otherMoney')?this.form.getFieldValue('otherMoney')-0:0
|
||||||
|
let deposit = this.form.getFieldValue('deposit')
|
||||||
let debtNew = (discountLastMoney + otherMoney - value).toFixed(2)-0
|
let debtNew = (discountLastMoney + otherMoney - value).toFixed(2)-0
|
||||||
|
if(deposit) {
|
||||||
|
debtNew = (debtNew - deposit).toFixed(2)-0
|
||||||
|
}
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.form.setFieldsValue({'debt':debtNew})
|
this.form.setFieldsValue({'debt':debtNew})
|
||||||
});
|
});
|
||||||
@@ -692,16 +729,21 @@ export const BillModalMixin = {
|
|||||||
allTaxLastMoney = allTaxLastMoney + (newDetail.taxLastMoney-0)
|
allTaxLastMoney = allTaxLastMoney + (newDetail.taxLastMoney-0)
|
||||||
}
|
}
|
||||||
let discount = this.form.getFieldValue('discount')-0
|
let discount = this.form.getFieldValue('discount')-0
|
||||||
let otherMoney = this.form.getFieldValue('otherMoney')-0
|
let otherMoney = this.form.getFieldValue('otherMoney')?this.form.getFieldValue('otherMoney')-0:0
|
||||||
|
let deposit = this.form.getFieldValue('deposit')
|
||||||
let discountMoney = (discount*0.01*allTaxLastMoney).toFixed(2)-0
|
let discountMoney = (discount*0.01*allTaxLastMoney).toFixed(2)-0
|
||||||
let discountLastMoney = (allTaxLastMoney-discountMoney).toFixed(2)-0
|
let discountLastMoney = (allTaxLastMoney-discountMoney).toFixed(2)-0
|
||||||
let changeAmountNew = (discountLastMoney + otherMoney).toFixed(2)-0
|
let changeAmountNew = (discountLastMoney + otherMoney).toFixed(2)-0
|
||||||
|
if(deposit) {
|
||||||
|
changeAmountNew = (changeAmountNew - deposit).toFixed(2)-0
|
||||||
|
}
|
||||||
if(this.prefixNo === 'LSCK' || this.prefixNo === 'LSTH') {
|
if(this.prefixNo === 'LSCK' || this.prefixNo === 'LSTH') {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.form.setFieldsValue({'changeAmount':allLastMoney,'getAmount':allLastMoney,'backAmount':0})
|
this.form.setFieldsValue({'changeAmount':allLastMoney,'getAmount':allLastMoney,'backAmount':0})
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
|
changeAmountNew = this.prefixNo === 'CGDD' || this.prefixNo === 'XSDD'?0:changeAmountNew
|
||||||
this.form.setFieldsValue({'discount':discount,'discountMoney':discountMoney,'discountLastMoney':discountLastMoney,
|
this.form.setFieldsValue({'discount':discount,'discountMoney':discountMoney,'discountLastMoney':discountLastMoney,
|
||||||
'changeAmount':changeAmountNew,'debt':0})
|
'changeAmount':changeAmountNew,'debt':0})
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -369,7 +369,7 @@
|
|||||||
this.$refs.linkBillList.show('入库', '采购', '供应商', "1")
|
this.$refs.linkBillList.show('入库', '采购', '供应商', "1")
|
||||||
this.$refs.linkBillList.title = "选择采购入库"
|
this.$refs.linkBillList.title = "选择采购入库"
|
||||||
},
|
},
|
||||||
linkBillListOk(selectBillDetailRows, linkNumber, organId, discount, remark) {
|
linkBillListOk(selectBillDetailRows, linkNumber, organId, discount, deposit, remark) {
|
||||||
this.rowCanEdit = false
|
this.rowCanEdit = false
|
||||||
this.materialTable.columns[1].type = FormTypes.normal
|
this.materialTable.columns[1].type = FormTypes.normal
|
||||||
if(selectBillDetailRows && selectBillDetailRows.length>0) {
|
if(selectBillDetailRows && selectBillDetailRows.length>0) {
|
||||||
|
|||||||
@@ -155,6 +155,11 @@
|
|||||||
</a-tooltip>
|
</a-tooltip>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
|
<a-col v-if="depositStatus" :lg="6" :md="12" :sm="24">
|
||||||
|
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="扣除订金">
|
||||||
|
<a-input v-decorator.trim="[ 'deposit' ]" @keyup="onKeyUpDeposit"/>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
<a-col :lg="6" :md="12" :sm="24">
|
<a-col :lg="6" :md="12" :sm="24">
|
||||||
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="本次付款">
|
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="本次付款">
|
||||||
<a-input placeholder="请输入本次付款" v-decorator.trim="[ 'changeAmount' ]" @keyup="onKeyUpChangeAmount"/>
|
<a-input placeholder="请输入本次付款" v-decorator.trim="[ 'changeAmount' ]" @keyup="onKeyUpChangeAmount"/>
|
||||||
@@ -166,8 +171,6 @@
|
|||||||
<a-input placeholder="请输入本次欠款" v-decorator.trim="[ 'debt' ]" :readOnly="true"/>
|
<a-input placeholder="请输入本次欠款" v-decorator.trim="[ 'debt' ]" :readOnly="true"/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :lg="6" :md="12" :sm="24">
|
|
||||||
</a-col>
|
|
||||||
</a-row>
|
</a-row>
|
||||||
<a-row class="form-row" :gutter="24">
|
<a-row class="form-row" :gutter="24">
|
||||||
<a-col :lg="6" :md="12" :sm="24">
|
<a-col :lg="6" :md="12" :sm="24">
|
||||||
@@ -234,6 +237,7 @@
|
|||||||
visible: false,
|
visible: false,
|
||||||
operTimeStr: '',
|
operTimeStr: '',
|
||||||
prefixNo: 'CGRK',
|
prefixNo: 'CGRK',
|
||||||
|
depositStatus: false,
|
||||||
fileList:[],
|
fileList:[],
|
||||||
rowCanEdit: true,
|
rowCanEdit: true,
|
||||||
model: {},
|
model: {},
|
||||||
@@ -324,6 +328,7 @@
|
|||||||
this.changeFormTypes(this.materialTable.columns, 'preNumber', 0)
|
this.changeFormTypes(this.materialTable.columns, 'preNumber', 0)
|
||||||
this.changeFormTypes(this.materialTable.columns, 'finishNumber', 0)
|
this.changeFormTypes(this.materialTable.columns, 'finishNumber', 0)
|
||||||
if (this.action === 'add') {
|
if (this.action === 'add') {
|
||||||
|
this.depositStatus = false
|
||||||
this.addInit(this.prefixNo)
|
this.addInit(this.prefixNo)
|
||||||
this.fileList = []
|
this.fileList = []
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
@@ -335,7 +340,13 @@
|
|||||||
this.materialTable.columns[1].type = FormTypes.normal
|
this.materialTable.columns[1].type = FormTypes.normal
|
||||||
}
|
}
|
||||||
this.model.operTime = this.model.operTimeStr
|
this.model.operTime = this.model.operTimeStr
|
||||||
this.model.debt = (this.model.discountLastMoney + this.model.otherMoney - this.model.changeAmount).toFixed(2)
|
if(this.model.deposit) {
|
||||||
|
this.depositStatus = true
|
||||||
|
} else {
|
||||||
|
this.depositStatus = false
|
||||||
|
this.model.deposit = 0
|
||||||
|
}
|
||||||
|
this.model.debt = (this.model.discountLastMoney + this.model.otherMoney - this.model.deposit - this.model.changeAmount).toFixed(2)
|
||||||
if(this.model.accountId == null) {
|
if(this.model.accountId == null) {
|
||||||
this.model.accountId = 0
|
this.model.accountId = 0
|
||||||
this.manyAccountBtnStatus = true
|
this.manyAccountBtnStatus = true
|
||||||
@@ -347,7 +358,7 @@
|
|||||||
this.fileList = this.model.fileName
|
this.fileList = this.model.fileName
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.form.setFieldsValue(pick(this.model,'organId', 'operTime', 'number', 'linkNumber', 'remark',
|
this.form.setFieldsValue(pick(this.model,'organId', 'operTime', 'number', 'linkNumber', 'remark',
|
||||||
'discount','discountMoney','discountLastMoney','otherMoney','accountId','changeAmount','debt'))
|
'discount','discountMoney','discountLastMoney','otherMoney','accountId','deposit','changeAmount','debt'))
|
||||||
});
|
});
|
||||||
// 加载子表数据
|
// 加载子表数据
|
||||||
let params = {
|
let params = {
|
||||||
@@ -409,7 +420,7 @@
|
|||||||
this.$refs.linkBillList.show('其它', '采购订单', '供应商', "1,3")
|
this.$refs.linkBillList.show('其它', '采购订单', '供应商', "1,3")
|
||||||
this.$refs.linkBillList.title = "选择采购订单"
|
this.$refs.linkBillList.title = "选择采购订单"
|
||||||
},
|
},
|
||||||
linkBillListOk(selectBillDetailRows, linkNumber, organId, discount, remark) {
|
linkBillListOk(selectBillDetailRows, linkNumber, organId, discount, deposit, remark) {
|
||||||
this.rowCanEdit = false
|
this.rowCanEdit = false
|
||||||
this.materialTable.columns[1].type = FormTypes.normal
|
this.materialTable.columns[1].type = FormTypes.normal
|
||||||
this.changeFormTypes(this.materialTable.columns, 'preNumber', 1)
|
this.changeFormTypes(this.materialTable.columns, 'preNumber', 1)
|
||||||
@@ -436,6 +447,11 @@
|
|||||||
if(allTaxLastMoney) {
|
if(allTaxLastMoney) {
|
||||||
let discountMoney = (discount*allTaxLastMoney/100).toFixed(2)-0
|
let discountMoney = (discount*allTaxLastMoney/100).toFixed(2)-0
|
||||||
let discountLastMoney = (allTaxLastMoney - discountMoney).toFixed(2)-0
|
let discountLastMoney = (allTaxLastMoney - discountMoney).toFixed(2)-0
|
||||||
|
let changeAmount = discountLastMoney
|
||||||
|
if(deposit) {
|
||||||
|
this.depositStatus = true
|
||||||
|
changeAmount = (discountLastMoney - deposit).toFixed(2)-0
|
||||||
|
}
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.form.setFieldsValue({
|
this.form.setFieldsValue({
|
||||||
'organId': organId,
|
'organId': organId,
|
||||||
@@ -443,7 +459,8 @@
|
|||||||
'discount': discount,
|
'discount': discount,
|
||||||
'discountMoney': discountMoney,
|
'discountMoney': discountMoney,
|
||||||
'discountLastMoney': discountLastMoney,
|
'discountLastMoney': discountLastMoney,
|
||||||
'changeAmount': discountLastMoney,
|
'deposit': deposit,
|
||||||
|
'changeAmount': changeAmount,
|
||||||
'remark': remark
|
'remark': remark
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -54,7 +54,7 @@
|
|||||||
<a-form-item v-if="purchaseBySaleFlag" :labelCol="labelCol" :wrapperCol="wrapperCol" label="关联订单" data-step="3" data-title="关联订单"
|
<a-form-item v-if="purchaseBySaleFlag" :labelCol="labelCol" :wrapperCol="wrapperCol" label="关联订单" data-step="3" data-title="关联订单"
|
||||||
data-intro="采购订单单据可以通过关联订单来选择已录入的销售订单,选择之后会自动加载订单的内容,
|
data-intro="采购订单单据可以通过关联订单来选择已录入的销售订单,选择之后会自动加载订单的内容,
|
||||||
提交之后原来的销售订单会对应的改变单据状态。另外本系统支持分批多次关联">
|
提交之后原来的销售订单会对应的改变单据状态。另外本系统支持分批多次关联">
|
||||||
<a-input-search placeholder="请选择关联订单" v-decorator="[ 'linkNumber' ]" @search="onSearchLinkNumber" :readOnly="true"/>
|
<a-input-search placeholder="请选择关联销售订单" v-decorator="[ 'linkNumber' ]" @search="onSearchLinkNumber" :readOnly="true"/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
@@ -115,27 +115,61 @@
|
|||||||
<a-input placeholder="请输入优惠后金额" v-decorator.trim="[ 'discountLastMoney' ]" :readOnly="true"/>
|
<a-input placeholder="请输入优惠后金额" v-decorator.trim="[ 'discountLastMoney' ]" :readOnly="true"/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
|
<a-col :lg="6" :md="12" :sm="24"></a-col>
|
||||||
|
</a-row>
|
||||||
|
<a-row class="form-row" :gutter="24">
|
||||||
|
<a-col :lg="6" :md="12" :sm="24">
|
||||||
|
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="结算账户" data-step="9" data-title="结算账户"
|
||||||
|
data-intro="如果在下拉框中选择多账户,则可以通过多个结算账户进行结算">
|
||||||
|
<a-select style="width:185px;" placeholder="选择结算账户" v-decorator="[ 'accountId', validatorRules.accountId ]"
|
||||||
|
:dropdownMatchSelectWidth="false" allowClear @select="selectAccount">
|
||||||
|
<div slot="dropdownRender" slot-scope="menu">
|
||||||
|
<v-nodes :vnodes="menu" />
|
||||||
|
<a-divider style="margin: 4px 0;" />
|
||||||
|
<div v-if="isTenant" style="padding: 4px 8px; cursor: pointer;"
|
||||||
|
@mousedown="e => e.preventDefault()" @click="addAccount"><a-icon type="plus" /> 新增结算账户</div>
|
||||||
|
</div>
|
||||||
|
<a-select-option v-for="(item,index) in accountList" :key="index" :value="item.id">
|
||||||
|
{{ item.name }}
|
||||||
|
</a-select-option>
|
||||||
|
</a-select>
|
||||||
|
<a-tooltip title="多账户明细">
|
||||||
|
<a-button type="default" icon="folder" style="margin-left: 8px;" size="small" v-show="manyAccountBtnStatus" @click="handleManyAccount"/>
|
||||||
|
</a-tooltip>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :lg="6" :md="12" :sm="24">
|
||||||
|
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="支付订金">
|
||||||
|
<a-input placeholder="请输入支付订金" v-decorator.trim="[ 'changeAmount' ]" @keyup="onKeyUpChangeAmount"/>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :lg="6" :md="12" :sm="24">
|
||||||
|
</a-col>
|
||||||
<a-col :lg="6" :md="12" :sm="24">
|
<a-col :lg="6" :md="12" :sm="24">
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
<a-row class="form-row" :gutter="24">
|
<a-row class="form-row" :gutter="24">
|
||||||
<a-col :lg="6" :md="12" :sm="24">
|
<a-col :lg="6" :md="12" :sm="24">
|
||||||
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="附件" data-step="8" data-title="附件" data-intro="可以上传与单据相关的图片、文档,支持多个文件">
|
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="附件" data-step="10" data-title="附件" data-intro="可以上传与单据相关的图片、文档,支持多个文件">
|
||||||
<j-upload v-model="fileList" bizPath="bill"></j-upload>
|
<j-upload v-model="fileList" bizPath="bill"></j-upload>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
</a-form>
|
</a-form>
|
||||||
</a-spin>
|
</a-spin>
|
||||||
|
<many-account-modal ref="manyAccountModalForm" @ok="manyAccountModalFormOk"></many-account-modal>
|
||||||
<vendor-modal ref="vendorModalForm" @ok="vendorModalFormOk"></vendor-modal>
|
<vendor-modal ref="vendorModalForm" @ok="vendorModalFormOk"></vendor-modal>
|
||||||
|
<account-modal ref="accountModalForm" @ok="accountModalFormOk"></account-modal>
|
||||||
<link-bill-list ref="linkBillList" @ok="linkBillListOk"></link-bill-list>
|
<link-bill-list ref="linkBillList" @ok="linkBillListOk"></link-bill-list>
|
||||||
<history-bill-list ref="historyBillListModalForm"></history-bill-list>
|
<history-bill-list ref="historyBillListModalForm"></history-bill-list>
|
||||||
</j-modal>
|
</j-modal>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import pick from 'lodash.pick'
|
import pick from 'lodash.pick'
|
||||||
|
import ManyAccountModal from '../dialog/ManyAccountModal'
|
||||||
import LinkBillList from '../dialog/LinkBillList'
|
import LinkBillList from '../dialog/LinkBillList'
|
||||||
import VendorModal from '../../system/modules/VendorModal'
|
import VendorModal from '../../system/modules/VendorModal'
|
||||||
|
import AccountModal from '../../system/modules/AccountModal'
|
||||||
import HistoryBillList from '../dialog/HistoryBillList'
|
import HistoryBillList from '../dialog/HistoryBillList'
|
||||||
import { FormTypes } from '@/utils/JEditableTableUtil'
|
import { FormTypes } from '@/utils/JEditableTableUtil'
|
||||||
import { JEditableTableMixin } from '@/mixins/JEditableTableMixin'
|
import { JEditableTableMixin } from '@/mixins/JEditableTableMixin'
|
||||||
@@ -149,8 +183,10 @@
|
|||||||
name: "PurchaseOrderModal",
|
name: "PurchaseOrderModal",
|
||||||
mixins: [JEditableTableMixin,BillModalMixin],
|
mixins: [JEditableTableMixin,BillModalMixin],
|
||||||
components: {
|
components: {
|
||||||
|
ManyAccountModal,
|
||||||
LinkBillList,
|
LinkBillList,
|
||||||
VendorModal,
|
VendorModal,
|
||||||
|
AccountModal,
|
||||||
HistoryBillList,
|
HistoryBillList,
|
||||||
JUpload,
|
JUpload,
|
||||||
JDate,
|
JDate,
|
||||||
@@ -263,7 +299,7 @@
|
|||||||
this.fileList = this.model.fileName
|
this.fileList = this.model.fileName
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.form.setFieldsValue(pick(this.model,'organId', 'operTime', 'number', 'linkNumber', 'remark',
|
this.form.setFieldsValue(pick(this.model,'organId', 'operTime', 'number', 'linkNumber', 'remark',
|
||||||
'discount','discountMoney','discountLastMoney'))
|
'discount','discountMoney','discountLastMoney','accountId','changeAmount'))
|
||||||
});
|
});
|
||||||
// 加载子表数据
|
// 加载子表数据
|
||||||
let params = {
|
let params = {
|
||||||
@@ -280,6 +316,7 @@
|
|||||||
this.copyAddInit(this.prefixNo)
|
this.copyAddInit(this.prefixNo)
|
||||||
}
|
}
|
||||||
this.initSupplier()
|
this.initSupplier()
|
||||||
|
this.initAccount()
|
||||||
},
|
},
|
||||||
/** 整理成formData */
|
/** 整理成formData */
|
||||||
classifyIntoFormData(allValues) {
|
classifyIntoFormData(allValues) {
|
||||||
@@ -294,6 +331,7 @@
|
|||||||
totalPrice += item.allPrice-0
|
totalPrice += item.allPrice-0
|
||||||
}
|
}
|
||||||
billMain.totalPrice = 0-totalPrice
|
billMain.totalPrice = 0-totalPrice
|
||||||
|
billMain.changeAmount = 0-billMain.changeAmount
|
||||||
if(this.fileList && this.fileList.length > 0) {
|
if(this.fileList && this.fileList.length > 0) {
|
||||||
billMain.fileName = this.fileList
|
billMain.fileName = this.fileList
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -370,7 +370,7 @@
|
|||||||
this.$refs.linkBillList.show('出库', '零售', '会员', "1")
|
this.$refs.linkBillList.show('出库', '零售', '会员', "1")
|
||||||
this.$refs.linkBillList.title = "选择零售出库"
|
this.$refs.linkBillList.title = "选择零售出库"
|
||||||
},
|
},
|
||||||
linkBillListOk(selectBillDetailRows, linkNumber, organId, discount, remark) {
|
linkBillListOk(selectBillDetailRows, linkNumber, organId, discount, deposit, remark) {
|
||||||
this.rowCanEdit = false
|
this.rowCanEdit = false
|
||||||
this.materialTable.columns[1].type = FormTypes.normal
|
this.materialTable.columns[1].type = FormTypes.normal
|
||||||
if(selectBillDetailRows && selectBillDetailRows.length>0) {
|
if(selectBillDetailRows && selectBillDetailRows.length>0) {
|
||||||
|
|||||||
@@ -382,7 +382,7 @@
|
|||||||
this.$refs.linkBillList.show('出库', '销售', '客户', "1")
|
this.$refs.linkBillList.show('出库', '销售', '客户', "1")
|
||||||
this.$refs.linkBillList.title = "选择销售出库"
|
this.$refs.linkBillList.title = "选择销售出库"
|
||||||
},
|
},
|
||||||
linkBillListOk(selectBillDetailRows, linkNumber, organId, discount, remark) {
|
linkBillListOk(selectBillDetailRows, linkNumber, organId, discount, deposit, remark) {
|
||||||
this.rowCanEdit = false
|
this.rowCanEdit = false
|
||||||
this.materialTable.columns[1].type = FormTypes.normal
|
this.materialTable.columns[1].type = FormTypes.normal
|
||||||
if(selectBillDetailRows && selectBillDetailRows.length>0) {
|
if(selectBillDetailRows && selectBillDetailRows.length>0) {
|
||||||
|
|||||||
@@ -115,6 +115,36 @@
|
|||||||
<a-input placeholder="请输入优惠后金额" v-decorator.trim="[ 'discountLastMoney' ]" :readOnly="true"/>
|
<a-input placeholder="请输入优惠后金额" v-decorator.trim="[ 'discountLastMoney' ]" :readOnly="true"/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
|
<a-col :lg="6" :md="12" :sm="24"></a-col>
|
||||||
|
</a-row>
|
||||||
|
<a-row class="form-row" :gutter="24">
|
||||||
|
<a-col :lg="6" :md="12" :sm="24">
|
||||||
|
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="结算账户" data-step="9" data-title="结算账户"
|
||||||
|
data-intro="如果在下拉框中选择多账户,则可以通过多个结算账户进行结算">
|
||||||
|
<a-select style="width:185px;" placeholder="选择结算账户" v-decorator="[ 'accountId', validatorRules.accountId ]"
|
||||||
|
:dropdownMatchSelectWidth="false" allowClear @select="selectAccount">
|
||||||
|
<div slot="dropdownRender" slot-scope="menu">
|
||||||
|
<v-nodes :vnodes="menu" />
|
||||||
|
<a-divider style="margin: 4px 0;" />
|
||||||
|
<div v-if="isTenant" style="padding: 4px 8px; cursor: pointer;"
|
||||||
|
@mousedown="e => e.preventDefault()" @click="addAccount"><a-icon type="plus" /> 新增结算账户</div>
|
||||||
|
</div>
|
||||||
|
<a-select-option v-for="(item,index) in accountList" :key="index" :value="item.id">
|
||||||
|
{{ item.name }}
|
||||||
|
</a-select-option>
|
||||||
|
</a-select>
|
||||||
|
<a-tooltip title="多账户明细">
|
||||||
|
<a-button type="default" icon="folder" style="margin-left: 8px;" size="small" v-show="manyAccountBtnStatus" @click="handleManyAccount"/>
|
||||||
|
</a-tooltip>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :lg="6" :md="12" :sm="24">
|
||||||
|
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="收取订金">
|
||||||
|
<a-input placeholder="请输入收取订金" v-decorator.trim="[ 'changeAmount' ]" @keyup="onKeyUpChangeAmount"/>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :lg="6" :md="12" :sm="24">
|
||||||
|
</a-col>
|
||||||
<a-col :lg="6" :md="12" :sm="24">
|
<a-col :lg="6" :md="12" :sm="24">
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
@@ -127,13 +157,17 @@
|
|||||||
</a-row>
|
</a-row>
|
||||||
</a-form>
|
</a-form>
|
||||||
</a-spin>
|
</a-spin>
|
||||||
|
<many-account-modal ref="manyAccountModalForm" @ok="manyAccountModalFormOk"></many-account-modal>
|
||||||
<customer-modal ref="customerModalForm" @ok="customerModalFormOk"></customer-modal>
|
<customer-modal ref="customerModalForm" @ok="customerModalFormOk"></customer-modal>
|
||||||
|
<account-modal ref="accountModalForm" @ok="accountModalFormOk"></account-modal>
|
||||||
<history-bill-list ref="historyBillListModalForm"></history-bill-list>
|
<history-bill-list ref="historyBillListModalForm"></history-bill-list>
|
||||||
</j-modal>
|
</j-modal>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import pick from 'lodash.pick'
|
import pick from 'lodash.pick'
|
||||||
|
import ManyAccountModal from '../dialog/ManyAccountModal'
|
||||||
import CustomerModal from '../../system/modules/CustomerModal'
|
import CustomerModal from '../../system/modules/CustomerModal'
|
||||||
|
import AccountModal from '../../system/modules/AccountModal'
|
||||||
import HistoryBillList from '../dialog/HistoryBillList'
|
import HistoryBillList from '../dialog/HistoryBillList'
|
||||||
import { FormTypes } from '@/utils/JEditableTableUtil'
|
import { FormTypes } from '@/utils/JEditableTableUtil'
|
||||||
import { JEditableTableMixin } from '@/mixins/JEditableTableMixin'
|
import { JEditableTableMixin } from '@/mixins/JEditableTableMixin'
|
||||||
@@ -147,7 +181,9 @@
|
|||||||
name: "SaleOrderModal",
|
name: "SaleOrderModal",
|
||||||
mixins: [JEditableTableMixin, BillModalMixin],
|
mixins: [JEditableTableMixin, BillModalMixin],
|
||||||
components: {
|
components: {
|
||||||
|
ManyAccountModal,
|
||||||
CustomerModal,
|
CustomerModal,
|
||||||
|
AccountModal,
|
||||||
HistoryBillList,
|
HistoryBillList,
|
||||||
JUpload,
|
JUpload,
|
||||||
JDate,
|
JDate,
|
||||||
@@ -246,7 +282,7 @@
|
|||||||
this.fileList = this.model.fileName
|
this.fileList = this.model.fileName
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.form.setFieldsValue(pick(this.model,'organId', 'operTime', 'number', 'remark',
|
this.form.setFieldsValue(pick(this.model,'organId', 'operTime', 'number', 'remark',
|
||||||
'discount','discountMoney','discountLastMoney','otherMoney','accountId','changeAmount','salesMan'))
|
'discount','discountMoney','discountLastMoney','accountId','changeAmount','salesMan'))
|
||||||
});
|
});
|
||||||
// 加载子表数据
|
// 加载子表数据
|
||||||
let params = {
|
let params = {
|
||||||
@@ -264,6 +300,7 @@
|
|||||||
}
|
}
|
||||||
this.initCustomer()
|
this.initCustomer()
|
||||||
this.initSalesman()
|
this.initSalesman()
|
||||||
|
this.initAccount()
|
||||||
},
|
},
|
||||||
//提交单据时整理成formData
|
//提交单据时整理成formData
|
||||||
classifyIntoFormData(allValues) {
|
classifyIntoFormData(allValues) {
|
||||||
|
|||||||
@@ -156,6 +156,11 @@
|
|||||||
</a-tooltip>
|
</a-tooltip>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
|
<a-col v-if="depositStatus" :lg="6" :md="12" :sm="24">
|
||||||
|
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="扣除订金">
|
||||||
|
<a-input v-decorator.trim="[ 'deposit' ]" />
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
<a-col :lg="6" :md="12" :sm="24">
|
<a-col :lg="6" :md="12" :sm="24">
|
||||||
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="本次收款">
|
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="本次收款">
|
||||||
<a-input placeholder="请输入本次付款" v-decorator.trim="[ 'changeAmount' ]" @keyup="onKeyUpChangeAmount"/>
|
<a-input placeholder="请输入本次付款" v-decorator.trim="[ 'changeAmount' ]" @keyup="onKeyUpChangeAmount"/>
|
||||||
@@ -167,12 +172,20 @@
|
|||||||
<a-input placeholder="请输入本次欠款" v-decorator.trim="[ 'debt' ]" :readOnly="true"/>
|
<a-input placeholder="请输入本次欠款" v-decorator.trim="[ 'debt' ]" :readOnly="true"/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
<a-row class="form-row" :gutter="24">
|
||||||
<a-col :lg="6" :md="12" :sm="24">
|
<a-col :lg="6" :md="12" :sm="24">
|
||||||
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="销售人员" data-step="11" data-title="销售人员"
|
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="销售人员" data-step="11" data-title="销售人员"
|
||||||
data-intro="销售人员的数据来自【经手人管理】菜单中的业务员">
|
data-intro="销售人员的数据来自【经手人管理】菜单中的业务员">
|
||||||
<j-select-multiple placeholder="请选择销售人员" v-model="personList.value" :options="personList.options"/>
|
<j-select-multiple style="width:185px;" placeholder="请选择销售人员" v-model="personList.value" :options="personList.options"/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
|
<a-col :lg="6" :md="12" :sm="24">
|
||||||
|
</a-col>
|
||||||
|
<a-col :lg="6" :md="12" :sm="24">
|
||||||
|
</a-col>
|
||||||
|
<a-col :lg="6" :md="12" :sm="24">
|
||||||
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
<a-row class="form-row" :gutter="24">
|
<a-row class="form-row" :gutter="24">
|
||||||
<a-col :lg="6" :md="12" :sm="24">
|
<a-col :lg="6" :md="12" :sm="24">
|
||||||
@@ -240,6 +253,7 @@
|
|||||||
visible: false,
|
visible: false,
|
||||||
operTimeStr: '',
|
operTimeStr: '',
|
||||||
prefixNo: 'XSCK',
|
prefixNo: 'XSCK',
|
||||||
|
depositStatus: false,
|
||||||
fileList:[],
|
fileList:[],
|
||||||
rowCanEdit: true,
|
rowCanEdit: true,
|
||||||
model: {},
|
model: {},
|
||||||
@@ -328,6 +342,7 @@
|
|||||||
this.changeFormTypes(this.materialTable.columns, 'preNumber', 0)
|
this.changeFormTypes(this.materialTable.columns, 'preNumber', 0)
|
||||||
this.changeFormTypes(this.materialTable.columns, 'finishNumber', 0)
|
this.changeFormTypes(this.materialTable.columns, 'finishNumber', 0)
|
||||||
if (this.action === 'add') {
|
if (this.action === 'add') {
|
||||||
|
this.depositStatus = false
|
||||||
this.addInit(this.prefixNo)
|
this.addInit(this.prefixNo)
|
||||||
this.personList.value = ''
|
this.personList.value = ''
|
||||||
this.fileList = []
|
this.fileList = []
|
||||||
@@ -340,7 +355,13 @@
|
|||||||
this.materialTable.columns[1].type = FormTypes.normal
|
this.materialTable.columns[1].type = FormTypes.normal
|
||||||
}
|
}
|
||||||
this.model.operTime = this.model.operTimeStr
|
this.model.operTime = this.model.operTimeStr
|
||||||
this.model.debt = (this.model.discountLastMoney + this.model.otherMoney - this.model.changeAmount).toFixed(2)
|
if(this.model.deposit) {
|
||||||
|
this.depositStatus = true
|
||||||
|
} else {
|
||||||
|
this.depositStatus = false
|
||||||
|
this.model.deposit = 0
|
||||||
|
}
|
||||||
|
this.model.debt = (this.model.discountLastMoney + this.model.otherMoney - this.model.deposit - this.model.changeAmount).toFixed(2)
|
||||||
if(this.model.accountId == null) {
|
if(this.model.accountId == null) {
|
||||||
this.model.accountId = 0
|
this.model.accountId = 0
|
||||||
this.manyAccountBtnStatus = true
|
this.manyAccountBtnStatus = true
|
||||||
@@ -353,7 +374,7 @@
|
|||||||
this.fileList = this.model.fileName
|
this.fileList = this.model.fileName
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.form.setFieldsValue(pick(this.model,'organId', 'operTime', 'number', 'linkNumber', 'remark',
|
this.form.setFieldsValue(pick(this.model,'organId', 'operTime', 'number', 'linkNumber', 'remark',
|
||||||
'discount','discountMoney','discountLastMoney','otherMoney','accountId','changeAmount','debt','salesMan'))
|
'discount','discountMoney','discountLastMoney','otherMoney','accountId','deposit','changeAmount','debt','salesMan'))
|
||||||
});
|
});
|
||||||
// 加载子表数据
|
// 加载子表数据
|
||||||
let params = {
|
let params = {
|
||||||
@@ -415,7 +436,7 @@
|
|||||||
this.$refs.linkBillList.show('其它', '销售订单', '客户', "1,3")
|
this.$refs.linkBillList.show('其它', '销售订单', '客户', "1,3")
|
||||||
this.$refs.linkBillList.title = "选择销售订单"
|
this.$refs.linkBillList.title = "选择销售订单"
|
||||||
},
|
},
|
||||||
linkBillListOk(selectBillDetailRows, linkNumber, organId, discount, remark) {
|
linkBillListOk(selectBillDetailRows, linkNumber, organId, discount, deposit, remark) {
|
||||||
this.rowCanEdit = false
|
this.rowCanEdit = false
|
||||||
this.materialTable.columns[1].type = FormTypes.normal
|
this.materialTable.columns[1].type = FormTypes.normal
|
||||||
this.changeFormTypes(this.materialTable.columns, 'preNumber', 1)
|
this.changeFormTypes(this.materialTable.columns, 'preNumber', 1)
|
||||||
@@ -442,6 +463,11 @@
|
|||||||
if(allTaxLastMoney) {
|
if(allTaxLastMoney) {
|
||||||
let discountMoney = (discount*allTaxLastMoney/100).toFixed(2)-0
|
let discountMoney = (discount*allTaxLastMoney/100).toFixed(2)-0
|
||||||
let discountLastMoney = (allTaxLastMoney - discountMoney).toFixed(2)-0
|
let discountLastMoney = (allTaxLastMoney - discountMoney).toFixed(2)-0
|
||||||
|
let changeAmount = discountLastMoney
|
||||||
|
if(deposit) {
|
||||||
|
this.depositStatus = true
|
||||||
|
changeAmount = (discountLastMoney - deposit).toFixed(2)-0
|
||||||
|
}
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.form.setFieldsValue({
|
this.form.setFieldsValue({
|
||||||
'organId': organId,
|
'organId': organId,
|
||||||
@@ -449,7 +475,8 @@
|
|||||||
'discount': discount,
|
'discount': discount,
|
||||||
'discountMoney': discountMoney,
|
'discountMoney': discountMoney,
|
||||||
'discountLastMoney': discountLastMoney,
|
'discountLastMoney': discountLastMoney,
|
||||||
'changeAmount': discountLastMoney,
|
'deposit': deposit,
|
||||||
|
'changeAmount': changeAmount,
|
||||||
'remark': remark
|
'remark': remark
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -119,13 +119,13 @@
|
|||||||
{ title: '操作员', dataIndex: 'userName',width:60},
|
{ title: '操作员', dataIndex: 'userName',width:60},
|
||||||
{ title: '欠款', dataIndex: 'needDebt',width:70,
|
{ title: '欠款', dataIndex: 'needDebt',width:70,
|
||||||
customRender:function (text,record,index) {
|
customRender:function (text,record,index) {
|
||||||
return (record.discountLastMoney + record.otherMoney - record.changeAmount).toFixed(2);
|
return (record.discountLastMoney + record.otherMoney - (record.deposit + record.changeAmount)).toFixed(2);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ title: '已收欠款', dataIndex: 'finishDebt',width:70 },
|
{ title: '已收欠款', dataIndex: 'finishDebt',width:70 },
|
||||||
{ title: '待收欠款', dataIndex: 'debt',width:70,
|
{ title: '待收欠款', dataIndex: 'debt',width:70,
|
||||||
customRender:function (text,record,index) {
|
customRender:function (text,record,index) {
|
||||||
return (record.discountLastMoney + record.otherMoney - record.changeAmount - record.finishDebt).toFixed(2);
|
return (record.discountLastMoney + record.otherMoney - (record.deposit + record.changeAmount + record.finishDebt)).toFixed(2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -233,8 +233,8 @@ export const FinancialModalMixin = {
|
|||||||
for(let i=0; i<selectBillRows.length; i++){
|
for(let i=0; i<selectBillRows.length; i++){
|
||||||
let info = selectBillRows[i]
|
let info = selectBillRows[i]
|
||||||
info.billNumber = info.number
|
info.billNumber = info.number
|
||||||
info.needDebt = (info.discountLastMoney + info.otherMoney - info.changeAmount).toFixed(2)
|
info.needDebt = (info.discountLastMoney + info.otherMoney - (info.deposit + info.changeAmount)).toFixed(2)
|
||||||
info.eachAmount = (info.discountLastMoney + info.otherMoney - info.changeAmount - info.finishDebt).toFixed(2);
|
info.eachAmount = (info.discountLastMoney + info.otherMoney - (info.deposit + info.changeAmount + info.finishDebt)).toFixed(2);
|
||||||
if(info.eachAmount != 0) {
|
if(info.eachAmount != 0) {
|
||||||
changeAmount += info.eachAmount-0
|
changeAmount += info.eachAmount-0
|
||||||
listEx.push(info)
|
listEx.push(info)
|
||||||
|
|||||||
Reference in New Issue
Block a user