Browse Source

修改泡沫点检

master
lijuncheng 8 months ago
parent
commit
45a58ddc0d
  1. 5
      src/mycomponents/common/showModal.vue
  2. 112
      src/mycomponents/form/customerFrom.vue
  3. 25
      src/pages/foam/check.vue
  4. 29
      src/uni_modules/vk-uview-ui/components/u-radio/u-radio.vue

5
src/mycomponents/common/showModal.vue

@ -71,15 +71,16 @@
height: 400rpx;
border-radius: 8rpx;
position: relative;
text-align: center;
//modal-contentview
view:first-child{
padding: 10rpx;
font-size:30rpx;
font-size:35rpx;
font-weight:bold;
}
//modal-contentview
view:nth-child(2){
font-size:30rpx;
font-size:32rpx;
padding-left: 10rpx;
color:red
}

112
src/mycomponents/form/customerFrom.vue

@ -22,21 +22,24 @@
</view>
<view class="">
<view class="" style="margin-left: 50rpx;">
<view class="">
<text style="font-size: 32rpx; font-weight:550">点检状态</text>
<text style="font-size: 30rpx; color: #9e9e9e;">(单选)</text>
<u-radio-group v-model="item.name" @change="radioGroupChange">
</view>
<u-radio-group v-if="isRefresh" v-model="item.name" @change="radioGroupChange(item)">
<view class="uni-flex" style="width: 50%; margin-left: 0rpx;"
v-for="(radio, index) in dataList" :key="index" @change="radioChange">
v-for="(radio, index) in dataList" :key="index">
<view class="uni-flex " style="margin-top: 10rpx; justify-content: flex-start;">
<u-radio :name="radio.name">
<u-radio :name="radio.name" @change="radioChange(radio)">
{{radio.name}}
</u-radio>
</view>
</view>
</u-radio-group>
</view>
<input class="input" :disabled="false" style="margin-left: 50rpx;"
:placeholder="item.placeholder" v-model="item.name" />
<input class="input" disabled style="margin-left: 50rpx;" :placeholder="item.placeholder"
v-model="item.name" />
</view>
</view>
@ -61,21 +64,23 @@
<view class="">
<view class="" style="margin-left: 50rpx;">
<view class="">
<text style="font-size: 32rpx; font-weight:550">点检状态</text>
<text style="font-size: 30rpx; color: #9e9e9e;">(单选)</text>
<u-radio-group v-model="item.name" @change="radioGroupChange">
</view>
<u-radio-group v-if="isRefresh" v-model="item.name" @change="radioGroupChange(item)">
<view class="uni-flex" style="width: 50%; margin-left: 0rpx;"
v-for="(radio, index) in dataList" :key="index" @change="radioChange">
v-for="(radio, index) in dataInputList" :key="index">
<view class="uni-flex " style="margin-top: 10rpx; justify-content: flex-start;">
<u-radio :name="radio.name">
<u-radio :name="radio.name" @change="radioChange(radio)">
{{radio.name}}
</u-radio>
</view>
</view>
</u-radio-group>
</view>
<input class="input" :disabled="false" style="margin-left: 50rpx;"
:placeholder="item.placeholder" v-model="item.name" />
<input class="input" style="margin-left: 50rpx;" :placeholder="item.placeholder"
v-model="item.name" />
</view>
<view class="" v-if="item.main">
@ -109,19 +114,19 @@
<view class="">
<view class="" style="margin-left: 50rpx;">
<view style="font-size: 30rpx; color: #9e9e9e;">(单选)</view>
<u-radio-group v-model="item.name" @change="radioGroupChange">
<u-radio-group v-if="isRefresh" v-model="item.name" @change="radioGroupChange(item)">
<view class="uni-flex" style="width: 50%; margin-left: 0rpx;"
v-for="(radio, index) in dataClassList" :key="index" @change="radioChange">
v-for="(radio, index) in dataClassList" :key="index">
<view class="uni-flex " style="margin-top: 10rpx; justify-content: flex-start;">
<u-radio :name="radio.name">
<u-radio :name="radio.name" @change="radioChange(radio)">
{{radio.name}}
</u-radio>
</view>
</view>
</u-radio-group>
</view>
<input class="input" :disabled="false" style="margin-left: 50rpx;"
:placeholder="item.placeholder" v-model="item.name" />
<input class="input" :disabled="false" style="margin-left: 50rpx;" :placeholder="item.placeholder"
v-model="item.name" />
</view>
</view>
@ -165,7 +170,9 @@
<script>
import showModal from '../../mycomponents/common/showModal.vue'
import {
deepCopyData
} from "@/common/basic.js"
export default {
components: {
@ -200,55 +207,44 @@
name: "停机状态",
}
],
dataInputList: [{
value: 4,
name: "停机状态",
}],
dataClassList: [{
value: 1,
name: "白班",
name: "班",
},
{
value: 2,
name: "班",
name: "班",
},
{
value: 3,
name: "班",
name: "班",
}
],
// formData: [{
// content: "",
// methond: "",
// placeholder: "1",
// name: '',
// value:"",
// },
// {
// content: "",
// methond: "",
// placeholder: "2",
// name: '',
// value:"",
// }],
selectStateItem: {},
selectClassItem: {},
testName: null,
current: 0,
isRefresh: true
};
},
methods: {
radioChange(e) {
console.log(e)
radioChange(radio) {
console.log("radioChange")
},
radioGroupChange(item) {
console.log("radioGroupChange", item)
// for (let i = 0; i < this.dataList.length; i++) {
// if (this.dataList[i].value === evt.detail.value) {
// if (this.dataList[i].name === item.name) {
// this.current = i;
// break;
// }
// }
},
radioGroupChange(e) {
console.log(e)
},
inputMain(item) {
item.name = item.minor.name + "~" + item.main.name;
if (item.minor.name == "" && item.main.name == "") {
@ -309,11 +305,7 @@
} else {
if (!this.isExitList(item.name)) {
if (item.main) {
if (item.main.name == "") {
this.showHint(hintIndex + ".点检内容 : " + item.content, item.main.placeholder)
isCheckPass = false;
break
}
if (item.minor.name == "") {
this.showHint(hintIndex + ".点检内容 : " + item.content, item.minor.placeholder)
@ -323,14 +315,20 @@
if (!this.isWithinInterval(item.minor.name, item.minor.lower, item.minor.upper)) {
this.showHint(hintIndex + ".点检内容 : " + item.content, "输入数量【" + item.minor
.name + "】不在【" + item.minor.lower + "】和【" + item.minor.upper + "】之间")
.name + "】不在" + item.minor.hint)
isCheckPass = false;
break
}
if (item.main.name == "") {
this.showHint(hintIndex + ".点检内容 : " + item.content, item.main.placeholder)
isCheckPass = false;
break
}
if (!this.isWithinInterval(item.main.name, item.main.lower, item.main.upper)) {
this.showHint(hintIndex + ".点检内容 : " + item.content, "输入数量【" + item.main.name +
"】不在" + item.main.lower + "】和【" + item.main.upper + "】之间")
"】不在" + item.main.hint)
isCheckPass = false;
break
}
@ -354,7 +352,6 @@
break
}
}
}
if (isCheckPass) {
callBack(this.formData)
@ -409,10 +406,21 @@
item.name = ""
item.value = ""
}
}
// var testList =deepCopyData(this.dataList)
// this.dataList =[];
// this.dataList=testList
this.reload();
this.$emit("reset", this.formData)
console.log(this.formData)
console.log("重置", this.formData)
}
,
reload(){
this.isRefresh = false
this.$nextTick(() => {
this.isRefresh = true
})
}

