From 991c2109853e08eef374512fffd111706fa5bf84 Mon Sep 17 00:00:00 2001 From: MrShi <1878285526@qq.com> Date: 星期一, 31 三月 2025 10:54:51 +0800 Subject: [PATCH] 优化 --- admin/src/views/platform/LogisticsRecord/waybill.vue | 47 ++++++++++++++++++++++++++++++++++++++++++----- 1 files changed, 42 insertions(+), 5 deletions(-) diff --git a/admin/src/views/platform/LogisticsRecord/waybill.vue b/admin/src/views/platform/LogisticsRecord/waybill.vue index 802fd43..13224c8 100644 --- a/admin/src/views/platform/LogisticsRecord/waybill.vue +++ b/admin/src/views/platform/LogisticsRecord/waybill.vue @@ -11,10 +11,12 @@ </template> </QueryForm> <div class="pt16"> + <el-button type="primary" @click="complete(ids)">瀹屾垚浣滀笟</el-button> <el-button :loading="exLoading" @click="handleEx" v-permissions="['business:platformjob:exportExcel']">瀵煎嚭</el-button> </div> - <el-table :height="tableHeightNew" v-loading="loading" :data="list" stripe> + <el-table :height="tableHeightNew" v-loading="loading" :data="list" @selection-change="handleSelectionChange" stripe> + <el-table-column type="selection" width="55"></el-table-column> <el-table-column prop="billCode" 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 /> --> @@ -27,7 +29,7 @@ <span v-if="scope.row.platformWmsJob">{{ scope.row.platformWmsJob.contractNum }}</span> </template> </el-table-column>--> - <el-table-column prop="inTypeTemp" label="浣滀笟绫诲瀷" min-width="100" show-overflow-tooltip> + <el-table-column label="浣滀笟绫诲瀷" min-width="100" show-overflow-tooltip> <template v-slot="scope"> <span v-if="scope.row.type == '0'">鑷湁杞﹀嵏璐�</span> <span v-if="scope.row.type == '1'">鑷湁杞﹁璐�</span> @@ -37,13 +39,14 @@ </template> </el-table-column> <el-table-column prop="ioCreatedate" label="鍒涘缓鏃堕棿" min-width="150" show-overflow-tooltip /> - <el-table-column prop="name" label="浣滀笟鐘舵��" min-width="100" show-overflow-tooltip> + <el-table-column label="浣滀笟鐘舵��" min-width="100" show-overflow-tooltip> <template v-slot="scope"> <span>{{ statusMap[scope.row.status] }}</span> </template> </el-table-column> - <el-table-column prop="name" label="鎿嶄綔" min-width="120" align="center" fixed="right" show-overflow-tooltip> + <el-table-column prop="name" label="鎿嶄綔" min-width="170" align="center" fixed="right" show-overflow-tooltip> <template v-slot="scope"> + <el-button type="text" @click="complete([scope.row.id])" v-if="[0,1].includes(scope.row.status)">瀹屾垚浣滀笟</el-button> <el-button v-if="scope.row.status == '12'" type="text" class="red" v-permissions="['business:platformjob:delete']" @click="handleDel(scope.row)">鍒犻櫎</el-button> <el-button v-if="scope.row != 12" type="text" v-permissions="['business:platformjob:query']" @@ -61,7 +64,7 @@ <script> import Pagination from '@/components/common/Pagination' import QueryForm from '@/components/common/QueryForm' -import { platformJobPage, platformJobExport, platformJobDel } from '@/api' +import { platformJobPage, platformJobExport, platformJobDel, dealJobFinish } from '@/api' import { statusMap } from '../config' import WaybillDetailRef from "../components/WaybillDetail.vue" import GlobalWindow from '@/components/common/GlobalWindow' @@ -139,6 +142,18 @@ ] }, { + filed: 'type', + type: 'select', + label: '浣滀笟绫诲瀷', + options: [ + { value: 0, label: '鑷湁杞﹀嵏璐�' }, + { value: 1, label: '鑷湁杞﹁璐�' }, + { value: 2, label: '澶栧崗杞﹀嵏璐�' }, + { value: 3, label: '澶栧崗杞﹁璐�' }, + { value: 4, label: '甯傚叕鍙稿鍗忚溅鍗歌揣' } + ] + }, + { filed1: 'createDateStart', filed2: 'createDateEnd', type: 'datetime', @@ -152,12 +167,34 @@ ], online: true }, + ids: [] } }, created() { this.changeRadio('0') }, methods: { + handleSelectionChange(ids) { + this.ids = ids.map(item => item.id) + }, + complete(ids) { + var that = this; + if (ids.length === 0) { + return this.$message.warning('鑷冲皯閫夋嫨涓�椤瑰唴瀹�') + } + this.$confirm('鏄惁纭瀹屾垚浣滀笟锛�, 鏄惁纭?', '鎻愮ず', { + confirmButtonText: '纭', + cancelButtonText: '鍙栨秷', + type: 'warning' + }).then(() => { + dealJobFinish(ids) + .then(res => { + that.getList() + }) + }).catch(() => { + + }); + }, changeRadio(day) { const arr = [dayjs().subtract(day, 'day').format('YYYY-MM-DD') + ' 00:00:00', dayjs().format('YYYY-MM-DD') + ' 23:59:59'] this.filters.createDateStart = arr[0] -- Gitblit v1.9.3