快递列表查询

main
xuechunyuan 3 years ago
parent 8000ab007c
commit f261771819
  1. BIN
      20220220.zip
  2. 4
      public/index.html
  3. 5
      src/api/sjApi.js
  4. 2
      src/util/axios.js
  5. 67
      src/views/expresslist/index.vue
  6. 17
      vue.config.js

Binary file not shown.

@ -5,7 +5,7 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0"> <meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" href="<%= BASE_URL %>favicon.ico"> <link rel="icon" href="<%= BASE_URL %>favicon.ico">
<title><%= htmlWebpackPlugin.options.title %></title> <title>物流服务中心</title>
<!-- <script src="//mapopen.bj.bcebos.com/github/BMapGLLib/TrackAnimation/src/TrackAnimation.min.js"></script> --> <!-- <script src="//mapopen.bj.bcebos.com/github/BMapGLLib/TrackAnimation/src/TrackAnimation.min.js"></script> -->
<!-- <script src="//api.map.baidu.com/api?type=webgl&v=1.0&ak=FLPUL1102GNBvV2nVDy5kDIjYM9VGyYl"></script> --> <!-- <script src="//api.map.baidu.com/api?type=webgl&v=1.0&ak=FLPUL1102GNBvV2nVDy5kDIjYM9VGyYl"></script> -->
<!-- <script src="//mapv.baidu.com/build/mapv.min.js"></script> --> <!-- <script src="//mapv.baidu.com/build/mapv.min.js"></script> -->
@ -23,7 +23,7 @@
</head> </head>
<body> <body>
<noscript> <noscript>
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong> <strong>We're sorry but 物流服务中心 doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
</noscript> </noscript>
<div id="app"></div> <div id="app"></div>
<!-- built files will be auto injected --> <!-- built files will be auto injected -->

@ -2,7 +2,10 @@ import request from '@/util/axios'
//列表 //列表
export const queryExpressList = (param) => request({ export const queryExpressList = (param) => request({
url: '/sjapi/list', baseURL: 'http://192.168.1.38:8210',
// baseURL: 'http://127.0.0.1.38:8210',
url: '/list',
// url: '/sjapi/list',
method: 'post', method: 'post',
data: param data: param
}); });

@ -1,5 +1,7 @@
import axios from "axios"; import axios from "axios";
//默认超时时间
// axios.defaults.timeout = 1000 * 60 *;
//跨域请求,允许保存cookie //跨域请求,允许保存cookie
axios.defaults.withCredentials = true; axios.defaults.withCredentials = true;

