Commit 84f45303 authored by dcy's avatar dcy

费用申请,申请调仓修改为弹窗

parent 3b15b096
......@@ -288,6 +288,13 @@ export function getCargoControlOrderPage(params){
params
})
}
export function getAdjustInfo(params){
return request({
url:'/order/order-warehouse-in/get-adjust-info',
method:'get',
params,
})
}
export function warehouseAdjustArrived(data){
return request({
url:'/order/order-warehouse-in/warehouse-adjust-arrived',
......
......@@ -308,30 +308,6 @@ export const constantRoutes = [
noCache:true,
}
},
{
path: 'batch-single-application',
component:(resolve)=> require(['@/views/ecw/order/batchSingleApplication'],resolve),
name: 'batchSingleApplication',
props: route => ({orderList:route.query.list}),
meta: {
title: '批量调仓申请',
icon:'',
activeMenu: '/order/batchSingleApplication',
noCache:true
}
},
{
path: 'fee-application/:orderId',
component:(resolve)=> require(['@/views/ecw/order/feeApplication'],resolve),
name: 'feeApplication',
props: true,
meta: {
title: '费用申请',
icon:'',
activeMenu: '/order/feeApplication'
}
},
{
path: 'mutex-order/:orderId',
component:()=> import('@/views/ecw/order/mutexOrder'),
......
<template>
<el-dialog
:visible.sync="dialogVisible"
width="80%"
:before-close="()=>{
$emit('update:dialogVisible',false)
}">
<div class="batch-single-application">
<h1 class="title">调仓申请</h1>
<el-table :data="list">
......@@ -36,14 +42,19 @@
<el-table-column label="出货渠道">
</el-table-column>
<!-- <el-table-column label="始发仓" prop="startWarehouseName"></el-table-column>-->
<!-- <el-table-column label="始发仓" prop="startWarehouseName"></el-table-column>-->
<el-table-column label="目的地" prop="objectiveName"></el-table-column>
<el-table-column label="发货人">
<template v-slot="{row}">
<div>
<div>
<p>
{{row.consignorName}}
</p>
<p>
</p>
</div>
</div>
</template>
</el-table-column>
<el-table-column label="收货人">
......@@ -58,10 +69,17 @@
</div>
</template>
</el-table-column>
<el-table-column>
<template v-slot="{row}">
<el-button type="text" v-if="row.inWarehouseState === 10">
取消审核
</el-button>
</template>
</el-table-column>
</el-table>
<div style="display: flex;justify-content:center; margin-top: 20px">
<div style="width: 200px; margin: 0 10px">
{{list[0].startWarehouseName}}
{{ list[0] && list[0].startWarehouseName ? list[0].startWarehouseName : '' }}
</div>
<div style="width: 200px;">
<el-select v-model="params.warehouseInId">
......@@ -78,10 +96,11 @@
</div>
<div style="text-align: center">
<el-button style="margin-right: 50px" @click="submit" :disabled="isSubmit">提交申请</el-button>
<el-button @click="$router.push('/order/order')">取消</el-button>
<el-button @click="$emit('update:dialogVisible',false)">取消</el-button>
</div>
<!-- <warehouseDetails></warehouseDetails>-->
<!-- <warehouseDetails></warehouseDetails>-->
</div>
</el-dialog>
</template>
<script>
......@@ -95,20 +114,30 @@ import {getProcessDefinitionBpmnXMLByKey} from "@/api/bpm/definition";
import warehouseDetails from "@/views/ecw/order/components/warehouseDetails";
import {getOrderPage} from "@/api/ecw/order";
import workFlow from "@/components/WorkFlow";
import Template from "@/views/cms/template";
export default {
name: "batchSingleApplication",
props:{
orderList:String,
orderList:[String,Number],
dialogVisible:{
type:Boolean,
default:false,
}
},
components:{
Template,
warehouseDetails,
workFlow
},
created() {
watch:{
dialogVisible(val){
if(val){
getOrderPage({orderIdList:this.orderList}).then(r =>{
this.list = r.data.list
warehouseAdjustmentList({id:this.list[0].startWarehouseId}).then( r => this.availableWarehouse = r.data)
})
}
}
},
computed:{
isSubmit(){
......@@ -146,6 +175,7 @@ export default {
this.params.orderNo = this.list[0].orderNo
orderWarehouseInAdjustApply(this.params).then( r=>{
if(r.code === 0){
this.$emit('update:dialogVisible',false)
this.$message.success('调仓成功');
}
})
......
<template>
<el-dialog :visible.sync="dialogVisible" width="80%" :before-close="()=>{
$emit('update:dialogVisible',false)
}">
<div class="fee-application">
<h1>费用申请-{{orderDetails.orderNo}}
</h1>
......@@ -63,6 +66,8 @@
<el-button>取消</el-button>
</div>
</div>
</el-dialog>
</template>
<script>
......@@ -75,6 +80,10 @@ export default {
components: {Template,workFlow},
props:{
orderId:[Number, String],
dialogVisible:{
type:Boolean,
default:false,
}
},
data(){
return {
......@@ -89,12 +98,6 @@ export default {
}
},
created() {
getOrder(this.orderId).then(r =>{
if(r.code === 0){
this.orderDetails = r.data
}
})
this.getOrderList()
this.getDictDatas(this.DICT_TYPE.AUDIT_STATUS).forEach( e =>{
this.STATUS[e.value] = e.label
})
......@@ -128,11 +131,10 @@ export default {
this.isModifyIf = false;
},
submit(){
if(this.isModifyIf){
applicationUpdate({...this.list[this.isModify.findIndex(e => e === false)],status:1}).then(r => {
if(r.code === 0){
this.getOrderList();
this.$emit('update:dialogVisible',false)
this.$message.success('修改成功');
}
})
......@@ -140,7 +142,7 @@ export default {
if(this.list[this.list.length - 1].status === 0){
feeApplicationCreate( {...this.list[this.list.length - 1],status:1,copyUserId:this.selectedUsers}).then(r=>{
if(r.code === 0){
this.getOrderList();
this.$emit('update:dialogVisible',false)
this.$message.success('添加成功');
this.selectedUsers = [];
}
......@@ -163,6 +165,18 @@ export default {
this.isModifyIf = true;
this.$set(this.isModify, this.list.findIndex(e => e.id = row.id), false )
},
},
watch:{
dialogVisible(val){
if(val){
this.getOrderList()
getOrder(this.orderId).then(r =>{
if(r.code === 0){
this.orderDetails = r.data
}
})
}
},
}
}
</script>
......
......@@ -100,7 +100,7 @@
v-hasPermi="['ecw:order:create']">新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="primary" plain icon="el-icon-setting" size="mini" @click="handleEdit" :disabled="multiple">批量调仓
<el-button type="primary" plain icon="el-icon-setting" size="mini" @click="handleEdit" :disabled="!batchWarehouseAdjustment">批量调仓
</el-button>
<el-button type="primary" plain icon="el-icon-setting" size="mini" @click="showBatchPickup=true">批量提货
</el-button>
......@@ -167,7 +167,7 @@
<el-button v-if="scope.row.status < 5" size="mini" type="text" icon="el-icon-delete" @click="oprateOrder(scope.row.orderId, 'cancelOrder')">取消订单</el-button>
<el-button v-if="scope.row.status == 88" size="mini" type="text" icon="el-icon-delete" @click="oprateOrder(scope.row.orderId, 'recoveryOrder')">恢复订单</el-button>
<el-button type="text" size="mini" @click="$router.push(`/order/fee-application/${scope.row.orderId}`)">费用申请</el-button>
<el-button type="text" size="mini" @click="feeApplicationBol = true; orderId = scope.row.orderId">费用申请</el-button>
<el-button type="text" size="mini" @click="orderId = scope.row.orderId;isShow = true" >特需</el-button>
<el-button type="text" size="mini" @click="$router.push(`/order/associated-order/${scope.row.orderId}`)" >关联</el-button>
<el-button type="text" size="mini" @click="$router.push(`/order/mutex-order/${scope.row.orderId}`)" >互斥</el-button>
......@@ -201,8 +201,8 @@
v-hasPermi="['ecw:order:update']">入仓</el-button>
<el-button size="mini" type="text" icon="el-icon-edit" @click="show = true;orderId = scope.row.orderId; "
v-hasPermi="['ecw:order:update']">退仓</el-button>
<el-button type="text" v-if="scope.row.status === 5" size="mini" @click="$router.push({path:'/order/batch-single-application',query:{list:scope.row.orderId}})" >调仓</el-button>
<el-button type="text" size="mini" @click="$router.push({path:'/order/transfer-warehousing/' + scope.row.orderId + '/' + 1 })" >调拨出仓</el-button>
<el-button type="text" v-if="scope.row.status === 5 && [11,13,18].indexOf(scope.row.inWarehouseState) > -1" size="mini" @click="orderId = scope.row.orderId;warehouseBol=true;">调仓</el-button>
<el-button type="text" v-if="scope.row.status === 5 && scope.row.inWarehouseState === 13" size="mini" @click="$router.push({path:'/order/transfer-warehousing/' + scope.row.orderId + '/' + 1 })" >调拨出仓</el-button>
<el-button type="text" size="mini" @click="$router.push({path:'/order/transfer-to-warehouse/' + scope.row.orderId + '/' + 2 })" >调拨到仓</el-button>
</div>
......@@ -239,6 +239,8 @@
<print-lading-bill v-if="printLadingBillInfo !== null" v-bind="printLadingBillInfo" @close="printLadingBillInfo=null" />
<batch-pickup v-if="showBatchPickup" @close="showBatchPickup=false"/>
<withdrawal v-if="show" :dialog-visible="show" :orderId="orderId" ></withdrawal>
<batch-single-application :order-list="orderId" :dialog-visible.sync="warehouseBol"></batch-single-application>
<fee-application :order-id="orderId" :dialog-visible.sync="feeApplicationBol"></fee-application>
</div>
</template>
......@@ -267,9 +269,13 @@ import PrintWarehouseReceipt from './components/PrintWarehouseReceipt'
import PrintLadingBill from './components/PrintLadingBill'
import BatchPickup from './components/BatchPickup'
import withdrawal from "@/views/ecw/order/withdrawal";
import BatchSingleApplication from "@/views/ecw/order/batchSingleApplication";
import FeeApplication from "@/views/ecw/order/feeApplication";
export default {
name: "Order",
components: {
FeeApplication,
BatchSingleApplication,
CustomerSelector, ProductSelector, Selector,specialNeeds,PrintTag, PrintWarehouseReceipt, PrintLadingBill, BatchPickup,withdrawal
},
props: {
......@@ -351,7 +357,9 @@ export default {
getDictDatas */
adjustmentList:[],
show:false,
warehouseBol:false,//调仓申请
feeApplicationBol:false,//费用申请
multipleSelection:[]
};
},
computed: {
......@@ -368,7 +376,11 @@ export default {
timeParams['end' + this.dateFilterType] = this.dateFilter[1]
}
return Object.assign({}, this.queryParams, timeParams)
}
},
batchWarehouseAdjustment(){
return this.multipleSelection.length > 0 && this.multipleSelection.every(e => e.status === 5)
},
},
created() {
this.getList();
......@@ -456,15 +468,14 @@ export default {
},
// 表格多选
handleSelectionChange(selection) {
this.multipleSelection = selection
this.ids = selection.map(item => item.orderId)
this.single = selection.length !== 1
this.multiple = !selection.length
},
handleEdit() {
this.$router.push({
path:'/order/batch-single-application',
query:{list:this.ids.join(',')}
})
this.warehouseBol = true
this.orderId = this.ids.join(',')
},
moleculeChange() { },
denominatorChange() { },
......
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