From b2bf29a2e58d0cbf7dbe19f5640598e64f14b637 Mon Sep 17 00:00:00 2001 From: Mr.Zhang <710666463@qq.com> Date: 星期三, 30 八月 2023 11:27:12 +0800 Subject: [PATCH] 小程序 --- minipro_standard/components/selectMaterial.vue | 106 ++++++++++++++++++++++++++++++++++++++++++++++------ 1 files changed, 93 insertions(+), 13 deletions(-) diff --git a/minipro_standard/components/selectMaterial.vue b/minipro_standard/components/selectMaterial.vue index 18d3d35..a892fe5 100644 --- a/minipro_standard/components/selectMaterial.vue +++ b/minipro_standard/components/selectMaterial.vue @@ -1,9 +1,29 @@ <template> <u-popup :show="show" :round="10" closeable @close="show=false"> - <view class="material-content"> + <view class="material-content bbox p30"> + <view class="tc b f24 c2">閫夋嫨鐗╂枡</view> <u-list @scrolltoupper="scrolltoupper" @scrolltolower="scrolltolower"> - <u-list-item v-for="(item, index) in list" :key="index"> - <view class="" style="height: 20px;">{{item}}</view> + <u-list-item v-for="(item1, index) in list" :key="index"> + <view class="" style="height: 20px;" @click="jump(item1)"> + <div class="page_content_title_top"> + <span>{{ item1.materialName + ' | ' + item1.materialCode }}</span> + </div> + <div class="page_content_title_bottom"> + <span>{{ item1.locationName }} / </span> + <span>{{ item1.num }}{{ item1.unitName }}</span> + </div> + <div class="page_content_title_bottom"> + <span class="green" v-if="item1.qualityType == 0">鍚堟牸 <span + class="c1">/</span> </span> + <span class="orange" v-else-if="item1.qualityType == 1">涓嶈壇 <span + class="c1">/</span> </span> + <span class="red" v-else-if="item1.qualityType == 2">鎶ュ簾 <span + class="c1">/</span> </span> + <span v-else>- / </span> + <span>{{item1.procedureName ? item1.procedureName : '-'}} / </span> + <span>{{item1.batch ? item1.batch : '-'}}</span> + </div> + </view> </u-list-item> </u-list> </view> @@ -21,8 +41,8 @@ index: 1, total: 0 }, - list: [ - 1,2,3,4,5,6,7,8 + list: [ + 1, 2, 3, 4, 5, 6, 7, 8 ] }; }, @@ -40,16 +60,30 @@ this.loadData() }, loadData() { - this.list = [1,2,3,4,5,6,1,2,3,4,5,6,1,2,3,4,5,6,1,2,3,4,5,6,1,2,3,4,5,6,1,2,3,4,5,6,1,2,3,4,5,6] + this.list = [{ + batch: '1', + materialName: 'dsadas', + materialCode: '1m0001', + locationName: 'a浠�2鍙蜂綅', + num: '1', + unitName: '鍧�', + qualityType: 0, + procedureName: '鍘嬪埗', + + }] }, - scrolltoupper() { - console.log('scrolltoupper'); - this.loadData() + scrolltoupper() { + console.log('scrolltoupper'); + this.loadData() }, - scrolltolower() { - console.log('scrolltolower'); - this.loadData() - }, + scrolltolower() { + console.log('scrolltolower'); + this.loadData() + }, + jump(item) { + this.$emit('selectAction', item) + this.show = false + } } } </script> @@ -58,4 +92,50 @@ .material-content { height: 800rpx; } + + .page_content_title_top { + display: flex; + align-items: center; + justify-content: space-between; + + span { + &:nth-child(1) { + font-size: 30rpx; + font-weight: 500; + color: #222222; + } + + &:nth-child(2) { + flex-shrink: 0; + font-size: 24rpx; + font-weight: 400; + color: #333333; + + // span { + // font-size: 24rpx; + // color: $nav-color; + // } + } + } + } + + .page_content_title_bottom { + margin-top: 10rpx; + + span { + font-size: 24rpx; + font-weight: 400; + color: #666666; + } + } + + .page_content_title { + display: flex; + flex-direction: column; + margin-bottom: 10rpx; + + + + + } </style> -- Gitblit v1.9.3