1 line
7.1 KiB
JavaScript
1 line
7.1 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-reply-reply"],{"4b09":function(e,t,a){"use strict";a.d(t,"b",(function(){return i})),a.d(t,"c",(function(){return r})),a.d(t,"a",(function(){}));var i=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("v-uni-view",{staticClass:"reply-page"},[a("v-uni-view",{staticClass:"cu-form-group margin-top"},[a("v-uni-view",{staticClass:"title"},[e._v(e._s(e.$t("pages.reply.reply.回复人")))]),a("v-uni-view",{staticClass:"flex justify-between items-center"},[a("v-uni-view",[e._v(e._s(e.repairName||"暂无"))])],1)],1),a("v-uni-view",{staticClass:"cu-form-group margin-top"},[a("v-uni-textarea",{staticClass:"textarea",attrs:{placeholder:e.$t("pages.reply.reply.请输入回复内容,不少于5个字"),maxlength:"500"},model:{value:e.context,callback:function(t){e.context=t},expression:"context"}})],1),a("v-uni-button",{staticClass:"cu-btn bg-green block lg",staticStyle:{width:"90%",margin:"30upx auto",height:"80upx","line-height":"80upx","border-radius":"40upx","font-size":"32upx"},attrs:{loading:e.isSubmitting,disabled:e.isSubmitting||e.context.trim().length<5},on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.submitReply.apply(void 0,arguments)}}},[e._v(" "+e._s(e.isSubmitting?e.$t("pages.reply.reply.提交中"):e.$t("pages.reply.reply.提交"))+" ")])],1)},r=[]},"4bb4":function(e,t,a){var i=a("c86c");t=i(!1),t.push([e.i,".reply-page[data-v-757eaf09]{background-color:#f5f5f5;min-height:100vh;padding:%?20?%}.textarea[data-v-757eaf09]{resize:none;font-size:%?28?%;color:#333;min-height:%?120?%;border:1px solid #eee;border-radius:%?8?%;padding:%?15?%;width:100%;box-sizing:border-box}.cu-form-group[data-v-757eaf09]{background-color:#fff;padding:%?20?% %?30?%;margin-bottom:%?10?%;border-radius:%?8?%}.title[data-v-757eaf09]{width:%?160?%;color:#666;font-size:%?28?%}.flex[data-v-757eaf09]{display:flex}.justify-between[data-v-757eaf09]{justify-content:space-between}.items-center[data-v-757eaf09]{align-items:center}.text-gray[data-v-757eaf09]{color:#999}.margin-top[data-v-757eaf09]{margin-top:%?20?%}",""]),e.exports=t},"7cfc":function(e,t,a){"use strict";a.r(t);var i=a("4b09"),r=a("f337");for(var n in r)["default"].indexOf(n)<0&&function(e){a.d(t,e,(function(){return r[e]}))}(n);a("8346");var s=a("828b"),o=Object(s["a"])(r["default"],i["b"],i["c"],!1,null,"757eaf09",null,!1,i["a"],void 0);t["default"]=o.exports},8346:function(e,t,a){"use strict";var i=a("aaf8"),r=a.n(i);r.a},9370:function(e,t,a){"use strict";a("6a54");var i=a("f5bd").default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a("aa77"),a("bf0f"),a("0c26");var r=i(a("2634")),n=i(a("2fdc")),s=a("de79"),o=i(a("d5d0")),u=a("bf23"),c={data:function(){return{context:"",repairId:"",communityId:"",isSubmitting:!1,repairName:"",staffId:"",staffName:"",action:"REPLY",userId:"",userName:"",photos:[]}},onLoad:function(e){this.repairId=e.repairId||"",this.communityId=e.communityId||"",console.log("this.repairId:",this.repairId,"communityId:",this.communityId);var t=this.getUserInfoSafe();this.userId=t.userId||"",this.userName=t.userName||"",this.staffName=t.staffName||this.userName,this._loadReplyStaff()},methods:{getUserInfoSafe:function(){try{var e=this.java110Context;if(e&&e.getUserInfo)return e.getUserInfo()}catch(t){console.warn("getUserInfoSafe 出错",t)}return{}},_loadReplyStaff:function(){var e=this;return(0,n.default)((0,r.default)().mark((function t(){var a,i,n,o,u;return(0,r.default)().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return a=e,i={page:1,row:50,communityId:e.communityId},e.userId&&(i.userId=e.userId),t.prev=3,t.next=6,(0,s.queryUserRepair)(i);case 6:if(n=t.sent,0===n.code){t.next=10;break}return uni.showToast({title:n.msg||a.$t("pages.reply.reply.获取保修单失败"),icon:"none"}),t.abrupt("return");case 10:if(o=n.data||[],u=o.find((function(t){return String(t.repairId)===String(e.repairId)})),u){t.next=15;break}return uni.showToast({title:a.$t("pages.reply.reply.未找到该保修单"),icon:"none"}),t.abrupt("return");case 15:e.repairName=u.repairName||u.userName||"暂无",t.next=21;break;case 18:t.prev=18,t.t0=t["catch"](3),uni.showToast({title:a.$t("pages.reply.reply.网络异常,无法获取回复对象"),icon:"none"});case 21:case"end":return t.stop()}}),t,null,[[3,18]])})))()},submitReply:function(){var e=this,t=this,a=this.context.trim();if(this.repairId){if(a.length<5)uni.showToast({title:t.$t("pages.reply.reply.回复内容不少于5个字"),icon:"none"});else if(!this.isSubmitting){this.isSubmitting=!0;var i={repairId:t.repairId,staffId:t.repairId,context:a,communityId:t.communityId,userId:t.userId,userName:t.repairName,photos:t.photos,staffName:t.repairName,action:"REPLY",createTime:(new Date).toISOString()};o.default.request({url:u.url.repairDispatch,header:o.default.getHeaders(),method:"POST",data:i,success:function(e){var a=e.data;0===a.code?(uni.showToast({title:t.$t("pages.reply.reply.回复成功"),icon:"success"}),setTimeout((function(){uni.navigateBack()}),1e3)):uni.showToast({title:a.msg||t.$t("pages.reply.reply.回复失败"),icon:"none"})},fail:function(e){console.error("repairDispatch接口调用失败:",e),uni.showToast({title:t.$t("pages.reply.reply.网络异常,请重试"),icon:"none"})},complete:function(){e.isSubmitting=!1}})}}else uni.showToast({title:t.$t("pages.reply.reply.缺少报修单ID"),icon:"none"})}}};t.default=c},aaf8:function(e,t,a){var i=a("4bb4");i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[e.i,i,""]]),i.locals&&(e.exports=i.locals);var r=a("967d").default;r("a9572750",i,!0,{sourceMap:!1,shadowMode:!1})},de79:function(e,t,a){"use strict";a("6a54");var i=a("f5bd").default;Object.defineProperty(t,"__esModule",{value:!0}),t.appraiseRepair=function(e){return new Promise((function(t,a){(0,r.request)({url:n.default.appraiseRepair,method:"POST",data:e,success:function(e){var i=e.data;0!=i.code?a(i.msg):t(i)},fail:function(e){a(e)}})}))},t.getReplyStaffByRepairId=function(e){return new Promise((function(t,a){(0,r.request)({url:"/app/ownerRepair.listStaffRepairs",method:"GET",data:e,success:function(e){t(e.data)},fail:function(e){a(e)}})}))},t.listRepairSettings=function(e){return new Promise((function(t,a){(0,r.request)({url:n.default.listRepairSettings,method:"GET",data:e,success:function(e){var a=e.data;t(a)},fail:function(e){a(e)}})}))},t.listRepairStaffs=function(e){return new Promise((function(t,a){(0,r.request)({url:n.default.listRepairStaffs,method:"GET",data:e,success:function(e){var a=e.data;t(a)},fail:function(e){a(e)}})}))},t.queryUserRepair=function(e){return new Promise((function(t,a){(0,r.request)({url:n.default.listStaffFinishRepairs,method:"GET",data:e,success:function(e){var a=e.data;t(a)},fail:function(e){a(e)}})}))},t.urgeRepair=function(e){return new Promise((function(t,a){(0,r.request)({url:n.default.phoneUrgeRepair,method:"POST",data:e,success:function(e){var i=e.data;0!=i.code?a(i.msg):t(i)},fail:function(e){a(e)}})}))},a("bf0f");var r=a("a7bc"),n=i(a("79d4"));i(a("bce4"))},f337:function(e,t,a){"use strict";a.r(t);var i=a("9370"),r=a.n(i);for(var n in i)["default"].indexOf(n)<0&&function(e){a.d(t,e,(function(){return i[e]}))}(n);t["default"]=r.a}}]); |