|
|
@ -1,23 +1,31 @@ |
|
|
|
<template> |
|
|
|
<ContentWrap> |
|
|
|
<!-- 搜索工作栏 --> |
|
|
|
<Search :schema="[...PurchasereceiptRecordMain.allSchemas.searchSchema,...PurchasereceiptRecordDetail.allSchemas.searchSchema]" @search="searchList" @reset="searchList" /> |
|
|
|
<Search |
|
|
|
:schema="[ |
|
|
|
...PurchasereceiptRecordMain.allSchemas.searchSchema, |
|
|
|
...PurchasereceiptRecordDetail.allSchemas.searchSchema |
|
|
|
]" |
|
|
|
@search="searchList" |
|
|
|
@reset="searchList" |
|
|
|
/> |
|
|
|
</ContentWrap> |
|
|
|
|
|
|
|
<!-- 列表头部 --> |
|
|
|
<TableHead |
|
|
|
:HeadButttondata="HeadButttondata" |
|
|
|
@button-base-click="buttonBaseClick" |
|
|
|
:routeName="routeName" |
|
|
|
@updataTableColumns="updataTableColumns" |
|
|
|
@searchFormClick="searchFormClick" |
|
|
|
:allSchemas="PurchasereceiptRecordMain.allSchemas" |
|
|
|
:detailAllSchemas="PurchasereceiptRecordDetail.allSchemas" |
|
|
|
/> |
|
|
|
<!-- 列表头部 --> |
|
|
|
<TableHead |
|
|
|
:HeadButttondata="HeadButttondata" |
|
|
|
@button-base-click="buttonBaseClick" |
|
|
|
:routeName="routeName" |
|
|
|
@updataTableColumns="updataTableColumns" |
|
|
|
@searchFormClick="searchFormClick" |
|
|
|
:allSchemas="PurchasereceiptRecordMain.allSchemas" |
|
|
|
:detailAllSchemas="PurchasereceiptRecordDetail.allSchemas" |
|
|
|
/> |
|
|
|
|
|
|
|
<!-- 列表 --> |
|
|
|
<ContentWrap> |
|
|
|
<Table v-clientTable |
|
|
|
<Table |
|
|
|
v-clientTable |
|
|
|
:columns="tableColumns" |
|
|
|
:data="tableObject.tableList" |
|
|
|
:loading="tableObject.loading" |
|
|
@ -28,13 +36,16 @@ |
|
|
|
v-model:currentPage="tableObject.currentPage" |
|
|
|
v-model:sort="tableObject.sort" |
|
|
|
> |
|
|
|
<template #number="{row}"> |
|
|
|
<template #number="{ row }"> |
|
|
|
<el-button type="primary" link @click="openDetail(row, '单据号', row.number)"> |
|
|
|
<span>{{ row.number }}</span> |
|
|
|
</el-button> |
|
|
|
</template> |
|
|
|
<template #action="{ row,$index }"> |
|
|
|
<ButtonBase :Butttondata="butttondata(row,$index)" @button-base-click="buttonTableClick($event,row)" /> |
|
|
|
<template #action="{ row, $index }"> |
|
|
|
<ButtonBase |
|
|
|
:Butttondata="butttondata(row, $index)" |
|
|
|
@button-base-click="buttonTableClick($event, row)" |
|
|
|
/> |
|
|
|
</template> |
|
|
|
</Table> |
|
|
|
</ContentWrap> |
|
|
@ -77,8 +88,8 @@ |
|
|
|
:isShowFooterButtton="false" |
|
|
|
/> |
|
|
|
|
|
|
|
<!-- 缺货子包装弹窗 --> |
|
|
|
<BasicForm |
|
|
|
<!-- 缺货子包装弹窗 --> |
|
|
|
<BasicForm |
|
|
|
ref="outStockDetailParenPackingRef" |
|
|
|
@success="getList" |
|
|
|
:tableAllSchemas="PurchasereceiptRecordDetailPackingNumber.allSchemas" |
|
|
@ -90,36 +101,36 @@ |
|
|
|
:isShowFooterButtton="false" |
|
|
|
/> |
|
|
|
<el-dialog |
|
|
|
v-model="showQualityReport" |
|
|
|
:title="t('质检明细')" |
|
|
|
:append-to-body="false" |
|
|
|
destroy-on-close |
|
|
|
fullscreen |
|
|
|
> |
|
|
|
<iframe :height="reportHeight" width="100%" :src="qualityReport" frameborder="0"></iframe> |
|
|
|
v-model="showQualityReport" |
|
|
|
:title="t('质检明细')" |
|
|
|
:append-to-body="false" |
|
|
|
destroy-on-close |
|
|
|
fullscreen |
|
|
|
> |
|
|
|
<iframe :height="reportHeight" width="100%" :src="qualityReport" frameborder="0"></iframe> |
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
<script setup lang="ts"> |
|
|
|
import download from '@/utils/download' |
|
|
|
import { PurchasereceiptRecordMain, |
|
|
|
import { |
|
|
|
PurchasereceiptRecordMain, |
|
|
|
PurchasereceiptRecordMainRules, |
|
|
|
PurchasereceiptRecordDetail, |
|
|
|
PurchasereceiptRecordDetailRules, |
|
|
|
PurchasereceiptRecordDetailPackingNumber } from './purchasereceiptRecordMain.data' |
|
|
|
PurchasereceiptRecordDetailPackingNumber |
|
|
|
} from './purchasereceiptRecordMain.data' |
|
|
|
import * as PurchasereceiptRecordMainApi from '@/api/wms/purchasereceiptRecordMain' |
|
|
|
import * as PurchasereceiptRecordDetailApi from '@/api/wms/purchasereceiptRecordDetail' |
|
|
|
import * as defaultButtons from '@/utils/disposition/defaultButtons' |
|
|
|
import { getSwitchByCode } from '@/api/wms/switch' |
|
|
|
import { PurchasereceiptRequestTabsList } from '@/utils/disposition/tabsList' |
|
|
|
import { CACHE_KEY, useCache } from '@/hooks/web/useCache' |
|
|
|
import {getJmreportBaseUrl, getReportUrl} from '@/utils/systemParam' |
|
|
|
|
|
|
|
import { getJmreportBaseUrl, getReportUrl } from '@/utils/systemParam' |
|
|
|
import { formatDate } from '@/utils/formatTime' |
|
|
|
import { usePageLoading } from '@/hooks/web/usePageLoading' |
|
|
|
import {mainListPointBtn, mainListPrintInspectionBtn} from "@/utils/disposition/defaultButtons"; |
|
|
|
import {getAccessToken} from "@/utils/auth"; |
|
|
|
import { mainListPointBtn, mainListPrintInspectionBtn } from '@/utils/disposition/defaultButtons' |
|
|
|
import { getAccessToken } from '@/utils/auth' |
|
|
|
const { loadStart, loadDone } = usePageLoading() |
|
|
|
// 采购收货记录主 |
|
|
|
defineOptions({ name: 'PurchasereceiptRecordMain' }) |
|
|
@ -128,8 +139,15 @@ const { t } = useI18n() // 国际化 |
|
|
|
const route = useRoute() // 路由信息 |
|
|
|
const routeName = ref() |
|
|
|
routeName.value = route.name |
|
|
|
const apiPage = ref(routeName.value.includes('SCP')?PurchasereceiptRecordDetailApi.getPurchasereceiptRecordDetailPageSCP:PurchasereceiptRecordDetailApi.getPurchasereceiptRecordDetailPage) |
|
|
|
const tableColumns = ref([...PurchasereceiptRecordMain.allSchemas.tableColumns,...PurchasereceiptRecordDetail.allSchemas.tableMainColumns]) |
|
|
|
const apiPage = ref( |
|
|
|
routeName.value.includes('SCP') |
|
|
|
? PurchasereceiptRecordDetailApi.getPurchasereceiptRecordDetailPageSCP |
|
|
|
: PurchasereceiptRecordDetailApi.getPurchasereceiptRecordDetailPage |
|
|
|
) |
|
|
|
const tableColumns = ref([ |
|
|
|
...PurchasereceiptRecordMain.allSchemas.tableColumns, |
|
|
|
...PurchasereceiptRecordDetail.allSchemas.tableMainColumns |
|
|
|
]) |
|
|
|
const detailAllSchemas = ref(PurchasereceiptRecordDetail.allSchemas) |
|
|
|
|
|
|
|
// 字段设置 更新主列表字段 |
|
|
@ -138,7 +156,9 @@ const updataTableColumns = (val) => { |
|
|
|
} |
|
|
|
|
|
|
|
const { tableObject, tableMethods } = useTable({ |
|
|
|
getListApi: routeName.value.includes('SCP')?PurchasereceiptRecordDetailApi.getPurchasereceiptRecordDetailPageSCP:PurchasereceiptRecordDetailApi.getPurchasereceiptRecordDetailPage // 分页接口 |
|
|
|
getListApi: routeName.value.includes('SCP') |
|
|
|
? PurchasereceiptRecordDetailApi.getPurchasereceiptRecordDetailPageSCP |
|
|
|
: PurchasereceiptRecordDetailApi.getPurchasereceiptRecordDetailPage // 分页接口 |
|
|
|
}) |
|
|
|
|
|
|
|
// 获得表格的各种操作 |
|
|
@ -146,78 +166,125 @@ const { getList, setSearchParams } = tableMethods |
|
|
|
|
|
|
|
// 列表头部按钮 |
|
|
|
const HeadButttondata = [ |
|
|
|
defaultButtons.defaultExportBtn({hasPermi:'wms:purchasereceipt-record-main:export'}), // 导出 |
|
|
|
defaultButtons.defaultExportBtn({ hasPermi: 'wms:purchasereceipt-record-main:export' }), // 导出 |
|
|
|
defaultButtons.defaultFreshBtn(null), // 刷新 |
|
|
|
defaultButtons.defaultFilterBtn(null), // 筛选 |
|
|
|
defaultButtons.defaultSetBtn(null), // 设置 |
|
|
|
defaultButtons.defaultSetBtn(null) // 设置 |
|
|
|
] |
|
|
|
|
|
|
|
// 头部按钮事件 |
|
|
|
const buttonBaseClick = (val, item) => { |
|
|
|
if (val == 'export') { // 导出 |
|
|
|
if (val == 'export') { |
|
|
|
// 导出 |
|
|
|
handleExport() |
|
|
|
} else if (val == 'refresh') { // 刷新 |
|
|
|
if (tableObject.params.filters && tableObject.params.filters.length > 0 ) { |
|
|
|
} else if (val == 'refresh') { |
|
|
|
// 刷新 |
|
|
|
if (tableObject.params.filters && tableObject.params.filters.length > 0) { |
|
|
|
searchFormClick({ |
|
|
|
filters: tableObject.params.filters |
|
|
|
}) |
|
|
|
} else { |
|
|
|
getList() |
|
|
|
} |
|
|
|
} else if (val == 'filtrate') { // 筛选 |
|
|
|
} else { // 其他按钮 |
|
|
|
} else if (val == 'filtrate') { |
|
|
|
// 筛选 |
|
|
|
} else { |
|
|
|
// 其他按钮 |
|
|
|
console.log('其他按钮', item) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
// 根据收货来源判断该按钮是否显示 |
|
|
|
// 根据收货来源判断该按钮是否显示,根据QMS开关判断该按钮是否显示(检验相关) |
|
|
|
const EnableQms = ref(true) |
|
|
|
const isShowSourceTypeButton = (row) => { |
|
|
|
if (row.sourceType == 'EDI' || row.sourceType == 'ASN_ExternalReceipt') { |
|
|
|
if (EnableQms.value) { |
|
|
|
if (row.sourceType == 'EDI' || row.sourceType == 'ASN_ExternalReceipt') { |
|
|
|
return true |
|
|
|
} else { |
|
|
|
return false |
|
|
|
} |
|
|
|
} else { |
|
|
|
return true |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
// 根据QMS开关判断该按钮是否显示(检验相关) |
|
|
|
const isShowSCPAndQMSButton = () => { |
|
|
|
if (EnableQms.value) { |
|
|
|
if (routeName.value.includes('SCP')) { |
|
|
|
return true |
|
|
|
} else { |
|
|
|
return false |
|
|
|
} |
|
|
|
} else { |
|
|
|
return false |
|
|
|
return true |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
// 根据QMS开关判断该按钮是否显示(检验相关) |
|
|
|
const isShowputawayRequestFlagButton = (row) => { |
|
|
|
if (EnableQms.value) { |
|
|
|
if (row.inspectRequestFlag == 'FALSE') { |
|
|
|
return true |
|
|
|
} else { |
|
|
|
return false |
|
|
|
} |
|
|
|
} else { |
|
|
|
return true |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
// 列表-操作按钮 |
|
|
|
const butttondata = (row,$index) => { |
|
|
|
// const findIndex = row['masterId']?tableObject.tableList.findIndex(item=>item['masterId'] == row['masterId']):-1 |
|
|
|
// if(findIndex>-1&&findIndex<$index){ |
|
|
|
// return [defaultButtons.mainListPrintInspectionBtn({hide:routeName.value.includes('SCP')})] |
|
|
|
// } |
|
|
|
const butttondata = (row, $index) => { |
|
|
|
const findIndex = row['masterId'] |
|
|
|
? tableObject.tableList.findIndex((item) => item['masterId'] == row['masterId']) |
|
|
|
: -1 |
|
|
|
if (findIndex > -1 && findIndex < $index) { |
|
|
|
return [defaultButtons.mainListPrintInspectionBtn({ hide: isShowSCPAndQMSButton() })] |
|
|
|
} |
|
|
|
return [ |
|
|
|
// defaultButtons.mainInspectRequestBtn({hasPermi:'wms:purchasereceipt-record-main:createInspectRequest',hide:row.inspectRequestFlag == "FALSE" }),// 生成到货检验申请 |
|
|
|
defaultButtons.mainPutawayRequestBtn({hasPermi:'wms:purchasereceipt-record-main:createPutawayRequest',hide:row.putawayRequestFlag == "FALSE" }),// 生成采购上架申请 |
|
|
|
defaultButtons.mainPurchasereturnRecordBtn({hasPermi:'wms:purchasereceipt-record-main:createPurchasereturnRecord',hide:row.purchasereturnRecordFlag == "FALSE" }),// 生成采购退后记录申请 |
|
|
|
//defaultButtons.mainListPlanCheckQualityReportBtn({hide:row.orderTypeM == "2"}), // 查看质检报告 |
|
|
|
// defaultButtons.mainListPlanCheckQualityReportBtn({hide:isShowSourceTypeButton(row)}), // 查看质检报告 |
|
|
|
// defaultButtons.mainListPrintInspectionBtn({hide:routeName.value.includes('SCP')}) |
|
|
|
defaultButtons.mainInspectRequestBtn({ |
|
|
|
hasPermi: 'wms:purchasereceipt-record-main:createInspectRequest', |
|
|
|
hide: isShowputawayRequestFlagButton(row) |
|
|
|
}), // 生成到货检验申请 |
|
|
|
defaultButtons.mainPutawayRequestBtn({ |
|
|
|
hasPermi: 'wms:purchasereceipt-record-main:createPutawayRequest', |
|
|
|
hide: row.putawayRequestFlag == 'FALSE' |
|
|
|
}), // 生成采购上架申请 |
|
|
|
defaultButtons.mainPurchasereturnRecordBtn({ |
|
|
|
hasPermi: 'wms:purchasereceipt-record-main:createPurchasereturnRecord', |
|
|
|
hide: row.purchasereturnRecordFlag == 'FALSE' |
|
|
|
}), // 生成采购退后记录申请 |
|
|
|
//defaultButtons.mainListPlanCheckQualityReportBtn({hide:row.orderTypeM == "2"}), // 查看质检报告 |
|
|
|
defaultButtons.mainListPlanCheckQualityReportBtn({ hide: isShowSourceTypeButton(row) }), // 查看质检报告 |
|
|
|
defaultButtons.mainListPrintInspectionBtn({ hide: isShowSCPAndQMSButton() }) |
|
|
|
] |
|
|
|
} |
|
|
|
|
|
|
|
// 列表-操作按钮事件 |
|
|
|
const buttonTableClick = async (val, row) => { |
|
|
|
if (val == 'putawayRequest') { // 生成采购上架申请 |
|
|
|
if (val == 'putawayRequest') { |
|
|
|
// 生成采购上架申请 |
|
|
|
handleCreatePutawayRequest(row.number) |
|
|
|
}else if(val == 'inspectRequest'){//生成到货检验申请 |
|
|
|
} else if (val == 'inspectRequest') { |
|
|
|
//生成到货检验申请 |
|
|
|
handleCreateInspectRequest(row.number) |
|
|
|
}else if(val == 'purchasereturnRecord'){//生成采购退后记录申请 |
|
|
|
} else if (val == 'purchasereturnRecord') { |
|
|
|
//生成采购退后记录申请 |
|
|
|
handleCreatePurchasereturnRecord(row.number) |
|
|
|
} |
|
|
|
// else if(val == 'mainPlanCheckQualityReport'){ |
|
|
|
// // 查看质检报告 |
|
|
|
// checkQualityReport(row) |
|
|
|
// } |
|
|
|
else if (val == 'printInspection'){ |
|
|
|
} else if (val == 'mainPlanCheckQualityReport') { |
|
|
|
// 查看质检报告 |
|
|
|
checkQualityReport(row) |
|
|
|
} else if (val == 'printInspection') { |
|
|
|
handlePrint(row) |
|
|
|
} |
|
|
|
} |
|
|
|
const searchList = (model)=>{ |
|
|
|
let params = {...model} |
|
|
|
if(Array.isArray(params.itemType)&¶ms.itemType.length>0){ |
|
|
|
const searchList = (model) => { |
|
|
|
let params = { ...model } |
|
|
|
if (Array.isArray(params.itemType) && params.itemType.length > 0) { |
|
|
|
params.itemTypes = params.itemType.join(',') |
|
|
|
params.itemType = '' |
|
|
|
}else{ |
|
|
|
} else { |
|
|
|
params.itemTypes = '' |
|
|
|
params.itemType = '' |
|
|
|
} |
|
|
@ -229,7 +296,7 @@ const searchList = (model)=>{ |
|
|
|
const reportHeight = ref(window.innerHeight - 120) |
|
|
|
const showQualityReport = ref(false) |
|
|
|
const qualityReport = ref('') |
|
|
|
const checkQualityReport = async (row)=>{ |
|
|
|
const checkQualityReport = async (row) => { |
|
|
|
showQualityReport.value = true |
|
|
|
// qualityReport.value = "http://localhost/purchasereceiptReport?asnNumber=ASNS20240720-0002" |
|
|
|
qualityReport.value = `${getReportUrl()}/purchasereceiptReport?asnNumber=${row.asnNumber}` |
|
|
@ -238,44 +305,47 @@ const checkQualityReport = async (row)=>{ |
|
|
|
const BASE_URL = getJmreportBaseUrl() |
|
|
|
const src = ref(BASE_URL + '/jmreport/view/986481894320525312?token=' + getAccessToken()) |
|
|
|
const handlePrint = async (row) => { |
|
|
|
window.open(src.value+'&jobNumber='+row.jobNumber) |
|
|
|
window.open(src.value + '&jobNumber=' + row.jobNumber) |
|
|
|
} |
|
|
|
|
|
|
|
/** 生成采购上架申请按钮操作 */ |
|
|
|
const handleCreatePutawayRequest = async (number:string) => { |
|
|
|
try{ |
|
|
|
const handleCreatePutawayRequest = async (number: string) => { |
|
|
|
try { |
|
|
|
await message.confirm(t('ts.确认生成上架申请吗?')) |
|
|
|
tableObject.loading = true |
|
|
|
await PurchasereceiptRecordMainApi.createPutawayRequest(number) |
|
|
|
message.success(t('ts.上架申请生成成功')) |
|
|
|
buttonBaseClick('refresh',null) |
|
|
|
}catch{}finally{ |
|
|
|
buttonBaseClick('refresh', null) |
|
|
|
} catch { |
|
|
|
} finally { |
|
|
|
tableObject.loading = false |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
/** 生成到货检验申请按钮操作 */ |
|
|
|
const handleCreateInspectRequest = async (number:string) => { |
|
|
|
try{ |
|
|
|
const handleCreateInspectRequest = async (number: string) => { |
|
|
|
try { |
|
|
|
await message.confirm(t('ts.确认生成到货检验申请吗?')) |
|
|
|
tableObject.loading = true |
|
|
|
await PurchasereceiptRecordMainApi.createInspectRequest(number) |
|
|
|
message.success(t('ts.到货检验申请生成成功')) |
|
|
|
buttonBaseClick('refresh',null) |
|
|
|
}catch{}finally{ |
|
|
|
buttonBaseClick('refresh', null) |
|
|
|
} catch { |
|
|
|
} finally { |
|
|
|
tableObject.loading = false |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
/** 生成采购退货记录按钮操作 */ |
|
|
|
const handleCreatePurchasereturnRecord = async (number:string) => { |
|
|
|
try{ |
|
|
|
const handleCreatePurchasereturnRecord = async (number: string) => { |
|
|
|
try { |
|
|
|
await message.confirm(t('ts.确认生成采购退货记录吗?')) |
|
|
|
tableObject.loading = true |
|
|
|
await PurchasereceiptRecordMainApi.createPurchasereturnRecord(number) |
|
|
|
message.success(t('ts.采购退货记录生成成功')) |
|
|
|
buttonBaseClick('refresh',null) |
|
|
|
}catch{}finally{ |
|
|
|
buttonBaseClick('refresh', null) |
|
|
|
} catch { |
|
|
|
} finally { |
|
|
|
tableObject.loading = false |
|
|
|
} |
|
|
|
} |
|
|
@ -285,27 +355,30 @@ const detailParenPackingRef = ref() |
|
|
|
const { tableObject: packingDetatableData, tableMethods: packDetatableMethods } = useTable({ |
|
|
|
getListApi: PurchasereceiptRecordDetailApi.queryPurchaseceiptChildPackingNumber |
|
|
|
}) |
|
|
|
const { getList:queryDetailList } = packDetatableMethods |
|
|
|
|
|
|
|
const { getList: queryDetailList } = packDetatableMethods |
|
|
|
|
|
|
|
// 缺货子包装数据 |
|
|
|
const outStockDetailParenPackingRef = ref() |
|
|
|
const { tableObject: outStockPackingDetatableData, tableMethods: outStockPackDetatableMethods } = useTable({ |
|
|
|
getListApi: PurchasereceiptRecordDetailApi.queryPurchaseshortageChildPackingNumber |
|
|
|
}) |
|
|
|
const { getList:queryOutStockDetailList } = outStockPackDetatableMethods |
|
|
|
const { tableObject: outStockPackingDetatableData, tableMethods: outStockPackDetatableMethods } = |
|
|
|
useTable({ |
|
|
|
getListApi: PurchasereceiptRecordDetailApi.queryPurchaseshortageChildPackingNumber |
|
|
|
}) |
|
|
|
const { getList: queryOutStockDetailList } = outStockPackDetatableMethods |
|
|
|
// 获取部门 用于详情 部门回显 |
|
|
|
const { wsCache } = useCache() |
|
|
|
/** 详情操作 */ |
|
|
|
const detailRef = ref() |
|
|
|
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)) |
|
|
|
detailRef.value.openDetail(row, titleName, titleValue,'recordPurchasereceiptMain') |
|
|
|
detailRef.value.openDetail(row, titleName, titleValue, 'recordPurchasereceiptMain') |
|
|
|
} |
|
|
|
|
|
|
|
// 详情 table 操作扩展 按钮 |
|
|
|
const buttondataTable = ref([{ |
|
|
|
const buttondataTable = ref([ |
|
|
|
{ |
|
|
|
label: t('ts.查看子包装'), |
|
|
|
name: 'viewParentPickingNumber', |
|
|
|
hide: false, |
|
|
@ -313,28 +386,30 @@ const buttondataTable = ref([{ |
|
|
|
icon: '', |
|
|
|
color: '', |
|
|
|
hasPermi: '', |
|
|
|
link: true, // 文本展现按钮 |
|
|
|
}]) |
|
|
|
|
|
|
|
link: true // 文本展现按钮 |
|
|
|
} |
|
|
|
]) |
|
|
|
|
|
|
|
const tabeKey = ref("receiptDetail"); |
|
|
|
const tabeKey = ref('receiptDetail') |
|
|
|
// 查看其他包装规格 |
|
|
|
const tableFormButton = async (val , row) => { |
|
|
|
if (val == 'viewParentPickingNumber' && tabeKey.value == 'receiptDetail') { //查看其他包装规格 |
|
|
|
packingDetatableData.params = { |
|
|
|
masterId:row.masterId, |
|
|
|
parentPackingNumber:row.packingNumber |
|
|
|
} |
|
|
|
await queryDetailList() |
|
|
|
detailParenPackingRef.value.open('create', row, null,'viewDetail')//查看明细数据 |
|
|
|
const tableFormButton = async (val, row) => { |
|
|
|
if (val == 'viewParentPickingNumber' && tabeKey.value == 'receiptDetail') { |
|
|
|
//查看其他包装规格 |
|
|
|
packingDetatableData.params = { |
|
|
|
masterId: row.masterId, |
|
|
|
parentPackingNumber: row.packingNumber |
|
|
|
} |
|
|
|
await queryDetailList() |
|
|
|
detailParenPackingRef.value.open('create', row, null, 'viewDetail') //查看明细数据 |
|
|
|
} |
|
|
|
if (val == 'viewParentPickingNumber' && tabeKey.value == 'scarceGoodsDetail') { //查看其他包装规格 |
|
|
|
outStockPackingDetatableData.params = { |
|
|
|
masterId:row.masterId, |
|
|
|
parentPackingNumber:row.packingNumber |
|
|
|
} |
|
|
|
await queryOutStockDetailList() |
|
|
|
outStockDetailParenPackingRef.value.open('create', row, null,'viewDetail')//查看明细数据 |
|
|
|
if (val == 'viewParentPickingNumber' && tabeKey.value == 'scarceGoodsDetail') { |
|
|
|
//查看其他包装规格 |
|
|
|
outStockPackingDetatableData.params = { |
|
|
|
masterId: row.masterId, |
|
|
|
parentPackingNumber: row.packingNumber |
|
|
|
} |
|
|
|
await queryOutStockDetailList() |
|
|
|
outStockDetailParenPackingRef.value.open('create', row, null, 'viewDetail') //查看明细数据 |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
@ -346,11 +421,15 @@ const handleExport = async () => { |
|
|
|
// 发起导出 |
|
|
|
loadStart() |
|
|
|
const excelTitle = ref(route.meta.title) |
|
|
|
if(routeName.value.includes('SCP')){ |
|
|
|
const data = await PurchasereceiptRecordMainApi.exportPurchasereceiptRecordMainSCP(tableObject.params) |
|
|
|
if (routeName.value.includes('SCP')) { |
|
|
|
const data = await PurchasereceiptRecordMainApi.exportPurchasereceiptRecordMainSCP( |
|
|
|
tableObject.params |
|
|
|
) |
|
|
|
download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) |
|
|
|
}else{ |
|
|
|
const data = await PurchasereceiptRecordMainApi.exportPurchasereceiptRecordMain(tableObject.params) |
|
|
|
} else { |
|
|
|
const data = await PurchasereceiptRecordMainApi.exportPurchasereceiptRecordMain( |
|
|
|
tableObject.params |
|
|
|
) |
|
|
|
download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) |
|
|
|
} |
|
|
|
} catch { |
|
|
@ -361,13 +440,11 @@ const handleExport = async () => { |
|
|
|
|
|
|
|
// 筛选提交 |
|
|
|
const searchFormClick = (searchData) => { |
|
|
|
searchData.filters.push( |
|
|
|
{ |
|
|
|
action: '==', |
|
|
|
column: 'order_type_m', |
|
|
|
value: '1' |
|
|
|
} |
|
|
|
) |
|
|
|
searchData.filters.push({ |
|
|
|
action: '==', |
|
|
|
column: 'order_type_m', |
|
|
|
value: '1' |
|
|
|
}) |
|
|
|
tableObject.params = { |
|
|
|
isSearch: true, |
|
|
|
filters: searchData.filters |
|
|
@ -375,37 +452,41 @@ const searchFormClick = (searchData) => { |
|
|
|
getList() // 刷新当前列表 |
|
|
|
} |
|
|
|
// tabs 切换事件 |
|
|
|
const changeTabs = (data) =>{ |
|
|
|
if(data.prop == 'receiptDetail'){ |
|
|
|
console.log(data) |
|
|
|
apiPage.value = routeName.value.includes('SCP')?PurchasereceiptRecordDetailApi.getPurchasereceiptRecordDetailPageSCP:PurchasereceiptRecordDetailApi.getPurchasereceiptRecordDetailPage |
|
|
|
const changeTabs = (data) => { |
|
|
|
if (data.prop == 'receiptDetail') { |
|
|
|
console.log(data) |
|
|
|
apiPage.value = routeName.value.includes('SCP') |
|
|
|
? PurchasereceiptRecordDetailApi.getPurchasereceiptRecordDetailPageSCP |
|
|
|
: PurchasereceiptRecordDetailApi.getPurchasereceiptRecordDetailPage |
|
|
|
detailAllSchemas.value = PurchasereceiptRecordDetail.allSchemas |
|
|
|
tabeKey.value = 'receiptDetail' |
|
|
|
}else if(data.prop == 'scarceGoodsDetail'){ |
|
|
|
} else if (data.prop == 'scarceGoodsDetail') { |
|
|
|
apiPage.value = PurchasereceiptRecordDetailApi.getScarceGoodsDetailPage |
|
|
|
detailAllSchemas.value = PurchasereceiptRecordDetail.allSchemas |
|
|
|
tabeKey.value = 'scarceGoodsDetail' |
|
|
|
} |
|
|
|
detailAllSchemas.value.tableColumns.forEach(item=>{ |
|
|
|
if(item['field']=='qty'){ |
|
|
|
item['label'] = data.prop == 'scarceGoodsDetail'?'缺货数量':'收货数量' |
|
|
|
detailAllSchemas.value.tableColumns.forEach((item) => { |
|
|
|
if (item['field'] == 'qty') { |
|
|
|
item['label'] = data.prop == 'scarceGoodsDetail' ? '缺货数量' : '收货数量' |
|
|
|
} |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
console.log('detailAllSchemas',detailAllSchemas.value) |
|
|
|
console.log('detailAllSchemas', detailAllSchemas.value) |
|
|
|
} |
|
|
|
|
|
|
|
/** 初始化 **/ |
|
|
|
onMounted(async () => { |
|
|
|
tableObject.params = { |
|
|
|
orderTypeM : '1' |
|
|
|
orderTypeM: '1' |
|
|
|
} |
|
|
|
await getSwitchByCode('EnableQms').then((res) => { |
|
|
|
EnableQms.value = res == 'TRUE' ? true : false |
|
|
|
}) |
|
|
|
getList() |
|
|
|
}) |
|
|
|
onActivated(() => { |
|
|
|
tableObject.params = { |
|
|
|
orderTypeM : '1' |
|
|
|
orderTypeM: '1' |
|
|
|
} |
|
|
|
getList() |
|
|
|
}) |
|
|
|