diff --git a/src/api/wms/deliverRecordMain/index.ts b/src/api/wms/deliverRecordMain/index.ts index 548182e4b..52360583e 100644 --- a/src/api/wms/deliverRecordMain/index.ts +++ b/src/api/wms/deliverRecordMain/index.ts @@ -113,6 +113,11 @@ export const importDeliverPdaTemplate = () => { return request.download({ url: '/wms/deliver-record-main/get-customer-pda-import-template' }) } +// 下载丰田发货导入模板 +export const importFengtianSuppliesTemplate = () => { + return request.download({ url: '/wms/deliver-record-main/get-fengtian-supplies-import-template' }) +} + diff --git a/src/views/wms/deliversettlementManage/ftSuppliesRecordMain/deliverRecordMain/deliverRecordMain.data.ts b/src/views/wms/deliversettlementManage/ftSuppliesRecordMain/deliverRecordMain/deliverRecordMain.data.ts index cfb17f1b4..05fbe7009 100644 --- a/src/views/wms/deliversettlementManage/ftSuppliesRecordMain/deliverRecordMain/deliverRecordMain.data.ts +++ b/src/views/wms/deliversettlementManage/ftSuppliesRecordMain/deliverRecordMain/deliverRecordMain.data.ts @@ -1,5 +1,7 @@ import type { CrudSchema } from '@/hooks/web/useCrudSchemas' import { dateFormatter, dateFormatter2 } from '@/utils/formatTime' +import * as CustomerApi from '@/api/wms/customer' +import { Customer } from '../../../basicDataManage/customerManage/customer/customer.data' import * as LocationApi from '@/api/wms/location' import { Location } from '@/views/wms/basicDataManage/factoryModeling/location/location.data' @@ -640,40 +642,92 @@ export const DeliverRecordDetailRules = reactive({ }) +// export const ExtendColumn = useCrudSchemas( +// reactive([ +// { +// label: '从库位', +// field: 'fromLocationCode', +// sort: 'custom', +// table: { +// colProps: { +// span: 24 +// } +// }, +// form: { +// // labelMessage: '信息提示说明!!!', +// componentProps: { +// isSearchList: true, // 开启查询弹窗 +// searchListPlaceholder: '请选择库位编号', // 输入框占位文本 +// searchField: 'code', // 查询弹窗赋值字段 +// searchTitle: '库位信息', // 查询弹窗标题 +// searchAllSchemas: Location.allSchemas, // 查询弹窗所需类 +// searchPage: LocationApi.getLocationListByBusinesstype, // 查询弹窗所需分页方法 +// searchCondition: [ +// { +// key: 'isIn', +// value: false, +// isMainValue: false +// },{ +// key: 'businessType', +// value: 'Deliver', +// isMainValue: false +// } +// ] +// } +// }, +// isSearch: true +// }, + +// ]) +// ) + +// //表单校验 +// export const ExtendColumnRules = reactive({ +// fromLocationCode: [ +// { required: true, message: '请选择从库位', trigger: 'change' } +// ], +// }) + export const ExtendColumn = useCrudSchemas( reactive([ { - label: '从库位', - field: 'fromLocationCode', + label: '客户代码', + field: 'customerCode', sort: 'custom', - table: { - colProps: { - span: 24 - } - }, form: { // labelMessage: '信息提示说明!!!', componentProps: { + enterSearch: true, isSearchList: true, // 开启查询弹窗 - searchListPlaceholder: '请选择库位编号', // 输入框占位文本 + searchListPlaceholder: '请选择客户代码', // 输入框占位文本 searchField: 'code', // 查询弹窗赋值字段 - searchTitle: '库位信息', // 查询弹窗标题 - searchAllSchemas: Location.allSchemas, // 查询弹窗所需类 - searchPage: LocationApi.getLocationListByBusinesstype, // 查询弹窗所需分页方法 + searchTitle: '客户信息', // 查询弹窗标题 + searchAllSchemas: Customer.allSchemas, // 查询弹窗所需类 + searchPage: CustomerApi.getCustomerPage, // 查询弹窗所需分页方法 searchCondition: [ { - key: 'isIn', - value: false, + key: 'available', + value: 'TRUE', isMainValue: false - },{ - key: 'businessType', - value: 'Deliver', + }, + { + key: 'type', + value: 'DEFAULT', isMainValue: false } - ] + ], + verificationParams: [ + { + key: 'code', + action: '==', + value: '', + isMainValue: false, + isSearch: true, + isFormModel: true + } + ] // 失去焦点校验参数 } - }, - isSearch: true + } }, ]) @@ -681,7 +735,7 @@ export const ExtendColumn = useCrudSchemas( //表单校验 export const ExtendColumnRules = reactive({ - fromLocationCode: [ - { required: true, message: '请选择从库位', trigger: 'change' } + customerCode: [ + { required: true, message: '请选择客户代码', trigger: 'change' } ], }) diff --git a/src/views/wms/deliversettlementManage/ftSuppliesRecordMain/deliverRecordMain/index.vue b/src/views/wms/deliversettlementManage/ftSuppliesRecordMain/deliverRecordMain/index.vue index dc7b74b20..44e9ab181 100644 --- a/src/views/wms/deliversettlementManage/ftSuppliesRecordMain/deliverRecordMain/index.vue +++ b/src/views/wms/deliversettlementManage/ftSuppliesRecordMain/deliverRecordMain/index.vue @@ -54,7 +54,7 @@ :apiPage="DeliverRecordDetailApi.getDeliverRecordDetailPage" /> - --> + + @@ -97,8 +110,8 @@ const tableColumns = ref([...DeliverRecordMain.allSchemas.tableColumns,...Delive const { tableObject, tableMethods } = useTable({ getListApi: DeliverRecordDetailApi.getDeliverRecordDetailPage // 分页接口 }) - -importUrl.value = '/wms/deliver-record-main/import-shipment-zip' +importUrl.value = '/wms/deliver-record-main/import-fengtian-supplies' +//importUrl.value = '/wms/deliver-record-main/import-shipment-zip' // 判断 路由名称 进行条件过滤 DeliverRecordMain.allSchemas.formSchema.forEach(item => { if (item.field == 'dueTime') { @@ -345,6 +358,11 @@ const submitForm = async (formType, submitData) => { basicFormRef.value.formLoading = false } } + +const importTemplateData = reactive({ + templateUrl: '', + templateTitle: `【${route.meta.title}】导入模版.xlsx` +}) /** 初始化 **/ onMounted(async () => { if (routeName.value == 'ToyotaSupplies') { @@ -354,6 +372,7 @@ onMounted(async () => { } else if (routeName.value == 'SkylightCarpet') { tableObject.params.businessType = 'SkylightCarpet' } + importTemplateData.templateUrl = await DeliverRecordMainApi.importFengtianSuppliesTemplate() getList() }) onActivated(() => {