diff --git a/pages/management/check.vue b/pages/management/check.vue index a58f491..d036bc7 100644 --- a/pages/management/check.vue +++ b/pages/management/check.vue @@ -166,17 +166,17 @@ // 一级表格接口 async _stIvtCheckdtlCheckPage () { let res = await stIvtCheckdtlCheckPage(this.val1, this.value1, this.queryParams1.pageNum + '', this.queryParams1.pageSize + '') - if (res.code === 1) { - res.result.map(el => { + if (res.code === 200) { + res.content.map(el => { this.$set(el, 'checked', false) this.$set(el, 'subData', []) this.$set(el, 'subAllChecked', false) this.$set(el, 'subOneChecked', false) }) - this.dataList = [...res.result] + this.dataList = [...res.content] this.totalCount1 = Number(res.totalElements) - this.queryParams1.pageSize = Number(res.pageSize) - this.queryParams1.pageNum = Number(res.pageNum) + this.queryParams1.pageSize = Number(this.queryParams1.pageSize + '') + this.queryParams1.pageNum = Number(this.queryParams1.pageNum + '') } else { uni.showToast({ title: res.desc, @@ -204,21 +204,14 @@ // 二级表格接口 async _checkDtlByCheckCode (e) { let res = await checkDtlByCheckCode(e.id) - if (res.code === 1) { - res.result.map(el => { - this.$set(el, 'subChecked', false) - }) - this.dataList.map(el => { - if (el.djid === e.djid) { - el.subData = [...res.result] - } - }) - } else { - uni.showToast({ - title: res.desc, - icon: 'none' - }) - } + res.map(el => { + this.$set(el, 'subChecked', false) + }) + this.dataList.map(el => { + if (el.djid === e.djid) { + el.subData = [...res] + } + }) }, // 二级表格全选 toSubAllCheckbox (e) { diff --git a/pages/management/move-inventory.vue b/pages/management/move-inventory.vue index 64ee9f6..905042f 100644 --- a/pages/management/move-inventory.vue +++ b/pages/management/move-inventory.vue @@ -163,20 +163,20 @@ // 一级表格接口 async _stIvtMoveinvMovePage () { let res = await stIvtMoveinvMovePage(this.val1, this.value1, this.queryParams1.pageNum + '', this.queryParams1.pageSize + '') - if (res.code === 1) { - res.result.map(el => { + if (res.code === 200) { + res.content.map(el => { this.$set(el, 'checked', false) this.$set(el, 'subData', []) this.$set(el, 'subAllChecked', false) this.$set(el, 'subOneChecked', false) }) - this.dataList = [...res.result] + this.dataList = [...res.content] this.totalCount1 = Number(res.totalElements) - this.queryParams1.pageSize = Number(res.pageSize) - this.queryParams1.pageNum = Number(res.pageNum) + this.queryParams1.pageSize = Number(this.queryParams1.pageSize + '') + this.queryParams1.pageNum = Number(this.queryParams1.pageNum + '') } else { uni.showToast({ - title: res.desc, + title: res.msg, icon: 'none' }) } @@ -201,21 +201,14 @@ // 二级表格接口 async _moveDtlByMoveId (e) { let res = await moveDtlByMoveId(e.id) - if (res.code === 1) { - res.result.map(el => { - this.$set(el, 'subChecked', false) - }) - this.dataList.map(el => { - if (el.djid === e.djid) { - el.subData = [...res.result] - } - }) - } else { - uni.showToast({ - title: res.desc, - icon: 'none' - }) - } + res.map(el => { + this.$set(el, 'subChecked', false) + }) + this.dataList.map(el => { + if (el.djid === e.djid) { + el.subData = [...res] + } + }) }, // 二级表格全选 toSubAllCheckbox (e) { diff --git a/utils/mork2.js b/utils/mork2.js index 178b212..75f7f80 100644 --- a/utils/mork2.js +++ b/utils/mork2.js @@ -2277,11 +2277,8 @@ export const warehouseAssignLocation = () => { export const stIvtMoveinvMovePage = () => { let res = { - "pageNum": 1, - "pageSize": 10, - "totalPage": 109, "totalElements": 1084, - "result": [ + "content": [ { "id": "0101", "input_id": "btAAAAW8Wd5QCrde" @@ -2291,19 +2288,14 @@ export const stIvtMoveinvMovePage = () => { "input_id": "btAAAAW8WdpQCrde" } ], - "code": 1, - "desc": "查询成功" + "code": 200, + "msg": "查询成功" } return res } export const moveDtlByMoveId = () => { - let res = { - "pageNum": 1, - "pageSize": 10, - "totalPage": 109, - "totalElements": 1084, - "result": [ + let res = [ { "id": "0201", "material_code": "btAAAAW8Wd5QCrde", @@ -2316,10 +2308,7 @@ export const moveDtlByMoveId = () => { "qty": "1", "turnin_struct_code": '090910' } - ], - "code": 1, - "desc": "查询成功" - } + ] return res } @@ -2388,11 +2377,8 @@ export const allocationBillDetail = () => { } export const stIvtCheckdtlCheckPage = () => { let res = { - "pageNum": 1, - "pageSize": 10, - "totalPage": 109, - "totalElements": 1084, - "result": [ + "totalElements": 2, + "content": [ { "id": "0201", "material_code": "btAAAAW8Wd5QCrde", @@ -2404,19 +2390,14 @@ export const stIvtCheckdtlCheckPage = () => { "qty": "1" } ], - "code": 1, - "desc": "查询成功" + "code": 200, + "msg": "查询成功" } return res } export const checkDtlByCheckCode = () => { - let res = { - "pageNum": 1, - "pageSize": 10, - "totalPage": 109, - "totalElements": 1084, - "result": [ + let res = [ { "id": "0201", "material_code": "btAAAAW8Wd5QCrde", @@ -2427,9 +2408,6 @@ export const checkDtlByCheckCode = () => { "material_code": "btAAAAW8WdpQCrde", "qty": "1" } - ], - "code": 1, - "desc": "查询成功" - } - return res + ] + return res } \ No newline at end of file