|
|
@@ -323,6 +323,10 @@
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
</el-form>
|
|
|
+ <template v-if="versionMode">
|
|
|
+ <headerTitle title="关联产品" style="margin-top: 30px"></headerTitle>
|
|
|
+ <ele-pro-table :columns="productColumns" :datasource="productList" :need-page="false" :toolkit="[]" height="300px"></ele-pro-table>
|
|
|
+ </template>
|
|
|
</el-tab-pane>
|
|
|
<!-- <el-tab-pane label="银行信息" name="bank">-->
|
|
|
<!-- -->
|
|
|
@@ -340,7 +344,7 @@
|
|
|
<!-- 操作栏 -->
|
|
|
<template v-slot:action="scope">
|
|
|
<el-link
|
|
|
- v-if="[1,2].includes(scope.row.approvalStatus)"
|
|
|
+ v-if="!versionMode && [1,2].includes(scope.row.approvalStatus)"
|
|
|
type="primary"
|
|
|
:underline="false"
|
|
|
icon="el-icon-edit"
|
|
|
@@ -350,7 +354,7 @@
|
|
|
</template>
|
|
|
</ele-pro-table>
|
|
|
</el-tab-pane>
|
|
|
- <el-tab-pane label="订单记录" name="order">
|
|
|
+ <el-tab-pane v-if="!versionMode" label="订单记录" name="order">
|
|
|
<headerTitle title="订单记录" style="margin-top: 30px"></headerTitle>
|
|
|
<div class="ele-border-lighter form-content">
|
|
|
<!-- 数据表格 -->
|
|
|
@@ -387,7 +391,7 @@
|
|
|
</ele-pro-table>
|
|
|
</div>
|
|
|
</el-tab-pane>
|
|
|
- <el-tab-pane label="发货记录" name="send">
|
|
|
+ <el-tab-pane v-if="!versionMode" label="发货记录" name="send">
|
|
|
<headerTitle title="发货记录" style="margin-top: 30px"></headerTitle>
|
|
|
<div class="ele-border-lighter form-content" >
|
|
|
<!-- 数据表格 -->
|
|
|
@@ -469,7 +473,7 @@
|
|
|
</ele-pro-table>
|
|
|
</div>
|
|
|
</el-tab-pane>
|
|
|
- <el-tab-pane label="退货记录" name="return">
|
|
|
+ <el-tab-pane v-if="!versionMode" label="退货记录" name="return">
|
|
|
<headerTitle title="退货记录" style="margin-top: 30px"></headerTitle>
|
|
|
<div class="ele-border-lighter form-content">
|
|
|
<!-- 数据表格 -->
|
|
|
@@ -567,7 +571,7 @@
|
|
|
</div>
|
|
|
|
|
|
</el-tab-pane>
|
|
|
- <el-tab-pane label="对账记录" name="reconciliation">
|
|
|
+ <el-tab-pane v-if="!versionMode" label="对账记录" name="reconciliation">
|
|
|
<headerTitle title="对账记录" style="margin-top: 30px"></headerTitle>
|
|
|
<div class="ele-border-lighter form-content">
|
|
|
<!-- 数据表格 -->
|
|
|
@@ -658,7 +662,7 @@
|
|
|
</ele-pro-table>
|
|
|
</div>
|
|
|
</el-tab-pane>
|
|
|
- <el-tab-pane label="开票记录" name="invoice">
|
|
|
+ <el-tab-pane v-if="!versionMode" label="开票记录" name="invoice">
|
|
|
<headerTitle title="开票记录" style="margin-top: 30px"></headerTitle>
|
|
|
<el-card shadow="never" >
|
|
|
<!-- 数据表格 -->
|
|
|
@@ -693,6 +697,14 @@
|
|
|
</ele-pro-table>
|
|
|
</el-card>
|
|
|
</el-tab-pane>
|
|
|
+ <el-tab-pane label="版本历史" name="versions">
|
|
|
+ <el-alert v-if="versionMode" title="当前正在查看历史快照,内容只读。" type="info" :closable="false" />
|
|
|
+ <ele-pro-table :columns="versionColumns" :datasource="versionList" :need-page="false" height="420px">
|
|
|
+ <template v-slot:action="{ row }">
|
|
|
+ <el-link type="primary" :underline="false" @click="openVersion(row)">查看</el-link>
|
|
|
+ </template>
|
|
|
+ </ele-pro-table>
|
|
|
+ </el-tab-pane>
|
|
|
<el-tab-pane label="审批流程" name="bpm">
|
|
|
<bpmDetail
|
|
|
v-if="activeName === 'bpm' && form.processInstanceId"
|
|
|
@@ -702,6 +714,8 @@
|
|
|
</el-tabs>
|
|
|
|
|
|
<div slot="footer" class="footer">
|
|
|
+ <span v-if="versionMode" class="ele-text-info">历史版本只读</span>
|
|
|
+ <el-button v-if="versionMode" type="primary" @click="returnCurrent">返回当前版本</el-button>
|
|
|
<el-button @click="cancel">返回</el-button>
|
|
|
</div>
|
|
|
<!-- 资质证书弹窗 -->
|
|
|
@@ -717,7 +731,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import {contactDetail, contactQcPackPageAPI} from '@/api/saleManage/contact';
|
|
|
+import {contactDetail, contactQcPackPageAPI, contactVersionList, contactVersionDetail} from '@/api/saleManage/contact';
|
|
|
import {getFile} from '@/api/system/file';
|
|
|
import {getInfoById as getCategoryInfo, getInfoByIds} from '@/api/classifyManage/index';
|
|
|
import fileUpload from '@/components/upload/fileUpload';
|
|
|
@@ -807,6 +821,31 @@ export default {
|
|
|
otherForm: copyObj(otherFormDef),
|
|
|
tableBankData: [],
|
|
|
tableLinkData: [],
|
|
|
+ productList: [],
|
|
|
+ productColumns: [
|
|
|
+ { prop: 'productCode', label: '产品编码', minWidth: 130 },
|
|
|
+ { prop: 'productName', label: '产品名称', minWidth: 150 },
|
|
|
+ { prop: 'purchasingCycle', label: '采购周期', minWidth: 100 },
|
|
|
+ { prop: 'purchaseMultiplier', label: '采购倍数', minWidth: 100 },
|
|
|
+ { prop: 'minimumOrderQuantity', label: '最低订购数量', minWidth: 120 },
|
|
|
+ { prop: 'provenance', label: '产地', minWidth: 130 },
|
|
|
+ { prop: 'manufacturer', label: '生产厂家', minWidth: 130 },
|
|
|
+ { prop: 'imgCode', label: '图号/件号', minWidth: 120 },
|
|
|
+ { prop: 'packingSpecification', label: '包装规格', minWidth: 110 },
|
|
|
+ { prop: 'brandNum', label: '牌号', minWidth: 100 },
|
|
|
+ { prop: 'modelType', label: '型号', minWidth: 100 },
|
|
|
+ { prop: 'specification', label: '规格', minWidth: 100 },
|
|
|
+ { prop: 'measuringUnit', label: '计量单位', minWidth: 100 }
|
|
|
+ ],
|
|
|
+ certificateList: [],
|
|
|
+ versionList: [],
|
|
|
+ versionMode: false,
|
|
|
+ versionColumns: [
|
|
|
+ { prop: 'version', label: '版本号', align: 'center' },
|
|
|
+ { prop: 'createTime', label: '修改时间', align: 'center' },
|
|
|
+ { prop: 'approvalStatus', label: '审批状态', align: 'center' },
|
|
|
+ { action: 'action', slot: 'action', label: '操作', align: 'center' }
|
|
|
+ ],
|
|
|
ifChiefList: [
|
|
|
{
|
|
|
value: 0,
|
|
|
@@ -1495,8 +1534,27 @@ export default {
|
|
|
async open(row) {
|
|
|
this.row = row;
|
|
|
this.visible = true;
|
|
|
+ this.versionMode = false;
|
|
|
await this._getById(row.id);
|
|
|
},
|
|
|
+ async openSnapshot(data, version) {
|
|
|
+ this.versionMode = true;
|
|
|
+ this.title = `客户历史版本 ${version}`;
|
|
|
+ this.visible = true;
|
|
|
+ await this._applyData(data);
|
|
|
+ },
|
|
|
+ async returnCurrent() {
|
|
|
+ this.versionMode = false;
|
|
|
+ this.title = '客户详情';
|
|
|
+ await this._getById(this.form.id);
|
|
|
+ },
|
|
|
+ async openVersion(version) {
|
|
|
+ const data = await contactVersionDetail(this.form.id, version.version);
|
|
|
+ this.visible = true;
|
|
|
+ this.title = `客户历史版本 ${version.version}`;
|
|
|
+ await this._applyData(data);
|
|
|
+ this.activeName = 'base';
|
|
|
+ },
|
|
|
/* 订单记录表格数据源 */
|
|
|
orderDatasource({page, limit, where, order}) {
|
|
|
return getTableList({
|
|
|
@@ -1551,15 +1609,22 @@ export default {
|
|
|
this.tableBankData = []
|
|
|
this.tableLinkData = []
|
|
|
this.visible = false;
|
|
|
+ this.versionMode = false;
|
|
|
})
|
|
|
},
|
|
|
|
|
|
async _getById(id) {
|
|
|
const data = await contactDetail(id);
|
|
|
+ this._applyData(data);
|
|
|
+ this.versionList = await contactVersionList(id);
|
|
|
+ },
|
|
|
+ async _applyData(data) {
|
|
|
this.form = data.base;
|
|
|
this.otherForm = data.other;
|
|
|
this.tableBankData = data.bankList;
|
|
|
this.tableLinkData = data.linkList;
|
|
|
+ this.productList = data.productList || [];
|
|
|
+ this.certificateList = data.certificateList || [];
|
|
|
if (this.tableLinkData && this.tableLinkData.length > 0) {
|
|
|
this.tableLinkData.forEach(e => e.status = e.status + "");
|
|
|
}
|
|
|
@@ -1586,6 +1651,7 @@ export default {
|
|
|
/* 证书资质表格数据源 */
|
|
|
tableCertificateData({page, limit, where}) {
|
|
|
if (!this.form.id) return []
|
|
|
+ if (this.versionMode) return this.certificateList;
|
|
|
return contactQcPackPageAPI({
|
|
|
pageNum: page,
|
|
|
size: limit,
|