Showing
14 changed files
with
641 additions
and
55 deletions
| ... | @@ -183,6 +183,14 @@ export function updateDeclareData(data) { | ... | @@ -183,6 +183,14 @@ export function updateDeclareData(data) { |
| 183 | data | 183 | data |
| 184 | }) | 184 | }) |
| 185 | } | 185 | } |
| 186 | +//申报数据批量修改-航班号,运单号 | ||
| 187 | +export function bathDeclareDate(data) { | ||
| 188 | + return request({ | ||
| 189 | + url: '/bus-customer/declareData/bathDeclareDate', | ||
| 190 | + method: 'post', | ||
| 191 | + data | ||
| 192 | + }) | ||
| 193 | +} | ||
| 186 | 194 | ||
| 187 | 195 | ||
| 188 | 196 | ... | ... |
| ... | @@ -67,6 +67,17 @@ export function uploadCertificate(ecomEntCode, certificate) { | ... | @@ -67,6 +67,17 @@ export function uploadCertificate(ecomEntCode, certificate) { |
| 67 | data: formData, | 67 | data: formData, |
| 68 | }); | 68 | }); |
| 69 | } | 69 | } |
| 70 | +//上传青岛证书 | ||
| 71 | +export function uploadQingdaoCertificate(ecomEntCode, certificate) { | ||
| 72 | + const formData = new FormData(); | ||
| 73 | + formData.append('certificate', certificate); | ||
| 74 | + formData.append('ecomEntCode', ecomEntCode); | ||
| 75 | + return request({ | ||
| 76 | + url: '/bus-customer/customers/uploadQingDaoCertificate', | ||
| 77 | + method: 'post', | ||
| 78 | + data: formData, | ||
| 79 | + }); | ||
| 80 | +} | ||
| 70 | 81 | ||
| 71 | //删除证书 | 82 | //删除证书 |
| 72 | export function delCertificate(id, certificate) { | 83 | export function delCertificate(id, certificate) { |
| ... | @@ -77,6 +88,15 @@ export function delCertificate(id, certificate) { | ... | @@ -77,6 +88,15 @@ export function delCertificate(id, certificate) { |
| 77 | params: {id:id,certificate:certificate}, | 88 | params: {id:id,certificate:certificate}, |
| 78 | }); | 89 | }); |
| 79 | } | 90 | } |
| 91 | +//删除青岛证书 | ||
| 92 | +export function delQingdaoCertificate(id, certificate) { | ||
| 93 | + | ||
| 94 | + return request({ | ||
| 95 | + url: '/bus-customer/customers/deleteQingdaoCertificate', | ||
| 96 | + method: 'post', | ||
| 97 | + params: {id:id,certificate:certificate}, | ||
| 98 | + }); | ||
| 99 | +} | ||
| 80 | 100 | ||
| 81 | //下载证书 | 101 | //下载证书 |
| 82 | export function downloadCertificate(id,filename) { | 102 | export function downloadCertificate(id,filename) { | ... | ... |
src/assets/images/fold.png
0 → 100644
548 Bytes
src/assets/images/unfold.png
0 → 100644
571 Bytes
| ... | @@ -24,7 +24,7 @@ router.beforeEach((to, from, next) => { | ... | @@ -24,7 +24,7 @@ router.beforeEach((to, from, next) => { |
| 24 | store.dispatch('GetInfo').then((res) => { | 24 | store.dispatch('GetInfo').then((res) => { |
| 25 | // if (res.success) { | 25 | // if (res.success) { |
| 26 | store.dispatch('GenerateRoutes').then(accessRoutes => { | 26 | store.dispatch('GenerateRoutes').then(accessRoutes => { |
| 27 | - store.dispatch("GetDict", ['DECLARE_F_FLAG', 'MEASUREMENT_UNIT','PACKAGE_TYPE_CODE', 'RECEIPT_STATUS', 'DECLARE_APPTYPE', 'CURRENCY','COUNTRY_REGION_CODE', 'DECLARE_STATISTICS_FLAG', 'ORDER_DECLARATION_PARTY','APP_STATUS']); | 27 | + store.dispatch("GetDict", ['DECLARE_F_FLAG', 'MEASUREMENT_UNIT','TEMPLATE_TYPE','PACKAGE_TYPE_CODE', 'RECEIPT_STATUS', 'DECLARE_APPTYPE', 'CURRENCY','COUNTRY_REGION_CODE', 'DECLARE_STATISTICS_FLAG', 'ORDER_DECLARATION_PARTY','APP_STATUS']); |
| 28 | // 根据roles权限生成可访问的路由表 | 28 | // 根据roles权限生成可访问的路由表 |
| 29 | router.addRoutes(accessRoutes) // 动态添加可访问路由表 | 29 | router.addRoutes(accessRoutes) // 动态添加可访问路由表 |
| 30 | next({ ...to, replace: true }) // hack方法 确保addRoutes已完成 | 30 | next({ ...to, replace: true }) // hack方法 确保addRoutes已完成 | ... | ... |
| ... | @@ -101,6 +101,8 @@ service.interceptors.response.use(res => { | ... | @@ -101,6 +101,8 @@ service.interceptors.response.use(res => { |
| 101 | dangerouslyUseHTMLString: true | 101 | dangerouslyUseHTMLString: true |
| 102 | }); | 102 | }); |
| 103 | return Promise.reject(new Error(msg)) | 103 | return Promise.reject(new Error(msg)) |
| 104 | + } else if (code === 530) { | ||
| 105 | + store.dispatch('FedLogOut') | ||
| 104 | } else if (code !== 200) { | 106 | } else if (code !== 200) { |
| 105 | // MessageBox.alert(msg, '注意', { | 107 | // MessageBox.alert(msg, '注意', { |
| 106 | // dangerouslyUseHTMLString: true | 108 | // dangerouslyUseHTMLString: true | ... | ... |
This diff is collapsed. Click to expand it.
| ... | @@ -334,7 +334,8 @@ export default { | ... | @@ -334,7 +334,8 @@ export default { |
| 334 | update(val) { | 334 | update(val) { |
| 335 | let data={ | 335 | let data={ |
| 336 | ...val, | 336 | ...val, |
| 337 | - file:null | 337 | + file:null, |
| 338 | + qingdaoFile:null | ||
| 338 | } | 339 | } |
| 339 | this.dialogTitle = "修改客户"; | 340 | this.dialogTitle = "修改客户"; |
| 340 | this.editType = "update"; | 341 | this.editType = "update"; | ... | ... |
| 1 | <template> | 1 | <template> |
| 2 | - <div> | 2 | + <div style="height: 100%;"> |
| 3 | <el-form | 3 | <el-form |
| 4 | - class="fedexFormStyle" | 4 | + class="fedexFormStyle fedexRowEditFormStyle" |
| 5 | - ref="editForm" | 5 | + ref="editRowForm" |
| 6 | :model="tableRowformData" | 6 | :model="tableRowformData" |
| 7 | :rules="tableRowFormRules" | 7 | :rules="tableRowFormRules" |
| 8 | label-position="top" | 8 | label-position="top" |
| ... | @@ -236,7 +236,7 @@ | ... | @@ -236,7 +236,7 @@ |
| 236 | ></el-input> | 236 | ></el-input> |
| 237 | </Formitem> | 237 | </Formitem> |
| 238 | </el-col> | 238 | </el-col> |
| 239 | - <el-col :span="4"> | 239 | + <el-col :span="8"> |
| 240 | <Formitem label="备注" prop="remark"> | 240 | <Formitem label="备注" prop="remark"> |
| 241 | <el-input | 241 | <el-input |
| 242 | type="text" | 242 | type="text" |
| ... | @@ -267,7 +267,47 @@ | ... | @@ -267,7 +267,47 @@ |
| 267 | data() { | 267 | data() { |
| 268 | return { | 268 | return { |
| 269 | tableRowformData:{}, | 269 | tableRowformData:{}, |
| 270 | - tableRowFormRules:{} | 270 | + tableRowFormRules:{ |
| 271 | + enterpriseProductCode: [ | ||
| 272 | + { required: true, message: '请输入企业商品货号', trigger: 'blur' }, | ||
| 273 | + ], | ||
| 274 | + enterpriseProductName: [ | ||
| 275 | + { required: true, message: '请输入企业商品名称', trigger: 'blur' } | ||
| 276 | + ], | ||
| 277 | + productName: [ | ||
| 278 | + { required: true, message: '请输入商品名称', trigger: 'blur' } | ||
| 279 | + ], | ||
| 280 | + productCode: [ | ||
| 281 | + { required: true, message: '请输入商品编码', trigger: 'blur' } | ||
| 282 | + ], | ||
| 283 | + model: [ | ||
| 284 | + { required: true, message: '请输入规格型号', trigger: 'blur' } | ||
| 285 | + ], | ||
| 286 | + destinationCountryRegionCode: [ | ||
| 287 | + { required: true, message: '请选择目的国(地区)代码', trigger: 'change' } | ||
| 288 | + ], | ||
| 289 | + unit: [ | ||
| 290 | + { required: true, message: '请选择计量单位', trigger: 'change' } | ||
| 291 | + ], | ||
| 292 | + qty: [ | ||
| 293 | + { required: true, message: '请输入数量', trigger: 'blur' } | ||
| 294 | + ], | ||
| 295 | + legalQty: [ | ||
| 296 | + { required: true, message: '请输入法定数量', trigger: 'blur' } | ||
| 297 | + ], | ||
| 298 | + currency: [ | ||
| 299 | + { required: true, message: '请选择币制', trigger: 'change' } | ||
| 300 | + ], | ||
| 301 | + price: [ | ||
| 302 | + { required: true, message: '请输入单价', trigger: 'blur' } | ||
| 303 | + ], | ||
| 304 | + totalPrice: [ | ||
| 305 | + { required: true, message: '请输入总价', trigger: 'blur' } | ||
| 306 | + ], | ||
| 307 | + netWeight: [ | ||
| 308 | + { required: true, message: '请输入净重', trigger: 'blur' } | ||
| 309 | + ], | ||
| 310 | + } | ||
| 271 | }; | 311 | }; |
| 272 | }, | 312 | }, |
| 273 | watch: { | 313 | watch: { |
| ... | @@ -275,8 +315,14 @@ | ... | @@ -275,8 +315,14 @@ |
| 275 | }, | 315 | }, |
| 276 | methods: { | 316 | methods: { |
| 277 | rowFormDataSave(){ | 317 | rowFormDataSave(){ |
| 278 | - this.$emit('rowFormDataSave', {gnum: this.rowDatas.row.gnum, tableRowformData: this.tableRowformData}) | 318 | + this.$refs.editRowForm.validate((valid) => { |
| 279 | - this.tableRowformData = {} | 319 | + if (valid) { |
| 320 | + this.$emit('rowFormDataSave', {gnum: this.rowDatas.row.gnum, tableRowformData: this.tableRowformData}) | ||
| 321 | + this.tableRowformData = {} | ||
| 322 | + } else { | ||
| 323 | + return false; | ||
| 324 | + } | ||
| 325 | + }) | ||
| 280 | }, | 326 | }, |
| 281 | cancelEditRowData(){ | 327 | cancelEditRowData(){ |
| 282 | this.tableRowformData = {} | 328 | this.tableRowformData = {} |
| ... | @@ -313,5 +359,17 @@ | ... | @@ -313,5 +359,17 @@ |
| 313 | } | 359 | } |
| 314 | } | 360 | } |
| 315 | } | 361 | } |
| 362 | + .fedexRowEditFormStyle .el-form-item{ | ||
| 363 | + background-color: #ffffff; | ||
| 364 | + box-shadow: 0 2px 4px 0 #E5F2F8CC; | ||
| 365 | + border-left: 1px solid #E5F2F8CC; | ||
| 366 | + // margin-bottom: 30px; | ||
| 367 | + } | ||
| 368 | + .fedexRowEditFormStyle .el-form-item:has(.formError){ | ||
| 369 | + margin-bottom: 25px!important; | ||
| 370 | + } | ||
| 371 | + .fedexRowEditFormStyle .activeBorder{ | ||
| 372 | + border-left: 3px solid #007AB7; | ||
| 373 | + } | ||
| 316 | </style> | 374 | </style> |
| 317 | 375 | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
This diff is collapsed. Click to expand it.
src/views/reportingData/batchModify.vue
0 → 100644
| 1 | +<template> | ||
| 2 | + <el-dialog | ||
| 3 | + class="entryDialog classCUploadDialog" | ||
| 4 | + title="批量修改" | ||
| 5 | + :visible.sync="batchModifyVisible" | ||
| 6 | + :show-close="false" | ||
| 7 | + width="60%" | ||
| 8 | + :close-on-click-modal="false" | ||
| 9 | + > | ||
| 10 | + <div> | ||
| 11 | + <el-form class="fedexFormStyle" | ||
| 12 | + ref="batchModifyForm" | ||
| 13 | + :model="batchModifyFormData" | ||
| 14 | + :rules="batchModifyFormRules" | ||
| 15 | + label-position="left" | ||
| 16 | + size="small" | ||
| 17 | + > | ||
| 18 | + <Formitem label="修改数据" prop="modifyData"> | ||
| 19 | + <el-select | ||
| 20 | + type="text" | ||
| 21 | + v-model="batchModifyFormData.modifyData" | ||
| 22 | + clearable | ||
| 23 | + placeholder="" | ||
| 24 | + > | ||
| 25 | + <el-option | ||
| 26 | + v-for="(item, index) in modifyDataList" | ||
| 27 | + :key="index" | ||
| 28 | + :label="item.name" | ||
| 29 | + :value="item.value" | ||
| 30 | + ></el-option> | ||
| 31 | + </el-select> | ||
| 32 | + </Formitem> | ||
| 33 | + <Formitem label="修改内容" prop="modifyContent"> | ||
| 34 | + <el-input | ||
| 35 | + type="text" | ||
| 36 | + class="inputShadow" | ||
| 37 | + resize="none" | ||
| 38 | + v-model="batchModifyFormData.modifyContent" | ||
| 39 | + clearable | ||
| 40 | + placeholder="请输入修改内容" | ||
| 41 | + ></el-input> | ||
| 42 | + </Formitem> | ||
| 43 | + </el-form> | ||
| 44 | + </div> | ||
| 45 | + <div class="dialogOption entrySave revokeOperation"> | ||
| 46 | + <el-button | ||
| 47 | + class="entrySaveButton entrySaveButton-background revokeSubmitBtn" | ||
| 48 | + type="primary" | ||
| 49 | + @click="formSubmit" | ||
| 50 | + >确定</el-button> | ||
| 51 | + <el-button | ||
| 52 | + class="entrySaveButton" | ||
| 53 | + @click="cancelModify" | ||
| 54 | + >关闭</el-button> | ||
| 55 | + </div> | ||
| 56 | + </el-dialog> | ||
| 57 | + </template> | ||
| 58 | + | ||
| 59 | + <script> | ||
| 60 | + import { bathDeclareDate } from "@/api/declareData-api.js"; | ||
| 61 | + export default { | ||
| 62 | + props: { | ||
| 63 | + showDialog: { | ||
| 64 | + type: Boolean, | ||
| 65 | + default: false, | ||
| 66 | + }, | ||
| 67 | + selectedDatas:{ | ||
| 68 | + type:Array, | ||
| 69 | + default:() => [] | ||
| 70 | + }, | ||
| 71 | + }, | ||
| 72 | + data() { | ||
| 73 | + return { | ||
| 74 | + batchModifyVisible:false, | ||
| 75 | + batchModifyFormData:{ | ||
| 76 | + modifyData:'', | ||
| 77 | + modifyContent:'' | ||
| 78 | + }, | ||
| 79 | + batchModifyFormRules: { | ||
| 80 | + modifyData: [{ required: true, message: '请选择修改数据', trigger: 'change' }], | ||
| 81 | + modifyContent: [{ required: true, message: '请输入修改内容', trigger: 'blur' }], | ||
| 82 | + }, | ||
| 83 | + modifyDataList:[ | ||
| 84 | + {name:'提运单号',value:'BILLNO'}, | ||
| 85 | + {name:'航班航次号',value:'FLIGHT_NUMBER'}, | ||
| 86 | + ] | ||
| 87 | + }; | ||
| 88 | + }, | ||
| 89 | + watch: { | ||
| 90 | + showDialog(val) { | ||
| 91 | + if (val) { | ||
| 92 | + this.batchModifyVisible = val | ||
| 93 | + this.batchModifyFormData.modifyData="" | ||
| 94 | + this.batchModifyFormData.modifyContent="" | ||
| 95 | + } | ||
| 96 | + }, | ||
| 97 | + }, | ||
| 98 | + created() { | ||
| 99 | + }, | ||
| 100 | + methods: { | ||
| 101 | + formSubmit(){ | ||
| 102 | + this.$refs.batchModifyForm.validate((valid) => { | ||
| 103 | + if (valid) { | ||
| 104 | + let obj = { | ||
| 105 | + declareIds: [], | ||
| 106 | + modifyData: this.batchModifyFormData.modifyData, | ||
| 107 | + modifyContent: this.batchModifyFormData.modifyContent, | ||
| 108 | + }; | ||
| 109 | + this.selectedDatas.forEach((item) => { | ||
| 110 | + obj.declareIds.push(item.declareId); | ||
| 111 | + }); | ||
| 112 | + console.log('datas==', obj) | ||
| 113 | + bathDeclareDate(obj).then((res) => { | ||
| 114 | + if (res.code === "200") { | ||
| 115 | + this.msgSuccess('批量修改成功') | ||
| 116 | + this.cancelModify() | ||
| 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() | ||
| 126 | + }); | ||
| 127 | + } else { | ||
| 128 | + return false; | ||
| 129 | + } | ||
| 130 | + }); | ||
| 131 | + }, | ||
| 132 | + | ||
| 133 | + cancelModify(){ | ||
| 134 | + this.batchModifyVisible = false | ||
| 135 | + this.$emit('cancelBatchModify') | ||
| 136 | + } | ||
| 137 | + }, | ||
| 138 | + }; | ||
| 139 | + </script> | ||
| 140 | + | ||
| 141 | + <style lang="scss" scoped> | ||
| 142 | + @import "@/assets/styles/variables.scss"; | ||
| 143 | + .modelItem { | ||
| 144 | + width: 100%; | ||
| 145 | + .modelItem-title { | ||
| 146 | + display: flex; | ||
| 147 | + justify-content: space-between; | ||
| 148 | + margin-bottom: 5px; | ||
| 149 | + font-size: 14px; | ||
| 150 | + font-weight: 600; | ||
| 151 | + color: #333; | ||
| 152 | + } | ||
| 153 | + } | ||
| 154 | + .revokeOperation{ | ||
| 155 | + margin-bottom:25px; | ||
| 156 | + .revokeSubmitBtn{ | ||
| 157 | + margin-right: 30px; | ||
| 158 | + } | ||
| 159 | + } | ||
| 160 | + </style> | ||
| 161 | + | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
src/views/reportingData/exportDialog.vue
0 → 100644
| 1 | +<template> | ||
| 2 | + <el-dialog | ||
| 3 | + class="entryDialog classCUploadDialog" | ||
| 4 | + title="申报数据导出" | ||
| 5 | + :visible.sync="datasExportVisible" | ||
| 6 | + :show-close="false" | ||
| 7 | + width="60%" | ||
| 8 | + :close-on-click-modal="false" | ||
| 9 | + > | ||
| 10 | + <div> | ||
| 11 | + <el-form class="fedexFormStyle" | ||
| 12 | + ref="selectTemplateForm" | ||
| 13 | + :model="selectTemplateFormData" | ||
| 14 | + :rules="selectTemplateFormRules" | ||
| 15 | + label-position="left" | ||
| 16 | + size="small" | ||
| 17 | + > | ||
| 18 | + <Formitem label="模板类型" prop="dataSource"> | ||
| 19 | + <el-select | ||
| 20 | + type="text" | ||
| 21 | + v-model="selectTemplateFormData.dataSource" | ||
| 22 | + clearable | ||
| 23 | + placeholder="" | ||
| 24 | + > | ||
| 25 | + <el-option | ||
| 26 | + v-for="(item, index) in $store.getters.dict.TEMPLATE_TYPE" | ||
| 27 | + :key="index" | ||
| 28 | + :label="item.itemChineseName" | ||
| 29 | + :value="item.itemValue" | ||
| 30 | + ></el-option> | ||
| 31 | + </el-select> | ||
| 32 | + </Formitem> | ||
| 33 | + </el-form> | ||
| 34 | + </div> | ||
| 35 | + <div class="dialogOption entrySave revokeOperation"> | ||
| 36 | + <el-button | ||
| 37 | + class="entrySaveButton entrySaveButton-background revokeSubmitBtn" | ||
| 38 | + type="primary" | ||
| 39 | + @click="startDownload" | ||
| 40 | + >确定</el-button> | ||
| 41 | + <el-button | ||
| 42 | + class="entrySaveButton" | ||
| 43 | + @click="cancelDownload" | ||
| 44 | + >关闭</el-button> | ||
| 45 | + </div> | ||
| 46 | + </el-dialog> | ||
| 47 | + </template> | ||
| 48 | + | ||
| 49 | + <script> | ||
| 50 | + export default { | ||
| 51 | + props: { | ||
| 52 | + showDialog: { | ||
| 53 | + type: Boolean, | ||
| 54 | + default: false, | ||
| 55 | + } | ||
| 56 | + }, | ||
| 57 | + data() { | ||
| 58 | + return { | ||
| 59 | + datasExportVisible:false, | ||
| 60 | + selectTemplateFormData:{ | ||
| 61 | + dataSource:'' | ||
| 62 | + }, | ||
| 63 | + selectTemplateFormRules: { | ||
| 64 | + dataSource: [ | ||
| 65 | + { required: true, message: '请选择模板类型', trigger: 'change' } | ||
| 66 | + ], | ||
| 67 | + } | ||
| 68 | + }; | ||
| 69 | + }, | ||
| 70 | + watch: { | ||
| 71 | + showDialog(val) { | ||
| 72 | + if (val) { | ||
| 73 | + this.datasExportVisible = val | ||
| 74 | + this.selectTemplateFormData.dataSource="" | ||
| 75 | + } | ||
| 76 | + }, | ||
| 77 | + }, | ||
| 78 | + created() { | ||
| 79 | + }, | ||
| 80 | + methods: { | ||
| 81 | + startDownload(){ | ||
| 82 | + this.$refs.selectTemplateForm.validate((valid) => { | ||
| 83 | + if (valid) { | ||
| 84 | + this.$emit('startDatasExport', this.selectTemplateFormData.dataSource) | ||
| 85 | + } else { | ||
| 86 | + return false; | ||
| 87 | + } | ||
| 88 | + }); | ||
| 89 | + }, | ||
| 90 | + | ||
| 91 | + cancelDownload(){ | ||
| 92 | + this.datasExportVisible = false | ||
| 93 | + this.selectTemplateFormData.dataSource="" | ||
| 94 | + this.$emit('cancelDatasExport') | ||
| 95 | + } | ||
| 96 | + }, | ||
| 97 | + }; | ||
| 98 | + </script> | ||
| 99 | + | ||
| 100 | + <style lang="scss" scoped> | ||
| 101 | + @import "@/assets/styles/variables.scss"; | ||
| 102 | + .modelItem { | ||
| 103 | + width: 100%; | ||
| 104 | + .modelItem-title { | ||
| 105 | + display: flex; | ||
| 106 | + justify-content: space-between; | ||
| 107 | + margin-bottom: 5px; | ||
| 108 | + font-size: 14px; | ||
| 109 | + font-weight: 600; | ||
| 110 | + color: #333; | ||
| 111 | + } | ||
| 112 | + } | ||
| 113 | + .revokeOperation{ | ||
| 114 | + margin-bottom:25px; | ||
| 115 | + .revokeSubmitBtn{ | ||
| 116 | + margin-right: 30px; | ||
| 117 | + } | ||
| 118 | + } | ||
| 119 | + </style> | ||
| 120 | + | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
| ... | @@ -128,6 +128,14 @@ | ... | @@ -128,6 +128,14 @@ |
| 128 | > | 128 | > |
| 129 | 导入模版下载 | 129 | 导入模版下载 |
| 130 | </el-button> | 130 | </el-button> |
| 131 | + <el-button | ||
| 132 | + class="entrySaveButton" | ||
| 133 | + size="small" | ||
| 134 | + icon="el-icon-edit" | ||
| 135 | + @click="batchModify" | ||
| 136 | + > | ||
| 137 | + 批量修改 | ||
| 138 | + </el-button> | ||
| 131 | </div> | 139 | </div> |
| 132 | <div class="optionButton-right"> | 140 | <div class="optionButton-right"> |
| 133 | <el-dropdown | 141 | <el-dropdown |
| ... | @@ -328,6 +336,21 @@ | ... | @@ -328,6 +336,21 @@ |
| 328 | :selectedDatas="selected" | 336 | :selectedDatas="selected" |
| 329 | :dropdownCode="dropdownCode" | 337 | :dropdownCode="dropdownCode" |
| 330 | @cancelRevoke="cancelRevoke" /> | 338 | @cancelRevoke="cancelRevoke" /> |
| 339 | + <TemplateDownloadDialog | ||
| 340 | + :showDialog="templateDownloadVisible" | ||
| 341 | + @cancelDownload="cancelDownload" | ||
| 342 | + /> | ||
| 343 | + <ExportDialog | ||
| 344 | + ref="exportDialog" | ||
| 345 | + :showDialog="datasExportVisible" | ||
| 346 | + @cancelDatasExport="cancelDatasExport" | ||
| 347 | + @startDatasExport="startDatasExport" | ||
| 348 | + /> | ||
| 349 | + <BatchModify | ||
| 350 | + :selectedDatas="selected" | ||
| 351 | + :showDialog="batchModifyVisible" | ||
| 352 | + @cancelBatchModify="cancelBatchModify" | ||
| 353 | + /> | ||
| 331 | </div> | 354 | </div> |
| 332 | </template> | 355 | </template> |
| 333 | 356 | ||
| ... | @@ -345,11 +368,17 @@ import { | ... | @@ -345,11 +368,17 @@ import { |
| 345 | import { getDictData } from '@/api/system/dict-api.js' | 368 | import { getDictData } from '@/api/system/dict-api.js' |
| 346 | import DialogVue from "./dialog.vue"; | 369 | import DialogVue from "./dialog.vue"; |
| 347 | import RevokeDialog from "./revokeDialog.vue"; | 370 | import RevokeDialog from "./revokeDialog.vue"; |
| 371 | +import TemplateDownloadDialog from "./templateDownloadDialog.vue"; | ||
| 372 | +import ExportDialog from "./exportDialog.vue"; | ||
| 373 | +import BatchModify from "./batchModify.vue"; | ||
| 348 | export default { | 374 | export default { |
| 349 | name: "ReportingData", | 375 | name: "ReportingData", |
| 350 | components: { | 376 | components: { |
| 351 | DialogVue, | 377 | DialogVue, |
| 352 | - RevokeDialog | 378 | + RevokeDialog, |
| 379 | + TemplateDownloadDialog, | ||
| 380 | + ExportDialog, | ||
| 381 | + BatchModify | ||
| 353 | }, | 382 | }, |
| 354 | data() { | 383 | data() { |
| 355 | return { | 384 | return { |
| ... | @@ -474,9 +503,10 @@ export default { | ... | @@ -474,9 +503,10 @@ export default { |
| 474 | outerVisible: false, | 503 | outerVisible: false, |
| 475 | dropdownName: "一键申报", | 504 | dropdownName: "一键申报", |
| 476 | dropdownCode: "full", | 505 | dropdownCode: "full", |
| 477 | - | ||
| 478 | - | ||
| 479 | revokeVisible:false, | 506 | revokeVisible:false, |
| 507 | + templateDownloadVisible:false, | ||
| 508 | + datasExportVisible:false, | ||
| 509 | + batchModifyVisible:false | ||
| 480 | }; | 510 | }; |
| 481 | }, | 511 | }, |
| 482 | created() { | 512 | created() { |
| ... | @@ -553,53 +583,92 @@ export default { | ... | @@ -553,53 +583,92 @@ export default { |
| 553 | //下载模板 | 583 | //下载模板 |
| 554 | dwonloadModelFile() { | 584 | dwonloadModelFile() { |
| 555 | this.loadings.dwonloadModelLoading = true; | 585 | this.loadings.dwonloadModelLoading = true; |
| 556 | - this.fileDownload | 586 | + this.$store.dispatch("GetInfo").then(res =>{ |
| 557 | - .downLoadZip( | 587 | + console.log('res====', res) |
| 558 | - "api", | 588 | + if (res.code == 200) { |
| 559 | - "declareDataModel", | 589 | + console.log('port===', res.data?.port?.split(',')) |
| 560 | - "申报数据模板.xlsx", | 590 | + if (res.data?.port?.split(',').length == 2) { |
| 561 | - "xlsx", | 591 | + this.templateDownloadVisible = true |
| 562 | - "get" | 592 | + } else { |
| 563 | - ) | 593 | + this.fileDownload |
| 564 | - .finally(() => { | 594 | + .downLoadZip( |
| 565 | - this.loadings.dwonloadModelLoading = false; | 595 | + "api", |
| 566 | - }); | 596 | + "declareDataModel", |
| 597 | + "申报数据模板.xlsx", | ||
| 598 | + "xlsx", | ||
| 599 | + "get", | ||
| 600 | + {type: res.data?.port} | ||
| 601 | + ) | ||
| 602 | + .finally(() => { | ||
| 603 | + this.cancelDownload() | ||
| 604 | + }); | ||
| 605 | + } | ||
| 606 | + } | ||
| 607 | + }).catch(err =>{ | ||
| 608 | + console.log(err) | ||
| 609 | + }) | ||
| 610 | + | ||
| 611 | + }, | ||
| 612 | + | ||
| 613 | + datasDownload(dataSource){ | ||
| 614 | + let obj = { | ||
| 615 | + billNo: this.sreachFormData.billNo, | ||
| 616 | + declareId: [], | ||
| 617 | + logisticsNo: this.sreachFormData.logisticsNo, | ||
| 618 | + orderNo: this.sreachFormData.orderNo, | ||
| 619 | + receiptStatus: this.sreachFormData.receiptStatus, | ||
| 620 | + dataSource | ||
| 621 | + }; | ||
| 622 | + obj.startCreateTime = ""; | ||
| 623 | + obj.endCreateTime = ""; | ||
| 624 | + if (this.sreachFormData.createTime.length > 0) { | ||
| 625 | + obj.startCreateTime = this.sreachFormData.createTime[0]; | ||
| 626 | + obj.endCreateTime = this.sreachFormData.createTime[1]; | ||
| 627 | + } | ||
| 628 | + this.selected.forEach((item) => { | ||
| 629 | + obj.declareId.push(item.declareId); | ||
| 630 | + }); | ||
| 631 | + exportDeclareData(obj).then((res)=>{ | ||
| 632 | + // if (res.code === "200") { | ||
| 633 | + // // this.alertSuccessMsg(res.message); | ||
| 634 | + // } else { | ||
| 635 | + // console.log(res.message); | ||
| 636 | + // this.alertWarningMsg(res.message); | ||
| 637 | + // } | ||
| 638 | + | ||
| 639 | + }).catch((err)=>{ | ||
| 640 | + console.log(err); | ||
| 641 | + this.alertErrorMsg(err); | ||
| 642 | + }).finally(res =>{ | ||
| 643 | + this.loadings.exportDeclareLoading = false; | ||
| 644 | + this.datasExportVisible = false | ||
| 645 | + this.$refs.exportDialog.datasExportVisible = false | ||
| 646 | + }) | ||
| 567 | }, | 647 | }, |
| 568 | //导出 | 648 | //导出 |
| 569 | downloadData() { | 649 | downloadData() { |
| 570 | this.loadings.exportDeclareLoading = true; | 650 | this.loadings.exportDeclareLoading = true; |
| 571 | - let obj = { | 651 | + this.$store.dispatch("GetInfo").then(res =>{ |
| 572 | - billNo: this.sreachFormData.billNo, | 652 | + console.log('res====', res) |
| 573 | - declareId: [], | 653 | + if (res.code == 200) { |
| 574 | - logisticsNo: this.sreachFormData.logisticsNo, | 654 | + console.log('port===', res.data?.port?.split(',')) |
| 575 | - orderNo: this.sreachFormData.orderNo, | 655 | + if (res.data?.port?.split(',').length == 2) { |
| 576 | - receiptStatus: this.sreachFormData.receiptStatus, | 656 | + this.datasExportVisible = true |
| 577 | - }; | 657 | + } else { |
| 578 | - obj.startCreateTime = ""; | 658 | + this.datasDownload(res.data?.port) |
| 579 | - obj.endCreateTime = ""; | 659 | + } |
| 580 | - if (this.sreachFormData.createTime.length > 0) { | 660 | + } |
| 581 | - obj.startCreateTime = this.sreachFormData.createTime[0]; | 661 | + }).catch(err =>{ |
| 582 | - obj.endCreateTime = this.sreachFormData.createTime[1]; | 662 | + console.log(err) |
| 583 | - } | 663 | + }) |
| 584 | - this.selected.forEach((item) => { | 664 | + }, |
| 585 | - obj.declareId.push(item.declareId); | 665 | + startDatasExport(dataSource){ |
| 586 | - }); | 666 | + this.datasDownload(dataSource) |
| 587 | - exportDeclareData(obj).then((res)=>{ | 667 | + }, |
| 588 | - // if (res.code === "200") { | 668 | + cancelDatasExport(){ |
| 589 | - // // this.alertSuccessMsg(res.message); | 669 | + this.datasExportVisible = false |
| 590 | - // } else { | 670 | + this.loadings.exportDeclareLoading = false; |
| 591 | - // console.log(res.message); | ||
| 592 | - // this.alertWarningMsg(res.message); | ||
| 593 | - // } | ||
| 594 | - this.loadings.exportDeclareLoading = false; | ||
| 595 | - }).catch((err)=>{ | ||
| 596 | - console.log(err); | ||
| 597 | - this.alertErrorMsg(err); | ||
| 598 | - this.loadings.exportDeclareLoading = false; | ||
| 599 | - }) | ||
| 600 | - | ||
| 601 | }, | 671 | }, |
| 602 | - | ||
| 603 | 672 | ||
| 604 | //申报 | 673 | //申报 |
| 605 | declareData() { | 674 | declareData() { |
| ... | @@ -800,7 +869,21 @@ export default { | ... | @@ -800,7 +869,21 @@ export default { |
| 800 | params: { data: val }, | 869 | params: { data: val }, |
| 801 | }); | 870 | }); |
| 802 | }, | 871 | }, |
| 803 | - | 872 | + cancelDownload(){ |
| 873 | + this.loadings.dwonloadModelLoading = false; | ||
| 874 | + this.templateDownloadVisible = false | ||
| 875 | + }, | ||
| 876 | + batchModify(){ | ||
| 877 | + if (!this.selected.length) { | ||
| 878 | + this.alertWarningMsg("请选择数据!"); | ||
| 879 | + return | ||
| 880 | + } | ||
| 881 | + this.batchModifyVisible = true | ||
| 882 | + }, | ||
| 883 | + cancelBatchModify(){ | ||
| 884 | + this.batchModifyVisible = false | ||
| 885 | + this.search(0); | ||
| 886 | + } | ||
| 804 | }, | 887 | }, |
| 805 | }; | 888 | }; |
| 806 | </script> | 889 | </script> | ... | ... |
| 1 | +<template> | ||
| 2 | + <el-dialog | ||
| 3 | + class="entryDialog classCUploadDialog" | ||
| 4 | + title="导入模板下载" | ||
| 5 | + :visible.sync="downloadTemplateVisible" | ||
| 6 | + :show-close="false" | ||
| 7 | + width="60%" | ||
| 8 | + :close-on-click-modal="false" | ||
| 9 | + > | ||
| 10 | + <div> | ||
| 11 | + <el-form class="fedexFormStyle" | ||
| 12 | + ref="selectTemplateForm" | ||
| 13 | + :model="selectTemplateFormData" | ||
| 14 | + :rules="selectTemplateFormRules" | ||
| 15 | + label-position="left" | ||
| 16 | + size="small" | ||
| 17 | + > | ||
| 18 | + <Formitem label="模板类型" prop="type"> | ||
| 19 | + <el-select | ||
| 20 | + type="text" | ||
| 21 | + v-model="selectTemplateFormData.type" | ||
| 22 | + clearable | ||
| 23 | + placeholder="" | ||
| 24 | + > | ||
| 25 | + <el-option | ||
| 26 | + v-for="(item, index) in $store.getters.dict.TEMPLATE_TYPE" | ||
| 27 | + :key="index" | ||
| 28 | + :label="item.itemChineseName" | ||
| 29 | + :value="item.itemValue" | ||
| 30 | + ></el-option> | ||
| 31 | + </el-select> | ||
| 32 | + </Formitem> | ||
| 33 | + </el-form> | ||
| 34 | + </div> | ||
| 35 | + <div class="dialogOption entrySave revokeOperation"> | ||
| 36 | + <el-button | ||
| 37 | + class="entrySaveButton entrySaveButton-background revokeSubmitBtn" | ||
| 38 | + type="primary" | ||
| 39 | + @click="startDownload" | ||
| 40 | + >确定</el-button> | ||
| 41 | + <el-button | ||
| 42 | + class="entrySaveButton" | ||
| 43 | + @click="cancelDownload" | ||
| 44 | + >关闭</el-button> | ||
| 45 | + </div> | ||
| 46 | + </el-dialog> | ||
| 47 | + </template> | ||
| 48 | + | ||
| 49 | + <script> | ||
| 50 | + export default { | ||
| 51 | + props: { | ||
| 52 | + showDialog: { | ||
| 53 | + type: Boolean, | ||
| 54 | + default: false, | ||
| 55 | + } | ||
| 56 | + }, | ||
| 57 | + data() { | ||
| 58 | + return { | ||
| 59 | + downloadTemplateVisible:false, | ||
| 60 | + selectTemplateFormData:{ | ||
| 61 | + type:'' | ||
| 62 | + }, | ||
| 63 | + selectTemplateFormRules: { | ||
| 64 | + type: [ | ||
| 65 | + { required: true, message: '请选择模板类型', trigger: 'change' } | ||
| 66 | + ], | ||
| 67 | + } | ||
| 68 | + }; | ||
| 69 | + }, | ||
| 70 | + watch: { | ||
| 71 | + showDialog(val) { | ||
| 72 | + if (val) { | ||
| 73 | + this.downloadTemplateVisible = val | ||
| 74 | + } | ||
| 75 | + }, | ||
| 76 | + }, | ||
| 77 | + created() { | ||
| 78 | + this.selectTemplateFormData.type="" | ||
| 79 | + }, | ||
| 80 | + methods: { | ||
| 81 | + startDownload(){ | ||
| 82 | + this.$refs.selectTemplateForm.validate((valid) => { | ||
| 83 | + if (valid) { | ||
| 84 | + console.log('datas==', this.selectTemplateFormData) | ||
| 85 | + this.fileDownload | ||
| 86 | + .downLoadZip( | ||
| 87 | + "api", | ||
| 88 | + "declareDataModel", | ||
| 89 | + "申报数据模板.xlsx", | ||
| 90 | + "xlsx", | ||
| 91 | + "get", | ||
| 92 | + {type: this.selectTemplateFormData.type} | ||
| 93 | + ) | ||
| 94 | + .finally(() => { | ||
| 95 | + this.cancelDownload() | ||
| 96 | + }); | ||
| 97 | + | ||
| 98 | + } else { | ||
| 99 | + return false; | ||
| 100 | + } | ||
| 101 | + }); | ||
| 102 | + }, | ||
| 103 | + | ||
| 104 | + cancelDownload(){ | ||
| 105 | + this.downloadTemplateVisible = false | ||
| 106 | + this.selectTemplateFormData.type="" | ||
| 107 | + this.$emit('cancelDownload') | ||
| 108 | + } | ||
| 109 | + }, | ||
| 110 | + }; | ||
| 111 | + </script> | ||
| 112 | + | ||
| 113 | + <style lang="scss" scoped> | ||
| 114 | + @import "@/assets/styles/variables.scss"; | ||
| 115 | + .modelItem { | ||
| 116 | + width: 100%; | ||
| 117 | + .modelItem-title { | ||
| 118 | + display: flex; | ||
| 119 | + justify-content: space-between; | ||
| 120 | + margin-bottom: 5px; | ||
| 121 | + font-size: 14px; | ||
| 122 | + font-weight: 600; | ||
| 123 | + color: #333; | ||
| 124 | + } | ||
| 125 | + } | ||
| 126 | + .revokeOperation{ | ||
| 127 | + margin-bottom:25px; | ||
| 128 | + .revokeSubmitBtn{ | ||
| 129 | + margin-right: 30px; | ||
| 130 | + } | ||
| 131 | + } | ||
| 132 | + </style> | ||
| 133 | + | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
-
Please register or login to post a comment