This commit is contained in:
chenjiajun
2020-11-15 21:04:44 +08:00
parent 2ce24c8a2d
commit c2a7d375ec
6 changed files with 52 additions and 37 deletions

View File

@ -3,7 +3,7 @@
<el-form ref="form" :model="form" :rules="rules" :inline="true" size="small" label-width="140px">
<el-col :span="24">
<el-form-item label="选择商品:" prop="good">
<cgood v-model="form1.good":disabled="true" ></cgood>
<cgood v-model="form1.good" :disabled="true" ></cgood>
</el-form-item>
</el-col>
<el-form-item label="砍价名称">
@ -121,6 +121,11 @@ export default {
}
},
form: {
//that.form.minPrice = 0
//that.form.num = 1
//that.form.bargainMaxPrice = 0
//that.form.bargainMinPrice = 0
//that.form.bargainNum = 1
id: '',
productId: '',
title: '',
@ -135,14 +140,14 @@ export default {
stopTime: '',
storeName: '',
price: '',
minPrice: '',
num: '',
bargainMaxPrice: '',
bargainMinPrice: '',
bargainNum: '',
minPrice: 0,
num: 1,
bargainMaxPrice: 0,
bargainMinPrice: 0,
bargainNum: 1,
status: 1,
description: '',
giveIntegral: '',
giveIntegral: 0,
info: '',
cost: '',
sort: 0,
@ -164,12 +169,13 @@ export default {
},
watch: {
'form.imageArr': function(val) {
if (val) {
if (val && Array.isArray(val)) {
this.form.image = val.join(',')
}
},
'form.sliderImageArr': function(val) {
if (val) {
console.log("aaa:"+val)
if (val && Array.isArray(val)) {
this.form.images = val.join(',')
}
},
@ -186,10 +192,13 @@ export default {
let that = this;
getInfo(id).then(async res => {
let data = res.productInfo;
console.log('data:'+data)
console.info('data:'+JSON.stringify(data))
if(data){
let cate_id = parseInt(data.cate_id) || 0;
that.form = data;
//that.form = data;
Object.keys(that.form).forEach(key=>{
if(data[key]) that.form[key] = data[key];
})
that.form.productId = data.id
that.form.cate_id = cate_id;
that.form.title = data.store_name
@ -198,11 +207,11 @@ export default {
that.form.imageArr = data.image
that.form.sliderImageArr = data.slider_image
that.form.status = 1
that.form.minPrice = 0
that.form.num = 1
that.form.bargainMaxPrice = 0
that.form.bargainMinPrice = 0
that.form.bargainNum = 1
//that.form.minPrice = 0
//that.form.num = 1
//that.form.bargainMaxPrice = 0
//that.form.bargainMinPrice = 0
//that.form.bargainNum = 1
}
that.templateList = res.tempList;

View File

@ -69,7 +69,7 @@
</el-col>
<el-col :span="24">
<el-form-item label="拼团人数" prop="people">
<el-input-number v-model="formValidate.people" />
<el-input-number :min="1" :max="99" v-model="formValidate.people" />
</el-form-item>
</el-col>
@ -258,10 +258,10 @@ export default {
sliderImageArr: [],
title: '',
attr: '',
people: '1',
people: 1,
info: '',
price: '',
sort: '',
sort: 0,
sales: '',
stock: '',
addTime: '',
@ -274,7 +274,7 @@ export default {
description: '',
startTime: '',
stopTime: '',
effectiveTime: '',
effectiveTime: 1,
cost: '',
unitName: '',
combination: 1,
@ -376,7 +376,7 @@ export default {
// },
'formValidate.slider_image': function(val) {
if (val) {
if (val && Array.isArray(val)) {
this.formValidate.images = val.join(',')
}
},
@ -510,15 +510,18 @@ export default {
let data = res.productInfo;
if(data){
that.attrs = data.items || [];
that.formValidate = data;
//that.formValidate = data;
Object.keys(that.formValidate).forEach(key=>{
if(data[key]) that.formValidate[key] = data[key];
})
that.formValidate.id = 0;
that.formValidate.productId = id
that.formValidate.title = data.store_name
that.formValidate.info = data.store_info
that.formValidate.unitName = data.unit_name
that.formValidate.isShow = 1
that.formValidate.people = 1
that.formValidate.effectiveTime = 1
// that.formValidate.people = 0
// that.formValidate.effectiveTime = 0
that.oneFormValidate = [data.attr];
that.formValidate.header = [];
that.generate(null);

View File

@ -65,7 +65,7 @@
</el-col>
<el-col :span="24">
<el-form-item label="产品轮播图">
<MaterialList v-model="formValidate.sliderImageArr" style="width: 500px" type="image" :num="4" :width="150" :height="150" />
<MaterialList v-model="formValidate.slider_image" style="width: 500px" type="image" :num="4" :width="150" :height="150" />
</el-form-item>
</el-col>
<el-col :span="24">
@ -252,10 +252,11 @@ export default {
}
},
formValidate: {
slider_image: [],
otPrice: '',
giveIntegral: '',
status: '',
num: '',
num: 1,
id: 0,
timeId: null,
seckillId: 0,
@ -270,7 +271,7 @@ export default {
people: '',
info: '',
price: '',
sort: '',
sort: 0,
sales: '',
stock: '',
addTime: '',
@ -279,7 +280,7 @@ export default {
isDel: 0,
merUse: '',
isPostage: '',
postage: '',
postage: 0,
description: '',
startTime: '',
stopTime: '',
@ -377,7 +378,7 @@ export default {
watch: {
'formValidate.slider_image': function(val) {
if (val) {
if (val && Array.isArray(val)) {
this.formValidate.images = val.join(',')
}
},
@ -515,7 +516,10 @@ export default {
if(data){
let cate_id = parseInt(data.cate_id) || 0;
that.attrs = data.items || [];
that.formValidate = data;
//that.formValidate = data;
Object.keys(that.formValidate).forEach(key=>{
if(data[key]) that.formValidate[key] = data[key];
})
that.formValidate.id = 0;
that.formValidate.productId = id
that.formValidate.cate_id = cate_id;
@ -523,9 +527,9 @@ export default {
that.formValidate.title = data.store_name
that.formValidate.info = data.store_info
that.formValidate.unitName = data.unit_name
that.formValidate.sliderImageArr = data.slider_image
//that.formValidate.sliderImageArr = data.slider_image
that.formValidate.status = 1
that.formValidate.num = 1
//that.formValidate.num = 1
that.formValidate.header = [];
that.generate(null);
that.manyFormValidate = data.attrs;

View File

@ -41,9 +41,8 @@ export default {
}
},
mounted() {
// console.log(222)
console.log(this.value)
this.editor = new E(this.$refs.editor)
this.editor.customConfig = this.editor.customConfig ? this.editor.customConfig : this.editor.config
this.editor.customConfig.uploadImgShowBase64 = true // 使用 base64 保存图片
// 不可修改
this.editor.customConfig.uploadImgHeaders = this.headers

View File

@ -664,7 +664,7 @@
orderNum += 1;
orderPrice += item.totalPrice;
storeNum += item.totalNum;
user.push(item.userDTO.account);
user.push(item.userDTO.nickname);
})
user = Array.from(new Set(user));
this.caculateInfo = {

View File

@ -1,6 +1,6 @@
<template>
<el-form ref="form" :model="form" :rules="rules" style="margin-top: 6px;" size="small" label-width="100px">
<el-form-item label="appID" prop="appID">
<el-form-item label="appId" prop="appId">
<el-input v-model="form.appId" style="width: 40%" />
<span style="color: #C0C0C0;margin-left: 10px;">应用APPID,收款账号既是APPID对应支付宝账号</span>
</el-form-item>
@ -39,7 +39,7 @@ export default {
loading: false,
form: { appId: '', sysServiceProviderId: '', privateKey: '', publicKey: '', returnUrl: '', notifyUrl: '' },
rules: {
appID: [
appId: [
{ required: true, message: '请输入appID', trigger: 'blur' }
],
sysServiceProviderId: [