customerAffirm.js 6.0 KB

1
  1. (global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["admin/billing/customerAffirm"],{"003c":function(e,n,t){"use strict";t.r(n);var o=t("d58f"),r=t("b19f");for(var i in r)["default"].indexOf(i)<0&&function(e){t.d(n,e,(function(){return r[e]}))}(i);t("020e");var c,u=t("8261"),a=Object(u["a"])(r["default"],o["b"],o["c"],!1,null,"f9bc232c",null,!1,o["a"],c);n["default"]=a.exports},"020e":function(e,n,t){"use strict";var o=t("449c"),r=t.n(o);r.a},"449c":function(e,n,t){},"50d7":function(e,n,t){"use strict";(function(e){t("6cdc");o(t("b5e3"));var n=o(t("003c"));function o(e){return e&&e.__esModule?e:{default:e}}e(n.default)}).call(this,t("934e")["createPage"])},b19f:function(e,n,t){"use strict";t.r(n);var o=t("f1f2"),r=t.n(o);for(var i in o)["default"].indexOf(i)<0&&function(e){t.d(n,e,(function(){return o[e]}))}(i);n["default"]=r.a},d58f:function(e,n,t){"use strict";var o;t.d(n,"b",(function(){return r})),t.d(n,"c",(function(){return i})),t.d(n,"a",(function(){return o}));var r=function(){var e=this,n=e.$createElement,t=(e._self._c,e.__map(e.selectList,(function(n,t){var o=e.__get_orig(n),r=e.getSelectItemPrice(n);return{$orig:o,m0:r}})));e.$mp.data=Object.assign({},{$root:{l0:t}})},i=[]},f1f2:function(e,n,t){"use strict";(function(e){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var o=u(t("644f")),r=u(t("e350")),i=t("3a10"),c=t("7736");function u(e){return e&&e.__esModule?e:{default:e}}function a(e,n,t,o,r,i,c){try{var u=e[i](c),a=u.value}catch(s){return void t(s)}u.done?n(a):Promise.resolve(a).then(o,r)}function s(e){return function(){var n=this,t=arguments;return new Promise((function(o,r){var i=e.apply(n,t);function c(e){a(i,o,r,c,u,"next",e)}function u(e){a(i,o,r,c,u,"throw",e)}c(void 0)}))}}function l(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function f(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?l(Object(t),!0).forEach((function(n){d(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):l(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function d(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}var m=function(){t.e("components/plugin/list-cell").then(function(){return resolve(t("1861"))}.bind(null,t)).catch(t.oe)},p=function(){Promise.all([t.e("common/vendor"),t.e("components/module/app-avatar")]).then(function(){return resolve(t("d84d"))}.bind(null,t)).catch(t.oe)},v=function(){Promise.all([t.e("common/vendor"),t.e("components/plugin/simple-address")]).then(function(){return resolve(t("618a"))}.bind(null,t)).catch(t.oe)},h=function(){t.e("components/app-area-sel").then(function(){return resolve(t("62ec"))}.bind(null,t)).catch(t.oe)},b=function(){t.e("components/app-formRadio-btn").then(function(){return resolve(t("c6ee"))}.bind(null,t)).catch(t.oe)},g=function(){Promise.all([t.e("common/vendor"),t.e("components/app-address-group")]).then(function(){return resolve(t("cdfa"))}.bind(null,t)).catch(t.oe)},y=function(){t.e("components/app-send-time").then(function(){return resolve(t("0a72"))}.bind(null,t)).catch(t.oe)},O=function(){Promise.all([t.e("common/vendor"),t.e("components/app-bind-info")]).then(function(){return resolve(t("e6d7"))}.bind(null,t)).catch(t.oe)},P=function(){Promise.all([t.e("common/vendor"),t.e("components/app-form-send")]).then(function(){return resolve(t("a5ce"))}.bind(null,t)).catch(t.oe)},I=t("90f4"),S={name:"BillingAffirm",components:{TuiListCell:m,AppAvatarModule:p,SimpleAddress:v,AppAreaSel:h,appFormRadioBtn:b,appAddressGroup:g,appSendTime:y,appFormSend:P,appBindInfo:O},mixins:[r.default],data:function(){return{pageType:"customer",autoLoad:!1,form:{shopId:"",shopName:"",receiveProvince:"",receiveCity:"",receiveFloor:"",receiveAddress:"",receiveLong:"",receiveLat:"",sendType:"3",sendSide:"2",sendDate:"",sendTime:"",sendCost:"",customId:"",product:"",nickname:"",mobile:""},showCustomer:!1}},onLoad:function(e){var n=e.shopId;n&&(this.shopId=n)},computed:f({},(0,c.mapGetters)(["getLoginInfo"])),methods:{init:function(){this._getDet()},_getDet:function(){var n=this,t=e.getStorageSync("modifyShopB");this.$util.isEmpty(t)||Object.keys(this.form).forEach((function(e,o){n.form[e]=t[e]}))},changeCustomerFn:function(e){console.log("changeCustomerFn",e),this.form.customId=e.id,this.form.customName=e.name},confirmFn:function(n){var t=this;(0,i.createOrder)(n).then((function(n){t.resetSelectInfoByType(t.pageType);var o=n.data,r=o.orderId,i=o.orderSn,c="/admin/billing/result?orderId=".concat(r,"&orderSn=").concat(i);e.redirectTo({url:c,success:function(e){},fail:function(){},complete:function(){}})}))},bindInfoEvent:function(e){this.form.nickname=e.nickName,this.form.mobile=e.mobile},formSubmit:function(){var e=s(o.default.mark((function e(n){var t,r,i,c,u;return o.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:try{t=[{name:"nickname",rule:["required"],msg:["请输入昵称"]},{name:"mobile",rule:["required"],msg:["请输入手机号"]},{name:"sendTime",rule:["required"],msg:["请输入具体时间"]}],r=this.form,"1"==r.sendType||(i=[{name:"receiveProvince",rule:["required"],msg:["请选择地址"]},{name:"receiveAddress",rule:["required"],msg:["请填写详细地址"]},{name:"receiveFloor",rule:["required"],msg:["请输入门牌号"]}],t=t.concat(i)),c=this.selectList.map((function(e){return{productId:e.id,num:e.bigCount,smallNum:e.smallCount}})),r.product=JSON.stringify(c),r.shopId=this.shopId,r.customId=this.getLoginInfo.id,1==this.waySele&&(r.sendCost="免运费"),console.log(9999,r),u=I.validation(r,t),u?this.$msg(u):this.confirmFn(r)}catch(n){console.log(999999,n)}case 1:case"end":return e.stop()}}),e,this)})));function n(n){return e.apply(this,arguments)}return n}(),gobackEvent:function(){e.navigateBack({delta:1})}}};n.default=S}).call(this,t("934e")["default"])}},[["50d7","common/runtime","common/vendor"]]]);