|
@@ -755,6 +755,7 @@ export class UserData {
|
|
|
headers)).pipe(
|
|
|
finalize(() => loading.dismiss())
|
|
|
).subscribe(async data => {
|
|
|
+ console.log(data)
|
|
|
if (data.data === null || JSON.parse(data.data).data.records == null) {
|
|
|
const toast = await this.toastCtrl.create({
|
|
|
message: '无数据',
|
|
@@ -763,8 +764,9 @@ export class UserData {
|
|
|
});
|
|
|
await toast.present();
|
|
|
resolve([]);
|
|
|
+ } else {
|
|
|
+ resolve(JSON.parse(data.data).data.records);
|
|
|
}
|
|
|
- resolve(JSON.parse(data.data).data.records);
|
|
|
}, async err => {
|
|
|
console.log(err);
|
|
|
const toast = await this.toastCtrl.create({
|
|
@@ -777,14 +779,14 @@ export class UserData {
|
|
|
});
|
|
|
}
|
|
|
|
|
|
- prepareGoods(sscId: number, pId: number) {
|
|
|
+ async prepareGoods(sscId: any, pId: any) {
|
|
|
const token = await this.getToken();
|
|
|
const loading = await this.loadingCtrl.create();
|
|
|
await loading.present();
|
|
|
this.nativeHttp.setDataSerializer('json');
|
|
|
const headers = { Authorization: `Bearer ${token}`, 'Content-Type': 'application/json;charset=UTF-8' };
|
|
|
return new Promise((resolve, reject) => {
|
|
|
- from(this.nativeHttp.put(`http://dev.sgsino.cn/inventory/warehouse/mobile/?${sscId}&${pId}`, {},
|
|
|
+ from(this.nativeHttp.put(`http://dev.sgsino.cn/inventory/warehouse/mobile/prepare?sscId=${sscId}&pId=${pId}`, {},
|
|
|
headers)).pipe(
|
|
|
finalize(() => loading.dismiss())
|
|
|
).subscribe(async data => {
|
|
@@ -796,7 +798,7 @@ export class UserData {
|
|
|
}
|
|
|
const alert = await this.alertController.create({
|
|
|
// header: 'Confirm!',
|
|
|
- message,
|
|
|
+ message:message,
|
|
|
buttons: [
|
|
|
{
|
|
|
text: '确定',
|