Browse Source

发料任务

master
陈薪名 1 year ago
parent
commit
ec3e393b12
  1. 31
      src/api/wms/issueJobMain/index.ts
  2. 122
      src/views/wms/issueManage/issue/issueJobMain/index.vue
  3. 28
      src/views/wms/issueManage/issue/issueJobMain/issueJobMain.data.ts

31
src/api/wms/issueJobMain/index.ts

@ -74,10 +74,37 @@ export const deleteIssueJobMain = async (id: number) => {
// 导出发料任务主 Excel
export const exportIssueJobMain = async (params) => {
return await request.download({ url: `/wms/issue-job-main/export-excel`, params })
if (params.isSearch) {
const data = {...params}
return await request.downloadPost({ url: `/wms/issue-job-main/export-excel-senior`, data })
} else {
return await request.download({ url: `/wms/issue-job-main/export-excel`, params })
}
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/wms/issue-job-main/get-import-template' })
}
}
// 承接发料任务
export const acceptIssueMain = async (id) => {
return await request.get({ url: `/wms/issue-job-main/accept?id=` + id })
}
// 放弃发料任务
export const abandonIssueMain = async (id) => {
return await request.get({ url: `/wms/issue-job-main/abandon?id=` + id })
}
// 关闭发料任务
export const closeIssueMain = async (id) => {
return await request.get({ url: `/wms/issue-job-main/close?id=` + id })
}
// 执行发料任务
export const executeIssueMain = async (data) => {
return await request.put({ url: `/wms/issue-job-main/execute`, data})
}

122
src/views/wms/issueManage/issue/issueJobMain/index.vue

@ -32,9 +32,9 @@
<span>{{ row.number }}</span>
</el-button>
</template>
<template #action="{ row }">
<!-- <template #action="{ row }">
<ButtonBase :Butttondata="butttondata(row)" @button-base-click="buttonTableClick($event,row)" />
</template>
</template> -->
</Table>
</ContentWrap>
@ -71,6 +71,7 @@ import { IssueJobMain,IssueJobMainRules,IssueJobDetail,IssueJobDetailRules } fro
import * as IssueJobMainApi from '@/api/wms/issueJobMain'
import * as IssueJobDetailApi from '@/api/wms/issueJobDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import { getDictLabel, DICT_TYPE } from '@/utils/dict'
//
defineOptions({ name: 'IssueJobMain' })
@ -103,29 +104,13 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
nextTick(() => {
if (type == 'tableForm') {
//
//row[formField] = val[0][searchField]
//row['poLine'] = val[0]['poLine']
//row['batch'] = val[0]['toBatch']
//row['altBatch'] = val[0]['altBatch']
//row['itemCode'] = val[0]['itemCode']
//row['itemName'] = val[0]['itemName']
//row['itemDesc1'] = val[0]['itemDesc1']
//row['itemDesc2'] = val[0]['itemDesc2']
//row['projectCode'] = val[0]['projectCode']
//row['qty'] = val[0]['qty']
//row['uom'] = val[0]['uom']
} else {
const setV = {}
setV[formField] = val[0][searchField]
//setV['ppNumber'] = val[0]['ppNumber']
//setV['supplierCode'] = val[0]['supplierCode']
formRef.setValues(setV)
}
})
}
//
// const Echo = ['ppNumber','poLine', 'batch', 'altBatch', 'itemCode', 'itemName', 'itemDesc1', 'itemDesc2', 'projectCode', 'qty', 'uom']
const Echo = []
const { tableObject, tableMethods } = useTable({
getListApi: IssueJobMainApi.getIssueJobMainPage //
@ -177,20 +162,109 @@ 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) => {
console.log(170, val)
if (val == 'mainJobExe') { //
console.log('列表-操作按钮事件-执行')
let aaa = {
id: '1809190000221670786',
requestNumber: "REC4620231120-0001",
workShopCode: "222",
fromWarehouseCode: null,
toWarehouseCode: null,
requestTime: 1700449299000,
requestDueTime: 1700448320000,
status: "4",
expiredTime: null,
// updateTime: 1700551119000,
// updater: "1",
priority: null,
priorityIncrement: null,
departmentCode: "研发部门",
acceptUserId: "1",
acceptTime: 1700562156000,
completeUserName: null,
completeTime: null,
fromLocationTypes: "RAW,SEMI",
toLocationTypes: "WIP",
number: "JOB0620231121-0001",
businessType: "Issue",
remark: null,
createTime: 1700551119000,
creator: "1",
fromAreaCodes: "",
toAreaCodes: "",
useOnTheWayLocation: "TRUE",
autoComplete: "FALSE",
allowModifyLocation: "TRUE",
allowModifyQty: "TRUE",
allowBiggerQty: "TRUE",
allowSmallerQty: "TRUE",
allowModifyInventoryStatus: "TRUE",
allowContinuousScanning: "TRUE",
allowPartialComplete: "TRUE",
allowModifyPackingNumber: "FALSE",
allowModifyBatch: "FALSE",
subList: [{
id: '1809190000965784282',
productionLineCode: "111",
workStationCode: "555",
inventoryStatus: "OK",
onTheWayLocationCode: null,
packingNumber: "12",
containerNumber: "001",
batch: "21",
fromLocationCode: "H03",
toLocationCode: "1",
itemCode: "item01",
itemName: "物品01",
itemDesc1: "",
itemDesc2: "",
stdPackQty: null,
stdPackUnit: null,
supplierQty: null,
supplierUom: null,
projectCode: "xm01",
qty: 50,
uom: "EA",
number: "JOB0620231121-0001",
remark: null,
createTime: 1700550582000,
creator: "1",
fromOwnerCode: null,
toOwnerCode: null,
// updateTime: 1700551119000,
// updater: "1",
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',
}]
}]
}
IssueJobMainApi.executeIssueMain(aaa)
} else if (val == 'mainJobAba') { //
console.log('列表-操作按钮事件-放弃')
IssueJobMainApi.abandonIssueMain(row.id)
} else if (val == 'mainJobClo') { //
console.log('列表-操作按钮事件-关闭')
IssueJobMainApi.closeIssueMain(row.id)
} else if (val == 'mainJobAcc') { //
console.log('列表-操作按钮事件-承接')
IssueJobMainApi.acceptIssueMain(row.id)
}
}
@ -208,7 +282,7 @@ const handleExport = async () => {
await message.exportConfirm()
//
exportLoading.value = true
const data = await IssueJobMainApi.exportIssueJobMain(setSearchParams)
const data = await IssueJobMainApi.exportIssueJobMain(tableObject.params)
download.excel(data, '发料任务主.xlsx')
} catch {
} finally {

28
src/views/wms/issueManage/issue/issueJobMain/issueJobMain.data.ts

@ -77,14 +77,6 @@ export const IssueJobMain = useCrudSchemas(reactive<CrudSchema[]>([
}
},
},
{
label: '状态',
field: 'jobStageStatus',
sort: 'custom',
table: {
width: 150
},
},
{
label: '过期时间',
field: 'expiredTime',
@ -534,16 +526,16 @@ export const IssueJobMain = useCrudSchemas(reactive<CrudSchema[]>([
}
}
},
{
label: '操作',
field: 'action',
isDetail: false,
isForm: false,
table: {
width: 120,
fixed: 'right'
},
}
// {
// label: '操作',
// field: 'action',
// isDetail: false,
// isForm: false,
// table: {
// width: 120,
// fixed: 'right'
// },
// }
]))
//表单校验

Loading…
Cancel
Save