启程易购后端代码
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.
 
 
 
 
 
 
qicheng_shop_backend/public/system/js/chunk-7f566a71.a798f95a.js

1 lines
4.1 KiB

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-7f566a71"],{cb21:function(e,t,a){"use strict";a.r(t);var i=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"divBox"},[a("div",[a("el-form",{attrs:{inline:"",size:"small"}},[a("el-form-item",{attrs:{label:"商品分类:"}},[a("el-cascader",{staticClass:"dialogWidth",attrs:{options:e.merCateList,props:e.props,clearable:""},on:{change:function(t){return e.getList(1)}},model:{value:e.tableFrom.cate_id,callback:function(t){e.$set(e.tableFrom,"cate_id",t)},expression:"tableFrom.cate_id"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"商品搜索:"}},[a("el-input",{staticClass:"dialogWidth",attrs:{placeholder:"请输入商品名称,关键字,产品编号",clearable:""},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.getList(1)}},model:{value:e.tableFrom.store_name,callback:function(t){e.$set(e.tableFrom,"store_name",t)},expression:"tableFrom.store_name"}})],1),e._v(" "),a("el-form-item",[a("el-button",{attrs:{type:"primary",size:"small"},on:{click:function(t){return e.getList(1)}}},[e._v("查询")])],1)],1)],1),e._v(" "),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.listLoading,expression:"listLoading"}],attrs:{data:e.tableData.data,size:"small"}},[a("el-table-column",{attrs:{width:"55"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-radio",{attrs:{label:t.row.product_id},nativeOn:{change:function(a){return e.getTemplateRow(t.row)}},model:{value:e.templateRadio,callback:function(t){e.templateRadio=t},expression:"templateRadio"}},[e._v(" ")])]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"product_id",label:"ID","min-width":"50"}}),e._v(" "),a("el-table-column",{attrs:{label:"商品图","min-width":"80"},scopedSlots:e._u([{key:"default",fn:function(e){return[a("div",{staticClass:"demo-image__preview"},[a("el-image",{staticStyle:{width:"36px",height:"36px"},attrs:{src:e.row.image,"preview-src-list":[e.row.image]}})],1)]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"store_name",label:"商品名称","min-width":"200"}})],1),e._v(" "),a("div",{staticClass:"block mb20"},[a("el-pagination",{attrs:{"page-size":e.tableFrom.limit,"current-page":e.tableFrom.page,layout:"prev, pager, next, jumper",total:e.tableData.total},on:{"size-change":e.handleSizeChange,"current-change":e.pageChange}})],1)],1)},l=[],n=(a("c5f6"),a("ac6a"),a("c4c8")),o=a("83d6"),r={name:"GoodList",data:function(){return{props:{emitPath:!1},templateRadio:0,merCateList:[],merSelect:[],roterPre:o["roterPre"],listLoading:!0,tableData:{data:[],total:0},tableFrom:{page:1,limit:8,cate_id:""},multipleSelection:{},checked:[]}},mounted:function(){this.getList(""),this.getCategorySelect(),form_create_helper.onOk(this.unloadHandler)},methods:{unloadHandler:function(){this.multipleSelection?this.$route.query.field&&this.multipleSelection.src&&this.multipleSelection.id&&form_create_helper.set(this.$route.query.field,this.multipleSelection):this.$message.warning("请先选择商品")},getTemplateRow:function(e){this.multipleSelection={src:e.image,id:e.product_id}},getCategorySelect:function(){var e=this;Object(n["w"])().then((function(t){e.merCateList=t.data})).catch((function(t){e.$message.error(t.message)}))},getList:function(e){var t=this;this.listLoading=!0,this.tableFrom.page=e||this.tableFrom.page,Object(n["B"])(this.tableFrom).then((function(e){t.tableData.data=e.data.list,t.tableData.total=e.data.count,t.checked=window.form_create_helper.get(t.$route.query.field)||[],t.tableData.data.forEach((function(e){t.checked.forEach((function(a){Number(e.product_id)===Number(a.id)&&t.$nextTick((function(){t.$refs.multipleTable.toggleRowSelection(e,!0)}))}))})),t.listLoading=!1})).catch((function(e){t.listLoading=!1,t.$message.error(e.message)}))},pageChange:function(e){this.tableFrom.page=e,this.getList("")},handleSizeChange:function(e){this.tableFrom.limit=e,this.getList("")}}},s=r,c=(a("cdc7"),a("2877")),d=Object(c["a"])(s,i,l,!1,null,"ac2deea2",null);t["default"]=d.exports},cdc7:function(e,t,a){"use strict";a("f44a")},f44a:function(e,t,a){}}]);