(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-46c17322"],{"02da":function(t,e,a){},"0e2b":function(t,e,a){},"1afe":function(t,e,a){"use strict";a("c467")},"1dae":function(t,e,a){},2200:function(t,e,a){},"2eec":function(t,e,a){},3440:function(t,e,a){"use strict";a("7f62")},"374d":function(t,e,a){"use strict";a("8f8b")},"3c26":function(t,e,a){"use strict";a("a1b0")},"3c30":function(t,e,a){"use strict";a("fab4")},4136:function(t,e,a){},"6f1c":function(t,e,a){"use strict";a("2200")},"7f62":function(t,e,a){},"821a":function(t,e,a){"use strict";a("1dae")},"83d9":function(t,e,a){"use strict";a("2eec")},"8615e":function(t,e,a){"use strict";a("4136")},"8c8c":function(t,e,a){"use strict";a.r(e);var r=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"detailMulTabl"},[a("a-card",{staticClass:"multipleLayout",staticStyle:{width:"100%","background-color":"#f0f2f5"},attrs:{bordered:!1,activeTabKey:t.noTitleKey}},[a("add-rma",{directives:[{name:"show",rawName:"v-show",value:"addRma"===t.noTitleKey,expression:"noTitleKey === 'addRma'"}],attrs:{dataSource:t.dataSource,refundInfo:t.refundInfo,editObj:t.editObj,status:t.shippingStatus},on:{changePage:t.changePage,integralData:t.integralObj}}),"refundRange"===t.noTitleKey?a("refund-range",{attrs:{formId:t.formId,masterData:t.masterData,rmaMater:t.editObj.rma_master,refundInfo:t.refundInfo,symbal:t.symbal,rmaRefund:t.editObj.rma_return,couponInfo:t.editObj.rma_coupon_info,integralData:t.integralDataSource},on:{backFirst:t.backFirst,threeStep:t.threeStep}}):t._e(),"success"===t.noTitleKey?a("success-page",{attrs:{addReturnInfo:t.addReturnInfo}}):t._e()],1)],1)},s=[],i=(a("7f7f"),a("41aa")),n=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"add-rma-body"},[a("custom-bread",{attrs:{breadList:"rmaEdit"!==t.$route.name?t.breadList:t.breadListTwo}},[t._t("default",[a("rma-step",{attrs:{current:0}})])],2),a("div",{staticClass:"customContent"},[a("a-layout",[7!=t.isShowProduct?a("rma-goods",{ref:"goodsInfo",attrs:{editObj:t.editObj,dataSource:t.dataSource}}):t._e(),a("rma-Info",{ref:"rmaInfo",attrs:{editObj:t.editObj,status:t.status,refundInfo:t.refundInfo}})],1)],1),a("footer-tool-bar",{staticStyle:{width:"100%"}},[a("a-button",{style:{marginRight:"12px"},on:{click:t.cancel}},[t._v(" 取消 ")]),a("a-button",{attrs:{type:"primary"},on:{click:t.nextStep}},[t._v("\n "+t._s("editCoupon"!==t.$route.name||"editWechatCoupon"!==t.$route.name?"下一步":"提交")+"\n ")])],1)],1)},o=[],l=(a("8e6e"),a("456d"),a("ac6a"),a("5df3"),a("6762"),a("2fdb"),a("ade3")),d=a("2f62"),c=a("5633"),u=a("5a70"),m=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("a-layout-content",{staticClass:"multipleLayout-margin-bottom select-rma-product"},[a("a-card",[a("div",{attrs:{slot:"title"},slot:"title"},[t._v("\n 选择售后商品\n ")]),a("div",{style:{background:"#fff"}},[a("table-pro",{attrs:{dataSource:"rmaEdit"===t.$route.name?t.editObj.rma_items:t.dataSource,columns:t.columns,isMinus:t.isMinus,isPlus:t.isPlus},on:{inputChange:t.inputChange,minusNum:t.minusNum,addNum:t.addNum}})],1)])],1)},p=[],f=(a("c5f6"),a("de6a")),_=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"ant-table-wrapper"},[a("div",{staticClass:"ant-spin-nested-loading"},[a("div",{staticClass:"ant-spin-container"},[a("div",{staticClass:"ant-table ant-table-scroll-position-left ant-table-layout-fixed ant-table-default"},[a("div",{staticClass:"ant-table-content"},[a("div",{staticClass:"ant-table-body"},[a("table",{},[a("colgroup",[a("col",{staticClass:"ant-table-selection-col"}),t._l(t.columns,(function(e,r){return[a("col",{key:r,style:t.getStyle(e)})]}))],2),a("thead",{staticClass:"ant-table-thead"},[a("tr",[a("th",{key:"selection-column",staticClass:"ant-table-selection-column"},[a("span",{staticClass:"ant-table-header-column"},[a("div",[a("span",{staticClass:"ant-table-column-title"},[a("div",{staticClass:"ant-table-selection"},[a("label",{staticClass:"ant-checkbox-wrapper"},[a("a-checkbox",{attrs:{indeterminate:t.indeterminate,checked:t.checkAll,disabled:!("rmaEdit"!==t.$route.name&&!t.isCheckedAll)},on:{change:t.onCheckAllChange}})],1)])]),a("span",{staticClass:"ant-table-column-sorter"})])])]),t._l(t.columns,(function(e){return a("th",{key:e.key,staticClass:"ant-table-row-cell-ellipsis ant-table-row-cell-break-word"},[a("span",{staticClass:"ant-table-header-column"},[a("div",[a("span",{staticClass:"ant-table-column-title"},[t._v(t._s(e.title))]),a("span",{staticClass:"ant-table-column-sorter"})])])])}))],2)]),a("a-checkbox-group",{staticStyle:{display:"contents"},on:{change:t.onChange},model:{value:t.checkedList,callback:function(e){t.checkedList=e},expression:"checkedList"}},t._l(t.dataSource,(function(e,r){return a("tbody",{key:r,staticClass:"ant-table-tbody"},["simple"===e.product_type?[2!=e.free_samples?a("tr",{staticClass:"ant-table-row ant-table-row-level-0"},[a("td",{staticClass:"ant-table-selection-column"},[a("span",[a("label",{staticClass:"ant-checkbox-wrapper"},[a("a-checkbox",{attrs:{value:e.item_id,disabled:!("rmaEdit"!==t.$route.name&&!t.isCheckedAll)}})],1)])]),a("td",{staticClass:"ant-table-row-cell-ellipsis ant-table-row-cell-break-word"},[a("commodity-info",{attrs:{commodityObj:e,isChild:!1,isvirtual:!!e.child_products&&e.child_products.length>0}})],1),a("td",{staticClass:"ant-table-row-cell-break-word"},[t._v(t._s(e.qty_ordered))]),a("td",{staticClass:"ant-table-row-cell-break-word"},[a("div",{staticClass:"selectNumberBox"},[a("span",{staticClass:"pr"},[a("span",{staticClass:"inputMask"}),a("a-input",{staticStyle:{width:"130px"},attrs:{"default-value":e.allow_rma_qty,min:1,disabled:"rmaEdit"===t.$route.name||!(t.checkedList.indexOf(e.item_id)>-1)},on:{input:function(a){return t.changeFunc(e,r,"-1")}},model:{value:e.qty,callback:function(a){t.$set(e,"qty",a)},expression:"item.qty"}},[a("a-icon",{class:[t.checkedList.indexOf(e.item_id)>-1?"":"prefixDisabled",void 0===e.qty&&e.allow_rma_qty<=0||t.isCheckedAll&&e.allow_rma_qty<=1?"prefixDisabled":"",void 0!=e.qty&&e.qty<=0||t.isCheckedAll&&e.qty<=1?"prefixDisabled":"","rmaEdit"===t.$route.name?"prefixDisabled":""],attrs:{slot:"prefix",type:"minus"},on:{click:function(a){t.minusNub(e,!(t.checkedList.indexOf(e.item_id)>-1))}},slot:"prefix"}),a("a-icon",{class:[void 0===e.qty&&e.allow_rma_qty>=e.qty_ordered?"plusDisabled":"",void 0!=e.qty&&e.qty>=e.qty_ordered?"plusDisabled":""],attrs:{slot:"suffix",type:"plus"},on:{click:function(a){t.plusNub(e,!(t.checkedList.indexOf(e.item_id)>-1))}},slot:"suffix"})],1)],1)])])]):t._e(),2===e.free_samples?a("tr",{staticClass:"ant-table-row ant-table-row-level-0"},[a("td",{staticClass:"ant-table-selection-column"},[a("span",[a("label",{staticClass:"ant-checkbox-wrapper"},[a("a-checkbox",{attrs:{value:e.item_id,disabled:!("rmaEdit"!==t.$route.name&&!t.isCheckedAll)}})],1)])]),a("td",{staticClass:"ant-table-row-cell-ellipsis ant-table-row-cell-break-word"},[a("commodity-info",{attrs:{commodityObj:e,isChild:!1,isvirtual:!1}})],1),a("td",{staticClass:"ant-table-row-cell-break-word"},[t._v(t._s(e.qty_ordered))]),a("td",{staticClass:"ant-table-row-cell-break-word"},[a("div",{staticClass:"selectNumberBox"},[a("span",{staticClass:"pr"},[a("span",{staticClass:"inputMask"}),a("a-input",{staticStyle:{width:"130px"},attrs:{"default-value":e.allow_rma_qty,min:1,disabled:"rmaEdit"===t.$route.name||!(t.checkedList.indexOf(e.item_id)>-1)},on:{input:function(a){return t.changeFunc(e,r,"-1")}},model:{value:e.qty,callback:function(a){t.$set(e,"qty",a)},expression:"item.qty"}},[a("a-icon",{class:[t.checkedList.indexOf(e.item_id)>-1?"":"prefixDisabled",void 0===e.qty&&e.allow_rma_qty<=0||t.isCheckedAll&&e.allow_rma_qty<=1?"prefixDisabled":"",void 0!=e.qty&&e.qty<=0||t.isCheckedAll&&e.qty<=1?"prefixDisabled":"","rmaEdit"===t.$route.name?"prefixDisabled":""],attrs:{slot:"prefix",type:"minus"},on:{click:function(a){t.minusNub(e,!(t.checkedList.indexOf(e.item_id)>-1))}},slot:"prefix"}),a("a-icon",{class:[void 0===e.qty&&e.allow_rma_qty>=e.qty_ordered?"plusDisabled":"",void 0!=e.qty&&e.qty>=e.qty_ordered?"plusDisabled":""],attrs:{slot:"suffix",type:"plus"},on:{click:function(a){t.plusNub(e,!(t.checkedList.indexOf(e.item_id)>-1))}},slot:"suffix"})],1)],1)])])]):t._e(),t._l(e.child_products,(function(e,s){return[2===e.free_samples?a("tr",{key:s},[a("td",{staticClass:"ant-table-selection-column border-none"},[a("span",[a("label",{staticClass:"ant-checkbox-wrapper"},[a("a-checkbox",{attrs:{value:e.item_id,disabled:!("rmaEdit"!==t.$route.name&&!t.isCheckedAll)}})],1)])]),a("td",{staticClass:"ant-table-row-cell-ellipsis ant-table-row-cell-break-word border-dotted"},[a("commodity-info",{attrs:{commodityObj:e,isChild:!1}})],1),a("td",{staticClass:"ant-table-row-cell-break-word border-dotted"},[t._v(t._s(e.qty_ordered))]),a("td",{staticClass:"ant-table-row-cell-break-word border-dotted"},[a("div",{staticClass:"selectNumberBox"},[a("span",{staticClass:"pr"},[a("span",{staticClass:"inputMask"}),a("a-input",{staticStyle:{width:"130px"},attrs:{"default-value":e.allow_rma_qty,min:0,disabled:"rmaEdit"===t.$route.name||!(t.checkedList.indexOf(e.item_id)>-1)},on:{input:function(a){return t.changeFunc(e,r,s)}},model:{value:e.qty,callback:function(a){t.$set(e,"qty",a)},expression:"child.qty"}},[a("a-icon",{class:[t.checkedList.indexOf(e.item_id)>-1?"":"prefixDisabled",void 0===e.qty&&e.allow_rma_qty<=0||t.isCheckedAll&&e.allow_rma_qty<=1?"prefixDisabled":"",void 0!=e.qty&&e.qty<=0||t.isCheckedAll&&e.qty<=1?"prefixDisabled":"","rmaEdit"===t.$route.name?"prefixDisabled":""],attrs:{slot:"prefix",type:"minus"},on:{click:function(a){t.minusNub(e,!(t.checkedList.indexOf(e.item_id)>-1))}},slot:"prefix"}),a("a-icon",{class:[void 0===e.qty&e.allow_rma_qty>=e.qty_ordered?"plusDisabled":"",void 0!=e.qty&e.qty>=e.qty_ordered?"plusDisabled":""],attrs:{slot:"suffix",type:"plus"},on:{click:function(a){t.plusNub(e,!(t.checkedList.indexOf(e.item_id)>-1))}},slot:"suffix"})],1)],1)])])]):t._e()]}))]:"bundle"===e.product_type?[a("tr",{staticClass:"bundle-tr"},[a("td"),a("td",{staticClass:"suit-pro",attrs:{colspan:t.columns.length}},[a("div",{staticStyle:{width:"50%"}},[t._v("\n 【套装商品】"),a("span",{staticClass:"bundle-title"},[t._v(t._s(e.name))]),t._v(" x"+t._s(e.qty_ordered)+"\n ")])])]),t._l(e.child_products,(function(e,s){return a("tr",{key:s,staticClass:"bundle-tr"},[a("td",{staticClass:"ant-table-selection-column border-none"},[a("span",[a("label",{staticClass:"ant-checkbox-wrapper"},[a("a-checkbox",{attrs:{value:e.item_id,disabled:!("rmaEdit"!==t.$route.name&&!t.isCheckedAll)}})],1)])]),a("td",{staticClass:"ant-table-row-cell-ellipsis ant-table-row-cell-break-word"},[a("commodity-info",{attrs:{commodityObj:e,isChild:!0}})],1),a("td",{staticClass:"ant-table-row-cell-break-word"},[t._v(t._s(e.qty_ordered)+" ")]),a("td",{staticClass:"ant-table-row-cell-break-word"},[a("div",{staticClass:"selectNumberBox"},[a("span",{staticClass:"pr"},[a("span",{staticClass:"inputMask"}),a("a-input",{staticStyle:{width:"130px"},attrs:{"default-value":e.allow_rma_qty,min:0,disabled:"rmaEdit"===t.$route.name||!(t.checkedList.indexOf(e.item_id)>-1)},on:{input:function(a){return t.changeFunc(e,r,s)}},model:{value:e.qty,callback:function(a){t.$set(e,"qty",a)},expression:"child.qty"}},[a("a-icon",{class:[t.checkedList.indexOf(e.item_id)>-1?"":"prefixDisabled",void 0===e.qty&e.allow_rma_qty<=0||t.isCheckedAll&&e.allow_rma_qty<=1?"prefixDisabled":"",void 0!=e.qty&e.qty<=0||t.isCheckedAll&&e.qty<=1?"prefixDisabled":"","rmaEdit"===t.$route.name?"prefixDisabled":""],attrs:{slot:"prefix",type:"minus"},on:{click:function(a){t.minusNub(e,!(t.checkedList.indexOf(e.item_id)>-1))}},slot:"prefix"}),a("a-icon",{class:[void 0===e.qty&e.allow_rma_qty>=e.qty_ordered?"plusDisabled":"",void 0!=e.qty&e.qty>=e.qty_ordered?"plusDisabled":""],attrs:{slot:"suffix",type:"plus"},on:{click:function(a){t.plusNub(e,!(t.checkedList.indexOf(e.item_id)>-1))}},slot:"suffix"})],1)],1)])])])}))]:t._e()],2)})),0)],1)]),t.dataSource.length<=0?a("div",{staticClass:"ant-table-placeholder"},[a("a-spin",[a("a-empty",{attrs:{image:t.simpleImage}})],1)],1):t._e()])])])])])},h=[],y=(a("20d6"),a("fc25")),b=a("1b95");function v(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),a.push.apply(a,r)}return a}function g(t){for(var e=1;e0&&e.child_products.map((function(r){t===r.item_id&&(a.length>0&&a.indexOf(e)>-1?"bundle"!==e.product_type&&a.push(r):2!==r.free_samples?a.push(e):a.push(r))})),t===e.item_id&&a.push(e)}))})),this.$store.commit("SET_Rma_CheckedList",t),this.$store.commit("SET_Rma_CheckedData",a)},minusNub:function(t,e){var a=this;if(void 0!==t.qty){if(1*t.qty===1&&!this.isCheckedAll)return this.$set(t,"qty",0),this.checkedList.splice(a.checkedList.findIndex((function(e){return e===t.item_id})),1),!1}else if(1*t.allow_rma_qty===1&&!this.isCheckedAll)return this.$set(t,"qty",0),this.checkedList.splice(a.checkedList.findIndex((function(e){return e===t.item_id})),1),!1;1*t.qty===1&&this.isCheckedAll||this.$emit("minusNum",t,e)},plusNub:function(t,e){this.$emit("addNum",t,e)},changeFunc:function(t,e,a){var r=this;1*t.qty!==0||this.isCheckedAll||this.checkedList.splice(r.checkedList.findIndex((function(e){return e.item_id===t.item_id}))),this.$emit("inputChange",t,e,a)}},beforeCreate:function(){this.simpleImage=y["a"].PRESENTED_IMAGE_SIMPLE}},C=w,q=(a("374d"),a("2877")),O=Object(q["a"])(C,_,h,!1,null,"8f8820f4",null),x=O.exports;function k(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),a.push.apply(a,r)}return a}function S(t){for(var e=1;et.qty_ordered)return!1;r>=t.allow_rma_qty?(this.numberDialog(),a.$set(t,"qty",r)):a.$set(t,"qty",r)}else{if(t.qty>=t.qty_ordered)return!1;t.qty>=t.allow_rma_qty?(this.numberDialog(),t.qty++):t.qty++}},inputChange:function(t,e,a){var r="rmaEdit"===this.$route.name?this.editObj.rma_items:this.dataSource;"-1"!==a?r[e].child_products[a].qty=t.qty:r[e].qty=t.qty,this.watchVal(e,a)},watchVal:function(t,e){var a,r="rmaEdit"===this.$route.name?this.editObj.rma_items:this.dataSource;if(r.length>0){a="-1"!==e?r[t].child_products[e].qty:r[t].qty;var s=this.isCheckedAll?/^([1-9][0-9]*)$/:/^(0|[1-9][0-9]*)$/;s.test(a)?"-1"!==e?Number(a)>r[t].child_products[e].allow_rma_qty&&this.numberDialog():Number(a)>r[t].allow_rma_qty&&this.numberDialog():"-1"!==e?this.$set(r[t].child_products[e],"qty",r[t].child_products[e].allow_rma_qty):this.$set(r[t],"qty",r[t].allow_rma_qty)}},numberDialog:function(){var t=this,e="rmaEdit"===this.$route.name?this.editObj.rma_master.increment_id:this.$route.params.increment_id;this.$confirm({icon:function(t){return t(f["a"])},title:"商品有效售后数量已大于商品购买数量,确定申请售后?",onCancel:function(){window.open("/order/afterSales/list?increment_id=".concat(e,"&site_id=").concat(t.$store.getters.websiteId),"_blank")},cancelText:"查看售后历史",okText:"确定"})},onSelectChange:function(t){this.selectedRowKeys=t},editSet:function(){},handleSubmit:function(){},isFieldsTouched:function(){return this.form.isFieldsTouched()}}},j=$,I=(a("3c30"),Object(q["a"])(j,m,p,!1,null,"0296b9d5",null)),E=I.exports,T=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("a-layout-content",{staticClass:"multipleLayout-margin-bottom",style:{marginBottom:0}},[a("a-card",{attrs:{title:"填写售后信息",loading:t.loading}},[a("div",{style:{background:"#fff"}},[a("a-form",{attrs:{form:t.form},on:{submit:t.handleSubmit}},[a("a-form-item",{style:{marginBottom:"12px"},attrs:{label:"售后方式",labelCol:t.labelCol,wrapperCol:t.wrapperCol}},[a("a-radio-group",{directives:[{name:"decorator",rawName:"v-decorator",value:["process_type",{initialValue:t.processType,rules:[{required:!0,message:"请选择一项线下售后方式"}]}],expression:"['process_type',{initialValue:processType, rules: [ { required: true, message: '请选择一项线下售后方式'}]}]"}],attrs:{disabled:"rmaEdit"===t.$route.name},on:{change:t.processChange}},[t.support_rma_style.indexOf("1")>-1?a("a-radio",{attrs:{value:"1"}},[t._v(" 仅退款")]):t._e(),t.support_rma_style.indexOf("2")>-1?a("a-radio",{attrs:{value:"2"}},[t._v(" 退货退款 ")]):t._e(),t.support_rma_style.indexOf("4")>-1?a("a-radio",{attrs:{value:"4"}},[t._v(" 拒收退款 ")]):t._e(),t.support_rma_style.indexOf("3")>-1?a("a-radio",{attrs:{value:"3"}},[t._v("\n 商品补发\n "),a("a-tooltip",{attrs:{title:"商品补发售后单,审核通过后,系统会自动以选择的售后商品创建补发订单"}},[a("a-icon",{attrs:{type:"exclamation-circle"}})],1)],1):t._e(),t.support_rma_style.indexOf("9")>-1?a("a-radio",{attrs:{value:"9",disabled:"processing"!==t.status}},[t._v("\n 整单取消\n "),a("a-tooltip",{attrs:{title:"审核通过后订单将自动取消(如果订单状态变为已发货,订单状态不可取消,但仍会生成退款单),同时会自动生成一笔退款单,财务审核后退款给用户。"}},[a("a-icon",{attrs:{type:"exclamation-circle"}})],1)],1):t._e(),t.support_rma_style.indexOf("5")>-1?a("a-radio",{attrs:{value:"5",disabled:"hold"===t.status||"shipments"===t.status||"complete"===t.status||"canceled"===t.status}},[t._v("\n 部分取消\n "),a("a-tooltip",{attrs:{title:"部分取消售后单,审核通过后,原订单会自动取消,去掉选中的缺货商品后,剩下可正常发货的商品系统将自动生成砍单新建单"}},[a("a-icon",{attrs:{type:"exclamation-circle"}})],1)],1):t._e(),t.support_rma_style.indexOf("6")>-1?a("a-radio",{attrs:{value:"6"}},[t._v(" 仅补偿 ")]):t._e(),t.support_rma_style.indexOf("7")>-1?a("a-radio",{attrs:{value:"7"}},[t._v("\n 附加退款\n "),a("a-tooltip",{attrs:{title:"除去用户支付的订单金额,还需要额外退款给用户的售后金额"}},[a("a-icon",{attrs:{type:"exclamation-circle"}})],1)],1):t._e(),t.support_rma_style.indexOf("10")>-1?a("a-radio",{attrs:{value:"10"}},[t._v("\n 客户补款\n "),a("a-tooltip",{attrs:{title:"客户补款主要用于以下场景:1.财务给客户多退款,需要客户补款。2.客户此前的订单全额退款后又收到了包裹,客户想要这个包裹,需要客户补款。需要客户补款的订单,有些客户愿意走线上补款,比如补差价订单;有些客户不愿意走线上补款,会通过支付宝、微信、银行卡转给客服,这种场景客服需要记录,然后客服转给公司的账户。"}},[a("a-icon",{attrs:{type:"exclamation-circle"}})],1)],1):t._e()],1)],1),t.isShowAddress?a("a-form-item",{attrs:{labelCol:t.labelCol,wrapperCol:t.wrapperCol,required:""}},[a("span",{attrs:{slot:"label"},slot:"label"},[t._v(" 退货地址\n "),a("a-tooltip",{attrs:{title:"添加/编辑退货地址,请前往设置-地址管理"}},[a("a-icon",{attrs:{type:"exclamation-circle"}})],1)],1),a("a-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["return_address_id",{rules:[{required:!0,message:"请选择退货地址"}],validateTrigger:"blur"}],expression:"['return_address_id',{ rules: [\n { required: true, message: '请选择退货地址'}\n ],\n validateTrigger: 'blur'}]"}],staticStyle:{width:"440px"},attrs:{placeholder:"请选择","option-label-prop":"label"}},[t._l(t.addressData,(function(e){return[2===e.return_address?a("a-select-option",{key:e.id,attrs:{value:e.id,label:t.getAddress(e)}},[[2===e.return_default?a("a-tag",[t._v("默认")]):t._e(),t._v("\n "+t._s(e.contact+" "+e.contact_mobile+" "+e.province+e.city+e.county+e.street1)+"\n ")]],2):t._e()]}))],2)],1):t._e(),a("a-form-item",{directives:[{name:"show",rawName:"v-show",value:t.isShowOther,expression:"isShowOther"}],staticClass:"form-item-radio-margin-top",attrs:{label:"发货状态",labelCol:t.labelCol,wrapperCol:t.wrapperCol,required:""}},[a("a-radio-group",{directives:[{name:"decorator",rawName:"v-decorator",value:["order_shipment_status",{initialValue:t.Shipment}],expression:"['order_shipment_status',{initialValue:Shipment }]"}]},[a("a-radio",{attrs:{value:"1"}},[t._v(" 未发货 ")]),a("a-radio",{attrs:{value:"2"}},[t._v(" 已发货 ")])],1)],1),a("a-form-item",{directives:[{name:"show",rawName:"v-show",value:t.isShowOther,expression:"isShowOther"}],staticClass:"form-item-radio-margin-top",attrs:{labelCol:t.labelCol,wrapperCol:t.wrapperCol,required:""}},[a("span",{attrs:{slot:"label"},slot:"label"},[t._v("\n 包裹拦截状态\n ")]),a("a-radio-group",{directives:[{name:"decorator",rawName:"v-decorator",value:["package_intercept_status",{initialValue:t.Intercept}],expression:"['package_intercept_status',{initialValue: Intercept}]"}]},[a("a-radio",{attrs:{value:"1"}},[t._v(" 无需拦截 ")]),a("a-radio",{attrs:{value:"2"}},[t._v(" 未拦截 ")]),a("a-radio",{attrs:{value:"3"}},[t._v(" 已拦截 ")])],1)],1),"3"===t.form.getFieldValue("process_type")?a("a-form-item",{attrs:{labelCol:t.labelCol,wrapperCol:t.wrapperCol,required:""}},[a("span",{attrs:{slot:"label"},slot:"label"},[t._v(" 收货人信息\n "),a("a-tooltip",{attrs:{title:"若需要修改收货人信息,请进入订单详情修改"}},[a("a-icon",{attrs:{type:"exclamation-circle"}})],1)],1),t._v("\n "+t._s(t.refundInfo.address_info)+"\n ")]):t._e(),a("a-form-item",{attrs:{labelCol:t.labelCol,wrapperCol:t.wrapperCol,required:""}},[a("span",{attrs:{slot:"label"},slot:"label"},[t._v(" 售后原因\n "),a("a-tooltip",{attrs:{title:"添加和编辑售后原因,请前往设置-售后原因"}},[a("a-icon",{attrs:{type:"exclamation-circle"}})],1)],1),a("a-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["confirm_rma_reason",{rules:[{required:!0,message:"请选择售后原因"}],validateTrigger:"blur"}],expression:"['confirm_rma_reason',{ rules: [\n { required: true, message: '请选择售后原因'}\n ],\n validateTrigger: 'blur'}]"}],staticStyle:{width:"440px"},attrs:{placeholder:"请选择"}},t._l(t.reasonData,(function(e){return a("a-select-option",{key:e.id,attrs:{value:e.id}},[t._v("\n "+t._s(e.name)+"\n ")])})),1)],1),a("a-form-item",{attrs:{labelCol:t.labelCol,wrapperCol:t.wrapperCol}},[a("span",{attrs:{slot:"label"},slot:"label"},[t._v(" 售后说明")]),a("a-textarea",{directives:[{name:"decorator",rawName:"v-decorator",value:["remark",{rules:[{min:1,max:200,message:"售后说明不能超过200个字符,请修改"}],initialValue:t.context_block}],expression:"['remark', {rules: [{ min: 1, max: 200, message: '售后说明不能超过200个字符,请修改'}],initialValue:context_block}]"}],style:{width:"440px"},attrs:{autoSize:{minRows:4},placeholder:"请输入售后说明"},on:{change:t.changea}}),a("span",{staticClass:"characterLimit"},[t._v(t._s(t.changeaValue.length)+"/200")])],1),a("a-form-item",{directives:[{name:"decorator",rawName:"v-decorator",value:["image_url"],expression:"['image_url']"}],style:{marginBottom:0},attrs:{labelCol:t.labelCol,wrapperCol:t.wrapperCol,required:t.isShowAddress}},[a("span",{attrs:{slot:"label"},slot:"label"},[t._v(" 上传凭证")]),a("custom-upload",{ref:"customUpload",attrs:{defaultImg:t.defaultImg},on:{uploadImg:t.uploadImg}})],1)],1)],1)])],1)},P=[],L=(a("6b54"),a("28a5"),a("c1df")),R=a.n(L),N=a("660b"),A={name:"RmaInfo",props:{editObj:{type:Object,required:!0},refundInfo:{type:Object,required:!0},status:{type:String,required:!0}},components:{customUpload:N["a"]},data:function(){return{form:this.$form.createForm(this),loading:!0,labelCol:{span:4},wrapperCol:{span:20},customWrapperCol:{span:8},showColon:!1,baseInfoMore:!1,effectTimeStatus:!0,reasonData:[],addressData:[],uploadImgUrl:[],changeaValue:"",isShowAddress:!1,isShowOther:!0,addressId:null,support_rma_style:[]}},watch:{editObj:function(t){t&&"rmaEdit"===this.$route.name&&(this.reasonList(),"2"===this.processType&&this.addressList()),this.loading=!1},status:function(t){this.loading=!1}},computed:{websiteId:function(){return this.$store.getters.websiteId},defaultCurrency:function(){return this.$store.getters.siteCurrencyName},processType:function(){var t=this,e="0";return"rmaEdit"===this.$route.name?t.editObj.rma_master&&(e=t.editObj.rma_master.process_type+"","4"===e?(t.isShowAddress=!1,t.isShowOther=!1):"2"===e?(t.isShowAddress=!0,t.isShowOther=!1):"1"===e?(t.isShowAddress=!1,t.isShowOther=!0):(t.isShowAddress=!1,t.isShowOther=!1)):(e=this.status?"shipments"===this.status||"complete"===this.status?"2":"1":"","2"===e&&(t.isShowAddress=!0,t.isShowOther=!1,this.addressList())),e},Shipment:function(){var t=this,e="1";return"rmaEdit"===this.$route.name?t.editObj.rma_master&&(e=t.editObj.rma_master.order_shipment_status+""):e="shipments"===t.status||"complete"===t.status?"2":"1",e},Intercept:function(){var t=this,e="1";return"rmaEdit"===this.$route.name?t.editObj.rma_master&&(e=t.editObj.rma_master.package_intercept_status+""):e="2",e},context_block:function(){var t=this,e="";return"rmaEdit"===this.$route.name&&t.editObj.rma_master&&(e=t.editObj.rma_master.remark,t.changeaValue=t.editObj.rma_master.remark),e},defaultImg:function(){var t=this,e=[];if("rmaEdit"===this.$route.name&&t.editObj.rma_master){var a=t.editObj.rma_master.image_url;e=""!==a?a.split(","):[]}return e}},methods:{moment:R.a,reasonList:function(){var t=this,e=this.form.setFieldsValue,a={is_del:1};Object(i["v"])(a).then((function(a){var r=a.data;r&&(t.reasonData=r.list,"rmaEdit"===t.$route.name&&t.editObj.rma_master&&e({confirm_rma_reason:t.editObj.rma_master.confirm_rma_reason}))}))},addressList:function(){var t=this,e=this.form.setFieldsValue,a={page:1,size:200};Object(i["d"])(a).then((function(a){var r=a.data;r&&(t.addressData=r.list,"rmaEdit"===t.$route.name?t.editObj.rma_master&&e({return_address_id:t.editObj.rma_master.return_address_id}):r.list.map((function(a){2===a.return_default&&(e({return_address_id:a.id}),t.addressId=a.id)})))}))},changea:function(t){if(!t)return 0;this.changeaValue=t.target.value},processChange:function(t){var e=this,a=this.form.setFieldsValue;"2"===t.target.value?(this.isShowAddress=!0,this.isShowOther=!1,this.form.resetFields(),this.$store.commit("SET_Rma_CheckedAll",!1),this.addressData.length?this.addressId&&setTimeout((function(){a({return_address_id:e.addressId})}),50):this.addressList()):"4"===t.target.value?(this.form.resetFields(),this.isShowAddress=!1,this.isShowOther=!1,this.$refs.customUpload.isShowError=!1,this.$store.commit("SET_Rma_CheckedAll",!1)):"1"===t.target.value?(this.form.resetFields(),this.isShowAddress=!1,this.isShowOther=!0,this.$refs.customUpload.isShowError=!1,this.$store.commit("SET_Rma_CheckedAll",!1)):"9"===t.target.value?(this.form.resetFields(),this.isShowAddress=!1,this.isShowOther=!1,this.$refs.customUpload.isShowError=!1,this.$store.commit("SET_Rma_CheckedAll",!0)):(this.form.resetFields(),this.isShowAddress=!1,this.isShowOther=!1,this.$refs.customUpload.isShowError=!1,this.$store.commit("SET_Rma_CheckedAll",!1))},uploadImg:function(t){this.uploadImgUrl=t},handleSubmit:function(){var t=this,e=this;return new Promise((function(a){var r=e.form.validateFields;r((function(e,r){if(1*r.process_type===2&&t.uploadImgUrl.length<=0)return t.$refs.customUpload.isShowError=!0,!1;e||(r.package_intercept_status="1"!==r.process_type?1:Number(r.package_intercept_status),r.image_url=t.uploadImgUrl.toString(),r.order_shipment_status=Number(r.order_shipment_status),e=null,a({errs:e,fields:r}))}))}))},getAddress:function(t){return t.contact+" "+t.contact_mobile+" "+t.province+t.city+t.county+t.street1},isFieldsTouched:function(){return this.form.isFieldsTouched()},featchData:function(){var t=this,e={website_id:this.websiteId};Object(i["Q"])(e).then((function(e){var a=e.data;if(a){var r=a.list.support_rma_style?a.list.support_rma_style.split(","):["1","2","3","4","5","6","7","9"];t.support_rma_style=r}else t.support_rma_style=["1","2","3","4","5","6","7","9"]}))}},mounted:function(){"rmaEdit"!==this.$route.name&&this.reasonList()},created:function(){this.featchData()}},F=A,M=(a("3c26"),Object(q["a"])(F,T,P,!1,null,"bf250148",null)),V=M.exports,U=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticStyle:{width:"490px","margin-right":"24px"}},[a("a-steps",{attrs:{current:t.current,size:"small"}},[a("a-step",{attrs:{title:"填写售后信息"}}),a("a-step",{attrs:{title:"设置退款金额"}}),a("a-step",{attrs:{title:"完成"}})],1)],1)},B=[],K={name:"CouponSteps",props:{current:{type:Number,required:!0}}},J=K,z=Object(q["a"])(J,U,B,!1,null,null,null),W=z.exports;function G(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),a.push.apply(a,r)}return a}function Q(t){for(var e=1;e-1&&(void 0!==r.qty?1*r.qty===0&&(a.errorTips(),e.errs="errs"):1*r.allow_rma_qty===0&&(a.errorTips(),e.errs="errs"))})):(r.free_samples,void 0!==r.qty?1*r.qty===0&&(a.errorTips(),e.errs="errs"):1*r.allow_rma_qty===0&&(a.errorTips(),e.errs="errs"))})),e)},errorTips:function(){return this.$message.error("选择售后商品,售后数量必须大于等于1"),!1},cancel:function(){var t=!1;this.checkedData&&(t=this.checkedData.length>0);var e=[t,this.$refs.rmaInfo.isFieldsTouched()];if(e.includes(!0)){var a=this;this.$confirm({icon:function(t){return t(f["a"])},title:"数据未提交保存,直接离开数据将会丢失,确定离开!",onOk:function(){"rmaEdit"===a.$route.name?a.$router.back():a.$router.push({path:"/order/afterSales/list"})},cancelText:"取消",okText:"确定"})}else{var r=this;"rmaEdit"===r.$route.name?r.$router.back():r.$router.push({path:"/order/afterSales/list"})}},nextStep:function(){var t=this,e=[];e=this.isShowProduct<7?[this.handleSubmit(),this.$refs.rmaInfo.handleSubmit()]:[{errs:{}},this.$refs.rmaInfo.handleSubmit()],Promise.all(e).then((function(e){var a=H(e);if("{}"===JSON.stringify(a.errs)&&0===X(e).length){var r=a.fields;t.getIntegral(r)}}))},setMoney:function(t){this.$emit("changePage",t)},getIntegral:function(t){var e=this,a=[],r={},s={};this.checkedData&&this.checkedData.length&&this.checkedData.map((function(t){if("bundle"!==t.product_type)s={item_id:t.item_id,qty:t.qty?1*t.qty:1*t.allow_rma_qty,qty_ordered:t.qty_ordered},a.push(s);else if(t.child_products&&t.child_products.length>0){var r={};t.child_products.map((function(t){e.checkedList.indexOf(t.item_id)>-1&&(r={item_id:t.item_id,qty:t.qty?1*t.qty:1*t.allow_rma_qty,qty_ordered:t.qty_ordered},a.push(r))}))}})),r.rma_items=a,r.rma_master={},r.rma_master.increment_id="rmaEdit"===this.$route.name?this.editObj.rma_master.increment_id:this.$route.params.increment_id,r.rma_master.is_return_used_points=100===this.$route.params.site_id?2:1,r.rma_master.is_return_customer_points=100===this.$route.params.site_id?2:1,r.rma_master.process_type=1*t.process_type,"rmaEdit"===this.$route.name&&(r.rma_master.id=this.editObj.rma_master.id),Object(i["I"])(r).then((function(a){var r=a.data;r?(e.$emit("integralData",r.rma_master),e.setMoney(t)):e.setMoney(t)}))}}},Z=Y,tt=(a("6f1c"),Object(q["a"])(Z,n,o,!1,null,null,null)),et=tt.exports,at=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("custom-bread",{attrs:{breadList:"rmaEdit"!==t.$route.name?t.breadList:t.breadListTwo}},[t._t("default",[a("rma-step",{attrs:{current:1}})])],2),a("div",{staticClass:"customContent"},["3"!=t.masterData.process_type&&"6"!=t.masterData.process_type&&"7"!=t.masterData.process_type&&"10"!=t.masterData.process_type?a("a-layout-content",{staticClass:"select-rma-product"},[a("a-card",[a("div",{attrs:{slot:"title"},slot:"title"},[t._v("\n 设置退款金额\n ")]),a("div",{style:{background:"#fff"}},[a("refund-table",{attrs:{columns:t.columns,symbal:t.symbal,isShowReward:"rmaEdit"===t.$route.name?t.rmaMater.reward_id>0:t.refundInfo.reward_id>0},on:{inputChange:t.inputChange}})],1),a("div",{staticClass:"refund-total"},[a("ul",[a("li",[a("span",{staticClass:"name",attrs:{slot:"label"},slot:"label"},[t._v(" 商品退款合计\n "),a("a-tooltip",{attrs:{title:"商品退款合计=当前售后单所有售后商品的商品退款金额之和"}},[a("a-icon",{attrs:{type:"exclamation-circle"}})],1),t._v("\n :\n ")],1),a("span",{staticStyle:{float:"right"}},[t._v("\n "+t._s(t.symbal)+t._s(t.totalPriceNew>=0?t.totalPriceNew:t.totalPrice)+"\n ")])]),a("li",[a("a-checkbox",{model:{value:t.shipping,callback:function(e){t.shipping=e},expression:"shipping"}},[a("span",{class:{unselected:!t.shipping}},[t._v("退运费 ")]),a("a-tooltip",{attrs:{title:"运费退款金额=当前售后单所有售后商品的实付运费金额之和"}},[a("a-icon",{attrs:{type:"exclamation-circle"}})],1),t._v("\n :\n ")],1),a("span",{staticStyle:{float:"right"}},[t._v("\n "+t._s(t.symbal)+t._s(t.totalFreight)+"\n ")])],1),a("li",[a("a-checkbox",{model:{value:t.tax,callback:function(e){t.tax=e},expression:"tax"}},[a("span",{class:{unselected:!t.tax}},[t._v("退税费 ")]),a("a-tooltip",{attrs:{title:"税费退款金额=当前售后单所有售后商品的实付税费金额之和"}},[a("a-icon",{attrs:{type:"exclamation-circle"}})],1),t._v("\n :\n ")],1),a("span",{staticStyle:{float:"right"}},[t._v("\n "+t._s(t.symbal)+t._s(t.totalTaxes)+"\n ")])],1),a("li",[a("span",{staticClass:"name",attrs:{slot:"label"},slot:"label"},[t._v("积分抵扣金额\n "),a("a-tooltip",{attrs:{title:"积分抵扣金额=当前售后单所有售后商品的积分抵扣金额之和"}},[a("a-icon",{attrs:{type:"exclamation-circle"}})],1),t._v("\n :\n ")],1),a("span",{staticStyle:{float:"right"}},[t._v("\n "+t._s(t.integralPrice)+"\n ")])]),("rmaEdit"===t.$route.name?t.rmaMater.reward_id>0:t.refundInfo.reward_id>0)?a("li",[a("span",{staticClass:"name",attrs:{slot:"label"},slot:"label"},[t._v("退款扣除分享返现金额\n "),a("a-tooltip",{attrs:{title:"分享返现扣款原则,优先扣用户分享返现账户,余额不足则从订单退款中扣除。订单佣金状态=未激活时,扣除订单分享返现冻结金额。订单佣金状态=可提现/提现中/提现成功时,扣除用户分享返现可提现金额,金额不足则从售后退款中扣除。"}},[a("a-icon",{attrs:{type:"exclamation-circle"}})],1),t._v("\n :\n ")],1),a("span",{staticStyle:{float:"right"}},[t._v("\n "+t._s(t.sharePrice)+"\n ")])]):t._e(),a("li",[a("span",{staticClass:"name",staticStyle:{fontWeight:"bold"},attrs:{slot:"label"},slot:"label"},[t._v("退款总金额\n "),a("a-tooltip",{attrs:{title:("rmaEdit"===t.$route.name?t.rmaMater.reward_id>0:t.refundInfo.reward_id>0)?"退款总金额=商品退款合计+运费退款金额+税费退款金额-积分抵扣金额-退款扣除分享返现金额。":"退款总金额=商品退款合计+运费退款金额+税费退款金额-积分抵扣金额"}},[a("a-icon",{attrs:{type:"exclamation-circle"}})],1),t._v("\n :\n ")],1),a("span",{staticClass:"totalAmount",staticStyle:{float:"right"}},[t._v("\n "+t._s(t.symbal)+t._s(t.totalAmount)+"\n ")])])])])])],1):t._e(),1*t.masterData.process_type===7?a("additional",{ref:"additional",attrs:{symbal:t.symbal,editObj:t.rmaMater}}):t._e(),"rmaEdit"!==t.$route.name?[t.refundInfo.reward_id>0&&(1*t.masterData.process_type===1||1*t.masterData.process_type===2||1*t.masterData.process_type===4||1*t.masterData.process_type===5||1*t.masterData.process_type===9)?a("rma-share",{ref:"rmaShare",attrs:{currency:t.symbal,data:t.integralData,editObj:t.rmaMater}}):t._e()]:[t.rmaMater.reward_id>0&&(1*t.masterData.process_type===1||1*t.masterData.process_type===2||1*t.masterData.process_type===4||1*t.masterData.process_type===5||1*t.masterData.process_type===9)?a("rma-share",{ref:"rmaShare",attrs:{currency:t.symbal,data:t.integralData,editObj:t.rmaMater}}):t._e()],1*t.masterData.process_type===1||1*t.masterData.process_type===2||1*t.masterData.process_type===4||1*t.masterData.process_type===5||1*t.masterData.process_type===9?a("rma-integrate",{ref:"integrate",attrs:{data:t.integralData,editObj:t.rmaMater}}):t._e(),1*t.masterData.process_type===10?a("replenish-money",{ref:"replenish",attrs:{editObj:t.rmaMater}}):a("compensation-coupon",{ref:"compensation",attrs:{processType:1*t.masterData.process_type,editObj:t.couponInfo}}),t.isShowRefund?a("refund-info",{ref:"refundInfo",attrs:{returnPath:1*t.masterData.process_type===7?7:t.refundInfo.refund_path,editRefund:t.rmaRefund,incrementId:"rmaEdit"===t.$route.name?t.rmaMater.increment_id:t.$route.params.increment_id}}):t._e()],2),a("footer-tool-bar",{staticStyle:{width:"100%"}},["{}"!==JSON.stringify(this.checkedData)?a("a-button",{attrs:{slot:"extra"},on:{click:t.cancel},slot:"extra"},[t._v("\n 上一步\n ")]):t._e(),a("a-button",{style:{marginRight:"12px"},on:{click:t.leaveConfirm}},[t._v("\n 取消\n ")]),a("a-button",{attrs:{type:"primary"},on:{click:t.nextStep}},[t._v("\n 提交\n ")])],1)],1)},rt=[],st=a("ca00"),it=a("6cd7"),nt=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("a-layout-content",{staticClass:"refund-info-content",staticStyle:{marginTop:"16px"}},[a("a-card",[a("div",{attrs:{slot:"title"},slot:"title"},[t._v("\n 填写线下退款信息\n ")]),a("div",{staticClass:"refund-body"},[a("div",{staticClass:"refund-tips"},[a("a-icon",{staticStyle:{color:"#faad14","margin-right":"8px"},attrs:{type:"exclamation-circle"}}),7===t.returnPath?[t._v("\n 附加退款无法原路退款,请填写线下退款信息!\n "),a("router-link",{staticClass:"trajectory",attrs:{target:"_blank",to:{name:"afterSalesList",query:{increment_id:t.incrementId,site_id:this.$store.getters.websiteId}}}},[t._v("\n 查看售后历史\n ")])]:2===t.returnPath?[t._v("\n 已超出支付机构退款时效,无法原路退款,请填写线下退款信息\n ")]:[t._v("\n 退款金额总和已大于订单实付金额,无法原路退款,请填写线下退款信息!\n "),a("router-link",{staticClass:"trajectory",attrs:{target:"_blank",to:{name:"afterSalesList",query:{increment_id:t.incrementId,site_id:this.$store.getters.websiteId}}}},[t._v("\n 查看售后历史\n ")])]],2),a("a-form",{attrs:{form:t.form},on:{submit:t.handleSubmit}},[a("a-form-item",{attrs:{label:"支付方式",labelCol:t.labelCol,wrapperCol:t.wrapperCol,required:""}},[a("a-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["refund_payment_method",{rules:[{required:!0}],validateTrigger:"blur",initialValue:t.paymentMethod}],expression:"\n [ 'refund_payment_method', {\n rules: [\n { required: true, }\n ],\n validateTrigger: 'blur',\n initialValue:paymentMethod\n },\n ]"}],staticStyle:{width:"440px"},attrs:{placeholder:"请选择"},on:{change:t.changePayment}},t._l(t.paymentList,(function(e){return a("a-select-option",{key:e.id,attrs:{value:e.id}},[t._v("\n "+t._s(e.payment)+"\n ")])})),1)],1),a("a-form-item",{attrs:{label:"支付机构",labelCol:t.labelCol,wrapperCol:t.wrapperCol}},[a("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["return_payment_company",{initialValue:t.paymentCompany}],expression:"[ 'return_payment_company',{initialValue:paymentCompany}]"}],staticStyle:{width:"440px"},attrs:{placeholder:"请输入支付方式对应的支付机构,如果未知可不填写"}})],1),1===t.payment_method?a("a-form-item",{attrs:{label:"支付宝账号",labelCol:t.labelCol,wrapperCol:t.wrapperCol}},[a("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["refund_account",{rules:[{required:!0,message:"请输入收款支付宝账号",pattern:/^(?!(\s+$))/}],validateTrigger:"blur",initialValue:t.refundAccount}],expression:"\n [ 'refund_account', {\n rules: [\n { required: true, message: '请输入收款支付宝账号',pattern: /^(?!(\\s+$))/ }\n ],\n validateTrigger: 'blur',\n initialValue:refundAccount\n },\n ]"}],staticStyle:{width:"440px"},attrs:{placeholder:"请输入收款支付宝账号"}})],1):t._e(),3===t.payment_method?a("a-form-item",{attrs:{label:"微信号",labelCol:t.labelCol,wrapperCol:t.wrapperCol}},[a("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["refund_account",{rules:[{required:!0,message:"请输入收款微信号",pattern:/^(?!(\s+$))/}],validateTrigger:"blur",initialValue:t.refundAccount}],expression:"\n [ 'refund_account', {\n rules: [\n { required: true, message: '请输入收款微信号' ,pattern: /^(?!(\\s+$))/}\n ],\n validateTrigger: 'blur',\n initialValue:refundAccount\n },\n ]"}],staticStyle:{width:"440px"},attrs:{placeholder:"请输入收款微信号"}})],1):t._e(),2===t.payment_method?a("a-form-item",{attrs:{label:"开户行",labelCol:t.labelCol,wrapperCol:t.wrapperCol}},[a("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["bank_of_depost_id",{rules:[{required:!0,message:"请输入银行卡开户行,细化到支行",pattern:/^(?!(\s+$))/}],validateTrigger:"blur",initialValue:t.backId}],expression:"\n [ 'bank_of_depost_id', {\n rules: [\n { required: true, message: '请输入银行卡开户行,细化到支行' ,pattern: /^(?!(\\s+$))/}\n ],\n validateTrigger: 'blur',\n initialValue:backId\n },\n ]"}],staticStyle:{width:"440px"},attrs:{placeholder:"请输入银行卡开户行,细化到支行,如:中国银行深圳梅龙支行"}})],1):t._e(),2===t.payment_method?a("a-form-item",{attrs:{label:"银行卡账号",labelCol:t.labelCol,wrapperCol:t.wrapperCol}},[a("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["refund_account",{rules:[{required:!0,message:"请输入收款银行卡账号",pattern:/^(?!(\s+$))/}],validateTrigger:"blur",initialValue:t.refundAccount}],expression:"\n [ 'refund_account', {\n rules: [\n { required: true, message: '请输入收款银行卡账号',pattern: /^(?!(\\s+$))/ }\n ],\n validateTrigger: 'blur',\n initialValue:refundAccount\n },\n ]"}],staticStyle:{width:"440px"},attrs:{placeholder:"请输入收款银行卡账号"}})],1):t._e(),a("a-form-item",{attrs:{label:"真实姓名",labelCol:t.labelCol,wrapperCol:t.wrapperCol}},[a("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["refund_name",{rules:[{required:t.isInputName,message:"请输入真实姓名",pattern:t.isInputName?/^(?!(\s+$))/:""}],validateTrigger:"blur",initialValue:t.refundName}],expression:"\n [ 'refund_name', {\n rules: [\n { required: isInputName, message: '请输入真实姓名',pattern: isInputName ? /^(?!(\\s+$))/ : '' }\n ],\n validateTrigger: 'blur',\n initialValue:refundName\n },\n ]"}],staticStyle:{width:"440px"},attrs:{placeholder:"请输入真实姓名"}})],1),1===t.payment_method?a("a-form-item",{attrs:{label:"上传支付宝收款码",labelCol:t.labelCol,wrapperCol:t.wrapperCol}},[a("upload",{key:t.index,ref:"alipay_image_url",attrs:{imgIndex:t.index,editImg:t.defaultImg},on:{nextUplaod:t.nextUplaod,removeUplaod:t.removeUplaod}}),a("div",{staticClass:"clearfix uploadTips"},[t._v("仅支持jpg、jpeg、png、gif格式")])],1):t._e(),3===t.payment_method?a("a-form-item",{attrs:{label:"上传微信收款码",labelCol:t.labelCol,wrapperCol:t.wrapperCol,required:""}},[a("upload",{key:t.index,ref:"wechat_image_url",attrs:{imgIndex:t.index,editImg:t.defaultImg},on:{nextUplaod:t.nextUplaod,removeUplaod:t.removeUplaod}}),a("div",{staticClass:"clearfix uploadTips"},[t._v("仅支持jpg、jpeg、png、gif格式")])],1):t._e()],1)],1)])],1)},ot=[],lt=a("129e"),dt={data:function(){return{index:0,form:this.$form.createForm(this),labelCol:{span:3},wrapperCol:{span:20},payment_method:1,defaultPayment:1,paymentList:[],uploadImgUrl:""}},components:{upload:lt["a"]},computed:{isInputName:function(){return!(3===this.payment_method||""===this.payment_method)},paymentMethod:function(){var t=this,e=this.defaultPayment;return"rmaEdit"===this.$route.name&&(e="支付宝"===t.editRefund.refund_payment_method?1:"微信支付"===t.editRefund.refund_payment_method?3:"银行卡"===t.editRefund.refund_payment_method?2:1,t.payment_method=e),e},paymentCompany:function(){var t=this,e="";return"rmaEdit"===this.$route.name&&(e=t.editRefund.return_payment_company),e},refundAccount:function(){var t=this,e="";return"rmaEdit"===this.$route.name&&(e=t.editRefund.refund_account),e},backId:function(){var t=this,e="";return"rmaEdit"===this.$route.name&&(e=t.editRefund.bankofdepostid),e},refundName:function(){var t=this,e="";return"rmaEdit"===this.$route.name&&(e=t.editRefund.refund_name),e},defaultImg:function(){var t=this,e="";return"rmaEdit"===this.$route.name&&(e=t.editRefund.qrcode_url,t.uploadImgUrl=t.editRefund.qrcode_url),e}},props:{returnPath:{type:Number,default:null},incrementId:{type:String,default:""},editRefund:{type:Object,default:function(){return{}}}},methods:{fetchData:function(){var t=this;Object(i["D"])().then((function(e){var a=e.data;if(a){var r=[];t.paymentList=a.rma_setting_payment,a.rma_setting_payment.forEach((function(t){r.push(t.id)})),"rmaEdit"!==t.$route.name&&(t.defaultPayment=Math.min.apply(Math,r),t.payment_method=Math.min.apply(Math,r))}}))},changePayment:function(t){this.payment_method=t,this.form.setFields({refund_account:{value:void 0,errors:null},refund_name:{value:void 0,errors:null}}),this.uploadImgUrl=""},handleSubmit:function(){var t=this,e=this;return new Promise((function(a){var r=e.form.validateFields;r((function(e,r){if(!e){if(r.return_payment_company&&(r.return_payment_company=r.return_payment_company.trim()),r.refund_account&&(r.refund_account=r.refund_account.trim()),r.refund_name&&(r.refund_name=r.refund_name.trim()),r.bank_of_depost_id&&(r.bank_of_depost_id=r.bank_of_depost_id.trim()),3===t.payment_method){if(t.verfifyUploadErr())return;r.qrcode_url=t.uploadImgUrl}1===t.payment_method&&(r.qrcode_url=t.uploadImgUrl),e=null,a({errs:e,fields:r})}}))}))},verfifyUploadErr:function(){if(!this.uploadImgUrl)return this.$refs.wechat_image_url.singleDecide("请上传微信收款码"),!0},nextUplaod:function(t,e){this.uploadImgUrl=e},removeUplaod:function(t){this.uploadImgUrl=""}},mounted:function(){this.fetchData()}},ct=dt,ut=(a("821a"),Object(q["a"])(ct,nt,ot,!1,null,"082cbfce",null)),mt=ut.exports,pt=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("a-layout-content",{staticClass:"rma-integrate",staticStyle:{marginTop:"16px"}},[a("a-card",[a("div",{attrs:{slot:"title"},slot:"title"},[t._v("\n 分享返现\n ")]),a("div",{style:{background:"#fff",paddingLeft:"12.5%"}},[a("detail-list",{attrs:{col:2}},[2!==t.data.reward_status?a("detail-list-item",[a("span",{attrs:{slot:"term"},slot:"term"},[t._v("\n 售后应该扣除分享返现金额\n "),a("a-tooltip",{attrs:{title:"售后应该扣除分享返现金额=当前售后单所有售后商品的分享返佣佣金之和。"}},[a("a-icon",{attrs:{type:"exclamation-circle"}})],1)],1),t._v("\n "+t._s(t.currency+t.data.deduct_amount.toFixed(2))+"\n ")]):t._e(),2!==t.data.reward_status?a("detail-list-item",[a("span",{attrs:{slot:"term"},slot:"term"},[t._v("\n 订单佣金状态\n "),a("a-tooltip",{attrs:{title:"新建售后单时,订单的佣金状态。"}},[a("a-icon",{attrs:{type:"exclamation-circle"}})],1)],1),t._v("\n "+t._s(t._f("rewardStatus")(t.data.reward_status))+"\n ")]):t._e(),1===t.data.reward_status?a("detail-list-item",[a("span",{attrs:{slot:"term"},slot:"term"},[t._v("\n 订单分享返现冻结金额\n "),a("a-tooltip",{attrs:{title:"新建售后单时,订单的分享返现冻结金额。"}},[a("a-icon",{attrs:{type:"exclamation-circle"}})],1)],1),t._v("\n "+t._s(t.currency+t.data.frozen_amount.toFixed(2))+"\n ")]):t._e(),3===t.data.reward_status||4===t.data.reward_status||5===t.data.reward_status||6===t.data.reward_status?a("detail-list-item",[a("span",{attrs:{slot:"term"},slot:"term"},[t._v("\n 用户分享返现可提现金额\n "),a("a-tooltip",{attrs:{title:"新建售后单时,用户的分享返现可提现金额。"}},[a("a-icon",{attrs:{type:"exclamation-circle"}})],1)],1),t._v("\n "+t._s(t.currency+t.data.withdraw_amount.toFixed(2))+"\n ")]):t._e(),2!==t.data.reward_status?a("detail-list-item",[a("span",{attrs:{slot:"term"},slot:"term"},[t._v("\n 售后实际扣除分享返现金额\n "),a("a-tooltip",{attrs:{title:"分享返现扣款原则,优先扣用户分享返现账户,余额不足则从订单退款中扣除。订单佣金状态=未激活时,扣除订单分享返现冻结金额。订单佣金状态=可提现/提现中/提现成功时,扣除用户分享返现可提现金额,金额不足则从售后退款中扣除。"}},[a("a-icon",{attrs:{type:"exclamation-circle"}})],1)],1),t._v("\n "+t._s(t.currency+t.data.actual_deduct_amount.toFixed(2))+"\n ")]):t._e(),2!==t.data.reward_status?a("detail-list-item",[a("span",{attrs:{slot:"term"},slot:"term"},[t._v("\n 退款扣除分享返现金额\n "),a("a-tooltip",{attrs:{title:"分享返现扣款原则,优先扣用户分享返现账户,余额不足则从订单退款中扣除。订单佣金状态=未激活时,扣除订单分享返现冻结金额。订单佣金状态=可提现/提现中/提现成功时,扣除用户分享返现可提现金额,金额不足则从售后退款中扣除。"}},[a("a-icon",{attrs:{type:"exclamation-circle"}})],1)],1),t._v("\n "+t._s(t.currency+t.data.refund_deduct_amount.toFixed(2))+"\n ")]):t._e()],1),t.data.refund_deduct_amount>0?a("p",{staticStyle:{color:"#F72129"}},[t._v("新建售后单时,该订单产生的分享返现金额已被用户提现,用户可扣除的分享返现金额不足,金额不足的部分在退款中扣除。")]):t._e()],1)])],1)},ft=[],_t=a("fa43"),ht=a("75eb"),yt=a("2af9"),bt=_t["a"].Item,vt={components:{DetailList:_t["a"],DetailListItem:bt,couponInfo:ht["a"],selectCoupon:yt["f"]},props:{currency:{type:String,default:""},editObj:{type:Object,required:!0},data:{type:Object,required:!0}},data:function(){return{form:this.$form.createForm(this),labelCol:{span:4},wrapperCol:{span:16},restitution:1*this.$route.params.site_id!==100,debuct:1*this.$route.params.site_id!==100}},computed:{used_points:function(){return this.data.used_points},customer_points:function(){return this.data.customer_points+this.data.activity_points}},filters:{rewardStatus:function(t){switch(t){case 1:return"未激活";case 2:return"已取消";case 3:return"可提现";case 4:return"提现中";case 5:return"提现成功";case 6:return"退佣成功";default:return"- -"}}},methods:{selectCoupon:function(t){this.$refs.selectCoupon.readyShow(t)},handleSubmit:function(){var t=this,e=this;return new Promise((function(a){var r=e.form.validateFields;r((function(e,r){e||(r.restitution=t.restitution,r.debuct=t.debuct,e=null,a({errs:e,fields:r}))}))}))}},mounted:function(){"rmaEdit"===this.$route.name&&(this.restitution=1===this.editObj.is_return_used_points,this.debuct=1===this.editObj.is_return_customer_points)}},gt=vt,wt=(a("3440"),Object(q["a"])(gt,pt,ft,!1,null,"bc268f00",null)),Ct=wt.exports,qt=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("a-layout-content",{staticClass:"rma-integrate",staticStyle:{marginTop:"16px"}},[a("a-card",[a("div",{attrs:{slot:"title"},slot:"title"},[t._v("\n 积分\n ")]),a("div",{style:{background:"#fff"}},[a("a-form",{staticClass:"custom-form",attrs:{form:t.form},on:{submit:t.handleSubmit}},[a("a-row",{attrs:{gutter:24}},[a("a-col",{attrs:{xs:{span:3}}}),a("a-col",{attrs:{xs:{span:20}}},[a("a-form-item",{attrs:{labelCol:t.labelCol,wrapperCol:{span:24}}},[a("a-checkbox",{attrs:{disabled:100==t.$route.params.site_id},model:{value:t.restitution,callback:function(e){t.restitution=e},expression:"restitution"}},[a("span",[t._v("返还使用积分 ")]),a("a-tooltip",{attrs:{title:"按用户发起的售后商品,把使用的抵扣积分,退还至用户的会员账户。"}},[a("a-icon",{attrs:{type:"exclamation-circle"}})],1),t._v("\n : "+t._s(t.used_points)+"积分\n ")],1),a("a-checkbox",{staticStyle:{"margin-left":"33%"},attrs:{disabled:100==t.$route.params.site_id},model:{value:t.debuct,callback:function(e){t.debuct=e},expression:"debuct"}},[a("span",[t._v("扣除获取积分 ")]),a("a-tooltip",{attrs:{title:"按用户发起的售后商品,扣除订单付款后商品获取的积分(包括获取的普通积分和活动积分)。"}},[a("a-icon",{attrs:{type:"exclamation-circle"}})],1),t._v("\n : "+t._s(t.customer_points)+"积分\n ")],1)],1)],1)],1)],1)],1)])],1)},Ot=[],xt={components:{couponInfo:ht["a"],selectCoupon:yt["f"]},props:{editObj:{type:Object,required:!0},data:{type:Object,required:!0}},data:function(){return{form:this.$form.createForm(this),labelCol:{span:4},wrapperCol:{span:16},restitution:1*this.$route.params.site_id!==100,debuct:1*this.$route.params.site_id!==100}},computed:{used_points:function(){return this.data.used_points},customer_points:function(){return this.data.customer_points+this.data.activity_points}},methods:{selectCoupon:function(t){this.$refs.selectCoupon.readyShow(t)},handleSubmit:function(){var t=this,e=this;return new Promise((function(a){var r=e.form.validateFields;r((function(e,r){e||(r.restitution=t.restitution,r.debuct=t.debuct,e=null,a({errs:e,fields:r}))}))}))}},mounted:function(){"rmaEdit"===this.$route.name&&(this.restitution=1===this.editObj.is_return_used_points,this.debuct=1===this.editObj.is_return_customer_points)}},kt=xt,St=(a("1afe"),Object(q["a"])(kt,qt,Ot,!1,null,"45f400c8",null)),Dt=St.exports,$t=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("a-layout-content",{staticClass:"compensation-coupon",staticStyle:{marginTop:"16px"}},[a("a-card",[a("div",{attrs:{slot:"title"},slot:"title"},[t._v("\n 补偿优惠券\n ")]),a("div",{style:{background:"#fff"}},[a("a-form",{staticClass:"custom-form",attrs:{form:t.form},on:{submit:t.handleSubmit}},[a("a-form-item",{attrs:{labelCol:t.labelCol,wrapperCol:t.wrapperCol,required:t.isRequired,"validate-status":t.validateShareSelectStatus,help:t.validateShareSelectErrorInfo}},[a("span",{staticClass:"name",attrs:{slot:"label"},slot:"label"},[t._v(" 选择优惠券\n "),a("a-tooltip",{attrs:{title:"如果售后方式=仅补偿,则选择优惠券为必选项;如果售后方式为其他,则选择优惠券为非必选"}},[a("a-icon",{attrs:{type:"exclamation-circle"}})],1)],1),a("a-button",{attrs:{disabled:t.isEditDisabled},on:{click:function(e){return t.selectCoupon("offsetCoupon")}}},[t._v("请选择\n ")]),a("coupon-info",{directives:[{name:"show",rawName:"v-show",value:t.offsetCoupon.couponReady,expression:"offsetCoupon.couponReady"}],ref:"offsetCoupon",attrs:{isClose:t.isClose,targetAttr:"offsetCoupon"},on:{couponReadyMethod:t.couponReadyMethod}})],1),a("a-form-item",{attrs:{labelCol:t.labelCol,wrapperCol:t.wrapperCol,label:"补偿张数"}},[a("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["coupon_nums",{initialValue:1,rules:[{required:t.isRequired,message:"请输入补偿张数"}]}],expression:"[\n 'coupon_nums',\n {\n initialValue: 1,\n rules: [{ required: isRequired, message: '请输入补偿张数' }],\n }\n ]"}],staticStyle:{width:"120px"},attrs:{placeholder:"请输入",min:1,max:99,precision:0,disabled:t.isDisabled}}),a("span",{staticClass:"perferentianRule-customRadio-style"},[t._v("张")])],1)],1),t.isSelectCoupon?a("select-coupon",{ref:"selectCoupon",attrs:{requestObj:t.couponRequestObj},on:{triggerSelectCoupon:t.triggerSelectCoupon}}):t._e()],1)])],1)},jt=[],It={components:{couponInfo:ht["a"],selectCoupon:yt["f"]},props:{editObj:{type:Object,required:!0},processType:{type:Number,required:!0}},data:function(){return{form:this.$form.createForm(this),labelCol:{span:3},wrapperCol:{span:16},isDisabled:!0,isEditDisabled:!1,validateShareSelectStatus:"success",validateShareSelectErrorInfo:"",isSelectCoupon:!1,couponRequestObj:{type:20,coupon_type:"random"},offsetCoupon:{couponReady:!1,couponDetail:Object,id:0}}},computed:{isRequired:function(){return!(6!==this.processType)},isClose:function(){return 6!==this.processType}},methods:{selectCoupon:function(t){var e=this;this.isSelectCoupon=!0,this.$nextTick((function(){e.$refs.selectCoupon.readyShow(t)}))},couponReadyMethod:function(t){this[t.targetAttr].couponReady=t.couponInfoReady,this[t.targetAttr].couponDetail=t.couponDetail?t.couponDetail:null,this.isEditDisabled=!1},triggerSelectCoupon:function(t){this[t.targetAttr].id=t.id,this.$refs[t.targetAttr].getCouponDetail(t.id),this.setoffsetCouponStatus()},successCallback:function(t){return this.offsetCoupon.couponReady?(t.coupon_id=Number(this.offsetCoupon.id),t.coupon_value=this.offsetCoupon.couponDetail.value):t={},t},handleSubmit:function(){var t=this,e=this;return new Promise((function(a){var r=e.form.validateFields;r((function(r,s){if(!r){if(!t.verifyCouponSelect())return;s=e.successCallback(s),r=null,a({errs:r,fields:s})}}))}))},setoffsetCouponStatus:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];t?(this.validateShareSelectStatus="success",this.validateShareSelectErrorInfo=""):(this.validateShareSelectStatus="error",this.validateShareSelectErrorInfo="请选择优惠券")},verifyCouponSelect:function(){var t=6!==this.processType||this.offsetCoupon.id;return this.setoffsetCouponStatus(t),t},editSet:function(){var t=this.editObj;this.triggerSelectCoupon({id:t.rule_id,targetAttr:"offsetCoupon"}),this.form.setFieldsValue({coupon_nums:t.nums})},isFieldsTouched:function(){return this.form.isFieldsTouched()||Boolean(this.offsetCoupon.id)}},mounted:function(){"rmaEdit"===this.$route.name&&this.editObj.nums>0&&(this.isEditDisabled=!0,this.editSet())}},Et=It,Tt=(a("8615e"),Object(q["a"])(Et,$t,jt,!1,null,"2cfa1c62",null)),Pt=Tt.exports,Lt=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("a-layout-content",{staticClass:"compensation-coupon",staticStyle:{marginTop:"16px"}},[a("a-card",[a("div",{attrs:{slot:"title"},slot:"title"},[t._v("\n 填写补款信息\n ")]),a("div",{style:{background:"#fff"}},[a("a-form",{staticClass:"custom-form",attrs:{form:t.form},on:{submit:t.handleSubmit}},[a("a-form-item",{attrs:{labelCol:t.labelCol,wrapperCol:t.wrapperCol,label:"客户补款金额"}},[a("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["customer_repayment_amount",{rules:[{required:!0,message:"请输入客户补款金额"}],validateTrigger:"blur"}],expression:"[\n 'customer_repayment_amount',\n {\n rules: [{ required: true, message: '请输入客户补款金额' }],validateTrigger: 'blur'\n }\n ]"}],staticStyle:{width:"368px"},attrs:{placeholder:"请输入",min:.01,max:99999999.99,precision:2}}),a("span",{staticClass:"perferentianRule-customRadio-style"},[t._v("人民币")])],1),a("a-form-item",{attrs:{labelCol:t.labelCol,wrapperCol:t.wrapperCol,label:"客户补款支付方式"}},[a("a-radio-group",{directives:[{name:"decorator",rawName:"v-decorator",value:["customer_repayment_payment_method",{initialValue:1,rules:[{required:!0}]}],expression:"['customer_repayment_payment_method',{initialValue:1, rules: [{ required: true }] }]"}]},[a("a-radio",{attrs:{value:1}},[t._v(" 支付宝 ")]),a("a-radio",{attrs:{value:2}},[t._v(" 微信支付 ")]),a("a-radio",{attrs:{value:3}},[t._v(" 银行卡 ")])],1)],1)],1)],1)])],1)},Rt=[],Nt={components:{couponInfo:ht["a"],selectCoupon:yt["f"]},props:{editObj:{type:Object,required:!0}},data:function(){return{form:this.$form.createForm(this),labelCol:{span:3},wrapperCol:{span:16},isSelectCoupon:!1}},methods:{handleSubmit:function(){var t=this;return new Promise((function(e){var a=t.form.validateFields;a((function(t,a){t||(t=null,e({errs:t,fields:a}))}))}))}},mounted:function(){"rmaEdit"===this.$route.name&&this.form.setFieldsValue({customer_repayment_amount:this.editObj.customer_repayment_amount,customer_repayment_payment_method:this.editObj.customer_repayment_payment_method})}},At=Nt,Ft=(a("8e71"),Object(q["a"])(At,Lt,Rt,!1,null,"2e55a040",null)),Mt=Ft.exports,Vt=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("a-layout-content",[a("a-card",[a("div",{attrs:{slot:"title"},slot:"title"},[t._v("\n 设置退款金额\n ")]),a("a-form",{staticClass:"additional",attrs:{form:t.form},on:{submit:t.handleSubmit}},[a("a-form-item",{attrs:{labelCol:t.labelCol,wrapperCol:t.wrapperCol,required:""}},[a("span",{staticClass:"name",attrs:{slot:"label"},slot:"label"},[t._v(" 退款金额")]),a("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["refund_amount_additional",{rules:[{required:!0,message:"请输入退款金额",pattern:/^(?!(\s+$))/},{validator:function(t,e,a){e<=0&&""!==e?a("退款总金额不能小于等于0"):a(),a()}}],validateTrigger:"blur",initialValue:t.defaultAmount,getValueFromEvent:function(t){return t.target.value.replace(/^\D*(\d*(?:\.\d{0,4})?).*$/g,"$1")}}],expression:"\n [ 'refund_amount_additional', {\n rules: [\n { required: true, message: '请输入退款金额',pattern: /^(?!(\\s+$))/ },\n { validator: (rule, val, callback) => {\n if (val <= 0 && val !=='') {\n callback('退款总金额不能小于等于0');\n } else {\n callback();\n }\n callback();\n }}\n ],\n validateTrigger: 'blur',\n initialValue:defaultAmount,\n getValueFromEvent: event => {\n return event.target.value.replace(/^\\D*(\\d*(?:\\.\\d{0,4})?).*$/g, '$1')\n }\n },\n ]"}],attrs:{prefix:t.symbal,placeholder:"0.00","allow-clear":""},on:{blur:t.setPrice}})],1)],1)],1)],1)},Ut=[],Bt={data:function(){return{form:this.$form.createForm(this),labelCol:{span:3},wrapperCol:{span:8}}},props:{symbal:{type:String,default:""},editObj:{type:Object,required:!0}},computed:{defaultAmount:function(){var t="";return"rmaEdit"===this.$route.name&&(t=this.editObj.refund_amount.toFixed(2)),t}},methods:{setPrice:function(t){var e=this.form.setFieldsValue,a=(1*t.target.value).toFixed(2);setTimeout((function(){e({refund_amount_additional:a})}),0)},handleSubmit:function(){var t=this;return new Promise((function(e){var a=t.form.validateFields;a((function(t,a){t||(t=null,e({errs:t,fields:a}))}))}))}}},Kt=Bt,Jt=Object(q["a"])(Kt,Vt,Ut,!1,null,null,null),zt=Jt.exports;function Wt(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),a.push.apply(a,r)}return a}function Gt(t){for(var e=1;e0&&(1*this.masterData.process_type===1||1*this.masterData.process_type===2||1*this.masterData.process_type===4||1*this.masterData.process_type===5||1*this.masterData.process_type===9)?Yt:Xt},isShowRefund:function(){var t=!(1*this.masterData.process_type!==1&&1*this.masterData.process_type!==2&&1*this.masterData.process_type!==4&&1*this.masterData.process_type!==5&&1*this.masterData.process_type!==9),e=Object(st["e"])(1*this.refundInfo.sum_refund_amount+1*this.totalAmount,2),a=Object(st["e"])(1*this.refundInfo.grand_total,2),r=1*e>1*a;return!!(t&&r||1*this.masterData.process_type===7)||!(!t||2!==this.refundInfo.refund_path)},integralPrice:function(){var t="rmaEdit"===this.$route.name?this.rmaMater.total_points_discount:this.integralData.total_points_discount;return"-"+this.symbal+Object(st["e"])(t,2)},sharePrice:function(){var t="rmaEdit"===this.$route.name?this.rmaMater.refund_deduct_amount:this.integralData.refund_deduct_amount;return"-"+this.symbal+Object(st["e"])(t,2)},totalPrice:function(){var t=this,e=[],a=0;return this.checkedData&&this.checkedData.length&&this.checkedData.map((function(a){if("bundle"!==a.product_type){a.child_products&&a.child_products.length>0&&a.child_products.map((function(t){if(2===t.free_samples){var r=void 0!==t.refund_amount?t.refund_amount:t.base_row_total*(t.qty?t.qty:t.allow_rma_qty);e.push(r)}else{var s=void 0!==t.refund_amount?t.refund_amount:t.base_row_total*(a.qty?a.qty:a.allow_rma_qty);e.push(s)}}));var r=void 0!==a.refund_amount?a.refund_amount:a.base_row_total*(a.qty?a.qty:a.allow_rma_qty);e.push(r)}else a.child_products&&a.child_products.length>0&&a.child_products.map((function(a){if(t.checkedList.indexOf(a.item_id)>-1){var r=a.refund_amount?a.refund_amount:a.base_row_total*(a.qty?a.qty:a.allow_rma_qty);e.push(r)}}))})),e.map((function(t){a+=t})),Object(st["e"])(a,2)},totalFreight:function(){var t=this,e=[],a=0;return this.checkedData&&this.checkedData.length&&this.checkedData.map((function(a){if("bundle"!==a.product_type){a.child_products&&a.child_products.length>0&&a.child_products.map((function(t){if(2===t.free_samples){var r=t.base_shipping_amount*(t.qty?a.qty:t.allow_rma_qty);e.push(r)}else{var s=t.base_shipping_amount*(a.qty?a.qty:a.allow_rma_qty);e.push(s)}}));var r=a.base_shipping_amount*(a.qty?a.qty:a.allow_rma_qty);e.push(r)}else a.child_products&&a.child_products.length>0&&a.child_products.map((function(a){if(t.checkedList.indexOf(a.item_id)>-1){var r=a.base_shipping_amount*(a.qty?a.qty:a.allow_rma_qty);e.push(r)}}))})),e.map((function(t){a+=t})),Object(st["e"])(a,2)},totalTaxes:function(){var t=this,e=[],a=0;return this.checkedData&&this.checkedData.length&&this.checkedData.map((function(a){if("bundle"!==a.product_type){a.child_products&&a.child_products.length>0&&a.child_products.map((function(t){if(2===t.free_samples){var r=t.base_tax_amount*(t.qty?a.qty:t.allow_rma_qty);e.push(r)}else{var s=t.base_tax_amount*(a.qty?a.qty:a.allow_rma_qty);e.push(s)}}));var r=a.base_tax_amount*(a.qty?a.qty:a.allow_rma_qty);e.push(r)}else a.child_products&&a.child_products.length>0&&a.child_products.map((function(a){if(t.checkedList.indexOf(a.item_id)>-1){var r=a.base_tax_amount*(a.qty?a.qty:a.allow_rma_qty);e.push(r)}}))})),e.map((function(t){a+=t})),Object(st["e"])(a,2)},totalAmount:function(){var t=parseFloat(this.totalPriceNew>=0?this.totalPriceNew:this.totalPrice),e="rmaEdit"===this.$route.name?this.rmaMater.total_points_discount:this.integralData.total_points_discount,a="rmaEdit"===this.$route.name?this.rmaMater.refund_deduct_amount:this.integralData.refund_deduct_amount;return this.shipping&&(t+=parseFloat(1*this.totalFreight)),this.tax&&(t+=parseFloat(this.totalTaxes)),t-=e||0,t-=a||0,Object(st["e"])(t,2)}}),data:function(){return{breadList:{current:"新建售后单",loopBread:[{name:"1",title:"工作台",href:"/dashboard"},{name:"2",title:"订单"},{name:"9",title:"售后管理",href:"/order/afterSales/list"},{name:"4",title:"新建售后单"}]},breadListTwo:{current:"编辑售后单",loopBread:[{name:"1",title:"工作台",href:"/dashboard"},{name:"2",title:"订单"},{name:"9",title:"售后管理",href:"/order/afterSales/list"},{name:"4",title:"编辑售后单"}]},form:this.$form.createForm(this),labelCol:{span:4},wrapperCol:{span:16},customWrapperCol:{span:8},refundParams:{},couponParams:{},shipping:!1,tax:!1,priceNum:0,totalPriceNew:"-1"}},methods:{cancel:function(){var t=this;this.$confirm({icon:function(t){return t(f["a"])},title:"数据未提交保存,直接返回上一步将导致数据丢失,确定返回上一步!",onOk:function(){t.$emit("backFirst")},cancelText:"取消",okText:"确定"})},leaveConfirm:function(){var t=this;this.$confirm({icon:function(t){return t(f["a"])},title:"数据未提交保存,直接离开数据将会丢失,确定离开!",onOk:function(){"rmaEdit"===t.$route.name?t.$router.back():t.$router.push({path:"/order/afterSales/list"})},cancelText:"取消",okText:"确定"})},formatDecimal:function(t,e){t=t.toString();var a=t.indexOf(".");return t=-1!==a?t.substring(0,e+a+1):t.substring(0),1*parseFloat(t).toFixed(e)},inputChange:function(t,e){var a=this,r=[],s=0;this.checkedData&&this.checkedData.length&&this.checkedData.map((function(s){if("bundle"!==s.product_type)if(s.child_products&&s.child_products.length>0&&s.child_products.map((function(a){if(a.item_id===t)r.push(1*e);else{var i=s.base_row_total*(s.qty?s.qty:s.allow_rma_qty);void 0!==a.refund_amount&&(i=1*a.refund_amount),r.push(i)}})),s.item_id===t)r.push(1*e);else{var i=s.base_row_total*(s.qty?s.qty:s.allow_rma_qty);void 0!==s.refund_amount&&(i=1*s.refund_amount),r.push(i)}else s.child_products.map((function(s){if(s.item_id===t)r.push(1*e);else if(a.checkedList.indexOf(s.item_id)>-1){var i=s.base_row_total*(s.qty?s.qty:s.allow_rma_qty);void 0!==s.refund_amount&&(i=1*s.refund_amount),r.push(i)}}))})),r.map((function(t){s+=t})),this.totalPriceNew=Object(st["e"])(s,2)},nextStep:function(){var t=this,e=[];this.isShowRefund?(e=[this.$refs.refundInfo.handleSubmit(),this.$refs.compensation.handleSubmit()],1*this.masterData.process_type===7&&e.push(this.$refs.additional.handleSubmit()),1*this.masterData.process_type!==1&&1*this.masterData.process_type!==2&&1*this.masterData.process_type!==4&&1*this.masterData.process_type!==5&&1*this.masterData.process_type!==9||e.push(this.$refs.integrate.handleSubmit())):(1*this.masterData.process_type!==1&&1*this.masterData.process_type!==2&&1*this.masterData.process_type!==4&&1*this.masterData.process_type!==5&&1*this.masterData.process_type!==9||e.push(this.$refs.integrate.handleSubmit()),1*this.masterData.process_type===10?e.push(this.$refs.replenish.handleSubmit()):e.push(this.$refs.compensation.handleSubmit())),e.length?Promise.all(e).then((function(e){var a=Ht(e),r=Qt(e);if(!a.length){if(t.isShowRefund){var s=JSON.parse(JSON.stringify(r.fields));t.$delete(s,"coupon_id"),t.$delete(s,"coupon_nums"),t.$delete(s,"coupon_value"),t.$delete(s,"debuct"),t.$delete(s,"restitution"),t.refundParams=s}r.fields.coupon_id?(t.couponParams.coupon_id=r.fields.coupon_id,t.couponParams.coupon_nums=r.fields.coupon_nums,t.couponParams.coupon_value=r.fields.coupon_value):t.couponParams={},1*t.masterData.process_type===7&&(t.masterData.refund_amount_additional=1*r.fields.refund_amount_additional),1*t.masterData.process_type!==1&&1*t.masterData.process_type!==2&&1*t.masterData.process_type!==4&&1*t.masterData.process_type!==5&&1*t.masterData.process_type!==9||(t.masterData.is_return_used_points=r.fields.restitution?1:2,t.masterData.is_return_customer_points=r.fields.debuct?1:2),1*t.masterData.process_type===10&&(t.masterData.customer_repayment_amount=1*r.fields.customer_repayment_amount,t.masterData.customer_repayment_payment_method=r.fields.customer_repayment_payment_method),t.handleSubmit()}})):this.handleSubmit()},handleSubmit:function(){var t=this,e=[],a={};this.checkedData&&this.checkedData.length&&this.checkedData.map((function(r){if("bundle"!==r.product_type)a="rmaEdit"===t.$route.name?{id:r.id,qty:r.qty?1*r.qty:1*r.allow_rma_qty,qty_ordered:r.qty_ordered,item_id:r.item_id}:{item_id:r.item_id,qty:r.qty?1*r.qty:1*r.allow_rma_qty,qty_ordered:r.qty_ordered},void 0!==r.refund_amount?(a.refund_amount=1*r.refund_amount,e.push(a)):(a.refund_amount=r.base_row_total*(r.qty?r.qty:r.allow_rma_qty),e.push(a)),r.child_products&&r.child_products.length>0&&r.child_products.map((function(a){var s={};s=2===a.free_samples?"rmaEdit"===t.$route.name?{id:a.id,qty:a.qty?a.qty:a.allow_rma_qty,qty_ordered:a.qty_ordered,item_id:a.item_id}:{item_id:a.item_id,qty:a.qty?a.qty:a.allow_rma_qty,qty_ordered:a.qty_ordered}:"rmaEdit"===t.$route.name?{id:a.id,qty:r.qty?1*r.qty:1*r.allow_rma_qty,qty_ordered:r.qty_ordered,item_id:a.item_id}:{item_id:a.item_id,qty:r.qty?1*r.qty:1*r.allow_rma_qty,qty_ordered:r.qty_ordered},void 0!==a.refund_amount?(s.refund_amount=1*a.refund_amount,e.push(s)):(s.refund_amount=2===a.free_samples?a.base_row_total*(a.qty?a.qty:a.allow_rma_qty):a.base_row_total*(r.qty?r.qty:r.allow_rma_qty),e.push(s))}));else if(r.child_products&&r.child_products.length>0){var s={};r.child_products.map((function(a){t.checkedList.indexOf(a.item_id)>-1&&(s="rmaEdit"===t.$route.name?{id:a.id,qty:a.qty?1*a.qty:1*a.allow_rma_qty,item_id:a.item_id,qty_ordered:a.qty_ordered}:{item_id:a.item_id,qty:a.qty?1*a.qty:1*a.allow_rma_qty,qty_ordered:a.qty_ordered},void 0!==a.refund_amount?(s.refund_amount=1*a.refund_amount,e.push(s)):(s.refund_amount=a.base_row_total*(void 0!==a.qty?a.qty:a.allow_rma_qty),e.push(s)))}))}})),this.initData(e)},initData:function(t){var e=this,a=this,r={};1*this.masterData.process_type!==7&&(r.rma_items=t),r.rma_master=this.masterData,r.rma_master.process_type=parseInt(this.masterData.process_type),r.rma_master.package_intercept_status=parseInt(this.masterData.package_intercept_status),r.rma_master.process_type=parseInt(this.masterData.process_type),r.rma_master.increment_id=this.$route.params.increment_id,r.rma_master.is_return_shipping_fee=this.shipping?1:2,r.rma_master.is_return_tax=this.tax?1:2,r.rma_master.shipping_fee=1*this.totalFreight,r.rma_master.tax=1*this.totalTaxes,r.rma_master.goods_refund_amount=1*(this.totalPriceNew>=0?this.totalPriceNew:this.totalPrice),r.rma_master.refund_amount=1*this.totalAmount,r.rma_master.source=2,"{}"!==JSON.stringify(this.refundParams)&&(r.customer_payment_info=this.refundParams),"{}"!==JSON.stringify(this.couponParams)&&(r.coupon_info=this.couponParams),"rmaEdit"===this.$route.name?(r.rma_master.id=1*this.$route.params.rma_id,r.rma_master.updated_by_name=this.$store.getters.userSetting.name,Object(i["k"])(r).then((function(t){var a=t.data;a&&(e.dataSource=a.items,e.$emit("threeStep",a))})).catch((function(t){1*t.status===1041&&a.$warning({okText:"确定",title:"编辑失败!",content:t.message})}))):(r.rma_master.created_by_name=this.$store.getters.userSetting.name,Object(i["a"])(r).then((function(t){var a=t.data;a&&(e.dataSource=a.items,e.$emit("threeStep",a))})))}},created:function(){var t=this;window.scrollTo(0,0);var e=this;this.checkedData&&this.checkedData.length&&this.checkedData.forEach((function(a,r){"rmaEdit"!==t.$route.name&&(void 0!==a.refund_amount&&e.$delete(a,"refund_amount"),a.child_products.length>0&&a.child_products.map((function(t){e.$delete(t,"refund_amount")})))})),this.rmaMater&&1===this.rmaMater.is_return_shipping_fee||this.masterData&&1*this.masterData.process_type===9?this.shipping=!0:this.shipping=!1,this.rmaMater&&1===this.rmaMater.is_return_tax||this.masterData&&1*this.masterData.process_type===9?this.tax=!0:this.tax=!1},mounted:function(){}},te=Zt,ee=(a("83d9"),Object(q["a"])(te,at,rt,!1,null,"46ad442c",null)),ae=ee.exports,re=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("custom-bread",{attrs:{breadList:"rmaEdit"!==t.$route.name?t.breadList:t.breadListTwo}},[t._t("default",[a("rma-step",{attrs:{current:2}})])],2),a("div",{staticClass:"customContent"},[a("a-layout",[a("a-layout-content",{style:{background:"#fff"}},[a("success-page",{attrs:{addReturnInfo:t.addReturnInfo,jumpObject:t.jumpObject}})],1)],1)],1)],1)},se=[],ie=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"module-rmaDetail",staticStyle:{padding:"96px 0"}},[t._m(0),a("div",{staticStyle:{"text-align":"center","margin-bottom":"48px","font-weight":"bold","font-size":"28px",height:"28px","line-height":"28px",color:"#000"}},[t._v("提交成功")]),a("div",{staticClass:"submit-success-content"},[a("a-layout",[a("a-layout-content",[a("a-card",{attrs:{bordered:!1}},[a("detail-list",[a("detail-list-item",{attrs:{term:"售后编号"}},[t._v(t._s(t.addReturnInfo.rma_master.rma_no))]),a("detail-list-item",{attrs:{term:"售后方式"}},[t._v(t._s(t._f("rmaType")(t.addReturnInfo.rma_master.process_type)))]),10!==t.addReturnInfo.rma_master.process_type?a("detail-list-item",{staticClass:"refund_amount",attrs:{term:"退款金额"}},[t._v(t._s(t.addReturnInfo.rma_master.paid_symbol)+t._s(t._f("getFixed")(t.addReturnInfo.rma_master.refund_amount)))]):a("detail-list-item",{staticClass:"refund_amount",attrs:{term:"客户补款金额"}},[t._v("¥"+t._s(t._f("getFixed")(t.addReturnInfo.rma_master.customer_repayment_amount)))])],1)],1)],1)],1)],1),a("div",{staticStyle:{"text-align":"center","padding-top":"24px"}},[a("a-button",{staticStyle:{"margin-right":"12px",background:"#1890ff",color:"#fff","border-color":"#1890ff"},on:{click:t.backList}},[t._v("返回列表")]),a("a-button",{on:{click:t.rmaDetail}},[t._v("查看详情")])],1)])},ne=[function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticStyle:{width:"73px",margin:"0 auto 24px"}},[r("img",{staticStyle:{width:"73px"},attrs:{src:a("072e")}})])}],oe=_t["a"].Item,le={components:{DetailList:_t["a"],DetailListItem:oe},props:{addReturnInfo:{required:!0,type:Object},jumpObject:{required:!0,type:Object}},methods:{backList:function(){var t="".concat(this.jumpObject.list,"?site_id=").concat(this.$store.getters.websiteId);this.$router.push({path:t})},rmaDetail:function(){var t="/order/afterSales/rmaDetail/id/".concat(this.addReturnInfo.rma_master.id,"/websiteId/").concat(this.$store.getters.websiteId);this.$router.push({path:t})}},filters:{filterStatus:function(t){switch(t){case 1:return"新建";case 2:return"待审核";case 3:return"审核通过";case 4:return"审核拒绝";case 5:return"已暂停";case 6:return"活动中";case 7:return"已结束";case 8:return"已作废"}},rmaType:function(t){switch(t){case 0:return"全部";case 1:return"仅退款";case 2:return"退货退款";case 3:return"商品补发";case 4:return"拒收退款";case 5:return"部分取消";case 6:return"仅补偿";case 7:return"附加退款";case 8:return"返利退款";case 9:return"整单取消";case 10:return"客户补款";default:return"- -"}},getFixed:function(t){return(1*t).toFixed(2)}}},de=le,ce=(a("b937"),Object(q["a"])(de,ie,ne,!1,null,"366eff58",null)),ue=ce.exports,me={components:{customBread:c["a"],successPage:ue,rmaStep:W},props:{addReturnInfo:{required:!0,type:Object}},data:function(){return{breadList:{current:"新建售后单",loopBread:[{name:"1",title:"工作台",href:"/dashboard"},{name:"2",title:"订单"},{name:"9",title:"售后管理",href:"/order/afterSales/list"},{name:"4",title:"新建售后单"}]},breadListTwo:{current:"编辑售后单",loopBread:[{name:"1",title:"工作台",href:"/dashboard"},{name:"2",title:"订单"},{name:"9",title:"售后管理",href:"/order/afterSales/list"},{name:"4",title:"编辑售后单"}]},jumpObject:{list:"/order/afterSales/list"}}}},pe=me,fe=Object(q["a"])(pe,re,se,!1,null,null,null),_e=fe.exports,he=a("ac0d"),ye=[{key:"addRma",tab:"售后信息"},{key:"refundRange",tab:"退款金额"}],be={components:{addRma:et,refundRange:ae,successPage:_e},data:function(){return{tabListNoTitle:ye,noTitleKey:"addRma",masterData:"",formId:"",addReturnInfo:{},refundInfo:{},editObj:{},dataSource:[],symbal:"",shippingStatus:"",integralDataSource:{}}},methods:{changePage:function(t){this.masterData=t,this.noTitleKey="refundRange"},backFirst:function(){this.noTitleKey="addRma"},threeStep:function(t){this.addReturnInfo=t,this.noTitleKey="success"},integralObj:function(t){this.integralDataSource=t},goodsData:function(){var t=this,e={increment_id:this.$route.params.increment_id};Object(i["m"])(e).then((function(e){var a=e.data;a&&(t.dataSource=a.items,t.shippingStatus=a.status,t.symbal=a.original_symbol,t.refundInfo.sum_refund_amount=a.sum_refund_amount,t.refundInfo.refund_path=a.refund_path,t.refundInfo.grand_total=a.grand_total,t.refundInfo.address_info=a.address_info,t.refundInfo.customer_points=a.customer_points,t.refundInfo.used_points=a.used_points,t.refundInfo.reward_id=a.reward_id)}))},editData:function(){var t=this,e={id:this.$route.params.rma_id,check:"edit"};Object(i["C"])(e).then((function(e){var a=e.data;a&&(t.editObj=a,t.$store.commit("SET_Rma_CheckedData",a.rma_items),t.symbal=a.rma_master.paid_symbol,t.refundInfo.sum_refund_amount=a.rma_master.sum_refund_amount,t.refundInfo.refund_path=a.rma_master.refund_path,t.refundInfo.grand_total=a.rma_master.grand_total,t.refundInfo.address_info=a.rma_master.return_address_name)}))}},mixins:[he["k"]],mounted:function(){"rmaEdit"!==this.$route.name&&this.$route.params.increment_id?this.goodsData():this.editData()}},ve=be,ge=(a("d36d"),Object(q["a"])(ve,r,s,!1,null,"c714254c",null));e["default"]=ge.exports},"8e71":function(t,e,a){"use strict";a("996e")},"8f8b":function(t,e,a){},"996e":function(t,e,a){},a1b0:function(t,e,a){},b937:function(t,e,a){"use strict";a("02da")},c467:function(t,e,a){},d36d:function(t,e,a){"use strict";a("0e2b")},fab4:function(t,e,a){}}]);