diff --git a/.env.development b/.env.development index 2f7bcbecf..c51be5f22 100644 --- a/.env.development +++ b/.env.development @@ -4,7 +4,12 @@ NODE_ENV=development VITE_DEV=false # 请求路径 -VITE_BASE_URL='http://localhost:12080' +# VITE_BASE_URL='http://localhost:12080' +# VITE_BASE_URL='http://192.168.1.49:12080' +# VITE_BASE_URL='http://192.168.1.254:12080' +VITE_BASE_URL='http://dev.ccwin-in.com:28050/api' +# VITE_BASE_URL='http://dev.ccwin-in.com:28040/api' +# VITE_BASE_URL='http://192.168.1.254:12080' # 上传路径 VITE_UPLOAD_URL='http://localhost:12080/admin-api/infra/file/upload' diff --git a/README.md b/README.md index 2953275d5..284f3f170 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ form: { value:'undefined',//默认值,设置为'undefined'-->实际是undefined(解决SelectV2不显示占位符placeholder) enterSearch: true, //可输入回车 对应绑定事件:@onEnter="onEnter" isSearchList: true, // 开启查询弹窗 - searchListPlaceholder: '请选择物料代码', // 输入框占位文本 + searchListPlaceholder: '请选择品番', // 输入框占位文本 searchField: 'itemCode', // 查询弹窗赋值字段 searchTitle: '生产线物料关系信息', // 查询弹窗标题 hiddenFilterButton:true,//是否隐藏筛选按钮 diff --git a/package.json b/package.json index 2e2eb6e88..6fe857591 100644 --- a/package.json +++ b/package.json @@ -32,6 +32,7 @@ "cropperjs": "^1.6.1", "crypto-js": "^4.1.1", "dayjs": "^1.11.10", + "decimal.js": "^10.4.3", "diagram-js": "^12.3.0", "echarts": "^5.4.3", "echarts-wordcloud": "^2.1.0", diff --git a/src/api/home/index.ts b/src/api/home/index.ts index bd8ef5eb9..092262a85 100644 --- a/src/api/home/index.ts +++ b/src/api/home/index.ts @@ -4,7 +4,10 @@ import request from '@/config/axios' export const getSupplierData = async () => { return await request.get({ url: `/wms/index/indexSupplier` }) } - +// WMS首页 +export const getWmsData = async () => { + return await request.get({ url: `/wms/index/indexWMS` }) +} // 原料管理员首页 export const getMaterialData = async () => { return await request.get({ url: `/wms/index/indexMaterial` }) diff --git a/src/api/wms/demandforecastingDetail/index.ts b/src/api/wms/demandforecastingDetail/index.ts index 944d0f0fd..e900faf38 100644 --- a/src/api/wms/demandforecastingDetail/index.ts +++ b/src/api/wms/demandforecastingDetail/index.ts @@ -55,7 +55,7 @@ const getPageParams = (params)=>{ } params.supplierCode = '' - // 物料代码 + // 品番 if(params.itemCode&¶ms.itemCode.length>0){ let keyValue = params.itemCode.split(' ') keyValue.forEach(item=>{item = item.trim()}) diff --git a/src/api/wms/demandforecastingMain/index.ts b/src/api/wms/demandforecastingMain/index.ts index cbb7bfb59..3d4481fbd 100644 --- a/src/api/wms/demandforecastingMain/index.ts +++ b/src/api/wms/demandforecastingMain/index.ts @@ -104,7 +104,7 @@ const getPageParams = (params)=>{ } params.supplierCode = '' - // 物料代码 + // 品番 if(params.itemCode&¶ms.itemCode.length>0){ let keyValue = params.itemCode.split(' ') keyValue.forEach(item=>{item = item.trim()}) @@ -133,6 +133,18 @@ export const exportDemandforecastingMain = async (params) => { } } +// 导出要货预测主 Excel +export const exportDemandforecastingPlannnerMain = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return request.post({ url: '/wms/demandforecasting-main/export-excel-senior', data }) + } else { + params = getPageParams(params) + return await request.download({ url: `/wms/demandforecasting-main/export-excel-planner`, params }) + } +} + // 下载用户导入模板 export const importTemplate = () => { return request.download({ url: '/wms/demandforecasting-main/get-import-template' }) @@ -156,4 +168,8 @@ export const updateIsRead = async (data) => { return await request.post({ url: `/wms/demandforecasting-main/updateIsRead`,data }) } +export const publish = async (data) => { + return await request.post({ url: `/wms/demandforecasting-main/publishDemandForecast`,data }) +} + diff --git a/src/api/wms/inventoryinitRecordDetail/index.ts b/src/api/wms/inventoryinitRecordDetail/index.ts index fe2d27f22..ad5e93142 100644 --- a/src/api/wms/inventoryinitRecordDetail/index.ts +++ b/src/api/wms/inventoryinitRecordDetail/index.ts @@ -77,4 +77,9 @@ export const importTemplate = () => { // 批量打印 export const printLabelBatchByIdSelection = async (data: any) => { return await request.post({ url: `/wms/inventoryinit-record-main/printLabelBatchById` ,data}) +} + +// 批量打印 +export const printLabelBatchByIdSelectionForYT = async (data: any) => { + return await request.post({ url: `/wms/inventoryinit-record-main/printLabelBatchByIdForYT` ,data}) } \ No newline at end of file diff --git a/src/api/wms/itembasic/index.ts b/src/api/wms/itembasic/index.ts index 900d8475d..6af9d1007 100644 --- a/src/api/wms/itembasic/index.ts +++ b/src/api/wms/itembasic/index.ts @@ -122,7 +122,7 @@ export const selectConfigToItembasic = async (params) => { } } -// 根据物料代码查计量单位 +// 根据品番查计量单位 export const getQueryItemCodeInfo = async (data) => { return await request.post({ url: 'wms/itembasic/queryItemCodeInfo', data }) } diff --git a/src/api/wms/package/index.ts b/src/api/wms/package/index.ts index 6bb42be07..52fa6a9c2 100644 --- a/src/api/wms/package/index.ts +++ b/src/api/wms/package/index.ts @@ -122,6 +122,11 @@ export const batchPrintingLables = async (data: any) => { return await request.post({ url: `/wms/package/batchPrintingLables`, data }) } +// 批量打印标签英泰多选 +export const batchPrintingLablesForYT = async (data: any) => { + return await request.post({ url: `/wms/package/batchPrintingLablesForYT`, data }) +} + // 打印标签获取包装列表 export const getLabel = async (id: number) => { return await request.get({ url: `/wms/package/getLabel?id=` + id }) @@ -159,3 +164,8 @@ export const getBalanceToPackageByIntex = async (itemCode: String,batch: String) export const getBalanceToPackageSelection = async (data: any) => { return await request.post({ url: `/wms/balance/batchPrintLabel` ,data}) } + +// 获取包装信息 +export const getPackageByBarbasic = async (relateNumber) => { + return await request.get({ url: `/wms/package/getPackageByBarbasic?relateNumber=${relateNumber}`}) +} diff --git a/src/api/wms/supplierdeliverRecordDetail/index.ts b/src/api/wms/supplierdeliverRecordDetail/index.ts index 2efc8aa17..7ddd52e08 100644 --- a/src/api/wms/supplierdeliverRecordDetail/index.ts +++ b/src/api/wms/supplierdeliverRecordDetail/index.ts @@ -95,4 +95,16 @@ export const queryChildPickingNumber = async (params) => { } else { return await request.get({ url: `/wms/supplierdeliver-record-detail/queryChildPickingNumberPage`, params }) } +} + +// 查询供应商发货记录 +// 查询供应商发货记录子列表 +export const getSupplierdeliverRecordDetailPageWMS = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/wms/supplierdeliver-record-detail/seniorWMS', data }) + } else { + return await request.get({ url: `/wms/supplierdeliver-record-detail/pageWMS`, params }) + } } \ No newline at end of file diff --git a/src/api/wms/supplierinvoiceInvoiced/index.ts b/src/api/wms/supplierinvoiceInvoiced/index.ts index 9be7c7d15..85baf8e41 100644 --- a/src/api/wms/supplierinvoiceInvoiced/index.ts +++ b/src/api/wms/supplierinvoiceInvoiced/index.ts @@ -58,7 +58,10 @@ export const deleteSupplierinvoiceInvoiced = async (id: number) => { export const exportSupplierinvoiceInvoiced = async (params) => { return await request.download({ url: `/wms/supplierinvoice-invoiced/export-excel`, params }) } - +// 导出待开票 Excel +export const exportSupplierinvoiceInvoicedWork = async (params) => { + return await request.download({ url: `/wms/supplierinvoice-invoiced/export-excel-work`, params }) +} // 下载用户导入模板 export const importTemplate = () => { return request.download({ url: '/wms/supplierinvoice-invoiced/get-import-template' }) diff --git a/src/components/Descriptions/src/Descriptions.vue b/src/components/Descriptions/src/Descriptions.vue index ca9f37c87..98488d09a 100644 --- a/src/components/Descriptions/src/Descriptions.vue +++ b/src/components/Descriptions/src/Descriptions.vue @@ -38,6 +38,7 @@ const props = defineProps({ default: () => ({}) } }) +const schema = ref(props.schema) const { getPrefixCls } = useDesign() @@ -82,6 +83,20 @@ const showAll = () =>{ isShow.value = !isShow.value } + +// 默认排序 +const updateSort = (val) => { + console.log(999,val) + val.forEach(item=>{ + if(!item.sortDetailDefault){ + item.sortDetailDefault = 999 // 默认999 + } + }) + val.sort((column1,column2)=>{ + return column1.sortDetailDefault - column2.sortDetailDefault + }) +} +updateSort(schema.value) \ No newline at end of file + diff --git a/src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingSupplierMain/demandforecastingMain.data.ts b/src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingSupplierMain/demandforecastingMain.data.ts index 2ffc91738..64ed8c744 100644 --- a/src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingSupplierMain/demandforecastingMain.data.ts +++ b/src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingSupplierMain/demandforecastingMain.data.ts @@ -38,7 +38,7 @@ export const Version = useCrudSchemas(reactive([ sort: 'custom', }, { - label: '物料代码', + label: '品番', field: 'itemCode', isSearch:true, sort: 'custom', @@ -75,7 +75,7 @@ export const DemandforecastingMain = useCrudSchemas(reactive([ } }, { - label: '物料代码', + label: '品番', field: 'itemCode', sort: 'custom', table: { @@ -90,7 +90,7 @@ export const DemandforecastingMain = useCrudSchemas(reactive([ multiple: true, enterSearch: true, isSearchList: true, // 开启查询弹窗 - searchListPlaceholder: '请选择物料代码', // 输入框占位文本 + searchListPlaceholder: '请选择品番', // 输入框占位文本 searchField: 'itemCode', // 查询弹窗赋值字段 searchTitle: '物料基础信息', // 查询弹窗标题 searchAllSchemas: Supplieritem.allSchemas, // 查询弹窗所需类 @@ -109,6 +109,16 @@ export const DemandforecastingMain = useCrudSchemas(reactive([ } } }, + { + label: '背番', + field: 'backNumber', + sort: 'custom', + isSearch: true, +hiddenSearchHigh:true, + table: { + width: 150 + }, + }, { label: '版本号', field: 'version', @@ -137,7 +147,7 @@ export const DemandforecastingMain = useCrudSchemas(reactive([ },{ key: 'itemCodes', value: 'itemCode', - message: '请填写物料代码!', + message: '请填写品番!', isMainValue: true, isCSV:true,//是否用逗号分隔参数 },{ @@ -390,7 +400,7 @@ export const DemandforecastingDetailRules = reactive({ { required: true, message: '请输入单据号', trigger: 'blur' } ], itemCode: [ - { required: true, message: '请选择物料代码', trigger: 'change' } + { required: true, message: '请选择品番', trigger: 'change' } ], remark: [ { max: 50, message: '不得超过50个字符', trigger: 'blur' } diff --git a/src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingSupplierMain/index.vue b/src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingSupplierMain/index.vue index 49eb20d07..590f4cbe8 100644 --- a/src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingSupplierMain/index.vue +++ b/src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingSupplierMain/index.vue @@ -76,7 +76,7 @@ const searchQueryTableSuccess = (formField, searchField, val, formRef, type, row nextTick(() => { const setV = {} if(formField == 'supplierCode'||formField == 'itemCode'||formField == 'version'){ - //供应商代码 物料代码 版本号 + //供应商代码 品番 版本号 let list = [] val.forEach(item=>{ list.push(item[searchField]) @@ -136,7 +136,7 @@ watch(()=>tableObject.currentPage,async ()=>{ }) // 列表头部按钮 const HeadButttondata = [ - defaultButtons.defaultExportBtn({hasPermi:'wms:demandforecasting-main:export'}), // 导出 + defaultButtons.defaultExportBtn({hasPermi:'wms:demandforecastingSupplier-main:export'}), // 导出 defaultButtons.defaultFreshBtn(null), // 刷新 // defaultButtons.defaultFilterBtn(null), // 筛选 defaultButtons.defaultSetBtn(null), // 设置 @@ -180,6 +180,7 @@ const buttonBaseClick = async (val, item) => { const searchClick = async (data)=>{ data.flag = 1 + data.status = 2 console.log('searchClick',data) await setSearchParamsHead(data) // updateDateTableColumns() @@ -290,4 +291,4 @@ onMounted(async () => { color:var(--el-color-success); font-weight:700; } - \ No newline at end of file + diff --git a/src/views/wms/purchasereceiptManage/supplierdeliver/purchaseMain/index.vue b/src/views/wms/purchasereceiptManage/supplierdeliver/purchaseMain/index.vue index 2f29232e5..6128dfc92 100644 --- a/src/views/wms/purchasereceiptManage/supplierdeliver/purchaseMain/index.vue +++ b/src/views/wms/purchasereceiptManage/supplierdeliver/purchaseMain/index.vue @@ -148,7 +148,7 @@ console.log('PurchaseMain.allSchemas.searchSchema',PurchaseMain.allSchemas.searc }) } if(repeatCode.length>0){ - message.warning(`${t('ts.物料代码')}${repeatCode.join(',')}${t('ts.已经存在')}`); + message.warning(`${t('ts.品番')}${repeatCode.join(',')}${t('ts.已经存在')}`); } if(val.length>0){ //frm表单回显 diff --git a/src/views/wms/purchasereceiptManage/supplierdeliver/purchaseMain/purchaseMain.data.ts b/src/views/wms/purchasereceiptManage/supplierdeliver/purchaseMain/purchaseMain.data.ts index f4f225edb..3988ef713 100644 --- a/src/views/wms/purchasereceiptManage/supplierdeliver/purchaseMain/purchaseMain.data.ts +++ b/src/views/wms/purchasereceiptManage/supplierdeliver/purchaseMain/purchaseMain.data.ts @@ -17,11 +17,33 @@ export const PurchaseMain = useCrudSchemas(reactive([ sort: 'custom', isSearch: true, isForm: false, + sortTableDefault: 1, table: { width: 180, fixed: 'left' }, }, + { + label: '状态', + field: 'status', + dictType: DICT_TYPE.PURCHASE_ORDER_STATUS, + dictClass: 'string', + isTable: true, + isForm: false, + isSearch: true, + sortSearchDefault: 1000, + sortTableDefault: 2, + sort: 'custom', + table: { + width: 150 + }, + form: { + value: '1', + componentProps: { + disabled: true + } + } + }, { label: '供应商代码', field: 'supplierCode', @@ -31,7 +53,7 @@ export const PurchaseMain = useCrudSchemas(reactive([ width: 150 }, form: { - labelMessage: '影响明细中物料代码,需在供应商物料中维护', + labelMessage: '影响明细中品番,需在供应商物料中维护', componentProps: { enterSearch: true, isSearchList: true, // 开启查询弹窗 @@ -54,54 +76,50 @@ export const PurchaseMain = useCrudSchemas(reactive([ isFormModel: true }], // 失去焦点校验参数 } - } - }, - { - label: '订单类型', - field: 'type', - dictType: DICT_TYPE.PURCHASE_ORDER_TYPE, - dictClass: 'string', - isTable: true, - isSearch: true, - sort: 'custom', - table: { - width: 150 }, + sortTableDefault: 3, }, { - label: '行类型', - field: 'poLineType', + label: '供应商名称', + field: 'supplierName', + dictClass: 'string', isTable: true, - isSearch: true, + isSearch: false, + isForm: false, sort: 'custom', + sortTableDefault:4, table: { width: 150 }, }, { - label: '状态', - field: 'status', - dictType: DICT_TYPE.PURCHASE_ORDER_STATUS, + label: '订单类型', + field: 'type', + dictType: DICT_TYPE.PURCHASE_ORDER_TYPE, dictClass: 'string', isTable: true, - isForm:false, isSearch: true, - sortSearchDefault:1000, sort: 'custom', + sortTableDefault: 5, table: { width: 150 }, - form: { - value: '1', - componentProps: { - disabled: true - } - } }, + // { + // label: '行类型', + // field: 'poLineType', + // isTable: false, + // isSearch: true, + // sort: 'custom', + // table: { + // width: 150 + // }, + // }, + { label: '订单日期', field: 'orderDate', - isTable: true, + isTable: false, formatter: dateFormatter2, detail: { dateFormat: 'YYYY-MM-DD' @@ -110,6 +128,7 @@ export const PurchaseMain = useCrudSchemas(reactive([ table: { width: 180 }, + sortTableDefault: 6, form: { component: 'DatePicker', componentProps: { @@ -134,6 +153,7 @@ export const PurchaseMain = useCrudSchemas(reactive([ table: { width: 180 }, + sortTableDefault: 7, form: { component: 'DatePicker', componentProps: { @@ -144,6 +164,15 @@ export const PurchaseMain = useCrudSchemas(reactive([ } }, }, + { + label: '版本', + field: 'version', + sort: 'custom', + isTable: false, + table: { + width: 150 + }, + }, { label: '税率', field: 'taxRate', @@ -151,6 +180,7 @@ export const PurchaseMain = useCrudSchemas(reactive([ table: { width: 150 }, + isTable: false, form: { component: 'InputNumber', componentProps: { @@ -162,52 +192,41 @@ export const PurchaseMain = useCrudSchemas(reactive([ } }, { - label: '订单备注', - field: 'poRmks', + label: '支付周期', + field: 'paymentCycle', sort: 'custom', - isTable:true, - isForm:false, + isTable: false, + isForm: false, table: { width: 150 }, }, - { - label: '管理编号', - field: 'poContract', + label: '联系人姓名', + field: 'contactName', sort: 'custom', - isTable:true, - isForm:false, + isTable: false, table: { width: 150 }, }, { - label: '版本', - field: 'version', + label: '联系人电话', + field: 'contactPhone', sort: 'custom', - isTable:false, + isTable: false, table: { width: 150 }, }, { - label: '当前阶段', - field: 'currentStage', + label: '联系人电子邮件', + field: 'contactEmail', sort: 'custom', + isTable: false, table: { width: 150 }, - form: { - component: 'InputNumber', - componentProps: { - style: {width:'100%'}, - min: 0 - } - }, - isTableForm: false, - isForm: false, - isTable:false, }, { label: '是否寄存订单', @@ -219,7 +238,7 @@ export const PurchaseMain = useCrudSchemas(reactive([ table: { width: 150 }, - isForm:false, + isForm: false, form: { component: 'Switch', value: 'TRUE', @@ -230,54 +249,27 @@ export const PurchaseMain = useCrudSchemas(reactive([ }, }, { - label: '是否可用', - field: 'available', - dictType: DICT_TYPE.TRUE_FALSE, - dictClass: 'string', - isTable: false, + label: '订单备注', + field: 'poRmks', sort: 'custom', - table: { - width: 150 - }, + isTable: false, isForm:false, - form: { - component: 'Switch', - value: 'TRUE', - componentProps: { - inactiveValue: 'FALSE', - activeValue: 'TRUE', - disabled: true - } - }, - }, - { - label: '联系人姓名', - field: 'contactName', - sort: 'custom', - isTable:false, - table: { - width: 150 - }, - }, - { - label: '联系人电话', - field: 'contactPhone', - sort: 'custom', - isTable:false, table: { width: 150 }, }, + { - label: '联系人电子邮件', - field: 'contactEmail', + label: '管理编号', + field: 'poContract', sort: 'custom', - isTable:false, + isTable:true, + isForm:false, table: { width: 150 }, }, - + { label: '业务类型', field: 'businessType', @@ -294,20 +286,52 @@ export const PurchaseMain = useCrudSchemas(reactive([ } } }, + + { + label: '数据来源区分', + field: 'dataSource', + sort: 'custom', + table: { + width: 150 + }, + isForm: false, + isTable: false, + form: { + } + }, + // { + // label: '当前阶段', + // field: 'currentStage', + // sort: 'custom', + // table: { + // width: 150 + // }, + // form: { + // component: 'InputNumber', + // componentProps: { + // style: {width:'100%'}, + // min: 0 + // } + // }, + // isTableForm: false, + // isForm: false, + // isTable:false, + // }, { label: '创建者', field: 'creator', sort: 'custom', isForm: false, - isTable:false, + isTable: true, table: { width: 150 }, + sortTableDefault: 1000, }, { label: '创建时间', field: 'createTime', - isTable:false, + isTable:true, formatter: dateFormatter, detail: { dateFormat: 'YYYY-MM-DD HH:mm:ss' @@ -335,48 +359,17 @@ export const PurchaseMain = useCrudSchemas(reactive([ defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] } }, + sortTableDefault: 1000, }, - { - label: '最后更新者', - field: 'updater', - sort: 'custom', - isForm: false, - isTable:false, - table: { - width: 150 - }, - }, - { - label: '最后更新时间', - field: 'updateTime', - isTable: false, - formatter: dateFormatter, - detail: { - dateFormat: 'YYYY-MM-DD HH:mm:ss' - }, - sort: 'custom', - isForm: false, - table: { - width: 180 - }, - form: { - component: 'DatePicker', - componentProps: { - style: {width:'100%'}, - type: 'datetime', - dateFormat: 'YYYY-MM-DD HH:mm:ss', - valueFormat: 'x', - } - }, - }, - { - label: '备注', - field: 'remark', - isTable: false, - table: { - width: 150 - }, - }, + + // { + // label: '备注', + // field: 'remark', + // isTable: false, + // table: { + // width: 150 + // }, + // }, { label: '操作', field: 'action', @@ -432,20 +425,6 @@ export const PurchaseMainRules = reactive({ * @returns {Array} 采购订单子表 */ export const PurchaseDetail = useCrudSchemas(reactive([ - { - label: '单据号', - field: 'number', - isTableForm: false, - hiddenInMain:true, - table: { - width: 180 - }, - form: { - componentProps: { - disabled: true - } - } - }, { label: '行号', field: 'lineNumber', @@ -458,7 +437,7 @@ export const PurchaseDetail = useCrudSchemas(reactive([ } }, { - label: '物料代码', + label: '品番', field: 'itemCode', isSearch: true, table: { @@ -527,29 +506,30 @@ export const PurchaseDetail = useCrudSchemas(reactive([ } } }, - { - label: '计量单位', - field: 'uom', - sort: 'custom', - dictType: DICT_TYPE.UOM, - dictClass: 'string', - isTable: true, - isTableForm:true, - form:{ - componentProps: { - disabled:true - } + { + label: '背番', + field: 'backNumber', + table: { + width: 150 }, + isSearch:true, + hiddenSearchHigh:true, tableForm:{ - disabled: true, - type:'Select', - }, + disabled:true, + } + }, + { + label: '行类型', + field: 'poLineType', + isTable: true, + isSearch: false, + sort: 'custom', table: { width: 150 }, - }, + }, { - label: '订单数量', + label: '采购订单数量', field: 'orderQty', table: { width: 150 @@ -557,78 +537,86 @@ export const PurchaseDetail = useCrudSchemas(reactive([ form: { component: 'InputNumber', componentProps: { - disabled:false, + disabled: false, min: 1, precision: 6 } }, tableForm: { - disabled:false, - hidden:false, + disabled: false, + hidden: false, type: 'InputNumber', min: 1, precision: 6 }, }, { - label: '默认收货库区', - field: 'defaultAreaCode', + label: '采购标包数量', + field: 'purchaseStdQty', table: { width: 150 }, form: { + component: 'InputNumber', componentProps: { - disabled: true + disabled: false, + min: 1, + precision: 6 } }, - isTableForm: false, - isForm: false, - isTable: true, + hiddenInMain: true, + tableForm: { + disabled: false, + hidden: false, + type: 'InputNumber', + min: 1, + precision: 6 + }, }, { - label: '库区描述', - field: 'areaDescription', - table: { - width: 150 - }, + label: '采购计量单位', + field: 'purchaseStdUom', + sort: 'custom', + dictType: DICT_TYPE.UOM, + dictClass: 'string', + isTable: true, + isTableForm: true, form: { componentProps: { disabled: true } }, - isTableForm: false, - isForm: false, - isTable: true, + tableForm: { + disabled: true, + type: 'Select', + }, + table: { + width: 150 + }, }, - // { - // label: 'ERP库位', - // field: 'erpLocationCode', - // dictType : DICT_TYPE.ERP_LOCATION, - // dictClass: 'string', - // table: { - // width: 150 - // }, - // hiddenInMain:true, - // isTableForm: false, - // isForm: false, - // }, { - label: '项目代码', - field: 'projectCode', + label: '转换率', + field: 'convertRate', + form: { + component: 'InputNumber', + componentProps: { + min: 0 + } + }, + hiddenInMain: true, table: { width: 150 }, - hiddenInMain:true, isTableForm: false, isForm: false, }, { - label: '包装数量', - field: 'packQty', - hiddenInMain:true, + label: t('ts.单价'), + field: 'singlePrice', table: { width: 150 }, + hiddenInMain: true, form: { component: 'InputNumber', componentProps: { @@ -637,25 +625,29 @@ export const PurchaseDetail = useCrudSchemas(reactive([ } }, isTableForm: false, - isForm: false, + isForm: false }, { - label: '包装规格', - hiddenInMain:true, - field: 'packUnit', - // dictType: DICT_TYPE.PACK_UNIT, - // dictClass: 'string', - isTable: true, + label: '金额', + field: 'amount', table: { width: 150 }, + hiddenInMain: true, + form: { + component: 'InputNumber', + componentProps: { + min: 1, + precision: 6 + } + }, isTableForm: false, - isForm: false, + isForm: false }, { - label: '供应商计量数量', - field: 'supplierQty', - hiddenInMain:true, + label: '库存标包数量', + field: 'packQty', + hiddenInMain: true, table: { width: 150 }, @@ -669,13 +661,14 @@ export const PurchaseDetail = useCrudSchemas(reactive([ isTableForm: false, isForm: false, }, + { - label: '供应商计量单位', - field: 'supplierUom', - dictType: DICT_TYPE.UOM, - dictClass: 'string', + label: '库存标包规格', + hiddenInMain: true, + field: 'packUnit', + // dictType: DICT_TYPE.PACK_UNIT, + // dictClass: 'string', isTable: true, - hiddenInMain:true, table: { width: 150 }, @@ -683,42 +676,60 @@ export const PurchaseDetail = useCrudSchemas(reactive([ isForm: false, }, { - label: '转换率', - field: 'convertRate', + label: '库存计量单位', + field: 'uom', + sort: 'custom', + dictType: DICT_TYPE.UOM, + dictClass: 'string', + isTable: true, + isTableForm: true, + hiddenInMain: true, form: { - component: 'InputNumber', componentProps: { - min: 0 + disabled: true } }, - hiddenInMain:true, - table: { + tableForm: { + disabled: true, + type: 'Select', + }, + table: { width: 150 }, - isTableForm: false, - isForm: false, }, + + // { - // label: t('ts.已计划数量'), - // field: 'plannedQty', + // label: 'ERP库位', + // field: 'erpLocationCode', + // dictType : DICT_TYPE.ERP_LOCATION, + // dictClass: 'string', // table: { // width: 150 // }, // hiddenInMain:true, - // form: { - // component: 'InputNumber', - // componentProps: { - // min: 1, - // precision: 6 - // }, - // value: 1 - // }, // isTableForm: false, // isForm: false, + // isTable: false, // }, { - label: t('ts.已发货数量'), - field: 'shippedQty', + label: '默认收货库区', + field: 'defaultAreaCode', + table: { + width: 150 + }, + form: { + componentProps: { + disabled: true + } + }, + isTableForm: false, + isForm: false, + isTable: true, + }, + { + label: '已计划采购数量', + field: 'plannedPurchaseQty', table: { width: 150 }, @@ -735,30 +746,30 @@ export const PurchaseDetail = useCrudSchemas(reactive([ isForm: false, }, { - label: t('ts.已收货数量'), - field: 'receivedQty', + label: '已发货采购数量', + field: 'shippedPurchaseQty', table: { width: 150 }, - hiddenInMain:true, + hiddenInMain: true, form: { component: 'InputNumber', - value: 0, componentProps: { min: 1, precision: 6 - } + }, + value: 1 }, isTableForm: false, - isForm: false + isForm: false, }, { - label: t('ts.已退货数量'), - field: 'returnedQty', + label: '已收货采购数量', + field: 'receivedPurchaseQty', table: { width: 150 }, - hiddenInMain:true, + hiddenInMain: true, form: { component: 'InputNumber', value: 0, @@ -771,15 +782,15 @@ export const PurchaseDetail = useCrudSchemas(reactive([ isForm: false }, { - label: t('ts.已上架数量'), - field: 'putawayQty', + label:'已退货采购数量', + field: 'returnedPurchaseQty', table: { width: 150 }, - hiddenInMain:true, + hiddenInMain: true, form: { component: 'InputNumber', - value: 1, + value: 0, componentProps: { min: 1, precision: 6 @@ -789,14 +800,15 @@ export const PurchaseDetail = useCrudSchemas(reactive([ isForm: false }, { - label: t('ts.单价'), - field: 'singlePrice', + label: "已上架采购数量", + field: 'putawayPurchaseQty', table: { width: 150 }, - hiddenInMain:true, + hiddenInMain: true, form: { component: 'InputNumber', + value: 1, componentProps: { min: 1, precision: 6 @@ -805,48 +817,69 @@ export const PurchaseDetail = useCrudSchemas(reactive([ isTableForm: false, isForm: false }, + + { - label: '金额', - field: 'amount', + label: '库区描述', + field: 'areaDescription', table: { width: 150 }, - hiddenInMain:true, + hiddenInMain: true, form: { - component: 'InputNumber', componentProps: { - min: 1, - precision: 6 + disabled: true } }, isTableForm: false, - isForm: false + isForm: false, + isTable: false, }, + { - label: '是否可用', - field: 'available', - dictType: DICT_TYPE.TRUE_FALSE, - dictClass: 'string', - isTable: true, + label: '项目代码', + field: 'projectCode', table: { width: 150 }, + hiddenInMain: true, + isTableForm: false, + isForm: false, + isTable: false, + }, + + { + label: '供应商计量数量', + field: 'supplierQty', hiddenInMain:true, - tableForm:{ - type:'Select', - default: 'TRUE', - inactiveValue: 'FALSE', - activeValue: 'TRUE' + table: { + width: 150 }, form: { - component: 'Switch', - value: 'TRUE', + component: 'InputNumber', componentProps: { - inactiveValue: 'FALSE', - activeValue: 'TRUE' + min: 1, + precision: 6 } - } + }, + isTableForm: false, + isForm: false, + isTable: false, + }, + { + label: '供应商计量单位', + field: 'supplierUom', + dictType: DICT_TYPE.UOM, + dictClass: 'string', + isTable: false, + hiddenInMain:true, + table: { + width: 150 + }, + isTableForm: false, + isForm: false, }, + { label: '超收百分比', field: 'overReceivingPercent', @@ -867,53 +900,19 @@ export const PurchaseDetail = useCrudSchemas(reactive([ min: 0 } }, - { - label: '创建时间', - field: 'createTime', - isTable: true, - isTableForm: false, - formatter: dateFormatter, - detail: { - dateFormat: 'YYYY-MM-DD HH:mm:ss' - }, - table: { - width: 180 - }, - hiddenInMain:false, - isForm: false, - form: { - component: 'DatePicker', - componentProps: { - style: {width:'100%'}, - type: 'datetime', - dateFormat: 'YYYY-MM-DD HH:mm:ss', - valueFormat: 'x', - } - } - }, - { - label: '创建者', - field: 'creator', - isTableForm: false, - table: { - width: 150 - }, - hiddenInMain:false, - isForm: false, - }, // { - // label: '最后更新时间', - // field: 'updateTime', - // isTableForm: false, + // label: '创建时间', + // field: 'createTime', // isTable: true, - // hiddenInMain:false, + // isTableForm: false, // formatter: dateFormatter, // detail: { // dateFormat: 'YYYY-MM-DD HH:mm:ss' // }, // table: { - // width: 150 + // width: 180 // }, + // hiddenInMain:false, // isForm: false, // form: { // component: 'DatePicker', @@ -926,23 +925,14 @@ export const PurchaseDetail = useCrudSchemas(reactive([ // } // }, // { - // label: '最后更新者', - // field: 'updater', + // label: '创建者', + // field: 'creator', // isTableForm: false, // table: { // width: 150 // }, // hiddenInMain:false, // isForm: false, - // // form: { - // // component: 'DatePicker', - // // componentProps: { - // // style: {width:'100%'}, - // // type: 'datetime', - // // dateFormat: 'YYYY-MM-DD HH:mm:ss', - // // valueFormat: 'x', - // // } - // // } // }, { label: '备注', @@ -951,6 +941,7 @@ export const PurchaseDetail = useCrudSchemas(reactive([ table: { width: 150 }, + isTable: false, }, { label: '操作', @@ -1012,7 +1003,7 @@ export const PurchaseDetailRules = reactive({ { required: true, message: '请输入单据号', trigger: 'blur' } ], itemCode: [ - { required: true, message: '请选择物料代码', trigger: 'change' } + { required: true, message: '请选择品番', trigger: 'change' } ], remark: [ { max: 50, message: '不得超过50个字符', trigger: 'blur' } diff --git a/src/views/wms/purchasereceiptManage/supplierdeliver/purchaseMainWms/index.vue b/src/views/wms/purchasereceiptManage/supplierdeliver/purchaseMainWms/index.vue index fe8028ee6..e0d269122 100644 --- a/src/views/wms/purchasereceiptManage/supplierdeliver/purchaseMainWms/index.vue +++ b/src/views/wms/purchasereceiptManage/supplierdeliver/purchaseMainWms/index.vue @@ -37,7 +37,7 @@ @@ -148,7 +148,7 @@ console.log('PurchaseMain.allSchemas.searchSchema',PurchaseMain.allSchemas.searc }) } if(repeatCode.length>0){ - message.warning(`${t('ts.物料代码')}${repeatCode.join(',')}${t('ts.已经存在')}`); + message.warning(`${t('ts.品番')}${repeatCode.join(',')}${t('ts.已经存在')}`); } if(val.length>0){ //frm表单回显 diff --git a/src/views/wms/purchasereceiptManage/supplierdeliver/purchaseMainWms/purchaseMain.data.ts b/src/views/wms/purchasereceiptManage/supplierdeliver/purchaseMainWms/purchaseMain.data.ts index e3cf86b8e..ac0c2f56b 100644 --- a/src/views/wms/purchasereceiptManage/supplierdeliver/purchaseMainWms/purchaseMain.data.ts +++ b/src/views/wms/purchasereceiptManage/supplierdeliver/purchaseMainWms/purchaseMain.data.ts @@ -1,5 +1,5 @@ import type { CrudSchema } from '@/hooks/web/useCrudSchemas' -import { dateFormatter,dateFormatter2 } from '@/utils/formatTime' +import { dateFormatter, dateFormatter2 } from '@/utils/formatTime' import * as SupplierApi from '@/api/wms/supplier' import { Supplier } from '@/views/wms/basicDataManage/supplierManage/supplier/supplier.data' import * as SupplieritemApi from '@/api/wms/supplieritem' @@ -17,11 +17,33 @@ export const PurchaseMain = useCrudSchemas(reactive([ sort: 'custom', isSearch: true, isForm: false, + sortTableDefault: 1, table: { width: 180, fixed: 'left' }, }, + { + label: '状态', + field: 'status', + dictType: DICT_TYPE.PURCHASE_ORDER_STATUS, + dictClass: 'string', + isTable: true, + isForm: false, + isSearch: true, + sortSearchDefault: 1000, + sortTableDefault: 2, + sort: 'custom', + table: { + width: 150 + }, + form: { + value: '1', + componentProps: { + disabled: true + } + } + }, { label: '供应商代码', field: 'supplierCode', @@ -31,7 +53,7 @@ export const PurchaseMain = useCrudSchemas(reactive([ width: 150 }, form: { - labelMessage: '影响明细中物料代码,需在供应商物料中维护', + labelMessage: '影响明细中品番,需在供应商物料中维护', componentProps: { enterSearch: true, isSearchList: true, // 开启查询弹窗 @@ -54,54 +76,50 @@ export const PurchaseMain = useCrudSchemas(reactive([ isFormModel: true }], // 失去焦点校验参数 } - } - }, - { - label: '订单类型', - field: 'type', - dictType: DICT_TYPE.PURCHASE_ORDER_TYPE, - dictClass: 'string', - isTable: true, - isSearch: true, - sort: 'custom', - table: { - width: 150 }, + sortTableDefault: 3, }, { - label: '行类型', - field: 'poLineType', + label: '供应商名称', + field: 'supplierName', + dictClass: 'string', isTable: true, - isSearch: true, + isSearch: false, + isForm: false, sort: 'custom', + sortTableDefault: 4, table: { width: 150 }, }, { - label: '状态', - field: 'status', - dictType: DICT_TYPE.PURCHASE_ORDER_STATUS, + label: '订单类型', + field: 'type', + dictType: DICT_TYPE.PURCHASE_ORDER_TYPE, dictClass: 'string', isTable: true, - isForm:false, isSearch: true, - sortSearchDefault:1000, sort: 'custom', + sortTableDefault: 5, table: { width: 150 }, - form: { - value: '1', - componentProps: { - disabled: true - } - } }, + // { + // label: '行类型', + // field: 'poLineType', + // isTable: false, + // isSearch: true, + // sort: 'custom', + // table: { + // width: 150 + // }, + // }, + { label: '订单日期', field: 'orderDate', - isTable: true, + isTable: false, formatter: dateFormatter2, detail: { dateFormat: 'YYYY-MM-DD' @@ -110,10 +128,11 @@ export const PurchaseMain = useCrudSchemas(reactive([ table: { width: 180 }, + sortTableDefault: 6, form: { component: 'DatePicker', componentProps: { - style: {width: '100%'}, + style: { width: '100%' }, type: 'date', dateFormat: 'YYYY-MM-DD', valueFormat: 'x', @@ -127,23 +146,33 @@ export const PurchaseMain = useCrudSchemas(reactive([ isTable: false, isForm: false, formatter: dateFormatter2, - detail:{ + detail: { dateFormat: 'YYYY-MM-DD' }, sort: 'custom', table: { width: 180 }, + sortTableDefault: 7, form: { component: 'DatePicker', componentProps: { - style: {width: '100%'}, + style: { width: '100%' }, type: 'date', dateFormat: 'YYYY-MM-DD', valueFormat: 'x', } }, }, + { + label: '版本', + field: 'version', + sort: 'custom', + isTable: false, + table: { + width: 150 + }, + }, { label: '税率', field: 'taxRate', @@ -151,10 +180,11 @@ export const PurchaseMain = useCrudSchemas(reactive([ table: { width: 150 }, + isTable: false, form: { component: 'InputNumber', componentProps: { - style: {width:'100%'}, + style: { width: '100%' }, min: 0, max: 1, precision: 6, @@ -162,52 +192,41 @@ export const PurchaseMain = useCrudSchemas(reactive([ } }, { - label: '订单备注', - field: 'poRmks', + label: '支付周期', + field: 'paymentCycle', sort: 'custom', - isTable:true, - isForm:false, + isTable: false, + isForm: false, table: { width: 150 }, }, - { - label: '管理编号', - field: 'poContract', + label: '联系人姓名', + field: 'contactName', sort: 'custom', - isTable:true, - isForm:false, + isTable: false, table: { width: 150 }, }, { - label: '版本', - field: 'version', + label: '联系人电话', + field: 'contactPhone', sort: 'custom', - isTable:false, + isTable: false, table: { width: 150 }, }, { - label: '当前阶段', - field: 'currentStage', + label: '联系人电子邮件', + field: 'contactEmail', sort: 'custom', + isTable: false, table: { width: 150 }, - form: { - component: 'InputNumber', - componentProps: { - style: {width:'100%'}, - min: 0 - } - }, - isTableForm: false, - isForm: false, - isTable:false, }, { label: '是否寄存订单', @@ -219,7 +238,7 @@ export const PurchaseMain = useCrudSchemas(reactive([ table: { width: 150 }, - isForm:false, + isForm: false, form: { component: 'Switch', value: 'TRUE', @@ -230,54 +249,27 @@ export const PurchaseMain = useCrudSchemas(reactive([ }, }, { - label: '是否可用', - field: 'available', - dictType: DICT_TYPE.TRUE_FALSE, - dictClass: 'string', - isTable: false, - sort: 'custom', - table: { - width: 150 - }, - isForm:false, - form: { - component: 'Switch', - value: 'TRUE', - componentProps: { - inactiveValue: 'FALSE', - activeValue: 'TRUE', - disabled: true - } - }, - }, - { - label: '联系人姓名', - field: 'contactName', - sort: 'custom', - isTable:false, - table: { - width: 150 - }, - }, - { - label: '联系人电话', - field: 'contactPhone', + label: '订单备注', + field: 'poRmks', sort: 'custom', - isTable:false, + isTable: false, + isForm: false, table: { width: 150 }, }, + { - label: '联系人电子邮件', - field: 'contactEmail', + label: '管理编号', + field: 'poContract', sort: 'custom', - isTable:false, + isTable: true, + isForm: false, table: { width: 150 }, }, - + { label: '业务类型', field: 'businessType', @@ -294,20 +286,52 @@ export const PurchaseMain = useCrudSchemas(reactive([ } } }, + + { + label: '数据来源区分', + field: 'dataSource', + sort: 'custom', + table: { + width: 150 + }, + isForm: false, + isTable: false, + form: { + } + }, + // { + // label: '当前阶段', + // field: 'currentStage', + // sort: 'custom', + // table: { + // width: 150 + // }, + // form: { + // component: 'InputNumber', + // componentProps: { + // style: {width:'100%'}, + // min: 0 + // } + // }, + // isTableForm: false, + // isForm: false, + // isTable:false, + // }, { label: '创建者', field: 'creator', sort: 'custom', isForm: false, - isTable:false, + isTable: true, table: { width: 150 }, + sortTableDefault: 1000, }, { label: '创建时间', field: 'createTime', - isTable:false, + isTable: true, formatter: dateFormatter, detail: { dateFormat: 'YYYY-MM-DD HH:mm:ss' @@ -320,7 +344,7 @@ export const PurchaseMain = useCrudSchemas(reactive([ form: { component: 'DatePicker', componentProps: { - style: {width:'100%'}, + style: { width: '100%' }, type: 'datetime', dateFormat: 'YYYY-MM-DD HH:mm:ss', valueFormat: 'x', @@ -335,48 +359,17 @@ export const PurchaseMain = useCrudSchemas(reactive([ defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] } }, + sortTableDefault: 1000, }, - { - label: '最后更新者', - field: 'updater', - sort: 'custom', - isForm: false, - isTable:false, - table: { - width: 150 - }, - }, - { - label: '最后更新时间', - field: 'updateTime', - isTable: false, - formatter: dateFormatter, - detail: { - dateFormat: 'YYYY-MM-DD HH:mm:ss' - }, - sort: 'custom', - isForm: false, - table: { - width: 180 - }, - form: { - component: 'DatePicker', - componentProps: { - style: {width:'100%'}, - type: 'datetime', - dateFormat: 'YYYY-MM-DD HH:mm:ss', - valueFormat: 'x', - } - }, - }, - { - label: '备注', - field: 'remark', - isTable: false, - table: { - width: 150 - }, - }, + + // { + // label: '备注', + // field: 'remark', + // isTable: false, + // table: { + // width: 150 + // }, + // }, { label: '操作', field: 'action', @@ -394,7 +387,7 @@ export const PurchaseMainRules = reactive({ supplierCode: [ { required: true, message: '请输入供应商代码', trigger: 'change' } ], - type: [ + type: [ { required: true, message: '请选择订单类型', trigger: 'change' } ], status: [ @@ -403,27 +396,27 @@ export const PurchaseMainRules = reactive({ orderDate: [ { required: true, message: '请输入订单日期', trigger: 'change' } ], - taxRate: [ + taxRate: [ { required: true, message: '请输入税率', trigger: 'blur' } ], - version: [ + version: [ { max: 50, message: '不得超过50个字符', trigger: 'blur' } ], - contactName: [ + contactName: [ { max: 50, message: '不得超过50个字符', trigger: 'blur' } ], - contactPhone: [ + contactPhone: [ { max: 50, message: '不得超过50个字符', trigger: 'blur' }, - { validator:validateHanset, message: '请输入正确的手机号', trigger: 'blur'} + { validator: validateHanset, message: '请输入正确的手机号', trigger: 'blur' } ], - contactEmail: [ + contactEmail: [ { max: 50, message: '不得超过50个字符', trigger: 'blur' }, - { validator:validateEmail, message: '请输入正确的邮箱格式', trigger: 'blur'} + { validator: validateEmail, message: '请输入正确的邮箱格式', trigger: 'blur' } ], - remark: [ + remark: [ { max: 50, message: '不得超过50个字符', trigger: 'blur' } ], - available: [ + available: [ { required: true, message: '请选择是否可用', trigger: 'change' } ], }) @@ -432,41 +425,27 @@ export const PurchaseMainRules = reactive({ * @returns {Array} 采购订单子表 */ export const PurchaseDetail = useCrudSchemas(reactive([ - { - label: '单据号', - field: 'number', - isTableForm: false, - hiddenInMain:true, - table: { - width: 180 - }, - form: { - componentProps: { - disabled: true - } - } - }, { label: '行号', field: 'lineNumber', table: { width: 150 }, - tableForm:{ - disabled:true, + tableForm: { + disabled: true, isSearchList: true, // 开启查询弹窗 } }, { - label: '物料代码', + label: '品番', field: 'itemCode', isSearch: true, table: { width: 150 }, - tableForm:{ - disabled:true, - multiple:true,//多选 + tableForm: { + disabled: true, + multiple: true,//多选 isInpuFocusShow: true, searchListPlaceholder: '请选择供应商物料', searchField: 'itemCode', @@ -474,16 +453,16 @@ export const PurchaseDetail = useCrudSchemas(reactive([ searchAllSchemas: Supplieritem.allSchemas, searchPage: SupplieritemApi.selectItembasicTypeToSupplieritem, searchCondition: [{ - key:'supplierCode', - value:'supplierCode', + key: 'supplierCode', + value: 'supplierCode', message: '请填写供应商代码!', isMainValue: true - },{ + }, { key: 'available', value: 'TRUE', isMainValue: false - }], - verificationPage: SupplieritemApi.getSupplierItemListByCodes, // tableForm下方输入框校验失去焦点之后是否正确的方法 + }], + verificationPage: SupplieritemApi.getSupplierItemListByCodes, // tableForm下方输入框校验失去焦点之后是否正确的方法 isShowTableFormSearch: true, //tableForm下方是否出现输入框 isRepeat: true,//tableForm下方输入框是否可以重复添加该条数据 // 失去焦点校验参数 @@ -504,16 +483,16 @@ export const PurchaseDetail = useCrudSchemas(reactive([ searchField: 'itemCode', searchTitle: '供应商物料信息', searchAllSchemas: Supplieritem.allSchemas, - searchPage: SupplieritemApi.selectItembasicTypeToSupplieritem, - searchCondition: [{ - key:'supplierCode', - value:'supplierCode', - message: '请填写供应商代码!', - isMainValue: true - },{ - key: 'available', - value: 'TRUE', - isMainValue: false + searchPage: SupplieritemApi.selectItembasicTypeToSupplieritem, + searchCondition: [{ + key: 'supplierCode', + value: 'supplierCode', + message: '请填写供应商代码!', + isMainValue: true + }, { + key: 'available', + value: 'TRUE', + isMainValue: false }], // 失去焦点校验参数 verificationParams: [{ @@ -527,29 +506,29 @@ export const PurchaseDetail = useCrudSchemas(reactive([ } } }, - { - label: '计量单位', - field: 'uom', + { + label: '背番', + field: 'backNumber', sort: 'custom', - dictType: DICT_TYPE.UOM, - dictClass: 'string', - isTable: true, - isTableForm:true, - form:{ - componentProps: { - disabled:true - } - }, - tableForm:{ - disabled: true, - type:'Select', + table: { + width: 150 }, + isTableForm: false, + isForm: false, + isSearch:true, + }, + { + label: '行类型', + field: 'poLineType', + isTable: true, + isSearch: false, + sort: 'custom', table: { width: 150 }, - }, + }, { - label: '订单数量', + label: '采购订单数量', field: 'orderQty', table: { width: 150 @@ -557,68 +536,86 @@ export const PurchaseDetail = useCrudSchemas(reactive([ form: { component: 'InputNumber', componentProps: { - disabled:false, + disabled: false, min: 1, precision: 6 } }, tableForm: { - disabled:false, - hidden:false, + disabled: false, + hidden: false, type: 'InputNumber', min: 1, precision: 6 }, }, { - label: '默认收货库区', - field: 'defaultAreaCode', + label: '采购标包数量', + field: 'purchaseStdQty', table: { width: 150 }, - isTableForm: false, - isForm: false, - isTable: true, + form: { + component: 'InputNumber', + componentProps: { + disabled: false, + min: 1, + precision: 6 + } + }, + hiddenInMain: true, + tableForm: { + disabled: false, + hidden: false, + type: 'InputNumber', + min: 1, + precision: 6 + }, }, { - label: '库区描述', - field: 'areaDescription', + label: '采购计量单位', + field: 'purchaseStdUom', + sort: 'custom', + dictType: DICT_TYPE.UOM, + dictClass: 'string', + isTable: true, + isTableForm: true, + form: { + componentProps: { + disabled: true + } + }, + tableForm: { + disabled: true, + type: 'Select', + }, table: { width: 150 }, - isTableForm: false, - isForm: false, - isTable: true, }, - // { - // label: 'ERP库位', - // field: 'erpLocationCode', - // dictType : DICT_TYPE.ERP_LOCATION, - // dictClass: 'string', - // table: { - // width: 150 - // }, - // hiddenInMain:true, - // isTableForm: false, - // isForm: false, - // }, { - label: '项目代码', - field: 'projectCode', + label: '转换率', + field: 'convertRate', + form: { + component: 'InputNumber', + componentProps: { + min: 0 + } + }, + hiddenInMain: true, table: { width: 150 }, - hiddenInMain:true, isTableForm: false, isForm: false, }, { - label: '包装数量', - field: 'packQty', - hiddenInMain:true, + label: t('ts.单价'), + field: 'singlePrice', table: { width: 150 }, + hiddenInMain: true, form: { component: 'InputNumber', componentProps: { @@ -626,26 +623,32 @@ export const PurchaseDetail = useCrudSchemas(reactive([ precision: 6 } }, + isTable:false, isTableForm: false, - isForm: false, + isForm: false }, { - label: '包装规格', - hiddenInMain:true, - field: 'packUnit', - // dictType: DICT_TYPE.PACK_UNIT, - // dictClass: 'string', - isTable: true, + label: '金额', + field: 'amount', table: { width: 150 }, + hiddenInMain: true, + isTable: false, + form: { + component: 'InputNumber', + componentProps: { + min: 1, + precision: 6 + } + }, isTableForm: false, - isForm: false, + isForm: false }, { - label: '供应商计量数量', - field: 'supplierQty', - hiddenInMain:true, + label: '库存标包数量', + field: 'packQty', + hiddenInMain: true, table: { width: 150 }, @@ -659,13 +662,14 @@ export const PurchaseDetail = useCrudSchemas(reactive([ isTableForm: false, isForm: false, }, + { - label: '供应商计量单位', - field: 'supplierUom', - dictType: DICT_TYPE.UOM, - dictClass: 'string', + label: '库存标包规格', + hiddenInMain: true, + field: 'packUnit', + // dictType: DICT_TYPE.PACK_UNIT, + // dictClass: 'string', isTable: true, - hiddenInMain:true, table: { width: 150 }, @@ -673,46 +677,64 @@ export const PurchaseDetail = useCrudSchemas(reactive([ isForm: false, }, { - label: '转换率', - field: 'convertRate', + label: '库存计量单位', + field: 'uom', + sort: 'custom', + dictType: DICT_TYPE.UOM, + dictClass: 'string', + isTable: true, + isTableForm: true, + hiddenInMain: true, form: { - component: 'InputNumber', componentProps: { - min: 0 + disabled: true } }, - hiddenInMain:true, - table: { + tableForm: { + disabled: true, + type: 'Select', + }, + table: { width: 150 }, - isTableForm: false, - isForm: false, }, + + // { - // label: t('ts.已计划数量'), - // field: 'plannedQty', + // label: 'ERP库位', + // field: 'erpLocationCode', + // dictType : DICT_TYPE.ERP_LOCATION, + // dictClass: 'string', // table: { // width: 150 // }, // hiddenInMain:true, - // form: { - // component: 'InputNumber', - // componentProps: { - // min: 1, - // precision: 6 - // }, - // value: 1 - // }, // isTableForm: false, // isForm: false, + // isTable: false, // }, { - label: t('ts.已发货数量'), - field: 'shippedQty', + label: '默认收货库区', + field: 'defaultAreaCode', + table: { + width: 150 + }, + form: { + componentProps: { + disabled: true + } + }, + isTableForm: false, + isForm: false, + isTable: true, + }, + { + label: '已计划采购数量', + field: 'plannedPurchaseQty', table: { width: 150 }, - hiddenInMain:true, + hiddenInMain: true, form: { component: 'InputNumber', componentProps: { @@ -725,30 +747,30 @@ export const PurchaseDetail = useCrudSchemas(reactive([ isForm: false, }, { - label: t('ts.已收货数量'), - field: 'receivedQty', + label: '已发货采购数量', + field: 'shippedPurchaseQty', table: { width: 150 }, - hiddenInMain:true, + hiddenInMain: true, form: { component: 'InputNumber', - value: 0, componentProps: { min: 1, precision: 6 - } + }, + value: 1 }, isTableForm: false, - isForm: false + isForm: false, }, { - label: t('ts.已退货数量'), - field: 'returnedQty', + label: '已收货采购数量', + field: 'receivedPurchaseQty', table: { width: 150 }, - hiddenInMain:true, + hiddenInMain: true, form: { component: 'InputNumber', value: 0, @@ -761,15 +783,15 @@ export const PurchaseDetail = useCrudSchemas(reactive([ isForm: false }, { - label: t('ts.已上架数量'), - field: 'putawayQty', + label: '已退货采购数量', + field: 'returnedPurchaseQty', table: { width: 150 }, - hiddenInMain:true, + hiddenInMain: true, form: { component: 'InputNumber', - value: 1, + value: 0, componentProps: { min: 1, precision: 6 @@ -779,14 +801,15 @@ export const PurchaseDetail = useCrudSchemas(reactive([ isForm: false }, { - label: t('ts.单价'), - field: 'singlePrice', + label: "已上架采购数量", + field: 'putawayPurchaseQty', table: { width: 150 }, - hiddenInMain:true, + hiddenInMain: true, form: { component: 'InputNumber', + value: 1, componentProps: { min: 1, precision: 6 @@ -795,115 +818,102 @@ export const PurchaseDetail = useCrudSchemas(reactive([ isTableForm: false, isForm: false }, + + { - label: '金额', - field: 'amount', + label: '库区描述', + field: 'areaDescription', table: { width: 150 }, - hiddenInMain:true, + hiddenInMain: true, form: { - component: 'InputNumber', componentProps: { - min: 1, - precision: 6 + disabled: true } }, isTableForm: false, - isForm: false + isForm: false, + isTable: false, }, + { - label: '是否可用', - field: 'available', - dictType: DICT_TYPE.TRUE_FALSE, - dictClass: 'string', - isTable: true, + label: '项目代码', + field: 'projectCode', table: { width: 150 }, - hiddenInMain:true, - tableForm:{ - type:'Select', - default: 'TRUE', - inactiveValue: 'FALSE', - activeValue: 'TRUE' + hiddenInMain: true, + isTableForm: false, + isForm: false, + isTable: false, + }, + + { + label: '供应商计量数量', + field: 'supplierQty', + hiddenInMain: true, + table: { + width: 150 }, form: { - component: 'Switch', - value: 'TRUE', + component: 'InputNumber', componentProps: { - inactiveValue: 'FALSE', - activeValue: 'TRUE' + min: 1, + precision: 6 } - } + }, + isTableForm: false, + isForm: false, + isTable: false, }, + { + label: '供应商计量单位', + field: 'supplierUom', + dictType: DICT_TYPE.UOM, + dictClass: 'string', + isTable: false, + hiddenInMain: true, + table: { + width: 150 + }, + isTableForm: false, + isForm: false, + }, + { label: '超收百分比', field: 'overReceivingPercent', table: { width: 150 }, - hiddenInMain:true, + hiddenInMain: true, form: { component: 'InputNumber', componentProps: { min: 0 } }, - isTable:false, - isTableForm:false, + isTable: false, + isTableForm: false, tableForm: { type: 'InputNumber', min: 0 } }, - { - label: '创建时间', - field: 'createTime', - isTable: true, - isTableForm: false, - formatter: dateFormatter, - detail: { - dateFormat: 'YYYY-MM-DD HH:mm:ss' - }, - table: { - width: 180 - }, - hiddenInMain:false, - isForm: false, - form: { - component: 'DatePicker', - componentProps: { - style: {width:'100%'}, - type: 'datetime', - dateFormat: 'YYYY-MM-DD HH:mm:ss', - valueFormat: 'x', - } - } - }, - { - label: '创建者', - field: 'creator', - isTableForm: false, - table: { - width: 150 - }, - hiddenInMain:false, - isForm: false, - }, // { - // label: '最后更新时间', - // field: 'updateTime', - // isTableForm: false, + // label: '创建时间', + // field: 'createTime', // isTable: true, - // hiddenInMain:false, + // isTableForm: false, // formatter: dateFormatter, // detail: { // dateFormat: 'YYYY-MM-DD HH:mm:ss' // }, // table: { - // width: 150 + // width: 180 // }, + // hiddenInMain:false, // isForm: false, // form: { // component: 'DatePicker', @@ -916,54 +926,45 @@ export const PurchaseDetail = useCrudSchemas(reactive([ // } // }, // { - // label: '最后更新者', - // field: 'updater', + // label: '创建者', + // field: 'creator', // isTableForm: false, // table: { // width: 150 // }, // hiddenInMain:false, // isForm: false, - // // form: { - // // component: 'DatePicker', - // // componentProps: { - // // style: {width:'100%'}, - // // type: 'datetime', - // // dateFormat: 'YYYY-MM-DD HH:mm:ss', - // // valueFormat: 'x', - // // } - // // } // }, { label: '备注', - hiddenInMain:true, + hiddenInMain: true, field: 'remark', table: { width: 150 }, + isTable: false, }, { label: '操作', - hiddenInMain:true, + hiddenInMain: true, field: 'action', isDetail: false, - isForm: false , - isTable: false , + isForm: false, table: { width: 150, fixed: 'right' }, - isTableForm:false, + isTableForm: false, } ])) //表单校验 export const PurchaseDetailRules = reactive({ lineNumber: [ - { required: true, message: '请输入行号', trigger: 'blur' }, + { required: true, message: '请输入行号', trigger: 'blur' }, // { max: 50, message: '不得超过50个字符', trigger: 'blur' } ], - packQty: [ + packQty: [ { required: true, message: '请输入包装数量', trigger: 'blur' } ], packUnit: [ @@ -972,40 +973,40 @@ export const PurchaseDetailRules = reactive({ convertRate: [ { required: true, message: '请输入转换率', trigger: 'blur' } ], - taxRate: [ + taxRate: [ { required: true, message: '请输入税率', trigger: 'blur' } ], - shippedQty: [ + shippedQty: [ { required: true, message: '请输入已发货数量', trigger: 'blur' } ], - receivedQty: [ + receivedQty: [ { required: true, message: '请输入已收货数量', trigger: 'blur' } ], - returnedQty: [ + returnedQty: [ { required: true, message: '请输入已退货数量', trigger: 'blur' } ], - putawayQty: [ + putawayQty: [ { required: true, message: '请输入已上架数量', trigger: 'blur' } ], - overReceivingPercent: [ + overReceivingPercent: [ { required: true, message: '请输入超收百分比', trigger: 'blur' } ], - orderQty: [ + orderQty: [ { required: true, message: '请输入订单数量', trigger: 'blur' } ], // uom: [ // { required: true, message: '请选择计量单位', trigger: 'change' } // ], - available: [ + available: [ { required: true, message: '请选择是否可用', trigger: 'change' } ], - nuumber: [ + nuumber: [ { required: true, message: '请输入单据号', trigger: 'blur' } ], - itemCode: [ - { required: true, message: '请选择物料代码', trigger: 'change' } + itemCode: [ + { required: true, message: '请选择品番', trigger: 'change' } ], - remark: [ + remark: [ { max: 50, message: '不得超过50个字符', trigger: 'blur' } ], }) diff --git a/src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/index.vue b/src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/index.vue index ad01b90e2..19bef105e 100644 --- a/src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/index.vue +++ b/src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/index.vue @@ -67,6 +67,7 @@ :isShowReduceButton="false" :isShowButton="false" @handleAddTable="handleAddTable" + @clearSearchInput="clearSearchInput" @handleDeleteTable="handleDeleteTable" @tableSelectionDelete="tableSelectionDelete" @searchTableSuccess="searchTableSuccess" @@ -90,7 +91,7 @@ :detailButtonIsShowAddStatusArray="['1','3','4','5','6']" :detailButtonIsShowEdit="detailData.type == 'SCHEDULE'&& detailData.status != 4" :detailButtonIsShowDelete="detailData.type == 'SCHEDULE'&& detailData.status != 4" - :detailButtonIsShowAdd="detailData.type == 'SCHEDULE'&& detailData.status != 4" + :detailButtonIsShowAdd="false" addHasPermi="wms:purchase-plan-main:create" editHasPermi="wms:purchase-plan-main:update" deleteHasPermi="wms:purchase-plan-main:delete" @@ -202,7 +203,7 @@ const { loadStart, loadDone } = usePageLoading() val.forEach(item=>{ if(tableData.value.find(item1=>item1['id'] == item['id'])) return const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...row})) - + newRow[formField] = item[searchField] newRow['itemCode'] = item['code'] newRow['poNumber'] = item['number'] @@ -231,6 +232,16 @@ const { loadStart, loadDone } = usePageLoading() setV['itemCode'] = val[0]['code'] setV['poNumber'] = val[0]['number'] setV['poLine'] = val[0]['lineNumber'] + setV['receivedNumber'] = val[0]['receivedNumber'] + console.log(PurchasePlanDetail.allSchemas.tableFormColumns); + + PurchasePlanDetail.allSchemas.tableFormColumns.forEach(item =>{ + if(item.value == ''){ + if(item.field == 'receivedNumber'){ + item.tableForm.placeholder = '' + } + } + }) if(formField == 'supplierCode'){ setV['supplierCode'] = val[0]['code'] @@ -461,7 +472,7 @@ const isShowMainButton1 = (row, val) => { return [ // defaultButtons.mainListPurchasePlanOpeBtn({ hide: isShowMainButton(row, ['2']) }), // 打开 defaultButtons.mainListPurchasePlanCloBtn({ hide: !(row.status!=6&&row.status!=2&&row.type=='SCHEDULE'),hasPermi: 'wms:purchase-plan-main:close' }), // 关闭 - defaultButtons.mainListPurchasePlanPubBtn({ hide: isShowMainButton(row, ['1','5']) ,hasPermi: 'wms:purchase-plan-main:publish'}), // 发布 + defaultButtons.mainListPurchasePlanPubBtn({ hide: isShowMainButton(row, ['1']) ,hasPermi: 'wms:purchase-plan-main:publish'}), // 发布 defaultButtons.mainListPurchasePlanAccBtn({ hide: isShowMainButton(row, ['3']) ,hasPermi: 'wms:purchase-plan-main:accept'}), // 接受 defaultButtons.mainListPurchasePlanRejBtn({ hide: isShowMainButton(row, ['3']) ,hasPermi: 'wms:purchase-plan-main:noaccept'}), // 不接受 defaultButtons.mainListPurchasePlanWitBtn({ hide: isShowMainButton(row, ['3']) ,hasPermi: 'wms:purchase-plan-main:unpublish'}), // 下架 @@ -469,7 +480,7 @@ const isShowMainButton1 = (row, val) => { defaultButtons.mainListEditBtn({ hide: isShowMainButton1(row, ['1','3','5']), hasPermi: 'wms:purchase-plan-main:edit' }), // 编辑 // defaultButtons.mainListDeleteBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:purchase-plan-main:delete'}), // 删除 { - label: t('ts.创建供应商发货申请'), + label: t('ts.创建发货申请'), name: 'supplierdeliver', hide: isShowMainButton(row, ['4']), type: 'primary', @@ -505,6 +516,7 @@ const isShowMainButton1 = (row, val) => { } else if (val == 'supplierdeliver') { // 创建供应商发货申请 supplierdeliverFormRef.value.openFormByCreate({ number:row.number, //要货单号 + deliNo:row.deliNo, //便次 poNumber:row.poNumber, //采购订单号 supplierCode:row.supplierCode, //供应商代码 endTime:row.endTime, //结束时间 @@ -984,6 +996,11 @@ const handleSelectionPublish = async ()=>{ } getList() // 刷新当前列表 } + const clearSearchInput = (field) => { + if (field == 'poNumber') { + tableData.value = [] + } + } /** 初始化 **/ onMounted(async () => { diff --git a/src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/purchasePlanMain.data.ts b/src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/purchasePlanMain.data.ts index 2261ef305..eaabc1081 100644 --- a/src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/purchasePlanMain.data.ts +++ b/src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/purchasePlanMain.data.ts @@ -8,7 +8,7 @@ import { PurchaseDetail, PurchaseMain } from '../purchaseMain/purchaseMain.data' import { getPurchaseDetailPagePoNumber } from '@/api/wms/purchaseDetail' import * as ItembasicApi from '@/api/wms/itembasic' import { Itembasic } from '@/views/wms/basicDataManage/itemManage/itembasic/itembasic.data' -import { validatePositiveNumber0 } from "@/utils/validator"; +import { validatePositiveNumber0, validateInteger } from "@/utils/validator"; const { t } = useI18n() // 国际化 /** @@ -17,7 +17,7 @@ const { t } = useI18n() // 国际化 export const PurchasePlanMain = useCrudSchemas( reactive([ { - label: '要货计划单号', + label: '单据号', field: 'number', sort: 'custom', isForm: false, @@ -67,7 +67,7 @@ export const PurchasePlanMain = useCrudSchemas( sortTableDefault: 3, sortSearchDefault: 1, form: { - labelMessage: '影响明细中物料代码,需在供应商物料中维护', + labelMessage: '影响明细中品番,需在供应商物料中维护', componentProps: { isEnter: true, enterSearch: true, @@ -126,42 +126,22 @@ export const PurchasePlanMain = useCrudSchemas( isTable: true, isForm: false }, - //仅是主列表页面的筛选搜索条件 { - label: '送达日期', - field: 'deliveryDate', - sort: 'custom', - isDetail: false, - isTable: false, - isForm: false, - isTableForm: false, - isSearch: true, - sortSearchDefault: 3, - formatter: dateFormatter2, - search: { - component: 'DatePicker', - componentProps: { - valueFormat: 'YYYY-MM-DD HH:mm:ss', - // type: 'datetimerange', - type: 'daterange', - defaultTime: [new Date('1 '), new Date('1 ')] - } - } - }, - { - label: '采购订单', + label: '订单号', field: 'poNumber', sort: 'custom', + isSearch:true, sortSearchDefault: 11, - formatter: dateFormatter2, + sortTableDefault: 6, + //formatter: dateFormatter2, table: { width: 150 }, - isTable: false, + isTable: true, form: { // labelMessage: '信息提示说明!!!', componentProps: { - disabled:true, + disabled: true, enterSearch: true, dialogWidth: '1085px', //搜索出来弹窗的宽度 isSearchList: true, @@ -208,87 +188,72 @@ export const PurchasePlanMain = useCrudSchemas( }, { label: '送达日期', + sortTableDefault:5, field: 'deliveryDate', - table: { - width: 180 - }, + sort: 'custom', + isDetail: true, + isTable: true, + isForm: true, + isTableForm: false, + isSearch: true, + sortSearchDefault: 3, formatter: dateFormatter2, - sortTableDefault: 13, - form: { + search: { component: 'DatePicker', componentProps: { - type: 'date', - dateFormat: 'YYYY-MM-DD HH:mm:ss', - valueFormat: 'x' + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 '), new Date('1 ')] } }, - detail: { - dateFormat: 'YYYY-MM-DD' - } - }, - { - label: '采购订单类型', - field: 'type', - sort: 'custom', - sortTableDefault: 13, - dictType: DICT_TYPE.PURCHASE_ORDER_TYPE, - dictClass: 'string', - isTable: true, - isForm: true, - table: { - width: 150 - }, form: { - // labelMessage: '信息提示说明!!!', + component: 'DatePicker', componentProps: { - disabled: true + format: 'YYYY-MM-DD', + valueFormat: 'x', + defaultTime: [new Date('1 '), new Date('1 ')] } - } - }, - { - label: '预测版本', - field: 'activeVersion', - isTable: true, - isForm: false, - sortTableDefault: 13, - table: { - width: 150 }, - }, - { - label: '来源', - field: 'source', - sort: 'custom', - dictType: DICT_TYPE.PURCHASE_PLAN_SOURCE, - dictClass: 'string', - isTable: true, - isForm: false, - sortTableDefault: 13, table: { width: 150 }, + detail: { + dateFormat:'YYYY-MM-DD' + } }, { label: '便次', field: 'deliNo', sort: 'custom', - isTable: true, - isForm: false, - sortTableDefault: 13, + sortTableDefault: 5, table: { width: 150 }, + form: { + component: 'InputNumber', + componentProps: { + min: 1, + }, + } }, { - label: '班次', - field: 'xxxxx', + label: '采购订单类型', + field: 'type', sort: 'custom', - isTable: true, - isForm: false, - sortTableDefault: 14, + sortTableDefault: 7, + dictType: DICT_TYPE.PURCHASE_ORDER_TYPE, + dictClass: 'string', + isTable: false, + isForm: true, table: { width: 150 }, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + disabled: true + } + } }, { label: '收货人', @@ -297,6 +262,7 @@ export const PurchasePlanMain = useCrudSchemas( table: { width: 150 }, + sortTableDefault: 8, form: { componentProps: { disabled: false @@ -310,6 +276,7 @@ export const PurchasePlanMain = useCrudSchemas( table: { width: 150 }, + sortTableDefault: 9, form: { componentProps: { disabled: false @@ -324,78 +291,127 @@ export const PurchasePlanMain = useCrudSchemas( width: 150 }, isTable: false, - isForm: false + isForm: false, }, { - label: '开始时间', - field: 'beginTime', + label: '仓库代码', + field: 'warehouseCode', sort: 'custom', table: { width: 150 }, isTable: false, isForm: false, - isDetail: false, - form: { - component: 'TimePicker', - componentProps: { - format: 'HH:mm' - } - } }, { - label: '结束时间', - field: 'endTime', + label: '月台代码', + field: 'dockCode', sort: 'custom', table: { width: 150 }, + isForm: false, isTable: false, + }, + { + label: '业务类型', + field: 'businessType', + sort: 'custom', + table: { + width: 150 + }, isForm: false, - isDetail: false, + isTable: false, form: { - component: 'TimePicker', + value: 'PurchaseReceipt', componentProps: { - format: 'HH:mm' + disabled: true } - } + }, }, { - label: '仓库代码', - field: 'warehouseCode', + label: '班次', + field: 'shift', sort: 'custom', + isTable: false, + isForm: false, table: { width: 150 }, - isTable: false, - isForm: false }, { - label: '月台代码', - field: 'dockCode', + label: 'SPARC订单号', + field: 'orderCode', sort: 'custom', + isForm: false, + isTable: true, + table: { + width: 180, + }, + sortSearchDefault: 4, + isSearch: true + }, + + + + { + label: '预测版本', + field: 'activeVersion', + isTable: false, + isForm: false, + sortTableDefault: 13, table: { width: 150 }, + }, + { + label: '来源', + field: 'source', + sort: 'custom', + dictType: DICT_TYPE.PURCHASE_PLAN_SOURCE, + dictClass: 'string', + isTable: false, isForm: false, - isTable: false + sortTableDefault: 13, + table: { + width: 150 + }, }, { - label: '业务类型', - field: 'businessType', + label: '开始时间', + field: 'beginTime', sort: 'custom', table: { width: 150 }, + isTable: false, isForm: false, + isDetail: false, + form: { + component: 'TimePicker', + componentProps: { + format: 'HH:mm' + } + } + }, + { + label: '结束时间', + field: 'endTime', + sort: 'custom', + table: { + width: 150 + }, isTable: false, + isForm: false, + isDetail: false, form: { - value: 'PurchaseReceipt', + component: 'TimePicker', componentProps: { - disabled: true + format: 'HH:mm' } } }, + // { // label: '自动发布', @@ -461,7 +477,8 @@ export const PurchasePlanMain = useCrudSchemas( field: 'creator', sort: 'custom', isForm: false, - isTable: false, + isTable: true, + sortTableDefault: 1000, table: { width: 150 } @@ -470,9 +487,9 @@ export const PurchasePlanMain = useCrudSchemas( label: '创建时间', field: 'createTime', isTable: true, + sortTableDefault: 1000, isForm: false, formatter: dateFormatter, - sortTableDefault: 15, detail: { dateFormat: 'YYYY-MM-DD HH:mm:ss' }, @@ -499,39 +516,39 @@ export const PurchasePlanMain = useCrudSchemas( } } }, - { - label: '最后更新者', - field: 'updater', - sort: 'custom', - isForm: false, - isTable: false, - table: { - width: 150 - } - }, - { - label: '最后更新时间', - field: 'updateTime', - isTable: false, - isForm: false, - formatter: dateFormatter, - detail: { - dateFormat: 'YYYY-MM-DD HH:mm:ss' - }, - sort: 'custom', - table: { - width: 180 - }, - form: { - component: 'DatePicker', - componentProps: { - style: { width: '100%' }, - type: 'datetime', - dateFormat: 'YYYY-MM-DD HH:mm:ss', - valueFormat: 'x' - } - } - }, + // { + // label: '最后更新者', + // field: 'updater', + // sort: 'custom', + // isForm: false, + // isTable: false, + // table: { + // width: 150 + // } + // }, + // { + // label: '最后更新时间', + // field: 'updateTime', + // isTable: false, + // isForm: false, + // formatter: dateFormatter, + // detail: { + // dateFormat: 'YYYY-MM-DD HH:mm:ss' + // }, + // sort: 'custom', + // table: { + // width: 180 + // }, + // form: { + // component: 'DatePicker', + // componentProps: { + // style: { width: '100%' }, + // type: 'datetime', + // dateFormat: 'YYYY-MM-DD HH:mm:ss', + // valueFormat: 'x' + // } + // } + // }, { label: '备注', field: 'remark', @@ -541,7 +558,7 @@ export const PurchasePlanMain = useCrudSchemas( }, isTable: false, isForm: false, - isDetail: true + isDetail: false }, { label: '操作', @@ -565,7 +582,11 @@ export const PurchasePlanMainRules = reactive({ status: [{ required: true, message: '请选择状态', trigger: 'change' }], number: [{ required: true, message: '请输入单据号', trigger: 'blur' }], businessType: [{ required: true, message: '请输入业务类型', trigger: 'blur' }], - remark: [{ max: 50, message: '不得超过50个字符', trigger: 'blur' }] + remark: [{ max: 50, message: '不得超过50个字符', trigger: 'blur' }], + deliNo: [ + { required: true, message: '请输入便次', trigger: 'blur' }, + { validator: validateInteger, message: '请输入正确的正整数', trigger: ['change', 'blur'] }, + ], }) /** @@ -573,64 +594,76 @@ export const PurchasePlanMainRules = reactive({ */ export const PurchasePlanDetail = useCrudSchemas( reactive([ + // { + // label: '要货计划单号', + // field: 'number', + // sort: 'custom', + // isTableForm: false, + // hiddenInMain: true, + // table: { + // width: 180 + // }, + // form: { + // componentProps: { + // disabled: true + // } + // } + // }, + // { + // label: '采购订单号', + // field: 'poNumber', + // isSearch: true, + // isTable: true, + // sortTableDefault: 11, + // sortSearchDefault: 11, + // isForm: false, + // isTableForm: false, + // table: { + // width: 150 + // }, + // search: { + // // labelMessage: '信息提示说明!!!', + // componentProps: { + // dialogWidth: '1085px', //搜索出来弹窗的宽度 + // isSearchList: true, + // enterSearch: true, + // searchListPlaceholder: '请选择采购订单', + // searchField: 'number', + // searchTitle: '采购订单信息', + // searchAllSchemas: PurchaseMain.allSchemas, + // searchPage: PurchaseMainApi.getPurchaseMainPage, + // searchCondition: [ + // { + // key: 'available', + // value: 'TRUE', + // isMainValue: false + // }, + // { + // key: 'supplierCode', + // value: 'supplierCode', + // message: '请填写供应商代码!', + // isMainValue: true + // }, + // { + // key: 'status', + // value: 2, + // isMainValue: false + // } + // ] + // } + // } + // }, { - label: '要货计划单号', - field: 'number', - sort: 'custom', - isTableForm: false, - hiddenInMain: true, - table: { - width: 180 - }, - form: { - componentProps: { - disabled: true - } - } - }, - { - label: '采购订单号', - field: 'poNumber', - isSearch: true, - isTable: true, - sortTableDefault: 11, - sortSearchDefault: 11, - isForm: false, - isTableForm: false, + label: '便次', + field: 'deliNo', table: { width: 150 }, - search: { - // labelMessage: '信息提示说明!!!', - componentProps: { - dialogWidth: '1085px', //搜索出来弹窗的宽度 - isSearchList: true, - enterSearch: true, - searchListPlaceholder: '请选择采购订单', - searchField: 'number', - searchTitle: '采购订单信息', - searchAllSchemas: PurchaseMain.allSchemas, - searchPage: PurchaseMainApi.getPurchaseMainPage, - searchCondition: [ - { - key: 'available', - value: 'TRUE', - isMainValue: false - }, - { - key: 'supplierCode', - value: 'supplierCode', - message: '请填写供应商代码!', - isMainValue: true - }, - { - key: 'status', - value: 2, - isMainValue: false - } - ] - } - } + sortTableDefault: 3, + isTableForm: false, + isForm: false, + isTable: true, + isDetail:false }, { label: '订单行', @@ -639,7 +672,7 @@ export const PurchasePlanDetail = useCrudSchemas( table: { width: 150 }, - sortTableDefault: 12, + sortTableDefault: 16, form: { // labelMessage: '信息提示说明!!!', componentProps: { @@ -696,8 +729,8 @@ export const PurchasePlanDetail = useCrudSchemas( table: { width: 150 }, - sortTableDefault: 5, sortSearchDefault: 5, + sortTableDefault: 17, isSearch: true, form: { componentProps: { @@ -713,7 +746,7 @@ export const PurchasePlanDetail = useCrudSchemas( multiple: true, enterSearch: true, isSearchList: true, // 开启查询弹窗 - searchListPlaceholder: '请选择物料代码', // 输入框占位文本 + searchListPlaceholder: '请选择品番', // 输入框占位文本 searchField: 'code', // 查询弹窗赋值字段 searchTitle: '物料基础信息', // 查询弹窗标题 searchAllSchemas: Itembasic.allSchemas, // 查询弹窗所需类 @@ -735,30 +768,48 @@ export const PurchasePlanDetail = useCrudSchemas( } }, { - label: '物料状态', - field: 'itemStatus', - sort: 'custom', - dictType: DICT_TYPE.ITEM_STATUS, - dictClass: 'string', + label: '品名', + field: 'itemName', + table: { + width: 150 + }, + sortTableDefault: 18, + isTableForm: false, + isForm: false, isTable: true, - sortTableDefault: 10, - sortSearchDefault: 10, + isDetail:false + }, + { + label: '背番', + field: 'backNumber', + sort: 'custom', + isSearch: true, + hiddenSearchHigh:true, table: { width: 150 }, + isTable: true, + sortSearchDefault: 10, + sortTableDefault: 19, form: { componentProps: { disabled: true } }, tableForm: { - type: 'Select', disabled: true } }, { - label: '默认收货库区', - field: 'defaultAreaCode', + label: '物料状态', + field: 'itemStatus', + sort: 'custom', + dictType: DICT_TYPE.ITEM_STATUS, + dictClass: 'string', + isTable: true, + sortSearchDefault: 10, + sortTableDefault: 19, + hiddenInMain: true, table: { width: 150 }, @@ -768,16 +819,13 @@ export const PurchasePlanDetail = useCrudSchemas( } }, tableForm: { + type: 'Select', disabled: true - }, - sortTableDefault: 7, - isTableForm: true, - isForm: true, - isTable: true + } }, { - label: '库区描述', - field: 'areaDescription', + label: '默认收货库区', + field: 'defaultAreaCode', table: { width: 150 }, @@ -791,18 +839,21 @@ export const PurchasePlanDetail = useCrudSchemas( }, isTableForm: true, isForm: true, - isTable: false + isTable: true, + hiddenInMain: true, + sortTableDefault: 1000, }, { label: '受入号', field: 'receivedNumber', sort: 'custom', - sortTableDefault: 7, sortSearchDefault: 7, + sortTableDefault: 20, table: { width: 150 }, isTableForm: true, + hiddenInMain: true, isForm: true, form: { componentProps: { @@ -810,16 +861,17 @@ export const PurchasePlanDetail = useCrudSchemas( } }, tableForm: { - type: 'Select', - disabled: true + // type: 'Select', + disabled: true, + isPlaceholder:false } }, { label: '订单数量', field: 'orderQty', sort: 'custom', - sortTableDefault: 8, sortSearchDefault: 8, + sortTableDefault:23, table: { width: 150 }, @@ -833,11 +885,11 @@ export const PurchasePlanDetail = useCrudSchemas( } }, { - label: '计划数量', + label: '计划采购数量', field: 'planQty', sort: 'custom', - sortTableDefault: 9, sortSearchDefault: 9, + sortTableDefault: 21, table: { width: 150 }, @@ -854,37 +906,32 @@ export const PurchasePlanDetail = useCrudSchemas( } }, { - label: '已发货数量', - field: 'shippedQty', + label: '采购标包数量', + field: 'purchaseStdQty', sort: 'custom', + sortSearchDefault: 8, + sortTableDefault:24, + isForm: false, + isSearch: false, + isTableForm: true, table: { width: 150 }, - isTableForm: false, - isForm: false, - isTable: true, + tableForm: { + disabled:true + } }, - // { - // label: '在途数量', - // field: 'notReceiveQty', - // sort: 'custom', - // table: { - // width: 150 - // }, - // isTableForm: false, - // sortTableDefault: 7, - // isForm: false, - // isTable: true, - // }, { - label: '计量单位', + label: '计划采购计量单位', field: 'uom', sort: 'custom', dictType: DICT_TYPE.UOM, dictClass: 'string', - isTable: true, - sortTableDefault: 10, + isTable: false, + isTableForm: false, sortSearchDefault: 10, + sortTableDefault:22, + hiddenInMain: true, table: { width: 150 }, @@ -898,93 +945,186 @@ export const PurchasePlanDetail = useCrudSchemas( disabled: true } }, - - + { - label: '已收货数量', - field: 'receivedQty', + label: '采购计量单位', + field: 'purchaseStdUom', + dictType: DICT_TYPE.UOM, sort: 'custom', + sortSearchDefault: 9, + sortTableDefault:25, + isForm: false, + isSearch: false, + isTableForm: true, table: { width: 150 }, - - isTableForm: false, - isForm: false, - isTable: false, - sortTableDefault: 6 + tableForm: { + disabled: true + } }, { - label: '是否可用', - field: 'available', - dictType: DICT_TYPE.TRUE_FALSE, - dictClass: 'string', - isTable: true, - isTableForm: false, - isForm: false, - hiddenInMain: true, + label: '转换率', + field: 'convertRate', sort: 'custom', + sortSearchDefault: 9, + sortTableDefault: 26, + isForm: false, + isSearch: false, table: { width: 150 }, tableForm: { - type: 'Select', - inactiveValue: 'FALSE', disabled: true - }, - form: { - component: 'Switch', - value: 'TRUE', - componentProps: { - inactiveValue: 'FALSE', - activeValue: 'TRUE' - } } }, { - label: '最后更新者', - field: 'updater', + label: '已发采购数量', + field: 'shippedQty', sort: 'custom', - isTableForm: false, - hiddenInMain: true, table: { width: 150 }, - isForm: false + isTableForm: false, + isForm: false, + isTable: true, + hiddenInMain: true, }, { - label: '最后更新时间', - field: 'updateTime', + label: '已收采购数量', + field: 'receivedQty', sort: 'custom', - isTableForm: false, - hiddenInMain: true, - formatter: dateFormatter, - detail: { - dateFormat: 'YYYY-MM-DD HH:mm:ss' - }, table: { - width: 180 + width: 150 }, + isTableForm: false, isForm: false, - form: { - component: 'DatePicker', - componentProps: { - style: { width: '100%' }, - type: 'datetime', - dateFormat: 'YYYY-MM-DD HH:mm:ss', - valueFormat: 'x' - } - } + isTable: true, }, + + + // {需求作废 + // label: '受入地', + // field: 'receivedLocation', + // sort: 'custom', + // table: { + // width: 150 + // }, + + // isTableForm: false, + // isForm: false, + // isTable: true, + // hiddenInMain: true, + // }, + { - label: '备注', - field: 'remark', - sort: 'custom', - hiddenInMain: true, - isTableForm: false, + label: '库区描述', + field: 'areaDescription', table: { width: 150 - } + }, + form: { + componentProps: { + disabled: true + } + }, + tableForm: { + disabled: true + }, + isTableForm: false, + isForm: true, + isTable: false, + hiddenInMain: true, }, + + + + // { + // label: '在途数量', + // field: 'notReceiveQty', + // sort: 'custom', + // table: { + // width: 150 + // }, + // isTableForm: false, + // sortTableDefault: 7, + // isForm: false, + // isTable: true, + // }, + + + // { + // label: '是否可用', + // field: 'available', + // dictType: DICT_TYPE.TRUE_FALSE, + // dictClass: 'string', + // isTable: true, + // isTableForm: false, + // isForm: false, + // hiddenInMain: true, + // sort: 'custom', + // table: { + // width: 150 + // }, + // tableForm: { + // type: 'Select', + // inactiveValue: 'FALSE', + // disabled: true + // }, + // form: { + // component: 'Switch', + // value: 'TRUE', + // componentProps: { + // inactiveValue: 'FALSE', + // activeValue: 'TRUE' + // } + // } + // }, + // { + // label: '最后更新者', + // field: 'updater', + // sort: 'custom', + // isTableForm: false, + // hiddenInMain: true, + // table: { + // width: 150 + // }, + // isForm: false + // }, + // { + // label: '最后更新时间', + // field: 'updateTime', + // sort: 'custom', + // isTableForm: false, + // hiddenInMain: true, + // formatter: dateFormatter, + // detail: { + // dateFormat: 'YYYY-MM-DD HH:mm:ss' + // }, + // table: { + // width: 180 + // }, + // isForm: false, + // form: { + // component: 'DatePicker', + // componentProps: { + // style: { width: '100%' }, + // type: 'datetime', + // dateFormat: 'YYYY-MM-DD HH:mm:ss', + // valueFormat: 'x' + // } + // } + // }, + // { + // label: '备注', + // field: 'remark', + // sort: 'custom', + // hiddenInMain: true, + // isTableForm: false, + // table: { + // width: 150 + // } + // }, { label: '操作', field: 'action', diff --git a/src/views/wms/purchasereceiptManage/supplierdeliver/supplierPackage/supplierPackage.data.ts b/src/views/wms/purchasereceiptManage/supplierdeliver/supplierPackage/supplierPackage.data.ts index 5a2caeecc..61600e670 100644 --- a/src/views/wms/purchasereceiptManage/supplierdeliver/supplierPackage/supplierPackage.data.ts +++ b/src/views/wms/purchasereceiptManage/supplierdeliver/supplierPackage/supplierPackage.data.ts @@ -31,7 +31,7 @@ export const Package = useCrudSchemas(reactive([ }, }, { - label: '物料代码', + label: '品番', field: 'itemCode', sort: 'custom', isSearch: true, @@ -40,7 +40,7 @@ export const Package = useCrudSchemas(reactive([ }, }, { - label: '物料名称', + label: '品名', field: 'itemName', sort: 'custom', table: { @@ -48,7 +48,7 @@ export const Package = useCrudSchemas(reactive([ }, }, { - label: '物料描述1', + label: '背番', field: 'itemDesc1', sort: 'custom', table: { @@ -56,7 +56,7 @@ export const Package = useCrudSchemas(reactive([ }, }, { - label: '物料描述2', + label: '描述', field: 'itemDesc2', sort: 'custom', table: { @@ -253,7 +253,7 @@ export const Package = useCrudSchemas(reactive([ }, }, { - label: '供应商物料代码', + label: '供应商品番', field: 'supplierItemCode', sort: 'custom', table: { @@ -349,7 +349,7 @@ export const Package = useCrudSchemas(reactive([ }, }, { - label: '客户物料代码', + label: '客户品番', field: 'customerItemCode', sort: 'custom', table: { diff --git a/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverInspectionDetail/supplierdeliverInspectionDetail.data.ts b/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverInspectionDetail/supplierdeliverInspectionDetail.data.ts index ab2006ea6..5e6be66af 100644 --- a/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverInspectionDetail/supplierdeliverInspectionDetail.data.ts +++ b/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverInspectionDetail/supplierdeliverInspectionDetail.data.ts @@ -22,7 +22,7 @@ export const SupplierdeliverInspectionDetail = useCrudSchemas(reactive - + + - - + + - - + + { // 判断托信息和箱信息是否都存在 if (row.secondPackUnit && row.secondPackQty && row.packUnit && row.packQty) { // 总共需要多少箱 - row.allXiangQty = Math.ceil(parseFloat(row.qty) / parseFloat(row.packQty)) + row.allXiangQty = Math.ceil(parseFloat(row.balanceQty) / parseFloat(row.packQty)) // 放满的多少箱 - row.manXiangQty = Math.floor(parseFloat(row.qty) / parseFloat(row.packQty)) + row.manXiangQty = Math.floor(parseFloat(row.balanceQty) / parseFloat(row.packQty)) // 托数量/箱数量 一托可以放几箱 row.otherNumber = Math.floor(parseFloat(row.secondPackQty) / parseFloat(row.packQty)) // 数量%托数量 获取总共几托 @@ -245,9 +246,9 @@ const expandChange = (row: any, expandedRows: any[]) => { console.log(11, row.tuoInManNumber) // 数量除以托数量获取余数 row.lastNumber = - parseFloat(row.qty) >= parseFloat(row.tuoInManNumber) - ? accuracyFun.subtract(parseFloat(row.qty), parseFloat(row.tuoInManNumber)) - : parseFloat(row.qty) + parseFloat(row.balanceQty) >= parseFloat(row.tuoInManNumber) + ? accuracyFun.subtract(parseFloat(row.balanceQty), parseFloat(row.tuoInManNumber)) + : parseFloat(row.balanceQty) // 循环托 row.packageList = [] for (let i = 0; i < row.allTuoQty; i++) { @@ -314,7 +315,7 @@ const expandChange = (row: any, expandedRows: any[]) => { // 只有箱规格 if (!row.secondPackUnit && row.packUnit && row.packQty) { // 数量%每箱数量 获取总共几箱 - row.allXiangQty = Math.ceil(parseFloat(row.qty) / parseFloat(row.packQty)) + row.allXiangQty = Math.ceil(parseFloat(row.balanceQty) / parseFloat(row.packQty)) row.packageList = [] row.allTuoQty = '' row.allTuoQty1 = 1 @@ -325,7 +326,7 @@ const expandChange = (row: any, expandedRows: any[]) => { row.packageList[i] = { id: oneId.value, // xPoNumber: i + 1, - qtyOne: row.qty, + qtyOne: row.balanceQty, isTuo: 0 //无托 } } @@ -338,7 +339,7 @@ const expandChange = (row: any, expandedRows: any[]) => { // xPoNumber: j + 1 } // 数量除以箱数量获取余数 - cur.lastNumber = parseFloat(row.qty) % parseFloat(row.packQty) + cur.lastNumber = parseFloat(row.balanceQty) % parseFloat(row.packQty) // 如果有余数 if (cur.lastNumber) { // 最后一条信息直接展示余数的信息 @@ -407,16 +408,14 @@ const submitForm = () => { ) // item.allNumber += parseFloat(cur.qtyOne) || 0 }) - console.log(111, item.allNumber) - console.log(222, parseFloat(item.qty)) - return item.allNumber != parseFloat(item.qty) + return item.allNumber != parseFloat(item.balanceQty) }) console.log(222, obj) // return // const isBol = arr.some((item) => item == false) if (obj) { message.warning( - `物料【${obj.itemCode}】,批次【${obj.batch}】,${obj.packageList.length}托的总和数量【${obj.allNumber}】不等于发货总数量【${obj.qty}】` + `物料【${obj.itemCode}】,批次【${obj.batch}】,${obj.packageList.length}托的总和数量【${obj.allNumber}】不等于发货总数量【${obj.balanceQty}】` ) return } diff --git a/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverBasicForm.vue b/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverBasicForm.vue index 25801304a..fe656f047 100644 --- a/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverBasicForm.vue +++ b/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverBasicForm.vue @@ -18,6 +18,7 @@ @handleAddTable="handleAddTable" @handleDeleteTable="handleDeleteTable" :isShowReduceButtonSelection="true" + :isShowReduceButton="false" @tableSelectionDelete="tableSelectionDelete" @searchTableSuccess="searchTableSuccess" @submitForm="submitForm" @@ -108,6 +109,7 @@ const openFormByCreate = async ( data ) => { setV['supplierCode'] = data['supplierCode'] // 供应商代码 setV['poNumber'] = data['poNumber'] //采购订单 setV['ppNumber'] = data['number'] // 要货单号 + setV['deliNo'] = data['deliNo'] // 要货单号 searchPage: SupplierApi.getSupplierPage //新增--选择完要货计划,自动展示明细 getSearchTableData(data['number'],'ppNumber','number',0) @@ -253,6 +255,7 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row) => //新增--选择完要货计划,自动展示明细 setV['poNumber'] = val[0]['poNumber'] //采购订单 + setV['deliNo'] = val[0]['deliNo'] getSearchTableData(val[0]['number'],formField,searchField,0) // 设置计划到货时间 @@ -430,7 +433,7 @@ const submitForm = async (formType, submitData) => { } } if(data.subList.length == 0){ - message.error(t('ts.子列表数量不能空')) + message.error(t('子列表发货数量不能空')) return } formRef.value.formLoading = true diff --git a/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverRequestMain.data.ts b/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverRequestMain.data.ts index ad3c3c283..9a42d5edf 100644 --- a/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverRequestMain.data.ts +++ b/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverRequestMain.data.ts @@ -13,6 +13,14 @@ import { cloneDeep } from 'lodash-es' import {validateInteger} from '@/utils/validator' const { t } = useI18n() // 国际化 +const valueFilter = [{ + label: '是', + value:'1' +}, { + label: '否', + value: '0' + }] + let PurchasePlanDetailSchemas = cloneDeep(PurchasePlanDetail.allSchemas) if(PurchasePlanDetailSchemas?.tableColumns){ @@ -26,6 +34,15 @@ if(PurchasePlanDetailSchemas?.tableColumns){ formatter: dateFormatter2, sortTableDefault:2 }); + PurchasePlanDetailSchemas.tableColumns.splice(1, 0, { + label: '要货计划单号', + field: 'number', + table: { + width: 230 + }, + width: 230, + sortTableDefault:1 + }); } @@ -52,6 +69,20 @@ import { tr } from 'element-plus/es/locale' * @returns {Array} 供应商发货申请主表 */ export const SupplierdeliverRequestMain = useCrudSchemas(reactive([ + { + label: '单据号', + field: 'number', + sort: 'custom', + isForm:false, + table: { + width: 180, + fixed: 'left' + }, + detail: { + sortDetailDefault:1, + }, + isSearch: true + }, { label: '发货单号', field: 'asnNumber', @@ -60,20 +91,35 @@ export const SupplierdeliverRequestMain = useCrudSchemas(reactive( width: 180, fixed: 'left' }, + detail: { + sortDetailDefault:1, + }, isSearch: true, isForm: false }, + { - label: '单据号', - field: 'number', + label: '状态', + field: 'status', + dictType: DICT_TYPE.REQUEST_STATUS, + dictClass: 'string', + isTable: true, + isForm: false, + isSearch: false, sort: 'custom', table: { - width: 180, - fixed: 'left' + width: 150 }, - isTable:false, - isForm: false, - isSearch: true, + sortTableDefault: 2, + detail: { + sortDetailDefault: 2, + }, + form: { + value: '1', + componentProps: { + disabled: true + } + } }, { label: '供应商代码', @@ -82,8 +128,13 @@ export const SupplierdeliverRequestMain = useCrudSchemas(reactive( table: { width: 150 }, - isTable:false, + isTable: true, isSearch: true, + + sortTableDefault: 5, + detail: { + sortDetailDefault:5, + }, form: { // labelMessage: '信息提示说明!!!', componentProps: { @@ -106,7 +157,21 @@ export const SupplierdeliverRequestMain = useCrudSchemas(reactive( } } }, - + { + label: '供应商名称', + field: 'supplierName', + sort: 'custom', + sortTableDefault: 6, + isTable: true, + isForm: false, + table: { + width: 150 + }, + isDetail:false, + detail: { + sortDetailDefault: 6, + } + }, { label: '要货计划单号', field: 'ppNumber', @@ -115,7 +180,8 @@ export const SupplierdeliverRequestMain = useCrudSchemas(reactive( table: { width: 150 }, - sortTableDefault:9, + // sortTableDefault:9, + sortTableDefault: 4, form: { // labelMessage: '信息提示说明!!!', componentProps: { @@ -158,12 +224,16 @@ export const SupplierdeliverRequestMain = useCrudSchemas(reactive( isFormModel: true }], // 失去焦点校验参数 } + }, + detail: { + sortDetailDefault: 4, } }, { label: '要求到货时间', field: 'arriveTime', formatter: dateFormatter, + isDetail:false, detail: { dateFormat: 'YYYY-MM-DD HH:mm:ss' }, @@ -184,7 +254,26 @@ export const SupplierdeliverRequestMain = useCrudSchemas(reactive( }, }, { - label: '采购订单', + label: '便次', + field: 'deliNo', + sort: 'custom', + sortTableDefault: 4, + table: { + width: 150 + }, + form: { + component: 'InputNumber', + componentProps: { + min: 1, + disabled: true + }, + }, + detail: { + sortDetailDefault: 4, + } + }, + { + label: '订单号', field: 'poNumber', isForm:true, isTable:false, @@ -196,32 +285,19 @@ export const SupplierdeliverRequestMain = useCrudSchemas(reactive( } } }, + { - label: '计划到货时间', - field: 'planArriveTime', - formatter: dateFormatter, - detail: { - dateFormat: 'YYYY-MM-DD HH:mm:ss' - }, + label: '联系人姓名', + field: 'contactName', sort: 'custom', + isTable:false, table: { - width: 180 - }, - isTable:true, - sortTableDefault:6, - form: { - component: 'DatePicker', - componentProps: { - style: { width: '100%' }, - type: 'datetime', - dateFormat: 'YYYY-MM-DD HH:mm:ss', - valueFormat: 'x', - } + width: 150 }, }, { - label: '发货联系人姓名', - field: 'contactName', + label: '联系人电话', + field: 'contactPhone', sort: 'custom', isTable:false, table: { @@ -229,24 +305,16 @@ export const SupplierdeliverRequestMain = useCrudSchemas(reactive( }, }, { - label: '发货联系人电话', - field: 'contactPhone', + label: '联系人电子邮件', + field: 'contactEmail', sort: 'custom', - isTable:false, + isTable: false, + isDetail:true, table: { width: 150 }, }, // { - // label: '联系人电子邮件', - // field: 'contactEmail', - // sort: 'custom', - // isTable:false, - // table: { - // width: 150 - // }, - // }, - // { // label: '供应商发货仓库代码', // field: 'fromWarehouseCode', // sort: 'custom', @@ -261,6 +329,16 @@ export const SupplierdeliverRequestMain = useCrudSchemas(reactive( // }, // isForm: true // }, + { + label: '从仓库代码', + field: 'fromWarehouseCode', + sort: 'custom', + isTable: false, + table: { + width: 150 + }, + isForm: false + }, { label: '到仓库代码', field: 'toWarehouseCode', @@ -291,7 +369,29 @@ export const SupplierdeliverRequestMain = useCrudSchemas(reactive( }, isForm: false }, - + { + label: '计划到货时间', + field: 'planArriveTime', + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + isTable: false, + // sortTableDefault:6, + form: { + component: 'DatePicker', + componentProps: { + style: { width: '100%' }, + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, + }, { label: '承运商', field: 'carrierCode', @@ -320,20 +420,21 @@ export const SupplierdeliverRequestMain = useCrudSchemas(reactive( width: 150 }, }, - // { - // label: '业务类型', - // field: 'businessType', - // sort: 'custom', - // table: { - // width: 150 - // }, - // form: { - // value: 'SupplierDeliver', - // componentProps: { - // disabled: true, - // } - // } - // }, + { + label: '业务类型', + field: 'businessType', + sort: 'custom', + isTable:false, + table: { + width: 150 + }, + form: { + value: 'SupplierDeliver', + componentProps: { + disabled: true, + } + } + }, { label: '备注', field: 'remark', @@ -341,7 +442,30 @@ export const SupplierdeliverRequestMain = useCrudSchemas(reactive( table: { width: 150 }, - isTable: false + isTable: false, + isDetail: false + }, + { + label: '是否上架', + field: 'isPutaway', + sort: 'custom', + dictClass: 'string', + isForm: false, + isTableForm: false, + isTable: false, + table: { + + }, + detail: { + dictType: 'primary', + valueFilter: (value) => { + if (value == 1) { + return `是` + } else { + return '否' + } + } + } }, { label: '创建时间', @@ -373,222 +497,238 @@ export const SupplierdeliverRequestMain = useCrudSchemas(reactive( defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] } }, + sortSearchDefault: 1000, + sortTableDefault: 1000, isForm: false }, { label: '创建者', field: 'creator', sort: 'custom', - isTable:false, + isTable: false, + sortSearchDefault: 1000, + sortTableDefault: 1000, table: { width: 150 }, isForm: false }, - { - label: '申请时间', - field: 'requestTime', - formatter: dateFormatter, - detail: { - dateFormat: 'YYYY-MM-DD HH:mm:ss' - }, - sort: 'custom', - isTable:false, - table: { - width: 180 - }, - form: { - component: 'DatePicker', - componentProps: { - style: { width: '100%' }, - type: 'datetime', - dateFormat: 'YYYY-MM-DD HH:mm:ss', - valueFormat: 'x', - } - }, - isForm: false - }, - { - label: '截止时间', - field: 'dueTime', - formatter: dateFormatter, - detaul: { - dateFormat: 'YYYY-MM-DD HH:mm:ss' - }, - sort: 'custom', - isTable:false, - table: { - width: 180 - }, - form: { - component: 'DatePicker', - componentProps: { - style: { width: '100%' }, - type: 'datetime', - dateFormat: 'YYYY-MM-DD HH:mm:ss', - valueFormat: 'x', - } - }, - isForm: false - }, // { - // label: '部门', - // field: 'departmentCode', + // label: '申请时间', + // field: 'requestTime', + // formatter: dateFormatter, + // detail: { + // dateFormat: 'YYYY-MM-DD HH:mm:ss' + // }, // sort: 'custom', + // isTable:false, // table: { - // width: 150 - // }, - // formatter: (_: Recordable, __: TableColumn, cellValue: number) => { - // return userDeptArray.find((account) => account.id == cellValue)?.name + // width: 180 // }, // form: { - // value: userDept.id, - // component: 'Select', - // api: () => userDeptArray, + // component: 'DatePicker', // componentProps: { - // disabled: true, - // optionsAlias: { - // labelField: 'name', - // valueField: 'id' - // } + // style: { width: '100%' }, + // type: 'datetime', + // dateFormat: 'YYYY-MM-DD HH:mm:ss', + // valueFormat: 'x', // } - // } + // }, + // isForm: false + // }, + // { + // label: '截止时间', + // field: 'dueTime', + // formatter: dateFormatter, + // detaul: { + // dateFormat: 'YYYY-MM-DD HH:mm:ss' + // }, + // sort: 'custom', + // isTable:false, + // table: { + // width: 180 + // }, + // form: { + // component: 'DatePicker', + // componentProps: { + // style: { width: '100%' }, + // type: 'datetime', + // dateFormat: 'YYYY-MM-DD HH:mm:ss', + // valueFormat: 'x', + // } + // }, + // isForm: false + // }, + // { + // label: '部门', + // field: 'departmentCode', + // sort: 'custom', + // table: { + // width: 150 + // }, + // formatter: (_: Recordable, __: TableColumn, cellValue: number) => { + // return userDeptArray.find((account) => account.id == cellValue)?.name + // }, + // form: { + // value: userDept.id, + // component: 'Select', + // api: () => userDeptArray, + // componentProps: { + // disabled: true, + // optionsAlias: { + // labelField: 'name', + // valueField: 'id' + // } + // } + // } + // }, + + // { + // label: '最后更新时间', + // field: 'updateTime', + // formatter: dateFormatter, + // detail: { + // dateFormat: 'YYYY-MM-DD HH:mm:ss' + // }, + // sort: 'custom', + // isTable:false, + // table: { + // width: 180 + // }, + // form: { + // component: 'DatePicker', + // componentProps: { + // style: { width: '100%' }, + // type: 'datetime', + // dateFormat: 'YYYY-MM-DD HH:mm:ss', + // valueFormat: 'x', + // } + // }, + // isForm: false + // }, + // { + // label: '最后更新者', + // field: 'updater', + // sort: 'custom', + // table: { + // width: 150 + // }, + // isTable:false, + // isForm: false + // }, + // { + // label: '自动提交', + // field: 'autoCommit', + // dictType: DICT_TYPE.TRUE_FALSE, + // dictClass: 'string', + // isTable:false, + // sort: 'custom', + // isForm:false, + // table: { + // width: 150 + // }, + // form: { + // component: 'Switch', + // value: requestsettingData.autoCommit, + // componentProps: { + // inactiveValue: 'FALSE', + // activeValue: 'TRUE', + // disabled: true, + // } + // } + // }, + // { + // label: '自动通过', + // field: 'autoAgree', + // dictType: DICT_TYPE.TRUE_FALSE, + // dictClass: 'string', + // isTable: false, + // sort: 'custom', + // table: { + // width: 150 + // }, + // isForm:false, + // form: { + // component: 'Switch', + // value: requestsettingData.autoAgree, + // componentProps: { + // inactiveValue: 'FALSE', + // activeValue: 'TRUE', + // disabled: true, + // } + // } + // }, + // { + // label: '自动执行', + // field: 'autoExecute', + // dictType: DICT_TYPE.TRUE_FALSE, + // dictClass: 'string', + // isTable: false, + // sort: 'custom', + // table: { + // width: 150 + // }, + // isForm:false, + // form: { + // component: 'Switch', + // value: requestsettingData.autoExecute, + // componentProps: { + // inactiveValue: 'FALSE', + // activeValue: 'TRUE', + // disabled: true, + // } + // } + // }, + // { + // label: '直接生成记录', + // field: 'directCreateRecord', + // dictType: DICT_TYPE.TRUE_FALSE, + // dictClass: 'string', + // isForm: false, + // isTable: false, + // sort: 'custom', + // table: { + // width: 150 + // }, + // form: { + // component: 'Switch', + // value: requestsettingData.directCreateRecord, + // componentProps: { + // inactiveValue: 'FALSE', + // activeValue: 'TRUE', + // disabled: true, + // } + // } // }, { - label: '状态', - field: 'status', - dictType: DICT_TYPE.REQUEST_STATUS, - dictClass: 'string', - isTable: true, - isForm:false, - isSearch: false, - sort: 'custom', - table: { - width: 150 - }, - sortTableDefault:2, - form: { - value: '1', - componentProps: { - disabled: true - } - } - }, - { - label: '最后更新时间', - field: 'updateTime', - formatter: dateFormatter, + label: '到货时间', + field: 'arriveTime', + formatter: dateFormatter2, detail: { - dateFormat: 'YYYY-MM-DD HH:mm:ss' + dateFormat: 'YYYY-MM-DD hh:mm:ss' }, sort: 'custom', - isTable:false, + hiddenInMain: true, table: { width: 180 }, + isForm: false, + isTable: false, form: { component: 'DatePicker', componentProps: { style: { width: '100%' }, - type: 'datetime', - dateFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'date', + dateFormat: 'YYYY-MM-DD', valueFormat: 'x', } }, - isForm: false - }, - { - label: '最后更新者', - field: 'updater', - sort: 'custom', - table: { - width: 150 - }, - isTable:false, - isForm: false - }, - { - label: '自动提交', - field: 'autoCommit', - dictType: DICT_TYPE.TRUE_FALSE, - dictClass: 'string', - isTable:false, - sort: 'custom', - isForm:false, - table: { - width: 150 - }, - form: { - component: 'Switch', - value: requestsettingData.autoCommit, - componentProps: { - inactiveValue: 'FALSE', - activeValue: 'TRUE', - disabled: true, - } - } - }, - { - label: '自动通过', - field: 'autoAgree', - dictType: DICT_TYPE.TRUE_FALSE, - dictClass: 'string', - isTable: false, - sort: 'custom', - table: { - width: 150 - }, - isForm:false, - form: { - component: 'Switch', - value: requestsettingData.autoAgree, - componentProps: { - inactiveValue: 'FALSE', - activeValue: 'TRUE', - disabled: true, - } - } - }, - { - label: '自动执行', - field: 'autoExecute', - dictType: DICT_TYPE.TRUE_FALSE, - dictClass: 'string', - isTable: false, - sort: 'custom', - table: { - width: 150 - }, - isForm:false, - form: { - component: 'Switch', - value: requestsettingData.autoExecute, - componentProps: { - inactiveValue: 'FALSE', - activeValue: 'TRUE', - disabled: true, - } - } - }, - { - label: '直接生成记录', - field: 'directCreateRecord', - dictType: DICT_TYPE.TRUE_FALSE, - dictClass: 'string', - isForm: false, - isTable: false, - sort: 'custom', - table: { - width: 150 - }, - form: { - component: 'Switch', - value: requestsettingData.directCreateRecord, - componentProps: { - inactiveValue: 'FALSE', - activeValue: 'TRUE', - disabled: true, - } + + isTableForm: false, + tableForm: { + type: 'FormDate', + dateFormat: 'YYYY-MM-DD', + valueFormat: 'x', } }, { @@ -664,32 +804,91 @@ export const SupplierdeliverRequestMainRules = reactive({ * @returns {Array} 供应商发货申请子表 */ export const SupplierdeliverRequestDetail = useCrudSchemas(reactive([ - { - label: '订单行', - field: 'poLine', + label: '订单号', + field: 'poNumber', sort: 'custom', table: { width: 150 }, + isSearch: true, + // sortTableDefault:10, form: { + // labelMessage: '信息提示说明!!!', componentProps: { - disabled: true + disabled: true, + // isSearchList: true, + searchListPlaceholder: '请选择订单号', + searchField: 'number', + searchTitle: '要货计划信息', + searchAllSchemas: PurchasePlanDetail.allSchemas, + searchPage: PurchasePlanDetailApi.getPurchasePlanDetailPageClcik, + searchCondition: [ + { + key: 'number', + value: 'ppNumber', + message: '请填写要货计划单号!', + isMainValue: true + }, + { + key: 'flag', + value: 1, + isMainValue: false + }, + { + key: 'isAll', + value: '1', + isMainValue: false + }, + { + key: 'available', + value: 'TRUE', + isMainValue: false + } + + ] } }, tableForm: { - disabled: true + disabled: true, + isInpuFocusShow: false, + searchListPlaceholder: '请选择订单号', + searchField: 'number', + searchTitle: '要货计划信息', + searchAllSchemas: PurchasePlanDetail.allSchemas, + searchPage: PurchasePlanDetailApi.getPurchasePlanDetailPageClcik, + searchCondition: [ + { + key: 'number', + value: 'ppNumber', + message: '请填写要货计划单号!', + isMainValue: true + }, + { + key: 'flag', + value: 1, + isMainValue: false + }, + { + key: 'isAll', + value: '1', + isMainValue: false + }, + { + key: 'available', + value: 'TRUE', + isMainValue: false + }] } }, + { - label: '物料代码', - field: 'itemCode', + label: '订单行', + field: 'poLine', sort: 'custom', - isSearch:true, table: { width: 150 }, - sortTableDefault:3, form: { componentProps: { disabled: true @@ -700,144 +899,138 @@ export const SupplierdeliverRequestDetail = useCrudSchemas(reactive { + // return valueFilter.find((account) => account.value == cellValue)?.label + // }, table: { - width: 150 + width:150 }, - hiddenInMain:true, + sortTableDefault: 10000, isTableForm: false, - isForm: false + hiddenInMain: true, + + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '创建时间', @@ -1175,7 +1400,8 @@ export const SupplierdeliverRequestDetail = useCrudSchemas(reactive([ - { - label: '批次', - field: 'batch', - sort: 'custom', - table: { - width: 150 - }, - tableForm: { - disabled: true - } - }, - { - label: '生产日期', - field: 'produceDate', - formatter: dateFormatter2, - detail: { - dateFormat: 'YYYY-MM-DD' - }, - sort: 'custom', - table: { - width: 180 - }, - form: { - component: 'DatePicker', - componentProps: { - disabled:true, - style: {width: '100%'}, - type: 'date', - dateFormat: 'YYYY-MM-DD', - valueFormat: 'x', - - } - }, - tableForm: { - disabled:true, - type: 'FormDate', - dateFormat: 'YYYY-MM-DD', - valueFormat: 'x', - } - }, - // { - // label: '替代批次', - // field: 'altBatch', - // sort: 'custom', - // table: { - // width: 150 - // }, - // isTableForm: false, - // isForm: false, - // tableForm:{ - // disabled:true - // } - // }, - { - label: '到货日期', - field: 'arriveDate', - formatter: dateFormatter2, - detail: { - dateFormat: 'YYYY-MM-DD' - }, - sort: 'custom', - table: { - width: 180 - }, - isForm: false, - form: { - component: 'DatePicker', - componentProps: { - disabled:true, - style: {width: '100%'}, - type: 'date', - dateFormat: 'YYYY-MM-DD', - valueFormat: 'x', - } - }, - isTableForm: false, - tableForm: { - disabled:true, - type: 'FormDate', - dateFormat: 'YYYY-MM-DD', - valueFormat: 'x', - } - }, - { - label: '过期日期', - field: 'expireDate', - formatter: dateFormatter2, - detail: { - dateFormat: 'YYYY-MM-DD', - }, - sort: 'custom', - table: { - width: 180 - }, - form: { - component: 'DatePicker', - componentProps: { - disabled:true, - style: {width: '100%'}, - type: 'date', - dateFormat: 'YYYY-MM-DD', - valueFormat: 'x', - } - }, - tableForm: { - disabled:true, - type: 'FormDate', - dateFormat: 'YYYY-MM-DD', - valueFormat: 'x', - } - }, + ], + produceDate: [ + { required: true, message: '请输入生产日期', trigger: 'blur' } + ], + packQty: [ + { required: true, message: '请输入包装数量', trigger: 'blur' }, + // { validator: validateInteger, message: '请输入正确的整数', trigger: 'blur' } + ], + poNumber: [ + { required: true, message: '请选择订单号', trigger: 'change' } + ], + poLine: [ + { required: true, message: '请选择订单行', trigger: 'change' } + ], + packUnit: [ + { required: true, message: '请选择包装规格', trigger: 'change' } + ], + secondPackUnit: [ + { required: false, message: '请选择包装规格2', trigger: 'change' } + ], + secondPackQty: [ + { required: false, message: '请输入包装数量2', trigger: 'blur' }, + // { validator: validateInteger, message: '请输入正确的整数', trigger: 'blur' } + ], + convertRate: [ + { required: true, message: '请输入转换率', trigger: 'blur' } + ], + itemCode: [ + { required: true, message: '请选择品番', trigger: 'change' } + ], + remark: [ + { max: 50, message: '不得超过50个字符', trigger: 'blur' } + ], + // secondPackQty:[{ validator:validateInteger, message: '请输入正确的整数', trigger: 'blur'}] +}) + +export const SupplierdeliverRequestDetailLabel = useCrudSchemas(reactive([ { label: '订单号', field: 'poNumber', @@ -1458,7 +1575,7 @@ export const SupplierdeliverRequestDetailLabel = useCrudSchemas(reactive([ { - label: '物料代码', + label: '品番', field: 'itemCode', sort: 'custom', isSearch: true, @@ -1883,6 +2021,22 @@ export const SupplierdeliverRequestPackage2 = useCrudSchemas(reactive @@ -132,7 +132,7 @@ diff --git a/src/views/wms/supplierManage/purchaseClaim/purchaseClaimRecord/PurchaseClaimRecordMain.data.ts b/src/views/wms/supplierManage/purchaseClaim/purchaseClaimRecord/PurchaseClaimRecordMain.data.ts index a20ceb543..18ed97fbf 100644 --- a/src/views/wms/supplierManage/purchaseClaim/purchaseClaimRecord/PurchaseClaimRecordMain.data.ts +++ b/src/views/wms/supplierManage/purchaseClaim/purchaseClaimRecord/PurchaseClaimRecordMain.data.ts @@ -206,7 +206,7 @@ export const PurchaseClaimRecordMain = useCrudSchemas(reactive([ // 表单校验 export const PurchaseClaimRecordDetailRules = reactive({ itemCode: [ - { required: true, message: '请输入物料代码', trigger: 'blur' } + { required: true, message: '请输入品番', trigger: 'blur' } ], claimQty: [ { required: true, message: '请输入索赔数量', trigger: 'blur' } @@ -218,7 +218,7 @@ export const PurchaseClaimRecordDetailRules = reactive({ export const PurchaseClaimRecordDetail = useCrudSchemas(reactive([ { - label: '物料代码', + label: '品番', field: 'itemCode', sort: 'custom', isSearch: false, @@ -227,7 +227,7 @@ export const PurchaseClaimRecordDetail = useCrudSchemas(reactive([ tableForm:{ multiple:false,//多选 isInpuFocusShow: true, // 开启查询弹窗 - searchListPlaceholder: '请选择物料代码',// 输入框占位文本 + searchListPlaceholder: '请选择品番',// 输入框占位文本 searchField: 'itemCode', // 查询弹窗赋值字段 searchTitle: '供应商物料信息', // 查询弹窗标题 searchAllSchemas: Supplieritem.allSchemas, // 查询弹窗所需类 @@ -265,7 +265,7 @@ export const PurchaseClaimRecordDetail = useCrudSchemas(reactive([ disabled:true, enterSearch: true, isSearchList: true, // 开启查询弹窗 - searchListPlaceholder: '请选择物料代码', // 输入框占位文本 + searchListPlaceholder: '请选择品番', // 输入框占位文本 searchField: 'itemCode', // 查询弹窗赋值字段 searchTitle: '供应商物料信息', // 查询弹窗标题 searchAllSchemas: Supplieritem.allSchemas, // 查询弹窗所需类 @@ -297,7 +297,7 @@ export const PurchaseClaimRecordDetail = useCrudSchemas(reactive([ }, { - label: '物料名称', + label: '品名', field: 'itemName', sort: 'custom', table: { @@ -307,6 +307,16 @@ export const PurchaseClaimRecordDetail = useCrudSchemas(reactive([ type: 'Select' }, }, + { + label: '背番', + field: 'backNumber', + sort: 'custom', + isSearch: true, + hiddenSearchHigh:true, + table: { + width: 150 + }, + }, { label: '计量单位', field: 'uom', diff --git a/src/views/wms/supplierManage/purchaseClaim/purchaseClaimRecord/index.vue b/src/views/wms/supplierManage/purchaseClaim/purchaseClaimRecord/index.vue index 6b1f47fce..744c02678 100644 --- a/src/views/wms/supplierManage/purchaseClaim/purchaseClaimRecord/index.vue +++ b/src/views/wms/supplierManage/purchaseClaim/purchaseClaimRecord/index.vue @@ -40,7 +40,7 @@ diff --git a/src/views/wms/supplierManage/purchaseDiscreteOrder/purchaseDiscreteOrderMain/purchaseDiscreteOrderMain.data.ts b/src/views/wms/supplierManage/purchaseDiscreteOrder/purchaseDiscreteOrderMain/purchaseDiscreteOrderMain.data.ts index 47515e88f..1c79a7820 100644 --- a/src/views/wms/supplierManage/purchaseDiscreteOrder/purchaseDiscreteOrderMain/purchaseDiscreteOrderMain.data.ts +++ b/src/views/wms/supplierManage/purchaseDiscreteOrder/purchaseDiscreteOrderMain/purchaseDiscreteOrderMain.data.ts @@ -1524,7 +1524,7 @@ export const SupplierinvoiceRecordDetail = useCrudSchemas(reactive }, }, { - label: '物料代码', + label: '品番', field: 'itemCode', sort: 'custom', sortTableDefault:3, @@ -1533,7 +1533,18 @@ export const SupplierinvoiceRecordDetail = useCrudSchemas(reactive }, }, { - label: '物料描述', + label: '背番', + field: 'backNumber', + sort: 'custom', + isSearch: false, + hiddenSearchHigh:true, + sortTableDefault:3, + table: { + width: 150 + }, + }, + { + label: '描述', field: 'itemDesc', table: { width: 150 @@ -1570,7 +1581,7 @@ export const SupplierinvoiceRecordDetail = useCrudSchemas(reactive isTable: true, }, { - label: '物料名称', + label: '品名', field: 'itemName', sort: 'custom', table: { @@ -1780,7 +1791,7 @@ export const SupplierinvoiceRecordDetailRules = reactive({ { required: true, message: '请输入单据号', trigger: 'blur' } ], itemCode: [ - { required: true, message: '请输入物料代码', trigger: 'blur' } + { required: true, message: '请输入品番', trigger: 'blur' } ], requestTime: [ { required: true, message: '请输入创建时间', trigger: 'blur' } diff --git a/src/views/wms/supplierManage/supplierApbalance/supplierApbalanceMain/index.vue b/src/views/wms/supplierManage/supplierApbalance/supplierApbalanceMain/index.vue index 459b3230b..cabf4f58c 100644 --- a/src/views/wms/supplierManage/supplierApbalance/supplierApbalanceMain/index.vue +++ b/src/views/wms/supplierManage/supplierApbalance/supplierApbalanceMain/index.vue @@ -33,7 +33,10 @@ diff --git a/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRecordMain/index.vue b/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRecordMain/index.vue index e35619051..cf8c8e0a3 100644 --- a/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRecordMain/index.vue +++ b/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRecordMain/index.vue @@ -39,7 +39,10 @@ {{ row.differencePrice }} @@ -86,7 +89,7 @@ rowField:'annexMasterId', }], },{ - label: t('ts.货运单附件'), + label: t('ts.发货单附件'), prop: 'Annex', tableName:'waybill', showDownload:true, @@ -95,6 +98,16 @@ queryField:'tableId', rowField:'annexMasterId', }], + },{ + label: t('ts.对账单附件'), + prop: 'Annex', + tableName:'statement', + showDownload:true, + hiddenDelete:true, + queryParams:[{ + queryField:'tableId', + rowField:'annexMasterId', + }], },{ label: t('ts.其他附件'), prop: 'Annex', diff --git a/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRecordMain/supplierinvoiceRecordMain.data.ts b/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRecordMain/supplierinvoiceRecordMain.data.ts index 13675b376..ae7ce5d13 100644 --- a/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRecordMain/supplierinvoiceRecordMain.data.ts +++ b/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRecordMain/supplierinvoiceRecordMain.data.ts @@ -16,6 +16,7 @@ export const SupplierinvoiceRecordMain = useCrudSchemas(reactive([ }, isSearch: false }, + { label: '发票申请单号', field:'requestNumber', @@ -286,9 +287,6 @@ export const SupplierinvoiceRecordMain = useCrudSchemas(reactive([ component: 'InputNumber', } }, - - - { label: '索赔金额', field: 'claimAmount', @@ -720,6 +718,17 @@ export const SupplierinvoiceRecordMain = useCrudSchemas(reactive([ isTable:true, isForm: false }, + { + label: '模具分摊回转凭证号', + field: 'allocationTransferNumber', + sort: 'custom', + table: { + width: 200, + }, + sortTableDefault:11, + isTable:true, + isForm: false + }, // { // label: '冲销日记帐', // field: 'reverseInvoiceJournal', @@ -736,6 +745,15 @@ export const SupplierinvoiceRecordMain = useCrudSchemas(reactive([ // width: 150 // }, // }, + { + label: '发票总额', + field: 'invoiceAmountMain', + formatter: accountantFormart, + table: { + width: 160 + }, + sortTableDefault: 12, + }, { label: '索赔总额', field: 'claimAmount', @@ -1339,9 +1357,14 @@ export const SupplierinvoiceRecordDetailMain = useCrudSchemas(reactive }, }, { - label: '物料代码', + label: '品番', field: 'itemCode', sort: 'custom', sortTableDefault:3, @@ -1556,7 +1579,21 @@ export const SupplierinvoiceRecordDetail = useCrudSchemas(reactive }, }, { - label: '物料描述', + label: '背番', + field: 'backNumber', + sort: 'custom', + isSearch: false, + hiddenSearchHigh:true, + table: { + width: 150 + }, + sortTableDefault:4, + isTableForm:false, + isDetail: false, + isTable: true, + }, + { + label: '描述', field: 'itemDesc', table: { width: 150 @@ -1593,7 +1630,24 @@ export const SupplierinvoiceRecordDetail = useCrudSchemas(reactive isTable: true, }, { - label: '物料名称', + label: '采购计量单位', + field: 'purchaseStdUom', + dictType: DICT_TYPE.UOM, + dictClass: 'string', + sortTableDefault:6, + table: { + width: 150 + }, + isForm:false, + isTableForm:true, + isDetail: false, + isTable: true, + tableForm:{ + disabled:true + } + }, + { + label: '品名', field: 'itemName', sort: 'custom', table: { @@ -1823,7 +1877,7 @@ export const SupplierinvoiceRecordDetailRules = reactive({ { required: true, message: '请输入单据号', trigger: 'blur' } ], itemCode: [ - { required: true, message: '请输入物料代码', trigger: 'blur' } + { required: true, message: '请输入品番', trigger: 'blur' } ], requestTime: [ { required: true, message: '请输入创建时间', trigger: 'blur' } diff --git a/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue b/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue index 8f967cdf1..eed4c76b0 100644 --- a/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue +++ b/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue @@ -47,7 +47,7 @@ }} @@ -43,7 +46,7 @@ ref="basicFormRef" @success="formsSuccess" :rules="SupplierinvoiceInvoicedRules" - :formAllSchemas="SupplierinvoiceInvoiced.allSchemas" + :formAllSchemas="SupplierinvoiceInvoicedAllSchemas.allSchemas" :apiUpdate="SupplierinvoiceInvoicedApi.updateSupplierinvoiceInvoiced" :apiCreate="SupplierinvoiceInvoicedApi.createSupplierinvoiceInvoiced" @searchTableSuccess="searchTableSuccess" @@ -51,7 +54,7 @@ /> - + @@ -66,6 +69,7 @@ import TableHead from '@/components/TableHead/src/TableHead.vue' import Detail from '@/components/Detail/src/Detail.vue' import { formatDate } from '@/utils/formatTime' import { usePageLoading } from '@/hooks/web/usePageLoading' +import { cloneDeep } from 'lodash-es' const { loadStart, loadDone } = usePageLoading() defineOptions({ name: 'SupplierinvoiceInvoiced' }) @@ -75,7 +79,8 @@ const { t } = useI18n() // 国际化 const route = useRoute() // 路由信息 const routeName = ref() routeName.value = route.name -const tableColumns = ref(SupplierinvoiceInvoiced.allSchemas.tableColumns) +const SupplierinvoiceInvoicedAllSchemas = ref(cloneDeep(SupplierinvoiceInvoiced)) +const tableColumns = ref(SupplierinvoiceInvoicedAllSchemas.value.allSchemas.tableColumns) // 查询页面返回 const searchTableSuccess = (formField, searchField, val, formRef) => { @@ -142,7 +147,15 @@ const buttonBaseClick = (val, item) => { } // 列表-操作按钮 -const butttondata = (row) =>{ +const butttondata = (row) => { + const hasPermi = ref('') + if (routeName.value == 'SupplierinvoiceInvoiced') { + // 待开票数据查询-财务 + hasPermi.value = 'wms:supplierinvoice-invoiced:' + } else if (routeName.value == 'SupplierinvoiceInvoicedWork') { + // 待开票数据查询-工务 + hasPermi.value = 'wms:supplierinvoice-invoiced-work:' + } return [ // defaultButtons.mainListEditBtn({hasPermi:'wms:supplierinvoice-invoiced:update'}), // 编辑 // defaultButtons.mainListDeleteBtn({hasPermi:'wms:supplierinvoice-invoiced:delete'}), // 删除 @@ -154,7 +167,7 @@ const butttondata = (row) =>{ type: 'primary', color: '', link: true, // 文本展现按钮 - hasPermi: 'wms:supplierinvoice-invoiced:agree' + hasPermi: hasPermi.value +'agree' }, { label: t('作废'), @@ -163,7 +176,7 @@ const butttondata = (row) =>{ type: 'danger', color: '', link: true, // 文本展现按钮 - hasPermi: 'wms:supplierinvoice-invoiced:refuse' + hasPermi: hasPermi.value +'refuse' } ] } @@ -273,8 +286,15 @@ const handleExport = async () => { // 发起导出 loadStart() const excelTitle = ref(route.meta.title) - const data = await SupplierinvoiceInvoicedApi.exportSupplierinvoiceInvoiced(tableObject.params) - download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) + if (routeName.value == 'SupplierinvoiceInvoiced') { + // 待开票数据查询-财务 + const data = await SupplierinvoiceInvoicedApi.exportSupplierinvoiceInvoiced(tableObject.params) + download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) + } else if (routeName.value == 'SupplierinvoiceInvoicedWork') { + // 待开票数据查询-工务 + const data = await SupplierinvoiceInvoicedApi.exportSupplierinvoiceInvoicedWork(tableObject.params) + download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) + } } catch { } finally { loadDone() @@ -304,11 +324,34 @@ const searchFormClick = (searchData) => { } getList() // 刷新当前列表 } +// 不同业务展示不同的字段 +const getFiled=()=> { + if (routeName.value == 'SupplierinvoiceInvoiced') { + // 待开票数据查询-财务 + SupplierinvoiceInvoicedAllSchemas.value = cloneDeep(SupplierinvoiceInvoiced) + tableColumns .value= SupplierinvoiceInvoicedAllSchemas.value.allSchemas.tableColumns + + } else if (routeName.value == 'SupplierinvoiceInvoicedWork') { + // 待开票数据查询-工务 + SupplierinvoiceInvoicedAllSchemas.value.allSchemas.formSchema = SupplierinvoiceInvoicedAllSchemas.value.allSchemas.formSchema.filter(item=>item.field!='purchasePrice') + SupplierinvoiceInvoicedAllSchemas.value.allSchemas.tableColumns = SupplierinvoiceInvoicedAllSchemas.value.allSchemas.tableColumns.filter(item=>item.field!='purchasePrice') + SupplierinvoiceInvoicedAllSchemas.value.allSchemas.tableFormColumns = SupplierinvoiceInvoicedAllSchemas.value.allSchemas.tableFormColumns.filter(item => item.field != 'purchasePrice') + SupplierinvoiceInvoicedAllSchemas.value.allSchemas.detailSchema = SupplierinvoiceInvoicedAllSchemas.value.allSchemas.detailSchema.filter(item => item.field != 'purchasePrice') + tableColumns .value= SupplierinvoiceInvoicedAllSchemas.value.allSchemas.tableColumns + } +} /** 初始化 **/ onMounted(async () => { - getList() + await getList() + await getFiled() // importTemplateData.templateUrl = await SupplierinvoiceInvoicedApi.importTemplate() }) +onActivated(async () => { + routeName.value = route.name + await getFiled() + await getList() +}) + diff --git a/src/views/wms/supplierManage/supplierinvoiceInvoiced/supplierinvoiceInvoiced.data.ts b/src/views/wms/supplierManage/supplierinvoiceInvoiced/supplierinvoiceInvoiced.data.ts index 51a203719..87ba7f281 100644 --- a/src/views/wms/supplierManage/supplierinvoiceInvoiced/supplierinvoiceInvoiced.data.ts +++ b/src/views/wms/supplierManage/supplierinvoiceInvoiced/supplierinvoiceInvoiced.data.ts @@ -213,8 +213,28 @@ export const SupplierinvoiceInvoiced = useCrudSchemas(reactive([ }, }, { - label: '计量单位', - field: 'uom', + label: '背番', + field: 'backNumber', + sort: 'custom', + hiddenSearchHigh:true, + isSearch: true, + table: { + width: 150 + }, + }, + // { + // label: '计量单位', + // field: 'uom', + // dictType: DICT_TYPE.UOM, + // dictClass: 'string', + // sort: 'custom', + // table: { + // width: 150 + // }, + // }, + { + label: '采购计量单位', + field: 'purchaseStdUom', dictType: DICT_TYPE.UOM, dictClass: 'string', sort: 'custom',