You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 lines
16 KiB
1 lines
16 KiB
(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-5f81ea2e"],{"0fc4":function(t,e,r){"use strict";r.d(e,"a",(function(){return o})),r.d(e,"c",(function(){return i})),r.d(e,"b",(function(){return a}));var n=r("b6bd");function o(){return Object(n.a)({url:"erp/config",method:"get"})}function i(t){return Object(n.a)({url:"store/erp/shop",method:"get",params:t})}function a(t){return Object(n.a)({url:"product/import_erp_product",method:"post",data:t})}},"2b79a":function(t,e,r){},"61f7":function(t,e,r){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function o(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function i(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?o(Object(r),!0).forEach((function(e){a(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function a(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=n(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var o=r.call(t,e||"default");if("object"!=n(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==n(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function c(t,e){/(y+)/.test(e)&&(e=e.replace(RegExp.$1,(t.getFullYear()+"").substr(4-RegExp.$1.length)));var r={"M+":t.getMonth()+1,"d+":t.getDate(),"h+":t.getHours(),"m+":t.getMinutes(),"s+":t.getSeconds()};for(var n in r)if(new RegExp("(".concat(n,")")).test(e)){var o=r[n]+"";e=e.replace(RegExp.$1,1===RegExp.$1.length?o:s(o))}return e}function s(t){return("00"+t).substr(t.length)}r.d(e,"a",(function(){return c})),r.d(e,"c",(function(){return l})),r.d(e,"b",(function(){return p}));var u={min:"%s最小长度为:min",max:"%s最大长度为:max",length:"%s长度必须为:length",range:"%s长度为:range",pattern:"$s格式错误"},f=function(t,e){t.message=function(t){return e.replace("%s",t||"")}};function l(t){return i({required:!0,message:t,type:"string"},arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})}function p(t){return h.pattern(/(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/,t)}f(l,"请输入%s"),f(p,"%s格式不正确");var h=Object.keys(u).reduce((function(t,e){return t[e]=function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o="range"===e?{min:t[0],max:t[1]}:a({},e,t);return i(i({message:r.replace(":".concat(e),"range"===e?"".concat(t[0],"-").concat(t[1]):t),type:"string"},o),n)},f(t[e],u[e]),t}),{})},"8c8a":function(t,e,r){"use strict";var n=r("61f7"),o=r("69ae"),i=r("42e3");function a(t){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function c(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */c=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},s=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",f=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function p(t,e,r,n){var i=e&&e.prototype instanceof b?e:b,a=Object.create(i.prototype),c=new S(n||[]);return o(a,"_invoke",{value:C(t,r,c)}),a}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=p;var d="suspendedStart",v="suspendedYield",m="executing",g="completed",y={};function b(){}function w(){}function _(){}var x={};l(x,s,(function(){return this}));var O=Object.getPrototypeOf,k=O&&O(O(N([])));k&&k!==r&&n.call(k,s)&&(x=k);var j=_.prototype=b.prototype=Object.create(x);function I(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,e){function r(o,i,c,s){var u=h(t[o],t,i);if("throw"!==u.type){var f=u.arg,l=f.value;return l&&"object"==a(l)&&n.call(l,"__await")?e.resolve(l.__await).then((function(t){r("next",t,c,s)}),(function(t){r("throw",t,c,s)})):e.resolve(l).then((function(t){f.value=t,c(f)}),(function(t){return r("throw",t,c,s)}))}s(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function C(e,r,n){var o=d;return function(i,a){if(o===m)throw Error("Generator is already running");if(o===g){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var s=L(c,n);if(s){if(s===y)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===d)throw o=g,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=m;var u=h(e,r,n);if("normal"===u.type){if(o=n.done?g:v,u.arg===y)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(o=g,n.method="throw",n.arg=u.arg)}}}function L(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,L(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var i=h(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,y;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,y):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function P(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function $(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function S(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(P,this),this.reset(!0)}function N(e){if(e||""===e){var r=e[s];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(a(e)+" is not iterable")}return w.prototype=_,o(j,"constructor",{value:_,configurable:!0}),o(_,"constructor",{value:w,configurable:!0}),w.displayName=l(_,f,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,_):(t.__proto__=_,l(t,f,"GeneratorFunction")),t.prototype=Object.create(j),t},e.awrap=function(t){return{__await:t}},I(E.prototype),l(E.prototype,u,(function(){return this})),e.AsyncIterator=E,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new E(p(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},I(j),l(j,f,"Generator"),l(j,s,(function(){return this})),l(j,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=N,S.prototype={constructor:S,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach($),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var s=n.call(a,"catchLoc"),u=n.call(a,"finallyLoc");if(s&&u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,y):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),y},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),$(r),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;$(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:N(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y}},e}function s(t,e,r,n,o,i,a){try{var c=t[i](a),s=c.value}catch(t){return void r(t)}c.done?e(s):Promise.resolve(s).then(n,o)}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(){var t,e=(t=c().mark((function t(e){var r,a,s,u,f,l=this;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=this,a={},s=e.price,u=e.refund_price,r.orderInfo.refund_status,f=e.remark,0!=r.status){t.next=19;break}return t.prev=2,t.next=5,this.$validator({price:[Object(n.c)(n.c.message("金额")),Object(n.b)(n.b.message("金额"))]}).validate({price:s});case 5:t.next=10;break;case 7:return t.prev=7,t.t0=t.catch(2),t.abrupt("return",Object(o.b)(t.t0));case 10:a.total_price=this.orderInfo.total_price,a.total_postage=this.orderInfo.total_price,a.pay_postage=this.orderInfo.pay_postage,a.gain_integral=this.orderInfo.gain_integral,a.pay_price=e.price,a.order_id=e.order_id,Object(i.f)(e.id,a).then((function(){l.$emit("closechange",!1),r.$dialog.success("改价成功")})).catch((function(t){r.$dialog.error(t.msg)})),t.next=49;break;case 19:if(2!=r.status){t.next=37;break}return t.prev=20,t.next=23,this.$validator({refund_price:[Object(n.c)(n.c.message("金额")),Object(n.b)(n.b.message("金额"))]}).validate({refund_price:u});case 23:t.next=28;break;case 25:return t.prev=25,t.t1=t.catch(20),t.abrupt("return",Object(o.b)(t.t1));case 28:if(a.refund_price=parseFloat(e.refund_price),a.type=e.type,!(a.refund_price<=0)){t.next=32;break}return t.abrupt("return",r.$dialog.error("请输入退款金额"));case 32:if(!(a.refund_price>parseFloat(r.orderInfo.pay_price))){t.next=34;break}return t.abrupt("return",r.$dialog.error("退款应小于支付金额"));case 34:Object(i.G)(e.id,a).then((function(t){l.$emit("closechange",!1),r.$dialog.success("操作成功")}),(function(t){l.$emit("closechange",!1),r.$dialog.error(t.msg)})),t.next=49;break;case 37:if(1!=r.status){t.next=49;break}return t.prev=38,t.next=41,this.$validator({remark:[Object(n.c)(n.c.message("备注"))]}).validate({remark:f});case 41:t.next=46;break;case 43:return t.prev=43,t.t2=t.catch(38),t.abrupt("return",Object(o.b)(t.t2));case 46:a.remark=f,a.order_id=e.order_id,Object(i.x)(a).then((function(t){l.$emit("closechange",!1),r.$dialog.success("提交成功")}),(function(t){l.$emit("closechange",!1),r.$dialog.error(t.msg)}));case 49:case"end":return t.stop()}}),t,this,[[2,7],[20,25],[38,43]])})),function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){s(i,n,o,a,c,"next",t)}function c(t){s(i,n,o,a,c,"throw",t)}a(void 0)}))});return function(t){return e.apply(this,arguments)}}(),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})}}},f=(r("9098"),r("2877")),l=Object(f.a)(u,(function(){var t=this,e=t._self._c;return e("div",[e("div",{staticClass:"priceChange",class:!0===t.change?"on":""},[e("div",{staticClass:"priceTitle"},[t._v("\n "+t._s(0===t.status?"一键改价":2===t.status?"立即退款":"订单备注")+"\n "),e("span",{staticClass:"iconfontYI icon-guanbi",on:{click:t.close}})]),0===t.status||2===t.status?e("div",{staticClass:"listChange"},[0===t.orderInfo.refund_status?e("div",{staticClass:"item acea-row row-between-wrapper"},[e("div",[t._v("商品总价(¥)")]),e("div",{staticClass:"money"},[t._v("\n "+t._s(t.orderInfo.total_price)),e("span",{staticClass:"iconfontYI icon-suozi"})])]):t._e(),0===t.orderInfo.refund_status?e("div",{staticClass:"item acea-row row-between-wrapper"},[e("div",[t._v("原始邮费(¥)")]),e("div",{staticClass:"money"},[t._v("\n "+t._s(t.orderInfo.pay_postage)),e("span",{staticClass:"iconfontYI icon-suozi"})])]):t._e(),0===t.orderInfo.refund_status?e("div",{staticClass:"item acea-row row-between-wrapper"},[e("div",[t._v("实际支付(¥)")]),e("div",{staticClass:"money"},[e("input",{directives:[{name:"model",rawName:"v-model",value:t.price,expression:"price"}],class:!0===t.focus?"on":"",attrs:{type:"text"},domProps:{value:t.price},on:{focus:t.priceChange,input:function(e){e.target.composing||(t.price=e.target.value)}}})])]):t._e(),1===t.orderInfo.refund_status?e("div",{staticClass:"item acea-row row-between-wrapper"},[e("div",[t._v("实际支付(¥)")]),e("div",{staticClass:"money"},[t._v("\n "+t._s(t.orderInfo.pay_price)),e("span",{staticClass:"iconfontYI icon-suozi"})])]):t._e(),1===t.orderInfo.refund_status?e("div",{staticClass:"item acea-row row-between-wrapper"},[e("div",[t._v("退款金额(¥)")]),e("div",{staticClass:"money"},[e("input",{directives:[{name:"model",rawName:"v-model",value:t.refund_price,expression:"refund_price"}],class:!0===t.focus?"on":"",attrs:{type:"text"},domProps:{value:t.refund_price},on:{focus:t.priceChange,input:function(e){e.target.composing||(t.refund_price=e.target.value)}}})])]):t._e()]):e("div",{staticClass:"listChange"},[e("textarea",{directives:[{name:"model",rawName:"v-model",value:t.remark,expression:"remark"}],attrs:{placeholder:t.orderInfo.remark?t.orderInfo.remark:"请填写备注信息...",maxlength:"100"},domProps:{value:t.remark},on:{input:function(e){e.target.composing||(t.remark=e.target.value)}}})]),e("div",{staticClass:"modify",on:{click:t.save}},[t._v("\n "+t._s(0===t.status||1===t.status?"立即修改":"确认退款")+"\n ")]),2===t.status?e("div",{staticClass:"modify1",on:{click:t.refuse}},[t._v("\n 拒绝退款\n ")]):t._e()]),e("div",{directives:[{name:"show",rawName:"v-show",value:!0===t.change,expression:"change === true"}],staticClass:"maskModel",on:{touchmove:function(t){t.preventDefault()}}})])}),[],!1,null,"2be7127a",null);e.a=l.exports},9098:function(t,e,r){"use strict";r("2b79a")}}]); |