徐总多门店
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
jiuhaoshenghuo/public/view_admin/js/chunk-02c4af9c.44e6941c.js

1 lines
38 KiB

(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-02c4af9c"],{3715:function(t,e,r){},5671:function(t,e,r){"use strict";var a=r("2f62"),o=r("73f5");function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,a)}return r}function s(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?i(Object(r),!0).forEach((function(e){c(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):i(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function c(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=n(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var a=r.call(t,e||"default");if("object"!=n(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==n(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var u={name:"index",data:function(){return{selectEquips:[],selectEquipsIds:[],modal_loading:!1,treeSelect:[],formValidate:{page:1,limit:10,cate_id:[],name:""},total:0,loading:!1,grid:{xl:10,lg:10,md:12,sm:24,xs:24},tableList:[],columns:[{type:"selection",width:60,align:"center"},{title:"ID",key:"id",width:60},{title:"门店图片",slot:"image",minWidth:80},{title:"门店名称",key:"name",minWidth:80},{title:"门店分类",key:"cate_name",minWidth:80},{title:"联系电话",key:"phone",minWidth:90},{title:"门店地址",key:"address",ellipsis:!0,minWidth:150},{title:"营业时间",key:"day_time",minWidth:120},{title:"营业状态",key:"status_name",minWidth:80}]}},computed:s(s({},Object(a.e)("admin/layout",["isMobile"])),{},{labelWidth:function(){return this.isMobile?void 0:120},labelPosition:function(){return this.isMobile?"top":"right"}}),created:function(){},mounted:function(){this.getList(),this.goodsCategory()},methods:{sortData:function(){var t=this;this.selectEquipsIds.length&&this.tableList.forEach((function(e){t.selectEquipsIds.includes(e.id)&&(e._checked=!0)}))},TableSelectRow:function(t,e){this.selectEquipsIds.includes(e.id)||(this.selectEquipsIds.push(e.id),this.selectEquips.push(e))},TableSelectCancelRow:function(t,e){var r=this.selectEquipsIds.indexOf(e.id);-1!=r&&(this.selectEquipsIds.splice(r,1),this.selectEquips.splice(r,1))},selectAll:function(){for(var t=this.tableList.length-1;t>=0;t--)this.TableSelectRow(null,this.tableList[t])},cancelAll:function(){for(var t=this.tableList.length-1;t>=0;t--)this.TableSelectCancelRow(null,this.tableList[t])},handleSelectAll:function(){this.$refs.table.selectAll(!1)},pageChange:function(t){this.formValidate.page=t,this.getList()},goodsCategory:function(){var t=this;Object(o.a)(1).then((function(e){t.treeSelect=e.data})).catch((function(e){t.$Message.error(e.msg)}))},getList:function(){var t=this;this.loading=!0,Object(o.O)(this.formValidate).then((function(e){t.tableList=e.data.list,t.total=e.data.count,t.sortData(),t.loading=!1})).catch((function(e){t.loading=!1,t.$Message.error(e.msg)}))},ok:function(){var t=[];this.selectEquips.forEach((function(e){var r={image:e.image,product_id:e.id,store_name:e.store_name,temp_id:e.temp_id};t.push(r)})),t.length>0?this.$emit("getStoreId",this.selectEquips):this.$Message.warning("请先选择商品")},userSearchs:function(){this.formValidate.page=1,this.getList()}}},l=(r("9a36"),r("2877")),d=Object(l.a)(u,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"goodList"},[e("Form",{ref:"formValidate",staticClass:"tabform",attrs:{model:t.formValidate,"label-width":t.labelWidth,"label-position":t.labelPosition,inline:""}},[e("FormItem",{attrs:{label:"门店分类:","label-for":"pid"}},[e("Cascader",{staticClass:"input-add",attrs:{data:t.treeSelect,placeholder:"请选择门店分类","change-on-select":"",filterable:""},model:{value:t.formValidate.cate_id,callback:function(e){t.$set(t.formValidate,"cate_id",e)},expression:"formValidate.cate_id"}})],1),e("FormItem",{attrs:{label:"门店搜索:","label-for":"name"}},[e("Input",{staticClass:"input-add mr14",attrs:{placeholder:"请输入门店名称"},model:{value:t.formValidate.name,callback:function(e){t.$set(t.formValidate,"name",e)},expression:"formValidate.name"}}),e("Button",{attrs:{type:"primary"},on:{click:t.userSearchs}},[t._v("搜索")])],1)],1),e("Table",{ref:"table",staticClass:"mr-20",attrs:{"no-data-text":"暂无数据","no-filtered-data-text":"暂无筛选结果",columns:t.columns,data:t.tableList,loading:t.loading,height:"350"},on:{"on-select-all":t.selectAll,"on-select-all-cancel":t.cancelAll,"on-select":t.TableSelectRow,"on-select-cancel":t.TableSelectCancelRow},scopedSlots:t._u([{key:"image",fn:function(t){var r=t.row;return[e("viewer",[e("div",{staticClass:"tabBox_img"},[e("img",{directives:[{name:"lazy",rawName:"v-lazy",value:r.image,expression:"row.image"}]})])])]}}])}),e("div",{staticClass:"acea-row row-right page"},[e("Page",{attrs:{total:t.total,"show-elevator":"","show-total":"","page-size":t.formValidate.limit},on:{"on-change":t.pageChange}})],1),e("div",{staticClass:"footer",attrs:{slot:"footer"},slot:"footer"},[e("Button",{attrs:{type:"primary",size:"large",loading:t.modal_loading,long:""},on:{click:t.ok}},[t._v("提交")])],1)],1)}),[],!1,null,"7dca7c24",null);e.a=d.exports},"6da2":function(t,e,r){"use strict";r.r(e);var a=r("2f62"),o=r("5671"),n=r("c4ad"),i=r("b7be"),s=r("c4c8"),c=r("d708");function u(t){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function l(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */l=function(){return e};var t,e={},r=Object.prototype,a=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},n="function"==typeof Symbol?Symbol:{},i=n.iterator||"@@iterator",s=n.asyncIterator||"@@asyncIterator",c=n.toStringTag||"@@toStringTag";function d(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{d({},"")}catch(t){d=function(t,e,r){return t[e]=r}}function m(t,e,r,a){var n=e&&e.prototype instanceof g?e:g,i=Object.create(n.prototype),s=new S(a||[]);return o(i,"_invoke",{value:L(t,r,s)}),i}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=m;var p="suspendedStart",h="suspendedYield",v="executing",b="completed",_={};function g(){}function y(){}function w(){}var D={};d(D,i,(function(){return this}));var x=Object.getPrototypeOf,O=x&&x(x(E([])));O&&O!==r&&a.call(O,i)&&(D=O);var j=w.prototype=g.prototype=Object.create(D);function k(t){["next","throw","return"].forEach((function(e){d(t,e,(function(t){return this._invoke(e,t)}))}))}function C(t,e){function r(o,n,i,s){var c=f(t[o],t,n);if("throw"!==c.type){var l=c.arg,d=l.value;return d&&"object"==u(d)&&a.call(d,"__await")?e.resolve(d.__await).then((function(t){r("next",t,i,s)}),(function(t){r("throw",t,i,s)})):e.resolve(d).then((function(t){l.value=t,i(l)}),(function(t){return r("throw",t,i,s)}))}s(c.arg)}var n;o(this,"_invoke",{value:function(t,a){function o(){return new e((function(e,o){r(t,a,e,o)}))}return n=n?n.then(o,o):o()}})}function L(e,r,a){var o=p;return function(n,i){if(o===v)throw Error("Generator is already running");if(o===b){if("throw"===n)throw i;return{value:t,done:!0}}for(a.method=n,a.arg=i;;){var s=a.delegate;if(s){var c=T(s,a);if(c){if(c===_)continue;return c}}if("next"===a.method)a.sent=a._sent=a.arg;else if("throw"===a.method){if(o===p)throw o=b,a.arg;a.dispatchException(a.arg)}else"return"===a.method&&a.abrupt("return",a.arg);o=v;var u=f(e,r,a);if("normal"===u.type){if(o=a.done?b:h,u.arg===_)continue;return{value:u.arg,done:a.done}}"throw"===u.type&&(o=b,a.method="throw",a.arg=u.arg)}}}function T(e,r){var a=r.method,o=e.iterator[a];if(o===t)return r.delegate=null,"throw"===a&&e.iterator.return&&(r.method="return",r.arg=t,T(e,r),"throw"===r.method)||"return"!==a&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+a+"' method")),_;var n=f(o,e.iterator,r.arg);if("throw"===n.type)return r.method="throw",r.arg=n.arg,r.delegate=null,_;var i=n.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,_):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,_)}function P(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function I(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function S(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(P,this),this.reset(!0)}function E(e){if(e||""===e){var r=e[i];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,n=function r(){for(;++o<e.length;)if(a.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return n.next=n}}throw new TypeError(u(e)+" is not iterable")}return y.prototype=w,o(j,"constructor",{value:w,configurable:!0}),o(w,"constructor",{value:y,configurable:!0}),y.displayName=d(w,c,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,w):(t.__proto__=w,d(t,c,"GeneratorFunction")),t.prototype=Object.create(j),t},e.awrap=function(t){return{__await:t}},k(C.prototype),d(C.prototype,s,(function(){return this})),e.AsyncIterator=C,e.async=function(t,r,a,o,n){void 0===n&&(n=Promise);var i=new C(m(t,r,a,o),n);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},k(j),d(j,c,"Generator"),d(j,i,(function(){return this})),d(j,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var a in e)r.push(a);return r.reverse(),function t(){for(;r.length;){var a=r.pop();if(a in e)return t.value=a,t.done=!1,t}return t.done=!0,t}},e.values=E,S.prototype={constructor:S,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(I),!e)for(var r in this)"t"===r.charAt(0)&&a.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(a,o){return s.type="throw",s.arg=e,r.next=a,o&&(r.method="next",r.arg=t),!!o}for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n],s=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var c=a.call(i,"catchLoc"),u=a.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&a.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var n=o;break}}n&&("break"===t||"continue"===t)&&n.tryLoc<=e&&e<=n.finallyLoc&&(n=null);var i=n?n.completion:{};return i.type=t,i.arg=e,n?(this.method="next",this.next=n.finallyLoc,_):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),_},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),I(r),_}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var a=r.completion;if("throw"===a.type){var o=a.arg;I(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,a){return this.delegate={iterator:E(e),resultName:r,nextLoc:a},"next"===this.method&&(this.arg=t),_}},e}function d(t,e,r,a,o,n,i){try{var s=t[n](i),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(a,o)}function m(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,a)}return r}function f(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=u(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var a=r.call(t,e||"default");if("object"!=u(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==u(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var p={name:"storeCouponCreate",components:{goodsList:n.default,storeList:o.a},data:function(){return{roterPre:c.a.roterPre,couponType:[{name:"满减券",title:"满N元减N元",id:1},{name:"折扣券",title:"满N元打N折",id:2}],disabled:!1,storesList:[],formData:{coupon_title:"",coupon_price:0,type:0,use_min_price:0,coupon_time:1,start_use_time:0,end_use_time:0,start_time:0,end_time:0,receive_type:1,is_permanent:1,total_count:1,sort:0,status:1,product_id:"",category_id:[],brand_id:[],coupon_type:1,applicable_type:1,applicable_store_id:[],rule:"",category:1},categoryList:[],brandList:[],productList:[],isMinPrice:0,isCouponTime:1,isReceiveTime:0,modals:!1,datetime1:[],datetime2:[],storeModals:!1,currentTab:"1"}},computed:function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?m(Object(r),!0).forEach((function(e){f(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):m(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({},Object(a.e)("admin/layout",["isMobile","menuCollapse"])),created:function(){this.getBrandList(),this.getCategoryList(),this.$route.params.id&&this.getCouponDetail()},methods:{delte:function(t){var e=this;this.storesList.forEach((function(r,a){t.id==r.id&&e.storesList.splice(a,1)}))},addStore:function(){this.storeModals=!0},cancelStore:function(){this.storeModals=!1},uniqueId:function(t){var e=new Map;return t.filter((function(t){return!e.has(t.id)&&e.set(t.id,1)}))},getStoreId:function(t){this.storeModals=!1;var e=this.storesList.concat(t),r=this.uniqueId(e);this.storesList=r},couponTypeTap:function(t){this.formData.coupon_price=0,this.formData.coupon_type=t.id},getCategoryList:function(){var t=this;Object(i.v)(1).then(function(){var e,r=(e=l().mark((function e(r){return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r.data.forEach((function(t){t.cate_name="".concat(t.html).concat(t.cate_name)})),t.categoryList=r.data;case 2:case"end":return e.stop()}}),e)})),function(){var t=this,r=arguments;return new Promise((function(a,o){var n=e.apply(t,r);function i(t){d(n,a,o,i,s,"next",t)}function s(t){d(n,a,o,i,s,"throw",t)}i(void 0)}))});return function(t){return r.apply(this,arguments)}}())},getBrandList:function(){var t=this;Object(s.f)().then((function(e){t.brandList=e.data}))},getCouponDetail:function(){var t=this;Object(i.x)(this.$route.params.id).then((function(e){var r=e.data;t.formData.coupon_title=r.coupon_title,t.formData.coupon_type=r.coupon_type,t.formData.type=r.type,t.formData.category_id=[r.category_id],t.formData.brand_id=[r.brand_id],t.formData.category=r.category,t.formData.rule=r.rule,t.formData.coupon_price=parseFloat(r.coupon_price),t.formData.use_min_price=parseFloat(r.use_min_price),t.formData.coupon_time=r.coupon_time,t.formData.receive_type=r.receive_type,t.formData.is_permanent=r.is_permanent,t.formData.status=r.status,t.formData.product_id=r.product_id,t.formData.start_time=r.start_time,t.formData.end_time=r.end_time,t.formData.total_count=r.total_count,t.formData.sort=r.sort,t.formData.applicable_type=r.applicable_type,t.storesList=r.stores||[],"productInfo"in r&&(t.productList=r.productInfo),r.coupon_time||(t.isCouponTime=0,t.datetime1=[1e3*r.start_use_time,1e3*r.end_use_time],t.formData.start_use_time=t.makeDate(1e3*r.start_use_time),t.formData.end_use_time=t.makeDate(1e3*r.end_use_time)),r.start_time&&(t.isReceiveTime=1,t.datetime2=[1e3*r.start_time,1e3*r.end_time],t.formData.start_time=t.makeDate(1e3*r.start_time),t.formData.end_time=t.makeDate(1e3*r.end_time)),"0.00"!==r.use_min_price&&(t.isMinPrice=1)})).catch((function(e){t.$Message.error(e.msg)}))},makeDate:function(t){var e=new Date(t);return e.getFullYear()+"-"+(e.getMonth()+1<10?"0"+(e.getMonth()+1):e.getMonth()+1)+"-"+(e.getDate()<10?"0"+e.getDate():e.getDate())+" "+(e.getHours()<10?"0"+e.getHours():e.getHours())+":"+(e.getMinutes()<10?"0"+e.getMinutes():e.getMinutes())+":"+(e.getSeconds()<10?"0"+e.getSeconds():e.getSeconds())},upTab:function(){"2"==this.currentTab&&(this.currentTab=(Number(this.currentTab)-1).toString())},downTab:function(){if(!this.formData.coupon_title)return this.$Message.error("请输入优惠券名称");if(2===this.formData.type&&!this.formData.product_id)return this.$Message.error("请选择商品");if(1===this.formData.type&&!this.formData.category_id)return this.$Message.error("请选择品类");if(3===this.formData.type&&!this.formData.brand_id.length)return this.$Message.error("请选择品牌");if(this.formData.coupon_price<=0)return this.$Message.error("优惠券面值不能小于0");if(this.isMinPrice){if(this.formData.use_min_price<1)return this.$Message.error("优惠券最低消费不能小于0")}else this.formData.use_min_price=0;if(this.isCouponTime){if(this.formData.start_use_time=0,this.formData.end_use_time=0,this.formData.coupon_time<1)return this.$Message.error("使用有效期限不能小于1天")}else if(this.formData.coupon_time=0,!this.formData.start_use_time)return this.$Message.error("请选择使用有效期限");if(this.isReceiveTime){if(!this.formData.start_time)return this.$Message.error("请选择领取时间")}else this.formData.start_time=0,this.formData.end_time=0;if(this.formData.is_permanent)this.formData.total_count=0;else if(this.formData.total_count<1)return this.$Message.error("发布数量不能小于1");this.currentTab="2"},save:function(){var t=this;this.downTab(),this.disabled=!1;var e=[];if(this.storesList.forEach((function(t){e.push(t.id)})),2==this.formData.applicable_type&&!e.length)return this.$Message.warning("请添加适用门店");this.formData.applicable_store_id=e,Object(i.A)(this.formData).then((function(e){t.disabled=!0,t.$Message.success(e.msg),setTimeout((function(){t.$router.push({path:t.roterPre+"/marketing/store_coupon_issue/index"})}),1e3)})).catch((function(e){t.$Message.error(e.msg)}))},dateChange:function(t){this.formData.start_use_time=t[0],this.formData.end_use_time=t[1]},timeChange:function(t){this.formData.start_time=t[0],this.formData.end_time=t[1]},unique:function(t){var e=new Map;return t.filter((function(t){return!e.has(t.product_id)&&e.set(t.product_id,1)}))},getProductId:function(t){var e=this;this.modals=!1,this.productList=this.unique(this.productList.concat(t)),this.formData.product_id="",this.productList.forEach((function(t){e.formData.product_id?e.formData.product_id+=",".concat(t.product_id):e.formData.product_id+="".concat(t.product_id)}))},cancel:function(){this.modals=!1},remove:function(t){for(var e=this,r=0;r<this.productList.length;r++)this.productList[r].product_id==t&&this.productList.splice(r,1);this.formData.product_id="",this.productList.forEach((function(t){e.formData.product_id?e.formData.product_id+=",".concat(t.product_id):e.formData.product_id+="".concat(t.product_id)}))},categoryChange:function(t){2==t&&(this.formData.receive_type=1)}}},h=(r("c70d"),r("2877")),v=Object(h.a)(p,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"form-submit"},[e("div",{staticClass:"i-layout-page-header"},[e("PageHeader",{staticClass:"product_tabs",attrs:{"hidden-breadcrumb":""}},[e("div",{attrs:{slot:"title"},slot:"title"},[e("router-link",{attrs:{to:{path:"".concat(t.roterPre,"/marketing/store_coupon_issue/index")}}},[e("div",{staticClass:"font-sm after-line"},[e("span",{staticClass:"iconfont iconfanhui"}),e("span",{staticClass:"pl10"},[t._v("返回")])])]),e("span",{staticClass:"mr20 ml16",domProps:{textContent:t._s(t.$route.params.id?"编辑优惠券":"添加优惠券")}})],1)])],1),e("Card",{staticClass:"ivu-mt",attrs:{bordered:!1,"dis-hover":""}},[e("Form",{attrs:{model:t.formData,"label-width":150}},[e("Tabs",{model:{value:t.currentTab,callback:function(e){t.currentTab=e},expression:"currentTab"}},[e("TabPane",{attrs:{label:"基础设置",name:"1"}},[e("FormItem",{attrs:{label:"优惠类型:",props:"coupon_type"}},t._l(t.couponType,(function(r,a){return e("div",{key:a,staticClass:"productType",class:t.formData.coupon_type==r.id?"on":"",on:{click:function(e){return t.couponTypeTap(r)}}},[e("div",{staticClass:"name",class:t.formData.coupon_type==r.id?"on":""},[t._v("\n\t\t\t "+t._s(r.name)+"\n\t\t\t ")]),e("div",{staticClass:"title"},[t._v("("+t._s(r.title)+")")]),t.formData.coupon_type==r.id?e("div",{staticClass:"jiao"}):t._e(),t.formData.coupon_type==r.id?e("div",{staticClass:"iconfont iconduihao"}):t._e()])})),0),e("FormItem",{attrs:{label:"优惠券名称",required:""}},[e("Input",{directives:[{name:"width",rawName:"v-width",value:320,expression:"320"}],attrs:{placeholder:"请输入优惠券名称"},model:{value:t.formData.coupon_title,callback:function(e){t.$set(t.formData,"coupon_title",e)},expression:"formData.coupon_title"}})],1),e("FormItem",{attrs:{label:"优惠券面值",required:""}},[1==t.formData.coupon_type?e("InputNumber",{directives:[{name:"width",rawName:"v-width",value:320,expression:"320"}],attrs:{min:1,max:1e8},model:{value:t.formData.coupon_price,callback:function(e){t.$set(t.formData,"coupon_price",e)},expression:"formData.coupon_price"}}):e("InputNumber",{directives:[{name:"width",rawName:"v-width",value:320,expression:"320"}],attrs:{min:0,max:100,precision:0},model:{value:t.formData.coupon_price,callback:function(e){t.$set(t.formData,"coupon_price",e)},expression:"formData.coupon_price"}}),e("span",{staticClass:"ml10"},[t._v(t._s(1==t.formData.coupon_type?"元":"%"))])],1),e("FormItem",{attrs:{label:"优惠券种类"}},[e("RadioGroup",{on:{"on-change":t.categoryChange},model:{value:t.formData.category,callback:function(e){t.$set(t.formData,"category",e)},expression:"formData.category"}},[e("Radio",{attrs:{label:1}},[t._v("普通券")]),e("Radio",{attrs:{label:2}},[t._v("会员券")])],1)],1),e("FormItem",{attrs:{label:"领取方式"}},[e("RadioGroup",{model:{value:t.formData.receive_type,callback:function(e){t.$set(t.formData,"receive_type",e)},expression:"formData.receive_type"}},[e("Radio",{attrs:{label:1}},[t._v("手动领取")]),1==t.formData.category?e("Radio",{attrs:{label:3}},[t._v("后台发放")]):t._e()],1),e("div",{staticClass:"info"},[t._v("手动领取:用户需要在移动端的领券中心领取优惠券;后台发放:后台发放用于后台发放指定用户使用,移动端不能领取;")])],1),e("FormItem",{attrs:{label:"适用类型"}},[e("RadioGroup",{model:{value:t.formData.type,callback:function(e){t.$set(t.formData,"type",e)},expression:"formData.type"}},[e("Radio",{attrs:{label:0}},[t._v("通用券")]),e("Radio",{attrs:{label:1}},[t._v("品类券")]),e("Radio",{attrs:{label:2}},[t._v("商品券")]),e("Radio",{attrs:{label:3}},[t._v("品牌券")])],1)],1),e("FormItem",{directives:[{name:"show",rawName:"v-show",value:2===t.formData.type,expression:"formData.type === 2"}]},[t._l(t.productList,(function(r){return e("div",{key:r.product_id,staticClass:"upload-list"},[e("img",{attrs:{src:r.image}}),e("Icon",{attrs:{type:"ios-close-circle",size:"16"},on:{click:function(e){return t.remove(r.product_id)}}})],1)})),e("Icon",{attrs:{type:"ios-camera-outline",size:"26"},on:{click:function(e){t.modals=!0}}}),e("div",{staticClass:"info"},[t._v("选择商品")])],2),e("FormItem",{directives:[{name:"show",rawName:"v-show",value:1===t.formData.type,expression:"formData.type === 1"}]},[e("Cascader",{staticStyle:{width:"320px"},attrs:{data:t.categoryList,placeholder:"请选择商品分类","change-on-select":"",filterable:""},model:{value:t.formData.category_id,callback:function(e){t.$set(t.formData,"category_id",e)},expression:"formData.category_id"}}),e("div",{staticClass:"info"},[t._v("选择商品的品类")])],1),e("FormItem",{directives:[{name:"show",rawName:"v-show",value:3===t.formData.type,expression:"formData.type === 3"}]},[e("Cascader",{staticStyle:{width:"320px"},attrs:{data:t.brandList,placeholder:"请选择商品品牌","change-on-select":"",filterable:""},model:{value:t.formData.brand_id,callback:function(e){t.$set(t.formData,"brand_id",e)},expression:"formData.brand_id"}}),e("div",{staticClass:"info"},[t._v("选择商品的品牌")])],1),e("FormItem",{attrs:{label:"使用门槛"}},[e("RadioGroup",{model:{value:t.isMinPrice,callback:function(e){t.isMinPrice=e},expression:"isMinPrice"}},[e("Radio",{attrs:{label:0}},[t._v("无门槛")]),e("Radio",{attrs:{label:1}},[t._v("有门槛")])],1)],1),e("FormItem",{directives:[{name:"show",rawName:"v-show",value:t.isMinPrice,expression:"isMinPrice"}]},[e("InputNumber",{attrs:{min:1,max:1e8},model:{value:t.formData.use_min_price,callback:function(e){t.$set(t.formData,"use_min_price",e)},expression:"formData.use_min_price"}}),e("div",{staticClass:"info"},[t._v("填写优惠券的最低消费金额")])],1),e("FormItem",{attrs:{label:"使用时间"}},[e("RadioGroup",{model:{value:t.isCouponTime,callback:function(e){t.isCouponTime=e},expression:"isCouponTime"}},[e("Radio",{attrs:{label:1}},[t._v("天数")]),e("Radio",{attrs:{label:0}},[t._v("时间段")])],1)],1),e("FormItem",{directives:[{name:"show",rawName:"v-show",value:t.isCouponTime,expression:"isCouponTime"}],attrs:{label:""}},[e("InputNumber",{attrs:{min:1,precision:0},model:{value:t.formData.coupon_time,callback:function(e){t.$set(t.formData,"coupon_time",e)},expression:"formData.coupon_time"}}),e("div",{staticClass:"info"},[t._v("领取后多少天内有效")])],1),e("FormItem",{directives:[{name:"show",rawName:"v-show",value:!t.isCouponTime,expression:"!isCouponTime"}],attrs:{label:""}},[e("DatePicker",{attrs:{transfer:!0,value:t.datetime1,editable:!1,type:"datetimerange",placeholder:"领取后在这个时间段内可以使用"},on:{"on-change":t.dateChange}})],1),e("FormItem",{attrs:{label:"领取时间"}},[e("RadioGroup",{model:{value:t.isReceiveTime,callback:function(e){t.isReceiveTime=e},expression:"isReceiveTime"}},[e("Radio",{attrs:{label:1}},[t._v("限时")]),e("Radio",{attrs:{label:0}},[t._v("不限时")])],1)],1),e("FormItem",{directives:[{name:"show",rawName:"v-show",value:t.isReceiveTime,expression:"isReceiveTime"}],attrs:{label:""}},[e("DatePicker",{attrs:{value:t.datetime2,type:"datetimerange",placeholder:"在这个时间段内可领取"},on:{"on-change":t.timeChange}})],1),e("FormItem",{attrs:{label:"是否限量"}},[e("RadioGroup",{model:{value:t.formData.is_permanent,callback:function(e){t.$set(t.formData,"is_permanent",e)},expression:"formData.is_permanent"}},[e("Radio",{attrs:{label:0}},[t._v("限量")]),e("Radio",{attrs:{label:1}},[t._v("不限量")])],1)],1),e("FormItem",{directives:[{name:"show",rawName:"v-show",value:!t.formData.is_permanent,expression:"!formData.is_permanent"}],attrs:{label:""}},[e("InputNumber",{attrs:{min:1,max:1e8,precision:0},model:{value:t.formData.total_count,callback:function(e){t.$set(t.formData,"total_count",e)},expression:"formData.total_count"}}),e("div",{staticClass:"info"},[t._v("填写优惠券的发布数量")])],1),e("FormItem",{attrs:{label:"使用规则"}},[e("Input",{directives:[{name:"width",rawName:"v-width",value:320,expression:"320"}],attrs:{rows:4,type:"textarea",placeholder:"请输入使用规则"},model:{value:t.formData.rule,callback:function(e){t.$set(t.formData,"rule",e)},expression:"formData.rule"}})],1),e("FormItem",{attrs:{label:"是否开启"}},[e("i-switch",{attrs:{"true-value":1,"false-value":0,size:"large"},model:{value:t.formData.status,callback:function(e){t.$set(t.formData,"status",e)},expression:"formData.status"}},[e("span",{attrs:{slot:"open"},slot:"open"},[t._v("开启")]),e("span",{attrs:{slot:"close"},slot:"close"},[t._v("关闭")])])],1)],1),e("TabPane",{attrs:{label:"适用门店",name:"2"}},[e("Row",{staticClass:"mb20",attrs:{gutter:24,type:"flex"}},[e("Col",{attrs:{span:"24"}},[e("RadioGroup",{model:{value:t.formData.applicable_type,callback:function(e){t.$set(t.formData,"applicable_type",e)},expression:"formData.applicable_type"}},[e("Radio",{attrs:{label:1}},[t._v("全部门店")]),e("Radio",{attrs:{label:2}},[t._v("部分门店")]),e("Radio",{attrs:{label:0}},[t._v("仅平台适用")])],1),e("div",{staticClass:"tips"},[t._v("可选择优惠券在哪些门店使用,选择“仅平台适用“则购买门店商品不享受活动")])],1),2==t.formData.applicable_type?e("Col",{staticClass:"mt20",attrs:{span:"24"}},[e("Button",{attrs:{type:"primary"},on:{click:t.addStore}},[t._v("添加门店")])],1):t._e()],1),2==t.formData.applicable_type?e("div",{staticClass:"vxeTable"},[e("vxe-table",{ref:"xTree",attrs:{border:"inner","row-id":"id",data:t.storesList}},[e("vxe-column",{attrs:{field:"id",title:"ID","min-width":"60"}}),e("vxe-column",{attrs:{field:"info",title:"门店图片","tree-node":"","min-width":"80"},scopedSlots:t._u([{key:"default",fn:function(t){var r=t.row;return[e("div",{staticClass:"imgPic acea-row row-middle"},[e("viewer",[e("div",{staticClass:"pictrue"},[e("img",{directives:[{name:"lazy",rawName:"v-lazy",value:r.image,expression:"row.image"}]})])])],1)]}}],null,!1,3598873617)}),e("vxe-column",{attrs:{field:"cate_name",title:"门店分类","min-width":"110"}}),e("vxe-column",{attrs:{field:"name",title:"门店名称","min-width":"110"}}),e("vxe-column",{attrs:{field:"phone",title:"联系电话","min-width":"110"}}),e("vxe-column",{attrs:{field:"address",title:"门店地址","min-width":"150"}}),e("vxe-column",{attrs:{field:"day_time",title:"营业时间","min-width":"140"}}),e("vxe-column",{attrs:{field:"status_name",title:"营业状态","min-width":"80"}}),e("vxe-column",{attrs:{field:"date",title:"操作","min-width":"100",fixed:"right",align:"center"},scopedSlots:t._u([{key:"default",fn:function(r){var a=r.row;return[e("a",{on:{click:function(e){return t.delte(a)}}},[t._v("删除")])]}}],null,!1,3111734551)})],1)],1):t._e()],1)],1)],1)],1),e("Card",{staticClass:"fixed-card",style:{left:"".concat(t.menuCollapse?t.isMobile?"0":"80px":"200px")},attrs:{bordered:!1,"dis-hover":""}},[e("Form",[e("FormItem",["1"!==t.currentTab?e("Button",{staticStyle:{"margin-right":"10px"},on:{click:t.upTab}},[t._v("上一步")]):t._e(),"2"!==t.currentTab?e("Button",{staticClass:"submission",attrs:{type:"primary"},on:{click:t.downTab}},[t._v("下一步")]):e("Button",{staticClass:"submission",attrs:{type:"primary",disabled:t.disabled},on:{click:t.save}},[t._v("立即创建")])],1)],1)],1),e("Modal",{staticClass:"paymentFooter",attrs:{title:"商品列表",footerHide:"",scrollable:"",width:"900"},on:{"on-cancel":t.cancel},model:{value:t.modals,callback:function(e){t.modals=e},expression:"modals"}},[t.modals?e("goods-list",{ref:"goodslist",attrs:{ischeckbox:!0},on:{getProductId:t.getProductId}}):t._e()],1),e("Modal",{attrs:{title:"门店列表",footerHide:"",scrollable:"",width:"900"},on:{"on-cancel":t.cancelStore},model:{value:t.storeModals,callback:function(e){t.storeModals=e},expression:"storeModals"}},[t.storeModals?e("store-list",{ref:"storelist",on:{getStoreId:t.getStoreId}}):t._e()],1)],1)}),[],!1,null,"2101139b",null);e.default=v.exports},"73f5":function(t,e,r){"use strict";r.d(e,"D",(function(){return o})),r.d(e,"u",(function(){return n})),r.d(e,"q",(function(){return i})),r.d(e,"t",(function(){return s})),r.d(e,"v",(function(){return c})),r.d(e,"x",(function(){return u})),r.d(e,"j",(function(){return l})),r.d(e,"i",(function(){return d})),r.d(e,"U",(function(){return m})),r.d(e,"h",(function(){return f})),r.d(e,"z",(function(){return p})),r.d(e,"y",(function(){return h})),r.d(e,"A",(function(){return v})),r.d(e,"w",(function(){return b})),r.d(e,"m",(function(){return _})),r.d(e,"B",(function(){return g})),r.d(e,"s",(function(){return y})),r.d(e,"L",(function(){return w})),r.d(e,"M",(function(){return D})),r.d(e,"J",(function(){return x})),r.d(e,"K",(function(){return O})),r.d(e,"g",(function(){return j})),r.d(e,"G",(function(){return k})),r.d(e,"H",(function(){return C})),r.d(e,"I",(function(){return L})),r.d(e,"T",(function(){return T})),r.d(e,"O",(function(){return P})),r.d(e,"N",(function(){return I})),r.d(e,"e",(function(){return S})),r.d(e,"S",(function(){return E})),r.d(e,"o",(function(){return M})),r.d(e,"P",(function(){return R})),r.d(e,"Q",(function(){return $})),r.d(e,"R",(function(){return F})),r.d(e,"n",(function(){return N})),r.d(e,"r",(function(){return q})),r.d(e,"E",(function(){return G})),r.d(e,"p",(function(){return V})),r.d(e,"C",(function(){return z})),r.d(e,"f",(function(){return A})),r.d(e,"F",(function(){return B})),r.d(e,"b",(function(){return W})),r.d(e,"d",(function(){return H})),r.d(e,"c",(function(){return J})),r.d(e,"a",(function(){return Y})),r.d(e,"k",(function(){return U})),r.d(e,"l",(function(){return K}));var a=r("b6bd");function o(t){return Object(a.a)({url:"merchant/store_list",method:"get",params:t})}function n(t){return Object(a.a)({url:"store/order/list",method:"get",params:t})}function i(t){return Object(a.a)({url:"store/order/chart",method:"get",params:t})}function s(t){return Object(a.a)({url:"store/order/header",method:"get"})}function c(t){return Object(a.a)({url:"store/recharge",method:"get",params:t})}function u(t){return Object(a.a)({url:"store/vip_order",method:"get",params:t})}function l(t){return Object(a.a)({url:"store/order/edit/".concat(t),method:"get"})}function d(t){return Object(a.a)({url:"store/order/distribution/".concat(t),method:"get"})}function m(t){return Object(a.a)({url:"store/order/write_update/".concat(t),method:"put"})}function f(t){return Object(a.a)({url:"store/order/info/".concat(t),method:"get"})}function p(t){return Object(a.a)({url:"order/remark/".concat(t.id),method:"put",data:t.remark})}function h(t){return Object(a.a)({url:"store/recharge/remark/".concat(t.id),method:"put",data:t.remark})}function v(t){return Object(a.a)({url:"store/vip/remark/".concat(t.id),method:"put",data:t.remark})}function b(t){return Object(a.a)({url:"store/refund/list",method:"get",params:t})}function _(t){return Object(a.a)({url:"/order/no_refund/".concat(t),method:"get"})}function g(t){return Object(a.a)({url:"/order/refund_integral/".concat(t),method:"get"})}function y(t,e){return Object(a.a)({url:"store/order/export/".concat(e),method:"post",data:t})}function w(t){return Object(a.a)({url:"store/finance_flow/list",method:"get",params:t})}function D(t,e){return Object(a.a)({url:"store/finance_flow/mark/".concat(t),method:"put",params:e})}function x(t){return Object(a.a)({url:"store/finance_flow/fund_record",method:"get",params:t})}function O(t){return Object(a.a)({url:"store/finance_flow/fund_record_info",method:"get",params:t})}function j(t){return Object(a.a)({url:"/export/storeFinanceRecord",method:"get",params:t})}function k(t){return Object(a.a)({url:"/store/extract/list",method:"get",params:t})}function C(t,e){return Object(a.a)({url:"store/extract/mark/".concat(t),method:"post",data:e})}function L(t,e){return Object(a.a)({url:"store/extract/verify/".concat(t),method:"post",data:e})}function T(t){return Object(a.a)({url:"store/extract/transfer/".concat(t),method:"get"})}function P(t){return Object(a.a)({url:"store/store",method:"get",params:t})}function I(t){return Object(a.a)({url:"store/store/get_info/".concat(t),method:"get"})}function S(t){return Object(a.a)({url:"city",method:"get",params:t})}function E(t,e){return Object(a.a)({url:"store/store/".concat(t),method:"post",data:e})}function M(){return Object(a.a)({url:"store/store/address",method:"get"})}function R(t){return Object(a.a)({url:"store/store/login/".concat(t),method:"get"})}function $(t,e){return Object(a.a)({url:"store/store/set_show/".concat(t,"/").concat(e),method:"put"})}function F(t){return Object(a.a)({url:"store/share/order",method:"post",params:t})}function N(t){return Object(a.a)({url:"store/home/header",method:"get",params:t})}function q(t){return Object(a.a)({url:"store/home/orderChart",method:"get",params:t})}function G(t){return Object(a.a)({url:"store/home/store",method:"get",params:t})}function V(t){return Object(a.a)({url:"store/home/operate",method:"get",params:t})}function z(t){return Object(a.a)({url:"store/store/reset_admin/".concat(t),method:"get"})}function A(t,e,r){return Object(a.a)({url:"export/storeFlowExport?store_id=".concat(t,"&keyword=").concat(e,"&data=").concat(r),method:"get"})}function B(t){return Object(a.a)({url:"/store/category",params:t,method:"get"})}function W(t){return Object(a.a)({url:"/store/category/create/".concat(t),method:"get"})}function H(t){return Object(a.a)({url:"/store/category/tree/".concat(t),method:"get"})}function J(t){return Object(a.a)({url:"/store/category/set_show/".concat(t.id,"/").concat(t.is_show),method:"PUT"})}function Y(t){return Object(a.a)({url:"store/category/cascader_list/".concat(t),method:"get"})}function U(t){return Object(a.a)({url:"/store/refund/detail/".concat(t),method:"get"})}function K(t){return Object(a.a)({url:"/store/refund/refund/".concat(t),method:"get"})}},7535:function(t,e,r){},"9a36":function(t,e,r){"use strict";r("3715")},c70d:function(t,e,r){"use strict";r("7535")}}]);