From a660db06773007b1be690e0674829c00a57aeb7b Mon Sep 17 00:00:00 2001
From: 廖井涛 <2265517004@qq.com>
Date: 星期三, 24 十二月 2025 16:21:23 +0800
Subject: [PATCH] 订单首页流程卡新增楼层编号显示

---
 north-glass-erp/northglass-erp/src/views/pp/report/WorkInProgressCombination.vue |  179 +++++++++++++++++++++++++++++++----------------------------
 1 files changed, 93 insertions(+), 86 deletions(-)

diff --git a/north-glass-erp/northglass-erp/src/views/pp/report/WorkInProgressCombination.vue b/north-glass-erp/northglass-erp/src/views/pp/report/WorkInProgressCombination.vue
index dcffce8..4235538 100644
--- a/north-glass-erp/northglass-erp/src/views/pp/report/WorkInProgressCombination.vue
+++ b/north-glass-erp/northglass-erp/src/views/pp/report/WorkInProgressCombination.vue
@@ -1,13 +1,15 @@
 <script setup>
 
-import {reactive, ref} from "vue";
+import {onMounted, reactive, ref} from "vue";
 import {useRouter} from 'vue-router'
 import request from "@/utils/request";
 import deepClone from "@/utils/deepClone";
 import {ElCheckbox, ElDatePicker, ElMessage} from "element-plus";
 import {useI18n} from 'vue-i18n'
-//import {changeFilterEvent, filterChanged} from "@/hook"
+import { filterChanged} from "@/hook"
 import footSum from "@/hook/footSum"
+import {addListener} from "@/hook/mouseMove";
+import {VxeUI} from "vxe-pc-ui";
 //璇█鑾峰彇
 const {t} = useI18n()
 let router = useRouter()
@@ -21,6 +23,8 @@
 
 //椤圭洰鍚嶇О姹囨��
 let projectSummary= ref(1)
+//缁堟鐘舵��
+let terminationVal = ref(1)
 //宸ュ簭
 const value = ref()
 
@@ -74,7 +78,10 @@
 let pageNum = ref(1)
 let pageState = null
 
-
+onMounted(() => {
+  //鍚敤琛ㄦ牸鎷栧姩閫変腑
+  addListener(xGrid.value, gridOptions)
+})
 
 //绗竴娆″姞杞�
 let selectProcesses = value.value
@@ -91,12 +98,7 @@
   dataTotal: 0,
   pageSize: 100
 })
