// 船次管理
<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"
        class="position"
      >
        <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" prop="goodsName">{{
              deptBudgetList.goodsName
            }}</ws-form-item>
            <ws-form-item label="重量（吨）" span="1" prop="weight">{{
              deptBudgetList.weight
            }}</ws-form-item>
            <ws-form-item
              label="发货地址"
              span="1"
              prop="sendDetailedAddress"
              >{{deptBudgetList.sendPrivate}}{{deptBudgetList.sendCity}}{{deptBudgetList.sendArea}}{{ deptBudgetList.sendDetailedAddress }}</ws-form-item
            >
            <ws-form-item label="发货人" span="1" prop="sender">{{
              deptBudgetList.sender
            }}</ws-form-item>
            <ws-form-item label="发货人电话" span="1" prop="senderPhone">{{
              deptBudgetList.senderPhone
            }}</ws-form-item>
            <ws-form-item
              label="收货地址"
              span="1"
              prop="receiveDetailedAddress"
              >{{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="deliveryDateStart">{{
              deptBudgetList.deliveryDateStart
            }}</ws-form-item>
            <ws-form-item
              label="最晚到货日期"
              span="1"
              prop="deliveryDateEnd"
              >{{ deptBudgetList.deliveryDateEnd }}</ws-form-item
            >
            <ws-form-item label="合同编号" span="1" prop="contractNo">{{
              deptBudgetList.contractNo
            }}</ws-form-item>
          </ws-info-table>
          <div class="small-title" style="font-size: 16px">联络员及航次</div>
          <div class="myTest">
              <!--当前运输总价-->
            <el-form-item label="当前运输总价(元/吨):" span="1" prop="tranPrice" >
                <el-input
                  v-model="deptBudgetList.tranPrice"
                  maxlength="70"
                  disabled
                  size="small"
                  style="width:70px"
                />
            </el-form-item>
            <!--审核中的运输总价-->
            <el-form-item label="审核中的运输总价(元/吨):" span="1" prop="tranPriceIng">
              <el-input
                  v-if="deptBudgetList.priceStatus=='审核中'"
                  :disabled="readonly"
                  v-model="deptBudgetList.tranPriceIng"
                  maxlength="70"
                  size="small"
                  style="width:70px"
                />
              <el-input
                  v-else
                  v-model="deptBudgetList.tranPriceIng"
                  maxlength="70"
                  size="small"
                  style="width:70px"
                />
            </el-form-item>
           <div style="">
             <el-button
              v-if="deptBudgetList.priceStatus=='审核中'"
              type="primary"
              v-hasPermission="`tranManager.transportationInfo.ship`" 
              size="small"
              @click="examine()"
              >审核中</el-button
            >
             <el-button
              v-else
              type="primary"
              size="small"
              @click="priceSubmit()"
              >提交</el-button
            >
           </div>
          </div>
        <div
            class="position siji"
            v-for="(item, index) in deptBudgetList.tranCarInfoList"
            :key="index"
          >
            <div class="zhong" v-show="index==0">
              <ws-form-item label="姓名" span="1" prop="driver">
                <el-select
                  v-if="item.id != null"
                  :disabled="readonly"
                  v-model="item.driver"
                  placeholder="请选择姓名"
                  filterable
                  clearable
                  @change="selectstaff"
                  size="small"
                >
                  <el-option
                    v-for="item in options"
                    :key="item.value"
                    :label="item.staffName"
                    :value="item.staffName"
                  />
                </el-select>
                 <el-select
                  v-else
                  v-model="item.driver"
                  placeholder="请选择姓名"
                  filterable
                  clearable
                  @change="selectstaff"
                  size="small"
                >
                  <el-option
                    v-for="item in options"
                    :key="item.value"
                    :label="item.staffName"
                    :value="item.staffName"
                  />
                </el-select>
              </ws-form-item>
              <ws-form-item
                label="电话"
                span="1"
                prop="driverPhone"
                class="biao"
              >
                <ws-input
                  v-if="item.id != null"
                  :disabled="readonly"
                  :readonly="true"
                  v-model="item.driverPhone"
                  placeholder="请输入电话"
                  maxlength="20"
                  size="small"
                  class="ys"
                />
                <ws-input
                  v-else
                  :readonly="true"
                  v-model="item.driverPhone"
                  placeholder="请输入电话"
                  maxlength="20"
                  size="small"
                  class="ys"
                />
              </ws-form-item>
              <ws-form-item
                label="发船日期"
                span="1"
                prop="sendDateStart"
                class="biao2"
              >
                <ws-date-picker
                v-if="item.id != null"
                  :disabled="readonly"
                  v-model="item.sendDateStart"
                  type="date"
                  placeholder="请选择发船日期"
                  value-format="yyyy-MM-dd"
                  class="small"
                />
                 <ws-date-picker
               v-else
                  v-model="item.sendDateStart"
                  type="date"
                  placeholder="请选择发船日期"
                  value-format="yyyy-MM-dd"
                  class="small"
                />
              </ws-form-item>
              <ws-form-item
                label="预计到港日期"
                span="1"
                prop="receiveDateEnd"
                class="biao3"
              >
                <ws-date-picker
                v-if="item.id != null"
                  :disabled="readonly"
                  v-model="item.receiveDateEnd"
                  type="date"
                  placeholder="请选择发货日期"
                  value-format="yyyy-MM-dd"
                  class="small"
                />
                <ws-date-picker
               v-else
                  v-model="item.receiveDateEnd"
                  type="date"
                  placeholder="请选择发货日期"
                  value-format="yyyy-MM-dd"
                  class="small"
                />
              </ws-form-item>
              <ws-form-item label="航次" span="1" prop="shipNo" class="biao4">
                <ws-input
                  v-model="item.shipNo"
                  placeholder="请选择航次"
                  maxlength="100"
                  size="small"
                  class="ys"
                ></ws-input>
              </ws-form-item>
              <ws-form-item label="船名" span="1" prop="shipName" class>
                <ws-input
                  v-model="item.shipName"
                  placeholder="请输入船名"
                  maxlength="100"
                  size="small"
                  class="ys"
                ></ws-input>
              </ws-form-item>
              <ws-form-item label="类型" span="1" prop="shipType" class="biao5">
                <ws-select
                  v-model="item.shipType"
                  placeholder="请输入"
                  class="ys"
                  v-if="item.id != null"
                  :disabled="readonly"
                >
                  <ws-option
                    v-for="items in shipType"
                    :key="items.constKey"
                    :label="items.constValue"
                    :value="items.constValue"
                  />
                </ws-select>
                <ws-select
                  v-model="item.shipType"
                  placeholder="请输入"
                  class="ys"
                  v-else
                >
                  <ws-option
                    v-for="items in shipType"
                    :key="items.constKey"
                    :label="items.constValue"
                    :value="items.constValue"
                  />
                </ws-select>
              </ws-form-item>
              <ws-form-item
                label="数量"
                span="1"
                prop="boxNumber"
                class="biao6"
                v-show="item.shipType == '集装箱'"
              >
                <ws-input
                  v-if="item.id != null"
                  :disabled="readonly"
                  v-model="item.boxNumber"
                  placeholder="请输入数量"
                  class="ys"
                ></ws-input>
                 <ws-input
                 v-else
                  v-model="item.boxNumber"
                  placeholder="请输入数量"
                  class="ys"
                ></ws-input>
              </ws-form-item>
              <ws-form-item
                label="仓位号"
                span="1"
                prop="binNumber"
                v-show="item.shipType == '散船'"
                class="biao6"
              >
                <ws-input
                  v-if="item.id != null"
                  :disabled="readonly"
                  v-model="item.binNumber"
                  placeholder="请输入仓位号"
                  maxlength="100"
                  size="small"
                  style="width: 110px"
                ></ws-input>
                <ws-input
                  v-else
                  v-model="item.binNumber"
                  placeholder="请输入仓位号"
                  maxlength="100"
                  size="small"
                  style="width: 110px"
                ></ws-input>
              </ws-form-item>
              <ws-form-item
                label="重量(吨)"
                span="1"
                prop="positionWeight"
                v-show="item.shipType == '散船'"
                class="biao7"
              >
                <ws-input
                  v-if="item.id != null"
                  :disabled="readonly"
                  v-model="item.positionWeight"
                  placeholder="请输入重量"
                  maxlength="100"
                  size="small"
                  class="ys"
                ></ws-input>
                 <ws-input
                 v-else
                  v-model="item.positionWeight"
                  placeholder="请输入重量"
                  maxlength="100"
                  size="small"
                  class="ys"
                ></ws-input>
              </ws-form-item>
            </div>
              <div class="zhong-other"  v-show="index!=0">
              <ws-form-item
                label="仓位号"
                span="1"
                prop="binNumber"
                v-show="item.shipType == '散船'"
                class="item"
              >
                <ws-input
                  v-if="item.id != null"
                  :disabled="readonly"
                  v-model="item.binNumber"
                  placeholder="请输入仓位号"
                  maxlength="100"
                  size="small"
                  style="width: 110px"
                ></ws-input>
                <ws-input
                  v-else
                  v-model="item.binNumber"
                  placeholder="请输入仓位号"
                  maxlength="100"
                  size="small"
                  style="width: 110px"
                ></ws-input>
              </ws-form-item>
              <ws-form-item
                label="重量(吨)"
                span="1"
                prop="positionWeight"
                v-show="item.shipType == '散船'"
                class="item"
              >
                <ws-input
                  v-if="item.id != null"
                  :disabled="readonly"
                  v-model="item.positionWeight"
                  placeholder="请输入重量"
                  maxlength="100"
                  size="small"
                  style="width: 110px"
                ></ws-input>
                 <ws-input
                 v-else
                  v-model="item.positionWeight"
                  placeholder="请输入重量"
                  maxlength="100"
                  size="small"
                  style="width: 110px"
                ></ws-input>
              </ws-form-item>
            </div>
            <span
              v-if="(item.status == '未装车'&& item.shipType == '散船') || item.status == null" 
              width="22"
              height="22"
              class="del"
              @click="del(index, item)"
              src="../../../public/img/del.png"
              alt=""
              >×</span>
          </div>
          <div style="text-align: right; color: #8890b1; font-size: 16px; margin-right: -40%" v-show="deptBudgetList.tranCarInfoList[0].shipType == '散船'">
            共{{ total }}/{{ deptBudgetList.weight }}         
          </div>
          <el-button
            class="add bg-bottom"
            type="primary"
            size="small"
            @click="add"
            v-show="deptBudgetList.tranCarInfoList[0].shipType == '散船'"
          >
            <img width="22" height="22" src="../../../public/img/add.png" alt />
            <div class="spans">添加仓位</div>
          </el-button>
          </div>
      </ws-form>
      <div style="text-align: right; padding: 10px">
        <el-button
          class="bg-bottom-up"
          type="primary"
          size="small"
          @click="submit()"
          >提交</el-button
        >
      </div>
    </div>
  </div>
</template>
<script>
import { shippingLook, packList, dispatchCat ,delhaulagestage,setUpTranPrice} from '@/model/transport/index'
import { getstaff } from '@/model/warehouse/index'
import Pagination from '@/components/Pagination'
import WsUpload from '@/components/WsUpload'
import { dayjs } from 'base-core-lib'
export default {
  name: 'viewSpareMoney',
  components: {
    WsUpload,
    Pagination,
  },
  watch: {
    vesselId(val) {
      this.getList()
    },
    isShow(val) {
      this.showType = val
    },
  },
  data() {
    return {
      //弹出框
      dialogViewSpareMoney: false,
      dialogApproveFormVisible: false,
      // 船舶类型
      monetaryKey: null,
      // 表格显示数据
      tableDate: [],
      // 是否显示
      showType: true,
      // 年
      year: '',
      item: [],
      shipType: [],
      tranType: 3,
      deptBudgetTotal: 0,
      currentPage: 1,
      pageSize: 10,
      searchType: 1,
      searchKeyWord: '',
      contractType: 2,
      startDate: null,
      endDate: null,
      goodnameList: {},
      // 提交类型
      submitType: true,
      storageType: [],
      readonly: true,
      appendixIdsAdd: '',
      uploadSuccess: {},
      onChange: {},
      selectedOptions: [],
      options: [],
      tranCarInfoList: {},
      staffList: [],
      gradeList: [],
      rules: {
        netWeight: [
          {
            required: true,
            type: 'number',
            message: '请输入活动名称',
            trigger: 'blur',
          },
        ],
      },
      arr: [],
      freightspace: [
        // {
        //   impurity:'',
        // },
      ],
      size: 10,
      compId: sessionStorage.getItem('ws-pf_compId'),
      deptCircularPage: {},
      packtypeList: {},
      date: {
        year: dayjs().format('YYYY'),
        month: dayjs().format('MM'),
      },
      contractList: [],
      deptBudgetList: {
        warehouseInOutDetail: {},
      },
      historyList: [],

      pickerBeginDateBefore: {
        disabledDate: (time) => {
          return time.getTime() > Date.now()
        },
      },
      accessoryTFs: false,
    }
  },
  mounted() {
    this.getList()
  },
  activated() {
    this.loaddata()
    this.getList()
  },
  computed: {
    totalStorage: function () {
      var maxStorage = 0
      for (var i = 0; i < this.freightspace.length; i++) {
        maxStorage += Number(this.freightspace[i].maxStorage)
      }
      return maxStorage
    },
    total: function () {
      if (this.deptBudgetList.tranCarInfoList.length > 0) {
        var maxStorage = 0
        for (var i = 0; i < this.deptBudgetList.tranCarInfoList.length; i++) {
          maxStorage += Number(
            this.deptBudgetList.tranCarInfoList[i].positionWeight
          )
        }
        return maxStorage
      }
    },
  },
  methods: {
    getList() {
      getstaff({ compId: sessionStorage.getItem('ws-pf_compId') })
        .toPromise()
        .then((response) => {
          this.options = response
          this.staffList = response
        })
      //类型
      packList({ constId: 'TRAN4' })
        .toPromise()
        .then((response) => {
          this.shipType = response
        })
    },
    dataFilter(val) {
      this.deptBudgetList.personCharge = val
      if (val) {
        console.log(val)
        this.options = this.staffList.filter((item) => {
          if (
            !!~item.staffName.indexOf(val) ||
            !!~item.staffName.toUpperCase().indexOf(val.toUpperCase())
          ) {
            return true
          }
        })
      } else {
        this.options = this.staffList
      }
    },
    selectstaff(e) {
      for (var i = 0; i < this.staffList.length; i++) {
        if (this.staffList[i].staffName == e) {
          this.deptBudgetList.driverPhone = this.staffList[i].staffMobilePhone
          this.deptBudgetList.tranCarInfoList[0].driverPhone =
            this.staffList[i].staffMobilePhone
          this.deptBudgetList.personChargeKey = this.staffList[i].staffId
        }
      }
    },
    loaddata() {
      shippingLook({ id: this.$route.query.id })
        .toPromise()
        .then((response) => {
          this.deptBudgetList = response
          if (response.tranCarInfoList.length > 0) {
            if(response.tranCarInfoList[0].shipType =='集装箱') {
              this.deptBudgetList.tranCarInfoList=[this.deptBudgetList.tranCarInfoList[0]]

            }
            // for (
            //   var i = 0;
            //   i < this.deptBudgetList.tranCarInfoList.length;
            //   i++
            // ) {
            //   var num = this.deptBudgetList.tranCarInfoList[
            //     i
            //   ].positionWeight.split(',')
            //   for (var j = 0; j < num.length; j++) {
            //     var num2 = num[j].split('/')
            //     this.freightspace.push({
            //       impurity: num2[i],
            //       positionWeight: num2[num2.length - 1]
            //     })
            //   }
            // }
          } else {
            this.deptBudgetList.tranCarInfoList = [
              {
                driver: '',
                driverPhone: '',
                sendDateStart: '',
                receiveDateEnd: '',
                shipNo: '',
                shipName: '',
                shipType: '',
                boxNumber: '',
                positionWeight: '',
                binNumber: '',
                tranType: '3',
              },
            ]
          }
        })
    },
    //返回按钮
    revert() {
      this.freightspace = []
      this.$router.go(-1)
    },
    del(index, row) {
      if(row.status == null){
        if (this.deptBudgetList.tranCarInfoList.length > 1) {
                  this.deptBudgetList.tranCarInfoList.splice(index, 1)
               }
      }else{
        this.$confirm('船次信息删除后不可恢复，是否确定删除？', '提示', {
          confirmButtonText: '确定',
          cancelButtonText: '取消',
          type: 'warning',
        }).then(() => {
          delhaulagestage({ id: row.id })
            .toPromise()
            .then((response) => {
              this.$message.success('删除成功')
              if (this.deptBudgetList.tranCarInfoList.length > 1) {
                  this.deptBudgetList.tranCarInfoList.splice(index, 1)
               }
            })
        })
      }
    },
    add() {
        if(!this.deptBudgetList.tranPrice){
        this.$message({
          message: '请设置运输总价！',
          type: 'warning',
        })
      }
      else{
      this.deptBudgetList.tranCarInfoList.push({
        driver: this.deptBudgetList.tranCarInfoList[0].driver,
        driverPhone: this.deptBudgetList.tranCarInfoList[0].driverPhone,
        sendDateStart: this.deptBudgetList.tranCarInfoList[0].sendDateStart,
        receiveDateEnd: this.deptBudgetList.tranCarInfoList[0].receiveDateEnd,
        shipNo: this.deptBudgetList.tranCarInfoList[0].shipNo,
        shipName: this.deptBudgetList.tranCarInfoList[0].shipName,
        shipType: this.deptBudgetList.tranCarInfoList[0].shipType,
        binNumber: '',
        positionWeight: '',
        tranType: '3',
      })
      }
    },
    selectdriver() {},
    handleChange(value) {
      this.selectedOptions = value
    },
    returnsales() {
      this.deptBudgetList = {}
      this.freightspace = []
      this.selectedOptions = ''
      this.$router.push({ path: 'tranManagementShipping' })
    },
      //审核
    examine(){
      this.$prompt('运输单价审核', {
          cancelButtonText: '取消',
          confirmButtonText: '确定',
        }).then(({ value }) => {
              var tranProcessInfo = {}
              tranProcessInfo.reviewer = sessionStorage.getItem('ws-pf_roleName') +
        sessionStorage.getItem('ws-pf_staffName')
              tranProcessInfo.id = this.deptBudgetList.id
              tranProcessInfo.flag = "2"
              tranProcessInfo.tranPriceIng = value
                 tranProcessInfo.tranTypeKey = 3
              setUpTranPrice(tranProcessInfo)
                .toPromise()
                .then((response) => {
                  this.$message.success('审核成功')
                  this.getList()
                });
        }).catch(() => {
          this.$message.warning(
            '取消审核'
          );       
        });
    },
     priceSubmit(){
      this.$confirm(`运输单价将发送给决策人审核，确定提交？`, {
        cancelButtonText: '取消',
        confirmButtonText: '确定',
        type: 'warning',
      })
        .then(() => {
              var tranProcessInfo = {}
              tranProcessInfo.id = this.deptBudgetList.id
              tranProcessInfo.flag = "1"
              tranProcessInfo.tranPriceIng = this.deptBudgetList.tranPriceIng
               tranProcessInfo.tranTypeKey = 3
              setUpTranPrice(tranProcessInfo)
                .toPromise()
                .then((response) => {
                  this.$message.success('提交成功')
                  this.getList()
                })              
        })
        .catch(() => {
          return false
        })
    },
    //提交按钮
    submit() {
      for (var i = 0; i < this.deptBudgetList.tranCarInfoList.length; i++) {
        if (!this.deptBudgetList.tranCarInfoList[i].driver) {
          this.$message({
            message: '名字不为空',
            type: 'warning',
          })
          return
        }
        if (!this.deptBudgetList.tranCarInfoList[i].driverPhone) {
          this.$message({
            message: '电话号不为空',
            type: 'warning',
          })
          return
        }
        if (!this.deptBudgetList.tranCarInfoList[i].sendDateStart) {
          this.$message({
            message: '发船时间不能为空',
            type: 'warning',
          })
          return
        }
        if (!this.deptBudgetList.tranCarInfoList[i].receiveDateEnd) {
          this.$message({
            message: '预计到港时间不能为空',
            type: 'warning',
          })
          return
        }
        if (!this.deptBudgetList.tranCarInfoList[i].shipName) {
          this.$message({
            message: '船名不能为空',
            type: 'warning',
          })
          return
        }
        if (!this.deptBudgetList.tranCarInfoList[i].shipNo) {
          this.$message({
            message: '航次不能为空',
            type: 'warning',
          })
          return
        }
        if (this.deptBudgetList.tranCarInfoList[i].shipType == '集装箱') {
          if (!this.deptBudgetList.tranCarInfoList[i].boxNumber) {
            this.$message({
              message: '数量不能为空',
              type: 'warning',
            })
            return
          }
        }
        if (!this.deptBudgetList.tranCarInfoList[i].shipType) {
          this.$message({
            message: '类型不能为空',
            type: 'warning',
          })
          return
        }
        // console.log(this.freightspace,"仓位号")
        if (this.deptBudgetList.tranCarInfoList[i].shipType == '散船') {
          if (!this.deptBudgetList.tranCarInfoList[i].binNumber) {
            this.$message({
              message: '仓位号不能为空',
              type: 'warning',
            })
            return
          }
          if (!this.deptBudgetList.tranCarInfoList[i].positionWeight) {
            this.$message({
              message: '重量不能为空',
              type: 'warning',
            })
            return
          }
        }

        if (
          new Date(
            this.deptBudgetList.tranCarInfoList[0].sendDateStart
          ).getTime() >
          new Date(
            this.deptBudgetList.tranCarInfoList[0].receiveDateEnd
          ).getTime()
        ) {
          this.$message({
            message: '发船时间不能大于最晚到到港时间！',
            type: 'warning',
          })
          return
        }
      }
      this.$confirm(`提交成功后，任务将下发给相关人员，是否确定提交?`, {
        cancelButtonText: '取消',
        confirmButtonText: '确定',
        type: 'warning',
      })
        .then(() => {
          this.$refs.deptBudgetList.validate((valid) => {
            if (valid) {
              this.deptBudgetList.totalStorage = this.totalStorage
              var tranCarInfo = {}
              tranCarInfo.id = this.deptBudgetList.id
              tranCarInfo.infoId = this.deptBudgetList.infoId
              tranCarInfo.tranCarInfoList = this.deptBudgetList.tranCarInfoList
              dispatchCat(tranCarInfo)
                .toPromise()
                .then((response) => {
                  this.$message.success('提交成功')
                  this.deptBudgetList = {}
                  this.freightspace = {}
                  this.selectedOptions = ''
                  this.$router.go(-1)
                })
            } else {
              // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
              return false
            }
          })
        })
        .catch(() => {
          return false
        })
    },
    handleClose() {
      this.accessoryTFs = false
    },
    handleSizeChange(val) {
      console.log(`每页 ${val} 条`)
      this.pageSize = val
      this.getList()
    },
    handleCurrentChange(val) {
      this.currentPage = val
      console.log(`当前页: ${val}`)
      this.getList()
    },
    selecttaskType(e) {
      for (var i = 0; i < this.taskTypeList.length; i++) {
        if (this.taskTypeList[i].value == e) {
          this.searchType = this.taskTypeList[i].type
        }
      }
    },
    // approve() {},
    // listQuery() {}
  },
}
</script>
<style lang="scss" scoped>
.position {
  position: relative;
}
.el-button--primary {
  background-color: #5878e8;
  border-color: #5878e8;
}
.el-col {
  background: #f6f7fc;
}
.bg-right {
  text-align: right;
  padding: 16px 20px;
}
.center {
  margin: 0 auto;
}

//表格文字
/deep/.ws-info-table .el-form-item .el-form-item__label {
  text-align: left;
  font-size: 14px;
  font-weight: 400;
  color: #8890b1;
  line-height: 16px;
}
//蓝标
.small-title {
  position: relative;
  padding: 10px;
  font-weight: 600;
  margin-left: 27px;
}

.position .zaizhong {
  width: 16%;
}

.bot {
  width: 30%;
}
//去边框
/deep/.el-form-item {
  border-right: 0px;
  border-bottom: 0px;
}
/deep/.ws-info-table {
  border-left: 0px;
  border-top: 0px;
}
.ws-info-table .el-form-item .el-form-item__content {
  border-right: 0px;
  border-bottom: 0px;
  border-left: 0px;
  border-top: 0px;
}
/deep/.ws-info-table .el-form-item {
  border-right: 0px;
  border-bottom: 0px;
  border-left: 0px;
  border-top: 0px;
}
/deep/.ws-info-table .el-form-item .el-form-item__content {
  background: #f5f7fa;
  border-radius: 4px;

  font-family: PingFangSC-Regular, PingFang SC;
  margin-bottom: 5px;
  // background-color: #fff;
  font-size: 14px;
  font-weight: 400;
  color: #8890b1;
  line-height: 16px;
}
/deep/.ws-info-table .el-form-item .el-form-item__label {
  background-color: #fff;
  font-size: 14px;
  font-family: PingFangSC-Regular, PingFang SC;
  font-weight: 400;
  color: #8890b1;
  line-height: 16px;
}

//下表格样式
.position.siji {
  background: white;
  border-radius: 4px;
  /* border: 1px solid #d8dce6; */
  // width: 1219px;
}
/deep/.zi {
  width: 64px;
  height: 22px;
  font-size: 16px;
  font-family: PingFangSC-Semibold, PingFang SC;
  font-weight: 600;
  color: #323233;
  line-height: 22px;
}
//表格文字
/deep/.ws-info-table .el-form-item .el-form-item__label {
  text-align: left;
  font-size: 14px;
  font-weight: 400;
  color: #8890b1;
  line-height: 16px;
}
//小标题文字
.small-title::before {
  position: absolute;
  content: '';
  display: block;
  background: #5473e8;
  width: 4px;
  height: 14px;
  left: 0px;
  top: 13px;
  padding: 4px 2px;
}
/deep/.basicInformation {
  .el-form-item {
    // width: 25%;

    .el-form-item__label {
      background: transparent;
      border: none;
    }
    .el-form-item__content {
      // border: none;
    }
  }
}
//添加仓位样式
.add {
  width: 100px;
  height: 34px;
  background: #f6f7fb;
  border-radius: 17px;
  color: #5473e8;
  font-size: 14px;
  border: none;
  margin-top: 8px;
}
.add img {
  display: inline-block;
  margin-top: 3px;
  margin-left: -12px;
}
.add .spans {
  display: table-caption;
  width: 56px;
  height: 20px;
  line-height: 18px;
}
/deep/.xia {
  width: 715px;
  height: 54px;
  border-radius: 4px;
  border: 1px solid #d8dce6;
  margin-top: 10px;
  background: #f6f7fc;
  border-radius: 4px;
  margin-left: 24px;
}
.basicInformation .ws-info-table {
  border: none;
  width: 100%;
  margin: 0 auto;
}
/deep/.el-select .el-input__inner {
  border: 1px solid #ccc !important;
  padding: 0 15px !important;
  font-size: 12px !important;
  // width: 125px;
}
.zhong {
  background: #f6f7fc;
  border-radius: 4px;
  border: 1px solid #d8dce6;
  width: 100%;
}
/deep/.zhong .el-form-item{
  width: 20%;
}
.bg-left {
  padding-left: 30px;
}
/deep/.el-input--prefix .el-input__inner {
  padding-left: 30px;
  width: 150px;
}

.ys {
  // margin-left: 300px;
  width: 100px;
}
.biao {
  margin-left: 240px;
  margin-top: -57px;
}
.biao2 {
  margin-left: 441px;
  margin-top: -59px;
}
.biao3 {
  margin-left: 722px;
  margin-top: -60px;
}
.biao4 {
  margin-left: 1016px;
  margin-top: -60px;
}
.biao5 {
  margin-left: 200px;
  margin-top: -57px;
}
.biao6 {
  margin-left: 450px;
  margin-top: -57px;
}
.biao7 {
  margin-left: 700px;
  margin-top: -57px;
}
/deep/.totalStorage .el-input__inner {
  color: #afb5cb;
  background: #f5f7fa;
}
.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;
}


.del {
  // position: absolute;
  // right: -38px;
  top: 9px;
  cursor: pointer;
  right: 0;
  display: inline-block;
  font-size: 20px;
  width: 16px;
  height: 10px;
  line-height: 0px;
  margin-top: 10px;
  margin-left: 17px;
}

.amap-page-container {
  width: 300px;
  height: 300px;
}

/deep/.ws-info-table .el-form-item {
  border-right: 1px solid transparent;
  border-bottom: 1px solid transparent;
  width: 33.3333%;
}
.readonly {
  position: relative;
}
.readonly:after {
  content: '*';
  color: #ff2727;
  position: absolute;
  right: 8px;
  z-index: 10;
  top: 21%;
  font-size: 20px;
}
.title {
  position: relative;
}
.title::before {
  content: '';
  display: inline-block;
  width: 5px;
  height: 30px;
  background: #5473e8;
  position: absolute;
  left: 0;
}
.el-button--primary {
  background-color: #5878e8;
  border-color: #5878e8;
}
.el-col {
  background: #f6f7fc;
}

/deep/.ws-info-table .el-form-item .el-form-item__content {
  background: #f5f7fa;
  border-radius: 4px;
  // border: 1px solid #d8dce6;
  margin-bottom: 5px;
  font-size: 14px;
  font-weight: 400;
  color: #8890b1;
  line-height: 16px;
  padding: 0 25px;
  // border-left: 1px solid transparent;
  border: none;
}
/deep/.ws-info-table .el-form-item .el-form-item__label {
  width: 100px;
  text-align: center;
  background: #fff;
  font-size: 14px;
  font-weight: 400;
  color: #8890b1;
  line-height: 16px;
}
.button-container {
  display: flex;
  flex-wrap: nowrap;
  justify-content: space-between;
  align-items: center;
  background-color: #fff;
  width: 100%;
  height: 50px;
  padding: 0 10px;
  & > div {
    margin-left: 10px;
    display: flex;
    flex-wrap: nowrap;
    flex-direction: row;
    & > span {
      line-height: 50px;
    }
  }

  /deep/.auditFlow-box {
    position: unset;
    margin-left: 10px;
    &/deep/.auditFlow-icon {
      width: auto;
      padding-right: 30px;
    }
    &/deep/.auditFlow-main {
      position: absolute;
    }
  }
}
.box-app {
  display: inline-block;
  float: left;
  margin-left: 30px;
  line-height: 50px;
}
/deep/.el-dialog {
  .el-form-item {
    margin-bottom: 0 !important;
    .el-input--medium {
      textarea {
        min-height: 100px !important;
      }
    }
  }
}
.collapse-bottom {
  margin-bottom: 20px;
}
.input-main .textarea .el-textarea__inner {
  width: 100%;
  z-index: 1;
}
.bg-left {
  padding-left: 30px;
}
.bg-right {
  padding-right: 10px;
  text-align: right;
}
// .el-form-item {
//   width: 50%;
// }
.el-form-item__label {
  text-align: center;
}
.hide-sel {
  .el-input__inner {
    border: 0px;
  }
  .el-icon-arrow-up {
    display: none;
  }
  .el-textarea__inner {
    background-color: #fff !important;
    border: 0;
  }
  .el-date-editor {
    i {
      display: none;
    }
  }
  .is-disabled {
    .el-input__inner:hover {
      background-color: #fff !important;
      border: 0;
    }
    color: #606266;
    .el-input__inner {
      background-color: #fff !important;
      border: 0;
      color: #606266;
    }
    .el-textarea__inner {
      background-color: #fff !important;
      border: 0;
      color: #606266;
    }
  }
}

// 控制select为只读的时候显示样式
/deep/.ws-class-table-col {
  height: auto;
  padding: 0px 2px;
  /deep/.el-input__inner {
    padding: 0px 2px;
  }
}
/deep/.is-disabled {
  .el-input__prefix,
  .el-input__suffix {
    display: none;
  }
  .el-input__inner {
    color: #000 !important;
    font-size: 14px;
    cursor: text;
    padding: 0 !important;
  }
}
.winseaview-view {
  padding: 0 0 20px;
}
.container {
  overflow: scroll;
  height: 93vh;
}

.readonly:after {
  display: none;
}
.el-textarea__inner {
  display: none;
}
.el-form {
  margin-top: 50px;
  padding: 0 15%;
}
.readonly {
  width: 16%;
}

//去边框
/deep/.el-form-item {
  border-right: 0px;
  border-bottom: 0px;
}
/deep/.ws-info-table {
  border-left: 0px;
  border-top: 0px;
}


/deep/.flex .ws-info-table .el-form-item .el-form-item__content {
  border: 0px;
}
.add {
  width: 100px;
  height: 34px;
  background: #f6f7fb;
  border-radius: 17px;
  color: #5473e8;
  font-size: 14px;
  border: none;
  margin-left: 17px;
  // margin-left: -79px;
}
.add img {
  display: inline-block;
  margin-top: 3px;
  margin-left: -12px;
}
.add .spans {
  display: table-caption;
  width: 56px;
  height: 20px;
  line-height: 18px;
}
/deep/.carnum {
  display: contents;
}
/deep/.carnum .ws-info-table .el-form-item {
  width: 20%;
}
// /deep/.liaison .carnum .ws-info-table .el-form-item {
//   border-radius: 10px;
//   right: 20px;
// }

/deep/.basicInformation .el-form-item .el-form-item__label {
  background: transparent;
  border: none;
  font-size: 14px;
  font-family: PingFangSC-Regular, PingFang SC;
  font-weight: 400;
  color: #8890b1;
  line-height: 16px;
  margin-left: 22px;
}
// /deep/.el-form-item__content .el-select {
//   width: 42%;
// }
//减号
.del {
  position: absolute;
  // right: -38px;
  top: 0px;
  cursor: pointer;
  right: -1%;
  display: inline-block;
  font-size: 20px;
  width: 20px;
  height: 10px;
  line-height: 0px;
}
.zhong-other{
  display: flex;
    margin: 2%;
    background: #f6f7fc;
    border-radius: 4px;
    border: 1px solid #d8dce6;
    .item{
      margin: 0;
    }
}
.myTest{
    width: 1000px;
    display: flex;
    height: 40px;
    margin: 20px 0;
  }
  /deep/.myTest  .el-form-item{
    width: 30%;
  }

</style>
