Commit 3e6113f6 by shaojiawen

Merge branch 'feature/act-code' of http://git.gicdev.com/office/haoban-3 into feature/act-code

parents d4d6e4e7 0d35bce7
<template>
<div>
<el-button class="select-clerk-trigger" v-if="!Array.isArray(data) || data.length == 0" :disabled="disabled" @click="showSelectClerk = true">
<i class="iconfont-hb3 icontianjia trigger-icon"></i>
<i class="iconfont-hb3 iconPlusOutlined trigger-icon"></i>
添加成员
</el-button>
<template v-if="Array.isArray(data) && data.length > 0">
......
......@@ -136,7 +136,7 @@
</template>
<template v-else>--</template>
</el-table-column>
<el-table-column label="操作" min-width="160" fixed="right">
<el-table-column label="操作" width="160" fixed="right">
<template slot-scope="{ row }">
<dm-dropdown :scope-data="row" :max="3" :configs="operateBtnArr" />
</template>
......
<template>
<div>
<setActCode @sumbit="onSubmit">
<setActCode @sumbit="onSubmit" ref="setActCodePage">
<template #typeCode>
<el-form-item label="活码类型" :rules="[{ required: true, message: '请选择活码类型', trigger: 'blur' }]">
<el-radio-group v-model="form.hmType">
......@@ -78,11 +78,12 @@ export default {
...event,
...this.form
};
obj.passFlag = obj.passFlag ? 1 : 0;
await postJsonRequest('/haoban-manage3-web/hm/qrcode/addList', obj).then(res => {
if (res.data.code == 0) {
setTimeout(() => {
this.$route.meta.refresh = true;
this.$parent.btnLoading = false;
this.$refs.setActCodePage.btnLoading = false;
this.$router.go(-1);
this.form = {
hmType: 1,
......@@ -91,7 +92,7 @@ export default {
};
}, 1000);
} else {
this.$parent.btnLoading = false;
this.$refs.setActCodePage.btnLoading = false;
return this.$message.error(res.data.message);
}
});
......
<template>
<div>
<setActCode @sumbit="onSubmit" :actCodeData="detailCode">
<setActCode ref="setActCodePage" @sumbit="onSubmit" :actCodeData="detailCode">
<template #typeCode>
<el-form-item label="活码类型" :rules="[{ required: true, message: '请选择活码类型', trigger: 'blur' }]">
<el-radio-group v-model="form.hmType" @change="changeEvent">
<el-radio-group v-model="form.hmType" @change="changeEvent" :disabled="$route.query.hmId">
<el-radio :label="1">单人活码</el-radio>
<el-radio :label="2">多人活码</el-radio>
</el-radio-group>
......@@ -102,6 +102,7 @@ export default {
...event,
...this.form
};
obj.passFlag = obj.passFlag ? 1 : 0;
if (this.$route.query.hmId) {
obj = {
...obj,
......@@ -113,7 +114,7 @@ export default {
setTimeout(() => {
this.$router.go(-1);
this.$parent.btnLoading = false;
this.$refs.setActCodePage.btnLoading = false;
this.form = {
hmType: 1,
name: '',
......@@ -122,7 +123,7 @@ export default {
};
}, 1000);
} else {
this.$parent.btnLoading = false;
this.$refs.setActCodePage.btnLoading = false;
return this.$message.error(res.data.message);
}
});
......@@ -132,7 +133,7 @@ export default {
if (res.data.code == 0) {
setTimeout(() => {
this.$route.meta.refresh = true;
this.$parent.btnLoading = false;
this.$refs.setActCodePage.btnLoading = false;
this.$router.go(-1);
this.form = {
hmType: 1,
......@@ -142,7 +143,7 @@ export default {
};
}, 1000);
} else {
this.$parent.btnLoading = false;
this.$refs.setActCodePage.btnLoading = false;
return this.$message.error(res.data.message);
}
});
......
......@@ -167,7 +167,7 @@ export default {
}
this.$refs.form.validate(async valid => {
if (valid) {
this.form.passFlag = this.form.passFlag ? 1 : 0;
// this.form.passFlag = this.form.passFlag ? 1 : 0;
this.btnLoading = true;
this.$emit('sumbit', this.form);
}
......@@ -179,7 +179,7 @@ export default {
handler: function(val) {
if (val) {
this.form.hmGroupId = val.hmGroupId;
// this.form.passFlag = val.passFlag == 1 ? true : false;
this.form.passFlag = val.passFlag == 1 ? true : false;
this.form.memberLabelId = val.memberLabelId ? val.memberLabelId : '';
this.form.memberLabelName = val.memberLabelName ? val.memberLabelName : '';
this.form.welcomeId = val.welcomeId;
......
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