From 43e115a7de2c763c36d79e610a3abb1d833ea892 Mon Sep 17 00:00:00 2001
From: 廖井涛 <2265517004@qq.com>
Date: 星期一, 05 八月 2024 10:21:52 +0800
Subject: [PATCH] 修改发货报表

---
 north-glass-erp/northglass-erp/src/views/pp/processCard/SelectPrintFlowCard.vue |   89 +++++++++++++++++++++++++++++++++++++++-----
 1 files changed, 78 insertions(+), 11 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 b94d173..ad25712 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
@@ -9,12 +9,32 @@
 import {changeFilterEvent, filterChanged} from "@/hook"
 import footSum from "@/hook/footSum"
 import TagStyle from "@/components/pp/TagStyle.vue"
+import TagStyleDesigner from "@/components/pp/TagStyleDesigner.vue"
+import OrderSortDetail from '@/components/pp/OrderSortDetail.vue'
+import companyInfo from "@/stores/sd/companyInfo"
+import useUserInfoStore from "@/stores/userInfo";
 //璇█鑾峰彇
 const {t} = useI18n()
-
+const company = companyInfo()
 let router = useRouter()
+const printVisible= ref(false)
 
+const userStore = useUserInfoStore()
+const userId = userStore.user.userId
 
+let inquiryMode = company.printLabel.getSelectFlowCard;
+
+const checkedValue = ref("")
+if (userId==="A071" || userId==="A107"){
+   checkedValue.value = ref(2)
+}
+else {
+   checkedValue.value = ref(inquiryMode)
+}
+//鎺掑簭
+let editRow = ref({
+  orderId:null,
+})
 
 //瀹氫箟鏁版嵁杩斿洖缁撴灉
 let produceList = ref([])
@@ -30,6 +50,11 @@
   switch (type) {
     case 'edit' :{
       router.push({path: '/main/processCard/PrintFlowCard', query: { orderId: row.order_id }})
+      break
+    }
+    case 'sort' :{
+      editRow.value.orderId = row.order_id
+      printVisible.value = true
       break
     }
   }
@@ -56,7 +81,7 @@
 
 //鑾峰彇涓冨ぉ鍓嶅埌褰撳墠鏃堕棿
 function getNowTime() {
-  const start = new Date(new Date().getTime() - 3600 * 1000 * 24 * 7)
+  const start = new Date(new Date().getTime() - 3600 * 1000 * 24 * 15)
       .toISOString()
       .replace('T', ' ')
       .slice(0, 10) //榛樿寮�濮嬫椂闂�7澶╁墠
@@ -126,7 +151,7 @@
   align: 'center',//鏂囧瓧灞呬腑
   stripe: true,//鏂戦┈绾�
   rowConfig: {isCurrent: true, isHover: true, height: 30},//榧犳爣绉诲姩鎴栭�夋嫨楂樹寒
-  id: 'CustomerList',
+  id: 'SelectPrintFlowCard',
   showFooter: true,//鏄剧ず鑴�
   printConfig: {},
   importConfig: {},
@@ -145,14 +170,15 @@
   },
 
   editConfig: {
-    trigger: 'click',
+    trigger: 'dblclick',
     mode: 'row',
     showStatus: true
   },
   //琛ㄥご鍙傛暟
   columns: [
     {type: 'expand', fixed: "left", slots: {content: 'content'}, width: 50},
-    {title: t('basicData.operate'), width: 80, slots: { default: 'button_slot' },fixed:"left"},
+    {type: 'checkbox', fixed: "left", title: t('basicData.check'),width: 78},
+    {title: t('basicData.operate'), width: 100, slots: { default: 'button_slot' },fixed:"left"},
     {type: 'seq', fixed: "left", title: t('basicData.Number'), width: 50},
     {
       field: 'order_id',
@@ -161,6 +187,9 @@
       slots: {filter: 'num1_filter'},
       filterMethod: filterChanged
     },
+    {field: 'customer_name', title: t('processCard.customerName'), filters: [{data: ''}], slots: {filter: 'num1_filter'},
+      filterMethod: filterChanged, width: 110},
+
     {
       field: 'project',
       title: t('order.project'),
@@ -186,7 +215,9 @@
 
   toolbarConfig: {
     buttons: [
-      {'code': 'titleStyle', 'name': '鏍囩鏍峰紡',status: 'primary'}
+      {code: 'editCheckbox', name: t('basicData.edit'), status: 'primary'},
+      {'code': 'titleStyle', 'name': t('processCard.labelStyle'),status: 'primary'},
+
     ],
 
     zoom: true,
@@ -220,6 +251,26 @@
           titleStyleVisible.value = true
           break
         }
+        case 'editCheckbox': {
+          const selectRecords = $grid.getCheckboxRecords()
+          if(selectRecords===null ||selectRecords===''||selectRecords.length===0){
+            ElMessage.warning(t('searchOrder.msgList.checkOrder'))
+            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/PrintFlowCard', query: {printList: JSON.stringify(selectRecords),checkedValue:checkedValue.value.value}})
+          return;
+
+        }
       }
     }
   }
@@ -250,13 +301,13 @@
             :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="2" ></vxe-checkbox>
       </el-row>
     </div>
     <vxe-grid
         ref="xGrid"
         class="mytable-scrollbar"
-        height="100%"
-        max-height="100%"
+        height="95%"
         v-bind="gridOptions"
         v-on="gridEvents"
     >
@@ -274,7 +325,8 @@
       </template>
       <!--宸﹁竟鍥哄畾鏄剧ず鐨勬彃妲�-->
       <template #button_slot="{ row }">
-        <el-button @click="getTableRow(row,'edit')" link type="primary" size="small">{{$t('basicData.edit')}}</el-button>
+<!--        <el-button @click="getTableRow(row,'edit')" link type="primary" size="small">{{$t('basicData.edit')}}</el-button>-->
+        <el-button @click="getTableRow(row,'sort')" link type="primary" size="small">{{$t('processCard.sorting')}}</el-button>
       </template>
 
       <template #num1_filter="{ column, $panel }">
@@ -289,12 +341,22 @@
     </vxe-grid>
     <el-dialog
         id="titleStyle"
-        :title="'鏍囩鏍峰紡'"
-        style="width: 70%;height:70% "
+        :title="$t('processCard.labelStyle')"
+        style="width: 90%;height:90%;margin-top: 3vh "
         :close-on-click-modal="false"
         :close-on-press-escape="false"
         v-model="titleStyleVisible">
       <tag-style style="width: 100%;height: 100%"/>
+<!--      <tag-style-designer style="width: 100%;height: 100%"/>-->
+    </el-dialog>
+
+    <el-dialog
+        id="sizeCheck"
+        v-model="printVisible"
+        :title="$t('processCard.processCardDetails')"
+        destroy-on-close
+        style="width: 80%;height:75% ">
+      <order-sort-detail id="child"  :orderId="editRow.orderId"  />
     </el-dialog>
   </div>
 </template>
@@ -312,4 +374,9 @@
   width: 100%;
 }
 
+:deep(#sizeCheck .el-dialog__body){
+  height: 90%;
+  width: 100%;
+}
+
 </style>
\ No newline at end of file

--
Gitblit v1.8.0