<template>
  <el-form ref="form" :model="form" :rules="rules">
    <ele-pro-table
      ref="table"
      :needPage="false"
      :columns="columns"
      :toolkit="[]"
      :datasource="form.datasource"
      cache-key="systemRoleTable17"
      class="time-form"
    >
      <!-- 表头工具栏 -->
      <template v-slot:toolbar>
<!--        <div class="headbox">-->
<!--          <el-button-->
<!--            size="small"-->
<!--            type="primary"-->
<!--            icon="el-icon-plus"-->
<!--            class="ele-btn-icon"-->
<!--            @click="handlAdd"-->
<!--          >-->
<!--            新增-->
<!--          </el-button>-->
<!--        </div>-->
        <div class="pricebox">
          <span class="amount">总金额：{{ totalAmount }}元</span>
          <!--            <span>优惠总金额：</span>-->
          <!--            <el-input-->
          <!--              v-model="payAmount"-->
          <!--              style="width: 150px"-->
          <!--              placeholder="请输入">-->
          <!--              &lt;!&ndash; @input="discountInput" &ndash;&gt;-->

          <!--              <template slot="append">元</template>-->
          <!--            </el-input>-->
        </div>
      </template>
      <!-- <template v-slot:technicalDrawings="{ row, $index }">
        <el-form-item
          style="margin-bottom: 20px"
          :prop="'datasource.' + $index + '.technicalDrawings'"
        >
          <div v-if="row.technicalDrawings && row.technicalDrawings?.length">
            <el-link
              v-for="link in row.technicalDrawings"
              :key="link.id"
              type="primary"
              :underline="false"
              @click="downloadFile(link)"
            >
              {{ link.name }}</el-link
            >
          </div>
        </el-form-item>
      </template> -->
      <template v-slot:returnReason="{ row, $index }">
        <el-form-item
          style="margin-bottom: 20px"
          :prop="'datasource.' + $index + '.returnReason'"
        >
          <el-input
            clearable
            v-model="row.returnReason"
            type="textarea"
            placeholder="请输入"
          />
        </el-form-item>
      </template>
      <template v-slot:remark="{ row, $index }">
        <el-form-item
          style="margin-bottom: 20px"
          :prop="'datasource.' + $index + '.remark'"
        >
          <el-input
            clearable
            v-model="row.remark"
            type="textarea"
            placeholder="请输入"
          />
        </el-form-item>
      </template>
      <!-- <template v-slot:returnType="{ row, $index }">
        <el-form-item
          style="margin-bottom: 20px"
          :prop="'datasource.' + $index + '.returnType'"
        >
          <DictSelection
            dictName="退货类型"
            clearable
            v-model="row.returnType"
          />
        </el-form-item>
      </template> -->
      <!--      <template v-slot:singlePrice="{ row, $index }">-->
      <!--        <el-form-item-->
      <!--          style="margin-bottom: 20px"-->
      <!--          :prop="'datasource.' + $index + '.singlePrice'"-->
      <!--        >-->
      <!--          <el-input-->
      <!--            type="number"-->
      <!--            clearable-->
      <!--            v-model="row.singlePrice"-->
      <!--            @input="(val) => changeNumSinglePrice(val, $index)"-->
      <!--            placeholder="请输入"-->
      <!--          />-->
      <!--        </el-form-item>-->
      <!--      </template>-->

      <template v-slot:totalPrice="{ row, $index }">
        <el-form-item
          v-if="returnSourceType==2"
          style="margin-bottom: 20px"
          :prop="'datasource.' + $index + '.totalPrice'"
        >
          <el-input
            type="number"
            clearable
            v-model="row.totalPrice"
            @input="(val) => changeTotalPrice(val, $index)"
            placeholder="请输入"
          />
        </el-form-item>
        <span v-else>{{row.totalPrice}}</span>
      </template>

      <template v-slot:totalCount="scope">
        <el-form-item
          style="margin-bottom: 20px"
          :prop="'datasource.' + scope.$index + '.totalCount'"
          :rules="[
            { required: true, message: '请输入数字', trigger: 'blur' },
            { validator: validateTotalCount(scope.row), trigger: 'blur' }
          ]"
        >
          <el-input
            v-model="scope.row.totalCount"
            @input="(val) => changeNum(val, scope.$index)"
          ></el-input>
        </el-form-item>
      </template>
      <!--   发货总重   -->
      <template v-slot:sendTotalWeight="scope">
        <el-form-item
          style="margin-bottom: 20px"
          :prop="'datasource.' + scope.$index + '.sendTotalWeight'"
          :rules="[
            { required: [2,3].includes(Number(sourceType))&&outsourceSendCode, message: '请输入数字', trigger: 'blur' }
          ]"
        >
          <el-input v-model="scope.row.sendTotalWeight" @blur="changeSendTotalWeight(scope.$index)"
                    :disabled="!outsourceSendCode"
                    style="width: 60%; margin-right: 10px">

          </el-input>
          <el-button
            size="small"
            type="primary"
            v-if="[2,3].includes(Number(sourceType))&&outsourceSendCode"
            @click.native="(e)=>handleOutBound(e,scope.row,scope.$index)"
          >选择
          </el-button
          >
        </el-form-item>
      </template>
      <!--   收货总重   -->
      <template v-slot:receiveTotalWeight="scope">
        <el-form-item
          style="margin-bottom: 20px"
          :prop="'datasource.' + scope.$index + '.receiveTotalWeight'"
          :rules="[
            { required: [2,3].includes(Number(sourceType))&&pricingWay==2, message: '请输入数字', trigger: 'blur' }
          ]"
        >
          <el-input v-model="scope.row.receiveTotalWeight" @blur="changeReceiveTotalWeight(scope.$index)"
                    style="width: 60%; margin-right: 10px">

          </el-input>
          <el-button
            size="small"
            type="primary"
            @click.native="(e)=>handleInnerBound(e,scope.row,scope.$index)"
          >选择
          </el-button
          >
        </el-form-item>
      </template>
      <!-- <template v-slot:warehouseId="scope">
        <el-form-item
          style="margin-bottom: 20px"
          :prop="'datasource.' + scope.$index + '.warehouseId'"
          :rules="[{ required: true, message: '请选择仓库', trigger: 'blur' }]"
        >
          <el-select
            v-model="scope.row.warehouseId"
            placeholder="请选择"
            disabled
            @change="warehouseChange(scope.$index, scope.row)"
          >
            <el-option
              v-for="item in warehouseList"
              :key="item.id"
              :label="item.name"
              :value="item.id"
            >
            </el-option>
          </el-select>
        </el-form-item>
      </template> -->
      <!-- 操作列 -->
      <template v-slot:headerTotalCount="{ column }">
        <span class="is-required">{{ column.label }}</span>
      </template>
      <template v-slot:headerSendTotalWeight="{ column }">
        <span :class="{'is-required':outsourceSendCode}">{{ column.label }}</span>
      </template>
      <template v-slot:action="{ row }">
        <el-popconfirm
          class="ele-action"
          title="确定要删除吗？"
          @confirm="remove(row)"
        >
          <template v-slot:reference>
            <el-link type="danger" :underline="false" icon="el-icon-delete">
              删除
            </el-link>
          </template>
        </el-popconfirm>
      </template>
    </ele-pro-table>
