Browse Source

完善流程审批功能

master
yxt_djz 3 years ago
parent
commit
4af2b43987
  1. 20
      anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehiclereturn/ScmVehicleReturnFlowQuery.java
  2. 3
      anrui-scm/anrui-scm-ui/src/api/baseoutsourcingapplication/baseoutsourcingapplication.js
  3. 2
      anrui-scm/anrui-scm-ui/src/api/supplychain/purchasereturntowarehouse.js
  4. 71
      anrui-scm/anrui-scm-ui/src/views/baseoutsourcingapplication/baseoutsourcingapplication.vue
  5. 8
      anrui-scm/anrui-scm-ui/src/views/baseoutsourcingapplication/baseoutsourcingapplicationAdd.vue
  6. 1
      anrui-scm/anrui-scm-ui/src/views/baseoutsourcingapplication/workflow/baseoutsourcingapplication.vue
  7. 44
      anrui-scm/anrui-scm-ui/src/views/supplychain/caigoutuiku/caigoutuiku.vue
  8. 1
      anrui-scm/anrui-scm-ui/src/views/supplychain/caigoutuiku/caigoutuikuAdd.vue
  9. 2
      anrui-scm/anrui-scm-ui/src/views/supplychain/caigoutuiku/caigoutuikuInfo.vue
  10. 6
      anrui-scm/anrui-scm-ui/src/views/workFlow/caigoutuikuFlow/caigoutuiku.vue

20
anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehiclereturn/ScmVehicleReturnFlowQuery.java

@ -1,9 +1,14 @@
package com.yxt.anrui.scm.api.scmvehiclereturn;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.yxt.anrui.scm.api.scmvehiclereturndetails.ScmVehicleReturnDetailssVo;
import com.yxt.common.core.query.Query;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
/**
@ -35,5 +40,20 @@ public class ScmVehicleReturnFlowQuery implements Query {
* 业务参数按需传递
*/
private Map<String, Object> formVariables;
@ApiModelProperty(value = "申请编号")
private String applicationCode;
@ApiModelProperty(value = "申请人")
private String name;
@ApiModelProperty(value = "申请日期")
private String createTime;
@ApiModelProperty(value = "退库原因")
private String reason;
@ApiModelProperty(value = "费用")
@JsonSerialize(using = ToStringSerializer.class)
private String money;
@ApiModelProperty(value = "车辆列表")
private List<ScmVehicleReturnDetailssVo> voList = new ArrayList<>();
@ApiModelProperty(value = "费用说明")
private String remarks;
}

3
anrui-scm/anrui-scm-ui/src/api/baseoutsourcingapplication/baseoutsourcingapplication.js

@ -23,7 +23,8 @@ export default {
return request({
url: '/base/baseoutsourcingapplication/delBySids',
method: 'post',
data: params
data: params,
headers: { 'Content-Type': 'application/json' }
})
},
// 通过sid查询一条记录

2
anrui-scm/anrui-scm-ui/src/api/supplychain/purchasereturntowarehouse.js

