Browse Source

完善流程审批功能

zhanglei
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. 55
      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. 42
      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; 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 com.yxt.common.core.query.Query;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import java.util.ArrayList;
import java.util.List;
import java.util.Map; import java.util.Map;
/** /**
@ -35,5 +40,20 @@ public class ScmVehicleReturnFlowQuery implements Query {
* 业务参数按需传递 * 业务参数按需传递
*/ */
private Map<String, Object> formVariables; 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({ return request({
url: '/base/baseoutsourcingapplication/delBySids', url: '/base/baseoutsourcingapplication/delBySids',
method: 'post', method: 'post',
data: params data: params,
headers: { 'Content-Type': 'application/json' }
}) })
}, },
// 通过sid查询一条记录 // 通过sid查询一条记录

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

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

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

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

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

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

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

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

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

@ -167,15 +167,19 @@ export default {
} }
}, },
// sid // sid
handleSelectionChange(val) { handleSelectionChange(row) {
this.multipleSelection = val this.multipleSelection = row
const aa = []
row.forEach((element) => {
aa.push(element.sid)
})
this.sids = aa
}, },
toAdd(row) { toAdd(row) {
this.viewState = 2 this.viewState = 2
this.$refs['divadd'].showAdd() this.$refs['divadd'].showAdd()
}, },
toEdit(row) { toEdit(row) {
console.log(this.multipleSelection);
if (this.multipleSelection.length !== 1) { if (this.multipleSelection.length !== 1) {
this.$message({ showClose: true, type: 'error', message: '请选择一条记录进行操作' }) this.$message({ showClose: true, type: 'error', message: '请选择一条记录进行操作' })
return return
@ -247,38 +251,32 @@ export default {
}, },
// //
doDel(row) { doDel(row) {
if (this.multipleSelection.length === 0) { if (this.sids.length === 0) {
this.$message({showClose: true, type: 'error', message: '请选择至少一条记录进行删除操作'}) this.$message({showClose: true, type: 'error', message: '请选择至少一条记录进行删除操作'})
return 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 + ' 条记录?' const tip = '请确认是否删除所选 ' + this.multipleSelection.length + ' 条记录?'
this.$confirm(tip, '提示', { this.$confirm(tip, '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
const loading = this.$loading({
lock: true,
text: 'Loading',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
})
const _this = this const _this = this
var sids=""; req.delBySids(this.sids).then(resp => {
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()
_this.$message({ type: 'success', message: resp.msg, showClose: true }) _this.$message({ type: 'success', message: resp.msg, showClose: true })
_this.loadList() _this.loadList()
}).catch(e => { }).catch(e => {
loading.close()
}) })
}).catch(() => { }).catch(() => {
}) })

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

@ -244,6 +244,7 @@
if (resp.success) { if (resp.success) {
const data = resp.data const data = resp.data
this.formobj = data this.formobj = data
this.formobj.sid=sid
this.formobj.userSid= window.sessionStorage.getItem('userSid'), // sid this.formobj.userSid= window.sessionStorage.getItem('userSid'), // sid
this.formobj.orgSid=window.sessionStorage.getItem('orgSid'), // sid this.formobj.orgSid=window.sessionStorage.getItem('orgSid'), // sid
this.formobj.staffSid=window.sessionStorage.getItem('staffSid'), 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> <div>车辆采购退库申请</div>
<!--start 添加修改按钮--> <!--start 添加修改按钮-->
<div> <div>
<el-button type="primary" size="small" :disabled="disabled" @click="handleSubmit()">提交
</el-button>
<el-button type="primary" size="small">打印</el-button> <el-button type="primary" size="small">打印</el-button>
<el-button type="info" size="small" @click="handleReturn()">返回</el-button> <el-button type="info" size="small" @click="handleReturn()">返回</el-button>
</div> </div>

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

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

Loading…
Cancel
Save