|
|
@@ -104,7 +104,7 @@
|
|
|
|
|
|
<view class="item ww25 content_num cx-cc" v-for="(p, i) in it.paramList" :key="index + i">
|
|
|
<view class="name">{{p.name}}</view>
|
|
|
- <input v-model="p.value" style="width: 168rpx ;"></input>
|
|
|
+ <input v-model="p.value" style="width: 168rpx ;"></input>
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
@@ -233,7 +233,7 @@
|
|
|
// 创建对象的副本,以避免引用相同的对象
|
|
|
const objCopy = {
|
|
|
...obj,
|
|
|
- paramList: JSON.parse(JSON.stringify(this.paramList))
|
|
|
+ paramList: JSON.parse(JSON.stringify(this.paramList))
|
|
|
};
|
|
|
// 可以选择删除 num 属性,如果不需要在最终结果中保留它
|
|
|
delete objCopy.sampleNum;
|
|
|
@@ -243,7 +243,7 @@
|
|
|
// 如果 sampleNum 等于 1,直接推入数组(可以选择删除 sampleNum 属性)
|
|
|
const objCopy = {
|
|
|
...obj,
|
|
|
- paramList: JSON.parse(JSON.stringify(this.paramList))
|
|
|
+ paramList: JSON.parse(JSON.stringify(this.paramList))
|
|
|
};
|
|
|
|
|
|
this.mergedArray.push(objCopy);
|
|
|
@@ -310,7 +310,7 @@
|
|
|
})
|
|
|
return false
|
|
|
}
|
|
|
- this.item.sampleList = JSON.parse(JSON.stringify(this.mergedArray))
|
|
|
+ this.item.sampleList = JSON.parse(JSON.stringify(this.mergedArray))
|
|
|
this.$forceUpdate()
|
|
|
|
|
|
|
|
|
@@ -323,20 +323,21 @@
|
|
|
|
|
|
hendleReuseNum() {
|
|
|
let count = 0
|
|
|
- if(this.item.sampleList.length > 0) {
|
|
|
- this.item.sampleList.forEach(f=> {
|
|
|
+ if (this.item.sampleList.length > 0) {
|
|
|
+ this.item.sampleList.forEach(f => {
|
|
|
if (Object.prototype.hasOwnProperty.call(f, 'selectType') && f.selectType == 1) {
|
|
|
count = count + 1
|
|
|
}
|
|
|
-
|
|
|
- })
|
|
|
- }
|
|
|
- if(count > 0) {
|
|
|
- this.$set(this.item, 'reuseNum', count)
|
|
|
-
|
|
|
-
|
|
|
- }
|
|
|
-
|
|
|
+
|
|
|
+ })
|
|
|
+ }
|
|
|
+ if (count > 0) {
|
|
|
+ this.$set(this.item, 'reuseNum', count)
|
|
|
+ this.$emit('showReuseTurnover', true)
|
|
|
+ this.$forceUpdate()
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
},
|
|
|
|
|
|
|