Merge branch 'master' of https://gitee.com/beijing_hongye_huicheng/lilishop-ui
						commit
						dc6d3b3743
					
				| 
						 | 
					@ -226,7 +226,7 @@ export default {
 | 
				
			||||||
              title: "价格",
 | 
					              title: "价格",
 | 
				
			||||||
              key: "price",
 | 
					              key: "price",
 | 
				
			||||||
              render: (h, params) => {
 | 
					              render: (h, params) => {
 | 
				
			||||||
                return h("priceColorScheme", {props:{alue:params.row.price,color:this.$mainColor}} );
 | 
					                return h("priceColorScheme", {props:{value:params.row.price,color:this.$mainColor}} );
 | 
				
			||||||
              },
 | 
					              },
 | 
				
			||||||
            },{
 | 
					            },{
 | 
				
			||||||
              title: "库存",
 | 
					              title: "库存",
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -213,6 +213,11 @@
 | 
				
			||||||
                            overflow-x: hidden;
 | 
					                            overflow-x: hidden;
 | 
				
			||||||
                          }
 | 
					                          }
 | 
				
			||||||
                        ">
 | 
					                        ">
 | 
				
			||||||
 | 
					                        <!--<template slot="alertQuantity" slot-scope="{ row }">-->
 | 
				
			||||||
 | 
					                          <!--<Input v-model="row.alertQuantity" clearable placeholder="请输入库存预警" @on-change="updateSkuTable(row, 'alertQuantity')">-->
 | 
				
			||||||
 | 
					                          <!--<span slot="append">{{baseInfoForm.goodsUnit || ""}}</span>-->
 | 
				
			||||||
 | 
					                          <!--</Input>-->
 | 
				
			||||||
 | 
					                        <!--</template>-->
 | 
				
			||||||
                        <template slot="sn" slot-scope="{ row }">
 | 
					                        <template slot="sn" slot-scope="{ row }">
 | 
				
			||||||
                          <Input v-model="row.sn" clearable placeholder="请输入货号" @on-change="updateSkuTable(row, 'sn')" />
 | 
					                          <Input v-model="row.sn" clearable placeholder="请输入货号" @on-change="updateSkuTable(row, 'sn')" />
 | 
				
			||||||
                        </template>
 | 
					                        </template>
 | 
				
			||||||
| 
						 | 
					@ -639,7 +644,7 @@ export default {
 | 
				
			||||||
        "price",
 | 
					        "price",
 | 
				
			||||||
        "weight",
 | 
					        "weight",
 | 
				
			||||||
        "quantity",
 | 
					        "quantity",
 | 
				
			||||||
        "alertQuantity",
 | 
					        // "alertQuantity",
 | 
				
			||||||
        "specId",
 | 
					        "specId",
 | 
				
			||||||
        "specValueId",
 | 
					        "specValueId",
 | 
				
			||||||
      ],
 | 
					      ],
 | 
				
			||||||
