授权修改、退料单审核人

This commit is contained in:
hayu 2025-10-10 17:36:18 +08:00
parent ffb3b03952
commit ba56246a75
4 changed files with 292 additions and 69 deletions

View File

@ -72,7 +72,13 @@ export function getAuthInfo(data) {
})
}
export function getBusinessFormByCode(data) {
return request({
url: '/material/leaseTask/getBusinessFormByCode',
method: 'get',
params: data
})
}
// 获取装卸单列表

View File

@ -88,13 +88,17 @@
<div style="width: 30%">审核人</div>
<div
style="width: 70%; display: flex; align-items: center; flex-wrap: wrap"
v-if="backApplyInfo.directAuditSignUrl"
v-if="backApplyInfo.approveSignList.length > 0"
>
<div
style="width: 80%; margin-left: 20px; height: 40px; transform: translateY(-30px)"
v-for="(item, index) in backApplyInfo.approveSignList"
:key="index"
>
<div style="width: 80%; margin-left: 10px">
<img
:src="backApplyInfo.directAuditSignUrl"
style="width: 40px; height: 100px"
:class="{ 'is-rotate': backApplyInfo.directAuditSignType == 0 }"
:src="item.outSignUrl"
style="width: 40px; height: 90px; max-width: 100%"
:style="{ transform: item.outSignType == 0 ? 'rotate(-90deg)' : '' }"
alt=""
/>
</div>
@ -202,13 +206,17 @@
<div style="width: 30%">审核人</div>
<div
style="width: 70%; display: flex; align-items: center; flex-wrap: wrap"
v-if="backApplyInfo.directAuditSignUrl"
v-if="backApplyInfo.approveSignList.length > 0"
>
<div
style="width: 80%; margin-left: 20px; height: 40px; transform: translateY(-30px)"
v-for="(item, index) in backApplyInfo.approveSignList"
:key="index"
>
<div style="width: 80%; margin-left: 10px">
<img
:src="backApplyInfo.directAuditSignUrl"
style="width: 40px; height: 100px"
:class="{ 'is-rotate': backApplyInfo.directAuditSignType == 0 }"
:src="item.outSignUrl"
style="width: 40px; height: 90px; max-width: 100%"
:style="{ transform: item.outSignType == 0 ? 'rotate(-90deg)' : '' }"
alt=""
/>
</div>

View File

