| | |
| | | :header-cell-style="{ background: '#ECF4FF', color: '#666' }" |
| | | > |
| | | <el-table-column v-if="selectBox" type="selection" width="40"> </el-table-column> |
| | | |
| | | <el-table-column |
| | | v-for="(item, i) in tableList.tableColumn" |
| | | :key="i" |
| | |
| | | dateFormat("YYYY-mm-dd HH:MM:SS", scope.row[item.prop]) === "1900-01-01 08:00:00" |
| | | ? "--" |
| | | : dateFormat("YYYY-mm-dd HH:MM:SS", scope.row[item.prop]) |
| | | }}</span> |
| | | <span v-else-if="item.isClick" class="sel-name" @click="selNameClick(scope.row)">{{ |
| | | scope.row[item.prop] |
| | | }}</span> |
| | | <span v-else>{{ scope.row[item.prop] ? scope.row[item.prop] : "--" }}</span> |
| | | </template> |
| | |
| | | type: Boolean, |
| | | default: true |
| | | }, |
| | | |
| | | tableList: { |
| | | type: Object, |
| | | default: () => { |
| | |
| | | } |
| | | } |
| | | return fmt |
| | | }, |
| | | selNameClick(row) { |
| | | this.$emit("selCommonClick", row) |
| | | } |
| | | } |
| | | } |
| | |
| | | background-color: $color-primary; |
| | | border-radius: 4px; |
| | | } |
| | | .sel-name { |
| | | color: $color-primary; |
| | | cursor: pointer; |
| | | } |
| | | } |
| | | ::v-deep { |
| | | .el-table__footer-wrapper tbody td.el-table__cell { |
| | |
| | | import { getClientList } from "@/api/client/client" // 导入接口 |
| | | import { getContactList } from "@/api/client/contacts" |
| | | import { getSaleChanceList } from "@/api/sales/salesOpportunity" |
| | | import { getSalesLeadsList } from "@/api/client/salesLead" |
| | | import { getMasterOrderList } from "@/api/sales/masterOrder" |
| | | import { Message } from "element-ui" |
| | | |
| | | export default { |
| | | state: { |
| | | clientList: [], // 客户列表 |
| | | contactNamelist: [] // 联系人 |
| | | contactNamelist: [], // 联系人 |
| | | saleChancelist: [], // 销售机会 |
| | | saleLeadlist: [], // 销售线索 |
| | | masterOrderList: [] // 销售总单 |
| | | }, |
| | | mutations: { |
| | | clientNameList(state, payload) { |
| | |
| | | }, |
| | | saleChancelist(state, payload) { |
| | | state.saleChancelist = payload |
| | | }, |
| | | saleLeadlist(state, payload) { |
| | | state.saleLeadlist = payload |
| | | }, |
| | | masterOrderList(state, payload) { |
| | | state.masterOrderList = payload |
| | | } |
| | | }, |
| | | actions: { |
| | |
| | | Message.error(res.msg) |
| | | } |
| | | }) |
| | | }, |
| | | geLead(context) { |
| | | getSalesLeadsList().then((res) => { |
| | | if (res.code == 200) { |
| | | context.commit("saleLeadlist", res.data.list) |
| | | } else { |
| | | Message.error(res.msg) |
| | | } |
| | | }) |
| | | }, |
| | | geMaster(context) { |
| | | getMasterOrderList().then((res) => { |
| | | if (res.code == 200) { |
| | | context.commit("masterOrderList", res.data.list) |
| | | } else { |
| | | Message.error(res.msg) |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | } |
| | |
| | | <div class="custom-name"> |
| | | <el-autocomplete |
| | | v-model="editConfig.infomation.client_name" |
| | | :fetch-suggestions="querySearchAsync" |
| | | :fetch-suggestions=" |
| | | (queryString, callback) => { |
| | | querySearchAsync(queryString, callback, 'client') |
| | | } |
| | | " |
| | | value-key="name" |
| | | @select="handleSelectClient('client', $event)" |
| | | ></el-autocomplete> |
| | |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="联系人姓名" prop="contact_id"> |
| | | <el-form-item label="联系人姓名" prop="contact_name"> |
| | | <div class="custom-name"> |
| | | <el-autocomplete |
| | | v-model="editConfig.infomation.contact_name" |
| | | :fetch-suggestions="queryContactAsync" |
| | | :fetch-suggestions=" |
| | | (queryString, callback) => { |
| | | querySearchAsync(queryString, callback, 'contact') |
| | | } |
| | | " |
| | | value-key="name" |
| | | @select="handleSelectClient('contact', $event)" |
| | | ></el-autocomplete> |
| | |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col v-if="isUnflod" :span="12"> |
| | | <el-form-item label="销售机会" prop="sale_chance_id"> |
| | | <el-form-item label="销售机会" prop="sale_chance_name"> |
| | | <div class="custom-name"> |
| | | <el-input v-model="editConfig.infomation.sale_chance_id"></el-input> |
| | | <!-- <el-autocomplete |
| | | v-model="editConfig.infomation.sale_chance_id" |
| | | :fetch-suggestions="queryChanceAsync" |
| | | <el-autocomplete |
| | | v-model="editConfig.infomation.sale_chance_name" |
| | | :fetch-suggestions=" |
| | | (queryString, callback) => { |
| | | querySearchAsync(queryString, callback, 'chance') |
| | | } |
| | | " |
| | | value-key="name" |
| | | @select="handleSelectClient('chance', $event)" |
| | | ></el-autocomplete> --> |
| | | <div class="common-select-btn"><i class="el-icon-circle-plus-outline"></i></div> |
| | | <div class="common-select-btn"><i class="el-icon-edit-outline"></i></div> |
| | | ></el-autocomplete> |
| | | <div class="common-select-btn" @click="selClientClick('chance')"> |
| | | <i class="el-icon-circle-plus-outline"></i> |
| | | </div> |
| | | <div class="common-select-btn" @click="clearupClient('chance')"> |
| | | <i class="el-icon-edit-outline"></i> |
| | | </div> |
| | | </div> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="销售线索" prop="sales_leads_id"> |
| | | <el-form-item label="销售线索" prop="sales_leads_name"> |
| | | <div class="custom-name"> |
| | | <el-input v-model="editConfig.infomation.sales_leads_id"></el-input> |
| | | <div class="common-select-btn"><i class="el-icon-circle-plus-outline"></i></div> |
| | | <div class="common-select-btn"><i class="el-icon-edit-outline"></i></div> |
| | | <!-- <el-input v-model="editConfig.infomation.sales_leads_id"></el-input> --> |
| | | <el-autocomplete |
| | | v-model="editConfig.infomation.sales_leads_name" |
| | | :fetch-suggestions=" |
| | | (queryString, callback) => { |
| | | querySearchAsync(queryString, callback, 'lead') |
| | | } |
| | | " |
| | | value-key="name" |
| | | @select="handleSelectClient('lead', $event)" |
| | | ></el-autocomplete> |
| | | <div class="common-select-btn" @click="selClientClick('lead')"> |
| | | <i class="el-icon-circle-plus-outline"></i> |
| | | </div> |
| | | <div class="common-select-btn" @click="clearupClient('lead')"> |
| | | <i class="el-icon-edit-outline"></i> |
| | | </div> |
| | | </div> |
| | | </el-form-item> |
| | | </el-col> |
| | |
| | | :edit-common-config="editSelectContactConfig" |
| | | @selClient="selClient" |
| | | /> |
| | | <!-- 选择销售机会 --> |
| | | <SelectChanceDialog |
| | | v-if="editSelectChanceConfig.editVisible" |
| | | :edit-common-config="editSelectChanceConfig" |
| | | @selClient="selClient" |
| | | /> |
| | | <!-- 选择销售线索 --> |
| | | <SelectLeadDialog |
| | | v-if="editSelectLeadConfig.editVisible" |
| | | :edit-common-config="editSelectLeadConfig" |
| | | @selClient="selClient" |
| | | /> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | |
| | | import { getAddFollowRecord, getUpdateFollowRecord } from "@/api/client/followupRecords" |
| | | import SelectClientDialog from "@/views/other/commonDialog/SelectClientDialog" |
| | | import SelectContactDialog from "@/views/other/commonDialog/SelectContactDialog" |
| | | import SelectChanceDialog from "@/views/other/commonDialog/SelectChanceDialog" |
| | | import SelectLeadDialog from "@/views/other/commonDialog/SelectLeadDialog" |
| | | export default { |
| | | name: "AddFollowupRecordsDialog", |
| | | props: { |
| | |
| | | } |
| | | } |
| | | }, |
| | | components: { SelectClientDialog, SelectContactDialog }, |
| | | components: { SelectClientDialog, SelectContactDialog, SelectChanceDialog, SelectLeadDialog }, |
| | | computed: { |
| | | searchCommonHeight() { |
| | | return this.$refs.searchCommonView.offsetHeight |
| | |
| | | }, |
| | | saleChancelist() { |
| | | return this.$store.state.getClientName.saleChancelist |
| | | }, |
| | | saleLeadlist() { |
| | | return this.$store.state.getClientName.saleLeadlist |
| | | } |
| | | }, |
| | | data() { |
| | |
| | | title: "", |
| | | infomation: {} |
| | | }, |
| | | editSelectChanceConfig: { |
| | | editVisible: false, |
| | | title: "", |
| | | infomation: {} |
| | | }, |
| | | editSelectLeadConfig: { |
| | | editVisible: false, |
| | | title: "", |
| | | infomation: {} |
| | | }, |
| | | clientId: this.editContactsConfig.infomation.client_id, |
| | | contactId: this.editContactsConfig.infomation.contact_id |
| | | // saleChanceId: this.editContactsConfig.infomation.sale_chance_id |
| | | contactId: this.editContactsConfig.infomation.contact_id, |
| | | saleChanceId: this.editContactsConfig.infomation.sale_chance_id, |
| | | saleLeadId: this.editContactsConfig.infomation.sales_leads_id |
| | | } |
| | | }, |
| | | created() { |
| | | this.$store.dispatch("geClient") |
| | | this.$store.dispatch("geContact") |
| | | this.$store.dispatch("geChance") |
| | | this.$store.dispatch("geLead") |
| | | this.getCommonData() |
| | | }, |
| | | methods: { |
| | |
| | | console.log(res) |
| | | this.clientStatusOptions = res.data.client_status |
| | | this.memberOptions = res.data.member |
| | | this.dataProcess() |
| | | }) |
| | | .catch((err) => { |
| | | console.log(err) |
| | | }) |
| | | }, |
| | | dataProcess() { |
| | | this.saleChancelist.map((item) => { |
| | | if (this.saleChanceId === item.id) { |
| | | this.editConfig.infomation.sale_chance_name = item.name |
| | | } |
| | | }) |
| | | this.saleLeadlist.map((item) => { |
| | | if (this.saleLeadId === item.id) { |
| | | this.editConfig.infomation.sales_leads_name = item.name |
| | | } |
| | | }) |
| | | }, |
| | | handleClose() { |
| | |
| | | saveClick(formName) { |
| | | this.$refs[formName].validate((valid) => { |
| | | if (valid) { |
| | | console.log(this.editConfig.infomation) |
| | | const params = this.saveParams() |
| | | console.log(params) |
| | | if (this.editConfig.title === "新建") { |
| | | getAddFollowRecord(params) |
| | | .then((res) => { |
| | | console.log(res) |
| | | this.editConfig.visible = false |
| | | if (res.code === 200) { |
| | | this.$message({ |
| | |
| | | } else { |
| | | getUpdateFollowRecord(params) |
| | | .then((res) => { |
| | | console.log(res) |
| | | this.editConfig.visible = false |
| | | if (res.code === 200) { |
| | | this.$message({ |
| | |
| | | number: data.number || "", |
| | | purpose: data.purpose || "", |
| | | record: data.record || "", |
| | | sale_chance_id: parseInt(data.sale_chance_id), //data.sale_chance_id || |
| | | sales_leads_id: 0, // data.sales_leads_id || |
| | | sale_chance_id: parseInt(this.saleChanceId), //data.sale_chance_id || |
| | | sales_leads_id: parseInt(this.saleLeadId), // data.sales_leads_id || |
| | | topic: data.topic || "" |
| | | } |
| | | } |
| | |
| | | return params |
| | | }, |
| | | // 选择客户相关方法 |
| | | querySearchAsync(queryString, cb) { |
| | | var restaurants = this.clientList |
| | | var results = queryString ? restaurants.filter(this.createStateFilter(queryString)) : restaurants |
| | | cb(results) |
| | | }, |
| | | // 选择联系人姓名 |
| | | queryContactAsync(queryString, cb) { |
| | | var restaurants = this.contactNamelist |
| | | var results = queryString ? restaurants.filter(this.createStateFilter(queryString)) : restaurants |
| | | cb(results) |
| | | }, |
| | | // 销售机会 |
| | | queryChanceAsync(queryString, cb) { |
| | | var restaurants = this.saleChancelist |
| | | querySearchAsync(queryString, cb, value) { |
| | | var restaurants = [] |
| | | if (value === "client") { |
| | | restaurants = this.clientList |
| | | } else if (value === "contact") { |
| | | restaurants = this.contactNamelist |
| | | } else if (value === "chance") { |
| | | restaurants = this.saleChancelist |
| | | } else { |
| | | restaurants = this.saleLeadlist |
| | | } |
| | | var results = queryString ? restaurants.filter(this.createStateFilter(queryString)) : restaurants |
| | | cb(results) |
| | | }, |
| | |
| | | } |
| | | }, |
| | | handleSelectClient(value, item) { |
| | | console.log(value) |
| | | if (value === "client") { |
| | | this.clientId = item.id |
| | | } else if (value === "contact") { |
| | | this.contactId = item.id |
| | | } else { |
| | | } else if (value === "chance") { |
| | | this.saleChanceId = item.id |
| | | } else { |
| | | this.saleLeadId = item.id |
| | | } |
| | | }, |
| | | selClientClick(value) { |
| | |
| | | this.editSelectClientConfig.editVisible = true |
| | | } else if (value === "contact") { |
| | | this.editSelectContactConfig.editVisible = true |
| | | } else if (value === "chance") { |
| | | this.editSelectChanceConfig.editVisible = true |
| | | } else { |
| | | this.editSelectLeadConfig.editVisible = true |
| | | } |
| | | }, |
| | | selClient(row, value) { |
| | | console.log(value) |
| | | if (value === "contact") { |
| | | this.editConfig.infomation.contact_name = row.name |
| | | this.contactId = row.id |
| | | } else { |
| | | } else if (value === "client") { |
| | | this.editConfig.infomation.client_name = row.name |
| | | this.clientId = row.id |
| | | } else if (value === "chance") { |
| | | this.editConfig.infomation.sale_chance_name = row.name |
| | | this.saleChanceId = row.id |
| | | } else { |
| | | this.editConfig.infomation.sales_leads_name = row.name |
| | | this.saleLeadId = row.id |
| | | } |
| | | }, |
| | | // 清除已选择用户 |
| | |
| | | if (value === "client") { |
| | | this.editConfig.infomation.client_name = "" |
| | | this.clientId = 0 |
| | | } else { |
| | | } else if (value === "contact") { |
| | | this.editConfig.infomation.contact_name = "" |
| | | this.contactId = 0 |
| | | } else if (value === "chance") { |
| | | this.editConfig.infomation.sale_chance_name = "" |
| | | this.saleChanceId = 0 |
| | | } else { |
| | | this.editConfig.infomation.sales_leads_name = "" |
| | | this.saleLeadId = 0 |
| | | } |
| | | }, |
| | | // 添加附件 |
| | |
| | | visible: false, |
| | | title: "新建", |
| | | infomation: {} |
| | | } |
| | | }, |
| | | saleChanceName: "" |
| | | } |
| | | }, |
| | | created() { |
| | |
| | | console.log(row) |
| | | this.editConfig.visible = true |
| | | this.editConfig.title = "编辑" |
| | | this.editConfig.infomation = { ...row } |
| | | this.editConfig.infomation = { ...row, sale_chance_name: "", sales_leads_name: "" } |
| | | }, |
| | | // 删除 |
| | | delClick(id) { |
New file |
| | |
| | | <template> |
| | | <div class="edit-selClient-box"> |
| | | <el-dialog |
| | | :title="'销售机会'" |
| | | :visible.sync="editConfig.editVisible" |
| | | :width="dialogWidth" |
| | | :before-close="handleClose" |
| | | :append-to-body="true" |
| | | :close-on-click-modal="false" |
| | | > |
| | | <div class="bg-view"> |
| | | <div class="query-bg"> |
| | | <el-input placeholder="请输入内容" v-model="queryInput" size="mini" class="input-with-select"> |
| | | <el-select v-model="select" slot="prepend" placeholder="请选择"> |
| | | <el-option label="全部字段" value="1"></el-option> |
| | | <el-option label="销售机会编号" value="2"></el-option> |
| | | <el-option label="机会名称" value="3"></el-option> |
| | | <el-option label="销售阶段" value="4"></el-option> |
| | | <el-option label="销售负责人" value="5"></el-option> |
| | | <el-option label="预计成交日期" value="6"></el-option> |
| | | </el-select> |
| | | </el-input> |
| | | <div class="btn"> |
| | | <el-button type="primary" size="mini" disabled>设置字段</el-button> |
| | | <el-button type="primary" size="mini" disabled>快速创建</el-button> |
| | | </div> |
| | | </div> |
| | | <el-table |
| | | :data="tableData" |
| | | border |
| | | size="mini" |
| | | v-loading="loading" |
| | | :header-cell-style="{ background: '#f7f7f7' }" |
| | | > |
| | | <el-table-column label="销售机会编号" prop="number"></el-table-column> |
| | | <el-table-column label="机会名称" prop="name" show-overflow-tooltip> |
| | | <template slot-scope="scope"> |
| | | <span class="sel-name" @click="selNameClick(scope.row)">{{ scope.row.name }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="销售阶段" prop="sale_stage_id"></el-table-column> |
| | | <el-table-column label="销售负责人" prop="member_id"></el-table-column> |
| | | <el-table-column label="预计成交日期" prop="expected_time" show-overflow-tooltip> |
| | | <template slot-scope="scope"> |
| | | <span>{{ |
| | | dateFormat("YYYY-mm-dd HH:MM:SS", scope.row.expected_time) === "1900-01-01 08:00:00" |
| | | ? "--" |
| | | : dateFormat("YYYY-mm-dd HH:MM:SS", scope.row.expected_time) |
| | | }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <div slot="empty"> |
| | | <el-empty :image-size="100"></el-empty> |
| | | </div> |
| | | </el-table> |
| | | <div slot="footer" class="dialog-footer"> |
| | | <div class="remark">说明:支持多字段模糊查询,仅显示符合条件的前5条数据</div> |
| | | </div> |
| | | </div> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import { getSaleChanceList } from "@/api/sales/salesOpportunity" |
| | | export default { |
| | | name: "EditSelChanceDialog", |
| | | props: { |
| | | editCommonConfig: { |
| | | type: Object, |
| | | default: () => { |
| | | return { |
| | | editVisible: false, |
| | | title: "", |
| | | infomation: {} |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | components: {}, |
| | | computed: {}, |
| | | data() { |
| | | return { |
| | | dialogWidth: "50%", |
| | | editConfig: this.editCommonConfig, |
| | | queryInput: "", |
| | | select: "1", |
| | | tableData: [], |
| | | searchSelOptions: [], |
| | | loading: false |
| | | } |
| | | }, |
| | | created() { |
| | | this.getData() |
| | | }, |
| | | methods: { |
| | | handleClose() { |
| | | this.editConfig.editVisible = false |
| | | }, |
| | | // 请求数据 |
| | | async getData() { |
| | | this.loading = true |
| | | await getSaleChanceList() |
| | | .then((res) => { |
| | | console.log(res) |
| | | if (res.code === 200) { |
| | | if (res.data.list && res.data.list.length > 0) { |
| | | const list = res.data.list.map((item) => { |
| | | return { |
| | | ...item |
| | | } |
| | | }) |
| | | this.tableData = list.slice(0, 5) || [] |
| | | } else { |
| | | this.tableData = [] |
| | | } |
| | | } else { |
| | | this.tableData = [] |
| | | } |
| | | this.loading = false |
| | | }) |
| | | .catch((err) => { |
| | | console.log(err) |
| | | this.tableData = [] |
| | | this.loading = false |
| | | }) |
| | | }, |
| | | selNameClick(row) { |
| | | this.editConfig.editVisible = false |
| | | console.log(row) |
| | | this.$emit("selClient", row, "chance") |
| | | }, |
| | | // 时间显示 |
| | | dateFormat(fmt, date) { |
| | | let ret = "" |
| | | date = new Date(date) |
| | | const opt = { |
| | | "Y+": date.getFullYear().toString(), // 年 |
| | | "m+": (date.getMonth() + 1).toString(), // 月 |
| | | "d+": date.getDate().toString(), // 日 |
| | | "H+": date.getHours().toString(), // 时 |
| | | "M+": date.getMinutes().toString(), // 分 |
| | | "S+": date.getSeconds().toString() // 秒 |
| | | // 有其他格式化字符需求可以继续添加,必须转化成字符串 |
| | | } |
| | | for (let k in opt) { |
| | | ret = new RegExp("(" + k + ")").exec(fmt) |
| | | if (ret) { |
| | | fmt = fmt.replace(ret[1], ret[1].length == 1 ? opt[k] : opt[k].padStart(ret[1].length, "0")) |
| | | } |
| | | } |
| | | return fmt |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <!-- Add "scoped" attribute to limit CSS to this component only --> |
| | | <style lang="scss" scoped> |
| | | .bg-view { |
| | | margin: 10px; |
| | | .query-bg { |
| | | margin-bottom: 10px; |
| | | display: flex; |
| | | justify-content: space-between; |
| | | .el-input { |
| | | width: 310px; |
| | | .el-select { |
| | | width: 100px; |
| | | } |
| | | } |
| | | .btn { |
| | | float: right; |
| | | } |
| | | } |
| | | } |
| | | .sel-name { |
| | | color: $color-primary; |
| | | cursor: pointer; |
| | | } |
| | | .dialog-footer { |
| | | height: 40px; |
| | | line-height: 40px; |
| | | color: red; |
| | | } |
| | | ::v-deep { |
| | | .input-with-select .el-input-group__prepend { |
| | | background-color: #fff; |
| | | } |
| | | } |
| | | </style> |
| | |
| | | return { |
| | | editVisible: false, |
| | | title: "", |
| | | infomation: { |
| | | name: "", |
| | | color: "", |
| | | setDefault: "" |
| | | } |
| | | infomation: {} |
| | | } |
| | | } |
| | | } |
| | |
| | | }, |
| | | selNameClick(row) { |
| | | this.editConfig.editVisible = false |
| | | this.$emit("selClient", row) |
| | | this.$emit("selClient", row, "client") |
| | | }, |
| | | // 时间显示 |
| | | dateFormat(fmt, date) { |
New file |
| | |
| | | <template> |
| | | <div class="edit-selClient-box"> |
| | | <el-dialog |
| | | :title="editCommonConfig.title" |
| | | :visible.sync="editConfig.editVisible" |
| | | :width="dialogWidth" |
| | | :before-close="handleClose" |
| | | :append-to-body="true" |
| | | :close-on-click-modal="false" |
| | | > |
| | | <div class="bg-view"> |
| | | <div class="query-bg"> |
| | | <el-input placeholder="请输入内容" v-model="queryInput" size="mini" class="input-with-select"> |
| | | <el-select v-model="select" slot="prepend" placeholder="请选择"> |
| | | <el-option v-for="item in commonOptions" :key="item.id" :label="item.name" :value="item.name"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-input> |
| | | <div class="btn"> |
| | | <el-button type="primary" size="mini" disabled>设置字段</el-button> |
| | | <el-button type="primary" size="mini" disabled>快速创建</el-button> |
| | | </div> |
| | | </div> |
| | | <TableCommonView ref="tableListRef" :table-list="tableList" :select-box="false" @selCommonClick="selNameClick"> |
| | | </TableCommonView> |
| | | <div slot="footer" class="dialog-footer"> |
| | | <div class="remark">说明:支持多字段模糊查询,仅显示符合条件的前5条数据</div> |
| | | </div> |
| | | </div> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import { getMasterOrderList } from "@/api/sales/masterOrder" |
| | | export default { |
| | | name: "EditSelChanceDialog", |
| | | props: { |
| | | editCommonConfig: { |
| | | type: Object, |
| | | default: () => { |
| | | return { |
| | | editVisible: false, |
| | | title: "", |
| | | infomation: {} |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | components: {}, |
| | | computed: {}, |
| | | data() { |
| | | return { |
| | | dialogWidth: "50%", |
| | | editConfig: this.editCommonConfig, |
| | | queryInput: "", |
| | | select: "1", |
| | | tableData: [], |
| | | searchSelOptions: [], |
| | | loading: false, |
| | | tableList: {}, |
| | | commonOptions: [] |
| | | } |
| | | }, |
| | | created() { |
| | | this.getData() |
| | | this.setTable() |
| | | }, |
| | | methods: { |
| | | setTable() { |
| | | if (this.editConfig.title === "销售总单") { |
| | | this.tableList = { |
| | | tableInfomation: [], |
| | | tableColumn: [ |
| | | { label: "单据编号", prop: "number", isClick: true }, // 单据编号 |
| | | { label: "负责人", prop: "member_id" } // 负责人 |
| | | ] |
| | | } |
| | | } |
| | | |
| | | this.commonOptions = [{ value: 1, name: "全部字段" }] |
| | | for (let i = 1; i < this.tableList.tableColumn.length; i++) { |
| | | const label = this.tableList.tableColumn[i].label |
| | | this.commonOptions.push({ value: (i + 1).toString(), name: label }) |
| | | } |
| | | }, |
| | | handleClose() { |
| | | this.editConfig.editVisible = false |
| | | }, |
| | | // 请求数据 |
| | | async getData() { |
| | | this.loading = true |
| | | await getMasterOrderList() |
| | | .then((res) => { |
| | | console.log(res) |
| | | if (res.code === 200) { |
| | | if (res.data.list && res.data.list.length > 0) { |
| | | const list = res.data.list.map((item) => { |
| | | return { |
| | | ...item |
| | | } |
| | | }) |
| | | this.tableList.tableInfomation = list.slice(0, 5) || [] |
| | | } else { |
| | | this.tableList.tableInfomation = [] |
| | | } |
| | | } else { |
| | | this.tableList.tableInfomation = [] |
| | | } |
| | | this.loading = false |
| | | }) |
| | | .catch((err) => { |
| | | console.log(err) |
| | | this.tableData = [] |
| | | this.loading = false |
| | | }) |
| | | }, |
| | | selNameClick(row) { |
| | | this.editConfig.editVisible = false |
| | | if (this.editConfig.title === "销售总单") { |
| | | this.$emit("selClient", row, "master") |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <!-- Add "scoped" attribute to limit CSS to this component only --> |
| | | <style lang="scss" scoped> |
| | | .bg-view { |
| | | margin: 10px; |
| | | .query-bg { |
| | | margin-bottom: 10px; |
| | | display: flex; |
| | | justify-content: space-between; |
| | | .el-input { |
| | | width: 310px; |
| | | .el-select { |
| | | width: 100px; |
| | | } |
| | | } |
| | | .btn { |
| | | float: right; |
| | | } |
| | | } |
| | | } |
| | | .sel-name { |
| | | color: $color-primary; |
| | | cursor: pointer; |
| | | } |
| | | .dialog-footer { |
| | | height: 40px; |
| | | line-height: 40px; |
| | | color: red; |
| | | } |
| | | ::v-deep { |
| | | .input-with-select .el-input-group__prepend { |
| | | background-color: #fff; |
| | | } |
| | | } |
| | | </style> |
| | |
| | | return { |
| | | editVisible: false, |
| | | title: "", |
| | | infomation: { |
| | | name: "", |
| | | color: "", |
| | | setDefault: "" |
| | | } |
| | | infomation: {} |
| | | } |
| | | } |
| | | } |
New file |
| | |
| | | <template> |
| | | <div class="edit-selClient-box"> |
| | | <el-dialog |
| | | :title="'销售线索'" |
| | | :visible.sync="editConfig.editVisible" |
| | | :width="dialogWidth" |
| | | :before-close="handleClose" |
| | | :append-to-body="true" |
| | | :close-on-click-modal="false" |
| | | > |
| | | <div class="bg-view"> |
| | | <div class="query-bg"> |
| | | <el-input placeholder="请输入内容" v-model="queryInput" size="mini" class="input-with-select"> |
| | | <el-select v-model="select" slot="prepend" placeholder="请选择"> |
| | | <el-option label="全部字段" value="1"></el-option> |
| | | <el-option label="客户名称" value="2"></el-option> |
| | | <el-option label="商机状态" value="3"></el-option> |
| | | <el-option label="商机来源" value="4"></el-option> |
| | | </el-select> |
| | | </el-input> |
| | | <div class="btn"> |
| | | <el-button type="primary" size="mini" disabled>设置字段</el-button> |
| | | <el-button type="primary" size="mini" disabled>快速创建</el-button> |
| | | </div> |
| | | </div> |
| | | <el-table |
| | | :data="tableData" |
| | | border |
| | | size="mini" |
| | | v-loading="loading" |
| | | :header-cell-style="{ background: '#f7f7f7' }" |
| | | > |
| | | <el-table-column label="客户名称" prop="name" show-overflow-tooltip> |
| | | <template slot-scope="scope"> |
| | | <span class="sel-name" @click="selNameClick(scope.row)">{{ scope.row.name }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="商机状态" prop="businessStatus"></el-table-column> |
| | | <el-table-column label="商机来源" prop="sales_sources_id"></el-table-column> |
| | | <div slot="empty"> |
| | | <el-empty :image-size="100"></el-empty> |
| | | </div> |
| | | </el-table> |
| | | <div slot="footer" class="dialog-footer"> |
| | | <div class="remark">说明:支持多字段模糊查询,仅显示符合条件的前5条数据</div> |
| | | </div> |
| | | </div> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import { getSalesLeadsList } from "@/api/client/salesLead" |
| | | export default { |
| | | name: "EditSelChanceDialog", |
| | | props: { |
| | | editCommonConfig: { |
| | | type: Object, |
| | | default: () => { |
| | | return { |
| | | editVisible: false, |
| | | title: "", |
| | | infomation: {} |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | components: {}, |
| | | computed: {}, |
| | | data() { |
| | | return { |
| | | dialogWidth: "50%", |
| | | editConfig: this.editCommonConfig, |
| | | queryInput: "", |
| | | select: "1", |
| | | tableData: [], |
| | | searchSelOptions: [], |
| | | loading: false |
| | | } |
| | | }, |
| | | created() { |
| | | this.getData() |
| | | }, |
| | | methods: { |
| | | handleClose() { |
| | | this.editConfig.editVisible = false |
| | | }, |
| | | // 请求数据 |
| | | async getData() { |
| | | this.loading = true |
| | | await getSalesLeadsList() |
| | | .then((res) => { |
| | | console.log(res) |
| | | if (res.code === 200) { |
| | | if (res.data.list && res.data.list.length > 0) { |
| | | const list = res.data.list.map((item) => { |
| | | return { |
| | | ...item |
| | | } |
| | | }) |
| | | this.tableData = list.slice(0, 5) || [] |
| | | } else { |
| | | this.tableData = [] |
| | | } |
| | | } else { |
| | | this.tableData = [] |
| | | } |
| | | this.loading = false |
| | | }) |
| | | .catch((err) => { |
| | | console.log(err) |
| | | this.tableData = [] |
| | | this.loading = false |
| | | }) |
| | | }, |
| | | selNameClick(row) { |
| | | this.editConfig.editVisible = false |
| | | console.log(row) |
| | | this.$emit("selClient", row, "lead") |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <!-- Add "scoped" attribute to limit CSS to this component only --> |
| | | <style lang="scss" scoped> |
| | | .bg-view { |
| | | margin: 10px; |
| | | .query-bg { |
| | | margin-bottom: 10px; |
| | | display: flex; |
| | | justify-content: space-between; |
| | | .el-input { |
| | | width: 310px; |
| | | .el-select { |
| | | width: 100px; |
| | | } |
| | | } |
| | | .btn { |
| | | float: right; |
| | | } |
| | | } |
| | | } |
| | | .sel-name { |
| | | color: $color-primary; |
| | | cursor: pointer; |
| | | } |
| | | .dialog-footer { |
| | | height: 40px; |
| | | line-height: 40px; |
| | | color: red; |
| | | } |
| | | ::v-deep { |
| | | .input-with-select .el-input-group__prepend { |
| | | background-color: #fff; |
| | | } |
| | | } |
| | | </style> |
| | |
| | | <div class="custom-name"> |
| | | <el-autocomplete |
| | | v-model="editConfig.infomation.client_name" |
| | | :fetch-suggestions="querySearchAsync" |
| | | :fetch-suggestions=" |
| | | (queryString, callback) => { |
| | | querySearchAsync(queryString, callback, 'client') |
| | | } |
| | | " |
| | | value-key="name" |
| | | @select="handleSelectClient('client', $event)" |
| | | ></el-autocomplete> |
| | |
| | | <div class="custom-name"> |
| | | <el-autocomplete |
| | | v-model="editConfig.infomation.contact_name" |
| | | :fetch-suggestions="queryContactAsync" |
| | | :fetch-suggestions=" |
| | | (queryString, callback) => { |
| | | querySearchAsync(queryString, callback, 'contact') |
| | | } |
| | | " |
| | | value-key="name" |
| | | @select="handleSelectClient('contact', $event)" |
| | | ></el-autocomplete> |
| | |
| | | this.editConfig.visible = false |
| | | }, |
| | | // 选择客户相关方法 |
| | | querySearchAsync(queryString, cb) { |
| | | var restaurants = this.clientList |
| | | var results = queryString ? restaurants.filter(this.createStateFilter(queryString)) : restaurants |
| | | cb(results) |
| | | }, |
| | | // 选择联系人姓名 |
| | | queryContactAsync(queryString, cb) { |
| | | var restaurants = this.contactNamelist |
| | | querySearchAsync(queryString, cb, value) { |
| | | var restaurants = [] |
| | | if (value === "client") { |
| | | restaurants = this.clientList |
| | | } else if (value === "contact") { |
| | | restaurants = this.contactNamelist |
| | | } |
| | | var results = queryString ? restaurants.filter(this.createStateFilter(queryString)) : restaurants |
| | | cb(results) |
| | | }, |
| | |
| | | <div class="custom-name"> |
| | | <el-autocomplete |
| | | v-model="editConfig.infomation.client_name" |
| | | :fetch-suggestions="querySearchAsync" |
| | | :fetch-suggestions=" |
| | | (queryString, callback) => { |
| | | querySearchAsync(queryString, callback, 'client') |
| | | } |
| | | " |
| | | value-key="name" |
| | | @select="handleSelectClient" |
| | | @select="handleSelectClient('client', $event)" |
| | | ></el-autocomplete> |
| | | <div class="common-select-btn" @click="selClientClick"> |
| | | <div class="common-select-btn" @click="selClientClick('client')"> |
| | | <i class="el-icon-circle-plus-outline" title="选择"></i> |
| | | </div> |
| | | <div class="common-select-btn" @click="clearupClient"> |
| | | <div class="common-select-btn" @click="clearupClient('client')"> |
| | | <i class="el-icon-edit-outline" title="清除"></i> |
| | | </div> |
| | | </div> |
| | |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="联系人姓名" prop="contact_id"> |
| | | <el-input v-model="editConfig.infomation.contact_id"></el-input> |
| | | <el-form-item label="联系人姓名" prop="contact_name"> |
| | | <div class="custom-name"> |
| | | <el-autocomplete |
| | | v-model="editConfig.infomation.contact_name" |
| | | :fetch-suggestions=" |
| | | (queryString, callback) => { |
| | | querySearchAsync(queryString, callback, 'contact') |
| | | } |
| | | " |
| | | value-key="name" |
| | | @select="handleSelectClient('contact', $event)" |
| | | ></el-autocomplete> |
| | | <div class="common-select-btn" @click="selClientClick('contact')"> |
| | | <i class="el-icon-circle-plus-outline" title="选择"></i> |
| | | </div> |
| | | <div class="common-select-btn" @click="clearupClient('contact')"> |
| | | <i class="el-icon-edit-outline" title="清除"></i> |
| | | </div> |
| | | </div> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | |
| | | size="mini" |
| | | style="width: 63%" |
| | | > |
| | | <el-option v-for="item in memberOptions" :key="item.id" :label="item.name" :value="item.id"> |
| | | <el-option v-for="item in memberOptions" :key="item.id" :label="item.username" :value="item.id"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | |
| | | :edit-common-config="editSelectClientConfig" |
| | | @selClient="selClient" |
| | | /> |
| | | <!-- 选择联系人 --> |
| | | <SelectContactDialog |
| | | v-if="editSelectContactConfig.editVisible" |
| | | :edit-common-config="editSelectContactConfig" |
| | | @selClient="selClient" |
| | | /> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | |
| | | import { getAllData } from "@/api/client/client" |
| | | import { getAddSaleChance, getUpdateSaleChance } from "@/api/sales/salesOpportunity" |
| | | import SelectClientDialog from "@/views/other/commonDialog/SelectClientDialog" |
| | | import SelectContactDialog from "@/views/other/commonDialog/SelectContactDialog" |
| | | export default { |
| | | name: "AddSalesOpportunityDialog", |
| | | props: { |
| | |
| | | } |
| | | } |
| | | }, |
| | | components: { SelectClientDialog }, |
| | | components: { SelectClientDialog, SelectContactDialog }, |
| | | computed: { |
| | | searchCommonHeight() { |
| | | return this.$refs.searchCommonView.offsetHeight |
| | | }, |
| | | clientList() { |
| | | return this.$store.state.getClientName.clientList |
| | | }, |
| | | contactNamelist() { |
| | | return this.$store.state.getClientName.contactNamelist |
| | | } |
| | | }, |
| | | data() { |
| | |
| | | title: "", |
| | | infomation: {} |
| | | }, |
| | | restaurants: [] |
| | | editSelectContactConfig: { |
| | | editVisible: false, |
| | | title: "", |
| | | infomation: {} |
| | | }, |
| | | restaurants: [], |
| | | clientId: this.editCommonConfig.infomation.client_id, |
| | | contactId: this.editCommonConfig.infomation.contact_id |
| | | } |
| | | }, |
| | | created() { |
| | | this.$store.dispatch("geClient") |
| | | this.$store.dispatch("geContact") |
| | | this.getCommonData() |
| | | }, |
| | | methods: { |
| | |
| | | budget: data.budget || 0, |
| | | capital_budget: data.capital_budget || "", |
| | | city_id: data.city_id || 0, |
| | | client_id: data.client_id || 0, |
| | | client_id: parseInt(this.clientId), |
| | | competitors: data.competitors || "", |
| | | contact_id: data.contact_id || 0, |
| | | contact_id: parseInt(this.contactId), |
| | | country_id: data.country_id || 0, |
| | | currency: data.currency || 0, |
| | | disadvantages: data.disadvantages || "", |
| | |
| | | return params |
| | | }, |
| | | // 选择用户相关方法 |
| | | querySearchAsync(queryString, cb) { |
| | | console.log(this.clientList) |
| | | var restaurants = this.clientList |
| | | querySearchAsync(queryString, cb, value) { |
| | | var restaurants = [] |
| | | if (value === "client") { |
| | | restaurants = this.clientList |
| | | } else if (value === "contact") { |
| | | restaurants = this.contactNamelist |
| | | } |
| | | var results = queryString ? restaurants.filter(this.createStateFilter(queryString)) : restaurants |
| | | cb(results) |
| | | }, |
| | |
| | | return state.name.toLowerCase().indexOf(queryString.toLowerCase()) === 0 |
| | | } |
| | | }, |
| | | handleSelectClient(item) { |
| | | this.editConfig.infomation.client_id = item.id |
| | | handleSelectClient(value, item) { |
| | | if (value === "client") { |
| | | this.clientId = item.id |
| | | } else if (value === "contact") { |
| | | this.contactId = item.id |
| | | } |
| | | }, |
| | | selClientClick() { |
| | | selClientClick(value) { |
| | | if (value === "client") { |
| | | this.editSelectClientConfig.editVisible = true |
| | | } else if (value === "contact") { |
| | | this.editSelectContactConfig.editVisible = true |
| | | } |
| | | }, |
| | | selClient(row) { |
| | | selClient(row, value) { |
| | | if (value === "contact") { |
| | | this.editConfig.infomation.contact_name = row.name |
| | | this.contactId = row.id |
| | | } else if (value === "client") { |
| | | this.editConfig.infomation.client_name = row.name |
| | | this.editConfig.infomation.client_id = row.id |
| | | this.clientId = row.id |
| | | } |
| | | }, |
| | | // 清除已选择用户 |
| | | clearupClient() { |
| | | clearupClient(value) { |
| | | if (value === "client") { |
| | | this.editConfig.infomation.client_name = "" |
| | | this.editConfig.infomation.client_id = 0 |
| | | this.clientId = 0 |
| | | } else if (value === "contact") { |
| | | this.editConfig.infomation.contact_name = "" |
| | | this.contactId = 0 |
| | | } |
| | | }, |
| | | // 添加附件 |
| | | addAnnexClick() {}, |
| | |
| | | <div class="custom-name"> |
| | | <el-autocomplete |
| | | v-model="editConfig.infomation.client_name" |
| | | :fetch-suggestions="querySearchAsync" |
| | | :fetch-suggestions=" |
| | | (queryString, callback) => { |
| | | querySearchAsync(queryString, callback, 'client') |
| | | } |
| | | " |
| | | value-key="name" |
| | | @select="handleSelectClient" |
| | | @select="handleSelectClient('client', $event)" |
| | | ></el-autocomplete> |
| | | <div class="common-select-btn" @click="selClientClick"> |
| | | <div class="common-select-btn" @click="selClientClick('client')"> |
| | | <i class="el-icon-circle-plus-outline" title="选择"></i> |
| | | </div> |
| | | <div class="common-select-btn" @click="clearupClient"> |
| | | <div class="common-select-btn" @click="clearupClient('client')"> |
| | | <i class="el-icon-edit-outline" title="清除"></i> |
| | | </div> |
| | | </div> |
| | |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="销售总单" prop="masterOrderId"> |
| | | <el-form-item label="销售总单" prop="masterOrderNumber"> |
| | | <div class="custom-name"> |
| | | <el-input v-model="editConfig.infomation.masterOrderId"></el-input> |
| | | <div class="common-select-btn"><i class="el-icon-circle-plus-outline" title="选择"></i></div> |
| | | <div class="common-select-btn"><i class="el-icon-edit" title="编辑"></i></div> |
| | | <el-autocomplete |
| | | v-model="editConfig.infomation.masterOrderNumber" |
| | | :fetch-suggestions=" |
| | | (queryString, callback) => { |
| | | querySearchAsync(queryString, callback, 'master') |
| | | } |
| | | " |
| | | value-key="number" |
| | | @select="handleSelectClient('master', $event)" |
| | | ></el-autocomplete> |
| | | <div class="common-select-btn" @click="selClientClick('master')"> |
| | | <i class="el-icon-circle-plus-outline" title="选择"></i> |
| | | </div> |
| | | <div class="common-select-btn" @click="clearupClient('master')"> |
| | | <i class="el-icon-edit-outline" title="清除"></i> |
| | | </div> |
| | | </div> |
| | | </el-form-item> |
| | | </el-col> |
| | |
| | | :edit-common-config="editSelectClientConfig" |
| | | @selClient="selClient" |
| | | /> |
| | | <!-- 选择销售总单 --> |
| | | <SelectCommonDialog |
| | | v-if="editSelectMasterConfig.editVisible" |
| | | :edit-common-config="editSelectMasterConfig" |
| | | @selClient="selClient" |
| | | /> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | |
| | | import { getAllData } from "@/api/client/client" |
| | | import { getAddSubOrder, getUpdateSubOrder } from "@/api/sales/subOrder" |
| | | import SelectClientDialog from "@/views/other/commonDialog/SelectClientDialog" |
| | | import SelectCommonDialog from "@/views/other/commonDialog/SelectCommonDialog" |
| | | |
| | | export default { |
| | | name: "SubOrderDialog", |
| | | components: { CommonFormTableView, SelectClientDialog }, |
| | | components: { CommonFormTableView, SelectClientDialog, SelectCommonDialog }, |
| | | props: { |
| | | editCommonConfig: { |
| | | type: Object, |
| | |
| | | computed: { |
| | | clientList() { |
| | | return this.$store.state.getClientName.clientList |
| | | }, |
| | | masterOrderList() { |
| | | return this.$store.state.getClientName.masterOrderList |
| | | } |
| | | }, |
| | | data() { |
| | |
| | | editVisible: false, |
| | | title: "", |
| | | infomation: {} |
| | | } |
| | | }, |
| | | editSelectMasterConfig: { |
| | | editVisible: false, |
| | | title: "", |
| | | infomation: {} |
| | | }, |
| | | clientId: this.editCommonConfig.infomation.client_id, |
| | | masterId: this.editCommonConfig.infomation.masterOrderId |
| | | } |
| | | }, |
| | | created() { |
| | | this.$store.dispatch("geClient") |
| | | this.$store.dispatch("geMaster") |
| | | this.setTableForm() |
| | | this.getCommonData() |
| | | }, |
| | |
| | | console.log(res) |
| | | if (res.code === 200) { |
| | | this.memberOptions = res.data.member |
| | | this.dataProcess() |
| | | } |
| | | }) |
| | | .catch((err) => { |
| | | console.log(err) |
| | | }) |
| | | }, |
| | | dataProcess() { |
| | | this.masterOrderList.map((item) => { |
| | | if (this.masterId === item.id) { |
| | | this.editConfig.infomation.masterOrderNumber = item.number |
| | | } |
| | | }) |
| | | }, |
| | | // 保存 |
| | |
| | | let data = this.editConfig.infomation |
| | | let params = { |
| | | id: this.editConfig.title === "新建" ? 0 : data.id, |
| | | clientId: parseInt(data.client_id) || 0, |
| | | masterOrderId: parseInt(data.masterOrderId) || 0, |
| | | clientId: parseInt(this.clientId) || 0, |
| | | masterOrderId: parseInt(this.masterId) || 0, |
| | | memberId: data.memberId || 0, |
| | | number: data.number || "", |
| | | product: [ |
| | |
| | | this.editConfig.visible = false |
| | | }, |
| | | // 选择客户相关方法 |
| | | querySearchAsync(queryString, cb) { |
| | | var restaurants = this.clientList |
| | | var results = queryString ? restaurants.filter(this.createStateFilter(queryString)) : restaurants |
| | | querySearchAsync(queryString, cb, value) { |
| | | var restaurants = [] |
| | | if (value === "client") { |
| | | restaurants = this.clientList |
| | | } else if (value === "master") { |
| | | restaurants = this.masterOrderList |
| | | } |
| | | // else if (value === "chance") { |
| | | // restaurants = this.saleChancelist |
| | | // } else { |
| | | // restaurants = this.saleLeadlist |
| | | // } |
| | | var results = queryString ? restaurants.filter(this.createStateFilter(queryString, value)) : restaurants |
| | | cb(results) |
| | | }, |
| | | createStateFilter(queryString) { |
| | | createStateFilter(queryString, value) { |
| | | return (state) => { |
| | | console.log(state) |
| | | if (value === "client") { |
| | | return state.name.toLowerCase().indexOf(queryString.toLowerCase()) === 0 |
| | | } else if (value === "master") { |
| | | return state.number.toLowerCase().indexOf(queryString.toLowerCase()) === 0 |
| | | } |
| | | } |
| | | }, |
| | | handleSelectClient(item) { |
| | | this.editConfig.infomation.client_id = item.id |
| | | handleSelectClient(value, item) { |
| | | if (value === "client") { |
| | | this.clientId = item.id |
| | | } else if (value === "master") { |
| | | this.masterId = item.id |
| | | } |
| | | }, |
| | | selClientClick() { |
| | | selClientClick(value) { |
| | | if (value == "client") { |
| | | this.editSelectClientConfig.editVisible = true |
| | | } else if (value == "master") { |
| | | this.editSelectMasterConfig.title = "销售总单" |
| | | this.editSelectMasterConfig.editVisible = true |
| | | } |
| | | }, |
| | | selClient(row) { |
| | | selClient(row, value) { |
| | | console.log(row) |
| | | if (value == "client") { |
| | | this.editConfig.infomation.client_name = row.name |
| | | this.editConfig.infomation.client_id = row.id |
| | | this.clientId = row.id |
| | | } else if (value == "master") { |
| | | this.editConfig.infomation.masterOrderNumber = row.number |
| | | this.masterId = row.id |
| | | } |
| | | }, |
| | | // 清除已选择用户 |
| | | clearupClient() { |
| | | clearupClient(value) { |
| | | if (value == "client") { |
| | | this.editConfig.infomation.client_name = "" |
| | | this.editConfig.infomation.client_id = 0 |
| | | this.clientId = 0 |
| | | } else if (value == "master") { |
| | | this.editConfig.infomation.masterOrderNumber = "" |
| | | this.masterId = 0 |
| | | } |
| | | }, |
| | | // 添加附件 |
| | | addAnnexClick() {}, |
| | |
| | | console.log(row) |
| | | this.editConfig.visible = true |
| | | this.editConfig.title = "编辑" |
| | | this.editConfig.infomation = { ...row } |
| | | this.editConfig.infomation = { ...row, masterOrderNumber: "" } |
| | | }, |
| | | // 删除 |
| | | delClick(id) { |