| | |
| | | |
| | | |
| | | |
| | | <view :style="{maxHeight:'1000rpx',overflow: 'scroll'}"> |
| | | <view :style="{maxHeight:'1360rpx',overflow: 'scroll'}"> |
| | | <view class="marginTop20 marginLeft20 marginRight20 flex_column"> |
| | | |
| | | <u-radio-group v-model="radioValue" class="flex_column"> |
| | |
| | | </view> |
| | | <view style="display: flex;" v-show="fileList.length!==0"> |
| | | <view v-for="(pic,index) in fileList" :key="index"> |
| | | <view style="margin: 20rpx 0rpx 20rpx 20rpx;position: relative;"> |
| | | <view style="margin: 20rpx 0rpx 20rpx 20rpx;position: relative;" |
| | | v-if='pic.img1url'> |
| | | <!-- <u-icon name="close" color="#fff" size="26" |
| | | style="position: absolute;z-index: 10;right: 0;background-color: black;border-radius:50%;" |
| | | @click="deletePic(pic)"></u-icon> |
| | |
| | | </view> |
| | | |
| | | <view class="" style="width: 90rpx;display: flex;"> |
| | | <u-button type="primary" disabled |
| | | <u-button type="primary" disabled style="height: 60rpx;" |
| | | :text="descMessage2.toString().length>0?'否':'是'"> |
| | | </u-button> |
| | | </view> |
| | |
| | | </view> |
| | | <view style="display: flex;" v-show="fileList2.length!==0"> |
| | | <view v-for="(pic,index) in fileList2" :key="index"> |
| | | <view style="margin: 20rpx 0rpx 20rpx 20rpx;position: relative;"> |
| | | <view style="margin: 20rpx 0rpx 20rpx 20rpx;position: relative;" |
| | | v-if='pic.img2url'> |
| | | <!-- <u-icon name="close" color="#fff" size="26" |
| | | style="position: absolute;z-index: 10;right: 0;background-color: black;border-radius:50%;" |
| | | @click="deletePic(pic)"></u-icon> |
| | |
| | | :key="Math.random()+item.repair_code"> |
| | | <u-button :plain="item.resultValue!=='OK'" text="正常" |
| | | @click="resultValueClick(item.repair_code,'OK')" |
| | | style="height: 60rpx;" |
| | | :key="Math.random()+item.repair_code+'OK'" type="primary"> |
| | | |
| | | </u-button> |
| | | <u-button type="warning" :plain="item.resultValue!=='NG'" |
| | | :key="Math.random()+item.repair_code+'NG'" text="异常" |
| | | style="height: 60rpx;margin: 0 5rpx;" |
| | | @click="resultValueClick(item.repair_code,'NG')"> |
| | | </u-button> |
| | | </view> |
| | |
| | | <view class="arrowClass" |
| | | @click="item.arrowType?arrowDownClick(item):arrowUpClick(item)"> |
| | | <u-icon :name="item.arrowType?'arrow-down':'arrow-up'" color="#c8c8c8" |
| | | size="50"></u-icon> |
| | | size="25"></u-icon> |
| | | </view> |
| | | </view> |
| | | |
| | |
| | | |
| | | <script> |
| | | import { |
| | | // RepairVerificationScanDeviceData, |
| | | // RepairVerificationScanDeviceDataSub |
| | | RepairVerificationScanDeviceData, |
| | | RepairVerificationScanDeviceDataSub, |
| | | RepairVerificationScanDeviceSave |
| | | } from '../../config/api.js' |
| | | import { |
| | | data |
| | |
| | | data() { |
| | | return { |
| | | isDisabledSubmitButton: false, |
| | | baseUrl: 'http://121.196.36.24:8001', |
| | | baseUrl: 'http://121.196.36.24:8019/', |
| | | topContent: [], //扫描保养工位所带出来的内容 |
| | | radioValue: '', //单选框的值 |
| | | scanContent: '', //扫描扫出来的值 |
| | |
| | | }, |
| | | // 确认提交按钮 |
| | | async submit() { |
| | | const header = { |
| | | // 'Content-Type': 'multipart/form-data', |
| | | 'Content-Type': 'application/x-www-form-urlencoded', |
| | | 'rediskey': uni.getStorageSync('rediskey'), |
| | | 'admin': uni.getStorageSync('usercode'), |
| | | 'username': encodeURIComponent(uni.getStorageSync('username')), |
| | | 'navTabId': uni.getStorageSync('usercode'), |
| | | 'userid': uni.getStorageSync('userid'), |
| | | 'guid': uni.getStorageSync('guid'), |
| | | 'usertype': 'APP' |
| | | } |
| | | |
| | | const result = this.topContent.find(item => item.repair_code === this.radioValue) |
| | | let formData = { |
| | | username: uni.getStorageSync('username'), |
| | | repairwo: result.repair_code, |
| | | eqpcode: result.eqpcode, |
| | | wkshpcode: result.wksp_code, |
| | | result: result.resultValue, |
| | | } |
| | | |
| | | // console.log(formData) |
| | | |
| | | // this.isDisabledSubmitButton = true |
| | | // uni.request({ |
| | | // url: this.$baseUrl + '/AppDeviceManage/RepairVerificationScanDeviceSave', //仅为示例,并非真实接口地址。 |
| | | // data: formData, |
| | | // method: "POST", |
| | | // header: header, |
| | | // success: res => { |
| | | // if (res.statusCode == 200 && res.data.code == '200') { |
| | | // uni.$u.toast('提交成功!') |
| | | // // this.topContent = this.topContent.filter(i => i.repair_code !== this |
| | | // // .radioValue) |
| | | // // this.radioValue = this.topContent.length === 0 ? '' : this.topContent[0] |
| | | // // .repair_code |
| | | // // console.log(this.radioValue) |
| | | // // console.log(this.topContent, 9) |
| | | // // this.groupChange(this.radioValue) |
| | | |
| | | // this.getRepairVerificationScanDeviceData() |
| | | // this.isDisabledSubmitButton = false |
| | | // this.$forceUpdate() |
| | | // } |
| | | // }, |
| | | // fail: res => { |
| | | // uni.$u.toast('提交失败!') |
| | | // this.isDisabledSubmitButton = false |
| | | // } |
| | | // }) |
| | | |
| | | |
| | | this.isDisabledSubmitButton = true |
| | | uni.uploadFile({ |
| | | url: this.$baseUrl + '/AppDeviceManage/RepairVerificationScanDeviceSave', |
| | | files: [{ |
| | | "uri": "/" |
| | | }], |
| | | header: header, |
| | | formData: formData, |
| | | success: (res) => { |
| | | let result = JSON.parse(res.data) |
| | | if (res.statusCode == 200 && result.code == '200') { |
| | | |
| | | const res = await RepairVerificationScanDeviceSave(formData) |
| | | if (res.code == '200') { |
| | | uni.$u.toast('提交成功!') |
| | | this.topContent = this.topContent.filter(i => i.repair_code !== this |
| | | .radioValue) |
| | | this.radioValue = this.topContent.length === 0 ? '' : this.topContent[0] |
| | | .repair_code |
| | | this.isDisabledSubmitButton = false |
| | | } else { |
| | | this.isDisabledSubmitButton = false |
| | | uni.$u.toast(result.Message) |
| | | } |
| | | this.isDisabledSubmitButton = false |
| | | // this.isDisabledSubmitButton = false |
| | | this.$forceUpdate() |
| | | }, |
| | | fail(res) { |
| | | uni.$u.toast('提交失败!') |
| | | this.isDisabledSubmitButton = false |
| | | }, |
| | | }) |
| | | |
| | | // uni.uploadFile({ |
| | | // url: this.$baseUrl + '/AppDeviceManage/RepairVerificationScanDeviceSave', |
| | | // files: [{ |
| | | // "uri": "/" |
| | | // }], |
| | | // header: header, |
| | | // formData: formData, |
| | | // success: (res) => { |
| | | // let result = JSON.parse(res.data) |
| | | // if (res.statusCode == 200 && result.code == '200') { |
| | | // uni.$u.toast('提交成功!') |
| | | // this.topContent = this.topContent.filter(i => i.repair_code !== this |
| | | // .radioValue) |
| | | // this.radioValue = this.topContent.length === 0 ? '' : this.topContent[0] |
| | | // .repair_code |
| | | // } else { |
| | | // uni.$u.toast(result.Message) |
| | | // } |
| | | // this.isDisabledSubmitButton = false |
| | | // this.$forceUpdate() |
| | | // }, |
| | | // fail(res) { |
| | | // uni.$u.toast('提交失败!') |
| | | // this.isDisabledSubmitButton = false |
| | | // }, |
| | | // }) |
| | | |
| | | |
| | | }, |