Commit 8217f3f3 authored by dragondean@qq.com's avatar dragondean@qq.com

优化订单列表按钮状态

parent f7917d2c
......@@ -162,20 +162,80 @@
<el-dropdown>
<el-button type="text">{{$t('操作')}}</el-button>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item @click.native="handleUpdate(scope.row)" v-hasPermi="['ecw:order:update']" >{{$t('编辑')}}</el-dropdown-item>
<el-dropdown-item @click.native="oprateOrder(scope.row.orderId, 'deleteOrder')" v-hasPermi="['ecw:order:delete']" >{{$t('删除')}}</el-dropdown-item>
<el-dropdown-item @click.native="oprateOrder(scope.row.orderId, 'cancelOrder')" >{{$t('取消订单')}}</el-dropdown-item>
<el-dropdown-item @click.native="oprateOrder(scope.row.orderId, 'recoveryOrder')" >{{$t('恢复订单')}}</el-dropdown-item>
<el-dropdown-item @click.native="feeApplicationBol = true; orderId = scope.row.orderId" >{{$t('费用申请')}}</el-dropdown-item>
<el-dropdown-item @click.native="orderId = scope.row.orderId;orderNo = scope.row.orderNo;isShow = true" >{{$t('特需')}}</el-dropdown-item>
<el-dropdown-item @click.native="$router.push(`/order/associated-order/${scope.row.orderId}`)" >{{$t('关联')}}</el-dropdown-item>
<el-dropdown-item @click.native="$router.push(`/order/mutex-order/${scope.row.orderId}`)" >{{$t('互斥')}}</el-dropdown-item>
<el-dropdown-item @click.native="$router.push('/order/special/' + scope.row.orderId)" v-hasPermi="['ecw:order:update']" >{{$t('特价')}}</el-dropdown-item>
<el-dropdown-item @click.native="$router.push(`/order/release?orderId=${scope.row.orderId}`)" >{{$t('确认放货')}}</el-dropdown-item>
<el-dropdown-item @click.native="$router.push(`/order/singleApply?orderNo=${scope.row.orderNo}`)" >{{$t('合单申请')}}</el-dropdown-item>
<el-dropdown-item @click.native="$router.push(`/order/splitApply?orderId=${scope.row.orderId}`)" >{{$t('拆单申请')}}</el-dropdown-item>
<el-dropdown-item @click.native="showMergedLogOrderNo=scope.row.orderNo" >{{$t('合单日志')}}</el-dropdown-item>
<el-dropdown-item @click.native="showPickupLogOrderNo=scope.row.orderNo" >{{$t('提货日志')}}</el-dropdown-item>
<!-- 编辑 -->
<template v-if="
exclude(scope.row.abnormalState, [1 ,99 ,2 ,3 ,4 ,9 ,10 ,11 ,12 ,14]) &&
exclude(scope.row.status, [20,21]) &&
exclude(scope.row.shipmentState, [320,322,323]) &&
(exclude(scope.row.inWarehouseState, [ 212, 218, 213, 214, 215]) && exclude(scope.row.status, [5,8]) )
">
<el-dropdown-item @click.native="handleUpdate(scope.row)" v-hasPermi="['ecw:order:update']" >{{$t('编辑')}}</el-dropdown-item>
</template>
<!-- 删除 -->
<template v-if="include(scope.row.status, [0,2])">
<el-dropdown-item @click.native="oprateOrder(scope.row.orderId, 'deleteOrder')" v-hasPermi="['ecw:order:delete']" >{{$t('删除')}}</el-dropdown-item>
</template>
<!-- 取消 -->
<template v-if="include(scope.row.status, [0,2])">
<el-dropdown-item @click.native="oprateOrder(scope.row.orderId, 'cancelOrder')" >{{$t('取消订单')}}</el-dropdown-item>
</template>
<!-- 恢复 -->
<!-- <el-dropdown-item @click.native="oprateOrder(scope.row.orderId, 'recoveryOrder')" >{{$t('恢复订单')}}</el-dropdown-item>-->
<!-- 费用申请 -->
<template v-if="
exclude(scope.row.status, [0]) &&
exclude(scope.row.abnormalState, [1 ,99 ,2 ,3 ,4 ,9 ,10 ,11 ,12 ,14]) &&
exclude(scope.row.shipmentState, [320,322,323])
">
<el-dropdown-item @click.native="feeApplicationBol = true; orderId = scope.row.orderId" >{{$t('费用申请')}}</el-dropdown-item>
</template>
<!-- 特需,互斥,关联 -->
<template v-if="
exclude(scope.row.status, [0]) &&
exclude(scope.row.abnormalState, [1 ,99 ,2 ,3 ,4 ,9 ,10 ,11 ,12 ,14]) &&
exclude(scope.row.inWarehouseState, [204])
">
<el-dropdown-item @click.native="orderId = scope.row.orderId;orderNo = scope.row.orderNo;isShow = true" >{{$t('特需')}}</el-dropdown-item>
<el-dropdown-item @click.native="$router.push(`/order/associated-order/${scope.row.orderId}`)" >{{$t('关联')}}</el-dropdown-item>
<el-dropdown-item @click.native="$router.push(`/order/mutex-order/${scope.row.orderId}`)" >{{$t('互斥')}}</el-dropdown-item>
</template>
<!-- 特价 -->
<template v-if="
exclude(scope.row.status, [0]) &&
exclude(scope.row.abnormalState, [1 ,99 ,2 ,3 ,4 ,9 ,10 ,11 ,12 ,14]) &&
exclude(scope.row.shipmentState, [320,322,323])
">
<el-dropdown-item @click.native="$router.push('/order/special/' + scope.row.orderId)" v-hasPermi="['ecw:order:update']" >{{$t('特价')}}</el-dropdown-item>
</template>
<!-- 确认放货 -->
<template v-if="
exclude(scope.row.status, [0,2]) &&
exclude(scope.row.abnormalState, [1 ,99 ,2 ,3 ,4 ,9 ,10 ,11 ,12 ,14]) &&
exclude(scope.row.shipmentState, [320,322,323])
">
<el-dropdown-item @click.native="$router.push(`/order/release?orderId=${scope.row.orderId}`)" >{{$t('确认放货')}}</el-dropdown-item>
</template>
<!-- 合单,拆单 -->
<template v-if="
exclude(scope.row.status, [0,2]) &&
exclude(scope.row.abnormalState, [1 ,99 ,2 ,3 ,4 ,9 ,10 ,11 ,12 ,14]) &&
scope.row.shipmentState > 320
">
<el-dropdown-item @click.native="$router.push(`/order/singleApply?orderNo=${scope.row.orderNo}`)" >{{$t('合单申请')}}</el-dropdown-item>
<el-dropdown-item @click.native="$router.push(`/order/splitApply?orderId=${scope.row.orderId}`)" >{{$t('拆单申请')}}</el-dropdown-item>
</template>
<!-- 合单日志,提货日志 -->
<el-dropdown-item @click.native="showMergedLogOrderNo=scope.row.orderNo" >{{$t('合单日志')}}</el-dropdown-item>
<el-dropdown-item @click.native="showPickupLogOrderNo=scope.row.orderNo" >{{$t('提货日志')}}</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
......@@ -185,12 +245,61 @@
<el-dropdown>
<el-button type="text">{{$t('仓库')}}</el-button>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item @click.native="$router.push('/order/warehousing?id=' + scope.row.orderId)" v-hasPermi="['ecw:order:update']">{{$t('入仓')}}</el-dropdown-item>
<el-dropdown-item @click.native="show = true;orderId = scope.row.orderId; " v-hasPermi="['ecw:order:update']">{{$t('退仓')}}</el-dropdown-item>
<el-dropdown-item v-show="scope.row.statusMsg === '已入仓'" @click.native="$router.push('/order/warehousing?id=' + scope.row.orderId)" v-hasPermi="['ecw:order:update']">{{$t('入仓修改')}}</el-dropdown-item>
<el-dropdown-item @click.native="orderId = scope.row.orderId;warehouseBol=true;" >{{$t('调仓')}}</el-dropdown-item>
<el-dropdown-item @click.native="$router.push({path:'/order/transfer-warehousing/' + scope.row.orderId + '/' + 1 })" >{{$t('调拨出仓')}}</el-dropdown-item>
<el-dropdown-item @click.native="$router.push({path:'/order/transfer-to-warehouse/' + scope.row.orderId + '/' + 2 })" >{{$t('调拨到仓')}}</el-dropdown-item>
<!-- 入仓操作 -->
<template v-if="include(scope.row.status, [0,2]) || include(scope.row.abnormalState, [1])">
<el-dropdown-item @click.native="$router.push('/order/warehousing?id=' + scope.row.orderId)" v-hasPermi="['ecw:order:update']">{{$t('入仓')}}</el-dropdown-item>
</template>
<!-- 入仓补充 -->
<template v-if="
include(scope.row.inWarehouseState, [201,202, 208, 202, 210, 202, 211, 202, 213, 214, 215, 216]) ||
include(scope.row.abnormalState, [99 ,2 ,3 ,4 ,9 ,10 ,11 ,12 ,14])
">
<el-dropdown-item @click.native="$router.push('/order/warehousing?id=' + scope.row.orderId)" v-hasPermi="['ecw:order:update']">{{$t('入仓')}}</el-dropdown-item>
</template>
<!-- 入仓修改 -->
<template v-if="
include(scope.row.inWarehouseState, [202, 207, 208, 202, 209, 210, 202, 211, 212, 202, 213, 214, 215, 216, 204, 205, 206])
">
<el-dropdown-item @click.native="$router.push('/order/warehousing?id=' + scope.row.orderId)" v-hasPermi="['ecw:order:update']">{{$t('入仓修改')}}</el-dropdown-item>
</template>
<!-- 退仓 -->
<template v-if="
include(scope.row.inWarehouseState, [201, 202, 207, 208, 202, 209, 210, 202, 211, 212, 202, 213, 214, 215, 216]) &&
exclude(scope.row.abnormalState, [1])
">
<el-dropdown-item @click.native="show = true;orderId = scope.row.orderId; " v-hasPermi="['ecw:order:update']">{{$t('退仓')}}</el-dropdown-item>
</template>
<!-- 调仓 -->
<template v-if="
include(scope.row.inWarehouseState, [201, 202, 208, 202, 210, 202, 211, 202, 213, 215, 216])
">
<el-dropdown-item @click.native="orderId = scope.row.orderId;warehouseBol=true;" >{{$t('调仓')}}</el-dropdown-item>
</template>
<!-- 取消调仓 -->
<template v-if="
include(scope.row.inWarehouseState, [212,213,214])
">
<el-dropdown-item @click.native="$alert('// TODO')" >{{$t('取消调仓')}}</el-dropdown-item>
</template>
<!-- 调拨出仓 -->
<template v-if="
include(scope.row.inWarehouseState, [213])
">
<el-dropdown-item @click.native="$router.push({path:'/order/transfer-warehousing/' + scope.row.orderId + '/' + 1 })" >{{$t('调拨出仓')}}</el-dropdown-item>
</template>
<!-- 调拨到仓 -->
<template v-if="
include(scope.row.inWarehouseState, [214])
">
<el-dropdown-item @click.native="$router.push({path:'/order/transfer-to-warehouse/' + scope.row.orderId + '/' + 2 })" >{{$t('调拨到仓')}}</el-dropdown-item>
</template>
</el-dropdown-menu>
</el-dropdown>
......@@ -200,8 +309,25 @@
<el-dropdown>
<el-button type="text">{{$t('操作')}}</el-button>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item @click.native="printTagOrderId=scope.row.orderId">{{$t('打印标签')}}</el-dropdown-item>
<el-dropdown-item @click.native="printWarehouseReceiptOrderId=scope.row.orderId">{{$t('打印入仓单')}}</el-dropdown-item>
<!-- 打印标签 -->
<template v-if="
exclude(scope.row.status, [0]) &&
exclude(scope.row.shipmentState, [320,322,323]) &&
exclude(scope.row.abnormalState, [5,6,7,8])
">
<el-dropdown-item @click.native="printTagOrderId=scope.row.orderId">{{$t('打印标签')}}</el-dropdown-item>
</template>
<!-- 打印入仓单 -->
<template v-if="
exclude(scope.row.status, [0, 2]) &&
exclude(scope.row.shipmentState, [320,322,323]) &&
exclude(scope.row.abnormalState, [1, 5,6,7,8])
">
<el-dropdown-item @click.native="printWarehouseReceiptOrderId=scope.row.orderId">{{$t('打印入仓单')}}</el-dropdown-item>
</template>
<!-- 打印提单 -->
<el-dropdown-item @click.native="printLadingBillInfo={tidanNO: scope.row.tidanNo, transportType: scope.row.transportId}" :disabled="!scope.row.tidanNo">{{$t('打印提单')}}</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
......@@ -341,7 +467,16 @@ export default {
batchWarehouseAdjustment(){
return this.multipleSelection.length > 0 && this.multipleSelection.every(e => e.status === 5)
},
include(){
return (state, arr) => {
return arr.indexOf(state) > -1
}
},
exclude(){
return (state, arr) => {
return arr.indexOf(state) == -1
}
}
},
created() {
this.getTransportFromRoute()
......
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