From 5d46360410a48fa6038e46e0d769f88207be9d75 Mon Sep 17 00:00:00 2001 From: yangan <yangan0921@163.com> Date: 星期二, 25 二月 2025 16:28:25 +0800 Subject: [PATCH] feat:质检员页面外销展示多个提煤单 --- pages/sampling-page/index.vue | 420 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++--- 1 files changed, 393 insertions(+), 27 deletions(-) diff --git a/pages/sampling-page/index.vue b/pages/sampling-page/index.vue index 760ba12..f9d22e6 100644 --- a/pages/sampling-page/index.vue +++ b/pages/sampling-page/index.vue @@ -12,13 +12,36 @@ iconSize="1000" v-if="CoalNameList.length == 0"></u-empty> </view> --> + + <view class="title"><u-icon size='26' color="#" name="order"></u-icon><i>寰呮鍖�</i></view> <view class="body"> <!-- <selectTarget ref='selectTarget'></selectTarget> --> <view class="collection-form"> - <view class="collection-form-item" + <u-tabs :list="tabList" :activeStyle="{fontSize:'26rpx'} " @click="tabClick"></u-tabs> + <view style="position: relative;"> + <u-empty mode="data" + icon="http://cdn.uviewui.com/uview/empty/data.png" + textSize="30" + iconSize="1000" + text="鏆傛棤寰呮鏁版嵁" + v-if="orderPlanData.length == 0"></u-empty> + </view> + <view class="collection-form-item" v-for="(item, index) in orderPlanData" - :key="index" - @click="cardBodyClick(item)"> + :key="index"> + <view class="first-line"> + <view class="dispatch-receive"> + <view class="dispatch-orderCode">缂栧彿锛歿{ item.code }}</view> + </view> + </view> + <view class="first-line"> + + <view class="dispatch-orderCode" style="font-size: 25rpx;">瀹㈡埛鍚嶇О锛歿{ item.customerName }}</view> + + </view> + <view class="second-line"> + <view style="font-size: 20rpx;">{{ item.carNo }}</view> + </view> <view class="first-line"> <view class="dispatch-receive"> <view class="dispatch-dept">{{ item.deptName }}</view> @@ -26,8 +49,11 @@ <view class="dispatch">{{ item.filedName }}</view> </view> <view class="point-number"> - <text class="residue">{{ item.cars2 }}</text> - <text>/{{ item.carNum }}</text> + <text class="residue">{{ item.inspectionStatus === 0 ? '鏃犻渶妫�楠�' : + item.inspectionStatus === 1 ? '闇�妫�楠�' : + item.inspectionStatus === 2 ? '寰呮楠�' : + item.inspectionStatus === 3 ? '妫�楠屽悎鏍�' : '' + }}</text> </view> </view> <view class="second-line" @@ -43,32 +69,41 @@ v-if="item.orderType">{{ item.orderType }}</view> </view> </view> - <view class="second-line"> + <view class="second-line" style="font-size: 20rpx;"> {{item.orderCode}} </view> <view class="third-line"> <view class="time-icon"> <view - style="width: 24rpx;height: 24rpx;li ne-height: 24rpx;background: url('https://mr1.res.jzeg.cn:9096/appimg/image/banner/clock.png') no-repeat;background-size: cover"> + style="width: 24rpx;height: 24rpx;line-height: 24rpx;background: url('https://mr1.res.jzeg.cn:9096/appimg/image/banner/clock.png') no-repeat;background-size: cover"> </view> </view> <view class="send-date">{{ item.sendDate }}</view> </view> <view class="fourth-line"> - <view class="receive" - @click.stop="receiveClick(item)"> - <view class="button-image">棰嗗彇</view> - </view> + <view class="forward" + v-if="item.inspectionStatus!==3" @click.stop="forwardClick(item)"> - <view class="button-image">杞彂</view> + <u-button type="primary" text="纭鍙栨牱"></u-button> </view> </view> </view> + <view class="bottom"></view> + </view> </view> </view> </view> + <u-modal :show="showFlag" + :title="'纭鍙栨牱瀹屾垚锛�'" + :cancelText="'鍙栨秷'" + showCancelButton + :closeOnClickOverlay="true" + @close="showFlag = false" + @cancel="showFlag = false" + @confirm="popupDetermineClick"> + </u-modal> </view> </template> @@ -77,9 +112,32 @@ components: { }, + watch:{ + samplingData: { + handler(v) { + this.orderPlanData = v; + }, + deep: true, + immediate: true + } + }, data() { return { - + orderPlanData:[], + tagName:'澶栭攢', + activeObj:{}, + timer:null, + showFlag:false, + tabList:[{ + name:'澶栭攢' + }, + { + name:'澶栬喘' + }, + { + name:'鍐呰喘' + } + ] }; }, onLoad() { @@ -88,10 +146,112 @@ methods: { init() { this.$nextTick(() => { - // this.$refs.selectTarget.getDeptIdFiled() + if(this.tagName == '澶栬喘'){ + this.getWaiData(); + }else if(this.tagName == '鍐呰喘'){ + this.getNeiData(); + } else{ + this.getListData(); + } + + + }) + }, + getListData(){ + this.$reqGet('inspectedTaskPage',{inspectionStatus:2}).then(res=>{ + console.log(res,'result'); + if(res.code == 0){ + if(res.data.records.length){ + this.orderPlanData = res.data.records + }else{ + this.orderPlanData = []; + } + + } + + }) + }, + //纭鍙栨牱 + forwardClick(item){ + this.showFlag = true; + this.activeObj = item; + + }, + popupDetermineClick(){ + this.$reqPut('updateInspectionStatus',{inspectionStatus:3,id:this.activeObj.id},'params').then(res=>{ + console.log(res,'result'); + if(res.code == 0){ + this.$u.toast('纭鍙栨牱瀹屾垚锛�') + this.showFlag = false; + this.init(); + }else{ + this.$u.toast(res.msg || '璇锋眰澶辫触') + this.showFlag = false; + } + + }) + + }, + //瀹氭椂鏌ヨ浠诲姟 + timerFun(){ + this.timer = window.setInterval(() => { + setTimeout(() => { + if(this.tagName == '澶栬喘'){ + this.getWaiData() + }else if(this.tagName == '鍐呰喘'){ + this.getNeiData(); + } + else{ + this.getListData() //璋冪敤鎺ュ彛鐨勬柟娉� + } + console.log(1111111111) + }, 0) + }, 60000); + }, + clearTime(){ + window.clearInterval(this.timer) + }, + tabClick(val){ + console.log(val,'valll') + this.tagName = val.name; + if(val.name == '澶栬喘'){ + this.getWaiData(); + }else if(val.name === '鍐呰喘'){ + this.getNeiData(); + } + else{ + this.getListData(); + } + + + }, + getWaiData(){ + this.$reqGet('inspectedTaskPage',{inspectionStatus:1,orderType:'澶栬喘'}).then(res=>{ + if(res.code == 0){ + if(res.data.records.length){ + this.orderPlanData = res.data.records; + }else{ + this.orderPlanData = []; + } + + } + }) + }, + //鍐呰喘 + getNeiData(){ + this.$reqGet('inspectedTaskPage',{inspectionStatus:1,orderType:'鍐呰喘'}).then(res=>{ + if(res.code == 0){ + if(res.data.records.length){ + this.orderPlanData = res.data.records; + }else{ + this.orderPlanData = []; + } + + } + }) } - }, + }, } </script> @@ -143,16 +303,40 @@ width: 100%; margin: 0 auto; - &_body { - .collection-form { - width: vww(345); + } + .body{ + position: absolute; + top: 38%; + width: 97%; + left: 50%; + margin-left: -47%; + + // box-shadow: 0 2px 18px 0 rgba(0, 0, 0, .2); + // background: #fff; + border-radius: 20rpx; + } + .bottom{ + height: 200rpx; + } + .title{ + position: absolute; + top: 34%; + left: 50%; + transform: translateX(-50%); + color: #fff; + font-size: 25rpx; + display: flex; + } + .collection-form { + margin: 0 vww(15); position: relative; - top: vww(-144); + transform: translateX(-20rpx); + .collection-form-item { - width: 690rpx; - height: 100rpx; + width: 100%; + height: 400rpx; background: #ffffff; box-shadow: 4rpx 6rpx 25rpx 0rpx rgba(73, 120, 240, 0.15); border-radius: 20rpx; @@ -160,22 +344,204 @@ @include flex; flex-direction: column; position: relative; - align-items: center; - justify-content: center; + align-items: flex-start; margin-top: vww(10); .first-line { width: 94%; height: vww(30); + margin: vww(10) vww(16) 0 vww(16); display: flex; justify-content: space-between; + + .dispatch-receive { + width: 70%; + display: flex; + justify-content: flex-start; + align-items: center; + + .dispatch-dept { + font-size: 25rpx; + + display: flex; + align-items: center; + } + .dispatch-orderCode{ + width: 100%; + font-size: 25rpx; + } + + .black-bar { + width: 2rpx; + font-size: 25rpx; + height: 30rpx; + background: #515151; + margin-left: vww(12); + } + + .dispatch { + font-size: 25rpx; + margin-left: vww(12); + min-width: vww(50); + } + + } + + .point-number { + width: 15%; + + text { + font-size: 20rpx; + font-weight: 400; + color: #c78a64; + } + + .residue { + font-size: 23rpx; + font-weight: 400; + color: #f81414; + } + } + } + + .second-line { + width: 100%; + height: vww(30); + margin-left: vww(16); + display: flex; align-items: center; + justify-content: flex-start; + + .coal-name { + flex-grow: 1; + height: 30rpx; + font-size: 30rpx; + font-weight: 300; + color: #515151; + position: relative; + display: flex; + align-items: center; + + .black-bar { + width: 2rpx; + height: 30rpx; + background: #515151; + margin-left: vww(12); + } + + .coal-type { + margin-left: vww(12); + min-width: vww(50); + height: 30rpx; + line-height: 30rpx; + font-size: 30rpx; + font-weight: 300; + color: #515151; + } + } + } + + .third-line { + width: 40%; + height: vww(30); + margin-left: vww(15); + display: flex; + justify-content: flex-start; + align-items: center; + + .send-date { + margin-left: vww(14); + width: 168rpx; + height: 24rpx; + line-height: 24rpx; + font-size: 28rpx; + font-weight: 300; + color: #515151; + } + } + + .fourth-line { + width: 100%; + height: vww(30); + @include flex; + justify-content: flex-start; + position: relative; + bottom: vww(10); + left: 25%; + + .receive, + .forward { + width: vww(123); + height: vww(48); + @include flex; + justify-content: center; + color: #ffffff; + font-size: 28rpx; + position: absolute; + + .button-image { + width: 100%; + height: 100%; + // background: url('../../../static/image/banner/button.png') no-repeat; + background-size: cover; + font-size: 28rpx; + font-weight: 300; + color: #ffffff; + text-align: center; + line-height: vww(45); + } + } + + .receive { + left: vww(20); + } + + .forward { + width: vww(106); + left: vww(140); + + .button-image { + width: 100%; + height: 100%; + // background: url('../../../static/image/banner/transpartent.png') no-repeat; + background-size: cover; + font-size: 28rpx; + font-weight: 300; + color: #3b56eb; + text-align: center; + line-height: vww(45); + } + } } } } - } - } - .body{ + .receiverPopup { + height: vww(110); + width: 400rpx; - } + .receiverPopup__title { + + width: 80%; + text-align: center; + } + + .receiverPopup__input { + width: 80%; + margin: vww(10) auto 0; + + .u-input { + border: 1px solid #dddddd; + } + } + + &__btn { + margin: vww(10) auto; + width: 50%; + + .u-button { + height: vww(20); + } + } + } + </style> \ No newline at end of file -- Gitblit v1.9.1