diff --git a/src/views/invoicing/components/addConsTakin.vue b/src/views/invoicing/components/addConsTakin.vue index fd9edd0..a82672e 100644 --- a/src/views/invoicing/components/addConsTakin.vue +++ b/src/views/invoicing/components/addConsTakin.vue @@ -1,67 +1,32 @@ @@ -165,7 +122,8 @@ export default { this.loading = true; let res = await tbConCheck({ conInfoId: this.form.conInfoId, - lpNum: this.profitNumber + lpNum: this.profitNumber, + remark: this.form.remark }); this.detail.num = this.form.lpNum; this.form.lpNum = 0; @@ -178,6 +136,7 @@ export default { message: `添加成功`, type: "success" }); + this.form.remark = '' this.getTableData(); } catch (error) { this.loading = false; diff --git a/src/views/invoicing/operation_in.vue b/src/views/invoicing/operation_in.vue index 434cb8f..3dbfdac 100644 --- a/src/views/invoicing/operation_in.vue +++ b/src/views/invoicing/operation_in.vue @@ -113,14 +113,15 @@ @@ -150,7 +151,7 @@ @@ -158,14 +159,15 @@ @@ -305,20 +307,50 @@ export default { this.queryForm.type = type }, // 计算耗材总价 - consCountTotal() { - let zong = 0 - this.tableData.list.forEach(ele => { - zong += ele.price * ele.stockNumber - }) - this.queryForm.totalAmount = formatDecimal(zong) + consCountTotal(cvalue, row, key1, key2 = undefined) { + if (cvalue == undefined) { + setTimeout(() => { + row[key1] = 0 + + let zong = 0 + this.tableData.list.forEach(ele => { + zong += ele.price * ele.stockNumber + }) + this.queryForm.totalAmount = formatDecimal(zong) + }, 10) + } else { + row[key1] = cvalue + + let zong = 0 + this.tableData.list.forEach(ele => { + zong += ele.price * ele.stockNumber + }) + this.queryForm.totalAmount = formatDecimal(zong) + } }, // 计算商品总价 - modifyPrice() { - let zong = 0 - this.tableData.list.forEach(ele => { - zong += ele.costPrice * ele.number - }) - this.queryForm.totalAmount = formatDecimal(zong) + modifyPrice(cvalue, row, key1, key2 = undefined) { + if (cvalue == undefined) { + setTimeout(() => { + row[key1] = 0 + row[key2] = 0 + + let zong = 0 + this.tableData.list.forEach(ele => { + zong += ele.costPrice * ele.number + }) + this.queryForm.totalAmount = formatDecimal(zong) + }, 10) + } else { + row[key1] = cvalue + row[key2] = cvalue + + let zong = 0 + this.tableData.list.forEach(ele => { + zong += ele.costPrice * ele.number + }) + this.queryForm.totalAmount = formatDecimal(zong) + } }, // 提交 submitHandle() { diff --git a/src/views/invoicing/operation_out.vue b/src/views/invoicing/operation_out.vue index d55592f..982ef61 100644 --- a/src/views/invoicing/operation_out.vue +++ b/src/views/invoicing/operation_out.vue @@ -110,14 +110,15 @@ @@ -153,14 +154,14 @@ @@ -299,20 +300,50 @@ export default { this.queryForm.type = type }, // 计算耗材总价 - consCountTotal() { - let zong = 0 - this.tableData.list.forEach(ele => { - zong += ele.price * ele.stockNumber - }) - this.queryForm.totalAmount = formatDecimal(zong) + consCountTotal(cvalue, row, key1, key2 = undefined) { + if (cvalue == undefined) { + setTimeout(() => { + row[key1] = 0 + + let zong = 0 + this.tableData.list.forEach(ele => { + zong += ele.price * ele.stockNumber + }) + this.queryForm.totalAmount = formatDecimal(zong) + }, 10) + } else { + row[key1] = cvalue + + let zong = 0 + this.tableData.list.forEach(ele => { + zong += ele.price * ele.stockNumber + }) + this.queryForm.totalAmount = formatDecimal(zong) + } }, // 计算商品总价 - modifyPrice() { - let zong = 0 - this.tableData.list.forEach(ele => { - zong += ele.costPrice * ele.number - }) - this.queryForm.totalAmount = zong + modifyPrice(cvalue, row, key1, key2 = undefined) { + if (cvalue == undefined) { + setTimeout(() => { + row[key1] = 0 + row[key2] = 0 + + let zong = 0 + this.tableData.list.forEach(ele => { + zong += ele.costPrice * ele.number + }) + this.queryForm.totalAmount = formatDecimal(zong) + }, 10) + } else { + row[key1] = cvalue + row[key2] = cvalue + + let zong = 0 + this.tableData.list.forEach(ele => { + zong += ele.costPrice * ele.number + }) + this.queryForm.totalAmount = formatDecimal(zong) + } }, // 提交 submitHandle() { diff --git a/src/views/product/add_shop.vue b/src/views/product/add_shop.vue index 996c4a5..086484e 100644 --- a/src/views/product/add_shop.vue +++ b/src/views/product/add_shop.vue @@ -16,7 +16,7 @@ - + @@ -108,10 +108,7 @@ @@ -239,10 +236,7 @@ @@ -454,6 +448,11 @@ export default { message: "请输入商品名称" } ], + unitId: [{ + required: true, + trigger: "change", + message: "请选择单位" + }], categoryId: [ { required: true, @@ -578,8 +577,11 @@ export default { specInfo[index].realSalesNumber = item.productId; specInfo[index].shopId = item.shopId; specInfo[index].warnLine = item.warnLine; + specInfo[index].suit = item.suit; + specInfo[index].stockNumber = item.stockNumber; return specInfo[index]; }); + console.log(this.form.skuList); this.originSkuList = [...this.form.skuList]; this.selectSpecResult = true; }