Browse Source

完善业务模块打开流转记录的功能

master
yxt_djz 3 years ago
parent
commit
7d6ed3a094
  1. 9
      anrui-base/anrui-base-api/src/main/java/com/yxt/anrui/base/api/baseoutsourcingapplication/BaseOutsourcingApplicationVo.java
  2. 111
      anrui-fin/anrui-fin-api/src/main/java/com/yxt/anrui/fin/api/kingdee/Data.java
  3. 29
      anrui-fin/anrui-fin-api/src/main/java/com/yxt/anrui/fin/api/kingdee/FinKingDeeFeign.java
  4. 12
      anrui-fin/anrui-fin-api/src/main/java/com/yxt/anrui/fin/api/kingdee/FinKingDeeFeignFallBack.java
  5. 116
      anrui-fin/anrui-fin-api/src/main/java/com/yxt/anrui/fin/api/kingdee/entrybill/EntryBillDto.java
  6. 21
      anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/kingdee/FinKingDeeFeignRest.java
  7. 3
      anrui-flowable/anrui-flowable-biz/src/main/java/com/yxt/anrui/flowable/biz/flowtask/FlowTaskService.java
  8. 7
      anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehiclereturn/ScmVehicleReturnService.java
  9. 51
      anrui-scm/anrui-scm-ui/src/views/baseoutsourcingapplication/baseoutsourcingapplication.vue
  10. 12
      anrui-scm/anrui-scm-ui/src/views/ruzhang/ruzhangguanli/ruzhangguanli.vue
  11. 2
      anrui-scm/anrui-scm-ui/src/views/supplychain/caigoutuiku/caigoutuiku.vue
  12. 2
      anrui-scm/anrui-scm-ui/vue.config.js
  13. 10
      anrui-system-ui/src/api/flow/todo.js
  14. 24
      anrui-system-ui/src/api/flow/todoForBusiness.js
  15. 0
      anrui-system-ui/src/components/flow/flow.vue
  16. 91
      anrui-system-ui/src/components/flow/flowRecord.vue
  17. 12
      anrui-system-ui/src/router/index.js
  18. 4
      anrui-system-ui/src/views/Home/Home.vue
  19. 67
      anrui-system-ui/src/views/flow/doneList.vue
  20. 73
      anrui-system-ui/src/views/flow/flowRecordForBusiness.vue
  21. 73
      anrui-system-ui/src/views/flow/todoList.vue

9
anrui-base/anrui-base-api/src/main/java/com/yxt/anrui/base/api/baseoutsourcingapplication/BaseOutsourcingApplicationVo.java

@ -65,5 +65,12 @@ public class BaseOutsourcingApplicationVo implements Vo {
private String guidedPrice; // 销售指导价
@ApiModelProperty("节点状态")
private String nodeState; // 节点状态
@ApiModelProperty("流程定义的id")
private String procDefId;
@ApiModelProperty("环节定义的sid")
private String taskDefKey;
@ApiModelProperty("流程实例的sid")
private String procInstSid;
@ApiModelProperty("任务id")
private String taskId;
}

111
anrui-fin/anrui-fin-api/src/main/java/com/yxt/anrui/fin/api/kingdee/Data.java

