Browse Source

缺陷:HL-5776修改

hella_online_20240913
zhaoxuebing 1 week ago
parent
commit
debcffd0de
  1. 10
      src/api/wms/customerreturnRecordMain/index.ts
  2. 25
      src/views/wms/deliversettlementManage/customerreturn/customerreturnRecordMain/customerreturnRecordMain.data.ts
  3. 76
      src/views/wms/deliversettlementManage/customerreturn/customerreturnRecordMain/index.vue

10
src/api/wms/customerreturnRecordMain/index.ts

@ -78,4 +78,14 @@ export const exportCustomerreturnRecordMain = async (params) => {
// 下载用户导入模板 // 下载用户导入模板
export const importTemplate = () => { export const importTemplate = () => {
return request.download({ url: '/wms/customerreturn-record-main/get-import-template' }) return request.download({ url: '/wms/customerreturn-record-main/get-import-template' })
}
// 接收隔离收货
export const receive = (id) => {
return request.put({ url: '/wms/customerreturn-record-main/receive?id=' + id })
}
// 拒收隔离收货
export const refuse = (id) => {
return request.put({ url: '/wms/customerreturn-record-main/refuse?id=' + id })
} }

25
src/views/wms/deliversettlementManage/customerreturn/customerreturnRecordMain/customerreturnRecordMain.data.ts

@ -26,6 +26,7 @@ export const CustomerreturnRecordMain = useCrudSchemas(
table: { table: {
width: 180 width: 180
}, },
sortTableDefault:996,
isTable: true, isTable: true,
isSearch: true isSearch: true
}, },
@ -33,6 +34,7 @@ export const CustomerreturnRecordMain = useCrudSchemas(
label: '任务单号', label: '任务单号',
field: 'jobNumber', field: 'jobNumber',
sort: 'custom', sort: 'custom',
sortTableDefault:997,
table: { table: {
width: 180 width: 180
}, },
@ -536,6 +538,18 @@ export const CustomerreturnRecordDetail = useCrudSchemas(reactive<CrudSchema[]>(
// width: 150 // width: 150
// }, // },
// }, // },
{
label: '接收状态',
field: 'receiveStatus',
sort: 'custom',
dictType: DICT_TYPE.RECEIVE_STATUS,
dictClass: 'string',
sortTableDefault:998,
isTable: true,
table: {
width: 150
},
},
{ {
label: '物料代码', label: '物料代码',
field: 'itemCode', field: 'itemCode',
@ -895,8 +909,17 @@ export const CustomerreturnRecordDetail = useCrudSchemas(reactive<CrudSchema[]>(
width: 150 width: 150
}, },
isTable: false, isTable: false,
}, },
{
label: '操作',
field: 'action',
isDetail: false,
isForm: false,
table: {
width: 180,
fixed: 'right'
},
}
])) ]))
//表单校验 //表单校验

76
src/views/wms/deliversettlementManage/customerreturn/customerreturnRecordMain/index.vue

@ -130,13 +130,43 @@ const buttonBaseClick = (val, item) => {
} }
} }
//
const isShowMainButton = (row,val) => {
if (val.indexOf(row.receiveStatus) > -1) {
return false
} else {
return true
}
}
// - // -
const butttondata = (row,$index) => { const butttondata = (row,$index) => {
const findIndex = row['masterId']?tableObject.tableList.findIndex(item=>item['masterId'] == row['masterId']):-1 const findIndex = row['masterId']?tableObject.tableList.findIndex(item=>item['masterId'] == row['masterId']):-1
if(findIndex>-1&&findIndex<$index){ if(findIndex>-1&&findIndex<$index){
return [] return []
}else{ }else{
return [defaultButtons.mainListDocumentPrintBtn(null),] // return [
defaultButtons.mainListDocumentPrintBtn(null),
{
label: '拒收',
name: 'mainJobRefusal',
hide: isShowMainButton(row, ['0']),
type: 'primary',
icon: '',
color: '',
hasPermi: '',
link: true //
},
{
label: '接收',
name: 'mainJobRecept',
hide: isShowMainButton(row, ['0']),
type: 'primary',
icon: '',
color: '',
hasPermi: '',
link: true //
}] //
} }
} }
@ -144,8 +174,52 @@ const butttondata = (row,$index) => {
const buttonTableClick = async (val, row) => { const buttonTableClick = async (val, row) => {
if (val == 'documentPrint') { // if (val == 'documentPrint') { //
handlePoint(row) handlePoint(row)
}else if(val == 'mainJobRefusal'){
//
handleRefusal(row)
}else if(val == 'mainJobRecept'){
//
handleRecept(row)
} }
} }
//
const handleRefusal = async (row) => {
try {
loadStart()
//
CustomerreturnRecordMainApi.refuse(row.masterId).then(() => {
message.success(t('common.updateSuccess'))
tableObject.loading = false
buttonBaseClick('refresh',null)
}).catch(err => {
tableObject.loading = false
console.log(err)
})
} catch {
} finally {
loadDone()
}
}
//
const handleRecept = async (row) => {
try {
loadStart()
//
CustomerreturnRecordMainApi.receive(row.masterId).then(() => {
message.success(t('common.updateSuccess'))
tableObject.loading = false
buttonBaseClick('refresh',null)
}).catch(err => {
tableObject.loading = false
console.log(err)
})
} catch {
} finally {
loadDone()
}
}
// //
const { wsCache } = useCache() const { wsCache } = useCache()
/** 详情操作 */ /** 详情操作 */

Loading…
Cancel
Save