|
|
|
@ -130,9 +130,9 @@ |
|
|
|
:close-on-click-modal="false" |
|
|
|
:showClose="false"> |
|
|
|
|
|
|
|
<el-tabs tab-position="left" type="border-card" v-model="activeName" style="width: 100%;height: 720px;"> |
|
|
|
<el-tabs tab-position="left" type="border-card" v-model="activeName" style="width: 100%;height: 730px;"> |
|
|
|
<el-tab-pane label="基本信息" name="basicInfo"> |
|
|
|
<div style="height: 705px; overflow-y: auto;"> |
|
|
|
<div style="height: 715px; overflow-y: auto;"> |
|
|
|
<el-form :inline="true" label-position="top" :model="modalData" style="margin-top: -5px;"> |
|
|
|
<el-form-item> |
|
|
|
<span style="cursor: pointer" v-if="!isLabFieldDisabled('applicant')" slot="label" @click="getBaseList(103, 1)"><a herf="#">申请人</a></span> |
|
|
|
@ -263,11 +263,26 @@ |
|
|
|
</el-table> |
|
|
|
</div> |
|
|
|
<el-form :inline="true" label-position="top" :model="modalData" style="margin-top: 5px"> |
|
|
|
<el-form-item label="判断标准" style="display: block;"> |
|
|
|
<el-input style="width: 780px"></el-input> |
|
|
|
<el-form-item style="display: block;"> |
|
|
|
<template slot="label"> |
|
|
|
<span class="judge-criteria-label" @click="openJudgeCriteriaDialog">判断标准</span> |
|
|
|
</template> |
|
|
|
<div class="judge-criteria-box" @click="openJudgeCriteriaDialog"> |
|
|
|
<template v-if="judgeCriteriaFileList.length > 0"> |
|
|
|
<el-link |
|
|
|
v-for="item in judgeCriteriaFileList" |
|
|
|
:key="item.id" |
|
|
|
type="primary" |
|
|
|
style="margin-right: 10px" |
|
|
|
@click.stop="previewJudgeCriteriaFile(item)"> |
|
|
|
{{ item.fileName }} |
|
|
|
</el-link> |
|
|
|
</template> |
|
|
|
<span v-else class="judge-criteria-placeholder">点击“判断标准”上传附件</span> |
|
|
|
</div> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
<el-form :inline="true" label-position="top" :model="modalData"> |
|
|
|
<el-form :inline="true" label-position="top" :model="modalData" style="margin-top: 15px"> |
|
|
|
<el-form-item label="注意事项" style="display: block;"> |
|
|
|
<el-input type="textarea" :rows="3" v-model="modalData.attention" :disabled="isLabFieldDisabled('attention')" resize="none" style="width: 780px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
@ -276,7 +291,7 @@ |
|
|
|
</el-tab-pane> |
|
|
|
|
|
|
|
<el-tab-pane label="结果信息" name="resultInfo"> |
|
|
|
<div style="height: 635px; overflow-y: auto;"> |
|
|
|
<div style="height: 715px; overflow-y: auto;"> |
|
|
|
<el-form :inline="true" label-position="top" :model="modalData" style="margin-top: -5px;"> |
|
|
|
<el-form-item label="测试开始时间/Test Start Date"> |
|
|
|
<el-date-picker v-model="modalData.testStartDate" type="date" value-format="yyyy-MM-dd" :disabled="isLabFieldDisabled('testStartDate')" style="width: 170px" :editable="false"></el-date-picker> |
|
|
|
@ -302,7 +317,7 @@ |
|
|
|
</el-tab-pane> |
|
|
|
|
|
|
|
<el-tab-pane label="审批信息-部门经理" name="departmentManagerInfo"> |
|
|
|
<div style="height: 635px; overflow-y: auto;"> |
|
|
|
<div style="height: 715px; overflow-y: auto;"> |
|
|
|
<el-form :inline="true" label-position="top" :model="modalData" style="margin-top: -5px;"> |
|
|
|
<el-form-item label="备注(部门经理)/Department Manager Comments" style="display: block;"> |
|
|
|
<el-input type="textarea" :rows="4" v-model="modalData.departmentManagerComments" :disabled="isLabFieldDisabled('departmentManagerComments')" resize="none" style="width: 780px"></el-input> |
|
|
|
@ -312,7 +327,7 @@ |
|
|
|
</el-tab-pane> |
|
|
|
|
|
|
|
<el-tab-pane label="审批信息-实验室" name="labInfo"> |
|
|
|
<div style="height: 635px; overflow-y: auto;"> |
|
|
|
<div style="height: 715px; overflow-y: auto;"> |
|
|
|
<el-form :inline="true" label-position="top" :model="modalData" style="margin-top: -5px;"> |
|
|
|
<el-form-item label="备注(实验室)/Lab Comments" style="display: block;"> |
|
|
|
<el-input type="textarea" :rows="4" v-model="modalData.labComments" :disabled="isLabFieldDisabled('labComments')" resize="none" style="width: 780px"></el-input> |
|
|
|
@ -411,6 +426,31 @@ |
|
|
|
</el-footer> |
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
<el-dialog |
|
|
|
title="判断标准附件" |
|
|
|
:close-on-click-modal="false" |
|
|
|
:visible.sync="judgeCriteriaDialogVisible" |
|
|
|
width="900px" |
|
|
|
v-drag |
|
|
|
@close="handleJudgeCriteriaDialogClose"> |
|
|
|
<oss-components |
|
|
|
ref="judgeCriteriaOss" |
|
|
|
:save-visible="authFileSave" |
|
|
|
:download-visible="authFileDownLoad" |
|
|
|
:remove-visible="authFileRemove" |
|
|
|
:preview-visible="authFilePreview" |
|
|
|
:disabled="showModalFlag || modalData.status === '已完成'" |
|
|
|
:row-click-select="true" |
|
|
|
label="序列号" |
|
|
|
:height="460" |
|
|
|
style="margin-top: 2px" |
|
|
|
:columns="judgeCriteriaFileColumnList" |
|
|
|
:order-ref1="modalData.site || ''" |
|
|
|
:order-ref2="modalData.referenceNo || ''" |
|
|
|
order-ref3="judgeCriteria"> |
|
|
|
</oss-components> |
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
<el-dialog title="选择-项目" :close-on-click-modal="false" @close="closeProjectInfoDialog" |
|
|
|
@open="searchProjectInfoList" :visible.sync="chooseProjectListFlag" width="35%"> |
|
|
|
<el-form label-position="top" :model="searchProjectData" ref="closeProjectInfoForm"> |
|
|
|
@ -467,6 +507,7 @@ |
|
|
|
<script> |
|
|
|
import * as api from '@/api/lab/lab' |
|
|
|
import { getSiteList } from '@/api/base/site' |
|
|
|
import { queryOss, previewOssFileById } from '@/api/oss/oss' |
|
|
|
import { checkSuperAdmin } from '@/api/changeManagement/changeManagement' |
|
|
|
import { verifyData } from '@/api/chooselist/chooselist.js' |
|
|
|
import { searchProjectInfoList } from '@/api/quotation/quotationInformation.js' |
|
|
|
@ -475,12 +516,14 @@ import { queryProjectByCustomer } from '@/api/project/project' |
|
|
|
import ChooseList from '@/views/modules/common/Chooselist' |
|
|
|
import DictDataSelect from '../sys/dict-data-select.vue' |
|
|
|
import ApprovalInformation from '../changeManagement/approvalInformation.vue' |
|
|
|
import ossComponents from '../oss/ossComponents.vue' |
|
|
|
|
|
|
|
export default { |
|
|
|
components: { |
|
|
|
ChooseList, |
|
|
|
DictDataSelect, |
|
|
|
ApprovalInformation |
|
|
|
ApprovalInformation, |
|
|
|
ossComponents |
|
|
|
}, |
|
|
|
data () { |
|
|
|
return { |
|
|
|
@ -511,6 +554,10 @@ export default { |
|
|
|
authIssue: false, |
|
|
|
authSubmit: false, |
|
|
|
authReject: false, |
|
|
|
authFileSave: false, |
|
|
|
authFileDownLoad: false, |
|
|
|
authFileRemove: false, |
|
|
|
authFilePreview: false, |
|
|
|
authDataEntry: false, |
|
|
|
superAdmin: false, |
|
|
|
createBy2: this.$store.state.user.name, |
|
|
|
@ -532,6 +579,58 @@ export default { |
|
|
|
tagNo: null, |
|
|
|
tagNo1: null, |
|
|
|
modalFlag: false, |
|
|
|
judgeCriteriaDialogVisible: false, |
|
|
|
judgeCriteriaFileList: [], |
|
|
|
judgeCriteriaFileColumnList: [ |
|
|
|
{ |
|
|
|
columnProp: 'fileName', |
|
|
|
headerAlign: 'center', |
|
|
|
align: 'center', |
|
|
|
columnLabel: '文件名称', |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: false, |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
columnWidth: 180 |
|
|
|
}, |
|
|
|
{ |
|
|
|
columnProp: 'fileRemark', |
|
|
|
headerAlign: 'center', |
|
|
|
align: 'center', |
|
|
|
columnLabel: '备注', |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: false, |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
columnWidth: 220 |
|
|
|
}, |
|
|
|
{ |
|
|
|
columnProp: 'createDate', |
|
|
|
headerAlign: 'center', |
|
|
|
align: 'center', |
|
|
|
columnLabel: '上传时间', |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: false, |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
columnWidth: 170 |
|
|
|
}, |
|
|
|
{ |
|
|
|
columnProp: 'createBy', |
|
|
|
headerAlign: 'center', |
|
|
|
align: 'center', |
|
|
|
columnLabel: '上传人', |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: false, |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
columnWidth: 140 |
|
|
|
} |
|
|
|
], |
|
|
|
siteOptions: [], |
|
|
|
chooseProjectListFlag: false, |
|
|
|
searchProjectData: { |
|
|
|
@ -685,6 +784,7 @@ export default { |
|
|
|
this.modalData.projectName = '' |
|
|
|
this.modalData.projectIdFlag = true |
|
|
|
this.$set(this.modalData, 'propertyItemList', []) |
|
|
|
this.judgeCriteriaFileList = [] |
|
|
|
this.searchProjectData.site = site |
|
|
|
}, |
|
|
|
loadNodeAuthority (site, stepId) { |
|
|
|
@ -758,6 +858,105 @@ export default { |
|
|
|
} |
|
|
|
return value || '' |
|
|
|
}, |
|
|
|
resolvePreviewContentType (fileType) { |
|
|
|
const lower = String(fileType || '').toLowerCase() |
|
|
|
if (!lower) { |
|
|
|
return '' |
|
|
|
} |
|
|
|
if (['jpg', 'jpeg', 'png', 'gif', 'bmp', 'webp'].includes(lower)) { |
|
|
|
return 'image/' + lower |
|
|
|
} |
|
|
|
if (['mp4', 'avi', 'mov', 'wmv', 'flv'].includes(lower)) { |
|
|
|
return 'video/' + lower |
|
|
|
} |
|
|
|
if (lower === 'txt') { |
|
|
|
return 'text/plain;charset=utf-8' |
|
|
|
} |
|
|
|
if (lower === 'pdf') { |
|
|
|
return 'application/pdf;charset=UTF-8' |
|
|
|
} |
|
|
|
if (['xls', 'xlsx', 'docx'].includes(lower)) { |
|
|
|
return lower |
|
|
|
} |
|
|
|
return '' |
|
|
|
}, |
|
|
|
refreshJudgeCriteriaOssTable () { |
|
|
|
const ref = this.$refs.judgeCriteriaOss |
|
|
|
if (ref && typeof ref.handleQuery === 'function') { |
|
|
|
ref.handleQuery() |
|
|
|
} |
|
|
|
}, |
|
|
|
refreshJudgeCriteriaFileList () { |
|
|
|
if (!this.modalData.site || !this.modalData.referenceNo) { |
|
|
|
this.judgeCriteriaFileList = [] |
|
|
|
return Promise.resolve() |
|
|
|
} |
|
|
|
const params = { |
|
|
|
orderRef1: this.modalData.site, |
|
|
|
orderRef2: this.modalData.referenceNo, |
|
|
|
orderRef3: 'judgeCriteria' |
|
|
|
} |
|
|
|
return queryOss(params).then(({data}) => { |
|
|
|
if (data && data.code === 0 && Array.isArray(data.rows)) { |
|
|
|
this.judgeCriteriaFileList = data.rows |
|
|
|
} else { |
|
|
|
this.judgeCriteriaFileList = [] |
|
|
|
} |
|
|
|
}).catch(() => { |
|
|
|
this.judgeCriteriaFileList = [] |
|
|
|
}) |
|
|
|
}, |
|
|
|
openJudgeCriteriaDialog () { |
|
|
|
if (!this.modalData.site) { |
|
|
|
this.$message.warning('请先选择申请工厂') |
|
|
|
return |
|
|
|
} |
|
|
|
if (!this.modalData.referenceNo) { |
|
|
|
this.$message.warning('单据编号为空,无法上传附件') |
|
|
|
return |
|
|
|
} |
|
|
|
this.judgeCriteriaDialogVisible = true |
|
|
|
this.refreshJudgeCriteriaFileList() |
|
|
|
this.$nextTick(() => { |
|
|
|
this.refreshJudgeCriteriaOssTable() |
|
|
|
}) |
|
|
|
}, |
|
|
|
handleJudgeCriteriaDialogClose () { |
|
|
|
this.refreshJudgeCriteriaFileList() |
|
|
|
}, |
|
|
|
previewJudgeCriteriaFile (row) { |
|
|
|
if (!this.authFilePreview) { |
|
|
|
this.$message.warning('没有附件预览权限') |
|
|
|
return |
|
|
|
} |
|
|
|
if (!row || !row.id) { |
|
|
|
this.$message.warning('附件不存在,无法预览') |
|
|
|
return |
|
|
|
} |
|
|
|
const type = this.resolvePreviewContentType(row.fileType) |
|
|
|
if (!type) { |
|
|
|
this.$message.warning('该文件格式暂不支持预览') |
|
|
|
return |
|
|
|
} |
|
|
|
previewOssFileById({ id: row.id }).then(({data}) => { |
|
|
|
const blob = new Blob([data], { type: type }) |
|
|
|
const fileURL = URL.createObjectURL(blob) |
|
|
|
if (type === 'xls' || type === 'xlsx' || type === 'docx') { |
|
|
|
const { href } = this.$router.resolve({ |
|
|
|
name: 'pre', |
|
|
|
query: { |
|
|
|
src: fileURL, |
|
|
|
type: type |
|
|
|
} |
|
|
|
}) |
|
|
|
window.open(href, '_blank') |
|
|
|
} else { |
|
|
|
window.open(fileURL, '_blank') |
|
|
|
} |
|
|
|
}).catch(() => { |
|
|
|
this.$message.error('文件预览失败') |
|
|
|
}) |
|
|
|
}, |
|
|
|
resolvePropertyDefaultValue (item) { |
|
|
|
if (item && item.defaultValue !== null && item.defaultValue !== undefined && String(item.defaultValue).trim() !== '') { |
|
|
|
return String(item.defaultValue).trim() |
|
|
|
@ -995,6 +1194,10 @@ export default { |
|
|
|
this.authIssue = this.isAuth(this.menuId + ':issue') |
|
|
|
this.authSubmit = this.isAuth(this.menuId + ':submit') |
|
|
|
this.authReject = this.isAuth(this.menuId + ':reject') |
|
|
|
this.authFileSave = this.isAuth(this.menuId + ':fileSave') |
|
|
|
this.authFileDownLoad = this.isAuth(this.menuId + ':fileDownLoad') |
|
|
|
this.authFileRemove = this.isAuth(this.menuId + ':fileRemove') |
|
|
|
this.authFilePreview = this.isAuth(this.menuId + ':filePreview') |
|
|
|
this.authDataEntry = this.isAuth(this.menuId + ':dataEntry') |
|
|
|
}, |
|
|
|
checkSuperAdmin () { |
|
|
|
@ -1219,9 +1422,11 @@ export default { |
|
|
|
this.$set(this.modalData, 'csProcessControl', 'N') |
|
|
|
this.loadModalButtonCondition() |
|
|
|
this.loadNodeAuthority(this.modalData.site || row.site, this.modalData.stepId !== null && this.modalData.stepId !== undefined ? this.modalData.stepId : 10) |
|
|
|
this.refreshJudgeCriteriaFileList() |
|
|
|
} |
|
|
|
}).catch(() => { |
|
|
|
this.loadNodeAuthority(row.site, row.stepId !== null && row.stepId !== undefined ? row.stepId : 10) |
|
|
|
this.judgeCriteriaFileList = [] |
|
|
|
}) |
|
|
|
} else { |
|
|
|
this.modalTitle = 'Lab 新增' |
|
|
|
@ -1245,6 +1450,7 @@ export default { |
|
|
|
} |
|
|
|
this.$set(this.modalData, 'propertyItemList', []) |
|
|
|
this.$set(this.modalData, 'testerList', []) |
|
|
|
this.judgeCriteriaFileList = [] |
|
|
|
this.searchProjectData.site = defaultSite |
|
|
|
this.nodeAuthorityLoaded = true |
|
|
|
this.loadNodeAuthority(this.modalData.site, 10) |
|
|
|
@ -1273,6 +1479,7 @@ export default { |
|
|
|
}) |
|
|
|
}, |
|
|
|
handleModalClose () { |
|
|
|
this.judgeCriteriaDialogVisible = false |
|
|
|
this.modalFlag = false |
|
|
|
}, |
|
|
|
buildLabPayload (source) { |
|
|
|
@ -1567,4 +1774,26 @@ export default { |
|
|
|
.mod-config /deep/ .el-tabs--border-card > .el-tabs__content { |
|
|
|
padding-top: 8px; |
|
|
|
} |
|
|
|
|
|
|
|
.judge-criteria-label { |
|
|
|
color: #409EFF; |
|
|
|
text-decoration: underline; |
|
|
|
cursor: pointer; |
|
|
|
font-weight: 600; |
|
|
|
} |
|
|
|
|
|
|
|
.judge-criteria-box { |
|
|
|
width: 780px; |
|
|
|
min-height: 38px; |
|
|
|
border: 1px solid #DCDFE6; |
|
|
|
border-radius: 4px; |
|
|
|
padding: 8px 10px; |
|
|
|
box-sizing: border-box; |
|
|
|
cursor: pointer; |
|
|
|
background: #fff; |
|
|
|
} |
|
|
|
|
|
|
|
.judge-criteria-placeholder { |
|
|
|
color: #C0C4CC; |
|
|
|
} |
|
|
|
</style> |