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.
1 lines
33 KiB
1 lines
33 KiB
(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-f6ad76ae"],{3715:function(t,e,a){},5671:function(t,e,a){"use strict";var r=a("2f62"),i=a("73f5");function o(t){return(o="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 n(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),a.push.apply(a,r)}return a}function s(t){for(var e=1;e<arguments.length;e++){var a=null!=arguments[e]?arguments[e]:{};e%2?n(Object(a),!0).forEach((function(e){c(t,e,a[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):n(Object(a)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(a,e))}))}return t}function c(t,e,a){return(e=function(t){var e=function(t,e){if("object"!=o(t)||!t)return t;var a=t[Symbol.toPrimitive];if(void 0!==a){var r=a.call(t,e||"default");if("object"!=o(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==o(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[e]=a,t}var l={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(r.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 a=this.selectEquipsIds.indexOf(e.id);-1!=a&&(this.selectEquipsIds.splice(a,1),this.selectEquips.splice(a,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(i.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(i.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 a={image:e.image,product_id:e.id,store_name:e.store_name,temp_id:e.temp_id};t.push(a)})),t.length>0?this.$emit("getStoreId",this.selectEquips):this.$Message.warning("请先选择商品")},userSearchs:function(){this.formValidate.page=1,this.getList()}}},u=(a("9a36"),a("2877")),d=Object(u.a)(l,(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 a=t.row;return[e("viewer",[e("div",{staticClass:"tabBox_img"},[e("img",{directives:[{name:"lazy",rawName:"v-lazy",value:a.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},5750:function(t,e,a){"use strict";a("ffa6")},"73f5":function(t,e,a){"use strict";a.d(e,"D",(function(){return i})),a.d(e,"u",(function(){return o})),a.d(e,"q",(function(){return n})),a.d(e,"t",(function(){return s})),a.d(e,"v",(function(){return c})),a.d(e,"x",(function(){return l})),a.d(e,"j",(function(){return u})),a.d(e,"i",(function(){return d})),a.d(e,"U",(function(){return m})),a.d(e,"h",(function(){return f})),a.d(e,"z",(function(){return h})),a.d(e,"y",(function(){return p})),a.d(e,"A",(function(){return b})),a.d(e,"w",(function(){return g})),a.d(e,"m",(function(){return v})),a.d(e,"B",(function(){return y})),a.d(e,"s",(function(){return w})),a.d(e,"L",(function(){return _})),a.d(e,"M",(function(){return k})),a.d(e,"J",(function(){return O})),a.d(e,"K",(function(){return x})),a.d(e,"g",(function(){return C})),a.d(e,"G",(function(){return j})),a.d(e,"H",(function(){return P})),a.d(e,"I",(function(){return V})),a.d(e,"T",(function(){return S})),a.d(e,"O",(function(){return T})),a.d(e,"N",(function(){return D})),a.d(e,"e",(function(){return L})),a.d(e,"S",(function(){return B})),a.d(e,"o",(function(){return I})),a.d(e,"P",(function(){return $})),a.d(e,"Q",(function(){return M})),a.d(e,"R",(function(){return q})),a.d(e,"n",(function(){return E})),a.d(e,"r",(function(){return A})),a.d(e,"E",(function(){return F})),a.d(e,"p",(function(){return R})),a.d(e,"C",(function(){return z})),a.d(e,"f",(function(){return W})),a.d(e,"F",(function(){return N})),a.d(e,"b",(function(){return G})),a.d(e,"d",(function(){return H})),a.d(e,"c",(function(){return J})),a.d(e,"a",(function(){return U})),a.d(e,"k",(function(){return K})),a.d(e,"l",(function(){return Q}));var r=a("b6bd");function i(t){return Object(r.a)({url:"merchant/store_list",method:"get",params:t})}function o(t){return Object(r.a)({url:"store/order/list",method:"get",params:t})}function n(t){return Object(r.a)({url:"store/order/chart",method:"get",params:t})}function s(t){return Object(r.a)({url:"store/order/header",method:"get"})}function c(t){return Object(r.a)({url:"store/recharge",method:"get",params:t})}function l(t){return Object(r.a)({url:"store/vip_order",method:"get",params:t})}function u(t){return Object(r.a)({url:"store/order/edit/".concat(t),method:"get"})}function d(t){return Object(r.a)({url:"store/order/distribution/".concat(t),method:"get"})}function m(t){return Object(r.a)({url:"store/order/write_update/".concat(t),method:"put"})}function f(t){return Object(r.a)({url:"store/order/info/".concat(t),method:"get"})}function h(t){return Object(r.a)({url:"order/remark/".concat(t.id),method:"put",data:t.remark})}function p(t){return Object(r.a)({url:"store/recharge/remark/".concat(t.id),method:"put",data:t.remark})}function b(t){return Object(r.a)({url:"store/vip/remark/".concat(t.id),method:"put",data:t.remark})}function g(t){return Object(r.a)({url:"store/refund/list",method:"get",params:t})}function v(t){return Object(r.a)({url:"/order/no_refund/".concat(t),method:"get"})}function y(t){return Object(r.a)({url:"/order/refund_integral/".concat(t),method:"get"})}function w(t,e){return Object(r.a)({url:"store/order/export/".concat(e),method:"post",data:t})}function _(t){return Object(r.a)({url:"store/finance_flow/list",method:"get",params:t})}function k(t,e){return Object(r.a)({url:"store/finance_flow/mark/".concat(t),method:"put",params:e})}function O(t){return Object(r.a)({url:"store/finance_flow/fund_record",method:"get",params:t})}function x(t){return Object(r.a)({url:"store/finance_flow/fund_record_info",method:"get",params:t})}function C(t){return Object(r.a)({url:"/export/storeFinanceRecord",method:"get",params:t})}function j(t){return Object(r.a)({url:"/store/extract/list",method:"get",params:t})}function P(t,e){return Object(r.a)({url:"store/extract/mark/".concat(t),method:"post",data:e})}function V(t,e){return Object(r.a)({url:"store/extract/verify/".concat(t),method:"post",data:e})}function S(t){return Object(r.a)({url:"store/extract/transfer/".concat(t),method:"get"})}function T(t){return Object(r.a)({url:"store/store",method:"get",params:t})}function D(t){return Object(r.a)({url:"store/store/get_info/".concat(t),method:"get"})}function L(t){return Object(r.a)({url:"city",method:"get",params:t})}function B(t,e){return Object(r.a)({url:"store/store/".concat(t),method:"post",data:e})}function I(){return Object(r.a)({url:"store/store/address",method:"get"})}function $(t){return Object(r.a)({url:"store/store/login/".concat(t),method:"get"})}function M(t,e){return Object(r.a)({url:"store/store/set_show/".concat(t,"/").concat(e),method:"put"})}function q(t){return Object(r.a)({url:"store/share/order",method:"post",params:t})}function E(t){return Object(r.a)({url:"store/home/header",method:"get",params:t})}function A(t){return Object(r.a)({url:"store/home/orderChart",method:"get",params:t})}function F(t){return Object(r.a)({url:"store/home/store",method:"get",params:t})}function R(t){return Object(r.a)({url:"store/home/operate",method:"get",params:t})}function z(t){return Object(r.a)({url:"store/store/reset_admin/".concat(t),method:"get"})}function W(t,e,a){return Object(r.a)({url:"export/storeFlowExport?store_id=".concat(t,"&keyword=").concat(e,"&data=").concat(a),method:"get"})}function N(t){return Object(r.a)({url:"/store/category",params:t,method:"get"})}function G(t){return Object(r.a)({url:"/store/category/create/".concat(t),method:"get"})}function H(t){return Object(r.a)({url:"/store/category/tree/".concat(t),method:"get"})}function J(t){return Object(r.a)({url:"/store/category/set_show/".concat(t.id,"/").concat(t.is_show),method:"PUT"})}function U(t){return Object(r.a)({url:"store/category/cascader_list/".concat(t),method:"get"})}function K(t){return Object(r.a)({url:"/store/refund/detail/".concat(t),method:"get"})}function Q(t){return Object(r.a)({url:"/store/refund/refund/".concat(t),method:"get"})}},"93a9":function(t,e,a){"use strict";a.r(e);var r=a("2f62"),i=a("b0e7"),o=a("c4ad"),n=a("d708"),s=a("5671"),c=a("b7be");function l(t){return(l="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 u(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),a.push.apply(a,r)}return a}function d(t){for(var e=1;e<arguments.length;e++){var a=null!=arguments[e]?arguments[e]:{};e%2?u(Object(a),!0).forEach((function(e){m(t,e,a[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):u(Object(a)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(a,e))}))}return t}function m(t,e,a){return(e=function(t){var e=function(t,e){if("object"!=l(t)||!t)return t;var a=t[Symbol.toPrimitive];if(void 0!==a){var r=a.call(t,e||"default");if("object"!=l(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==l(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[e]=a,t}var f={name:"storeCreate",components:{uploadPictures:i.a,goodsList:o.default,storeList:s.a},data:function(){return{roterPre:n.a.roterPre,copy:0,keyword:"",storesList:[],storeModals:!1,submitOpen:!1,modalsSet:!1,checkPidList:[],isAllChecked:!1,modals:!1,searchTableData:[],tableData:[],modalPic:!1,currentTab:"1",headTab:[{name:"基础设置",type:"1"},{name:"添加商品",type:"2"},{name:"适用门店",type:"3"}],timeList:[],id:0,formValidate:{name:"",section_data:[],time_id:[],num:1,once_num:1,image:"",status:1,seckill_ids:[],applicable_type:1},ruleValidate:{name:[{required:!0,message:"请输入活动名称",trigger:"blur"}],section_data:[{required:!0,type:"array",message:"请选择活动日期",trigger:"change"}],time_id:[{required:!0,type:"array",message:"请选择秒杀场次",trigger:"change"}],num:[{required:!0,type:"number",message:"请输入购买数量限制",trigger:"blur"}],once_num:[{required:!0,type:"number",message:"请输入单次购买数量限制",trigger:"blur"}]},formBatch:{price:"",quota:""},gridBtn:{xl:4,lg:8,md:8,sm:8,xs:8},gridPic:{xl:6,lg:8,md:12,sm:12,xs:12}}},computed:d(d({},Object(r.e)("admin/layout",["isMobile","menuCollapse"])),{},{labelWidth:function(){return this.isMobile?void 0:110},labelPosition:function(){return this.isMobile?"top":"right"},labelBottom:function(){return this.isMobile?void 0:15}}),mounted:function(){this.setCopyrightShow({value:!1}),this.seckillTimeList(),this.$route.params.id&&(this.id=this.$route.params.id,this.copy=this.$route.params.copy,this.getInfo())},destroyed:function(){this.setCopyrightShow({value:!0})},methods:d(d({},Object(r.d)("admin/layout",["setCopyrightShow"])),{},{searchWord:function(){var t=this,e=[];this.tableData.forEach((function(a){-1!=a.store_name.indexOf(t.keyword)&&e.push(a)})),this.keyword?this.searchTableData=e:this.searchTableData=[]},getInfo:function(){var t=this;Object(c.yb)(this.$route.params.id).then((function(e){e.data.info.seckill_ids=[],t.formValidate=e.data.info,t.storesList=e.data.info.stores||[];var a=e.data.info.productList||[];a.forEach((function(t){t.parent=1})),t.tableData=a})).catch((function(e){t.$Message.error(e.msg)}))},delte:function(t){var e=this;this.storesList.forEach((function(a,r){t.id==a.id&&e.storesList.splice(r,1)}))},addStore:function(){this.storeModals=!0},cancelStore:function(){this.storeModals=!1},getStoreId:function(t){this.storeModals=!1;var e=this.storesList.concat(t),a=this.unique(e);this.storesList=a},batchVisibleChange:function(){this.formBatch.price="",this.formBatch.quota=""},onchangeIsShow:function(t){this.tableData.forEach((function(e){t.id==e.id&&(e.status=!e.status)}))},okBatch:function(){var t=this;if(""==this.formBatch.price&&""==this.formBatch.quota)return this.$Message.error("请输入秒杀价或限量");if(!this.isAllChecked||this.tableData.length!=this.searchTableData.length&&this.searchTableData.length)for(var e=0;e<this.tableData.length;e++)for(var a=0;a<this.checkPidList.length;a++)this.tableData[e].id==this.checkPidList[a]&&this.tableData[e].attrValue.forEach((function(e){""!=t.formBatch.price&&(e.price=t.formBatch.price),""!=t.formBatch.quota&&(e.quota=t.formBatch.quota)}));else this.tableData.forEach((function(e){e.attrValue.forEach((function(e){""!=t.formBatch.price&&(e.price=t.formBatch.price),""!=t.formBatch.quota&&(e.quota=t.formBatch.quota)}))}));this.modalsSet=!1},cancelBatch:function(){this.modalsSet=!1},batchSet:function(){this.modalsSet=!0},delAll:function(){var t=this;!this.isAllChecked||this.tableData.length!=this.searchTableData.length&&this.searchTableData.length?this.tableData=this.tableData.filter((function(e){return!t.checkPidList.some((function(t){return t===e.id}))})):this.tableData=[],this.checkPidList=[],this.isAllChecked=!1},del:function(t){var e=this;if(this.searchTableData.length?(this.searchTableData.forEach((function(a,r){t.id==a.id&&e.searchTableData.splice(r,1)})),this.tableData.forEach((function(a,r){if(t.id==a.id)return e.tableData.splice(r,1)}))):this.tableData.forEach((function(a,r){if(t.id==a.id)return e.tableData.splice(r,1)})),this.isAllChecked&&!this.tableData.length)this.isAllChecked=!1,this.checkPidList=[];else{var a=this.checkPidList.indexOf(t.id);this.checkPidList.splice(a,1)}},checkboxAll:function(){this.isAllChecked=this.$refs.xTree.isAllCheckboxChecked(),this.isAllChecked||(this.checkPidList=[])},checkboxItem:function(t){var e=parseInt(t.rowid);if(t.row.product_id){var a=this.checkPidList.indexOf(t.row.product_id);-1===a||t.checked||(this.checkPidList=this.checkPidList.filter((function(e){return e!==t.row.product_id}))),-1===a&&t.checked&&this.checkPidList.push(t.row.product_id)}else{var r=this.checkPidList.indexOf(e);-1===r||t.checked||(this.checkPidList=this.checkPidList.filter((function(t){return t!==e}))),-1===r&&t.checked&&this.checkPidList.push(e)}this.isAllChecked=this.$refs.xTree.isAllCheckboxChecked()},unique:function(t){var e=new Map;return t.filter((function(t){return!e.has(t.id)&&e.set(t.id,1)}))},getProductId:function(t){this.modals=!1;var e=this.tableData.concat(t),a=this.unique(e);a.forEach((function(t){t.parent=1,t.status=1,t.attrValue.forEach((function(e){e.cate_name=t.cate_name,e.store_label=t.store_label}))})),this.tableData=a},addGoods:function(){this.modals=!0},cancel:function(){this.modals=!1},modalPicTap:function(){this.modalPic=!0},getPic:function(t){this.modalPic=!1,this.formValidate.image=t.att_dir,this.$refs.formValidate.validateField("image")},delImage:function(){this.formValidate.image="",this.$refs.formValidate.validateField("image")},seckillTimeList:function(){var t=this;Object(c.Gb)().then((function(e){t.timeList=e.data})).catch((function(e){t.$Message.error(e.msg)}))},onchangeTime:function(t){this.formValidate.section_data=t},upTab:function(){this.currentTab=(Number(this.currentTab)-1).toString()},downTab:function(t){var e=this;this.$refs[t].validate((function(t){if(t){if(""!=!e.formValidate.section_data[0])return e.$Message.warning("请选择活动日期");if(2==e.currentTab&&!e.tableData.length)return e.$Message.warning("请添加商品");e.currentTab=(Number(e.currentTab)+1).toString()}else e.$Message.warning("请完善数据")}))},handleSubmit:function(t){var e=this;this.$refs[t].validate((function(t){if(t){if(1==e.copy?e.formValidate.copy=1:e.formValidate.copy=0,""!=!e.formValidate.section_data[0])return e.$Message.warning("请选择活动日期");e.tableData.length||e.$Message.warning("请添加商品"),e.tableData.forEach((function(t){var a={id:t.id,status:t.status,attrValue:t.attrValue};e.formValidate.seckill_ids.push(a)}));var a=[];if(e.storesList.forEach((function(t){a.push(t.id)})),2==e.formValidate.applicable_type&&!a.length)return e.$Message.warning("请添加适用门店");e.formValidate.applicable_store_id=a,e.submitOpen=!0,Object(c.xb)(e.formValidate,1==e.copy?0:e.id).then((function(t){e.submitOpen=!1,e.$Message.success(t.msg),setTimeout((function(){e.$router.push({path:e.roterPre+"/marketing/store_seckill/list"})}),500)})).catch((function(t){e.submitOpen=!1,e.$Message.error(t.msg)}))}else e.$Message.warning("请完善数据")}))}})},h=(a("5750"),a("2877")),p=Object(h.a)(f,(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_seckill/list")}}},[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 mb79 mh",attrs:{bordered:!1,"dis-hover":""}},[e("Tabs",{model:{value:t.currentTab,callback:function(e){t.currentTab=e},expression:"currentTab"}},t._l(t.headTab,(function(t,a){return e("TabPane",{key:a,attrs:{label:t.name,name:t.type}})})),1),e("Form",{ref:"formValidate",staticClass:"formValidate mt20",attrs:{rules:t.ruleValidate,model:t.formValidate,"label-width":t.labelWidth,"label-position":t.labelPosition},nativeOn:{submit:function(t){t.preventDefault()}}},[e("Row",{directives:[{name:"show",rawName:"v-show",value:"1"===t.currentTab,expression:"currentTab === '1'"}],attrs:{gutter:24,type:"flex"}},[e("Col",{attrs:{span:"24"}},[e("FormItem",{attrs:{label:"活动名称:",prop:"name"}},[e("Input",{staticClass:"w_input",attrs:{placeholder:"请输入活动名称"},model:{value:t.formValidate.name,callback:function(e){t.$set(t.formValidate,"name",e)},expression:"formValidate.name"}})],1)],1),e("Col",{attrs:{span:"24"}},[e("FormItem",{attrs:{label:"活动日期:",prop:"section_data"}},[e("div",{staticClass:"acea-row row-middle"},[e("DatePicker",{staticClass:"w_input",attrs:{editable:!1,type:"daterange",format:"yyyy-MM-dd",placeholder:"请选择活动日期",value:t.formValidate.section_data},on:{"on-change":t.onchangeTime},model:{value:t.formValidate.section_data,callback:function(e){t.$set(t.formValidate,"section_data",e)},expression:"formValidate.section_data"}})],1),e("div",{staticClass:"tips"},[t._v("设置活动开启结束日期,用户可以在有效日期内参与秒杀")])])],1),e("Col",{attrs:{span:"24"}},[e("FormItem",{attrs:{label:"秒杀场次:",prop:"time_id"}},[e("div",{staticClass:"acea-row row-middle"},[e("Select",{staticClass:"w_input",attrs:{multiple:""},model:{value:t.formValidate.time_id,callback:function(e){t.$set(t.formValidate,"time_id",e)},expression:"formValidate.time_id"}},t._l(t.timeList,(function(a){return e("Option",{key:a.id,attrs:{value:a.id}},[t._v(t._s(a.start_time)+" - "+t._s(a.end_time))])})),1)],1),e("div",{staticClass:"tips"},[t._v("选择产品开始时间段,该时间段内用户可参与购买;其它时间段会显示活动未开始或已结束。如活动超过一天,则活动期内,每天都会定时开启")])])],1),e("Col",{attrs:{span:"24"}},[e("FormItem",{attrs:{label:"活动限购:",prop:"num"}},[e("div",{staticClass:"acea-row row-middle"},[e("InputNumber",{staticClass:"w_input",attrs:{min:1,placeholder:"请输入数量限制","element-id":"num",precision:0},model:{value:t.formValidate.num,callback:function(e){t.$set(t.formValidate,"num",e)},expression:"formValidate.num"}}),e("span",{staticClass:"ml10"},[t._v("个")])],1),e("div",{staticClass:"tips"},[t._v("活动有效期内每个用户可购买该商品总数限制。例如设置为4,表示本次活动有效期内,每个用户最多可购买总数4个")])])],1),e("Col",{attrs:{span:"24"}},[e("FormItem",{attrs:{label:"单次限购:",prop:"once_num"}},[e("div",{staticClass:"acea-row row-middle"},[e("InputNumber",{staticClass:"w_input",attrs:{min:1,placeholder:"请输入单次购买数量限制","element-id":"once_num",precision:0},model:{value:t.formValidate.once_num,callback:function(e){t.$set(t.formValidate,"once_num",e)},expression:"formValidate.once_num"}}),e("span",{staticClass:"ml10"},[t._v("个")])],1),e("div",{staticClass:"tips"},[t._v("用户参与秒杀时,一次购买最大数量限制。例如设置为2,表示参与秒杀时,用户一次购买数量最大可选择2个")])])],1),e("Col",{attrs:{span:"24"}},[e("FormItem",{attrs:{label:"活动氛围框:"}},[e("Row",[e("Col",{attrs:{span:"24"}},[t.formValidate.image?e("div",{staticClass:"upload-list"},[e("div",{staticClass:"upload-item"},[e("img",{directives:[{name:"lazy",rawName:"v-lazy",value:t.formValidate.image,expression:"formValidate.image"}]}),e("Button",{attrs:{shape:"circle",icon:"ios-close"},on:{click:t.delImage}})],1)]):e("Button",{staticClass:"upload-select",attrs:{type:"dashed",icon:"ios-add"},on:{click:function(e){return t.modalPicTap("dan","image",1)}}})],1)],1)],1)],1),e("Col",{attrs:{span:"24"}},[e("FormItem",{attrs:{label:"是否开启:",props:"status","label-for":"status"}},[e("i-switch",{attrs:{"true-value":1,"false-value":0,size:"large"},model:{value:t.formValidate.status,callback:function(e){t.$set(t.formValidate,"status",e)},expression:"formValidate.status"}},[e("span",{attrs:{slot:"open"},slot:"open"},[t._v("开启")]),e("span",{attrs:{slot:"close"},slot:"close"},[t._v("关闭")])])],1)],1)],1),e("Row",{directives:[{name:"show",rawName:"v-show",value:"2"===t.currentTab,expression:"currentTab === '2'"}],attrs:{gutter:24,type:"flex"}},[e("Col",{attrs:{span:"24"}},[e("div",{staticClass:"acea-row row-between-wrapper"},[e("div",[e("Button",{attrs:{type:"primary"},on:{click:t.addGoods}},[t._v("添加商品")]),e("Button",{staticClass:"ml20",attrs:{disabled:!t.isAllChecked&&!t.checkPidList.length},on:{click:t.batchSet}},[t._v("批量设置")]),e("Button",{staticClass:"ml20",attrs:{disabled:!t.isAllChecked&&!t.checkPidList.length},on:{click:t.delAll}},[t._v("批量删除")])],1),e("div",{staticClass:"goodsWord"},[e("FormItem",{attrs:{label:"商品搜索:"}},[e("Input",{staticClass:"w_input240",attrs:{placeholder:"请输入商品关键词"},on:{"on-change":t.searchWord},model:{value:t.keyword,callback:function(e){t.keyword=e},expression:"keyword"}})],1)],1)])]),e("Col",{attrs:{span:"24"}},[e("div",{staticClass:"vxeTable"},[e("vxe-table",{ref:"xTree",attrs:{border:"inner","column-config":{resizable:!0},"row-id":"id","tree-config":{children:"attrValue",reserve:!0},data:t.searchTableData.length||t.keyword?t.searchTableData:t.tableData},on:{"checkbox-all":t.checkboxAll,"checkbox-change":t.checkboxItem}},[e("vxe-column",{attrs:{type:"checkbox",title:"多选",width:"90","tree-node":""}}),e("vxe-column",{attrs:{field:"info",title:"商品信息","min-width":"300"},scopedSlots:t._u([{key:"default",fn:function(a){var r=a.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"}]})])]),e("div",{staticClass:"info"},[e("Tooltip",{attrs:{"max-width":"200",placement:"bottom",transfer:""}},[e("span",{staticClass:"line2"},[t._v(t._s(r.store_name)+t._s(r.suk))]),e("p",{attrs:{slot:"content"},slot:"content"},[t._v(t._s(r.store_name)+t._s(r.suk))])])],1)],1)]}}])}),e("vxe-column",{attrs:{field:"price",title:"秒杀价","min-width":"150"},scopedSlots:t._u([{key:"default",fn:function(a){var r=a.row;return[1==r.parent?e("div",[t._v("——")]):e("vxe-input",{attrs:{min:"0",placeholder:"请输入秒杀价",type:"float",digits:"2",step:"1"},model:{value:r.price,callback:function(e){t.$set(r,"price",e)},expression:"row.price"}})]}}])}),e("vxe-column",{attrs:{field:"cost",title:"成本价","min-width":"80"}}),e("vxe-column",{attrs:{field:"ot_price",title:"原价","min-width":"80"}}),e("vxe-column",{attrs:{field:"stock",title:"库存","min-width":"90"}}),e("vxe-column",{attrs:{field:"quota",title:"限量","min-width":"150"},scopedSlots:t._u([{key:"default",fn:function(a){var r=a.row;return[1==r.parent?e("div",[t._v("——")]):e("vxe-input",{attrs:{min:"0",placeholder:"请输入限量",type:"integer"},model:{value:r.quota,callback:function(e){t.$set(r,"quota",e)},expression:"row.quota"}})]}}])}),e("vxe-column",{attrs:{field:"status",title:"是否开启","min-width":"100"},scopedSlots:t._u([{key:"default",fn:function(a){var r=a.row;return[1==r.parent?e("i-switch",{attrs:{value:r.status,"true-value":1,"false-value":0,size:"large"},on:{"on-change":function(e){return t.onchangeIsShow(r)}},model:{value:r.status,callback:function(e){t.$set(r,"status",e)},expression:"row.status"}},[e("span",{attrs:{slot:"open"},slot:"open"},[t._v("上架")]),e("span",{attrs:{slot:"close"},slot:"close"},[t._v("下架")])]):e("div",[t._v("——")])]}}])}),e("vxe-column",{attrs:{field:"date",title:"操作","min-width":"100",fixed:"right",align:"center"},scopedSlots:t._u([{key:"default",fn:function(a){var r=a.row;return[1==r.parent?e("a",{on:{click:function(e){return t.del(r)}}},[t._v("删除")]):t._e()]}}])})],1)],1)])],1),e("Row",{directives:[{name:"show",rawName:"v-show",value:"3"===t.currentTab,expression:"currentTab === '3'"}],attrs:{gutter:24,type:"flex"}},[e("Col",{attrs:{span:"24"}},[e("RadioGroup",{model:{value:t.formValidate.applicable_type,callback:function(e){t.$set(t.formValidate,"applicable_type",e)},expression:"formValidate.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.formValidate.applicable_type?e("Col",{staticClass:"mt20",attrs:{span:"24"}},[e("Button",{attrs:{type:"primary"},on:{click:t.addStore}},[t._v("添加门店")])],1):t._e(),e("Col",{attrs:{span:"24"}},[2==t.formValidate.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 a=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:a.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(a){var r=a.row;return[e("a",{on:{click:function(e){return t.delte(r)}}},[t._v("删除")])]}}],null,!1,3111734551)})],1)],1):t._e()])],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(),"3"!==t.currentTab?e("Button",{staticClass:"submission",attrs:{type:"primary"},on:{click:function(e){return t.downTab("formValidate")}}},[t._v("下一步")]):e("Button",{staticClass:"submission",attrs:{type:"primary",disabled:t.submitOpen},on:{click:function(e){return t.handleSubmit("formValidate")}}},[t._v("提交")])],1)],1)],1),e("Modal",{attrs:{width:"960px",scrollable:"","footer-hide":"",closable:"",title:"上传活动氛围框","mask-closable":!1,"z-index":500},model:{value:t.modalPic,callback:function(e){t.modalPic=e},expression:"modalPic"}},[t.modalPic?e("uploadPictures",{attrs:{isChoice:"单选",gridBtn:t.gridBtn,gridPic:t.gridPic},on:{getPic:t.getPic}}):t._e()],1),e("Modal",{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,isdiy:!0,goodsType:1},on:{getProductId:t.getProductId}}):t._e()],1),e("Modal",{attrs:{title:"批量设置"},on:{"on-visible-change":t.batchVisibleChange},model:{value:t.modalsSet,callback:function(e){t.modalsSet=e},expression:"modalsSet"}},[e("Form",{ref:"formBatch",attrs:{model:t.formBatch,"label-width":t.labelWidth,"label-position":t.labelPosition},nativeOn:{submit:function(t){t.preventDefault()}}},[e("FormItem",{attrs:{label:"秒杀价:",prop:"price"}},[e("vxe-input",{staticClass:"w_input315",attrs:{min:"0",placeholder:"请输入秒杀价",type:"float",digits:"2",step:"1"},model:{value:t.formBatch.price,callback:function(e){t.$set(t.formBatch,"price",e)},expression:"formBatch.price"}})],1),e("FormItem",{attrs:{label:"限量:",prop:"quota"}},[e("vxe-input",{staticClass:"w_input315",attrs:{min:"0",placeholder:"请输入限量",type:"integer"},model:{value:t.formBatch.quota,callback:function(e){t.$set(t.formBatch,"quota",e)},expression:"formBatch.quota"}})],1)],1),e("div",{attrs:{slot:"footer"},slot:"footer"},[e("Button",{on:{click:t.cancelBatch}},[t._v("取消")]),e("Button",{attrs:{type:"primary"},on:{click:t.okBatch}},[t._v("保存")])],1)],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,"6d9c0c83",null);e.default=p.exports},"9a36":function(t,e,a){"use strict";a("3715")},ffa6:function(t,e,a){}}]); |