Commit ff079447 authored by Marcus's avatar Marcus

提交工作流审核后,审核中点击跳转到对应的审核详情页 / 入仓修改-审核中跳转审核详情

http://zentao.jdshangmen.com/task-view-1057.html
parent f2389b65
......@@ -189,6 +189,15 @@ export function getWarehouseUpdateApprovalInfo(id) {
})
}
// 获取最近的入仓修改审批单详情-修改页面使用
export function getWarehouseLastUpdateApprovalInfo(params) {
return request({
url: '/order/order-warehouse-in/get-last-update-approval-info',
method: 'get',
params
})
}
// 入仓完成
export function orderWarehouseInFinish(data){
return request({
......
......@@ -343,13 +343,13 @@
</div>
<span slot="footer">
<template v-if="true">
<template v-if="!isEditing">
<el-button @click="opened = false">关 闭</el-button>
<el-button type="primary" @click="handleSubmit()">{{ edit ? '确认修改' : '提 交' }}</el-button>
</template>
<template v-else>
<el-button type="primary">审核中</el-button>
<el-button type="primary">取消审核</el-button>
<el-button type="primary" @click="$router.push('/bpm/process-instance/detail?id=' + formId)">审核中</el-button>
<el-button type="primary" @click="handleCancelProcessInstance">取消审核</el-button>
<el-button @click="opened = false">返回</el-button>
</template>
<template v-else>
......@@ -363,10 +363,11 @@
<script>
import dictSelector from "@/components/DictSelector"
import {DICT_TYPE, getDictDataLabel} from "@/utils/dict"
import { orderWarehouseIn, orderWarehouseInUpdateApply } from '@/api/ecw/order'
import {getWarehouseLastUpdateApprovalInfo, orderWarehouseIn, orderWarehouseInUpdateApply} from '@/api/ecw/order'
import { getFeeTypeByOrderProduct, getProductBrankPage } from '@/api/ecw/productBrank'
import WorkFlow from "@/components/WorkFlow"
import ProductSelector from "@/components/ProductSelector"
import {cancelProcessInstance} from "@/api/bpm/processInstance"
export default {
name: 'editDialog',
......@@ -480,7 +481,12 @@ export default {
selectedUsers: undefined,
activeName: 'first'
activeName: 'first',
// 入仓修改正在审核中
isEditing: false,
// 审批业务id
formId: ''
};
},
......@@ -500,6 +506,15 @@ export default {
this.form.material = this.warehousing.material
this.form.brand = this.warehousing.brand?.toString() || ''
this.handleBrandChange(this.form.brand)
getWarehouseLastUpdateApprovalInfo({
orderItemId: this.warehousing.orderItemId,
orderId: this.warehousing.orderId
}).then(r => {
if (r.data && r.data.status === 1 && r.data.type === 1){
this.isEditing = true
this.formId = r.data.formId
}
})
} else {
this.$emit('update:visible', false)
}
......@@ -518,6 +533,20 @@ export default {
},
methods: {
handleCancelProcessInstance(){
this.$prompt('请输入取消原因?', "取消流程", {
type: 'warning',
confirmButtonText: "确定",
cancelButtonText: "取消",
inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
inputErrorMessage: "取消原因不能为空",
}).then(({ value }) => {
cancelProcessInstance(this.formId, value).then(() => {
this.opened = false
this.$modal.msgSuccess("取消成功");
})
})
},
onProductChange(product){
this.form1.prodTitleZh = product.titleZh
this.form1.prodTitleEn = product.titleEn
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment