md
This commit is contained in:
parent
d5d1c8e36f
commit
8af4307f32
@ -28,6 +28,8 @@
|
|||||||
<script>
|
<script>
|
||||||
import Breadcrumb from '@/components/Breadcrumb/index2'
|
import Breadcrumb from '@/components/Breadcrumb/index2'
|
||||||
import {checkRole} from '@/utils/permission'
|
import {checkRole} from '@/utils/permission'
|
||||||
|
import { checkToken } from '@/api/login'
|
||||||
|
|
||||||
import RightPanel from '@/components/RightPanel'
|
import RightPanel from '@/components/RightPanel'
|
||||||
import { AppMain,TopHeader, Navbar, Settings, Sidebar, TagsView } from './components'
|
import { AppMain,TopHeader, Navbar, Settings, Sidebar, TagsView } from './components'
|
||||||
import ResizeMixin from './mixin/ResizeHandler'
|
import ResizeMixin from './mixin/ResizeHandler'
|
||||||
@ -80,12 +82,21 @@ export default {
|
|||||||
return variables;
|
return variables;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
mounted() {
|
mounted() {
|
||||||
|
this.startCheckToken();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
handleClickOutside() {
|
handleClickOutside() {
|
||||||
this.$store.dispatch('app/closeSideBar', { withoutAnimation: false })
|
this.$store.dispatch('app/closeSideBar', { withoutAnimation: false })
|
||||||
|
},
|
||||||
|
startCheckToken(){
|
||||||
|
setTimeout(() => {
|
||||||
|
checkToken().then(res => {
|
||||||
|
// console.log(res);
|
||||||
|
}).catch((err) => {
|
||||||
|
|
||||||
|
})
|
||||||
|
}, 60000)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -96,7 +96,7 @@ export default {
|
|||||||
// })
|
// })
|
||||||
// })
|
// })
|
||||||
})
|
})
|
||||||
}, 2000)
|
}, 300000)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,43 +1,41 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-select
|
<el-select
|
||||||
|
style="width: 100%;"
|
||||||
|
ref="selectRef"
|
||||||
|
|
||||||
:loading="loading"
|
:loading="loading"
|
||||||
filterable
|
filterable
|
||||||
clearable
|
clearable
|
||||||
|
|
||||||
|
remote
|
||||||
|
:remote-method="remoteDebounce"
|
||||||
v-model="svalue"
|
v-model="svalue"
|
||||||
:placeholder="placeholder"
|
:placeholder="placeholder"
|
||||||
:filter-method="dataFilter"
|
auto-complete="new-password"
|
||||||
style="width: 100%;"
|
|
||||||
|
|
||||||
:disabled="disabled"
|
:disabled="disabled"
|
||||||
@change="onChange">
|
@blur="onBlur"
|
||||||
|
@change="onChange"
|
||||||
|
@click.native="onClick"
|
||||||
|
@visible-change="reverseArrow"
|
||||||
|
>
|
||||||
<el-option v-for="item in optionItems" :key="item.custNo" :label="item.custName" :value="item.custNo" ></el-option>
|
<el-option v-for="item in optionItems" :key="item.custNo" :label="item.custName" :value="item.custNo" ></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { listAllSimple } from "@/api/emis/emisMonthpayAccount";
|
import emitter from 'element-ui/src/mixins/emitter';
|
||||||
|
|
||||||
|
import { listAllSimple } from "@/api/emis/emisMonthpayAccount";
|
||||||
|
import { debounce} from "@/utils/custom";
|
||||||
export default {
|
export default {
|
||||||
name: "AllMonthpayAccountPicker",
|
name: "AllMonthpayAccountPicker",
|
||||||
|
mixins: [emitter],
|
||||||
props: {
|
props: {
|
||||||
value: {
|
value: {
|
||||||
type: [String, Number],
|
type: [String, Number],
|
||||||
required: false
|
required: false
|
||||||
},
|
},
|
||||||
sideCode: {
|
|
||||||
type: String,
|
|
||||||
required: false
|
|
||||||
},
|
|
||||||
payee: {
|
|
||||||
type: String,
|
|
||||||
required: false
|
|
||||||
},
|
|
||||||
salesmen: {
|
|
||||||
type: String,
|
|
||||||
required: false
|
|
||||||
},
|
|
||||||
postCode:{
|
|
||||||
type: String,
|
|
||||||
required: false
|
|
||||||
},
|
|
||||||
isInitiated:{
|
isInitiated:{
|
||||||
type: [Boolean,String],
|
type: [Boolean,String],
|
||||||
required: false,
|
required: false,
|
||||||
@ -63,63 +61,75 @@
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
value(newVal) {
|
value(newVal,oldVal) {
|
||||||
this.svalue = newVal;
|
// 逻辑 有初始值先查询初值
|
||||||
|
// if(this.value!=null){
|
||||||
|
this.svalue=this.value;
|
||||||
|
this.queryData(null,this.svalue);
|
||||||
|
// }
|
||||||
},
|
},
|
||||||
svalue(newVal, oldVal) {
|
|
||||||
// this.$emit("input", this.svalue);
|
|
||||||
},
|
|
||||||
postCode(newVal){
|
|
||||||
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.initData();
|
if(this.svalue!=null){
|
||||||
|
this.queryData(null,this.svalue);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted(){
|
||||||
|
let rulesDom = this.$refs["selectRef"].$el.querySelector(".el-input .el-input__suffix .el-input__suffix-inner .el-input__icon"); // 找到dom
|
||||||
|
rulesDom.classList.add("el-icon-arrow-up"); // 对dom新增class
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
onClick(){
|
||||||
|
// 第一次点击时需要初始化
|
||||||
|
if(!this.defaultItems){
|
||||||
|
this.queryData(null,null);
|
||||||
|
}else{
|
||||||
|
this.optionItems = [...this.defaultItems];
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onBlur(val){
|
||||||
|
this.$emit("input", this.svalue);
|
||||||
|
this.dispatch('ElFormItem', 'el.form.blur');
|
||||||
|
},
|
||||||
onChange() {
|
onChange() {
|
||||||
this.$emit("input", this.svalue);
|
this.$emit("input", this.svalue);
|
||||||
let itemData =null;
|
let itemData = this.optionItems.find(item => item.monthlyPayCode == this.svalue);
|
||||||
this.optionItems.forEach(item=>{
|
this.$emit("change",itemData);
|
||||||
if(item.custNo === this.svalue){
|
|
||||||
itemData = item;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
this.$emit("onChange",itemData);
|
this.$emit("onChange",itemData);
|
||||||
this.optionItems = this.bakOptionItems;
|
this.dispatch('ElFormItem', 'el.form.change', [this.svalue]);
|
||||||
},
|
},
|
||||||
|
remoteDebounce(val,key){
|
||||||
initData() {
|
debounce(this.queryData(val,key),1000);
|
||||||
this.loading = true;
|
},
|
||||||
let queryParams = {
|
queryData(val,key) {
|
||||||
pageNumber:1,
|
|
||||||
pageSize:1300,
|
|
||||||
payee:this.payee,
|
|
||||||
salesmen:this.salesmen
|
|
||||||
};
|
|
||||||
this.bakOptionItems=[];
|
|
||||||
this.optionItems=[];
|
this.optionItems=[];
|
||||||
|
let queryParams = {
|
||||||
|
pageNum:1,
|
||||||
|
pageSize:10,
|
||||||
|
custName:val,
|
||||||
|
monthlyPayCode:key
|
||||||
|
};
|
||||||
listAllSimple(queryParams).then(response => {
|
listAllSimple(queryParams).then(response => {
|
||||||
this.loading = false;
|
this.optionItems =response.rows;
|
||||||
this.bakOptionItems = response.rows;
|
// 初始值存储
|
||||||
this.optionItems =this.bakOptionItems;
|
if(key==null && val==null){
|
||||||
|
this.defaultItems=[...this.optionItems]
|
||||||
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
dataFilter(val) {
|
|
||||||
this.optionDefault = val
|
|
||||||
|
|
||||||
if (val) {
|
|
||||||
let searchVal = val.toLowerCase();
|
reverseArrow(flag) {
|
||||||
this.optionItems = this.bakOptionItems.filter(item => {
|
let rulesDom = this.$refs["selectRef"].$el.querySelector(
|
||||||
if (item.custNo.indexOf(searchVal) != -1 || item.custName.toLowerCase().indexOf(searchVal) != -1 ) {
|
".el-input .el-input__suffix .el-input__suffix-inner .el-input__icon"
|
||||||
return true
|
); // 找到dom
|
||||||
}
|
if (flag) {
|
||||||
})
|
rulesDom.classList.add("is-reverse"); // 对dom新增class
|
||||||
} else {
|
} else {
|
||||||
this.optionItems = this.bakOptionItems;
|
rulesDom.classList.remove("is-reverse"); // 对dom新增class
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@ -478,7 +478,8 @@ export default {
|
|||||||
this.loading = true;
|
this.loading = true;
|
||||||
getInfoBySettleBillNo(this.settleBillNo).then(response => {
|
getInfoBySettleBillNo(this.settleBillNo).then(response => {
|
||||||
this.settleBillItem = response.data;
|
this.settleBillItem = response.data;
|
||||||
this.form.payManCode = this.settleBillItem.custCode;
|
this.form.payManCode = this.settleBillItem.custNo;
|
||||||
|
this.form.payMan=this.settleBillItem.custName;
|
||||||
console.log("===>settleBillItem3333===>",this.settleBillItem)
|
console.log("===>settleBillItem3333===>",this.settleBillItem)
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
});
|
});
|
||||||
@ -598,6 +599,11 @@ export default {
|
|||||||
this.form.payMan=item;
|
this.form.payMan=item;
|
||||||
},
|
},
|
||||||
onMonthpayAccountSelect(item){
|
onMonthpayAccountSelect(item){
|
||||||
|
console.log("onMonthpayAccountSelect==>",item);
|
||||||
|
if(item==null){
|
||||||
|
this.form.payMan=null;
|
||||||
|
return;
|
||||||
|
}
|
||||||
this.form.payMan=item.custName;
|
this.form.payMan=item.custName;
|
||||||
},
|
},
|
||||||
// 取消按钮
|
// 取消按钮
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user