crm_second_opening_mini/pages/index/groupCompany/groupCompany.js

1 line
6.7 KiB
JavaScript

(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/index/groupCompany/groupCompany"],{"168b":function(t,n,e){},"2cd5":function(t,n,e){"use strict";e.d(n,"b",(function(){return i})),e.d(n,"c",(function(){return a})),e.d(n,"a",(function(){return o}));var o={uRate:function(){return e.e("uview-ui/components/u-rate/u-rate").then(e.bind(null,"71b2"))},uTabs:function(){return Promise.all([e.e("common/vendor"),e.e("uview-ui/components/u-tabs/u-tabs")]).then(e.bind(null,"5924"))},uPopup:function(){return e.e("uview-ui/components/u-popup/u-popup").then(e.bind(null,"9770"))},uActionSheet:function(){return e.e("uview-ui/components/u-action-sheet/u-action-sheet").then(e.bind(null,"b13b"))}},i=function(){var t=this.$createElement,n=(this._self._c,0==this.current&&this.info&&this.info.id?Number(this.type):null);this.$mp.data=Object.assign({},{$root:{m0:n}})},a=[]},"52fa":function(t,n,e){"use strict";e.r(n);var o=e("e8e1"),i=e.n(o);for(var a in o)["default"].indexOf(a)<0&&function(t){e.d(n,t,(function(){return o[t]}))}(a);n["default"]=i.a},6225:function(t,n,e){"use strict";var o=e("168b"),i=e.n(o);i.a},7259:function(t,n,e){"use strict";e.r(n);var o=e("2cd5"),i=e("52fa");for(var a in i)["default"].indexOf(a)<0&&function(t){e.d(n,t,(function(){return i[t]}))}(a);e("6225");var c=e("f0c5"),s=Object(c["a"])(i["default"],o["b"],o["c"],!1,null,null,null,!1,o["a"],void 0);n["default"]=s.exports},b1fc:function(t,n,e){"use strict";(function(t,n){var o=e("4ea4");e("8886");o(e("66fd"));var i=o(e("7259"));t.__webpack_require_UNI_MP_PLUGIN__=e,n(i.default)}).call(this,e("bc2e")["default"],e("543d")["createPage"])},e8e1:function(t,n,e){"use strict";(function(t){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var o=e("9a6f"),i=e("c0a8"),a=e("0c59"),c=e("76dd"),s=(e("dc92"),{mixins:[i.pageJumps],data:function(){return{BASE_IMG_URL:a.BASE_IMG_URL,show:!1,taskShow:!0,statusShow:!1,moreCompany:[],telShow:!1,telActions:[],telname:"",id:"",info:{},type:1,customer_id:"",relation_id:"",current:0,list:[{name:"跟进记录",status:0},{name:"基本信息",status:1}]}},onLoad:function(t){this.id=t.id,this.moreCompany=o.moreCompany,this.type=t.type},onShow:function(){this.getInfo()},components:{customerDynamic:function(){Promise.all([e.e("common/vendor"),e.e("components/content/customerDynamic/customerDynamic")]).then(function(){return resolve(e("dd11"))}.bind(null,e)).catch(e.oe)},infoDetail:function(){e.e("components/content/infoDetail/infoDetail").then(function(){return resolve(e("70c7"))}.bind(null,e)).catch(e.oe)}},methods:{followClick:function(){t.navigateTo({url:"/pagesA/crm/customerManagement/newFllow/newFllow?id="+this.id+"&type=1"})},change:function(t){this.current=t},tabs_change:function(t){this.current=t,this.mescroll.resetUpScroll()},accessory:function(n){t.navigateTo({url:"/pages/index/groupCompany/attachment/attachment?id="+n+"&types=2&type="+this.type})},lookDetail:function(n){-1!=n.types.indexOf("image")?t.previewImage({urls:[n.file_path]}):t.downloadFile({url:n.file_path,success:function(n){t.openDocument({filePath:n.tempFilePath,success:function(t){return console.log("成功打开文档")}})},fail:function(t){console.log(t,"shibai")}})},addContract:function(n){t.navigateTo({url:"/pagesA/crm/contract/contract?id="+n})},toTeam:function(){t.navigateTo({url:"/pagesA/circulate/index?id="+this.info.id})},contact:function(n){t.navigateTo({url:"/pagesA/crm/linkman/linkman?id="+this.id+"&type="+this.type})},subord:function(n){t.navigateTo({url:"/pages/index/groupCompany/subsidiary/subsidiary?id="+n+"&type="+this.type})},signList:function(n){t.navigateTo({url:"/pagesA/signin/record/record?id="+n+"&type="+this.type})},Contract:function(n){t.navigateTo({url:"/pages/index/groupCompany/pact/pact?id="+n+"&type="+this.type})},cost:function(n){t.navigateTo({url:"/pages/index/groupCompany/chargelist/chargelist?id="+n+"&type="+this.type})},payment:function(n){t.navigateTo({url:"/pages/index/groupCompany/payment/payment?id="+n+"&type="+this.type})},operation:function(n){t.navigateTo({url:"/pages/index/groupCompany/contract/operation?id="+n+"&relation_type=1"})},getInfo:function(){var n=this;this.info={},(0,c.netKehuDetail)({id:this.id}).then((function(e){n.info=e.data,t.setNavigationBarTitle({title:e.data.name}),e.data.contacts&&(n.telname=e.data.contacts.name,n.telActions=[{text:e.data.contacts.name+e.data.contacts.mobile,color:"#03aa96",mobile:e.data.contacts.mobile}])}))},moreClick:function(){this.show=!0},removeSeas:function(){var n=this;this.show=!1,t.showModal({title:"提示",content:"确认要将当前客户移到公海吗?",success:function(e){if(e.confirm){var o={id:n.info.id};(0,c.netRemoveSeas)(o).then((function(n){t.showToast({title:n.msg,icon:"none"}),setTimeout((function(){t.setStorageSync("isJamp",!0),t.navigateBack({delta:1})}),1e3)}))}}})},Tofocus:function(){var n=this,e={customer_id:this.info.id};(0,c.netKeyCollect)(e).then((function(e){t.showToast({title:e.msg,icon:"none"}),n.show=!1,setTimeout((function(){n.getInfo()}),1e3)}))},ToRemovefocus:function(){var n=this,e={customer_id:this.info.id};(0,c.netRemoveColect)(e).then((function(e){t.showToast({title:e.msg,icon:"none"}),n.show=!1,setTimeout((function(){n.getInfo()}),1e3)}))},selectPhone:function(n){t.makePhoneCall({phoneNumber:this.telActions[n].mobile})},mapLocation:function(){var n=this;t.openLocation({latitude:Number(this.info.lat),longitude:Number(this.info.lng),name:this.info.address,address:this.info.address_detail,success:function(t){console.log(t,n.info.lat,n.info.lng)},fail:function(t){console.log(t)}})},taskClick:function(){this.taskShow=!0,this.show=!1},onCancel:function(){this.taskShow=!1,this.statusShow=!1,this.telShow=!1,this.show=!1},statusClick:function(){this.statusShow=!0,this.show=!1},telClick:function(){this.telShow=!0,this.show=!1},getCluesClick:function(n){this.show=!1,t.showModal({title:"是否确定领取客户",content:"领取后长时间未跟进,客户将自动转为公共客户",cancelColor:"#9abcfb",confirmColor:"#9abcfb",success:function(e){e.confirm?(0,c.netReceiveKehu)({customer_id:n}).then((function(n){t.showToast({title:n.msg,icon:"none"}),setTimeout((function(){t.navigateTo({url:"/pages/index/groupCompany/groupCompany?id="+n.data.id})}),1e3)})):e.cancel&&console.log("用户点击取消")}})},deleteClueClick:function(){t.showModal({title:"删除线索",content:"确定删除该条记录吗?",cancelColor:"#9abcfb",confirmColor:"#9abcfb",success:function(t){t.confirm?console.log("用户点击确定"):t.cancel&&console.log("用户点击取消")}})},onClickHide:function(){this.overShow=!1},toSigntrip:function(n){t.navigateTo({url:"/pagesA/signin/busSign?customerid="+n})},toBusiness:function(){t.navigateTo({url:"/pagesA/business/customer_business?id="+this.id})}}});n.default=s}).call(this,e("543d")["default"])}},[["b1fc","common/runtime","common/vendor"]]]);