oa多选 ht出差报销确认

master
lion 5 months ago
parent 945013e95d
commit 7c25952968

@ -2,7 +2,7 @@
ENV = 'development'
# base api
#VUE_APP_BASE_API='http://192.167.20.118:8080/'
#VUE_APP_BASE_API='http://192.167.20.118:8080'
VUE_APP_BASE_API='https://cz-hjjc-test.115.langye.net'
VUE_APP_UPLOAD_API='https://cz-hjjc-test.115.langye.net/api/upload-file'
VUE_APP_PREVIEW=//view.langye.net/preview/onlinePreview

@ -15,7 +15,6 @@
待审批
</el-tag>
</div>
</template>
</el-table-column>
</template>
@ -49,7 +48,7 @@
width: 54,
reserveSelection: true,
fixed: "left",
selectable: row => row.oa_ht_away_links ? false : true,
selectable: row => row.canSelect
},
{
prop: 'name',
@ -136,12 +135,22 @@
name: xingming_details,
children: [],
parent: null, //
isSelect: false //
isSelect: false ,//
canSelect:true,
};
const innerData = originalData[xingming_details];
let count=0
innerData.map(item => {
item.isSelect = false
item.canSelect = item.oa_ht_away_links?false:true
if(item.oa_ht_away_links){
count++
}
})
//
if(count==innerData.length){
person.canSelect = false
}
person.children.push(...innerData)
// const source = {
// id: Math.random(),
@ -168,7 +177,9 @@
},
splite(data, flag) {
data.forEach((row) => {
this.$refs.awayTable.toggleRowSelection(row, flag)
if(row.canSelect){
this.$refs.awayTable.toggleRowSelection(row, flag)
}
if (row.children) {
this.splite(row.children, flag)
}
@ -199,9 +210,11 @@
selectChildren(parent) {
if (parent.children) {
parent.children.forEach((child) => {
this.$refs.awayTable.toggleRowSelection(child, true); //
// child.isSelect = true; // isSelect
this.$set(child, 'isSelect', true)
if(child.canSelect){
this.$refs.awayTable.toggleRowSelection(child, true); //
// child.isSelect = true; // isSelect
this.$set(child, 'isSelect', true)
}
this.selectChildren(child); //
});
}
@ -210,13 +223,17 @@
console.log("isSelect", isSelect, parent)
if (parent.children) {
parent.children.forEach((child, index) => {
this.$refs.awayTable.toggleRowSelection(child, isSelect); //
this.$set(child, 'isSelect', isSelect)
if(child.canSelect){
this.$refs.awayTable.toggleRowSelection(child, isSelect); //
this.$set(child, 'isSelect', isSelect)
}
this.deselectChildren(child, isSelect); //
});
} else {
this.$refs.awayTable.toggleRowSelection(parent, isSelect);
this.$set(parent, 'isSelect', isSelect)
if(parent.canSelect){
this.$refs.awayTable.toggleRowSelection(parent, isSelect);
this.$set(parent, 'isSelect', isSelect)
}
console.log("parent", parent)
}
},
@ -241,7 +258,7 @@
async confirm() {
console.log("this.$refs['awayTable'].getSelection()", this.$refs['awayTable'].getSelection());
let flowsList = this.$refs['awayTable'].getSelection();
// return
let flow_id = [];
let chuchai_pay_id = [];
let chuchai_pay_details = [];

@ -658,7 +658,14 @@ import {listdeptNoAuth} from "@/api/system/department";
total += Number(item.act_money)
})
console.log("total",total,this.contract?.money)
return ((total / Number(this.contract?.money??0)) * 100).toFixed(2) || 0
if(this.contract){
if(Number(this.contract.money)>0){
return ((total / Number(this.contract.money)) * 100).toFixed(2)
}else{
return 0
}
}
},
async getRegistration(id) {

@ -49,7 +49,7 @@
</xy-table>
<div style="display: flex;justify-content: flex-end;">
<Page :total="total" show-elevator @on-change="pageChange" />
<Page :total="total" :page-size="select.pageSize" show-elevator @on-change="pageChange" />
</div>
<!-- 查看-->
@ -85,10 +85,12 @@ import { getToken } from '@/utils/auth'
types: [], //
departments: [],
select: {
pageSize:15,
pageIndex: 1,
year: '',
type: '',
department: ''
department: '',
// sort_name:'id',
},
rateTotal: '0%',
moneyTotal: 0,
@ -530,12 +532,13 @@ import { getToken } from '@/utils/auth'
async getPlanProgress() {
const res = await getProgress({
page_size: 10,
page_size: this.select.pageSize,
page: this.select.pageIndex,
year: this.select.year,
type: this.select.type,
plan_department_id: this.select.department,
top_pid: 1
top_pid: 1,
// sort_name:this.select.sort_name
})
for (var m of res.list.data) {
m.pid_info_name = m.pid_info?.name

Loading…
Cancel
Save