From f1a69fd251de3462f1492fd103ebb397b56c76ad Mon Sep 17 00:00:00 2001 From: fengdong777 <1478994744@qq.com> Date: Thu, 31 Aug 2023 18:03:24 +0800 Subject: [PATCH] 8.31 --- .../src/views/organizational/zzgl.vue | 2 +- .../component/initial_value/location.vue | 56 ++++++++++------- .../views/component/initial_value/product.vue | 61 +++++++++---------- .../component/initial_value/supplier.vue | 50 +++++++-------- .../views/component/instorehouse/putIn.vue | 18 +++++- .../add/outListAdd.vue | 32 ++++++---- 6 files changed, 127 insertions(+), 92 deletions(-) diff --git a/supervise-organizational-ui/src/views/organizational/zzgl.vue b/supervise-organizational-ui/src/views/organizational/zzgl.vue index cb060596..3646e10f 100644 --- a/supervise-organizational-ui/src/views/organizational/zzgl.vue +++ b/supervise-organizational-ui/src/views/organizational/zzgl.vue @@ -414,7 +414,7 @@ export default { // console.log(this.$store.getters); // var datas = sessionStorage.getItem('userSid'); this.isshow = 'table' - // this.page.params.organizationSid = datas + // this.page.params.organizationSid = datasb this.page.params.psid = data.sid || 0 this.getPageList(this.page) diff --git a/warehousing-system/project_web_ui/src/views/component/initial_value/location.vue b/warehousing-system/project_web_ui/src/views/component/initial_value/location.vue index b6c87f2f..e746b9e9 100644 --- a/warehousing-system/project_web_ui/src/views/component/initial_value/location.vue +++ b/warehousing-system/project_web_ui/src/views/component/initial_value/location.vue @@ -8,7 +8,7 @@ -
- @@ -94,9 +93,12 @@ export default { btndisabled: false, isSearchShow: false, queryInfo: { - query: '', - pageNum: 1, - pageSize: 10 + total: 0, + size: 10, + current: 1, + params: { + name:'' + }, }, total: 0, locationList: [], @@ -162,26 +164,31 @@ export default { } }, dosearch() { - this.queryInfo.pageNum = 1 - this.total=0 this.getLocationList() }, resetQuery() { - this.queryInfo.query = '' + this.queryInfo={ + total: 0, + size: 10, + current: 1, + params: { + name:'' + }, + }, this.dosearch() }, async getLocationList () { - const { data: result } = await this.$http.get('/location/list', { params: this.queryInfo }) - if (result.status !== 200) return this.$message.error('获取列表失败') - - this.total = result.data.total - this.locationList = result.data.rows + const { data: result } = await this.$http.post('/location/list', this.queryInfo) + if (result.code == 200){ + this.queryInfo.total = result.data.total + this.locationList = result.data.records + } }, closeLocationDialog () { this.$refs.locationRuleForm.resetFields() }, indexMethod(index) { - var pagestart = (this.queryInfo.pageNum - 1) * this.queryInfo.pageSize; + var pagestart = (this.queryInfo.current - 1) * this.queryInfo.size; var pageindex = index + 1 + pagestart; return pageindex; }, @@ -210,10 +217,13 @@ export default { type: 'warning' }).catch(error => error) if (result !== 'confirm') return this.$message.info('用户取消操作') - const { data: resultDB } = await this.$http.delete(`/location/delete/${location.locationId}`) - if (resultDB.status !== 200) return this.$message.error('删除库位失败') - this.getLocationList() - this.$message.success('库位删除成功') + const { data: resultDB } = await this.$http.delete(`location/deleteById/${location.id}`) + if (resultDB.code == 200){ + this.getLocationList() + this.$message.success('库位删除成功') + }else{ + this.$message.error('删除库位失败') + } }, async getStorehouse () { const { data: result } = await this.$http.get('/location/getStorehouse') diff --git a/warehousing-system/project_web_ui/src/views/component/initial_value/product.vue b/warehousing-system/project_web_ui/src/views/component/initial_value/product.vue index f1740eab..b911755d 100644 --- a/warehousing-system/project_web_ui/src/views/component/initial_value/product.vue +++ b/warehousing-system/project_web_ui/src/views/component/initial_value/product.vue @@ -8,7 +8,7 @@
-
- +
@@ -122,9 +122,12 @@ export default { btndisabled: false, isSearchShow: false, queryInfo: { - query: '', - pageNum: 1, - pageSize: 10, + total: 0, + size: 10, + current: 1, + params: { + name:'' + }, }, total: 0, productList: [], @@ -212,34 +215,30 @@ export default { } }, indexMethod(index) { - var pagestart = (this.queryInfo.pageNum - 1) * this.queryInfo.pageSize; + var pagestart = (this.queryInfo.current - 1) * this.queryInfo.size; var pageindex = index + 1 + pagestart; return pageindex; }, dosearch() { - this.queryInfo.pageNum = 1 - this.total =0 this.getProductList() }, resetQuery() { - this.queryInfo.query = '' + this.queryInfo={ + total: 0, + size: 10, + current: 1, + params: { + name:'' + }, + }, this.dosearch() }, async getProductList () { - const { data: result } = await this.$http.get('/product/list', { params: this.queryInfo }) - if (result.status !== 200) return this.$message.error('获取列表失败') - - this.total = result.data.total - this.productList = result.data.rows - }, - - handleSizeChange (val) { - this.queryInfo.pageSize = val - this.getProductList() - }, - handleCurrentChange (val) { - this.queryInfo.pageNum = val - this.getProductList() + const { data: result } = await this.$http.post('/product/list',this.queryInfo) + if (result.code == 200){ + this.queryInfo.total = result.data.total + this.productList = result.data.records + } }, open (row) { this.viewState = 3 diff --git a/warehousing-system/project_web_ui/src/views/component/initial_value/supplier.vue b/warehousing-system/project_web_ui/src/views/component/initial_value/supplier.vue index 92784a77..96c19ed2 100644 --- a/warehousing-system/project_web_ui/src/views/component/initial_value/supplier.vue +++ b/warehousing-system/project_web_ui/src/views/component/initial_value/supplier.vue @@ -8,7 +8,7 @@ - + @@ -96,9 +95,12 @@ export default { btndisabled: false, isSearchShow: false, queryInfo: { - query: '', - pageNum: 1, - pageSize: 10 + total: 0, + size: 10, + current: 1, + params: { + name:'' + }, }, total: 0, supplierList: [], @@ -158,32 +160,30 @@ export default { } }, dosearch() { - this.queryInfo.pageNum = 1 this.getSupplierList() }, resetQuery() { - this.queryInfo.query = '' + this.queryInfo={ + total: 0, + size: 10, + current: 1, + params: { + name:'' + }, + }, this.dosearch() }, - handleSizeChange (val) { - this.queryInfo.pageSize = val - this.getSupplierList() - }, - handleCurrentChange (val) { - this.queryInfo.pageNum = val - this.getSupplierList() - }, indexMethod(index) { - var pagestart = (this.queryInfo.pageNum - 1) * this.queryInfo.pageSize; + var pagestart = (this.queryInfo.current - 1) * this.queryInfo.size; var pageindex = index + 1 + pagestart; return pageindex; }, async getSupplierList () { - const { data: result } = await this.$http.get('/supplier/list', { params: this.queryInfo }) - if (result.status !== 200) return this.$message.error('获取列表失败') - - this.total = result.data.total - this.supplierList = result.data.rows + const { data: result } = await this.$http.post('/supplier/list', this.queryInfo) + if (result.code == 200){ + this.queryInfo.total = result.data.total + this.supplierList = result.data.records + } }, updataSupplierdialog (row) { this.viewState = 3 diff --git a/warehousing-system/project_web_ui/src/views/component/instorehouse/putIn.vue b/warehousing-system/project_web_ui/src/views/component/instorehouse/putIn.vue index d37edf42..b8de42b4 100644 --- a/warehousing-system/project_web_ui/src/views/component/instorehouse/putIn.vue +++ b/warehousing-system/project_web_ui/src/views/component/instorehouse/putIn.vue @@ -148,7 +148,22 @@ export default { this.dingdanId = result.data; this.huoweiId = datas.data; }, - + clearList(){ + this.inStorehouse={ + inStorehouseId: "", + receivingId: "", + locationId: "", + locationNumber: "", + remarks: "", + no:'', + storeHouseSid:"", + storeHouseName:"", + createPerson: "", + checkPerson: "", + status: "", + locationName:'' + } + }, addInStorehouse() { this.$refs.onPutInRuleForm.validate(async (validate) => { if (!validate) return this.$message.error("请输入必填项"); @@ -169,6 +184,7 @@ export default { ); if (result.code == 200){ this.$message.success('操作成功') + this.clearList() this.getOptions(); this.$refs.onPutInRuleForm.resetFields(); return ; diff --git a/warehousing-system/project_web_ui/src/views/component/outStorehouseManagement/add/outListAdd.vue b/warehousing-system/project_web_ui/src/views/component/outStorehouseManagement/add/outListAdd.vue index 0b2f8aa1..d4048d06 100644 --- a/warehousing-system/project_web_ui/src/views/component/outStorehouseManagement/add/outListAdd.vue +++ b/warehousing-system/project_web_ui/src/views/component/outStorehouseManagement/add/outListAdd.vue @@ -212,8 +212,9 @@ custerName:'', custerSid:'', list:[], - outDate:"" + // outDate:"" }, + zhiwuName:"", huoweiId:[], supplierList: [], storehouseList: [], @@ -235,9 +236,9 @@ storeHouseSid: [ { required: true, message: '请选择出库仓库', trigger: 'blur' } ], - outDate: [ - { required: true, message: '请选择出库日期', trigger: 'blur' } - ] + // outDate: [ + // { required: true, message: '请选择出库日期', trigger: 'blur' } + // ] }, f1Value:{ proSid:'' @@ -275,13 +276,12 @@ this.huoweiId = datas.data; }, selectPro(row){ - console.log(row); + this.zhiwuName=row.proSid this.productList.forEach((e) => { if(e.barCode==row.proSid){ row.proName=e.name } }); - console.log(row); }, handleReturn(isreload) { if (isreload === "true") this.$emit("reloadlist"); @@ -346,13 +346,23 @@ this.$refs.dataForm.validate(async validate => { if (!validate) return this.$message.error('请填写必填项') // this.purchaseForm.status = '待审核' + if(this.zhiwuName){ const { data: result } = await this.$http.post('/output/addOutStorehouse', this.purchaseForm) - if (result.code == 200) { - this.$message({ type: 'success', message: result.msg, showClose: true }) - this.handleReturn('true') - this.clearList() + if (result.code == 200) { + this.$message({ type: 'success', message: result.msg, showClose: true }) + this.handleReturn('true') + this.clearList() + }else if(result.code == 500){ + this.$message.error(result.msg) + } + }else{ + this.$message({ + message: '请添加质物信息', + type: 'warning' + }); } - }) + + }) }, async getSupplierList () { const { data: result } = await this.$http.get('/purchase/getSupplier')