|
@@ -1,9 +1,9 @@
|
|
<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-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-form-item label="投放时间:" :label-col="{ span: 7 }" :wrapper-col="{ span: 17}">
|
|
<a-range-picker
|
|
<a-range-picker
|
|
style="width:100%"
|
|
style="width:100%"
|
|
@@ -14,16 +14,40 @@
|
|
:placeholder="['开始时间', '结束时间']" />
|
|
:placeholder="['开始时间', '结束时间']" />
|
|
</a-form-item>
|
|
</a-form-item>
|
|
</a-col>
|
|
</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-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-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-col :span="5">
|
|
<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"
|
|
@@ -36,22 +60,22 @@
|
|
</a-select>
|
|
</a-select>
|
|
</a-form-item>
|
|
</a-form-item>
|
|
</a-col>
|
|
</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-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="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-form-item>
|
|
- </a-col> -->
|
|
|
|
|
|
+ </a-col>
|
|
|
|
+ </a-row>
|
|
|
|
+ <a-row :gutter="20">
|
|
|
|
+
|
|
</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,25 @@ 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: '', // 投放类型
|
|
|
|
+ deliveryWay: '', // 投放方式
|
|
|
|
+ goldNumStart: null, // 兑换最小值
|
|
|
|
+ goldNumEnd: null, // 兑换最大值
|
|
|
|
+ rubbishWeightStart: null, // 投放重量最小值
|
|
|
|
+ rubbishWeightEnd: null// 投放重量最小值
|
|
},
|
|
},
|
|
optionData: [],
|
|
optionData: [],
|
|
orderTotal: 0, // 总单数
|
|
orderTotal: 0, // 总单数
|
|
@@ -142,32 +172,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: 'deliveryWayDictValue', 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 +231,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 +289,13 @@ 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, // 投放类型
|
|
|
|
+ deliveryWay: this.queryParam.deliveryWay // 投放方式
|
|
}
|
|
}
|
|
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 +326,12 @@ 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.queryParam.deliveryWay = '' // 投放方式
|
|
this.$refs.table.refresh(true)
|
|
this.$refs.table.refresh(true)
|
|
}
|
|
}
|
|
}
|
|
}
|