zhengquan.bai

出口订单和运单详情页页面开发,列表跳转和返回逻辑

...@@ -28,3 +28,11 @@ export function getAllExportingBills(data) { ...@@ -28,3 +28,11 @@ export function getAllExportingBills(data) {
28 data 28 data
29 }) 29 })
30 } 30 }
31 +
32 +export function getAllTransportBills(data) {
33 + return request({
34 + url: '/bus-customer/exportWaybill/search',
35 + method: 'post',
36 + data
37 + })
38 +}
......
1 +<template>
2 +<div>
3 + <el-table :data="tableData" style="width: 100%" border height="220px">
4 + <el-table-column prop="index" label="序号" width="80"></el-table-column>
5 + <el-table-column prop="productNumber" label="企业商品编号" width="150"></el-table-column>
6 + <el-table-column prop="productName" label="商品企业商品名称" width="180"></el-table-column>
7 + <el-table-column prop="description" label="企业商品描述" width="150"></el-table-column>
8 + <el-table-column prop="code" label="条码" width="150"></el-table-column>
9 + <el-table-column prop="unit" label="计量单位" width="100">
10 + <template slot-scope="scope">
11 + <span>{{ scope.row.unit }}</span>
12 + <i class="el-icon-top" style="margin-left: 5px;"></i>
13 + </template>
14 + </el-table-column>
15 + <el-table-column prop="currency" label="币制" width="80"></el-table-column>
16 + <el-table-column prop="quantity" label="数量" width="80"></el-table-column>
17 + <el-table-column prop="unitPrice" label="单价" width="100"></el-table-column>
18 + <el-table-column prop="totalPrice" label="总价" width="100"></el-table-column>
19 + <el-table-column prop="notes" label="备注" width="300"></el-table-column>
20 + <el-table-column label="操作" width="100" fixed="right">
21 + <template slot-scope="scope">
22 + <el-link type="primary" @click="handleExpand(scope.$index)">展开</el-link>
23 + </template>
24 + </el-table-column>
25 + </el-table>
26 +</div>
27 +</template>
28 +
29 +<script>
30 +export default {
31 + name: "ProductDetailTable",
32 + data() {
33 + return {
34 + tableData: [
35 + {
36 + index: 1,
37 + productNumber: "6704200000",
38 + productName: "真人发发夹",
39 + description: "测试内容",
40 + code: "485607096",
41 + unit: "↑",
42 + currency: "美元",
43 + quantity: 1,
44 + unitPrice: "645.78",
45 + totalPrice: "645.78",
46 + notes: "山东电子口岸已写,加签后上传"
47 + },
48 + {
49 + index: 2,
50 + productNumber: "6704200000",
51 + productName: "真人发发夹",
52 + description: "测试内容",
53 + code: "2145860720",
54 + unit: "↑",
55 + currency: "美元",
56 + quantity: 2,
57 + unitPrice: "645.78",
58 + totalPrice: "645.78",
59 + notes: "山东电子口岸已写,加签后上传"
60 + },
61 + {
62 + index: 3,
63 + productNumber: "6704200000",
64 + productName: "真人发发夹",
65 + description: "测试内容",
66 + code: "2145860720",
67 + unit: "↑",
68 + currency: "美元",
69 + quantity: 3,
70 + unitPrice: "645.78",
71 + totalPrice: "645.78",
72 + notes: "山东电子口岸已写,加签后上传"
73 + },
74 + {
75 + index: 4,
76 + productNumber: "6704200000",
77 + productName: "真人发发夹",
78 + description: "测试内容",
79 + code: "2145860720",
80 + unit: "↑",
81 + currency: "美元",
82 + quantity: 1,
83 + unitPrice: "635.78",
84 + totalPrice: "635.78",
85 + notes: "山东电子口岸已写,加签后上传"
86 + }
87 + // 更多数据项...
88 + ]
89 + };
90 + },
91 + methods: {
92 + handleExpand(index) {
93 + console.log(`展开第 ${index + 1} 行数据`);
94 + }
95 + }
96 +}
97 +</script>
98 +
99 +<style scoped lang="scss">
100 +.el-table {
101 + font-size: 14px;
102 + //border: 1px solid red;
103 + //height: 180px;
104 + overflow: auto;
105 +}
106 +.el-icon-top {
107 + color: #409eff;
108 + font-size: 12px;
109 +}
110 +</style>
1 +<template>
2 + <div>
3 + <table class="custom-table">
4 + <thead>
5 + <tr>
6 + <th v-for="(header, index) in headers" :key="index">{{ header }}</th>
7 + </tr>
8 + </thead>
9 + <tbody>
10 + <tr v-for="(row, index) in tableData" :key="index">
11 + <td>{{ row.status }}</td>
12 + <td>{{ row.time }}</td>
13 + <td>{{ row.description }}</td>
14 + </tr>
15 + </tbody>
16 + </table>
17 + </div>
18 +</template>
19 +
20 +<script>
21 +export default {
22 + name: "ReceiptInfoTable",
23 + data() {
24 + return {
25 + headers: ["回执状态", "状态时间", "回执描述"],
26 + tableData: [
27 + {
28 + status: "山东电子口岸已上传",
29 + time: "2024-11-08 15:31:58",
30 + description: "订单变更申请报关单【f291cda6-f664-4bf5-8edc-bcc012f8775】单证不存在,不可报单申报,报文业务主键【24HX-11-40-3722960DYB】"
31 + },
32 + {
33 + status: "山东电子口岸已上传",
34 + time: "2024-11-08 15:31:58",
35 + description: "山东电子口岸已上传"
36 + },
37 + {
38 + status: "山东电子口岸已保存",
39 + time: "2024-11-08 15:30:45",
40 + description: "山东电子口岸已保存,加签后上传"
41 + }
42 + ]
43 + };
44 + }
45 +};
46 +</script>
47 +
48 +<style scoped lang="scss">
49 +.custom-table {
50 + width: 100%;
51 + border-collapse: collapse;
52 + font-size: 14px;
53 + table-layout: fixed;
54 + background-color: white;
55 +}
56 +
57 +.custom-table th, .custom-table td {
58 + border: 1px solid #ccc;
59 + padding: 8px 12px;
60 + text-align: left;
61 + word-wrap: break-word;
62 +}
63 +
64 +.custom-table thead {
65 + background-color: #f5f5f5;
66 +}
67 +
68 +.custom-table th {
69 + font-weight: bold;
70 +}
71 +
72 +.custom-table tr:nth-child(odd) {
73 + //background-color: #fafafa;
74 +}
75 +</style>
...@@ -105,10 +105,22 @@ export const constantRoutes = [ ...@@ -105,10 +105,22 @@ export const constantRoutes = [
105 { 105 {
106 path: '/exportBillDetail', 106 path: '/exportBillDetail',
107 component: (resolve) => require(['@/views/exportBillDetail/index'], resolve), 107 component: (resolve) => require(['@/views/exportBillDetail/index'], resolve),
108 - hidden: false, 108 + hidden: true,
109 meta: { title: '出口订单详情', icon: 'api' }, 109 meta: { title: '出口订单详情', icon: 'api' },
110 }, 110 },
111 { 111 {
112 + path: '/exportTransportDetail',
113 + component: (resolve) => require(['@/views/exportTransportDetail/index'], resolve),
114 + hidden: true,
115 + meta: { title: '出口运单详情', icon: 'api' },
116 + },
117 + {
118 + path: '/exportTransportBillQuery',
119 + component: (resolve) => require(['@/views/exportTransportBillQuery/index'], resolve),
120 + hidden: false,
121 + meta: { title: '出口运单查询', icon: 'api' },
122 + },
123 + {
112 path: 'index', 124 path: 'index',
113 component: (resolve) => require(['@/views/index'], resolve), 125 component: (resolve) => require(['@/views/index'], resolve),
114 name: '首页', 126 name: '首页',
......
This diff is collapsed. Click to expand it.
...@@ -166,6 +166,7 @@ ...@@ -166,6 +166,7 @@
166 :totalCount="total" 166 :totalCount="total"
167 @sizeChange="sizeChange" 167 @sizeChange="sizeChange"
168 @currentChange="currentChange" 168 @currentChange="currentChange"
169 + @rowClick="handleRowClick"
169 :selection="true" 170 :selection="true"
170 :selectFixed="false" 171 :selectFixed="false"
171 @tableSelect="tableSelect" 172 @tableSelect="tableSelect"
...@@ -177,7 +178,6 @@ ...@@ -177,7 +178,6 @@
177 <span>{{ `${scope.row.waveName}(${scope.row.waveExt2})` }}</span> 178 <span>{{ `${scope.row.waveName}(${scope.row.waveExt2})` }}</span>
178 </template> 179 </template>
179 </Table> 180 </Table>
180 -
181 </div> 181 </div>
182 </template> 182 </template>
183 183
...@@ -311,6 +311,15 @@ export default { ...@@ -311,6 +311,15 @@ export default {
311 input() { 311 input() {
312 this.$forceUpdate(); 312 this.$forceUpdate();
313 }, 313 },
314 + handleRowClick(row) {
315 + const declareId = row.declareId;
316 + this.$router.push({
317 + path: '/exportBillDetail',
318 + query: {
319 + declareId
320 + }
321 + });
322 + },
314 async search(val) { 323 async search(val) {
315 try { 324 try {
316 325
......
1 +<template>
2 + <div>
3 + <el-form
4 + class="fedexFormStyle fedexformSreach fedexformSreachBottomBorder"
5 + ref="sreachForm"
6 + :model="searchForm"
7 + label-position="top"
8 + size="small"
9 + >
10 + <el-row class="row-border">
11 + <el-col :span="5">
12 + <Formitem label="运单编号" prop="consignmentCode">
13 + <el-popover
14 + placement="bottom"
15 + width="320"
16 + trigger="manual"
17 + popper-class="popoverconsignmentCode"
18 + v-model="textareaVisible.formItemconsignmentCode"
19 + >
20 + <el-input
21 + name="consignmentCode-textarea"
22 + type="textarea"
23 + :rows="5"
24 + id="popoverInputconsignmentCode"
25 + class="inputShadow textareaPopover"
26 + v-model="searchForm.consignmentCode"
27 + resize="none"
28 + maxlength="13000"
29 + placeholder=""
30 + @blur="textareaBlur"
31 + @input="input"
32 + ></el-input>
33 + <el-input
34 + slot="reference"
35 + name="consignmentCode"
36 + type="textarea"
37 + :rows="1"
38 + class="inputShadow"
39 + id="inputInner--consignmentCode"
40 + v-model="searchForm.consignmentCode"
41 + resize="none"
42 + placeholder=""
43 + @focus="textareaFocus"
44 + @input="input"
45 + ></el-input>
46 + </el-popover>
47 + </Formitem>
48 + </el-col>
49 + <el-col :span="4">
50 + <Formitem label="物流企业代码" prop="factoryCode">
51 + <el-select
52 + type="text"
53 + id="inputInner--declaredPort"
54 + v-model="searchForm.declaredPort"
55 + clearable
56 + placeholder=""
57 + @change="portChange"
58 + >
59 + <el-option
60 + v-for="(item, index) in dictData.userport"
61 + :key="index"
62 + :label="item.name"
63 + :value="item.name"
64 + ></el-option>
65 + </el-select>
66 + </Formitem>
67 + </el-col>
68 + <el-col :span="5">
69 + <Formitem label="回执状态" prop="declaredPort">
70 + <el-select
71 + type="text"
72 + id="inputInner--receiptStatus"
73 + v-model="searchForm.receiptStatus"
74 + clearable
75 + placeholder=""
76 + >
77 + <el-option
78 + v-for="(item, index) in dictData.userport"
79 + :key="index"
80 + :label="item.name"
81 + :value="item.name"
82 + ></el-option>
83 + </el-select>
84 + </Formitem>
85 + </el-col>
86 + <el-col :span="4">
87 + <Formitem label="创建时间" prop="receiptTime">
88 + <el-date-picker
89 + class="inputInner--accsDataImportTime"
90 + id="inputInner--accsDataImportTime"
91 + v-model="searchForm.accsDataImportTime"
92 + type="daterange"
93 + format="yyyy-MM-dd"
94 + prefix-icon="none"
95 + value-format="yyyyMMdd"
96 + range-separator="至"
97 + start-placeholder=""
98 + clearable
99 + end-placeholder=""
100 + :picker-options="importTimePickerOptions"
101 + @blur="datePickerBlur"
102 + @change="accsDataImportTimeChange"
103 + >
104 + </el-date-picker>
105 + </Formitem>
106 + </el-col>
107 +
108 + <el-col :span="2">
109 + <el-form-item class="textCenter">
110 + <el-button
111 + class="entrySreachButton"
112 + type="text"
113 + icon="el-icon-search"
114 + :loading="loadings.searchLoading"
115 + @click="search(0)"
116 + ></el-button>
117 + </el-form-item>
118 + </el-col>
119 +
120 + <el-col :span="4">
121 + <el-form-item class="textCenter">
122 + <el-button
123 + icon="el-icon-refresh"
124 + size="small"
125 + :loading="loadings.searchLoading"
126 + @click="search(0)"
127 + >重置
128 + </el-button>
129 + </el-form-item>
130 + </el-col>
131 + </el-row>
132 + </el-form>
133 +
134 + <div style="text-align: right; margin: 10px">
135 + <el-button
136 + size="small"
137 + :loading="loadings.downloadLoading2"
138 + @click="downloadBpiData('log')"
139 + >
140 + <svg-icon class="el-icon-user-solid" icon-class="fedexUpBlue"></svg-icon>
141 + 导出
142 + </el-button>
143 + </div>
144 +
145 + <Table
146 + class="fedexDetialTable fedexSreachTable"
147 + ref="entryTable"
148 + :data="tableData"
149 + :headerData="headerData"
150 + :maxHeight="tableMaxheight"
151 + :border="true"
152 + :pagination="true"
153 + :order="false"
154 + :loading="loadings.sreachLoading"
155 + :page="page.pageIndex"
156 + :pageSizes="[20, 30, 50, 100]"
157 + :totalCount="total"
158 + @sizeChange="sizeChange"
159 + @currentChange="currentChange"
160 + :selection="true"
161 + :selectFixed="false"
162 + @rowClick="handleRowClick"
163 + @tableSelect="tableSelect"
164 + @tableSelectAll="tableSelectAll"
165 + :rowSelectDataType="false"
166 + :selected="selected"
167 + >
168 + <template v-slot:waveName="scope">
169 + <span>{{ `${scope.row.waveName}(${scope.row.waveExt2})` }}</span>
170 + </template>
171 + </Table>
172 + </div>
173 +</template>
174 +
175 +<script>
176 +import {getAllExportingBills, getAllTransportBills} from "@/api/query/query";
177 +
178 +export default {
179 + name: "index",
180 + data() {
181 + return {
182 + searchForm: {
183 + declaredPort: "",
184 + consStatus: "",
185 + consignmentCode: "",
186 + accsDataImportTime: [],
187 + ownerName: "",
188 + consignmentHeadCode: "",
189 + isPushCustomsSys: "",
190 + waitOperStatus: "",
191 + declTime: [],
192 + },
193 + loadings: {
194 + searchLoading: false,
195 + },
196 + page: {
197 + pageIndex: 1,
198 + pageSize: 20,
199 + },
200 + textareaVisible: {
201 + formItemconsignmentCode: false,
202 + formItemconsignmentHeadCode: false,
203 + },
204 + sizeChange(val) {
205 + this.page.pageSize = val;
206 + this.sreach(1);
207 + },
208 + //分页
209 + currentChange(val) {
210 + this.page.pageIndex = val.page;
211 + this.search(1);
212 + },
213 + tableData: [],
214 + total: 0,
215 + tableMaxheight: null,
216 + headerData: [
217 + {
218 + name: "回执状态",
219 + value: "returnStatus",
220 + width: "150",
221 + align: "left",
222 + },
223 + {
224 + name: "运单编号",
225 + value: "orderNo",
226 + width: '150',
227 + align: 'left'
228 + },
229 + {
230 + name: '物流企业代码',
231 + value: 'orderType',
232 + width: '150',
233 + align: 'left'
234 + },
235 + {
236 + name: '物流企业名称',
237 + value: 'ebccode',
238 + width: '200',
239 + align: 'left'
240 + },
241 + {
242 + name: '主要货物信息',
243 + value: 'ebcname',
244 + width: '200',
245 + align: 'left'
246 + },
247 + {
248 + name: '创建时间',
249 + value: 'createTime',
250 + width: '150',
251 + align: 'left'
252 + },
253 + {
254 + name: '申报企业',
255 + value: 'declaringEnterprise',
256 + width: '200',
257 + align: 'left'
258 + },
259 + {
260 + name: '申报类型',
261 + value: 'declaringType',
262 + width: '100',
263 + align: 'left'
264 + }
265 + ],
266 + dictData: {
267 + userport: [
268 + {name: "Shanghai Port", code: "SH"},
269 + {name: "Beijing Port", code: "BJ"},
270 + {name: "Guangzhou Port", code: "GZ"},
271 + {name: "Shenzhen Port", code: "SZ"},
272 + {name: "Tianjin Port", code: "TJ"},
273 + ],
274 + },
275 + }
276 + },
277 + created() {
278 + getAllTransportBills({
279 + pageIndex: 1,
280 + pageSize: 20
281 + }).then((res) => {
282 + console.log('res', res)
283 + this.tableData = res.data.value;
284 + this.total = res.data.totalItems;
285 + debugger;
286 + })
287 + },
288 + methods: {
289 + tableSelect(val) {
290 + this.selected = val.selection;
291 + },
292 + tableSelectAll(val) {
293 + this.selected = val;
294 + },
295 + handleRowClick(row) {
296 + const declareId = row.declareId;
297 + this.$router.push({
298 + path: '/exportTransportDetail',
299 + query: {
300 + declareId
301 + }
302 + });
303 + },
304 + async search(val) {
305 + try {
306 +
307 + } catch (error) {
308 + console.error("搜索出错:", error);
309 + } finally {
310 + // 无论成功还是失败,关闭加载状态
311 + this.loadings.sreachLoading = false;
312 + }
313 + },
314 + }
315 +}
316 +</script>
317 +
318 +<style scoped lang="scss">
319 +@import "@/assets/styles/variables.scss";
320 +
321 +.entrySreachButton {
322 + display: inline-block;
323 + font-size: 20px;
324 + color: $fedexButton !important;
325 +}
326 +</style>
This diff is collapsed. Click to expand it.