From b200a67474c0cde5fe8d6ce7dd4d604675de2129 Mon Sep 17 00:00:00 2001
From: doum <doum>
Date: 星期五, 12 九月 2025 17:08:20 +0800
Subject: [PATCH] 最新版本541200007
---
admin/src/views/platform/LogisticsRecord/waybill.vue | 320 +++++++++++++++++++++++++++++++++++++++++++++-------
1 files changed, 275 insertions(+), 45 deletions(-)
diff --git a/admin/src/views/platform/LogisticsRecord/waybill.vue b/admin/src/views/platform/LogisticsRecord/waybill.vue
index d5f8fc3..b80fc18 100644
--- a/admin/src/views/platform/LogisticsRecord/waybill.vue
+++ b/admin/src/views/platform/LogisticsRecord/waybill.vue
@@ -1,6 +1,6 @@
<template>
<div class="main_app">
- <QueryForm v-model="filters" :query-form-config="queryFormConfig" @changeForm='changeForm' @handleQuery="getList(1)"
+ <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">
@@ -11,23 +11,33 @@
</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>
+ <el-button :loading="updateLoading" @click="updateTotalNum"
+ v-permissions="['business:platformjob:updateTotalNum']">閲嶇疆鎬讳綔涓氶噺</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="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="origin" label="浠诲姟鏉ユ簮" min-width="100" show-overflow-tooltip >
+ <template v-slot="scope">
+ <span v-if="scope.row.origin == 1">WMS鑾峰彇</span>
+ <span v-else>鑷缓浠诲姟</span>
+ </template>
+ </el-table-column>
<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="wmsContractNum" label="WMS鍚堝悓鍙�" 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 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>
@@ -36,14 +46,27 @@
<span v-if="scope.row.type == '4'">甯傚叕鍙稿鍗忚溅鍗歌揣</span>
</template>
</el-table-column>
+ <el-table-column prop="platformGroupName" label="浣滀笟鏈堝彴缁�" min-width="150" show-overflow-tooltip >
+ <template v-slot="scope">
+ <div style="display: flex;align-items: center;align-content: center;width: 100%">
+ <div style="max-width: 100px;display: inline-block;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ word-wrap: break-word;">{{scope.row.platformGroupName||'-'}}</div>
+ <el-button type="text" style="font-size: 10px;color: red;margin-top: 5px;margin-left: 10px " @click="changeGroup(scope.row)" v-if="[0,1,2].includes(scope.row.status)">鏇存崲</el-button>
+ </div>
+ </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="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 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']"
@@ -55,21 +78,70 @@
<!-- -->
<!-- -->
<WaybillDetailRef v-if="isShowDetail" ref="WaybillDetailRef" />
+ <el-dialog append-to-body title="鏇存崲鏈堝彴缁�" style="text-align: center" class="dialogCl" :visible.sync="showChangeGroup" width="480px" top="10%">
+ <div class="head" v-if="showChangeGroup && curRow">
+ <div class="plate" v-if="curRow.carCodeFront">
+ <span>{{ curRow.carCodeFront.slice(0, 1) }}</span>
+ <span>{{ curRow.carCodeFront.slice(1, 2) }}</span>
+ <span>路</span>
+ <span>{{ curRow.carCodeFront.slice(2) }}</span>
+ </div>
+ <div class="list">
+ <div class="item">
+ <span>杩愯緭鍗曞彿锛�</span>
+ <span>{{ curRow.billCode }}</span>
+ </div>
+ <div class="item">
+ <span>鎬昏繍杈撻噺锛�</span>
+ <span>{{ curRow.totalNum }}涓囨敮</span>
+ </div>
+ <div class="item">
+ <span>椹鹃┒鍛橈細</span>
+ <span>{{ curRow.driverName }} {{ curRow.drivierPhone }}</span>
+ </div>
+ <div class="item">
+ <span>褰撳墠鏈堝彴缁勶細</span>
+ <span>{{ curRow.platformGroupName }}</span>
+ </div>
+ </div>
+ </div>
+ <el-form :model="groupForm" ref="form" >
+ <el-form-item label="閫夋嫨鏈堝彴缁�" prop="platformGroupId" required>
+ <el-select v-model="groupForm.platformGroupId" placeholder="璇烽�夋嫨鏈堝彴鍒嗙粍 ">
+ <el-option v-for="item in rowGroupList" :key="item.id" :label="item.name" :value="item.id">
+ </el-option>
+ </el-select>
+ </el-form-item>
+ </el-form>
+ <span slot="footer" class="dialog-footer">
+ <el-button @click="showChangeGroup = false">鍙栨秷</el-button>
+ <el-button type="primary" :loading="dealing" @click="changeGroupDo">纭畾</el-button>
+ </span>
+ </el-dialog>
</div>
</template>
<script>
import Pagination from '@/components/common/Pagination'
import QueryForm from '@/components/common/QueryForm'
-import BasePage from '@/components/base/BasePage'
-import { platformJobPage, platformJobExport, platformJobDel } from '@/api'
+import {
+ platformJobPage,
+ platformJobExport,
+ platformJobDel,
+ dealJobFinish,
+ updateTotalNum,
+ changPlatformGroup
+} from '@/api'
import { statusMap } from '../config'
-import WaybillDetailRef from "../components/WaybillDetail.vue"
+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'
+import { allList } from '@/api/platform/platformGroup'
export default {
+ extends: BaseComputHeight,
components: {
Pagination,
QueryForm,
@@ -77,12 +149,17 @@
GlobalWindow,
UploadFaceImg
},
- extends: BasePage,
- data() {
+ data () {
return {
+ groupList: [],
+ rowGroupList: [],
+ dealing:false,
statusMap,
+ curRow:null,
isShowDetail: false,
+ showChangeGroup: false,
exLoading: false,
+ updateLoading: false,
loading: false,
pagination: {
pageSize: 10,
@@ -91,9 +168,16 @@
},
filters: {
selDate: [],
- fastdate: 0
+ fastdate: 0,
+ createDateStart: '',
+ createDateEnd: ''
},
list: [],
+ groupForm:{
+ id:null,
+ platformGroupId:null,
+ platformGroupName:null
+ },
queryFormConfig: {
formItems: [
{
@@ -131,16 +215,28 @@
{ value: 7, label: '杞Щ涓�' },
{ value: 8, label: '寮傚父鎸傝捣' },
{ value: 9, label: '宸叉巿鏉冪鍥�' },
- { value: 10, label: '宸茬鍥�' },
+ // { value: 10, label: '宸茬鍥�' },
{ value: 11, label: '宸茶繃鍙�' },
- { value: 12, label: '宸插彇娑�' },
+ { value: 12, label: '宸插彇娑�' }
]
},
{
- filed: 'selDate',
- type: 'datetimerange',
- label: '鎿嶄綔鏃堕棿',
- pickerOptions: {}
+ 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',
@@ -150,35 +246,108 @@
],
online: true
},
+ ids: []
}
},
- created() {
+ created () {
this.changeRadio('0')
+ this.$nextTick(() => {
+ this.$refs.QueryForm.zkBtn()
+ })
+ this.loadGroupList()
},
methods: {
- changeRadio(day) {
+ loadGroupList () {
+ allList({})
+ .then(res => {
+ this.groupList = res || []
+ })
+ },
+ 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(() => {
+
+ })
+ },
+ changeGroupDo () {
+ var that = this
+ if (!this.groupForm.id || !this.groupForm.platformGroupId) {
+ return this.$message.warning('璇烽�夋嫨鏈堝彴缁�')
+ }
+ changPlatformGroup(this.groupForm)
+ .then(res => {
+ that.showChangeGroup=false
+ that.getList()
+ })
+ },
+ changeGroup (row) {
+ this.groupForm.id = null
+ this.groupForm.platformGroupName = null
+ this.groupForm.platformGroupId = null
+ this.rowGroupList = []
+ this.curRow=null
+ var type = 0
+ if (row.type === 0 || row.type === 2) {
+ // 瀹夋嘲鐗╂祦鍗歌揣
+ type = 0
+ } else if (row.type === 1 || row.type === 3) {
+ // 瀹夋嘲鐗╂祦瑁呰揣
+ type = 1
+ } else if (row.type === 4) {
+ // 甯傚叕鍙稿鍗忚溅鍗歌揣
+ type = 2
+ } else {
+ return this.$message.warning('浣滀笟浠诲姟绫诲瀷鏈夎锛屼笉鏀寔鏈堝彴缁勫垏鎹紒')
+ }
+ this.curRow =row
+ this.groupForm.id = row.id
+ this.groupForm.platformGroupName = row.platformGroupName
+ this.groupForm.platformGroupId = row.platformGroupId
+ this.groupList.forEach(item => {
+ if (item.type === type) {
+ this.rowGroupList.push(item)
+ }
+ })
+ this.showChangeGroup = true
+ },
+ 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.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()
},
- changeForm(str) {
- if (str === 'selDate') {
- this.$set(this.filters, 'fastdate', null)
- this.getList()
- }
- },
- getList(page) {
+ 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,
+ jobType: '0'
},
capacity: pagination.pageSize,
- page: page || pagination.page,
+ page: page || pagination.page
}).then(res => {
this.loading = false
this.list = res.records || []
@@ -191,7 +360,7 @@
this.loading = false
})
},
- handleDel(row) {
+ handleDel (row) {
this.$dialog.deleteConfirm('纭鍒犻櫎鍚楋紵').then(() => {
platformJobDel(row.id).then(res => {
Message.success('鍒犻櫎鎴愬姛')
@@ -199,7 +368,7 @@
})
})
},
- handleEx() {
+ handleEx () {
this.$dialog.exportConfirm('纭瀵煎嚭鍚楋紵')
.then(() => {
this.exLoading = true
@@ -210,9 +379,7 @@
jobType: '0',
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,
+ jobType: '0'
}
})
.then(response => {
@@ -226,15 +393,26 @@
})
})
},
- clear() {
+ 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: [],
- }
- this.getList()
+ this.filters = {}
+ this.getList(0)
// this.changeRadio('0')
},
- handleDetail(row) {
+ handleDetail (row) {
this.isShowDetail = true
this.$nextTick(() => {
this.$refs.WaybillDetailRef.isShowModal = true
@@ -242,7 +420,7 @@
this.$refs.WaybillDetailRef.getDetail()
})
},
- handleSizeChange(capacity) {
+ handleSizeChange (capacity) {
this.pagination.pageSize = capacity
this.getList()
}
@@ -256,4 +434,56 @@
color: #000000;
margin-bottom: 15px;
}
+.head {
+ font-size: 12px;
+ color: #282828;
+ background: rgba(39, 155, 170, 0.05);
+ border-radius: 4px;
+ border: 1px solid #dfe2e8;
+ padding: 16px;
+ margin-bottom: 30px;
+ .plate {
+ display: flex;
+ font-weight: 600;
+ height: 30px;
+ line-height: 30px;
+ font-size: 15px;
+ color: #111111;
+ background-color: #fff;
+ border-radius: 4px;
+ border: 1px solid #2080f7;
+ padding-right: 4px;
+ width:120px;
+ span {
+ &:nth-of-type(1) {
+ background: #2080f7;
+ padding: 0 8px;
+ color: #fff;
+ }
+
+ &:nth-of-type(2) {
+ padding-left: 4px;
+ }
+ }
+ }
+
+ .list {
+ display: flex;
+ flex-wrap: wrap;
+ margin-top: 16px;
+
+ .item {
+ text-align: justify;
+ width: 50%;
+ margin-bottom: 8px;
+ span {
+ &:nth-child(1) {
+ color: #666666;
+ }
+ }
+ }
+ }
+}
+
+
</style>
--
Gitblit v1.9.3