Commit 45b2b77f authored by dcy's avatar dcy

审批流程详情

parent d59fc171
......@@ -48,3 +48,11 @@ export function orderWarehouseInDelete(data){
params:params
})
}
// 根据审核ID获得仓库审核单详情
export function warehouseApprovalGetById(params){
return request({
url:'/order/order-warehouse-approval/get-by-id',
method:'get',
params,
})
}
......@@ -218,8 +218,15 @@ export function createOrderPickupSplitBatch(data){
//根据流程ID获得订单信息
export function applicationGetOrderByProcessId(params){
return request({
url:'order/fee-application/getOrderByProcessId',
url:'/order/fee-application/getOrderByProcessId',
method:'get',
params
})
}
export function feeApplicationGet(params){
return request({
url:'/order/fee-application/get',
method:'get',
params
})
}
......@@ -83,8 +83,12 @@
</template>
<script>
import {warehouseApprovalGetByFormId, warehouseAreaPositionList} from "@/api/ecw/batchSingleApplication";
import {applicationGetOrderByProcessId, getOrder} from "@/api/ecw/order";
import {
warehouseApprovalGetByFormId,
warehouseApprovalGetById,
warehouseAreaPositionList
} from "@/api/ecw/batchSingleApplication";
import {applicationGetOrderByProcessId, feeApplicationGet, getOrder,} from "@/api/ecw/order";
import { getChannelList } from '@/api/ecw/channel';
export default {
props:{
......@@ -102,34 +106,29 @@ export default {
FeeDetails:{},
transfer:{},
warehouseList:[],
channelList:[]
channelList:[],
processInstanceID:undefined
}
},
created() {
getChannelList().then(r => this.channelList = r.data);
warehouseAreaPositionList().then(r => this.warehouseList = r.data)
switch (this.type){
case 1:
//调仓
warehouseApprovalGetByFormId({formId:this.processId}).then( r => {
this.FeeDetails = r.data
this.FeeDetails.details = JSON.parse(r.data.details)
});
break;
case 2:
// 费用申请
applicationGetOrderByProcessId({processId:this.processId}).then(r => this.FeeDetails = r.data)
break;
case 3:
//退仓
warehouseApprovalGetByFormId({formId:this.processId}).then( res => {
getOrder(res.data.orderIds).then(r =>{
this.FeeDetails = r.data
this.FeeDetails.details = JSON.parse(res.data.details)
})
});
break;
}
if(this.type === 2){
feeApplicationGet({id:this.processId}).then(r => {
if(r.code === 0){
this.processInstanceID = r.data.bpmProcessId;
this.getDetails()
}
})
}else {
warehouseApprovalGetById({id:this.processId}).then(r => {
if(r.code === 0){
this.processInstanceID = r.data.formId;
this.getDetails()
}
})
}
},
methods:{
selectWarehouse(val){
......@@ -141,7 +140,35 @@ export default {
selectChannel(val){
if(this.channelList.length > 0 && !!val) return this.channelList.find(e => e.channelId === val).nameEn
return ''
},
getDetails(){
switch (this.type){
case 1:
//调仓
warehouseApprovalGetByFormId({formId:this.processInstanceID}).then( r => {
this.FeeDetails = r.data
this.FeeDetails.details = JSON.parse(r.data.details)
});
break;
case 2:
// 费用申请
applicationGetOrderByProcessId({processId:this.processInstanceID}).then(r => {
this.FeeDetails = r.data
})
break;
case 3:
//退仓
warehouseApprovalGetByFormId({formId:this.processInstanceID}).then( res => {
getOrder(res.data.orderIds).then(r =>{
this.FeeDetails = r.data
this.FeeDetails.details = JSON.parse(res.data.details)
})
});
break;
}
}
}
}
</script>
......
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