canyin-project/ybcy/views/channel/index/static/js/chunk-6941bdc8.b3e5c411.js
2024-11-01 16:07:54 +08:00

1 line
16 KiB
JavaScript

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-6941bdc8"],{"1bdb":function(t,e,a){},"2dbd":function(t,e,a){"use strict";var i=a("1bdb"),s=a.n(i);s.a},"3bbe":function(t,e,a){var i=a("861d");t.exports=function(t){if(!i(t)&&null!==t)throw TypeError("Can't set "+String(t)+" as a prototype");return t}},"4e30":function(t,e,a){"use strict";var i=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"selectgood"},[a("el-dialog",{attrs:{title:t.title,visible:t.dialogFormVisible,width:"1000px","close-on-click-modal":!1},on:{"update:visible":function(e){t.dialogFormVisible=e},close:t.close}},[a("div",{staticClass:"flex-bet flex-y-top selected"},[a("div",{staticClass:"flex-g-0 leftType"},[a("el-scrollbar",[a("div",{staticClass:"leftborder",staticStyle:{"max-height":"600px"}},t._l(t.categoryList,(function(e,i){return a("p",{key:i,staticClass:"curs pad_l_10 lh40",class:{current:i==t.current},on:{click:function(a){return t.clickCategory(i,e)}}},[t._v(t._s(e.name))])})),0)])],1),a("div",{staticClass:"flex-g-1"},[a("div",{staticClass:"search mar_b20 mar_l10"},[a("div",{staticClass:"filter_wrapper_edit flex"},[a("div",{staticClass:"flex"},[a("el-input",{staticClass:"elinput",attrs:{placeholder:"请输入商品名称"},model:{value:t.goodName,callback:function(e){t.goodName=e},expression:"goodName"}})],1),a("el-button",{staticClass:"mar_l20",attrs:{type:"primary",size:"medium"},on:{click:function(e){return t.search()}}},[t._v("搜索")])],1)]),a("div",[a("el-scrollbar",[a("div",{staticClass:"wid flex flex-wrap",staticStyle:{"max-height":"600px"}},t._l(t.goodList,(function(e,i){return a("div",{key:i,staticClass:"goods flex-bet"},[a("div",{staticClass:"flex-g-0"},[a("el-image",{staticStyle:{width:"90px",height:"80px","border-radius":"10px"},attrs:{src:e.icon,fit:"cover"}})],1),a("div",{staticClass:"pad_l_10 flex-g-1"},[a("div",{staticClass:"fon_12 color_6"},[t._v(t._s(e.name))]),1==e.goodsType?a("el-tag",{staticClass:"mar_t10",attrs:{size:"mini",type:"success",effect:"dark"}},[t._v("外卖")]):t._e(),2==e.goodsType?a("el-tag",{staticClass:"mar_t10",attrs:{size:"mini",type:"",effect:"dark"}},[t._v("店内")]):t._e(),a("div",{staticClass:"flex-bet mar_t10"},[a("div",{staticClass:"color_f6c"},[t._v("库存:"+t._s(e.stock))]),a("div",[1==e.type?a("el-button",{attrs:{size:"mini",round:""},on:{click:function(a){return t.open(e,i)}}},[t._v("选取")]):a("el-button",{attrs:{size:"mini",round:"",type:"primary"},on:{click:function(a){return t.open(e,i)}}},[t._v("取消")])],1)])],1)])})),0)])],1)])]),a("div",{staticStyle:{"margin-left":"190px"}},[a("el-pagination",{attrs:{background:"",layout:"prev, pager, next",total:t.page.total,"page-size":t.page.pagesize,"current-page":t.page.currentPage},on:{"update:currentPage":function(e){return t.$set(t.page,"currentPage",e)},"update:current-page":function(e){return t.$set(t.page,"currentPage",e)},"current-change":t.handleCurrentChange}})],1),a("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{attrs:{size:"medium"},on:{click:t.close}},[t._v("取 消")]),a("el-button",{attrs:{size:"medium",type:"primary"},on:{click:t.save}},[t._v("确 定")])],1)])],1)},s=[],n=(a("b0c0"),a("96cf"),a("1da1")),o=a("5530"),r=a("7cb7"),c=a("2f62"),l={name:"labelSave",created:function(){},computed:Object(o["a"])({},Object(c["d"])(["storeData"])),data:function(){return{title:"",goodName:"",dialogFormVisible:!1,yhtableData:[],selection:"选取",list:[],listLoading:!0,selectRows:"",elementLoadingText:"正在加载...",page:{total:0,size:10,currentPage:1},tableData3:[],tableData4:[],ids:[],category:"",categoryList:[],goodList:[],current:0,storeId:"",isSpecs:"",goodsType:"",startTime:"",endTime:"",goodsInfo:""}},components:{},methods:{goodType:function(t){var e=this;return Object(n["a"])(regeneratorRuntime.mark((function a(){var i,s;return regeneratorRuntime.wrap((function(a){while(1)switch(a.prev=a.next){case 0:return a.next=2,Object(r["xc"])({item:t,storeId:e.storeId,goodsInfo:e.goodsInfo});case 2:i=a.sent,s=i.data,e.categoryList=s||[],e.categoryList.unshift({id:"",name:"全部"});case 6:case"end":return a.stop()}}),a)})))()},clickCategory:function(t,e){this.current=t,this.category=e.id,this.init()},init:function(){var t=this;return Object(n["a"])(regeneratorRuntime.mark((function e(){var a,i,s;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,Object(r["wc"])({startTime:t.startTime,endTime:t.endTime,goodsType:t.goodsType,page:t.page.currentPage,keyword:t.goodName,idArr:t.ids,typeId:t.category,isSpecs:t.isSpecs,goodsInfo:t.goodsInfo,storeId:t.storeId,goodsModel:t.storeData.goodsModel});case 2:a=e.sent,i=a.data,s=a.count,t.goodList=i||[],t.page.total=s;case 7:case"end":return e.stop()}}),e)})))()},setStoreId:function(t){this.storeId=t},handleCurrentChange:function(t){this.page.currentPage=t,this.init()},search:function(){this.init()},showEdit:function(t,e,a,i){var s=this;return Object(n["a"])(regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:s.goodsType=e||"",a&&(s.startTime=s.$moment(a[0]).format("YYYY-MM-DD HH:mm:ss"),s.endTime=s.$moment(new Date(a[1])).format("YYYY-MM-DD HH:mm:ss")),console.log(s.startTime),console.log(s.endTime),s.goodType(i),t?(s.title="编辑商品",s.ids=t,s.init()):s.title="添加商品",s.dialogFormVisible=!0;case 7:case"end":return n.stop()}}),n)})))()},isSpec:function(t){this.isSpecs=t},isGoodsInfo:function(t){this.goodsInfo=t},open:function(t,e){if(1==t.type){this.goodList[e].type=2;var a={name:t.name,stock:t.stock,price:t.price,icon:t.icon,id:t.id,type:t.type};"1"==this.goodsInfo?this.$set(this.tableData3,this.tableData3.length,a):"2"==this.goodsInfo?this.$set(this.tableData4,this.tableData4.length,a):this.$set(this.tableData3,this.tableData3.length,a)}else this.goodList[e].type=1;this.dialogFormVisible=!1,this.save()},close:function(){this.dialogFormVisible=!1},save:function(){var t=this;return Object(n["a"])(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:"1"==t.goodsInfo?t.$emit("fetchData",t.tableData3):"2"==t.goodsInfo?t.$emit("fetchData2",t.tableData4):t.$emit("fetchData",t.tableData3),t.close();case 2:case"end":return e.stop()}}),e)})))()}}},u=l,d=(a("2dbd"),a("2877")),g=Object(d["a"])(u,i,s,!1,null,null,null);e["a"]=g.exports},"6ea5":function(t,e,a){"use strict";var i=a("798c"),s=a.n(i);s.a},7156:function(t,e,a){var i=a("861d"),s=a("d2bb");t.exports=function(t,e,a){var n,o;return s&&"function"==typeof(n=e.constructor)&&n!==a&&i(o=n.prototype)&&o!==a.prototype&&s(t,o),t}},"798c":function(t,e,a){},a434:function(t,e,a){"use strict";var i=a("23e7"),s=a("23cb"),n=a("a691"),o=a("50c4"),r=a("7b0b"),c=a("65f0"),l=a("8418"),u=a("1dde"),d=a("ae40"),g=u("splice"),f=d("splice",{ACCESSORS:!0,0:0,1:2}),p=Math.max,m=Math.min,h=9007199254740991,b="Maximum allowed length exceeded";i({target:"Array",proto:!0,forced:!g||!f},{splice:function(t,e){var a,i,u,d,g,f,v=r(this),y=o(v.length),_=s(t,y),x=arguments.length;if(0===x?a=i=0:1===x?(a=0,i=y-_):(a=x-2,i=m(p(n(e),0),y-_)),y+a-i>h)throw TypeError(b);for(u=c(v,i),d=0;d<i;d++)g=_+d,g in v&&l(u,d,v[g]);if(u.length=i,a<i){for(d=_;d<y-i;d++)g=d+i,f=d+a,g in v?v[f]=v[g]:delete v[f];for(d=y;d>y-i+a;d--)delete v[d-1]}else if(a>i)for(d=y-i;d>_;d--)g=d+i-1,f=d+a-1,g in v?v[f]=v[g]:delete v[f];for(d=0;d<a;d++)v[d+_]=arguments[d+2];return v.length=y-i+a,u}})},a9e3:function(t,e,a){"use strict";var i=a("83ab"),s=a("da84"),n=a("94ca"),o=a("6eeb"),r=a("5135"),c=a("c6b6"),l=a("7156"),u=a("c04e"),d=a("d039"),g=a("7c73"),f=a("241c").f,p=a("06cf").f,m=a("9bf2").f,h=a("58a8").trim,b="Number",v=s[b],y=v.prototype,_=c(g(y))==b,x=function(t){var e,a,i,s,n,o,r,c,l=u(t,!1);if("string"==typeof l&&l.length>2)if(l=h(l),e=l.charCodeAt(0),43===e||45===e){if(a=l.charCodeAt(2),88===a||120===a)return NaN}else if(48===e){switch(l.charCodeAt(1)){case 66:case 98:i=2,s=49;break;case 79:case 111:i=8,s=55;break;default:return+l}for(n=l.slice(2),o=n.length,r=0;r<o;r++)if(c=n.charCodeAt(r),c<48||c>s)return NaN;return parseInt(n,i)}return+l};if(n(b,!v(" 0o1")||!v("0b1")||v("+0x1"))){for(var w,C=function(t){var e=arguments.length<1?0:t,a=this;return a instanceof C&&(_?d((function(){y.valueOf.call(a)})):c(a)!=b)?l(new v(x(e)),a,C):x(e)},I=i?f(v):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),D=0;I.length>D;D++)r(v,w=I[D])&&!r(C,w)&&m(C,w,p(v,w));C.prototype=y,y.constructor=C,o(s,b,C)}},bf19:function(t,e,a){"use strict";var i=a("23e7");i({target:"URL",proto:!0,enumerable:!0},{toJSON:function(){return URL.prototype.toString.call(this)}})},d2bb:function(t,e,a){var i=a("825a"),s=a("3bbe");t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,a={};try{t=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set,t.call(a,[]),e=a instanceof Array}catch(n){}return function(a,n){return i(a),s(n),e?t.call(a,n):a.__proto__=n,a}}():void 0)},df58:function(t,e,a){"use strict";var i=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"selectgood"},[a("el-dialog",{attrs:{title:t.title,visible:t.dialogFormVisible,width:"1000px","close-on-click-modal":!1},on:{"update:visible":function(e){t.dialogFormVisible=e},close:t.close}},[a("div",{staticClass:"flex-bet flex-y-top selected"},[a("div",{staticClass:"flex-g-0 leftType"},[a("el-scrollbar",[a("div",{staticClass:"leftborder",staticStyle:{"max-height":"600px"}},t._l(t.categoryList,(function(e,i){return a("p",{key:i,staticClass:"curs pad_l_10 lh40",class:{current:i==t.current},on:{click:function(a){return t.clickCategory(i,e)}}},[t._v(t._s(e.name))])})),0)])],1),a("div",{staticClass:"flex-g-1"},[a("div",{staticClass:"search mar_b20 mar_l10"},[a("div",{staticClass:"filter_wrapper_edit flex"},[a("div",{staticClass:"flex"},[a("el-input",{staticClass:"elinput",attrs:{placeholder:"请输入商品名称"},model:{value:t.goodName,callback:function(e){t.goodName=e},expression:"goodName"}})],1),a("el-button",{staticClass:"mar_l20",attrs:{type:"primary",size:"medium"},on:{click:function(e){return t.search()}}},[t._v("搜索")])],1)]),a("div",[a("el-scrollbar",[a("div",{staticClass:"wid flex flex-wrap",staticStyle:{"max-height":"600px"}},t._l(t.goodList,(function(e,i){return a("div",{key:i,staticClass:"goods flex-bet"},[a("div",{staticClass:"flex-g-0"},[a("el-image",{staticStyle:{width:"90px",height:"80px","border-radius":"10px"},attrs:{src:e.icon,fit:"cover"}})],1),a("div",{staticClass:"pad_l_10 flex-g-1"},[a("div",{staticClass:"fon_12 color_6"},[t._v(t._s(e.name))]),1==e.goodsType?a("el-tag",{staticClass:"mar_t10",attrs:{size:"mini",type:"success",effect:"dark"}},[t._v("外卖")]):t._e(),2==e.goodsType?a("el-tag",{staticClass:"mar_t10",attrs:{size:"mini",type:"",effect:"dark"}},[t._v("店内")]):t._e(),a("div",{staticClass:"flex-bet mar_t10"},[a("div",{staticClass:"color_f6c"},[t._v("库存:"+t._s(e.stock))]),a("div",[1==e.type?a("el-button",{attrs:{size:"mini",round:""},on:{click:function(a){return t.open(e,i)}}},[t._v("选取")]):a("el-button",{attrs:{size:"mini",round:"",type:"primary"},on:{click:function(a){return t.open(e,i)}}},[t._v("取消")])],1)])],1)])})),0)])],1)])]),a("div",{staticStyle:{"margin-left":"190px"}},[a("el-pagination",{attrs:{background:"",layout:"prev, pager, next",total:t.page.total,"page-size":t.page.pagesize,"current-page":t.page.currentPage},on:{"update:currentPage":function(e){return t.$set(t.page,"currentPage",e)},"update:current-page":function(e){return t.$set(t.page,"currentPage",e)},"current-change":t.handleCurrentChange}})],1),a("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{attrs:{size:"medium"},on:{click:t.close}},[t._v("取 消")]),a("el-button",{attrs:{size:"medium",type:"primary"},on:{click:t.save}},[t._v("确 定")])],1)])],1)},s=[],n=(a("b0c0"),a("96cf"),a("1da1")),o=a("5530"),r=a("7cb7"),c=a("2f62"),l={name:"labelSave",created:function(){},computed:Object(o["a"])({},Object(c["d"])(["storeData"])),data:function(){return{title:"",goodName:"",dialogFormVisible:!1,yhtableData:[],selection:"选取",list:[],listLoading:!0,selectRows:"",elementLoadingText:"正在加载...",page:{total:0,size:10,currentPage:1},tableData3:[],tableData4:[],ids:[],category:"",categoryList:[],goodList:[],current:0,storeId:"",isSpecs:"",goodsType:"",startTime:"",endTime:"",goodsInfo:"",danxuan:""}},components:{},methods:{goodType:function(t){var e=this;return Object(n["a"])(regeneratorRuntime.mark((function a(){var i,s;return regeneratorRuntime.wrap((function(a){while(1)switch(a.prev=a.next){case 0:return a.next=2,Object(r["xc"])({item:t,storeId:e.storeId,goodsInfo:e.goodsInfo});case 2:i=a.sent,s=i.data,e.categoryList=s||[],e.categoryList.unshift({id:"",name:"全部"});case 6:case"end":return a.stop()}}),a)})))()},clickCategory:function(t,e){this.current=t,this.category=e.id,this.init()},init:function(){var t=this;return Object(n["a"])(regeneratorRuntime.mark((function e(){var a,i,s;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,Object(r["wc"])({startTime:t.startTime,endTime:t.endTime,goodsType:t.goodsType,page:t.page.currentPage,keyword:t.goodName,idArr:t.ids,typeId:t.category,isSpecs:t.isSpecs,goodsInfo:t.goodsInfo,storeId:t.storeId,goodsModel:t.storeData.goodsModel});case 2:a=e.sent,i=a.data,s=a.count,t.goodList=i||[],t.page.total=s;case 7:case"end":return e.stop()}}),e)})))()},setStoreId:function(t){this.storeId=t},handleCurrentChange:function(t){this.page.currentPage=t,this.init()},search:function(){this.init()},showEdit:function(t,e,a,i){var s=this;return Object(n["a"])(regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:s.goodsType=e||"",a&&(s.startTime=s.$moment(a[0]).format("YYYY-MM-DD HH:mm:ss"),s.endTime=s.$moment(new Date(a[1])).format("YYYY-MM-DD HH:mm:ss")),console.log(s.startTime),console.log(s.endTime),s.goodType(i),t?(s.title="编辑商品",s.ids=t,s.init()):s.title="添加商品",s.dialogFormVisible=!0;case 7:case"end":return n.stop()}}),n)})))()},isSpec:function(t){this.isSpecs=t},isGoodsInfo:function(t){this.goodsInfo=t},isDanXuan:function(t){this.danxuan=t},open:function(t,e){if(1==t.type){this.goodList[e].type=2;var a={name:t.name,stock:t.stock,price:t.price,icon:t.icon,id:t.id,type:t.type};"1"==this.goodsInfo?this.$set(this.tableData3,this.tableData3.length,a):"2"==this.goodsInfo?this.$set(this.tableData4,this.tableData4.length,a):this.$set(this.tableData3,this.tableData3.length,a)}else this.goodList[e].type=1;"1"==this.danxuan&&(this.dialogFormVisible=!1,this.save())},close:function(){this.dialogFormVisible=!1},save:function(){var t=this;return Object(n["a"])(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:"1"==t.goodsInfo?t.$emit("fetchData",t.tableData3):"2"==t.goodsInfo?t.$emit("fetchData2",t.tableData4):t.$emit("fetchData",t.tableData3),t.close();case 2:case"end":return e.stop()}}),e)})))()}}},u=l,d=(a("6ea5"),a("2877")),g=Object(d["a"])(u,i,s,!1,null,null,null);e["a"]=g.exports},ed08:function(t,e,a){"use strict";a.d(e,"a",(function(){return i})),a.d(e,"b",(function(){return s})),a.d(e,"c",(function(){return n}));a("a9e3"),a("ac1f"),a("5319"),a("bf19");function i(t){var e=new Date(t).toJSON(),a=new Date(+new Date(e)+288e5).toISOString().replace(/T/g," ").replace(/\.[\d]{3}Z/,"");return a}function s(t){var e=new Date(t),a=e.getFullYear(),i=e.getMonth()+1<10?"0"+(e.getMonth()+1):e.getMonth()+1,s=e.getDate()<10?"0"+e.getDate():e.getDate(),n=e.getHours()<10?"0"+e.getHours():e.getHours(),o=e.getMinutes()<10?"0"+e.getMinutes():e.getMinutes(),r=e.getSeconds()<10?"0"+e.getSeconds():e.getSeconds();return a+"-"+i+"-"+s+" "+n+":"+o+":"+r}function n(t){var e=new Date(1e3*Number(t)),a=e.getFullYear()+"-",i=(e.getMonth()+1<10?"0"+(e.getMonth()+1):e.getMonth()+1)+"-",s=(e.getDate()<10?"0"+e.getDate():e.getDate())+" ",n=(e.getHours()<10?"0"+e.getHours():e.getHours())+":",o=(e.getMinutes()<10?"0"+e.getMinutes():e.getMinutes())+":",r=e.getSeconds()<10?"0"+e.getSeconds():e.getSeconds(),c=a+i+s+n+o+r;return c}}}]);