|
@@ -0,0 +1,1023 @@
|
|
|
+<template>
|
|
|
+ <div class="saleChemicalCokeFormMonitor">
|
|
|
+ <div class="top">
|
|
|
+ <el-form :inline="true">
|
|
|
+ <el-form-item>
|
|
|
+ <el-select
|
|
|
+ v-model="condition1"
|
|
|
+ placeholder="筛选条件"
|
|
|
+ style="width:120px"
|
|
|
+ clearable
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in options"
|
|
|
+ :key="item.value"
|
|
|
+ :label="item.label"
|
|
|
+ :value="item.value"
|
|
|
+ >
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ <el-input
|
|
|
+ placeholder="请输入内容"
|
|
|
+ v-model="input1"
|
|
|
+ style="width:180px"
|
|
|
+ clearable
|
|
|
+ >
|
|
|
+ </el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item>
|
|
|
+ <el-select
|
|
|
+ v-model="condition2"
|
|
|
+ placeholder="筛选条件"
|
|
|
+ style="width:120px"
|
|
|
+ clearable
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in options"
|
|
|
+ :key="item.value"
|
|
|
+ :label="item.label"
|
|
|
+ :value="item.value"
|
|
|
+ >
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ <el-input
|
|
|
+ placeholder="请输入内容"
|
|
|
+ v-model="input2"
|
|
|
+ style="width:180px"
|
|
|
+ clearable
|
|
|
+ >
|
|
|
+ </el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item>
|
|
|
+ <el-select
|
|
|
+ v-model="screen"
|
|
|
+ placeholder="时间类型"
|
|
|
+ clearable
|
|
|
+ style="width:85px"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in timeOptions"
|
|
|
+ :key="item.value"
|
|
|
+ :label="item.label"
|
|
|
+ :value="item.value"
|
|
|
+ >
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ <el-date-picker
|
|
|
+ v-model="startTime"
|
|
|
+ type="datetime"
|
|
|
+ placeholder="派车时间"
|
|
|
+ style="width: 180px;"
|
|
|
+ >
|
|
|
+ </el-date-picker>
|
|
|
+ <span>至</span>
|
|
|
+ <el-date-picker
|
|
|
+ v-model="endTime"
|
|
|
+ type="datetime"
|
|
|
+ placeholder="派车时间"
|
|
|
+ style="width: 180px;"
|
|
|
+ >
|
|
|
+ </el-date-picker>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <el-form :inline="true">
|
|
|
+ <el-form-item>
|
|
|
+ <el-select
|
|
|
+ v-model="condition3"
|
|
|
+ placeholder="筛选条件"
|
|
|
+ style="width:120px"
|
|
|
+ clearable
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in options"
|
|
|
+ :key="item.value"
|
|
|
+ :label="item.label"
|
|
|
+ :value="item.value"
|
|
|
+ >
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ <el-input
|
|
|
+ placeholder="请输入内容"
|
|
|
+ v-model="input3"
|
|
|
+ style="width:180px"
|
|
|
+ clearable
|
|
|
+ >
|
|
|
+ </el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item>
|
|
|
+ <span>已进厂车数:</span>
|
|
|
+ <el-input
|
|
|
+ v-model="enFactoryNumber"
|
|
|
+ :disabled="true"
|
|
|
+ style="width: 100px;"
|
|
|
+ ></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item>
|
|
|
+ <span>已过毛车数:</span>
|
|
|
+ <el-input
|
|
|
+ v-model="grossNumber"
|
|
|
+ :disabled="true"
|
|
|
+ style="width: 100px;"
|
|
|
+ ></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item>
|
|
|
+ <span>合计净重:</span>
|
|
|
+ <el-input
|
|
|
+ v-model="totalNumber"
|
|
|
+ :disabled="true"
|
|
|
+ style="width: 100px;"
|
|
|
+ ></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item>
|
|
|
+ <span>合计车数:</span>
|
|
|
+ <el-input
|
|
|
+ v-model="totalCapacity"
|
|
|
+ :disabled="true"
|
|
|
+ style="width: 50px;"
|
|
|
+ ></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ </div>
|
|
|
+ <div class="elDivider">
|
|
|
+ <el-divider></el-divider>
|
|
|
+ </div>
|
|
|
+ <div class="buttonModel">
|
|
|
+ <div class="operation">
|
|
|
+ <el-button type="primary" @click="dealWithOverWeight">
|
|
|
+ 超重出厂
|
|
|
+ </el-button>
|
|
|
+ <el-button type="primary" @click="openReceive">
|
|
|
+ <i class="el-icon-document"></i>签收抵达</el-button
|
|
|
+ >
|
|
|
+ <el-button type="primary" @click="checkTrans">
|
|
|
+ <i class="el-icon-truck"></i>轨迹
|
|
|
+ </el-button>
|
|
|
+ <el-button type="primary" @click="buLuCaseNo">
|
|
|
+ <i class="el-icon-truck"></i>补录箱号
|
|
|
+ </el-button>
|
|
|
+ <el-button type="primary" @click="closeTransOrder">
|
|
|
+ 关闭运单
|
|
|
+ </el-button>
|
|
|
+ </div>
|
|
|
+ <div class="search">
|
|
|
+ <el-button type="primary" @click="exportToExcel('销售化产焦炭报表')"
|
|
|
+ ><i class="el-icon-download"></i>Excel</el-button
|
|
|
+ >
|
|
|
+ <el-button type="primary" class="btn" @click="onclick">
|
|
|
+ <i class="el-icon-search"></i>查询
|
|
|
+ </el-button>
|
|
|
+ <el-button type="primary" @click="refresh">
|
|
|
+ <i class="el-icon-refresh"></i>
|
|
|
+ </el-button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="main">
|
|
|
+ <dilTable
|
|
|
+ id="excelDom"
|
|
|
+ ref="excelDom"
|
|
|
+ v-bind.sync="option"
|
|
|
+ :isHeigth="isHeigth"
|
|
|
+ :isKuang="isKuang"
|
|
|
+ @func="func"
|
|
|
+ highlight-current-row
|
|
|
+ @radio-change="selectOne"
|
|
|
+ :pageSize="pageSize"
|
|
|
+ >
|
|
|
+ <el-table-column
|
|
|
+ label="抵达地址"
|
|
|
+ width="150"
|
|
|
+ :show-overflow-tooltip="true"
|
|
|
+ >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-button
|
|
|
+ type="text"
|
|
|
+ size="small"
|
|
|
+ @click="showPic(scope.row.arrivalPhoto)"
|
|
|
+ >{{ scope.row.arrivalAddress }}</el-button
|
|
|
+ >
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ label="签收地址"
|
|
|
+ width="150"
|
|
|
+ :show-overflow-tooltip="true"
|
|
|
+ >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-button
|
|
|
+ type="text"
|
|
|
+ size="small"
|
|
|
+ @click="showPic(scope.row.receiptPhoto)"
|
|
|
+ >{{ scope.row.receiptAddress }}</el-button
|
|
|
+ >
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </dilTable>
|
|
|
+ </div>
|
|
|
+ <div style="height: 100%">
|
|
|
+ <vxe-modal
|
|
|
+ width="1237"
|
|
|
+ height="731"
|
|
|
+ v-model="value7"
|
|
|
+ show-zoom
|
|
|
+ resize
|
|
|
+ title="轨迹查询"
|
|
|
+ >
|
|
|
+ <template #default>
|
|
|
+ <PathView v-bind.sync="pathOption"></PathView>
|
|
|
+ </template>
|
|
|
+ </vxe-modal>
|
|
|
+ </div>
|
|
|
+ <el-dialog :visible.sync="disvisiable">
|
|
|
+ <div class="admin2">
|
|
|
+ <div class="carrier from">
|
|
|
+ <el-form :inline="true" class="demo-form-inline" label-width="80px">
|
|
|
+ <el-form-item label="车牌号:">
|
|
|
+ <el-autocomplete
|
|
|
+ class="inline-input"
|
|
|
+ v-model="capacityName"
|
|
|
+ :fetch-suggestions="querySearchCapacity"
|
|
|
+ placeholder="车牌号"
|
|
|
+ :trigger-on-focus="false"
|
|
|
+ @select="handleSelectCapacity"
|
|
|
+ >
|
|
|
+ <template slot-scope="{ item }">
|
|
|
+ <div class="name">{{ item.capacityNumber }}</div>
|
|
|
+ </template>
|
|
|
+ </el-autocomplete>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ </div>
|
|
|
+ <div class="poundNo from">
|
|
|
+ <span class="text">运输订单号:</span>
|
|
|
+ <el-input v-model="orderNumber" disabled></el-input>
|
|
|
+ </div>
|
|
|
+ <div class="button_box">
|
|
|
+ <el-button type="primary" @click="updateCanwork" :disabled="disabled"
|
|
|
+ >确认</el-button
|
|
|
+ >
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
+ <el-dialog :visible.sync="caseNoVisiable">
|
|
|
+ <div class="admin2">
|
|
|
+ <div class="poundNo from">
|
|
|
+ <span class="text">运输订单号:</span>
|
|
|
+ <el-input v-model="orderNumber" disabled></el-input>
|
|
|
+ </div>
|
|
|
+ <div class="poundNo from">
|
|
|
+ <span class="text">箱号:</span>
|
|
|
+ <el-input v-model="caseNumber"></el-input>
|
|
|
+ </div>
|
|
|
+ <div class="button_box">
|
|
|
+ <el-button type="primary" @click="buLuCaseNoZx()">确认</el-button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
+ <el-dialog
|
|
|
+ title="抵达签收"
|
|
|
+ :visible.sync="arrivalReceiving"
|
|
|
+ :before-close="closeUpload"
|
|
|
+ >
|
|
|
+ <el-form style="margin-left:20%">
|
|
|
+ <el-form-item label="车牌号码">
|
|
|
+ <el-input
|
|
|
+ v-model="capacityNumber"
|
|
|
+ disabled
|
|
|
+ style="width:300px"
|
|
|
+ ></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="签收地址">
|
|
|
+ <el-input
|
|
|
+ v-model="location"
|
|
|
+ style="width:400px"
|
|
|
+ :disabled="orgCode != 'wuliuyunshubu'"
|
|
|
+ ></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="抵达时间">
|
|
|
+ <el-date-picker
|
|
|
+ v-model="arrivalTime"
|
|
|
+ type="datetime"
|
|
|
+ :disabled="orgCode != 'wuliuyunshubu'"
|
|
|
+ placeholder="选择日期时间"
|
|
|
+ >
|
|
|
+ </el-date-picker>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="签收时间">
|
|
|
+ <el-date-picker
|
|
|
+ v-model="receiptTime"
|
|
|
+ type="datetime"
|
|
|
+ :disabled="orgCode != 'wuliuyunshubu'"
|
|
|
+ placeholder="选择日期时间"
|
|
|
+ >
|
|
|
+ </el-date-picker>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="抵达图片(车头、满货箱)" style="">
|
|
|
+ <el-upload
|
|
|
+ ref="arrival"
|
|
|
+ list-type="picture-card"
|
|
|
+ :file-list="arriavlList"
|
|
|
+ action="/api/v1/otms/addtmstruckArrivalResult"
|
|
|
+ :limit="12"
|
|
|
+ :on-change="fileChange1"
|
|
|
+ :on-remove="fileChange1"
|
|
|
+ :on-preview="handlePictureCardPreview"
|
|
|
+ :on-exceed="exceed"
|
|
|
+ accept=".jpg,.jpeg,.png,.gif,.bmp,.JPG,.JPEG,.PBG,.GIF,.BMP,.PDF"
|
|
|
+ :auto-upload="false"
|
|
|
+ >
|
|
|
+ <i class="el-icon-plus"></i>
|
|
|
+ </el-upload>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="签收图片(空货箱、质保书、签收单)">
|
|
|
+ <el-upload
|
|
|
+ ref="receive"
|
|
|
+ list-type="picture-card"
|
|
|
+ :file-list="receiveList"
|
|
|
+ action="null"
|
|
|
+ :limit="11"
|
|
|
+ :on-change="fileChange2"
|
|
|
+ :on-remove="fileChange2"
|
|
|
+ :on-preview="handlePictureCardPreview"
|
|
|
+ :on-exceed="exceed"
|
|
|
+ accept=".jpg,.jpeg,.png,.gif,.bmp,.JPG,.JPEG,.PBG,.GIF,.BMP,.PDF"
|
|
|
+ :auto-upload="false"
|
|
|
+ >
|
|
|
+ <i class="el-icon-plus"></i>
|
|
|
+ </el-upload>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ @click="arrivalAndReceive"
|
|
|
+ :loading="isLoading"
|
|
|
+ style="margin-left:40%"
|
|
|
+ >确定</el-button
|
|
|
+ >
|
|
|
+ </el-dialog>
|
|
|
+ <el-dialog title="图片预览" :visible.sync="dialogVisible" width="80%">
|
|
|
+ <img width="100%" :src="dialogImageUrl" alt="" />
|
|
|
+ </el-dialog>
|
|
|
+ <el-dialog title="图片查看" :visible.sync="dialogVisible2" width="80%">
|
|
|
+ <img
|
|
|
+ width="100%"
|
|
|
+ v-for="item in picList"
|
|
|
+ :src="item"
|
|
|
+ :key="item"
|
|
|
+ alt=""
|
|
|
+ />
|
|
|
+ </el-dialog>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+<script>
|
|
|
+import { sjTime } from '@/utils/sharedJsFile'
|
|
|
+import { getCookie } from '@/utils/util.js'
|
|
|
+import PathView from './mapTest.vue'
|
|
|
+import currentLocation from './currentLocation.vue'
|
|
|
+import { downloadFile, creatImageFile } from '@/utils/base64ToBlob.js'
|
|
|
+export default {
|
|
|
+ components: {
|
|
|
+ PathView,
|
|
|
+ currentLocation
|
|
|
+ },
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ caseNoVisiable: false,
|
|
|
+ caseNumber: null,
|
|
|
+ condition1: null,
|
|
|
+ condition2: null,
|
|
|
+ condition3: null,
|
|
|
+ input1: '',
|
|
|
+ input2: '',
|
|
|
+ input3: '',
|
|
|
+ options: [
|
|
|
+ {
|
|
|
+ label: '车牌号',
|
|
|
+ value: 'capacityNumber'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '收货单位',
|
|
|
+ value: 'receivName'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '物资名称/备注',
|
|
|
+ value: 'remark'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '装货地点',
|
|
|
+ value: 'wareHouse'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '摘要',
|
|
|
+ value: 'saleRemark'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '仓库',
|
|
|
+ value: 'saleWarehouse'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '车辆状态',
|
|
|
+ value: 'transportStatus'
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ orderNumber: null,
|
|
|
+ orderId: null,
|
|
|
+ disabled: false,
|
|
|
+ capacityName: null,
|
|
|
+ disvisiable: false,
|
|
|
+ wareHouse: null,
|
|
|
+ inputMaterial: null,
|
|
|
+ // shiyHeigth: 140,
|
|
|
+ isHeigth: true,
|
|
|
+ pageSize: 20,
|
|
|
+ isKuang: false,
|
|
|
+ option: {
|
|
|
+ requestUrl: '',
|
|
|
+ selectionType: 'radio',
|
|
|
+ requestQuery: null
|
|
|
+ },
|
|
|
+ startTime: null,
|
|
|
+ endTime: null,
|
|
|
+ //合计净重
|
|
|
+ totalNumber: 0,
|
|
|
+ //合计车数
|
|
|
+ totalCapacity: 0,
|
|
|
+ enFactoryNumber: 0,
|
|
|
+ grossNumber: 0,
|
|
|
+ tableTitle: '销售统计报表',
|
|
|
+ inputReceiveName: null,
|
|
|
+ //抵达签收
|
|
|
+ selection: null,
|
|
|
+ orgCode: null,
|
|
|
+ location: null,
|
|
|
+ capacityNumber: null,
|
|
|
+ arrivalReceiving: false,
|
|
|
+ arriavlList: [],
|
|
|
+ receiveList: [],
|
|
|
+ fileListArrival: [],
|
|
|
+ fileListReceive: [],
|
|
|
+ dialogImageUrl: '',
|
|
|
+ dialogVisible: false,
|
|
|
+ picList: [],
|
|
|
+ dialogVisible2: false,
|
|
|
+ isLoading: false,
|
|
|
+ arrivalTime: null,
|
|
|
+ receiptTime: null,
|
|
|
+ dialogFormVisible: false,
|
|
|
+ //轨迹
|
|
|
+ value7: false,
|
|
|
+ pathOption: {
|
|
|
+ orderNumber: '',
|
|
|
+ capacityNumber: '',
|
|
|
+ startPointName: '',
|
|
|
+ endPointName: '',
|
|
|
+ statusCode: '位置'
|
|
|
+ },
|
|
|
+ screen: 0,
|
|
|
+ timeOptions: [
|
|
|
+ {
|
|
|
+ label: '派车时间',
|
|
|
+ value: 0
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '进厂时间',
|
|
|
+ value: 1
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ }
|
|
|
+ },
|
|
|
+ created() {
|
|
|
+ this.getRequestUrl({
|
|
|
+ isEnFactoryFlag: this.screen
|
|
|
+ })
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ buLuCaseNo() {
|
|
|
+ if (!this.selection) {
|
|
|
+ this.$message.warning('请选择需要补录箱号的实绩')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ console.log(this.selection, 'this.selection')
|
|
|
+ this.orderNumber = this.selection.orderNumber
|
|
|
+ this.caseNumber = this.selection.caseNumber
|
|
|
+ this.caseNoVisiable = true
|
|
|
+ },
|
|
|
+ buLuCaseNoZx() {
|
|
|
+ console.log(this.selection, 'selection')
|
|
|
+ if (this.caseNumber) {
|
|
|
+ this.axios
|
|
|
+ .post('/api/v1/tms/updateLoadingIdRemark', {
|
|
|
+ loadResultId: this.selection.resultId,
|
|
|
+ caseNumber: this.caseNumber
|
|
|
+ })
|
|
|
+ .then(res => {
|
|
|
+ this.getRequestUrl()
|
|
|
+ this.$message({
|
|
|
+ type: 'success',
|
|
|
+ message: '补录成功',
|
|
|
+ offsite: 250,
|
|
|
+ duration: 2000
|
|
|
+ })
|
|
|
+ this.caseNoVisiable = false
|
|
|
+ })
|
|
|
+ .catch(e => {
|
|
|
+ this.$message({
|
|
|
+ type: 'error',
|
|
|
+ message: '补录失败',
|
|
|
+ offsite: 250,
|
|
|
+ duration: 2000
|
|
|
+ })
|
|
|
+ this.caseNoVisiable = false
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
+ //选中
|
|
|
+ selectOne(selection) {
|
|
|
+ this.selection = selection
|
|
|
+ },
|
|
|
+ closeTransOrder() {
|
|
|
+ if (!this.selection.orderId) {
|
|
|
+ this.$message({
|
|
|
+ type: 'warning',
|
|
|
+ message: '请先选择要关闭的订单!'
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ this.$confirm('是否关闭运单(出皮无法关闭)', '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning',
|
|
|
+ center: true
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
+ //初始化maplist
|
|
|
+ let mapList = []
|
|
|
+ mapList.push(this.selection)
|
|
|
+ this.axios
|
|
|
+ .post('/api/v1/oms/batchCloseOrder', mapList)
|
|
|
+ .then(res => {
|
|
|
+ if (res.data.code == '200') {
|
|
|
+ this.getRequestUrl()
|
|
|
+ this.$message({
|
|
|
+ type: 'success',
|
|
|
+ message: '关闭成功!'
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ this.$message({
|
|
|
+ type: 'error',
|
|
|
+ message: '关闭失败!'
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ this.$message({
|
|
|
+ type: 'info',
|
|
|
+ message: '取消关闭!'
|
|
|
+ })
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
+ //抵达签收
|
|
|
+ openReceive() {
|
|
|
+ if (!this.selection) {
|
|
|
+ this.$message.warning('请选择需要补录的实绩')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ let row = this.selection
|
|
|
+ if (!row.resultOutGateTime) {
|
|
|
+ this.$message.warning('该车未出厂,不允许签收')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (row.arrivalAddress) {
|
|
|
+ //优先获取抵达地址
|
|
|
+ this.location = row.arrivalAddress
|
|
|
+ } else {
|
|
|
+ //其次获取车辆定位
|
|
|
+ this.axios
|
|
|
+ .get(
|
|
|
+ '/api/v1/otms/getCurrentLocation?capcityNumber=' +
|
|
|
+ row.capacityNumber
|
|
|
+ )
|
|
|
+ .then(res => {
|
|
|
+ if (
|
|
|
+ res.data.status == 'succeed' &&
|
|
|
+ res.data.data.result.status != 1001
|
|
|
+ ) {
|
|
|
+ this.location = res.data.data.result.adr
|
|
|
+ } else {
|
|
|
+ this.location = null
|
|
|
+ // this.$message.warning('获取不到车辆定位!请联系销售公司上传!')
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ this.orderNumber = row.orderNumber
|
|
|
+ this.capacityNumber = row.capacityNumber
|
|
|
+ this.arrivalTime = row.arrivalTime
|
|
|
+ this.receiptTime = row.receiptTime
|
|
|
+ this.arrivalReceiving = true
|
|
|
+ //抵达图片
|
|
|
+ this.axios
|
|
|
+ .post('/api/v1/otms/getArrivalPhoto?orderNumber=' + row.orderNumber)
|
|
|
+ .then(res => {
|
|
|
+ console.log('arrivalPhoto:', res)
|
|
|
+ if (res.data) {
|
|
|
+ this.arriavlList = []
|
|
|
+ res.data.forEach((e, index) => {
|
|
|
+ creatImageFile(e, 'file1-' + index).then(res => {
|
|
|
+ this.arriavlList.push({
|
|
|
+ name: 'file' + index,
|
|
|
+ raw: res,
|
|
|
+ url: e
|
|
|
+ })
|
|
|
+ })
|
|
|
+ })
|
|
|
+ this.fileListArrival = this.arriavlList
|
|
|
+ }
|
|
|
+ })
|
|
|
+ //签收图片
|
|
|
+ this.axios
|
|
|
+ .post(
|
|
|
+ '/api/v1/otms/getReceivingPhotoByUrl?orderNumber=' + row.orderNumber
|
|
|
+ )
|
|
|
+ .then(res => {
|
|
|
+ console.log('ReceivingPhoto:', res)
|
|
|
+ if (res.data) {
|
|
|
+ this.receiveList = []
|
|
|
+ res.data.forEach((e, index) => {
|
|
|
+ creatImageFile(e, 'file2-' + index).then(res => {
|
|
|
+ this.receiveList.push({
|
|
|
+ name: 'file' + index,
|
|
|
+ raw: res,
|
|
|
+ url: e
|
|
|
+ })
|
|
|
+ })
|
|
|
+ })
|
|
|
+ this.fileListReceive = this.receiveList
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ arrivalAndReceive() {
|
|
|
+ if (!this.location) {
|
|
|
+ this.$message.warning(
|
|
|
+ '签收地址必须取车辆定位!若取不到请联系销售公司上传!'
|
|
|
+ )
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (this.fileListArrival.length < 3) {
|
|
|
+ this.$message.warning('抵达图至少三张')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (this.fileListReceive.length < 2) {
|
|
|
+ this.$message.warning('签收图最少两张')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ this.isLoading = true
|
|
|
+ //上传抵达
|
|
|
+ let formData = new window.FormData()
|
|
|
+ this.fileListArrival.forEach((item, index) => {
|
|
|
+ formData.append('file' + index, item.raw)
|
|
|
+ })
|
|
|
+ formData.append('orderNumber', this.orderNumber)
|
|
|
+ formData.append('resultArrivalAddress', this.location)
|
|
|
+ if (this.arrivalTime) {
|
|
|
+ formData.append('arrivalTime', sjTime(this.arrivalTime))
|
|
|
+ }
|
|
|
+ let options = {
|
|
|
+ // 设置axios的参数
|
|
|
+ url: '/api/v1/otms/addtmstruckArrivalResult',
|
|
|
+ data: formData,
|
|
|
+ method: 'post',
|
|
|
+ headers: {
|
|
|
+ 'Content-Type': 'multipart/form-data'
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.axios(options).then(res => {
|
|
|
+ console.log('arrivalRes:', res)
|
|
|
+ //上传签收
|
|
|
+ let formData = new window.FormData()
|
|
|
+ let request = ''
|
|
|
+ this.fileListReceive.forEach((item, index) => {
|
|
|
+ formData.append('file' + index, item.raw)
|
|
|
+ })
|
|
|
+ formData.append('orderNumber', this.orderNumber)
|
|
|
+ formData.append('resultArrivalAddress', this.location)
|
|
|
+ if (this.receiptTime) {
|
|
|
+ formData.append('receiptTime', sjTime(this.receiptTime))
|
|
|
+ }
|
|
|
+ formData.append('num', request.length)
|
|
|
+ let options = {
|
|
|
+ url: '/api/v1/otms/addTmstruckReceiptResultForWeb',
|
|
|
+ data: formData,
|
|
|
+ method: 'post',
|
|
|
+ headers: {
|
|
|
+ 'Content-Type': 'multipart/form-data'
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.axios(options).then(res => {
|
|
|
+ console.log('receiveRes:', res)
|
|
|
+ this.$message.success('上传成功!')
|
|
|
+ this.selection.arrivalAddress = this.location
|
|
|
+ this.closeUpload()
|
|
|
+ // this.refresh()
|
|
|
+ })
|
|
|
+ })
|
|
|
+ },
|
|
|
+ fileChange1(file, fileList) {
|
|
|
+ this.fileListArrival = fileList
|
|
|
+ },
|
|
|
+ fileChange2(file, fileList) {
|
|
|
+ this.fileListReceive = fileList
|
|
|
+ },
|
|
|
+ fileChange3(file, fileList) {
|
|
|
+ this.remarkPicList = fileList
|
|
|
+ },
|
|
|
+ exceed() {
|
|
|
+ this.$message.warning('超出上传数量!')
|
|
|
+ },
|
|
|
+ handlePictureCardPreview(file) {
|
|
|
+ this.dialogImageUrl = file.url
|
|
|
+ this.dialogVisible = true
|
|
|
+ },
|
|
|
+ closeUpload() {
|
|
|
+ this.location = null
|
|
|
+ this.arrivalTime = null
|
|
|
+ this.receiptTime = null
|
|
|
+ this.arrivalReceiving = false
|
|
|
+ this.isLoading = false
|
|
|
+ this.$refs.arrival.clearFiles()
|
|
|
+ this.$refs.receive.clearFiles()
|
|
|
+ },
|
|
|
+ showPic(urls) {
|
|
|
+ //获取图片到本地
|
|
|
+ this.axios.post('/api/v1/uc/getPicture', { urls: urls }).then(res => {
|
|
|
+ console.log(res)
|
|
|
+ if (res.data) {
|
|
|
+ this.picList = res.data
|
|
|
+ } else {
|
|
|
+ this.picList = []
|
|
|
+ }
|
|
|
+ this.dialogVisible2 = true
|
|
|
+ })
|
|
|
+ },
|
|
|
+ //轨迹
|
|
|
+ checkTrans() {
|
|
|
+ let row = this.selection
|
|
|
+ if (!this.selection) {
|
|
|
+ this.$message.error('请点击需要查看轨迹的行!')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (row.resultOutGateTime == null) {
|
|
|
+ this.$message.error('该车还未出厂,暂无轨迹')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ let that = this
|
|
|
+ that.axios
|
|
|
+ .post('/api/v1/otms/fullPath?orderNumber=' + row.orderNumber)
|
|
|
+ .then(res => {
|
|
|
+ console.log(res.data)
|
|
|
+ if (res.data.data == '-1') {
|
|
|
+ this.$message.error('运输订单未关闭的自提车辆无权查看!')
|
|
|
+ } else if (res.data.data.startAndEndRoutes != null) {
|
|
|
+ that.pathOption.orderNumber = row.orderNumber
|
|
|
+ that.pathOption.capacityNumber = row.capacityNumber
|
|
|
+ that.pathOption.startPointName = '达钢集团小东门'
|
|
|
+ that.pathOption.endPointName = row.receiptAddress
|
|
|
+ that.value7 = true
|
|
|
+ if (row.orderStatus == '已完成') {
|
|
|
+ that.pathOption.statusCode = '位置'
|
|
|
+ } else {
|
|
|
+ that.pathOption.statusCode = '当前位置'
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ this.$message.error('车辆没有开启GPS')
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ exportToExcel(tableTitle = '表格标题') {
|
|
|
+ //创建工作簿对象
|
|
|
+ let wb = XLSX.utils.book_new()
|
|
|
+ let requestQuery = {}
|
|
|
+ requestQuery.isEnFactoryFlag = this.screen
|
|
|
+ if (this.startTime && this.endTime) {
|
|
|
+ requestQuery.startTime = sjTime(this.startTime)
|
|
|
+ requestQuery.endTime = sjTime(this.endTime)
|
|
|
+ }
|
|
|
+ if (!this.condition1) {
|
|
|
+ requestQuery['remarkOne'] = this.input1 + ''
|
|
|
+ } else {
|
|
|
+ requestQuery[this.condition1] = this.input1
|
|
|
+ }
|
|
|
+ if (!this.condition2) {
|
|
|
+ requestQuery['remarkTwo'] = this.input2 + ''
|
|
|
+ } else {
|
|
|
+ requestQuery[this.condition2] = this.input2 + ''
|
|
|
+ }
|
|
|
+ if (!this.condition3) {
|
|
|
+ requestQuery['remarkThree'] = this.input3 + ''
|
|
|
+ } else {
|
|
|
+ requestQuery[this.condition3] = this.input3 + ''
|
|
|
+ }
|
|
|
+ requestQuery.isExcel = 1
|
|
|
+ //查询数据
|
|
|
+ this.axios.post(this.option.requestUrl, requestQuery).then(res => {
|
|
|
+ console.log(res, 'res')
|
|
|
+ let columnData = res.data.data.columnData
|
|
|
+ let data = []
|
|
|
+ if (!res.data.data.list || res.data.data.list.length <= 0) {
|
|
|
+ this.$message({
|
|
|
+ message: '请先查询,再导出!',
|
|
|
+ type: 'warning',
|
|
|
+ duration: 1000
|
|
|
+ })
|
|
|
+ return
|
|
|
+ } else {
|
|
|
+ //替换表头
|
|
|
+ console.log('columnData', columnData)
|
|
|
+ res.data.data.list.forEach((item, index) => {
|
|
|
+ let temp = {}
|
|
|
+ columnData.forEach(col => {
|
|
|
+ temp[col.label] = item[col.prop]
|
|
|
+ })
|
|
|
+ data.push(temp)
|
|
|
+ })
|
|
|
+ console.log('data', data)
|
|
|
+ //将json数组转换成sheet
|
|
|
+ let table_sheet = XLSX.utils.json_to_sheet(data)
|
|
|
+ //为工作簿添加sheet
|
|
|
+ XLSX.utils.book_append_sheet(wb, table_sheet, '第一页')
|
|
|
+ //导出
|
|
|
+ XLSX.writeFile(wb, tableTitle + '.xlsx')
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ //以下是运力边输边查搜索
|
|
|
+ querySearchCapacity(queryString, cb) {
|
|
|
+ if (queryString.length < 3) {
|
|
|
+ return
|
|
|
+ }
|
|
|
+ this.axios
|
|
|
+ .get('/api/v1/uc/getCapacityNumber?index=' + queryString)
|
|
|
+ .then(res => {
|
|
|
+ if (res.data.code == '200') {
|
|
|
+ var restaurantsCarrier = res.data.data
|
|
|
+ console.log(restaurantsCarrier, 'restaurantsCarrier')
|
|
|
+ var results = queryString
|
|
|
+ ? restaurantsCarrier.filter(this.createFilterCarrier(queryString))
|
|
|
+ : restaurantsCarrier
|
|
|
+ // 调用 callback 返回建议列表的数据
|
|
|
+ cb(results)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ createFilterCarrier(queryString) {
|
|
|
+ return restaurantsCarrier => {
|
|
|
+ return (
|
|
|
+ restaurantsCarrier.capacityNumber
|
|
|
+ .toLowerCase()
|
|
|
+ .indexOf(queryString.toLowerCase()) > -1
|
|
|
+ )
|
|
|
+ }
|
|
|
+ },
|
|
|
+ updateCanwork() {
|
|
|
+ this.axios
|
|
|
+ .post('/api/v1/bp/updateOrderCanWork?orderNumber=' + this.orderNumber)
|
|
|
+ .then(res => {
|
|
|
+ this.$message.success('修改成功')
|
|
|
+ this.getRequestUrl()
|
|
|
+ this.disvisiable = false
|
|
|
+ })
|
|
|
+ },
|
|
|
+ //运力弹出层
|
|
|
+ handleSelectCapacity(item) {
|
|
|
+ this.capacityId = item.capacityId
|
|
|
+ this.capacityName = item.capacityNumber
|
|
|
+ this.axios
|
|
|
+ .get('/api/v1/uc/getOrderNumber?capacityId=' + this.capacityId)
|
|
|
+ .then(res => {
|
|
|
+ if (res.data.code == '200') {
|
|
|
+ this.orderId = res.data.data.orderId
|
|
|
+ this.orderNumber = res.data.data.orderNumber
|
|
|
+ this.axios
|
|
|
+ .get('/api/v1/uc/getMaterialIdByOrderId?orderId=' + this.orderId)
|
|
|
+ .then(res => {
|
|
|
+ if (res.data.code == '200') {
|
|
|
+ this.materialList = res.data.data
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ refresh() {
|
|
|
+ this.getRequestUrl()
|
|
|
+ },
|
|
|
+ func(res) {
|
|
|
+ this.totalNumber = res.list[0].totalNumber
|
|
|
+ this.totalCapacity = res.total
|
|
|
+ //统计已进厂车数
|
|
|
+ this.enFactoryNumber = res.list[0].enFactoryNumber
|
|
|
+ this.grossNumber = res.list[0].grossNumber
|
|
|
+ //获取总记录条数作为合计车数
|
|
|
+ // this.totalCapacity = res.total;
|
|
|
+ this.isKuang = false
|
|
|
+ },
|
|
|
+ onclick() {
|
|
|
+ let requestQuery = {}
|
|
|
+ requestQuery.isEnFactoryFlag = this.screen
|
|
|
+ if (this.startTime && this.endTime) {
|
|
|
+ requestQuery.startTime = sjTime(this.startTime)
|
|
|
+ requestQuery.endTime = sjTime(this.endTime)
|
|
|
+ }
|
|
|
+ if (!this.condition1) {
|
|
|
+ requestQuery['remarkOne'] = this.input1 + ''
|
|
|
+ } else {
|
|
|
+ requestQuery[this.condition1] = this.input1
|
|
|
+ }
|
|
|
+ if (!this.condition2) {
|
|
|
+ requestQuery['remarkTwo'] = this.input2 + ''
|
|
|
+ } else {
|
|
|
+ requestQuery[this.condition2] = this.input2 + ''
|
|
|
+ }
|
|
|
+ if (!this.condition3) {
|
|
|
+ requestQuery['remarkThree'] = this.input3 + ''
|
|
|
+ } else {
|
|
|
+ requestQuery[this.condition3] = this.input3 + ''
|
|
|
+ }
|
|
|
+ console.log(requestQuery, 'requestQuery')
|
|
|
+ this.option.requestQuery = requestQuery
|
|
|
+ // console.log(this.option.requestQuery, 'this.option.requestQuery')
|
|
|
+ },
|
|
|
+ //格式化日期
|
|
|
+ dataFormat(value) {
|
|
|
+ let date = new Date(value)
|
|
|
+ let y = date.getFullYear()
|
|
|
+ let MM = date.getMonth() + 1
|
|
|
+ MM = MM < 10 ? '0' + MM : MM
|
|
|
+ let d = date.getDate()
|
|
|
+ d = d < 10 ? '0' + d : d
|
|
|
+ let h = date.getHours()
|
|
|
+ h = h < 10 ? '0' + h : h
|
|
|
+ let m = date.getMinutes()
|
|
|
+ m = m < 10 ? '0' + m : m
|
|
|
+ let s = date.getSeconds()
|
|
|
+ s = s < 10 ? '0' + s : s
|
|
|
+ return y + '-' + MM + '-' + d + ' ' + h + ':' + m + ':' + s
|
|
|
+ },
|
|
|
+ dealWithOverWeight() {
|
|
|
+ this.disvisiable = true
|
|
|
+ },
|
|
|
+ getRequestUrl(
|
|
|
+ data = {
|
|
|
+ isEnFactoryFlag: this.screen
|
|
|
+ }
|
|
|
+ ) {
|
|
|
+ if (getCookie('orgCode') == 'chengyunshang') {
|
|
|
+ this.option.requestUrl =
|
|
|
+ '/api/v1/tms/getAllSaleReportByLb?apiId=526&startTime=null&endTime=null&orderType=2&shipperId=2&carrierSsoId=' +
|
|
|
+ getCookie('userId') +
|
|
|
+ '&i=' +
|
|
|
+ new Date()
|
|
|
+ } else {
|
|
|
+ this.option.requestUrl =
|
|
|
+ '/api/v1/tms/getAllSaleReportByLb?apiId=526&startTime=null&endTime=null&orderType=2&shipperId=2&carrierSsoId=' +
|
|
|
+ null +
|
|
|
+ '&i=' +
|
|
|
+ new Date()
|
|
|
+ }
|
|
|
+ this.onclick()
|
|
|
+ this.option.requestQuery = data
|
|
|
+ //时间段初始化
|
|
|
+ const start = new Date(
|
|
|
+ new Date(new Date().toLocaleDateString()).getTime()
|
|
|
+ )
|
|
|
+ let startTime = this.dataFormat(sjTime(start))
|
|
|
+ let endTime = this.dataFormat(sjTime(new Date()))
|
|
|
+ this.tableTitle = startTime + ' 至 ' + endTime
|
|
|
+ this.orgCode = getCookie('orgCode')
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+</script>
|
|
|
+<style lang="scss" scoped>
|
|
|
+.saleChemicalCokeFormMonitor {
|
|
|
+ .top {
|
|
|
+ margin-top: 10px;
|
|
|
+ margin-left: 10px;
|
|
|
+ }
|
|
|
+ .buttonModel {
|
|
|
+ margin-top: 5px;
|
|
|
+
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
+ align-items: center;
|
|
|
+ .operation {
|
|
|
+ margin-left: 10px;
|
|
|
+ }
|
|
|
+ .search {
|
|
|
+ margin-right: 10px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .main {
|
|
|
+ margin-left: 10px;
|
|
|
+ margin-top: 5px;
|
|
|
+ }
|
|
|
+}
|
|
|
+</style>
|