From b360d07dc4f3295d5f4340b3f28c2251df30d894 Mon Sep 17 00:00:00 2001 From: binbin_pan Date: Wed, 12 Jun 2024 09:44:34 +0800 Subject: [PATCH 1/7] =?UTF-8?q?fix:=202023=20=E5=BB=BA=E8=AE=AE=E6=8F=90?= =?UTF-8?q?=E7=A4=BA=E5=9C=A8=E8=BE=93=E5=85=A5=E6=A1=86=E5=B7=A6=E4=BE=A7?= =?UTF-8?q?=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/warehouseManage/warehousing/Inventory/index.vue | 3 +++ sgzb-ui/vue.config.js | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/sgzb-ui/src/views/warehouseManage/warehousing/Inventory/index.vue b/sgzb-ui/src/views/warehouseManage/warehousing/Inventory/index.vue index 3cbeec8b..6c9ae1ae 100644 --- a/sgzb-ui/src/views/warehouseManage/warehousing/Inventory/index.vue +++ b/sgzb-ui/src/views/warehouseManage/warehousing/Inventory/index.vue @@ -1503,4 +1503,7 @@ export default { ::v-deep.el-form-item__label { padding: 0 20px !important; } +::v-deep .el-input-number.is-without-controls .el-input__inner { + text-align: start; +} \ No newline at end of file diff --git a/sgzb-ui/vue.config.js b/sgzb-ui/vue.config.js index 687b3899..4b57d658 100644 --- a/sgzb-ui/vue.config.js +++ b/sgzb-ui/vue.config.js @@ -43,10 +43,10 @@ module.exports = { // target: `https://test-cc.zhgkxt.com`,//线上环境-南网 // target: `https://z.csgmall.com.cn`, - target: `http://10.40.92.50:28080`, //超 + // target: `http://10.40.92.50:28080`, //超 // target: `http://10.40.92.81:8080`, //韩/ // target: `http://10.40.92.74:8080`,//旭/ - // target: `http://10.40.92.148:28080`, //帅 + target: `http://10.40.92.138:28080`, //帅 // target: `http://10.40.92.5:28080`, //福 //******** 注意事项 ********* */ From 91c0464a0e259d92eb07a2d4cd912acb58f7f9f1 Mon Sep 17 00:00:00 2001 From: binbin_pan Date: Wed, 12 Jun 2024 10:35:55 +0800 Subject: [PATCH 2/7] =?UTF-8?q?=E7=9B=98=E7=82=B9=E5=85=A5=E5=BA=93-?= =?UTF-8?q?=E7=BC=96=E7=A0=81=E5=85=A5=E5=BA=93-=E8=AE=BE=E5=A4=87?= =?UTF-8?q?=E7=BC=96=E7=A0=81=E5=BF=85=E5=A1=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../warehousing/Inventory/config.js | 1 + .../warehousing/Inventory/index.vue | 19 ++++++++++++++++++- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/sgzb-ui/src/views/warehouseManage/warehousing/Inventory/config.js b/sgzb-ui/src/views/warehouseManage/warehousing/Inventory/config.js index 0e3f7a27..be132c88 100644 --- a/sgzb-ui/src/views/warehouseManage/warehousing/Inventory/config.js +++ b/sgzb-ui/src/views/warehouseManage/warehousing/Inventory/config.js @@ -19,6 +19,7 @@ export const dialogConfig = { { t_width: '', t_props: 'num', t_label: '设备数量' }, { t_width: '', t_props: 'modelName', t_label: '入库人' }, { t_width: '', t_props: 'createDate', t_label: '入库日期' }, + { t_width: '', t_props: 'remark', t_label: '备注' }, ], } diff --git a/sgzb-ui/src/views/warehouseManage/warehousing/Inventory/index.vue b/sgzb-ui/src/views/warehouseManage/warehousing/Inventory/index.vue index 6c9ae1ae..6f8d040d 100644 --- a/sgzb-ui/src/views/warehouseManage/warehousing/Inventory/index.vue +++ b/sgzb-ui/src/views/warehouseManage/warehousing/Inventory/index.vue @@ -530,15 +530,18 @@ type="index" /> + @@ -950,6 +953,7 @@ export default { dialogConfig, getInventoryWarehousingApi, sendParams: {}, + requiredMaCode: false, } }, created() { @@ -1224,6 +1228,14 @@ export default { this.getList() }) } else { + // this.codeTableList 中只要有一个maCode为空, 则不允许提交 + this.requiredMaCode = this.codeTableList.some( + (item) => !item.maCode, + ) + if (this.requiredMaCode) { + this.$message.error('设备编码不能为空') + return + } // 统一处理时间格式为 yyyy-MM-dd this.codeTableList.forEach((item) => { if (item.thisCheckTime) { @@ -1492,6 +1504,11 @@ export default { closeDialogOuter() { this.dialogConfig.outerVisible = false }, + handleMaCodeBlur(row) { + if (!row.maCode) { + this.$message.warning('设备编码不能为空') + } + }, }, } From 940378a69258a7d950e85140e5bd7d860462f75b Mon Sep 17 00:00:00 2001 From: binbin_pan Date: Wed, 12 Jun 2024 11:16:47 +0800 Subject: [PATCH 3/7] =?UTF-8?q?fix:=202036=20=E6=A3=80=E9=AA=8C=E6=97=B6?= =?UTF-8?q?=E9=97=B4=E5=8F=AF=E4=BB=A5=E6=99=9A=E4=BA=8E=E4=B8=8B=E6=AC=A1?= =?UTF-8?q?=E6=A3=80=E9=AA=8C=E6=97=B6=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../warehousing/Inventory/index.vue | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/sgzb-ui/src/views/warehouseManage/warehousing/Inventory/index.vue b/sgzb-ui/src/views/warehouseManage/warehousing/Inventory/index.vue index 6f8d040d..11392c7a 100644 --- a/sgzb-ui/src/views/warehouseManage/warehousing/Inventory/index.vue +++ b/sgzb-ui/src/views/warehouseManage/warehousing/Inventory/index.vue @@ -334,6 +334,7 @@ type="date" placeholder="请输入检验时间" style="width: 400px" + @change="changeCheckTime" /> @@ -349,6 +350,15 @@ type="date" placeholder="请输入检验时间" style="width: 13vw" + :disabled="!codeForm.thisCheckTime" + :picker-options="{ + disabledDate(time) { + if (codeForm.thisCheckTime) { + return time.getTime() < new Date(codeForm.thisCheckTime).getTime(); + } + return false; + } + }" /> @@ -1509,6 +1519,14 @@ export default { this.$message.warning('设备编码不能为空') } }, + // 校验检验日期 + changeCheckTime() { + if (this.codeForm.thisCheckTime > this.codeForm.nextCheckTime) { + this.codeForm.nextCheckTime = '' + } else if (!this.codeForm.thisCheckTime) { + this.codeForm.nextCheckTime = '' + } + }, }, } From 6a21d5e7a3dd10f478196835b6e1e9bfa56d6d62 Mon Sep 17 00:00:00 2001 From: binbin_pan Date: Wed, 12 Jun 2024 13:25:33 +0800 Subject: [PATCH 4/7] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/warehouseManage/warehousing/Inventory/index.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sgzb-ui/src/views/warehouseManage/warehousing/Inventory/index.vue b/sgzb-ui/src/views/warehouseManage/warehousing/Inventory/index.vue index 11392c7a..42399734 100644 --- a/sgzb-ui/src/views/warehouseManage/warehousing/Inventory/index.vue +++ b/sgzb-ui/src/views/warehouseManage/warehousing/Inventory/index.vue @@ -533,12 +533,12 @@ :stripe="true" > - + /> --> Date: Wed, 12 Jun 2024 13:40:05 +0800 Subject: [PATCH 5/7] =?UTF-8?q?=E5=85=A5=E5=BA=93=E7=9B=98=E7=82=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mapper/InventoryAndWarehousingMapper.java | 12 ++++++ .../InventoryAndWarehousingServiceImpl.java | 24 ++++++++++- .../InventoryAndWarehousingMapper.xml | 42 +++++++------------ 3 files changed, 51 insertions(+), 27 deletions(-) diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/mapper/InventoryAndWarehousingMapper.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/mapper/InventoryAndWarehousingMapper.java index 6d4f16a3..df85421e 100644 --- a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/mapper/InventoryAndWarehousingMapper.java +++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/mapper/InventoryAndWarehousingMapper.java @@ -73,6 +73,11 @@ public interface InventoryAndWarehousingMapper { */ int selectTaskNumByMonth(@Param("date") Date nowDate); + /** + * 根据二维码code查重 + * @param code + * @return + */ int selectByCode(String code); /** @@ -81,4 +86,11 @@ public interface InventoryAndWarehousingMapper { * @return */ List getDetails(PutInStorageBean bean); + + /** + * 根据macode查重 + * @param maCode + * @return + */ + int selectByMaCode(String maCode); } diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/impl/InventoryAndWarehousingServiceImpl.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/impl/InventoryAndWarehousingServiceImpl.java index 6b59a247..38b55cbb 100644 --- a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/impl/InventoryAndWarehousingServiceImpl.java +++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/impl/InventoryAndWarehousingServiceImpl.java @@ -1,5 +1,6 @@ package com.bonus.sgzb.material.service.impl; +import com.bonus.sgzb.common.core.exception.ServiceException; import com.bonus.sgzb.common.core.utils.DateUtils; import com.bonus.sgzb.common.core.web.domain.AjaxResult; import com.bonus.sgzb.common.security.utils.SecurityUtils; @@ -86,6 +87,15 @@ public class InventoryAndWarehousingServiceImpl implements InventoryAndWarehousi } } String code = genderBackCode(); + List machIneDtoList = dto.getMachIneDtoList(); + if (CollectionUtils.isNotEmpty(machIneDtoList)) { + for (MachIneDto machIneDto : machIneDtoList) { + int count = selectByMaCode(machIneDto.getMaCode()); + if (count != 0) { + throw new ServiceException("以下设备编码与库中数据存在重复,请修改后重新提交:" + machIneDto.getMaCode()); + } + } + } int res; try { //1. 判断是数量还是编号入库,保存到不同表 @@ -119,6 +129,15 @@ public class InventoryAndWarehousingServiceImpl implements InventoryAndWarehousi return AjaxResult.success(res); } + /** + * 根据设备编码code查重 + * @param maCode + * @return + */ + private int selectByMaCode(String maCode) { + return inventoryAndWarehousingMapper.selectByMaCode(maCode); + } + /** * 根据入库单号查看详情 * @param bean @@ -153,6 +172,9 @@ public class InventoryAndWarehousingServiceImpl implements InventoryAndWarehousi machIneDto.setCreator(dto.getCreator()); machIneDto.setNum(dto.getNum()); machIneDto.setIsCode(dto.getIsCode()); + machIneDto.setUnitId(dto.getUnitId()); + machIneDto.setProId(dto.getProId()); + machIneDto.setRemarks(dto.getRemarks()); res += insertInfo(machIneDto); machIneDto.setInfoId(machIneDto.getId()); } @@ -164,7 +186,6 @@ public class InventoryAndWarehousingServiceImpl implements InventoryAndWarehousi machIneDto.setIsCode(dto.getIsCode()); machIneDto.setTypeId(dto.getTypeId()); machIneDto.setCreator(dto.getCreator()); - machIneDto.setRemarks(dto.getRemarks()); machIneDto.setPutInType(dto.getPutInType()); machIneDto.setNum(dto.getNum()); machIneDto.setCheckMan(dto.getCheckMan()); @@ -234,6 +255,7 @@ public class InventoryAndWarehousingServiceImpl implements InventoryAndWarehousi machIneDto.setCreator(dto.getCreator()); machIneDto.setIsCode(dto.getIsCode()); machIneDto.setTotalNum(total); + machIneDto.setRemarks(dto.getRemarks()); res += insertInfo(machIneDto); machIneDto.setInfoId(machIneDto.getId()); } diff --git a/sgzb-modules/sgzb-material/src/main/resources/mapper/material/InventoryAndWarehousingMapper.xml b/sgzb-modules/sgzb-material/src/main/resources/mapper/material/InventoryAndWarehousingMapper.xml index 2939d7fc..10a046bb 100644 --- a/sgzb-modules/sgzb-material/src/main/resources/mapper/material/InventoryAndWarehousingMapper.xml +++ b/sgzb-modules/sgzb-material/src/main/resources/mapper/material/InventoryAndWarehousingMapper.xml @@ -25,7 +25,7 @@ MACHINE, - + REMARKS, @@ -54,8 +54,8 @@ #{maId}, - - #{remarks}, + + #{remark}, #{maCode}, @@ -81,17 +81,8 @@ UNIT_ID, PROJECT_ID, CODE, - CREATE_DATE, - - - REMARKS - - - - REMARKS - - - + REMARKS, + CREATE_DATE VALUES @@ -110,17 +101,8 @@ #{unitId}, #{proId}, #{code}, - sysdate(), - - - #{remarks} - - - - #{remark} - - - + #{remarks}, + sysdate() @@ -262,7 +244,8 @@ mt2.type_name as typeName, mt.type_name as typeModelName, su.user_name as modelName, - pisi.CREATE_DATE as createDate + pisi.CREATE_DATE as createDate, + pisd.REMARKS as remark FROM ma_type_put_in_storage_info pisi LEFT JOIN ma_type_put_in_storage_details pisd on pisi.id = pisd.INFO LEFT JOIN bm_project_lot lot on lot.lot_id = pisi.PROJECT_ID @@ -286,4 +269,11 @@ order by pisi.CREATE_DATE desc + \ No newline at end of file From 079b106148aa10ca3be28d1bd8b7b41ce14f7a90 Mon Sep 17 00:00:00 2001 From: binbin_pan Date: Wed, 12 Jun 2024 13:49:22 +0800 Subject: [PATCH 6/7] =?UTF-8?q?fix:=20=E5=8D=8F=E8=AE=AE=E7=AE=A1=E7=90=86?= =?UTF-8?q?=EF=BC=8C=E5=B7=A5=E7=A8=8B=E6=9F=A5=E8=AF=A2=E7=9B=AE=E5=89=8D?= =?UTF-8?q?=E5=8F=AA=E8=83=BD=E4=B8=8B=E6=8B=89=E9=80=89=E6=8B=A9=EF=BC=8C?= =?UTF-8?q?=E4=B8=8D=E8=83=BD=E6=94=AF=E6=8C=81=E6=90=9C=E7=B4=A2=E9=80=89?= =?UTF-8?q?=E6=8B=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sgzb-ui/src/views/claimAndreturn/picking/protocol/index.vue | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sgzb-ui/src/views/claimAndreturn/picking/protocol/index.vue b/sgzb-ui/src/views/claimAndreturn/picking/protocol/index.vue index f72af180..a285d3c3 100644 --- a/sgzb-ui/src/views/claimAndreturn/picking/protocol/index.vue +++ b/sgzb-ui/src/views/claimAndreturn/picking/protocol/index.vue @@ -35,6 +35,7 @@ v-model="queryParams.unitId" placeholder="请选择往来单位" clearable + filterable > Date: Wed, 12 Jun 2024 14:49:59 +0800 Subject: [PATCH 7/7] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=A3=80=E9=AA=8C?= =?UTF-8?q?=E6=97=B6=E9=97=B4=E9=80=89=E6=8B=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../warehousing/Inventory/config.js | 2 +- .../warehousing/Inventory/index.vue | 29 +++++++++++++++++-- 2 files changed, 27 insertions(+), 4 deletions(-) diff --git a/sgzb-ui/src/views/warehouseManage/warehousing/Inventory/config.js b/sgzb-ui/src/views/warehouseManage/warehousing/Inventory/config.js index be132c88..fe6181ab 100644 --- a/sgzb-ui/src/views/warehouseManage/warehousing/Inventory/config.js +++ b/sgzb-ui/src/views/warehouseManage/warehousing/Inventory/config.js @@ -16,7 +16,7 @@ export const dialogConfig = { { t_width: '', t_props: 'typeName', t_label: '设备类型' }, { t_width: '', t_props: 'typeModelName', t_label: '规格型号' }, { t_width: '', t_props: 'maCode', t_label: '设备编码' }, - { t_width: '', t_props: 'num', t_label: '设备数量' }, + { t_width: '', t_props: 'num', t_label: '入库数量' }, { t_width: '', t_props: 'modelName', t_label: '入库人' }, { t_width: '', t_props: 'createDate', t_label: '入库日期' }, { t_width: '', t_props: 'remark', t_label: '备注' }, diff --git a/sgzb-ui/src/views/warehouseManage/warehousing/Inventory/index.vue b/sgzb-ui/src/views/warehouseManage/warehousing/Inventory/index.vue index 42399734..68f2f4bb 100644 --- a/sgzb-ui/src/views/warehouseManage/warehousing/Inventory/index.vue +++ b/sgzb-ui/src/views/warehouseManage/warehousing/Inventory/index.vue @@ -354,9 +354,11 @@ :picker-options="{ disabledDate(time) { if (codeForm.thisCheckTime) { - return time.getTime() < new Date(codeForm.thisCheckTime).getTime(); + let today = new Date() + today.setHours(0, 0, 0, 0) + return time.getTime() < today.getTime() || time.getTime() < new Date(codeForm.thisCheckTime).getTime() } - return false; + return false } }" /> @@ -602,6 +604,7 @@ type="date" placeholder="请输入检验时间" style="width: 170px" + @change="changeCheckTimeRow(row)" > @@ -617,6 +620,17 @@ type="date" placeholder="请输入下次检验时间" style="width: 170px" + :disabled="!row.thisCheckTime" + :picker-options="{ + disabledDate(time) { + if (row.thisCheckTime) { + let today = new Date() + today.setHours(0, 0, 0, 0) + return time.getTime() < today.getTime() || time.getTime() < new Date(row.thisCheckTime).getTime() + } + return false + } + }" > @@ -1521,12 +1535,21 @@ export default { }, // 校验检验日期 changeCheckTime() { - if (this.codeForm.thisCheckTime > this.codeForm.nextCheckTime) { + if (this.codeForm.nextCheckTime && this.codeForm.thisCheckTime > this.codeForm.nextCheckTime) { this.codeForm.nextCheckTime = '' + this.$message.warning('下次检验日期不能早于检验日期!') } else if (!this.codeForm.thisCheckTime) { this.codeForm.nextCheckTime = '' } }, + changeCheckTimeRow(row) { + if (row.nextCheckTime && row.thisCheckTime > row.nextCheckTime) { + row.nextCheckTime = '' + this.$message.warning('下次检验日期不能早于检验日期!') + } else if (!row.thisCheckTime) { + row.nextCheckTime = '' + } + }, }, }