新建入库选择产品数量回显问题、编辑产品问题、删除问题修改
| | |
| | | }, |
| | | commoInput() {}, |
| | | selClient(item) { |
| | | let list = this.tableList.tableData.map((item) => item.number) |
| | | if (list.findIndex((v) => v == item.number) == -1) { |
| | | let list = this.tableList.tableData.map((item) => item.id) |
| | | if (list.findIndex((v) => v == item.id) == -1) { |
| | | this.isRecalculate = true |
| | | // this.editConfig.infomation.client_name = row.name |
| | | this.tableList.tableData.map((ite, index) => { |
| | | if (index === this.productIndex) { |
| | | ite.productName = item.name |
| | | ite.productId = item.id |
| | | ite.name = item.name |
| | | ite.amount = item.amount || 1 |
| | | ite.number = item.number |
| | | ite.price = item.price |
| | | ite.total = item.amount ? item.amount * item.price : 1 * item.price |
| | | ite.amount = 1 |
| | | ite.number = item.id |
| | | ite.specs = item.specs |
| | | ite.model = item.model |
| | | // ite.price = item.price |
| | | // ite.total = item.amount ? item.amount * item.price : 1 * item.price |
| | | ite.unit = item.unit |
| | | } |
| | | }) |
| | |
| | | :style="{ |
| | | color: new Date().getTime() > new Date(scope.row[item.prop]).getTime() ? '#D23F3A' : '#606266' |
| | | }" |
| | | >{{ timeAgo(scope.row[item.prop]) }}</span |
| | | >{{ scope.row[item.prop] }}</span |
| | | > |
| | | <div v-else-if="item.conversion"> |
| | | <p class="exceed_width">{{ item.getStatus(scope.row[item.prop]) }}</p> |
| | |
| | | let list = this.tableData.map((res) => { |
| | | return { |
| | | ...res, |
| | | amount: 1, |
| | | productName: res.name, |
| | | productId: res.id |
| | | } |
| | |
| | | }, |
| | | // 删除 |
| | | handleDelClick(scope, value) { |
| | | console.log(scope) |
| | | if (value === "操作") { |
| | | this.tableData.splice(scope.$index, 1) |
| | | this.productTableList.tableData.splice(scope.$index, 1) |
| | | this.productTableList.tableData = this.tableData |
| | | this.$message.success("删除成功!") |
| | | } else { |
| | | this.detailTableData.splice(scope.$index, 1) |