263 lines
14 KiB
HTML
263 lines
14 KiB
HTML
<link rel="stylesheet" href="/plugins/addon/idcsmart_ticket/template/admin/css/ticket_setting.css" />
|
||
<!-- =======内容区域======= -->
|
||
|
||
<div id="content" class="template" v-cloak>
|
||
<com-config>
|
||
<t-card class="list-card-container">
|
||
<ul class="common-tab">
|
||
<li v-permission="'auth_user_ticket_list'">
|
||
<a href="index.htm">{{lang.work_list}}</a>
|
||
</li>
|
||
<li class="active">
|
||
<a>{{lang.order__configuration}}</a>
|
||
</li>
|
||
</ul>
|
||
<div class="conten-box">
|
||
<div v-permission="'auth_user_ticket_configuration_ticket_department'">
|
||
<div class="title-text mar-10">{{lang.order_name}}</div>
|
||
<t-table bordered row-key="id" :data="orderTypeData" :columns="columns">
|
||
<template #name="slotProps">
|
||
<div v-if="!slotProps.row.isedit && !slotProps.row.isAdd" style="white-space: pre-line;">
|
||
{{slotProps.row.name}}
|
||
</div>
|
||
<!-- <t-select-input v-else :value="slotProps.row.name" :popup-visible="popupVisible" style="width: 300px" :placeholder=lang.order_text51 clearable allow-input @input-change="(val)=> onInputChange(val,slotProps.row)" @popup-visible-change="onPopupVisibleChange" @clear="onClear(slotProps.row)">
|
||
<template #panel>
|
||
<ul class="select-ul-div">
|
||
<li v-for="(item,index) in orderTypeOptions" :key="index" @click="() => onOptionClick(item.name,slotProps.row)">{{ item.name }}</li>
|
||
</ul>
|
||
</template>
|
||
<template #suffixIcon>
|
||
<chevron-down-icon />
|
||
</template>
|
||
</t-select-input> -->
|
||
<t-select-input v-else :value="slotProps.row.name" :popup-visible="popupVisible" style="width: 300px"
|
||
:placeholder=lang.order_text51 clearable allow-input
|
||
@input-change="(val)=> onInputChange(val,slotProps.row)" @popup-visible-change="onPopupVisibleChange"
|
||
@clear="onClear(slotProps.row)">
|
||
<!-- <template #panel>
|
||
<ul class="select-ul-div">
|
||
<li v-for="(item,index) in orderTypeOptions" :key="index" @click="() => onOptionClick(item.name,slotProps.row)">{{ item.name }}</li>
|
||
</ul>
|
||
</template> -->
|
||
<template #suffixIcon>
|
||
<chevron-down-icon />
|
||
</template>
|
||
</t-select-input>
|
||
</template>
|
||
<template #admin="slotProps">
|
||
<div v-if="!slotProps.row.isedit && !slotProps.row.isAdd" style="white-space:pre-line;">
|
||
{{calcName(slotProps.row.admin)}}
|
||
</div>
|
||
<t-select v-else :placeholder="lang.order_text52" @change="departmentChange($event, slotProps.row)"
|
||
filterable multiple clearable :value="slotProps.row.arr1" :keys="{ label: 'name', value: 'id' }"
|
||
:options="departmentOptions" :min-collapsed-num="3"></t-select>
|
||
</template>
|
||
<template #op="slotProps">
|
||
<div v-if="slotProps.row.id">
|
||
<t-icon class="btn-icon common-look" v-if="slotProps.row.isedit" name="save" style="margin-right: 10px;"
|
||
@click="orderTypeMgtSave(slotProps.row)"></t-icon>
|
||
<t-icon class="btn-icon common-look" v-if="slotProps.row.isedit" name="close-rectangle"
|
||
@click="canceledit(slotProps.row)">
|
||
</t-icon>
|
||
<t-icon class="btn-icon common-look" v-if="!slotProps.row.isedit" name="edit-1" style="margin-right: 10px;"
|
||
@click="edithandleClickOp(slotProps.row.id)"></t-icon>
|
||
<t-icon class="btn-icon common-look" v-if="!slotProps.row.isedit" name="delete"
|
||
@click="orderTypeMgtDelete(slotProps.row)"></t-icon>
|
||
</div>
|
||
<div v-else>
|
||
<t-icon class="btn-icon" name="save" style="margin-right: 10px;"
|
||
@click="orderTypeMgtSave(slotProps.row)"></t-icon>
|
||
<t-icon class="btn-icon" name="close-rectangle" @click="deleteClickadd()"></t-icon>
|
||
</div>
|
||
</template>
|
||
<template #footer-summary>
|
||
<div class="add-tpye-box" @click="appendToRoot">{{lang.order_text53}} +</div>
|
||
</template>
|
||
</t-table>
|
||
</div>
|
||
<div class="status-box" v-permission="'auth_user_ticket_configuration_ticket_status'">
|
||
<div class="status-title">
|
||
<span class="com-first-title">{{lang.order_text54}}</span>
|
||
<t-button class="add-stauts-btn" @click="appendStatus">{{lang.order_text53}}</t-button>
|
||
</div>
|
||
<t-table bordered row-key="id" :data="orderStatusData" :columns="columns2">
|
||
<template #index="slotProps">
|
||
<div>{{slotProps.row.index}}</div>
|
||
</template>
|
||
<template #name="slotProps">
|
||
<div v-if="!slotProps.row.isedit && !slotProps.row.isAdd">{{slotProps.row.name}}</div>
|
||
<t-input v-else :placeholder="lang.order_text55" clearable v-model="slotProps.row.name"></t-input>
|
||
</template>
|
||
<template #color="slotProps">
|
||
<div v-if="!slotProps.row.isedit && !slotProps.row.isAdd" :style={background:slotProps.row.color}
|
||
class="color-box"></div>
|
||
<div v-else class="tdesign-demo-block-row">
|
||
<t-color-picker v-model="slotProps.row.color" />
|
||
</div>
|
||
</template>
|
||
<template #status="slotProps">
|
||
<div v-if="!slotProps.row.isedit && !slotProps.row.isAdd">{{slotProps.row.statusText}}</div>
|
||
<t-select v-else :placeholder="lang.order_text56" filterable clearable v-model="slotProps.row.status"
|
||
:keys="{ label: 'statusText', value: 'status' }" :options="statusOpitons"></t-select>
|
||
</template>
|
||
<template #op="slotProps">
|
||
<div v-if="slotProps.row.id">
|
||
<t-icon class="btn-icon common-look" v-if="slotProps.row.isedit" name="save" style="margin-right: 10px;"
|
||
@click="orderStatustSave(slotProps.row)"></t-icon>
|
||
<t-icon class="btn-icon common-look" v-if="slotProps.row.isedit" name="close-rectangle" @click="cancelStatusEdit()">
|
||
</t-icon>
|
||
<t-icon class="btn-icon common-look" v-if="!slotProps.row.isedit" name="edit-1" style="margin-right: 10px;"
|
||
@click="editStatus(slotProps.row)"></t-icon>
|
||
<t-icon class="btn-icon common-look" v-if="!slotProps.row.isedit" name="delete"
|
||
@click="orderStatusMgtDelete(slotProps.row)"></t-icon>
|
||
</div>
|
||
<div v-else>
|
||
<t-icon class="btn-icon" name="save" style="margin-right: 10px;"
|
||
@click="orderStatustSave(slotProps.row)"></t-icon>
|
||
<t-icon class="btn-icon" name="close-rectangle" @click="deleteStatusadd()"></t-icon>
|
||
</div>
|
||
</template>
|
||
<template #footer-summary>
|
||
<div class="tip-box">
|
||
<span>*</span>
|
||
<span>{{lang.order_text57}}</span>
|
||
</div>
|
||
</template>
|
||
</t-table>
|
||
</div>
|
||
<!-- 工单传递 -->
|
||
<div class="order-delivery">
|
||
<div class="titile-box">
|
||
<span class="com-first-title">{{lang.order_text89}}</span>
|
||
<t-button @click="saveConfig" :loading="submitLoading">{{lang.single_product_text12}}</t-button>
|
||
</div>
|
||
<div class="confgig-item" v-permission="'auth_user_ticket_configuration_save_ticket_notice'">
|
||
<span>{{lang.sub_account_text14}},{{lang.sub_account_text27}}</span>
|
||
<t-switch size="medium" v-model="configObj.ticket_notice_open" :custom-value="[1,0]"></t-switch>
|
||
</div>
|
||
<div class="input-box" v-show="configObj.ticket_notice_open"
|
||
v-permission="'auth_user_ticket_configuration_save_ticket_notice'">
|
||
<!-- <t-textarea v-show="configObj.ticket_notice_open" :autosize="{ minRows: 3, maxRows: 5 }"
|
||
v-model="configObj.ticket_notice_description">
|
||
</t-textarea> -->
|
||
<com-tinymce ref="comTinymce" id="notice"></com-tinymce>
|
||
</div>
|
||
<div class="confgig-item">
|
||
<span>{{lang.order_text86}}
|
||
<t-tooltip placement="top-right" :content="lang.order_text90" theme="light">
|
||
<t-icon name="help-circle" size="18px" />
|
||
</t-tooltip>
|
||
</span>
|
||
<t-select style="width: 250px;" v-model="configObj.ticket_type_id" :keys="{ label: 'name', value: 'id' }"
|
||
:options="orderTypeData" :placeholder="lang.select">
|
||
</t-select>
|
||
</div>
|
||
<div class="confgig-item">
|
||
<div>
|
||
<span>{{lang.order_text87}}</span>
|
||
<t-tooltip placement="top-right" :content="lang.order_text88" theme="light">
|
||
<t-icon name="help-circle" size="18px" />
|
||
</t-tooltip>
|
||
</div>
|
||
<t-switch size="medium" v-model="configObj.downstream_delivery" :custom-value="[1,0]"></t-switch>
|
||
</div>
|
||
<div class="confgig-item">
|
||
<div>
|
||
<span>{{lang.order_text97}}</span>
|
||
<t-input-number style="width: 80px;" v-model="configObj.ticket_close_hour"
|
||
theme="normal"></t-input-number>
|
||
<span>{{lang.order_text98}}</span>
|
||
</div>
|
||
<t-switch size="medium" :custom-value="[1,0]" v-model="configObj.ticket_close_switch "></t-switch>
|
||
</div>
|
||
</div>
|
||
<!-- 工单传递规则 -->
|
||
<div class="status-box">
|
||
<div class="status-title">
|
||
<span class="title-text">{{lang.order_text85}}<t-tooltip placement="top-right" :content="lang.order_text95"
|
||
theme="light">
|
||
<t-icon name="help-circle" size="18px" />
|
||
</t-tooltip></span>
|
||
<span class="add-stauts-btn" @click="addDelivery">{{lang.order_text53}}</span>
|
||
</div>
|
||
<t-table bordered row-key="id" :data="deliveryList" :columns="columns4">
|
||
<template #op="slotProps">
|
||
<div>
|
||
<t-icon class="btn-icon common-look" name="edit-1" style="margin-right: 10px;"
|
||
@click="editDelivery(slotProps.row)"></t-icon>
|
||
<t-icon class="btn-icon common-look" name="delete" @click="deleteDelivery(slotProps.row)"></t-icon>
|
||
</div>
|
||
</template>
|
||
</t-table>
|
||
</div>
|
||
<!-- 预设回复 -->
|
||
<div class="prplay-box" v-permission="'auth_user_ticket_configuration_prereply'">
|
||
<div class="title-text mar-10">{{lang.order_text58}}</div>
|
||
<t-table bordered row-key="id" :data="prereplyList" :columns="columns3">
|
||
<template #content="slotProps">
|
||
<div v-html="slotProps.row.content" class="repaly-content"></div>
|
||
</template>
|
||
<template #op="slotProps">
|
||
<div>
|
||
<t-icon class="btn-icon common-look" name="edit-1" style="margin-right: 10px;"
|
||
@click="editPrereply(slotProps.row)"></t-icon>
|
||
<t-icon class="btn-icon common-look" name="delete" @click="deletePrereply(slotProps.row)"></t-icon>
|
||
</div>
|
||
</template>
|
||
</t-table>
|
||
<div class="input-box">
|
||
<!-- <textarea textarea id="tiny" name="content" v-model="prereplyContent"></textarea> -->
|
||
<com-tinymce ref="comTinymce1" id="recover"></com-tinymce>
|
||
</div>
|
||
<div class="save-replay-btn">
|
||
<t-button @click="savePreReplay" :loading="saveLoading">{{lang.order_text59}}</t-button>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<opinion-button></opinion-button>
|
||
<!-- 新增/编辑工单传递弹窗 -->
|
||
<t-dialog :header="lang.order_text85" :footer="false" placement="center" width="600px"
|
||
:visible.sync="deliverVisile" destroy-on-close>
|
||
<t-form :data="deliverForm" :rules="rules" ref="deliverFormRef" label-align="left" @submit="deliverFormSubmit">
|
||
<!-- 部门 -->
|
||
<t-form-item :label="lang.order_text92" name="ticket_type_id">
|
||
<t-select clearable v-model="deliverForm.ticket_type_id" :keys="{ label: 'name', value: 'id' }"
|
||
:options="orderTypeData" :placeholder="lang.select">
|
||
</t-select>
|
||
</t-form-item>
|
||
<!-- 关联产品 -->
|
||
<t-form-item :label="lang.order_hosts" name="product_ids">
|
||
<t-tree-select :min-collapsed-num="1" v-model="deliverForm.product_ids" :data="deliveryProductList" multiple
|
||
clearable :placeholder="lang.select">
|
||
</t-tree-select>
|
||
</t-form-item>
|
||
<!-- 屏蔽词 -->
|
||
<t-form-item :label="lang.order_text93" name="blocked_words">
|
||
<t-textarea v-model="deliverForm.blocked_words" clearable :placeholder="lang.order_text96"
|
||
:autosize="{ minRows: 3 }">
|
||
</t-textarea>
|
||
</t-form-item>
|
||
<t-form-item class="turn-inside-dialog-footer">
|
||
<t-button theme="primary" type="submit" :loading="subDeliveryLoading">{{lang.hold}}</t-button>
|
||
<t-button theme="default" type="reset" @click="deliverVisile = false">{{lang.cancel}}</t-button>
|
||
</t-form-item>
|
||
</t-form>
|
||
</t-dialog>
|
||
<!-- 删除工单传递弹窗 -->
|
||
<t-dialog :visible.sync="deleteVisible" :header="lang.order_text94">
|
||
<template slot="footer">
|
||
<t-button theme="primary" @click="handelDelete" :loading="deliveryLoading">{{lang.sure}}</t-button>
|
||
<t-button theme="default" @click="deleteVisible = false">{{lang.cancel}}</t-button>
|
||
</template>
|
||
</t-dialog>
|
||
</t-card>
|
||
</com-config>
|
||
</div>
|
||
<script src="/tinymce/tinymce.min.js"></script>
|
||
<script src="/plugins/addon/idcsmart_ticket/template/admin/js/lang.js"></script>
|
||
<script src="/plugins/addon/idcsmart_ticket/template/admin/components/opinionButton.js"></script>
|
||
|
||
<script src="/{$template_catalog}/template/{$themes}/components/comTinymce/comTinymce.js"></script>
|
||
<script src="/plugins/addon/idcsmart_ticket/template/admin/api/order.js"></script>
|
||
<script src="/plugins/addon/idcsmart_ticket/template/admin/js/ticket_setting.js"></script>
|