| 12 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-029af71f"],{"02f4":function(e,t,n){var r=n("4588"),a=n("be13");e.exports=function(e){return function(t,n){var i,c,o=String(a(t)),s=r(n),l=o.length;return s<0||s>=l?e?"":void 0:(i=o.charCodeAt(s),i<55296||i>56319||s+1===l||(c=o.charCodeAt(s+1))<56320||c>57343?e?o.charAt(s):i:e?o.slice(s,s+2):c-56320+(i-55296<<10)+65536)}}},"0390":function(e,t,n){"use strict";var r=n("02f4")(!0);e.exports=function(e,t,n){return t+(n?r(e,t).length:1)}},"0bfb":function(e,t,n){"use strict";var r=n("cb7c");e.exports=function(){var e=r(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t}},"16fc":function(e,t,n){},"214f":function(e,t,n){"use strict";n("b0c5");var r=n("2aba"),a=n("32e9"),i=n("79e5"),c=n("be13"),o=n("2b4c"),s=n("520a"),l=o("species"),u=!i((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")})),d=function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var n="ab".split(e);return 2===n.length&&"a"===n[0]&&"b"===n[1]}();e.exports=function(e,t,n){var f=o(e),h=!i((function(){var t={};return t[f]=function(){return 7},7!=""[e](t)})),p=h?!i((function(){var t=!1,n=/a/;return n.exec=function(){return t=!0,null},"split"===e&&(n.constructor={},n.constructor[l]=function(){return n}),n[f](""),!t})):void 0;if(!h||!p||"replace"===e&&!u||"split"===e&&!d){var m=/./[f],b=n(c,f,""[e],(function(e,t,n,r,a){return t.exec===s?h&&!a?{done:!0,value:m.call(t,n,r)}:{done:!0,value:e.call(n,t,r)}:{done:!1}})),g=b[0],_=b[1];r(String.prototype,e,g),a(RegExp.prototype,f,2==t?function(e,t){return _.call(e,this,t)}:function(e){return _.call(e,this)})}}},"28a5":function(e,t,n){"use strict";var r=n("aae3"),a=n("cb7c"),i=n("ebd6"),c=n("0390"),o=n("9def"),s=n("5f1b"),l=n("520a"),u=n("79e5"),d=Math.min,f=[].push,h="split",p="length",m="lastIndex",b=4294967295,g=!u((function(){RegExp(b,"y")}));n("214f")("split",2,(function(e,t,n,u){var _;return _="c"=="abbc"[h](/(b)*/)[1]||4!="test"[h](/(?:)/,-1)[p]||2!="ab"[h](/(?:ab)*/)[p]||4!="."[h](/(.?)(.?)/)[p]||"."[h](/()()/)[p]>1||""[h](/.?/)[p]?function(e,t){var a=String(this);if(void 0===e&&0===t)return[];if(!r(e))return n.call(a,e,t);var i,c,o,s=[],u=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),d=0,h=void 0===t?b:t>>>0,g=new RegExp(e.source,u+"g");while(i=l.call(g,a)){if(c=g[m],c>d&&(s.push(a.slice(d,i.index)),i[p]>1&&i.index<a[p]&&f.apply(s,i.slice(1)),o=i[0][p],d=c,s[p]>=h))break;g[m]===i.index&&g[m]++}return d===a[p]?!o&&g.test("")||s.push(""):s.push(a.slice(d)),s[p]>h?s.slice(0,h):s}:"0"[h](void 0,0)[p]?function(e,t){return void 0===e&&0===t?[]:n.call(this,e,t)}:n,[function(n,r){var a=e(this),i=void 0==n?void 0:n[t];return void 0!==i?i.call(n,a,r):_.call(String(a),n,r)},function(e,t){var r=u(_,e,this,t,_!==n);if(r.done)return r.value;var l=a(e),f=String(this),h=i(l,RegExp),p=l.unicode,m=(l.ignoreCase?"i":"")+(l.multiline?"m":"")+(l.unicode?"u":"")+(g?"y":"g"),v=new h(g?l:"^(?:"+l.source+")",m),y=void 0===t?b:t>>>0;if(0===y)return[];if(0===f.length)return null===s(v,f)?[f]:[];var x=0,k=0,O=[];while(k<f.length){v.lastIndex=g?k:0;var S,C=s(v,g?f:f.slice(k));if(null===C||(S=d(o(v.lastIndex+(g?0:k)),f.length))===x)k=c(f,k,p);else{if(O.push(f.slice(x,k)),O.length===y)return O;for(var w=1;w<=C.length-1;w++)if(O.push(C[w]),O.length===y)return O;k=x=S}}return O.push(f.slice(x)),O}]}))},3791:function(e,t,n){},"3a10":function(e,t,n){"use strict";n.d(t,"b",(function(){return a})),n.d(t,"i",(function(){return i})),n.d(t,"e",(function(){return c})),n.d(t,"h",(function(){return o})),n.d(t,"d",(function(){return s})),n.d(t,"j",(function(){return l})),n.d(t,"m",(function(){return u})),n.d(t,"f",(function(){return d})),n.d(t,"k",(function(){return f})),n.d(t,"c",(function(){return h})),n.d(t,"l",(function(){return p})),n.d(t,"g",(function(){return m})),n.d(t,"a",(function(){return b}));var r=n("a27e"),a=function(e){return Object(r["a"])({method:"POST",url:"/api.php/api/order/fetchByCustomerId",data:e})},i=function(e){return Object(r["a"])({method:"POST",url:"/api.php/api/user/performance",data:e})},c=function(e){return Object(r["a"])({method:"POST",url:"/api.php/api/order/fetch",data:e})},o=function(e){return Object(r["a"])({method:"POST",url:"/api.php/api/order/findOrderByOrderId",data:e})},s=function(e){return Object(r["a"])({method:"POST",url:"/api.php/api/order/fetchOrderProducts",data:e})},l=function(e){return Object(r["a"])({method:"POST",url:"/api.php/api/order/payment?lang=en-us",data:e})},u=function(e){var t=e.order_product_id,n=e.report;return Object(r["a"])({method:"POST",url:"/api.php/api/order/upload_numerology?lang=en-us",data:{order_product_id:t,report:n}})},d=function(e){return Object(r["a"])({method:"POST",url:"/api.php/api/order/fetchWaitGatherAnnualFee?lang=en-us",data:e})},f=function(e){return Object(r["a"])({method:"POST",url:"/api.php/api/order/paymentAnnualFee?lang=en-us",data:e})},h=function(e){return Object(r["a"])({method:"POST",url:"/api.php/api/order/fetchOrderByReturn?lang=en-us",data:e})},p=function(e){return Object(r["a"])({method:"POST",url:"/api.php/api/order/returnOrderProduct?lang=en-us",data:e})},m=function(e){return Object(r["a"])({method:"POST",url:"/api.php/api/order/findByOrderNo?lang=en-us",data:e})},b=function(e){return Object(r["a"])({method:"POST",url:"/api.php/api/order/exchange?lang=en-us",data:e})}},"456d":function(e,t,n){var r=n("4bf8"),a=n("0d58");n("5eda")("keys",(function(){return function(e){return a(r(e))}}))},"520a":function(e,t,n){"use strict";var r=n("0bfb"),a=RegExp.prototype.exec,i=String.prototype.replace,c=a,o="lastIndex",s=function(){var e=/a/,t=/b*/g;return a.call(e,"a"),a.call(t,"a"),0!==e[o]||0!==t[o]}(),l=void 0!==/()??/.exec("")[1],u=s||l;u&&(c=function(e){var t,n,c,u,d=this;return l&&(n=new RegExp("^"+d.source+"$(?!\\s)",r.call(d))),s&&(t=d[o]),c=a.call(d,e),s&&c&&(d[o]=d.global?c.index+c[0].length:t),l&&c&&c.length>1&&i.call(c[0],n,(function(){for(u=1;u<arguments.length-2;u++)void 0===arguments[u]&&(c[u]=void 0)})),c}),e.exports=c},"5f1b":function(e,t,n){"use strict";var r=n("23c6"),a=RegExp.prototype.exec;e.exports=function(e,t){var n=e.exec;if("function"===typeof n){var i=n.call(e,t);if("object"!==typeof i)throw new TypeError("RegExp exec method returned something other than an Object or null");return i}if("RegExp"!==r(e))throw new TypeError("RegExp#exec called on incompatible receiver");return a.call(e,t)}},"7f7f":function(e,t,n){var r=n("86cc").f,a=Function.prototype,i=/^\s*function ([^ (]*)/,c="name";c in a||n("9e1e")&&r(a,c,{configurable:!0,get:function(){try{return(""+this).match(i)[1]}catch(e){return""}}})},"8e6e":function(e,t,n){var r=n("5ca1"),a=n("990b"),i=n("6821"),c=n("11e9"),o=n("f1ae");r(r.S,"Object",{getOwnPropertyDescriptors:function(e){var t,n,r=i(e),s=c.f,l=a(r),u={},d=0;while(l.length>d)n=s(r,t=l[d++]),void 0!==n&&o(u,t,n);return u}})},"990b":function(e,t,n){var r=n("9093"),a=n("2621"),i=n("cb7c"),c=n("7726").Reflect;e.exports=c&&c.ownKeys||function(e){var t=r.f(i(e)),n=a.f;return n?t.concat(n(e)):t}},a618:function(e,t,n){"use strict";n("16fc")},a978:function(e,t,n){"use strict";n("3791")},aae3:function(e,t,n){var r=n("d3f4"),a=n("2d95"),i=n("2b4c")("match");e.exports=function(e){var t;return r(e)&&(void 0!==(t=e[i])?!!t:"RegExp"==a(e))}},ac6a:function(e,t,n){for(var r=n("cadf"),a=n("0d58"),i=n("2aba"),c=n("7726"),o=n("32e9"),s=n("84f2"),l=n("2b4c"),u=l("iterator"),d=l("toStringTag"),f=s.Array,h={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},p=a(h),m=0;m<p.length;m++){var b,g=p[m],_=h[g],v=c[g],y=v&&v.prototype;if(y&&(y[u]||o(y,u,f),y[d]||o(y,d,g),s[g]=f,_))for(b in r)y[b]||i(y,b,r[b],!0)}},ade3:function(e,t,n){"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function a(e,t){if("object"!==r(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var a=n.call(e,t||"default");if("object"!==r(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function i(e){var t=a(e,"string");return"symbol"===r(t)?t:String(t)}function c(e,t,n){return t=i(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.d(t,"a",(function(){return c}))},b0c5:function(e,t,n){"use strict";var r=n("520a");n("5ca1")({target:"RegExp",proto:!0,forced:r!==/./.exec},{exec:r})},cddd:function(e,t,n){"use strict";n.r(t);n("7f7f");var r=function(){var e=this,t=e._self._c;return t("div",[t("el-container",{staticClass:"layout-main"},[t("statusBarIndex"),t("div",{staticClass:"payment_top"},[t("div",{staticClass:"title"},[t("div",{staticClass:"xian"}),t("div",{staticClass:"text"},[e._v("请选择收款方式")]),t("div",{staticClass:"xian"})]),t("div",{staticClass:"money"},[e._l(e.allChannels,(function(n,r){return t("div",{key:n.id,staticClass:"money_box color"},[t("div",{staticClass:"img",on:{click:function(t){return e.channelFuns(n)}}},[t("img",{staticClass:"c img1",attrs:{src:"http://127.0.0.1:8001"+n.icon}})]),t("p",{staticClass:"c",on:{click:function(t){return e.channelFuns(n)}}},[e._v(e._s(n.name))])])})),t("div",{staticClass:"money_box"}),t("div",{staticClass:"money_box"}),t("div",{staticClass:"money_box"}),t("div",{staticClass:"money_box"})],2)]),t("div",{staticClass:"payment_bottom"},[t("div",{staticClass:"left"},[t("p",[e._v("应收金额:$"+e._s(e.receivable_amount)+" ( 商品价格:$"+e._s(e.order.product_amount)+" + 消费税:$"+e._s(e.order.total_sales_tax)+" + 年费:$"+e._s(e.order.total_annual_fee)+" + 信用卡支付手续费:$"+e._s(e.order.service_charge_amount)+" - 御龙币数量:"+e._s(e.order.zue_coin)+" 御龙币抵扣费用:"+e._s(e.order.zue_coin_amount)+" )")]),t("p",[e._v("实收金额:$"+e._s(e.receive_amount)+" ( "+e._s(e.receive_amount_describe.join(" + "))+" )")]),t("p",[e._v("待收金额:$"+e._s(e.imposed_amount))]),t("div",{staticClass:"textarea"},[t("div",[e._v("备注")]),t("el-input",{attrs:{type:"textarea",rows:2,placeholder:"请输入内容"},model:{value:e.remarks,callback:function(t){e.remarks=t},expression:"remarks"}})],1)])]),t("div",{staticClass:"btn"},[t("el-button",{on:{click:e.payment}},[e._v("付款完成")])],1),t("dialogBox",{ref:"channelDialog",attrs:{dialogVisible:e.dialogVisible,title:e.title},on:{channel:e.channel,btnOk:e.btnOk,close:function(t){e.dialogVisible=t}}})],1)],1)},a=[],i=(n("96cf"),n("1da1")),c=function(){var e=this,t=e._self._c;return t("el-dialog",{attrs:{title:e.title,visible:e.dialogVisible,"before-close":e.handleCancle,width:"30%"},on:{"update:visible":function(t){e.dialogVisible=t}}},[t("el-form",{ref:"form",attrs:{model:e.form,"label-width":"80px"}},["Visa"===e.title?t("div",{staticStyle:{"margin-left":"20px"}},[t("el-tabs",{attrs:{type:"card"},on:{"tab-click":e.handleClick},model:{value:e.tab_1,callback:function(t){e.tab_1=t},expression:"tab_1"}},[t("el-tab-pane",{attrs:{label:"一次性付款",name:"first",isTop:"1"}},[t("div",{staticStyle:{"margin-top":"10px","margin-bottom":"20px"}},[t("el-tabs",{attrs:{type:"card"},on:{"tab-click":e.handleClick},model:{value:e.tab_2,callback:function(t){e.tab_2=t},expression:"tab_2"}},e._l(e.config.relation.disposables,(function(n){return t("el-tab-pane",{key:n.id,attrs:{label:n.bank,name:n.bank+"1","data-id":n.id}},[t("div",[t("el-form-item",{attrs:{label:"金额:",prop:"money"}},[t("el-input",{attrs:{placeholder:"请输入金额"},model:{value:e.channel.credit_card.fee,callback:function(t){e.$set(e.channel.credit_card,"fee",t)},expression:"channel.credit_card.fee"}})],1),e.config.is_upload_code?t("el-form-item",{attrs:{label:"编码:",prop:"code"}},[t("el-input",{attrs:{placeholder:"请输入编码"},model:{value:e.channel.credit_card.code,callback:function(t){e.$set(e.channel.credit_card,"code",t)},expression:"channel.credit_card.code"}})],1):e._e()],1)])})),1)],1)]),t("el-tab-pane",{attrs:{label:"分期付款",name:"second",isTop:"1"}},[t("div",{staticStyle:{"margin-top":"10px","margin-bottom":"20px"}},[t("el-radio-group",{attrs:{size:"medium"}},[t("el-tabs",{attrs:{type:"card"},on:{"tab-click":e.handleClick},model:{value:e.tab_2,callback:function(t){e.tab_2=t},expression:"tab_2"}},e._l(e.config.relation.stages,(function(n){return t("el-tab-pane",{key:n.id,attrs:{label:n.bank,name:n.bank,"data-id":n.id}},[t("div",[t("el-form-item",{attrs:{label:"金额:",prop:"money"}},[t("el-input",{attrs:{placeholder:"请输入金额"},model:{value:e.channel.credit_card.fee,callback:function(t){e.$set(e.channel.credit_card,"fee",t)},expression:"channel.credit_card.fee"}})],1),e.config.is_upload_code?t("el-form-item",{attrs:{label:"编码:",prop:"code"}},[t("el-input",{attrs:{placeholder:"请输入编码"},model:{value:e.channel.credit_card.code,callback:function(t){e.$set(e.channel.credit_card,"code",t)},expression:"channel.credit_card.code"}})],1):e._e(),t("el-form-item",{attrs:{label:"期数:",prop:"select"}},[t("el-select",{attrs:{placeholder:"请选择"},model:{value:e.channel.credit_card.stage,callback:function(t){e.$set(e.channel.credit_card,"stage",t)},expression:"channel.credit_card.stage"}},e._l(n.periods,(function(e){return t("el-option",{key:"stage"+e.nper,attrs:{label:"".concat(e.nper,"期 手续费比例: ").concat(e.service_charge_rate,"%"),value:e.nper+"&"+e.service_charge_rate}})})),1)],1)],1)])})),1)],1)],1)])],1)],1):e._e(),"DINERS"===e.title?t("div",[t("el-tabs",{attrs:{type:"card"},on:{"tab-click":e.handleClick},model:{value:e.tab_4,callback:function(t){e.tab_4=t},expression:"tab_4"}},[1===e.config.relation.disposables.length?t("el-tab-pane",{attrs:{"data-id":e.config.relation.disposables[0].id,label:"一次性付款",name:e.config.relation.disposables[0].bank}},[t("el-form-item",{attrs:{label:"金额:",prop:"money"}},[t("el-input",{attrs:{placeholder:"请输入金额"},model:{value:e.channel.credit_card.fee,callback:function(t){e.$set(e.channel.credit_card,"fee",t)},expression:"channel.credit_card.fee"}})],1),e.config.is_upload_code?t("el-form-item",{attrs:{label:"编码:",prop:"code"}},[t("el-input",{attrs:{placeholder:"请输入编码"},model:{value:e.channel.credit_card.code,callback:function(t){e.$set(e.channel.credit_card,"code",t)},expression:"channel.credit_card.code"}})],1):e._e()],1):e._e(),1===e.config.relation.stages.length?t("el-tab-pane",{attrs:{"data-id":e.config.relation.stages[0].id,label:"分期付款",name:"second"}},[t("el-form-item",{attrs:{label:"金额:",prop:"money"}},[t("el-input",{attrs:{placeholder:"请输入金额"},model:{value:e.channel.credit_card.fee,callback:function(t){e.$set(e.channel.credit_card,"fee",t)},expression:"channel.credit_card.fee"}})],1),t("el-form-item",{attrs:{label:"编码:",prop:"code"}},[t("el-input",{attrs:{placeholder:"请输入编码"},model:{value:e.channel.credit_card.code,callback:function(t){e.$set(e.channel.credit_card,"code",t)},expression:"channel.credit_card.code"}})],1),t("el-form-item",{attrs:{label:"期数:",prop:"select"}},[t("el-select",{attrs:{placeholder:"请选择"},model:{value:e.channel.credit_card.stage,callback:function(t){e.$set(e.channel.credit_card,"stage",t)},expression:"channel.credit_card.stage"}},e._l(e.config.relation.stages[0].periods,(function(e){return t("el-option",{key:"stage"+e.nper,attrs:{label:"".concat(e.nper,"期 手续费比例: ").concat(e.service_charge_rate,"%"),value:e.nper+"&"+e.service_charge_rate}})})),1)],1)],1):e._e()],1)],1):e._e(),1==e.config.type||2==e.config.type?t("el-form-item",{attrs:{label:"金额:",prop:"money"}},[t("el-input",{attrs:{placeholder:"请输入金额"},model:{value:e.channel.fee,callback:function(t){e.$set(e.channel,"fee",t)},expression:"channel.fee"}})],1):e._e(),1!=e.config.type&&2!=e.config.type||!e.config.is_upload_code?e._e():t("el-form-item",{attrs:{label:"编码:",prop:"code"}},[t("el-input",{attrs:{placeholder:"请输入编码"},model:{value:e.channel.code,callback:function(t){e.$set(e.channel,"code",t)},expression:"channel.code"}})],1)],1),t("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[t("el-button",{on:{click:e.close}},[e._v("取 消")]),t("el-button",{attrs:{type:"primary"},on:{click:e.btnOk}},[e._v("确 定")])],1)],1)},o=[],s=(n("8e6e"),n("ac6a"),n("456d"),n("ade3"));n("28a5");function l(e){if(Array.isArray(e))return e}function u(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,i,c,o=[],s=!0,l=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=i.call(n)).done)&&(o.push(r.value),o.length!==t);s=!0);}catch(u){l=!0,a=u}finally{try{if(!s&&null!=n["return"]&&(c=n["return"](),Object(c)!==c))return}finally{if(l)throw a}}return o}}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function f(e,t){if(e){if("string"===typeof e)return d(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?d(e,t):void 0}}function h(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function p(e,t){return l(e)||u(e,t)||f(e,t)||h()}n("c5f6"),n("ee1d");function m(e){return Math.round(100*Number(e))/100}var b=n("3a10");function g(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function _(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?g(Object(n),!0).forEach((function(t){Object(s["a"])(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):g(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var v={props:{dialogVisible:{type:Boolean,required:!0},title:{type:String,default:null}},data:function(){return{tab_1:"visa",tab_2:"visa_2",tab_4:"diners_4",rules:{money:[{required:!0,message:"请输入金额",trigger:"blur"}],code:[{required:!0,message:"请输入编码",trigger:"blur"}],select:[{required:!0,message:"请选择月份",trigger:"blur"}]},form:{},config:{id:1,name:"Cash",index:0,type:1,is_upload_code:0,credit_card_config:[]},channel:{}}},created:function(){},methods:{setChannelConfig:function(e){this.config=e,this.channel={channel_id:e.id,fee:0,code:void 0,credit_card:{credit_card_id:void 0,fee:0,type:e.type,code:void 0,stage:void 0,stage_num:void 0,service_charge_rate:0,service_charge:0}},1==e.type?this.channel.fee=e.max_imposed_amount:2==e.type?this.channel.fee=e.max_zue_coin:3==e.type&&(this.channel.credit_card.fee=e.max_imposed_amount)},btnOk:function(){var e=this,t=3==this.config.type?m(this.channel.credit_card.fee):m(this.channel.fee);if(Number.isNaN(t)||0===t)return this.$message({message:"请填写金额",type:"warning"}),!1;if(1==this.config.type){if(t>this.config.max_imposed_amount)return this.$message({message:"订单剩余应收金额为: ".concat(this.config.max_imposed_amount),type:"warning"}),!1;this.channel.fee=t}else if(2==this.config.type){if(t>this.config.max_zue_coin)return this.$message({message:"Zue Coin 剩余报销数量为: ".concat(this.config.max_zue_coin),type:"warning"}),!1;this.channel.zue_coin=t,this.channel.zue_coin_amount=this.channel.zue_coin*this.config.zue_coin_exchange_rate}else if(3==this.config.type&&(this.channel.credit_card.fee=m(this.channel.credit_card.fee),this.channel.credit_card.stage)){var n=this.channel.credit_card.stage.split("&").map(Number),r=p(n,2),a=r[0],i=r[1];this.channel.credit_card.stage_num=a,this.channel.credit_card.service_charge_rate=i,this.channel.credit_card.service_charge=m(m(this.channel.credit_card.fee)*(i/100))}return this.channel=_(_({},this.channel),this.config),Object(b["j"])({order_id:this.config.order_id,remarks:this.config.remarks,channels:JSON.stringify([{channel_id:this.channel.channel_id,type:this.config.type,fee:this.channel.fee,code:this.channel.code,credit_card:[this.channel.credit_card]}])}).then((function(t){200===t.data.code?(e.$emit("channel",e.channel),e.$emit("close",!1)):e.$message({message:t.data.message,type:"warning"})})).catch((function(){e.$message({message:"支付错误!",type:"error"})})),!1},close:function(){this.$emit("close",!1)},handleCancle:function(){this.$emit("close",!1)},handleClick:function(e){e.$attrs["isTop"]||(this.channel.credit_card.credit_card_id=e.$attrs["data-id"]),this.channel.credit_card.fee=0,this.channel.credit_card.code=void 0,this.channel.credit_card.stage=void 0,this.channel.credit_card.stage_num=void 0,this.channel.credit_card.service_charge_rate=0,this.channel.credit_card.service_charge=0}}},y=v,x=(n("a618"),n("2877")),k=Object(x["a"])(y,c,o,!1,null,"140f9f8b",null),O=k.exports,S=n("a27e"),C=function(e){return Object(S["a"])({method:"POST",url:"/api.php/api/payment/channels",data:e})},w={name:"paymentIndex",data:function(){return{title:null,dialogVisible:!1,order:{},allChannels:[],receivable_amount:0,receive_amount:0,imposed_amount:0,receive_amount_describe:[],remarks:void 0}},components:{dialogBox:O},created:function(){this.fetchChannels(),this.findOrder()},methods:{fetchChannels:function(){var e=Object(i["a"])(regeneratorRuntime.mark((function e(){var t;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,C({});case 2:if(t=e.sent,200!==t.data.code){e.next=7;break}this.allChannels=t.data.data,e.next=9;break;case 7:return this.$message({message:t.data.message,type:"error"}),e.abrupt("return",!1);case 9:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}(),findOrder:function(){var e=Object(i["a"])(regeneratorRuntime.mark((function e(){var t,n,r,a;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(t=this.$route.query.orderId,t){e.next=4;break}return this.$message({message:"订单ID不存在!",type:"error"}),e.abrupt("return",!1);case 4:return e.next=6,Object(b["h"])({order_id:t});case 6:if(n=e.sent,200!==n.data.code){e.next=17;break}r=n.data.data,this.order=r,this.receivable_amount=r.receivable_amount,this.receive_amount=r.receive_amount,this.imposed_amount=r.imposed_amount,a=r.payments,this.receive_amount_describe=a.map((function(e){return"[".concat(e.channel_name,"]:$").concat(e.fee)})),e.next=19;break;case 17:return this.$message({message:n.data.message,type:"error"}),e.abrupt("return",!1);case 19:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}(),channel:function(e){this.findOrder()},payment:function(){var e=this;0!=this.imposed_amount?this.$confirm("当前实收金额小于应收金额,该操作会转为定金订单, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){e.$route.query.callback?(e.$message.success("付款成功!"),e.$router.push(decodeURIComponent(e.$route.query.callback))):(e.$message({type:"success",message:"转为定金订单成功!",duration:2e3}),e.$router.push("/home"))})).catch((function(){e.$message({type:"info",message:"已取消转为定金订单",duration:2e3})})):(this.$message({type:"success",message:"付款成功"}),window.localStorage.removeItem("price"),this.$router.push("/home"))},channelFuns:function(e){if(e.max_imposed_amount=this.imposed_amount,e.order_id=this.order.id,e.order_remarks=this.remarks,2===e.type){var t=e.zue_coin_exchange_rate,n=e.zue_coin_consume_rate,r=0;if(this.receivable_amount>0&&n>0&&t>0){var a=m(this.receivable_amount*(n/100)),i=a-this.order.zue_coin_amount;i>0&&(r=i>this.imposed_amount?this.imposed_amount:i)}e.max_zue_coin=m(r/t),e.max_zue_coin_consume_amount=r}switch(this.$refs.channelDialog.setChannelConfig(e),e.index){case 0:this.Cash();break;case 1:this.NETS();break;case 2:this.Cheque();break;case 3:this.Visa();break;case 4:this.Voucher();break;case 5:this.AMEX();break;case 6:this.DINERS();break;case 7:this.FAVE();break;case 8:this.Paynow();break;case 9:this.Stripe();break;case 10:this.Zue();break}},Cash:function(){this.title="Cash",this.dialogVisible=!0},NETS:function(){this.title="NETS",this.dialogVisible=!0},Cheque:function(){this.title="Cheque",this.dialogVisible=!0},Visa:function(){this.title="Visa",this.dialogVisible=!0},Voucher:function(){this.title="Voucher",this.dialogVisible=!0},AMEX:function(){this.title="AMEX",this.dialogVisible=!0},DINERS:function(){this.title="DINERS",this.dialogVisible=!0},FAVE:function(){this.title="FAVE",this.dialogVisible=!0},Paynow:function(){this.title="Paynow",this.dialogVisible=!0},Stripe:function(){this.title="Stripe",this.dialogVisible=!0},Zue:function(){this.title="Zue",this.dialogVisible=!0},btnOk:function(){}}},$=w,j=(n("a978"),Object(x["a"])($,r,a,!1,null,"9125cd3e",null));t["default"]=j.exports},ee1d:function(e,t,n){var r=n("5ca1");r(r.S,"Number",{isNaN:function(e){return e!=e}})},f1ae:function(e,t,n){"use strict";var r=n("86cc"),a=n("4630");e.exports=function(e,t,n){t in e?r.f(e,t,a(0,n)):e[t]=n}}}]);
- //# sourceMappingURL=chunk-029af71f.4008ec25.js.map
|