MrShi
2025-03-31 991c2109853e08eef374512fffd111706fa5bf84
优化
已修改4个文件
115 ■■■■ 文件已修改
admin/.env.development 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/src/api/platform/index.js 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/src/views/platform/LogisticsRecord/subscribe.vue 60 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/src/views/platform/LogisticsRecord/waybill.vue 47 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/.env.development
@@ -3,6 +3,6 @@
# VUE_APP_API_URL  = 'https://atwl.ahzyssl.com/zhyq_interface'
#  VUE_APP_API_URL  = 'http://localhost:10010'
# VUE_APP_API_URL  = 'https://atwl.ahzyssl.com/zhyq_interface'
VUE_APP_API_URL  = 'http://10.50.250.253:8088/gateway_interface'
VUE_APP_API_URL  = 'https://atwl.ahzyssl.com/zhyq_interface'
# VUE_APP_API_URL  = 'http://10.50.250.253:8088/gateway_interface'
admin/src/api/platform/index.js
@@ -128,3 +128,7 @@
    download: true
  })
}
// 手动完成作业
export function dealJobFinish (data) {
  return request.post('/visitsAdmin/cloudService/business/platformJob/dealJobFinish', data)
}
admin/src/views/platform/LogisticsRecord/subscribe.vue
@@ -13,10 +13,12 @@
    <div class="pt16">
      <el-button type="primary" @click="handleEdit" icon="el-icon-plus"
        v-permissions="['business:platformbooks:create']">新建</el-button>
      <el-button type="primary" @click="complete(ids)">完成作业</el-button>
      <el-button :loading="exLoading" @click="handleEx"
        v-permissions="['business:platformbooks:exportExcel']">导出</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="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 />
@@ -25,6 +27,12 @@
      <el-table-column prop="driverName" label="驾驶员" min-width="100" show-overflow-tooltip />
      <el-table-column prop="driverPhone" label="联系方式" min-width="100" show-overflow-tooltip />
      <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="[2,3,4].includes(scope.row.status)">{{ statusMap[scope.row.jobStatus] || '' }}</span>
          <span v-else>-</span>
        </template>
      </el-table-column>
      <el-table-column prop="arriveDate" label="预约到场时间" min-width="150" show-overflow-tooltip />
      <el-table-column label="审批结果" min-width="100" show-overflow-tooltip>
        <template v-slot="scope">
@@ -37,10 +45,11 @@
      </el-table-column>
      <el-table-column prop="auditName" label="当前审批人" min-width="100" show-overflow-tooltip />
      <el-table-column prop="editDate" label="操作时间" min-width="150" show-overflow-tooltip />
      <el-table-column prop="name" label="操作" min-width="120" align="center" fixed="right" 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" v-permissions="['business:platformbooks:detail']"
            @click="handleDetail(scope.row)">预约详情</el-button>
          <el-button type="text" @click="complete([scope.row.jobId])" v-if="[0,1].includes(scope.row.jobStatus)">完成作业</el-button>
          <el-button type="text" class="red" v-permissions="['business:platformbooks:delete']"
            @click="handleDel(scope.row)">删除</el-button>
        </template>
@@ -106,12 +115,13 @@
<script>
import Pagination from '@/components/common/Pagination'
import QueryForm from '@/components/common/QueryForm'
import { platformBooksPage, platformReasonList, platformBooksApply, platformBooksExport } from '@/api'
import { platformBooksPage, platformReasonList, platformBooksApply, platformBooksExport, dealJobFinish } from '@/api'
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'
import { statusMap } from '../config'
import dayjs from 'dayjs'
import BaseComputHeight from "@/components/base/BaseComputHeight"
export default {
@@ -125,6 +135,7 @@
  },
  data() {
    return {
      statusMap,
      isShowDriver: false,
      exLoading: false,
      loading: false,
@@ -189,6 +200,12 @@
            ]
          },
          {
            filed: 'reasonId',
            type: 'select',
            label: '入园原因',
            options: []
          },
          {
            filed1: 'arriveDateStart',
            filed2: 'arriveDateEnd',
            type: 'datetime',
@@ -201,14 +218,37 @@
          }
        ],
        online: true
      }
      },
      ids: []
    }
  },
  created() {
    this.changeRadio('0')
    this.getplatformReasons()
    // this.getList()
  },
  methods: {
    handleSelectionChange(ids) {
      this.ids = ids.map(item => item.jobId)
    },
    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(() => {
      });
    },
    checkSurplus() {
      const { arriveDate, reasonId, totalNum } = this.param
      if (!arriveDate || !reasonId || !totalNum) return
@@ -217,8 +257,6 @@
        reasonId,
        totalNum
      }).then(res => {
        console.log('res', res)
        if (res == 0 || res < Number(totalNum)) {
          Message.error(`当日剩余可预约作业量${res}万支不足请选择其他到场日期`)
        }
@@ -316,6 +354,16 @@
        this.reasonList = res || []
      })
    },
    getplatformReasons() {
      platformReasonList().then(res => {
        this.queryFormConfig.formItems[4].options = (res || []).map(item => {
          return {
            value: item.id,
            label: item.reason
          }
        })
      })
    },
    handleSub() {
      this.$refs.ruleForm.validate((valid) => {
        if (valid) {
admin/src/views/platform/LogisticsRecord/waybill.vue
@@ -11,10 +11,12 @@
      </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>
    </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="carCodeFront" label="车牌前照号" min-width="100" show-overflow-tooltip />
      <!-- <el-table-column prop="carCodeBack" label="车牌后照号" min-width="100" show-overflow-tooltip /> -->
@@ -27,7 +29,7 @@
        <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>
@@ -37,13 +39,14 @@
        </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="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].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']"
@@ -61,7 +64,7 @@
<script>
import Pagination from '@/components/common/Pagination'
import QueryForm from '@/components/common/QueryForm'
import { platformJobPage, platformJobExport, platformJobDel } from '@/api'
import { platformJobPage, platformJobExport, platformJobDel, dealJobFinish } from '@/api'
import { statusMap } from '../config'
import WaybillDetailRef from "../components/WaybillDetail.vue"
import GlobalWindow from '@/components/common/GlobalWindow'
@@ -139,6 +142,18 @@
            ]
          },
          {
            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',
@@ -152,12 +167,34 @@
        ],
        online: true
      },
      ids: []
    }
  },
  created() {
    this.changeRadio('0')
  },
  methods: {
    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(() => {
      });
    },
    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]