zuozhengqing
2023-10-16 6cc534c1ea6b947894fa523335f5a419f1772e8c
跟进记录:联系人、销售机会、销售线索根据客户名称进行筛选
7个文件已修改
158 ■■■■ 已修改文件
src/views/other/commonDialog/SelectChanceDialog.vue 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/other/commonDialog/SelectCommonDialog.vue 43 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/sales/refundForm/index.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/sales/salesDetails/AddSalesDetailsDialog.vue 96 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/sales/salesReturn/DetailReturn.vue 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/sales/subOrder/DetailSubOrder.vue 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/service/serviceContract/index.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/other/commonDialog/SelectChanceDialog.vue
@@ -54,8 +54,8 @@
        return {
          editVisible: false,
          title: "",
          infomation: {},
          search_map:{}
          clientId: 0,
          infomation: {}
        }
      }
    }
@@ -83,6 +83,9 @@
    }
  },
  created() {
    this.search_map = {
      client_id: this.editConfig.clientId
    }
    this.setTable()
    this.getData()
  },
src/views/other/commonDialog/SelectCommonDialog.vue
@@ -55,6 +55,7 @@
import { getServiceOrderList } from "@/api/serviceManage/clientServiceOrder"
import { getProductList } from "@/api/common/other"
import { getSalesReturnList } from "@/api/sales/salesReturn"
import { getSubOrderList } from "@/api/sales/subOrder"
import pageMixin from "@/components/makepager/pager/mixin/pageMixin"
export default {
  name: "EditSelCommonDialog",
@@ -214,6 +215,20 @@
          tableColumn: this.setColumnVisible(this.showCol)
        }
        this.searchSel = { value: "number", label: "销售退货单编号" }
      } else if (this.editConfig.title === "销售子单") {
        this.tableColumn = [
          { label: "单据编号", prop: "number", isClick: true, default: true }, // 单据编号
          { label: "负责人", prop: "member_name" } // 负责人
        ]
        this.showCol = ["单据编号", "负责人"]
        this.tableList = {
          selectIndex: true,
          tableInfomation: [],
          allcol: [],
          showcol: this.showCol,
          tableColumn: this.setColumnVisible(this.showCol)
        }
        this.searchSel = { value: "number", label: "单据编号" }
      }
      this.tableList.allcol = this.tableList.tableColumn.filter((ele) => !ele.default).map((ele) => ele.label)
      this.searchOptions = []
@@ -252,6 +267,8 @@
        this.getProductList()
      } else if (this.editConfig.title === "销售退货单") {
        this.getSalesReturnList()
      } else if (this.editConfig.title === "销售子单") {
        this.getSubOrderList()
      }
    },
    // 销售总单
@@ -435,6 +452,30 @@
        this.loading = false
      })
    },
    // 销售子单
    async getSubOrderList() {
      await getSubOrderList({
        search_map: this.search_map,
        page: this.pagerOptions.currPage,
        pageSize: this.pagerOptions.pageSize
      }).then((res) => {
        if (res.code === 200) {
          if (res.data.list && res.data.list.length > 0) {
            const list = res.data.list.map((item) => {
              return {
                ...item,
                member_name: item.member.username
              }
            })
            this.tableList.tableInfomation = list || []
            this.pagerOptions.totalCount = res.data.count
          } else {
            this.tableList.tableInfomation = []
          }
        }
        this.loading = false
      })
    },
    handleClose() {
      this.editConfig.editVisible = false
    },
@@ -454,6 +495,8 @@
        this.$emit("selClient", row, "productName")
      } else if (this.editConfig.title === "销售退货单") {
        this.$emit("selClient", row, "salesReturn")
      } else if (this.editConfig.title === "销售子单") {
        this.$emit("selClient", row, "subbill")
      }
    },
    // 搜索
