canyin-project/ybcy/views/channel/index/static/js/chunk-5bad561a.5dacc6e3.js

1 line
34 KiB
JavaScript
Raw Normal View History

2024-11-01 16:07:54 +08:00
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-5bad561a"],{"3bbe":function(t,e,n){var a=n("861d");t.exports=function(t){if(!a(t)&&null!==t)throw TypeError("Can't set "+String(t)+" as a prototype");return t}},"419d":function(t,e,n){"use strict";var a=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"body"},[n("el-dialog",{attrs:{title:t.title,visible:t.dialogFormVisible,width:"600px","close-on-click-modal":!1},on:{"update:visible":function(e){t.dialogFormVisible=e},close:t.close}},[n("el-form",{ref:"form",attrs:{model:t.form,"label-width":"120px"}},["name"==t.type?n("el-form-item",{attrs:{label:"商品名称",prop:"name"}},[n("el-input",{attrs:{autocomplete:"off"},model:{value:t.form.name,callback:function(e){t.$set(t.form,"name","string"===typeof e?e.trim():e)},expression:"form.name"}})],1):t._e(),"price"==t.type?n("el-form-item",{attrs:{label:"价格",prop:"price"}},[n("el-input-number",{staticStyle:{width:"300px"},attrs:{precision:2,step:1,min:0},model:{value:t.form.price,callback:function(e){t.$set(t.form,"price",e)},expression:"form.price"}})],1):t._e(),"stock"==t.type?n("el-form-item",{attrs:{label:"库存",prop:"stock"}},[n("el-input-number",{staticStyle:{width:"300px"},attrs:{min:0},model:{value:t.form.stock,callback:function(e){t.$set(t.form,"stock",e)},expression:"form.stock"}})],1):t._e(),"sort"==t.type?n("el-form-item",{attrs:{label:"排序",prop:"sort"}},[n("el-input",{attrs:{autocomplete:"off"},model:{value:t.form.sort,callback:function(e){t.$set(t.form,"sort","string"===typeof e?e.trim():e)},expression:"form.sort"}})],1):t._e()],1),n("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[n("el-button",{attrs:{size:"medium"},on:{click:t.close}},[t._v("取 消")]),n("el-button",{attrs:{size:"medium",type:"primary"},on:{click:t.save}},[t._v("确 定")])],1)],1)],1)},r=[],o=(n("b0c0"),n("96cf"),n("1da1")),s=n("5a4a"),i={name:"goodlistedit",created:function(){},data:function(){return{form:{name:"",price:"",stock:"",sort:""},type:"",title:"",dialogFormVisible:!1,storeId:""}},components:{},methods:{showEdit:function(t,e){t?(this.title="编辑",this.form=Object.assign({},t),this.type=e):this.title="添加",this.dialogFormVisible=!0},setStoreId:function(t){this.storeId=t},close:function(){this.$refs["form"].resetFields(),this.form=this.$options.data().form,this.dialogFormVisible=!1},save:function(){var t=this;return Object(o["a"])(regeneratorRuntime.mark((function e(){var n,a,r;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return n={},"name"==t.type?n={id:t.form.id,name:t.form.name}:"price"==t.type?n={id:t.form.id,price:t.form.price,storeId:t.storeId}:"stock"==t.type?n={id:t.form.id,stock:t.form.stock,storeId:t.storeId}:"sort"==t.type&&(n={id:t.form.id,sort:t.form.sort,storeId:t.storeId}),console.log(n),e.next=5,Object(s["D"])(n);case 5:a=e.sent,r=a.msg,t.$baseMessage(r,"success"),t.$emit("fetchData"),t.close();case 10:case"end":return e.stop()}}),e)})))()}}},c=i,l=n("2877"),u=Object(l["a"])(c,a,r,!1,null,null,null);e["a"]=u.exports},4249:function(t,e,n){},"4cd2":function(t,e,n){},"5a4a":function(t,e,n){"use strict";n.d(e,"B",(function(){return r})),n.d(e,"d",(function(){return o})),n.d(e,"G",(function(){return s})),n.d(e,"z",(function(){return i})),n.d(e,"r",(function(){return c})),n.d(e,"y",(function(){return l})),n.d(e,"W",(function(){return u})),n.d(e,"A",(function(){return d})),n.d(e,"F",(function(){return m})),n.d(e,"D",(function(){return p})),n.d(e,"f",(function(){return f})),n.d(e,"e",(function(){return h})),n.d(e,"g",(function(){return b})),n.d(e,"i",(function(){return g})),n.d(e,"w",(function(){return v})),n.d(e,"ab",(function(){return w})),n.d(e,"o",(function(){return y})),n.d(e,"Z",(function(){return _})),n.d(e,"C",(function(){return k})),n.d(e,"H",(function(){return x})),n.d(e,"q",(function(){return O})),n.d(e,"c",(function(){return j})),n.d(e,"h",(function(){return I})),n.d(e,"b",(function(){return C})),n.d(e,"u",(function(){return N})),n.d(e,"N",(function(){return $})),n.d(e,"m",(function(){ret