From bd68e186226e2e0e971ecac557b6aa25fa536aee Mon Sep 17 00:00:00 2001 From: wk Date: 星期二, 10 九月 2024 10:12:43 +0800 Subject: [PATCH] feat:门卫 --- pages/quality-inspection-page/edc-sampling/edc-sampling.vue | 50 ++++++++++++++++++++++++++++++++++++++++++++++---- 1 files changed, 46 insertions(+), 4 deletions(-) diff --git a/pages/quality-inspection-page/edc-sampling/edc-sampling.vue b/pages/quality-inspection-page/edc-sampling/edc-sampling.vue index e813548..1d54af9 100644 --- a/pages/quality-inspection-page/edc-sampling/edc-sampling.vue +++ b/pages/quality-inspection-page/edc-sampling/edc-sampling.vue @@ -1,15 +1,25 @@ <template> <view class="edc-sampling-wrap"> <view class="edc-sampling-main"> + <u-empty + class="empty-box" + mode="data" + icon="http://cdn.uviewui.com/uview/empty/data.png" + textSize="30" + width="300" + height="300" + text="鏆傛棤鏁版嵁" + v-if="emptyShow"> + </u-empty> <view class="edc-sampling-card" v-for="(item,index) in edcList" :key="index"> <view class="edc-sampling-line"> <h1>{{item.carNo}}</h1> <!-- #ifdef H5 --> - <view class="status" :class="statusClassComputed(item.status)" v-if="item.status">{{statusComputed(item.status)}}</view> + <view class="status" :class="statusClassComputed(item.checkStatus)" v-if="item.checkStatus">{{statusComputed(item.checkStatus)}}</view> <!-- #endif --> <!-- #ifdef MP-WEIXIN --> - <view class="status" v-if="item.status">{{statusComputed(item.status)}}</view> + <view class="status" v-if="item.status">{{statusComputed(item.checkStatus)}}</view> <!-- #endif --> </view> <view class="edc-sampling-line"> @@ -71,6 +81,7 @@ data() { return { edcList:[], + emptyShow:false, //绌洪〉闈㈡槸鍚︽樉绀� size:10, current:1, total:0, @@ -121,7 +132,7 @@ }else if(status == 7) { return 'black' }else { - return '' + return null } }, async getPageList(callBack) { @@ -141,6 +152,11 @@ const res = await this.$reqGet('getTaskCoalOfNoDetection',{current:this.current,size:this.size,productId:this.productId}) uni.hideLoading() this.edcList = [...this.edcList,...res.data.records] + if(this.edcList == 0) { + this.emptyShow = true + }else { + this.emptyShow = false + } this.total = res.data.total callBack && callBack() }catch (err) { @@ -156,6 +172,7 @@ }, onPullDownRefresh() { //涓嬫媺鍒锋柊 console.log() + this.flag = false this.current = 1 this.edcList = [] setTimeout(() => { @@ -174,13 +191,22 @@ uni.showLoading({ title: "鍔犺浇涓�" }) + let params = { + customerId:item.customerId, + customerName:item.customerName, + carNo:item.carNo, + productId:item.productId, + productName:item.productName, + bunkerId:item.bunkerId, + id:item.id + } uni.showModal({ title: '纭', content: '纭鍒涘缓EDC璐ㄦ鍗曞悧', success: (res) => { if(res.confirm) { //璋冪敤鎺ュ彛 - this.$reqPost('edcSampling',item,'json').then(res => { + this.$reqPost('edcSampling',params,'json').then(res => { console.log(res,'res=====-----') if(res.code == 0) { uni.hideLoading() @@ -282,6 +308,22 @@ } } } + .isOver{ + width: 100%; + display: flex; + justify-content: center; + padding: 40rpx 0; + font-size: 30rpx; + color: #999999; + } + .empty-box{ + margin: auto; + position: absolute; + top: 24%; + left: 50%; + transition: (50%, -50%); + transform: translate(-50%, -24%); + } } } -- Gitblit v1.9.1