Prechádzať zdrojové kódy

Merge branch 'pengyouhao_dev' of https://gogs.zfire.top/zfire-front/zfire-newmall-admin into linwenxin_dev

linwenxin 1 rok pred
rodič
commit
497af55e79

+ 28 - 0
src/api/secondHandMallHome.js

@@ -0,0 +1,28 @@
+import request, { postBlob, getBlob, handleImport } from '@/utils/request'
+
+// 获取概况
+export function getInfo(params) {
+  return request({
+    url: '/es/count/info',
+    method: 'get',
+    params
+  })
+}
+
+// 交易概述
+export function getOrder(params) {
+  return request({
+    url: '/es/count/order',
+    method: 'get',
+    params
+  })
+}
+
+// 商品销量排行
+export function getGoodsRank(params) {
+  return request({
+    url: '/es/count/goods/rank',
+    method: 'get',
+    params
+  })
+}

+ 7 - 5
src/layout/components/Navbar.vue

@@ -64,7 +64,7 @@
             <el-radio-group size="small" v-model="messageType" @change="getList">
               <el-badge :is-dot="isDot1" class="item">
                 <el-radio-button
-                  :label="['WBI', 'WBK', 'CRE_ORDER', 'SEND_MALL', 'RP_MALL', 'CR_SALES', 'ENGIN_PAY_ORDER']">系统消息</el-radio-button>
+                  :label="['WBI', 'WBK', 'CRE_ORDER', 'SEND_MALL', 'RP_MALL', 'CR_SALES', 'ENGIN_PAY_ORDER','CR_ES_SALES']">系统消息</el-radio-button>
               </el-badge>
               <el-badge :is-dot="isDot2" class="item">
                 <el-radio-button :label="['NOTICE']">平台公告</el-radio-button>
@@ -218,7 +218,7 @@ export default {
       isShow: false,
       isOpen: true,
       checked: false,
-      messageType: ['WBI', 'WBK', 'CRE_ORDER', 'SEND_MALL', 'RP_MALL', 'CR_SALES', 'ENGIN_PAY_ORDER'],
+      messageType: ['WBI', 'WBK', 'CRE_ORDER', 'SEND_MALL', 'RP_MALL', 'CR_SALES', 'ENGIN_PAY_ORDER','CR_ES_SALES'],
       messageData: [],
       dateType: '',
       readFlag: '',
@@ -273,7 +273,8 @@ export default {
           SEND_MALL: '商城订单发货',
           RP_MALL: '商城订单维权',
           CR_SALES: '订单支付成功',
-		  ENGIN_PAY_ORDER: '工程收款单'
+		  ENGIN_PAY_ORDER: '工程收款单',
+		  CR_ES_SALES: '二手商品订单'
         }
         return MAP[val]
       }
@@ -288,7 +289,8 @@ export default {
           SEND_MALL: 'order_detail',
           RP_MALL: 'order_refund_detail',
           CR_SALES: (paidType == 'M' ? 'auxiliarySalesOrder' : paidType == 'P' ? 'attachmentSalesOrder' : paidType == 'YB' ? 'orderSettleManag' : paidType == 'MALL' ? 'order_detail' : ''),
-		  ENGIN_PAY_ORDER: 'projectCollectionManagement'
+		  ENGIN_PAY_ORDER: 'projectCollectionManagement',
+		  CR_ES_SALES: 'orderManagement'
         }
         return MAP[val]
       }
