diff --git a/src/api/basic/collectPoint/collectPointManage.js b/src/api/basic/collectPoint/collectPointManage.js index 5fba5d72..783ff57f 100644 --- a/src/api/basic/collectPoint/collectPointManage.js +++ b/src/api/basic/collectPoint/collectPointManage.js @@ -67,6 +67,15 @@ export function addTree(query) { } +export function updateTree(query) { + return axios({ + url: "udiwms/basic/collectPoint/category/updateTree", + method: "post", + data: query + }); +} + + export function deleteTree(query) { return axios({ url: "udiwms/basic/collectPoint/category/deleteTree", diff --git a/src/views/basic/collectPoint/selectWorkplace.vue b/src/views/basic/collectPoint/selectWorkplace.vue index c850dd0f..dd8961c6 100644 --- a/src/views/basic/collectPoint/selectWorkplace.vue +++ b/src/views/basic/collectPoint/selectWorkplace.vue @@ -54,7 +54,7 @@ {{operationTypes[scope.row.operationType]}} - + @@ -73,12 +73,204 @@ 详情 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -125,6 +317,7 @@ export default { list: [], treeList: [], addWorkplaceDialogVisible: false, + WorkplaceDialogVisible: false, fromName: 'add', fromMap: { 'add': '新增工位', @@ -150,9 +343,9 @@ export default { users: [], busTypes: [], operationTypes: { - 1: '扫码生成业务单(必须插入)', - 2: '按单校验三期(是否插入可选)', - 3: '按单不校验三期(是否插入可选)' + 1: '扫码生成业务单', + 2: '按单校验三期', + 3: '按单不校验三期' }, checkInserts: { 1: '不插入', @@ -378,6 +571,10 @@ export default { this.$message.error(res.message) } }) + }, + checkDetail(row){ + this.formData = row + this.WorkplaceDialogVisible = true } }, created() { diff --git a/src/views/basic/collectPoint/userWorkplace.vue b/src/views/basic/collectPoint/userWorkplace.vue index c5bbfa89..509a8d7b 100644 --- a/src/views/basic/collectPoint/userWorkplace.vue +++ b/src/views/basic/collectPoint/userWorkplace.vue @@ -56,7 +56,13 @@ - + + @@ -65,7 +71,7 @@ @@ -102,7 +108,7 @@ {{ operationTypes[scope.row.operationType] }} - + @@ -134,6 +140,13 @@ + + @@ -191,9 +204,9 @@ - - - + + + @@ -340,14 +353,22 @@ export default { employeeName: '用户' }, userQuery: { - invCode: this.$store.getters.locInvCode + page: 1, + limit: 10, + invCode: this.$store.getters.locInvCode, + key: '' + }, + workQuery: { + page: 1, + limit: 10, + userId: '', + workKey: '' }, - workQuery: {}, selectUserWorkDialogVisible: false, operationTypes: { - 1: '扫码生成业务单(必须插入)', - 2: '按单校验三期(是否插入可选)', - 3: '按单不校验三期(是否插入可选)' + 1: '扫码生成业务单', + 2: '按单校验三期', + 3: '按单不校验三期' }, checkInserts: { 1: '不插入', @@ -360,7 +381,8 @@ export default { userId: '', addWorkplaceDialogVisible: false, formData: null, - + userTotal: 0, + workTotal: 0, } }, methods: { @@ -372,32 +394,35 @@ export default { path: '' }) this.userQuery = { + page: 1, + limit: 10, + key: '', invCode: this.$store.getters.locInvCode } this.getUsers() }, onSubmit() { - this.query.page = 1 + this.userQuery.page = 1 this.getUsers() }, onUserReset() { - this.workQuery = {} - let query = { - userId: this.rowData.id + this.workQuery = { + page: 1, + limit: 10, + userId: this.rowData.id, + workKey: '' } - this.getUserBindWork(query) + this.getUserBindWork(this.workQuery) }, loadWorkList() { - let query = { - userId: this.rowData.id, - workKey:this.workQuery.key - } - this.getUserBindWork(query) + this.workQuery.userId = this.rowData.id + this.getUserBindWork(this.workQuery) }, getUsers() { getUsers(this.userQuery).then(res => { if (res.code == 20000) { - this.userList = res.data || [] + this.userList = res.data.list || [] + this.userTotal = res.data.total } else { this.$message.error('获取错误') } @@ -405,15 +430,14 @@ export default { }, handCurrentChange(row) { this.rowData = row - let query = { - userId: row.id - } - this.getUserBindWork(query) + this.workQuery.userId = row.id + this.getUserBindWork(this.workQuery) }, getUserBindWork(query){ getUserBindWork(query).then(res => { if (res.code == 20000) { - this.workList = res.data || [] + this.workList = res.data.list || [] + this.workTotal= res.data.total || 0 } else { this.$message.error('获取失败') } @@ -427,16 +451,8 @@ export default { this.selectUserWorkDialogVisible = true }, closeDialog() { - let query = { - userId: this.userId - } - getUserBindWork(query).then(res => { - if (res.code == 20000) { - this.workList = res.data || [] - } else { - this.$message.error('获取失败') - } - }) + this.workQuery.userId = this.rowData.id + this.getUserBindWork(this.workQuery) this.selectUserWorkDialogVisible = false }, remove(row) { diff --git a/src/views/basic/workplace/workplaceManage.vue b/src/views/basic/workplace/workplaceManage.vue index 346d30c2..5b470c9d 100644 --- a/src/views/basic/workplace/workplaceManage.vue +++ b/src/views/basic/workplace/workplaceManage.vue @@ -21,7 +21,8 @@ size="mini" style="margin-left: 10px" v-if="data.parentCode == null" - @click="() => append(data,'add')"> + @click="() => append(data,'add')" + > 新增 + @click="() => append(data, 'edit')" + > 编辑 + @click="delTree(data)" + > 删除 @@ -46,174 +49,194 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + -
- - 显示/隐藏搜索栏 - 重置 - 查询 - 新增工位 - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
- 重置 - - 查询 - + 显示/隐藏搜索栏 + 重置 + 查询 + 新增工位 - - +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + 重置 + + 查询 + + + + + + + + + + + + + + + + +
+ - - - + + +
@@ -331,23 +354,23 @@ - - - - - {{ item.label }} - - - - + + + + + + + + + + + + + + + + + @@ -391,7 +414,7 @@ width="60%" top="5vh" > - + @@ -404,7 +427,8 @@ v-for="item in fromDeptOptions" :key="item.parentCode" :label="item.parentName" - :value="item.parentCode"> + :value="item.parentCode" + > {{ item.parentName }} @@ -454,10 +478,10 @@ import { addWorkplace, updateWorkplace, deleteWorkplace, - createWorkplaceId, printWorkLabel,getUsers + createWorkplaceId, printWorkLabel, getUsers } from '@/api/basic/sysWorkplaceManage' import { getInvListByUser } from '@/api/system/invWarehouse' -import { addTree, deleteTree, getTree } from '@/api/basic/collectPoint/collectPointManage' +import { addTree, deleteTree, getTree, updateTree } from '@/api/basic/collectPoint/collectPointManage' import { getCollectBusType } from '@/api/basic/collectPoint/gatherOrderType' import panelGroup from '@/views/dashboard/PanelGroup' import { delUserBindWork, getUserBindWork } from '@/api/basic/collectPoint/userWorkplace' @@ -468,14 +492,20 @@ export default { query: { invCode: this.$store.getters.locInvCode, page: 1, - limit: 20, + limit: 10, code: null }, showSearch: true, Dictionary: true, loading: false, list: [], - treeList: [], + treeList: [ + { + code: 1001, + parentCode: null, + label: '全部' + } + ], addWorkplaceDialogVisible: false, fromName: 'add', fromMap: { @@ -511,29 +541,37 @@ export default { users: [], busTypes: [], operationTypes: { - 1: '扫码生成业务单(必须插入)', - 2: '按单校验三期(是否插入可选)', - 3: '按单不校验三期(是否插入可选)' + 1: '扫码生成业务单', + 2: '按单校验三期', + 3: '按单不校验三期' }, checkInserts: { 1: '不插入', - 2: '插入', + 2: '插入' }, warnTypeMap: { 1: '信息提醒', - 2: '禁止录入', + 2: '禁止录入' }, userList: [], userLoading: false, rowData: null, - userQuery: {}, + userQuery: { + page: 1, + limit: 10, + userKey: null, + workplaceId: null + }, formName: 'add', formMap: { - add: "新增", - edit: "编辑" + add: '新增', + edit: '编辑' }, subFormVisible: false, subData: {}, + groupData: null, + total: 0, + userTotal: 0 } }, methods: { @@ -560,6 +598,7 @@ export default { return this.$message.error('错误错误') } this.list = res.data.list || [] + this.total = res.data.total || 0 }) }, addWorkplace() { @@ -603,6 +642,7 @@ export default { }) }, formSubmit() { + this.formData.constituencies = this.groupData.code if (this.fromName == 'add') { this.$refs['dataForm'].validate((valid) => { if (!valid) { @@ -614,6 +654,10 @@ export default { } this.addWorkplaceDialogVisible = false this.$message.success(res.data) + this.query.code = this.groupData.code + if (this.query.code == 1001) { + this.query.code = null + } this.getList() }).catch(() => { this.addWorkplaceDialogVisible = false @@ -694,14 +738,18 @@ export default { this.loading = false }) }, - getLstTree(){ + getLstTree() { getTree(this.query) .then((response) => { - var invlist = response.data || []; - this.treeList = this.handleTree(invlist, "code", "parentCode"); + var invlist = response.data || [] + if (invlist.length == 0) { + this.treeList = this.handleTree(this.treeList, 'code', 'parentCode') + } else { + this.treeList = this.handleTree(invlist, 'code', 'parentCode') + } }) .catch(() => { - }); + }) }, getBusType() { let query = { @@ -727,31 +775,29 @@ export default { .catch(() => { }) }, - handCurrentChange(row){ + handCurrentChange(row) { this.rowData = row - let query = { - workplaceId: row.workplaceId - } - this.getUserBindWork(query) + this.userQuery.workplaceId = row.workplaceId + this.getUserBindWork(this.userQuery) }, - loadUserList(){ - let query = { - workplaceId: this.rowData.workplaceId, - userKey : this.userQuery.key - } - this.getUserBindWork(query) + loadUserList() { + this.userQuery.workplaceId = this.rowData.workplaceId + this.getUserBindWork(this.userQuery) }, - onUserReset(){ - this.userQuery = {} - let query = { - workplaceId: this.rowData.workplaceId, + onUserReset() { + this.userQuery = { + page: 1, + limit: 10, + userKey: null, + workplaceId: this.rowData.workplaceId } - this.getUserBindWork(query) + this.getUserBindWork(this.userQuery) }, - getUserBindWork(query){ + getUserBindWork(query) { getUserBindWork(query).then(res => { if (res.code == 20000) { - this.userList = res.data || [] + this.userList = res.data.list || [] + this.userTotal = res.data.total || 0 } else { this.$message.error('获取失败') } @@ -764,16 +810,14 @@ export default { type: 'warning' }).then(() => { let query = { - id : row.id + id: row.id } delUserBindWork(query).then(res => { if (res.code == 20000) { - let query = { - workplaceId: this.rowData.workplaceId - } - this.getUserBindWork(query) + this.userQuery.workplaceId = this.rowData.workplaceId + this.getUserBindWork(this.userQuery) this.$message.success('移除成功') - }else { + } else { this.$message.error(res.message) } }) @@ -781,51 +825,69 @@ export default { }) }, - handleNodeClick(row){ + handleNodeClick(row) { + this.groupData = row this.query.code = row.code - if (this.query.code == 1001){ + if (this.query.code == 1001) { this.query.code = null } this.getList() }, append(data, formName) {//新增 编辑 - this.formName = formName; - if (formName === "edit") { - this.subData = JSON.parse(JSON.stringify(data)); - this.subData.name = JSON.parse(JSON.stringify(data.label)); - } else if (formName === "add") { + this.formName = formName + if (formName === 'edit') { + this.subData = JSON.parse(JSON.stringify(data)) + this.subData.name = JSON.parse(JSON.stringify(data.label)) + } else if (formName === 'add') { this.subData = { parentCode: JSON.parse(JSON.stringify(data)).code - }; + } let parentData = { parentCode: JSON.parse(JSON.stringify(data)).code, parentName: JSON.parse(JSON.stringify(data.label)) } this.fromDeptOptions.push(parentData) } - this.subFormVisible = true; + this.subFormVisible = true }, - delTree(row){ + delTree(row) { deleteTree(row).then(res => { - if (res.code == 20000){ - this.$message.success("删除成功") - this.getLstTree() - }else { - this.$message.error("删除失败") - } - }) - }, - forInvSubmit(){ - addTree(this.subData).then(res => { - if (res.code == 20000){ - this.subFormVisible = false + if (res.code == 20000) { + this.$message.success('删除成功') this.getLstTree() - this.$message.success("成功") - }else { - this.$message.error(res.message) + } else { + this.$message.error('删除失败') } }) }, + forInvSubmit() { + if (this.formName === 'edit'){ + updateTree(this.subData).then(res => { + if (res.code == 20000){ + this.subFormVisible = false + this.getLstTree() + this.$message.success('成功') + }else { + this.$message.error(res.message) + } + }).catch(() => { + + }) + }else { + addTree(this.subData).then(res => { + if (res.code == 20000) { + this.subFormVisible = false + this.getLstTree() + this.$message.success('成功') + } else { + this.$message.error(res.message) + } + }).catch(() => { + + }) + } + + } }, created() { this.getList() diff --git a/src/views/collect/DealOrder.vue b/src/views/collect/DealOrder.vue index 73bdd675..d4e99bda 100644 --- a/src/views/collect/DealOrder.vue +++ b/src/views/collect/DealOrder.vue @@ -127,7 +127,7 @@ { _this.preLoading = false diff --git a/src/views/collect/selectCollectOrderDialog.vue b/src/views/collect/selectCollectOrderDialog.vue index e0f0f352..a3a8b1b9 100644 --- a/src/views/collect/selectCollectOrderDialog.vue +++ b/src/views/collect/selectCollectOrderDialog.vue @@ -234,6 +234,7 @@ import {convertDate} from "@/utils/date"; import {page as prescribePage} from "@/api/basic/sicker/prescribeApi"; import prescribeDownloadDialog from "@/views/collect/prescribe/prescribeDownloadDialog"; import prescribeOriginPanel from "./PannelOrderBiz"; +import {orderPage} from "@/api/collect/collectOrder"; export default { name: "selectPrescribeDialog", @@ -324,7 +325,7 @@ export default { getList() { this.loading = true; - prescribePage(this.filterQuery).then(res => { + orderPage(this.filterQuery).then(res => { this.loading = false this.list = res.data.list || [] this.total = res.data.total || 0