Commit 146b3f65 by 曾经

Merge branch 'feature/7月基础一异常冻结会员' into dev

* feature/7月基础一异常冻结会员:
  会员卡券核销
  table-sticky
  表单滚动到 报错的位置

# Conflicts:
#	src/components/wechatmembers/cardvoucher.vue
parents c55b65a0 5ca11154
......@@ -516,7 +516,7 @@ export default {
cancelButtonText: "取消",
closeOnClickModal: false,
customClass: "import-link-confirm-content",
type: "warning"
type: "success"
}
)
.then(() => {
......
......@@ -291,7 +291,7 @@ export default {
isBatchFreeze: 0,
isAbnormalFreeze: true,
visible: true,
submit:(options)=>{
submit:(options,callBack)=>{
doFetchGet(url.updateFrozen,{
pageType: 2,
status: 1,
......@@ -301,13 +301,12 @@ export default {
}).then((res)=>{
if (res.data.errorCode === 0){
checkSuccess();
this.freezeDialogOptions = {
visible: false
};
this.init();
}
}).finally(() => {
this.freezeDialogOptions = {
visible: false
};
});
}).finally(()=>callBack && callBack());
}
})
},
......@@ -403,7 +402,7 @@ export default {
cancelButtonText: "取消",
closeOnClickModal: false,
customClass: "import-link-confirm-content",
type: "warning"
type: "success"
}
)
.then(() => {
......@@ -415,7 +414,7 @@ export default {
});
},
// 批量冻结
batchFreeze(options) {
batchFreeze(options,callBack) {
let { selectPage, multipleList, searchData } = this;
let {startDate,endDate,phoneNameCard} = searchData;
let data = {
......@@ -433,10 +432,11 @@ export default {
.then(res => {
if (res.data.errorCode === 0) {
this.freezeStatusChangeSuccess(res.data.result);
this.freezeDialogHidden();
}
})
.finally(() => {
this.freezeDialogHidden();
callBack && callBack();
});
},
// 搜索结果导出
......
......@@ -527,6 +527,19 @@ export default {
save() {
this.$refs.submitForm.validate(valid => {
this.haveClickSave = true;
this.$nextTick(_ => {
let errorDocumentList = document.getElementsByClassName('el-form-item__error');
if(errorDocumentList && errorDocumentList.length){
errorDocumentList[0].scrollIntoView({
// 滚动到指定节点
// 值有start,center,end,nearest,当前显示在视图区域中间
block: 'center',
// 值有auto、instant,smooth,缓动动画(当前是慢速的)
behavior: 'smooth'
});
}
});
if (valid) {
if(!this.haveData){
this.$message({
......
......@@ -309,7 +309,7 @@
</div>
<div
class="pager"
style="float: right; margin: 10px 0;"
style="margin: 10px 0;"
v-if="model.total > 0"
>
<dm-pagination
......@@ -317,9 +317,9 @@
@size-change="handleModelSizeChange"
@current-change="handleModelCurrentChange"
:current-page="model.currentPage"
:page-sizes="[20, 50, 75, 100]"
:page-sizes="[20]"
:page-size="model.pageSize"
layout="total, sizes, prev, pager, next, jumper"
layout="total, prev, pager, next"
:total="model.total"
>
</dm-pagination>
......@@ -673,4 +673,10 @@ export default {
height: 100%;
overflow: auto;
}
.pager{
display: flex;
align-items: center;
justify-content: flex-end;
}
</style>
<template>
<div>
<el-dialog :title="title || (isBatchFreeze ? '批量冻结会员' : '冻结会员')"
:visible.sync="visible" width="600px" @close="onClose">
:visible.sync="visible" width="600px" @close="onClose"
:close-on-click-modal="false" :close-on-press-escape="false">
<div v-if="isBatchFreeze" class="freeze-tips">
<span>当前已选择</span>
<span class="count"> {{ count }} </span>
......@@ -23,7 +24,7 @@
<el-row type="flex" justify="end">
<el-button @click="onClose">取消</el-button>
<el-button type="primary" @click="sure('submitForm')">确定</el-button>
<el-button type="primary" @click="sure('submitForm')" :loading="load">确定</el-button>
</el-row>
</el-dialog>
</div>
......@@ -45,6 +46,7 @@ export default {
},
data() {
return {
load: false,
rules:{
remark:{ required: true, message: '请输入原因备注' }
},
......@@ -61,10 +63,12 @@ export default {
sure(formName) {
this.$refs[formName].validate((valid) => {
if (valid) {
this.submit && this.submit(this.submitData);
this.load = true;
this.submit && this.submit(this.submitData,()=>{
this.load = false;
});
this.$emit('submit', this.submitData);
} else {
console.log('error submit!!');
return false;
}
});
......@@ -72,7 +76,9 @@ export default {
}
},
watch: {
visible(){
this.load = false;
}
}
};
</script>
......
......@@ -283,7 +283,7 @@ export default {
cancelButtonText: "取消",
closeOnClickModal: false,
customClass: "import-link-confirm-content",
type: "warning"
type: "success"
}
)
.then(() => {
......
......@@ -139,10 +139,11 @@ export default {
`请去【系统】-【操作任务】-【任务中心】查看处理结果和执行进度`,
`任务发起成功`,
{
type: "success",
confirmButtonText: "去任务中心",
cancelButtonText: "取消",
showClose: false,
closeOnClickModal: false,
customClass: "import-link-confirm-content",
type: "success"
}
).then(()=>{
this.loadData();
......
......@@ -131,8 +131,7 @@ export default {
isBatchFreeze: 0,
visible: true,
title: '移出并冻结会员',
submit:async (options)=>{
this.load = true;
submit:async (options,callBack)=>{
doFetchGet(url.removeFrozenWhiteMember,{
removeType: 2,
status: 1,
......@@ -147,7 +146,7 @@ export default {
};
this.loadData();
}
}).finally(()=>this.load = false)
}).finally(()=>callBack && callBack())
}
}
},
......@@ -163,6 +162,7 @@ export default {
`任务发起成功`,
{
type: "success",
customClass: "import-link-confirm-content",
confirmButtonText: "去任务中心",
cancelButtonText: "取消",
showClose: false,
......
......@@ -64,7 +64,6 @@ export default {
},
async initFixedHeader() {
if (this.parent) {
// console.log('启动监听,页面:', this.parent)
this.parentDom = document.getElementsByClassName(this.parent)
if (this.parentDom && this.parentDom.length !== 0) {
this.tableWidth = this.parentDom[0].querySelector('.el-table__header-wrapper').getBoundingClientRect().width
......@@ -156,7 +155,7 @@ export default {
let { dom } = this.getFixedDom()
if (dom.classList.contains('fixed')) {
let timer = setTimeout(() => {
this.parentDom[0].getElementsByClassName('el-table__fixed-body-wrapper')[0].style.top = this.headerTop
this.parentDom[0].getElementsByClassName('el-table__fixed-body-wrapper')[0].style.top = this.headerTop+'px'
let container = this.containerDom
if (container && container[0]) {
container[0].scrollTop = container[0].scrollTop + 3;
......@@ -190,7 +189,7 @@ export default {
let { height, top, left } = this.tablexy
let scrollTop = e.target.scrollTop
let { fixedRightHeaderDom, fixedRightBox, fixedLeftHeaderDom, fixedLeftBox, dom } = this.getFixedDom()
if (scrollTop >= height / 2 + top) {
if (scrollTop >= (height / 2 + (top-this.topMenuHeight)) ) {
// 存在右侧固定表头
if (fixedRightHeaderDom) {
this.setFixedStyle({
......@@ -215,7 +214,7 @@ export default {
this.updateWidth()
dom.style.position = 'fixed'
dom.style.zIndex = '2000'
dom.style.top =this.headerTop
dom.style.top =this.headerTop+'px'
dom.style.overflow = 'hidden'
} else {
this.clearFixedStyle()
......@@ -226,7 +225,7 @@ export default {
let { dom, scrollLeft, width, left } = data
dom.style.zIndex = '2000'
dom.style.position = 'fixed'
dom.style.top = this.headerTop
dom.style.top = this.headerTop+'px'
dom.scrollLeft = scrollLeft
dom.style.width = width
dom.style.overflow = 'hidden'
......@@ -246,13 +245,13 @@ export default {
if (fixedLeftHeaderDom) {
fixedLeftHeaderDom.style.zIndex = '0'
fixedLeftHeaderDom.style.position = 'static'
fixedLeftHeaderDom.style.top = this.headerTop
fixedLeftHeaderDom.style.top = this.headerTop+'px'
fixedLeftHeaderDom.style.left = left + 'px'
fixedLeftBox.style.top = getComputedStyle(dom).height
}
dom.classList.remove('fixed')
dom.style.position = 'static'
dom.style.top = this.headerTop
dom.style.top = this.headerTop+'px'
dom.style.zIndex = '0'
}
},
......@@ -279,7 +278,9 @@ export default {
tableWidth: 0,
timerList: [],
tableDom: null,
containerDom: null
containerDom: null,
headerWidth:0,
topMenuHeight:62
}
},
}
\ No newline at end of file
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