| | |
| | | import SelectChanceDialog from "@/views/other/commonDialog/SelectChanceDialog" |
| | | import SelectLeadDialog from "@/views/other/commonDialog/SelectLeadDialog" |
| | | import codeMixin from "./mixin/codeMixin" |
| | | import { getContactList } from "@/api/client/contacts" |
| | | // import { getContactList } from "@/api/client/contacts" |
| | | import { mapActions } from "vuex" |
| | | import { getSaleChanceList } from "@/api/sales/salesOpportunity" |
| | | |
| | |
| | | created() { |
| | | this.$store.dispatch("geClient") |
| | | this.$store.dispatch("geContact") |
| | | this.$store.dispatch("geChance") |
| | | // this.$store.dispatch("geChance") |
| | | this.$store.dispatch("geLead") |
| | | this.getCommonData() |
| | | this.getContactInfoList() |
| | |
| | | if (value === "client") { |
| | | this.clientId = item.id |
| | | this.editConfig.infomation.client_name = item.name |
| | | await getContactList({ |
| | | clientId: this.clientId |
| | | }).then((res) => { |
| | | this.getContactFilter(res.data.list) |
| | | }) |
| | | this.isChance = false |
| | | this.getChanceList(item.id) |
| | | // console.log("clientId",this.clientId,this.editConfig.infomation.client_name) |
| | |
| | | rules: { |
| | | number: [{ required: true, message: "请输入", trigger: "blur" }], |
| | | quotation_status_id: [{ required: true, message: "请选择", trigger: "change" }], |
| | | sale_chance_name: [{ required: true, message: "请选择销售机会", trigger: "blur" }], |
| | | sale_chance_name: [{ required: true, validator: this.checkChance, trigger: "blur" }], |
| | | member_id: [{ required: true, message: "请选择负责人", trigger: "change" }] |
| | | }, |
| | | memberOptions: [], |
| | |
| | | let data = this.editConfig.infomation |
| | | let params = { |
| | | id: this.editConfig.title === "新建" ? 0 : data.id, |
| | | quotationName: this.quotationName || "", |
| | | quotationName: data.quotationName || "", |
| | | conditions: data.conditions || "", |
| | | file: data.file || "", |
| | | member_id: data.member_id || 0, |
| | |
| | | clearupProduct(data) { |
| | | this.tableData = data |
| | | this.productTableList.tableData = this.tableData |
| | | }, |
| | | // 订单编码单独校验 |
| | | checkChance(rule, value, callback) { |
| | | if (this.editConfig.infomation.sale_chance_name && this.editConfig.infomation.sale_chance_name.length > 0) { |
| | | callback() |
| | | } else { |
| | | callback(new Error("请选择销售机会")) |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | console.log(row) |
| | | this.editConfig.visible = true |
| | | this.editConfig.title = "编辑" |
| | | console.log("dddddddd") |
| | | console.log(row) |
| | | this.editConfig.infomation = { ...row, currency: "人民币" } |
| | | }, |
| | | // 批量删除 |
| | |
| | | " |
| | | value-key="name" |
| | | @select="handleSelectClient('contact', $event)" |
| | | placeholder="请先选择客户名称" |
| | | :disabled="isContact" |
| | | ></el-autocomplete> |
| | | <div v-if="!isContact" class="common-select-btn" @click="selClientClick('contact')"> |