|
|
@ -1,7 +1,7 @@ |
|
|
|
import type { CrudSchema } from '@/hooks/web/useCrudSchemas' |
|
|
|
import { dateFormatter,dateFormatter2 } from '@/utils/formatTime' |
|
|
|
import * as SupplierApi from '@/api/wms/supplier' |
|
|
|
import { Supplier } from '@/views/wms/basicDataManage/supplierManage/supplier/supplier.data' |
|
|
|
// import { Supplier } from '@/views/wms/basicDataManage/supplierManage/supplier/supplier.data'
|
|
|
|
import * as SupplieritemApi from '@/api/wms/supplieritem' |
|
|
|
import { Supplieritem } from '@/views/wms/basicDataManage/supplierManage/supplieritem/supplieritem.data' |
|
|
|
import * as ItembasicApi from '@/api/wms/itembasic' |
|
|
@ -10,6 +10,7 @@ import * as PurchaseMainApi from '@/api/wms/purchaseMain' |
|
|
|
import * as PurchaseDetailApi from '@/api/wms/purchaseDetail' |
|
|
|
import { PurchaseDetail, PurchaseMain } from '../purchaseMain/purchaseMain.data' |
|
|
|
import * as DemandforecastingMainApi from '@/api/wms/demandforecastingMain' |
|
|
|
import * as DemandforecastingDetailApi from '@/api/wms/demandforecastingDetail' |
|
|
|
|
|
|
|
const { t } = useI18n() // 国际化
|
|
|
|
const planerList = await DemandforecastingMainApi.queryUserPlanerList() |
|
|
@ -18,6 +19,100 @@ console.log('planerList',planerList) |
|
|
|
/** |
|
|
|
* @returns {Array} 要货预测主表 |
|
|
|
*/ |
|
|
|
|
|
|
|
export const Supplier = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
{ |
|
|
|
label: '用户名称', |
|
|
|
field: 'userName', |
|
|
|
sort: 'custom', |
|
|
|
isSearch:true, |
|
|
|
table: { |
|
|
|
width: 150, |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '用户昵称', |
|
|
|
field: 'nickName', |
|
|
|
sort: 'custom', |
|
|
|
table: { |
|
|
|
width: 150, |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '供应商代码', |
|
|
|
field: 'supplierCode', |
|
|
|
isSearch:true, |
|
|
|
sort: 'custom', |
|
|
|
table: { |
|
|
|
width: 150, |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '供应商名称', |
|
|
|
field: 'supplierName', |
|
|
|
sort: 'custom', |
|
|
|
table: { |
|
|
|
width: 150, |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '创建时间', |
|
|
|
field: 'createTime', |
|
|
|
formatter: dateFormatter, |
|
|
|
detail: { |
|
|
|
dateFormat: 'YYYY-MM-DD HH:mm:ss' |
|
|
|
}, |
|
|
|
sort: 'custom', |
|
|
|
table: { |
|
|
|
width: 180 |
|
|
|
}, |
|
|
|
} |
|
|
|
])) |
|
|
|
export const Version = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
{ |
|
|
|
label: '供应商代码', |
|
|
|
field: 'supplerCodes', |
|
|
|
sort: 'custom', |
|
|
|
isSearch:true, |
|
|
|
table: { |
|
|
|
width: 150, |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '订单号', |
|
|
|
field: 'poNumber', |
|
|
|
sort: 'custom', |
|
|
|
isSearch:true, |
|
|
|
table: { |
|
|
|
width: 150, |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '订单行', |
|
|
|
field: 'poLine', |
|
|
|
sort: 'custom', |
|
|
|
table: { |
|
|
|
width: 150, |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '物料代码', |
|
|
|
field: 'itemCode', |
|
|
|
isSearch:true, |
|
|
|
sort: 'custom', |
|
|
|
table: { |
|
|
|
width: 150, |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '子表版本', |
|
|
|
field: 'detailVersion', |
|
|
|
sort: 'custom', |
|
|
|
table: { |
|
|
|
width: 150, |
|
|
|
} |
|
|
|
} |
|
|
|
])) |
|
|
|
export const DemandforecastingMain = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
{ |
|
|
|
label: '计划员', |
|
|
@ -52,15 +147,22 @@ export const DemandforecastingMain = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
isSearch: true, |
|
|
|
search: { |
|
|
|
componentProps: { |
|
|
|
dialogWidth:'700px',//搜索出来弹窗的宽度
|
|
|
|
multiple: true, |
|
|
|
enterSearch:true, |
|
|
|
isSearchList: true, // 开启查询弹窗
|
|
|
|
searchListPlaceholder: '请选择供应商代码', // 输入框占位文本
|
|
|
|
searchField: 'code', // 查询弹窗赋值字段
|
|
|
|
searchField: 'supplierCode', // 查询弹窗赋值字段
|
|
|
|
searchTitle: '供应商信息', // 查询弹窗标题
|
|
|
|
searchAllSchemas: Supplier.allSchemas, // 查询弹窗所需类
|
|
|
|
searchPage: SupplierApi.getSupplierPageSCP, // 查询弹窗所需分页方法
|
|
|
|
searchPage: DemandforecastingMainApi.querySupplierList, // 查询弹窗所需分页方法
|
|
|
|
searchCondition: [{ |
|
|
|
key: 'planers', |
|
|
|
value: 'planerId', |
|
|
|
message: '请选择计划员!', |
|
|
|
isMainValue: true, |
|
|
|
isCSV:true,//是否用逗号分隔参数
|
|
|
|
},{ |
|
|
|
key: 'available', |
|
|
|
value: 'TRUE', |
|
|
|
isMainValue: false |
|
|
@ -101,15 +203,16 @@ export const DemandforecastingMain = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
enterSearch: true, |
|
|
|
isSearchList: true, // 开启查询弹窗
|
|
|
|
searchListPlaceholder: '请选择物料代码', // 输入框占位文本
|
|
|
|
searchField: 'code', // 查询弹窗赋值字段
|
|
|
|
searchField: 'itemCode', // 查询弹窗赋值字段
|
|
|
|
searchTitle: '物料基础信息', // 查询弹窗标题
|
|
|
|
searchAllSchemas: Itembasic.allSchemas, // 查询弹窗所需类
|
|
|
|
searchPage: ItembasicApi.getItembasicPage, // 查询弹窗所需分页方法
|
|
|
|
searchAllSchemas: Supplieritem.allSchemas, // 查询弹窗所需类
|
|
|
|
searchPage: SupplieritemApi.getSupplieritemPageSCP, // 查询弹窗所需分页方法
|
|
|
|
searchCondition: [{ |
|
|
|
key: 'supplierCode', |
|
|
|
key: 'supplierCodes', |
|
|
|
value: 'supplierCode', |
|
|
|
message: '请填写供应商代码!', |
|
|
|
isMainValue: true |
|
|
|
isMainValue: true, |
|
|
|
isCSV:true,//是否用逗号分隔参数
|
|
|
|
},{ |
|
|
|
key: 'available', |
|
|
|
value: 'TRUE', |
|
|
@ -133,15 +236,22 @@ export const DemandforecastingMain = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
enterSearch: true, |
|
|
|
isSearchList: true, // 开启查询弹窗
|
|
|
|
searchListPlaceholder: '请选择物料代码', // 输入框占位文本
|
|
|
|
searchField: 'code', // 查询弹窗赋值字段
|
|
|
|
searchTitle: '物料基础信息', // 查询弹窗标题
|
|
|
|
searchAllSchemas: Itembasic.allSchemas, // 查询弹窗所需类
|
|
|
|
searchPage: ItembasicApi.getItembasicPage, // 查询弹窗所需分页方法
|
|
|
|
searchField: 'detailVersion', // 查询弹窗赋值字段
|
|
|
|
searchTitle: '版本号', // 查询弹窗标题
|
|
|
|
searchAllSchemas: Version.allSchemas, // 查询弹窗所需类
|
|
|
|
searchPage: DemandforecastingDetailApi.queryVersion, // 查询弹窗所需分页方法
|
|
|
|
searchCondition: [{ |
|
|
|
key: 'supplierCode', |
|
|
|
key: 'supplierCodes', |
|
|
|
value: 'supplierCode', |
|
|
|
message: '请填写供应商代码!', |
|
|
|
isMainValue: true |
|
|
|
isMainValue: true, |
|
|
|
isCSV:true,//是否用逗号分隔参数
|
|
|
|
},{ |
|
|
|
key: 'itemCodes', |
|
|
|
value: 'itemCode', |
|
|
|
message: '请填写物料代码!', |
|
|
|
isMainValue: true, |
|
|
|
isCSV:true,//是否用逗号分隔参数
|
|
|
|
},{ |
|
|
|
key: 'available', |
|
|
|
value: 'TRUE', |
|
|
|