@ -0,0 +1,111 @@
package com.yxt.anrui.fin.api.kingdee;
import com.alibaba.fastjson.annotation.JSONField;
import com.alibaba.fastjson.annotation.JSONType;
import java.util.List;
@JSONType(orders={"Creator","NeedUpDateFields","NeedReturnFields","IsDeleteEntry","SubSystemId",
"IsVerifyBaseDataField","IsEntryBatchFill","ValidateFlag","NumberSearch","InterationFlags","Model"})
public class Data {
@JSONField(name = "Creator")
private String Creator;
@JSONField(name = "NeedUpDateFields")
private List<String> NeedUpDateFields;
@JSONField(name = "NeedReturnFields")
private List<String> NeedReturnFields;
@JSONField(name = "IsDeleteEntry")
private String IsDeleteEntry;
@JSONField(name = "SubSystemId")
private String SubSystemId;
@JSONField(name = "IsVerifyBaseDataField")
private String IsVerifyBaseDataField;
@JSONField(name = "IsEntryBatchFill")
private String IsEntryBatchFill;
@JSONField(name = "ValidateFlag")
private String ValidateFlag;
@JSONField(name = "NumberSearch")
private String NumberSearch;
@JSONField(name = "InterationFlags")
private String InterationFlags;
/* @JSONField(name = "Model")
private Model Model;*/
public void setCreator(String Creator) {
this.Creator = Creator;
}
public String getCreator() {
return Creator;
}
public void setNeedUpDateFields(List<String> NeedUpDateFields) {
this.NeedUpDateFields = NeedUpDateFields;
}
public List<String> getNeedUpDateFields() {
return NeedUpDateFields;
}
public void setNeedReturnFields(List<String> NeedReturnFields) {
this.NeedReturnFields = NeedReturnFields;
}
public List<String> getNeedReturnFields() {
return NeedReturnFields;
}
public void setIsDeleteEntry(String IsDeleteEntry) {
this.IsDeleteEntry = IsDeleteEntry;
}
public String getIsDeleteEntry() {
return IsDeleteEntry;
}
public void setSubSystemId(String SubSystemId) {
this.SubSystemId = SubSystemId;
}
public String getSubSystemId() {
return SubSystemId;
}
public void setIsVerifyBaseDataField(String IsVerifyBaseDataField) {
this.IsVerifyBaseDataField = IsVerifyBaseDataField;
}
public String getIsVerifyBaseDataField() {
return IsVerifyBaseDataField;
}
public void setIsEntryBatchFill(String IsEntryBatchFill) {
this.IsEntryBatchFill = IsEntryBatchFill;
}
public String getIsEntryBatchFill() {
return IsEntryBatchFill;
}
public void setValidateFlag(String ValidateFlag) {
this.ValidateFlag = ValidateFlag;
}
public String getValidateFlag() {
return ValidateFlag;
}
public void setNumberSearch(String NumberSearch) {
this.NumberSearch = NumberSearch;
}
public String getNumberSearch() {
return NumberSearch;
}
public void setInterationFlags(String InterationFlags) {
this.InterationFlags = InterationFlags;
}
public String getInterationFlags() {
return InterationFlags;
}
/*public void setModel(Model model) {
this.Model = model;
}
public Model getModel() {
return Model;
}*/
}

29
anrui-fin/anrui-fin-api/src/main/java/com/yxt/anrui/fin/api/kingdee/FinKingDeeFeign.java

@ -0,0 +1,29 @@
package com.yxt.anrui.fin.api.kingdee;
import com.yxt.anrui.fin.api.kingdee.entrybill.EntryBillDto;
import com.yxt.common.core.result.ResultBean;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
/**
* 财务模块调用金蝶保存业务单据的接口
*/
@Api(tags = "财务模块调用金蝶保存业务单据的接口")
@FeignClient(
contextId = "anrui-fin-FinKingDeeFeign",
name = "anrui-kingdee",
path = "v1/finKingDee",
fallback =FinKingDeeFeignFallBack.class
)
public interface FinKingDeeFeign {
/**
* 入账保存应付单的接口
* @return
*/
@ApiOperation("入账保存应付单的接口")
@PostMapping("/draftEntryBill")
ResultBean draftEntryBill(@RequestBody EntryBillDto entryBillDto);
}

12
anrui-fin/anrui-fin-api/src/main/java/com/yxt/anrui/fin/api/kingdee/FinKingDeeFeignFallBack.java

@ -0,0 +1,12 @@
package com.yxt.anrui.fin.api.kingdee;
import com.yxt.anrui.fin.api.kingdee.entrybill.EntryBillDto;
import com.yxt.common.core.result.ResultBean;
public class FinKingDeeFeignFallBack
implements FinKingDeeFeign{
@Override
public ResultBean draftEntryBill(EntryBillDto entryBillDto) {
return null;
}
}

116
anrui-fin/anrui-fin-api/src/main/java/com/yxt/anrui/fin/api/kingdee/entrybill/EntryBillDto.java