src/views/sales/refundForm/index.vue
@@ -237,7 +237,7 @@
    addBtnClick() {
      this.editConfig.visible = true
      this.editConfig.title = "新建"
      this.editConfig.infomation = { currency: "人民币" }
      this.editConfig.infomation = { currency: "人民币", ...this.addConfig }
    },
    // 编辑
    handleClick(row) {
src/views/sales/salesDetails/AddSalesDetailsDialog.vue
@@ -119,7 +119,7 @@
                      @select="handleSelectClient('subbill', $event)"
                      :disabled="isNameChanceEdit"
                    ></el-autocomplete>
                    <div v-if="!isNameChanceEdit" class="common-select-btn" @click="selClientClick('client')">
                    <div v-if="!isNameChanceEdit" class="common-select-btn" @click="selClientClick('subbill')">
                      <i class="el-icon-circle-plus-outline" title="选择"></i>
                    </div>
                    <div
@@ -403,6 +403,12 @@
        :edit-common-config="editSelectChanceConfig"
        @selClient="selClient"
      />
      <!-- 销售子单 -->
      <SelectCommonDialog
        v-if="editSelCommonConfig.editVisible"
        :edit-common-config="editSelCommonConfig"
        @selClient="selClient"
      />
      <!-- 新建 收款计划 -->
      <AddCollectionPlan v-if="addCollectionConfig.visible" :edit-common-config="addCollectionConfig" />
    </el-dialog>
@@ -417,10 +423,11 @@
import SelectChanceDialog from "@/views/other/commonDialog/SelectChanceDialog"
import AddCollectionPlan from "@/views/other/payment/collectionPlan/AddCollectionPlan"
import codeMixin from "@/views/client/followupRecords/mixin/codeMixin"
import { getSaleChanceList} from "@/api/sales/salesOpportunity"
import { getSaleChanceList } from "@/api/sales/salesOpportunity"
import { getSubOrderList } from "@/api/sales/subOrder"
import SelectCommonDialog from "@/views/other/commonDialog/SelectCommonDialog"
import {mapActions} from "vuex"
import { mapActions } from "vuex"
export default {
  name: "AddSalesDetailsDialog",
@@ -437,17 +444,17 @@
      }
    }
  },
  components: { CommonFormTableView, SelectClientDialog, SelectChanceDialog, AddCollectionPlan },
  components: { CommonFormTableView, SelectClientDialog, SelectChanceDialog, AddCollectionPlan, SelectCommonDialog },
  computed: {
    clientList() {
      return this.$store.state.getClientName.clientList
    },
    saleChancelist() {
      return this.$store.state.getClientName.saleChancelist
    },
    subOrderList(){
      return this.$store.state.getClientName.subOrderList
    }
    // saleChancelist() {
    //   return this.$store.state.getClientName.saleChancelist
    // },
    // subOrderList() {
    //   return this.$store.state.getClientName.subOrderList
    // }
  },
  data() {
    return {
@@ -483,9 +490,14 @@
        title: "",
        infomation: {}
      },
      editSelCommonConfig: {
        editVisible: false,
        title: "",
        infomation: {}
      },
      clientId: this.editCommonConfig.infomation.client_id,
      saleChanceId: this.editCommonConfig.infomation.saleChanceId,
      subbillId:this.editCommonConfig.infomation.subbillId,
      subbillId: this.editCommonConfig.infomation.subbillId,
      productId: 1,
      isNoProduct: true,
      addCollectionConfig: {
@@ -499,8 +511,8 @@
  },
  created() {
    this.$store.dispatch("geClient")
    this.$store.dispatch("geChance")
    this.$store.dispatch("getSubunit")
    // this.$store.dispatch("geChance")
    // this.$store.dispatch("getSubunit")
    this.setTableForm()
    this.getCommonData()
    this.formInfo()
@@ -522,7 +534,7 @@
    }
  },
  methods: {
    ...mapActions(["getChanceFilter","getSubunitFliter"]),
    ...mapActions(["getChanceFilter", "getSubunitFliter"]),
    formInfo() {
      this.objCode.type = "销售明细编码"
      this.objCode.codeStandID = ""
@@ -642,16 +654,11 @@
      var restaurants = []
      if (value === "client") {
        restaurants = this.clientList
        console.log(restaurants,"客户单")
        console.log(restaurants, "客户单")
      } else if (value === "chance") {
        restaurants = this.saleChancelist
      }else if(value==="subbill"){
        let arr=[]
         this.subOrderList.map((item)=>{
          arr.push(item.client)
         })
         restaurants=arr
        console.log("子丹",restaurants,arr)
      } else if (value === "subbill") {
        restaurants = this.subOrderList
      }
      var results = queryString ? restaurants.filter(this.createStateFilter(queryString)) : restaurants
      cb(results)
@@ -667,34 +674,43 @@
        this.editConfig.infomation.client_name = item.name
        // 需要修改
        await getSaleChanceList({
          client_id:this.clientId
        }).then((res)=>{
          page: 1,
          pageSize: 15,
          search_map: {
            client_id: item.id
          }
        }).then((res) => {
          console.log(res)
          this.saleChancelist = res.data.list
        })
        await getSubOrderList({
          page:1,
          pageSize:15,
          search_map:{
            client_id:item.id
          page: 1,
          pageSize: 15,
          search_map: {
            client_id: item.id
          }
        }).then((res)=>{
          this.getSubunitFliter(res.data.list)
        }).then((res) => {
          this.subOrderList = res.data.list
        })
      } else if (value === "chance") {
        this.saleChanceId = item.id
        this.editConfig.infomation.client_name = item.name
      }else if(value==="subbill"){
        console.log("下拉框点击",item)
      } else if (value === "subbill") {
        console.log("下拉框点击", item)
        this.subbillId = item.id
        this.editConfig.infomation.subbill_name = item.name
        this.editConfig.infomation.subbill_name = item.number
      }
    },
    selClientClick(value) {
      if (value === "client") {
        this.editSelectClientConfig.editVisible = true
      } else if (value === "chance") {
        this.editSelectChanceConfig.clientId = this.clientId
        this.editSelectChanceConfig.editVisible = true
      }else if(value==="subbill"){
        this.editSelectChanceConfig.editVisible = true
      } else if (value === "subbill") {
        this.editSelCommonConfig.title = "销售子单"
        this.editSelCommonConfig.editVisible = true
        this.editSelCommonConfig.clientId = this.clientId
      }
    },
    selClient(row, value) {
@@ -704,9 +720,9 @@
      } else if (value === "chance") {
        this.editConfig.infomation.sale_chance_name = row.name
        this.saleChanceId = row.id
      }else if(value==="subbill"){
        this.editConfig.infomation.subbill_name = row.name
        this.subbillId=row.id
      } else if (value === "subbill") {
        this.editConfig.infomation.subbill_name = row.number
        this.subbillId = row.id
      }
    },
    // 清除已选择用户
