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 @@
placeholder="请输入关联门店"
:remote-method="generateRemoteMethod"
:loading="loading"
:disabled='disableSelect'
>
<el-option
v-for="(item, index) in generateOptions"
......@@ -237,6 +238,7 @@ import { equityApi } from '@/api/api'
export default {
data() {
return {
disableSelect: false,
//分页查询下拉框
options: [],
// value: [],
......@@ -479,6 +481,8 @@ export default {
if (this.ruleForm.effectiveType == 2) {
this.effectiveNum = row.effectiveNum
}
// 禁用门店框
this.disableSelect = true
// 改变高亮
// var imageSrc = row.backgroundImage
// console.log(imageSrc)
......@@ -490,6 +494,7 @@ export default {
},
//复制
copy(row) {
this.disableSelect = false
this.isAdd = true
console.log(this.isAdd)
this.dialogVisible = true
......@@ -500,10 +505,14 @@ export default {
}
},
addCard(cd) {
this.generateOptions = []
this.dialogVisible = true
this.isAdd = cd
console.log(this.isAdd)
this.ruleForm = {}
setTimeout(() => {
this.clearStyle()
}, 20);
},
groupChange(value) {
console.log(value);
......@@ -532,7 +541,7 @@ export default {
console.log(value)
if (cd == 'disable') {
// this.inputSwitch = true
this.ruleForm.effectiveNum = null
this.ruleForm.effectiveNum = ''
} else if (cd == 'input') {
// this.inputSwitch = false
this.ruleForm.effectiveNum = this.effectiveNum
......@@ -554,13 +563,15 @@ export default {
console.log(apiName)
//请求是否成功
if (res.code == 0) {
this.ruleForm = {};
this.effectiveNum = ''
this.ruleForm = {}
this.dialogVisible = false
this.isAdd = false
this.$message({
message: "操作成功",
type: "success",
});
this.disableSelect = false
this.$refs.recordTable.refreshTable()
} else if (res.code == -1) {
this.$message({
......@@ -592,6 +603,7 @@ export default {
this.dialogVisible = false
console.log(this.isAdd)
this.clearStyle()
this.disableSelect = false
},
}
}
......
......@@ -10,10 +10,10 @@
<ul>
<li>
<a
href="../customer/newEquityCard.html"
href="../customer/customerService.html"
target="_self"
>
新增权益卡
客服管理
</a>
</li>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!