From 32383daed1b498577da8c37145e66e2a93e28b2d Mon Sep 17 00:00:00 2001
From: loulijun2021 <1694218219@qq.com>
Date: 星期三, 21 九月 2022 17:13:52 +0800
Subject: [PATCH] 1.日常点检提交功能开发完成
---
pages/sbgl/rcdj.html | 67 ++++++++++++++++++++++++++++-----
1 files changed, 56 insertions(+), 11 deletions(-)
diff --git a/pages/sbgl/rcdj.html b/pages/sbgl/rcdj.html
index 51480a0..a00c143 100644
--- a/pages/sbgl/rcdj.html
+++ b/pages/sbgl/rcdj.html
@@ -36,7 +36,7 @@
// wksp_code: "CJ002",
// wksp_name: '瑁呴厤杞﹂棿',
// eqpchkmain_code: "djbz002"
- // },
+ // },
];
var centerContent = [
@@ -54,17 +54,17 @@
]
- let radioValue = ''
+ let radioValue = '' //鍗曢�夋閫変腑鐨勯」
- let resultValue = ''
+ let resultValue = '' //鐐规缁撴灉
- let bwcode = ''
+ let bwcode = '' //鐐瑰嚮閮ㄤ綅鐨勬壂鎻忔 鐐规椤圭洰code
- let number = []
+ let number = [] //鐐规椤圭洰鍐呭 鍋囨暟缁� 鍋氭壂鐮佸洖鏉ヨ鍥炬洿鏂扮敤
+ // 鎵弿鐐规宸ヤ綅杩斿洖鏃舵墽琛屾柟娉�
function scaned(r) {
-
let flag = false
topContent.forEach((item, index) => {
if (item.code === r) {
@@ -98,7 +98,7 @@
}
-
+ // 鎵弿鐐规椤圭洰鍐呭杩斿洖鏃舵墽琛屾柟娉�
function scaned2(r) {
if (bwcode === r) {
centerContent.forEach(item => {
@@ -131,7 +131,6 @@
}
}
-
function topContentClcik(code) {
radioValue = code
@@ -246,8 +245,8 @@
</div>
<div class="flex_between ">
<div class='flex_between' style="width: 90%;">
- <van-field class="vanFieldInput" :disabled="item.isDisabled" v-model="item.inputValue"
- placeholder="璇疯緭鍏�" />
+ <van-field class="vanFieldInput" @blur="vanFieldBlur()" :disabled="item.isDisabled"
+ v-model="item.inputValue" placeholder="璇疯緭鍏�" />
</div>
@@ -377,7 +376,53 @@
mounted() {},
methods: {
submit() {
- vant.Toast('xxx1')
+ let children = []
+ centerContent.forEach(item => {
+ children.push({
+ seq: item.seq,
+ itemcode: item.code,
+ cycle: item.cycle,
+ value: item.inputValue,
+ result: item.isOK
+ })
+ })
+ const data = {
+ code: radioValue,
+ name: topContent.find(r => r.code === radioValue).name,
+ standcode: topContent.find(r => r.code === radioValue).eqpchkmain_code,
+ result: resultValue,
+ children: children
+ }
+
+ console.log(data, 1)
+
+ post('AppDeviceManage/AppDeviceCheckSave?username=' + localStorage.getItem('username'), data)
+ .then(res => {
+ if (res.code === '200') {
+ vant.Notify({
+ type: 'primary',
+ message: '鎻愪氦鎴愬姛锛�'
+ })
+ topContent.forEach((r, i) => {
+ if (r.code === radioValue) {
+ topContent.splice(i, 1)
+ }
+ })
+ if (topContent.length >= 1) {
+ radioValue = topContent[0].code
+ this.topContentClcik(radioValue)
+ } else {
+ centerContent = []
+ }
+ resultValue = ''
+ this.$forceUpdate()
+ }
+ })
+
+ },
+ // 杈撳叆妗嗗け鐒﹁Е鍙戜簨浠�
+ vanFieldBlur() {
+ this.$forceUpdate()
},
topContentClcik(code) {
radioValue = code
--
Gitblit v1.9.3