浏览代码

【修改】家用工程信息单 限制货品删除

howie 2 年之前
父节点
当前提交
16ece4e113
共有 1 个文件被更改,包括 6 次插入1 次删除
  1. 6 1
      src/views/supply/engin/components/engin_examine.vue

+ 6 - 1
src/views/supply/engin/components/engin_examine.vue

@@ -223,7 +223,7 @@
         <el-table-column align="left" label="税率" prop="taxRate" min-width="100" show-overflow-tooltip />
         <el-table-column align="center" label="操作" width="100" fixed="right">
           <template slot-scope="scope">
-            <el-button type="text" @click="deleteItem(scope.$index, scope.row.id)">删除</el-button>
+            <el-button type="text" @click="deleteItem(scope.$index, scope.row.cid)">删除</el-button>
           </template>
         </el-table-column>
       </el-table>
@@ -468,6 +468,7 @@ export default {
         res.data.items.forEach(item => {
           item.sums1 = ['qty', 'hasOrderQty', 'hasDeliverQty']
           item.sums2 = ['compute_amount', 'price']
+          item.cid = item.id
         })
         this.goodsList = res.data.items
       })
@@ -651,6 +652,10 @@ export default {
     submitAddGoods() {
       // this.goodsList = this.delRepeat(this.rightGoodsList, this.goodsList);
       this.goodsList = this.goodsList.concat(this.rightGoodsList)
+      this.goodsList = this.goodsList.concat(this.rightGoodsList)
+      this.goodsList.forEach(k => {
+        k.cid = ''
+      })
       this.isShowGoodsDialog = false
       this.leftGoodsList = []
       this.rightGoodsList = []