Commit d55f1bb5 by zhouzy

修改剩下的bug

1 parent 13c0649a
......@@ -95,7 +95,7 @@
>
<el-input
v-model="ruleForm.cardClassName"
maxlength="10"
maxlength="15"
type="text"
size="mini"
></el-input>
......@@ -108,9 +108,9 @@
<div
v-for="(item,index) in product"
:key="index"
:id=item.id
:id="item.id"
@click="changeStyle(item.id,item.src)"
class="imgCtn"
:class="{'imgCtn': true, 'imgBg': item.src === ruleForm.backgroundImage }"
>
<img
:src="item.imgSrc"
......@@ -122,7 +122,7 @@
</el-form-item>
<el-form-item
label="渠道门店"
prop="merchantId"
prop="merchantName"
>
<el-select
v-model="ruleForm.merchantName"
......@@ -141,21 +141,6 @@
>
</el-option>
</el-select>
<!-- <el-select
v-model="ruleForm.merchantName"
filterable
placeholder="请选择门店"
size="mini"
@change="changeStore"
>
<el-option
v-for="(item,index) in storeOptions"
:key="index"
:label="item.name"
:value="item.name"
>
</el-option>
</el-select> -->
</el-form-item>
<el-form-item
label="有效期:"
......@@ -337,18 +322,18 @@ export default {
},
{
id: "secondImg",
imgSrc: require("./images/yiquan.jpg"),
src: "./images/yiquan.jpg"
imgSrc: require("./images/card1.jpg"),
src: "./images/card1.jpg"
},
{
id: "thirdImg",
imgSrc: require("./images/yiquan.jpg"),
src: "./images/yiquan.jpg"
imgSrc: require("./images/card2.jpg"),
src: "./images/card2.jpg"
},
{
id: "forthImg",
imgSrc: require("./images/yiquan.jpg"),
src: "./images/yiquan.jpg"
imgSrc: require("./images/card3.jpg"),
src: "./images/card3.jpg"
},
],
rules: {
......@@ -363,7 +348,7 @@ export default {
{ required: true, message: '请选择卡片', trigger: 'change' }
],
usageNotes: [
{ min: 0, max: 10, message: '请输入500字以内的名称', trigger: 'blur' }
{ min: 0, max: 500, message: '请输入500字以内的名称', trigger: 'blur' }
],
merchantName: [
{ required: true, message: '请选择门店', trigger: 'change' }
......@@ -405,7 +390,7 @@ export default {
if (cellValue.effectiveType == 1) {
return '长期有效'
} else if (cellValue.effectiveType == 2) {
return '领取后' + cellValue.effectiveNum + '天永久有效'
return '领取后' + cellValue.effectiveNum + '天内有效'
}
}
},
......@@ -475,22 +460,33 @@ export default {
this.generateOptions = [];
}
},
//改变门店
changeStore(value) {
this.ruleForm.merchantId = this.storeOptions.filter(item => item.name == value)[0].id
console.log(this.ruleForm.merchantId);
//获取src改变卡片样式
changeStore() {
// this.clearStyle()
var imageId = this.product.filter(item => item.src == this.ruleForm.backgroundImage).id
console.log(imageId);
},
//编辑
edit(row) {
// console.log(this.isAdd)
// console.log(row)
this.ruleForm = row
// this.changeStore()
this.dialogVisible = true
console.log(this.ruleForm.effectiveType)
this.ruleForm.effectiveType = row.effectiveType + ''
//赋值时间框
if (this.ruleForm.effectiveType == 2) {
this.effectiveNum = row.effectiveNum
}
// 改变高亮
// var imageSrc = row.backgroundImage
// console.log(imageSrc)
// var imageId = this.product.filter(item => item.src == ruleForm.backgroundImage)[0].id
// console.log(imageId)
// var imgItem = document.getElementById(imageId)
// console.log(imgItem)
// imgItem.style.background = "rgb(255, 173, 134)"
},
//复制
copy(row) {
......@@ -562,9 +558,10 @@ export default {
this.dialogVisible = false
this.isAdd = false
this.$message({
message: "添加成功",
message: "操作成功",
type: "success",
});
this.$refs.recordTable.refreshTable()
} else if (res.code == -1) {
this.$message({
message: "当前门店已绑定其他权益卡",
......@@ -677,6 +674,9 @@ export default {
height: 80px;
margin-right: 20px;
}
.imgBg {
background: rgb(255, 173, 134);
}
.topline {
display: flex;
flex-direction: row;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!