chunk-1bd6297f.ec3d5925.js 22 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-1bd6297f"],{"2a6e":function(e,t,a){"use strict";var n=a("db82"),r=a.n(n);r.a},c42e:function(e,t,a){"use strict";a.r(t);var n=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"app-container"},[a("div",{directives:[{name:"loading",rawName:"v-loading.fullscreen.lock",value:e.loadingFull,expression:"loadingFull",modifiers:{fullscreen:!0,lock:!0}}]}),e._v(" "),a("el-tabs",{model:{value:e.tabType,callback:function(t){e.tabType=t},expression:"tabType"}},[a("el-tab-pane",{attrs:{label:"未兑换",name:"2"}},[a("el-input",{staticStyle:{width:"250px"},attrs:{type:"text",placeholder:"请输入店铺名"},model:{value:e.listNoQuery.search_name,callback:function(t){e.$set(e.listNoQuery,"search_name",t)},expression:"listNoQuery.search_name"}}),e._v(" "),a("el-select",{model:{value:e.listNoQuery.type,callback:function(t){e.$set(e.listNoQuery,"type",t)},expression:"listNoQuery.type"}},[a("el-option",{attrs:{label:"工作室",value:"1"}}),e._v(" "),a("el-option",{attrs:{label:"体验店",value:"2"}}),e._v(" "),a("el-option",{attrs:{label:"优享店",value:"3"}})],1),e._v(" "),a("el-date-picker",{attrs:{type:"month",placeholder:"选择日期",format:"yyyy-MM","value-format":"yyyy-MM"},model:{value:e.listNoQuery.month,callback:function(t){e.$set(e.listNoQuery,"month",t)},expression:"listNoQuery.month"}}),e._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:function(t){e.listNoQuery.page_index=1,e.getNoList()}}},[e._v("搜索")]),e._v(" "),a("el-table",{staticClass:"tableBorder",staticStyle:{margin:"10px 0 0 0"},attrs:{data:e.Nolist,"header-cell-style":{background:"#f8fbfc"},border:"",stripe:""}},[a("el-table-column",{attrs:{prop:"name",align:"center",label:"店铺名"}}),e._v(" "),a("el-table-column",{attrs:{prop:"name",align:"center",label:"店铺类型"},scopedSlots:e._u([{key:"default",fn:function(t){var a=t.row;return[e._v(e._s(e._f("shopType")(a.type)))]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"购买商品",align:"left"},scopedSlots:e._u([{key:"default",fn:function(t){var n=t.row;return[n.goods&&n.goods.length>0?a("div",{staticClass:"goods_list"},e._l(n.goods,(function(t,n){return a("p",{key:n},[e._v(e._s(t.main_attr+"-总价: "+t.account+"-数量: "+t.total+"-单位:"+t.unit))])})),0):e._e()]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"操作",align:"center",width:"120"},scopedSlots:e._u([{key:"default",fn:function(t){var n=t.row;return[a("el-button",{attrs:{type:"primary",size:"small"},on:{click:function(t){return e.toExchange(n)}}},[e._v("兑换")])]}}])})],1),e._v(" "),a("pagination",{attrs:{total:e.Nototal,limit:e.listNoQuery.page_size,page:e.listNoQuery.page_index},on:{pagination:e.changeNoPagination,"update:limit":e.changeNoPagination}}),e._v(" "),a("el-dialog",{attrs:{title:"兑换商品",visible:e.exchangeVis},on:{"update:visible":function(t){e.exchangeVis=t}}},[1===+e.exchangeType?a("div",[a("div",{staticClass:"exchangeTip"},[a("p",{staticClass:"tip",staticStyle:{"margin-right":"20px"}},[e._v("可兑换现金: "+e._s(Math.floor(e.exchangeGzsAccount))+"元")]),e._v(" "),a("p",{staticClass:"tip",class:e.exchangeGzsWillAccount<=e.exchangeGzsAccount?"success":"danger"},[e._v("\n 已兑换现金: "+e._s(Math.floor(e.exchangeGzsWillAccount))+"元\n ")]),e._v(" "),e.exchangeGzsWillAccount>e.exchangeGzsAccount?a("p",{staticClass:"tip danger"},[e._v("(已超过兑换金额上限)")]):e._e()]),e._v(" "),a("el-table",{staticClass:"tableBorder",staticStyle:{"margin-bottom":"10px"},attrs:{data:e.exchangeGzsList,"header-cell-style":{background:"#f8fbfc"},border:"",stripe:""}},[a("el-table-column",{attrs:{prop:"name",label:"可兑换商品名",align:"center"}}),e._v(" "),a("el-table-column",{attrs:{prop:"price",label:"可兑换商品价格",align:"center"}}),e._v(" "),a("el-table-column",{attrs:{label:"可兑换商品数量"},scopedSlots:e._u([{key:"default",fn:function(t){var n=t.row;return[a("el-input-number",{staticStyle:{width:"100%"},attrs:{precision:0,step:1,min:0,max:99999},on:{blur:e.inputBlur},model:{value:n.number,callback:function(t){e.$set(n,"number",t)},expression:"row.number"}})]}}],null,!1,70278594)})],1),e._v(" "),a("el-button",{attrs:{type:"primary",size:"small"},on:{click:e.submitGZSExchange}},[e._v("兑换")])],1):2===+e.exchangeType?a("div",[a("el-table",{staticClass:"tableBorder",staticStyle:{"margin-bottom":"10px"},attrs:{data:e.exchangeTydList,"header-cell-style":{background:"#f8fbfc"},border:"",stripe:""}},[a("el-table-column",{attrs:{prop:"name",label:"商品名",align:"center"}}),e._v(" "),a("el-table-column",{attrs:{prop:"total",label:"总数量",align:"center"}}),e._v(" "),a("el-table-column",{attrs:{prop:"unit",label:"单位",align:"center"}}),e._v(" "),a("el-table-column",{attrs:{label:"可兑换数量",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){var n=t.row;return[a("el-input-number",{staticStyle:{width:"100%"},attrs:{size:"small",precision:0,step:1,min:0,max:99999},on:{blur:e.inputBlur},model:{value:n.number,callback:function(t){e.$set(n,"number",t)},expression:"row.number"}})]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"price",label:"每件/套提成1",align:"center"}})],1),e._v(" "),a("el-button",{attrs:{type:"primary",size:"small"},on:{click:e.submitTydExchange}},[e._v("兑换")])],1):3===+e.exchangeType?a("div",[a("p",{staticClass:"exchange_title"},[e._v("兑换物品")]),e._v(" "),a("div",{staticClass:"exchangeTip"},[a("p",{staticClass:"tip",staticStyle:{"margin-right":"20px"}},[e._v("可兑换现金: "+e._s(e.exchangeYxdAccount))]),e._v(" "),a("p",{staticClass:"tip",class:e.exchangeYxdWillAccount<=e.exchangeYxdAccount?"success":"danger"},[e._v("已兑换现金: "+e._s(e.exchangeYxdWillAccount))]),e._v(" "),e.exchangeYxdWillAccount>e.exchangeYxdAccount?a("p",{staticClass:"tip danger"},[e._v("(已超过兑换金额上限)")]):e._e()]),e._v(" "),a("el-table",{staticClass:"tableBorder",staticStyle:{"margin-bottom":"10px"},attrs:{data:e.yxdExchangeList1,"header-cell-style":{background:"#f8fbfc"},border:"",stripe:""}},[a("el-table-column",{attrs:{prop:"name",label:"可兑换商品名",align:"center"}}),e._v(" "),a("el-table-column",{attrs:{prop:"price",label:"可兑换商品价格",align:"center"}}),e._v(" "),a("el-table-column",{attrs:{label:"可兑换商品数量"},scopedSlots:e._u([{key:"default",fn:function(t){var n=t.row;return[a("el-input-number",{staticStyle:{width:"100%"},attrs:{precision:0,step:1,min:0,max:99999},on:{blur:e.inputBlur},model:{value:n.number,callback:function(t){e.$set(n,"number",t)},expression:"row.number"}})]}}])})],1),e._v(" "),a("div",{staticClass:"line"}),e._v(" "),a("p",{staticClass:"exchange_title"},[e._v("兑换现金")]),e._v(" "),a("el-table",{staticClass:"tableBorder",staticStyle:{"margin-bottom":"10px"},attrs:{data:e.yxdExchangeList2,"header-cell-style":{background:"#f8fbfc"},border:"",stripe:""}},[a("el-table-column",{attrs:{prop:"name",label:"商品名",align:"center"}}),e._v(" "),a("el-table-column",{attrs:{prop:"total",label:"总数量",align:"center"}}),e._v(" "),a("el-table-column",{attrs:{prop:"unit",label:"单位",align:"center"}}),e._v(" "),2!==e.exchangeYxdPriceType?a("el-table-column",{attrs:{label:"可兑换数量1",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){var n=t.row;return[a("el-input-number",{staticStyle:{width:"100%"},attrs:{precision:0,step:1,min:0,max:99999},on:{blur:e.inputBlur},model:{value:n.number1,callback:function(t){e.$set(n,"number1",t)},expression:"row.number1"}})]}}],null,!1,4238297587)}):e._e(),e._v(" "),2!==e.exchangeYxdPriceType?a("el-table-column",{attrs:{prop:"price1",label:"每件/套提成1",align:"center"}}):e._e(),e._v(" "),1!==e.exchangeYxdPriceType?a("el-table-column",{attrs:{label:"可兑换数量2",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){var n=t.row;return[a("el-input-number",{staticStyle:{width:"100%"},attrs:{precision:0,step:1,min:0,max:99999},on:{blur:e.inputBlur},model:{value:n.number2,callback:function(t){e.$set(n,"number2",t)},expression:"row.number2"}})]}}],null,!1,3118150192)}):e._e(),e._v(" "),1!==e.exchangeYxdPriceType?a("el-table-column",{attrs:{prop:"price2",label:"每件/套提成2",align:"center"}}):e._e()],1),e._v(" "),a("el-button",{attrs:{type:"primary",size:"small"},on:{click:e.submitYxdExchange}},[e._v("兑换")])],1):e._e()]),e._v(" "),a("el-dialog",{attrs:{title:"优享店兑换",visible:e.yxdExchangeTypeVis,"before-close":e.resetYxd},on:{"update:visible":function(t){e.yxdExchangeTypeVis=t}}},[a("el-form",{attrs:{"label-width":"120px"}},[a("el-form-item",{attrs:{label:"兑换类型:"}},[a("el-radio-group",{model:{value:e.yxdExchangeType,callback:function(t){e.yxdExchangeType=t},expression:"yxdExchangeType"}},[a("el-radio",{attrs:{label:1}},[e._v("兑换物")]),e._v(" "),a("el-radio",{attrs:{label:2}},[e._v("兑换现金")])],1)],1),e._v(" "),a("el-form-item",[a("el-button",{attrs:{type:"primary",size:"small"},on:{click:e.sureYxdType}},[e._v("确认")]),e._v(" "),a("el-button",{attrs:{size:"small"},on:{click:e.resetYxd}},[e._v("取消")])],1)],1)],1)],1),e._v(" "),a("el-tab-pane",{attrs:{label:"已兑换",name:"1"}},[a("el-input",{staticStyle:{width:"250px"},attrs:{type:"text",placeholder:"请输入店铺名"},model:{value:e.listQuery.search_name,callback:function(t){e.$set(e.listQuery,"search_name",t)},expression:"listQuery.search_name"}}),e._v(" "),a("el-select",{model:{value:e.listQuery.type,callback:function(t){e.$set(e.listQuery,"type",t)},expression:"listQuery.type"}},[a("el-option",{attrs:{label:"工作室",value:"1"}}),e._v(" "),a("el-option",{attrs:{label:"体验店",value:"2"}}),e._v(" "),a("el-option",{attrs:{label:"优享店",value:"3"}})],1),e._v(" "),a("el-date-picker",{attrs:{type:"month",placeholder:"选择日期",format:"yyyy-MM","value-format":"yyyy-MM"},model:{value:e.listQuery.month,callback:function(t){e.$set(e.listQuery,"month",t)},expression:"listQuery.month"}}),e._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:function(t){e.listQuery.page_index=1,e.getList()}}},[e._v("搜索")]),e._v(" "),a("el-table",{staticClass:"tableBorder",staticStyle:{margin:"10px 0 0 0"},attrs:{data:e.list,"header-cell-style":{background:"#f8fbfc"},border:"",stripe:""}},[a("el-table-column",{attrs:{prop:"name",align:"center",label:"店铺名"}}),e._v(" "),a("el-table-column",{attrs:{prop:"name",align:"center",label:"店铺类型"},scopedSlots:e._u([{key:"default",fn:function(t){var a=t.row;return[e._v(e._s(e._f("shopType")(a.type)))]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"当月业绩",align:"left"},scopedSlots:e._u([{key:"default",fn:function(t){var n=t.row;return[n.rewards&&n.rewards.length>0?a("div",{staticClass:"goods_list"},e._l(n.rewards.slice(0,1),(function(t,n){return a("div",{key:n},e._l(JSON.parse(t.content),(function(t,n){return a("p",{key:n},[e._v("\n "+e._s(t.main_attr+"-总价: "+t.account+"-数量: "+t.total+"-单位:"+t.unit)+"\n ")])})),0)})),0):e._e()]}}])}),e._v(" "),1!==+e.exchangedType?a("el-table-column",{attrs:{label:"已兑换现金",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){var a=t.row;return[e._v("\n "+e._s(2===+e.exchangedType?a.rewards[0].money:(a.rewards[1].money?a.rewards[1].money:a.rewards[0].money)||0)+"\n ")]}}],null,!1,994437737)}):e._e(),e._v(" "),2!==+e.exchangedType?a("el-table-column",{attrs:{label:"已兑换商品",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){var n=t.row;return[a("el-button",{attrs:{type:"text"},on:{click:function(t){return e.seeExchangeInfo(n)}}},[e._v("查看兑换详情")])]}}],null,!1,282947307)}):e._e(),e._v(" "),a("el-table-column",{attrs:{label:"操作",align:"center",width:"120"},scopedSlots:e._u([{key:"default",fn:function(t){var n=t.row;return[a("el-button",{attrs:{type:"primary",size:"small"},on:{click:function(t){return e.cancelExchange(n)}}},[e._v("撤销兑换")])]}}])})],1),e._v(" "),a("pagination",{attrs:{total:e.total,limit:e.listQuery.page_size,page:e.listQuery.page_index},on:{pagination:e.changePagination,"update:limit":e.changePagination}})],1)],1),e._v(" "),a("el-dialog",{attrs:{title:"兑换商品",visible:e.exchangedInfoVis},on:{"update:visible":function(t){e.exchangedInfoVis=t}}},e._l(e.exchangedInfo,(function(t,n){return a("div",{key:n},[1===t.type?a("el-table",{staticClass:"tableBorder",staticStyle:{"margin-bottom":"10px"},attrs:{data:t.rewards,"header-cell-style":{background:"#f8fbfc"},border:"",stripe:""}},[a("el-table-column",{attrs:{prop:"name",label:"兑换商品名",align:"center"}}),e._v(" "),a("el-table-column",{attrs:{prop:"price",label:"兑换商品金额",align:"center"}}),e._v(" "),a("el-table-column",{attrs:{prop:"number",label:"兑换商品数量",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){var a=t.row;return[e._v("\n "+e._s(Number(a.number)||0)+"\n ")]}}],null,!0)})],1):e._e(),e._v(" "),2===+t.type&&3!==+e.listQuery.type?a("div",[3===+e.listQuery.type?a("el-table",{staticClass:"tableBorder",staticStyle:{"margin-bottom":"10px"},attrs:{data:t.rewards,"header-cell-style":{background:"#f8fbfc"},border:"",stripe:""}},[a("el-table-column",{attrs:{prop:"name",label:"商品名",align:"center"}}),e._v(" "),a("el-table-column",{attrs:{prop:"total",label:"总数量",align:"center"}}),e._v(" "),a("el-table-column",{attrs:{prop:"number1",label:"兑换数量1",align:"center"}}),e._v(" "),a("el-table-column",{attrs:{prop:"price1",label:"每件/套提成1",align:"center"}}),e._v(" "),a("el-table-column",{attrs:{prop:"number2",label:"兑换数量2",align:"center"}}),e._v(" "),a("el-table-column",{attrs:{prop:"price2",label:"每件/套提成2",align:"center"}})],1):e._e()],1):e._e()],1)})),0)],1)},r=[],l=(a("7f7f"),a("c5f6"),a("b775"));function s(e){return Object(l["a"])({url:"/store/get_store_reward_list",method:"get",params:e})}function i(e){return Object(l["a"])({url:"/store/get_store_no_reward_list",method:"get",params:e})}function c(e){return Object(l["a"])({url:"/store/get_store_info",method:"get",params:e})}function o(e){return Object(l["a"])({url:"/store/settlement",method:"post",data:e})}function u(e){return Object(l["a"])({url:"/store/undo_store_rewards_info",method:"post",data:e})}var d=a("8975"),g={name:"ShopExchange",filters:{shopType:function(e){var t;switch(+e){case 1:t="工作室";break;case 2:t="体验店";break;case 3:t="优享店";break;default:t="未知类型";break}return t}},data:function(){return{listQuery:{page_index:1,page_size:10,month:Object(d["formatter"])(new Date,"yyyy-MM"),search_name:"",type:"1"},listNoQuery:{page_index:1,page_size:10,month:Object(d["formatter"])(new Date,"yyyy-MM"),search_name:"",type:"1"},total:0,list:[],exchangeVis:!1,exchangeId:"",exchangeType:"",exchangeInfo:null,exchangeTydList:[],exchangeGzsList:[],exchangeGzsAccount:0,loadingFull:!1,yxdExchangeTypeVis:!1,yxdExchangeType:1,yxdExchangeItem:{},yxdExchangeList1:[],yxdExchangeList2:[],exchangeYxdAccount:0,exchangeYxdPriceType:null,tabType:"2",Nolist:[],Nototal:0,exchangedInfo:{},exchangedInfoVis:!1,willExchangeItem:{},exchangedType:"1"}},computed:{exchangeGzsWillAccount:function(){return Math.floor(this.exchangeGzsList.reduce((function(e,t){return e+(Number(t.number)||0)*Number(t.price)}),0))},exchangeYxdWillAccount:function(){return Math.floor(this.yxdExchangeList1.reduce((function(e,t){return e+(Number(t.number)||0)*Number(t.price)}),0))}},watch:{tabType:function(e,t){"1"===e?this.getList():this.getNoList()}},created:function(){this.getNoList()},methods:{inputBlur:function(e){e.target.value=e.target.value?e.target.value:0},cancelExchange:function(e){var t=this;this.$confirm("确认取消该兑换记录?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){u({month:t.listQuery.month,store_id:e.id}).then((function(e){200===e.code&&(t.$message.success(e.message),t.getList())}))})).catch((function(){}))},seeExchangeInfo:function(e){var t=this;this.exchangedInfo=e.rewards.map((function(e){return{type:e.type?e.type:+t.listQuery.type,rewards:e.rewards?JSON.parse(e.rewards):[]}})),console.log(this.exchangedInfo),this.exchangedInfoVis=!0},getNoList:function(){var e=this;this.loadingFull=!0,i(this.listNoQuery).then((function(t){e.loadingFull=!1,200===t.code?(e.Nolist=t.data.list,e.Nototal=t.data.total):e.$message.error(t.message)})).catch((function(){e.loadingFull=!1,e.$message.error("获取兑换列表失败")}))},getList:function(){var e=this;this.exchangedType=this.listQuery.type,this.loadingFull=!0,s(this.listQuery).then((function(t){e.loadingFull=!1,200===t.code?(e.list=t.data.list,e.total=t.data.total):e.$message.error(t.message)})).catch((function(){e.loadingFull=!1,e.$message.error("获取兑换列表失败")}))},changePagination:function(e){var t=e.page,a=e.limit;this.listQuery.page_size=a,this.listQuery.page_index=t,this.getList()},changeNoPagination:function(e){var t=e.page,a=e.limit;this.listNoQuery.page_size=a,this.listNoQuery.page_index=t,this.getNoList()},toExchange:function(e){if(!e.goods||0===e.goods.length)return this.$message.error("不存在可兑换商品"),!1;this.willExchangeItem=e,this.getWillExchangeInfo(e)},sureYxdType:function(){this.yxdExchangeItem.type=this.yxdExchangeType,this.getWillExchangeInfo(this.yxdExchangeItem)},resetYxd:function(){this.yxdExchangeType=1,this.yxdExchangeItem={},this.yxdExchangeTypeVis=!1},getWillExchangeInfo:function(e){var t=this;c({month:this.listNoQuery.month}).then((function(a){if(200===a.code)if(a.data.goods&&a.data.goods.length>0){if(t.exchangeType=e.type,t.exchangeId=e.id,t.exchangeInfo=e.goods,1===+e.type)t.exchangeGzsList=a.data.goods.map((function(e){return{name:e.name,price:e.price,number:0,id:e.id}})),t.exchangeGzsAccount=e.account*Number(a.data.account_rate);else if(2===+e.type)t.exchangeTydList=e.goods.map((function(e){return{name:e.main_attr,total:e.total,unit:e.unit,number:0,price:-1!==e.main_attr.indexOf("精装")?a.data.experience_hard:a.data.experience_other}}));else if(3===+e.type){t.yxdExchangeList1=a.data.goods.map((function(e){return{name:e.name,price:e.price,number:0,id:e.id}})),t.exchangeYxdAccount=e.account*Number(a.data.account_rate);var n=e.goods.reduce((function(e,t){var n=-1!==t.main_attr.indexOf("精装")?Number(t.total)*Number(a.data.enjoy_hard):Number(t.total)*Number(a.data.enjoy_other);return e+n}),0);Number(e.store_account)>=Number(e.decorate_account)?t.exchangeYxdPriceType=2:n+Number(e.store_account)>Number(e.decorate_account)?t.exchangeYxdPriceType=3:t.exchangeYxdPriceType=1,t.yxdExchangeList2=e.goods.map((function(e){return{name:e.main_attr,total:e.total,unit:e.unit,number1:0,price1:-1!==e.main_attr.indexOf("精装")?a.data.enjoy_hard:a.data.enjoy_other,number2:0,price2:-1!==e.main_attr.indexOf("精装")?a.data.over_enjoy_hard:a.data.over_enjoy_other}}))}t.exchangeVis=!0}else t.$message.error("该月份没有设置可兑换");else t.$message.error(a.message)})).catch((function(e){console.log(e),t.$message.error("兑换失败")}))},submitGZSExchange:function(){var e=this;return 0===this.exchangeGzsWillAccount?(this.$message.error("请填写兑换商品数量"),!1):this.exchangeGzsWillAccount>this.exchangeGzsAccount?(this.$message.error("兑换商品数量已超过兑换金额上限"),!1):void o({store_id:this.exchangeId,month:this.listNoQuery.month,info:this.exchangeInfo,goods:this.exchangeGzsList}).then((function(t){200===t.code?(e.$message.success(t.message),e.resetExchange(),e.getNoList()):e.$message.error(t.message)})).catch((function(){e.$message.error("兑换失败")}))},submitTydExchange:function(){var e=this,t=this.exchangeTydList.every((function(e){return 0===Number(e.number)}));if(t)return this.$message.error("请填写兑换数量"),!1;var a=this.exchangeTydList.some((function(e){return Number(e.number)>Number(e.total)}));if(a)return this.$message.error("可兑换数量超过最大数量"),!1;o({store_id:this.exchangeId,month:this.listNoQuery.month,info:this.exchangeInfo,goods:this.exchangeTydList}).then((function(t){200===t.code?(e.$message.success(t.message),e.resetExchange(),e.getNoList()):e.$message.error(t.message)})).catch((function(){e.$message.error("兑换失败")}))},resetExchange:function(){this.exchangeId="",this.exchangeType="",this.exchangeInfo=null,this.exchangeTydList=[],this.exchangeGzsList=[],this.exchangeGzsAccount=0,this.yxdExchangeList1=[],this.yxdExchangeList2=[],this.exchangeYxdAccount=0,this.exchangeYxdPriceType=null,this.exchangeVis=!1},submitYxdExchange:function(){var e,t=this;if(0===this.exchangeYxdWillAccount)return this.$message.error("兑换物: 请填写兑换商品数量"),!1;if(this.exchangeYxdWillAccount>this.exchangeYxdAccount)return this.$message.error("兑换物: 超过兑换商品数量已超过兑换金额上限"),!1;if(1===this.exchangeYxdPriceType?e=this.yxdExchangeList2.some((function(e){return Number(e.number1)>Number(e.total)})):2===this.exchangeYxdPriceType?e=this.yxdExchangeList2.some((function(e){return Number(e.number2)>Number(e.total)})):3===this.exchangeYxdPriceType&&(e=this.yxdExchangeList2.some((function(e){return Number(e.number1)+Number(e.number2)>Number(e.total)}))),e)return this.$message.error("兑换现金: 超过可兑换数量超过最大数量"),!1;if(3===this.exchangeYxdPriceType){var a=this.yxdExchangeList2.reduce((function(e,t){var a=Number(t.number1)*Number(t.price1)+Number(t.number2)*Number(t.price2);return e+a}),0);if(a+Number(this.willExchangeItem.store_account)<Number(this.willExchangeItem.decorate_account))return this.$message.error("临界状态下,兑换现金, 金额必须超过临界上限"),!1}o({store_id:this.exchangeId,month:this.listNoQuery.month,info:this.exchangeInfo,goods:this.yxdExchangeList1,goods_price:this.yxdExchangeList2}).then((function(e){200===e.code?(t.$message.success(e.message),t.resetExchange(),t.getNoList()):t.$message.error(e.message)})).catch((function(){t.$message.error("兑换失败")}))}}},h=g,p=(a("2a6e"),a("2877")),m=Object(p["a"])(h,n,r,!1,null,"2e08ba87",null);t["default"]=m.exports},db82:function(e,t,a){}}]);