multipleSpecificationForm.vue 43.6 KB
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027
<template>
  <div class="multipleSpecification-form">
    <div class="content_box">
      <div class="sepce-box" v-for="(subItem, subIndex) in goodsInfoData.specificationDetailList" :key="subIndex">
        <div>
          <span class="specs-item">
            产品规格{{ subIndex + 1 }}:
            <span style="color: #333333">{{ subItem.specificationName }}</span>
          </span>
          <span class="specs-item" v-for="(n, idx) in subItem.specificationValueList" :key="idx">
            值:
            <span style="color: #333333">{{ n.specificationValue }}</span>
          </span>
        </div>
        <div>
          <el-button type="text" @click="handleSpecsEdit(2, subItem, subIndex)" v-if="routeInfo.type != 2">编辑</el-button>
          <el-button type="text" @click="handleSpecsDelete(subIndex)" v-if="routeInfo.type != 2">删除</el-button>
        </div>
      </div>
      <div v-if="goodsInfoData.specificationDetailList && goodsInfoData.specificationDetailList.length">
        <div class="table-wrapper">
          <table class="table-spesc" cellspacing="0" cellpadding="0" :style="{ width: `${tableWidth}px` }">
            <tbody>
              <tr style="background: #f2f4f7; height: 42px; display: flex; align-items: center; justify-content: center">
                <td style="width: 75px" v-if="routeInfo.type != 2"><el-checkbox v-model="checked" @change="handleCheckAllChange" :indeterminate="isIndeterminate"></el-checkbox></td>
                <td style="width: 75px">序号</td>
                <td style="white-space: nowrap; text-overflow: ellipsis; overflow: hidden" v-for="(subItem, subIndex) in goodsInfoData.specificationDetailList" :title="subItem.specificationName" :key="subIndex">{{ subItem.specificationName }}</td>
                <td>
                  <span class="color-red">*</span>
                  <span>投保成本/元</span>
                </td>
                <td>
                  <span class="color-red">*</span>
                  <span>上架成本/元</span>
                </td>
                <td>
                  <span class="color-red">*</span>
                  <span>嘀加成本/元</span>
                </td>
                <td>
                  <span>适用车型</span>
                  <img src="@/assets/icon-edit.png" style="cursor: pointer; margin-left: 5px; width: 16px; height: 16px; vertical-align: middle" @click="carTypeSelect(true)" />
                </td>
                <td style="width: 60px" v-if="routeInfo.type != 2"><span>操作</span></td>
              </tr>
            </tbody>
          </table>
          <table class="table-spesc content-table" cellspacing="0" cellpadding="0" :style="{ width: `${tableWidth}px` }">
            <tbody>
              <tr style="border-bottom: 1px solid #e5e5e5; height: 40px; line-height: 40px; display: flex; align-items: center; justify-content: center" v-for="(subItem, subIndex) in filterStatus" :key="subIndex">
                <td style="width: 75px" v-if="routeInfo.type != 2"><el-checkbox v-model="subItem.checked" @change="changeTableCheck"></el-checkbox></td>
                <td style="width: 75px">{{ subIndex + 1 }}</td>
                <td style="white-space: nowrap; text-overflow: ellipsis; overflow: hidden" v-for="(n, idx) in subItem.specsValueList" :key="idx" :title="n">{{ n }}</td>
                <td>
                  <!-- @input="handleTypeInput($event, subIndex)" -->
                  <el-input placeholder="请输入" :disabled="routeInfo.type == 2" size="small" :class="{ 'w-150-per': true, 'border-red': filterEmpty(subItem.insuranceCost) && subItem.insuranceCostEmpty }" v-model.trim="subItem.insuranceCost" @input="handleKilometersInput($event, subIndex)" @blur="handleKilometersBlur($event, subIndex)">
                    <el-popover v-if="filterEmpty(subItem.insuranceCost) && subItem.insuranceCostEmpty" slot="suffix" placement="top" title width="90" trigger="hover" content="投保成本是必填项">
                      <i class="el-icon-warning color-red" slot="reference" />
                    </el-popover>
                  </el-input>
                </td>
                <td>
                  <el-input placeholder="请输入" :disabled="routeInfo.type == 2" size="small" v-model.trim="subItem.shelfCost" :class="{ 'w-150-per': true, 'border-red': filterEmpty(subItem.shelfCost) && subItem.shelfCostEmpty }" @input="handleWarrantyPeriodInput($event, subIndex)" @blur="handleWarrantyPeriodBlur($event, subIndex)">
                    <el-popover v-if="filterEmpty(subItem.shelfCost) && subItem.salesCostEmpty" slot="suffix" placement="top" title width="90" trigger="hover" content="上架成本是必填项">
                      <i class="el-icon-warning color-red" slot="reference" />
                    </el-popover>
                  </el-input>
                </td>
                <td>
                  <el-input placeholder="请输入" :disabled="routeInfo.type == 2" size="small" v-model.trim="subItem.salesCost" :class="{ 'w-150-per': true, 'border-red': filterEmpty(subItem.salesCost) && subItem.salesCostEmpty }" @input="handlePurchasePrice($event, subIndex)" @blur="handlePurchasePriceBlur($event, subIndex)">
                    <el-popover v-if="filterEmpty(subItem.salesCost) && subItem.salesCostEmpty" slot="suffix" placement="top" title width="90" trigger="hover" content="嘀加成本是必填项">
                      <i class="el-icon-warning color-red" slot="reference" />
                    </el-popover>
                  </el-input>
                </td>
                <td>
                  <el-select placeholder="车型" :disabled="routeInfo.type == 2" size="small" multiple collapse-tags :class="{ 'w-200-per': true }" style="width: 200px" v-model="subItem.seriesConfigList" @focus="carTypeSelect(false, subItem)" value-key="seriesId">
                    <el-option v-for="item in subItem.seriesConfigList" :key="item.seriesId" :label="item.seriesName" :value="item"></el-option>
                  </el-select>
                </td>
                <td style="width: 60px" v-if="routeInfo.type != 2">
                  <el-button type="text" :disabled="subItem.merchantGoodsInfos && subItem.merchantGoodsInfos.length > 0" @click="delspecificationValueList(subItem)">删除</el-button>
                </td>
              </tr>
            </tbody>
          </table>
        </div>

        <div style="margin-top: 10px">
          共
          <span class="tip-text">{{ goodsInfoData.goodsSpecificationList.length }}</span>
          件规格商品。
          <!-- 价格区间 -->
          <!-- <span class="tip-text">¥{{ minPrice }}~{{ maxPrice }}</span> -->
        </div>
      </div>
    </div>
    <D2Dialog title="规格" :is-visible.sync="specificationVisible" width="550px" :specificationDetailList="goodsInfoData.specificationDetailList" @confirmDialog="handleSpescConfirm" @closeDialog="handleSpescClose">
      <el-form label-width="120px" :model="spescEditForm" :rules="spescRules" ref="spescRef">
        <el-form-item label="规格名称:" prop="specificationName">
          <el-input class="w-320" size="small" maxlength="20" v-model="spescEditForm.specificationName" placeholder="请输入规格名" :disabled="disabledSpecificationName"></el-input>
        </el-form-item>
        <div class="selectOpt">
          <span class="label">预设规格:</span>
          <el-button type="text" class="selectItem" v-for="(item, index) in disabledSkuSelect" @click="handleSelect(item)" :key="index" :class="{ active: item.specificationName == spescEditForm.specificationName || item.disabled }">{{ item.specificationName }}</el-button>
        </div>
        <el-form-item label="规格值:" prop="specificationValueList">
          <el-tag style="margin-right: 10px" v-for="(tag, i) in spescEditForm.specificationValueList" :key="i" @click="changeValue(tag, i)" closable @close="handleSpescDelete(tag)">{{ tag.specificationValue }}</el-tag>
          <!-- <el-input min="0" max="100" clearable type="number" step="0.0001" class="!w-[120px]" placeholder="输入检测值" v-model="value" @input="value = value.replace(/^(100|[1-9]?\d)(\.\d{0,4})?.*$/, '$1$2')"></el-input> -->
          <el-input class="input-new-tag" v-if="specsInputVisible && spescEditForm.type == 0" v-model="spescInputVal" maxlength="10" ref="saveSpescInput" size="small" @keyup.enter.native="handleInputConfirm" @blur="handleInputConfirm"></el-input>
          <el-input min="0" max="100" type="number" class="input-new-tag" v-else-if="specsInputVisible && spescEditForm.type != 3" v-model="spescInputVal" ref="saveSpescInput" @input="spescInputVal = spescInputVal.replace(/^(100|[1-9]?\d).*$/, '$1')" size="small" @keyup.enter.native="handleInputConfirm" @blur="handleInputConfirm"></el-input>
          <input-number-range v-else-if="specsInputVisible && spescEditForm.type == 3" :disabled="false" :precision="num" :spescInputVal="spescInputVal" @confirm="handleInputConfirmMue" @input="spescInputVal = spescInputVal.replace(/^(100|[1-9]?\d)(\.\d{0,4})?.*$/, '$1$2')"></input-number-range>
          <el-button v-else class="button-new-tag" size="small" @click="showInput">+ 规格值</el-button>
        </el-form-item>
      </el-form>
    </D2Dialog>
    <brandDialog v-if="brandVisible" ref="brandRef" :relate-store-visible="brandVisible" :store-selected="storeSelected" @handleRelateStoreConfirm="handleRelateStoreConfirm" @handleRelateStoreClose="handleRelateStoreClose"></brandDialog>
    <skuDialog v-if="skuVisible" ref="brandRef" :relate-store-visible="skuVisible" :goodsSpecificationList="goodsInfoData.goodsSpecificationList" :specificationDetailList="goodsInfoData.specificationDetailList" @handleRelateSkuConfirm="handleRelateSkuConfirm" @handleSkuClose="handleSkuClose"></skuDialog>
  </div>
