yangfeng
2023-09-06 29b5ffe318b8ab32865ebebedd865ea2aa3f6c7e
供应商列表相关bug修复及样式调整
9个文件已修改
704 ■■■■ 已修改文件
src/assets/style/index.scss 161 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/layout/components/AppMain.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/layout/components/appHeader/index.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/makepager/CommonFormTableView.vue 114 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/makepager/TableCommonView.vue 41 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/makepager/pager/PagerView.vue 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/purchaseManage/purchase/index.vue 171 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/supplierManage/supplier/AddNewProduct.vue 69 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/supplierManage/supplier/index.vue 132 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/style/index.scss
@@ -12,117 +12,126 @@
  outline: 0;
}
// 间距
.margin_left_3px{
  margin-left:3px;
.margin_left_3px {
  margin-left: 3px;
}
.margin_left_5px{
  margin-left:5px;
.margin_left_5px {
  margin-left: 5px;
}
.margin_left_10px{
  margin-left:10px;
.margin_left_10px {
  margin-left: 10px;
}
.margin_left_15px{
  margin-left:15px;
.margin_left_15px {
  margin-left: 15px;
}
.margin_left_20px{
  margin-left:20px;
.margin_left_20px {
  margin-left: 20px;
}
.margin_right_5px{
  margin-right:5px;
.margin_right_5px {
  margin-right: 5px;
}
.margin_right_10px{
  margin-right:10px;
.margin_right_10px {
  margin-right: 10px;
}
.margin_right_15px{
  margin-right:15px!important;
.margin_right_15px {
  margin-right: 15px !important;
}
.margin_right_20px{
  margin-right:20px;
.margin_right_20px {
  margin-right: 20px;
}
.margin_right_40px{
  margin-right:40px;
.margin_right_40px {
  margin-right: 40px;
}
.margin_top_10px{
  margin-top:10px;
.margin_top_10px {
  margin-top: 10px;
}
.margin_top_20px{
  margin-top:20px;
.margin_top_20px {
  margin-top: 20px;
}
.margin_top_30px{
  margin-top:30px;
.margin_top_30px {
  margin-top: 30px;
}
.margin_top_35px{
  margin-top:35px;
.margin_top_35px {
  margin-top: 35px;
}
.margin_top_40px{
  margin-top:40px;
.margin_top_40px {
  margin-top: 40px;
}
.margin_bottom_2px{
  margin-bottom:2px;
.margin_bottom_2px {
  margin-bottom: 2px;
}
.margin_bottom_10px{
  margin-bottom:10px!important;
.margin_bottom_10px {
  margin-bottom: 10px !important;
}
.margin_bottom_15px{
  margin-bottom:15px!important;
.margin_bottom_15px {
  margin-bottom: 15px !important;
}
.margin_bottom_20px{
  margin-bottom:20px!important;
.margin_bottom_20px {
  margin-bottom: 20px !important;
}
.margin_bottom_30px{
  margin-bottom:30px!important;
.margin_bottom_30px {
  margin-bottom: 30px !important;
}
.margin_bottom_40px{
  margin-bottom:40px!important;
.margin_bottom_40px {
  margin-bottom: 40px !important;
}
.margin_bottom_50px{
  margin-bottom:50px!important;
.margin_bottom_50px {
  margin-bottom: 50px !important;
}
//
.float_left{
  float:left;
//
.float_left {
  float: left;
}
.float_right{
  float:right;
.float_right {
  float: right;
}
//
.line_height_32px{
  line-height:32px;
//
.line_height_32px {
  line-height: 32px;
}
.text_indent_20{
  text-indent:20px;
.text_indent_20 {
  text-indent: 20px;
}
.text_indent_30{
  text-indent:30px;
.text_indent_30 {
  text-indent: 30px;
}
// 字体大小
.font_size_12{
  font-size:12px;
.font_size_12 {
  font-size: 12px;
}
.font_size_13{
  font-size:13px;
.font_size_13 {
  font-size: 13px;
}
.font_size_14{
  font-size:14px;
.font_size_14 {
  font-size: 14px;
}
.font_size_15{
  font-size:15px;
.font_size_15 {
  font-size: 15px;
}
.font_size_16{
  font-size:16px;
.font_size_16 {
  font-size: 16px;
}
.font_size_18{
  font-size:18px;
.font_size_18 {
  font-size: 18px;
}
.font_size_20{
  font-size:20px!important;
.font_size_20 {
  font-size: 20px !important;
}
.font_size_30{
  font-size:30px!important;
.font_size_30 {
  font-size: 30px !important;
}
.font_size_40{
  font-size:40px!important;
.font_size_40 {
  font-size: 40px !important;
}
.cursor_pointer{
.cursor_pointer {
  cursor: pointer;
}
}
.btn-pager {
  display: flex;
  margin-top: 10px;
  // background: #fff;
  .page {
    margin-left: auto;
  }
}
src/components/layout/components/AppMain.vue
@@ -33,7 +33,7 @@
  width: calc(100% - 210px);
  .app-main-content {
    width: 100%;
    overflow-y: auto;
    overflow-y: hidden;
  }
}
</style>
src/components/layout/components/appHeader/index.vue
@@ -41,6 +41,7 @@
  line-height: 55px;
  background-color: #fff;
  margin-bottom: 10px;
  margin-left: -10px;
  .header-title {
    margin-left: 16px;
    font-size: 16px;
src/components/makepager/CommonFormTableView.vue
@@ -1,12 +1,20 @@
<template>
  <div class="page-view">
    <el-form ref="form" :model="tableList" :show-message="false" label-position="right"
    >
      <el-table :data="tableList.tableData" style="width: 100%"
      :show-summary="showSummary.show"
      :summary-method="getSummaries"
      :span-method="arraySpanMethod">
        <el-table-column type="index" v-if="tableList.tableColumn.length>0" label="编号" width="50" align="center"></el-table-column>
    <el-form ref="form" :model="tableList" :show-message="false" label-position="right">
      <el-table
        :data="tableList.tableData"
        style="width: 100%"
        :show-summary="showSummary.show"
        :summary-method="getSummaries"
        :span-method="arraySpanMethod"
      >
        <el-table-column
          type="index"
          v-if="tableList.tableColumn.length > 0"
          label="编号"
          width="50"
          align="center"
        ></el-table-column>
        <el-table-column
          v-for="(item, i) in tableList.tableColumn"
          :key="i"
@@ -47,7 +55,7 @@
                  v-model="scope.row[item.prop]"
                  :fetch-suggestions="querySearchAsync"
                  value-key="name"
                  style='width:calc(100% - 70px)'
                  style="width: calc(100% - 70px)"
                  size="mini"
                  @select="
                    (val) => {
@@ -55,13 +63,13 @@
                    }
                  "
                ></el-autocomplete>
                <div class="common-select-btn" @click="selClientClick(scope.row, item.prop,scope)">
                <div class="common-select-btn" @click="selClientClick(scope.row, item.prop, scope)">
                  <i class="el-icon-circle-plus-outline" title="选择"></i>
                </div>
                <div class="common-select-btn" @click="clearupClient(scope.row,scope)">
                <div class="common-select-btn" @click="clearupClient(scope.row, scope)">
                  <i class="el-icon-remove-outline" title="清除"></i>
                </div>
                <div class="common-select-btn" v-if="scope.$index!=0" @click="deleteClient(scope.row,scope)">
                <div class="common-select-btn" v-if="scope.$index != 0" @click="deleteClient(scope.row, scope)">
                  <i class="el-icon-delete" title="删除"></i>
                </div>
              </div>
@@ -102,9 +110,9 @@
              :prop="'tableData.' + scope.$index + '.' + item.prop"
              :rules="[{ required: item.isRequird ? true : false, message: '输入不能为空' }]"
            >
             <template v-if="item.multiply">
              <template v-if="item.multiply">
                <el-input-number
                  :value="scope.row[showSummary.multiply[0]]*scope.row[showSummary.multiply[1]]"
                  :value="scope.row[showSummary.multiply[0]] * scope.row[showSummary.multiply[1]]"
                  placeholder=""
                  :disabled="item.disabled"
                  :min="0"
@@ -118,22 +126,22 @@
                    }
                  "
                ></el-input-number>
             </template>
             <template v-else>
              <el-input-number
                v-model="scope.row[item.prop]"
                placeholder=""
                :min="0"
                :precision="2"
                :controls="false"
                size="mini"
                style="width: 100%; margin-right: 5px"
                @change="
                  (val) => {
                    commonInputChange(val, item.prop, scope.row)
                  }
                "
              ></el-input-number>
              </template>
              <template v-else>
                <el-input-number
                  v-model="scope.row[item.prop]"
                  placeholder=""
                  :min="0"
                  :precision="2"
                  :controls="false"
                  size="mini"
                  style="width: 100%; margin-right: 5px"
                  @change="
                    (val) => {
                      commonInputChange(val, item.prop, scope.row)
                    }
                  "
                ></el-input-number>
              </template>
            </el-form-item>
            <span v-else>{{ scope.row[item.prop] }}</span>
@@ -158,7 +166,7 @@
</template>
<script>
import { getProductListFromGrpc,getProductList } from "@/api/productManage/product"
import { getProductListFromGrpc, getProductList } from "@/api/productManage/product"
import SelectCommonDialog from "@/views/other/commonDialog/SelectCommonDialog"
export default {
  name: "CommmonFormTableView",
@@ -168,9 +176,9 @@
      type: Boolean,
      default: false
    },
    sign:{
      type:String,
      default:''
    sign: {
      type: String,
      default: ""
    },
    productTableList: {
      type: Object,
@@ -192,7 +200,7 @@
          total: false,
          refundable: false,
          sumProp: [],
          multiply:[],
          multiply: [],
          titleProp: ["#", "产品名称"],
          mergeNumber: 1
        }
@@ -201,7 +209,7 @@
    recalculateShow: {
      type: [Boolean],
      defalut: true
    },
    }
  },
  data() {
    return {
@@ -221,15 +229,15 @@
    this.tableList = this.productTableList
  },
  computed: {},
  watch:{
    productTableList(){
  watch: {
    productTableList() {
      this.tableList = this.productTableList
    }
  },
  methods: {
    // 产品名称
    async getProductList() {
      let fn = this.sign == "purchase" ? getProductList : getProductListFromGrpc;
      let fn = this.sign == "purchase" ? getProductList : getProductListFromGrpc
      await fn({
        page: 1,
        pageSize: 100
@@ -298,7 +306,7 @@
        }
        if (column.property === "total") {
          this.total = sums[index]
          this.$emit('getSummaries',this.total)
          this.$emit("getSummaries", this.total)
        }
      })
      return sums
@@ -394,7 +402,7 @@
      }
      this.$emit("selCommonName", selRow)
    },
    selClientClick(row, prop,scope) {
    selClientClick(row, prop, scope) {
      console.log(row, prop)
      this.productIndex = scope.$index
      this.editSelCommonConfig.title = "产品名称"
@@ -426,21 +434,20 @@
            ite.unit = item.unit
            ite.deliveryTime = item.deliveryTime
            ite.shippingDuration = item.shippingDuration
            this.$set(this.tableList.tableData,index,ite)
            this.$set(this.tableList.tableData, index, ite)
            this.$forceUpdate()
          }
        })
        console.log(this.tableList.tableData,'=====chanp')
        console.log(this.tableList.tableData, "=====chanp")
      }
    },
    // 清除已选择用户
    clearupClient(row,scope) {
    clearupClient(row, scope) {
      this.productIndex = scope.$index
      this.tableList.tableData.map((ite, index) => {
        console.log(scope.$index)
        if (scope.$index  && scope.$index  >= 0) {
        if (scope.$index && scope.$index >= 0) {
          if (index === this.productIndex) {
            ite.name = ""
            ite.amount = 1
@@ -462,14 +469,13 @@
      })
      this.$emit("clearupProduct", this.tableList.tableData)
    },
    deleteClient(row,scope){
      if(this.tableList.tableData.length==1){
        this.$message.error('至少保留一条,不能刪除了!')
        return true;
    deleteClient(row, scope) {
      if (this.tableList.tableData.length == 1) {
        this.$message.error("至少保留一条,不能刪除了!")
        return true
      }
      this.tableList.tableData.splice(scope.$index,1)
    },
      this.tableList.tableData.splice(scope.$index, 1)
    }
  }
}
</script>
@@ -477,7 +483,7 @@
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style lang="scss" scoped>
.page-view {
  min-width:100px;
  min-width: 100px;
  .el-form-item {
    margin-bottom: 0;
    .custom-name {
src/components/makepager/TableCommonView.vue
@@ -6,12 +6,17 @@
      :data="tableList.tableInfomation"
      tooltip-effect="dark"
      style="width: 100%"
      :height="'calc(100% - 0px)'"
      :max-height="tableList.maxHeight"
      :lazy="tableList.lazy"
      :show-summary="showSummary.show"
      :summary-method="getSummaries"
      :span-method="arraySpanMethod"
      @selection-change="handleSelectionChange"
      :header-cell-style="{ background: '#ECF4FF', color: '#666' }"
      :header-cell-style="{ background: '#f1f3f8', color: '#000009' }"
      :highlight-current-row="tableList.highlight"
      :row-class-name="tableRowClassName"
      @row-click="tableRowClick"
      :row-key="tableList.key"
      :default-expand-all="tableList.isDefaultExpandAll"
      :tree-props="{ children: 'child', hasChildren: 'hasChildren' }"
    >
      <el-table-column v-if="tableList.selectBox" type="selection" width="40"> </el-table-column>
      <el-table-column v-if="tableList.selectIndex" type="index" label="序号" width="50"> </el-table-column>
@@ -122,6 +127,13 @@
          totalName: "本页总计"
        }
      }
    },
    // 选中的样式
    selectClassRow: {
      type: Object,
      default: () => {
        return {}
      }
    }
  },
  data() {
@@ -130,10 +142,6 @@
  computed: {},
  mounted() {},
  methods: {
    tableRowClick(row) {
      console.log(row)
      this.$emit("tableRowClick", row)
    },
    handleReserve(row) {
      return row._id ? row._id : row.id
    },
@@ -267,6 +275,18 @@
    // 公共详情
    selCommonClick(row) {
      this.$emit("selCommonClick", row)
    },
    // 单选行相关
    tableRowClassName({ row }) {
      if (Object.keys(this.selectClassRow).length > 0) {
        if (row.id == this.selectClassRow.id) {
          return "onSelect"
        }
      }
      this.$emit("tableRowClassName", row)
    },
    tableRowClick(row) {
      this.$emit("tableRowClick", row)
    }
  }
}
@@ -278,6 +298,7 @@
  // margin-top: 20px;
  margin-right: 10px;
  // margin-bottom: 40px;
  height: 100%;
  .blue {
    width: 70px;
    text-align: center;
@@ -311,8 +332,8 @@
  }
}
::v-deep {
  .el-table__footer-wrapper  {
    tbody td.el-table__cell{
  .el-table__footer-wrapper {
    tbody td.el-table__cell {
      background-color: #fff;
      font-weight: bold;
    }
src/components/makepager/pager/PagerView.vue
@@ -1,6 +1,7 @@
<template>
  <div class="page-view">
    <el-pagination
      background
      :current-page="pagerOptions.currPage"
      :page-sizes="pageSizes"
      :page-size="pagerOptions.pageSize"
@@ -9,6 +10,16 @@
      v-on="$listeners"
    >
    </el-pagination>
    <!-- :current-page.sync="searchParam.page"
        :page-size="searchParam.pageSize"
        background
        :page-sizes="[15, 30]"
        layout="total, sizes, prev, pager, next, jumper"
        :total="total"
        @current-change="changePage"
        @size-change="handleSizeChange"
        @prev-click="prevPage"
        @next-click="nextPage" -->
  </div>
</template>
@@ -22,7 +33,7 @@
    },
    layout: {
      type: String,
      default: "total, sizes, prev, pager, next"
      default: "total, sizes, prev, pager, next, jumper"
    },
    pagerOptions: {
      type: Object,
src/views/purchaseManage/purchase/index.vue
@@ -15,7 +15,7 @@
      </div>
      <template>
        <TableCommonView
         class="content-table"
          class="content-table"
          ref="tableListRef"
          :table-list="tableList"
          @selCommonClick="selCommonClick"
@@ -23,15 +23,15 @@
          <template slot="tableButton">
            <el-table-column label="状态" width="120">
              <template slot-scope="scope">
               {{ getpurchaseStatus(scope.row.status) }}
                {{ getpurchaseStatus(scope.row.status) }}
              </template>
            </el-table-column>
            <el-table-column label="操作" width="120" fixed="right">
              <template slot-scope="scope">
                <el-button type="text"  size="small" @click="editClick(scope.row)"  style="margin-right: 5px"
                <el-button type="text" size="small" @click="editClick(scope.row)" style="margin-right: 5px"
                  >编辑</el-button
                >
                <el-button  @click="submitClick(scope.row)" type="text" size="small">提交</el-button>
                <el-button @click="submitClick(scope.row)" type="text" size="small">提交</el-button>
              </template>
            </el-table-column>
          </template>
@@ -41,48 +41,45 @@
        </div>
      </template>
    </div>
    <!-- 新建/编辑销售线索 -->
    <!-- <AddSalesLeadDialog v-if="editSalesLeadConfig.visible" :edit-rightContent-config="editSalesLeadConfig" /> -->
    <!-- 详情 -->
    <DetailSupplier v-if="commonDetail.visible" :common-detail="commonDetail"  />
    <DetailSupplier v-if="commonDetail.visible" :common-detail="commonDetail" />
    <!-- 新建/编辑 -->
    <AddPurchase v-if="editConfig.visible" :edit-common-config="editConfig" />
  </div>
</template>
<script>
import pageMixin from "@/components/makepager/pager/mixin/pageMixin"
import {
  getPurchaseList,getPurchaseInfo,submitPurchase,
} from "@/api/purchaseManage/purchase";
import { getPurchaseList, getPurchaseInfo, submitPurchase } from "@/api/purchaseManage/purchase"
import DetailSupplier from "@/views/purchaseManage/purchase/DetailSupplier"
import AddPurchase from "@/views/purchaseManage/purchase/components/AddPurchase"
import { getDataByType } from "@/api/data";
import { getDataByType } from "@/api/data"
export default {
  name: "SupplierManage",
  props: {},
  components: { DetailSupplier,AddPurchase },
  components: { DetailSupplier, AddPurchase },
  mixins: [pageMixin],
  computed: {},
  data() {
    return {
      tableLoading:false,
      tableLoading: false,
      tableList: {}, // 列表
      selValueList: [],
      commonDetail: {
        visible: false,
        infomation: {}
      },
      search:'',
      editRow:{},
      search: "",
      editRow: {},
      editConfig: {
        visible: false,
        title: "创建",
        infomation: {}
      },
      purchaseStatusList:getDataByType('purchaseStatus'),
      purchaseStatusList: getDataByType("purchaseStatus")
    }
  },
  created() {
@@ -94,11 +91,11 @@
      if (val) {
        for (let i in this.purchaseStatusList) {
          if (this.purchaseStatusList[i].id == val) {
            return this.purchaseStatusList[i].name;
            return this.purchaseStatusList[i].name
          }
        }
      } else {
        return "--";
        return "--"
      }
    },
    setTable() {
@@ -107,13 +104,13 @@
        selectIndex: true,
        tableColumn: [
          { label: "采购单号", prop: "number", min: 150, isCommonClick: true },
          { label: "采购单名称", prop: "name", min: 130, isCommonClick: true},
          { label: "采购单名称", prop: "name", min: 130, isCommonClick: true },
          { label: "单据类型", prop: "orderType", min: 130 },
          { label: "供应商名称", prop: "contact", min: 130 },
          { label: "采购数量", prop: "quantity", min: 130 },
          { label: "收货仓库", prop: "warehouse", min: 130 },
          { label: "经办人", prop: "handledBy", min: 130 },
          { label: "制单人", prop: "creator", min: 130 },
          { label: "制单人", prop: "creator", min: 130 }
        ]
      }
    },
@@ -138,11 +135,11 @@
    // 搜索
    searchClick(val, content) {
      console.log(val, content)
      this.search =  content
      this.search = content
      this.getData()
    },
    resetClick() {
      this.search = ''
      this.search = ""
      this.getData()
    },
    // 新建
@@ -152,89 +149,88 @@
      this.editConfig.visible = true
      this.editConfig.title = "创建"
      this.editConfig.infomation = {
        productList:[],
        purchaseTypeId:'',
        supplierId:'',
        supplierName:'',
        orderSource:'手动创建',
        name:'',
        contact:'',
        phone:'',
          signingDate:'',
          deliveryDate:'',
          remark:'',
          wholeDiscountType:null,
          wholeDiscount:0,
          priceAdjustmentType:null,
          priceAdjustment:0,
          realTotalPrice:0,
       }
        productList: [],
        purchaseTypeId: "",
        supplierId: "",
        supplierName: "",
        orderSource: "手动创建",
        name: "",
        contact: "",
        phone: "",
        signingDate: "",
        deliveryDate: "",
        remark: "",
        wholeDiscountType: null,
        wholeDiscount: 0,
        priceAdjustmentType: null,
        priceAdjustment: 0,
        realTotalPrice: 0
      }
    },
    // 编辑
    editClick(row){
      this.tableLoading=true
      getPurchaseInfo({id:row.ID}).then((res) => {
    editClick(row) {
      this.tableLoading = true
      getPurchaseInfo({ id: row.ID }).then((res) => {
        if (res.code == 200) {
          this.tableLoading=false
          this.tableLoading = false
          this.editConfig.visible = true
          this.editConfig.title = "编辑"
          this.editConfig.infomation = {
            productList:res.data.productList,
            supplierName:res.data.purchase.supplier.name,
            ...res.data.purchase,
           }
        }else{
          this.$message.error(res.msg?res.msg+',':''+'获取信息失败!')
          this.editConfig.infomation = {
            productList: res.data.productList,
            supplierName: res.data.purchase.supplier.name,
            ...res.data.purchase
          }
        } else {
          this.$message.error(res.msg ? res.msg + "," : "" + "获取信息失败!")
        }
      })
      setTimeout(()=>{
        this.tableLoading=false
      },3000)
      setTimeout(() => {
        this.tableLoading = false
      }, 3000)
      // this.editRow = row;
      // this.$refs.add.islook = true;
    },
    // 确认发货
    submitClick(row) {
        this.$confirm("是否提交?", "提示", {
          confirmButtonText: "确定",
          cancelButtonText: "取消",
          type: "warning"
        })
          .then(() => {
            console.log("dddd")
            submitPurchase({ id: row.ID }).then((response) => {
              if (response.code === 200) {
                this.$message.success("提交成功")
                this.getData()
              } else {
                this.$message.warning("提交失败")
              }
            })
      this.$confirm("是否提交?", "提示", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning"
      })
        .then(() => {
          console.log("dddd")
          submitPurchase({ id: row.ID }).then((response) => {
            if (response.code === 200) {
              this.$message.success("提交成功")
              this.getData()
            } else {
              this.$message.warning("提交失败")
            }
          })
          .catch(() => {})
        })
        .catch(() => {})
    },
    // 详情
    selCommonClick(row) {
      console.log(row)
      this.tableLoading=true
      getPurchaseInfo({id:row.ID}).then((res) => {
      this.tableLoading = true
      getPurchaseInfo({ id: row.ID }).then((res) => {
        if (res.code == 200) {
          this.tableLoading=false
          this.tableLoading = false
          this.commonDetail.visible = true
          this.commonDetail.infomation = {
            productList:res.data.productList,
          this.commonDetail.infomation = {
            productList: res.data.productList,
            ...res.data.purchase
           }
        }else{
          this.$message.error(res.msg?res.msg+',':''+'获取信息失败!')
          }
        } else {
          this.$message.error(res.msg ? res.msg + "," : "" + "获取信息失败!")
        }
      })
      setTimeout(()=>{
        this.tableLoading=false
      },3000)
      setTimeout(() => {
        this.tableLoading = false
      }, 3000)
    }
  }
}
@@ -243,10 +239,10 @@
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style lang="scss" scoped>
.rightContent {
  width:100%;
  height:calc(100% - 10px);
  width: 100%;
  height: calc(100% - 10px);
  .content-box {
    height:100%;
    height: 100%;
    .supplier-search {
      display: flex;
      align-items: center;
@@ -255,11 +251,12 @@
        margin-right: 20px;
      }
    }
    .content-table{
    .content-table {
      // height:calc(100% - 60px - 42px);
    }
    .btn-pager {
      display: flex;
      // background: #fff;
      .page {
        margin-left: auto;
      }
src/views/supplierManage/supplier/AddNewProduct.vue
@@ -14,6 +14,7 @@
        <div class="basic-info-title">产品信息</div>
        <div class="basic-info-view">
          <CommonFormTableView
            ref="productTable"
            :product-table-list="productTableList"
            :detail-enter="detailEnter"
            @inputContent="inputContent"
@@ -78,41 +79,45 @@
    },
    // 保存
    saveClick() {
      console.log(this.editConfig.infomation)
      for (let i = 0; i < this.tableData.length; i++) {
        if (this.tableData[i].name.length === 0) {
          this.isNoProduct = true
          break
        } else {
          this.isNoProduct = false
        }
      }
      if (this.isNoProduct) {
        this.$message.error("产品名称不能为空")
      } else {
        if (this.editConfig.title === "添加") {
          createProduct({
            list: this.tableData
          }).then((res) => {
            console.log(res)
            this.editConfig.visible = false
            if (res.code === 200) {
              this.$message.success("添加成功")
              this.$parent.getProductList()
      this.$refs.productTable.$refs.form.validate((valid) => {
        if (valid) {
          console.log(this.editConfig.infomation)
          for (let i = 0; i < this.tableData.length; i++) {
            if (this.tableData[i].name.length === 0) {
              this.isNoProduct = true
              break
            } else {
              this.isNoProduct = false
            }
          })
        } else {
          const params = this.saveParams()
          updateProduct(params).then((res) => {
            console.log(res)
            this.editConfig.visible = false
            if (res.code === 200) {
              this.$message.success("编辑成功")
              this.$parent.getProductList()
          }
          if (this.isNoProduct) {
            this.$message.error("产品名称不能为空")
          } else {
            if (this.editConfig.title === "添加") {
              createProduct({
                list: this.tableData
              }).then((res) => {
                console.log(res)
                this.editConfig.visible = false
                if (res.code === 200) {
                  this.$message.success("添加成功")
                  this.$parent.getProductList()
                }
              })
            } else {
              const params = this.saveParams()
              updateProduct(params).then((res) => {
                console.log(res)
                this.editConfig.visible = false
                if (res.code === 200) {
                  this.$message.success("编辑成功")
                  this.$parent.getProductList()
                }
              })
            }
          })
          }
        }
      }
      })
    },
    saveParams() {
      let data = this.editConfig.infomation
src/views/supplierManage/supplier/index.vue
@@ -13,49 +13,30 @@
        </div>
      </div>
      <template>
        <el-table
          ref="tableSupplier"
          border
          :data="tableList.tableInfomation"
          tooltip-effect="dark"
          style="width: 100%"
          :lazy="tableList.lazy"
          highlight-current-row
          @row-click="tableRowClick"
          :header-cell-style="{ background: '#ECF4FF', color: '#666' }"
        >
          <el-table-column type="index" label="序号" width="50"> </el-table-column>
          <el-table-column
            v-for="(item, i) in tableList.tableColumn"
            :key="i"
            :prop="item.prop"
            :label="item.label"
            :width="item.width"
            :min-width="item.min"
            show-overflow-tooltip
            :sortable="item.sortable"
        <div class="list-view">
          <TableCommonView
            ref="tableSupplier"
            :table-list="tableList"
            @selCommonClick="selCommonClick"
            @tableRowClick="tableRowClick"
          >
            <template slot-scope="scope">
              <div v-if="item.status" :class="scope.row.status">{{ scope.row[item.prop] }}</div>
              <span
                v-else-if="item.isCommonClick && scope.row[item.prop]"
                class="sel-name"
                @click="selCommonClick(scope.row)"
                >{{ scope.row[item.prop] }}</span
              >
              <span v-else>{{ scope.row[item.prop] ? scope.row[item.prop] : "--" }}</span>
            <template slot="tableButton">
              <el-table-column label="操作" width="100">
                <template slot-scope="scope">
                  <el-button
                    v-if="scope.row.status === 0"
                    @click="enableClick(scope.row, '启用')"
                    type="text"
                    size="small"
                    >启用</el-button
                  >
                  <el-button v-else @click="enableClick(scope.row, '停用')" type="text" size="small">停用</el-button>
                  <el-button @click="modifyClick(scope.row)" type="text" size="small">修改</el-button>
                </template>
              </el-table-column>
            </template>
          </el-table-column>
          <el-table-column label="操作" width="100">
            <template slot-scope="scope">
              <el-button v-if="scope.row.status === 0" @click="enableClick(scope.row, '启用')" type="text" size="small"
                >启用</el-button
              >
              <el-button v-else @click="enableClick(scope.row, '停用')" type="text" size="small">停用</el-button>
              <el-button @click="modifyClick(scope.row)" type="text" size="small">修改</el-button>
            </template>
          </el-table-column>
        </el-table>
          </TableCommonView>
        </div>
        <div class="btn-pager">
          <PagerView class="page" :pager-options="pagerOptions" v-on="pagerEvents" />
        </div>
@@ -79,22 +60,24 @@
        </div>
      </div>
      <template>
        <TableCommonView
          ref="tableListProduct"
          :table-list="productTableList"
          @selCommonClick="selCommonClick"
          @getSelectArray="getSelectArray"
        >
          <template slot="tableButton">
            <el-table-column label="操作" width="170">
              <template slot-scope="scope">
                <el-button @click="raleteClick(scope.row)" type="text" size="small">相关供应商</el-button>
                <el-button @click="editClick(scope.row)" type="text" size="small">修改</el-button>
                <el-button @click="delClick(scope.row)" type="text" size="small">删除</el-button>
              </template>
            </el-table-column>
          </template>
        </TableCommonView>
        <div class="list-view">
          <TableCommonView
            ref="tableListProduct"
            :table-list="productTableList"
            @selCommonClick="selCommonClick"
            @getSelectArray="getSelectArray"
          >
            <template slot="tableButton">
              <el-table-column label="操作" width="170">
                <template slot-scope="scope">
                  <el-button @click="raleteClick(scope.row)" type="text" size="small">相关供应商</el-button>
                  <el-button @click="editClick(scope.row)" type="text" size="small">修改</el-button>
                  <el-button @click="delClick(scope.row)" type="text" size="small">删除</el-button>
                </template>
              </el-table-column>
            </template>
          </TableCommonView>
        </div>
        <div class="btn-pager">
          <PagerView class="page" :pager-options="productPagerOptions" v-on="pagerEvents" />
        </div>
@@ -169,6 +152,7 @@
      this.tableList = {
        tableInfomation: [],
        selectIndex: true,
        highlight: true,
        ref: "tableListRef",
        tableColumn: [
          { label: "供应商编号", prop: "number", min: 190, isCommonClick: true },
@@ -237,7 +221,7 @@
            this.supplierId = 0
          }
          this.$nextTick(() => {
            this.$refs.tableSupplier.setCurrentRow(this.tableList.tableInfomation[0])
            this.$refs.tableSupplier.$refs.table.setCurrentRow(this.tableList.tableInfomation[0])
          })
          this.getProductList()
        }
@@ -367,8 +351,16 @@
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style lang="scss" scoped>
.rightContent {
  height: 100%;
  background: #f0f2f5;
  padding: 10px;
  .top {
    margin-bottom: 20px;
    height: 55%;
    background: #fff;
    .list-view {
      height: calc(100% - 120px);
    }
    .supplier-search {
      display: flex;
      align-items: center;
@@ -381,14 +373,20 @@
      color: $color-primary;
      cursor: pointer;
    }
    .btn-pager {
      display: flex;
      .page {
        margin-left: auto;
      }
    }
    // .btn-pager {
    //   display: flex;
    //   .page {
    //     margin-left: auto;
    //   }
    // }
  }
  .bottom {
    margin-top: 20px;
    height: calc(40% - 0px);
    background: #fff;
    .list-view {
      height: calc(100% - 120px);
    }
    .product-search {
      display: flex;
      align-items: center;
@@ -398,12 +396,6 @@
      .add-view {
        margin-left: 20px;
        margin-right: 20px;
      }
    }
    .btn-pager {
      display: flex;
      .page {
        margin-left: auto;
      }
    }
  }