Commit d7f6c3c2 authored by daywrite's avatar daywrite

添加列表

parent 3c6af816
require('./check-versions')() require('./check-versions')()
let proxyMock = require('express-proxy-mock') // let proxyMock = require('express-proxy-mock')
var config = require('../config') var config = require('../config')
if (!process.env.NODE_ENV) { if (!process.env.NODE_ENV) {
...@@ -24,7 +24,7 @@ var autoOpenBrowser = !!config.dev.autoOpenBrowser ...@@ -24,7 +24,7 @@ var autoOpenBrowser = !!config.dev.autoOpenBrowser
var proxyTable = config.dev.proxyTable var proxyTable = config.dev.proxyTable
var app = express() var app = express()
proxyMock(app) // proxyMock(app)
var compiler = webpack(webpackConfig) var compiler = webpack(webpackConfig)
var devMiddleware = require('webpack-dev-middleware')(compiler, { var devMiddleware = require('webpack-dev-middleware')(compiler, {
......
[{"url":"http://vue.jinchangxiao.com","target":"http://localhost:8885","hasProxy":true,"ignorePath":false}] []
\ No newline at end of file \ No newline at end of file
<template> <template>
<section> <section>
<el-radio-group size="mini" v-model="item"> <el-radio-group size="mini" v-model="item">
<el-radio-button v-for="(radio, key) in optionsList" :key="key" :label="radio.name" :value="radio.value">{{ radio.value }}</el-radio-button> <el-radio-button v-for="(radio, key) in optionsList" :key="key" :label="radio.key" :value="radio.name">{{ radio.name }}</el-radio-button>
</el-radio-group> </el-radio-group>
</section> </section>
</template> </template>
...@@ -15,5 +15,5 @@ ...@@ -15,5 +15,5 @@
</script> </script>
<style scoped> <style scoped>
</style> </style>
<template>
<section class="obear-countArr-section">
<div class="obear-countArr-row">
<div class="obear-countArr-row__col" v-for="item in list" :key="item.key">
<div class="obear-countArr-option">
<span class="obear-countArr-option__label">{{ item.name }}</span>
<span class="obear-countArr-option__number">{{ item.count }}</span>
<span class="obear-countArr-option__unit"></span>
<br>
<span class="obear-countArr-option__number">{{ item.value }}</span>
<span class="obear-countArr-option__unit"></span>
<a class="obear-report-link btn-status" href="javascript:void(0);" data-id=""><i class="fa fa-fw fa-external-link"></i></a>
</div>
</div>
</div>
</section>
</template>
<script>
export default {
name: 'countArr',
props: {
list: Array
}
}
</script>
<style lang="scss" scoped>
@include c('countArr-section'){
background-color:white;
}
@include c('countArr-row'){
display: flex;
-ms-flex-wrap: wrap;
flex-wrap: wrap;
justify-content:center;
align-items:center;
@include e('col'){
position: relative;
width: 100%;
min-height: 1px;
padding-right: 15px;
padding-left: 15px;
-ms-flex-preferred-size: 0;
flex-basis: 0;
-ms-flex-positive: 1;
flex-grow: 1;
max-width: 100%;
}
}
@include c('countArr-option'){
position: relative;
margin-top: 15px;
margin-bottom: 15px;
color: #FFF;
padding: 0 0 6px;
text-align: center;
border-top-right-radius: 4px;
border-top-left-radius: 4px;
border-bottom-right-radius: 4px;
border-bottom-left-radius: 4px;
background-color:#98c450;
@include e('label'){
display: block;
color: #fff;
font-size: 14px;
padding: 3px 0;
margin-bottom: 3px;
border-bottom: 1px solid #FFF;
border-top-right-radius: 4px;
border-top-left-radius: 4px;
}
@include e('number'){
font-size: 22px;
}
}
@include c('report-link'){
color: #FFF;
position: absolute;
bottom: 6px;
right: 6px;
}
</style>
...@@ -14,14 +14,19 @@ ...@@ -14,14 +14,19 @@
:filter="filter" :filter="filter"
@update:clientList="form =>{ updateForm(form) }"> @update:clientList="form =>{ updateForm(form) }">
</search-form> </search-form>
<div class="page-body-content leaveMessage"> <div class="page-body-content">
<div class="mb10"> <div class="mb10">
<singleRadioTool <singleRadioTool
:form-item="reimType" :form-item="reimType"
:options-list="reimTypeArray" :options-list="result.navCount"
@update:item="val => {reimType = val}"> @update:item="val => {reimType = val}">
</singleRadioTool> </singleRadioTool>
</div> </div>
<div class="mb10">
<countArr
:list="result.countArr">
</countArr>
</div>
<ReimItem <ReimItem
v-for="item in result.list" v-for="item in result.list"
:item="item" :item="item"
...@@ -40,7 +45,7 @@ ...@@ -40,7 +45,7 @@
v-click-outside="lmClose" v-click-outside="lmClose"
ref="leaveMessage" ref="leaveMessage"
:lmTemplate="lmTemplate" :lmTemplate="lmTemplate"
:type="9"> :type="20">
</leave-message> </leave-message>
</div> </div>
</div> </div>
...@@ -56,6 +61,7 @@ import SearchHeader from '../common/searchHeader' ...@@ -56,6 +61,7 @@ import SearchHeader from '../common/searchHeader'
import SearchForm from '../common/SearchForm' import SearchForm from '../common/SearchForm'
import ReimItem from './reimbursementItem' import ReimItem from './reimbursementItem'
import ScheduleModal from '../schedule/scheduleModal' import ScheduleModal from '../schedule/scheduleModal'
import CountArr from './countArr'
// import LeaveMessage from '../common/leaveMessage' // import LeaveMessage from '../common/leaveMessage'
import Pagenation from './reimbursementPagenation' import Pagenation from './reimbursementPagenation'
import clickOutside from '@/lib/bind' import clickOutside from '@/lib/bind'
...@@ -72,6 +78,7 @@ export default { ...@@ -72,6 +78,7 @@ export default {
SearchForm, SearchForm,
ReimItem, ReimItem,
ScheduleModal, ScheduleModal,
CountArr,
// LeaveMessage, // LeaveMessage,
Pagenation, Pagenation,
singleRadioTool singleRadioTool
...@@ -85,41 +92,33 @@ export default { ...@@ -85,41 +92,33 @@ export default {
return { return {
lmTemplate: [ lmTemplate: [
{ {
name: '客户名称', name: '报销类型',
value: 'client.name', value: 'type.name',
default: '未设置' default: ''
},
{
name: '内容',
value: 'description'
},
{
name: '待办时间',
value: 'schedule_week_display'
}, },
{ {
name: '状态', name: '费用金额',
value: 'schedule_status_display' value: 'amount'
}, },
{ {
name: '开始时间', name: '报销状态',
value: 'start_at' value: 'status_display'
}, },
{ {
name: '结束时间', name: '发生时间',
value: 'end_at' value: 'occurrence_at'
}, },
{ {
name: '重复', name: '费用说明',
value: 'repeatSchedule' value: 'description'
}, },
{ {
name: '负责人', name: '费用类型',
value: 'repeatSchedule' value: 'costType.name'
}, },
{ {
name: '创建时间', name: '录入人',
value: 'created_at' value: 'createdBy.name'
} }
], ],
filter: [], filter: [],
...@@ -127,30 +126,15 @@ export default { ...@@ -127,30 +126,15 @@ export default {
'ClientSearch[keyword]': '' 'ClientSearch[keyword]': ''
}, },
reimType: '', reimType: '',
reimTypeArray: [ // reimTypeArray: [],
{
'name': 0,
'value': '报销单'
},
{
'name': 1,
'value': '我审核的'
},
{
'name': 2,
'value': '抄送我的'
},
{
'name': 3,
'value': '我结算的'
}
],
pagenation: { pagenation: {
thispage: 1, thispage: 1,
pagesize: 10 pagesize: 10
}, },
result: { result: {
list: [], list: [],
countArr: [],
navCount: [],
pagenation: { pagenation: {
totalcount: 1, totalcount: 1,
thispage: 1, thispage: 1,
...@@ -181,12 +165,12 @@ export default { ...@@ -181,12 +165,12 @@ export default {
updateForm (search) { updateForm (search) {
Object.assign(this.form, search) Object.assign(this.form, search)
this.getScheduleList() this.getList()
}, },
updatePage (pager) { updatePage (pager) {
Object.assign(this.pagenation, pager) Object.assign(this.pagenation, pager)
this.getScheduleList() this.getList()
}, },
getFilter () { getFilter () {
...@@ -196,12 +180,12 @@ export default { ...@@ -196,12 +180,12 @@ export default {
}, },
leaveMessageSch (item) { leaveMessageSch (item) {
this.$refs.leaveMessage.isShow(item) this.$refs.leaveMessage.btnShow(item)
}, },
lmClose () { lmClose () {
this.$refs.leaveMessage && this.$refs.leaveMessage &&
this.$refs.leaveMessage.isClose() this.$refs.leaveMessage.btnClose()
}, },
scheduleClose () { scheduleClose () {
...@@ -239,11 +223,16 @@ export default { ...@@ -239,11 +223,16 @@ export default {
}).then((res) => { }).then((res) => {
const { const {
list = [], list = [],
countArr = [],
navCount = [],
pagenation = {}, pagenation = {},
thisUser = {} thisUser = {}
} = res } = res
this.result.list = list this.result.list = list
this.result.countArr = countArr
this.result.navCount = navCount
this.reimType = navCount[0].key
this.result.pagenation = pagenation this.result.pagenation = pagenation
this.result.thisUser = thisUser this.result.thisUser = thisUser
}) })
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
<span>{{ item.type.name }}</span> <span>{{ item.type.name }}</span>
</el-col> </el-col>
<el-col :span="24"> <el-col :span="24">
<span>¥{{ item.amount }}</span> <span>{{ '¥ ' + item.amount }}</span>
</el-col> </el-col>
<el-col :span="24" style="padding-left: 3px;"> <el-col :span="24" style="padding-left: 3px;">
<span> <span>
...@@ -33,10 +33,10 @@ ...@@ -33,10 +33,10 @@
</el-row> </el-row>
<el-row :gutter="10"> <el-row :gutter="10">
<el-col :span="6" :xs="24"> <el-col :span="6" :xs="24">
<span>客户名称:</span><span>{{ item.client.name }}</span> <span>客户名称:</span><span class="colBlue">{{ item.client.name }}</span>
</el-col> </el-col>
<el-col :span="6" :xs="24"> <el-col :span="6" :xs="24">
<span>项目名称:</span><span>{{ item.project.name }}</span> <span>项目名称:</span><span class="collightBlue">{{ item.project.name }}</span>
</el-col> </el-col>
<el-col :span="6" :xs="24"> <el-col :span="6" :xs="24">
<span>审核人:</span> <span>审核人:</span>
...@@ -47,7 +47,7 @@ ...@@ -47,7 +47,7 @@
</el-row> </el-row>
<el-row :gutter="10"> <el-row :gutter="10">
<el-col :span="6" :xs="24"> <el-col :span="6" :xs="24">
<span>提交时间:</span><span>{{ item.created_at }}</span> <span>提交时间:</span><span class="collightBlue">{{ item.created_at }}</span>
</el-col> </el-col>
<el-col :span="6" :xs="24"> <el-col :span="6" :xs="24">
<span>结算人:</span><span>{{ item.settleAccountsBy.name }}</span> <span>结算人:</span><span>{{ item.settleAccountsBy.name }}</span>
...@@ -111,6 +111,12 @@ export default { ...@@ -111,6 +111,12 @@ export default {
.colWhite { .colWhite {
color: white; color: white;
} }
.collightBlue {
color: #649FD7;
}
.colBlue {
color: #0056b3;
}
.rounded-circle { .rounded-circle {
border-radius: 50% !important; border-radius: 50% !important;
} }
...@@ -138,6 +144,7 @@ export default { ...@@ -138,6 +144,7 @@ export default {
} }
@include c('schedule-left') { @include c('schedule-left') {
background-color: #EB7567; background-color: #EB7567;
color: white;
min-height: 100%; min-height: 100%;
padding: 10px 15px 6px; padding: 10px 15px 6px;
> .el-row { > .el-row {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment