|
@@ -13,32 +13,24 @@
|
|
<div class="form-container" v-show="step == 0">
|
|
<div class="form-container" v-show="step == 0">
|
|
<div class="title">基础信息</div>
|
|
<div class="title">基础信息</div>
|
|
<el-form ref="step1Form" :model="step1Form" :rules="step1FormRules" label-width="120px">
|
|
<el-form ref="step1Form" :model="step1Form" :rules="step1FormRules" label-width="120px">
|
|
- <el-form-item label="品牌:" prop="brand">
|
|
|
|
- <el-select v-model="step1Form.brand" value-key="id" placeholder="请选择">
|
|
|
|
- <el-option
|
|
|
|
- v-for="item in brandList"
|
|
|
|
- :key="item.id"
|
|
|
|
- :label="item.brandName"
|
|
|
|
- :value="item">
|
|
|
|
- </el-option>
|
|
|
|
- </el-select>
|
|
|
|
- </el-form-item>
|
|
|
|
- <el-form-item label="工单类型:" prop="orderSmallType">
|
|
|
|
- <el-select v-model="step1Form.orderSmallType" placeholder="请选择">
|
|
|
|
- <el-option
|
|
|
|
- v-for="item in orderTypeList"
|
|
|
|
- :key="item.id"
|
|
|
|
- :label="item.orderSmallTypeText"
|
|
|
|
- :value="item.id">
|
|
|
|
- </el-option>
|
|
|
|
- </el-select>
|
|
|
|
- </el-form-item>
|
|
|
|
- <el-form-item label="是否虚拟商品:" prop="isVr">
|
|
|
|
- <el-radio-group v-model="step1Form.isVr">
|
|
|
|
- <el-radio :label="true">是</el-radio>
|
|
|
|
- <el-radio :label="false">否</el-radio>
|
|
|
|
- </el-radio-group>
|
|
|
|
- </el-form-item>
|
|
|
|
|
|
+ <el-form-item label="品牌:" prop="brand">
|
|
|
|
+ <el-select v-model="step1Form.brand" value-key="id" placeholder="请选择">
|
|
|
|
+ <el-option v-for="item in brandList" :key="item.id" :label="item.brandName" :value="item">
|
|
|
|
+ </el-option>
|
|
|
|
+ </el-select>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item label="工单类型:" prop="orderSmallType">
|
|
|
|
+ <el-select v-model="step1Form.orderSmallType" placeholder="请选择">
|
|
|
|
+ <el-option v-for="item in orderTypeList" :key="item.id" :label="item.orderSmallTypeText" :value="item.id">
|
|
|
|
+ </el-option>
|
|
|
|
+ </el-select>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item label="是否虚拟商品:" prop="isVr">
|
|
|
|
+ <el-radio-group v-model="step1Form.isVr">
|
|
|
|
+ <el-radio :label="true">是</el-radio>
|
|
|
|
+ <el-radio :label="false">否</el-radio>
|
|
|
|
+ </el-radio-group>
|
|
|
|
+ </el-form-item>
|
|
<el-form-item label="商品名称:" prop="goodsName">
|
|
<el-form-item label="商品名称:" prop="goodsName">
|
|
<el-input v-model="step1Form.goodsName" placeholder="请输入商品名称" maxlength="200" show-word-limit></el-input>
|
|
<el-input v-model="step1Form.goodsName" placeholder="请输入商品名称" maxlength="200" show-word-limit></el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
@@ -57,10 +49,10 @@
|
|
</div>
|
|
</div>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item label="轮播图:" prop="images">
|
|
<el-form-item label="轮播图:" prop="images">
|
|
- <el-upload v-if="showImageListUpload2" multiple :limit="6" ref="imageListUpload2" class="avatar-uploader2 imageListUpload2"
|
|
|
|
- style="height: 0;" :action="baseURL + 'common/upload'" :headers="myHeaders" name="file"
|
|
|
|
- :show-file-list="false" :on-success="uploadSuccess2" :on-exceed="uploadExceed2"
|
|
|
|
- :before-upload="beforeUpload2">
|
|
|
|
|
|
+ <el-upload v-if="showImageListUpload2" multiple :limit="6" ref="imageListUpload2"
|
|
|
|
+ class="avatar-uploader2 imageListUpload2" style="height: 0;" :action="baseURL + 'common/upload'"
|
|
|
|
+ :headers="myHeaders" name="file" :show-file-list="false" :on-success="uploadSuccess2"
|
|
|
|
+ :on-exceed="uploadExceed2" :before-upload="beforeUpload2">
|
|
</el-upload>
|
|
</el-upload>
|
|
<div class="images">
|
|
<div class="images">
|
|
<div class="item" v-for="(item, index) in step1Form.images" :key="index">
|
|
<div class="item" v-for="(item, index) in step1Form.images" :key="index">
|
|
@@ -411,7 +403,7 @@ import { quillEditor } from 'vue-quill-editor'
|
|
import 'quill/dist/quill.core.css'
|
|
import 'quill/dist/quill.core.css'
|
|
import 'quill/dist/quill.snow.css'
|
|
import 'quill/dist/quill.snow.css'
|
|
import 'quill/dist/quill.bubble.css'
|
|
import 'quill/dist/quill.bubble.css'
|
|
-
|
|
|
|
|
|
+import { EventBus } from '@/utils/eventBus'
|
|
// 工具栏配置
|
|
// 工具栏配置
|
|
const toolbarOptions = [
|
|
const toolbarOptions = [
|
|
['bold', 'italic', 'underline', 'strike'],
|
|
['bold', 'italic', 'underline', 'strike'],
|
|
@@ -452,9 +444,9 @@ export default {
|
|
marketing: '',
|
|
marketing: '',
|
|
attrs: [],
|
|
attrs: [],
|
|
tags: [],
|
|
tags: [],
|
|
- isVr: false,
|
|
|
|
- orderSmallType: '',
|
|
|
|
- brand: {},
|
|
|
|
|
|
+ isVr: false,
|
|
|
|
+ orderSmallType: '',
|
|
|
|
+ brand: {},
|
|
// logoUrl: '',
|
|
// logoUrl: '',
|
|
// showDate: [],
|
|
// showDate: [],
|
|
},
|
|
},
|
|
@@ -471,23 +463,23 @@ export default {
|
|
classify: [
|
|
classify: [
|
|
{ required: true, message: '请选择商品分类', trigger: 'change' }
|
|
{ required: true, message: '请选择商品分类', trigger: 'change' }
|
|
],
|
|
],
|
|
- brand: [
|
|
|
|
|
|
+ brand: [
|
|
{ required: true, message: '请选择品牌', trigger: 'change' }
|
|
{ required: true, message: '请选择品牌', trigger: 'change' }
|
|
],
|
|
],
|
|
- orderSmallType: [
|
|
|
|
- { required: true, message: '请选择工单类型', trigger: 'change' }
|
|
|
|
- ],
|
|
|
|
- isVr: [
|
|
|
|
- { required: true, message: '请选择是否虚拟商品', trigger: 'change' }
|
|
|
|
- ]
|
|
|
|
|
|
+ orderSmallType: [
|
|
|
|
+ { required: true, message: '请选择工单类型', trigger: 'change' }
|
|
|
|
+ ],
|
|
|
|
+ isVr: [
|
|
|
|
+ { required: true, message: '请选择是否虚拟商品', trigger: 'change' }
|
|
|
|
+ ]
|
|
},
|
|
},
|
|
imagesList: [], // 图片墙展示列表
|
|
imagesList: [], // 图片墙展示列表
|
|
|
|
|
|
classifyList: [],
|
|
classifyList: [],
|
|
freightList: [],
|
|
freightList: [],
|
|
moduleList: [],
|
|
moduleList: [],
|
|
- orderTypeList: [],
|
|
|
|
- brandList: [],
|
|
|
|
|
|
+ orderTypeList: [],
|
|
|
|
+ brandList: [],
|
|
|
|
|
|
step2Form: {
|
|
step2Form: {
|
|
specType: true,
|
|
specType: true,
|
|
@@ -612,8 +604,8 @@ export default {
|
|
|
|
|
|
this.getFreightList();
|
|
this.getFreightList();
|
|
this.getModuleList();
|
|
this.getModuleList();
|
|
- this.getTypeList()
|
|
|
|
- this.getBrand()
|
|
|
|
|
|
+ this.getTypeList()
|
|
|
|
+ this.getBrand()
|
|
|
|
|
|
if (this.isEdit) {
|
|
if (this.isEdit) {
|
|
this.canCompute = false;
|
|
this.canCompute = false;
|
|
@@ -640,18 +632,18 @@ export default {
|
|
})
|
|
})
|
|
})
|
|
})
|
|
},
|
|
},
|
|
-
|
|
|
|
- getTypeList(){
|
|
|
|
- getTypeList({pageNum: 1,pageSize: -1,params: [{param: 'a.order_type',compare: '=',value: 'INSTALL'},{param: 'a.status',compare: '=',value: true}]}).then(res => {
|
|
|
|
- this.orderTypeList = res.data.records
|
|
|
|
- })
|
|
|
|
- },
|
|
|
|
- getBrand(){
|
|
|
|
- getBrand().then(res => {
|
|
|
|
- this.brandList = res.data
|
|
|
|
- })
|
|
|
|
- },
|
|
|
|
-
|
|
|
|
|
|
+
|
|
|
|
+ getTypeList() {
|
|
|
|
+ getTypeList({ pageNum: 1, pageSize: -1, params: [{ param: 'a.order_type', compare: '=', value: 'INSTALL' }, { param: 'a.status', compare: '=', value: true }] }).then(res => {
|
|
|
|
+ this.orderTypeList = res.data.records
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ getBrand() {
|
|
|
|
+ getBrand().then(res => {
|
|
|
|
+ this.brandList = res.data
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+
|
|
// getMarketingList() {
|
|
// getMarketingList() {
|
|
// let classifyList = this.classifyList;
|
|
// let classifyList = this.classifyList;
|
|
// let categoryId = '';
|
|
// let categoryId = '';
|
|
@@ -733,9 +725,9 @@ export default {
|
|
marketing: data.marketingId,
|
|
marketing: data.marketingId,
|
|
attrs: data.tags,
|
|
attrs: data.tags,
|
|
tags: data.tagsLabel,
|
|
tags: data.tagsLabel,
|
|
- brand: {id: data.brandId,brandName: data.brandName},
|
|
|
|
- isVr: data.isVr,
|
|
|
|
- orderSmallType: data.orderSmallType
|
|
|
|
|
|
+ brand: { id: data.brandId, brandName: data.brandName },
|
|
|
|
+ isVr: data.isVr,
|
|
|
|
+ orderSmallType: data.orderSmallType
|
|
// logoUrl: data.logo,
|
|
// logoUrl: data.logo,
|
|
// showDate: data.logoStartTime ? [data.logoStartTime.slice(0, 10), data.logoEndTime.slice(0, 10)] : [],
|
|
// showDate: data.logoStartTime ? [data.logoStartTime.slice(0, 10), data.logoEndTime.slice(0, 10)] : [],
|
|
}
|
|
}
|
|
@@ -1018,11 +1010,11 @@ export default {
|
|
|
|
|
|
templateId: this.step3Form.moduleId,
|
|
templateId: this.step3Form.moduleId,
|
|
content: this.step3Form.detailContent,
|
|
content: this.step3Form.detailContent,
|
|
-
|
|
|
|
- isVr: this.step1Form.isVr,
|
|
|
|
- orderSmallType: this.step1Form.orderSmallType,
|
|
|
|
- brandId: this.step1Form.brand.id,
|
|
|
|
- brandName: this.step1Form.brand.brandName,
|
|
|
|
|
|
+
|
|
|
|
+ isVr: this.step1Form.isVr,
|
|
|
|
+ orderSmallType: this.step1Form.orderSmallType,
|
|
|
|
+ brandId: this.step1Form.brand.id,
|
|
|
|
+ brandName: this.step1Form.brand.brandName,
|
|
}
|
|
}
|
|
console.log(params);
|
|
console.log(params);
|
|
|
|
|
|
@@ -1054,6 +1046,7 @@ export default {
|
|
|
|
|
|
goBack() {
|
|
goBack() {
|
|
this.$router.go(-1);
|
|
this.$router.go(-1);
|
|
|
|
+ EventBus.$emit("updateGoodsListPage")
|
|
// this.$store.dispatch("tagsView/delView", this.$route);
|
|
// this.$store.dispatch("tagsView/delView", this.$route);
|
|
},
|
|
},
|
|
|
|
|
|
@@ -1182,15 +1175,15 @@ export default {
|
|
|
|
|
|
// 轮播图 - 点击上传图片
|
|
// 轮播图 - 点击上传图片
|
|
uploadImage(id) {
|
|
uploadImage(id) {
|
|
- if(this.step1Form.images.length>=6){
|
|
|
|
|
|
+ if (this.step1Form.images.length >= 6) {
|
|
this.$errorMsg('最多上传6张轮播图');
|
|
this.$errorMsg('最多上传6张轮播图');
|
|
- return
|
|
|
|
|
|
+ return
|
|
}
|
|
}
|
|
|
|
|
|
this.showImageListUpload2 = false
|
|
this.showImageListUpload2 = false
|
|
- this.$nextTick(()=>{
|
|
|
|
|
|
+ this.$nextTick(() => {
|
|
this.showImageListUpload2 = true
|
|
this.showImageListUpload2 = true
|
|
- this.$nextTick(()=>{
|
|
|
|
|
|
+ this.$nextTick(() => {
|
|
this.uploadImageId = id;
|
|
this.uploadImageId = id;
|
|
document.querySelector('.imageListUpload2 input').click();
|
|
document.querySelector('.imageListUpload2 input').click();
|
|
})
|
|
})
|