From 68b805ef2cba76fc5b0c2412e972f3e359694c7c Mon Sep 17 00:00:00 2001 From: wangwei <1610949092@qq.com> Date: Fri, 16 Aug 2024 14:13:49 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=201.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../basic/collectPoint/gatherOrderType.vue | 12 +- src/views/basic/workplace/workplaceManage.vue | 231 +++++++++--------- 2 files changed, 129 insertions(+), 114 deletions(-) diff --git a/src/views/basic/collectPoint/gatherOrderType.vue b/src/views/basic/collectPoint/gatherOrderType.vue index 37dd720f..7607ba2b 100644 --- a/src/views/basic/collectPoint/gatherOrderType.vue +++ b/src/views/basic/collectPoint/gatherOrderType.vue @@ -79,6 +79,7 @@ @@ -185,6 +186,7 @@ export default { }, addCollectionPointsDialogVisible: false, formData: {}, + code: '', total: 0, busTypes: [], formRules: { @@ -241,9 +243,14 @@ export default { this.getList() }, addCollectionPoints() { - this.formData = {} this.fromName = 'add' - this.addCollectionPointsDialogVisible = true + genCode().then(res => { + if (res.code == 20000){ + this.code = res.data + this.formData.code = res.data + this.addCollectionPointsDialogVisible = true + } + }) }, getList() { this.loading = true @@ -333,6 +340,7 @@ export default { created() { this.getList() this.getBusType() + } } diff --git a/src/views/basic/workplace/workplaceManage.vue b/src/views/basic/workplace/workplaceManage.vue index 567e172b..8d9f3100 100644 --- a/src/views/basic/workplace/workplaceManage.vue +++ b/src/views/basic/workplace/workplaceManage.vue @@ -67,97 +67,96 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - 显示/隐藏搜索栏 - 重置 - 查询 - 新增工位 - -
- - - - - - - - - - - - - - - - - - - - - - - + + -
+ -
{{workplaceName}}-用户列表
+
{{ workplaceName }}-用户列表
- + @@ -284,7 +283,7 @@ - + @@ -385,14 +384,14 @@ - - - - - + + + + + @@ -515,7 +514,9 @@ export default { 'add': '新增工位', 'edit': '编辑工位' }, - formData: {}, + formData: { + operationType: 1 + }, workplaceCode: '6001', unitStorageList: [], invList: [], @@ -536,6 +537,9 @@ export default { ], invCode: [ { required: true, message: '请选择仓库', trigger: 'blur' } + ], + constituencies: [ + { required: true, message: '请选择所属组别', trigger: 'blur' } ] }, invQuery: { @@ -580,16 +584,14 @@ export default { workplaceName: '用户' } }, - computed: { - - }, + computed: {}, methods: { hideSearch() { this.showSearch = !this.showSearch }, onSubmit() { this.userList = [] - this.rowData.workplaceName = "工位" + this.rowData.workplaceName = '工位' this.query.page = 1 this.getList() }, @@ -618,9 +620,14 @@ export default { if (res.code == 20000) { if (res.data == null) { this.formData.workplaceId = this.workplaceCode + 1001 + this.formData.operationType = 1 + this.formData.checkInsert = 2 this.addWorkplaceDialogVisible = true } else { - this.formData = {} + this.formData = { + operationType: 1, + checkInsert: 2 + } this.formData.workplaceId = res.data this.addWorkplaceDialogVisible = true } @@ -660,12 +667,12 @@ export default { this.$message.error('请完善必填信息') } else { addWorkplace(this.formData).then(res => { - console.log("res",res) + console.log('res', res) if (res.code != 20000) { return this.$message.error('新增错误') } this.addWorkplaceDialogVisible = false - this.$message.success("新增成功") + this.$message.success('新增成功') // this.query.code = this.groupData.code // if (this.query.code == 1001) { // this.query.code = null @@ -883,19 +890,19 @@ export default { }) }, forInvSubmit() { - if (this.formName === 'edit'){ + if (this.formName === 'edit') { updateTree(this.subData).then(res => { - if (res.code == 20000){ + if (res.code == 20000) { this.subFormVisible = false this.getLstTree() this.$message.success('成功') - }else { + } else { this.$message.error(res.message) } }).catch(() => { }) - }else { + } else { addTree(this.subData).then(res => { if (res.code == 20000) { this.subFormVisible = false