Procházet zdrojové kódy

Merge branch 'deploy' of chelingzhu-web/zxyj-admin-html into master

lilei před 4 roky
rodič
revize
53d8afd06f

+ 9 - 0
src/api/userInfo.js

@@ -71,3 +71,12 @@ export const updateMobile = (params) => {
     method: 'post'
   })
 }
+
+// 修改用户身份
+export const updateRole = (params) => {
+  return axios({
+    url: `customer/updateRole`,
+    data: params,
+    method: 'post'
+  })
+}

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

@@ -217,7 +217,7 @@ export const asyncRouterMap = [{
           }
         },
         {
-          path: '/userInfo/userManageList_Ld/detail/:id',
+          path: '/userInfo/userManageList_Ld/detail',
           name: 'ledouDetail',
           component: () => import(/* webpackChunkName: "LdDetails" */ '@/views/userInfo/LdDetails.vue'),
           meta: {

+ 2 - 2
src/permission.js

@@ -28,9 +28,9 @@ router.beforeEach((to, from, next) => {
     } else {
       const userInfo = Vue.ls.get('userName')
       console.log(userInfo)
-      if (userInfo) {
+      if (userInfo && token != 'null') {
         store.dispatch('SetInfo', userInfo)
-        if (store.getters.roles.permissionList.length === 0 && (token != 'null')) {
+        if (store.getters.roles.permissionList.length === 0) {
           store
             .dispatch('GetInfo', token)
             .then(res => {

+ 22 - 17
src/views/businessManage/partnerManage/partnerManage.vue

@@ -1,9 +1,9 @@
 <template>
-  <a-card :bordered="false">
+  <a-card :bordered="false" class="partnerManage-page-info">
     <!-- 搜索框 -->
-    <div class="table-page-search-wrapper" style="margin-bottom: 15px;">
+    <div class="partnerManage-search">
       <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
-        <a-row :gutter="48">
+        <a-row :gutter="20">
           <a-col :md="6" :sm="24">
             <a-form-item label="商户名称"><a-input allowClear v-model.trim="queryParam.name" :maxLength="30" placeholder="请输入" id="OperateJournal-name"/></a-form-item>
           </a-col>
@@ -270,19 +270,24 @@ export default {
 </script>
 
 <style lang="less" scoped>
-.addBtn {
-  margin-bottom: 20px;
-}
-// 查看小程序码  弹框
-.qrCodeModal {
-	.qrCode {
-		display: block;
-		max-width: 100%;
-		margin: 0 auto;
-	}
-	.downQrCode {
-		display: block;
-		margin: 40px auto 30px;
+	.partnerManage-page-info{
+		.partnerManage-search{
+			margin-bottom: 15px;
+		}
+		.addBtn {
+		  margin-bottom: 15px;
+		}
 	}
-}
+	// 查看小程序码  弹框
+		.qrCodeModal {
+			.qrCode {
+				display: block;
+				max-width: 100%;
+				margin: 0 auto;
+			}
+			.downQrCode {
+				display: block;
+				margin: 40px auto 30px;
+			}
+		}
 </style>

+ 38 - 43
src/views/businessManage/userManage/userManage.vue

@@ -1,10 +1,10 @@
 <template>
-  <a-card :bordered="false">
-    <div class="table-page-search-wrapper">
-      <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
-        <a-row :gutter="48">
-          <a-col :md="6" :sm="24">
-            <a-form-item label="用户名称" :label-col="{ span: 3 }" :wrapper-col="{ span: 12 }">
+  <a-card :bordered="false" class="userManage-page-info">
+    <div class="userManage-search">
+      <a-form layout="inline" v-bind="formItemLayout" @keyup.enter.native="$refs.table.refresh(true)">
+        <a-row :gutter="20">
+          <a-col :span="5">
+            <a-form-item label="用户名称" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
               <a-input
                 allowClear
                 v-model.trim="queryParam.name"
@@ -14,9 +14,8 @@
               />
             </a-form-item>
           </a-col>
-
-          <a-col :md="6" :sm="24">
-            <a-form-item label="手机号码" :label-col="{ span: 3 }" :wrapper-col="{ span: 12 }">
+          <a-col :span="5">
+            <a-form-item label="手机号码" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
               <a-input
                 allowClear
                 v-model.trim="queryParam.phone"
@@ -26,8 +25,8 @@
               />
             </a-form-item>
           </a-col>
-          <a-col :md="6" :sm="24">
-            <a-form-item label="所属商户" :label-col="{ span:3 }" :wrapper-col="{ span:12}">
+          <a-col :span="5">
+            <a-form-item label="所属商户" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
               <a-select
                 placeholder="请选择"
                 allowClear
@@ -42,24 +41,26 @@
               </a-select>
             </a-form-item>
           </a-col>
-          <a-col :md="6" :sm="24">
-            <a-button type="primary" @click="$refs.table.refresh(true)" id="userList-handSubmit" style="margin-right: 10px;">查询</a-button>
-            <a-button type="" @click="reset" id="userList-reset">重置</a-button>
-          </a-col>
-
-        </a-row>
-        <a-row :gutter="48" style="margin-top: 25px;">
-          <a-col :md="6" :sm="24">
-            <a-form-item label="用户状态" >
+          <a-col :span="5">
+            <a-form-item label="用户状态" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
               <v-select code="ENABLE_FLAG" v-model="queryParam.loginFlag" allowClear placeholder="请选择状态" id="userList-check-enable-state"></v-select>
             </a-form-item>
           </a-col>
-
+          <a-col :span="4">
+            <a-button type="primary" @click="$refs.table.refresh(true)" id="userList-handSubmit" style="margin-right: 10px;">查询</a-button>
+            <a-button type="" @click="reset" id="userList-reset">重置</a-button>
+          </a-col>
         </a-row>
       </a-form>
     </div>
     <div class="table-operator">
-      <a-button type="primary" icon="plus" @click="openModal" id="userList-openModal" v-hasPermission="'B_userManage_add'" style="margin-top: 18px;">新增</a-button>
+      <a-button
+        type="primary"
+        icon="plus"
+        @click="openModal"
+        id="userList-openModal"
+        v-hasPermission="'B_userManage_add'"
+        style="margin-top: 18px;">新增</a-button>
     </div>
 
     <s-table
@@ -122,6 +123,14 @@ export default {
   },
   data () {
     return {
+      formItemLayout: {
+		  labelCol: {
+		    span: 7
+		  },
+		  wrapperCol: {
+		    span: 17
+		  }
+      },
       // 查询参数
       queryParam: {
         name: '',
@@ -319,26 +328,12 @@ export default {
   }
 }
 </script>
-<style scoped>
-	.table-page-search-wrapper .ant-form-inline .ant-form-item {
-		margin-bottom: 0;
-	}
-
-	.action-button {
-		line-height: 40px;
-		white-space: nowrap;
-		padding: 5px 10px;
-		background-color: #1890ff;
-		border-radius: 4px;
-		color: #fff;
-		margin-right: 5px;
-	}
-
-	.red-text {
-		background-color: red;
-	}
-
-	.reset-text {
-		background-color: #31b50b;
+<style lang="less">
+	.userManage-page-info{
+		.userManage-search{
+			.ant-form-inline .ant-form-item {
+				width: 100%;
+			}
+		}
 	}
 </style>

+ 73 - 2
src/views/equipmentManage/equipment/equipment.vue

@@ -13,6 +13,48 @@
               <a-input id="equipment-stationName" allowClear :maxLength="30" v-model="queryParam.stationName" placeholder="请输入网点名称" />
             </a-form-item>
           </a-col>
+          <a-col :span="6">
+            <a-form-item label="箱体类型" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
+              <a-select
+                id="equipment-deviceTypeNo"
+                allowClear
+                show-search
+                option-filter-prop="children"
+                placeholder="请选择箱体类型"
+                v-model="queryParam.deviceTypeNo">
+                <a-select-option v-for="(item,index) in deviceTypeList" :key="index" :value="item.deviceTypeNo">{{ item.name }}</a-select-option>
+              </a-select>
+            </a-form-item>
+          </a-col>
+          <a-col :span="6">
+            <a-form-item label="内置箱体数" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
+              <v-select
+                v-model="queryParam.boxNum"
+                ref="boxNum"
+                id="equipment-boxNum"
+                code="BOX_NUM"
+                placeholder="请选择内置箱体数"
+                allowClear></v-select>
+            </a-form-item>
+          </a-col>
+          <a-col :span="6">
+            <a-form-item label="设备状态" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
+              <a-select id="equipment-onlineFlag" allowClear placeholder="请选择工作状态" v-model="queryParam.onlineFlag" >
+                <a-select-option v-for="(item,index) in onlineFlagList" :key="index" :value="item.value">{{ item.name }}</a-select-option>
+              </a-select>
+            </a-form-item>
+          </a-col>
+          <a-col :span="6">
+            <a-form-item label="工作状态" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
+              <v-select
+                v-model="queryParam.state"
+                ref="state"
+                id="equipment-state"
+                code="ENABLE_FLAG"
+                placeholder="请选择设备状态"
+                allowClear></v-select>
+            </a-form-item>
+          </a-col>
           <a-col :span="6">
             <a-button class="handle-btn serach-btn" id="equipment-btn-serach" type="primary" @click="$refs.table.refresh(true)">查询</a-button>
             <a-button class="handle-btn" type="" id="equipment-btn-reset" @click="handleReset">重置</a-button>
@@ -60,6 +102,7 @@
 import { STable, VSelect } from '@/components'
 import equipmentLogModal from './logModal.vue'
 import { deviceList } from '@/api/device'
+import { deviceTypeListQuery } from '@/api/boxSetting'
 export default {
   name: 'Equipment',
   components: { STable, VSelect, equipmentLogModal },
@@ -72,7 +115,11 @@ export default {
       // 查询参数
       queryParam: {
         srcDeviceCode: '', // 设备编号
-        stationName: '' //  网点名称
+        stationName: '', //  网点名称
+        deviceTypeNo: undefined, //  箱体类型
+        boxNum: undefined, //  内置箱体数
+        onlineFlag: undefined, //  设备状态
+        state: undefined //  工作状态
       },
       // 表头
       columns: [
@@ -103,7 +150,12 @@ export default {
       },
       orderTotal: '', // 合计开单数量
       openLogModal: false, //  掉线日志 弹框
-      srcDeviceCode: null //  设备编号
+      srcDeviceCode: null, //  设备编号
+      onlineFlagList: [ //  设备状态 下拉数据
+        { name: '在线', value: '1' },
+        { name: '离线', value: '0' }
+      ],
+      deviceTypeList: [] //  箱体类型  下拉数据
     }
   },
   methods: {
@@ -111,6 +163,10 @@ export default {
     handleReset () {
       this.queryParam.srcDeviceCode = ''
       this.queryParam.stationName = ''
+      this.queryParam.deviceTypeNo = undefined
+      this.queryParam.boxNum = undefined
+      this.queryParam.onlineFlag = undefined
+      this.queryParam.state = undefined
       this.$refs.table.refresh(true)
     },
     //  查看掉线日志
@@ -121,7 +177,22 @@ export default {
     closeModal () {
       this.srcDeviceCode = null
       this.openLogModal = false
+    },
+    //  获取箱体类型下拉数据
+    getDeviceType () {
+      deviceTypeListQuery({}).then(res => {
+        if (res.status == 200) {
+          this.deviceTypeList = res.data
+        } else {
+          this.deviceTypeList = []
+        }
+      })
     }
+  },
+  beforeRouteEnter (to, from, next) {
+    next(vm => {
+      vm.getDeviceType()
+    })
   }
 }
 </script>

+ 20 - 10
src/views/equipmentManage/equipment/logModal.vue

@@ -33,11 +33,13 @@
     </a-form>
     <!-- 掉线记录 -->
     <s-table
+      class="sTable"
       ref="table"
       size="default"
       :rowKey="(record) => record.id"
       :columns="columns"
       :data="loadData"
+      :scroll="scrollVal"
       bordered></s-table>
   </a-modal>
 </template>
@@ -67,6 +69,7 @@ export default {
   },
   data () {
     return {
+      scrollVal: { y: 270 }, //  表格y轴超出距离滚动
       isShow: this.openModal, //  是否打开弹框
       form: this.$form.createForm(this),
       formItemLayout: {
@@ -141,16 +144,18 @@ export default {
       }
     },
     srcDeviceCode (newValue, oldValue) {
-      this.queryParam.beginDate = getDate.getRecentday().starttime
-      this.queryParam.endDate = getDate.getRecentday().endtime
-      this.time = [
-        moment(getDate.getRecentday().starttime, this.dateFormat),
-        moment(getDate.getRecentday().endtime, this.dateFormat)
-      ]
-      const _this = this
-      setTimeout(() => {
-        _this.$refs.table.refresh(true)
-      }, 100)
+      if (this.isShow && newValue) {
+        this.queryParam.beginDate = getDate.getRecentday().starttime
+        this.queryParam.endDate = getDate.getRecentday().endtime
+        this.time = [
+          moment(getDate.getRecentday().starttime, this.dateFormat),
+          moment(getDate.getRecentday().endtime, this.dateFormat)
+        ]
+        const _this = this
+        setTimeout(() => {
+          _this.$refs.table.refresh(true)
+        }, 100)
+      }
     }
   }
 }
@@ -161,5 +166,10 @@ export default {
     .serach-btn{
       margin-top: 4px;
     }
+    .sTable{
+      .ant-table{
+        height: 325px;
+      }
+    }
   }
 </style>

+ 15 - 12
src/views/equipmentManage/network/network.vue

@@ -2,7 +2,7 @@
   <a-card :bordered="false" class="network-table-page-search-wrapper">
     <div class="network-searchForm">
       <a-form layout="inline" v-bind="formItemLayout" @keyup.enter.native="$refs.table.refresh(true)">
-        <a-row :gutter="48">
+        <a-row :gutter="20">
           <a-col :span="6">
             <a-form-item label="创建时间" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
               <a-range-picker
@@ -14,32 +14,35 @@
                 @change="onChange" />
             </a-form-item>
           </a-col>
-          <a-col :span="6">
-            <a-form-item label="网点名称" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
-              <a-input id="network-queryWord" allowClear :maxLength="30" v-model="queryParam.queryWord" placeholder="请输入网点名称" />
-            </a-form-item>
-          </a-col>
-          <a-col :span="6">
+
+          <a-col :span="4">
             <a-form-item prop="provinceCode" label="省:">
               <a-select v-model="queryParam.provinceCode" @change="getCityList" placeholder="请选择省">
                 <a-select-option v-for="item in addrProvinceList" :value="item.id" :key="item.id + 'a'">{{ item.name }}</a-select-option>
               </a-select>
             </a-form-item>
           </a-col>
-          <a-col :span="6">
+          <a-col :span="4">
             <a-form-item prop="cityCode" label="市:">
               <a-select v-model="queryParam.cityCode" @change="getAreaList" placeholder="请选择市">
                 <a-select-option v-for="item in addrCityList" :value="item.id" :key="item.id + 'b'">{{ item.name }}</a-select-option>
               </a-select>
             </a-form-item>
           </a-col>
-          <a-col :span="6">
+          <a-col :span="4">
             <a-form-item prop="districtCode" label="区:">
               <a-select v-model="queryParam.districtCode" placeholder="请选择区/县">
                 <a-select-option v-for="item in addrDistrictList" :value="item.id" :key="item.id + 'c'">{{ item.name }}</a-select-option>
               </a-select>
             </a-form-item>
           </a-col>
+        </a-row>
+        <a-row :gutter="20">
+          <a-col :span="6">
+            <a-form-item label="网点名称" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
+              <a-input id="network-queryWord" allowClear :maxLength="30" v-model="queryParam.queryWord" placeholder="请输入网点名称" />
+            </a-form-item>
+          </a-col>
           <a-col :span="6">
             <a-button class="handle-btn serach-btn" id="network-btn-serach" type="primary" @click="$refs.table.refresh(true)">查询</a-button>
             <a-button class="handle-btn" type="" id="network-btn-reset" @click="handleReset">重置</a-button>
@@ -154,9 +157,9 @@ export default {
       networkNo: null, //  网点编号
       openDetailModal: false, //  网点信息详情
       openBindModal: false, //  绑定箱体设备
-      addrProvinceList: [],  //  省下拉
-      addrCityList: [],  //  市下拉
-      addrDistrictList: [],  //  区下拉
+      addrProvinceList: [], //  省下拉
+      addrCityList: [], //  市下拉
+      addrDistrictList: [] //  区下拉
     }
   },
   methods: {

+ 123 - 55
src/views/releaseRecord/releaseRecordList.vue

@@ -1,9 +1,9 @@
 <template>
   <a-card :bordered="false" class="shopOrder-table-page-search-wrapper">
     <div class="shopOrder-searchForm">
-      <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
-        <a-row :gutter="48">
-          <a-col :span="6">
+      <a-form layout="inline" @keyup.enter.native="refresh">
+        <a-row :gutter="20">
+          <a-col :span="5">
             <a-form-item label="投放时间:" :label-col="{ span: 7 }" :wrapper-col="{ span: 17}">
               <a-range-picker
                 style="width:100%"
@@ -14,16 +14,40 @@
                 :placeholder="['开始时间', '结束时间']" />
             </a-form-item>
           </a-col>
-          <a-col :span="6">
+          <a-col :span="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-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-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" />-
+                <a-input-number id="inputNumber" v-model="queryParam.goldNumEnd" :max="999999999" @change="onChange" />
+              </div>
+            </a-form-item>
+          </a-col>
+          <a-col :span="4">
+            <a-button class="handle-btn serach-btn" id="releaseRecordList-serach" type="primary" @click="refresh">查询</a-button>
+            <a-button class="handle-btn" type="" id="releaseRecordList-reset" @click="handleReset">重置</a-button>
+          </a-col>
+        </a-row>
+        <a-row :gutter="20">
+          <a-col :span="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="6">
+          <a-col :span="5">
             <a-form-item label="网点名称" :label-col="{ span:7 }" :wrapper-col="{ span:17}">
               <a-select
                 id="releaseRecordList-stationNo"
-                placeholder="请选择"
+                placeholder="请选择网点名称"
                 allowClear
                 v-model="queryParam.stationNo"
                 :showSearch="true"
@@ -36,22 +60,22 @@
               </a-select>
             </a-form-item>
           </a-col>
-          <a-col :span="6">
-            <a-button class="handle-btn serach-btn" id="releaseRecordList-serach" type="primary" @click="$refs.table.refresh(true)">查询</a-button>
-            <a-button class="handle-btn" type="" id="releaseRecordList-reset" @click="handleReset">重置</a-button>
-          </a-col>
-        </a-row>
-        <a-row :gutter="48">
-          <a-col :span="6">
-            <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-col :span="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="6">
-            <a-form-item label="投递方式" :label-col="{ span:7 }" :wrapper-col="{ span:17}">
-              <v-select code="ENABLE_FLAG" v-model="queryParam.loginFlag" allowClear placeholder="请选择投递方式" id="releaseRecordList-loginFlag"></v-select>
+          <a-col :span="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" />-
+                <a-input-number id="inputNumber" v-model="queryParam.rubbishWeightEnd" :max="999999999" @change="onChange" />
+              </div>
             </a-form-item>
-          </a-col> -->
+          </a-col>
+        </a-row>
+        <a-row :gutter="20">
+
         </a-row>
       </a-form>
     </div>
@@ -91,14 +115,14 @@
         <span v-if="record.rubbishType=='MET_PLA'">{{ record.rubbishWeight }}</span>
         <span v-else>0</span>
       </template>
-	  <template slot="seven" slot-scope="text, record">
-	    <span v-if="record.rubbishType=='GLASS'">{{ record.rubbishWeight }}</span>
-	    <span v-else>0</span>
-	  </template>
-	  <template slot="eight" slot-scope="text, record">
-	    <span v-if="record.rubbishType=='RECYCLING'">{{ record.rubbishWeight }}</span>
-	    <span v-else>0</span>
-	  </template>
+      <template slot="seven" slot-scope="text, record">
+        <span v-if="record.rubbishType=='GLASS'">{{ record.rubbishWeight }}</span>
+        <span v-else>0</span>
+      </template>
+      <template slot="eight" slot-scope="text, record">
+        <span v-if="record.rubbishType=='RECYCLING'">{{ record.rubbishWeight }}</span>
+        <span v-else>0</span>
+      </template>
     </s-table>
   </a-card>
 
@@ -118,19 +142,25 @@ export default {
         labelCol: { span: 4 },
         wrapperCol: { span: 16 }
       },
-	  // 将默认当天时间日期回显在时间选择框中
-	  queryOrderDate: [
-	    moment(getDate.getRecentday().starttime, this.dateFormat),
-	    moment(getDate.getRecentday().endtime, this.dateFormat)
-	  ],
-	  dateFormat: 'YYYY-MM-DD',
+      // 将默认当天时间日期回显在时间选择框中
+      queryOrderDate: [
+        moment(getDate.getRecentday().starttime, this.dateFormat),
+        moment(getDate.getRecentday().endtime, this.dateFormat)
+      ],
+      dateFormat: 'YYYY-MM-DD',
       // 查询参数
       queryParam: {
         beginDate: null, // 开始时间
         endDate: null, // 结束时间
         customerMobile: '', //  用户手机
         srcDeviceCode: '', //  设备编号
-        stationNo: undefined // 网点名称
+        stationNo: undefined, // 网点名称
+        rubbishType: '', // 投放类型
+        deliveryWay: '', // 投放方式
+        goldNumStart: null, // 兑换最小值
+        goldNumEnd: null, // 兑换最大值
+        rubbishWeightStart: null, // 投放重量最小值
+        rubbishWeightEnd: null// 投放重量最小值
       },
       optionData: [],
       orderTotal: 0,	// 总单数
@@ -142,32 +172,32 @@ export default {
         { title: '网点名称', dataIndex: 'stationName', width: 200, align: 'center' },
         { title: '设备编号', dataIndex: 'srcDeviceCode', width: 200, align: 'center' },
         { title: '用户账号', dataIndex: 'customerMobile', width: 200, align: 'center' },
-        // { title: '投递方式', dataIndex: '', width: 200, align: 'center' },
+        { title: '投放方式', dataIndex: 'deliveryWayDictValue', width: 200, align: 'center' },
         { title: '本次兑换乐豆(个)', dataIndex: 'goldNum', width: 100, align: 'center' },
         { title: '内置各箱体投放重量(g)',
-				  children: [
+          children: [
             { title: '废旧衣物', width: 100, align: 'center', scopedSlots: { customRender: 'one' } },
             { title: '废旧纸张', width: 100, align: 'center', scopedSlots: { customRender: 'two' } },
             { title: '废旧塑料', width: 100, align: 'center', scopedSlots: { customRender: 'three' } },
             { title: '废旧金属', width: 100, align: 'center', scopedSlots: { customRender: 'four' } },
             { title: '有害垃圾', width: 100, align: 'center', scopedSlots: { customRender: 'five' } },
             { title: '废旧金属/塑料', width: 100, align: 'center', scopedSlots: { customRender: 'six' } },
-			{ title: '废旧玻璃', width: 100, align: 'center', scopedSlots: { customRender: 'seven' } },
-			{ title: '可回收物', width: 100, align: 'center', scopedSlots: { customRender: 'eight' } }
-				  ]
+            { title: '废旧玻璃', width: 100, align: 'center', scopedSlots: { customRender: 'seven' } },
+            { title: '可回收物', width: 100, align: 'center', scopedSlots: { customRender: 'eight' } }
+          ]
         }
 
       ],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
-		  const searchData = Object.assign(parameter, this.queryParam)
-		  if (this.queryOrderDate && this.queryOrderDate.length) {
-		    searchData.beginDate = moment(this.queryOrderDate[0]).format('YYYY-MM-DD')
-		    searchData.endDate = moment(this.queryOrderDate[1]).format('YYYY-MM-DD')
-		  } else {
-		    searchData.beginDate = ''
-		    searchData.endDate = ''
-		  }
+        const searchData = Object.assign(parameter, this.queryParam)
+        if (this.queryOrderDate && this.queryOrderDate.length) {
+          searchData.beginDate = moment(this.queryOrderDate[0]).format('YYYY-MM-DD')
+          searchData.endDate = moment(this.queryOrderDate[1]).format('YYYY-MM-DD')
+        } else {
+          searchData.beginDate = ''
+          searchData.endDate = ''
+        }
         return getDeliveryLogList(searchData).then(res => {
           if (res.status == 200) {
             const no = (res.data.pageNo - 1) * res.data.pageSize
@@ -201,20 +231,46 @@ export default {
         this.queryParam.endDate = dateStrings[1]
       }
     },
-
     handleChange (value) {
-		  console.log(`selected ${value}`)
+      console.log(`selected ${value}`)
     },
     handleBlur () {
-		  console.log('blur')
+      console.log('blur')
     },
     handleFocus () {
-		  console.log('focus')
+      console.log('focus')
     },
     filterOption (input, option) {
-		  return (
-		    option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
-		  )
+      return (
+        option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
+      )
+    },
+    // 查询
+    refresh () {
+      // const isONull = this.queryParam.goldNumStart === null
+      // const isOEmpty = this.queryParam.goldNumStart === ''
+      // const isOZero = this.queryParam.goldNumStart === 0
+      const isTNull = this.queryParam.goldNumEnd === null
+      const isTEmpty = this.queryParam.goldNumEnd === ''
+	  const isRNull = this.queryParam.rubbishWeightEnd === null
+	  const isREmpty = this.queryParam.rubbishWeightEnd === ''
+      // const isTZero = this.queryParam.goldNumEnd === 0
+      //    //  第一个为空(可为null可为空字符)第二个不为空
+      //    //  第一个不为空第二个为空(可为null可为空字符)
+      //    //  第一个大于第二个
+	  if ((this.queryParam.goldNumStart > this.queryParam.goldNumEnd) && !(isTNull || isTEmpty)) {
+	    this.$message.error('请输入正确的查询范围!')
+	    return
+	  }
+	  if ((this.queryParam.rubbishWeightStart > this.queryParam.rubbishWeightEnd) && !(isRNull || isREmpty)) {
+	    this.$message.error('请输入正确的查询范围!')
+	    return
+	  }
+	  this.queryParam.goldNumStart = this.queryParam.goldNumStart > 999999999 ? 999999999 : this.queryParam.goldNumStart
+	  this.queryParam.goldNumEnd = this.queryParam.goldNumEnd > 999999999 ? 999999999 : this.queryParam.goldNumEnd
+	  this.queryParam.rubbishWeightStart = this.queryParam.rubbishWeightStart > 999999999 ? 999999999 : this.queryParam.rubbishWeightStart
+	  this.queryParam.rubbishWeightEnd = this.queryParam.rubbishWeightEnd > 999999999 ? 999999999 : this.queryParam.rubbishWeightEnd
+	  this.$refs.table.refresh(true)
     },
     // 获取合作商数据
     getStationList () {
@@ -233,7 +289,13 @@ export default {
         beginDate: this.queryParam.beginDate,
         endDate: this.queryParam.endDate,
         srcDeviceCode: this.queryParam.srcDeviceCode, //  设备编号
-        stationNo: this.queryParam.stationNo // 网点名称
+        stationNo: this.queryParam.stationNo, // 网点名称
+        goldNumStart: this.queryParam.goldNumStart, // 兑换最小值
+        goldNumEnd: this.queryParam.goldNumEnd, // 兑换最大值
+        rubbishWeightStart: this.queryParam.rubbishWeightStart, // 投放重量最小值
+        rubbishWeightEnd: this.queryParam.rubbishWeightEnd,
+        rubbishType: this.queryParam.rubbishType, // 投放类型
+        deliveryWay: this.queryParam.deliveryWay // 投放方式
       }
       if (this.queryOrderDate && this.queryOrderDate.length) {
         params.beginDate = moment(this.queryOrderDate[0]).format('YYYY-MM-DD')
@@ -264,6 +326,12 @@ export default {
       this.queryParam.customerMobile = ''
       this.queryParam.srcDeviceCode = ''
       this.queryParam.stationNo = undefined
+	  this.queryParam.rubbishType = '' // 投放类型
+	  this.queryParam.goldNumStart = '' // 兑换最小值
+	  this.queryParam.goldNumEnd = '' // 兑换最大值
+      this.queryParam.rubbishWeightStart = ''// 投放重量最小值
+	  this.queryParam.rubbishWeightEnd = '' // 投放重量最大值
+	  this.queryParam.deliveryWay = '' // 投放方式
       this.$refs.table.refresh(true)
     }
   }

+ 12 - 10
src/views/shop/goodsList.vue

@@ -2,27 +2,20 @@
   <a-card :bordered="false" class="goodsList-table-page-wrapper">
     <div class="goodsList-searchForm">
       <a-form layout="inline" ref="form" v-bind="formItemLayout" @keyup.enter.native="$refs.table.refresh(true)">
-        <a-row :gutter="48">
+        <a-row :gutter="20">
           <a-col :span="6">
             <a-form-item label="商品名称" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
               <a-input id="goodsList-name" v-model="queryParam.name" allowClear :maxLength="30" placeholder="请输入商品名称" />
             </a-form-item>
           </a-col>
-          <a-col :span="6">
+          <a-col :span="4">
             <a-form-item label="商品分类" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
               <a-select id="goodsList-goodsTypeNo" allowClear placeholder="请选择商品分类" v-model="queryParam.goodsTypeNo">
                 <a-select-option v-for="(item,index) in goodsTypeList" :key="index" :value="item.goodsTypeNo">{{ item.name }}</a-select-option>
               </a-select>
             </a-form-item>
           </a-col>
-          <a-col :span="6">
-            <a-form-item label="供货商" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
-              <a-select id="goodsList-officialPartnerNo" allowClear placeholder="请选择供货商" v-model="queryParam.officialPartnerNo">
-                <a-select-option v-for="(item,index) in partnerList" :key="index" :value="item.officialPartnerNo">{{ item.name }}</a-select-option>
-              </a-select>
-            </a-form-item>
-          </a-col>
-          <a-col :span="6">
+          <a-col :span="4">
             <a-form-item label="商品状态" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
               <v-select
                 v-model="queryParam.state"
@@ -33,6 +26,15 @@
                 allowClear></v-select>
             </a-form-item>
           </a-col>
+        </a-row>
+        <a-row :gutter="20">
+          <a-col :span="6">
+            <a-form-item label="供货商" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
+              <a-select id="goodsList-officialPartnerNo" allowClear placeholder="请选择供货商" v-model="queryParam.officialPartnerNo">
+                <a-select-option v-for="(item,index) in partnerList" :key="index" :value="item.officialPartnerNo">{{ item.name }}</a-select-option>
+              </a-select>
+            </a-form-item>
+          </a-col>
           <a-col :span="6">
             <a-button class="handle-btn serach-btn" id="goodsList-btn-serach" type="primary" @click="$refs.table.refresh(true)">查询</a-button>
             <a-button class="handle-btn" type="" id="goodsList-btn-reset" @click="handleReset">重置</a-button>

+ 5 - 0
src/views/shop/orderDetail.vue

@@ -20,6 +20,8 @@
           <p class="item-label">订单总额:</p>
           <p class="item-main">{{ orderDetail.payGold }}乐豆</p>
         </a-col>
+      </a-row>
+      <a-row :gutter="48" v-if="orderDetail">
         <a-col :span="8" class="item-cont">
           <p class="item-label">用户手机:</p>
           <p class="item-main">{{ orderDetail.customerMobile }}</p>
@@ -32,6 +34,8 @@
           <p class="item-label">收货人手机:</p>
           <p class="item-main">{{ orderDetail.receiverPhone }}</p>
         </a-col>
+      </a-row>
+      <a-row :gutter="48" v-if="orderDetail">
         <a-col :span="16" class="item-cont">
           <p class="item-label">收货地址:</p>
           <p class="item-main">{{ orderDetail.receiveAddress }}</p>
@@ -167,6 +171,7 @@ export default {
           display: inline-block;
           flex-grow: 1;
           margin: 0;
+          word-break: break-all;
         }
       }
     }

+ 17 - 16
src/views/shop/shopOrder.vue

@@ -2,7 +2,7 @@
   <a-card :bordered="false" class="shopOrder-table-page-search-wrapper">
     <div class="shopOrder-searchForm">
       <a-form layout="inline" v-bind="formItemLayout" @keyup.enter.native="$refs.table.refresh(true)">
-        <a-row :gutter="48">
+        <a-row :gutter="20">
           <a-col :span="6">
             <a-form-item label="下单时间" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
               <a-range-picker
@@ -19,12 +19,7 @@
               <a-input id="shopOrder-customerMobile" allowClear :maxLength="11" v-model="queryParam.customerMobile" placeholder="请输入用户手机" />
             </a-form-item>
           </a-col>
-          <a-col :span="6">
-            <a-form-item label="订单编号" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
-              <a-input id="shopOrder-orderSn" allowClear :maxLength="30" v-model="queryParam.orderSn" placeholder="请输入订单编号" />
-            </a-form-item>
-          </a-col>
-          <a-col :span="6">
+          <a-col :span="4">
             <a-form-item label="订单状态" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
               <v-select
                 v-model="queryParam.orderState"
@@ -35,22 +30,27 @@
                 allowClear></v-select>
             </a-form-item>
           </a-col>
+
+        </a-row>
+        <a-row :gutter="20">
+          <a-col :span="6">
+            <a-form-item label="订单编号" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
+              <a-input id="shopOrder-orderSn" allowClear :maxLength="30" v-model="queryParam.orderSn" placeholder="请输入订单编号" />
+            </a-form-item>
+          </a-col>
           <a-col :span="6">
             <a-button class="handle-btn serach-btn" id="shopOrder-btn-serach" type="primary" @click="$refs.table.refresh(true)">查询</a-button>
+            <a-button
+              v-if="$hasPermissions('B_orderManage_export')"
+              class="export-btn"
+              id="shopOrder-btn-export"
+              :loading="loading"
+              @click="handleExport">导出</a-button>
             <a-button class="handle-btn" type="" id="shopOrder-btn-reset" @click="handleReset">重置</a-button>
           </a-col>
         </a-row>
       </a-form>
     </div>
-    <div class="table-operator">
-      <a-button
-        v-if="$hasPermissions('B_orderManage_export')"
-        class="export-btn"
-        id="shopOrder-btn-export"
-        type=""
-        :loading="loading"
-        @click="handleExport" style="margin-top: 18px;">导出</a-button>
-    </div>
     <s-table
       ref="table"
       size="default"
@@ -224,6 +224,7 @@ export default {
       background-color: #ff9900;
       border-color: #ff9900;
       color: #fff;
+      margin-right: 10px;
     }
     .export-btn.ant-btn:focus:not(.ant-btn-primary):not(.ant-btn-danger), .export-btn.ant-btn:hover:not(.ant-btn-primary):not(.ant-btn-danger){
       color: #fff;

+ 0 - 2
src/views/shopSetting/addGoodsClassModal.vue

@@ -130,7 +130,6 @@ export default {
           const formData = Object.assign({}, this.itemData, this.formData, values.formData)
 		  formData.id = _this.itemId
           saveGoodsClass(formData).then(res => {
-            console.log(res, 'rrrrrrrrr')
             if (res.status == 200) {
               _this.$message.success(res.message)
 			  _this.$emit('refresh')
@@ -156,7 +155,6 @@ export default {
 	  }
     },
     itemId (newValue, oldValue) {
-      console.log(newValue, '----------id')
       if (newValue && this.isShow) {
         this.titleText = '编辑'
         this.getPageInfo(newValue)

+ 0 - 1
src/views/shopSetting/addSupplierModal.vue

@@ -131,7 +131,6 @@ export default {
           const formData = Object.assign({}, this.itemData, this.formData, values.formData)
           formData.id = _this.itemId
           saveSupplier(formData).then(res => {
-            console.log(res, 'rrrrrrrrr')
             if (res.status == 200) {
               _this.$message.success(res.message)
               _this.$emit('refresh')

+ 18 - 20
src/views/shopSetting/goodsClass.vue

@@ -1,11 +1,11 @@
 <template>
-  <a-card :bordered="false">
+  <a-card :bordered="false" class="goodsClass-page-info">
     <!-- 搜索框 -->
-    <div class="table-page-search-wrapper" style="margin-bottom: 15px;">
+    <div class="goodsClass-search">
       <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
-        <a-row :gutter="48">
+        <a-row :gutter="20">
           <a-col :md="6" :sm="24">
-            <a-form-item label="商品分类名称" :label-col="{ span: 3 }" :wrapper-col="{ span: 12 }">
+            <a-form-item label="商品分类名称" :label-col="{ span:8 }" :wrapper-col="{ span: 16 }">
               <a-input allowClear v-model="searchData.name" :maxLength="30" placeholder="请输入" id="goodsClass-name" />
             </a-form-item>
           </a-col>
@@ -35,13 +35,13 @@
       bordered>
       <span slot="action" slot-scope="text, record">
         <a-icon
-          v-if="$hasPermissions('B_goodsClass_edit') && record.state==0"
+          v-hasPermission="'B_goodsClass_edit'"
           type="edit"
           id="goodsClass-handleEdit"
           title="编辑"
           class="actionBtn icon-blues"
           @click="handleEdit(record)" />
-        <span v-else>--</span>
+        <span v-if="!$hasPermissions('B_goodsClass_edit')">--</span>
       </span>
       <span slot="state" slot-scope="text, record">
         <a-switch
@@ -92,14 +92,6 @@ export default {
 	  itemData: {}, // 编辑行数据
       formLayout: 'horizontal',
       form: this.$form.createForm(this),
-      formItemLayout: {
-        labelCol: {
-          span: 6
-        },
-        wrapperCol: {
-          span: 14
-        }
-      },
       // 表头
       columns: [{
         title: '序号',
@@ -242,12 +234,18 @@ export default {
 }
 </script>
 
-<style>
-	.w-e-toolbar {
-		flex-wrap: wrap;
-	}
+<style lang="less">
+	.goodsClass-page-info{
+		.goodsClass-search{
+			margin-bottom: 15px;
+		}
+		.w-e-toolbar {
+			flex-wrap: wrap;
+		}
 
-	.addBtn {
-		margin-bottom: 20px;
+		.addBtn {
+			margin-bottom: 20px;
+		}
 	}
+
 </style>

+ 14 - 8
src/views/shopSetting/supplier.vue

@@ -1,11 +1,11 @@
 <template>
-  <a-card :bordered="false">
+  <a-card :bordered="false" class="supplier-page-info">
     <!-- 搜索框 -->
-    <div class="table-page-search-wrapper" style="margin-bottom: 15px;">
+    <div class="supplier-search">
       <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
-        <a-row :gutter="48" >
+        <a-row :gutter="20" >
           <a-col :md="6" :sm="24">
-            <a-form-item label="供应商名称" :label-col="{ span: 3 }" :wrapper-col="{ span: 12 }"><a-input allowClear v-model.trim="searchData.name" :maxLength="30" placeholder="请输入" id="supplier-name"/></a-form-item>
+            <a-form-item label="供应商名称" :label-col="{ span: 8}" :wrapper-col="{ span: 16 }"><a-input allowClear v-model.trim="searchData.name" :maxLength="30" placeholder="请输入" id="supplier-name"/></a-form-item>
           </a-col>
           <a-col :md="6" :sm="24">
             <a-button style="margin-right: 10px;" type="primary" @click="$refs.table.refresh(true)" id="supplier-refreshTable">查询</a-button>
@@ -224,8 +224,14 @@ export default {
 }
 </script>
 
-<style scoped>
-.addBtn {
-  margin-bottom: 20px;
-}
+<style lang="less">
+	.supplier-page-info{
+		.supplier-search{
+			margin-bottom: 15px;
+		}
+		.addBtn {
+		  margin-bottom: 20px;
+		}
+	}
+
 </style>

+ 68 - 29
src/views/userInfo/LdDetails.vue

@@ -1,7 +1,12 @@
 <template>
-  <a-card :bordered="false" class="shopOrder-table-page-search-wrapper">
-    <div class="shopOrder-searchForm">
-      <a-form layout="inline" v-bind="formItemLayout" @keyup.enter.native="$refs.table.refresh(true)">
+  <a-card :bordered="false" class="LdDetails-page-info">
+    <div class="page-header">
+      <a @click="goBack">返回列表</a>
+      <span>手机号码:<span class="page-header-info">{{ this.page.mobile }}</span></span>
+      <span>乐豆余额:<span class="page-header-info">{{ this.page.currentGold }}</span></span>
+    </div>
+    <div class="LdDetails-searchForm">
+      <a-form layout="inline" v-bind="formItemLayout" @keyup.enter.native="refresh">
         <a-row :gutter="48">
           <a-col :span="6">
             <a-form-item label="创建时间" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
@@ -36,7 +41,7 @@
             </a-form-item>
           </a-col>
           <a-col :span="6">
-            <a-button class="handle-btn serach-btn" id="LdDetails-btn-serach" type="primary" @click="$refs.table.refresh(true)">查询</a-button>
+            <a-button class="handle-btn serach-btn" id="LdDetails-btn-serach" type="primary" @click="refresh">查询</a-button>
             <a-button class="handle-btn" type="" id="LdDetails-btn-reset" @click="handleReset">重置</a-button>
           </a-col>
         </a-row>
@@ -55,7 +60,7 @@
 
 <script>
 import { STable, VSelect } from '@/components'
-import { customerGoldLogDetail } from '@/api/userInfo.js'
+import { customerGoldLogDetail, customerDetails } from '@/api/userInfo.js'
 import moment from 'moment'
 export default {
   name: 'ShopOrder',
@@ -74,6 +79,12 @@ export default {
         changeType: '', // 类型
         operateType: '' // 原因
       },
+	  info: '',
+	  mobile: '', // 手机号
+	  userId: '', // 用户ID
+	  currentGold: '', // 乐豆余额
+	  customerNo: '', // 用户编号
+	  page: {}, // 用户信息
       loading: false, // 导出loading
       // 表头
       columns: [
@@ -92,9 +103,7 @@ export default {
       ],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
-		  console.log(this.customerNo)
 		  const searchData = Object.assign(parameter, this.queryParam)
-		  console.log(this.queryOrderDate, 'this.queryOrderDate')
 		  if (this.queryOrderDate && this.queryOrderDate.length) {
 		    searchData.beginDate = moment(this.queryOrderDate[0]).format('YYYY-MM-DD')
 		    searchData.endDate = moment(this.queryOrderDate[1]).format('YYYY-MM-DD')
@@ -102,7 +111,7 @@ export default {
 		    searchData.beginDate = ''
 		    searchData.endDate = ''
 		  }
-		  return customerGoldLogDetail(Object.assign(parameter, { customerNo: this.$route.params.id }, searchData)).then(res => {
+		  return customerGoldLogDetail(Object.assign(parameter, { customerNo: this.$route.query.customerNo }, 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++) {
@@ -128,25 +137,73 @@ export default {
         this.queryParam.endDate = dateStrings[1]
       }
     },
+    // 查详情
+    getPageInfo () {
+      customerDetails({
+        id: this.userId
+      }).then(res => {
+        if (res.status == 200) {
+          this.page = res.data
+        }
+      })
+    },
+    // 查询
+    refresh () {
+      this.getPageInfo()
+      this.$refs.table.refresh(true)
+    },
     // 重置
     handleReset () {
       this.queryOrderDate = undefined
       this.queryParam.changeType = ''
       this.queryParam.operateType = ''
       this.$refs.table.refresh(true)
+    },
+    // 返回列表
+    goBack () {
+      this.$router.push({
+        path: `/userInfo/userManageList/list`
+      })
     }
+  },
+  beforeRouteEnter (to, from, next) {
+    next(vm => {
+      const userInfo = vm.$route.query
+	  if (userInfo) {
+		  vm.userId = userInfo.id
+		  console.log(vm.userId)
+	  	// customerDetails({
+	  	// 	id: userInfo.id
+	  	// }).then(res => {
+	  	// 	if (res.status == 200) {
+	  	// 		vm.page = res.data
+	  	// 	}
+	  	// })
+	  }
+	  vm.getPageInfo(vm.userId)
+    })
   }
 }
 </script>
 <style lang="less" scoped>
-  .shopOrder-table-page-search-wrapper{
-    .shopOrder-searchForm{
+  .LdDetails-page-info{
+	  .page-header{
+		  margin-bottom: 15px;
+		  span{
+			  margin-left: 20px;
+		  }
+		  .page-header-info{
+			   margin-left:0;
+			 font-weight: bold;
+		  }
+	  }
+    .LdDetails-searchForm{
       .ant-form-inline .ant-form-item{
         width: 100%;
       }
       // 搜索框的下间距
       .ant-form-item {
-      	margin-bottom: 10px;
+      	margin-bottom: 15px;
       }
       .handle-btn{
         margin-top: 4px;
@@ -155,23 +212,5 @@ export default {
         margin-right: 10px;
       }
     }
-    .export-btn{
-      background-color: #ff9900;
-      border-color: #ff9900;
-      color: #fff;
-    }
-    .export-btn.ant-btn:focus:not(.ant-btn-primary):not(.ant-btn-danger), .export-btn.ant-btn:hover:not(.ant-btn-primary):not(.ant-btn-danger){
-      color: #fff;
-      border-color: #ff9900;
-    }
-    .blue {
-    	color: #1890FF;
-    }
-    .green {
-    	color: #16b50e;
-    }
-    .red {
-    	color: red;
-    }
   }
 </style>

+ 17 - 15
src/views/userInfo/editLdNumModal.vue

@@ -6,7 +6,8 @@
       @cancle="isShow=false"
       :footer="null"
       :centered="true"
-      title="修改乐豆金额">
+      title="修改乐豆金额"
+      class="ld-num-modal">
       <a-form id="components-form-demo-validate-other" ref="form" :form="form" @submit="handleSubmit">
         <a-form-item label="乐豆变动类型" :label-col="{ span: 7 }" :wrapper-col="{ span: 17 }">
           <v-select
@@ -113,10 +114,10 @@ export default {
             console.log(res, 'rrrrrrrrr')
             if (res.status == 200) {
               _this.$message.success(res.message)
-              // _this.$emit('refresh')
-			  _this.$router.push({ path: `/userInfo/userManageList/list` })
+              // _this.$router.push({ path: `/userInfo/userManageList/list` })
               setTimeout(function () {
                 _this.isShow = false
+				 location.reload()
               }, 300)
             }
           })
@@ -141,17 +142,18 @@ export default {
 </script>
 
 <style lang="less">
-	.input-number{
-		display: flex;
-		width: 100%;
+	.ld-num-modal{
+		.input-number{
+			display: flex;
+			width: 100%;
+		}
+		//  input-number 框宽度
+		.inpNumber{
+		  width: 100%;
+		}
+		.inpNumber-unit{  //  有单位的
+		  width: 88%;
+		  margin-right: 8px;
+		}
 	}
-	//  input-number 框宽度
-	.inpNumber{
-	  width: 100%;
-	}
-	.inpNumber-unit{  //  有单位的
-	  width: 88%;
-	  margin-right: 8px;
-	}
-
 </style>

+ 2 - 2
src/views/userInfo/editUserPhoneModal.vue

@@ -64,10 +64,10 @@ export default {
             console.log(res, 'rrrrrrrrr')
             if (res.status == 200) {
               _this.$message.success(res.message)
-              // _this.$emit('refresh')
-   		  _this.$router.push({ path: `/userInfo/userManageList/list` })
+              // _this.$router.push({ path: `/userInfo/userManageList/list` })
               setTimeout(function () {
                 _this.isShow = false
+                location.reload()
               }, 300)
             }
           })

+ 110 - 0
src/views/userInfo/editUseridentityModal.vue

@@ -0,0 +1,110 @@
+<template>
+  <div>
+    <!-- 弹窗 -->
+    <a-modal
+      v-model="isShow"
+      @cancle="isShow=false"
+      :footer="null"
+      :centered="true"
+      title="修改用户身份">
+      <a-form id="components-form-demo-validate-other" ref="form" :form="form" @submit="handleSubmit">
+        <a-form-item label="用户身份" :label-col="{ span: 7 }" :wrapper-col="{ span: 12 }">
+          <v-select
+            code="CUSTOMER_ROLE"
+            allowClear
+            placeholder="请选择用户身份"
+            id="releaseRecordList-customerRole"
+            v-decorator="[
+              'formData.customerRole',
+              { initialValue: formData.customerRole, rules: [{ required: true, message: '请选择用户身份!' }] }
+            ]"></v-select>
+        </a-form-item>
+        <a-form-item :wrapper-col="{ span: 12, offset: 6}" style="text-align: center;">
+          <a-button type="primary" html-type="submit" id="editUserPhoneModal-submit" style="margin-right: 15px">保存</a-button>
+          <a-button @click="isShow=false" style="margin-left: 15px" id="editUserPhoneModal-close">取消</a-button>
+        </a-form-item>
+      </a-form>
+    </a-modal>
+  </div>
+</template>
+
+<script>
+import { updateRole } from '@/api/userInfo.js'
+import { VSelect } from '@/components'
+export default {
+  name: 'EditUseridentityModal',
+  components: { VSelect },
+  props: {
+    openUseridentityMoadl: {
+      type: Boolean,
+      default: false
+    },
+    userId: {
+      type: String,
+      default: ''
+    },
+    customerRoleDictValue: {
+      type: Object,
+      default: function () {
+        return {}
+      }
+    }
+  },
+  data () {
+    return {
+      isShow: this.openUseridentityMoadl,
+      form: this.$form.createForm(this, { name: 'editUseridentityModal' }),
+      formData: {
+        customerRole: '' // 用户身份
+      }
+    }
+  },
+  methods: {
+    // 点击保存;
+    handleSubmit (e) {
+      e.preventDefault()
+      const _this = this
+      this.form.validateFields((err, values) => {
+        if (!err) {
+          const formData = Object.assign({}, { id: this.userId }, this.formData, values.formData)
+          updateRole(formData).then(res => {
+            console.log(res, 'rrrrrrrrr')
+            if (res.status == 200) {
+              _this.$message.success(res.message)
+              // _this.$router.push({ path: `/userInfo/userManageList/list` })
+              setTimeout(function () {
+                _this.isShow = false
+                location.reload()
+              }, 300)
+            }
+          })
+        }
+      })
+    }
+  },
+  watch: {
+    openUseridentityMoadl (newValue, oldValue) {
+      this.isShow = newValue
+    },
+    isShow (newValue, oldValue) {
+      console.log(this.userId)
+	  if (newValue) {
+	      this.formData = Object.assign({}, this.customerRoleDictValue)
+	      console.log(this.formData, 'this.formData')
+	  } else {
+        this.$emit('close')
+	  }
+      //    if (!newValue) {
+      //      this.$emit('close')
+      //    } else {
+      // 	  this.form.resetFields()
+	  // this.formData = Object.assign({}, this.customerRoleDictValue)
+      //    }
+    }
+
+  }
+}
+</script>
+
+<style>
+</style>

+ 149 - 123
src/views/userInfo/userDetails.vue

@@ -1,132 +1,158 @@
 <template>
-	<a-card :bordered="false" class="orderDetail-goods-info">
-		<a-row :gutter="48">
-			<a-col :span="24" class="item-cont item-img">
-				<p class="item-label" style="line-height: 37px;">头像:</p>
-				<img v-if="page.headImageUrl" :src="page.headImageUrl" alt="" class="img">
-				<p class="item-main" style="line-height: 37px;" v-else>--</p>
-			</a-col>
-			<a-col :span="24" class="item-cont">
-				<p class="item-label">手机号码:</p>
-				<p class="item-main">{{ page.mobile ? page.mobile : '--' }}</p>
-				<a-icon type="edit" title="修改手机号码" style="font-size: 20px;color: #1890FF;padding: 0 10px;" @click="editPhone(page)"
-				 v-hasPermission="'B_user_userdetails_editPhone'" />
-				<!-- <a style="margin-left: 100px; color: #2D8CF0;" @click="editPhone">修改手机号码</a> -->
-			</a-col>
-			<a-col :span="24" class="item-cont">
-				<p class="item-label">收货地址:</p>
-				<p class="item-main">{{ adderss  ? adderss : '--' }}</p>
-			</a-col>
-			<a-col :span="24" class="item-cont">
-				<p class="item-label">乐豆余额:</p>
-				<p class="item-main">{{ page.currentGold ? page.currentGold : 0 }}</p>
-				<a-icon type="edit" title="修改乐豆余额" style="font-size: 20px;color: #1890FF;padding: 0 10px;" @click="editLd(page)"
-				 v-hasPermission="'B_user_userDetails_editLdNum'" />
-				<!-- <a style="margin-left: 145px; color: #2D8CF0;" @click="editLd(page)">修改乐豆余额</a> -->
-			</a-col>
-			<a-col :span="24" class="item-cont">
-				<p class="item-label">累计乐豆:</p>
-				<p class="item-main">{{ page.totalGold ? page.totalGold :0 }}</p>
-			</a-col>
-			<a-col :span="24" class="item-cont">
-				<p class="item-label">账户状态:</p>
-				<p class="item-main">{{ page.state ==0 ? '禁用' : '启用' }}</p>
-			</a-col>
-			<a-col :span="24" class="item-cont">
-				<p class="item-label">注册时间:</p>
-				<p class="item-main">{{ page.registerTime ? page.registerTime : '--' }}</p>
-			</a-col>
-			<a-col :span="24" class="item-cont">
-				<p class="item-label">最后登录时间:</p>
-				<p class="item-main">{{ page.lastLoginTime ? page.lastLoginTime : '--' }}</p>
-			</a-col>
-			<a-col :span="24" class="item-cont">
-				<p class="item-label">最后投递时间:</p>
-				<p class="item-main">{{ page.lastDeliveryTime ? page.lastDeliveryTime : '--' }}</p>
-			</a-col>
-		</a-row>
-		<div class="page-header" style="margin-top: 50px; color: #2D8CF0; text-align: center;">
-			<a @click="goBack">返回列表</a>
-		</div>
-		<!-- 修改用户手机号码弹窗 -->
-		<edit-user-phone-modal :userId="userId" :openUserPhoneMoadl="openUserPhoneMoadl" @close="openUserPhoneMoadl=false"></edit-user-phone-modal>
-		<!-- 修改乐豆余额弹窗 -->
-		<edit-ldNum-modal :customerNo="customerNo" :openLdNumModal="openLdNumModal" @close="openLdNumModal=false"></edit-ldNum-modal>
-	</a-card>
+  <a-card :bordered="false" class="userDetails-page-info">
+    <a-row :gutter="48">
+      <a-col :span="24" class="item-cont">
+        <p class="item-label" style="line-height: 37px;">头像:</p>
+        <img v-if="page.headImageUrl" :src="page.headImageUrl" alt="" class="img">
+        <p class="item-main" style="line-height: 37px;" v-else>--</p>
+      </a-col>
+      <a-col :span="24" class="item-cont">
+        <p class="item-label">手机号码:</p>
+        <p class="item-main">{{ page.mobile ? page.mobile : '--' }}</p>
+        <a-icon
+          type="edit"
+          title="修改手机号码"
+          style="font-size: 20px;color: #1890FF;padding: 0 10px;"
+          @click="editPhone(page)"
+          v-hasPermission="'B_user_userdetails_editPhone'" />
+      </a-col>
+      <a-col :span="24" class="item-cont">
+        <p class="item-label">用户身份:</p>
+        <p class="item-main">{{ page.customerRoleDictValue ? page.customerRoleDictValue : '--' }}</p>
+        <a-icon
+          type="edit"
+          title="修改用户身份"
+          style="font-size: 20px;color: #1890FF;padding: 0 10px;"
+          @click="editUseridentity(page)"
+          v-hasPermission="'B_user_userDetails_editUser'" />
+      </a-col>
+      <a-col :span="24" class="item-cont">
+        <p class="item-label">收货地址:</p>
+        <p class="item-main">{{ adderss ? adderss : '--' }}</p>
+      </a-col>
+      <a-col :span="24" class="item-cont">
+        <p class="item-label">乐豆余额:</p>
+        <p class="item-main">{{ page.currentGold ? page.currentGold : 0 }}</p>
+        <a-icon
+          type="edit"
+          title="修改乐豆余额"
+          style="font-size: 20px;color: #1890FF;padding: 0 10px;"
+          @click="editLd(page)"
+          v-hasPermission="'B_user_userDetails_editLdNum'" />
+      </a-col>
+      <a-col :span="24" class="item-cont">
+        <p class="item-label">累计乐豆:</p>
+        <p class="item-main">{{ page.totalGold ? page.totalGold :0 }}</p>
+      </a-col>
+      <a-col :span="24" class="item-cont">
+        <p class="item-label">账户状态:</p>
+        <p class="item-main">{{ page.state ==0 ? '禁用' : '启用' }}</p>
+      </a-col>
+      <a-col :span="24" class="item-cont">
+        <p class="item-label">注册时间:</p>
+        <p class="item-main">{{ page.registerTime ? page.registerTime : '--' }}</p>
+      </a-col>
+      <a-col :span="24" class="item-cont">
+        <p class="item-label">最后登录时间:</p>
+        <p class="item-main">{{ page.lastLoginTime ? page.lastLoginTime : '--' }}</p>
+      </a-col>
+      <a-col :span="24" class="item-cont">
+        <p class="item-label">最后投递时间:</p>
+        <p class="item-main">{{ page.lastDeliveryTime ? page.lastDeliveryTime : '--' }}</p>
+      </a-col>
+    </a-row>
+    <div class="page-header" style="margin-top: 50px; color: #2D8CF0; text-align: center;">
+      <a @click="goBack">返回列表</a>
+    </div>
+    <!-- 修改用户手机号码弹窗 -->
+    <edit-user-phone-modal :userId="userId" :openUserPhoneMoadl="openUserPhoneMoadl" @close="openUserPhoneMoadl=false"></edit-user-phone-modal>
+    <!-- 修改乐豆余额弹窗 -->
+    <edit-ldNum-modal :customerNo="customerNo" :openLdNumModal="openLdNumModal" @close="openLdNumModal=false"></edit-ldNum-modal>
+    <!-- 修改用户身份 -->
+    <edit-useridentity-modal :userId="userId" :customerRoleDictValue="customerRoleDictValue" :openUseridentityMoadl="openUseridentityMoadl" @close="openUseridentityMoadl=false"></edit-useridentity-modal>
+  </a-card>
 </template>
 
 <script>
-	import editUserPhoneModal from './editUserPhoneModal.vue'
-	import editLdNumModal from './editLdNumModal.vue'
-	import {
-		customerDetails
-	} from '@/api/userInfo.js'
-	export default {
-		name: 'UserDetails',
-		components: {
-			editUserPhoneModal,
-			editLdNumModal
-		},
-		data() {
-			return {
-				userId: '', // 用户id
-				openUserPhoneMoadl: false, // 默认关闭手机号码弹窗
-				customerNo: '', // 用户编号
-				openLdNumModal: false, // 默认关闭乐豆余额弹窗
-				page: {}, // 详情数据
-				adderss: ""
-			}
-		},
-		methods: {
-			// 详情
-			editPhone(page) {
-				this.userId = this.page.id
-				this.openUserPhoneMoadl = true
-				console.log(this.userId, '-----------修改手机号码')
-			},
-			editLd(page) {
-				this.customerNo = this.page.customerNo
-				console.log(this.customerNo, '------用户编号')
-				this.openLdNumModal = true
-				console.log('-----修改乐豆余额')
-			},
-			// 返回列表
-			goBack() {
-				this.$router.push({
-					path: `/userInfo/userManageList/list`
-				})
-			}
-		},
-		beforeRouteEnter(to, from, next) {
-			next(vm => {
-				console.log(111)
-				const params = vm.$route.params
-				console.log(params)
-				if (params.id) {
-					customerDetails({
-						id: params.id
-					}).then(res => {
-						if (res.status == 200) {
-							vm.page = res.data
-							if (vm.page.receiveAddressList) {
-								vm.adderss = vm.page.receiveAddressList[0].receiveAreasName.replace(/\,/g, '-') + '-' + vm.page.receiveAddressList[
-									0].receiveAddress
-							}
-						}
-					})
-				}
-			})
-		}
-	}
+import editUserPhoneModal from './editUserPhoneModal.vue'
+import editLdNumModal from './editLdNumModal.vue'
+import editUseridentityModal from './editUseridentityModal.vue'
+import {
+  customerDetails
+} from '@/api/userInfo.js'
+export default {
+  name: 'UserDetails',
+  components: {
+    editUserPhoneModal,
+    editLdNumModal,
+    editUseridentityModal
+  },
+  data () {
+    return {
+      userId: '', // 用户id
+      openUserPhoneMoadl: false, // 默认关闭手机号码弹窗
+      customerNo: '', // 用户编号
+      openLdNumModal: false, // 默认关闭乐豆余额弹窗
+	  customerRoleDictValue: {}, // 用户身份
+      openUseridentityMoadl: false, // 默认关闭用户身份弹窗
+      page: {}, // 详情数据
+      adderss: ''
+    }
+  },
+  methods: {
+    // 修改手机号码
+    editPhone (page) {
+      this.userId = this.page.id
+      this.openUserPhoneMoadl = true
+    },
+    // 修改乐豆余额
+    editLd (page) {
+      this.customerNo = this.page.customerNo
+      this.openLdNumModal = true
+    },
+    // 修改用户身份
+    editUseridentity (page) {
+      this.userId = this.page.id
+	  this.customerRoleDictValue = this.page
+      this.openUseridentityMoadl = true
+    },
+    // 返回列表
+    goBack () {
+      this.$router.push({
+        path: `/userInfo/userManageList/list`
+      })
+    }
+  },
+  beforeRouteEnter (to, from, next) {
+    next(vm => {
+      const params = vm.$route.params
+      if (params.id) {
+        customerDetails({
+          id: params.id
+        }).then(res => {
+          if (res.status == 200) {
+            vm.page = res.data
+            if (vm.page.receiveAddressList) {
+              vm.adderss = vm.page.receiveAddressList[0].receiveAreasName.replace(/\,/g, '-') + '-' + vm.page.receiveAddressList[
+                0].receiveAddress
+            }
+          }
+        })
+      }
+    })
+  }
+}
 </script>
 <style lang="less">
-	.item-cont {
-		display: flex;
-		margin: 10px 10px 10px 50px;
+	.userDetails-page-info{
+		.item-cont {
+			display: flex;
+			margin: 10px 10px 10px 50px;
+		}
+		.img {
+			width: 50px;
+			border-radius: 50%;
+		}
 	}
 
-	.img {
-		width: 50px;
-		border-radius: 50%;
-	}
 </style>

+ 48 - 38
src/views/userInfo/userManageList.vue

@@ -1,14 +1,14 @@
 <template>
-  <a-card :bordered="false" class="shopOrder-table-page-search-wrapper">
-    <div class="shopOrder-searchForm">
+  <a-card :bordered="false" class="userManageList-table-page-search-wrapper">
+    <div class="userManageList-searchForm">
       <a-form layout="inline" v-bind="formItemLayout" @keyup.enter.native="refresh">
-        <a-row :gutter="48">
-          <a-col :span="6">
+        <a-row :gutter="20">
+          <a-col :span="5">
             <a-form-item label="用户手机" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
               <a-input id="releaseRecordList-mobile" allowClear :maxLength="11" v-model="queryParam.mobile" placeholder="请输入用户手机" />
             </a-form-item>
           </a-col>
-          <a-col :span="6">
+          <a-col :span="5">
             <a-form-item label="乐豆余额" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
               <div class="input-number">
                 <a-input-number id="releaseRecordList-inputNumber" v-model="queryParam.currentGoldMin" :max="999999999" @change="onChange" />-
@@ -16,32 +16,39 @@
               </div>
             </a-form-item>
           </a-col>
-          <a-col :span="6">
+          <a-col :span="5">
             <a-form-item label="账户状态" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
               <v-select
                 v-model="queryParam.state"
                 id="releaseRecordList-state"
                 code="ENABLE_FLAG"
-                placeholder="请选择订单状态"
+                placeholder="请选择账户状态"
                 allowClear></v-select>
             </a-form-item>
           </a-col>
-          <a-col :span="6">
+          <a-col :span="5">
+            <a-form-item label="用户身份" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
+              <v-select
+                v-model="queryParam.customerRole"
+                id="releaseRecordList-customerRole"
+                code="CUSTOMER_ROLE"
+                placeholder="请选择用户身份"
+                allowClear></v-select>
+            </a-form-item>
+          </a-col>
+          <a-col :span="4">
             <a-button class="handle-btn serach-btn" id="releaseRecordList-btn-serach" type="primary" @click="refresh">查询</a-button>
             <a-button class="handle-btn" type="" id="releaseRecordList-btn-reset" @click="handleReset">重置</a-button>
+            <a-button
+              class="export-btn"
+              id="releaseRecordList-btn-export"
+              :loading="loading"
+              @click="handleExport"
+              v-hasPermission="'B_user_userManage_export'">导出</a-button>
           </a-col>
         </a-row>
       </a-form>
     </div>
-    <div class="table-operator">
-      <a-button
-        class="export-btn"
-        id="releaseRecordList-btn-export"
-        type=""
-        :loading="loading"
-        @click="handleExport"
-        v-hasPermission="'B_user_userManage_export'">导出</a-button>
-    </div>
     <s-table
       ref="table"
       size="default"
@@ -101,6 +108,7 @@ export default {
       queryParam: {
         mobile: '', //  用户手机
         state: '', // 账户状态
+        customerRole: '', // 用户身份
         currentGoldMin: '', // 乐豆余额最小值
         currentGoldMax: '' // 乐豆余额最大值
       },
@@ -118,6 +126,12 @@ export default {
         width: 100,
         align: 'center'
       },
+	  {
+	    title: '用户身份',
+	    dataIndex: 'customerRoleDictValue',
+	    width: 100,
+	    align: 'center'
+	  },
       {
         title: '乐豆余额',
         dataIndex: 'currentGold',
@@ -203,10 +217,9 @@ export default {
     })
   },
   methods: {
-    // 查询条件change
-    onChange () {
+	  onChange () {
 
-    },
+	  },
     refresh () {
       const isONull = this.queryParam.currentGoldMin === null
       const isOEmpty = this.queryParam.currentGoldMin === ''
@@ -241,14 +254,20 @@ export default {
     },
     // 查看乐豆详情
     handleLd (row) {
-      this.$router.push({
-        path: `/userInfo/userManageList_Ld/detail/${row.customerNo}`
-      })
+    	this.$router.push({
+    		// name: 'ledouDetail',
+    		// params: {
+    		// 	customerNo: row.customerNo,
+    		// 	mobile: row.mobile,
+    		// 	currentGold: row.currentGold,
+      //     id: row.id
+    		// }
+    		path: '/userInfo/userManageList_Ld/detail', query: { customerNo: row.customerNo, id: row.id }
+    	})
     },
     // 启用禁用
     // 更改启用禁用状态
     changeFlagHandle (text, record) {
-      console.log(text)
       const _this = this
       const _data = {
         id: record.id,
@@ -269,12 +288,14 @@ export default {
       this.queryParam.currentGoldMin = ''
       this.queryParam.currentGoldMax = ''
       this.queryParam.state = ''
+      this.queryParam.customerRole = ''
       this.$refs.table.refresh(true)
     },
     // 导出
     handleExport () {
       const params = {
         mobile: this.queryParam.mobile,
+        customerRole: this.queryParam.customerRole,
         currentGoldMin: this.queryParam.currentGoldMin,
         currentGoldMax: this.queryParam.currentGoldMax,
         state: this.queryParam.state = ''
@@ -303,8 +324,8 @@ export default {
 }
 </script>
 <style lang="less" scoped>
-	.shopOrder-table-page-search-wrapper {
-		.shopOrder-searchForm {
+	.userManageList-table-page-search-wrapper {
+		.userManageList-searchForm {
 			.ant-form-inline .ant-form-item {
 				width: 100%;
 			}
@@ -332,6 +353,7 @@ export default {
 			background-color: #ff9900;
 			border-color: #ff9900;
 			color: #fff;
+			margin-left: 10px;
 		}
 
 		.export-btn.ant-btn:focus:not(.ant-btn-primary):not(.ant-btn-danger),
@@ -339,17 +361,5 @@ export default {
 			color: #fff;
 			border-color: #ff9900;
 		}
-
-		.blue {
-			color: #1890FF;
-		}
-
-		.green {
-			color: #16b50e;
-		}
-
-		.red {
-			color: red;
-		}
 	}
 </style>

+ 1 - 1
vue.config.js

@@ -108,7 +108,7 @@ const vueConfig = {
     // If you want to turn on the proxy, please remove the mockjs /src/main.jsL11
     proxy: {
       '/api': {
-        target: 'http://192.168.16.102:8301/gc-admin/',
+        target: 'http://192.168.16.103:8301/gc-admin/',
         // target: 'https://lese.test.sxzxyj.net/gc-admin/',
         ws: false,
         changeOrigin: true,