@ -0,0 +1,116 @@
package com.yxt.anrui.fin.api.kingdee.entrybill;
import com.yxt.common.core.dto.Dto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
import java.math.BigDecimal;
import java.util.List;
@Data
public class EntryBillDto {
@ApiModelProperty("车辆入账单sid")
private String sid;
@ApiModelProperty("用户sid")
@NotBlank(message = "用户sid不能为空")
private String userSid;
@ApiModelProperty("申请编号")
@NotBlank(message = "申请编号不能为空")
private String applicationCode;
@ApiModelProperty("申请人sid")
@NotBlank(message = "申请人不能为空")
private String applicationSid;
@ApiModelProperty("申请人名称")
@NotBlank(message = "申请人不能为空")
private String applicationName;
@ApiModelProperty("申请日期")
@Pattern(regexp = "^(\\s*)|([1-9]\\d{3}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1]))$", message = "申请日期日期格式不正确")
private String applicationDate;
@ApiModelProperty("采购订单sid")
@NotBlank(message = "采购订单不能为空")
private String vehicleOrderSid;
@ApiModelProperty("采购订单编号")
@NotBlank(message = "采购订单编号不能为空")
private String purchaseOrderNo;
@ApiModelProperty("车型sid ")
@NotBlank(message = "车型不能为空")
private String modelSid;
@ApiModelProperty("车型名称 ")
@NotBlank(message = "车型名称不能为空")
private String modelName;
@ApiModelProperty("常用配置 ")
private String configName;
@ApiModelProperty("常用配置Sid")
private String configSid;
@ApiModelProperty("厂家合同价")
private BigDecimal contractPrice;
@ApiModelProperty("其中上装价格")
private BigDecimal amongSzPrice;
@ApiModelProperty("上装价格计算依据")
private String szPriceCalBasis;
@ApiModelProperty("一次运费")
private BigDecimal onceFreight;
@ApiModelProperty("二次运费")
private BigDecimal secondaryFreight;
@ApiModelProperty("下浮比例")
private String lowerProportion;
@ApiModelProperty("下浮金额")
private BigDecimal lowerMoney;
@ApiModelProperty("下浮合计")
private BigDecimal lowerTotal;
@ApiModelProperty("下浮备注")
private String lowerRemarks;
@ApiModelProperty("厂家结算价")
private BigDecimal costPrice;
@ApiModelProperty("内部编码")
private String insideCode;
@ApiModelProperty("厂家入库日期")
private String priceDate;
@ApiModelProperty("厂家发车日期")
private String departureDate;
@ApiModelProperty("备注")
private String remarks;
@ApiModelProperty("流程状态")
private String nodeState;
@ApiModelProperty("车辆台数")
private String num;
@ApiModelProperty("车辆列表")
private List<ScmApplyInboundVehicleDto> vehicleList;
class ScmApplyInboundVehicleDto implements Dto {
@ApiModelProperty("车辆信息sid")
private String sid;
@ApiModelProperty("车辆入库单sid")
private String applySid;
@ApiModelProperty("车型sid")
private String modelSid;
@ApiModelProperty("车架号(VIN)")
private String vinNo;
@ApiModelProperty("备注")
private String remarks;
}
}

21
anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/kingdee/FinKingDeeFeignRest.java

@ -0,0 +1,21 @@
package com.yxt.anrui.fin.biz.kingdee;
import com.yxt.anrui.fin.api.kingdee.FinKingDeeFeign;
import com.yxt.anrui.fin.api.kingdee.FinKingDeeFeignFallBack;
import com.yxt.anrui.fin.api.kingdee.entrybill.EntryBillDto;
import com.yxt.common.core.result.ResultBean;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@Api(tags = "单据调用金蝶的保存接口")
@RestController("com.yxt.anrui.fin.biz.kingdee.FinKingDeeFeignRest")
@RequestMapping("/finKingDee")
public class FinKingDeeFeignRest implements FinKingDeeFeign {
@Override
public ResultBean draftEntryBill(EntryBillDto entryBillDto) {
return null;
}
}

3
anrui-flowable/anrui-flowable-biz/src/main/java/com/yxt/anrui/flowable/biz/flowtask/FlowTaskService.java

