快递列表查询

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. 89
      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 name="viewport" content="width=device-width,initial-scale=1.0">
<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="//api.map.baidu.com/api?type=webgl&v=1.0&ak=FLPUL1102GNBvV2nVDy5kDIjYM9VGyYl"></script> -->
<!-- <script src="//mapv.baidu.com/build/mapv.min.js"></script> -->
@ -23,7 +23,7 @@
</head>
<body>
<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>
<div id="app"></div>
<!-- built files will be auto injected -->

@ -2,7 +2,10 @@ import request from '@/util/axios'
//列表
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',
data: param
});

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

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

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

Loading…
Cancel
Save