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 @@ + @change="consCountTotal($event, scope.row, 'price')"> 原价¥{{ scope.row.costPrice }}/{{ scope.row.conUnit }} - + 入库前:{{ scope.row.number }}{{ scope.row.conUnit }} @@ -150,7 +151,7 @@ {{ scope.row.name }} - ({{ scope.row.specSnap }}) + ({{ scope.row.specSnap }}) @@ -158,14 +159,15 @@ { modifyPrice(); scope.row.costPrice = e }"> + @change="modifyPrice($event, scope.row, 'costPrice')"> 成本价¥{{ scope.row.costPrice }}/{{ scope.row.unitName }} - { modifyPrice(); scope.row.totalAmount = e }"> + 入库前:{{ scope.row.stockNumber }}{{ scope.row.unitName }} @@ -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 @@ + @change="consCountTotal($event, scope.row, 'price')"> 原价¥{{ scope.row.costPrice }}/{{ scope.row.conUnit }} - + 出库前:{{ scope.row.number }}{{ scope.row.conUnit }} @@ -153,14 +154,14 @@ { modifyPrice(); scope.row.costPrice = e }"> + @change="modifyPrice($event, scope.row, 'costPrice')"> 成本价¥{{ scope.row.costPrice }}/{{ scope.row.unitName }} { modifyPrice(); scope.row.totalAmount = e }"> + @change="modifyPrice($event, scope.row, 'number', 'totalAmount')"> 出库前:{{ scope.row.stockNumber }}{{ scope.row.unitName }} @@ -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; }