From f03855c731766bb74479bf2126ab385961e12345 Mon Sep 17 00:00:00 2001
From: cuilei <ray_tsu1@163.com>
Date: 星期五, 15 八月 2025 17:15:20 +0800
Subject: [PATCH] 齐套性检查页面

---
 src/views/mes/modules/MesProductionWorkOrderCompletenessCheckModal.vue |  157 +++++++++++++++++++++++++++++++
 src/views/system/modules/SysBusinessCodeRuleModal.vue                  |    2 
 src/views/mes/MesProductionWorkOrderListView.vue                       |   69 ++++++++-----
 src/views/mes/modules/MesProductionWorkOrderReportModal.vue            |   13 +-
 4 files changed, 209 insertions(+), 32 deletions(-)

diff --git a/src/views/mes/MesProductionWorkOrderListView.vue b/src/views/mes/MesProductionWorkOrderListView.vue
index e7fd391..6b524e3 100644
--- a/src/views/mes/MesProductionWorkOrderListView.vue
+++ b/src/views/mes/MesProductionWorkOrderListView.vue
@@ -82,41 +82,54 @@
           </template>
 
           <span slot="action" slot-scope="text, record">
-            <a @click="handleDetail(record)">璇︽儏</a>
-          <span v-if="record.workOrderStatus === 'PUBLISHED' || record.workOrderStatus === 'EXECUTING'">
-            <a-divider type="vertical" />
-            <a @click="handleRePublish(record)">閲嶅彂甯�</a>
-          </span>
-            <span v-if="record.workOrderStatus === 'PUBLISHED'">
-            <a-divider type="vertical" />
-            <a-popconfirm title="纭畾寮�濮嬫墽琛屽悧?" @confirm="() => handleExecute(record.id)">
-                <a>鎵ц</a>
-            </a-popconfirm>
-          </span>
-          <span v-if="record.workOrderStatus === 'EXECUTING'">
-            <a-divider type="vertical" />
-            <a @click="handleWorkReport(record)">鎶ュ伐</a>
-          </span>
-          <span v-if="record.workOrderStatus === 'NEW'">
-            <a-divider type="vertical" />
-            <a-popconfirm title="纭畾鍙戝竷鍚�?" @confirm="() => handlePublish(record.id)">
-                <a>鍙戝竷</a>
-            </a-popconfirm>
-            <a-divider type="vertical" />
+            <span v-if="record.workOrderStatus === 'NEW'">
+              <a-popconfirm title="纭畾鍙戝竷鍚�?" @confirm="() => handlePublish(record.id)">
+                  <a>鍙戝竷</a>
+              </a-popconfirm>
+            </span>
+            <span v-if="record.workOrderStatus === 'PUBLISHED' || record.workOrderStatus === 'EXECUTING'">
+              <a-divider type="vertical" />
+              <a @click="handleRePublish(record)">閲嶅彂甯�</a>
+            </span>
+            <span v-if="record.workOrderStatus === 'PUBLISHED' && record.completenessCheckFlag === '0'">
+              <a-divider type="vertical" />
+              <a @click="handleCompletenessCheck(record)">榻愬鎬ф鏌�</a>
+            </span>
+            <span v-if="record.workOrderStatus === 'PUBLISHED' && record.equipmentInspectionFlag === '0'">
+              <a-divider type="vertical" />
+              <a @click="handleCompletenessCheck(record)">璁惧鐐规</a>
+            </span>
+            <span v-if="record.workOrderStatus === 'PUBLISHED' && record.processInspectionFlag === '0'">
+              <a-divider type="vertical" />
+              <a @click="handleCompletenessCheck(record)">宸ヨ壓鐐规</a>
+            </span>
+            <span v-if="record.workOrderStatus === 'PUBLISHED' && record.completenessCheckFlag === '1' && record.equipmentInspectionFlag === '1' && record.processInspectionFlag === '1'">
+              <a-divider type="vertical" />
+              <a-popconfirm title="纭畾寮�濮嬫墽琛屽悧?" @confirm="() => handleExecute(record.id)">
+                  <a>鎵ц</a>
+              </a-popconfirm>
+            </span>
+            <span v-if="record.workOrderStatus === 'EXECUTING'">
+              <a-divider type="vertical" />
+              <a @click="handleWorkReport(record)">鎶ュ伐</a>
+            </span>
+          <a-divider type="vertical" />
           <a-dropdown>
             <a class="ant-dropdown-link">鏇村 <a-icon type="down" /></a>
             <a-menu slot="overlay">
               <a-menu-item>
+                <a @click="handleDetail(record)">璇︽儏</a>
+              </a-menu-item>
+              <a-menu-item v-if="record.workOrderStatus === 'NEW'">
                 <a @click="handleEdit(record)">缂栬緫</a>
               </a-menu-item>
-              <a-menu-item>
+              <a-menu-item v-if="record.workOrderStatus === 'NEW'">
                 <a-popconfirm title="纭畾鍒犻櫎鍚�?" @confirm="() => handleDelete(record.id)">
