123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259 |
- <template>
- <div class="container">
- <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>
- <div class="jindu">派送进度 10/15</div>
- </div>
-
- <div class="batchss" :style="batchssStyle">
- <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" plain
- size="mini">拨打</van-button>
- </div>
- </div>
- <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" plain 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" plain
- size="mini">拨打</van-button>
- </div>
- </div>
- <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" plain type="danger"
- @click="onSureRetention">设为滞留</van-button>
- </div>
- </div>
- </div>
- <div @click="onUnfold" class="batch-bottom">
- 展开.....
- </div>
-
- <van-popup v-model="receiving" style="width: 100%; height: 85%;">
- <div style="font-size: 20px; text-align: center; ">派件签收</div>
- <van-form @submit="onSubmit">
- <van-field label="运单号" value="xxx" readonly />
- <van-field label="快件类型" value="xxx" readonly />
- <van-field label="快递公司" value="xxx" readonly />
- <van-field label="部门" value="xxx" readonly />
- <van-field label="座位号" value="xxx" readonly />
- <van-field label="收件人" value="xxx" readonly />
- <van-field label="楼层" value="xxx" readonly />
- <van-field label="联系方式" value="xxx" readonly />
- <van-field readonly clickable name="picker" :value="selectedOption" label="签收类型"
- placeholder="点击签收类型" @click="showPicker = true" />
- <van-popup v-model="showPicker" position="bottom">
- <van-picker show-toolbar :columns="options" @confirm="onConfirm" @cancel="showPicker = false" />
- </van-popup>
- <van-field v-if="wer == '他人签收'" v-model="qwe" :rules="[{ required: true }]" label="代取手机号"
- placeholder="请输入代取手机号" />
- <van-field name="uploader" label="签收照片">
- <template #input>
- <van-uploader v-model="uploader" />
- </template>
- </van-field>
- <div style="margin: 16px;">
- <van-button round block type="info" native-type="submit">签收完成</van-button>
- </div>
- </van-form>
- </van-popup>
-
- <van-popup v-model="retention" style="width: 100%; height: 75%;">
- <div style="font-size: 20px; text-align: center; ">派件滞留</div>
- <van-form @submit="onSubmit">
- <van-field label="运单号" value="xxx" readonly />
- <van-field label="快件类型" value="xxx" readonly />
- <van-field label="快递公司" value="xxx" readonly />
- <van-field label="部门" value="xxx" readonly />
- <van-field label="座位号" value="xxx" readonly />
- <van-field label="收件人" value="xxx" readonly />
- <van-field label="楼层" value="xxx" readonly />
- <van-field label="联系方式" value="xxx" readonly />
- <van-field readonly clickable name="picker" :value="selectedRetention" label="滞留原因"
- placeholder="点击签收类型" @click="showRetention = true" />
- <van-popup v-model="showRetention" position="bottom">
- <van-picker show-toolbar :columns="Retention" @confirm="onRetention"
- @cancel="showRetention = false" />
- </van-popup>
- <van-field v-if="ert == '其他原因'" v-model="qwe" label="其他原因" :rules="[{ required: true }]"
- placeholder="请输入其他原因" />
- <div style="margin: 16px;">
- <van-button round block native-type="submit" type="danger">设为滞留</van-button>
- </div>
- </van-form>
- </van-popup>
- </div>
- </div>
- </template>
- <script>
- import { appOutboundInquiry } from '@/api/index'
- export default {
- name: 'waitsent',
- data() {
- return {
- shouldHideOverflow: true,
- qwe: '',
- search: 'SF202303221917',
- receiving: false,
- retention: false,
- selectedOption: '',
- selectedRetention: '',
- value: '',
- options: ['本人签收', '他人签收'],
- Retention: ['无法联系收件人', '其他原因'],
- showPicker: false,
- showRetention: false,
- wer: '',
- ert: '',
- uploader: [{ url: 'https://img01.yzcdn.cn/vant/leaf.jpg' }],
- };
- },
- methods: {
-
- async onSearch() {
- console.log('111')
- let parmas = {
- dispatchBatchNo: this.search,
- deliveryPeopleId: localStorage.getItem('courierId'),
- isFinish: '2',
- page: '1',
- limit: '1',
- }
- const res = await appOutboundInquiry({ ...parmas }, { emulateJSON: true })
- console.log(res, 'res==============')
- },
-
- onReceiving() {
- this.receiving = true;
- this.selectedOption = this.options[0];
- },
-
- onSureRetention() {
- this.retention = true;
- },
- onConfirm(value) {
- this.selectedOption = value;
- this.showPicker = false;
- this.wer = value
- },
- onRetention(value) {
- this.selectedRetention = value;
- this.showRetention = false;
- this.ert = value
- },
-
- onSubmit() {
- },
-
- onUnfold() {
- this.shouldHideOverflow = !this.shouldHideOverflow;
- console.log(this.shouldHideOverflow, '44')
- }
- },
- mounted() {
- this.selectedOption = this.options[0];
- },
- computed: {
- batchssStyle() {
- return {
- overflow: this.shouldHideOverflow ? 'hidden' : 'auto',
- height: this.shouldHideOverflow ? '130px' : 'auto',
- }
- }
- }
- };
- </script>
- <style lang="less" scoped>
- * {
- font-size: 12px;
- }
- .batchss {
- height: 130px;
- // overflow: hidden;
- }
- .batch {
- background-color: #fff;
- margin: 10px;
- &-top {
- display: flex;
- justify-content: space-between;
- align-items: center;
- padding: 10px 0 6px 0;
- .jindu {
- color: #169bd5
- }
- }
- &-middel {
- height: 120px;
- background-color: #f2f2f2;
- border-radius: 12px;
- margin: 10px 6px;
- &-text {
- display: flex;
- flex-wrap: wrap;
- &-style {
- width: 165px;
- margin-top: 10px;
- }
- }
- }
- &-bottom {
- padding: 10px 4px;
- color: #169bd5;
- }
- }
- </style>
|