其它证明文件支持多个
Showing
2 changed files
with
28 additions
and
30 deletions
| ... | @@ -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]; | ... | ... |
| ... | @@ -496,14 +496,13 @@ const formInfo = ref<any>({ | ... | @@ -496,14 +496,13 @@ const formInfo = ref<any>({ |
| 496 | }, | 496 | }, |
| 497 | { | 497 | { |
| 498 | label: '其它证明文件', | 498 | label: '其它证明文件', |
| 499 | tip: '支持扩展名:.png .pdf .rar .zip', | 499 | tip: '支持扩展名:.png .pdf', |
| 500 | accept: '.png, .pdf, .rar, .zip', | 500 | accept: '.png, .pdf', |
| 501 | type: 'upload-file', | 501 | type: 'upload-file', |
| 502 | placeholder: '请选择', | 502 | placeholder: '请选择', |
| 503 | field: 'productDetailInfo', | 503 | field: 'productDetailInfo', |
| 504 | // templateUrl: '', | 504 | // templateUrl: '', |
| 505 | default: [], | 505 | default: [], |
| 506 | limit: 1, | ||
| 507 | block: true, | 506 | block: true, |
| 508 | required: false, | 507 | required: false, |
| 509 | visible: true | 508 | visible: true |
| ... | @@ -798,10 +797,12 @@ const submitForm = (btn, formEl, tosub = false) => { | ... | @@ -798,10 +797,12 @@ const submitForm = (btn, formEl, tosub = false) => { |
| 798 | url: params.commitmentLetterInfo[0].url, | 797 | url: params.commitmentLetterInfo[0].url, |
| 799 | name: params.commitmentLetterInfo[0].name | 798 | name: params.commitmentLetterInfo[0].name |
| 800 | }] : []; | 799 | }] : []; |
| 801 | params.productDetail = params.productDetailInfo.length ? [{ | 800 | params.productDetail = params.productDetailInfo?.map(p => { |
| 802 | url: params.productDetailInfo[0].url, | 801 | return { |
| 803 | name: params.productDetailInfo[0].name | 802 | url: p.url, |
| 804 | }] : []; | 803 | name: p.name |
| 804 | } | ||
| 805 | }) || []; | ||
| 805 | // console.log(params, formInfo.value.items.at(3).defaultValue, formInfo.value, '-----------------'); | 806 | // console.log(params, formInfo.value.items.at(3).defaultValue, formInfo.value, '-----------------'); |
| 806 | params.caseNumber = parseInt(params.caseNumber.replace(/,/g, ''), 10), | 807 | params.caseNumber = parseInt(params.caseNumber.replace(/,/g, ''), 10), |
| 807 | params.dataScale = parseInt(params.dataScale.replace(/,/g, ''), 10), | 808 | params.dataScale = parseInt(params.dataScale.replace(/,/g, ''), 10), |
| ... | @@ -839,10 +840,10 @@ const submitForm = (btn, formEl, tosub = false) => { | ... | @@ -839,10 +840,10 @@ const submitForm = (btn, formEl, tosub = false) => { |
| 839 | flowDetailLoading.value = false; | 840 | flowDetailLoading.value = false; |
| 840 | } | 841 | } |
| 841 | }).catch((res) => { | 842 | }).catch((res) => { |
| 842 | ElMessage({ | 843 | // ElMessage({ |
| 843 | type: "error", | 844 | // type: "error", |
| 844 | message: '提交失败', | 845 | // message: '提交失败', |
| 845 | }); | 846 | // }); |
| 846 | flowDetailLoading.value = false; | 847 | flowDetailLoading.value = false; |
| 847 | }); | 848 | }); |
| 848 | } else { | 849 | } else { |
| ... | @@ -869,10 +870,10 @@ const submitForm = (btn, formEl, tosub = false) => { | ... | @@ -869,10 +870,10 @@ const submitForm = (btn, formEl, tosub = false) => { |
| 869 | flowDetailLoading.value = false; | 870 | flowDetailLoading.value = false; |
| 870 | } | 871 | } |
| 871 | }).catch((res) => { | 872 | }).catch((res) => { |
| 872 | ElMessage({ | 873 | // ElMessage({ |
| 873 | type: "error", | 874 | // type: "error", |
| 874 | message: '提交失败', | 875 | // message: '提交失败', |
| 875 | }); | 876 | // }); |
| 876 | flowDetailLoading.value = false; | 877 | flowDetailLoading.value = false; |
| 877 | }); | 878 | }); |
| 878 | } | 879 | } |
| ... | @@ -1326,7 +1327,7 @@ onActivated(() => { | ... | @@ -1326,7 +1327,7 @@ onActivated(() => { |
| 1326 | tab.meta.title = `编辑-${damName}`; | 1327 | tab.meta.title = `编辑-${damName}`; |
| 1327 | break; | 1328 | break; |
| 1328 | case 'redit': | 1329 | case 'redit': |
| 1329 | tab.meta.title = `编辑-${damName}`; | 1330 | tab.meta.title = `上架编辑-${damName}`; |
| 1330 | break; | 1331 | break; |
| 1331 | case 'check': | 1332 | case 'check': |
| 1332 | tab.meta.title = `上架详情-${damName}`; | 1333 | tab.meta.title = `上架详情-${damName}`; |
| ... | @@ -2106,38 +2107,35 @@ const viewProductDetail = () => { | ... | @@ -2106,38 +2107,35 @@ const viewProductDetail = () => { |
| 2106 | <div class="file_item"> | 2107 | <div class="file_item"> |
| 2107 | <span class="item_label">其它证明文件:</span> | 2108 | <span class="item_label">其它证明文件:</span> |
| 2108 | <span class="item_value"> | 2109 | <span class="item_value"> |
| 2110 | <span v-for="productDetailItem in (flowDetail?.productDetail || [])" :style="{ 'padding-left': '0px', height: '32px', display: 'block' }"> | ||
| 2109 | <div class="file-operate"> | 2111 | <div class="file-operate"> |
| 2110 | <template v-if="flowDetail?.productDetail?.length > 0"> | ||
| 2111 | <template | 2112 | <template |
| 2112 | v-if="flowDetail.productDetail[0].name?.substring(flowDetail.productDetail[0].name.lastIndexOf('.') + 1).toLowerCase() === 'pdf'"> | 2113 | v-if="productDetailItem.name?.substring(productDetailItem.name.lastIndexOf('.') + 1).toLowerCase() === 'pdf'"> |
| 2113 | <img class="file-img" src="../../assets/images/PDF.png" /> | 2114 | <img class="file-img" src="../../assets/images/PDF.png" /> |
| 2114 | </template> | 2115 | </template> |
| 2115 | <template | 2116 | <template |
| 2116 | v-else-if="flowDetail.productDetail[0].name?.substring(flowDetail.productDetail[0].name.lastIndexOf('.') + 1).toLowerCase() === 'png'"> | 2117 | v-else-if="productDetailItem.name?.substring(productDetailItem.name.lastIndexOf('.') + 1).toLowerCase() === 'png'"> |
| 2117 | <img class="file-img" src="../../assets/images/png.png" /> | 2118 | <img class="file-img" src="../../assets/images/png.png" /> |
| 2118 | </template> | 2119 | </template> |
| 2119 | <template | 2120 | <template |
| 2120 | v-else-if="['jpg', 'jpeg'].includes(flowDetail.productDetail[0].name?.substring(flowDetail.productDetail[0].name.lastIndexOf('.') + 1).toLowerCase())"> | 2121 | v-else-if="['jpg', 'jpeg'].includes(productDetailItem.name?.substring(productDetailItem.name.lastIndexOf('.') + 1).toLowerCase())"> |
| 2121 | <img class="file-img" src="../../assets/images/jpg.png" /> | 2122 | <img class="file-img" src="../../assets/images/jpg.png" /> |
| 2122 | </template> | 2123 | </template> |
| 2123 | <div class="file-name"><ellipsis-tooltip :content="flowDetail.productDetail[0].name ?? ''" | 2124 | <div class="file-name"><ellipsis-tooltip :content="productDetailItem.name ?? ''" |
| 2124 | class-name="w100f" refName="tooltipOver"></ellipsis-tooltip></div> | 2125 | class-name="w100f" refName="tooltipOver"></ellipsis-tooltip></div> |
| 2125 | <div | 2126 | <div |
| 2126 | v-if="['pdf', 'png', 'jpg', 'jpeg'].includes(flowDetail.productDetail[0].name?.substring(flowDetail.productDetail[0].name.lastIndexOf('.') + 1).toLowerCase())" | 2127 | v-if="['pdf', 'png', 'jpg', 'jpeg'].includes(productDetailItem.name?.substring(productDetailItem.name.lastIndexOf('.') + 1).toLowerCase())" |
| 2127 | :style="{ right: '36px' }" class="file-preview" | 2128 | :style="{ right: '36px' }" class="file-preview" |
| 2128 | @click="onUploadFilePreview(flowDetail.productDetail[0])"> | 2129 | @click="onUploadFilePreview(productDetailItem)"> |
| 2129 | 查看 | 2130 | 查看 |
| 2130 | </div> | 2131 | </div> |
| 2131 | <div :style="{ right: '0px' }" class="file-preview" | 2132 | <div :style="{ right: '0px' }" class="file-preview" |
| 2132 | @click="onUploadFileDownload(flowDetail.productDetail[0])"> | 2133 | @click="onUploadFileDownload(productDetailItem)"> |
| 2133 | 下载 | 2134 | 下载 |
| 2134 | </div> | 2135 | </div> |
| 2135 | </template> | ||
| 2136 | <template v-else> | ||
| 2137 | -- | ||
| 2138 | </template> | ||
| 2139 | </div> | 2136 | </div> |
| 2140 | </span> | 2137 | </span> |
| 2138 | </span> | ||
| 2141 | </div> | 2139 | </div> |
| 2142 | </div> | 2140 | </div> |
| 2143 | 2141 | ... | ... |
-
Please register or sign in to post a comment