<!--    <product-list-->
<!--      ref="productListRef"-->
<!--      :orderId="receiveId"-->
<!--      type="receive"-->
<!--      @changeParent="changeParent"-->
<!--    ></product-list>-->
    <!--出库详情-->
    <outbound-details-dialog v-if="outboundDetailsDialogFlag" ref="outboundDetailsDialogRef"
                             :outboundDetailsDialogFlag.sync="outboundDetailsDialogFlag"
                             @saveDate="saveDate"></outbound-details-dialog>
    <!--入库详情-->
    <innertboundDetailsDialog v-if="innerboundDetailsDialogFlag" ref="innerboundDetailsDialogRef"
                              :innerboundDetailsDialogFlag.sync="innerboundDetailsDialogFlag"
                              @saveDate="saveInnerDate"></innertboundDetailsDialog>
  </el-form>
</template>
<script>
import {numberReg} from 'ele-admin';
import dictMixins from '@/mixins/dictMixins';
import productList from '@/views/bpm/handleTask/components/saleOrder/invoice/product-list.vue';
import innertboundDetailsDialog from './innerboundDetailsDialog.vue'
import {getWarehouseOutStock} from '@/api/bpm/components/saleManage/saleorder';
import OutboundDetailsDialog from "@/views/bpm/handleTask/components/purchaseOrder/invoice/outboundDetailsDialog.vue";

