Commit 924ade73 authored by 王伟's avatar 王伟

外部商品通证列表发布商品

parent f1582a4a
...@@ -65,6 +65,14 @@ export const getGoodList = { ...@@ -65,6 +65,14 @@ export const getGoodList = {
return { goodsId, goodsName, goodsType, status, addTimeHead, addTimeTail, pageNum, pageSize } return { goodsId, goodsName, goodsType, status, addTimeHead, addTimeTail, pageNum, pageSize }
} }
} }
// 获取商品审核列表
export const getGoodCheckList = {
url: '/goods/goodsList/pagecheck',
method: 'GET',
dealReqData: ({ goodsId, goodsName, goodsType, status, addTimeHead, addTimeTail, pageNum, pageSize }) => {
return { goodsId, goodsName, goodsType, status, addTimeHead, addTimeTail, pageNum, pageSize }
}
}
// 上下架商品系列 // 上下架商品系列
export const onOffSeries = { export const onOffSeries = {
......
...@@ -161,7 +161,8 @@ export default { ...@@ -161,7 +161,8 @@ export default {
expressList: [], expressList: [],
submitLoading: false, submitLoading: false,
commodityPassId: '', commodityPassId: '',
availableNumber: '' availableNumber: '',
skuId: ''
} }
}, },
methods: { methods: {
...@@ -240,33 +241,36 @@ export default { ...@@ -240,33 +241,36 @@ export default {
} else { } else {
this.form.delayDelivery = true this.form.delayDelivery = true
} }
if (auctionVO) {
this.form.buyerDeposit = auctionVO.buyerDeposit
this.form.priceIncrease = auctionVO.priceIncrease
this.form.endTime = formatTime(auctionVO.endTime)
}
this.form.baseInfo = { this.form.baseInfo = {
name, name,
description, description,
coinName: skus[0].coinName,
prop: JSON.parse(prop), prop: JSON.parse(prop),
type: type.toString(), type: type.toString(),
categoryId: this.isAgain ? JSON.parse(categoryIds) : categoryName categoryId: this.isAgain ? JSON.parse(categoryIds) : categoryName
} }
let newSku = [] // let newSku = []
skus.forEach((item) => { // skus.forEach((item) => {
let { image, propertyList } = item // let { image, propertyList } = item
let upload = { // let upload = {
imageList: [image], // imageList: [image],
defaultImgList: [image] // defaultImgList: [image]
// }
// let prop = {}
// propertyList.forEach((pItem) => {
// prop[pItem.propKey] = pItem.propVal
// })
// newSku.push({ ...item, ...prop, upload })
// })
// this.form.saleInfo.sku = newSku
this.form.saleInfo = {
originalPrice: skus[0].originalPrice,
weight: skus[0].weight,
nftSalesType: skus[0].nftSalesType,
stock: skus[0].stock
} }
let prop = {}
propertyList.forEach((pItem) => {
prop[pItem.propKey] = pItem.propVal
})
newSku.push({ ...item, ...prop, upload })
})
this.form.saleInfo.sku = newSku
this.form.saleInfo.commodityPass = commodityPass this.form.saleInfo.commodityPass = commodityPass
this.skuId = skus[0].skuId
this.form.deciptInfo = { this.form.deciptInfo = {
nftFile, nftFile,
nftEnclosureList: [nftFile], nftEnclosureList: [nftFile],
...@@ -303,7 +307,6 @@ export default { ...@@ -303,7 +307,6 @@ export default {
this.form.baseInfo.coinName = labelName this.form.baseInfo.coinName = labelName
this.commodityPassId = commodityPassId this.commodityPassId = commodityPassId
this.availableNumber = availableNumber this.availableNumber = availableNumber
this.form.goodsId = goodsId this.form.goodsId = goodsId
this.routeName = routeName this.routeName = routeName
if (routeName == 'commodity_update_good' || routeName == 'commodity_good_detail' || routeName == 'commodity_again_good') { if (routeName == 'commodity_update_good' || routeName == 'commodity_good_detail' || routeName == 'commodity_again_good') {
...@@ -329,6 +332,7 @@ export default { ...@@ -329,6 +332,7 @@ export default {
republish: '', republish: '',
skuId: '', skuId: '',
stock: '', stock: '',
weight: '',
commodityPassId: '' commodityPassId: ''
}], }],
packageDTO: {}, packageDTO: {},
...@@ -462,11 +466,12 @@ export default { ...@@ -462,11 +466,12 @@ export default {
form.skuList.forEach(item => { form.skuList.forEach(item => {
item.originalPrice = this.form.saleInfo.originalPrice item.originalPrice = this.form.saleInfo.originalPrice
item.coinName = this.form.baseInfo.coinName item.coinName = this.form.baseInfo.coinName
item.republish = false item.propertyList = [{ propKey: '规格', propVal: '默认' }]
item.propertyList = [{ propKey: '规格', propVal: form.name }]
item.image = form.thumb item.image = form.thumb
item.nftSalesType = this.form.saleInfo.originalPrice item.nftSalesType = this.form.saleInfo.nftSalesType
item.weight = this.form.saleInfo.weight
item.commodityPassId = this.commodityPassId item.commodityPassId = this.commodityPassId
item.skuId = this.skuId
item.stock = item.nftSalesType == 1 ? this.availableNumber : this.form.saleInfo.stock item.stock = item.nftSalesType == 1 ? this.availableNumber : this.form.saleInfo.stock
}) })
} }
...@@ -478,21 +483,21 @@ export default { ...@@ -478,21 +483,21 @@ export default {
let apiName = this.isAdd ? 'addGood' : this.isAgain ? 'republishGood' : 'updateGood' let apiName = this.isAdd ? 'addGood' : this.isAgain ? 'republishGood' : 'updateGood'
let title = this.isAdd ? '添加成功!' : this.isAgain ? '重新发布成功!' : '编辑成功!' let title = this.isAdd ? '添加成功!' : this.isAgain ? '重新发布成功!' : '编辑成功!'
console.log('form', form) console.log('form', form)
// this.submitLoading = true this.submitLoading = true
// this.api({ this.api({
// apiName, apiName,
// postdata: form, postdata: form,
// success: (res) => { success: (res) => {
// // 关闭当前标签页 // 关闭当前标签页
// let route = this.$route let route = this.$route
// let toRouteName = 'product_list' let toRouteName = 'product_list'
// this.closeTag({ route, toRouteName }) this.closeTag({ route, toRouteName })
// this.$Notice.success({ title }) this.$Notice.success({ title })
// }, },
// complete: () => { complete: () => {
// this.submitLoading = false this.submitLoading = false
// } }
// }) })
} }
}, },
......
...@@ -2,24 +2,24 @@ ...@@ -2,24 +2,24 @@
<info-con title="销售信息:" class="sale-info-con"> <info-con title="销售信息:" class="sale-info-con">
<div class="item"> <div class="item">
<label class="label">销售价格:</label> <label class="label">销售价格:</label>
<Input v-model="data.originalPrice" :readonly='isDetail || isEdit' type="number" style="width: 400px;"> <Input v-model="data.originalPrice" :readonly='isDetail' type="number" style="width: 400px;">
</Input> </Input>
</div> </div>
<div class="item"> <div class="item">
<label class="label">商品重量:</label> <label class="label">商品重量:</label>
<Input v-model="data.weight" :readonly='isDetail || isEdit' type="number" style="width: 400px;"> <Input v-model="data.weight" :readonly='isDetail' type="number" style="width: 400px;">
</Input> </Input>
</div> </div>
<div class="item"> <div class="item">
<label class="label">NFT销售方式:</label> <label class="label">NFT销售方式:</label>
<RadioGroup v-model="data.nftSalesType"> <RadioGroup v-model="data.nftSalesType">
<Radio :label="1" style="width:200px" :disabled="isDetail || isEdit">原商品销售</Radio> <Radio :label="1" style="width:200px" :disabled="isDetail || isEdit || isAgain">原商品销售</Radio>
<Radio :label="2" style="width:200px" :disabled="isDetail || isEdit">使用权销售</Radio> <Radio :label="2" style="width:200px" :disabled="isDetail || isEdit || isAgain">使用权销售</Radio>
</RadioGroup> </RadioGroup>
</div> </div>
<div class="item" v-if="data.nftSalesType==2"> <div class="item" v-if="data.nftSalesType==2">
<label class="label">拷贝数量:</label> <label class="label">拷贝数量:</label>
<Input v-model="data.stock" :readonly='isDetail || isEdit' style="width: 400px;"> <Input v-model="data.stock" :readonly='isDetail || isEdit|| isAgain' style="width: 400px;">
</Input> </Input>
</div> </div>
</info-con> </info-con>
......
...@@ -305,7 +305,7 @@ export default { ...@@ -305,7 +305,7 @@ export default {
requestData () { requestData () {
this.loading = true this.loading = true
this.api({ this.api({
apiName: 'getGoodList', apiName: 'getGoodCheckList',
postdata: this.searchContent, postdata: this.searchContent,
complete: () => { complete: () => {
this.loading = false this.loading = false
......
...@@ -523,19 +523,19 @@ export default { ...@@ -523,19 +523,19 @@ export default {
handleUpdate (row) { handleUpdate (row) {
return () => { return () => {
let query = { goodsId: row.goodsId } let query = { goodsId: row.goodsId }
this.$router.push({ name: 'update_good', query }) this.$router.push({ name: row.commodityPass == 3 ? 'commodity_update_good' : 'update_good', query })
} }
}, },
handleAgain (row) { handleAgain (row) {
return () => { return () => {
let query = { goodsId: row.goodsId } let query = { goodsId: row.goodsId }
this.$router.push({ name: 'again_good', query }) this.$router.push({ name: row.commodityPass == 3 ? 'commodity_again_good' : 'again_good', query })
} }
}, },
handleDetail (row) { handleDetail (row) {
return () => { return () => {
let query = { goodsId: row.goodsId } let query = { goodsId: row.goodsId }
this.$router.push({ name: 'good_detail', query }) this.$router.push({ name: row.commodityPass == 3 ? 'commodity_good_detail' : 'good_detail', query })
} }
}, },
handleOffShelf (row) { handleOffShelf (row) {
......
...@@ -139,7 +139,7 @@ export default { ...@@ -139,7 +139,7 @@ export default {
apiName: 'bannerDetail', apiName: 'bannerDetail',
postdata: operationBannerId, postdata: operationBannerId,
success: (res) => { success: (res) => {
console.log(res) // console.log(res)
let { bannerName, bannerType, bannerImage, displayOrder, number, url, operationBannerId, updateTime } = res.data let { bannerName, bannerType, bannerImage, displayOrder, number, url, operationBannerId, updateTime } = res.data
this.form.bannerName = bannerName this.form.bannerName = bannerName
this.form.bannerType = bannerType this.form.bannerType = bannerType
...@@ -214,6 +214,7 @@ export default { ...@@ -214,6 +214,7 @@ export default {
} }
if (!errMsg) { if (!errMsg) {
form.bannerType = JSON.parse(form.bannerType) form.bannerType = JSON.parse(form.bannerType)
form.number = form.number.replace(/\s+/g, '')
} }
let apiName = this.isAdd ? 'addBanner' : 'updateBanner' let apiName = this.isAdd ? 'addBanner' : 'updateBanner'
let title = this.isAdd ? '添加成功!' : '编辑成功!' let title = this.isAdd ? '添加成功!' : '编辑成功!'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment