zhangdan 4 éve
szülő
commit
5a22286aa2

+ 23 - 1
src/api/userInfo.js

@@ -44,7 +44,7 @@ export const customeExport = (params) => {
   })
 }
 
-// 乐豆详情
+// 用户管理-乐豆详情
 export const customerGoldLogDetail = (params) => {
   const url = `customerGoldLog/query/${params.pageNo}/${params.pageSize}`
   delete params.pageNo
@@ -80,3 +80,25 @@ export const updateRole = (params) => {
     method: 'post'
   })
 }
+
+// 乐豆明细--所有用户
+export const offPartnerGoldLog = (params) => {
+  const url = `offPartnerGoldLog/query/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+
+//  乐豆明细--总计(所有用户)
+export const getStatistic = (params) => {
+  const url = `offPartnerGoldLog/getGoldChangeNumTotal`
+  return axios.request({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}

+ 10 - 10
src/config/router.config.js

@@ -219,7 +219,7 @@ export const asyncRouterMap = [{
       component: RouteView,
       meta: {
         title: '用户管理',
-        icon: 'profile',
+        icon: 'user',
         permission: 'M_user_userManage_list'
       },
       hideChildrenInMenu: true,
@@ -258,6 +258,15 @@ export const asyncRouterMap = [{
       }
       ]
     },
+    {
+		  path: '/userInfo/allLdDetail',
+		  name: 'allLdDetail',
+		  component: () => import(/* webpackChunkName: "releaseRecord" */ '@/views/userInfo/allLdDetail.vue'),
+		  meta: {
+		    title: '乐豆明细',
+		    icon: 'profile'
+		  }
+    },
     {
       path: '/userInfo/releaseRecord/list',
       name: 'releaseRecordList',
@@ -267,15 +276,6 @@ export const asyncRouterMap = [{
         icon: 'container',
         permission: 'M_user_releaseRecord'
       }
-    },
-    {
-		  path: '/userInfo/allLdDetail',
-		  name: 'allLdDetail',
-		  component: () => import(/* webpackChunkName: "releaseRecord" */ '@/views/userInfo/allLdDetail.vue'),
-		  meta: {
-		    title: '乐豆明细',
-		    icon: 'container'
-		  }
     }
     ]
   },

+ 5 - 4
src/views/cleanManage/cleanModal.vue

@@ -96,8 +96,8 @@ export default {
     },
     // 取消
     cancel (e) {
-	  this.clear()
-	  this.$emit('close')
+      this.clear()
+      this.$emit('close')
     },
     // 重置input框
     clear () {
@@ -115,10 +115,11 @@ export default {
     },
     isShow (val) {
       if (!val) {
-		  console.log(val, '--------弹窗状态')
         this.$emit('close')
       } else {
-
+        this.$nextTick(() => {
+          this.$refs.ruleForm.resetFields()
+        })
       }
     }
   }

+ 48 - 57
src/views/cleanManage/driverManage.vue

@@ -4,9 +4,21 @@
     <div class="userManage-search">
       <a-form-model layout="inline" :model="queryParam" v-bind="formItemLayout" @keyup.enter.native="$refs.table.refresh(true)">
         <a-row :gutter="24">
-          <a-col :xs="24" :sm="12" :md="6" :lg="5"><a-form-model-item label="司机姓名" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol"><a-input allowClear placeholder="请输入司机姓名" v-model.trim="queryParam.name" id="driverManage-name"/></a-form-model-item></a-col>
-          <a-col :xs="24" :sm="12" :md="6" :lg="5"><a-form-model-item label="手机号码" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol"><a-input allowClear placeholder="请输入手机号码" :maxLength="11" v-model.trim="queryParam.phone" id="driverManage-phone"/></a-form-model-item></a-col>
-          <a-col :xs="24" :sm="12" :md="6" :lg="5"><a-form-model-item label="状态" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol"><v-select code="ENABLE_FLAG" v-model="queryParam.loginFlag" allowClear placeholder="请选择状态" id="driverManage-loginFlag"></v-select></a-form-model-item></a-col>
+          <a-col :xs="24" :sm="12" :md="6" :lg="5">
+            <a-form-model-item label="司机姓名" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
+              <a-input allowClear placeholder="请输入司机姓名" v-model.trim="queryParam.name" id="driverManage-name" />
+            </a-form-model-item>
+          </a-col>
+          <a-col :xs="24" :sm="12" :md="6" :lg="5">
+            <a-form-model-item label="手机号码" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
+              <a-input allowClear placeholder="请输入手机号码" :maxLength="11" v-model.trim="queryParam.phone" id="driverManage-phone" />
+            </a-form-model-item>
+          </a-col>
+          <a-col :xs="24" :sm="12" :md="6" :lg="5">
+            <a-form-model-item label="状态" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
+              <v-select code="ENABLE_FLAG" v-model="queryParam.loginFlag" allowClear placeholder="请选择状态" id="driverManage-loginFlag"></v-select>
+            </a-form-model-item>
+          </a-col>
           <a-col :xs="24" :sm="12" :md="6" :lg="5">
             <a-button type="primary" @click="$refs.table.refresh(true)" style="margin: 4px 10px 0 20px" id="driverManage-refresh">查询</a-button>
             <a-button type="" @click="reset" style="margin-top: 4px" id="driverManage-reset">重置</a-button>
@@ -16,12 +28,7 @@
     </div>
     <!-- 新增 -->
     <div class="table-operator">
-      <a-button
-        type="primary"
-        icon="plus"
-        @click="openModal"
-        id="driverManage-openModal"
-        style="margin-top: 18px;">新增</a-button>
+      <a-button type="primary" icon="plus" @click="openModal" id="driverManage-openModal" style="margin-top: 18px;">新增</a-button>
     </div>
     <!-- 列表 -->
     <s-table
@@ -32,58 +39,36 @@
       :data="loadData"
       bordered>
       <template slot="loginFlag" slot-scope="text, record">
-        <!-- <span :class="[record.loginFlag == 0 ? 'red' :'green' ]">{{ record.loginFlag == 0 ? '禁用' :record.loginFlag == 1 ? '启用' : '--' }}</span> -->
         <span :style="{'color': (record.loginFlag == 0 ? 'red' : 'green')}">{{ record.loginFlag == 0 ? '禁用' :record.loginFlag == 1 ? '启用' : '--' }}</span>
       </template>
       <span slot="action" slot-scope="text, record">
-        <a-icon
-          type="unlock"
-          title="重置密码"
-          class="actionBtn icon-orange"
-          @click="resetPassword(record)" />
-        <a-icon
-          type="edit"
-          title="编辑"
-          class="actionBtn icon-blues"
-          @click="handleEdit(record)"
-        />
-        <a-icon
-          v-if="record.loginFlag == 0"
-          type="delete"
-          title="删除"
-          class="actionBtn icon-red"
-          @click="delect(record)"/>
+        <a-icon type="unlock" title="重置密码" class="actionBtn icon-orange" @click="resetPassword(record)" />
+        <a-icon type="edit" title="编辑" class="actionBtn icon-blues" @click="handleEdit(record)" />
+        <a-icon v-if="record.loginFlag == 0" type="delete" title="删除" class="actionBtn icon-red" @click="delect(record)" />
         <!-- <span v-if="!$hasPermissions('B_userManage_edit') && !($hasPermissions('B_userManage_resetPwd') && record.loginFlag==1) && !($hasPermissions('B_userManage_del') && record.loginFlag==0) ">--</span> -->
       </span>
     </s-table>
     <!-- 新增、编辑弹窗 -->
-    <addDiverModal :visible="showModal" @refresh="$refs.table.refresh(true)" :itemId="itemId" @close="cancel"></addDiverModal>
+    <addDiverModal :visible="showModal" @refresh="refreshTable" :itemId="itemId" @close="cancel"></addDiverModal>
   </a-card>
 </template>
 
 <script>
-import {
-  STable,
-  VSelect
-} from '@/components'
+import { STable, VSelect } from '@/components'
 import addDiverModal from './addDiverModal.vue'
 import { resetPSD, getPowerUserList, delectUserPower } from '@/api/userManage.js'
 export default {
   name: 'DriverManage',
-  components: {
-    STable,
-    VSelect,
-    addDiverModal
-  },
+  components: { STable, VSelect, addDiverModal },
   data () {
     return {
       formItemLayout: {
-		  labelCol: {
-		    span: 7
-		  },
-		  wrapperCol: {
-		    span: 17
-		  }
+        labelCol: {
+          span: 7
+        },
+        wrapperCol: {
+          span: 17
+        }
       },
       // 查询参数
       queryParam: {
@@ -118,7 +103,7 @@ export default {
         width: 100,
         align: 'center',
         scopedSlots: {
-		  customRender: 'loginFlag'
+          customRender: 'loginFlag'
         }
       },
       {
@@ -145,13 +130,17 @@ export default {
     }
   },
   methods: {
-	  cancel () {
-	    this.itemId = null
-	    this.showModal = false
-	  },
+    cancel () {
+      this.itemId = null
+      this.showModal = false
+    },
     // 刷新列表
     refreshTable () {
-      this.$refs.table.refresh(true)
+      if (this.itemId) {
+        this.$refs.table.refresh()
+      } else {
+        this.$refs.table.refresh(true)
+      }
     },
     // 新建
     openModal () {
@@ -172,6 +161,7 @@ export default {
       }).then(res => {
         if (res.status == 200) {
           this.$message.success(res.message)
+          this.$refs.table.refresh()
         }
       })
     },
@@ -196,20 +186,21 @@ export default {
         }
       })
     },
+    // 编辑
     handleEdit (row) {
       console.log(row, 'row')
-	  this.itemId = row.id
+      this.itemId = row.id
       this.showModal = true
     }
   }
 }
 </script>
 <style lang="less">
-	.userManage-page-info{
-		.userManage-search{
-			.ant-form-inline .ant-form-item {
-				width: 100%;
-			}
-		}
-	}
+    .userManage-page-info {
+        .userManage-search {
+            .ant-form-inline .ant-form-item {
+                width: 100%;
+            }
+        }
+    }
 </style>

+ 50 - 54
src/views/cleanManage/notCleanNetwork.vue

@@ -78,7 +78,6 @@
     <!-- 合计 -->
     <a-alert type="info" showIcon style="margin-bottom:15px">
       <div class="ftext" slot="message">总计<span> {{ }} </span>条,可回收垃圾总计<span> {{ }} </span>kg。  其中,废旧衣物<span> {{ }} </span>kg,废旧纸张<span> {{ }} </span>kg,废旧金属<span> {{ }} </span>kg,废旧塑料<span> {{ }} </span>kg,废旧金属/塑料<span> {{ }} </span>kg,废旧玻璃<span> {{ }} </span>kg,可回收物<span> {{ }} </span>kg</div>
-      <!-- <div class="ftext" slot="message">其中,废旧衣物<span> {{ }} </span>kg,废旧衣物<span> {{ }} </span>kg,废旧衣物<span> {{ }} </span>kg,废旧衣物<span> {{ }} </span>kg,废旧衣物<span> {{ }} </span>kg,废旧衣物<span> {{ }} </span>kg</div> -->
     </a-alert>
     <!-- 列表 -->
     <a-table
@@ -123,65 +122,36 @@ import {
 import cleanModal from './cleanModal.vue'
 import moment from 'moment'
 import getDate from '@/libs/getDate.js'
-const columns = [{
-  title: '网点名称',
-  dataIndex: 'no',
-  width: 60,
-  align: 'center'
-},
-{
-  title: '设备编号',
-  dataIndex: 'name',
-  width: 100,
-  align: 'center',
-  customRender: (text) => {
-    return text || '--'
-  }
-},
-{
-  slots: { title: 'customTitle' },
+const columns = [{title: '网点名称', dataIndex: 'no',width: 60,align: 'center'},
+{title: '设备编号', dataIndex: 'name',width: 100,align: 'center',customRender: (text) => {return text || '--' }},
+{slots: { title: 'customTitle' },
   children: [
-    { title: '废旧衣物', width: 100, align: 'center', customRender: (text) => { return text || 0 } },
-    { title: '废旧纸张', width: 100, align: 'center', customRender: (text) => { return text || 0 } },
-    { title: '废旧塑料', width: 100, align: 'center', customRender: (text) => { return text || 0 } },
-    { title: '废旧金属', width: 100, align: 'center', customRender: (text) => { return text || 0 } },
-    { title: '废旧金属/塑料', width: 100, align: 'center', customRender: (text) => { return text || 0 } },
-    { title: '废旧玻璃', width: 100, align: 'center', customRender: (text) => { return text || 0 } },
-    { title: '可回收物', width: 100, align: 'center', customRender: (text) => { return text || 0 } }
+    { title: '废旧衣物', dataIndex: 'yiwu', width: 100, align: 'center', customRender: (text) => { return text || 0 } },
+    { title: '废旧纸张', dataIndex: 'zhizhang', width: 100, align: 'center', customRender: (text) => { return text || 0 } },
+    { title: '废旧塑料', dataIndex: 'suliao', width: 100, align: 'center', customRender: (text) => { return text || 0 } },
+    { title: '废旧金属', dataIndex: 'jinshu', width: 100, align: 'center', customRender: (text) => { return text || 0 } },
+    { title: '废旧金属/塑料', dataIndex: 'jssl', width: 100, align: 'center', customRender: (text) => { return text || 0 } },
+    { title: '废旧玻璃', dataIndex: 'boli', width: 100, align: 'center', customRender: (text) => { return text || 0 } },
+    { title: '可回收物', dataIndex: 'huishou', width: 100, align: 'center', customRender: (text) => { return text || 0 } }
   ]
 },
-{
-  title: '可回收垃圾小计(kg)',
-  dataIndex: 'createDate',
-  width: 100,
-  align: 'center'
-},
-{
-  title: '最后清运时间',
-  dataIndex: 'changjia',
-  width: 100,
-  align: 'center',
-  customRender: (text) => {
-    return text || '--'
-  }
-},
-{
-  title: '操作',
-  dataIndex: 'action',
-  width: 100,
-  align: 'center',
-  scopedSlots: {
-    customRender: 'action'
-  }
-}
-]
+{title: '可回收垃圾小计(kg)',dataIndex: 'createDate',width: 100,align: 'center'},
+{title: '最后清运时间',dataIndex: 'changjia',width: 100,align: 'center',customRender: (text) => {return text || '--'}},
+{title: '操作',dataIndex: 'action',width: 100,align: 'center',scopedSlots: {customRender: 'action'}}]
 const data = [{
   createDate: '2020-01-05',
   MAC: '22210245224555',
   name: '电子秤',
   num: '2222554585877',
   org: 'X-001',
-  changjia: '上海电子厂'
+  changjia: '上海电子厂',
+  yiwu: '50',
+  zhizhang: '45',
+  suliao: '55',
+  jinshu: '70',
+  jssl: '80',
+  boli: '100',
+  huishou: '152'
 },
 {
   createDate: '2020-01-05',
@@ -189,7 +159,14 @@ const data = [{
   name: '电子秤',
   num: '2222554585877',
   org: 'X-001',
-  changjia: '上海电子厂'
+  changjia: '上海电子厂',
+  yiwu: '50',
+  zhizhang: '45',
+  suliao: '55',
+  jinshu: '270',
+  jssl: '80',
+  boli: '100',
+  huishou: '152'
 },
 {
   createDate: '2020-01-05',
@@ -197,7 +174,14 @@ const data = [{
   name: '电子秤',
   num: '2222554585877',
   org: 'X-001',
-  changjia: '上海电子厂'
+  changjia: '上海电子厂',
+  yiwu: '50',
+  zhizhang: '45',
+  suliao: '155',
+  jinshu: '70',
+  jssl: '80',
+  boli: '100',
+  huishou: '152'
 },
 {
   createDate: '2020-01-05',
@@ -205,9 +189,21 @@ const data = [{
   name: '电子秤',
   num: '2222554585877',
   org: 'X-001',
-  changjia: '上海电子厂'
+  changjia: '上海电子厂',
+  yiwu: '50',
+  zhizhang: '45',
+  suliao: '55',
+  jinshu: '70',
+  jssl: '180',
+  boli: '100',
+  huishou: '152'
 }
 ]
+const arr = [{ yiwu: '50', zhizhang: '45', suliao: '55', jinshu: '70', jssl: '180', boli: '100', huishou: '152' },
+  { yiwu: '50', zhizhang: '45', suliao: '55', jinshu: '70', jssl: '180', boli: '100', huishou: '152' },
+  { yiwu: '50', zhizhang: '45', suliao: '55', jinshu: '70', jssl: '180', boli: '100', huishou: '152' },
+  { yiwu: '50', zhizhang: '45', suliao: '55', jinshu: '70', jssl: '180', boli: '100', huishou: '152' }]
+// let maxNum=
 export default {
   components: {
     STable,

+ 217 - 234
src/views/equipmentManage/boxSetting/boxSetting.vue

@@ -1,242 +1,225 @@
 <template>
-  <a-card :bordered="false" class="network-table-page-search-wrapper">
-    <div class="network-searchForm">
-      <a-form layout="inline" :form="form" ref="form" v-bind="formItemLayout" @keyup.enter.native="$refs.table.refresh(true)">
-        <a-row :gutter="48">
-          <a-col :span="6">
-            <a-form-item label="箱体类型名称" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
-              <a-input id="boxSetting-name" allowClear :maxLength="30" v-model="queryParam.name" placeholder="请输入箱体类型名称" />
-            </a-form-item>
-          </a-col>
-          <a-col :span="6">
-            <a-button class="handle-btn serach-btn" id="boxSetting-btn-serach" type="primary" @click="$refs.table.refresh(true)">查询</a-button>
-            <a-button class="handle-btn" type="" id="boxSetting-btn-reset" @click="handleReset">重置</a-button>
-          </a-col>
-        </a-row>
-      </a-form>
-    </div>
-    <div class="table-operator">
-      <a-button type="primary" icon="plus" @click="openModal" id="boxSetting-add" v-hasPermission="'B_boxSetting_add'">新增</a-button>
-    </div>
-    <s-table
-      ref="table"
-      size="default"
-      :rowKey="(record) => record.id"
-      :columns="columns"
-      :data="loadData"
-      bordered>
-      <!-- 操作 -->
-      <template slot="action" slot-scope="text, record">
-        <a-icon
-          type="edit"
-          id="boxSetting-edit"
-          title="编辑"
-          class="actionBtn icon-blues"
-          @click="handleEdit(record)"
-          v-hasPermission="'B_boxSetting_edit'" />
-        <a-icon
-          type="delete"
-          id="boxSetting-del"
-          title="删除"
-          class="actionBtn icon-red"
-          @click="delect(record)"
-          v-if="$hasPermissions('B_boxSetting_del') && !record.isEnable"/>
-        <span v-if="!$hasPermissions('B_boxSetting_edit') && (!$hasPermissions('B_boxSetting_del') && !record.isEnable)">--</span>
-      </template>
-    </s-table>
-    <!-- 新增/编辑 弹窗 -->
-    <add-box-modal :visible="openBoxModal" :id="itemId" @refresh="refreshTable" @close="openBoxModal = false"></add-box-modal>
-  </a-card>
+	<a-card :bordered="false" class="network-table-page-search-wrapper">
+		<div class="network-searchForm">
+			<a-form layout="inline" :form="form" ref="form" v-bind="formItemLayout" @keyup.enter.native="$refs.table.refresh(true)">
+				<a-row :gutter="48">
+					<a-col :span="6">
+						<a-form-item label="箱体类型名称" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
+							<a-input id="boxSetting-name" allowClear :maxLength="30" v-model="queryParam.name" placeholder="请输入箱体类型名称" />
+						</a-form-item>
+					</a-col>
+					<a-col :span="6">
+						<a-button class="handle-btn serach-btn" id="boxSetting-btn-serach" type="primary" @click="$refs.table.refresh(true)">查询</a-button>
+						<a-button class="handle-btn" type="" id="boxSetting-btn-reset" @click="handleReset">重置</a-button>
+					</a-col>
+				</a-row>
+			</a-form>
+		</div>
+		<div class="table-operator">
+			<a-button type="primary" icon="plus" @click="openModal" id="boxSetting-add" v-hasPermission="'B_boxSetting_add'">新增</a-button>
+		</div>
+		<s-table ref="table" size="default" :rowKey="(record) => record.id" :columns="columns" :data="loadData" bordered>
+			<!-- 操作 -->
+			<template slot="action" slot-scope="text, record">
+				<a-icon type="edit" id="boxSetting-edit" title="编辑" class="actionBtn icon-blues" @click="handleEdit(record)"
+				 v-hasPermission="'B_boxSetting_edit'" />
+				<a-icon type="delete" id="boxSetting-del" title="删除" class="actionBtn icon-red" @click="delect(record)" v-if="$hasPermissions('B_boxSetting_del') && !record.isEnable" />
+				<span v-if="!$hasPermissions('B_boxSetting_edit') && (!$hasPermissions('B_boxSetting_del') && !record.isEnable)">--</span>
+			</template>
+		</s-table>
+		<!-- 新增/编辑 弹窗 -->
+		<add-box-modal :visible="openBoxModal" :id="itemId" @refresh="refreshTable" @close="openBoxModal = false"></add-box-modal>
+	</a-card>
 </template>
 
 <script>
-import {
-  STable,
-  VSelect
-} from '@/components'
-import AddBoxModal from './AddBoxModal.vue'
-import {
-  getBoxList,
-  deleteBoxSetting
-} from '@/api/boxSetting.js'
-export default {
-  name: 'Equipment',
-  components: {
-    STable,
-    VSelect,
-    AddBoxModal
-  },
-  data () {
-    return {
-      form: this.$form.createForm(this),
-      formItemLayout: {
-        labelCol: {
-          span: 7
-        },
-        wrapperCol: {
-          span: 17
-        }
-      },
-      // 查询参数
-      queryParam: {
-        name: '' // 箱体类型
-      },
-      openBoxModal: false, // 新增/编辑弹窗
-      itemId: '', //  箱体id
-      // 表头
-      columns: [{
-        title: '序号',
-        dataIndex: 'no',
-        width: 70,
-        align: 'center'
-      },
-      {
-        title: '创建时间',
-        dataIndex: 'createDate',
-        width: 180,
-        align: 'center'
-      },
-      {
-        title: '箱体类型名称',
-        dataIndex: 'name',
-        width: 200,
-        align: 'center'
-      },
-      {
-        title: '内置箱体数量(个)',
-        dataIndex: 'boxNum',
-        width: 80,
-        align: 'center'
-      },
-      {
-        title: '内置箱体投放限重(g)/ 对应资源分类',
-        children: [{
-          title: '1号箱',
-          dataIndex: 'one',
-          width: 120,
-          align: 'center',
-		  customRender: (record, text) => {
-		    return record ? (record.maxWeight ? (record.maxWeight + '/' + record.rubbishTypeDictValue) : '--') : '--'
-		  }
-        },
-        {
-          title: '2号箱',
-          dataIndex: 'two',
-          width: 120,
-          align: 'center',
-		  customRender: (record, text) => {
-		    return record ? (record.maxWeight ? (record.maxWeight + '/' + record.rubbishTypeDictValue) : '--') : '--'
-		  }
-        },
-        {
-          title: '3号箱',
-          dataIndex: 'three',
-          width: 120,
-          align: 'center',
-          customRender: (record, text) => {
-            return record ? (record.maxWeight ? (record.maxWeight + '/' + record.rubbishTypeDictValue) : '--') : '--'
-          }
-        },
-        {
-          title: '4号箱',
-          dataIndex: 'four',
-          width: 120,
-          align: 'center',
-          customRender: (record, text) => {
-            return record ? (record.maxWeight ? (record.maxWeight + '/' + record.rubbishTypeDictValue) : '--') : '--'
-          }
-        },
-        {
-          title: '5号箱',
-          dataIndex: 'five',
-          width: 120,
-          align: 'center',
-          customRender: (record, text) => {
-            return record ? (record.maxWeight ? (record.maxWeight + '/' + record.rubbishTypeDictValue) : '--') : '--'
-          }
-        }
-        ]
-      },
-      {
-        title: '操作',
-        scopedSlots: {
-          customRender: 'action'
-        },
-        width: 120,
-        align: 'center'
-      }
-      ],
-      // 加载数据方法 必须为 Promise 对象
-      loadData: parameter => {
-        return getBoxList(Object.assign(parameter, this.queryParam)).then(res => {
-          if (res.status == 200) {
-            const no = (res.data.pageNo - 1) * res.data.pageSize
-            for (let i = 0; i < res.data.list.length; i++) {
-              const _item = res.data.list[i]
-              _item.no = no + i + 1
-            }
-            return res.data
-          }
-        })
-      }
+	import {
+		STable,
+		VSelect
+	} from '@/components'
+	import AddBoxModal from './AddBoxModal.vue'
+	import {
+		getBoxList,
+		deleteBoxSetting
+	} from '@/api/boxSetting.js'
+	export default {
+		name: 'Equipment',
+		components: {
+			STable,
+			VSelect,
+			AddBoxModal
+		},
+		data() {
+			return {
+				form: this.$form.createForm(this),
+				formItemLayout: {
+					labelCol: {
+						span: 7
+					},
+					wrapperCol: {
+						span: 17
+					}
+				},
+				// 查询参数
+				queryParam: {
+					name: '' // 箱体类型
+				},
+				openBoxModal: false, // 新增/编辑弹窗
+				itemId: '', //  箱体id
+				// 表头
+				columns: [{
+						title: '序号',
+						dataIndex: 'no',
+						width: 70,
+						align: 'center'
+					},
+					{
+						title: '创建时间',
+						dataIndex: 'createDate',
+						width: 180,
+						align: 'center'
+					},
+					{
+						title: '箱体类型名称',
+						dataIndex: 'name',
+						width: 200,
+						align: 'center'
+					},
+					{
+						title: '内置箱体数量(个)',
+						dataIndex: 'boxNum',
+						width: 80,
+						align: 'center'
+					},
+					{
+						title: '内置箱体投放限重(g)/ 对应资源分类',
+						children: [{
+								title: '1号箱',
+								dataIndex: 'one',
+								width: 120,
+								align: 'center',
+								customRender: (record, text) => {
+									return record ? (record.maxWeight ? (record.maxWeight + '/' + record.rubbishTypeDictValue) : '--') : '--'
+								}
+							},
+							{
+								title: '2号箱',
+								dataIndex: 'two',
+								width: 120,
+								align: 'center',
+								customRender: (record, text) => {
+									return record ? (record.maxWeight ? (record.maxWeight + '/' + record.rubbishTypeDictValue) : '--') : '--'
+								}
+							},
+							{
+								title: '3号箱',
+								dataIndex: 'three',
+								width: 120,
+								align: 'center',
+								customRender: (record, text) => {
+									return record ? (record.maxWeight ? (record.maxWeight + '/' + record.rubbishTypeDictValue) : '--') : '--'
+								}
+							},
+							{
+								title: '4号箱',
+								dataIndex: 'four',
+								width: 120,
+								align: 'center',
+								customRender: (record, text) => {
+									return record ? (record.maxWeight ? (record.maxWeight + '/' + record.rubbishTypeDictValue) : '--') : '--'
+								}
+							},
+							{
+								title: '5号箱',
+								dataIndex: 'five',
+								width: 120,
+								align: 'center',
+								customRender: (record, text) => {
+									return record ? (record.maxWeight ? (record.maxWeight + '/' + record.rubbishTypeDictValue) : '--') : '--'
+								}
+							}
+						]
+					},
+					{
+						title: '操作',
+						scopedSlots: {
+							customRender: 'action'
+						},
+						width: 120,
+						align: 'center'
+					}
+				],
+				// 加载数据方法 必须为 Promise 对象
+				loadData: parameter => {
+					return getBoxList(Object.assign(parameter, this.queryParam)).then(res => {
+						if (res.status == 200) {
+							const no = (res.data.pageNo - 1) * res.data.pageSize
+							for (let i = 0; i < res.data.list.length; i++) {
+								const _item = res.data.list[i]
+								_item.no = no + i + 1
+							}
+							return res.data
+						}
+					})
+				}
 
-    }
-  },
-  beforeRouteEnter (to, from, next) {
-    next(vm => {
-      vm.queryParam.name = ''
-    })
-  },
-  methods: {
-    // 重置
-    handleReset () {
-      console.log('重置', this.queryParam)
-      this.form.resetFields()
-	  this.queryParam.name = ''
-      this.$refs.table.refresh(true)
-    },
-    // 新建
-    openModal () {
-      this.openBoxModal = true
-      this.itemId = ''
-    },
-    // 编辑
-    handleEdit (item) {
-      this.openBoxModal = true
-	    this.itemId = item.id
-    },
-    // 新增/编辑 后刷新列表
-    refreshTable () {
-      if (this.itemId) {
-        this.$refs.table.refresh()
-      } else {
-        this.$refs.table.refresh(true)
-      }
-    },
-    // 删除
-    delect (row) {
-      const _this = this
-      this.$confirm({
-        title: '警告',
-        centered: true,
-        content: '删除后无法恢复,确认删除?',
-        okText: '确定',
-        cancelText: '取消',
-        onOk () {
-          deleteBoxSetting({
-            id: row.id
-          }).then(res => {
-            console.log(res, 'res1111')
-            if (res.status == 200) {
-              _this.$message.success(res.message)
-              _this.$refs.table.refresh()
-            }
-          })
-        }
-      })
-    }
-  }
-}
+			}
+		},
+		beforeRouteEnter(to, from, next) {
+			next(vm => {
+				vm.queryParam.name = ''
+			})
+		},
+		methods: {
+			// 重置
+			handleReset() {
+				console.log('重置', this.queryParam)
+				this.form.resetFields()
+				this.queryParam.name = ''
+				this.$refs.table.refresh(true)
+			},
+			// 新建
+			openModal() {
+				this.openBoxModal = true
+				this.itemId = ''
+			},
+			// 编辑
+			handleEdit(item) {
+				this.openBoxModal = true
+				this.itemId = item.id
+			},
+			// 新增/编辑 后刷新列表
+			refreshTable() {
+				if (this.itemId) {
+					this.$refs.table.refresh()
+				} else {
+					this.$refs.table.refresh(true)
+				}
+			},
+			// 删除
+			delect(row) {
+				const _this = this
+				this.$confirm({
+					title: '警告',
+					centered: true,
+					content: '删除后无法恢复,确认删除?',
+					okText: '确定',
+					cancelText: '取消',
+					onOk() {
+						deleteBoxSetting({
+							id: row.id
+						}).then(res => {
+							console.log(res, 'res1111')
+							if (res.status == 200) {
+								_this.$message.success(res.message)
+								_this.$refs.table.refresh()
+							}
+						})
+					}
+				})
+			}
+		}
+	}
 </script>
 <style lang="less" scoped>
 	.network-table-page-search-wrapper {

+ 25 - 12
src/views/equipmentManage/electronicScale/addElectronicScale.vue

@@ -1,16 +1,21 @@
 <template>
-  <a-modal
-    :footer="null"
-    centered
-    :title="modalTit"
-    v-model="isShow"
-    @cancle="isShow=false">
+  <a-modal :footer="null" centered :title="modalTit" v-model="isShow" @cancle="isShow=false">
     <a-form-model :model="form" ref="ruleForm" :rules="rules">
-      <a-form-model-item label="设备MAC码" :label-col="{span:6}" :wrapper-col="{span:16}" prop="MAC"><a-input placeholder="请输入设备MAC码" v-model="form.MAC" allowClear/></a-form-model-item>
-      <a-form-model-item label="设备名称" :label-col="{span:6}" :wrapper-col="{span:16}" prop="MAC"><a-input placeholder="请输入设备名称" v-model="form.MAC" allowClear/></a-form-model-item>
-      <a-form-model-item label="设备编号" :label-col="{span:6}" :wrapper-col="{span:16}" prop="MAC"><a-input placeholder="请输入设备编号" v-model="form.MAC" allowClear/></a-form-model-item>
-      <a-form-model-item label="设备型号" :label-col="{span:6}" :wrapper-col="{span:16}" prop="MAC"><a-input placeholder="请输入设备型号" v-model="form.MAC" allowClear/></a-form-model-item>
-      <a-form-model-item label="生产厂家" :label-col="{span:6}" :wrapper-col="{span:16}" prop="MAC"><a-input placeholder="请输入生产厂家" v-model="form.MAC" allowClear/></a-form-model-item>
+      <a-form-model-item label="设备MAC地址" :label-col="{span:6}" :wrapper-col="{span:16}" prop="MAC">
+        <a-input placeholder="请输入设备MAC地址" v-model="form.MAC" allowClea oninput="value=value.toLowerCase()" :maxLength="12"/>
+      </a-form-model-item>
+      <a-form-model-item label="设备名称" :label-col="{span:6}" :wrapper-col="{span:16}" prop="MAC">
+        <a-input placeholder="请输入设备名称" v-model="form.MAC" allowClear :maxLength="30"/>
+      </a-form-model-item>
+      <a-form-model-item label="设备编号" :label-col="{span:6}" :wrapper-col="{span:16}" prop="MAC">
+        <a-input placeholder="请输入设备编号" v-model="form.MAC" allowClear :maxLength="30"/>
+      </a-form-model-item>
+      <a-form-model-item label="设备型号" :label-col="{span:6}" :wrapper-col="{span:16}" prop="MAC">
+        <a-input placeholder="请输入设备型号" v-model="form.MAC" allowClear :maxLength="30"/>
+      </a-form-model-item>
+      <a-form-model-item label="生产厂家" :label-col="{span:6}" :wrapper-col="{span:16}" prop="MAC">
+        <a-input placeholder="请输入生产厂家" v-model="form.MAC" allowClear :maxLength="30"/>
+      </a-form-model-item>
       <a-form-model-item :wrapper-col="{ span: 24, offset: 8 }">
         <a-button type="primary" @click="handleSubmit()" :style="{ marginRight: '15px' }">
           保存
@@ -41,8 +46,16 @@ export default {
       form: {
         MAC: ''
       },
+      MAC: '',
       isShow: this.visible, // 弹框状态
-      rules: { MAC: [{ required: true, message: '请输入设备MAC码', trigger: 'blur' }] }
+      rules: {
+        MAC: [{
+          required: true,
+          message: '请输入设备MAC地址(数字与英文字母组合)',
+          trigger: 'blur',
+		  pattern: /^[A-Za-z0-9]+$/
+        }]
+      }
     }
   },
   methods: {

+ 17 - 7
src/views/equipmentManage/electronicScale/electronicScale.vue

@@ -6,7 +6,7 @@
         <a-row :gutter="24">
           <a-col :xs="24" :sm="12" :md="8" :lg="6">
             <a-form-model-item label="设备MAC码" :label-col="{span:7}" :wrapper-col="{span:17}">
-              <a-input v-model="searchForm.MAC" placeholder="请输入设备MAC码" />
+              <a-input v-model="searchForm.MAC" placeholder="请输入设备MAC码" oninput="value=value.toUpperCase()" :maxLength="30"/>
             </a-form-model-item>
           </a-col>
           <a-col :xs="24" :sm="12" :md="8" :lg="6">
@@ -92,30 +92,40 @@ export default {
   methods: {
     // 重置
     handleReset () {
-
+		this.searchForm= {
+        MAC: ''
+      }
     },
     // 新增
     openModal () {
       this.isOpenModal = true
-	  console.log('新增')
+		console.log('新增')
     },
     // 编辑
     handleEdit (record) {
       this.isOpenModal = true
-	  console.log('编辑')
+		console.log('编辑')
     },
     // 删除
     delect () {
-
+			this.$confirm({
+				title: '警告',
+				centered: true,
+				content: '删除后无法恢复,确认删除?',
+				okText: '确定',
+				cancelText: '取消',
+				onOk() {
+				}
+			})
     },
     // 保存或编辑后刷新列表
     refreshTable () {
       // 编辑
       if (this.itemId) {
-		  this.$refs.table.refresh()
+			this.$refs.table.refresh()
       } else {
         // 保存
-		  this.$refs.table.refresh(true)
+			this.$refs.table.refresh(true)
       }
     }
   }

+ 4 - 1
src/views/equipmentManage/network/equipmentModal.vue

@@ -51,7 +51,8 @@
         :pagination="false">
         <!-- 设备状态 -->
         <template slot="onlineFlag" slot-scope="text, record">
-          <span :class="record.onlineFlag==0 ? 'red' : record.onlineFlag==1 ? 'green' : ''">{{ record.onlineFlag == 0 ? '离线' : record.onlineFlag == 1 ? '在线' : '--' }}</span>
+			<span :style="{'color':(record.onlineFlag==0 ? 'red' : record.onlineFlag==1 ? 'green' : '')}">{{ record.onlineFlag == 0 ? '离线' : record.onlineFlag == 1 ? '在线' : '--' }}</span>
+          <!-- <span :class="record.onlineFlag==0 ? 'red' : record.onlineFlag==1 ? 'green' : ''">{{ record.onlineFlag == 0 ? '离线' : record.onlineFlag == 1 ? '在线' : '--' }}</span> -->
         </template>
         <!-- 箱体类型 -->
         <template slot="type" slot-scope="record">
@@ -73,9 +74,11 @@
             checkedChildren="启用"
             unCheckedChildren="禁用"
             id="equipment-changeFlagHandle"
+			v-if="record.state"
             v-model="record.state == 1 ? true : false"
             @change="changeFlagHandle(record)"
           />
+		  <span v-else>--</span>
         </template>
         <!-- 操作 -->
         <template slot="action" slot-scope="record">

+ 30 - 14
src/views/releaseRecord/releaseRecordList.vue

@@ -2,8 +2,8 @@
   <a-card :bordered="false" class="shopOrder-table-page-search-wrapper">
     <div class="shopOrder-searchForm">
       <a-form layout="inline" @keyup.enter.native="refresh">
-        <a-row :gutter="20">
-          <a-col :span="5">
+        <a-row :gutter="24">
+          <a-col :xs="24" :sm="12" :md="8" :lg="5">
             <a-form-item label="投放时间:" :label-col="{ span: 7 }" :wrapper-col="{ span: 17}">
               <a-range-picker
                 style="width:100%"
@@ -14,17 +14,17 @@
                 :placeholder="['开始时间', '结束时间']" />
             </a-form-item>
           </a-col>
-          <a-col :span="5">
+          <a-col :xs="24" :sm="12" :md="8" :lg="5">
             <a-form-item label="用户账号" :label-col="{ span:7 }" :wrapper-col="{ span:17}">
               <a-input id="releaseRecordList-customerMobile" allowClear :maxLength="11" v-model=" queryParam.customerMobile" placeholder="请输入用户账号" />
             </a-form-item>
           </a-col>
-          <a-col :span="5">
+          <a-col :xs="24" :sm="12" :md="8" :lg="5">
             <a-form-item label="投放类型" :label-col="{ span:7 }" :wrapper-col="{ span:17}">
               <v-select code="RUBBISH_TYPE" v-model="queryParam.rubbishType" allowClear placeholder="请选择投放类型" id="releaseRecordList-rubbishType"></v-select>
             </a-form-item>
           </a-col>
-          <a-col :span="5">
+          <a-col :xs="24" :sm="12" :md="8" :lg="5">
             <a-form-item label="兑换乐豆" :label-col="{ span:7 }" :wrapper-col="{ span:17}">
               <div class="input-number">
                 <a-input-number id="releaseRecordList-inputNumber" v-model="queryParam.goldNumStart" :max="999999999" @change="onChange" />-
@@ -32,19 +32,19 @@
               </div>
             </a-form-item>
           </a-col>
-          <a-col :span="4">
+          <a-col :xs="24" :sm="12" :md="8" :lg="4">
             <a-form-item label="设备类型" :label-col="{ span:7 }" :wrapper-col="{ span:17}">
               <v-select code="RUBBISH_TYPE" v-model="queryParam.rubbishType" allowClear placeholder="请选择设备类型" id="releaseRecordList-rubbishType"></v-select>
             </a-form-item>
           </a-col>
         </a-row>
-        <a-row :gutter="20">
-          <a-col :span="5">
+        <a-row :gutter="24">
+          <a-col :xs="24" :sm="12" :md="8" :lg="5">
             <a-form-item label="设备编号" :label-col="{ span:7 }" :wrapper-col="{ span:17}">
               <a-input id="releaseRecordList-srcDeviceCode" allowClear :maxLength="120" v-model=" queryParam.srcDeviceCode " placeholder="请输入设备编号" />
             </a-form-item>
           </a-col>
-          <a-col :span="5">
+          <a-col :xs="24" :sm="12" :md="8" :lg="5">
             <a-form-item label="网点名称" :label-col="{ span:7 }" :wrapper-col="{ span:17}">
               <a-select
                 id="releaseRecordList-stationNo"
@@ -59,12 +59,12 @@
               </a-select>
             </a-form-item>
           </a-col>
-          <a-col :span="5">
+          <a-col :xs="24" :sm="12" :md="8" :lg="5">
             <a-form-item label="投放方式" :label-col="{ span:7 }" :wrapper-col="{ span:17}">
               <v-select code="DELIVERY_WAY" v-model="queryParam.deliveryWay" allowClear placeholder="请选择投放方式" id="releaseRecordList-deliveryWay"></v-select>
             </a-form-item>
           </a-col>
-          <a-col :span="5">
+          <a-col :xs="24" :sm="12" :md="8" :lg="5">
             <a-form-item label="投放重量" :label-col="{ span:7 }" :wrapper-col="{ span:17}">
               <div class="input-number">
                 <a-input-number id="releaseRecordList-inputNumber" v-model="queryParam.rubbishWeightStart" :max="999999999" @change="onChange" />-
@@ -72,7 +72,7 @@
               </div>
             </a-form-item>
           </a-col>
-          <a-col :span="4">
+          <a-col :xs="24" :sm="12" :md="8" :lg="4">
             <a-button class="handle-btn serach-btn" id="releaseRecordList-serach" type="primary" @click="refresh">查询</a-button>
             <a-button class="handle-btn serach-btn" type="" id="releaseRecordList-reset" @click="handleReset">重置</a-button>
             <a-button class="export-btn" id="releaseRecordList-export" v-hasPermission="'B_exportDeliveryLog'" :loading="loading" @click="handleExport">导出</a-button>
@@ -216,8 +216,24 @@ export default {
   },
   beforeRouteEnter (to, from, next) {
     next(vm => {
-      vm.handleReset()
-      vm.getStationList()
+      vm.queryOrderDate = [
+        moment(getDate.getRecentday().starttime, this.dateFormat),
+        moment(getDate.getRecentday().endtime, this.dateFormat)
+      ],
+      // 查询参数
+      vm.queryParam = {
+        beginDate: null, // 开始时间
+        endDate: null, // 结束时间
+        customerMobile: '', //  用户手机
+        srcDeviceCode: '', //  设备编号
+        stationNo: undefined, // 网点名称
+        rubbishType: '', // 投放类型
+        deliveryWay: '', // 投放方式
+        goldNumStart: null, // 兑换最小值
+        goldNumEnd: null, // 兑换最大值
+        rubbishWeightStart: null, // 投放重量最小值
+        rubbishWeightEnd: null// 投放重量最小值
+      }
     })
   },
   methods: {

+ 94 - 45
src/views/userInfo/allLdDetail.vue

@@ -40,7 +40,7 @@
           </a-col>
           <a-col :xs="24" :sm="12" :md="8" :lg="5">
             <a-form-item label="用户手机" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
-              <a-input id="boxSetting-name" allowClear :maxLength="30" v-model="queryParam.name" placeholder="请输入用户手机" />
+              <a-input id="allLdDetail-customerMobile" allowClear :maxLength="11" v-model="queryParam.customerMobile" placeholder="请输入用户手机" />
             </a-form-item>
           </a-col>
           <a-col :xs="24" :sm="12" :md="8" :lg="4">
@@ -52,7 +52,7 @@
     </div>
     <!-- 总计 -->
     <a-alert type="info" showIcon style="margin-bottom:15px">
-      <div class="ftext" slot="message">共<span> {{ }} </span>条,乐豆变动总计<span> {{ }} </span>个</div>
+      <div class="ftext" slot="message">共<span> {{ total }} </span>条,乐豆变动总计<span> {{ ldChangeNum }} </span>个</div>
     </a-alert>
     <!-- 列表 -->
     <s-table
@@ -68,11 +68,11 @@
 
 <script>
 import { STable, VSelect } from '@/components'
-import { customerGoldLogDetail } from '@/api/userInfo.js'
+import { offPartnerGoldLog, getStatistic } from '@/api/userInfo.js'
 import moment from 'moment'
 import getDate from '@/libs/getDate.js'
 export default {
-  name: 'ShopOrder',
+  name: 'AllLdDetail',
   components: { STable, VSelect },
   data () {
     return {
@@ -80,49 +80,53 @@ export default {
         labelCol: { span: 7 },
         wrapperCol: { span: 17 }
       },
-	  // 将默认近七天时间日期回显在时间选择框中
-	  time: [
-	    moment(getDate.getRecentday().starttime, 'YYYY-MM-DD'),
-	    moment(getDate.getRecentday().endtime, 'YYYY-MM-DD')
-	  ],
-	  dateFormat: 'YYYY-MM-DD',
+      // 将默认近七天时间日期回显在时间选择框中
+      time: [
+        moment(getDate.getRecentday().starttime, this.dateFormat),
+        moment(getDate.getRecentday().endtime, this.dateFormat)
+      ],
+      total: 0, // 总条数
+      ldChangeNum: 0, // 乐豆变动量总计
+      dateFormat: 'YYYY-MM-DD',
       // 查询参数
       queryParam: {
         beginDate: null, // 开始时间
         endDate: null, // 结束时间
+        customerMobile: '', // 用户手机
         changeType: '', // 类型
         operateType: '' // 原因
       },
-	  info: '',
       // 表头
       columns: [
         { title: '序号', dataIndex: 'no', width: 60, align: 'center' },
         { title: '创建时间', dataIndex: 'createDate', width: 200, align: 'center' },
-        { title: '用户手机', dataIndex: '', width: 200, align: 'center' },
+        { title: '用户手机', dataIndex: 'customerMobile', width: 200, align: 'center' },
         { title: '变动类型', dataIndex: 'changeTypeDictValue', width: 200, align: 'center' },
         { title: '变动原因', dataIndex: 'operateTypeDictValue', width: 200, align: 'center' },
         { title: '乐豆变动量(个)', dataIndex: 'changeNum', width: 200, align: 'center' }
       ],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
-		  const searchData = Object.assign(parameter, this.queryParam)
-		  if (this.time && this.time.length) {
-		    searchData.beginDate = moment(this.time[0]).format('YYYY-MM-DD')
-		    searchData.endDate = moment(this.time[1]).format('YYYY-MM-DD')
-		  } else {
-		    searchData.beginDate = ''
-		    searchData.endDate = ''
-		  }
-		  return customerGoldLogDetail(Object.assign(parameter, searchData)).then(res => {
-		    if (res.status == 200) {
-		      const no = (res.data.pageNo - 1) * res.data.pageSize
-		      for (let i = 0; i < res.data.list.length; i++) {
-		        const _item = res.data.list[i]
-		        _item.no = no + i + 1
-		      }
-		      return res.data
-		    }
-		  })
+        const searchData = Object.assign(parameter, this.queryParam)
+        if (this.time && this.time.length) {
+          searchData.beginDate = moment(this.time[0]).format('YYYY-MM-DD')
+          searchData.endDate = moment(this.time[1]).format('YYYY-MM-DD')
+        } else {
+          searchData.beginDate = null
+          searchData.endDate = null
+        }
+        return offPartnerGoldLog(Object.assign(parameter, searchData)).then(res => {
+          if (res.status == 200) {
+            const no = (res.data.pageNo - 1) * res.data.pageSize
+            for (let i = 0; i < res.data.list.length; i++) {
+              const _item = res.data.list[i]
+              _item.no = no + i + 1
+            }
+            // 总条数
+            this.total = res.data.count
+            return res.data
+          }
+        })
       }
     }
   },
@@ -141,30 +145,75 @@ export default {
     // 查询
     refresh () {
       this.$refs.table.refresh(true)
+      this.getTotal()
     },
     // 重置
     handleReset () {
-      this.time = [moment(getDate.getRecentday().starttime, 'YYYY-MM-DD'),
-	    moment(getDate.getRecentday().endtime, 'YYYY-MM-DD')]
-      this.queryParam.changeType = ''
-      this.queryParam.operateType = ''
+      this.time = [
+        moment(getDate.getRecentday().starttime, this.dateFormat),
+        moment(getDate.getRecentday().endtime, this.dateFormat)
+      ]
+      this.queryParam = {
+        beginDate: null, // 开始时间
+        endDate: null, // 结束时间
+        customerMobile: '', // 用户手机
+        changeType: '', // 类型
+        operateType: '' // 原因
+      }
       this.$refs.table.refresh(true)
+      this.getTotal()
+    },
+    // 总计
+    getTotal () {
+      const params = this.queryParam
+      if (this.time && this.time.length) {
+        params.beginDate = moment(this.time[0]).format('YYYY-MM-DD')
+        params.endDate = moment(this.time[1]).format('YYYY-MM-DD')
+      } else {
+        params.beginDate = null
+        params.endDate = null
+      }
+      getStatistic(params).then(res => {
+        if (res.status == 200) {
+          this.ldChangeNum = res.data || 0
+        } else {
+          this.ldChangeNum = 0
+        }
+      })
     }
+  },
+  mounted () {
+    this.getTotal()
+  },
+  beforeRouteEnter (to, from, next) {
+    next(vm => {
+      vm.time = [
+        moment(getDate.getRecentday().starttime, this.dateFormat),
+        moment(getDate.getRecentday().endtime, this.dateFormat)
+      ]
+      vm.queryParam = {
+        beginDate: null, // 开始时间
+        endDate: null, // 结束时间
+        customerMobile: '', // 用户手机
+        changeType: '', // 类型
+        operateType: '' // 原因
+      }
+    })
   }
 }
 </script>
 <style lang="less" scoped>
-  .allLdDetail-page-info{
-	  .page-header{
-		  margin-bottom: 15px;
-		  span{
-			  margin-left: 20px;
-		  }
-		  .page-header-info{
-			   margin-left:0;
-			 font-weight: bold;
-		  }
-	  }
+	.allLdDetail-page-info{
+		.page-header{
+			margin-bottom: 15px;
+			span{
+				margin-left: 20px;
+			}
+			.page-header-info{
+				margin-left:0;
+				font-weight: bold;
+			}
+		}
     .allLdDetail-searchForm{
       .ant-form-inline .ant-form-item{
         width: 100%;