haoxuan
2023-10-16 a73b5878e0a043395736d63c8c2c8e9a8f56ab32
Merge branch 'dev' of http://192.168.5.5:10010/r/web/crm-web into wn
15个文件已修改
231 ■■■■ 已修改文件
src/store/modules/getClientName.js 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/client/followupRecords/AddFollowupRecordsDialog.vue 29 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/client/followupRecords/index.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/other/commonDialog/SelectChanceDialog.vue 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/other/commonDialog/SelectCommonDialog.vue 46 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/other/commonDialog/SelectContactDialog.vue 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/other/commonDialog/SelectLeadDialog.vue 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/other/payment/receipt/addReceipt.vue 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/other/payment/receipt/index.vue 13 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/sales/refundForm/index.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/sales/salesDetails/AddSalesDetailsDialog.vue 96 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/sales/salesReturn/AddSalesReturnDialog.vue 5 ●●●●● 补丁 | 查看 | 原始文档 | 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/store/modules/getClientName.js
@@ -125,6 +125,9 @@
        }
      })
    },
    getLeadFilter({commit},newData){
      commit("saleLeadlist",newData)
    },
    geMaster(context) {
      getMasterOrderList().then((res) => {
        if (res.code == 200) {
src/views/client/followupRecords/AddFollowupRecordsDialog.vue
@@ -78,7 +78,7 @@
                  </div>
                </el-form-item>
              </el-col>
              <el-col v-if="isUnflod" :span="12">
              <el-col v-if="isUnflod && !isDetail" :span="12">
                <el-form-item label="客户状态" prop="client_status_id">
                  <div class="common-select">
                    <el-select
@@ -217,7 +217,7 @@
                  </div>
                </el-form-item>
              </el-col>
              <el-col :span="12">
              <el-col :span="12" v-if="!isDetail">
                <el-form-item label="销售线索" prop="sales_leads_name">
                  <div class="custom-name">
                    <!-- <el-input v-model="editConfig.infomation.sales_leads_id"></el-input> -->
@@ -401,6 +401,8 @@
import { getContactList } from "@/api/client/contacts"
import { mapActions } from "vuex";
import { getSaleChanceList } from "@/api/sales/salesOpportunity";
import { getSalesLeadsList } from "@/api/client/salesLead"
export default {
  name: "AddFollowupRecordsDialog",
@@ -416,6 +418,10 @@
        };
      },
    },
    isDetail: {
      type: Boolean,
      default: false
    }
  },
  components: {
    SelectClientDialog,
@@ -492,16 +498,19 @@
        editVisible: false,
        title: "",
        infomation: {},
        search_map:{}
      },
      editSelectChanceConfig: {
        editVisible: false,
        title: "",
        infomation: {},
        search_map:{},
      },
      editSelectLeadConfig: {
        editVisible: false,
        title: "",
        infomation: {},
        search_map:{},
      },
      clientId: this.editContactsConfig.infomation.client_id,
      contactId: this.editContactsConfig.infomation.contact_id,
@@ -531,7 +540,7 @@
    },
  },
  methods: {
    ...mapActions(["getContactFilter"]),
    ...mapActions(["getContactFilter","getLeadFilter"]),
    formInfo() {
      this.objCode.type = "跟进记录编码";
      this.objCode.codeStandID = "";
@@ -668,6 +677,10 @@
    },
    async handleSelectClient(value, item) {
      if (value === "client") {
        console.log(item,"item")
        this.editSelectContactConfig.search_map.client_id=item.id
        this.editSelectChanceConfig.search_map.client_id=item.id
        this.editSelectLeadConfig.search_map.name=item.name
        await getContactList({
        search_map:{
          client_id:item.id
@@ -679,11 +692,19 @@
            this.getContactFilter(res.data.list);
          }
        });
        await getSalesLeadsList({
          search_map:{
            name:item.name
          },
        }).then((res) => {
          if (res.code === 200) {
            this.getLeadFilter(res.data.list);
          }
        });
        this.clientId = item.id;
        this.editConfig.infomation.client_name = item.name;
        this.isChance = false;
        this.getChanceList(item.id);
        // console.log("clientId",this.clientId,this.editConfig.infomation.client_name)
      } else if (value === "contact") {
        this.contactId = item.id;
        this.editConfig.infomation.contact_name = item.name;
src/views/client/followupRecords/index.vue
@@ -50,7 +50,7 @@
      </div>
    </div>
    <!-- 新建/编辑跟进记录 -->
    <AddFollowupRecordsDialog v-if="editConfig.visible" :edit-contacts-config="editConfig" />
    <AddFollowupRecordsDialog :is-detail="isDetail" v-if="editConfig.visible" :edit-contacts-config="editConfig" />
    <!-- 联系人详情 -->
    <DetailContacts v-if="contactsDeail.visible" :contacts-detail="contactsDeail" />
    <!-- 客户详情 -->
src/views/other/commonDialog/SelectChanceDialog.vue
@@ -54,6 +54,7 @@
        return {
          editVisible: false,
          title: "",
          clientId: 0,
          infomation: {}
        }
      }
@@ -82,6 +83,9 @@
    }
  },
  created() {
    this.search_map = {
      client_id: this.editConfig.clientId
    }
    this.setTable()
    this.getData()
  },
@@ -121,7 +125,7 @@
    async getData() {
      this.loading = true
      await getSaleChanceList({
        search_map: this.search_map,
        search_map: this.editCommonConfig.search_map,
        page: this.pagerOptions.currPage,
        pageSize: this.pagerOptions.pageSize
      })
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",
@@ -67,6 +68,7 @@
          editVisible: false,
          title: "",
          clientId: 0,
          client_name: "",
          tableInfomation: []
        }
      }
