<link rel="stylesheet" href="/plugins/addon/ticket_internal_premium/template/admin/css/addTicket.css" />
<!-- =======内容区域======= -->

<div id="content" class="template" v-cloak>
  <com-config>
    <t-card class="list-card-container">
      <div class="page-title">{{lang.order_new_rder}}</div>
      <t-form label-align="top" :data="detialform" class="add_tform" ref="myform" :rules="requiredRules"
        layout="inline">
        <t-form-item :label="lang.order_name" name="department_id" class="form-item-left">
          <t-select class="select-496" :placeholder="lang.order_text4" clearable v-model="detialform.department_id"
            @change="departmentChange" props="department_id" :options="departmentList"
            :keys="{ label: 'name', value: 'id'}">
          </t-select>
        </t-form-item>
        <t-form-item :label="lang.order_designated_type" name="type_id">
          <t-select class="select-496" :placeholder="lang.order_designated_type" clearable v-model="detialform.type_id"
            :keys="{ label: 'name', value: 'id' }" :options="calcOptions">
          </t-select>
        </t-form-item>
        <t-form-item :label="lang.order_text6" name="title">
          <t-input class="title-input" v-model="detialform.title" :placeholder="lang.order_text7" clearable></t-input>
        </t-form-item>
        <t-form-item :label="lang.order_text8" class="form-item-left">
          <com-choose-user :check-id="detialform.client_id" :pre-placeholder="lang.order_text8"
            @changeuser="changeUser">
          </com-choose-user>
        </t-form-item>
        <t-form-item :label="lang.order_text10">
          <t-select class="select-496" :max="1" :scroll="{ type: 'virtual',threshold:20 }" :popup-props="popupProps"
            @change="hostChange" :min-collapsed-num="2" multiple :placeholder="lang.order_text10" clearable
            v-model="detialform.host_id" :options="hostOptions" :keys="{ label: 'showName', value: 'id'}"></t-select>
        </t-form-item>
      </t-form>
      <div class="text-box">
        <div class="text-title">{{lang.order_text12}}</div>
        <!-- <textarea id="tiny1" name="content1">{{detialform.content}}</textarea> -->
        <com-tinymce ref="comTinymce"></com-tinymce>
      </div>
      <div class="sub-btn">
        <t-button :loading="isSubmitIng" @click="addOrderFormSubmit()">{{lang.order_text13}}</t-button>
        <t-button theme="default" @click="goList()">{{lang.order_text14}}</t-button>
      </div>
    </t-card>
  </com-config>
</div>

<!-- =======页面独有======= -->
<script src="/plugins/addon/ticket_internal_premium/template/admin/js/lang.js"></script>

<script src="/{$template_catalog}/template/{$themes}/components/comChooseUser/comChooseUser.js"></script>
<script src="/tinymce/tinymce.min.js"></script>
<script src="/{$template_catalog}/template/{$themes}/components/comTinymce/comTinymce.js"></script>
<script src="/plugins/addon/ticket_internal_premium/template/admin/api/common.js"></script>
<script src="/plugins/addon/ticket_internal_premium/template/admin/api/order.js"></script>
<script src="/plugins/addon/ticket_internal_premium/template/admin/js/ticket_internal_add.js"></script>