Commit 016f6ca5 authored by 黄奎's avatar 黄奎

页面修改

parent b51285ac
......@@ -145,14 +145,14 @@
<div style="margin:20px;">
<div class="row" style="margin-bottom:0;">
<div class="col-12">
<q-radio v-model="directorMsg.ManagerStatus" style="margin-right:20px;" :val="1" size="xs" label="通过"
<q-radio v-model="directorMsg.DirectorStatus" style="margin-right:20px;" :val="1" size="xs" label="通过"
color="secondary" />
<q-radio v-model="directorMsg.ManagerStatus" :val="2" size="xs" label="拒绝" color="negative" />
<q-radio v-model="directorMsg.DirectorStatus" :val="2" size="xs" label="拒绝" color="negative" />
</div>
</div>
<div class="row">
<div class="col-12">
<q-input filled stack-label :dense="false" v-model="directorMsg.ManagerOpinion" style="margin-top: 20px"
<q-input filled stack-label :dense="false" v-model="directorMsg.DirectorOpinion" style="margin-top: 20px"
type="textarea" class="col-12" label="审核意见" />
</div>
</div>
......@@ -181,7 +181,6 @@
</div>
</div>
</template>
</q-card>
<div class="dialog-out-close" @click="closeperForm"
style="height:40px !important;border-top-left-radius: 4px !important;border-bottom-left-radius: 4px !important;">
......@@ -191,7 +190,6 @@
</template>
<script>
import {
queryStudyAbroadAudit,
queryStudyAbroadInfo,
saveDirectorAudit,
saveManagerAudit
......@@ -232,10 +230,21 @@
},
mounted() {
this.msg.Id = this.Id;
this.queryStudy();
this.directorMsg.Id = this.Id;
this.managerMsg.Id = this.Id;
this.initObj();
},
created() {},
created() {
let userInfo = this.getLocalStorage();
let StudyAbroadObj = userInfo.StudyAbroadObj;
if (StudyAbroadObj && StudyAbroadObj.length > 0) {
StudyAbroadObj.forEach((x, index) => {
if (x.Id === userInfo.Id) {
this.AuditType = (index + 1)
}
})
}
},
methods: {
//获取数据
initObj() {
......@@ -244,31 +253,53 @@
})
.catch(() => {});
},
queryStudy() {
queryStudyAbroadAudit({}).then(res => {
this.auditList = res.Data;
let userInfo = this.getLocalStorage();
this.auditList.forEach((x, index) => {
if (x.Id === userInfo.Id) {
this.AuditType = index + 1;
}
})
})
.catch(() => {});
},
//保存
saveSatMsg() {
//1部门主管审核
if(this.AuditType==1){
saveDirectorAudit(this.directorMsg).then(res => {
if (this.AuditType == 1) {
saveDirectorAudit(this.directorMsg).then(res => {
if (res.Code == 1) {
this.$q.notify({
icon: 'iconfont icon-chenggong',
color: 'accent',
timeout: 2000,
message: '审核成功!',
position: 'top'
})
this.closeperForm();
} else {
this.$q.notify({
icon: 'iconfont icon-chenggong',
color: 'accent',
timeout: 2000,
message: res.Message,
position: 'top'
})
}
})
.catch(() => {});
}
//2部门负责人审核
if(this.AuditType==2){
saveManagerAudit(this.managerMsg).then(res => {
if (this.AuditType == 2) {
saveManagerAudit(this.managerMsg).then(res => {
if (res.Code == 1) {
this.$q.notify({
icon: 'iconfont icon-chenggong',
color: 'accent',
timeout: 2000,
message: '审核成功!',
position: 'top'
})
this.closeperForm();
} else {
this.$q.notify({
icon: 'iconfont icon-chenggong',
color: 'accent',
timeout: 2000,
message: res.Message,
position: 'top'
})
}
})
.catch(() => {});
}
......
......@@ -6,12 +6,6 @@
<q-input @input="resetSearch" clearable standout="bg-primary text-white" v-model="msg.Name" label="项目名称"
@clear="resetSearch" maxlength="20" />
</div>
<div class="col-3">
<q-select class="q-pb-lg q-pr-lg" filled stack-label option-value="Id" option-label="Name"
v-model="msg.SaleState" ref="SaleState" :options="saleDownList" label="销售状态" :dense="false" emit-value
map-options>
</q-select>
</div>
</div>
</div>
<div class="page-content">
......@@ -101,7 +95,7 @@
<q-td :props="props">
<q-btn flat size="xs" icon="edit" color="accent" style="font-weight:400" label="详情"
@click="EditStudy(props.row)" />
<q-btn v-if="props.row.SaleState==2&&AuditType>0" flat size="xs" icon="edit" color="accent"
<q-btn v-if="props.row.SaleState==2&&msg.AuditType>0" flat size="xs" icon="edit" color="accent"
style="font-weight:400" label="审核" @click="applyApply(props.row)" />
</q-td>
</template>
......@@ -217,32 +211,23 @@
PageCount: 0,
isShowStudy: false, //是否显示留学弹窗
Id: 0,
saleDownList: [{
Id: 0,
Name: '不限'
}, {
Id: 1,
Name: '销售中'
}, {
Id: 2,
Name: '已下架'
}], //销售状态下拉
AuditType: 0, //审核类型
currentUserId: 0,//当前用户登录Id
}
},
mounted() {
this.getList();
},
created() {
let userInfo = this.getLocalStorage();
let StudyAbroadObj = userInfo.StudyAbroadObj;
StudyAbroadObj.forEach((x,index)=>{
if (x.Id === userInfo.Id) {
console.log("index", index)
this.AuditType = index + 1;
console.log("this.AuditType", this.AuditType)
}
let userInfo = this.getLocalStorage();
this.currentUserId = userInfo.Id;
let StudyAbroadObj = userInfo.StudyAbroadObj;
if (StudyAbroadObj && StudyAbroadObj.length > 0) {
StudyAbroadObj.forEach(x => {
if (x.Id === userInfo.Id) {
this.msg.AuditType = x.AuditType
}
})
}
},
methods: {
//重新查询
......@@ -253,7 +238,6 @@
//获取留学分页列表
getList() {
this.loading = true;
this.msg.AuditType=1;
queryStudyAbroadPage(this.msg).then(res => {
this.loading = false;
this.dataList = res.Data.PageData;
......
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