Ver código fonte

派件查询

sunChengjie 11 meses atrás
pai
commit
a59aebc9ad

+ 12 - 0
src/api/index.js

@@ -92,3 +92,15 @@ export function appDelivery(data, config) {
         ...config
     })
 }
+
+
+
+//派件查询-待派件
+export function appOutboundInquiry(data, config) {
+    return request({
+        url: '/tianzong/express/appOutboundInquiry',
+        method: 'post',
+        data: data,
+        ...config
+    })
+}

+ 36 - 5
src/pages/components/Sented.vue

@@ -1,6 +1,9 @@
 <template>
     <div class="container">
-        <van-search v-model="value" placeholder="请输入批次号" />
+        <div style="display: flex; justify-content: space-between; background-color: #fff;">
+            <van-search style="width: 100%;" v-model="search" placeholder="请输入批次号" />
+            <van-icon @click="onSearch" size="20" style="margin: 19px 8px 0 0px;" name="search" />
+        </div>
 
         <div class="onther">
             <div class="onther-top">
@@ -27,7 +30,7 @@
                     <div style="display: flex;" class="batch-middel-text-style">联系方式:138XXXX1234 </div>
                     <div class="batch-middel-text-style">当前状态:
                         <span style="color: #1989fa;">已签收</span>
-                        <span  style="color: #1989fa;">查看</span>
+                        <span style="color: #1989fa;">查看</span>
                     </div>
                     <div class="batch-middel-text-style">签收时间:</div>
 
@@ -45,7 +48,7 @@
                     <div style="display: flex;" class="batch-middel-text-style">联系方式:138XXXX1234 </div>
                     <div class="batch-middel-text-style">当前状态:
                         <span style="color: #1989fa;">已签收</span>
-                        <span  style="color: #1989fa;">查看</span>
+                        <span style="color: #1989fa;">查看</span>
                     </div>
                     <div class="batch-middel-text-style">签收时间:</div>
 
@@ -63,7 +66,7 @@
                     <div style="display: flex;" class="batch-middel-text-style">联系方式:138XXXX1234 </div>
                     <div class="batch-middel-text-style">当前状态:
                         <span style="color: #1989fa;">已签收</span>
-                        <span  style="color: #1989fa;">查看</span>
+                        <span style="color: #1989fa;">查看</span>
                     </div>
                     <div class="batch-middel-text-style">签收时间:</div>
 
@@ -80,18 +83,45 @@
 </template>
 
 <script>
+import { appOutboundInquiry } from '@/api/index'
 export default {
     name: 'sented',
     data() {
         return {
-            value: '',
+            search: '',
             show: false,
         };
     },
+    mounted() {
+        // this.getAppOutboundInquiry()
+    },
     methods: {
+        // 触发查询
+        async getAppOutboundInquiry() {
+
+            let parmas = {
+                dispatchBatchNo: this.search, // 批次号
+                deliveryPeopleId: localStorage.getItem('courierId'), //派送员id
+                isFinish: '1',//完成 1已完成 2未完成
+                page: '1',
+                limit: '1',
+
+            }
+            const res = await appOutboundInquiry({ ...parmas }, { emulateJSON: true })
+            console.log(res, 'res================================')
+        },
+
+        // 查询
+        onSearch() {
+            this.search = 'SF202303221917'
+            this.getAppOutboundInquiry()
+            console.log(res, 'res==============')
+        },
+        // 展示弹出层
         showPopup() {
             this.show = true;
         },
+
     },
 
 };
@@ -135,6 +165,7 @@ export default {
     background-color: #f2f2f2;
     border-radius: 12px;
     margin: 5px;
+
     &-text {
         display: flex;
         flex-wrap: wrap;

+ 27 - 28
src/pages/components/Waitsent.vue

@@ -1,7 +1,9 @@
 <template>
     <div class="container">
-        <van-search v-model="search" placeholder="请输入批次号" />
-
+        <div style="display: flex; justify-content: space-between; background-color: #fff;">
+            <van-search style="width: 100%;" v-model="search" placeholder="请输入批次号" />
+            <van-icon @click="onSearch" size="20" style="margin: 19px 8px 0 0px;" name="search" />
+        </div>
         <div class="batch">
             <div class="batch-top">
                 <div style="font-size: 16px;">批次号:<span style="font-size: 16px;">ff123</span></div>
@@ -29,7 +31,6 @@
                             @click="onSureRetention">设为滞留</van-button>
                     </div>
                 </div>
-                <!-- 各个运单 -->
                 <div class="batch-middel">
                     <div class="batch-middel-text">
                         <div class="batch-middel-text-style">【xx】运单号:xxxxx</div>
@@ -38,37 +39,20 @@
                         <div class="batch-middel-text-style">楼层:</div>
                         <div class="batch-middel-text-style">座位号:</div>
                         <div style="display: flex;" class="batch-middel-text-style">联系方式:138XXXX1234 <van-button
-                                style="margin-top: -5px; border-radius: 6px;" type="info" size="mini">拨打</van-button>
-                        </div>
-                    </div>
-                    <div style="display: flex; padding-top: 5px;">
-                        <van-button style="width: 100px; border-radius: 6px;" size="small" type="info"
-                            @click="onReceiving">签收
-                        </van-button>
-                        <van-button style="width: 100px; border-radius: 6px;" size="small" type="danger"
-                            @click="onSureRetention">设为滞留</van-button>
-                    </div>
-                </div>
-                <!-- 各个运单 -->
-                <div class="batch-middel">
-                    <div class="batch-middel-text">
-                        <div class="batch-middel-text-style">【xx】运单号:xxxxx</div>
-                        <div class="batch-middel-text-style">收件人:xxx</div>
-                        <div class="batch-middel-text-style">部门:</div>
-                        <div class="batch-middel-text-style">楼层:</div>
-                        <div class="batch-middel-text-style">座位号:</div>
-                        <div style="display: flex;" class="batch-middel-text-style">联系方式:138XXXX1234 <van-button
-                                style="margin-top: -5px; border-radius: 6px;" type="info" size="mini">拨打</van-button>
+                                style="margin-top: -5px; border-radius: 6px;" type="info" plain
+                                size="mini">拨打</van-button>
                         </div>
                     </div>
-                    <div style="display: flex; padding-top: 5px;">
-                        <van-button style="width: 100px; border-radius: 6px;" size="small" type="info"
+                    <div style="display: flex; justify-content:space-around; padding-top: 5px;">
+                        <van-button style="width: 100px; border-radius: 6px;" size="small" plain type="info"
                             @click="onReceiving">签收
                         </van-button>
-                        <van-button style="width: 100px; border-radius: 6px;" size="small" type="danger"
+                        <van-button style="width: 100px; border-radius: 6px;" size="small" plain type="danger"
                             @click="onSureRetention">设为滞留</van-button>
                     </div>
                 </div>
+
+
             </div>
 
             <div @click="onUnfold" class="batch-bottom">
@@ -141,13 +125,14 @@
 </template>
 
 <script>
+import { appOutboundInquiry } from '@/api/index'
 export default {
     name: 'waitsent',
     data() {
         return {
             shouldHideOverflow: true,
             qwe: '',
-            search: '',
+            search: 'SF202303221917',
             receiving: false,//签收
             retention: false,//滞留
             selectedOption: '', // 设置为空字符串,等待选择
@@ -163,6 +148,20 @@ export default {
         };
     },
     methods: {
+        // 搜索批次号
+        async onSearch() {
+            console.log('111')
+            let parmas = {
+                dispatchBatchNo: this.search, // 批次号
+                deliveryPeopleId: localStorage.getItem('courierId'), //派送员id
+                isFinish: '2',//完成 1已完成 2未完成
+                page: '1',
+                limit: '1',
+
+            }
+            const res = await appOutboundInquiry({ ...parmas }, { emulateJSON: true })
+            console.log(res, 'res==============')
+        },
         // 签收
         onReceiving() {
             this.receiving = true;

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

@@ -13,7 +13,7 @@
                             <van-checkbox style="margin-bottom: 10px;" :disabled="checkDisabled(good)"
                                 :checked="good.checked" v-for="good in goods" :name="good.id" :key="good.id"
                                 shape="square">
-                                {{ good.dispatchBatchNo }} & {{ good.expressType }} & {{ good.expressQuantity }}件 &{{
+                                {{ good.expressNo }} & {{ good.expressType }} & {{ good.expressQuantity }}件 &{{
             good.isPayOnDelivery == '否' ? '非到付' : '到付' }}
                             </van-checkbox>
                         </van-checkbox-group>

+ 18 - 2
src/pages/new/deliveryInquiry.vue

@@ -1,7 +1,7 @@
 <template>
     <div>
         <back :title="titlename"></back>
-        <van-tabs v-model="active">
+        <van-tabs v-model="active" @click="onClick">
             <van-tab title="待派件">
                 <waitsent></waitsent>
             </van-tab>
@@ -15,6 +15,7 @@
 <script>
 import Sented from '../components/Sented.vue'
 import Waitsent from '../components/Waitsent.vue'
+import { appOutboundInquiry } from '@/api/index'
 export default {
     name: 'DeliveryInquiry',
     components: {
@@ -23,10 +24,25 @@ export default {
     },
     data() {
         return {
-            titlename:'快件查询',
+            titlename: '派件查询',
             active: 0,
         }
     },
+    methods: {
+        async onClick(name, title) {
+            console.log(name, title)
+            let parmas = {
+                dispatchBatchNo: '', // 批次号
+                deliveryPeopleId: localStorage.getItem('courierId'), //派送员id
+                isFinish: name == 0 ? '2' : '1',//完成 1已完成 2未完成
+                page: '1',
+                limit: '1',
+
+            }
+            const res = await appOutboundInquiry({ ...parmas }, { emulateJSON: true })
+            console.log(res, 'res')
+        }
+    },
 }
 </script>
 

+ 0 - 1
src/pages/new/removal.vue

@@ -46,7 +46,6 @@ export default {
     methods: {
         onImg() {
             // 调用
-
             this.callback(Math.random())
         },
         callback(code) {

+ 2 - 1
src/pages/new/sign.vue

@@ -42,8 +42,9 @@ export default {
             const res = await appFindYourShipmentList({ userId: Shipment.data.user_id }, { emulateJSON: true })
             if (res.code == '0') {
                 this.isSign = false
-                res.data[1].expressStatus = "0"
+                // res.data[1].expressStatus = "0"
                 this.signList = res.data
+                console.log(this.signList, '  this.signList')
             } else {
                 Toast('快递单号不正确')
             }

+ 9 - 15
src/pages/new/sureCombine.vue

@@ -6,7 +6,7 @@
                 <template #input>
                     <van-checkbox-group v-model="checkboxGroup">
                         <van-checkbox disabled style="margin-bottom: 10px;" :name="item.id" shape="square"
-                            v-for="item in goodsList" :key="item.id"> {{ item.dispatchBatchNo }} & {{ item.expressType
+                            v-for="item in goodsList" :key="item.id"> {{ item.expressNo }} & {{ item.expressType
                             }} & {{ item.expressQuantity }}件 &{{ item.isPayOnDelivery == '否' ? '非到付' : '到付' }}
                         </van-checkbox>
                     </van-checkbox-group>
@@ -57,27 +57,21 @@ export default {
             const formData = new FormData();
             formData.append('file', file.file); // 这里的 'file' 是后端接收文件的字段名
             const res = await appUploadTheSignature(formData)
-            console.log(res, 'res')
-
+            this.getFileUrl = res.data
         },
         async onSubmit(values) {
-            console.log(values, 'values')
             let data = []
             this.goodsList.forEach((item) => {
                 if (values.checkboxGroup.find((itemA) => itemA === item.id)) {
-                    data.push(item.dispatchBatchNo)
+                    data.push(item.expressNo)
                 }
             })
-            console.log(data, 'data')
-
-            // const params = {
-            //     signEnclosureImg: '',//签署图片
-            //     deliveryId: data,//快递单号逗号隔开
-            //     deliveryPeopleId: localStorage.getItem('courierId'),// 派件员id
-            // }
-            // const res = await appDelivery({ ...params }, { emulateJSON: true })
-            // console.log(res, 'res')
-
+            const params = {
+                signEnclosureImg: this.getFileUrl,//签署图片
+                deliveryId: data.join(','),//快递单号逗号隔开
+                deliveryPeopleId: localStorage.getItem('courierId'),// 派件员id
+            }
+            const res = await appDelivery({ ...params }, { emulateJSON: true })
             // this.$router.push('/')
         },
         back() {