|
@ -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() |
|
|
/** 详情操作 */ |
|
|
/** 详情操作 */ |
|
|