| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374 |
- <template>
- <div>
- <el-form ref="form" :model="form" :rules="rules" label-width="80px">
- <el-form-item label="备注" prop="remark">
- <el-input :rows="2" v-model="form.remark" type="textarea" placeholder="请输入内容" />
- </el-form-item>
- </el-form>
- <div class="footer">
- <el-button type="primary" @click="submitForm">确 定</el-button>
- </div>
- </div>
- </template>
-
- <script>
- import { updateCustomer } from "@/api/crm/customer";
- export default {
- name: "remark",
- data() {
- return {
- form: {
- customerId:null,
- remark:null,
-
- },
- // 表单校验
- rules: {
- remark: [
- { required: true, message: "备注不能为空", trigger: "change" }
- ],
-
- }
-
- };
- },
- created() {
- },
- methods: {
- reset(customer) {
- this.form.customerId=customer.customerId;
- this.form.remark=customer.remark;
- },
- submitForm() {
- this.$refs["form"].validate(valid => {
- if (valid) {
- updateCustomer(this.form).then(response => {
- if (response.code === 200) {
- this.msgSuccess("操作成功");
-
- this.$emit('close');
- }
- });
- }
- });
- },
- }
- };
- </script>
- <style lang="scss" scoped>
- .contents{
- height: 100%;
- background-color: #fff;
- padding: 20px;
-
- }
- .footer{
- display: flex;
- align-items: center;
- justify-content: flex-end;
- }
- </style>
-
|