You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

1 lines
8.0 KiB

(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["agent/pages/order/change"],{4284:function(t,e,a){"use strict";var n=a("e8ee"),i=a.n(n);i.a},"4a30":function(t,e,a){"use strict";(function(t){var n=a("47a9");Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=n(a("7eb4")),r=n(a("ee10")),o=n(a("7ca3")),c=a("8f59");function s(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),a.push.apply(a,n)}return a}function u(t){for(var e=1;e<arguments.length;e++){var a=null!=arguments[e]?arguments[e]:{};e%2?s(Object(a),!0).forEach((function(e){(0,o.default)(t,e,a[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):s(Object(a)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(a,e))}))}return t}var d={components:{},data:function(){return{isLoad:!1,options:{},placeholder:"请输入"+this.$t("action.attendantName")+"名称",tabList:[{id:1,title:"更换"+this.$t("action.attendantName")},{id:2,title:"委派"+this.$t("action.attendantName")}],transfreTypeList:[{id:1,title:"距离最近"},{id:2,title:"最早可预约"}],cityType:["","城市","区县","省"],param:{page:1,coach_name:"",type:1},list:{data:[]},loading:!0,index:-1,lockTap:!1,popupHeight:"",popupInfo:{},base_agent:[],chooseInd:-1,transferForm:{order_id:"",coach_type:1,coach_id:"",coach_name:"",near_time:"",mobile:"",text:"",admin_id:""},rule:[{name:"coach_name",checkType:"isNotNull",errorMsg:"请输入"+this.$t("action.attendantName")+"姓名",regType:2},{name:"mobile",checkType:"isMobile",errorMsg:"请输入联系电话"}]}},computed:(0,c.mapState)({primaryColor:function(t){return t.config.configInfo.primaryColor},subColor:function(t){return t.config.configInfo.subColor},configInfo:function(t){return t.config.configInfo},userInfo:function(t){return t.user.userInfo}}),onLoad:function(t){var e=t.id,a=t.agent,n=void 0===a?0:a;t.agent=1*n,this.options=t,this.transferForm.order_id=e,this.initIndex()},onPullDownRefresh:function(){t.showNavigationBarLoading(),this.initRefresh(),t.stopPullDownRefresh()},onReachBottom:function(){this.list.current_page>=this.list.last_page||this.loading||(this.param.page=this.param.page+1,this.loading=!0,this.getList())},methods:u(u(u({},(0,c.mapActions)(["getConfigInfo"])),(0,c.mapMutations)(["updateTechnicianItem"])),{},{initIndex:function(){var t=arguments,e=this;return(0,r.default)(i.default.mark((function a(){var n;return i.default.wrap((function(a){while(1)switch(a.prev=a.next){case 0:if(n=t.length>0&&void 0!==t[0]&&t[0],e.configInfo.id&&!n){a.next=4;break}return a.next=4,e.getConfigInfo();case 4:return a.next=6,Promise.all([e.getBaseInfo(),e.getList()]);case 6:e.isLoad=!0,e.$util.setNavigationBarColor({bg:e.primaryColor});case 8:case"end":return a.stop()}}),a)})))()},initRefresh:function(){this.param.page=1,this.initIndex(!0)},getBaseInfo:function(){var t=this;return(0,r.default)(i.default.mark((function e(){var a,n,r;return i.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return a=t.options.agent,n=void 0===a?0:a,r=n?"agent":"admin",e.next=4,t.$api[r].adminSelect();case 4:t.base_agent=e.sent;case 5:case"end":return e.stop()}}),e)})))()},toSearch:function(t){this.param.page=1,this.param.coach_name=t,this.transferForm.coach_id="",this.getList()},getList:function(){var t=this;return(0,r.default)(i.default.mark((function e(){var a,n,r,o,c,s,u,d;return i.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return a=t.list,n=t.param,r=t.options,o=r.id,c=r.agent,s=void 0===c?0:c,n.order_id=o,u=s?"agent":"admin",e.next=6,t.$api[u].orderChangeCoachList(n);case 6:d=e.sent,1==t.param.page||(d.data=a.data.concat(d.data)),t.list=d,t.loading=!1,t.$util.hideAll();case 10:case"end":return e.stop()}}),e)})))()},initFixHeight:function(t){this.popupHeight=t},toChangeItem:function(t,e){switch(t){case"type":this.transferForm.coach_id="",this.param[t]=e,this.param.page=1,this.getList(),this.$refs.show_transfer_item.close();break;case"coach_type":var a=Object.assign({},this.transferForm,{coach_type:e,coach_id:"",coach_name:"",near_time:"",mobile:"",text:"",admin_id:""});this.transferForm=a;break;case"coach_id":var n=this.list.data[e],i=n.id,r=n.near_time;this.transferForm[t]=i,this.transferForm.near_time=r;break;case"chooseInd":this[t]=e;break}},toChooseAgent:function(){var t=this.transferForm.admin_id,e=void 0===t?0:t,a=this.base_agent.findIndex((function(t){return t.id==e}));this.chooseInd=a,this.$refs.choose_item.open()},toConfirmCheck:function(){var t=this.base_agent[this.chooseInd].id;this.transferForm.admin_id=t,this.$refs.choose_item.close()},validate:function(t){var e=new this.$util.Validate;this.rule.map((function(a){var n=a.name;e.add(t[n],a)}));var a=e.start();return a},toConfirm:function(){var t=this;return(0,r.default)(i.default.mark((function e(){var a,n,r,o,c,s,u,d;return i.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(a=t.$util.deepCopy(t.transferForm),n=a.coach_type,r=void 0===n?1:n,o=a.coach_id,c=void 0===o?0:o,1!==r){e.next=12;break}if(c){e.next=6;break}return t.$util.showToast({title:"请选择"+t.$t("action.attendantName")}),e.abrupt("return");case 6:delete a.coach_name,delete a.mobile,delete a.text,delete a.admin_id,e.next=18;break;case 12:if(a.coach_id=0,s=t.validate(a),!s){e.next=17;break}return t.$util.showToast({title:s}),e.abrupt("return");case 17:delete a.near_time;case 18:if(delete a.coach_type,a.text=a.text?a.text.substring(0,400):"",!t.lockTap){e.next=22;break}return e.abrupt("return");case 22:return u=t.options.agent,d=u?"agent":"admin",e.prev=24,e.next=27,t.$api[d].orderChangeCoach(a);case 27:t.$util.showToast({title:"操作成功"}),t.lockTap=!1,t.$util.hideAll(),t.updateTechnicianItem({key:"haveOperItem",val:!0}),t.$util.back(),t.$util.goUrl({url:1,openType:"navigateBack"}),e.next=39;break;case 35:return e.prev=35,e.t0=e["catch"](24),setTimeout((function(){t.lockTap=!1,t.$util.hideAll()}),2e3),e.abrupt("return");case 39:case"end":return e.stop()}}),e,null,[[24,35]])})))()},goDetail:function(t){var e=this.list.data[t].id,a=this.options.agent,n="/agent/pages/order/detail?id=".concat(e,"&agent=").concat(a);this.$util.goUrl({url:n})}}),filters:{handleAdminName:function(t,e){var a="请选择代理商";if(t){var n=e.filter((function(e){return e.id==t}));a=n[0].agent_name}return a}}};e.default=d}).call(this,a("df3c")["default"])},"5e84":function(t,e,a){"use strict";a.d(e,"b",(function(){return n})),a.d(e,"c",(function(){return i})),a.d(e,"a",(function(){}));var n=function(){var t=this,e=t.$createElement,a=(t._self._c,t.isLoad&&1==t.transferForm.coach_type&&t.loading?t.list.current_page>=t.list.last_page&&t.list.data.length>0:null),n=t.isLoad&&1==t.transferForm.coach_type?!t.loading&&t.list.data.length<=0&&1==t.list.current_page:null,i=t.isLoad&&2==t.transferForm.coach_type?t.$t("action.attendantName"):null,r=t.isLoad&&2==t.transferForm.coach_type?t._f("handleAdminName")(t.transferForm.admin_id,t.base_agent):null,o=t.isLoad&&2==t.transferForm.coach_type?t.$t("action.attendantName"):null;t._isMounted||(t.e0=function(e){return e.stopPropagation(),t.$refs.show_transfer_item.open()},t.e1=function(e){return e.stopPropagation(),t.$refs.choose_item.close()}),t.$mp.data=Object.assign({},{$root:{g0:a,g1:n,m0:i,f0:r,m1:o}})},i=[]},7880:function(t,e,a){"use strict";(function(t,e){var n=a("47a9");a("7043");n(a("3240"));var i=n(a("ced4"));t.__webpack_require_UNI_MP_PLUGIN__=a,e(i.default)}).call(this,a("3223")["default"],a("df3c")["createPage"])},ced4:function(t,e,a){"use strict";a.r(e);var n=a("5e84"),i=a("d67c");for(var r in i)["default"].indexOf(r)<0&&function(t){a.d(e,t,(function(){return i[t]}))}(r);a("4284");var o=a("828b"),c=Object(o["a"])(i["default"],n["b"],n["c"],!1,null,null,null,!1,n["a"],void 0);e["default"]=c.exports},d67c:function(t,e,a){"use strict";a.r(e);var n=a("4a30"),i=a.n(n);for(var r in n)["default"].indexOf(r)<0&&function(t){a.d(e,t,(function(){return n[t]}))}(r);e["default"]=i.a},e8ee:function(t,e,a){}},[["7880","common/runtime","common/vendor"]]]);