Commit 61cab7de authored by Facius's avatar Facius

feat: 前端-16、小程序端去掉合计这项,后台 “单位”这个字段改为必填项。

parent fb64824f
......@@ -258,7 +258,7 @@
overflow-x: auto;
display: flex;
width: 100%;
border-right: 2rpx solid #F4F5F7;
// border-right: 2rpx solid #F4F5F7;
.image-view {
width: 120rpx;
height: 120rpx;
......
......@@ -26,8 +26,8 @@
<view class="bottom-view">
<view class="total-view">
<text>合计:</text>
<text class="amount-view">x{{total}}</text>
<text></text>
<text class="amount-view">x{{info.items.length}}</text>
<text></text>
</view>
</view>
</view>
......@@ -63,13 +63,13 @@
}
return this.info.finished ? '退件完成' : text
},
total() { // 合计
var i = 0
for (var item of this.info.items) {
i += item.quantity
}
return i
},
// total() { // 合计
// var i = 0
// for (var item of this.info.items) {
// i += item.quantity
// }
// return i
// },
},
methods: {
handleLongpress() { // 长按复制单号
......
......@@ -4,17 +4,20 @@
<u-checkbox v-if="showChecked" icon-size="28" size="40" v-model="check" @change="handleChange"
shape="circle" />
<image class="image-view" :src="imageUrl"></image>
</view>
<view class="info-view">
<view class="name-text">{{item.name}}</view>
<view class="info-bottom">
<view>{{remarkText}}</view>
</view>
</view>
<view class="count-view">
<view v-if="showChecked">
<u-number-box v-model="value" :min="item.min || 0" :max="item.max || item[type]" @minus="numChange"
@plus="numChange" @blur="numChange"></u-number-box>
</view>
<text v-else>x{{item[type]|| 0}}</text>
<text class="unit-text" v-if="item.unit">{{item.unit}}</text>
</view>
</view>
</view>
</view>
</template>
......@@ -93,8 +96,7 @@
<style lang="scss" scoped>
.spare-item {
display: flex;
justify-content: space-between;
align-items: flex-end;
align-items: center;
.left-view {
display: flex;
......@@ -106,24 +108,33 @@
margin-right: 20rpx;
flex-shrink: 0;
}
}
.info-view {
font-size: 24rpx;
color: #333333;
width: 100%;
.name-text {
font-size: 32rpx;
font-weight: bold;
color: #333333;
margin-bottom: 30rpx;
}
}
}
.info-bottom {
display: flex;
justify-content: space-between;
align-items: center;
.count-view {
font-size: 28rpx;
color: #333333;
display: flex;
justify-content: flex-end;
align-items: center;
.unit-text {
padding-left: 10rpx;
}
}
}
}
}
</style>
......@@ -7,6 +7,7 @@
<view class="num">
<u-number-box v-if="!disabled" v-model="info.quantity" :min="info.min || 0" :max="info.max || 9999" @change="numChange" @minus="minusValue" @blur="minusValue"></u-number-box>
<text class="nums" v-else>x{{ info.quantity || 1 }}</text>
<text v-if="info.unit" class="unit-text">{{info.unit || ''}}</text>
</view>
</view>
</view>
......@@ -54,9 +55,15 @@
.num {
width: 200rpx;
text-align: center;
display: flex;
justify-content: flex-end;
align-items: center;
.nums {
//color: #F59A23;
}
.unit-text {
padding-left: 10rpx;
}
}
}
}
......
......@@ -12,10 +12,11 @@
<view class="right-content-desc u-line-2">{{ info.remark }}</view>
<view class="u-flex right-content-opera">
<view class="no" v-if="maxShow">
可用{{ info.max }}
可用{{ info.max + (info.unit || '')}}
</view>
<view class="num">
<u-number-box v-show="!info.disabled" v-model="info.quantity" :min="info.min || 0" :max="info.max || info.quantity" @change="numChange"></u-number-box>
<text v-show="!maxShow && !info.disabled && info.unit" class="unit-text">{{info.unit}}</text>
<u-button v-show="info.disabled" type="primary" size="mini" shape="circle" @click="addApply">加入申请</u-button>
</view>
</view>
......@@ -121,6 +122,12 @@
.num {
flex: 1;
text-align: right;
display: flex;
justify-content: flex-end;
align-items: center;
.unit-text {
padding-left: 10rpx;
}
}
}
}
......
......@@ -6,8 +6,7 @@
<view class="left-list">全选</view>
</view>
<view class="u-flex bottom-center">
<view class="center-list">已选择 {{ partNum }}</view>
<view class="center-list">共:<text class="num"> {{ num }} </text></view>
<view class="center-list">共:<text class="num"> {{ partNum }} </text></view>
</view>
</view>
<view class="u-flex select-num" v-if="!showChecked">
......@@ -15,7 +14,7 @@
<u-badge type="error" :show-zero="true" :count="partNum" :offset="[0, 0]"></u-badge>
<u-image width="72rpx" height="72rpx" :lazy-load="false" :src="partsImage"></u-image>
</view>
<view class="num-right">共:<text class="num"> {{ num }} </text></view>
<view class="num-right">共:<text class="num"> {{ partNum }} </text></view>
</view>
<view class="u-flex bottom-right">
<button :class="['btn', btnActive]" @click="submit">{{ submitTxt }}</button>
......@@ -143,14 +142,14 @@
align-items: flex-start;
margin-right: 20rpx;
.center-list {
// &:nth-of-type(1) {
// color: #666;
// font-size: 26rpx;
// }
&:nth-of-type(1) {
color: #666;
font-size: 26rpx;
}
&:nth-of-type(2) {
color: #333;
font-size: 32rpx;
margin-top: 8rpx;
// margin-top: 8rpx;
font-weight: bold;
.num {
color: #2272FF;
......
......@@ -20,8 +20,7 @@
<view class="tab-view">
<scroll-view scroll-y style="height: 100%;width: 100%;" @scrolltolower="reachBottom" scroll-anchoring
refresher-enabled="true" :refresher-triggered="triggered" :refresher-threshold="100" @scroll="scroll"
:scroll-top="scrollTop" refresher-background="#F4F5F7"
@refresherrefresh="onRefresh" @refresherrestore="onRestore" enable-back-to-top>
refresher-background="#F4F5F7" @refresherrefresh="onRefresh" @refresherrestore="onRestore" enable-back-to-top>
<!-- 加载中 && 没有下拉:显示加载中 -->
<view class="loading-view" v-if="!loaded && _freshing">
<u-loading mode="flower"></u-loading>
......@@ -35,7 +34,7 @@
<AppliedCell @operate="handleOperate" :info="item" @action="handleClickCell" @express="handleClickExpress"></AppliedCell>
</view>
<!-- 底部加载状态 -->
<view class="load-more-view" v-if="(pageNumber == 1 && loaded) || pageNumber > 1">
<view class="load-more-view" v-show="(pageNumber == 1 && loaded) || pageNumber > 1">
<u-loadmore :status="loadStatus"
bgColor="#F4F5F7"></u-loadmore>
</view>
......@@ -99,7 +98,7 @@
{
'name': '全部',
'status': null
}
},
]
},
// 当下tab
......
......@@ -11,17 +11,16 @@
</view>
<NoOrder v-if="noParts" imageName="wupeijianxinxi.png" text="当前暂无返件信息" :customStyle="noPartsCustomStyle" />
<view v-else class="tab-view">
<scroll-view scroll-y style="height: 100%;width: 100%;" scroll-anchoring enable-back-to-top>
<scroll-view scroll-y style="height: 100%;width: 100%;" @scrolltolower="reachBottom" scroll-anchoring enable-back-to-top>
<view class="loading-view" v-if="!loaded">
<u-loading mode="flower"></u-loading>
</view>
<template v-else>
<view v-for="(item, index) in partsList" :key="item.id">
<view v-for="item in partsList" :key="item.id">
<ReturnCell :info="item"></ReturnCell>
</view>
<view class="load-more-view">
<u-loadmore v-show="(pageNumber == 1 && loaded) || pageNumber > 1" :status="loadStatus"
bgColor="#F4F5F7"></u-loadmore>
<view class="load-more-view" v-if="(pageNumber == 1 && loaded) || pageNumber > 1">
<u-loadmore :status="loadStatus" bgColor="#F4F5F7"></u-loadmore>
</view>
</template>
</scroll-view>
......
......@@ -25,7 +25,7 @@
</view>
<!-- 物料列表 -->
<view class="tab-view">
<scroll-view scroll-y style="height: 100%;width: 100%;" scroll-anchoring enable-back-to-top @scroll="scroll">
<scroll-view scroll-y style="height: 100%;width: 100%;" @scrolltolower="reachBottom" scroll-anchoring enable-back-to-top>
<!-- 加载转圈页面 -->
<view class="loading-view" v-if="!loaded">
<u-loading mode="flower"></u-loading>
......@@ -37,9 +37,8 @@
@change="handleChange($event, index)"@numChange="handleNumChange($event, index)" />
</view>
<!-- 底部加载状态 -->
<view class="load-more-view">
<u-loadmore v-show="partsList.length > 0" status="nomore" bgColor="#F4F5F7">
</u-loadmore>
<view class="load-more-view" v-if="partsList.length > 0">
<u-loadmore status="nomore" bgColor="#F4F5F7"></u-loadmore>
</view>
</template>
</scroll-view>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment