Browse Source

修改工步详情显示

695593266@qq.com 9 months ago
parent
commit
d341d1dc25

+ 63 - 3
src/views/material/BOMmanage/components/workmanship.vue

@@ -244,6 +244,16 @@
       ref="workingStepRef"
       @chooseProcess="chooseProcess"
     ></workingStep>
+
+    <user-edit
+      :visible.sync="showEdit"
+      :data="current"
+      :controlList="controlList"
+      :isView="isView"
+      @done="reload"
+      ref="userEdit"
+      :typeList="typeList"
+    />
   </div>
 </template>
 
@@ -260,6 +270,8 @@
   import workingProcedure from './workingProcedure.vue';
   import workingStep from './workingStep.vue';
   import { getMbomPage, workingStepDelete } from '@/api/material/BOM';
+  import control from '@/api/technology/control';
+  import UserEdit from '@/views/technology/stepManagement/components/user-edit.vue';
   export default {
     name: 'process',
     components: {
@@ -267,7 +279,8 @@
       ParamModal,
       workingProcedure,
       StepModal,
-      workingStep
+      workingStep,
+      UserEdit
     },
     props: {
       resourceBomId: String,
@@ -406,7 +419,37 @@
         processData: [],
         removeList: [],
         where: {},
-        currentTableData: []
+        currentTableData: [],
+        typeList: [
+          {
+            value: 1,
+            label: '普通工步'
+          },
+          {
+            value: 2,
+            label: '抽样质检工步'
+          },
+          {
+            value: 3,
+            label: '普通质检工步'
+          },
+          {
+            value: 4,
+            label: '包装工步'
+          },
+          {
+            value: 5,
+            label: '入库工步'
+          },
+          {
+            value: 6,
+            label: '一工一检(常规质检)'
+          }
+        ],
+        showEdit: false,
+        current: null,
+        isView: false,
+        controlList: []
       };
     },
     methods: {
@@ -475,7 +518,24 @@
         );
       },
       openStepConfigure(row, isView) {
-        this.$refs.workingStepRef.open(row, this.taskParam, !!isView);
+        console.log('123123123', row);
+        // this.$refs.workingStepRef.open(row, this.taskParam, !!isView);
+        this.isView = !!isView;
+        this.getControlList();
+        this.current = row;
+        this.showEdit = true;
+        this.$refs.userEdit.$refs.form &&
+          this.$refs.userEdit.$refs.form.clearValidate();
+      },
+
+      getControlList() {
+        const params = {
+          pageNum: 1,
+          size: -1
+        };
+        control.list().then((res) => {
+          this.controlList = res.list;
+        });
       },
       search() {},
       /*配置工艺参数 */

+ 17 - 5
src/views/material/BOMmanage/detailsPop.vue

@@ -449,7 +449,7 @@
   import routing from './components/routing.vue';
   import workmanship from './components/workmanship.vue';
   import processSubmitDialog from '@/components/processSubmitDialog/processSubmitDialog.vue';
-import { mapGetters } from 'vuex';
+  import { mapGetters } from 'vuex';
 
   export default {
     name: 'bomDetailsPop',
@@ -461,7 +461,8 @@ import { mapGetters } from 'vuex';
       importDialog,
       LCdetail,
       routing,
-      workmanship,processSubmitDialog
+      workmanship,
+      processSubmitDialog
     },
     data() {
       return {
@@ -828,6 +829,8 @@ import { mapGetters } from 'vuex';
       },
 
       handSubmit() {
+        console.log(this.currentNodeData, 'this.currentNodeData');
+
         if (Number(this.currentNodeData.baseCount) <= 0) {
           this.$message.warning('基本用量需要大于0');
           return;
@@ -858,12 +861,19 @@ import { mapGetters } from 'vuex';
         this.$nextTick(() => {
           let params = {
             businessId: this.currentNodeData.id,
-            businessKey: businessKey||'bom_approver',
+            businessKey: businessKey || 'bom_approver',
             formCreateUserId: this.user.info.userId,
             variables: {
               businessCode: this.currentNodeData.code,
               businessName: this.currentNodeData.name,
-              businessType:this.currentNodeData.bomType==1?'PBOM':this.currentNodeData.bomType==2?'MBOM':this.currentNodeData.bomType==3?'ABOM':'EBOM'
+              businessType:
+                this.currentNodeData.bomType == 1
+                  ? 'PBOM'
+                  : this.currentNodeData.bomType == 2
+                  ? 'MBOM'
+                  : this.currentNodeData.bomType == 3
+                  ? 'ABOM'
+                  : 'EBOM'
             }
           };
 
@@ -871,7 +881,9 @@ import { mapGetters } from 'vuex';
         });
       },
       handJsSubmit() {
-        this.submit(this.radioSubmit == 1 ? 'bom_release' : 'bom_release_device')
+        this.submit(
+          this.radioSubmit == 1 ? 'bom_release' : 'bom_release_device'
+        );
         this.isSubmit = false;
         // let URL = this.radioSubmit == 1 ? jsBomSubmit : deviceBomSubmit;
         // this.$alert('确定要发布吗?', '提示', {

+ 7 - 3
src/views/technology/stepManagement/components/user-edit.vue

@@ -70,8 +70,10 @@
         <el-col :span="8">
           <el-form-item label="附件上传:" prop="sort">
             <!-- <fileUpload v-model="form.files" :disabled="isView"></fileUpload> -->
-            <fileMain v-model="form.files" :type="isView?'view':'add'"></fileMain>
-
+            <fileMain
+              v-model="form.files"
+              :type="isView ? 'view' : 'add'"
+            ></fileMain>
           </el-form-item>
         </el-col>
       </el-row>
@@ -327,7 +329,9 @@
       async visible(visible) {
         if (visible) {
           if (this.data) {
-            const res = await stepManagement.getById(this.data.id);
+            const res = await stepManagement.getById(
+              this.data.stepId ? this.data.stepId : this.data.id
+            );
             this.$util.assignObject(this.form, {
               ...res
             });