Browse Source

HL-6135

hella_online_20240927
yufei_wang 2 months ago
parent
commit
b2b359f4fc
  1. 152
      src/views/wms/deliversettlementManage/customerreturn/customerreturnRequestMain/customerreturnRequestMain.data.ts
  2. 7
      src/views/wms/deliversettlementManage/customerreturn/customerreturnRequestMain/index.vue

152
src/views/wms/deliversettlementManage/customerreturn/customerreturnRequestMain/customerreturnRequestMain.data.ts

@ -517,6 +517,75 @@ export const CustomerreturnRequestMain = useCrudSchemas(
}, },
isTable: false isTable: false
}, },
{
label: '到库位代码',
field: 'toLocationCode',
sort: 'custom',
table: {
width: 150
},
isSearch: true,
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
enterSearch: true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择到库位代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '到库位代码', // 查询弹窗标题
searchAllSchemas: Location.allSchemas, // 查询弹窗所需类
searchPage: LocationApi.selectBusinessTypeOutLocation, // 查询弹窗所需分页方法
searchCondition: [
{
key: 'businessType',
value: 'CustomerReject',
isMainValue: false
},
{
key: 'isIn',
value: 'in',
isMainValue: false
}
],
verificationParams: [{
key: 'code',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
}
}
// tableForm: {
// enterSearch:true,
// isRepeat: true,
// isInpuFocusShow: true, // 开启查询弹窗
// searchListPlaceholder: '请选择到库位代码',
// searchField: 'toLocationCode',
// searchTitle: '到库位代码',
// searchAllSchemas: Location.allSchemas,
// searchPage: LocationApi.selectBusinessTypeOutLocation, // 查询弹窗所需分页方法
// searchCondition: [{
// key: 'businessType',
// value: 'CustomerReject',
// isMainValue: false
// },
// {
// key: 'isIn',
// value: 'in',
// isMainValue: false
// }],
// verificationParams: [{
// key: 'code',
// action: '==',
// value: '',
// isMainValue: false,
// isSearch: true,
// isFormModel: true,
// }], // 失去焦点校验参数
// },
},
{ {
label: '自动提交', label: '自动提交',
field: 'autoCommit', field: 'autoCommit',
@ -691,6 +760,9 @@ export const CustomerreturnRequestMain = useCrudSchemas(
//表单校验 //表单校验
export const CustomerreturnRequestMainRules = reactive({ export const CustomerreturnRequestMainRules = reactive({
toLocationCode: [
{ required: true, message: '请选择到库位代码', trigger: 'blur' }
],
// deliverRecordNumber: [ // deliverRecordNumber: [
// { required: true, message: '请选择发货记录单号', trigger: 'change' } // { required: true, message: '请选择发货记录单号', trigger: 'change' }
// ], // ],
@ -1031,43 +1103,43 @@ export const CustomerreturnRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
} }
} }
}, },
{ // { 拿到主表
label: '到库位代码', // label: '到库位代码',
field: 'toLocationCode', // field: 'toLocationCode',
sort: 'custom', // sort: 'custom',
table: { // table: {
width: 150 // width: 150
}, // },
isSearch: true, // isSearch: true,
tableForm: { // tableForm: {
enterSearch:true, // enterSearch:true,
isRepeat: true, // isRepeat: true,
isInpuFocusShow: true, // 开启查询弹窗 // isInpuFocusShow: true, // 开启查询弹窗
searchListPlaceholder: '请选择到库位代码', // searchListPlaceholder: '请选择到库位代码',
searchField: 'toLocationCode', // searchField: 'toLocationCode',
searchTitle: '到库位代码', // searchTitle: '到库位代码',
searchAllSchemas: Location.allSchemas, // searchAllSchemas: Location.allSchemas,
searchPage: LocationApi.selectBusinessTypeOutLocation, // 查询弹窗所需分页方法 // searchPage: LocationApi.selectBusinessTypeOutLocation, // 查询弹窗所需分页方法
searchCondition: [{ // searchCondition: [{
key: 'businessType', // key: 'businessType',
value: 'CustomerReject', // value: 'CustomerReject',
isMainValue: false // isMainValue: false
}, // },
{ // {
key: 'isIn', // key: 'isIn',
value: 'in', // value: 'in',
isMainValue: false // isMainValue: false
}], // }],
verificationParams: [{ // verificationParams: [{
key: 'code', // key: 'code',
action: '==', // action: '==',
value: '', // value: '',
isMainValue: false, // isMainValue: false,
isSearch: true, // isSearch: true,
isFormModel: true, // isFormModel: true,
}], // 失去焦点校验参数 // }], // 失去焦点校验参数
}, // },
}, // },
{ {
label: '库存状态', label: '库存状态',
field: 'inventoryStatus', field: 'inventoryStatus',
@ -1234,9 +1306,9 @@ export const CustomerreturnRequestDetailRules = reactive({
itemCode: [ itemCode: [
{ required: true, message: '请选择物料代码', trigger: 'change' } { required: true, message: '请选择物料代码', trigger: 'change' }
], ],
toLocationCode: [ // toLocationCode: [
{ required: true, message: '请选择到库位代码', trigger: 'blur' } // { required: true, message: '请选择到库位代码', trigger: 'blur' }
], // ],
remark: [ remark: [
{ max: 50, message: '不得超过50个字符', trigger: 'blur' } { max: 50, message: '不得超过50个字符', trigger: 'blur' }
], ],

7
src/views/wms/deliversettlementManage/customerreturn/customerreturnRequestMain/index.vue

@ -168,6 +168,7 @@ const onEnter = async (field,value)=>{
// //
const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => { const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => {
nextTick(() => { nextTick(() => {
console.log('searchTableSuccess',formField, searchField, val, formRef, type, row)
CustomerreturnRequestMain.allSchemas.formSchema.forEach(item => { CustomerreturnRequestMain.allSchemas.formSchema.forEach(item => {
if(item.field == 'deliverRecordNumber') { if(item.field == 'deliverRecordNumber') {
if(customerCode.value != null){ if(customerCode.value != null){
@ -195,9 +196,6 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
}else if(formField == 'packUnit'){ }else if(formField == 'packUnit'){
row['packUnit'] = val[0]['packUnit'] row['packUnit'] = val[0]['packUnit']
row['packQty'] = val[0]['packQty'] row['packQty'] = val[0]['packQty']
}else if(formField == 'toLocationCode') {
//
row['toLocationCode'] = val[0]['code']
} else { } else {
row[formField] = val[0][searchField] row[formField] = val[0][searchField]
} }
@ -767,6 +765,9 @@ const submitForm = async (formType, submitData) => {
formRef.value.formLoading = true formRef.value.formLoading = true
try { try {
if (formType === 'create') { if (formType === 'create') {
data.subList.forEach(item=>{
item['toLocationCode'] = data['toLocationCode']
})
await CustomerreturnRequestMainApi.createCustomerreturnRequestMain(data) await CustomerreturnRequestMainApi.createCustomerreturnRequestMain(data)
message.success(t('common.createSuccess')) message.success(t('common.createSuccess'))
} else { } else {

Loading…
Cancel
Save