Browse Source

查看质检报告功能

master_hella_20240701
yufei0306 6 months ago
parent
commit
ab9cd239a0
  1. 4
      src/api/wms/supplierdeliverInspectionDetail/index.ts
  2. 6
      src/components/Annex/src/Annex.vue
  3. 2
      src/config/axios/service.ts
  4. 3
      src/permission.ts
  5. 10
      src/router/modules/remaining.ts
  6. 11
      src/utils/disposition/defaultButtons.ts
  7. 23
      src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptJobMain/index.vue
  8. 21
      src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRecordMain/index.vue
  9. 56
      src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptReport/index.vue
  10. 28
      src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/index.vue

4
src/api/wms/supplierdeliverInspectionDetail/index.ts

@ -57,3 +57,7 @@ export const exportSupplierdeliverInspectionDetail = async (params) => {
export const importTemplate = () => {
return request.download({ url: '/wms/supplierdeliver-inspection-detail/get-import-template' })
}
// 查看质检报告
export const queryQualityInspection = (asnNumber:string) => {
return request.get({ url: `/wms/supplierdeliver-request-main/queryQualityInspection?asnNumber=` + asnNumber })
}

6
src/components/Annex/src/Annex.vue

@ -4,7 +4,7 @@
<div class="title flex items-center">
<!-- <div class="title-txt">附件</div> -->
<UploadFile :isShowFile="false" :isShowTip="false" :fileType="fileType" :title="t('ts.添加附件')" :upData="upData" :limit="10"
@update:modelValue="handleAnnexSuccess" v-if="annexData.annexList.length<5"/>
@update:modelValue="handleAnnexSuccess" v-if="showAddBtn&&annexData.annexList.length<5"/>
</div>
<div class="list">
<div class="item flex items-start" v-for="(item, index) in annexData.annexList" :key="index">
@ -67,6 +67,10 @@ const props = defineProps({
type: Boolean,
required: false
},
showAddBtn: {
type: Boolean,
required: true
},
})
// emit
const emit = defineEmits(['handleAnnexSuccess', 'deleteAnnexSuccess','previewAnnexHandle'])

2
src/config/axios/service.ts

@ -31,7 +31,7 @@ let requestList: any[] = []
// 是否正在刷新中
let isRefreshToken = false
// 请求白名单,无须token的接口
const whiteList: string[] = ['/login', '/refresh-token']
const whiteList: string[] = ['/login', '/refresh-token','/queryQualityInspection']
// 创建axios实例
const service: AxiosInstance = axios.create({

3
src/permission.ts

@ -21,7 +21,8 @@ const whiteList = [
'/auth-redirect',
'/bind',
'/register',
'/oauthLogin/gitee'
'/oauthLogin/gitee',
'/purchasereceiptReport'
]
// 路由加载前

10
src/router/modules/remaining.ts

@ -244,6 +244,16 @@ const remainingRouter: AppRouteRecordRaw[] = [
noTagsView: true
}
},
{
path: '/purchasereceiptReport',
component: () => import('@/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptReport/index.vue'),
name: 'NoFound',
meta: {
hidden: true,
title: t('ts.查看质检报告'),
noTagsView: true
}
},
{
path: '/bpm',
component: Layout,

11
src/utils/disposition/defaultButtons.ts

@ -518,6 +518,17 @@ export function mainListPlanUploadQualityReportBtn(option:any) {
hasPermi: ''
})
}
export function mainListPlanCheckQualityReportBtn(option:any) {
return __defaultBtnOption(option,{
label: t(`ts.查看质检报告`).replace('ts.', ''),
name: 'mainPlanCheckQualityReport',
hide: false,
type: 'primary',
color: '',
link: true, // 文本展现按钮
hasPermi: ''
})
}
// 主列表-计划流程-提交审批按钮
export function mainListPlanSubBtn(option:any) {

23
src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptJobMain/index.vue

@ -81,6 +81,16 @@
:isShowReduceButton="false"
:isShowFooterButtton="false"
/>
<el-dialog
v-model="showQualityReport"
:title="t('质检明细')"
width="90%"
append-to-body
destroy-on-close
>
<iframe height="600px" width="100%" :src="qualityReport" frameborder="0"></iframe>
</el-dialog>
</template>
@ -219,7 +229,8 @@ const butttondata = (row,$index) => {
color: '',
hasPermi: 'wms:purchasereceipt-job-main:close',
link: true //
}
},
defaultButtons.mainListPlanCheckQualityReportBtn({}), //
]
}
@ -233,8 +244,18 @@ const buttonTableClick = async (val, row) => {
handleClose(row.masterId)
} else if (val == 'mainJobAcc') { //
console.log('列表-操作按钮事件-承接')
}else if(val == 'mainPlanCheckQualityReport'){
//
checkQualityReport(row)
}
}
//
const showQualityReport = ref(false)
const qualityReport = ref('')
const checkQualityReport = async (row)=>{
showQualityReport.value = true
qualityReport.value = `${import.meta.env.VITE_REPORT_URL}/purchasereceiptReport?asnNumber=${row.asnNumber}`
}
/** 关闭按钮操作 */
const handleClose = async (id: number) => {

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

@ -89,6 +89,16 @@
:isShowReduceButton="false"
:isShowFooterButtton="false"
/>
<el-dialog
v-model="showQualityReport"
:title="t('质检明细')"
width="90%"
append-to-body
destroy-on-close
>
<iframe height="600px" width="100%" :src="qualityReport" frameborder="0"></iframe>
</el-dialog>
</template>
@ -162,6 +172,7 @@ const butttondata = (row,$index) => {
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({}), //
]
}
@ -171,8 +182,18 @@ const buttonTableClick = async (val, row) => {
handleCreatePutawayRequest(row.number)
}else if(val == 'inspectRequest'){//
handleCreateInspectRequest(row.number)
}else if(val == 'mainPlanCheckQualityReport'){
//
checkQualityReport(row)
}
}
//
const showQualityReport = ref(false)
const qualityReport = ref('')
const checkQualityReport = async (row)=>{
showQualityReport.value = true
qualityReport.value = `${import.meta.env.VITE_REPORT_URL}/purchasereceiptReport?asnNumber=${row.asnNumber}`
}
/** 生成采购上架申请按钮操作 */
const handleCreatePutawayRequest = async (number:string) => {

56
src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptReport/index.vue

@ -0,0 +1,56 @@
<template>
<div style="height:100%;overflow-y: auto;">
<ContentWrap >
<Annex
:annexData="reportAnnex"
:showDownload = "false"
:showPreview="true"
:hiddenDelete = "true"
:upData="{
tableId:30,
tableName:'SupplierdeliverInspectionDetail'
}"
:key="99"
:showAddBtn="false"
/>
</ContentWrap>
<ContentWrap v-if="subDetailTableData.tableList.length>0">
<Table
align="center"
:columns="subDetailTableData.tableColumns"
:data="subDetailTableData.tableList"
:loading="false"
/>
</ContentWrap>
</div>
</template>
<script lang="ts" setup>
//
import {queryQualityInspection} from '@/api/wms/supplierdeliverInspectionDetail'
import Annex from '@/components/Annex/src/Annex.vue'
defineOptions({ name: 'purchasereceiptReport' })
const route = useRoute() //
const reportAnnex = reactive({
annexList: []
})
const subDetailTableData = ref({
tableList: [],
tableColumns: [],
})
onMounted(() => {
getAnnexList()
})
const getAnnexList = async () => {
let res = await queryQualityInspection(route.query.asnNumber as string)
reportAnnex.annexList = res.fileList
subDetailTableData.value = {
tableList: res.inspectionDetailRespVOList,
tableColumns:[{"label":"物料代码","field":"itemCode","sort":"custom","isForm":false,"isSearch":true,"form":{"componentProps":{"disabled":true}},"tableForm":{"disabled":true}},{"label":"供应商批次","field":"batch","sort":"custom","isForm":false,"isSearch":true,"form":{"componentProps":{"disabled":true}},"tableForm":{"disabled":true}},{"label":"发货数量","field":"planQty","sort":"custom","isForm":false,"isSearch":true,"form":{"componentProps":{"disabled":true}},"tableForm":{"disabled":true,"type":"InputNumber","min":0,"precision":6}},{"width":150,"label":"计量单位","field":"uom","dictType":"uom","dictClass":"string","isTable":true,"isForm":false,"sort":"custom","table":{"width":150},"tableForm":{"type":"Select","disabled":true},"form":{"componentProps":{"disabled":true}}},{"label":"创建时间","field":"createTime","sort":"custom","isSearch":true,"search":{"component":"DatePicker","componentProps":{"valueFormat":"YYYY-MM-DD HH:mm:ss","type":"daterange","defaultTime":["2000-12-31T16:00:00.000Z","2001-01-01T15:59:59.000Z"]}},"isTableForm":false,"isForm":false}],
}
console.log('tableColumns',JSON.stringify(subDetailTableData.value.tableColumns))
}
</script>
<style lang="scss" scoped></style>

