|
@@ -2136,31 +2136,11 @@ export default {
|
|
|
price: e.price,
|
|
|
unit: e.unit,
|
|
|
goodName: e.cname,
|
|
|
+ srcFeesId: e.id,
|
|
|
costType: this.feesOption.find(e => e.cname == '货款')? this.feesOption.find(e => e.cname == '货款').id: null,
|
|
|
}
|
|
|
arr.push(form)
|
|
|
})
|
|
|
- // this.billData = {
|
|
|
- // belongCompany: this.form.belongCompany,
|
|
|
- // srcOrderno:this.form.orgOrderNo,
|
|
|
- // itemType:"销售",
|
|
|
- // corpsName:this.form.corpName,
|
|
|
- // corpId:this.form.corpId,
|
|
|
- // srcParentId: this.form.id,
|
|
|
- // currency: 'CNY',
|
|
|
- // exchangeRate: '1',
|
|
|
- // taxRate: '0',
|
|
|
- // accDate: this.form.businesDate,
|
|
|
- // srcType: 1,
|
|
|
- // tradeType: 'GN',
|
|
|
- // optionType: 'GN',
|
|
|
- // chargeMember: this.form.chargeMember,
|
|
|
- // amount: this.form.balanceAmount,
|
|
|
- // quantity: 0, // 数量
|
|
|
- // price: 0,
|
|
|
- // costType: this.feesOption.find(e => e.cname == '货款')? this.feesOption.find(e => e.cname == '货款').id: null,
|
|
|
- // }
|
|
|
- // arr.push(this.billData)
|
|
|
let getFeeList = this.$refs.feeInfo.submitData().filter(item => item.feesType == 1)
|
|
|
getFeeList.forEach(item => {
|
|
|
let form = {
|
|
@@ -2181,6 +2161,8 @@ export default {
|
|
|
amount: item.amount,
|
|
|
costType: item.itemId,
|
|
|
srcFeesId: item.id,
|
|
|
+ quantity: item.quantity, // 数量
|
|
|
+ price: item.price,
|
|
|
}
|
|
|
arr.push(form)
|
|
|
})
|
|
@@ -2360,7 +2342,6 @@ export default {
|
|
|
},
|
|
|
//确认导入触发
|
|
|
async importGoods() {
|
|
|
- this.saveLoading = true;
|
|
|
if (this.goodsListSave.length > 0) {
|
|
|
this.goodsListSaveHandle()
|
|
|
} else {
|
|
@@ -2370,6 +2351,7 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
goodsListSaveHandle() {
|
|
|
+ this.saveLoading = true;
|
|
|
for (let item in this.goodsListSave) {
|
|
|
getMarketPrice({code: this.goodsListSave[item].code, isFreight: this.form.isFreight, isLabel: this.form.isLabel}).then(res => {
|
|
|
if (res.data.data.length > 0) {
|
|
@@ -2438,6 +2420,7 @@ export default {
|
|
|
this.dialogVisible = false
|
|
|
},
|
|
|
tableDataHandle() {
|
|
|
+ this.saveLoading = true;
|
|
|
for (let item=0;item<this.tableData.length;item++) {
|
|
|
getMarketPrice({code: this.tableData[item].code, isFreight: this.form.isFreight, isLabel: this.form.isLabel}).then(res => {
|
|
|
if (res.data.data.length > 0) {
|
|
@@ -3006,7 +2989,15 @@ export default {
|
|
|
// let caseOverPayment = this.form.caseOverPayment? this.form.caseOverPayment: 0
|
|
|
// 本次试用返利
|
|
|
let thisUsedProfit = this.form.thisUsedProfit? this.form.thisUsedProfit: 0
|
|
|
- this.$set(this.form, 'debitAmount', ((Number(orderAmount) - Number(thisUsedProfit)).toFixed(2)))
|
|
|
+ let feeAmountD = 0; //费用明细应收
|
|
|
+ let feeAmountC = 0; //费用明细应付
|
|
|
+ this.$refs.feeInfo.submitData().filter(item => item.feesType == 1).forEach(item => {
|
|
|
+ feeAmountD += Number(item.amount)
|
|
|
+ })
|
|
|
+ this.$refs.feeInfo.submitData().filter(item => item.feesType == 2).forEach(item => {
|
|
|
+ feeAmountC += Number(item.amount)
|
|
|
+ })
|
|
|
+ this.$set(this.form, 'debitAmount', ((Number(orderAmount) - Number(thisUsedProfit) + Number(feeAmountD) - Number(feeAmountC)).toFixed(2)))
|
|
|
this.$set(this.form, "balanceAmount", (Number(this.form.debitAmount) - Number(settlmentAmount)).toFixed(2));
|
|
|
},
|
|
|
quantityChange(row) {
|