sunChengjie 1 年間 前
コミット
904462f4a5

+ 16 - 4
src/api/index.js

@@ -84,22 +84,24 @@ export function appUploadTheSignature(data) {
 
 
 //快件签收-提件
-export function appDelivery(data) {
+export function appDelivery(data, config) {
     return request({
         url: '/tianzong/express/appDelivery',
         method: 'post',
         data: data,
-        emulateJSON: true
+        emulateJSON: true,
+        ...config
     })
 }
 
 //派件查询-设为滞留
-export function appSetStrands(data) {
+export function appSetStrands(data, config) {
     return request({
         url: '/tianzong/express/appSetStrands',
         method: 'post',
         data: data,
-        emulateJSON: true
+        emulateJSON: true,
+        ...config
     })
 }
 
@@ -206,4 +208,14 @@ export function appFindInsideInfoByExpressNo(data) {
         data: data,
         emulateJSON: true
     })
+}
+
+// 后带你生成的批次号
+export function appGetLotNumber(data) {
+    return request({
+        url: '/tianzong/express/appGetLotNumber',
+        method: 'post',
+        data: data,
+        emulateJSON: true
+    })
 }

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

@@ -261,7 +261,7 @@ export default {
 
 		// 点击搜索icon
 		async wxScanCodeA(result) {
-			const res = await appFindYourShipment({ expressNo: result }, { emulateJSON: true })
+			const res = await appFindYourShipment({ expressNo: result }, { emulateJSON: true, loading: true, message: '加载中...' })
 			if (res.msg == 'success' && res.data) {
 				this.$store.state.shipment = res
 				this.$router.push('ScannerResult')
@@ -272,7 +272,7 @@ export default {
 
 		// 搜索
 		async onSearch() {
-			const res = await appFindYourShipment({ expressNo: this.searchValue }, { emulateJSON: true })
+			const res = await appFindYourShipment({ expressNo: this.searchValue }, { emulateJSON: true, loading: true, message: '加载中...' })
 			if (res.msg == 'success' && res.data) {
 				this.$store.state.shipment = res
 				this.$router.push('ScannerResult')

+ 3 - 3
src/pages/components/Waitsent.vue

@@ -178,7 +178,7 @@ export default {
                 isFinish: '2',//完成 1已完成 2未完成
                 ..._params
             }
-            const res = await appOutboundInquiry({ ...parmas }, { emulateJSON: true })
+            const res = await appOutboundInquiry({ ...parmas }, { emulateJSON: true, loading: true, message: "查询中..." })
             res.data = res.data.map((item) => {
                 item.list = [item.list]
                 return item
@@ -213,7 +213,7 @@ export default {
             if (value.picker == '其他原因') {
                 params.sendRemark = this.otherCause
             }
-            const res = await appSetStrands({ ...params })
+            const res = await appSetStrands({ ...params }, { loading: true, message: '滞留中' })
             if (res.code == 0) {
                 this.$toast('滞留完成')
                 this.retention = false
@@ -260,7 +260,7 @@ export default {
             if (value.picker == '他人签收') {
                 params.collectAgentNumber = this.getOtherPhone
             }
-            const res = await appDelivery({ ...params })
+            const res = await appDelivery({ ...params }, { loading: true, message: '签收中' })
             if (res.code == 0) {
                 this.$toast('签收完成')
                 this.receiving = false

+ 5 - 6
src/pages/new/combine.vue

@@ -4,18 +4,16 @@
             <div style="padding: 10px 0 20px;">找到{{ goods.length }}个属于"{{ goods[0].recipient
                 }}"&部门"{{ goods[0].departmentId }}"&座位号:"{{ goods[0].sendSeat }}"的快件:</div>
 
-            <van-checkbox  style="margin-bottom: 10px;" v-model="isAllChecked"
-                shape="square">全选</van-checkbox>
+            <van-checkbox style="margin-bottom: 10px;" v-model="isAllChecked" shape="square">全选</van-checkbox>
 
             <van-form @submit="onSubmit">
                 <van-field name="checkboxGroup">
                     <template #input>
                         <van-checkbox-group v-model="checkedGoods">
-                            <van-checkbox style="margin-bottom: 10px;"
-                                :checked="good.checked" v-for="good in goods" :name="good.id" :key="good.id"
-                                shape="square">
+                            <van-checkbox style="margin-bottom: 10px;" :checked="good.checked" v-for="good in goods"
+                                :name="good.id" :key="good.id" shape="square">
                                 {{ good.expressNo }} & {{ good.expressType }} & {{ good.expressQuantity }}件 &{{
-            good.isPayOnDelivery == '否' ? '非到付' : '到付' }}
+                                    good.isPayOnDelivery == '否' ? '非到付' : '到付' }}
                             </van-checkbox>
                         </van-checkbox-group>
                     </template>
@@ -70,6 +68,7 @@ export default {
                 })
                 this.goodsList = data
                 console.log('data', data);
+                this.$emit('isSearch', false)
             } else {
                 this.$toast('请至少选择一个')
             }

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

@@ -38,7 +38,7 @@ export default {
                 limit: name == 0 ? '3' : '6',
 
             }
-            const res = await appOutboundInquiry({ ...parmas }, { emulateJSON: true })
+            const res = await appOutboundInquiry({ ...parmas }, { emulateJSON: true, loading: true, message: "查询中..." })
             console.log(res, 'res')
         }
     },

+ 10 - 4
src/pages/new/removal.vue

@@ -25,7 +25,7 @@
 </template>
 
 <script>
-import { appDeliveryPersonDeliveries, appPermissionChecks } from '../../api/index';
+import { appDeliveryPersonDeliveries, appPermissionChecks, appGetLotNumber } from '../../api/index';
 import { Toast } from 'vant'
 import Batched from './batched.vue'
 import { getCompanyExpressNo } from "@/utils/utils"
@@ -102,13 +102,19 @@ export default {
         },
         // 生成批次
         async onBatch() {
-            if (this.codes.length < 1) {
-                return Toast('数据不能为空生成批次')
+            // if (this.codes.length < 1) {
+            //     return Toast('数据不能为空生成批次')
+            // }
+
+            const batchNum = await appGetLotNumber({})
+            if (batchNum.msg !== 'success') {
+                Toast(batchNum.error)
+                return
             }
             let data = {
                 deliveryPeopleId: localStorage.getItem('courierId'), //派送员id
                 deliveryId: this.codes.join(','),    //快件单号
-                dispatchBatchNo: getCompanyExpressNo(),    //批次号
+                dispatchBatchNo: batchNum.data,    //批次号
                 // floor:expressScope
             }
             const res = await appDeliveryPersonDeliveries({ ...data }, { emulateJSON: true })

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

@@ -1,9 +1,10 @@
 <template>
     <div>
         <div class="container">
-            <van-search @search="check" ref="searchRef" class="search" v-model="value" placeholder="请输入快递单号" />
-            <img @click="onImg" src="@/assets/user/u4.png" alt="">
-
+            <div v-if="isSearch">
+                <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>
@@ -25,7 +26,8 @@ export default {
         return {
             value: '',//输入的值
             isSign: true,
-            signList: []
+            signList: [],
+            isSearch: true,
         };
     },
     mounted() {
@@ -38,7 +40,6 @@ export default {
     },
     methods: {
         onImg() {
-
             wx.scanQRCode({
                 needResult: 1, // 默认为0,扫描结果由微信处理,1则直接返回扫描结果,
                 scanType: ["qrCode", "barCode"], // 可以指定扫二维码还是一维码,默认二者都有
@@ -55,17 +56,16 @@ export default {
                     console.log(res, 'error++++++++++');
                 }
             });
-
         },
+
         // 查询
         async check() {
-
             if (this.value == '') {
                 this.$toast('请输入快件单号或手机单号')
                 return
             }
 
-            const Shipment = await appFindYourShipment({ expressNo: this.value }, { emulateJSON: true })
+            const Shipment = await appFindYourShipment({ expressNo: this.value }, { emulateJSON: true, loading: true, message: '加载中...' })
 
             if (Shipment.data == null) {
                 Toast('没有数据')

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

@@ -71,7 +71,7 @@ export default {
                 deliveryId: data.join(','),//快递单号逗号隔开
                 deliveryPeopleId: localStorage.getItem('courierId'),// 派件员id
             }
-            const res = await appDelivery({ ...params }, { emulateJSON: true })
+            const res = await appDelivery({ ...params }, { emulateJSON: true, loading: true, message: '签收中' })
             if (res.code == 0) {
                 this.$toast('签收成功')
                 this.$router.push('/')