crm_second_opening_mini/pagesA/crm/createCustomer/createCustomer.js

1 line
6.4 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/createCustomer"],{4956:function(t,e,n){},"56e2":function(t,e,n){"use strict";(function(t,e){var i=n("4ea4");n("8886");i(n("66fd"));var a=i(n("933f"));t.__webpack_require_UNI_MP_PLUGIN__=n,e(a.default)}).call(this,n("bc2e")["default"],n("543d")["createPage"])},"7c6d":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=[]},"933f":function(t,e,n){"use strict";n.r(e);var i=n("7c6d"),a=n("9d58");for(var o in a)["default"].indexOf(o)<0&&function(t){n.d(e,t,(function(){return a[t]}))}(o);n("b52d");var s=n("f0c5"),r=Object(s["a"])(a["default"],i["b"],i["c"],!1,null,"ad35fd3e",null,!1,i["a"],void 0);e["default"]=r.exports},"9d58":function(t,e,n){"use strict";n.r(e);var i=n("b08b"),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},b08b:function(t,e,n){"use strict";(function(t){var i=n("4ea4");Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=i(n("9523")),o=n("0c59"),s=n("c7eb"),r=n("dc92"),d=(n("d47e"),n("154c")),c=n("76dd"),u=n("db68"),l=n("8683"),f=n("ab23"),m={mixins:[d.pageJumps,l.commonF],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(){var t;return t={BASE_IMG_URL:o.BASE_IMG_URL,noClick:!0,name:"",subname:"",industry:"",level:"",source:"",follow:"",address_dingwei:"",address_detail:"",lng:"",lat:"",parent_id:"",parentList:[],plist:[],parentIndex:null,parentName:""},(0,a.default)(t,"BASE_IMG_URL",o.BASE_IMG_URL),(0,a.default)(t,"location",""),(0,a.default)(t,"show",!1),(0,a.default)(t,"remindPeople",[]),(0,a.default)(t,"remindType","customer"),(0,a.default)(t,"sourceIndex",null),(0,a.default)(t,"listForm",[]),(0,a.default)(t,"isAddContact",!0),(0,a.default)(t,"contactsForm",[]),(0,a.default)(t,"list",[]),(0,a.default)(t,"isRequired",!1),(0,a.default)(t,"addressList",[]),(0,a.default)(t,"parentDisabled",!1),(0,a.default)(t,"leads_id",""),t},onLoad:function(e){this.addressList=f.citys,e.id&&(this.parent_id=e.id,t.setNavigationBarTitle({title:"新建子公司"})),e.leads_id&&(this.leads_id=e.leads_id),this.listForm=[],this.init(),this.initTime()},onShow:function(){},methods:{changeRequired:function(t){this.isRequired=t.detail.value},init:function(){return this.leads_id?Promise.all([this.getForm(),this.getPrevCoustomer(),this.getclubInfo()]):Promise.all([this.getForm(),this.getPrevCoustomer()])},initTime:function(){var t=(0,s.dateTimePicker)();t.dateTimeArray.pop(),t.dateTime.pop(),t.dateArray.pop();this.dateTimeArray=t.dateTimeArray,this.dateTime=t.dateTime,this.dateArr=t.dateArray},getclubInfo:function(){var t=this;(0,u.netCluesDetail)({id:this.leads_id}).then((function(e){t.name=e.data.name,t.address_detail=e.data.address_detail,t.listForm.forEach((function(t){t.value=e.data[t.id]})),e.data.name=""}))},moreClick:function(){t.navigateTo({url:"/pagesA/crm/selectMember/selectMember"})},getForm:function(){var t=this;(0,r.netSetForm)({type:"customer"}).then((function(e){e=e.data;var n=e.data;t.isAddContact=e.isAddContact;var i=[];n.forEach((function(t,e){"name"!=t.id&&(t.value="",i.push(t))})),t.listForm=i,e.isAddContact&&t.getContactForm()}))},getContactForm:function(){var t=this;(0,r.netSetForm)({type:"contacts"}).then((function(e){var n=e.data.data;n.forEach((function(t){t.value=""})),t.contactsForm=n}))},changeData:function(t,e,n){var i=this,a=this.listForm;a.forEach((function(n,a){n.id==t&&(n.value=e,i.$set(i.listForm,a,n))}))},changeContactData:function(t,e,n){var i=this,a=this.contac