From 9b7020d0fe83aa848e92551c5252add6e05c2c5b Mon Sep 17 00:00:00 2001
From: yangfeng <wanwan926_4@163.com>
Date: 星期三, 13 三月 2024 10:34:25 +0800
Subject: [PATCH] 状态就绪问题修改
---
src/views/supplierManage/supplier/DetailSupplier.vue | 137 +++++++++++++++++++++++++++++++++++++++------
1 files changed, 119 insertions(+), 18 deletions(-)
diff --git a/src/views/supplierManage/supplier/DetailSupplier.vue b/src/views/supplierManage/supplier/DetailSupplier.vue
index 04498b2..5c9aee8 100644
--- a/src/views/supplierManage/supplier/DetailSupplier.vue
+++ b/src/views/supplierManage/supplier/DetailSupplier.vue
@@ -1,12 +1,6 @@
<template>
<div class="detail-view">
- <el-drawer
- :visible.sync="detailConfig.visible"
- size="80%"
- :before-close="handleClose"
- :wrapperClosable="false"
- :append-to-body="true"
- >
+ <el-drawer :visible.sync="detailConfig.visible" size="80%" :before-close="handleClose" :append-to-body="true">
<template slot="title">
<div class="header">
<span class="header-label">渚涘簲鍟嗗悕绉�</span>
@@ -71,19 +65,29 @@
</ul>
<div class="business_scope">
<div class="content-title">{{ "鍚堝悓闄勪欢" }}</div>
- <div class="content-data">
- {{ detailConfig.infomation.contract.fileName ? detailConfig.infomation.contract.fileName : "--" }}
- </div>
+ <div class="content-data downFlie" @click="downLoadFiles">
+ {{ detailConfig.infomation.contract.fileName ? detailConfig.infomation.contract.fileName : "--" }}
+ </div>
</div>
</div>
</div>
</div>
- <div v-if="activeName === 'second'" class="second">
- <!-- <FollowupRecords
- :isDetail="true"
- :follow-record="detailConfig.infomation.FollowRecord"
- :add-config="addConfig"
- /> -->
+ <div v-if="activeName === 'second'" class="detail">
+ <!-- 閲囪喘璁㈠崟-鍩烘湰淇℃伅 -->
+ <!-- 浜у搧淇℃伅 -->
+ <div class="basic-info">
+ <div class="basic-info-content" >
+ <el-button type="primary" size="mini" @click="toPurchaseBtn"><i class="el-icon-plus"></i> 鏂板缓</el-button>
+ <TableCommonView
+ style="margin-top: 2px"
+ class="content-table"
+ ref="tableListRef"
+ :table-list="tableList"
+ @selTableCol="selTableCol"
+ >
+ </TableCommonView>
+ </div>
+ </div>
</div>
</div>
</el-drawer>
@@ -91,6 +95,7 @@
</template>
<script>
+import download from "downloadjs"
export default {
name: "DetailSupplier",
props: {
@@ -99,7 +104,8 @@
default: () => {
return {
visible: false,
- infomation: {}
+ infomation: {},
+ productListInfo:[]
}
}
}
@@ -117,10 +123,23 @@
addConfig: {},
record: "", // 鏈�鏂拌繘灞�
noContactDays: 0,
- newContactDays: ""
+ newContactDays: "",
+ tableList:{},
+ showCol: ['閲囪喘鍗曞彿', '閲囪喘鍗曞悕绉�', '鍗曟嵁绫诲瀷', '渚涘簲鍟嗗悕绉�', '閲囪喘鏁伴噺', '鏀惰揣浠撳簱','缁忓姙浜�','鍒跺崟浜�'],
+ tableColumn: [
+ { label: "鍗曟嵁绫诲瀷", prop: "orderType", min: 130 },
+ { label: "閲囪喘鍗曞彿", prop: "number", min: 150,default:true},
+ { label: "閲囪喘鍗曞悕绉�", prop: "name", min: 130 },
+ { label: "渚涘簲鍟嗗悕绉�", prop: "supplierName", min: 130 },
+ { label: "閲囪喘鏁伴噺", prop: "quantity", min: 130 },
+ { label: "鏀惰揣浠撳簱", prop: "warehouse", min: 130 },
+ { label: "缁忓姙浜�", prop: "handledBy", min: 130 },
+ { label: "鍒跺崟浜�", prop: "creator", min: 130 }
+ ],
}
},
created() {
+ console.log(this.commonDetail,"鎶藉眽缁勪欢props")
this.setData(this.detailConfig.infomation)
this.addConfig = {
id_name: "sales_leads_id",
@@ -172,6 +191,44 @@
rightValue: ""
}
]
+ this.purchaseList = [
+ {
+ leftStr: "閲囪喘鍗曞彿",
+ leftValue: item.number,
+ rightStr: "閲囪喘鍗曞悕绉�",
+ rightValue: item.name
+ },
+ {
+ leftStr: "渚涘簲鍟嗙被鍨�",
+ leftValue: item.supplierType,
+ rightStr: "鎵�灞炶涓�",
+ rightValue: item.industry
+ },
+ {
+ leftStr: "鍗曟嵁绫诲瀷",
+ leftValue: item.contact,
+ rightStr: "渚涘簲鍟嗗悕绉�",
+ rightValue: item.phone
+ },
+ {
+ leftStr: "閲囪喘鏁伴噺",
+ leftValue: item.responsiblePersonName,
+ rightStr: "鏀惰揣浠撳簱",
+ rightValue: item.url
+ },
+ {
+ leftStr: "缁忓姙浜�",
+ leftValue: item.email,
+ rightStr: "鍒跺崟浜�",
+ rightValue: ""
+ },
+ {
+ leftStr: "鐘舵��",
+ leftValue: item.email,
+ rightStr: "",
+ rightValue: ""
+ },
+ ]
this.dynamicInfoList = [
{
leftStr: "鎴峰悕",
@@ -186,6 +243,29 @@
rightValue: ""
}
]
+ this.detailConfig.productListInfo.map((item)=>{
+ item.supplierName=item.supplier.name
+ })
+ this.tableList = {
+ tableInfomation: this.detailConfig.productListInfo?this.detailConfig.productListInfo:[],
+ selectIndex: true,
+ showcol: this.showCol,
+ allcol:[],
+ tableColumn:this.setColumnVisible(this.showCol),
+ };
+ this.tableList.allcol = this.tableList.tableColumn.filter(ele=>!ele.default).map(ele=>ele.label);
+ },
+ selTableCol(val) {
+ this.showcol = val;
+ this.tableList.tableColumn = this.setColumnVisible(val);
+ },
+ setColumnVisible(showCol){
+ return this.tableColumn.map(ele=>{
+ return {
+ ...ele,
+ isShowColumn:showCol.includes(ele.label)
+ }
+ })
},
handleClose() {
this.detailConfig.visible = false
@@ -215,6 +295,22 @@
// console.log(totalDays)
return totalDays // 鐩稿樊鐨勫ぉ鏁�
+ },
+ toPurchaseBtn(){
+ this.$router.push({
+ name: 'purchase',
+ params: {
+ supplierId:this.commonDetail.infomation.ID,
+ supplierName:this.commonDetail.infomation.name
+ }
+ });
+ },
+ // 涓嬭浇鍚堝悓闄勪欢
+ downLoadFiles(){
+ if(this.detailConfig.infomation.contract.fileName){
+ let url = "/api/downloadContract?id=" + this.commonDetail.infomation.fileId
+ download(url, "", "")
+ }
}
}
}
@@ -267,6 +363,7 @@
font-size: 14px;
}
.basic-info-content {
+ margin-top: 10px;
background: #fff;
ul {
padding-inline-start: 0;
@@ -349,4 +446,8 @@
margin: 0;
}
}
+ .downFlie{
+ color: blue !important;
+ cursor: pointer;
+ }
</style>
--
Gitblit v1.8.0