|
|
@ -114,10 +114,12 @@ import * as PurchasereceiptRecordDetailApi from '@/api/wms/purchasereceiptRecord |
|
|
|
import * as defaultButtons from '@/utils/disposition/defaultButtons' |
|
|
|
import { PurchasereceiptRequestTabsList } from '@/utils/disposition/tabsList' |
|
|
|
import { CACHE_KEY, useCache } from '@/hooks/web/useCache' |
|
|
|
import { 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"; |
|
|
|
const { loadStart, loadDone } = usePageLoading() |
|
|
|
// 采购收货记录主 |
|
|
|
defineOptions({ name: 'PurchasereceiptRecordMain' }) |
|
|
@ -181,13 +183,14 @@ const isShowSourceTypeButton = (row) => { |
|
|
|
const butttondata = (row,$index) => { |
|
|
|
const findIndex = row['masterId']?tableObject.tableList.findIndex(item=>item['masterId'] == row['masterId']):-1 |
|
|
|
if(findIndex>-1&&findIndex<$index){ |
|
|
|
return [] |
|
|
|
return [defaultButtons.mainListPrintInspectionBtn(null)] |
|
|
|
} |
|
|
|
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.mainListPlanCheckQualityReportBtn({hide:row.orderTypeM == "2"}), // 查看质检报告 |
|
|
|
defaultButtons.mainListPlanCheckQualityReportBtn({hide:isShowSourceTypeButton(row)}), // 查看质检报告 |
|
|
|
defaultButtons.mainListPrintInspectionBtn(null), |
|
|
|
] |
|
|
|
} |
|
|
|
|
|
|
@ -200,6 +203,8 @@ const buttonTableClick = async (val, row) => { |
|
|
|
}else if(val == 'mainPlanCheckQualityReport'){ |
|
|
|
// 查看质检报告 |
|
|
|
checkQualityReport(row) |
|
|
|
}else if (val == 'printInspection'){ |
|
|
|
handlePrint(row) |
|
|
|
} |
|
|
|
} |
|
|
|
// 查看质检报告 |
|
|
@ -212,6 +217,12 @@ const checkQualityReport = async (row)=>{ |
|
|
|
qualityReport.value = `${getReportUrl()}/purchasereceiptReport?asnNumber=${row.asnNumber}` |
|
|
|
} |
|
|
|
|
|
|
|
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) |
|
|
|
} |
|
|
|
|
|
|
|
/** 生成采购上架申请按钮操作 */ |
|
|
|
const handleCreatePutawayRequest = async (number:string) => { |
|
|
|
try{ |
|
|
|