From aced8be5a7735c310a1048003ed4f7e920ab080c Mon Sep 17 00:00:00 2001 From: zds <2388969634@qq.com> Date: Thu, 1 Dec 2022 20:09:38 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/ReceivemstServiceImpl.java | 12 ++-- .../impl/InspectionsheetmstServiceImpl.java | 10 ++- .../PowderProductionQueryServiceImpl.java | 11 +++- .../impl/ProductionDayQueryServiceImpl.java | 11 +++- .../impl/StatisticalReportServiceImpl.java | 10 ++- .../wms/pcs/receivemst/DtlShowDialog.vue | 63 ++++++++++++------ .../views/wms/pdm/produce/worktask/index.vue | 6 +- mes/qd/src/views/wms/pub/DeviceDialog.vue | 2 +- .../wms/statistics/ioStorQuery/DivDialog.vue | 50 +++++++------- .../wms/statistics/ioStorQuery2/index.vue | 28 +++++++- .../powderProductionQuery/index.vue | 66 ++++++++++++++----- .../productionDayQuery/TaskDtlDialog.vue | 48 +++++++++----- .../statistics/productionDayQuery/index.vue | 42 ++++++++++-- .../views/wms/statistics/sheetQuery/index.vue | 32 ++++++++- 14 files changed, 287 insertions(+), 104 deletions(-) diff --git a/mes/hd/nladmin-system/src/main/java/org/nl/wms/pcs/service/impl/ReceivemstServiceImpl.java b/mes/hd/nladmin-system/src/main/java/org/nl/wms/pcs/service/impl/ReceivemstServiceImpl.java index ee04f14e..5a774785 100644 --- a/mes/hd/nladmin-system/src/main/java/org/nl/wms/pcs/service/impl/ReceivemstServiceImpl.java +++ b/mes/hd/nladmin-system/src/main/java/org/nl/wms/pcs/service/impl/ReceivemstServiceImpl.java @@ -292,14 +292,18 @@ public class ReceivemstServiceImpl implements ReceivemstService { @Override @Transactional(rollbackFor = Exception.class) public Map queryOrder(Map whereJson, Pageable page) { - String begin_time = (String) whereJson.get("begin_time"); - String end_time = (String) whereJson.get("end_time"); String receive_code = (String) whereJson.get("receive_code"); String material_code = (String) whereJson.get("material_code"); HashMap map = new HashMap<>(); map.put("flag", "1"); - map.put("begin_time", begin_time); - map.put("end_time", end_time); + String begin_time =MapUtil.getStr(whereJson, "begin_time"); + if (StrUtil.isNotEmpty(begin_time)) { + map.put("begin_time", begin_time.substring(0,10)+" 00:00:00"); + } + String end_time = MapUtil.getStr(whereJson, "end_time"); + if (StrUtil.isNotEmpty(end_time)) { + map.put("end_time", end_time.substring(0,10)+" 23:59:59"); + } map.put("receive_code", receive_code); map.put("material_code", material_code); //只能为原辅料 diff --git a/mes/hd/nladmin-system/src/main/java/org/nl/wms/ql/service/impl/InspectionsheetmstServiceImpl.java b/mes/hd/nladmin-system/src/main/java/org/nl/wms/ql/service/impl/InspectionsheetmstServiceImpl.java index 27759169..ac5f75bc 100644 --- a/mes/hd/nladmin-system/src/main/java/org/nl/wms/ql/service/impl/InspectionsheetmstServiceImpl.java +++ b/mes/hd/nladmin-system/src/main/java/org/nl/wms/ql/service/impl/InspectionsheetmstServiceImpl.java @@ -60,8 +60,14 @@ public class InspectionsheetmstServiceImpl implements InspectionsheetmstService public Map queryAll(Map whereJson, Pageable page) { HashMap map = new HashMap<>(); map.put("flag", "1"); - map.put("begin_time", MapUtil.getStr(whereJson, "begin_time")); - map.put("end_time", MapUtil.getStr(whereJson, "end_time")); + String begin_time =MapUtil.getStr(whereJson, "begin_time"); + if (StrUtil.isNotEmpty(begin_time)) { + map.put("begin_time", begin_time.substring(0,10)+" 00:00:00"); + } + String end_time = MapUtil.getStr(whereJson, "end_time"); + if (StrUtil.isNotEmpty(end_time)) { + map.put("end_time", end_time.substring(0,10)+" 23:59:59"); + } map.put("is_pass", MapUtil.getStr(whereJson, "is_pass")); String inspection_code = MapUtil.getStr(whereJson, "inspection_code"); String material_code = MapUtil.getStr(whereJson, "material_code"); diff --git a/mes/hd/nladmin-system/src/main/java/org/nl/wms/statistics/service/impl/PowderProductionQueryServiceImpl.java b/mes/hd/nladmin-system/src/main/java/org/nl/wms/statistics/service/impl/PowderProductionQueryServiceImpl.java index 8c561016..801ae4c1 100644 --- a/mes/hd/nladmin-system/src/main/java/org/nl/wms/statistics/service/impl/PowderProductionQueryServiceImpl.java +++ b/mes/hd/nladmin-system/src/main/java/org/nl/wms/statistics/service/impl/PowderProductionQueryServiceImpl.java @@ -138,8 +138,15 @@ public class PowderProductionQueryServiceImpl implements PowderProductionQuerySe HashMap map = new HashMap<>(); map.put("flag", "1"); - map.put("begin_time", MapUtil.getStr(whereJson, "begin_time")); - map.put("end_time", MapUtil.getStr(whereJson, "end_time")); + + String begin_time =MapUtil.getStr(whereJson, "begin_time"); + if (StrUtil.isNotEmpty(begin_time)) { + map.put("begin_time", begin_time.substring(0,10)+" 00:00:00"); + } + String end_time = MapUtil.getStr(whereJson, "end_time"); + if (StrUtil.isNotEmpty(end_time)) { + map.put("end_time", end_time.substring(0,10)+" 23:59:59"); + } if (ObjectUtil.isNotEmpty(pcsn)) map.put("pcsn", "%"+pcsn+"%"); if (ObjectUtil.isNotEmpty(material_code)) map.put("material_code", "%"+material_code+"%"); diff --git a/mes/hd/nladmin-system/src/main/java/org/nl/wms/statistics/service/impl/ProductionDayQueryServiceImpl.java b/mes/hd/nladmin-system/src/main/java/org/nl/wms/statistics/service/impl/ProductionDayQueryServiceImpl.java index 22d50532..2000d288 100644 --- a/mes/hd/nladmin-system/src/main/java/org/nl/wms/statistics/service/impl/ProductionDayQueryServiceImpl.java +++ b/mes/hd/nladmin-system/src/main/java/org/nl/wms/statistics/service/impl/ProductionDayQueryServiceImpl.java @@ -3,6 +3,7 @@ package org.nl.wms.statistics.service.impl; import cn.hutool.core.map.MapUtil; import cn.hutool.core.util.NumberUtil; import cn.hutool.core.util.ObjectUtil; +import cn.hutool.core.util.StrUtil; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import com.alibaba.fastjson.JSONArray; @@ -32,8 +33,14 @@ public class ProductionDayQueryServiceImpl implements ProductionDayQueryService HashMap map = new HashMap<>(); map.put("flag", "1"); - map.put("begin_time", MapUtil.getStr(whereJson, "begin_time")); - map.put("end_time", MapUtil.getStr(whereJson, "end_time")); + String begin_time = MapUtil.getStr(whereJson, "begin_time"); + if (StrUtil.isNotEmpty(begin_time)) { + map.put("begin_time", begin_time.substring(0,10)+" 00:00:00"); + } + String end_time = MapUtil.getStr(whereJson, "end_time"); + if (StrUtil.isNotEmpty(end_time)) { + map.put("end_time", end_time.substring(0,10)+" 23:59:59"); + } if (ObjectUtil.isNotEmpty(pcsn)) map.put("pcsn", "%"+pcsn+"%"); if (ObjectUtil.isNotEmpty(material_code)) map.put("material_code", "%"+material_code+"%"); diff --git a/mes/hd/nladmin-system/src/main/java/org/nl/wms/statistics/service/impl/StatisticalReportServiceImpl.java b/mes/hd/nladmin-system/src/main/java/org/nl/wms/statistics/service/impl/StatisticalReportServiceImpl.java index 1cc6e866..45abca05 100644 --- a/mes/hd/nladmin-system/src/main/java/org/nl/wms/statistics/service/impl/StatisticalReportServiceImpl.java +++ b/mes/hd/nladmin-system/src/main/java/org/nl/wms/statistics/service/impl/StatisticalReportServiceImpl.java @@ -90,7 +90,15 @@ public class StatisticalReportServiceImpl implements StatisticalReportService { if (StrUtil.isNotEmpty(map.get("material_code"))) { map.put("material_code", "%" + map.get("material_code") + "%"); } - JSONObject jo = WQL.getWO("statistical_report_query_01").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "mb.material_name"); + String begin_time =MapUtil.getStr(whereJson, "begin_time"); + if (StrUtil.isNotEmpty(begin_time)) { + map.put("begin_time", begin_time.substring(0,10)+" 00:00:00"); + } + String end_time = MapUtil.getStr(whereJson, "end_time"); + if (StrUtil.isNotEmpty(end_time)) { + map.put("end_time", end_time.substring(0,10)+" 23:59:59"); + } + JSONObject jo = WQL.getWO("statistical_report_query_01").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "mb.material_name,mst.biz_date desc"); JSONArray json = jo.getJSONArray("content"); map.put("flag", "02"); JSONArray jo2 = WQL.getWO("statistical_report_query_01").addParamMap(map).process().getResultJSONArray(1); diff --git a/mes/qd/src/views/wms/pcs/receivemst/DtlShowDialog.vue b/mes/qd/src/views/wms/pcs/receivemst/DtlShowDialog.vue index f9b3d184..ee943527 100644 --- a/mes/qd/src/views/wms/pcs/receivemst/DtlShowDialog.vue +++ b/mes/qd/src/views/wms/pcs/receivemst/DtlShowDialog.vue @@ -11,7 +11,16 @@
- + - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + @@ -85,7 +94,7 @@ import crudOrderproc from '@/api/wms/pcs/orderproc' export default { name: 'DtlShowDialog', - components: { pagination, rrOperation, crudOperation, udOperation, DateRangePicker }, + components: { pagination, rrOperation, crudOperation, DateRangePicker }, mixins: [presenter(), header(), form(), crud()], cruds() { return CRUD({ @@ -135,7 +144,21 @@ export default { .catch(_ => { }) }, + onInput() { + this.$forceUpdate() + }, + mytoQuery(array1){ + if(array1 === null){ + this.crud.query.begin_time = '' + this.crud.query.end_time = '' + }else{ + this.crud.query.begin_time = array1[0] + this.crud.query.end_time = array1[1] + } + this.crud.toQuery() + }, close() { + this.crud.resetQuery(false) this.$emit('update:dialogShow', false) }, formaStatusName(row, column) { diff --git a/mes/qd/src/views/wms/pdm/produce/worktask/index.vue b/mes/qd/src/views/wms/pdm/produce/worktask/index.vue index fae74d3f..75c8fe1b 100644 --- a/mes/qd/src/views/wms/pdm/produce/worktask/index.vue +++ b/mes/qd/src/views/wms/pdm/produce/worktask/index.vue @@ -312,6 +312,9 @@ export default { } this.handleCurrentChange() }, + onInput() { + this.$forceUpdate() + }, mytoQuery(array1){ if(array1 === null){ this.crud.query.begin_time = '' @@ -412,9 +415,6 @@ export default { this.querytable() }) }, - onInput() { - this.$forceUpdate() - }, openWork() { this.checkrows = this.$refs.table.selection if (this.checkrows.length === 0) { diff --git a/mes/qd/src/views/wms/pub/DeviceDialog.vue b/mes/qd/src/views/wms/pub/DeviceDialog.vue index 2a30f935..669f1a21 100644 --- a/mes/qd/src/views/wms/pub/DeviceDialog.vue +++ b/mes/qd/src/views/wms/pub/DeviceDialog.vue @@ -157,7 +157,7 @@ export default { this.$refs.table.clearSelection() }, close() { - this.crud.resetQuery() + this.crud.resetQuery(false) this.$emit('update:dialogShow', false) }, submit() { diff --git a/mes/qd/src/views/wms/statistics/ioStorQuery/DivDialog.vue b/mes/qd/src/views/wms/statistics/ioStorQuery/DivDialog.vue index 9a32ff45..3c43c1ee 100644 --- a/mes/qd/src/views/wms/statistics/ioStorQuery/DivDialog.vue +++ b/mes/qd/src/views/wms/statistics/ioStorQuery/DivDialog.vue @@ -33,20 +33,20 @@ :header-cell-style="{background:'#f5f7fa',color:'#606266'}" @current-change="handleDtlCurrentChange" > - - - - - - - - - - - - - - + + + + + + + + + + + + + +
@@ -63,17 +63,17 @@ :highlight-current-row="true" :header-cell-style="{background:'#f5f7fa',color:'#606266'}" > - - - - - - - - - - - + + + + + + + + + + + diff --git a/mes/qd/src/views/wms/statistics/ioStorQuery2/index.vue b/mes/qd/src/views/wms/statistics/ioStorQuery2/index.vue index f74cdf3a..5cf6ae6f 100644 --- a/mes/qd/src/views/wms/statistics/ioStorQuery2/index.vue +++ b/mes/qd/src/views/wms/statistics/ioStorQuery2/index.vue @@ -151,7 +151,8 @@ start-placeholder="开始日期" end-placeholder="结束日期" :default-time="['00:00:00', '23:59:59']" - @change="crud.toQuery" + @input="onInput()" + @change="mytoQuery" /> @@ -188,9 +189,9 @@ - + - + @@ -232,6 +233,7 @@ import DivDialog from '@/views/wms/statistics/ioStorQuery/DivDialog' import TaskDialog from '@/views/wms/statistics/ioStorQuery/TaskDialog' import crudStorattr from '@/api/wms/basedata/st/storattr' import crudRawAssist from '@/api/wms/st/core/inbill/rawassist' +import Date from '@/utils/datetime' export default { name: 'IoStorQuery2', @@ -268,6 +270,7 @@ export default { currentRow: null, checkrows: [], storlist: [], + query_flag: true, billtypelist: [] } }, @@ -284,9 +287,15 @@ export default { checkoutbill.getType().then(res => { this.billtypelist = res }) + this.crud.query.createTime = [new Date().daysAgo(7), new Date()] }, methods: { [CRUD.HOOK.beforeRefresh]() { + if(this.query_flag){ + this.crud.query.begin_time = (new Date().daysAgo(7)).strftime('%F', 'zh') + this.crud.query.end_time = (new Date()).strftime('%F', 'zh') + this.query_flag = false + } this.handleCurrentChange(null) }, fun(val) { @@ -295,6 +304,19 @@ export default { ioFormat(row, column) { return this.dict.label.io_type[row.io_type] }, + onInput() { + this.$forceUpdate() + }, + mytoQuery(array1){ + if(array1 === null){ + this.crud.query.begin_time = '' + this.crud.query.end_time = '' + }else{ + this.crud.query.begin_time = array1[0] + this.crud.query.end_time = array1[1] + } + this.crud.toQuery() + }, handleSelectionChange(val, row) { if (val.length > 1) { this.$refs.table.clearSelection() diff --git a/mes/qd/src/views/wms/statistics/powderProductionQuery/index.vue b/mes/qd/src/views/wms/statistics/powderProductionQuery/index.vue index 68ef8e42..8c74e292 100644 --- a/mes/qd/src/views/wms/statistics/powderProductionQuery/index.vue +++ b/mes/qd/src/views/wms/statistics/powderProductionQuery/index.vue @@ -14,7 +14,16 @@ - + @@ -34,7 +43,7 @@ v-model="query.material_code" clearable size="mini" - placeholder="请输入批次" + placeholder="请输入产品编码" style="width: 230px;" class="filter-item" @keyup.enter.native="crud.toQuery" @@ -57,22 +66,22 @@ @selection-change="crud.selectionChangeHandler" > - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + @@ -87,6 +96,7 @@ import pagination from '@crud/Pagination' import crudOperation from '@crud/CRUD.operation' import crudPowderproductionquery from '@/api/wms/statistics/powderproductionquery' import DateRangePicker from '@/components/DateRangePicker' +import Date from '@/utils/datetime' export default { name: 'PowderProductionQuery', @@ -115,15 +125,35 @@ export default { data() { return { + query_flag: true } }, created() { + this.crud.query.createTime = [new Date().daysAgo(7), new Date()] }, methods: { // 钩子:在获取表格数据之前执行,false 则代表不获取数据 [CRUD.HOOK.beforeRefresh]() { + if(this.query_flag){ + this.crud.query.begin_time = (new Date().daysAgo(7)).strftime('%F', 'zh') + this.crud.query.end_time = (new Date()).strftime('%F', 'zh') + this.query_flag = false + } return true }, + onInput() { + this.$forceUpdate() + }, + mytoQuery(array1){ + if(array1 === null){ + this.crud.query.begin_time = '' + this.crud.query.end_time = '' + }else{ + this.crud.query.begin_time = array1[0] + this.crud.query.end_time = array1[1] + } + this.crud.toQuery() + }, hand(value) { this.crud.toQuery() } diff --git a/mes/qd/src/views/wms/statistics/productionDayQuery/TaskDtlDialog.vue b/mes/qd/src/views/wms/statistics/productionDayQuery/TaskDtlDialog.vue index 870e88ae..2ad1be93 100644 --- a/mes/qd/src/views/wms/statistics/productionDayQuery/TaskDtlDialog.vue +++ b/mes/qd/src/views/wms/statistics/productionDayQuery/TaskDtlDialog.vue @@ -26,23 +26,23 @@ @current-change="handleDtlCurrentChange" > - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + @@ -77,6 +77,7 @@ import CRUD, { presenter, header } from '@crud/crud' import crudOperation from '@crud/CRUD.operation' import crudProductionday from '@/api/wms/statistics/productionday' +import crudseriesProcessRoute from '@/api/wms/pdm/seriesProcessRoute' export default { name: 'TaskDtlDialog', @@ -109,6 +110,7 @@ export default { data() { return { dialogVisible: false, + XLList: [], tableData: [] } }, @@ -124,6 +126,11 @@ export default { } } }, + created() { + crudseriesProcessRoute.getXLlist2().then(res => { + this.XLList = res + }) + }, methods: { handleClose(done) { this.$confirm('确认关闭?') @@ -140,6 +147,13 @@ export default { open() { this.crud.toQuery() }, + seriesFormat(row) { + for (const item of this.XLList) { + if (item.id === row.product_series_id) { + return item.name + } + } + }, handleDtlCurrentChange(current) { const data = { 'worktask_id': current.worktask_id, diff --git a/mes/qd/src/views/wms/statistics/productionDayQuery/index.vue b/mes/qd/src/views/wms/statistics/productionDayQuery/index.vue index 97f5a480..9414142c 100644 --- a/mes/qd/src/views/wms/statistics/productionDayQuery/index.vue +++ b/mes/qd/src/views/wms/statistics/productionDayQuery/index.vue @@ -15,7 +15,16 @@ - + @@ -35,7 +44,7 @@ v-model="query.material_code" clearable size="mini" - placeholder="请输入批次" + placeholder="请输入产品编码" style="width: 230px;" class="filter-item" @keyup.enter.native="crud.toQuery" @@ -67,10 +76,10 @@ style="width: 100%;" @selection-change="crud.selectionChangeHandler" > - - + + @@ -89,6 +98,7 @@ import udOperation from '@crud/UD.operation' import pagination from '@crud/Pagination' import DateRangePicker from '@/components/DateRangePicker' import TaskDtlDialog from '@/views/wms/statistics/productionDayQuery/TaskDtlDialog' +import Date from '@/utils/datetime' export default { name: 'ProductionDayQuery', @@ -118,6 +128,7 @@ export default { return { cols: [], statusList: [], + query_flag: true, openParam: null, viewDialog: false, permission: { @@ -125,9 +136,17 @@ export default { rules: { }} }, + created() { + this.crud.query.createTime = [new Date().daysAgo(7), new Date()] + }, methods: { // 钩子:在获取表格数据之前执行,false 则代表不获取数据 [CRUD.HOOK.beforeRefresh]() { + if(this.query_flag){ + this.crud.query.begin_time = (new Date().daysAgo(7)).strftime('%F', 'zh') + this.crud.query.end_time = (new Date()).strftime('%F', 'zh') + this.query_flag = false + } crudProductionday.getHeader().then(res => { this.cols = res }) @@ -135,6 +154,19 @@ export default { hand(value) { this.crud.toQuery() }, + onInput() { + this.$forceUpdate() + }, + mytoQuery(array1){ + if(array1 === null){ + this.crud.query.begin_time = '' + this.crud.query.end_time = '' + }else{ + this.crud.query.begin_time = array1[0] + this.crud.query.end_time = array1[1] + } + this.crud.toQuery() + }, view() { const _selectData = this.$refs.table.selection this.openParam = _selectData[0] diff --git a/mes/qd/src/views/wms/statistics/sheetQuery/index.vue b/mes/qd/src/views/wms/statistics/sheetQuery/index.vue index dac3a61b..716bd7c9 100644 --- a/mes/qd/src/views/wms/statistics/sheetQuery/index.vue +++ b/mes/qd/src/views/wms/statistics/sheetQuery/index.vue @@ -42,7 +42,16 @@ - + @@ -155,6 +164,7 @@ import pagination from '@crud/Pagination' import DateRangePicker from '@/components/DateRangePicker' import AddDialog from '@/views/wms/ql/inspectionsheet/AddDialog' import ResultPutDialog from '@/views/wms/ql/inspectionsheet/ResultPutDialog' +import Date from '@/utils/datetime' export default { name: 'SheetQuery', @@ -187,6 +197,7 @@ export default { currentRow: {}, resultPutDialog: false, openParam: {}, + query_flag: true, passList: [ { 'label': '合格', 'value': '01' }, { 'label': '不合格', 'value': '02' } @@ -199,10 +210,16 @@ export default { crudInspectionsheetmst.getStatus().then(res => { this.statusList = res }) + this.crud.query.createTime = [new Date().daysAgo(30), new Date()] }, methods: { // 钩子:在获取表格数据之前执行,false 则代表不获取数据 [CRUD.HOOK.beforeRefresh]() { + if(this.query_flag){ + this.crud.query.begin_time = (new Date().daysAgo(30)).strftime('%F', 'zh') + this.crud.query.end_time = (new Date()).strftime('%F', 'zh') + this.query_flag = false + } this.handleCurrentChange(null) }, handleSelectionChange(val, row) { @@ -228,6 +245,19 @@ export default { this.currentRow = current } }, + onInput() { + this.$forceUpdate() + }, + mytoQuery(array1){ + if(array1 === null){ + this.crud.query.begin_time = '' + this.crud.query.end_time = '' + }else{ + this.crud.query.begin_time = array1[0] + this.crud.query.end_time = array1[1] + } + this.crud.toQuery() + }, handleCurrentChange(current) { if (current === null) { this.currentRow = {}