| 1 |
- require('common/vendor.js');(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["admin/breakage/confirm"],{"0439":function(e,t,n){},"42f8":function(e,t,n){"use strict";(function(e){n("6cdc");i(n("4a15"));var t=i(n("c330"));function i(e){return e&&e.__esModule?e:{default:e}}e(t.default)}).call(this,n("f3be")["createPage"])},4689:function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=s(n("4838")),o=s(n("e350")),r=n("3a10"),c=n("7736");function s(e){return e&&e.__esModule?e:{default:e}}function a(e,t,n,i,o,r,c){try{var s=e[r](c),a=s.value}catch(u){return void n(u)}s.done?t(a):Promise.resolve(a).then(i,o)}function u(e){return function(){var t=this,n=arguments;return new Promise((function(i,o){var r=e.apply(t,n);function c(e){a(r,i,o,c,s,"next",e)}function s(e){a(r,i,o,c,s,"throw",e)}c(void 0)}))}}function f(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 l(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?f(Object(n),!0).forEach((function(t){m(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function m(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var d=function(){n.e("components/plugin/list-cell").then(function(){return resolve(n("1861"))}.bind(null,n)).catch(n.oe)},p=function(){Promise.all([n.e("common/vendor"),n.e("components/module/app-avatar")]).then(function(){return resolve(n("d84d"))}.bind(null,n)).catch(n.oe)},h=function(){Promise.all([n.e("common/vendor"),n.e("components/plugin/simple-address")]).then(function(){return resolve(n("618a"))}.bind(null,n)).catch(n.oe)},v=function(){n.e("components/app-area-sel").then(function(){return resolve(n("62ec"))}.bind(null,n)).catch(n.oe)},b=function(){n.e("components/app-formRadio-btn").then(function(){return resolve(n("c6ee"))}.bind(null,n)).catch(n.oe)},g=function(){Promise.all([n.e("common/vendor"),n.e("components/app-address-group")]).then(function(){return resolve(n("cdfa"))}.bind(null,n)).catch(n.oe)},y=function(){n.e("components/app-send-time").then(function(){return resolve(n("0a72"))}.bind(null,n)).catch(n.oe)},P=function(){n.e("components/app-form-send").then(function(){return resolve(n("a5ce"))}.bind(null,n)).catch(n.oe)},I=n("90f4"),C={name:"BillingAffirm",components:{TuiListCell:d,AppAvatarModule:p,SimpleAddress:h,AppAreaSel:v,appFormRadioBtn:b,appAddressGroup:g,appSendTime:y,appFormSend:P},mixins:[o.default],data:function(){return{autoLoad:!1,isBilling:!1,payWayList:[{name:"微信",id:0},{name:"支付宝",id:1},{name:"现金",id:4},{name:"银行卡",id:5}],payWayindex:0,form:{debt:1,shopId:"",shopName:"",receiveProvince:"",receiveCity:"",receiveFloor:"",receiveAddress:"",receiveLong:"",receiveLat:"",sendType:2,sendSide:"2",sendDate:"",sendTime:"",sendCost:"",customId:"",product:"",remark:"",payWay:0,needPrint:1},money:"",modifyPrice:0,showCustomer:!1,pageType:"wastage"}},onLoad:function(t){this.getMerchantInfo?e.setNavigationBarTitle({title:this.getMerchantInfo.name}):this.initMerchantInfo().then((function(t){e.setNavigationBarTitle({title:t.name})})),this.modifyPrice=this.allPrice.toFixed(2),this.courier(2),t.customId&&(this.form.customId=t.customId),t.customName&&(this.form.customName=t.customName)},onShow:function(){this.$util.isEmpty(e.getStorageSync("newClient"))||(this.showCustomer=!0)},onUnload:function(){e.removeStorageSync("newClient")},computed:l({},(0,c.mapGetters)(["getMerchantInfo","getLoginInfo"])),methods:l(l({},(0,c.mapActions)(["initMerchantInfo"])),{},{init:function(){this._getDet()},selectCustom:function(){this.$msg("客户不能修改")},payWayChange:function(e){var t=e.detail.value;this.payWayindex=t,this.form.payWay=this.payWayList[t].id},countAllPrices:function(e){this.allPrices=this.allPrices+Number(this.form.sendCost);var t=this.allPrice.toFixed(2);this.modifyPrice=(Number(t)+Number(this.form.sendCost)).toFixed(2)},setPayWay:function(e){this.form.payWay=e},courier:function(e){this.form.sendType=e,2===e?this.form.sendCost="":1==e&&(this.form.sendCost=this.money)},sendCostBlur:function(){1===this.form.sendType&&(this.money=this.form.sendCost)},_getDet:function(){var t=this,n=e.getStorageSync("modifyShopB");this.$util.isEmpty(n)||Object.keys(this.form).forEach((function(e,i){t.form[e]=n[e]}))},changeCustomerFn:function(e){var t=this.selectList.map((function(e){return{productId:e.id,bigNum:e.bigCount,smallNum:e.smallCount,classId:e.classId,itemId:e.itemId}}));e.id,JSON.stringify(t),e.province,e.city,e.address,e.floor,e.long,e.lat;this.form.sendCost="",this.form.customId=e.id,this.form.customName=e.name},affirmFormSubmit:function(){var t=this;if(this.isBilling){var n=[{name:"customId",rule:["required"],msg:["请选择客户"]}],i=I.validation(this.form,n);if(i)return this.$msg(i),!1;e.showModal({title:"提示",content:"确认打印订单?",cancelText:"不需要",confirmText:"打印",confirmColor:"#39B54A",cancelColor:"#777777",success:function(e){e.confirm?(t.form.needPrint=1,t.formSubmit()):(t.form.needPrint=2,t.formSubmit())}})}else{var o=0,c=this,s=this.selectList.map((function(e){return o+=e.bigCount*Number(e.bigPrice),o+=e.smallCount*Number(e.smallPrice),{productId:e.id,bigNum:e.bigCount,smallNum:e.smallCount,classId:e.classId,itemId:e.itemId,price:e.userPrice>0?e.userPrice:o}}));e.showModal({title:"提示",content:"确认报损?",success:function(t){t.confirm&&(0,r.wastage)({product:JSON.stringify(s),remark:c.form.remark}).then((function(t){c.removeMemory();var n=t.data,i=(n.id,n.orderSn,"/admin/breakage/result");e.redirectTo({url:i,success:function(e){},fail:function(){},complete:function(){}})}))}})}},formSubmit:function(){var e=u(i.default.mark((function e(){var t,n,o,r;return i.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(e.prev=0,this.form,t=this.form,n=0,o=this.selectList.map((function(e){return n+=e.bigCount*Number(e.bigPrice),n+=e.smallCount*Number(e.smallPrice),{productId:e.id,bigNum:e.bigCount,smallNum:e.smallCount,classId:e.classId,itemId:e.itemId,price:e.userPrice>0?e.userPrice:n}})),t.product=JSON.stringify(o),this.getMerchantInfo){e.next=9;break}return e.next=9,this.initMerchantInfo();case 9:t.shopId=this.getMerchantInfo.id,r=I.validation(t,[]),r&&this.$msg(r),e.next=17;break;case 14:e.prev=14,e.t0=e["catch"](0),console.log(999999,e.t0);case 17:case"end":return e.stop()}}),e,this,[[0,14]])})));function t(){return e.apply(this,arguments)}return t}(),gobackEvent:function(){e.navigateBack({delta:1})}})};t.default=C}).call(this,n("f3be")["default"])},"6cfa":function(e,t,n){"use strict";var i=n("0439"),o=n.n(i);o.a},a93e:function(e,t,n){"use strict";var i;n.d(t,"b",(function(){return o})),n.d(t,"c",(function(){return r})),n.d(t,"a",(function(){return i}));var o=function(){var e=this,t=e.$createElement;e._self._c},r=[]},c330:function(e,t,n){"use strict";n.r(t);var i=n("a93e"),o=n("fdc9");for(var r in o)["default"].indexOf(r)<0&&function(e){n.d(t,e,(function(){return o[e]}))}(r);n("6cfa");var c,s=n("0095"),a=Object(s["a"])(o["default"],i["b"],i["c"],!1,null,"28b09317",null,!1,i["a"],c);t["default"]=a.exports},fdc9:function(e,t,n){"use strict";n.r(t);var i=n("4689"),o=n.n(i);for(var r in i)["default"].indexOf(r)<0&&function(e){n.d(t,e,(function(){return i[e]}))}(r);t["default"]=o.a}},[["42f8","common/runtime","common/vendor"]]]);
|