@@ -97,6 +99,8 @@
    this.search_map = {
      client_id: this.editConfig.clientId
    }
    this.keyword = this.editConfig.client_name
    this.keywordType = "客户名称"
    this.setTable()
    this.getData()
  },
@@ -214,6 +218,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 +270,8 @@
        this.getProductList()
      } else if (this.editConfig.title === "销售退货单") {
        this.getSalesReturnList()
      } else if (this.editConfig.title === "销售子单") {
        this.getSubOrderList()
      }
    },
    // 销售总单
@@ -435,6 +455,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 +498,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/other/commonDialog/SelectContactDialog.vue
@@ -54,7 +54,8 @@
        return {
          editVisible: false,
          title: "",
          infomation: {}
          infomation: {},
          search_map:{},
        }
      }
    }
@@ -120,7 +121,7 @@
    async getData() {
      this.loading = true
      await getContactList({
        search_map: this.search_map,
        search_map: this.editCommonConfig.search_map,
        page: this.pagerOptions.currPage,
        pageSize: this.pagerOptions.pageSize
      })
src/views/other/commonDialog/SelectLeadDialog.vue
@@ -59,7 +59,8 @@
        return {
          editVisible: false,
          title: "",
          infomation: {}
          infomation: {},
          search_map:{},
        }
      }
    }
@@ -93,7 +94,7 @@
    async getData() {
      this.loading = true
      await getSalesLeadsList({
        search_map: this.search_map,
        search_map: this.editCommonConfig.search_map,
        page: this.pagerOptions.currPage,
        pageSize: this.pagerOptions.pageSize
      })
src/views/other/payment/receipt/addReceipt.vue
@@ -87,10 +87,10 @@
                </el-form-item>
              </el-col>
              <el-col v-else :span="12">
                <el-form-item label="合同订单">
                <el-form-item label="销售明细单" prop="saleDetailNumber">
                  <div class="custom-name">
                    <el-autocomplete
                      v-model="editConfig.infomation.number"
                      v-model="editConfig.infomation.saleDetailNumber"
                      :fetch-suggestions="
                        (queryString, callback) => {
                          querySearchAsync(queryString, callback, 'contract')
@@ -104,7 +104,7 @@
                      <i class="el-icon-circle-plus-outline" title="选择"></i>
                    </div>
                    <div
                      v-if="editConfig.infomation.number && editConfig.infomation.number.length > 0"
                      v-if="editConfig.infomation.saleDetailNumber && editConfig.infomation.saleDetailNumber.length > 0"
                      class="common-select-btn"
                      @click="clearupClient('contract')"
                    >
@@ -359,7 +359,8 @@
      rules: {
        client_name: [{ required: true, message: "请选择客户名称", trigger: "change" }],
        signTime: [{ required: true, message: "请选择收款日期", trigger: "change" }],
        memberId: [{ required: true, message: "请选择销售负责人", trigger: "change" }]
        memberId: [{ required: true, message: "请选择销售负责人", trigger: "change" }],
        saleDetailNumber: [{ required: true, message: "请选择销售明细单", trigger: "change" }]
        // approvalOpinion: [{ required: true, message: "请输入", trigger: "blur" }]
      },
      memberOptions: [],
src/views/other/payment/receipt/index.vue
@@ -146,8 +146,7 @@
    }
    this.getData()
  },
  mounted() {
  },
  mounted() {},
  methods: {
    setTable() {
      this.tableList = {
@@ -188,7 +187,7 @@
          sourceType: sourceTyle,
          page: this.pagerOptions.currPage,
          pageSize: this.pagerOptions.pageSize,
          client_id:this.addConfig.client_id,
          client_id: this.addConfig.client_id
        }
      } else {
        params = {
@@ -196,13 +195,13 @@
          keywordType: this.keywordType,
          page: this.pagerOptions.currPage,
          pageSize: this.pagerOptions.pageSize,
          client_id:this.addConfig.client_id,
          client_id: this.addConfig.client_id
        }
      }
      await getReceiptList(params)
        .then((res) => {
          if (res.data.code === 200) {
            const resList = res?.data?.data?.data ?? []
          if (res.code === 200) {
            const resList = res?.data?.data ?? []
            if (resList.length > 0) {
              const list = resList.map((item) => {
                return {
@@ -213,7 +212,7 @@
                }
              })
              this.tableList.tableInfomation = list || []
              this.pagerOptions.totalCount = res.data.data.count
              this.pagerOptions.totalCount = res.data.count
            } else {
              this.tableList.tableInfomation = []
            }
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/AddSalesReturnDialog.vue
@@ -478,6 +478,7 @@
      } else if (value === "contract") {
        this.editSelCommonConfig.title = "销售明细单"
        this.editSelCommonConfig.editVisible = true
        this.editSelCommonConfig.client_name = this.editConfig.infomation.client_name
      }
    },
    selClient(row, value) {
@@ -488,6 +489,8 @@
      } else if (value === "contract") {
        this.editConfig.infomation.salesDetailNumber = row.number
        this.SalesDetailsId = row.id
        this.productTableList.tableData = row.products
        this.tableData = row.products
      }
    },
    // 清除已选择用户
@@ -497,6 +500,8 @@
        this.clientId = 0
      } else if (value === "contract") {
        this.editConfig.infomation.salesDetailNumber = ""
        this.productTableList.tableData = []
        this.tableData = []
        this.SalesDetailsId = 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: ""
      }