<style scoped>
|
.title {
|
height: 60px;
|
line-height: 60px;
|
}
|
|
.search {
|
background-color: #fff;
|
height: 80px;
|
display: flex;
|
align-items: center;
|
}
|
|
.search_thing {
|
width: 350px;
|
display: flex;
|
align-items: center;
|
}
|
|
.search_label {
|
width: 110px;
|
font-size: 14px;
|
text-align: right;
|
}
|
|
.search_input {
|
width: calc(100% - 110px);
|
}
|
|
.table {
|
margin-top: 10px;
|
background-color: #fff;
|
width: calc(100% - 40px);
|
height: calc(100% - 60px - 80px - 10px - 40px);
|
padding: 20px;
|
}
|
</style>
|
<style>
|
.data_reporting .data_reporting_dia .el-dialog__body{
|
padding: 15px 0;
|
}
|
</style>
|
|
<template>
|
<div class="data_reporting">
|
<div>
|
<el-row class="title">
|
<el-col :span="12" style="padding-left: 20px;">数据上报</el-col>
|
<el-col :span="12" style="text-align: right;padding-right: 8px;">
|
<el-button size="small" @click="$refs.ValueTable.openDownDia()">
|
<i class="el-icon-download" style="color: #3A7BFA;"></i>
|
<span style="color: #3A7BFA;">导出</span>
|
</el-button>
|
</el-col>
|
</el-row>
|
</div>
|
<div class="search">
|
<div class="search_thing">
|
<div class="search_label">系统日期:</div>
|
<div class="search_input">
|
<el-date-picker size="small" v-model="componentData.entity.updateTime" type="date" placeholder="选择日期" value-format="yyyy-MM-dd HH:mm:ss" clearable></el-date-picker>
|
</div>
|
</div>
|
<div class="search_thing">
|
<div class="search_label">登记人:</div>
|
<div class="search_input">
|
<el-input size="small" v-model="componentData.entity.registrant" clearable placeholder="登记人" @keyup.enter.native="refreshTable()"></el-input>
|
</div>
|
</div>
|
<div class="search_thing">
|
<div class="search_label">项目:</div>
|
<div class="search_input">
|
<el-select size="small" style="width: 100%;" placeholder="请选择" v-model="componentData.entity.product">
|
<el-option :value="null" label="全部"></el-option>
|
<el-option v-for="(a, ai) in product" :key="ai" :label="a.product" :value="a.product"></el-option>
|
</el-select>
|
</div>
|
</div>
|
<div class="search_thing" style="padding-left: 30px;">
|
<el-button size="small" @click="refresh()">重 置</el-button>
|
<el-button size="small" type="primary" @click="refreshTable()">查 询</el-button>
|
</div>
|
</div>
|
<div class="table">
|
<ValueTable ref="ValueTable" :url="$api.dataReporting.selectDataReportingList" :componentData="componentData"
|
:key="upIndex" @upRole="upRole" />
|
</div>
|
<el-dialog title="上报修改" :visible.sync="upDia" width="700px" class="data_reporting_dia">
|
<div class="body" v-if="upDia">
|
<el-row style="line-height: 50px;">
|
<el-col :span="4" style="text-align: right;padding-right: 8px;">系统日期</el-col>
|
<el-col :span="7">
|
<el-input v-model="upData.updateTime" size="small" disabled></el-input>
|
</el-col>
|
<el-col :span="4" style="text-align: right;padding-right: 8px;">登记人</el-col>
|
<el-col :span="7">
|
<el-input v-model="upData.registrant" size="small" disabled></el-input>
|
</el-col>
|
</el-row>
|
<el-row style="line-height: 50px;">
|
<el-col :span="4" style="text-align: right;padding-right: 8px;">部门</el-col>
|
<el-col :span="7">
|
<el-input v-model="upData.department" size="small" disabled></el-input>
|
</el-col>
|
<el-col :span="4" style="text-align: right;padding-right: 8px;">账户名</el-col>
|
<el-col :span="7">
|
<el-input v-model="upData.name" size="small" disabled></el-input>
|
</el-col>
|
</el-row>
|
<el-row style="line-height: 50px;">
|
<el-col :span="4" style="text-align: right;padding-right: 8px;">渠道</el-col>
|
<el-col :span="7">
|
<el-input v-model="upData.channel" size="small" disabled></el-input>
|
</el-col>
|
<el-col :span="4" style="text-align: right;padding-right: 8px;">项目</el-col>
|
<el-col :span="7">
|
<el-input v-model="upData.product" size="small" disabled></el-input>
|
</el-col>
|
</el-row>
|
<el-row style="line-height: 50px;">
|
<el-col :span="4" style="text-align: right;padding-right: 8px;">展现量</el-col>
|
<el-col :span="7">
|
<el-input v-model="upData.show" size="small" disabled></el-input>
|
</el-col>
|
<el-col :span="4" style="text-align: right;padding-right: 8px;">点击量</el-col>
|
<el-col :span="7">
|
<el-input v-model="upData.click" size="small" disabled></el-input>
|
</el-col>
|
</el-row>
|
<el-row style="line-height: 50px;">
|
<el-col :span="4" style="text-align: right;padding-right: 8px;">账户消费</el-col>
|
<el-col :span="7">
|
<el-input v-model="upData.accountConsumption" size="small" disabled></el-input>
|
</el-col>
|
<el-col :span="4" style="text-align: right;padding-right: 8px;">客户返点消费</el-col>
|
<el-col :span="7">
|
<el-input v-model="upData.rebateConsumption" size="small" disabled></el-input>
|
</el-col>
|
</el-row>
|
<el-row style="line-height: 50px;">
|
<el-col :span="4" style="text-align: right;padding-right: 8px;">消费</el-col>
|
<el-col :span="7">
|
<el-input v-model="upData.consumption" size="small" disabled></el-input>
|
</el-col>
|
<el-col :span="4" style="text-align: right;padding-right: 8px;">折后消费</el-col>
|
<el-col :span="7">
|
<el-input v-model="upData.discountedConsumption" size="small" disabled></el-input>
|
</el-col>
|
</el-row>
|
<el-row style="line-height: 50px;">
|
<el-col :span="4" style="text-align: right;padding-right: 8px;">进粉</el-col>
|
<el-col :span="7">
|
<el-input v-model="upData.fansAdd" size="small" disabled></el-input>
|
</el-col>
|
<el-col :span="4" style="text-align: right;padding-right: 8px;">实际成本</el-col>
|
<el-col :span="7">
|
<el-input v-model="upData.actualCost" size="small" disabled></el-input>
|
</el-col>
|
</el-row>
|
<el-row style="line-height: 50px;">
|
<el-col :span="4" style="text-align: right;padding-right: 8px;">利润</el-col>
|
<el-col :span="7">
|
<el-input v-model="upData.profit" size="small" disabled></el-input>
|
</el-col>
|
<el-col :span="4" style="text-align: right;padding-right: 8px;">代理返点</el-col>
|
<el-col :span="7">
|
<el-input v-model="upData.agentRebate" size="small" disabled></el-input>
|
</el-col>
|
</el-row>
|
<el-row style="line-height: 50px;">
|
<el-col :span="4" style="text-align: right;padding-right: 8px;">内部成本</el-col>
|
<el-col :span="7">
|
<el-input v-model="upData.internalCosts" size="small"></el-input>
|
</el-col>
|
<el-col :span="4" style="text-align: right;padding-right: 8px;">客户成本</el-col>
|
<el-col :span="7">
|
<el-input v-model="upData.customerCosts" size="small"></el-input>
|
</el-col>
|
</el-row>
|
<el-row style="line-height: 50px;">
|
<el-col :span="4" style="text-align: right;padding-right: 8px;">客户返点</el-col>
|
<el-col :span="7">
|
<el-input v-model="upData.customerRebate" size="small"></el-input>
|
</el-col>
|
<el-col :span="4" style="text-align: right;padding-right: 8px;">备用字段</el-col>
|
<el-col :span="7">
|
<el-input v-model="upData.remark" size="small"></el-input>
|
</el-col>
|
</el-row>
|
</div>
|
<span slot="footer" class="dialog-footer" style="margin-right: 18px;">
|
<el-button type="primary" @click="saveUpData" :loading="upLoad">确 定</el-button>
|
<el-button @click="upDia = false">取 消</el-button>
|
</span>
|
</el-dialog>
|
</div>
|
</template>
|
|
<script>
|
import ValueTable from '../tool/value-table.vue'
|
export default {
|
components: {
|
ValueTable
|
},
|
data() {
|
return {
|
componentData: {
|
entity: {
|
updateTime: null,
|
registrant: null,
|
product: null,
|
orderBy: {
|
field: 'id',
|
order: 'desc'
|
}
|
},
|
isIndex: true,
|
showSelect: true,
|
select: true,
|
do: [{
|
font: '编辑',
|
type: 'text',
|
method: 'upRole'
|
}],
|
tagField: {}
|
},
|
entityCopy: {},
|
upIndex: 0,
|
addDia: false,
|
upDia: false,
|
upLoad: false,
|
upData: {},
|
product: [],
|
}
|
},
|
mounted() {
|
this.entityCopy = this.HaveJson(this.componentData.entity)
|
this.selectProductEnumList()
|
this.getPower()
|
},
|
methods: {
|
refreshTable() {
|
this.$refs['ValueTable'].selectList()
|
},
|
refresh() {
|
this.componentData.entity = this.HaveJson(this.entityCopy)
|
this.upIndex++
|
},
|
upRole(row) {
|
this.upData = this.HaveJson(row)
|
this.upDia = true
|
},
|
saveUpData(){
|
this.upLoad = true
|
delete this.upData.createTime
|
delete this.upData.updateTime
|
delete this.upData.createUser
|
delete this.upData.updateUser
|
this.$axios.post(this.$api.dataReporting.upDataReporting, this.upData, {
|
headers: {
|
'Content-Type': 'application/json'
|
}
|
}).then(res=>{
|
this.upLoad = false
|
if(res.code == 201){
|
return
|
}
|
this.$message.success('修改成功')
|
this.upDia = false
|
this.refreshTable()
|
})
|
},
|
selectProductEnumList(){
|
this.$axios.get(this.$api.enums.selectProductEnumList).then(res=>{
|
this.product = res.data
|
})
|
},
|
// 权限分配
|
getPower(){
|
let power = JSON.parse(sessionStorage.getItem('power'))
|
let up = false
|
for (var i = 0; i < power.length; i++) {
|
if(power[i].menuMethod=='upDataReporting'){
|
up = true
|
break
|
}
|
}
|
if(!up){
|
this.componentData.do = []
|
}
|
}
|
}
|
}
|
</script>
|