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/WorkInProgress.vue | 213 ++++++++++++++++++++++++++++++++++++----------------
1 files changed, 147 insertions(+), 66 deletions(-)
diff --git a/north-glass-erp/northglass-erp/src/views/pp/report/WorkInProgress.vue b/north-glass-erp/northglass-erp/src/views/pp/report/WorkInProgress.vue
index 45a2ed5..556532d 100644
--- a/north-glass-erp/northglass-erp/src/views/pp/report/WorkInProgress.vue
+++ b/north-glass-erp/northglass-erp/src/views/pp/report/WorkInProgress.vue
@@ -1,13 +1,14 @@
<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 {ElDatePicker, ElMessage} from "element-plus";
+import {ElCheckbox, ElDatePicker, ElMessage} from "element-plus";
import {useI18n} from 'vue-i18n'
-//import {changeFilterEvent, 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()
@@ -20,7 +21,9 @@
})
//宸ュ簭
-const value = ref()
+const valueProcess = ref()
+//缁堟鐘舵��
+let terminationVal = ref(1)
//鏍规嵁浠ヤ笅瀛楁姹囨�绘煡璇�
const stateValue = ref('')
@@ -72,10 +75,13 @@
let pageNum = ref(1)
let pageState = null
-
+onMounted(() => {
+ //鍚敤琛ㄦ牸鎷栧姩閫変腑
+ addListener(xGrid.value, gridOptions)
+})
//绗竴娆″姞杞�
-let selectProcesses = value.value
+let selectProcesses = valueProcess.value
let inputVal = form.orderId
if (inputVal == '') {
inputVal = null
@@ -89,6 +95,7 @@
dataTotal: 0,
pageSize: 100
})
+
//瀹氫箟鎺ユ敹鍔犺浇琛ㄥご涓嬫媺鏁版嵁
const titleSelectJson = ref({
processType: [],
@@ -98,17 +105,17 @@
optionVal = null
}
//绗竴娆″姞杞芥暟鎹�
-request.post(`/report/workInProgress/1/${total.pageSize}/${inputVal}/${inputProject}/${selectProcesses}/${optionVal}`, filterData.value).then((res) => {
+request.post(`/report/workInProgressCombinationProcess/1/${total.pageSize}/${inputVal}/${inputProject}/${selectProcesses}/${optionVal}`, filterData.value).then((res) => {
if (res.code == 200) {
- total.dataTotal = res.data.total.total*1
- total.pageTotal= res.data.total.pageTotal
- pageTotal.value = res.data.total
+ // total.dataTotal = res.data.total.total*1
+ // total.pageTotal= res.data.total.pageTotal
+ // pageTotal.value = res.data.total
total.value = res.data.total
- produceList = produceList.value.concat(deepClone(res.data.data))
+ //produceList = produceList.value.concat(deepClone(res.data.data))
titleSelectJson.value.processType = res.data.process
titleSelectJson.value.processType.splice(0,1)
- xGrid.value.reloadData(produceList)
+ //xGrid.value.reloadData(produceList)
gridOptions.loading = false
} else {
ElMessage.warning(res.msg)
@@ -118,7 +125,7 @@
//椤佃剼缈婚〉鏌ヨ
const selectPageList = () => {
let inputVal = form.orderId
- let selectProcesses = value.value
+ let selectProcesses = valueProcess.value
if (inputVal == '') {
inputVal = null
}
@@ -130,10 +137,19 @@
if (optionVal == '') {
optionVal = null
}
- request.post(`/report/workInProgress/${pageNum.value}/${total.pageSize}/${inputVal}/${inputProject}/${selectProcesses}/${optionVal}`, filterData.value).then((res) => {
+ let terminationVals = terminationVal.value
+ if (terminationVals == '') {
+ terminationVals = null
+ }
+ request.post(`/report/workInProgress/${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)
+ produceList.forEach(item => {
+ // 濡傛灉 shape 鍙兘鏄瓧绗︿覆灏辩敤 ==锛屽鏋滀竴瀹氭槸鏁板瓧灏辩敤 ===
+ item.shape = (item.shape == 2) ? t('order.alien') : t('order.universalShape');
+ });
xGrid.value.loadData(produceList)
gridOptions.loading = false
} else {
@@ -145,7 +161,7 @@
//鐐瑰嚮鏌ヨ
const getWorkOrder = () => {
gridOptions.loading = true
- let selectProcesses = value.value
+ let selectProcesses = valueProcess.value
let inputVal = form.orderId
if (inputVal == '') {
inputVal = null
@@ -158,13 +174,21 @@
if (optionVal == '') {
optionVal = null
}
- request.post(`/report/workInProgress/${pageNum.value}/${total.pageSize}/${inputVal}/${inputProject}/${selectProcesses}/${optionVal}`, filterData.value).then((res) => {
+ let terminationVals = terminationVal.value
+ if (terminationVals == '') {
+ terminationVals = null
+ }
+ request.post(`/report/workInProgress/${pageNum.value}/${total.pageSize}/${inputVal}/${inputProject}/${selectProcesses}/${optionVal}/${terminationVals}`, filterData.value).then((res) => {
if (res.code == 200) {
- 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;
+ total.dataTotal = res.data.total.total * 1;
+ total.pageTotal = res.data.total.pageTotal;
+ pageTotal.value = res.data.total;
+ res.data.data.forEach(item => {
+ // 濡傛灉 shape 鍙兘鏄瓧绗︿覆灏辩敤 ==锛屽鏋滀竴瀹氭槸鏁板瓧灏辩敤 ===
+ item.shape = (item.shape == 2) ? t('order.alien') : t('order.universalShape');
+ });
xGrid.value.loadData(res.data.data)
gridOptions.loading = false
} else {
@@ -191,39 +215,55 @@
function filterChanged(column){
gridOptions.loading = true
//绛涢�夋潯浠跺彂鐢熷彉鍖栨潯浠跺彂鐢熷彉鍖�
- let value = column.datas[0] != undefined ? column.datas[0] : ''
+ let value = column.datas[0]!=undefined?column.datas[0]:''
value = value.trim()
//鍒ゆ柇鏄惁瀛樺湪澶栭敭
- if (column.property.indexOf('.') > -1) {
- const columnArr = column.property.split('.')
+ if (column.property.indexOf('.')>-1){
+ const columnArr = column.property.split('.')
filterData.value[columnArr[0]] = {
- [columnArr[1]]: value
+ [columnArr[1]]:value
}
- } else {
+ }else{
filterData.value[column.property] = value
}
- getWorkOrder()
- // let selectProcesses = value.value
- // let optionVal=stateValue.value
- // if (optionVal == '') {
- // optionVal = null
- // }
- // request.post(`/report/workInProgress/1/${total.pageSize}/${inputVal}/${inputProject}/${selectProcesses}/${optionVal}`, filterData.value).then((res) => {
- //
- // if (res.code == 200) {
- // total.dataTotal = res.data.total.total*1
- // total.pageTotal=parseInt(res.data.total)
- // pageNum.value=1
- // produceList = deepClone(res.data.data)
- // console.log(res.data.data)
- // xGrid.value.reloadData(produceList)
- // gridOptions.loading=false
- // } else {
- // ElMessage.warning(res.msg)
- // }
- // //handleUpdateData(produceList)
- // })
+ let selectProcesses = valueProcess.value
+ let inputVal = form.orderId
+ if (inputVal == '') {
+ inputVal = null
+ }
+ let inputProject = form.project
+ if (inputProject == '') {
+ inputProject = null
+ }
+ let optionVal=stateValue.value
+ if (optionVal == '') {
+ optionVal = null
+ }
+ let terminationVals = terminationVal.value
+ if (terminationVals == '') {
+ terminationVals = null
+ }
+ request.post(`/report/workInProgress/${pageNum.value}/${total.pageSize}/${inputVal}/${inputProject}/${selectProcesses}/${optionVal}/${terminationVals}`, filterData.value).then((res) => {
+
+ if (res.code == 200) {
+ total.value = res.data.total;
+ total.dataTotal = res.data.total.total * 1;
+ total.pageTotal = res.data.total.pageTotal;
+ pageTotal.value = res.data.total;
+ produceList = deepClone(res.data.data)
+ produceList.forEach(item => {
+ // 濡傛灉 shape 鍙兘鏄瓧绗︿覆灏辩敤 ==锛屽鏋滀竴瀹氭槸鏁板瓧灏辩敤 ===
+ item.shape = (item.shape == 2) ? t('order.alien') : t('order.universalShape');
+ });
+ xGrid.value.loadData(produceList)
+ gridOptions.loading = false
+ } else {
+ ElMessage.warning(res.msg)
+ }
+ //handleUpdateData(produceList)
+ })
+
}
@@ -254,7 +294,7 @@
useKey: true
},
filterConfig: { //绛涢�夐厤缃」
- // remote: true
+ remote: true
},
customConfig: {
storage: true
@@ -269,7 +309,9 @@
{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'},
+
},
{
field: 'orderId',
@@ -306,20 +348,27 @@
},
{field: 'glassNumber', width: 110,title: t('reportingWorks.glassNumber'),showOverflow:"ellipsis",filters: [{data: ''}],
slots: {filter: 'num1_filter'}},
- {field: 'orderNumber', width: 100, title: t('order.OrderNum'),visible: true},
+ {field: 'orderNumber', width: 100, title: t('order.OrderNum'),visible: true,filters: [{data: ''}],
+ slots: {filter: 'num1_filter'}, showOverflow: "ellipsis"},
{field: 'technologyNumber', width: 120, title: t('processCard.technologyNumber'),filters: [{data: ''}],
slots: {filter: 'num1_filter'}, showOverflow: "ellipsis",visible: true},
- {field: 'bend_radius', width: 100, title: t('order.bendRadius'),visible: true},
{field: 'shape', width: 100, title: t('order.shape'),visible: true},
{field: 'process', width: 120, title: t('craft.process'),visible: true},
- {field: 'quantity', width: 120, title: t('order.quantity'),visible: true},
- {field: 'childWidth', width: 120, title: t('order.width'),visible: true},
- {field: 'childHeight', width: 120, title: t('order.height'),visible: true},
- {field: 'stockNum', width: 120, title: t('productStock.inventoryQuantity'),visible: true},
- {field: 'stockArea', width: 120, title: t('report.inventoryArea'),visible: true},
+ {field: 'quantity', width: 120, title: t('order.quantity'),visible: true,filters: [{data: ''}],
+ slots: {filter: 'num1_filter'},},
+ {field: 'childWidth', width: 120, title: t('order.width'),visible: true,filters: [{data: ''}],
+ slots: {filter: 'num1_filter'},},
+ {field: 'childHeight', width: 120, title: t('order.height'),visible: true,filters: [{data: ''}],
+ slots: {filter: 'num1_filter'},},
+ {field: 'thickness',width: 90, title: t('order.totalThickness'),visible: true},
+ {field: 'stockNum', width: 120, title: t('productStock.inventoryQuantity'),visible: true,filters: [{data: ''}],
+ slots: {filter: 'num1_filter'},},
+ {field: 'stockArea', width: 120, title: t('report.inventoryArea'),visible: true,filters: [{data: ''}],
+ slots: {filter: 'num1_filter'},},
{field: 'productName', width: 120, title: t('order.product'),visible: true},
+ {field: 'glassName', width: 120, title: t('report.workProcessName'),visible: true},
{field: 'bendRadius', width: 120, title: t('order.bendRadius'),visible: true},
- {field: 'teamsGroupsName', width: 110,title: '涓婂伐搴忔姤宸�',showOverflow:"ellipsis",filters: [{data: ''}],
+ {field: 'teamsGroupsName', width: 110,title: t('report.teamsGroupsName'),showOverflow:"ellipsis",filters: [{data: ''}],
slots: {filter: 'num1_filter'}},
],//琛ㄥご鎸夐挳
@@ -357,7 +406,7 @@
})
function exportExcel(url, fileName,date) {
- let processes = value.value
+ let processes = valueProcess.value
let inputVal = form.orderId
if (inputVal == '') {
inputVal = null
@@ -365,6 +414,10 @@
let inputProject = form.project
if (inputProject == '') {
inputProject = null
+ }
+ let terminationVals = terminationVal.value
+ if (terminationVals == '') {
+ terminationVals = null
}
if(date===null){
ElMessage.warning(t('report.pleaseSelectADateFirst'))
@@ -375,7 +428,7 @@
ElMessage.warning(t('report.pleaseSelectAProcessFirst'))
return
}
-
+ gridOptions.loading = true
const date1 = new Date(date[0]);
const date2 = new Date(date[1]);
const timeDiff = Math.abs(date2.getTime() - date1.getTime());
@@ -388,7 +441,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])
@@ -401,6 +455,7 @@
elink.click()
URL.revokeObjectURL(elink.href) // 閲婃斁URL 瀵硅薄
document.body.removeChild(elink)
+ gridOptions.loading = false
} else { // IE10+涓嬭浇
navigator.msSaveBlob(blob, fileName)
}
@@ -429,17 +484,24 @@
// VXETable.updateColumns(tableRef.value, columns);
// }
}
+
+const handleCellDblClick = ({ row, column, cell, $event }) => {
+ VxeUI.clipboard.copy(row[column.property])
+}
+function onlandingTerminationChange(checked) {
+ terminationVal.value = checked ? 0 : 1
+}
</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>
- <el-input v-model="form.project" clearable :placeholder="$t('order.project')" style="width: 130px"></el-input>
-
- <el-select v-model="stateValue" class="m-2" :placeholder="$t('processCard.pleaseSelect')" clearable allow-create filterable style="width: 140px">
+ <el-input v-model="form.project" clearable :placeholder="$t('order.project')" style="width: 130px;display: none"></el-input>
+
+ <el-select v-model="stateValue" class="m-2" :placeholder="$t('processCard.pleaseSelect')" clearable allow-create filterable style="width: 140px;display: none">
<el-option
v-for="item in stateOptions"
:key="item.value"
@@ -447,8 +509,12 @@
:value="item.value"
/>
</el-select>
-
- <el-select v-model="value" clearable :placeholder="$t('reportingWorks.selectProcess')" default-value="default_city" style="width: 120px">
+ {{$t('report.workingProcedure')}}锛�
+ <el-select v-model="valueProcess" 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"
@@ -456,6 +522,14 @@
:value="item.basic_name"
/>
</el-select>
+
+ <el-checkbox
+ :model-value="terminationVal === 0"
+ @change="onlandingTerminationChange"
+ >
+ {{ t('processCard.notTermination') }}
+ </el-checkbox>
+
<el-button type="primary" @click="getWorkOrder">{{$t('basicData.search')}}</el-button>
</div>
<div class="main-table">
@@ -466,7 +540,7 @@
v-bind="gridOptions"
:optimize="true"
@filter-change="filterChanged"
-
+ @cell-dblclick="handleCellDblClick"
>
<!-- @toolbar-button-click="toolbarButtonClickEvent"-->
<!-- 涓嬫媺鏄剧ず鎵�鏈変俊鎭彃妲�-->
@@ -531,4 +605,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