chunk-cdbf138e.64cd804d.js 14 KB

1
  1. (window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-cdbf138e"],{"1f86":function(e,t,r){"use strict";var n=r("30b3");r.n(n).a},"30b3":function(e,t,r){},"61f7":function(e,t,r){"use strict";r.d(t,"a",(function(){return a})),r.d(t,"c",(function(){return s})),r.d(t,"b",(function(){return u}));var n=r("fc11"),o=r("f3f3");function a(e,t){/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(e.getFullYear()+"").substr(4-RegExp.$1.length)));var r,n,o={"M+":e.getMonth()+1,"d+":e.getDate(),"h+":e.getHours(),"m+":e.getMinutes(),"s+":e.getSeconds()};for(r in o)new RegExp("(".concat(r,")")).test(t)&&(n=o[r]+"",t=t.replace(RegExp.$1,1===RegExp.$1.length?n:("00"+n).substr(n.length)));return t}r("ac1f"),r("00b4"),r("5319"),r("4d63"),r("c607"),r("2c3e"),r("25f0"),r("498a"),r("d3b7"),r("b64b"),r("99af");var i={min:"%s最小长度为:min",max:"%s最大长度为:max",length:"%s长度必须为:length",range:"%s长度为:range",pattern:"$s格式错误"};function c(e,t){e.message=function(e){return t.replace("%s",e||"")}}function s(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};return Object(o.a)({required:!0,message:e,type:"string"},t)}function u(e){return f.pattern(/(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/,e)}c(s,"请输入%s"),c(u,"%s格式不正确");var f=Object.keys(i).reduce((function(e,t){return e[t]=function(e){var r=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"",a=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{},i="range"===t?{min:e[0],max:e[1]}:Object(n.a)({},t,e);return Object(o.a)(Object(o.a)({message:r.replace(":".concat(t),"range"===t?"".concat(e[0],"-").concat(e[1]):e),type:"string"},i),a)},c(e[t],i[t]),e}),{})},"8c8a":function(e,t,r){"use strict";r("a4d3"),r("e01a"),r("d3b7"),r("d28b"),r("3ca3"),r("ddb0"),r("b636"),r("944a"),r("0c47"),r("23dc"),r("3410"),r("d9e2"),r("159b"),r("b0c0"),r("131a"),r("fb6a");var n=r("0122"),o=r("c964"),a=(r("a9e3"),r("61f7")),i=r("69ae"),c=r("42e3");function s(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */s=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",u=a.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(t){f=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var a,i,c,s;t=t&&t.prototype instanceof h?t:h,t=Object.create(t.prototype),n=new k(n||[]);return o(t,"_invoke",{value:(a=e,i=r,c=n,s="suspendedStart",function(e,t){if("executing"===s)throw new Error("Generator is already running");if("completed"===s){if("throw"===e)throw t;return O()}for(c.method=e,c.arg=t;;){var r=c.delegate;if(r&&(r=function e(t,r){var n=r.method,o=t.iterator[n];return void 0===o?(r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=void 0,e(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),p):(n=d(o,t.iterator,r.arg),"throw"===n.type?(r.method="throw",r.arg=n.arg,r.delegate=null,p):(o=n.arg,o?o.done?(r[t.resultName]=o.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=void 0),r.delegate=null,p):o:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,p)))}(r,c),r)){if(r===p)continue;return r}if("next"===c.method)c.sent=c._sent=c.arg;else if("throw"===c.method){if("suspendedStart"===s)throw s="completed",c.arg;c.dispatchException(c.arg)}else"return"===c.method&&c.abrupt("return",c.arg);if(s="executing",r=d(a,i,c),"normal"===r.type){if(s=c.done?"completed":"suspendedYield",r.arg===p)continue;return{value:r.arg,done:c.done}}"throw"===r.type&&(s="completed",c.method="throw",c.arg=r.arg)}})}),t}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=l;var p={};function h(){}function v(){}function g(){}a={};var m=(f(a,i,(function(){return this})),Object.getPrototypeOf),y=(m=m&&m(m(I([]))),m&&m!==t&&r.call(m,i)&&(a=m),g.prototype=h.prototype=Object.create(a));function b(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function _(e,t){var a;o(this,"_invoke",{value:function(o,i){function c(){return new t((function(a,c){!function o(a,i,c,s){var u;a=d(e[a],e,i);if("throw"!==a.type)return(i=(u=a.arg).value)&&"object"==Object(n.a)(i)&&r.call(i,"__await")?t.resolve(i.__await).then((function(e){o("next",e,c,s)}),(function(e){o("throw",e,c,s)})):t.resolve(i).then((function(e){u.value=e,c(u)}),(function(e){return o("throw",e,c,s)}));s(a.arg)}(o,i,a,c)}))}return a=a?a.then(c,c):c()}})}function w(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function x(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function k(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function I(e){if(e){var t,n=e[i];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return t=-1,(n=function n(){for(;++t<e.length;)if(r.call(e,t))return n.value=e[t],n.done=!1,n;return n.value=void 0,n.done=!0,n}).next=n}return{next:O}}function O(){return{value:void 0,done:!0}}return o(y,"constructor",{value:v.prototype=g,configurable:!0}),o(g,"constructor",{value:v,configurable:!0}),v.displayName=f(g,u,"GeneratorFunction"),e.isGeneratorFunction=function(e){return e="function"==typeof e&&e.constructor,!!e&&(e===v||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,g):(e.__proto__=g,f(e,u,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},b(_.prototype),f(_.prototype,c,(function(){return this})),e.AsyncIterator=_,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new _(l(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},b(y),f(y,u,"Generator"),f(y,i,(function(){return this})),f(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t,r=Object(e),n=[];for(t in r)n.push(t);return n.reverse(),function e(){for(;n.length;){var t=n.pop();if(t in r)return e.value=t,e.done=!1,e}return e.done=!0,e}},e.values=I,k.prototype={constructor:k,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var o=this.tryEntries.length-1;0<=o;--o){var a=this.tryEntries[o],i=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=r.call(a,"catchLoc"),s=r.call(a,"finallyLoc");if(c&&s){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;0<=n;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}var i=(a=a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc?null:a)?a.completion:{};return i.type=e,i.arg=t,a?(this.method="next",this.next=a.finallyLoc,p):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),p},finish:function(e){for(var t=this.tryEntries.length-1;0<=t;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),x(r),p}},catch:function(e){for(var t=this.tryEntries.length-1;0<=t;--t){var r,n,o=this.tryEntries[t];if(o.tryLoc===e)return"throw"===(r=o.completion).type&&(n=r.arg,x(o)),n}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:I(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),p}},e}var u={name:"PriceChange",components:{},props:{change:Boolean,orderInfo:{type:Object,default:null},status:{type:Number,default:0}},data:function(){return{focus:!1,price:0,refund_price:0,remark:""}},watch:{orderInfo:function(){this.price=this.orderInfo.pay_price,this.refund_price=this.orderInfo.pay_price,this.remark=this.orderInfo.remark}},methods:{priceChange:function(){this.focus=!0},close:function(){this.price=this.orderInfo.pay_price,this.$emit("closeChange",!1)},save:function(){this.savePrice({price:this.price,refund_price:this.refund_price,type:1,remark:this.remark,id:this.orderInfo.id,order_id:this.orderInfo.order_id})},savePrice:function(e){var t=this;return Object(o.a)(s().mark((function r(){var n,o,u,f,l,d;return s().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(n=t,o={},u=e.price,f=e.refund_price,l=n.orderInfo.refund_status,d=e.remark,0==n.status&&0===l)return r.prev=2,r.next=5,t.$validator({price:[Object(a.c)(a.c.message("金额")),Object(a.b)(a.b.message("金额"))]}).validate({price:u});r.next=19;break;case 5:r.next=10;break;case 7:return r.prev=7,r.t0=r.catch(2),r.abrupt("return",Object(i.b)(r.t0));case 10:o.total_price=t.orderInfo.total_price,o.total_postage=t.orderInfo.total_price,o.pay_postage=t.orderInfo.pay_postage,o.gain_integral=t.orderInfo.gain_integral,o.pay_price=e.price,o.order_id=e.order_id,Object(c.f)(e.id,o).then((function(){t.$emit("closechange",!1),n.$dialog.success("改价成功")})).catch((function(e){n.$dialog.error(e.msg)})),r.next=45;break;case 19:if(0==n.status&&1===l)return r.prev=20,r.next=23,t.$validator({refund_price:[Object(a.c)(a.c.message("金额")),Object(a.b)(a.b.message("金额"))]}).validate({refund_price:f});r.next=34;break;case 23:r.next=28;break;case 25:return r.prev=25,r.t1=r.catch(20),r.abrupt("return",Object(i.b)(r.t1));case 28:o.price=e.refund_price,o.type=e.type,o.order_id=e.order_id,Object(c.w)(o).then((function(e){t.$emit("closechange",!1),n.$dialog.success("操作成功")}),(function(e){t.$emit("closechange",!1),n.$dialog.error(e.msg)})),r.next=45;break;case 34:return r.prev=34,r.next=37,t.$validator({remark:[Object(a.c)(a.c.message("备注"))]}).validate({remark:d});case 37:r.next=42;break;case 39:return r.prev=39,r.t2=r.catch(34),r.abrupt("return",Object(i.b)(r.t2));case 42:o.remark=d,o.order_id=e.order_id,Object(c.x)(o).then((function(e){t.$emit("closechange",!1),n.$dialog.success("提交成功")}),(function(e){t.$emit("closechange",!1),n.$dialog.error(e.msg)}));case 45:case"end":return r.stop()}}),r,null,[[2,7],[20,25],[34,39]])})))()},refuse:function(){this.savePrice({price:this.price,refund_price:this.refund_price,type:2,remark:this.remark,id:this.orderInfo.id,order_id:this.orderInfo.order_id})}}};r("1f86"),r=r("2877"),r=Object(r.a)(u,(function(){var e=this,t=e.$createElement;t=e._self._c||t;return t("div",[t("div",{staticClass:"priceChange",class:!0===e.change?"on":""},[t("div",{staticClass:"priceTitle"},[e._v("\n "+e._s(0===e.status?1===e.orderInfo.refund_status?"立即退款":"一键改价":"订单备注")+"\n "),t("span",{staticClass:"iconfontYI icon-guanbi",on:{click:e.close}})]),0===e.status?t("div",{staticClass:"listChange"},[0===e.orderInfo.refund_status?t("div",{staticClass:"item acea-row row-between-wrapper"},[t("div",[e._v("商品总价(¥)")]),t("div",{staticClass:"money"},[e._v(e._s(e.orderInfo.total_price)),t("span",{staticClass:"iconfontYI icon-suozi"})])]):e._e(),0===e.orderInfo.refund_status?t("div",{staticClass:"item acea-row row-between-wrapper"},[t("div",[e._v("原始邮费(¥)")]),t("div",{staticClass:"money"},[e._v(e._s(e.orderInfo.pay_postage)),t("span",{staticClass:"iconfontYI icon-suozi"})])]):e._e(),0===e.orderInfo.refund_status?t("div",{staticClass:"item acea-row row-between-wrapper"},[t("div",[e._v("实际支付(¥)")]),t("div",{staticClass:"money"},[t("input",{directives:[{name:"model",rawName:"v-model",value:e.price,expression:"price"}],class:!0===e.focus?"on":"",attrs:{type:"text"},domProps:{value:e.price},on:{focus:e.priceChange,input:function(t){t.target.composing||(e.price=t.target.value)}}})])]):e._e(),1===e.orderInfo.refund_status?t("div",{staticClass:"item acea-row row-between-wrapper"},[t("div",[e._v("实际支付(¥)")]),t("div",{staticClass:"money"},[e._v(e._s(e.orderInfo.pay_price)),t("span",{staticClass:"iconfontYI icon-suozi"})])]):e._e(),1===e.orderInfo.refund_status?t("div",{staticClass:"item acea-row row-between-wrapper"},[t("div",[e._v("退款金额(¥)")]),t("div",{staticClass:"money"},[t("input",{directives:[{name:"model",rawName:"v-model",value:e.refund_price,expression:"refund_price"}],class:!0===e.focus?"on":"",attrs:{type:"text"},domProps:{value:e.refund_price},on:{focus:e.priceChange,input:function(t){t.target.composing||(e.refund_price=t.target.value)}}})])]):e._e()]):t("div",{staticClass:"listChange"},[t("textarea",{directives:[{name:"model",rawName:"v-model",value:e.remark,expression:"remark"}],attrs:{placeholder:e.orderInfo.remark||"请填写备注信息...",maxlength:"100"},domProps:{value:e.remark},on:{input:function(t){t.target.composing||(e.remark=t.target.value)}}})]),t("div",{staticClass:"modify",on:{click:e.save}},[e._v("\n "+e._s(0===e.orderInfo.refund_status||1===e.status?"立即修改":"确认退款")+"\n ")]),1===e.orderInfo.refund_status&&0===e.status?t("div",{staticClass:"modify1",on:{click:e.refuse}},[e._v("拒绝退款")]):e._e()]),t("div",{directives:[{name:"show",rawName:"v-show",value:!0===e.change,expression:"change === true"}],staticClass:"maskModel",on:{touchmove:function(e){e.preventDefault()}}})])}),[],!1,null,"507a89a8",null);t.a=r.exports}}]);