feat(金币代理页面): 完善修改窗口
This commit is contained in:
parent
245eaa1c93
commit
a15a5d1074
@ -341,6 +341,28 @@
|
||||
</div>
|
||||
</el-dialog>
|
||||
<el-dialog title="修改" :visible.sync="updateBoxVisible" width="400px">
|
||||
<el-form
|
||||
ref="form"
|
||||
:rules="formRules"
|
||||
:model="infoData"
|
||||
label-position="left"
|
||||
label-width="80px"
|
||||
style="width: 300px; margin-left:50px;"
|
||||
>
|
||||
<el-form-item label="联系方式" prop="contactInfo">
|
||||
<el-input
|
||||
v-model.trim="infoData.contactInfo"
|
||||
placeholder="请输入联系方式"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="支持国家" prop="contactInfo">
|
||||
<el-input
|
||||
v-model.trim="infoData.supportedCountries"
|
||||
placeholder="请输入支持国家"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="hideDialog()">
|
||||
取消
|
||||
@ -413,17 +435,6 @@ export default {
|
||||
rechargeType: "",
|
||||
remark: ""
|
||||
},
|
||||
formRules: {
|
||||
userId: commonRules,
|
||||
earnPoints: {
|
||||
required: true,
|
||||
message: "必填字段不可为空",
|
||||
trigger: "blur"
|
||||
},
|
||||
amount: commonRules,
|
||||
rechargeType: commonRules,
|
||||
sysOrigin: commonRules
|
||||
},
|
||||
listLoading: true,
|
||||
formEditVisable: false,
|
||||
|
||||
@ -433,7 +444,20 @@ export default {
|
||||
supportedCountries: "", //支持的国家
|
||||
contactInfo: "" //联系方式
|
||||
},
|
||||
updateLoading: false //更新提交加载中
|
||||
updateLoading: false, //更新提交加载中
|
||||
formRules: {
|
||||
userId: commonRules,
|
||||
earnPoints: {
|
||||
required: true,
|
||||
message: "必填字段不可为空",
|
||||
trigger: "blur"
|
||||
},
|
||||
amount: commonRules,
|
||||
rechargeType: commonRules,
|
||||
sysOrigin: commonRules,
|
||||
supportedCountries: commonRules,
|
||||
contactInfo: commonRules
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@ -606,9 +630,27 @@ export default {
|
||||
// 提交更新信息(支持国家和联系方式)
|
||||
updateInfo() {
|
||||
const that = this;
|
||||
|
||||
that.updateLoading = true; //加载中
|
||||
that.updateLoading = false; //加载完毕
|
||||
that.hideDialog(); //隐藏弹窗
|
||||
updateInfoCP(that.infoData)
|
||||
.then(res => {
|
||||
that.infoData = {
|
||||
id: 0, //代理id
|
||||
supportedCountries: "", //支持的国家
|
||||
contactInfo: "" //联系方式
|
||||
};
|
||||
that.updateLoading = false; //加载完毕
|
||||
that.hideDialog(); //隐藏弹窗
|
||||
})
|
||||
.catch(er => {
|
||||
that.infoData = {
|
||||
id: 0, //代理id
|
||||
supportedCountries: "", //支持的国家
|
||||
contactInfo: "" //联系方式
|
||||
};
|
||||
that.updateLoading = false; //加载完毕
|
||||
that.hideDialog(); //隐藏弹窗
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user