Browse Source

存放地点变更流程

master
Zhao Qiqi 3 years ago
parent
commit
c137efb053
  1. 67
      anrui-scm/anrui-scm-ui/src/api/flow/cunfangdidianbiangeng.js
  2. 13
      anrui-scm/anrui-scm-ui/src/api/supplychain/cunfangdidianbiangeng.js
  3. 2
      anrui-scm/anrui-scm-ui/src/router/modules/codemenu.js
  4. 7
      anrui-scm/anrui-scm-ui/src/views/supplychain/cunfangdidianbiangeng/cunfangdidianbiangeng.vue
  5. 38
      anrui-scm/anrui-scm-ui/src/views/supplychain/cunfangdidianbiangeng/cunfangdidianbiangengAdd.vue
  6. 201
      anrui-scm/anrui-scm-ui/src/views/workFlow/cunfangdidianbiangengFlow/cunfangdidianbiangeng.vue
  7. 86
      anrui-scm/anrui-scm-ui/src/views/workFlow/cunfangdidianbiangengFlow/cunfangdidianbiangengEdit.vue
  8. 98
      anrui-scm/anrui-scm-ui/src/views/workFlow/cunfangdidianbiangengFlow/cunfangdidianbiangengInfo.vue

67
anrui-scm/anrui-scm-ui/src/api/flow/cunfangdidianbiangeng.js

@ -0,0 +1,67 @@
import request from '@/utils/request'
export default {
// 流程审批(同意)
agreeTask: function(params) {
return request({
url: 'scm/v1/scmvehiclegression/complete',
method: 'post',
data: params
})
},
// 流程审批(驳回)
rejectTask: function(params) {
return request({
url: 'scm/v1/scmvehiclegression/reject',
method: 'post',
data: params
})
},
// 流程审批(终止)
breakTask: function(params) {
return request({
url: 'scm/v1/scmvehiclegression/breakProcess',
method: 'post',
data: params
})
},
// 流程审批(撤回)
revokeTask: function(params) {
return request({
url: 'scm/v1/scmvehiclegression/revokeProcess',
method: 'post',
data: params
})
},
// 审批流程(同意)获取下一环节
getNextNodesForSubmit: function(data) {
return request({
url: 'scm/v1/scmvehiclegression/getNextNodesForSubmit',
method: 'get',
params: data
})
},
// 审批流程(驳回、终止)获取下一环节
getPreviousNodesForReject: function(data) {
return request({
url: 'scm/v1/scmvehiclegression/getPreviousNodesForReject',
method: 'get',
params: data
})
},
// 读取xml文件
readXml: function(deployId) {
return request({
url: '/flowable/v1/flowable/task/readXml/' + deployId,
method: 'get'
})
},
// 读取image文件
getFlowViewer: function(procInsId) {
return request({
url: '/flowable/v1/flowable/task/flowViewer/' + procInsId,
method: 'get'
})
}
}

13
anrui-scm/anrui-scm-ui/src/api/supplychain/cunfangdidianbiangeng.js

