Showing
3 changed files
with
141 additions
and
134 deletions
| ... | @@ -228,9 +228,9 @@ | ... | @@ -228,9 +228,9 @@ |
| 228 | </div> | 228 | </div> |
| 229 | </TablePopover> | 229 | </TablePopover> |
| 230 | </template> | 230 | </template> |
| 231 | - <template v-slot:billNo="scope"> | 231 | + <template v-slot:logisticsNo="scope"> |
| 232 | <el-button type="text" @click="view(scope.row)"> | 232 | <el-button type="text" @click="view(scope.row)"> |
| 233 | - {{ scope.row.billNo }} | 233 | + {{ scope.row.logisticsNo }} |
| 234 | </el-button> | 234 | </el-button> |
| 235 | </template> | 235 | </template> |
| 236 | </Table> | 236 | </Table> |
| ... | @@ -276,15 +276,15 @@ export default { | ... | @@ -276,15 +276,15 @@ export default { |
| 276 | slot: true, | 276 | slot: true, |
| 277 | }, | 277 | }, |
| 278 | { | 278 | { |
| 279 | - name: "提运单号", | 279 | + name: "物流运单编号", |
| 280 | - value: "billNo", | 280 | + value: "logisticsNo", |
| 281 | width: "", | 281 | width: "", |
| 282 | align: "left", | 282 | align: "left", |
| 283 | slot: true, | 283 | slot: true, |
| 284 | }, | 284 | }, |
| 285 | { | 285 | { |
| 286 | - name: "物流运单编号", | 286 | + name: "提运单号", |
| 287 | - value: "logisticsNo", | 287 | + value: "billNo", |
| 288 | width: "", | 288 | width: "", |
| 289 | align: "left", | 289 | align: "left", |
| 290 | }, | 290 | }, | ... | ... |
| 1 | <template> | 1 | <template> |
| 2 | - <el-dialog | 2 | + <el-dialog |
| 3 | class="entryDialog classCUploadDialog" | 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 |
| 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 | ||
| 12 | + class="fedexFormStyle" | ||
| 13 | + ref="selectTemplateForm" | ||
| 14 | + :model="selectTemplateFormData" | ||
| 15 | + :rules="selectTemplateFormRules" | ||
| 16 | + label-position="left" | ||
| 17 | + size="small" | ||
| 18 | + > | ||
| 19 | + <Formitem label="模板类型" prop="dataSource"> | ||
| 20 | + <el-select | ||
| 21 | + type="text" | ||
| 22 | + v-model="selectTemplateFormData.dataSource" | ||
| 23 | + clearable | ||
| 24 | + placeholder="" | ||
| 25 | + > | ||
| 26 | + <el-option | ||
| 27 | + v-for="(item, index) in $store.getters.dict.TEMPLATE_TYPE" | ||
| 28 | + :key="index" | ||
| 29 | + :label="item.itemChineseName" | ||
| 30 | + :value="item.itemValue" | ||
| 31 | + ></el-option> | ||
| 32 | + </el-select> | ||
| 33 | + </Formitem> | ||
| 34 | + </el-form> | ||
| 35 | + </div> | ||
| 36 | + <div class="dialogOption entrySave revokeOperation"> | ||
| 37 | + <el-button | ||
| 38 | + class="entrySaveButton entrySaveButton-background revokeSubmitBtn" | ||
| 39 | + type="primary" | ||
| 40 | + @click="startDownload" | ||
| 41 | + >确定</el-button | ||
| 42 | + > | ||
| 43 | + <el-button class="entrySaveButton" @click="cancelDownload" | ||
| 44 | + >关闭</el-button | ||
| 45 | + > | ||
| 46 | + </div> | ||
| 47 | + </el-dialog> | ||
| 48 | +</template> | ||
| 49 | + | ||
| 50 | +<script> | ||
| 51 | +export default { | ||
| 52 | + props: { | ||
| 53 | + showDialog: { | ||
| 54 | + type: Boolean, | ||
| 55 | + default: false, | ||
| 56 | + }, | ||
| 57 | + }, | ||
| 58 | + data() { | ||
| 59 | + return { | ||
| 60 | + datasExportVisible: false, | ||
| 61 | + selectTemplateFormData: { | ||
| 62 | + dataSource: "", | ||
| 63 | + }, | ||
| 64 | + selectTemplateFormRules: { | ||
| 65 | + dataSource: [ | ||
| 66 | + { required: true, message: "请选择模板类型", trigger: "change" }, | ||
| 67 | + ], | ||
| 68 | + }, | ||
| 69 | + }; | ||
| 70 | + }, | ||
| 71 | + watch: { | ||
| 72 | + showDialog(val) { | ||
| 73 | + if (val) { | ||
| 74 | + this.datasExportVisible = val; | ||
| 75 | + this.selectTemplateFormData.dataSource = ""; | ||
| 76 | + } | ||
| 77 | + }, | ||
| 78 | + }, | ||
| 79 | + created() {}, | ||
| 80 | + methods: { | ||
| 81 | + startDownload() { | ||
| 82 | + this.$refs.selectTemplateForm.validate((valid) => { | ||
| 83 | + if (valid) { | ||
| 84 | + this.$emit( | ||
| 85 | + "startDatasExport", | ||
| 86 | + this.selectTemplateFormData.dataSource | ||
| 87 | + ); | ||
| 88 | + } else { | ||
| 89 | + return false; | ||
| 90 | + } | ||
| 91 | + }); | ||
| 92 | + }, | ||
| 93 | + | ||
| 94 | + cancelDownload() { | ||
| 95 | + this.datasExportVisible = false; | ||
| 96 | + this.selectTemplateFormData.dataSource = ""; | ||
| 97 | + this.$emit("cancelDatasExport"); | ||
| 98 | + }, | ||
| 99 | + }, | ||
| 100 | +}; | ||
| 101 | +</script> | ||
| 102 | + | ||
| 103 | +<style lang="scss" scoped> | ||
| 104 | +@import "@/assets/styles/variables.scss"; | ||
| 105 | +.modelItem { | ||
| 106 | + width: 100%; | ||
| 107 | + .modelItem-title { | ||
| 108 | + display: flex; | ||
| 109 | + justify-content: space-between; | ||
| 110 | + margin-bottom: 5px; | ||
| 111 | + font-size: 14px; | ||
| 112 | + font-weight: 600; | ||
| 113 | + color: #333; | ||
| 114 | + } | ||
| 115 | +} | ||
| 116 | +.revokeOperation { | ||
| 117 | + margin-bottom: 25px; | ||
| 118 | + .revokeSubmitBtn { | ||
| 119 | + margin-right: 30px; | ||
| 120 | + } | ||
| 121 | +} | ||
| 122 | +</style> | ... | ... |
| ... | @@ -1057,22 +1057,23 @@ export default { | ... | @@ -1057,22 +1057,23 @@ export default { |
| 1057 | 1057 | ||
| 1058 | datasDownload(dataSource) { | 1058 | datasDownload(dataSource) { |
| 1059 | let obj = { | 1059 | let obj = { |
| 1060 | - billNo: this.sreachFormData.billNo, | 1060 | + // billNo: this.sreachFormData.billNo, |
| 1061 | declareId: [], | 1061 | declareId: [], |
| 1062 | - logisticsNo: this.sreachFormData.logisticsNo, | 1062 | + // logisticsNo: this.sreachFormData.logisticsNo, |
| 1063 | - orderNo: this.sreachFormData.orderNo, | 1063 | + // orderNo: this.sreachFormData.orderNo, |
| 1064 | - receiptStatus: this.sreachFormData.receiptStatus, | 1064 | + // receiptStatus: this.sreachFormData.receiptStatus, |
| 1065 | - dataSource, | 1065 | + dataSourceTemplate: dataSource, |
| 1066 | + ...this.sreachFormData, | ||
| 1066 | }; | 1067 | }; |
| 1068 | + console.log("obj===", obj, dataSource); | ||
| 1069 | + | ||
| 1067 | obj.startCreateTime = ""; | 1070 | obj.startCreateTime = ""; |
| 1068 | obj.endCreateTime = ""; | 1071 | obj.endCreateTime = ""; |
| 1069 | if (this.sreachFormData.createTime.length > 0) { | 1072 | if (this.sreachFormData.createTime.length > 0) { |
| 1070 | - obj.startCreateTime = this.sreachFormData.createTime[0]; | 1073 | + obj.startCreateTime = obj.createTime[0]; |
| 1071 | - obj.endCreateTime = this.sreachFormData.createTime[1]; | 1074 | + obj.endCreateTime = obj.createTime[1]; |
| 1072 | } | 1075 | } |
| 1073 | - this.selected.forEach((item) => { | 1076 | + obj.declareId = this.selected.map((item) => item.declareId); |
| 1074 | - obj.declareId.push(item.declareId); | ||
| 1075 | - }); | ||
| 1076 | exportDeclareData(obj) | 1077 | exportDeclareData(obj) |
| 1077 | .then((res) => { | 1078 | .then((res) => { |
| 1078 | // if (res.code === "200") { | 1079 | // if (res.code === "200") { |
| ... | @@ -1094,6 +1095,10 @@ export default { | ... | @@ -1094,6 +1095,10 @@ export default { |
| 1094 | }, | 1095 | }, |
| 1095 | //导出 | 1096 | //导出 |
| 1096 | downloadData() { | 1097 | downloadData() { |
| 1098 | + if (!this.selected.length) { | ||
| 1099 | + this.alertWarningMsg("请选择数据!"); | ||
| 1100 | + return; | ||
| 1101 | + } | ||
| 1097 | this.loadings.exportDeclareLoading = true; | 1102 | this.loadings.exportDeclareLoading = true; |
| 1098 | this.$store | 1103 | this.$store |
| 1099 | .dispatch("GetInfo") | 1104 | .dispatch("GetInfo") | ... | ... |
-
Please register or login to post a comment