|
@@ -1,31 +1,41 @@
|
|
|
<template>
|
|
|
<div id="goods">
|
|
|
<span v-show="view === 'list'">
|
|
|
- <search-1
|
|
|
- :form="searchInfo"
|
|
|
- @onSubmit="search"
|
|
|
- @querySearch="querySearch"
|
|
|
- @toReset="toClose"
|
|
|
- @changeTags="changeTags"
|
|
|
- :shopList="shopList"
|
|
|
- :tagsList="tagsList"
|
|
|
- >
|
|
|
- </search-1>
|
|
|
- <data-btn :fields="btnList" @add="toAdd"></data-btn>
|
|
|
- <data-table
|
|
|
- ref="dataTable"
|
|
|
- :fields="fields"
|
|
|
- :opera="opera"
|
|
|
- :data="list"
|
|
|
- :total="total"
|
|
|
- @query="search"
|
|
|
- @edit="toEdit"
|
|
|
- @puton="toPuton"
|
|
|
- @delete="toDelete"
|
|
|
- @spec="toSpec"
|
|
|
- @copy="toCopy"
|
|
|
- ></data-table>
|
|
|
+ <el-row>
|
|
|
+ <el-col
|
|
|
+ :span="24"
|
|
|
+ class="main animate__animated animate__backInRight"
|
|
|
+ v-loading="loadings"
|
|
|
+ element-loading-text="拼命加载中"
|
|
|
+ element-loading-spinner="el-icon-loading"
|
|
|
+ >
|
|
|
+ <search-1
|
|
|
+ :form="searchInfo"
|
|
|
+ @onSubmit="search"
|
|
|
+ @querySearch="querySearch"
|
|
|
+ @toReset="toClose"
|
|
|
+ @changeTags="changeTags"
|
|
|
+ :shopList="shopList"
|
|
|
+ :tagsList="tagsList"
|
|
|
+ >
|
|
|
+ </search-1>
|
|
|
+ <data-btn :fields="btnList" @add="toAdd"></data-btn>
|
|
|
+ <data-table
|
|
|
+ ref="dataTable"
|
|
|
+ :fields="fields"
|
|
|
+ :opera="opera"
|
|
|
+ :data="list"
|
|
|
+ :total="total"
|
|
|
+ @query="search"
|
|
|
+ @edit="toEdit"
|
|
|
+ @puton="toPuton"
|
|
|
+ @delete="toDelete"
|
|
|
+ @spec="toSpec"
|
|
|
+ @copy="toCopy"
|
|
|
+ ></data-table> </el-col
|
|
|
+ ></el-row>
|
|
|
</span>
|
|
|
+
|
|
|
<el-row v-if="view === 'info'">
|
|
|
<el-col :span="24" style="margin: 0 0 10px 0">
|
|
|
<el-col :span="2"><el-button type="primary" size="mini" @click="toBack()">返回</el-button></el-col>
|
|
@@ -107,14 +117,15 @@ export default {
|
|
|
components: { editor: () => import('@/components/editor.vue'), search1: () => import('./parts/search-1.vue') },
|
|
|
data: function () {
|
|
|
return {
|
|
|
+ loadings: true,
|
|
|
view: 'list',
|
|
|
fields: [
|
|
|
- { label: '排序', model: 'sort' },
|
|
|
{ label: '商品名称', model: 'name', showTip: false },
|
|
|
{ label: '店铺名称', model: 'shop.name' },
|
|
|
{ label: '商品分类', model: 'tags', format: (i) => this.getTags(i), showTip: false },
|
|
|
{ label: '活动标签', model: 'act_tags', format: (i) => this.getAct_tags(i) },
|
|
|
{ label: '商品状态', model: 'status', format: (i) => this.getStatus(i) },
|
|
|
+ { label: '排序', model: 'sort' },
|
|
|
],
|
|
|
opera: [
|
|
|
{ label: '修改', method: 'edit' },
|
|
@@ -190,6 +201,7 @@ export default {
|
|
|
this.$set(this, `list`, res.data);
|
|
|
this.$set(this, `total`, res.total);
|
|
|
}
|
|
|
+ this.loadings = false;
|
|
|
},
|
|
|
// 去编辑
|
|
|
async toEdit({ data }) {
|
|
@@ -266,7 +278,6 @@ export default {
|
|
|
},
|
|
|
// 查询其他信息
|
|
|
async searchOthers() {
|
|
|
-
|
|
|
let res = await this.tree();
|
|
|
if (this.$checkRes(res)) this.$set(this, `tagsList`, res.data);
|
|
|
// 商品状态
|