<!--
 * @Author: wanglj 471442253@qq.com
 * @Date: 2022-12-26 17:21:07
 * @LastEditors: wanglj
 * @LastEditTime: 2022-12-26 17:45:03
 * @Description: file content
 * @FilePath: \opms_frontend\src\views\customer\components\Shift.vue
-->
<template>
  <el-dialog :visible.sync="visible"
             width="30%"
             @close="handleClose"
             title="转移客户">
    <Transfer ref="transfer"></Transfer>
    <el-form :model="form"
             :rules="rules"
             ref="form"
             label-width="80px">
      <el-form-item label="接收对象"
                    prop="allocate">
        <el-input readonly
                  v-model="form.allocate">
          <el-button slot="append"
                     icon="el-icon-search"
                     @click="choose"></el-button>
        </el-input>
      </el-form-item>
      <el-form-item label="转移相关"
                    prop="about">
        <el-checkbox-group v-model="form.about">
          <el-checkbox label="客户"></el-checkbox>
        </el-checkbox-group>
      </el-form-item>
      <el-form-item label="备注信息"
                    prop="remark">
        <el-input v-model="form.remark"
                  type="textarea"
                  :rows="5"
                  maxlength="500"
                  show-word-limit
                  resize="none"></el-input>
      </el-form-item>
    </el-form>
    <span slot="footer">
      <el-button size="mini"
                 @click="visible = false">取消</el-button>
      <el-button size="mini"
                 type="primary">确定</el-button>
    </span>
  </el-dialog>
</template>
<script>
import Transfer from './Transfer.vue'
export default {
  data () {
    return {
      visible: false,
      form: {
        allocate: '',
        about: ['客户'],
        remark: ''
      },
      rules: {
        allocate: [{ required: true, message: '请选择接收对象', trigger: 'change' }],
        about: [{ required: true, message: '请选择转移相关', trigger: 'change' }]
      }
    }
  },
  components: {
    Transfer
  },
  methods: {
    handleClose () {
      this.$refs.form.resetFields()
    },
    choose () {
      this.$refs.transfer.innerVisible = true
    }
  }
}
</script>

<style>
</style>