From 6ded2ee6a9d9097d45f8f79a7e6429cf55ed7cc3 Mon Sep 17 00:00:00 2001
From: k94314517 <8417338+k94314517@user.noreply.gitee.com>
Date: 星期五, 07 三月 2025 16:59:30 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
admin/src/views/platform/LogisticsRecord/subscribe.vue | 80 ++++++++++++++++++++++++----------------
1 files changed, 48 insertions(+), 32 deletions(-)
diff --git a/admin/src/views/platform/LogisticsRecord/subscribe.vue b/admin/src/views/platform/LogisticsRecord/subscribe.vue
index 7742256..ba788b3 100644
--- a/admin/src/views/platform/LogisticsRecord/subscribe.vue
+++ b/admin/src/views/platform/LogisticsRecord/subscribe.vue
@@ -16,7 +16,7 @@
<el-button :loading="exLoading" @click="handleEx"
v-permissions="['business:platformbooks:exportExcel']">瀵煎嚭</el-button>
</div>
- <el-table class="mb20" v-loading="loading" :data="list" stripe>
+ <el-table :height="tableHeightNew" v-loading="loading" :data="list" stripe>
<el-table-column prop="contractNum" label="鍚堝悓鍗曞彿" min-width="100" show-overflow-tooltip />
<el-table-column prop="inReason" label="鍏ュ洯鍘熷洜" min-width="100" show-overflow-tooltip />
<el-table-column prop="totalNum" label="鎬讳綔涓氶噺(涓囨敮)" min-width="100" show-overflow-tooltip />
@@ -41,6 +41,7 @@
<template v-slot="scope">
<el-button type="text" v-permissions="['business:platformbooks:detail']"
@click="handleDetail(scope.row)">棰勭害璇︽儏</el-button>
+ <el-button type="text" class="red" v-permissions="['business:platformbooks:delete']" @click="handleDel(scope.row)">鍒犻櫎</el-button>
</template>
</el-table-column>
</el-table>
@@ -104,9 +105,10 @@
<script>
import Pagination from '@/components/common/Pagination'
import QueryForm from '@/components/common/QueryForm'
+import BasePage from '@/components/base/BasePage'
import { platformBooksPage, platformReasonList, platformBooksApply, platformBooksExport } from '@/api'
-import { checkSurplusNum } from '@/api/platform/platform'
-import DriverDetail from "@/views/task/driverDetail"
+import { checkSurplusNum, deletebooksById } from '@/api/platform/platform'
+import DriverDetail from '@/views/task/driverDetail'
import GlobalWindow from '@/components/common/GlobalWindow'
import UploadAvatarImage from '@/components/common/UploadAvatarImage'
import { Message } from 'element-ui'
@@ -119,7 +121,8 @@
GlobalWindow,
UploadAvatarImage
},
- data() {
+ extends: BasePage,
+ data () {
return {
isShowDriver: false,
exLoading: false,
@@ -144,7 +147,6 @@
rules: {
contractNum: [{ required: true, message: '璇疯緭鍏�', trigger: 'blur' }],
totalNum: [{ required: true, message: '璇疯緭鍏�', trigger: 'blur' }],
- driverName: [{ required: true, message: '璇疯緭鍏�', trigger: 'blur' }],
driverPhone: [{ required: true, message: '璇疯緭鍏�', trigger: 'blur' }],
carCodeFront: [{ required: true, message: '璇疯緭鍏�', trigger: 'blur' }],
carCodeBack: [{ required: true, message: '璇疯緭鍏�', trigger: 'blur' }],
@@ -153,7 +155,7 @@
reasonId: [{ required: true, message: '璇烽�夋嫨', trigger: 'blur' }],
arriveDate: [{ required: true, message: '璇烽�夋嫨', trigger: 'blur' }],
inType: [{ required: true, message: '璇烽�夋嫨', trigger: 'blur' }],
- driverName: [{ required: true, message: '璇烽�夋嫨', trigger: 'blur' }],
+ driverName: [{ required: true, message: '璇烽�夋嫨', trigger: 'blur' }]
},
queryFormConfig: {
formItems: [
@@ -181,7 +183,7 @@
{ value: 1, label: '瀹℃壒涓�' },
{ value: 2, label: '瀹℃壒閫氳繃' },
{ value: 3, label: '瀹℃壒椹冲洖' },
- { value: 4, label: '宸插彇娑�' },
+ { value: 4, label: '宸插彇娑�' }
]
},
{
@@ -197,15 +199,15 @@
}
],
online: true
- },
+ }
}
},
- created() {
+ created () {
this.changeRadio('0')
this.getList()
},
methods: {
- checkSurplus() {
+ checkSurplus () {
const { arriveDate, reasonId, totalNum } = this.param
if (!arriveDate || !reasonId || !totalNum) return
checkSurplusNum({
@@ -220,28 +222,28 @@
}
})
},
- changeRadio(day) {
+ 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) {
+ changeForm (str) {
if (str === 'selDate') {
this.$set(this.filters, 'fastdate', null)
this.getList()
}
},
- getList(page) {
+ getList (page) {
const { pagination, filters } = this
this.loading = true
platformBooksPage({
model: {
...filters,
arriveDateStart: filters.selDate && filters.selDate.length > 0 ? filters.selDate[0] : null,
- arriveDateEnd: filters.selDate && filters.selDate.length > 0 ? filters.selDate[1] : null,
+ arriveDateEnd: filters.selDate && filters.selDate.length > 0 ? filters.selDate[1] : null
},
capacity: pagination.pageSize,
- page: page || pagination.page,
+ page: page || pagination.page
}).then(res => {
this.loading = false
this.list = res.records || []
@@ -253,7 +255,7 @@
this.loading = false
})
},
- handleEx() {
+ handleEx () {
this.$dialog.exportConfirm('纭瀵煎嚭鍚楋紵')
.then(() => {
const { filters } = this
@@ -264,8 +266,8 @@
model: {
...filters,
arriveDateStart: filters.selDate && filters.selDate.length > 0 ? filters.selDate[0] : null,
- arriveDateEnd: filters.selDate && filters.selDate.length > 0 ? filters.selDate[1] : null,
- },
+ arriveDateEnd: filters.selDate && filters.selDate.length > 0 ? filters.selDate[1] : null
+ }
})
.then(response => {
this.download(response)
@@ -278,8 +280,8 @@
})
})
},
- onSubmit() {
- this.$refs['ruleForm'].validate((valid) => {
+ onSubmit () {
+ this.$refs.ruleForm.validate((valid) => {
const param = this.param
param.inReason = this.reasonList.find(item => param.reasonId == item.id).reason
if (valid) {
@@ -294,42 +296,42 @@
}
})
},
- uploadSuccess(file) {
+ uploadSuccess (file) {
this.$set(this.param, 'transportImg', file.imgurl)
this.$set(this.param, 'transportImgFull', file.imgurlfull)
},
- handleEdit(row) {
+ handleEdit (row) {
this.isShowEdit = true
this.param = {
inType: 0
}
this.$nextTick(() => {
- this.$refs['ruleForm'].clearValidate()
+ this.$refs.ruleForm.clearValidate()
})
this.$set(this.param, 'arriveDate', dayjs().format('YYYY-MM-DD HH:mm:ss'))
this.getplatformReason()
},
- getplatformReason() {
+ getplatformReason () {
platformReasonList().then(res => {
this.reasonList = res || []
})
},
- handleSub() {
+ handleSub () {
this.$refs.ruleForm.validate((valid) => {
if (valid) {
alert('submit!')
}
})
},
- clear() {
+ clear () {
this.pagination.page = 1
this.filters = {
- selDate: [],
- fastdate: 0,
+ selDate: []
}
- this.changeRadio('0')
+ this.getList()
+ // this.changeRadio('0')
},
- handleDetail(row) {
+ handleDetail (row) {
this.isShowDriver = true
this.$nextTick(() => {
this.$refs.DriverDetailRef.id = row.id
@@ -338,8 +340,22 @@
this.$refs.DriverDetailRef.isShowModal = true
})
},
- handleDel() { },
- handleSizeChange(capacity) {
+ handleDel (row) {
+ this.$confirm('纭畾鍒犻櫎璇ヨ褰曞悧, 鏄惁缁х画?', '鎻愮ず', {
+ confirmButtonText: '纭畾',
+ cancelButtonText: '鍙栨秷',
+ type: 'warning'
+ }).then(() => {
+ deletebooksById(row.id)
+ .then(res => {
+ this.$message.success('鎿嶄綔鎴愬姛')
+ this.page = 1
+ this.getList()
+ })
+ }).catch(() => {
+ })
+ },
+ handleSizeChange (capacity) {
this.pagination.pageSize = capacity
this.getList()
}
--
Gitblit v1.9.3