From b63dc8ccc6163e73b9f4e4b79f9497070e8ba5ec Mon Sep 17 00:00:00 2001 From: yangan <yangan0921@163.com> Date: 星期四, 05 十二月 2024 15:53:06 +0800 Subject: [PATCH] feat:PVC流程代码提交 --- subPages/pvcSplicePage/kuguan.vue | 351 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 347 insertions(+), 4 deletions(-) diff --git a/subPages/pvcSplicePage/kuguan.vue b/subPages/pvcSplicePage/kuguan.vue index 9dc7d33..8a8b0e5 100644 --- a/subPages/pvcSplicePage/kuguan.vue +++ b/subPages/pvcSplicePage/kuguan.vue @@ -1,6 +1,169 @@ <template> <div class="warp"> - 搴撶瑁呭嵏 + <view class="history-information" + > + <view class="first"> + <view class="">{{ pageData.carNo || '' }}</view> + <view class=""></view> + </view> + <view class="second"> + <view class="coal-name">{{ pageData.productNames?limitString(pageData.productNames,20,'...'):'' || ''}}</view> + <view class="order-type">{{ pageData.orderType || '' }}</view> + </view> + <view class="third"> + <view class="third-line"> + <view class="third-line_text">瀹㈡埛鍚嶇О:</view> + <view>{{ pageData.customerName }}</view> + </view> + <view class="third-line" v-if="/鑱氭隘涔欑儻鏍戣剛/.test(pageData.productName)"> + <view class="third-line_text">鍖呰绫诲瀷:</view> + <view>{{ proType[pageData.packingType] }}</view> + </view> + <view class="third-line" v-if="pageData.productName === '浜屾隘涔欑兎(EDC)'"> + <view class="third-line_text">璐ㄦ鐘舵��:</view> + <view> <u-tag :text="checkStatusList[pageData.checkStatus]" plain > </u-tag></view> + </view> + </view> + <view class="fourth"> + <view class="fourth-icon"> + <view + style="width: 24rpx;height: 24rpx;line-height: 24rpx;background: url('https://wrzs.czjlchem.com:9090/appimg/image/banner/clock.png') no-repeat;background-size: cover"> + </view> + </view> + <view class="senddate">{{ pageData.sendDate }}</view> + </view> + <view class="fourth"> + <view class="fourth-icon"> + <view + style="width: 26rpx;height: 26rpx;line-height: 26rpx;background: url('https://wrzs.czjlchem.com:9090/appimg/image/banner/carnNUm.png') no-repeat;background-size: cover;"> + </view> + </view> + <view class="senddate">{{ pageData.orderCode }}</view> + + </view> + + + <view class="table"> + <uni-table border stripe + emptyText="鏆傛棤鏇村鏁版嵁"> + <uni-tr> + + <uni-th align="center" width='800'>浜у搧</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" width='120'>纭閲�</uni-th> --> + <uni-th align="center" width='120'>璁″垝閲�</uni-th> + <uni-th align="center" width='100'>璁¢噸鏂瑰紡</uni-th> + <uni-th align="center" width='250'>璇疯緭鍏�</uni-th> + + <!-- <uni-th align="center" width='100'>瀹為檯閲�</uni-th> --> + + </uni-tr> + <uni-tr v-for="(subItem, index) in detailData" :key="index"> + + <uni-td align="left"> + <view style="font-size: 25rpx;">{{ subItem.productName + ( subItem.productGrade ? '-' + subItem.productGrade :'') }}</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 align="center"> + <view class="name" style="font-size: 25rpx;" >{{ proType[subItem.packingType] }}</view> + </uni-td> + <!-- <uni-td align="right"> + <view class="name" style="font-size: 25rpx;">{{ subItem.productQuantity }}</view> + </uni-td> --> + <uni-td align="center"> + <view class="name" style="font-size: 25rpx;">{{ subItem.planMeasure }}</view> + </uni-td> + <uni-td > + <u-tag :text="'璁℃暟'" plain v-if="subItem.isWeight==0"></u-tag> + <u-tag :text="'绉伴噸'" plain v-else-if="subItem.isWeight==1"></u-tag> + <u-tag :text="'绉伴噸璁℃暟'" plain v-else-if="subItem.isWeight==2"></u-tag> + <u-tag v-else></u-tag> + </uni-td> + <uni-td align="right"> + <view style="border: solid 1rpx red;"><u--input + type='digit' + + :placeholder="'璇疯緭鍏�'" + v-model="subItem.productQuantity" + > + </u--input></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 style="display:flex;margin-top:20rpx;width: 30%;">鏄惁绌鸿溅鍑哄巶: <u-radio-group + v-model="isEmptyCar" + placement="row" + iconPlacement="right" + style="justify-content: space-evenly" + > + <u-radio + :key="1" + :label="'鏄�'" + :name="'1'" + shape="circle" + iconSize="32" + label-size="32" + size="40" + > + </u-radio> + <u-radio + :key="0" + :label="'鍚�'" + :name="'0'" + shape="circle" + iconSize="32" + label-size="32" + size="40" + > + </u-radio> + </u-radio-group></view> + <view class="footerBtn"> + <u-button type="primary" + @click="confirmLoad" + :size="300" text="纭瑁呭嵏"></u-button> + + </view> + + </view> + </view> + <!-- 鍦哄唴鎺ュ崟寮圭獥 --> + <view class=""> + <u-modal :show="insideConnectShow" + title="鎻愮ず" + showCancelButton + content="鏄惁纭瑁呭嵏" + @confirm="insideConnectConfirm" + @cancel="insideConnectCancel"></u-modal> + </view> + </div> </template> @@ -8,15 +171,27 @@ export default { data() { return { - pageData:[], + pageData:{}, + insideConnectShow:false, id:'', + detailData:[], + proType:['鏁h','娑叉隘鐡惰','缃愯','PVC25','PVC80','PVC1150','PVc1200'], + coalStatus: ['棰嗗彇', '棰勭害', '绛惧埌', '鍏ュ満', '绉扮毊', '绉版瘺', '绂诲満', '鍏ョ鎴�', '鍑虹鎴�', '鍏ヤ粨搴�', '鍑轰粨搴�', '鏀剧┖', '浣滃簾', '鍏ュ満鐢宠', + '杩涘叆鍦洪櫌', '寮傚父瀹℃牳涓�', '杩斿洖鍔犲噺鍚�', '瓒呮椂', '鎵撳嵃涓�', '鎵撳嵃涓�', '濉啓', '鏀剧┖纭涓�', '瓒呮渶澶ф瘺閲嶇‘璁や腑','琛ユ墦','鍏ュ満妫�鏌�','璐ㄦ涓�', + '绂诲満妫�鏌�','宸叉墦鍗�','瑁呭嵏','杩斿洖鍔犲噺鍚ㄧ‘璁や腑' + ], } }, onLoad(params){ - + this.pageData = JSON.parse(params.item) console.log(params,'123') this.id = params.id; this.init(params.id); + if(this.pageData.orderType === '澶栬喘'){ + this.isEmptyCar = '1'; + }else if(this.pageData.orderType === '澶栭攢' || this.pageData.orderType === '澶栬喘閫�'){ + this.isEmptyCar = '0'; + } }, onShow(){ @@ -26,17 +201,185 @@ init(id){ this.$reqGet('getPdListByMainTmTaskCoalId',{mainTmTaskCoalId:id}).then((res) => { console.log(res,'res') + this.detailData = res.data; }) - } + }, + limitString(str, limit, suffix = '...') { + if (str.length <= limit) return str; + return str.slice(0, limit) + suffix; + }, + //鐐瑰嚮瑁呭嵏 + confirmLoad(){ + this.insideConnectShow = true; + + }, + insideConnectConfirm(){ + let mainPQ,subPQjoin = ''; // 1涓� 2瀛� + this.detailData.forEach(item=>{ + if(item.isPindan === 1){ + mainPQ = item.productQuantity; + }else if(item.isPindan === 2){ + let str = item.id + ':' + item.productQuantity + ','; + subPQjoin += str; + } + }) + console.log(mainPQ,subPQjoin,'131313') + this.insideConnectShow = false; + this.$reqPost('pvcConfirmLoadAndUnload',{ + id: this.pageData.id, + productQuantity:mainPQ || '', + isEmptyCar:this.isEmptyCar, + isPretendDischar:this.pageData.isPretendDischar, + productId: this.pageData.productId , + pdZiDanPq:subPQjoin || '', + },'json').then(res=>{ + uni.hideLoading(); + console.log(res,'rez') + this.checkNum = ''; + if(res.code === 1){ + console.log('瑙﹀彂') + this.$u.toast(res.msg || '澶辫触'); + uni.hideLoading(); + }else{ + this.$u.toast('鎿嶄綔鎴愬姛'); + setTimeout(() => { + this.init(); + uni.switchTab({ + url: '/pages/tabbar-page/index-tabbar/index-tabbar' + }) + }, 500); + } + }); + + + }, + insideConnectCancel(){ + this.insideConnectShow = false; + + } }, } </script> <style lang="scss" scoped> + .table{ + width: 100%; + margin-top: 30rpx; + /deep/ .uni-table{ + min-width: 0!important; + margin-left: 20rpx; + width: auto; + } + +} +.footerBtn{ + width: 300rpx; + margin-top: 30rpx; + float: right; + font-size: 26rpx; + height: 100rpx; + +} .warp{ width: 100%; height: calc(100vh - 75px); + .history-information { + position: relative; + margin-bottom:30rpx; + margin-top: 10rpx; + background: #ffffff; + border-radius: 20rpx; + @include flex flex-direction: column; + padding: 10px; + align-items: flex-start; + justify-content: space-evenly; + box-shadow: 0rpx 0rpx 14rpx 0rpx rgba(73, 120, 240, 0.14), 0rpx 7rpx 45rpx 0rpx rgba(73, 120, 240, 0.12); + + + .first { + width: 96%; + height: 34rpx; + font-size: 32rpx; + font-weight: 300; + color: #303030; + @include flex; + margin: vww(10) vww(10) 0; + } + + .second { + width: 100%; + height: 31rpx; + font-size: 30rpx; + font-weight: 300; + color: #515151; + margin: vww(10) vww(10) 0; + margin-bottom: 15rpx; + @include flex; + justify-content: flex-start; + + .coal-name { + min-width: vww(20); + height: vww(20); + margin-right: vww(21); + } + + .order-type { + height: 45rpx; + color: #035cfb; + border: 2px solid #035cfb; + border-radius: 4rpx; + padding: vww(2) vww(4); + margin-left: 70%; + text-align: center; + } + } + + .third { + width: 96%; + height: auto; + font-size: 30rpx; + font-weight: 300; + color: #515151; + margin: vww(10) vww(10) 0; + @include flex; + flex-direction: column; + + .third-line { + @include flex; + align-items: center;; + + &_text { + color: #919090; + } + + &_num { + color: #035cfb; + } + } + } + + .fourth { + width: 100%; + height: 31rpx; + font-size: 30rpx; + font-weight: 300; + color: #515151; + position: relative; + margin: vww(10) vww(10) 0; + @include flex; + + .fourth-icon { + width: vww(13); + height: vww(13); + margin-right: vww(14); + } + + .senddate { + flex: 1; + } + } + } } -- Gitblit v1.9.1