zxl
2025-07-23 3e1616df0025a190014f7be08f26a90cf7311a5e
规格自动生成货号
1个文件已修改
30 ■■■■■ 已修改文件
seller/src/views/goods/goods-seller/goodsOperationSec.vue 30 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
seller/src/views/goods/goods-seller/goodsOperationSec.vue
@@ -327,9 +327,9 @@
                            overflow-x: hidden;
                          }
                        ">
                        <template slot="sn" slot-scope="{ row }">
                          <Input v-model="row.sn" clearable placeholder="请输入货号"
                                 @on-change="updateSkuTable(row, 'sn')"/>
                        <template slot="sn" slot-scope="{ row, index }">
                          <Input v-model="row.sn" placeholder="请输入货号" disabled
                                 @on-change="updateSkuTable(row, 'sn')" />
                        </template>
                        <div v-if="baseInfoForm.goodsType !== 'VIRTUAL_GOODS'" slot="weight" slot-scope="{ row }">
                          <Input v-model="row.weight" clearable placeholder="请输入重量"
@@ -1703,6 +1703,7 @@
        this.baseInfoForm.regeneratorSkuFlag = true;
        this.newSkuValues[$index] = "";
      }
      this.renderTableData(this.skuTableData);
    },
    handleClearSku() {
      this.skuInfo = [];
@@ -1756,14 +1757,14 @@
        );
      }
      // 预售模式
      if (this.baseInfoForm.salesModel !== "PRESALE") {
        pushData.push(
          {
            title: "预售时间",
            slot: "price",
          }
        );
      }
      // if (this.baseInfoForm.salesModel !== "PRESALE") {
      //   pushData.push(
      //     {
      //       title: "预售时间",
      //       slot: "price",
      //     }
      //   );
      // }
      if (this.baseInfoForm.salesModel === "WHOLESALE" && this.wholesaleData) {
        this.wholesaleData.forEach((item, index) => {
          pushData.push({
@@ -1819,6 +1820,7 @@
     * array spec数据
     */
    specIterator(result, spec, skus) {
      let table = result;
      if (spec.length > 0) {
        //清除当前循环的分组
@@ -1860,6 +1862,11 @@
      } else {
        this.skuIndex++;
      }
      table.forEach((item,index) =>{
        console.log("元素:" + item +"index:" + (index +1))
          item.sn = index + 1;
      })
      return table;
    },
    /** 根据分类id获取系统设置规格信息*/
@@ -1917,6 +1924,7 @@
          return;
        }
      }
      // else if (item === "alertQuantity") {
      //   if (
      //     !/^[0-9]\d*$/.test(row[item]) ||