</template>
<script>
import D2Dialog from '@/components/d2-dialog'
import InputNumberRange from './inputNumberRange.vue'
// import relateCarDialog from './relateCarDialog.vue'
import brandDialog from './brandDialog'
import skuDialog from './skuDialog'
import { limitPrice, deepClone } from '@/common/constant'
import { mapGetters, mapMutations, mapActions } from 'vuex'

// import { getProductServiceItems, getExtendServiceItems } from '@api/productManage'
// import { BaseData } from '@/common/constants.js'
export default {
  name: 'MultipleSpecificationForm',
  components: {
    D2Dialog,
    InputNumberRange,
    brandDialog,
    skuDialog
  },
  props: {
    routeInfo: {
      type: Object,
      default: () => ({})
    },
    productServiceItemList: {
      type: Array,
      default: () => []
    },
    extendServicePartList: {
      type: Array,
      default: () => []
    }
  },
  data() {
    return {
      value: '',
      skuVisible: false,
      carSelectName: '',
      isAllow: false,
      storeSelected: [],
      brandVisible: false,
      isIndeterminate: false,
      checked: false,
      carDialogVisibleBoolean: false,
      numberRange: [],
      normalSelectList: [
        {
          specificationName: '服务年限/年',
          type: 1,
          specificationValueList: [{ specificationValue: 1 }, { specificationValue: 3 }, { specificationValue: 5 }]
        },
        {
          specificationName: '公里数/km/万',
          type: 2,
          specificationValueList: [{ specificationValue: 3 }, { specificationValue: 5 }, { specificationValue: 10 }]
        },
        {
          specificationName: '适用车价/万',
          type: 3,
          specificationValueList: [{ specificationValue: '0-15' }, { specificationValue: '15-30' }, { specificationValue: '30-50' }]
        }
      ],
      // equitySceneType: baseConfig.equitySceneType || [], // 权益类目
      // extendedPosiType: baseConfig.extendedPosiType || [], // 延保类
      equitySceneType: [], // 权益类目
      extendedPosiType: [], // 延保类
      batchObj: {
        type: '',
        thirdPartyCode: '',
        upgradePrice: '',
        warningValue: '',
        warningValueMax: '',
        warrantyPeriod: '',
        purchasePrice: '',
        serviceYears: '',
        insuranceCost: '', // 投保成本,单位元
        shelfCost: '', // 上架成本,单位元
        salesCost: '', // salesCost
        useStatus: 0
      },
      batchSubmitted: {
        upgradePriceEmpty: false,
        purchasePriceEmpty: false,
        warrantyPeriodEmpty: false
      },
      minPrice: 0,
      maxPrice: 0,
      specificationVisible: false,
      spescEditForm: { type: 0, specificationName: '', specificationValueList: [] },
      specsInputVisible: false,
      spescRules: {
        specificationName: [
          { required: true, message: '请输入规格名', trigger: 'blur' },
          {
            validator: (rule, value, callback) => {
              return this.spescData.curSpeceNameList.some(item => item == value) ? callback(new Error('规格名重复')) : callback()
            },
            trigger: 'blur'
          }
        ],
        specificationValueList: [{ required: true, message: '请输入规格值', trigger: 'change' }]
      },
      spescInputVal: '',
      reg: {
        priceReg: /^\d[\d.]*$/, // 匹配数字和小数点
        typeReg: /^[A-Za-z0-9]+$/ // 匹配字母和数字
      },
      productPositionTypeList: [],
      // membraneTypeList: baseConfig.membraneTypeList,
      membraneTypeList: [],
      tableWidth: 0,
      tableColNum: 0,
      serviceItemsVisible: false,
      serviceItemsSearchForm: {
        serviceName: '',
        serviceGrade: ''
      },
      // getProductServiceItems,
      // getExtendServiceItems,
      serviceSelected: [],
      serviceSelectIndex: null,
      extendServiceSelected: [],
      extendServiceSelectIndex: null,
      extendServiceItemsVisible: false,
      extendServiceItemsSearchForm: {
        serviceName: '',
        supportPosition: 0
      },
      supportPositionList: [] // 部件筛选项数据
    }
  },
  mounted() {
    // const priceArr = []
    // this.goodsInfoData?.goodsSpecificationList.forEach((item, index) => {
    //   if (item.upgradePrice) priceArr.push(Number(item.upgradePrice))
    //   this.filterService(item, index)
    // })
    // this.minPrice = priceArr.length ? Math.min(...priceArr) : 0
    // this.maxPrice = priceArr.length ? Math.max(...priceArr) : 0
    // this.changeSpecs()
    // this.getBaseData()
    this.computedTableWidth(this.goodsInfoData?.goodsType)
  },
  watch: {
    specificationVisible: {
      handler() {
        ;(this.isChange = false), (this.spescInputVal = '')
      },
      deep: true
    }
  },
  computed: {
    ...mapGetters('goodsInfoData', { goodsInfoData: 'getGoodsInfoData' }),
    filterStatus() {
      console.log(this.goodsInfoData?.goodsSpecificationList, 'this.goodsInfoData?.goodsSpecificationList')
      //过滤禁用状态
      return this.goodsInfoData ? this.goodsInfoData?.goodsSpecificationList.filter(item => item.useStatus != 1) : []
    },
    disabledSpecificationName() {
      return (
        this.normalSelectList.findIndex(item => {
          if (item.specificationName == this.spescEditForm.specificationName) {
            return true
          }
        }) !== -1
      )
    },
    disabledSkuSelect() {
      return this.normalSelectList.map(item => {
        item.disabled = this.goodsInfoData?.specificationDetailList.some(ele => {
          return ele.specificationName == item.specificationName
        })
        return item
      })
      // this.specificationDetailList
      // specificationName
      // this.goodsInfoData?..findIndex(item => {
      //   // if (item.specificationName == this.spescEditForm.specificationName) {
      //   //   return true
      //   // }
      // })
    }
  },
  methods: {
    ...mapMutations('goodsInfoData', ['setUpdateGoodsInfo']),
    // 打开门店弹窗或者品牌弹窗
    carTypeSelect(type = false, item) {
      // if (this.formData.showMerchant == 1) {
      //   this.brandVisible = true
      // } else {
      //   if (!this.formData.scene && this.formData.scene !== 0) {
      //     return this.$message.error('请先选择业务场景')
      //     // 接口不同,门店要先选择业务场景
      //   }
      // }
      console.log('type', item)

      if (!type) {
        this.carSelectName = item.specsValueList
        this.storeSelected = deepClone(item.seriesConfigList || [])
      } else {
        this.storeSelected = []
      }
      this.isAllow = type
      this.brandVisible = true
    },
    // 确认门店弹窗或者品牌弹窗
    handleRelateStoreConfirm(selectedData) {
      if (!selectedData.length) {
        return this.$message.error(`请选择车型`)
      }
      // 如果是批量
      if (this.isAllow) {
        this.goodsInfoData?.goodsSpecificationList.forEach(item => {
          if (item.checked) {
            item.seriesConfigList = selectedData
          }
        })
      } else {
        this.goodsInfoData?.goodsSpecificationList.forEach(item => {
          if (JSON.stringify(item.specsValueList) == JSON.stringify(this.carSelectName)) {
            item.seriesConfigList = selectedData
          }
        })
      }
      // const maxMerNum = 200
      // const maxBrandNum = 10
      // if (
      //   this.formData.showMerchant == 1 &&
      //   selectedData?.length > maxBrandNum
      // ) {
      //   return this.$message.error(`品牌最多只能选择${maxBrandNum}个`)
      // }
      // if (this.formData.showMerchant == 2 && selectedData?.length > maxMerNum) {
      //   return this.$message.error(`门店最多只能选择${maxMerNum}个`)
      // }
      // this.$refs.channelForm.clearValidate('showMerchant')
      console.log(selectedData, 'selectedData')
      // this.tableData = selectedData
      this.handleRelateStoreClose()
      // 选择门店或品牌后调用商品接口
      // this.getMealList(this.formData.shopType)
      // this.mealList = []
      // this.formData.productPackage = []
    },
    // 关闭门店弹窗或者品牌弹窗
    handleRelateStoreClose() {
      this.brandVisible = false
    },
    handleRelateSkuConfirm(tableData) {
      console.log(tableData, 'tableData')
      tableData.forEach(item => {
        this.goodsInfoData?.goodsSpecificationList.forEach(item2 => {
          if (JSON.stringify(item2.specsValueList) == JSON.stringify(item.specsValueList)) {
            item2.useStatus = item.useStatus
          }
        })
      })
      this.handleSkuClose()
    },
    handleSkuClose() {
      this.skuVisible = !this.skuVisible
    },
    // 门店弹窗按回车查询
    handleStoreInput(e) {
      e.keyCode === 13 && this.handleSearchStore()
    },
    // 门店弹窗点击查询
    handleSearchStore() {
      this.$refs.formRelateStore.handleCurrentChange(1)
    },
    handleCheckAllChange() {
      this.goodsInfoData?.goodsSpecificationList.forEach(item => {
        item.checked = this.checked
      })
      this.isIndeterminate = false
      // this.changeTableCheck()
    },
    changeTableCheck() {
      this.checked = this.goodsInfoData?.goodsSpecificationList.every(item => {
        return item.checked
      })
      this.isIndeterminate =
        !this.checked &&
        this.goodsInfoData?.goodsSpecificationList.some(item => {
          return item.checked
        })
      console.log(this.checked, this.isIndeterminate)
    },
    // carDialogVisible() {},
    handleSelect(item) {
      // 已经是一样的就跳过
      if (item.specificationName == this.spescEditForm.specificationName || item.disabled) return false
      this.spescEditForm = deepClone(item)
    },
    computedTableWidth(newVal, num) {
      const shoppingMallFlag = this.filterEmpty(num) ? num : this.goodsInfoData.shoppingMallFlag
      let tableColNum = this.tableColNum

      // 135 序号和操作栏宽度
      this.tableWidth = tableColNum * 220 + 135
    },
    // 添加规格status(1 - 新增;2 - 编辑)
    handleSpecsEdit(status, targetItem, targetIdx) {
      console.log('handleSpecsEdit')
      console.log(this.goodsInfoData, 'goodsInfoData')
      // debugger
      if (status == 1 && this.goodsInfoData.specificationDetailList?.length >= 5) {
        return this.$message({
          message: '只能新增5个规格值',
          type: 'error'
        })
      }
      var curSpeceNameList = []
      this.goodsInfoData.specificationDetailList?.forEach((item, index) => {
        if (status == 1 || (status == 2 && index != targetIdx)) {
          curSpeceNameList.push(item.specificationName)
        }
      })
      this.spescData = {
        // 1 - 新增;2 - 编辑
        status: status,
        targetIdx: targetIdx,
        curSpeceNameList: curSpeceNameList
      }
      this.spescEditForm = status == 2 ? deepClone(targetItem) : { type: 0, specificationName: '', specificationValueList: [] }
      this.copyGoodsSpecificationNameData = status == 2 ? this.goodsInfoData.goodsSpecificationNameList && this.goodsInfoData.goodsSpecificationNameList[targetIdx] : undefined
      this.handleSpescClose()
    },
    // 二次确认
    secondSimpleConfirm(title, txt, fn) {
      this.$confirm(txt, title, {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning',
        callback: action => {
          if (action == 'confirm') {
            fn && fn()
          }
        }
      })
    },
    // 删除规格值
    handleSpecsDelete(index) {
      this.secondSimpleConfirm('删除', '是否删除该规格?', () => {
        this.goodsInfoData.specificationDetailList.splice(index, 1)
        this.changeSpecs()
      })
    },
    filterEmpty(data) {
      return data instanceof Array ? data.length <= 0 : (data ?? '') === ''
    },
    handleSpescClose() {
      this.specificationVisible = !this.specificationVisible
    },
    showInput() {
      this.specsInputVisible = true
      this.spescInputVal = ''
      this.$nextTick(_ => {
        this.$refs.saveSpescInput && this.$refs.saveSpescInput.$refs.input.focus()
      })
    },
    // 修改规格值tag
    changeValue(tag, i) {
      this.specsInputVisible = true
      this.$nextTick(_ => {
        this.$refs.saveSpescInput.$refs.input.focus()
      })
      this.spescInputVal = tag.specificationValue
      this.tempTag = tag.specificationValue
      this.isChange = true
    },
    handleSpescDelete(tag) {
      this.isChange = false
      this.spescEditForm.specificationValueList.splice(this.spescEditForm.specificationValueList.indexOf(tag), 1)
    },
    handleInputConfirmMue(e) {
      this.spescInputVal = e.value
      this.handleInputConfirm(e)
    },
    handleInputConfirm(e) {
      const spescInputVal = this.spescInputVal
      if (spescInputVal.indexOf(';~;') > -1) {
        this.$message({
          message: '规格值不可包含;~;特殊字符',
          type: 'error',
          customClass: 'message-Z-zinde'
        })
        return true
      }
      if (this.spescEditForm.specificationValueList.length == 99) {
        this.$message({
          message: '规格值最多不能超过99个',
          type: 'error',
          customClass: 'message-Z-zinde'
        })
        return true
      }
      if (this.spescEditForm.specificationValueList.findIndex(i => i.specificationValue == spescInputVal) != -1) {
        this.$message({
          message: spescInputVal + '规格值已经存在',
          type: 'error',
          customClass: 'message-Z-zinde'
        })
        return true
      }
      if (this.isChange && spescInputVal) {
        this.spescEditForm.specificationValueList[this.spescEditForm.specificationValueList.findIndex(i => i.specificationValue == this.tempTag)].specificationValue = spescInputVal
        this.specsInputVisible = false
        this.isChange = false
        return
      }
      if (spescInputVal) {
        this.spescEditForm.specificationValueList.push({ specificationValue: spescInputVal })
      }
      this.$refs.spescRef.validateField('specificationValueList')
      this.specsInputVisible = false
      this.spescInputVal = ''
    },
    handleSpescConfirm() {
      const _this = this
      _this.$refs.spescRef.validate(valid => {
        if (valid) {
          if (this.spescData.status == 1) {
            _this.goodsInfoData.specificationDetailList.push(_this.spescEditForm)
          } else {
            _this.goodsInfoData.specificationDetailList[_this.spescData.targetIdx] = _this.spescEditForm
          }
          _this.changeSpecs()
          _this.spescEditForm = {}
          _this.handleSpescClose()
        }
      })
    },
    // 删除某一项
    delspecificationValueList(i) {
      // this.goodsInfoData.goodsSpecificationList.splice(i, 1)
      this.goodsInfoData?.goodsSpecificationList.forEach(item => {
        if (JSON.stringify(item.specsValueList) == JSON.stringify(i.specsValueList)) {
          console.log(item)
          item.useStatus = 1
        }
      })
    },
    // 规格值解构
    changeSpecs(restData) {
      // debugger
      // console.log('changeSpecs')
      this.computedTableWidth(this.goodsInfoData.goodsType)
      const copySpecificationValueList = JSON.parse(JSON.stringify(this.goodsInfoData.upgradeGoodsList))
      const copyDetailLength = this.goodsInfoData.goodsSpecificationNameList?.length
      const copyDetailData = this.goodsInfoData.goodsSpecificationNameList
      this.goodsInfoData.goodsSpecificationList = []
      let flag = true
      var markIdx = 0
      for (var i = 0; i < this.goodsInfoData.specificationDetailList?.length; i++) {
        markIdx = 0
        // 规格名有变化 需清空id
        if (copyDetailLength && this.goodsInfoData.specificationDetailList[i]?.specificationName !== copyDetailData[i]?.specificationName) {
          flag = false
          delete this.goodsInfoData.specificationDetailList[i]?.id
        }
        for (var j = 0; j < this.goodsInfoData.specificationDetailList[i]?.specificationValueList?.length; j++) {
          if (i == 0) {
            this.goodsInfoData.goodsSpecificationList.push({
              id: '',
              position: [],
              purchasePrice: '',
              specificationData: '',
              specsValueList: [this.goodsInfoData.specificationDetailList[i]?.specificationValueList[j]?.specificationValue],
              type: '',
              thirdPartyCode: '',
              // upgradePrice: this.equitySceneType.includes(this.goodsInfoData.goodsType) && this.baseConfig.supplierCode.includes(`${this.goodsInfoData.supplierCode}`) ? 0 : '',
              upgradePrice: this.equitySceneType.includes(this.goodsInfoData.goodsType) ? 0 : '',
              warningValue: '',
              warningValueMax: '',
              warrantyPeriod: '5',
              editGoodNameInput: false,
              serviceItemArr: [],
              serviceYears: '',
              entityCardFlag: false,
              extendServiceItemArr: [],
              insuranceCost: '', // 投保成本,单位元
              shelfCost: '', // 上架成本,单位元
              salesCost: '', // salesCost
              useStatus: 0
            })
          } else {
            var targetValLen = this.goodsInfoData.specificationDetailList[i]?.specificationValueList?.length
            var loopNum = 0
            var tempMarkIdx = 0
            if (j == 0 && targetValLen > 1) {
              var obj = JSON.parse(JSON.stringify(this.goodsInfoData.goodsSpecificationList))
              this.goodsInfoData.goodsSpecificationList = []
              obj.forEach(item => {
                for (var k = 0; k < targetValLen; k++) {
                  this.goodsInfoData.goodsSpecificationList.push(JSON.parse(JSON.stringify(item)))
                }
              })
            }
            loopNum = this.goodsInfoData.goodsSpecificationList.length / targetValLen
            tempMarkIdx = markIdx
            for (var k = 0; k < loopNum; k++) {
              this.goodsInfoData.goodsSpecificationList[tempMarkIdx].specsValueList.push(this.goodsInfoData.specificationDetailList[i]?.specificationValueList[j]?.specificationValue)
              tempMarkIdx = tempMarkIdx + targetValLen
            }
            markIdx = markIdx + 1
          }
        }
      }
      this.batchObj = {
        upgradePrice: '',
        warningValue: '',
        warningValueMax: '',
        warrantyPeriod: '',
        type: '',
        thirdPartyCode: '',
        purchasePrice: '',
        serviceYears: '',
        insuranceCost: '', // 投保成本,单位元
        shelfCost: '', // 上架成本,单位元
        salesCost: '', // salesCost
        useStatus: 0
      }
      this.goodsInfoData.goodsSpecificationList.forEach(item => {
        for (var i = 0; i < copySpecificationValueList.length; i++) {
          var temp = copySpecificationValueList[i]
          console.log(flag, !restData, '!restData')
          if (temp.specificationData == item.specsValueList.join(';~;') && flag && !restData) {
            item.id = temp.id ? temp.id : ''
            // item.upgradePrice = this.equitySceneType.includes(this.goodsInfoData.goodsType) && this.baseConfig.supplierCode.includes(`${this.goodsInfoData.supplierCode}`) ? 0 : temp.upgradePrice
            item.upgradePrice = this.equitySceneType.includes(this.goodsInfoData.goodsType) ? 0 : temp.upgradePrice
            item.warningValue = temp.warningValue
            item.warningValueMax = temp.warningValueMax
            item.position = temp.position
            item.type = temp.type
            item.thirdPartyCode = temp.thirdPartyCode
            item.purchasePrice = temp.purchasePrice
            item.warrantyPeriod = temp.warrantyPeriod || '5'
            ;(item.serviceItemArr = temp.upgradeGoodsServiceItemsList?.map(v => {
              return v.serviceCode
            })),
              (item.serviceYears = temp.serviceYears)
            item.entityCardFlag = temp.entityCardFlag
            item.insuranceCost = temp.insuranceCost
            item.shelfCost = temp.shelfCost
            item.salesCost = temp.salesCost
            item.useStatus = temp.useStatus
            break
          }
        }
      })
    },
    batchSetValue(name, newValue) {
      const arr = this.goodsInfoData.goodsSpecificationList.map(item => {
        item[name] = newValue ? (name == 'type' || name == 'thirdPartyCode' ? newValue : Number(newValue)) : ''
        return item
      })
      this.goodsInfoData.goodsSpecificationList = arr
    },
    // 批量校验编码
    handleBatchTypeBlur(e) {
      const newValue = e.target.value
      this.batchSetValue('type', newValue)
    },
    // 批量第三方编码
    handleBatchThirdPartyCodeBlur(e) {
      const newValue = e.target.value
      this.batchSetValue('thirdPartyCode', newValue)
    },
    handleBatchTypeInput(newValue) {
      if (!this.reg.typeReg.test(newValue)) {
        newValue = ''
      }
      this.batchObj.type = newValue
    },
    // 批量校验采购价
    handleBatchPurchasePrice(newValue) {
      newValue = newValue.replace(/[^\d.]/g, '')
      let oldValue = `${this.batchObj['oldpurchasePrice']}`
      this.$set(this.batchObj, 'purchasePrice', limitPrice(newValue, oldValue, 6, 2, 0))
      this.$set(this.batchObj, 'oldpurchasePrice', this.batchObj['purchasePrice'])
    },
    handleBatchPurchasePriceBlur(e) {
      const newValue = e.target.value
      if (!newValue) {
        return (this.batchSubmitted.purchasePriceEmpty = true)
      }
      this.batchSetValue('purchasePrice', newValue)
    },
    // 批量校验零售价
    handleBatchUpgradePrice(newValue) {
      newValue = newValue.replace(/[^\d.]/g, '')
      let oldValue = `${this.batchObj['oldupgradePrice']}`
      this.$set(this.batchObj, 'upgradePrice', limitPrice(newValue, oldValue, 6, 2, 0))
      this.$set(this.batchObj, 'oldupgradePrice', this.batchObj['upgradePrice'])
    },
    handleBatchUpgradePriceBlur(e) {
      const newValue = e.target.value
      if (!newValue) {
        return (this.batchSubmitted.upgradePriceEmpty = true)
      }
      this.batchSetValue('upgradePrice', newValue)
    },
    // 批量库存预下限警值
    handleBatchWarningValueInput(newValue) {
      newValue = newValue.replace(/[^\d.]/g, '')
      let oldValue = `${this.batchObj['oldwarningValue']}`
      this.$set(this.batchObj, 'warningValue', limitPrice(newValue, oldValue, 3, 1, 0))
      this.$set(this.batchObj, 'oldwarningValue', this.batchObj['warningValue'])
    },
    handleBatchWarningValueInputBlur(e) {
      const newValue = e.target.value
      this.batchSetValue('warningValue', newValue)
    },
    // 批量库存预上限警值
    handleBatchWarningValueMaxInput(newValue) {
      newValue = newValue.replace(/[^\d.]/g, '')
      let oldValue = `${this.batchObj['oldwarningValueMax']}`
      this.$set(this.batchObj, 'warningValueMax', limitPrice(newValue, oldValue, 3, 1, 0))
      this.$set(this.batchObj, 'oldwarningValueMax', this.batchObj['warningValueMax'])
    },
    handleBatchWarningValueMaxInputBlur(e) {
      const newValue = e.target.value
      this.batchSetValue('warningValueMax', newValue)
    },
    // 批量质保
    handleBatchwarrantyPeriodInput(newValue) {
      newValue = newValue.replace(/[^\d.]/g, '')
      let oldValue = `${this.batchObj['oldwarrantyPeriod']}`
      this.$set(this.batchObj, 'warrantyPeriod', limitPrice(newValue, oldValue, 2, 1, 0))
      this.$set(this.batchObj, 'oldwarrantyPeriod', this.batchObj['warrantyPeriod'])
    },
    handleBatchwarrantyPeriodInputBlur(e) {
      const newValue = e.target.value
      if (newValue) this.batchSetValue('warrantyPeriod', newValue)
    },
    // 批量服务时间
    handleBatchServiceTimeInput(newValue) {
      newValue = newValue.replace(/[^\d.]/g, '')
      let oldValue = this.batchObj['oldserviceYears'] ? `${this.batchObj['oldserviceYears']}` : ''
      this.$set(this.batchObj, 'serviceYears', limitPrice(newValue, oldValue, 2, 0, 1))
      this.$set(this.batchObj, 'oldserviceYears', this.batchObj['serviceYears'])
    },
    handleBatchServiceTimeInputBlur(e) {
      const newValue = e.target.value
      this.batchSetValue('serviceYears', newValue)
    },
    // 校验参考售价
    handleUpgradePrice(newValue, index) {
      newValue = newValue.replace(/[^\d.]/g, '')
      let oldValue = `${this.goodsInfoData.goodsSpecificationList[index]['oldupgradePrice']}`
      this.$set(this.goodsInfoData.goodsSpecificationList[index], 'upgradePrice', limitPrice(newValue, oldValue, 6, 2, 0))
      this.$set(this.goodsInfoData.goodsSpecificationList[index], 'oldupgradePrice', this.goodsInfoData.goodsSpecificationList[index]['upgradePrice'])
    },
    handleUpgradePriceBlur(e, index) {
      const newValue = e.target.value
      if (!newValue) {
        this.$set(this.goodsInfoData.goodsSpecificationList[index], 'upgradePriceEmpty', true)
      }
    },
    // 选择服务项目
    // changeServiceItems(e, index) {
    //   this.$set(this.goodsInfoData.goodsSpecificationList[index], 'serviceItemArr', e)
    // },
    // 全选服务项目
    // selectAll(e, index) {
    //   if (this.goodsInfoData.goodsSpecificationList[index].serviceItemArr.length < (deepClone(this.productServiceItemList).length) + 1) {
    //     this.goodsInfoData.goodsSpecificationList[index].serviceItemArr = deepClone(this.productServiceItemList).map(item=>{
    //       return item.serviceCode
    //     })
    //   } else {
    //     this.goodsInfoData.goodsSpecificationList[index].serviceItemArr = []
    //   }
    //   this.$emit('update:updateMultipleSelect', this.selectedArr)
    // },
    // 选择部位
    changePosition(e, index) {
      this.$set(this.goodsInfoData.goodsSpecificationList[index], 'position', e)
    },
    // 校验型号
    handleTypeInput(newValue, index) {
      if (!this.reg.typeReg.test(newValue)) {
        newValue = ''
      }
      this.$set(this.goodsInfoData.goodsSpecificationList[index], 'type', newValue)
    },
    // 校验采购价
    handlePurchasePrice(newValue, index) {
      // subItem.salesCost) && subItem.salesCostEmpty
      newValue = newValue.replace(/[^\d.]/g, '')
      let oldValue = `${this.goodsInfoData.goodsSpecificationList[index]['oldsalesCost']}`
      this.$set(this.goodsInfoData.goodsSpecificationList[index], 'salesCost', limitPrice(newValue, oldValue, 3, 1, 0))
      this.$set(this.goodsInfoData.goodsSpecificationList[index], 'oldsalesCost', this.goodsInfoData.goodsSpecificationList[index]['salesCost'])
    },
    handlePurchasePriceBlur(e, index) {
      const newValue = e.target.value
      if (!newValue) this.$set(this.goodsInfoData.goodsSpecificationList[index], 'salesCostEmpty', true)
    },
    // 库存下限预警
    handleWarningValueInput(newValue, index) {
      newValue = newValue.replace(/[^\d.]/g, '')
      let oldValue = `${this.goodsInfoData.goodsSpecificationList[index]['oldwarningValue']}`
      this.$set(this.goodsInfoData.goodsSpecificationList[index], 'warningValue', limitPrice(newValue, oldValue, 3, 1, 0))
      this.$set(this.goodsInfoData.goodsSpecificationList[index], 'oldwarningValue', this.goodsInfoData.goodsSpecificationList[index]['warningValue'])
    },
    // 库存上线预警
    handleWarningValueMaxInput(newValue, index) {
      newValue = newValue.replace(/[^\d.]/g, '')
      let oldValue = `${this.goodsInfoData.goodsSpecificationList[index]['oldwarningValueMax']}`
      this.$set(this.goodsInfoData.goodsSpecificationList[index], 'warningValueMax', limitPrice(newValue, oldValue, 3, 1, 0))
      this.$set(this.goodsInfoData.goodsSpecificationList[index], 'oldwarningValueMax', this.goodsInfoData.goodsSpecificationList[index]['warningValueMax'])
    },
    // 质保
    handleWarrantyPeriodInput(newValue, index) {
      // subItem.shelfCost) && subItem.salesCostEmpty
      newValue = newValue.replace(/[^\d.]/g, '')
      let oldValue = `${this.goodsInfoData.goodsSpecificationList[index]['oldshelfCost']}`
      this.$set(this.goodsInfoData.goodsSpecificationList[index], 'shelfCost', limitPrice(newValue, oldValue, 3, 1, 0))
      this.$set(this.goodsInfoData.goodsSpecificationList[index], 'oldshelfCost', this.goodsInfoData.goodsSpecificationList[index]['shelfCost'])
    },
    handleWarrantyPeriodBlur(e, index) {
      const newValue = e.target.value
      if (!newValue) this.$set(this.goodsInfoData.goodsSpecificationList[index], 'shelfCostEmpty', true)
    },
    // 服务时间
    handleServiceTimeInput(newValue, index, key) {
      newValue = newValue.replace(/[^\d.]/g, '')
      let oldValue = this.goodsInfoData.goodsSpecificationList[index]['old' + key] ? `${this.goodsInfoData.goodsSpecificationList[index]['old' + key]}` : ''
      this.$set(this.goodsInfoData.goodsSpecificationList[index], key, limitPrice(newValue, oldValue, 2, 0, 1))
      this.$set(this.goodsInfoData.goodsSpecificationList[index], 'old' + key, this.goodsInfoData.goodsSpecificationList[index][key])
    },
    handleServiceTimeBlur(e, index, key) {
      const newValue = e.target.value
      if (!newValue) this.$set(this.goodsInfoData.goodsSpecificationList[index], key + 'Empty', true)
    },
    // 公里数
    handleKilometersInput(newValue, index) {
      newValue = newValue.replace(/[^\d.]/g, '')
      let oldValue = this.goodsInfoData.goodsSpecificationList[index]['oldInsuranceCost'] ? `${this.goodsInfoData.goodsSpecificationList[index]['oldInsuranceCost']}` : ''
      this.$set(this.goodsInfoData.goodsSpecificationList[index], 'insuranceCost', limitPrice(newValue, oldValue, 3, 0, 0, 100))
      this.$set(this.goodsInfoData.goodsSpecificationList[index], 'oldInsuranceCost', this.goodsInfoData.goodsSpecificationList[index]['insuranceCost'])
    },
    handleKilometersBlur(e, index) {
      const newValue = e.target.value
      if (!newValue) this.$set(this.goodsInfoData.goodsSpecificationList[index], 'insuranceCostEmpty', true)
    },
    // 适用车价
    minSuitCarPriceInput(newValue, index) {
      newValue = newValue.replace(/[^\d.]/g, '')
      let oldValue = `${this.goodsInfoData.goodsSpecificationList[index]['oldminSuitCarPrice']}`
      this.$set(this.goodsInfoData.goodsSpecificationList[index], 'minSuitCarPrice', limitPrice(newValue, oldValue, 3, 2, 0))
      this.$set(this.goodsInfoData.goodsSpecificationList[index], 'oldminSuitCarPrice', this.goodsInfoData.goodsSpecificationList[index]['minSuitCarPrice'])
      // 取消适用车价区间校验
      // this.handlePriceConflict()
    },
    maxSuitCarPriceInput(newValue, index) {
      newValue = newValue.replace(/[^\d.]/g, '')
      let oldValue = `${this.goodsInfoData.goodsSpecificationList[index]['oldmaxSuitCarPrice']}`
      this.$set(this.goodsInfoData.goodsSpecificationList[index], 'maxSuitCarPrice', limitPrice(newValue, oldValue, 3, 2, 0))
      this.$set(this.goodsInfoData.goodsSpecificationList[index], 'oldmaxSuitCarPrice', this.goodsInfoData.goodsSpecificationList[index]['maxSuitCarPrice'])
      // 取消适用车价区间校验
      // this.handlePriceConflict()
    },
    // 是否必填
    priceRangeIsRequired(minValue, maxValue) {
      return (!this.filterEmpty(minValue) && this.filterEmpty(maxValue)) || (this.filterEmpty(minValue) && !this.filterEmpty(maxValue))
    },
    // 单个商品车价区间是否正确
    priceIsError(minValue, maxValue) {
      return !this.filterEmpty(minValue) && !this.filterEmpty(maxValue) && Number(minValue) > Number(maxValue)
    },
    handlePriceConflict() {
      const priceRanges = []
      this.goodsInfoData?.goodsSpecificationList.forEach(val => {
        priceRanges.push({
          startPrice: val?.minSuitCarPrice,
          endPrice: val?.maxSuitCarPrice
        })
      })
      for (let i = 0; i < priceRanges.length; i++) {
        this.$set(this.goodsInfoData.goodsSpecificationList[i], 'priceConflict', false)
        const { startPrice, endPrice } = priceRanges[i]
        for (let j = 0; j < priceRanges.length; j++) {
          if (i !== j) {
            const { startPrice: compareStartPrice, endPrice: compareEndPrice } = priceRanges[j]
            if (parseFloat(startPrice) <= parseFloat(compareEndPrice) && parseFloat(endPrice) >= parseFloat(compareStartPrice)) {
              // 存在冲突,输入框错误提示
              this.$set(this.goodsInfoData.goodsSpecificationList[i], 'priceConflict', true)
            }
          }
        }
      }
    }
  }
}
</script>
<style lang="scss" scoped>
.multipleSpecification-form {
  .content_box {
    font-size: 14px;
    margin-top: 10px;
    .sepce-box {
      margin: 10px 0;
      display: flex;
      align-items: center;
      justify-content: space-between;
      .specs-item {
        color: #666666;
        margin-right: 20px;
      }
    }
    .tip-text {
      color: #2a58ad;
    }
    .table-wrapper {
      max-height: 450px;
      overflow: auto;
      .table-spesc {
        width: 100%;
        text-align: center;
        border: 1px solid #e8e8ea;
        position: relative;
        .table_content {
          table-layout: fixed;
          border-collapse: separate;
        }
        tr {
          display: flex;
          flex-wrap: nowrap;
          border-bottom: 1px solid #e8e8ea;
          td {
            display: inline-block;
            text-align: center;
            vertical-align: middle;
            width: 220px;
            height: 100%;
            line-height: 40px;
            border-right: 1px solid #e8e8ea;
            span {
              display: inline-block;
              vertical-align: middle;
            }
          }
          td:last-child {
            border-right: none;
          }
        }
        .w-150-per {
          width: 150px;
          .el-input__inner {
            padding: 0 10px;
          }
        }
        .w-90-per {
          width: 90px;
        }
        .w-200-per {
          width: 200px;
        }
        .color-red {
          color: #eb4e4e;
          font-size: 14px;
          margin-right: 4px;
          cursor: pointer;
        }
      }
    }

    .content-table {
      color: #666666;
      max-height: 400px;
      overflow-y: overlay;
    }
  }
  .input-new-tag {
    width: 90px !important;
    vertical-align: bottom;
  }
}
.selectOpt {
  margin-top: 10px;
  .label {
    margin-left: 120px;
  }
  .selectItem {
    padding: 8px 4px;
  }
  .selectItem + .selectItem {
    margin-left: 0px;
  }
  .active {
    color: #999999;
  }
}
.w-320 {
  width: 320px !important;
}
::v-deep .border-red {
  .el-input__inner {
    border: 1px solid #eb4e4e;
  }
}
::v-deep .service_select_class {
  display: none;
}
</style>