Browse Source

Merge branch 'master' of http://112.74.164.79:3000/chenying/X-web

liqianyi 2 weeks ago
parent
commit
eb76db9fad

+ 9 - 22
src/views/modules/tech/product-detail.vue

@@ -60,8 +60,8 @@
           </el-table-column>
           <el-table-column prop="drawingName" header-align="center" align="center" label="图纸名称">
             <template slot-scope="scope">
-              <a style="cursor:pointer" @click="previewFile(scope.row.drawingName, scope.row.attachList[0].url)">{{
-                scope.row.drawingName }}</a>
+              <a style="cursor:pointer" @click="previewFile(scope.row.fileName, scope.row.url)">{{
+                scope.row.fileName }}</a>
             </template>
           </el-table-column>
           <el-table-column prop="drawingName" header-align="center" align="center" label="图号">
@@ -238,29 +238,16 @@ export default {
             })
           }
           // 物料图纸
-          if (data.data.proDrawings) {
-            // this.dataForm.drawingIdList = []
-            data.data.proDrawings.forEach((item) => {
-              if (item.attachList) {
-                item.attachList.forEach((item1) => {
-                  this.fileList.push({
-                    fileName: item1.fileName,
-                    url: item1.url,
-                    id: item1.url
+          if (data.data.drawings) {
+            this.dataForm.proDrawings = []
+            data.data.drawings.forEach((item) => {
+              this.dataForm.proDrawings.push({
+                    fileName: item.fileName,
+                    url: item.url,
+                    id: item.attachId
                   })
-                })
-              }
             })
           }
-          this.dataForm.proDrawings = [
-            {
-              drawingName: "工艺流程-总检.png",
-              attachList: [{
-                url: "工艺流程-总检_c74f67c27ca1526e60f9c6d622af08e6.png",
-                id: "工艺流程-总检_c74f67c27ca1526e60f9c6d622af08e6.png"
-              }]
-            }
-          ]
 
           // 初始化审批Form
           this.showApproveForm(businessType, this.id)

+ 5 - 4
src/views/modules/tech/project-tech-submit.vue

@@ -116,8 +116,8 @@
           :show-tooltip-when-overflow="true" label="操作">
           <template slot-scope="scope">
             <el-button type="text" v-if="scope.row.techId == null || scope.row.techId == 0"
-              @click="handleCrafts(0)">新建工艺</el-button>
-            <el-button type="text" v-else @click="handleCrafts(scope.row.techId)">修改工艺</el-button>
+              @click="handleCrafts(0, scope.row.productId)">新建工艺</el-button>
+            <el-button type="text" v-else @click="handleCrafts(scope.row.techId, scope.row.productId)">修改工艺</el-button>
           </template>
         </el-table-column>
       </el-table>
@@ -253,9 +253,10 @@ export default {
         }
       })
     },
-    handleCrafts(techId) {
-      let productId = this.dataForm.proProductList[0].productId
+    handleCrafts(techId, productId) {
+      // let productId = this.dataForm.proProductList[0].productId
       console.log('orderId:' + this.orderId)
+      console.log('productId:' + productId)
       this.$emit('showCraftsAddOrDetail', techId, this.orderId, productId)
     }
   }

+ 2 - 1
src/views/modules/tech/work-type-add-or-update.vue

@@ -155,7 +155,8 @@
               requirement: this.dataForm.requirement,
               quotedPrice: this.dataForm.quotedPrice,
               typeId: this.id ? this.id : null,
-              foreman: this.dataForm.foreman
+              foreman: this.dataForm.foreman,
+              proWorkshopId: this.dataForm.proWorkshopId
             }
             addOrUpdateWorkType(params, !this.id).then(({data}) => {
               if (data && data.code === '200') {