|
|
@ -1,8 +1,9 @@ |
|
|
|
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 * as SupplieritemApi from '@/api/wms/supplieritem' |
|
|
|
import { Supplier} from '@/views/wms/basicDataManage/supplierManage/supplier/supplier.data' |
|
|
|
|
|
|
|
import { Supplieritem } from '@/views/wms/basicDataManage/supplierManage/supplieritem/supplieritem.data' |
|
|
|
import * as ItembasicApi from '@/api/wms/itembasic' |
|
|
|
import {Itembasic} from "@/views/wms/basicDataManage/itemManage/itembasic/itembasic.data"; |
|
|
@ -13,14 +14,22 @@ import * as DemandforecastingMainApi from '@/api/wms/demandforecastingMain' |
|
|
|
import * as DemandforecastingDetailApi from '@/api/wms/demandforecastingDetail' |
|
|
|
|
|
|
|
const { t } = useI18n() // 国际化
|
|
|
|
const planerList = await DemandforecastingMainApi.queryUserPlanerList() |
|
|
|
let planerList = await DemandforecastingMainApi.queryUserPlanerList() |
|
|
|
if(planerList.length>0){ |
|
|
|
planerList.unshift({ |
|
|
|
planerId:'', |
|
|
|
planerNickname:'全选', |
|
|
|
planerUsername:'全选' |
|
|
|
}) |
|
|
|
} |
|
|
|
console.log('planerList',planerList) |
|
|
|
|
|
|
|
/** |
|
|
|
* @returns {Array} 要货预测主表 |
|
|
|
*/ |
|
|
|
Supplieritem.allSchemas.searchSchema = Supplieritem.allSchemas.searchSchema.filter(item=>item.field!="allowOverShipment") |
|
|
|
|
|
|
|
export const Supplier = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
export const Supplier1 = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
{ |
|
|
|
label: '用户名称', |
|
|
|
field: 'userName', |
|
|
@ -101,10 +110,12 @@ export const DemandforecastingMain = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
isSearch:true, |
|
|
|
search:{ |
|
|
|
component:'Select', |
|
|
|
value:planerList.length>0?[planerList[0]['planerId']]:[], |
|
|
|
value:planerList.length>1?[planerList[1]['planerId']]:[], |
|
|
|
componentProps: { |
|
|
|
showAll:true,// 备用做全选
|
|
|
|
multiple:true, |
|
|
|
emptyValues:[null, undefined], |
|
|
|
valueOnClear:null, |
|
|
|
options:planerList.map(item=>({ |
|
|
|
label:item.planerUsername, |
|
|
|
value:item.planerId |
|
|
@ -129,7 +140,7 @@ export const DemandforecastingMain = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
searchListPlaceholder: '请选择供应商代码', // 输入框占位文本
|
|
|
|
searchField: 'supplierCode', // 查询弹窗赋值字段
|
|
|
|
searchTitle: '供应商信息', // 查询弹窗标题
|
|
|
|
searchAllSchemas: Supplier.allSchemas, // 查询弹窗所需类
|
|
|
|
searchAllSchemas: Supplier1.allSchemas, // 查询弹窗所需类
|
|
|
|
searchPage: DemandforecastingMainApi.querySupplierList, // 查询弹窗所需分页方法
|
|
|
|
searchCondition: [{ |
|
|
|
key: 'planers', |
|
|
|