diff --git a/yxt-as-ui/src/api/storage/stocktaking.js b/yxt-as-ui/src/api/storage/stocktaking.js index 57f75391ba..f9034b1c27 100644 --- a/yxt-as-ui/src/api/storage/stocktaking.js +++ b/yxt-as-ui/src/api/storage/stocktaking.js @@ -6,7 +6,7 @@ export default { createBill: function(data) { return request({ // baseURL: "http://127.0.0.1:4523/m1/4061550-0-default", - url: '/wms/v1/wmsinventorycheckbill/createBill', + url: '/wms/v1/wmsinventorycheckbill/save', method: 'post', data: data, headers: { @@ -32,9 +32,9 @@ export default { billCreateReport: function(data) { return request({ // baseURL: "http://127.0.0.1:4523/m1/4061550-0-default", - url: '/wms/v1/wmsinventorycheckbill/billCreateReport', + url: '/wms/v1/wmsinventorycheckbill/createReport', method: 'post', - data: data, + params: data, headers: { 'Content-Type': 'application/json' } @@ -45,7 +45,7 @@ export default { billDetail: function(params) { return request({ // baseURL: "http://127.0.0.1:4523/m1/4061550-0-default", - url: '/wms/v1/wmsinventorycheckbill/billDetail', + url: '/wms/v1/wmsinventorycheckbill/detailGoodPageList', method: 'post', data: params, headers: { @@ -58,7 +58,7 @@ export default { billStocktak: function(params) { return request({ // baseURL: "http://127.0.0.1:4523/m1/4061550-0-default", - url: '/wms/v1/wmsinventorycheckbill/billStocktak', + url: '/wms/v1/wmsinventorycheckbill/detailRackPageList', method: 'post', data: params, headers: { @@ -71,7 +71,7 @@ export default { billRackCodeDetail: function(params) { return request({ // baseURL: "http://127.0.0.1:4523/m1/4061550-0-default", - url: '/wms/v1/wmsinventorycheckbill/billRackCodeDetail', + url: '/wms/v1/wmsinventorycheckbill/detailRackGoodPageList', method: 'post', data: params, headers: { diff --git a/yxt-as-ui/src/api/warehouse/goodsShelves.js b/yxt-as-ui/src/api/warehouse/goodsShelves.js index cc56eb2df0..82996b70bd 100644 --- a/yxt-as-ui/src/api/warehouse/goodsShelves.js +++ b/yxt-as-ui/src/api/warehouse/goodsShelves.js @@ -17,19 +17,34 @@ export default { // 根据仓库查询库位 getWarehouseareas: function(data) { return request({ - url: '/wms/apiadmin/base/wmswarehousearea/selectAll', - method: 'get', - params: data, - headers: { 'Content-Type': 'application/json' } + url: '/wms/apiadmin/base/wmswarehousearea/selectAll', + method: 'get', + params: data, + headers: { + 'Content-Type': 'application/json' + } + }); + }, + + + // 根据库区查询库位 + getAllTypeByAreaSid: function(data) { + return request({ + url: '/wms/apiadmin/base/wmswarehouserack/getAllTypeByAreaSid', + method: 'get', + params: data, + headers: { + 'Content-Type': 'application/json' + } }); }, // 修改是否可用状态 - updateIsEnable: function(sid,isEnable) { - return request({ - url: '/wms/apiadmin/base/wmswarehouserack/updateIsEnable/'+sid+"/"+isEnable - }); + updateIsEnable: function(sid, isEnable) { + return request({ + url: '/wms/apiadmin/base/wmswarehouserack/updateIsEnable/' + sid + "/" + isEnable + }); }, diff --git a/yxt-as-ui/src/views/storage/stocktaking/index.vue b/yxt-as-ui/src/views/storage/stocktaking/index.vue index 29bb6ed824..53620a32d4 100644 --- a/yxt-as-ui/src/views/storage/stocktaking/index.vue +++ b/yxt-as-ui/src/views/storage/stocktaking/index.vue @@ -23,15 +23,15 @@ format="yyyy-MM-dd" value-format="yyyy-MM-dd" style="width: 200px;" /> - - + + - +
@@ -54,42 +54,42 @@ - + - - + + - - + + - - + + - - + + - - + + - - + + - - + + @@ -126,14 +126,15 @@
* 监盘人
- - - + + + +
@@ -171,7 +172,7 @@ getCurrentDate } from '@/utils/index.js' import { - selFianceByOrgSidPath + selAllByOrgSidPath } from '@/api/Common/dictcommons' export default { @@ -232,14 +233,14 @@ "billNo": "", "createStartTime": "", "createEndTime": "", - "stocktakType": "", + "checkState": "", "createByName": "", - "finance": "" + "superviseName": "" } }, sids: [], selectionList: [], - stocktakTypeList: [{ + checkStateList: [{ sid: '1', name: '未完成' }, @@ -251,14 +252,18 @@ formobj: { createByName: window.sessionStorage.getItem('name'), createBySid: window.sessionStorage.getItem('userSid'), + deptSid: window.sessionStorage.getItem('defaultOrgPath').substring(window.sessionStorage + .getItem('defaultOrgPath').lastIndexOf('/') + 1), + deptName: window.sessionStorage.getItem('defaultOrgPathName').substring(window + .sessionStorage.getItem('defaultOrgPathName').lastIndexOf('/') + 1), createDate: getCurrentDate(), - financeSid: [], - finances: [], + superviseName: '', + superviseSid: '', remarks: "" }, financeList: [], rules: { - financeSid: [{ + superviseName: [{ required: true, message: '监盘人不能为空', trigger: 'change' @@ -272,13 +277,17 @@ created() { this.loadList() - selFianceByOrgSidPath({ - orgPath: window.sessionStorage.getItem('defaultOrgPath') + selAllByOrgSidPath({ + orgSidPath: window.sessionStorage.getItem('defaultOrgPath') }).then((res) => { if (res.success) { this.financeList = res.data + + console.log("aaaaaa", this.financeList); + } }) + }, methods: { selectFinance(val) { @@ -287,20 +296,25 @@ const choose = this.financeList.filter((item) => val.includes(item.sid)) console.log('>>>>>>>>>selectFinance', choose) + this.formobj.superviseName = choose[0].name + this.formobj.superviseSid = choose[0].sid - this.formobj.finances = [] - for (var i = 0; i < choose.length; i++) { + // this.formobj.finances = [] + // for (var i = 0; i < choose.length; i++) { - this.formobj.finances.push({ - name: choose[i].name, - sid: choose[i].sid - }) + // this.formobj.finances.push({ + // name: choose[i].name, + // sid: choose[i].sid + // }) - } + // } }, handleClose() { this.dialogVisible = false + this.formobj.superviseName = '' + this.formobj.superviseSid = '' + this.formobj.remarks = '' }, saveExamine() { @@ -319,9 +333,13 @@ this.formobj = { createByName: window.sessionStorage.getItem('name'), createBySid: window.sessionStorage.getItem('userSid'), + deptSid: window.sessionStorage.getItem('defaultOrgPath').substring(window.sessionStorage + .getItem('defaultOrgPath').lastIndexOf('/') + 1), + deptName: window.sessionStorage.getItem('defaultOrgPathName').substring(window + .sessionStorage.getItem('defaultOrgPathName').lastIndexOf('/') + 1), createDate: getCurrentDate(), - financeSid: [], - finances: [], + superviseName: '', + superviseSid: '', remarks: "" } this.loadList() @@ -360,6 +378,9 @@ }, loadList() { this.tableLoading = true + this.queryParams.params.userSid = window.sessionStorage.getItem('userSid') + this.queryParams.params.orgPath = window.sessionStorage.getItem('defaultOrgPath') + this.queryParams.params.menuUrl = this.$route.path req.listPage(this.queryParams).then((resp) => { this.tableLoading = false if (resp.success) { @@ -407,9 +428,9 @@ "billNo": "", "createStartTime": "", "createEndTime": "", - "stocktakType": "", + "checkState": "", "createByName": "", - "finance": "" + "superviseName": "" } } this.loadList() @@ -418,10 +439,11 @@ // this.viewState = 2 // this.$refs['divadd'].showAdd() + + this.dialogVisible = true this.$nextTick(() => { this.$refs['form_obj'].clearValidate() }) - this.dialogVisible = true }, selectionLineChangeHandle(val) { console.log('val', val) @@ -437,7 +459,7 @@ console.log('toDetail', row) this.viewState = 5 - this.$refs['divinfo'].loadList(row.sid) + this.$refs['divinfo'].showDetail(row.sid) }, toShowBill() { @@ -451,10 +473,10 @@ } this.viewState = 2 - this.$refs['divstocktak'].loadList(this.selectionList[0].sid) + this.$refs['divstocktak'].showDetail(this.selectionList[0].sid) }, toStocktak() { - if (this.selectionList.length == 0) { + if (this.selectionList.length != 1) { this.$message({ type: 'warning', message: '请选择一条数据。', @@ -463,19 +485,20 @@ return } - for (var i = this.selectionList.length - 1; i >= 0; i--) { - if (this.selectionList[i].isReport == '1') { - this.$message({ - type: 'warning', - message: '所选记录已生成报告,不可重复生成。', - showClose: true - }) - return - } + if (this.selectionList[0].state == '0') { + this.$message({ + type: 'warning', + message: '所选记录已生成报告,不可重复生成。', + showClose: true + }) + return + } + var params = { + sid: this.selectionList[0].sid } - req.billCreateReport(this.sids).then((resp) => { + req.billCreateReport(params).then((resp) => { if (resp.success) { this.$message({ type: 'success', diff --git a/yxt-as-ui/src/views/storage/stocktaking/stocktakingInfo.vue b/yxt-as-ui/src/views/storage/stocktaking/stocktakingInfo.vue index b74708dfa8..7c4429543e 100644 --- a/yxt-as-ui/src/views/storage/stocktaking/stocktakingInfo.vue +++ b/yxt-as-ui/src/views/storage/stocktaking/stocktakingInfo.vue @@ -10,22 +10,34 @@