| 12 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2ca61630"],{"0a49":function(t,e,r){var n=r("9b43"),o=r("626a"),a=r("4bf8"),i=r("9def"),c=r("cd1c");t.exports=function(t,e){var r=1==t,u=2==t,s=3==t,l=4==t,f=6==t,d=5==t||f,p=e||c;return function(e,c,h){for(var v,m,y=a(e),g=o(y),b=n(c,h,3),x=i(g.length),_=0,w=r?p(e,x):u?p(e,0):void 0;x>_;_++)if((d||_ in g)&&(v=g[_],m=b(v,_,y),t))if(r)w[_]=m;else if(m)switch(t){case 3:return!0;case 5:return v;case 6:return _;case 2:w.push(v)}else if(l)return!1;return f?-1:s||l?l:w}}},"0bfb":function(t,e,r){"use strict";var n=r("cb7c");t.exports=function(){var t=n(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e}},1169:function(t,e,r){var n=r("2d95");t.exports=Array.isArray||function(t){return"Array"==n(t)}},"1da1":function(t,e,r){"use strict";function n(t,e,r,n,o,a,i){try{var c=t[a](i),u=c.value}catch(s){return void r(s)}c.done?e(u):Promise.resolve(u).then(n,o)}function o(t){return function(){var e=this,r=arguments;return new Promise((function(o,a){var i=t.apply(e,r);function c(t){n(i,o,a,c,u,"next",t)}function u(t){n(i,o,a,c,u,"throw",t)}c(void 0)}))}}r.d(e,"a",(function(){return o}))},"214f":function(t,e,r){"use strict";r("b0c5");var n=r("2aba"),o=r("32e9"),a=r("79e5"),i=r("be13"),c=r("2b4c"),u=r("520a"),s=c("species"),l=!a((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")})),f=function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var r="ab".split(t);return 2===r.length&&"a"===r[0]&&"b"===r[1]}();t.exports=function(t,e,r){var d=c(t),p=!a((function(){var e={};return e[d]=function(){return 7},7!=""[t](e)})),h=p?!a((function(){var e=!1,r=/a/;return r.exec=function(){return e=!0,null},"split"===t&&(r.constructor={},r.constructor[s]=function(){return r}),r[d](""),!e})):void 0;if(!p||!h||"replace"===t&&!l||"split"===t&&!f){var v=/./[d],m=r(i,d,""[t],(function(t,e,r,n,o){return e.exec===u?p&&!o?{done:!0,value:v.call(e,r,n)}:{done:!0,value:t.call(r,e,n)}:{done:!1}})),y=m[0],g=m[1];n(String.prototype,t,y),o(RegExp.prototype,d,2==e?function(t,e){return g.call(t,this,e)}:function(t){return g.call(t,this)})}}},"34e1":function(t,e,r){"use strict";r.d(e,"b",(function(){return o})),r.d(e,"a",(function(){return a}));var n=r("a27e"),o=function(t){return Object(n["a"])({method:"POST",url:"/api.php/api/customer/get",data:t})},a=function(t){return Object(n["a"])({method:"POST",url:"/api.php/api/customer/search",data:t})}},"386d":function(t,e,r){"use strict";var n=r("cb7c"),o=r("83a1"),a=r("5f1b");r("214f")("search",1,(function(t,e,r,i){return[function(r){var n=t(this),o=void 0==r?void 0:r[e];return void 0!==o?o.call(r,n):new RegExp(r)[e](String(n))},function(t){var e=i(r,t,this);if(e.done)return e.value;var c=n(t),u=String(this),s=c.lastIndex;o(s,0)||(c.lastIndex=0);var l=a(c,u);return o(c.lastIndex,s)||(c.lastIndex=s),null===l?-1:l.index}]}))},"3a10":function(t,e,r){"use strict";r.d(e,"b",(function(){return o})),r.d(e,"i",(function(){return a})),r.d(e,"e",(function(){return i})),r.d(e,"h",(function(){return c})),r.d(e,"d",(function(){return u})),r.d(e,"j",(function(){return s})),r.d(e,"m",(function(){return l})),r.d(e,"f",(function(){return f})),r.d(e,"k",(function(){return d})),r.d(e,"c",(function(){return p})),r.d(e,"l",(function(){return h})),r.d(e,"g",(function(){return v})),r.d(e,"a",(function(){return m}));var n=r("a27e"),o=function(t){return Object(n["a"])({method:"POST",url:"/api.php/api/order/fetchByCustomerId",data:t})},a=function(t){return Object(n["a"])({method:"POST",url:"/api.php/api/user/performance",data:t})},i=function(t){return Object(n["a"])({method:"POST",url:"/api.php/api/order/fetch",data:t})},c=function(t){return Object(n["a"])({method:"POST",url:"/api.php/api/order/findOrderByOrderId",data:t})},u=function(t){return Object(n["a"])({method:"POST",url:"/api.php/api/order/fetchOrderProducts",data:t})},s=function(t){return Object(n["a"])({method:"POST",url:"/api.php/api/order/payment?lang=en-us",data:t})},l=function(t){var e=t.order_product_id,r=t.report;return Object(n["a"])({method:"POST",url:"/api.php/api/order/upload_numerology?lang=en-us",data:{order_product_id:e,report:r}})},f=function(t){return Object(n["a"])({method:"POST",url:"/api.php/api/order/fetchWaitGatherAnnualFee?lang=en-us",data:t})},d=function(t){return Object(n["a"])({method:"POST",url:"/api.php/api/order/paymentAnnualFee?lang=en-us",data:t})},p=function(t){return Object(n["a"])({method:"POST",url:"/api.php/api/order/fetchOrderByReturn?lang=en-us",data:t})},h=function(t){return Object(n["a"])({method:"POST",url:"/api.php/api/order/returnOrderProduct?lang=en-us",data:t})},v=function(t){return Object(n["a"])({method:"POST",url:"/api.php/api/order/findByOrderNo?lang=en-us",data:t})},m=function(t){return Object(n["a"])({method:"POST",url:"/api.php/api/order/exchange?lang=en-us",data:t})}},"520a":function(t,e,r){"use strict";var n=r("0bfb"),o=RegExp.prototype.exec,a=String.prototype.replace,i=o,c="lastIndex",u=function(){var t=/a/,e=/b*/g;return o.call(t,"a"),o.call(e,"a"),0!==t[c]||0!==e[c]}(),s=void 0!==/()??/.exec("")[1],l=u||s;l&&(i=function(t){var e,r,i,l,f=this;return s&&(r=new RegExp("^"+f.source+"$(?!\\s)",n.call(f))),u&&(e=f[c]),i=o.call(f,t),u&&i&&(f[c]=f.global?i.index+i[0].length:e),s&&i&&i.length>1&&a.call(i[0],r,(function(){for(l=1;l<arguments.length-2;l++)void 0===arguments[l]&&(i[l]=void 0)})),i}),t.exports=i},"5d32":function(t,e,r){},"5f1b":function(t,e,r){"use strict";var n=r("23c6"),o=RegExp.prototype.exec;t.exports=function(t,e){var r=t.exec;if("function"===typeof r){var a=r.call(t,e);if("object"!==typeof a)throw new TypeError("RegExp exec method returned something other than an Object or null");return a}if("RegExp"!==n(t))throw new TypeError("RegExp#exec called on incompatible receiver");return o.call(t,e)}},6810:function(t,e,r){"use strict";r.d(e,"b",(function(){return o})),r.d(e,"a",(function(){return a})),r.d(e,"d",(function(){return i})),r.d(e,"c",(function(){return c}));var n=r("a27e"),o=function(t){return Object(n["a"])({method:"POST",url:"/api.php/api/product/search",data:t})},a=function(t){return Object(n["a"])({method:"POST",url:"/api.php/api/customer/add",data:t})},i=function(t){return Object(n["a"])({method:"POST",url:"/api.php/api/user/search",data:t})},c=function(t){return Object(n["a"])({method:"POST",url:"/api.php/api/order/create",data:t})}},7514:function(t,e,r){"use strict";var n=r("5ca1"),o=r("0a49")(5),a="find",i=!0;a in[]&&Array(1)[a]((function(){i=!1})),n(n.P+n.F*i,"Array",{find:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}}),r("9c6c")(a)},"7f7f":function(t,e,r){var n=r("86cc").f,o=Function.prototype,a=/^\s*function ([^ (]*)/,i="name";i in o||r("9e1e")&&n(o,i,{configurable:!0,get:function(){try{return(""+this).match(a)[1]}catch(t){return""}}})},"83a1":function(t,e){t.exports=Object.is||function(t,e){return t===e?0!==t||1/t===1/e:t!=t&&e!=e}},"96cf":function(t,e,r){var n=function(t){"use strict";var e,r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"===typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",u=a.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(R){s=function(t,e,r){return t[e]=r}}function l(t,e,r,n){var a=e&&e.prototype instanceof y?e:y,i=Object.create(a.prototype),c=new T(n||[]);return o(i,"_invoke",{value:P(t,r,c)}),i}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(R){return{type:"throw",arg:R}}}t.wrap=l;var d="suspendedStart",p="suspendedYield",h="executing",v="completed",m={};function y(){}function g(){}function b(){}var x={};s(x,i,(function(){return this}));var _=Object.getPrototypeOf,w=_&&_(_(C([])));w&&w!==r&&n.call(w,i)&&(x=w);var O=b.prototype=y.prototype=Object.create(x);function j(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function k(t,e){function r(o,a,i,c){var u=f(t[o],t,a);if("throw"!==u.type){var s=u.arg,l=s.value;return l&&"object"===typeof l&&n.call(l,"__await")?e.resolve(l.__await).then((function(t){r("next",t,i,c)}),(function(t){r("throw",t,i,c)})):e.resolve(l).then((function(t){s.value=t,i(s)}),(function(t){return r("throw",t,i,c)}))}c(u.arg)}var a;function i(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return a=a?a.then(o,o):o()}o(this,"_invoke",{value:i})}function P(t,e,r){var n=d;return function(o,a){if(n===h)throw new Error("Generator is already running");if(n===v){if("throw"===o)throw a;return I()}r.method=o,r.arg=a;while(1){var i=r.delegate;if(i){var c=E(i,r);if(c){if(c===m)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===d)throw n=v,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=h;var u=f(t,e,r);if("normal"===u.type){if(n=r.done?v:p,u.arg===m)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n=v,r.method="throw",r.arg=u.arg)}}}function E(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator["return"]&&(r.method="return",r.arg=e,E(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var a=f(o,t.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,m;var i=a.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function L(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 S(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function T(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(L,this),this.reset(!0)}function C(t){if(t){var r=t[i];if(r)return r.call(t);if("function"===typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function r(){while(++o<t.length)if(n.call(t,o))return r.value=t[o],r.done=!1,r;return r.value=e,r.done=!0,r};return a.next=a}}return{next:I}}function I(){return{value:e,done:!0}}return g.prototype=b,o(O,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:g,configurable:!0}),g.displayName=s(b,u,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"===typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,s(t,u,"GeneratorFunction")),t.prototype=Object.create(O),t},t.awrap=function(t){return{__await:t}},j(k.prototype),s(k.prototype,c,(function(){return this})),t.AsyncIterator=k,t.async=function(e,r,n,o,a){void 0===a&&(a=Promise);var i=new k(l(e,r,n,o),a);return t.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},j(O),s(O,u,"Generator"),s(O,i,(function(){return this})),s(O,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){while(r.length){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},t.values=C,T.prototype={constructor:T,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(S),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0],e=t.completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function o(n,o){return c.type="throw",c.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(u&&s){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.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 a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,m):this.complete(i)},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),m},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),S(r),m}},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;S(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:C(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}(t.exports);try{regeneratorRuntime=n}catch(o){"object"===typeof globalThis?globalThis.regeneratorRuntime=n:Function("r","regeneratorRuntime = r")(n)}},a71e:function(t,e,r){"use strict";r.r(e);r("7f7f");var n=function(){var t=this,e=t._self._c;return e("div",{staticClass:"exchange-main"},[e("div",{staticClass:"title"},[t._v("订单编号:"+t._s(t.order.no))]),e("div",{staticClass:"detail"},[e("span",[t._v("客户姓名:"+t._s(t.customer.name_en)+" | "+t._s(t.customer.name_zh)+" ")]),e("span",[t._v("客户手机号:"+t._s(t.customer.mobile))])]),e("div",{staticClass:"content"},[e("div",{staticClass:"left"},[e("div",{staticClass:"title"},[t._v("原有商品")]),e("div",{staticClass:"inputs"},[e("el-checkbox-group",{model:{value:t.checkList,callback:function(e){t.checkList=e},expression:"checkList"}},t._l(t.order.products,(function(r){return e("el-checkbox",{key:r.id,attrs:{label:r.id}},[t._v(t._s(r.product_name)+"\n ")])})),1)],1)]),t._m(0),e("div",{staticClass:"right"},[e("div",{staticClass:"title"},[t._v("替换商品")]),e("div",{staticClass:"search"},[t._v("\n 搜索商品\n "),e("div",{staticClass:"box-card-box1-bottom"},[e("el-select",{attrs:{filterable:"",placeholder:"请选择"},model:{value:t.now_replace,callback:function(e){t.now_replace=e},expression:"now_replace"}},t._l(t.storeProducts,(function(t){return e("el-option",{key:t.value,attrs:{label:"【".concat(t.product.bar_code,"】").concat(t.product.name),value:t.id}})})),1)],1),e("el-button",{attrs:{type:"primary"},on:{click:t.append}},[t._v("添加")])],1),e("div",{staticClass:"table"},[e("el-table",{attrs:{data:t.replaces}},[e("el-table-column",{attrs:{label:"商品条码",prop:"product_bar_code",align:"center"}}),e("el-table-column",{attrs:{label:"商品名称",prop:"product_name",align:"center"}}),e("el-table-column",{attrs:{label:"价格",prop:"product_price",align:"center"}}),e("el-table-column",{attrs:{label:"操作",align:"center"},scopedSlots:t._u([{key:"default",fn:function(r){return[e("el-button",{staticStyle:{color:"#165DFF"},attrs:{type:"text"},on:{click:function(e){return t.deleteCommodity(r.$index)}}},[t._v("\n 删除\n ")])]}}])})],1)],1)])]),e("div",{staticClass:"footer"},[e("el-button",{attrs:{type:"default"},on:{click:t.back}},[t._v("返回")]),e("el-button",{attrs:{type:"primary"},on:{click:t.confirm}},[t._v("确认换货")])],1)])},o=[function(){var t=this,e=t._self._c;return e("div",{staticClass:"transition"},[e("i",{staticClass:"el-icon-d-arrow-right"})])}],a=(r("7514"),r("96cf"),r("1da1")),i=(r("386d"),r("3a10")),c=r("34e1"),u=r("6810"),s={data:function(){return{userInfo:JSON.parse(window.localStorage.getItem("userInfo")||{})||{},order:{},customer:{},checkList:[],now_replace:void 0,replaces:[],storeProducts:[]}},mounted:function(){var t=this.check();if(!t)return!1;this.findByOrderNo(),this.getCustomerInfo(),this.search()},methods:{check:function(){return!(!this.$route.query.order_no||!this.$route.query.customer_id)||(this.$message.error("参数不符合规则,无法进行换货!"),!1)},getCustomerInfo:function(){var t=Object(a["a"])(regeneratorRuntime.mark((function t(){var e=this;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,Object(c["b"])({customer_id:this.$route.query.customer_id}).then((function(t){200===t.data.code&&(e.customer=t.data.data)}));case 2:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}(),search:function(){var t=this;Object(u["b"])({store_id:this.userInfo.stores[0].id||-1,page:1,size:1e3}).then((function(e){200===e.data.code&&(t.storeProducts=e.data.data[0])}))},findByOrderNo:function(){var t=Object(a["a"])(regeneratorRuntime.mark((function t(){var e=this;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,Object(i["g"])({order_no:this.$route.query.order_no}).then((function(t){200===t.data.code?e.order=t.data.data:e.$message.error(t.data.message)}));case 2:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}(),clear:function(){this.findByOrderNo(),this.getCustomerInfo(),this.search(),this.replaces=[],this.now_replace=void 0},append:function(){var t=this;if(void 0===this.now_replace)return this.$message.error("请选择商品!"),!1;var e=this.storeProducts.find((function(e){return e.id==t.now_replace&&e.now_stock>0}));if(!e)return this.$message.error("选择的商品库存不足!"),!1;this.replaces.push({id:e.id,product_bar_code:e.product.bar_code,product_name:e.product_name,product_price:e.product.real_price})},deleteCommodity:function(t){this.replaces.splice(t,1)},back:function(){this.$router.go(-1)},confirm:function(){var t=this;this.$confirm("确定换货吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消"}).then((function(){Object(i["a"])({order_id:t.order.id,origin_order_product_ids:t.checkList.join(","),append_store_product_ids:t.replaces.map((function(t){return t.id})).join(",")}).then((function(e){t.$message({message:200===e.data.code?"成功":e.data.message,type:200===e.data.code?"success":"error"}),e.data.code}))})).catch((function(t){}))}}},l=s,f=(r("a8e8"),r("2877")),d=Object(f["a"])(l,n,o,!1,null,null,null);e["default"]=d.exports},a8e8:function(t,e,r){"use strict";r("5d32")},b0c5:function(t,e,r){"use strict";var n=r("520a");r("5ca1")({target:"RegExp",proto:!0,forced:n!==/./.exec},{exec:n})},cd1c:function(t,e,r){var n=r("e853");t.exports=function(t,e){return new(n(t))(e)}},e853:function(t,e,r){var n=r("d3f4"),o=r("1169"),a=r("2b4c")("species");t.exports=function(t){var e;return o(t)&&(e=t.constructor,"function"!=typeof e||e!==Array&&!o(e.prototype)||(e=void 0),n(e)&&(e=e[a],null===e&&(e=void 0))),void 0===e?Array:e}}}]);
- //# sourceMappingURL=chunk-2ca61630.4d42c465.js.map
|