From 9375dfbf2ea9c082d78f82abe072a4ef9521728e Mon Sep 17 00:00:00 2001
From: liukangdong <898885815@qq.com>
Date: 星期三, 12 二月 2025 16:27:57 +0800
Subject: [PATCH] ll
---
h5/pages/operation/device.vue | 63 ++++++++++++++++---------------
1 files changed, 33 insertions(+), 30 deletions(-)
diff --git a/h5/pages/operation/device.vue b/h5/pages/operation/device.vue
index 25d7921..9ec4389 100644
--- a/h5/pages/operation/device.vue
+++ b/h5/pages/operation/device.vue
@@ -83,7 +83,7 @@
import {
uploadUrl,
ywDevicePost,
- ywDeviceCreate,
+ ywDeviceCreate,
getFindByCode
} from '@/api'
import dayjs from 'dayjs';
@@ -123,7 +123,7 @@
},
handleP() {
const {
- param,
+ param,
fileList
} = this
ywDeviceCreate({
@@ -132,24 +132,27 @@
dealDate: dayjs().format('YYYY-MM-DD HH:mm:ss'),
multifileList: fileList
}).then(res => {
- if (param.status != 0) {
- uni.showModal({
- title: '娓╅Θ鎻愮ず',
- content: '璁惧杩愮淮缁撴灉寮傚父锛屾槸鍚﹀墠寰�鎻愪氦宸ュ崟?',
- success: function(res) {
- if (res.confirm) {
- uni.redirectTo({
- url: '/pages/workOrder/edit'
- })
- } else if (res.cancel) {
- uni.navigateBack()
+ if (res && res.code == 200) {
+ if (param.status != 0) {
+ uni.showModal({
+ title: '娓╅Θ鎻愮ず',
+ content: '璁惧杩愮淮缁撴灉寮傚父锛屾槸鍚﹀墠寰�鎻愪氦宸ュ崟?',
+ success: function(res) {
+ if (res.confirm) {
+ uni.redirectTo({
+ url: '/pages/workOrder/edit'
+ })
+ } else if (res.cancel) {
+ uni.navigateBack()
+ }
}
- }
- });
- }else{
- this.showToast('鎻愪氦鎴愬姛')
- uni.navigateBack()
+ });
+ } else {
+ this.showToast('鎻愪氦鎴愬姛')
+ uni.navigateBack()
+ }
}
+
})
},
getDevice() {
@@ -285,19 +288,19 @@
qrbox: 280 //璁剧疆浜岀淮鐮佹壂鎻忔澶у皬
},
(decodeText, decodeResult) => {
- if (decodeText) { //杩欓噷decodeText灏辨槸閫氳繃鎵弿浜岀淮鐮佸緱鍒扮殑鍐呭
- this.stopScan(); //鍏抽棴鎵爜鍔熻兘
- getFindByCode(decodeText).then(ress => {
- if (ress.data) {
- console.log('ress', ress.data);
- this.$set(this.param, 'deviceCode', ress.data.code)
- this.$set(this.param, 'deviceId', ress.data.id)
- this.$set(this.param, 'deviceName', ress.data.name)
- } else {
- this.showToast('鏈尮閰嶅埌宸℃鐐�,璇烽噸鏂版壂鎻�')
- }
+ if (decodeText) { //杩欓噷decodeText灏辨槸閫氳繃鎵弿浜岀淮鐮佸緱鍒扮殑鍐呭
+ this.stopScan(); //鍏抽棴鎵爜鍔熻兘
+ getFindByCode(decodeText).then(ress => {
+ if (ress.data) {
+ console.log('ress', ress.data);
+ this.$set(this.param, 'deviceCode', ress.data.code)
+ this.$set(this.param, 'deviceId', ress.data.id)
+ this.$set(this.param, 'deviceName', ress.data.name)
+ } else {
+ this.showToast('鏈尮閰嶅埌宸℃鐐�,璇烽噸鏂版壂鎻�')
+ }
})
-
+
}
},
(err) => {
--
Gitblit v1.9.3