From 2729a1783eed93436fd748b0f2da9751c436f5fe Mon Sep 17 00:00:00 2001 From: zane Date: Fri, 13 Sep 2024 11:17:41 +0800 Subject: [PATCH] Squashed commit of the following: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit commit 376cd87a238dae05f9762550a33853fec6e0a05b Author: yewj Date: Fri Sep 13 09:10:38 2024 +0800 bug修改 commit 4ca59f3aecd8c833c7ccf1de80f88ce37cd2a980 Author: chenhc <2369838784@qq.com> Date: Thu Sep 12 17:55:48 2024 +0800 fix: 修复 commit d2ef8d68317f9b8d900f08d78ddb202dcb7e56d1 Author: chenhc <2369838784@qq.com> Date: Thu Sep 12 14:20:30 2024 +0800 fix: 修复 --- .../basic/workPlace/sysWorkplaceDocuments.js | 30 + .../basic/workplace/addBusTypeDialog.vue | 36 +- src/views/basic/workplace/busTypeManage.vue | 827 ++++++++++++++++++ src/views/basic/workplace/selectBusType.vue | 192 +++- src/views/basic/workplace/workplaceManage.vue | 48 +- .../CollectOrderAllotCardComponents.vue | 19 +- src/views/collect/CollectOrderNew.vue | 63 +- src/views/collect/CollectOrderTabs.vue | 8 +- src/views/collect/PanelOrderUpload.vue | 40 +- 9 files changed, 1154 insertions(+), 109 deletions(-) create mode 100644 src/views/basic/workplace/busTypeManage.vue diff --git a/src/api/basic/workPlace/sysWorkplaceDocuments.js b/src/api/basic/workPlace/sysWorkplaceDocuments.js index e2be1313..21a5d0d1 100644 --- a/src/api/basic/workPlace/sysWorkplaceDocuments.js +++ b/src/api/basic/workPlace/sysWorkplaceDocuments.js @@ -15,6 +15,16 @@ export function getWorkBindBusTypes(query) { +export function filterListByWorkplace(query) { + return axios({ + url: '/udiwms/sysWorkplace/filterListByWorkplace', + method: 'get', + params: query + }) +} + + + //绑定单据类型 export function bindBusType(query) { @@ -55,3 +65,23 @@ export function removeBusTypeById(query) { data: query }); } + + +//移除单据类型 +export function removeBusTypeByBusTypeAndWorkplace(query) { + return axios({ + url: "/udiwms/sysWorkplace/removeBusTypeByBusTypeAndWorkplace", + method: "post", + data: query + }); +} + + +//绑定单据类型 +export function workplaceBindBusType(query) { + return axios({ + url: "/udiwms/sysWorkplace/workplaceBindBusType", + method: "post", + data: query + }); +} diff --git a/src/views/basic/workplace/addBusTypeDialog.vue b/src/views/basic/workplace/addBusTypeDialog.vue index 225511ed..2f017448 100644 --- a/src/views/basic/workplace/addBusTypeDialog.vue +++ b/src/views/basic/workplace/addBusTypeDialog.vue @@ -4,15 +4,15 @@ label-width="auto" > - - - - - + + + + + + + + + - + + + + + + + + - - - - - - - - + + + + + + + + + 重置 + + 查询 + + 新增业务类型 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/views/basic/workplace/selectBusType.vue b/src/views/basic/workplace/selectBusType.vue index e0e4d9ff..885c4d5e 100644 --- a/src/views/basic/workplace/selectBusType.vue +++ b/src/views/basic/workplace/selectBusType.vue @@ -34,41 +34,68 @@ - - - + + + - + + + + + + + - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -81,7 +108,9 @@ import { delCollectBusType, genCode } from '@/api/basic/collectPoint/gatherOrderType' import { getBusTypeList } from '@/api/basic/busType' -import { bindBusType } from '@/api/basic/workPlace/sysWorkplaceDocuments' +import { workplaceBindBusType } from '@/api/basic/workPlace/sysWorkplaceDocuments' +import {getWorkBindBusTypes, removeBusTypeById} from '@/api/basic/workPlace/sysWorkplaceDocuments' +import {filterListByWorkplace, removeBusTypeByBusTypeAndWorkplace} from '@/api/basic/workPlace/sysWorkplaceDocuments' export default { props: { @@ -100,10 +129,73 @@ export default { }, data() { return { + isMatchings: { + 0: '否', + 1: '是' + }, + operationTypes: { + 1: '扫码生成业务单', + 2: '按单校验三期', + 3: '按单不校验三期' + }, + inoutTypes: { + 1: '是', + 2: '否' + }, + autoTagTypes: { + 1: '是', + 0: '否' + }, + monopolys: { + 1: '是', + 0: '否' + }, + corpTypeMap: { + 1: '客户', + 2: '供应商', + 3: '内部科室', + 4: '特殊往来' + }, + checkInserts: { + 1: '自动添加', + 2: '自动不添加', + 3: '根据提醒决定' + }, + orderCirTypes: { + 1: '流通计量单位', + 2: '使用计量单位' + }, + workplaceStatusMap: { + 0: '暂停', + 1: '启用' + }, + orderFinishVerifys: { + 0: '完全赋码', + 1: '部分赋码', + 2: '赋码超出', + 4: '', + }, + warnTypeMap: { + 1: '信息提醒', + 2: '信息弹框提醒', + 3: '不提醒' + }, + isPopulars: { + 1: '是', + 0: '否', + }, + busQuery: { + busKey: '', + workplaceCode: null, + page: 1, + limit: 1000 + }, query: { page: 1, limit: 10 }, + busTypeList: [], + busTypeTotal: 0, showSearch: true, filterBadInv: true, loading: false, @@ -152,7 +244,7 @@ export default { rowList: [], BusTypeQuery: { workplaceCode: null, - documentTypeCode: [] + documentTypeCodes: [] } } }, @@ -186,9 +278,12 @@ export default { } }) }, - getList() { + getList(val) { + if (val != null){ + this.query.page = val.page; + } this.loading = true - getCollectBusType(this.query).then((response) => { + getWorkBindBusTypes(this.query).then((response) => { if (response.code == 20000) { this.list = response.data.list || [] this.total = response.data.total || 0 @@ -226,13 +321,13 @@ export default { //选入单据 chooseBusType() { let selectList = this.$refs.table.selection - let list = selectList.map(item => item.code) + let list = selectList.map(item => item.documentTypeCode) this.BusTypeQuery.workplaceCode = this.workplaceId - this.BusTypeQuery.documentTypeCode = list + this.BusTypeQuery.documentTypeCodes = list if (list.length == 0) { return this.$message.error('未选择单据类型或该工位已没有可增加单据类型') } - bindBusType(this.BusTypeQuery).then(res => { + workplaceBindBusType(this.BusTypeQuery).then(res => { if (res.code == 20000) { this.$message.success('选入成功') this.closeDialog() @@ -242,21 +337,32 @@ export default { }) }, checkSelectable(row) { - if (this.busTypeCodes == null) { - return true - } else { - if (this.busTypeCodes.length > 0) { - return this.busTypeCodes.indexOf(row.code) === -1 - } else { - return true + for (let item of this.busTypeList) { + // 如果找到匹配的documentTypeCode,则返回false + if (item.documentTypeCode == row.documentTypeCode) { + return false; } } - } + // 如果没有找到匹配的documentTypeCode,则返回true + return true; + + }, + getWorkBindBusTypes() { + this.busQuery.workplaceCode = this.workplaceId + filterListByWorkplace(this.busQuery).then(res => { + if (res.code == 20000) { + this.busTypeList = res.data.list + this.busTypeTotal = res.data.total + } else { + return this.$message.error('获取错误') + } + }) + }, }, created() { this.getList() - this.getBusType() + this.getWorkBindBusTypes() } } diff --git a/src/views/basic/workplace/workplaceManage.vue b/src/views/basic/workplace/workplaceManage.vue index 0b637ecd..0f242552 100644 --- a/src/views/basic/workplace/workplaceManage.vue +++ b/src/views/basic/workplace/workplaceManage.vue @@ -192,7 +192,7 @@ > 新增业务类型 + >选入业务类型 @@ -262,12 +262,12 @@