diff --git a/src/views/modules/automatedWarehouse/palletMergeQuery.vue b/src/views/modules/automatedWarehouse/palletMergeQuery.vue
index a741292..31c910c 100644
--- a/src/views/modules/automatedWarehouse/palletMergeQuery.vue
+++ b/src/views/modules/automatedWarehouse/palletMergeQuery.vue
@@ -18,6 +18,15 @@
+
+
+
+
+
查询
@@ -74,6 +83,17 @@
+
+
+
+
@@ -93,9 +113,16 @@ export default {
submitLoading: false,
selectedRows: [],
palletTypeOptions: [],
+ // 分页参数 - rqrq
+ pageIndex: 1,
+ pageSize: 20,
+ totalPage: 0,
searchData: {
site: this.$store.state.user.site || '55',
- palletType: ''
+ palletType: '',
+ maxPositionCount: null, // 最大已用数量 - rqrq
+ page: 1,
+ limit: 20
},
// 表格列配置 - rqrq
columnList: [
@@ -236,6 +263,8 @@ export default {
handlePalletTypeChange() {
this.dataList = []
this.selectedRows = []
+ this.totalPage = 0
+ this.pageIndex = 1
if (this.$refs.mainTable) {
this.$refs.mainTable.clearSelection()
}
@@ -254,10 +283,24 @@ export default {
this.$refs.mainTable.clearSelection()
}
+ // 设置分页参数 - rqrq
+ this.searchData.page = this.pageIndex
+ this.searchData.limit = this.pageSize
+
searchPalletMergeList(this.searchData).then(({ data }) => {
this.dataListLoading = false
if (data && data.code == 0) {
- this.dataList = data.rows || []
+ // 支持分页返回格式 - rqrq
+ if (data.page) {
+ this.dataList = data.page.list || []
+ this.pageIndex = data.page.currPage
+ this.pageSize = data.page.pageSize
+ this.totalPage = data.page.totalCount
+ } else {
+ // 兼容旧的非分页返回格式 - rqrq
+ this.dataList = data.rows || []
+ this.totalPage = this.dataList.length
+ }
if (this.dataList.length === 0) {
this.$message({
message: '没有找到需要合托的托盘',
@@ -267,14 +310,27 @@ export default {
}
} else {
this.dataList = []
+ this.totalPage = 0
this.$alert(data.msg || '查询失败', '错误', { confirmButtonText: '确定' })
}
}).catch(() => {
this.dataListLoading = false
this.dataList = []
+ this.totalPage = 0
this.$message.error('查询失败')
})
},
+ // 每页条数变化 - rqrq
+ sizeChangeHandle(val) {
+ this.pageSize = val
+ this.pageIndex = 1
+ this.searchTable()
+ },
+ // 当前页变化 - rqrq
+ currentChangeHandle(val) {
+ this.pageIndex = val
+ this.searchTable()
+ },
// 行点击选中/取消选中 - rqrq
handleRowClick(row) {
this.$refs.mainTable.toggleRowSelection(row)
@@ -341,4 +397,3 @@ export default {
margin-right: 4px;
}
-
diff --git a/src/views/modules/automatedWarehouse/sopManagement.vue b/src/views/modules/automatedWarehouse/sopManagement.vue
index b62c81a..66f8367 100644
--- a/src/views/modules/automatedWarehouse/sopManagement.vue
+++ b/src/views/modules/automatedWarehouse/sopManagement.vue
@@ -4,10 +4,10 @@
-
-
-
@@ -50,31 +50,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -86,14 +61,14 @@
-
+
{{ currentUrlConfig.platform }}
-
+
{{ currentUrlConfig.moduleName }} - {{ currentUrlConfig.pageName }}
@@ -108,7 +83,7 @@
highlight-current-row
v-loading="dataListLoading"
style="width: 100%;">
-
+
{{ scope.row.functionButton }}
@@ -117,33 +92,27 @@
-
+
{{ scope.row.errorMessage }}
-
-
-
- {{ scope.row.errorType === 'BACKEND' ? '后端' : '前端' }}
-
-
-
+
+
+
+
+
+
+
-
-
- {{ scope.row.errorSource }}
-
-
-
-
+
{{ scope.row.defaultSolution || '-' }}
-
+
{{ scope.row.userSolution || '-' }}
@@ -175,7 +144,7 @@
:close-on-click-modal="false"
v-drag
width="800px">
-
+
@@ -201,7 +170,7 @@
-
+
@@ -231,7 +200,6 @@ import {
getModuleListByPlatform,
getPageListByPlatformAndModule,
getErrorDetailList,
- getFunctionButtonsByUrl,
updateErrorDetail
} from "@/api/sys/sop.js"
@@ -245,14 +213,11 @@ export default {
platformOptions: [],
moduleOptions: [],
pageOptions: [],
- buttonOptions: [],
currentUrlConfig: null,
queryData: {
platform: '',
moduleName: '',
url: '',
- functionButton: '',
- searchErrorType: '',
searchErrorMessage: '',
page: 1,
limit: 20
@@ -274,57 +239,91 @@ export default {
}
},
mounted() {
- this.height = window.innerHeight - 320
+ // 使用nextTick确保DOM渲染完成后设置高度 - rqrq
+ this.$nextTick(() => {
+ this.height = window.innerHeight - 220
+ })
this.loadPlatformOptions()
},
methods: {
+ // 加载平台列表,默认选中PC - rqrq
loadPlatformOptions() {
getPlatformList({}).then(({ data }) => {
if (data && data.code == 0) {
this.platformOptions = data.rows || []
+ // 默认选中PC,如果没有PC则选中第一个 - rqrq
+ if (this.platformOptions.includes('PC')) {
+ this.queryData.platform = 'PC'
+ } else if (this.platformOptions.length > 0) {
+ this.queryData.platform = this.platformOptions[0]
+ }
+ // 加载模块列表
+ if (this.queryData.platform) {
+ this.loadModuleOptions(this.queryData.platform, true)
+ }
}
})
},
+ // 加载模块列表 - rqrq
+ loadModuleOptions(platform, selectFirst) {
+ getModuleListByPlatform({ platform: platform }).then(({ data }) => {
+ if (data && data.code == 0) {
+ this.moduleOptions = data.rows || []
+ // 默认选中第一个模块 - rqrq
+ if (selectFirst && this.moduleOptions.length > 0) {
+ this.queryData.moduleName = this.moduleOptions[0]
+ this.loadPageOptions(platform, this.queryData.moduleName, true)
+ }
+ }
+ })
+ },
+ // 加载功能页面列表 - rqrq
+ loadPageOptions(platform, moduleName, selectFirst) {
+ getPageListByPlatformAndModule({
+ platform: platform,
+ moduleName: moduleName
+ }).then(({ data }) => {
+ if (data && data.code == 0) {
+ this.pageOptions = data.rows || []
+ // 默认选中第一个功能页面 - rqrq
+ if (selectFirst && this.pageOptions.length > 0) {
+ this.queryData.url = this.pageOptions[0].url
+ this.currentUrlConfig = this.pageOptions[0]
+ this.getDataList()
+ }
+ }
+ })
+ },
+ // 平台变化处理 - rqrq
handlePlatformChange(platform) {
this.queryData.moduleName = ''
this.queryData.url = ''
this.moduleOptions = []
this.pageOptions = []
- this.buttonOptions = []
this.currentUrlConfig = null
this.dataList = []
this.totalPage = 0
if (platform) {
- getModuleListByPlatform({ platform: platform }).then(({ data }) => {
- if (data && data.code == 0) {
- this.moduleOptions = data.rows || []
- }
- })
+ // 加载模块列表并默认选中第一个 - rqrq
+ this.loadModuleOptions(platform, true)
}
},
+ // 模块变化处理 - rqrq
handleModuleChange(moduleName) {
this.queryData.url = ''
this.pageOptions = []
- this.buttonOptions = []
this.currentUrlConfig = null
this.dataList = []
this.totalPage = 0
if (moduleName) {
- getPageListByPlatformAndModule({
- platform: this.queryData.platform,
- moduleName: moduleName
- }).then(({ data }) => {
- if (data && data.code == 0) {
- this.pageOptions = data.rows || []
- }
- })
+ // 加载功能页面列表并默认选中第一个 - rqrq
+ this.loadPageOptions(this.queryData.platform, moduleName, true)
}
},
+ // 功能页面变化处理 - rqrq
handlePageChange(url) {
- this.buttonOptions = []
if (url) {
this.currentUrlConfig = this.pageOptions.find(item => item.url === url)
- this.loadButtonOptions(url)
this.getDataList()
} else {
this.currentUrlConfig = null
@@ -332,13 +331,7 @@ export default {
this.totalPage = 0
}
},
- loadButtonOptions(url) {
- getFunctionButtonsByUrl({ url: url }).then(({ data }) => {
- if (data && data.code == 0) {
- this.buttonOptions = data.rows || []
- }
- })
- },
+ // 查询数据 - rqrq
getDataList() {
if (!this.queryData.url) {
this.$message.warning('请先选择功能页面')
@@ -362,25 +355,13 @@ export default {
this.$alert('查询失败', '错误', { confirmButtonText: '确定' })
})
},
+ // 重置查询 - rqrq
resetQuery() {
- this.queryData = {
- platform: '',
- moduleName: '',
- url: '',
- functionButton: '',
- searchErrorType: '',
- searchErrorMessage: '',
- page: 1,
- limit: 20
- }
- this.moduleOptions = []
- this.pageOptions = []
- this.buttonOptions = []
- this.currentUrlConfig = null
- this.dataList = []
- this.totalPage = 0
+ this.queryData.searchErrorMessage = ''
this.pageIndex = 1
+ this.getDataList()
},
+ // 编辑处理方式 - rqrq
editSolution(row) {
this.editForm = {
url: row.url,
@@ -394,6 +375,7 @@ export default {
}
this.editDialogVisible = true
},
+ // 保存处理方式 - rqrq
saveSolution() {
this.saveLoading = true
const updateData = {
@@ -420,11 +402,13 @@ export default {
this.saveLoading = false
})
},
+ // 分页 - 每页条数变化 - rqrq
sizeChangeHandle(val) {
this.pageSize = val
this.pageIndex = 1
this.getDataList()
},
+ // 分页 - 当前页变化 - rqrq
currentChangeHandle(val) {
this.pageIndex = val
this.getDataList()