|
|
@@ -0,0 +1,89 @@
|
|
|
+<template>
|
|
|
+ <div>
|
|
|
+ <el-button size="mini" :type="btnType?btnType:'text'" @click="onShow">编 辑</el-button>
|
|
|
+ <el-dialog title="编 辑" :visible.sync="dialogFormVisible" width="500px" append-to-body>
|
|
|
+ <div slot="title" style="font-size: 15px">
|
|
|
+ 修改账户类型
|
|
|
+ </div>
|
|
|
+ <el-row :gutter="20">
|
|
|
+ <el-form :model="form" :rules="rules" ref="form" label-width="90px" label-position="right" size="mini">
|
|
|
+ <el-col :span="24">
|
|
|
+ <el-form-item label="账户编号" prop="hraccountno">
|
|
|
+ <el-input v-show="form.isused !== 1" v-model="form.hraccountno" placeholder="账户编号"></el-input>
|
|
|
+ <span v-show="form.isused === 1">{{form.hraccountno}}</span>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="24">
|
|
|
+ <el-form-item label="账户名称" prop="hraccountname">
|
|
|
+ <el-input v-show="form.isused !== 1" v-model="form.hraccountname" placeholder="账户名称"></el-input>
|
|
|
+ <span v-show="form.isused === 1">{{form.hraccountname}}</span>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="6">
|
|
|
+ <el-form-item >
|
|
|
+ <el-checkbox :true-label="1" :false-label="0" v-model="form.isused" checked="checked">是否启用</el-checkbox>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-form>
|
|
|
+ </el-row>
|
|
|
+ <div class="dialog-footer">
|
|
|
+ <el-button size="small" @click="dialogFormVisible = false" class="normal-btn-width">取 消</el-button>
|
|
|
+ <el-button size="small" type="warning" @click="onSubmit" class="normal-btn-width btn-warning">确 定</el-button>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+export default {
|
|
|
+ name: "edit",
|
|
|
+ props:['data','btnType'],
|
|
|
+ data(){
|
|
|
+ return {
|
|
|
+ dialogFormVisible:false,
|
|
|
+ form:{
|
|
|
+ sa_accountclassid:'',
|
|
|
+ hraccountno: "",
|
|
|
+ hraccountname: "",
|
|
|
+ isused:''
|
|
|
+
|
|
|
+ },
|
|
|
+ rules:{
|
|
|
+ hraccountno:[
|
|
|
+ { required: true, message: '输入账户编号', trigger: 'blur'},
|
|
|
+ ],
|
|
|
+ hraccountname:[
|
|
|
+ { required: true, message: '输入账户名称', trigger: 'blur'}
|
|
|
+ ]
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ methods:{
|
|
|
+ onShow(){
|
|
|
+ console.log(this.data,'业务员')
|
|
|
+ this.form = Object.assign({},this.form,this.data)
|
|
|
+ this.dialogFormVisible = true
|
|
|
+
|
|
|
+ console.log(this.form)
|
|
|
+ },
|
|
|
+ onSubmit(){
|
|
|
+ console.log(this.form)
|
|
|
+ this.$refs['form'].validate(async (valid) => {
|
|
|
+ if (!valid) return false
|
|
|
+ const res = await this.$api.requested({
|
|
|
+ "id": "20240111085004",
|
|
|
+ "content": this.form
|
|
|
+ })
|
|
|
+ this.tool.showMessage(res,()=>{
|
|
|
+ this.$emit('onSuccess')
|
|
|
+ this.dialogFormVisible = false
|
|
|
+ })
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+</script>
|
|
|
+
|
|
|
+<style scoped>
|
|
|
+
|
|
|
+</style>
|