|
@ -1,23 +1,31 @@ |
|
|
<template> |
|
|
<template> |
|
|
<ContentWrap> |
|
|
<ContentWrap> |
|
|
<!-- 搜索工作栏 --> |
|
|
<!-- 搜索工作栏 --> |
|
|
<Search :schema="[...ProductreceiptRecordMain.allSchemas.searchSchema,...ProductreceiptRecordDetail.allSchemas.searchSchema]" @search="setSearchParams" @reset="setSearchParams" /> |
|
|
<Search |
|
|
|
|
|
:schema="[ |
|
|
|
|
|
...ProductreceiptRecordMain.allSchemas.searchSchema, |
|
|
|
|
|
...ProductreceiptRecordDetail.allSchemas.searchSchema |
|
|
|
|
|
]" |
|
|
|
|
|
@search="setSearchParams" |
|
|
|
|
|
@reset="setSearchParams" |
|
|
|
|
|
/> |
|
|
</ContentWrap> |
|
|
</ContentWrap> |
|
|
|
|
|
|
|
|
<!-- 列表头部 --> |
|
|
<!-- 列表头部 --> |
|
|
<TableHead |
|
|
<TableHead |
|
|
:HeadButttondata="HeadButttondata" |
|
|
:HeadButttondata="HeadButttondata" |
|
|
@button-base-click="buttonBaseClick" |
|
|
@button-base-click="buttonBaseClick" |
|
|
:routeName="routeName" |
|
|
:routeName="routeName" |
|
|
@updataTableColumns="updataTableColumns" |
|
|
@updataTableColumns="updataTableColumns" |
|
|
@searchFormClick="searchFormClick" |
|
|
@searchFormClick="searchFormClick" |
|
|
:allSchemas="ProductreceiptRecordMain.allSchemas" |
|
|
:allSchemas="ProductreceiptRecordMain.allSchemas" |
|
|
:detailAllSchemas="ProductreceiptRecordDetail.allSchemas" |
|
|
:detailAllSchemas="ProductreceiptRecordDetail.allSchemas" |
|
|
/> |
|
|
/> |
|
|
|
|
|
|
|
|
<!-- 列表 --> |
|
|
<!-- 列表 --> |
|
|
<ContentWrap> |
|
|
<ContentWrap> |
|
|
<Table v-clientTable |
|
|
<Table |
|
|
|
|
|
v-clientTable |
|
|
:columns="tableColumns" |
|
|
:columns="tableColumns" |
|
|
:data="tableObject.tableList" |
|
|
:data="tableObject.tableList" |
|
|
:loading="tableObject.loading" |
|
|
:loading="tableObject.loading" |
|
@ -28,16 +36,19 @@ |
|
|
v-model:currentPage="tableObject.currentPage" |
|
|
v-model:currentPage="tableObject.currentPage" |
|
|
v-model:sort="tableObject.sort" |
|
|
v-model:sort="tableObject.sort" |
|
|
> |
|
|
> |
|
|
<template #recoveryRequestFlag="{row}"> |
|
|
<template #recoveryRequestFlag="{ row }"> |
|
|
<el-tag>{{ row.recoveryRequestFlag=='TRUE'?'是':'否' }}</el-tag> |
|
|
<el-tag>{{ row.recoveryRequestFlag == 'TRUE' ? '是' : '否' }}</el-tag> |
|
|
</template> |
|
|
</template> |
|
|
<template #number="{row}"> |
|
|
<template #number="{ row }"> |
|
|
<el-button type="primary" link @click="openDetail(row, '单据号', row.number)"> |
|
|
<el-button type="primary" link @click="openDetail(row, '单据号', row.number)"> |
|
|
<span>{{ row.number }}</span> |
|
|
<span>{{ row.number }}</span> |
|
|
</el-button> |
|
|
</el-button> |
|
|
</template> |
|
|
</template> |
|
|
<template #action="{ row,$index }"> |
|
|
<template #action="{ row, $index }"> |
|
|
<ButtonBase :Butttondata="butttondata(row,$index)" @button-base-click="buttonTableClick($event,row)" /> |
|
|
<ButtonBase |
|
|
|
|
|
:Butttondata="butttondata(row, $index)" |
|
|
|
|
|
@button-base-click="buttonTableClick($event, row)" |
|
|
|
|
|
/> |
|
|
</template> |
|
|
</template> |
|
|
</Table> |
|
|
</Table> |
|
|
</ContentWrap> |
|
|
</ContentWrap> |
|
@ -67,40 +78,48 @@ |
|
|
|
|
|
|
|
|
<!-- bom列表 --> |
|
|
<!-- bom列表 --> |
|
|
<Dialog |
|
|
<Dialog |
|
|
:title="DialogTitle" |
|
|
:title="DialogTitle" |
|
|
v-model="bomModelVisible" |
|
|
v-model="bomModelVisible" |
|
|
width="80%" |
|
|
width="80%" |
|
|
:scroll="true" |
|
|
:scroll="true" |
|
|
max-height="450px" |
|
|
max-height="450px" |
|
|
> |
|
|
> |
|
|
<Table |
|
|
<Table |
|
|
:columns="BackflushRecordDetailb.allSchemas.tableColumns" |
|
|
:columns="BackflushRecordDetailb.allSchemas.tableColumns" |
|
|
:data="detatableDataBom.tableList" |
|
|
:data="detatableDataBom.tableList" |
|
|
:loading="detatableDataBom.loading" |
|
|
:loading="detatableDataBom.loading" |
|
|
:pagination="{ |
|
|
:pagination="{ |
|
|
total: detatableDataBom.total |
|
|
total: detatableDataBom.total |
|
|
}" |
|
|
}" |
|
|
v-model:pageSize="detatableDataBom.pageSize" |
|
|
v-model:pageSize="detatableDataBom.pageSize" |
|
|
v-model:currentPage="detatableDataBom.currentPage" |
|
|
v-model:currentPage="detatableDataBom.currentPage" |
|
|
v-model:sort="detatableDataBom.sort" |
|
|
v-model:sort="detatableDataBom.sort" |
|
|
/> |
|
|
/> |
|
|
</Dialog> |
|
|
</Dialog> |
|
|
<!-- 标签打印 --> |
|
|
<!-- 标签打印 --> |
|
|
<SearchTable style="width:905px" ref="searchTableRef" @searchTableSuccess="searchTableSuccessLabel" /> |
|
|
<SearchTable |
|
|
|
|
|
style="width: 905px" |
|
|
|
|
|
ref="searchTableRef" |
|
|
|
|
|
@searchTableSuccess="searchTableSuccessLabel" |
|
|
|
|
|
/> |
|
|
</template> |
|
|
</template> |
|
|
|
|
|
|
|
|
<script setup lang="ts"> |
|
|
<script setup lang="ts"> |
|
|
import download from '@/utils/download' |
|
|
import download from '@/utils/download' |
|
|
import { ProductreceiptRecordMain,ProductreceiptRecordMainRules,ProductreceiptRecordDetail,ProductreceiptRecordDetailRules, BackflushRecordDetailb } from './productreceiptRecordMain.data' |
|
|
import { |
|
|
|
|
|
ProductreceiptRecordMain, |
|
|
|
|
|
ProductreceiptRecordMainRules, |
|
|
|
|
|
ProductreceiptRecordDetail, |
|
|
|
|
|
ProductreceiptRecordDetailRules, |
|
|
|
|
|
BackflushRecordDetailb |
|
|
|
|
|
} from './productreceiptRecordMain.data' |
|
|
import * as ProductreceiptRecordMainApi from '@/api/wms/productreceiptRecordMain' |
|
|
import * as ProductreceiptRecordMainApi from '@/api/wms/productreceiptRecordMain' |
|
|
import * as ProductreceiptRecordDetailApi from '@/api/wms/productreceiptRecordDetail' |
|
|
import * as ProductreceiptRecordDetailApi from '@/api/wms/productreceiptRecordDetail' |
|
|
import * as defaultButtons from '@/utils/disposition/defaultButtons' |
|
|
import * as defaultButtons from '@/utils/disposition/defaultButtons' |
|
|
import * as BackflushRecordDetailbApi from '@/api/wms/backflushRecordDetailb' |
|
|
import * as BackflushRecordDetailbApi from '@/api/wms/backflushRecordDetailb' |
|
|
import { CACHE_KEY, useCache } from '@/hooks/web/useCache' |
|
|
import { CACHE_KEY, useCache } from '@/hooks/web/useCache' |
|
|
import * as PackageApi from '@/api/wms/package' |
|
|
import * as PackageApi from '@/api/wms/package' |
|
|
import { |
|
|
import { SupplierdeliverRequestPackage } from '../../../purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverRequestMain.data.ts' |
|
|
SupplierdeliverRequestPackage |
|
|
|
|
|
} from '../../../purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverRequestMain.data.ts' |
|
|
|
|
|
import * as ProductreceiptRequestDetailApi from '@/api/wms/productreceiptRequestDetail' |
|
|
import * as ProductreceiptRequestDetailApi from '@/api/wms/productreceiptRequestDetail' |
|
|
import { getAccessToken } from '@/utils/auth' |
|
|
import { getAccessToken } from '@/utils/auth' |
|
|
import { getJmreportBaseUrl } from '@/utils/systemParam' |
|
|
import { getJmreportBaseUrl } from '@/utils/systemParam' |
|
@ -118,9 +137,13 @@ const { t } = useI18n() // 国际化 |
|
|
const route = useRoute() // 路由信息 |
|
|
const route = useRoute() // 路由信息 |
|
|
const routeName = ref() |
|
|
const routeName = ref() |
|
|
routeName.value = route.name |
|
|
routeName.value = route.name |
|
|
const tableColumns = ref([...ProductreceiptRecordMain.allSchemas.tableColumns,...ProductreceiptRecordDetail.allSchemas.tableMainColumns]) |
|
|
const tableColumns = ref([ |
|
|
|
|
|
...ProductreceiptRecordMain.allSchemas.tableColumns, |
|
|
|
|
|
...ProductreceiptRecordDetail.allSchemas.tableMainColumns |
|
|
|
|
|
]) |
|
|
// 详情 table 操作扩展 按钮 |
|
|
// 详情 table 操作扩展 按钮 |
|
|
const buttondataTable = ref([{ |
|
|
const buttondataTable = ref([ |
|
|
|
|
|
{ |
|
|
label: 'Bom', |
|
|
label: 'Bom', |
|
|
name: 'bom', |
|
|
name: 'bom', |
|
|
hide: false, |
|
|
hide: false, |
|
@ -128,16 +151,17 @@ const buttondataTable = ref([{ |
|
|
icon: '', |
|
|
icon: '', |
|
|
color: '', |
|
|
color: '', |
|
|
hasPermi: '', |
|
|
hasPermi: '', |
|
|
link: true, // 文本展现按钮 |
|
|
link: true // 文本展现按钮 |
|
|
}]) |
|
|
} |
|
|
|
|
|
]) |
|
|
|
|
|
|
|
|
// Bom查看 |
|
|
// Bom查看 |
|
|
const DialogTitle = ref('Bom信息') |
|
|
const DialogTitle = ref('Bom信息') |
|
|
const bomModelVisible = ref(false) |
|
|
const bomModelVisible = ref(false) |
|
|
const { tableObject: detatableDataBom, tableMethods: detatableMethodsBom } =useTable({ |
|
|
const { tableObject: detatableDataBom, tableMethods: detatableMethodsBom } = useTable({ |
|
|
getListApi: BackflushRecordDetailbApi.getBackflushRecordDetailbPage |
|
|
getListApi: BackflushRecordDetailbApi.getBackflushRecordDetailbPage |
|
|
}) |
|
|
}) |
|
|
const { getList:getDetailListBom } = detatableMethodsBom |
|
|
const { getList: getDetailListBom } = detatableMethodsBom |
|
|
|
|
|
|
|
|
// 字段设置 更新主列表字段 |
|
|
// 字段设置 更新主列表字段 |
|
|
const updataTableColumns = (val) => { |
|
|
const updataTableColumns = (val) => { |
|
@ -153,10 +177,10 @@ const { getList, setSearchParams } = tableMethods |
|
|
|
|
|
|
|
|
// 列表头部按钮 |
|
|
// 列表头部按钮 |
|
|
const HeadButttondata = [ |
|
|
const HeadButttondata = [ |
|
|
defaultButtons.defaultExportBtn({hasPermi:'wms:productreceipt-record-main:export'}), // 导出 |
|
|
defaultButtons.defaultExportBtn({ hasPermi: 'wms:productreceipt-record-main:export' }), // 导出 |
|
|
defaultButtons.defaultFreshBtn(null), // 刷新 |
|
|
defaultButtons.defaultFreshBtn(null), // 刷新 |
|
|
defaultButtons.defaultFilterBtn(null), // 筛选 |
|
|
defaultButtons.defaultFilterBtn(null), // 筛选 |
|
|
defaultButtons.defaultSetBtn(null), // 设置 |
|
|
defaultButtons.defaultSetBtn(null) // 设置 |
|
|
// { |
|
|
// { |
|
|
// label: '自定义扩展按钮', |
|
|
// label: '自定义扩展按钮', |
|
|
// name: 'zdy', |
|
|
// name: 'zdy', |
|
@ -169,23 +193,27 @@ const HeadButttondata = [ |
|
|
|
|
|
|
|
|
// 头部按钮事件 |
|
|
// 头部按钮事件 |
|
|
const buttonBaseClick = (val, item) => { |
|
|
const buttonBaseClick = (val, item) => { |
|
|
if (val == 'export') { // 导出 |
|
|
if (val == 'export') { |
|
|
|
|
|
// 导出 |
|
|
handleExport() |
|
|
handleExport() |
|
|
} else if (val == 'refresh') { // 刷新 |
|
|
} else if (val == 'refresh') { |
|
|
if (tableObject.params.filters && tableObject.params.filters.length > 0 ) { |
|
|
// 刷新 |
|
|
|
|
|
if (tableObject.params.filters && tableObject.params.filters.length > 0) { |
|
|
searchFormClick({ |
|
|
searchFormClick({ |
|
|
filters: tableObject.params.filters |
|
|
filters: tableObject.params.filters |
|
|
}) |
|
|
}) |
|
|
} else { |
|
|
} else { |
|
|
getList() |
|
|
getList() |
|
|
} |
|
|
} |
|
|
} else if (val == 'filtrate') { // 筛选 |
|
|
} else if (val == 'filtrate') { |
|
|
} else { // 其他按钮 |
|
|
// 筛选 |
|
|
|
|
|
} else { |
|
|
|
|
|
// 其他按钮 |
|
|
console.log('其他按钮', item) |
|
|
console.log('其他按钮', item) |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
// 根据状态返回该按钮是否显示 |
|
|
// 根据状态返回该按钮是否显示 |
|
|
const isShowMainButton = (row,val) => { |
|
|
const isShowMainButton = (row, val) => { |
|
|
if (val.indexOf(row.status) > -1) { |
|
|
if (val.indexOf(row.status) > -1) { |
|
|
return false |
|
|
return false |
|
|
} else { |
|
|
} else { |
|
@ -194,42 +222,52 @@ const isShowMainButton = (row,val) => { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// 列表-操作按钮 |
|
|
// 列表-操作按钮 |
|
|
const butttondata = (row,$index) => { |
|
|
const butttondata = (row, $index) => { |
|
|
const findIndex = row['masterId']?tableObject.tableList.findIndex(item=>item['masterId'] == row['masterId']):-1 |
|
|
const findIndex = row['masterId'] |
|
|
if(findIndex>-1&&findIndex<$index){ |
|
|
? tableObject.tableList.findIndex((item) => item['masterId'] == row['masterId']) |
|
|
|
|
|
: -1 |
|
|
|
|
|
if (findIndex > -1 && findIndex < $index) { |
|
|
return [] |
|
|
return [] |
|
|
} |
|
|
} |
|
|
return [ |
|
|
return [ |
|
|
// defaultButtons.mainInspectRequestBtn({hasPermi:'wms:productreceipt-record-main:createInspectRequest',hide:row.inspectRequestFlag == "FALSE" }),// 生成到货检验申请 |
|
|
// defaultButtons.mainInspectRequestBtn({hasPermi:'wms:productreceipt-record-main:createInspectRequest',hide:row.inspectRequestFlag == "FALSE" }),// 生成到货检验申请 |
|
|
defaultButtons.mainInspectRequestBtn({hide:row.inspectRequestFlag == "FALSE" }),// 生成到货检验申请 |
|
|
defaultButtons.mainInspectRequestBtn({ hide: row.inspectRequestFlag == 'FALSE' }), // 生成到货检验申请 |
|
|
defaultButtons.mainPutawayRequestCpBtn({hasPermi:'wms:purchasereceipt-record-main:createPutawayRequest',hide:row.putawayRequestFlag == "FALSE" }),// 生成采购上架申请 |
|
|
defaultButtons.mainPutawayRequestCpBtn({ |
|
|
defaultButtons.mainListPointBtn(null), // 标签打印 |
|
|
hasPermi: 'wms:purchasereceipt-record-main:createPutawayRequest', |
|
|
defaultButtons.mainListRecoveryBtn({hide:row.recoveryRequestFlag == "TRUE" }), // 制品回收 //recoveryRequestFlag==TRUE不展示 |
|
|
hide: row.putawayRequestFlag == 'FALSE' |
|
|
] |
|
|
}), // 生成采购上架申请 |
|
|
|
|
|
defaultButtons.mainListPointBtn(null), // 标签打印 |
|
|
|
|
|
defaultButtons.mainListRecoveryBtn({ hide: row.recoveryRequestFlag == 'TRUE' }) // 制品回收 //recoveryRequestFlag==TRUE不展示 |
|
|
|
|
|
] |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// 列表-操作按钮事件 |
|
|
// 列表-操作按钮事件 |
|
|
const buttonTableClick = async (val, row) => { |
|
|
const buttonTableClick = async (val, row) => { |
|
|
if(val == 'inspectRequest'){//生成到货检验申请 |
|
|
if (val == 'inspectRequest') { |
|
|
|
|
|
//生成到货检验申请 |
|
|
handleCreateInspectRequest(row.number) |
|
|
handleCreateInspectRequest(row.number) |
|
|
}else if (val == 'putawayRequest') { // 生成采购上架申请 |
|
|
} else if (val == 'putawayRequest') { |
|
|
|
|
|
// 生成采购上架申请 |
|
|
handleCreatePutawayRequest(row.number) |
|
|
handleCreatePutawayRequest(row.number) |
|
|
} else if (val == 'point') { // 标签打印 |
|
|
} else if (val == 'point') { |
|
|
|
|
|
// 标签打印 |
|
|
labelPrint(row) |
|
|
labelPrint(row) |
|
|
} else if (val == 'recovery') { //制品回收 |
|
|
} else if (val == 'recovery') { |
|
|
|
|
|
//制品回收 |
|
|
labelRecovery(row) |
|
|
labelRecovery(row) |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/** 生成采购上架申请按钮操作 */ |
|
|
/** 生成采购上架申请按钮操作 */ |
|
|
const handleCreatePutawayRequest = async (number:string) => { |
|
|
const handleCreatePutawayRequest = async (number: string) => { |
|
|
try{ |
|
|
try { |
|
|
await message.confirm(t('ts.确认生成上架申请吗?')) |
|
|
await message.confirm(t('ts.确认生成上架申请吗?')) |
|
|
tableObject.loading = true |
|
|
tableObject.loading = true |
|
|
await ProductreceiptRecordMainApi.createPutawayRequest(number) |
|
|
await ProductreceiptRecordMainApi.createPutawayRequest(number) |
|
|
message.success(t('ts.上架申请生成成功')) |
|
|
message.success(t('ts.上架申请生成成功')) |
|
|
buttonBaseClick('refresh',null) |
|
|
buttonBaseClick('refresh', null) |
|
|
}catch{}finally{ |
|
|
} catch { |
|
|
|
|
|
} finally { |
|
|
tableObject.loading = false |
|
|
tableObject.loading = false |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
@ -243,27 +281,33 @@ const labelPrint = async (row) => { |
|
|
let resType = await PackageApi.getPackagePage({ |
|
|
let resType = await PackageApi.getPackagePage({ |
|
|
requestNumber: row.requestNumber |
|
|
requestNumber: row.requestNumber |
|
|
}) |
|
|
}) |
|
|
if(resType.list.length > 0){ |
|
|
if (resType.list.length > 0) { |
|
|
if (resType.list[0].productionLineCode != null) { |
|
|
if (resType.list[0].productionLineCode != null) { |
|
|
labelType.value = 'zz' |
|
|
labelType.value = 'zz' |
|
|
} else { |
|
|
} else { |
|
|
labelType.value = 'cg' |
|
|
labelType.value = 'cg' |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
const defaultParams = {'moduleName':'productreceipt_predict','tableName':'record_productreceipt_main','recordNumber':row.number} |
|
|
const defaultParams = { |
|
|
const {tableObject:tableObjectPrint ,tableMethods} = useTable({ |
|
|
moduleName: 'productreceipt_predict', |
|
|
|
|
|
tableName: 'record_productreceipt_main', |
|
|
|
|
|
recordNumber: row.number, |
|
|
|
|
|
itemCode: row.itemCode, |
|
|
|
|
|
batch: row.batch |
|
|
|
|
|
} |
|
|
|
|
|
const { tableObject: tableObjectPrint, tableMethods } = useTable({ |
|
|
defaultParams, |
|
|
defaultParams, |
|
|
getListApi: PackageApi.getLabelDetailPageByRecordId // 分页接口 |
|
|
getListApi: PackageApi.getLabelDetailPageByRecordId // 分页接口 |
|
|
}) |
|
|
}) |
|
|
// 获得表格的各种操作 |
|
|
// 获得表格的各种操作 |
|
|
const { getList:getListPrint } = tableMethods |
|
|
const { getList: getListPrint } = tableMethods |
|
|
getListPrint() |
|
|
getListPrint() |
|
|
tableObject.loading = false |
|
|
tableObject.loading = false |
|
|
const tableColumns = SupplierdeliverRequestPackage.allSchemas.tableFormColumns |
|
|
const tableColumns = SupplierdeliverRequestPackage.allSchemas.tableFormColumns |
|
|
tableColumns.forEach((item) => { |
|
|
tableColumns.forEach((item) => { |
|
|
item.width = item.table?.width || 150 |
|
|
item.width = item.table?.width || 150 |
|
|
}) |
|
|
}) |
|
|
searchTableRef.value.openData("标签信息",tableObjectPrint,{tableColumns},true) |
|
|
searchTableRef.value.openData('标签信息', tableObjectPrint, { tableColumns }, true) |
|
|
} |
|
|
} |
|
|
//制品回收按钮事件 |
|
|
//制品回收按钮事件 |
|
|
const labelRecovery = async (row) => { |
|
|
const labelRecovery = async (row) => { |
|
@ -272,15 +316,14 @@ const labelRecovery = async (row) => { |
|
|
tableObject.loading = true |
|
|
tableObject.loading = true |
|
|
const params = ref({ |
|
|
const params = ref({ |
|
|
number: '', |
|
|
number: '', |
|
|
inventoryStatus: '', |
|
|
inventoryStatus: '' |
|
|
}) |
|
|
}) |
|
|
params.number= row.number; |
|
|
params.number = row.number |
|
|
params.inventoryStatus= row.inventoryStatus; |
|
|
params.inventoryStatus = row.inventoryStatus |
|
|
|
|
|
|
|
|
let resType = await ProductreceiptRecordMainApi.handleRecoveryProductreceiptRecord(params); |
|
|
let resType = await ProductreceiptRecordMainApi.handleRecoveryProductreceiptRecord(params) |
|
|
message.success(t('ts.撤销报工成功')) |
|
|
message.success(t('ts.撤销报工成功')) |
|
|
buttonBaseClick('refresh',null) |
|
|
buttonBaseClick('refresh', null) |
|
|
|
|
|
|
|
|
} catch { |
|
|
} catch { |
|
|
} finally { |
|
|
} finally { |
|
|
tableObject.loading = false |
|
|
tableObject.loading = false |
|
@ -288,45 +331,50 @@ const labelRecovery = async (row) => { |
|
|
} |
|
|
} |
|
|
// 批量打印--预生产收货 |
|
|
// 批量打印--预生产收货 |
|
|
const searchTableSuccessLabel = async (formField, searchField, val, formRef, type, row) => { |
|
|
const searchTableSuccessLabel = async (formField, searchField, val, formRef, type, row) => { |
|
|
console.log('批量打印',val) |
|
|
console.log('批量打印', val) |
|
|
|
|
|
|
|
|
if(val.length == 0){ |
|
|
if (val.length == 0) { |
|
|
message.warning("请先选择要打印的数据!") |
|
|
message.warning('请先选择要打印的数据!') |
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
|
await PackageApi.batchPrintingLable(val.map(item1=>item1.number).join(',')).then(res => { |
|
|
await PackageApi.batchPrintingLable(val.map((item1) => item1.number).join(',')) |
|
|
|
|
|
.then((res) => { |
|
|
console.log(res) |
|
|
console.log(res) |
|
|
if (labelType.value == 'cg') { |
|
|
if (labelType.value == 'cg') { |
|
|
const src = ref(BASE_URL + '/jmreport/view/922729953438072832?token=' + getAccessToken()) |
|
|
const src = ref(BASE_URL + '/jmreport/view/922729953438072832?token=' + getAccessToken()) |
|
|
window.open(src.value+'&asn_number='+res) |
|
|
window.open(src.value + '&asn_number=' + res) |
|
|
} else { |
|
|
} else { |
|
|
const src = ref(BASE_URL + '/jmreport/view/922734157577715712?token=' + getAccessToken()) |
|
|
const src = ref(BASE_URL + '/jmreport/view/922734157577715712?token=' + getAccessToken()) |
|
|
window.open(src.value+'&asn_number='+res) |
|
|
window.open(src.value + '&asn_number=' + res) |
|
|
} |
|
|
} |
|
|
}).catch(err => { |
|
|
}) |
|
|
console.log(err) |
|
|
.catch((err) => { |
|
|
message.error('创建标签失败') |
|
|
console.log(err) |
|
|
}) |
|
|
message.error('创建标签失败') |
|
|
|
|
|
}) |
|
|
} |
|
|
} |
|
|
// 获取部门 用于详情 部门回显 |
|
|
// 获取部门 用于详情 部门回显 |
|
|
const { wsCache } = useCache() |
|
|
const { wsCache } = useCache() |
|
|
/** 详情操作 */ |
|
|
/** 详情操作 */ |
|
|
const detailRef = ref() |
|
|
const detailRef = ref() |
|
|
const openDetail = (row: any, titleName: any, titleValue: any) => { |
|
|
const openDetail = (row: any, titleName: any, titleValue: any) => { |
|
|
const departmentCode = wsCache.get(CACHE_KEY.DEPT).find((account) => account.id == row.departmentCode)?.name |
|
|
const departmentCode = wsCache |
|
|
|
|
|
.get(CACHE_KEY.DEPT) |
|
|
|
|
|
.find((account) => account.id == row.departmentCode)?.name |
|
|
if (departmentCode) row.departmentCode = JSON.parse(JSON.stringify(departmentCode)) |
|
|
if (departmentCode) row.departmentCode = JSON.parse(JSON.stringify(departmentCode)) |
|
|
detailRef.value.openDetail(row, titleName, titleValue,'recordProductreceiptMain') |
|
|
detailRef.value.openDetail(row, titleName, titleValue, 'recordProductreceiptMain') |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/** 生成到货检验申请按钮操作 */ |
|
|
/** 生成到货检验申请按钮操作 */ |
|
|
const handleCreateInspectRequest = async (number:string) => { |
|
|
const handleCreateInspectRequest = async (number: string) => { |
|
|
try{ |
|
|
try { |
|
|
await message.confirm(t('ts.确认生成到货检验申请吗?')) |
|
|
await message.confirm(t('ts.确认生成到货检验申请吗?')) |
|
|
tableObject.loading = true |
|
|
tableObject.loading = true |
|
|
await ProductreceiptRecordMainApi.createInspectRequest(number) |
|
|
await ProductreceiptRecordMainApi.createInspectRequest(number) |
|
|
message.success(t('ts.到货检验申请生成成功')) |
|
|
message.success(t('ts.到货检验申请生成成功')) |
|
|
buttonBaseClick('refresh',null) |
|
|
buttonBaseClick('refresh', null) |
|
|
}catch{}finally{ |
|
|
} catch { |
|
|
|
|
|
} finally { |
|
|
tableObject.loading = false |
|
|
tableObject.loading = false |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
@ -340,18 +388,20 @@ const handleExport = async () => { |
|
|
loadStart() |
|
|
loadStart() |
|
|
const excelTitle = ref(route.meta.title) |
|
|
const excelTitle = ref(route.meta.title) |
|
|
tableObject.params.type = 'predict' |
|
|
tableObject.params.type = 'predict' |
|
|
if (tableObject.params.isSearch){ |
|
|
if (tableObject.params.isSearch) { |
|
|
const cmd = { |
|
|
const cmd = { |
|
|
'column':'type', |
|
|
column: 'type', |
|
|
'action':'==', |
|
|
action: '==', |
|
|
'value':'predict' |
|
|
value: 'predict' |
|
|
} |
|
|
} |
|
|
if (!Array.isArray(tableObject.params.filters)) { |
|
|
if (!Array.isArray(tableObject.params.filters)) { |
|
|
tableObject.params.filters = []; |
|
|
tableObject.params.filters = [] |
|
|
} |
|
|
} |
|
|
tableObject.params.filters.push(cmd) |
|
|
tableObject.params.filters.push(cmd) |
|
|
} |
|
|
} |
|
|
const data = await ProductreceiptRecordMainApi.exportProductreceiptRecordMain(tableObject.params) |
|
|
const data = await ProductreceiptRecordMainApi.exportProductreceiptRecordMain( |
|
|
|
|
|
tableObject.params |
|
|
|
|
|
) |
|
|
download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) |
|
|
download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) |
|
|
} catch { |
|
|
} catch { |
|
|
} finally { |
|
|
} finally { |
|
@ -362,12 +412,12 @@ const handleExport = async () => { |
|
|
// 筛选提交 |
|
|
// 筛选提交 |
|
|
const searchFormClick = (searchData) => { |
|
|
const searchFormClick = (searchData) => { |
|
|
const cmd = { |
|
|
const cmd = { |
|
|
'column':'type', |
|
|
column: 'type', |
|
|
'action':'==', |
|
|
action: '==', |
|
|
'value':'predict' |
|
|
value: 'predict' |
|
|
} |
|
|
} |
|
|
if (!Array.isArray(searchData.filters)) { |
|
|
if (!Array.isArray(searchData.filters)) { |
|
|
searchData.filters = []; |
|
|
searchData.filters = [] |
|
|
} |
|
|
} |
|
|
searchData.filters.push(cmd) |
|
|
searchData.filters.push(cmd) |
|
|
tableObject.params = { |
|
|
tableObject.params = { |
|
@ -378,8 +428,9 @@ const searchFormClick = (searchData) => { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// 查看 Bom 按钮回调事件 |
|
|
// 查看 Bom 按钮回调事件 |
|
|
const tableFormButton = async (val , row) => { |
|
|
const tableFormButton = async (val, row) => { |
|
|
if (val == 'bom') { // 查看 bom |
|
|
if (val == 'bom') { |
|
|
|
|
|
// 查看 bom |
|
|
bomModelVisible.value = true |
|
|
bomModelVisible.value = true |
|
|
DialogTitle.value = '物料代码【' + row.itemCode + '】——Bom信息' |
|
|
DialogTitle.value = '物料代码【' + row.itemCode + '】——Bom信息' |
|
|
detatableDataBom.params = { |
|
|
detatableDataBom.params = { |
|
|