Browse Source

补料

master
陈薪名 1 year ago
parent
commit
c52ed7df6d
  1. 25
      src/api/wms/repleinshJobMain/index.ts
  2. 1
      src/views/wms/issueManage/issue/issueJobMain/index.vue
  3. 150
      src/views/wms/issueManage/repleinsh/repleinshJobMain/index.vue
  4. 31
      src/views/wms/issueManage/repleinsh/repleinshJobMain/repleinshJobMain.data.ts
  5. 24
      src/views/wms/issueManage/repleinsh/repleinshRecordMain/repleinshRecordMain.data.ts
  6. 2
      src/views/wms/issueManage/repleinsh/repleinshRequestMain/index.vue

25
src/api/wms/repleinshJobMain/index.ts

@ -72,10 +72,35 @@ export const deleteRepleinshJobMain = async (id: number) => {
// 导出补料任务主 Excel
export const exportRepleinshJobMain = async (params) => {
if (params.isSearch) {
const data = {...params}
return await request.downloadPost({ url: `/wms/repleinsh-job-main/export-excel-senior`, data })
} else {
return await request.download({ url: `/wms/repleinsh-job-main/export-excel`, params })
}
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/wms/repleinsh-job-main/get-import-template' })
}
// 承接发料任务
export const acceptRepleinshMain = async (id) => {
return await request.put({ url: `/wms/repleinsh-job-main/accept?id=` + id })
}
// 放弃发料任务
export const abandonRepleinshMain = async (id) => {
return await request.put({ url: `/wms/repleinsh-job-main/abandon?id=` + id })
}
// 关闭发料任务
export const closeRepleinshMain = async (id) => {
return await request.put({ url: `/wms/repleinsh-job-main/close?id=` + id })
}
// 执行发料任务
export const executeRepleinshMain = async (data) => {
return await request.put({ url: `/wms/repleinsh-job-main/execute`, data})
}

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

@ -168,7 +168,6 @@ const butttondata = (row) => {
// -
const buttonTableClick = async (val, row) => {
console.log(170, val)
if (val == 'mainJobExe') { //
let aaa = {
id: '1809190000221670786',

150
src/views/wms/issueManage/repleinsh/repleinshJobMain/index.vue

@ -103,29 +103,14 @@ 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']
row[formField] = val[0][searchField]
} 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: RepleinshJobMainApi.getRepleinshJobMainPage //
@ -177,20 +162,139 @@ 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": "1809180001854123375",
"requestNumber": "REQ2020231128-0002",
"requestTime": null,
"requestDueTime": 1701014400000,
"status": "1",
"expiredTime": null,
"updateTime": 1701151187000,
"updater": "1",
"jobStageStatus": null,
"priority": null,
"priorityIncrement": null,
"departmentCode": null,
"acceptUserId": "1",
"acceptTime": 1701159181000,
"completeUserId": null,
"completeTime": null,
"fromLocationTypes": "RAW,SEMI",
"toLocationTypes": "WIP",
"number": "JOB0720231128-0001",
"businessType": "Repleinment",
"remark": null,
"createTime": 1701151187000,
"creator": "1",
"fromWarehouseCode": null,
"toWarehouseCode": null,
"fromAreaCodes": "",
"toAreaCodes": "",
"autoComplete": "FALSE",
"allowModifyLocation": "TRUE",
"allowModifyQty": "TRUE",
"allowBiggerQty": "TRUE",
"allowSmallerQty": "TRUE",
"allowModifyInventoryStatus": "TRUE",
"allowContinuousScanning": "TRUE",
"allowPartialComplete": "TRUE",
"allowModifyBatch": "FALSE",
"allowModifyPackingNumber": "FALSE",
subList: [
{
"id": "1809180000559485683",
"packingNumber": "12",
"containerNumber": "001",
"batch": "21",
"inventoryStatus": "OK",
"fromLocationCode": "H03",
"toLocationCode": "WIP",
"itemCode": "item01",
"itemName": "物品01",
"itemDesc1": "",
"itemDesc2": "",
"projectCode": "xm01",
"qty": 110,
"uom": "EA",
"number": "JOB0720231128-0001",
"remark": null,
"createTime": 1701151187000,
"creator": "1",
"fromOwnerCode": null,
"toOwnerCode": null,
recordLst: [{
handleQty: 10,
toPackingNumber: '12',
toContainerNumber: '001',
toBatch: '21',
toInventoryStatus: 'OK',
toLocationCode: 'H03',
supplierCode: '31213',
},{
handleQty: 20,
toPackingNumber: 'M20230421000005',
toContainerNumber: '001',
toBatch: '20230808',
toInventoryStatus: 'OK',
toLocationCode: 'SFG',
supplierCode: '31213',
}]
},
{
"id": "1809180000559485682",
"packingNumber": "P20230427000027",
"containerNumber": "001",
"batch": "20230427",
"inventoryStatus": "OK",
"fromLocationCode": "INSPECT",
"toLocationCode": "WIP",
"itemCode": "item01",
"itemName": "物品01",
"itemDesc1": "",
"itemDesc2": "",
"projectCode": "xm01",
"qty": 110,
"uom": "EA",
"number": "JOB0720231128-0001",
"remark": null,
"createTime": 1701151187000,
"creator": "1",
"fromOwnerCode": null,
"toOwnerCode": null,
recordLst: [{
handleQty: 30,
toPackingNumber: '12',
toContainerNumber: '001',
toBatch: '21',
toInventoryStatus: 'OK',
toLocationCode: 'H03',
supplierCode: '31213',
},{
handleQty: 40,
toPackingNumber: 'M20230421000005',
toContainerNumber: '001',
toBatch: '20230808',
toInventoryStatus: 'OK',
toLocationCode: 'SFG',
supplierCode: '31213',
}]
}
]
}
RepleinshJobMainApi.executeRepleinshMain(aaa)
} else if (val == 'mainJobAba') { //
console.log('列表-操作按钮事件-放弃')
RepleinshJobMainApi.abandonRepleinshMain(row.id)
} else if (val == 'mainJobClo') { //
console.log('列表-操作按钮事件-关闭')
RepleinshJobMainApi.closeRepleinshMain(row.id)
} else if (val == 'mainJobAcc') { //
console.log('列表-操作按钮事件-承接')
RepleinshJobMainApi.acceptRepleinshMain(row.id)
}
}
@ -208,8 +312,8 @@ const handleExport = async () => {
await message.exportConfirm()
//
exportLoading.value = true
const data = await RepleinshJobMainApi.exportRepleinshJobMain(setSearchParams)
download.excel(data, '补料任务.xlsx')
const data = await RepleinshJobMainApi.exportRepleinshJobMain(tableObject.params)
download.excel(data, '补料任务.xlsx')
} catch {
} finally {
exportLoading.value = false

31
src/views/wms/issueManage/repleinsh/repleinshJobMain/repleinshJobMain.data.ts

@ -62,14 +62,6 @@ export const RepleinshJobMain = useCrudSchemas(reactive<CrudSchema[]>([
}
},
},
{
label: '状态',
field: 'jobStageStatus',
sort: 'custom',
table: {
width: 150
},
},
{
label: '过期时间',
field: 'expiredTime',
@ -507,16 +499,16 @@ export const RepleinshJobMain = 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'
// },
// }
]))
//表单校验
@ -545,9 +537,6 @@ export const RepleinshJobMainRules = reactive({
status: [
{ required: true, message: '请选择状态', trigger: 'change' }
],
jobStageStatus: [
{ required: true, message: '请选择阶段状态', trigger: 'change' }
],
priority: [
{ required: true, message: '请输入优先级', trigger: 'blur' }
],

24
src/views/wms/issueManage/repleinsh/repleinshRecordMain/repleinshRecordMain.data.ts

@ -192,14 +192,6 @@ export const RepleinshRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
}
},
},
{
label: '代码',
field: 'code',
sort: 'custom',
table: {
width: 150
},
},
{
label: '从仓库代码',
field: 'fromWarehouseCode',
@ -545,14 +537,6 @@ export const RepleinshRecordDetail = useCrudSchemas(reactive<CrudSchema[]>([
width: 150
},
},
{
label: '代码',
field: 'code',
sort: 'custom',
table: {
width: 150
},
},
{
label: '接口类型',
field: 'interfaceType',
@ -564,14 +548,6 @@ export const RepleinshRecordDetail = useCrudSchemas(reactive<CrudSchema[]>([
width: 150
},
},
{
label: '任务明细ID',
field: 'jobDetailId',
sort: 'custom',
table: {
width: 150
},
},
{
label: '从器具号',
field: 'fromContainerNumber',

2
src/views/wms/issueManage/repleinsh/repleinshRequestMain/index.vue

@ -275,7 +275,7 @@ const handleExport = async () => {
await message.exportConfirm()
//
exportLoading.value = true
const data = await RepleinshRequestMainApi.exportRepleinshRequestMain(setSearchParams)
const data = await RepleinshRequestMainApi.exportRepleinshRequestMain(tableObject.params)
download.excel(data, '补料申请.xlsx')
} catch {
} finally {

Loading…
Cancel
Save