|
|
|
@ -0,0 +1,285 @@
|
|
|
|
|
<template>
|
|
|
|
|
<a-spin :spinning="spinning">
|
|
|
|
|
<vue-scroll :ops="listScroll" class="car-apply-info-box-style" style="height:450px">
|
|
|
|
|
<div class="info-row-style">
|
|
|
|
|
<div class="info-left">车辆:</div>
|
|
|
|
|
<div class="info-right">{{applyInfo.car_name}}</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="info-row-style">
|
|
|
|
|
<div class="info-left">车牌号:</div>
|
|
|
|
|
<div class="info-right">{{applyInfo.car_no}}</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="info-row-style">
|
|
|
|
|
<div class="info-left">驾车方式:</div>
|
|
|
|
|
<div class="info-right">{{applyInfo.driving_type === 1?'司机驾驶':'自己驾驶'}}</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="info-row-style">
|
|
|
|
|
<div class="info-left">用车人员:</div>
|
|
|
|
|
<div class="info-right">
|
|
|
|
|
<div class="left-style">{{applyInfo.user_person_name}}</div>
|
|
|
|
|
<div class="right-style">
|
|
|
|
|
<div class="part-left">用车部门:</div>
|
|
|
|
|
<div class="part-right">{{applyInfo.user_dept_name}}</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="info-row-style">
|
|
|
|
|
<div class="info-left">同行人员:</div>
|
|
|
|
|
<div class="info-right">{{applyInfo.together_person_names}}</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="info-row-style">
|
|
|
|
|
<div class="info-left">开始时间:</div>
|
|
|
|
|
<div class="info-right">{{applyInfo.begin_datetime}}</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="info-row-style">
|
|
|
|
|
<div class="info-left">结束时间:</div>
|
|
|
|
|
<div class="info-right">{{applyInfo.end_datetime}}</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="info-row-style">
|
|
|
|
|
<div class="info-left">出车地点:</div>
|
|
|
|
|
<div class="info-right">{{applyInfo.departure_place}}</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="info-row-style">
|
|
|
|
|
<div class="info-left">目的地点:</div>
|
|
|
|
|
<div class="info-right">{{applyInfo.destination_place}}</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="info-row-style">
|
|
|
|
|
<div class="info-left">用车事由:</div>
|
|
|
|
|
<div class="info-right">{{applyInfo.use_car_reason}}</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="info-row-style">
|
|
|
|
|
<div class="info-left">出车时间:</div>
|
|
|
|
|
<div class="info-right">
|
|
|
|
|
<div class="left-style">{{applyInfo.leave_datetime}}</div>
|
|
|
|
|
<div class="right-style">
|
|
|
|
|
<div class="part-left">表盘里程:</div>
|
|
|
|
|
<div class="part-right">{{applyInfo.leave_mileage + '公里'}}</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="info-row-style">
|
|
|
|
|
<div class="info-left">照片:</div>
|
|
|
|
|
<div class="info-right">
|
|
|
|
|
<div v-if="leavePic.length == 0">暂无照片</div>
|
|
|
|
|
<div v-else>
|
|
|
|
|
<Uploader :type="2" :fileData="leavePic" :canUpload="false" :option="{}" :multiple="false"></Uploader>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="info-row-style">
|
|
|
|
|
<div class="info-left">还车时间:</div>
|
|
|
|
|
<div class="info-right">
|
|
|
|
|
<div class="left-style">{{applyInfo.giveback_datetime}}</div>
|
|
|
|
|
<div class="right-style">
|
|
|
|
|
<div class="part-left">表盘里程:</div>
|
|
|
|
|
<div class="part-right">{{applyInfo.giveback_mileage + '公里'}}</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="info-row-style">
|
|
|
|
|
<div class="info-left">照片:</div>
|
|
|
|
|
<div class="info-right">
|
|
|
|
|
<div v-if="givebackPic.length == 0">暂无照片</div>
|
|
|
|
|
<div v-else>
|
|
|
|
|
<Uploader :type="2" :fileData="givebackPic" :canUpload="false" :option="{}" :multiple="false"></Uploader>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<a-divider>审批内容</a-divider>
|
|
|
|
|
<ApproveCom
|
|
|
|
|
:hasNext="hasNext"
|
|
|
|
|
:checkPersonList="checkPersonList"
|
|
|
|
|
:openCopyFlag="openCopyFlag"
|
|
|
|
|
:copyPersonType="copyPersonType"
|
|
|
|
|
:copyPersonList="copyPersonList"
|
|
|
|
|
@submit="submit"
|
|
|
|
|
/>
|
|
|
|
|
</vue-scroll>
|
|
|
|
|
</a-spin>
|
|
|
|
|
</template>
|
|
|
|
|
<script>
|
|
|
|
|
/*
|
|
|
|
|
* 公车申请审批
|
|
|
|
|
* */
|
|
|
|
|
import {Spin, Divider, Modal} from 'ant-design-vue';
|
|
|
|
|
import interConfig from './interConfig';
|
|
|
|
|
import ApproveCom from './approveCom.vue';
|
|
|
|
|
import Uploader from '../../../../../../../components/common/uploader/Upload.vue';
|
|
|
|
|
import StaticParams from '../../../../../../../global-llibs/staticParams';
|
|
|
|
|
export default{
|
|
|
|
|
props: {
|
|
|
|
|
param: {
|
|
|
|
|
type: Object,
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
data(){
|
|
|
|
|
return {
|
|
|
|
|
applyInfo: {},
|
|
|
|
|
spinning: false,
|
|
|
|
|
listScroll: this.StaticParams.scrollOption,
|
|
|
|
|
hasNext: 0,//是否存在下一审批节点
|
|
|
|
|
checkPersonList: [],//审批人信息
|
|
|
|
|
nextLevelId: "",//下级节点ID
|
|
|
|
|
openCopyFlag: 0,//是否开启抄送
|
|
|
|
|
copyPersonType: -1,//抄送类型 (0-自选,1-申请部门领导,2-指定)
|
|
|
|
|
copyPersonList: [],//抄送人员
|
|
|
|
|
|
|
|
|
|
checkPersonId: "",//下一步审核人员ID
|
|
|
|
|
checkPersonName: "",//下一步审核人员姓名
|
|
|
|
|
paramCopyList: [],//抄送人
|
|
|
|
|
options: "",//审批意见
|
|
|
|
|
leavePic:[],//出车时图片
|
|
|
|
|
givebackPic:[],//还车时图片
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
computed:{
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
mounted(){
|
|
|
|
|
this.getApplyInfo();
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
getApplyInfo: function () {
|
|
|
|
|
let params = {
|
|
|
|
|
apply_id: this.param.apply_id,
|
|
|
|
|
run_type: 1,
|
|
|
|
|
person_id: this.BaseConfig.userInfo.person_id
|
|
|
|
|
}
|
|
|
|
|
this.spinning = true;
|
|
|
|
|
this.InterfaceConfig.callInterface([{
|
|
|
|
|
url: interConfig.getCarApplyInfo.url,
|
|
|
|
|
params: params,
|
|
|
|
|
method: interConfig.getCarApplyInfo.method,
|
|
|
|
|
isTestLogin: interConfig.getCarApplyInfo.isTestLogin
|
|
|
|
|
}], (result) => {
|
|
|
|
|
let res = result[0].data;
|
|
|
|
|
if (res.code === 2000) {
|
|
|
|
|
this.applyInfo = res.data.apply_info;
|
|
|
|
|
if(this.applyInfo.leave_pic && this.applyInfo.leave_pic !== ""){
|
|
|
|
|
this.leavePic = JSON.parse(this.applyInfo.leave_pic);
|
|
|
|
|
if(this.leavePic.length > 0){
|
|
|
|
|
for (let j = 0, fileLen = this.leavePic.length; j < fileLen; j++) {
|
|
|
|
|
let key = "";
|
|
|
|
|
key = StaticParams.getThumbUrl(this.leavePic[j].file_id + "." + this.leavePic[j].resource_format, 100, 100, 100);
|
|
|
|
|
if(this.BaseConfig.pt_type + "" === "1"){
|
|
|
|
|
key = key.substring(0, key.indexOf("?"))
|
|
|
|
|
}else{
|
|
|
|
|
key = key.substring(0, key.lastIndexOf("@"));
|
|
|
|
|
key = key.substring(key.indexOf("html") + 4);//去掉 http://localhost/dsideal_yy/html
|
|
|
|
|
}
|
|
|
|
|
this.leavePic[j]["key"] = key;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if(this.applyInfo.giveback_pic && this.applyInfo.giveback_pic !== ""){
|
|
|
|
|
this.givebackPic = JSON.parse(this.applyInfo.giveback_pic);
|
|
|
|
|
if(this.givebackPic.length > 0){
|
|
|
|
|
for (let j = 0, fileLen = this.givebackPic.length; j < fileLen; j++) {
|
|
|
|
|
let key = "";
|
|
|
|
|
key = StaticParams.getThumbUrl(this.givebackPic[j].file_id + "." + this.givebackPic[j].resource_format, 100, 100, 100);
|
|
|
|
|
if(this.BaseConfig.pt_type + "" === "1"){
|
|
|
|
|
key = key.substring(0, key.indexOf("?"))
|
|
|
|
|
}else{
|
|
|
|
|
key = key.substring(0, key.lastIndexOf("@"));
|
|
|
|
|
key = key.substring(key.indexOf("html") + 4);//去掉 http://localhost/dsideal_yy/html
|
|
|
|
|
}
|
|
|
|
|
this.givebackPic[j]["key"] = key;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
this.spinning = false;
|
|
|
|
|
} else {
|
|
|
|
|
this.spinning = false;
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
submit:function (res) {
|
|
|
|
|
let type = res.type;
|
|
|
|
|
this.options = res.options;
|
|
|
|
|
if(type === -1){
|
|
|
|
|
if(this.options === ""){
|
|
|
|
|
Modal.warning({
|
|
|
|
|
title:"请填写审批意见",
|
|
|
|
|
content:"",
|
|
|
|
|
centered:true
|
|
|
|
|
})
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
let submitParam = {
|
|
|
|
|
apply_id:this.param.apply_id,
|
|
|
|
|
check_flag:type,
|
|
|
|
|
person_id:this.BaseConfig.userInfo.person_id_cookie,
|
|
|
|
|
check_info:this.options,
|
|
|
|
|
}
|
|
|
|
|
this.spinning = true;
|
|
|
|
|
this.InterfaceConfig.callInterface([{
|
|
|
|
|
url: interConfig.checkGiveBackCar.url,
|
|
|
|
|
params: submitParam,
|
|
|
|
|
method: interConfig.checkGiveBackCar.method,
|
|
|
|
|
isTestLogin: interConfig.checkGiveBackCar.isTestLogin
|
|
|
|
|
}], (result) => {
|
|
|
|
|
let res = result[0].data;
|
|
|
|
|
if(res.code === 2000){
|
|
|
|
|
Modal.success({
|
|
|
|
|
title:"审批成功",
|
|
|
|
|
content:"",
|
|
|
|
|
centered:true
|
|
|
|
|
})
|
|
|
|
|
this.$emit("updateModuleData")
|
|
|
|
|
this.spinning = false;
|
|
|
|
|
}else {
|
|
|
|
|
this.spinning = false;
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
components: {
|
|
|
|
|
ASpin: Spin,
|
|
|
|
|
ADivider:Divider,
|
|
|
|
|
ApproveCom,
|
|
|
|
|
Uploader
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style scoped lang="scss">
|
|
|
|
|
.car-apply-info-box-style {
|
|
|
|
|
width: 100%;
|
|
|
|
|
/*height: calc(100% - 50px) !important;*/
|
|
|
|
|
padding: 10px !important;
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
.info-row-style {
|
|
|
|
|
width: 100%;
|
|
|
|
|
min-height: 2.5rem;
|
|
|
|
|
display: flex;
|
|
|
|
|
.info-left {
|
|
|
|
|
width: 20%;
|
|
|
|
|
text-align: right;
|
|
|
|
|
}
|
|
|
|
|
.info-right {
|
|
|
|
|
width: 80%;
|
|
|
|
|
text-align: left;
|
|
|
|
|
display: flex;
|
|
|
|
|
.left-style {
|
|
|
|
|
width: 50%;
|
|
|
|
|
text-align: left;
|
|
|
|
|
}
|
|
|
|
|
.right-style {
|
|
|
|
|
width: 50%;
|
|
|
|
|
text-align: left;
|
|
|
|
|
display: flex;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
scrollbar-width: none; /* Firefox */
|
|
|
|
|
-ms-overflow-style: none; /* IE 10+ */
|
|
|
|
|
::-webkit-scrollbar {
|
|
|
|
|
display: none; /* Chrome Safari */
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</style>
|