@ -36,7 +36,7 @@ export default {
delBySids: function(data) {
return request({
url: '/scm/v1/scmvehiclereturn/delete',
method: 'DELETE',
method: 'delete',
data: data,
headers: {
'Content-Type': 'application/json'

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

@ -134,7 +134,8 @@ export default {
orgSid: '' // sid
}
},
multipleSelection: []
multipleSelection: [],
row:{}
}
},
created() {
@ -173,22 +174,24 @@ export default {
this.$refs['divadd'].showAdd()
},
toEdit() {
if (this.multipleSelection.length === 0) {
if (this.sids.length === 0) {
this.$message({ showClose: true, type: 'error', message: '请选择一条记录进行编辑' })
return
}
if (this.multipleSelection.length > 1) {
if (this.sids.length > 1) {
this.$message({ showClose: true, type: 'error', message: '只能选择一条记录进行编辑' })
return
}
this.multipleSelection.forEach(row => {
if(row.nodeState == '待提交' || (row.nodeState!='待提交'&&row.nodeState=='外采申请')){
this.dataList.forEach(row => {
if(row.sid === this.sids[0] && (row.nodeState == '待提交' || (row.nodeState!='待提交'&&row.nodeState=='外采申请'))){
this.viewState = 3
const row = this.multipleSelection[0]
const row = this.sids[0]
this.$refs['divadd'].showEdit(row)
}else{
}else if(row.sid === this.sids[0]){
alert('已经发起的审批业务数据不能进行编辑。');
return false;
}else{
}
})
@ -225,38 +228,31 @@ export default {
});*/
},
doDel(row) {
if (this.multipleSelection.length === 0) {
this.$message({ showClose: true, type: 'error', message: '请选择至少一条记录进行删除操作' })
return
}
const _this = this
const sids = []
if (this.sids.length === 0) {
this.$message({showClose: true, type: 'error', message: '请选择至少一条记录进行删除操作'})
return
}
var b=false;
this.multipleSelection.forEach(row => {
if(row.nodeState=='待提交'||(row.nodeState!='待提交'&&row.nodeState=='外采申请')){
sids.push(row.sid)
}else{
alert('已经发起的审批业务数据不能进行删除。');
sids = [];
if(!(row.nodeState == '待提交' || (row.nodeState!='待提交'&&row.nodeState=='外采申请'))){
b=true
}
})
const tip = '请确认是否删除所选 ' + this.multipleSelection.length + ' 条记录?'
this.$confirm(tip, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
if(b){
this.$message({showClose: true, type: 'error', message: '提交流程审批的记录不能进行删除!'})
return
}
const tip = '请确认是否删除所选 ' + this.sids.length + ' 条记录?'
this.$confirm(tip, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
const loading = this.$loading({
lock: true,
text: 'Loading',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
})
const _this = this
req
.delBySids(sids)
.delBySids(this.sids)
.then(resp => {
loading.close()
if (resp.success) {
_this.$message({ type: 'success', message: resp.msg, showClose: true })
this.queryParams.current = 1
@ -338,8 +334,13 @@ export default {
_this.tableLoading = false
})
},
handleSelectionChange(val) {
this.multipleSelection = val
handleSelectionChange(row) {
this.multipleSelection = row
const aa = []
row.forEach((element) => {
aa.push(element.sid)
})
this.sids = aa
},
//
indexMethod(index) {

8
anrui-scm/anrui-scm-ui/src/views/baseoutsourcingapplication/baseoutsourcingapplicationAdd.vue

@ -359,15 +359,15 @@ export default {
})
this.viewTitle = '【新增】外采申请表'
},
showEdit(row) {
showEdit(sid) {
this.$nextTick(() => {
this.$refs['form_obj'].clearValidate()
})
this.viewTitle = '【修改】外采申请表'
const _this = this
_this.formobj.sid = row.sid // SID
_this.formobj.sid = sid // SID
req
.fetchBySid(row.sid)
.fetchBySid(sid)
.then(resp => {
if (resp.success) {
const vdata = resp.data
@ -394,7 +394,7 @@ export default {
}
})
.catch(e => {
this.formobj = row
this.formobj = sid
})
},
handleClose() {

1
anrui-scm/anrui-scm-ui/src/views/baseoutsourcingapplication/workflow/baseoutsourcingapplication.vue

@ -6,7 +6,6 @@
<div>外采申请表详情</div>
<!-- start 详情按钮 -->
<div>
{{formobj.userSid}}
<el-button type="primary" @click="openAgree"> </el-button>
<el-button type="danger" @click="openReject"> </el-button>
<el-button type="danger" @click="openStop"> </el-button>

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

@ -167,15 +167,19 @@ export default {
}
},
// sid
handleSelectionChange(val) {
this.multipleSelection = val
handleSelectionChange(row) {
this.multipleSelection = row
const aa = []
row.forEach((element) => {
aa.push(element.sid)
})
this.sids = aa
},
toAdd(row) {
this.viewState = 2
this.$refs['divadd'].showAdd()
},
toEdit(row) {
console.log(this.multipleSelection);
if (this.multipleSelection.length !== 1) {
this.$message({ showClose: true, type: 'error', message: '请选择一条记录进行操作' })
return
@ -247,8 +251,19 @@ export default {
},
//
doDel(row) {
if (this.multipleSelection.length === 0) {
this.$message({ showClose: true, type: 'error', message: '请选择至少一条记录进行删除操作' })
if (this.sids.length === 0) {
this.$message({showClose: true, type: 'error', message: '请选择至少一条记录进行删除操作'})
return
}
console.log(this.multipleSelection);
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.multipleSelection.length + ' 条记录?'
@ -257,28 +272,11 @@ export default {
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
const loading = this.$loading({
lock: true,
text: 'Loading',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
})
const _this = this
var sids="";
this.multipleSelection.forEach(row => {
if(row.nodeState == '待提交' || (row.nodeState!='待提交'&&row.nodeState=='外采申请')){
sids=sids+row.sid+",";
}else{
alert('已经发起的审批业务数据不能进行编辑。');
return false;
}
})
req.delBySids(sids).then(resp => {
loading.close()
req.delBySids(this.sids).then(resp => {
_this.$message({ type: 'success', message: resp.msg, showClose: true })
_this.loadList()
}).catch(e => {
loading.close()
})
}).catch(() => {
})

1
anrui-scm/anrui-scm-ui/src/views/supplychain/caigoutuiku/caigoutuikuAdd.vue

@ -244,6 +244,7 @@
if (resp.success) {
const data = resp.data
this.formobj = data
this.formobj.sid=sid
this.formobj.userSid= window.sessionStorage.getItem('userSid'), // sid
this.formobj.orgSid=window.sessionStorage.getItem('orgSid'), // sid
this.formobj.staffSid=window.sessionStorage.getItem('staffSid'),

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

@ -7,8 +7,6 @@
<div>车辆采购退库申请</div>
<!--start 添加修改按钮-->
<div>
<el-button type="primary" size="small" :disabled="disabled" @click="handleSubmit()">提交
</el-button>
<el-button type="primary" size="small">打印</el-button>
<el-button type="info" size="small" @click="handleReturn()">返回</el-button>
</div>

6
anrui-scm/anrui-scm-ui/src/views/workFlow/caigoutuikuFlow/caigoutuiku.vue

@ -48,7 +48,7 @@
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item prop="money" label="费用说明">
<el-form-item prop="remarks" label="费用说明">
<span>{{ formobj.remarks }}</span>
</el-form-item>
</el-col>
@ -61,7 +61,7 @@
</div>
</div>
<template class="tablelist">
<el-table :data="list" border style="width: 100%" :index="index">
<el-table :data="formobj.voList" border style="width: 100%" :index="index">
<el-table-column align="center" label="序号" type="index" width="50"/>
<el-table-column label="车架号" align="center">
<template slot-scope="scope">
@ -161,7 +161,7 @@
applicationCode: '',
name: window.sessionStorage.getItem('name'),
createTime: '',
detailsList: [],
voList: [],
businessSid: '',
comment: '',
instanceId: '',

Loading…
Cancel
Save