|
@@ -24,6 +24,8 @@ export class StoreSamplePage implements OnInit {
|
|
|
lendName: ''
|
|
|
}]
|
|
|
public code = ''
|
|
|
+ public autoLend:boolean = false // 自动借出
|
|
|
+ public autoDestroy:boolean = false // 自动销毁
|
|
|
size: number = 10
|
|
|
total = 0
|
|
|
constructor(public userData: UserData, public commonService: commonService, private router: Router, private storage: Storage) { }
|
|
@@ -39,6 +41,15 @@ export class StoreSamplePage implements OnInit {
|
|
|
this.commonService.fullScreenImg(form)
|
|
|
}
|
|
|
|
|
|
+ async autoManage() {
|
|
|
+ if(this.autoLend) {
|
|
|
+ await this.userData.changeShelfLend(this.code)
|
|
|
+ }
|
|
|
+ if(this.autoDestroy) {
|
|
|
+ await this.userData.changeShelfDestroy(this.code)
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
async doRefresh(event) {
|
|
|
if (this.code) {
|
|
|
let data = await this.userData.getStoreSampleByCode(this.code)
|