2020-11-12 14:57:34 +08:00

1 line
5.1 KiB
JavaScript

(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/suggestion/suggestionDetail"],{3360:function(e,t,i){"use strict";var n=i("48da"),s=i.n(n);s.a},"48da":function(e,t,i){},"78a4":function(e,t,i){"use strict";(function(e){i("5fd4");n(i("66fd"));var t=n(i("7f20"));function n(e){return e&&e.__esModule?e:{default:e}}e(t.default)}).call(this,i("543d")["createPage"])},"7f20":function(e,t,i){"use strict";i.r(t);var n=i("f710"),s=i("e4e8");for(var o in s)"default"!==o&&function(e){i.d(t,e,(function(){return s[e]}))}(o);i("3360");var r,u=i("f0c5"),a=Object(u["a"])(s["default"],n["b"],n["c"],!1,null,"338cc4c9",null,!1,n["a"],r);t["default"]=a.exports},e4e8:function(e,t,i){"use strict";i.r(t);var n=i("f9c9"),s=i.n(n);for(var o in n)"default"!==o&&function(e){i.d(t,e,(function(){return n[e]}))}(o);t["default"]=s.a},f710:function(e,t,i){"use strict";var n;i.d(t,"b",(function(){return s})),i.d(t,"c",(function(){return o})),i.d(t,"a",(function(){return n}));var s=function(){var e=this,t=e.$createElement;e._self._c},o=[]},f9c9:function(e,t,i){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=i("2f62");function s(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function o(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?s(Object(i),!0).forEach((function(t){r(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):s(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function r(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}var u={data:function(){return{isShow:!1,loadingType:1,pickerIndex:-1,isDirector:0,SUGGESTION_ID:"",suggestionDetail:[],imgList:[],suggestionHandle:"请选择",DispostionStaffId:"",suggestionIdea:"",dealerList:[],isPostMsg:!1}},computed:o(o({},(0,n.mapGetters)({user:"getUser",shouldAuth:"shouldAuth"})),{},{imageList:function(){var e=[];return this.suggestionDetail&&this.suggestionDetail.ImgList&&this.suggestionDetail.ImgList.map((function(t){e.push(t.IMAGE_URL)})),e}}),methods:{getSuggestionDetail:function(){var e=this,t={1e3:"待处理",2e3:"待反馈",3e3:"已处理"};this.$request.get({action_type:"GetSuggestionDetail",action_data:e.SUGGESTION_ID}).then((function(i){if(i.ResultCode&&"100"==i.ResultCode){e.isShow=!0;var n=i.Data;if(n.SUGGESTION_STATE_TEXT=t[n.SUGGESTION_STATE],0==n.SORTNUM)switch(n.SUGGESTION_STATE){case 1e3:e.isDirector=1,e.GetDispostion();break;case 2e3:e.isDirector=2;break;case 3e3:e.isDirector=3;break}e.suggestionDetail=n}else e.isShow=!1}))},GetDispostion:function(){var e=this;this.$request.post({action_type:"GetDispostion",SUGGESTION_ID:e.SUGGESTION_ID}).then((function(t){e.dealerList=t.Data.List}))},submitSuggestion:function(){var t=this;if(1e3==t.suggestionDetail.SUGGESTION_STATE&&-1==t.pickerIndex)return e.showToast({icon:"none",title:"请选择处理人"}),!1;if(""==t.suggestionIdea)return e.showToast({icon:"none",title:"请填写处理意见"}),!1;e.showLoading({title:"正在提交"});var i={action_type:"ComplaintsHandling",action_data:t.SUGGESTION_ID,action_record:t.suggestionIdea,Person:t.user.Membership_Id,USER_ID:t.user.UserId,DispostionId:t.dealerList.length>0?t.dealerList[t.pickerIndex].Membership_Id:"",DispostionStaffId:t.dealerList.length>0?t.dealerList[t.pickerIndex].STAFF_ID:"",DispostionName:t.dealerList.length>0?t.dealerList[t.pickerIndex].MEMBERSHIP_NAME:""};2e3==t.suggestionDetail.SUGGESTION_STATE&&(delete i.DispostionId,delete i.DispostionStaffId,delete i.DispostionIdName),t.isPostMsg=!0,t.$request.post(i).then((function(i){100==i.ResultCode?(t.$eventHub.$emit("hasInfo",!0),t.$eventHub.$emit("suggestion",!0),e.showToast({title:i.ResultDesc,success:function(){setTimeout((function(){e.redirectTo({url:"/pages/suggestion/suggestion"})}),500)}})):e.showToast({title:i.ResultDesc}),t.isPostMsg=!1}))},showImg:function(t){e.previewImage({urls:this.imageList,current:t,loop:!0,indicator:"number"})},pickerChange:function(e){this.pickerIndex=e.detail.value},cheose:function(){if(1===this.isDirector&&0==this.dealerList.length)return e.showToast({icon:"none",title:"您没有可选择的处理人。请联系相关人员添加后重试!",duration:1e3}),!1}},onLoad:function(t){if(this.SUGGESTION_ID=t.SUGGESTION_ID,t.source&&"push"==t.source){var i=this;setTimeout((function(){i.shouldAuth?e.showModal({title:"温馨提示",content:"请登录授权后进行操作。",confirmText:"去授权",success:function(t){t.confirm&&e.navigateTo({url:"/pages/register/register?source=detail"})}}):i.getSuggestionDetail()}),1e3)}this.getSuggestionDetail()},onShow:function(){var t=this;t.shouldAuth&&t.getSuggestionDetail(),this.$eventHub.$once("suggestion",(function(i){i&&(e.showLoading({title:"正在加载"}),t.getSuggestionDetail())}))},onHide:function(){this.$eventHub.$off("suggestion",(function(e){}))}};t.default=u}).call(this,i("543d")["default"])}},[["78a4","common/runtime","common/vendor"]]]);