Commit aa4b318c authored by dcy's avatar dcy

订单模块2,调仓,退仓,关联,互斥 退仓,费用申请详情,调仓申请详情

parent 09e989b2
......@@ -26,10 +26,25 @@ export function ecwOrderList(params){
})
}
//申请退仓
export function orderWarehouseInDelete(params){
export function orderWarehouseInDelete(data){
return request({
url:'/order/order-warehouse-in/delete',
method:'delete',
params:params,
url:'/order/order-warehouse-in/rollback-apply',
method:'put',
data:data,
})
}
//通过bpmFormId 获得仓库审核单详情
export function warehouseApprovalGetByFormId(params){
return request({
url:'order/order-warehouse-approval/get-by-form-id',
method:'get',
params:params
})
}
export function warehouseAreaPositionList(params){
return request({
url:'/ecw/warehouse/list',
method:'get',
params:params
})
}
......@@ -215,3 +215,11 @@ export function createOrderPickupSplitBatch(data){
data
})
}
//根据流程ID获得订单信息
export function applicationGetOrderByProcessId(params){
return request({
url:'order/fee-application/getOrderByProcessId',
method:'get',
params
})
}
......@@ -366,6 +366,18 @@ export const constantRoutes = [
activeMenu:'order/withdrawal',
noCache:true,
}
},
{
path: 'transfer-warehousing/:orderId',
component:()=>import('@/views/ecw/order/transferWarehousing'),
name:'transferWarehousing',
props: true,
meta:{
title:'调拨出仓',
icon:'',
activeMenu:'order/transferWarehousing',
noCache:true,
}
}
],
},
......
......@@ -76,6 +76,16 @@ export default {
components:{
ordeDetailsForm
},
computed:{
check(){
let flag = true;
if(this.list.length === 1 && this.list[0].status === 5){
flag = false
}else {
}
}
},
data(){
return {
orderDetails:{},
......
......@@ -67,15 +67,19 @@
<h1 class="title">
审批流程
</h1>
<div style="padding: 20px">
<my-process-viewer key="designer" v-model="bpmnXML" v-bind="bpmnControlForm" />
</div>
<div style="height: 100px"></div>
<!-- <el-form label-width="200px">-->
<!-- <el-form-item label="抄送"></el-form-item>-->
<!-- <el-form-item label="抄送人"></el-form-item>-->
<!-- </el-form>-->
<div style="text-align: center">
<el-button style="margin-right: 50px" @click="submit">提交申请</el-button>
<el-button style="margin-right: 50px" @click="submit" :disabled="isSubmit">提交申请</el-button>
<el-button @click="$router.push('/order/order')">取消</el-button>
</div>
<warehouseDetails></warehouseDetails>
</div>
</template>
......@@ -86,14 +90,34 @@ import {
orderWarehouseInAdjustApply,
warehouseAdjustmentList,
} from "@/api/ecw/batchSingleApplication";
import {getProcessDefinitionBpmnXMLByKey} from "@/api/bpm/definition";
import warehouseDetails from "@/views/ecw/order/components/warehouseDetails";
export default {
name: "batchSingleApplication",
props:{
orderList:String,
},
components:{
warehouseDetails
},
created() {
this.list = JSON.parse(this.orderList);
warehouseAdjustmentList({id:this.list[0].startWarehouseId}).then( r => this.availableWarehouse = r.data)
getProcessDefinitionBpmnXMLByKey("warehouse_transfer").then(response => {
this.bpmnXML = response.data
})
},
computed:{
isSubmit(){
let flag = true;
if(this.list.length === 1 && this.list[0].status === 5){
flag = false
}else {
let l = this.list.map(e => e.startWarehouseId)
if(this.list.every(e => e.status === 5) && [...new Set(l)].length === 1) flag = false
}
return flag;
}
},
data(){
return {
......@@ -106,7 +130,11 @@ export default {
orderIds:undefined,
warehouseInId:undefined,
warehouseOutId: undefined
}
},
bpmnXML: null,
bpmnControlForm: {
prefix: "activiti"
},
}
},
methods:{
......@@ -134,4 +162,12 @@ export default {
text-align: left;
}
}
.my-process-designer {
height: calc(100vh - 200px);
}
.box-card {
width: 100%;
margin-bottom: 20px;
}
</style>
<template>
<div>
<h1>
申请信息【订单信息】
</h1>
<el-table v-if="type === 1">
<el-table-column
label="订单编号">
</el-table-column>
<el-table-column
label="唛头">
</el-table-column>
<el-table-column
label="已到箱数/总箱数">
</el-table-column>
<el-table-column
label="下单统计">
</el-table-column>
<el-table-column
label="入仓统计">
</el-table-column>
<el-table-column
label="入仓时间">
</el-table-column>
<el-table-column
label="运输方式">
</el-table-column>
<el-table-column
label="出货渠道">
</el-table-column>
<el-table-column
label="始发仓">
</el-table-column>
<el-table-column
label="目的地">
</el-table-column>
<el-table-column
label="发货人">
</el-table-column>
<el-table-column
label="收货人">
</el-table-column>
</el-table>
<el-descriptions v-else :column="4" border>
<el-descriptions-item label="订单号">{{FeeDetails.orderNo}}</el-descriptions-item>
<el-descriptions-item label="运输方式">
<dict-tag :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="FeeDetails.transportId"></dict-tag>
</el-descriptions-item>
<el-descriptions-item label="出货方式"></el-descriptions-item>
<el-descriptions-item label="订单状态">
<dict-tag :type="DICT_TYPE.ORDER_ABNORMAL_STATE" :value="FeeDetails.abnormalState"></dict-tag>
</el-descriptions-item>
<el-descriptions-item label="唛头">
{{FeeDetails.marks}}
</el-descriptions-item>
<el-descriptions-item label="始发仓">{{FeeDetails.startWarehouse}}</el-descriptions-item>
<el-descriptions-item label="目的仓">{{FeeDetails.destWarehouse}}</el-descriptions-item>
</el-descriptions>
<div v-if="type === 1">
<p>
申请说明
</p>
<div >
从【{{selectWarehouse(FeeDetails.details && FeeDetails.details.warehouseInId ? FeeDetails.details.warehouseInId : '' )}}】 调到
{{selectWarehouse(FeeDetails.details && FeeDetails.details.warehouseOutId ? FeeDetails.details.warehouseOutId : '' )}}
</div>
</div>
<div v-if="type === 2">
<p>申请理由</p>
<div>
{{FeeDetails.remarks}}
</div>
</div>
</div>
</template>
<script>
import {warehouseApprovalGetByFormId, warehouseAreaPositionList} from "@/api/ecw/batchSingleApplication";
import {applicationGetOrderByProcessId} from "@/api/ecw/order";
export default {
props:{
type:{
type: Number,
default:2,
},
processId:{
type:[Number,String],
}
},
name: "warehouseDetails",
data(){
return{
FeeDetails:{},
transfer:{},
warehouseList:[]
}
},
created() {
warehouseAreaPositionList().then(r => this.warehouseList = r.data)
console.log(this.type,'type');
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;
}
},
methods:{
selectWarehouse(val){
if(this.warehouseList.length > 0){
return this.warehouseList.find(e => e.id === val).titleZh
}
return ''
}
}
}
</script>
<style scoped>
</style>
......@@ -59,15 +59,17 @@
<el-button style="margin-right: 30px;" @click="submit">提交</el-button>
<el-button>取消</el-button>
</div>
<div style="padding: 20px">
<my-process-viewer key="designer" v-model="bpmnXML" v-bind="bpmnControlForm" />
</div>
</div>
</template>
<script>
import {getOrder, feeApplicationCreate, ApplicationListByOrderId, applicationUpdate} from "@/api/ecw/order";
import { getDictDatas, DICT_TYPE } from '@/utils/dict';
import Template from "@/views/cms/template";
import {getProcessDefinitionBpmnXML, getProcessDefinitionBpmnXMLByKey} from "@/api/bpm/definition";
import { getProcessDefinitionBpmnXMLByKey} from "@/api/bpm/definition";
export default {
name: "feeApplication",
components: {Template},
......@@ -99,7 +101,7 @@ export default {
this.getDictDatas(this.DICT_TYPE.AUDIT_STATUS).forEach( e =>{
this.STATUS[e.value] = e.label
}),
getProcessDefinitionBpmnXML('free_apply').then(response => {
getProcessDefinitionBpmnXMLByKey("free_apply").then(response => {
this.bpmnXML = response.data
})
},
......
......@@ -200,7 +200,7 @@
v-hasPermi="['ecw:order:update']">入仓</el-button>
<el-button size="mini" type="text" icon="el-icon-edit" @click= "$router.push(`/order/withdrawal/${scope.row.orderId}`)"
v-hasPermi="['ecw:order:update']">退仓</el-button>
<el-button type="text" size="mini" @click="$router.push({path:'/order/batch-single-application',query:{list:JSON.stringify([scope.row])}})" >调仓</el-button>
<el-button type="text" v-if="scope.row.status === 5" size="mini" @click="$router.push({path:'/order/batch-single-application',query:{list:JSON.stringify([scope.row])}})" >调仓</el-button>
</div>
</el-popover>
......
<template>
<div style="padding: 0 20px">
<h1>调拨出仓</h1>
<el-divider content-position="left">
订单信息
</el-divider>
<ordeDetailsForm :details="{}"></ordeDetailsForm>
<el-divider content-position="left">
货物信息
</el-divider>
<el-table>
<el-table-column label="序号"></el-table-column>
<el-table-column label="品名"></el-table-column>
<el-table-column label="填单货物属性"></el-table-column>
<el-table-column label="入库货物属性"></el-table-column>
<el-table-column label="最后操作时间"></el-table-column>
<el-table-column label="状态"></el-table-column>
</el-table>
<el-divider content-position="left">
调仓明细
</el-divider>
<el-table>
<el-table-column label="调仓编号"></el-table-column>
<el-table-column label="调出仓库"></el-table-column>
<el-table-column label="调入仓库"></el-table-column>
<el-table-column label="申请人"></el-table-column>
<el-table-column label="申请时间"></el-table-column>
<el-table-column label="状态"></el-table-column>
<el-table-column label="操作"></el-table-column>
</el-table>
<el-descriptions :column="4" border>
<el-descriptions-item label="集运仓库">kooriookami</el-descriptions-item>
<el-descriptions-item label="储位">18100000000</el-descriptions-item>
<el-descriptions-item label="调拨目标仓">苏州市</el-descriptions-item>
<el-descriptions-item label="物流公司"></el-descriptions-item>
<el-descriptions-item label="物流单号"> 1188 号</el-descriptions-item>
<el-descriptions-item label="联系电话"> 1188 号</el-descriptions-item>
<el-descriptions-item label="出仓日期"> 1188 号</el-descriptions-item>
<el-descriptions-item label="到仓日期"> 1188 号</el-descriptions-item>
</el-descriptions>
<el-divider content-position="left">
出仓影像
</el-divider>
<el-from>
<el-form-item label="备注"></el-form-item>
</el-from>
<div>
<el-button>确认出仓</el-button>
<el-button>返回</el-button>
</div>
</div>
</template>
<script>
import ordeDetailsForm from "@/views/ecw/order/components/ordeDetailsForm";
export default {
name: "transferWarehousing",
components:{
ordeDetailsForm
},
}
</script>
<style scoped>
</style>
......@@ -4,13 +4,16 @@
<el-divider></el-divider>
<el-form label-width="150px">
<el-form-item label="退仓原因">
<el-input style="width:500px" type="textarea"></el-input>
<el-input v-model="params.reason" style="width:500px" type="textarea"></el-input>
</el-form-item>
</el-form>
<el-divider></el-divider>
<h2>审批流程</h2>
<div style="padding: 20px">
<my-process-viewer key="designer" v-model="bpmnXML" v-bind="bpmnControlForm" />
</div>
<div>
<el-button type="primary" style="margin-right: 20px;">确定退仓</el-button>
<el-button @click="submit" type="primary" style="margin-right: 20px;">确定退仓</el-button>
<el-button @click="$router.push('/order/order')">不,再考虑考虑</el-button>
</div>
</div>
......@@ -19,6 +22,7 @@
<script>
import {getOrder} from "@/api/ecw/order";
import {orderWarehouseInDelete} from "@/api/ecw/batchSingleApplication";
import {getProcessDefinitionBpmnXMLByKey} from "@/api/bpm/definition";
export default {
name: "withdrawal",
......@@ -27,15 +31,32 @@ export default {
},
data(){
return {
orderDetails:{}
orderDetails:{},
bpmnXML: null,
bpmnControlForm: {
prefix: "activiti"
},
params:{
orderId:undefined,
orderNo:undefined,
reason:'',
}
}
},
created() {
getOrder(this.orderId).then(r => this.orderDetails = r.data)
getOrder(this.orderId).then(r => this.orderDetails = r.data);
getProcessDefinitionBpmnXMLByKey("retired_warehouse").then(response => {
this.bpmnXML = response.data
})
},
methods:{
submit(){
orderWarehouseInDelete({id:this.orderDetails.orderId}).then(r => {
this.params.orderId = this.orderDetails.orderId;
this.params.orderNo =this.orderDetails.orderNo;
orderWarehouseInDelete(this.params).then(r => {
if(r.code === 0){
this.$message.success('退仓成功');
}
})
}
}
......
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