@@ -376,7 +378,7 @@ export default {
               message: that.$createElement(
                 'div',
                 {
-                  style: 'cursor: pointer;',
+                  style: 'cursor: pointer;text-align: left;',
                   on: {
                     click: that.toDetail.bind(
                       that,

+ 289 - 0
src/views/mallManagement/secondHandMall/classifiedManagement/index.vue

@@ -0,0 +1,289 @@
+<template>
+	<zj-tab-page ref="tabPage" :defaultActives="[{ key: 'list', label: $route.meta.title+'-列表', essential: true }]">
+		<template slot-scope="{activeKey, data}">
+			<div v-if="activeKey == 'list'" class="app-container">
+				<div class="btn-group clearfix">
+				  <div class="fl">
+				    <el-button v-if="$restrict('add')" size="small" type="primary" icon="el-icon-plus" @click="addOrEditParent('add1')">添加分类</el-button>
+				  </div>
+				  <div class="fr">
+				    <el-input placeholder="请输入分类名称进行搜索" v-model="screenForm.keyword" size="small" style="width: 240px;" clearable>
+				      <el-button slot="append" icon="el-icon-search" size="small" @click="getListByScreen"></el-button>
+				    </el-input>
+				  </div>
+				</div>
+				
+				<div class="table">
+				  <el-table :data="dataList" row-key="categoryId" border default-expand-all :tree-props="{children: 'children'}">
+					  <el-table-column align="center" prop="companyName" label="所属商户" min-width="120"></el-table-column>
+				    <el-table-column prop="name" label="分类名称" min-width="150"></el-table-column>
+				    <el-table-column align="center" label="分类图片" prop="imgUrl" width="80">
+				      <template slot-scope="scope">
+				        <el-image style="width: 40px; height: 40px; display: block; margin: 0 auto;" :src="scope.row.imgUrl" :preview-src-list="[scope.row.imgUrl]" fit="cover">
+				          <div slot="error" style="height: 100%;font-size: 40px;">
+				            <i class="el-icon-picture-outline"></i>
+				          </div>
+				        </el-image>
+				      </template>
+				    </el-table-column>
+					<el-table-column align="center" label="状态" class-name="status-col">
+					  <template slot-scope="scope">
+					    <el-tag :type="scope.row.status ? 'success':'danger'">{{ scope.row.status ? '启用':'禁用' }}</el-tag>
+					  </template>
+					</el-table-column>
+				    <el-table-column align="center" prop="sortNum" label="排序"></el-table-column>
+					<el-table-column align="center" prop="createBy" label="创建人"></el-table-column>
+					<el-table-column align="center" prop="createTime" label="创建时间"></el-table-column>
+					<el-table-column align="center" prop="updateBy" label="修改人"></el-table-column>
+					<el-table-column align="center" prop="updateTime" label="修改时间"></el-table-column>
+				    <el-table-column align="right" label="操作" width="150" fixed="right">
+				      <template slot-scope="scope">
+				        <el-button type="primary" size="mini" icon="el-icon-edit" v-if="scope.row.level == 1 && $restrict('edit')" @click="addOrEditParent('edit1', scope.row.categoryId)"></el-button>
+				        <el-popconfirm v-if="$restrict('del')" style="margin-left: 10px;" title="确定删除吗?" @confirm="handleDelete(scope.row.categoryId)" >
+				          <el-button slot="reference" size="mini" icon="el-icon-delete"></el-button>
+				        </el-popconfirm>
+				      </template>
+				    </el-table-column>
+				  </el-table>
+				</div>
+			</div>
+			<!-- 新增编辑 一级分类 -->
+			<div v-if="addParentFormVisible" class="app-container">
+				<el-form ref="addParentForm" :model="addParentForm" :rules="addParentFormRules" label-position="left" label-width="100px">
+					<el-row :gutter="20">
+						<el-col :span="6">
+							<el-form-item label="分类名称" prop="oneClassify">
+							  <el-input type="text" placeholder="请输入分类名称" v-model="addParentForm.oneClassify" maxlength="10" show-word-limit style="width: 250px;"></el-input>
+							</el-form-item>
+						</el-col>
+						<el-col :span="6">
+							<el-form-item label="状态" prop="status" class="is-required">
+							  <el-radio-group v-model="addParentForm.status">
+							    <el-radio :label="true">启用</el-radio>
+							    <el-radio :label="false">禁用</el-radio>
+							  </el-radio-group>
+							</el-form-item>
+						</el-col>
+						<el-col :span="6">
+							<el-form-item label="排序" prop="sort">
+							  <el-input placeholder="请输入排序" v-model.number="addParentForm.sort" style="width: 250px;"></el-input>
+							</el-form-item>
+						</el-col>
+						<el-col :span="24">
+							<el-form-item label="分类图片" prop="imgUrl">
+<!-- 							  <el-upload
+							    class="avatar-uploader"
+							    style="height:122px"
+							    :action="baseURL + 'common/upload'"
+							    :headers="myHeaders"
+							    :show-file-list="false"
+							    :on-success="uploadSuccess"
+							    :before-upload="beforeUpload">
+							    <img v-if="addParentForm.imgUrl" :src="addParentForm.imgUrl" class="avatar">
+							    <i v-else class="el-icon-plus avatar-uploader-icon"></i>
+							  </el-upload> -->
+								<ImageUpload :fileList="addParentForm.imgUrl" :limit="1" :isEdit="true" />
+							</el-form-item>
+						</el-col>
+					</el-row>
+				</el-form>
+				<div slot="footer" class="dialog-footer">
+				  <el-button @click="data.removeTab()">取 消</el-button>
+				  <el-button type="primary" @click="submitAddParentForm(data.removeTab)">确 定</el-button>
+				</div>
+			</div>
+		</template>
+	</zj-tab-page>
+</template>
+
+<script>
+import { getToken } from '@/utils/auth'
+import { getClassifyList, addClassify, editClassify, deleteClassify, getClassifyDetail } from '@/api/goods'
+import { ORDER_MAIN_TYPE } from "@/utils/select_data";
+import { getMainList } from "@/api/workOrder/settlementStandardInstall";
+	import ImageUpload from '@/components/file-upload'
+
+export default {
+	components: {
+		ImageUpload
+	},
+  data() {
+    return {
+      baseURL: process.env.VUE_APP_BASE_API,
+      myHeaders: {'x-token': getToken()},
+
+      dataList: [], // 列表数据
+      listLoading: true, // 列表加载loading
+      screenForm: { // 筛选表单数据
+        keyword: '', // 关键词
+      },
+
+      editParentId:  null,
+      addParentFormType: 'add1',
+      addParentFormVisible: false,
+      addParentForm: {
+        oneClassify: '',
+        twoClassify: '',
+        imgUrl: [],
+        status: true,
+        sort: 0,
+      },
+      addParentFormRules: {
+        oneClassify: [
+          { required: true, message: '请填写分类名称', trigger: 'blur' },
+        ],
+        imgUrl: [
+          { required: true, message: '请上传分类图片', trigger: 'change' }
+        ]
+      },
+
+      classifyList: [],
+		formType: 'add',
+		formVisible: false,
+    }
+  },
+  created() {
+    this.getList();
+  },
+  methods: {
+
+    getList() {
+      this.listLoading = true;
+
+      let params = {
+        name: this.screenForm.keyword,
+		type: 5
+      };
+
+      getClassifyList(params).then(res => {
+        this.dataList = res.data;
+      })
+    },
+
+    // 筛选后重新获取列表
+    getListByScreen() {
+      this.currentPage = 1;
+      this.getList();
+    },
+
+    // 打开 新增编辑 一级分类
+    addOrEditParent(type, cid) {
+		this.$refs.tabPage.addTab({
+			// 对应显示的模块
+			activeKey: type,
+			// 唯一标识
+			key: type,
+			// 页签名称
+			label: ({ edit1: "编辑分类", add1: "添加分类" })[type],
+			// 打开时事件
+			triggerEvent: () => {
+				
+				this.$nextTick(()=>{
+					this.formType = type
+					this.formVisible = true
+					this.addParentFormType = type;
+					this.addParentFormVisible = true;
+					if(type == 'edit1'){
+						this.editParentId = cid;
+						getClassifyDetail({categoryId: cid}).then(res => {
+						  this.addParentForm = {
+						    oneClassify: res.data.name,
+						    status: res.data.status,
+						    imgUrl: [{url: res.data.imgUrl}],
+						    sort: res.data.sortNum
+						  }
+						})
+					}
+				})
+			},
+			// 关闭时事件
+			closeEvent: () => {
+				this.cancelAddParentForm()
+			}
+		})
+    },
+
+    // 取消 新增编辑 一级分类
+    cancelAddParentForm(){
+      this.addParentFormVisible = false;
+      this.$refs?.addParentForm?.resetFields();
+    },
+
+    // 提交 一级分类
+    submitAddParentForm(cancel) {
+      this.$refs.addParentForm.validate((valid) => {
+        if (valid) {
+          let params = {
+			type: 5,
+            name: this.addParentForm.oneClassify,
+            imgUrl: this.addParentForm.imgUrl[0].url,
+            status: this.addParentForm.status,
+            sortNum: this.addParentForm.sort,
+          }
+          if(this.addParentFormType == 'edit1') {
+            params.categoryId = this.editParentId;
+            editClassify(params).then(res => {
+				cancel('list')
+              this.cancelAddParentForm();
+              this.getList();
+              this.$successMsg('编辑成功');
+            })
+          }else {
+            addClassify(params).then(res => {
+				cancel('list')
+              this.cancelAddParentForm();
+              this.getList();
+              this.$successMsg('添加成功');
+            })
+          }
+        }
+      })
+    },
+
+    // 操作 - 删除
+    handleDelete(id) {
+      deleteClassify({categoryId: id}).then(res => {
+        this.getList();
+        this.$successMsg();
+      })
+    },
+
+    uploadSuccess(res, file, index) {
+      if (this.addParentFormVisible) {
+        this.addParentForm.imgUrl = res.data.url
+      } else {
+        this.addChildForm.imgUrl = res.data.url
+      }
+    },
+
+    beforeUpload(file) {
+      const fileSuffix = file.name.substring(file.name.lastIndexOf(".") + 1);
+      const whiteList = ['jpg', 'jpeg', 'png', 'gif'];
+      if (whiteList.indexOf(fileSuffix) === -1) {
+        this.$errorMsg('只支持上传jpg/jpeg/png/gif文件!');
+        return false;
+      }
+    },
+
+  }
+
+}
+
+</script>
+
+<style scoped lang="scss">
+</style>
+
+<style lang="scss">
+  .el-image-viewer__wrapper .el-icon-circle-close {
+    color: #ffffff !important;
+    font-size: 60px;
+  }
+  .el-table__row.expanded {
+    background: #f5f5f5;
+  }
+
+  th:first-child, th:last-child {
+    text-align: center !important;
+  }
+</style>

+ 547 - 0
src/views/mallManagement/secondHandMall/home/index.vue

@@ -0,0 +1,547 @@
+<template>
+  <div class="dashboard-container">
+
+    <el-row :gutter="10" class="top-container">
+      <el-col :xs="24" :sm="12" :lg="12">
+        <div class="today">今日</div>
+        <div class="today-content">{{ dateFormat }},欢迎登入分销商城后台管理操作系统,累计售出{{ statisticsData.total }}件商品,继续加油</div>
+      </el-col>
+      <el-col :xs="24" :sm="12" :lg="12">
+        <el-row :gutter="20" type="flex" class="right-row" justify="end">
+          <el-col :span="4">
+            <svg-icon icon-class="product1" class-name="icon"/>
+          </el-col>
+          <el-col :span="4">
+            <div class="num">{{ statisticsData.sold }}</div>
+            <div class="name">已售中商品</div>
+          </el-col>
+          <el-col :span="4">
+            <svg-icon icon-class="fahuo1" class-name="icon"/>
+          </el-col>
+          <el-col :span="4">
+            <div class="num">{{ statisticsData.dfh }}</div>
+            <div class="name">待发货订单</div>
+          </el-col>
+          <el-col :span="4">
+            <svg-icon icon-class="refund-order1" class-name="icon"/>
+          </el-col>
+          <el-col :span="4">
+            <div class="num">{{ statisticsData.refund }}</div>
+            <div class="name">维权中订单</div>
+          </el-col>
+          <!-- <el-col :span="3">
+            <svg-icon icon-class="settlement" class-name="icon"/>
+          </el-col>
+          <el-col :span="3">
+            <div class="num">¥{{ statisticsData.orderShareAmount }}</div>
+            <div class="name">待结算金额</div>
+          </el-col> -->
+        </el-row>
+      </el-col>
+    </el-row>
+    
+    <el-row :gutter="20" class="middle-container">
+      <el-col :xs="24" :sm="7" :lg="7">
+        <div class="item">
+          <div class="title">登入用户数</div>
+          <el-row>
+            <el-col :span="5">
+              <svg-icon icon-class="history-user" class-name="icon"/>
+            </el-col>
+            <el-col :span="19" class="right-data">
+              <div class="data">
+                <span>今日访客</span><span style="color: #f4cc4e;">{{ statisticsData.todayVisit }}</span>
+              </div>
+              <div class="progress">
+                <el-progress :percentage="personCountCompute" :show-text="false" :color="'#f4cc4e'"></el-progress>
+              </div>
+              <div class="data">
+                <span>昨天访客</span><span>{{ statisticsData.yestodayVisit }}</span>
+              </div>
+            </el-col>
+          </el-row>
+        </div>
+      </el-col>
+      <el-col :xs="24" :sm="7" :lg="7">
+        <div class="item">
+          <div class="title">订单数</div>
+          <el-row>
+            <el-col :span="5">
+              <svg-icon icon-class="order" class-name="icon"/>
+            </el-col>
+            <el-col :span="19" class="right-data">
+              <div class="data">
+                <span>今日订单</span><span style="color: #e6808f;">{{ statisticsData.todayOrder }}</span>
+              </div>
+              <div class="progress">
+                <el-progress :percentage="orderCountCompute" :show-text="false" :color="'#e6808f'"></el-progress>
+              </div>
+              <div class="data">
+                <span>昨天订单</span><span>{{ statisticsData.yestodayOrder }}</span>
+              </div>
+            </el-col>
+          </el-row>
+        </div>
+      </el-col>
+      <el-col :xs="20" :sm="7" :lg="7">
+        <div class="item">
+          <div class="title">预估收益</div>
+          <el-row>
+            <el-col :span="5">
+              <svg-icon icon-class="profit1" class-name="icon"/>
+            </el-col>
+            <el-col :span="19" class="right-data">
+              <div class="data">
+                <span>今日收益</span><span style="color: #5f71cf;">{{ statisticsData.todayProfit }}</span>
+              </div>
+              <div class="progress">
+                <el-progress :percentage="profitCompute" :show-text="false" color="'#5f71cf'"></el-progress>
+              </div>
+              <div class="data">
+                <span>昨天收益</span><span>{{ statisticsData.yestodayProfit }}</span>
+              </div>
+            </el-col>
+          </el-row>
+        </div>
+      </el-col>
+      <el-col :xs="4" :sm="3" :lg="3">
+        <div class="item last-item">
+          <div class="title">下单转化率</div>
+          <div class="content">
+            <div class="num">{{ statisticsData.orderTax }}%</div>
+            <div class="text">今日转化率</div>
+          </div>
+          
+        </div>
+      </el-col>
+    </el-row>
+
+    <el-row :gutter="20" class="bottom-container">
+      <el-col :xs="24" :sm="14" :lg="14">
+        <div class="content">
+          <div class="tabs-container clearfix">
+           <!-- <div class="fl">
+              <el-radio-group v-model="screenForm.workOrderType" size="small" @change="changeEchartsDateValue">
+                <el-radio-button label="">全部</el-radio-button>
+                <el-radio-button label="INSTALL">产品</el-radio-button>
+                <el-radio-button label="REPAIR">服务</el-radio-button>
+              </el-radio-group>
+            </div> -->
+            <div class="fr">
+              <el-radio-group v-model="screenForm.echartsFlag" size="small" @change="changeEchartsDateValue">
+                <el-radio-button label="1">今日</el-radio-button>
+                <el-radio-button label="2">昨日</el-radio-button>
+                <el-radio-button label="3">最近7日</el-radio-button>
+                <el-radio-button label="4">本月</el-radio-button>
+              </el-radio-group>
+            </div>
+          </div>
+          <div style="padding: 20px;">
+            <el-row style="text-align: center;">
+              <el-col :span="8">
+                <div style="font-size: 20px;font-weight: bold;color: #f65c5c">{{ transaction.orderNum }}</div>
+                <div style="font-size: 12px;padding-top: 10px;">成交量(件)</div>
+              </el-col>
+              <el-col :span="8">
+                <div style="font-size: 20px;font-weight: bold;color: #f65c5c">{{ transaction.amount }}</div>
+                <div style="font-size: 12px;padding-top: 10px;">成交额(元)</div>
+              </el-col>
+              <el-col :span="8">
+                <div style="font-size: 20px;font-weight: bold;color: #f65c5c">{{ transaction.avgAmount }}</div>
+                <div style="font-size: 12px;padding-top: 10px;">人均消费(元)</div>
+              </el-col>
+            </el-row>
+          </div>
+          <div class="table" v-resize="DomResize">
+            <div ref="myChart" :style="{width: '100%', height: '300px'}"></div>
+          </div>
+        </div>
+      </el-col>
+      <el-col :xs="24" :sm="10" :lg="10">
+        <div class="content">
+          <div class="tabs-container clearfix">
+            <div class="fr">
+              <el-radio-group v-model="screenForm.goodsFlag" size="small" @change="changeTableDateValue">
+                <el-radio-button label="1">今日</el-radio-button>
+                <el-radio-button label="2">昨日</el-radio-button>
+                <el-radio-button label="3">最近7日</el-radio-button>
+                <el-radio-button label="4">本月</el-radio-button>
+              </el-radio-group>
+            </div>
+          </div>
+
+          <div class="table">
+            <el-table v-loading="listLoading" :data="dataList" element-loading-text="Loading" border fit highlight-current-row stripe size="mini" height="400">
+              <el-table-column align="center" label="订单号" prop="esOrderId" width="180">
+				  <template slot-scope="scope"> 
+				  	  <div style="color: #478af3;cursor: pointer;" @click="toOrder(scope.row.esOrderId)">{{scope.row.esOrderId}}</div>
+				  </template>
+			  </el-table-column>
+              <el-table-column align="center" label="商品名称" prop="esGoodsName"></el-table-column>
+              <el-table-column align="center" label="数量" prop="num"></el-table-column>
+              <el-table-column align="center" label="订单状态" prop="status">
+				  <template slot-scope="scope">
+					  {{filterStatus(scope.row.status)}}
+				  </template>
+			  </el-table-column>
+            </el-table>
+			<div class="pagination clearfix">
+				<div class="fr">
+					<el-pagination
+						@current-change="handleCurrentChange"
+						:current-page="pageNum"
+						layout="total, prev, pager, next, jumper"
+						:total="listTotal"
+					></el-pagination>
+				</div>
+			</div>
+          </div>
+        </div>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+import { mapGetters } from 'vuex'
+import { getInfo, getOrder, getGoodsRank  } from '@/api/secondHandMallHome'
+import { dateFormat } from '@/utils/util'
+
+export default {
+  name: 'Dashboard',
+  data() {
+    return {
+      statisticsData: {
+        total: 0,
+        sold: 0,
+        dfh: 0,
+        refund: 0,
+        orderShareAmount: 0,
+        todayVisit: 0,
+        yestodayVisit: 0,
+        todayOrder: 0,
+        yestodayOrder: 0,
+        todayProfit: 0,
+        yestodayProfit: 0,
+        orderTax: 0
+      }, // 统计数据
+      dataList: [], // 列表数据
+      transaction: {
+        amount: 0, // 成交额
+        avgAmount: 0, // 人均消费
+        orderNum: 0, // 成交量
+        countAry: []
+      },
+      listLoading: true, // 列表加载loading
+      chartLoading: true, // 图表加载loading
+      screenForm: {
+        workOrderType: '',
+        echartsFlag : '1',
+        goodsFlag: '1'
+      },
+      existChart: null,
+	  pageNum: 1,
+	  listTotal: 0
+    }
+  },
+  directives: {
+    resize: { // 指令的名称
+      bind(el, binding) { // el为绑定的元素,binding为绑定给指令的对象
+        // console.log(el,"绑定",binding);
+        let width = '', height = '';
+        function isResize() {
+          const style = document.defaultView.getComputedStyle(el);
+          if (width !== style.width || height !== style.height) {
+            binding.value({width:style.width,height:style.height});  // 关键(这传入的是函数,所以执行此函数)
+          }
+          width = style.width;
+          height = style.height;
+        }
+        el.__vueSetInterval__ = setInterval(isResize, 300);
+      },
+      unbind(el) {
+        // console.log(el,"解绑");
+        clearInterval(el.__vueSetInterval__);
+      }
+    }
+  },
+  computed: {
+    ...mapGetters([
+      'name'
+    ]),
+    dateFormat() {
+      return dateFormat("YYYY-mm-dd WWW", new Date())
+    },
+    personCountCompute() {
+        if (this.statisticsData.todayVisit >= this.statisticsData.yestodayVisit) {
+          return 100
+        } else {
+          return this.statisticsData.todayVisit / this.statisticsData.yestodayVisit * 100
+        }
+    },
+    orderCountCompute() {
+      if (this.statisticsData.todayOrder >= this.statisticsData.yestodayOrder) {
+        return 100
+      } else {
+        return this.statisticsData.todayOrder / this.statisticsData.yestodayOrder * 100
+      }
+    },
+    profitCompute() {
+      if (this.statisticsData.todayProfit >= this.statisticsData.yestodayProfit) {
+        return 100
+      } else {
+        return this.statisticsData.todayProfit / this.statisticsData.yestodayProfit * 100
+      }
+    },
+	filterStatus(){
+		return function(status){
+			let obj = {
+				SAVE: '买家下单',
+				WAIT: '待确认',
+				PAID: '待发货',
+				SEND: '卖家发货',
+				OVER: '交易完成',
+				TIME_OUT: '超时',
+				CANCEL: '取消',
+				WAIT_REFUND: '售后中',
+				REFUND: '已退'
+			}
+			return obj[status]
+		}
+	}
+  },
+  created() {
+    this.getStatisticsData();
+  },
+  methods: {
+    // 获取统计数据
+    getStatisticsData() {
+      getInfo().then(res => {
+        this.statisticsData = res.data
+      })
+      this.getOrder()
+      this.getGoodsRank()
+    },
+    getOrder() {
+      getOrder({
+        flag: this.screenForm.echartsFlag, 
+        // workOrderType: this.screenForm.workOrderType
+      }).then(res => {
+        this.transaction = res.data
+        this.drawLine()
+      })
+    },
+    getGoodsRank() {
+      this.listLoading = true
+      getGoodsRank({ flag: this.screenForm.goodsFlag,pageNum: this.pageNum,pageSize: 10 }).then(res => {
+        this.dataList = res.data.records
+		this.listTotal = res.data.total
+        this.listLoading = false
+      })
+    },
+	handleCurrentChange(val) {
+		this.pageNum = val;
+		this.getGoodsRank();
+	},
+    // 切换tabs
+    changeEchartsDateValue() {
+      this.getOrder()
+    },
+    changeTableDateValue() {
+      this.getGoodsRank()
+    },
+    DomResize(data){
+      let {width,height} = data;
+      // console.log("width:",width,"height:",height,"   dom尺寸方式改变");
+      if(this.existChart){
+        this.existChart.resize()
+      }
+    },
+    drawLine(){
+      // 基于准备好的dom,初始化echarts实例
+      if (this.existChart) {
+        this.existChart.dispose()
+      }
+      this.existChart = this.$echarts.init(this.$refs.myChart)
+      // 绘制图表
+      this.existChart.setOption({
+        color: ['#80FFA5'],
+        tooltip: {
+          trigger: 'axis',
+          axisPointer: {
+            type: 'cross',
+            label: {
+              backgroundColor: '#6a7985'
+            }
+          }
+        },
+        grid: {
+          left: '3%',
+          right: '7%',
+          bottom: '3%',
+          containLabel: true
+        },
+        xAxis: [
+          {
+            type: 'category',
+            boundaryGap: false,
+            data: this.screenForm.echartsFlag === '1' || this.screenForm.echartsFlag === '2' ? ['0', '1', '2', '3', '4', '5', '6','7', '8', '9', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19','20', '21', '22', '23'] : this.transaction.x
+          }
+        ],
+        yAxis: [
+          {
+            type: 'value'
+          }
+        ],
+        series: [
+          {
+            name: '数量',
+            type: 'line',
+            stack: '数量',
+            smooth: true,
+            lineStyle: {
+              width: 0
+            },
+            showSymbol: false,
+            areaStyle: {
+              opacity: 0.8,
+              color: new this.$echarts.graphic.LinearGradient(0, 0, 0, 1, [{
+                offset: 0,
+                color: 'rgba(128, 255, 165)'
+              }, {
+                offset: 1,
+                color: 'rgba(1, 191, 236)'
+              }])
+            },
+            emphasis: {
+              focus: 'series'
+            },
+            data: this.transaction.countAry
+          }
+        ]
+      });
+    },
+	toOrder(orderId){
+		this.$router.push({
+		  name: 'orderManagement',
+		  params: {
+		    pageName: orderId,
+		    pageType: 'detail',
+		    pageCode: orderId
+		  },
+		  query: {
+		    id: orderId,
+		    orderId: orderId
+		  }
+		})
+	}
+  }
+}
+</script>
+<style lang="scss" scoped>
+
+.dashboard {
+  &-container {
+    background: #f5f5f5;
+    padding: 30px;
+    min-height: calc(100vh - 86px);
+    .top-container {
+      .today {
+        font-weight: bold;
+        padding-bottom: 10px;
+      }
+      .today-content {
+        font-size: 14px;
+      }
+      .right-row {
+        .el-col {
+          height: 44px;
+          display: flex;
+          flex-direction: column;
+          align-items: center;
+          justify-content: center;
+          .icon {
+            height: 36px;
+            width: 36px;
+          }
+          .num {
+            font-size: 18px;
+            font-weight: bold;
+            text-align: center;
+          }
+          .name {
+            text-align: center;
+            font-size: 12px;
+            margin-top: 4px;
+          }
+        }
+      }
+    }
+    
+    .middle-container {
+      margin-top: 20px;
+      .item {
+        padding: 15px;
+        background: #ffffff;
+        height: 110px;
+        .title {
+          font-size: 14px;
+          color: #666;
+          margin-bottom: 5px;
+        }
+        .icon {
+          height: 50px;
+          width: 50px;
+          padding-top: 15px;
+        }
+        .right-data {
+          padding: 5px 0 0 10px;
+          .progress {
+            margin: 5px 0;
+          }
+          .data {
+            font-size: 14px;
+            display: flex;
+            justify-content: space-between;
+            align-items: center;
+          }
+        }
+      }
+      .last-item {
+        .content {
+          display: flex;
+          flex-direction: column;
+          align-items: center;
+          justify-content: center;
+          .num {
+            padding: 10px 0 5px 0;
+            font-size: 24px;
+            font-weight: bold;
+            color: #76b36b;
+          }
+          .text {
+            font-size: 12px;
+          }
+        }
+      }
+    }
+
+    .bottom-container {
+      margin-top: 15px;
+      .content {
+        height: 450px;
+        background: #ffffff;
+        .tabs-container {
+          padding: 10px 10px 0 10px;
+        }
+        .table {
+          margin-top: 10px;
+        }
+      }
+    }
+
+    
+    
+  }
+}
+</style>

+ 87 - 0
src/views/setting/agreement/index.vue

@@ -5,6 +5,7 @@
       <el-tab-pane label="隐私声明" name="second"></el-tab-pane>
       <el-tab-pane label="服务协议" name="third"></el-tab-pane>
       <el-tab-pane label="以旧换新协议" name="fourth"></el-tab-pane>
+			<el-tab-pane label="二手商城购买须知" name="fiveth"></el-tab-pane>
     </el-tabs>
 
     <el-form v-show="activeName=='first'" ref="mainForm" label-width="80px" label-position="top">
@@ -106,6 +107,31 @@
 		    </el-row>
 		  </el-form-item>
 		</el-form>
+		
+		<el-form v-show="activeName=='fiveth'" ref="mainForm" label-width="80px" label-position="top">
+		  <el-form-item label="" prop="content5">
+		    <el-upload
+		      ref="imageListUpload5"
+		      class="avatar-uploader5"
+		      :action="baseURL + 'common/upload'"
+		      :headers="myHeaders"
+		      multiple
+		      name="file"
+		      :show-file-list="false"
+		      :on-success="uploadSuccess5"
+		      :on-error="uploadError5"
+		      :before-upload="beforeUpload5">
+		    </el-upload>
+		    <!--富文本编辑器组件-->
+		    <el-row v-loading="quillImgLoading5">
+		      <quill-editor
+		        v-model="mainForm.content5"
+		        ref="myQuillEditor5"
+		        :options="editorOption5">
+		      </quill-editor>
+		    </el-row>
+		  </el-form-item>
+		</el-form>
 
     <div class="page-footer">
       <div class="footer" :class="classObj">
@@ -155,6 +181,7 @@ export default {
       mainForm: {
         content1: '',
         content2: '',
+				content5: ''
       },
 
       quillImgLoading1: false, // 富文本上传图片loading
@@ -240,6 +267,27 @@ export default {
         }
       },
       editorImages4: [],
+			
+			quillImgLoading5: false, // 富文本上传图片loading
+			editorOption5: { // 富文本配置
+			  placeholder: '请输入公共内容',
+			  theme: 'snow',
+			  modules: {
+			    toolbar: {
+			      container: toolbarOptions,
+			      handlers: {
+			        'image': function (value) {
+			          if (value) {
+			            document.querySelector('.avatar-uploader5 input').click()
+			          } else {
+			            this.quill.format('image', false);
+			          }
+			        }
+			      }
+			    }
+			  }
+			},
+			editorImages5: [],
 
       formLoading: false,
     }
@@ -269,6 +317,7 @@ export default {
           content2: res.data.privacyStatementContent,
 		      content3: res.data.serviceContent,
 		      content4: res.data.tradeContent,
+					content5: res.data.esShopBuyRemarkContent,
         }
       })
     },
@@ -281,6 +330,7 @@ export default {
         privacyStatementContent: this.mainForm.content2,
 		    serviceContent: this.mainForm.content3,
         tradeContent: this.mainForm.content4,
+				esShopBuyRemarkContent: this.mainForm.content5,
       }).then(res => {
         this.formLoading = false;
         this.$successMsg('编辑成功');
@@ -448,6 +498,43 @@ export default {
       this.quillImgLoading4 = false;
       this.$errorMsg('图片插入失败');
     },
+		
+		// ----------
+		// 富文本图片上传前
+		beforeUpload5() {
+		  this.quillImgLoading5 = true;
+		},
+		
+		// 富文本图片上传成功
+		uploadSuccess5(res, file, fileList) {
+		  fileList.forEach(item => {
+		    if(this.editorImages5.indexOf(item.response.data.url) < 0) {
+		      this.editorImages5.push(item.response.data.url);
+		    }
+		  })
+		  this.showImage5()
+		  this.quillImgLoading5 = false;
+		},
+		
+		showImage5() {
+		  let quill = this.$refs.myQuillEditor5.quill;
+		  this.editorImages5.forEach(item => {
+		    // 获取光标所在位置
+		    let length = quill.getSelection().index;
+		    quill.insertEmbed(length, 'image', item);
+		    // this.$refs.imageListUpload2.clearFiles()
+		    // 调整光标到最后
+		    quill.setSelection(length + 1);
+		  })
+		  this.editorImages5 = [];
+		  this.$refs.imageListUpload5.clearFiles();
+		},
+		
+		// 富文本图片上传失败
+		uploadError5() {
+		  this.quillImgLoading5 = false;
+		  this.$errorMsg('图片插入失败');
+		},
   }
 }
 </script>

+ 23 - 23
src/views/userManagement/masterManagement/index.vue

@@ -36,7 +36,7 @@
       </div>
       <div v-if="~['examine', 'detail'].indexOf(activeKey)" style="box-sizing: border-box;padding: 16px;">
         <zj-form-container ref="formRef" :form-data="formData" :styleSwitch="false">
-          <zj-form-module :title="data.label" label-width="110px" :showPackUp="false" :form-data="formData"
+          <zj-form-module :title="data.label" label-width="170px" :showPackUp="false" :form-data="formData"
             :form-items="[...formItems,...imageList]">
           </zj-form-module>
         </zj-form-container>
@@ -206,27 +206,27 @@ export default {
           rules: []
         }
       },
