Compare commits
4 Commits
confidence
...
master
Author | SHA1 | Date |
---|---|---|
|
b339620ab0 | 3 years ago |
|
4118464b21 | 3 years ago |
|
c35d1f344c | 3 years ago |
|
7f4f4582c6 | 3 years ago |
11 changed files with 365 additions and 36 deletions
@ -0,0 +1,13 @@ |
|||||||
|
import request from '@/router/axios'; |
||||||
|
//列表
|
||||||
|
export const getList = (current, size, params) => { |
||||||
|
return request({ |
||||||
|
url: '/api/iot-sim/simcarddeliver/getFlowHisMonth', |
||||||
|
method: 'get', |
||||||
|
params: { |
||||||
|
...params, |
||||||
|
current, |
||||||
|
size, |
||||||
|
} |
||||||
|
}) |
||||||
|
} |
@ -0,0 +1,95 @@ |
|||||||
|
<template> |
||||||
|
<basic-container> |
||||||
|
<div style="width: 50%; margin: 0 auto"> |
||||||
|
<div class="downloads"> |
||||||
|
<div> |
||||||
|
请 |
||||||
|
<el-link type="primary" @click="handleTemplate">下载模板</el-link> |
||||||
|
并按照模板提示输入数据后上传 |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
<div class="tip"> |
||||||
|
温馨提示: |
||||||
|
<div>1、请选择模板下载;</div> |
||||||
|
<div>2、导入必须是xls、xlsx文件;</div> |
||||||
|
<div>3、文件大小最大为10MB;</div> |
||||||
|
<div>4、号码最多10000个。</div> |
||||||
|
</div> |
||||||
|
<avue-form :option="auditoptions" :upload-after="uploadAfter"></avue-form> |
||||||
|
</div> |
||||||
|
</basic-container> |
||||||
|
</template> |
||||||
|
|
||||||
|
<script> |
||||||
|
import { getToken } from "@/util/auth"; |
||||||
|
export default { |
||||||
|
data() { |
||||||
|
return { |
||||||
|
auditoptions: { |
||||||
|
menuBtn: false, |
||||||
|
labelWidth: 95, |
||||||
|
size: "medium", |
||||||
|
column: [ |
||||||
|
{ |
||||||
|
label: "电信对账单", |
||||||
|
prop: "excelFile", |
||||||
|
type: "upload", |
||||||
|
drag: true, |
||||||
|
loadText: "上传中,请稍等", |
||||||
|
showFileList: false, |
||||||
|
propsHttp: { |
||||||
|
res: "data", |
||||||
|
}, |
||||||
|
tip: "请上传模板格式文件", |
||||||
|
action: "/api/iot-sim/telecomCheckBill/import-checkBill", |
||||||
|
rules: [ |
||||||
|
{ |
||||||
|
required: true, |
||||||
|
message: "请选择文件", |
||||||
|
trigger: "change", |
||||||
|
}, |
||||||
|
], |
||||||
|
}, |
||||||
|
], |
||||||
|
}, |
||||||
|
}; |
||||||
|
}, |
||||||
|
|
||||||
|
methods: { |
||||||
|
//下载模板 |
||||||
|
handleTemplate() { |
||||||
|
window.open( |
||||||
|
`${this.baseUrl}/${ |
||||||
|
this.apis |
||||||
|
}iot-sim/telecomCheckBill/export-checkBill?${ |
||||||
|
this.website.tokenHeader |
||||||
|
}=${getToken()}` |
||||||
|
); |
||||||
|
}, |
||||||
|
uploadAfter(res, done, loading, column) { |
||||||
|
done(); |
||||||
|
window.open( |
||||||
|
`${this.baseUrl}/${ |
||||||
|
this.apis |
||||||
|
}iot-sim/telecomCheckBill/export-checkBillInfo?${ |
||||||
|
this.website.tokenHeader |
||||||
|
}=${getToken()}` |
||||||
|
); |
||||||
|
}, |
||||||
|
}, |
||||||
|
}; |
||||||
|
</script> |
||||||
|
|
||||||
|
<style> |
||||||
|
.downloads { |
||||||
|
display: flex; |
||||||
|
align-items: center; |
||||||
|
padding-bottom: 30px; |
||||||
|
font-size: 16px; |
||||||
|
} |
||||||
|
.tip { |
||||||
|
padding-bottom: 50px; |
||||||
|
color: #a8a8a8; |
||||||
|
font-size: 15px; |
||||||
|
} |
||||||
|
</style> |
@ -0,0 +1,189 @@ |
|||||||
|
<template> |
||||||
|
<basic-container> |
||||||
|
<avue-crud |
||||||
|
:option="option" |
||||||
|
:table-loading="loading" |
||||||
|
:data="data" |
||||||
|
:page.sync="page" |
||||||
|
:permission="permissionList" |
||||||
|
:before-open="beforeOpen" |
||||||
|
v-model="form" |
||||||
|
ref="crud" |
||||||
|
@row-update="rowUpdate" |
||||||
|
@row-save="rowSave" |
||||||
|
@row-del="rowDel" |
||||||
|
@search-change="searchChange" |
||||||
|
@search-reset="searchReset" |
||||||
|
@current-change="currentChange" |
||||||
|
@size-change="sizeChange" |
||||||
|
@refresh-change="refreshChange" |
||||||
|
@on-load="onLoad" |
||||||
|
> |
||||||
|
</avue-crud> |
||||||
|
</basic-container> |
||||||
|
</template> |
||||||
|
|
||||||
|
<script> |
||||||
|
import { getList } from "@/api/informationmanage/cardusemonth"; |
||||||
|
import { mapGetters } from "vuex"; |
||||||
|
|
||||||
|
export default { |
||||||
|
data() { |
||||||
|
return { |
||||||
|
form: {}, |
||||||
|
query: { |
||||||
|
type: 2, |
||||||
|
}, |
||||||
|
loading: true, |
||||||
|
page: { |
||||||
|
pageSize: 10, |
||||||
|
currentPage: 1, |
||||||
|
total: 0, |
||||||
|
}, |
||||||
|
option: { |
||||||
|
tip: false, |
||||||
|
searchShow: true, |
||||||
|
searchMenuSpan: 6, |
||||||
|
border: true, |
||||||
|
index: true, |
||||||
|
viewBtn: false, |
||||||
|
addBtn: false, |
||||||
|
menu: false, |
||||||
|
selection: false, |
||||||
|
dialogClickModal: false, |
||||||
|
dialogWidth: "45%", |
||||||
|
column: [ |
||||||
|
{ |
||||||
|
label: "用量(M)", |
||||||
|
prop: "usage", |
||||||
|
width: 200, |
||||||
|
}, |
||||||
|
{ |
||||||
|
label: "ICCID", |
||||||
|
prop: "iccid", |
||||||
|
search: true, |
||||||
|
}, |
||||||
|
{ |
||||||
|
label: "MSISDN", |
||||||
|
prop: "msisdn", |
||||||
|
search: true, |
||||||
|
}, |
||||||
|
{ |
||||||
|
label: "时间", |
||||||
|
type: "month", |
||||||
|
format: "yyyy-MM", |
||||||
|
valueFormat: "yyyyMM", |
||||||
|
prop: "time", |
||||||
|
search: true, |
||||||
|
}, |
||||||
|
], |
||||||
|
}, |
||||||
|
data: [], |
||||||
|
}; |
||||||
|
}, |
||||||
|
computed: { |
||||||
|
...mapGetters(["permission"]), |
||||||
|
permissionList() { |
||||||
|
return { |
||||||
|
// addBtn: this.vaildData(this.permission.product_topic_add, false), |
||||||
|
// viewBtn: this.vaildData(this.permission.product_topic_view, false), |
||||||
|
// delBtn: this.vaildData(this.permission.product_topic_delete, false), |
||||||
|
// editBtn: this.vaildData(this.permission.product_topic_edit, false), |
||||||
|
}; |
||||||
|
}, |
||||||
|
}, |
||||||
|
methods: { |
||||||
|
rowSave(row, done, loading) { |
||||||
|
add(row).then( |
||||||
|
() => { |
||||||
|
this.onLoad(this.page); |
||||||
|
this.$message({ |
||||||
|
type: "success", |
||||||
|
message: "操作成功!", |
||||||
|
}); |
||||||
|
done(); |
||||||
|
}, |
||||||
|
(error) => { |
||||||
|
loading(); |
||||||
|
window.console.log(error); |
||||||
|
} |
||||||
|
); |
||||||
|
}, |
||||||
|
rowUpdate(row, index, done, loading) { |
||||||
|
update(row).then( |
||||||
|
() => { |
||||||
|
this.onLoad(this.page); |
||||||
|
this.$message({ |
||||||
|
type: "success", |
||||||
|
message: "操作成功!", |
||||||
|
}); |
||||||
|
done(); |
||||||
|
}, |
||||||
|
(error) => { |
||||||
|
loading(); |
||||||
|
console.log(error); |
||||||
|
} |
||||||
|
); |
||||||
|
}, |
||||||
|
rowDel(row) { |
||||||
|
this.$confirm("确定将选择数据删除?", { |
||||||
|
confirmButtonText: "确定", |
||||||
|
cancelButtonText: "取消", |
||||||
|
type: "warning", |
||||||
|
}) |
||||||
|
.then(() => { |
||||||
|
return remove(row.id); |
||||||
|
}) |
||||||
|
.then(() => { |
||||||
|
this.onLoad(this.page); |
||||||
|
this.$message({ |
||||||
|
type: "success", |
||||||
|
message: "操作成功!", |
||||||
|
}); |
||||||
|
}); |
||||||
|
}, |
||||||
|
beforeOpen(done, type) { |
||||||
|
if (["edit", "view"].includes(type)) { |
||||||
|
getDetail(this.form.id).then((res) => { |
||||||
|
this.form = res.data.data; |
||||||
|
}); |
||||||
|
} |
||||||
|
done(); |
||||||
|
}, |
||||||
|
searchReset() { |
||||||
|
this.query = {}; |
||||||
|
this.onLoad(this.page); |
||||||
|
}, |
||||||
|
searchChange(params, done) { |
||||||
|
this.query = params; |
||||||
|
this.page.currentPage = 1; |
||||||
|
this.onLoad(this.page, params); |
||||||
|
done(); |
||||||
|
}, |
||||||
|
currentChange(currentPage) { |
||||||
|
this.page.currentPage = currentPage; |
||||||
|
}, |
||||||
|
sizeChange(pageSize) { |
||||||
|
this.page.pageSize = pageSize; |
||||||
|
}, |
||||||
|
refreshChange() { |
||||||
|
this.onLoad(this.page, this.query); |
||||||
|
}, |
||||||
|
onLoad(page, params = {}) { |
||||||
|
this.loading = true; |
||||||
|
getList( |
||||||
|
page.currentPage, |
||||||
|
page.pageSize, |
||||||
|
Object.assign(params, this.query) |
||||||
|
).then((res) => { |
||||||
|
const data = res.data.data; |
||||||
|
this.page.total = data.total; |
||||||
|
this.data = data.records; |
||||||
|
this.loading = false; |
||||||
|
}); |
||||||
|
}, |
||||||
|
}, |
||||||
|
}; |
||||||
|
</script> |
||||||
|
|
||||||
|
<style></style> |
Loading…
Reference in new issue