
10 changed files with 1081 additions and 22 deletions
@ -0,0 +1,25 @@ |
|||
import request from '@/utils/request' |
|||
// 月度报表 三包索赔单生效率统计表
|
|||
export default { |
|||
// 查询分页列表
|
|||
listPage: function(params) { |
|||
return request({ |
|||
baseURL: "http://127.0.0.1:4523/m1/613533-0-default", |
|||
url: '/as/v1/claimFormRate/listPage', |
|||
method: 'post', |
|||
data: params, |
|||
headers: { |
|||
'Content-Type': 'application/json' |
|||
} |
|||
}) |
|||
}, |
|||
// 查询详情
|
|||
getDetail: function(params) { |
|||
return request({ |
|||
baseURL: "http://127.0.0.1:4523/m1/613533-0-default", |
|||
url: '/as/v1/claimFormRate/getDetail/' + params, |
|||
method: 'get', |
|||
|
|||
}) |
|||
} |
|||
} |
@ -0,0 +1,17 @@ |
|||
import request from '@/utils/request' |
|||
// 月度报表 必备件明细
|
|||
export default { |
|||
// 查询分页列表
|
|||
listPage: function(params) { |
|||
return request({ |
|||
baseURL: "http://127.0.0.1:4523/m1/613533-0-default", |
|||
url: '/as/v1/essentialDetails/listPage', |
|||
method: 'post', |
|||
data: params, |
|||
headers: { |
|||
'Content-Type': 'application/json' |
|||
} |
|||
}) |
|||
}, |
|||
|
|||
} |
@ -0,0 +1,25 @@ |
|||
import request from '@/utils/request' |
|||
// 月度报表 配件库房一次性满足率统计表
|
|||
export default { |
|||
// 查询分页列表
|
|||
listPage: function(params) { |
|||
return request({ |
|||
baseURL: "http://127.0.0.1:4523/m1/613533-0-default", |
|||
url: '/as/v1/oneTimeRate/listPage', |
|||
method: 'post', |
|||
data: params, |
|||
headers: { |
|||
'Content-Type': 'application/json' |
|||
} |
|||
}) |
|||
}, |
|||
// 查询详情
|
|||
getDetail: function(params) { |
|||
return request({ |
|||
baseURL: "http://127.0.0.1:4523/m1/613533-0-default", |
|||
url: '/as/v1/oneTimeRate/getDetail/' + params, |
|||
method: 'get', |
|||
|
|||
}) |
|||
} |
|||
} |
@ -1,8 +1,207 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<!--列表页面--> |
|||
<div v-show="viewState == 1"> |
|||
<button-bar view-title="月度三包索赔单生效率统计表" ref="btnbar" :btndisabled="btndisabled" @btnhandle="btnHandle" /> |
|||
<!--Start查询列表部分--> |
|||
<div class="main-content"> |
|||
<div class="searchcon"> |
|||
<el-button size="small" class="searchbtn" @click="clicksearchShow">{{ searchxianshitit }}</el-button> |
|||
<div v-show="isSearchShow" class="search"> |
|||
<el-form ref="listQueryform" :inline="true" :model="listQuery" class="tab-header"> |
|||
<el-form-item label="选择月份"> |
|||
<el-date-picker v-model="listQuery.params.createStartTime" value-format="yyyy-MM" format="yyyy-MM" |
|||
type="month" placeholder="开始月份"></el-date-picker> |
|||
<span style="padding: 0 8px">至</span> |
|||
<el-date-picker v-model="listQuery.params.createEndTime" value-format="yyyy-MM" format="yyyy-MM" |
|||
type="month" placeholder="结束月份"></el-date-picker> |
|||
</el-form-item> |
|||
<el-form-item label="服务站"> |
|||
<el-input v-model="listQuery.params.deptName" placeholder="" clearable /> |
|||
</el-form-item> |
|||
</el-form> |
|||
<div class="btn" style="text-align: center;"> |
|||
<el-button type="primary" icon="el-icon-search" size="small" @click="handleFilter">查询</el-button> |
|||
<el-button type="primary" icon="el-icon-refresh" size="small" @click="handleReset">重置</el-button> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<!--End查询列表部分--> |
|||
<div class="listtop"> |
|||
<div class="tit">服务站列表</div> |
|||
</div> |
|||
<!--Start 主页面主要部分 --> |
|||
<div class=""> |
|||
<el-table :key="tableKey" v-loading="listLoading" :data="list" border style="width: 100%;" |
|||
@row-click="handle"> |
|||
<!-- <el-table-column fixed type="selection" align="center" width="50" /> --> |
|||
<el-table-column fixed label="序号" type="index" width="80" :index="indexMethod" align="center" /> |
|||
<el-table-column prop="createTime" label="年月" align="center" width="150" /> |
|||
<el-table-column prop="deptName" label="服务站" align="center" /> |
|||
</el-table> |
|||
</div> |
|||
<!--End 主页面主要部分--> |
|||
<div class="pages"> |
|||
<div class="tit" /> |
|||
<!-- 翻页 --> |
|||
<pagination v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" |
|||
:limit.sync="listQuery.size" class="pagination" @pagination="getList" /> |
|||
</div> |
|||
|
|||
</div> |
|||
</div> |
|||
<!--End查询列表部分--> |
|||
<!-- 新增修改部分组件 --> |
|||
<divinfo v-show="viewState == 4" ref="divinfo" @doback="resetState" @reloadlist="getList" /> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
</script> |
|||
import Pagination from '@/components/pagination' |
|||
import pageye from '@/components/pagination/pageye' |
|||
import ButtonBar from '@/components/ButtonBar' |
|||
import req from '@/api/statement/monthlyReport/claimFormRate' |
|||
import divinfo from './claimFormRateDetail.vue' |
|||
|
|||
export default { |
|||
name: 'claimFormRate', |
|||
components: { |
|||
Pagination, |
|||
pageye, |
|||
ButtonBar, |
|||
divinfo |
|||
}, |
|||
data() { |
|||
return { |
|||
btndisabled: false, |
|||
btnList: [{ |
|||
type: 'info', |
|||
size: 'small', |
|||
icon: 'cross', |
|||
btnKey: 'doClose', |
|||
btnLabel: '关闭' |
|||
}], |
|||
isSearchShow: false, |
|||
searchxianshitit: '显示查询条件', |
|||
viewState: 1, // 1、列表 2、新增 3、编辑 4、查看 |
|||
tableKey: 0, |
|||
list: [], |
|||
sids: [], // 用于导出的时候保存已选择的SIDs |
|||
listLoading: false, |
|||
// 翻页 |
|||
listQuery: { |
|||
current: 1, |
|||
size: 10, |
|||
total: 0, |
|||
params: { |
|||
createStartTime: '', |
|||
createEndTime: '', |
|||
deptName: '', |
|||
userSid: '', |
|||
orgPath: '', |
|||
menuUrl: '' |
|||
} |
|||
} |
|||
} |
|||
}, |
|||
created() { |
|||
// 初始化变量 |
|||
this.getList() |
|||
}, |
|||
mounted() { |
|||
this.$refs['btnbar'].setButtonList(this.btnList) |
|||
}, |
|||
methods: { |
|||
handle(row) { |
|||
console.log('handle ' + row.sid) |
|||
|
|||
<style> |
|||
</style> |
|||
this.viewState = 4 |
|||
this.$refs['divinfo'].showAdd(row) |
|||
|
|||
}, |
|||
resetState() { |
|||
this.viewState = 1 |
|||
this.getList() |
|||
}, |
|||
// 搜索条件效果 |
|||
clicksearchShow() { |
|||
this.isSearchShow = !this.isSearchShow |
|||
if (this.isSearchShow) { |
|||
this.searchxianshitit = '隐藏查询条件' |
|||
} else { |
|||
this.searchxianshitit = '显示查询条件' |
|||
} |
|||
}, |
|||
btnHandle(btnKey) { |
|||
console.log('XXXXXXXXXXXXXXX ' + btnKey) |
|||
switch (btnKey) { |
|||
case 'doClose': |
|||
this.doClose() |
|||
break |
|||
default: |
|||
break |
|||
} |
|||
}, |
|||
// 信息条数 获取点击时当前的sid |
|||
handleSelectionChange(row) { |
|||
const aa = [] |
|||
row.forEach(element => { |
|||
aa.push(element.sid) |
|||
}) |
|||
this.sids = aa |
|||
}, |
|||
// 表中序号 |
|||
indexMethod(index) { |
|||
var pagestart = (this.listQuery.current - 1) * this.listQuery.size |
|||
var pageindex = index + 1 + pagestart |
|||
return pageindex |
|||
}, |
|||
// 查询列表信息 |
|||
getList() { |
|||
this.listLoading = true |
|||
this.listQuery.params.userSid = window.sessionStorage.getItem('userSid') |
|||
this.listQuery.params.orgPath = window.sessionStorage.getItem('defaultOrgPath') |
|||
this.listQuery.params.menuUrl = this.$route.path |
|||
req.listPage(this.listQuery).then((response) => { |
|||
this.listLoading = false |
|||
if (response.success) { |
|||
this.list = response.data.records |
|||
this.listQuery.total = response.data.total |
|||
} else { |
|||
this.list = [] |
|||
this.listQuery.total = 0 |
|||
} |
|||
}) |
|||
}, |
|||
// 查询按钮 |
|||
handleFilter() { |
|||
this.listQuery.current = 1 |
|||
this.getList() |
|||
}, |
|||
// 点击重置 |
|||
handleReset() { |
|||
this.listQuery = { |
|||
current: 1, |
|||
size: 10, |
|||
total: 0, |
|||
params: { |
|||
createStartTime: '', |
|||
createEndTime: '', |
|||
deptName: '', |
|||
userSid: '', |
|||
orgPath: '', |
|||
menuUrl: '' |
|||
} |
|||
} |
|||
this.getList() |
|||
}, |
|||
doClose() { |
|||
this.$store.dispatch('tagsView/delView', this.$route) |
|||
this.$router.go(-1) |
|||
} |
|||
|
|||
} |
|||
} |
|||
</script> |
|||
<style scoped> |
|||
</style> |
|||
|
@ -0,0 +1,91 @@ |
|||
<template> |
|||
<div> |
|||
<div class="tab-header webtop"> |
|||
<!-- 标题 --> |
|||
<div style="margin: 0 auto;">{{title}}</div> |
|||
<!-- start 添加修改按钮 --> |
|||
<div> |
|||
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button> |
|||
</div> |
|||
<!-- end 详情按钮 --> |
|||
</div> |
|||
|
|||
<div style="margin-top: 10px; height: 100%;"> |
|||
|
|||
<el-table :key="tableKey" v-loading="listLoading" height="650px" :data="list" border |
|||
style="width: 100%;margin-bottom: 50px;"> |
|||
<el-table-column fixed label="序号" type="index" width="80" :index="index+1" align="center" /> |
|||
<el-table-column prop="stationEntryDate" label="进站日期" width="100" align="center" /> |
|||
<el-table-column prop="completionMonth" label="竣工月份" width="100" align="center" /> |
|||
<el-table-column prop="completionDate" label="竣工日期" width="100" align="center" /> |
|||
<el-table-column prop="settlementDate" label="结算日期" width="100" align="center" /> |
|||
<el-table-column prop="repairOrderNo" label="维修单号" width="100" align="center" /> |
|||
<el-table-column prop="vehMark" label="车牌号" width="100" align="center" /> |
|||
<el-table-column prop="serviceItem" label="维修项目" width="100" align="center" /> |
|||
<el-table-column prop="goodsAmount1" label="材料费" width="100" align="center" /> |
|||
<el-table-column prop="claimHourAmount1" label="工时费" width="100" align="center" /> |
|||
<el-table-column prop="declarationDate" label="报单日期" width="100" align="center" /> |
|||
<el-table-column prop="claimBillNo" label="索赔单号" width="100" align="center" /> |
|||
<el-table-column prop="claimHourAmount2" label="工时费" width="100" align="center" /> |
|||
<el-table-column prop="goodsAmount2" label="材料费" width="100" align="center" /> |
|||
<el-table-column prop="outwardAmount" label="外出费用" width="100" align="center" /> |
|||
<el-table-column prop="otherAmount" label="其他费用" width="100" align="center" /> |
|||
<el-table-column prop="totalAmount" label="费用合计" width="100" align="center" /> |
|||
<el-table-column prop="businessClass" label="保内业务分类" width="200" align="center" /> |
|||
<el-table-column prop="claimManufacturer" label="索赔厂家" width="100" align="center" /> |
|||
<el-table-column prop="reportSubmitDate" label="让渡报告提报时间" width="200" align="center" /> |
|||
<el-table-column prop="reportApproveDate" label="让渡报告审批通过时间" width="200" align="center" /> |
|||
<el-table-column prop="auditStatus" label="审核状态" width="100" align="center" /> |
|||
<el-table-column prop="effectiveStatus" label="生效状态" width="100" align="center" /> |
|||
<el-table-column prop="effectiveDate" label="生效时间" width="100" align="center" /> |
|||
|
|||
|
|||
</el-table> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import req from '@/api/statement/monthlyReport/claimFormRate' |
|||
export default { |
|||
data() { |
|||
return { |
|||
index: 0, |
|||
tableKey: 0, |
|||
listLoading: false, |
|||
list: [], |
|||
title: "", |
|||
} |
|||
}, |
|||
|
|||
methods: { |
|||
|
|||
showAdd(row) { |
|||
this.title = "安瑞集团" + row.deptName + row.createTime + "三包索赔单生效率统计表" |
|||
|
|||
req.getDetail(row.sid) |
|||
.then(resp => { |
|||
if (resp.success) { |
|||
this.list = resp.data |
|||
} |
|||
}) |
|||
.catch(e => { |
|||
this.$emit('doback') |
|||
}) |
|||
|
|||
}, |
|||
|
|||
handleReturn(isreload) { |
|||
if (isreload === 'true') this.$emit('reloadlist') |
|||
this.formobj = { |
|||
|
|||
} |
|||
this.$emit('doback') |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style scoped> |
|||
|
|||
</style> |
@ -1,8 +1,225 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<!--列表页面--> |
|||
<div v-show="viewState == 1"> |
|||
<button-bar view-title="必备件明细统计表" ref="btnbar" :btndisabled="btndisabled" @btnhandle="btnHandle" /> |
|||
<!--Start查询列表部分--> |
|||
<div class="main-content"> |
|||
<div class="searchcon"> |
|||
<el-button size="small" class="searchbtn" @click="clicksearchShow">{{ searchxianshitit }}</el-button> |
|||
<div v-show="isSearchShow" class="search"> |
|||
<el-form ref="listQueryform" :inline="true" :model="listQuery" class="tab-header"> |
|||
<el-form-item label="分公司"> |
|||
<el-input v-model="listQuery.params.createOrgName" placeholder="" clearable /> |
|||
</el-form-item> |
|||
<el-form-item label="服务站"> |
|||
<el-input v-model="listQuery.params.deptName" placeholder="" clearable /> |
|||
</el-form-item> |
|||
<el-form-item label="配件名称"> |
|||
<el-input v-model="listQuery.params.accessoryName" placeholder="" clearable /> |
|||
</el-form-item> |
|||
<el-form-item label="图号"> |
|||
<el-input v-model="listQuery.params.goodsCode" placeholder="" clearable /> |
|||
</el-form-item> |
|||
</el-form> |
|||
<div class="btn" style="text-align: center;"> |
|||
<el-button type="primary" icon="el-icon-search" size="small" @click="handleFilter">查询</el-button> |
|||
<el-button type="primary" icon="el-icon-refresh" size="small" @click="handleReset">重置</el-button> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<!--End查询列表部分--> |
|||
<div class="listtop"> |
|||
<div class="tit">必备件明细</div> |
|||
</div> |
|||
<!--Start 主页面主要部分 --> |
|||
<div class=""> |
|||
<el-table :key="tableKey" v-loading="listLoading" :data="list" border style="width: 100%;" |
|||
@row-click="handle"> |
|||
<!-- <el-table-column fixed type="selection" align="center" width="50" /> --> |
|||
<el-table-column fixed label="序号" type="index" width="80" :index="indexMethod" align="center" /> |
|||
<el-table-column prop="createOrgName" label="分公司" align="center" width="150" /> |
|||
<el-table-column prop="deptName" label="服务站" align="center" /> |
|||
<el-table-column prop="goodsID" label="商品ID" align="center" /> |
|||
<el-table-column prop="accessoryName" label="配件名称" align="center" /> |
|||
<el-table-column prop="goodsCode" label="图号" align="center" /> |
|||
<el-table-column prop="price" label="单价" align="center" /> |
|||
<el-table-column prop="num" label="数量" align="center" /> |
|||
<el-table-column prop="amount" label="金额" align="center" /> |
|||
<el-table-column prop="stockAge" label="库龄(天)" align="center" /> |
|||
<el-table-column prop="purchaseGoodsDate" label="进货时间" align="center" /> |
|||
<el-table-column prop="repairOrderNo" label="维修单号" align="center" /> |
|||
<el-table-column prop="claimBillNo" label="索赔单号" align="center" /> |
|||
<el-table-column prop="isWarranty" label="截止目前12个月内是否曾保修使用" align="center" /> |
|||
</el-table> |
|||
</div> |
|||
<!--End 主页面主要部分--> |
|||
<div class="pages"> |
|||
<div class="tit" /> |
|||
<!-- 翻页 --> |
|||
<pagination v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" |
|||
:limit.sync="listQuery.size" class="pagination" @pagination="getList" /> |
|||
</div> |
|||
|
|||
</div> |
|||
</div> |
|||
<!--End查询列表部分--> |
|||
<!-- 新增修改部分组件 --> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
</script> |
|||
import Pagination from '@/components/pagination' |
|||
import pageye from '@/components/pagination/pageye' |
|||
import ButtonBar from '@/components/ButtonBar' |
|||
import req from '@/api/statement/monthlyReport/essentialDetails' |
|||
|
|||
export default { |
|||
name: 'essentialDetails', |
|||
components: { |
|||
Pagination, |
|||
pageye, |
|||
ButtonBar, |
|||
}, |
|||
data() { |
|||
return { |
|||
btndisabled: false, |
|||
btnList: [{ |
|||
type: 'success', |
|||
size: 'small', |
|||
icon: '', |
|||
btnKey: 'doExport', |
|||
btnLabel: '导出' |
|||
}, { |
|||
type: 'info', |
|||
size: 'small', |
|||
icon: 'cross', |
|||
btnKey: 'doClose', |
|||
btnLabel: '关闭' |
|||
}], |
|||
isSearchShow: false, |
|||
searchxianshitit: '显示查询条件', |
|||
viewState: 1, // 1、列表 2、新增 3、编辑 4、查看 |
|||
tableKey: 0, |
|||
list: [], |
|||
sids: [], // 用于导出的时候保存已选择的SIDs |
|||
listLoading: false, |
|||
// 翻页 |
|||
listQuery: { |
|||
current: 1, |
|||
size: 10, |
|||
total: 0, |
|||
params: { |
|||
"createOrgName": "", |
|||
"deptName": "", |
|||
"accessoryName": "", |
|||
"goodsCode": "", |
|||
"userSid": "", |
|||
"orgPath": "", |
|||
"menuUrl": "" |
|||
} |
|||
} |
|||
} |
|||
}, |
|||
created() { |
|||
// 初始化变量 |
|||
this.getList() |
|||
}, |
|||
mounted() { |
|||
this.$refs['btnbar'].setButtonList(this.btnList) |
|||
}, |
|||
methods: { |
|||
handle(row) { |
|||
console.log('handle ' + row.sid) |
|||
|
|||
<style> |
|||
</style> |
|||
this.viewState = 4 |
|||
this.$refs['divinfo'].showAdd(row) |
|||
|
|||
}, |
|||
resetState() { |
|||
this.viewState = 1 |
|||
this.getList() |
|||
}, |
|||
// 搜索条件效果 |
|||
clicksearchShow() { |
|||
this.isSearchShow = !this.isSearchShow |
|||
if (this.isSearchShow) { |
|||
this.searchxianshitit = '隐藏查询条件' |
|||
} else { |
|||
this.searchxianshitit = '显示查询条件' |
|||
} |
|||
}, |
|||
btnHandle(btnKey) { |
|||
console.log('XXXXXXXXXXXXXXX ' + btnKey) |
|||
switch (btnKey) { |
|||
case 'doClose': |
|||
this.doClose() |
|||
break |
|||
default: |
|||
break |
|||
} |
|||
}, |
|||
// 信息条数 获取点击时当前的sid |
|||
handleSelectionChange(row) { |
|||
const aa = [] |
|||
row.forEach(element => { |
|||
aa.push(element.sid) |
|||
}) |
|||
this.sids = aa |
|||
}, |
|||
// 表中序号 |
|||
indexMethod(index) { |
|||
var pagestart = (this.listQuery.current - 1) * this.listQuery.size |
|||
var pageindex = index + 1 + pagestart |
|||
return pageindex |
|||
}, |
|||
// 查询列表信息 |
|||
getList() { |
|||
this.listLoading = true |
|||
this.listQuery.params.userSid = window.sessionStorage.getItem('userSid') |
|||
this.listQuery.params.orgPath = window.sessionStorage.getItem('defaultOrgPath') |
|||
this.listQuery.params.menuUrl = this.$route.path |
|||
req.listPage(this.listQuery).then((response) => { |
|||
this.listLoading = false |
|||
if (response.success) { |
|||
this.list = response.data.records |
|||
this.listQuery.total = response.data.total |
|||
} else { |
|||
this.list = [] |
|||
this.listQuery.total = 0 |
|||
} |
|||
}) |
|||
}, |
|||
// 查询按钮 |
|||
handleFilter() { |
|||
this.listQuery.current = 1 |
|||
this.getList() |
|||
}, |
|||
// 点击重置 |
|||
handleReset() { |
|||
this.listQuery = { |
|||
current: 1, |
|||
size: 10, |
|||
total: 0, |
|||
params: { |
|||
"createOrgName": "", |
|||
"deptName": "", |
|||
"accessoryName": "", |
|||
"goodsCode": "", |
|||
"userSid": "", |
|||
"orgPath": "", |
|||
"menuUrl": "" |
|||
} |
|||
} |
|||
this.getList() |
|||
}, |
|||
doClose() { |
|||
this.$store.dispatch('tagsView/delView', this.$route) |
|||
this.$router.go(-1) |
|||
} |
|||
|
|||
} |
|||
} |
|||
</script> |
|||
<style scoped> |
|||
</style> |
|||
|
@ -1,8 +1,207 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<!--列表页面--> |
|||
<div v-show="viewState == 1"> |
|||
<button-bar view-title="配件库房一次性满足率统计表" ref="btnbar" :btndisabled="btndisabled" @btnhandle="btnHandle" /> |
|||
<!--Start查询列表部分--> |
|||
<div class="main-content"> |
|||
<div class="searchcon"> |
|||
<el-button size="small" class="searchbtn" @click="clicksearchShow">{{ searchxianshitit }}</el-button> |
|||
<div v-show="isSearchShow" class="search"> |
|||
<el-form ref="listQueryform" :inline="true" :model="listQuery" class="tab-header"> |
|||
<el-form-item label="选择月份"> |
|||
<el-date-picker v-model="listQuery.params.createStartTime" value-format="yyyy-MM" format="yyyy-MM" |
|||
type="month" placeholder="开始月份"></el-date-picker> |
|||
<span style="padding: 0 8px">至</span> |
|||
<el-date-picker v-model="listQuery.params.createEndTime" value-format="yyyy-MM" format="yyyy-MM" |
|||
type="month" placeholder="结束月份"></el-date-picker> |
|||
</el-form-item> |
|||
<el-form-item label="服务站"> |
|||
<el-input v-model="listQuery.params.deptName" placeholder="" clearable /> |
|||
</el-form-item> |
|||
</el-form> |
|||
<div class="btn" style="text-align: center;"> |
|||
<el-button type="primary" icon="el-icon-search" size="small" @click="handleFilter">查询</el-button> |
|||
<el-button type="primary" icon="el-icon-refresh" size="small" @click="handleReset">重置</el-button> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<!--End查询列表部分--> |
|||
<div class="listtop"> |
|||
<div class="tit">服务站列表</div> |
|||
</div> |
|||
<!--Start 主页面主要部分 --> |
|||
<div class=""> |
|||
<el-table :key="tableKey" v-loading="listLoading" :data="list" border style="width: 100%;" |
|||
@row-click="handle"> |
|||
<!-- <el-table-column fixed type="selection" align="center" width="50" /> --> |
|||
<el-table-column fixed label="序号" type="index" width="80" :index="indexMethod" align="center" /> |
|||
<el-table-column prop="createTime" label="年月" align="center" width="150" /> |
|||
<el-table-column prop="deptName" label="服务站" align="center" /> |
|||
</el-table> |
|||
</div> |
|||
<!--End 主页面主要部分--> |
|||
<div class="pages"> |
|||
<div class="tit" /> |
|||
<!-- 翻页 --> |
|||
<pagination v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" |
|||
:limit.sync="listQuery.size" class="pagination" @pagination="getList" /> |
|||
</div> |
|||
|
|||
</div> |
|||
</div> |
|||
<!--End查询列表部分--> |
|||
<!-- 新增修改部分组件 --> |
|||
<divinfo v-show="viewState == 4" ref="divinfo" @doback="resetState" @reloadlist="getList" /> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
</script> |
|||
import Pagination from '@/components/pagination' |
|||
import pageye from '@/components/pagination/pageye' |
|||
import ButtonBar from '@/components/ButtonBar' |
|||
import req from '@/api/statement/monthlyReport/oneTimeRate' |
|||
import divinfo from './oneTimeRateDetail.vue' |
|||
|
|||
export default { |
|||
name: 'oneTimeRate', |
|||
components: { |
|||
Pagination, |
|||
pageye, |
|||
ButtonBar, |
|||
divinfo |
|||
}, |
|||
data() { |
|||
return { |
|||
btndisabled: false, |
|||
btnList: [{ |
|||
type: 'info', |
|||
size: 'small', |
|||
icon: 'cross', |
|||
btnKey: 'doClose', |
|||
btnLabel: '关闭' |
|||
}], |
|||
isSearchShow: false, |
|||
searchxianshitit: '显示查询条件', |
|||
viewState: 1, // 1、列表 2、新增 3、编辑 4、查看 |
|||
tableKey: 0, |
|||
list: [], |
|||
sids: [], // 用于导出的时候保存已选择的SIDs |
|||
listLoading: false, |
|||
// 翻页 |
|||
listQuery: { |
|||
current: 1, |
|||
size: 10, |
|||
total: 0, |
|||
params: { |
|||
createStartTime: '', |
|||
createEndTime: '', |
|||
deptName: '', |
|||
userSid: '', |
|||
orgPath: '', |
|||
menuUrl: '' |
|||
} |
|||
} |
|||
} |
|||
}, |
|||
created() { |
|||
// 初始化变量 |
|||
this.getList() |
|||
}, |
|||
mounted() { |
|||
this.$refs['btnbar'].setButtonList(this.btnList) |
|||
}, |
|||
methods: { |
|||
handle(row) { |
|||
console.log('handle ' + row.sid) |
|||
|
|||
<style> |
|||
</style> |
|||
this.viewState = 4 |
|||
this.$refs['divinfo'].showAdd(row) |
|||
|
|||
}, |
|||
resetState() { |
|||
this.viewState = 1 |
|||
this.getList() |
|||
}, |
|||
// 搜索条件效果 |
|||
clicksearchShow() { |
|||
this.isSearchShow = !this.isSearchShow |
|||
if (this.isSearchShow) { |
|||
this.searchxianshitit = '隐藏查询条件' |
|||
} else { |
|||
this.searchxianshitit = '显示查询条件' |
|||
} |
|||
}, |
|||
btnHandle(btnKey) { |
|||
console.log('XXXXXXXXXXXXXXX ' + btnKey) |
|||
switch (btnKey) { |
|||
case 'doClose': |
|||
this.doClose() |
|||
break |
|||
default: |
|||
break |
|||
} |
|||
}, |
|||
// 信息条数 获取点击时当前的sid |
|||
handleSelectionChange(row) { |
|||
const aa = [] |
|||
row.forEach(element => { |
|||
aa.push(element.sid) |
|||
}) |
|||
this.sids = aa |
|||
}, |
|||
// 表中序号 |
|||
indexMethod(index) { |
|||
var pagestart = (this.listQuery.current - 1) * this.listQuery.size |
|||
var pageindex = index + 1 + pagestart |
|||
return pageindex |
|||
}, |
|||
// 查询列表信息 |
|||
getList() { |
|||
this.listLoading = true |
|||
this.listQuery.params.userSid = window.sessionStorage.getItem('userSid') |
|||
this.listQuery.params.orgPath = window.sessionStorage.getItem('defaultOrgPath') |
|||
this.listQuery.params.menuUrl = this.$route.path |
|||
req.listPage(this.listQuery).then((response) => { |
|||
this.listLoading = false |
|||
if (response.success) { |
|||
this.list = response.data.records |
|||
this.listQuery.total = response.data.total |
|||
} else { |
|||
this.list = [] |
|||
this.listQuery.total = 0 |
|||
} |
|||
}) |
|||
}, |
|||
// 查询按钮 |
|||
handleFilter() { |
|||
this.listQuery.current = 1 |
|||
this.getList() |
|||
}, |
|||
// 点击重置 |
|||
handleReset() { |
|||
this.listQuery = { |
|||
current: 1, |
|||
size: 10, |
|||
total: 0, |
|||
params: { |
|||
createStartTime: '', |
|||
createEndTime: '', |
|||
deptName: '', |
|||
userSid: '', |
|||
orgPath: '', |
|||
menuUrl: '' |
|||
} |
|||
} |
|||
this.getList() |
|||
}, |
|||
doClose() { |
|||
this.$store.dispatch('tagsView/delView', this.$route) |
|||
this.$router.go(-1) |
|||
} |
|||
|
|||
} |
|||
} |
|||
</script> |
|||
<style scoped> |
|||
</style> |
|||
|
@ -0,0 +1,218 @@ |
|||
<template> |
|||
<div> |
|||
<div class="tab-header webtop"> |
|||
<!-- 标题 --> |
|||
<div style="margin: 0 auto;">{{title}}</div> |
|||
<!-- start 添加修改按钮 --> |
|||
<div> |
|||
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button> |
|||
</div> |
|||
<!-- end 详情按钮 --> |
|||
</div> |
|||
|
|||
<div style="margin-top: 10px; height: 100%;"> |
|||
|
|||
<el-table :key="tableKey" v-loading="listLoading" :data="list" border style="width: 100%;" |
|||
:span-method="objectSpanMethods" show-summary :summary-method="getSummaries"> |
|||
<el-table-column fixed label="序号" type="index" width="80" :index="index+1" align="center" /> |
|||
<el-table-column prop="completionMonth" label="竣工月份" align="center" width="150" /> |
|||
<el-table-column prop="completionDate" label="竣工日期" align="center" width="150" /> |
|||
<el-table-column prop="settlementDate" label="结算日期" align="center" width="150" /> |
|||
<el-table-column prop="repairOrderNo" label="维修单号" align="center" width="150" /> |
|||
<el-table-column prop="vehMark" label="车牌号" align="center" width="150" /> |
|||
<el-table-column prop="serviceItem" label="维修项目" align="center" width="150" /> |
|||
<el-table-column prop="accessoryName" label="所需配件名称" align="center" width="150" /> |
|||
<el-table-column prop="goodsCode" label="图号" align="center" width="150" /> |
|||
<el-table-column prop="num" label="所需数量" align="center" width="150" /> |
|||
<el-table-column prop="disposableNum" label="库房一次性提供数量" align="center" width="150" /> |
|||
<el-table-column label="库房未能一次性提供的解决方案" align="center"> |
|||
<el-table-column prop="outsourceNum" label="外购数量" align="center" width="120" /> |
|||
<el-table-column prop="emergencyNum" label="订应急数量" align="center" width="120" /> |
|||
<el-table-column prop="otherNum" label="其它数量" align="center" width="120" /> |
|||
</el-table-column> |
|||
<el-table-column prop="goodsArrivedDate" label="配件到货日期(最后入库日期)" align="center" width="150" /> |
|||
<el-table-column prop="goodsDistributionDate" label="配件装配日期(最后出库日期)" align="center" width="150" /> |
|||
<el-table-column prop="OneRate" label="配件一次性满足率" align="center" width="150" /> |
|||
<el-table-column prop="outsourceRate" label="外购率" align="center" width="150" /> |
|||
<el-table-column prop="emergencyRate" label="订应急率" align="center" width="150" /> |
|||
|
|||
</el-table> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import req from '@/api/statement/monthlyReport/oneTimeRate' |
|||
export default { |
|||
data() { |
|||
return { |
|||
index: 0, |
|||
tableKey: 0, |
|||
listLoading: false, |
|||
list: [], |
|||
title: "", |
|||
mergeObj: {}, // 用来记录需要合并行的下标 |
|||
mergeArr: ['completionMonth', 'completionDate', 'settlementDate', 'repairOrderNo', 'vehMark'], // 表格中的列名 |
|||
// mergeArr: ['品牌', '服务站名称', '软件系统', '品名'], // 表格中的列名 |
|||
} |
|||
}, |
|||
|
|||
methods: { |
|||
|
|||
// 合计 |
|||
getSummaries(param) { |
|||
const { |
|||
columns, |
|||
data |
|||
} = param |
|||
const sums = [] |
|||
columns.forEach((column, index) => { |
|||
if (index === 0) { |
|||
sums[index] = '合计:' |
|||
return |
|||
} |
|||
const values = data.map(item => Number(item[column.property])) |
|||
if (column.property === 'num') { // 所需数量 |
|||
sums[index] = values.reduce((prev, curr) => { |
|||
const value = Number(curr) |
|||
console.log('>>>>>>>>>commodityCurrentChange', prev) |
|||
console.log('>>>>>>>>>commodityCurrentChange', value) |
|||
if (!isNaN(value)) { |
|||
return (Number(prev) + Number(curr)) |
|||
} else { |
|||
return Number(prev) |
|||
} |
|||
}, 0) |
|||
sums[index] += '' |
|||
} else if (column.property === 'disposableNum') { // 库房一次性提供数量 |
|||
sums[index] = values.reduce((prev, curr) => { |
|||
const value = Number(curr) |
|||
if (!isNaN(value)) { |
|||
return (Number(prev) + Number(curr)) |
|||
} else { |
|||
return Number(prev) |
|||
} |
|||
}, 0) |
|||
sums[index] += '' |
|||
} else if (column.property === 'outsourceNum') { // 外购数量 |
|||
sums[index] = values.reduce((prev, curr) => { |
|||
const value = Number(curr) |
|||
if (!isNaN(value)) { |
|||
return (Number(prev) + Number(curr)) |
|||
} else { |
|||
return Number(prev) |
|||
} |
|||
}, 0) |
|||
sums[index] += '' |
|||
} else if (column.property === 'emergencyNum') { //订应急数量 |
|||
sums[index] = values.reduce((prev, curr) => { |
|||
const value = Number(curr) |
|||
if (!isNaN(value)) { |
|||
return (Number(prev) + Number(curr)) |
|||
} else { |
|||
return Number(prev) |
|||
} |
|||
}, 0) |
|||
sums[index] += '' |
|||
} else if (column.property === 'otherNum') { //其它数量 |
|||
sums[index] = values.reduce((prev, curr) => { |
|||
const value = Number(curr) |
|||
if (!isNaN(value)) { |
|||
return (Number(prev) + Number(curr)) |
|||
} else { |
|||
return Number(prev) |
|||
} |
|||
}, 0) |
|||
sums[index] += '' |
|||
} |
|||
}) |
|||
return sums |
|||
}, |
|||
|
|||
|
|||
|
|||
objectSpanMethods({ |
|||
row, //当前行、 |
|||
column, //当前列、 |
|||
rowIndex, //当前行索引 |
|||
columnIndex //当前列索引 |
|||
}) { |
|||
|
|||
// if (row.项目 == '总计') { |
|||
// if (columnIndex === 4) { |
|||
// //定位到6行4列的ID,告诉该单元格合并1行2列 |
|||
// return [1, 2] |
|||
// } |
|||
// if (columnIndex === 5) { |
|||
// //定位到6行4列的ID,告诉该单元格合并1行2列 |
|||
// return [0, 0] |
|||
// } |
|||
// } |
|||
|
|||
// 判断列的属性 |
|||
if (this.mergeArr.indexOf(column.property) !== -1) { |
|||
// 判断其值是不是为0 |
|||
if (this.mergeObj[column.property][rowIndex]) { |
|||
return [this.mergeObj[column.property][rowIndex], 1] |
|||
} else { |
|||
// 如果为0则为需要合并的行 |
|||
return [0, 0]; |
|||
} |
|||
} |
|||
|
|||
}, |
|||
showAdd(row) { |
|||
this.title = "安瑞集团" + row.deptName + row.createTime + "配件库房一次性满足率统计表" |
|||
|
|||
req.getDetail(row.sid) |
|||
.then(resp => { |
|||
if (resp.success) { |
|||
this.list = resp.data |
|||
this.getSpanArr(this.list) |
|||
} |
|||
}) |
|||
.catch(e => { |
|||
this.$emit('doback') |
|||
}) |
|||
|
|||
}, |
|||
// getSpanArr方法 |
|||
getSpanArr(data) { |
|||
this.mergeArr.forEach((key, index1) => { |
|||
let count = 0; // 用来记录需要合并行的起始位置 |
|||
this.mergeObj[key] = []; // 记录每一列的合并信息 |
|||
data.forEach((item, index) => { |
|||
// index == 0表示数据为第一行,直接 push 一个 1 |
|||
if (index === 0) { |
|||
this.mergeObj[key].push(1); |
|||
} else { |
|||
// console.log('>>>>>>>>>commodityCurrentChange', data[index - 1][key]) |
|||
// 判断当前行是否与上一行其值相等 如果相等 在 count 记录的位置其值 +1 表示当前行需要合并 并push 一个 0 作为占位 |
|||
if (item[key] === data[index - 1][key]) { |
|||
this.mergeObj[key][count] += 1; |
|||
this.mergeObj[key].push(0); |
|||
} else { |
|||
// 如果当前行和上一行其值不相等 |
|||
count = index; // 记录当前位置 |
|||
this.mergeObj[key].push(1); // 重新push 一个 1 |
|||
} |
|||
|
|||
} |
|||
}) |
|||
}) |
|||
}, |
|||
|
|||
handleReturn(isreload) { |
|||
if (isreload === 'true') this.$emit('reloadlist') |
|||
this.formobj = { |
|||
|
|||
} |
|||
this.$emit('doback') |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style scoped> |
|||
|
|||
</style> |
Loading…
Reference in new issue