diff --git a/pages/Material/hw-check.vue b/pages/Material/hw-check.vue index e42f006..ee57469 100644 --- a/pages/Material/hw-check.vue +++ b/pages/Material/hw-check.vue @@ -123,7 +123,7 @@ } try { let res = await materialBoxInventoryConfirm(this.materialData) - if (res.code === '200') { + if (res) { uni.showToast({ title: res.message, icon: 'none' @@ -133,13 +133,8 @@ uni.navigateTo({ url: '/pages/Material/dlx-pan-store?title=大料箱盘库' }) - } else { - uni.showToast({ - title: res.message, - icon: 'none' - }) - this.disabled = false } + this.disabled = false } catch (e) { this.disabled = false } diff --git a/pages/Material/hw-out-store.vue b/pages/Material/hw-out-store.vue index 850d105..d451608 100644 --- a/pages/Material/hw-out-store.vue +++ b/pages/Material/hw-out-store.vue @@ -119,6 +119,8 @@ clearUp () { this.val1 = '' this.val2 = '' + this.kcqty = '' + this.materialData = {} this.disabled = false }, handleChange (e) { @@ -139,7 +141,7 @@ } try { let res = await materialBoxOutConfirm(this.materialData.iostorinvdis_id, this.materialData.storagevehicle_code, this.materialData.struct_code, this.val2, this.materialData.plan_qty) - if (res.code === '200') { + if (res) { uni.showToast({ title: res.message, icon: 'none' @@ -149,13 +151,8 @@ uni.navigateTo({ url: '/pages/Material/dlx-out-store?title=大料箱出库' }) - } else { - uni.showToast({ - title: res.message, - icon: 'none' - }) - this.disabled = false } + this.disabled = false } catch (e) { this.disabled = false } diff --git a/pages/Material/kzj-in-store.vue b/pages/Material/kzj-in-store.vue index 059cb0e..3d76ae5 100644 --- a/pages/Material/kzj-in-store.vue +++ b/pages/Material/kzj-in-store.vue @@ -96,19 +96,13 @@ } try { let res = await vehicleIn(this.val2, this.val1, this.index) - if (res.code === '200') { + if (res) { uni.showToast({ title: res.message, icon: 'none' }) - this.clearUp() - } else { - uni.showToast({ - title: res.message, - icon: 'none' - }) - this.disabled = false } + this.clearUp() } catch (e) { this.disabled = false } diff --git a/pages/Material/kzj-out-store.vue b/pages/Material/kzj-out-store.vue index ceb65aa..bd97c30 100644 --- a/pages/Material/kzj-out-store.vue +++ b/pages/Material/kzj-out-store.vue @@ -124,19 +124,13 @@ } try { let res = await vehicleOut(this.qty, this.val2, this.index, this.index2) - if (res.code === '200') { + if (res) { uni.showToast({ title: res.message, icon: 'none' }) - this.clearUp() - } else { - uni.showToast({ - title: res.message, - icon: 'none' - }) - this.disabled = false } + this.clearUp() } catch (e) { this.disabled = false } diff --git a/pages/Material/mater-in-store.vue b/pages/Material/mater-in-store.vue index 79394d1..785958f 100644 --- a/pages/Material/mater-in-store.vue +++ b/pages/Material/mater-in-store.vue @@ -105,6 +105,8 @@ }, onLoad (options) { this.title = options.title + }, + created () { this._largeMaterialBoxgetType() }, methods: { diff --git a/pages/Material/mater-save.vue b/pages/Material/mater-save.vue index c0a6694..721f179 100644 --- a/pages/Material/mater-save.vue +++ b/pages/Material/mater-save.vue @@ -161,7 +161,7 @@ try { this.pkObj.material_qty = this.qty let res = await materialInConfirm(this.fobj.bill_type, this.fobj.struct_code, this.fobj.storagevehicle_code, this.tableData, this.pkObj) - if (res.code === '200') { + if (res) { uni.showToast({ title: res.message, icon: 'none' @@ -172,13 +172,8 @@ uni.navigateTo({ url: '/pages/Material/mater-in-store?title=物料入库' }) - } else { - uni.showToast({ - title: res.message, - icon: 'none' - }) - this.disabled = false } + this.disabled = false } catch (e) { this.disabled = false } diff --git a/pages/Material/tuiku-confirm.vue b/pages/Material/tuiku-confirm.vue index 8215c82..7246552 100644 --- a/pages/Material/tuiku-confirm.vue +++ b/pages/Material/tuiku-confirm.vue @@ -74,7 +74,8 @@