-			// {
-			// 	md: 6,
-			// 	isShow: true,
-			// 	name: 'slot-component',
-			// 	attributes: {},
-			// 	formItemAttributes: {
-			// 		label: '二手商城发布',
-			// 		prop: 'isEs',
-			// 		rules: [...required]
-			// 	},
-			// 	render: (h, { props, onInput }) => {
-			// 		var { value } = props
-			// 		return (
-			// 			<el-radio-group v-model={this.formData.isEs}>
-			// 				<el-radio label={true}>是</el-radio>
-			// 				<el-radio label={false}>否</el-radio>
-			// 			</el-radio-group>
-			// 		)
-			// 	}
-			// }, 
-			{
+	  {
+	  	md: 6,
+	  	isShow: true,
+	  	name: 'slot-component',
+	  	attributes: {},
+	  	formItemAttributes: {
+	  		label: '是否允许二手商城发布',
+	  		prop: 'isEs',
+	  		rules: [...required]
+	  	},
+	  	render: (h, { props, onInput }) => {
+	  		var { value } = props
+	  		return (
+	  			<el-radio-group v-model={this.formData.isEs}>
+	  				<el-radio label={true}>是</el-radio>
+	  				<el-radio label={false}>否</el-radio>
+	  			</el-radio-group>
+	  		)
+	  	}
+	  }, 
+	  {
         md: 24,
         isShow: true,
         name: 'el-input',
@@ -469,7 +469,7 @@ export default {
 				  userId: this.formData.userId,
 				  websitId: this.formData.websitId,
 				  bankAccount: this.formData.bankAccount,
-					// isEs: this.formData.isEs,
+					isEs: this.formData.isEs,
 				  idCard: this.formData.idCard,
 				  idCardImg: this.formData.idCardImg[0].url,
 				  name: this.formData.nickName