@ -1586,6 +1586,9 @@ public class FlowTaskService extends MybatisBaseService<FlowTaskMapper, FlowTask
public ResultBean readXml(String deployId) {
ProcessDefinition definition = repositoryService.createProcessDefinitionQuery().deploymentId(deployId).singleResult();
if(definition==null){
definition = repositoryService.createProcessDefinitionQuery().processDefinitionId(deployId).singleResult();
}
InputStream inputStream = repositoryService.getResourceAsStream(definition.getDeploymentId(), definition.getResourceName());
String result = null;
try {

7
anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehiclereturn/ScmVehicleReturnService.java

@ -269,8 +269,15 @@ public class ScmVehicleReturnService extends MybatisBaseService<ScmVehicleReturn
String businessTaskid = booad.getTaskId();
if (businessTaskid.equals(bv.getTaskId())) { //只有数据一致的时候才能进行下一步
ResultBean<UpdateFlowFieldVo> rb1 = flowableFeign.handleProsess(bv);
if (!rb1.getSuccess()){
return rb.setMsg(rb1.getMsg());
}
String taskDefKey = rb1.getData().getTaskDefKey();
Map<String, Object> stringObjectMap = BeanUtil.beanToMap(rb1.getData());
updateFlowFiled(stringObjectMap);
if("Event_end".equals(taskDefKey)){
}
return rb1;
} else {
return ResultBean.fireFail().setMsg("操作失败,提交的数据不一致!");

51
anrui-scm/anrui-scm-ui/src/views/baseoutsourcingapplication/baseoutsourcingapplication.vue

@ -45,7 +45,7 @@
</el-table-column>
<el-table-column prop="nodeState" width="100px;" label="状态" align="center" >
<template slot-scope="scope">
<span >{{scope.row.nodeState}}</span>
<el-button type="primary" size="mini" @click="flowRecord(scope.row)">{{scope.row.nodeState}}</el-button>
</template>
</el-table-column>
<el-table-column prop="applicationDate" width="110px;" label="申请日期" align="center" />
@ -77,6 +77,18 @@
<!-- 详情部分组件 -->
<div-info v-show="viewState == 4" ref="divinfo" @doback="resetState" />
<!--<div-info v-show="viewState == 5" ref="divinfo" @doback="resetState" />-->
<el-dialog
title=""
:visible.sync="centerDialogVisible"
width="78%"
height="1%"
:before-close="closeIt"
center>
<iframe frameborder="0" id="iframe"
style="width:100%;"
:src="this.centerDialogVisible === true ? url :''"
></iframe>
</el-dialog>
</div>
</template>
@ -87,7 +99,7 @@ import Pagination from '@/components/pagination'
import pageye from '@/components/pagination/pageye'
import divAdd from './baseoutsourcingapplicationAdd'
import divInfo from './baseoutsourcingapplicationInfo'
import {getStorage,setStorage} from "@/utils/auth";
export default {
name: 'baseoutsourcingapplication',
components: {
@ -99,6 +111,9 @@ export default {
},
data() {
return {
url:'',
dialogHeight: '80%',
centerDialogVisible: false,
btndisabled: false,
viewState: 1, // 1 2 3 4
isSearchShow: false,
@ -138,10 +153,40 @@ export default {
row:{}
}
},
mounted() {
// vuewindowpostMessagehandleMessage
window.addEventListener('message', this.handleMessage)
},
created() {
this.loadList()
},
methods: {
async handleMessage (event) {
var code= event.data.params.code;
if(code==1){
this.init()
this.centerDialogVisible=false
} else if (code==2){
this.dialogHeight = event.data.params.data
this.setIframeHeight(document.getElementById('iframe'));
}
},
closeIt() {
this.url = ''
this.centerDialogVisible = false
},
setIframeHeight(iframe) {
iframe.height = this.dialogHeight;//iframeWin.document.documentElement.scrollHeight || iframeWin.document.body.scrollHeight;
},
flowRecord(row){
this.centerDialogVisible = true
var params = {
deployId: row.procDefId,
procInsId: row.procInstSid,
token : getStorage()
}
this.url = 'http://127.0.0.1:9530/portal/#/flow/flowRecordForBusiness?data=' + encodeURI((JSON.stringify(params)))
},
resetState() {
this.viewState = 1
},
@ -234,7 +279,7 @@ export default {
}
var b=false;
this.multipleSelection.forEach(row => {
if(!(row.nodeState == '待提交' || (row.nodeState!='待提交'&&row.nodeState=='外采申请'))){
if(!(row.nodeState === '待提交' || (row.nodeState!='待提交'&&row.nodeState=='外采申请'))){
b=true
}
})

12
anrui-scm/anrui-scm-ui/src/views/ruzhang/ruzhangguanli/ruzhangguanli.vue

@ -104,6 +104,7 @@ export default {
tableLoading: false,
//
dataList: [],
multipleSelection :[],
// sid
sids: [], // SID
sides: '', // sid
@ -128,6 +129,7 @@ export default {
methods: {
// sid
handleSelectionChange(row) {
this.multipleSelection = row
const aa = []
row.forEach(element => {
aa.push(element.sid)
@ -203,6 +205,16 @@ export default {
this.$message({ showClose: true, type: 'error', message: '请选择至少一条记录进行删除操作' })
return
}
var b=false;
this.multipleSelection.forEach(row => {
if(!(row.nodeState === '待提交' || (row.nodeState!='待提交'&&row.nodeState==='入账申请'))){
b=true
}
})
if(b){
this.$message({showClose: true, type: 'error', message: '提交流程审批的记录不能进行删除!'})
return
}
const tip = '请确认是否删除所选 ' + this.sids.length + ' 条记录?'
this.$confirm(tip, '提示', {
confirmButtonText: '确定',

2
anrui-scm/anrui-scm-ui/src/views/supplychain/caigoutuiku/caigoutuiku.vue

@ -288,7 +288,7 @@ export default {
console.log(this.multipleSelection);
var b=false;
this.multipleSelection.forEach(row => {
if(row.nodeState == '待提交'){
if(!(row.nodeState === '待提交' || (row.nodeState!='待提交'&&row.nodeState==='采购退库申请'))){
b=true
}
})

2
anrui-scm/anrui-scm-ui/vue.config.js

@ -25,7 +25,7 @@ module.exports = {
*详细信息https://cli.vuejs.org/config/#publicpath
*/
publicPath: process.env.NODE_ENV === 'production' ? '/scm/' : '/',
outputDir: 'System',
outputDir: 'scm-ui',
assetsDir: 'static',
lintOnSave: process.env.NODE_ENV === 'development',
productionSourceMap: false,

10
anrui-system-ui/src/api/flow/todo.js

@ -1,17 +1,19 @@
import request from '@/utils/request'
import qs from 'qs'
// 读取xml文件
export function readXml (deployId) {
export function readXml (deployId,token) {
return request({
url: '/portal/v1/flow/readXml/' + deployId,
method: 'get'
method: 'get',
params: token
})
}
// 读取image文件
export function getFlowViewer (procInsId) {
export function getFlowViewer (procInsId,token) {
return request({
url: '/portal/v1/flow/flowViewer/' + procInsId,
method: 'get'
method: 'get',
params: token
})
}
// 查看总代办列表

24
anrui-system-ui/src/api/flow/todoForBusiness.js

@ -0,0 +1,24 @@
import request from '@/utils/request'
import qs from 'qs'
// 读取xml文件
export function readXml (deployId) {
return request({
url: '/portal/v1/flow/readXml/' + deployId,
method: 'get'
})
}
// 读取image文件
export function getFlowViewer (procInsId) {
return request({
url: '/portal/v1/flow/flowViewer/' + procInsId,
method: 'get'
})
}
// 任务流转记录
export function flowRecord(query) {
return request({
url: '/portal/v1/flow/task/flowRecord/' + query.procInsId + "/" + query.deployId,
method: 'get',
params: query
})
}

0
anrui-system-ui/src/views/flow/flow.vue → anrui-system-ui/src/components/flow/flow.vue

91
anrui-system-ui/src/components/flow/flowRecord.vue

@ -0,0 +1,91 @@
<template>
<div>
<!--流程流转记录-->
<el-card >
<el-col :span="24" >
<div >
<div style="width:50%;float:left; border:1px solid #000;">
<span class="el-icon-picture-outline">流程图</span>
<flow :xmlData="xmlData" :taskData="taskData"></flow>
</div>
<div style="width:50%;;float:left; border:1px solid #000;" >
<el-timeline>
<el-timeline-item
v-for="(item,index ) in flowRecordList"
:key="index"
:icon="setIcon(item.finishTime)"
:color="setColor(item.finishTime)"
>
<p style="font-weight: 700">{{item.taskName}}</p>
<el-card :body-style="{ padding: '10px' }">
<label v-if="item.assigneeName" style="font-weight: normal;margin-right: 30px;">实际办理
{{item.assigneeName}}
<el-tag type="info" size="mini">{{item.deptName}}</el-tag>
</label>
<label v-if="item.candidate"
style="font-weight: normal;margin-right: 30px;">候选办理{{item.candidate}}</label><br>
<label style="font-weight: normal">接收时间 </label><label style="color:#8a909c;font-weight: normal">{{item.createTime}}</label><br>
<label v-if="item.finishTime" style="font-weight: normal">办结时间 </label>
<label style="color:#8a909c;font-weight: normal">{{item.finishTime}}</label><br>
<label v-if="item.duration" style="font-weight: normal">耗时</label>
<label style="color:#8a909c;font-weight: normal">{{item.duration}}</label>
<p v-if="item.comment">
<el-tag type="success" v-if="item.comment.type === '1'"> {{item.comment.comment}}</el-tag>
<el-tag type="warning" v-if="item.comment.type === '2'"> {{item.comment.comment}}</el-tag>
<el-tag type="danger" v-if="item.comment.type === '3'"> {{item.comment.comment}}</el-tag>
<el-tag type="danger" v-if="item.comment.type === '7'"> {{item.comment.comment}}</el-tag>
<el-tag type="danger" v-if="item.comment.type === '6'"> {{item.comment.comment}}</el-tag>
</p>
</el-card>
</el-timeline-item>
</el-timeline>
</div>
</div>
</el-col>
</el-card>
</div>
</template>
<script>
import flow from "@C/flow/flow";
export default {
name: "flowRecords",
components: {
flow
},
props: {
xmlData: {
type: String,
default: ''
},
taskData: {
type: Array,
default: () => []
},
flowRecordList: {
type: Array,
default: () => []
}
},
data() {
return {};
},
created() {
},
methods:{
setIcon(val) {
if (val) {
return "el-icon-check";
} else {
return "el-icon-time";
}
},
setColor(val) {
if (val) {
return "#2bc418";
} else {
return "#b3bdbb";
}
}
}
};
</script>

12
anrui-system-ui/src/router/index.js

@ -260,7 +260,17 @@ export const constantRoutes = [
component: () =>
import('@/views/404'),
hidden: true
}
},
{
path: '/flow/flowRecordForBusiness',
component: ()=> import('@/views/flow/flowRecordForBusiness'),
name: 'flowRecordForBusiness'
}/*,
{
path: '/portal/flow/flowRecord',
component: ()=> import('@/views/flow/flowRecord'),
name: 'flowRecord'
}*/
// 404 page must be placed at the end !!!
// { path: '*', redirect: '/404', hidden: true }
]

4
anrui-system-ui/src/views/Home/Home.vue

@ -264,8 +264,8 @@
} else if (index == '8') {
let myPopup = window.open('http://120.46.131.15/message/#/' + '?token=' + getStorage(), '_blank')
} else if (index == '1') {
let myPopup = window.open('http://120.46.131.15/scm/#/' + '?token=' + getStorage(), '_blank')
// let myPopup = window.open('http://127.0.0.1:9531/scm/#/' + '?token=' + getStorage(), '_blank')
//let myPopup = window.open('http://120.46.131.15/scm/#/' + '?token=' + getStorage(), '_blank')
let myPopup = window.open('http://127.0.0.1:9531/scm/#/' + '?token=' + getStorage(), '_blank')
} else if (index == '4') {
let myPopup = window.open('http://120.46.131.15/fin/#/' + '?token=' + getStorage(), '_blank')
} else if (index == '5') {

67
anrui-system-ui/src/views/flow/doneList.vue

@ -109,60 +109,29 @@
<!-- 编辑信息 -->
<el-dialog title="审批记录" :visible.sync="editDialog" width="60%">
<!--流程流转记录-->
<el-card class="box-card" v-if="flowRecordList">
<el-col :span="16" :offset="4">
<div class="block">
<el-timeline>
<el-timeline-item
v-for="(item,index ) in flowRecordList"
:key="index"
:icon="setIcon(item.finishTime)"
:color="setColor(item.finishTime)"
>
<p style="font-weight: 700">{{item.taskName}}</p>
<el-card :body-style="{ padding: '10px' }">
<label v-if="item.assigneeName" style="font-weight: normal;margin-right: 30px;">实际办理
{{item.assigneeName}}
<el-tag type="info" size="mini">{{item.deptName}}</el-tag>
</label>
<label v-if="item.candidate" style="font-weight: normal;margin-right: 30px;">候选办理
{{item.candidate}}</label><br>
<label style="font-weight: normal">接收时间 </label><label style="color:#8a909c;font-weight: normal">{{item.createTime}}</label><br>
<label v-if="item.finishTime" style="font-weight: normal">办结时间 </label><label
style="color:#8a909c;font-weight: normal">{{item.finishTime}}</label><br>
<label v-if="item.duration" style="font-weight: normal">耗时 </label><label
style="color:#8a909c;font-weight: normal">{{item.duration}}</label>
<p v-if="item.comment">
<el-tag type="success" v-if="item.comment.type === '1'"> {{item.comment.comment}}</el-tag>
<el-tag type="warning" v-if="item.comment.type === '2'"> {{item.comment.comment}}</el-tag>
<el-tag type="danger" v-if="item.comment.type === '3'"> {{item.comment.comment}}</el-tag>
<el-tag type="danger" v-if="item.comment.type === '7'"> {{item.comment.comment}}</el-tag>
<el-tag type="danger" v-if="item.comment.type === '6'"> {{item.comment.comment}}</el-tag>
</p>
</el-card>
</el-timeline-item>
</el-timeline>
</div>
</el-col>
</el-card>
<flow-records :xmlData="xmlData" :taskData="taskList" :flowRecordList="flowRecordList"></flow-records>
</el-dialog>
</div>
</template>
<script>
import flowRecords from '@/components/flow/flowRecord'
import Pagination from '@/components/pagination'
import pageye from '@/components/pagination/pageye'
import {getStorage} from "@/utils/auth";
import {revokeTask, getList, selectUrl} from '@/api/flow/todo'
import {revokeTask, getList, selectUrl, readXml, getFlowViewer} from '@/api/flow/todo'
import {flowRecord, revokeProcess} from "@/api/workflow/finished";
import {loginDetails} from "@/api/user"
// import flow from "@/views/flow/flow";
export default {
name: "",
components: {
pageye, Pagination
pageye, Pagination, flowRecords
},
data() {
return {
taskList: [],
xmlData: "",
dialogHeight:'80%',
isDialogVisible: false, //
centerDialogVisible: false, //
@ -233,6 +202,21 @@
}
},
methods: {
/** xml 文件 */
getModelDetail(deployId) {
var token = getStorage();
// xml
readXml(deployId,token).then(res =>{
this.xmlData = res.data
})
},
//
getFlowViewer(procInsId){
var token = getStorage();
getFlowViewer(procInsId,token).then(res =>{
this.taskList = res.data
})
},
setIframeHeight(iframe) {
iframe.height = this.dialogHeight;//iframeWin.document.documentElement.scrollHeight || iframeWin.document.body.scrollHeight;
},
@ -273,7 +257,7 @@
}
selectUrl(this.selectUrl_list).then((response) => {
if (response.code === '200') {
this.url = 'http://localhost:9531' + response.data.url + '?token=' + getStorage() + '&data=' + encodeURI((JSON.stringify(parameter_list)))
this.url = 'http://127.0.0.1:9531' + response.data.url + '?token=' + getStorage() + '&data=' + encodeURI((JSON.stringify(parameter_list)))
// this.url = 'http://120.46.131.15' + response.data.url + '?token=' + getStorage() + '&data=' + encodeURI((JSON.stringify(parameter_list)))
} else {
this.$notify({
@ -345,12 +329,15 @@
},
/** 流程流转记录 */
handleFlowRecord(row) {
this.getModelDetail(row.deployId)
this.getFlowViewer(row.procInsId)
this.getFlowRecordList(row.procInsId, row.deployId);
this.editDialog = true;
},
/** 流程流转记录 */
getFlowRecordList(procInsId, deployId) {
const params = {procInsId: procInsId, deployId: deployId}
var token = getStorage();
const params = {procInsId: procInsId, deployId: deployId,token: token}
flowRecord(params).then(res => {
this.flowRecordList = res.data.flowList;
//

73
anrui-system-ui/src/views/flow/flowRecordForBusiness.vue

@ -0,0 +1,73 @@
<template>
<div>
<flow-records :xmlData="xmlData" :taskData="taskList" :flowRecordList="flowRecordList"></flow-records>
</div>
</template>
<script>
import flowRecords from "@C/flow/flowRecord";
import {setStorage} from "@/utils/auth";
import {getFlowViewer, readXml} from '@/api/flow/todo';
import {flowRecord} from "@/api/workflow/finished";
export default {
name: "flowRecordForBusiness",
components: {
flowRecords
},
data() {
return {
taskList: [],
xmlData: "",
flowRecordList :[]
};
},
created() {
var one = window.location.href.indexOf('?data') + 6
const data = window.location.href.substr(one) // urlunescape()web,使
const obj = JSON.parse(decodeURIComponent(data))
this.obj = obj;
var token = obj.token;//getStorage();
setStorage(token)
console.log(obj)
this.getFlowViewer(obj.procInsId)
this.getModelDetail(obj.deployId)
this.getFlowRecordList(obj.procInsId,obj.deployId)
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 2,
data: 600 + 'px'
}
}, '*')
},
methods:{
/** xml 文件 */
getModelDetail(deployId) {
// xml
readXml(deployId).then(res =>{
this.xmlData = res.data
})
},
//
getFlowViewer(procInsId){
getFlowViewer(procInsId).then(res =>{
this.taskList = res.data
})
},
/** 流程流转记录 */
getFlowRecordList(procInsId, deployId) {
const params = {procInsId: procInsId, deployId: deployId}
flowRecord(params).then(res => {
this.flowRecordList = res.data.flowList;
//
if (res.data.formData) {
this.formConf = res.data.formData;
this.formConfOpen = true
}
}).catch(res => {
this.getList();
})
}
}
};
</script>

73
anrui-system-ui/src/views/flow/todoList.vue

@ -107,59 +107,16 @@
<!-- 编辑信息页面 -->
<el-dialog title="审批记录" :visible.sync="editDialog" width="80%" >
<!--流程流转记录-->
<el-card v-if="flowRecordList">
<el-col :span="24" >
<div >
<div style="width:50%;float:left; border:1px solid #000;">
<span class="el-icon-picture-outline">流程图</span>
<flow :xmlData="xmlData" :taskData="taskList"></flow>
</div>
<div style="width:50%;;float:left; border:1px solid #000;" >
<el-timeline>
<el-timeline-item
v-for="(item,index ) in flowRecordList"
:key="index"
:icon="setIcon(item.finishTime)"
:color="setColor(item.finishTime)"
>
<p style="font-weight: 700">{{item.taskName}}</p>
<el-card :body-style="{ padding: '10px' }">
<label v-if="item.assigneeName" style="font-weight: normal;margin-right: 30px;">实际办理
{{item.assigneeName}}
<el-tag type="info" size="mini">{{item.deptName}}</el-tag>
</label>
<label v-if="item.candidate"
style="font-weight: normal;margin-right: 30px;">候选办理{{item.candidate}}</label><br>
<label style="font-weight: normal">接收时间 </label><label style="color:#8a909c;font-weight: normal">{{item.createTime}}</label><br>
<label v-if="item.finishTime" style="font-weight: normal">办结时间 </label>
<label style="color:#8a909c;font-weight: normal">{{item.finishTime}}</label><br>
<label v-if="item.duration" style="font-weight: normal">耗时</label>
<label style="color:#8a909c;font-weight: normal">{{item.duration}}</label>
<p v-if="item.comment">
<el-tag type="success" v-if="item.comment.type === '1'"> {{item.comment.comment}}</el-tag>
<el-tag type="warning" v-if="item.comment.type === '2'"> {{item.comment.comment}}</el-tag>
<el-tag type="danger" v-if="item.comment.type === '3'"> {{item.comment.comment}}</el-tag>
<el-tag type="danger" v-if="item.comment.type === '7'"> {{item.comment.comment}}</el-tag>
<el-tag type="danger" v-if="item.comment.type === '6'"> {{item.comment.comment}}</el-tag>
</p>
</el-card>
</el-timeline-item>
</el-timeline>
</div>
</div>
</el-col>
</el-card>
<flow-records :xmlData="xmlData" :taskData="taskList" :flowRecordList="flowRecordList"></flow-records>
</el-dialog>
</div>
</template>
<script>
import flow from '@/views/flow/flow'
import flowRecords from '@/components/flow/flowRecord'
import Pagination from '@/components/pagination'
import pageye from '@/components/pagination/pageye'
import {breakTask, businessAgree, getFlowViewer, pagerList, readXml, rejectTask, selectUrl} from '@/api/flow/todo'
import {getFlowViewer, readXml,breakTask, businessAgree, pagerList, rejectTask, selectUrl} from '@/api/flow/todo'
import {getStorage} from "@/utils/auth";
import {flowRecord} from "@/api/workflow/finished";
import {loginDetails} from "@/api/user"
@ -167,7 +124,7 @@ import {loginDetails} from "@/api/user"
export default {
name: "",
components: {
pageye, Pagination, flow
pageye, Pagination, flowRecords
},
data() {
return {
@ -257,16 +214,19 @@ export default {
}
},
methods: {
/** xml 文件 */
getModelDetail(deployId) {
var token = getStorage();
// xml
readXml(deployId).then(res =>{
readXml(deployId,token).then(res =>{
this.xmlData = res.data
})
},
//
getFlowViewer(procInsId){
getFlowViewer(procInsId).then(res =>{
var token = getStorage();
getFlowViewer(procInsId,token).then(res =>{
this.taskList = res.data
})
},
@ -274,7 +234,6 @@ export default {
iframe.height = this.dialogHeight;//iframeWin.document.documentElement.scrollHeight || iframeWin.document.body.scrollHeight;
},
async handleMessage (event) {
console.log(event);
var code= event.data.params.code;
if(code==1){
this.init()
@ -329,7 +288,7 @@ export default {
}
selectUrl(this.selectUrl_list).then((response) => {
if (response.code === '200') {
this.url = 'http://localhost:9531' + response.data.url + '?token=' + getStorage() + '&data=' + encodeURI((JSON.stringify(parameter_list)))
this.url = 'http://127.0.0.1:9531' + response.data.url + '?token=' + getStorage() + '&data=' + encodeURI((JSON.stringify(parameter_list)))
// this.url = 'http://120.46.131.15' + response.data.url + '?token=' + getStorage() + '&data=' + encodeURI((JSON.stringify(parameter_list)))
console.log('已办拼接url:',this.url)
} else {
@ -342,7 +301,6 @@ export default {
}
})
//
this.getFlowRecordList(row.procInsId, row.deployId);
},
closeIt() {
this.url = ''
@ -399,12 +357,6 @@ export default {
businessAgree(this.agreeList).then((response) => {
if (response.code === '200') {
alert("操作成功!");
/* this.$notify({
title: '提示',
message: '操作成功',
type: 'success',
duration: 2000,
})*/
this.refreshIt()
} else {
this.$notify({
@ -468,14 +420,15 @@ export default {
},
/** 流程流转记录 */
handleFlowRecord(row) {
this.getFlowRecordList(row.procInsId, row.deployId);
this.getModelDetail(row.deployId)
this.getFlowViewer(row.procInsId)
this.getFlowRecordList(row.procInsId,row.deployId)
this.editDialog = true;
},
/** 流程流转记录 */
getFlowRecordList(procInsId, deployId) {
const params = {procInsId: procInsId, deployId: deployId}
var token = getStorage();
const params = {procInsId: procInsId, deployId: deployId,token: token }
flowRecord(params).then(res => {
this.flowRecordList = res.data.flowList;
//

Loading…
Cancel
Save