(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-reply-reply"],{"116e":function(e,t,a){"use strict";var n=a("ae28"),i=a.n(n);i.a},"23fb":function(e,t,a){"use strict";a.r(t);var n=a("8481"),i=a.n(n);for(var o in n)["default"].indexOf(o)<0&&function(e){a.d(t,e,(function(){return n[e]}))}(o);t["default"]=i.a},"2c04":function(e,t,a){"use strict";a("6a54");var n=a("f5bd").default;Object.defineProperty(t,"__esModule",{value:!0}),t.appraiseRepair=function(e){return new Promise((function(t,a){if(""!=e.remark)if(""!=e.repairId){var n={repairId:e.repairId,repairType:e.repairType,repairChannel:e.repairChannel,publicArea:e.publicArea,communityId:e.communityId,context:e.remark};e.context.post({url:i.default.appraiseRepairNew,data:n,success:function(e){t(e)},fail:function(e){wx.showToast({title:"服务器异常了",icon:"none",duration:2e3})}})}else uni.showToast({title:"未包含报修信息",icon:"none"});else uni.showToast({title:"请填写评价内容",icon:"none"})}))},t.dispatchRepair=function(e){return new Promise((function(t,a){var n={staffId:e.staffId,staffName:e.staffName,context:e.content,repairId:e.repairId,repairType:e.repairType,action:e.action,communityId:(0,o.getCurrentCommunity)().communityId,photos:[],userId:e.userId,userName:e.userName},r=e.photos;r.forEach((function(e){n.photos.push({photo:e})}));var s="";""==n.context?s="请填写处理意见":""==n.staffId||""==n.staffName?s="请填写师傅":""==n.repairId?s="数据错误":"TRANSFER"==n.action&&n.userId==n.staffId&&(s="不能转单给自己"),""==s?e.context.post({url:i.default.repairDispatch,data:n,success:function(e){t(e)},fail:function(e){wx.showToast({title:"服务器异常了",icon:"none",duration:2e3})}}):wx.showToast({title:s,icon:"none",duration:2e3})}))},t.finishRepair=function(e){return new Promise((function(t,a){var n={feeFlag:e.feeFlag,context:e.content,repairId:e.repairId,repairChannel:e.repairChannel,publicArea:e.publicArea,maintenanceType:e.feeFlag,repairType:e.repairType,action:e.action,communityId:(0,o.getCurrentCommunity)().communityId,beforeRepairPhotos:[],afterRepairPhotos:[],repairObjType:e.repairObjType,userId:e.userId,userName:e.userName,storeId:e.storeId,choosedGoodsList:e.resourceStoreInfo,totalPrice:e.amount,payType:e.payType},r=e.beforeRepairPhotos;r.forEach((function(e){n.beforeRepairPhotos.push({photo:e})}));var s=e.afterRepairPhotos;s.forEach((function(e){n.afterRepairPhotos.push({photo:e})}));var u="";if(n.feeFlag?""==n.context?u="请填写处理意见":n.beforeRepairPhotos.length<=0||n.afterRepairPhotos.length<=0?u="请上传图片":""==n.repairId?u="数据错误":("1001"==n.maintenanceType||"1003"==n.maintenanceType)&&n.choosedGoodsList.length<1?u="请选择物品":"1001"==n.maintenanceType&&""==n.payType?u="请选择支付方式":("1001"==n.maintenanceType||"1003"==n.maintenanceType)&&n.choosedGoodsList.length>=1&&n.choosedGoodsList.forEach((function(e){(!e.useNumber||e.useNumber<1)&&(u="商品数量有误"),"1001"==n.maintenanceType&&(!e.price||e.price<0)&&(u="商品价格有误")})):u="请选择类型",""!=u)return wx.showToast({title:u,icon:"none",duration:2e3}),void(e.onoff=!0);"1002"!=n.maintenanceType&&"1004"!=n.maintenanceType||(n.useNumber=0,n.choosedGoodsList=[]),e.context.post({url:i.default.repairFinish,data:n,success:function(a){e.onoff=!0,t(a)},fail:function(t){e.onoff=!0,wx.showToast({title:"服务器异常了",icon:"none",duration:2e3})}})}))},t.loadRepairStaff=function(e,t){return new Promise((function(a,n){e.context.get({url:i.default.listRepairTypeUsers,data:t,success:function(e){a(e)},fail:function(e){wx.showToast({title:"服务器异常了",icon:"none",duration:2e3})}})}))},t.queryDictInfo=function(e,t){return new Promise((function(a,n){e.context.get({url:i.default.queryDictInfo,data:t,success:function(e){a(e.data)},fail:function(e){wx.showToast({title:"服务器异常了",icon:"none",duration:2e3})}})}))},t.queryRepairInfo=function(e,t){return new Promise((function(a,n){e.context.get({url:i.default.queryRepairInfo,data:t,success:function(e){a(e.data)},fail:function(e){wx.showToast({title:"服务器异常了",icon:"none",duration:2e3})}})}))},t.queryResourceStoreResName=function(e,t){return new Promise((function(a,n){e.context.get({url:i.default.queryResourceStoreResName,data:t,success:function(e){a(e)},fail:function(e){wx.showToast({title:"服务器异常了",icon:"none",duration:2e3})}})}))},t.repairStart=function(e,t){return new Promise((function(a,n){e.context.post({url:i.default.repairStart,data:t,success:function(e){a(e.data)},fail:function(e){wx.showToast({title:"服务器异常了",icon:"none",duration:2e3})}})}))},t.repairStop=function(e,t){return new Promise((function(a,n){e.context.post({url:i.default.repairStop,data:t,success:function(e){a(e.data)},fail:function(e){wx.showToast({title:"服务器异常了",icon:"none",duration:2e3})}})}))},t.replyRepairAppraise=function(e,t){return new Promise((function(a,n){t.context.post({url:i.default.replyRepairAppraise,data:e,success:function(e){a(e.data)},fail:function(e){wx.showToast({title:"服务器异常了",icon:"none",duration:2e3})}})}))},a("bf0f"),a("2797"),a("aa9c");var i=n(a("9494")),o=a("7fee")},"406f":function(e,t,a){"use strict";a.r(t);var n=a("fad3"),i=a("23fb");for(var o in i)["default"].indexOf(o)<0&&function(e){a.d(t,e,(function(){return i[e]}))}(o);a("116e");var r=a("828b"),s=Object(r["a"])(i["default"],n["b"],n["c"],!1,null,"15f876b4",null,!1,n["a"],void 0);t["default"]=s.exports},"758c":function(e,t,a){var n=a("c86c");t=n(!1),t.push([e.i,".reply-page[data-v-15f876b4]{background-color:#f5f5f5;min-height:100vh;padding:%?20?%}.textarea[data-v-15f876b4]{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}\r\n/* 与repairDispatch保持一致的表单样式 */.cu-form-group[data-v-15f876b4]{background-color:#fff;padding:%?20?% %?30?%;margin-bottom:%?10?%;border-radius:%?8?%}.title[data-v-15f876b4]{width:%?160?%;color:#666;font-size:%?28?%}.flex[data-v-15f876b4]{display:flex}.justify-between[data-v-15f876b4]{justify-content:space-between}.items-center[data-v-15f876b4]{align-items:center}.text-gray[data-v-15f876b4]{color:#999}.margin-top[data-v-15f876b4]{margin-top:%?20?%}",""]),e.exports=t},8481:function(e,t,a){"use strict";a("6a54");var n=a("f5bd").default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a("0c26");var i=a("7fee"),o=a("a98f"),r=(a("2c04"),n(a("9b8e"))),s=n(a("9494"));r.default.prototype.$preventClick=o.preventClick;var u={data:function(){return{context:"",repairId:"",communityId:"",isSubmitting:!1,repairName:"",staffId:"",staffName:"",action:"REPLY",userId:"",userName:"",photos:[]}},onLoad:function(e){this.java110Context.onLoad(),this.repairId=e.repairId,this.communityId=e.communityId||(0,i.getCurrentCommunity)().communityId;var t=this.java110Context.getUserInfo();this.userId=t.userId,this.userName=t.userName,this.staffName=t.staffName,this._loadRepairInfo()},methods:{_loadRepairInfo:function(){var e=this,t={page:1,row:1,repairId:this.repairId,communityId:this.communityId,userId:this.userId,staffName:this.staffName};console.log("查询报修单的参数:",t),this.java110Context.request({url:s.default.listStaffRepairs,header:e.java110Context.getHeaders(),method:"GET",data:t,success:function(t){var a=t.data;if(0===a.code)if(a.data&&a.data.length>0){var n=a.data[0];e.repairName=n.staffName||n.repairName,e.staffId=n.staffId||n.preStaffId,e.staffName=n.staffName||n.preStaffName||e.userName}else uni.showToast({icon:"none",title:"未找到报修信息"});else uni.showToast({icon:"none",title:a.msg||"获取信息失败"})},fail:function(e){uni.showToast({title:"服务器异常",icon:"none"})}})},submitReply:function(){var e=this;console.log("提交的参数:",{context:e.context,staffId:e.staffId,repairId:e.repairId,staffName:e.staffName,repairType:e.repairType,action:e.action,communityId:(0,i.getCurrentCommunity)().communityId,photos:[],userId:e.userId,userName:e.userName});var t=e.context.trim();if(e.staffId)if(t.length<5)uni.showToast({title:"回复内容不能少于5个字符",icon:"none"});else if(e.repairId){Array.isArray(e.photos)||(e.photos=[]),e.isSubmitting=!0;var a={repairId:e.repairId,staffId:e.staffId,context:t,communityId:e.communityId,userId:e.userId,userName:e.userName,photos:e.photos,staffName:e.staffName,action:"REPLY",createTime:(new Date).toISOString()};console.log("最终提交参数:",a),this.java110Context.request({url:s.default.repairDispatch,header:e.java110Context.getHeaders(),method:"POST",data:a,success:function(e){var t=e.data;0===t.code?(uni.showToast({title:"回复成功"}),setTimeout((function(){uni.navigateBack()}),1e3)):uni.showToast({icon:"none",title:t.msg||"回复失败"})},fail:function(e){console.error("appraiseRepair接口调用失败:",e),uni.showToast({title:"网络异常,请重试",icon:"none"})},complete:function(){e.isSubmitting=!1}})}else uni.showToast({title:"报修单ID缺失",icon:"none"});else uni.showToast({title:"请选择回复对象",icon:"none"})}}};t.default=u},a98f:function(e,t,a){"use strict";a("6a54"),Object.defineProperty(t,"__esModule",{value:!0}),t.preventClick=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",a=this;a.onoff?(a.onoff=!1,e(t)):uni.showToast({title:"操作过于频繁",icon:"none"})}},ae28:function(e,t,a){var n=a("758c");n.__esModule&&(n=n.default),"string"===typeof n&&(n=[[e.i,n,""]]),n.locals&&(e.exports=n.locals);var i=a("967d").default;i("5b8e4175",n,!0,{sourceMap:!1,shadowMode:!1})},fad3:function(e,t,a){"use strict";a.d(t,"b",(function(){return n})),a.d(t,"c",(function(){return i})),a.d(t,"a",(function(){}));var n=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.repairDispatch.replys.回复人")))]),a("v-uni-view",{staticClass:"flex justify-between items-center"},[a("v-uni-view",[e._v(e._s(e.repairName))]),a("v-uni-text",{staticClass:"cuIcon-right text-gray"})],1)],1),a("v-uni-view",{staticClass:"cu-form-group margin-top"},[a("v-uni-textarea",{staticClass:"textarea",attrs:{placeholder:e.$t("pages.repairDispatch.replys.请输入回复内容,不少于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.repairName||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.repairDispatch.replys.提交中"):e.$t("pages.repairDispatch.replys.提交"))+" ")])],1)},i=[]}}]);