| | |
| | | |
| | | <view class="footer" v-show='centerContent.length!==0'> |
| | | <u-button size="large" :loading="isDisabledSubmitButton" loadingText="正在提交,请稍等..." type="primary" |
| | | @click="submit" :disabled="resultValue===''" text="确认提交"> |
| | | :disabled="centerContent.filter(i=>i.isOK==='OK'||i.isOK==='NG').length!==centerContent.length" |
| | | @click="submit" text="确认提交"> |
| | | </u-button> |
| | | </view> |
| | | |
| | |
| | | selectValue: '', |
| | | centerContent: [], |
| | | resultValue: '' |
| | | |
| | | } |
| | | }, |
| | | created() { |
| | |
| | | init() { |
| | | uni.stopPullDownRefresh(); |
| | | |
| | | this.getCheckScanMouldQrCodeData('001') |
| | | this.getCheckScanMouldTemp('001') |
| | | // this.getCheckScanMouldQrCodeData('001') |
| | | // this.getCheckScanMouldTemp('001') |
| | | // this.getSelectScanMouldQrCodeItem('001', '001') |
| | | }, |
| | | async getCheckScanMouldQrCodeData(mouldcode) { |
| | |
| | | mouldcode: mouldcode |
| | | }) |
| | | this.standardArr = res |
| | | |
| | | this.centerContent = [] |
| | | this.resultValue = '' |
| | | this.selectValue = '' |
| | | }, |
| | | async getSelectScanMouldQrCodeItem(mouldcode, checktempcode) { |
| | | const { |
| | |
| | | selectClick(val) { |
| | | this.resultValue = '' |
| | | this.selectValue = val.name |
| | | this.getSelectScanMouldQrCodeItem('001', val.code) |
| | | this.getSelectScanMouldQrCodeItem(this.topContent[0].code, val.code) |
| | | |
| | | }, |
| | | bwClick(item, val) { |
| | |
| | | }, |
| | | resultClick(val) { |
| | | this.resultValue = val |
| | | |
| | | console.log(val) |
| | | |
| | | // this.centerContent.forEach(i => { |
| | | // i.isOK = val |
| | | // }) |
| | | |
| | | |
| | | this.$forceUpdate() //强制视图更新 |
| | | }, |
| | | submit() { |
| | | async submit() { |
| | | |
| | | const children = [] |
| | | this.centerContent.forEach((i, index) => { |
| | | children.push({ |
| | | seq: index + 1, |
| | | itemcode: i.code, |
| | | cycle: '', |
| | | value: i.inputValue, |
| | | result: i.isOK |
| | | }) |
| | | }) |
| | | |
| | | const data = { |
| | | code: this.topContent[0].code, |
| | | name: this.topContent[0].name, |
| | | standcode: this.selectValue, |
| | | result: this.resultValue, |
| | | children |
| | | } |
| | | |
| | | // console.log(JSON.stringify(data)) |
| | | this.isDisabledSubmitButton = true |
| | | const res = await MouldCheckSave('2050', data) |
| | | if (res.code === '200') { |
| | | uni.$u.toast('提交成功!') |
| | | this.isDisabledSubmitButton = false |
| | | this.topContent = [] |
| | | this.selectValue = '' |
| | | this.centerContent = [] |
| | | this.resultValue = '' |
| | | } |
| | | }, |
| | | } |
| | | } |