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
},
{
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: '自动提交',
field: 'autoCommit',
@ -691,6 +760,9 @@ export const CustomerreturnRequestMain = useCrudSchemas(
//表单校验
export const CustomerreturnRequestMainRules = reactive({
toLocationCode: [
{ required: true, message: '请选择到库位代码', trigger: 'blur' }
],
// deliverRecordNumber: [
// { required: true, message: '请选择发货记录单号', trigger: 'change' }
// ],
@ -1031,43 +1103,43 @@ export const CustomerreturnRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
}
}
},
{
label: '到库位代码',
field: 'toLocationCode',
sort: 'custom',
table: {
width: 150
},
isSearch: 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: '到库位代码',
// field: 'toLocationCode',
// sort: 'custom',
// table: {
// width: 150
// },
// isSearch: 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: '库存状态',
field: 'inventoryStatus',
@ -1234,9 +1306,9 @@ export const CustomerreturnRequestDetailRules = reactive({
itemCode: [
{ required: true, message: '请选择物料代码', trigger: 'change' }
],
toLocationCode: [
{ required: true, message: '请选择到库位代码', trigger: 'blur' }
],
// toLocationCode: [
// { required: true, message: '请选择到库位代码', trigger: 'blur' }
// ],
remark: [
{ 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 ) => {
nextTick(() => {
console.log('searchTableSuccess',formField, searchField, val, formRef, type, row)
CustomerreturnRequestMain.allSchemas.formSchema.forEach(item => {
if(item.field == 'deliverRecordNumber') {
if(customerCode.value != null){
@ -195,9 +196,6 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
}else if(formField == 'packUnit'){
row['packUnit'] = val[0]['packUnit']
row['packQty'] = val[0]['packQty']
}else if(formField == 'toLocationCode') {
//
row['toLocationCode'] = val[0]['code']
} else {
row[formField] = val[0][searchField]
}
@ -767,6 +765,9 @@ const submitForm = async (formType, submitData) => {
formRef.value.formLoading = true
try {
if (formType === 'create') {
data.subList.forEach(item=>{
item['toLocationCode'] = data['toLocationCode']
})
await CustomerreturnRequestMainApi.createCustomerreturnRequestMain(data)
message.success(t('common.createSuccess'))
} else {

Loading…
Cancel
Save