2 lines
6.9 KiB
JavaScript
2 lines
6.9 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-7312a710"],{"0652":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:"flex justify-between",attrs:{slot:"header"},slot:"header"},[o("span",[e._v("赠送优惠券")]),o("div",[o("el-button",{attrs:{type:"primary",size:"small"},on:{click:e._closebuyGoldSend}},[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.buyGoldSendInfo.couponName,callback:function(o){e.$set(e.buyGoldSendInfo,"couponName",o)},expression:"buyGoldSendInfo.couponName"}})],1),o("el-form-item",{attrs:{label:"库存"}},[o("el-input",{attrs:{disabled:"",placeholder:"库存"},model:{value:e.buyGoldSendInfo.stock,callback:function(o){e.$set(e.buyGoldSendInfo,"stock",o)},expression:"buyGoldSendInfo.stock"}})],1),o("el-form-item",{attrs:{label:"赠送数量"}},[o("el-input",{attrs:{type:"number",placeholder:"必填,请填写购买赠送数量"},on:{change:e._changeGoldCount},model:{value:e.buyGoldSendInfo.goldCostMoney,callback:function(o){e.$set(e.buyGoldSendInfo,"goldCostMoney",o)},expression:"buyGoldSendInfo.goldCostMoney"}})],1),o("el-form-item",{attrs:{label:"会员"}},[o("el-col",{attrs:{span:18}},[o("el-input",{attrs:{disabled:"",placeholder:"会员"},model:{value:e.buyGoldSendInfo.vipName,callback:function(o){e.$set(e.buyGoldSendInfo,"vipName",o)},expression:"buyGoldSendInfo.vipName"}})],1),o("el-col",{attrs:{span:6}},[o("el-button",{attrs:{type:"primary"},on:{click:e._openAddChooseShopVipUserModel}},[o("i",{staticClass:"el-icon-check"}),e._v(" 选择 ")])],1)],1)],1)],1)])],1)],1),o("el-row",[o("el-col",{attrs:{span:24}},[o("div",{staticStyle:{"text-align":"right","margin-top":"20px"}},[o("el-button",{attrs:{type:"primary"},on:{click:e._tobuyGoldSend}},[o("i",{staticClass:"el-icon-check"}),e._v(" 赠送 ")])],1)])],1),o("choose-shop-vip-user",{ref:"chooseShopVipUser"})],1)},n=[],l=t("7323"),a=t("b63e"),r=t("7e59"),i={name:"BuyGoldSend",components:{ChooseShopVipUser:r["a"]},data(){return{buyGoldSendInfo:{spId:"",actualPrice:"0",couponName:"0",stock:"0",goldCostMoney:"0",vipId:"",vipName:"",shopId:"",showRefresh:!1}}},created(){this.buyGoldSendInfo.shopId=Object(l["f"])(),this.buyGoldSendInfo.spId=this.$route.query.spId,this._listProducts()},methods:{_listProducts(){const e={page:1,spId:this.buyGoldSendInfo.spId,row:1};Object(a["a"])(e).then(e=>{0===e.code&&Object.assign(this.buyGoldSendInfo,e.data[0])}).catch(e=>{console.error("请求失败:",e)})},_closebuyGoldSend(){this.$router.go(-1)},_openAddChooseShopVipUserModel(){this.$refs.chooseShopVipUser.open()},_changeGoldCount(){this.buyGoldSendInfo.stock-this.buyGoldSendInfo.goldCostMoney<0&&this.$message.warning("库存不足,请先购买优惠卷!")},_tobuyGoldSend(){this.buyGoldSendInfo.stock-this.buyGoldSendInfo.goldCostMoney<0?this.$message.warning("库存不足,请先购买优惠卷!"):this.buyGoldSendInfo.vipId?Object(a["b"])(this.buyGoldSendInfo).then(e=>{0===e.code&&(this.$message.success(e.msg),this._closebuyGoldSend())}).catch(e=>{console.error("请求失败:",e),this.$message.error(e)}):this.$message.warning("请选择会员信息")}}},c=i,p=(t("bded"),t("2877")),d=Object(p["a"])(c,s,n,!1,null,"8d4e3d16",null);o["default"]=d.exports},"2aa7":function(e,o,t){"use strict";t("dd48")},"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=[],l=t("7323"),a=t("b775");function r(e){return new Promise((o,t)=>{Object(a["a"])({url:"/shopVipUser.queryShopVipUser",method:"get",params:{...e,shopId:Object(l["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 r({page:e,row:o,shopId:Object(l["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},b63e:function(e,o,t){"use strict";t.d(o,"a",(function(){return n})),t.d(o,"b",(function(){return l}));var s=t("b775");function n(e){return new Promise((o,t)=>{Object(s["a"])({url:"/couponShopPool.listCouponShopPool",method:"get",params:e}).then(e=>{const t=e.data;o(t)}).catch(e=>{t(e)})})}function l(e){return new Promise((o,t)=>{Object(s["a"])({url:"/cart/sendGoldCount",method:"post",data:e}).then(e=>{const t=e.data;o(t)}).catch(e=>{t(e)})})}},bded:function(e,o,t){"use strict";t("f308")},dd48:function(e,o,t){},f308:function(e,o,t){}}]);
|
|
//# sourceMappingURL=chunk-7312a710.4d58a7a8.js.map
|