Browse Source

HL-5520在PC端采购收货记录中增加:检验单补打功能,与PDA的检验单模板保持一致

hella_online_20240823
zhaoyiran 6 months ago
parent
commit
9e61b3449b
  1. 11
      src/utils/disposition/defaultButtons.ts
  2. 15
      src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRecordMain/index.vue

11
src/utils/disposition/defaultButtons.ts

@ -1054,6 +1054,17 @@ export function mainListPointBtn(option: any) {
hasPermi: '' hasPermi: ''
}) })
} }
export function mainListPrintInspectionBtn(option: any) {
return __defaultBtnOption(option, {
label: t(`ts.打印检验指引单`).replace('ts.', ''),
name: 'printInspection',
hide: false,
type: 'primary',
color: '',
link: true, // 文本展现按钮
hasPermi: ''
})
}
// 主列表-回收 // 主列表-回收
export function mainListRecoveryBtn(option: any) { export function mainListRecoveryBtn(option: any) {
return __defaultBtnOption(option, { return __defaultBtnOption(option, {

15
src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRecordMain/index.vue

@ -114,10 +114,12 @@ import * as PurchasereceiptRecordDetailApi from '@/api/wms/purchasereceiptRecord
import * as defaultButtons from '@/utils/disposition/defaultButtons' import * as defaultButtons from '@/utils/disposition/defaultButtons'
import { PurchasereceiptRequestTabsList } from '@/utils/disposition/tabsList' import { PurchasereceiptRequestTabsList } from '@/utils/disposition/tabsList'
import { CACHE_KEY, useCache } from '@/hooks/web/useCache' 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 { formatDate } from '@/utils/formatTime'
import { usePageLoading } from '@/hooks/web/usePageLoading' import { usePageLoading } from '@/hooks/web/usePageLoading'
import {mainListPointBtn, mainListPrintInspectionBtn} from "@/utils/disposition/defaultButtons";
import {getAccessToken} from "@/utils/auth";
const { loadStart, loadDone } = usePageLoading() const { loadStart, loadDone } = usePageLoading()
// //
defineOptions({ name: 'PurchasereceiptRecordMain' }) defineOptions({ name: 'PurchasereceiptRecordMain' })
@ -181,13 +183,14 @@ const isShowSourceTypeButton = (row) => {
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']?tableObject.tableList.findIndex(item=>item['masterId'] == row['masterId']):-1
if(findIndex>-1&&findIndex<$index){ if(findIndex>-1&&findIndex<$index){
return [] return [defaultButtons.mainListPrintInspectionBtn(null)]
} }
return [ return [
defaultButtons.mainInspectRequestBtn({hasPermi:'wms:purchasereceipt-record-main:createInspectRequest',hide:row.inspectRequestFlag == "FALSE" }),// 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.mainPutawayRequestBtn({hasPermi:'wms:purchasereceipt-record-main:createPutawayRequest',hide:row.putawayRequestFlag == "FALSE" }),//
//defaultButtons.mainListPlanCheckQualityReportBtn({hide:row.orderTypeM == "2"}), // //defaultButtons.mainListPlanCheckQualityReportBtn({hide:row.orderTypeM == "2"}), //
defaultButtons.mainListPlanCheckQualityReportBtn({hide:isShowSourceTypeButton(row)}), // defaultButtons.mainListPlanCheckQualityReportBtn({hide:isShowSourceTypeButton(row)}), //
defaultButtons.mainListPrintInspectionBtn(null),
] ]
} }
@ -200,6 +203,8 @@ const buttonTableClick = async (val, row) => {
}else if(val == 'mainPlanCheckQualityReport'){ }else if(val == 'mainPlanCheckQualityReport'){
// //
checkQualityReport(row) checkQualityReport(row)
}else if (val == 'printInspection'){
handlePrint(row)
} }
} }
// //
@ -212,6 +217,12 @@ const checkQualityReport = async (row)=>{
qualityReport.value = `${getReportUrl()}/purchasereceiptReport?asnNumber=${row.asnNumber}` 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) => { const handleCreatePutawayRequest = async (number:string) => {
try{ try{

Loading…
Cancel
Save