Commit 844dfc6c by zhouzy

修复了新建的数据清空问题

1 parent 7452ee26
import App from './index.vue'
import base from '@/base'
import GlsxVueCommon from 'glsx-vue-common'
base.getConfig().then(data => {
console.log(data);
const { vue, config } = data
vue.use(GlsxVueCommon, config)
base.render(App)
})
<!--客服管理-->
<template>
<div class="ctn">
<div
class="addCustomer"
@click="addCustomer"
>
点击添加客服
</div>
<!-- 添加客服弹窗 -->
<el-dialog
title="提示"
:visible.sync="dialogVisible"
width="30%"
:before-close="handleClose"
>
<span>添加客服</span>
<span
slot="footer"
class="dialog-footer"
>
<el-button @click="dialogVisible = false">取 消</el-button>
<el-button
type="primary"
@click="dialogVisible = false"
>确 定</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
export default {
data() {
return {
dialogVisible: false
};
},
methods: {
handleClose(done) {
this.$confirm('确认关闭?')
.then(_ => {
done();
})
.catch(_ => { });
},
// 打开客服弹窗
addCustomer(){
this.dialogVisible = true
}
}
};
</script>
<style>
* {
padding: 0;
margin: 0;
border: 0;
}
</style>
...@@ -132,6 +132,7 @@ ...@@ -132,6 +132,7 @@
placeholder="请输入关联门店" placeholder="请输入关联门店"
:remote-method="generateRemoteMethod" :remote-method="generateRemoteMethod"
:loading="loading" :loading="loading"
:disabled='disableSelect'
> >
<el-option <el-option
v-for="(item, index) in generateOptions" v-for="(item, index) in generateOptions"
...@@ -237,6 +238,7 @@ import { equityApi } from '@/api/api' ...@@ -237,6 +238,7 @@ import { equityApi } from '@/api/api'
export default { export default {
data() { data() {
return { return {
disableSelect: false,
//分页查询下拉框 //分页查询下拉框
options: [], options: [],
// value: [], // value: [],
...@@ -479,6 +481,8 @@ export default { ...@@ -479,6 +481,8 @@ export default {
if (this.ruleForm.effectiveType == 2) { if (this.ruleForm.effectiveType == 2) {
this.effectiveNum = row.effectiveNum this.effectiveNum = row.effectiveNum
} }
// 禁用门店框
this.disableSelect = true
// 改变高亮 // 改变高亮
// var imageSrc = row.backgroundImage // var imageSrc = row.backgroundImage
// console.log(imageSrc) // console.log(imageSrc)
...@@ -490,6 +494,7 @@ export default { ...@@ -490,6 +494,7 @@ export default {
}, },
//复制 //复制
copy(row) { copy(row) {
this.disableSelect = false
this.isAdd = true this.isAdd = true
console.log(this.isAdd) console.log(this.isAdd)
this.dialogVisible = true this.dialogVisible = true
...@@ -500,10 +505,14 @@ export default { ...@@ -500,10 +505,14 @@ export default {
} }
}, },
addCard(cd) { addCard(cd) {
this.generateOptions = []
this.dialogVisible = true this.dialogVisible = true
this.isAdd = cd this.isAdd = cd
console.log(this.isAdd) console.log(this.isAdd)
this.ruleForm = {} this.ruleForm = {}
setTimeout(() => {
this.clearStyle()
}, 20);
}, },
groupChange(value) { groupChange(value) {
console.log(value); console.log(value);
...@@ -532,7 +541,7 @@ export default { ...@@ -532,7 +541,7 @@ export default {
console.log(value) console.log(value)
if (cd == 'disable') { if (cd == 'disable') {
// this.inputSwitch = true // this.inputSwitch = true
this.ruleForm.effectiveNum = null this.ruleForm.effectiveNum = ''
} else if (cd == 'input') { } else if (cd == 'input') {
// this.inputSwitch = false // this.inputSwitch = false
this.ruleForm.effectiveNum = this.effectiveNum this.ruleForm.effectiveNum = this.effectiveNum
...@@ -554,13 +563,15 @@ export default { ...@@ -554,13 +563,15 @@ export default {
console.log(apiName) console.log(apiName)
//请求是否成功 //请求是否成功
if (res.code == 0) { if (res.code == 0) {
this.ruleForm = {}; this.effectiveNum = ''
this.ruleForm = {}
this.dialogVisible = false this.dialogVisible = false
this.isAdd = false this.isAdd = false
this.$message({ this.$message({
message: "操作成功", message: "操作成功",
type: "success", type: "success",
}); });
this.disableSelect = false
this.$refs.recordTable.refreshTable() this.$refs.recordTable.refreshTable()
} else if (res.code == -1) { } else if (res.code == -1) {
this.$message({ this.$message({
...@@ -592,6 +603,7 @@ export default { ...@@ -592,6 +603,7 @@ export default {
this.dialogVisible = false this.dialogVisible = false
console.log(this.isAdd) console.log(this.isAdd)
this.clearStyle() this.clearStyle()
this.disableSelect = false
}, },
} }
} }
......
...@@ -10,10 +10,10 @@ ...@@ -10,10 +10,10 @@
<ul> <ul>
<li> <li>
<a <a
href="../customer/newEquityCard.html" href="../customer/customerService.html"
target="_self" target="_self"
> >
新增权益卡 客服管理
</a> </a>
</li> </li>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!