1 line
9.7 KiB
JavaScript
1 line
9.7 KiB
JavaScript
(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-08eae24b"],{"31d2":function(t,e,r){},4636:function(t,e,r){r("31d2")},c4ad:function(t,e,r){r.r(e),r("99af"),r("14d9"),r("e9f5"),r("7d54"),r("a9e3"),r("d3b7"),r("159b");var a=r("c4c8"),n={name:"index",props:{is_new:{type:String,default:""},type:{type:Number,default:0},diy:{type:Boolean,default:!1},ischeckbox:{type:Boolean,default:!1},liveStatus:{type:Boolean,default:!1},isLive:{type:Boolean,default:!1},isdiy:{type:Boolean,default:!1},selectIds:{type:Array,default:function(){return[]}},datas:{type:Object,default:function(){return{}}}},data:function(){return{templateRadio:0,modal_loading:!1,treeSelect:[],formValidate:{page:1,limit:15,cate_id:"",store_name:"",is_new:this.is_new},total:0,modals:!1,loading:!1,grid:{xl:10,lg:10,md:12,sm:24,xs:24},tableList:[],currentid:0,productRow:{},images:[],many:"",goodType:"",goodList:[{activeValue:0,title:"商品列表"},{activeValue:"4",title:"热门榜单"},{activeValue:"5",title:"首发新品"},{activeValue:"6",title:"促销单品"},{activeValue:"7",title:"精品推荐"}]}},computed:{},watch:{ischeckbox:{handler:function(t,e){t&&(this.many="many")},immediate:!0}},created:function(){var t="";t=this.ischeckbox?"many":this.$route.query.type;this.many=t},mounted:function(){this.goodsCategory()},methods:{productList:function(){this.formValidate.page,this.formValidate.limit,this.formValidate.cate_id,this.formValidate.store_name,this.type||this.goodType,this.loading=!0},getTemplateRow:function(t){var e=[],r={image:t.image,product_id:t.id,store_name:t.store_name,temp_id:t.temp_id};e.push(r),this.images=e,this.diyVal=t,this.$emit("getProductId",t)},changeCheckbox:function(t){var e=[];t.forEach((function(t){t={image:t.image,product_id:t.id,store_name:t.store_name,temp_id:t.temp_id},e.push(t)})),this.images=e,this.diyVal=t},goodsCategory:function(){var t=this;Object(a.d)(1).then((function(e){t.treeSelect=e.data})).catch((function(e){t.$message.error(e.msg)}))},ok:function(){var t;0<this.images.length?"image"===this.$route.query.fodder?(t=form_create_helper.get("image"),form_create_helper.set("image",t.concat(this.images)),form_create_helper.close("image")):(this.$refs.table.clearSelection(),this.isdiy?this.$emit("getProductId",this.diyVal):this.$emit("getProductId",this.images)):this.$message.warning("请先选择商品")},userSearchs:function(){this.currentid=0,this.productRow={},this.formValidate.page=1},clear:function(){this.productRow.id="",this.currentid=""}}};r("4636"),r=r("2877"),r=Object(r.a)(n,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"goodList"},[e("el-form",{ref:"formValidate",staticClass:"tabform",attrs:{model:t.formValidate,"label-width":"80px","label-position":"right",inline:""}},[t.liveStatus?t._e():e("el-form-item",{attrs:{label:"商品分类:"}},[e("el-cascader",{staticClass:"form_content_width",attrs:{size:"small",options:t.treeSelect,props:{checkStrictly:!0,emitPath:!1},clearable:""},model:{value:t.formValidate.cate_id,callback:function(e){t.$set(t.formValidate,"cate_id",e)},expression:"formValidate.cate_id"}})],1),!t.type&&t.diy?e("el-form-item",{attrs:{label:"商品类型:"}},[e("el-select",{staticClass:"form_content_width",attrs:{clearable:""},on:{change:t.userSearchs},model:{value:t.goodType,callback:function(e){t.goodType=e},expression:"goodType"}},t._l(t.goodList,(function(t){return e("el-option",{key:t.activeValue,attrs:{value:t.activeValue,label:t.title}})})),1)],1):t._e(),e("el-form-item",{attrs:{label:"商品搜索:"}},[e("el-input",{staticClass:"form_content_width",attrs:{clearable:"",placeholder:"请输入商品名称/关键字/编号"},model:{value:t.formValidate.store_name,callback:function(e){t.$set(t.formValidate,"store_name",e)},expression:"formValidate.store_name"}}),e("el-button",{staticClass:"ml15",attrs:{type:"primary"},on:{click:t.userSearchs}},[t._v("查询")])],1)],1),e("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],ref:"table",attrs:{"empty-text":"暂无数据","max-height":"400","highlight-current-row":"many"!==t.many,data:t.tableList},on:{select:t.changeCheckbox,"select-all":t.changeCheckbox}},["many"==t.many?e("el-table-column",{attrs:{type:"selection",width:"55"}}):e("el-table-column",{attrs:{width:"50"},scopedSlots:t._u([{key:"default",fn:function(r){return[e("el-radio",{attrs:{label:r.row.id},nativeOn:{change:function(e){return t.getTemplateRow(r.row)}},model:{value:t.templateRadio,callback:function(e){t.templateRadio=e},expression:"templateRadio"}},[t._v(" ")])]}}])}),e("el-table-column",{attrs:{label:"商品ID",width:"80"},scopedSlots:t._u([{key:"default",fn:function(r){return[e("span",[t._v(t._s(r.row.id))])]}}])}),e("el-table-column",{attrs:{label:"图片",width:"80"},scopedSlots:t._u([{key:"default",fn:function(t){return[e("div",{directives:[{name:"viewer",rawName:"v-viewer"}],staticClass:"tabBox_img"},[e("img",{directives:[{name:"lazy",rawName:"v-lazy",value:t.row.image,expression:"scope.row.image"}]})])]}}])}),e("el-table-column",{attrs:{label:"商品名称","min-width":"250"},scopedSlots:t._u([{key:"default",fn:function(r){return[e("span",[t._v(t._s(r.row.store_name))])]}}])}),t.liveStatus?e("el-table-column",{attrs:{label:"商品分类","min-width":"150"},scopedSlots:t._u([{key:"default",fn:function(r){return[e("span",[t._v(t._s(r.row.cate_name))])]}}],null,!1,2696455405)}):t._e()],1),e("div",{staticClass:"acea-row row-right page"},[t.total?e("pagination",{attrs:{total:t.total,page:t.formValidate.page,limit:t.formValidate.limit},on:{"update:page":function(e){return t.$set(t.formValidate,"page",e)},"update:limit":function(e){return t.$set(t.formValidate,"limit",e)},pagination:t.pageChange}}):t._e(),"many"!==t.many||t.diy?t._e():e("el-button",{staticClass:"ml15",attrs:{type:"primary"},on:{click:t.ok}},[t._v("提交")])],1)],1)}),[],!1,null,"31ebdbe9",null);e.default=r.exports},c4c8:function(t,e,r){r.d(e,"j",(function(){return n})),r.d(e,"k",(function(){return o})),r.d(e,"n",(function(){return c})),r.d(e,"c",(function(){return u})),r.d(e,"a",(function(){return i})),r.d(e,"v",(function(){return d})),r.d(e,"C",(function(){return l})),r.d(e,"w",(function(){return s})),r.d(e,"F",(function(){return m})),r.d(e,"d",(function(){return p})),r.d(e,"t",(function(){return f})),r.d(e,"m",(function(){return h})),r.d(e,"u",(function(){return g})),r.d(e,"o",(function(){return b})),r.d(e,"p",(function(){return _})),r.d(e,"E",(function(){return y})),r.d(e,"y",(function(){return v})),r.d(e,"D",(function(){return w})),r.d(e,"f",(function(){return O})),r.d(e,"g",(function(){return j})),r.d(e,"h",(function(){return V})),r.d(e,"i",(function(){return k})),r.d(e,"B",(function(){return S})),r.d(e,"z",(function(){return x})),r.d(e,"A",(function(){return C})),r.d(e,"q",(function(){return T})),r.d(e,"s",(function(){return P})),r.d(e,"r",(function(){return $})),r.d(e,"e",(function(){return R})),r.d(e,"x",(function(){return B})),r.d(e,"G",(function(){return L})),r.d(e,"l",(function(){return I})),r.d(e,"b",(function(){return z})),r("99af");var a=r("6b6c");function n(t){return Object(a.a)({url:"product/product/type_header",method:"get",params:t})}function o(t){return Object(a.a)({url:"product/product",method:"get",params:t})}function c(){return Object(a.a)({url:"product/cache",method:"get"})}function u(){return Object(a.a)({url:"product/cache",method:"delete"})}function i(t,e){return Object(a.a)({url:"product/product/set_show/".concat(t,"/").concat(e),method:"put"})}function d(t){return Object(a.a)({url:"product/product/product_show",method:"put",data:t})}function l(t){return Object(a.a)({url:"product/reply/save_fictitious_reply",method:"post",data:t})}function s(t){return Object(a.a)({url:"product/product/product_unshow",method:"put",data:t})}function m(t){return Object(a.a)({url:"product/category/tree/".concat(t),method:"get"})}function p(t){return Object(a.a)({url:"product/category/cascader/".concat(t),method:"get"})}function f(t){return Object(a.a)({url:"product/product/".concat(t),method:"get"})}function h(t){return Object(a.a)({url:"product/product/".concat(t.id),method:"POST",data:t})}function g(t){return Object(a.a)({url:"product/category",method:"get",params:t})}function b(){return Object(a.a)({url:"product/category/create",method:"get"})}function _(t){return Object(a.a)({url:"product/category/".concat(t),method:"get"})}function y(t){return Object(a.a)({url:"product/category/set_show/".concat(t.id,"/").concat(t.is_show),method:"PUT"})}function v(t){return Object(a.a)({url:"product/reply",method:"get",params:t})}function w(t,e){return Object(a.a)({url:"product/reply/set_reply/".concat(e),method:"PUT",data:t})}function O(){return Object(a.a)({url:"product/copy_config",method:"get"})}function j(t){return Object(a.a)({url:"product/copy",method:"POST",data:t})}function V(t){return Object(a.a)({url:"product/crawl/save",method:"POST",data:t})}function k(t,e,r){return Object(a.a)({url:"product/generate_attr/".concat(e,"/").concat(r),method:"POST",data:t})}function S(t){return Object(a.a)({url:"product/product/rule",method:"GET",params:t})}function x(t,e){return Object(a.a)({url:"product/product/rule/".concat(e),method:"POST",data:t})}function C(t){return Object(a.a)({url:"product/product/rule/".concat(t),method:"get"})}function T(){return Object(a.a)({url:"product/product/get_rule",method:"get"})}function P(){return Object(a.a)({url:"product/product/get_template",method:"get"})}function $(t){return Object(a.a)({url:"product/product/get_temp_keys",method:"get",params:t})}function R(t){return Object(a.a)({url:"product/product/check_activity/".concat(t),method:"get"})}function B(){return Object(a.a)({url:"user/user_tree_label",method:"get"})}function L(){return Object(a.a)({url:"file/upload_type",method:"get"})}function I(t){return Object(a.a)({url:"product/product/import_card",method:"get",params:t})}function z(t){return Object(a.a)({url:"product/batch/setting",method:"POST",data:t})}}}]); |