客户管理,跟进记录,线索,发票,合同管理,总单,报价单,退款单,明细单,机会,退货单,子单,客户服务单,服务合同,服务回访单连天
| | |
| | | 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 autoRule = AutoRule |
| | | let method = Method ? Method : 0 |
| | | this.method = method |
| | | let rules = List |
| | |
| | | const res = await getAutoCode(this.codeRule); |
| | | if (res.code == 200) { |
| | | this.$set(this.editConfig.infomation, 'number', res.data?res.data:'') |
| | | }else{ |
| | | this.$set(this.editConfig.infomation, 'number', this.codeRule.AutoRule.PrefixValue?this.codeRule.AutoRule.PrefixValue:'') |
| | | } |
| | | } |
| | | |
| | |
| | | this.formInfo() |
| | | } |
| | | }, |
| | | 'editClientManageConfig.infomation.codeStandID'(){ |
| | | this.formInfo() |
| | | } |
| | | }, |
| | | methods: { |
| | | formInfo(){ |
| | |
| | | getAllData() |
| | | .then((res) => { |
| | | this.memberOptions = res.data.member |
| | | this.$set(this.editConfig.infomation,'member_id',this.editConfig.infomation.member_id) |
| | | this.clientSourceOptions = res.data.client_origin |
| | | this.clientStatusOptions = res.data.client_status |
| | | this.importantLevelOptions = res.data.client_level |
| | |
| | | if (valid) { |
| | | console.log(this.editConfig.infomation) |
| | | const params = this.saveParams() |
| | | console.log(params) |
| | | if (this.editConfig.title === "新建") { |
| | | getAddClient(params).then((res) => { |
| | | console.log(res) |
| | |
| | | editConfig: this.editContactsConfig, |
| | | rules: { |
| | | number: [ |
| | | { required: true, validator: this.validateCheckCode, trigger: "blur" }, |
| | | { required: true, validator: this.validateCheckCode, trigger: ["blur",'change'] }, |
| | | ], |
| | | member_id: [ |
| | | { required: true, message: "请选择负责人", trigger: "change" }, |
| | |
| | | this.formInfo(); |
| | | } |
| | | }, |
| | | "editContactsConfig.infomation.codeStandID"() { |
| | | this.formInfo(); |
| | | }, |
| | | }, |
| | | methods: { |
| | | ...mapActions(["getContactFilter", "getLeadFilter"]), |
| | |
| | | if (valid) { |
| | | const params = this.saveParams(); |
| | | if (this.editConfig.title === "新建") { |
| | | params.codeStandardID=this.autoCodeObj.codeStandardID |
| | | params.autoIncr=this.autoCodeObj.maxAutoIncr |
| | | getAddFollowRecord(params).then((res) => { |
| | | this.editConfig.visible = false; |
| | | if (res.code === 200) { |
| | |
| | | this.formInfo() |
| | | } |
| | | }, |
| | | 'editSalesLeadConfig.infomation.codeStandID'(){ |
| | | this.formInfo() |
| | | } |
| | | }, |
| | | methods: { |
| | | formInfo(){ |
| | |
| | | saveClick(formName) { |
| | | this.$refs[formName].validate((valid) => { |
| | | if (valid) { |
| | | console.log(this.editConfig.infomation) |
| | | let params = { |
| | | city_id: this.editConfig.infomation.city_id || 0, |
| | | contact_name: this.editConfig.infomation.contact_name || "", |
| | |
| | | detail_address: this.editConfig.infomation.detail_address || "", |
| | | codeStandID:this.editConfig.infomation.ID, |
| | | } |
| | | console.log(params) |
| | | if (this.editConfig.title === "新建") { |
| | | getAddSalesLeads(params).then((res) => { |
| | | console.log(res) |
| | |
| | | } |
| | | " |
| | | value-key="number" |
| | | :disabled="this.editCommonConfig.infomation.id?true:false" |
| | | @select="handleSelectClient('serviceContract', $event)" |
| | | style="width: 100%" |
| | | ></el-autocomplete> |
| | | <div class="common-select-btn" @click="selClientClick('serviceContract')"> |
| | | <i class="el-icon-circle-plus-outline" title="选择"></i> |
| | | </div> |
| | | <div |
| | | v-if=" |
| | | editConfig.infomation.serviceContract_Number && |
| | | editConfig.infomation.serviceContract_Number.length > 0 |
| | | " |
| | | class="common-select-btn" |
| | | @click="clearupClient('serviceContract')" |
| | | > |
| | | <i class="el-icon-remove-outline" title="清除"></i> |
| | | </div> |
| | | <template v-if='!this.editCommonConfig.infomation.id'> |
| | | <div class="common-select-btn" @click="selClientClick('serviceContract')"> |
| | | <i class="el-icon-circle-plus-outline" title="选择"></i> |
| | | </div> |
| | | <div |
| | | v-if=" |
| | | editConfig.infomation.serviceContract_Number && |
| | | editConfig.infomation.serviceContract_Number.length > 0 |
| | | " |
| | | class="common-select-btn" |
| | | @click="clearupClient('serviceContract')" |
| | | > |
| | | <i class="el-icon-remove-outline" title="清除"></i> |
| | | </div> |
| | | </template> |
| | | </div> |
| | | </el-form-item> |
| | | </el-col> |
| | |
| | | <el-form-item label="合同订单"> |
| | | <div class="custom-name"> |
| | | <el-autocomplete |
| | | v-model="editConfig.infomation.number" |
| | | v-model="editConfig.infomation.contract_number" |
| | | :fetch-suggestions=" |
| | | (queryString, callback) => { |
| | | querySearchAsync(queryString, callback, 'contract') |
| | | } |
| | | " |
| | | value-key="number" |
| | | :disabled="this.editCommonConfig.infomation.id?true:false" |
| | | @select="handleSelectClient('contract', $event)" |
| | | style="width: 100%" |
| | | ></el-autocomplete> |
| | | <div class="common-select-btn" @click="selClientClick('contract')"> |
| | | <i class="el-icon-circle-plus-outline" title="选择"></i> |
| | | </div> |
| | | <div |
| | | v-if="editConfig.infomation.number && editConfig.infomation.number.length > 0" |
| | | class="common-select-btn" |
| | | @click="clearupClient('contract')" |
| | | > |
| | | <i class="el-icon-remove-outline" title="清除"></i> |
| | | </div> |
| | | <template v-if='!this.editCommonConfig.infomation.id'> |
| | | <div class="common-select-btn" @click="selClientClick('contract')"> |
| | | <i class="el-icon-circle-plus-outline" title="选择"></i> |
| | | </div> |
| | | <div |
| | | v-if="editConfig.infomation.contract_number && editConfig.infomation.contract_number.length > 0" |
| | | class="common-select-btn" |
| | | @click="clearupClient('contract')" |
| | | > |
| | | <i class="el-icon-remove-outline" title="清除"></i> |
| | | </div> |
| | | </template> |
| | | </div> |
| | | </el-form-item> |
| | | </el-col> |
| | |
| | | infomation: {} |
| | | }, |
| | | clientId: this.editCommonConfig.infomation.client_id, |
| | | SalesDetailsId: this.editCommonConfig.infomation.SalesDetailsId, |
| | | SalesDetailsId: this.editCommonConfig.infomation.id, |
| | | serviceContractId: this.editCommonConfig.infomation.id, |
| | | tableData: [] |
| | | } |
| | |
| | | this.formInfo() |
| | | } |
| | | }, |
| | | 'editCommonConfig.infomation.codeStandID'(){ |
| | | this.formInfo() |
| | | } |
| | | }, |
| | | methods: { |
| | | formInfo(){ |
| | |
| | | this.getInvoiceTypeList() |
| | | this.getInvoiceStatusList() |
| | | this.getCourierCompanyList() |
| | | this.$set(this.editConfig.infomation,'serviceContract_Number',this.editCommonConfig.infomation.keyword) |
| | | this.$set(this.editConfig.infomation,'contract_number',this.editCommonConfig.infomation.keyword) |
| | | }, |
| | | async getInvoiceTypeList() { |
| | | await getInvoiceTypeList().then((res) => { |
| | | console.log("票据类型") |
| | | console.log(res.data) |
| | | if (res.data.code === 200) { |
| | | this.invoiceTypeOptions = res.data.data.data |
| | | const res=await getInvoiceTypeList() |
| | | if (res.code == 200) { |
| | | this.invoiceTypeOptions = res.data.data |
| | | } |
| | | }) |
| | | }, |
| | | async getInvoiceStatusList() { |
| | | await getInvoiceStatusList().then((res) => { |
| | | console.log("票据状态") |
| | | console.log(res.data) |
| | | if (res.data.code === 200) { |
| | | this.invoiceStatusOptions = res.data.data.data |
| | | const res=await getInvoiceStatusList() |
| | | if (res.code == 200) { |
| | | this.invoiceStatusOptions = res.data.data |
| | | } |
| | | }) |
| | | }, |
| | | async getCourierCompanyList() { |
| | | await getCourierCompanyList().then((res) => { |
| | | console.log("物流公司") |
| | | console.log(res.data) |
| | | if (res.data.code === 200) { |
| | | this.courierCompanyOptions = res.data.data.data |
| | | const res=await getCourierCompanyList() |
| | | if (res.code == 200) { |
| | | this.courierCompanyOptions = res.data.data |
| | | } |
| | | }) |
| | | }, |
| | | // 保存 |
| | | saveClick(formName) { |
| | |
| | | products: this.tableData, |
| | | sourceId: this.editConfig.sourceType === 1 ? this.SalesDetailsId : this.serviceContractId, |
| | | sourceType: this.editConfig.sourceType, |
| | | number:data.number || "", |
| | | subject: data.subject || "", |
| | | taxpayerIdNumber: data.taxpayerIdNumber || "" |
| | | } |
| | |
| | | this.editConfig.infomation.serviceContract_Number = row.number |
| | | this.serviceContractId = row.id |
| | | } else if (value === "contract") { |
| | | this.editConfig.infomation.number = row.number |
| | | this.editConfig.infomation.contract_number = row.number |
| | | this.SalesDetailsId = row.id |
| | | } |
| | | }, |
| | |
| | | this.editConfig.infomation.serviceContract_Number = "" |
| | | this.serviceContractId = 0 |
| | | } else if (value === "contract") { |
| | | this.editConfig.infomation.number = "" |
| | | this.editConfig.infomation.contract_number = "" |
| | | this.SalesDetailsId = 0 |
| | | } |
| | | }, |
| | |
| | | keyword: "", |
| | | keywordType: "", |
| | | tableColumn: [ |
| | | { label: "发票编号", prop: "invoiceNumber", default: true }, |
| | | { label: "发票编号", prop: "number", default: true }, |
| | | { label: "主题", prop: "subject" }, |
| | | { label: "客户名称", prop: "client_name" }, |
| | | { label: "票据类型", prop: "invoiceType_name" }, |
| | |
| | | } |
| | | await getInvoiceList(params) |
| | | .then((res) => { |
| | | 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, |
| | | client_name: item.Client.name, |
| | |
| | | } |
| | | }) |
| | | this.tableList.tableInfomation = list || [] |
| | | this.pagerOptions.totalCount = res.data.data.count |
| | | this.pagerOptions.totalCount = res.data.count |
| | | } else { |
| | | this.tableList.tableInfomation = [] |
| | | } |
| | |
| | | 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 === "新建") { |
| | | getAddContract(params).then((res) => { |
| | | console.log(res) |
| | |
| | | dialogWidth: "50%", |
| | | editConfig: this.editCommonConfig, |
| | | rules: { |
| | | number: [{ required: true, validator: this.validateCheckCode, trigger: "blur" }], |
| | | number: [{ required: true, validator: this.validateCheckCode, trigger: ["blur",'change'] }], |
| | | client_name: [{ required: true, message: "请选择", trigger: "change" }], |
| | | member_id: [{ required: true, message: "请选择", trigger: "change" }] |
| | | }, |
| | |
| | | this.formInfo() |
| | | } |
| | | }, |
| | | "editCommonConfig.infomation.codeStandID"() { |
| | | this.formInfo() |
| | | } |
| | | }, |
| | | methods: { |
| | | formInfo() { |
| | |
| | | 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 === "新建") { |
| | | getAddMasterOrder(params).then((res) => { |
| | | console.log(res) |
| | |
| | | dialogWidth: "50%", |
| | | editConfig: this.editCommonConfig, |
| | | rules: { |
| | | number: [{ required: true, validator: this.validateCheckCode, trigger: "blur" }], |
| | | number: [{ required: true, validator: this.validateCheckCode, trigger: ["blur","change"] }], |
| | | quotationName: [{ required: true, message: "请输入", trigger: "blur" }], |
| | | quotation_status_id: [{ required: true, message: "请选择", trigger: "change" }], |
| | | sale_chance_name: [{ required: true, validator: this.checkChance, trigger: "change" }], |
| | |
| | | this.formInfo() |
| | | } |
| | | }, |
| | | "editConfig.infomation.codeStandID"() { |
| | | this.formInfo() |
| | | } |
| | | }, |
| | | methods: { |
| | | formInfo() { |
| | |
| | | this.formInfo() |
| | | } |
| | | }, |
| | | "editClientManageConfig.infomation.codeStandID"() { |
| | | this.formInfo() |
| | | } |
| | | }, |
| | | methods: { |
| | | ...mapActions(["getReturnListFliter"]), |
| | |
| | | this.getRCodeStandardList() |
| | | this.getBankAccountList() |
| | | }, |
| | | getCommonData() { |
| | | getAllData().then((res) => { |
| | | this.memberOptions = res.data.member |
| | | // this.accountOptions = res.data.accountId |
| | | }) |
| | | async getCommonData() { |
| | | const res=await getAllData() |
| | | if(res.code==200){ |
| | | this.memberOptions = res.data.member? res.data.member:[] |
| | | } |
| | | this.$set(this.editConfig.infomation,'memberId',this.editConfig.infomation.memberId) |
| | | this.getPaymentTypeList() |
| | | }, |
| | | async getPaymentTypeList() { |
| | | await getPaymentTypeList().then((res) => { |
| | | getPaymentTypeList() { |
| | | getPaymentTypeList().then(res=>{ |
| | | if (res.code === 200) { |
| | | this.paymentTypeListOptions = res.data.data ?? [] |
| | | } |
| | | this.$set(this.editConfig.infomation,'paymentTypeId',this.editConfig.infomation.paymentTypeId) |
| | | }) |
| | | }, |
| | | async getBankAccountList() { |
| | | await getBankAccountList().then((res) => { |
| | | console.log("账户") |
| | | console.log('账户',res) |
| | | getBankAccountList() { |
| | | getBankAccountList().then(res=>{ |
| | | if (res.code === 200) { |
| | | this.accountOptions = res.data.data |
| | | this.accountOptions = res.data.data? res.data.data:[] |
| | | } |
| | | this.$set(this.editConfig.infomation,'bankAccountId',this.editConfig.infomation.bankAccountId) |
| | | }) |
| | | }, |
| | | // 保存 |
| | | saveClick(formName) { |
| | | this.$refs[formName].validate((valid) => { |
| | | if (valid) { |
| | | console.log(this.editConfig.infomation) |
| | | for (let i = 0; i < this.tableData.length; i++) { |
| | | if (this.tableData[i].name.length === 0) { |
| | | this.isNoProduct = true |
| | |
| | | this.$message.error("产品名称不能为空") |
| | | } else { |
| | | const params = this.saveParams() |
| | | console.log(params) |
| | | if (this.editConfig.title === "新建") { |
| | | getAddSalesRefund(params).then((res) => { |
| | | console.log(res) |
| | |
| | | }, |
| | | // 新建 |
| | | addBtnClick() { |
| | | this.editConfig.visible = true |
| | | this.editConfig.title = "新建" |
| | | this.editConfig.infomation = { currency: "人民币", ...this.addConfig } |
| | | this.editConfig.visible = true |
| | | }, |
| | | // 编辑 |
| | | handleClick(row) { |
| | | console.log(row) |
| | | this.editConfig.visible = true |
| | | this.editConfig.title = "编辑" |
| | | this.editConfig.infomation = { ...row, currency: "人民币", sale_return_nunber: row.Source.number } |
| | | this.editConfig.infomation = { ...row, currency: "人民币", sale_return_nunber: row.salesReturn.number } |
| | | this.editConfig.visible = true |
| | | }, |
| | | // 删除 |
| | | delClick(rowID) { |
| | |
| | | this.formInfo() |
| | | } |
| | | }, |
| | | "editClientManageConfig.infomation.codeStandID"() { |
| | | this.formInfo() |
| | | } |
| | | }, |
| | | methods: { |
| | | ...mapActions(["getChanceFilter", "getSubunitFliter"]), |
| | |
| | | saveClick(formName) { |
| | | this.$refs[formName].validate((valid) => { |
| | | if (valid) { |
| | | console.log(this.editConfig.infomation) |
| | | for (let i = 0; i < this.tableData.length; i++) { |
| | | if (this.tableData[i].name.length === 0) { |
| | | this.isNoProduct = true |
| | |
| | | }, |
| | | // 联系人详情 |
| | | selCommonClick(row) { |
| | | console.log(row) |
| | | this.specificationDetail.visible = true |
| | | this.specificationDetail.infomation = { ...row } |
| | | this.specificationDetail.visible = true |
| | | }, |
| | | addCollectionPlanClick(row) { |
| | | this.addCollectionConfig.visible = true |
| | |
| | | this.formInfo() |
| | | } |
| | | }, |
| | | "editConfig.infomation.codeStandID"() { |
| | | this.formInfo() |
| | | } |
| | | }, |
| | | methods: { |
| | | formInfo() { |
| | |
| | | console.log(res) |
| | | this.editConfig.visible = false |
| | | if (res.code === 200) { |
| | | this.$message.success("添加成功") |
| | | this.$message.success("添加成功!") |
| | | this.$parent.getData() |
| | | // } |
| | | }else{ |
| | | this.$message.error(res.msg?res.msg:"添加失败!") |
| | | } |
| | | }) |
| | | } else { |
| | |
| | | console.log(res) |
| | | this.editConfig.visible = false |
| | | if (res.code === 200) { |
| | | this.$message.success("编辑成功") |
| | | this.$message.success("编辑成功!") |
| | | this.$parent.getData() |
| | | }else{ |
| | | this.$message.error(res.msg?res.msg:"编辑失败!") |
| | | } |
| | | }) |
| | | } |
| | |
| | | this.formInfo() |
| | | } |
| | | }, |
| | | "editClientManageConfig.infomation.codeStandID"() { |
| | | this.formInfo() |
| | | } |
| | | }, |
| | | methods: { |
| | | ...mapActions(["getSalesDetailsFliter"]), |
| | |
| | | // this.$message.error("产品名称不能为空") |
| | | // } else { |
| | | const params = this.saveParams() |
| | | console.log(params) |
| | | if (this.editConfig.title === "新建") { |
| | | getAddSalesReturn(params).then((res) => { |
| | | console.log(res) |
| | |
| | | dialogWidth: "50%", |
| | | editConfig: this.editCommonConfig, |
| | | rules: { |
| | | number: [{ required: true, validator: this.validateCheckCode, trigger: "blur" }], |
| | | number: [{ required: true, validator: this.validateCheckCode, trigger: ["blur",'change'] }], |
| | | master_order_number: [{ required: true, message: "请选择或创建销售总单", trigger: "blur" }], |
| | | client_name: [{ required: true, message: "请选择", trigger: "change" }], |
| | | memberId: [{ required: true, message: "请选择", trigger: "change" }] |
| | |
| | | this.formInfo() |
| | | } |
| | | }, |
| | | "editConfig.infomation.codeStandID"() { |
| | | this.formInfo() |
| | | } |
| | | }, |
| | | methods: { |
| | | formInfo() { |
| | |
| | | console.log(res) |
| | | if (res.code === 200) { |
| | | this.memberOptions = res.data.member |
| | | this.$set(this.editConfig.infomation,'memberId',this.editConfig.infomation.memberId) |
| | | this.dataProcess() |
| | | } |
| | | }) |
| | |
| | | this.$message.error("产品名称不能为空") |
| | | } else { |
| | | const params = this.saveParams() |
| | | console.log(params) |
| | | if (this.editConfig.title === "新建") { |
| | | getAddSubOrder(params).then((res) => { |
| | | console.log(res) |
| | |
| | | dialogWidth: "50%", |
| | | editConfig: this.editCommonConfig, |
| | | rules: { |
| | | serviceNumber: [{ required: true, validator: this.validateCheckCode, trigger: "blur" }], |
| | | serviceNumber: [{ required: true, validator: this.validateCheckCode, trigger: ["blur",'change'] }], |
| | | client_name: [{ required: true, message: "请选择客户名称", trigger: "change" }], |
| | | subject: [{ required: true, message: "请输入主题", trigger: "blur" }], |
| | | // productCategory: [{ required: true, message: "请选择产品类别", trigger: "change" }], |
| | |
| | | this.formInfo() |
| | | } |
| | | }, |
| | | "editCommonConfig.infomation.codeStandID"() { |
| | | this.formInfo() |
| | | } |
| | | }, |
| | | methods: { |
| | | formInfo() { |
| | |
| | | } |
| | | }, |
| | | // 故障类别 |
| | | async getFaultTypeList() { |
| | | await getFaultTypeList().then((res) => { |
| | | this.faultTypeOptions = res.data.data |
| | | getFaultTypeList() { |
| | | getFaultTypeList().then((res) => { |
| | | this.faultTypeOptions = res.data.data?res.data.data:[] |
| | | this.$set(this.editConfig.infomation,'faultTypeId',this.editConfig.infomation.faultTypeId) |
| | | }) |
| | | }, |
| | | // 服务方式 |
| | | async getServiceTypeList() { |
| | | await getServiceTypeList().then((res) => { |
| | | this.serviceTypeOptions = res.data.data |
| | | getServiceTypeList() { |
| | | getServiceTypeList().then((res) => { |
| | | this.serviceTypeOptions = res.data.data?res.data.data:[] |
| | | this.$set(this.editConfig.infomation,'serviceTypeId',this.editConfig.infomation.serviceTypeId) |
| | | }) |
| | | }, |
| | | // 严重程度 |
| | | async getSeverityList() { |
| | | await getSeverityList().then((res) => { |
| | | this.severityOptions = res.data.data |
| | | getSeverityList() { |
| | | getSeverityList().then((res) => { |
| | | this.severityOptions = res.data.data?res.data.data:[] |
| | | |
| | | this.$set(this.editConfig.infomation,'severity',this.editConfig.infomation.severity) |
| | | }) |
| | | }, |
| | | // 优先级别 |
| | | async getPriorityLevelList() { |
| | | await getPriorityLevelList().then((res) => { |
| | | this.priorityLevelOptions = res.data.data |
| | | getPriorityLevelList() { |
| | | getPriorityLevelList().then((res) => { |
| | | this.priorityLevelOptions = res.data.data?res.data.data:[] |
| | | |
| | | this.$set(this.editConfig.infomation,'priorityLevelId',this.editConfig.infomation.priorityLevelId) |
| | | }) |
| | | }, |
| | | // 花费时间 |
| | | async getTimeSpentList() { |
| | | await getTimeSpentList().then((res) => { |
| | | this.timeSpentOptions = res.data.data |
| | | getTimeSpentList() { |
| | | getTimeSpentList().then((res) => { |
| | | this.timeSpentOptions = res.data.data?res.data.data:[] |
| | | this.$set(this.editConfig.infomation,'timeSpentId',this.editConfig.infomation.timeSpentId) |
| | | }) |
| | | } |
| | | } |
| | |
| | | dialogWidth: "50%", |
| | | editConfig: this.editCommonConfig, |
| | | rules: { |
| | | number: [{ required: true, validator: this.validateCheckCode, trigger: "blur" }], |
| | | number: [{ required: true, validator: this.validateCheckCode, trigger: ["blur",'change'] }], |
| | | client_name: [{ required: true, message: "请选择客户名称", trigger: "change" }], |
| | | signTime: [{ required: true, message: "请选择", trigger: "change" }], |
| | | memberId: [{ required: true, message: "请选择负责人", trigger: "change" }] |
| | |
| | | this.formInfo() |
| | | } |
| | | }, |
| | | "editCommonConfig.infomation.codeStandID"() { |
| | | this.formInfo() |
| | | } |
| | | }, |
| | | methods: { |
| | | formInfo() { |
| | |
| | | .then((res) => { |
| | | if (res.code === 200) { |
| | | this.memberOptions = res.data.member |
| | | this.$set(this.editConfig.infomation,'memberId',this.editConfig.infomation.memberId) |
| | | this.contractTypeOptions = res.data.serviceContractType |
| | | this.$set(this.editConfig.infomation,'serviceContractTypeId',this.editConfig.infomation.serviceContractTypeId) |
| | | this.contractStatusOptions = res.data.serviceContractStatus |
| | | this.$set(this.editConfig.infomation,'serviceContractStatusId',this.editConfig.infomation.serviceContractStatusId) |
| | | // this.currencyOptions = res.data.currency |
| | | } |
| | | }) |
| | |
| | | this.$message.error("产品名称不能为空") |
| | | } else { |
| | | const params = this.saveParams() |
| | | console.log(params) |
| | | if (this.editConfig.title === "新建") { |
| | | getAddServiceContract(params).then((res) => { |
| | | console.log(res) |
| | |
| | | dialogWidth: "50%", |
| | | editConfig: this.editCommonConfig, |
| | | rules: { |
| | | number: [{ required: true, validator: this.validateCheckCode, trigger: "blur" }], |
| | | number: [{ required: true, validator: this.validateCheckCode, trigger: ["blur",'change'] }], |
| | | client_name: [{ required: true, message: "请选择客户名称", trigger: "change" }], |
| | | service_number: [{ required: true, message: "请选择客户服务单", trigger: "change" }], |
| | | memberId: [{ required: true, message: "请选择", trigger: "change" }] |
| | |
| | | this.formInfo() |
| | | } |
| | | }, |
| | | "editCommonConfig.infomation.codeStandID"() { |
| | | this.formInfo() |
| | | } |
| | | }, |
| | | methods: { |
| | | formInfo() { |
| | |
| | | getAllData() |
| | | .then((res) => { |
| | | this.memberOptions = res.data.member |
| | | this.$set(this.editConfig.infomation,'memberId',this.editConfig.infomation.memberId) |
| | | this.satisfactionOptions = res.data.satisfaction // 满意度 |
| | | this.$set(this.editConfig.infomation,'satisfactionId',this.editConfig.infomation.satisfactionId) |
| | | this.timelyRateOptions = res.data.timely_rate // 及时率 |
| | | this.$set(this.editConfig.infomation,'timelyRateId',this.editConfig.infomation.timelyRateId) |
| | | this.solveRateOptions = res.data.solve_rate // 解决率 |
| | | this.$set(this.editConfig.infomation,'solveRateId',this.editConfig.infomation.solveRateId) |
| | | this.oldMemberOptions = res.data.member // 原服务人员 |
| | | this.$set(this.editConfig.infomation,'oldMemberId',this.editConfig.infomation.oldMemberId) |
| | | this.isVisitOptions = res.data.isVisit // 服务人员是否来过 |
| | | this.$set(this.editConfig.infomation,'isVisitId',this.editConfig.infomation.isVisitId) |
| | | }) |
| | | .catch((err) => { |
| | | console.log(err) |
| | |
| | | if (valid) { |
| | | console.log(this.editConfig.infomation) |
| | | const params = this.saveParams() |
| | | console.log(params) |
| | | if (this.editConfig.title === "新建") { |
| | | getAddServiceFollowup(params).then((res) => { |
| | | console.log(res) |