crm_second_opening_mini/pages/index/groupCompany/subsidiary/newSubsidiary/newSubsidiary.js

1 line
10 KiB
JavaScript
Raw Permalink Normal View History

2023-03-13 01:13:08 +00:00
(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/index/groupCompany/subsidiary/newSubsidiary/newSubsidiary"],{"419b":function(e,t,i){"use strict";(function(e,t){var n=i("4ea4");i("8886");n(i("66fd"));var a=n(i("e6fe"));e.__webpack_require_UNI_MP_PLUGIN__=i,t(a.default)}).call(this,i("bc2e")["default"],i("543d")["createPage"])},6785:function(e,t,i){"use strict";var n=i("d693"),a=i.n(n);a.a},a515:function(e,t,i){"use strict";(function(e,n){var a=i("4ea4");Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o,s=a(i("9523")),r=a(i("448a")),c=i("c7eb"),l=i("dc92"),d=i("d47e"),u=i("154c"),h=i("76dd"),f=i("0c59"),m={mixins:[u.pageJumps],components:{formItem:function(){Promise.all([i.e("common/vendor"),i.e("components/form/formitem")]).then(function(){return resolve(i("d7bf"))}.bind(null,i)).catch(i.oe)}},data:function(){return{BASE_IMG_URL:f.BASE_IMG_URL,noClick:!0,name:"",subname:"",industry:"",level:"",source:"",follow:"",address_dingwei:"",address_detail:"",lng:"",lat:"",parent_id:"",parentList:[],plist:[],parentIndex:null,parentName:"",is_event:!0,event_start_time:"",event_title:"",remindtype:"",remindList:["准时提醒","5分钟前","15分钟前","30分钟前","一个小时前","两个小时前","一天前","两天前","一周前"],remindIndex:null,location:"",is_contacts:!0,is_record:1,followList:[],follow_type:null,followIndex:null,next_time:"",uploadShow:!1,uploadActions:[{id:1,text:"拍照",color:"#03aa96"},{id:2,text:"从相册中选择",color:"#03aa96"}],imgList:[],fileList:[],content:"",DefaultRemind:[],remindPeople:[],sourceList:[],sourceIndex:null,listForm:[],firstContactForm:[],dateTimeArray:[],dateArr:[],dateTime:[],countryType:1}},onLoad:function(e){this.parent_id=e.id,this.getSelectlist(),this.getPrevCoustomer(),this.listForm=[],this.firstContactForm=[],this.getForm(),this.getFirstContactform(),this.initTime()},onShow:function(){this.remindPeople=[],this.getDefaultRemind()},onUnload:function(){e.removeStorageSync("remindlist")},methods:(o={moreClick:function(){e.navigateTo({url:"/pagesA/crm/selectMember/selectMember"})},getDefaultRemind:function(){var t=this;(0,l.netStaffDefaultReviewer)({type:"record"}).then((function(i){i=i.data,i.forEach((function(e,t){e.isDel=!1})),t.DefaultRemind=i,t.remindPeople=t.$deWeight([].concat((0,r.default)(i),(0,r.default)(e.getStorageSync("remindlist"))))}))},delRemind:function(t){this.remindPeople.splice(t,1),e.setStorageSync("remindlist",this.remindPeople)},getForm:function(){var e=this;(0,l.netSetForm)({type:"customer"}).then((function(t){t=t.data.data,t.forEach((function(e,i){"name"==e.id&&t.splice(i,1)})),e.listForm=t}))},changeData:function(e,t,i){var n=this,a=this.listForm;a.forEach((function(e,a){e.id==i.id&&(e.value=t,n.$set(n.listForm,a,e))}))},getFirstContactform:function(){var e=this;(0,l.netSetForm)({type:"contacts"}).then((function(t){t=t.data.data,e.firstContactForm=t,e.changeCountry(e.countryType)}))},changeCountry:function(e){this.countryType=e;var t=this.firstContactForm;1==e?t.forEach((function(e,t){"mobile"==e.id&&(e.config.required=!0),"email"==e.id&&(e.config.required=!1)})):t.forEach((function(e,t){"mobile"==e.id&&(e.config.required=!0),"email"==e.id&&(e.config.required=!0)})),this.firstContactForm=t},changeContactData:function(e,t,i){var n=this,a=this.firstContactForm;a.forEach((function(e,a){e.id==i.id&&(e.value=t,n.$set(n.firstContactForm,a,e))}))},getPrevCoustomer:function(){var e=this;(0,h.netPrevCustomer)().then((function(t){e.parentList=t.data,e.handleData(t.data),e.parent_id?(e.handleParent(),e.parentDisabled=!0):e.parentDisabled=!1}))},handleData:function(e){var t=[];e.forEach((function(e){t.push(e.name)})),this.plist=t},handleParent:function(){var e=this,t=this.parent_id;this.parentList.forEach((function(i,n){i.id==t&&(e.parentIndex=n,e.parentName=i.name)}))},getSelectlist:function(){var e=this;(0,h.netSelect)().then((function(t){e.followList=t.data["跟进类型"],e.sourceList=t.data["客户来源"]}))},changeFollow:function(e){this.followIndex=e.detail.value,this.follow_type=this.followList[e.detail.value]},