From a94f19a21fe2098811339aa916869b0ab923536c Mon Sep 17 00:00:00 2001
From: guoshilong <123456>
Date: Mon, 26 Dec 2022 17:15:08 +0800
Subject: [PATCH] 添加车辆变更审批
---
src/views/application/application.vue | 3
src/api/applicationCarChange/applicationCarChange.js | 52 ++++
src/views/applicationDelay/applicationDelay.vue | 5
src/api/work/work.js | 10
src/views/work/process/audit/detail.vue | 1
src/const/application/basicInfo.js | 4
src/views/work/send.vue | 17 +
src/views/work/process/carChangeAudit/detail.vue | 107 ++++++++
src/const/application/application.js | 5
src/views/work/process/delayAudit/detail.vue | 91 +++++++
src/views/work/process/delayAudit/form.vue | 2
src/api/applicationDelay/applicationDelay.js | 6
src/const/applicationCarChange/applicationCarChange.js | 230 +++++++++++++---
src/views/work/process/carChangeAudit/form.vue | 57 ++++
src/views/work/start.vue | 14
src/views/work/process/audit/handle.vue | 1
src/views/applicationCarChange/applicationCarChange.vue | 8
src/views/work/process/carChangeAudit/handle.vue | 23 +
src/const/applicationDelay/applicationDelay.js | 107 +++++++
19 files changed, 656 insertions(+), 87 deletions(-)
diff --git a/src/api/applicationCarChange/applicationCarChange.js b/src/api/applicationCarChange/applicationCarChange.js
index 9cb0afb..3e47d36 100644
--- a/src/api/applicationCarChange/applicationCarChange.js
+++ b/src/api/applicationCarChange/applicationCarChange.js
@@ -12,6 +12,18 @@
})
}
+export const getPage = (current, size, params) => {
+ return request({
+ url: '/api/applicationCarChange/applicationCarChange/page',
+ method: 'get',
+ params: {
+ ...params,
+ current,
+ size,
+ }
+ })
+}
+
export const getDetail = (id) => {
return request({
url: '/api/applicationCarChange/applicationCarChange/detail',
@@ -48,3 +60,43 @@
})
}
+// =====================审核流程===========================
+/*
+ *开始流程
+ */
+export const startCarChangeProcess = (row) => {
+ return request({
+ url: '/api/applicationCarChange/applicationCarChange/start-process',
+ method: 'post',
+ data: row
+ })
+}
+
+/**
+ * 获取申请流程详情
+ * @param businessId
+ * @returns {AxiosPromise}
+ */
+export const carChangeDetail = (businessId) => {
+ return request({
+ url: '/api/applicationCarChange/applicationCarChange/process-detail',
+ method: 'get',
+ params: {
+ businessId
+ }
+ })
+}
+
+/**
+ * 审批人员完成任务
+ * @param data
+ * @returns {AxiosPromise}
+ */
+export const completeTask = (data) => {
+ return request({
+ url: '/api/applicationCarChange/applicationCarChange/complete-task',
+ method: 'post',
+ data
+ })
+}
+
diff --git a/src/api/applicationDelay/applicationDelay.js b/src/api/applicationDelay/applicationDelay.js
index 675685b..70b11d3 100644
--- a/src/api/applicationDelay/applicationDelay.js
+++ b/src/api/applicationDelay/applicationDelay.js
@@ -53,7 +53,7 @@
*/
export const startDelayProcess = (row) => {
return request({
- url: '/apiapplicationDelay/applicationDelay/start-process',
+ url: '/api/applicationDelay/applicationDelay/start-process',
method: 'post',
data: row
})
@@ -66,7 +66,7 @@
*/
export const delayDetail = (businessId) => {
return request({
- url: '/apiapplicationDelay/applicationDelay/process-detail',
+ url: '/api/applicationDelay/applicationDelay/process-detail',
method: 'get',
params: {
businessId
@@ -81,7 +81,7 @@
*/
export const completeTask = (data) => {
return request({
- url: '/apiapplicationDelay/applicationDelay/complete-task',
+ url: '/api/applicationDelay/applicationDelay/complete-task',
method: 'post',
data
})
diff --git a/src/api/work/work.js b/src/api/work/work.js
index c815686..bd5069a 100644
--- a/src/api/work/work.js
+++ b/src/api/work/work.js
@@ -79,3 +79,13 @@
data
})
}
+
+export const withdrawTask = (userId) => {
+ return request({
+ url: '/api/blade-flow/work/withdraw-task',
+ method: 'post',
+ params: {
+ userId
+ }
+ })
+}
diff --git a/src/const/application/application.js b/src/const/application/application.js
index 4af12ec..8e9d09d 100644
--- a/src/const/application/application.js
+++ b/src/const/application/application.js
@@ -21,6 +21,7 @@
editBtn:false,
selection: true,
dialogClickModal: false,
+ menu:false,
group: [
{
label: '基本信息',
@@ -56,7 +57,7 @@
},
{
label: "通行开始时间",
- prop: "startTime",
+ prop: "startPassTime",
type: "date",
format:'yyyy-MM-dd',
valueFormat:'yyyy-MM-dd',
@@ -65,7 +66,7 @@
},
{
label: "通行结束时间",
- prop: "endTime",
+ prop: "endPassTime",
type: "date",
format:'yyyy-MM-dd',
valueFormat:'yyyy-MM-dd',
diff --git a/src/const/application/basicInfo.js b/src/const/application/basicInfo.js
index 45f8120..b6a1eb9 100644
--- a/src/const/application/basicInfo.js
+++ b/src/const/application/basicInfo.js
@@ -30,12 +30,12 @@
},
{
label: "通行开始时间",
- prop: "startTime",
+ prop: "startPassTime",
type: "input",
},
{
label: "通行结束时间",
- prop: "endTime",
+ prop: "endPassTime",
type: "input",
},
{
diff --git a/src/const/applicationCarChange/applicationCarChange.js b/src/const/applicationCarChange/applicationCarChange.js
index f1d6b79..65a2c9d 100644
--- a/src/const/applicationCarChange/applicationCarChange.js
+++ b/src/const/applicationCarChange/applicationCarChange.js
@@ -1,3 +1,7 @@
+const labelWidth = '15%'
+import store from "@/store";
+const user = store.getters.userInfo
+const userId = user.user_id
export default {
height:'auto',
calcHeight: 30,
@@ -9,6 +13,7 @@
viewBtn: true,
selection: true,
dialogClickModal: false,
+ menu:false,
column: [
{
label: "主键",
@@ -18,88 +23,213 @@
editDisplay: false,
viewDisplay: false,
hide: true,
+ display:false,
},
{
- label: "申请表主键",
- prop: "applicationId",
+ label: "申请编号",
+ labelWidth:labelWidth,
+ prop: "no",
+ type: "select",
+ dicUrl: "/api/application/application/getAll?status=10&&userId="+userId,
+ props:{
+ label:"no",
+ value:"no"
+ },
+ typeformat(item, label) {
+ return `${item[label]}`
+ },
+ rules: [{required: true, trigger: ['blur','change'],message:'请输入申请编号'}]
+ },
+ {
+ label: "变更原因",
+ span: 12,
+ labelWidth:labelWidth,
+ prop: "reason",
+ type: "select",
+ dicUrl: "/api/blade-system/dict-biz/dictionary?code=car_change_reason",
+ props:{
+ label:"dictValue",
+ value:"dictKey"
+ }
+ },
+ {
+ label: "变更车牌号",
+ prop: "carLicense",
+ type: "input",
+ labelWidth:labelWidth,
+ },
+ {
+ label: "厂牌型号",
+ prop: "carModel",
+ labelWidth:labelWidth,
type: "input",
},
{
- label: "变更车辆的车牌",
- prop: "licenseUrl",
+ label: "变更挂车牌号",
+ prop: "trailerLicense",
type: "input",
+ labelWidth:labelWidth,
},
{
- label: "租户id",
- prop: "tenantId",
+ label: "挂车厂牌型号",
+ prop: "trailerModel",
type: "input",
- addDisplay: false,
- editDisplay: false,
- viewDisplay: false,
- hide: true,
+ labelWidth:labelWidth,
},
{
- label: "创建人",
- prop: "createUser",
+ label: "装备质量",
+ prop: "equipmentWeight",
type: "input",
- addDisplay: false,
- editDisplay: false,
- viewDisplay: false,
- hide: true,
+ labelWidth:labelWidth,
+ append:'吨',
},
{
- label: "创建部门",
- prop: "createDept",
+ label: "轴数",
+ prop: "shaftNumber",
type: "input",
- addDisplay: false,
- editDisplay: false,
- viewDisplay: false,
- hide: true,
+ labelWidth:labelWidth,
+ append:'轴',
},
{
- label: "创建时间",
- prop: "createTime",
+ label: "轮胎数",
+ prop: "tireNumber",
type: "input",
- addDisplay: false,
- editDisplay: false,
- viewDisplay: false,
- hide: true,
+ labelWidth:labelWidth,
},
{
- label: "修改人",
- prop: "updateUser",
+ label: "轴距",
+ prop: "wheelbase",
type: "input",
- addDisplay: false,
- editDisplay: false,
- viewDisplay: false,
- hide: true,
+ labelWidth:labelWidth,
+ append:'米',
},
{
- label: "修改时间",
- prop: "updateTime",
- type: "input",
- addDisplay: false,
- editDisplay: false,
- viewDisplay: false,
- hide: true,
- },
- {
- label: "状态",
+ label: "办理进度",
prop: "status",
+ type: "select",
+ props: {
+ label: "dictValue",
+ value: "dictKey"
+ },
+ dicUrl:'/api/blade-system/dict-biz/dictionary?code=application_status',
+ addDisplay: false,
+ editDisplay: false,
+ viewDisplay: false,
+ display:false,
+ },
+ ]
+}
+
+export const detailOption={
+ height:'auto',
+ calcHeight: 30,
+ tip: false,
+ submitBtn:false,
+ emptyBtn:false,
+ border: true,
+ index: true,
+ selection: true,
+ dialogClickModal: false,
+ detail:true,
+ column: [
+ {
+ label: "主键",
+ prop: "id",
type: "input",
addDisplay: false,
editDisplay: false,
viewDisplay: false,
hide: true,
+ display:false,
+ disabled:true,
},
{
- label: "是否已删除",
- prop: "isDeleted",
+ label: "申请编号",
+ labelWidth:labelWidth,
+ disabled:true,
+ prop: "no",
+ type: "select",
+ dicUrl: "/api/application/application/getAll?status=10&&userId="+userId,
+ props:{
+ label:"no",
+ value:"no"
+ },
+ typeformat(item, label) {
+ return `${item[label]}`
+ },
+ rules: [{required: true, trigger: ['blur','change'],message:'请输入申请编号'}]
+ },
+ {
+ label: "变更原因",
+ disabled:true,
+ span: 12,
+ labelWidth:labelWidth,
+ prop: "reason",
+ type: "select",
+ dicUrl: "/api/blade-system/dict-biz/dictionary?code=car_change_reason",
+ props:{
+ label:"dictValue",
+ value:"dictKey"
+ }
+ },
+ {
+ label: "变更车牌号",
+ disabled:true,
+ prop: "carLicense",
type: "input",
- addDisplay: false,
- editDisplay: false,
- viewDisplay: false,
- hide: true,
+ labelWidth:labelWidth,
+ },
+ {
+ label: "厂牌型号",
+ disabled:true,
+ prop: "carModel",
+ labelWidth:labelWidth,
+ type: "input",
+ },
+ {
+ label: "变更挂车牌号",
+ disabled:true,
+ prop: "trailerLicense",
+ type: "input",
+ labelWidth:labelWidth,
+ },
+ {
+ label: "挂车厂牌型号",
+ disabled:true,
+ prop: "trailerModel",
+ type: "input",
+ labelWidth:labelWidth,
+ },
+ {
+ label: "装备质量",
+ disabled:true,
+ prop: "equipmentWeight",
+ type: "input",
+ labelWidth:labelWidth,
+ append:'吨',
+ },
+ {
+ label: "轴数",
+ disabled:true,
+ prop: "shaftNumber",
+ type: "input",
+ labelWidth:labelWidth,
+ append:'轴',
+ },
+ {
+ label: "轮胎数",
+ disabled:true,
+ prop: "tireNumber",
+ type: "input",
+ labelWidth:labelWidth,
+ },
+ {
+ label: "轴距",
+ disabled:true,
+ prop: "wheelbase",
+ type: "input",
+ labelWidth:labelWidth,
+ append:'米',
},
]
}
diff --git a/src/const/applicationDelay/applicationDelay.js b/src/const/applicationDelay/applicationDelay.js
index 8d2776b..2605279 100644
--- a/src/const/applicationDelay/applicationDelay.js
+++ b/src/const/applicationDelay/applicationDelay.js
@@ -14,6 +14,7 @@
viewBtn: true,
selection: true,
dialogClickModal: false,
+ menu:false,
column: [
{
label: "主键",
@@ -36,8 +37,7 @@
label:"no",
value:"no"
},
- typeformat(item, label, value) {
- console.log(item,label,value)
+ typeformat(item, label) {
return `${item[label]}`
},
rules: [{required: true, trigger: ['blur','change'],message:'请输入申请编号'}]
@@ -52,7 +52,7 @@
disabled:false,
},
{
- label: "通行开始时间",
+ label: "通行结束时间",
labelWidth:labelWidth,
prop: "delayEndTime",
type: "date",
@@ -61,13 +61,48 @@
disabled:false,
},
{
- label: "行驶路线",
- span:12,
- row: true,
+ label: "起运机构",
+ prop: "transportDept",
+ type: "input",
labelWidth:labelWidth,
- prop: "pathWay",
+ disabled:false,
+ },
+ {
+ label: "途径省份",
+ prop: "passProvince",
+ type: "input",
+ labelWidth:labelWidth,
+ disabled:false,
+ },
+ {
+ label: "出发地",
+ prop: "departure",
+ type: "input",
+ labelWidth:labelWidth,
+ disabled:false,
+ },
+ {
+ label: "目的地",
+ prop: "destination",
+ type: "input",
+ labelWidth:labelWidth,
+ disabled:false,
+ },
+ {
+ label: "通行路线",
+ prop: "pathway",
type: "textarea",
minRows:2,
+ labelWidth:labelWidth,
+ disabled:false,
+ },
+ {
+ label: "通行桥涵",
+ prop: "passBridge",
+ type: "textarea",
+ minRows:2,
+ labelWidth:labelWidth,
+ disabled:false,
},
{
label: "延期原因",
@@ -88,6 +123,20 @@
prop: "remark",
type: "textarea",
minRows:2,
+ },
+ {
+ label: "办理进度",
+ prop: "status",
+ type: "select",
+ props: {
+ label: "dictValue",
+ value: "dictKey"
+ },
+ dicUrl:'/api/blade-system/dict-biz/dictionary?code=application_status',
+ addDisplay: false,
+ editDisplay: false,
+ viewDisplay: false,
+ display:false,
},
]
}
@@ -127,7 +176,7 @@
disabled:true,
},
{
- label: "通行开始时间",
+ label: "通行结束时间",
labelWidth:labelWidth,
prop: "delayEndTime",
type: "date",
@@ -136,14 +185,48 @@
disabled:true,
},
{
- label: "行驶路线",
- span:12,
- row: true,
+ label: "起运机构",
+ prop: "transportDept",
+ type: "input",
labelWidth:labelWidth,
disabled:true,
- prop: "pathWay",
+ },
+ {
+ label: "途径省份",
+ prop: "passProvince",
+ type: "input",
+ labelWidth:labelWidth,
+ disabled:true,
+ },
+ {
+ label: "出发地",
+ prop: "departure",
+ type: "input",
+ labelWidth:labelWidth,
+ disabled:true,
+ },
+ {
+ label: "目的地",
+ prop: "destination",
+ type: "input",
+ labelWidth:labelWidth,
+ disabled:true,
+ },
+ {
+ label: "通行路线",
+ prop: "pathway",
type: "textarea",
minRows:2,
+ labelWidth:labelWidth,
+ disabled:true,
+ },
+ {
+ label: "通行桥涵",
+ prop: "passBridge",
+ type: "textarea",
+ minRows:2,
+ labelWidth:labelWidth,
+ disabled:true,
},
{
label: "延期原因",
diff --git a/src/views/application/application.vue b/src/views/application/application.vue
index b3fb609..d1ccf9e 100644
--- a/src/views/application/application.vue
+++ b/src/views/application/application.vue
@@ -234,6 +234,7 @@
let catId = car.id
let goods = this.form.goodsEntity
let goodsId = goods.id
+ this.form.endPassTime = basic.endPassTime
let form = this.form
//保留原form中的字段
let common = Object.assign({},form)
@@ -243,10 +244,8 @@
form = Object.assign(form,scheme)
form = Object.assign(form,car)
form = Object.assign(form,goods)
-
//覆盖回原form
form = Object.assign(form,common)
-
this.form.basicInfoEntity.id = basicId
this.form.planEntity.id = planId
this.form.schemeEntity.id = schemeId
diff --git a/src/views/applicationCarChange/applicationCarChange.vue b/src/views/applicationCarChange/applicationCarChange.vue
index 69d0a9b..afa058c 100644
--- a/src/views/applicationCarChange/applicationCarChange.vue
+++ b/src/views/applicationCarChange/applicationCarChange.vue
@@ -36,7 +36,7 @@
</template>
<script>
- import {getList, getDetail, add, update, remove} from "@/api/applicationCarChange/applicationCarChange";
+ import {getPage, getDetail, add, update, remove} from "@/api/applicationCarChange/applicationCarChange";
import option from "@/const/applicationCarChange/applicationCarChange";
import {mapGetters} from "vuex";
@@ -176,10 +176,14 @@
},
onLoad(page, params = {}) {
this.loading = true;
- getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
+ getPage(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
const data = res.data.data;
this.page.total = data.total;
this.data = data.records;
+ //转换数据类型
+ this.data.forEach(e=>{
+ e.status = e.status.toString()
+ })
this.loading = false;
this.selectionClear();
});
diff --git a/src/views/applicationDelay/applicationDelay.vue b/src/views/applicationDelay/applicationDelay.vue
index d7d9cb3..10081c7 100644
--- a/src/views/applicationDelay/applicationDelay.vue
+++ b/src/views/applicationDelay/applicationDelay.vue
@@ -180,6 +180,11 @@
const data = res.data.data;
this.page.total = data.total;
this.data = data.records;
+ //转换数据类型
+ this.data.forEach(e=>{
+ e.status = e.status.toString()
+ })
+
this.loading = false;
this.selectionClear();
});
diff --git a/src/views/work/process/audit/detail.vue b/src/views/work/process/audit/detail.vue
index 99197aa..f8349e6 100644
--- a/src/views/work/process/audit/detail.vue
+++ b/src/views/work/process/audit/detail.vue
@@ -109,6 +109,7 @@
let catId = car.id
let goods = this.form.goodsEntity
let goodsId = goods.id
+ this.form.endPassTime = basic.endPassTime
let form = this.form
//保留原form中的字段
let common = Object.assign({},form)
diff --git a/src/views/work/process/audit/handle.vue b/src/views/work/process/audit/handle.vue
index 136fc1c..fdb9618 100644
--- a/src/views/work/process/audit/handle.vue
+++ b/src/views/work/process/audit/handle.vue
@@ -460,6 +460,7 @@
let catId = car.id
let goods = this.form.goodsEntity
let goodsId = goods.id
+ this.form.endPassTime = basic.endPassTime
let form = this.form
//保留原form中的字段
let common = Object.assign({}, form)
diff --git a/src/views/work/process/carChangeAudit/detail.vue b/src/views/work/process/carChangeAudit/detail.vue
new file mode 100644
index 0000000..9afef70
--- /dev/null
+++ b/src/views/work/process/carChangeAudit/detail.vue
@@ -0,0 +1,107 @@
+<template>
+ <basic-container>
+ <el-form ref="form" :model="form" label-width="80px">
+ <el-row type="flex" class="row-bg" justify="end">
+ <el-form-item>
+ <el-button @click="handleCancel">关闭</el-button>
+ </el-form-item>
+ </el-row>
+ <el-card shadow="hover">
+ <div slot="header">
+ <span>审批信息</span>
+ </div>
+ <avue-form :option="option" v-model="form"/>
+ </el-card>
+ <el-card shadow="hover">
+ <div slot="header">
+ <span>流程信息</span>
+ </div>
+ <el-row type="flex" class="row-bg">
+ <el-timeline>
+ <el-timeline-item :key="flow.id" :timestamp="flow.createTime" v-for="flow in flowList" placement="top">
+ <el-card shadow="hover">
+ <p>{{flow.assigneeName}} 在 [{{flow.createTime}}] 开始处理 [{{flow.historyActivityName}}] 环节</p>
+ <p v-if="flow.historyActivityDurationTime!==''">任务历时 [{{flow.historyActivityDurationTime}}]</p>
+ <p v-if="flow.comment!==''">批复意见: [{{flow.comment}}]</p>
+ <p v-if="flow.endTime!==''">结束时间: [{{flow.endTime}}]</p>
+ </el-card>
+ </el-timeline-item>
+ </el-timeline>
+ </el-row>
+ </el-card>
+ <el-card shadow="hover">
+ <div slot="header">
+ <span>流程跟踪</span>
+ </div>
+ <el-row class="row-bg">
+ <flow-design :is-display="true" :process-instance-id="processInstanceId"></flow-design>
+ </el-row>
+ </el-card>
+ </el-form>
+ </basic-container>
+</template>
+
+<script>
+import {historyFlowList} from "@/api/work/process";
+import {detailOption} from "@/const/applicationCarChange/applicationCarChange";
+import {carChangeDetail} from "@/api/applicationCarChange/applicationCarChange";
+export default {
+ name: "detail",
+ data() {
+ return {
+ businessId: '',
+ processInstanceId: '',
+ src: '',
+ flowList: [],
+ form: {},
+ option:detailOption
+ }
+ },
+ created() {
+ this.init();
+ },
+ methods: {
+ init() {
+ this.processInstanceId = this.$route.params.processInstanceId;
+ this.businessId = this.$route.params.businessId;
+ historyFlowList(this.processInstanceId).then(res => {
+ const data = res.data;
+ if (data.success) {
+ this.flowList = data.data;
+ }
+ })
+ carChangeDetail(this.businessId).then(res => {
+ const data = res.data;
+ if (data.success) {
+ this.form = data.data;
+ this.initForm();
+ }
+ })
+ },
+ handleCancel() {
+ this.$router.$avueRouter.closeTag();
+ this.$router.push({path: `/work/start`});
+ },
+ initForm(){
+ let form = this.form;
+
+ let car= this.form.carEntity
+ let carId = car.id
+
+ //保留原form中的字段
+ let common = Object.assign({},form)
+
+ form = Object.assign(form,car)
+
+ //覆盖回原form
+ form = Object.assign(form,common)
+
+ this.form.carEntity.id =carId
+ }
+ }
+}
+</script>
+
+<style scoped>
+
+</style>
diff --git a/src/views/work/process/carChangeAudit/form.vue b/src/views/work/process/carChangeAudit/form.vue
new file mode 100644
index 0000000..b7aac79
--- /dev/null
+++ b/src/views/work/process/carChangeAudit/form.vue
@@ -0,0 +1,57 @@
+<template>
+ <div>
+ <basic-container>
+ <avue-form :option="option" v-model="form" @submit="handleSubmit">
+
+ <template slot="noType" slot-scope="{item,value,label}">
+ <span>申请编号:{{item.no}}---申请时间:{{item.createTime}}---车牌号:{{item.licensePlate}}</span>
+ </template>
+
+ </avue-form>
+ </basic-container>
+ <basic-container>
+ <flow-design :is-display="true" :process-definition-id="processDefinitionId"></flow-design>
+ </basic-container>
+ </div>
+</template>
+
+<script>
+import option from "@/const/applicationCarChange/applicationCarChange";
+import {startCarChangeProcess} from "@/api/applicationCarChange/applicationCarChange";
+
+export default {
+ name: "form",
+ data() {
+ return {
+ processDefinitionId: '',
+ form: {},
+ option: option
+ }
+ },
+ created() {
+ this.processDefinitionId = this.$route.params.processDefinitionId;
+ },
+ methods: {
+ handleSubmit() {
+ const params = {
+ processDefinitionId: this.$route.params.processDefinitionId,
+ ...this.form,
+ };
+ startCarChangeProcess(params).then(resp => {
+ const data = resp.data;
+ if (data.success) {
+ this.$message.success(data.msg);
+ this.$router.$avueRouter.closeTag();
+ this.$router.push({path: `/work/start`});
+ } else {
+ this.$message.error(data.msg || '提交失败');
+ }
+ });
+ }
+ }
+}
+</script>
+
+<style scoped>
+
+</style>
diff --git a/src/views/work/process/carChangeAudit/handle.vue b/src/views/work/process/carChangeAudit/handle.vue
index 0a2bd08..39e20ee 100644
--- a/src/views/work/process/carChangeAudit/handle.vue
+++ b/src/views/work/process/carChangeAudit/handle.vue
@@ -49,8 +49,8 @@
<script>
import {historyFlowList} from "@/api/work/process";
-import {completeTask,delayDetail} from "@/api/applicationDelay/applicationDelay";
-import {detailOption} from "@/const/applicationDelay/applicationDelay";
+import {detailOption} from "@/const/applicationCarChange/applicationCarChange";
+import {carChangeDetail,completeTask} from "@/api/applicationCarChange/applicationCarChange";
export default {
name: "handle",
@@ -114,10 +114,11 @@
this.flowList = data.data;
}
})
- delayDetail(this.businessId).then(res => {
+ carChangeDetail(this.businessId).then(res => {
const data = res.data;
if (data.success) {
this.form = data.data;
+ this.initForm();
}
})
},
@@ -166,6 +167,22 @@
}else if(arg =='close'){
this.option.detail = true
}
+ },
+ initForm(){
+ let form = this.form;
+
+ let car= this.form.carEntity
+ let carId = car.id
+
+ //保留原form中的字段
+ let common = Object.assign({},form)
+
+ form = Object.assign(form,car)
+
+ //覆盖回原form
+ form = Object.assign(form,common)
+
+ this.form.carEntity.id =carId
}
}
}
diff --git a/src/views/work/process/delayAudit/detail.vue b/src/views/work/process/delayAudit/detail.vue
new file mode 100644
index 0000000..107b078
--- /dev/null
+++ b/src/views/work/process/delayAudit/detail.vue
@@ -0,0 +1,91 @@
+<template>
+ <basic-container>
+ <el-form ref="form" :model="form" label-width="80px">
+ <el-row type="flex" class="row-bg" justify="end">
+ <el-form-item>
+ <el-button @click="handleCancel">关闭</el-button>
+ </el-form-item>
+ </el-row>
+ <el-card shadow="hover">
+ <div slot="header">
+ <span>审批信息</span>
+ </div>
+ <avue-form :option="option" v-model="form"/>
+ </el-card>
+ <el-card shadow="hover">
+ <div slot="header">
+ <span>流程信息</span>
+ </div>
+ <el-row type="flex" class="row-bg">
+ <el-timeline>
+ <el-timeline-item :key="flow.id" :timestamp="flow.createTime" v-for="flow in flowList" placement="top">
+ <el-card shadow="hover">
+ <p>{{flow.assigneeName}} 在 [{{flow.createTime}}] 开始处理 [{{flow.historyActivityName}}] 环节</p>
+ <p v-if="flow.historyActivityDurationTime!==''">任务历时 [{{flow.historyActivityDurationTime}}]</p>
+ <p v-if="flow.comment!==''">批复意见: [{{flow.comment}}]</p>
+ <p v-if="flow.endTime!==''">结束时间: [{{flow.endTime}}]</p>
+ </el-card>
+ </el-timeline-item>
+ </el-timeline>
+ </el-row>
+ </el-card>
+ <el-card shadow="hover">
+ <div slot="header">
+ <span>流程跟踪</span>
+ </div>
+ <el-row class="row-bg">
+ <flow-design :is-display="true" :process-instance-id="processInstanceId"></flow-design>
+ </el-row>
+ </el-card>
+ </el-form>
+ </basic-container>
+</template>
+
+<script>
+import {historyFlowList} from "@/api/work/process";
+import {delayDetail} from "@/api/applicationDelay/applicationDelay";
+import {mapGetters} from "vuex";
+import {detailOption} from "@/const/applicationDelay/applicationDelay";
+export default {
+ name: "detail",
+ data() {
+ return {
+ businessId: '',
+ processInstanceId: '',
+ src: '',
+ flowList: [],
+ form: {},
+ option:detailOption
+ }
+ },
+ created() {
+ this.init();
+ },
+ methods: {
+ init() {
+ this.processInstanceId = this.$route.params.processInstanceId;
+ this.businessId = this.$route.params.businessId;
+ historyFlowList(this.processInstanceId).then(res => {
+ const data = res.data;
+ if (data.success) {
+ this.flowList = data.data;
+ }
+ })
+ delayDetail(this.businessId).then(res => {
+ const data = res.data;
+ if (data.success) {
+ this.form = data.data;
+ }
+ })
+ },
+ handleCancel() {
+ this.$router.$avueRouter.closeTag();
+ this.$router.push({path: `/work/start`});
+ }
+ }
+}
+</script>
+
+<style scoped>
+
+</style>
diff --git a/src/views/work/process/delayAudit/form.vue b/src/views/work/process/delayAudit/form.vue
index b6e889e..8d9a8f8 100644
--- a/src/views/work/process/delayAudit/form.vue
+++ b/src/views/work/process/delayAudit/form.vue
@@ -4,7 +4,7 @@
<avue-form :option="option" v-model="form" @submit="handleSubmit">
<template slot="noType" slot-scope="{item,value,label}">
- <span>申请编号:{{item.no}}---申请时间:{{item.createTime}}---到期时间:{{item.endTime}}</span>
+ <span>申请编号:{{item.no}}---申请时间:{{item.createTime}}---到期时间:{{item.endPassTime}}</span>
</template>
</avue-form>
diff --git a/src/views/work/send.vue b/src/views/work/send.vue
index 0a06f88..4d6ed2b 100644
--- a/src/views/work/send.vue
+++ b/src/views/work/send.vue
@@ -22,6 +22,11 @@
</el-button>
<el-button type="text"
size="small"
+ icon="el-icon-delete"
+ @click.stop="handleCancel(scope.row)">撤 销
+ </el-button>
+ <el-button type="text"
+ size="small"
icon="el-icon-search"
v-if="permission.work_send_follow"
@click.stop="handleImage(scope.row,scope.index)">流程图
@@ -42,7 +47,7 @@
<script>
import {mapGetters} from "vuex";
- import {sendList} from "@/api/work/work";
+ import {sendList, withdrawTask} from "@/api/work/work";
import {flowCategory,flowRoute} from "@/util/flow";
export default {
@@ -75,7 +80,7 @@
viewBtn: false,
delBtn: false,
dialogWidth: 900,
- menuWidth: 150,
+ menuWidth: 200,
dialogClickModal: false,
column: [
{
@@ -126,7 +131,7 @@
};
},
computed: {
- ...mapGetters(["permission", "flowRoutes"]),
+ ...mapGetters(["permission", "flowRoutes","userInfo"]),
ids() {
let ids = [];
this.selectionList.forEach(ele => {
@@ -182,6 +187,12 @@
this.loading = false;
this.selectionClear();
});
+ },
+ handleCancel(row){
+ console.log(row)
+ withdrawTask(this.userInfo.user_id).then(res=>{
+ this.$message(res.data.msg)
+ })
}
}
};
diff --git a/src/views/work/start.vue b/src/views/work/start.vue
index a4baecd..006aab3 100644
--- a/src/views/work/start.vue
+++ b/src/views/work/start.vue
@@ -13,12 +13,12 @@
@size-change="sizeChange"
@refresh-change="refreshChange"
@on-load="onLoad">
- <template slot="menuLeft">
- <el-radio-group v-model="mode" size="small">
- <el-radio-button label="1">通用流程</el-radio-button>
- <el-radio-button label="2">定制流程</el-radio-button>
- </el-radio-group>
- </template>
+<!-- <template slot="menuLeft">-->
+<!-- <el-radio-group v-model="mode" size="small">-->
+<!-- <el-radio-button label="1">通用流程</el-radio-button>-->
+<!-- <el-radio-button label="2">定制流程</el-radio-button>-->
+<!-- </el-radio-group>-->
+<!-- </template>-->
<template slot-scope="scope" slot="menu">
<el-button type="text"
size="small"
@@ -63,7 +63,7 @@
data() {
return {
form: {},
- mode: '1',
+ mode: '2',
selectionId: '',
selectionList: [],
query: {},
--
Gitblit v1.9.3