From 056997b07e61fc99d5c311d0c5489b9de48fd9bc Mon Sep 17 00:00:00 2001 From: xuxueyang <xuxy@fengyuntec.com> Date: 星期二, 24 九月 2024 17:25:16 +0800 Subject: [PATCH] update 细节和订单确认收货(写死了商户号) --- sub_pages/partner/delivery/station-delivery.vue | 86 +++++++++++++++++++++++++++++++++++------- 1 files changed, 71 insertions(+), 15 deletions(-) diff --git a/sub_pages/partner/delivery/station-delivery.vue b/sub_pages/partner/delivery/station-delivery.vue index 6412de3..b2ed814 100644 --- a/sub_pages/partner/delivery/station-delivery.vue +++ b/sub_pages/partner/delivery/station-delivery.vue @@ -5,31 +5,61 @@ query: { stationId: '', stationName: '', + date: '', }, - - + list: [], + defaultDatePre: new Date(), + show_time_picker_time:false + } }, onLoad(options) { - this.listApi = '/api/delivery/list/today' + this.query.date = this.$util.toDate(this.defaultDatePre) + this.getList() + // this.list = [{}, {}] + }, - }, - onReachBottom() { - this.getMore() - }, async onPullDownRefresh() { this.page.current = 1 await this.getList() uni.stopPullDownRefresh() }, methods: { + async select_time_picker_time(e) { + var vv = e && e.length >= 1 && new Date(e[0]) || new Date() + this.show_time_picker_time = false; + this.query.date = this.$util.toDate(vv) || '' + this.refreshList() + }, + async getList() { + this.$message.showLoading() + const { + code, + data + } = await this.$http.request('get', '/api/delivery/station/list', { + params: { + name: this.query.stationName + } + }) + + this.$message.hideLoading() + if (code == 0) { + this.list = data || [] + + } + }, toDetail(item) { uni.navigateTo({ - url: `/sub_pages/partner/delivery/delivery-detail?stationId=${item.id}&stationName=${item.name}` + url: `/sub_pages/partner/delivery/delivery?stationId=${item.stationId}&stationName=${item.name}` }) }, + showAll() { + uni.navigateTo({ + url: `/sub_pages/partner/delivery/delivery` + }) + } } } </script> @@ -39,36 +69,57 @@ <view class="p15" style="min-height: calc(100vh - 260rpx);"> <view class="search-container m-t-12 flex"> <view class="flex1 input"> - <u-input placeholder="请输入集货站名称" v-model="query.stationName"> + <u-input placeholder="集货站、供应商名称、货位号、供应商手机号" v-model="query.stationName"> <template slot="suffix"> - <uni-icons color="#20613D" type="search" size="24" @click="refreshList"></uni-icons> + <uni-icons color="#20613D" type="search" size="24" @click="getList"></uni-icons> </template> </u-input> </view> </view> + <view class="search-container m-t-12 flex" > + <view class="m-l-10 m-r-a w-fit" :class="[query.date?'':'desc-gray']" + @click="show_time_picker_time=true"> + 订单日期:{{query.date || '请选择日期'}} + </view> + + <view class="m-l-a m-r-0 w-fit" @click="showAll" v-if="currentInfo&¤tInfo.mainWarehouse">查看全部>></view> + </view> + <no-data v-if="!list||list.length===0" style="width: 100%;"></no-data> <view v-for="(item,index) in list" :key="index" class="m-b-24"> <view class="delivery-item bg-white br-4 p10 flex"> - <view> + <view class="m-r-10"> <image src="/static/common/icon-station.png" class="icon-station m-r-10 img100 icon"></image> </view> - <view> + <view class="flex1"> <view class="title"> {{ item.name }} </view> <view class="flex"> <view class="form-item flex1"> - <view class="form-item-label">供货数</view> - <view class="form-item-value t-red">{{ item.stationName || '-' }}</view> + <view class="form-item-label">类型</view> + <view class="form-item-value">{{ item.typeStr || '-' }}</view> </view> <view class="form-item flex1"> <view class="form-item-label">供货数</view> - <view class="form-item-value t-red">{{ item.stationName || '-' }}</view> + <view class="form-item-value t-red">{{ item.totalNum || '0' }}</view> </view> + + </view> + <view class="flex"> + <view class="form-item flex1"> + <view class="form-item-label">已质检</view> + <view class="form-item-value">{{ item.checkedSupplierCount || '0' }}</view> + </view> + <view class="form-item flex1"> + <view class="form-item-label">待质检</view> + <view class="form-item-value t-red">{{ item.uncheckedSupplierCount || '0' }}</view> + </view> + </view> @@ -84,6 +135,10 @@ </view> + <u-calendar :show="show_time_picker_time" mode="single" @confirm="select_time_picker_time" + @cancel="show_time_picker_time = false" :monthNum="12" :maxDate="defaultDatePre" :defaultDate="defaultDatePre" + @close="show_time_picker_time = false" minDate="2024-07-01" toolTip="选择订单日期"> + </u-calendar> </view> </template> @@ -94,6 +149,7 @@ width: 72rpx; height: 72rpx; } + .title { font-weight: 600; font-size: 32rpx; -- Gitblit v1.9.3