Эх сурвалжийг харах

工艺任务-处理-新建工艺 自动填充产品和任务单

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

+ 3 - 2
src/views/modules/tech/ctafts-add-or-detail-v2.vue

@@ -192,14 +192,15 @@ export default {
         lineList: []
       }
     },
-    async init (id, display, isEdit, isCopy, isResubmit) {
+    async init (id, display, isEdit, isCopy, isResubmit, orderId, productId) {
       this.remoteMethod()
 
       this.fileList = []
       this.dataForm = {
         techName: '',
         techVersion: '',
-        productId: '',
+        productId: productId || '',
+        orderId: orderId || '',
         notes: ''
       }
       this.visible = true

+ 6 - 2
src/views/modules/tech/project-tech-submit.vue

@@ -131,7 +131,8 @@ export default {
       dataListLoading: false,
       craftsAddOrDetailVisible: false,
       previewVisible: false,
-      downloadUrl: downloadUrl
+      downloadUrl: downloadUrl,
+      orderId:''
     }
   },
   created() { },
@@ -146,6 +147,7 @@ export default {
       if (readonly) {
         this.disabled = true
       }
+      this.orderId = item.orderId
 
       this.$http({
         url: this.$http.adornUrl(`/biz-service/projTechnology/info/${id}`),
@@ -224,7 +226,9 @@ export default {
       })
     },
     handleCrafts(techId) {
-      this.$emit('showCraftsAddOrDetail', techId)
+      let productId = this.dataForm.proProductList[0].productId
+      console.log('orderId:' + this.orderId)
+      this.$emit('showCraftsAddOrDetail', techId, this.orderId, productId)
     }
   }
 }

+ 2 - 2
src/views/modules/tech/project-tech.vue

@@ -105,7 +105,7 @@ export default {
       this.submitVisible = false
       this.craftsAddOrDetailVisible = false
     },
-    showCraftsAddOrDetail(techId) {
+    showCraftsAddOrDetail(techId, orderId, productId) {
       this.detailVisible = false
       this.assignVisible = false
       this.noticeChangeVisible = false
@@ -114,7 +114,7 @@ export default {
       this.craftsAddOrDetailVisible = true
 
       this.$nextTick(() => {
-        this.$refs.craftsAddOrDetail.init(techId, false, techId !== 0, false, false)
+        this.$refs.craftsAddOrDetail.init(techId, false, techId !== 0, false, false, orderId, productId)
       })
     },
     onCloseCraftsAddOrDetail() {