2 lines
7.1 KiB
JavaScript
2 lines
7.1 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-a6217b58"],{"2aa7":function(e,o,t){"use strict";t("dd48")},"696c":function(e,o,t){"use strict";t("8c8d")},"7de7":function(e,o,t){"use strict";t.r(o);var s=function(){var e=this,o=e._self._c;return o("div",[o("el-row",[o("el-col",{attrs:{span:24}},[o("el-card",{staticClass:"box-card"},[o("div",{staticClass:"clearfix flex justify-between",attrs:{slot:"header"},slot:"header"},[o("span",[e._v("赠送优惠券")]),o("el-button",{staticStyle:{float:"right",padding:"3px 0"},attrs:{type:"text"},on:{click:function(o){return e._closebuyGoldSendParking()}}},[o("i",{staticClass:"el-icon-close"}),e._v(" 返回 ")])],1),o("div",{staticClass:"card-body"},[o("el-form",{attrs:{"label-position":"right","label-width":"120px"}},[o("el-form-item",{attrs:{label:"优惠券"}},[o("el-input",{attrs:{disabled:"",placeholder:"优惠券"},model:{value:e.buyGoldSendParkingInfo.couponName,callback:function(o){e.$set(e.buyGoldSendParkingInfo,"couponName",o)},expression:"buyGoldSendParkingInfo.couponName"}})],1),o("el-form-item",{attrs:{label:"库存"}},[o("el-input",{attrs:{disabled:"",placeholder:"库存"},model:{value:e.buyGoldSendParkingInfo.stock,callback:function(o){e.$set(e.buyGoldSendParkingInfo,"stock",o)},expression:"buyGoldSendParkingInfo.stock"}})],1),o("el-form-item",{attrs:{label:"赠送数量"}},[o("el-input",{attrs:{type:"number",placeholder:"必填,请填写购买赠送数量"},on:{change:function(o){return e._changeGoldCount()}},model:{value:e.buyGoldSendParkingInfo.giftsCostMoney,callback:function(o){e.$set(e.buyGoldSendParkingInfo,"giftsCostMoney",e._n(o))},expression:"buyGoldSendParkingInfo.giftsCostMoney"}})],1),o("el-form-item",{attrs:{label:"车牌号"}},[o("el-input",{attrs:{placeholder:"车牌号请填写准确,否则道闸无法识别"},model:{value:e.buyGoldSendParkingInfo.licensePlate,callback:function(o){e.$set(e.buyGoldSendParkingInfo,"licensePlate",o)},expression:"buyGoldSendParkingInfo.licensePlate"}})],1),o("el-form-item",{attrs:{label:"电话"}},[o("el-input",{attrs:{placeholder:"电话请填写正确手机号"},model:{value:e.buyGoldSendParkingInfo.tel,callback:function(o){e.$set(e.buyGoldSendParkingInfo,"tel",o)},expression:"buyGoldSendParkingInfo.tel"}})],1)],1)],1)])],1)],1),o("el-row",[o("el-col",{attrs:{span:24}},[o("el-button",{staticClass:"float-right",attrs:{type:"primary"},on:{click:function(o){return e._tobuyGoldSendParking()}}},[o("i",{staticClass:"el-icon-check"}),e._v(" 赠送 ")])],1)],1),o("choose-shop-vip-user",{ref:"chooseShopVipUser",on:{chooseShopVipUser:e.handleChooseShopVipUser}})],1)},n=[],a=t("7323"),r=t("b775");function l(e){return new Promise((o,t)=>{Object(r["a"])({url:"/couponShopPool.listCouponShopPool",method:"get",params:{...e,shopId:Object(a["f"])()}}).then(e=>{const t=e.data;o(t)}).catch(e=>{t(e)})})}function i(e){return new Promise((o,t)=>{Object(r["a"])({url:"/cart/saveSendParking",method:"post",data:e,headers:{"Content-Type":"application/json"}}).then(e=>{const t=e.data;o(t)}).catch(e=>{t(e)})})}var c=t("7e59"),p={components:{ChooseShopVipUser:c["a"]},data(){return{buyGoldSendParkingInfo:{spId:"",actualPrice:"0",couponName:"0",stock:"0",giftsCostMoney:"1",licensePlate:"",tel:"",shopId:Object(a["f"])(),showRefresh:!1}}},created(){this.buyGoldSendParkingInfo.spId=this.$route.query.spId,this._listProducts()},methods:{async _listProducts(){try{const e=await l({page:1,spId:this.buyGoldSendParkingInfo.spId,row:1});Object.assign(this.buyGoldSendParkingInfo,e.data[0])}catch(e){console.error("请求失败:",e)}},_closebuyGoldSendParking(){this.$router.go(-1)},_changeGoldCount(){this.buyGoldSendParkingInfo.stock-this.buyGoldSendParkingInfo.giftsCostMoney<0&&this.$message.warning("库存不足,请先购买优惠卷!")},async _tobuyGoldSendParking(){if(this.buyGoldSendParkingInfo.stock-this.buyGoldSendParkingInfo.giftsCostMoney<0)this.$message.warning("库存不足,请先购买优惠卷!");else try{const e=await i(this.buyGoldSendParkingInfo);0===e.code&&(this.$message.success(e.msg),this._closebuyGoldSendParking())}catch(e){console.error("请求失败:",e),this.$message.error(e)}},handleChooseShopVipUser(e){console.log(e)}}},d=p,h=(t("696c"),t("2877")),u=Object(h["a"])(d,s,n,!1,null,"0cc8af76",null);o["default"]=u.exports},"7e59":function(e,o,t){"use strict";var s=function(){var e=this,o=e._self._c;return o("el-dialog",{attrs:{title:"选择会员信息",visible:e.dialogVisible,width:"80%"},on:{"update:visible":function(o){e.dialogVisible=o},close:e.handleClose}},[o("el-row",[o("el-col",{attrs:{span:24}},[o("el-card",{attrs:{header:"flex justify-between"}},[o("el-row",{attrs:{gutter:20}},[o("el-col",{attrs:{span:17}}),o("el-col",{attrs:{span:7}},[o("el-input-group",[o("el-input",{attrs:{placeholder:"输入会员信息名称",size:"small"},model:{value:e.chooseShopVipUserInfo._currentShopVipUserName,callback:function(o){e.$set(e.chooseShopVipUserInfo,"_currentShopVipUserName",o)},expression:"chooseShopVipUserInfo._currentShopVipUserName"}}),o("el-button",{attrs:{slot:"append",type:"primary",size:"small"},on:{click:e.queryShopVipUsers},slot:"append"},[e._v("查询")])],1)],1)],1),o("el-table",{staticStyle:{width:"100%","margin-top":"15px"},attrs:{data:e.chooseShopVipUserInfo.shopVipUsers,border:""}},[o("el-table-column",{attrs:{prop:"vipName",label:"会员名称",align:"center"}}),o("el-table-column",{attrs:{prop:"vipTel",label:"会员电话",align:"center"}}),o("el-table-column",{attrs:{prop:"sex",label:"性别",align:"center"},scopedSlots:e._u([{key:"default",fn:function(o){return[e._v(" "+e._s(1==o.row.sex?"男":"女")+" ")]}}])}),o("el-table-column",{attrs:{prop:"startTime",label:"入驻时间",align:"center"}}),o("el-table-column",{attrs:{label:"操作",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[o("el-button",{attrs:{type:"primary",size:"mini"},on:{click:function(o){return e.chooseShopVipUser(t.row)}}},[e._v("选择")])]}}])})],1)],1)],1)],1)],1)},n=[],a=t("7323"),r=t("b775");function l(e){return new Promise((o,t)=>{Object(r["a"])({url:"/shopVipUser.queryShopVipUser",method:"get",params:{...e,shopId:Object(a["f"])()}}).then(e=>{const t=e.data;o(t)}).catch(e=>{t(e)})})}var i={name:"ChooseShopVipUser",data(){return{dialogVisible:!1,chooseShopVipUserInfo:{shopVipUsers:[],_currentShopVipUserName:""}}},methods:{open(){this.dialogVisible=!0,this._refreshChooseShopVipUserInfo(),this._loadAllShopVipUserInfo(1,10,"")},async _loadAllShopVipUserInfo(e,o,t){try{const s=await l({page:e,row:o,shopId:Object(a["f"])(),name:t});this.chooseShopVipUserInfo.shopVipUsers=s.data}catch(s){console.error("请求失败:",s)}},chooseShopVipUser(e){Object.prototype.hasOwnProperty.call(e,"name")&&(e.shopVipUserName=e.name),this.$emit("chooseShopVipUser",e),this.dialogVisible=!1},queryShopVipUsers(){this._loadAllShopVipUserInfo(1,10,this.chooseShopVipUserInfo._currentShopVipUserName)},_refreshChooseShopVipUserInfo(){this.chooseShopVipUserInfo._currentShopVipUserName=""},handleClose(){this._refreshChooseShopVipUserInfo()}}},c=i,p=(t("2aa7"),t("2877")),d=Object(p["a"])(c,s,n,!1,null,"3880f13e",null);o["a"]=d.exports},"8c8d":function(e,o,t){},dd48:function(e,o,t){}}]);
|
|
//# sourceMappingURL=chunk-a6217b58.3cffe88e.js.map
|