zuozhengqing
2023-11-21 0712b49e5538589dac4859ca8cebf196caa954ab
src/views/purchaseManage/purchase/DetailSupplier.vue
@@ -121,6 +121,7 @@
                ref="tableListRef"
                :showSummary="showSummary"
                :table-list="tableList"
                @selTableCol="selTableCol"
              >
              </TableCommonView>
              <div class="table-bottom">
@@ -189,7 +190,18 @@
        mergeNumber: 5,
        totalName:'小计'
      },
      showCol: ['产品名称', '产品编码', '计量单位', '规格型号', '数量', '销售单价','价税合计','描述'],
      purchaseStatusList:getDataByType('purchaseStatus'),
      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() {
@@ -326,17 +338,23 @@
      this.tableList = {
        tableInfomation: item.productList?item.productList:[],
        selectIndex: true,
        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 },
        ],
        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;