Commit fe93a214 authored by 赵啸非's avatar 赵啸非

修改js文件

parent 85f331e3
......@@ -9,7 +9,6 @@
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
<el-row>
<Field label="产品名称" prop="productName" v-model="form.productName" placeholder="请输入产品名称,名称唯一"/>
<Field label="产品编码" prop="productCode" v-model="form.productCode" type="textarea" placeholder="请输入产品编码"/>
<Field label="产品slogan" prop="productSlogan" v-model="form.productSlogan" placeholder="请输入产品slogan"/>
<Field label="产品分类" prop="categoryId" v-model="form.categoryId" :multiple="true" type="select" :enumData="dict.categoryId" placeholder="请选择产品分类"/>
......@@ -17,11 +16,11 @@
<Field label="产品图标"><imageUpload v-model="form.productLogoPath" prePath="/file/preview"/></Field>
<Field label="产品封面图片" prop="productFacePath" v-model="form.productFacePath" placeholder="请输入产品封面图片"/>
<Field label="产品视频"><fileUpload v-model="form.productVideoPath" prePath="/file/fileupload"/></Field>
<Field label="产品封面图片" prop="productFacePath" ><imageUpload v-model="form.productFacePath" prePath="/file/preview"/> </Field>
<Field label="产品宣传图片"><imageUpload v-model="form.productPicPath" prePath="/file/preview"/></Field>
<Field label="产品视频"><fileUpload v-model="form.productVideoPath" prePath="/file/fileupload"/></Field>
<Field label="产品介绍" prop="productIntroduction" v-model="form.productIntroduction" type="textarea" placeholder="请输入产品介绍"/>
<Field label="产品详情" prop="productDetail" v-model="form.productDetail" type="textarea" placeholder="请输入产品详情"/>
<Field label="产品详情" prop="productDetail" placeholder="请输入产品详情"><editor v-model="form.productDetail" :min-height="256"/></Field>
<Field label="发布时间" prop="publishTime" v-model="form.publishTime" type="date" />
<Field label="热门" prop="hot" v-model="form.hot" type="radio" :enumData="dict.hot" placeholder="请选择是否热门"/>
<Field label="备注" prop="productRemark" v-model="form.productRemark" type="textarea" placeholder="请输入备注"/>
......@@ -29,7 +28,7 @@
</el-row>
<el-divider content-position="center">产品常见问题信息</el-divider>
<br/>
<el-row :gutter="10" class="mb8">
<el-row style="margin-left: 10px" :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button type="primary" icon="el-icon-plus" size="mini" @click="handleAddProductQuestion">添加</el-button>
</el-col>
......@@ -41,11 +40,6 @@
<el-table :data="productQuestionList" :row-class-name="rowProductQuestionIndex" @selection-change="handleProductQuestionSelectionChange" ref="productQuestion">
<el-table-column type="selection" width="50" align="center" />
<el-table-column label="序号" align="center" prop="index" width="50"/>
<el-table-column label="产品名称" prop="productName">
<template slot-scope="scope">
<el-input v-model="scope.row.productName" placeholder="请输入产品名称" />
</template>
</el-table-column>
<el-table-column label="问题" prop="question">
<template slot-scope="scope">
<el-input v-model="scope.row.question" placeholder="请输入问题" />
......@@ -56,21 +50,7 @@
<el-input v-model="scope.row.answer" placeholder="请输入常见问题回答" />
</template>
</el-table-column>
<el-table-column label="创建时间" prop="createTime">
<template slot-scope="scope">
<el-input v-model="scope.row.createTime" placeholder="请输入创建时间" />
</template>
</el-table-column>
<el-table-column label="创建用户" prop="createUserId">
<template slot-scope="scope">
<el-input v-model="scope.row.createUserId" placeholder="请输入创建用户" />
</template>
</el-table-column>
<el-table-column label="修改时间" prop="updateTime">
<template slot-scope="scope">
<el-input v-model="scope.row.updateTime" placeholder="请输入修改时间" />
</template>
</el-table-column>
</el-table>
<form-buttons @submit='submitForm' v-if="pageInfo.type!='view'" noCancelBtn />
......
package com.mortals.xhx.module.product.web;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
import com.mortals.xhx.base.system.param.service.ParamService;
import com.mortals.xhx.common.code.YesNoEnum;
import com.mortals.xhx.module.category.model.CategoryQuery;
import com.mortals.xhx.module.category.service.CategoryService;
import com.mortals.xhx.module.company.model.CompanyProductQuery;
import com.mortals.xhx.module.company.model.CompanyQuery;
import com.mortals.xhx.module.company.service.CompanyProductService;
import com.mortals.xhx.module.company.service.CompanyService;
import com.mortals.xhx.module.product.model.ProductCategoryQuery;
import com.mortals.xhx.module.product.service.ProductCategoryService;
import org.checkerframework.checker.units.qual.A;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -57,6 +61,9 @@ public class ProductController extends BaseCRUDJsonBodyMappingController<Product
@Autowired
private CompanyService companyService;
@Autowired
private CompanyProductService companyProductService;
public ProductController() {
super.setModuleDesc("产品");
}
......@@ -69,5 +76,12 @@ public class ProductController extends BaseCRUDJsonBodyMappingController<Product
super.init(model, context);
}
@Override
protected int editAfter(Long id, Map<String, Object> model, ProductEntity entity, Context context) throws AppException {
String categoryIds = productCategoryService.find(new ProductCategoryQuery().productId(entity.getId())).stream().map(i -> i.getCategoryId().toString()).collect(Collectors.joining(","));
String companyIds = companyProductService.find(new CompanyProductQuery().productId(entity.getId())).stream().map(i -> i.getProductId().toString()).collect(Collectors.joining(","));
entity.setCompanyId(companyIds);
entity.setCategoryId(categoryIds);
return super.editAfter(id, model, entity, context);
}
}
\ No newline at end of file
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