Commit 7e7c2af6 authored by zhengke's avatar zhengke

修改

parent c8dac2d7
......@@ -16,6 +16,11 @@
border-radius: 4px;
}
.billDialog {
width: 400px;
min-height: 150px;
}
</style>
<template>
<div class="page-body">
......@@ -71,7 +76,42 @@
</template>
<template v-slot:body-cell-optioned="props">
<q-td :props="props">
<q-btn flat size="xs" icon="edit" color="accent" style="font-weight:400" label="查看"
<q-btn flat size="xs" icon="edit" color="accent" style="font-weight:400" label="修改"
@click="getCurrentAuditMan(props.row)" />
<q-popup-proxy v-if="isShowEdit">
<q-banner>
<div class="billDialog">
<div v-for="(item,index) in AuditList" class="col row" style="margin-top:20px;">
<div class="col-5" style="align-items:center;">
<q-select v-model="item.AuditEmId" :options="EmployeeList" filled disable
option-label="EmployeeName" option-value="Id" ref="EmployeeName" class="col-6" emit-value
map-options>
</q-select>
</div>
<span style="margin:20px;">-</span>
<div class="col-5">
<q-select v-model="item.NewAuditEmId" :options="EmployeeList" filled clearable use-input
label="审核人员" option-label="EmployeeName" option-value="Id" ref="EmployeeName" class="col-6"
emit-value map-options @filter="filterFn">
<template v-slot:no-option>
<q-item>
<q-item-section class="text-grey">
未找到相关数据
</q-item-section>
</q-item>
</template>
</q-select>
</div>
</div>
</div>
</q-banner>
<q-card-actions align="right" class="bg-white">
<q-btn label="取消" flat color="grey-10" @click="isShowEdit=false" style="font-weight:400 !important" />
<q-btn label="确认" color="accent q-px-md" style="font-weight:400 !important" @click="saveBill" />
</q-card-actions>
</q-popup-proxy>
</q-btn>
<q-btn flat size="xs" icon="iconfont icon-View" color="accent" style="font-weight:400" label="查看"
@click="showBillForm(props.row,1)" />
</q-td>
</template>
......@@ -88,8 +128,14 @@
<script>
import {
GetEducationReceiptPage,
GetEducationReceiptType
GetEducationReceiptType,
queryCurrentAuditMan,
saveAuditMan
} from '../../api/teacher/index'
import {
queryEmployee
} from '../../api/users/user'; //获取员工
import backbillForm from '../../components/sale/backbill-form';
import changebillForm from '../../components/sale/changebill-form';
......@@ -189,6 +235,10 @@
billObj: {}, //单据信息
showType: 1, //1-查看,2-审核
OrderTypeList: [],
isShowEdit: false,
AuditList: [], //角色数组
EmployeeList: [],
AllemployeeList: []
}
},
created() {
......@@ -198,6 +248,7 @@
this.currentUrl = this.$route.path;
this.getEducationType();
this.getStuBackBill();
this.getEmployee();
},
methods: {
//跳转到财务单据
......@@ -279,6 +330,61 @@
this.OrderTypeList = res.Data;
}
}).catch(() => {})
},
//获取审核人
getCurrentAuditMan(obj) {
this.isShowEdit = true;
let msg = {
Id: obj.Id
}
queryCurrentAuditMan(msg).then(res => {
if (res.Code == 1) {
console.log(res, '数据');
this.AuditList = res.Data;
}
}).catch(() => {})
},
//获取员工
getEmployee() {
var qMsg = {
Dept_Id: 0
}
queryEmployee(qMsg).then(res => {
if (res.Code == 1) {
this.EmployeeList = res.Data;
this.AllemployeeList = res.Data;
}
}).catch(() => {})
},
//筛选员工
filterFn(val, update) {
update(() => {
if (val === '') {
this.EmployeeList = JSON.parse(JSON.stringify(this.AllemployeeList))
} else {
const needle = val.toLowerCase();
this.EmployeeList = this.AllemployeeList.filter(v => v.EmployeeName.toLowerCase().indexOf(needle) > -1);
}
})
},
//保存
saveBill() {
saveAuditMan({
Info:this.AuditList
}).then(res => {
if (res.Code == 1) {
this.isShow=false;
this.$q.notify({
icon: 'iconfont icon-chenggong',
color: 'accent',
timeout: 2000,
message: '数据保存成功!',
position: 'top'
})
this.getStuBackBill();
}
}).catch(() => {})
}
},
watch: {
......
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