Commit 60300fd5 authored by zhoutong's avatar zhoutong

空运-出货-到港增加多次到港 / 到港-多次到港选择订单

parent 2fd54c8f
......@@ -7,7 +7,7 @@
<el-radio :label="1">{{ $t('多次到港') }}</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item :label="$t('选择订单')" prop="arriveOrderIdList" v-show="airArrivalInfo.arriveType == 1">
<!-- <el-form-item :label="$t('选择订单')" prop="arriveOrderIdList" v-show="airArrivalInfo.arriveType == 1">
<el-select
v-model="airArrivalInfo.arriveOrderIdList"
multiple
......@@ -25,6 +25,18 @@
:value="item.orderId">
</el-option>
</el-select>
</el-form-item> -->
<el-form-item
:label="$t('选择订单')"
prop="arriveOrderIdList"
v-show="airArrivalInfo.arriveType == 1"
>
<span v-for="order in selectOrders" :key="order.id"
>{{ order.orderNo }}
</span>
<el-button type="primary" @click="orderdialogVisible = true">{{
$t("订单列表")
}}</el-button>
</el-form-item>
<el-form-item :label="$t('已到港订单')" v-show="airArrivalInfo.arriveType == 1">
<span v-for="order in airArrivalInfo.arrivalOrderList" :key="order.id">{{order.orderNo}} </span>
......@@ -59,6 +71,78 @@
<el-dialog custom-class="shipping-dialog" :title="$t('票异常')" :visible.sync="dialogVisible" width="700px" :modal-append-to-body=false append-to-body destroy-on-close>
<regError @closeDialog="regCloseDialog" v-bind="$attrs" />
</el-dialog>
<!-- 订单列表 -->
<el-dialog
:fullscreen="true"
:title="$t('选择订单')"
:visible.sync="orderdialogVisible"
:modal-append-to-body="false"
append-to-body
destroy-on-close
>
<el-row :gutter="10">
<el-col :span="7">
{{ $t("关键字:") }}
<el-input
style="width: 300px"
v-model="orderKeyword"
:placeholder="$t('请输入订单号、提单号、唛头')"
/>
</el-col>
<el-col :span="7">
{{ $t("到港状态") }}
<el-select v-model="orderPortStatus">
<el-option :value="0" :label="$t('未到港')" />
<el-option :value="1" :label="$t('已到港')" />
</el-select>
</el-col>
<el-col :span="7">
{{ $t("清关状态") }}
<el-select v-model="orderCustomsClearanceStatus">
<el-option :value="0" :label="$t('未清关')" />
<el-option :value="1" :label="$t('已清关')" />
</el-select>
</el-col>
<el-col :span="3">
<el-button type="primary" @click="searchOrderList">
{{ $t("查询") }}</el-button
>
</el-col>
</el-row>
<div style="margin-top: 10px">
<el-button type="primary" @click="multipleSelect">
{{ $t("批量选择") }}
</el-button>
</div>
<el-table
style="margin-top: 10px"
:data="statusOrderList"
@selection-change="handleSelectionChange"
>
<el-table-column type="selection" width="55"> </el-table-column>
<el-table-column :label="$t('序号')" type="index" width="50">
</el-table-column>
<el-table-column :label="$t('订单号')" prop="orderNo" />
<el-table-column :label="$t('唛头')" prop="marks" />
<el-table-column :label="$t('提单号')" prop="tidanNo" />
<el-table-column width="150" :label="$t('总箱数/入仓箱数')" prop="" />
<el-table-column :label="$t('体积/重量')" prop="" />
<el-table-column :label="$t('清关状态')" prop="clear" />
<el-table-column :label="$t('到港状态')" prop="arrival" />
<el-table-column :label="$t('控货')" prop="" />
<el-table-column :label="$t('订单状态')" prop="" />
<el-table-column :label="$t('操作')">
<template slot-scope="scope">
<el-button
size="mini"
type="primary"
@click="selectOrder(scope.row)"
>{{ $t("选择") }}</el-button
>
</template>
</el-table-column>
</el-table>
</el-dialog>
</div>
</template>
......@@ -113,7 +197,13 @@ export default {
dtRealHeadTimeFlag: false,
orderList: [],
orderListFilter: [],
arrivalOrderList: []
arrivalOrderList: [],
orderdialogVisible: false,
selectOrders: [],
multipleSelectOrder: [],
orderKeyword: null,
orderPortStatus: null,
orderCustomsClearanceStatus: null,
};
},
created() {
......@@ -199,6 +289,32 @@ export default {
this.orderListFilter = this.orderList
}
},
searchOrderList() {
if (this.orderKeyword && this.orderKeyword != "") {
this.statusOrderList = this.statusOrderList.filter((item) => {
return (
(item.orderNo && item.orderNo.indexOf(this.orderKeyword) > -1) ||
(item.tidanNo && item.tidanNo.indexOf(this.orderKeyword) > -1) ||
(item.marks && item.marks.indexOf(this.orderKeyword) > -1)
);
});
}
if (this.orderPortStatus != null) {
this.statusOrderList = this.statusOrderList.filter((item) => {
return item.arrivalValue == this.orderPortStatus;
});
}
if (this.orderCustomsClearanceStatus != null) {
console.log(
this.statusOrderList,
"333",
this.orderCustomsClearanceStatus
);
this.statusOrderList = this.statusOrderList.filter((item) => {
return item.clearValue == this.orderCustomsClearanceStatus;
});
}
},
selectOrderId(val) {
if (val.length == 1) {
let arr = this.arrivalOrderList.find((item) => item.orderId == val[0])
......@@ -213,6 +329,57 @@ export default {
this.$set(this.airArrivalInfo, 'actTime', null)
}
},
selectOrder(val) {
this.selectOrders = [];
this.selectOrders.push(val);
let arr = this.arrivalOrderList.find(
(item) => item.orderId == val.orderId
);
if (arr) {
this.$set(
this.airArrivalInfo,
"actSecondTime",
formatDate(arr.actSecondTime)
);
this.$set(this.airArrivalInfo, "estTime", formatDate(arr.estTime));
this.$set(this.airArrivalInfo, "actTime", formatDate(arr.actTime));
}
this.orderdialogVisible = false;
this.airArrivalInfo.arriveOrderIdList.push(val.orderId)
},
handleSelectionChange(val) {
this.multipleSelectOrder = val;
},
// 批量选择
multipleSelect() {
if (this.multipleSelectOrder.length == 0) {
this.$message.error(this.$t("请先选择订单"));
return;
}
this.selectOrders = [];
this.selectOrders = this.multipleSelectOrder;
if (this.multipleSelectOrder.length == 1) {
let arr = this.arrivalOrderList.find(
(item) => item.orderId == this.multipleSelectOrder[0].orderId
);
if (arr) {
this.$set(
this.airArrivalInfo,
"actSecondTime",
formatDate(arr.actSecondTime)
);
this.$set(this.airArrivalInfo, "estTime", formatDate(arr.estTime));
this.$set(this.airArrivalInfo, "actTime", formatDate(arr.actTime));
}
} else {
this.$set(this.airArrivalInfo, "actSecondTime", null);
this.$set(this.airArrivalInfo, "estTime", null);
this.$set(this.airArrivalInfo, "actTime", null);
}
this.orderdialogVisible = false;
this.airArrivalInfo.arriveOrderIdList = this.multipleSelectOrder.map(item=>item.orderId)
},
regCloseDialog(type) {
this.dialogVisible = false;
if (type === "error") {
......
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