Browse Source

YT-1769【采购索赔】12-23变更

intex_online20241228
张立 1 month ago
parent
commit
ff47a496ce
  1. 5
      src/locales/en-US.ts
  2. 1
      src/locales/zh-CN.ts
  3. 12
      src/utils/disposition/defaultButtons.ts
  4. 29
      src/views/wms/supplierManage/purchaseClaim/purchaseClaimRequest/index.vue

5
src/locales/en-US.ts

@ -1321,8 +1321,7 @@ export default {
: 'Create an invoice request?',
:'Detail',
退:'Return',
:'Invalid successfully'
: 'Invalid successfully',
'索赔金额不能为0,请修改后提交。': 'The claim amount cannot be 0, please modify and submit.'
},
}

1
src/locales/zh-CN.ts

@ -1322,6 +1322,7 @@ export default {
: '创建开票申请',
:'作废成功',
退: '退回',
'索赔金额不能为0,请修改后提交。':'索赔金额不能为0,请修改后提交。'
},
}

12
src/utils/disposition/defaultButtons.ts

@ -1480,6 +1480,18 @@ export function mainSendBackBtn(option: any) {
hasPermi: ''
})
}
// 主列表-查看明细
export function mainSeeDetailBtn(option: any) {
return __defaultBtnOption(option, {
label: t(`ts.查看明细`).replace('ts.', ''),
name: 'seeDetail',
hide: false,
type: 'primary',
color: '',
link: true, // 文本展现按钮
hasPermi: ''
})
}
// 默认按钮规则
function __defaultBtnOption(option: any, specific: any) {
return {

29
src/views/wms/supplierManage/purchaseClaim/purchaseClaimRequest/index.vue

@ -267,6 +267,7 @@ const butttondata = (row, $index) => {
return []
}
return [
defaultButtons.mainSeeDetailBtn(null), //
defaultButtons.mainListPlanSubBtn({
hide: isShowMainButton(row, ['1']),
hasPermi: 'wms:purchaseClaimRequest:sub'
@ -296,7 +297,10 @@ const butttondata = (row, $index) => {
// -
const buttonTableClick = async (val, row) => {
if (val == 'edit') {
if (val == 'seeDetail') {
//
openDetail(row, '单据号', row.number)
} else if (val == 'edit') {
//
openForm('update', row)
} else if (val == 'mainPlanSub') {
@ -304,7 +308,7 @@ const buttonTableClick = async (val, row) => {
handleSub(row.masterId)
} else if (val == 'mainPlanApp') {
//
handleAgree(row.masterId)
handleAgree(row)
} else if (val == 'mainPlanTur') {
//
handleReject(row.masterId)
@ -361,13 +365,17 @@ const handleSub = async (masterId: number) => {
}
/** 审批通过按钮操作 */
const handleAgree = async (masterId: number) => {
const handleAgree = async (row: any) => {
if (row.isApproved==1) {
message.error(t('ts.索赔金额不能为0,请修改后提交。'))
return
}
try {
//
await message.confirm(t('ts.是否审批通过所选中数据?'))
tableObject.loading = true
//
await PurchaseClaimRequestMainApi.agreePurchaseClaimRequestMain(masterId)
await PurchaseClaimRequestMainApi.agreePurchaseClaimRequestMain(row.masterId)
message.success(t('ts.审批通过成功!'))
tableObject.loading = false
//
@ -484,6 +492,7 @@ const flag = ref(false)
//
const submitForm = async (formType, submitData) => {
flag.value=false
let data = { ...submitData }
if (data.masterId) {
data.id = data.masterId
@ -510,11 +519,11 @@ const submitForm = async (formType, submitData) => {
flag.value = true
return
}
if (obj.claimAmount == 0) {
message.error(`索赔金额不能为0!`)
flag.value = true
return
}
// if (obj.claimAmount == 0) {
// message.error(`0!`)
// flag.value = true
// return
// }
})
if (flag.value) {
return
@ -586,10 +595,12 @@ const submitFormDetail = async (formType, data) => {
console.log(detailRef.value.formRef.dialogVisible)
detailFormRef.value.dialogVisible = false
detailRef.value.updateList()
getList()
} catch {
detailFormRef.value.formLoading = false
}
}
/** 初始化 **/
onMounted(async () => {
getList()

Loading…
Cancel
Save