| | |
| | | <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> |
| | |
| | | </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> |
| | |
| | | </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> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import download from "downloadjs" |
| | | export default { |
| | | name: "DetailSupplier", |
| | | props: { |
| | |
| | | default: () => { |
| | | return { |
| | | visible: false, |
| | | infomation: {} |
| | | infomation: {}, |
| | | productListInfo:[] |
| | | } |
| | | } |
| | | } |
| | |
| | | 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", |
| | |
| | | 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 |
| | |
| | | // 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-srm/downloadContract?id=" + this.commonDetail.infomation.fileId |
| | | download(url, "", "") |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | font-size: 14px; |
| | | } |
| | | .basic-info-content { |
| | | margin-top: 10px; |
| | | background: #fff; |
| | | ul { |
| | | padding-inline-start: 0; |
| | |
| | | margin: 0; |
| | | } |
| | | } |
| | | .downFlie{ |
| | | color: blue !important; |
| | | cursor: pointer; |
| | | } |
| | | </style> |