|
@@ -6,6 +6,7 @@ import { CameraSetting } from '../../providers/camera-photo'
|
|
import { commonService } from '../../providers/common.service'
|
|
import { commonService } from '../../providers/common.service'
|
|
import { ImagePicker, ImagePickerOptions } from '@ionic-native/image-picker/ngx';
|
|
import { ImagePicker, ImagePickerOptions } from '@ionic-native/image-picker/ngx';
|
|
import { Base64 } from '@ionic-native/base64/ngx';
|
|
import { Base64 } from '@ionic-native/base64/ngx';
|
|
|
|
+import { ActivatedRoute } from '@angular/router'
|
|
// import { FullScreenImage } from '@ionic-native/full-screen-image/ngx';
|
|
// import { FullScreenImage } from '@ionic-native/full-screen-image/ngx';
|
|
|
|
|
|
// import { PopoverController } from '@ionic/angular'
|
|
// import { PopoverController } from '@ionic/angular'
|
|
@@ -31,6 +32,7 @@ export class StoreQCDetailPage implements OnInit {
|
|
constructor(private storage: Storage,
|
|
constructor(private storage: Storage,
|
|
public commonService: commonService,
|
|
public commonService: commonService,
|
|
private cameraSetting: CameraSetting,
|
|
private cameraSetting: CameraSetting,
|
|
|
|
+ private activeRoute: ActivatedRoute,
|
|
private base64: Base64,
|
|
private base64: Base64,
|
|
private imagePicker: ImagePicker,
|
|
private imagePicker: ImagePicker,
|
|
// private fullScreenImage: FullScreenImage,
|
|
// private fullScreenImage: FullScreenImage,
|
|
@@ -40,9 +42,6 @@ export class StoreQCDetailPage implements OnInit {
|
|
|
|
|
|
ngOnInit() {
|
|
ngOnInit() {
|
|
this.showDetail = true
|
|
this.showDetail = true
|
|
- this.storage.get('QCdetails').then((val) => {
|
|
|
|
- this.QCdetails = JSON.parse(val)
|
|
|
|
- });
|
|
|
|
this.storage.get('qc-pId').then((val) => {
|
|
this.storage.get('qc-pId').then((val) => {
|
|
this.pId = val
|
|
this.pId = val
|
|
});
|
|
});
|
|
@@ -53,16 +52,20 @@ export class StoreQCDetailPage implements OnInit {
|
|
|
|
|
|
ionViewDidEnter() {
|
|
ionViewDidEnter() {
|
|
// console.log(this.fullScreenImage)
|
|
// console.log(this.fullScreenImage)
|
|
- this.getDetail()
|
|
|
|
|
|
+ this.activeRoute.paramMap.subscribe(async params => {
|
|
|
|
+ this.getDetail(params['params'].firstcheckrpid)
|
|
|
|
+ })
|
|
}
|
|
}
|
|
|
|
|
|
showFullScreenImage(data) {
|
|
showFullScreenImage(data) {
|
|
this.commonService.fullScreenImg(data)
|
|
this.commonService.fullScreenImg(data)
|
|
}
|
|
}
|
|
|
|
|
|
- async getDetail() {
|
|
|
|
- if (this.QCdetails) {
|
|
|
|
- this.qcData = this.QCdetails
|
|
|
|
|
|
+ async getDetail(firstcheckrpid) {
|
|
|
|
+ let data = await this.userData.getQCDetailByPID(firstcheckrpid)
|
|
|
|
+ if(data&&data.length!==0) {
|
|
|
|
+ this.qcData = data[0]
|
|
|
|
+ }
|
|
for (let i of this.qcData['details']) {
|
|
for (let i of this.qcData['details']) {
|
|
this.showDetail = false
|
|
this.showDetail = false
|
|
// 获取QA日志
|
|
// 获取QA日志
|
|
@@ -91,7 +94,6 @@ export class StoreQCDetailPage implements OnInit {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
this.defaultHref = `/store-qc`;
|
|
this.defaultHref = `/store-qc`;
|
|
- }
|
|
|
|
// if (this.pId && this.sscId) {
|
|
// if (this.pId && this.sscId) {
|
|
// let data = await this.userData.getQCDetail(this.pId, this.sscId)
|
|
// let data = await this.userData.getQCDetail(this.pId, this.sscId)
|
|
// this.defaultHref = `/store-qc-scanning`;
|
|
// this.defaultHref = `/store-qc-scanning`;
|