@ -21,6 +21,16 @@ export function saveCarTransferInfo(data) {
})
}
// 提交变更申请
export function submitCarTransfer(data) {
return request({
url: 'scm/v1/scmvehiclegression/submitCarTransfer',
data,
method: 'post',
headers: { 'Content-Type': 'application/json' }
})
}
// 变更申请 新增初始化
export function getCarTransferInfo(data) {
return request({
@ -40,7 +50,8 @@ export function getCarTransfer(data) {
// 删除车辆存放地点变更申请
export function deleteCarTransfer(data) {
return request({
url: '/scm/v1/scmvehiclegression/deleteCarTransfer/' + data,
url: 'scm/v1/scmvehiclegression/deleteBySids',
data,
method: 'DELETE'
})
}

2
anrui-scm/anrui-scm-ui/src/router/modules/codemenu.js

@ -596,7 +596,7 @@ const codemenu = [
path: '/cunfangdidianbiangengFlow/cunfangdidianbiangeng',
component: () =>
import('@/views/workFlow/cunfangdidianbiangengFlow/cunfangdidianbiangeng.vue'),
name: 'cunfangdidianbiangeng'
name: 'cunfangdidianbiangengHandle'
}
]
export default codemenu

7
anrui-scm/anrui-scm-ui/src/views/supplychain/cunfangdidianbiangeng/cunfangdidianbiangeng.vue

@ -266,17 +266,20 @@ export default {
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
})
const sids = this.sids.join()
deleteCarTransfer(sids).then(resp => {
// const sids = this.sids.join()
deleteCarTransfer(this.sids).then(resp => {
if (resp.success) {
loading.close()
_this.$message({ type: 'success', message: resp.msg, showClose: true })
_this.loadList()
}else {
loading.close()
}
}).catch(e => {
loading.close()
})
}).catch(() => {
loading.close()
})
},
handleEdit(row) {

38
anrui-scm/anrui-scm-ui/src/views/supplychain/cunfangdidianbiangeng/cunfangdidianbiangengAdd.vue

@ -47,12 +47,14 @@
</el-row>
<el-row>
<el-col :span="3">
<span>车架号</span>
<span><span class="icon">*</span>车架号</span>
</el-col>
<el-col :span="21">
<el-select v-model="temp.vinNo" placeholder="请选择" filterable clearable class="addinputw">
<el-option v-for="item in vinNo_list" :key="item.vin" :label="item.vin" :value="item.vin"/>
</el-select>
<el-form-item prop="vinNo">
<el-select v-model="temp.vinNo" placeholder="请选择" filterable clearable class="addinputw">
<el-option v-for="item in vinNo_list" :key="item.vin" :label="item.vin" :value="item.vin"/>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
@ -117,7 +119,8 @@ import {
getCarTransferInfo,
getVinByWarehouseSid,
saveCarTransferInfo,
selectWarehouseByUserSid
selectWarehouseByUserSid,
submitCarTransfer
} from '@/api/supplychain/cunfangdidianbiangeng'
import Upload from '@/components/uploadFile/uploadImg.vue'
@ -174,7 +177,9 @@ export default {
dialogFormShowVisible: false, //
dialogStatus: '', //
vehiclePhoto: [],
rules: {}
rules: {
vinNo: [{ required: true, message: '车架号不能为空', trigger: 'change' }],
}
// ------------------------------------
}
},
@ -269,8 +274,8 @@ export default {
if (this.temp.InsuranceStateKey == '1') {
if (this.imgList.length > 0) {
console.log('保存imgList', this.imgList)
const img_list = []
for (var i = 0; i < this.imgList.length; i++) {
const img_list = []
img_list.push(this.imgList[i].url)
this.temp.policyImage = img_list
console.log('保存img_list', img_list)
@ -338,7 +343,8 @@ export default {
},
handleSubmit() {
const _this = this
this.$refs['form_obj'].validate(valid => {
this.getUrl()
this.$refs['dataForm'].validate(valid => {
if (valid) {
// this.submitdisabled = true
this.$confirm('是否确定提交该业务', '提示', {
@ -346,14 +352,14 @@ export default {
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
// req.submitVehicleReturn(this.formobj).then(resp => {
// this.submitdisabled = false
// if (resp.success) {
// _this.handleReturn('true')
// }
// }).catch(() => {
// this.submitdisabled = false
// })
submitCarTransfer(this.temp).then(resp => {
// this.submitdisabled = false
if (resp.success) {
_this.handleReturn('true')
}
}).catch(() => {
// this.submitdisabled = false
})
})
} else {
return false

201
anrui-scm/anrui-scm-ui/src/views/workFlow/cunfangdidianbiangengFlow/cunfangdidianbiangeng.vue

@ -4,9 +4,9 @@
<div class="tab-header webtop">
<div>{{ viewTitle }}</div>
<div>
<!-- <el-button type="primary" @click="openAgree('同意')"> </el-button>-->
<!-- <el-button type="danger" @click="openReject('驳回')"> </el-button>-->
<!-- <el-button type="danger" @click="openStop('终止')"> </el-button>-->
<el-button type="primary" @click="openAgree('同意')"> </el-button>
<el-button type="danger" @click="openReject('驳回')"> </el-button>
<el-button type="danger" @click="openStop('终止')"> </el-button>
</div>
</div>
<div class="">
@ -146,7 +146,7 @@
</el-col>
</el-row>
<div style="text-align:center;margin-top: 20px;">
<el-button type="primary" size="mini" @click="reject"> </el-button>
<el-button type="primary" size="mini" @click="confirm"> </el-button>
<el-button type="info " size="mini" @click="nodeDialogVisible = false"> </el-button>
</div>
</el-form>
@ -156,9 +156,14 @@
<script>
import { getCarTransfer } from '@/api/supplychain/cunfangdidianbiangeng'
import req from '@/api/flow/cunfangdidianbiangeng'
import flow from '@/views/baseoutsourcingapplication/workflow/flow'
export default {
name: 'cunfangdidianbiangeng',
name: 'cunfangdidianbiangengHandle',
components:{
flow
},
data() {
return {
viewTitle: '',
@ -197,7 +202,7 @@ export default {
taskId: '',
orgSidPath: '',
taskDefKey: '',
userSid: window.sessionStorage.getItem('userSid')
userSid:''
},
//
regectList: {
@ -205,7 +210,7 @@ export default {
comment: '',
instanceId: '',
taskId: '',
userSid: window.sessionStorage.getItem('userSid')
userSid: ''
},
//
stopList: {
@ -213,10 +218,20 @@ export default {
comment: '',
instanceId: '',
taskId: '',
userSid: window.sessionStorage.getItem('userSid')
userSid: ''
}
}
},
mounted() {
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 2,
data: document.body.scrollHeight + 'px'
}
}, '*')
},
created() {
console.log('url:' + window.location.href)
var a = window.location.href.indexOf('?') + 1 // ?
@ -236,6 +251,7 @@ export default {
this.agreeList.instanceId = obj.instanceId
this.agreeList.taskId = obj.taskId
this.agreeList.taskDefKey = obj.taskDefKey
this.agreeList.userSid = obj.userSid
this.agreeList.orgSidPath = window.sessionStorage.getItem('orgSidPath')
this.current.taskDefKey = obj.taskDefKey
this.current.taskName = obj.taskName
@ -243,37 +259,29 @@ export default {
this.regectList.businessSid = sid
this.regectList.instanceId = obj.instanceId
this.regectList.taskId = obj.taskId
this.regectList.userSid = obj.userSid
//
this.stopList.businessSid = sid
this.stopList.instanceId = obj.instanceId
this.stopList.taskId = obj.taskId
this.stopList.userSid = obj.userSid
//
this.transactState = obj.transactState
//
this.getModelDetail(obj.deployId)
this.getFlowViewer(obj.instanceId)
},
mounted() {
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 2,
data: document.body.scrollHeight + 'px'
}
}, '*')
},
methods: {
handleReturn() {
this.temp = {}
this.$emit('doback')
},
showInfo(row) {
showInfo(sid) {
this.$nextTick(() => {
this.$refs['dataForm'].clearValidate()
})
this.viewTitle = '存放地点变更申请详情'
getCarTransfer(row.sid).then((resp) => {
getCarTransfer(sid).then((resp) => {
if (resp.success) {
const data = resp.data
this.temp = data
@ -286,6 +294,156 @@ export default {
})
})
},
// ---------- ------------------------------
/** xml 文件 */
getModelDetail(deployId) {
// xml
req.readXml(deployId).then((res) => {
this.xmlData = res.data
})
},
//
getFlowViewer(procInsId) {
req.getFlowViewer(procInsId).then((res) => {
this.taskList = res.data
})
},
//
openAgree(val) {
this.operation = val
req.getNextNodesForSubmit({ taskDefKey: this.current.taskDefKey }).then((resp) => {
if (resp.success) {
var arr = resp.data
this.nextNode = arr[0]
this.nodeDialogVisible = true
}
this.submitdisabled = false
})
},
//
openReject(val) {
this.operation = val
req.getPreviousNodesForReject({ taskDefKey: this.current.taskDefKey }).then((resp) => {
if (resp.success) {
var arr = resp.data
this.nextNode = arr[0]
this.nodeDialogVisible = true
}
this.submitdisabled = false
})
},
//
openStop(val) {
this.operation = val
req.getPreviousNodesForReject({ taskDefKey: this.current.taskDefKey }).then((resp) => {
if (resp.success) {
var arr = resp.data
this.nextNode = arr[0]
this.nodeDialogVisible = true
}
this.submitdisabled = false
})
},
/** 选择代办人确认 */
confirm() {
if (this.operation === '同意') {
this.handleAgree()
} else if (this.operation === '驳回') {
this.handleReject()
} else if (this.operation === '终止') {
this.handleStop()
}
},
/** 同意任务 */
handleAgree() {
this.agreeList.comment = this.dialogList.comment
req.agreeTask(this.agreeList).then((response) => {
if (response.success) {
this.$notify({
title: '提示',
message: '执行成功',
type: 'success',
duration: 2000
})
this.nodeDialogVisible = false
//
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 1
}
}, '*')
} else {
this.$notify({
title: '提示',
message: '执行失败',
type: 'error',
duration: 2000
})
}
})
},
/** 驳回任务 */
handleReject() {
this.regectList.comment = this.dialogList.comment
req.rejectTask(this.regectList).then((response) => {
if (response.success) {
this.$notify({
title: '提示',
message: '执行成功',
type: 'success',
duration: 2000
})
this.nodeDialogVisible = false
//
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 1
}
}, '*')
} else {
this.$notify({
title: '提示',
message: '执行失败',
type: 'error',
duration: 2000
})
}
})
},
/** 终止任务 */
handleStop() {
this.stopList.comment = this.dialogList.comment
req.breakTask(this.stopList).then((response) => {
if (response.success) {
this.$notify({
title: '提示',
message: '执行成功',
type: 'success',
duration: 2000
})
this.nodeDialogVisible = false
//
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 1
}
}, '*')
} else {
this.$notify({
title: '提示',
message: '执行失败',
type: 'error',
duration: 2000
})
}
})
},
open(val) {
this.dialogVisible = true
this.dialogUrl = val
@ -344,4 +502,7 @@ export default {
font-size: 14px;
text-align: center;
}
.title{
text-align: center;
}
</style>

86
anrui-scm/anrui-scm-ui/src/views/workFlow/cunfangdidianbiangengFlow/cunfangdidianbiangengEdit.vue

@ -116,7 +116,8 @@ import {
getCarTransferInfo,
getVinByWarehouseSid,
saveCarTransferInfo,
selectWarehouseByUserSid
selectWarehouseByUserSid,
submitCarTransfer
} from '@/api/supplychain/cunfangdidianbiangeng'
import Upload from '@/components/uploadFile/uploadImg.vue'
@ -168,7 +169,9 @@ export default {
InsuranceState: '',
InsuranceStateKey: '',
temporaryCard: '',
policyImage: []
policyImage: [],
instanceId:'',
taskId:'',
}, //
dialogFormVisible: false, //
dialogFormShowVisible: false, //
@ -178,6 +181,31 @@ export default {
// ------------------------------------
}
},
mounted() {
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 2,
data: document.body.scrollHeight + 'px'
}
}, '*')
},
created() {
console.log('url:' + window.location.href)
var a = window.location.href.indexOf('?') + 1 // ?
var b = window.location.href.indexOf('#data') // #data
const info = window.location.href.slice(a, b)
var sid = info.substr(info.indexOf('=') + 1)
// ===
var one = window.location.href.lastIndexOf('#') + 1
var two = window.location.href.lastIndexOf('}') + 1
const data = decodeURI(window.location.href.slice(one, two)) // urlunescape()web,使
var tar = data.substr(data.indexOf('=') + 1)
const obj = JSON.parse(tar)
console.log('iframe页面获取的obj:', obj)
this.showEdit(sid,obj.instanceId,obj.taskId)
},
methods: {
getType() {
//
@ -236,7 +264,7 @@ export default {
this.temp.applicantDate = dayDate
this.getType()
},
showEdit(sid) {
showEdit(sid, instanceId, taskId) {
this.$nextTick(() => {
this.$refs['dataForm'].clearValidate()
})
@ -252,6 +280,8 @@ export default {
this.temp = res.data
this.temp.InsuranceStateKey = res.data.insuranceStateKey
this.temp.InsuranceState = res.data.insuranceState
this.temp.instanceId = instanceId
this.temp.taskId = taskId
if (this.temp.policyImage.length > 0) {
for (var i = 0; i < this.temp.policyImage.length; i++) {
const imgName = this.temp.policyImage[i].split('/')
@ -269,8 +299,8 @@ export default {
if (this.temp.InsuranceStateKey == '1') {
if (this.imgList.length > 0) {
console.log('保存imgList', this.imgList)
const img_list = []
for (var i = 0; i < this.imgList.length; i++) {
const img_list = []
img_list.push(this.imgList[i].url)
this.temp.policyImage = img_list
console.log('保存img_list', img_list)
@ -307,7 +337,9 @@ export default {
InsuranceState: '',
InsuranceStateKey: '',
temporaryCard: '',
policyImage: []
policyImage: [],
instanceId:'',
taskId:''
}
this.imgList = []
this.vinNo_list = []
@ -324,7 +356,13 @@ export default {
this.FormLoading = false
if (response.code === '200') {
this.dialogFormVisible = false
this.handleReturn('true')
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 1
}
}, '*')
} else {
this.$message({
showClose: true,
@ -337,22 +375,30 @@ export default {
})
},
handleSubmit() {
this.$refs['form_obj'].validate(valid => {
const _this = this
this.getUrl()
this.$refs['dataForm'].validate(valid => {
if (valid) {
this.disabled = true
// this.submitdisabled = true
this.$confirm('是否确定提交该业务', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
// req.submitVehicleReturn(this.formobj).then(resp => {
// this.disabled = false
// if (resp.success) {
// }
// }).catch(() => {
// this.disabled = false
// })
submitCarTransfer(this.temp).then(resp => {
// this.submitdisabled = false
if (resp.success) {
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 1
}
}, '*')
}
}).catch(() => {
// this.submitdisabled = false
})
})
} else {
return false
@ -368,11 +414,6 @@ export default {
width: 80%;
}
.listconadd {
width: 100%;
padding: 0 240px !important;
}
.title {
padding-top: 28px;
}
@ -413,4 +454,7 @@ export default {
font-size: 14px;
text-align: center;
}
.title{
text-align: center;
}
</style>

98
anrui-scm/anrui-scm-ui/src/views/workFlow/cunfangdidianbiangengFlow/cunfangdidianbiangengInfo.vue

@ -3,7 +3,7 @@
<div class="tab-header webtop">
<div>{{ viewTitle }}</div>
<div>
<el-button type="info" size="small" @click="handleReturn()"></el-button>
<el-button type="danger" @click="openRevoke"> </el-button>
</div>
</div>
<div class="">
@ -126,6 +126,7 @@
<script>
import { getCarTransfer } from '@/api/supplychain/cunfangdidianbiangeng'
import req from '@/api/flow/cunfangdidianbiangeng'
export default {
name: 'cunfangdidianbiangengInfo',
@ -145,21 +146,64 @@ export default {
dialogFormShowVisible: false, //
dialogStatus: '', //
vehiclePhoto: [],
rules: {}
rules: {},
// ------------------------------------
//
revokeList: {
businessSid: '',
instanceId: '',
taskId: '',
userSid: ''
},
}
},
mounted() {
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 2,
data: document.body.scrollHeight + 'px'
}
}, '*')
},
created() {
console.log('url:' + window.location.href)
var a = window.location.href.indexOf('?') + 1 // ?
var b = window.location.href.indexOf('#data') // #data
const info = window.location.href.slice(a, b)
var sid = info.substr(info.indexOf('=') + 1)
this.showInfo(sid)
// ===
var one = window.location.href.lastIndexOf('#') + 1
var two = window.location.href.lastIndexOf('}') + 1
const data = decodeURI(window.location.href.slice(one, two)) // urlunescape()web,使
var tar = data.substr(data.indexOf('=') + 1)
const obj = JSON.parse(tar)
console.log('iframe页面获取的obj:', obj)
//
this.revokeList.businessSid = sid
this.revokeList.instanceId = obj.instanceId
this.revokeList.taskId = obj.taskId
this.revokeList.taskDefKey = obj.taskDefKey
this.revokeList.userSid = obj.userSid
//
this.transactState = obj.transactState
//
// this.getModelDetail(obj.deployId)
// this.getFlowViewer(obj.instanceId)
},
methods: {
handleReturn() {
this.temp = {}
this.$emit('doback')
},
showInfo(row) {
showInfo(sid) {
this.$nextTick(() => {
this.$refs['dataForm'].clearValidate()
})
this.viewTitle = '存放地点变更申请详情'
getCarTransfer(row.sid).then((resp) => {
getCarTransfer(sid).then((resp) => {
if (resp.success) {
const data = resp.data
this.temp = data
@ -172,6 +216,49 @@ export default {
})
})
},
openRevoke() {
this.$confirm('是否确认执行撤回操作', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.handleRevoke()
}).catch(() => {
this.$message({
type: 'info',
message: '已取消撤回'
})
})
},
/** 撤回任务 */
handleRevoke() {
// this.revokeList.comment = this.dialogList.comment
req.revokeTask(this.revokeList).then((response) => {
if (response.success) {
this.$notify({
title: '提示',
message: '执行成功',
type: 'success',
duration: 2000
})
//
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 1
}
}, '*')
} else {
this.$notify({
title: '提示',
message: '执行失败',
type: 'error',
duration: 2000
})
}
})
},
open(val) {
this.dialogVisible = true
this.dialogUrl = val
@ -228,4 +315,7 @@ export default {
font-size: 14px;
text-align: center;
}
.title{
text-align: center;
}
</style>

Loading…
Cancel
Save