|
|
@ -6,7 +6,8 @@ import { |
|
|
|
Supplieritem |
|
|
|
} from "@/views/wms/basicDataManage/supplierManage/supplieritem/supplieritem.data"; |
|
|
|
import * as SupplieritemApi from "@/api/wms/supplieritem"; |
|
|
|
|
|
|
|
import { Balance } from '@/views/wms/inventoryManage/balance/balance.data' |
|
|
|
import * as PurchaseBarterRequestMainApi from "@/api/wms/purchaseBarterRequestMain"; |
|
|
|
/** |
|
|
|
* @returns {Array} 采购换货申请主表 |
|
|
|
*/ |
|
|
@ -109,16 +110,10 @@ export const PurchaseBarterRequestDetail = useCrudSchemas(reactive<CrudSchema[]> |
|
|
|
isInpuFocusShow: true, // 开启查询弹窗
|
|
|
|
searchListPlaceholder: '请选择物料代码',// 输入框占位文本
|
|
|
|
searchField: 'itemCode', // 查询弹窗赋值字段
|
|
|
|
searchTitle: '供应商物料信息', // 查询弹窗标题
|
|
|
|
searchAllSchemas: Supplieritem.allSchemas, // 查询弹窗所需类
|
|
|
|
searchPage: SupplieritemApi.getSupplieritemPage, // 查询弹窗所需分页方法
|
|
|
|
searchTitle: '库存余额信息', // 查询弹窗标题
|
|
|
|
searchAllSchemas: Balance.allSchemas, |
|
|
|
searchPage: PurchaseBarterRequestMainApi.getSupplieritemPage, // 查询弹窗所需分页方法
|
|
|
|
searchCondition: [{ |
|
|
|
key: 'available', |
|
|
|
value: 'TRUE', |
|
|
|
action: '==', |
|
|
|
isSearch: true, |
|
|
|
isMainValue: false |
|
|
|
},{ |
|
|
|
key: 'supplierCode', |
|
|
|
value: 'supplierCode', |
|
|
|
action: '==', |
|
|
@ -147,21 +142,19 @@ export const PurchaseBarterRequestDetail = useCrudSchemas(reactive<CrudSchema[]> |
|
|
|
isSearchList: true, // 开启查询弹窗
|
|
|
|
searchListPlaceholder: '请选择物料代码', // 输入框占位文本
|
|
|
|
searchField: 'itemCode', // 查询弹窗赋值字段
|
|
|
|
searchTitle: '供应商物料信息', // 查询弹窗标题
|
|
|
|
searchAllSchemas: Supplieritem.allSchemas, // 查询弹窗所需类
|
|
|
|
searchPage: SupplieritemApi.getSupplieritemPage, // 查询弹窗所需分页方法
|
|
|
|
searchCondition: [ |
|
|
|
{ |
|
|
|
key: 'available', |
|
|
|
value: 'TRUE', |
|
|
|
isMainValue: false |
|
|
|
},{ |
|
|
|
searchTitle: '库存余额信息', // 查询弹窗标题
|
|
|
|
searchAllSchemas: Balance.allSchemas, |
|
|
|
searchPage: PurchaseBarterRequestMainApi.getSupplieritemPage, // 查询弹窗所需分页方法
|
|
|
|
searchCondition: [{ |
|
|
|
key: 'supplierCode', |
|
|
|
value: 'supplierCode', |
|
|
|
action: '==', |
|
|
|
message: '供应商代码不能为空!', |
|
|
|
isMainValue:true |
|
|
|
} |
|
|
|
], |
|
|
|
isFormModel:true, // filters中添加筛选的数据--取于formModel
|
|
|
|
required:true, // 前置添加必有,和isFormModel结合使用
|
|
|
|
isSearch: true, |
|
|
|
isMainValue: false |
|
|
|
}], |
|
|
|
verificationParams: [ |
|
|
|
{ |
|
|
|
key: 'itemCode', |
|
|
@ -220,8 +213,8 @@ export const PurchaseBarterRequestDetail = useCrudSchemas(reactive<CrudSchema[]> |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '包装规格', |
|
|
|
field: 'packUnit', |
|
|
|
label: '换货库位', |
|
|
|
field: 'locationCode', |
|
|
|
sort: 'custom', |
|
|
|
isSearch: false, |
|
|
|
tableForm: { |
|
|
@ -233,15 +226,42 @@ export const PurchaseBarterRequestDetail = useCrudSchemas(reactive<CrudSchema[]> |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '库存数量 ', |
|
|
|
field: 'inventoryQty', |
|
|
|
sort: 'custom', |
|
|
|
isSearch: false, |
|
|
|
isTable: false, |
|
|
|
tableForm: { |
|
|
|
disabled: true |
|
|
|
}, |
|
|
|
form:{ |
|
|
|
componentProps:{ |
|
|
|
disabled:true |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '换货数量', |
|
|
|
field: 'qty', |
|
|
|
sort: 'custom', |
|
|
|
isSearch: false, |
|
|
|
// form: {
|
|
|
|
// component: 'InputNumber',
|
|
|
|
// value: 0
|
|
|
|
// },
|
|
|
|
form: { |
|
|
|
component: 'InputNumber', |
|
|
|
value: 0 |
|
|
|
componentProps: { |
|
|
|
min: 0, |
|
|
|
precision: 6, |
|
|
|
} |
|
|
|
}, |
|
|
|
tableForm: { |
|
|
|
type: 'InputNumber', |
|
|
|
min: 0, |
|
|
|
precision: 6, |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '换货原因 ', |
|
|
@ -265,15 +285,16 @@ export const PurchaseBarterRequestDetail = useCrudSchemas(reactive<CrudSchema[]> |
|
|
|
|
|
|
|
function validateQty(rule, value, callback) { |
|
|
|
const numericValue = Number(value); |
|
|
|
if (Number.isInteger(numericValue) && numericValue > 0) { |
|
|
|
if (numericValue > 0) { |
|
|
|
// if(numericValue < )
|
|
|
|
callback(); |
|
|
|
} else { |
|
|
|
callback(new Error('数量必须是一个正整数')); |
|
|
|
callback(new Error('换货数量必须是一个正数')); |
|
|
|
} |
|
|
|
} |
|
|
|
//表单校验
|
|
|
|
export const PurchaseBarterRequestDetailRules = reactive({ |
|
|
|
qty:[ |
|
|
|
{ validator:validateQty, message: '数量必须是一个正整数', trigger: 'change'} |
|
|
|
{ validator:validateQty, message: '换货数量必须是一个正数', trigger: 'change'} |
|
|
|
], |
|
|
|
}) |
|
|
|