diff --git a/src/api/wms/customerreturnRequestMain/index.ts b/src/api/wms/customerreturnRequestMain/index.ts index 6fdeedba8..df34747a2 100644 --- a/src/api/wms/customerreturnRequestMain/index.ts +++ b/src/api/wms/customerreturnRequestMain/index.ts @@ -113,7 +113,7 @@ export const pageItemCodeToBalance = async (params) => { if (params.isSearch) { delete params.isSearch const data = {...params} - return await request.post({ url: '/wms/customerreturn-request-main/pageItemCodeToBalance', data }) + return await request.post({ url: '/wms/customerreturn-request-main/pageItemCodeToBalanceSenior', data }) } else { return request.get({ url: `/wms/customerreturn-request-main/pageItemCodeToBalance`, params }) } diff --git a/src/views/wms/basicDataManage/customerManage/customerdock/customerdock.data.ts b/src/views/wms/basicDataManage/customerManage/customerdock/customerdock.data.ts index 227504c81..e4bee6ec4 100644 --- a/src/views/wms/basicDataManage/customerManage/customerdock/customerdock.data.ts +++ b/src/views/wms/basicDataManage/customerManage/customerdock/customerdock.data.ts @@ -110,24 +110,6 @@ export const Customerdock = useCrudSchemas(reactive([ table: { width: 150 }, - form: { - // labelMessage: '信息提示说明!!!', - componentProps: { - isSearchList: true, // 开启查询弹窗 - searchListPlaceholder: '请选择仓库代码', // 输入框占位文本 - searchField: 'code', // 查询弹窗赋值字段 - searchTitle: '仓库基础信息', // 查询弹窗标题 - searchAllSchemas: Warehouse.allSchemas, // 查询弹窗所需类 - searchPage: WarehouseApi.getWarehousePage, // 查询弹窗所需分页方法 - searchCondition: [{ - key: 'available', - value: 'TRUE', - action: '==', - isSearch: true, - isMainValue: false - }] - } - } }, { label: '默认库位', @@ -136,24 +118,6 @@ export const Customerdock = useCrudSchemas(reactive([ table: { width: 150 }, - form: { - // labelMessage: '信息提示说明!!!', - componentProps: { - isSearchList: true, // 开启查询弹窗 - searchListPlaceholder: '请选择库位代码', // 输入框占位文本 - searchField: 'code', // 查询弹窗赋值字段 - searchTitle: '库位基础信息', // 查询弹窗标题 - searchAllSchemas: Location.allSchemas, // 查询弹窗所需类 - searchPage: LocationApi.getLocationPage, // 查询弹窗所需分页方法 - searchCondition: [{ - key: 'available', - value: 'TRUE', - action: '==', - isSearch: true, - isMainValue: false - }] - } - } }, { label: '是否可用', @@ -170,7 +134,8 @@ export const Customerdock = useCrudSchemas(reactive([ value: 'TRUE', componentProps: { inactiveValue: 'FALSE', - activeValue: 'TRUE' + activeValue: 'TRUE', + disabled: true } }, }, diff --git a/src/views/wms/countManage/count/countPlanMain/index.vue b/src/views/wms/countManage/count/countPlanMain/index.vue index 64b4673cf..cda4062ab 100644 --- a/src/views/wms/countManage/count/countPlanMain/index.vue +++ b/src/views/wms/countManage/count/countPlanMain/index.vue @@ -186,7 +186,7 @@ const { getList, setSearchParams } = tableMethods // 列表头部按钮 const HeadButttondata = [ - defaultButtons.defaultAddBtn({ hasPermi: 'wms:count-plan-main:create' }), // 新增——需要手动修改下权限 + defaultButtons.defaultAddBtn({ hasPermi: 'wms:count-plan-main:create' }), // 新增 // defaultButtons.defaultImportBtn({hasPermi:'wms:count-plan-main:import'}), // 导入 defaultButtons.defaultExportBtn({ hasPermi: 'wms:count-plan-main:export' }), // 导出 defaultButtons.defaultFreshBtn(null), // 刷新 diff --git a/src/views/wms/countManage/count/countRequestMain/index.vue b/src/views/wms/countManage/count/countRequestMain/index.vue index 7f6ebd551..3c0987c15 100644 --- a/src/views/wms/countManage/count/countRequestMain/index.vue +++ b/src/views/wms/countManage/count/countRequestMain/index.vue @@ -201,7 +201,7 @@ const { getList, setSearchParams } = tableMethods // 列表头部按钮 const HeadButttondata = [ - // defaultButtons.defaultAddBtn({hasPermi:'wms:count-request-main:create'}), // 新增——需要手动修改下权限 + // defaultButtons.defaultAddBtn({hasPermi:'wms:count-request-main:create'}), // 新增 // defaultButtons.defaultImportBtn({hasPermi:'wms:count-request-main:import'}), // 导入 defaultButtons.defaultExportBtn({ hasPermi: 'wms:count-request-main:export' }), // 导出 defaultButtons.defaultFreshBtn(null), // 刷新 diff --git a/src/views/wms/countManage/countadjust/countadjustRequestMain/index.vue b/src/views/wms/countManage/countadjust/countadjustRequestMain/index.vue index 3c897ea13..049cf99b0 100644 --- a/src/views/wms/countManage/countadjust/countadjustRequestMain/index.vue +++ b/src/views/wms/countManage/countadjust/countadjustRequestMain/index.vue @@ -135,7 +135,7 @@ const { getList, setSearchParams } = tableMethods // 列表头部按钮 const HeadButttondata = [ - // defaultButtons.defaultAddBtn({hasPermi:'wms:countadjust-request-main:create'}), // 新增——需要手动修改下权限 + // defaultButtons.defaultAddBtn({hasPermi:'wms:countadjust-request-main:create'}), // 新增 // defaultButtons.defaultImportBtn({hasPermi:'wms:countadjust-request-main:import'}), // 导入 defaultButtons.defaultExportBtn({hasPermi:'wms:countadjust-request-main:export'}), // 导出 defaultButtons.defaultFreshBtn(null), // 刷新 diff --git a/src/views/wms/deliversettlementManage/customerreturn/customerreturnRequestMain/index.vue b/src/views/wms/deliversettlementManage/customerreturn/customerreturnRequestMain/index.vue index bf295a34c..18002a297 100644 --- a/src/views/wms/deliversettlementManage/customerreturn/customerreturnRequestMain/index.vue +++ b/src/views/wms/deliversettlementManage/customerreturn/customerreturnRequestMain/index.vue @@ -198,7 +198,7 @@ const { getList, setSearchParams } = tableMethods const trueFalse = ref(true) // 列表头部按钮 const HeadButttondata = [ - defaultButtons.defaultAddBtn({hasPermi:'wms:customerreturn-request-main:create'}), // 新增——需要手动修改下权限 + defaultButtons.defaultAddBtn({hasPermi:'wms:customerreturn-request-main:create'}), // 新增 defaultButtons.defaultImportBtn({hasPermi:'wms:customerreturn-request-main:import'}), // 导入 defaultButtons.defaultExportBtn({hasPermi:'wms:customerreturn-request-main:export'}), // 导出 defaultButtons.defaultFreshBtn(null), // 刷新 diff --git a/src/views/wms/deliversettlementManage/customersettle/customersettleRequestMain/index.vue b/src/views/wms/deliversettlementManage/customersettle/customersettleRequestMain/index.vue index 3f5007594..2c2942c0b 100644 --- a/src/views/wms/deliversettlementManage/customersettle/customersettleRequestMain/index.vue +++ b/src/views/wms/deliversettlementManage/customersettle/customersettleRequestMain/index.vue @@ -155,7 +155,7 @@ const { getList, setSearchParams } = tableMethods // 列表头部按钮 const HeadButttondata = [ - // defaultButtons.defaultAddBtn({hasPermi:'wms:customersettle-request-main:create'}), // 新增——需要手动修改下权限 + // defaultButtons.defaultAddBtn({hasPermi:'wms:customersettle-request-main:create'}), // 新增 // defaultButtons.defaultImportBtn({hasPermi:'wms:customersettle-request-main:import'}), // 导入 defaultButtons.defaultExportBtn({hasPermi:'wms:customersettle-request-main:export'}), // 导出 defaultButtons.defaultFreshBtn(null), // 刷新 diff --git a/src/views/wms/deliversettlementManage/deliver/deliverRequestMain/index.vue b/src/views/wms/deliversettlementManage/deliver/deliverRequestMain/index.vue index 85661c5dc..02ec2fd07 100644 --- a/src/views/wms/deliversettlementManage/deliver/deliverRequestMain/index.vue +++ b/src/views/wms/deliversettlementManage/deliver/deliverRequestMain/index.vue @@ -182,7 +182,7 @@ const { getList, setSearchParams } = tableMethods // 列表头部按钮 const HeadButttondata = [ - defaultButtons.defaultAddBtn({hasPermi:'wms:deliver-request-main:create'}), // 新增——需要手动修改下权限 + defaultButtons.defaultAddBtn({hasPermi:'wms:deliver-request-main:create'}), // 新增 defaultButtons.defaultImportBtn({hasPermi:'wms:deliver-request-main:import'}), // 导入 defaultButtons.defaultExportBtn({hasPermi:'wms:deliver-request-main:export'}), // 导出 defaultButtons.defaultFreshBtn(null), // 刷新 diff --git a/src/views/wms/deliversettlementManage/deliverplan/deliverPlanMain/index.vue b/src/views/wms/deliversettlementManage/deliverplan/deliverPlanMain/index.vue index 2f2b4c1cd..3bd12d4f6 100644 --- a/src/views/wms/deliversettlementManage/deliverplan/deliverPlanMain/index.vue +++ b/src/views/wms/deliversettlementManage/deliverplan/deliverPlanMain/index.vue @@ -144,7 +144,7 @@ const { getList, setSearchParams } = tableMethods // 列表头部按钮 const HeadButttondata = [ - defaultButtons.defaultAddBtn({hasPermi:'wms:deliver-plan-main:create'}), // 新增——需要手动修改下权限 + defaultButtons.defaultAddBtn({hasPermi:'wms:deliver-plan-main:create'}), // 新增 defaultButtons.defaultImportBtn({hasPermi:'wms:deliver-plan-main:import'}), // 导入 defaultButtons.defaultExportBtn({hasPermi:'wms:deliver-plan-main:export'}), // 导出 defaultButtons.defaultFreshBtn(null), // 刷新 diff --git a/src/views/wms/deliversettlementManage/deliverplan/saleMain/index.vue b/src/views/wms/deliversettlementManage/deliverplan/saleMain/index.vue index 9af4a307d..46525ac6f 100644 --- a/src/views/wms/deliversettlementManage/deliverplan/saleMain/index.vue +++ b/src/views/wms/deliversettlementManage/deliverplan/saleMain/index.vue @@ -134,7 +134,7 @@ const { getList, setSearchParams } = tableMethods // 列表头部按钮 const HeadButttondata = [ - defaultButtons.defaultAddBtn({hasPermi:'wms:sale-main:create'}), // 新增——需要手动修改下权限 + defaultButtons.defaultAddBtn({hasPermi:'wms:sale-main:create'}), // 新增 defaultButtons.defaultImportBtn({hasPermi:'wms:sale-main:import'}), // 导入 defaultButtons.defaultExportBtn({hasPermi:'wms:sale-main:export'}), // 导出 defaultButtons.defaultFreshBtn(null), // 刷新 diff --git a/src/views/wms/inventoryjobManage/inventoryinitial/inventoryinitRequestMain/index.vue b/src/views/wms/inventoryjobManage/inventoryinitial/inventoryinitRequestMain/index.vue index 4c5835936..5e94d3831 100644 --- a/src/views/wms/inventoryjobManage/inventoryinitial/inventoryinitRequestMain/index.vue +++ b/src/views/wms/inventoryjobManage/inventoryinitial/inventoryinitRequestMain/index.vue @@ -136,7 +136,7 @@ const { getList, setSearchParams } = tableMethods // 列表头部按钮 const HeadButttondata = [ - defaultButtons.defaultAddBtn({hasPermi:'wms:inventoryinit-request-main:create'}), // 新增——需要手动修改下权限 + defaultButtons.defaultAddBtn({hasPermi:'wms:inventoryinit-request-main:create'}), // 新增 defaultButtons.defaultImportBtn({hasPermi:'wms:inventoryinit-request-main:import'}), // 导入 defaultButtons.defaultExportBtn({hasPermi:'wms:inventoryinit-request-main:export'}), // 导出 defaultButtons.defaultFreshBtn(null), // 刷新 diff --git a/src/views/wms/inventoryjobManage/scrap/scrapRequestMain/index.vue b/src/views/wms/inventoryjobManage/scrap/scrapRequestMain/index.vue index 807ba9be7..fb4aa90ee 100644 --- a/src/views/wms/inventoryjobManage/scrap/scrapRequestMain/index.vue +++ b/src/views/wms/inventoryjobManage/scrap/scrapRequestMain/index.vue @@ -143,7 +143,7 @@ const { getList, setSearchParams } = tableMethods // 列表头部按钮 const HeadButttondata = [ - defaultButtons.defaultAddBtn({hasPermi:'wms:scrap-request-main:create'}), // 新增——需要手动修改下权限 + defaultButtons.defaultAddBtn({hasPermi:'wms:scrap-request-main:create'}), // 新增 defaultButtons.defaultImportBtn({hasPermi:'wms:scrap-request-main:import'}), // 导入 defaultButtons.defaultExportBtn({hasPermi:'wms:scrap-request-main:export'}), // 导出 defaultButtons.defaultFreshBtn(null), // 刷新 diff --git a/src/views/wms/inventoryjobManage/transferissue/transferissueRequestMain/index.vue b/src/views/wms/inventoryjobManage/transferissue/transferissueRequestMain/index.vue index 47c2412ce..84fe893c5 100644 --- a/src/views/wms/inventoryjobManage/transferissue/transferissueRequestMain/index.vue +++ b/src/views/wms/inventoryjobManage/transferissue/transferissueRequestMain/index.vue @@ -156,7 +156,7 @@ const { getList, setSearchParams } = tableMethods // 列表头部按钮 const HeadButttondata = [ - defaultButtons.defaultAddBtn({hasPermi:'wms:transferissue-request-main:create'}), // 新增——需要手动修改下权限 + defaultButtons.defaultAddBtn({hasPermi:'wms:transferissue-request-main:create'}), // 新增 defaultButtons.defaultImportBtn({hasPermi:'wms:transferissue-request-main:import'}), // 导入 defaultButtons.defaultExportBtn({hasPermi:'wms:transferissue-request-main:export'}), // 导出 defaultButtons.defaultFreshBtn(null), // 刷新 diff --git a/src/views/wms/inventoryjobManage/transferreceipt/transferreceiptRequestMain/index.vue b/src/views/wms/inventoryjobManage/transferreceipt/transferreceiptRequestMain/index.vue index 294ba232b..43d27b560 100644 --- a/src/views/wms/inventoryjobManage/transferreceipt/transferreceiptRequestMain/index.vue +++ b/src/views/wms/inventoryjobManage/transferreceipt/transferreceiptRequestMain/index.vue @@ -148,7 +148,7 @@ const { getList, setSearchParams } = tableMethods // 列表头部按钮 const HeadButttondata = [ - // defaultButtons.defaultAddBtn({hasPermi:'wms:transferreceipt-request-main:create'}), // 新增——需要手动修改下权限 + // defaultButtons.defaultAddBtn({hasPermi:'wms:transferreceipt-request-main:create'}), // 新增 // defaultButtons.defaultImportBtn({hasPermi:'wms:transferreceipt-request-main:import'}), // 导入 defaultButtons.defaultExportBtn({hasPermi:'wms:transferreceipt-request-main:export'}), // 导出 defaultButtons.defaultFreshBtn(null), // 刷新 diff --git a/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRequestMain/index.vue b/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRequestMain/index.vue index 0b5db24ff..601da9a96 100644 --- a/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRequestMain/index.vue +++ b/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRequestMain/index.vue @@ -148,7 +148,7 @@ const { getList, setSearchParams } = tableMethods // 列表头部按钮 const HeadButttondata = [ - defaultButtons.defaultAddBtn({hasPermi:'wms:unplannedissue-request-main:create'}), // 新增——需要手动修改下权限 + defaultButtons.defaultAddBtn({hasPermi:'wms:unplannedissue-request-main:create'}), // 新增 defaultButtons.defaultImportBtn({hasPermi:'wms:unplannedissue-request-main:import'}), // 导入 defaultButtons.defaultExportBtn({hasPermi:'wms:unplannedissue-request-main:export'}), // 导出 defaultButtons.defaultFreshBtn(null), // 刷新 diff --git a/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/index.vue b/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/index.vue index c4c89bfc5..8402762d8 100644 --- a/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/index.vue +++ b/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/index.vue @@ -131,6 +131,7 @@ const tableColumns = ref(UnplannedreceiptRequestMain.allSchemas.tableColumns) const detailListTableColumns = UnplannedreceiptRequestDetailLabel.allSchemas const isCreateLabel = ref(false) const formLabelRef = ref() +const labelType = ref('') // 标签类别 采购还是制造等 const { tableObject: detatableData, tableMethods: detatableMethods } =useTable({ getListApi: UnplannedreceiptRequestDetailApi.getUnplannedreceiptRequestDetailPage }) @@ -141,19 +142,56 @@ const updataTableColumns = (val) => { tableColumns.value = val } +// 判断 物料类型是否与其他物料类型一致 +const isItemType = async (itemCode, labelTypeParams) => { + let isType = false + const labelTypeOld = JSON.parse(JSON.stringify(labelType.value)) + await ItembasicApi.getItembasicPage({ + pageSize: 10, + pageNo: 1, + code: itemCode, + sort: '', + by: 'ASC', + }).then(res => { + if (res.list.length > 0) { + // 判断物料 可采购 可制造 + if (res.list[0].enableMake == "FALSE") { + labelType.value = 'cg' + if (labelTypeParams == 'cg') { + isType = true + } + } else { + labelType.value = 'zz' + if (labelTypeParams == 'zz') { + isType = true + } + } + if(labelTypeParams == '') isType = true + } + }) + // 当第二次选择为不同类型时 类型要重置到第一次选择的结果 + if (!isType) labelType.value = labelTypeOld + return isType +} + // 查询页面返回 const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => { - nextTick(() => { + nextTick(async () => { if (type == 'tableForm') { // 明细查询页赋值 if(formField == 'toLocationCode'){ row['toLocationCode'] = val[0]['code'] + } else if(formField == 'itemCode'){ + const isType = await isItemType(val[0]['code'], labelType.value) + if(!isType){ + message.warning('当前物料可制造与其他数据不一致,请重新选择!') + } else { + row['itemCode'] = val[0]['code'] + row['uom'] = val[0]['uom'] + } + } else { + row[formField] = val[0][searchField] } - if(formField == 'itemCode'){ - row['itemCode'] = val[0]['code'] - row['uom'] = val[0]['uom'] - } - row[formField] = val[0][searchField] } else { const setV = {} setV[formField] = val[0][searchField] @@ -190,7 +228,7 @@ const { getList, setSearchParams } = tableMethods // 列表头部按钮 const HeadButttondata = [ - defaultButtons.defaultAddBtn({hasPermi:'wms:unplannedreceipt-request-main:create'}), // 新增——需要手动修改下权限 + defaultButtons.defaultAddBtn({hasPermi:'wms:unplannedreceipt-request-main:create'}), // 新增 defaultButtons.defaultImportBtn({hasPermi:'wms:unplannedreceipt-request-main:import'}), // 导入 defaultButtons.defaultExportBtn({hasPermi:'wms:unplannedreceipt-request-main:export'}), // 导出 defaultButtons.defaultFreshBtn(null), // 刷新 @@ -323,8 +361,8 @@ const buttonTableClick = async (val, row) => { by: 'ASC', }).then(res => { if (res.list.length > 0) { - // 判断物料类型 是否 原料 - if (res.list[0].type == "RAW") { + // 判断物料 可采购 可制造 + if (res.list[0].enableMake == "FALSE") { // 修改 tableform 属性 detailListTableColumns.tableFormColumns.map(item => { if(item.field == 'productionLineCodePackage') { diff --git a/src/views/wms/issueManage/issue/issueRequestMain/index.vue b/src/views/wms/issueManage/issue/issueRequestMain/index.vue index 6a826b483..569eabda0 100644 --- a/src/views/wms/issueManage/issue/issueRequestMain/index.vue +++ b/src/views/wms/issueManage/issue/issueRequestMain/index.vue @@ -144,7 +144,7 @@ const { getList, setSearchParams } = tableMethods // 列表头部按钮 const HeadButttondata = [ - defaultButtons.defaultAddBtn({hasPermi:'wms:issue-request-main:create'}), // 新增——需要手动修改下权限 + defaultButtons.defaultAddBtn({hasPermi:'wms:issue-request-main:create'}), // 新增 defaultButtons.defaultImportBtn({hasPermi:'wms:issue-request-main:import'}), // 导入 defaultButtons.defaultExportBtn({hasPermi:'wms:issue-request-main:export'}), // 导出 defaultButtons.defaultFreshBtn(null), // 刷新 diff --git a/src/views/wms/issueManage/onlinesettlement/onlinesettlementRequestMain/index.vue b/src/views/wms/issueManage/onlinesettlement/onlinesettlementRequestMain/index.vue index 2a063a8d7..812b5386f 100644 --- a/src/views/wms/issueManage/onlinesettlement/onlinesettlementRequestMain/index.vue +++ b/src/views/wms/issueManage/onlinesettlement/onlinesettlementRequestMain/index.vue @@ -157,7 +157,7 @@ const { getList, setSearchParams } = tableMethods // 列表头部按钮 const HeadButttondata = [ - defaultButtons.defaultAddBtn({hasPermi:'wms:onlinesettlement-request-main:create'}), // 新增——需要手动修改下权限 + defaultButtons.defaultAddBtn({hasPermi:'wms:onlinesettlement-request-main:create'}), // 新增 defaultButtons.defaultImportBtn({hasPermi:'wms:onlinesettlement-request-main:import'}), // 导入 defaultButtons.defaultExportBtn({hasPermi:'wms:onlinesettlement-request-main:export'}), // 导出 defaultButtons.defaultFreshBtn(null), // 刷新 diff --git a/src/views/wms/issueManage/pick/pickRequestMain/index.vue b/src/views/wms/issueManage/pick/pickRequestMain/index.vue index e1b17a552..c1841580e 100644 --- a/src/views/wms/issueManage/pick/pickRequestMain/index.vue +++ b/src/views/wms/issueManage/pick/pickRequestMain/index.vue @@ -147,7 +147,7 @@ const { getList, setSearchParams } = tableMethods // 列表头部按钮 const HeadButttondata = [ - defaultButtons.defaultAddBtn({hasPermi:'wms:pick-request-main:create'}), // 新增——需要手动修改下权限 + defaultButtons.defaultAddBtn({hasPermi:'wms:pick-request-main:create'}), // 新增 defaultButtons.defaultImportBtn({hasPermi:'wms:pick-request-main:import'}), // 导入 defaultButtons.defaultExportBtn({hasPermi:'wms:pick-request-main:export'}), // 导出 defaultButtons.defaultFreshBtn(null), // 刷新 diff --git a/src/views/wms/issueManage/productionreturn/productionreturnRequestMain/index.vue b/src/views/wms/issueManage/productionreturn/productionreturnRequestMain/index.vue index d1bd1f0b7..4d06233be 100644 --- a/src/views/wms/issueManage/productionreturn/productionreturnRequestMain/index.vue +++ b/src/views/wms/issueManage/productionreturn/productionreturnRequestMain/index.vue @@ -125,6 +125,7 @@ const updataTableColumns = (val) => { // 判断 物料类型是否与其他物料类型一致 const isItemType = async (itemCode, labelTypeParams) => { let isType = false + const labelTypeOld = JSON.parse(JSON.stringify(labelType.value)) await ItembasicApi.getItembasicPage({ pageSize: 10, pageNo: 1, @@ -133,8 +134,8 @@ const isItemType = async (itemCode, labelTypeParams) => { by: 'ASC', }).then(res => { if (res.list.length > 0) { - // 判断物料类型 是否 原料 - if (res.list[0].type == "RAW") { + // 判断物料 可采购 可制造 + if (res.list[0].enableMake == "FALSE") { labelType.value = 'cg' if (labelTypeParams == 'cg') { isType = true @@ -148,6 +149,8 @@ const isItemType = async (itemCode, labelTypeParams) => { if(labelTypeParams == '') isType = true } }) + // 当第二次选择为不同类型时 类型要重置到第一次选择的结果 + if (!isType) labelType.value = labelTypeOld return isType } @@ -159,7 +162,7 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => if(formField == 'itemCode') { const isType = await isItemType(val[0]['itemCode'], labelType.value) if(!isType){ - message.warning('当前物料类型与其他数据不一致,请重新选择!') + message.warning('当前物料可制造与其他数据不一致,请重新选择!') } else { row['itemCode'] = val[0]['itemCode'] row['uom'] = val[0]['uom'] @@ -194,7 +197,7 @@ const searchTableSuccessDetail = (formField, searchField, val, formRef ) => { if(formField == 'itemCode') { const isType = await isItemType(val[0]['itemCode'], labelType.value) if(!isType){ - message.warning('当前物料类型与其他数据不一致,请重新选择!') + message.warning('当前物料可制造与其他数据不一致,请重新选择!') } else { setV['itemCode'] = val[0]['itemCode'] setV['uom'] = val[0]['uom'] @@ -363,8 +366,8 @@ const buttonTableClick = async (val, row) => { by: 'ASC', }).then(res => { if (res.list.length > 0) { - // 判断物料类型 是否 原料 - if (res.list[0].type == "RAW") { + // 判断物料 可采购 可制造 + if (res.list[0].enableMake == "FALSE") { // 修改 tableform 属性 detailListTableColumns.tableFormColumns.map(itemColumns => { if(itemColumns.field == 'productionLineCodePackage') { diff --git a/src/views/wms/issueManage/productionreturn/productionreturnRequestMainNo/index.vue b/src/views/wms/issueManage/productionreturn/productionreturnRequestMainNo/index.vue index 8c2ccf198..2b099bab0 100644 --- a/src/views/wms/issueManage/productionreturn/productionreturnRequestMainNo/index.vue +++ b/src/views/wms/issueManage/productionreturn/productionreturnRequestMainNo/index.vue @@ -128,6 +128,7 @@ const updataTableColumns = (val) => { // 判断 物料类型是否与其他物料类型一致 const isItemType = async (itemCode, labelTypeParams) => { let isType = false + const labelTypeOld = JSON.parse(JSON.stringify(labelType.value)) await ItembasicApi.getItembasicPage({ pageSize: 10, pageNo: 1, @@ -136,8 +137,8 @@ const isItemType = async (itemCode, labelTypeParams) => { by: 'ASC', }).then(res => { if (res.list.length > 0) { - // 判断物料类型 是否 原料 - if (res.list[0].type == "RAW") { + // 判断物料 可采购 可制造 + if (res.list[0].enableMake == "FALSE") { labelType.value = 'cg' if (labelTypeParams == 'cg') { isType = true @@ -151,6 +152,8 @@ const isItemType = async (itemCode, labelTypeParams) => { if(labelTypeParams == '') isType = true } }) + // 当第二次选择为不同类型时 类型要重置到第一次选择的结果 + if (!isType) labelType.value = labelTypeOld return isType } @@ -162,7 +165,7 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => if(formField == 'itemCode') { const isType = await isItemType(val[0]['itemCode'], labelType.value) if(!isType){ - message.warning('当前物料类型与其他数据不一致,请重新选择!') + message.warning('当前物料可制造与其他数据不一致,请重新选择!') } else { row['batch'] = val[0]['batch']==''?formatTime(new Date(), 'yyyyMMdd'):val[0]['batch'] row['itemCode'] = val[0]['itemCode'] @@ -200,7 +203,7 @@ const searchTableSuccessDetail = (formField, searchField, val, formRef ) => { if(formField == 'itemCode') { const isType = await isItemType(val[0]['itemCode'], labelType.value) if(!isType){ - message.warning('当前物料类型与其他数据不一致,请重新选择!') + message.warning('当前物料可制造与其他数据不一致,请重新选择!') } else { setV['batch'] = val[0]['batch'] setV['itemCode'] = val[0]['itemCode'] @@ -370,8 +373,8 @@ const buttonTableClick = async (val, row) => { by: 'ASC', }).then(res => { if (res.list.length > 0) { - // 判断物料类型 是否 原料 - if (res.list[0].type == "RAW") { + // 判断物料 可采购 可制造 + if (res.list[0].enableMake == "FALSE") { // 修改 tableform 属性 detailListTableColumns.tableFormColumns.map(itemColumns => { if(itemColumns.field == 'productionLineCodePackage') { diff --git a/src/views/wms/moveManage/inventorychange/inventorychangeRequestMain/index.vue b/src/views/wms/moveManage/inventorychange/inventorychangeRequestMain/index.vue index 3b2df4192..9a43ec770 100644 --- a/src/views/wms/moveManage/inventorychange/inventorychangeRequestMain/index.vue +++ b/src/views/wms/moveManage/inventorychange/inventorychangeRequestMain/index.vue @@ -186,7 +186,7 @@ const { getList, setSearchParams } = tableMethods // 列表头部按钮 const HeadButttondata = [ - defaultButtons.defaultAddBtn({hasPermi:'wms:inventorychange-request-main:create'}), // 新增——需要手动修改下权限 + defaultButtons.defaultAddBtn({hasPermi:'wms:inventorychange-request-main:create'}), // 新增 defaultButtons.defaultImportBtn({hasPermi:'wms:inventorychange-request-main:import'}), // 导入 defaultButtons.defaultExportBtn({hasPermi:'wms:inventorychange-request-main:export'}), // 导出 defaultButtons.defaultFreshBtn(null), // 刷新 diff --git a/src/views/wms/moveManage/inventorymove/inventorymoveRequestMain/index.vue b/src/views/wms/moveManage/inventorymove/inventorymoveRequestMain/index.vue index 6d9081e70..da65a697f 100644 --- a/src/views/wms/moveManage/inventorymove/inventorymoveRequestMain/index.vue +++ b/src/views/wms/moveManage/inventorymove/inventorymoveRequestMain/index.vue @@ -320,7 +320,7 @@ const { getList, setSearchParams } = tableMethods // 列表头部按钮 const HeadButttondata = [ - defaultButtons.defaultAddBtn({hasPermi:'wms:inventorymove-request-main:create'}), // 新增——需要手动修改下权限 + defaultButtons.defaultAddBtn({hasPermi:'wms:inventorymove-request-main:create'}), // 新增 defaultButtons.defaultImportBtn({hasPermi:'wms:inventorymove-request-main:import'}), // 导入 defaultButtons.defaultExportBtn({hasPermi:'wms:inventorymove-request-main:export'}), // 导出 defaultButtons.defaultFreshBtn(null), // 刷新 diff --git a/src/views/wms/productionManage/offlinesettlement/offlinesettlementRequestMain/index.vue b/src/views/wms/productionManage/offlinesettlement/offlinesettlementRequestMain/index.vue index 4e2199bb6..55e4e9d65 100644 --- a/src/views/wms/productionManage/offlinesettlement/offlinesettlementRequestMain/index.vue +++ b/src/views/wms/productionManage/offlinesettlement/offlinesettlementRequestMain/index.vue @@ -148,7 +148,7 @@ const { getList, setSearchParams } = tableMethods // 列表头部按钮 const HeadButttondata = [ - defaultButtons.defaultAddBtn({hasPermi:'wms:offlinesettlement-request-main:create'}), // 新增——需要手动修改下权限 + defaultButtons.defaultAddBtn({hasPermi:'wms:offlinesettlement-request-main:create'}), // 新增 defaultButtons.defaultImportBtn({hasPermi:'wms:offlinesettlement-request-main:import'}), // 导入 defaultButtons.defaultExportBtn({hasPermi:'wms:offlinesettlement-request-main:export'}), // 导出 defaultButtons.defaultFreshBtn(null), // 刷新 diff --git a/src/views/wms/productionManage/productputaway/productputawayRequestMain/index.vue b/src/views/wms/productionManage/productputaway/productputawayRequestMain/index.vue index 8676e276d..12e966607 100644 --- a/src/views/wms/productionManage/productputaway/productputawayRequestMain/index.vue +++ b/src/views/wms/productionManage/productputaway/productputawayRequestMain/index.vue @@ -147,7 +147,7 @@ const { getList, setSearchParams } = tableMethods // 列表头部按钮 const HeadButttondata = [ - defaultButtons.defaultAddBtn({hasPermi:'wms:productputaway-request-main:create'}), // 新增——需要手动修改下权限 + defaultButtons.defaultAddBtn({hasPermi:'wms:productputaway-request-main:create'}), // 新增 defaultButtons.defaultImportBtn({hasPermi:'wms:productputaway-request-main:import'}), // 导入 defaultButtons.defaultExportBtn({hasPermi:'wms:productputaway-request-main:export'}), // 导出 defaultButtons.defaultFreshBtn(null), // 刷新 diff --git a/src/views/wms/productionManage/productreceipt/productreceiptRequestMain/index.vue b/src/views/wms/productionManage/productreceipt/productreceiptRequestMain/index.vue index 16dfa335f..a5ecb8103 100644 --- a/src/views/wms/productionManage/productreceipt/productreceiptRequestMain/index.vue +++ b/src/views/wms/productionManage/productreceipt/productreceiptRequestMain/index.vue @@ -204,7 +204,7 @@ const { getList, setSearchParams } = tableMethods // 列表头部按钮 const HeadButttondata = [ - defaultButtons.defaultAddBtn({hasPermi:'wms:productreceipt-request-main:create'}), // 新增——需要手动修改下权限 + defaultButtons.defaultAddBtn({hasPermi:'wms:productreceipt-request-main:create'}), // 新增 defaultButtons.defaultImportBtn({hasPermi:'wms:productreceipt-request-main:import'}), // 导入 defaultButtons.defaultExportBtn({hasPermi:'wms:productreceipt-request-main:export'}), // 导出 defaultButtons.defaultFreshBtn(null), // 刷新 @@ -352,8 +352,8 @@ const buttonTableClick = async (val, row) => { by: 'ASC', }).then(res => { if (res.list.length > 0) { - // 判断物料类型 是否 原料 - if (res.list[0].type == "RAW") { + // 判断物料 可采购 可制造 + if (res.list[0].enableMake == "FALSE") { // 修改 tableform 属性 detailListTableColumns.tableFormColumns.map(itemColumns => { if(itemColumns.field == 'productionLineCodePackage') { diff --git a/src/views/wms/productionManage/productrepair/productrepairRequestMain/index.vue b/src/views/wms/productionManage/productrepair/productrepairRequestMain/index.vue index 316785aa3..32f917f90 100644 --- a/src/views/wms/productionManage/productrepair/productrepairRequestMain/index.vue +++ b/src/views/wms/productionManage/productrepair/productrepairRequestMain/index.vue @@ -291,7 +291,7 @@ const { getList, setSearchParams } = tableMethods // 列表头部按钮 const HeadButttondata = [ - defaultButtons.defaultAddBtn({hasPermi:'wms:productrepair-request-main:create'}), // 新增——需要手动修改下权限 + defaultButtons.defaultAddBtn({hasPermi:'wms:productrepair-request-main:create'}), // 新增 // defaultButtons.defaultImportBtn({hasPermi:'wms:productrepair-request-main:import'}), // 导入 暂时不做主子子表结构 defaultButtons.defaultExportBtn({hasPermi:'wms:productrepair-request-main:export'}), // 导出 defaultButtons.defaultFreshBtn(null), // 刷新 diff --git a/src/views/wms/productionManage/productscrap/productscrapRequestMain/index.vue b/src/views/wms/productionManage/productscrap/productscrapRequestMain/index.vue index 48765d9c7..3ffb9a368 100644 --- a/src/views/wms/productionManage/productscrap/productscrapRequestMain/index.vue +++ b/src/views/wms/productionManage/productscrap/productscrapRequestMain/index.vue @@ -298,7 +298,7 @@ const { getList, setSearchParams } = tableMethods // 列表头部按钮 const HeadButttondata = [ - defaultButtons.defaultAddBtn({hasPermi:'wms:productscrap-request-main:create'}), // 新增——需要手动修改下权限 + defaultButtons.defaultAddBtn({hasPermi:'wms:productscrap-request-main:create'}), // 新增 // defaultButtons.defaultImportBtn({hasPermi:'wms:productscrap-request-main:import'}), // 导入 defaultButtons.defaultExportBtn({hasPermi:'wms:productscrap-request-main:export'}), // 导出 defaultButtons.defaultFreshBtn(null), // 刷新 diff --git a/src/views/wms/purchasereceiptManage/inspect/inspectRequestMain/index.vue b/src/views/wms/purchasereceiptManage/inspect/inspectRequestMain/index.vue index 474efcc00..dc04b54e3 100644 --- a/src/views/wms/purchasereceiptManage/inspect/inspectRequestMain/index.vue +++ b/src/views/wms/purchasereceiptManage/inspect/inspectRequestMain/index.vue @@ -115,7 +115,7 @@ // 列表头部按钮 const HeadButttondata = [ - // defaultButtons.defaultAddBtn({ hasPermi: 'wms:inspect-request-main:create' }), // 新增——需要手动修改下权限 + // defaultButtons.defaultAddBtn({ hasPermi: 'wms:inspect-request-main:create' }), // 新增 // defaultButtons.defaultImportBtn({hasPermi:'wms:inspect-request-main:import'}), // 导入 defaultButtons.defaultExportBtn({ hasPermi: 'wms:inspect-request-main:export' }), // 导出 defaultButtons.defaultFreshBtn(null), // 刷新 diff --git a/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMain/index.vue b/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMain/index.vue index 543bc0adf..95bec100b 100644 --- a/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMain/index.vue +++ b/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMain/index.vue @@ -288,10 +288,10 @@ const { getList, setSearchParams } = tableMethods // 列表头部按钮 const HeadButttondata = [ - // defaultButtons.defaultAddBtn({hasPermi:'wms:purchasereturn-request-main:create'}), // 新增——需要手动修改下权限 + // defaultButtons.defaultAddBtn({hasPermi:'wms:purchasereturn-request-main:create'}), // 新增 // defaultButtons.defaultImportBtn({hasPermi:'wms:purchasereturn-request-main:import'}), // 导入 // defaultButtons.defaultExportBtn({hasPermi:'wms:purchasereturn-request-main:export'}), // 导出 - defaultButtons.defaultAddBtn(null), // 新增——需要手动修改下权限 + defaultButtons.defaultAddBtn(null), // 新增 defaultButtons.defaultImportBtn(null), // 导入 defaultButtons.defaultExportBtn(null), // 导出 defaultButtons.defaultFreshBtn(null), // 刷新 diff --git a/src/views/wms/purchasereceiptManage/putaway/putawayRequestMain/index.vue b/src/views/wms/purchasereceiptManage/putaway/putawayRequestMain/index.vue index 3bd78d68a..605af8b94 100644 --- a/src/views/wms/purchasereceiptManage/putaway/putawayRequestMain/index.vue +++ b/src/views/wms/purchasereceiptManage/putaway/putawayRequestMain/index.vue @@ -141,7 +141,7 @@ const { getList, setSearchParams } = tableMethods // 列表头部按钮 const HeadButttondata = [ - // defaultButtons.defaultAddBtn({hasPermi:'wms:putaway-request-main:create'}), // 新增——需要手动修改下权限 + // defaultButtons.defaultAddBtn({hasPermi:'wms:putaway-request-main:create'}), // 新增 // defaultButtons.defaultImportBtn({hasPermi:'wms:putaway-request-main:import'}), // 导入 defaultButtons.defaultExportBtn({hasPermi:'wms:putaway-request-main:export'}), // 导出 defaultButtons.defaultFreshBtn(null), // 刷新 diff --git a/src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/index.vue b/src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/index.vue index ab7096dd0..af1229dee 100644 --- a/src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/index.vue +++ b/src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/index.vue @@ -147,7 +147,7 @@ // 列表头部按钮 const HeadButttondata = [ - defaultButtons.defaultAddBtn({ hasPermi: 'wms:purchase-plan-main:create' }), // 新增——需要手动修改下权限 + defaultButtons.defaultAddBtn({ hasPermi: 'wms:purchase-plan-main:create' }), // 新增 defaultButtons.defaultImportBtn({ hasPermi: 'wms:purchase-plan-main:import' }), // 导入 defaultButtons.defaultExportBtn({ hasPermi: 'wms:purchase-plan-main:export' }), // 导出 defaultButtons.defaultFreshBtn(null), // 刷新 diff --git a/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue b/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue index 524f9ce72..7ddde8c46 100644 --- a/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue +++ b/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue @@ -187,7 +187,7 @@ const { getList, setSearchParams } = tableMethods // 列表头部按钮 const HeadButttondata = [ - defaultButtons.defaultAddBtn({ hasPermi: 'wms:supplierdeliver-request-main:create' }), // 新增——需要手动修改下权限 + defaultButtons.defaultAddBtn({ hasPermi: 'wms:supplierdeliver-request-main:create' }), // 新增 defaultButtons.defaultImportBtn({ hasPermi: 'wms:supplierdeliver-request-main:import' }), // 导入 defaultButtons.defaultExportBtn({ hasPermi: 'wms:supplierdeliver-request-main:export' }), // 导出 defaultButtons.defaultFreshBtn(null), // 刷新 diff --git a/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue b/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue index d813868d6..fa3d596e2 100644 --- a/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue +++ b/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue @@ -115,7 +115,7 @@ // 列表头部按钮 const HeadButttondata = [ - defaultButtons.defaultAddBtn({ hasPermi: 'wms:supplierinvoice-request-main:create' }), // 新增——需要手动修改下权限 + defaultButtons.defaultAddBtn({ hasPermi: 'wms:supplierinvoice-request-main:create' }), // 新增 defaultButtons.defaultExportBtn({ hasPermi: 'wms:supplierinvoice-request-main:export' }), // 导出 defaultButtons.defaultFreshBtn(null), // 刷新 defaultButtons.defaultFilterBtn(null), // 筛选