This commit is contained in:
yanran200830
2022-11-29 18:06:00 +08:00
parent 101d67ad48
commit 5f4aa6034f
3 changed files with 198 additions and 198 deletions

View File

@@ -8,37 +8,23 @@
<template slot="content"> <template slot="content">
<ai-search-bar bottomBorder> <ai-search-bar bottomBorder>
<template #left> <template #left>
<ai-user-selecter :instance="instance" @change="onUserChange" :isMultiple="false" v-model="user"> <ai-picker
<div class="userSelcet"> :instance="instance"
<span style="color: #606266;" v-if="search.createUserId">{{ name }}</span> dialogTitle="选择网格"
<span v-else>兑换人</span> :ops="{label: 'girdName'}"
<i class="el-icon-arrow-up" v-if="!search.createUserId"></i> pageTitle="网格"
<i class="el-icon-circle-close" v-if="search.createUserId" @click.stop="user = [], search.createUserId = '', name = '', search.current = 1, getList()"></i> action="/app/appgirdinfo/girdList"
@pick="onPick"
@change="search.current = 1, getList()">
<div class="AppAnnounceDetail-select">
<div class="userSelcet">
<span style="color: #606266;" v-if="girdList.length">{{ girdList.length ? girdList[0].girdName : '' }}</span>
<span v-else>可选范围</span>
<i class="el-icon-arrow-up" v-if="!girdList.length"></i>
<i class="el-icon-circle-close" v-if="girdList.length" @click.stop="girdList = [], search.rangeIds = '', search.current = 1, getList()"></i>
</div>
</div> </div>
</ai-user-selecter> </ai-picker>
<ai-select
v-model="search.source"
clearable
placeholder="请选择订单状态"
:selectList="dict.getDict('EP_source')"
@change="search.current = 1, getList()">
</ai-select>
<el-date-picker
v-model="search.queryBeginTime"
type="date"
size="small"
value-format="yyyy-MM-dd"
placeholder="选择兑换开始日期"
@change="search.current = 1, getList()">
</el-date-picker>
<el-date-picker
v-model="search.queryEndTime"
type="date"
size="small"
value-format="yyyy-MM-dd"
placeholder="选择兑换结束日期"
@change="search.current = 1, getList()">
</el-date-picker>
</template> </template>
<template #right> <template #right>
<el-input <el-input
@@ -106,7 +92,7 @@
current: 1, current: 1,
size: 10, size: 10,
name: '', name: '',
createUserId: '' rangeIds: ''
}, },
name: '', name: '',
info: {}, info: {},
@@ -136,24 +122,28 @@
tableData: [], tableData: [],
total: 0, total: 0,
loading: false, loading: false,
disabledLevel: 0 girdList: []
} }
}, },
created () { created () {
this.dict.load(['EP_riskLevel']).then(() => { this.getList()
this.getList()
})
}, },
methods: { methods: {
onPick (e) {
this.girdList = e
if (e.length) {
this.search.rangeIds = e[0].id
} else {
this.search.rangeIds = ''
}
},
getList () { getList () {
this.instance.post(`/app/appintegralmerchandise/list`, null, { this.instance.post(`/app/appintegralmerchandise/list`, null, {
params: { params: {
...this.search, ...this.search
arriveAreaId: this.search.arriveAreaId,
queryBeginTime: this.search.queryBeginTime ? this.search.queryBeginTime + ' 00:00:00' : '',
queryEndTime: this.search.queryEndTime ? this.search.queryEndTime + ' 23:59:59' : ''
} }
}).then(res => { }).then(res => {
if (res.code == 0) { if (res.code == 0) {
@@ -163,10 +153,6 @@
}) })
}, },
onUserChange () {
},
mapStatus (status) { mapStatus (status) {
return { return {
'0': '可兑换', '0': '可兑换',

View File

@@ -1,123 +1,73 @@
<template> <template>
<ai-detail isHasSidebar v-loading="isLoading"> <ai-detail v-loading="isLoading" class="detail">
<template slot="title"> <template slot="title">
<ai-title title="返乡报备详情" isShowBack isShowBottomBorder @onBackClick="cancel(false)"> <ai-title title="订单详情" isShowBack isShowBottomBorder @onBackClick="cancel(false)">
</ai-title> </ai-title>
</template> </template>
<template slot="content"> <template slot="content">
<AiSidebar :tabTitle="tabList" v-model="currIndex"></AiSidebar> <ai-card title="基本信息">
<div v-show="currIndex === 0"> <template #right>
<ai-card title="基本信息" v-show="currIndex === 0"> <el-button type="primary" v-if="info.orderStatus === '0'" @click="isShow = true">订单核销</el-button>
<template #content> </template>
<ai-wrapper <template #content>
label-width="120px"> <ai-wrapper
<ai-info-item label="姓名" :value="info.name"></ai-info-item> label-width="120px">
<ai-info-item label="填报时间" :value="info.createTime"></ai-info-item> <ai-info-item label="订单编号" :value="info.orderCode"></ai-info-item>
<ai-info-item label="身份证号" :value="info.idNumber"></ai-info-item> <ai-info-item label="订单状态" :value="dict.getLabel('merchandiseOrderStatus', info.orderStatus)"></ai-info-item>
<ai-info-item label="手机号码" :value="info.phone"></ai-info-item> <ai-info-item label="兑换人" :value="info.consumerName"></ai-info-item>
<ai-info-item label="人员类别" :value="dict.getLabel('EP_registerPersonType', info.type)"></ai-info-item> <ai-info-item label="兑换时间" :value="info.createTime"></ai-info-item>
<ai-info-item label="是否从事高危行业" :value="dict.getLabel('EP_highRiskIndustries', info.highRiskIndustries)"></ai-info-item> <ai-info-item label="备注" isLine :value="info.remark"></ai-info-item>
</ai-wrapper> </ai-wrapper>
</template> </template>
</ai-card> </ai-card>
<ai-card title="行程信息"> <ai-card title="操作信息">
<template #content> <template #content>
<ai-wrapper <ai-wrapper
label-width="120px"> label-width="120px">
<ai-info-item label="出发时间" :value="info.startTime"></ai-info-item> <ai-info-item label="核销人" :value="info.auditUserName"></ai-info-item>
<ai-info-item label="出发地" > <ai-info-item label="核销时间" :value="info.auditTime"></ai-info-item>
<span :style="{color: info.denger == 1 ? '#FF4466' : '#333'}">{{info.startAreaName}} </span> </ai-wrapper>
</ai-info-item> </template>
<ai-info-item label="出发地详址" isLine :value="info.startAddress"></ai-info-item> </ai-card>
<ai-info-item label="出行方式" :value="info.travelTypeNames"></ai-info-item> <ai-card title="操作信息">
<ai-info-item label="车次/航班" isLine :value="info.trainNo"></ai-info-item> <template #content>
<ai-info-item label="行程描述" :value="info.description"></ai-info-item> <ai-wrapper
<ai-info-item label="抵平卡口" :value="info.gatewayName"></ai-info-item> label-width="120px">
<ai-info-item label="抵平时间" :value="info.arriveTime"></ai-info-item> <ai-info-item label="核销人" :value="info.auditUserName"></ai-info-item>
<ai-info-item label="目的地" :value="info.arriveAreaName"></ai-info-item> <ai-info-item label="核销时间" :value="info.auditTime"></ai-info-item>
<ai-info-item label="目的地详址" isLine :value="info.arriveAddress"></ai-info-item> </ai-wrapper>
</ai-wrapper> </template>
</template> </ai-card>
</ai-card> <ai-card title="商品信息">
<ai-card title="健康状况"> <template #content>
<template #content> <ai-table
<ai-wrapper :tableData="tableData"
label-width="120px"> :isShowPagination="false"
<ai-info-item label="是否有风险旅居史" v-if="info.fromHighRiskArea === '1'"> :col-configs="colConfigs"
<span style="color: red">{{ info.highRiskAreaName }}</span> @getList="() => {}">
</ai-info-item> <el-table-column slot="goods" width="240px" label="商品" align="left">
<ai-info-item label="是否有风险旅居史" v-else value="否"></ai-info-item> <template slot-scope="{ row }">
<ai-info-item label="7天内是否接触新冠确诊或疑似患者"> <div class="goods">
<span :style="{color: info.contactPatients === '1' ? 'red' : ''}">{{ dict.getLabel('yesOrNo', info.contactPatients) }}</span> <img :src="row.imageUrl">
</ai-info-item> <span>{{ row.merchandiseName }}</span>
<ai-info-item label="当前健康状况" v-if="info.abnormalHealth === '1'"> </div>
<span style="color: red">{{ dict.getLabel('EP_abnormalType', info.abnormalType) }}</span> </template>
</ai-info-item> </el-table-column>
<ai-info-item label="当前健康状况" v-else value="否"></ai-info-item> </ai-table>
</ai-wrapper> </template>
</template> </ai-card>
</ai-card> <ai-dialog
</div> :visible.sync="isShow"
<div v-show="currIndex === 1"> width="590px"
<ai-card title="风险处置"> title="订单核销"
<template #right> @close="form.code = ''"
<el-button type="primary" v-if="info.status === '0'" @click="release">解除异常</el-button> @onConfirm="onConfirm">
</template> <el-form ref="form" :model="form" label-width="110px" label-position="right">
<template #content> <el-form-item label="核销码" prop="code" :rules="[{required: true, message: '请输入核销码', trigger: 'blur'}]">
<ai-wrapper <el-input size="small" placeholder="请输入核销码" v-model="form.code"></el-input>
label-width="120px"> </el-form-item>
<ai-info-item label="姓名" :value="info.name"></ai-info-item> </el-form>
<ai-info-item label="填报时间" :value="info.createTime"></ai-info-item> </ai-dialog>
<ai-info-item label="身份证号" :value="info.idNumber"></ai-info-item>
<ai-info-item label="手机号码" :value="info.phone"></ai-info-item>
<ai-info-item label="人员类别" :value="dict.getLabel('EP_registerPersonType', info.type)"></ai-info-item>
<ai-info-item label="是否从事高危行业" :value="dict.getLabel('EP_highRiskIndustries', info.highRiskIndustries)"></ai-info-item>
</ai-wrapper>
</template>
</ai-card>
<ai-card title="风险处理意见">
<template #content>
<ai-table
:isShowPagination="false"
tableSize="small"
border
:tableData="info.riskDisposalList"
:col-configs="colConfigs"
@getList="() => {}">
</ai-table>
</template>
</ai-card>
<ai-card title="社区初排" v-if="info.cmAdvanceDisposal">
<template #content>
<ai-wrapper
style="margin-bottom: 20px;"
label-width="120px">
<ai-info-item label="处置意见" :value="dict.getLabel('EP_communityHandleType', info.cmAdvanceDisposal.communityHandleType)"></ai-info-item>
<ai-info-item v-if="info.cmAdvanceDisposal.communityHandleType === '1'" label="居家状态" :value="dict.getLabel('EP_homeStatus2', info.cmAdvanceDisposal.homeStatus)"></ai-info-item>
<ai-info-item v-if="info.cmAdvanceDisposal.communityHandleType === '1'" label="隔离时间" :value="info.cmAdvanceDisposal.quarantineBeginTime + ' - ' + info.cmAdvanceDisposal.quarantineEndTime"></ai-info-item>
<ai-info-item v-if="info.cmAdvanceDisposal.communityHandleType === '1'" label="隔离策略" :value="dict.getLabel('EP_quarantineStrategy', info.cmAdvanceDisposal.quarantineStrategy)"></ai-info-item>
<ai-info-item v-if="info.cmAdvanceDisposal.communityHandleType === '1'" label="管控方式" :value="dict.getLabel('EP_controlMethod', info.cmAdvanceDisposal.controlMethod)"></ai-info-item>
<ai-info-item v-if="info.cmAdvanceDisposal.communityHandleType === '1'" label="图片" isLine>
<ai-uploader
:instance="instance"
:value="info.cmAdvanceDisposal.fileList"
disabled
:limit="9">
</ai-uploader>
</ai-info-item>
<ai-info-item v-if="info.cmAdvanceDisposal.communityHandleType === '2'" label="风险解除证明文件" isLine>
<ai-uploader
:instance="instance"
:value="info.cmAdvanceDisposal.proveFileList"
disabled
:limit="9">
</ai-uploader>
</ai-info-item>
</ai-wrapper>
<ai-empty style="margin-bottom: 60px;" v-if="!info.cmAdvanceDisposal"></ai-empty>
</template>
</ai-card>
</div>
</template> </template>
</ai-detail> </ai-detail>
</template> </template>
@@ -139,12 +89,15 @@
currIndex: 0, currIndex: 0,
isLoading: false, isLoading: false,
tableData: [], tableData: [],
form: {
code: ''
},
colConfigs: [ colConfigs: [
{prop: 'remarks', label: '异常记录', align: 'center' }, { slot: 'goods', label: '商品' },
{prop: 'createTime', label: '创建时间', align: 'center'}, { prop: 'merchandiseIntegral', align: 'center', label: '单价' },
{prop: 'createUserName', label: '记录人', align: 'center' } { prop: 'merchandiseNumber', align: 'center', label: '数量' },
{ prop: 'merchandiseIntegral', align: 'center', label: '小计' }
], ],
tabList: ['基本信息', '风险处置']
} }
}, },
@@ -152,7 +105,7 @@
this.isLoading = true this.isLoading = true
if (this.params && this.params.id) { if (this.params && this.params.id) {
this.id = this.params.id this.id = this.params.id
this.$dict.load(['EP_registerPersonType', 'EP_communityHandleType', 'EP_highRiskIndustries', 'EP_travelType', 'yesOrNo', 'EP_homeStatus2', 'EP_quarantineStrategy', 'EP_controlMethod', 'EP_abnormalType']).then(() => { this.dict.load(['merchandiseOrderStatus']).then(() => {
this.getInfo(this.params.id) this.getInfo(this.params.id)
}) })
} }
@@ -160,12 +113,10 @@
methods: { methods: {
getInfo (id) { getInfo (id) {
this.instance.post(`/app/appepidemicpreventionregisterinfo/queryDetailById?id=${id}`).then(res => { this.instance.post(`/app/appintegralmerchandiseorder/queryDetailById?id=${id}`).then(res => {
if (res.code === 0) { if (res.code === 0) {
this.info = res.data this.info = res.data
this.info.travelTypeNames = res.data.travelType.split(',').map(v => { this.tableData = [this.info]
return this.dict.getLabel('EP_travelType', v)
}).join('')
} }
this.isLoading = false this.isLoading = false
@@ -174,6 +125,25 @@
}) })
}, },
onConfirm() {
this.$refs.form.validate((valid) => {
if (valid) {
this.instance.post(`/app/appintegralmerchandiseorder/writeOffOrder`, null, {
params: {
code: this.form.code,
id: this.params.id
}
}).then(res => {
if (res.code == 0) {
this.isShow = false
this.getList()
this.$message.success('核销成功')
}
})
}
})
},
cancel () { cancel () {
this.$emit('change', { this.$emit('change', {
type: 'List', type: 'List',
@@ -185,4 +155,15 @@
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.detail .goods {
display: flex;
align-items: center;
img {
width: 80px;
height: 80px;
margin-right: 20px;
}
}
</style> </style>

View File

@@ -10,17 +10,17 @@
<template #left> <template #left>
<ai-user-selecter :instance="instance" @change="onUserChange" :isMultiple="false"> <ai-user-selecter :instance="instance" @change="onUserChange" :isMultiple="false">
<div class="userSelcet"> <div class="userSelcet">
<span style="color: #606266;" v-if="search.createUserId">{{ name }}</span> <span style="color: #606266;" v-if="search.consumerId">{{ name }}</span>
<span v-else>兑换人</span> <span v-else>兑换人</span>
<i class="el-icon-arrow-up" v-if="!search.createUserId"></i> <i class="el-icon-arrow-up" v-if="!search.consumerId"></i>
<i class="el-icon-circle-close" v-if="search.createUserId" @click.stop="user = [], search.createUserId = '', name = '', search.current = 1, getList()"></i> <i class="el-icon-circle-close" v-if="search.consumerId" @click.stop="user = [], search.consumerId = '', name = '', search.current = 1, getList()"></i>
</div> </div>
</ai-user-selecter> </ai-user-selecter>
<ai-select <ai-select
v-model="search.source" v-model="search.orderStatus"
clearable clearable
placeholder="请选择订单状态" placeholder="请选择订单状态"
:selectList="dict.getDict('merchandiseStatus')" :selectList="dict.getDict('merchandiseOrderStatus')"
@change="search.current = 1, getList()"> @change="search.current = 1, getList()">
</ai-select> </ai-select>
<el-date-picker <el-date-picker
@@ -42,19 +42,19 @@
</template> </template>
<template #right> <template #right>
<el-input <el-input
v-model="search.name" v-model="search.merchandiseName"
size="small" size="small"
placeholder="请输入商品名称" placeholder="请输入商品名称"
clearable clearable
v-throttle="() => {search.current = 1, getList()}" v-throttle="() => {search.current = 1, getList()}"
@clear="search.current = 1, search.name = '', getList()" @clear="search.current = 1, search.merchandiseName = '', getList()"
suffix-icon="iconfont iconSearch"> suffix-icon="iconfont iconSearch">
</el-input> </el-input>
</template> </template>
</ai-search-bar> </ai-search-bar>
<ai-search-bar style="margin-top: 12px" bottomBorder> <ai-search-bar style="margin-top: 12px" bottomBorder>
<template #left> <template #left>
<el-button size="small" type="primary" icon="iconfont iconAdd" @click="toAdd('')">订单核销</el-button> <!-- <el-button size="small" type="primary" icon="iconfont iconAdd" @click="toAdd('')">订单核销</el-button> -->
<ai-download :instance="instance" url="/app/appepidemicpreventionregisterinfo/export" :params="search" fileName="订单" :disabled="tableData.length == 0"> <ai-download :instance="instance" url="/app/appepidemicpreventionregisterinfo/export" :params="search" fileName="订单" :disabled="tableData.length == 0">
<el-button icon="iconfont iconExported" :disabled="tableData.length == 0">导出订单</el-button> <el-button icon="iconfont iconExported" :disabled="tableData.length == 0">导出订单</el-button>
</ai-download> </ai-download>
@@ -79,15 +79,27 @@
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column slot="options" width="100px" fixed="right" label="操作" align="center"> <el-table-column slot="options" width="140px" fixed="right" label="操作" align="center">
<template slot-scope="{ row }"> <template slot-scope="{ row }">
<div class="table-options"> <div class="table-options">
<el-button type="text" v-if="row.orderStatus === '0'" @click="id = row.id, isShow = true">订单核销</el-button>
<el-button type="text" @click="toDetail(row.id)">详情</el-button> <el-button type="text" @click="toDetail(row.id)">详情</el-button>
<el-button type="text" @click="remove(row.id)">删除</el-button>
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
</ai-table> </ai-table>
<ai-dialog
:visible.sync="isShow"
width="590px"
title="订单核销"
@close="form.code = '', id = ''"
@onConfirm="onConfirm">
<el-form ref="form" :model="form" label-width="110px" label-position="right">
<el-form-item label="核销码" prop="code" :rules="[{required: true, message: '请输入核销码', trigger: 'blur'}]">
<el-input size="small" placeholder="请输入核销码" v-model="form.code"></el-input>
</el-form-item>
</el-form>
</ai-dialog>
</template> </template>
</ai-list> </ai-list>
</template> </template>
@@ -106,27 +118,41 @@
search: { search: {
current: 1, current: 1,
size: 10, size: 10,
name: '', merchandiseName: '',
createUserId: '' orderStatus: '',
consumerId: ''
}, },
id: '',
form: {
code: ''
},
isShow: false,
user: [], user: [],
name: '', name: '',
info: {}, info: {},
colConfigs: [ colConfigs: [
{ slot: 'goods', label: '商品' }, { slot: 'goods', label: '商品' },
{ prop: 'phone', align: 'center', label: '单价/数量' }, { prop: 'merchandiseIntegral', align: 'center', label: '单价' },
{ prop: 'startTime', align: 'center', label: '消耗积分' }, { prop: 'merchandiseNumber', align: 'center', label: '数量' },
{ prop: 'startAreaName', align: 'center', label: '兑换人' }, // {
// prop: 'areaName', label: '活动地区', align: 'center' ,
// render: (h, params) => {
// return h('span', {
// }, params.row.areaName)
// }
// },
{ prop: 'merchandiseIntegral', align: 'center', label: '消耗积分' },
{ prop: 'consumerName', align: 'center', label: '兑换人' },
{ {
prop: 'arriveTime', prop: 'createTime',
align: 'center', align: 'center',
label: '兑换时间' label: '兑换时间'
}, },
{ {
prop: 'status', prop: 'orderStatus',
align: 'center', align: 'center',
label: '状态', label: '状态',
formart: v => this.dict.getLabel('merchandiseStatus', v) formart: v => this.dict.getLabel('merchandiseOrderStatus', v)
} }
], ],
ids: [], ids: [],
@@ -138,7 +164,7 @@
}, },
created () { created () {
this.dict.load(['merchandiseStatus']).then(() => { this.dict.load(['merchandiseOrderStatus']).then(() => {
this.getList() this.getList()
}) })
}, },
@@ -148,6 +174,25 @@
}, },
onConfirm() {
this.$refs.form.validate((valid) => {
if (valid) {
this.instance.post(`/app/appintegralmerchandiseorder/writeOffOrder`, null, {
params: {
code: this.form.code,
id: this.id
}
}).then(res => {
if (res.code == 0) {
this.isShow = false
this.getList()
this.$message.success('核销成功')
}
})
}
})
},
getList () { getList () {
this.instance.post(`/app/appintegralmerchandiseorder/list`, null, { this.instance.post(`/app/appintegralmerchandiseorder/list`, null, {
params: { params: {
@@ -158,7 +203,6 @@
} }
}).then(res => { }).then(res => {
if (res.code == 0) { if (res.code == 0) {
console.log(res.data.records)
this.tableData = res.data.records this.tableData = res.data.records
this.total = res.data.total this.total = res.data.total
} }
@@ -172,17 +216,6 @@
id: id || '' id: id || ''
} }
}) })
},
remove(id) {
this.$confirm('确定删除该数据?').then(() => {
this.instance.post(`/app/appepidemicpreventionregisterinfo/delete?id=${id}`).then(res => {
if (res.code == 0) {
this.$message.success('删除成功!')
this.getList()
}
})
})
} }
} }
} }