Commit 007e7a44 authored by 黄奎's avatar 黄奎

页面修改

parent a5bca78c
......@@ -204,21 +204,20 @@
<div class="The-price" v-show="currentUserInfo.TenantId == 27&&addMsg.RelevanceList.length>0">
<div class="The-price-box price-top" style="width: 300px">
<div class="price-top">
绑定的物品名称
绑定的物品名称
</div>
<div class="price-righ">
价格
价格
</div>
</div>
<div class="The-price-box" v-for="(item, index) in addMsg.RelevanceList" :key="index">
<!-- <div > -->
<!-- <el-tag type="success" style="margin-right:10px;"
v-for="(item, index) in addMsg.CategoryList" :key="index+'1'" >{{ item.CategoryName }}
</el-tag> -->
<div class="fonsizi" >
{{item.RelevanceName}}
</div>
<div class="price-righ" ><el-input :disabled="true" size="small" v-model="item.RelevancePrice" placeholder="请输入价格"><template slot='append'>元 套</template></el-input></div>
<div class="fonsizi">
{{item.RelevanceName}}
</div>
<div class="price-righ">
<el-input :disabled="true" size="small" v-model="item.RelevancePrice" placeholder="请输入价格">
<template slot='append'>元 套</template></el-input>
</div>
</div>
</div>
</el-col>
......@@ -317,6 +316,17 @@
style="width: 94px;margin: 0px 16px;"></el-input>
<el-checkbox @change="CheckBox" v-show="index == 0" v-model="item.EnabledImage"
:true-label="1" :false-label="2">规格图片</el-checkbox>
<el-checkbox v-show="index == 0" v-model="item.IsDateFormat" :true-label="1"
:false-label="0">日期类型</el-checkbox>
<template v-if="item.IsDateFormat==1">
&nbsp;<el-date-picker size="small" v-model="item.StartDate" value-format="yyyy-MM-dd"
type="date" placeholder="开始日期" @change="changeSpecDate(item,index)"
style="width:129px;">
</el-date-picker>&nbsp;
<el-date-picker size="small" v-model="item.EndDate" value-format="yyyy-MM-dd" type="date"
placeholder="结束日期" @change="changeSpecDate(item,index)" style="width:129px;">
</el-date-picker>
</template>
<div style="margin-left: auto; line-height: 1;">
<div @click="DeleteggModule(item, index)" class="el-image del-img">
<img src="../../assets/img/userman/del1.png" class="el-image__inner" />
......@@ -387,13 +397,13 @@
</el-form-item>
</div>
<el-table ref="table" :data="SpecificationPriceList" border style="width: 100%"
@selection-change="TbaleSelectionChange">
@selection-change="TbaleSelectionChange" max-height="450">
<el-table-column type="selection" width="55">
</el-table-column>
<template v-for="(item, index) in SpecificationList">
<el-table-column :key="index+'5'" :label="item.Name">
<template slot-scope="scope">
<span v-if="index == index2" v-for="(item2, index2) in scope.row.AttrList"
<span v-for="(item2, index2) in scope.row.AttrList" v-if="index == index2"
:key="index2+'6'">
{{ scope.row.AttrList[index2].SVName }}
</span>
......@@ -627,14 +637,12 @@
<el-form-item label="赠送日期" v-if="FxState==1 && giveDate==true">
<el-input v-model="addMsg.PresentFXMonth" style="width:100%;margin-left:15px" type="number" min="1"
size="small" placeholder="请输入内容" class="input-with-select">
<el-button slot="append">
</el-button>
</el-input>
</el-form-item>
<el-form-item label="广告词">
<el-input v-model="addMsg.Advertising" style="width:100%;margin-left:15px" type="textarea" :rows="3"
size="small" placeholder="请输入内容" class="input-with-select"></el-input>
</el-form-item>
......@@ -800,7 +808,7 @@
<template v-for="(item, index) in SpecificationList">
<el-table-column :key="index+'13'" :label="item.Name" width="100">
<template slot-scope="scope">
<span v-if="index == index2" v-for="(item2, index2) in scope.row.AttrList" :key="index2+'14'">
<span v-for="(item2, index2) in scope.row.AttrList" v-if="index == index2" :key="index2+'14'">
{{ scope.row.AttrList[index2].SVName }}
</span>
</template>
......@@ -918,7 +926,7 @@
<template v-for="(item, index) in SpecificationList">
<el-table-column :key="index+'16'" :label="item.Name" width="100">
<template slot-scope="scope">
<span v-if="index == index2" v-for="(item2, index2) in scope.row.AttrList" :key="index2+'17'">
<span v-for="(item2, index2) in scope.row.AttrList" v-if="index == index2" :key="index2+'17'">
{{ scope.row.AttrList[index2].SVName }}
</span>
</template>
......@@ -1065,8 +1073,8 @@
<el-radio @change="YfSelect1" style="padding-bottom:10px" class="yfradio" :label="1">
教育表单
</el-radio>
<el-radio @change="YfSelect1" v-for="(option, key) in customFormList" :key="key" :label="option.Id" class="yfradio" style="padding-bottom:10px">{{ option.FormName }}</el-radio>
<el-radio @change="YfSelect1" v-for="(option, key) in customFormList" :key="key" :label="option.Id"
class="yfradio" style="padding-bottom:10px">{{ option.FormName }}</el-radio>
</el-radio-group>
</div>
<span slot="footer" class="dialog-footer">
......@@ -1126,9 +1134,9 @@
},
data() {
return {
input:'',
input: '',
ComTreeList: [],
customFormList:[],
customFormList: [],
thisType: 0,
tableData: [],
SpecificationList: [],
......@@ -1138,7 +1146,6 @@
SpecificationValueList: [],
speciDig: false,
speciList: [],
val2: "",
defaultMsg: "",
config: {
initialFrameWidth: null,
......@@ -1156,7 +1163,7 @@
activeName: "first",
flDig: false,
addMsg: {
RelevanceList:[],//新增绑定商品
RelevanceList: [], //新增绑定商品
Id: 0,
CategoryList: [],
Name: "",
......@@ -1308,7 +1315,6 @@
pusetVal: "",
pusetList: [],
ptinput: "",
fxVal: "",
gradeVal: "",
xxVal: "",
......@@ -1367,7 +1373,6 @@
} else {
this.getTree();
}
if (this.currentUserInfo.IsOpenSchool == 0) {
this.isShowPlat = false
} else {
......@@ -1475,23 +1480,16 @@
}
});
},
getCustomFormList() {
let msg = {
FormType:0,
FormName:"",
FormType: 0,
FormName: "",
};
this.apipost("/api/CustomForm/GetCustomFormList", msg, res => {
this.loading = false;
if (res.data.resultCode == 1) {
this.customFormList=res.data.data;
console.log("getCustomFormList", this.customFormList);
this.customFormList = res.data.data;
}
// var newList= { Id:'1', FormName:'教育表单'}
// this.customFormList.unshift(newList)
// var newList= { Id:'0', FormName:'默认商城'}
// this.customFormList.unshift(newList)
});
},
TbaleSelectionChange3(val) {
......@@ -1627,7 +1625,7 @@
changeSpeciList(val, index) {
this.$forceUpdate();
},
// 添加规格模板
//添加规格项目
addggxm() {
let that = this;
let obj = {
......@@ -1636,12 +1634,78 @@
Sort: that.SpecificationList.length > 0 ? that.SpecificationList[that.SpecificationList.length - 1].Sort +
1 : that.SpecificationList.length + 1,
Id: 0,
EnabledImage: 2
EnabledImage: 2,
IsDateFormat: 0, //默认0,1-是,是日期格式,方便后面转换成日期
StartDate: "", //开始时间
EndDate: "", //结束时间
};
this.SpecificationList.push(obj);
},
// 添加规格值
addGgz(item, index) {
changeSpecDate(item, index) {
if (item.StartDate && item.EndDate && item.StartDate != '' && item.EndDate != '') {
var isGreaterThan = this.compareDates(item.StartDate, item.EndDate);
if (isGreaterThan > 0) {
this.Error('开始日期不能大于结束日期!');
return;
}
var dayNum = this.getDaysBetweenDates(item.StartDate, item.EndDate);
if (dayNum >= 0) {
for (var i = 0; i <= dayNum; i++) {
var strDay = this.AddDay(item.StartDate, i);
this.addGgz(item, index, strDay);
}
//重新计算SKU
this.ggzChange()
}
}
},
AddDay(dateTemp, days) {
var dateTemp = dateTemp.split("-");
var nDate = new Date(dateTemp[1] + '-' + dateTemp[2] + '-' + dateTemp[0]); //转换为MM-DD-YYYY格式
var millSeconds = Math.abs(nDate) + (days * 24 * 60 * 60 * 1000);
var rDate = new Date(millSeconds);
var year = rDate.getFullYear();
var month = rDate.getMonth() + 1;
if (month < 10) month = "0" + month;
var date = rDate.getDate();
if (date < 10) date = "0" + date;
return (year + "-" + month + "-" + date);
},
//返回天数
getDaysBetweenDates(startDateString, endDateString) {
var startDate = new Date(startDateString); // 将起始日期字符串转换为Date对象
var endDate = new Date(endDateString); // 将结束日期字符串转换为Date对象
// 计算时间差(单位:毫秒)
var timeDiff = Math.abs(endDate - startDate);
// 将时间差转换成天数并返回
return Math.ceil(timeDiff / (1000 * 3600 * 24));
},
//两个日期比较
compareDates(startDateString, endDateString) {
var date1 = new Date(startDateString);
var date2 = new Date(endDateString);
if (date1.getFullYear() < date2.getFullYear()) {
return -1;
} else if (date1.getFullYear() > date2.getFullYear()) {
return 1;
} else {
if (date1.getMonth() < date2.getMonth()) {
return -1;
} else if (date1.getMonth() > date2.getMonth()) {
return 1;
} else {
if (date1.getDate() < date2.getDate()) {
return -1;
} else if (date1.getDate() > date2.getDate()) {
return 1;
} else {
return 0;
}
}
}
},
//添加规格值
addGgz(item, index, Name) {
let obj = {
Id: 0,
Image: "",
......@@ -1649,6 +1713,9 @@
Sort: item.SpecificationValueList.length > 0 ? item.SpecificationValueList[item.SpecificationValueList
.length - 1].Sort + 1 : item.SpecificationValueList.length + 1
};
if (Name && Name != '') {
obj.Name = Name;
}
this.SpecificationList[index].SpecificationValueList.push(obj);
},
// 修改规格值
......@@ -1961,7 +2028,6 @@
this.addMsg.MarketingLogo.wordsColor = '';
this.addMsg.MarketingLogo.wordsBack = '';
}
this.addMsg.EmpId = this.currentUserInfo.EmpId
this.apipost("/api/product/SetProductGoodsInfo", this.addMsg, res => {
if (res.data.resultCode == 1) {
......@@ -2032,23 +2098,19 @@
this.AreaList = data;
},
YfSelect1(val) {
console.log("formId",val);
this.addMsg.FormsId = val;
if (this.addMsg.FormsId == 0) {
this.addMsg.FormsName = '默认商城'
} else if (this.addMsg.FormsId == 1) {
this.addMsg.FormsName = '教育表单'
} else if (this.addMsg.FormsId > 1) {
this.customFormList.forEach(item => {
if (this.addMsg.FormsId == item.Id) {
this.addMsg.FormsName = item.FormName
}
});
}
else if (this.addMsg.FormsId > 1) {
this.customFormList.forEach(item => {
if( this.addMsg.FormsId==item.Id){
this.addMsg.FormsName = item.FormName
}
});
}
this.$forceUpdate()
},
YfSelect(val) {
this.addMsg.FreightId = val.ID;
......@@ -2204,7 +2266,6 @@
this.addMsg = res.data.data;
if (this.addMsg.SupplierId != 0) {
this.SupplierId = this.addMsg.SupplierId;
}
if (!this.$route.query.GoodsId) {
this.addMsg.Id = 0
......@@ -2233,15 +2294,12 @@
this.addMsg.FormsName = '默认商城'
} else if (this.addMsg.FormsId == 1) {
this.addMsg.FormsName = '教育表单'
}
else if (this.addMsg.FormsId > 1) {
} else if (this.addMsg.FormsId > 1) {
this.customFormList.forEach(item => {
console.log("item",item);
if(this.val1==item.Id){
this.addMsg.FormsName = item.FormName
}
});
if (this.val1 == item.Id) {
this.addMsg.FormsName = item.FormName
}
});
}
this.memberList2 = this.addMsg.MemberPriceTreeList;
this.thisType = 1;
......@@ -2252,7 +2310,6 @@
};
this.disList1.push(objNew);
if (this.addMsg.GoodsDetails && this.addMsg.GoodsDetails != "") {
// this.$refs.ue.SetVal(this.addMsg.GoodsDetails);
this.defaultMsg = this.addMsg.GoodsDetails;
}
this.NewCategoryList = [];
......@@ -2266,7 +2323,6 @@
if (this.addMsg.PresentFXGrade == 0) {
this.addMsg.PresentFXGrade = ''
}
this.getSuggestPrice();
this.getFXDGradeList2();
this.getTree();
......@@ -2430,8 +2486,6 @@
let data = res.data.data;
let List = [];
data.forEach(x => {
let obj = {};
// if(x.IsGuest !=1){
if (x.IsGuest == 3) { //只显示vip
let obj = x
List.push(obj)
......@@ -2443,12 +2497,10 @@
});
},
getFXDGradeList2() {
this.apipost("/api/user/GetFXDistributorGradeList", {
GradeName: ''
}, res => {
if (res.data.resultCode == 1) {
if (res.data.data != null) {
res.data.data.forEach(x => {
if (x.Id == this.addMsg.PresentFXGrade) {
......@@ -2463,7 +2515,6 @@
}
}
});
},
changeVIP() {
if (this.addMsg.PresentFXGrade == '' || this.addMsg.PresentFXGrade == 0) {
......@@ -2472,17 +2523,6 @@
} else {
this.giveDate = true;
}
// this.FXlevelList.forEach(x=>{
// if(x.Id== this.addMsg.PresentFXGrade){
// if(x.IsGuest==3){
// this.giveDate=true;
// this.addMsg.PresentFXMonth=1;
// }else{
// this.giveDate=false;
// this.addMsg.PresentFXMonth=0;
// }
// }
// })
},
//获取上架版面下拉
getCateList() {
......@@ -2506,30 +2546,35 @@
</script>
<style>
.fonsizi{
height: auto;
word-wrap: break-word; /*强制换行*/
overflow: hidden; /*超出隐藏*/
text-overflow: ellipsis;/*隐藏后添加省略号*/
white-space: nowrap;
width: 260px;
}
.The-price{
margin-left: 70px;
}
.The-price-box{
display: flex;
justify-content: space-between;
width: 545px;
align-items: center;
}
.price-top{
margin-bottom: 10px;
}
.price-righ{
}
.fonsizi {
height: auto;
word-wrap: break-word;
/*强制换行*/
overflow: hidden;
/*超出隐藏*/
text-overflow: ellipsis;
/*隐藏后添加省略号*/
white-space: nowrap;
width: 260px;
}
.The-price {
margin-left: 70px;
}
.The-price-box {
display: flex;
justify-content: space-between;
width: 545px;
align-items: center;
}
.price-top {
margin-bottom: 10px;
}
.price-righ {}
.app-attr-group .close {
position: absolute;
top: -4px;
......
......@@ -289,7 +289,7 @@
},
mounted() {
if (!this.isOnline()) {
this.msg.Account = "18140042327";
this.msg.Account = "13551132418";
this.msg.Password = "123456";
this.msg.ValidataCode = "1234";
}
......
......@@ -39,10 +39,15 @@
<el-tooltip class="item" effect="dark" content="建议尺寸750*750" placement="top">
<el-button @click="openChangeDig(2)" size="small">选择文件</el-button>
</el-tooltip>
<div class="app-gallery-item" style="position: relative;width: 100px;margin-top: 10px;">
<img v-if="!addMsg.pjPath || addMsg.pjPath==''" src="../../assets/img/default.png"
style="width:80px;height:80px" alt="">
<img v-else style="width:80px;height:80px" :src="addMsg.pjPath" alt="">
<div class="app-gallery-item" style="position: relative;margin-top: 10px;">
<template v-if="addMsg.CommentImgList&&addMsg.CommentImgList.length>0" >
<template v-for="(item,index) in addMsg.CommentImgList">
<img :key="index" :src="item" style="width:80px;height:80px;padding-left:10px;" alt="">
</template>
</template>
<template v-else>
<img src="../../assets/img/default.png" style="width:80px;height:80px" alt="">
</template>
</div>
</el-form-item>
<el-form-item label="评价">
......@@ -61,7 +66,6 @@
</el-switch>
</el-form-item>
</el-form>
</div>
<div style="margin-top:20px">
<el-button size="small" type="primary" @click="Save">保存</el-button>
......@@ -151,7 +155,7 @@
}
if (this.imgType == 2) {
let url = this.getIconLink(msg.url)
this.addMsg.CommentImgList = [url];
this.addMsg.CommentImgList.push(url);
this.addMsg.pjPath = url;
}
this.changeState = false;
......
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