28
src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/index.vue

@ -54,6 +54,8 @@
:isBusiness="true"
@handleAddTable="handleAddTable"
@handleDeleteTable="handleDeleteTable"
:isShowReduceButtonSelection="true"
@tableSelectionDelete="tableSelectionDelete"
@searchTableSuccess="searchTableSuccess"
@submitForm="submitForm"
@formFormDateChange="formFormDateChange"
@ -126,7 +128,15 @@
/>
<!-- 标签打印 -->
<SearchTable style="width:905px" ref="searchTableRef" @searchTableSuccess="searchTableSuccess1" />
<el-dialog
v-model="showQualityReport"
:title="t('质检明细')"
width="90%"
append-to-body
destroy-on-close
>
<iframe height="600px" width="100%" :src="qualityReport" frameborder="0"></iframe>
</el-dialog>
</template>
@ -354,7 +364,8 @@ const butttondata = (row,$index) => {
defaultButtons.mainListPointBtn({ hide: isASNShowMainButton(row, ['3','8']) }), //
defaultButtons.mainListHandleBtn({hide:isShowMainButton(row,['3']),hasPermi:'wms:purchasereceipt-request-main:handle'}), //
defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4','6']),hasPermi:'wms:purchasereceipt-request-main:close'}), //
]
defaultButtons.mainListPlanCheckQualityReportBtn({}), //
]
}
// -
@ -384,9 +395,19 @@ const buttonTableClick = async (val, row) => {
}else if (val == 'point') {
//
labelPrint(row)
}else if(val == 'mainPlanCheckQualityReport'){
//
checkQualityReport(row)
}
}
//
const showQualityReport = ref(false)
const qualityReport = ref('')
const checkQualityReport = async (row)=>{
showQualityReport.value = true
qualityReport.value = `${import.meta.env.VITE_REPORT_URL}/purchasereceiptReport?asnNumber=${row.asnNumber}`
}
//
const isCreateLabel = ref(false)
@ -680,6 +701,9 @@ const handleAddTable = () => {
const handleDeleteTable = (item, index) => {
tableData.value.splice(index, 1)
}
const tableSelectionDelete = (selection) => {
tableData.value = tableData.value.filter(item => !selection.includes(item))
}
const onEnter = async (field,value)=>{
console.log(field,value)
getSearchTableData(value,true)

Loading…
Cancel
Save