add
This commit is contained in:
parent
b7be7ef93e
commit
04abb8b1b9
|
@ -320,12 +320,10 @@
|
||||||
url: '/pages/product/list/index'
|
url: '/pages/product/list/index'
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
addGoods(item = {}) {
|
addGoods(item) {
|
||||||
item = (JSON.stringify(item));
|
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: `/pages/product/addGoodDetail/addGoodDetail?mer_id=${this.mer_id}&&goodsInfo=${item}`
|
url: `/pages/product/addGoodDetail/addGoodDetail?mer_id=${this.mer_id}&&goodsInfoId=${item.id}&&name=${this.searchGoodsName}`
|
||||||
})
|
})
|
||||||
return
|
|
||||||
},
|
},
|
||||||
initShop(item) {
|
initShop(item) {
|
||||||
if (item.spec == '' || item.spec == undefined || item.spec == null) {
|
if (item.spec == '' || item.spec == undefined || item.spec == null) {
|
||||||
|
|
|
@ -271,6 +271,9 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import {
|
||||||
|
seachBarCodeAPI
|
||||||
|
} from '@/api/api.js'
|
||||||
import {
|
import {
|
||||||
Toast,
|
Toast,
|
||||||
Modal
|
Modal
|
||||||
|
@ -732,14 +735,19 @@
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
initFormData(option) {
|
async initFormData(option) {
|
||||||
this.isWholeSale = this.$store.state.app.userInfo?.mer_info?.wholesale == 2;
|
this.isWholeSale = this.$store.state.app.userInfo?.mer_info?.wholesale == 2;
|
||||||
this.mer_id = option.mer_id
|
this.mer_id = option.mer_id
|
||||||
if (option.formData) {
|
if (option.formData) {
|
||||||
this.formData = JSON.parse(option.formData)
|
this.formData = JSON.parse(option.formData)
|
||||||
}
|
}
|
||||||
if (option.goodsInfo) {
|
if (option.goodsInfoId) {
|
||||||
let goods = JSON.parse(option.goodsInfo)
|
|
||||||
|
let res = await await seachBarCodeAPI({
|
||||||
|
id: option.goodsInfoId,
|
||||||
|
name: option.name
|
||||||
|
})
|
||||||
|
let goods = res.data.list[0]
|
||||||
console.log(goods)
|
console.log(goods)
|
||||||
this.formData.store_name = goods.store_name
|
this.formData.store_name = goods.store_name
|
||||||
this.formData.imageList = [goods.image, ...goods.slider_image]
|
this.formData.imageList = [goods.image, ...goods.slider_image]
|
||||||
|
|
Loading…
Reference in New Issue