export default {
  mixins: [dictMixins],
  props: {
    receiveId: String,
    payAmount: [Number,String],
    returnSourceType: [Number,String],
    pricingWay: [Number, String],
    sourceType: [Number, String],
    outsourceSendCode: [Number, String],
    receiveNo: [Number, String],
  },
  components: {
    OutboundDetailsDialog,
    productList,
    innertboundDetailsDialog
  },
  data() {
    const defaultForm = {
      key: null,
      endTime: '',
      isFirst: 0,
      name: '',
      startTime: '',
      workHour: '',
      technicalDrawings: []
    };
    return {
      discountTotalPrice: 0.0,
      allPrice: 0.0,
      totalAmount: 0.0,
      outboundDetailsDialogFlag: false,
      innerboundDetailsDialogFlag: false,
      numberReg,
      defaultForm,
      // warehouseList: [],
      form: {
        datasource: []
      },
      rules: {},

      columns: [
        {
          width: 45,
          type: 'index',
          columnKey: 'index',
          align: 'center',
          fixed: 'left'
        },
        {
          width: 200,
          prop: 'productName',
          label: '名称',
          slot: 'productName',
          align: "center"
        },
        {
          width: 120,
          prop: 'productCode',
          label: '编码',
          slot: 'productCode',
          align: "center"
        },
        {
          width: 200,
          prop: 'productCategoryName',
          label: '类型',
          slot: 'productCategoryName',
          align: "center"
        },
        {
          width: 160,
          prop: 'productBrand',
          label: '牌号',
          slot: 'productBrand',
          align: "center"
        },
        {
          width: 120,
          prop: 'modelType',
          label: '型号',
          slot: 'modelType',
          align: "center"
        },
        {
          width: 120,
          prop: 'specification',
          label: '规格',
          slot: 'specification',
          align: "center"
        },
        {
          width: 200,
          prop: 'warehouseName',
          label: '仓库名称',
          slot: 'warehouseName',
          align: "center",
        },
        {
          width: 100,
          prop: 'warehouseNum',
          label: '库存',
          slot: 'warehouseNum',
          align: "center"
        },
        {
          width: 120,
          prop: 'receiveTotalCount',
          label: '收货数量',
          slot: 'receiveTotalCount',
          align: "center"
        },
        {
          width: 120,
          prop: 'totalCount',
          label: '退货数量',
          slot: 'totalCount',
          headerSlot: 'headerTotalCount',
          align: "center"
        },
        {
          width: 80,
          prop: 'measuringUnit',
          label: '计量单位',
          slot: 'measuringUnit',
          align: "center"
        },
        {
          width: 120,
          prop: 'singleWeight',
          label: '单重',
          slot: 'singleWeight',
          align: "center"
        },
        {
          width: 200,
          prop: 'sendTotalWeight',
          label: '发货总重',
          slot: 'sendTotalWeight',
          align: "center",
          headerSlot: 'headerSendTotalWeight'
        },
        {
          width: 200,
          prop: 'receiveTotalWeight',
          label: '收货总重',
          slot: 'receiveTotalWeight',
          align: "center",
          headerSlot: 'headerSendTotalWeight'
        },
        {
          width: 100,
          prop: 'increaseTotalWeight',
          label: '增重重量',
          slot: 'increaseTotalWeight',
          align: "center"
        },
        {
          width: 160,
          prop: 'singlePrice',
          label: '单价',
          slot: 'singlePrice',
          align: "center"
        },
        {
          width: 160,
          prop: 'discountSinglePrice',
          label: '折后单价',
          slot: 'discountSinglePrice',
          align: "center"
        },
        {
          width: 140,
          prop: 'totalPrice',
          label: '合计',
          slot: 'totalPrice',
          align: "center"
        },
        {
          width: 120,
          prop: 'discountTotalPrice',
          label: '折后合计',
          slot: 'discountTotalPrice',
          align: "center"
        },

        {
          width: 200,
          prop: 'returnReason',
          label: '退货原因',
          slot: 'returnReason',
          align: "center"
        },
        // {
        //   width: 140,
        //   prop: 'returnType',
        //   label: '退货类型',
        //   slot: 'returnType'
        // },

        // {
        //   width: 80,
        //   prop: 'deliveryDays',
        //   label: '交期(天)',
        //   slot: 'deliveryDays'
        // },
        // {
        //   width: 200,
        //   prop: 'guaranteePeriod',
        //   label: '质保期',
        //   slot: 'guaranteePeriod'
        // },

        // {
        //   width: 130,
        //   prop: 'technicalAnswerName',
        //   label: '技术答疑人',
        //   slot: 'technicalAnswerName'
        // },
        // {
        //   width: 220,
        //   prop: 'technicalParams',
        //   label: '技术参数',
        //   slot: 'technicalParams'
        // },
        // {
        //   width: 240,
        //   prop: 'technicalDrawings',
        //   label: '技术图纸',
        //   slot: 'technicalDrawings'
        // },
        {
          width: 220,
          prop: 'remark',
          label: '备注',
          slot: 'remark',
          align: "center"
        },
        {
          columnKey: 'action',
          label: '操作',
          width: 120,
          align: 'center',
          resizable: false,
          slot: 'action',
          fixed: 'right',
          showOverflowTooltip: true
        }
      ]
    };
  },
  computed: {
    contractId() {
      return this.$store.state.order.contractId;
    }
  },
  created() {
    // getWarehouseList().then((res) => {
    //   this.warehouseList = res;
    // });
  },
  methods: {
    changeNumSinglePrice(val,index){
      if(!val){
        this.$set(this.form.datasource[index], 'singlePrice', 0)
        this.$set(this.form.datasource[index], 'discountSinglePrice', 0)
      }else {
        this.$set(this.form.datasource[index], 'discountSinglePrice', val)
      }
      let totalCount = this.form.datasource[index].totalCount
      this.changeNum(totalCount,index)
    },
    changeTotalPrice(val,index){
      if(!val){
        this.$set(this.form.datasource[index], 'totalPrice', 0)
        this.$set(this.form.datasource[index], 'discountTotalPrice', 0)
      }else {
        this.$set(this.form.datasource[index], 'discountTotalPrice', val)
      }
      this.gettotalAmount()
    },
    //修改数量更新合计/总重
    changeNum(val, index) {
      this.curIndex = index
      if (this.pricingWay == 2) {
        if (val != this.form.datasource[index].receiveTotalCount) {
          this.$set(this.form.datasource[index], 'sendTotalWeight', '')
          this.$set(this.form.datasource[index], 'receiveTotalWeight', '')
          this.$set(this.form.datasource[index], 'increaseTotalWeight', '')
          this.getWeightPrice()
        } else {
          let find = this.oldSendTotalWeightList.find(key => key.productCode == this.form.datasource[index].productCode) || {}
          this.$set(this.form.datasource[index], 'sendTotalWeight', find.oldSendTotalWeight)
          this.$set(this.form.datasource[index], 'receiveTotalWeight', find.oldReceiveTotalWeight)
          this.setIcreaseTotalWeight()
        }
      } else {
        if (val != this.form.datasource[index].receiveTotalCount) {
          this.$set(this.form.datasource[index], 'sendTotalWeight', '')
          this.$set(this.form.datasource[index], 'receiveTotalWeight', '')
          this.$set(this.form.datasource[index], 'increaseTotalWeight', '')
        } else {
          let find = this.oldSendTotalWeightList.find(key => key.productCode == this.form.datasource[index].productCode) || {}
          this.$set(this.form.datasource[index], 'sendTotalWeight', find.oldSendTotalWeight)
          this.$set(this.form.datasource[index], 'receiveTotalWeight', find.oldReceiveTotalWeight)
          this.setIcreaseTotalWeight()
        }

        this.$set(this.form.datasource[index], 'totalPrice', (Number(this.form.datasource[index].singlePrice) * val).toFixed(2));
        this.$set(this.form.datasource[index], 'discountTotalPrice', (Number(this.form.datasource[index].discountSinglePrice) * val).toFixed(2));

        this.$store.commit('returnGoods/setIsDefaultPayableAmount', false);
        this.gettotalAmount();
      }
    },
    getWeightPrice() {
      let increaseTotalWeight = this.form.datasource[this.curIndex].increaseTotalWeight
      let singlePrice = this.form.datasource[this.curIndex].singlePrice
      let discountSinglePrice = this.form.datasource[this.curIndex].discountSinglePrice
      this.$set(this.form.datasource[this.curIndex], 'totalPrice', (Number(increaseTotalWeight) * Number(singlePrice)).toFixed(2));
      this.$set(this.form.datasource[this.curIndex], 'discountTotalPrice', (Number(discountSinglePrice) * Number(increaseTotalWeight)).toFixed(2));
      this.gettotalAmount();
    },

    //出库单详情
    handleOutBound(e, rows, index) {
      this.curIndex = index
      this.outboundDetailsDialogFlag = true
      this.$nextTick(() => {
        let row = {
          sendNo: this.outsourceSendCode,
          productCode: rows.productCode
        }
        this.$refs.outboundDetailsDialogRef.init(row)
      })
    },
    //选择退货信息回调
    saveDate(data = []) {
      let totalWeight = data.reduce((num, row) => {
        num += Number(row.weight)
        return num
      }, 0)
      this.$set(this.form.datasource[this.curIndex], 'sendTotalWeight', totalWeight);
      this.setIcreaseTotalWeight()
    },

    //入库单详情
    handleInnerBound(e, rows, index) {
      this.curIndex = index
      this.innerboundDetailsDialogFlag = true
      this.$nextTick(() => {
        let row = {
          sendNo: this.receiveNo,
          productCode: rows.productCode
        }
        this.$refs.innerboundDetailsDialogRef.init(row)
      })
    },
    //选择入库单信息
    saveInnerDate(data = []) {
      let totalWeight = data.reduce((num, row) => {
        num += Number(row.weight)
        return num
      }, 0)
      this.$set(this.form.datasource[this.curIndex], 'receiveTotalWeight', totalWeight);
      this.setIcreaseTotalWeight()
    },
    //修改发货总重
    changeSendTotalWeight(index) {
      this.curIndex = index
      this.setIcreaseTotalWeight()
    },
    //修改收货总重
    changeReceiveTotalWeight(index) {
      this.curIndex = index
      this.setIcreaseTotalWeight()
    },
    //设置增重总重
    setIcreaseTotalWeight() {
      let receiveTotalWeight = Number(this.form.datasource[this.curIndex].receiveTotalWeight)
      let sendTotalWeight = Number(this.form.datasource[this.curIndex].sendTotalWeight)
      if ([2, 3].includes(Number(this.sourceType))) {
        if (this.pricingWay == 2) {
          if ((!receiveTotalWeight || !sendTotalWeight)) {
            return this.$set(this.form.datasource[this.curIndex], 'increaseTotalWeight', '');
          } else {
            this.$set(this.form.datasource[this.curIndex], 'increaseTotalWeight', (receiveTotalWeight - sendTotalWeight).toFixed(2));
          }
        } else {
          this.$set(this.form.datasource[this.curIndex], 'increaseTotalWeight', (receiveTotalWeight - sendTotalWeight).toFixed(2));
        }
      } else {
        this.$set(this.form.datasource[this.curIndex], 'increaseTotalWeight', receiveTotalWeight);
      }
      if (this.pricingWay == 2) {
        this.getWeightPrice()
      }

    },
    //获取订单总金额
    gettotalAmount() {
      let productData = this.form.datasource;
      if (productData.length) {
        let sum = productData
          .reduce((sum, item) => {
            return sum + Number(item.totalPrice);
          }, 0).toFixed(2);
        this.totalAmount = productData.reduce((sum, item) => {
          return sum + Number(item.discountTotalPrice);
        }, 0).toFixed(2)
        this.$emit('update:payAmount', this.totalAmount)
        this.$store.commit('returnGoods/setAllcountAmount', sum);
      } else {
        this.$store.commit('returnGoods/setAllcountAmount', 0);
      }
    },
    //选择产品回调
    async changeParent(obj, idx) {
      obj.receiveTotalCount = obj.totalCount;
      obj.receiveProductId = obj.id;
      obj.id = '';

      if (obj.warehouseId) {
        obj['warehouseNum'] = await getWarehouseOutStock({
          warehouseId: obj.warehouseId,
          code: obj.productCode
        });
      }
      this.$set(this.form.datasource, this.form.datasource.length, obj);
    },

    // async warehouseChange(index, row) {
    //   let warehouseIds =
    //     this.form.datasource
    //       .filter(
    //         (item, i) => row.productCode == item.productCode && index != i
    //       )
    //       .map((item) => item.warehouseId) || [];
    //   const data = this.warehouseList.find(
    //     (item) => item.id == row.warehouseId
    //   );
    //   if (warehouseIds.length > 0 && warehouseIds.includes(row.warehouseId)) {
    //     row.warehouseId = '';
    //     return this.$message.error('同一个产品不能选择相同的仓库');
    //   }

    //   this.$set(this.form.datasource[index], 'warehouseName', data.name);
    //   this.$set(this.form.datasource[index], 'warehouseCode', data.code);
    //   const warehouseOutStock = await getWarehouseOutStock({
    //     warehouseId: data.id,
    //     code: row.productCode
    //   });
    //   this.$set(
    //     this.form.datasource[index],
    //     'warehouseNum',
    //     warehouseOutStock
    //   );
    // },

    validateTotalCount(row) {
      return (rule, value, callback) => {
        if (isNaN(value) || Number(value) <= 0) {
          this.$message.error('请输入大于0的数');
          callback(new Error('请输入大于0的数字'));
        } else if (Number(value) > row.receiveTotalCount) {
          this.$message.error('退货数量不能大于收货数量');
          callback(new Error('退货数量不能大于收货数量'));
        } else {
          callback();
        }
      };
    },
    // else if (this.getTotalCount(row)> row.warehouseNum) {
    //       this.$message.error('退货数量不能大于库存');
    //       callback(new Error('退货数量不能大于库存'));
    //     }
    getTotalCount(row) {
      let num = 0;
      this.form.datasource
        .filter((item) => item.warehouseId == row.warehouseId)
        .forEach((item) => {
          num += Number(item.totalCount);
        });

      return num;
    },
    // 返回列表数据
    getTableValue() {
      let comitDatasource = this.form.datasource;
      if (comitDatasource.length === 0) return [];
      comitDatasource.forEach((v) => {
        v.totalCount = Number(v.totalCount);
        v.technicalDrawings = Array.isArray(v.technicalDrawings)
          ? v.technicalDrawings
          : [];
      });
      return comitDatasource;
    },
    getPrice() {
      return [this.allPrice];
    },

    //修改回显
    putTableValue(data) {
      if (data && data?.length) {
        data.forEach((v, index) => {
          v.receiveTotalCount = v.receiveTotalCount || v.totalCount;
          v.receiveProductId = v.receiveProductId || v.id;
        });
        this.oldSendTotalWeightList = data.map(item => {
          return {
            productCode: item.productCode,
            oldSendTotalWeight: item.sendTotalWeight,
            oldReceiveTotalWeight: item.receiveTotalWeight
          }
        })
        this.form.datasource = data;
        this.form.datasource.forEach(async (v, index) => {
          if (v.warehouseId) {
            this.$set(
              this.form.datasource[index],
              'warehouseNum',
              await getWarehouseOutStock({
                warehouseId: v.warehouseId,
                code: v.productCode
              })
            );
          }
        });
        this.gettotalAmount();
      }
    },

    remove(row) {
      let index = this.form.datasource.findIndex((n) => n.key == row.key);
      if (index !== -1) {
        this.form.datasource.splice(index, 1);
        this.setSort();
        this.gettotalAmount();
      }
    },
    // 清空表格
    restTable() {
      this.form.datasource = [];
    },
    // 重新排序
    setSort() {
      this.form.datasource.forEach((n, index) => {
        n.key = index + 1;
      });
    },
    // 添加
    handlAdd() {
      if (!this.receiveId) return this.$message.error('请先选择收货单');
      this.$refs.productListRef.open(this.form.datasource);
    },

    validateForm(callback) {
      //开始表单校验
      this.$refs.form.validate((valid) => {
        callback(valid);
      });
    }
  }
};
</script>
<style lang="scss" scoped>
.headbox {
  display: flex;
  justify-content: space-between;
  align-items: center;

  .amount {
    font-size: 14px;
    font-weight: bold;
    padding-right: 30px;
  }
}

.time-form .el-form-item {
  margin-bottom: 0 !important;
}

::v-deep .period {
  display: flex;

  .borderleftnone {
    .el-input--medium .el-input__inner {
      border-top-right-radius: 0;
      border-bottom-right-radius: 0;
    }
  }

  .borderrightnone {
    .el-input--medium .el-input__inner {
      border-top-left-radius: 0;
      border-bottom-left-radius: 0;
    }
  }
}

::v-deep .time-form tbody > tr:hover > td {
  background-color: transparent !important;
}

::v-deep .time-form .el-table tr {
  background-color: #ffffff;
}

.pricebox {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  font-weight: bold;
}
</style>
