Преглед на файлове

陪验上传图片bug fix

panxingxin преди 5 години
родител
ревизия
c0c3cd4c47
променени са 3 файла, в които са добавени 86 реда и са изтрити 87 реда
  1. 1 1
      config.xml
  2. 1 1
      src/app/inspection-list/inspection-list.page.ts
  3. 84 85
      src/providers/user-data.ts

+ 1 - 1
config.xml

@@ -1,5 +1,5 @@
 <?xml version='1.0' encoding='utf-8'?>
-<widget id="com.ionicframework.sgZongLi" version="1.2.3" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
+<widget id="com.ionicframework.sgZongLi" version="1.3.3" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
     <name>SG综礼</name>
     <description>An awesome Ionic/Cordova app.</description>
     <author email="hi@ionicframework.com" href="http://ionicframework.com/">Ionic Framework Team</author>

+ 1 - 1
src/app/inspection-list/inspection-list.page.ts

@@ -17,7 +17,7 @@ export class InspectionListPage implements OnInit {
 
   public inspectionList = []
   public imgList = []
-  public imageData = ''
+  public imageData
 
   constructor(private activeRoute: ActivatedRoute,
     public userData: UserData,

+ 84 - 85
src/providers/user-data.ts

@@ -51,7 +51,7 @@ export class UserData {
   // 获取App menu
   async getAppMenu(): Promise<any> {
     return new Promise((resolve, reject) => {
-      this.api.request('get',`${environment.APP_SERVE_URL}/admin/menu/app`,{},{}).then((data)=>{
+      this.api.request('get', `${environment.APP_SERVE_URL}/admin/menu/app`, {}, {}).then((data) => {
         resolve(data['data'])
       }).catch(e => { console.log(e) })
     })
@@ -85,7 +85,7 @@ export class UserData {
   // 开单号扫描
   async ssfCodeScan(data: object): Promise<any> {
     return new Promise((resolve, reject) => {
-      this.api.request('post',`${environment.APP_SERVE_URL}/production/sample/factory/`,data,{}).then((data)=>{
+      this.api.request('post', `${environment.APP_SERVE_URL}/production/sample/factory/`, data, {}).then((data) => {
         this.storage.set('ssfId', data['data'].ssfId)
         resolve(data['data'])
       }).catch(e => { console.log(e) })
@@ -95,7 +95,7 @@ export class UserData {
   // 货号扫描
   async pCodeScan(data: object): Promise<any> {
     return new Promise((resolve, reject) => {
-      this.api.request('get',`${environment.APP_SERVE_URL}/production/sample/factory/pCode`,data,{}).then((data)=>{
+      this.api.request('get', `${environment.APP_SERVE_URL}/production/sample/factory/pCode`, data, {}).then((data) => {
         this.storage.set('ssfId', data['data'].ssfId)
         resolve(data['data'])
       }).catch(e => { console.log(e) })
@@ -105,7 +105,7 @@ export class UserData {
   // 修改创样数量为零
   async sampleCountZero(pCode: string): Promise<any> {
     return new Promise((resolve, reject) => {
-      this.api.request('put',`${environment.APP_SERVE_URL}/production/products/sampleCount?pCode=${pCode}`,{},{}).then((data)=>{
+      this.api.request('put', `${environment.APP_SERVE_URL}/production/products/sampleCount?pCode=${pCode}`, {}, {}).then((data) => {
         this.api.showToast(`修改货号${pCode}创样数量为零成功`)
         resolve(data)
       }).catch(e => { console.log(e) })
@@ -115,7 +115,7 @@ export class UserData {
   // 新增样品工厂详细
   async saveFactoryDetails(data: object): Promise<any> {
     return new Promise((resolve, reject) => {
-      this.api.request('post',`${environment.APP_SERVE_URL}/production/sample/factory/details/`,data,{}).then((data)=>{
+      this.api.request('post', `${environment.APP_SERVE_URL}/production/sample/factory/details/`, data, {}).then((data) => {
         this.storage.set('ssfId', data['data'].ssfId)
         resolve(data['data'])
       }).catch(e => { console.log(e) })
@@ -125,7 +125,7 @@ export class UserData {
   // 获取样品单列表
   async getSampleTableData(form: object): Promise<any> {
     return new Promise((resolve, reject) => {
-      this.api.request('post',`${environment.APP_SERVE_URL}/search/samples/mobile/page`,form,{}).then((data)=>{
+      this.api.request('post', `${environment.APP_SERVE_URL}/search/samples/mobile/page`, form, {}).then((data) => {
         resolve(data)
       }).catch(e => { console.log(e) })
     })
@@ -134,7 +134,7 @@ export class UserData {
   // 获得采购合同列表
   async getContractTableData(form: object): Promise<any> {
     return new Promise((resolve, reject) => {
-      this.api.request('post',`${environment.APP_SERVE_URL}/search/supplier/contract/mobile/page`,form,{}).then((data)=>{
+      this.api.request('post', `${environment.APP_SERVE_URL}/search/supplier/contract/mobile/page`, form, {}).then((data) => {
         resolve(data)
       }).catch(e => { console.log(e) })
     })
@@ -143,7 +143,7 @@ export class UserData {
   // 获取样品单详情
   async getSampleDetail(sdId: Number): Promise<any> {
     return new Promise((resolve, reject) => {
-      this.api.request('get',`${environment.APP_SERVE_URL}/production/samples/mobile/${sdId}`,{},{}).then((data)=>{
+      this.api.request('get', `${environment.APP_SERVE_URL}/production/samples/mobile/${sdId}`, {}, {}).then((data) => {
         resolve(data)
       }).catch(e => { console.log(e) })
     });
@@ -152,7 +152,7 @@ export class UserData {
   // 获取样品单QA详情
   async getSampleQAlog(sdpId: Number): Promise<any> {
     return new Promise((resolve, reject) => {
-      this.api.request('get',`${environment.APP_SERVE_URL}/production/samples/mobile/qalog/${sdpId}`,{},{}).then((data)=>{
+      this.api.request('get', `${environment.APP_SERVE_URL}/production/samples/mobile/qalog/${sdpId}`, {}, {}).then((data) => {
         resolve(data)
       }).catch(e => { console.log(e) })
     });
@@ -161,178 +161,178 @@ export class UserData {
   // 样品单保存(添加QA日志)
   async saveSampleDetail(form: any): Promise<any> {
     return new Promise((resolve, reject) => {
-      this.api.request('post',`${environment.APP_SERVE_URL}/production/samples/mobile/qalog`,form,{},'urlencoded').then((data)=>{
+      this.api.request('post', `${environment.APP_SERVE_URL}/production/samples/mobile/qalog`, form, {}, 'urlencoded').then((data) => {
         this.api.showToast('保存成功')
         resolve(data)
-      }).catch(e => {console.log(e)})
+      }).catch(e => { console.log(e) })
     });
   }
 
   // 删除qa日志
   async deleteSampleQa(id: any): Promise<any> {
     return new Promise((resolve, reject) => {
-      this.api.request('delete',`${environment.APP_SERVE_URL}/inventory/qa/mobile/qalog/${id}`,{},{}).then((data)=>{
+      this.api.request('delete', `${environment.APP_SERVE_URL}/inventory/qa/mobile/qalog/${id}`, {}, {}).then((data) => {
         resolve(data)
-      }).catch(e => {console.log(e)})
+      }).catch(e => { console.log(e) })
     });
   }
 
   // 删除qc日志
   async deleteSampleQc(id: any): Promise<any> {
     return new Promise((resolve, reject) => {
-      this.api.request('delete',`${environment.APP_SERVE_URL}/inventory/qc/mobile/qclog/${id}`,{},{}).then((data)=>{
+      this.api.request('delete', `${environment.APP_SERVE_URL}/inventory/qc/mobile/qclog/${id}`, {}, {}).then((data) => {
         resolve(data)
-      }).catch(e => {console.log(e)})
+      }).catch(e => { console.log(e) })
     });
   }
 
   // 获取采购合同详情
   async getContractDetail(sscId: Number): Promise<any> {
     return new Promise((resolve, reject) => {
-      this.api.request('get',`${environment.APP_SERVE_URL}/production/purchase/mobile/${sscId}`,{},{}).then((data)=>{
+      this.api.request('get', `${environment.APP_SERVE_URL}/production/purchase/mobile/${sscId}`, {}, {}).then((data) => {
         resolve(data)
-      }).catch(e => {console.log(e)})
+      }).catch(e => { console.log(e) })
     });
   }
 
   // 保存采购合同qa日志
   async contractQAlog(form: any): Promise<any> {
     return new Promise((resolve, reject) => {
-      this.api.request('post',`${environment.APP_SERVE_URL}/inventory/qa/mobile/qalog`,form,{}, 'urlencoded').then((data)=>{
+      this.api.request('post', `${environment.APP_SERVE_URL}/inventory/qa/mobile/qalog`, form, {}, 'urlencoded').then((data) => {
         this.api.showToast('保存成功')
         resolve(data)
-      }).catch(e => {console.log(e)})
+      }).catch(e => { console.log(e) })
     });
   }
 
   // 获取采购合同QA日志
   async getQAlog(sscId: any, pId: any): Promise<any> {
     return new Promise((resolve, reject) => {
-      this.api.request('get',`${environment.APP_SERVE_URL}/inventory/qa/mobile/qalog/${sscId}/${pId}`,{},{}).then((data)=>{
+      this.api.request('get', `${environment.APP_SERVE_URL}/inventory/qa/mobile/qalog/${sscId}/${pId}`, {}, {}).then((data) => {
         resolve(data)
-      }).catch(e => {console.log(e)})
+      }).catch(e => { console.log(e) })
     });
   }
 
   // 获取采购合同QC日志
   async getQClog(sscId: any, pId: any): Promise<any> {
     return new Promise((resolve, reject) => {
-      this.api.request('get',`${environment.APP_SERVE_URL}/inventory/qc/mobile/qclog/${sscId}/${pId}`,{},{}).then((data)=>{
+      this.api.request('get', `${environment.APP_SERVE_URL}/inventory/qc/mobile/qclog/${sscId}/${pId}`, {}, {}).then((data) => {
         resolve(data)
-      }).catch(e => {console.log(e)})
+      }).catch(e => { console.log(e) })
     });
   }
 
   // 获取入库单列表
   async geteEnterStoreList(code: string, size: number): Promise<any> {
     return new Promise((resolve, reject) => {
-      this.api.request('get',`${environment.APP_SERVE_URL}/inventory/enterStore/mobile?code=${code}&size=${size}`,{},{}).then((data)=>{
+      this.api.request('get', `${environment.APP_SERVE_URL}/inventory/enterStore/mobile?code=${code}&size=${size}`, {}, {}).then((data) => {
         resolve(data)
-      }).catch(e => {console.log(e)})
+      }).catch(e => { console.log(e) })
     });
   }
 
   // 获取入库单详情
   async geteEnterStoreDetail(entergoodsid: string): Promise<any> {
     return new Promise((resolve, reject) => {
-      this.api.request('get',`${environment.APP_SERVE_URL}/inventory/enterStore/mobile/${entergoodsid}`,{},{}).then((data)=>{
+      this.api.request('get', `${environment.APP_SERVE_URL}/inventory/enterStore/mobile/${entergoodsid}`, {}, {}).then((data) => {
         resolve(data)
-      }).catch(e => {console.log(e)})
+      }).catch(e => { console.log(e) })
     });
   }
 
   // 获取入库详情
   async getStoreDetail(sscId: number, pId: number): Promise<any> {
     return new Promise((resolve, reject) => {
-      this.api.request('get',`${environment.APP_SERVE_URL}/inventory/enterStore/mobile/detail?sscId=${sscId}&pId=${pId}`,{},{}).then((data)=>{
+      this.api.request('get', `${environment.APP_SERVE_URL}/inventory/enterStore/mobile/detail?sscId=${sscId}&pId=${pId}`, {}, {}).then((data) => {
         resolve(data)
-      }).catch(e => {console.log(e)})
+      }).catch(e => { console.log(e) })
     });
   }
 
   // 查询入库申请单号
   async getAppStoreDetail(applyCode: any): Promise<any> {
     return new Promise((resolve, reject) => {
-      this.api.request('get',`${environment.APP_SERVE_URL}/inventory/enterStore/mobile/apply?applyCode=${applyCode}`,{},{}).then((data)=>{
+      this.api.request('get', `${environment.APP_SERVE_URL}/inventory/enterStore/mobile/apply?applyCode=${applyCode}`, {}, {}).then((data) => {
         resolve(data)
-      }).catch(e => {console.log(e)})
+      }).catch(e => { console.log(e) })
     });
   }
 
   // 获取仓库样品
   async getStoreSampleDetail(code: string): Promise<any> {
     return new Promise((resolve, reject) => {
-      this.api.request('get',`${environment.APP_SERVE_URL}/inventory/shelf/mobile/code?code=${code}`,{},{}).then((data)=>{
+      this.api.request('get', `${environment.APP_SERVE_URL}/inventory/shelf/mobile/code?code=${code}`, {}, {}).then((data) => {
         resolve(data)
-      }).catch(e => {console.log(e)})
+      }).catch(e => { console.log(e) })
     });
   }
 
   // 生成入库单
   async saveStoreDetail(list: any): Promise<any> {
     return new Promise((resolve, reject) => {
-      this.api.request('post',`${environment.APP_SERVE_URL}/inventory/enterStore/mobile/`,list,{}).then((data)=>{
+      this.api.request('post', `${environment.APP_SERVE_URL}/inventory/enterStore/mobile/`, list, {}).then((data) => {
         this.api.showToast(`保存成功,入库单号为${data['data']}`)
         resolve(data)
-      }).catch(e => {console.log(e)})
+      }).catch(e => { console.log(e) })
     });
   }
 
   // 获取货架列表
   async getStoreSampleList(size: number): Promise<any> {
     return new Promise((resolve, reject) => {
-      this.api.request('get',`${environment.APP_SERVE_URL}/inventory/shelf/mobile?size=${size}`,{},{}).then((data)=>{
+      this.api.request('get', `${environment.APP_SERVE_URL}/inventory/shelf/mobile?size=${size}`, {}, {}).then((data) => {
         resolve(data)
-      }).catch(e => {console.log(e)})
+      }).catch(e => { console.log(e) })
     });
   }
 
   // 货架借出销毁
   async changeShelf(list: object): Promise<any> {
     return new Promise((resolve, reject) => {
-      this.api.request('put',`${environment.APP_SERVE_URL}/inventory/shelf/mobile`,list,{}).then((data)=>{
+      this.api.request('put', `${environment.APP_SERVE_URL}/inventory/shelf/mobile`, list, {}).then((data) => {
         this.api.showToast('操作成功')
         resolve(data)
-      }).catch(e => {console.log(e)})
+      }).catch(e => { console.log(e) })
     });
   }
 
   // 货架借出
   async changeShelfLend(code: string): Promise<any> {
     return new Promise((resolve, reject) => {
-      this.api.request('put',`${environment.APP_SERVE_URL}/inventory/shelf/mobile/lend?code=${code}`,{},{}).then((data)=>{
+      this.api.request('put', `${environment.APP_SERVE_URL}/inventory/shelf/mobile/lend?code=${code}`, {}, {}).then((data) => {
         this.api.showToast('操作成功')
         resolve(data)
-      }).catch(e => {console.log(e)})
+      }).catch(e => { console.log(e) })
     });
   }
 
   // 货架销毁
   async changeShelfDestroy(code: string): Promise<any> {
     return new Promise((resolve, reject) => {
-      this.api.request('put',`${environment.APP_SERVE_URL}/inventory/shelf/mobile/destroy?code=${code}`,{},{}).then((data)=>{
+      this.api.request('put', `${environment.APP_SERVE_URL}/inventory/shelf/mobile/destroy?code=${code}`, {}, {}).then((data) => {
         this.api.showToast('操作成功')
         resolve(data)
-      }).catch(e => {console.log(e)})
+      }).catch(e => { console.log(e) })
     });
   }
 
   // 生成条形码
   async createBarCode(code: string): Promise<any> {
     return new Promise((resolve, reject) => {
-      this.api.request('get',`${environment.APP_SERVE_URL}/inventory/shelf/mobile/${code}`,{},{}).then((data)=>{
+      this.api.request('get', `${environment.APP_SERVE_URL}/inventory/shelf/mobile/${code}`, {}, {}).then((data) => {
         resolve(data)
-      }).catch(e => {console.log(e)})
+      }).catch(e => { console.log(e) })
     });
   }
 
   // 货架货号绑定
   async shelveBinding(list: Object): Promise<any> {
     return new Promise((resolve, reject) => {
-      this.api.request('post',`${environment.APP_SERVE_URL}/inventory/shelf/mobile/bind/sample`,list,{}).then((data)=>{
+      this.api.request('post', `${environment.APP_SERVE_URL}/inventory/shelf/mobile/bind/sample`, list, {}).then((data) => {
         this.api.showToast('绑定成功')
         resolve(data)
-      }).catch(e => {console.log(e)})
+      }).catch(e => { console.log(e) })
     });
   }
 
@@ -340,97 +340,97 @@ export class UserData {
   async getStorePendingList(form): Promise<any> {
     return new Promise((resolve, reject) => {
       let back_url = ''
-      for(let i in form) {
+      for (let i in form) {
         back_url += `&${i}=${form[i]}`
       }
-      back_url = back_url.substring(1,back_url.length)
-      this.api.request('get',`${environment.APP_SERVE_URL}/inventory/qc/mobile/Pending?${back_url}`,{},{}).then((data)=>{
+      back_url = back_url.substring(1, back_url.length)
+      this.api.request('get', `${environment.APP_SERVE_URL}/inventory/qc/mobile/Pending?${back_url}`, {}, {}).then((data) => {
         resolve(data['data'].records)
-      }).catch(e => {console.log(e)})
+      }).catch(e => { console.log(e) })
     });
   }
 
   // 获取待备样列表
   async getStoreSamplePendingList(current: number, size: number): Promise<any> {
     return new Promise((resolve, reject) => {
-      this.api.request('get',`${environment.APP_SERVE_URL}/inventory/shelf/mobile/pending?current=${current}&size=${size}`,{},{}).then((data)=>{
+      this.api.request('get', `${environment.APP_SERVE_URL}/inventory/shelf/mobile/pending?current=${current}&size=${size}`, {}, {}).then((data) => {
         resolve(data)
-      }).catch(e => {console.log(e)})
+      }).catch(e => { console.log(e) })
     });
   }
 
   // 查询样品
   async getStoreSampleByCode(code: string): Promise<any> {
     return new Promise((resolve, reject) => {
-      this.api.request('get',`${environment.APP_SERVE_URL}/inventory/shelf/mobile/code`,{ code: code },{}).then((data)=>{
+      this.api.request('get', `${environment.APP_SERVE_URL}/inventory/shelf/mobile/code`, { code: code }, {}).then((data) => {
         resolve(data)
-      }).catch(e => {console.log(e)})
+      }).catch(e => { console.log(e) })
     });
   }
 
   // 获取待抽箱列表
   async getWarehouseManagePendingList(current: number, size: number): Promise<any> {
     return new Promise((resolve, reject) => {
-      this.api.request('get',`${environment.APP_SERVE_URL}/inventory/warehouse/mobile/pending?current=${current}&size=${size}`,{},{}).then((data)=>{
+      this.api.request('get', `${environment.APP_SERVE_URL}/inventory/warehouse/mobile/pending?current=${current}&size=${size}`, {}, {}).then((data) => {
         resolve(data)
-      }).catch(e => {console.log(e)})
+      }).catch(e => { console.log(e) })
     });
   }
 
   // 抽箱完成
   async prepareGoods(sscId: any, pId: any) {
     return new Promise((resolve, reject) => {
-      this.api.request('put',`${environment.APP_SERVE_URL}/inventory/warehouse/mobile/prepare?sscId=${sscId}&pId=${pId}`,{},{}).then((data)=>{
+      this.api.request('put', `${environment.APP_SERVE_URL}/inventory/warehouse/mobile/prepare?sscId=${sscId}&pId=${pId}`, {}, {}).then((data) => {
         this.api.showToast('抽箱完成')
         resolve(data)
-      }).catch(e => {console.log(e)})
+      }).catch(e => { console.log(e) })
     });
   }
 
   // 获取QC验货初检报告列表
   async getQCList(form): Promise<any> {
     return new Promise((resolve, reject) => {
-      this.api.request('get',`${environment.APP_SERVE_URL}/inventory/qc/mobile?current=${form.current}&size=${form.size}&scpCode=${form.scpCode}&sscCode=${form.sscCode}&scpCustomercode=${form.scpCustomercode}&poCode=${form.poCode}`,{},{}).then((data)=>{
+      this.api.request('get', `${environment.APP_SERVE_URL}/inventory/qc/mobile?current=${form.current}&size=${form.size}&scpCode=${form.scpCode}&sscCode=${form.sscCode}&scpCustomercode=${form.scpCustomercode}&poCode=${form.poCode}`, {}, {}).then((data) => {
         resolve(data)
-      }).catch(e => {console.log(e)})
+      }).catch(e => { console.log(e) })
     });
   }
 
   // 获取QC验货初检报告列表
   async getQCDetailByPID(firstcheckrpid): Promise<any> {
     return new Promise((resolve, reject) => {
-      this.api.request('get',`${environment.APP_SERVE_URL}/inventory/qc/mobile?firstcheckrpid=${firstcheckrpid}`,{},{}).then((data)=>{
+      this.api.request('get', `${environment.APP_SERVE_URL}/inventory/qc/mobile?firstcheckrpid=${firstcheckrpid}`, {}, {}).then((data) => {
         resolve(data['data'].records)
-      }).catch(e => {console.log(e)})
+      }).catch(e => { console.log(e) })
     });
   }
 
   // qc驳回样品准备
   async rejectSample(sscId: any, pId: any) {
     return new Promise((resolve, reject) => {
-      this.api.request('put',`${environment.APP_SERVE_URL}/inventory/qc/mobile/rejectSample?sscId=${sscId}&pId=${pId}`,{},{}).then((data)=>{
+      this.api.request('put', `${environment.APP_SERVE_URL}/inventory/qc/mobile/rejectSample?sscId=${sscId}&pId=${pId}`, {}, {}).then((data) => {
         this.api.showToast('驳回成功')
         resolve(data)
-      }).catch(e => {console.log(e)})
+      }).catch(e => { console.log(e) })
     });
   }
 
   // qc驳回仓库准备
   async rejectWarehouse(sscId: any, pId: any) {
     return new Promise((resolve, reject) => {
-      this.api.request('put',`${environment.APP_SERVE_URL}/inventory/qc/mobile/rejectWarehouse?sscId=${sscId}&pId=${pId}`,{},{}).then((data)=>{
+      this.api.request('put', `${environment.APP_SERVE_URL}/inventory/qc/mobile/rejectWarehouse?sscId=${sscId}&pId=${pId}`, {}, {}).then((data) => {
         this.api.showToast('驳回成功')
         resolve(data)
-      }).catch(e => {console.log(e)})
+      }).catch(e => { console.log(e) })
     });
   }
 
   // 扫描条形码获取QC验货初检报告详情
   async getQCDetail(sscId: number, pId: number): Promise<any> {
     return new Promise((resolve, reject) => {
-      this.api.request('get',`${environment.APP_SERVE_URL}/inventory/qc/mobile/detail?sscId=${sscId}&pId=${pId}`,{},{}).then((data)=>{
+      this.api.request('get', `${environment.APP_SERVE_URL}/inventory/qc/mobile/detail?sscId=${sscId}&pId=${pId}`, {}, {}).then((data) => {
         resolve(data['data'])
-      }).catch(e => {console.log(e)})
+      }).catch(e => { console.log(e) })
     });
   }
 
@@ -438,48 +438,47 @@ export class UserData {
   // 生成QC验货初检报告
   async createQC(form: any): Promise<any> {
     return new Promise((resolve, reject) => {
-      this.api.request('post',`${environment.APP_SERVE_URL}/inventory/qc/mobile`,form,{}).then((data)=>{
+      this.api.request('post', `${environment.APP_SERVE_URL}/inventory/qc/mobile`, form, {}).then((data) => {
         this.api.showToast(`生成成功,初检报告编号${data['data']}`)
         resolve(data)
-      }).catch(e => {console.log(e)})
+      }).catch(e => { console.log(e) })
     })
   }
 
   // 添加qc日志
   async addQClog(form: any): Promise<any> {
-    this.nativeHttp.setDataSerializer('urlencoded');
     return new Promise((resolve, reject) => {
-      this.api.request('post',`${environment.APP_SERVE_URL}/inventory/qc/mobile/qclog`,form,{}).then((data)=>{
+      this.api.request('post', `${environment.APP_SERVE_URL}/inventory/qc/mobile/qclog`, form, {}, 'urlencoded').then((data) => {
         this.api.showToast('添加qc日志成功')
         resolve(data)
-      }).catch(e => {console.log(e)})
+      }).catch(e => { console.log(e) })
     });
   }
 
   // 获取陪验列表
-  async getInspectionList(poCode,scCode): Promise<any> {
+  async getInspectionList(poCode, scCode): Promise<any> {
     return new Promise((resolve, reject) => {
-      if(poCode===undefined||poCode==='undefined') {
+      if (poCode === undefined || poCode === 'undefined') {
         poCode = ''
-      } 
-      if(scCode===undefined||scCode==='undefined') {
+      }
+      if (scCode === undefined || scCode === 'undefined') {
         scCode = ''
-      } 
-      console.log(`${environment.APP_SERVE_URL}/inventory/isnspection/page?poCode=${poCode}&scCode=${scCode}`)
-      this.api.request('get',`${environment.APP_SERVE_URL}/inventory/isnspection/page?poCode=${poCode}&scCode=${scCode}`,{},{}).then((data)=>{
+      }
+      this.api.request('get', `${environment.APP_SERVE_URL}/inventory/isnspection/page?poCode=${poCode}&scCode=${scCode}`, {}, {}).then((data) => {
         resolve(data['data'].records)
-      }).catch(e => {console.log(e)})
+      }).catch(e => { console.log(e) })
     });
   }
 
   // 陪验员上传图片
   async inspectionUpload(form: any): Promise<any> {
-    this.nativeHttp.setDataSerializer('urlencoded');
     return new Promise((resolve, reject) => {
-      this.api.request('post',`${environment.APP_SERVE_URL}/inventory/isnspection/mobile/picture`,form,{}).then((data)=>{
+      this.api.request('post', `${environment.APP_SERVE_URL}/inventory/isnspection/mobile/picture`, form, {}, 'urlencoded').then((data) => {
         this.api.showToast('上传成功')
         resolve(data)
-      }).catch(e => {console.log(e)})
+      }).catch(e => {
+        console.log('失败')
+      })
     });
   }