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