From 19f5949491976905f3cd3fd53407ff4898080a46 Mon Sep 17 00:00:00 2001
From: yangfeng <wanwan926_4@163.com>
Date: 星期二, 12 三月 2024 17:07:58 +0800
Subject: [PATCH] bug修复
---
src/views/supplierManage/supplier/DetailSupplier.vue | 144 ++++++++++++++++++++++++++++++++++++++++++-----
1 files changed, 127 insertions(+), 17 deletions(-)
diff --git a/src/views/supplierManage/supplier/DetailSupplier.vue b/src/views/supplierManage/supplier/DetailSupplier.vue
index 6444bb3..5c9aee8 100644
--- a/src/views/supplierManage/supplier/DetailSupplier.vue
+++ b/src/views/supplierManage/supplier/DetailSupplier.vue
@@ -1,6 +1,6 @@
<template>
<div class="detail-view">
- <el-drawer :visible.sync="detailConfig.visible" size="80%" :before-close="handleClose" :wrapperClosable="false">
+ <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>
@@ -37,7 +37,9 @@
</ul>
<div class="business_scope">
<div class="content-title">{{ "璇︾粏鍦板潃" }}</div>
- <div class="content-data">{{ record ? record : "--" }}</div>
+ <div class="content-data">
+ {{ detailConfig.infomation.detailAddress ? detailConfig.infomation.detailAddress : "--" }}
+ </div>
</div>
</div>
</div>
@@ -63,17 +65,29 @@
</ul>
<div class="business_scope">
<div class="content-title">{{ "鍚堝悓闄勪欢" }}</div>
- <div class="content-data">{{ record ? record : "--" }}</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>
@@ -81,6 +95,7 @@
</template>
<script>
+import download from "downloadjs"
export default {
name: "DetailSupplier",
props: {
@@ -89,7 +104,8 @@
default: () => {
return {
visible: false,
- infomation: {}
+ infomation: {},
+ productListInfo:[]
}
}
}
@@ -107,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",
@@ -162,20 +191,81 @@
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: "鎴峰悕",
- leftValue: this.noContactDays,
+ leftValue: item.accountName,
rightStr: "寮�鎴疯",
- rightValue: this.newContactDays
+ rightValue: item.bank
},
{
leftStr: "璐﹀彿",
- leftValue: "",
+ leftValue: item.account,
rightStr: "",
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
@@ -205,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, "", "")
+ }
}
}
}
@@ -212,7 +318,7 @@
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style lang="scss" scoped>
-.detail-view {
+::v-deep {
.header {
height: 56px;
display: flex;
@@ -257,6 +363,7 @@
font-size: 14px;
}
.basic-info-content {
+ margin-top: 10px;
background: #fff;
ul {
padding-inline-start: 0;
@@ -318,8 +425,7 @@
}
}
}
-}
-::v-deep {
+
.el-drawer__header {
padding: 0;
margin-bottom: 0px;
@@ -340,4 +446,8 @@
margin: 0;
}
}
+ .downFlie{
+ color: blue !important;
+ cursor: pointer;
+ }
</style>
--
Gitblit v1.8.0