zhanbo.xu

feat: 开发新功能

...@@ -5,7 +5,7 @@ VUE_APP_BASE_ENV = "dev" ...@@ -5,7 +5,7 @@ VUE_APP_BASE_ENV = "dev"
5 5
6 VUE_APP_Version = '1.0.0' 6 VUE_APP_Version = '1.0.0'
7 7
8 -VUE_APP_BASE_URL = 'http://101.132.100.41:7001/EcomExp' 8 +VUE_APP_BASE_URL = 'http://101.132.100.41:7008/EcomExp'
9 # FedEx 在线申报工具/开发环境 9 # FedEx 在线申报工具/开发环境
10 # http://101.132.100.41:7001/EcomExp 10 # http://101.132.100.41:7001/EcomExp
11 VUE_APP_BASE_API = /EcomExp 11 VUE_APP_BASE_API = /EcomExp
......
1 +import request from "@/utils/request";
2 +
3 +/**
4 + * @description 获取配置
5 + * @param {Object} data
6 + * @method GET
7 + */
8 +export function getConfigList(data) {
9 + return request({
10 + url: "/bus-customer/sysConfigCenter/getConfigList",
11 + method: "post",
12 + data,
13 + });
14 +}
15 +
16 +/**
17 + * @description 刷新配置
18 + * */
19 +export function refreshConfig(data) {
20 + return request({
21 + url: `/bus-customer/sysConfigCenter/refreshConfig/${data.id}`,
22 + method: "get",
23 + });
24 +}
25 +
26 +/**
27 + * @description 添加配置
28 + * @param {Object} data
29 + * @method POST
30 + */
31 +export function addConfig(data) {
32 + return request({
33 + url: "/bus-customer/sysConfigCenter/addConfig",
34 + method: "post",
35 + data,
36 + });
37 +}
38 +
39 +/**
40 + * @description 修改配置
41 + * @param {Object} data
42 + * @method POST
43 + */
44 +export function updateConfig(data) {
45 + return request({
46 + url: "/bus-customer/sysConfigCenter/updateConfig",
47 + method: "post",
48 + data,
49 + });
50 +}
...@@ -47,6 +47,21 @@ export function declareDataUpload(data) { ...@@ -47,6 +47,21 @@ export function declareDataUpload(data) {
47 data: { 47 data: {
48 cancellationReason: data.cancellationReason, 48 cancellationReason: data.cancellationReason,
49 declareIds: data.declareIds, 49 declareIds: data.declareIds,
50 + changeFlag: data?.changeFlag || false,
51 + },
52 + });
53 +}
54 +// 删单deleteFlag:true,note:删单原因
55 +// 变更changeFlag:true
56 +export function declareDataUploadNew(data) {
57 + return request({
58 + url: "/bus-customer/declareData/" + data.type,
59 + method: "post",
60 + data: {
61 + declareIds: data.declareIds, //申报id
62 + deleteFlag: data?.deleteFlag || false, // 是否删单
63 + changeFlag: data?.changeFlag || false,
64 + note: data.note || null, // 删单原因
50 }, 65 },
51 }); 66 });
52 } 67 }
......
...@@ -51,3 +51,11 @@ export function getListInfo(logisticsNo) { ...@@ -51,3 +51,11 @@ export function getListInfo(logisticsNo) {
51 method: "get", 51 method: "get",
52 }); 52 });
53 } 53 }
54 +
55 +// name 收发货人名称 搜索模拟回执汇总申报下拉信息
56 +export function searchMockReceiptSummary(data) {
57 + return request({
58 + url: `/bus-customer/mockReceipt/searchMockReceiptSummary?name=${data.name}`,
59 + method: "get",
60 + });
61 +}
......
1 +<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1763694170210" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3134" id="mx_n_1763694170211" xmlns:xlink="http://www.w3.org/1999/xlink" width="64" height="64"><path d="M682.666667 0a42.666667 42.666667 0 0 1 25.941333 8.789333l4.266667 3.712 207.061333 207.061334a64 64 0 0 1 18.432 38.954666l0.298667 6.314667V469.333333a42.666667 42.666667 0 0 1-85.034667 4.992L853.333333 469.333333v-128h-192a64 64 0 0 1-63.701333-57.856l-0.298667-6.144v-192h-426.666666v853.333334h256a42.666667 42.666667 0 0 1 42.325333 37.674666l0.298667 4.992a42.666667 42.666667 0 0 1-37.674667 42.368l-4.992 0.298667H149.333333a64 64 0 0 1-63.701333-57.856l-0.298667-6.144v-896a64 64 0 0 1 57.856-63.701333l6.144-0.298667H682.666667z m153.045333 256l-153.045333-152.96V256h153.045333z" fill="#191919" p-id="3135"></path><path d="M298.666667 341.333333m42.666666 0l128 0q42.666667 0 42.666667 42.666667l0 0q0 42.666667-42.666667 42.666667l-128 0q-42.666667 0-42.666666-42.666667l0 0q0-42.666667 42.666666-42.666667Z" fill="#191919" p-id="3136"></path><path d="M298.666667 512m42.666666 0l128 0q42.666667 0 42.666667 42.666667l0 0q0 42.666667-42.666667 42.666666l-128 0q-42.666667 0-42.666666-42.666666l0 0q0-42.666667 42.666666-42.666667Z" fill="#191919" p-id="3137"></path><path d="M298.666667 682.666667m42.666666 0l128 0q42.666667 0 42.666667 42.666666l0 0q0 42.666667-42.666667 42.666667l-128 0q-42.666667 0-42.666666-42.666667l0 0q0-42.666667 42.666666-42.666666Z" fill="#191919" p-id="3138"></path><path d="M828.970667 517.376a21.333333 21.333333 0 0 1 3.029333 10.965333v70.058667A213.333333 213.333333 0 1 1 597.333333 810.666667a38.826667 38.826667 0 1 1 77.568 0 135.765333 135.765333 0 1 0 157.141334-134.101334l-0.042667 32.426667a21.333333 21.333333 0 0 1-32.298667 18.304l-150.528-90.325333a21.333333 21.333333 0 0 1 0-36.608l150.528-90.325334a21.333333 21.333333 0 0 1 29.269334 7.338667z" fill="#191919" p-id="3139"></path></svg>
...\ No newline at end of file ...\ No newline at end of file
...@@ -81,7 +81,7 @@ export default { ...@@ -81,7 +81,7 @@ export default {
81 let inputInner = document.querySelector( 81 let inputInner = document.querySelector(
82 "#inputInner--" + this.dataKey 82 "#inputInner--" + this.dataKey
83 ); 83 );
84 - inputInner.classList.remove("inputFocus"); 84 + inputInner?.classList.remove("inputFocus");
85 } 85 }
86 }, 86 },
87 deep: true, 87 deep: true,
......
1 +<template>
2 + <el-dialog
3 + class="entryDialog classCUploadDialog"
4 + title="清单总分单撤销"
5 + :visible.sync="cancelVisible"
6 + :show-close="false"
7 + width="60%"
8 + :close-on-click-modal="false"
9 + >
10 + <div>
11 + <el-form
12 + class="fedexFormStyle fedexFormStyle-textarea"
13 + ref="cancelForm"
14 + :model="cancelFormData"
15 + :rules="cancelFormRules"
16 + label-position="left"
17 + size="small"
18 + >
19 + <Formitem label="撤销原因" prop="note" type="edit">
20 + <el-input
21 + type="textarea"
22 + class="inputShadow"
23 + resize="none"
24 + v-model="cancelFormData.note"
25 + clearable
26 + :autosize="{ minRows: 7, maxRows: 7 }"
27 + placeholder="请输入撤销原因"
28 + id="inputInner-edit-note"
29 + ></el-input>
30 + </Formitem>
31 + </el-form>
32 + </div>
33 + <div class="dialogOption entrySave revokeOperation">
34 + <el-button
35 + class="entrySaveButton entrySaveButton-background revokeSubmitBtn"
36 + type="primary"
37 + @click="submitRevoke"
38 + >
39 + 提 交
40 + </el-button>
41 + <el-button class="entrySaveButton" @click="cancelRevoke(false)">
42 + 取 消
43 + </el-button>
44 + </div>
45 + </el-dialog>
46 +</template>
47 +
48 +<script>
49 +import { declareDataUploadNew } from "@/api/declareData-api.js";
50 +export default {
51 + name: "DeleteDialog",
52 + props: {
53 + showDialog: {
54 + type: Boolean,
55 + default: false,
56 + },
57 + selectedDatas: {
58 + type: Array,
59 + default: () => [],
60 + },
61 + },
62 + data() {
63 + return {
64 + cancelVisible: false,
65 + cancelFormData: {
66 + note: "",
67 + },
68 + cancelFormRules: {
69 + note: [{ required: true, message: "请输入撤销原因", trigger: "blur" }],
70 + },
71 + };
72 + },
73 + watch: {
74 + showDialog(val) {
75 + if (val) {
76 + this.cancelVisible = val;
77 + }
78 + },
79 + },
80 + created() {},
81 + methods: {
82 + submitRevoke() {
83 + this.$refs.cancelForm.validate((valid) => {
84 + if (valid) {
85 + let obj = {
86 + note: this.cancelFormData.note,
87 + declareIds: [],
88 + type: "totalScore",
89 + deleteFlag: true,
90 + };
91 + obj.declareIds = this.selectedDatas.map((item) => item.declareId);
92 +
93 + console.log("datas==", obj);
94 + declareDataUploadNew(obj)
95 + .then((res) => {
96 + if (res.code === "200") {
97 + // this.alertSuccessMsg(res.message);
98 + this.alertSuccessMsg("数据已成功提交撤销,请等待海关回执。");
99 + this.cancelRevoke(true);
100 + } else {
101 + this.alertWarningMsg(res.message);
102 + this.cancelRevoke();
103 + }
104 + })
105 + .catch((err) => {
106 + console.log(err);
107 + this.cancelRevoke();
108 + });
109 + } else {
110 + return false;
111 + }
112 + });
113 + },
114 +
115 + cancelRevoke(flag = false) {
116 + this.cancelVisible = false;
117 + this.cancelFormData.note = "";
118 + this.$emit("cancelDelete", flag);
119 + },
120 + },
121 +};
122 +</script>
123 +
124 +<style lang="scss" scoped>
125 +@import "@/assets/styles/variables.scss";
126 +.modelItem {
127 + width: 100%;
128 + .modelItem-title {
129 + display: flex;
130 + justify-content: space-between;
131 + margin-bottom: 5px;
132 + font-size: 14px;
133 + font-weight: 600;
134 + color: #333;
135 + }
136 +}
137 +.revokeOperation {
138 + margin-bottom: 25px;
139 + .revokeSubmitBtn {
140 + margin-right: 30px;
141 + }
142 +}
143 +.fedexFormStyle-textarea {
144 + .el-form-item {
145 + height: 200px;
146 + }
147 +}
148 +</style>
...@@ -35,15 +35,6 @@ ...@@ -35,15 +35,6 @@
35 <!-- 提运单号 --> 35 <!-- 提运单号 -->
36 <el-col :span="5"> 36 <el-col :span="5">
37 <Formitem label="提运单号" prop="billNo"> 37 <Formitem label="提运单号" prop="billNo">
38 - <!-- <el-input
39 - type="text"
40 - class="inputShadow"
41 - id="inputInner--billNo"
42 - resize="none"
43 - v-model="sreachFormData.billNo"
44 - clearable
45 - placeholder=""
46 - ></el-input> -->
47 <FormTextareaInput 38 <FormTextareaInput
48 :formData="sreachFormData" 39 :formData="sreachFormData"
49 dataKey="billNo" 40 dataKey="billNo"
...@@ -152,6 +143,37 @@ ...@@ -152,6 +143,37 @@
152 ></svg-icon> 143 ></svg-icon>
153 离境单申报 144 离境单申报
154 </el-button> 145 </el-button>
146 + <!-- new -->
147 + <el-dropdown
148 + style="margin-left: 10px"
149 + size="small"
150 + split-button
151 + type="primary"
152 + class="dropdown-other-button"
153 + v-loading="loadings.dropDownChangeLoading"
154 + @command="dropdownChange"
155 + @click="
156 + declareDataChange('dropDownChangeLoading', dropdownName, dropdownCode)
157 + "
158 + >
159 + <i class="el-icon-document"></i>
160 + {{ dropdownName }}
161 + <!-- 清单总分单撤销、清单总分单变更 -->
162 + <el-dropdown-menu slot="dropdown">
163 + <el-dropdown-item
164 + :command="{ code: 'totalScore', name: '清单总分单撤销' }"
165 + class="dropdown-other-menu-button"
166 + >
167 + 清单总分单撤销
168 + </el-dropdown-item>
169 + <el-dropdown-item
170 + :command="{ code: 'totalScore', name: '清单总分单变更' }"
171 + class="dropdown-other-menu-button"
172 + >
173 + 清单总分单变更
174 + </el-dropdown-item>
175 + </el-dropdown-menu>
176 + </el-dropdown>
155 </div> 177 </div>
156 178
157 <Table 179 <Table
...@@ -324,6 +346,12 @@ ...@@ -324,6 +346,12 @@
324 :selected="selected" 346 :selected="selected"
325 @close="timeClose" 347 @close="timeClose"
326 /> 348 />
349 + <!-- 清单总分单撤销 -->
350 + <DeleteDialog
351 + :showDialog="deleteDialogVisible"
352 + :selectedDatas="selected"
353 + @cancelDelete="deleteDialogClose"
354 + />
327 <!-- 日志 --> 355 <!-- 日志 -->
328 <section style="position: fixed; top: 35%; right: 10%"> 356 <section style="position: fixed; top: 35%; right: 10%">
329 <PopoverComponent 357 <PopoverComponent
...@@ -348,12 +376,14 @@ import { ...@@ -348,12 +376,14 @@ import {
348 getTotalReceipt, 376 getTotalReceipt,
349 getTotalDocumentsLevelLog, 377 getTotalDocumentsLevelLog,
350 getOperationLogByBillNo, 378 getOperationLogByBillNo,
379 + declareDataUploadNew,
351 } from "@/api/declareData-api.js"; 380 } from "@/api/declareData-api.js";
352 import DialogVue from "./dialog.vue"; 381 import DialogVue from "./dialog.vue";
353 import DataPreview from "../reportingData/data-preview.vue"; 382 import DataPreview from "../reportingData/data-preview.vue";
354 import TimeDialog from "../reportingData/time-dialog.vue"; 383 import TimeDialog from "../reportingData/time-dialog.vue";
355 import { getCurrUserPortInfo } from "@/api/system/user.js"; 384 import { getCurrUserPortInfo } from "@/api/system/user.js";
356 import PopoverComponent from "./popover-component.vue"; 385 import PopoverComponent from "./popover-component.vue";
386 +import DeleteDialog from "./deleteDialog.vue";
357 387
358 export default { 388 export default {
359 name: "ArrivalDeclare", 389 name: "ArrivalDeclare",
...@@ -362,6 +392,7 @@ export default { ...@@ -362,6 +392,7 @@ export default {
362 DataPreview, 392 DataPreview,
363 TimeDialog, 393 TimeDialog,
364 PopoverComponent, 394 PopoverComponent,
395 + DeleteDialog,
365 }, 396 },
366 data() { 397 data() {
367 return { 398 return {
...@@ -525,6 +556,7 @@ export default { ...@@ -525,6 +556,7 @@ export default {
525 loadings: { 556 loadings: {
526 sreachLoading: false, 557 sreachLoading: false,
527 declaration: false, 558 declaration: false,
559 + dropDownChangeLoading: false,
528 }, 560 },
529 tableMaxheight: null, 561 tableMaxheight: null,
530 outerVisible: false, 562 outerVisible: false,
...@@ -535,6 +567,9 @@ export default { ...@@ -535,6 +567,9 @@ export default {
535 timeVisible: false, 567 timeVisible: false,
536 // 获取操作日志 568 // 获取操作日志
537 optionsVisible: false, 569 optionsVisible: false,
570 + dropdownName: "清单总分单撤销",
571 + dropdownCode: "totalScore",
572 + deleteDialogVisible: false,
538 }; 573 };
539 }, 574 },
540 created() { 575 created() {
...@@ -557,6 +592,61 @@ export default { ...@@ -557,6 +592,61 @@ export default {
557 getTotalDocumentsLevelLog: getTotalDocumentsLevelLog, 592 getTotalDocumentsLevelLog: getTotalDocumentsLevelLog,
558 getOperationLogByBillNo: getOperationLogByBillNo, 593 getOperationLogByBillNo: getOperationLogByBillNo,
559 594
595 + //切换申报模式
596 + dropdownChange(val) {
597 + this.dropdownName = val.name;
598 + this.dropdownCode = val.code;
599 + },
600 + declareDataChange(loadingKey, dropdownName, dropdownCode) {
601 + if (this.selected.length === 0) {
602 + this.alertWarningMsg("请选择数据!");
603 + return;
604 + }
605 + // declareDataUploadNew
606 + this.loadings.dropDownChangeLoading = true;
607 + if (dropdownName === "清单总分单撤销") {
608 + this.deleteDialogVisible = true;
609 + return;
610 + }
611 + this.$confirm("是否确认操作清单总分单变更?", "提示", {
612 + confirmButtonText: "确定",
613 + cancelButtonText: "取消",
614 + type: "warning",
615 + })
616 + .then(() => {
617 + let obj = {
618 + declareIds: this.selected.map((item) => item.declareId),
619 + type: "totalScore",
620 + changeFlag: true,
621 + };
622 + declareDataUploadNew(obj)
623 + .then((res) => {
624 + if (res.code === "200") {
625 + this.alertSuccessMsg("操作成功");
626 + this.search(0);
627 + } else {
628 + this.alertWarningMsg(res.message || "操作失败");
629 + }
630 + })
631 + .catch((err) => {
632 + console.log(err);
633 + })
634 + .finally(() => {
635 + this.loadings.dropDownChangeLoading = false;
636 + });
637 + })
638 + .catch(() => {
639 + this.loadings.dropDownChangeLoading = false;
640 + });
641 + },
642 + deleteDialogClose(flag) {
643 + debugger;
644 + this.loadings.dropDownChangeLoading = false;
645 + this.deleteDialogVisible = false;
646 + if (flag) {
647 + this.search(0);
648 + }
649 + },
560 formChange(val) { 650 formChange(val) {
561 this.sreachFormData = val; 651 this.sreachFormData = val;
562 }, 652 },
......
1 +<template>
2 + <el-dialog
3 + class="entryDialog classCUploadDialog"
4 + title="新增配置项"
5 + :visible.sync="outerVisible"
6 + :show-close="false"
7 + width="960px"
8 + :close-on-click-modal="false"
9 + :destroy-on-close="true"
10 + v-loading="loadings.dialogLoading"
11 + @close="close(false)"
12 + >
13 + <div class="modelItem">
14 + <el-form
15 + class="fedexFormStyle"
16 + ref="formData"
17 + :model="formData"
18 + label-position="top"
19 + size="small"
20 + :rules="rules"
21 + >
22 + <el-row :gutter="5">
23 + <el-col :span="8">
24 + <Formitem label="配置项名称" prop="configName" type="edit">
25 + <el-input
26 + type="text"
27 + class="inputShadow"
28 + id="inputInner-edit-configName"
29 + resize="none"
30 + v-model="formData.configName"
31 + clearable
32 + placeholder=""
33 + ></el-input>
34 + </Formitem>
35 + </el-col>
36 + <el-col :span="8">
37 + <Formitem label="配置项类型" prop="configType" type="edit">
38 + <el-select
39 + type="text"
40 + id="inputInner-edit-configType"
41 + v-model="formData.configType"
42 + clearable
43 + filterable
44 + placeholder=""
45 + @change="handleChange"
46 + >
47 + <el-option
48 + v-for="item in configTypeList"
49 + :key="item.value"
50 + :label="item.itemChineseName"
51 + :value="item.itemValue"
52 + ></el-option>
53 + </el-select>
54 + </Formitem>
55 + </el-col>
56 + <!-- String | File | Boolean | Integer | Long -->
57 + <el-col :span="8">
58 + <Formitem
59 + label="配置项值"
60 + prop="configValue"
61 + type="edit"
62 + v-if="
63 + formData.configType === 'String' || formData.configType === ''
64 + "
65 + >
66 + <el-input
67 + type="text"
68 + class="inputShadow"
69 + id="inputInner-edit-configValue"
70 + resize="none"
71 + v-model="formData.configValue"
72 + clearable
73 + placeholder=""
74 + ></el-input>
75 + </Formitem>
76 + <Formitem
77 + label="配置项值"
78 + prop="configValue"
79 + type="edit"
80 + v-if="formData.configType === 'Number' && formData.configType"
81 + >
82 + <el-input
83 + type="number"
84 + class="inputShadow"
85 + id="inputInner-edit-configValue"
86 + resize="none"
87 + v-model="formData.configValue"
88 + clearable
89 + placeholder=""
90 + ></el-input>
91 + </Formitem>
92 + <Formitem
93 + label="配置项值"
94 + prop="configValue"
95 + type="edit"
96 + v-if="formData.configType === 'Boolean' && formData.configType"
97 + >
98 + <el-select
99 + type="text"
100 + id="inputInner-edit-configValue"
101 + v-model="formData.configValue"
102 + clearable
103 + filterable
104 + placeholder=""
105 + >
106 + <el-option label="true" value="true"></el-option>
107 + <el-option label="false" value="false"></el-option>
108 + </el-select>
109 + </Formitem>
110 + <div
111 + class="uploadItem"
112 + v-if="formData.configType === 'File' && formData.configType"
113 + >
114 + <div
115 + class="uploadbox"
116 + :style="{
117 + height: formData.file && formData.file.name ? '1px' : '50px',
118 + }"
119 + >
120 + <el-button
121 + size="mini"
122 + type="text"
123 + @click="uploadFile"
124 + style="width: 100%; text-align: left"
125 + >
126 + 上传文件
127 + </el-button>
128 + <el-upload
129 + class="upload-demo"
130 + ref="uploadFile"
131 + action="/manager-server/attachment/picImg"
132 + :http-request="fileUpload"
133 + :auto-upload="true"
134 + :show-file-list="false"
135 + :data="{}"
136 + :file-list="fileList"
137 + >
138 + </el-upload>
139 + </div>
140 +
141 + <div class="fileList" v-if="formData.file && formData.file.name">
142 + <div class="fileList-item">
143 + <div class="uploadbox-fileName">
144 + <svg-icon
145 + class="el-icon-user-solid"
146 + icon-class="exl"
147 + style="font-size: 18px; color: #de002e"
148 + />
149 + <Tooltip
150 + :content="formData.file.name"
151 + :refName="formData.file.name"
152 + />
153 + </div>
154 + <div class="uploadbox-option">
155 + <el-popconfirm
156 + :title="$t('entry.upload.delTip')"
157 + @confirm="delTypeDFile"
158 + >
159 + <el-button slot="reference" type="text"
160 + >{{ $t("entry.upload.del") }}
161 + </el-button>
162 + </el-popconfirm>
163 + </div>
164 + </div>
165 + </div>
166 + </div>
167 + </el-col>
168 + <el-col :span="24"></el-col>
169 + <el-col :span="8">
170 + <Formitem label="配置所属应用" prop="configApp" type="edit">
171 + <el-select
172 + type="text"
173 + id="inputInner-edit-configApp"
174 + v-model="formData.configApp"
175 + clearable
176 + filterable
177 + placeholder=""
178 + >
179 + <el-option
180 + v-for="item in configAppList"
181 + :key="item.itemValue"
182 + :label="item.itemChineseName"
183 + :value="item.itemValue"
184 + ></el-option>
185 + </el-select>
186 + </Formitem>
187 + </el-col>
188 + <el-col :span="8">
189 + <Formitem label="应用IP列表" prop="configIp" type="edit">
190 + <el-input
191 + type="text"
192 + class="inputShadow"
193 + id="inputInner-edit-configIp"
194 + resize="none"
195 + v-model="formData.configIp"
196 + clearable
197 + placeholder=""
198 + ></el-input>
199 + </Formitem>
200 + </el-col>
201 + </el-row>
202 +
203 + <el-row :gutter="5">
204 + <el-col :span="24">
205 + <div class="textarea-text">
206 + <div style="color: #777777; margin-bottom: 10px">配置描述</div>
207 + <el-input
208 + type="textarea"
209 + :rows="10"
210 + class="inputShadow"
211 + resize="none"
212 + v-model="formData.description"
213 + ></el-input>
214 + </div>
215 + </el-col>
216 + </el-row>
217 + </el-form>
218 + </div>
219 + <div class="dialogOption entrySave">
220 + <el-button
221 + class="entrySaveButton"
222 + :disabled="loadings.submitLoading"
223 + @click="submit"
224 + >
225 + 确 定
226 + </el-button>
227 + <el-button class="entrySaveButton" @click="close(false)">关 闭</el-button>
228 + </div>
229 + </el-dialog>
230 +</template>
231 +
232 +<script>
233 +import { addConfig, updateConfig } from "@/api/config-management.js";
234 +export default {
235 + props: {
236 + outerVisible: {
237 + type: Boolean,
238 + default: false,
239 + },
240 + configAppList: {
241 + type: Array,
242 + default: () => {
243 + return [];
244 + },
245 + },
246 + configTypeList: {
247 + type: Array,
248 + default: () => {
249 + return [];
250 + },
251 + },
252 + activeOjb: {
253 + type: Object,
254 + default: () => {
255 + return {};
256 + },
257 + },
258 + },
259 +
260 + watch: {
261 + outerVisible(val) {
262 + if (val) {
263 + //
264 + this.formData = {
265 + configType: "String",
266 + ...this.activeOjb,
267 + file: {
268 + name: this.activeOjb?.configFileName || "",
269 + file: this.activeOjb?.configValue || "",
270 + },
271 + };
272 + }
273 + },
274 + },
275 + data() {
276 + return {
277 + formData: {
278 + configName: "",
279 + configType: "String",
280 + configValue: "",
281 + configApp: "",
282 + configIp: "",
283 + description: "",
284 + file: null,
285 + },
286 + rules: {
287 + configName: [
288 + {
289 + required: true,
290 + trigger: "blur",
291 + message: "请输入配置项名称!",
292 + },
293 + ],
294 + configType: [
295 + {
296 + required: true,
297 + trigger: "blur",
298 + message: "请选择配置项类型!",
299 + },
300 + ],
301 + configValue: [
302 + {
303 + required: true,
304 + trigger: "blur",
305 + message: "请输入配置项值!",
306 + },
307 + ],
308 +
309 + configApp: [
310 + {
311 + required: true,
312 + trigger: "blur",
313 + message: "请选择配置所属应用!",
314 + },
315 + ],
316 +
317 + configIp: [
318 + {
319 + required: true,
320 + trigger: "blur",
321 + message: "请输入应用IP列表!",
322 + },
323 + ],
324 + },
325 + orderNoList: [],
326 + loadings: {
327 + dialogLoading: false,
328 + submitLoading: false,
329 + },
330 + loadingText: "",
331 + // 上传文件列表
332 + fileList: [],
333 + };
334 + },
335 +
336 + methods: {
337 + // 配置项类型改变时,根据类型设置配置项值的输入类型
338 + handleChange() {
339 + console.log("=======================");
340 + this.formData.configValue = "";
341 + this.formData.file = null;
342 + },
343 + // 上传文件
344 + uploadFile() {
345 + this.$refs.uploadFile.$refs["upload-inner"].handleClick();
346 + },
347 + extractBase64(dataUrl) {
348 + const base64Match = dataUrl.match(/;base64,(.+)$/);
349 + return base64Match ? base64Match[1] : dataUrl;
350 + },
351 + fileUpload({ file }) {
352 + const reader = new FileReader();
353 + reader.readAsDataURL(file);
354 + reader.onload = (e) => {
355 + console.log(e);
356 + let obj = {
357 + // file: e.target.result,
358 + file: this.extractBase64(e.target.result),
359 + name: file.name,
360 + };
361 + this.formData.file = obj;
362 + };
363 + },
364 + //删除文件
365 + delTypeDFile() {
366 + this.formData.file = null;
367 + },
368 + //数据保存
369 + submit() {
370 + let obj = {
371 + ...this.formData,
372 + };
373 + this.$refs.formData.validate((valid) => {
374 + if (valid) {
375 + this.addapi({
376 + ...obj,
377 + });
378 + }
379 + });
380 + },
381 + //新增
382 + addapi(val) {
383 + let fn = addConfig;
384 + const formData = new FormData();
385 + formData.append("configName", val.configName);
386 + formData.append("configType", val.configType);
387 +
388 + formData.append("configApp", val.configApp);
389 + formData.append("configIp", val.configIp);
390 + formData.append("description", val.description);
391 + if (val.configType === "File") {
392 + if (!val.file) {
393 + this.alertWarningMsg("请上传文件!");
394 + return;
395 + }
396 + formData.append("configValue", val.file.file);
397 + formData.append("configFileName", val.file.name);
398 + }
399 + this.loadings.dialogLoading = true;
400 + if (this.activeOjb && this.activeOjb?.id) {
401 + fn = updateConfig;
402 + formData.append("id", this.activeOjb?.id);
403 + }
404 + fn(formData)
405 + .then((res) => {
406 + if (res.code === "200") {
407 + this.msgSuccess(res.message);
408 + this.close(true);
409 + } else {
410 + this.alertWarningMsg(res.message);
411 + this.close(false);
412 + }
413 + })
414 + .catch((err) => {
415 + console.log(err);
416 + this.loadings.dialogLoading = false;
417 + });
418 + },
419 +
420 + close(flag) {
421 + this.formData = {
422 + configName: "",
423 + configType: "",
424 + configValue: "",
425 + configApp: "",
426 + configIp: "",
427 + description: "",
428 + file: null,
429 + };
430 + this.loadings.dialogLoading = false;
431 + this.$emit("close", flag);
432 + },
433 + },
434 +};
435 +</script>
436 +
437 +<style lang="scss" scoped>
438 +@import "@/assets/styles/variables.scss";
439 +
440 +.fedexFormStyle {
441 + .order-select-warp-ol {
442 + ::v-deep {
443 + .el-select__input {
444 + width: 35px !important;
445 + padding-top: 0 !important;
446 + }
447 + }
448 + }
449 +}
450 +
451 +/* 附件 */
452 +.uploadItem {
453 + margin-bottom: 5px;
454 +
455 + .uploadbox {
456 + width: 100%;
457 + background-color: $formItemBackgroundColor;
458 + height: 1px;
459 + line-height: 10px;
460 + padding: 0px 8px;
461 + display: flex;
462 + justify-content: space-between;
463 +
464 + .el-button {
465 + font-weight: 400 !important;
466 + }
467 + }
468 +}
469 +
470 +.fileList {
471 + width: 100%;
472 +
473 + .fileList-item {
474 + display: flex;
475 + justify-content: space-between;
476 + padding: 15px 15px 0px 5px;
477 + background-color: $formItemBackgroundColor;
478 + font-size: 14px;
479 +
480 + .uploadbox-fileName {
481 + display: flex;
482 + align-items: center;
483 + }
484 +
485 + .uploadbox-option {
486 + .fileSize {
487 + display: inline-block;
488 + color: #8e8e8e;
489 + font-size: 12px;
490 + }
491 + }
492 +
493 + .svg-icon {
494 + display: inline-block;
495 + color: $fedexError;
496 + }
497 +
498 + .text-tooltip {
499 + max-width: 500px;
500 + display: inline-block;
501 + margin-left: 10px;
502 + }
503 +
504 + .fileList-item-empty {
505 + display: inline-block;
506 + margin: 5px;
507 + height: max-content;
508 + color: #8e8e8e;
509 + }
510 + }
511 +}
512 +</style>
1 +<template>
2 + <div class="entrySreach">
3 + <el-form
4 + class="fedexFormStyle fedexformSreach fedexformSreachBottomBorder"
5 + ref="sreachForm"
6 + :model="sreachFormData"
7 + label-position="top"
8 + size="small"
9 + >
10 + <el-row class="row-border">
11 + <!-- 配置项名称 -->
12 + <el-col :span="5">
13 + <Formitem label="配置项名称" prop="configName">
14 + <el-input
15 + type="text"
16 + class="inputShadow"
17 + id="inputInner--configName"
18 + resize="none"
19 + v-model="sreachFormData.configName"
20 + clearable
21 + placeholder=""
22 + ></el-input>
23 + </Formitem>
24 + </el-col>
25 + <el-col :span="5">
26 + <Formitem label="配置项值" prop="configValue">
27 + <el-input
28 + type="text"
29 + class="inputShadow"
30 + id="inputInner--configValue"
31 + resize="none"
32 + v-model="sreachFormData.configValue"
33 + clearable
34 + placeholder=""
35 + ></el-input>
36 + </Formitem>
37 + </el-col>
38 + <el-col :span="5">
39 + <Formitem label="配置项类型" prop="configType">
40 + <el-select
41 + type="text"
42 + id="inputInner--configType"
43 + v-model="sreachFormData.configType"
44 + clearable
45 + filterable
46 + placeholder=""
47 + >
48 + <el-option
49 + v-for="item in configTypeList"
50 + :key="item.value"
51 + :label="item.itemChineseName"
52 + :value="item.itemValue"
53 + ></el-option>
54 + </el-select>
55 + </Formitem>
56 + </el-col>
57 + <!-- 创建时间 -->
58 + <el-col :span="5">
59 + <Formitem label="创建时间" prop="createTime" :activeType="true">
60 + <el-date-picker
61 + class="inputInner--createTime"
62 + id="inputInner--createTime"
63 + v-model="sreachFormData.createTime"
64 + type="daterange"
65 + format="yyyy-MM-dd"
66 + prefix-icon="none"
67 + value-format="yyyy-MM-dd"
68 + range-separator="至"
69 + @change="dateChange"
70 + />
71 + </Formitem>
72 + </el-col>
73 + <el-col :span="2">
74 + <el-form-item class="textCenter">
75 + <el-button
76 + class="entrySreachButton"
77 + type="text"
78 + icon="el-icon-search"
79 + :loading="loadings.searchLoading"
80 + @click="search(0)"
81 + ></el-button>
82 + </el-form-item>
83 + </el-col>
84 + <el-col :span="2">
85 + <!-- 清空查询条件-->
86 + <el-form-item class="textLeft textCenter">
87 + <el-button
88 + type="text"
89 + size="small"
90 + icon="el-icon-refresh"
91 + @click="clear"
92 + >
93 + 重置
94 + </el-button>
95 + </el-form-item>
96 + </el-col>
97 + </el-row>
98 + </el-form>
99 + <div class="optionButton">
100 + <el-button
101 + class="entrySaveButton"
102 + icon="el-icon-plus"
103 + size="small"
104 + @click="addConfig"
105 + >
106 + 新增
107 + </el-button>
108 + </div>
109 + <Table
110 + class="fedexDetialTable fedexSreachTable"
111 + ref="entryTable"
112 + :data="tableData"
113 + :headerData="headerData"
114 + :maxHeight="tableMaxheight"
115 + :border="true"
116 + :pagination="true"
117 + :order="false"
118 + :loading="loadings.searchLoading"
119 + :page="page.pageIndex"
120 + :totalCount="page.total"
121 + @sizeChange="sizeChange"
122 + @currentChange="currentChange"
123 + :selection="false"
124 + :selectFixed="false"
125 + :rowSelectDataType="false"
126 + >
127 + <template v-slot:receiptInfo="scope">
128 + <el-popover trigger="hover" placement="top">
129 + <div class="name-wrapper-content">{{ scope.row.receiptInfo }}</div>
130 + <span slot="reference" class="name-wrapper">
131 + {{ scope.row.receiptInfo }}
132 + </span>
133 + </el-popover>
134 + </template>
135 + <template slot="optionColumn">
136 + <el-table-column label="操作" width="150">
137 + <template slot-scope="scope">
138 + <el-button type="text" @click="handleEdit(scope.row)">
139 + 修改
140 + </el-button>
141 + <el-button type="text" @click="handleRefresh(scope.row)">
142 + 刷新配置
143 + </el-button>
144 + </template>
145 + </el-table-column>
146 + </template>
147 + </Table>
148 + <DialogVue
149 + :outerVisible="outerVisible"
150 + @close="dialogClose"
151 + :configTypeList="configTypeList"
152 + :configAppList="configAppList"
153 + :activeOjb="activeOjb"
154 + />
155 + </div>
156 +</template>
157 +
158 +<script>
159 +import { getConfigList, refreshConfig } from "@/api/config-management.js";
160 +import { getDictData } from "@/api/system/dict-api.js";
161 +
162 +import DialogVue from "./dialog.vue";
163 +export default {
164 + name: "ReceiptManagement",
165 + components: {
166 + DialogVue,
167 + },
168 + data() {
169 + return {
170 + sreachFormData: {
171 + configName: "",
172 + configType: "",
173 + configValue: "",
174 + },
175 + page: {
176 + pageIndex: 1,
177 + pageSize: 20,
178 + total: 0,
179 + },
180 + tableData: [],
181 + headerData: [
182 + {
183 + name: "序号",
184 + value: "numIndex",
185 + width: "",
186 + align: "left",
187 + },
188 + {
189 + name: "配置项名称",
190 + value: "configName",
191 + width: "",
192 + align: "left",
193 + },
194 + {
195 + name: "配置项值",
196 + value: "configValue",
197 + width: "",
198 + align: "left",
199 + },
200 + {
201 + name: "配置项类型",
202 + value: "configType",
203 + width: "",
204 + align: "left",
205 + // slot: true,
206 + // showOverflowTooltip: false,
207 + },
208 + {
209 + name: "描述",
210 + value: "description",
211 + width: "",
212 + align: "left",
213 + },
214 + {
215 + name: "创建时间",
216 + value: "createTime",
217 + width: "",
218 + align: "left",
219 + },
220 + {
221 + name: "创建人",
222 + value: "createUserName",
223 + width: "",
224 + align: "left",
225 + },
226 + {
227 + name: "修改时间",
228 + value: "modifyTime",
229 + width: "",
230 + align: "left",
231 + },
232 + {
233 + name: "修改人",
234 + value: "modifyUserName",
235 + width: "",
236 + align: "left",
237 + },
238 + ],
239 + loadings: {
240 + searchLoading: false,
241 + },
242 + tableMaxheight: null,
243 + outerVisible: false,
244 +
245 + configAppList: [],
246 + configTypeList: [],
247 + activeOjb: {},
248 + };
249 + },
250 + created() {
251 + this.search(0);
252 + this.fetchReceiptStatus();
253 + },
254 + mounted() {
255 + this.tableMaxheight = window.innerHeight - 255;
256 + },
257 + methods: {
258 + handleEdit(row) {
259 + this.activeOjb = JSON.parse(JSON.stringify(row));
260 + this.outerVisible = true;
261 + },
262 + handleRefresh(row) {
263 + this.$confirm("是否确认操作刷新配置?", "提示", {
264 + confirmButtonText: "确定",
265 + cancelButtonText: "取消",
266 + type: "warning",
267 + })
268 + .then(() => {
269 + refreshConfig(row)
270 + .then((res) => {
271 + if (res.code === "200") {
272 + this.alertSuccessMsg("刷新配置成功");
273 + this.search(0);
274 + } else {
275 + this.alertWarningMsg(res.message || "操作失败");
276 + }
277 + })
278 + .catch((err) => {
279 + console.log(err);
280 + });
281 + })
282 + .catch(() => {});
283 + },
284 + dateChange(val) {
285 + if (val == "" || val == null) {
286 + this.$nextTick(() => {
287 + this.sreachFormData.createTime = [];
288 + });
289 + }
290 + },
291 + fetchReceiptStatus() {
292 + getDictData({ doctCode: "CONFIG_APP" })
293 + .then((res) => {
294 + if (res.code == "200") {
295 + this.configAppList = res.data;
296 + }
297 + })
298 + .catch((err) => {
299 + console.error(err);
300 + });
301 + getDictData({ doctCode: "CONFIG_TYPE" })
302 + .then((res) => {
303 + if (res.code == "200") {
304 + this.configTypeList = res.data;
305 + }
306 + })
307 + .catch((err) => {
308 + console.error(err);
309 + });
310 + },
311 +
312 + clear() {
313 + this.$refs.sreachForm.resetFields();
314 + },
315 + //查询
316 + search(val) {
317 + this.loadings.searchLoading = true;
318 + if (val == 0) {
319 + this.page.pageIndex = 1;
320 + }
321 + let obj = this.sreachFormData;
322 + obj.pageIndex = this.page.pageIndex;
323 + obj.pageSize = this.page.pageSize;
324 + getConfigList(obj)
325 + .then((res) => {
326 + if (res.code === "200") {
327 + this.tableData = (res?.data?.value || []).map((item, index) => {
328 + return {
329 + ...item,
330 + numIndex:
331 + (this.page.pageIndex - 1) * this.page.pageSize + index + 1,
332 + };
333 + });
334 + this.page.total = res.data.totalItems;
335 + } else {
336 + this.alertWarningMsg(res.message);
337 + }
338 + this.loadings.searchLoading = false;
339 + })
340 + .catch((err) => {
341 + console.log(err);
342 + this.loadings.searchLoading = false;
343 + });
344 + },
345 + addConfig() {
346 + this.activeOjb = {};
347 + this.outerVisible = true;
348 + },
349 +
350 + dialogClose(flag = false) {
351 + this.outerVisible = false;
352 + if (flag) {
353 + this.search(0);
354 + }
355 + },
356 + //分页
357 + currentChange(val) {
358 + this.page.pageIndex = val.page;
359 + this.search(1);
360 + },
361 + sizeChange(val) {
362 + this.page.pageSize = val;
363 + this.search(1);
364 + },
365 + input() {
366 + this.$forceUpdate();
367 + },
368 + },
369 +};
370 +</script>
371 +
372 +<style scoped lang="scss">
373 +@import "@/assets/styles/variables.scss";
374 +.entrySreach {
375 + height: 100%;
376 + background-color: $menuLightBg;
377 +
378 + .entrySreachButton {
379 + display: inline-block;
380 + font-size: 20px;
381 + color: $fedexButton !important;
382 + }
383 +
384 + .optionButton {
385 + padding: 10px;
386 + text-align: left;
387 +
388 + .el-button {
389 + color: $fedexButton;
390 + border-color: $fedexButton !important;
391 +
392 + svg {
393 + display: inline-block;
394 + margin-right: 5px;
395 + fill: $fedexButton;
396 + }
397 + }
398 +
399 + .entrySaveButton:hover,
400 + .entrySaveButton:focus {
401 + color: $menuLightBg !important;
402 + background-color: $fedexButton !important;
403 + }
404 + }
405 +}
406 +.name-wrapper {
407 + overflow: hidden;
408 + white-space: nowrap;
409 + text-overflow: ellipsis;
410 + max-width: 200px;
411 + display: inline-block;
412 +}
413 +.name-wrapper-content {
414 + max-width: 400px;
415 +}
416 +
417 +.texttareaTip {
418 + position: absolute;
419 + top: 52%;
420 + right: 20px;
421 + transform: translate(0, -50%);
422 + z-index: 10;
423 +}
424 +</style>
...@@ -30,6 +30,7 @@ ...@@ -30,6 +30,7 @@
30 filterable 30 filterable
31 placeholder="" 31 placeholder=""
32 @change="receiptXml" 32 @change="receiptXml"
33 + disabled
33 > 34 >
34 <el-option 35 <el-option
35 v-for="item in receiptTypeList" 36 v-for="item in receiptTypeList"
...@@ -161,8 +162,9 @@ ...@@ -161,8 +162,9 @@
161 class="entrySaveButton" 162 class="entrySaveButton"
162 :disabled="loadings.submitLoading" 163 :disabled="loadings.submitLoading"
163 @click="submit" 164 @click="submit"
164 - >确 定</el-button
165 > 165 >
166 + 确 定
167 + </el-button>
166 <el-button class="entrySaveButton" @click="close(false)">关 闭</el-button> 168 <el-button class="entrySaveButton" @click="close(false)">关 闭</el-button>
167 </div> 169 </div>
168 </el-dialog> 170 </el-dialog>
...@@ -293,7 +295,7 @@ export default { ...@@ -293,7 +295,7 @@ export default {
293 } 295 }
294 generateReceiptXml({ 296 generateReceiptXml({
295 ...this.formData, 297 ...this.formData,
296 - logisticsNo: this.formData.logisticsNo, 298 + logisticsNos: [this.formData.logisticsNo],
297 }).then((res) => { 299 }).then((res) => {
298 console.log(res); 300 console.log(res);
299 if (res.code === "200") { 301 if (res.code === "200") {
...@@ -303,34 +305,13 @@ export default { ...@@ -303,34 +305,13 @@ export default {
303 } 305 }
304 }); 306 });
305 }, 307 },
306 - // remoteMethod(query) { 308 +
307 - // console.log(query);
308 - // this.getOrderList(query, true);
309 - // },
310 - // getOrderList(val, flag) {
311 - // if (!this.formData.receiptType) {
312 - // return;
313 - // }
314 - // searchOrderNo({
315 - // receiptType: this.formData.receiptType,
316 - // logisticsNo: flag ? val : "",
317 - // }).then((res) => {
318 - // if (res.code === "200") {
319 - // this.orderNoList = res.data;
320 - // } else {
321 - // this.alertWarningMsg(res.message);
322 - // }
323 - // });
324 - // this.receiptXml();
325 - // },
326 getOtherInfo(e) { 309 getOtherInfo(e) {
327 getListInfo(e).then((res) => { 310 getListInfo(e).then((res) => {
328 console.log(res); 311 console.log(res);
329 if (res.code === "200") { 312 if (res.code === "200") {
330 this.formData.preNo = res.data.preNo; 313 this.formData.preNo = res.data.preNo;
331 this.formData.invtNo = res.data.invtNo; 314 this.formData.invtNo = res.data.invtNo;
332 - // this.$set(this.formData, "preNo", res.data.preNo);
333 - // this.$set(this.formData, "invtNo", res.data.invtNo);
334 this.$forceUpdate(); 315 this.$forceUpdate();
335 } else { 316 } else {
336 this.alertWarningMsg(res.message); 317 this.alertWarningMsg(res.message);
......
...@@ -11,7 +11,6 @@ ...@@ -11,7 +11,6 @@
11 class="fedexFormStyle fedexFormEditStyle" 11 class="fedexFormStyle fedexFormEditStyle"
12 ref="editForm" 12 ref="editForm"
13 :model="formData" 13 :model="formData"
14 - :rules="formRules"
15 label-position="top" 14 label-position="top"
16 size="small" 15 size="small"
17 :disabled="true" 16 :disabled="true"
......
...@@ -13,11 +13,11 @@ ...@@ -13,11 +13,11 @@
13 <div class="modelItem"> 13 <div class="modelItem">
14 <el-form 14 <el-form
15 class="fedexFormStyle" 15 class="fedexFormStyle"
16 - ref="formData" 16 + ref="formDataRef"
17 :model="formData" 17 :model="formData"
18 - :rules="rules"
19 label-position="top" 18 label-position="top"
20 size="small" 19 size="small"
20 + :rules="rules"
21 > 21 >
22 <el-row :gutter="5"> 22 <el-row :gutter="5">
23 <el-col :span="8"> 23 <el-col :span="8">
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
29 clearable 29 clearable
30 filterable 30 filterable
31 placeholder="" 31 placeholder=""
32 - @change="receiptXml" 32 + @change="receiptChange"
33 > 33 >
34 <el-option 34 <el-option
35 v-for="item in receiptTypeList" 35 v-for="item in receiptTypeList"
...@@ -40,40 +40,137 @@ ...@@ -40,40 +40,137 @@
40 </el-select> 40 </el-select>
41 </Formitem> 41 </Formitem>
42 </el-col> 42 </el-col>
43 + <!-- 订单回执=》 order === 提运单号 billNo/订单编号 orderNos/回执状态 receiptStatus -->
44 + <!-- 运单回执=》 waybill === 提运单号/物流运单编号 logisticsNos/回执状态 -->
45 + <!-- 清单总分单回执=》 totalScore === 提运单号/回执状态 -->
46 + <!-- 汇总回执=》 summaryApplication === 收发货人名称 summaryApplicationId/回执状态/电子口岸编号/汇总申请编号 sumNo -->
47 +
48 + <!-- 清单回执=》 list === 提运单号/物流运单编号/回执状态/电子口岸编号 preNo/清单编号 invtNo -->
49 +
50 + <template
51 + v-if="
52 + ['order', 'waybill', 'totalScore', 'list'].includes(
53 + formData.receiptType
54 + )
55 + "
56 + >
43 <el-col :span="8"> 57 <el-col :span="8">
44 - <Formitem label="物流运单编号" prop="logisticsNo" type="edit"> 58 + <Formitem label="提运单号" prop="billNo" type="edit">
45 <el-input 59 <el-input
46 type="text" 60 type="text"
47 class="inputShadow" 61 class="inputShadow"
48 - id="inputInner-edit-logisticsNo" 62 + id="inputInner-edit-billNo"
49 resize="none" 63 resize="none"
50 - v-model="formData.logisticsNo" 64 + v-model="formData.billNo"
51 clearable 65 clearable
52 placeholder="" 66 placeholder=""
53 - @blur="handleOtherInfo" 67 + :disabled="!!formData.orderNos || !!formData.logisticsNos"
68 + @blur="receiptXml"
54 ></el-input> 69 ></el-input>
55 - <!-- <el-select 70 + </Formitem>
71 + </el-col>
72 + </template>
73 + <template v-if="['waybill', 'list'].includes(formData.receiptType)">
74 + <el-col :span="8" v-if="!formData.billNo">
75 + <Formitem label="物流运单编号" prop="logisticsNos">
76 + <FormTextareaInput
77 + :formData="formData"
78 + dataKey="logisticsNos"
79 + :curKey="Date.now()"
80 + @formChange="formChange"
81 + />
82 + </Formitem>
83 + </el-col>
84 + <el-col :span="8" v-else>
85 + <Formitem label="物流运单编号" prop="logisticsNos">
86 + <el-input
56 type="text" 87 type="text"
57 - id="inputInner-edit-logisticsNo" 88 + class="inputShadow"
58 - v-model="formData.logisticsNo" 89 + id="inputInner-edit-logisticsNos"
59 - :remote="true" 90 + resize="none"
91 + v-model="formData.logisticsNos"
92 + clearable
93 + placeholder=""
94 + :disabled="true"
95 + ></el-input>
96 + </Formitem>
97 + </el-col>
98 + </template>
99 + <template v-if="['order'].includes(formData.receiptType)">
100 + <el-col :span="8" v-if="!formData.billNo">
101 + <Formitem label="订单编号" prop="orderNos">
102 + <FormTextareaInput
103 + :formData="formData"
104 + dataKey="orderNos"
105 + :curKey="Date.now()"
106 + @formChange="formChange"
107 + />
108 + </Formitem>
109 + </el-col>
110 + <el-col :span="8" v-else>
111 + <Formitem label="订单编号" prop="orderNos">
112 + <el-input
113 + type="text"
114 + class="inputShadow"
115 + id="inputInner-edit-orderNos"
116 + resize="none"
117 + v-model="formData.orderNos"
118 + clearable
119 + placeholder=""
120 + :disabled="true"
121 + ></el-input>
122 + </Formitem>
123 + </el-col>
124 + </template>
125 + <el-col
126 + :span="24"
127 + v-if="['order', 'waybill', 'list'].includes(formData.receiptType)"
128 + >
129 + </el-col>
130 +
131 + <!-- 收发货人名称 -->
132 + <template
133 + v-if="['summaryApplication'].includes(formData.receiptType)"
134 + >
135 + <el-col :span="8">
136 + <Formitem
137 + label="收发货人名称"
138 + prop="summaryApplicationId"
139 + type="edit"
140 + >
141 + <el-select
142 + type="text"
143 + id="inputInner-edit-summaryApplicationId"
144 + v-model="formData.summaryApplicationId"
60 clearable 145 clearable
61 filterable 146 filterable
62 - collapse-tags
63 - :remote-method="remoteMethod"
64 placeholder="" 147 placeholder=""
65 - @change="handleOtherInfo" 148 + @change="receiptXml"
66 - class="order-select-warp-ol"
67 > 149 >
68 <el-option 150 <el-option
69 - v-for="item in orderNoList" 151 + v-for="item in summaryApplicationList"
70 - :key="item" 152 + :key="item.id"
71 - :label="item" 153 + :label="`${item.ebcName}(${item.startTime}-${item.endTime})`"
72 - :value="item" 154 + :value="item.id"
73 ></el-option> 155 ></el-option>
74 - </el-select> --> 156 + </el-select>
75 </Formitem> 157 </Formitem>
76 </el-col> 158 </el-col>
159 + </template>
160 + <!-- <el-col :span="8">
161 + <Formitem label="物流运单编号" prop="logisticsNo" type="edit">
162 + <el-input
163 + type="text"
164 + class="inputShadow"
165 + id="inputInner-edit-logisticsNo"
166 + resize="none"
167 + v-model="formData.logisticsNo"
168 + clearable
169 + placeholder=""
170 + @blur="handleOtherInfo"
171 + ></el-input>
172 + </Formitem>
173 + </el-col> -->
77 <el-col :span="8"> 174 <el-col :span="8">
78 <Formitem label="回执状态" prop="receiptStatus" type="edit"> 175 <Formitem label="回执状态" prop="receiptStatus" type="edit">
79 <el-select 176 <el-select
...@@ -94,8 +191,14 @@ ...@@ -94,8 +191,14 @@
94 </el-select> 191 </el-select>
95 </Formitem> 192 </Formitem>
96 </el-col> 193 </el-col>
97 - </el-row> 194 +
98 - <el-row :gutter="5" v-if="formData.receiptType == 'list'"> 195 + <template
196 + v-if="
197 + ['list', 'summaryApplication'].includes(formData.receiptType) &&
198 + logisticsNoArray.length < 2 &&
199 + !formData.billNo
200 + "
201 + >
99 <el-col :span="8"> 202 <el-col :span="8">
100 <Formitem label="电子口岸编号" prop="preNo" type="edit"> 203 <Formitem label="电子口岸编号" prop="preNo" type="edit">
101 <el-input 204 <el-input
...@@ -110,35 +213,68 @@ ...@@ -110,35 +213,68 @@
110 ></el-input> 213 ></el-input>
111 </Formitem> 214 </Formitem>
112 </el-col> 215 </el-col>
216 + </template>
217 +
218 + <!-- 汇总申请编号 sumNo -->
219 + <template
220 + v-if="['summaryApplication'].includes(formData.receiptType)"
221 + >
113 <el-col :span="8"> 222 <el-col :span="8">
114 - <Formitem label="清单编号" prop="invtNo" type="edit"> 223 + <Formitem label="汇总申请编号" prop="sumNo" type="edit">
115 <el-input 224 <el-input
116 type="text" 225 type="text"
117 class="inputShadow" 226 class="inputShadow"
118 - id="inputInner-edit-invtNo" 227 + id="inputInner-edit-sumNo"
119 resize="none" 228 resize="none"
120 - v-model="formData.invtNo" 229 + v-model="formData.sumNo"
121 clearable 230 clearable
122 placeholder="" 231 placeholder=""
123 @blur="receiptXml" 232 @blur="receiptXml"
124 ></el-input> 233 ></el-input>
125 </Formitem> 234 </Formitem>
126 </el-col> 235 </el-col>
127 - </el-row> 236 + </template>
128 - <el-row :gutter="5"> 237 +
129 - <el-col :span="24"> 238 + <template
130 - <!-- <Formitem label="回执文本" prop="receiptInfo" type="edit"> 239 + v-if="
240 + ['list'].includes(formData.receiptType) &&
241 + logisticsNoArray.length < 2 &&
242 + !formData.billNo
243 + "
244 + >
245 + <el-col :span="8">
246 + <Formitem label="清单编号" prop="invtNo" type="edit">
131 <el-input 247 <el-input
132 - type="textarea" 248 + type="text"
133 - :rows="4"
134 class="inputShadow" 249 class="inputShadow"
135 - id="inputInner-edit-receiptInfo" 250 + id="inputInner-edit-invtNo"
136 resize="none" 251 resize="none"
137 - v-model="formData.receiptInfo" 252 + v-model="formData.invtNo"
138 clearable 253 clearable
139 placeholder="" 254 placeholder=""
255 + @blur="receiptXml"
140 ></el-input> 256 ></el-input>
141 - </Formitem> --> 257 + </Formitem>
258 + </el-col>
259 + </template>
260 + </el-row>
261 + <div
262 + style="color: #e6a23c; margin-bottom: 10px; font-size: 12px"
263 + v-if="formData.receiptType === 'order'"
264 + >
265 + <i class="el-icon-info"></i>
266 + 提运单号和订单编号只能填写一个,如果填写提运单号,提运单下所有的订单编号回执状态都将新增模拟回执,如果填写订单编号,将只对填写的订单修改回执状态
267 + </div>
268 + <div
269 + v-if="formData.receiptType === 'waybill'"
270 + style="color: #e6a23c; margin-bottom: 10px; font-size: 12px"
271 + >
272 + <i class="el-icon-info"></i>
273 + 提运单号和物流运单编号只能填写一个,如果填写提运单号,提运单下所有的物流运单编号回执状态都将改变,如果填写物流运单编号,将只对填写的物流运单编号修改回执状态
274 + </div>
275 +
276 + <el-row :gutter="5">
277 + <el-col :span="24">
142 <div class="textarea-text"> 278 <div class="textarea-text">
143 <div style="color: #777777; margin-bottom: 10px">回执文本</div> 279 <div style="color: #777777; margin-bottom: 10px">回执文本</div>
144 <el-input 280 <el-input
...@@ -154,6 +290,7 @@ ...@@ -154,6 +290,7 @@
154 </el-row> 290 </el-row>
155 </el-form> 291 </el-form>
156 </div> 292 </div>
293 +
157 <div class="dialogOption entrySave"> 294 <div class="dialogOption entrySave">
158 <el-button 295 <el-button
159 class="entrySaveButton" 296 class="entrySaveButton"
...@@ -171,6 +308,7 @@ import { ...@@ -171,6 +308,7 @@ import {
171 generateReceiptXml, 308 generateReceiptXml,
172 addInfo, 309 addInfo,
173 getListInfo, 310 getListInfo,
311 + searchMockReceiptSummary,
174 } from "@/api/receiptManagement-api.js"; 312 } from "@/api/receiptManagement-api.js";
175 export default { 313 export default {
176 props: { 314 props: {
...@@ -203,10 +341,14 @@ export default { ...@@ -203,10 +341,14 @@ export default {
203 return { 341 return {
204 formData: { 342 formData: {
205 receiptType: "", 343 receiptType: "",
206 - logisticsNo: "", 344 + logisticsNos: "",
207 receiptStatus: "", 345 receiptStatus: "",
208 preNo: "", 346 preNo: "",
209 invtNo: "", 347 invtNo: "",
348 + sumNo: "",
349 + billNo: "",
350 + orderNos: "",
351 + summaryApplicationId: "",
210 }, 352 },
211 receiptInfo: "", 353 receiptInfo: "",
212 rules: { 354 rules: {
...@@ -217,11 +359,10 @@ export default { ...@@ -217,11 +359,10 @@ export default {
217 message: "请选择回执类型!", 359 message: "请选择回执类型!",
218 }, 360 },
219 ], 361 ],
220 - logisticsNo: [ 362 + billNo: [
221 { 363 {
222 required: true, 364 required: true,
223 trigger: "blur", 365 trigger: "blur",
224 - message: "物流运单编号不能为空!",
225 }, 366 },
226 ], 367 ],
227 receiptStatus: [ 368 receiptStatus: [
...@@ -231,6 +372,13 @@ export default { ...@@ -231,6 +372,13 @@ export default {
231 message: "请选择回执状态!", 372 message: "请选择回执状态!",
232 }, 373 },
233 ], 374 ],
375 + summaryApplicationId: [
376 + {
377 + required: true,
378 + trigger: "blur",
379 + message: "请选择收发货人名称!",
380 + },
381 + ],
234 preNo: [ 382 preNo: [
235 { 383 {
236 required: true, 384 required: true,
...@@ -252,12 +400,71 @@ export default { ...@@ -252,12 +400,71 @@ export default {
252 submitLoading: false, 400 submitLoading: false,
253 }, 401 },
254 loadingText: "", 402 loadingText: "",
403 + summaryApplicationList: [],
404 + logisticsNoArray: [],
255 }; 405 };
256 }, 406 },
257 407
258 methods: { 408 methods: {
259 - getpreNoInfo(e) { 409 + receiptChange(value) {
260 - console.log(e); 410 + console.log(value);
411 + this.formData = {
412 + receiptType: value,
413 + logisticsNos: "",
414 + receiptStatus: "",
415 + preNo: "",
416 + invtNo: "",
417 + sumNo: "",
418 + billNo: "",
419 + orderNos: "",
420 + summaryApplicationId: "",
421 + };
422 + this.$refs.formDataRef?.resetFields();
423 +
424 + if (value === "totalScore") {
425 + this.$set(this.rules, "billNo", [
426 + {
427 + required: true,
428 + trigger: "blur",
429 + message: "请输入提运单号!",
430 + },
431 + ]);
432 + this.$forceUpdate();
433 + } else {
434 + this.$set(this.rules, "billNo", [
435 + {
436 + required: false,
437 + trigger: "blur",
438 + message: "请输入提运单号!",
439 + },
440 + ]);
441 + this.$forceUpdate();
442 + }
443 + if (value === "summaryApplication") {
444 + this.queryApplicationList();
445 + }
446 + },
447 + formChange(val) {
448 + this.formData = val;
449 + this.receiptXml();
450 +
451 + if (val.logisticsNos != null && val.logisticsNos != "") {
452 + this.logisticsNoArray = val.logisticsNos.split("\n");
453 + } else {
454 + this.logisticsNoArray = [];
455 + }
456 + },
457 + queryApplicationList(name = "") {
458 + searchMockReceiptSummary({
459 + name,
460 + }).then((res) => {
461 + console.log(res);
462 + if (res.code === "200") {
463 + this.summaryApplicationList = res.data;
464 + } else {
465 + this.alertWarningMsg(res.message);
466 + }
467 + });
261 }, 468 },
262 handleOtherInfo() { 469 handleOtherInfo() {
263 if (this.formData.logisticsNo) { 470 if (this.formData.logisticsNo) {
...@@ -267,26 +474,64 @@ export default { ...@@ -267,26 +474,64 @@ export default {
267 // 生成xml 474 // 生成xml
268 receiptXml() { 475 receiptXml() {
269 console.log("=============="); 476 console.log("==============");
477 + const copyFormData = { ...this.formData };
270 478
271 - if (!this.formData.receiptType) { 479 + if (!copyFormData.receiptType) {
272 return; 480 return;
273 } 481 }
274 - if (!this.formData.logisticsNo) { 482 +
483 + if (copyFormData.receiptType === "order") {
484 + if (!copyFormData.billNo && !copyFormData.orderNos) {
275 return; 485 return;
276 } 486 }
277 - if (!this.formData.receiptStatus) { 487 + } else if (copyFormData.receiptType === "waybill") {
488 + if (!copyFormData.billNo && !copyFormData.logisticsNos) {
489 + return;
490 + }
491 + } else if (copyFormData.receiptType === "totalScore") {
492 + if (!copyFormData.billNo) {
493 + // this.alertWarningMsg("请输入提运单号!");
494 + return;
495 + }
496 + } else if (copyFormData.receiptType === "list") {
497 + if (!copyFormData.billNo && !copyFormData.logisticsNos) {
278 return; 498 return;
279 } 499 }
280 - if (!this.formData.preNo) { 500 + if (copyFormData.logisticsNos && this.logisticsNoArray.length < 2) {
501 + if (!copyFormData.preNo) {
281 return; 502 return;
282 } 503 }
283 - if (!this.formData.invtNo) { 504 + if (!copyFormData.invtNo) {
505 + return;
506 + }
507 + }
508 + } else if (copyFormData.receiptType === "summaryApplication") {
509 + if (!copyFormData.summaryApplicationId) {
510 + return;
511 + }
512 + }
513 +
514 + if (copyFormData.orderNos != null && copyFormData.orderNos != "") {
515 + copyFormData.orderNos = copyFormData.orderNos.split("\n");
516 + } else {
517 + copyFormData.orderNos = [];
518 + }
519 + if (
520 + copyFormData.logisticsNos != null &&
521 + copyFormData.logisticsNos != ""
522 + ) {
523 + copyFormData.logisticsNos = copyFormData.logisticsNos.split("\n");
524 + } else {
525 + copyFormData.logisticsNos = [];
526 + }
527 +
528 + if (!this.formData.receiptStatus) {
284 return; 529 return;
285 } 530 }
286 531
287 generateReceiptXml({ 532 generateReceiptXml({
288 ...this.formData, 533 ...this.formData,
289 - logisticsNo: this.formData.logisticsNo, 534 + ...copyFormData,
290 }).then((res) => { 535 }).then((res) => {
291 console.log(res); 536 console.log(res);
292 if (res.code === "200") { 537 if (res.code === "200") {
...@@ -296,26 +541,7 @@ export default { ...@@ -296,26 +541,7 @@ export default {
296 } 541 }
297 }); 542 });
298 }, 543 },
299 - // remoteMethod(query) { 544 +
300 - // console.log(query);
301 - // this.getOrderList(query, true);
302 - // },
303 - // getOrderList(val, flag) {
304 - // if (!this.formData.receiptType) {
305 - // return;
306 - // }
307 - // searchOrderNo({
308 - // receiptType: this.formData.receiptType,
309 - // logisticsNo: flag ? val : "",
310 - // }).then((res) => {
311 - // if (res.code === "200") {
312 - // this.orderNoList = res.data;
313 - // } else {
314 - // this.alertWarningMsg(res.message);
315 - // }
316 - // });
317 - // this.receiptXml();
318 - // },
319 getOtherInfo(e) { 545 getOtherInfo(e) {
320 getListInfo(e).then((res) => { 546 getListInfo(e).then((res) => {
321 console.log(res); 547 console.log(res);
...@@ -330,14 +556,26 @@ export default { ...@@ -330,14 +556,26 @@ export default {
330 }, 556 },
331 //数据保存 557 //数据保存
332 submit() { 558 submit() {
333 - let obj = { 559 + let copyFormData = {
334 ...this.formData, 560 ...this.formData,
335 }; 561 };
336 - this.$refs.formData.validate((valid) => { 562 + if (copyFormData.orderNos != null && copyFormData.orderNos != "") {
563 + copyFormData.orderNos = copyFormData.orderNos.split("\n");
564 + } else {
565 + copyFormData.orderNos = [];
566 + }
567 + if (
568 + copyFormData.logisticsNos != null &&
569 + copyFormData.logisticsNos != ""
570 + ) {
571 + copyFormData.logisticsNos = copyFormData.logisticsNos.split("\n");
572 + } else {
573 + copyFormData.logisticsNos = [];
574 + }
575 + this.$refs.formDataRef.validate((valid) => {
337 if (valid) { 576 if (valid) {
338 this.addapi({ 577 this.addapi({
339 - ...obj, 578 + ...copyFormData,
340 - logisticsNos: [this.formData.logisticsNo],
341 }); 579 });
342 } 580 }
343 }); 581 });
...@@ -348,7 +586,7 @@ export default { ...@@ -348,7 +586,7 @@ export default {
348 addInfo(val) 586 addInfo(val)
349 .then((res) => { 587 .then((res) => {
350 if (res.code === "200") { 588 if (res.code === "200") {
351 - this.msgSuccess(res.message); 589 + this.msgSuccess(res.data || res.message);
352 this.close(true); 590 this.close(true);
353 } else { 591 } else {
354 this.alertWarningMsg(res.message); 592 this.alertWarningMsg(res.message);
......
...@@ -163,12 +163,30 @@ export default { ...@@ -163,12 +163,30 @@ export default {
163 align: "left", 163 align: "left",
164 }, 164 },
165 { 165 {
166 + name: "提运单号",
167 + value: "billNo",
168 + width: "",
169 + align: "left",
170 + },
171 + {
172 + name: "订单编号",
173 + value: "orderNo",
174 + width: "",
175 + align: "left",
176 + },
177 + {
166 name: "物流运单编号", 178 name: "物流运单编号",
167 value: "logisticsNo", 179 value: "logisticsNo",
168 width: "", 180 width: "",
169 align: "left", 181 align: "left",
170 }, 182 },
171 { 183 {
184 + name: "收件人名称",
185 + value: "ebcName",
186 + width: "",
187 + align: "left",
188 + },
189 + {
172 name: "回执类型", 190 name: "回执类型",
173 value: "receiptType", 191 value: "receiptType",
174 width: "", 192 width: "",
......
...@@ -298,35 +298,7 @@ ...@@ -298,35 +298,7 @@
298 ></svg-icon> 298 ></svg-icon>
299 清单申报 299 清单申报
300 </el-button> 300 </el-button>
301 - <!-- <el-dropdown 301 +
302 - style="margin-right: 10px"
303 - size="small"
304 - split-button
305 - type="primary"
306 - v-loading="loadings.dropDownLoading"
307 - @command="dropdownChange"
308 - @click="declareData('dropDownLoading', dropdownName, dropdownCode)"
309 - >
310 - <svg-icon
311 - class="el-icon-user-solid"
312 - icon-class="fedexDeclareIcon"
313 - ></svg-icon
314 - >{{ dropdownName }}
315 - <el-dropdown-menu slot="dropdown">
316 - <el-dropdown-item :command="{ code: 'full', name: '一键申报' }"
317 - >一键申报</el-dropdown-item
318 - >
319 - <el-dropdown-item :command="{ code: 'order', name: '订单申报' }"
320 - >订单申报</el-dropdown-item
321 - >
322 - <el-dropdown-item :command="{ code: 'waybill', name: '运单申报' }"
323 - >运单申报</el-dropdown-item
324 - >
325 - <el-dropdown-item :command="{ code: 'list', name: '清单申报' }"
326 - >清单申报</el-dropdown-item
327 - >
328 - </el-dropdown-menu>
329 - </el-dropdown> -->
330 <!-- 运抵单申报按钮 --> 302 <!-- 运抵单申报按钮 -->
331 <!-- <el-button 303 <!-- <el-button
332 size="small" 304 size="small"
...@@ -375,6 +347,47 @@ ...@@ -375,6 +347,47 @@
375 ></svg-icon> 347 ></svg-icon>
376 撤销单申报 348 撤销单申报
377 </el-button> 349 </el-button>
350 + <!-- new -->
351 + <el-dropdown
352 + style="margin-left: 10px"
353 + size="small"
354 + split-button
355 + type="primary"
356 + class="dropdown-other-button"
357 + v-loading="loadings.dropDownChangeLoading"
358 + @command="dropdownChange"
359 + @click="
360 + declareDataChange(
361 + 'dropDownChangeLoading',
362 + dropdownName,
363 + dropdownCode
364 + )
365 + "
366 + >
367 + <i class="el-icon-document"></i>
368 + {{ dropdownName }}
369 + <!-- 订单变更、运单变更、清单变更 -->
370 + <el-dropdown-menu slot="dropdown">
371 + <el-dropdown-item
372 + :command="{ code: 'order', name: '订单变更' }"
373 + class="dropdown-other-menu-button"
374 + >
375 + 订单变更
376 + </el-dropdown-item>
377 + <el-dropdown-item
378 + :command="{ code: 'waybill', name: '运单变更' }"
379 + class="dropdown-other-menu-button"
380 + >
381 + 运单变更
382 + </el-dropdown-item>
383 + <el-dropdown-item
384 + :command="{ code: 'list', name: '清单变更' }"
385 + class="dropdown-other-menu-button"
386 + >
387 + 清单变更
388 + </el-dropdown-item>
389 + </el-dropdown-menu>
390 + </el-dropdown>
378 </div> 391 </div>
379 </div> 392 </div>
380 <section style="position: fixed; top: 35%; right: 10%"> 393 <section style="position: fixed; top: 35%; right: 10%">
...@@ -998,6 +1011,7 @@ export default { ...@@ -998,6 +1011,7 @@ export default {
998 sreachLoading: false, 1011 sreachLoading: false,
999 dwonloadModelLoading: false, 1012 dwonloadModelLoading: false,
1000 dropDownLoading: false, 1013 dropDownLoading: false,
1014 + dropDownChangeLoading: false,
1001 logTableLoading: false, 1015 logTableLoading: false,
1002 exportDeclareLoading: false, 1016 exportDeclareLoading: false,
1003 revokeLoading: false, // 撤销单申报加载状态 1017 revokeLoading: false, // 撤销单申报加载状态
...@@ -1010,8 +1024,8 @@ export default { ...@@ -1010,8 +1024,8 @@ export default {
1010 textareaVisible: {}, 1024 textareaVisible: {},
1011 tableMaxheight: null, 1025 tableMaxheight: null,
1012 outerVisible: false, 1026 outerVisible: false,
1013 - dropdownName: "一键申报", 1027 + dropdownName: "订单变更",
1014 - dropdownCode: "full", 1028 + dropdownCode: "order",
1015 revokeVisible: false, 1029 revokeVisible: false,
1016 templateDownloadVisible: false, 1030 templateDownloadVisible: false,
1017 datasExportVisible: false, 1031 datasExportVisible: false,
...@@ -1364,14 +1378,20 @@ export default { ...@@ -1364,14 +1378,20 @@ export default {
1364 declareDataUpload(obj) 1378 declareDataUpload(obj)
1365 .then((res) => { 1379 .then((res) => {
1366 if (res.code === "200") { 1380 if (res.code === "200") {
1367 - this.alertSuccessMsg("数据已成功提交申报,请等待海关回执。"); 1381 + this.alertSuccessMsg(
1382 + `数据已成功提交${
1383 + !obj?.changeFlag ? "申报" : "变更"
1384 + },请等待海关回执。`
1385 + );
1368 } else { 1386 } else {
1369 this.alertWarningMsg(res.message); 1387 this.alertWarningMsg(res.message);
1370 } 1388 }
1371 }) 1389 })
1372 .catch((err) => { 1390 .catch((err) => {
1373 console.error(err); 1391 console.error(err);
1374 - this.alertWarningMsg("申报失败,请稍后重试。"); 1392 + this.alertWarningMsg(
1393 + `${!obj?.changeFlag ? "申报" : "变更"}失败,请稍后重试。`
1394 + );
1375 }) 1395 })
1376 .finally(() => { 1396 .finally(() => {
1377 // 无论成功或失败,都重置加载状态并刷新数据 1397 // 无论成功或失败,都重置加载状态并刷新数据
...@@ -1391,13 +1411,18 @@ export default { ...@@ -1391,13 +1411,18 @@ export default {
1391 // } 1411 // }
1392 }, 1412 },
1393 1413
1414 + declareDataChange(loadingKey, dropdownName, dropdownCode) {
1415 + // changeFlag
1416 + this.declareData(loadingKey, dropdownName, dropdownCode, true);
1417 + },
1418 +
1394 /** 1419 /**
1395 * 通用申报方法 1420 * 通用申报方法
1396 * @param {string} loadingKey - 加载状态的 key(如 'dropDownLoading', 'departureLoading', 'revokeLoading') 1421 * @param {string} loadingKey - 加载状态的 key(如 'dropDownLoading', 'departureLoading', 'revokeLoading')
1397 * @param {string} dropdownName - 当前操作名称(如 '撤销单申报') 1422 * @param {string} dropdownName - 当前操作名称(如 '撤销单申报')
1398 * @param {string} dropdownCode - 当前操作代码(如 'full') 1423 * @param {string} dropdownCode - 当前操作代码(如 'full')
1399 */ 1424 */
1400 - declareData(loadingKey, dropdownName, dropdownCode) { 1425 + declareData(loadingKey, dropdownName, dropdownCode, changeFlag = false) {
1401 if (this.selected.length === 0) { 1426 if (this.selected.length === 0) {
1402 this.alertWarningMsg("请选择数据!"); 1427 this.alertWarningMsg("请选择数据!");
1403 return; 1428 return;
...@@ -1409,6 +1434,7 @@ export default { ...@@ -1409,6 +1434,7 @@ export default {
1409 const obj = { 1434 const obj = {
1410 declareIds: this.selected.map((item) => item.declareId), 1435 declareIds: this.selected.map((item) => item.declareId),
1411 type: dropdownCode, 1436 type: dropdownCode,
1437 + changeFlag: changeFlag,
1412 }; 1438 };
1413 // if (dropdownName === "清单总分单申报") { 1439 // if (dropdownName === "清单总分单申报") {
1414 // this.dataPreviewVisible = true; 1440 // this.dataPreviewVisible = true;
...@@ -1735,6 +1761,49 @@ export default { ...@@ -1735,6 +1761,49 @@ export default {
1735 } 1761 }
1736 } 1762 }
1737 } 1763 }
1764 +.dropdown-other-button {
1765 + border-color: #ff0000 !important;
1766 +
1767 + ::v-deep {
1768 + .el-button-group {
1769 + .el-button:last-child {
1770 + border-right-color: #409eff !important;
1771 + border-left: 1px solid #409eff !important;
1772 + border-top-color: #409eff !important;
1773 + border-bottom-color: #409eff !important;
1774 + .el-dropdown__icon {
1775 + color: #409eff;
1776 + }
1777 + }
1778 + .el-button:first-child {
1779 + height: 100%;
1780 + border-left-color: #409eff !important;
1781 + border-top-color: #409eff !important;
1782 + border-bottom-color: #409eff !important;
1783 + span {
1784 + color: #409eff;
1785 + }
1786 + }
1787 + }
1788 + }
1789 +}
1790 +.el-dropdown-menu {
1791 + border: 1px solid #409eff !important;
1792 + .dropdown-other-menu-button:not(.is-disabled):hover,
1793 + .dropdown-other-menu-button:focus {
1794 + background-color: #409eff !important;
1795 + }
1796 +}
1797 +.dropdown-other-button:hover {
1798 + ::v-deep {
1799 + .el-button-group .el-button:first-child span {
1800 + color: #409eff !important;
1801 + }
1802 + .el-button-group .el-button:last-child .el-dropdown__icon {
1803 + color: #409eff !important;
1804 + }
1805 + }
1806 +}
1738 1807
1739 .texttareaTip { 1808 .texttareaTip {
1740 position: absolute; 1809 position: absolute;
......