-let newItem= ref({
-  basic_name: '鍏ㄩ儴',
-  basic_type: 'product',
-  basic_category: 'process',
-  id: "001"
-})
+
 //瀹氫箟鎺ユ敹鍔犺浇琛ㄥご涓嬫媺鏁版嵁
 const titleSelectJson = ref({
   processType: [],
@@ -105,20 +107,22 @@
 if (optionVal == '') {
   optionVal = null
 }
+let terminationVals = terminationVal.value
+if (terminationVals == '') {
+  terminationVals = null
+}
 //绗竴娆″姞杞芥暟鎹�
-request.post(`/report/workInProgressCombination/1/${total.pageSize}/${selectProcesses}/${inputVal}/${inputProject}/${optionVal}`, filterData.value).then((res) => {
+request.post(`/report/workInProgressCombinationProcess/1/${total.pageSize}/${selectProcesses}/${inputVal}/${inputProject}/${optionVal}`, filterData.value).then((res) => {
 
   if (res.code == 200) {
-    console.log(res.data)
     // total.dataTotal = res.data.total.total*1
     // total.pageTotal= res.data.total.pageTotal
     // pageTotal.value = res.data.total
-    // total.value = res.data.total
+     total.value = res.data.total
     // produceList = produceList.value.concat(deepClone(res.data.data))
     titleSelectJson.value.processType = res.data.process
     titleSelectJson.value.processType.splice(0,1)
-    titleSelectJson.value.processType.unshift(newItem.value)
-    xGrid.value.reloadData(produceList)
+    //xGrid.value.reloadData(produceList)
     gridOptions.loading = false
   } else {
     ElMessage.warning(res.msg)
@@ -140,7 +144,11 @@
   if (optionVal == '') {
     optionVal = null
   }
-  request.post(`/report/workInProgressCombination/${pageNum.value}/${total.pageSize}/${inputVal}/${inputProject}/${selectProcesses}/${optionVal}`, filterData.value).then((res) => {
+  let terminationVals = terminationVal.value
+  if (terminationVals == '') {
+    terminationVals = null
+  }
+  request.post(`/report/workInProgressCombination/${pageNum.value}/${total.pageSize}/${inputVal}/${inputProject}/${selectProcesses}/${optionVal}/${terminationVals}`, filterData.value).then((res) => {
     if (res.code == 200) {
       total.value = res.data.total
       produceList = deepClone(res.data.data)
@@ -172,20 +180,22 @@
   if (optionVal == '') {
     optionVal = null
   }
-  request.post(`/report/workInProgressCombination/${pageNum.value}/${total.pageSize}/${inputVal}/${inputProject}/${selectProcesses}/${optionVal}`, filterData.value).then((res) => {
+  let terminationVals = terminationVal.value
+  if (terminationVals == '') {
+    terminationVals = null
+  }
+  request.post(`/report/workInProgressCombination/${pageNum.value}/${total.pageSize}/${inputVal}/${inputProject}/${selectProcesses}/${optionVal}/${terminationVals}`, filterData.value).then((res) => {
 
     if (res.code == 200) {
-      console.log(res.data.data)
       // total.dataTotal = res.data.total.total * 1
       // total.pageTotal = res.data.total.pageTotal
       // pageTotal.value = res.data.total
-      // total.value = res.data.total
+       total.value = res.data.total
       xGrid.value.loadData(res.data.data)
       gridOptions.loading = false
     } else {
       ElMessage.warning(res.msg)
     }
-    //handleUpdateData(produceList)
   })
 }
 
@@ -203,25 +213,7 @@
   $panel.changeOption(event, !!option.data, option)
 }
 
-function filterChanged(column){
-  gridOptions.loading = true
-  //绛涢�夋潯浠跺彂鐢熷彉鍖栨潯浠跺彂鐢熷彉鍖�
-  let value = column.datas[0] != undefined ? column.datas[0] : ''
-  value = value.trim()
-  //鍒ゆ柇鏄惁瀛樺湪澶栭敭
-  if (column.property.indexOf('.') > -1) {
-    const columnArr = column.property.split('.')
-    filterData.value[columnArr[0]] = {
-      [columnArr[1]]: value
-    }
-  } else {
-    filterData.value[column.property] = value
-  }
 
-  getWorkOrder()
-
-
-}
 
 /*鍚庣杩斿洖缁撴灉澶氬眰宓屽灞曠ず*/
 const hasDecimal = (value) => {
@@ -265,16 +257,20 @@
     {type: 'seq', fixed: "left", title: t('basicData.Number'), width: 50},
     {
       field: 'thisProcess', width: 120, title: t('report.workingProcedure'),
-      visible: true
+      visible: true, filters: [{data: ''}],slots: {filter: 'num1_filter'},
+      filterMethod: filterChanged,
     },
     {
-      field: 'project', width: 120, title: t('order.project'), filters: [{data: ''}],
+      field: 'project', width: 220, title: t('order.project'), filters: [{data: ''}],
       slots: {filter: 'num1_filter'},
+      filterMethod: filterChanged,
       visible: true
     },
     {field: 'stockNum', width: 120, title: t('productStock.inventoryQuantity'),visible: true},
     {field: 'stockArea', width: 120, title: t('report.inventoryArea'),visible: true},
-    {field: 'glassName', width: 120, title:  t('report.workProcessName'),visible: true},
+    {field: 'glassName', width: 420, title:  t('report.workProcessName'),visible: true, filters: [{data: ''}]
+      ,slots: {filter: 'num1_filter'},
+      filterMethod: filterChanged,},
   ],//琛ㄥご鎸夐挳
 
   toolbarConfig: {
@@ -310,7 +306,16 @@
 
 })
 
+function onlandingSequenceChange(checked) {
+  projectSummary.value = checked ? 0 : 1
+}
+
+function onlandingTerminationChange(checked) {
+  terminationVal.value = checked ? 0 : 1
+}
+
 function exportExcel(url, fileName,date) {
+
   let processes = value.value
   let inputVal = form.orderId
   if (inputVal == '') {
@@ -320,11 +325,15 @@
   if (inputProject == '') {
     inputProject = null
   }
+  let terminationVals = terminationVal.value
+  if (terminationVals == '') {
+    terminationVals = null
+  }
   if(date===null){
     ElMessage.warning(t('report.pleaseSelectADateFirst'))
     return
   }
-
+  gridOptions.loading = true
   if(processes===null){
     ElMessage.warning(t('report.pleaseSelectAProcessFirst'))
     return
@@ -342,7 +351,8 @@
     date: date,
     processes: processes,
     orderId: inputVal,
-    project: inputProject
+    project: inputProject,
+    terminationVals:terminationVals
   })
   request.post(url,dataMp.value,{responseType :'blob'}).then(res => {
     const blob = new Blob([res])
@@ -355,6 +365,7 @@
       elink.click()
       URL.revokeObjectURL(elink.href) // 閲婃斁URL 瀵硅薄
       document.body.removeChild(elink)
+      gridOptions.loading = false
     } else { // IE10+涓嬭浇
       navigator.msSaveBlob(blob, fileName)
     }
@@ -362,40 +373,23 @@
   })
 }
 
-const handleUpdateData = (data) =>{
-
-  // const usedColumns = new Set();
-  // data.forEach(row => {
-  //   Object.keys(row).forEach(key => {
-  //     usedColumns.add(key);
-  //   });
-  // });
-  // // 鏇存柊 columns 鏁扮粍鐨� visible 灞炴�ф潵鎺у埗鍒楃殑鏄剧ず
-  // gridOptions.columns.forEach(column => {
-  //
-  //   column.visible = usedColumns.has(column.field);
-  // });
-
-  //const columns = gridOptions.columns;
-  // const ageColumn = columns.find(col => col.property === 'age');
-  // if (ageColumn) {
-  //   ageColumn.visible = !ageColumn.visible;
-  //   VXETable.updateColumns(tableRef.value, columns);
-  // }
-}
-function onlandingSequenceChange(checked) {
-  projectSummary.value = checked ? 0 : 1
+const handleCellDblClick = ({ row, column, cell, $event }) => {
+  VxeUI.clipboard.copy(row[column.property])
 }
 </script>
 
 <template>
   <div  style="width: 100%;height: 100%">
     <div class="head">
-      <el-input v-model="form.orderId" :placeholder="$t('order.orderId')" clearable style="width: 130px"></el-input>
+      <el-input v-model="form.orderId" :placeholder="$t('order.orderId')" clearable style="width: 130px;display: none"></el-input>
       &nbsp;&nbsp;
-      <el-input v-model="form.project" clearable :placeholder="$t('order.project')" style="width: 130px"></el-input>
-      &nbsp;
+      <el-input v-model="form.project" clearable :placeholder="$t('order.project')" style="width: 130px;display: none"></el-input>
+      {{$t('report.workingProcedure')}}锛�
         <el-select v-model="value" clearable :placeholder="$t('reportingWorks.selectProcess')" default-value="default_city" style="width: 120px">
+          <el-option
+              :label="t('report.allProcess')"
+              :value="'all'"
+          />
           <el-option
               v-for="item in titleSelectJson['processType']"
               :key="item.id"
@@ -410,6 +404,12 @@
       >
         {{ t('order.project') }}
       </el-checkbox>
+      <el-checkbox
+          :model-value="terminationVal === 0"
+          @change="onlandingTerminationChange"
+      >
+        {{ t('processCard.notTermination') }}
+      </el-checkbox>
       &nbsp;
         <el-button type="primary" @click="getWorkOrder">{{$t('basicData.search')}}</el-button>
     </div>
@@ -420,8 +420,7 @@
           height="100%"
           v-bind="gridOptions"
           :optimize="true"
-          @filter-change="filterChanged"
-
+          @cell-dblclick="handleCellDblClick"
       >
         <!--      @toolbar-button-click="toolbarButtonClickEvent"-->
         <!--      涓嬫媺鏄剧ず鎵�鏈変俊鎭彃妲�-->
@@ -444,29 +443,30 @@
         <template #num1_filter="{ column, $panel }">
           <div>
             <div v-for="(option, index) in column.filters" :key="index">
-              <input v-model="option.data" type="text"
+              <input type="text"
+                     v-model="option.data"
                      @keyup.enter.native="$panel.confirmFilter()"
                      @input="changeFilterEvent($event, option, $panel)"/>
             </div>
           </div>
         </template>
-        <template #pager>
-          <!--浣跨敤 pager 鎻掓Ы-->
-          <!--        'PrevJump','NextJump', -->
-          <vxe-pager
-              v-model:current-page="pageNum"
-              v-model:page-size="total.pageSize"
-              v-model:pager-count="total.pageTotal"
-              :layouts="[  'PrevPage', 'Jump','PageCount', 'NextPage',  'Total']"
-              :total="total.dataTotal"
-              @page-change="handlePageChange"
-          >
-          </vxe-pager>
-        </template>
+<!--        <template #pager>-->
+<!--          &lt;!&ndash;浣跨敤 pager 鎻掓Ы&ndash;&gt;-->
+<!--          &lt;!&ndash;        'PrevJump','NextJump', &ndash;&gt;-->
+<!--          <vxe-pager-->
+<!--              v-model:current-page="pageNum"-->
+<!--              v-model:page-size="total.pageSize"-->
+<!--              v-model:pager-count="total.pageTotal"-->
+<!--              :layouts="[  'PrevPage', 'Jump','PageCount', 'NextPage',  'Total']"-->
+<!--              :total="total.dataTotal"-->
+<!--              @page-change="handlePageChange"-->
+<!--          >-->
+<!--          </vxe-pager>-->
+<!--        </template>-->
         <template #toolbar_buttons>
           <vxe-button style="margin-right: 0.5rem"
-                      @click="exportExcel('/report/exportWorkInProgress',
-                                          t('report.workInProgressReport'),
+                      @click="exportExcel('/report/exportWorkInProgressCombination',
+                                          t('report.WorkInProgressCombination'),
                                           form.date1)">
             {{t('basicData.export')}}</vxe-button>
         </template>
@@ -486,4 +486,11 @@
   width: 100%;
   height: calc(100% - 35px);
 }
+.vxe-grid {
+  /* 绂佺敤娴忚鍣ㄩ粯璁ら�変腑 */
+  -webkit-user-select: none;
+  -moz-user-select: none;
+  -ms-user-select: none;
+  user-select: none;
+}
 </style>
\ No newline at end of file

--
Gitblit v1.8.0