| 
						 | 
					@ -683,12 +688,12 @@ export default {
 | 
				
			||||||
    // 局部刷新
 | 
					    // 局部刷新
 | 
				
			||||||
    refresh(v){
 | 
					    refresh(v){
 | 
				
			||||||
      if( v == 'template'){
 | 
					      if( v == 'template'){
 | 
				
			||||||
        this.GET_ShipTemplate()
 | 
					        this.GET_ShipTemplate('localRefresh');
 | 
				
			||||||
      }else if( v == 'goodsUnit'){
 | 
					      }else if( v == 'goodsUnit'){
 | 
				
			||||||
        this.goodsUnitList = []
 | 
					        this.goodsUnitList = []
 | 
				
			||||||
        this.GET_GoodsUnit()
 | 
					        this.GET_GoodsUnit('localRefresh');
 | 
				
			||||||
      }else{
 | 
					      }else{
 | 
				
			||||||
        this.getGoodsBrandList()
 | 
					        this.getGoodsBrandList('localRefresh');
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    getImages(v) {
 | 
					    getImages(v) {
 | 
				
			||||||
| 
						 | 
					@ -937,21 +942,33 @@ export default {
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /** 查询商品品牌列表 */
 | 
					    /** 查询商品品牌列表 */
 | 
				
			||||||
    getGoodsBrandList() {
 | 
					    getGoodsBrandList(type) {
 | 
				
			||||||
      API_GOODS.getCategoryBrandListDataSeller(this.categoryId).then(
 | 
					      API_GOODS.getCategoryBrandListDataSeller(this.categoryId).then(
 | 
				
			||||||
        (response) => {
 | 
					        (response) => {
 | 
				
			||||||
          this.brandList = response;
 | 
					          this.brandList = response;
 | 
				
			||||||
 | 
					          if(type === 'localRefresh') {
 | 
				
			||||||
 | 
					            this.$Message.success("刷新成功");
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
      );
 | 
					      ).catch(() => {
 | 
				
			||||||
 | 
					        if(type === 'localRefresh') {
 | 
				
			||||||
 | 
					          this.$Message.error("刷新失败,请重试");
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					      });
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    // 获取商品单位
 | 
					    // 获取商品单位
 | 
				
			||||||
    GET_GoodsUnit() {
 | 
					    GET_GoodsUnit(type) {
 | 
				
			||||||
      API_GOODS.getGoodsUnitList(this.params).then((res) => {
 | 
					      API_GOODS.getGoodsUnitList(this.params).then((res) => {
 | 
				
			||||||
        if (res.success) {
 | 
					        if (res.success) {
 | 
				
			||||||
          this.goodsUnitList.push(...res.result.records.map((i) => i.name));
 | 
					          this.goodsUnitList.push(...res.result.records.map((i) => i.name));
 | 
				
			||||||
          this.total = res.result.total;
 | 
					          this.total = res.result.total;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					        if (type === 'localRefresh' && res.success) {
 | 
				
			||||||
 | 
					          this.$Message.success("刷新成功");
 | 
				
			||||||
 | 
					        } else if(type === 'localRefresh') {
 | 
				
			||||||
 | 
					          this.$Message.error("刷新失败,请重试");
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
      });
 | 
					      });
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    // 获取当前店铺分类
 | 
					    // 获取当前店铺分类
 | 
				
			||||||
| 
						 | 
					@ -1053,7 +1070,7 @@ export default {
 | 
				
			||||||
          price: e.price,
 | 
					          price: e.price,
 | 
				
			||||||
          // cost: e.cost,
 | 
					          // cost: e.cost,
 | 
				
			||||||
          quantity: e.quantity,
 | 
					          quantity: e.quantity,
 | 
				
			||||||
          alertQuantity: e.alertQuantity,
 | 
					          // alertQuantity: e.alertQuantity,
 | 
				
			||||||
          weight: e.weight,
 | 
					          weight: e.weight,
 | 
				
			||||||
        };
 | 
					        };
 | 
				
			||||||
        e.specList.forEach((u) => {
 | 
					        e.specList.forEach((u) => {
 | 
				
			||||||
| 
						 | 
					@ -1357,7 +1374,7 @@ export default {
 | 
				
			||||||
              find.sn && (find.sn = "");
 | 
					              find.sn && (find.sn = "");
 | 
				
			||||||
              // find.cost && (find.cost = "");
 | 
					              // find.cost && (find.cost = "");
 | 
				
			||||||
              find.quantity && (find.quantity = "");
 | 
					              find.quantity && (find.quantity = "");
 | 
				
			||||||
              find.alertQuantity && (find.alertQuantity = "");
 | 
					              // find.alertQuantity && (find.alertQuantity = "");
 | 
				
			||||||
              find.weight && (find.weight = "");
 | 
					              find.weight && (find.weight = "");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
              this.skuTableData.splice(this.skuTableData.length, 0, find);
 | 
					              this.skuTableData.splice(this.skuTableData.length, 0, find);
 | 
				
			||||||
| 
						 | 
					@ -1372,7 +1389,7 @@ export default {
 | 
				
			||||||
              find.sn && (find.sn = "");
 | 
					              find.sn && (find.sn = "");
 | 
				
			||||||
              // find.cost && (find.cost = "");
 | 
					              // find.cost && (find.cost = "");
 | 
				
			||||||
              find.quantity && (find.quantity = "");
 | 
					              find.quantity && (find.quantity = "");
 | 
				
			||||||
              find.alertQuantity && (find.alertQuantity = "");
 | 
					              // find.alertQuantity && (find.alertQuantity = "");
 | 
				
			||||||
              find.weight && (find.weight = "");
 | 
					              find.weight && (find.weight = "");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
              this.skuTableData.splice(index, 0, find);
 | 
					              this.skuTableData.splice(index, 0, find);
 | 
				
			||||||
| 
						 | 
					@ -1459,6 +1476,10 @@ export default {
 | 
				
			||||||
          title: "库存",
 | 
					          title: "库存",
 | 
				
			||||||
          slot: "quantity",
 | 
					          slot: "quantity",
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
 | 
					        // {
 | 
				
			||||||
 | 
					        //   title: "库存预警",
 | 
				
			||||||
 | 
					        //   slot: "alertQuantity",
 | 
				
			||||||
 | 
					        // },
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
          title: "货号",
 | 
					          title: "货号",
 | 
				
			||||||
          slot: "sn",
 | 
					          slot: "sn",
 | 
				
			||||||
| 
						 | 
					@ -1505,7 +1526,7 @@ export default {
 | 
				
			||||||
              id: skus[index].id,
 | 
					              id: skus[index].id,
 | 
				
			||||||
              sn: skus[index].sn,
 | 
					              sn: skus[index].sn,
 | 
				
			||||||
              quantity: skus[index].quantity,
 | 
					              quantity: skus[index].quantity,
 | 
				
			||||||
              alertQuantity: skus[index].alertQuantity,
 | 
					              // alertQuantity: skus[index].alertQuantity,
 | 
				
			||||||
              cost: 1,
 | 
					              cost: 1,
 | 
				
			||||||
              price: skus[index].price,
 | 
					              price: skus[index].price,
 | 
				
			||||||
              [spec[0].name]: specItem.value,
 | 
					              [spec[0].name]: specItem.value,
 | 
				
			||||||
| 
						 | 
					@ -1587,18 +1608,19 @@ export default {
 | 
				
			||||||
          this.validatatxt = "请输入0~99999999之间的整数";
 | 
					          this.validatatxt = "请输入0~99999999之间的整数";
 | 
				
			||||||
          return;
 | 
					          return;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
      } else if (item === "alertQuantity") {
 | 
					 | 
				
			||||||
        if (
 | 
					 | 
				
			||||||
          !/^[0-9]\d*$/.test(row[item]) ||
 | 
					 | 
				
			||||||
          parseInt(row[item]) < 0 ||
 | 
					 | 
				
			||||||
          parseInt(row[item]) > 99999999
 | 
					 | 
				
			||||||
        ) {
 | 
					 | 
				
			||||||
          // 库存预警
 | 
					 | 
				
			||||||
          this.validateError.push([index, item]);
 | 
					 | 
				
			||||||
          this.validatatxt = "请输入0~99999999之间的整数";
 | 
					 | 
				
			||||||
          return;
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
 | 
					      // else if (item === "alertQuantity") {
 | 
				
			||||||
 | 
					      //   if (
 | 
				
			||||||
 | 
					      //     !/^[0-9]\d*$/.test(row[item]) ||
 | 
				
			||||||
 | 
					      //     parseInt(row[item]) < 0 ||
 | 
				
			||||||
 | 
					      //     parseInt(row[item]) > 99999999
 | 
				
			||||||
 | 
					      //   ) {
 | 
				
			||||||
 | 
					      //     // 库存预警
 | 
				
			||||||
 | 
					      //     this.validateError.push([index, item]);
 | 
				
			||||||
 | 
					      //     this.validatatxt = "请输入0~99999999之间的整数";
 | 
				
			||||||
 | 
					      //     return;
 | 
				
			||||||
 | 
					      //   }
 | 
				
			||||||
 | 
					      // }
 | 
				
			||||||
      // else if (item === "cost" || item === "price") {
 | 
					      // else if (item === "cost" || item === "price") {
 | 
				
			||||||
      //   if (
 | 
					      //   if (
 | 
				
			||||||
      //     !regular.money.test(row[item]) ||
 | 
					      //     !regular.money.test(row[item]) ||
 | 
				
			||||||
| 
						 | 
					@ -1691,7 +1713,7 @@ export default {
 | 
				
			||||||
              cost: 1,
 | 
					              cost: 1,
 | 
				
			||||||
              price: sku.price,
 | 
					              price: sku.price,
 | 
				
			||||||
              quantity: sku.quantity,
 | 
					              quantity: sku.quantity,
 | 
				
			||||||
              alertQuantity: sku.alertQuantity,
 | 
					              // alertQuantity: sku.alertQuantity,
 | 
				
			||||||
              sn: sku.sn,
 | 
					              sn: sku.sn,
 | 
				
			||||||
              images: sku.images,
 | 
					              images: sku.images,
 | 
				
			||||||
            };
 | 
					            };
 | 
				
			||||||
| 
						 | 
					@ -1799,12 +1821,17 @@ export default {
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
      });
 | 
					      });
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    GET_ShipTemplate(){
 | 
					    GET_ShipTemplate(type){
 | 
				
			||||||
       // 获取物流模板
 | 
					       // 获取物流模板
 | 
				
			||||||
       API_Shop.getShipTemplate().then((res) => {
 | 
					       API_Shop.getShipTemplate().then((res) => {
 | 
				
			||||||
      if (res.success) {
 | 
					      if (res.success) {
 | 
				
			||||||
        this.logisticsTemplate = res.result;
 | 
					        this.logisticsTemplate = res.result;
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
 | 
					      if (type === 'localRefresh' && res.success) {
 | 
				
			||||||
 | 
					        this.$Message.success("刷新成功");
 | 
				
			||||||
 | 
					      } else if(type === 'localRefresh') {
 | 
				
			||||||
 | 
					        this.$Message.error("刷新失败,请重试");
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
    });
 | 
					    });
 | 
				
			||||||
    }     
 | 
					    }     
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue