oa多选 ht出差报销确认

master
lion 5 months ago
parent 945013e95d
commit 7c25952968

@ -2,7 +2,7 @@
ENV = 'development' ENV = 'development'
# base api # 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_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_UPLOAD_API='https://cz-hjjc-test.115.langye.net/api/upload-file'
VUE_APP_PREVIEW=//view.langye.net/preview/onlinePreview VUE_APP_PREVIEW=//view.langye.net/preview/onlinePreview

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

@ -658,7 +658,14 @@ import {listdeptNoAuth} from "@/api/system/department";
total += Number(item.act_money) total += Number(item.act_money)
}) })
console.log("total",total,this.contract?.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) { async getRegistration(id) {

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

Loading…
Cancel
Save