chunk-16e060e8.d3bb01e3.js 47 KB

1
  1. (window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-16e060e8"],{"060a":function(e,t,n){e.exports=n.p+"view_admin/img/no_tk.401d40f4.png"},"0c48":function(e,t,n){"use strict";var i=n("b4ab");n.n(i).a},"0fc4":function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"c",(function(){return o})),n.d(t,"b",(function(){return a}));var i=n("b6bd");function r(){return Object(i.a)({url:"erp/config",method:"get"})}function o(e){return Object(i.a)({url:"store/erp/shop",method:"get",params:e})}function a(e){return Object(i.a)({url:"product/import_erp_product",method:"post",data:e})}},"30ba":function(e,t,n){},"468b":function(e,t,n){e.exports=n.p+"view_admin/img/no_all.174e30c0.png"},"4f83":function(e,t,n){"use strict";var i=n("30ba");n.n(i).a},"5f70":function(e,t,n){e.exports=n.p+"view_admin/img/no_fh.977a0fb8.png"},"61f7":function(e,t,n){"use strict";function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function r(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(n,!0).forEach((function(t){o(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(e.getFullYear()+"").substr(4-RegExp.$1.length)));var n={"M+":e.getMonth()+1,"d+":e.getDate(),"h+":e.getHours(),"m+":e.getMinutes(),"s+":e.getSeconds()};for(var i in n)if(new RegExp("(".concat(i,")")).test(t)){var r=n[i]+"";t=t.replace(RegExp.$1,1===RegExp.$1.length?r:s(r))}return t}function s(e){return("00"+e).substr(e.length)}n.d(t,"a",(function(){return a})),n.d(t,"c",(function(){return d})),n.d(t,"b",(function(){return u}));var c={min:"%s最小长度为:min",max:"%s最大长度为:max",length:"%s长度必须为:length",range:"%s长度为:range",pattern:"$s格式错误"},l=function(e,t){e.message=function(e){return t.replace("%s",e||"")}};function d(e){return r({required:!0,message:e,type:"string"},arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})}function u(e){return h.pattern(/(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/,e)}l(d,"请输入%s"),l(u,"%s格式不正确");var h=Object.keys(c).reduce((function(e,t){return e[t]=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a="range"===t?{min:e[0],max:e[1]}:o({},t,e);return r({message:n.replace(":".concat(t),"range"===t?"".concat(e[0],"-").concat(e[1]):e),type:"string"},a,{},i)},l(e[t],c[t]),e}),{})},"6db4":function(e,t,n){!function(e,t){"use strict";function n(e,t,n){document.addEventListener?e.addEventListener(t,n):e.attachEvent("on"+t,n)}function i(e,t,n){document.addEventListener?e.removeEventListener(t,n):e.detachEvent("on"+t,n)}function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){return e(t={exports:{}},t.exports),t.exports}function a(){var e={},t=0,n=0,i=0;return{add:function(r,o){o||(o=r,r=0),r>n?n=r:r<i&&(i=r),e[r]||(e[r]=[]),e[r].push(o),t++},process:function(){for(var t=i;t<=n;t++)for(var r=e[t],o=0;o<r.length;o++)(0,r[o])()},size:function(){return t}}}function s(e){return e[b]}function c(e){return Array.isArray(e)||void 0!==e.length}function l(e){if(Array.isArray(e))return e;var t=[];return S(e,(function(e){t.push(e)})),t}function d(e){return e&&1===e.nodeType}function u(e,t,n){var i=e[t];return void 0!==i&&null!==i||void 0===n?i:n}t=t&&t.hasOwnProperty("default")?t.default:t;var h=function(e){var t=Date.now();return function(n){if(n-t>(e||14))return t=n,!0}},f={render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{ref:"stripContainer",staticClass:"happy-scroll-strip",class:[e.horizontal?"happy-scroll-strip--horizontal":"happy-scroll-strip--vertical"],style:[e.initLocation],on:{"!wheel":function(t){return t.stopPropagation(),e.handlerWheel(t)}}},[n("div",{ref:"strip",staticClass:"happy-scroll-bar",style:[e.translate,r({},e.config.sizeAttr,e.length+"px"),e.initSize,{background:e.color},{opacity:e.isOpacity}],on:{mousedown:function(t){return t.stopPropagation(),e.handlerMouseDown(t)}}})])},staticRenderFns:[],name:"happy-scroll-strip",props:{horizontal:Boolean,left:Boolean,top:Boolean,move:{type:Number,default:0},size:{type:[Number,String],default:4},minLengthV:{type:Number,default:40},minLengthH:{type:Number,default:40},color:{type:String,default:"rgba(51,51,51,0.2)"},throttle:{type:Number,default:14}},data:function(){return{config:{},startMove:!1,binded:!1,length:0,percentage:0,maxOffset:0,currentOffset:0,moveThrottle:h(this.throttle)}},watch:{currentOffset:function(e){0===e?this.emitLocationEvent("start",0):e===this.maxOffset&&this.emitLocationEvent("end",e/this.percentage)}},computed:{initSize:function(){return r({},this.horizontal?"height":"width",this.size+"px")},isOpacity:function(){return this.percentage<1?1:0},translate:function(){var e=this.move*this.percentage;if(this.$refs.stripContainer)return e<0&&(e=0),e>this.maxOffset&&(e=this.maxOffset),this.currentOffset=e,{transform:this.config.translate+"("+e+"px)"}},initLocation:function(){return this.horizontal?this.top?{top:0,bottom:"auto"}:"":this.left?{left:0,right:"auto"}:""}},methods:{emitLocationEvent:function(e,t){var n=this.horizontal?"horizontal":"vertical";this.$emit(n+"-"+e,t)},computeStrip:function(e,t){var n=this.$refs.stripContainer[this.config.client];this.length=n*(t/e);var i=this.horizontal?this.minLengthH:this.minLengthV;i<1&&(i*=n),this.length=this.length<i?i:this.length;var r=this.maxOffset=n-this.length;this.percentage=r/(e-t)},bindEvents:function(){this.binded||(n(document,"mouseup",this.handlerMouseUp),n(document,"mousemove",this.handlerMove),this.binded=!0)},handlerMouseDown:function(e){if(0===e.button)return e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation(),this.startMove=!0,this.axis=e[this.config.clientAxis],this.bindEvents(),!1},handlerMouseUp:function(){this.startMove=!1},handlerMove:function(e){if(this.startMove&&this.moveThrottle(Date.now())){e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation();var t=this.$refs.stripContainer.getBoundingClientRect(),n=this.$refs.strip.getBoundingClientRect()[this.config.direction]-t[this.config.direction],i=e[this.config.clientAxis]-this.axis+n;this.axis=e[this.config.clientAxis],this.changeOffset(i)}},handlerWheel:function(e){var t=this.$refs.stripContainer.getBoundingClientRect(),n=this.$refs.strip.getBoundingClientRect()[this.config.direction]-t[this.config.direction]+e[this.config.wheelDelta];this.changeOffset(n,e)},changeOffset:function(e,t){e<0&&(e=0),e>this.maxOffset&&(e=this.maxOffset),t&&e>0&&e<this.maxOffset&&(t.preventDefault(),t.stopImmediatePropagation()),this.currentOffset=e,this.$refs.strip.style.transform=this.config.translate+"("+e+"px)",this.$emit("change",e/this.percentage)}},created:function(){var e={h:{sizeAttr:"width",client:"clientWidth",clientAxis:"clientX",translate:"translateX",direction:"left",wheelDelta:"deltaX"},v:{sizeAttr:"height",client:"clientHeight",clientAxis:"clientY",translate:"translateY",direction:"top",wheelDelta:"deltaY"}};this.config=this.horizontal?e.h:e.v},destroyed:function(){i(document,"mouseup",this.handlerClickUp),i(document,"mousemove",this.handlerMove)}},p=o((function(e){(e.exports={}).forEach=function(e,t){for(var n=0;n<e.length;n++){var i=t(e[n]);if(i)return i}}})),v=o((function(e){var t=e.exports={};t.isIE=function(e){return!(!function(){var e=navigator.userAgent.toLowerCase();return-1!==e.indexOf("msie")||-1!==e.indexOf("trident")||-1!==e.indexOf(" edge/")}()||e&&e!==function(){var e=3,t=document.createElement("div"),n=t.getElementsByTagName("i");do{t.innerHTML="\x3c!--[if gt IE "+ ++e+"]><i></i><![endif]--\x3e"}while(n[0]);return e>4?e:void 0}())},t.isLegacyOpera=function(){return!!window.opera}})),g=o((function(e){(e.exports={}).getOption=function(e,t,n){var i=e[t];return void 0!==i&&null!==i||void 0===n?i:n}})),m=function(e){function t(){for(l=!0;c.size();){var e=c;c=a(),e.process()}l=!1}function n(){s=function(e){return setTimeout(e,0)}(t)}var i=(e=e||{}).reporter,r=g.getOption(e,"async",!0),o=g.getOption(e,"auto",!0);o&&!r&&(i&&i.warn("Invalid options combination. auto=true and async=false is invalid. Setting async=true."),r=!0);var s,c=a(),l=!1;return{add:function(e,t){!l&&o&&r&&0===c.size()&&n(),c.add(e,t)},force:function(e){l||(void 0===e&&(e=r),s&&(function(e){clearTimeout(e)}(s),s=null),e?n():t())}}},b="_erd",y={initState:function(e){return e[b]={},s(e)},getState:s,cleanState:function(e){delete e[b]}},w=p.forEach,_=function(e){function t(e,t,n){if(e.addEventListener)e.addEventListener(t,n);else{if(!e.attachEvent)return o.error("[scroll] Don't know how to add event listeners.");e.attachEvent("on"+t,n)}}function n(e,t,n){if(e.removeEventListener)e.removeEventListener(t,n);else{if(!e.detachEvent)return o.error("[scroll] Don't know how to remove event listeners.");e.detachEvent("on"+t,n)}}function i(e){return s(e).container.childNodes[0].childNodes[0].childNodes[0]}function r(e){return s(e).container.childNodes[0].childNodes[0].childNodes[1]}var o=(e=e||{}).reporter,a=e.batchProcessor,s=e.stateHandler.getState,c=e.idHandler;if(!a)throw new Error("Missing required dependency: batchProcessor");if(!o)throw new Error("Missing required dependency: reporter.");var l=function(){var e=document.createElement("div");e.style.cssText="position: absolute; width: 1000px; height: 1000px; visibility: hidden; margin: 0; padding: 0;";var t=document.createElement("div");t.style.cssText="position: absolute; width: 500px; height: 500px; overflow: scroll; visibility: none; top: -1500px; left: -1500px; visibility: hidden; margin: 0; padding: 0;",t.appendChild(e),document.body.insertBefore(t,document.body.firstChild);var n=500-t.clientWidth,i=500-t.clientHeight;return document.body.removeChild(t),{width:n,height:i}}(),d="erd_scroll_detection_container";return function(e,t){if(!document.getElementById(e)){var n=t+"_animation",i="/* Created by the element-resize-detector library. */\n";i+="."+t+" > div::-webkit-scrollbar { display: none; }\n\n",i+="."+t+"_animation_active { -webkit-animation-duration: 0.1s; animation-duration: 0.1s; -webkit-animation-name: "+n+"; animation-name: "+n+"; }\n",i+="@-webkit-keyframes "+n+" { 0% { opacity: 1; } 50% { opacity: 0; } 100% { opacity: 1; } }\n",function(t,n){n=n||function(e){document.head.appendChild(e)};var i=document.createElement("style");i.innerHTML=t,i.id=e,n(i)}(i+="@keyframes "+n+" { 0% { opacity: 1; } 50% { opacity: 0; } 100% { opacity: 1; } }")}}("erd_scroll_detection_scrollbar_style",d),{makeDetectable:function(e,n,u){function h(){if(e.debug){var t=Array.prototype.slice.call(arguments);if(t.unshift(c.get(n),"Scroll: "),o.log.apply)o.log.apply(null,t);else for(var i=0;i<t.length;i++)o.log(t[i])}}function f(e){var t=s(e).container.childNodes[0],n=getComputedStyle(t);return!n.width||-1===n.width.indexOf("px")}function p(){var e=getComputedStyle(n),t={};return t.position=e.position,t.width=n.offsetWidth,t.height=n.offsetHeight,t.top=e.top,t.right=e.right,t.bottom=e.bottom,t.left=e.left,t.widthCSS=e.width,t.heightCSS=e.height,t}function v(){if(h("storeStyle invoked."),s(n)){var e=p();s(n).style=e}else h("Aborting because element has been uninstalled")}function g(e,t,n){s(e).lastWidth=t,s(e).lastHeight=n}function m(e){return i(e).childNodes[0]}function b(){return 2*l.width+1}function y(){return 2*l.height+1}function _(e){return e+10+b()}function S(e){return e+10+y()}function x(e,t,n){var o=i(e),a=r(e),s=_(t),c=S(n),l=function(e){return 2*e+b()}(t),d=function(e){return 2*e+y()}(n);o.scrollLeft=s,o.scrollTop=c,a.scrollLeft=l,a.scrollTop=d}function C(){var e=s(n).container;if(!e){(e=document.createElement("div")).className=d,e.style.cssText="visibility: hidden; display: inline; width: 0px; height: 0px; z-index: -1; overflow: hidden; margin: 0; padding: 0;",s(n).container=e,function(e){e.className+=" "+d+"_animation_active"}(e),n.appendChild(e);var i=function(){s(n).onRendered&&s(n).onRendered()};t(e,"animationstart",i),s(n).onAnimationStart=i}return e}function k(){function e(){s(n).onExpand&&s(n).onExpand()}function i(){s(n).onShrink&&s(n).onShrink()}if(h("Injecting elements"),s(n)){!function(){var e=s(n).style;if("static"===e.position){n.style.position="relative";var t=function(e,t,n,i){var r=n[i];"auto"!==r&&"0"!==function(e){return e.replace(/[^-\d\.]/g,"")}(r)&&(e.warn("An element that is positioned static has style."+i+"="+r+" which is ignored due to the static positioning. The element will need to be positioned relative, so the style."+i+" will be set to 0. Element: ",t),t.style[i]=0)};t(o,n,e,"top"),t(o,n,e,"right"),t(o,n,e,"bottom"),t(o,n,e,"left")}}();var r=s(n).container;r||(r=C());var a=l.width,c=l.height,u="position: absolute; flex: none; overflow: hidden; z-index: -1; visibility: hidden; "+function(e,t,n,i){return e=e?e+"px":"0",t=t?t+"px":"0",n=n?n+"px":"0","left: "+e+"; top: "+t+"; right: "+(i=i?i+"px":"0")+"; bottom: "+n+";"}(-(1+a),-(1+c),-c,-a),f=document.createElement("div"),p=document.createElement("div"),v=document.createElement("div"),g=document.createElement("div"),m=document.createElement("div"),b=document.createElement("div");f.dir="ltr",f.style.cssText="position: absolute; flex: none; overflow: hidden; z-index: -1; visibility: hidden; width: 100%; height: 100%; left: 0px; top: 0px;",f.className=d,p.className=d,p.style.cssText=u,v.style.cssText="position: absolute; flex: none; overflow: scroll; z-index: -1; visibility: hidden; width: 100%; height: 100%;",g.style.cssText="position: absolute; left: 0; top: 0;",m.style.cssText="position: absolute; flex: none; overflow: scroll; z-index: -1; visibility: hidden; width: 100%; height: 100%;",b.style.cssText="position: absolute; width: 200%; height: 200%;",v.appendChild(g),m.appendChild(b),p.appendChild(v),p.appendChild(m),f.appendChild(p),r.appendChild(f),t(v,"scroll",e),t(m,"scroll",i),s(n).onExpandScroll=e,s(n).onShrinkScroll=i}else h("Aborting because element has been uninstalled")}function $(){function t(e,t,n){var i=m(e),r=_(t),o=S(n);i.style.width=r+"px",i.style.height=o+"px"}function l(i){var r=n.offsetWidth,l=n.offsetHeight;h("Storing current size",r,l),g(n,r,l),a.add(0,(function(){if(s(n))if(d()){if(e.debug){var i=n.offsetWidth,a=n.offsetHeight;i===r&&a===l||o.warn(c.get(n),"Scroll: Size changed before updating detector elements.")}t(n,r,l)}else h("Aborting because element container has not been initialized");else h("Aborting because element has been uninstalled")})),a.add(1,(function(){s(n)?d()?x(n,r,l):h("Aborting because element container has not been initialized"):h("Aborting because element has been uninstalled")})),i&&a.add(2,(function(){s(n)?d()?i():h("Aborting because element container has not been initialized"):h("Aborting because element has been uninstalled")}))}function d(){return!!s(n).container}function u(){h("notifyListenersIfNeeded invoked");var e=s(n);return void 0===s(n).lastNotifiedWidth&&e.lastWidth===e.startSize.width&&e.lastHeight===e.startSize.height?h("Not notifying: Size is the same as the start size, and there has been no notification yet."):e.lastWidth===e.lastNotifiedWidth&&e.lastHeight===e.lastNotifiedHeight?h("Not notifying: Size already notified"):(h("Current size not notified, notifying..."),e.lastNotifiedWidth=e.lastWidth,e.lastNotifiedHeight=e.lastHeight,void w(s(n).listeners,(function(e){e(n)})))}function p(){if(h("Scroll detected."),f(n))h("Scroll event fired while unrendered. Ignoring...");else{var e=n.offsetWidth,t=n.offsetHeight;e!==n.lastWidth||t!==n.lastHeight?(h("Element size changed."),l(u)):h("Element size has not changed ("+e+"x"+t+").")}}if(h("registerListenersAndPositionElements invoked."),s(n)){s(n).onRendered=function(){if(h("startanimation triggered."),f(n))h("Ignoring since element is still unrendered...");else{h("Element rendered.");var e=i(n),t=r(n);0!==e.scrollLeft&&0!==e.scrollTop&&0!==t.scrollLeft&&0!==t.scrollTop||(h("Scrollbars out of sync. Updating detector elements..."),l(u))}},s(n).onExpand=p,s(n).onShrink=p;var v=s(n).style;t(n,v.width,v.height)}else h("Aborting because element has been uninstalled")}function E(){if(h("finalizeDomMutation invoked."),s(n)){var e=s(n).style;g(n,e.width,e.height),x(n,e.width,e.height)}else h("Aborting because element has been uninstalled")}function O(){u(n)}function I(){var e;h("Installing..."),s(n).listeners=[],e=p(),s(n).startSize={width:e.width,height:e.height},h("Element start size",s(n).startSize),a.add(0,v),a.add(1,k),a.add(2,$),a.add(3,E),a.add(4,O)}u||(u=n,n=e,e=null),e=e||{},h("Making detectable..."),function(e){return!function(e){return e===e.ownerDocument.body||e.ownerDocument.body.contains(e)}(e)||null===getComputedStyle(e)}(n)?(h("Element is detached"),C(),h("Waiting until element is attached..."),s(n).onRendered=function(){h("Element is now attached"),I()}):I()},addListener:function(e,t){if(!s(e).listeners.push)throw new Error("Cannot add listener to an element that is not detectable.");s(e).listeners.push(t)},uninstall:function(e){var t=s(e);t&&(t.onExpandScroll&&n(i(e),"scroll",t.onExpandScroll),t.onShrinkScroll&&n(r(e),"scroll",t.onShrinkScroll),t.onAnimationStart&&n(t.container,"animationstart",t.onAnimationStart),t.container&&e.removeChild(t.container))}}},S=p.forEach,x=function(e){var t;if((e=e||{}).idHandler)t={get:function(t){return e.idHandler.get(t,!0)},set:e.idHandler.set};else{var n=function(){var e=1;return{generate:function(){return e++}}}(),i=function(e){var t=e.idGenerator,n=e.stateHandler.getState;return{get:function(e){var t=n(e);return t&&void 0!==t.id?t.id:null},set:function(e){var i=n(e);if(!i)throw new Error("setId required the element to have a resize detection state.");var r=t.generate();return i.id=r,r}}}({idGenerator:n,stateHandler:y});t=i}var r=e.reporter;r||(r=function(e){function t(){}var n={log:t,warn:t,error:t};if(!e&&window.console){var i=function(e,t){e[t]=function(){var e=console[t];if(e.apply)e.apply(console,arguments);else for(var n=0;n<arguments.length;n++)e(arguments[n])}};i(n,"log"),i(n,"warn"),i(n,"error")}return n}(!1===r));var o=u(e,"batchProcessor",m({reporter:r})),a={};a.callOnAdd=!!u(e,"callOnAdd",!0),a.debug=!!u(e,"debug",!1);var s,h=function(e){function t(t){var i=e.get(t);return void 0===i?[]:n[i]||[]}var n={};return{get:t,add:function(t,i){var r=e.get(t);n[r]||(n[r]=[]),n[r].push(i)},removeListener:function(e,n){for(var i=t(e),r=0,o=i.length;r<o;++r)if(i[r]===n){i.splice(r,1);break}},removeAllListeners:function(e){var n=t(e);n&&(n.length=0)}}}(t),f=function(e){var t=e.stateHandler.getState;return{isDetectable:function(e){var n=t(e);return n&&!!n.isDetectable},markAsDetectable:function(e){t(e).isDetectable=!0},isBusy:function(e){return!!t(e).busy},markBusy:function(e,n){t(e).busy=!!n}}}({stateHandler:y}),p=u(e,"strategy","object"),g={reporter:r,batchProcessor:o,stateHandler:y,idHandler:t};if("scroll"===p&&(v.isLegacyOpera()?(r.warn("Scroll strategy is not supported on legacy Opera. Changing to object strategy."),p="object"):v.isIE(9)&&(r.warn("Scroll strategy is not supported on IE9. Changing to object strategy."),p="object")),"scroll"===p)s=_(g);else{if("object"!==p)throw new Error("Invalid strategy name: "+p);s=function(e){function t(e){return r(e).object}var n=(e=e||{}).reporter,i=e.batchProcessor,r=e.stateHandler.getState;if(!n)throw new Error("Missing required dependency: reporter.");return{makeDetectable:function(e,t,o){o||(o=t,t=e,e=null),e=e||{},v.isIE(8)?o(t):function(e,t){function o(){function i(){if("static"===c.position){e.style.position="relative";var t=function(e,t,n,i){var r=n[i];"auto"!==r&&"0"!==function(e){return e.replace(/[^-\d\.]/g,"")}(r)&&(e.warn("An element that is positioned static has style."+i+"="+r+" which is ignored due to the static positioning. The element will need to be positioned relative, so the style."+i+" will be set to 0. Element: ",t),t.style[i]=0)};t(n,e,c,"top"),t(n,e,c,"right"),t(n,e,c,"bottom"),t(n,e,c,"left")}}""!==c.position&&(i(),s=!0);var o=document.createElement("object");o.style.cssText=a,o.tabIndex=-1,o.type="text/html",o.onload=function(){s||i(),function e(t,n){t.contentDocument?n(t.contentDocument):setTimeout((function(){e(t,n)}),100)}(this,(function(n){t(e)}))},v.isIE()||(o.data="about:blank"),e.appendChild(o),r(e).object=o,v.isIE()&&(o.data="about:blank")}var a="display: block; position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: none; padding: 0; margin: 0; opacity: 0; z-index: -1000; pointer-events: none;",s=!1,c=window.getComputedStyle(e),l=e.offsetWidth,d=e.offsetHeight;r(e).startSize={width:l,height:d},i?i.add(o):o()}(t,o)},addListener:function(e,n){function i(){n(e)}if(!t(e))throw new Error("Element is not detectable by this strategy.");v.isIE(8)?(r(e).object={proxy:i},e.attachEvent("onresize",i)):t(e).contentDocument.defaultView.addEventListener("resize",i)},uninstall:function(e){v.isIE(8)?e.detachEvent("onresize",r(e).object.proxy):e.removeChild(t(e)),delete r(e).object}}}(g)}var b={};return{listenTo:function(e,n,i){function o(e){var t=h.get(e);S(t,(function(t){t(e)}))}function p(e,t,n){h.add(t,n),e&&n(t)}if(i||(i=n,n=e,e={}),!n)throw new Error("At least one element required.");if(!i)throw new Error("Listener required.");if(d(n))n=[n];else{if(!c(n))return r.error("Invalid arguments. Must be a DOM element or a collection of DOM elements.");n=l(n)}var v=0,g=u(e,"callOnAdd",a.callOnAdd),m=u(e,"onReady",(function(){})),w=u(e,"debug",a.debug);S(n,(function(e){y.getState(e)||(y.initState(e),t.set(e));var a=t.get(e);if(w&&r.log("Attaching listener to element",a,e),!f.isDetectable(e))return w&&r.log(a,"Not detectable."),f.isBusy(e)?(w&&r.log(a,"System busy making it detectable"),p(g,e,i),b[a]=b[a]||[],void b[a].push((function(){++v===n.length&&m()}))):(w&&r.log(a,"Making detectable..."),f.markBusy(e,!0),s.makeDetectable({debug:w},e,(function(e){if(w&&r.log(a,"onElementDetectable"),y.getState(e)){f.markAsDetectable(e),f.markBusy(e,!1),s.addListener(e,o),p(g,e,i);var t=y.getState(e);if(t&&t.startSize){var c=e.offsetWidth,l=e.offsetHeight;t.startSize.width===c&&t.startSize.height===l||o(e)}b[a]&&S(b[a],(function(e){e()}))}else w&&r.log(a,"Element uninstalled before being detectable.");delete b[a],++v===n.length&&m()})));w&&r.log(a,"Already detecable, adding listener."),p(g,e,i),v++})),v===n.length&&m()},removeListener:h.removeListener,removeAllListeners:h.removeAllListeners,uninstall:function(e){if(!e)return r.error("At least one element is required.");if(d(e))e=[e];else{if(!c(e))return r.error("Invalid arguments. Must be a DOM element or a collection of DOM elements.");e=l(e)}S(e,(function(e){h.removeAllListeners(e),s.uninstall(e),y.cleanState(e)}))}}},C=t;"undefined"!=typeof window&&window.Vue&&(C=window.Vue);var k={render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{ref:"happy-scroll",staticClass:"happy-scroll"},[n("div",{ref:"container",staticClass:"happy-scroll-container",style:[e.initSize],on:{scroll:function(t){return t.stopPropagation(),e.onScroll(t)}}},[n("div",{ref:"content",staticClass:"happy-scroll-content",style:[e.contentBorderStyle]},[e._t("default")],2)]),e.hideVertical?e._e():n("happy-scroll-strip",e._g(e._b({ref:"stripY",attrs:{throttle:e.throttle,move:e.moveY},on:{change:e.slideYChange}},"happy-scroll-strip",e.$attrs,!1),e.$listeners)),e.hideHorizontal?e._e():n("happy-scroll-strip",e._g(e._b({ref:"stripX",attrs:{horizontal:"",throttle:e.throttle,move:e.moveX},on:{change:e.slideXChange}},"happy-scroll-strip",e.$attrs,!1),e.$listeners))],1)},staticRenderFns:[],name:"happy-scroll",inheritAttrs:!1,components:{HappyScrollStrip:f},props:{scrollTop:{type:[Number,String],default:0},scrollLeft:{type:[Number,String],default:0},hideVertical:Boolean,hideHorizontal:Boolean,throttle:{type:Number,default:14},resize:Boolean,smallerMoveH:{type:String,default:""},smallerMoveV:{type:String,default:""},biggerMoveH:{type:String,default:""},biggerMoveV:{type:String,default:""}},data:function(){return{initSize:{},moveX:+this.scrollLeft,moveY:+this.scrollTop,scrollThrottle:h(this.throttle),browserHSize:0,browserVSize:0,isScrollNotUseSpace:void 0}},watch:{scrollTop:function(e){this.$refs.container.scrollTop=this.moveY=+e},scrollLeft:function(e){this.$refs.container.scrollLeft=this.moveX=+e},hideVertical:function(e){e||this.$nextTick(this.computeStripY)},hideHorizontal:function(e){e||this.$nextTick(this.computeStripX)}},computed:{contentBorderStyle:function(){return void 0===this.isScrollNotUseSpace?{}:{"border-right":20-this.browserHSize+"px solid transparent","border-bottom":20-this.browserVSize+"px solid transparent"}}},methods:{slideYChange:function(e){this.$refs.container.scrollTop=e,this.$emit("update:scrollTop",this.$refs.container.scrollTop)},slideXChange:function(e){this.$refs.container.scrollLeft=e,this.$emit("update:scrollLeft",this.$refs.container.scrollLeft)},onScroll:function(e){if(!this.scrollThrottle(Date.now()))return!1;this.moveY=e.target.scrollTop,this.moveX=e.target.scrollLeft,this.updateSyncScroll()},initBrowserSize:function(){void 0!==this.isScrollNotUseSpace&&(!0===this.isScrollNotUseSpace?(this.browserHSize=0,this.browserVSize=0):(this.browserHSize=this.$refs.container.offsetWidth-this.$refs.container.clientWidth,this.browserVSize=this.$refs.container.offsetHeight-this.$refs.container.clientHeight))},computeStripX:function(){if(!this.hideHorizontal){var e=this.$refs["happy-scroll"],t=this.$slots.default[0].elm;this.$refs.stripX.computeStrip(t.scrollWidth,e.clientWidth)}},computeStripY:function(){if(!this.hideVertical){var e=this.$refs["happy-scroll"],t=this.$slots.default[0].elm;this.$refs.stripY.computeStrip(t.scrollHeight,e.clientHeight)}},resizeListener:function(){var e=this;if(this.resize){var t=x({strategy:"scroll",callOnAdd:!1}),n=this.$slots.default[0].elm,i=n.clientHeight,r=n.clientWidth;t.listenTo(n,(function(t){e.computeStripX(),e.computeStripY(),e.initBrowserSize();var n=void 0;t.clientHeight<i&&(n=e.smallerMoveH.toLocaleLowerCase()),t.clientHeight>i&&(n=e.biggerMoveH.toLocaleLowerCase()),"start"===n&&(e.moveY=0,e.slideYChange(e.moveY)),"end"===n&&(e.moveY=t.clientHeight,e.slideYChange(e.moveY)),i=t.clientHeight,n="",t.clientWidth<r&&(n=e.smallerMoveV.toLocaleLowerCase()),t.clientWidth>r&&(n=e.biggerMoveV.toLocaleLowerCase()),"start"===n&&(e.moveX=0,e.slideXChange(e.moveX)),"end"===n&&(e.moveX=t.clientWidth,e.slideXChange(e.moveX)),r=t.clientWidth}))}},setContainerSize:function(){this.initSize={width:this.$refs["happy-scroll"].clientWidth+20+"px",height:this.$refs["happy-scroll"].clientHeight+20+"px"}},checkScrollMode:function(){if(void 0===C._happyJS._isScrollNotUseSpace){var e=this.$slots.default[0].elm,t=this.$refs.container;(e.offsetHeight>t.clientHeight||e.offsetWidth>t.clientWidth)&&(t.offsetWidth>t.clientWidth||t.offsetHeight>t.clientHeight?C._happyJS._isScrollNotUseSpace=!1:C._happyJS._isScrollNotUseSpace=!0,this.isScrollNotUseSpace=C._happyJS._isScrollNotUseSpace)}}},beforeCreate:function(){var e=C._happyJS=C._happyJS||{};this.isScrollNotUseSpace=e._isScrollNotUseSpace},created:function(){var e,t,n,i,r,o,a,s,c;this.updateSyncScroll=(e=function(){this.$emit("update:scrollTop",this.moveY),this.$emit("update:scrollLeft",this.moveX)},t=this.throttle,c=function c(){var l=(new Date).getTime()-a;l<t&&l>=0?i=setTimeout(c,t-l):(i=null,n||(s=e.apply(o,r),i||(o=r=null)))},function(){o=this,r=arguments,a=(new Date).getTime();var l=n&&!i;return i||(i=setTimeout(c,t)),l&&(s=e.apply(o,r),o=r=null),s})},mounted:function(){var e=this;this.setContainerSize(),this.$nextTick((function(){e.computeStripX(),e.computeStripY(),e.checkScrollMode(),e.initBrowserSize(),e.$nextTick((function(){e.scrollTop&&(e.$refs.container.scrollTop=+e.scrollTop),e.scrollLeft&&(e.$refs.container.scrollLeft=+e.scrollLeft)}))})),this.resizeListener(),this.$watch("browserHSize",this.setContainerSize),this.$watch("browserVSize",this.setContainerSize)}};"undefined"!=typeof window&&window.Vue&&Vue.component("happy-scroll",k);var $={install:function(e){e.component("happy-scroll",k)},version:"2.1.1"};e.default=$,e.HappyScroll=k,e.version="2.1.1",Object.defineProperty(e,"__esModule",{value:!0})}(t,n("a026"))},"7a1a":function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var i=n("b6bd");function r(){return Object(i.a)({url:"service/info",method:"get",kefu:!0})}},"87bc":function(e,t,n){"use strict";n.r(t);var i=n("a34a"),r=n.n(i),o=n("8c8a"),a={name:"Loading",props:{loaded:Boolean,loading:Boolean},created:function(){}},s=n("2877"),c=Object(s.a)(a,(function(){var e=this.$createElement,t=this._self._c||e;return this.loading&&!this.loaded?t("div",{staticClass:"Loads acea-row row-center-wrapper",staticStyle:{"margin-top":".2rem","font-size":"12px"}},[this.loading?[t("div",{staticClass:"iconfontYI icon-jiazai loading acea-row row-center-wrapper"}),this._v("\n 正在加载中\n ")]:[this._v("\n 上拉加载更多\n ")]],2):this._e()}),[],!1,null,null,null).exports,l=n("42e3"),d=n("0fc4"),u=n("61f7"),h=n("69ae"),f=n("d708"),p={name:"WriteOff",props:{iShidden:{type:Boolean,default:!0},orderInfo:{type:Object,default:null}},data:function(){return{roterPre:f.a.roterPre}},methods:{toDetail:function(e){this.$router.push({path:f.a.routePreKF+"/orderDetail/"+e.id+"/looks"})},cancel:function(){this.$emit("cancel",!1)},confirm:function(){this.$emit("confirm",!1)}}},v=(n("0c48"),Object(s.a)(p,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{directives:[{name:"show",rawName:"v-show",value:e.iShidden,expression:"iShidden"}]},[n("div",{staticClass:"WriteOff"},[n("div",{staticClass:"pictrue"},[n("img",{attrs:{src:e.orderInfo.cartInfo[0].productInfo.image}})]),n("div",{staticClass:"num acea-row row-center-wrapper"},[e._v("\n "+e._s(e.orderInfo.order_id)+"\n "),n("div",{staticClass:"views",on:{click:function(t){return e.toDetail(e.orderInfo)}}},[e._v("\n 查看"),n("span",{staticClass:"iconfont icon-jiantou views-jian"})])]),n("div",{staticClass:"tip"},[e._v("确定要核销此订单吗?")]),n("div",{staticClass:"sure",on:{click:e.confirm}},[e._v("确定核销")]),n("div",{staticClass:"sure cancel",on:{click:e.cancel}},[e._v("取消")])]),n("div",{staticClass:"maskModel",on:{touchmove:function(e){e.preventDefault()}}})])}),[],!1,null,"ac398d4e",null).exports),g=n("6db4"),m=n("7a1a");function b(e,t,n,i,r,o,a){try{var s=e[o](a),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(i,r)}var y={name:"AdminOrderList",components:{WriteOff:v,PriceChange:o.a,Loading:c,HappyScroll:g.HappyScroll},props:{},data:function(){return{roterPre:f.a.roterPre,routePreKF:f.a.routePreKF,openErp:!1,current:"",change:!1,types:0,where:{page:1,limit:15,search:"",type:""},list:[],loaded:!1,loading:!1,orderInfo:{},status:null,iShidden:!1,ops:{vuescroll:{mode:"slide",enable:!1,tips:{deactive:"Push to Load",active:"Release to Load",start:"Loading...",beforeDeactive:"Load Successfully!"},auto:!1,autoLoadDistance:0,pullRefresh:{enable:!1},pushLoad:{enable:!0,auto:!0,autoLoadDistance:10}},bar:{background:"#393232",opacity:".5",size:"2px"}}}},watch:{"$route.params.type":function(e){void 0!=e&&(this.where.type=e,this.init())},types:function(){this.getIndex()}},created:function(){this.getErpConfig(),Object(m.a)().then((function(e){window.document.title="".concat(e.data.site_name," - 订单列表")}))},mounted:function(){var e=this;this.current="",this.getIndex(),this.$scroll(this.$refs.container,(function(){!e.loading&&e.getIndex()}))},methods:{getErpConfig:function(){var e=this;Object(d.a)().then((function(t){e.openErp=t.data.open_erp})).catch((function(t){e.$Message.error(t.msg)}))},bindSearch:function(){this.init()},storeCancellation:function(e){openErp||(this.orderInfo=e,this.iShidden=!0)},cancel:function(e){this.iShidden=e},confirm:function(){var e=this;Object(l.z)(this.orderInfo.id).then((function(t){e.iShidden=!1,e.init(),e.$dialog.success(t.msg)})).catch((function(t){e.$dialog.error(t.msg)}))},more:function(e){this.current===e?this.current="":this.current=e},modify:function(e,t){0==t&&openErp||(this.change=!0,this.orderInfo=e,this.status=t)},closeChange:function(e){this.change=e},changeclose:function(e){this.change=e,this.init()},getRefuse:function(e){orderRefuseApi(data).then((function(){that.change=!1,that.$dialog.success("已拒绝退款"),that.init()})).catch((function(e){that.$dialog.error(e.message)}))},savePrice:function(){var e,t=(e=r.a.mark((function e(t){var n,i,o,a,s,c;return r.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=this,i={},o=t.price,a=t.refundPrice,s=n.orderInfo.refundStatus,c=t.remark,0!=n.status||0!==s){e.next=15;break}return e.prev=2,e.next=5,this.$validator({price:[Object(u.c)(u.c.message("金额"))]}).validate({price:o});case 5:e.next=10;break;case 7:return e.prev=7,e.t0=e.catch(2),e.abrupt("return",Object(h.b)(e.t0));case 10:i.price=o,i.orderId=t.orderId,editPriceApi(i).then((function(){n.change=!1,n.$dialog.success("改价成功"),n.init()})).catch((function(e){n.$dialog.error(e.message)})),e.next=41;break;case 15:if(0!=n.status||1!==s){e.next=30;break}return e.prev=16,e.next=19,this.$validator({refundPrice:[Object(u.c)(u.c.message("金额")),Object(u.b)(u.b.message("金额"))]}).validate({refundPrice:a});case 19:e.next=24;break;case 21:return e.prev=21,e.t1=e.catch(16),e.abrupt("return",Object(h.b)(e.t1));case 24:i.amount=a,i.type=t.type,i.orderId=t.orderId,orderRefundApi(i).then((function(e){n.change=!1,n.$dialog.success("退款成功"),n.init()}),(function(e){n.change=!1,n.$dialog.error(e.message)})),e.next=41;break;case 30:return e.prev=30,e.next=33,this.$validator({remark:[Object(u.c)(u.c.message("备注"))]}).validate({remark:c});case 33:e.next=38;break;case 35:return e.prev=35,e.t2=e.catch(30),e.abrupt("return",Object(h.b)(e.t2));case 38:i.mark=c,i.id=t.id,orderMarkApi(i).then((function(e){n.change=!1,n.$dialog.success("提交成功"),n.init()}),(function(e){n.change=!1,n.$dialog.error(e.msg)}));case 41:case"end":return e.stop()}}),e,this,[[2,7],[16,21],[30,35]])})),function(){var t=this,n=arguments;return new Promise((function(i,r){var o=e.apply(t,n);function a(e){b(o,i,r,a,s,"next",e)}function s(e){b(o,i,r,a,s,"throw",e)}a(void 0)}))});return function(e){return t.apply(this,arguments)}}(),init:function(){this.list=[],this.where.page=1,this.loaded=!1,this.loading=!1,this.getIndex(),this.current=""},getIndex:function(){var e=this;this.loading||this.loaded||(this.loading=!0,Object(l.o)(this.$route.params.toUid,this.where).then((function(t){e.loading=!1,e.loaded=t.data.length<e.where.limit,e.list.push.apply(e.list,t.data||[]),e.where.page=e.where.page+1,e.$nextTick((function(){e.list.length>0&&e.$refs.scrollBox.refresh()}))}),(function(t){e.$dialog.error(t.msg)})))},changeStatus:function(e){this.where.type!==e&&(this.where.type=e,this.init())},toDetail:function(e){this.$router.push({path:f.a.routePreKF+"/orderDetail/"+e.id})},offlinePay:function(e){},handleWordsScroll:function(e,t,n){this.getIndex(),n()}}},w=(n("4f83"),Object(s.a)(y,(function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{ref:"container",staticClass:"pos-order-list"},[i("div",{staticClass:"head-box"},[i("div",{staticClass:"nav acea-row row-around row-middle"},[i("div",{staticClass:"item",class:""===e.where.type?"on":"",on:{click:function(t){return e.changeStatus("")}}},[e._v("\n 全部\n ")]),i("div",{staticClass:"item",class:0===e.where.type?"on":"",on:{click:function(t){return e.changeStatus(0)}}},[e._v("\n 未支付\n ")]),i("div",{staticClass:"item",class:2===e.where.type?"on":"",on:{click:function(t){return e.changeStatus(2)}}},[e._v("\n 未收货\n ")]),i("div",{staticClass:"item",class:-1===e.where.type?"on":"",on:{click:function(t){return e.changeStatus(-1)}}},[e._v("\n 退款中\n ")])]),i("div",{staticClass:"input-box"},[i("Input",{attrs:{placeholder:"搜索订单编号"},on:{"on-enter":e.bindSearch},model:{value:e.where.search,callback:function(t){e.$set(e.where,"search",t)},expression:"where.search"}})],1)]),i("div",{staticClass:"list"},[i("vue-scroll",{ref:"scrollBox",staticStyle:{height:"100%"},attrs:{ops:e.ops},on:{"load-before-deactivate":e.handleWordsScroll}},[i("div",{staticClass:"slot-load",attrs:{slot:"load-deactive"},slot:"load-deactive"}),i("div",{staticClass:"slot-load",attrs:{slot:"load-beforeDeactive"},slot:"load-beforeDeactive"}),i("div",{staticClass:"slot-load",attrs:{slot:"load-active"},slot:"load-active"},[e._v("下滑加载更多")]),e.list.length>0?e._l(e.list,(function(t,n){return i("div",{key:n,staticClass:"item"},[i("div",{staticClass:"order-num acea-row row-middle",on:{click:function(n){return e.toDetail(t)}}},[i("div",[i("div",[e._v("订单号:"+e._s(t.order_id))]),i("span",{staticClass:"time"},[e._v("下单时间:"+e._s(t._add_time))])])]),e._l(t.cartInfo,(function(n,r){return i("div",{key:r,staticClass:"pos-order-goods"},[i("div",{staticClass:"goods acea-row row-between-wrapper",on:{click:function(n){return e.toDetail(t)}}},[i("div",{staticClass:"picTxt acea-row row-between-wrapper"},[i("div",{staticClass:"pictrue"},[i("img",{attrs:{src:n.productInfo.image}})]),i("div",{staticClass:"text "},[i("div",{staticClass:"info line2"},[1==n.is_gift?i("span",{staticClass:"label"},[e._v("[赠品]")]):e._e(),e._v("\n "+e._s(n.productInfo.store_name)+"\n ")]),n.productInfo.attrInfo.suk?i("div",{staticClass:"attr line1"},[e._v("\n "+e._s(n.productInfo.attrInfo.suk)+"\n ")]):e._e()])]),i("div",{staticClass:"money"},[i("div",{staticClass:"x-money"},[e._v("¥"+e._s(n.productInfo.attrInfo.price))]),i("div",{staticClass:"num"},[e._v("x"+e._s(n.cart_num))]),i("div",{staticClass:"y-money"})])])])})),i("div",{staticClass:"public-total"},[e._v("\n 共"+e._s(t.total_num)+"件商品,应支付\n "),i("span",{staticClass:"money"},[e._v("¥"+e._s(t.pay_price))]),e._v(" ( 邮费 ¥"+e._s(t.pay_postage)+"\n )\n ")]),i("div",{staticClass:"operation acea-row row-between-wrapper"},[i("div",{staticClass:"more"}),i("div",{staticClass:"acea-row row-middle"},[0===t.paid?i("div",{staticClass:"bnt",class:e.openErp?"on":"",on:{click:function(n){return e.modify(t,0)}}},[e._v("\n 一键改价\n ")]):e._e(),i("div",{staticClass:"bnt",on:{click:function(n){return e.modify(t,1)}}},[e._v("订单备注")]),-1===t._status._type&&1===t.refund_status?i("div",{staticClass:"bnt",class:e.openErp?"on":"",on:{click:function(n){return e.modify(t,0)}}},[e._v("\n 立即退款\n ")]):e._e(),"offline"===t.pay_type&&0===t.paid?i("div",{staticClass:"bnt cancel",class:e.openErp?"on":"",on:{click:function(n){return e.offlinePay(t)}}},[e._v("\n 确认付款\n ")]):e._e(),1!==t._status._type||2===t.shipping_type||null!==t.pinkStatus&&2!==t.pinkStatus?e._e():i("router-link",{staticClass:"bnt",class:e.openErp?"on":"",attrs:{disabled:e.openErp,to:{path:e.routePreKF+"/orderDelivery/"+t.id+"/"+t.order_id,query:{productType:t.product_type}}}},[e._v("去发货\n ")]),1===t._status._type&&2===t.shipping_type?i("div",{staticClass:"bnt cancel",class:e.openErp?"on":"",on:{click:function(n){return e.storeCancellation(t)}}},[e._v("\n 去核销\n ")]):e._e()],1)])],2)})):e._e(),e.loading||0!==e.list.length||""!==e.where.type?e._e():[i("div",{staticStyle:{"text-align":"center"}},[i("img",{staticClass:"width-rem",attrs:{src:n("468b"),alt:""}}),i("p",{staticStyle:{color:"#9F9F9F"}},[e._v("亲,该客户暂无订单~")])])],e.loading||0!==e.list.length||0!==e.where.type?e._e():[i("div",{staticStyle:{"text-align":"center"}},[i("img",{staticClass:"width-rem",attrs:{src:n("ea87"),alt:""}}),i("p",{staticStyle:{color:"#9F9F9F"}},[e._v("暂无未支付订单~")])])],e.loading||0!==e.list.length||2!==e.where.type?e._e():[i("div",{staticStyle:{"text-align":"center"}},[i("img",{staticClass:"width-rem",attrs:{src:n("5f70"),alt:""}}),i("p",{staticStyle:{color:"#9F9F9F"}},[e._v("暂无未收货订单~")])])],e.loading||0!==e.list.length||-1!==e.where.type?e._e():[i("div",{staticStyle:{"text-align":"center"}},[i("img",{staticClass:"width-rem",attrs:{src:n("060a"),alt:""}}),i("p",{staticStyle:{color:"#9F9F9F"}},[e._v("暂无退款订单~")])])]],2)],1),e.orderInfo?i("PriceChange",{attrs:{change:e.change,orderInfo:e.orderInfo,status:e.status},on:{closechange:function(t){return e.changeclose(t)},closeChange:function(t){return e.closeChange(t)}}}):e._e(),e.iShidden?i("write-off",{attrs:{iShidden:e.iShidden,orderInfo:e.orderInfo},on:{cancel:e.cancel,confirm:e.confirm}}):e._e()],1)}),[],!1,null,"74570995",null));t.default=w.exports},"8c8a":function(e,t,n){"use strict";var i=n("a34a"),r=n.n(i),o=n("61f7"),a=n("69ae"),s=n("42e3");function c(e,t,n,i,r,o,a){try{var s=e[o](a),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(i,r)}var l={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 e,t=(e=r.a.mark((function e(t){var n,i,c,l,d,u=this;return r.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=this,i={},c=t.price,l=t.refund_price,n.orderInfo.refund_status,d=t.remark,0!=n.status){e.next=19;break}return e.prev=2,e.next=5,this.$validator({price:[Object(o.c)(o.c.message("金额")),Object(o.b)(o.b.message("金额"))]}).validate({price:c});case 5:e.next=10;break;case 7:return e.prev=7,e.t0=e.catch(2),e.abrupt("return",Object(a.b)(e.t0));case 10:i.total_price=this.orderInfo.total_price,i.total_postage=this.orderInfo.total_price,i.pay_postage=this.orderInfo.pay_postage,i.gain_integral=this.orderInfo.gain_integral,i.pay_price=t.price,i.order_id=t.order_id,Object(s.f)(t.id,i).then((function(){u.$emit("closechange",!1),n.$dialog.success("改价成功")})).catch((function(e){n.$dialog.error(e.msg)})),e.next=49;break;case 19:if(2!=n.status){e.next=37;break}return e.prev=20,e.next=23,this.$validator({refund_price:[Object(o.c)(o.c.message("金额")),Object(o.b)(o.b.message("金额"))]}).validate({refund_price:l});case 23:e.next=28;break;case 25:return e.prev=25,e.t1=e.catch(20),e.abrupt("return",Object(a.b)(e.t1));case 28:if(i.refund_price=parseFloat(t.refund_price),i.type=t.type,!(i.refund_price<=0)){e.next=32;break}return e.abrupt("return",n.$dialog.error("请输入退款金额"));case 32:if(!(i.refund_price>parseFloat(n.orderInfo.pay_price))){e.next=34;break}return e.abrupt("return",n.$dialog.error("退款应小于支付金额"));case 34:Object(s.G)(t.id,i).then((function(e){u.$emit("closechange",!1),n.$dialog.success("操作成功")}),(function(e){u.$emit("closechange",!1),n.$dialog.error(e.msg)})),e.next=49;break;case 37:if(1!=n.status){e.next=49;break}return e.prev=38,e.next=41,this.$validator({remark:[Object(o.c)(o.c.message("备注"))]}).validate({remark:d});case 41:e.next=46;break;case 43:return e.prev=43,e.t2=e.catch(38),e.abrupt("return",Object(a.b)(e.t2));case 46:i.remark=d,i.order_id=t.order_id,Object(s.x)(i).then((function(e){u.$emit("closechange",!1),n.$dialog.success("提交成功")}),(function(e){u.$emit("closechange",!1),n.$dialog.error(e.msg)}));case 49:case"end":return e.stop()}}),e,this,[[2,7],[20,25],[38,43]])})),function(){var t=this,n=arguments;return new Promise((function(i,r){var o=e.apply(t,n);function a(e){c(o,i,r,a,s,"next",e)}function s(e){c(o,i,r,a,s,"throw",e)}a(void 0)}))});return function(e){return t.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})}}},d=(n("d088"),n("2877")),u=Object(d.a)(l,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("div",{staticClass:"priceChange",class:!0===e.change?"on":""},[n("div",{staticClass:"priceTitle"},[e._v("\n "+e._s(0===e.status?"一键改价":2===e.status?"立即退款":"订单备注")+"\n "),n("span",{staticClass:"iconfontYI icon-guanbi",on:{click:e.close}})]),0===e.status||2===e.status?n("div",{staticClass:"listChange"},[0===e.orderInfo.refund_status?n("div",{staticClass:"item acea-row row-between-wrapper"},[n("div",[e._v("商品总价(¥)")]),n("div",{staticClass:"money"},[e._v("\n "+e._s(e.orderInfo.total_price)),n("span",{staticClass:"iconfontYI icon-suozi"})])]):e._e(),0===e.orderInfo.refund_status?n("div",{staticClass:"item acea-row row-between-wrapper"},[n("div",[e._v("原始邮费(¥)")]),n("div",{staticClass:"money"},[e._v("\n "+e._s(e.orderInfo.pay_postage)),n("span",{staticClass:"iconfontYI icon-suozi"})])]):e._e(),0===e.orderInfo.refund_status?n("div",{staticClass:"item acea-row row-between-wrapper"},[n("div",[e._v("实际支付(¥)")]),n("div",{staticClass:"money"},[n("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?n("div",{staticClass:"item acea-row row-between-wrapper"},[n("div",[e._v("实际支付(¥)")]),n("div",{staticClass:"money"},[e._v("\n "+e._s(e.orderInfo.pay_price)),n("span",{staticClass:"iconfontYI icon-suozi"})])]):e._e(),1===e.orderInfo.refund_status?n("div",{staticClass:"item acea-row row-between-wrapper"},[n("div",[e._v("退款金额(¥)")]),n("div",{staticClass:"money"},[n("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()]):n("div",{staticClass:"listChange"},[n("textarea",{directives:[{name:"model",rawName:"v-model",value:e.remark,expression:"remark"}],attrs:{placeholder:e.orderInfo.remark?e.orderInfo.remark:"请填写备注信息...",maxlength:"100"},domProps:{value:e.remark},on:{input:function(t){t.target.composing||(e.remark=t.target.value)}}})]),n("div",{staticClass:"modify",on:{click:e.save}},[e._v("\n "+e._s(0===e.status||1===e.status?"立即修改":"确认退款")+"\n ")]),2===e.status?n("div",{staticClass:"modify1",on:{click:e.refuse}},[e._v("\n 拒绝退款\n ")]):e._e()]),n("div",{directives:[{name:"show",rawName:"v-show",value:!0===e.change,expression:"change === true"}],staticClass:"maskModel",on:{touchmove:function(e){e.preventDefault()}}})])}),[],!1,null,"2be7127a",null);t.a=u.exports},b4ab:function(e,t,n){},cec3:function(e,t,n){},d088:function(e,t,n){"use strict";var i=n("cec3");n.n(i).a},ea87:function(e,t,n){e.exports=n.p+"view_admin/img/no_zf.e61fe9b5.png"}}]);