From b2236cd6f65e6bdd53beb9bc0d2bed34aa0ed212 Mon Sep 17 00:00:00 2001
From: lyh <925863403@qq.com>
Date: 星期一, 04 八月 2025 16:34:29 +0800
Subject: [PATCH]  程序加工确认表

---
 src/views/flowable/workflow/FlowCompleted.vue                   |   18 +
 src/views/flowable/workflow/guideCardBatch/GuideCardBatchXq.vue |  443 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 454 insertions(+), 7 deletions(-)

diff --git a/src/views/flowable/workflow/FlowCompleted.vue b/src/views/flowable/workflow/FlowCompleted.vue
index 61e49f9..1895e10 100644
--- a/src/views/flowable/workflow/FlowCompleted.vue
+++ b/src/views/flowable/workflow/FlowCompleted.vue
@@ -185,11 +185,11 @@
       :selectShenpiData='selectThirdMaintenanceData'
       @searchReset='searchReset'
     ></third-maintenance-approval-modal>
-    <guide-card-batch-handle
-      ref='guideCardBatchHandle'
+    <guide-card-batch-xq
+      ref='GuideCardBatchXq'
       :selectShenpiData='selectGuideCardData'
       @searchReset='searchReset'
-    ></guide-card-batch-handle>
+    ></guide-card-batch-xq>
   </a-card>
 </template>
 
@@ -213,7 +213,7 @@
 import EquipmentScrapApprovalModal from '@views/flowable/workflow/scrap/EquipmentScrapApprovalModal.vue'
 import SparePartApplyHandle from '@views/flowable/workflow/sparePartApply/SparePartApplyHandle.vue'
 import EquipmentReturnApprovalModal from '@views/flowable/workflow/leanOut/EquipmentReturnApprovalModal.vue'
-import GuideCardBatchHandle from '@views/flowable/workflow/guideCardBatch/GuideCardBatchHandle.vue'
+import GuideCardBatchXq from '@views/flowable/workflow/guideCardBatch/GuideCardBatchXq.vue'
 import SecondMaintenanceApprovalModal from '@views/flowable/workflow/secondMaintenance/SecondMaintenanceApprovalModal.vue'
 import ThirdMaintenanceApprovalModal from '@views/flowable/workflow/thirdMaintenance/ThirdMaintenanceApprovalModal.vue'
 import InboundOrderHandle from '@views/flowable/workflow/inboundOrder/InboundOrderHandle.vue'
@@ -240,7 +240,7 @@
     SecondMaintenanceApprovalModal,
     ThirdMaintenanceApprovalModal,
     InboundOrderHandle,
