Showing
7 changed files
with
183 additions
and
17 deletions
| ... | @@ -36,3 +36,12 @@ export function getAllTransportBills(data) { | ... | @@ -36,3 +36,12 @@ export function getAllTransportBills(data) { |
| 36 | data | 36 | data |
| 37 | }) | 37 | }) |
| 38 | } | 38 | } |
| 39 | + | ||
| 40 | +export function getAllListBills(data) { | ||
| 41 | + return request({ | ||
| 42 | + url: '/bus-customer/exportList/search', | ||
| 43 | + method: 'post', | ||
| 44 | + data | ||
| 45 | + }) | ||
| 46 | +} | ||
| 47 | + | ... | ... |
src/components/PopoverTextarea/index.vue
0 → 100644
| 1 | +<template> | ||
| 2 | + <el-popover | ||
| 3 | + placement="bottom" | ||
| 4 | + width="320" | ||
| 5 | + trigger="manual" | ||
| 6 | + :popper-class="popperClass" | ||
| 7 | + v-model="isPopoverVisible" | ||
| 8 | + > | ||
| 9 | + <!-- 弹出文本域 --> | ||
| 10 | + <el-input | ||
| 11 | + ref="popoverInput" | ||
| 12 | + type="textarea" | ||
| 13 | + :rows="5" | ||
| 14 | + v-model="localValue" | ||
| 15 | + class="textarea-popover" | ||
| 16 | + resize="none" | ||
| 17 | + :maxlength="maxlength" | ||
| 18 | + @blur="handleBlur" | ||
| 19 | + ></el-input> | ||
| 20 | + | ||
| 21 | + <!-- 主输入框 --> | ||
| 22 | + <el-input | ||
| 23 | + slot="reference" | ||
| 24 | + ref="referenceInput" | ||
| 25 | + type="textarea" | ||
| 26 | + :rows="1" | ||
| 27 | + class="input-shadow" | ||
| 28 | + v-model="localValue" | ||
| 29 | + resize="none" | ||
| 30 | + @focus="handleFocus" | ||
| 31 | + ></el-input> | ||
| 32 | + </el-popover> | ||
| 33 | +</template> | ||
| 34 | + | ||
| 35 | +<script> | ||
| 36 | +export default { | ||
| 37 | + name: "PopoverTextarea", | ||
| 38 | + props: { | ||
| 39 | + value: { | ||
| 40 | + type: String, | ||
| 41 | + default: "", | ||
| 42 | + }, | ||
| 43 | + maxlength: { | ||
| 44 | + type: Number, | ||
| 45 | + default: 13000, | ||
| 46 | + }, | ||
| 47 | + maxEntries: { | ||
| 48 | + type: Number, | ||
| 49 | + default: 1000, // 最大条目数 | ||
| 50 | + }, | ||
| 51 | + popperClass: { | ||
| 52 | + type: String, | ||
| 53 | + default: "popover-input-class", | ||
| 54 | + }, | ||
| 55 | + }, | ||
| 56 | + data() { | ||
| 57 | + return { | ||
| 58 | + isPopoverVisible: false, // 控制 popover 显示 | ||
| 59 | + localValue: this.value, // 输入框内容 | ||
| 60 | + }; | ||
| 61 | + }, | ||
| 62 | + watch: { | ||
| 63 | + value(newVal) { | ||
| 64 | + this.localValue = newVal; | ||
| 65 | + }, | ||
| 66 | + localValue(newVal) { | ||
| 67 | + this.$emit("input", newVal); // 同步父组件数据 | ||
| 68 | + }, | ||
| 69 | + }, | ||
| 70 | + methods: { | ||
| 71 | + handleFocus() { | ||
| 72 | + this.isPopoverVisible = true; | ||
| 73 | + this.$nextTick(() => { | ||
| 74 | + this.$refs.popoverInput.focus(); // 弹出层输入框获取焦点 | ||
| 75 | + this.$refs.referenceInput.$el.style.display = "none"; // 隐藏主输入框 | ||
| 76 | + }); | ||
| 77 | + }, | ||
| 78 | + handleBlur() { | ||
| 79 | + this.isPopoverVisible = false; | ||
| 80 | + | ||
| 81 | + // 格式化内容 | ||
| 82 | + this.localValue = this.formatContent(this.localValue); | ||
| 83 | + | ||
| 84 | + this.$nextTick(() => { | ||
| 85 | + const referenceInput = this.$refs.referenceInput.$el; | ||
| 86 | + referenceInput.style.display = "block"; | ||
| 87 | + if (this.localValue) { | ||
| 88 | + referenceInput.classList.add("inputFocus"); | ||
| 89 | + } else { | ||
| 90 | + referenceInput.classList.remove("inputFocus"); | ||
| 91 | + } | ||
| 92 | + }); | ||
| 93 | + | ||
| 94 | + this.$emit("blur", this.localValue); // 触发父组件的 blur 事件 | ||
| 95 | + }, | ||
| 96 | + formatContent(value) { | ||
| 97 | + // 格式化输入内容:替换分隔符、去空格、限制条数 | ||
| 98 | + return value | ||
| 99 | + .replace(/[\n,;;]/g, ",") | ||
| 100 | + .split(",") | ||
| 101 | + .map((item) => item.trim()) | ||
| 102 | + .filter((item) => item !== "") | ||
| 103 | + .slice(0, this.maxEntries) | ||
| 104 | + .join("\n"); | ||
| 105 | + }, | ||
| 106 | + }, | ||
| 107 | +}; | ||
| 108 | +</script> | ||
| 109 | + | ||
| 110 | +<style scoped lang="scss"> | ||
| 111 | +//.input-shadow { | ||
| 112 | +// box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); | ||
| 113 | +//} | ||
| 114 | +// | ||
| 115 | +//.textarea-popover { | ||
| 116 | +// box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); | ||
| 117 | +//} | ||
| 118 | +// | ||
| 119 | +//.inputFocus { | ||
| 120 | +// border-color: #409eff; | ||
| 121 | +// box-shadow: 0 0 5px rgba(64, 158, 255, 0.5); | ||
| 122 | +//} | ||
| 123 | +</style> |
| ... | @@ -4,6 +4,7 @@ | ... | @@ -4,6 +4,7 @@ |
| 4 | <thead> | 4 | <thead> |
| 5 | <tr> | 5 | <tr> |
| 6 | <th v-for="(header, index) in headers" :key="index">{{ header }}</th> | 6 | <th v-for="(header, index) in headers" :key="index">{{ header }}</th> |
| 7 | + <th v-if="showActionColumn">操作</th> | ||
| 7 | </tr> | 8 | </tr> |
| 8 | </thead> | 9 | </thead> |
| 9 | <tbody> | 10 | <tbody> |
| ... | @@ -11,6 +12,11 @@ | ... | @@ -11,6 +12,11 @@ |
| 11 | <td>{{ row.status }}</td> | 12 | <td>{{ row.status }}</td> |
| 12 | <td>{{ row.time }}</td> | 13 | <td>{{ row.time }}</td> |
| 13 | <td>{{ row.description }}</td> | 14 | <td>{{ row.description }}</td> |
| 15 | + <td v-if="showActionColumn"> | ||
| 16 | + <span class="action-link" @click="handleDownload(row, index)"> | ||
| 17 | + 下载回执 | ||
| 18 | + </span> | ||
| 19 | + </td> | ||
| 14 | </tr> | 20 | </tr> |
| 15 | </tbody> | 21 | </tbody> |
| 16 | </table> | 22 | </table> |
| ... | @@ -20,6 +26,13 @@ | ... | @@ -20,6 +26,13 @@ |
| 20 | <script> | 26 | <script> |
| 21 | export default { | 27 | export default { |
| 22 | name: "ReceiptInfoTable", | 28 | name: "ReceiptInfoTable", |
| 29 | + props: { | ||
| 30 | + // 控制操作列是否显示 | ||
| 31 | + showActionColumn: { | ||
| 32 | + type: Boolean, | ||
| 33 | + default: true, // 默认显示操作列 | ||
| 34 | + }, | ||
| 35 | + }, | ||
| 23 | data() { | 36 | data() { |
| 24 | return { | 37 | return { |
| 25 | headers: ["回执状态", "状态时间", "回执描述"], | 38 | headers: ["回执状态", "状态时间", "回执描述"], |
| ... | @@ -27,21 +40,30 @@ export default { | ... | @@ -27,21 +40,30 @@ export default { |
| 27 | { | 40 | { |
| 28 | status: "山东电子口岸已上传", | 41 | status: "山东电子口岸已上传", |
| 29 | time: "2024-11-08 15:31:58", | 42 | time: "2024-11-08 15:31:58", |
| 30 | - description: "订单变更申请报关单【f291cda6-f664-4bf5-8edc-bcc012f8775】单证不存在,不可报单申报,报文业务主键【24HX-11-40-3722960DYB】" | 43 | + description: |
| 44 | + "订单变更申请报关单【f291cda6-f664-4bf5-8edc-bcc012f8775】单证不存在,不可报单申报,报文业务主键【24HX-11-40-3722960DYB】", | ||
| 31 | }, | 45 | }, |
| 32 | { | 46 | { |
| 33 | status: "山东电子口岸已上传", | 47 | status: "山东电子口岸已上传", |
| 34 | time: "2024-11-08 15:31:58", | 48 | time: "2024-11-08 15:31:58", |
| 35 | - description: "山东电子口岸已上传" | 49 | + description: "山东电子口岸已上传", |
| 36 | }, | 50 | }, |
| 37 | { | 51 | { |
| 38 | status: "山东电子口岸已保存", | 52 | status: "山东电子口岸已保存", |
| 39 | time: "2024-11-08 15:30:45", | 53 | time: "2024-11-08 15:30:45", |
| 40 | - description: "山东电子口岸已保存,加签后上传" | 54 | + description: "山东电子口岸已保存,加签后上传", |
| 41 | - } | 55 | + }, |
| 42 | - ] | 56 | + ], |
| 43 | }; | 57 | }; |
| 44 | - } | 58 | + }, |
| 59 | + methods: { | ||
| 60 | + // 处理点击下载回执的事件 | ||
| 61 | + handleDownload(row, index) { | ||
| 62 | + console.log("下载回执触发:", row, index); | ||
| 63 | + // 示例下载逻辑,可以根据实际需求添加下载操作 | ||
| 64 | + alert(`开始下载回执:第 ${index + 1} 行`); | ||
| 65 | + }, | ||
| 66 | + }, | ||
| 45 | }; | 67 | }; |
| 46 | </script> | 68 | </script> |
| 47 | 69 | ||
| ... | @@ -54,7 +76,8 @@ export default { | ... | @@ -54,7 +76,8 @@ export default { |
| 54 | background-color: white; | 76 | background-color: white; |
| 55 | } | 77 | } |
| 56 | 78 | ||
| 57 | -.custom-table th, .custom-table td { | 79 | +.custom-table th, |
| 80 | +.custom-table td { | ||
| 58 | border: 1px solid #ccc; | 81 | border: 1px solid #ccc; |
| 59 | padding: 8px 12px; | 82 | padding: 8px 12px; |
| 60 | text-align: left; | 83 | text-align: left; |
| ... | @@ -70,6 +93,16 @@ export default { | ... | @@ -70,6 +93,16 @@ export default { |
| 70 | } | 93 | } |
| 71 | 94 | ||
| 72 | .custom-table tr:nth-child(odd) { | 95 | .custom-table tr:nth-child(odd) { |
| 73 | - //background-color: #fafafa; | 96 | + background-color: #fafafa; |
| 97 | +} | ||
| 98 | + | ||
| 99 | +.action-link { | ||
| 100 | + color: #409eff; | ||
| 101 | + cursor: pointer; | ||
| 102 | + text-decoration: none; | ||
| 103 | +} | ||
| 104 | + | ||
| 105 | +.action-link:hover { | ||
| 106 | + text-decoration: underline; | ||
| 74 | } | 107 | } |
| 75 | </style> | 108 | </style> | ... | ... |
| ... | @@ -30,7 +30,8 @@ export default { | ... | @@ -30,7 +30,8 @@ export default { |
| 30 | height: 100%; | 30 | height: 100%; |
| 31 | min-width: 1080px; | 31 | min-width: 1080px; |
| 32 | position: relative; | 32 | position: relative; |
| 33 | - overflow: hidden; | 33 | + //overflow: hidden; |
| 34 | + overflow: auto; | ||
| 34 | background-color: #f2f2f2; | 35 | background-color: #f2f2f2; |
| 35 | } | 36 | } |
| 36 | 37 | ... | ... |
| ... | @@ -115,20 +115,20 @@ export const constantRoutes = [ | ... | @@ -115,20 +115,20 @@ export const constantRoutes = [ |
| 115 | meta: { title: '出口运单详情', icon: 'api' }, | 115 | meta: { title: '出口运单详情', icon: 'api' }, |
| 116 | }, | 116 | }, |
| 117 | { | 117 | { |
| 118 | + path: '/exportListDetail', | ||
| 119 | + component: (resolve) => require(['@/views/exportListDetail/index'], resolve), | ||
| 120 | + hidden: false, | ||
| 121 | + meta: { title: '出口清单详情', icon: 'api' }, | ||
| 122 | + }, | ||
| 123 | + { | ||
| 118 | path: '/exportTransportBillQuery', | 124 | path: '/exportTransportBillQuery', |
| 119 | component: (resolve) => require(['@/views/exportTransportBillQuery/index'], resolve), | 125 | component: (resolve) => require(['@/views/exportTransportBillQuery/index'], resolve), |
| 120 | hidden: false, | 126 | hidden: false, |
| 121 | meta: { title: '出口运单查询', icon: 'api' }, | 127 | meta: { title: '出口运单查询', icon: 'api' }, |
| 122 | }, | 128 | }, |
| 123 | { | 129 | { |
| 124 | - path: 'index', | 130 | + path: '/exportListQuery', |
| 125 | - component: (resolve) => require(['@/views/index'], resolve), | 131 | + component: (resolve) => require(['@/views/exportListQuery/index'], resolve), |
| 126 | - name: '首页', | ||
| 127 | - meta: { title: '出口运单查询', icon: 'dashboard' } | ||
| 128 | - }, | ||
| 129 | - { | ||
| 130 | - path: 'index', | ||
| 131 | - component: (resolve) => require(['@/views/index'], resolve), | ||
| 132 | name: '首页', | 132 | name: '首页', |
| 133 | meta: { title: '出口清单查询', icon: 'dashboard' } | 133 | meta: { title: '出口清单查询', icon: 'dashboard' } |
| 134 | }, | 134 | }, | ... | ... |
src/views/exportListDetail/index.vue
0 → 100644
This diff is collapsed. Click to expand it.
src/views/exportListQuery/index.vue
0 → 100644
This diff is collapsed. Click to expand it.
-
Please register or login to post a comment