From 99d0bb96043ba5d6db66bbfb00f67ca4e09f3ffb Mon Sep 17 00:00:00 2001
From: guoyuji <guoyujie@ng.com>
Date: 星期五, 07 三月 2025 09:08:33 +0800
Subject: [PATCH] 小片尺寸和成品尺寸不相同时,打印显示小片信息

---
 north-glass-erp/northglass-erp/src/views/pp/processCard/SelectPrintFlowCard.vue |  135 +++++++++++++++++++++++++++++++++++++-------
 1 files changed, 113 insertions(+), 22 deletions(-)

diff --git a/north-glass-erp/northglass-erp/src/views/pp/processCard/SelectPrintFlowCard.vue b/north-glass-erp/northglass-erp/src/views/pp/processCard/SelectPrintFlowCard.vue
index 8390b02..564d38c 100644
--- a/north-glass-erp/northglass-erp/src/views/pp/processCard/SelectPrintFlowCard.vue
+++ b/north-glass-erp/northglass-erp/src/views/pp/processCard/SelectPrintFlowCard.vue
@@ -44,6 +44,19 @@
 let produceList = ref([])
 let titleStyleVisible = ref(false)
 
+//瀹氫箟鍒嗘灦鐘舵��
+const optionVal = ref('1')
+const options = [
+  {
+    value: '0',
+    label: '鏈垎鏋�',
+  },
+  {
+    value: '1',
+    label: '宸插垎鏋�',
+  },
+]
+
 
 const form = reactive({
   date1: '',
@@ -89,7 +102,7 @@
       .toISOString()
       .replace('T', ' ')
       .slice(0, 10) //榛樿寮�濮嬫椂闂�7澶╁墠
-  const end = new Date(new Date().getTime() + 3600 * 1000 * 24)
+  const end = new Date(new Date().getTime())
       .toISOString()
       .replace('T', ' ')
       .slice(0, 10)//榛樿缁撴潫鏃堕棿褰撳墠鏃堕棿
@@ -104,7 +117,7 @@
 let endTime = orderInfo.workOrderDate[1]
 let orderId=form.orderId
 let project=form.project
-
+let state = optionVal.value
 if (orderId==''){
   orderId=null
 }
@@ -114,7 +127,7 @@
 
 //绗竴娆″姞杞芥暟鎹�
 
-request.post(`/processCard/selectPrintFlowCard/${startTime}/${endTime}/${orderId}/${project}/${userId}`, filterData.value).then((res) => {
+request.post(`/processCard/selectPrintFlowCard/${startTime}/${endTime}/${orderId}/${project}/${userId}/${state}`, filterData.value).then((res) => {
 
   if (res.code == 200) {
     produceList = produceList.value.concat(deepClone(res.data.data))
@@ -145,7 +158,9 @@
   if (project==''){
     project=null
   }
-  request.post(`/processCard/selectPrintFlowCard/${startTime}/${endTime}/${orderId}/${project}/${userId}`, filterData.value).then((res) => {
+  let state = optionVal.value
+
+  request.post(`/processCard/selectPrintFlowCard/${startTime}/${endTime}/${orderId}/${project}/${userId}/${state}`, filterData.value).then((res) => {
     if (res.code == 200) {
 
       xGrid.value.loadData(res.data.data)
@@ -229,9 +244,10 @@
   toolbarConfig: {
     buttons: [
       {code: 'editCheckbox', name: t('basicData.edit'), status: 'primary'},
-      {'code': 'titleStyle', 'name': t('processCard.labelStyle'),status: 'primary'},
-      {code: 'detailsPrint', name: '鏄庣粏鎵撳嵃', status: 'primary'},
-
+      //{'code': 'titleStyle', 'name': t('processCard.labelStyle'),status: 'primary'},
+      {code: 'detailsPrint', name: t('processCard.detailPrinting'), status: 'primary'},
+      {code: 'detailsProcessPrint', name: t('processCard.detailsPrintedSeparately'), status: 'primary'},
+      {code: 'orderPrint', name: '璁㈠崟鎵撳嵃', status: 'primary'},
     ],
 
     zoom: true,
@@ -271,7 +287,10 @@
             ElMessage.warning(t('searchOrder.msgList.checkOrder'))
             return
           }
-
+          if (optionVal.value != '1'){
+            ElMessage.warning('璇烽�夋嫨宸插垎鏋惰鍗曟墦鍗�')
+            return
+          }
           let orderIdList = ""
           for (let i = 0; i < selectRecords.length; i++) {
             if (i + 1 === selectRecords.length) {
@@ -291,7 +310,10 @@
             ElMessage.warning(t('searchOrder.msgList.checkOrder'))
             return
           }
-
+          if (optionVal.value != '1'){
+            ElMessage.warning('璇烽�夋嫨宸插垎鏋惰鍗曟墦鍗�')
+            return
+          }
           let orderIdList = ""
           for (let i = 0; i < selectRecords.length; i++) {
             if (i + 1 === selectRecords.length) {
@@ -301,10 +323,57 @@
             }
           }
           let array = orderIdList.split('|');
-          router.push({path: '/main/processCard/PrintFlowCardDetails', query: {printList: JSON.stringify(selectRecords),checkedValue:checkedValue.value.value}})
+          router.push({path: '/main/processCard/PrintFlowCardDetails', query: {printList: JSON.stringify(selectRecords),checkedValue:checkedValue.value.value,type:1}})
           return;
 
         }
+        case 'detailsProcessPrint': {
+          const selectRecords = $grid.getCheckboxRecords()
+          if(selectRecords===null ||selectRecords===''||selectRecords.length===0){
+            ElMessage.warning(t('searchOrder.msgList.checkOrder'))
+            return
+          }
+          if (optionVal.value != '1'){
+            ElMessage.warning('璇烽�夋嫨宸插垎鏋惰鍗曟墦鍗�')
+            return
+          }
+          let orderIdList = ""
+          for (let i = 0; i < selectRecords.length; i++) {
+            if (i + 1 === selectRecords.length) {
+              orderIdList += selectRecords[i].order_id
+            } else {
+              orderIdList += selectRecords[i].order_id + "|"
+            }
+          }
+          let array = orderIdList.split('|');
+          router.push({path: '/main/processCard/PrintFlowCardDetails', query: {printList: JSON.stringify(selectRecords),checkedValue:checkedValue.value.value,type:2}})
+          return;
+
+        }
+        case 'orderPrint': {
+          const selectRecords = $grid.getCheckboxRecords()
+          if(selectRecords===null ||selectRecords===''||selectRecords.length===0){
+            ElMessage.warning(t('searchOrder.msgList.checkOrder'))
+            return
+          }
+          if (optionVal.value != '0'){
+            ElMessage.warning('璇烽�夋嫨鏈垎鏋惰鍗曟墦鍗�')
+            return
+          }
+          let orderIdList = ""
+          for (let i = 0; i < selectRecords.length; i++) {
+            if (i + 1 === selectRecords.length) {
+              orderIdList += selectRecords[i].order_id
+            } else {
+              orderIdList += selectRecords[i].order_id + "|"
+            }
+          }
+          let array = orderIdList.split('|');
+          router.push({path: '/main/processCard/PrintFlowCardDetails', query: {printList: JSON.stringify(selectRecords),checkedValue:checkedValue.value.value,type:3}})
+          return;
+
+        }
+
       }
     }
   }
@@ -313,9 +382,8 @@
 </script>
 
 <template>
-  <div class="main-div-customer">
-    <div id="selectForm">
-      <el-row :gutter="0">
+  <div  style="width: 100%;height: 100%">
+    <div class="head">
         <el-date-picker
             v-model="orderInfo.workOrderDate"
             :start-placeholder="$t('basicData.startDate')"
@@ -330,18 +398,36 @@
         &nbsp;&nbsp;
         <el-input v-model="form.project" clearable :placeholder="$t('order.project')" style="width: 110px"></el-input>
         &nbsp;&nbsp;
+
+      <el-select
+          :default-first-option="true"
+          ref="getSelect" style="width: 130px"
+          v-model="optionVal"
+          class="m-2"
+          @change="getWorkOrder"
+      >
+        <el-option
+            v-for="item in options"
+            :key="item.value"
+            :label="item.label"
+            :value="item.value"
+        />
+      </el-select>
+      &nbsp;&nbsp;
         <el-button
             id="select"
             :icon="Search"
             type="primary" @click="getWorkOrder">{{ $t('basicData.search') }}
         </el-button>
-        <vxe-checkbox style="margin-top:6px;margin-left:10px " v-if="!(checkedValue.value === 2 && inquiryMode === 2)" v-model="checkedValue.value"  content="鍚堝苟" :checked-value="1" :unchecked-value="3" ></vxe-checkbox>
-      </el-row>
+        <vxe-checkbox style="margin-top:6px;margin-left:10px " v-if="!(checkedValue.value === 2 && inquiryMode === 2)" v-model="checkedValue.value"  :content="$t('processCard.merge')" :checked-value="1" :unchecked-value="3" ></vxe-checkbox>
+
     </div>
+
+    <div class="main-table">
     <vxe-grid
         ref="xGrid"
         class="mytable-scrollbar"
-        height="95%"
+        height="100%"
         v-bind="gridOptions"
         v-on="gridEvents"
     >
@@ -366,13 +452,16 @@
       <template #num1_filter="{ column, $panel }">
         <div>
           <div v-for="(option, index) in column.filters" :key="index">
-            <input v-model="option.data" type="text" @input="changeFilterEvent($event, option, $panel)"/>
+            <input v-model="option.data" type="text"
+                   @keyup.enter.native="$panel.confirmFilter()"
+                   @input="changeFilterEvent($event, option, $panel)"/>
           </div>
         </div>
       </template>
 
 
     </vxe-grid>
+  </div>
     <el-dialog
         id="titleStyle"
         :title="$t('processCard.labelStyle')"
@@ -396,12 +485,14 @@
 </template>
 
 <style scoped>
-.main-div-customer {
-  width: 99%;
-  height: 100%;
+.head{
+  width: 100%;
+  height: 35px;
 }
-#selectForm {
-  width: 60%;
+
+.main-table{
+  width: 100%;
+  height: calc(100% - 35px);
 }
 :deep(#titleStyle .el-dialog__body){
   height: 90%;

--
Gitblit v1.8.0