|
@ -75,6 +75,8 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons' |
|
|
import { CACHE_KEY, useCache } from '@/hooks/web/useCache' |
|
|
import { CACHE_KEY, useCache } from '@/hooks/web/useCache' |
|
|
import {getAccessToken} from "@/utils/auth"; |
|
|
import {getAccessToken} from "@/utils/auth"; |
|
|
import { getJmreportBaseUrl } from '@/utils/systemParam' |
|
|
import { getJmreportBaseUrl } from '@/utils/systemParam' |
|
|
|
|
|
import * as SwitchApi from '@/api/wms/switch' |
|
|
|
|
|
|
|
|
// 制品上架任务主 |
|
|
// 制品上架任务主 |
|
|
defineOptions({ name: 'ProductputawayJobMain' }) |
|
|
defineOptions({ name: 'ProductputawayJobMain' }) |
|
|
|
|
|
|
|
@ -116,13 +118,38 @@ const { tableObject, tableMethods } = useTable({ |
|
|
// 获得表格的各种操作 |
|
|
// 获得表格的各种操作 |
|
|
const { getList, setSearchParams } = tableMethods |
|
|
const { getList, setSearchParams } = tableMethods |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const switchproductPutawayJobPrint = ref(false) |
|
|
|
|
|
const getSwitchStatus = async ()=>{ |
|
|
|
|
|
let res = await SwitchApi.getSwitchPage({ |
|
|
|
|
|
pageSize: 20, |
|
|
|
|
|
pageNo: 1, |
|
|
|
|
|
code: 'productPutawayJobPrint' |
|
|
|
|
|
}) |
|
|
|
|
|
console.log('getSwitchStatus',res) |
|
|
|
|
|
if(res&&res.list){ |
|
|
|
|
|
switchproductPutawayJobPrint.value = res.list[0].effectiveSetValue == 'TRUE' |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
// 列表头部按钮 |
|
|
// 列表头部按钮 |
|
|
const HeadButttondata = [ |
|
|
const HeadButttondata = computed(()=>{ |
|
|
|
|
|
return [ |
|
|
defaultButtons.defaultExportBtn({hasPermi:'wms:productputaway-job-main:export'}), // 导出 |
|
|
defaultButtons.defaultExportBtn({hasPermi:'wms:productputaway-job-main:export'}), // 导出 |
|
|
|
|
|
{ |
|
|
|
|
|
label: '待处理状态全部打印', |
|
|
|
|
|
name: 'printAllPending', |
|
|
|
|
|
hide: !switchproductPutawayJobPrint.value, |
|
|
|
|
|
type: 'primary', |
|
|
|
|
|
icon: '', |
|
|
|
|
|
color: '', |
|
|
|
|
|
hasPermi: '' |
|
|
|
|
|
}, |
|
|
defaultButtons.defaultFreshBtn(null), // 刷新 |
|
|
defaultButtons.defaultFreshBtn(null), // 刷新 |
|
|
defaultButtons.defaultFilterBtn(null), // 筛选 |
|
|
defaultButtons.defaultFilterBtn(null), // 筛选 |
|
|
defaultButtons.defaultSetBtn(null), // 设置 |
|
|
defaultButtons.defaultSetBtn(null), // 设置 |
|
|
] |
|
|
] |
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
// 头部按钮事件 |
|
|
// 头部按钮事件 |
|
|
const buttonBaseClick = (val, item) => { |
|
|
const buttonBaseClick = (val, item) => { |
|
@ -137,6 +164,9 @@ const buttonBaseClick = (val, item) => { |
|
|
getList() |
|
|
getList() |
|
|
} |
|
|
} |
|
|
} else if (val == 'filtrate') { // 筛选 |
|
|
} else if (val == 'filtrate') { // 筛选 |
|
|
|
|
|
} else if(val == 'printAllPending'){ |
|
|
|
|
|
// 单据打印 |
|
|
|
|
|
handleDocumentPrintAll() |
|
|
}else { // 其他按钮 |
|
|
}else { // 其他按钮 |
|
|
console.log('其他按钮', item) |
|
|
console.log('其他按钮', item) |
|
|
} |
|
|
} |
|
@ -158,7 +188,7 @@ const butttondata = (row,$index) => { |
|
|
return [] |
|
|
return [] |
|
|
} |
|
|
} |
|
|
return [ |
|
|
return [ |
|
|
defaultButtons.mainListDocumentPrintBtn(null), // 单据打印 |
|
|
defaultButtons.mainListDocumentPrintBtn({hide:!switchproductPutawayJobPrint.value}), // 单据打印 |
|
|
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'])}), // 放弃 |
|
@ -169,75 +199,7 @@ const butttondata = (row,$index) => { |
|
|
// 列表-操作按钮事件 |
|
|
// 列表-操作按钮事件 |
|
|
const buttonTableClick = async (val, row) => { |
|
|
const buttonTableClick = async (val, row) => { |
|
|
if (val == 'mainJobExe') { // 执行 |
|
|
if (val == 'mainJobExe') { // 执行 |
|
|
let aaa = { |
|
|
// ProductputawayJobMainApi.executeProductputawayMain(aaa) |
|
|
"id": "1809190000111838147", |
|
|
|
|
|
"requestNumber": "REC4620231214-0004", |
|
|
|
|
|
"supplierCode": null, |
|
|
|
|
|
"fromWarehouseCode": "W1", |
|
|
|
|
|
"toWarehouseCode": null, |
|
|
|
|
|
"fromAreaCodes": "", |
|
|
|
|
|
"toAreaCodes": "", |
|
|
|
|
|
"fromAreaTypes": "WIP,RAW", |
|
|
|
|
|
"toAreaTypes": "SEMI,FG", |
|
|
|
|
|
"completetime": 1702545291000, |
|
|
|
|
|
"requestTime": 1702524283000, |
|
|
|
|
|
"requestDueTime": 1689562428000, |
|
|
|
|
|
"status": "2", |
|
|
|
|
|
"expiredTime": null, |
|
|
|
|
|
"updateTime": 1702545291000, |
|
|
|
|
|
"updater": "1", |
|
|
|
|
|
"jobStageStatus": null, |
|
|
|
|
|
"priority": null, |
|
|
|
|
|
"priorityIncrement": null, |
|
|
|
|
|
"departmentCode": "103", |
|
|
|
|
|
"acceptUserId": "1", |
|
|
|
|
|
"acceptTime": 1702552206000, |
|
|
|
|
|
"completeUserId": null, |
|
|
|
|
|
"number": "JOB2220231214-0007", |
|
|
|
|
|
"businessType": "ProductPutaway", |
|
|
|
|
|
"remark": "111100", |
|
|
|
|
|
"createTime": 1702545291000, |
|
|
|
|
|
"creator": "1", |
|
|
|
|
|
"autoComplete": "FALSE", |
|
|
|
|
|
"allowModifyLocation": "FALSE", |
|
|
|
|
|
"allowModifyQty": "TRUE", |
|
|
|
|
|
"allowBiggerQty": "TRUE", |
|
|
|
|
|
"allowSmallerQty": "TRUE", |
|
|
|
|
|
"allowModifyInventoryStatus": "TRUE", |
|
|
|
|
|
"allowContinuousScanning": "TRUE", |
|
|
|
|
|
"allowPartialComplete": "TRUE", |
|
|
|
|
|
"allowModifyBatch": "FALSE", |
|
|
|
|
|
"allowModifyPackingNumber": "FALSE", |
|
|
|
|
|
"inInventoryStatuses": "OK", |
|
|
|
|
|
"outInventoryStatuses": "OK", |
|
|
|
|
|
subList: [ |
|
|
|
|
|
{ |
|
|
|
|
|
"id": "1809190001814017359", |
|
|
|
|
|
"packingNumber": "12", |
|
|
|
|
|
"containerNumber": "001", |
|
|
|
|
|
"batch": "21", |
|
|
|
|
|
"inventoryStatus": "OK", |
|
|
|
|
|
"poNumber": null, |
|
|
|
|
|
"poLine": "item01", |
|
|
|
|
|
"fromLocationCode": "H03", |
|
|
|
|
|
"toLocationCode": "L-R-001-002-1-02", |
|
|
|
|
|
"itemCode": "item01", |
|
|
|
|
|
"itemName": "物料01", |
|
|
|
|
|
"itemDesc1": "", |
|
|
|
|
|
"itemDesc2": "", |
|
|
|
|
|
"projectCode": "xm01", |
|
|
|
|
|
"qty": 3, |
|
|
|
|
|
"uom": "EA", |
|
|
|
|
|
"number": "JOB2220231214-0007", |
|
|
|
|
|
"remark": "00", |
|
|
|
|
|
"createTime": 1702545291000, |
|
|
|
|
|
"creator": "1", |
|
|
|
|
|
"fromOwnerCode": null, |
|
|
|
|
|
"toOwnerCode": null |
|
|
|
|
|
} |
|
|
|
|
|
] |
|
|
|
|
|
} |
|
|
|
|
|
ProductputawayJobMainApi.executeProductputawayMain(aaa) |
|
|
|
|
|
} else if (val == 'mainJobAba') { // 放弃 |
|
|
} else if (val == 'mainJobAba') { // 放弃 |
|
|
await ProductputawayJobMainApi.abandonProductputawayMain(row.masterId) |
|
|
await ProductputawayJobMainApi.abandonProductputawayMain(row.masterId) |
|
|
getList() |
|
|
getList() |
|
@ -268,6 +230,13 @@ const handleDocumentPrint = async (row) => { |
|
|
window.open(src.value+'&id='+row.masterId) |
|
|
window.open(src.value+'&id='+row.masterId) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* 待处理全部打印 |
|
|
|
|
|
*/ |
|
|
|
|
|
const handleDocumentPrintAll = async () => { |
|
|
|
|
|
window.open(src.value+'&id=printAllPending') |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
/** 导出按钮操作 */ |
|
|
/** 导出按钮操作 */ |
|
|
const exportLoading = ref(false) // 导出的加载中 |
|
|
const exportLoading = ref(false) // 导出的加载中 |
|
|
const handleExport = async () => { |
|
|
const handleExport = async () => { |
|
@ -293,8 +262,10 @@ const searchFormClick = (searchData) => { |
|
|
getList() // 刷新当前列表 |
|
|
getList() // 刷新当前列表 |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** 初始化 **/ |
|
|
/** 初始化 **/ |
|
|
onMounted(async () => { |
|
|
onMounted(async () => { |
|
|
|
|
|
await getSwitchStatus() |
|
|
getList() |
|
|
getList() |
|
|
}) |
|
|
}) |
|
|
</script> |
|
|
</script> |
|
|