From e205530df2d0e45248bcdeeabee090ad26e33080 Mon Sep 17 00:00:00 2001
From: liukangdong <898885815@qq.com>
Date: 星期一, 30 九月 2024 09:20:27 +0800
Subject: [PATCH] ll
---
admin/src/views/platform/LogisticsRecord/waybill.vue | 221 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 221 insertions(+), 0 deletions(-)
diff --git a/admin/src/views/platform/LogisticsRecord/waybill.vue b/admin/src/views/platform/LogisticsRecord/waybill.vue
index e69de29..9018c0d 100644
--- a/admin/src/views/platform/LogisticsRecord/waybill.vue
+++ b/admin/src/views/platform/LogisticsRecord/waybill.vue
@@ -0,0 +1,221 @@
+<template>
+ <div class="main_app">
+ <QueryForm v-model="filters" :query-form-config="queryFormConfig" @changeForm='changeForm' @handleQuery="getList(1)"
+ @clear="clear">
+ <template #fastdate>
+ <el-radio-group v-model="filters.fastdate" size="small" @input="changeRadio">
+ <el-radio-button label="0">褰撳ぉ</el-radio-button>
+ <el-radio-button label="6">杩�7澶�</el-radio-button>
+ <el-radio-button label="29">杩�30澶�</el-radio-button>
+ </el-radio-group>
+ </template>
+ </QueryForm>
+ <div class="pt16">
+ <el-button :loading="exLoading" @click="handleEx"
+ v-permissions="['business:platformjob:exportExcel']">瀵煎嚭</el-button>
+ </div>
+ <el-table class="mb20" v-loading="loading" :data="list" stripe>
+ <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 /> -->
+ <el-table-column prop="taskOrigin" label="浠诲姟鏉ユ簮" min-width="100" show-overflow-tooltip />
+ <el-table-column prop="carrierName" label="杩愯緭鍏徃" min-width="100" show-overflow-tooltip />
+ <el-table-column prop="driverName" label="鍙告満" min-width="100" show-overflow-tooltip />
+ <el-table-column prop="drivierPhone" label="鍙告満鐢佃瘽" min-width="100" show-overflow-tooltip />
+ <el-table-column prop="inTypeTemp" 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>
+ <span v-if="scope.row.type == '2'">澶栧崗杞﹀嵏璐�</span>
+ <span v-if="scope.row.type == '3'">澶栧崗杞﹁璐�</span>
+ <span v-if="scope.row.type == '4'">甯傚叕鍙稿鍗忚溅鍗歌揣</span>
+ </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>
+ <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>
+ <template v-slot="scope">
+ <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']"
+ @click="handleDetail(scope.row)">杩愬崟璇︽儏</el-button>
+ </template>
+ </el-table-column>
+ </el-table>
+ <Pagination @size-change="handleSizeChange" @current-change="getList" :pagination="pagination" />
+ <!-- -->
+ <!-- -->
+ <WaybillDetailRef v-if="isShowDetail" ref="WaybillDetailRef" />
+ </div>
+</template>
+
+<script>
+import Pagination from '@/components/common/Pagination'
+import QueryForm from '@/components/common/QueryForm'
+import { platformJobPage, platformJobExport, platformJobDel } from '@/api'
+import { statusMap } from '../config'
+import WaybillDetailRef from "../components/WaybillDetail.vue"
+import GlobalWindow from '@/components/common/GlobalWindow'
+import UploadFaceImg from '@/components/common/UploadFaceImg'
+import { Message } from 'element-ui'
+import dayjs from 'dayjs'
+export default {
+ components: {
+ Pagination,
+ QueryForm,
+ WaybillDetailRef,
+ GlobalWindow,
+ UploadFaceImg
+ },
+ data() {
+ return {
+ statusMap,
+ isShowDetail: false,
+ exLoading: false,
+ loading: false,
+ pagination: {
+ pageSize: 10,
+ page: 1,
+ total: 0
+ },
+ filters: {
+ selDate: [],
+ fastdate: 0
+ },
+ list: [],
+ queryFormConfig: {
+ formItems: [
+ {
+ filed: 'code',
+ type: 'input',
+ label: '杩愬崟鍙�'
+ },
+ {
+ filed: 'driverName',
+ type: 'input',
+ label: '椹鹃┒鍛�'
+ },
+ {
+ filed: 'carCodeFront',
+ type: 'input',
+ label: '杞︾墝鍙�'
+ },
+ {
+ filed: 'selDate',
+ type: 'datetimerange',
+ label: '鎿嶄綔鏃堕棿',
+ pickerOptions: {}
+ },
+ {
+ type: 'slot',
+ filed: 'fastdate',
+ label: ''
+ }
+ ],
+ online: true
+ },
+ }
+ },
+ created() {
+ this.changeRadio('0')
+ this.getList()
+ },
+ methods: {
+ changeRadio(day) {
+ const arr = [dayjs().subtract(day, 'day').format('YYYY-MM-DD') + ' 00:00:00', dayjs().format('YYYY-MM-DD') + ' 23:59:59']
+ this.$set(this.filters, 'selDate', arr)
+ this.getList()
+ },
+ changeForm(str) {
+ if (str === 'selDate') {
+ this.$set(this.filters, 'fastdate', null)
+ this.getList()
+ }
+ },
+ getList(page) {
+ const { pagination, filters } = this
+ this.loading = true
+ platformJobPage({
+ model: {
+ ...filters,
+ jobType: '0',
+ createDateStart: filters.selDate && filters.selDate.length > 0 ? filters.selDate[0] : null,
+ createDateEnd: 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鑾峰彇'
+ })
+ this.pagination.total = res.total || 0
+ }, () => {
+ this.loading = false
+ })
+ },
+ handleDel(row) {
+ this.$dialog.exportConfirm('纭鍒犻櫎鍚楋紵').then(() => {
+ platformJobDel(row.id).then(res => {
+ Message.success('鍒犻櫎鎴愬姛')
+ this.getList()
+ })
+ })
+ },
+ handleEx() {
+ this.$dialog.exportConfirm('纭瀵煎嚭鍚楋紵')
+ .then(() => {
+ this.exLoading = true
+ platformJobExport({
+ page: this.pagination.page,
+ capacity: 1000000,
+ jobType: '0',
+ model: this.filters
+ })
+ .then(response => {
+ this.download(response)
+ })
+ .catch(e => {
+ this.$tip.apiFailed(e)
+ })
+ .finally(() => {
+ this.exLoading = false
+ })
+ })
+ },
+ clear() {
+ this.pagination.page = 1
+ this.filters = {
+ selDate: [],
+ fastdate: 0
+ }
+ this.getList()
+ },
+ handleDetail(row) {
+ this.isShowDetail = true
+ this.$nextTick(() => {
+ this.$refs.WaybillDetailRef.isShowModal = true
+ this.$refs.WaybillDetailRef.id = row.id
+ this.$refs.WaybillDetailRef.getDetail()
+ })
+ },
+ handleSizeChange(capacity) {
+ this.pagination.pageSize = capacity
+ }
+ }
+}
+</script>
+<style lang="scss" scoped>
+.param_title {
+ font-size: 18px;
+ font-weight: 600;
+ color: #000000;
+ margin-bottom: 15px;
+}
+</style>
\ No newline at end of file
--
Gitblit v1.9.3