licp
2024-03-12 1980a84b1aeabf2fda317b1c8ffd0a3cc1ba2b26
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
<template>
    <el-dialog
      top="10vh"
      width="80%"
      title="编写技术交底单"
      :close-on-click-modal="false"
      :visible.sync="visible"
      v-if="visible"
    >
      <el-form :model="dataForm" :rules="dataRule" ref="dataForm" class="l-mes">
        <el-form-item label="">
          <!-- <el-date-picker
            v-model="dataForm.selectTime"
            type="datetime"
            placeholder="选择日期时间"
            value-format="yyyy-MM-dd HH:mm:ss"
          >
          </el-date-picker> -->
          <rich-text
                editorId="fwb001122"
                :richContent="remark"
                @contentChange="contentChange"
            ></rich-text>
        </el-form-item>
      </el-form>
 
      <div slot="footer" class="dialog-footer">
        <el-button type="info" @click="visible = false">取消</el-button>
        <el-button
          type="primary"
          :disabled="isSubmit"
          v-thinclick="`dataFormSubmit`"
          >确定</el-button
        >
      </div>
    </el-dialog>
  </template>
 
  <script>
  import { otcCustomerOrderSync } from '@/api/plan/customerorder'
  import RichText from '@/views/common/rich-text.vue'
 
  export default {
    components: { RichText },
    data() {
      return {
        visible: false,
        dataForm: {
          selectTime: null
        },
        dataRule: {},
        isSubmit: false,
        remark:''
      }
    },
    methods: {
      init() {
        this.visible = true
      },
      dataFormSubmit() {
        this.isSubmit = true
        if (this.dataForm.selectTime != null && this.dataForm.selectTime != '') {
          otcCustomerOrderSync({
            selectTime: this.dataForm.selectTime,
            pathCode: '0'
          })
            .then((response) => {
              const resData = response.data
              if (resData.code === 0) {
                this.$message.success('拉取销售订单成功;' + resData.msg)
                this.visible = false
                this.isSubmit = false
                this.dataForm.selectTime = null
                this.$emit('refreshDataList')
              } else {
                this.$message.success('拉取销售订单失败')
                this.isSubmit = false
              }
            })
            .catch((error) => {
              this.isSubmit = false
              console.error(error)
            })
        } else {
          this.isSubmit = false
          this.$message.error('请先选择日期')
        }
      },
      contentChange(e){
        console.log(1111,e)
      }
    }
  }
  </script>
  <style scoped lang="scss">
  .mps-table .el-table__row > td {
    border: none;
  }
 
  .mps-table::before {
    height: 0px;
  }
  /*
  字符串过长时,隐藏显示省略号
  */
  .inline-el-hidden {
    display: block;
    width: 93%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin: 0 auto;
  }
  ::v-deep .quill-editor{
    .ql-container{
        min-height:  400px!important;
    }
  }
  </style>