Browse Source

采购收货任务

master_hella_20240701
王宇飞 10 months ago
parent
commit
5d04261295
  1. 4
      src/api/wms/purchasereceiptJobMain/index.ts
  2. 3
      src/locales/en-US.ts
  3. 1
      src/locales/zh-CN.ts
  4. 33
      src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptJobMain/index.vue

4
src/api/wms/purchasereceiptJobMain/index.ts

@ -136,6 +136,6 @@ export const acceptPurchasereceiptJobMain = (id: number) => {
} }
// 拒收采购收货任务主 // 拒收采购收货任务主
export const refusalPurchasereceiptJobMain = (id: number) => { export const refusalPurchasereceiptJobMain = (data) => {
return request.put({ url: '/wms/purchasereceipt-job-main/refusal?id=' + id }) return request.post({ url: '/wms/purchasereceipt-job-main/refusal',data})
} }

3
src/locales/en-US.ts

@ -1137,7 +1137,8 @@ export default {
'驳回原因不能为空,且不超过60字':'The reason for rejection cannot be empty and cannot exceed 60 words', '驳回原因不能为空,且不超过60字':'The reason for rejection cannot be empty and cannot exceed 60 words',
:'Batch release', :'Batch release',
'重新生成标签会删除上次生成的标签,是否确认继续?':'Regenerating labels will delete the last generated label. Are you sure you want to continue?', '重新生成标签会删除上次生成的标签,是否确认继续?':'Regenerating labels will delete the last generated label. Are you sure you want to continue?',
'确 认':'Confirm' '确 认':'Confirm',
:'Please enter the reason for rejection'
}, },

1
src/locales/zh-CN.ts

@ -1138,6 +1138,7 @@ export default {
:'批量发布', :'批量发布',
'重新生成标签会删除上次生成的标签,是否确认继续?':'重新生成标签会删除上次生成的标签,是否确认继续?', '重新生成标签会删除上次生成的标签,是否确认继续?':'重新生成标签会删除上次生成的标签,是否确认继续?',
'确 认':'确 认', '确 认':'确 认',
:'请输入拒收原因'
}, },
} }

33
src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptJobMain/index.vue

@ -249,8 +249,8 @@ const buttonTableClick = async (val, row) => {
// //
checkQualityReport(row) checkQualityReport(row)
} else if(val == 'mainJobRefusal'){ } else if(val == 'mainJobRefusal'){
handleRefusal(row.masterId) // handleRefusal(row.masterId)
getList() resonSubmit(row)
} }
} }
// //
@ -270,12 +270,33 @@ const handleClose = async (id: number) => {
await getList() await getList()
} catch {} } catch {}
} }
const resonSubmit = async (row)=>{
ElMessageBox.prompt(t('ts.请输入拒收原因'), t('ts.提示'), {
confirmButtonText: t('common.ok'),
cancelButtonText: t('common.cancel'),
inputPattern: /^[\s\S]*.*\S[\s\S]*$/, //
inputErrorMessage: t(`ts.${'驳回原因不能为空,且不超过256字'}`),
inputType:'textarea',
inputValidator:(value)=>{
if(value.length>60||value.length==0){
return false
}else{
return true
}
}
}).then(({ value }) => {
// 
handleRefusal(row.masterId,value)
})
.catch(() => {
})
}
/** 拒收按钮操作 */ /** 拒收按钮操作 */
const handleRefusal = async (id: number) => { const handleRefusal = async (id: number,refuseReason:string) => {
// refuseReason
try { try {
await message.confirm(t('common.confirmRefusal')) await PurchasereceiptJobMainApi.refusalPurchasereceiptJobMain({id,refuseReason})
await PurchasereceiptJobMainApi.refusalPurchasereceiptJobMain(id)
message.success(t('common.refusalSuccess')) message.success(t('common.refusalSuccess'))
await getList() await getList()
} catch {} } catch {}

Loading…
Cancel
Save