landydb 2 долоо хоног өмнө
parent
commit
42ec8ad3c6

+ 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)

+ 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') {