zhanbo.xu

feat: 开发运抵

...@@ -8,7 +8,8 @@ ...@@ -8,7 +8,8 @@
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="batchModifyForm" 13 ref="batchModifyForm"
13 :model="batchModifyFormData" 14 :model="batchModifyFormData"
14 :rules="batchModifyFormRules" 15 :rules="batchModifyFormRules"
...@@ -23,10 +24,10 @@ ...@@ -23,10 +24,10 @@
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>
...@@ -47,58 +48,73 @@ ...@@ -47,58 +48,73 @@
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 - >关闭</el-button>
55 </div> 54 </div>
56 </el-dialog> 55 </el-dialog>
57 - </template> 56 +</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";
61 +export default {
62 props: { 62 props: {
63 showDialog: { 63 showDialog: {
64 type: Boolean, 64 type: Boolean,
65 default: false, 65 default: false,
66 }, 66 },
67 - selectedDatas:{ 67 + selectedDatas: {
68 - type:Array, 68 + type: Array,
69 - default:() => [] 69 + default: () => [],
70 }, 70 },
71 }, 71 },
72 data() { 72 data() {
73 return { 73 return {
74 - batchModifyVisible:false, 74 + batchModifyVisible: false,
75 - batchModifyFormData:{ 75 + batchModifyFormData: {
76 - modifyData:'', 76 + modifyData: "",
77 - modifyContent:'' 77 + modifyContent: "",
78 }, 78 },
79 batchModifyFormRules: { 79 batchModifyFormRules: {
80 - modifyData: [{ required: true, message: '请选择修改数据', trigger: 'change' }], 80 + modifyData: [
81 - modifyContent: [{ required: true, message: '请输入修改内容', trigger: 'blur' }], 81 + { required: true, message: "请选择修改数据", trigger: "change" },
82 + ],
83 + modifyContent: [
84 + { required: true, message: "请输入修改内容", trigger: "blur" },
85 + ],
82 }, 86 },
83 - modifyDataList:[ 87 + modifyDataList: [
84 - {name:'提运单号',value:'BILLNO'}, 88 + { name: "提运单号", value: "BILLNO" },
85 - {name:'航班航次号',value:'FLIGHT_NUMBER'}, 89 + { name: "航班航次号", value: "FLIGHT_NUMBER" },
86 - ] 90 + ],
87 }; 91 };
88 }, 92 },
89 watch: { 93 watch: {
90 showDialog(val) { 94 showDialog(val) {
91 if (val) { 95 if (val) {
92 - this.batchModifyVisible = val 96 + this.batchModifyVisible = val;
93 - this.batchModifyFormData.modifyData="" 97 + this.batchModifyFormData.modifyData = "";
94 - this.batchModifyFormData.modifyContent="" 98 + this.batchModifyFormData.modifyContent = "";
95 } 99 }
96 }, 100 },
97 }, 101 },
98 created() { 102 created() {
103 + this.getModifyDataList();
99 }, 104 },
100 methods: { 105 methods: {
101 - formSubmit(){ 106 + getModifyDataList() {
107 + getDictData({ doctCode: "DATABASE_FIELD" })
108 + .then((res) => {
109 + if (res.code == "200") {
110 + this.modifyDataList = res.data;
111 + }
112 + })
113 + .catch((err) => {
114 + console.error(err);
115 + });
116 + },
117 + formSubmit() {
102 this.$refs.batchModifyForm.validate((valid) => { 118 this.$refs.batchModifyForm.validate((valid) => {
103 if (valid) { 119 if (valid) {
104 let obj = { 120 let obj = {
...@@ -109,20 +125,20 @@ ...@@ -109,20 +125,20 @@
109 this.selectedDatas.forEach((item) => { 125 this.selectedDatas.forEach((item) => {
110 obj.declareIds.push(item.declareId); 126 obj.declareIds.push(item.declareId);
111 }); 127 });
112 - console.log('datas==', obj) 128 + console.log("datas==", obj);
113 - bathDeclareDate(obj).then((res) => { 129 + bathDeclareDate(obj)
130 + .then((res) => {
114 if (res.code === "200") { 131 if (res.code === "200") {
115 - this.msgSuccess('批量修改成功') 132 + this.msgSuccess("批量修改成功");
116 - this.cancelModify(1) 133 + this.cancelModify(1);
117 } else { 134 } else {
118 this.alertWarningMsg(res.message); 135 this.alertWarningMsg(res.message);
119 } 136 }
120 -
121 }) 137 })
122 .catch((err) => { 138 .catch((err) => {
123 console.log(err); 139 console.log(err);
124 this.alertWarningMsg(err.message); 140 this.alertWarningMsg(err.message);
125 - this.cancelModify(1) 141 + this.cancelModify(1);
126 }); 142 });
127 } else { 143 } else {
128 return false; 144 return false;
...@@ -130,17 +146,17 @@ ...@@ -130,17 +146,17 @@
130 }); 146 });
131 }, 147 },
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 - }
137 }, 152 },
138 - }; 153 + },
139 - </script> 154 +};
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;
...@@ -150,11 +166,11 @@ ...@@ -150,11 +166,11 @@
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,
......
...@@ -8,7 +8,8 @@ ...@@ -8,7 +8,8 @@
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"
...@@ -24,7 +25,7 @@ ...@@ -24,7 +25,7 @@
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"
...@@ -48,95 +49,96 @@ ...@@ -48,95 +49,96 @@
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 }, 67 },
69 - selectedDatas:{ 68 + selectedDatas: {
70 - type:Array, 69 + type: Array,
71 - default:() => [] 70 + default: () => [],
72 }, 71 },
73 dropdownCode: { 72 dropdownCode: {
74 type: String, 73 type: String,
75 - default: 'full', 74 + default: "full",
76 }, 75 },
77 }, 76 },
78 data() { 77 data() {
79 return { 78 return {
80 - cancelVisible:false, 79 + cancelVisible: false,
81 - showOtherReason:false, 80 + showOtherReason: false,
82 - cancellationReasons:[], 81 + cancellationReasons: [],
83 - cancelFormData:{ 82 + cancelFormData: {
84 - cancellationReason:'', 83 + cancellationReason: "",
85 - otherReason:'', 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 + ],
94 - } 93 + },
95 }; 94 };
96 }, 95 },
97 watch: { 96 watch: {
98 showDialog(val) { 97 showDialog(val) {
99 if (val) { 98 if (val) {
100 - this.cancelVisible = val 99 + this.cancelVisible = val;
101 } 100 }
102 }, 101 },
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") {
111 + this.cancellationReasons = res.data;
112 } 112 }
113 - }).catch(err =>{
114 - console.error(err)
115 }) 113 })
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 + this.cancelFormData.otherReason ||
134 + this.cancelFormData.cancellationReason,
133 declareIds: [], 135 declareIds: [],
134 type: this.dropdownCode, 136 type: this.dropdownCode,
135 }; 137 };
136 this.selectedDatas.forEach((item) => { 138 this.selectedDatas.forEach((item) => {
137 obj.declareIds.push(item.declareId); 139 obj.declareIds.push(item.declareId);
138 }); 140 });
139 - console.log('datas==', obj) 141 + console.log("datas==", obj);
140 declareDataUpload(obj) 142 declareDataUpload(obj)
141 .then((res) => { 143 .then((res) => {
142 if (res.code === "200") { 144 if (res.code === "200") {
...@@ -145,11 +147,11 @@ ...@@ -145,11 +147,11 @@
145 } else { 147 } else {
146 this.alertWarningMsg(res.message); 148 this.alertWarningMsg(res.message);
147 } 149 }
148 - this.cancelRevoke() 150 + this.cancelRevoke();
149 }) 151 })
150 .catch((err) => { 152 .catch((err) => {
151 console.log(err); 153 console.log(err);
152 - this.cancelRevoke() 154 + this.cancelRevoke();
153 }); 155 });
154 } else { 156 } else {
155 return false; 157 return false;
...@@ -157,20 +159,20 @@ ...@@ -157,20 +159,20 @@
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;
...@@ -180,11 +182,11 @@ ...@@ -180,11 +182,11 @@
180 font-weight: 600; 182 font-weight: 600;
181 color: #333; 183 color: #333;
182 } 184 }
183 - } 185 +}
184 - .revokeOperation{ 186 +.revokeOperation {
185 - margin-bottom:25px; 187 + margin-bottom: 25px;
186 - .revokeSubmitBtn{ 188 + .revokeSubmitBtn {
187 margin-right: 30px; 189 margin-right: 30px;
188 } 190 }
189 } 191 }
190 - </style> 192 +</style>
......