crm_second_opening_mini/pagesA/crm/createCustomer/editCustomer.js

1 line
5.2 KiB
JavaScript
Raw Normal View History

2023-03-13 01:13:08 +00:00
require('../../common/vendor.js');(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pagesA/crm/createCustomer/editCustomer"],{"1c53":function(t,e,n){"use strict";n.d(e,"b",(function(){return a})),n.d(e,"c",(function(){return o})),n.d(e,"a",(function(){return i}));var i={uSelect:function(){return n.e("uview-ui/components/u-select/u-select").then(n.bind(null,"ef3c"))}},a=function(){var t=this.$createElement;this._self._c},o=[]},"339a":function(t,e,n){"use strict";n.r(e);var i=n("4954"),a=n.n(i);for(var o in i)["default"].indexOf(o)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(o);e["default"]=a.a},"48eb":function(t,e,n){},4954:function(t,e,n){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=n("154c"),a=n("76dd"),o=n("dc92"),s=(n("d47e"),n("0c59")),c=n("ab23"),d={mixins:[i.pageJumps],components:{formItem:function(){Promise.all([n.e("common/vendor"),n.e("components/form/formitem")]).then(function(){return resolve(n("d7bf"))}.bind(null,n)).catch(n.oe)},selectCustomer:function(){Promise.all([n.e("common/vendor"),n.e("components/selectCustomer")]).then(function(){return resolve(n("5bcd"))}.bind(null,n)).catch(n.oe)}},data:function(){return{BASE_IMG_URL:s.BASE_IMG_URL,id:"",checked:!0,linkManChecked:!0,name:"",subname:"",industry:"",level:"",source:"",follow:"",address_dingwei:"",address_detail:"",lng:"",lat:"",parent_id:"",parentList:[],plist:[],parentName:"",industryList:[],industryindex:null,followList:[],followIndex:null,sourceList:[],sourceIndex:null,scaleList:[],scaleIndex:null,info:{},listForm:[],addressList:[],show:!1}},onLoad:function(t){this.addressList=c.citys,this.id=t.id,this.getKehuInfo(),this.getSelectlist()},onShow:function(){},onHide:function(){},methods:{confirm:function(t){this.address_dingwei=t[0].label+t[1].label+t[2].label},getKehuInfo:function(){var t=this;(0,a.netKehuDetail)({id:this.id}).then((function(e){e=e.data,t.info=e,t.name=e.name,t.location=e.location,t.address_detail=e.address_detail,t.address_dingwei=e.address,t.lng=e.lng,t.lat=e.lat,t.parent_id=e.parent_id,t.getPrevCoustomer(),t.getForm()}))},getPrevCoustomer:function(){var t=this;(0,a.netPrevCustomer)().then((function(e){t.parentList=e.data,t.handleData(e.data),t.handleParent()}))},getForm:function(){var t=this;(0,o.netSetForm)({type:"customer"}).then((function(e){e=e.data.data,e.forEach((function(n,i){n.value=t.info[n.id],"name"==n.id&&e.splice(i,1)})),t.listForm=e}))},handleData:function(t){var e=[];t.forEach((function(t){e.push(t.name)})),this.plist=e},handleParent:function(){var t=this,e=this.parent_id;this.parentList.forEach((function(n,i){n.id==e&&(t.parentName=n.name)}))},changeData:function(t,e,n){var i=this,a=this.listForm;a.forEach((function(t,a){t.id==n.id&&(t.value=e,i.$set(i.listForm,a,t))}))},getSelectlist:function(){var t=this;(0,a.netSelect)().then((function(e){t.industryList=e.data["行业"],t.followList=e.data["客户状态"],t.sourceList=e.data["客户来源"],t.scaleList=e.data["企业规模"],t.roleList=e.data["联系人角色"],t.tyieldList=e.data["天地盖产量"],t.pyieldList=e.data["皮壳产量"],t.numberList=e.data["员工人数"]}))},checkName:function(){var e=this.name;console.log(e),e?(0,a.netCheckName)({name:e}).then((function(e){t.showToast({title:e.msg,icon:"none",duration:2e3})})):t.showToast({title:"请填写客户姓名",icon:"none",duration:2e3})},changeLocation:function(t){this.location=t.detail.value[0]+"/"+t.detail.value[1]+"/"+t.detail.value[2]},changeParent:function(){this.$refs.customerChild.init()},sureSelect:function(t){this.parentName=t.name,this.parent_id=t.id},change:function(){this.is_event=!this.is_event},changeFollowTime:function(t){this.event_start_time=t.detail.value},changeRemind:function(t){this.remindIndex=t.detail.value,this.remindtype=this.remindList[t.detail.value]},detailAddClick:function(){var e=this;t.chooseLocation({success:function(t){e.lat=t.latitude,e.lng=t.longitude,e.address_detail=t.name,e.address_dingwei=t.address},fail:function(e){console.log(e),"chooseLocation:fail auth deny"==e.errMsg&&t.showToast({title:"<EFBFBD>