|
@@ -271,12 +271,14 @@
|
|
|
|
|
|
<script setup>
|
|
|
import { NumberToChinese } from "@/utils/util.js";
|
|
|
+import { async } from "@antv/x6/lib/registry/marker/main";
|
|
|
import { watch } from "vue";
|
|
|
const { proxy } = getCurrentInstance();
|
|
|
const pdfData = ref({});
|
|
|
const props = defineProps({
|
|
|
rowData: Object,
|
|
|
});
|
|
|
+
|
|
|
const getPdfData = (query) => {
|
|
|
proxy.post("/contract/getContractPdfInfo", query).then((res) => {
|
|
|
pdfData.value = res;
|
|
@@ -296,8 +298,11 @@ const getPdfData = (query) => {
|
|
|
fileType: 1,
|
|
|
})
|
|
|
.then((fileObj) => {
|
|
|
- pdfData.value.companyPic =
|
|
|
- fileObj[pdfData.value.sellCorporationId][0].fileUrl;
|
|
|
+ proxy
|
|
|
+ .getImgBase64(fileObj[pdfData.value.sellCorporationId][0].fileUrl)
|
|
|
+ .then((res) => {
|
|
|
+ pdfData.value.companyPic = res;
|
|
|
+ });
|
|
|
});
|
|
|
proxy
|
|
|
.post("/fileInfo/getList", {
|
|
@@ -305,8 +310,11 @@ const getPdfData = (query) => {
|
|
|
fileType: 4,
|
|
|
})
|
|
|
.then((fileObj) => {
|
|
|
- pdfData.value.companySeal =
|
|
|
- fileObj[pdfData.value.sellCorporationId][0].fileUrl;
|
|
|
+ proxy
|
|
|
+ .getImgBase64(fileObj[pdfData.value.sellCorporationId][0].fileUrl)
|
|
|
+ .then((res) => {
|
|
|
+ pdfData.value.companySeal = res;
|
|
|
+ });
|
|
|
});
|
|
|
}
|
|
|
// 拿取产品图
|
|
@@ -319,12 +327,16 @@ const getPdfData = (query) => {
|
|
|
.post("/fileInfo/getList", {
|
|
|
businessIdList: arr,
|
|
|
})
|
|
|
- .then((fileObj) => {
|
|
|
+ .then(async (fileObj) => {
|
|
|
for (let i = 0; i < pdfData.value.productInfoList.length; i++) {
|
|
|
const e = pdfData.value.productInfoList[i];
|
|
|
for (const key in fileObj) {
|
|
|
if (e.productId === key) {
|
|
|
- e.fileList = fileObj[key];
|
|
|
+ if (fileObj[key] && fileObj[key].length > 0) {
|
|
|
+ const res = await proxy.getImgBase64(fileObj[key][0].fileUrl);
|
|
|
+ fileObj[key][0].fileUrl = res;
|
|
|
+ e.fileList = fileObj[key];
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -354,7 +366,10 @@ const getDict = () => {
|
|
|
getDict();
|
|
|
const getBalance = (val) => {
|
|
|
if (val) {
|
|
|
- return parseFloat(pdfData.value.totalAmount * (val / 100)).toFixed(2);
|
|
|
+ return proxy.moneyFormat(
|
|
|
+ parseFloat(pdfData.value.totalAmount * (val / 100)).toFixed(2),
|
|
|
+ 2
|
|
|
+ );
|
|
|
}
|
|
|
};
|
|
|
watch(
|