-    GuideCardBatchHandle
+    GuideCardBatchXq
 
   },
   data() {
@@ -444,8 +444,12 @@
     handleGuideCardApproval(item) {
       console.log('item----->', item)
       this.selectGuideCardData = item
-      this.$refs.guideCardBatchHandle.clearTableSource()
-      this.$refs.guideCardBatchHandle.getAllApproveData(item)
+      this.selectGuideCardData.assignee_dictText = item.todoUsers_dictText
+      this.selectGuideCardData.procInstId = item.procInsId
+      this.selectGuideCardData.processInstanceId = item.procInsId
+      this.selectGuideCardData.title = item.description
+      this.$refs.GuideCardBatchXq.clearTableSource()
+      this.$refs.GuideCardBatchXq.getAllApproveData(item)
     },
     handDrDetial(item) {
       this.selectShenpiData = item
diff --git a/src/views/flowable/workflow/guideCardBatch/GuideCardBatchXq.vue b/src/views/flowable/workflow/guideCardBatch/GuideCardBatchXq.vue
new file mode 100644
index 0000000..91f2f0b
--- /dev/null
+++ b/src/views/flowable/workflow/guideCardBatch/GuideCardBatchXq.vue
@@ -0,0 +1,443 @@
+
+<!--
+ Description: 宸ヤ綔娴�-绋嬪簭鍔犲伐纭琛ㄦ祦绋嬭鎯呴〉闈� List
+ Author: 浣滆�� liuyh
+ Date:   2025-02-27
+-->
+<template>
+  <a-modal
+    :title="title"
+    :width="width"
+    :visible="visible"
+    :footer="null"
+    @cancel="handCancel"
+  >
+    <a-card :bordered="false">
+      <div>
+        <b>{{ selectShenpiData.description }}</b>
+        <br>
+        <br>
+        <a-tag color="blue">
+          褰撳墠澶勭悊浜� {{ selectShenpiData.assignee_dictText }}
+        </a-tag>
+        <a-tag color="blue">
+          浠诲姟鍒涘缓鏃堕棿 {{ selectShenpiData.createTime }}
+        </a-tag>
+        <br>
+        <br>
+        <button @click="fetchAndShowBmp" class="btn-custom">鎵撳紑娴佺▼鍥�</button>
+        <div v-if="imageSrc">
+          <img :src="imageSrc" alt="Fetched Image" />
+        </div>
+        <hr class="shallow-hr">
+      </div>
+      <div>
+        <b>瀹$璇︽儏</b>
+        <br>
+        <a-form :form='form'>
+          <a-spin :spinning="spinning">
+            <a-tabs default-active-key='1' @change='callback'>
+              <a-tab-pane key='1' tab='鍩烘湰淇℃伅'>
+                <a-form-model ref='form' :model='tableRowRecord' :rules='validatorRules'>
+                  <a-row>
+                    <a-col :span='span'>
+                      <a-form-model-item label="娴佹按鍙�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="serialNumber">
+                        <a-input :disabled='coldisabled' v-model="tableRowRecord.serialNumber" ></a-input>
+                      </a-form-model-item>
+                    </a-col>
+                    <a-col :span='span'>
+                      <a-form-model-item label="绋嬪簭鏂囦欢鍚�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="docName">
+                        <a-input :disabled='coldisabled' v-model="tableRowRecord.docName"  ></a-input>
+                      </a-form-model-item>
+                    </a-col>
+                  </a-row>
+                  <a-row>
+                    <a-col :span='span'>
+                      <a-form-model-item label="闆朵欢鍥惧彿" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="partsCode">
+                        <a-input :disabled='coldisabled' v-model="tableRowRecord.partsCode" ></a-input>
+                      </a-form-model-item>
+                    </a-col>
+                    <a-col :span='span'>
+                      <a-form-model-item label="闆朵欢鍚嶇О" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="partsName">
+                        <a-input :disabled='coldisabled' v-model="tableRowRecord.partsName" ></a-input>
+                      </a-form-model-item>
+                    </a-col>
+                  </a-row>
+                  <a-row>
+                    <a-col :span='span'>
+                      <a-form-model-item label="闆朵欢鏉愭枡" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="materielDesp">
+                        <a-input :disabled='coldisabled' v-model="tableRowRecord.materielDesp"></a-input>
+                      </a-form-model-item>
+                    </a-col>
+                    <a-col :span='span'>
+                      <a-form-model-item label="澶瑰叿" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="fixtureInformation">
+                        <a-input :disabled='coldisabled' v-model="tableRowRecord.fixtureInformation"  ></a-input>
+                      </a-form-model-item>
+                    </a-col>
+                  </a-row>
+                  <a-row>
+                    <a-col :span='span'>
+                      <a-form-model-item label="宸ュ簭锛堝伐姝ュ彿锛�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="processWorkCode">
+                        <a-input :disabled='coldisabled' v-model="tableRowRecord.processWorkCode"  ></a-input>
+                      </a-form-model-item>
+                    </a-col>
+                    <a-col :span='span'>
+                      <a-form-model-item label="鍔犲伐鎵规" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="processingBatch">
+                        <a-input :disabled='coldisabled' v-model="tableRowRecord.processingBatch"  ></a-input>
+                      </a-form-model-item>
+                    </a-col>
+                  </a-row>
+                  <a-row>
+                    <a-col :span='span'>
+                      <a-form-model-item label="鍔犲伐鏁伴噺" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="processingQuantity">
+                        <a-input :disabled='coldisabled' v-model="tableRowRecord.processingQuantity" ></a-input>
+                      </a-form-model-item>
+                    </a-col>
+                    <a-col :span='span'>
+                      <a-form-model-item label="鍔犲伐璁惧" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="processingEquipment">
+                        <a-input :disabled='coldisabled' v-model="tableRowRecord.processingEquipment" ></a-input>
+                      </a-form-model-item>
+                    </a-col>
+                  </a-row>
+                </a-form-model>
+              </a-tab-pane>
+              <a-tab-pane key='2' tab='娴佺▼鑺傜偣'>
+                <a-card>
+                  <a-timeline style="padding:0 1% 0 12%" >
+                    <a-timeline-item color='white' v-for="(item,index1) in hitaskDataSource" :key="index1">
+                      <div class="bottom">
+                        <p>澶勭悊浜猴細{{item.assignee_dictText}}</p>
+                        <p v-if="index1 !==0">澶勭悊鏃堕暱锛歿{item.duration}}</p>
+                        <p v-if="item.name !== '鎻愪氦鐢宠'">澶勭悊绫诲瀷锛歿{item.sequenceFlowName}}</p>
+                        <p v-if="item.description != null">澶勭悊鎰忚锛歿{item.description}}</p>
+                        <div class="left_qiu"><span>{{item.taskName}}</span></div>
+                      </div>
+                    </a-timeline-item>
+                  </a-timeline>
+                </a-card>
+              </a-tab-pane>
+            </a-tabs>
+          </a-spin>
+        </a-form>
+      </div>
+    </a-card>
+
+
+  </a-modal>
+</template>
+
+<script>
+
+import '@assets/less/TableExpand.less'
+import { mixinDevice } from '@/utils/mixin'
+import { getAction, deleteAction, postAction, downFile, httpAction } from '@api/manage'
+export default {
+  name: 'FlowShenPi',
+  mixins: [mixinDevice],
+  props: {
+    selectShenpiData: {
+      type: Object,
+      required: true
+    }
+  },
+
+  data() {
+    return {
+      form: this.$form.createForm(this),
+      span: 12,
+      span1: 8,
+      coldisabled: true,
+      spinning: false,
+      tableRowRecord: {},
+      assignFileStream:{},
+      tableDataSource: [],
+      usageDataSource: [],
+      hitaskDataSource:[],
+      bomForm: {},
+      imageSrc: null,
+      drawerVisible: true,
+      labelCol: {
+        xs: { span: 24 },
+        sm: { span: 5 }
+      },
+      wrapperCol: {
+        xs: { span: 30 },
+        sm: { span: 16 }
+      },
+      validatorRules: {
+        status: {
+          rules: [
+            { required: true, message: '璇烽�夋嫨瀹℃壒鐘舵��!'},
+          ]
+        },
+      },
+      approveData: {},
+      flowData: {},
+      title: '璇︽儏椤甸潰',
+      width: 1000,
+      visible: false,
+      // 琛ㄥご
+      url: {
+        queryBomDataById: '/dnc/guideCardBatch/queryById',
+        diagramView: '/assign/flow/diagramView',
+        queryHisTaskList:'/dncFlow/dispatchFile/queryHisTaskList',
+        auditGuideCardBatch:"/dnc/guideCardBatch/auditGuideCardBatch",
+      },
+      dictOptions: {},
+      superFieldList: [],
+      workflowSource: [],
+      isSubmitting: false,
+    }
+  },
+  created() {
+  },
+  computed: {},
+  methods: {
+    callback() {
+    },
+    handCancel() {
+      this.visible = false
+    },
+    clearTableSource() {
+      this.tableDataSource = []
+      this.usageDataSource = []
+    },
+    fetchAndShowBmp() {
+      console.log('flowData----->', this.flowData)
+      try {
+        let parm = {
+          processDefinitionId: this.flowData.processDefinitionId,
+          processInstanceId:this.flowData.processInstanceId,
+          TaskDefinitionKey:this.flowData.processDefinitionKey
+        }
+        downFile(this.url.diagramView,parm,'get').then((res=>{
+          console.log('Pica------>',res)
+          const urlObject = window.URL.createObjectURL(new Blob([res]))
+          this.imageSrc = urlObject
+        }))
+      } catch (error) {
+        console.error('Error fetching image blob:', error)
+        alert('鏃犳硶鍔犺浇鍥剧墖锛岃绋嶅悗鍐嶈瘯銆�')
+      }
+    },
+    handleQueXiaoTask() {
+      // 濡傛灉姝e湪鎻愪氦锛岄樆姝㈠彇娑堟搷浣�
+      if (this.isSubmitting) return;
+      this.visible = false;
+      this.routeReload();
+    },
+    submitForm () {
+      // 濡傛灉姝e湪鎻愪氦锛岄樆姝㈤噸澶嶇偣鍑�
+      if (this.isSubmitting) return;
+
+      // 寮�鍚叏灞�绂侀��
+      this.isSubmitting = true;
+      document.body.classList.add('submitting');
+
+      const that = this;
+
+      // 瀹氫箟涓�涓仮澶嶇姸鎬佺殑鍑芥暟
+      const resetState = () => {
+        that.isSubmitting = false;
+        document.body.classList.remove('submitting');
+      };
+      if (!that.assignFileStream.status==null || that.assignFileStream.status===undefined){
+          this.$message.warning('璇烽�夋嫨澶勭悊绫诲瀷锛�')
+          return false;
+      }
+      if (!that.assignFileStream.approveContent==null || that.assignFileStream.approveContent===undefined) {
+        this.$message.warning('璇疯緭鍏ュ鐞嗘剰瑙侊紒')
+        return false;
+      }
+      if ((!that.selectShenpiData.inspectionOpinion==null || that.selectShenpiData.taskDefKey===undefined)&&that.selectShenpiData.taskDefKey==="proofread") {
+        this.$message.warning('璇疯緭鍏ラ妫�鎰忚锛�')
+      }
+      // 瑙﹀彂琛ㄥ崟楠岃瘉
+      this.form.validateFields((err, values) => {
+        if (err) {
+          resetState(); // 楠岃瘉澶辫触锛屾仮澶嶇姸鎬�
+          return;
+        }
+        if (!err) {
+          that.confirmLoading = true;
+          let url=this.url.auditGuideCardBatch
+          let method = 'post';
+          let handle =that.assignFileStream.status === '1';
+          let flowTaskVo = {}
+          switch (that.selectShenpiData.taskDefKey){
+            case "proofread":
+              flowTaskVo.checkType=handle;
+              break;
+            case "operation":
+              flowTaskVo.confirmType=handle;
+              break;
+            case "approval":
+              flowTaskVo.approveType=handle;
+              break;
+          }
+          flowTaskVo.comment =that.assignFileStream.approveContent;
+          flowTaskVo.dataId = this.selectShenpiData.dataId
+          flowTaskVo.taskId = this.selectShenpiData.id
+          flowTaskVo.userId = this.selectShenpiData.assignee
+          flowTaskVo.instanceId = this.selectShenpiData.procInstId
+          flowTaskVo.values = this.selectShenpiData.variables
+          flowTaskVo.inspectionOpinion=that.assignFileStream.inspectionOpinion
+          console.log("琛ㄥ崟鎻愪氦鏁版嵁",flowTaskVo)
+          httpAction(url,flowTaskVo,method).then((res)=>{
+            if(res.success){
+              that.$message.success(res.message);
+              that.visible = false
+              //鍒锋柊琛ㄦ牸
+              that.$emit('searchReset')
+            }else{
+              that.$message.warning(res.message);
+            }
+          })
+            .catch((error) => {
+              console.error(error);
+              that.$message.error('鎻愪氦澶辫触');
+            })
+            .finally(() => {
+              that.confirmLoading = false;
+              resetState(); // 璇锋眰缁撴潫锛屾仮澶嶇姸鎬�
+            });
+        }
+      })
+    },
+    getAllApproveData(item) {
+      console.log('selectShenpiData----->', this.selectShenpiData)
+      this.flowData = item
+      let param = {
+        'id': item.dataId
+      }
+      let parmhis={
+        'procInstId': item.procInstId
+      }
+      getAction(this.url.queryHisTaskList,parmhis).then(res=>{
+        this.hitaskDataSource=res.result
+        getAction(this.url.queryBomDataById, param).then((res => {
+          if (res.success) {
+            this.tableRowRecord = res.result
+            console.log('this.tableRowRecord----->', this.tableRowRecord)
+          }
+        }))
+      }).finally(
+        this.visible = true,
+        console.log('this.approveData---->', this.approveData)
+      )
+    }
+  }
+}
+</script>
+<style scoped>
+/* 鍏ㄥ眬绂侀�夋牱寮� - 浣滅敤浜庢暣涓〉闈� */
+html.submitting,
+html.submitting body {
+  pointer-events: none !important;
+  cursor: wait !important;
+}
+
+/* 钂欏眰鏁堟灉澧炲己 */
+html.submitting::before {
+  content: '';
+  position: fixed;
+  top: 0;
+  left: 0;
+  right: 0;
+  bottom: 0;
+  background: rgba(255, 255, 255, 0.5);
+  z-index: 9998;
+}
+
+/* 鍔犺浇鎸囩ず鍣� - 鏇存槑鏄剧殑瑙嗚鍙嶉 */
+html.submitting::after {
+  content: '鎻愪氦涓�...';
+  position: fixed;
+  top: 50%;
+  left: 50%;
+  transform: translate(-50%, -50%);
+  background: #1890ff;
+  color: white;
+  padding: 10px 20px;
+  border-radius: 4px;
+  z-index: 9999;
+}
+
+/* 绂佺敤鐘舵�佹寜閽牱寮� */
+.disabled-btn {
+  opacity: 0.6;
+  cursor: not-allowed !important;
+}
+.shallow-hr {
+  border: 0;
+  height: 1px; /* 鍒嗙晫绾跨殑楂樺害 */
+  background-color: rgba(0, 0, 0, 0.1); /* 浣跨敤 RGBA 棰滆壊锛屽苟璁剧疆杈冧綆鐨勯�忔槑搴� */
+  margin: 20px 0; /* 鍒嗙晫绾夸笂涓嬬殑澶栬竟璺� */
+}
+.btn-custom {
+  background-color: #4CAF50; /* 缁胯壊鑳屾櫙 */
+  color: white; /* 鐧借壊鏂囧瓧 */
+  border: none; /* 鏃犺竟妗� */
+  padding: 5px 15px; /* 鍐呰竟璺� */
+  text-align: center; /* 鏂囧瓧灞呬腑 */
+  text-decoration: none; /* 鏃犱笅鍒掔嚎 */
+  display: inline-block; /* 琛屽唴鍧楀厓绱� */
+  font-size: 12px; /* 瀛椾綋澶у皬 */
+  margin: 4px 2px; /* 澶栬竟璺� */
+  cursor: pointer; /* 榧犳爣鎮仠鏃舵樉绀烘墜鍨� */
+  border-radius: 4px; /* 鍦嗚杈规 */
+}
+
+.bold-large-label {
+  font-weight: bold;
+  font-size: 20px; /* 鎴栦綘闇�瑕佺殑浠讳綍澶у皬 */
+}
+.left_qiu{
+  position: absolute;
+  left: -74px;
+  top: 0;
+  width:54px;
+  border-radius: 50%;
+  height:54px;
+  font-size: 13px;
+  margin: auto;
+  display: flex;
+  flex-wrap: wrap;
+  align-items: center;
+  justify-content: center;
+  background: #0099ff;
+  transform: translate(0, 0);
+}
+/deep/ .ant-timeline-item-tail{
+  left: -29px !important;
+}
+.left_qiu span{
+  width: 3em;
+  display: block;
+  color: #fff;
+  text-align: center;
+}
+.img{
+  width: 75%;
+}
+
+.wrap{
+  clear: both;
+  width: 100%;
+  display: flex;
+  height: 50px;
+  border: 1px solid #ccc;
+  /* background-color: aqua; */
+}
+.box{
+  width:21%;
+  height:50px;
+  border-right: 1px solid #ccc;
+  line-height: 50px;
+  /* background: red; */
+  text-align:center;
+  margin: auto;
+}
+
+@import '~@assets/less/common.less';
+</style>
\ No newline at end of file

--
Gitblit v1.9.3