소스 검색

工艺管理:新增“重新提交”

chris 1 년 전
부모
커밋
cfdb5ff247
2개의 변경된 파일11개의 추가작업 그리고 7개의 파일을 삭제
  1. 3 2
      src/views/modules/tech/crafts-management.vue
  2. 8 5
      src/views/modules/tech/ctafts-add-or-detail.vue

+ 3 - 2
src/views/modules/tech/crafts-management.vue

@@ -148,6 +148,7 @@
             <el-button v-if="isAuth('pro:technology:update') && scope.row.techState === '0'" type="text" size="small" @click="changeStateHandle(scope.row.techId, -1)">停用</el-button>
             <el-button v-if="isAuth('pro:technology:info')" type="text" size="small" @click="detailHandle(scope.row.techId, scope.row.productName)">查看</el-button>
             <el-button v-if="isAuth('pro:technology:generateInstruction') && Number(scope.row.isGenerate) === 0" type="text" size="small" @click="generate(scope.row.techId)">生成</el-button>
+            <el-button v-if="isAuth('pro:technology:save') && scope.row.state === '0'" type="text" size="small" @click="addOrUpdateHandle(scope.row.techId, false, true)">重新提交</el-button>
           </template>
         </el-table-column>
       </el-table>
@@ -262,10 +263,10 @@
         this.dataListSelections = val
       },
       // 新增 / 修改
-      addOrUpdateHandle (id, isCopy) {
+      addOrUpdateHandle (id, isCopy, isResubmit) {
         this.addOrUpdateVisible = true
         this.$nextTick(() => {
-          this.$refs.addOrUpdate.init(id, false, Number(id) !== 0, isCopy)
+          this.$refs.addOrUpdate.init(id, false, Number(id) !== 0, isCopy, isResubmit)
         })
       },
       // 撤销

+ 8 - 5
src/views/modules/tech/ctafts-add-or-detail.vue

@@ -110,6 +110,7 @@ export default {
       display: false,
       isEdit: false, // 是否是编辑页面
       isCopy: false,
+      isResubmit: false, // 是否重新提交
       fileList: [],
       dataList: [],
       id: 0,
@@ -175,7 +176,7 @@ export default {
         lineList: []
       }
     },
-    async init (id, display, isEdit, isCopy) {
+    async init (id, display, isEdit, isCopy, isResubmit) {
       this.fileList = []
       this.dataForm = {
         techName: '',
@@ -185,8 +186,9 @@ export default {
       }
       this.visible = true
       this.display = display
-      this.isEdit = isEdit && !isCopy
-      this.isCopy = isCopy
+      this.isEdit = isEdit && !isCopy && !isResubmit
+      this.isCopy = isCopy || false
+      this.isResubmit = isResubmit || false
 
       if (!id) return
       await getInfo(id).then(async ({ data }) => {
@@ -217,7 +219,6 @@ export default {
         let item = this.optionLevel.find(t => t.productId === val)
         this.dataForm.techName = item.productName
       }
-      console.log(111, val)
     },
     handleRemove (file, fileList) {
       this.fileList = fileList
@@ -258,6 +259,9 @@ export default {
           }
 
           let url = `/biz-service/technology/submit`
+          if (this.isResubmit) {
+            url = `/biz-service/technology/resubmit`
+          }
           if (this.isEdit && !this.isCopy) {
             url = `/biz-service/technology/update`
           }
@@ -359,7 +363,6 @@ export default {
       })
     },
     prodSelected (item) {
-      console.log(JSON.stringify(item))
       this.dataForm.productId = item.value
     }
   }