From 67d7bea4cec55d2b995fe5e1726a8c636aac10e2 Mon Sep 17 00:00:00 2001 From: binbin_pan Date: Tue, 25 Jun 2024 15:52:53 +0800 Subject: [PATCH 1/7] =?UTF-8?q?fix:=20=E5=87=BA=E5=8E=82=E6=97=A5=E6=9C=9F?= =?UTF-8?q?=E5=8F=AF=E4=BB=A5=E6=99=9A=E4=BA=8E=E9=87=87=E8=B4=AD=E6=97=A5?= =?UTF-8?q?=E6=9C=9F=E4=B8=8E=E5=88=B0=E8=B4=A7=E6=97=A5=E6=9C=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../toolsAcceptance/component/addTools.vue | 33 ++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/sgzb-ui/src/views/warehouseManage/newPurchase/toolsAcceptance/component/addTools.vue b/sgzb-ui/src/views/warehouseManage/newPurchase/toolsAcceptance/component/addTools.vue index 5fe98a6a..a296fd04 100644 --- a/sgzb-ui/src/views/warehouseManage/newPurchase/toolsAcceptance/component/addTools.vue +++ b/sgzb-ui/src/views/warehouseManage/newPurchase/toolsAcceptance/component/addTools.vue @@ -30,6 +30,14 @@ value-format="yyyy-MM-dd" type="date" placeholder="出厂日期" + :picker-options="{ + // 设置当前时间为 采购日期的前一天 + disabledDate: time => { + const currentDate = new Date(maForm.purchaseTime || new Date()) + currentDate.setDate(currentDate.getDate() - 1) + return time.getTime() > currentDate.getTime() + } + }" @change="changeTime" > @@ -67,6 +75,7 @@ value-format="yyyy-MM-dd" type="date" placeholder="请选择采购日期" + @change="changeTimePurchase" > @@ -74,9 +83,16 @@ v-model="maForm.arrivalTime" style="width: 240px" value-format="yyyy-MM-dd" - :picker-options="pickerOptions" type="date" placeholder="请选择到货日期" + :picker-options="{ + // 设置当前时间为 采购日期的前一天 + disabledDate: time => { + const currentDate = new Date(maForm.purchaseTime || new Date()) + currentDate.setDate(currentDate.getDate()) + return time.getTime() < currentDate.getTime() + } + }" > @@ -202,6 +218,14 @@ type="date" range-separator="-" placeholder="出厂日期" + :picker-options="{ + // 设置当前时间为 采购日期的前一天 + disabledDate: time => { + const currentDate = new Date(maForm.purchaseTime || new Date()) + currentDate.setDate(currentDate.getDate() - 1) + return time.getTime() > currentDate.getTime() + } + }" > @@ -703,6 +727,13 @@ export default { // ...this.queryParams // }, `role_${new Date().getTime()}.xlsx`) }, + // 采购日期变化 + changeTimePurchase() { + this.queryParams.productionTime = '' + this.equipmentList.forEach((item) => { + this.$set(item, 'productionTime', '') + }) + }, }, } From 57417fc8becbace41a7f2b4f6a0f1ea856a6fe08 Mon Sep 17 00:00:00 2001 From: binbin_pan Date: Tue, 25 Jun 2024 16:00:40 +0800 Subject: [PATCH 2/7] =?UTF-8?q?fix:=20=E5=87=BA=E5=8E=82=E6=97=A5=E6=9C=9F?= =?UTF-8?q?=E5=8F=AF=E4=BB=A5=E6=99=9A=E4=BA=8E=E9=87=87=E8=B4=AD=E6=97=A5?= =?UTF-8?q?=E6=9C=9F=E4=B8=8E=E5=88=B0=E8=B4=A7=E6=97=A5=E6=9C=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../toolsAcceptance/component/addTools.vue | 25 ------------------- 1 file changed, 25 deletions(-) diff --git a/sgzb-ui/src/views/warehouseManage/newPurchase/toolsAcceptance/component/addTools.vue b/sgzb-ui/src/views/warehouseManage/newPurchase/toolsAcceptance/component/addTools.vue index a296fd04..26375032 100644 --- a/sgzb-ui/src/views/warehouseManage/newPurchase/toolsAcceptance/component/addTools.vue +++ b/sgzb-ui/src/views/warehouseManage/newPurchase/toolsAcceptance/component/addTools.vue @@ -30,14 +30,6 @@ value-format="yyyy-MM-dd" type="date" placeholder="出厂日期" - :picker-options="{ - // 设置当前时间为 采购日期的前一天 - disabledDate: time => { - const currentDate = new Date(maForm.purchaseTime || new Date()) - currentDate.setDate(currentDate.getDate() - 1) - return time.getTime() > currentDate.getTime() - } - }" @change="changeTime" > @@ -218,14 +210,6 @@ type="date" range-separator="-" placeholder="出厂日期" - :picker-options="{ - // 设置当前时间为 采购日期的前一天 - disabledDate: time => { - const currentDate = new Date(maForm.purchaseTime || new Date()) - currentDate.setDate(currentDate.getDate() - 1) - return time.getTime() > currentDate.getTime() - } - }" > @@ -594,15 +578,6 @@ export default { const arrivalTime = this.maForm.arrivalTime?.split('-').join('') - 0 - if (productionTime > purchaseTime) { - this.$message.error('出厂日期不可在采购日期之后') - return - } - if (productionTime > arrivalTime) { - this.$message.error('出厂日期不可在到货日期之后') - return - } - // console.log(this.maForm,'maForm') // console.log(this.equipmentList,'equipmentList') let isEmpty = true From 3616e7913384c533ddaf1272244458d1dfff789b Mon Sep 17 00:00:00 2001 From: binbin_pan Date: Tue, 25 Jun 2024 16:08:50 +0800 Subject: [PATCH 3/7] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=87=BA=E5=8E=82?= =?UTF-8?q?=E6=97=A5=E6=9C=9F=E5=8F=AF=E4=BB=A5=E6=99=9A=E4=BA=8E=E9=87=87?= =?UTF-8?q?=E8=B4=AD=E6=97=A5=E6=9C=9F=E4=B8=8E=E5=88=B0=E8=B4=A7=E6=97=A5?= =?UTF-8?q?=E6=9C=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../toolsAcceptance/component/addTools.vue | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/sgzb-ui/src/views/warehouseManage/newPurchase/toolsAcceptance/component/addTools.vue b/sgzb-ui/src/views/warehouseManage/newPurchase/toolsAcceptance/component/addTools.vue index 26375032..082d1cf1 100644 --- a/sgzb-ui/src/views/warehouseManage/newPurchase/toolsAcceptance/component/addTools.vue +++ b/sgzb-ui/src/views/warehouseManage/newPurchase/toolsAcceptance/component/addTools.vue @@ -381,17 +381,6 @@ export default { }, } }, - computed: { - pickerOptions() { - return { - disabledDate(time) { - const currentDate = new Date() - currentDate.setHours(0, 0, 0, 0) - return time.getTime() < currentDate.getTime() - }, - } - }, - }, // watch: { // 'maForm.purchaseTime'() { // if (this.maForm.purchaseTime != '') { @@ -704,10 +693,8 @@ export default { }, // 采购日期变化 changeTimePurchase() { - this.queryParams.productionTime = '' - this.equipmentList.forEach((item) => { - this.$set(item, 'productionTime', '') - }) + // 清除到货日期 + this.maForm.arrivalTime = '' }, }, } From 4d96be2a55fc5e4ae48e64b23bf33e329e825a0b Mon Sep 17 00:00:00 2001 From: binbin_pan Date: Tue, 25 Jun 2024 16:12:57 +0800 Subject: [PATCH 4/7] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=97=A5=E6=9C=9F?= =?UTF-8?q?=E9=80=89=E6=8B=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../newPurchase/toolsAcceptance/component/addTools.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sgzb-ui/src/views/warehouseManage/newPurchase/toolsAcceptance/component/addTools.vue b/sgzb-ui/src/views/warehouseManage/newPurchase/toolsAcceptance/component/addTools.vue index 082d1cf1..42b173c8 100644 --- a/sgzb-ui/src/views/warehouseManage/newPurchase/toolsAcceptance/component/addTools.vue +++ b/sgzb-ui/src/views/warehouseManage/newPurchase/toolsAcceptance/component/addTools.vue @@ -78,10 +78,10 @@ type="date" placeholder="请选择到货日期" :picker-options="{ - // 设置当前时间为 采购日期的前一天 + // 设置当前时间为 采购日期 disabledDate: time => { const currentDate = new Date(maForm.purchaseTime || new Date()) - currentDate.setDate(currentDate.getDate()) + currentDate.setDate(currentDate.getDate() - 1) return time.getTime() < currentDate.getTime() } }" From 968d953387058d12d3b17aec23209b7f3d19275c Mon Sep 17 00:00:00 2001 From: binbin_pan Date: Tue, 25 Jun 2024 16:49:18 +0800 Subject: [PATCH 5/7] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=97=A5=E6=9C=9F?= =?UTF-8?q?=E9=80=89=E6=8B=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../newPurchase/partsAcceptance/component/addParts.vue | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sgzb-ui/src/views/warehouseManage/newPurchase/partsAcceptance/component/addParts.vue b/sgzb-ui/src/views/warehouseManage/newPurchase/partsAcceptance/component/addParts.vue index af13397d..c8b25130 100644 --- a/sgzb-ui/src/views/warehouseManage/newPurchase/partsAcceptance/component/addParts.vue +++ b/sgzb-ui/src/views/warehouseManage/newPurchase/partsAcceptance/component/addParts.vue @@ -540,10 +540,11 @@ export default { }, computed: { pickerOptions() { + // 当前时间 - 采购时间 + const currentDate = new Date(this.maForm.purchaseTime || new Date()) + currentDate.setDate(currentDate.getDate() - 1) return { disabledDate(time) { - const currentDate = new Date() - currentDate.setHours(0, 0, 0, 0) return time.getTime() < currentDate.getTime() }, } From 6183ae3eae686b04731b977f47a525e3eee0fcce Mon Sep 17 00:00:00 2001 From: BianLzhaoMin <11485688+bianliangzhaomin123@user.noreply.gitee.com> Date: Tue, 25 Jun 2024 17:36:11 +0800 Subject: [PATCH 6/7] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=9C=BA=E5=85=B7?= =?UTF-8?q?=E6=88=90=E5=A5=97=E8=AE=BE=E5=A4=87=E6=96=B0=E5=A2=9E=20?= =?UTF-8?q?=E5=88=A0=E9=99=A4=20=E7=BC=96=E8=BE=91=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sgzb-ui/src/api/store/completeTools.js | 22 ++ sgzb-ui/src/components/FormModel/index.vue | 98 +++--- sgzb-ui/src/components/TableModel/index.vue | 14 +- sgzb-ui/src/views/base/comeAndGo/index.vue | 3 +- sgzb-ui/src/views/base/unit/index.vue | 3 +- .../forecastWaste/auditing/config.js | 7 +- .../component/addCompleteTools.vue | 20 ++ .../completeParts/component/config.js | 113 +++++++ .../completeParts/component/home.vue | 44 +++ .../machinery/completeParts/index.vue | 32 ++ .../component/addCompleteTools.vue | 308 ++++++++++++++++++ .../completeTools/component/config.js | 28 ++ .../completeTools/component/home.vue | 109 +++++++ .../machinery/completeTools/index.vue | 39 +++ sgzb-ui/vue.config.js | 4 +- 15 files changed, 787 insertions(+), 57 deletions(-) create mode 100644 sgzb-ui/src/api/store/completeTools.js create mode 100644 sgzb-ui/src/views/warehouseManage/machinery/completeParts/component/addCompleteTools.vue create mode 100644 sgzb-ui/src/views/warehouseManage/machinery/completeParts/component/config.js create mode 100644 sgzb-ui/src/views/warehouseManage/machinery/completeParts/component/home.vue create mode 100644 sgzb-ui/src/views/warehouseManage/machinery/completeParts/index.vue create mode 100644 sgzb-ui/src/views/warehouseManage/machinery/completeTools/component/addCompleteTools.vue create mode 100644 sgzb-ui/src/views/warehouseManage/machinery/completeTools/component/config.js create mode 100644 sgzb-ui/src/views/warehouseManage/machinery/completeTools/component/home.vue create mode 100644 sgzb-ui/src/views/warehouseManage/machinery/completeTools/index.vue diff --git a/sgzb-ui/src/api/store/completeTools.js b/sgzb-ui/src/api/store/completeTools.js new file mode 100644 index 00000000..2666de9d --- /dev/null +++ b/sgzb-ui/src/api/store/completeTools.js @@ -0,0 +1,22 @@ +import request from '@/utils/request' + +// 新增 成套设备 +export const addCompleteSetToolsApi = (data) => { + return request.post('/material/maWhole/addOrUpdate', data) +} +// 查询 成套设备列表 +export const getCompleteSetToolsApi = (data) => { + return request.get('/material/maWhole/selectList', { + params: data + }) +} +// 删除 成套设备单条数据 +export const delCompleteSetToolsApi = (data) => { + return request.post('/material/maWhole/deleteById', data) +} +// 查询编辑 成套设备单 +export const queryCompleteSetToolsApi = (data) => { + return request.get('/material/maWhole/selectListById', { + params: data + }) +} \ No newline at end of file diff --git a/sgzb-ui/src/components/FormModel/index.vue b/sgzb-ui/src/components/FormModel/index.vue index 00621f8f..3fad9757 100644 --- a/sgzb-ui/src/components/FormModel/index.vue +++ b/sgzb-ui/src/components/FormModel/index.vue @@ -42,7 +42,7 @@ :options="item.f_selList" :props="item.optionProps" :show-all-levels="false" - @change="casCadeChange" + @change="casCadeChange(item.f_model, $event)" clearable filterable style="width: 240px" @@ -50,6 +50,7 @@ diff --git a/sgzb-ui/src/components/TableModel/index.vue b/sgzb-ui/src/components/TableModel/index.vue index 92bc457c..96ce8dea 100644 --- a/sgzb-ui/src/components/TableModel/index.vue +++ b/sgzb-ui/src/components/TableModel/index.vue @@ -151,7 +151,7 @@ export default { data() { return { total: 0, - tableList: [{ demo: 123 }], + tableList: [], /* 分页参数 */ pageParams: { pageNum: 1, @@ -198,13 +198,19 @@ export default { /* 获取列表信息 */ async getList() { this.pageParams = Object.assign(this.pageParams, this.sendParams) + this.$delete(this.pageParams, 'limit') + this.$delete(this.pageParams, 'page') this.loading = true const res = await this.sendApi(this.pageParams) this.loading = false - if (res.code == 200) { - this.tableList = res.rows || res.data.rows - this.total = res.total || res.data.total + if (res.data) { + this.tableList = res.data.rows + this.total = res.data.total + } else { + this.tableList = res.rows + this.total = res.total + } } }, diff --git a/sgzb-ui/src/views/base/comeAndGo/index.vue b/sgzb-ui/src/views/base/comeAndGo/index.vue index 7b0564c5..20fc3b1b 100644 --- a/sgzb-ui/src/views/base/comeAndGo/index.vue +++ b/sgzb-ui/src/views/base/comeAndGo/index.vue @@ -142,7 +142,6 @@