diff --git a/src/api/wms/balance/index.ts b/src/api/wms/balance/index.ts index 0aa246832..3d408963f 100644 --- a/src/api/wms/balance/index.ts +++ b/src/api/wms/balance/index.ts @@ -190,6 +190,17 @@ export const getBalanceByBusinessTypeByItemType = async (params) => { return await request.get({ url: `/wms/balance/pageBusinessTypeToBalance`, params }) } } + +// 查询库存余额列表根据业务类型 根据库存状态及库区类型再根据物料的种类筛选 +export const getBalanceByBusinessCategoryByItemType = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/wms/balance/pageBusinessCategoryToBalanceSenior', data }) + } else { + return await request.get({ url: `/wms/balance/pageBusinessCategoryToBalance`, params }) + } +} // 根据code获取数据列表 export const getBalanceItemListByCodes = async (data) => {   return await request.get({ url: `/wms/balance/listByCodes`,data }) diff --git a/src/api/wms/countJobMain/index.ts b/src/api/wms/countJobMain/index.ts index 6e2b5845b..d5624f636 100644 --- a/src/api/wms/countJobMain/index.ts +++ b/src/api/wms/countJobMain/index.ts @@ -91,6 +91,12 @@ export const importTemplate = () => { export const closeCountJobMain = (id: number) => { return request.put({ url: '/wms/count-job-main/close?id=' + id }) } + +// 完成盘点任务主 +export const doneCountJobMain = (id: number) => { + //更换一下完成接口 + return request.put({ url: '/wms/count-job-main/close?id=' + id }) +} // 承接盘点任务主 export const acceptCountJobMain = (id: number) => { return request.put({ url: '/wms/count-job-main/accept?id=' + id }) diff --git a/src/api/wms/productionitemcodeSpareitemcode/index.ts b/src/api/wms/productionitemcodeSpareitemcode/index.ts index 1bd325194..b201b9e1e 100644 --- a/src/api/wms/productionitemcodeSpareitemcode/index.ts +++ b/src/api/wms/productionitemcodeSpareitemcode/index.ts @@ -19,6 +19,17 @@ export const getProductionitemcodeSpareitemcodePage = async (params) => { } } +// 查询量产件备件关系列表 +export const getProductionitemcodeSpareitemcodeRelation = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/wms/productionitemcode-spareitemcode/getRelationSeniorS', data }) + } else { + return await request.get({ url: `/wms/productionitemcode-spareitemcode/getRelation`, params }) + } +} + // 查询量产件备件关系详情 export const getProductionitemcodeSpareitemcode = async (id: number) => { return await request.get({ url: `/wms/productionitemcode-spareitemcode/get?id=` + id }) diff --git a/src/api/wms/remark/index.ts b/src/api/wms/remark/index.ts index 7a1ac3642..3ee317540 100644 --- a/src/api/wms/remark/index.ts +++ b/src/api/wms/remark/index.ts @@ -10,5 +10,18 @@ export const createRemark= async (data) => { } // 查询变更记录列表 export const getChangeRecordPage = async (params) => { + params = handleParams(params); return await request.get({ url: `/infra/trends/list`, params }) } +const handleParams = (params) => { + if (params.tableName && params.tableName.trim() !== "") { + // 检查是否包含大写字母 + if (/[A-Z]/.test(params.tableName)) { + params.tableName = toSnakeCase(params.tableName); + } + } + return params; +} +const toSnakeCase = (str) => { + return str.replace(/[A-Z]/g, letter => `_${letter.toLowerCase()}`); +} diff --git a/src/views/qms/inspectionJob/inspectionJobMain.data.ts b/src/views/qms/inspectionJob/inspectionJobMain.data.ts index 9358b43cb..9612b728c 100644 --- a/src/views/qms/inspectionJob/inspectionJobMain.data.ts +++ b/src/views/qms/inspectionJob/inspectionJobMain.data.ts @@ -270,6 +270,18 @@ export const InspectionJobMain = useCrudSchemas( width: 150 } }, + { + label: '完成人', + field: 'completeUser', + sort: 'custom', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', // 默认都是字符串类型其他暂不考虑 + isTable: false, + isDetail: false, + isSearch: true, + isTableForm: false, + isForm: false, + }, // { // label: '检验批来源', // field: 'inspectionBatchSource', @@ -439,6 +451,71 @@ export const InspectionJobMain = useCrudSchemas( // } // } // }, + { + label: '承接人', + field: 'acceptUserName', + table: { + width: 130 + }, + isForm: false, + isTable: false, + isDetail: true + }, + { + label: '承接时间', + field: 'acceptTime', + isForm: false, + table: { + width: 180 + }, + isTable: false, + isDetail: true, + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + form: { + component: 'DatePicker', + componentProps: { + style: { width: '100%' }, + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x' + } + } + }, + + { + label: '完成人', + field: 'completeUserName', + table: { + width: 130 + }, + isForm: false, + isTable: true, + isDetail:true + }, + { + label: '完成时间', + field: 'completeTime', + isForm: false, + table: { + width: 180 + }, + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + form: { + component: 'DatePicker', + componentProps: { + style: { width: '100%' }, + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x' + } + } + }, { label: '创建时间', field: 'createTime', diff --git a/src/views/qms/inspectionScheme/addForm.vue b/src/views/qms/inspectionScheme/addForm.vue index 19d1b72c1..7493373c8 100644 --- a/src/views/qms/inspectionScheme/addForm.vue +++ b/src/views/qms/inspectionScheme/addForm.vue @@ -8,7 +8,7 @@ :vLoading="formLoading" >
- + @@ -833,7 +833,7 @@ const open = async (type: string, row?: any, masterParmas?: any, titleName?: any } let arr = [] list.forEach((item, index) => { - editableTabsValue.value = index + 1 + // editableTabsValue.value = index + 1 item.name = index + 1 console.log(item.inspectionCharacteristicsBaseVO) @@ -886,6 +886,7 @@ const open = async (type: string, row?: any, masterParmas?: any, titleName?: any } arr.push(obj) }) + editableTabsValue.value = 1 data.value.process = arr console.log(111, data.value) }else{ @@ -899,7 +900,7 @@ const open = async (type: string, row?: any, masterParmas?: any, titleName?: any rules.value['inspectionCharacteristicsBaseVO.quantifyLowlimit'][0].required = false rules.value['inspectionCharacteristicsBaseVO.quantifyTarget'][0].required = false list.forEach((item, index) => { - editableTabsValue.value = index + 1 + // editableTabsValue.value = index + 1 item.name = index + 1 // rules.value['inspectionCharacteristicsBaseVO.quantifyCapping'][0].required = true // 编辑判断上限下限目标值是否必填 @@ -919,6 +920,7 @@ const open = async (type: string, row?: any, masterParmas?: any, titleName?: any isShowField.value += 1 //设置isShowField > 0显示aql和检验水平字段 } }) + editableTabsValue.value = 1 // 显示aql和检验水平字段的时候添加必填规则 if (isShowField.value > 0) { rules.value.aql[0].required = true diff --git a/src/views/wms/basicDataManage/itemManage/productionitemcodeSpareitemcode/productionitemcodeSpareitemcode.data.ts b/src/views/wms/basicDataManage/itemManage/productionitemcodeSpareitemcode/productionitemcodeSpareitemcode.data.ts index 2ebe01c0d..cf6f44bf7 100644 --- a/src/views/wms/basicDataManage/itemManage/productionitemcodeSpareitemcode/productionitemcodeSpareitemcode.data.ts +++ b/src/views/wms/basicDataManage/itemManage/productionitemcodeSpareitemcode/productionitemcodeSpareitemcode.data.ts @@ -1,5 +1,7 @@ import type { CrudSchema } from '@/hooks/web/useCrudSchemas' import { dateFormatter } from '@/utils/formatTime' +import * as ItembasicApi from '@/api/wms/itembasic' +import { Itembasic } from '../itembasic/itembasic.data' // 表单校验 export const ProductionitemcodeSpareitemcodeRules = reactive({ @@ -13,12 +15,70 @@ export const ProductionitemcodeSpareitemcode = useCrudSchemas(reactive }) } else if (formField == 'downItemCode') { - row['downItemCode'] = val[0]['code'] + if(row['itemCode'] == val[0]['spareItemCode']){ + row['downItemCode'] = val[0]['productionItemCode'] //量产件 + }else{ + row['downItemCode'] = val[0]['spareItemCode'] //备件 + + } + console.log(row['itemCode']); + // ItembasicApi.getItemListByCodes(row['itemCode']) + + // if(){ + // row['downItemCode'] = val[0]['productionItemCode'] + // }else if(){ + // row['downItemCode'] = val[0]['spareItemCode'] + // } } else if (formField == 'toLocationCode') { row['toLocationCode'] = val[0]['code'] } else { @@ -139,17 +153,7 @@ const searchTableSuccessDetail = (formField, searchField, val, formRef) => { RelegateRequestDetail.allSchemas.tableFormColumns.map(item => { if (item.field == 'itemCode') { item.tableForm.searchCondition = [ - { - key: 'businessType', - value: businessType, - isMainValue: false - } - // ,{ - // key: 'available', - // value: 'TRUE', - // isMainValue: false - // } - ,{ + { message: '请选择从仓库代码!', key: 'warehouseCode', value: 'fromWarehouseCode', diff --git a/src/views/wms/basicDataManage/itemManage/relegate/relegateRequest/relegateRequestMain.data.ts b/src/views/wms/basicDataManage/itemManage/relegate/relegateRequest/relegateRequestMain.data.ts index 6df677b5e..41bd576fb 100644 --- a/src/views/wms/basicDataManage/itemManage/relegate/relegateRequest/relegateRequestMain.data.ts +++ b/src/views/wms/basicDataManage/itemManage/relegate/relegateRequest/relegateRequestMain.data.ts @@ -17,6 +17,8 @@ import { Location } from '@/views/wms/basicDataManage/factoryModeling/location/l import * as ItempackageApi from '@/api/wms/itempackage' import { Itempackaging } from '@/views/wms/basicDataManage/itemManage/itempackage/itempackage.data' +import * as ProductionitemcodeSpareitemcodeApi from '@/api/wms/productionitemcodeSpareitemcode' +import { ProductionitemcodeSpareitemcode } from '@/views/wms/basicDataManage/itemManage/productionitemcodeSpareitemcode/productionitemcodeSpareitemcode.data' import * as confgiApi from '@/api/infra/config' // 获取自动提交自动通过自动执行,跳过任务直接删生成记录的默认值 const queryParams = { @@ -322,7 +324,7 @@ export const RelegateRequestDetail = useCrudSchemas(reactive([ searchField: 'itemCode', searchTitle: '库存余额信息', searchAllSchemas: Balance.allSchemas, - searchPage: BalanceApi.getBalanceByBusinessTypeByItemType, + searchPage: BalanceApi.getBalanceByBusinessCategoryByItemType, searchCondition: [] } }, @@ -334,7 +336,7 @@ export const RelegateRequestDetail = useCrudSchemas(reactive([ searchField: 'itemCode', // 查询弹窗赋值字段 searchTitle: '库存余额信息', // 查询弹窗标题 searchAllSchemas: Balance.allSchemas, // 查询弹窗所需类 - searchPage: BalanceApi.getBalanceByBusinessTypeByItemType, // 查询弹窗所需分页方法 + searchPage: BalanceApi.getBalanceByBusinessCategoryByItemType, // 查询弹窗所需分页方法 searchCondition:[ // { // key: 'available', @@ -361,19 +363,20 @@ export const RelegateRequestDetail = useCrudSchemas(reactive([ enterSearch: true, isSearchList: true, searchListPlaceholder: '请选择降级物料代码', - searchField: 'code', + searchField: 'productionItemCode', searchTitle: '物料基础信息', - searchAllSchemas: Itembasic.allSchemas, - searchPage: ItembasicApi.getItembasicPage, + searchAllSchemas: ProductionitemcodeSpareitemcode.allSchemas, + searchPage: ProductionitemcodeSpareitemcodeApi.getProductionitemcodeSpareitemcodeRelation, searchCondition: [{ key: 'available', value: 'TRUE', isMainValue: false },{ - key: 'type', - value: confgiData.itemType, - isMainValue: false - }], + key: 'itemCode', + value: 'itemCode', + isTableRowValue: true, + isMainValue:false + }], verificationParams: [{ key: 'code', action: '==', @@ -387,19 +390,20 @@ export const RelegateRequestDetail = useCrudSchemas(reactive([ tableForm:{ isInpuFocusShow: true, searchListPlaceholder: '请选择降级物料代码', // 输入框占位文本 - searchField: 'itemCode', // 查询弹窗赋值字段 + searchField: 'productionItemCode', // 查询弹窗赋值字段 searchTitle: '物料基础信息', // 查询弹窗标题 - searchAllSchemas: Itembasic.allSchemas, // 查询弹窗所需类 - searchPage: ItembasicApi.getItembasicPage, // 查询弹窗所需分页方法 + searchAllSchemas: ProductionitemcodeSpareitemcode.allSchemas, // 查询弹窗所需类 + searchPage: ProductionitemcodeSpareitemcodeApi.getProductionitemcodeSpareitemcodeRelation, // 查询弹窗所需分页方法 searchCondition:[ { key: 'available', value: 'TRUE', isMainValue: false },{ - key: 'type', - value: confgiData.itemType, - isMainValue: false + key: 'itemCode', + value: 'itemCode', + isTableRowValue: true, + isMainValue:false }] }, table: { diff --git a/src/views/wms/basicDataManage/labelManage/callmaterials/callmaterials.data.ts b/src/views/wms/basicDataManage/labelManage/callmaterials/callmaterials.data.ts index 1f380e974..1aa4338dd 100644 --- a/src/views/wms/basicDataManage/labelManage/callmaterials/callmaterials.data.ts +++ b/src/views/wms/basicDataManage/labelManage/callmaterials/callmaterials.data.ts @@ -38,7 +38,7 @@ export const CallmaterialsRules = reactive({ workStationCode: [required], uom: [required], callmaterialQty: [required], - project: [{ max: 50, message: '最多50字符', trigger: 'blur'}] + project: [{ max: 64, message: '最多50字符', trigger: 'blur'}] }) export const Callmaterials = useCrudSchemas(reactive([ @@ -361,7 +361,7 @@ export const Callmaterials = useCrudSchemas(reactive([ } , form: { componentProps:{ - maxlength: 50, + maxlength: 64, type:'textarea', showWordLimit:true } diff --git a/src/views/wms/basicDataManage/strategySetting/strategy/upShelfStrategy/AddForm.vue b/src/views/wms/basicDataManage/strategySetting/strategy/upShelfStrategy/AddForm.vue index df5e5630c..5630a8f98 100644 --- a/src/views/wms/basicDataManage/strategySetting/strategy/upShelfStrategy/AddForm.vue +++ b/src/views/wms/basicDataManage/strategySetting/strategy/upShelfStrategy/AddForm.vue @@ -305,7 +305,8 @@ - * + { + if(warehouseType.value == 'WarehouseCode' && !formData.value.configuration.WarehouseCode){ + // 仓库 + message.error('请选择仓库') + return + // formData.configuration.WarehouseCode + }else if(warehouseType.value == 'AreaCode'&& !formData.value.configuration.AreaCode){ + // 库区 + message.error('请选择库区') + return + }else if(warehouseType.value == 'LocationGroupCode'&&!formData.value.configuration.LocationGroupCode){ + // 库位组 + message.error('请选择库位组') + return + }else if(warehouseType.value == 'LocationCode'&&!formData.value.configuration.LocationCode){ + // 库位 + message.error('请选择库位') + return + } // 校验表单 if (!formRef) return const valid = await formRef.value.validate() @@ -1010,4 +1031,9 @@ const resetForm = () => { ::v-deep .err-120 .el-form-item__error { padding-left: 120px !important; } + +.peizhi { + color: var(--el-color-danger); + margin-right:4px; +} diff --git a/src/views/wms/basicDataManage/subject/mstr/mstr.data.ts b/src/views/wms/basicDataManage/subject/mstr/mstr.data.ts index d0dab3ebd..5fa57785f 100644 --- a/src/views/wms/basicDataManage/subject/mstr/mstr.data.ts +++ b/src/views/wms/basicDataManage/subject/mstr/mstr.data.ts @@ -40,6 +40,18 @@ export const Mstr = useCrudSchemas(reactive([ sort: 'custom', isSearch: true, }, + { + label: '废品账户', + field: 'plScrpAcct', + sort: 'custom', + isSearch: true, + }, + { + label: '盘点差异账户', + field: 'plDscrAcct', + sort: 'custom', + isSearch: true, + }, { label: '创建时间', field: 'createTime', diff --git a/src/views/wms/countManage/count/countJobMain/countJobMain.data.ts b/src/views/wms/countManage/count/countJobMain/countJobMain.data.ts index 9c0fe1ba0..921fb99b5 100644 --- a/src/views/wms/countManage/count/countJobMain/countJobMain.data.ts +++ b/src/views/wms/countManage/count/countJobMain/countJobMain.data.ts @@ -512,7 +512,7 @@ export const CountJobMain = useCrudSchemas(reactive([ isDetail: false, isForm: false, table: { - width: 220, + width: 250, fixed: 'right' }, } diff --git a/src/views/wms/countManage/count/countJobMain/index.vue b/src/views/wms/countManage/count/countJobMain/index.vue index ecfb80699..690575907 100644 --- a/src/views/wms/countManage/count/countJobMain/index.vue +++ b/src/views/wms/countManage/count/countJobMain/index.vue @@ -215,6 +215,15 @@ const butttondata = (row,$index) => { hasPermi: '' // wms:count-job-main:importCountJob }, defaultButtons.mainListJobAbaBtn({hide:isShowMainButton(row,['2'])}), // 放弃 + { + label: '完成', + name: 'done', + hide: isShowMainButton(row,[]), + type: 'success', + color: '', + link: true, //文本展现按钮 + hasPermi: '' // wms:count-job-main:importCountJob + }, // defaultButtons.mainListJobExeBtn({hide:isShowMainButton(row,['2'])}), // 执行 ] } @@ -237,7 +246,10 @@ const buttonTableClick = async (val, row) => { handleExportCountJob(row.id,row.number) } else if( val == 'importCountJob'){ // 导入 handleImport(row.id) + } else if( val == 'done'){ // 完成 + handleDone(row.id) } + } /** 关闭按钮操作 */ @@ -249,6 +261,18 @@ const handleClose = async (id: number) => { await getList() } catch {} } +// 完成 +const handleDone = async (id: number) => { + try { + await message.confirm('确认完成吗?') + await CountJobMainApi.doneCountJobMain(id) + await getList() + } catch { + + } +} + + // 获取部门 用于详情 部门回显 const { wsCache } = useCache() /** 详情操作 */ diff --git a/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRequestMain/index.vue b/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRequestMain/index.vue index 3049ec147..55b13a0a2 100644 --- a/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRequestMain/index.vue +++ b/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRequestMain/index.vue @@ -114,8 +114,8 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => if (type == 'tableForm') { // 明细查询页赋值 if(formField === 'itemCode'){ - let newRow = JSON.parse(JSON.stringify(tableFormKeys)) val.forEach(item=>{ + let newRow = JSON.parse(JSON.stringify(tableFormKeys)) newRow[formField] =item[searchField] newRow['packingNumber'] = item['packingNumber'] newRow['containerNumber'] = item['containerNumber'] diff --git a/src/views/wms/issueManage/productionreturn/productionreturnRequestMainNo/index.vue b/src/views/wms/issueManage/productionreturn/productionreturnRequestMainNo/index.vue index 1738c8fb9..660783b9f 100644 --- a/src/views/wms/issueManage/productionreturn/productionreturnRequestMainNo/index.vue +++ b/src/views/wms/issueManage/productionreturn/productionreturnRequestMainNo/index.vue @@ -42,8 +42,10 @@ { const handleDeleteTable = (item, index) => { tableData.value.splice(index, 1) } +const tableSelectionDelete = (selection) => { + tableData.value = tableData.value.filter(item => !selection.includes(item)) +} // 主子数据 提交 const submitForm = async (formType, submitData) => { diff --git a/src/views/wms/issueManage/productionreturn/productionreturnRequestMainNo/productionreturnRequestMainNo.data.ts b/src/views/wms/issueManage/productionreturn/productionreturnRequestMainNo/productionreturnRequestMainNo.data.ts index eed4bc467..8cb210b04 100644 --- a/src/views/wms/issueManage/productionreturn/productionreturnRequestMainNo/productionreturnRequestMainNo.data.ts +++ b/src/views/wms/issueManage/productionreturn/productionreturnRequestMainNo/productionreturnRequestMainNo.data.ts @@ -127,7 +127,18 @@ export const ProductionreturnRequestDetail = useCrudSchemas(reactive