Merge branch 'dev' of http://192.168.5.5:10010/r/web/crm-web into wn
| | |
| | | // import request from "@/common/untils/request.js" |
| | | import axios from "axios" |
| | | import request from "@/common/untils/request"; |
| | | |
| | | // 获取城市列表 |
| | | export const getCityList = async (data) => { |
| | | return await axios.get(`/api/city/list`, { |
| | | return await request({ |
| | | url: "/api/city/list", |
| | | method: "get", |
| | | params: data |
| | | }) |
| | | // |
| | | // return await axios.get(`/api/city/list`, { |
| | | // params: data |
| | | // }) |
| | | } |
| | |
| | | } |
| | | // 获取产品列表 |
| | | export const getProductList = async (data) => { |
| | | return await axios.get(`/api/product/list`, { |
| | | return await request({ |
| | | url: "/api/product/list", |
| | | method: "get", |
| | | params: data |
| | | }) |
| | | |
| | | // return await axios.get(`/api/product/list`, { |
| | | // params: data |
| | | // }) |
| | | } |
| | | |
| | | // 获取常见问题列表 |
| | | export const getFaqList = async (data) => { |
| | | return await axios.get(`/api/faq/list`, { |
| | | return await request({ |
| | | url: "/api/faq/list", |
| | | method: "get", |
| | | params: data |
| | | }) |
| | | |
| | | // return await axios.get(`/api/faq/list`, { |
| | | // params: data |
| | | // }) |
| | | } |
| | | |
| | | // 分配 |
| | |
| | | |
| | | // 获取收款单 |
| | | export const getReceiptList = async (data) => { |
| | | return await axios.get(`/api/receipt/list`, { |
| | | return await request({ |
| | | url: "/api/receipt/list", |
| | | method: "get", |
| | | params: data |
| | | }) |
| | | |
| | | // return await axios.get(`/api/receipt/list`, { |
| | | // params: data |
| | | // }) |
| | | } |
| | | // 添加收款单 |
| | | export function addReceipt(data) { |
| | |
| | | |
| | | // 获取银行账户列表 |
| | | export const getBankAccountList = async (data) => { |
| | | return await axios.get(`/api/bankAccount/list`, { |
| | | return await request({ |
| | | url: "/api/bankAccount/list", |
| | | method: "get", |
| | | params: data |
| | | }) |
| | | // |
| | | // return await axios.get(`/api/bankAccount/list`, { |
| | | // params: data |
| | | // }) |
| | | } |
| | | |
| | | // 获取支付方式列表 |
| | | export const getPaymentTypeList = async (data) => { |
| | | return await axios.get(`/api/paymentType/list`, { |
| | | return await request({ |
| | | url: "/api/paymentType/list", |
| | | method: "get", |
| | | params: data |
| | | }) |
| | | // return await axios.get(`/api/paymentType/list`, { |
| | | // params: data |
| | | // }) |
| | | } |
| | | |
| | | // 获取发票类别列表 |
| | | export const getInvoiceTypeList = async (data) => { |
| | | return await axios.get(`/api/invoiceType/list`, { |
| | | return await request({ |
| | | url: "/api/invoiceType/list", |
| | | method: "get", |
| | | params: data |
| | | }) |
| | | // return await axios.get(`/api/invoiceType/list`, { |
| | | // params: data |
| | | // }) |
| | | } |
| | | |
| | | // 票据状态列表 |
| | | export const getInvoiceStatusList = async (data) => { |
| | | return await axios.get(`/api/invoiceStatus/list`, { |
| | | return await request({ |
| | | url: "/api/invoiceStatus/list", |
| | | method: "get", |
| | | params: data |
| | | }) |
| | | // return await axios.get(`/api/invoiceStatus/list`, { |
| | | // params: data |
| | | // }) |
| | | } |
| | | |
| | | // 物理公司列表 |
| | | export const getCourierCompanyList = async (data) => { |
| | | return await axios.get(`/api/courierCompany/list`, { |
| | | return await request({ |
| | | url: "/api/courierCompany/list", |
| | | method: "get", |
| | | params: data |
| | | }) |
| | | // return await axios.get(`/api/courierCompany/list`, { |
| | | // params: data |
| | | // }) |
| | | } |
| | |
| | | // import request from "@/common/untils/request.js" |
| | | import axios from "axios" |
| | | import request from "@/common/untils/request"; |
| | | //编码规范列表 |
| | | // export function getCodeStandardList (data) { |
| | | // return request({ |
| | |
| | | // }); |
| | | // } |
| | | export function getCodeStandardList(data) { |
| | | return axios.get(`/api/code/getCodeList`, { |
| | | // return axios.get(`/api/code/getCodeList`, { |
| | | // params: data |
| | | // }) |
| | | |
| | | return request({ |
| | | url: "/api/code/getCodeList", |
| | | method: "get", |
| | | params: data |
| | | }) |
| | | } |
| | |
| | | <template> |
| | | <div class="sales-lead"> |
| | | <div class="header-title">{{ headerTitle }}</div> |
| | | <div class="header-user-info"> |
| | | <div class="avatar"><el-avatar icon="el-icon-user-solid"></el-avatar></div> |
| | | <el-dropdown @command="handleCommand"> |
| | | <div class="el-dropdown-link">用户名<i class="el-icon-arrow-down el-icon--right"></i></div> |
| | | <el-dropdown-menu slot="dropdown"> |
| | | <el-dropdown-item command="logout">退出</el-dropdown-item> |
| | | </el-dropdown-menu> |
| | | </el-dropdown> |
| | | </div> |
| | | <!-- <div class="header-user-info">--> |
| | | <!-- <div class="avatar"><el-avatar icon="el-icon-user-solid"></el-avatar></div>--> |
| | | <!-- <el-dropdown @command="handleCommand">--> |
| | | <!-- <div class="el-dropdown-link">用户名<i class="el-icon-arrow-down el-icon--right"></i></div>--> |
| | | <!-- <el-dropdown-menu slot="dropdown">--> |
| | | <!-- <el-dropdown-item command="logout">退出</el-dropdown-item>--> |
| | | <!-- </el-dropdown-menu>--> |
| | | <!-- </el-dropdown>--> |
| | | <!-- </div>--> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | page: 1, |
| | | pageSize: 5 |
| | | }).then((res) => { |
| | | console.log(res.data) |
| | | if (res.data.code === 200) { |
| | | if (res.data.data.data && res.data.data.data.length > 0) { |
| | | this.productList = res.data.data.data |
| | | console.log(res,"产品名称") |
| | | if (res.code === 200) { |
| | | if (res.data.data && res.data.data.length > 0) { |
| | | this.productList = res.data.data |
| | | } |
| | | } |
| | | }) |
| | |
| | | } |
| | | }) |
| | | }, |
| | | getContactFilter({commit},newData){ |
| | | getContactFilter({ commit }, newData) { |
| | | commit("contactNameList", newData) |
| | | }, |
| | | geChance(context) { |
| | |
| | | Message.error(res.msg) |
| | | } |
| | | }) |
| | | }, |
| | | getChanceFilter({commit},newData){ |
| | | commit("saleChancelist",newData) |
| | | }, |
| | | geLead(context) { |
| | | getSalesLeadsList().then((res) => { |
| | |
| | | } |
| | | }) |
| | | }, |
| | | getSalesDetailsFliter({commit},newData){ |
| | | commit("salesDetailsList", newData) |
| | | }, |
| | | geQuotation(context) { |
| | | getQuotationList().then((res) => { |
| | | if (res.code == 200) { |
| | |
| | | }, |
| | | geProductList(context) { |
| | | getProductList({ productName: "", productNumber: "", page: 1, pageSize: 10 }).then((res) => { |
| | | if (res.data.code == 200) { |
| | | console.log(res.data.data.data) |
| | | context.commit("productList", res.data.data.data) |
| | | if (res.code == 200) { |
| | | console.log(res.data.data) |
| | | context.commit("productList", res.data.data) |
| | | } else { |
| | | Message.error(res.msg) |
| | | } |
| | |
| | | Message.error(res.msg) |
| | | } |
| | | }) |
| | | }, |
| | | getReturnListFliter({commit},newData){ |
| | | commit("salesReturnList",newData) |
| | | } |
| | | } |
| | | } |
| | |
| | | <el-col :span="12" v-if="isUnflod"> |
| | | <el-form-item label="跟进记录编号" prop="number"> |
| | | <WordInput |
| | | v-if="codenumer && (explain != '' || isIdDisabled)&&method == 0" |
| | | v-if="codenumer && (explain != '' || isIdDisabled) && method == 0" |
| | | :codenumer="codenumer" |
| | | :sum="sum" |
| | | :disabled="this.editConfig.title !== '新建' || isIdDisabled" |
| | | :disabled="this.editConfig.title !== '新建' || isIdDisabled" |
| | | :inputValue="inputValue" |
| | | @codeList="codeList" |
| | | /> |
| | | <span v-else-if="method == 0" style="color: #f56c6c" |
| | | >请优先配置编码规范 |
| | | <el-button type="text" @click="numberClick"> |
| | | 配置规范 |
| | | </el-button |
| | | ></span |
| | | >请优先配置编码规范 <el-button type="text" @click="numberClick"> 配置规范 </el-button></span |
| | | > |
| | | <span v-else>自动生成</span> |
| | | <span v-else>自动生成</span> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | |
| | | value-key="name" |
| | | @select="handleSelectClient('chance', $event)" |
| | | style="width: 100%" |
| | | placeholder="请先选择客户名称" |
| | | :disabled="isChance" |
| | | ></el-autocomplete> |
| | | <div class="common-select-btn" @click="selClientClick('chance')"> |
| | | <div v-if="!isChance" class="common-select-btn" @click="selClientClick('chance')"> |
| | | <i class="el-icon-circle-plus-outline"></i> |
| | | </div> |
| | | <div |
| | | v-if="editConfig.infomation.sale_chance_name && editConfig.infomation.sale_chance_name.length > 0" |
| | | v-if=" |
| | | editConfig.infomation.sale_chance_name && |
| | | editConfig.infomation.sale_chance_name.length > 0 && |
| | | !isChance |
| | | " |
| | | class="common-select-btn" |
| | | @click="clearupClient('chance')" |
| | | > |
| | |
| | | import SelectContactDialog from "@/views/other/commonDialog/SelectContactDialog" |
| | | 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 { mapActions } from 'vuex'; |
| | | import codeMixin from "./mixin/codeMixin" |
| | | // import { getContactList } from "@/api/client/contacts" |
| | | import { mapActions } from "vuex" |
| | | import { getSaleChanceList } from "@/api/sales/salesOpportunity" |
| | | |
| | | export default { |
| | | name: "AddFollowupRecordsDialog", |
| | |
| | | contactNamelist() { |
| | | return this.$store.state.getClientName.contactNamelist |
| | | }, |
| | | saleChancelist() { |
| | | return this.$store.state.getClientName.saleChancelist |
| | | }, |
| | | // saleChancelist() { |
| | | // return this.$store.state.getClientName.saleChancelist |
| | | // }, |
| | | saleLeadlist() { |
| | | return this.$store.state.getClientName.saleLeadlist |
| | | } |
| | |
| | | number: [{ required: true, message: "请输入跟进记录编号", trigger: "blur" }], |
| | | member_id: [{ required: true, message: "请选择负责人", trigger: "change" }], |
| | | record: [{ required: true, message: "请输入跟进记录", trigger: "blur" }], |
| | | client_name:[{ required: true, message: "请选择客户名称", trigger: "change" }], |
| | | topic:[{ required: true, message: "请输入主题", trigger: "blur" }], |
| | | client_name: [{ required: true, message: "请选择客户名称", trigger: "change" }], |
| | | contact_name: [{ required: true, message: "请选择联系人姓名", trigger: "change" }], |
| | | topic: [{ required: true, message: "请输入主题", trigger: "blur" }], |
| | | // content: [{ required: true, message: "请输入内容", trigger: "blur" }], |
| | | phoneNumber: [ |
| | | { required: false, message: "", trigger: "blur" }, |
| | |
| | | contactId: this.editContactsConfig.infomation.contact_id, |
| | | saleChanceId: this.editContactsConfig.infomation.sale_chance_id, |
| | | saleLeadId: this.editContactsConfig.infomation.sales_leads_id, |
| | | saleChancelist: [], |
| | | isChance: true |
| | | } |
| | | }, |
| | | 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() |
| | | this.formInfo(); |
| | | this.formInfo() |
| | | }, |
| | | watch:{ |
| | | 'editContactsConfig.visible'(val){ |
| | | if(val){ |
| | | watch: { |
| | | "editContactsConfig.visible"(val) { |
| | | if (val) { |
| | | this.formInfo() |
| | | } |
| | | }, |
| | | 'editContactsConfig.infomation.codeStandID'(){ |
| | | "editContactsConfig.infomation.codeStandID"() { |
| | | this.formInfo() |
| | | } |
| | | }, |
| | | methods: { |
| | | ...mapActions (['getContactFilter']), |
| | | formInfo(){ |
| | | this.objCode.type='跟进记录编码' |
| | | this.objCode.codeStandID = '' |
| | | if(this.editConfig.infomation.codeStandID){ |
| | | this.objCode.codeStandID = this.editConfig.infomation.codeStandID; |
| | | ...mapActions(["getContactFilter"]), |
| | | formInfo() { |
| | | this.objCode.type = "跟进记录编码" |
| | | this.objCode.codeStandID = "" |
| | | if (this.editConfig.infomation.codeStandID) { |
| | | this.objCode.codeStandID = this.editConfig.infomation.codeStandID |
| | | } |
| | | this.getRCodeStandardList(); |
| | | }, |
| | | this.getRCodeStandardList() |
| | | }, |
| | | getCommonData() { |
| | | getAllData().then((res) => { |
| | | console.log(res) |
| | |
| | | sale_chance_id: this.saleChanceId || 0, |
| | | sales_leads_id: this.saleLeadId || 0, |
| | | topic: data.topic || "", |
| | | codeStandID:data.ID, |
| | | codeRule:this.codeRule, |
| | | codeStandID: data.ID, |
| | | codeRule: this.codeRule |
| | | } |
| | | } |
| | | let params = {} |
| | |
| | | params = { ...follow_record, id: data.id || 0 } |
| | | } |
| | | return params |
| | | }, |
| | | // 获取销售机会 |
| | | getChanceList(id) { |
| | | getSaleChanceList({ |
| | | page: 0, |
| | | pageSize: 0, |
| | | search_map: { |
| | | client_id: id |
| | | } |
| | | }).then((res) => { |
| | | if (res.code == 200) { |
| | | this.saleChancelist = res.data.list |
| | | } |
| | | }) |
| | | }, |
| | | // 选择客户相关方法 |
| | | querySearchAsync(queryString, cb, value) { |
| | |
| | | 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) |
| | | } else if (value === "contact") { |
| | | this.contactId = item.id |
| | |
| | | } else if (value === "client") { |
| | | this.editConfig.infomation.client_name = row.name |
| | | this.clientId = row.id |
| | | this.isChance = false |
| | | this.getChanceList(row.id) |
| | | } else if (value === "chance") { |
| | | this.editConfig.infomation.sale_chance_name = row.name |
| | | this.saleChanceId = row.id |
| | |
| | | if (value === "client") { |
| | | this.editConfig.infomation.client_name = "" |
| | | this.clientId = 0 |
| | | this.isChance = true |
| | | this.editConfig.infomation.sale_chance_name = "" |
| | | this.saleChanceId = 0 |
| | | } else if (value === "contact") { |
| | | this.editConfig.infomation.contact_name = "" |
| | | this.contactId = 0 |
| | |
| | | }, |
| | | // 搜索 |
| | | onFilterSearch(searchText) { |
| | | this.search_map.name = searchText ?? "" |
| | | this.search_map.client_name = searchText ?? "" |
| | | this.pagerOptions.currPage = 1 |
| | | this.getData() |
| | | }, |
| | |
| | | this.codenumer = [] |
| | | this.sum = 0 |
| | | this.explain = "" |
| | | if (res.data.code == 200) { |
| | | const { |
| | | List = [], |
| | | ID, |
| | | AutoRule = {}, |
| | | Method |
| | | } = res.data.data && res.data.data.data ? res.data.data.data[0] : [] |
| | | this.codeRule = res.data.data && res.data.data.data ? res.data.data.data[0] : {} |
| | | if (res.code == 200) { |
| | | const { List = [], ID, AutoRule = {}, Method } = res.data && res.data.data ? res.data.data[0] : [] |
| | | this.codeRule = res.data && res.data.data ? res.data.data[0] : {} |
| | | let autoRule = AutoRule |
| | | let method = Method ? Method : 0 |
| | | this.method = method |
| | | let rules = List |
| | | this.editConfig.infomation.ID = ID |
| | | if (method == 0 && res.data.data.data.length > 0) { |
| | | if (method == 0 && res.data.data.length > 0) { |
| | | console.log("sss") |
| | | rules.forEach((item, index) => { |
| | | // setTimeout(() => { |
| | |
| | | return { |
| | | editVisible: false, |
| | | title: "", |
| | | clientId: 0, |
| | | tableInfomation: [] |
| | | } |
| | | } |
| | |
| | | } |
| | | }, |
| | | created() { |
| | | this.search_map = { |
| | | client_id: this.editConfig.clientId |
| | | } |
| | | this.setTable() |
| | | this.getData() |
| | | }, |
| | |
| | | pageSize: this.pagerOptions.pageSize |
| | | }).then((res) => { |
| | | console.log(res.data) |
| | | if (res.data.code === 200) { |
| | | if (res.data.data.data && res.data.data.data.length > 0) { |
| | | const list = res.data.data.data.map((item) => { |
| | | if (res.code === 200) { |
| | | if (res.data.data && res.data.data.length > 0) { |
| | | const list = res.data.data.map((item) => { |
| | | return { |
| | | ...item |
| | | } |
| | | }) |
| | | this.tableList.tableInfomation = list || [] |
| | | this.pagerOptions.totalCount = res.data.data.count |
| | | this.pagerOptions.totalCount = res.data.count |
| | | } else { |
| | | this.tableList.tableInfomation = [] |
| | | } |
| | |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="合同名称" prop="name"> |
| | | <el-form-item label="合同名称" prop="contractName"> |
| | | <div class="custom-name"> |
| | | <el-input v-model="editConfig.infomation.name"></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-input v-model="editConfig.infomation.contractName"></el-input> |
| | | </div> |
| | | </el-form-item> |
| | | </el-col> |
| | |
| | | value-key="number" |
| | | @select="handleSelectClient('quotation', $event)" |
| | | style="width: 100%" |
| | | placeholder="请先选择客户名称" |
| | | :disabled="isAddQuatation" |
| | | ></el-autocomplete> |
| | | <div class="common-select-btn" @click="selClientClick('quotation')"> |
| | | <div v-if="!isAddQuatation" class="common-select-btn" @click="selClientClick('quotation')"> |
| | | <i class="el-icon-circle-plus-outline" title="选择"></i> |
| | | </div> |
| | | <div |
| | | v-if="editConfig.infomation.quotation_number && editConfig.infomation.quotation_number.length > 0" |
| | | v-if=" |
| | | editConfig.infomation.quotation_number && |
| | | editConfig.infomation.quotation_number.length > 0 && |
| | | !isAddQuatation |
| | | " |
| | | class="common-select-btn" |
| | | @click="clearupClient('quotation')" |
| | | > |
| | |
| | | import SelectClientDialog from "@/views/other/commonDialog/SelectClientDialog" |
| | | import SelectCommonDialog from "@/views/other/commonDialog/SelectCommonDialog" |
| | | import codeMixin from "@/views/client/followupRecords/mixin/codeMixin" |
| | | import { getQuotationList } from "@/api/sales/quotation" |
| | | export default { |
| | | name: "AddContractManageDialog", |
| | | mixins: [codeMixin], |
| | |
| | | computed: { |
| | | clientList() { |
| | | return this.$store.state.getClientName.clientList |
| | | }, |
| | | quotationList() { |
| | | return this.$store.state.getClientName.quotationList |
| | | } |
| | | // quotationList() { |
| | | // return this.$store.state.getClientName.quotationList |
| | | // } |
| | | }, |
| | | data() { |
| | | return { |
| | |
| | | rules: { |
| | | number: [{ required: true, validator: this.checkCode, trigger: "blur" }], |
| | | client_name: [{ required: true, message: "请选择客户名称", trigger: "change" }], |
| | | member_id: [{ required: true, message: "请选择", trigger: "change" }] |
| | | member_id: [{ required: true, message: "请选择", trigger: "change" }], |
| | | contractName: [{ required: true, message: "请输入合同名称", trigger: "blur" }] |
| | | }, |
| | | memberOptions: [], |
| | | statusOptions: [], // 合同状态 |
| | |
| | | infomation: {} |
| | | }, |
| | | clientId: this.editCommonConfig.infomation.clientId, |
| | | quotationId: this.editCommonConfig.infomation.quotationId |
| | | quotationId: this.editCommonConfig.infomation.quotationId, |
| | | isAddQuatation: true, |
| | | quotationList: [] |
| | | } |
| | | }, |
| | | created() { |
| | | this.$store.dispatch("geClient") |
| | | this.$store.dispatch("geQuotation") |
| | | // this.$store.dispatch("geQuotation") |
| | | this.getCommonData() |
| | | this.formInfo() |
| | | }, |
| | |
| | | console.log(data) |
| | | let params = { |
| | | id: this.editConfig.title === "新建" ? 0 : data.id, |
| | | name: data.name || "", |
| | | contractName: data.contractName || "", |
| | | client_id: this.clientId || 0, |
| | | file: "", |
| | | member_id: data.memberId || 0, |
| | |
| | | }, |
| | | handleClose() { |
| | | this.editConfig.visible = false |
| | | }, |
| | | // 获取报价单 |
| | | getQuotation(id) { |
| | | getQuotationList({ |
| | | page: 0, |
| | | pageSize: 0, |
| | | search_map: { |
| | | client_id: id |
| | | } |
| | | }).then((res) => { |
| | | if (res.code == 200) { |
| | | console.log(res) |
| | | this.quotationList = res.data.list |
| | | } |
| | | }) |
| | | }, |
| | | // 选择客户相关方法 |
| | | querySearchAsync(queryString, cb, value) { |
| | |
| | | if (value === "client") { |
| | | this.editConfig.infomation.client_name = item.name |
| | | this.clientId = item.id |
| | | this.isAddQuatation = false |
| | | this.getQuotation(item.id) |
| | | } else if (value === "quotation") { |
| | | this.editConfig.infomation.quotation_number = item.number |
| | | this.quotationId = item.id |
| | |
| | | if (value === "client") { |
| | | this.editConfig.infomation.client_name = row.name |
| | | this.clientId = row.id |
| | | this.isAddQuatation = false |
| | | this.getQuotation(row.id) |
| | | } else if (value === "quotation") { |
| | | this.editConfig.infomation.quotation_number = row.number |
| | | this.quotationId = row.id |
| | |
| | | clearupClient(value) { |
| | | console.log(value) |
| | | if (value === "client") { |
| | | console.log("ss88888") |
| | | this.editConfig.infomation.client_name = "" |
| | | this.clientId = 0 |
| | | this.isAddQuatation = true |
| | | this.editConfig.infomation.quotation_number = "" |
| | | this.quotationId = 0 |
| | | } else if (value === "quotation") { |
| | | this.editConfig.infomation.quotation_number = "" |
| | | this.quotationId = 0 |
| | |
| | | <span v-else>{{ editConfig.title === "新建" ? "自动生成" : editConfig.infomation.number }}</span> |
| | | </el-form-item> |
| | | </el-col> |
| | | |
| | | <el-col :span="12"> |
| | | <el-form-item label="报价名称" prop="quotationName"> |
| | | <div class="custom-name"> |
| | | <el-input v-model="editConfig.infomation.quotationName"></el-input> |
| | | </div> |
| | | </el-form-item> |
| | | </el-col> |
| | | <!-- <el-col :span="12"> |
| | | <el-form-item label="客户名称" prop="client_name"> |
| | | <div class="custom-name"> |
| | | <el-autocomplete |
| | |
| | | </div> |
| | | </div> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-col> --> |
| | | <!-- <el-col :span="12">--> |
| | | <!-- <el-form-item label="报价编号" prop="number">--> |
| | | <!-- <el-input v-model="editConfig.infomation.number"></el-input>--> |
| | |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <!-- <el-col :span="12"> |
| | | <el-form-item label="联系人姓名" prop="contact_id"> |
| | | <div class="custom-name"> |
| | | <el-autocomplete |
| | |
| | | </div> |
| | | </div> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-col> --> |
| | | <el-col :span="12"> |
| | | <el-form-item label="销售负责人" prop="member_id"> |
| | | <el-select |
| | |
| | | dialogWidth: "50%", |
| | | editConfig: this.editCommonConfig, |
| | | rules: { |
| | | client_id: [{ required: true, message: "请输入", trigger: "blur" }], |
| | | 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, |
| | | client_id: this.clientId || 0, |
| | | quotationName: data.quotationName || "", |
| | | conditions: data.conditions || "", |
| | | contact_id: this.contactId || 0, |
| | | file: data.file || "", |
| | | member_id: data.member_id || 0, |
| | | number: data.number || "", |
| | |
| | | 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("请选择销售机会")) |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | <div class="content-title">{{ item.leftStr + ":" }}</div> |
| | | <div class="content-data">{{ item.leftValue ? item.leftValue : "--" }}</div> |
| | | </div> |
| | | <div class="right"> |
| | | <div v-if="item.rightStr.length > 0" class="right"> |
| | | <div class="content-title">{{ item.rightStr + ":" }}</div> |
| | | <div class="content-data">{{ item.rightValue ? item.rightValue : "--" }}</div> |
| | | </div> |
| | | </li> |
| | | </ul> |
| | | </div> |
| | | </div> |
| | | <!-- 条件与条款 --> |
| | | <div class="basic-info"> |
| | | <div class="basic-info-label" @click="expandClick('termsConditions')"> |
| | | <i v-if="isTermsConditionsExpand" class="el-icon-arrow-down"></i> |
| | | <i v-else class="el-icon-arrow-up"></i> |
| | | <span style="margin-left: 10px">条件与条款</span> |
| | | </div> |
| | | <div v-show="isTermsConditionsExpand" class="basic-info-content"> |
| | | <div class="termsConditions"> |
| | | <div class="content-title">{{ "条件与条款" + ":" }}</div> |
| | | <div class="content-termsConditions"> |
| | | {{ "\n" + detailConfig.infomation.conditions }} |
| | | <!-- <ul> |
| | | <li v-for="(item, index) in Status.termsConditions" :key="index">{{ item }}</li> |
| | | </ul> --> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <!-- 附件信息 --> |
| | |
| | | :show-summary="showSummary" |
| | | :product-table-list="productTableList" |
| | | /> |
| | | </div> |
| | | </div> |
| | | <!-- 条件与条款 --> |
| | | <div class="basic-info"> |
| | | <div class="basic-info-label" @click="expandClick('termsConditions')"> |
| | | <i v-if="isTermsConditionsExpand" class="el-icon-arrow-down"></i> |
| | | <i v-else class="el-icon-arrow-up"></i> |
| | | <span style="margin-left: 10px">条件与条款</span> |
| | | </div> |
| | | <div v-show="isTermsConditionsExpand" class="basic-info-content"> |
| | | <div class="termsConditions"> |
| | | <div class="content-title">{{ "条件与条款" + ":" }}</div> |
| | | <div class="content-termsConditions"> |
| | | {{ "\n" + detailConfig.infomation.conditions }} |
| | | <!-- <ul> |
| | | <li v-for="(item, index) in Status.termsConditions" :key="index">{{ item }}</li> |
| | | </ul> --> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <!-- 审批日志 --> |
| | |
| | | { |
| | | leftStr: "报价单状态", |
| | | leftValue: item.quotation_status.name, |
| | | rightStr: "联系人姓名", |
| | | rightValue: item.contact_name |
| | | rightStr: "销售机会", |
| | | rightValue: item.sale_chance.name |
| | | }, |
| | | { |
| | | leftStr: "有效期至", |
| | |
| | | rightValue: item.member.username |
| | | }, |
| | | { |
| | | leftStr: "销售机会", |
| | | leftValue: item.sale_chance.name, |
| | | rightStr: "创建时间", |
| | | leftStr: "创建时间", |
| | | leftValue: "", |
| | | rightStr: "", |
| | | rightValue: "" |
| | | } |
| | | ] |
| | |
| | | }, |
| | | tableColumn: [ |
| | | { label: "报价单号", prop: "number", min: 90, isCommonClick: true, default: true }, // 报价单号 |
| | | { label: "客户名称", prop: "client_name", min: 120, isClientClick: true }, // 客户名称 |
| | | { label: "联系人姓名", prop: "contact_name", min: 90, isContactClick: true }, // 联系人姓名 |
| | | { label: "报价单名称", prop: "quotationName", min: 120, isClientClick: true }, // 报价单名称 |
| | | // { label: "联系人姓名", prop: "contact_name", min: 90, isContactClick: true }, // 联系人姓名 |
| | | { label: "销售负责人", prop: "member_name" }, // 销售负责人 |
| | | { label: "有效期", prop: "validity_date", min: 100 }, // 修改时间 |
| | | // { label: "小计", prop: "subTotal" }, // 小计 |
| | |
| | | { label: "数量", prop: "productNumber", isProductAmount: true }, |
| | | { label: "价税合计", prop: "priceTax", isProductTotal: true } |
| | | ], |
| | | showCol: ["报价单号", "客户名称", "联系人姓名", "销售负责人", "有效期", "产品名称", "数量", "价税合计"] |
| | | showCol: ["报价单号", "报价单名称", "联系人姓名", "销售负责人", "有效期", "产品名称", "数量", "价税合计"] |
| | | } |
| | | }, |
| | | created() { |
| | |
| | | console.log(row) |
| | | this.editConfig.visible = true |
| | | this.editConfig.title = "编辑" |
| | | console.log("dddddddd") |
| | | console.log(row) |
| | | this.editConfig.infomation = { ...row, currency: "人民币" } |
| | | }, |
| | | // 批量删除 |
| | |
| | | import SelectCommonDialog from "@/views/other/commonDialog/SelectCommonDialog" |
| | | import { getPaymentTypeList } from "@/api/common/payment" |
| | | import codeMixin from "@/views/client/followupRecords/mixin/codeMixin" |
| | | import { getSalesReturnList } from "@/api/sales/salesReturn" |
| | | import { mapActions } from 'vuex'; |
| | | |
| | | export default { |
| | | name: "AddRefundFormDialog", |
| | | mixins: [codeMixin], |
| | |
| | | this.formInfo() |
| | | } |
| | | }, |
| | | methods: { |
| | | methods: { |
| | | ...mapActions(["getReturnListFliter"]), |
| | | formInfo() { |
| | | this.objCode.type = "销售退款编码" |
| | | this.objCode.codeStandID = "" |
| | |
| | | } |
| | | } |
| | | }, |
| | | handleSelectClient(value, item) { |
| | | async handleSelectClient(value, item) { |
| | | if (value === "client") { |
| | | this.clientId = item.id |
| | | console.log("客户名称",this.clientId,value,item) |
| | | await getSalesReturnList({ |
| | | clientId:this.clientId |
| | | }).then((res)=>{ |
| | | this.getReturnListFliter(res.data.list) |
| | | }) |
| | | |
| | | } else if (value === "salesReturn") { |
| | | console.log(item) |
| | | this.editConfig.infomation.sale_return_nunber = item.number |
| | |
| | | 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 {mapActions} from "vuex" |
| | | |
| | | export default { |
| | | name: "AddSalesDetailsDialog", |
| | | mixins: [codeMixin], |
| | |
| | | } |
| | | }, |
| | | methods: { |
| | | ...mapActions(["getChanceFilter"]), |
| | | formInfo() { |
| | | this.objCode.type = "销售明细编码" |
| | | this.objCode.codeStandID = "" |
| | |
| | | return state.name.toLowerCase().indexOf(queryString.toLowerCase()) === 0 |
| | | } |
| | | }, |
| | | handleSelectClient(value, item) { |
| | | async handleSelectClient(value, item) { |
| | | if (value === "client") { |
| | | this.clientId = item.id |
| | | this.editConfig.infomation.client_name = item.name |
| | | // 需要修改 |
| | | await getSaleChanceList({ |
| | | client_id:this.clientId |
| | | }).then((res)=>{ |
| | | this.getChanceFilter(res.data.list) |
| | | }) |
| | | } else if (value === "chance") { |
| | | this.saleChanceId = item.id |
| | | this.editConfig.infomation.client_name = item.name |
| | |
| | | " |
| | | value-key="name" |
| | | @select="handleSelectClient('contact', $event)" |
| | | placeholder="请先选择客户名称" |
| | | :disabled="isContact" |
| | | ></el-autocomplete> |
| | | <div class="common-select-btn" @click="selClientClick('contact')"> |
| | | <div v-if="!isContact" class="common-select-btn" @click="selClientClick('contact')"> |
| | | <i class="el-icon-circle-plus-outline" title="选择"></i> |
| | | </div> |
| | | <div |
| | | v-if="editConfig.infomation.contact_name && editConfig.infomation.contact_name.length > 0" |
| | | v-if=" |
| | | editConfig.infomation.contact_name && |
| | | editConfig.infomation.contact_name.length > 0 && |
| | | !isContact |
| | | " |
| | | class="common-select-btn" |
| | | @click="clearupClient('contact')" |
| | | > |
| | |
| | | import { getCityList } from "@/api/common/address" |
| | | import WordInput from "@/components/wordInput.vue" |
| | | import codeMixin from "@/views/client/followupRecords/mixin/codeMixin" |
| | | import { getContactList } from "@/api/client/contacts" |
| | | export default { |
| | | name: "AddSalesOpportunityDialog", |
| | | mixins: [codeMixin], |
| | |
| | | }, |
| | | clientList() { |
| | | return this.$store.state.getClientName.clientList |
| | | }, |
| | | contactNamelist() { |
| | | return this.$store.state.getClientName.contactNamelist |
| | | } |
| | | }, |
| | | data() { |
| | |
| | | restaurants: [], |
| | | clientId: this.editCommonConfig.infomation.client_id, |
| | | contactId: this.editCommonConfig.infomation.contact_id, |
| | | objCode: { name: "", page: 0, pageSize: 0, type: "销售机会编码", codeStandID: "" } |
| | | objCode: { name: "", page: 0, pageSize: 0, type: "销售机会编码", codeStandID: "" }, |
| | | isContact: true, |
| | | contactNamelist: [] |
| | | } |
| | | }, |
| | | created() { |
| | | this.$store.dispatch("geClient") |
| | | this.$store.dispatch("geContact") |
| | | if (this.editConfig.title !== "新建" && this.editConfig.infomation.province_id !== 0) { |
| | | this.getCityList(this.editConfig.infomation.province_id, "edit") |
| | | } |
| | |
| | | } |
| | | return params |
| | | }, |
| | | // 获取联系人列表 |
| | | getContactList(id) { |
| | | getContactList({ |
| | | clientId: id, |
| | | page: 0, |
| | | pageSize: 0, |
| | | search_map: {} |
| | | }).then((res) => { |
| | | if (res.code == 200) { |
| | | this.contactNamelist = res.data.list |
| | | } |
| | | }) |
| | | }, |
| | | // 选择用户相关方法 |
| | | querySearchAsync(queryString, cb, value) { |
| | | var restaurants = [] |
| | |
| | | handleSelectClient(value, item) { |
| | | if (value === "client") { |
| | | this.clientId = item.id |
| | | this.isContact = false |
| | | this.getContactList(item.id) |
| | | } else if (value === "contact") { |
| | | this.contactId = item.id |
| | | } |
| | |
| | | if (value === "contact") { |
| | | this.editConfig.infomation.contact_name = row.name |
| | | this.contactId = row.id |
| | | this.isContact = false |
| | | this.getContactList(row.id) |
| | | } else if (value === "client") { |
| | | this.editConfig.infomation.client_name = row.name |
| | | this.clientId = row.id |
| | |
| | | if (value === "client") { |
| | | this.editConfig.infomation.client_name = "" |
| | | this.clientId = 0 |
| | | this.isContact = true |
| | | this.editConfig.infomation.contact_name = "" |
| | | this.contactId = 0 |
| | | } else if (value === "contact") { |
| | | this.editConfig.infomation.contact_name = "" |
| | | this.contactId = 0 |
| | |
| | | </el-col> |
| | | |
| | | <el-col :span="12"> |
| | | <el-form-item label="合同订单"> |
| | | <el-form-item label="销售明细单"> |
| | | <div class="custom-name"> |
| | | <el-autocomplete |
| | | style="width: 100%" |
| | |
| | | </el-row> |
| | | </div> |
| | | <!-- 动态信息 --> |
| | | <div class="basic-info-title">动态信息</div> |
| | | <div class="basic-info-view"> |
| | | <!-- <div class="basic-info-title">动态信息</div> --> |
| | | <!-- <div class="basic-info-view"> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item label="状态" prop="salesReturnStatusId"> |
| | |
| | | > |
| | | <el-option v-for="item in statusOptions" :key="item.id" :label="item.name" :value="item.id"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-select> --> |
| | | <!-- <div class="common-select-btn"><i class="el-icon-setting"></i></div> --> |
| | | </div> |
| | | <!-- </div> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | </div> --> |
| | | |
| | | <!-- 备注信息 --> |
| | | <div class="basic-info-title">备注信息</div> |
| | | <div class="basic-info-view"> |
| | |
| | | import { getProductList } from "@/api/common/other" |
| | | import SelectCommonDialog from "@/views/other/commonDialog/SelectCommonDialog" |
| | | import codeMixin from "@/views/client/followupRecords/mixin/codeMixin" |
| | | import { getSalesDetailsList } from "@/api/sales/salesDetails" |
| | | import {mapActions} from "vuex" |
| | | |
| | | export default { |
| | | name: "AddSalesReturnDialog", |
| | | mixins: [codeMixin], |
| | |
| | | } |
| | | }, |
| | | methods: { |
| | | ...mapActions(["getSalesDetailsFliter"]), |
| | | formInfo() { |
| | | this.objCode.type = "销售退货编码" |
| | | this.objCode.codeStandID = "" |
| | |
| | | // 获取产品列表 |
| | | async getProductList() { |
| | | await getProductList({ |
| | | page: 0, |
| | | pageSize: 0, |
| | | page: 1, |
| | | pageSize: 15, |
| | | productName: "", |
| | | productNumber: "" |
| | | productNumber: "", |
| | | // clientId:"100" |
| | | }).then((res) => { |
| | | console.log(res) |
| | | }) |
| | | }, |
| | | // 保存 |
| | |
| | | } |
| | | } |
| | | }, |
| | | handleSelectClient(value, item) { |
| | | async handleSelectClient(value, item) { |
| | | if (value === "client") { |
| | | this.clientId = item.id |
| | | await getSalesDetailsList({ |
| | | clientId:this.clientId |
| | | }).then((res)=>{ |
| | | this.getSalesDetailsFliter(res.data.list) |
| | | }) |
| | | |
| | | } else if (value === "contract") { |
| | | console.log(item,item.number,"选择框66") |
| | | this.productTableList.tableData=item.products |
| | | this.SalesDetailsId = item.id |
| | | } |
| | | }, |
| | |
| | | " |
| | | value-key="number" |
| | | @select="handleSelectClient('master', $event)" |
| | | placeholder="请先选择客户名称" |
| | | :disabled="isAddMaster" |
| | | ></el-autocomplete> |
| | | <div class="common-select-btn" @click="selClientClick('master')"> |
| | | <div v-if="!isAddMaster" class="common-select-btn" @click="selClientClick('master')"> |
| | | <i class="el-icon-circle-plus-outline" title="选择"></i> |
| | | </div> |
| | | <div |
| | | v-if=" |
| | | editConfig.infomation.master_order_number && |
| | | editConfig.infomation.master_order_number.length > 0 |
| | | editConfig.infomation.master_order_number.length > 0 && |
| | | !isAddMaster |
| | | " |
| | | class="common-select-btn" |
| | | @click="clearupClient('master')" |
| | |
| | | import SelectCommonDialog from "@/views/other/commonDialog/SelectCommonDialog" |
| | | import WordInput from "@/components/wordInput.vue" |
| | | import codeMixin from "@/views/client/followupRecords/mixin/codeMixin" |
| | | import { getMasterOrderList } from "@/api/sales/masterOrder" |
| | | |
| | | export default { |
| | | name: "SubOrderDialog", |
| | |
| | | computed: { |
| | | clientList() { |
| | | return this.$store.state.getClientName.clientList |
| | | }, |
| | | masterOrderList() { |
| | | return this.$store.state.getClientName.masterOrderList |
| | | } |
| | | // masterOrderList() { |
| | | // return this.$store.state.getClientName.masterOrderList |
| | | // } |
| | | }, |
| | | data() { |
| | | return { |
| | |
| | | tableData: [], |
| | | productId: 1, |
| | | addProductArr: [], |
| | | objCode: { name: "", page: 0, pageSize: 0, type: "销售子单编码", codeStandID: "" } |
| | | objCode: { name: "", page: 0, pageSize: 0, type: "销售子单编码", codeStandID: "" }, |
| | | isAddMaster: true, |
| | | masterOrderList: [] |
| | | } |
| | | }, |
| | | created() { |
| | | this.$store.dispatch("geClient") |
| | | this.$store.dispatch("geMaster") |
| | | // this.$store.dispatch("geMaster") |
| | | this.setTableForm() |
| | | this.getCommonData() |
| | | this.formInfo() |
| | |
| | | handleClose() { |
| | | this.editConfig.visible = false |
| | | }, |
| | | // 获取销售总单 |
| | | getMasterList(id) { |
| | | getMasterOrderList({ |
| | | page: 0, |
| | | pageSize: 0, |
| | | search_map: { |
| | | client_id: id |
| | | } |
| | | }).then((res) => { |
| | | if (res.code == 200) { |
| | | this.masterOrderList = res.data.list |
| | | } |
| | | }) |
| | | }, |
| | | // 选择客户相关方法 |
| | | querySearchAsync(queryString, cb, value) { |
| | | var restaurants = [] |
| | |
| | | handleSelectClient(value, item) { |
| | | if (value === "client") { |
| | | this.clientId = item.id |
| | | this.isAddMaster = false |
| | | this.getMasterList(item.id) |
| | | } else if (value === "master") { |
| | | this.masterId = item.id |
| | | } |
| | |
| | | } else if (value == "master") { |
| | | this.editSelectMasterConfig.title = "销售总单" |
| | | this.editSelectMasterConfig.editVisible = true |
| | | this.editSelectMasterConfig.clientId = this.clientId |
| | | this.editSelectMasterConfig.tableInfomation = [...this.masterOrderList] |
| | | } |
| | | }, |
| | |
| | | this.editConfig.infomation.client_name = row.name |
| | | this.editConfig.infomation.client_id = row.id |
| | | this.clientId = row.id |
| | | this.isAddMaster = false |
| | | this.getMasterList(row.id) |
| | | } else if (value == "master") { |
| | | this.editConfig.infomation.master_order_number = row.number |
| | | this.masterId = row.id |
| | |
| | | this.editConfig.infomation.client_name = "" |
| | | this.editConfig.infomation.client_id = 0 |
| | | this.clientId = 0 |
| | | this.isAddMaster = true |
| | | this.editConfig.infomation.master_order_number = "" |
| | | this.masterId = 0 |
| | | } else if (value == "master") { |
| | | this.editConfig.infomation.master_order_number = "" |
| | | this.masterId = 0 |
| | |
| | | this.codenumer = [] |
| | | this.sum = 0 |
| | | this.explain = "" |
| | | if (res.data.code == 200) { |
| | | const { |
| | | List = [], |
| | | ID, |
| | | AutoRule = {}, |
| | | Method |
| | | } = res.data.data && res.data.data.data ? res.data.data.data[0] : [] |
| | | this.codeRule = res.data.data && res.data.data.data ? res.data.data.data[0] : {} |
| | | if (res.code == 200) { |
| | | const { List = [], ID, AutoRule = {}, Method } = res.data && res.data.data ? res.data.data[0] : [] |
| | | this.codeRule = res.data && res.data.data ? res.data.data[0] : {} |
| | | let autoRule = AutoRule |
| | | let method = Method ? Method : 0 |
| | | this.method = method |
| | | let rules = List |
| | | this.editConfig.infomation.ID = ID |
| | | if (method == 0 && res.data.data.data.length > 0) { |
| | | if (method == 0 && res.data.data.length > 0) { |
| | | rules.forEach((item, index) => { |
| | | // setTimeout(() => { |
| | | // this.codenumer = item.length; |