diff --git a/src/views/repair/stockOperate/Components/WaresItem.vue b/src/views/repair/stockOperate/Components/WaresItem.vue index c0b7f6a..b40808b 100644 --- a/src/views/repair/stockOperate/Components/WaresItem.vue +++ b/src/views/repair/stockOperate/Components/WaresItem.vue @@ -43,20 +43,36 @@ /> - + - + +
+ + {{ scope.row.waresCount }} +
+
@@ -180,8 +196,9 @@ export default { // 保存进入编辑的cell clickCellMap: {}, // 需要编辑的属性 - editProp: ['warehouse', 'count', 'newPrice', 'remark', 'code'], + editProp: ['warehouse', 'count', 'newPrice', 'remark', 'code', 'waresCount'], remark: null, + tableKey: 0, } }, mounted() { @@ -189,7 +206,7 @@ export default { }, methods:{ // 通过 true是全部、false是选择 - async handlePass(flag){ + async handlePass(){ // 生成领料单 if (this.type){ this.formData.repairSo = { @@ -201,35 +218,18 @@ export default { soStatus: "04", purchaseType: "01" } - if (flag){ - this.formData.repairSois = [...this.items.map(item => { - return { - soiType: '02', - goodsId: item.waresId, - goodsCount: item.waresCount, - } - })] - this.formData.items = [...this.items.map(item => { - return { - id: item.id, - waresStatus: "04" - } - })] - }else { - this.formData.repairSois = [...this.selections.map(item => { - return { - soiType: '02', - goodsId: item.waresId, - goodsCount: item.waresCount, - } - })] - this.formData.items = [...this.selections.map(item => { - return { - id: item.id, - waresStatus: "04" - } - })] - } + this.formData.repairSois = [...this.selections.map(item => { + return { + soiType: '02', + goodsId: item.waresId, + goodsCount: item.waresCount, + } + })] + this.formData.items = [...this.selections.map(item => { + return { + id: item.id, + } + })] try { await pass(this.formData) this.$modal.msgSuccess("处理成功") @@ -240,21 +240,12 @@ export default { }else { // 退料方法 this.formData = {} - if (flag){ - this.formData.items = [...this.items.map(item => { - return { - id: item.id, - waresStatus: "05" - } - })] - }else { - this.formData.items = [...this.selections.map(item => { - return { - id: item.id, - waresStatus: "05" - } - })] - } + this.formData.items = [...this.selections.map(item => { + return { + id: item.id, + waresStatus: "05" + } + })] try { await passBackTicketWares(this.formData) this.$modal.msgSuccess("处理成功") @@ -321,7 +312,9 @@ export default { this.items = res.data // 库存判断 this.items.forEach(item => { - item.isStock = item.waresCount <= item.wares.stock + const count = item.waresAlreadyCount ? parseInt(item.waresCount) - parseInt(item.waresAlreadyCount) : item.waresCount + item.waresCount = count + item.isStock = count <= item.wares.stock }) // 只要未领料的 if (this.type){ @@ -334,7 +327,7 @@ export default { this.dialogLoading = false } }, - getClass(row){ + getRowClass(row){ if (this.type && !row.row.isStock){ return 'stock' } @@ -411,6 +404,7 @@ export default { /** 保存数据 */ save(row) { // 更新表格的数据 + row.isStock = row.waresCount <= row.wares.stock row.totalPrice = row.count * row.newPrice const id = row.id // 取消本行所有cell的编辑状态 @@ -418,6 +412,7 @@ export default { this.cancelEditable(cell) }) this.clickCellMap[id] = [] + this.tableKey++ }, changeWare(row) { if (row.ware) { diff --git a/src/views/repair/stockOperate/WaresAudit.vue b/src/views/repair/stockOperate/WaresAudit.vue index bff6e6f..d5df6c0 100644 --- a/src/views/repair/stockOperate/WaresAudit.vue +++ b/src/views/repair/stockOperate/WaresAudit.vue @@ -1,10 +1,10 @@ - + + + diff --git a/src/views/repair/tickets/Components/TicketManagerItem.vue b/src/views/repair/tickets/Components/TicketManagerItem.vue index d17eb05..237abf5 100644 --- a/src/views/repair/tickets/Components/TicketManagerItem.vue +++ b/src/views/repair/tickets/Components/TicketManagerItem.vue @@ -50,32 +50,35 @@ 通知施工 - - 过程记录 - - + 开始施工 - + + 过程记录 + + 施工完成 终检 + + 重新指派 + 更多 申请领料 - - 申请退料 + >申请配件 + + + 重新指派 @@ -101,12 +104,12 @@ @selection-change="rowSelect" > - - - + + +
- - {{ scope.row.waresCount }} + + {{ scope.row.itemCount }}
@@ -130,7 +133,7 @@