|
@ -103,29 +103,14 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => |
|
|
nextTick(() => { |
|
|
nextTick(() => { |
|
|
if (type == 'tableForm') { |
|
|
if (type == 'tableForm') { |
|
|
// 明细查询页赋值 |
|
|
// 明细查询页赋值 |
|
|
//row[formField] = val[0][searchField] |
|
|
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 { |
|
|
} else { |
|
|
const setV = {} |
|
|
const setV = {} |
|
|
setV[formField] = val[0][searchField] |
|
|
setV[formField] = val[0][searchField] |
|
|
//setV['ppNumber'] = val[0]['ppNumber'] |
|
|
|
|
|
//setV['supplierCode'] = val[0]['supplierCode'] |
|
|
|
|
|
formRef.setValues(setV) |
|
|
formRef.setValues(setV) |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
// 子表新增的时候选择表格之后需要会显得字段 |
|
|
|
|
|
// const Echo = ['ppNumber','poLine', 'batch', 'altBatch', 'itemCode', 'itemName', 'itemDesc1', 'itemDesc2', 'projectCode', 'qty', 'uom'] |
|
|
|
|
|
const Echo = [] |
|
|
|
|
|
|
|
|
|
|
|
const { tableObject, tableMethods } = useTable({ |
|
|
const { tableObject, tableMethods } = useTable({ |
|
|
getListApi: ProductionreturnJobMainApi.getProductionreturnJobMainPage // 分页接口 |
|
|
getListApi: ProductionreturnJobMainApi.getProductionreturnJobMainPage // 分页接口 |
|
@ -140,14 +125,6 @@ const HeadButttondata = [ |
|
|
defaultButtons.defaultFreshBtn(null), // 刷新 |
|
|
defaultButtons.defaultFreshBtn(null), // 刷新 |
|
|
defaultButtons.defaultFilterBtn(null), // 筛选 |
|
|
defaultButtons.defaultFilterBtn(null), // 筛选 |
|
|
defaultButtons.defaultSetBtn(null), // 设置 |
|
|
defaultButtons.defaultSetBtn(null), // 设置 |
|
|
// { |
|
|
|
|
|
// label: '自定义扩展按钮', |
|
|
|
|
|
// name: 'zdy', |
|
|
|
|
|
// hide: false, |
|
|
|
|
|
// type: 'primary', |
|
|
|
|
|
// icon: 'Select', |
|
|
|
|
|
// color: '' |
|
|
|
|
|
// }, |
|
|
|
|
|
] |
|
|
] |
|
|
|
|
|
|
|
|
// 头部按钮事件 |
|
|
// 头部按钮事件 |
|
@ -177,20 +154,89 @@ const butttondata = (row) => { |
|
|
defaultButtons.mainListJobAccBtn({hide:isShowMainButton(row,['1'])}), // 承接 |
|
|
defaultButtons.mainListJobAccBtn({hide:isShowMainButton(row,['1'])}), // 承接 |
|
|
defaultButtons.mainListJobCloBtn({hide:isShowMainButton(row,['1'])}), // 关闭 |
|
|
defaultButtons.mainListJobCloBtn({hide:isShowMainButton(row,['1'])}), // 关闭 |
|
|
defaultButtons.mainListJobAbaBtn({hide:isShowMainButton(row,['2'])}), // 放弃 |
|
|
defaultButtons.mainListJobAbaBtn({hide:isShowMainButton(row,['2'])}), // 放弃 |
|
|
// defaultButtons.mainListJobExeBtn({hide:isShowMainButton(row,['2'])}), // 执行 |
|
|
defaultButtons.mainListJobExeBtn({hide:isShowMainButton(row,['2'])}), // 执行 |
|
|
] |
|
|
] |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// 列表-操作按钮事件 |
|
|
// 列表-操作按钮事件 |
|
|
const buttonTableClick = async (val, row) => { |
|
|
const buttonTableClick = async (val, row) => { |
|
|
if (val == 'mainJobExe') { // 执行 |
|
|
if (val == 'mainJobExe') { // 执行 |
|
|
console.log('列表-操作按钮事件-执行') |
|
|
let aaa = { |
|
|
|
|
|
"id": "1704091910747713549", |
|
|
|
|
|
"requestNumber": "REQ3920231206-0011", |
|
|
|
|
|
"workshopCode": "work2", |
|
|
|
|
|
"fromWarehouseCode": null, |
|
|
|
|
|
"toWarehouseCode": null, |
|
|
|
|
|
"requestTime": null, |
|
|
|
|
|
"requestDueTime": 0, |
|
|
|
|
|
"status": "2", |
|
|
|
|
|
"expiredTime": null, |
|
|
|
|
|
"updateTime": 1701848561000, |
|
|
|
|
|
"updater": "1", |
|
|
|
|
|
"jobStageStatus": null, |
|
|
|
|
|
"priority": null, |
|
|
|
|
|
"priorityIncrement": null, |
|
|
|
|
|
"departmentCode": "103", |
|
|
|
|
|
"acceptUserId": "1", |
|
|
|
|
|
"acceptTime": 1701856251000, |
|
|
|
|
|
"completeUserId": null, |
|
|
|
|
|
"completeTime": null, |
|
|
|
|
|
"fromLocationTypes": "WIP", |
|
|
|
|
|
"toLocationTypes": "HOLD", |
|
|
|
|
|
"number": "JOB2820231206-0013", |
|
|
|
|
|
"businessType": "ReturnToHold", |
|
|
|
|
|
"remark": "", |
|
|
|
|
|
"createTime": 1701848561000, |
|
|
|
|
|
"creator": "1", |
|
|
|
|
|
"fromAreaCodes": "", |
|
|
|
|
|
"toAreaCodes": "", |
|
|
|
|
|
"autoComplete": "FALSE", |
|
|
|
|
|
"allowModifyLocation": "FALSE", |
|
|
|
|
|
"allowModifyQty": "TRUE", |
|
|
|
|
|
"allowBiggerQty": "TRUE", |
|
|
|
|
|
"allowSmallerQty": "TRUE", |
|
|
|
|
|
"allowModifyInventoryStatus": "TRUE", |
|
|
|
|
|
"allowContinuousScanning": "TRUE", |
|
|
|
|
|
"allowPartialComplete": "TRUE", |
|
|
|
|
|
"allowModifyBatch": "FALSE", |
|
|
|
|
|
"allowModifyPackingNumber": "FALSE", |
|
|
|
|
|
subList: [{ |
|
|
|
|
|
"id": "1704691692096618499", |
|
|
|
|
|
"productionLineCode": "line4", |
|
|
|
|
|
"workStationCode": "station4", |
|
|
|
|
|
"packingNumber": "PN-00063", |
|
|
|
|
|
"containerNumber": null, |
|
|
|
|
|
"batch": "000000", |
|
|
|
|
|
"inventoryStatus": "OK", |
|
|
|
|
|
"fromLocationCode": "L-W-001-01", |
|
|
|
|
|
"itemCode": "THILDD0A701AG", |
|
|
|
|
|
"itemName": "HL后雾灯", |
|
|
|
|
|
"itemDesc1": "HL后雾", |
|
|
|
|
|
"itemDesc2": "", |
|
|
|
|
|
"projectCode": "P0001", |
|
|
|
|
|
"qty": 6, |
|
|
|
|
|
"uom": "EA", |
|
|
|
|
|
"number": "JOB2820231206-0013", |
|
|
|
|
|
"remark": "", |
|
|
|
|
|
"createTime": 1701848561000, |
|
|
|
|
|
"creator": "1", |
|
|
|
|
|
"fromOwnerCode": null, |
|
|
|
|
|
"toOwnerCode": null, |
|
|
|
|
|
handleQty: 10, |
|
|
|
|
|
toPackingNumber: '12', |
|
|
|
|
|
toContainerNumber: '001', |
|
|
|
|
|
toBatch: '21', |
|
|
|
|
|
toInventoryStatus: 'OK', |
|
|
|
|
|
toLocationCode: 'H03', |
|
|
|
|
|
}] |
|
|
|
|
|
} |
|
|
|
|
|
ProductionreturnJobMainApi.executeProductionreturnMain(aaa) |
|
|
} else if (val == 'mainJobAba') { // 放弃 |
|
|
} else if (val == 'mainJobAba') { // 放弃 |
|
|
console.log('列表-操作按钮事件-放弃') |
|
|
ProductionreturnJobMainApi.abandonProductionreturnMain(row.id) |
|
|
} else if (val == 'mainJobClo') { // 关闭 |
|
|
} else if (val == 'mainJobClo') { // 关闭 |
|
|
console.log('列表-操作按钮事件-关闭') |
|
|
ProductionreturnJobMainApi.closeProductionreturnMain(row.id) |
|
|
} else if (val == 'mainJobAcc') { // 承接 |
|
|
} else if (val == 'mainJobAcc') { // 承接 |
|
|
console.log('列表-操作按钮事件-承接') |
|
|
ProductionreturnJobMainApi.acceptProductionreturnMain(row.id) |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -208,8 +254,8 @@ const handleExport = async () => { |
|
|
await message.exportConfirm() |
|
|
await message.exportConfirm() |
|
|
// 发起导出 |
|
|
// 发起导出 |
|
|
exportLoading.value = true |
|
|
exportLoading.value = true |
|
|
const data = await ProductionreturnJobMainApi.exportProductionreturnJobMain(setSearchParams) |
|
|
const data = await ProductionreturnJobMainApi.exportProductionreturnJobMain(tableObject.params) |
|
|
download.excel(data, '生产退料任务主.xlsx') |
|
|
download.excel(data, '生产退料任务.xlsx') |
|
|
} catch { |
|
|
} catch { |
|
|
} finally { |
|
|
} finally { |
|
|
exportLoading.value = false |
|
|
exportLoading.value = false |
|
|