sunChengjie vor 1 Jahr
Ursprung
Commit
0b5903dba7

+ 14 - 3
src/pages/components/HomePage.vue

@@ -6,8 +6,10 @@
 		</div>
 		<!-- 显示 -->
 		<div class="echarts1">
-			<div id="myChart1"></div>
-			<div id="myChart2"></div>
+			<van-loading v-if="isLoading" color="#1989fa" />
+			<div v-if="!isLoading" id="myChart1"></div>
+			<div v-if="!isLoading" id="myChart2"></div>
+
 		</div>
 		<!-- 图标 -->
 		<div class="icon">
@@ -48,7 +50,7 @@
 </template>
 
 <script>
-import { appFindYourShipment, appStatistics, getSysUserInfoByUserIdAPI, getWxConfig } from '../../api/index'
+import { appFindYourShipment, appStatistics } from '../../api/index'
 import {
 	Toast,
 	Dialog
@@ -63,11 +65,18 @@ export default {
 			searchValue: "", //搜索单号的值
 			expressMap: {}, //收件
 			mailMap: {}, //寄件
+			isLoading: false,//
 		}
 	},
 	async mounted() {
 		// 数据图表
+		this.isLoading = true
 		const resValue = await appStatistics({ deliveryPeopleId: localStorage.getItem('courierId') })
+		if (resValue.code != 0) {
+			Toast(resValue.error)
+			return
+		}
+		this.isLoading = false
 		const { dispatchStatistics = [], pickupStatistics = [] } = resValue.data
 		let signSuccessfully = 0; // 签收成功
 		let outOfDelivery = 0; // 派送中
@@ -345,6 +354,8 @@ export default {
 		height: 4.2rem;
 		background: white;
 		display: flex;
+		align-items: center;
+		justify-content: center;
 
 		#myChart1,
 		#myChart2 {

+ 1 - 1
src/pages/components/ScrollRefresh.vue

@@ -40,7 +40,7 @@ export default {
             required: false,
             type: Number,
             default: function () {
-                return 3
+                return 6
             }
         },
     },

+ 2 - 2
src/pages/components/Sented.vue

@@ -4,7 +4,7 @@
             <van-search @search="onSearch" style="width: 100%;" v-model="params.search" placeholder="请输入批次号" />
             <!-- <van-icon @click="onSearch" size="20" style="margin: 19px 8px 0 0px;" name="search" /> -->
         </div>
-        <ScrollRefresh height="calc(100vh - 99px)" ref="scrollRefresh" :request="request" :defaultLimit="6">
+        <ScrollRefresh height="calc(100vh - 99px)" ref="scrollRefresh" :request="request" :defaultLimit="10">
             <template v-slot="slotProps">
                 <div class="onther" v-for="(item, index) in slotProps.list" :key="index">
                     <div class="onther-top">
@@ -30,7 +30,7 @@
                 <div class="batch-middel-text">
                     <div class="batch-middel-text-style" style="width: 100%; margin-left: -4px;margin-top: 0px;">【{{
                         item.expressCompany
-                    }}】运单号:{{
+                        }}】运单号:{{
                             item.expressNo }}</div>
                     <div class="batch-middel-text-style">收件人:{{ item.recipient }}</div>
                     <div class="batch-middel-text-style">部门:{{ item.departmentId }}</div>

+ 7 - 9
src/pages/new/combine.vue

@@ -19,9 +19,9 @@
                     </template>
                 </van-field>
 
-                <van-button class="sureSign" type="info" native-type="submit">合并签收</van-button>
-                <van-button style="height: 40px; width: 150px; border-radius: 8px;" type="default"
-                    @click="back">返回上一级</van-button>
+                <van-button style="float: right;" class="sureSign" type="info" native-type="submit">合并签收</van-button>
+                <!-- <van-button style="height: 40px; width: 150px; border-radius: 8px;" type="default"
+                    @click="back">返回上一级</van-button> -->
             </van-form>
 
         </div>
@@ -32,7 +32,7 @@
 <script>
 import SureCombine from './sureCombine.vue'
 export default {
-    props: ['isSign', 'signList'],
+    props: ['signList'],
     components: {
         SureCombine
     },
@@ -49,15 +49,12 @@ export default {
             this.$refs.checkboxGroup.toggleAll();
             this.qwe = !this.qwe
         },
-        // 返回
-        back() {
-            this.$emit('isSign', true);
-            console.log('sign')
-        },
+
         // 合并签收
         onSubmit(values) {
             if (this.checkedGoods.length > 0) {
                 this.isCombine = false
+                this.$emit("onIsCombine", this.isCombine)
                 console.log('submit', values);
                 // let data = this.goods.filter((good) => values.checkboxGroup.includes(good.id))
                 let data = []
@@ -79,6 +76,7 @@ export default {
         sureCombine(value) {
             console.log(value)
             this.isCombine = value
+            this.$emit("onIsCombine", this.isCombine)
         },
 
     },

+ 1 - 1
src/pages/new/deliveryInquiry.vue

@@ -35,7 +35,7 @@ export default {
                 deliveryPeopleId: localStorage.getItem('courierId'), //派送员id
                 isFinish: name == 0 ? '2' : '1',//完成 1已完成 2未完成
                 page: '1',
-                limit: name == 0 ? '3' : '6',
+                limit: name == 0 ? '6' : '10',
 
             }
             const res = await appOutboundInquiry({ ...parmas }, { emulateJSON: true, loading: true, message: "查询中..." })

+ 9 - 9
src/pages/new/sign.vue

@@ -1,13 +1,13 @@
 <template>
     <div>
         <div class="container">
-            <div v-if="isSearch">
+            <div v-if="isCombineVisible">
                 <van-search @search="check" ref="searchRef" class="search" v-model="value" placeholder="请输入快递单号" />
                 <img @click="onImg" src="@/assets/user/u4.png" alt="">
             </div>
-            <!-- <van-button style="width: 200px; border-radius: 6px; margin-left: 10px;" type="info"
-                @click="check">查询</van-button> -->
-            <Combine :isSign="isSign" :signList="signList" @isSign="isCombine" v-if="!isSign"></Combine>
+
+
+            <Combine :signList="signList" @onIsCombine="isCombineChange" v-if="isSign"></Combine>
         </div>
     </div>
 </template>
@@ -25,9 +25,10 @@ export default {
     data() {
         return {
             value: '',//输入的值
-            isSign: true,
+            isSign: false,
             signList: [],
             isSearch: true,
+            isCombineVisible: true
         };
     },
     mounted() {
@@ -73,7 +74,7 @@ export default {
 
             const res = await appFindYourShipmentList({ userId: Shipment.data.user_id }, { emulateJSON: true })
             if (res.code == '0') {
-                this.isSign = false
+                this.isSign = true
                 // res.data[1].expressStatus = "0"
                 this.signList = res.data
                 console.log(this.signList, '  this.signList')
@@ -81,9 +82,8 @@ export default {
                 Toast('快递单号不正确')
             }
         },
-        isCombine(value) {
-            console.log(value)
-            this.isSign = value
+        isCombineChange(value) {
+            this.isCombineVisible = value
         }
     }