// 汽车卸车
<template>
  <div class="container">
    <el-row>
      <el-col :span="20">
        <h2 class="bg-left title">汽运卸车反馈</h2>
      </el-col>
      <el-col :span="4" class="bg-right">
        <el-button
          class="bg-bottom"
          type="primary"
          size="small"
          @click="revert()"
        >
          <img
            width="6"
            height="10"
            style="vertical-align: bottom; margin-right: 3px"
            src="../../../public/img/lujing.png"
            alt
          />返回
        </el-button>
      </el-col>
    </el-row>
    <div class="center">
      <ws-form ref="deptBudgetList" :model="deptBudgetList" :rules="rules">
        <div class="basicInformation">
          <div class="small-title" style="font-size: 16px">任务详情</div>
          <ws-info-table>
            <!-- 任务编号 -->
            <ws-form-item label="任务编号" span="1" prop="processNo">{{
              deptBudgetList.processNo
            }}</ws-form-item>
            <!-- 货名 -->
            <ws-form-item label="货名" span="1">{{
              deptBudgetList.goodsName
            }}</ws-form-item>
            <!--重量（吨）-->
            <ws-form-item
              label="重量（吨）"
              span="1"
              prop="tare"
              class="readonly"
              >{{ deptBudgetList.weight }}</ws-form-item
            >

            <!--发货地址-->
            <!-- <ws-form-item label="发货地址" span="1" prop="netWeight">
              {{ deptBudgetList.sendPrivate }}{{ deptBudgetList.sendCity
              }}{{ deptBudgetList.sendArea
              }}{{ deptBudgetList.sendDetailedAddress }}
            </ws-form-item> -->
            <!--发货人-->
            <ws-form-item label="发货人" span="1" prop="agent">{{
              deptBudgetList.sender
            }}</ws-form-item>

            <!--发货人电话-->
            <ws-form-item label="发货人电话" span="1" prop="agent">{{
              deptBudgetList.senderPhone
            }}</ws-form-item>
            <!--收货地址-->
            <!-- <ws-form-item label="收货地址" span="1" prop="netWeight">
              {{ deptBudgetList.receivePrivate }}{{ deptBudgetList.receiveCity
              }}{{ deptBudgetList.receiveArea
              }}{{ deptBudgetList.receiveDetailedAddress }}
            </ws-form-item> -->
            <!--收货人-->
            <ws-form-item label="收货人" span="1" prop="receiver">{{
              deptBudgetList.receiver
            }}</ws-form-item>

            <!--收货人电话-->
            <ws-form-item label="收货人电话" span="1" prop="receiverPhone">{{
              deptBudgetList.receiverPhone
            }}</ws-form-item>
            <!--发货日期-->
            <ws-form-item
              label="发货日期"
              span="1"
              prop="inOutDate"
              class="deliverydate"
              >{{ deptBudgetList.deliveryDateStart }}</ws-form-item
            >
            <!--最晚发货日期-->
            <ws-form-item
              label="最晚到货日期"
              span="1"
              prop="inOutDate"
              class="deliverydate"
              >{{ deptBudgetList.deliveryDateEnd }}</ws-form-item
            >
            <!--合同编号-->
            <ws-form-item label="合同编号" span="1" prop="contractNo">{{
              deptBudgetList.contractNo
            }}</ws-form-item>
            <ws-form-item label="运输方式" span="1" prop="contractNo">{{
              deptBudgetList.tranType
            }}</ws-form-item>
          </ws-info-table>

          <div
            class="small-title"
            style="font-size: 16px; width: 50%; float: left"
          >
            卸车详情
          </div>
          <!-- 导入 -->
          <div style="font-size: 16px; width: 100%; text-align: right;display:flex;justify-content:end;">
            <!-- <el-upload style="margin-left: 8px;"
          class=""
          :action="global.uploadPath"
          :show-file-list="false"
          :on-success="
          (res, file) => {
            uploadSuccessHandle(res)
          }
        "
          accept=".csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel"
          >
          <el-button  type="primary">导入</el-button>
        </el-upload> -->
        <el-link
          href="https://taohaoliang.oss-cn-beijing.aliyuncs.com/pcfiles/%E5%8F%8D%E9%A6%88%E6%A8%A1%E6%9D%BF/%E6%B1%BD%E8%BF%90%E5%8D%B8%E8%BD%A6%E5%8F%8D%E9%A6%88%E6%A8%A1%E6%9D%BF.xlsx"
          style="margin-left: 8px;">
          <el-button type="primary">模板下载</el-button>
        </el-link>
            <el-upload
              style="margin-left: 8px"
              class="upload-demo inline-block margin-right-10"
              action=""
              :on-change="handleChange"
              :show-file-list="false"
              accept=".csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel"
              :auto-upload="false"
            >
              <el-button type="primary">导入</el-button>
            </el-upload>
          </div>
          <div
            class="driver position liaison"
            v-for="(item, index) in deptBudgetList.tranCarInfoList"
            :key="index"
          >
            <ws-info-table>
              <div class="catNos" v-show="item.temporaryDriverFlag == 0">
                司机-{{ index + 1 }}
                <span class="noservice" v-show="item.status == '未装车'">{{
                  item.status
                }}</span>
                <span class="service" v-show="item.status == '已装车'">
                  未卸车
                </span>
                <span class="serviced" v-show="item.status == '已送达'">
                  已卸车
                </span>
              </div>
              <div
                class="catNos catNosCor"
                v-show="item.temporaryDriverFlag != 0"
              >
                司机-{{ index + 1 }}(临)
              </div>
              <!--姓名-->
              <ws-form-item
                label="姓名："
                span="1"
                prop="driver"
                v-show="item.temporaryDriverFlag == 0"
              >
                <span v-show="item.temporaryDriverFlag == 0">{{
                  item.driver
                }}</span>
              </ws-form-item>
              <!-- 姓名 -->
              <ws-form-item
                label="姓名："
                span="1"
                prop="driver"
                v-show="item.temporaryDriverFlag != 0"
              >
                <span v-show="item.temporaryDriverFlag != 0">{{
                  item.driver
                }}</span>
              </ws-form-item>
              <!-- 电话 -->
              <ws-form-item
                label="司机电话："
                span="1"
                prop="driverPhone"
                style="width: 200px"
              >
                <span v-show="item.temporaryDriverFlag != 0">{{
                  item.driverPhone
                }}</span>
                <span v-show="item.temporaryDriverFlag == 0">{{
                  item.driverPhone
                }}</span>
              </ws-form-item>
              <!--车牌号-->
              <ws-form-item label="车牌号：" span="1" prop="carNo">
                <span v-show="item.temporaryDriverFlag != 0">{{
                  item.carNo
                }}</span>
                <span v-show="item.temporaryDriverFlag == 0">{{
                  item.carNo
                }}</span>
              </ws-form-item>
              <!--装车净重-->
              <ws-form-item
                label="装车(吨)："
                span="1"
                prop="loadNetWeight"
                style="width: 150px"
                >{{ item.loadNetWeight }}</ws-form-item
              >
              <!--卸车净重(吨)-->
              <ws-form-item
                label="卸车净重(吨):"
                span="1"
                prop="unloadNetWeight"
              >
                <ws-input
                  v-if="item.status == '已送达' || item.status == '未装车'"
                  v-model="item.unloadNetWeight"
                  placeholder="请输入卸车净重"
                  maxlength="20"
                  :disabled="readonly"
                  size="small"
                />
                <ws-input
                  v-else
                  v-model="item.unloadNetWeight"
                  placeholder="请输入卸车净重"
                  maxlength="20"
                  size="small"
                />
              </ws-form-item>
              <!--卸车日期-->
              <ws-form-item
                label="卸车日期:"
                span="1"
                prop="receiveDateEnd"
                style="width: 340px"
              >
                <ws-date-picker
                  v-model="item.receiveDateEnd"
                  v-if="item.status == '已送达' || item.status == '未装车'"
                  :disabled="readonly"
                  type="date"
                  value-format="yyyy-MM-dd"
                />
                <ws-date-picker
                  v-model="item.receiveDateEnd"
                  v-else
                  type="date"
                  placeholder="请选择日期"
                  value-format="yyyy-MM-dd"
                />
              </ws-form-item>
              <!--磅单-->
              <ws-form-item label="磅单：" span="1" prop="unloadPoundImg">
                <template>
                  <el-upload
                    :action="global.uploadPath"
                    :show-file-list="false"
                    :on-success="
                      (res) => {
                        uploadSuccessHandle1(res, index)
                      }
                    "
                    class="avatar-uploader"
                    accept=".jpg, .jpeg, .png, .gif"
                  >
                    <img
                      width="18"
                      height="20"
                      style="vertical-align: text-top; position: relative"
                      src="../../../public/img/fujian.png"
                      alt
                    />
                  </el-upload>
                  <span
                    v-if="
                      deptBudgetList.tranCarInfoList[index].unloadPoundImg !=
                      null
                    "
                    >1</span
                  >
                  <span
                    v-if="
                      deptBudgetList.tranCarInfoList[index].unloadPoundImg ==
                      null
                    "
                    >未上传</span
                  >
                  <el-button v-if="deptBudgetList.tranCarInfoList[index].unloadPoundImg !=null"  
                  class="bg-bottom-preview" type="primary" size="small" :data-img="deptBudgetList.tranCarInfoList[index].unloadPoundImg" @click="$imgPreview">
                  <span style="margin-left: -7px;">预览</span></el-button>
                </template>
              </ws-form-item>
              <!--箱号-->
              <ws-form-item label="箱号-1:" span="1" prop="caseNo">
                <span>{{ item.caseNo }}</span>
              </ws-form-item>
              <!--封号-->
              <ws-form-item label="封号-1:" span="1" prop="titleNo">
                <span>{{ item.titleNo }}</span>
              </ws-form-item>
              <!--箱号-->
              <ws-form-item label="箱号-2:" span="1" prop="caseNoOther">
                <span>{{ item.caseNoOther }}</span>
              </ws-form-item>
              <!--封号-->
              <ws-form-item label="封号-2:" span="1" prop="titleNoOther">
                <span>{{ item.titleNoOther }}</span>
              </ws-form-item>
              <!--单价 -->
              <ws-form-item label="单价（元/吨）:" span="1" v-if="deptBudgetList.priceType!=null&&deptBudgetList.priceType=='随行就市'" prop="contractPrice">
                <ws-input
                  v-model="item.contractPrice"
                  placeholder="请输入单价"
                  maxlength="20"
                  size="small"
                />
              </ws-form-item>
              <div
                v-show="
                  item.temporaryDriverFlag == 0 && item.signStatus == '未签合同'
                "
                class="signStatus"
              >
                {{ item.signStatus }}
              </div>
              <div
                v-show="
                  item.temporaryDriverFlag == 0 && item.signStatus == '已签合同'
                "
                class="signStatus1"
              >
                {{ item.signStatus }}
              </div>
            </ws-info-table>
          </div>
        </div>
        <div style="text-align: right; color: #8890b1; font-size: 16px">
          合计{{ total }}/{{ deptBudgetList.weight }}
          <!--阶段状态-->
          <span
            class="noservice"
            v-show="deptBudgetList.receivingStatus == '执行中'"
          >
            未完货
          </span>
          <span
            class="service"
            v-show="deptBudgetList.receivingStatus == '已完货'"
            >{{ deptBudgetList.receivingStatus }}</span
          >
        </div>
        <div style="text-align: right; padding: 10px">
          <el-button
            class="bg-bottom-up"
            type="primary"
            size="small"
            @click="submit()"
            >提交</el-button
          >
          <el-button
            class="bg-bottom"
            type="primary"
            size="small"
            @click="finished(deptBudgetList)"
            >完货</el-button
          >
        </div>
      </ws-form>
    </div>
  </div>
