zhanbo.xu

feat: 开发运抵

1 <template> 1 <template>
2 - <el-dialog 2 + <el-dialog
3 class="entryDialog classCUploadDialog" 3 class="entryDialog classCUploadDialog"
4 - title="批量修改" 4 + title="批量修改"
5 - :visible.sync="batchModifyVisible" 5 + :visible.sync="batchModifyVisible"
6 - :show-close="false" 6 + :show-close="false"
7 - width="60%" 7 + width="60%"
8 - :close-on-click-modal="false" 8 + :close-on-click-modal="false"
9 - > 9 + >
10 - <div> 10 + <div>
11 - <el-form class="fedexFormStyle" 11 + <el-form
12 - ref="batchModifyForm" 12 + class="fedexFormStyle"
13 - :model="batchModifyFormData" 13 + ref="batchModifyForm"
14 - :rules="batchModifyFormRules" 14 + :model="batchModifyFormData"
15 - label-position="left" 15 + :rules="batchModifyFormRules"
16 - size="small" 16 + label-position="left"
17 - > 17 + size="small"
18 - <Formitem label="修改数据" prop="modifyData"> 18 + >
19 - <el-select 19 + <Formitem label="修改数据" prop="modifyData">
20 + <el-select
20 type="text" 21 type="text"
21 v-model="batchModifyFormData.modifyData" 22 v-model="batchModifyFormData.modifyData"
22 clearable 23 clearable
23 placeholder="" 24 placeholder=""
24 - > 25 + >
25 <el-option 26 <el-option
26 - v-for="(item, index) in modifyDataList" 27 + v-for="item in modifyDataList"
27 - :key="index" 28 + :key="item.itemValue"
28 - :label="item.name" 29 + :label="item.itemChineseName"
29 - :value="item.value" 30 + :value="item.itemValue"
30 ></el-option> 31 ></el-option>
31 - </el-select> 32 + </el-select>
32 </Formitem> 33 </Formitem>
33 <Formitem label="修改内容" prop="modifyContent"> 34 <Formitem label="修改内容" prop="modifyContent">
34 - <el-input 35 + <el-input
35 - type="text" 36 + type="text"
36 - class="inputShadow" 37 + class="inputShadow"
37 - resize="none" 38 + resize="none"
38 - v-model="batchModifyFormData.modifyContent" 39 + v-model="batchModifyFormData.modifyContent"
39 - clearable 40 + clearable
40 - placeholder="请输入修改内容" 41 + placeholder="请输入修改内容"
41 - ></el-input> 42 + ></el-input>
42 </Formitem> 43 </Formitem>
43 - </el-form> 44 + </el-form>
44 - </div> 45 + </div>
45 - <div class="dialogOption entrySave revokeOperation"> 46 + <div class="dialogOption entrySave revokeOperation">
46 - <el-button 47 + <el-button
47 - class="entrySaveButton entrySaveButton-background revokeSubmitBtn" 48 + class="entrySaveButton entrySaveButton-background revokeSubmitBtn"
48 - type="primary" 49 + type="primary"
49 - @click="formSubmit" 50 + @click="formSubmit"
50 - >确定</el-button> 51 + >确定</el-button
51 - <el-button 52 + >
52 - class="entrySaveButton" 53 + <el-button class="entrySaveButton" @click="cancelModify">关闭</el-button>
53 - @click="cancelModify" 54 + </div>
54 - >关闭</el-button> 55 + </el-dialog>
55 - </div> 56 +</template>
56 - </el-dialog>
57 - </template>
58 57
59 - <script> 58 +<script>
60 - import { bathDeclareDate } from "@/api/declareData-api.js"; 59 +import { bathDeclareDate } from "@/api/declareData-api.js";
61 - export default { 60 +import { getDictData } from "@/api/system/dict-api.js";
62 - props: { 61 +export default {
63 - showDialog: { 62 + props: {
64 - type: Boolean, 63 + showDialog: {
65 - default: false, 64 + type: Boolean,
66 - }, 65 + default: false,
67 - selectedDatas:{ 66 + },
68 - type:Array, 67 + selectedDatas: {
69 - default:() => [] 68 + type: Array,
70 - }, 69 + default: () => [],
71 - }, 70 + },
72 - data() { 71 + },
73 - return { 72 + data() {
74 - batchModifyVisible:false, 73 + return {
75 - batchModifyFormData:{ 74 + batchModifyVisible: false,
76 - modifyData:'', 75 + batchModifyFormData: {
77 - modifyContent:'' 76 + modifyData: "",
78 - }, 77 + modifyContent: "",
79 - batchModifyFormRules: { 78 + },
80 - modifyData: [{ required: true, message: '请选择修改数据', trigger: 'change' }], 79 + batchModifyFormRules: {
81 - modifyContent: [{ required: true, message: '请输入修改内容', trigger: 'blur' }], 80 + modifyData: [
82 - }, 81 + { required: true, message: "请选择修改数据", trigger: "change" },
83 - modifyDataList:[ 82 + ],
84 - {name:'提运单号',value:'BILLNO'}, 83 + modifyContent: [
85 - {name:'航班航次号',value:'FLIGHT_NUMBER'}, 84 + { required: true, message: "请输入修改内容", trigger: "blur" },
86 - ] 85 + ],
87 - }; 86 + },
88 - }, 87 + modifyDataList: [
89 - watch: { 88 + { name: "提运单号", value: "BILLNO" },
90 - showDialog(val) { 89 + { name: "航班航次号", value: "FLIGHT_NUMBER" },
91 - if (val) { 90 + ],
92 - this.batchModifyVisible = val 91 + };
93 - this.batchModifyFormData.modifyData="" 92 + },
94 - this.batchModifyFormData.modifyContent="" 93 + watch: {
95 - } 94 + showDialog(val) {
96 - }, 95 + if (val) {
97 - }, 96 + this.batchModifyVisible = val;
98 - created() { 97 + this.batchModifyFormData.modifyData = "";
99 - }, 98 + this.batchModifyFormData.modifyContent = "";
100 - methods: { 99 + }
101 - formSubmit(){ 100 + },
102 - this.$refs.batchModifyForm.validate((valid) => { 101 + },
103 - if (valid) { 102 + created() {
104 - let obj = { 103 + this.getModifyDataList();
105 - declareIds: [], 104 + },
106 - modifyData: this.batchModifyFormData.modifyData, 105 + methods: {
107 - modifyContent: this.batchModifyFormData.modifyContent, 106 + getModifyDataList() {
108 - }; 107 + getDictData({ doctCode: "DATABASE_FIELD" })
109 - this.selectedDatas.forEach((item) => { 108 + .then((res) => {
110 - obj.declareIds.push(item.declareId); 109 + if (res.code == "200") {
110 + this.modifyDataList = res.data;
111 + }
112 + })
113 + .catch((err) => {
114 + console.error(err);
115 + });
116 + },
117 + formSubmit() {
118 + this.$refs.batchModifyForm.validate((valid) => {
119 + if (valid) {
120 + let obj = {
121 + declareIds: [],
122 + modifyData: this.batchModifyFormData.modifyData,
123 + modifyContent: this.batchModifyFormData.modifyContent,
124 + };
125 + this.selectedDatas.forEach((item) => {
126 + obj.declareIds.push(item.declareId);
127 + });
128 + console.log("datas==", obj);
129 + bathDeclareDate(obj)
130 + .then((res) => {
131 + if (res.code === "200") {
132 + this.msgSuccess("批量修改成功");
133 + this.cancelModify(1);
134 + } else {
135 + this.alertWarningMsg(res.message);
136 + }
137 + })
138 + .catch((err) => {
139 + console.log(err);
140 + this.alertWarningMsg(err.message);
141 + this.cancelModify(1);
111 }); 142 });
112 - console.log('datas==', obj) 143 + } else {
113 - bathDeclareDate(obj).then((res) => { 144 + return false;
114 - if (res.code === "200") { 145 + }
115 - this.msgSuccess('批量修改成功') 146 + });
116 - this.cancelModify(1) 147 + },
117 - } else {
118 - this.alertWarningMsg(res.message);
119 - }
120 -
121 - })
122 - .catch((err) => {
123 - console.log(err);
124 - this.alertWarningMsg(err.message);
125 - this.cancelModify(1)
126 - });
127 - } else {
128 - return false;
129 - }
130 - });
131 - },
132 148
133 - cancelModify(val){ 149 + cancelModify(val) {
134 - this.batchModifyVisible = false 150 + this.batchModifyVisible = false;
135 - this.$emit('cancelBatchModify',val) 151 + this.$emit("cancelBatchModify", val);
136 - } 152 + },
137 - }, 153 + },
138 - }; 154 +};
139 - </script> 155 +</script>
140 156
141 - <style lang="scss" scoped> 157 +<style lang="scss" scoped>
142 - @import "@/assets/styles/variables.scss"; 158 +@import "@/assets/styles/variables.scss";
143 - .modelItem { 159 +.modelItem {
144 - width: 100%; 160 + width: 100%;
145 - .modelItem-title { 161 + .modelItem-title {
146 - display: flex; 162 + display: flex;
147 - justify-content: space-between; 163 + justify-content: space-between;
148 - margin-bottom: 5px; 164 + margin-bottom: 5px;
149 - font-size: 14px; 165 + font-size: 14px;
150 - font-weight: 600; 166 + font-weight: 600;
151 - color: #333; 167 + color: #333;
152 - } 168 + }
153 - } 169 +}
154 - .revokeOperation{ 170 +.revokeOperation {
155 - margin-bottom:25px; 171 + margin-bottom: 25px;
156 - .revokeSubmitBtn{ 172 + .revokeSubmitBtn {
157 - margin-right: 30px; 173 + margin-right: 30px;
158 - } 174 + }
159 - } 175 +}
160 - </style> 176 +</style>
......
...@@ -187,9 +187,7 @@ ...@@ -187,9 +187,7 @@
187 type="primary" 187 type="primary"
188 class="dropdown-style-button" 188 class="dropdown-style-button"
189 :loading="loadings.departureLoading" 189 :loading="loadings.departureLoading"
190 - @click=" 190 + @click="declareData('arrivalInLoading', '运抵单申报', 'arrivalIn')"
191 - declareData('departureLoading', '运抵单申报', 'logisticsDeparture')
192 - "
193 > 191 >
194 <svg-icon 192 <svg-icon
195 class="el-icon-user-solid" 193 class="el-icon-user-solid"
...@@ -632,6 +630,7 @@ export default { ...@@ -632,6 +630,7 @@ export default {
632 exportDeclareLoading: false, 630 exportDeclareLoading: false,
633 revokeLoading: false, // 撤销单申报加载状态 631 revokeLoading: false, // 撤销单申报加载状态
634 departureLoading: false, // 离境单申报加载状态 632 departureLoading: false, // 离境单申报加载状态
633 + arrivalInLoading: false, // 运抵单申报加载状态
635 }, 634 },
636 textareaVisible: {}, 635 textareaVisible: {},
637 tableMaxheight: 500, 636 tableMaxheight: 500,
......
1 <template> 1 <template>
2 - <el-dialog 2 + <el-dialog
3 - class="entryDialog classCUploadDialog" 3 + class="entryDialog classCUploadDialog"
4 title="撤销单申报" 4 title="撤销单申报"
5 :visible.sync="cancelVisible" 5 :visible.sync="cancelVisible"
6 :show-close="false" 6 :show-close="false"
7 width="60%" 7 width="60%"
8 :close-on-click-modal="false" 8 :close-on-click-modal="false"
9 > 9 >
10 - <div> 10 + <div>
11 - <el-form class="fedexFormStyle" 11 + <el-form
12 + class="fedexFormStyle"
12 ref="cancelForm" 13 ref="cancelForm"
13 :model="cancelFormData" 14 :model="cancelFormData"
14 :rules="cancelFormRules" 15 :rules="cancelFormRules"
15 label-position="left" 16 label-position="left"
16 size="small" 17 size="small"
17 > 18 >
18 - <Formitem label="撤销原因" prop="cancellationReason"> 19 + <Formitem label="撤销原因" prop="cancellationReason">
19 - <el-select 20 + <el-select
20 - type="text" 21 + type="text"
21 - v-model="cancelFormData.cancellationReason" 22 + v-model="cancelFormData.cancellationReason"
22 - @change="changeCancellationReason" 23 + @change="changeCancellationReason"
23 - clearable 24 + clearable
24 - placeholder="" 25 + placeholder=""
25 - > 26 + >
26 - <el-option 27 + <el-option
27 - v-for="(item) in cancellationReasons" 28 + v-for="item in cancellationReasons"
28 - :key="item.itemValue" 29 + :key="item.itemValue"
29 - :label="item.itemValue" 30 + :label="item.itemValue"
30 - :value="item.itemValue" 31 + :value="item.itemValue"
31 - ></el-option> 32 + ></el-option>
32 - </el-select> 33 + </el-select>
33 - </Formitem> 34 + </Formitem>
34 - <Formitem v-if="showOtherReason" label="其他原因" prop="otherReason"> 35 + <Formitem v-if="showOtherReason" label="其他原因" prop="otherReason">
35 - <el-input 36 + <el-input
36 - type="textarea" 37 + type="textarea"
37 - class="inputShadow" 38 + class="inputShadow"
38 - resize="none" 39 + resize="none"
39 - v-model="cancelFormData.otherReason" 40 + v-model="cancelFormData.otherReason"
40 - clearable 41 + clearable
41 - placeholder="请输入其它撤销原因" 42 + placeholder="请输入其它撤销原因"
42 - ></el-input> 43 + ></el-input>
43 - </Formitem> 44 + </Formitem>
44 - </el-form> 45 + </el-form>
45 - </div> 46 + </div>
46 <div class="dialogOption entrySave revokeOperation"> 47 <div class="dialogOption entrySave revokeOperation">
47 <el-button 48 <el-button
48 class="entrySaveButton entrySaveButton-background revokeSubmitBtn" 49 class="entrySaveButton entrySaveButton-background revokeSubmitBtn"
49 type="primary" 50 type="primary"
50 @click="submitRevoke" 51 @click="submitRevoke"
51 - >提交</el-button> 52 + >提交</el-button
52 - <el-button 53 + >
53 - class="entrySaveButton" 54 + <el-button class="entrySaveButton" @click="cancelRevoke">取消</el-button>
54 - @click="cancelRevoke"
55 - >取消</el-button>
56 </div> 55 </div>
57 -</el-dialog> 56 + </el-dialog>
58 </template> 57 </template>
59 58
60 - <script> 59 +<script>
61 - import { declareDataUpload } from "@/api/declareData-api.js"; 60 +import { declareDataUpload } from "@/api/declareData-api.js";
62 - import { getDictData } from '@/api/system/dict-api.js' 61 +import { getDictData } from "@/api/system/dict-api.js";
63 - export default { 62 +export default {
64 - props: { 63 + props: {
65 - showDialog: { 64 + showDialog: {
66 - type: Boolean, 65 + type: Boolean,
67 - default: false, 66 + default: false,
68 - },
69 - selectedDatas:{
70 - type:Array,
71 - default:() => []
72 - },
73 - dropdownCode: {
74 - type: String,
75 - default: 'full',
76 - },
77 }, 67 },
78 - data() { 68 + selectedDatas: {
79 - return { 69 + type: Array,
80 - cancelVisible:false, 70 + default: () => [],
81 - showOtherReason:false, 71 + },
82 - cancellationReasons:[], 72 + dropdownCode: {
83 - cancelFormData:{ 73 + type: String,
84 - cancellationReason:'', 74 + default: "full",
85 - otherReason:'', 75 + },
76 + },
77 + data() {
78 + return {
79 + cancelVisible: false,
80 + showOtherReason: false,
81 + cancellationReasons: [],
82 + cancelFormData: {
83 + cancellationReason: "",
84 + otherReason: "",
86 }, 85 },
87 cancelFormRules: { 86 cancelFormRules: {
88 cancellationReason: [ 87 cancellationReason: [
89 - { required: true, message: '请选择撤销原因', trigger: 'change' } 88 + { required: true, message: "请选择撤销原因", trigger: "change" },
90 - ], 89 + ],
91 - otherReason:[ 90 + otherReason: [
92 - { required: true, message: '请输入撤销原因', trigger: 'blur' } 91 + { required: true, message: "请输入撤销原因", trigger: "blur" },
93 - ] 92 + ],
93 + },
94 + };
95 + },
96 + watch: {
97 + showDialog(val) {
98 + if (val) {
99 + this.cancelVisible = val;
94 } 100 }
95 - };
96 }, 101 },
97 - watch: {
98 - showDialog(val) {
99 - if (val) {
100 - this.cancelVisible = val
101 - }
102 - },
103 }, 102 },
104 created() { 103 created() {
105 - this.getCancellationReasons() 104 + this.getCancellationReasons();
106 }, 105 },
107 - methods: { 106 + methods: {
108 - getCancellationReasons(){ 107 + getCancellationReasons() {
109 - getDictData({doctCode:'CANCELLATION_REASON'}).then(res =>{ 108 + getDictData({ doctCode: "CANCELLATION_REASON" })
110 - if (res.code == '200') { 109 + .then((res) => {
111 - this.cancellationReasons = res.data 110 + if (res.code == "200") {
112 - } 111 + this.cancellationReasons = res.data;
113 - }).catch(err =>{ 112 + }
114 - console.error(err) 113 + })
115 - }) 114 + .catch((err) => {
115 + console.error(err);
116 + });
116 }, 117 },
117 - changeCancellationReason(ev){ 118 + changeCancellationReason(ev) {
118 - if (ev == '手工输入') { 119 + if (ev == "手工输入") {
119 - this.showOtherReason = true 120 + this.showOtherReason = true;
120 } else { 121 } else {
121 - this.showOtherReason = false 122 + this.showOtherReason = false;
122 -
123 } 123 }
124 }, 124 },
125 - submitRevoke(){ 125 + submitRevoke() {
126 if (!this.showOtherReason) { 126 if (!this.showOtherReason) {
127 - this.cancelFormData.otherReason = '' 127 + this.cancelFormData.otherReason = "";
128 } 128 }
129 this.$refs.cancelForm.validate((valid) => { 129 this.$refs.cancelForm.validate((valid) => {
130 - if (valid) { 130 + if (valid) {
131 let obj = { 131 let obj = {
132 - cancellationReason: this.cancelFormData.otherReason || this.cancelFormData.cancellationReason, 132 + cancellationReason:
133 - declareIds: [], 133 + this.cancelFormData.otherReason ||
134 - type: this.dropdownCode, 134 + this.cancelFormData.cancellationReason,
135 - }; 135 + declareIds: [],
136 - this.selectedDatas.forEach((item) => { 136 + type: this.dropdownCode,
137 - obj.declareIds.push(item.declareId); 137 + };
138 + this.selectedDatas.forEach((item) => {
139 + obj.declareIds.push(item.declareId);
140 + });
141 + console.log("datas==", obj);
142 + declareDataUpload(obj)
143 + .then((res) => {
144 + if (res.code === "200") {
145 + // this.alertSuccessMsg(res.message);
146 + this.alertSuccessMsg("数据已成功提交申报,请等待海关回执。");
147 + } else {
148 + this.alertWarningMsg(res.message);
149 + }
150 + this.cancelRevoke();
151 + })
152 + .catch((err) => {
153 + console.log(err);
154 + this.cancelRevoke();
138 }); 155 });
139 - console.log('datas==', obj)
140 - declareDataUpload(obj)
141 - .then((res) => {
142 - if (res.code === "200") {
143 - // this.alertSuccessMsg(res.message);
144 - this.alertSuccessMsg("数据已成功提交申报,请等待海关回执。");
145 - } else {
146 - this.alertWarningMsg(res.message);
147 - }
148 - this.cancelRevoke()
149 - })
150 - .catch((err) => {
151 - console.log(err);
152 - this.cancelRevoke()
153 - });
154 } else { 156 } else {
155 - return false; 157 + return false;
156 - } 158 + }
157 - }); 159 + });
158 }, 160 },
159 161
160 - cancelRevoke(){ 162 + cancelRevoke() {
161 - this.cancelVisible = false 163 + this.cancelVisible = false;
162 - this.showOtherReason = false 164 + this.showOtherReason = false;
163 - this.cancelFormData.cancellationReason = '' 165 + this.cancelFormData.cancellationReason = "";
164 - this.cancelFormData.otherReason = '' 166 + this.cancelFormData.otherReason = "";
165 - this.$emit('cancelRevoke') 167 + this.$emit("cancelRevoke");
166 - }
167 }, 168 },
168 - }; 169 + },
169 - </script> 170 +};
171 +</script>
170 172
171 - <style lang="scss" scoped> 173 +<style lang="scss" scoped>
172 - @import "@/assets/styles/variables.scss"; 174 +@import "@/assets/styles/variables.scss";
173 - .modelItem { 175 +.modelItem {
174 - width: 100%; 176 + width: 100%;
175 - .modelItem-title { 177 + .modelItem-title {
176 - display: flex; 178 + display: flex;
177 - justify-content: space-between; 179 + justify-content: space-between;
178 - margin-bottom: 5px; 180 + margin-bottom: 5px;
179 - font-size: 14px; 181 + font-size: 14px;
180 - font-weight: 600; 182 + font-weight: 600;
181 - color: #333; 183 + color: #333;
182 - }
183 } 184 }
184 - .revokeOperation{ 185 +}
185 - margin-bottom:25px; 186 +.revokeOperation {
186 - .revokeSubmitBtn{ 187 + margin-bottom: 25px;
188 + .revokeSubmitBtn {
187 margin-right: 30px; 189 margin-right: 30px;
188 } 190 }
189 } 191 }
190 - </style> 192 +</style>
......