Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
patzn-cloud-web-back-soil
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wangweidong
patzn-cloud-web-back-soil
Commits
f02a026a
Commit
f02a026a
authored
Jul 01, 2020
by
lichengming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改了统计分析客户委托量统计
parent
27d8e9f2
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
326 additions
and
220 deletions
+326
-220
YearContractTable.vue
pages/meter-statistics/annual-entrust/YearContractTable.vue
+1
-1
CustomerTable.vue
pages/meter-statistics/customer-entrust/CustomerTable.vue
+153
-0
Detail.vue
pages/meter-statistics/customer-entrust/Detail.vue
+87
-0
MeterCustomerEntrust.vue
...eter-statistics/customer-entrust/MeterCustomerEntrust.vue
+85
-219
No files found.
pages/meter-statistics/annual-entrust/YearContractTable.vue
View file @
f02a026a
...
@@ -20,7 +20,7 @@
...
@@ -20,7 +20,7 @@
<!--</PTVXETable>-->
<!--</PTVXETable>-->
<!--合计 暂时用此表格-->
<!--合计 暂时用此表格-->
<ElTableNoPage
id=
"table-year"
ref=
"pageTable"
:tableHeight=
"
tableHeight
"
<ElTableNoPage
id=
"table-year"
ref=
"pageTable"
:tableHeight=
"
300
"
@
on-result-change=
"_tableResultChange"
:getPage=
"getPage"
hide-checkbox
show-summary=
"true"
>
@
on-result-change=
"_tableResultChange"
:getPage=
"getPage"
hide-checkbox
show-summary=
"true"
>
<el-table-column
<el-table-column
:prop=
"item.key"
:prop=
"item.key"
...
...
pages/meter-statistics/customer-entrust/CustomerTable.vue
0 → 100644
View file @
f02a026a
<
template
>
<div>
<form
id=
"form-customer-table"
>
<input
name=
"queryDateBegin"
type=
"hidden"
/>
<input
name=
"queryDateEnd"
type=
"hidden"
/>
</form>
<PTVXETable
id=
"customer-contract-table"
ref=
"pageTable"
:tableHeight=
"tableHeight"
@
on-result-change=
"_tableResultChange"
:getPage=
"getPage"
hide-checkbox
click-value
>
<vxe-table-column
:field=
"item.key"
:title=
"item.title"
:min-width=
"item.width?item.width:200"
:fixed=
"item.fixed?item.fixed:undefined"
v-for=
"item in pageColumns"
:key=
"item.key"
sortable
>
<template
slot-scope=
"scope"
>
<a
v-if=
"item.detail"
@
click
.
stop=
"_detail(scope.row)"
>
{{
scope
.
row
[
item
.
key
]
}}
</a>
<span
v-else
>
{{
scope
.
row
[
item
.
key
]
}}
</span>
</
template
>
</vxe-table-column>
</PTVXETable>
<!--详情-->
<Detail
ref=
"detailModal"
/>
</div>
</template>
<
script
>
import
{
meterContract
}
from
'../../../api'
import
Detail
from
'./Detail'
export
default
{
components
:
{
Detail
},
data
()
{
return
{
pageColumns
:
[
{
title
:
'客户名称'
,
key
:
'client'
,
width
:
120
,
fixed
:
'left'
},
{
title
:
'委托数量'
,
key
:
'total'
},
{
title
:
'委托额度'
,
key
:
'price'
},
{
title
:
'已收额度'
,
key
:
'collectPrice'
},
{
title
:
'未收额度'
,
key
:
'noCollectPrice'
}
],
formObj
:
{
client
:
undefined
},
getPage
:
{},
customer
:
''
,
queryDateBegin
:
''
,
queryDateEnd
:
''
}
},
computed
:
{
tableHeight
:
function
()
{
return
this
.
$tableHeight
(
'noBtn'
)
}
},
methods
:
{
// 查看所有委托
_detail
(
data
)
{
this
.
$refs
.
detailModal
.
_open
({
cname
:
data
.
customer
,
queryDateBegin
:
this
.
queryDateBegin
,
queryDateEnd
:
this
.
queryDateEnd
})
},
_openTable
(
data
)
{
this
.
customer
=
data
.
customer
$
(
'input[name=queryDateBegin]'
).
val
(
data
.
queryDateBegin
)
$
(
'input[name=queryDateEnd]'
).
val
(
data
.
queryDateEnd
)
this
.
queryDateBegin
=
data
.
queryDateBegin
this
.
queryDateEnd
=
data
.
queryDateEnd
this
.
_page
()
},
_page
:
async
function
()
{
Object
.
assign
(
this
.
formObj
,
this
.
$refs
.
pageTable
.
_searchParams
())
const
result
=
await
meterContract
.
page
(
this
.
formObj
)
if
(
result
)
{
this
.
$refs
.
pageTable
.
_hideLoading
()
this
.
getPage
=
result
}
},
// _page() {
// const data = {}
// if (this.customer) {
// data.customer = this.customer
// }
// this.$refs.pageTable._page(
// 'form-customer-table',
// 'StatisticContract/pageCustomerContract',
// data
// )
// },
_tableResultChange
(
msg
,
data
)
{
switch
(
msg
)
{
case
'page'
:
this
.
getPage
=
this
.
$store
.
state
.
StatisticContract
.
page
break
case
'singleSelect'
:
// 单击
this
.
$emit
(
'on-result-change'
,
data
)
break
case
'dbSelect'
:
// 双击
this
.
customer
=
''
break
case
'changeSize'
:
// this._page()
break
}
},
/** *********************************导出客户委托分析表-begin*********************************************/
_exportSampleForm
()
{
let
result
=
[]
this
.
$store
.
dispatch
(
'StatisticContract/pageCustomerContract'
,
this
.
_searchParams
()
)
.
then
(()
=>
{
result
=
this
.
$store
.
state
.
StatisticContract
.
page
.
records
if
(
result
.
length
===
0
)
{
this
.
$Message
.
warning
(
'暂无数据,不可导出!'
)
}
else
{
this
.
$Modal
.
confirm
({
title
:
'提示'
,
content
:
'确定导出全部数据(最多导出5000条)?'
,
onOk
:
()
=>
{
this
.
$exportExcel
(
'customer-contract-table'
,
'客户委托分析表'
,
this
.
pageColumns
,
result
)
}
})
}
})
},
// 参数
_searchParams
()
{
const
data
=
this
.
$serialize
(
'form-customer-table'
)
if
(
this
.
customer
)
{
data
.
customer
=
this
.
customer
}
return
this
.
$extend
(
data
,
{
page
:
1
,
rows
:
5000
})
}
/** *********************************导出客户委托分析表-end*********************************************/
}
}
</
script
>
pages/meter-statistics/customer-entrust/Detail.vue
0 → 100644
View file @
f02a026a
<
template
>
<div>
<Modal
v-model=
"showModal"
width=
"1000"
class=
"modal-footer-none"
>
<p
slot=
"header"
>
详情
</p>
<div>
<!--内容-->
<Row>
<Col
span=
"24"
>
<PTVXETable
ref=
"pageTable"
:tableHeight=
"tableHeight"
@
on-result-change=
"_tableResultChange"
:getPage=
"getPage"
hide-checkbox
>
<vxe-table-column
:field=
"item.key"
:title=
"item.title"
:min-width=
"item.width?item.width:200"
:fixed=
"item.fixed?item.fixed:undefined"
v-for=
"item in pageColumns"
:key=
"item.key"
sortable
>
<template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
[
item
.
key
]
}}
</span>
</
template
>
</vxe-table-column>
</PTVXETable>
</Col>
</Row>
</div>
</Modal>
</div>
</template>
<
script
>
export
default
{
data
()
{
return
{
showModal
:
false
,
getPage
:
{},
pageColumns
:
[
{
title
:
'委托名称'
,
key
:
'name'
},
{
title
:
'委托编号'
,
key
:
'code'
,
width
:
180
},
{
title
:
'委托金额(元)'
,
key
:
'contractAmount'
,
width
:
160
},
{
title
:
'已收金额(元) '
,
key
:
'bereturnedAmount'
,
width
:
160
},
{
title
:
'未收金额(元)'
,
key
:
'noreturnedAmount'
,
width
:
160
}
],
dateList
:
[],
formObj
:
{
cname
:
''
,
queryDateBegin
:
''
,
queryDateEnd
:
''
}
}
},
computed
:
{
tableHeight
:
function
()
{
return
this
.
$tableHeight
(
'tableModal'
)
}
},
methods
:
{
_open
(
data
)
{
this
.
formObj
=
data
this
.
showModal
=
true
this
.
$nextTick
(
function
()
{
// this._page()
})
},
_page
()
{
this
.
$refs
.
pageTable
.
_page
(
'search-contract-detail'
,
'FoodContract/pageContractByCustomer'
,
this
.
$serializeFormSearch
(
this
.
formObj
)
)
},
_formSearch
()
{
this
.
$refs
.
pageTable
.
_pageChange
(
1
)
},
_tableResultChange
(
msg
,
data
)
{
switch
(
msg
)
{
case
'page'
:
this
.
getPage
=
this
.
$store
.
state
.
FoodContract
.
page
break
// default :
// this._page();
case
'changeSize'
:
// this._page()
break
}
}
}
}
</
script
>
pages/meter-statistics/customer-entrust/MeterCustomerEntrust.vue
View file @
f02a026a
<
template
>
<
template
>
<div>
<div>
<!--内容-->
<div
class=
"layout-content-padding"
>
<div
class=
"layout-content-padding"
>
<div
class=
"layout-content-main"
>
<div
class=
"layout-content-main"
>
<Row>
<Row
style=
"margin-top: 10px;"
>
<!--查询-->
<!--查询条件-->
<Col
span=
"24"
style=
"margin-top:10px"
>
<Form
:d=
"formId"
:label-width=
"90"
v-show=
"searchOpen"
inline
onsubmit=
"return false"
>
<label
class=
"label-sign"
></label>
<Form-item
class=
"search-item"
label=
"检定依据:"
style=
"margin-left: -20px"
>
<Input
@
on-enter=
"_formSearch"
v-model=
"formObj.code"
name=
"judgeBasis"
placeholder=
"请输入判定依据"
clearable
/>
</Form-item>
<Form-item
class=
"search-item"
label=
"检定依据名称:"
>
<Input
@
on-enter=
"_formSearch"
v-model=
"formObj.name"
name=
"judgeBasisName"
placeholder=
"请输入判定依据名称"
clearable
/>
</Form-item>
<Form-item
class=
"search-btn"
>
<Button
@
click=
"_formSearch"
type=
"primary"
>
搜索
</Button>
</Form-item>
</Form>
</Col>
<!--操作-->
<Col
span=
"24"
>
<Col
span=
"24"
>
<btn-list
:msg=
"btn"
:open=
"searchOpen"
:showSearchBtn=
"true"
@
on-result-change=
"_btnClick"
<div
class=
"fl"
>
class=
"contHide"
></btn-list>
<Form
id=
"search-form"
:label-width=
"70"
inline
onsubmit=
"return false"
>
<label
class=
"label-sign"
></label>
<Form-item
label=
"客户名称:"
>
<Input
v-model=
"tempData.customer"
@
on-click=
"_selectCustomer"
@
on-change=
"_cusChange"
placeholder=
"请选择客户名称"
class=
"width-200"
clearable
icon=
"plus"
readonly
/>
</Form-item>
<Form-item
label=
"制单日期:"
>
<el-date-picker
v-model=
"queryDate"
@
change=
"_dateChange"
type=
"monthrange"
range-separator=
"-"
start-placeholder=
"开始月份"
end-placeholder=
"结束月份"
size=
"small"
value-format=
"yyyy-MM"
>
</el-date-picker>
</Form-item>
<Form-item
class=
"search-btn"
>
<Button
@
click=
"_search"
type=
"primary"
>
搜索
</Button>
</Form-item>
</Form>
</div>
<div
class=
"fr"
>
<Button
@
click=
"_export"
class=
"width-80"
>
导出
</Button>
</div>
<div
class=
"clear"
></div>
</Col>
</Col>
<!--
表格
-->
<!--
内容
-->
<Col
span=
"24"
>
<Col
span=
"24"
>
<PTVXETable
<Row
:gutter=
"16"
>
ref=
"pageTable"
<Col
span=
"24"
>
:form-id=
"formId"
<!--table-->
:tableHeight=
"tableHeight"
<CustomerTable
ref=
"tableModal"
@
on-result-change=
"_customerChange"
></CustomerTable>
:getPage=
"getPage"
</Col>
:iconMsg=
"iconMsg"
<Col
span=
"10"
>
@
on-result-change=
"_tableResultChange"
>
<!--pie-->
<vxe-table-column
<!--
<CustomerPie
ref=
"pieModal"
></CustomerPie>
-->
v-for=
"item in pageColumns"
</Col>
:key=
"item.key"
</Row>
:field=
"item.key"
:title=
"item.title"
:width=
"item.width"
:min-width=
"200"
:fixed=
"item.fixed?item.fixed:undefined"
sortable
>
<template
slot-scope=
"scope"
>
<span
v-if=
"item.date"
>
{{
scope
.
row
[
item
.
key
]?
$dateformat
(
scope
.
row
[
item
.
key
],
'yyyy-mm-dd'
):
''
}}
</span>
<span
v-else
>
{{
scope
.
row
[
item
.
key
]
}}
</span>
</
template
>
</vxe-table-column>
</PTVXETable>
</Col>
</Col>
</Row>
</Row>
</div>
</div>
</div>
</div>
<!--选择客户-->
<Customer
ref=
"cunstomerModal"
@
on-result-change=
"_customerResult"
></Customer>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
{
meterAptitude
}
from
'../../../api'
import
Customer
from
'../../../components/user-info/customer'
import
CustomerTable
from
'./CustomerTable'
export
default
{
export
default
{
name
:
'MeterAptitudeStandard'
,
components
:
{
components
:
{},
CustomerTable
,
Customer
},
data
()
{
data
()
{
const
now
=
new
Date
()
const
date
=
this
.
$dateformat
(
now
,
'yyyy-mm'
)
return
{
return
{
formId
:
'meterAptitudeFormId'
,
tempData
:
{
pageColumns
:
[
queryDateBegin
:
date
,
{
title
:
'检定依据'
,
key
:
'code'
,
width
:
160
},
queryDateEnd
:
date
,
{
title
:
'检定依据名称'
,
key
:
'name'
},
customer
:
''
{
title
:
'登记时间'
,
key
:
'ctime'
,
date
:
true
,
width
:
140
},
{
title
:
'备注'
,
key
:
'remark'
}
],
btn
:
[
{
type
:
'success'
,
id
:
''
,
name
:
'添加'
},
{
type
:
'error'
,
id
:
''
,
name
:
'删除'
}
],
iconMsg
:
[
{
type
:
'md-create'
,
id
:
''
,
name
:
'编辑'
},
{
type
:
'md-trash'
,
id
:
''
,
name
:
'删除'
}
],
formObj
:
{
name
:
undefined
,
code
:
undefined
},
},
searchOpen
:
true
,
queryDate
:
[
date
,
date
]
selectIds
:
[],
getPage
:
{},
typeData
:
[]
}
},
computed
:
{
tableHeight
:
function
()
{
if
(
this
.
searchOpen
)
{
return
this
.
$tableHeight
(
'search'
)
}
else
{
return
this
.
$tableHeight
(
'noSearch'
)
}
}
}
},
},
mounted
()
{
mounted
()
{
this
.
_
page
()
this
.
_
search
()
},
},
methods
:
{
methods
:
{
_btnClick
(
msg
)
{
_dateChange
(
data
)
{
switch
(
msg
)
{
if
(
data
)
{
case
'添加'
:
this
.
tempData
.
queryDateBegin
=
data
[
0
]
this
.
_editModal
(
false
)
this
.
tempData
.
queryDateEnd
=
data
[
1
]
break
}
else
{
case
'删除'
:
this
.
tempData
.
queryDateBegin
=
''
this
.
_deleteSelected
()
this
.
tempData
.
queryDateEnd
=
''
break
case
'导入'
:
this
.
_import
()
break
case
'导出'
:
this
.
_export
()
break
case
'search'
:
this
.
searchOpen
=
!
this
.
searchOpen
break
}
},
_iconClick
(
res
,
data
)
{
switch
(
res
)
{
case
'编辑'
:
this
.
_editModal
(
true
,
data
.
id
)
break
case
'删除'
:
this
.
_deleteById
(
data
.
id
)
break
case
'操作日志'
:
this
.
_record
(
data
.
id
)
break
}
},
_page
:
async
function
()
{
console
.
log
(
9522123
)
// this.$refs.pageTable._page('search-form-package', 'FoodJudgeBasis/page')
Object
.
assign
(
this
.
formObj
,
this
.
$refs
.
pageTable
.
_searchParams
())
console
.
log
(
'this.formObj'
,
this
.
formObj
)
const
result
=
await
meterAptitude
.
page
(
this
.
formObj
)
if
(
result
)
{
console
.
log
(
55555
)
console
.
log
(
result
)
this
.
getPage
=
result
console
.
log
(
123456789
)
console
.
log
(
this
.
getPage
)
this
.
$refs
.
pageTable
.
_hideLoading
()
}
},
_formSearch
()
{
this
.
$refs
.
pageTable
.
_pageChange
(
1
)
},
_tableResultChange
(
msg
,
data
)
{
switch
(
msg
)
{
case
'page'
:
this
.
getPage
=
this
.
$store
.
state
.
FoodJudgeBasis
.
page
break
case
'selectIds'
:
this
.
selectIds
=
data
break
case
'iconClick'
:
this
.
_iconClick
(
data
.
name
,
data
.
rowData
)
break
case
'changeSize'
:
this
.
_page
()
break
}
}
},
},
// 删除
_open
()
{
_deleteByIds
(
ids
,
content
)
{
this
.
$refs
.
tableModal
.
_openTable
(
this
.
tempData
)
this
.
$Modal
.
confirm
({
// this.$refs.pieModal._openAllPie(this.tempData)
title
:
'提示'
,
content
:
content
||
'确定删除该记录?'
,
onOk
:
()
=>
{
this
.
_delete
(
ids
)
}
})
},
},
_delete
:
async
function
(
ids
)
{
_search
()
{
const
result
=
await
meterAptitude
.
deleteById
(
ids
)
this
.
_open
()
if
(
result
)
{
this
.
_formSearch
()
this
.
$Message
.
success
(
'删除成功!'
)
}
},
},
_deleteById
(
id
)
{
_export
()
{
// 删除一条记录
this
.
$refs
.
tableModal
.
_exportSampleForm
()
this
.
_deleteByIds
([
id
])
},
},
_deleteSelected
()
{
_selectCustomer
()
{
// 批量删除
this
.
$refs
.
cunstomerModal
.
_open
()
const
ids
=
this
.
selectIds
if
(
ids
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请选择一条或多条数据!'
)
}
else
{
this
.
_deleteByIds
(
ids
,
'确定删除这 '
+
ids
.
length
+
' 条记录?'
)
}
},
},
// 编辑&添加
_customerResult
(
data
)
{
_editModal
(
edit
,
id
)
{
this
.
tempData
.
customer
=
data
.
cname
if
(
edit
)
{
this
.
_search
()
this
.
_getById
(
id
)
// 编辑
// this.$store.dispatch('FoodJudgeBasis/getById', id).then(() => {
// this.$refs.editModal._open(this.$store.state.FoodJudgeBasis.model)
// })
}
else
{
// 添加
this
.
$refs
.
editModal
.
_open
()
}
},
},
_customerChange
(
data
)
{
_getById
:
async
function
(
id
)
{
// this.$refs.pieModal._openPie(data, this.tempData)
const
result
=
await
meterAptitude
.
getById
(
id
)
if
(
result
)
{
this
.
$refs
.
editModal
.
_open
(
result
)
}
},
},
// 导入
// 选择人员为空的情况
_import
()
{
_cusChange
(
data
)
{
const
data
=
{
if
(
data
.
target
.
value
===
''
)
{
importUrl
:
this
.
tempData
.
customer
=
''
'/food/v1/food_aptitude_judge_basis/food_aptitude_judge_import'
,
this
.
_search
()
downloadUrl
:
'/food/v1/excel/template/FoodAptitudeJudgeBasis'
,
title
:
'导入检验方法管理'
}
this
.
$refs
.
sampleModal
.
_open
(
data
)
},
// 导出
_export
()
{
console
.
log
(
'.this.selectIds'
,
this
.
selectIds
)
if
(
this
.
selectIds
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请选择需要导出的数据'
)
}
else
{
const
content
=
'确定导出 '
+
this
.
selectIds
.
length
+
' 条记录?'
this
.
$Modal
.
confirm
({
title
:
'提示'
,
content
:
content
,
onOk
:
()
=>
{
// eslint-disable-next-line no-undef
http
.
open
(
'/food/v1/food_aptitude_judge_basis/food_aptitude_judge_export?ids='
+
this
.
selectIds
)
}
})
}
}
}
}
}
}
}
}
</
script
>
</
script
>
<
style
scoped
>
</
style
>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment