From 5c63b1fccedfcd208f3434edb79926c206c3d26f Mon Sep 17 00:00:00 2001 From: yangan <yangan0921@163.com> Date: 星期二, 29 四月 2025 14:52:35 +0800 Subject: [PATCH] feat:增加类型显示 --- subPages/splicingOrders/index.vue | 217 +++++++++++++++++++++++++++++++++++++----------------- 1 files changed, 149 insertions(+), 68 deletions(-) diff --git a/subPages/splicingOrders/index.vue b/subPages/splicingOrders/index.vue index 309f6a7..79655e8 100644 --- a/subPages/splicingOrders/index.vue +++ b/subPages/splicingOrders/index.vue @@ -3,17 +3,24 @@ <view class="history-information" v-for="item,i in datetailData" :key="i"> <view class="first"> - <view class="">{{ item.carNo || '' }}</view> + <view class="">{{ item.orderCode || '' }}</view> <view class=""></view> </view> <view class="second"> <view class="coal-name">{{ item.productNames || item.productName }}</view> <view class="order-type">{{ item.orderType || '' }}</view> </view> + <view class="second"> + <view class="coal-name">鍝佺骇锛� {{ item.productGrade }}</view> + </view> <view class="third"> <view class="third-line"> <view class="third-line_text">瀹㈡埛鍚嶇О:</view> <view>{{ item.customerName }}</view> + </view> + <view class="third-line"> + <view class="third-line_text">杞﹂槦鍚嶇О:</view> + <view>{{ item.fleetName }}</view> </view> <view class="third-line" v-if="/鑱氭隘涔欑儻鏍戣剛/.test(item.productName)"> <view class="third-line_text">鍖呰绫诲瀷:</view> @@ -40,76 +47,73 @@ </view> <view class="senddate">{{ item.orderCode }}</view> </view> - <view class="table"> - <uni-table border stripe - emptyText="鏆傛棤鏇村鏁版嵁"> - <uni-tr> - <uni-th align="center" width='200'>浜у搧</uni-th> - <uni-th align="center" width='100'>浜у搧绛夌骇</uni-th> - <uni-th align="center" width='100'>鍖呰绫诲瀷</uni-th> - <uni-th align="center" width='200'>浠撳簱</uni-th> - <uni-th align="center" width='100'>鐨噸</uni-th> - <uni-th align="center" width='100'>姣涢噸</uni-th> - <uni-th align="center" width='100'>鍑�閲�</uni-th> - <uni-th align="center" width='100'>鏁伴噺</uni-th> - <uni-th align="center">璁″垝閲�</uni-th> - <uni-th align="center">瀹為檯閲�</uni-th> - - </uni-tr> - <uni-tr v-for="(subItem, index) in item.tmTaskCoalList" :key="index"> - - <uni-td align="center"> - <view>{{ subItem.productName }}</view></uni-td> - <uni-td align="center"> - <view>{{ subItem.productGrade }}</view></uni-td> - <uni-td> - <view>{{ proType[item.packingType] }}</view> - </uni-td> - <uni-td> - <view>{{ subItem.bunkerName }}</view> - </uni-td> - <uni-td> - <view class="name" v-if="subItem.skin">{{ Number(subItem.skin).toFixed(2) || '' }}</view> - </uni-td> - <uni-td> - <view class="name" v-if="subItem.hair"> {{ Number(subItem.hair).toFixed(2) || '' }}</view> - </uni-td> - <uni-td> - <view class="name" v-if="(subItem.clean || (subItem.clean && subItem.clean === 0))">{{ Number(subItem.clean).toFixed(2) || ''}}</view> - </uni-td> - <uni-td> - <view class="name">{{ subItem.productQuantity }}</view> - </uni-td> - <uni-td> - <view class="name">{{ subItem.planMeasure }}</view> - </uni-td> - <uni-td> - <view class="name">{{ subItem.realityMeasure }}</view> - </uni-td> -<!-- - 聽 <uni-td align="center"> - <view>{{ subItem.bunkerName }}</view></uni-td> --> - <!-- <uni-td align="center"> - <view class="name">{{ subItem.statusView }}</view></uni-td> --> - - </uni-tr> - </uni-table> <view class="footer"> - <view class="rightBtn"> <u-button type='primary' text='纭鎷煎崟'></u-button></view> + <view class="rightBtn"> <u-button type='primary' text='纭鎷煎崟' @click="enterPin(item)"></u-button></view> </view> </view> + <u-empty mode="data" + icon="http://cdn.uviewui.com/uview/empty/data.png" + textSize="30" + iconSize="1000" + text="鏆傛棤鏁版嵁" + v-if="datetailData.length === 0"></u-empty> + <u-popup :show="showLing" + @close="closeling" + closeOnClickOverlay + @open="openLing" + mode="center" + round="10"> + <view class="receiverPopup"> + <view class="tableCon" v-if="pageList.length"> + <view style="text-align: center;">閫夋嫨鍚ㄦ暟</view> + <u-radio-group v-model="radioValue" borderBottom placement="column" + + @change="radioChange" + > + <view + style="margin:15rpx" v-for="(item, index) in pageList" :key="index"> + <u-radio + :size='40' + :iconSize='50' labelSize='32' shape="circle" + + :key="index" + :label="`${item.productName} - ${item.productGrade?item.productGrade : '鏆傛棤绛夌骇' } - ${item.planMeasure}鍚╜" + :name="item.id"></u-radio> + </view> + + </u-radio-group> + <view class="receiverPopup__btn"><u-button text="纭畾" + type="primary" + @click="popupDetermineClick" + :loading="ClickLoading"></u-button></view> + + </view> + </view> + </u-popup> + <u-modal :show="showTwo" :title="'纭鎷煎崟'" + showCancelButton + @confirm="falseConfirm" + @cancel="falseCancel" + ></u-modal> </view> - </view> </template> <script> export default { data() { return { - proType:['鏁h','娑叉埃鐡惰','缃愯','PVC25','PVC80','PVC1150','PVc1200'], + proType:['鏁h','娑叉隘鐡惰','缃愯','PVC25','PVC80','PVC1150','PVc1200'], datetailData:[], taskId:'', + pageList:[], + showTwo:false, + activeObj:{}, + showLing:false, + radioValue:'', + orderType:'', + radioChange:"", + ClickLoading:false, } }, methods: { @@ -117,11 +121,77 @@ uni.showLoading({ title: "鍔犺浇涓�" }) - this.$reqGet('getUnclaimedList',{taskCoalId:this.taskId}).then((res) => { + this.$reqGet('getUnclaimedList',{taskCoalId:this.taskId,orderType:this.orderType}).then((res) => { this.datetailData = res.data; uni.hideLoading(); }) - } + }, + enterPinDan(){ + uni.showLoading({ + title: "鍔犺浇涓�" + }) + this.$reqPost('splicingOrders',{ + orderPlanId: this.activeObj.orderPlanId, + fleetId: this.activeObj.fleetId, + customerId: this.activeObj.customerId, + xsUserId: this.activeObj.xsUserId, + pvcForwardId:this.radioValue, + taskCoalId: this.taskId + },'params').then(res=>{ + console.log(res,'resss') + if(res.code === 0 ){ + this.$u.toast('鎿嶄綔鎴愬姛'); + this.showLing = false; + uni.switchTab({ + url: '/pages/tabbar-page/index-tabbar/index-tabbar' + }); + }else{ + this.$u.toast('澶辫触') + } + }).finally(() => { + uni.hideLoading(); + }) + }, + popupDetermineClick(){ + this.enterPinDan(); + }, + enterPin(item){ + this.activeObj = item; + if(/鑱氭隘涔欑儻鏍戣剛/.test(item.productName)){ + this.showLing = true; + }else{ + this.enterPinDan(); + this.showTwo = true; + } + + + }, + closeling() { + this.showLing = false; + this.receiveNum = null; + }, + openLing() { + this.getBuild(); + }, + getBuild(item){ + console.log(this.productName,'opr') + this.$reqGet('getBuildList',{orderPlanId:this.activeObj.orderPlanId,customerId:this.activeObj.customerId,status:1,fleetId:this.activeObj.fleetId}).then(res=>{ + console.log(res,'resss') + this.pageList = res.data.map(item=>{ + item.flag = false + return item; + }); + }) + + + }, + falseConfirm (){ + this.enterPinDan(); + + }, + falseCancel(){} + + }, computed:{ @@ -130,6 +200,7 @@ onLoad(params) { this.taskId = params.taskCoalId; + this.orderType = params.orderType; }, onShow(){ this.init(); @@ -140,6 +211,8 @@ <style lang="scss" scoped> + + .table{ width: 100%; margin-top: 10rpx; @@ -148,19 +221,23 @@ margin-left: 20rpx; width: auto; } - .footer{ - height: 100rpx; - .rightBtn{ - width: 200rpx; - float: right;; - - } - } + } .warp-box{ width: 96%; margin: 10rpx auto; height: calc(100vh - 10vh); + .footer{ + width: 100%; + height: 100rpx; + .rightBtn{ + width: 200rpx; + float: right;; + margin-top: 20rpx; + margin-right: 20rpx; + + } + } } .history-information { margin-bottom:30rpx; margin-top: 10rpx; @@ -254,4 +331,8 @@ } } +</style> +<style > + + </style> \ No newline at end of file -- Gitblit v1.9.1