|
@@ -15,7 +15,7 @@
|
|
|
</u-form-item> -->
|
|
|
<u-form-item label="订单号" prop="orderNo" required>
|
|
|
<view style="display: flex;">
|
|
|
- <u-input v-model="form.orderNo" placeholder="请选择订单号" style="flex: 1;" />
|
|
|
+ <u-input v-model="form.orderNo" placeholder="请选择订单号" style="flex: 1;" @blur="handleInputBlur" />
|
|
|
<u-icon name="scan" size="60" style="margin-left: 5px;" @click="scanQRCode"></u-icon>
|
|
|
</view>
|
|
|
</u-form-item>
|
|
@@ -245,27 +245,6 @@
|
|
|
onReady() {
|
|
|
this.form.coachName = uni.getStorageSync('userData').nickName
|
|
|
this.getAllVenueData()
|
|
|
- // this.$refs.form.setRules(this.rules);
|
|
|
- // 获取班级列表
|
|
|
- // NET.request(API.getClassList, {
|
|
|
- // page: 1,
|
|
|
- // size: 1000,
|
|
|
- // }, 'POST').then(res => {
|
|
|
- // this.classList = res.data.row
|
|
|
- // }).catch(error => {
|
|
|
- // this.$refs.uTips.show({
|
|
|
- // title: error.message,
|
|
|
- // type: 'warning',
|
|
|
- // })
|
|
|
- // })
|
|
|
- // NET.request(API.getPayTypeList, {}, 'POST').then(res => {
|
|
|
- // this.payTypeList = res.data
|
|
|
- // }).catch(error => {
|
|
|
- // this.$refs.uTips.show({
|
|
|
- // title: error.message,
|
|
|
- // type: 'warning',
|
|
|
- // })
|
|
|
- // })
|
|
|
},
|
|
|
watch: {
|
|
|
'form.payTypeId' (newData,oldData) {
|
|
@@ -283,44 +262,45 @@
|
|
|
this.form.payTypeId.splice(itemIndex, 1)
|
|
|
}
|
|
|
},
|
|
|
+ handleInputBlur(e) {
|
|
|
+ this.getQrCodeData(e)
|
|
|
+ },
|
|
|
// 扫码二维码
|
|
|
scanQRCode() {
|
|
|
uni.scanCode({
|
|
|
onlyFromCamera: true,
|
|
|
success: (res) => {
|
|
|
- NET.request(API.getQrCodeInfo, {
|
|
|
- orderNo: res.result
|
|
|
- }, 'POST').then(res => {
|
|
|
- this.form.parentsName = res.data.parentsName
|
|
|
- this.form.studentId = res.data.studentId
|
|
|
- this.form.studentName = res.data.studentName
|
|
|
- this.form.sex = res.data.sex
|
|
|
- this.form.age = res.data.age
|
|
|
- this.form.birthday = res.data.birthday
|
|
|
- this.form.phone = res.data.phone
|
|
|
- this.cardList = res.data.cards
|
|
|
- // if (res.data.payTypeId) {
|
|
|
- // let payType = this.payTypeList.find(site => site.id == res.data.payTypeId)
|
|
|
- // this.form.payTypeId = res.data.payTypeId
|
|
|
- // this.form.payTypeName = payType.name
|
|
|
- // this.form.payTypeCode = payType.other
|
|
|
- // }
|
|
|
- if (res.data.imageFileId) {
|
|
|
- this.form.imageFileId = res.data.imageFileId
|
|
|
- this.fileList = [{
|
|
|
- url: res.data.imageFileUrl
|
|
|
- }]
|
|
|
- }
|
|
|
- this.form.orderNo = res.data.orderNo
|
|
|
- }).catch(error => {
|
|
|
- this.$refs.uTips.show({
|
|
|
- title: error.message,
|
|
|
- type: 'warning',
|
|
|
- })
|
|
|
- })
|
|
|
+ this.getQrCodeData(res.result)
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
+ // 获取订单信息
|
|
|
+ getQrCodeData(orderNo) {
|
|
|
+ NET.request(API.getQrCodeInfo, {
|
|
|
+ orderNo
|
|
|
+ }, 'POST').then(res => {
|
|
|
+ this.form.parentsName = res.data.parentsName
|
|
|
+ this.form.studentId = res.data.studentId
|
|
|
+ this.form.studentName = res.data.studentName
|
|
|
+ this.form.sex = res.data.sex
|
|
|
+ this.form.age = res.data.age
|
|
|
+ this.form.birthday = res.data.birthday
|
|
|
+ this.form.phone = res.data.phone
|
|
|
+ this.cardList = res.data.cards
|
|
|
+ if (res.data.imageFileId) {
|
|
|
+ this.form.imageFileId = res.data.imageFileId
|
|
|
+ this.fileList = [{
|
|
|
+ url: res.data.imageFileUrl
|
|
|
+ }]
|
|
|
+ }
|
|
|
+ this.form.orderNo = res.data.orderNo
|
|
|
+ }).catch(error => {
|
|
|
+ this.$refs.uTips.show({
|
|
|
+ title: error.message,
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ })
|
|
|
+ },
|
|
|
// 文件上传成功回调
|
|
|
uploadSuccess(res, index, lists, name) {
|
|
|
if (name == 1) {
|