<template>
|
<div class="main tabs_main" style="height:89%">
|
<div class="main_header">
|
<!-- <div class="header_item">
|
<span class="header_label">项目名称:</span>
|
<el-select v-model="search.assistId" placeholder="请选择项目名称" clearable>
|
<el-option
|
v-for="item in optionsAuxiliary"
|
:key="item.id"
|
:label="item.assistName+'-'+item.assistModel"
|
:value="item.id">
|
</el-option>
|
</el-select>
|
</div> -->
|
<div class="header_item">
|
<span class="header_label">车牌号:</span>
|
<el-input v-model="search.carBrand" :size="size" clearable placeholder="请输入车牌号"></el-input>
|
</div>
|
<div class="header_item">
|
<span class="header_label">环号:</span>
|
<el-input v-model="search.ringNum" :size="size" clearable placeholder="请输入环号"></el-input>
|
</div>
|
<div class="header_item">
|
<span class="header_label">管片编号:</span>
|
<el-input v-model="search.pipeNum" :size="size" clearable placeholder="请输入管片编号"></el-input>
|
</div>
|
<div class="header_item">
|
<el-button icon="el-icon-search" v-if="showButton('search')" @click="searchButtonInfo(true)">查询</el-button>
|
<el-button class="search_btn" icon="el-icon-plus" v-if="showButton('insert')" @click="insertProp">新增</el-button>
|
</div>
|
</div>
|
<div class="main_content">
|
<el-table
|
v-loading="loading"
|
:data="dataList"
|
height="100%">
|
<el-table-column align="center" label="序号" width="60">
|
<template #default="scope">
|
<span>{{(pageNum - 1) * pageSize + scope.$index + 1}}</span>
|
</template>
|
</el-table-column>
|
<el-table-column prop="realName" label="出库人" align="center" width="120"></el-table-column>
|
<el-table-column prop="carBrand" label="车牌号" align="center" show-overflow-tooltip></el-table-column>
|
<el-table-column prop="gdName" label="GPS设备" align="center" show-overflow-tooltip></el-table-column>
|
<el-table-column prop="proName" label="项目名称" align="center" show-overflow-tooltip></el-table-column>
|
<el-table-column prop="carDriver" label="司机" align="center" ></el-table-column>
|
<el-table-column prop="carPhone" label="联系电话" align="center" show-overflow-tooltip></el-table-column>
|
<el-table-column prop="reciverName" label="收货人" align="center" ></el-table-column>
|
<el-table-column prop="reciverPhone" label="收货人电话" align="center" width="120" ></el-table-column>
|
<el-table-column prop="reciverUnit" label="收货单位" align="center" width="120" ></el-table-column>
|
<el-table-column label="运输起止时间" align="center" width="250">
|
<template #default="{row}">
|
<div>{{row.strTime}}-{{row.endTime}}</div>
|
</template>
|
</el-table-column>
|
<el-table-column prop="notes" label="备注" align="center" show-overflow-tooltip></el-table-column>
|
<el-table-column label="操作" align="center" width="450">
|
<template #default="{ row }">
|
<el-button class="table_btn" size="mini" v-if="showButton('update')" @click="showGps(row)">GPS轨迹</el-button>
|
<el-button class="table_btn" size="mini" v-if="showButton('update')" @click="infoUpload(row)">发运单打印</el-button>
|
<el-button class="table_btn" size="mini" v-if="showButton('update')" @click="updateProp(row)">修改</el-button>
|
<el-button class="delete_btn" size="mini" v-if="showButton('delete')" @click="deleteInfo(row)">删除</el-button>
|
<el-button class="table_btn" size="mini" v-if="showButton('delete')" @click="detailsInfo(row)">详情</el-button>
|
</template>
|
</el-table-column>
|
</el-table>
|
</div>
|
<div class="main_footer">
|
<el-pagination
|
background
|
@current-change="changePageNum"
|
@size-change="changePageSize"
|
:current-page="pageNum"
|
:page-sizes="[10, 20, 50, 100]"
|
:page-size="pageSize"
|
layout="total, sizes, prev, pager, next, jumper"
|
:total="total">
|
</el-pagination>
|
</div>
|
<el-dialog
|
class="prop_dialog"
|
:title="asyncTitle === true ? '新增出库' :asyncTitle === false ? '修改出库信息':'出库详情'"
|
:close-on-click-modal="false"
|
:visible.sync="asyncVisible"
|
width="35%">
|
<el-form ref="ruleForm" :model="ruleForm" :rules="rules" label-width="auto" class="rule_form" style="overflow-x: hidden;">
|
<el-form-item label="车牌号:" prop="carId">
|
<el-select v-model="ruleForm.carId" :size="size" placeholder="请选择车牌号" @change="carsChange" clearable :disabled="disabled">
|
<el-option
|
v-for="item in optionsCarbrand"
|
:key="item.carId"
|
:label="item.carBrand"
|
:value="item.carId">
|
</el-option>
|
</el-select>
|
</el-form-item>
|
<el-form-item label="GPS设备:" prop="gdId">
|
<el-select v-model="ruleForm.gdId" :size="size" placeholder="请选择GPS设备" clearable :disabled="disabled">
|
<el-option
|
v-for="item in gpsDevicesGroup"
|
:key="item.gdId"
|
:label="item.gdName"
|
:value="item.gdId">
|
</el-option>
|
</el-select>
|
</el-form-item>
|
<el-form-item label="项目名称:" prop="proId">
|
<el-select v-model="ruleForm.proId" :size="size" placeholder="请选择项目名称" clearable :disabled="disabled">
|
<el-option
|
v-for="item in projectNameGroup"
|
:key="item.proId"
|
:label="item.proName"
|
:value="item.proId">
|
</el-option>
|
</el-select>
|
</el-form-item>
|
<el-form-item label="司机:" prop="carDriver">
|
<el-input v-model="ruleForm.carDriver" :size="size" clearable placeholder="请输入司机" :disabled="true"></el-input>
|
</el-form-item>
|
<el-form-item label="联系电话:" prop="carPhone">
|
<el-input v-model="ruleForm.carPhone" :size="size" clearable placeholder="请输入联系电话" :disabled="true"></el-input>
|
</el-form-item>
|
<el-form-item label="收货人:" prop="inUserId">
|
<el-select v-model="ruleForm.inUserId" placeholder="请选择收货人" @change="usersChange" clearable :disabled="disabled">
|
<el-option
|
v-for="item in optionsReciver"
|
:key="item.id"
|
:label="item.reciverName"
|
:value="item.id">
|
</el-option>
|
</el-select>
|
</el-form-item>
|
<el-form-item label="收货人电话:" prop="reciverPhone">
|
<el-input v-model="ruleForm.reciverPhone" :size="size" clearable placeholder="请输入收货人电话" :disabled="true"></el-input>
|
</el-form-item>
|
<el-form-item label="收货单位:" prop="reciverUnit">
|
<el-input v-model="ruleForm.reciverUnit" :size="size" clearable placeholder="请输入收货单位" :disabled="true"></el-input>
|
</el-form-item>
|
<el-form-item label="运输起止时间:" prop="time">
|
<el-date-picker
|
v-model="ruleForm.time"
|
type="datetimerange"
|
value-format="yyyy-MM-dd HH:mm:ss"
|
:default-time="['00:00:00','23:59:59']"
|
range-separator="-"
|
:disabled="disabled"
|
start-placeholder="起始时间"
|
end-placeholder="结束时间">
|
</el-date-picker>
|
</el-form-item>
|
<el-form-item label="备注:" prop="notes">
|
<el-input v-model="ruleForm.notes" :size="size" type="textarea" :rows="2" clearable placeholder="请输入备注" :disabled="disabled"></el-input>
|
</el-form-item>
|
<div class="form_lines"></div>
|
<div class="form_header_item" v-if="asyncTitle ===true">
|
<span class="form_header_label">出库人:</span>
|
<el-input v-model="searchSegment.realName" :size="size" clearable placeholder="请输入出库人" :disabled="true"></el-input>
|
</div>
|
<div class="form_header_item" v-if="asyncTitle ===true || asyncTitle ===false">
|
<span class="form_header_label">环号:</span>
|
<el-input v-model="searchSegment.ringNum" :size="size" placeholder="请输入环号" @blur="changeBlur" :disabled="disabled"></el-input>
|
</div>
|
<div style="margin-top:15px">
|
<el-table
|
ref="multipleTable"
|
:data="asyncTitle === true?segmentList:asyncTitle ===false?segmentListX:segmentListD"
|
tooltip-effect="dark"
|
style="width: 100%"
|
@selection-change="handleSelectionChange">>
|
<el-table-column
|
type="selection"
|
:selectable="selecttable"
|
width="55">
|
</el-table-column>
|
<el-table-column prop="pipeNum" label="管片编号" align="center" width="150"></el-table-column>
|
<el-table-column prop="ringNum" label="环号" align="center"></el-table-column>
|
<el-table-column prop="sizeName" label="尺寸" align="center"></el-table-column>
|
<el-table-column prop="reinforcementName" label="配筋" align="center"></el-table-column>
|
<el-table-column prop="blockNumName" label="块号" align="center"></el-table-column>
|
</el-table>
|
</div>
|
</el-form>
|
<div slot="footer" v-if="asyncTitle === true || asyncTitle === false">
|
<el-button @click="asyncVisible = false">取 消</el-button>
|
<el-button class="submit_btn" @click="asyncTitle ? submitInsert() : submitUpdate()">提 交</el-button>
|
</div>
|
</el-dialog>
|
<!-- GPS轨迹和发运单上传 -->
|
<el-dialog
|
class="prop_dialog"
|
:title="asyncGps ? 'GPS轨迹' : '发运单'"
|
:close-on-click-modal="false"
|
:visible.sync="GPSVisible"
|
width="55%">
|
<!-- <el-form ref="noteForm" :model="noteForm" :rules="noterules" label-width="auto" class="rule_form" style="overflow-x: hidden;height:180px" v-if="!asyncGps">
|
<el-form-item label="发运单:" prop="imageList">
|
<upload-image :file-list="noteForm.imageList" @delectImage="delectImage" :disabled="disabled">
|
<template #info>
|
<span>支持jpg、png、gif格式文件</span>
|
</template>
|
</upload-image>
|
</el-form-item>
|
</el-form> -->
|
<div v-if="!asyncGps" class="debit_note">
|
<div class="debit_note_headers"><span>{{printLists.proName}}发运签收单</span></div>
|
<div class="debit_note_mains">
|
<div class="debit_note_num">
|
<div class="debit_note_text">编号:</div>
|
<div class="debit_note_data">{{printLists.pipeOutNumber}}</div>
|
</div>
|
<div class="debit_note_content">
|
<div class="debit_note_rows">
|
<div class="debit_note_rows1">
|
<div class="debit_note_row1_text">出厂时间</div>
|
<div class="debit_note_row1_data">{{printLists.strTime}}</div>
|
</div>
|
<div class="debit_note_rows1">
|
<div class="debit_note_row1_text">混凝土强度等级</div>
|
<div class="debit_note_row1_data"></div>
|
</div>
|
</div>
|
<div class="debit_note_rows">
|
<div class="debit_note_rows1">
|
<div class="debit_note_row1_text">生产厂家/发货单位</div>
|
<div class="debit_note_row1_data">{{printLists.companyName}}</div>
|
</div>
|
<div class="debit_note_rows1">
|
<div class="debit_note_row1_text">工程名称</div>
|
<div class="debit_note_row1_data">{{printLists.proName}}</div>
|
</div>
|
</div>
|
<div class="debit_note_rows">
|
<div class="debit_note_rows1">
|
<div class="debit_note_row1_text">收货单位</div>
|
<div class="debit_note_row1_data">{{printLists.reciverUnit}}</div>
|
</div>
|
<div class="debit_note_rows1">
|
<div class="debit_note_row1_text">发货编号</div>
|
<div class="debit_note_row1_data">{{printLists.pipeOutNumber}}</div>
|
</div>
|
</div>
|
<div class="debit_note_middle">
|
<div class="debit_note_titles">管片流水号</div>
|
<div class="debit_note_titles">配筋类型</div>
|
<div class="debit_note_titles">管片型号</div>
|
<div class="debit_note_titles">规格</div>
|
<div class="debit_note_titles">管片型号检查</div>
|
</div>
|
<div class="debit_note_middle" v-for="(item,index) in pieceGroup" :key="index">
|
<div class="debit_note_titles debit_note_info">{{item.pipeNum}}</div>
|
<div class="debit_note_titles debit_note_info">{{item.reinforcementName}}</div>
|
<div class="debit_note_titles debit_note_info">{{item.turnName}}</div>
|
<div class="debit_note_titles debit_note_info">{{item.sizeName}}</div>
|
<div class="debit_note_titles debit_note_info">{{item.blockNumName}}</div>
|
</div>
|
<div class="debit_note_footer">
|
<div class="debit_footer_title">1、外形外观合格R</div>
|
<div class="debit_footer_title">2、混凝土强度达到C60R</div>
|
<div class="debit_footer_title">3、其他满足标准及规范要求R</div>
|
</div>
|
<div class="debit_note_footer">
|
<div class="debit_footer_title">4、垫管片方木共计:</div>
|
<div class="debit_footer_title debit_footer_datas"></div>
|
<div class="debit_footer_title">规格:</div>
|
<div class="debit_footer_title debit_footer_datas"></div>
|
<div class="debit_footer_title">木方返还</div>
|
<div class="debit_footer_title debit_footer_datas"></div>
|
<div class="debit_footer_title">根,</div>
|
<div class="debit_footer_title">规格:</div>
|
<div class="debit_footer_title debit_footer_datas"></div>
|
</div>
|
<div class="debit_note_bottom">
|
<div class="debit_bottom_items">
|
<div class="debit_items_title">发货联系人:</div>
|
<div class="debit_items_datas">{{printLists.carDriver}}</div>
|
<div class="debit_items_title">电话:</div>
|
<div class="debit_items_datas">{{printLists.carPhone}}</div>
|
</div>
|
<div class="debit_bottom_items">
|
<div class="debit_items_title">收货联系人:</div>
|
<div class="debit_items_datas">{{printLists.reciverName}}</div>
|
<div class="debit_items_title">电话:</div>
|
<div class="debit_items_datas">{{printLists.reciverPhone}}</div>
|
</div>
|
</div>
|
<div class="debit_note_bottom">
|
<div class="debit_bottom_items">
|
<div class="debit_items_title">车牌号:</div>
|
<div class="debit_items_datas">{{printLists.carBrand}}</div>
|
</div>
|
<div class="debit_bottom_items" style="justify-content: space-around;">
|
<div class="debit_items_title">司机发车签字:</div>
|
<div class="debit_items_title">司机返厂签字:</div>
|
</div>
|
</div>
|
<div class="debit_note_marks">
|
<div class="debit_marks_text">备注:</div>
|
<div class="debit_marks_datas"></div>
|
</div>
|
</div>
|
</div>
|
</div>
|
<div slot="footer" v-if="!asyncGps">
|
<!-- <el-button @click="GPSVisible = false">取 消</el-button> -->
|
<el-button class="submit_btn" @click="asyncGps ? submitGps() : submitNote()">打 印</el-button>
|
</div>
|
<div v-if="asyncGps" class="map_gps"><!-- @ready="ready"-->
|
<baidu-map class="map_gps" :scroll-wheel-zoom="true" :center="map.center" :zoom="map.zoom" :ak="ak" @ready="ready">
|
<bm-polyline :path="lineList" stroke-color="#0ff" :stroke-opacity="0.5" :stroke-weight="8"></bm-polyline>
|
</baidu-map>
|
<div class="gps_infos">
|
<div class="gps_infos_items">
|
<div class="gps_items_text">车牌号:</div>
|
<div class="gps_items_datas">{{showDatas&&showDatas.carBrand}}</div>
|
</div>
|
<div class="gps_infos_items">
|
<div class="gps_items_text">车辆类型:</div>
|
<div class="gps_items_datas">{{showDatas&&showDatas.carTypeName}}</div>
|
</div>
|
<div class="gps_infos_items">
|
<div class="gps_items_text">司机:</div>
|
<div class="gps_items_datas">{{showDatas&&showDatas.carDriver}}</div>
|
</div>
|
<div class="gps_infos_items">
|
<div class="gps_items_text">联系电话:</div>
|
<div class="gps_items_datas">{{showDatas&&showDatas.carPhone}}</div>
|
</div>
|
</div>
|
</div>
|
</el-dialog>
|
<div v-show="showAbtn">
|
<a id="segmentPrint" :href="`printpipezhen://${pitchNums}`"><p></p></a>
|
</div>
|
</div>
|
</template>
|
|
<script>
|
import qidian from "../../../assets/start_line.png";
|
import zhong from "../../../assets/end_line.png";
|
import BaiduMap from 'vue-baidu-map/components/map/Map.vue';
|
import BmPolyline from 'vue-baidu-map/components/overlays/Polyline.vue';
|
// import UploadImage from '../../../components/uploadImage.vue'
|
import { buttonPinia } from '../../../pinia/index';
|
import { throttle, changeSize} from '../../../plugins/public'; // 导入节流、动态切换组件尺寸方法
|
export default {
|
components:{
|
// UploadImage,
|
BaiduMap,
|
BmPolyline
|
},
|
data() {
|
return {
|
map: {
|
// center: { lng:115.21708150241663, lat: 37.503218241177095},
|
center:{},
|
zoom: 18,
|
show: true,
|
dragging: true
|
},
|
lineBmap:null,//地图
|
lineMap:null,
|
ak: "T7cpTR9uqOivVMmfcgC4TbNyVS2sbcMw",
|
lineList:[],//轨迹点
|
size: changeSize(), // 组件尺寸
|
pageNum: 1,
|
pageSize: 10,
|
search:{},//查询条件
|
showDatas:null,//一行的数据
|
showAbtn:false,//是否展示a标签
|
pitchNums:null,//打印编号
|
pipeOutId:null,//出库id
|
projectNameGroup:[],//项目名称族
|
printLists:null,//发运单打印数据
|
pieceGroup:[
|
],
|
searchSegment:{
|
realName:sessionStorage.getItem('realName'),
|
},//弹框中的查询条件
|
total: 0,
|
loading: false,
|
disabled:false,//是否禁止修改
|
dataList: [], //出库信息列表
|
detailDatas:[],//详情列表
|
segmentList:[],//管片列表(添加按钮里面)
|
segmentListX:[],
|
segmentListD:[],
|
segmentLists:[],//管片列表(修改和详情中拼接的所有管片)
|
optionsCarbrand:[],//车牌号
|
pipeInfos:[],//已有的管片
|
gpsDevicesGroup:[],//GPS设备下拉框
|
multipleSelection: [],//多选框
|
asyncGps:true,// GPS轨迹:true 发运单上传:false
|
asyncTitle: true, // 对话框title 新增:true 修改:false
|
GPSVisible:false,//GPS和发运单弹框
|
asyncVisible: false, // 添加 修改对话框
|
ruleForm: {
|
}, // 按钮表单
|
noteForm:{},//发运单
|
noterules:{
|
imageList: [{
|
required: true,
|
message: '请选择发运单',
|
trigger: ['change','blur']
|
}],
|
},//发运单
|
rules: {
|
carId: [{
|
required: true,
|
message: '请选择车牌号',
|
trigger: 'change'
|
}],
|
gdId: [{
|
required: true,
|
message: '请选择GPS设备',
|
trigger: 'change'
|
}],
|
proId: [{
|
required: true,
|
message: '请选择项目名称',
|
trigger: 'change'
|
}],
|
carDriver: [{
|
required: true,
|
message: '请输入司机姓名',
|
trigger: 'blur'
|
}],
|
carPhone: [{
|
required: true,
|
message: '请输入联系电话',
|
trigger: 'blur'
|
},{
|
pattern:
|
/^1(3[0-9]|4[01456879]|5[0-35-9]|6[2567]|7[0-8]|8[0-9]|9[0-35-9])\d{8}$/,
|
message: '请输入正确的手机号码',
|
trigger: 'blur'
|
}],
|
reciverPhone: [{
|
required: false,
|
message: '请输入收货人联系电话',
|
trigger: 'blur'
|
},{
|
pattern:
|
/^1(3[0-9]|4[01456879]|5[0-35-9]|6[2567]|7[0-8]|8[0-9]|9[0-35-9])\d{8}$/,
|
message: '请输入正确的手机号码',
|
trigger: 'blur'
|
}],
|
inUserId: [{
|
required: true,
|
message: '请输入收货人',
|
trigger: 'blur'
|
}],
|
time: [{
|
required: true,
|
message: '请选择起止时间',
|
trigger: 'change'
|
}],
|
},
|
optionsReciver:[],//收货人
|
}
|
},
|
watch: {
|
asyncVisible(bol) {
|
if(!bol) {
|
this.ruleForm = {};
|
this.$refs.ruleForm.resetFields();
|
}
|
},
|
GPSVisible(bol) {
|
if(!bol) {
|
this.noteForm = {};
|
this.$refs.noteForm.resetFields();
|
}else{
|
this.$set(this.noteForm, 'imageList', []);
|
}
|
}
|
},
|
mounted() {
|
const that = this;
|
// 根据窗口大小动态修改组件尺寸
|
window.onresize = () => {
|
that.size = changeSize();
|
}
|
that.getAllTypes()
|
that.getAllCar()
|
that.getAllSegments()
|
that.getAllProjects()
|
},
|
methods: {
|
//获取所有项目
|
getAllProjects(){
|
this.$api.Engineer.searchProjects({pageNum:1,pageSize: 1000000}).then(res=>{
|
if(res.statusMsg==='ok'){
|
this.projectNameGroup = res.data.list
|
}else{
|
this.$message.warning(res.statusMsg)
|
}
|
})
|
},
|
//轨迹配置
|
ready({ BMap, map}){
|
this.lineBmap = BMap
|
this.lineMap = map
|
},
|
//获取车辆下拉
|
getAllCar(){
|
this.$api.DuctpiecePLM.getAllCarInfo({}).then(res=>{
|
if(res.statusMsg === 'ok'){
|
this.optionsCarbrand = res.data
|
}else{
|
this.$message.warning(res.statusMsg)
|
}
|
})
|
},
|
//详情按钮
|
detailsInfo(row){
|
// this.getAllSegments()
|
this.carsChange(row.carId)
|
this.segmentListD = []
|
this.asyncTitle = '66'
|
this.asyncVisible = true;
|
this.disabled = true
|
this.$api.DuctpiecePLM.detailsOutInfo({pipeOutId: row.pipeOutId}).then(res=>{
|
if(res.statusMsg === 'ok'){
|
this.ruleForm = res.data
|
this.$set(this.ruleForm,'time',[res.data.strTime,res.data.endTime])
|
// this.segmentLists = [...res.data.pipeInfos,...this.segmentList]
|
this.segmentLists = res.data.pipeInfos
|
this.segmentListD = this.segmentLists
|
res.data.pipeInfos.forEach(item=>{
|
const num = this.segmentListD.findIndex(element => element.pipeId === item.pipeId)
|
this.$refs.multipleTable.clearSelection()
|
this.$nextTick(()=>{
|
this.$refs.multipleTable.toggleRowSelection(this.segmentListD[num],true);
|
})
|
})
|
}else{
|
this.$message.warning(res.statusMsg)
|
}
|
})
|
},
|
//是否禁止多选
|
selecttable(){
|
if(this.asyncTitle === '66'){
|
return false
|
}else{
|
return true
|
}
|
},
|
//发运单上传按钮
|
infoUpload(row){
|
this.asyncGps = false
|
this.GPSVisible = true
|
this.pipeOutId = row.pipeOutId
|
this.pitchNums = row.pipeOutId
|
this.$api.DuctpiecePLM.detailsOutInfo({pipeOutId: row.pipeOutId}).then(res=>{
|
if(res.statusMsg === 'ok'){
|
this.printLists= res.data
|
if(res.data.pipeInfos.length===0){
|
this.pieceGroup =[{},{},{},{}]
|
}else{
|
this.pieceGroup = res.data.pipeInfos
|
for(let i=0;i<=5-res.data.pipeInfos.length;i++){
|
this.pieceGroup.push({})
|
}
|
}
|
}else{
|
this.$message.warning(res.statusMsg)
|
}
|
})
|
},
|
//发运单打印提交按钮
|
submitNote(){
|
this.gopPrints()
|
this.GPSVisible = false
|
},
|
//执行去打印
|
gopPrints(){
|
this.$nextTick(()=>{
|
document.getElementById("segmentPrint").click();
|
})
|
},
|
//GPS轨迹
|
showGps(row){
|
this.lineList = []
|
this.showDatas = row
|
this.asyncGps = true
|
this.GPSVisible = true
|
this.$api.DuctpiecePLM.getGpsLine({pipeOutId:row.pipeOutId}).then(res=>{
|
if(res.statusMsg === 'ok'){
|
res.data.map(item=>{
|
this.lineList.push({
|
lng:item.longitude,
|
lat:item.latitude
|
})
|
})
|
this.map.center = {lng:this.lineList[0].lng,lat:this.lineList[0].lat}
|
this.setLineMark(this.lineList)
|
}else{
|
this.$message.warning(res.statusMsg)
|
}
|
})
|
},
|
//设置起点和终点坐标
|
setLineMark(val){
|
// console.log(val[0].lng,val[0].lat,'起点坐标')
|
//起点标注
|
var point = new this.lineBmap.Point(val[0].lng,val[0].lat)
|
var myIcon = new this.lineBmap.Icon(qidian, new this.lineBmap.Size(100, 100))
|
var offset = new this.lineBmap.Size(30, 5);
|
var marker = new this.lineBmap.Marker(point, { icon: myIcon ,offset: offset}) // 创建标注
|
this.lineMap.addOverlay(marker) // 将标注添加到地图中
|
//坐标转换
|
// var convertor = new this.lineBmap.Convertor()
|
// convertor.translate([point],1,5,(datas)=>{
|
// var marker=new this.lineBmap.Marker(datas.points[0], { icon: myIcon }) // 创建标注
|
// this.lineMap.addOverlay(marker) // 将标注添加到地图中
|
// })
|
|
//终点标注
|
var point2 = new this.lineBmap.Point(val[val.length-1].lng,val[val.length-1].lat)
|
var myIcon2 = new this.lineBmap.Icon(zhong, new this.lineBmap.Size(100, 100))
|
var offset2 = new this.lineBmap.Size(30, 5);
|
var marker2 = new this.lineBmap.Marker(point2, { icon: myIcon2,offset: offset2 }) // 创建标注
|
this.lineMap.addOverlay(marker2) // 将标注添加到地图中
|
|
//设置轨迹样式
|
// var array=[];
|
// this.lineList.forEach(Element=>{
|
// array.push(new this.lineBmap.Point(Element.lng, Element.lat))
|
// })
|
// var polyline = new this.lineBmap.Polyline(array, {strokeColor:"red", strokeWeight:5, strokeOpacity:0.5});
|
// this.lineMap.addOverlay(polyline);
|
|
},
|
//table表格多选
|
handleSelectionChange(val) {
|
this.multipleSelection = val.map(item=>{
|
return item.pipeId
|
})
|
},
|
//环号失去焦点查询
|
changeBlur(){
|
this.getAllSegments(this.searchSegment.ringNum)
|
},
|
//获取管片列表
|
getAllSegments(val){
|
this.$api.DuctpiecePLM.getAllPipInfos({
|
ringNum:val,
|
}).then(res=>{
|
if(res.statusMsg === 'ok'){
|
if(this.asyncTitle ===false){
|
if(val !==''){
|
this.segmentListX = res.data
|
}else{
|
this.segmentListX = [...this.pipeInfos,...res.data]
|
}
|
this.pipeInfos.forEach(item=>{
|
const num = this.segmentListX.findIndex(element => element.pipeId === item.pipeId)
|
this.$nextTick(()=>{
|
this.$refs.multipleTable.toggleRowSelection(this.segmentListX[num],true);
|
})
|
})
|
}else{
|
this.segmentList = res.data
|
this.pipeInfos.forEach(item=>{
|
const num = this.segmentList.findIndex(element => element.pipeId === item.pipeId)
|
this.$nextTick(()=>{
|
this.$refs.multipleTable.toggleRowSelection(this.segmentList[num],true);
|
})
|
})
|
}
|
}else{
|
this.$message.warning(res.statusMsg)
|
}
|
})
|
},
|
//改变车牌号带出司机
|
carsChange(val){
|
this.$api.DuctpiecePLM.detailsCarInfo({carId:val}).then(res=>{
|
if(res.statusMsg === 'ok'){
|
this.$set(this.ruleForm,'carDriver',res.data.carDriver)
|
this.$set(this.ruleForm,'carPhone',res.data.carPhone)
|
}else{
|
this.$message.warning(res.statusMsg)
|
}
|
})
|
this.$api.DuctpiecePLM.getGpsDeviceLists({carId:val}).then(res=>{
|
if(res.statusMsg === 'ok'){
|
this.gpsDevicesGroup = res.data
|
}else{
|
this.$message.warning(res.statusMsg)
|
}
|
})
|
},
|
//改变收货人去带出收货人电话
|
usersChange(val){
|
if(val !== ''){
|
this.$set(this.ruleForm,'reciverPhone',this.optionsReciver.find(itm => itm.id === val).reciverPhone)
|
this.$set(this.ruleForm,'reciverUnit',this.optionsReciver.find(itm => itm.id === val).reciverUnit)
|
}else{
|
this.$set(this.ruleForm,'reciverPhone','')
|
this.$set(this.ruleForm,'reciverUnit','')
|
}
|
},
|
//获取收货人信息
|
getAllTypes(){
|
this.$api.DuctpiecePLM.getAllReciverInfo({}).then(res=>{
|
if(res.statusMsg === 'ok'){
|
this.optionsReciver = res.data
|
}else{
|
this.$message.warning(res.statusMsg)
|
}
|
})
|
},
|
// 查询按钮列表信息
|
searchButtonInfo(bol) {
|
if(bol) {
|
this.pageNum = 1;
|
}
|
let params = Object.assign({},this.search,{
|
pageNum: this.pageNum,
|
pageSize: this.pageSize,
|
stockType:1
|
})
|
params.strTime = this.search.time&&this.search.time[0]
|
params.endTime = this.search.time&&this.search.time[1]
|
delete params.time
|
this.loading = true;
|
this.$api.DuctpiecePLM.searchOutInfo(params).then((res) => {
|
if(res.statusMsg === 'ok') {
|
this.total = res.data.total;
|
this.dataList = res.data.list;
|
}else{
|
this.$message.warning(res.statusMsg)
|
}
|
this.loading = false;
|
})
|
},
|
// 修改按钮信息
|
updateProp(row) {
|
// this.getAllSegments()
|
this.carsChange(row.carId)
|
this.disabled = false
|
this.segmentListX = []
|
this.asyncTitle = false;
|
this.asyncVisible = true;
|
this.$api.DuctpiecePLM.detailsOutInfo({pipeOutId: row.pipeOutId}).then(res=>{
|
if(res.statusMsg === 'ok'){
|
this.ruleForm = res.data
|
this.$set(this.ruleForm,'time',[res.data.strTime,res.data.endTime])
|
this.segmentLists = [...res.data.pipeInfos,...this.segmentList]
|
this.segmentListX = this.segmentLists
|
this.pipeInfos = res.data.pipeInfos
|
res.data.pipeInfos.forEach(item=>{
|
const num = this.segmentListX.findIndex(element => element.pipeId === item.pipeId)
|
this.$nextTick(()=>{
|
this.$refs.multipleTable.toggleRowSelection(this.segmentListX[num],true);
|
})
|
})
|
}else{
|
this.$message.warning(res.statusMsg)
|
}
|
})
|
},
|
//删除上传图片
|
delectImage(item){
|
let uploadId = item.id
|
this.noteForm.imageList.splice(this.noteForm.imageList.findIndex(itm => itm.id === uploadId),1)
|
this.$message.success("删除成功!")
|
},
|
// 新增按钮信息
|
insertProp() {
|
this.asyncTitle = true;
|
this.asyncVisible = true;
|
this.disabled = false
|
this.$refs.multipleTable.clearSelection();
|
// this.getAllSegments()
|
},
|
// 删除按钮信息
|
deleteInfo(row) {
|
this.$confirm("该操作将删除该信息,是否继续删除?", "提示", {
|
confirmButtonText: "确定",
|
cancelButtonText: "取消",
|
type: "warning"
|
})
|
.then(() => {
|
this.$api.DuctpiecePLM.deleteOutInfo({pipeOutId: row.pipeOutId})
|
.then(res => {
|
if(res.statusMsg === 'ok') {
|
this.searchButtonInfo(true);
|
this.$message.success("删除成功!");
|
} else {
|
this.$message.warning(res.statusMsg);
|
}
|
})
|
})
|
.catch(() => {
|
this.$message.warning("您已取消");
|
})
|
},
|
// 提交添加按钮信息
|
submitInsert: throttle(function() {
|
this.$refs.ruleForm.validate((valid) => {
|
if(valid) {
|
const params = Object.assign({}, this.ruleForm);
|
params.pipeIds = this.multipleSelection
|
params.strTime = this.ruleForm.time && this.ruleForm.time[0]
|
params.endTime = this.ruleForm.time && this.ruleForm.time[1]
|
delete params.time
|
this.$api.DuctpiecePLM.insertOutInfo(params).then((res) => {
|
if(res.statusMsg === 'ok') {
|
this.asyncVisible = false;
|
this.searchButtonInfo(true);
|
this.$message.success('添加成功!');
|
} else {
|
this.$message.warning(res.statusMsg);
|
}
|
})
|
}
|
})
|
}, 3000),
|
// 提交修改按钮信息
|
submitUpdate: throttle(function() {
|
this.$refs.ruleForm.validate((valid) => {
|
if(valid) {
|
const params = Object.assign({}, this.ruleForm);
|
params.pipeIds = this.multipleSelection
|
params.strTime = this.ruleForm.time && this.ruleForm.time[0]
|
params.endTime = this.ruleForm.time && this.ruleForm.time[1]
|
delete params.time
|
this.$api.DuctpiecePLM.updateOutInfo(params).then((res) => {
|
if(res.statusMsg === 'ok') {
|
this.asyncVisible = false;
|
this.searchButtonInfo(true);
|
this.$message.success('修改成功!');
|
} else {
|
this.$message.warning(res.statusMsg);
|
}
|
})
|
}
|
})
|
}, 3000),
|
// 判断按钮权限信息
|
showButton(str) {
|
const pinia = buttonPinia();
|
return pinia.$state.buttonInfo.includes(str);
|
},
|
// 切换页数
|
changePageNum(page) {
|
this.pageNum = page;
|
this.searchButtonInfo();
|
},
|
// 切换每页条数
|
changePageSize(size) {
|
this.pageSize = size;
|
this.searchButtonInfo();
|
}
|
}
|
}
|
</script>
|
|
<style lang="scss" scoped>
|
@import '../../../style/layout-main.scss';
|
.gps_infos{
|
padding: 20px;
|
position: absolute;
|
top: 15%;
|
right: 10px;
|
background: url("../../../assets/gps_info_bg.png") no-repeat;
|
background-size: 100% 100%;
|
|
.gps_infos_items{
|
display: flex;
|
margin-top: 5px;
|
.gps_items_text{
|
width: 80px;
|
flex: none;
|
color: #fff;
|
font-size: 16px;
|
}
|
.gps_items_datas{
|
color: #39B5FE;
|
font-size: 16px;
|
}
|
}
|
}
|
|
.debit_note{
|
width: 100%;
|
height: 600px;
|
display: flex;
|
flex-direction: column;
|
overflow: auto;
|
background-color: #fff;
|
|
.debit_note_headers{
|
height: 50px;
|
color: rgba(50, 133, 199, 1);
|
text-decoration: underline;
|
text-underline-position: under;
|
text-underline-offset: 12px;
|
text-decoration-thickness:1px;
|
span{
|
color: rgba(50, 133, 199, 1);
|
font-size: 25px;
|
line-height: 50px;
|
display: flex;
|
justify-content: center;
|
text-decoration: underline;
|
text-underline-position: under;
|
text-underline-offset: 24px;
|
text-decoration-thickness:1px;
|
}
|
}
|
.debit_note_mains{
|
display: flex;
|
flex-direction: column;
|
margin-top:20px;
|
margin-bottom: 10px;
|
flex: 1;
|
padding: 0 20px;
|
.debit_note_num{
|
display: flex;
|
justify-content: flex-end;
|
margin-right: 15px;
|
.debit_note_text{
|
flex: none;
|
font-size: 18px;
|
color: rgba(50, 133, 199, 1);
|
}
|
.debit_note_data{
|
color: rgba(50, 51, 51, 1);
|
font-size: 18px;
|
}
|
}
|
.debit_note_content{
|
border-top: 0.86px solid rgba(50, 133, 199, 1);
|
border-left: 0.86px solid rgba(50, 133, 199, 1);
|
flex: 1;
|
.debit_note_rows{
|
width: 100%;
|
display: flex;
|
line-height: 30px;
|
.debit_note_rows1{
|
width: 100%;
|
display: flex;
|
.debit_note_row1_text{
|
width: 154px;
|
padding:10px;
|
color: rgba(50, 133, 199, 1);
|
flex: none;
|
display: flex;
|
justify-content: center;
|
align-items: center;
|
font-size: 16px;
|
border-right: 0.86px solid rgba(50, 133, 199, 1);
|
border-bottom: 0.86px solid rgba(50, 133, 199, 1);
|
}
|
.debit_note_row1_data{
|
flex: 1;
|
font-size: 16px;
|
color: rgba(50, 51, 51, 1);
|
display: flex;
|
align-items: center;
|
justify-content: center;
|
border-right: 0.86px solid rgba(50, 133, 199, 1);
|
border-bottom: 0.86px solid rgba(50, 133, 199, 1);
|
}
|
}
|
}
|
.debit_note_middle{
|
width: 100%;
|
line-height: 30px;
|
display: flex;
|
.debit_note_titles{
|
width: 100%;
|
text-align: center;
|
padding: 10px;
|
color: rgba(50, 133, 199, 1);
|
font-size: 16px;
|
border-right: 0.86px solid rgba(50, 133, 199, 1);
|
border-bottom: 0.86px solid rgba(50, 133, 199, 1);
|
}
|
.debit_note_info{
|
height: 50px;
|
color: rgba(50, 51, 51, 1);
|
}
|
}
|
.debit_note_footer{
|
width: 100%;
|
line-height: 30px;
|
display: flex;
|
justify-content: space-around;
|
border-right: 0.86px solid rgba(50, 133, 199, 1);
|
border-bottom: 0.86px solid rgba(50, 133, 199, 1);
|
.debit_footer_title{
|
padding: 10px;
|
color: rgba(50, 133, 199, 1);
|
font-size: 16px;
|
}
|
.debit_footer_datas{
|
color:rgba(50, 51, 51, 1);
|
}
|
}
|
.debit_note_bottom{
|
display: flex;
|
width: 100%;
|
line-height: 30px;
|
.debit_bottom_items{
|
width: 100%;
|
display: flex;
|
border-right: 0.86px solid rgba(50, 133, 199, 1);
|
border-bottom: 0.86px solid rgba(50, 133, 199, 1);
|
|
.debit_items_title{
|
padding: 10px;
|
color:rgba(50, 133, 199, 1);
|
font-size: 16px;
|
}
|
.debit_items_datas{
|
padding: 10px;
|
color:rgba(50, 51, 51, 1);
|
font-size: 16px;
|
}
|
}
|
}
|
.debit_note_marks{
|
display: flex;
|
width: 100%;
|
line-height: 30px;
|
border-right: 0.86px solid rgba(50, 133, 199, 1);
|
border-bottom: 0.86px solid rgba(50, 133, 199, 1);
|
.debit_marks_text{
|
padding: 10px;
|
color:rgba(50, 133, 199, 1);
|
font-size: 16px;
|
}
|
.debit_marks_datas{
|
padding: 10px;
|
color:rgba(50, 51, 51, 1);
|
font-size: 16px;
|
}
|
}
|
}
|
}
|
}
|
.form_lines{
|
width: 100%;
|
border: 1px solid #0D5274;
|
margin: 20px 10px;
|
}
|
.form_header_item{
|
display: flex;
|
align-items: center;
|
margin-right: 10px;
|
margin-top: 15px;
|
.form_header_label {
|
color: #EAEAEA;
|
white-space: nowrap;
|
text-align: right;
|
}
|
}
|
/deep/.el-checkbox__input.is-disabled.is-checked .el-checkbox__inner{
|
background-color: #1890ff;
|
border-color: #1890ff;
|
}
|
.map_gps{
|
width: 100%;
|
height: 500px;
|
}
|
</style>
|