| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221 |
- <template>
- <div class="pageBack">
- <div class="gradient-background">
- <el-form ref="query" :model="query" label-width="90px">
- <el-row>
- <el-col :span="8">
- <el-form-item label="Release Ref">
- <el-input class="rounded-input" v-model="query.containerNumber" clearable></el-input>
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item label="Container">
- <el-input class="rounded-input" v-model="query.code" clearable></el-input>
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <div style="display: flex;justify-content: flex-end;">
- <el-button type="primary" round @click="search">Search</el-button>
- <el-button type="success" round @click="openReport">Download</el-button>
- <el-button v-if="roleName.includes('admin')" type="danger" round @click="designReport">Design Report</el-button>
- </div>
- </el-col>
- </el-row>
- </el-form>
- </div>
- <div style="padding: 20px;">
- <el-form ref="form" :model="form" label-width="90px">
- <el-row>
- <el-col :span="8">
- <el-form-item label="Type/Quantity">
- <el-input class="rounded-input" v-model="form.boxTypeQuantityOne" readonly></el-input>
- </el-form-item>
- </el-col>
- <el-col :span="4">
- <el-form-item label="Picked-up">
- <el-input class="rounded-input" v-model="form.suitcaseNum" readonly></el-input>
- </el-form-item>
- </el-col>
- <el-col :span="4">
- <el-form-item label="Await">
- <el-input class="rounded-input" v-model="form.notSuitcaseNum" readonly></el-input>
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item label="Condition">
- <el-input class="rounded-input" v-model="form.boxCondition" readonly></el-input>
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <el-col :span="8">
- <el-form-item label="POL">
- <el-input class="rounded-input" v-model="form.polCname" readonly></el-input>
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item label="POD">
- <el-input class="rounded-input" v-model="form.podCname" readonly></el-input>
- </el-form-item>
- </el-col>
- </el-row>
- </el-form>
- </div>
- <div style="padding:0 20px 20px 20px;">
- <avue-crud class="diy_table" :option="option" :data="form.tradingBoxItemsList"> </avue-crud>
- </div>
- <report ref="report" :id="form.id" businessValue="OW-N" classifyCode="动态查询"></report>
- <reports :id="form.id" :assemblyForm="form" businessValue="OW-N" ref="reports"></reports>
- </div>
- </template>
- <script>
- import { containerDynamicInquiry } from "@/api/iosBasicData/boxDynamic.js";
- import report from "./components/report.vue";
- import reports from "@/components/boxManagement/reports.vue";
- export default {
- name: "箱动态查询",
- components: { report,reports },
- data() {
- return {
- roleName: localStorage.getItem("roleName"),
- query: {},
- form: {
- tradingBoxItemsList: []
- },
- option: {
- header: false,
- menu: false,
- align: "center",
- headerAlign: "center",
- border: true,
- index: true,
- indexLabel: "Serial",
- indexWidth: 60,
- stripe: true,
- emptyText: "No Data",
- maxHeight: 600,
- column: [
- {
- label: "Container",
- prop: "code",
- overHidden: true
- },
- {
- label: "Type",
- prop: "boxType",
- overHidden: true
- },
- {
- label: "POL Depot",
- prop: "polCyCname",
- overHidden: true
- },
- {
- label: "Gate Out",
- prop: "polPreAppearanceDate",
- overHidden: true
- },
- {
- label: "ETD",
- prop: "etd",
- overHidden: true
- },
- {
- label: "ATD",
- prop: "actualEtd",
- type: "date",
- format: "yyyy-MM-dd",
- valueFormat: "yyyy-MM-dd HH:mm:ss",
- overHidden: true
- },
- {
- label: "ETA",
- prop: "eta",
- overHidden: true
- },
- {
- label: "ATA",
- prop: "actualEta",
- overHidden: true
- },
- {
- label: "Gatein",
- prop: "podEmptyContainerReturnDate",
- overHidden: true
- },
- {
- label: "POD Depot",
- prop: "podStationCname",
- overHidden: true
- },
- {
- label: "Days In Use",
- prop: "podBoxUseDays",
- overHidden: true
- }
- ]
- }
- };
- },
- created() {},
- methods: {
- openReport() {
- if (!this.form.id) {
- return this.$message.error("未查询数据,不允许打开报表!");
- }
- this.$refs.report.openDialog();
- },
- designReport() {
- if (!this.form.id) {
- return this.$message.error("未查询数据,不允许打开设计报表!");
- }
- this.$refs.reports.openDialog();
- },
- search() {
- if (!this.query.containerNumber) {
- return this.$message.error("Please enter Release Ref!");
- }
- const loading = this.$loading({
- lock: true,
- text: "loading",
- spinner: "el-icon-loading",
- background: "rgba(255,255,255,0.7)"
- });
- containerDynamicInquiry(this.query)
- .then(res => {
- this.form = res.data.data;
- })
- .finally(() => {
- loading.close();
- });
- }
- }
- };
- </script>
- <style lang="scss" scoped>
- .pageBack {
- background-color: #ffffff;
- width: 100%;
- height: 100%;
- }
- .gradient-background {
- /* 背景渐变效果,从右上角到左下角 */
- background: linear-gradient(to bottom left, #a1d1fe, #ffffff);
- padding: 42px 20px 20px 20px;
- }
- .rounded-input ::v-deep .el-input__inner {
- border-radius: 20px !important; /* 使用 !important 确保覆盖默认样式 */
- }
- .el-form ::v-deep .el-form-item__label {
- font-weight: 700;
- font-size: 20px;
- color: #606266;
- }
- .avue-crud ::v-deep .el-table th {
- color: #ffffff;
- background-color: #001e63;
- }
- </style>
|