| | |
| | | ] |
| | | |
| | | |
| | | 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) { |
| | |
| | | |
| | | } |
| | | |
| | | |
| | | // 扫描点检项目内容返回时执行方法 |
| | | function scaned2(r) { |
| | | if (bwcode === r) { |
| | | centerContent.forEach(item => { |
| | |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | function topContentClcik(code) { |
| | | radioValue = code |
| | |
| | | </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> |
| | | |
| | | |
| | |
| | | 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 |