zhangdan 4 gadi atpakaļ
vecāks
revīzija
767093667c

+ 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',
           name: 'ledouDetail',
           component: () => import(/* webpackChunkName: "LdDetails" */ '@/views/userInfo/LdDetails.vue'),
           component: () => import(/* webpackChunkName: "LdDetails" */ '@/views/userInfo/LdDetails.vue'),
           meta: {
           meta: {

+ 113 - 48
src/views/releaseRecord/releaseRecordList.vue

@@ -1,7 +1,7 @@
 <template>
 <template>
   <a-card :bordered="false" class="shopOrder-table-page-search-wrapper">
   <a-card :bordered="false" class="shopOrder-table-page-search-wrapper">
     <div class="shopOrder-searchForm">
     <div class="shopOrder-searchForm">
-      <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
+      <a-form layout="inline" @keyup.enter.native="refresh">
         <a-row :gutter="48">
         <a-row :gutter="48">
           <a-col :span="6">
           <a-col :span="6">
             <a-form-item label="投放时间:" :label-col="{ span: 7 }" :wrapper-col="{ span: 17}">
             <a-form-item label="投放时间:" :label-col="{ span: 7 }" :wrapper-col="{ span: 17}">
@@ -19,11 +19,32 @@
               <a-input id="releaseRecordList-srcDeviceCode" allowClear :maxLength="120" v-model=" queryParam.srcDeviceCode " placeholder="请输入设备编号" />
               <a-input id="releaseRecordList-srcDeviceCode" allowClear :maxLength="120" v-model=" queryParam.srcDeviceCode " placeholder="请输入设备编号" />
             </a-form-item>
             </a-form-item>
           </a-col>
           </a-col>
+          <a-col :span="6">
+            <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="6">
+            <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-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-form-item>
+          </a-col>
           <a-col :span="6">
           <a-col :span="6">
             <a-form-item label="网点名称" :label-col="{ span:7 }" :wrapper-col="{ span:17}">
             <a-form-item label="网点名称" :label-col="{ span:7 }" :wrapper-col="{ span:17}">
               <a-select
               <a-select
                 id="releaseRecordList-stationNo"
                 id="releaseRecordList-stationNo"
-                placeholder="请选择"
+                placeholder="请选择网点名称"
                 allowClear
                 allowClear
                 v-model="queryParam.stationNo"
                 v-model="queryParam.stationNo"
                 :showSearch="true"
                 :showSearch="true"
@@ -37,21 +58,24 @@
             </a-form-item>
             </a-form-item>
           </a-col>
           </a-col>
           <a-col :span="6">
           <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-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-form-item>
+          </a-col>
+          <a-col :span="6">
+            <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>
         <a-row :gutter="48">
         <a-row :gutter="48">
           <a-col :span="6">
           <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-form-item>
+            <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-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-form-item>
-          </a-col> -->
         </a-row>
         </a-row>
       </a-form>
       </a-form>
     </div>
     </div>
@@ -91,14 +115,14 @@
         <span v-if="record.rubbishType=='MET_PLA'">{{ record.rubbishWeight }}</span>
         <span v-if="record.rubbishType=='MET_PLA'">{{ record.rubbishWeight }}</span>
         <span v-else>0</span>
         <span v-else>0</span>
       </template>
       </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>
     </s-table>
   </a-card>
   </a-card>
 
 
@@ -118,19 +142,24 @@ export default {
         labelCol: { span: 4 },
         labelCol: { span: 4 },
         wrapperCol: { span: 16 }
         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: {
       queryParam: {
         beginDate: null, // 开始时间
         beginDate: null, // 开始时间
         endDate: null, // 结束时间
         endDate: null, // 结束时间
         customerMobile: '', //  用户手机
         customerMobile: '', //  用户手机
         srcDeviceCode: '', //  设备编号
         srcDeviceCode: '', //  设备编号
-        stationNo: undefined // 网点名称
+        stationNo: undefined, // 网点名称
+        rubbishType: '', // 投放类型
+        goldNumStart: null, // 兑换最小值
+        goldNumEnd: null, // 兑换最大值
+        rubbishWeightStart: null, // 投放重量最小值
+        rubbishWeightEnd: null// 投放重量最小值
       },
       },
       optionData: [],
       optionData: [],
       orderTotal: 0,	// 总单数
       orderTotal: 0,	// 总单数
@@ -142,32 +171,32 @@ export default {
         { title: '网点名称', dataIndex: 'stationName', width: 200, align: 'center' },
         { title: '网点名称', dataIndex: 'stationName', width: 200, align: 'center' },
         { title: '设备编号', dataIndex: 'srcDeviceCode', width: 200, align: 'center' },
         { title: '设备编号', dataIndex: 'srcDeviceCode', width: 200, align: 'center' },
         { title: '用户账号', dataIndex: 'customerMobile', width: 200, align: 'center' },
         { title: '用户账号', dataIndex: 'customerMobile', width: 200, align: 'center' },
-        // { title: '投递方式', dataIndex: '', width: 200, align: 'center' },
+        { title: '投递方式', dataIndex: '', width: 200, align: 'center' },
         { title: '本次兑换乐豆(个)', dataIndex: 'goldNum', width: 100, align: 'center' },
         { title: '本次兑换乐豆(个)', dataIndex: 'goldNum', width: 100, align: 'center' },
         { title: '内置各箱体投放重量(g)',
         { title: '内置各箱体投放重量(g)',
-				  children: [
+          children: [
             { title: '废旧衣物', width: 100, align: 'center', scopedSlots: { customRender: 'one' } },
             { title: '废旧衣物', width: 100, align: 'center', scopedSlots: { customRender: 'one' } },
             { title: '废旧纸张', width: 100, align: 'center', scopedSlots: { customRender: 'two' } },
             { title: '废旧纸张', width: 100, align: 'center', scopedSlots: { customRender: 'two' } },
             { title: '废旧塑料', width: 100, align: 'center', scopedSlots: { customRender: 'three' } },
             { title: '废旧塑料', width: 100, align: 'center', scopedSlots: { customRender: 'three' } },
             { title: '废旧金属', width: 100, align: 'center', scopedSlots: { customRender: 'four' } },
             { title: '废旧金属', width: 100, align: 'center', scopedSlots: { customRender: 'four' } },
             { title: '有害垃圾', width: 100, align: 'center', scopedSlots: { customRender: 'five' } },
             { title: '有害垃圾', width: 100, align: 'center', scopedSlots: { customRender: 'five' } },
             { title: '废旧金属/塑料', width: 100, align: 'center', scopedSlots: { customRender: 'six' } },
             { 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 对象
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
       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 => {
         return getDeliveryLogList(searchData).then(res => {
           if (res.status == 200) {
           if (res.status == 200) {
             const no = (res.data.pageNo - 1) * res.data.pageSize
             const no = (res.data.pageNo - 1) * res.data.pageSize
@@ -201,20 +230,46 @@ export default {
         this.queryParam.endDate = dateStrings[1]
         this.queryParam.endDate = dateStrings[1]
       }
       }
     },
     },
-
     handleChange (value) {
     handleChange (value) {
-		  console.log(`selected ${value}`)
+      console.log(`selected ${value}`)
     },
     },
     handleBlur () {
     handleBlur () {
-		  console.log('blur')
+      console.log('blur')
     },
     },
     handleFocus () {
     handleFocus () {
-		  console.log('focus')
+      console.log('focus')
     },
     },
     filterOption (input, option) {
     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 () {
     getStationList () {
@@ -233,7 +288,12 @@ export default {
         beginDate: this.queryParam.beginDate,
         beginDate: this.queryParam.beginDate,
         endDate: this.queryParam.endDate,
         endDate: this.queryParam.endDate,
         srcDeviceCode: this.queryParam.srcDeviceCode, //  设备编号
         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
       }
       }
       if (this.queryOrderDate && this.queryOrderDate.length) {
       if (this.queryOrderDate && this.queryOrderDate.length) {
         params.beginDate = moment(this.queryOrderDate[0]).format('YYYY-MM-DD')
         params.beginDate = moment(this.queryOrderDate[0]).format('YYYY-MM-DD')
@@ -264,6 +324,11 @@ export default {
       this.queryParam.customerMobile = ''
       this.queryParam.customerMobile = ''
       this.queryParam.srcDeviceCode = ''
       this.queryParam.srcDeviceCode = ''
       this.queryParam.stationNo = undefined
       this.queryParam.stationNo = undefined
+	  this.queryParam.rubbishType = ''
+	  this.queryParam.goldNumStart = '' // 兑换最小值
+	  this.queryParam.goldNumEnd = '' // 兑换最大值
+      this.queryParam.rubbishWeightStart = ''// 投放重量最小值
+	  this.queryParam.rubbishWeightEnd = ''
       this.$refs.table.refresh(true)
       this.$refs.table.refresh(true)
     }
     }
   }
   }

+ 2 - 2
src/views/shopSetting/goodsClass.vue

@@ -35,13 +35,13 @@
       bordered>
       bordered>
       <span slot="action" slot-scope="text, record">
       <span slot="action" slot-scope="text, record">
         <a-icon
         <a-icon
-          v-if="$hasPermissions('B_goodsClass_edit') && record.state==0"
+		v-hasPermission="'B_goodsClass_edit'"
           type="edit"
           type="edit"
           id="goodsClass-handleEdit"
           id="goodsClass-handleEdit"
           title="编辑"
           title="编辑"
           class="actionBtn icon-blues"
           class="actionBtn icon-blues"
           @click="handleEdit(record)" />
           @click="handleEdit(record)" />
-        <span v-else>--</span>
+        <span v-if="!$hasPermissions('B_goodsClass_edit')">--</span>
       </span>
       </span>
       <span slot="state" slot-scope="text, record">
       <span slot="state" slot-scope="text, record">
         <a-switch
         <a-switch

+ 55 - 3
src/views/userInfo/LdDetails.vue

@@ -1,5 +1,10 @@
 <template>
 <template>
   <a-card :bordered="false" class="shopOrder-table-page-search-wrapper">
   <a-card :bordered="false" class="shopOrder-table-page-search-wrapper">
+    <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="shopOrder-searchForm">
     <div class="shopOrder-searchForm">
       <a-form layout="inline" v-bind="formItemLayout" @keyup.enter.native="$refs.table.refresh(true)">
       <a-form layout="inline" v-bind="formItemLayout" @keyup.enter.native="$refs.table.refresh(true)">
         <a-row :gutter="48">
         <a-row :gutter="48">
@@ -55,7 +60,7 @@
 
 
 <script>
 <script>
 import { STable, VSelect } from '@/components'
 import { STable, VSelect } from '@/components'
-import { customerGoldLogDetail } from '@/api/userInfo.js'
+import { customerGoldLogDetail, customerDetails } from '@/api/userInfo.js'
 import moment from 'moment'
 import moment from 'moment'
 export default {
 export default {
   name: 'ShopOrder',
   name: 'ShopOrder',
@@ -74,6 +79,11 @@ export default {
         changeType: '', // 类型
         changeType: '', // 类型
         operateType: '' // 原因
         operateType: '' // 原因
       },
       },
+	  info: '',
+	  mobile: '', // 手机号
+	  currentGold: '', // 乐豆余额
+	  customerNo: '', // 用户编号
+	  page: {}, // 用户信息
       loading: false, // 导出loading
       loading: false, // 导出loading
       // 表头
       // 表头
       columns: [
       columns: [
@@ -102,7 +112,7 @@ export default {
 		    searchData.beginDate = ''
 		    searchData.beginDate = ''
 		    searchData.endDate = ''
 		    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) {
 		    if (res.status == 200) {
 		      const no = (res.data.pageNo - 1) * res.data.pageSize
 		      const no = (res.data.pageNo - 1) * res.data.pageSize
 		      for (let i = 0; i < res.data.list.length; i++) {
 		      for (let i = 0; i < res.data.list.length; i++) {
@@ -134,19 +144,61 @@ export default {
       this.queryParam.changeType = ''
       this.queryParam.changeType = ''
       this.queryParam.operateType = ''
       this.queryParam.operateType = ''
       this.$refs.table.refresh(true)
       this.$refs.table.refresh(true)
+    },
+    // 返回列表
+    goBack () {
+      this.$router.push({
+        path: `/userInfo/userManageList/list`
+      })
     }
     }
+  },
+  beforeRouteEnter (to, from, next) {
+    next(vm => {
+      console.log(111)
+      const userInfo = vm.$route.query
+      console.log(userInfo, '-------------传参')
+	  // vm.mobile = vm.$route.params.mobile
+	  // vm.currentGold = vm.$route.params.currentGold
+	  if (userInfo) {
+	  	customerDetails({
+	  		id: userInfo.id
+	  	}).then(res => {
+	  		if (res.status == 200) {
+	  			vm.page = res.data
+            console.log(vm.page, '----')
+	  		}
+	  	})
+	  }
+      // if (userInfo.id) {
+      // 	console.log(userInfo.id)
+      //   vm.info = userInfo.id.split(',')
+      //   vm.customerNo = vm.info[0]
+      //   vm.$refs.table.refresh()
+      //   console.log(vm.info, '-----数组', vm.customerNo)
+      // }
+    })
   }
   }
 }
 }
 </script>
 </script>
 <style lang="less" scoped>
 <style lang="less" scoped>
   .shopOrder-table-page-search-wrapper{
   .shopOrder-table-page-search-wrapper{
+	  .page-header{
+		  margin-bottom: 15px;
+		  span{
+			  margin-left: 20px;
+		  }
+		  .page-header-info{
+			   margin-left:0;
+			 font-weight: bold;
+		  }
+	  }
     .shopOrder-searchForm{
     .shopOrder-searchForm{
       .ant-form-inline .ant-form-item{
       .ant-form-inline .ant-form-item{
         width: 100%;
         width: 100%;
       }
       }
       // 搜索框的下间距
       // 搜索框的下间距
       .ant-form-item {
       .ant-form-item {
-      	margin-bottom: 10px;
+      	margin-bottom: 15px;
       }
       }
       .handle-btn{
       .handle-btn{
         margin-top: 4px;
         margin-top: 4px;

+ 10 - 3
src/views/userInfo/userManageList.vue

@@ -238,9 +238,16 @@ export default {
     },
     },
     // 查看乐豆详情
     // 查看乐豆详情
     handleLd (row) {
     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 }
+    	})
     },
     },
     // 启用禁用
     // 启用禁用
     // 更改启用禁用状态
     // 更改启用禁用状态