haoxuan
2023-08-25 641ce71b7b29c32105c82619fa7abfb9b2f38e3b
src/views/supplierManage/supplier/index.vue
@@ -23,7 +23,7 @@
            <el-table-column label="操作" width="120">
              <template slot-scope="scope">
                <el-button @click="handleClick(scope.row)" type="text" size="small">启用</el-button>
                <el-button @click="followupClick(scope.row)" type="text" size="small">停用</el-button>
                <el-button @click="editClick(scope.row)" type="text" size="small">停用</el-button>
                <el-button @click="modifyClick(scope.row)" type="text" size="small">修改</el-button>
                <!-- <el-button @click="delClick(scope.row.id)" type="text" size="small">删除</el-button> -->
              </template>
@@ -49,7 +49,7 @@
          @resetClick="resetClick"
        />
        <div class="add-view">
          <el-button type="primary" size="mini">新建</el-button>
          <el-button type="primary" size="mini" @click="addNewProductClick">添加新产品</el-button>
        </div>
      </div>
      <template>
@@ -60,10 +60,10 @@
          @getSelectArray="getSelectArray"
        >
          <template slot="tableButton">
            <el-table-column label="操作" width="120">
            <el-table-column label="操作" width="170">
              <template slot-scope="scope">
                <el-button @click="handleClick(scope.row)" type="text" size="small">相关供应商</el-button>
                <el-button @click="followupClick(scope.row)" type="text" size="small">修改</el-button>
                <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>
                <!-- <el-button @click="delClick(scope.row.id)" type="text" size="small">删除</el-button> -->
              </template>
@@ -76,9 +76,13 @@
      </template>
    </div>
    <!-- 新建/编辑销售线索 -->
    <!-- <AddSalesLeadDialog v-if="editSalesLeadConfig.visible" :edit-rightContent-config="editSalesLeadConfig" /> -->
    <AddSupplier v-if="editConfig.visible" :add-common-config="editConfig" />
    <!-- 详情 -->
    <DetailSupplier v-if="commonDetail.visible" :common-detail="commonDetail" />
    <!-- 相关供应商 -->
    <RaleteSupplierList v-if="raleteSupplierConfig.visible" :common-config="raleteSupplierConfig" />
    <!-- 添加新产品 -->
    <AddNewProduct v-if="newProductConfig.visible" :add-common-config="newProductConfig" />
  </div>
</template>
@@ -86,11 +90,14 @@
import pageMixin from "@/components/makepager/pager/mixin/pageMixin"
import { getSalesLeadsList, getDeleteSalesLeads } from "@/api/client/salesLead"
import DetailSupplier from "@/views/supplierManage/supplier/DetailSupplier"
import AddSupplier from "@/views/supplierManage/supplier/AddSupplier"
import RaleteSupplierList from "@/views/supplierManage/supplier/RaleteSupplierList"
import AddNewProduct from "@/views/supplierManage/supplier/AddNewProduct"
export default {
  name: "SupplierManage",
  props: {},
  components: { DetailSupplier },
  components: { DetailSupplier, AddSupplier, RaleteSupplierList, AddNewProduct },
  mixins: [pageMixin],
  computed: {},
  data() {
@@ -107,6 +114,15 @@
      editConfig: {
        visible: false,
        title: "新建",
        infomation: {}
      },
      raleteSupplierConfig: {
        visible: false,
        infomation: {}
      },
      newProductConfig: {
        visible: false,
        title: "添加",
        infomation: {}
      },
      search_map: {}
@@ -142,12 +158,16 @@
    },
    setProductTable() {
      this.productTableList = {
        tableInfomation: [],
        tableInfomation: [
          {
            number: "aaaaa"
          }
        ],
        selectBox: true,
        selectIndex: true,
        tableColumn: [
          { label: "产品编码", prop: "name", min: 190, isSalesLeadClick: true },
          { label: "产品名称", prop: "number", min: 130 },
          { label: "产品编码", prop: "number", min: 190 },
          { label: "产品名称", prop: "name", min: 130 },
          { label: "产品规格", prop: "contact_name", min: 130 },
          { label: "单位", prop: "contact_phone", min: 130 },
          { label: "采购价格", prop: "sales_resources", min: 130 },
@@ -199,7 +219,10 @@
      this.getData()
    },
    // 新建供应商
    addBtnClick() {},
    addBtnClick() {
      this.editConfig.visible = true
      this.editConfig.title = "新建"
    },
    // 编辑供应商
    handleClick(row) {
      console.log(row)
@@ -207,12 +230,26 @@
    // 修改供应商
    modifyClick(row) {
      console.log(row)
    },
    // 跟进
    followupClick(row) {
      this.editConfig.visible = true
      this.editConfig.title = "新建"
      this.editConfig.infomation = { sales_leads_name: row.name }
      this.editConfig.title = "修改"
      this.editConfig.infomation = { ...row }
    },
    // 相关供应商
    raleteClick(row) {
      console.log(row)
      this.raleteSupplierConfig.visible = true
      this.raleteSupplierConfig.infomation = { ...row }
    },
    // 添加新产品
    addNewProductClick() {
      this.newProductConfig.visible = true
      this.newProductConfig.title = "添加"
    },
    // 修改产品
    editClick(row) {
      console.log(row)
      this.newProductConfig.visible = true
      // this.newProductConfig.title = "修改"
    },
    // 删除
    delClick() {