Prechádzať zdrojové kódy

BOM清单管理:根据后端修改参数

chris 1 rok pred
rodič
commit
50ed9ba5b0

+ 9 - 21
src/views/modules/tech/product-add-or-update.vue

@@ -179,9 +179,9 @@
           <el-table-column prop="productSpec" header-align="center" align="center" label="规格">
           </el-table-column>
           <el-table-column prop="cnt" header-align="center" align="center" label="数量" width="170">
-            <template slot-scope="scope">
-              <el-input-number v-model="scope.row.cnt" :disabled="display" :min="1" style="width: 140px;" />
-            </template>
+<!--            <template slot-scope="scope">-->
+<!--              <el-input-number v-model="scope.row.cnt" :disabled="display" :min="1" style="width: 140px;" />-->
+<!--            </template>-->
           </el-table-column>
           <el-table-column prop="notes" header-align="center" align="center" label="备注">
           </el-table-column>
@@ -331,11 +331,10 @@ export default {
             this.activeNo = Number(data.data.workFlowProcessStepList.activeNo)
           }
           // 组合小物料
-          if (data.data.composeProductMaterialList) {
-            data.data.composeProductMaterialList.forEach((item) => {
+          if (data.data.children) {
+            data.data.children.forEach((item) => {
               this.productDetails.push({
-                ...item,
-                productSpec: item.specifications
+                ...item
               })
             })
             this.displayProductList = true
@@ -367,11 +366,7 @@ export default {
     },
     addProductItem (item) {
       this.productDetails.push({
-        proProductId: item.productId,
-        productName: item.productName,
-        productSpec: item.productSpec,
-        cnt: 1,
-        notes: item.notes
+        ...item
       })
     },
     addMaterial () {
@@ -400,22 +395,15 @@ export default {
       this.$refs['dataForm'].validate((valid) => {
         if (valid) {
           // 组合小物料
-          this.dataForm.composeProductMaterialList = []
+          this.dataForm.childrenIdList = []
           const b1 = this.displayProductList
           this.dataForm.isCompose = b1 === true ? '1' : '0'
           if (this.dataForm.isCompose === '1' && this.productDetails.length > 0) {
             this.productDetails.forEach((item) => {
-              this.dataForm.composeProductMaterialList.push({
-                ...item
-              })
+              this.dataForm.childrenIdList.push(item.productId)
             })
           }
-          // if (this.drawingList.length <= 0) {
-          //   this.$message.error('请选择关联图纸')
-          //   return
-          // }
           this.dataForm.drawingList = this.drawingList
-
           this.$http({
             url: !this.id ? this.$http.adornUrl(`/biz-service/product/save`) : this.$http.adornUrl(`/biz-service/product/update`),
             method: 'post',

+ 2 - 2
src/views/modules/tech/product-detail.vue

@@ -151,7 +151,7 @@
             align="center">
           </el-table-column>
           <el-table-column
-            prop="materialName"
+            prop="productName"
             header-align="center"
             align="center"
             label="物品名称">
@@ -289,7 +289,7 @@ export default {
               this.activeNo = Number(data.data.workFlowProcessStepList.activeNo)
             }
             // 组合小物料
-            data.data.composeProductMaterialList.forEach((item) => {
+            data.data.children.forEach((item) => {
               this.productDetails.push(item)
             })
             // 物料配料清单