From deb2a67c1a9824b288ce4a7a228347ffd60964fe Mon Sep 17 00:00:00 2001 From: k94314517 <8417338+k94314517@user.noreply.gitee.com> Date: 星期二, 24 九月 2024 18:25:08 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- admin/src/views/statistics/platformRecord.vue | 147 +++++++++++++++++++++++++----------------------- 1 files changed, 76 insertions(+), 71 deletions(-) diff --git a/admin/src/views/statistics/platformRecord.vue b/admin/src/views/statistics/platformRecord.vue index 4053fb3..a7edbbe 100644 --- a/admin/src/views/statistics/platformRecord.vue +++ b/admin/src/views/statistics/platformRecord.vue @@ -1,82 +1,45 @@ <template> <div class="main_app"> - <QueryForm - v-model="filters" - :query-form-config="queryFormConfig" - @handleQuery="getList(1)" - @clear="clear" - /> + <QueryForm v-model="filters" :query-form-config="queryFormConfig" @handleQuery="getList(1)" @clear="clear" /> <el-table v-loading="loading" :data="list" stripe> - <el-table-column - prop="name" - label="鏈堝彴鍚嶇О" - min-width="100" - show-overflow-tooltip - /> - <el-table-column - prop="name" - label="鏈堝彴缁�" - min-width="100" - show-overflow-tooltip - /> - <el-table-column - prop="name" - label="杞﹀墠鐗岀収鍙�" - min-width="100" - show-overflow-tooltip - /> - <el-table-column - prop="name" - label="杞﹀悗鐗岀収鍙�" - min-width="100" - show-overflow-tooltip - /> - <el-table-column - prop="name" - label="浣滀笟寮�濮�" - min-width="100" - show-overflow-tooltip - /> - <el-table-column - prop="name" - label="浣滀笟缁撴潫" - min-width="100" - show-overflow-tooltip - /> - <el-table-column - prop="name" - label="浣滀笟鏃堕暱" - min-width="100" - show-overflow-tooltip - /><el-table-column - prop="name" - label="杩愯緭鍗曞彿/鍚堝悓鍙�" - min-width="100" - show-overflow-tooltip - /> + <el-table-column prop="platformName" label="鏈堝彴鍚嶇О" min-width="100" show-overflow-tooltip /> + <el-table-column prop="platformGroupName" label="鏈堝彴缁�" min-width="100" show-overflow-tooltip /> + <el-table-column prop="carCodeFront" label="杞﹀墠鐗岀収鍙�" min-width="100" show-overflow-tooltip /> + <el-table-column prop="carCodeBack" label="杞﹀悗鐗岀収鍙�" min-width="100" show-overflow-tooltip /> + <el-table-column prop="startDate" label="浣滀笟寮�濮�" min-width="100" show-overflow-tooltip /> + <el-table-column prop="doneDate" label="浣滀笟缁撴潫" min-width="100" show-overflow-tooltip /> + <el-table-column prop="workTime" label="浣滀笟鏃堕暱" min-width="100" show-overflow-tooltip /><el-table-column prop="name" + label="杩愯緭鍗曞彿/鍚堝悓鍙�" min-width="100" show-overflow-tooltip> + <template v-slot="scope"> + <span>{{ scope.row.billCode || scope.row.contractNum }}</span> + </template> + </el-table-column> </el-table> - <pagination - @size-change="handleSizeChange" - @current-change="getList" - :pagination="pagination" - /> + <div class="mt20"> + <Pagination @size-change="handleSizeChange" @current-change="getList" :pagination="pagination" /> + </div> </div> </template> <script> import Pagination from '@/components/common/Pagination' import QueryForm from '@/components/common/QueryForm' +import dayjs from 'dayjs' +import duration from 'dayjs/plugin/duration' +dayjs.extend(duration); +import { platformJobPage, getPlatformGroupList } from '@/api' export default { components: { Pagination, QueryForm }, - data () { + data() { return { loading: false, pagination: { - capacity: 10, - page: 1 + pageSize: 10, + page: 1, + total: 0 }, filters: {}, list: [], @@ -84,18 +47,18 @@ queryFormConfig: { formItems: [ { - filed: 'aaaa', + filed: 'platformName', type: 'input', label: '鏈堝彴鍚嶇О' }, { - filed: 'bbb', + filed: 'platformGroupId', type: 'select', label: '鏈堝彴缁�', options: [] }, { - filed: 'aaaa', + filed: 'carCodeFront', type: 'input', label: '杞︾墝鍙�' }, @@ -109,22 +72,64 @@ } } }, + created() { + this.getList() + this.getGroupList() + }, methods: { - handleSub () { + handleSub() { this.$refs.ruleForm.validate((valid) => { if (valid) { alert('submit!') } }) }, - getList (page) { }, - clear () { }, - handleSizeChange (capacity) { - this.pagination.capacity = capacity + getGroupList() { + getPlatformGroupList({queryData: 0,queryType: 0}).then(res => { + this.queryFormConfig.formItems[1].options = res.map(i => { + return { + value: i.id, + label: i.name + } + }) + }) + }, + getList(page) { + const { pagination, filters } = this + this.loading = true + platformJobPage({ + model: { + ...filters, + queryStatus: '5,6,9,10', + beginWorkDateStart: filters.selDate && filters.selDate.length > 0 ? filters.selDate[0] : null, + beginWorkDateEnd: filters.selDate && filters.selDate.length > 0 ? filters.selDate[1] : null, + }, + capacity: pagination.pageSize, + page: page || pagination.page, + }).then(res => { + this.loading = false + this.list = res.records || [] + this.list.forEach(item => { + item.inTypeTemp = item.inType == 0 ? '鏁存墭鐩�' : '浠剁儫' + item.taskOrigin = 'WMS鑾峰彇' + item.workTime = dayjs.duration(item.workTime, 'seconds').format('H鏃秏鍒唖绉�'); + }) + this.pagination.total = res.total || 0 + }, () => { + this.loading = false + }) + }, + clear() { + this.filters = {} + this.pagination.pageSize = 10 + this.pagination.page = 1 + this.getList() + }, + handleSizeChange(capacity) { + this.pagination.pageSize = capacity } } } </script> -<style> -</style> +<style></style> -- Gitblit v1.9.3