@@ -717,9 +733,9 @@
      } else if (value === "chance") {
        this.editConfig.infomation.sale_chance_name = ""
        this.saleChanceId = 0
      }else if(value==="subbill"){
      } else if (value === "subbill") {
        this.editConfig.infomation.subbill_name = ""
        this.subbillId=0
        this.subbillId = 0
      }
    },
    // 添加附件
src/views/sales/salesReturn/DetailReturn.vue
@@ -178,7 +178,8 @@
      client_name: this.detailConfig.infomation.client.name,
      contact_name: this.detailConfig.infomation.contact_name,
      client_id: this.detailConfig.infomation.client_id,
      contact_id: this.detailConfig.infomation.contact_id
      contact_id: this.detailConfig.infomation.contact_id,
      sale_return_nunber: this.detailConfig.infomation.number
    }
    this.setTableForm()
  },
src/views/sales/subOrder/DetailSubOrder.vue
@@ -136,7 +136,8 @@
      client_name: this.detailConfig.infomation.client.name,
      contact_name: this.detailConfig.infomation.contact_name,
      client_id: this.detailConfig.infomation.client_id,
      contact_id: this.detailConfig.infomation.contact_id
      contact_id: this.detailConfig.infomation.contact_id,
      subbill_name: this.detailConfig.infomation.number
    }
    this.setTableForm()
  },
src/views/service/serviceContract/index.vue
@@ -271,9 +271,9 @@
      this.editConfig.infomation = {
        ...this.addConfig,
        currency: "人民币",
        client_name: "",
        client_name: Object.keys(this.addConfig).length === 0 ? "" : this.addConfig.client_name,
        contact_name: "",
        sale_chance_name: "",
        sale_chance_name: Object.keys(this.addConfig).length === 0 ? "" : this.addConfig.sale_chance_name,
        contract_number: "",
        quotation_number: ""
      }