From e50fa16b6dbc4e7c50d5fbdbc04d2a556ca01c4e Mon Sep 17 00:00:00 2001
From: chenlu <1320612696@qq.com>
Date: 星期一, 02 十二月 2024 11:26:36 +0800
Subject: [PATCH] 补片流程卡调整
---
north-glass-erp/northglass-erp/src/views/pp/report/WorkInProgress.vue | 251 +++++++++++++++++++++++++------------------------
1 files changed, 127 insertions(+), 124 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 ce80b04..f17c45a 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
@@ -6,7 +6,7 @@
import deepClone from "@/utils/deepClone";
import {ElDatePicker, ElMessage} from "element-plus";
import {useI18n} from 'vue-i18n'
-import {changeFilterEvent, filterChanged} from "@/hook"
+//import {changeFilterEvent, filterChanged} from "@/hook"
import footSum from "@/hook/footSum"
//璇█鑾峰彇
const {t} = useI18n()
@@ -20,7 +20,7 @@
})
//宸ュ簭
-const value = ref(t('machine.edgeGrinding'))
+const value = ref()
//鏍规嵁浠ヤ笅瀛楁姹囨�绘煡璇�
const stateValue = ref('')
@@ -72,24 +72,9 @@
let pageNum = ref(1)
let pageState = null
-//鑾峰彇涓冨ぉ鍓嶅埌褰撳墠鏃堕棿
-function getNowTime() {
- const start = new Date(new Date().getTime() - 3600 * 1000 * 24 * 3)
- .toISOString()
- .replace('T', ' ')
- .slice(0, 10) //榛樿寮�濮嬫椂闂�7澶╁墠
- const end = new Date(new Date().getTime() + 3600 * 1000 * 24)
- .toISOString()
- .replace('T', ' ')
- .slice(0, 10)//榛樿缁撴潫鏃堕棿褰撳墠鏃堕棿
- return [start, end]
-}
-//绗竴娆″姞杞借幏鍙栬繎涓冨ぉ鏃堕棿鍜岄粯璁ょ姸鎬�
-form.date1 = getNowTime()
-let startTime = form.date1[0]
-let endTime = form.date1[1]
+//绗竴娆″姞杞�
let selectProcesses = value.value
let inputVal = form.orderId
if (inputVal == '') {
@@ -113,12 +98,12 @@
optionVal = null
}
//绗竴娆″姞杞芥暟鎹�
-request.post(`/report/workInProgress/${startTime}/${endTime}/${inputVal}/${inputProject}/${selectProcesses}/${optionVal}`, filterData.value).then((res) => {
+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= 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
produceList = produceList.value.concat(deepClone(res.data.data))
titleSelectJson.value.processType = res.data.process
titleSelectJson.value.processType.splice(0,1)
@@ -131,8 +116,6 @@
//椤佃剼缈婚〉鏌ヨ
const selectPageList = () => {
- let startTime = form.date1[0]
- let endTime = form.date1[1]
let inputVal = form.orderId
if (inputVal == '') {
inputVal = null
@@ -141,10 +124,9 @@
if (optionVal == '') {
optionVal = null
}
- request.post(`/report/selectReportingWork/${pageNum.value}/${total.pageSize}/${startTime}/${endTime}/${inputVal}/${optionVal}`, filterData.value).then((res) => {
+ request.post(`/report/workInProgress/${pageNum.value}/${total.pageSize}/${inputVal}/${inputProject}/${selectProcesses}/${optionVal}`, filterData.value).then((res) => {
+
if (res.code == 200) {
-
-
produceList = deepClone(res.data.data)
xGrid.value.reloadData(produceList)
} else {
@@ -156,8 +138,6 @@
//鐐瑰嚮鏌ヨ
const getWorkOrder = () => {
- let startTime = form.date1[0]
- let endTime = form.date1[1]
let selectProcesses = value.value
let inputVal = form.orderId
if (inputVal == '') {
@@ -171,14 +151,14 @@
if (optionVal == '') {
optionVal = null
}
- request.post(`/report/workInProgress/${startTime}/${endTime}/${inputVal}/${inputProject}/${selectProcesses}/${optionVal}`, filterData.value).then((res) => {
+ request.post(`/report/workInProgress/${pageNum.value}/${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
- produceList = deepClone(res.data.data)
- xGrid.value.reloadData(produceList)
+ total.dataTotal = res.data.total.total * 1
+ total.pageTotal = res.data.total.pageTotal
+ pageTotal.value = res.data.total
+ xGrid.value.reloadData(res.data.data)
+ gridOptions.loading = false
} else {
ElMessage.warning(res.msg)
}
@@ -195,29 +175,49 @@
/*浣跨敤绛涢�夛紝鍚庣鑾峰彇鏁版嵁*/
-// const changeFilterEvent = (event, option, $panel,) => {
-// // 鎵嬪姩瑙﹀彂绛涢��
-// $panel.changeOption(event, !!option.data, option)
-// }
+const changeFilterEvent = (event, option, $panel,) => {
+ // 鎵嬪姩瑙﹀彂绛涢��
+ $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
-// }
-//
-// gridOptions.loading = true
-//
-// }
+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()
+ // 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)
+ // })
+
+}
/*鍚庣杩斿洖缁撴灉澶氬眰宓屽灞曠ず*/
const hasDecimal = (value) => {
@@ -259,60 +259,57 @@
{type: 'expand', fixed: "left", slots: {content: 'content'}, width: 50},
{type: 'seq', fixed: "left", title: t('basicData.Number'), width: 50},
{
- field: 'thisProcess', width: 120, title: t('report.workingProcedure'), filters: [{data: ''}],
- slots: {filter: 'num1_filter'},
- filterMethod: filterChanged,
+ field: 'thisProcess', width: 120, title: t('report.workingProcedure'),
visible: true
},
{
- field: 'order_id',
+ field: 'orderId',
width: 120,
title: t('order.orderId'),
showOverflow: "ellipsis",
filters: [{data: ''}],
slots: {filter: 'num1_filter'},
- filterMethod: filterChanged,
visible: true
},
{
- field: 'process_id',
- width: 120,
+ field: 'processId',
+ width: 140,
title: t('processCard.processId'),
showOverflow: "ellipsis",
filters: [{data: ''}],
slots: {filter: 'num1_filter'},
- filterMethod: filterChanged,
visible: true
},
{
- field: 'customer_name', width: 130, title: t('customer.customerName'), filters: [{data: ''}],
+ field: 'customerName', width: 130, title: t('customer.customerName'), filters: [{data: ''}],
slots: {filter: 'num1_filter'},
- filterMethod: filterChanged,
visible: true
},
{
field: 'project', width: 120, title: t('order.project'), filters: [{data: ''}],
slots: {filter: 'num1_filter'},
- filterMethod: filterChanged,
visible: true
},
{
field: 'batch', width: 100, title: t('order.batch'), filters: [{data: ''}],
slots: {filter: 'num1_filter'},
- filterMethod: filterChanged,
visible: true
},
- {field: 'order_number', width: 100, title: t('order.OrderNum'),visible: true},
- {field: 'technology_number', width: 120, title: t('processCard.technologyNumber'), showOverflow: "ellipsis",visible: true},
+ {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: '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: 'child_width', width: 120, title: t('order.width'),visible: true},
- {field: 'child_height', width: 120, title: t('order.height'),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: 'product_name', width: 120, title: t('order.product'),visible: true},
- {field: 'bend_radius', width: 120, title: t('order.bendRadius'),visible: true},
+ {field: 'productName', width: 120, title: t('order.product'),visible: true},
+ {field: 'bendRadius', width: 120, title: t('order.bendRadius'),visible: true},
],//琛ㄥご鎸夐挳
toolbarConfig: {
@@ -426,19 +423,7 @@
<div class="main-div-customer">
<div id="selectForm">
<el-row :gutter="0">
- <!-- <el-input placeholder="閿�鍞崟鍙�" v-model="form.name" style="width: 150px"/>-->
- <!-- <el-input placeholder="椤圭洰鍚嶇О" v-model="form.name" style="width: 150px"/>-->
- <el-date-picker
- v-model="form.date1"
- :start-placeholder="$t('basicData.startDate')"
- :end-placeholder="$t('basicData.endDate')"
- format="YYYY/MM/DD"
- style="width: 100px"
- type="daterange"
- value-format="YYYY-MM-DD"
- />
-
<el-input v-model="form.orderId" :placeholder="$t('order.orderId')" clearable style="width: 130px"></el-input>
<el-input v-model="form.project" clearable :placeholder="$t('order.project')" style="width: 130px"></el-input>
@@ -452,7 +437,7 @@
/>
</el-select>
- <el-select v-model="value" clearable default-value="default_city" style="width: 120px">
+ <el-select v-model="value" clearable :placeholder="$t('reportingWorks.selectProcess')" default-value="default_city" style="width: 120px">
<el-option
v-for="item in titleSelectJson['processType']"
:key="item.id"
@@ -464,55 +449,73 @@
</el-row>
</div>
- <vxe-grid
- ref="xGrid"
- class="mytable-scrollbar"
- max-height="100%"
- v-bind="gridOptions"
- :optimize="true"
+ <div style="height: 100%">
+ <vxe-grid
+ ref="xGrid"
+ class="mytable-scrollbar"
+ height="100%"
+ v-bind="gridOptions"
+ :optimize="true"
+ @filter-change="filterChanged"
- >
- <!-- @toolbar-button-click="toolbarButtonClickEvent"-->
- <!-- 涓嬫媺鏄剧ず鎵�鏈変俊鎭彃妲�-->
- <template #content="{ row }">
- <ul class="expand-wrapper">
- <li v-for="(item,index) in gridOptions.columns" v-show="item.field!=undefined ">
- <span style="font-weight: bold">{{ item.title + ': ' }}</span>
- <span>{{ row[item.field] }}</span>
- </li>
- </ul>
- </template>
+ >
+ <!-- @toolbar-button-click="toolbarButtonClickEvent"-->
+ <!-- 涓嬫媺鏄剧ず鎵�鏈変俊鎭彃妲�-->
+ <template #content="{ row }">
+ <ul class="expand-wrapper">
+ <li v-for="(item,index) in gridOptions.columns" v-show="item.field!=undefined ">
+ <span style="font-weight: bold">{{ item.title + ': ' }}</span>
+ <span>{{ row[item.field] }}</span>
+ </li>
+ </ul>
+ </template>
- <!--宸﹁竟鍥哄畾鏄剧ず鐨勬彃妲�-->
- <template #button_slot="{ row }">
- <el-button link size="small" type="primary" @click="getTableRow(row,'edit')">{{$t('basicData.edit')}}</el-button>
- <el-button link size="small" type="primary" @click="getTableRow(row,'setType')">{{$t('basicData.cancelReview')}}</el-button>
- <el-button link size="small" type="primary" @click="getTableRow(row,'delete')">{{$t('basicData.delete')}}</el-button>
- </template>
+ <!--宸﹁竟鍥哄畾鏄剧ず鐨勬彃妲�-->
+ <template #button_slot="{ row }">
+ <el-button link size="small" type="primary" @click="getTableRow(row,'edit')">{{$t('basicData.edit')}}</el-button>
+ <el-button link size="small" type="primary" @click="getTableRow(row,'setType')">{{$t('basicData.cancelReview')}}</el-button>
+ <el-button link size="small" type="primary" @click="getTableRow(row,'delete')">{{$t('basicData.delete')}}</el-button>
+ </template>
- <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)"/>
+ <template #num1_filter="{ column, $panel }">
+ <div>
+ <div v-for="(option, index) in column.filters" :key="index">
+ <input v-model="option.data" type="text"
+ @keyup.enter.native="$panel.confirmFilter()"
+ @input="changeFilterEvent($event, option, $panel)"/>
+ </div>
</div>
- </div>
- </template>
- <template #toolbar_buttons>
- <vxe-button style="margin-right: 0.5rem"
- @click="exportExcel('/report/exportWorkInProgress',
+ </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 #toolbar_buttons>
+ <vxe-button style="margin-right: 0.5rem"
+ @click="exportExcel('/report/exportWorkInProgress',
t('report.workInProgressReport'),
form.date1)">
- {{t('basicData.export')}}</vxe-button>
- </template>
+ {{t('basicData.export')}}</vxe-button>
+ </template>
- </vxe-grid>
+ </vxe-grid>
+ </div>
</div>
</template>
<style scoped>
.main-div-customer {
width: 99%;
- height: 100%;
+ height: 90%;
}
#selectForm {
--
Gitblit v1.8.0