|
@@ -1,7 +1,11 @@
|
|
|
<template>
|
|
|
<div class="tenant">
|
|
|
<div class="isSet-box">
|
|
|
- <el-radio-group v-model="sourceList.pagination.isSet" size="large" @change="getList">
|
|
|
+ <el-radio-group
|
|
|
+ v-model="sourceList.pagination.isSet"
|
|
|
+ size="large"
|
|
|
+ @change="getList"
|
|
|
+ >
|
|
|
<el-radio-button label="1">未创建</el-radio-button>
|
|
|
<el-radio-button label="2">已创建</el-radio-button>
|
|
|
</el-radio-group>
|
|
@@ -15,23 +19,28 @@
|
|
|
:selectConfig="selectConfig"
|
|
|
highlight-current-row
|
|
|
:action-list="[
|
|
|
- {
|
|
|
- text: '生成中间合同',
|
|
|
- plain: true,
|
|
|
- type: 'warning',
|
|
|
- disabled: selection.data.length === 0,
|
|
|
- action: () => openModal('add'),
|
|
|
- },
|
|
|
- ]"
|
|
|
+ {
|
|
|
+ text: '生成中间合同',
|
|
|
+ plain: true,
|
|
|
+ type: 'warning',
|
|
|
+ disabled: false,
|
|
|
+ action: () => openSelect(),
|
|
|
+ },
|
|
|
+ ]"
|
|
|
:table-events="{
|
|
|
//element talbe事件都能传
|
|
|
select: select,
|
|
|
selectAll: select,
|
|
|
}"
|
|
|
- @get-list="getList">
|
|
|
+ @get-list="getList"
|
|
|
+ >
|
|
|
<template #code="{ item }">
|
|
|
<div style="width: 100%">
|
|
|
- <a style="color: #409eff; cursor: pointer; word-break: break-all" @click="pushProcessApproval(item)">{{ item.code }}</a>
|
|
|
+ <a
|
|
|
+ style="color: #409eff; cursor: pointer; word-break: break-all"
|
|
|
+ @click="pushProcessApproval(item)"
|
|
|
+ >{{ item.code }}</a
|
|
|
+ >
|
|
|
</div>
|
|
|
</template>
|
|
|
<template #amount="{ item }">
|
|
@@ -42,13 +51,17 @@
|
|
|
</template>
|
|
|
<template #sellCorporationName="{ item }">
|
|
|
<div>
|
|
|
- <span v-if="item.sellCorporationName">{{ item.buyCorporationName}}</span>
|
|
|
+ <span v-if="item.sellCorporationName">{{
|
|
|
+ item.buyCorporationName
|
|
|
+ }}</span>
|
|
|
<span v-else>{{ item.buyCorporationName }}</span>
|
|
|
</div>
|
|
|
</template>
|
|
|
<template #buyCorporationName="{ item }">
|
|
|
<div>
|
|
|
- <span v-if="item.buyCorporationName">{{ item.sellCorporationName }}</span>
|
|
|
+ <span v-if="item.buyCorporationName">{{
|
|
|
+ item.sellCorporationName
|
|
|
+ }}</span>
|
|
|
<span v-else>{{ item.sellCorporationName }}</span>
|
|
|
</div>
|
|
|
</template>
|
|
@@ -57,7 +70,10 @@
|
|
|
|
|
|
<el-dialog title="打印" v-if="openPrint" v-model="openPrint" width="660">
|
|
|
<div id="printMe">
|
|
|
- <div id="pdfDom" style="padding: 16px; font-size: 12px !important;font-family: 'msyh';">
|
|
|
+ <div
|
|
|
+ id="pdfDom"
|
|
|
+ style="padding: 16px; font-size: 12px !important; font-family: 'msyh'"
|
|
|
+ >
|
|
|
<div style="font-size: 18px; text-align: center">
|
|
|
{{ printDetails.sellCorporationNameEn }}
|
|
|
</div>
|
|
@@ -65,7 +81,16 @@
|
|
|
{{ printDetails.buyDetailedAddress }}
|
|
|
<!-- {{ printDetails.sellDetailedAddress }},{{ printDetails.sellCityName }},{{ printDetails.sellProvinceName }},{{ printDetails.sellCountryName }} -->
|
|
|
</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.code }}</div>
|
|
|
<div>PI DATE: {{ printDetails.createTimeEn }}</div>
|
|
@@ -75,7 +100,11 @@
|
|
|
<div style="color: #409eff">VENDOR:</div>
|
|
|
<div>{{ printDetails.sellCorporationNameEn }}</div>
|
|
|
<div style="padding: 16px 0">
|
|
|
- {{ printDetails.sellDetailedAddress }},{{ printDetails.sellCityName }},{{ printDetails.sellProvinceName }},{{ printDetails.sellCountryName }}
|
|
|
+ {{ printDetails.sellDetailedAddress }},{{
|
|
|
+ printDetails.sellCityName
|
|
|
+ }},{{ printDetails.sellProvinceName }},{{
|
|
|
+ printDetails.sellCountryName
|
|
|
+ }}
|
|
|
</div>
|
|
|
<div>CONTACT: {{ printDetails.sellContactName }}</div>
|
|
|
<div>TEL.: {{ printDetails.sellContactNumber }}</div>
|
|
@@ -84,7 +113,11 @@
|
|
|
<div style="color: #409eff">BUYER:</div>
|
|
|
<div>{{ printDetails.buyCorporationName }}</div>
|
|
|
<div style="padding: 16px 0">
|
|
|
- {{ printDetails.buyDetailedAddress }},{{ printDetails.buyCityName }},{{ printDetails.buyProvinceName }},{{ printDetails.buyCountryName }}
|
|
|
+ {{ printDetails.buyDetailedAddress }},{{
|
|
|
+ printDetails.buyCityName
|
|
|
+ }},{{ printDetails.buyProvinceName }},{{
|
|
|
+ printDetails.buyCountryName
|
|
|
+ }}
|
|
|
</div>
|
|
|
<div>CONTACT: {{ printDetails.buyContactName }}</div>
|
|
|
<div>TEL.: {{ printDetails.buyContactNumber }}</div>
|
|
@@ -93,11 +126,23 @@
|
|
|
<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>
|
|
@@ -107,13 +152,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>
|
|
|
{{ printDetails.currency }}
|
|
@@ -122,7 +179,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>
|
|
@@ -139,20 +198,49 @@
|
|
|
</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.contractMap.contractProductList && printDetails.contractMap.contractProductList.length > 0">
|
|
|
- <div class="baseRow" style="display: flex" v-for="(item, index) in printDetails.contractMap.contractProductList" :key="item.productId">
|
|
|
+
|
|
|
+ <div
|
|
|
+ v-if="
|
|
|
+ printDetails.contractMap.contractProductList &&
|
|
|
+ printDetails.contractMap.contractProductList.length > 0
|
|
|
+ "
|
|
|
+ >
|
|
|
+ <div
|
|
|
+ class="baseRow"
|
|
|
+ style="display: flex"
|
|
|
+ v-for="(item, index) in printDetails.contractMap
|
|
|
+ .contractProductList"
|
|
|
+ :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">
|
|
@@ -170,53 +258,138 @@
|
|
|
</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("quantity", 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>
|
|
|
</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: calc(100% - 100px);
|
|
|
+ text-align: right;
|
|
|
+ color: #409eff;
|
|
|
+ "
|
|
|
+ >
|
|
|
+ FREIGHT COST:
|
|
|
+ </div>
|
|
|
<div class="contentRow" style="width: 100px; text-align: center">
|
|
|
- {{statisticsTwo("amount", 2) }}
|
|
|
+ {{ statisticsTwo("amount", 2) }}
|
|
|
</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">
|
|
|
{{ printDetails.amount }}
|
|
|
</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>
|
|
|
<div class="baseRow" style="color: #409eff">
|
|
|
- <div class="contentRow" style="width: 100%">ACCOUNT INFORMATION:</div>
|
|
|
+ <div class="contentRow" style="width: 100%">
|
|
|
+ ACCOUNT INFORMATION:
|
|
|
+ </div>
|
|
|
</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>
|
|
|
- <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;
|
|
|
+ "
|
|
|
+ >
|
|
|
+ Swift Code: {{ printDetails.swiftCode }}
|
|
|
</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;
|
|
|
+ "
|
|
|
+ >
|
|
|
Beneficiary Address: {{ printDetails.beneficiaryAddress }}
|
|
|
</div>
|
|
|
</div>
|
|
@@ -237,12 +410,20 @@
|
|
|
<template #footer>
|
|
|
<el-button @click="openPrint = false" size="large">取消</el-button>
|
|
|
<el-button v-print="printObj" 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="openUpdate" v-model="openUpdate" width="500">
|
|
|
- <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="update">
|
|
|
+ <byForm
|
|
|
+ :formConfig="formConfig"
|
|
|
+ :formOption="formOption"
|
|
|
+ v-model="formData.data"
|
|
|
+ :rules="rules"
|
|
|
+ ref="update"
|
|
|
+ >
|
|
|
<template #sellContactName>
|
|
|
<div style="width: 100%">
|
|
|
<el-autocomplete
|
|
@@ -251,7 +432,8 @@
|
|
|
clearable
|
|
|
class="inline-input w-50"
|
|
|
placeholder="请输入联系人"
|
|
|
- @select="handleSellPerson">
|
|
|
+ @select="handleSellPerson"
|
|
|
+ >
|
|
|
</el-autocomplete>
|
|
|
</div>
|
|
|
</template>
|
|
@@ -263,14 +445,91 @@
|
|
|
clearable
|
|
|
class="inline-input w-50"
|
|
|
placeholder="请输入联系人"
|
|
|
- @select="handleBuyPerson">
|
|
|
+ @select="handleBuyPerson"
|
|
|
+ >
|
|
|
</el-autocomplete>
|
|
|
</div>
|
|
|
</template>
|
|
|
</byForm>
|
|
|
<template #footer>
|
|
|
<el-button @click="openUpdate = false" size="large">取 消</el-button>
|
|
|
- <el-button type="primary" @click="clickSubmit()" size="large">确 定</el-button>
|
|
|
+ <el-button type="primary" @click="clickSubmit()" size="large"
|
|
|
+ >确 定</el-button
|
|
|
+ >
|
|
|
+ </template>
|
|
|
+ </el-dialog>
|
|
|
+
|
|
|
+ <el-dialog
|
|
|
+ title="选择合同"
|
|
|
+ v-if="selectDialog"
|
|
|
+ v-model="selectDialog"
|
|
|
+ width="80%"
|
|
|
+ >
|
|
|
+ <byTable
|
|
|
+ :source="sourceList.dataOne"
|
|
|
+ :pagination="sourceList.paginationOne"
|
|
|
+ :config="configOne"
|
|
|
+ :loading="loadingOne"
|
|
|
+ :selectConfig="selectConfigOne"
|
|
|
+ highlight-current-row
|
|
|
+ @get-list="getListOne"
|
|
|
+ >
|
|
|
+ <template #code="{ item }">
|
|
|
+ <div style="width: 100%">
|
|
|
+ <a
|
|
|
+ style="color: #409eff; cursor: pointer; word-break: break-all"
|
|
|
+ @click="pushProcessApproval(item)"
|
|
|
+ >{{ item.code }}</a
|
|
|
+ >
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ <template #amount="{ item }">
|
|
|
+ <div>
|
|
|
+ <span style="padding-right: 4px">{{ item.currency }}</span>
|
|
|
+ <span>{{ moneyFormat(item.amount, 2) }}</span>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ <template #sellCorporationName="{ item }">
|
|
|
+ <div>
|
|
|
+ <span v-if="item.sellCorporationName">{{
|
|
|
+ item.buyCorporationName
|
|
|
+ }}</span>
|
|
|
+ <span v-else>{{ item.buyCorporationName }}</span>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ <template #buyCorporationName="{ item }">
|
|
|
+ <div>
|
|
|
+ <span v-if="item.buyCorporationName">{{
|
|
|
+ item.sellCorporationName
|
|
|
+ }}</span>
|
|
|
+ <span v-else>{{ item.sellCorporationName }}</span>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </byTable>
|
|
|
+ <div>
|
|
|
+ <div>已选择合同</div>
|
|
|
+ <div style="margin: 10px 0px">
|
|
|
+ <el-tag
|
|
|
+ style="margin-right: 10px; margin-bottom: 5px"
|
|
|
+ type="info"
|
|
|
+ closable
|
|
|
+ v-for="(item, index) in selection.data"
|
|
|
+ :key="item.id"
|
|
|
+ @close="handleRemove(index)"
|
|
|
+ >
|
|
|
+ {{ item.code }}
|
|
|
+ </el-tag>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <template #footer>
|
|
|
+ <el-button @click="selectDialog = false" size="large">取 消</el-button>
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ @click="openModal('add')"
|
|
|
+ size="large"
|
|
|
+ :disabled="selection.data.length == 0"
|
|
|
+ >生成中间合同</el-button
|
|
|
+ >
|
|
|
</template>
|
|
|
</el-dialog>
|
|
|
</div>
|
|
@@ -279,7 +538,7 @@
|
|
|
<script setup>
|
|
|
import { computed, ref } from "vue";
|
|
|
import byTable from "@/components/byTable/index";
|
|
|
-import { ElMessage,ElMessageBox } from "element-plus";
|
|
|
+import { ElMessage, ElMessageBox } from "element-plus";
|
|
|
import byForm from "@/components/byForm/index";
|
|
|
|
|
|
const { proxy } = getCurrentInstance();
|
|
@@ -291,6 +550,7 @@ const sellPerson = ref([]);
|
|
|
const buyPerson = ref([]);
|
|
|
const sourceList = ref({
|
|
|
data: [],
|
|
|
+ dataOne: [],
|
|
|
pagination: {
|
|
|
total: 0,
|
|
|
pageNum: 1,
|
|
@@ -298,8 +558,17 @@ const sourceList = ref({
|
|
|
keyword: "",
|
|
|
isSet: "1",
|
|
|
},
|
|
|
+ paginationOne: {
|
|
|
+ total: 0,
|
|
|
+ pageNum: 1,
|
|
|
+ pageSize: 10,
|
|
|
+ keyword: "",
|
|
|
+ isSet: "1",
|
|
|
+ },
|
|
|
});
|
|
|
const loading = ref(false);
|
|
|
+const loadingOne = ref(false);
|
|
|
+
|
|
|
const selectConfig = computed(() => {
|
|
|
return [
|
|
|
{
|
|
@@ -314,6 +583,20 @@ const selectConfig = computed(() => {
|
|
|
// },
|
|
|
];
|
|
|
});
|
|
|
+const selectConfigOne = computed(() => {
|
|
|
+ return [
|
|
|
+ {
|
|
|
+ label: "销售方",
|
|
|
+ prop: "sellCorporationId",
|
|
|
+ data: corporationList.value,
|
|
|
+ },
|
|
|
+ // {
|
|
|
+ // label: "采购方",
|
|
|
+ // prop: "buyCorporationId",
|
|
|
+ // data: corporationList.value,
|
|
|
+ // },
|
|
|
+ ];
|
|
|
+});
|
|
|
|
|
|
const selection = ref({
|
|
|
data: [],
|
|
@@ -376,7 +659,7 @@ const config2 = computed(() => {
|
|
|
fixed: "right",
|
|
|
},
|
|
|
renderHTML(row) {
|
|
|
- if(sourceList.value.pagination.isSet == '2') {
|
|
|
+ if (sourceList.value.pagination.isSet == "2") {
|
|
|
return [
|
|
|
{
|
|
|
attrs: {
|
|
@@ -387,26 +670,26 @@ const config2 = computed(() => {
|
|
|
el: "button",
|
|
|
click() {
|
|
|
ElMessageBox.confirm(
|
|
|
- "此操作将永久删除该数据, 是否继续?",
|
|
|
- "提示",
|
|
|
- {
|
|
|
- confirmButtonText: "确定",
|
|
|
- cancelButtonText: "取消",
|
|
|
- type: "warning",
|
|
|
- }
|
|
|
- ).then(() => {
|
|
|
- proxy
|
|
|
- .post("/intermediateContract/del", {
|
|
|
- id: row.id,
|
|
|
- })
|
|
|
- .then(() => {
|
|
|
- ElMessage({
|
|
|
- message: "删除成功",
|
|
|
- type: "success",
|
|
|
+ "此操作将永久删除该数据, 是否继续?",
|
|
|
+ "提示",
|
|
|
+ {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning",
|
|
|
+ }
|
|
|
+ ).then(() => {
|
|
|
+ proxy
|
|
|
+ .post("/intermediateContract/del", {
|
|
|
+ id: row.id,
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
+ ElMessage({
|
|
|
+ message: "删除成功",
|
|
|
+ type: "success",
|
|
|
+ });
|
|
|
+ getList();
|
|
|
});
|
|
|
- getList();
|
|
|
- });
|
|
|
- });
|
|
|
+ });
|
|
|
},
|
|
|
},
|
|
|
{
|
|
@@ -421,7 +704,7 @@ const config2 = computed(() => {
|
|
|
},
|
|
|
},
|
|
|
];
|
|
|
- } else{
|
|
|
+ } else {
|
|
|
return [
|
|
|
{
|
|
|
attrs: {
|
|
@@ -436,7 +719,6 @@ const config2 = computed(() => {
|
|
|
},
|
|
|
];
|
|
|
}
|
|
|
-
|
|
|
},
|
|
|
},
|
|
|
];
|
|
@@ -444,15 +726,78 @@ const config2 = computed(() => {
|
|
|
|
|
|
const config = computed(() => {
|
|
|
return [
|
|
|
+ // {
|
|
|
+ // type: "selection",
|
|
|
+ // attrs: {
|
|
|
+ // label: "多选",
|
|
|
+ // prop: "remark",
|
|
|
+ // },
|
|
|
+ // },
|
|
|
{
|
|
|
- type: "selection",
|
|
|
attrs: {
|
|
|
- label: "多选",
|
|
|
- prop: "remark",
|
|
|
+ label: "合同编码",
|
|
|
+ slot: "code",
|
|
|
+ width: 220,
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ attrs: {
|
|
|
+ label: "合同金额",
|
|
|
+ slot: "amount",
|
|
|
+ width: 140,
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ attrs: {
|
|
|
+ label: "归属公司",
|
|
|
+ slot: "buyCorporationName",
|
|
|
+ "min-width": 200,
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ attrs: {
|
|
|
+ label: "客户名称",
|
|
|
+ slot: "sellCorporationName",
|
|
|
+ "min-width": 200,
|
|
|
},
|
|
|
},
|
|
|
{
|
|
|
attrs: {
|
|
|
+ label: "操作",
|
|
|
+ width: "120",
|
|
|
+ align: "center",
|
|
|
+ fixed: "right",
|
|
|
+ },
|
|
|
+ renderHTML(row) {
|
|
|
+ return [
|
|
|
+ {
|
|
|
+ attrs: {
|
|
|
+ label: "生成中间合同",
|
|
|
+ type: "primary",
|
|
|
+ text: true,
|
|
|
+ },
|
|
|
+ el: "button",
|
|
|
+ click() {
|
|
|
+ clickUpdate(row);
|
|
|
+ },
|
|
|
+ },
|
|
|
+ ];
|
|
|
+ },
|
|
|
+ },
|
|
|
+ ];
|
|
|
+});
|
|
|
+
|
|
|
+const configOne = computed(() => {
|
|
|
+ return [
|
|
|
+ // {
|
|
|
+ // type: "selection",
|
|
|
+ // attrs: {
|
|
|
+ // label: "多选",
|
|
|
+ // prop: "remark",
|
|
|
+ // },
|
|
|
+ // },
|
|
|
+ {
|
|
|
+ attrs: {
|
|
|
label: "合同编码",
|
|
|
slot: "code",
|
|
|
width: 220,
|
|
@@ -482,7 +827,7 @@ const config = computed(() => {
|
|
|
{
|
|
|
attrs: {
|
|
|
label: "操作",
|
|
|
- width: "120",
|
|
|
+ width: "80",
|
|
|
align: "center",
|
|
|
fixed: "right",
|
|
|
},
|
|
@@ -490,21 +835,21 @@ const config = computed(() => {
|
|
|
return [
|
|
|
{
|
|
|
attrs: {
|
|
|
- label: "生成中间合同",
|
|
|
+ label: "选择",
|
|
|
type: "primary",
|
|
|
text: true,
|
|
|
},
|
|
|
el: "button",
|
|
|
click() {
|
|
|
- clickUpdate(row);
|
|
|
+ handleSelectRow(row);
|
|
|
},
|
|
|
},
|
|
|
];
|
|
|
-
|
|
|
},
|
|
|
},
|
|
|
];
|
|
|
});
|
|
|
+
|
|
|
const getDict = () => {
|
|
|
proxy.getDictOne(["trade_mode", "shipping_method", "unit"]).then((res) => {
|
|
|
if (res.trade_mode && res.trade_mode.length > 0) {
|
|
@@ -555,47 +900,56 @@ const getPerson = () => {
|
|
|
const getList = async (req) => {
|
|
|
sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
|
|
|
loading.value = true;
|
|
|
- proxy.post("/intermediateContract/page", sourceList.value.pagination).then((res) => {
|
|
|
- sourceList.value.data = res.rows;
|
|
|
- sourceList.value.pagination.total = res.total;
|
|
|
- setTimeout(() => {
|
|
|
- loading.value = false;
|
|
|
- }, 200);
|
|
|
- });
|
|
|
+ proxy
|
|
|
+ .post("/intermediateContract/page", sourceList.value.pagination)
|
|
|
+ .then((res) => {
|
|
|
+ sourceList.value.data = res.rows;
|
|
|
+ sourceList.value.pagination.total = res.total;
|
|
|
+ setTimeout(() => {
|
|
|
+ loading.value = false;
|
|
|
+ }, 200);
|
|
|
+ });
|
|
|
};
|
|
|
-getDict();
|
|
|
+getDict();
|
|
|
getList();
|
|
|
const openPrint = ref(false);
|
|
|
const printDetails = ref({
|
|
|
- contractMap:{
|
|
|
- contractProductList:[],
|
|
|
- contract:{},
|
|
|
+ contractMap: {
|
|
|
+ contractProductList: [],
|
|
|
+ contract: {},
|
|
|
},
|
|
|
});
|
|
|
const clickPrint = (row) => {
|
|
|
printDetails.value = {
|
|
|
- contractMap:{
|
|
|
- contractProductList:[],
|
|
|
- contract:{},
|
|
|
+ contractMap: {
|
|
|
+ contractProductList: [],
|
|
|
+ contract: {},
|
|
|
},
|
|
|
};
|
|
|
openPrint.value = true;
|
|
|
- proxy.post("/intermediateContract/getPrintInfo", { id: row.id }).then((res) => {
|
|
|
- printDetails.value = {...res,...res.contractMap.contract,
|
|
|
- buyContactName:res.buyContactName,
|
|
|
- buyContactNumber:res.buyContactNumber,
|
|
|
- sellContactName:res.sellContactName,
|
|
|
- sellContactNumber:res.sellContactNumber,
|
|
|
- };
|
|
|
- console.log(printDetails.value.contractMap.contractProductList);
|
|
|
- });
|
|
|
+ proxy
|
|
|
+ .post("/intermediateContract/getPrintInfo", { id: row.id })
|
|
|
+ .then((res) => {
|
|
|
+ printDetails.value = {
|
|
|
+ ...res,
|
|
|
+ ...res.contractMap.contract,
|
|
|
+ buyContactName: res.buyContactName,
|
|
|
+ buyContactNumber: res.buyContactNumber,
|
|
|
+ sellContactName: res.sellContactName,
|
|
|
+ sellContactNumber: res.sellContactNumber,
|
|
|
+ };
|
|
|
+ console.log(printDetails.value.contractMap.contractProductList);
|
|
|
+ });
|
|
|
};
|
|
|
const clickDownload = () => {
|
|
|
proxy.getPdf("外销合同PDF文件");
|
|
|
};
|
|
|
const statistics = (label, index) => {
|
|
|
let num = 0;
|
|
|
- if (printDetails.value.contractMap.contractProductList && printDetails.value.contractMap.contractProductList.length > 0) {
|
|
|
+ if (
|
|
|
+ printDetails.value.contractMap.contractProductList &&
|
|
|
+ printDetails.value.contractMap.contractProductList.length > 0
|
|
|
+ ) {
|
|
|
printDetails.value.contractMap.contractProductList.map((item) => {
|
|
|
if (item[label]) {
|
|
|
num = parseFloat(Number(num) + Number(item[label])).toFixed(index);
|
|
@@ -606,7 +960,10 @@ const statistics = (label, index) => {
|
|
|
};
|
|
|
const statisticsTwo = (label, index) => {
|
|
|
let num = 0;
|
|
|
- if (printDetails.value.contractMap.contractProjectList && printDetails.value.contractMap.contractProjectList.length > 0) {
|
|
|
+ if (
|
|
|
+ printDetails.value.contractMap.contractProjectList &&
|
|
|
+ printDetails.value.contractMap.contractProjectList.length > 0
|
|
|
+ ) {
|
|
|
printDetails.value.contractMap.contractProjectList.map((item) => {
|
|
|
if (item[label]) {
|
|
|
num = parseFloat(Number(num) + Number(item[label])).toFixed(index);
|
|
@@ -631,7 +988,8 @@ const pushProcessApproval = (row) => {
|
|
|
const printObj = ref({
|
|
|
id: "printMe",
|
|
|
popTitle: "",
|
|
|
- extraCss: "https://cdn.bootcdn.net/ajax/libs/animate.css/4.1.1/animate.compat.css, https://cdn.bootcdn.net/ajax/libs/hover.css/2.3.1/css/hover-min.css",
|
|
|
+ extraCss:
|
|
|
+ "https://cdn.bootcdn.net/ajax/libs/animate.css/4.1.1/animate.compat.css, https://cdn.bootcdn.net/ajax/libs/hover.css/2.3.1/css/hover-min.css",
|
|
|
extraHead: '<meta http-equiv="Content-Language"content="zh-cn"/>',
|
|
|
});
|
|
|
const openUpdate = ref(false);
|
|
@@ -690,12 +1048,24 @@ const formConfig = computed(() => {
|
|
|
];
|
|
|
});
|
|
|
const rules = ref({
|
|
|
- sellCorporationId: [{ required: true, message: "请选择销售方", trigger: "change" }],
|
|
|
- sellContactName: [{ required: true, message: "请输入销售联系人", trigger: "blur" }],
|
|
|
- sellContactNumber: [{ required: true, message: "请输入销售联系电话", trigger: "blur" }],
|
|
|
- buyCorporationId: [{ required: true, message: "请选择采购方", trigger: "change" }],
|
|
|
- buyContactName: [{ required: true, message: "请输入采购联系人", trigger: "blur" }],
|
|
|
- buyContactNumber: [{ required: true, message: "请输入采购联系电话", trigger: "blur" }],
|
|
|
+ sellCorporationId: [
|
|
|
+ { required: true, message: "请选择销售方", trigger: "change" },
|
|
|
+ ],
|
|
|
+ sellContactName: [
|
|
|
+ { required: true, message: "请输入销售联系人", trigger: "blur" },
|
|
|
+ ],
|
|
|
+ sellContactNumber: [
|
|
|
+ { required: true, message: "请输入销售联系电话", trigger: "blur" },
|
|
|
+ ],
|
|
|
+ buyCorporationId: [
|
|
|
+ { required: true, message: "请选择采购方", trigger: "change" },
|
|
|
+ ],
|
|
|
+ buyContactName: [
|
|
|
+ { required: true, message: "请输入采购联系人", trigger: "blur" },
|
|
|
+ ],
|
|
|
+ buyContactNumber: [
|
|
|
+ { required: true, message: "请输入采购联系电话", trigger: "blur" },
|
|
|
+ ],
|
|
|
});
|
|
|
const openModal = (type) => {
|
|
|
getPerson();
|
|
@@ -732,29 +1102,80 @@ const clickSubmit = () => {
|
|
|
type: "success",
|
|
|
});
|
|
|
openUpdate.value = false;
|
|
|
+ selectDialog.value = false;
|
|
|
getList();
|
|
|
});
|
|
|
});
|
|
|
};
|
|
|
const createFilter = (queryString) => {
|
|
|
return (restaurant) => {
|
|
|
- return restaurant.value.toLowerCase().indexOf(queryString.toLowerCase()) === 0;
|
|
|
+ return (
|
|
|
+ restaurant.value.toLowerCase().indexOf(queryString.toLowerCase()) === 0
|
|
|
+ );
|
|
|
};
|
|
|
};
|
|
|
const querySearchSellPerson = (queryString, callback) => {
|
|
|
- const resultsSell = queryString ? sellPerson.value.filter(createFilter(queryString)) : sellPerson.value;
|
|
|
+ const resultsSell = queryString
|
|
|
+ ? sellPerson.value.filter(createFilter(queryString))
|
|
|
+ : sellPerson.value;
|
|
|
callback(resultsSell);
|
|
|
};
|
|
|
const handleSellPerson = (item) => {
|
|
|
formData.data.sellContactNumber = item.sellContactNumber;
|
|
|
};
|
|
|
const querySearchBuyPerson = (queryString, callback) => {
|
|
|
- const resultsBuy = queryString ? buyPerson.value.filter(createFilter(queryString)) : buyPerson.value;
|
|
|
+ const resultsBuy = queryString
|
|
|
+ ? buyPerson.value.filter(createFilter(queryString))
|
|
|
+ : buyPerson.value;
|
|
|
callback(resultsBuy);
|
|
|
};
|
|
|
const handleBuyPerson = (item) => {
|
|
|
formData.data.buyContactNumber = item.buyContactNumber;
|
|
|
};
|
|
|
+const getListOne = async (req) => {
|
|
|
+ sourceList.value.paginationOne = {
|
|
|
+ ...sourceList.value.paginationOne,
|
|
|
+ ...req,
|
|
|
+ };
|
|
|
+ loadingOne.value = true;
|
|
|
+ proxy
|
|
|
+ .post("/intermediateContract/page", sourceList.value.paginationOne)
|
|
|
+ .then((res) => {
|
|
|
+ sourceList.value.dataOne = res.rows;
|
|
|
+ sourceList.value.paginationOne.total = res.total;
|
|
|
+ setTimeout(() => {
|
|
|
+ loadingOne.value = false;
|
|
|
+ }, 200);
|
|
|
+ });
|
|
|
+};
|
|
|
+const selectDialog = ref(false);
|
|
|
+const openSelect = () => {
|
|
|
+ selectDialog.value = true;
|
|
|
+ selection.value.data = [];
|
|
|
+ getListOne();
|
|
|
+};
|
|
|
+const handleSelectRow = (row) => {
|
|
|
+ const flag = selection.value.data.some((x) => x.id === row.id);
|
|
|
+ if (flag)
|
|
|
+ return ElMessage({
|
|
|
+ message: "该合同已选择",
|
|
|
+ type: "info",
|
|
|
+ });
|
|
|
+ selection.value.data.push({
|
|
|
+ ...row,
|
|
|
+ });
|
|
|
+ return ElMessage({
|
|
|
+ message: "选择成功",
|
|
|
+ type: "success",
|
|
|
+ });
|
|
|
+};
|
|
|
+const handleRemove = (index) => {
|
|
|
+ selection.value.data.splice(index, 1);
|
|
|
+ return ElMessage({
|
|
|
+ message: "删除成功",
|
|
|
+ type: "success",
|
|
|
+ });
|
|
|
+};
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|