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