|
@@ -14,7 +14,18 @@
|
|
|
action: () => newContract(),
|
|
|
},
|
|
|
]"
|
|
|
- @get-list="getList">
|
|
|
+ @get-list="getList"
|
|
|
+ >
|
|
|
+ <template #code="{ item }">
|
|
|
+ <div style="width: 100%">
|
|
|
+ <a
|
|
|
+ style="color: #409eff; cursor: pointer; word-break: break-all"
|
|
|
+ @click="openDetails(item)"
|
|
|
+ >{{ item.code }}</a
|
|
|
+ >
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+
|
|
|
<template #amount="{ item }">
|
|
|
<div>
|
|
|
<span style="padding-right: 4px">{{ item.currency }}</span>
|
|
@@ -23,12 +34,23 @@
|
|
|
</template>
|
|
|
<template #buyCorporationName="{ item }">
|
|
|
<div style="width: 100%">
|
|
|
- <a style="color: #409eff; cursor: pointer" @click="clickCorporationName(item.buyCorporationName)">{{ item.buyCorporationName }}</a>
|
|
|
+ <a
|
|
|
+ style="color: #409eff; cursor: pointer"
|
|
|
+ @click="clickCorporationName(item)"
|
|
|
+ >{{ item.buyCorporationName }}</a
|
|
|
+ >
|
|
|
</div>
|
|
|
</template>
|
|
|
<template #tags="{ item }">
|
|
|
<div style="width: 100%">
|
|
|
- <el-tag style="margin-right: 8px" type="success" v-for="(tag, index) in item.tags" closable :key="index" @close="tagClose(tag, item)">
|
|
|
+ <el-tag
|
|
|
+ style="margin-right: 8px"
|
|
|
+ type="success"
|
|
|
+ v-for="(tag, index) in item.tags"
|
|
|
+ closable
|
|
|
+ :key="index"
|
|
|
+ @close="tagClose(tag, item)"
|
|
|
+ >
|
|
|
{{ dictValueLabel(tag, customerTag) }}
|
|
|
</el-tag>
|
|
|
<template v-if="item.tags.length !== customerTag.length">
|
|
@@ -40,30 +62,66 @@
|
|
|
(val) => {
|
|
|
return changeTag(val, item);
|
|
|
}
|
|
|
- ">
|
|
|
- <el-option v-for="tag in customerTag" :key="tag.value" :label="tag.label" :value="tag.value" :disabled="judgeTagSelect(item.tags, tag.value)" />
|
|
|
+ "
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="tag in customerTag"
|
|
|
+ :key="tag.value"
|
|
|
+ :label="tag.label"
|
|
|
+ :value="tag.value"
|
|
|
+ :disabled="judgeTagSelect(item.tags, tag.value)"
|
|
|
+ />
|
|
|
</el-select>
|
|
|
- <el-tag style="cursor: pointer" type="success" @click="showSelect(item)" v-else> + </el-tag>
|
|
|
+ <el-tag
|
|
|
+ style="cursor: pointer"
|
|
|
+ type="success"
|
|
|
+ @click="showSelect(item)"
|
|
|
+ v-else
|
|
|
+ >
|
|
|
+ +
|
|
|
+ </el-tag>
|
|
|
</template>
|
|
|
</div>
|
|
|
</template>
|
|
|
<template #advanceRatio="{ item }">
|
|
|
<div>
|
|
|
- <span>{{ item.advanceRatio }}%</span>
|
|
|
+ <span>{{ moneyFormat(item.advanceRatio, 2) }}%</span>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+
|
|
|
+ <template #scale="{ item }">
|
|
|
+ <div>
|
|
|
+ {{ computeScale(item) }}
|
|
|
</div>
|
|
|
</template>
|
|
|
</byTable>
|
|
|
</div>
|
|
|
|
|
|
<el-dialog title="打印" v-if="openPrint" v-model="openPrint" width="860">
|
|
|
- <div id="pdfDom" style="width: 800px; padding: 16px; font-size: 12px !important">
|
|
|
+ <div
|
|
|
+ id="pdfDom"
|
|
|
+ style="width: 800px; padding: 16px; font-size: 12px !important"
|
|
|
+ >
|
|
|
<div style="font-size: 18px; text-align: center">
|
|
|
{{ printDetails.sellCorporationNameEn }}
|
|
|
</div>
|
|
|
<div style="text-align: center">
|
|
|
- {{ printDetails.sellCountryName }},{{ printDetails.sellProvinceName }},{{ printDetails.sellCityName }},{{ printDetails.sellDetailedAddress }}
|
|
|
+ {{ printDetails.sellCountryName }},{{
|
|
|
+ printDetails.sellProvinceName
|
|
|
+ }},{{ printDetails.sellCityName }},{{
|
|
|
+ printDetails.sellDetailedAddress
|
|
|
+ }}
|
|
|
+ </div>
|
|
|
+ <div
|
|
|
+ style="
|
|
|
+ font-size: 14px;
|
|
|
+ color: #409eff;
|
|
|
+ text-align: center;
|
|
|
+ padding-top: 16px;
|
|
|
+ "
|
|
|
+ >
|
|
|
+ PROFORMA INVOICE
|
|
|
</div>
|
|
|
- <div style="font-size: 14px; color: #409eff; text-align: center; padding-top: 16px">PROFORMA INVOICE</div>
|
|
|
<div style="padding-top: 8px">
|
|
|
<div>PI NO. : {{ printDetails.contractCode }}</div>
|
|
|
<div>PI DATE: {{ printDetails.createTimeEn }}</div>
|
|
@@ -73,27 +131,55 @@
|
|
|
<div style="color: #409eff">VENDOR:</div>
|
|
|
<div>{{ printDetails.sellCorporationNameEn }}</div>
|
|
|
<div style="padding: 16px 0">
|
|
|
- {{ printDetails.sellCountryName }},{{ printDetails.sellProvinceName }},{{ printDetails.sellCityName }},{{ printDetails.sellDetailedAddress }}
|
|
|
+ {{ printDetails.sellCountryName }},{{
|
|
|
+ printDetails.sellProvinceName
|
|
|
+ }},{{ printDetails.sellCityName }},{{
|
|
|
+ printDetails.sellDetailedAddress
|
|
|
+ }}
|
|
|
+ </div>
|
|
|
+ <div>
|
|
|
+ {{ printDetails.sellContactName }},{{
|
|
|
+ printDetails.sellContactNumber
|
|
|
+ }}
|
|
|
</div>
|
|
|
- <div>{{ printDetails.sellContactName }},{{ printDetails.sellContactNumber }}</div>
|
|
|
</div>
|
|
|
<div style="width: 50%">
|
|
|
<div style="color: #409eff">BUYER:</div>
|
|
|
<div>{{ printDetails.buyCorporationName }}</div>
|
|
|
<div style="padding: 16px 0">
|
|
|
- {{ printDetails.buyCountryName }},{{ printDetails.buyProvinceName }},{{ printDetails.buyCityName }},{{ printDetails.buyDetailedAddress }}
|
|
|
+ {{ printDetails.buyCountryName }},{{
|
|
|
+ printDetails.buyProvinceName
|
|
|
+ }},{{ printDetails.buyCityName }},{{
|
|
|
+ printDetails.buyDetailedAddress
|
|
|
+ }}
|
|
|
+ </div>
|
|
|
+ <div>
|
|
|
+ {{ printDetails.buyContactName }},{{
|
|
|
+ printDetails.buyContactNumber
|
|
|
+ }}
|
|
|
</div>
|
|
|
- <div>{{ printDetails.buyContactName }},{{ printDetails.buyContactNumber }}</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div style="height: 16px"></div>
|
|
|
<div style="border: 1px solid black">
|
|
|
<div style="display: flex; width: 100%">
|
|
|
- <div style="width: 33%; border-bottom: 1px solid black; border-right: 1px solid black">
|
|
|
+ <div
|
|
|
+ style="
|
|
|
+ width: 33%;
|
|
|
+ border-bottom: 1px solid black;
|
|
|
+ border-right: 1px solid black;
|
|
|
+ "
|
|
|
+ >
|
|
|
<div style="color: #409eff">COUNTRY OF ORIGIN:</div>
|
|
|
<div>{{ printDetails.sellCountryName }}</div>
|
|
|
</div>
|
|
|
- <div style="width: 34%; border-bottom: 1px solid black; border-right: 1px solid black">
|
|
|
+ <div
|
|
|
+ style="
|
|
|
+ width: 34%;
|
|
|
+ border-bottom: 1px solid black;
|
|
|
+ border-right: 1px solid black;
|
|
|
+ "
|
|
|
+ >
|
|
|
<div style="color: #409eff">COUNTRY OF DESTINATION:</div>
|
|
|
<div>{{ printDetails.buyCountryName }}</div>
|
|
|
</div>
|
|
@@ -103,13 +189,25 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<div style="display: flex; width: 100%">
|
|
|
- <div style="width: 33%; border-bottom: 1px solid black; border-right: 1px solid black">
|
|
|
+ <div
|
|
|
+ style="
|
|
|
+ width: 33%;
|
|
|
+ border-bottom: 1px solid black;
|
|
|
+ border-right: 1px solid black;
|
|
|
+ "
|
|
|
+ >
|
|
|
<div style="color: #409eff">TERMS OF DELIVERY:</div>
|
|
|
<div>
|
|
|
{{ dictValueLabel(printDetails.tradeMethods, tradeMethods) }}
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div style="width: 34%; border-bottom: 1px solid black; border-right: 1px solid black">
|
|
|
+ <div
|
|
|
+ style="
|
|
|
+ width: 34%;
|
|
|
+ border-bottom: 1px solid black;
|
|
|
+ border-right: 1px solid black;
|
|
|
+ "
|
|
|
+ >
|
|
|
<div style="color: #409eff">CURRENCY:</div>
|
|
|
<div>
|
|
|
{{ dictValueLabel(printDetails.currency, accountCurrency) }}
|
|
@@ -118,7 +216,9 @@
|
|
|
<div style="width: 33%; border-bottom: 1px solid black">
|
|
|
<div style="color: #409eff">EXPORT BY/VIA:</div>
|
|
|
<div>
|
|
|
- {{ dictValueLabel(printDetails.transportMethod, shippingMethod) }}
|
|
|
+ {{
|
|
|
+ dictValueLabel(printDetails.transportMethod, shippingMethod)
|
|
|
+ }}
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -135,19 +235,47 @@
|
|
|
</div>
|
|
|
<div style="height: 16px"></div>
|
|
|
<div class="baseRow" style="display: flex; color: #409eff">
|
|
|
- <div class="contentRow" style="width: 50px; text-align: center">NO.</div>
|
|
|
- <div class="contentRow" style="width: calc(100% - 450px); text-align: center">COMMODITY, SPECIFICATION</div>
|
|
|
- <div class="contentRow" style="width: 100px; text-align: center">UNIT</div>
|
|
|
- <div class="contentRow" style="width: 100px; text-align: center">QUANTITY</div>
|
|
|
- <div class="contentRow" style="width: 100px; text-align: center">UNIT PRICE</div>
|
|
|
- <div class="contentRow" style="width: 100px; text-align: center">TOTAL PRICE</div>
|
|
|
+ <div class="contentRow" style="width: 50px; text-align: center">
|
|
|
+ NO.
|
|
|
+ </div>
|
|
|
+ <div
|
|
|
+ class="contentRow"
|
|
|
+ style="width: calc(100% - 450px); text-align: center"
|
|
|
+ >
|
|
|
+ COMMODITY, SPECIFICATION
|
|
|
+ </div>
|
|
|
+ <div class="contentRow" style="width: 100px; text-align: center">
|
|
|
+ UNIT
|
|
|
+ </div>
|
|
|
+ <div class="contentRow" style="width: 100px; text-align: center">
|
|
|
+ QUANTITY
|
|
|
+ </div>
|
|
|
+ <div class="contentRow" style="width: 100px; text-align: center">
|
|
|
+ UNIT PRICE
|
|
|
+ </div>
|
|
|
+ <div class="contentRow" style="width: 100px; text-align: center">
|
|
|
+ TOTAL PRICE
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- <div v-if="printDetails.productInfoList && printDetails.productInfoList.length > 0">
|
|
|
- <div class="baseRow" style="display: flex" v-for="(item, index) in printDetails.productInfoList" :key="item.productId">
|
|
|
+ <div
|
|
|
+ v-if="
|
|
|
+ printDetails.productInfoList &&
|
|
|
+ printDetails.productInfoList.length > 0
|
|
|
+ "
|
|
|
+ >
|
|
|
+ <div
|
|
|
+ class="baseRow"
|
|
|
+ style="display: flex"
|
|
|
+ v-for="(item, index) in printDetails.productInfoList"
|
|
|
+ :key="item.productId"
|
|
|
+ >
|
|
|
<div class="contentRow" style="width: 50px; text-align: center">
|
|
|
{{ index + 1 }}
|
|
|
</div>
|
|
|
- <div class="contentRow" style="width: calc(100% - 450px); text-align: center">
|
|
|
+ <div
|
|
|
+ class="contentRow"
|
|
|
+ style="width: calc(100% - 450px); text-align: center"
|
|
|
+ >
|
|
|
{{ item.productName }}
|
|
|
</div>
|
|
|
<div class="contentRow" style="width: 100px; text-align: center">
|
|
@@ -165,12 +293,23 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="baseRow" style="display: flex; color: #409eff">
|
|
|
- <div class="contentRow" style="width: calc(100% - 400px); text-align: center">SUBTOTAL:</div>
|
|
|
- <div class="contentRow" style="width: 100px; text-align: center"></div>
|
|
|
+ <div
|
|
|
+ class="contentRow"
|
|
|
+ style="width: calc(100% - 400px); text-align: center"
|
|
|
+ >
|
|
|
+ SUBTOTAL:
|
|
|
+ </div>
|
|
|
+ <div
|
|
|
+ class="contentRow"
|
|
|
+ style="width: 100px; text-align: center"
|
|
|
+ ></div>
|
|
|
<div class="contentRow" style="width: 100px; text-align: center">
|
|
|
{{ statistics("productQuantity", 0) }}
|
|
|
</div>
|
|
|
- <div class="contentRow" style="width: 100px; text-align: center"></div>
|
|
|
+ <div
|
|
|
+ class="contentRow"
|
|
|
+ style="width: 100px; text-align: center"
|
|
|
+ ></div>
|
|
|
<div class="contentRow" style="width: 100px; text-align: center">
|
|
|
{{ statistics("amount", 2) }}
|
|
|
</div>
|
|
@@ -182,18 +321,38 @@
|
|
|
</div>
|
|
|
</div> -->
|
|
|
<div class="baseRow" style="display: flex">
|
|
|
- <div class="contentRow" style="width: calc(100% - 100px); text-align: right; color: #409eff">FREIGHT COST:</div>
|
|
|
- <div class="contentRow" style="width: 100px; text-align: center">0</div>
|
|
|
+ <div
|
|
|
+ class="contentRow"
|
|
|
+ style="width: calc(100% - 100px); text-align: right; color: #409eff"
|
|
|
+ >
|
|
|
+ FREIGHT COST:
|
|
|
+ </div>
|
|
|
+ <div class="contentRow" style="width: 100px; text-align: center">
|
|
|
+ 0
|
|
|
+ </div>
|
|
|
</div>
|
|
|
<div class="baseRow" style="display: flex">
|
|
|
- <div class="contentRow" style="width: calc(100% - 100px); text-align: right; color: #409eff">TOTAL PRICE:</div>
|
|
|
+ <div
|
|
|
+ class="contentRow"
|
|
|
+ style="width: calc(100% - 100px); text-align: right; color: #409eff"
|
|
|
+ >
|
|
|
+ TOTAL PRICE:
|
|
|
+ </div>
|
|
|
<div class="contentRow" style="width: 100px; text-align: center">
|
|
|
{{ statistics("amount", 2) }}
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="baseRow" style="display: flex; border-bottom: 1px solid black">
|
|
|
+ <div
|
|
|
+ class="baseRow"
|
|
|
+ style="display: flex; border-bottom: 1px solid black"
|
|
|
+ >
|
|
|
<div class="contentRow" style="width: 100%">
|
|
|
- {{ translateIntoEnglish(printDetails.totalAmount, printDetails.currency) }}
|
|
|
+ {{
|
|
|
+ translateIntoEnglish(
|
|
|
+ printDetails.totalAmount,
|
|
|
+ printDetails.currency
|
|
|
+ )
|
|
|
+ }}
|
|
|
</div>
|
|
|
</div>
|
|
|
<div style="height: 16px"></div>
|
|
@@ -202,20 +361,66 @@
|
|
|
</div>
|
|
|
<div class="baseRow" style="border-bottom: 1px solid black">
|
|
|
<div class="contentRow" style="width: 100%">
|
|
|
- <div style="line-height: 24px; padding-left: 4px; word-break: break-all; word-wrap: break-word">
|
|
|
+ <div
|
|
|
+ style="
|
|
|
+ line-height: 24px;
|
|
|
+ padding-left: 4px;
|
|
|
+ word-break: break-all;
|
|
|
+ word-wrap: break-word;
|
|
|
+ "
|
|
|
+ >
|
|
|
Beneficiary Name: {{ printDetails.beneficiaryName }}
|
|
|
</div>
|
|
|
- <div style="line-height: 24px; padding-left: 4px; word-break: break-all; word-wrap: break-word">
|
|
|
+ <div
|
|
|
+ style="
|
|
|
+ line-height: 24px;
|
|
|
+ padding-left: 4px;
|
|
|
+ word-break: break-all;
|
|
|
+ word-wrap: break-word;
|
|
|
+ "
|
|
|
+ >
|
|
|
Beneficiary Bank: {{ printDetails.beneficiaryBank }}
|
|
|
</div>
|
|
|
- <div style="line-height: 24px; padding-left: 4px; word-break: break-all; word-wrap: break-word">
|
|
|
- Beneficiary Bank Address: {{ printDetails.beneficiaryBankAddress }}
|
|
|
+ <div
|
|
|
+ style="
|
|
|
+ line-height: 24px;
|
|
|
+ padding-left: 4px;
|
|
|
+ word-break: break-all;
|
|
|
+ word-wrap: break-word;
|
|
|
+ "
|
|
|
+ >
|
|
|
+ Beneficiary Bank Address:
|
|
|
+ {{ printDetails.beneficiaryBankAddress }}
|
|
|
</div>
|
|
|
- <div style="line-height: 24px; padding-left: 4px; word-break: break-all; word-wrap: break-word">
|
|
|
- Beneficiary Account Number: {{ printDetails.beneficiaryAccountNumber }}
|
|
|
+ <div
|
|
|
+ style="
|
|
|
+ line-height: 24px;
|
|
|
+ padding-left: 4px;
|
|
|
+ word-break: break-all;
|
|
|
+ word-wrap: break-word;
|
|
|
+ "
|
|
|
+ >
|
|
|
+ Beneficiary Account Number:
|
|
|
+ {{ printDetails.beneficiaryAccountNumber }}
|
|
|
</div>
|
|
|
- <div style="line-height: 24px; padding-left: 4px; word-break: break-all; word-wrap: break-word">Swift Code: {{ printDetails.swiftCode }}</div>
|
|
|
- <div style="line-height: 24px; padding-left: 4px; word-break: break-all; word-wrap: break-word">
|
|
|
+ <div
|
|
|
+ style="
|
|
|
+ line-height: 24px;
|
|
|
+ padding-left: 4px;
|
|
|
+ word-break: break-all;
|
|
|
+ word-wrap: break-word;
|
|
|
+ "
|
|
|
+ >
|
|
|
+ Swift Code: {{ printDetails.swiftCode }}
|
|
|
+ </div>
|
|
|
+ <div
|
|
|
+ style="
|
|
|
+ line-height: 24px;
|
|
|
+ padding-left: 4px;
|
|
|
+ word-break: break-all;
|
|
|
+ word-wrap: break-word;
|
|
|
+ "
|
|
|
+ >
|
|
|
Beneficiary Address: {{ printDetails.beneficiaryAddress }}
|
|
|
</div>
|
|
|
</div>
|
|
@@ -234,12 +439,23 @@
|
|
|
</div>
|
|
|
<template #footer>
|
|
|
<el-button @click="openPrint = false" size="large">取消</el-button>
|
|
|
- <el-button type="primary" @click="clickDownload()" size="large">下载PDF</el-button>
|
|
|
+ <el-button type="primary" @click="clickDownload()" size="large"
|
|
|
+ >下载PDF</el-button
|
|
|
+ >
|
|
|
</template>
|
|
|
</el-dialog>
|
|
|
|
|
|
- <el-dialog title="交接单" v-if="openHandoverSlip" v-model="openHandoverSlip" width="600">
|
|
|
- <byForm :formConfig="formConfig" :formOption="formOption" v-model="handoverSlipForm">
|
|
|
+ <el-dialog
|
|
|
+ title="交接单"
|
|
|
+ v-if="openHandoverSlip"
|
|
|
+ v-model="openHandoverSlip"
|
|
|
+ width="600"
|
|
|
+ >
|
|
|
+ <byForm
|
|
|
+ :formConfig="formConfig"
|
|
|
+ :formOption="formOption"
|
|
|
+ v-model="handoverSlipForm"
|
|
|
+ >
|
|
|
<template #file>
|
|
|
<div style="width: 100%">
|
|
|
<el-upload
|
|
@@ -249,7 +465,8 @@
|
|
|
multiple
|
|
|
:before-upload="uploadFile"
|
|
|
:on-success="handleSuccess"
|
|
|
- :on-preview="onPreviewFile">
|
|
|
+ :on-preview="onPreviewFile"
|
|
|
+ >
|
|
|
<el-button type="primary" plain>选择</el-button>
|
|
|
</el-upload>
|
|
|
</div>
|
|
@@ -263,17 +480,30 @@
|
|
|
multiple
|
|
|
:before-upload="indicationUploadFile"
|
|
|
:on-success="handleSuccess"
|
|
|
- :on-preview="onPreviewFile">
|
|
|
+ :on-preview="onPreviewFile"
|
|
|
+ >
|
|
|
<el-button type="primary" plain>选择</el-button>
|
|
|
</el-upload>
|
|
|
</div>
|
|
|
</template>
|
|
|
</byForm>
|
|
|
<template #footer>
|
|
|
- <el-button @click="openHandoverSlip = false" size="large">关 闭</el-button>
|
|
|
- <el-button type="primary" @click="submitHandoverSlip()" size="large">确 定</el-button>
|
|
|
+ <el-button @click="openHandoverSlip = false" size="large"
|
|
|
+ >关 闭</el-button
|
|
|
+ >
|
|
|
+ <el-button type="primary" @click="submitHandoverSlip()" size="large"
|
|
|
+ >确 定</el-button
|
|
|
+ >
|
|
|
</template>
|
|
|
</el-dialog>
|
|
|
+ <el-dialog
|
|
|
+ title="合同详情"
|
|
|
+ v-if="openDetailsDialog"
|
|
|
+ v-model="openDetailsDialog"
|
|
|
+ width="1100"
|
|
|
+ >
|
|
|
+ <ContractDetails :contractId="currentContractId"></ContractDetails>
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -283,6 +513,7 @@ import byTable from "@/components/byTable/index";
|
|
|
import byForm from "@/components/byForm/index";
|
|
|
import useUserStore from "@/store/modules/user";
|
|
|
import { ElMessage, ElMessageBox } from "element-plus";
|
|
|
+import ContractDetails from "@/components/contractCom/contractDetails.vue";
|
|
|
|
|
|
const { proxy } = getCurrentInstance();
|
|
|
const accountCurrency = ref([]);
|
|
@@ -292,6 +523,8 @@ const customerList = ref([]);
|
|
|
const userList = ref([]);
|
|
|
const shippingMethod = ref([]);
|
|
|
const customerTag = ref([]);
|
|
|
+const openDetailsDialog = ref(false);
|
|
|
+
|
|
|
const status = ref([
|
|
|
{
|
|
|
label: "草稿",
|
|
@@ -344,8 +577,8 @@ const config = computed(() => {
|
|
|
return [
|
|
|
{
|
|
|
attrs: {
|
|
|
- label: "合同编号",
|
|
|
- prop: "code",
|
|
|
+ label: "合同号",
|
|
|
+ slot: "code",
|
|
|
width: 180,
|
|
|
},
|
|
|
},
|
|
@@ -383,11 +616,19 @@ const config = computed(() => {
|
|
|
"min-width": 220,
|
|
|
},
|
|
|
},
|
|
|
+ // {
|
|
|
+ // attrs: {
|
|
|
+ // label: "客户标签",
|
|
|
+ // slot: "tags",
|
|
|
+ // width: 180,
|
|
|
+ // },
|
|
|
+ // },
|
|
|
{
|
|
|
attrs: {
|
|
|
- label: "客户标签",
|
|
|
- slot: "tags",
|
|
|
- width: 180,
|
|
|
+ label: "预付比例",
|
|
|
+ slot: "advanceRatio",
|
|
|
+ width: 140,
|
|
|
+ align: "right",
|
|
|
},
|
|
|
},
|
|
|
{
|
|
@@ -395,17 +636,53 @@ const config = computed(() => {
|
|
|
label: "合同金额",
|
|
|
slot: "amount",
|
|
|
width: 140,
|
|
|
+ align: "right",
|
|
|
},
|
|
|
},
|
|
|
{
|
|
|
attrs: {
|
|
|
- label: "预付比例",
|
|
|
- slot: "advanceRatio",
|
|
|
- width: 140,
|
|
|
+ label: "汇率",
|
|
|
+ prop: "rate",
|
|
|
+ width: 80,
|
|
|
+ align: "right",
|
|
|
+ },
|
|
|
+ render(rate) {
|
|
|
+ return proxy.moneyFormat(rate, 4);
|
|
|
},
|
|
|
},
|
|
|
{
|
|
|
attrs: {
|
|
|
+ label: "合同金额(CNY)",
|
|
|
+ prop: "amountCNY",
|
|
|
+ width: 160,
|
|
|
+ align: "right",
|
|
|
+ },
|
|
|
+ render(amountCNY) {
|
|
|
+ return proxy.moneyFormat(amountCNY, 2);
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ attrs: {
|
|
|
+ label: "到账金额(CNY)",
|
|
|
+ prop: "sumClaimMoney",
|
|
|
+ width: 160,
|
|
|
+ align: "right",
|
|
|
+ },
|
|
|
+ render(sumClaimMoney) {
|
|
|
+ return proxy.moneyFormat(sumClaimMoney, 2);
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ attrs: {
|
|
|
+ label: "到账比例",
|
|
|
+ slot: "scale",
|
|
|
+ width: 100,
|
|
|
+ align: "right",
|
|
|
+ },
|
|
|
+ },
|
|
|
+
|
|
|
+ {
|
|
|
+ attrs: {
|
|
|
label: "审批状态",
|
|
|
prop: "status",
|
|
|
width: 140,
|
|
@@ -453,11 +730,15 @@ const config = computed(() => {
|
|
|
},
|
|
|
el: "button",
|
|
|
click() {
|
|
|
- ElMessageBox.confirm("此操作将永久删除该数据, 是否继续?", "提示", {
|
|
|
- confirmButtonText: "确定",
|
|
|
- cancelButtonText: "取消",
|
|
|
- type: "warning",
|
|
|
- }).then(() => {
|
|
|
+ ElMessageBox.confirm(
|
|
|
+ "此操作将永久删除该数据, 是否继续?",
|
|
|
+ "提示",
|
|
|
+ {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning",
|
|
|
+ }
|
|
|
+ ).then(() => {
|
|
|
proxy
|
|
|
.post("/contract/edit", {
|
|
|
id: row.id,
|
|
@@ -479,24 +760,31 @@ const config = computed(() => {
|
|
|
];
|
|
|
});
|
|
|
const getDict = () => {
|
|
|
- proxy.getDictOne(["customer_tag", "trade_mode", "account_currency", "shipping_method"]).then((res) => {
|
|
|
- customerTag.value = res["customer_tag"].map((x) => ({
|
|
|
- label: x.dictValue,
|
|
|
- value: x.dictKey,
|
|
|
- }));
|
|
|
- tradeMethods.value = res["trade_mode"].map((x) => ({
|
|
|
- label: x.dictValue,
|
|
|
- value: x.dictKey,
|
|
|
- }));
|
|
|
- accountCurrency.value = res["account_currency"].map((x) => ({
|
|
|
- label: x.dictValue,
|
|
|
- value: x.dictKey,
|
|
|
- }));
|
|
|
- shippingMethod.value = res["shipping_method"].map((x) => ({
|
|
|
- label: x.dictValue,
|
|
|
- value: x.dictKey,
|
|
|
- }));
|
|
|
- });
|
|
|
+ proxy
|
|
|
+ .getDictOne([
|
|
|
+ "customer_tag",
|
|
|
+ "trade_mode",
|
|
|
+ "account_currency",
|
|
|
+ "shipping_method",
|
|
|
+ ])
|
|
|
+ .then((res) => {
|
|
|
+ customerTag.value = res["customer_tag"].map((x) => ({
|
|
|
+ label: x.dictValue,
|
|
|
+ value: x.dictKey,
|
|
|
+ }));
|
|
|
+ tradeMethods.value = res["trade_mode"].map((x) => ({
|
|
|
+ label: x.dictValue,
|
|
|
+ value: x.dictKey,
|
|
|
+ }));
|
|
|
+ accountCurrency.value = res["account_currency"].map((x) => ({
|
|
|
+ label: x.dictValue,
|
|
|
+ value: x.dictKey,
|
|
|
+ }));
|
|
|
+ shippingMethod.value = res["shipping_method"].map((x) => ({
|
|
|
+ label: x.dictValue,
|
|
|
+ value: x.dictKey,
|
|
|
+ }));
|
|
|
+ });
|
|
|
proxy.post("/corporation/page", { pageNum: 1, pageSize: 999 }).then((res) => {
|
|
|
corporationList.value = res.rows.map((item) => {
|
|
|
return {
|
|
@@ -576,7 +864,10 @@ const clickDownload = () => {
|
|
|
};
|
|
|
const statistics = (label, index) => {
|
|
|
let num = 0;
|
|
|
- if (printDetails.value.productInfoList && printDetails.value.productInfoList.length > 0) {
|
|
|
+ if (
|
|
|
+ printDetails.value.productInfoList &&
|
|
|
+ printDetails.value.productInfoList.length > 0
|
|
|
+ ) {
|
|
|
printDetails.value.productInfoList.map((item) => {
|
|
|
if (item[label]) {
|
|
|
num = parseFloat(Number(num) + Number(item[label])).toFixed(index);
|
|
@@ -645,13 +936,15 @@ const clickHandoverSlip = (item) => {
|
|
|
handoverSlipForm.value.fileList = [];
|
|
|
}
|
|
|
if (item.packageFileInfoVOList && item.packageFileInfoVOList.length > 0) {
|
|
|
- handoverSlipForm.value.packageFileList = item.packageFileInfoVOList.map((item) => {
|
|
|
- return {
|
|
|
- raw: item,
|
|
|
- name: item.fileName,
|
|
|
- url: item.fileUrl,
|
|
|
- };
|
|
|
- });
|
|
|
+ handoverSlipForm.value.packageFileList = item.packageFileInfoVOList.map(
|
|
|
+ (item) => {
|
|
|
+ return {
|
|
|
+ raw: item,
|
|
|
+ name: item.fileName,
|
|
|
+ url: item.fileUrl,
|
|
|
+ };
|
|
|
+ }
|
|
|
+ );
|
|
|
} else {
|
|
|
handoverSlipForm.value.packageFileList = [];
|
|
|
}
|
|
@@ -682,14 +975,20 @@ const onPreviewFile = (file) => {
|
|
|
window.open(file.raw.fileUrl, "_blank");
|
|
|
};
|
|
|
const submitHandoverSlip = () => {
|
|
|
- if (handoverSlipForm.value.fileList && handoverSlipForm.value.fileList.length > 0) {
|
|
|
+ if (
|
|
|
+ handoverSlipForm.value.fileList &&
|
|
|
+ handoverSlipForm.value.fileList.length > 0
|
|
|
+ ) {
|
|
|
for (let i = 0; i < handoverSlipForm.value.fileList.length; i++) {
|
|
|
if (handoverSlipForm.value.fileList[i].raw.uploadState) {
|
|
|
return ElMessage("文件上传中,请稍后提交");
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- if (handoverSlipForm.value.packageFileList && handoverSlipForm.value.packageFileList.length > 0) {
|
|
|
+ if (
|
|
|
+ handoverSlipForm.value.packageFileList &&
|
|
|
+ handoverSlipForm.value.packageFileList.length > 0
|
|
|
+ ) {
|
|
|
for (let i = 0; i < handoverSlipForm.value.packageFileList.length; i++) {
|
|
|
if (handoverSlipForm.value.packageFileList[i].raw.uploadState) {
|
|
|
return ElMessage("文件上传中,请稍后提交");
|
|
@@ -778,11 +1077,33 @@ const tagClose = (val, item) => {
|
|
|
const showSelect = (item) => {
|
|
|
item.addTagShow = true;
|
|
|
};
|
|
|
-const clickCorporationName = (name) => {
|
|
|
- proxy.$router.replace({
|
|
|
- path: "/ERP/customer/privatesea",
|
|
|
+
|
|
|
+const currentContractId = ref("");
|
|
|
+const openDetails = (row) => {
|
|
|
+ currentContractId.value = row.id;
|
|
|
+ openDetailsDialog.value = true;
|
|
|
+};
|
|
|
+
|
|
|
+const computeScale = (item) => {
|
|
|
+ let text = 0;
|
|
|
+ if (
|
|
|
+ item.sumClaimMoney &&
|
|
|
+ Number(item.sumClaimMoney) > 0 &&
|
|
|
+ item.amountCNY &&
|
|
|
+ Number(item.amountCNY) > 0
|
|
|
+ ) {
|
|
|
+ text = parseFloat(
|
|
|
+ (Number(item.sumClaimMoney) / Number(item.amountCNY)) * 100
|
|
|
+ ).toFixed(2);
|
|
|
+ }
|
|
|
+ return text + "%";
|
|
|
+};
|
|
|
+
|
|
|
+const clickCorporationName = (row) => {
|
|
|
+ proxy.$router.push({
|
|
|
+ name: "Portrait",
|
|
|
query: {
|
|
|
- name: name,
|
|
|
+ id: row.buyCorporationId,
|
|
|
},
|
|
|
});
|
|
|
};
|