|
@ -40,7 +40,8 @@ |
|
|
<!-- <input class="input" disabled style="margin-left: 50rpx;" :placeholder="item.placeholder" |
|
|
<!-- <input class="input" disabled style="margin-left: 50rpx;" :placeholder="item.placeholder" |
|
|
v-model="item.SelectName" /> --> |
|
|
v-model="item.SelectName" /> --> |
|
|
</view> |
|
|
</view> |
|
|
<view class="" style="width: 100%;background-color: gray;height: 2rpx; margin-top: 15rpx;margin-bottom: 15rpx;" /> |
|
|
<view class="" |
|
|
|
|
|
style="width: 100%;background-color: gray;height: 2rpx; margin-top: 15rpx;margin-bottom: 15rpx;" /> |
|
|
</view> |
|
|
</view> |
|
|
|
|
|
|
|
|
<view class="" v-else-if="item.Type=='2'"> |
|
|
<view class="" v-else-if="item.Type=='2'"> |
|
@ -62,7 +63,7 @@ |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
|
|
|
|
|
|
<view class="" > |
|
|
<view class=""> |
|
|
<view class="" style="margin-left: 50rpx;"> |
|
|
<view class="" style="margin-left: 50rpx;"> |
|
|
<view class=""> |
|
|
<view class=""> |
|
|
<text style="font-size: 32rpx; font-weight:550">点检状态</text> |
|
|
<text style="font-size: 32rpx; font-weight:550">点检状态</text> |
|
@ -79,42 +80,44 @@ |
|
|
</view> |
|
|
</view> |
|
|
</u-radio-group> |
|
|
</u-radio-group> |
|
|
</view> |
|
|
</view> |
|
|
<!-- <input class="input" style="margin-left: 50rpx;" :placeholder="item.placeholder" |
|
|
<input class="input" v-if="item.putMachine.length==1" style="margin-left: 50rpx;" |
|
|
v-model="item.SelectName" /> --> |
|
|
:placeholder="item.putMachine[0].Name" v-model="item.SelectName" /> |
|
|
</view> |
|
|
|
|
|
<view class="" v-if="item.putMachine.length>0" > |
|
|
|
|
|
<view class="" v-if="item.putMachine.length==1" style="margin-left: 50rpx;"> |
|
|
|
|
|
<text style="font-size: 32rpx; margin: 10rpx;">{{item.putMachine[0].Name}}</text> |
|
|
|
|
|
<input class="input" @input="inputMinor(item)" type="number" |
|
|
|
|
|
:placeholder="item.putMachine[0].Name" v-model="item.SelectName" /> |
|
|
|
|
|
</view> |
|
|
|
|
|
<view class="" v-if="item.putMachine.length==2" style="margin-left: 50rpx;"> |
|
|
|
|
|
<text style="font-size: 32rpx; margin: 10rpx;">{{item.putMachine[1].Name}}</text> |
|
|
|
|
|
<input class="input" @input="inputMain(item)" type="number" :placeholder="item.putMachine[1].Name" |
|
|
|
|
|
v-model="item.putMachine[1].name" /> |
|
|
|
|
|
</view> |
|
|
|
|
|
</view> |
|
|
</view> |
|
|
|
|
|
|
|
|
</view> |
|
|
</view> |
|
|
|
|
|
|
|
|
<view class="" v-else-if="item.Type=='groupSelect'"> |
|
|
|
|
|
<view class="flex uni-row" style="padding-left: 10rpx; border-bottom: #9e9e9e;"> |
|
|
<view class="" v-else-if="item.Type=='3'"> |
|
|
|
|
|
<view class="flex uni-row " style="padding-left: 10rpx; border-bottom: #9e9e9e;"> |
|
|
<view class="" style="margin-top: 3rpx;"> |
|
|
<view class="" style="margin-top: 3rpx;"> |
|
|
<text class="colorRed">*</text> |
|
|
<text class="colorRed">*</text> |
|
|
<text class="num" style="font-size: 32rpx;">{{ index + 1 }}.</text> |
|
|
<text class="num" style="font-size: 32rpx;">{{ index + 1 }}.</text> |
|
|
</view> |
|
|
</view> |
|
|
<view class="" style="display: flex;flex-direction: column;"> |
|
|
<view class="uni-flex uni-column"> |
|
|
<view class="position"> |
|
|
<view class="position"> |
|
|
{{ item.Content }} |
|
|
点检部位 : {{ item.Position }} |
|
|
|
|
|
</view> |
|
|
|
|
|
<view class="content"> |
|
|
|
|
|
点检内容 : {{ item.Content }} |
|
|
|
|
|
</view> |
|
|
|
|
|
<view class="methond" style="margin-bottom: 10rpx;"> |
|
|
|
|
|
点检方法 : {{item.Methond}} |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</view> |
|
|
<view class=""> |
|
|
<view class=""> |
|
|
<view class="" style="margin-left: 50rpx;"> |
|
|
<view class="" style="margin-left: 50rpx;"> |
|
|
<view style="font-size: 30rpx; color: #9e9e9e;">(单选)</view> |
|
|
<view class=""> |
|
|
<u-radio-group v-if="isRefresh" v-model="item.SelectName" @change="radioGroupChange(item)"> |
|
|
<text style="font-size: 32rpx; font-weight:550">点检状态</text> |
|
|
|
|
|
<text style="font-size: 30rpx; color: #9e9e9e;">(单选)</text> |
|
|
|
|
|
</view> |
|
|
|
|
|
<u-radio-group v-if="isRefresh&&isRefreshType3" v-model="item.SelectName" |
|
|
|
|
|
@change="radioGroupChange(item)"> |
|
|
<view class="uni-flex" style="width: 50%; margin-left: 0rpx;" |
|
|
<view class="uni-flex" style="width: 50%; margin-left: 0rpx;" |
|
|
v-for="(radio, index) in dataClassList" :key="index"> |
|
|
v-for="(radio, index) in dataInputList" :key="index"> |
|
|
<view class="uni-flex " style="margin-top: 10rpx; justify-content: flex-start;"> |
|
|
<view class="uni-flex " style="margin-top: 10rpx; justify-content: flex-start;"> |
|
|
<u-radio :name="radio.name" @change="radioChange(radio)"> |
|
|
<u-radio :name="radio.name" @change="radioChange(radio)"> |
|
|
{{radio.name}} |
|
|
{{radio.name}} |
|
@ -123,43 +126,54 @@ |
|
|
</view> |
|
|
</view> |
|
|
</u-radio-group> |
|
|
</u-radio-group> |
|
|
</view> |
|
|
</view> |
|
|
<!-- <input class="input" disabled style="margin-left: 50rpx;" :placeholder="item.placeholder" |
|
|
<view class="" v-if="item.putMachine.length>1"> |
|
|
v-model="item.SelectName" /> --> |
|
|
<!-- <input class="input" style="margin-left: 50rpx;" :placeholder="item.placeholder" |
|
|
</view> |
|
|
v-model="item.SelectName" /> --> |
|
|
|
|
|
<view class="" style="margin-left: 50rpx;"> |
|
|
|
|
|
<text style="font-size: 32rpx; margin: 10rpx;">{{item.putMachine[0].Name}}</text> |
|
|
|
|
|
<input class="input" @input="inputMain(item)" type="number" |
|
|
|
|
|
:placeholder="item.putMachine[0].Name" v-model="item.putMachine[0].SelectName" /> |
|
|
|
|
|
</view> |
|
|
|
|
|
<view class="" style="margin-left: 50rpx;"> |
|
|
|
|
|
<text style="font-size: 32rpx; margin: 10rpx;">{{item.putMachine[1].Name}}</text> |
|
|
|
|
|
<input class="input" @input="inputMinor(item)" type="number" |
|
|
|
|
|
:placeholder="item.putMachine[1].Name" v-model="item.putMachine[1].SelectName" /> |
|
|
|
|
|
</view> |
|
|
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
<view class="" v-else-if="item.type=='inputRange'"> |
|
|
<view class="" v-else-if="item.Type=='5'"> |
|
|
<view class="flex uni-row " style="padding-left: 10rpx; border-bottom: #9e9e9e;"> |
|
|
<view class="flex uni-row" style="padding-left: 10rpx; border-bottom: #9e9e9e;"> |
|
|
<view class="" style="margin-top: 3rpx;"> |
|
|
<view class="" style="margin-top: 3rpx;"> |
|
|
<text class="colorRed">*</text> |
|
|
<text class="colorRed">*</text> |
|
|
<text class="num" style="font-size: 32rpx;">{{ index + 1 }}.</text> |
|
|
<text class="num" style="font-size: 32rpx;">{{ index + 1 }}.</text> |
|
|
</view> |
|
|
</view> |
|
|
<view class="uni-flex uni-column"> |
|
|
<view class="" style="display: flex;flex-direction: column;"> |
|
|
<view class="position"> |
|
|
<view class="position"> |
|
|
点检部位 : {{ item.Position }} |
|
|
{{ item.Content }} |
|
|
</view> |
|
|
|
|
|
<view class="content"> |
|
|
|
|
|
点检内容 : {{ item.Content }} |
|
|
|
|
|
</view> |
|
|
|
|
|
<view class="methond" style="margin-bottom: 10rpx;"> |
|
|
|
|
|
点检方法 : {{item.Methond}} |
|
|
|
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
|
|
|
|
|
|
</view> |
|
|
</view> |
|
|
|
|
|
|
|
|
<view class=""> |
|
|
<view class=""> |
|
|
<view class="" style="margin-left: 50rpx;"> |
|
|
<view class="" style="margin-left: 50rpx;"> |
|
|
<text style="font-size: 32rpx; margin: 10rpx;">{{item.inputLow.placeholder}}</text> |
|
|
<view style="font-size: 30rpx; color: #9e9e9e;">(单选)</view> |
|
|
<input class="input" type="number" :placeholder="item.inputLow.placeholder" |
|
|
<u-radio-group v-if="isRefresh" v-model="item.SelectName" @change="radioGroupChange(item)"> |
|
|
v-model="item.inputLow.name" /> |
|
|
<view class="uni-flex" style="width: 50%; margin-left: 0rpx;" |
|
|
</view> |
|
|
v-for="(radio, index) in dataClassList" :key="index"> |
|
|
<view class="" style="margin-left: 50rpx;"> |
|
|
<view class="uni-flex " style="margin-top: 10rpx; justify-content: flex-start;"> |
|
|
<text style="font-size: 32rpx; margin: 10rpx;">{{item.inputHigh.placeholder}}</text> |
|
|
<u-radio :name="radio.name" @change="radioChange(radio)"> |
|
|
<input class="input" type="number" :placeholder="item.inputHigh.placeholder" |
|
|
{{radio.name}} |
|
|
v-model="item.inputHigh.name" /> |
|
|
</u-radio> |
|
|
|
|
|
</view> |
|
|
|
|
|
</view> |
|
|
|
|
|
</u-radio-group> |
|
|
</view> |
|
|
</view> |
|
|
|
|
|
<!-- <input class="input" disabled style="margin-left: 50rpx;" :placeholder="item.placeholder" |
|
|
|
|
|
v-model="item.SelectName" /> --> |
|
|
</view> |
|
|
</view> |
|
|
|
|
|
|
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
<showModal ref="comMessage"></showModal> |
|
|
<showModal ref="comMessage"></showModal> |
|
@ -224,7 +238,8 @@ |
|
|
], |
|
|
], |
|
|
testName: null, |
|
|
testName: null, |
|
|
current: 0, |
|
|
current: 0, |
|
|
isRefresh: true |
|
|
isRefresh: true, |
|
|
|
|
|
isRefreshType3: true, |
|
|
|
|
|
|
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
@ -232,44 +247,164 @@ |
|
|
}, |
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
|
radioChange(radio) { |
|
|
radioChange(radio) { |
|
|
console.log("radioChange") |
|
|
console.log("radioChange", radio) |
|
|
}, |
|
|
}, |
|
|
radioGroupChange(item) { |
|
|
radioGroupChange(item) { |
|
|
console.log("radioGroupChange", item) |
|
|
// if(item.SelectName=!""){ |
|
|
// for (let i = 0; i < this.dataList.length; i++) { |
|
|
// if(item.putMachine.length==2){ |
|
|
// if (this.dataList[i].name === item.SelectName) { |
|
|
// item.putMachine[0].SelectName="" |
|
|
// this.current = i; |
|
|
// item.putMachine[1].SelectName="" |
|
|
// break; |
|
|
// // this.reload3() |
|
|
// } |
|
|
// } |
|
|
|
|
|
|
|
|
// } |
|
|
// } |
|
|
|
|
|
console.log("radioGroupChange", item) |
|
|
}, |
|
|
}, |
|
|
inputMain(item) { |
|
|
inputMain(item) { |
|
|
item.SelectName = item.minor.name + "~" + item.putMachine.name; |
|
|
if (item.putMachine[0].SelectName.length > 0) { |
|
|
if (item.minor.name == "" && item.putMachine.name == "") { |
|
|
|
|
|
item.SelectName = "" |
|
|
item.SelectName = "" |
|
|
} |
|
|
} |
|
|
|
|
|
this.reload3() |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
inputMinor(item) { |
|
|
inputMinor(item) { |
|
|
item.SelectName = item.minor.name + "~" + item.putMachine.name; |
|
|
if (item.putMachine[1].SelectName.length > 0) { |
|
|
if (item.minor.name == "" && item.putMachine.name == "") { |
|
|
|
|
|
item.SelectName = "" |
|
|
item.SelectName = "" |
|
|
} |
|
|
} |
|
|
|
|
|
this.reload3() |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
submit(callBack) { |
|
|
submit(callBack) { |
|
|
|
|
|
try { |
|
|
|
|
|
for (var i = 0; i < this.formData.length; i++) { |
|
|
|
|
|
var item = this.formData[i]; |
|
|
|
|
|
var hintIndex = i + 1 |
|
|
|
|
|
if (item.Type == 1) { |
|
|
|
|
|
if (item.SelectName == "") { |
|
|
|
|
|
var hint = hintIndex + ".点检内容 : " + item.Content; |
|
|
|
|
|
throw new Error(hint) |
|
|
|
|
|
} |
|
|
|
|
|
} else if (item.Type == 2) { |
|
|
|
|
|
//空值提示 |
|
|
|
|
|
if (item.SelectName == "") { |
|
|
|
|
|
var hint = hintIndex + ".点检内容 : " + item.Content; |
|
|
|
|
|
throw new Error(hint) |
|
|
|
|
|
} |
|
|
|
|
|
//如果不在选择中,输入的内容。对数值进行校验 |
|
|
|
|
|
if (!this.isExitList(item.SelectName)) { |
|
|
|
|
|
if (!this.isWithinInterval(item.SelectName, item.putMachine[0].Limit, item |
|
|
|
|
|
.putMachine[0] |
|
|
|
|
|
.Floor)) { |
|
|
|
|
|
var hint = hintIndex + ".点检内容 : " + item.Content + "输入数量【" + item.SelectName + |
|
|
|
|
|
"】不在【" + item.putMachine[0].Limit + "】和【" + item.putMachine[0].Floor + "】之间" |
|
|
|
|
|
throw new Error(hint) |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
} else if (item.Type == 3) { |
|
|
|
|
|
if (item.SelectName == "") { |
|
|
|
|
|
if(item.putMachine[0].SelectName==""){ |
|
|
|
|
|
var hint = hintIndex + ".点检内容 : " + item.Content; |
|
|
|
|
|
throw new Error(hint) |
|
|
|
|
|
}else { |
|
|
|
|
|
if (!this.isWithinInterval(item.putMachine[0].SelectName, item.putMachine[0].Limit, item |
|
|
|
|
|
.putMachine[0] |
|
|
|
|
|
.Floor)) { |
|
|
|
|
|
var hint = hintIndex + ".点检内容 : " + item.Content + "输入数量【" + item.SelectName + |
|
|
|
|
|
"】不在【" + item.putMachine[0].Limit + "】和【" + item.putMachine[0].Floor + "】之间" |
|
|
|
|
|
throw new Error(hint) |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if(item.putMachine[1].SelectName==""){ |
|
|
|
|
|
var hint = hintIndex + ".点检内容 : " + item.Content; |
|
|
|
|
|
throw new Error(hint) |
|
|
|
|
|
}else { |
|
|
|
|
|
if (!this.isWithinInterval(item.putMachine[1].SelectName, item.putMachine[1].Limit, item |
|
|
|
|
|
.putMachine[1] |
|
|
|
|
|
.Floor)) { |
|
|
|
|
|
var hint = hintIndex + ".点检内容 : " + item.Content + "输入数量【" + item.SelectName + |
|
|
|
|
|
"】不在【" + item.putMachine[1].Limit + "】和【" + item.putMachine[1].Floor + "】之间" |
|
|
|
|
|
throw new Error(hint) |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}else {if (!this.isExitList(item.SelectName)) { |
|
|
|
|
|
if (!this.isWithinInterval(item.putMachine[0].SelectName, item.putMachine[0].Limit, item |
|
|
|
|
|
.putMachine[0] |
|
|
|
|
|
.Floor)) { |
|
|
|
|
|
var hint = hintIndex + ".点检内容 : " + item.Content + "输入数量【" + item.SelectName + |
|
|
|
|
|
"】不在【" + item.putMachine[0].Limit + "】和【" + item.putMachine[0].Floor + "】之间" |
|
|
|
|
|
throw new Error(hint) |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (!this.isWithinInterval(item.putMachine[1].SelectName, item.putMachine[1].Limit, item |
|
|
|
|
|
.putMachine[1] |
|
|
|
|
|
.Floor)) { |
|
|
|
|
|
var hint = hintIndex + ".点检内容 : " + item.Content + "输入数量【" + item.SelectName + |
|
|
|
|
|
"】不在【" + item.putMachine[1].Limit + "】和【" + item.putMachine[1].Floor + "】之间" |
|
|
|
|
|
throw new Error(hint) |
|
|
|
|
|
} |
|
|
|
|
|
}} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
this.formData.forEach(res => { |
|
|
|
|
|
if (res.SelectName.includes("班")) { |
|
|
|
|
|
var value = this.dataClassList.filter(item => item.name == res.SelectName) |
|
|
|
|
|
if (value.length > 0) { |
|
|
|
|
|
res.SelectValue = value[0].value |
|
|
|
|
|
} else { |
|
|
|
|
|
res.SelectValue = "" |
|
|
|
|
|
} |
|
|
|
|
|
} else { |
|
|
|
|
|
var value = this.dataList.filter(item => item.name == res.SelectName) |
|
|
|
|
|
if (value.length > 0) { |
|
|
|
|
|
res.SelectValue = value[0].value |
|
|
|
|
|
} else { |
|
|
|
|
|
res.SelectValue = res.SelectName |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
callBack(this.formData) |
|
|
|
|
|
} catch (error) { |
|
|
|
|
|
this.showHint("", error.message) |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
submitss(callBack) { |
|
|
var isCheckPass = true |
|
|
var isCheckPass = true |
|
|
for (var i = 0; i < this.formData.length; i++) { |
|
|
for (var i = 0; i < this.formData.length; i++) { |
|
|
var item = this.formData[i]; |
|
|
var item = this.formData[i]; |
|
|
var hintIndex = i + 1 |
|
|
var hintIndex = i + 1 |
|
|
if (item.type == "inputRange") { |
|
|
|
|
|
if (item.inputLow.name == "") { |
|
|
if (item.Type == 1) { |
|
|
|
|
|
if (item.SelectName == "") { |
|
|
|
|
|
this.showHint(hintIndex + ".点检内容 : " + item.Content, item.placeholder) |
|
|
|
|
|
isCheckPass = false; |
|
|
|
|
|
break |
|
|
|
|
|
} |
|
|
|
|
|
} else if (item.Type == 2) { |
|
|
|
|
|
|
|
|
|
|
|
} else |
|
|
|
|
|
|
|
|
|
|
|
if (item.Type == 3) { |
|
|
|
|
|
if (item.SelectName == "") { |
|
|
this.showHint(hintIndex + ".点检内容 : " + item.Content, item.inputLow.placeholder) |
|
|
this.showHint(hintIndex + ".点检内容 : " + item.Content, item.inputLow.placeholder) |
|
|
isCheckPass = false; |
|
|
isCheckPass = false; |
|
|
break |
|
|
break |
|
|
} else { |
|
|
} else { |
|
|
if (!this.isWithinInterval(item.inputLow.name, item.inputLow.lower, item.inputLow.upper)) { |
|
|
if (!this.isWithinInterval(item.inputLow.name, item.inputLow.lower, item.inputLow |
|
|
this.showHint(hintIndex + ".点检内容 : " + item.Content, "最低压 : 输入数量【" + item.inputLow.name + |
|
|
.upper)) { |
|
|
|
|
|
this.showHint(hintIndex + ".点检内容 : " + item.Content, "最低压 : 输入数量【" + item.inputLow |
|
|
|
|
|
.name + |
|
|
"】不在【" + item.inputLow.lower + "】和【" + item.inputLow.upper + "】之间") |
|
|
"】不在【" + item.inputLow.lower + "】和【" + item.inputLow.upper + "】之间") |
|
|
isCheckPass = false; |
|
|
isCheckPass = false; |
|
|
break |
|
|
break |
|
@ -281,20 +416,16 @@ |
|
|
isCheckPass = false; |
|
|
isCheckPass = false; |
|
|
break |
|
|
break |
|
|
} else { |
|
|
} else { |
|
|
if (!this.isWithinInterval(item.inputHigh.name, item.inputHigh.lower, item.inputHigh.upper)) { |
|
|
if (!this.isWithinInterval(item.inputHigh.name, item.inputHigh.lower, item.inputHigh |
|
|
this.showHint(hintIndex + ".点检内容 : " + item.Content, "最高压 : 输入数量【" + item.inputHigh.name + |
|
|
.upper)) { |
|
|
|
|
|
this.showHint(hintIndex + ".点检内容 : " + item.Content, "最高压 : 输入数量【" + item.inputHigh |
|
|
|
|
|
.name + |
|
|
"】不在【" + item.inputHigh.lower + "】和【" + item.inputHigh.upper + "】之间") |
|
|
"】不在【" + item.inputHigh.lower + "】和【" + item.inputHigh.upper + "】之间") |
|
|
isCheckPass = false; |
|
|
isCheckPass = false; |
|
|
break |
|
|
break |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
} else if (item.Type == 1) { |
|
|
|
|
|
if (item.SelectName == "") { |
|
|
|
|
|
this.showHint(hintIndex + ".点检内容 : " + item.Content, item.placeholder) |
|
|
|
|
|
isCheckPass = false; |
|
|
|
|
|
break |
|
|
|
|
|
} |
|
|
|
|
|
} else if (item.Type == 2) { |
|
|
} else if (item.Type == 2) { |
|
|
if (item.SelectName == "") { |
|
|
if (item.SelectName == "") { |
|
|
this.showHint(hintIndex + ".点检内容 : " + item.Content, item.placeholder) |
|
|
this.showHint(hintIndex + ".点检内容 : " + item.Content, item.placeholder) |
|
@ -302,27 +433,29 @@ |
|
|
break |
|
|
break |
|
|
} else { |
|
|
} else { |
|
|
if (!this.isExitList(item.SelectName)) { |
|
|
if (!this.isExitList(item.SelectName)) { |
|
|
if (item.putMachine.length>0) { |
|
|
if (item.putMachine.length > 0) { |
|
|
for (var i = 0; i < item.putMachine.length; i++) { |
|
|
for (var i = 0; i < item.putMachine.length; i++) { |
|
|
var temp =item.putMachine[i] |
|
|
var temp = item.putMachine[i] |
|
|
if(item.SelectName==""){ |
|
|
if (item.SelectName == "") { |
|
|
this.showHint(hintIndex + ".点检内容 : " + item.Content, temp.Name) |
|
|
this.showHint(hintIndex + ".点检内容 : " + item.Content, temp.Name) |
|
|
isCheckPass = false; |
|
|
isCheckPass = false; |
|
|
break |
|
|
break |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if (!this.isWithinInterval(item.SelectName, temp.Limit, temp.Floor)) { |
|
|
if (!this.isWithinInterval(item.SelectName, temp.Limit, temp.Floor)) { |
|
|
this.showHint(hintIndex + ".点检内容 : " + item.Content, "输入数量【" + item.SelectName + |
|
|
this.showHint(hintIndex + ".点检内容 : " + item.Content, "输入数量【" + item |
|
|
|
|
|
.SelectName + |
|
|
"】不在【" + temp.Limit + "】和【" + temp.Floor + "】之间") |
|
|
"】不在【" + temp.Limit + "】和【" + temp.Floor + "】之间") |
|
|
isCheckPass = false; |
|
|
isCheckPass = false; |
|
|
break |
|
|
break |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
} else { |
|
|
} else { |
|
|
if (!this.isWithinInterval(item.SelectName, item.Limit, item.Floor)) { |
|
|
if (!this.isWithinInterval(item.SelectName, item.Limit, item.Floor)) { |
|
|
this.showHint(hintIndex + ".点检内容 : " + item.Content, "输入数量【" + item.SelectName + |
|
|
this.showHint(hintIndex + ".点检内容 : " + item.Content, "输入数量【" + item |
|
|
|
|
|
.SelectName + |
|
|
"】不在【" + item.Limit + "】和【" + item.Floor + "】之间") |
|
|
"】不在【" + item.Limit + "】和【" + item.Floor + "】之间") |
|
|
isCheckPass = false; |
|
|
isCheckPass = false; |
|
|
break |
|
|
break |
|
@ -340,20 +473,20 @@ |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
if (isCheckPass) { |
|
|
if (isCheckPass) { |
|
|
this.formData.forEach(res=>{ |
|
|
this.formData.forEach(res => { |
|
|
if(res.SelectName.includes("班")){ |
|
|
if (res.SelectName.includes("班")) { |
|
|
var value =this.dataClassList.filter(item=>item.name==res.SelectName) |
|
|
var value = this.dataClassList.filter(item => item.name == res.SelectName) |
|
|
if(value.length>0){ |
|
|
if (value.length > 0) { |
|
|
res.SelectValue =value[0].value |
|
|
res.SelectValue = value[0].value |
|
|
}else { |
|
|
} else { |
|
|
res.SelectValue="" |
|
|
res.SelectValue = "" |
|
|
} |
|
|
} |
|
|
}else { |
|
|
} else { |
|
|
var value =this.dataList.filter(item=>item.name==res.SelectName) |
|
|
var value = this.dataList.filter(item => item.name == res.SelectName) |
|
|
if(value.length>0){ |
|
|
if (value.length > 0) { |
|
|
res.SelectValue =value[0].value |
|
|
res.SelectValue = value[0].value |
|
|
}else { |
|
|
} else { |
|
|
res.SelectValue="" |
|
|
res.SelectValue = "" |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
@ -366,6 +499,9 @@ |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
isWithinInterval(num, lower, upper) { |
|
|
isWithinInterval(num, lower, upper) { |
|
|
|
|
|
var num =Number(num); |
|
|
|
|
|
var lower =Number(lower); |
|
|
|
|
|
var upper =Number(upper); |
|
|
if (!this.isNumber(num)) { |
|
|
if (!this.isNumber(num)) { |
|
|
return true; |
|
|
return true; |
|
|
} |
|
|
} |
|
@ -383,7 +519,7 @@ |
|
|
// title: title, |
|
|
// title: title, |
|
|
// Content: hint |
|
|
// Content: hint |
|
|
// }) |
|
|
// }) |
|
|
this.$refs.comMessage.showMessage(title, hint) |
|
|
this.$refs.comMessage.showMessage("提示", hint) |
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
isNumber(val) { |
|
|
isNumber(val) { |
|
@ -420,10 +556,18 @@ |
|
|
console.log("重置", this.formData) |
|
|
console.log("重置", this.formData) |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
reload(){ |
|
|
reload() { |
|
|
this.isRefresh = false |
|
|
this.isRefresh = false |
|
|
|
|
|
this.isRefreshType3 = false |
|
|
this.$nextTick(() => { |
|
|
this.$nextTick(() => { |
|
|
this.isRefresh = true |
|
|
this.isRefresh = true |
|
|
|
|
|
this.isRefreshType3 = true |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
|
|
|
reload3() { |
|
|
|
|
|
this.isRefreshType3 = false |
|
|
|
|
|
this.$nextTick(() => { |
|
|
|
|
|
this.isRefreshType3 = true |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|