25
src/pages/foam/check.vue

@ -1,7 +1,7 @@
<template>
<view class="page-wraper">
<view class="page-header flex"
style="font-size: 35rpx; padding-left: 10rpx; padding-top: 20rpx; flex-direction: column;">
style="font-size: 32rpx; padding-left: 10rpx; padding-top: 10rpx; flex-direction: column;">
<view class="flex u-col-center space-between">
<view class="">
设备编号 : {{deviceCode}}
@ -11,10 +11,10 @@
<button type="primary" size="mini" @click="openScanPopup">扫描</button>
</view>
</view>
<view class="">
<view class="" v-if="deviceName!=''">
点检日期 : {{dateTime}}
</view>
<view class="" style="width: 100%;background-color: gray;height: 2rpx;" />
<view class="" style="width: 100%;background-color: gray;height: 2rpx; margin-top: 10rpx;" />
</view>
<view class="page-main">
@ -36,20 +36,24 @@
</view>
</view>
<winScanNormal ref="scanPopup" title="设备编号" @getResult='getScanResult'></winScanNormal>
<showModal ref="comMessage"></showModal>
</view>
</template>
<script>
import showModal from '../../mycomponents/common/showModal.vue'
import customerFrom from "@/mycomponents/form/customerFrom.vue"
import winScanNormal from "@/mycomponents/scan/winScanNormal.vue"
import date from "@/mycomponents/scan/winScanNormal.vue"
import {getCurrDateTime} from "@/common/basic.js"
import {getCurrDateTime,
deepCopyData} from "@/common/basic.js"
export default {
components: {
customerFrom,
winScanNormal
winScanNormal,
showModal
},
data() {
return {
@ -63,7 +67,7 @@
content: "检查各个管路及接头",
methond: "目视野无液体渗出",
placeholder: "请输入点检状态",
name: '',
name: "正在处理",
value: "",
},
{
@ -75,7 +79,7 @@
lower: 80,
upper: 100,
placeholder: "请输入点检状态",
name: '',
name: '停机状态',
value: "",
},
{
@ -86,7 +90,7 @@
lower: 0,
upper: 6,
placeholder: "请输入待机状态下真空度",
name: '',
name: '5',
value: "",
},
{
@ -193,7 +197,12 @@
this.dateTime =getCurrDateTime()
},
submit() {
if(this.deviceCode==""){
this.$refs.comMessage.showMessage("提示", "请先扫描设备编号")
return
}
this.$refs.customerFrom.submit(callBack => {
console.log("提交", JSON.stringify(callBack))
})

29
src/uni_modules/vk-uview-ui/components/u-radio/u-radio.vue

@ -1,12 +1,7 @@
<template>
<view class="u-radio" :style="[radioStyle]">
<view class="u-radio__icon-wrap" @tap="toggle" :class="[iconClass]" :style="[iconStyle]">
<u-icon
class="u-radio__icon-wrap__icon"
name="checkbox-mark"
:size="elIconSize"
:color="iconColor"
/>
<u-icon class="u-radio__icon-wrap__icon" name="checkbox-mark" :size="elIconSize" :color="iconColor" />
</view>
<view class="u-radio__label" @tap="onClickLabel" :style="{ fontSize: $u.addUnit(labelSize) }">
<slot />
@ -89,7 +84,8 @@ export default {
height: null,
value: null,
wrap: null
}
},
select: false
};
},
created() {
@ -101,11 +97,13 @@ export default {
computed: {
// u-raios-group
elDisabled() {
return this.disabled !== ""? this.disabled: this.parentData.disabled !== null? this.parentData.disabled: false;
return this.disabled !== "" ? this.disabled : this.parentData.disabled !== null ? this.parentData
.disabled : false;
},
// label
elLabelDisabled() {
return this.labelDisabled !== ""? this.labelDisabled: this.parentData.labelDisabled !== null? this.parentData.labelDisabled: false;
return this.labelDisabled !== "" ? this.labelDisabled : this.parentData.labelDisabled !== null ? this
.parentData.labelDisabled : false;
},
// size34rpx
elSize() {
@ -117,7 +115,8 @@ export default {
},
//
elActiveColor() {
return this.activeColor? this.activeColor: this.parentData.activeColor? this.parentData.activeColor: "primary";
return this.activeColor ? this.activeColor : this.parentData.activeColor ? this.parentData.activeColor :
"primary";
},
//
elShape() {
@ -193,9 +192,18 @@ export default {
// u-radioparentData.value(computed)
setRadioCheckedStatus() {
this.emitEvent();
// if (this.parent) {
// this.parent.setValue(this.name);
// this.parentData.value = this.name;
// }
if (this.parent) {
if (this.parentData.value !== this.name) {
this.parent.setValue(this.name);
this.parentData.value = this.name;
} else {
this.parent.setValue('');
this.parentData.value = '';
}
}
}
}
@ -235,6 +243,7 @@ export default {
&__icon {
line-height: 0;
}
/* #endif */
&--circle {

Loading…
Cancel
Save