2f109134 by lihua

其它证明文件支持多个

1 parent 3ffb25c8
...@@ -751,9 +751,9 @@ const setFormItems = (info = null, setOther = true) => { ...@@ -751,9 +751,9 @@ const setFormItems = (info = null, setOther = true) => {
751 const datas = info ? JSON.parse(JSON.stringify(info)) : JSON.parse(JSON.stringify(flowDetail.value)); 751 const datas = info ? JSON.parse(JSON.stringify(info)) : JSON.parse(JSON.stringify(flowDetail.value));
752 contentFormItems.value.map((a, index) => { 752 contentFormItems.value.map((a, index) => {
753 a.disabled = !isEdit.value; 753 a.disabled = !isEdit.value;
754 if (a.field == 'abbreviation') { 754 if (a.field == 'tenantName') {
755 a.default = datas[a.field] || staffName; 755 a.default = datas[a.field] || staffName;
756 } else if (a.field == '') { 756 } else if (a.field == 'abbreviation') {
757 a.default = datas[a.field] || abbreviation; 757 a.default = datas[a.field] || abbreviation;
758 } else if (a.field == 'registeredCapital') { 758 } else if (a.field == 'registeredCapital') {
759 a.default = Number.isNaN(datas[a.field]) ? '' : datas[a.field]; 759 a.default = Number.isNaN(datas[a.field]) ? '' : datas[a.field];
......
...@@ -500,14 +500,13 @@ const formInfo = ref<any>({ ...@@ -500,14 +500,13 @@ const formInfo = ref<any>({
500 }, 500 },
501 { 501 {
502 label: '其它证明文件', 502 label: '其它证明文件',
503 tip: '支持扩展名:.png .pdf .rar .zip', 503 tip: '支持扩展名:.png .pdf',
504 accept: '.png, .pdf, .rar, .zip', 504 accept: '.png, .pdf',
505 type: 'upload-file', 505 type: 'upload-file',
506 placeholder: '请选择', 506 placeholder: '请选择',
507 field: 'productDetailInfo', 507 field: 'productDetailInfo',
508 // templateUrl: '', 508 // templateUrl: '',
509 default: [], 509 default: [],
510 limit: 1,
511 block: true, 510 block: true,
512 required: false, 511 required: false,
513 visible: true 512 visible: true
...@@ -802,10 +801,12 @@ const submitForm = (btn, formEl, tosub = false) => { ...@@ -802,10 +801,12 @@ const submitForm = (btn, formEl, tosub = false) => {
802 url: params.commitmentLetterInfo[0].url, 801 url: params.commitmentLetterInfo[0].url,
803 name: params.commitmentLetterInfo[0].name 802 name: params.commitmentLetterInfo[0].name
804 }] : []; 803 }] : [];
805 params.productDetail = params.productDetailInfo.length ? [{ 804 params.productDetail = params.productDetailInfo?.map(p => {
806 url: params.productDetailInfo[0].url, 805 return {
807 name: params.productDetailInfo[0].name 806 url: p.url,
808 }] : []; 807 name: p.name
808 }
809 }) || [];
809 // console.log(params, formInfo.value.items.at(3).defaultValue, formInfo.value, '-----------------'); 810 // console.log(params, formInfo.value.items.at(3).defaultValue, formInfo.value, '-----------------');
810 params.caseNumber = parseInt(params.caseNumber.replace(/,/g, ''), 10), 811 params.caseNumber = parseInt(params.caseNumber.replace(/,/g, ''), 10),
811 params.dataScale = parseInt(params.dataScale.replace(/,/g, ''), 10), 812 params.dataScale = parseInt(params.dataScale.replace(/,/g, ''), 10),
...@@ -843,10 +844,10 @@ const submitForm = (btn, formEl, tosub = false) => { ...@@ -843,10 +844,10 @@ const submitForm = (btn, formEl, tosub = false) => {
843 flowDetailLoading.value = false; 844 flowDetailLoading.value = false;
844 } 845 }
845 }).catch((res) => { 846 }).catch((res) => {
846 ElMessage({ 847 // ElMessage({
847 type: "error", 848 // type: "error",
848 message: '提交失败', 849 // message: '提交失败',
849 }); 850 // });
850 flowDetailLoading.value = false; 851 flowDetailLoading.value = false;
851 }); 852 });
852 } else { 853 } else {
...@@ -873,10 +874,10 @@ const submitForm = (btn, formEl, tosub = false) => { ...@@ -873,10 +874,10 @@ const submitForm = (btn, formEl, tosub = false) => {
873 flowDetailLoading.value = false; 874 flowDetailLoading.value = false;
874 } 875 }
875 }).catch((res) => { 876 }).catch((res) => {
876 ElMessage({ 877 // ElMessage({
877 type: "error", 878 // type: "error",
878 message: '提交失败', 879 // message: '提交失败',
879 }); 880 // });
880 flowDetailLoading.value = false; 881 flowDetailLoading.value = false;
881 }); 882 });
882 } 883 }
...@@ -1205,7 +1206,7 @@ onActivated(() => { ...@@ -1205,7 +1206,7 @@ onActivated(() => {
1205 tab.meta.title = `编辑-${damName}`; 1206 tab.meta.title = `编辑-${damName}`;
1206 break; 1207 break;
1207 case 'redit': 1208 case 'redit':
1208 tab.meta.title = `编辑-${damName}`; 1209 tab.meta.title = `上架编辑-${damName}`;
1209 break; 1210 break;
1210 case 'check': 1211 case 'check':
1211 tab.meta.title = `上架详情-${damName}`; 1212 tab.meta.title = `上架详情-${damName}`;
...@@ -2050,38 +2051,35 @@ const viewProductDetail = () => { ...@@ -2050,38 +2051,35 @@ const viewProductDetail = () => {
2050 <div class="file_item"> 2051 <div class="file_item">
2051 <span class="item_label">其它证明文件:</span> 2052 <span class="item_label">其它证明文件:</span>
2052 <span class="item_value"> 2053 <span class="item_value">
2054 <span v-for="productDetailItem in (flowDetail?.productDetail || [])" :style="{ 'padding-left': '0px', height: '32px', display: 'block' }">
2053 <div class="file-operate"> 2055 <div class="file-operate">
2054 <template v-if="flowDetail?.productDetail?.length > 0"> 2056 <template
2055 <template 2057 v-if="productDetailItem.name?.substring(productDetailItem.name.lastIndexOf('.') + 1).toLowerCase() === 'pdf'">
2056 v-if="flowDetail.productDetail[0].name?.substring(flowDetail.productDetail[0].name.lastIndexOf('.') + 1).toLowerCase() === 'pdf'">
2057 <img class="file-img" src="../../assets/images/PDF.png" /> 2058 <img class="file-img" src="../../assets/images/PDF.png" />
2058 </template> 2059 </template>
2059 <template 2060 <template
2060 v-else-if="flowDetail.productDetail[0].name?.substring(flowDetail.productDetail[0].name.lastIndexOf('.') + 1).toLowerCase() === 'png'"> 2061 v-else-if="productDetailItem.name?.substring(productDetailItem.name.lastIndexOf('.') + 1).toLowerCase() === 'png'">
2061 <img class="file-img" src="../../assets/images/png.png" /> 2062 <img class="file-img" src="../../assets/images/png.png" />
2062 </template> 2063 </template>
2063 <template 2064 <template
2064 v-else-if="['jpg', 'jpeg'].includes(flowDetail.productDetail[0].name?.substring(flowDetail.productDetail[0].name.lastIndexOf('.') + 1).toLowerCase())"> 2065 v-else-if="['jpg', 'jpeg'].includes(productDetailItem.name?.substring(productDetailItem.name.lastIndexOf('.') + 1).toLowerCase())">
2065 <img class="file-img" src="../../assets/images/jpg.png" /> 2066 <img class="file-img" src="../../assets/images/jpg.png" />
2066 </template> 2067 </template>
2067 <div class="file-name"><ellipsis-tooltip :content="flowDetail.productDetail[0].name ?? ''" 2068 <div class="file-name"><ellipsis-tooltip :content="productDetailItem.name ?? ''"
2068 class-name="w100f" refName="tooltipOver"></ellipsis-tooltip></div> 2069 class-name="w100f" refName="tooltipOver"></ellipsis-tooltip></div>
2069 <div 2070 <div
2070 v-if="['pdf', 'png', 'jpg', 'jpeg'].includes(flowDetail.productDetail[0].name?.substring(flowDetail.productDetail[0].name.lastIndexOf('.') + 1).toLowerCase())" 2071 v-if="['pdf', 'png', 'jpg', 'jpeg'].includes(productDetailItem.name?.substring(productDetailItem.name.lastIndexOf('.') + 1).toLowerCase())"
2071 :style="{ right: '36px' }" class="file-preview" 2072 :style="{ right: '36px' }" class="file-preview"
2072 @click="onUploadFilePreview(flowDetail.productDetail[0])"> 2073 @click="onUploadFilePreview(productDetailItem)">
2073 查看 2074 查看
2074 </div> 2075 </div>
2075 <div :style="{ right: '0px' }" class="file-preview" 2076 <div :style="{ right: '0px' }" class="file-preview"
2076 @click="onUploadFileDownload(flowDetail.productDetail[0])"> 2077 @click="onUploadFileDownload(productDetailItem)">
2077 下载 2078 下载
2078 </div> 2079 </div>
2079 </template>
2080 <template v-else>
2081 --
2082 </template>
2083 </div> 2080 </div>
2084 </span> 2081 </span>
2082 </span>
2085 </div> 2083 </div>
2086 </div> 2084 </div>
2087 2085
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!