From 7298d5354963a88643a543b51b90192dc9fc934c Mon Sep 17 00:00:00 2001
From: doum <doum>
Date: 星期四, 11 九月 2025 18:43:14 +0800
Subject: [PATCH] 最新版本541200007
---
admin/src/views/platform/LogisticsRecord/waybill.vue | 201 ++++++++++++++++++++++++++++++++++++-------------
1 files changed, 146 insertions(+), 55 deletions(-)
diff --git a/admin/src/views/platform/LogisticsRecord/waybill.vue b/admin/src/views/platform/LogisticsRecord/waybill.vue
index ed49adb..f40ad7f 100644
--- a/admin/src/views/platform/LogisticsRecord/waybill.vue
+++ b/admin/src/views/platform/LogisticsRecord/waybill.vue
@@ -1,12 +1,9 @@
<template>
<div class="main_app">
- <QueryForm v-model="filters" :query-form-config="queryFormConfig" @changeForm='changeForm' @handleQuery="getList(1)" @clear="clear">
+ <QueryForm ref="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-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>
@@ -14,17 +11,28 @@
</template>
</QueryForm>
<div class="pt16">
- <el-button :loading="exLoading" @click="handleEx" v-permissions="['business:platformJob:exportExcel']">瀵煎嚭</el-button>
+ <el-button type="primary" @click="complete(ids)">瀹屾垚浣滀笟</el-button>
+ <el-button :loading="exLoading" @click="handleEx"
+ v-permissions="['business:platformjob:exportExcel']">瀵煎嚭</el-button>
+ <el-button :loading="updateLoading" @click="updateTotalNum"
+ v-permissions="['business:platformjob:updateTotalNum']">閲嶇疆鎬讳綔涓氶噺</el-button>
</div>
- <el-table class="mb20" v-loading="loading" :data="list" stripe>
- <el-table-column prop="code" label="杩愬崟鍙�" min-width="100" show-overflow-tooltip />
+ <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="totalNum" label="鎬讳綔涓氶噺锛堜竾鏀級" min-width="130" 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>
+<!-- <el-table-column prop="wmsContractNum" label="WMS鍚堝悓鍙�" min-width="100" show-overflow-tooltip >
+ <template v-slot="scope">
+ <span v-if="scope.row.platformWmsJob">{{ scope.row.platformWmsJob.contractNum }}</span>
+ </template>
+ </el-table-column>-->
+ <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>
@@ -33,51 +41,56 @@
<span v-if="scope.row.type == '4'">甯傚叕鍙稿鍗忚溅鍗歌揣</span>
</template>
</el-table-column>
- <el-table-column prop="createDate" label="鍒涘缓鏃堕棿" min-width="150" show-overflow-tooltip />
- <el-table-column prop="name" label="浣滀笟鐘舵��" min-width="100" show-overflow-tooltip>
+ <el-table-column prop="ioCreatedate" label="鍒涘缓鏃堕棿" min-width="150" 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="editUserName" label="鏈�鍚庢搷浣滀汉鍛�" min-width="150" 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 v-if="scope.row.status == 12" type="text" class="red" v-permissions="['business:platformJob:delete']"
- @click="handleDel(scope.row)">鍒犻櫎</el-button>
- <el-button type="text" v-permissions="['business:platformJob:query']"
- @click="handleDetail(scope.row)">棰勭害璇︽儏</el-button>
+ <el-button type="text" @click="complete([scope.row.id])" v-if="[0,1,2].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']"
+ @click="handleDetail(scope.row)">杩愬崟璇︽儏</el-button>
</template>
</el-table-column>
</el-table>
<Pagination @size-change="handleSizeChange" @current-change="getList" :pagination="pagination" />
<!-- -->
<!-- -->
- <DriverDetail v-if="isShowDriver" ref="DriverDetailRef" />
+ <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 { platformJobPage, platformJobExport, platformJobDel, dealJobFinish ,updateTotalNum} from '@/api'
import { statusMap } from '../config'
-import DriverDetail from "@/views/task/driverDetail"
+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'
+import BaseComputHeight from "@/components/base/BaseComputHeight";
export default {
+ extends: BaseComputHeight,
components: {
Pagination,
QueryForm,
- DriverDetail,
+ WaybillDetailRef,
GlobalWindow,
UploadFaceImg
},
data() {
return {
statusMap,
- isShowDriver: false,
+ isShowDetail: false,
exLoading: false,
+ updateLoading: false,
loading: false,
pagination: {
pageSize: 10,
@@ -86,13 +99,15 @@
},
filters: {
selDate: [],
- fastdate: 0
+ fastdate: 0,
+ createDateStart: '',
+ createDateEnd: ''
},
list: [],
queryFormConfig: {
formItems: [
- {
- filed: 'code',
+ {
+ filed: 'billCode',
type: 'input',
label: '杩愬崟鍙�'
},
@@ -102,15 +117,52 @@
label: '椹鹃┒鍛�'
},
{
+ filed: 'wmsContractNum',
+ type: 'input',
+ label: '鍚堝悓鍙�'
+ },
+ {
filed: 'carCodeFront',
type: 'input',
label: '杞︾墝鍙�'
},
{
- filed: 'selDate',
- type: 'datetimerange',
- label: '鎿嶄綔鏃堕棿',
- pickerOptions: {}
+ filed: 'status',
+ type: 'select',
+ label: '浣滀笟鐘舵��',
+ options: [
+ { value: 0, label: '寰呯‘璁�' },
+ { value: 1, label: '寰呯鍒�' },
+ { value: 2, label: '绛夊緟鍙彿' },
+ { value: 3, label: '鍏ュ洯绛夊緟' },
+ { value: 4, label: '鏈堝彴绛夊緟' },
+ { value: 5, label: '浣滀笟涓�' },
+ { value: 6, label: '浣滀笟瀹屾垚' },
+ { value: 7, label: '杞Щ涓�' },
+ { value: 8, label: '寮傚父鎸傝捣' },
+ { value: 9, label: '宸叉巿鏉冪鍥�' },
+ // { value: 10, label: '宸茬鍥�' },
+ { value: 11, label: '宸茶繃鍙�' },
+ { value: 12, label: '宸插彇娑�' },
+ ]
+ },
+ {
+ 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',
+ label: '鎿嶄綔鏃堕棿'
},
{
type: 'slot',
@@ -120,23 +172,49 @@
],
online: true
},
+ ids: []
}
},
created() {
this.changeRadio('0')
- this.getList()
+ this.$nextTick(() => {
+ this.$refs.QueryForm.zkBtn()
+ })
},
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()
+ handleSelectionChange(ids) {
+ this.ids = ids.map(item => item.id)
},
- changeForm (str) {
- if (str === 'selDate') {
- this.$set(this.filters, 'fastdate', null)
- this.getList()
+ 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]
+ this.filters.createDateEnd = arr[1]
+ this.getList(1)
+ },
+ changeForm(str) {
+ if(this.filters.createDateStart > this.filters.createDateEnd){
+ this.filters.createDateStart = this.filters.createDateEnd
+ return this.$message.error('寮�濮嬫椂闂翠笉鑳藉ぇ浜庣粨鏉熸椂闂�')
+ }
+ this.getList()
},
getList(page) {
const { pagination, filters } = this
@@ -144,10 +222,8 @@
platformJobPage({
model: {
...filters,
- jobType: '0',
- beginWorkDateStart: filters.selDate && filters.selDate.length > 0 ? filters.selDate[0] : null,
- beginWorkDateEnd: filters.selDate && filters.selDate.length > 0 ? filters.selDate[1] : null,
- },
+ jobType: '0'
+ },
capacity: pagination.pageSize,
page: page || pagination.page,
}).then(res => {
@@ -163,7 +239,7 @@
})
},
handleDel(row) {
- this.$dialog.exportConfirm('纭鍒犻櫎鍚楋紵').then(() => {
+ this.$dialog.deleteConfirm('纭鍒犻櫎鍚楋紵').then(() => {
platformJobDel(row.id).then(res => {
Message.success('鍒犻櫎鎴愬姛')
this.getList()
@@ -174,11 +250,15 @@
this.$dialog.exportConfirm('纭瀵煎嚭鍚楋紵')
.then(() => {
this.exLoading = true
+ const { filters } = this
platformJobExport({
page: this.pagination.page,
capacity: 1000000,
jobType: '0',
- model: this.filters
+ model: {
+ ...filters,
+ jobType: '0'
+ }
})
.then(response => {
this.download(response)
@@ -191,25 +271,36 @@
})
})
},
+ updateTotalNum() {
+ this.$dialog.actionConfirm('纭杩涜璇ユ搷浣滃悧锛�','鎿嶄綔鎻愮ず')
+ .then(() => {
+ this.updateLoading = true
+ updateTotalNum('')
+ .catch(e => {
+ this.$tip.apiFailed(e)
+ })
+ .finally(() => {
+ this.updateLoading = false
+ })
+ })
+ },
clear() {
this.pagination.page = 1
- this.filters = {
- selDate: [],
- fastdate: 0
- }
- this.getList()
+ this.filters = {}
+ this.getList(0)
+ // this.changeRadio('0')
},
handleDetail(row) {
- this.isShowDriver = true
+ this.isShowDetail = true
this.$nextTick(() => {
- this.$refs.DriverDetailRef.id = row.id
- this.$refs.DriverDetailRef.type = 6
- this.$refs.DriverDetailRef.getDetail()
- this.$refs.DriverDetailRef.isShowModal = true
+ this.$refs.WaybillDetailRef.isShowModal = true
+ this.$refs.WaybillDetailRef.id = row.id
+ this.$refs.WaybillDetailRef.getDetail()
})
},
handleSizeChange(capacity) {
this.pagination.pageSize = capacity
+ this.getList()
}
}
}
@@ -221,4 +312,4 @@
color: #000000;
margin-bottom: 15px;
}
-</style>
\ No newline at end of file
+</style>
--
Gitblit v1.9.3