Browse Source

客户退货申请

hella_online_20241017
yufei_wang 1 month ago
parent
commit
e883bdaa4b
  1. 50
      src/views/wms/deliversettlementManage/customerreturn/customerreturnRequestMain/index.vue

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

@ -144,31 +144,6 @@ const updataTableColumns = (val) => {
}
const onEnter = async (field,value)=>{
console.log('onEnter',field,value)
const dateTime = new Date().getTime()
if(field=='customerCode'){
//---
formRef.value.opensearchTable('deliverRecordNumber', 'number', '发货记录信息', DeliverRecordMain.allSchemas, DeliverRecordDetailApi.getDeliverRecordDetailPageCustomerreturn,[{
key: 'available',
value: 'TRUE',
isMainValue: false
},
{
key: 'createTime', //
value: dateTime - 30 * 24 * 60 * 60 * 1000 + "," + dateTime, //
action: 'betweeen', //
isSearch: true, // 使
isMainValue: false // false isMainValue: true
},
{
key: 'customerCode', //
value: 'customerCode', //
action: '==', //
isSearch: true, // 使
isFormModel:true,
isMainValue: false // false isMainValue: true
}
],undefined,undefined,null,true,DeliverRecordDetail.allSchemas)
}
}
//
const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => {
@ -521,10 +496,6 @@ const openForm =async (type: string, row?: number) => {
originTableData.value = []
if(type == "update"){
CustomerreturnRequestMain.allSchemas.formSchema.forEach((item) => {
if(item.field == 'deliverRecordNumber'){
item.componentProps.isSearchList = false,
item.componentProps.disabled = true
}
if(item.field == 'customerCode'){
item.componentProps.isSearchList = false,
item.componentProps.disabled = true
@ -536,9 +507,6 @@ const openForm =async (type: string, row?: number) => {
})
}else {
CustomerreturnRequestMain.allSchemas.formSchema.forEach((item) => {
if(item.field == 'deliverRecordNumber'){
item.componentProps.isSearchList = true
}
if(item.field == 'customerCode'){
item.componentProps.isSearchList = true
}
@ -687,18 +655,8 @@ const tableSelectionDelete = (selection) => {
}
const clearSearchInput = (field)=>{
console.log('field',field)
if('customerCode' == field){
//
formRef.value.formRef.setValues({
deliverRecordNumber: '',
// customerDockCode:'',
})
tableData.value = []
}else if('deliverRecordNumber' == field){
//
// formRef.value.formRef.setValues({
// customerDockCode:'',
// })
if('fromLocationCode' == field){
//
tableData.value = []
}
}
@ -707,7 +665,7 @@ const inputNumberChange = (field, val,row, index) => {
console.log('inputNumberChange',formRef.value.formRef)
if(field=='qty'){
if(row['subReturnedQty']<=0){
message.error(`发货记录单号${formRef.value.formRef.formModel['deliverRecordNumber']}物料${row['itemCode']}批次${row['batch']}被占用`)
message.error(`物料${row['itemCode']}批次${row['batch']}被占用`)
}
if(row['subReturnedQty']!=null&&row['qty']>row['subReturnedQty']){
message.error(`物料${row['itemCode']}最大数量为${row['subReturnedQty']}`)
@ -726,7 +684,7 @@ const submitForm = async (formType, submitData) => {
tableData.value.forEach(item=>{
if(item['subReturnedQty']<=0){
flag = false
message.error(`发货记录单号${data['deliverRecordNumber']}物料${item['itemCode']}批次${item['batch']}被占用`)
message.error(`物料${item['itemCode']}批次${item['batch']}被占用`)
}
if(item['subReturnedQty']!=null&&item['qty']>item['subReturnedQty']){
flag = false

Loading…
Cancel
Save