|
|
@@ -136,7 +136,7 @@
|
|
|
<view class="content content_num">
|
|
|
<zxz-uni-data-select :localdata="isQualifiedList" v-model="it.extInfo.isQualified"
|
|
|
dataValue='code' format='{name}' dataKey="code" filterable :disabled="isDetails"
|
|
|
- :clear='false'></zxz-uni-data-select>
|
|
|
+ :clear='false' @change="handleInput"></zxz-uni-data-select>
|
|
|
</view>
|
|
|
</view>
|
|
|
|
|
|
@@ -187,7 +187,7 @@
|
|
|
</view>
|
|
|
<view class="item ww25 content_num">
|
|
|
<view v-if='isDetails'>{{it.extInfo.reportWeight }}</view>
|
|
|
- <input class="uni-input" v-else v-model="it.extInfo.reportWeight"></input>
|
|
|
+ <input class="uni-input" v-else v-model="it.extInfo.reportWeight" type='digit' @input="handleInput"></input>
|
|
|
</view>
|
|
|
<view class="item ww25" @click="openNumerate(it, idx)" v-if="isFirstTask == 1">
|
|
|
<view class="numerate">点击计算</view>
|
|
|
@@ -444,6 +444,13 @@
|
|
|
this.getSteps()
|
|
|
this.getCompute()
|
|
|
|
|
|
+ setTimeout(()=>{
|
|
|
+ this.handleInput()
|
|
|
+ },800)
|
|
|
+
|
|
|
+ },
|
|
|
+ mounted() {
|
|
|
+
|
|
|
},
|
|
|
methods: {
|
|
|
|
|
|
@@ -639,7 +646,31 @@
|
|
|
|
|
|
this.cancel()
|
|
|
},
|
|
|
-
|
|
|
+ handleInput() {
|
|
|
+ let arr = JSON.parse(JSON.stringify(this.list));
|
|
|
+ this.sumweight(arr);
|
|
|
+ // this.sunTj();
|
|
|
+ // console.log('arr11111112222',arr)
|
|
|
+ // console.log('this.list33333',this.list)
|
|
|
+ },
|
|
|
+ sumweight(arr) {
|
|
|
+ let formedWeight = 0;
|
|
|
+ let notFormedWeight = 0;
|
|
|
+ arr.map((s,i) => {
|
|
|
+ if (s.extInfo.reportWeight) {
|
|
|
+ if (s.extInfo.isQualified == 1) {
|
|
|
+ formedWeight += s.extInfo.reportWeight * 1;
|
|
|
+ } else {
|
|
|
+ notFormedWeight += s.extInfo.reportWeight * 1;
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ s.extInfo.reportWeight = null;
|
|
|
+ }
|
|
|
+ })
|
|
|
+ console.log('chulaiuwanlo',formedWeight,notFormedWeight)
|
|
|
+ this.$emit('weightEmit',formedWeight,notFormedWeight)
|
|
|
+
|
|
|
+ },
|
|
|
|
|
|
|
|
|
}
|