-                  <a>鍒犻櫎</a>
+                <a>鍒犻櫎</a>
                 </a-popconfirm>
               </a-menu-item>
             </a-menu>
           </a-dropdown>
-          </span>
 
         </span>
         </a-table>
@@ -203,9 +216,10 @@
     <mes-production-order-modal ref="MesProductionOrderModal"></mes-production-order-modal>
     <MesMaterialUnloadingList ref="MesMaterialUnloadingList"></MesMaterialUnloadingList>
     <MesMaterialTransferDetailList ref="MesMaterialTransferDetailList"></MesMaterialTransferDetailList>
-    <MesProductionWorkOrderScheduleModal ref="MesProductionWorkOrderScheduleModal"></MesProductionWorkOrderScheduleModal>
+    <MesProductionWorkOrderScheduleModal ref="MesProductionWorkOrderScheduleModal" @ok="modalFormOk"></MesProductionWorkOrderScheduleModal>
     <MesProductionWorkOrderRepublishModal ref="MesProductionWorkOrderRepublishModal" @ok="modalFormOk"></MesProductionWorkOrderRepublishModal>
     <MesProductionWorkOrderReportModal ref="MesProductionWorkOrderReportModal" @ok="modalFormOk"></MesProductionWorkOrderReportModal>
+    <MesProductionWorkOrderCompletenessCheckModal ref="MesProductionWorkOrderCompletenessCheckModal" @ok="modalFormOk"></MesProductionWorkOrderCompletenessCheckModal>
   </a-card>
 </template>
 
@@ -225,6 +239,7 @@
 import MesProductionWorkOrderScheduleModal from '@views/mes/modules/MesProductionWorkOrderScheduleModal.vue'
 import MesProductionWorkOrderRepublishModal from '@views/mes/modules/MesProductionWorkOrderRepublishModal.vue'
 import MesProductionWorkOrderReportModal from '@views/mes/modules/MesProductionWorkOrderReportModal.vue'
+import MesProductionWorkOrderCompletenessCheckModal from '@views/mes/modules/MesProductionWorkOrderCompletenessCheckModal.vue'
 
 export default {
   name: 'MesProductionWorkOrderList',
@@ -237,6 +252,7 @@
     MesProductionWorkOrderScheduleModal,
     MesProductionWorkOrderRepublishModal,
     MesProductionWorkOrderReportModal,
+    MesProductionWorkOrderCompletenessCheckModal
   },
   data() {
     return {
@@ -732,6 +748,9 @@
     handleWorkReport(record) {
       this.$refs.MesProductionWorkOrderReportModal.add(record)
     },
+    handleCompletenessCheck(record) {
+      this.$refs.MesProductionWorkOrderCompletenessCheckModal.check(record)
+    },
     async handleTransferDetail(row){
       console.log('row---->',row)
       const transferDetailResult = await getAction(this.url.queryTransferDetailBy,{'requestId':row.id})
diff --git a/src/views/mes/modules/MesProductionWorkOrderCompletenessCheckModal.vue b/src/views/mes/modules/MesProductionWorkOrderCompletenessCheckModal.vue
new file mode 100644
index 0000000..6cb752a
--- /dev/null
+++ b/src/views/mes/modules/MesProductionWorkOrderCompletenessCheckModal.vue
@@ -0,0 +1,157 @@
+<template>
+  <j-modal
+    :title="title"
+    :width="width"
+    :visible="visible"
+    switchFullscreen
+    @ok="handleOk"
+    :okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
+    @cancel="handleCancel"
+    cancelText="鍏抽棴">
+
+    <a-table
+      ref="table"
+      size="middle"
+      :scroll="{x:true}"
+      bordered
+      rowKey=""
+      :columns="columns"
+      :dataSource="dataSource"
+      :pagination="false"
+      :loading="loading"
+      class="j-table-force-nowrap">
+
+      <template slot="checkFlag" slot-scope="text, record">
+        <span v-if="text === '0'" style="color: red">鍚�</span>
+        <span v-if="text === '1'" style="color: green">鏄�</span>
+      </template>
+    </a-table>
+  </j-modal>
+</template>
+
+<script>
+import { postAction, getAction } from '@api/manage'
+
+export default {
+  name: 'MesProductionWorkOrderReportModal',
+  data () {
+    return {
+      title: '榻愬鎬ф鏌�',
+      width: 800,
+      visible: false,
+      loading: false,
+      disableSubmit: false,
+      model: {},
+      validatorRules: {
+      },
+      labelCol: {
+        xs: { span: 24 },
+        sm: { span: 6 },
+      },
+      wrapperCol: {
+        xs: { span: 24 },
+        sm: { span: 18 },
+      },
+      dataSource: [],
+      columns: [
+        {
+          title: '#',
+          dataIndex: '',
+          key:'rowIndex',
+          width:60,
+          align:"center",
+          customRender:function (t,r,index) {
+            return parseInt(index)+1;
+          }
+        },
+        {
+          title:'鐗╂枡缂栧彿',
+          align:"center",
+          dataIndex: 'materialNumber'
+        },
+        {
+          title:'鐗╂枡鍚嶇О',
+          align:"center",
+          dataIndex: 'materialName'
+        },
+        {
+          title:'闇�姹傛暟閲�',
+          align:"center",
+          dataIndex: 'requiredQuantity'
+        },
+        {
+          title:'瀹為檯鏁伴噺',
+          align:"center",
+          dataIndex: 'actualQuantity'
+        },
+        {
+          title:'鍩烘湰鍗曚綅',
+          align:"center",
+          dataIndex: 'productionUnit'
+        },
+        {
+          title:'鏄惁榻愬',
+          align:"center",
+          dataIndex: 'checkFlag',
+          scopedSlots: { customRender: 'checkFlag' }
+        },
+        // {
+        //   title: '鎿嶄綔',
+        //   dataIndex: 'action',
+        //   align:"center",
+        //   fixed:"right",
+        //   width:147,
+        //   scopedSlots: { customRender: 'action' }
+        // }
+      ],
+      url: {
+        report: '/mesworkreporting/mesWorkReporting/add',
+        selectReportWorkOrderList: '/mes/productionOrder/selectReportWorkOrderList',
+        workOrderCompletenessCheck: '/mesproductionworkorder/mesProductionWorkOrder/workOrderCompletenessCheck',
+        add: '/meskittingcompletenesscheck/mesKittingCompletenessCheck/addBatch'
+      },
+      workOrderOptions: []
+    }
+  },
+  computed: {
+    formDisabled(){
+      return this.disabled
+    },
+  },
+  methods: {
+    check (record) {
+      this.loading = true
+      getAction(this.url.workOrderCompletenessCheck, {id: record.id}).then(res => {
+        if (res.success) {
+          res.result.map(item => item.workOrderId = record.id)
+          this.dataSource = res.result
+        }
+      }).finally(() => {
+        this.loading = false
+      })
+      this.visible = true
+    },
+    close () {
+      this.$emit('close');
+      this.visible = false;
+    },
+    handleOk () {
+      postAction(this.url.add, this.dataSource).then(res => {
+        if (res.success) {
+          this.$message.success('妫�鏌ョ粨鏋滃凡淇濆瓨')
+          this.submitCallback()
+        } else {
+          this.$message.warning(res.message)
+        }
+      })
+    },
+    submitCallback(){
+      this.$emit('ok');
+      this.visible = false;
+    },
+    handleCancel () {
+      this.close()
+    }
+  }
+}
+</script>
diff --git a/src/views/mes/modules/MesProductionWorkOrderReportModal.vue b/src/views/mes/modules/MesProductionWorkOrderReportModal.vue
index ccd82fc..a26ef11 100644
--- a/src/views/mes/modules/MesProductionWorkOrderReportModal.vue
+++ b/src/views/mes/modules/MesProductionWorkOrderReportModal.vue
@@ -61,7 +61,7 @@
 import { postAction, getAction } from '@api/manage'
 
 export default {
-  name: 'MesProductionWorkOrderRepublishModal',
+  name: 'MesProductionWorkOrderReportModal',
   data () {
     return {
       title: '鎶ュ伐',
@@ -81,7 +81,7 @@
         sm: { span: 18 },
       },
       url: {
-        republish: '/mesproductionworkorder/mesProductionWorkOrder/republish',
+        report: '/mesworkreporting/mesWorkReporting/add',
         selectReportWorkOrderList: '/mes/productionOrder/selectReportWorkOrderList'
       },
       workOrderOptions: []
@@ -114,11 +114,12 @@
         if (valid) {
           this.confirmLoading = true
           let formData = {
-            id: this.model.id,
-            planQuantity: this.model.planQuantity,
-            republishReason: this.model.republishReason
+            orderId: this.model.orderId,
+            workOrderId: this.model.id,
+            factoryId: this.model.factoryId,
+            quantity: this.model.quantity
           }
-          postAction(this.url.republish, formData).then(res => {
+          postAction(this.url.report, formData).then(res => {
             if (res.success) {
               this.$message.success(res.message)
               this.submitCallback()
diff --git a/src/views/system/modules/SysBusinessCodeRuleModal.vue b/src/views/system/modules/SysBusinessCodeRuleModal.vue
index af61492..be4056e 100644
--- a/src/views/system/modules/SysBusinessCodeRuleModal.vue
+++ b/src/views/system/modules/SysBusinessCodeRuleModal.vue
@@ -81,7 +81,7 @@
   methods: {
     add() {
       this.model = {};
-      this.model.seqLength = 4;
+      // this.model.seqLength = 4;
       this.editable = false;
       this.visible = true
     },

--
Gitblit v1.9.3