Просмотр исходного кода

供货商采购显示花材的总重量

jf 5 лет назад
Родитель
Сommit
597bc11871
1 измененных файлов с 15 добавлено и 0 удалено
  1. 15 0
      ghsApp/src/pagesPurchase/details.vue

+ 15 - 0
ghsApp/src/pagesPurchase/details.vue

@@ -78,6 +78,10 @@
 					</tui-list-cell> -->
 				</view>
 				<view class="module-com input-line-wrap">
+					<tui-list-cell class="line-cell" :hover="false">
+						<view class="tui-title ">花材重量</view>
+						<view>{{selectAllRealityWeight}}</view>
+					</tui-list-cell>
 					<tui-list-cell class="line-cell" :hover="false">
 						<view class="tui-title ">包装重量</view>
 						<input type="digit" :disabled="!canIEdit" v-model="form.packWeight" placeholder-class="phcolor" class="tui-input" name="floor" placeholder="公斤"/>
@@ -236,6 +240,17 @@ export default {
 			this.totalPrice = price.toFixed(2);
 			return price.toFixed(2);
 		},
+		selectAllRealityWeight(){
+			let realityWeight = 0;
+			if (this.selectList) {
+				for (const item of this.selectList) {
+					if (item.realityWeight) {
+						realityWeight += Number(item.realityWeight);
+					}
+				}
+			}
+			return realityWeight.toFixed(2);
+		},
 		canIEdit() {
 			const { orderSn } = this.option || {};