From 9abab3ba925418c4d45f030415c081246cd4c38c Mon Sep 17 00:00:00 2001 From: guoxing <1369478551@qq.com> Date: Fri, 23 Aug 2024 17:14:22 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E5=AE=8C=E5=96=84=E6=97=A7=E4=BB=B6?= =?UTF-8?q?=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/api/storage/manufacturerconfirm.js | 2 +- yxt-as-ui/src/api/storage/oldPartsFactory.js | 13 +- .../storage/manufacturerconfirm/index.vue | 19 +- .../manufacturerconfirmAdd.vue | 510 +++--------------- .../manufacturerconfirmInfo.vue | 9 +- .../src/views/storage/oldPartsCope/index.vue | 2 +- .../storage/oldPartsCope/oldPartsCopeAdd.vue | 64 ++- .../storage/oldPartsCope/oldPartsCopeInfo.vue | 30 +- .../views/storage/oldPartsFactory/index.vue | 73 ++- .../manufacturerconfirmInfo.vue | 172 ++++++ .../oldPartsFactory/oldPartsFactoryAdd.vue | 468 ++++++++++------ .../oldPartsFactory/oldPartsFactoryInfo.vue | 10 +- .../stocktakingLoss/stocktakingLossAdd.vue | 31 +- .../stocktakingLoss/stocktakingLossInfo.vue | 17 +- .../stocktakingSurplusAdd.vue | 23 +- .../stocktakingSurplusInfo.vue | 19 +- 16 files changed, 774 insertions(+), 688 deletions(-) create mode 100644 yxt-as-ui/src/views/storage/oldPartsFactory/manufacturerconfirmInfo.vue diff --git a/yxt-as-ui/src/api/storage/manufacturerconfirm.js b/yxt-as-ui/src/api/storage/manufacturerconfirm.js index 49e0a895b6..d7864d9128 100644 --- a/yxt-as-ui/src/api/storage/manufacturerconfirm.js +++ b/yxt-as-ui/src/api/storage/manufacturerconfirm.js @@ -17,7 +17,7 @@ export default { // 获取确认结果详情 saveConfirmResult: function(data) { return request({ - url: '/as/v1/asoldpartreturnconfirm/save', + url: ' ', method: 'post', data: data, headers: { diff --git a/yxt-as-ui/src/api/storage/oldPartsFactory.js b/yxt-as-ui/src/api/storage/oldPartsFactory.js index 56ece37555..e0bd93cd04 100644 --- a/yxt-as-ui/src/api/storage/oldPartsFactory.js +++ b/yxt-as-ui/src/api/storage/oldPartsFactory.js @@ -71,7 +71,7 @@ export default { // 查询分页列表 getGoodsListPage: function(params) { return request({ - url: '/wms/apiadmin/WmsOutBill/getInventoryList', + url: '/wms/apiadmin/inventory/wmsinventory/returnFactGoodsListPage', method: 'post', data: params, headers: { @@ -92,6 +92,17 @@ export default { }) }, + // 下载待出库明细 + downloadTobeOutExcel: function(data) { + return request({ + url: '/as/v1/asoldpartreturnapply/downloadTobeOutExcel/' + data, + method: 'post', + responseType: 'blob', // 表明返回服务器返回的数据类型 + headers: { + 'Content-Type': 'application/json' + } + }) + }, diff --git a/yxt-as-ui/src/views/storage/manufacturerconfirm/index.vue b/yxt-as-ui/src/views/storage/manufacturerconfirm/index.vue index b89e56be68..8cae1408af 100644 --- a/yxt-as-ui/src/views/storage/manufacturerconfirm/index.vue +++ b/yxt-as-ui/src/views/storage/manufacturerconfirm/index.vue @@ -83,7 +83,7 @@ - + - + @@ -236,7 +236,7 @@ import ButtonBar from '@/components/ButtonBar' import Pagination from '@/components/pagination' import pageye from '@/components/pagination/pageye' - // import divAdd from './manufacturerconfirmAdd.vue' + import divAdd from './manufacturerconfirmAdd.vue' import divInfo from './manufacturerconfirmInfo.vue' import uploadImg from '@/components/uploadFile/uploadImg' export default { @@ -245,7 +245,7 @@ ButtonBar, Pagination, pageye, - // divAdd, + divAdd, divInfo, uploadImg }, @@ -483,14 +483,13 @@ toAdd() { - // this.viewState = 2 - // this.$refs['divadd'].showAdd() - - if (this.sids.length == 1) { - this.dialogVisible3 = true + // this.dialogVisible3 = true + + // this.orderInfo.mainSid = this.sids[0] - this.orderInfo.mainSid = this.sids[0] + this.viewState = 2 + this.$refs['divadd'].showAdd(this.sids[0]) } else { this.$message({ diff --git a/yxt-as-ui/src/views/storage/manufacturerconfirm/manufacturerconfirmAdd.vue b/yxt-as-ui/src/views/storage/manufacturerconfirm/manufacturerconfirmAdd.vue index abd6b45b3e..7558e085a8 100644 --- a/yxt-as-ui/src/views/storage/manufacturerconfirm/manufacturerconfirmAdd.vue +++ b/yxt-as-ui/src/views/storage/manufacturerconfirm/manufacturerconfirmAdd.vue @@ -1,29 +1,30 @@ diff --git a/yxt-as-ui/src/views/storage/oldPartsFactory/oldPartsFactoryAdd.vue b/yxt-as-ui/src/views/storage/oldPartsFactory/oldPartsFactoryAdd.vue index c4b7e33965..b4b6d11b63 100644 --- a/yxt-as-ui/src/views/storage/oldPartsFactory/oldPartsFactoryAdd.vue +++ b/yxt-as-ui/src/views/storage/oldPartsFactory/oldPartsFactoryAdd.vue @@ -8,19 +8,17 @@ 导入厂家返件明细 保存 提交 + 下载待出库旧件明细 关闭
- -
-
基础信息
-
+ - @@ -33,16 +31,17 @@ {{ formobj.deptName }} -
* 申请日期
- - 申请日期
+ + {{ formobj.createTime }} + - + + + + - - - - - - + + + + + + @@ -168,6 +173,86 @@ + + + + + + + + + + + + + + + + + + + +
+
+ + + +
+ +
+ 确认 + 关闭 +
+ + + + + + + + + + + + + + + + + + + + + +
+
+ + + +
+ +
+ 确认 + 关闭 +
+ + + +
@@ -178,6 +263,9 @@ import { getOrgSidByPath } from '@/api/Common/dictcommons' + import { + getCurrentDate + } from '@/utils/index.js' export default { components: { @@ -186,6 +274,8 @@ data() { return { dialogVisible: false, + dialogVisible2: false, + dialogVisible3: false, updateAction: process.env.VUE_APP_BASE_API + '/as/v1/asoldpartreturnapply/getExcelInfo', fileList: [], uploadSuccess: false, @@ -202,18 +292,18 @@ formobj: { "sid": "", "remarks": "", - "createBySid": window.sessionStorage.getItem('userSid'), - "createByName": window.sessionStorage.getItem('name'), - "deptSid": window.sessionStorage.getItem('defaultOrgPath').substring(window.sessionStorage - .getItem('defaultOrgPath').lastIndexOf('/') + 1), - "deptName": window.sessionStorage.getItem('defaultOrgPathName').substring(window - .sessionStorage.getItem('defaultOrgPathName').lastIndexOf('/') + 1), - "createTime": "", + "createBySid": window.sessionStorage.getItem('userSid'), + "createByName": window.sessionStorage.getItem('name'), + "deptSid": window.sessionStorage.getItem('defaultOrgPath').substring(window.sessionStorage + .getItem('defaultOrgPath').lastIndexOf('/') + 1), + "deptName": window.sessionStorage.getItem('defaultOrgPathName').substring(window + .sessionStorage.getItem('defaultOrgPathName').lastIndexOf('/') + 1), + "createTime": getCurrentDate(), "billNo": "", "filePaths": [], "useOrgSid": '', "useOrgName": '', - "orgSidPath": window.sessionStorage.getItem('orgSidPath'), + "orgSidPath": window.sessionStorage.getItem('orgSidPath'), "procDefId": "", "nodeId": "", "procInstId": "", @@ -224,24 +314,23 @@ ] }, - hideUploadBtn: false, - - // commodity商品 - commodityKey: 1, - commodityLoading: false, - commodityQuery: { + imgList: [], + dataList: [], + itemInfo: {}, + selectionList: [], + selectionList3: [], + tableLoading: false, + queryParams: { current: 1, - size: 2, + size: 10, total: 0, params: { - name: '', - inOrg: "", - outOrg: "" + "vinNo": "", + "goodsSkuCode": "", + "sourceBillNo": "", + "orgPath": "", } }, - commodityData: [], - isUpdata: false, - imgList: [], rules: { createTime: [{ required: true, @@ -267,92 +356,6 @@ }) }, methods: { - - commodityInput(value) { - this.commodityQuery.params.name = value - this.commodityLoading = true - this.commodityQuery.params.userSid = window.sessionStorage.getItem('userSid') - this.commodityQuery.params.orgPath = window.sessionStorage.getItem('defaultOrgPath') - this.commodityQuery.params.menuUrl = this.$route.path - req.getGoodsListPage(this.commodityQuery).then((response) => { - if (response.success) { - this.commodityLoading = false - this.commodityData = response.data.records - this.commodityQuery.total = response.data.total - } else { - this.serviceLoading = false - this.commodityData = [] - this.commodityQuery.total = 0 - } - }) - }, - commodityDelete(index) { - this.formobj.asOldpartreturnList.splice(index, 1) - }, - commodityCurrentChange(value, row) { - console.log("commodityCurrentChange》》》》", value) - console.log("commodityCurrentChange》》》》", row) - row.sid = '' - row.remarks = '' - row.mainSid = '' - row.manufacturerName = value.manufacturerName - row.goodsSkuName = value.goodsSpuName - row.goodsSkuCode = value.goodsSkuCode - row.goodsSkuOwnSpec = value.goodsSkuOwnSpec - row.unit = value.unit - row.needReturnCount = 0 - row.actualReturnCount = 0 - document.body.click() - }, - - // 在头部标题上添加“新增”图标 - commodityHeader(h, { - column - }) { - return h( - 'div', - [ - h('span', column.label), - h('i', { - class: 'add-btn-icon el-icon-plus', - style: 'color: red;font-size:20px', - on: { - click: this.commodityAdd // 点击执行函数 - } - }) - ] - ) - }, - commodityAdd() { - this.formobj.asOldpartreturnList.push({ - "sid": "", - "remarks": "", - "mainSid": "", - "manufacturerName": "", - "goodsSkuName": "", - "goodsSkuCode": "", - "goodsSkuOwnSpec": "", - "unit": "", - "needReturnCount": 0, - "actualReturnCount": 0 - }) - }, - - - doGoodsDel(sid) { - console.log("doGoodsDel》》》》", sid) - this.$confirm("是否确定删除此商品?", '提示', { - confirmButtonText: '确定', - cancelButtonText: '取消', - type: 'warning' - }).then(() => { - const index = this.formobj.asOldpartreturnList.findIndex((item) => item === row) - console.log("index》》》》", index) - this.formobj.asOldpartreturnList.splice(index, 1) - - }) - }, - indexMethod(index) { return Number(index) + 1 }, @@ -411,13 +414,13 @@ this.formobj = { "sid": "", "remarks": "", - "createBySid": window.sessionStorage.getItem('userSid'), - "createByName": window.sessionStorage.getItem('name'), - "deptSid": window.sessionStorage.getItem('defaultOrgPath').substring(window.sessionStorage - .getItem('defaultOrgPath').lastIndexOf('/') + 1), - "deptName": window.sessionStorage.getItem('defaultOrgPathName').substring(window - .sessionStorage.getItem('defaultOrgPathName').lastIndexOf('/') + 1), - "createTime": "", + "createBySid": window.sessionStorage.getItem('userSid'), + "createByName": window.sessionStorage.getItem('name'), + "deptSid": window.sessionStorage.getItem('defaultOrgPath').substring(window.sessionStorage + .getItem('defaultOrgPath').lastIndexOf('/') + 1), + "deptName": window.sessionStorage.getItem('defaultOrgPathName').substring(window + .sessionStorage.getItem('defaultOrgPathName').lastIndexOf('/') + 1), + "createTime": getCurrentDate(), "billNo": "", "filePaths": [], "useOrgSid": '', @@ -451,9 +454,9 @@ }) this.title = "【修改】" this.isUpdata = true - var params = { - sid: row.sid - } + // var params = { + // sid: row.sid + // } req.init(row.sid) .then(resp => { @@ -472,7 +475,31 @@ this.formobj = {} }) }, - + downLoadDetail() { + const loading = this.$loading({ + lock: true, + text: 'Loading', + spinner: 'el-icon-loading', + background: 'rgba(0, 0, 0, 0.7)' + }) + req.downloadTobeOutExcel(this.formobj.sid).then((resp) => { + loading.close() + const blob = new Blob([resp], { + type: 'application/vnd.ms-excel' + }) + const fileName = '待出库旧件明细' + '.xls' + const elink = document.createElement('a') + elink.download = fileName + elink.style.display = 'nonde' + elink.href = URL.createObjectURL(blob) + document.body.appendChild(elink) + elink.click() + URL.revokeObjectURL(elink.href) + document.body.removeChild(elink) + }).catch(() => { + loading.close() + }) + }, downLoad() { const loading = this.$loading({ lock: true, @@ -529,13 +556,154 @@ backData(value) { console.log('backData》》》》', value) console.log('imgList', this.imgList) + this.imgList = value - for (var i = 0; i < this.imgList.length; i++) { - this.formobj.filePaths.push(this.imgList[i].url) - } + for (var i = 0; i < this.imgList.length; i++) { + this.formobj.filePaths.push(this.imgList[i].url) + } - } + }, + seleGoods(row) { + this.itemInfo = row + this.queryParams = { + current: 1, + size: 10, + total: 0, + params: { + "vinNo": row.vinNo, + "goodsSkuCode": row.goodsSkuCode, + "sourceBillNo": row.sourceBillNo, + "orgPath": window.sessionStorage.getItem('defaultOrgPath'), + } + } + req.getGoodsListPage(this.queryParams).then(resp => { + if (resp.success) { + const data = resp.data + this.queryParams.total = data.total + this.dataList = data.records + this.dialogVisible2 = true + } else { + // 根据resp.code进行异常情况处理 + this.dataList = [] + this.queryParams.total = 0 + } + + }) + .catch(e => {}) + + + }, + delGoods(index) { + + this.formobj.asOldpartreturnList.splice(index, 1) + + }, + selectionLineChangeHandle(val) { + this.selectionList = val + }, + + addDialogList() { + this.dialogVisible2 = false + + if (this.selectionList.length > 0) { + + const choose = this.formobj.asOldpartreturnList.filter((item) => item == this.itemInfo) + console.log('>>>>>>>>>addDialogList', choose) + + var num = 0 + if (choose != null && choose.length > 0) { + + for (var i = 0; i < this.selectionList.length; i++) { + + var item = this.selectionList[i] + + num += Number(item.count) + } + choose[0].actualReturnCount = num + + } + + } + + }, + handleClose2() { + this.dialogVisible2 = false + }, + seleGoods3(row) { + this.queryParams = { + current: 1, + size: 10, + total: 0, + params: { + "vinNo": '', + "goodsSkuCode": '', + "sourceBillNo": '', + "orgPath": window.sessionStorage.getItem('defaultOrgPath'), + } + } + req.getGoodsListPage(this.queryParams).then(resp => { + if (resp.success) { + const data = resp.data + this.queryParams.total = data.total + this.dataList = data.records + this.dialogVisible3 = true + } else { + // 根据resp.code进行异常情况处理 + this.dataList = [] + this.queryParams.total = 0 + } + + }) + .catch(e => {}) + + + }, + selectionLineChangeHandle3(val) { + this.selectionList3 = val + }, + + addDialogList3() { + this.dialogVisible3 = false + + for (var i = 0; i < this.selectionList3.length; i++) { + + var item = this.selectionList3[i] + + this.formobj.asOldpartreturnList.push({ + "sid": '', + "remarks": '', + "mainSid": '', + "vinNo": item.vinNo, + "goodsSpuSid": item.goodsSpuSid, + "goodsSpuName": item.goodsSpuName, + "goodsSkuSid": item.goodsSkuSid, + "goodsSkuTitle": item.goodsSkuTitle, + "goodsSkuCode": item.goodsSkuCode, + "goodsSkuOwnSpec": item.goodsSkuOwnSpec, + "manufacturerSid": item.manufacturerSid, + "manufacturerName": item.manufacturerName, + "warehouseSid": item.warehouseSid, + "warehouseName": item.warehouseName, + "warehouseAreaSid": item.warehouseAreaSid, + "warehouseAreaName": item.warehouseAreaName, + "warehouseRackSid": item.warehouseRackSid, + "warehouseRackName": item.warehouseRackName, + "unit": item.unit, + "sourceBillNo": item.sourceBillNo, + "claimBillNo": '', + "isCf": "是", + "needReturnCount": item.count, + "actualReturnCount": item.count + }) + } + + + }, + handleClose3() { + this.dialogVisible3 = false + }, + } } diff --git a/yxt-as-ui/src/views/storage/oldPartsFactory/oldPartsFactoryInfo.vue b/yxt-as-ui/src/views/storage/oldPartsFactory/oldPartsFactoryInfo.vue index 4146338927..9751058799 100644 --- a/yxt-as-ui/src/views/storage/oldPartsFactory/oldPartsFactoryInfo.vue +++ b/yxt-as-ui/src/views/storage/oldPartsFactory/oldPartsFactoryInfo.vue @@ -15,7 +15,7 @@
- @@ -38,7 +38,7 @@ {{ formobj.createTime }} -