e4afe105 by lihua

添加产品上架证明文件

1 parent 3af14033
......@@ -418,11 +418,11 @@ const tableBtnClick = (scope, btn) => {
if (res.data) {
approveSuggest.value = '';
dynamicPlaceholder.value = '请填写通过理由(选填)';
if (listingFormRef.value) {
clearFormValues(listingFormRef.value.formInline);
listingFormRef.value.ruleFormRef.clearValidate(formInfo.value.items.map(item => item.field))
listingFormRef.value.ruleFormRef.resetFields(formInfo.value.items.map(item => item.field))
}
// if (listingFormRef.value) {
// clearFormValues(listingFormRef.value.formInline);
// listingFormRef.value.ruleFormRef.clearValidate(formInfo.value.items.map(item => item.field))
// listingFormRef.value.ruleFormRef.resetFields(formInfo.value.items.map(item => item.field))
// }
approveType.value = 'pass';
dialogTitle.value = '通过流程'
......@@ -449,11 +449,11 @@ const tableBtnClick = (scope, btn) => {
if (res.data) {
approveSuggest.value = '';
dynamicPlaceholder.value = '请填写驳回理由(必填)';
if (listingFormRef.value) {
clearFormValues(listingFormRef.value.formInline);
listingFormRef.value.ruleFormRef.clearValidate(formInfo.value.items.map(item => item.field))
listingFormRef.value.ruleFormRef.resetFields(formInfo.value.items.map(item => item.field))
}
// if (listingFormRef.value) {
// clearFormValues(listingFormRef.value.formInline);
// listingFormRef.value.ruleFormRef.clearValidate(formInfo.value.items.map(item => item.field))
// listingFormRef.value.ruleFormRef.resetFields(formInfo.value.items.map(item => item.field))
// }
approveType.value = 'reject';
dialogTitle.value = '驳回流程'
dialogVisible.value = true;
......@@ -521,23 +521,13 @@ const clearFormValues = (formInline) => {
const dynamicPlaceholder = ref('请填写通过理由(选填)');
const passSubmit = () => {
let row = currTableData.value
listingFormRef.value.ruleFormRef.validate().then((valid) => {
if (valid) {
let complianceInfoMap = {}
formInfo.value.items.forEach((item) => {
assetsSafeInfo.value.forEach((item1) => {
if (item.label == item1.label) {
complianceInfoMap[item1.value] = listingFormRef.value.formInline[item.field];
}
})
})
dialogBtnLoading.value = true;
productRejectFlowData({
guid: row.approveVO.approveGuid,
flowType: row.approveVO.flowType,
approveSuggest: approveSuggest.value,
approveStaffGuid: userData.staffGuid,
complianceInfoMap: complianceInfoMap,
complianceInfoMap: {},
approveState: 'Y',
bizGuid: row.approveVO.bizGuid
}, row.tenantGuid).then((res: any) => {
......@@ -551,32 +541,18 @@ const passSubmit = () => {
ElMessage.error(res.msg)
}
})
}
})
}
const listingFormRef = ref<any>();
const rejectSubmit = async () => {
if (!approveSuggest.value) return ElMessage.error('请填写驳回理由!')
let row = currTableData.value
console.log(row, '--------')
listingFormRef.value.ruleFormRef.validate().then((valid) => {
if (valid) {
let complianceInfoMap = {}
formInfo.value.items.forEach((item) => {
assetsSafeInfo.value.forEach((item1) => {
if (item.label == item1.label) {
complianceInfoMap[item1.value] = listingFormRef.value.formInline[item.field];
}
})
})
dialogBtnLoading.value = true;
productRejectFlowData({
guid: row.approveVO.approveGuid,
flowType: row.approveVO.flowType,
approveSuggest: approveSuggest.value,
approveStaffGuid: userData.staffGuid,
complianceInfoMap: complianceInfoMap,
complianceInfoMap: {},
bizGuid: row.approveVO.bizGuid,
approveState: 'R'
}, row.tenantGuid).then((res: any) => {
......@@ -590,8 +566,6 @@ const rejectSubmit = async () => {
ElMessage.error(res.msg)
}
})
}
})
}
const tablePageChange = (info) => {
......@@ -666,119 +640,6 @@ const cardBtnClick = (item) => {
getTableData(item.exchangeGuid);
}
const formInfo = ref<any>({
id: 'check-form',
col: 'col2',
items: [
// radio 单选框
{
type: 'radio-group',
label: '是否遵守隐私法律和数据保护法规',
field: 'isPublicData1',
default: '',
required: true,
options: [
{ label: '是', value: 'Y' },
{ label: '否', value: 'N' },
],
},
// radio 单选框
{
type: 'radio-group',
label: '不存在侵犯他人版权的信息',
field: 'isPublicData2',
default: '',
required: true,
options: [
{ label: '是', value: 'Y' },
{ label: '否', value: 'N' },
],
},
// 是否符合研究伦理
{
type: 'radio-group',
label: '是否符合研究伦理',
field: 'isPublicData3',
default: '',
required: true,
options: [
{ label: '是', value: 'Y' },
{ label: '否', value: 'N' },
],
},
//是否遵守道德标准
{
type: 'radio-group',
label: '是否遵守道德标准',
field: 'isPublicData4',
default: '',
required: true,
options: [
{ label: '是', value: 'Y' },
{ label: '否', value: 'N' },
],
},
//数据来源是否合规
{
type: 'radio-group',
label: '数据来源是否合规',
field: 'isPublicData5',
default: '',
required: true,
options: [
{ label: '是', value: 'Y' },
{ label: '否', value: 'N' },
],
},
//相关文档审查是否合规
{
type: 'radio-group',
label: '相关文档审查是否合规',
field: 'isPublicData6',
default: '',
required: true,
options: [
{ label: '是', value: 'Y' },
{ label: '否', value: 'N' },
],
},
//是否符合国家标准及要求
{
type: 'radio-group',
label: '是否符合国家标准及要求',
field: 'isPublicData7',
default: '',
required: true,
options: [
{ label: '是', value: 'Y' },
{ label: '否', value: 'N' },
],
},
//数据内容是否合规
{
type: 'radio-group',
label: '数据内容是否合规',
field: 'isPublicData8',
default: '',
required: true,
options: [
{ label: '是', value: 'Y' },
{ label: '否', value: 'N' },
],
},
],
rules: {
isPublicData1: [{ required: true, message: '请选择是否遵守隐私法律和数据保护法规', trigger: 'change' }],
isPublicData2: [{ required: true, message: '请选择是否存在侵犯他人版权的信息', trigger: 'change' }],
isPublicData3: [{ required: true, message: '请选择是否符合研究伦理', trigger: 'change' }],
isPublicData4: [{ required: true, message: '请选择是否遵守道德标准', trigger: 'change' }],
isPublicData5: [{ required: true, message: '请选择数据来源是否合规', trigger: 'change' }],
isPublicData6: [{ required: true, message: '请选择相关文档审查是否合规', trigger: 'change' }],
isPublicData7: [{ required: true, message: '请选择是否符合国家标准及要求', trigger: 'change' }],
isPublicData8: [{ required: true, message: '请选择数据内容是否合规', trigger: 'change' }],
}
})
const passCommonDialogInfo = ref({
visible: false,
size: 460,
......
......@@ -704,9 +704,9 @@ const getProductDetail = async () => {
// if (res.data.commitmentLetter && res.data.commitmentLetter.length) {
// flowDetail.value.commitmentLetter = { name: res.data.commitmentLetter[0].name, url: res.data.commitmentLetter[0].url }
// }
if (res.data.accreditFile && res.data.accreditFile.length) {
flowDetail.value.accreditFile = { name: res.data.accreditFile[0].name, url: res.data.accreditFile[0].url }
}
// if (res.data.accreditFile && res.data.accreditFile.length) {
// flowDetail.value.accreditFile = { name: res.data.accreditFile[0].name, url: res.data.accreditFile[0].url }
// }
// if (res.data.productDetail && res.data.productDetail.length) {
// flowDetail.value.productDetail = { name: res.data.productDetail[0].name, url: res.data.productDetail[0].url }
// }
......@@ -790,13 +790,28 @@ const submitForm = (btn, formEl, tosub = false) => {
delete params.productImgList;
params.coverageArea = subForm.value.coverageAreas == 'Y' ? [['all']] : subForm.value.coverageArea;
params.productPic = subForm.value.productImg.length ? { name: subForm.value.productImg[0].name, url: subForm.value.productImg[0].url } : {};
console.log(params, formInfo.value.items.at(3).defaultValue, formInfo.value, '-----------------');
params.accreditFile = params.accreditFileInfo.length ? [{
url: params.accreditFileInfo[0].url,
name: params.accreditFileInfo[0].name
}] : '';
params.commitmentLetter = params.commitmentLetterInfo.length ? [{
url: params.commitmentLetterInfo[0].url,
name: params.commitmentLetterInfo[0].name
}] : [];
params.productDetail = params.productDetailInfo.length ? [{
url: params.productDetailInfo[0].url,
name: params.productDetailInfo[0].name
}] : [];
// console.log(params, formInfo.value.items.at(3).defaultValue, formInfo.value, '-----------------');
params.caseNumber = parseInt(params.caseNumber.replace(/,/g, ''), 10),
params.dataScale = parseInt(params.dataScale.replace(/,/g, ''), 10),
params.timeAreaStart = params.dateRange ? params.dateRange[0] : '';
params.timeAreaEnd = params.dateRange ? params.dateRange[1] : '';
// 删除dateRange字段
delete params.dateRange;
delete params.accreditFileInfo;
delete params.commitmentLetterInfo;
delete params.productDetailInfo;
params.foundMode = currProductInfo.value?.foundMode || flowDetail.value.foundMode;
params.productCode = currProductInfo.value?.productCode || flowDetail.value.productCode;
flowDetailLoading.value = true;
......@@ -2010,6 +2025,122 @@ const viewProductDetail = () => {
<span class="item_value">--</span>
</div>
</div>
<div class="list_item is_block">
<div class="file_item" >
<span class="item_label">承诺函:</span>
<span class="item_value">
<div class="file-operate">
<template v-if="flowDetail?.commitmentLetter?.length > 0">
<template
v-if="flowDetail.commitmentLetter[0].name?.substring(flowDetail.commitmentLetter[0].name.lastIndexOf('.') + 1).toLowerCase() === 'pdf'">
<img class="file-img" src="../../assets/images/PDF.png" />
</template>
<template
v-else-if="flowDetail.commitmentLetter[0].name?.substring(flowDetail.commitmentLetter[0].name.lastIndexOf('.') + 1).toLowerCase() === 'png'">
<img class="file-img" src="../../assets/images/png.png" />
</template>
<template
v-else-if="['jpg', 'jpeg'].includes(flowDetail.commitmentLetter[0].name?.substring(flowDetail.commitmentLetter[0].name.lastIndexOf('.') + 1).toLowerCase())">
<img class="file-img" src="../../assets/images/jpg.png" />
</template>
<div class="file-name"><ellipsis-tooltip :content="flowDetail.commitmentLetter[0].name ?? ''"
class-name="w100f" refName="tooltipOver"></ellipsis-tooltip></div>
<div
v-if="['pdf', 'png', 'jpg', 'jpeg'].includes(flowDetail.commitmentLetter[0].name?.substring(flowDetail.commitmentLetter[0].name.lastIndexOf('.') + 1).toLowerCase())"
:style="{ right: '36px' }" class="file-preview"
@click="onUploadFilePreview(flowDetail.commitmentLetter[0])">
查看
</div>
<div :style="{ right: '0px' }" class="file-preview"
@click="onUploadFileDownload(flowDetail.commitmentLetter[0])">
下载
</div>
</template>
<template v-else>
--
</template>
</div>
</span>
</div>
</div>
<div class="list_item is_block">
<div class="file_item" >
<span class="item_label">授权文件:</span>
<span class="item_value">
<div class="file-operate">
<template v-if="flowDetail?.accreditFile?.length > 0">
<template
v-if="flowDetail.accreditFile[0].name?.substring(flowDetail.accreditFile[0].name.lastIndexOf('.') + 1).toLowerCase() === 'pdf'">
<img class="file-img" src="../../assets/images/PDF.png" />
</template>
<template
v-else-if="flowDetail.accreditFile[0].name?.substring(flowDetail.accreditFile[0].name.lastIndexOf('.') + 1).toLowerCase() === 'png'">
<img class="file-img" src="../../assets/images/png.png" />
</template>
<template
v-else-if="['jpg', 'jpeg'].includes(flowDetail.accreditFile[0].name?.substring(flowDetail.accreditFile[0].name.lastIndexOf('.') + 1).toLowerCase())">
<img class="file-img" src="../../assets/images/jpg.png" />
</template>
<div class="file-name"><ellipsis-tooltip :content="flowDetail.accreditFile[0].name ?? ''"
class-name="w100f" refName="tooltipOver"></ellipsis-tooltip></div>
<div
v-if="['pdf', 'png', 'jpg', 'jpeg'].includes(flowDetail.accreditFile[0].name?.substring(flowDetail.accreditFile[0].name.lastIndexOf('.') + 1).toLowerCase())"
:style="{ right: '36px' }" class="file-preview"
@click="onUploadFilePreview(flowDetail.accreditFile[0])">
查看
</div>
<div :style="{ right: '0px' }" class="file-preview"
@click="onUploadFileDownload(flowDetail.accreditFile[0])">
下载
</div>
</template>
<template v-else>
--
</template>
</div>
</span>
</div>
</div>
<div class="list_item is_block" v-if="flowDetail?.productDetail?.length > 0">
<div class="file_item">
<span class="item_label">其它证明文件:</span>
<span class="item_value">
<div class="file-operate">
<template v-if="flowDetail?.productDetail?.length > 0">
<template
v-if="flowDetail.productDetail[0].name?.substring(flowDetail.productDetail[0].name.lastIndexOf('.') + 1).toLowerCase() === 'pdf'">
<img class="file-img" src="../../assets/images/PDF.png" />
</template>
<template
v-else-if="flowDetail.productDetail[0].name?.substring(flowDetail.productDetail[0].name.lastIndexOf('.') + 1).toLowerCase() === 'png'">
<img class="file-img" src="../../assets/images/png.png" />
</template>
<template
v-else-if="['jpg', 'jpeg'].includes(flowDetail.productDetail[0].name?.substring(flowDetail.productDetail[0].name.lastIndexOf('.') + 1).toLowerCase())">
<img class="file-img" src="../../assets/images/jpg.png" />
</template>
<div class="file-name"><ellipsis-tooltip :content="flowDetail.productDetail[0].name ?? ''"
class-name="w100f" refName="tooltipOver"></ellipsis-tooltip></div>
<div
v-if="['pdf', 'png', 'jpg', 'jpeg'].includes(flowDetail.productDetail[0].name?.substring(flowDetail.productDetail[0].name.lastIndexOf('.') + 1).toLowerCase())"
:style="{ right: '36px' }" class="file-preview"
@click="onUploadFilePreview(flowDetail.productDetail[0])">
查看
</div>
<div :style="{ right: '0px' }" class="file-preview"
@click="onUploadFileDownload(flowDetail.productDetail[0])">
下载
</div>
</template>
<template v-else>
--
</template>
</div>
</span>
</div>
</div>
</div>
</div>
</div>
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!