Commit 92ac8daf by cwq0219

商户信息,设备信息,出货统计

1 parent 3847e4f5
const path = 'biz/delivery/'
const methods = {
FindAll: `${path}findAll`
}
export {
methods
}
const path = 'biz/devices/'
const methods = {
FindAll: `${path}findAll`
}
export {
methods
}
...@@ -3,6 +3,9 @@ import { GlAxios } from 'glsx-vue-common' ...@@ -3,6 +3,9 @@ import { GlAxios } from 'glsx-vue-common'
// import { sign } from './sign' // import { sign } from './sign'
import { methods as hisMethods } from './history' import { methods as hisMethods } from './history'
import { methods as lostMethods } from './lost' import { methods as lostMethods } from './lost'
import { methods as merchantMethods } from './merchant'
import { methods as devicesMethods } from './devices'
import { methods as deliveryMethods } from './delivery'
const request = { const request = {
req: (url, params) => { req: (url, params) => {
// params.source = 'glsx-oss-insurence' // params.source = 'glsx-oss-insurence'
...@@ -18,5 +21,8 @@ const request = { ...@@ -18,5 +21,8 @@ const request = {
export { export {
hisMethods, hisMethods,
lostMethods, lostMethods,
merchantMethods,
devicesMethods,
deliveryMethods,
request request
} }
const path = 'biz/merchant/'
const methods = {
FindAll: `${path}findAll`
}
export {
methods
}
...@@ -10,3 +10,61 @@ export const pickerOptions = { ...@@ -10,3 +10,61 @@ export const pickerOptions = {
return false return false
} }
} }
/**
* 设备类型
*/
export const devicesList = [{
label: '全部',
value: ''
}, {
label: '未知设备',
value: '-1'
}, {
label: 'OBD',
value: '1'
}, {
label: '云导航',
value: '2'
}, {
label: '电子狗',
value: '3'
}, {
label: '',
value: '4'
}, {
label: 'TBOX(2G)',
value: '5'
}, {
label: '记录仪',
value: '6'
}, {
label: 'BBOX',
value: '7'
}, {
label: 'GPS',
value: '8'
}, {
label: '车载WiFi',
value: '9'
}, {
label: '后视镜',
value: '12134'
}]
/**
* 业务类型
*/
export const businessList = [{
label: '全部',
value: ''
}, {
label: '智慧门店',
value: '1'
}, {
label: '金融风控',
value: '2'
}, {
label: 'AI车联网',
value: '3'
}]
export default [{
confId: 10,
confKey: '北京'
},
{
confId: 11,
confKey: '天津'
},
{
confId: 12,
confKey: '上海'
},
{
confId: 13,
confKey: '重庆'
},
{
confId: 14,
confKey: '安徽'
},
{
confId: 15,
confKey: '福建'
},
{
confId: 16,
confKey: '甘肃'
},
{
confId: 17,
confKey: '广东'
},
{
confId: 18,
confKey: '广西'
},
{
confId: 19,
confKey: '贵州'
},
{
confId: 20,
confKey: '海南'
},
{
confId: 21,
confKey: '河北'
},
{
confId: 22,
confKey: '河南'
},
{
confId: 23,
confKey: '黑龙江'
},
{
confId: 24,
confKey: '湖北'
},
{
confId: 25,
confKey: '湖南'
},
{
confId: 26,
confKey: '吉林'
},
{
confId: 27,
confKey: '江苏'
},
{
confId: 28,
confKey: '江西'
},
{
confId: 29,
confKey: '辽宁'
},
{
confId: 30,
confKey: '内蒙古'
},
{
confId: 31,
confKey: '宁夏'
},
{
confId: 32,
confKey: '青海'
},
{
confId: 33,
confKey: '山东'
},
{
confId: 34,
confKey: '山西'
},
{
confId: 35,
confKey: '陕西'
},
{
confId: 36,
confKey: '四川'
},
{
confId: 37,
confKey: '西藏'
},
{
confId: 38,
confKey: '新疆'
},
{
confId: 39,
confKey: '云南'
},
{
confId: 40,
confKey: '浙江'
},
{
confId: 41,
confKey: '香港'
},
{
confId: 42,
confKey: '澳门'
},
{
confId: 43,
confKey: '台湾'
},
{
confId: 46,
confKey: '未知区域'
}
]
import App from './index.vue'
import base from '@/base'
import GlsxVueCommon from 'glsx-vue-common'
base.getConfig().then(data => {
const {
vue,
config
} = data
vue.use(GlsxVueCommon, config)
base.render(App)
})
<!-- 出货统计 -->
<template>
<div>
<gl-form
:inline="true"
:model="searcher"
label-width="90px"
ref="searchForm"
>
<gl-row>
<gl-col :xs="24" :sm="24" :md="8" :lg="8" :xl="12">
<gl-form-item
label="月份:"
>
<gl-date-picker
v-model="searcher.month"
type="month"
placeholder="请选择日期"
value-format="yyyy-MM"
:picker-options="pickerOptions"
></gl-date-picker>
</gl-form-item>
</gl-col>
<gl-col :xs="24" :sm="24" :md="8" :lg="8" :xl="12">
<gl-form-item label="经销商:">
<gl-input
placeholder="请输入经销商"
v-model="searcher.merchantId"
clearable
>
</gl-input>
</gl-form-item>
</gl-col>
<gl-col :xs="24" :sm="24" :md="8" :lg="8" :xl="12">
<gl-form-item label="门店:">
<gl-input
placeholder="请输入门店"
v-model="searcher.shopMerchantId"
clearable
>
</gl-input>
</gl-form-item>
</gl-col>
<gl-col :xs="24" :sm="24" :md="8" :lg="8" :xl="12">
<gl-form-item
label="业务类型:"
prop="bizType"
>
<gl-select
v-model="searcher.bizType"
placeholder="全部"
clearable
>
<gl-option
:label="op.label"
:value="op.value"
v-for="(op,index) in businessList"
:key="index"
></gl-option>
</gl-select>
</gl-form-item>
</gl-col>
<gl-col :xs="24" :sm="24" :md="8" :lg="8" :xl="12">
<gl-form-item
label="设备类型:"
prop="deviceType"
>
<gl-select
v-model="searcher.deviceType"
placeholder="全部"
clearable
>
<gl-option
:label="op.label"
:value="op.value"
v-for="(op,index) in devicesList"
:key="index"
></gl-option>
</gl-select>
</gl-form-item>
</gl-col>
</gl-row>
<gl-row>
<gl-col :xs="24" :sm="24" :md="8" :lg="8" :xl="12">
<gl-form-item label=" ">
<gl-button
type="primary"
icon="el-icon-search"
@click="handleSearch"
>查询</gl-button>
<gl-button
type="info"
icon="el-icon-refresh"
@click="handleReset"
>重置</gl-button>
</gl-form-item>
</gl-col>
</gl-row>
</gl-form>
<gl-table
class="m-b10"
:table="tableData"
v-loading="loading"
></gl-table>
<gl-pagination
background
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="pager.current"
:page-sizes="[10,20,30,40]"
:page-size="pager.size"
layout="total, sizes, ->, prev, pager, next, jumper"
:total="pager.total"
></gl-pagination>
</div>
</template>
<script>
import { deliveryMethods, request } from '@/api'
import { pickerOptions, devicesList, businessList } from '@/common/constants'
export default {
data() {
return {
pickerOptions: pickerOptions,
devicesList: devicesList,
businessList: businessList,
searcher: {
month: '',
merchantId: '',
shopMerchantId: '',
bizType: '',
deviceType: ''
},
loading: false,
pager: {
current: 1,
size: 10,
total: 0
},
tableData: {
border: true,
stripe: true,
align: 'center',
height: parseInt(this.$client_height() - 320),
data: [],
number: {
label: '序号',
width: '80px',
index: index => (this.pager.current - 1) * this.pager.size + index + 1
},
column: [
{
label: '月份',
prop: 'month',
width: '200px'
},
{
label: '经销商',
prop: 'merchantName'
},
{
label: '门店',
prop: 'shopMerchantName'
},
{
label: '业务类型',
prop: 'biz_type',
width: '200',
formatter: cellValue => {
return this.businessList.find(item => item.value === String(cellValue['biz_type'])).label
}
},
{
label: '设备类型',
prop: 'device_type',
width: '200',
formatter: cellValue => {
return this.devicesList.find(item => item.value === String(cellValue['device_type'])).label
}
},
{
label: '设备发货数',
prop: 'delivery_total',
width: '200'
},
{
label: '设备激活数',
prop: 'active_total',
width: '200'
}
]
}
}
},
components: {},
computed: {},
mounted() {
this.handleSearch()
},
methods: {
handleSearch() {
this.loading = true
const { pager, searcher } = this
request.req(deliveryMethods.FindAll, { pager, searcher }).then(res => {
this.pager.total = res.count
this.tableData.data = res.rows
console.log(res.rows)
this.loading = false
})
},
handleReset() {
this.searcher = {
month: '',
merchantId: '',
shopMerchantId: '',
bizType: '',
deviceType: ''
}
},
handleSizeChange(size) {
this.pager.size = size
this.handleSearch()
},
handleCurrentChange(current) {
this.pager.current = current
this.handleSearch()
} }
}
</script>
<style scoped>
</style>
\ No newline at end of file \ No newline at end of file
import App from './index.vue'
import base from '@/base'
import GlsxVueCommon from 'glsx-vue-common'
base.getConfig().then(data => {
const {
vue,
config
} = data
vue.use(GlsxVueCommon, config)
base.render(App)
})
<!-- 设备信息 -->
<template>
<div>
<gl-form
:inline="true"
:model="searcher"
label-width="90px"
ref="searchForm"
>
<gl-row>
<gl-col
:xs="24"
:sm="24"
:md="8"
:lg="8"
:xl="12"
>
<gl-form-item label="设备sn:">
<gl-input
placeholder="请输入设备sn"
v-model="searcher.sn"
clearable
>
</gl-input>
</gl-form-item>
</gl-col>
<gl-col
:xs="24"
:sm="24"
:md="8"
:lg="8"
:xl="12"
>
<gl-form-item
label="设备类型:"
prop="deviceType"
>
<gl-select
v-model="searcher.deviceType"
placeholder="全部"
clearable
>
<gl-option
:label="op.label"
:value="op.value"
v-for="(op,index) in devicesList"
:key="index"
></gl-option>
</gl-select>
</gl-form-item>
</gl-col>
<gl-col
:xs="24"
:sm="24"
:md="8"
:lg="8"
:xl="12"
>
<gl-form-item
label="业务类型:"
prop="bizType"
>
<gl-select
v-model="searcher.bizType"
placeholder="全部"
clearable
>
<gl-option
:label="op.label"
:value="op.value"
v-for="(op,index) in businessList"
:key="index"
></gl-option>
</gl-select>
</gl-form-item>
</gl-col>
<gl-col
:xs="24"
:sm="24"
:md="8"
:lg="8"
:xl="12"
>
<gl-form-item label="出货时间:">
<gl-date-picker
v-model="searcher.outStorageTime"
type="date"
placeholder="请选择日期"
value-format="yyyy-MM-dd"
:picker-options="pickerOptions"
></gl-date-picker>
</gl-form-item>
</gl-col>
<gl-col
:xs="24"
:sm="24"
:md="8"
:lg="8"
:xl="12"
>
<gl-form-item label="激活时间:">
<gl-date-picker
v-model="searcher.activeTime"
type="date"
placeholder="请选择日期"
value-format="yyyy-MM-dd"
:picker-options="pickerOptions"
></gl-date-picker>
</gl-form-item>
</gl-col>
<gl-col
:xs="24"
:sm="24"
:md="8"
:lg="8"
:xl="12"
>
<gl-form-item
label="最后位置上报时间:"
label-width="150px"
>
<gl-date-picker
v-model="searcher.latestGpstime"
type="date"
placeholder="请选择日期"
value-format="yyyy-MM-dd"
:picker-options="pickerOptions"
></gl-date-picker>
</gl-form-item>
</gl-col>
</gl-row>
<gl-row>
<gl-col
:xs="24"
:sm="24"
:md="8"
:lg="8"
:xl="12"
>
<gl-form-item label=" ">
<gl-button
type="primary"
icon="el-icon-search"
@click="handleSearch"
>查询</gl-button>
<gl-button
type="info"
icon="el-icon-refresh"
@click="handleReset"
>重置</gl-button>
</gl-form-item>
</gl-col>
</gl-row>
</gl-form>
<gl-table
class="m-b10"
:table="tableData"
v-loading="loading"
></gl-table>
<gl-pagination
background
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="pager.current"
:page-sizes="[10,20,30,40]"
:page-size="pager.size"
layout="total, sizes, ->, prev, pager, next, jumper"
:total="pager.total"
></gl-pagination>
</div>
</template>
<script>
// import VueAMap from 'vue-amap'
// import Vue from 'vue'
import { devicesMethods, request } from '@/api'
import { pickerOptions, devicesList, businessList } from '@/common/constants'
// const amapManager = new VueAMap.AMapManager()
// import { Request as requestMap } from 'glsx-vue-common'
import { GlAxios } from 'glsx-vue-common'
// VueAMap.initAMapApiLoader({
// key: '44cc16e43ad7ed3358df507bd0618181',
// plugin: ['AMap.Geocoder'],
// uiVersion: '1.0'
// })
// Vue.use(VueAMap)
export default {
name: 'devices',
data() {
return {
// amapManager,
pickerOptions: pickerOptions,
devicesList: devicesList,
businessList: businessList,
searcher: {
sn: '',
deviceType: '',
bizType: '',
outStorageTime: '',
activeTime: '',
latestGpstime: ''
},
loading: false,
pager: {
current: 1,
size: 10,
total: 0
},
tableData: {
border: true,
stripe: true,
align: 'center',
height: parseInt(this.$client_height() - 320),
data: [],
number: {
label: '序号',
width: '80px',
index: index => (this.pager.current - 1) * this.pager.size + index + 1
},
column: [
{
label: '设备sn',
prop: 'sn',
width: '200px'
},
{
label: '设备类型',
prop: 'device_type',
formatter: cellValue => {
return this.devicesList.find(item => item.value === String(cellValue['device_type'])).label
}
},
{
label: '业务类型',
prop: 'biz_type',
width: '200',
formatter: cellValue => {
return this.businessList.find(item => item.value === String(cellValue['biz_type'])).label
}
},
{
label: '出货时间',
prop: 'out_storage_time',
width: '200'
},
{
label: '绑定门店',
prop: 'shop_merchant_name',
width: '200'
},
{
label: '车主电话',
prop: 'user_phone',
width: '200'
},
{
label: '激活时间',
prop: 'active_time',
width: '200'
},
{
label: '激活位置点',
prop: '',
width: '200'
},
{
label: '最后位置上报时间',
prop: 'latest_gpstime',
width: '200'
},
{
label: '最后位置点',
prop: '',
width: '200'
}
]
}
}
},
components: {},
computed: {},
mounted() {
this.handleSearch()
// this.center = [104.297736, 26.866284]
// var geocoder = new AMap.Geocoder({
// radius: 1000,
// extensions: 'all'
// })
// geocoder.getAddress(this.center, (status, result) => {
// if (status === 'complete' && result.info === 'OK') {
// console.log(result)
// // const mar = new AMap.Marker({
// // position: this.center,
// // title: result.regeocode.formattedAddress
// // })
// // this.hasLocation = true
// // this.merchantInfo.lng = this.center[0]
// // this.merchantInfo.lat = this.center[1]
// // this.List[this.List.findIndex(item => item.name === 'lng')].value = result.regeocode.formattedAddress
// }
// })
const url = 'https://restapi.amap.com/v3/geocode/regeo'
GlAxios.get(url, {
key: '44cc16e43ad7ed3358df507bd0618181',
location: '104.297736,26.866284'
}).then(res => {
console.log(res)
})
// requestMap({ url }).then(res => {
// console.log(res)
// })
},
methods: {
handleSearch() {
this.loading = true
const { pager, searcher } = this
request.req(devicesMethods.FindAll, { pager, searcher }).then(res => {
this.pager.total = res.count
this.tableData.data = res.rows
this.loading = false
})
},
handleReset() {
this.searcher = {
merchantId: '',
merchantName: '',
channelId: '',
provinceId: '',
parentMerchantName: ''
}
},
handleSizeChange(size) {
this.pager.size = size
this.handleSearch()
},
handleCurrentChange(current) {
this.pager.current = current
this.handleSearch()
}
}
}
</script>
<style scoped>
</style>
\ No newline at end of file \ No newline at end of file
import App from './index.vue'
import base from '@/base'
import GlsxVueCommon from 'glsx-vue-common'
base.getConfig().then(data => {
const {
vue,
config
} = data
vue.use(GlsxVueCommon, config)
base.render(App)
})
<!-- 商户信息 -->
<template>
<div>
<gl-form
:inline="true"
:model="searcher"
label-width="90px"
ref="searchForm"
>
<gl-row>
<gl-col :xs="24" :sm="24" :md="8" :lg="8" :xl="12">
<gl-form-item label="商户号:">
<gl-input
placeholder="请输入商户号"
v-model="searcher.merchantId"
clearable
>
</gl-input>
</gl-form-item>
</gl-col>
<gl-col :xs="24" :sm="24" :md="8" :lg="8" :xl="12">
<gl-form-item label="商户名称:">
<gl-input
placeholder="请输入商户名称"
v-model="searcher.merchantName"
clearable
>
</gl-input>
</gl-form-item>
</gl-col>
<gl-col :xs="24" :sm="24" :md="8" :lg="8" :xl="12">
<gl-form-item
label="渠道:"
prop="channelId"
>
<gl-select
v-model="searcher.channelId"
placeholder="全部"
clearable
>
<gl-option
:label="op.label"
:value="op.value"
v-for="(op,index) in channelList"
:key="index"
></gl-option>
</gl-select>
</gl-form-item>
</gl-col>
<gl-col :xs="24" :sm="24" :md="8" :lg="8" :xl="12">
<gl-form-item
label="省份:"
prop="provinceId"
>
<gl-select
v-model="searcher.provinceId"
placeholder="全部"
clearable
>
<gl-option
:label="item.confKey"
:value="item.confId"
v-for="(item,index) in provinces"
:key="index"
></gl-option>
</gl-select>
</gl-form-item>
</gl-col>
<gl-col :xs="24" :sm="24" :md="8" :lg="8" :xl="12">
<gl-form-item label="经销商:">
<gl-input
placeholder="请输入经销商"
v-model="searcher.parentMerchantName"
clearable
>
</gl-input>
</gl-form-item>
</gl-col>
</gl-row>
<gl-row>
<gl-col :xs="24" :sm="24" :md="8" :lg="8" :xl="12">
<gl-form-item label=" ">
<gl-button
type="primary"
icon="el-icon-search"
@click="handleSearch"
>查询</gl-button>
<gl-button
type="info"
icon="el-icon-refresh"
@click="handleReset"
>重置</gl-button>
</gl-form-item>
</gl-col>
</gl-row>
</gl-form>
<gl-table
class="m-b10"
:table="tableData"
v-loading="loading"
></gl-table>
<gl-pagination
background
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="pager.current"
:page-sizes="[10,20,30,40]"
:page-size="pager.size"
layout="total, sizes, ->, prev, pager, next, jumper"
:total="pager.total"
></gl-pagination>
</div>
</template>
<script>
import _ from 'lodash'
import { merchantMethods, request } from '@/api'
import provinces from '@/common/provinces'
export default {
name: 'merchant',
data() {
return {
loading: false,
provinces: [],
searcher: {
merchantId: '',
merchantName: '',
channelId: '',
provinceId: '',
parentMerchantName: ''
},
channelList: Object.freeze([
{ label: '全部', value: '' },
{ label: '广汇', value: '0' },
{ label: '滴加智慧门店', value: '1' },
{ label: '萝卜新车', value: '2' },
{ label: '爱卡', value: '3' },
{ label: '长城租赁', value: '4' }
]),
pager: {
current: 1,
size: 10,
total: 0
},
tableData: {
border: true,
stripe: true,
align: 'center',
height: parseInt(this.$client_height() - 320),
data: [],
number: {
label: '序号',
width: '80px',
index: index => (this.pager.current - 1) * this.pager.size + index + 1
},
column: [
{
label: '商户号',
prop: 'merchant_id',
width: '200px'
},
{
label: '商户名称',
prop: 'merchant_name'
},
{
label: '渠道',
prop: 'channel_id',
width: '200',
formatter: cellValue => {
return this.channelList.find(item => item.value === String(cellValue['channel_id'])).label
}
},
{
label: '省份',
prop: 'province_name',
width: '200'
},
{
label: '经销商',
prop: 'parent_merchant_name'
}
]
}
}
},
components: {},
computed: {},
mounted() {
this.provinces = _.cloneDeep(provinces)
this.provinces.unshift({
confKey: '全部',
confId: ''
})
this.handleSearch()
},
methods: {
handleSearch() {
this.loading = true
const { pager, searcher } = this
request.req(merchantMethods.FindAll, { pager, searcher }).then(res => {
this.pager.total = res.count
this.tableData.data = res.rows
this.loading = false
})
},
handleReset() {
this.searcher = {
merchantId: '',
merchantName: '',
channelId: '',
provinceId: '',
parentMerchantName: ''
}
},
handleSizeChange(size) {
this.pager.size = size
this.handleSearch()
},
handleCurrentChange(current) {
this.pager.current = current
this.handleSearch()
}
}
}
</script>
<style scoped>
</style>
\ No newline at end of file \ No newline at end of file
import App from './app.vue' import App from './app.vue'
import base from '@/base' import base from '@/base'
import GlsxVueCommon from 'glsx-vue-common' import GlsxVueCommon from 'glsx-vue-common'
base.getConfig().then(data => { base.getConfig().then(data => {
const { vue, config } = data const {
vue,
config
} = data
vue.use(GlsxVueCommon, config) vue.use(GlsxVueCommon, config)
base.render(App) base.render(App)
}) })
...@@ -15,6 +15,31 @@ ...@@ -15,6 +15,31 @@
流失线索 流失线索
</a> </a>
</li> </li>
<li>
<a href="../biz/maintenance.html" target="_self">
流失线索
</a>
</li>
<li>
<a href="../biz/shop.html" target="_self">
流失线索
</a>
</li>
<li>
<a href="../biz/merchant.html" target="_self">
商户信息
</a>
</li>
<li>
<a href="../biz/devices.html" target="_self">
设备信息
</a>
</li>
<li>
<a href="../biz/delivery.html" target="_self">
出货统计
</a>
</li>
</ul> </ul>
</gl-card> </gl-card>
</div> </div>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!