bztang-admin/addons/yun_shop/static/app/js/chunk-766cf4e5.a50dc69e.js

1 line
13 KiB
JavaScript

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-766cf4e5"],{"3f9f":function(t,e,i){"use strict";i("d369")},"940f":function(t,e,i){var s=i("24fb");e=s(!1),e.push([t.i,".orderBox[data-v-67659d46]{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-justify-content:space-around;-ms-flex-pack:distribute;justify-content:space-around;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;margin-bottom:1rem}.orderBox .selectBtn[data-v-67659d46]{border:1px solid var(--color);color:var(--color);border-radius:1rem;padding:.15rem .75rem}.orderPopup[data-v-67659d46]{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;overflow:hidden;padding-bottom:1rem}.orderPopup[data-v-67659d46],.orderPopup .ctitle[data-v-67659d46]{-webkit-box-sizing:border-box;box-sizing:border-box}.orderPopup .ctitle[data-v-67659d46]{text-align:center;font-weight:700;font-size:1rem;padding:.85rem}.orderPopup .list[data-v-67659d46]{-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1;width:100%;margin-top:.5rem;padding:0 .55rem;-webkit-box-sizing:border-box;box-sizing:border-box;overflow-y:scroll}.lis[data-v-67659d46]{margin-bottom:.5rem;padding:.5rem;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;overflow:hidden;background:#fff;border-radius:.3125rem}.lis[data-v-67659d46],.lis .lis_b[data-v-67659d46]{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.lis .lis_b[data-v-67659d46]{width:100%;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between}.lis .lis_b img[data-v-67659d46]{width:4rem;height:3.5rem;margin:0;margin-right:.75rem;border-radius:.325rem}.lis .lis_b .lis_b_c[data-v-67659d46]{-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between;font-size:.65rem;overflow:hidden}.lis .lis_b .lis_b_c .lis_b_c_option[data-v-67659d46],.lis .lis_b .lis_b_c .lis_b_c_status[data-v-67659d46],.lis .lis_b .lis_b_c .lis_b_c_title[data-v-67659d46]{text-align:left;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.lis .lis_b .lis_b_btn[data-v-67659d46]{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;margin-left:.5rem}.lis .lis_b .lis_b_btn .sbtn[data-v-67659d46]{border:1px solid var(--color);color:var(--color);border-radius:1rem;padding:.15rem .5rem}.lis .lis_top[data-v-67659d46]{width:100%;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;overflow:hidden;margin-bottom:1rem}.lis .lis_top .sn[data-v-67659d46]{-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:left}.lis .lis_top .lis_top_r[data-v-67659d46]{-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0;margin-left:.5rem}.bgBox[data-v-67659d46]{border-radius:.75rem;background:#fff;padding:1.8rem .75rem;-webkit-box-sizing:border-box;box-sizing:border-box}.noDev[data-v-67659d46]{padding-top:0;overflow:hidden}.img[data-v-67659d46]{margin-top:1.9rem;margin-bottom:2rem}.img img[data-v-67659d46]{width:5rem;height:5rem}.btn[data-v-67659d46]{width:12.5rem;height:2.5rem;background:var(--color);border-radius:1.25rem;font-weight:500;color:#fff;font-size:1rem;line-height:2.5rem;margin:0 auto}.cancel[data-v-67659d46]{background:#fff;border:.03rem solid var(--color);margin-top:1.19rem;color:var(--color)}.equipment[data-v-67659d46]{margin:.75rem .75rem 2.34rem .75rem;border-radius:.63rem;background:#f7f7f7;height:5rem;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center}.equipment .equipment_txt[data-v-67659d46]{color:#00001c;font-weight:400;font-size:.94rem}.dt[data-v-67659d46]{font-weight:500;font-size:.81rem;margin-bottom:.66rem;margin-top:.81rem}.da[data-v-67659d46]{color:#6e6e79;font-size:.75rem}",""]),t.exports=e},d369:function(t,e,i){var s=i("940f");s.__esModule&&(s=s.default),"string"===typeof s&&(s=[[t.i,s,""]]),s.locals&&(t.exports=s.locals);var o=i("499e").default;o("5a550255",s,!0,{sourceMap:!1,shadowMode:!1})},d80c:function(t,e,i){"use strict";i.r(e);var s=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"bindCode",style:{"--color":""+t.background_color}},[t.dev?i("div",{staticClass:"bgBox"},[i("div",{staticClass:"txt"},[t._v("设备类型:"+t._s(t.info.machine_type_name))]),t._m(0),t.devStatus?t._e():i("div",{staticClass:"btn",on:{click:t.qrcode}},[t._v("扫描二维码")]),t.devStatus?i("div",{staticClass:"btn",on:{click:t.noDevBack}},[t._v("已绑定")]):t._e()]):t.pjstatus?i("div",{staticClass:"bgBox"},[i("div",{staticClass:"txt"},[t._v("配件:"+t._s(this.$route.query.noTitle))]),t._m(1),i("div",{staticClass:"btn",on:{click:t.qrcode}},[t._v("扫描二维码")])]):i("div",{staticClass:"bgBox noDev",staticStyle:{background:"#f7f7f7"}},[i("div",{staticClass:"equipment"},[i("div",{staticClass:"equipment_txt"},[t._v("设备类型:"+t._s(t.info.machine_type_name))]),i("div",{staticClass:"equipment_txt"},[t._v("设备编码:"+t._s(t.info.local_code))])]),t.order_goods_id?t._e():i("div",{staticClass:"orderBox"},[i("span",[t._v("请选择订单")]),i("div",{staticClass:"selectBtn",on:{click:t.selectShowTap}},[t._v("选择")])]),t.order_goods_id?i("div",t._l(t.checkArr,(function(e,s){return i("div",{key:s,staticClass:"lis"},[i("div",{staticClass:"lis_top"},[i("div",{staticClass:"sn"},[t._v("订单编号:"+t._s(e.order_sn))]),i("div",{staticClass:"lis_top_r"},[t._v("ID:"+t._s(e.order_id))])]),e.has_one_goods?i("div",{staticClass:"lis_b"},[i("img",{attrs:{src:e.has_one_goods.thumb,alt:""}}),i("div",{staticClass:"lis_b_c"},[i("div",{staticClass:"lis_b_c_title"},[t._v(t._s(e.has_one_goods.title))]),i("div",{staticClass:"lis_b_c_status"},[t._v(t._s(e.has_one_goods.status_name))]),1==e.type?i("div",{staticClass:"lis_b_c_option"},[t._v("到期时间:"+t._s(e.end_time))]):t._e(),2==e.type?i("div",{staticClass:"lis_b_c_option"},[t._v("剩余天数:"+t._s(e.day))]):t._e()]),i("div",{staticClass:"lis_b_btn"},[i("div",{staticClass:"sbtn",on:{click:t.selectShowTap}},[t._v("更换")])])]):t._e()])})),0):t._e(),i("div",{staticClass:"txt",staticStyle:{"margin-bottom":"1.19rem"}},[t._v("是否绑定该设备?")]),i("div",{staticClass:"btn",on:{click:t.bindCode}},[t._v("确认")]),i("div",{staticClass:"btn cancel",on:{click:t.noDevBack}},[t._v("取消")])]),i("van-dialog",{attrs:{title:"是否绑定当前设备?","show-cancel-button":""},on:{confirm:t.bindCode,cancel:!1},model:{value:t.show,callback:function(e){t.show=e},expression:"show"}},[i("div",{staticClass:"dt"},[t._v("滤芯编码:"+t._s(t.showInfo.scanCode))]),i("div",{staticClass:"da"},[t._v("当前设备:"+t._s(t.showInfo.machine_type_name))]),i("div",{staticClass:"da"},[t._v("设备名称:"+t._s(t.showInfo.name))])]),i("van-popup",{style:{width:"85%",height:"60%",background:"#f6f6f6"},attrs:{closeable:"",round:""},model:{value:t.selectShow,callback:function(e){t.selectShow=e},expression:"selectShow"}},[i("div",{staticClass:"orderPopup"},[i("div",{staticClass:"ctitle"},[t._v("订单列表")]),i("div",{staticClass:"list"},t._l(t.orderList,(function(e,s){return i("div",{key:s,staticClass:"lis"},[i("div",{staticClass:"lis_top"},[i("div",{staticClass:"sn"},[t._v("订单编号:"+t._s(e.order_sn))]),i("div",{staticClass:"lis_top_r"},[t._v("ID:"+t._s(e.order_id))])]),e.has_one_goods?i("div",{staticClass:"lis_b"},[i("img",{attrs:{src:e.has_one_goods.thumb,alt:""}}),i("div",{staticClass:"lis_b_c"},[i("div",{staticClass:"lis_b_c_title"},[t._v(t._s(e.has_one_goods.title))]),i("div",{staticClass:"lis_b_c_status"},[t._v(t._s(e.has_one_goods.status_name))]),1==e.type?i("div",{staticClass:"lis_b_c_option"},[t._v("到期时间:"+t._s(e.end_time))]):t._e(),2==e.type?i("div",{staticClass:"lis_b_c_option"},[t._v("剩余天数:"+t._s(e.day))]):t._e()]),i("div",{staticClass:"lis_b_btn"},[i("div",{staticClass:"sbtn",on:{click:function(i){return t.chooseGood(e.order_goods_id)}}},[t._v("选择")])])]):t._e()])})),0)])])],1)},o=[function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"img"},[i("img",{attrs:{src:"https://mini-app-img-1251768088.cos.ap-guangzhou.myqcloud.com/images%2FdrinkMachind%2Ficon_scan%402x.png",alt:""}})])},function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"img"},[i("img",{attrs:{src:"https://mini-app-img-1251768088.cos.ap-guangzhou.myqcloud.com/images%2FdrinkMachind%2Ficon_scan%402x.png",alt:""}})])}],a=(i("b64b"),i("4de4"),i("d3b7"),i("ac1f"),i("5319"),i("14d9"),{data:function(){return{dev:!1,background_color:"#ffc11e",pjstatus:!1,info:[],headTitle:"绑定4G编码",show:!1,showInfo:[],devStatus:!1,selectShow:!1,orderList:[],order_goods_id:""}},activated:function(){this.$route.params.pj?(this.pjstatus=!0,this.headTitle="绑定配件"):(this.$route.params.dev&&(this.dev=!0),this.getData());try{this.background_color=JSON.parse(localStorage.getItem("yz_basic_info")).theme_color}catch(t){}},computed:{checkArr:function(){var t=this,e=this.orderList.filter((function(e){return e.order_goods_id==t.order_goods_id}));return e}},methods:{partBindPage:function(t){var e=this;$http.post("plugin.drink-machine.frontend.part.bindPage",{machine_id:this.$route.query.machine_id},"加载中...").then((function(i){1==i.result&&(e.show=!0,e.showInfo=i.data,e.showInfo.scanCode=t)}))},qrcode:function(){var t=this;wx.scanQRCode({needResult:1,scanType:["qrCode","barCode"],success:function(e){t.pjstatus?t.partBindPage(e.resultStr):t.bindCode(e.resultStr)},fail:function(t){}})},bindCode:function(t){var e,i,s=this;if(this.dev)e="plugin.drink-machine.frontend.factory.bind",i={local_code:this.$route.query.local_code,id:this.$route.query.id,created_at:this.$route.query.created_at,code:t};else if(this.pjstatus)e="",i={},e="plugin.drink-machine.frontend.part.bind",i={machine_id:this.$route.query.machine_id,part_no:this.$route.query.part_no,code:this.showInfo.scanCode};else{if(e="plugin.drink-machine.frontend.machine.bind",!this.order_goods_id)return void this.$toast("请选择订单");i={local_code:this.$route.query.local_code,id:this.$route.query.id,created_at:this.$route.query.created_at,order_goods_id:this.order_goods_id}}$http.get(e,i,"加载中...").then((function(t){if(1==t.result)if(s.dev)s.$toast(t.msg),t.data.bind_status&&(s.devStatus=!0);else{if(s.pjstatus)return void s.$dialog.alert({message:t.msg}).then((function(){s.$router.go(-1)}));s.$router.replace(s.fun.getUrl("drinkMachindIndex",{},{}))}else s.$toast(t.msg)}))},noDevBack:function(){this.$router.push(this.fun.getUrl("member",{},{}))},chooseGood:function(t){this.order_goods_id=t,this.selectShow=!1},getNext:function(){var t=this,e="plugin.drink-machine.frontend.machine.bindOrderList";$http.post(e,{machine_id:this.info.id},"加载中...").then((function(e){1==e.result?(t.orderList=e.data,t.selectShow=!0):t.$dialog.alert({message:e.msg}).then((function(){t.$router.push(t.fun.getUrl("member",{},{}))}))}))},selectShowTap:function(){this.getNext()},getData:function(){var t,e,i=this;this.dev?(t="plugin.drink-machine.frontend.factory.bindPage",e={local_code:this.$route.query.local_code,id:this.$route.query.id,created_at:this.$route.query.created_at}):(t="plugin.drink-machine.frontend.machine.bindPage",e={local_code:this.$route.query.local_code,id:this.$route.query.id,created_at:this.$route.query.created_at}),$http.post(t,e,"加载中...").then((function(t){if(1==t.result){if(i.info=t.data,1==t.data.bind_status&&i.dev)return void(i.devStatus=!0)}else i.$dialog.alert({message:t.msg}).then((function(){i.$router.push(i.fun.getUrl("member",{},{}))}))}))}}}),n=a,r=(i("3f9f"),i("2877")),d=Object(r["a"])(n,s,o,!1,null,"67659d46",null);e["default"]=d.exports}}]);