소스 검색

bug修复

lucw 7 달 전
부모
커밋
07f167e1a4

+ 1 - 1
src/api/recordRules/index.js

@@ -30,7 +30,7 @@ export async function recordrulesPage(body) {
 // 规则记录分页查询 过程监测 /main/recordrules/notProduceTaskConfigRecordRulesPage
 export async function recordrulesNotProduceTaskConfigRecordRulesPage(body) {
   const res = await request.post(
-    `/main/recordrules/notProduceTaskConfigRecordRulesPage`,
+    `/main/recordrules/processInspectionRecordRulesPage`,
     body
   );
   if (res.data.code == 0) {

+ 0 - 7
src/components/selectReleaseRules/search.vue

@@ -37,13 +37,6 @@
             type: 'select',
             placeholder: '记录规则分类',
             planList: this.typeList
-          },
-          {
-            label: '模块分类',
-            value: 'reportWorkType',
-            type: 'select',
-            placeholder: '模块分类',
-            planList: this.reportWorkTypeList
           }
           //,
           // {

+ 31 - 25
src/components/selectReleaseRules/select-release-rules.vue

@@ -4,7 +4,7 @@
     :append-to-body="true"
     :close-on-click-modal="false"
     custom-class="ele-dialog-form"
-    title="选择记录规则"
+    title="选择记录事项"
     @update:visible="updateVisible"
     :maxable="true"
     width="90%"
@@ -40,13 +40,13 @@
     components: { search },
     mixins: [tabMixins, dictMixins],
     props: {
-      // 是否多选
-      multiple: {
+      // NotProduceTaskConfig bool 是否排除已配置的记录规则 过程监测传true
+      notProduceTaskConfig: {
         type: Boolean,
         default: false
       },
-      // NotProduceTaskConfig bool 是否排除已配置的记录规则 过程监测传true
-      notProduceTaskConfig: {
+      // 是否多选
+      multiple: {
         type: Boolean,
         default: false
       }
@@ -110,7 +110,7 @@
             showOverflowTooltip: true,
             minWidth: 110,
             formatter: (row) => {
-              return row.version ? `V${row.version.toFixed(1)}` : '';
+              return `${row.versionSymbol}${row.bigVersion}${row.versionMark}${row.smallVersion}`;
             }
           },
           {
@@ -196,18 +196,25 @@
       return {
         loading: false,
         visible: false,
-        selection: []
+        selection: [],
+        produceTaskId: '',
+        reportWorkType: '' // 记录规则报工类型 产前、过程、产后
       };
     },
-    mounted() {
+    created() {
       this.requestDict('记录规则类型');
       this.requestDict('规则周期');
     },
     methods: {
-      open() {
+      open(reportWorkType, produceTaskId) {
+        console.log('reportWorkType', reportWorkType);
+        console.log('produceTaskId', produceTaskId);
+
         this.visible = true;
         this.selection = [];
-        this.reload({}); // 刷新表格
+        this.reportWorkType = reportWorkType || '';
+        this.produceTaskId = produceTaskId || '';
+        this.reload(); // 刷新表格
       },
       updateVisible(val) {
         this.visible = val;
@@ -217,7 +224,6 @@
         const API = this.notProduceTaskConfig
           ? recordrulesNotProduceTaskConfigRecordRulesPage
           : recordrulesPage;
-
         return API({
           pageNum: page,
           size: limit,
@@ -225,33 +231,33 @@
           publishStatus: 1,
           // 启用
           enable: 1,
-          ...where
+          ...where,
+          reportWorkType: this.reportWorkType,
+          produceTaskId: this.produceTaskId
         });
       },
       /* 刷新表格 */
       reload(where) {
         this.$refs.tableRef?.reload({
           page: 1, // 已发布
-          publishStatus: 1,
-          // 启用
-          enable: 1,
           where
         });
       },
       confirmSelection() {
-        if (this.selection.length == 0) {
-          this.$message.warning('请选择记录规则!');
+        if (this.selection.length === 0) {
+          this.$message.warning('请选择记录规则');
           return;
         }
-        if (this.multiple) {
-          this.$emit('chooseRules', this.selection);
-        } else {
-          if (this.selection.length > 1) {
-            this.$message.warning('只能选择一条记录规则');
-            return;
-          }
-          this.$emit('chooseRules', this.selection[0]);
+
+        if (!this.multiple && this.selection.length > 1) {
+          this.$message.warning('只能选择一条记录规则');
+          return;
         }
+
+        this.$emit(
+          'chooseRules',
+          this.multiple ? this.selection : this.selection[0]
+        );
         this.visible = false;
       }
     }

+ 2 - 2
src/views/batchRecord/components/editModal.vue

@@ -819,7 +819,7 @@
       // 去选择记录规则
       selectReleaseId() {
         if (this.type == 'detail') return;
-        this.$refs.selectReleaseRulesRef.open();
+        this.$refs.selectReleaseRulesRef.open(this.reportWorkType);
       },
       // 选择记录规则
       chooseReleaseRules(rules) {
@@ -903,7 +903,7 @@
       // 选择工序
       produceTaskIdChange() {
         const prodceTask = this.produceTaskList.find(
-          (i) => i.taskId == this.form.produceTaskId
+          (i) => i.sourceTaskId == this.form.produceTaskId
         );
         if (prodceTask) {
           this.form.produceTaskName = prodceTask.taskTypeName;

+ 4 - 2
src/views/produce/components/prenatalExamination/releaseRulesDialog.vue

@@ -833,7 +833,8 @@
           this.addForm.produceRoutingName = workOrderInfo.produceRoutingName;
           this.addForm.produceTaskConfigId = productionInfo.produceTaskConfigId;
           this.addForm.produceTaskId = productionInfo.produceTaskId;
-          this.addForm.produceTaskName = productionInfo.produceTaskName;
+          this.addForm.produceTaskName =
+            productionInfo.produceTaskName || workOrderInfo.taskName;
           this.addForm.productCode = workOrderInfo.productCode;
           this.addForm.productModel = workOrderInfo.model;
           this.addForm.productName = workOrderInfo.productName;
@@ -924,7 +925,8 @@
         const materialList = await queryListByWorkOrderId({
           workOrderId: this.addForm.workOrderId,
           recordId: this.productionInfo.recordId,
-          produceTaskInstanceId: this.workOrderInfo.taskId,
+          produceTaskInstanceId:
+            this.workOrderInfo.taskId || this.productionInfo.produceTaskId,
           ruleId: this.addForm.ruleId
         });