zuozhengqing
2023-11-21 0712b49e5538589dac4859ca8cebf196caa954ab
src/views/supplierManage/supplier/DetailSupplier.vue
@@ -72,12 +72,26 @@
            </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-label" @click="expandClick('basic')">
              <i v-if="isBasicExpand" class="el-icon-arrow-down"></i>
              <i v-else class="el-icon-arrow-up"></i>
              <span style="margin-left: 10px">产品信息</span>
            </div>
            <div v-show="isBasicExpand" class="basic-info-content">
              <TableCommonView
                style="margin-top: 2px"
                class="content-table"
                ref="tableListRef"
                :table-list="tableList"
                @selTableCol="selTableCol"
              >
              </TableCommonView>
            </div>
          </div>
        </div>
      </div>
    </el-drawer>
@@ -93,7 +107,8 @@
      default: () => {
        return {
          visible: false,
          infomation: {}
          infomation: {},
          productListInfo:[]
        }
      }
    }
@@ -111,10 +126,23 @@
      addConfig: {},
      record: "", // 最新进展
      noContactDays: 0,
      newContactDays: ""
      newContactDays: "",
      tableList:{},
      showCol: ['产品名称', '产品编码', '计量单位', '规格型号', '数量', '销售单价','价税合计','描述'],
      tableColumn: [
        { label: "产品名称", prop: "name", min: 160,  },
        { label: "产品编码", prop: "number", min: 130, },
        { label: "计量单位", prop: "unit", min: 130 },
        { label: "规格型号", prop: "specifications", min: 130 },
        { label: "数量", prop: "amount", min: 130 },
        { label: "销售单价", prop: "price", min: 130 },
        { label: "价税合计", prop: "total", min: 130 },
        { label: "描述", prop: "remark", min: 130 },
      ],
    }
  },
  created() {
    console.log(this.detailConfig,"抽屉组件")
    this.setData(this.detailConfig.infomation)
    this.addConfig = {
      id_name: "sales_leads_id",
@@ -166,6 +194,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: "户名",
@@ -180,6 +246,26 @@
          rightValue: ""
        }
      ]
      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