Browse Source

采购收货完善拒收接口增加关闭接口。

master_hella_20240701
liuchen864 4 months ago
parent
commit
c1b2ce0403
  1. 7
      src/api/wms/purchasereceiptJobMain/index.ts
  2. 2
      src/locales/en-US.ts
  3. 2
      src/locales/zh-CN.ts
  4. 24
      src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptJobMain/index.vue
  5. 7
      src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptJobMain/purchasereceiptJobMain.data.ts

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

@ -123,4 +123,9 @@ export const abandonPurchasereceiptJobMainSpare = (id: number) => {
// 承接采购收货任务主
export const acceptPurchasereceiptJobMain = (id: number) => {
return request.put({ url: '/wms/purchasereceipt-job-main/accept?id=' + id })
}
}
// 拒收采购收货任务主
export const refusalPurchasereceiptJobMain = (id: number) => {
return request.put({ url: '/wms/purchasereceipt-job-main/refusal?id=' + id })
}

2
src/locales/en-US.ts

@ -56,6 +56,7 @@ export default {
copySuccess: 'Copy Success',
copyError: 'Copy Error',
closeSuccess: 'Close Success',
refusalSuccess: 'Refusal Success',
reAddSuccess: 'ReAdd Success',
submitSuccess: 'Submit Success',
agreeSuccess: 'Agree Success',
@ -66,6 +67,7 @@ export default {
giveupSuccess: 'Giveup Success',
dealwithSuccess: 'Dealwith Success',
confirmColse: 'Confirm Close?',
confirmRefusal: 'Confirm Refusal?',
confirmReAdd: 'Confirm ReAdd?',
confirmAgree: 'Confirm Agree?',
confirmRefused: 'Confirm Refused?',

2
src/locales/zh-CN.ts

@ -56,6 +56,7 @@ export default {
copySuccess: '复制成功',
copyError: '复制失败',
closeSuccess: '关闭成功',
refusalSuccess: '拒收成功',
reAddSuccess: '重新添加成功',
submitSuccess: '提交成功',
agreeSuccess: '审批通过成功',
@ -66,6 +67,7 @@ export default {
acceptSuccess: '承接成功',
giveupSuccess: '放弃成功',
confirmColse: '确认关闭吗?',
confirmRefusal: '确认拒收吗?',
confirmReAdd: '确认重新添加吗?',
confirmAgree: '确认审批通过吗?',
confirmRefused: '确认审批驳回吗?',

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

@ -90,12 +90,8 @@
>
<iframe height="600px" width="100%" :src="qualityReport" frameborder="0"></iframe>
</el-dialog>
</template>
<script setup lang="ts">
import download from '@/utils/download'
import { PurchasereceiptJobMain,
@ -217,17 +213,17 @@ const butttondata = (row,$index) => {
}
return [
// defaultButtons.mainListJobAccBtn({hide:isShowMainButton(row,['1'])}), //
// defaultButtons.mainListJobCloBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:purchasereceipt-job-main:close'}), //
defaultButtons.mainListJobCloBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:purchasereceipt-job-main:close'}), //
// defaultButtons.mainListJobAbaBtn({hide:isShowMainButton(row,['2'])}), //
// defaultButtons.mainListJobExeBtn({hide:isShowMainButton(row,['2'])}), //
{
label: '拒收',
name: 'mainJobClo',
name: 'mainJobRefusal',
hide: isShowMainButton(row, ['1']),
type: 'primary',
icon: '',
color: '',
hasPermi: 'wms:purchasereceipt-job-main:close',
hasPermi: 'wms:purchasereceipt-job-main:refusal',
link: true //
},
defaultButtons.mainListPlanCheckQualityReportBtn({}), //
@ -244,9 +240,11 @@ const buttonTableClick = async (val, row) => {
handleClose(row.masterId)
} else if (val == 'mainJobAcc') { //
console.log('列表-操作按钮事件-承接')
}else if(val == 'mainPlanCheckQualityReport'){
} else if(val == 'mainPlanCheckQualityReport'){
//
checkQualityReport(row)
} else if(val == 'mainJobRefusal'){
handleRefusal(row.masterId)
}
}
//
@ -267,6 +265,16 @@ const handleClose = async (id: number) => {
} catch {}
}
/** 拒收按钮操作 */
const handleRefusal = async (id: number) => {
try {
await message.confirm(t('common.confirmRefusal'))
await PurchasereceiptJobMainApi.refusalPurchasereceiptJobMain(id)
message.success(t('common.refusalSuccess'))
await getList()
} catch {}
}
//
const detailParenPackingRef = ref()
const { tableObject: packingDetatableData, tableMethods: packDetatableMethods } = useTable({

7
src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptJobMain/purchasereceiptJobMain.data.ts

@ -1,6 +1,7 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter,dateFormatter2 } from '@/utils/formatTime'
import { fa } from 'element-plus/es/locale'
import { DICT_TYPE } from '@/utils/dict'
/**
* @returns {Array}
@ -609,7 +610,7 @@ export const PurchasereceiptJobMain = useCrudSchemas(reactive<CrudSchema[]>([
isDetail: false,
isForm: false,
table: {
width: 180,
width: 200,
fixed: 'right'
},
},
@ -1108,7 +1109,7 @@ export const PurchasereceiptJobDetail = useCrudSchemas(reactive<CrudSchema[]>([
isDetail: false,
isForm: false ,
table: {
width: 150,
width: 180,
fixed: 'right'
},
isTableForm:true,
@ -1605,4 +1606,4 @@ export const PurchasereceiptJobDetailPackingNumber = useCrudSchemas(reactive<Cru
valueFormat: 'x',
}
},
]))
]))

Loading…
Cancel
Save