@ -369,6 +369,7 @@
<span v-else></span>
</el-form-item>
<el-form-item label="领料人信息:">
<el-table :data="viewForm.detailsList" border style="width: 100%">
<el-table-column label="序号" type="index" width="60" align="center"></el-table-column>
@ -396,16 +397,36 @@
</el-form-item>
</el-form>
<!-- PDF预览对话框 -->
<el-dialog :visible.sync="pdfPreviewVisible" width="80%" top="5vh" append-to-body>
<iframe :src="pdfViewerUrl" style="width: 100%; height: 80vh; border: none" v-if="pdfPreviewVisible"></iframe>
</el-dialog>
<div slot="footer" class="dialog-footer">
<el-button @click="viewDialogVisible = false">关闭</el-button>
</div>
</el-dialog>
<el-dialog
:title="previewTitle"
:visible.sync="previewVisible"
width="90%"
top="5vh"
class="file-preview-dialog"
>
<div v-if="previewType === 'pdf'" class="preview-content">
<iframe :src="previewUrl" width="100%" height="600px" frameborder="0"></iframe>
</div>
<div v-else-if="previewType === 'office'" class="preview-content">
<iframe :src="previewUrl" width="100%" height="600px" frameborder="0"></iframe>
</div>
<div v-else-if="previewType === 'image'" class="preview-content">
<img :src="previewUrl" style="max-width: 100%; max-height: 70vh; display: block; margin: 0 auto;" />
</div>
<div slot="footer">
<el-button @click="previewVisible = false">关闭</el-button>
<el-button type="primary" @click="downloadFile(previewUrl)">下载</el-button>
</div>
</el-dialog>
<!-- 项目部授权委托书 -->
<el-dialog :visible.sync="authorizeVisible" width="50%" append-to-body>
<div style="font-size: 16px; padding: 0 20px">
@ -434,13 +455,14 @@
v-if="authorizeData.detailsList[0].signName"
:src="authorizeData.detailsList[0].signName"
alt=""
width="100px"
height="50px;"
style="margin-right: 10px"
width="120px"
height="120px"
style="vertical-align: middle;"
:style="{ transform: authorizeData.detailsList[0].signType == 0 ? 'rotate(-90deg)' : 'none' }"
/>
</span>
</div>
<div style="margin-left: 62%; margin-bottom: 20px">
<div>委托单位{{ authorizeData.leaseUnit }}</div>
<div>授权人{{ authorizeData.userName }}</div>
@ -456,6 +478,140 @@
<img :src="item.backUrl" alt="" width="300" height="150px;" />
</div>
</div>
<div id="print-content" style="padding: 30px 30px">
<span>附件业务联系单</span>
<!-- 标题 -->
<div style="text-align: center; font-size: 16px">
<h3 style="font-size: 25px">{{ dialogForm.impUnitName }}</h3>
<h2 style="font-size: 35px; margin: 0 20%; display: flex; justify-content: space-around; align-items: center">
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
</h2>
</div>
<div
style="display: flex; justify-content: space-between; align-items: center; line-height: 1.9; padding: 0 15px"
>
<span style="text-decoration: underline">{{ dialogForm.leaseProject }}</span>
<span>
<span style="text-decoration: underline">{{ dialogForm.code }}</span>
</span>
</div>
<!-- 内容 -->
<div style="border: 3px solid #000; min-height: 800px; line-height: 1.9; position: relative">
<div style="font-weight: 800; border-bottom: 1px solid #888; display: flex">
<div style="width: 50%; padding-left: 10px">主送单位{{ '技术质量科' }}</div>
<div style="width: 50%; padding-left: 10px; border-left: 1px solid #888">
抄送单位{{ '物资管理中心' }}
</div>
</div>
<!-- 内容 -->
<div style="padding-left: 10px; min-height: 300px">
<div>联系内容</div>
<div style="text-indent: 2em">
因在
<span style="font-weight: 800">
{{ dialogForm.leaseProject }}
</span>
进行架线施工需要现需领用以下工具器详见附件一
<!-- dialogForm.maTypeNames -->
<div>{{ dialogForm.maTypeNames }}</div>
</div>
</div>
<!-- 说明 -->
<div style="padding-left: 10px; min-height: 200px">
<div>说明</div>
<div>领料单位{{ dialogForm.leaseUnit }}</div>
<!-- <div>项目部材料站站长联系人{{ '徐青松' }} {{ '15234213324' }}</div> -->
<div>项目部技术联系人{{ dialogForm.createBy }}{{ dialogForm.phone }}</div>
<div>领取人员{{ dialogForm.leasePerson }}{{ dialogForm.phone }}</div>
</div>
<div
style="
width: 100%;
display: flex;
border-top: 1px solid #888;
border-bottom: 1px solid #888;
position: absolute;
bottom: 90px;
right: 0;
"
>
<div style="width: 35%; padding-left: 10px">主管{{ '' }}</div>
<div style="width: 43%; padding-left: 10px; border-left: 1px solid #888">
联系{{ dialogForm.leasePerson }} {{ dialogForm.phone }}
</div>
<div style="width: 22%; padding-left: 10px; border-left: 1px solid #888">
{{ handleTimeFormat(dialogForm.supplierTime) }}
</div>
</div>
<div
style="
width: 100%;
display: flex;
border-top: 1px solid #888;
border-bottom: 1px solid #888;
position: absolute;
bottom: 0;
right: 0;
"
>
<div style="width: 50%; padding-left: 10px">签复</div>
<div
style="
width: 50%;
padding-left: 100px;
border-left: 1px solid #888;
display: flex;
justify-content: space-around;
align-items: center;
"
>
<span></span>
<span></span>
<span></span>
</div>
</div>
</div>
<!-- 附件 -->
<div style="margin-top: 100px">
<div style="font-size: 20px; padding-left: 40px; line-height: 1.9">
附件一{{ dialogForm.leaseProject }}
<span style="margin-left: 20px">{{ dialogForm.code }}</span>
号附件
</div>
<div></div>
</div>
<table border="1" style="width: 100%; border-collapse: collapse">
<thead>
<tr>
<th style="width: 55px; text-align: center">序号</th>
<th
v-for="(column, index) in dialogColumns"
:key="column.prop"
:style="{ width: column.width, textAlign: 'center' }"
>
{{ column.label }}
</th>
</tr>
</thead>
<tbody>
<tr v-for="(row, rowIndex) in dialogList" :key="rowIndex">
<td style="text-align: center">{{ rowIndex + 1 }}</td>
<td v-for="(column, colIndex) in dialogColumns" :key="colIndex" :style="{ textAlign: 'center' }">
{{ row[column.prop] }}
</td>
</tr>
</tbody>
</table>
</div>
</vue-easy-print>
</div>
@ -475,11 +631,12 @@ import {
getTeamList,
sumbitAuthData,
uploadIdCard,
getAuthInfo
getAuthInfo, getBusinessFormByCode
} from '@/api/materialsStation/auth'
import { getToken } from '@/utils/auth'
import { validateIdCard } from '@/utils/bonus'
import vueEasyPrint from 'vue-easy-print'
import {getLeaseTask} from "@/api/business";
export default {
components: { vueEasyPrint },
name: 'IdCardUploadComponent',
@ -513,15 +670,10 @@ export default {
},
//
open: false,
dialogForm: {
maTypeName: null,
maTypeId: null,
typeId: null,
supplierId: null,
qrNum: null,
remark: null
},
previewVisible: false,
previewUrl: '',
previewTitle: '',
previewType: '', // 'image', 'pdf', 'office'
fileList: [],
uploadList: [],
//
@ -587,6 +739,19 @@ export default {
children: 'children'
},
uploadParseUrl: process.env.VUE_APP_BASE_API + '/material/authorize/parseWord',
//
dialogForm: {
proName: '', //
code: '' //
},
dialogColumns: [
{ label: '名称', prop: 'maTypeName', width: '150px' },
{ label: '规格', prop: 'typeName', width: '150px' },
{ label: '单位', prop: 'unitName', width: '60px' },
{ label: '数量', prop: 'preNum', width: '60px' },
{ label: '备注', prop: 'remark', width: '' }
],
dialogList: []
}
},
created() {
@ -775,12 +940,6 @@ export default {
this.queryParams.taskStatus = ''
this.handleQuery()
},
checkNum() {
this.dialogForm.qrNum = Number(String(this.dialogForm.qrNum).replace(/[^\d]/g, ''))
if (this.dialogForm.qrNum <= 1) {
this.dialogForm.qrNum = 1
}
},
//
handleSelectionChange(validSelection) {
// ID
@ -1035,28 +1194,53 @@ export default {
},
//
previewFile(file) {
// if (!file || !file.url) return
//
// const ext = file.name.split('.').pop().toLowerCase()
// console.log(ext)
//
// if (ext === 'pdf') {
// this.previewPDF(file.url)
// } else if (['jpg', 'jpeg', 'png', 'gif'].includes(ext)) {
// // 使el-image
// this.$alert(`<img src="${file.url}" style="max-width:100%;"/>`, file.name, {
// dangerouslyUseHTMLString: true,
// customClass: 'image-preview-modal'
// })
// } else {
// this.$message.warning('')
// }
if (!file || !file.url) return;
const ext = file.name.split('.').pop().toLowerCase();
console.log(ext);
if (ext === 'pdf') {
this.previewPDF(file.url);
} else if (['jpg', 'jpeg', 'png', 'gif'].includes(ext)) {
//
this.previewImage(file.url);
} else if (ext === 'docx') {
// DOCX
this.downloadFile(file.url);
} else {
this.$message.warning('不支持预览此文件类型');
}
},
// PDF
previewPDF(url) {
// 2: 使iframe (PDF)
this.pdfViewerUrl = url
this.pdfPreviewVisible = true
// PDF
window.open(url, '_blank');
},
previewImage(url) {
//
const imgWindow = window.open('', '_blank');
//
imgWindow.document.write(`
<html>
<head>
<title>图片预览</title>
<style>
body { margin: 0; display: flex; justify-content: center; align-items: center; height: 100vh; }
img { max-width: 90%; max-height: 90%; object-fit: contain; }
</style>
</head>
<body>
<img src="${url}" alt="图片预览" />
</body>
</html>
`);
},
downloadFile(url) {
// DOCX
const link = document.createElement('a');
link.href = url;
link.download = url.split('/').pop(); //
link.click();
},
//
formatFileSize(bytes) {
@ -1145,6 +1329,16 @@ export default {
const date = new Date()
const time = `${date.getFullYear()}${date.getMonth() + 1}${date.getDate()}`
this.authorizeData.createTime = res.data.createTime ? this.formatTime(res.data.createTime) : time
const params2 = {
businessCode: row.code
}
const res2 = await getBusinessFormByCode(params2)
this.dialogForm = {
...res2.data.leaseApplyInfo,
}
this.dialogList = res2.data.leaseApplyDetailsList
this.authorizeVisible = true
} catch (error) {
console.log('🚀 ~ handleAuthorize ~ error:', error)
@ -1333,6 +1527,13 @@ export default {
//
// this.materialReceivers = [];
},
// 2021-09-01 20210901
handleTimeFormat(time) {
if (time) {
return time.replace(/-/g, '年').replace(/-/g, '月') + '日'
}
return ''
},
}
}
</script>

View File

@ -88,13 +88,17 @@
<div style="width: 30%">审核人</div>
<div
style="width: 70%; display: flex; align-items: center; flex-wrap: wrap"
v-if="backApplyInfo.directAuditSignUrl"
v-if="backApplyInfo.approveSignList.length > 0"
>
<div
style="width: 80%; margin-left: 20px; height: 40px; transform: translateY(-30px)"
v-for="(item, index) in backApplyInfo.approveSignList"
:key="index"
>
<div style="width: 80%; margin-left: 10px">
<img
:src="backApplyInfo.directAuditSignUrl"
style="width: 40px; height: 100px"
:class="{ 'is-rotate': backApplyInfo.directAuditSignType == 0 }"
:src="item.outSignUrl"
style="width: 40px; height: 90px; max-width: 100%"
:style="{ transform: item.outSignType == 0 ? 'rotate(-90deg)' : '' }"
alt=""
/>
</div>
@ -202,13 +206,17 @@
<div style="width: 30%">审核人</div>
<div
style="width: 70%; display: flex; align-items: center; flex-wrap: wrap"
v-if="backApplyInfo.directAuditSignUrl"
v-if="backApplyInfo.approveSignList.length > 0"
>
<div
style="width: 80%; margin-left: 20px; height: 40px; transform: translateY(-30px)"
v-for="(item, index) in backApplyInfo.approveSignList"
:key="index"
>
<div style="width: 80%; margin-left: 10px">
<img
:src="backApplyInfo.directAuditSignUrl"
style="width: 40px; height: 100px"
:class="{ 'is-rotate': backApplyInfo.directAuditSignType == 0 }"
:src="item.outSignUrl"
style="width: 40px; height: 90px; max-width: 100%"
:style="{ transform: item.outSignType == 0 ? 'rotate(-90deg)' : '' }"
alt=""
/>
</div>