|
|
@ -6,6 +6,8 @@ import * as PurchaseMainApi from '@/api/wms/purchaseMain' |
|
|
|
import * as PurchaseDetailApi from '@/api/wms/purchaseDetail' |
|
|
|
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"; |
|
|
|
const { t } = useI18n() // 国际化
|
|
|
|
|
|
|
|
/** |
|
|
@ -22,6 +24,7 @@ export const PurchasePlanMain = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
}, |
|
|
|
isSearch: true, |
|
|
|
sortTableDefault:1, |
|
|
|
sortSearchDefault:1, |
|
|
|
form: { |
|
|
|
labelMessage: '影响明细中物料代码,需在供应商物料中维护', |
|
|
|
componentProps: { |
|
|
@ -38,6 +41,22 @@ export const PurchasePlanMain = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
isMainValue: false |
|
|
|
}] |
|
|
|
} |
|
|
|
}, |
|
|
|
search: { |
|
|
|
componentProps: { |
|
|
|
enterSearch: true, |
|
|
|
isSearchList: true, // 开启查询弹窗
|
|
|
|
searchListPlaceholder: '请选择供应商代码', // 输入框占位文本
|
|
|
|
searchField: 'code', // 查询弹窗赋值字段
|
|
|
|
searchTitle: '供应商信息', // 查询弹窗标题
|
|
|
|
searchAllSchemas: Supplier.allSchemas, // 查询弹窗所需类
|
|
|
|
searchPage: SupplierApi.getSupplierPageSCP, // 查询弹窗所需分页方法
|
|
|
|
searchCondition: [{ |
|
|
|
key: 'available', |
|
|
|
value: 'TRUE', |
|
|
|
isMainValue: false |
|
|
|
}] |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
//仅是主列表页面的筛选搜索条件
|
|
|
@ -50,6 +69,7 @@ export const PurchasePlanMain = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
isForm:false, |
|
|
|
isTableForm:false, |
|
|
|
isSearch:true, |
|
|
|
sortSearchDefault:3, |
|
|
|
formatter: dateFormatter, |
|
|
|
search: { |
|
|
|
component: 'DatePicker', |
|
|
@ -60,36 +80,17 @@ export const PurchasePlanMain = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
label: '送达日期', |
|
|
|
field: 'deliveryDate', |
|
|
|
table: { |
|
|
|
width: 150 |
|
|
|
}, |
|
|
|
formatter: dateFormatter2, |
|
|
|
sortTableDefault:2, |
|
|
|
form: { |
|
|
|
component: 'DatePicker', |
|
|
|
componentProps: { |
|
|
|
style: {width: '100%'}, |
|
|
|
type: 'date', |
|
|
|
dateFormat: 'YYYY-MM-DD', |
|
|
|
valueFormat: 'x', |
|
|
|
} |
|
|
|
}, |
|
|
|
detail: { |
|
|
|
dateFormat: 'YYYY-MM-DD' |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '单据号', |
|
|
|
label: '要货计划单号', |
|
|
|
field: 'number', |
|
|
|
sort: 'custom', |
|
|
|
isForm: false, |
|
|
|
table: { |
|
|
|
width: 180, |
|
|
|
}, |
|
|
|
sortTableDefault:11, |
|
|
|
sortTableDefault:8, |
|
|
|
sortSearchDefault:4, |
|
|
|
isSearch: true |
|
|
|
}, |
|
|
|
|
|
|
@ -112,6 +113,10 @@ export const PurchasePlanMain = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
searchAllSchemas: PurchaseMain.allSchemas, |
|
|
|
searchPage: PurchaseMainApi.getPurchaseMainPage, |
|
|
|
searchCondition: [{ |
|
|
|
key: 'type', |
|
|
|
value: 'SCHEDULE', |
|
|
|
isMainValue: false |
|
|
|
},{ |
|
|
|
key: 'available', |
|
|
|
value: 'TRUE', |
|
|
|
isMainValue: false |
|
|
@ -128,6 +133,41 @@ export const PurchasePlanMain = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '送达日期', |
|
|
|
field: 'deliveryDate', |
|
|
|
table: { |
|
|
|
width: 150 |
|
|
|
}, |
|
|
|
formatter: dateFormatter2, |
|
|
|
sortTableDefault:2, |
|
|
|
form: { |
|
|
|
component: 'DatePicker', |
|
|
|
componentProps: { |
|
|
|
style: {width: '100%'}, |
|
|
|
type: 'date', |
|
|
|
dateFormat: 'YYYY-MM-DD', |
|
|
|
valueFormat: 'x', |
|
|
|
} |
|
|
|
}, |
|
|
|
detail: { |
|
|
|
dateFormat: 'YYYY-MM-DD' |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '采购订单类型', |
|
|
|
field: 'status', |
|
|
|
sort: 'custom', |
|
|
|
dictType: DICT_TYPE.PURCHASE_ORDER_TYPE, |
|
|
|
dictClass: 'string', |
|
|
|
isTable: false, |
|
|
|
isForm:true, |
|
|
|
isSearch: true, |
|
|
|
table: { |
|
|
|
width: 150 |
|
|
|
}, |
|
|
|
|
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '收货人', |
|
|
|
field: 'contacts', |
|
|
@ -242,11 +282,12 @@ export const PurchasePlanMain = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
dictClass: 'string', |
|
|
|
isTable: true, |
|
|
|
isForm:false, |
|
|
|
isSearch: false, |
|
|
|
isSearch: true, |
|
|
|
table: { |
|
|
|
width: 150 |
|
|
|
}, |
|
|
|
sortTableDefault:12, |
|
|
|
sortTableDefault:13, |
|
|
|
sortSearchDefault:6, |
|
|
|
form: { |
|
|
|
value: '1', |
|
|
|
componentProps: { |
|
|
@ -436,7 +477,7 @@ export const PurchasePlanMainRules = reactive({ |
|
|
|
*/ |
|
|
|
export const PurchasePlanDetail = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
{ |
|
|
|
label: '单据号', |
|
|
|
label: '要货计划单号', |
|
|
|
field: 'number', |
|
|
|
sort: 'custom', |
|
|
|
isTableForm: false, |
|
|
@ -455,9 +496,36 @@ export const PurchasePlanDetail = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
field: 'poNumber', |
|
|
|
isSearch:true, |
|
|
|
isTable:true, |
|
|
|
sortTableDefault:8, |
|
|
|
sortTableDefault:9, |
|
|
|
sortSearchDefault:2, |
|
|
|
isForm:false, |
|
|
|
isTableForm:false |
|
|
|
isTableForm:false, |
|
|
|
search: { |
|
|
|
// labelMessage: '信息提示说明!!!',
|
|
|
|
componentProps: { |
|
|
|
dialogWidth:'1085px',//搜索出来弹窗的宽度
|
|
|
|
isSearchList: 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: '订单号', |
|
|
@ -518,6 +586,26 @@ export const PurchasePlanDetail = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '计划数量', |
|
|
|
field: 'planQty', |
|
|
|
sort: 'custom', |
|
|
|
table: { |
|
|
|
width: 150 |
|
|
|
}, |
|
|
|
tableForm: { |
|
|
|
type: 'InputNumber', |
|
|
|
precision: 6 |
|
|
|
}, |
|
|
|
sortTableDefault:4, |
|
|
|
form: { |
|
|
|
component: 'InputNumber', |
|
|
|
componentProps: { |
|
|
|
min: 0, |
|
|
|
precision: 6 |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '订单行', |
|
|
|
field: 'poLine', |
|
|
@ -525,7 +613,7 @@ export const PurchasePlanDetail = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
table: { |
|
|
|
width: 150 |
|
|
|
}, |
|
|
|
sortTableDefault:9, |
|
|
|
sortTableDefault:10, |
|
|
|
form: { |
|
|
|
// labelMessage: '信息提示说明!!!',
|
|
|
|
componentProps: { |
|
|
@ -576,6 +664,7 @@ export const PurchasePlanDetail = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
width: 150 |
|
|
|
}, |
|
|
|
sortTableDefault:3, |
|
|
|
sortSearchDefault:5, |
|
|
|
isSearch:true, |
|
|
|
form: { |
|
|
|
componentProps: { |
|
|
@ -584,6 +673,29 @@ export const PurchasePlanDetail = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
}, |
|
|
|
tableForm: { |
|
|
|
disabled: true |
|
|
|
}, |
|
|
|
search: { |
|
|
|
// labelMessage: '信息提示说明!!!',
|
|
|
|
componentProps: { |
|
|
|
multiple: true, |
|
|
|
enterSearch: true, |
|
|
|
isSearchList: true, // 开启查询弹窗
|
|
|
|
searchListPlaceholder: '请选择物料代码', // 输入框占位文本
|
|
|
|
searchField: 'code', // 查询弹窗赋值字段
|
|
|
|
searchTitle: '物料基础信息', // 查询弹窗标题
|
|
|
|
searchAllSchemas: Itembasic.allSchemas, // 查询弹窗所需类
|
|
|
|
searchPage: ItembasicApi.getItembasicPage, // 查询弹窗所需分页方法
|
|
|
|
searchCondition: [{ |
|
|
|
key: 'supplierCode', |
|
|
|
value: 'supplierCode', |
|
|
|
message: '请填写供应商代码!', |
|
|
|
isMainValue: true, |
|
|
|
},{ |
|
|
|
key: 'available', |
|
|
|
value: 'TRUE', |
|
|
|
isMainValue: false |
|
|
|
}] |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
@ -598,31 +710,13 @@ export const PurchasePlanDetail = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
disabled: true |
|
|
|
} |
|
|
|
}, |
|
|
|
sortTableDefault:9, |
|
|
|
sortTableDefault:11, |
|
|
|
tableForm: { |
|
|
|
disabled: true |
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '计划数量', |
|
|
|
field: 'planQty', |
|
|
|
sort: 'custom', |
|
|
|
table: { |
|
|
|
width: 150 |
|
|
|
}, |
|
|
|
tableForm: { |
|
|
|
type: 'InputNumber', |
|
|
|
precision: 6 |
|
|
|
}, |
|
|
|
sortTableDefault:4, |
|
|
|
form: { |
|
|
|
component: 'InputNumber', |
|
|
|
componentProps: { |
|
|
|
precision: 6 |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
label: '已发货数量', |
|
|
|
field: 'shippedQty', |
|
|
@ -666,7 +760,7 @@ export const PurchasePlanDetail = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
table: { |
|
|
|
width: 150 |
|
|
|
}, |
|
|
|
sortTableDefault:10, |
|
|
|
sortTableDefault:12, |
|
|
|
tableForm: { |
|
|
|
type: 'Select', |
|
|
|
disabled:true, |
|
|
@ -762,7 +856,7 @@ const validatePlanQty = (rule, value, callback) => { |
|
|
|
if (numReg.test(value)&&value>0) { |
|
|
|
callback() |
|
|
|
} else { |
|
|
|
callback(new Error('计划数量不能为0')) |
|
|
|
callback(new Error('计划数量不能小于0')) |
|
|
|
} |
|
|
|
} |
|
|
|
//表单校验
|
|
|
@ -778,7 +872,8 @@ export const PurchasePlanDetailRules = reactive({ |
|
|
|
], |
|
|
|
planQty: [ |
|
|
|
{ required: true, message: '请输入计划数量', trigger: 'blur' }, |
|
|
|
{ validator:validatePlanQty, message: '计划数量不能为0', trigger: 'blur'} |
|
|
|
{ max: 0, message: '计划数量不能小于0', trigger: 'blur' } |
|
|
|
// { validator:validatePlanQty, message: '计划数量不能小于0', trigger: 'blur'}
|
|
|
|
], |
|
|
|
remark: [ |
|
|
|
{ max: 50, message: '不得超过50个字符', trigger: 'blur' } |
|
|
|