fax():补全前台代码

master
cui-fubo 2024-12-04 21:52:41 +08:00
parent 45ba4aef27
commit a40886300c
4 changed files with 55 additions and 38 deletions

View File

@ -12,8 +12,16 @@ export function listAttrimarketing(data) {
//添加拼团列表
export function addInfoActivity(data) {
return request({
url: '/marketing/team/activityInfoAdd',
url: '/marketing/team/save',
method: 'post',
data:data
})
}
//根据ID查询拼团活动
export function ActivityFindById(id) {
return request({
url: '/marketing/team/findById/' + id,
method: 'get',
params: id
})
}

View File

@ -56,3 +56,10 @@ export function getCacheInfo(id) {
method: 'get'
})
}
export function getSku(projectId){
return request({
url: '/product/sku/' + projectId,
method: 'get'
})
}

View File

@ -78,27 +78,19 @@
</el-form>
-------------------------------------------------------------------------
<el-form label-width="80px" :model="form">
<el-form-item label="活动时间">
<el-input v-model="form.endTime"></el-input>
</el-form-item>
<el-form-item label="过期时间">
<el-date-picker
v-model="formTeamData.endTime"
type="date"
placeholder="选择日期">
</el-date-picker>
</el-form-item>
<el-form-item label="策略状态">
<el-input v-model="form.strategyType"></el-input>
</el-form-item>
<el-form-item label="策略Id">
<el-input v-model="form.strategyId"></el-input>
</el-form-item>
<el-form-item label="商品规格">
<el-input v-model="form.productSku"></el-input>
</el-form-item>
<el-form-item label="拼团价格">
<el-input v-model="form.teamPrice"></el-input>
</el-form-item>
<el-form-item label="拼团库存">
<el-input v-model="form.teamStock"></el-input>
</el-form-item>
<el-form-item label="排序">
<el-input v-model="form.sort"></el-input>
</el-form-item>
</el-form>
</div>
<div v-show="active === 2">
@ -116,6 +108,16 @@
<el-table-column label="规格" align="center" prop="sku" />
<el-table-column label="规格库存" align="center" prop="stock" />
<el-table-column label="规格价格" align="center" prop="price" />
<el-table-column property="groupStock" label="拼团库存" width="160px" >
<template #default="scope">
<el-input v-model="scope.row.groupStock" style="width: 60px; margin: 0px 15px" clearable />
</template>
</el-table-column>
<el-table-column property="groupPrice" label="拼团价格" width="160px" >
<template #default="scope">
<el-input v-model="scope.row.groupPrice" style="width: 60px; margin: 0px 15px" clearable />
</template>
</el-table-column>
</el-table>
</el-form>
</div>
@ -151,9 +153,6 @@
<image-preview :src="scope.row.productImage" :width="50" :height="50"/>
</template>
</el-table-column>
<el-table-column label="商品价格" width="180">
<template slot-scope="scope"><span style="margin-left: 10px">{{ scope.row.productPrice }}</span></template>
</el-table-column>
<el-table-column label="拼团价格" width="180">
<template slot-scope="scope"><span style="margin-left: 10px">{{ scope.row.teamPrice }}</span></template>
</el-table-column>
@ -308,8 +307,8 @@ export default {
this.dialogTableVisible = false;
for(let i = 0 ;i<this.skuList.length;i++){
this.skuList[i].productSku = this.skuList[i].sku
this.skuList[i].teamPrice = this.skuList[i].price
this.skuList[i].teamStock = this.skuList[i].stock
this.skuList[i].teamPrice = this.skuList[i].groupPrice
this.skuList[i].teamStock = this.skuList[i].groupStock
}
this.form.productId = this.infoList[0].id
this.form.skuList = this.skuList

View File

@ -91,10 +91,14 @@
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="主键" align="center" prop="id" />
<el-table-column label="商品名称" align="center" prop="name" />
<el-table-column label="商品描述" align="center" prop="introduction" />
<el-table-column label="主类型" align="center" prop="mianType" />
<el-table-column label="父类型" align="center" prop="parentType" />
<el-table-column label="商品类型" align="center" prop="type" />
<el-table-column label="商品描述" align="center" >
<template slot-scope="scope">
<span v-html="scope.row.introduction"></span>
</template>
</el-table-column>
<el-table-column label="主类型" align="center" prop="mianTypeName" />
<el-table-column label="父类型" align="center" prop="parentTypeName" />
<el-table-column label="商品类型" align="center" prop="typeName" />
<el-table-column label="商品图片" align="center" prop="image" width="100">
<template slot-scope="scope">
<image-preview :src="scope.row.image" :width="50" :height="50"/>
@ -110,8 +114,8 @@
<dict-tag :options="dict.type.sys_yes_no" :value="scope.row.status"/>
</template>
</el-table-column>
<el-table-column label="规格" align="center" prop="ruleId" />
<el-table-column label="品牌" align="center" prop="brandId" />
<el-table-column label="规格" align="center" prop="ruleName" />
<el-table-column label="品牌" align="center" prop="brandName" />
<el-table-column label="备注" align="center" prop="remark" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
@ -233,7 +237,7 @@
</div>
<div style="height: 200px; width: 100%;">
<el-form ref="templateAttributeGroupForm" label-width="80px">
<el-form-item :label="attribute.name" v-for="attribute in templateAttributeGroup.attributeList">
<el-form-item :label="attribute.code" v-for="attribute in templateAttributeGroup.attributeList">
<el-input v-model="attribute.value"></el-input>
</el-form-item>
</el-form>
@ -295,7 +299,7 @@
</div>
<el-row style="overflow-x: auto; height: 300px;">
<el-form ref="attributeForm" :model="form" label-width="80px">
<el-col :span="6" v-for="attribute in attributeCheckedList">
<el-col :span="6" v-for="attribute in categoryCommonElement.attributeList">
<el-form-item :label="attribute.name">
<el-input v-model="attribute.value"></el-input>
</el-form-item>
@ -345,8 +349,8 @@
<span v-if="title.prop.indexOf('prop') > -1">{{scope.row[title.prop]}}</span>
<el-input-number v-else-if="['stock','price'].indexOf(title.prop) > -1" v-model="scope.row[title.prop]" :precision="2" :step="0.01"></el-input-number>
<image-upload v-else-if="['image'].indexOf(title.prop) > -1" v-model="scope.row[title.prop]"
:limit="1"
:is-show-tip="false"
:limit="1"
:is-show-tip="false"
></image-upload>
</template>
</el-table-column>
@ -369,7 +373,7 @@
</template>
<script>
import {listInfo, getInfo, delInfo, addInfo, updateInfo, getDetailInfo} from "@/api/product/info";
import { listInfo, getInfo, delInfo, addInfo, updateInfo } from "@/api/product/info";
import {listBrand} from "@/api/product/brand";
import {getTemplateAttribute, listCategory} from "@/api/product/category";
import {listRule} from "@/api/product/rule";
@ -581,9 +585,9 @@ export default {
if (response.code === 200){
//
let attributeId = response.data,
code = this.customAttributeForm.code,
name = this.customAttributeForm.name,
value = this.customAttributeForm.value;
code = this.customAttributeForm.code,
name = this.customAttributeForm.name,
value = this.customAttributeForm.value;
// categoryCommonElement / attributeIdCheckedList / attributeCheckedList
this.categoryCommonElement.attributeList.push({
"id": attributeId,
@ -723,12 +727,11 @@ export default {
const id = row.id || this.ids
getInfo(id).then(response => {
this.form = response.data;
this.categoryOptionValue = [
this.categoryOptionValue=[
this.form.mianType,
this.form.parentType,
this.form.type
]
this.form.ruleAttrList=response.data.ruleAttrList
];
this.open = true;
this.title = "修改商品信息";
});