@ -1,10 +1,10 @@
<template> <template>
<div class="container_box"> <div class="container_box">
<el-form :inline="true" :model="queryForm" class="demo-form-inline" size="small"> <el-form :inline="true" :model="queryForm" class="demo-form-inline" size="small">
<el-form-item label="快递单号"> <el-form-item label="运单编号">
<el-input v-model="queryForm.courierNumber" placeholder="快递单号" clearable></el-input> <el-input v-model="queryForm.courierNumber" placeholder="运单编号" clearable></el-input>
</el-form-item> </el-form-item>
<el-form-item label="下单时间"> <el-form-item label="派件时间">
<el-date-picker @change="changeSearchDate" v-model="queryForm.dateRange" type="daterange" range-separator="" <el-date-picker @change="changeSearchDate" v-model="queryForm.dateRange" type="daterange" range-separator=""
start-placeholder="开始日期" end-placeholder="结束日期"> start-placeholder="开始日期" end-placeholder="结束日期">
</el-date-picker> </el-date-picker>
@ -19,33 +19,47 @@
<el-button type="primary" @click="onSubmit"> </el-button> <el-button type="primary" @click="onSubmit"> </el-button>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-upload ref="upload" class="upload-demo" action="/sjapi/send" :show-file-list="false" :on-success="uploadSuccess" <el-upload ref="upload" class="upload-demo" :on-change="UploadChange" action="http://192.168.1.38:8210/send" :show-file-list="false"
:on-error="uploadError" :limit="1"> :before-upload="handleBeforeUpload" :on-success="uploadSuccess" :on-error="uploadError" :limit="1">
<el-button size="small"> </el-button> <el-button size="small" v-loading.fullscreen.lock="importLoading"> </el-button>
</el-upload> </el-upload>
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-table :data="expressData" size="small" border style="width: 100%"> <el-table :data="expressData" size="small" border style="width: 100%" v-loading="loading">
<el-table-column prop="orderTime" label="下单时间" width="180"> <!-- <el-table-column prop="orderTime" label="下单时间" width="180">
<template slot-scope="scope"> <template slot-scope="scope">
{{ dateFormatter(scope.row.orderTime) }} {{ dateFormatter(scope.row.orderTime) }}
</template> </template>
</el-table-column> </el-table-column> -->
<el-table-column prop="courierNumber" label="快递单号"> <el-table-column prop="courierNumber" label="运单编号">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button @click="queryExpressDetail(scope.row)" type="text">{{ scope.row.courierNumber }}</el-button> <el-button @click="queryExpressDetail(scope.row)" type="text">{{ scope.row.courierNumber }}</el-button>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="expressType" label="快递类型"> <el-table-column prop="expressType" label="快递类型">
</el-table-column> </el-table-column>
<el-table-column prop="deliveryTime" label="派件时间">
<template slot-scope="scope">
{{ dateFormatter(scope.row.deliveryTime) }}
</template>
</el-table-column>
<el-table-column prop="receiptStatus" label="签收标识">
</el-table-column>
<el-table-column prop="expressPlace" label="签收网点">
</el-table-column>
<el-table-column prop="endTime" label="签收时间">
<template slot-scope="scope">
{{ scope.row.endTime ? dateFormatter(scope.row.endTime) : "" }}
</template>
</el-table-column>
<el-table-column prop="placeOfOrigin" label="发件地"> <el-table-column prop="placeOfOrigin" label="发件地">
</el-table-column> </el-table-column>
<el-table-column prop="destination" label="收件地"> <el-table-column prop="destination" label="收件地">
</el-table-column> </el-table-column>
<el-table-column prop="addressee" label="收件人"> <!-- <el-table-column prop="addressee" label="收件人">
</el-table-column> </el-table-column>
<el-table-column prop="cellphoneNumber" label="收件人手机号"> <el-table-column prop="cellphoneNumber" label="收件人手机号">
</el-table-column> </el-table-column> -->
</el-table> </el-table>
<div style="margin-top:20px;"> <div style="margin-top:20px;">
<el-pagination background :page-sizes="[10, 20, 50]" @size-change="handleSizeChange" <el-pagination background :page-sizes="[10, 20, 50]" @size-change="handleSizeChange"
@ -99,6 +113,8 @@ export default {
},// },//
dialogVisible: false, dialogVisible: false,
expressRecord: [], // expressRecord: [], //
loading: false,
importLoading: false,//loading
}; };
}, },
mounted() { mounted() {
@ -126,13 +142,20 @@ export default {
_param[item] = param[item]; _param[item] = param[item];
} }
}) })
this.loading = true;
try {
queryExpressList(_param).then(res => { queryExpressList(_param).then(res => {
this.loading = false;
if (res.code == 200) { if (res.code == 200) {
this.total = res.total; this.total = res.total;
this.expressData = res.data; this.expressData = res.data;
} }
}, err => {
this.loading = false;
}) })
} catch (error) {
this.loading = false;
}
}, },
// //
handleSizeChange(val) { handleSizeChange(val) {
@ -151,7 +174,24 @@ export default {
this.queryList(); this.queryList();
}, },
//excel //excel
handleBeforeUpload(file) {
const isLt10M = file.size / 1024 / 1024 < 10;
if (!isLt10M) {
this.$message.error('导入文件不能超过 10MB!');
} else {
this.importLoading = true;
}
return isLt10M;
},
UploadChange(file, fileList) {
setTimeout(() => {
this.importLoading = false;
this.$refs.upload.clearFiles();
this.$refs.upload.abort();
}, 1000 * 60 * 1);//
},
uploadSuccess(response, file, fileList) { uploadSuccess(response, file, fileList) {
this.importLoading = false;
if (response.code == 200) { if (response.code == 200) {
this.$message.success('导入成功'); this.$message.success('导入成功');
this.$refs.upload.clearFiles(); this.$refs.upload.clearFiles();
@ -160,6 +200,7 @@ export default {
} }
}, },
uploadError(err, file, fileList) { uploadError(err, file, fileList) {
this.importLoading = false;
console.log('导入失败', err) console.log('导入失败', err)
}, },
//100 //100

@ -29,14 +29,15 @@ module.exports = defineConfig({
changeOrigin: true, changeOrigin: true,
ws: true, ws: true,
}, },
'/sjapi': { // '/sjapi': {
target: 'http://192.168.1.38:8210', // target: 'http://192.168.1.38:8210',
changeOrigin: true, // // target: 'http://127.0.0.1:8210',
ws: true, // changeOrigin: true,
pathRewrite: { // ws: true,
'/sjapi': '' // pathRewrite: {
} // '/sjapi': ''
}, // }
// },
'/pollapi': { '/pollapi': {
target: 'https://poll.kuaidi100.com', target: 'https://poll.kuaidi100.com',
changeOrigin: true, changeOrigin: true,

Loading…
Cancel
Save