doum
2025-09-12 b200a67474c0cde5fe8d6ce7dd4d604675de2129
admin/src/views/platform/LogisticsRecord/waybill.vue
@@ -23,7 +23,12 @@
      <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 />
@@ -39,6 +44,17 @@
          <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="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 />
@@ -62,20 +78,68 @@
    <!--  -->
    <!--  -->
    <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 { platformJobPage, platformJobExport, platformJobDel, dealJobFinish ,updateTotalNum} 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 BaseComputHeight from '@/components/base/BaseComputHeight'
import { allList } from '@/api/platform/platformGroup'
export default {
  extends: BaseComputHeight,
  components: {
@@ -87,8 +151,13 @@
  },
  data() {
    return {
      groupList: [],
      rowGroupList: [],
      dealing:false,
      statusMap,
      curRow:null,
      isShowDetail: false,
      showChangeGroup: false,
      exLoading: false,
      updateLoading: false,
      loading: false,
@@ -104,6 +173,11 @@
        createDateEnd: ''
      },
      list: [],
      groupForm:{
        id:null,
        platformGroupId:null,
        platformGroupName:null
      },
      queryFormConfig: {
        formItems: [
          {
@@ -143,7 +217,7 @@
              { value: 9, label: '已授权离园' },
              // { value: 10, label: '已离园' },
              { value: 11, label: '已过号' },
              { value: 12, label: '已取消' },
              { value: 12, label: '已取消' }
            ]
          },
          {
@@ -180,13 +254,20 @@
    this.$nextTick(() => {
      this.$refs.QueryForm.zkBtn()
    })
    this.loadGroupList()
  },
  methods: {
    loadGroupList () {
      allList({})
        .then(res => {
          this.groupList = res || []
        })
    },
    handleSelectionChange(ids) {
      this.ids = ids.map(item => item.id)
    },
    complete(ids) {
      var that = this;
      var that = this
      if (ids.length === 0) {
        return this.$message.warning('至少选择一项内容')
      }
@@ -201,7 +282,48 @@
          })
      }).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']
@@ -225,7 +347,7 @@
          jobType: '0'
         },
        capacity: pagination.pageSize,
        page: page || pagination.page,
        page: page || pagination.page
      }).then(res => {
        this.loading = false
        this.list = res.records || []
@@ -312,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>