Browse Source

客户退货按钮api

master
chenfang 1 year ago
parent
commit
48e67b0543
  1. 5
      src/api/wms/customerreceiptRequestMain/index.ts
  2. 27
      src/api/wms/customerreturnJobMain/index.ts
  3. 37
      src/api/wms/customerreturnRequestMain/index.ts
  4. 26
      src/api/wms/deliverJobMain/index.ts
  5. 4
      src/api/wms/deliverPlanMain/index.ts
  6. 45
      src/views/wms/deliversettlementManage/customerreceipt/customerreceiptRequestMain/index.vue
  7. 91
      src/views/wms/deliversettlementManage/customerreturn/customerreturnJobMain/index.vue
  8. 106
      src/views/wms/deliversettlementManage/deliver/deliverJobMain/index.vue
  9. 16
      src/views/wms/deliversettlementManage/deliverplan/deliverPlanMain/index.vue

5
src/api/wms/customerreceiptRequestMain/index.ts

@ -65,9 +65,4 @@ export const deleteCustomerreceiptRequestMain = async (id: number) => {
// 导出客户收货申请主 Excel
export const exportCustomerreceiptRequestMain = async (params) => {
return await request.download({ url: `/wms/customerreceipt-request-main/export-excel`, params })
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/wms/customerreceipt-request-main/get-import-template' })
}

27
src/api/wms/customerreturnJobMain/index.ts

@ -81,10 +81,35 @@ export const deleteCustomerreturnJobMain = async (id: number) => {
// 导出客户退货任务主 Excel
export const exportCustomerreturnJobMain = async (params) => {
return await request.download({ url: `/wms/customerreturn-job-main/export-excel`, params })
if (params.isSearch) {
const data = {...params}
return await request.downloadPost({ url: `/wms/customerreturn-job-main/export-excel-senior`, data })
} else {
return await request.download({ url: `/wms/customerreturn-job-main/export-excel`, params })
}
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/wms/customerreturn-job-main/get-import-template' })
}
// 承接客户退货任务主 Excel
export const submitCustomerreturnJobMain = async (id) => {
return await request.put({ url: `/wms/customerreturn-job-main/accept?id=` + id })
}
// 取消承接客户退货任务主 Excel
export const agreeCustomerreturnJobMain = async (id) => {
return await request.put({ url: `/wms/customerreturn-job-main/abandon?id=` + id })
}
// 取消客户退货任务主 Excel
export const refusedCustomerreturnJobMain = async (id) => {
return await request.put({ url: `/wms/customerreturn-job-main/close?id=` + id })
}
// 执行客户退货任务主
export const executeCustomerreturnJobMain = async (data: CustomerreturnJobMainVO) => {
return await request.put({ url: `/wms/customerreturn-job-main/execute`, data })
}

37
src/api/wms/customerreturnRequestMain/index.ts

@ -66,10 +66,45 @@ export const deleteCustomerreturnRequestMain = async (id: number) => {
// 导出客户退货申请主 Excel
export const exportCustomerreturnRequestMain = async (params) => {
return await request.download({ url: `/wms/customerreturn-request-main/export-excel`, params })
if (params.isSearch) {
const data = {...params}
return await request.downloadPost({ url: `/wms/customerreturn-request-main/export-excel-senior`, data })
} else {
return await request.download({ url: `/wms/customerreturn-request-main/export-excel`, params })
}
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/wms/customerreturn-request-main/get-import-template' })
}
// 关闭客户退货申请主 Excel
export const closeProductreceiptRequestMain = async (id) => {
return await request.put({ url: `/wms/customerreturn-request-main/close?id=` + id })
}
// 重新添加客户退货申请主 Excel
export const reAddProductreceiptRequestMain = async (id) => {
return await request.put({ url: `/wms/customerreturn-request-main/reAdd?id=` + id })
}
// 提交客户退货申请主 Excel
export const submitProductreceiptRequestMain = async (id) => {
return await request.put({ url: `/wms/customerreturn-request-main/submit?id=` + id })
}
// 审批通过客户退货申请主 Excel
export const agreeProductreceiptRequestMain = async (id) => {
return await request.put({ url: `/wms/customerreturn-request-main/agree?id=` + id })
}
// 审批驳回客户退货申请主 Excel
export const refusedProductreceiptRequestMain = async (id) => {
return await request.put({ url: `/wms/customerreturn-request-main/refused?id=` + id })
}
// 处理驳回客户退货申请主 Excel
export const handleProductreceiptRequestMain = async (id) => {
return await request.put({ url: `/wms/customerreturn-request-main/handle?id=` + id })
}

26
src/api/wms/deliverJobMain/index.ts

@ -82,10 +82,34 @@ export const deleteDeliverJobMain = async (id: number) => {
// 导出发货任务主 Excel
export const exportDeliverJobMain = async (params) => {
return await request.download({ url: `/wms/deliver-job-main/export-excel`, params })
if (params.isSearch) {
const data = {...params}
return await request.downloadPost({ url: `/wms/deliver-job-main/export-excel-senior`, data })
} else {
return await request.download({ url: `/wms/deliver-job-main/export-excel`, params }) }
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/wms/deliver-job-main/get-import-template' })
}
// 承接客户退货任务主 Excel
export const submitDeliverJobMain = async (id) => {
return await request.put({ url: `/wms/deliver-job-main/accept?id=` + id })
}
// 取消承接客户退货任务主 Excel
export const agreeDeliverJobMain = async (id) => {
return await request.put({ url: `/wms/deliver-job-main/abandon?id=` + id })
}
// 取消客户退货任务主 Excel
export const refusedDeliverJobMain = async (id) => {
return await request.put({ url: `/wms/deliver-job-main/close?id=` + id })
}
// 执行客户退货任务主
export const executeDeliverJobMain = async (data: DeliverJobMainVO) => {
return await request.put({ url: `/wms/deliver-job-main/execute`, data })
}

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

@ -73,8 +73,8 @@ export const open = (id) => {
}
// 驳回
export const refies = (id) => {
return request.put({ url: '/wms/deliver-plan-main/refies?id=' + id })
export const reject = (id) => {
return request.put({ url: '/wms/deliver-plan-main/reject?id=' + id })
}
// 通过

45
src/views/wms/deliversettlementManage/customerreceipt/customerreceiptRequestMain/index.vue

@ -72,10 +72,7 @@
:Echo="Echo"
/>
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/wms/customerreceipt-request-main/import" :importTemplateData="importTemplateData"
@success="importSuccess" :updateIsDisable="true" :coverIsDisable="true" :mode="2" />
</template>
</template>
<script setup lang="ts">
import download from '@/utils/download'
@ -148,9 +145,7 @@ const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
defaultButtons.defaultAddBtn({hasPermi:'wms:customerreceipt-request-main:create'}), //
defaultButtons.defaultImportBtn({hasPermi:'wms:customerreceipt-request-main:import'}), //
defaultButtons.defaultExportBtn({hasPermi:'wms:customerreceipt-request-main:export'}), //
defaultButtons.defaultExportBtn({hasPermi:'wms:customerreceipt-request-main:export'}), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), //
@ -166,11 +161,7 @@ const HeadButttondata = [
//
const buttonBaseClick = (val, item) => {
if (val == 'add') { //
openForm('create')
} else if (val == 'import') { //
handleImport()
} else if (val == 'export') { //
if (val == 'export') { //
handleExport()
} else if (val == 'refresh') { //
getList()
@ -192,13 +183,13 @@ const isShowMainButton = (row,val) => {
// -
const butttondata = (row) => {
return [
defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4','6'])}), //
defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['4','5'])}), //
defaultButtons.mainListSubmitBtn({hide:isShowMainButton(row,['1'])}), //
defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2'])}), //
defaultButtons.mainListApproveBtn({hide:isShowMainButton(row,['2'])}), //
defaultButtons.mainListEditBtn({hasPermi:'wms:customerreceipt-request-main:update'}), //
defaultButtons.mainListDeleteBtn({hasPermi:'wms:customerreceipt-request-main:delete'}), //
defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4','6']),hasPermi:'wms:customerreceipt-request-main:close'}), //
defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['5']),hasPermi:'wms:customerreceipt-request-main:reAdd'}), //
defaultButtons.mainListSubmitBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:customerreceipt-request-main:submit'}), //
defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:customerreceipt-request-main:refused'}), //
defaultButtons.mainListApproveBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:customerreceipt-request-main:agree'}), //
defaultButtons.mainListHandleBtn({hide:isShowMainButton(row,['3']),hasPermi:'wms:customerreceipt-request-main:handle'}), //
defaultButtons.mainListEditBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:customerreceipt-request-main:update'}), //
]
}
@ -302,22 +293,6 @@ const submitForm = async (formType, data) => {
}
}
/** 导入 */
const importFormRef = ref()
const handleImport = () => {
importFormRef.value.open()
}
//
const importTemplateData = reactive({
templateUrl: '',
templateTitle: '客户收货申请主导入模版.xlsx'
})
//
const importSuccess = () => {
getList()
}
//
const searchFormClick = (searchData) => {

91
src/views/wms/deliversettlementManage/customerreturn/customerreturnJobMain/index.vue

@ -177,14 +177,91 @@ const butttondata = (row) => {
defaultButtons.mainListJobAccBtn({hide:isShowMainButton(row,['1'])}), //
defaultButtons.mainListJobCloBtn({hide:isShowMainButton(row,['1'])}), //
defaultButtons.mainListJobAbaBtn({hide:isShowMainButton(row,['2'])}), //
// defaultButtons.mainListJobExeBtn({hide:isShowMainButton(row,['2'])}), //
defaultButtons.mainListJobExeBtn({hide:isShowMainButton(row,['2'])}), //
]
}
// -
const buttonTableClick = async (val, row) => {
if (val == 'mainJobExe') { //
console.log('列表-操作按钮事件-执行')
let aaa = {
"id": "1809200001805505470",
"requestNumber": "REQ1820231124-0007",
"deliverRecordNumber": "D001",
"deliverPlanNumber": "F001",
"customerCode": "K001",
"customerDockCode": "CD001",
"receiptDock": null,
"carrierCode": "",
"transferMode": "",
"vehiclePlateNumber": "",
"fromWarehouseCode": null,
"toWarehouseCode": null,
"requestTime": null,
"requestDueTime": null,
"status": "2",
"expiredTime": null,
"updateTime": 1700788390000,
"updater": "1",
"jobStageStatus": null,
"priority": null,
"priorityIncrement": null,
"departmentCode": "研发部门",
"acceptUserId": null,
"acceptTime": null,
"completeUserId": null,
"completeTime": null,
"fromLocationTypes": "INSP",
"toLocationTypes": "HOLD",
"number": "JOB2520231124-0007",
"businessType": "CustomerRejectJob",
"remark": "",
"createTime": 1700788390000,
"creator": "1",
"fromAreaCodes": "采购在途库",
"toAreaCodes": "采购在途库",
"toDockCode": null,
"autoComplete": "FALSE",
"allowModifyLocation": "TRUE",
"allowModifyQty": "TRUE",
"allowBiggerQty": "TRUE",
"allowSmallerQty": "TRUE",
"allowModifyInventoryStatus": "TRUE",
"allowContinuousScanning": "TRUE",
"allowPartialComplete": "TRUE",
"allowModifyBatch": "FALSE",
"allowModifyPackingNumber": "FALSE",
"subList": [{"id": "1809200000441442033",
"soNumber": "222",
"soLine": "22",
"packingNumber": "P20230427000026",
"batch": "20231120001",
"inventoryStatus": "OK",
"ownerCode": null,
"containerNumber": "",
"fromLocationCode": "INSPECT",
"toLocationCode": "CF1111",
"itemCode": "CE115F11161AG",
"itemName": null,
"itemDesc1": null,
"itemDesc2": null,
"projectCode": null,
"qty": 5,
"uom": null,
"number": null,
"remark": "",
"createtime": null,
"creator": "1",
handleQty: 10,
toPackingNumber: '12',
toContainerNumber: '001',
toBatch: '21',
toInventoryStatus: 'OK',
supplierCode: '31213',
}]
}
handleHandle(aaa)
} else if (val == 'mainJobAba') { //
console.log('列表-操作按钮事件-放弃')
} else if (val == 'mainJobClo') { //
@ -200,6 +277,16 @@ const openDetail = (row: any, titleName: any, titleValue: any) => {
detailRef.value.openDetail(row, titleName, titleValue)
}
/** 执行按钮操作 */
const handleHandle = async (data) => {
try {
await message.confirm(t('common.confirmHandle'))
await CustomerreturnJobMainApi.executeCustomerreturnJobMain(data)
message.success(t('common.handleSuccess'))
await getList()
} catch {}
}
/** 导出按钮操作 */
const exportLoading = ref(false) //
const handleExport = async () => {

106
src/views/wms/deliversettlementManage/deliver/deliverJobMain/index.vue

@ -177,13 +177,108 @@ const butttondata = (row) => {
defaultButtons.mainListJobAccBtn({hide:isShowMainButton(row,['1'])}), //
defaultButtons.mainListJobCloBtn({hide:isShowMainButton(row,['1'])}), //
defaultButtons.mainListJobAbaBtn({hide:isShowMainButton(row,['2'])}), //
// defaultButtons.mainListJobExeBtn({hide:isShowMainButton(row,['2'])}), //
defaultButtons.mainListJobExeBtn({hide:isShowMainButton(row,['2'])}), //
]
}
// -
const buttonTableClick = async (val, row) => {
if (val == 'mainJobExe') { //
let aaa = {
"id": "1809190002130023642",
"requestNumber": "REQ1720231128-0001",
"deliverPlanNumber": "REQ0120231116-0001",
"customerDeliverNumber": null,
"customerCode": "customer01",
"customerDockCode": "测试",
"deliverDock": null,
"carrierCode": "cys-001",
"transferMode": "",
"vehiclePlateNumber": "",
"fromWarehouseCode": null,
"toWarehouseCode": null,
"requestTime": 1701137233000,
"requestDueTime": 0,
"status": "2",
"expiredTime": null,
"updateTime": 1701137233000,
"updater": "1",
"jobStageStatus": null,
"priority": null,
"priorityincrement": null,
"departmentCode": "研发部门",
"acceptUserId": null,
"acceptTime": null,
"completeUserId": "1",
"completeTime": 1701137339000,
"fromLocationTypes": "FG",
"toLocationTypes": "CUST",
"number": "JOB2420231128-0001",
"businessType": "DeliverJob",
"remark": "",
"createTime": 1701137233000,
"creator": "1",
"ruleUserId": null,
"fromAreaCodes": "采购在途库",
"toAreaCodes": "采购在途库",
"fromDockCode": null,
"autoComplete": "FALSE",
"allowModifyLocation": "TRUE",
"allowModifyQty": "TRUE",
"allowBiggerQty": "TRUE",
"allowSmallerQty": "TRUE",
"allowModifyInventoryStatus": "TRUE",
"allowContinuousScanning": "TRUE",
"allowPartialComplete": "TRUE",
"allowModifyBatch": "FALSE",
"allowModifyPackingNumber": "FALSE",
"subList": [{
"id": "1809190001245559365",
"soNumber": "222",
"soLine": "1",
"packingNumber": "PN20230112300001",
"batch": "20231123",
"inventoryStatus": null,
"ownerCode": null,
"containerNumber": null,
"fromLocationCode": "INSPECT",
"toLocationCode": null,
"itemCode": "THILDD0A701AG",
"itemName": "HL后雾灯(新)-右\r\n",
"itemDesc1": "HL后雾灯(新)-右\r\n",
"itemDesc2": "",
"projectCode": "P0001",
"qty": 1,
"uom": "EA",
"number": "JOB2420231128-0001",
"remark": "",
"createTime": 1701137234000,
"creator": "1",
"toPackingNumber": null,
"toContainerNumber": null,
"toBatch": null,
"handleQty": null,
"toInventoryStatus": null,
recordLst: [{
handleQty: 10,
toPackingNumber: '12',
toContainerNumber: '001',
toBatch: '21',
toInventoryStatus: 'OK',
toLocationCode: 'H03',
supplierCode: '31213',
},{
handleQty: 22,
toPackingNumber: 'M20230421000005',
toContainerNumber: '001',
toBatch: '20230808',
toInventoryStatus: 'OK',
toLocationCode: 'SFG',
supplierCode: '31213',
}]
}]
}
handleHandle(aaa)
console.log('列表-操作按钮事件-执行')
} else if (val == 'mainJobAba') { //
console.log('列表-操作按钮事件-放弃')
@ -200,6 +295,15 @@ const openDetail = (row: any, titleName: any, titleValue: any) => {
detailRef.value.openDetail(row, titleName, titleValue)
}
const handleHandle = async (data) => {
try {
await message.confirm(t('common.confirmHandle'))
await DeliverJobMainApi.executeDeliverJobMain(data)
message.success(t('common.handleSuccess'))
await getList()
} catch {}
}
/** 导出按钮操作 */
const exportLoading = ref(false) //
const handleExport = async () => {

16
src/views/wms/deliversettlementManage/deliverplan/deliverPlanMain/index.vue

@ -177,13 +177,13 @@ const isShowMainButton = (row,val) => {
// -
const butttondata = (row) => {
return [
defaultButtons.mainListPlanOpeBtn({hide:isShowMainButton(row,['5'])}), //
defaultButtons.mainListPlanCloBtn({hide:isShowMainButton(row,['1','2','3','4'])}), //
defaultButtons.mainListPlanSubBtn({hide:isShowMainButton(row,['1'])}), //
defaultButtons.mainListPlanTurBtn({hide:isShowMainButton(row,['2'])}), //
defaultButtons.mainListPlanAppBtn({hide:isShowMainButton(row,['2'])}), //
defaultButtons.mainListPlanPubBtn({hide:isShowMainButton(row,['3'])}), //
defaultButtons.mainListPlanResBtn({hide:isShowMainButton(row,['4'])}), //
defaultButtons.mainListPlanOpeBtn({hide:isShowMainButton(row,['5']),hasPermi:'wms:deliver-plan-main:open'}), //
defaultButtons.mainListPlanCloBtn({hide:isShowMainButton(row,['1','2','3','4']),hasPermi:'wms:deliver-plan-main:close'}), //
defaultButtons.mainListPlanSubBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:deliver-plan-main:submit'}), //
defaultButtons.mainListPlanTurBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:deliver-plan-main:reject'}), //
defaultButtons.mainListPlanAppBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:deliver-plan-main:agree'}), //
defaultButtons.mainListPlanPubBtn({hide:isShowMainButton(row,['3']),hasPermi:'wms:deliver-plan-main:publish'}), //
defaultButtons.mainListPlanResBtn({hide:isShowMainButton(row,['4']),hasPermi:'wms:deliver-plan-main:resetting'}), //
defaultButtons.mainListEditBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:deliver-plan-main:update'}), //
]
}
@ -215,7 +215,7 @@ const buttonTableClick = async (val, row) => {
})
} else if (val == 'mainPlanTur') { //
await message.confirm('确认要驳回吗?')
DeliverPlanMainApi.refies(row.id).then(() => {
DeliverPlanMainApi.reject(row.id).then(() => {
message.success(t('common.updateSuccess'))
getList()
}).catch(err => {

Loading…
Cancel
Save