</template>
<script>
import Pagination from '@/components/Pagination'
import WsUpload from '@/components/WsUpload'
import {
  seeCat,
  packList,
  feedback,
  getbank,
  stateRec,
} from '@/model/transport/index'
// import { dayjs, fmoney, EventBus } from 'base-core-lib'
import { dayjs, EventBus } from 'base-core-lib'
export default {
  name: 'viewSpareMoney',
  components: {
    WsUpload,
    Pagination,
  },
  watch: {
    isShow(val) {
      this.showType = val
    },
  },
  data() {
    return {
      // 是否显示
      showType: true,
      deptBudgetTotal: 0,
      currentPage: 1,
      pageSize: 10,
      searchType: 1,
      startDate: null,
      endDate: null,
      carList: [],
      // 提交类型
      readonly: true,
      appendixIdsAdd: '',
      onChange: {},
      gradeList: [],
      rules: {
        netWeight: [
          {
            required: true,
            type: 'number',
            message: '请输入活动名称',
            trigger: 'blur',
          },
        ],
      },
      size: 10,
      compId: localStorage.getItem('ws-pf_compId'),
      deptCircularPage: {},
      packtypeList: {},
      date: {
        year: dayjs().format('YYYY'),
        month: dayjs().format('MM'),
      },
      contractList: [],
      deptBudgetList: {
        tranCarInfoList: [
          {
            unloadPoundImg: '',
          },
        ],
      },
      excelFreightspace: [],
      historyList: [],
      pickerBeginDateBefore: {
        disabledDate: (time) => {
          return time.getTime() > Date.now()
        },
      },
      accessoryTFs: false,
    }
  },
  activated() {
    this.deptBudgetList.id = this.$route.query.id
    this.getList()
  },
  computed: {
    total: function () {
      var maxStorage = 0
      for (var i = 0; i < this.deptBudgetList.tranCarInfoList.length; i++) {
        maxStorage += Number(
          this.deptBudgetList.tranCarInfoList[i].unloadNetWeight
        )
      }
      return maxStorage.toFixed(2)
    },
  },
  mounted() {
    this.deptBudgetList.id = this.$route.query.id
    this.getList()
  },
  methods: {
    handleChange(file, fileList) {
      this.fileTemp = file.raw
      let fileName = file.raw.name
      let fileType = fileName.substring(fileName.lastIndexOf('.') + 1)
      // 判断上传文件格式
      if (this.fileTemp) {
        if (fileType == 'xlsx' || fileType == 'xls') {
          this.importf(this.fileTemp)
        } else {
          this.$message({
            type: 'warning',
            message: '附件格式错误，请删除后重新上传！',
          })
        }
      } else {
        this.$message({
          type: 'warning',
          message: '请上传附件！',
        })
      }
    },
    importf(obj) {
      this.excelFreightspace = []
      this.dialogVisible = true
      let _this = this
      let inputDOM = this.$refs.inputer // 通过DOM取文件数据
      this.file = event.currentTarget.files[0]
      var rABS = false //是否将文件读取为二进制字符串
      var f = this.file
      var reader = new FileReader()
      //if (!FileReader.prototype.readAsBinaryString) {
      FileReader.prototype.readAsBinaryString = function (f) {
        var binary = ''
        var rABS = false //是否将文件读取为二进制字符串
        var pt = this
        var wb //读取完成的数据
        var outdata
        var reader = new FileReader()
        reader.onload = function (e) {
          var bytes = new Uint8Array(reader.result)
          var length = bytes.byteLength
          for (var i = 0; i < length; i++) {
            binary += String.fromCharCode(bytes[i])
          }
          var XLSX = require('xlsx')
          if (rABS) {
            wb = XLSX.read(btoa(fixdata(binary)), {
              //手动转化
              type: 'base64',
              cellDates: true,
            })
          } else {
            wb = XLSX.read(binary, {
              type: 'binary',
            })
          }
          // outdata就是你想要的东西 excel导入的数据
          outdata = XLSX.utils.sheet_to_json(wb.Sheets[wb.SheetNames[0]])
          // excel 数据再处理
          let arr = []
          outdata.map((v) => {
            // let jsonString = JSON.stringify(v).replace(/\*/g, '').replace(/\s/ig,'');
            let jsonString = JSON.stringify(v)
              .replace(/\//g, '')
              .replace(/\s/gi, '')
            console.log(jsonString)
            v = JSON.parse(jsonString)
            let obj = {}
            //xxx代表列名
            obj.caseNo = v.箱号
            obj.loadNetWeight = v.装车
            obj.titleNo = v.封号
            obj.driverPhone = v.司机电话
            obj.driver = v.司机姓名
            obj.unloadNetWeight = v.卸车净重
            obj.receiveDateEnd = v.卸车日期
            obj.status = v.状态
            obj.carNo = v.车牌号
            obj.unloadPoundImg = v.磅单
            console.log(obj)
            _this.excelFreightspace.push(obj)
          })
          // _this.freightspace.concat(arr)
          let _ispushData = true
          console.log(arr, _this.deptBudgetList.tranCarInfoList)
          for (let i = 0; i < _this.excelFreightspace.length; i++) {
            _ispushData = true
            for (let k = 0; k < _this.deptBudgetList.tranCarInfoList.length; k++) {
              if (
                _this.excelFreightspace[i].driverPhone ==
                _this.deptBudgetList.tranCarInfoList[k].driverPhone
              ) {
                _this.deptBudgetList.tranCarInfoList[k] = _this.excelFreightspace[i]
                _ispushData = false
              }
            }
            if (_ispushData) {
              _this.deptBudgetList.tranCarInfoList.push(_this.excelFreightspace[i])
              _ispushData = true
            }
          }
          _this.$forceUpdate();
        }
        reader.readAsArrayBuffer(f)
      }
      if (rABS) {
        reader.readAsArrayBuffer(f)
      } else {
        reader.readAsBinaryString(f)
      }
      console.log(reader)
    },
    //返回按钮
    revert() {
      this.$router.push({ path: 'tranManagementReceivingFeedback' })
    },
    del(index) {
      if (this.deptBudgetList.tranCarInfoList.length > 1) {
        this.deptBudgetList.tranCarInfoList.splice(index, 1)
      }
    },
    uploadSuccessHandle1(e, index) {
      this.deptBudgetList.tranCarInfoList[index].unloadPoundImg = e.data.url
    },
    selectwaterContent() {},
    //提交按钮
    submit() {
      for (var i = 0; i < this.freightspace.length; i++) {
        if (this.freightspace[i].unloadNetWeight == null) {
          this.$message({
            message: '卸车净重不能为空！',
            type: 'warning',
          })
          return
        }
        if (this.deptBudgetList.priceType!=null&&this.deptBudgetList.priceType=='随行就市'&&!this.freightspace[i].contractPrice) {
            this.$message({
              message: '单价不能为空！',
              type: 'warning',
            })
            return
        }
    }
      this.$confirm(
        `所有车辆完成卸车任务后，请及时修改任务状态，确定提交卸车信息？`,
        {
          cancelButtonText: '取消',
          confirmButtonText: '确定',
          type: 'warning',
        }
      )
        .then(() => {
          this.$refs.deptBudgetList.validate((valid) => {
            if (valid) {
              // this.tranCarInfoList = this.freightspace
              this.tranCarInfoList = this.deptBudgetList.tranCarInfoList
              this.tranCarInfoList.driver = this.deptBudgetList.driver
              this.tranCarInfoList.driverPhone = this.deptBudgetList.driverPhone
              this.tranCarInfoList.carNo = this.deptBudgetList.carNo
              this.tranCarInfoList.loadNetWeight =
                this.deptBudgetList.loadNetWeight
              this.tranCarInfoList.tranType = this.tranType
              // this.tranCarInfoList.unloadPoundImg = this.deptBudgetList.tranCarInfoList.unloadPoundImg
              console.log(
                this.deptBudgetList.tranCarInfoList[0].unloadPoundImg,
                '图片'
              )
              this.tranCarInfoList.unloadNetWeight =
                this.deptBudgetList.unloadNetWeight
              for (var i = 0; i < this.tranCarInfoList.length; i++) {
                this.tranCarInfoList[i].id = this.freightspace[i].id
                if (this.tranCarInfoList[i].temporaryDriverFlag != 0) {
                  this.tranCarInfoList[i].temporaryDriverFlag = 1
                  this.tranCarInfoList[i].tranType = this.tranType
                }
              }
              console.log(this.tranCarInfoList, '12121212')
              var tranProcessInfo = {}
              tranProcessInfo.flag='1'
              tranProcessInfo.id = this.deptBudgetList.id
              tranProcessInfo.infoId = this.deptBudgetList.infoId
              tranProcessInfo.tranCarInfoList = this.tranCarInfoList
              feedback(tranProcessInfo)
                .toPromise()
                .then((response) => {
                  this.$message.success('提交成功')
                  this.deptBudgetList = {}
                  this.freightspace = {}
                  this.selectedOptions = ''
                  this.$router.push({
                    path: 'tranManagementReceivingFeedback',
                  })
                })
            } else {
              // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
              return false
            }
          })
        })
        .catch(() => {
          return false
        })
    },
    //导入
    finished() {
      this.$confirm(`完货操作后，卸车信息不可修改，是否确定完货？`, {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning',
      })
        .then(() => {
          this.$refs.deptBudgetList.validate((valid) => {
            if (valid) {
              var tranProcessInfo = {}
              tranProcessInfo.id = this.deptBudgetList.id
              tranProcessInfo.weight = this.total
              stateRec(tranProcessInfo)
                .toPromise()
                .then((response) => {
                  this.$message.success('完货成功')
                  this.deptBudgetList = {}
                  this.freightspace = {}
                  this.selectedOptions = ''
                  this.$router.push({
                    path: 'tranManagementReceivingFeedback',
                  })
                })
            } else {
              return false
            }
          })
        })
        .catch(() => {
          return false
        })
    },
    handleClose() {
      this.accessoryTFs = false
    },

    getList() {
      seeCat({ id: this.deptBudgetList.id })
        .toPromise()
        .then((response) => {
          this.deptBudgetList = response
          if (response.tranCarInfoList) {
            this.freightspace = response.tranCarInfoList
          }
          for (var i = 0; i < this.freightspace.length; i++) {
            if (!this.freightspace[i].loadNetWeight) {
              this.freightspace[i].loadNetWeight = 0
            }
          }
        })
    },
    carchange(val, index) {
      for (var i = 0; i < this.carList.length; i++) {
        if (this.carList[i].driverName == val) {
          this.deptBudgetList.tranCarInfoList[index].driverPhone =
            this.carList[i].driverPhone
          arrange({ id: this.carList[i].id })
            .toPromise()
            .then((response) => {
              this.deptBudgetList.tranCarInfoList[index].carNo =
                response.carNumber
              if (response.carLoad != null) {
                this.deptBudgetList.tranCarInfoList[index].loadWeight =
                  response.carLoad
              } else {
                this.deptBudgetList.tranCarInfoList[index].loadWeight = 0
              }
              this.deptBudgetList.tranCarInfoList[index].carModel =
                response.carModel
              this.deptBudgetList.tranCarInfoList[index].carLength =
                response.carLength
              this.deptBudgetList.tranCarInfoList[index].carLengthKey =
                response.carLengthKey
              this.deptBudgetList.tranCarInfoList[index].carModelKey =
                response.carModelKey
            })
        }
      }
    },
  },
  phonechange(val, index) {
    for (var i = 0; i < this.carList.length; i++) {
      if (this.carList[i].driverPhone == val) {
        this.deptBudgetList.tranCarInfoList[index].driver =
          this.carList[i].driver
        arrange({ id: this.carList[i].id })
          .toPromise()
          .then((response) => {
            this.deptBudgetList.tranCarInfoList[index].carNo =
              response.carNumber
            if (response.carLoad != null) {
              this.deptBudgetList.tranCarInfoList[index].loadWeight =
                response.carLoad
            } else {
              this.deptBudgetList.tranCarInfoList[index].loadWeight = 0
            }
            this.deptBudgetList.tranCarInfoList[index].carModel =
              response.carModel
            this.deptBudgetList.tranCarInfoList[index].carLength =
              response.carLength
            this.deptBudgetList.tranCarInfoList[index].carLengthKey =
              response.carLengthKey
            this.deptBudgetList.tranCarInfoList[index].carModelKey =
              response.carModelKey
          })
      }
    }
  },
  selecttaskType(e) {
    for (var i = 0; i < this.taskTypeList.length; i++) {
      if (this.taskTypeList[i].value == e) {
        this.searchType = this.taskTypeList[i].type
      }
    }
  },
}
</script>
<style lang="scss" scoped>
/deep/.basicInformation {
  .ws-info-table {
    border: none;
  }
  .el-form-item {
    width: 33.3333%;
    border: none;
    height: 50px;
    .el-form-item__label {
      background: transparent;
      border: none;
    }
    .el-form-item__content {
      border: none;
    }
  }
}
.title {
  position: relative;
  padding-left: 10px;
}
.title::before {
  content: '';
  display: inline-block;
  width: 5px;
  height: 30px;
  background: #5473e8;
  position: absolute;
  left: 0;
}
.el-form {
  padding: 42px 5%;
}
.el-button--primary {
  background-color: #5878e8;
  border-color: #5878e8;
}
.el-col {
  background: #f6f7fc;
}
.bg-right {
  text-align: right;
  padding: 16px 20px;
}
.center {
  width: 90%;
  margin: 0 auto;
}

//表格文字
/deep/.ws-info-table .el-form-item .el-form-item__label {
  text-align: left;
  font-size: 13px;
  font-weight: 400;
  color: #8890b1;
  line-height: 16px;
}
//蓝标
.small-title {
  position: relative;
  padding: 10px;
  font-weight: 600;
}
.small-title::before {
  position: absolute;
  content: '';
  display: block;
  background: #5473e8;
  width: 4px;
  height: 14px;
  left: 0px;
  top: 13px;
  padding: 4px 2px;
}
.position {
  position: relative;
}
.position .zaizhong {
  width: 16%;
}
//减号
.del {
  position: absolute;
  // right: -38px;
  top: 9px;
  cursor: pointer;
  right: 0;
  display: inline-block;
  font-size: 20px;
  width: 20px;
  height: 10px;
  line-height: 0px;
}
.driver .el-form-item {
  width: 16.63%;
}
/deep/.ws-info-table .el-form-item .el-form-item__content {
  background: #f5f7fa;
  border-radius: 4px;
  color: #8890b1;
  font-size: 14px;
  font-weight: 400;
}
/deep/.driver .ws-info-table .el-form-item .el-form-item__label {
  width: 72px;
}
/deep/.liaison .ws-info-table .el-form-item {
  width: 15.66%;
  color: #8890b1;
  font-size: 14px;
}
/deep/.ws-info-table .el-form-item {
  border: none;
  height: 50px;
}
/deep/.liaison .ws-info-table .el-form-item .el-form-item__label {
  width: 53.46%;
  border: 0px solid #d8dce6;
  background: #f5f7fa;
  text-align: center;
}
/deep/.liaison {
  background: #f5f7fa;
  border-radius: 4px;
  border: 0px solid #d8dce6;
}
/deep/.liaison .ws-info-table .el-form-item .el-form-item__content {
  border: none;
  background: #f5f7fa;
}
.catNos {
  width: 100%;
  height: 30px;
  margin-top: 10px;
  margin-left: 20px;
  font-size: 14px;
}
/deep/.liaison .ws-info-table .el-form-item .el-form-item__content {
  // border: 0px solid #d8dce6;
  border-radius: 0px;
  border-left: none;
  border-bottom: none;
  border-top: none;
}
/deep/.liaison .ws-info-table {
  background: #f6f7fc;
  border-radius: 4px;
  border: 1px solid #d8dce6;
  margin-top: 20px;
}
//送达/未送达
.noservice,
.service,.serviced {
  display: inline-block;
  border-radius: 4px;
  border: 1px solid #d8dce6;
  padding: 2px;
  font-size: 12px;
}
.noservice {
  background: #c4cada;
  color: #ffffff;
}
.service {
  background: #e5f1f7;
  color: #50cad4;
}
.serviced {
  background: #e5f1f7;
  color: #5473E8;
}
//添加司机
.add {
  width: 100px;
  height: 34px;
  background: #f6f7fb;
  border-radius: 17px;
  color: #5473e8;
  font-size: 14px;
  border: none;
}
.add img {
  display: inline-block;
  margin-top: 3px;
  margin-left: -12px;
}
.add .spans {
  display: table-caption;
  width: 56px;
  height: 20px;
  line-height: 18px;
}
.container {
  overflow: scroll;
  height: 93vh;
}
.line {
  height: 26px;
  margin-top: 6px;
  left: 2px;
  margin: 0 auto;
}
.signStatus {
  height: 25px;
  border-radius: 3px;
  border: 1px solid #5473e8;
  padding: 0 3px;
  margin-left: 30px;
  color: #ffffff;
  background: #c4cada;
  line-height: 24px;
}
.signStatus1 {
  height: 25px;
  background: #e6ebff;
  border-radius: 3px;
  border: 1px solid #5473e8;
  padding: 0 3px;
  margin-left: 30px;
  color: #5473e8;
  line-height: 24px;
}
/deep/.ws-info-table.el-form-item .el-form-item__label {
  // background-color: #eee;
  // padding-right: 8px;
  // padding-left: 8px;
  font-size: 13px;
  font-weight: bold;
  // color: #333;
  // overflow: hidden;
  // height: 40px;
  /* text-overflow: ellipsis; */
  // white-space: nowrap;
  // width: 120px;
  // line-height: 40px;
}
.bg-bottom-preview{
    margin: 0 8px;
  }
</style>
