text: (global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/member/after_sale/index"],{"00ca":function(t,e,i){"use strict";var a=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("view",[i("radio-group",{staticClass:"uni-list",attrs:{eventid:"27be251b-0",mpcomid:"27be251b-0"},on:{change:t.radioChange}},t._l(t.type_list,function(e,a){return i("label",{key:a,staticClass:"uni-list-cell uni-list-cell-pd"},[i("view",{staticClass:"invoice-type-icon"},[i("radio",{staticClass:"a-radio",attrs:{id:e.name,value:e.value,checked:e.checked,disabled:e.disabled}})],1),i("view",{staticClass:"invoice-type-c"},[i("label",{staticClass:"label-2-text",attrs:{for:e.name}},[i("text",[t._v(t._s(e.name))])])],1)])}))],1)},s=[];i.d(e,"a",function(){return a}),i.d(e,"b",function(){return s})},"0bdc":function(t,e,i){"use strict";var a=i("fa1c"),s=i.n(a);s.a},"3cfc":function(t,e,i){"use strict";i.r(e);var a=i("47bf"),s=i.n(a);for(var n in a)"default"!==n&&function(t){i.d(e,t,function(){return a[t]})}(n);e["default"]=s.a},"47bf":function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a={data:function(){return{type_list:[{value:"1",name:"仅退款",checked:!0,disabled:!1},{value:"2",name:"退货退款",checked:!1,disabled:!1}]}},methods:{radioChange:function(t){var e=this;this.type_list.forEach(function(i){i.value===t.target.value?(i.checked=!0,e.aftersale_type=t.target.value):i.checked=!1}),this.type_list[0].checked?this.refund_input_noedit=!0:this.refund_input_noedit=!1}}};e.default=a},"484b":function(t,e,i){"use strict";i.r(e);var a=i("00ca"),s=i("3cfc");for(var n in s)"default"!==n&&function(t){i.d(e,t,function(){return s[t]})}(n);var c=i("2877"),l=Object(c["a"])(s["default"],a["a"],a["b"],!1,null,null,null);e["default"]=l.exports},"4b91":function(t,e,i){"use strict";i.r(e);var a=i("9254"),s=i.n(a);for(var n in a)"default"!==n&&function(t){i.d(e,t,function(){return a[t]})}(n);e["default"]=s.a},"8ab1":function(t,e,i){"use strict";i("faac");var a=n(i("b0ce")),s=n(i("8fe6"));function n(t){return t&&t.__esModule?t:{default:t}}Page((0,a.default)(s.default))},"8fe6":function(t,e,i){"use strict";i.r(e);var a=i("c7cc"),s=i("4b91");for(var n in s)"default"!==n&&function(t){i.d(e,t,function(){return s[t]})}(n);i("0bdc");var c=i("2877"),l=Object(c["a"])(s["default"],a["a"],a["b"],!1,null,null,null);e["default"]=l.exports},9254:function(t,e,i){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=s(i("484b"));function s(t){return t&&t.__esModule?t:{default:t}}var n={data:function(){return{type_list:[{value:"1",name:"仅退款",checked:!0,disabled:!1},{value:"2",name:"退货退款",checked:!1,disabled:!1}],order_id:"",items:[],item_ids:[],aftersale_type:1,refund:0,refund_show:0,images:[],reason:"",image_max:5,refund_input_noedit:!0,mode:"aspectFill",submitStatus:!1}},components:{jhlable:a.default},computed:{isImage:function(){var t=this.image_max-this.images.length;return t>0}},methods:{radioChange:function(t){var e=this;this.type_list.forEach(function(i){i.value===t.target.value?(i.checked=!0,e.aftersale_type=t.target.value):i.checked=!1}),this.type_list[0].checked?this.refund_input_noedit=!0:this.refund_input_noedit=!1},getOrderInfo:function(){var t=this,e={order_id:this.order_id};this.$api.afterSalesStatus(e,function(e){if(e.status)if(1!=e.data.text_status&&6!=e.data.text_status&&7!=e.data.text_status){var i=t.type_list;2==e.data.text_status&&(i[1].disabled=!0);for(var a=0,s=0;s<e.data.items.length;s++)e.data.items[s].id=e.data.items[s].id.toString(),a=e.data.items[s].nums,e.data.items[s].checked=!0,t.item_ids=t.item_ids.concat({id:e.data.items[s].id,nums:a});t.items=e.data.items,t.refund=e.data.payed-e.data.refunded,t.refund_show=e.data.payed-e.data.refunded,t.type_list=i}else t.$common.errorToBack("订单不可以进行售后");else t.$common.errorToBack("没有找到此订单")})},checkboxChange:function(t){var e=0;this.item_ids=[];for(var i=0;i<t.detail.value.length;i++)for(var a=t.detail.value[i],s=0;s<this.items.length;s++)this.items[s].id==a&&this.items[s].sendnums>this.items[s].reship_nums&&(e=this.items[s].sendnums-this.items[s].reship_nums,this.item_ids=this.item_ids.concat({id:a,nums:e}))},submit:function(e){var i=this;this.submitStatus=!0;for(var a=[],s=0;s<this.images.length;s++)a=a.concat(this.images[s].image_id);var n=/^[0-9]+(.[0-9]{1,2})?$/;if(!n.test(this.refund))return this.$common.errorToShow("请输入正确金额"),this.submitStatus=!1,!1;if(this.refund>this.refund_show)return this.$common.errorToShow("退款金额过大"),this.submitStatus=!1,!1;var c={order_id:this.order_id,type:this.aftersale_type,items:this.item_ids,images:a,refund:this.refund,reason:this.reason};c["formId"]=e.detail.formId,this.$api.addAfterSales(c,function(e){e.status?i.$common.successToShow("提交成功",function(e){i.submitStatus=!1,t.navigateBack({delta:1})}):(i.$common.errorToShow(e.msg),i.submitStatus=!1)})},upImage:function(){var t=this,e=this.image_max-this.images.length;e>0&&this.$api.uploadImage(e,function(e){e.status?(t.images.push(e.data),t.$common.successToShow(e.msg)):t.$common.errorToShow(e.msg)})},delImage:function(t){for(var e=[],i=0;i<this.images.length;i++)this.images[i].image_id!=t.image_id&&e.push(this.images[i]);this.images=e},clickImg:function(e){t.previewImage({urls:e.split()})}},onLoad:function(t){this.order_id=t.order_id,this.getOrderInfo()}};e.default=n}).call(this,i("543d")["default"])},c7cc:function(t,e,i){"use strict";var a=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("view",{staticClass:"content"},[i("form",{attrs:{"report-submit":"true",eventid:"592e7a26-7"},on:{submit:t.submit}},[i("view",{staticClass:"content-top"},[i("view",{staticClass:"img-list cart-list"},[i("checkbox-group",{staticClass:"cart-checkbox",attrs:{eventid:"592e7a26-0",mpcomid:"592e7a26-0"},on:{change:t.checkboxChange}},t._l(t.items,function(e,a){return i("view",{key:a,staticClass:"cart-checkbox-item"},[i("label",{staticClass:"uni-list-cell uni-list-cell-pd"},[i("view",{staticClass:"cart-checkbox-c"},[i("checkbox",{attrs:{value:e.id,checked:e.checked,color:"#FF7159"}})],1),i("view",{staticClass:"img-list-item"},[i("image",{staticClass:"img-list-item-l little-img have-none",attrs:{src:e.image_url,mode:"aspectFill"}}),i("view",{staticClass:"img-list-item-r little-right"},[i("view",{staticClass:"little-right-t"},[i("view",{staticClass:"goods-name list-goods-name"},[t._v(t._s(e.name))])]),i("view",{staticClass:"goods-item-c"},[i("view",{staticClass:"goods-buy"},[i("view",{staticClass:"goods-salesvolume"},[t._v(t._s(e.addon)+" x"+t._s(e.nums))])])])])])])],1)}))],1),i("view",{staticClass:"cell-group margin-cell-group"},[i("view",{staticClass:"cell-item"},[i("view",{staticClass:"cell-item-hd"},[i("view",{staticClass:"cell-hd-title"},[t._v("服务类型")])]),i("view",{staticClass:"cell-item-ft"},[i("view",{staticClass:"uni-form-item uni-column invoice-type"},[i("radio-group",{staticClass:"uni-list",attrs:{eventid:"592e7a26-1",mpcomid:"592e7a26-1"},on:{change:t.radioChange}},t._l(t.type_list,function(e,a){return i("label",{key:a,staticClass:"uni-list-cell uni-list-cell-pd"},[i("view",{staticClass:"invoice-type-icon"},[i("radio",{staticClass:"a-radio",attrs:{id:e.name,value:e.value,checked:e.checked,disabled:e.disabled}})],1),i("view",{staticClass:"invoice-type-c"},[i("label",{staticClass:"label-2-text",attrs:{for:e.name}},[i("text",[t._v(t._s(e.name))])])],1)])}))],1)])]),i("view",{staticClass:"cell-item"},[i("view",{staticClass:"cell-item-hd"},[i("view",{staticClass:"cell-hd-title"},[t._v("退款金额")])]),i("view",{staticClass:"cell-item-ft"},[i("input",{directives:[{name:"model",rawName:"v-model",value:t.refund,expression:"refund"}],staticClass:"cell-bd-input red-price",attrs:{disabled:t.refund_input_noedit,eventid:"592e7a26-2"},domProps:{value:t.refund},on:{input:function(e){e.target.composing||(t.refund=e.target.value)}}})])])]),i("view",{staticClass:"cell-group margin-cell-group"},[i("view",{staticClass:"cell-item right-img"},[i("view",{staticClass:"cell-item-hd"},[i("view",{staticClass:"cell-hd-title"},[t._v("上传凭证")])])]),i("view",{},[i("view",{staticClass:"evaluate-c-b"},[t._l(t.images,function(e,a){return i("view",{key:a,staticClass:"goods-img-item"},[i("image",{staticClass:"del",attrs:{src:"/static/image/del.png",mode:"",eventid:"592e7a26-3-"+a},on:{click:function(i){t.delImage(e)}}}),i("image",{attrs:{src:e.url,mode:"",eventid:"592e7a26-4-"+a},on:{click:function(i){t.clickImg(e.url)}}})])}),i("view",{directives:[{name:"show",rawName:"v-show",value:t.isImage,expression:"isImage"}],staticClass:"upload-img",attrs:{eventid:"592e7a26-5"},on:{click:t.upImage}},[i("image",{staticClass:"icon",attrs:{src:"/static/image/camera.png",mode:""}}),i("view",{},[t._v("上传照片")])])],2)])]),i("view",{staticClass:"cell-group margin-cell-group"},[i("view",{staticClass:"cell-item right-img"},[i("view",{staticClass:"cell-item-hd"},[i("view",{staticClass:"cell-hd-title"},[t._v("问题描述")])])]),i("view",{staticClass:"cell-textarea "},[i("textarea",{directives:[{name:"model",rawName:"v-model",value:t.reason,expression:"reason"}],attrs:{placeholder:"请您在此描述问题(最多200字)",maxlength:"200",eventid:"592e7a26-6"},domProps:{value:t.reason},on:{input:function(e){e.target.composing||(t.reason=e.target.value)}}})])])]),i("view",{staticClass:"button-bottom"},[i("button",{staticClass:"btn btn-b btn-square",attrs:{formType:"submit",disabled:t.submitStatus,loading:t.submitStatus}},[t._v("提交")])],1)])],1)},s=[];i.d(e,"a",function(){return a}),i.d(e,"b",function(){return s})},fa1c:function(t,e,i){}},[["8ab1","common/runtime","common/vendor"]]]);