diff --git a/pages/WarehouseManage/InStoreConfirm.vue b/pages/WarehouseManage/InStoreConfirm.vue index d77b3df..33b840e 100644 --- a/pages/WarehouseManage/InStoreConfirm.vue +++ b/pages/WarehouseManage/InStoreConfirm.vue @@ -60,7 +60,7 @@ - + @@ -102,7 +102,7 @@ /** 确认 */ async _stConfirm () { this.disabled = true - if (this.dataList.length === 0) { + if (!this.val1 || this.dataList.length === 0) { this.disabled = false return } diff --git a/pages/WarehouseManage/ReturngoodsInStore.vue b/pages/WarehouseManage/ReturngoodsInStore.vue index 2db48c4..4c1a60a 100644 --- a/pages/WarehouseManage/ReturngoodsInStore.vue +++ b/pages/WarehouseManage/ReturngoodsInStore.vue @@ -53,7 +53,7 @@ - + {{e.package_box_sn}} {{e.container_name}} {{e.product_name}} @@ -66,7 +66,7 @@ - + @@ -88,8 +88,6 @@ val3: '', isV: '0', dataList: [], - pkId: '', - pkObj: {}, disabled: false }; }, @@ -109,14 +107,12 @@ /** 确认 */ async _stConfirm () { this.disabled = true - if (!this.pkId) { + if (!this.val1 || this.dataList.length === 0) { this.disabled = false return } try { - let res = await stConfirm(this.pkObj, this.val2, '3', this.isV, this.val3) - this.pkId = '' - this.pkObj = {} + let res = await stConfirm(this.dataList, this.val2, '3', this.isV, this.val3) this.disabled = false this._boxQuery(this.val1) uni.showToast({ @@ -126,10 +122,6 @@ } catch (e) { this.disabled = false } - }, - toCheck (e) { - this.pkId = this.pkId === e.package_box_sn ? '' : e.package_box_sn - this.pkObj = this.pkId === e.package_box_sn ? e : {} } } } diff --git a/pages/WarehouseManage/ScrapInStore.vue b/pages/WarehouseManage/ScrapInStore.vue index 5fb6df1..e3bebea 100644 --- a/pages/WarehouseManage/ScrapInStore.vue +++ b/pages/WarehouseManage/ScrapInStore.vue @@ -47,7 +47,7 @@ - + {{e.package_box_sn}} {{e.container_name}} {{e.product_name}} @@ -60,7 +60,7 @@ - + @@ -81,8 +81,6 @@ val2: '', isV: '0', dataList: [], - pkId: '', - pkObj: {}, disabled: false }; }, @@ -102,14 +100,12 @@ /** 确认 */ async _stConfirm () { this.disabled = true - if (!this.pkId) { + if (!this.val1 || this.dataList.length === 0) { this.disabled = false return } try { - let res = await stConfirm(this.pkObj, this.val2, '1', this.isV) - this.pkId = '' - this.pkObj = {} + let res = await stConfirm(this.dataList, this.val2, '1', this.isV) this.disabled = false this._boxQuery(this.val1) uni.showToast({ @@ -119,10 +115,6 @@ } catch (e) { this.disabled = false } - }, - toCheck (e) { - this.pkId = this.pkId === e.package_box_sn ? '' : e.package_box_sn - this.pkObj = this.pkId === e.package_box_sn ? e : {} } } }