|
|
@ -55,7 +55,7 @@ |
|
|
|
</a-form-item> |
|
|
|
</a-form-item> |
|
|
|
<a-form-item v-show="multiSpecData.skuList.length" label="SKU列表" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
|
|
|
<a-form-item v-show="multiSpecData.skuList.length" label="SKU列表" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
|
|
|
<!-- 批量设置 --> |
|
|
|
<!-- 批量设置 --> |
|
|
|
<div v-if="multiSpecData.skuList.length > 1" class="sku-batch"> |
|
|
|
<!-- <div v-if="multiSpecData.skuList.length > 1" class="sku-batch"> |
|
|
|
<span class="title">批量设置:</span> |
|
|
|
<span class="title">批量设置:</span> |
|
|
|
<a-input-number |
|
|
|
<a-input-number |
|
|
|
v-model="multiSpecData.skuBatchForm.goods_price" |
|
|
|
v-model="multiSpecData.skuBatchForm.goods_price" |
|
|
@ -69,12 +69,6 @@ |
|
|
|
:min="0" |
|
|
|
:min="0" |
|
|
|
:precision="2" |
|
|
|
:precision="2" |
|
|
|
/> |
|
|
|
/> |
|
|
|
<!-- <a-input-number |
|
|
|
|
|
|
|
v-model="multiSpecData.skuBatchForm.line_price" |
|
|
|
|
|
|
|
placeholder="划线价格" |
|
|
|
|
|
|
|
:min="0" |
|
|
|
|
|
|
|
:precision="2" |
|
|
|
|
|
|
|
/> --> |
|
|
|
|
|
|
|
<a-input-number |
|
|
|
<a-input-number |
|
|
|
v-model="multiSpecData.skuBatchForm.stock_num" |
|
|
|
v-model="multiSpecData.skuBatchForm.stock_num" |
|
|
|
placeholder="库存数量" |
|
|
|
placeholder="库存数量" |
|
|
@ -89,7 +83,7 @@ |
|
|
|
/> |
|
|
|
/> |
|
|
|
<a-input v-model="multiSpecData.skuBatchForm.goods_sku_no" placeholder="sku编码" /> |
|
|
|
<a-input v-model="multiSpecData.skuBatchForm.goods_sku_no" placeholder="sku编码" /> |
|
|
|
<a-button @click="handleSkuBatch">立即设置</a-button> |
|
|
|
<a-button @click="handleSkuBatch">立即设置</a-button> |
|
|
|
</div> |
|
|
|
</div> --> |
|
|
|
|
|
|
|
|
|
|
|
<!-- sku列表table --> |
|
|
|
<!-- sku列表table --> |
|
|
|
<a-table |
|
|
|
<a-table |
|
|
@ -104,9 +98,9 @@ |
|
|
|
<SelectGoods :multiple="false" @change="handleSelectGoods($event, item)" /> |
|
|
|
<SelectGoods :multiple="false" @change="handleSelectGoods($event, item)" /> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
<!-- 商品名称 --> |
|
|
|
<!-- 商品名称 --> |
|
|
|
<template slot="goods_name" slot-scope="text, item"> |
|
|
|
<!-- <template slot="goods_name" slot-scope="text, item"> |
|
|
|
{{ item.goods_name }} |
|
|
|
{{ item.goods_name }} |
|
|
|
</template> |
|
|
|
</template> --> |
|
|
|
<!-- 商品价格 --> |
|
|
|
<!-- 商品价格 --> |
|
|
|
<template slot="goods_price" slot-scope="text, item"> |
|
|
|
<template slot="goods_price" slot-scope="text, item"> |
|
|
|
{{ item.goods_price }} |
|
|
|
{{ item.goods_price }} |
|
|
@ -289,6 +283,13 @@ export default { |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
async handleSelectGoods (goodsId, item) { |
|
|
|
async handleSelectGoods (goodsId, item) { |
|
|
|
|
|
|
|
const skuList = this.multiSpecData.skuList |
|
|
|
|
|
|
|
const skuItem = skuList.find(sku => sku.goods_id === goodsId) |
|
|
|
|
|
|
|
if (skuItem) { |
|
|
|
|
|
|
|
this.$message.error('一个商品只能选择一次', 2) |
|
|
|
|
|
|
|
return false |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
console.log(goodsId, item) |
|
|
|
console.log(goodsId, item) |
|
|
|
this.getGoodsDetail(goodsId).then(res => { |
|
|
|
this.getGoodsDetail(goodsId).then(res => { |
|
|
|
const sku = res.skuList[0] |
|
|
|
const sku = res.skuList[0] |
|
|
@ -297,7 +298,7 @@ export default { |
|
|
|
item.stock_num = sku.stock_num |
|
|
|
item.stock_num = sku.stock_num |
|
|
|
item.goods_weight = sku.goods_weight |
|
|
|
item.goods_weight = sku.goods_weight |
|
|
|
item.goods_sku_no = sku.goods_sku_no |
|
|
|
item.goods_sku_no = sku.goods_sku_no |
|
|
|
item.goods_name = res.goods_name |
|
|
|
// item.goods_name = res.goods_name |
|
|
|
item.goods_id = res.goods_id |
|
|
|
item.goods_id = res.goods_id |
|
|
|
}) |
|
|
|
}) |
|
|
|
}, |
|
|
|
}, |
|
|
|