crm_second_opening_mini/pages/index/groupCompany/contract/addContractPayment.js

1 line
5.0 KiB
JavaScript

(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/index/groupCompany/contract/addContractPayment"],{3963:function(t,e,n){"use strict";(function(t){var i=n("4ea4");Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=i(n("448a")),a=n("76dd"),r=n("dc92"),u=n("0c59"),c={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)}},data:function(){return{type:[],typeIndex:null,numList:[],numIndex:null,info:null,customerObj:null,BASE_IMG_URL:u.BASE_IMG_URL,contractList:[],contractIndex:null,contractNum:"",id:"",kehuid:"",plannum:"",plan_id:"",number:"",money:"",return_time:"",return_type:"",remarks:"",flow_staff_id:"",remindPeople:[],DefaultRemind:[],otherForm:[]}},onLoad:function(t){this.kehuid=t.kehuid,this.getNumber(),this.getKehuInfo(),this.otherForm=[],this.getForm(),this.getInfo(),this.getType()},onShow:function(){this.getDefaultRemind()},onUnload:function(){t.removeStorageSync("remindlist")},methods:{getKehuInfo:function(){var t=this;(0,a.netKehuDetail)({id:this.kehuid}).then((function(e){t.customerObj=e.data}))},getDefaultRemind:function(){var e=this;(0,r.netStaffDefaultReviewer)({type:"contract"}).then((function(n){n=n.data,n.forEach((function(t,e){t.isDel=!1})),e.DefaultRemind=n,e.remindPeople=e.$deWeight([].concat((0,o.default)(n),(0,o.default)(t.getStorageSync("remindlist"))))}))},getForm:function(){var t=this;(0,r.netSetForm)({type:"examine"}).then((function(e){e=e.data.data,e.forEach((function(e){-1!=e.id.indexOf("other")&&t.otherForm.push(e)}))}))},changeOtherData:function(t,e,n){var i=this,o=this.otherForm;o.forEach((function(t,o){t.id==n.id&&(t.value=e,i.$set(i.otherForm,o,t))}))},getType:function(){var t=this;(0,a.netSelect)().then((function(e){t.type=e.data["回款方式"]}))},delRemind:function(e){this.remindPeople.splice(e,1),t.setStorageSync("remindlist",this.remindPeople)},getInfo:function(){var t=this;(0,a.netContractList)({customer_id:this.kehuid}).then((function(e){t.contractList=e.data}))},changeContractnum:function(t){this.contractNum=this.contractList[t.detail.value].num,this.id=this.contractList[t.detail.value].id,this.getContractinfo(),this.getNum()},getContractinfo:function(){var t=this;(0,a.netContractDetail)({id:this.id}).then((function(e){t.info=e.data}))},getNum:function(){var t=this;(0,a.netPaymentNum)({contract_id:this.id}).then((function(e){t.numList=e.data}))},changeNum:function(t){this.plan_id=this.numList[t.detail.value].id,this.plannum=this.numList[t.detail.value].num},changeType:function(t){this.return_type=this.type[t.detail.value]},changeTime:function(t){this.return_time=t.detail.value},getNumber:function(){var t=this;(0,a.netPaymentNumber)().then((function(e){t.number=e.data.number}))},moreClick:function(){t.navigateTo({url:"/pagesA/crm/selectMember/selectMember"})},saveFollow:function(){var e=this.number,n=this.money,i=this.return_time,o=this.return_type,r=this.remarks,u=this.info,c=this.plan_id,s=this.remindPeople;if(this.contractNum)if(e)if(n)if(i)if(o)if(s&&0!=s.length){var f=[];s.forEach((function(t){f.push(t.id)}));var l=f.join(","),d={customer_id:u.customer.id,contract_id:u.id,number:e,money:n,return_time:i,return_type:o,plan_id:c,remarks:r,flow_staff_ids:l},h=[];this.otherForm.forEach((function(t){h.push({name:t.id,required:t.config.required,msg:t.config.placeholder,value:t.value})}));for(var m=0;m<h.length;m++){if(h[m].required&&!h[m].value)return void t.showToast({title:h[m].msg,icon:"none"});d[h[m].name]=h[m].value}(0,a.netAddPayment)(d).then((function(e){t.showToast({title:e.msg,icon:"none"}),setTimeout((function(){t.navigateBack({delta:1})}),2e3)}))}else t.showToast({title:"请选择回款审批人",icon:"none"});else t.showToast({title:"请选择回款方式",icon:"none"});else t.showToast({title:"请选择回款日期",icon:"none"});else t.showToast({title:"请输入回款金额",icon:"none"});else t.showToast({title:"请输入回款编号",icon:"none"});else t.showToast({title:"请选择合同编号",icon:"none"})}}};e.default=c}).call(this,n("543d")["default"])},6701:function(t,e,n){"use strict";var i=n("a219"),o=n.n(i);o.a},"732b":function(t,e,n){"use strict";n.r(e);var i=n("7832"),o=n("8301");for(var a in o)["default"].indexOf(a)<0&&function(t){n.d(e,t,(function(){return o[t]}))}(a);n("6701");var r=n("f0c5"),u=Object(r["a"])(o["default"],i["b"],i["c"],!1,null,null,null,!1,i["a"],void 0);e["default"]=u.exports},7832:function(t,e,n){"use strict";n.d(e,"b",(function(){return i})),n.d(e,"c",(function(){return o})),n.d(e,"a",(function(){}));var i=function(){var t=this.$createElement;this._self._c},o=[]},8301:function(t,e,n){"use strict";n.r(e);var i=n("3963"),o=n.n(i);for(var a in i)["default"].indexOf(a)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(a);e["default"]=o.a},"8a4b":function(t,e,n){"use strict";(function(t,e){var i=n("4ea4");n("8886");i(n("66fd"));var o=i(n("732b"));t.__webpack_require_UNI_MP_PLUGIN__=n,e(o.default)}).call(this,n("bc2e")["default"],n("543d")["createPage"])},a219:function(t,e,n){}},[["8a4b","common/runtime","common/vendor"]]]);