|
|
@@ -1,11 +1,5 @@
|
|
|
<template>
|
|
|
- <el-dialog
|
|
|
- v-model="dialogVisible"
|
|
|
- title="其他情况"
|
|
|
- width="704px"
|
|
|
- :before-close="handleClose"
|
|
|
- align-center
|
|
|
- >
|
|
|
+ <el-dialog v-model="dialogVisible" title="其他情况" width="704px" :before-close="handleClose" align-center>
|
|
|
<div class="dialog-content">
|
|
|
<div class="left">
|
|
|
<div class="description-text">
|
|
|
@@ -14,44 +8,23 @@
|
|
|
|
|
|
<div class="section-title">将执行以下动作</div>
|
|
|
|
|
|
- <el-form
|
|
|
- ref="formRef"
|
|
|
- :model="formData"
|
|
|
- label-width="auto"
|
|
|
- class="action-form"
|
|
|
- >
|
|
|
- <el-form-item
|
|
|
- v-for="(item, index) in formData.actions"
|
|
|
- :key="item.keyid"
|
|
|
- :prop="`actions.${index}`"
|
|
|
- :error="item.actionJson.duplicateError"
|
|
|
- >
|
|
|
- <el-select
|
|
|
- v-model="item.actionCode"
|
|
|
- placeholder="请选择动作"
|
|
|
- style="width: 276px; margin-right: 9px"
|
|
|
- @change="(val) => handleActionChange(val, index)"
|
|
|
- @blur="() => checkDuplicate(index)"
|
|
|
- >
|
|
|
- <el-option
|
|
|
- v-for="dictItem in getAvailableActions(index)"
|
|
|
- :key="dictItem.value"
|
|
|
- :value="dictItem.value"
|
|
|
- :label="dictItem.label"
|
|
|
- />
|
|
|
+ <el-form ref="formRef" :model="formData" label-width="auto" class="action-form">
|
|
|
+ <el-form-item v-for="(item, index) in formData.actions" :key="item.keyid" :prop="`actions.${index}`"
|
|
|
+ :error="item.actionJson.duplicateError">
|
|
|
+ <el-select v-model="item.actionCode" placeholder="请选择动作" style="width: 276px; margin-right: 9px"
|
|
|
+ @change="(val) => handleActionChange(val, index)" @blur="() => checkDuplicate(index)">
|
|
|
+ <el-option v-for="dictItem in getAvailableActions(index)" :key="dictItem.value" :value="dictItem.value"
|
|
|
+ :label="dictItem.label" />
|
|
|
</el-select>
|
|
|
- <img
|
|
|
- src="@/assets/images/delete.png"
|
|
|
- alt="删除"
|
|
|
- style="width: 18px; height: 18px; cursor: pointer"
|
|
|
- @click="deleteItem(index)"
|
|
|
- v-if="formData.actions.length > 1"
|
|
|
- />
|
|
|
+ <img src="@/assets/images/delete.png" alt="删除" style="width: 18px; height: 18px; cursor: pointer"
|
|
|
+ @click="deleteItem(index)" v-if="formData.actions.length > 1" />
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
|
|
|
<el-button type="text" class="add-action-btn" @click="addItem">
|
|
|
- <el-icon><Plus /></el-icon>添加动作
|
|
|
+ <el-icon>
|
|
|
+ <Plus />
|
|
|
+ </el-icon>添加动作
|
|
|
</el-button>
|
|
|
</div>
|
|
|
|
|
|
@@ -63,177 +36,105 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<!-- 指定协议 -->
|
|
|
- <div
|
|
|
- v-if="
|
|
|
- formData.actions.length > 0 &&
|
|
|
- lastActionLabel === '报价失败指定协议'
|
|
|
- "
|
|
|
- style="margin-top: 20px"
|
|
|
- >
|
|
|
- <div
|
|
|
- style="
|
|
|
+ <div v-if="
|
|
|
+ formData.actions.length > 0 &&
|
|
|
+ lastActionLabel === '报价失败指定协议'
|
|
|
+ " style="margin-top: 20px">
|
|
|
+ <div style="
|
|
|
font-weight: 600;
|
|
|
font-size: 16px;
|
|
|
margin-bottom: 4px;
|
|
|
color: #333333;
|
|
|
- "
|
|
|
- >
|
|
|
+ ">
|
|
|
选择报价协议
|
|
|
</div>
|
|
|
<div style="font-size: 14px; color: #666666; margin-bottom: 12px">
|
|
|
不满足所有规则的车辆报价,将使用该协议报价
|
|
|
</div>
|
|
|
- <el-select
|
|
|
- v-model="
|
|
|
- formData.actions[formData.actions.length - 1].actionJson
|
|
|
- .agreementId
|
|
|
- "
|
|
|
- placeholder=""
|
|
|
- style="width: 304px"
|
|
|
- :rules="[
|
|
|
+ <el-select v-model="formData.actions[formData.actions.length - 1].actionJson
|
|
|
+ .agreementId
|
|
|
+ " placeholder="" style="width: 304px" :rules="[
|
|
|
{
|
|
|
required: lastActionLabel === '报价失败指定协议',
|
|
|
message: '请选择报价协议',
|
|
|
trigger: 'blur',
|
|
|
},
|
|
|
- ]"
|
|
|
- >
|
|
|
- <el-option
|
|
|
- v-for="item in agreementList"
|
|
|
- :key="item.id"
|
|
|
- :label="item.agreementName"
|
|
|
- :value="item.id"
|
|
|
- />
|
|
|
+ ]">
|
|
|
+ <el-option v-for="item in agreementList" :key="item.id" :label="item.agreementName" :value="item.id" />
|
|
|
</el-select>
|
|
|
</div>
|
|
|
<!-- 终止报价 -->
|
|
|
- <div
|
|
|
- v-if="formData.actions.length > 0 && lastActionLabel === '终止报价'"
|
|
|
- style="margin-top: 20px"
|
|
|
- >
|
|
|
- <div
|
|
|
- style="
|
|
|
+ <div v-if="formData.actions.length > 0 && lastActionLabel === '终止报价'" style="margin-top: 20px">
|
|
|
+ <div style="
|
|
|
font-weight: 600;
|
|
|
font-size: 16px;
|
|
|
margin-bottom: 4px;
|
|
|
color: #333333;
|
|
|
- "
|
|
|
- >
|
|
|
+ ">
|
|
|
提示文案
|
|
|
</div>
|
|
|
<div style="font-size: 14px; color: #666666; margin-bottom: 12px">
|
|
|
设置终止该车辆报价的提示文案
|
|
|
</div>
|
|
|
- <el-input
|
|
|
- v-model="
|
|
|
- formData.actions[formData.actions.length - 1].actionJson.message
|
|
|
- "
|
|
|
- style="width: 100%"
|
|
|
- :rows="4"
|
|
|
- type="textarea"
|
|
|
- placeholder="请输入提示文案"
|
|
|
- maxlength="500"
|
|
|
- show-word-limit
|
|
|
- />
|
|
|
+ <el-input v-model="formData.actions[formData.actions.length - 1].actionJson.message
|
|
|
+ " style="width: 100%" :rows="4" type="textarea" placeholder="请输入提示文案" maxlength="500" show-word-limit />
|
|
|
</div>
|
|
|
<!-- 补录订单 -->
|
|
|
- <div
|
|
|
- v-if="formData.actions.length > 0 && lastActionLabel === '补录订单'"
|
|
|
- >
|
|
|
+ <div v-if="formData.actions.length > 0 && lastActionLabel === '补录订单'">
|
|
|
<div style="font-size: 14px; color: #666666; margin-top: 10px">
|
|
|
终止报价,将报价信息写入补录订单内,生成一笔暂存的补录订单。
|
|
|
</div>
|
|
|
</div>
|
|
|
<!-- 发送通知消息 -->
|
|
|
- <div
|
|
|
- v-if="
|
|
|
- formData.actions.length > 0 && lastActionLabel === '发送通知消息'
|
|
|
- "
|
|
|
- style="margin-top: 20px"
|
|
|
- >
|
|
|
- <div
|
|
|
- style="
|
|
|
+ <div v-if="
|
|
|
+ formData.actions.length > 0 && lastActionLabel === '发送通知消息'
|
|
|
+ " style="margin-top: 20px">
|
|
|
+ <div style="
|
|
|
font-weight: 600;
|
|
|
font-size: 16px;
|
|
|
margin-bottom: 4px;
|
|
|
color: #333333;
|
|
|
- "
|
|
|
- >
|
|
|
+ ">
|
|
|
接收人
|
|
|
</div>
|
|
|
<div style="font-size: 14px; color: #666666; margin-bottom: 12px">
|
|
|
发送通知消息给接收人
|
|
|
</div>
|
|
|
- <el-radio-group
|
|
|
- v-model="
|
|
|
- formData.actions[formData.actions.length - 1].actionJson.type
|
|
|
- "
|
|
|
- @change="handleTypeChange"
|
|
|
- style="
|
|
|
+ <el-radio-group v-model="formData.actions[formData.actions.length - 1].actionJson.type
|
|
|
+ " @change="handleTypeChange" style="
|
|
|
display: flex;
|
|
|
flex-direction: column;
|
|
|
align-items: start;
|
|
|
gap: 12px;
|
|
|
- "
|
|
|
- >
|
|
|
+ ">
|
|
|
<el-radio :value="1">业务员的管理人</el-radio>
|
|
|
<el-radio :value="2">
|
|
|
指定人员
|
|
|
- <el-select
|
|
|
- v-model="
|
|
|
- formData.actions[formData.actions.length - 1].actionJson
|
|
|
- .user_id
|
|
|
- "
|
|
|
- placeholder="请选择人员"
|
|
|
- style="width: 204px; margin-left: 20px"
|
|
|
- clearable
|
|
|
- :disabled="
|
|
|
- formData.actions[formData.actions.length - 1].actionJson
|
|
|
+ <el-select v-model="formData.actions[formData.actions.length - 1].actionJson
|
|
|
+ .user_id
|
|
|
+ " placeholder="请选择人员" style="width: 204px; margin-left: 20px" clearable :disabled="formData.actions[formData.actions.length - 1].actionJson
|
|
|
.type !== 2
|
|
|
- "
|
|
|
- >
|
|
|
- <el-option
|
|
|
- v-for="item in followerList"
|
|
|
- :key="item.id"
|
|
|
- :label="item.name"
|
|
|
- :value="item.id"
|
|
|
- />
|
|
|
+ ">
|
|
|
+ <el-option v-for="item in followerList" :key="item.id" :label="item.name" :value="item.id" />
|
|
|
</el-select>
|
|
|
</el-radio>
|
|
|
</el-radio-group>
|
|
|
<div style="font-size: 14px; margin: 20px 0px 10px 0px">标题</div>
|
|
|
<div>
|
|
|
- <el-input
|
|
|
- v-model="
|
|
|
- formData.actions[formData.actions.length - 1].actionJson.title
|
|
|
- "
|
|
|
- style="width: 100%"
|
|
|
- placeholder="请输入标题"
|
|
|
- maxlength="50"
|
|
|
- show-word-limit
|
|
|
- />
|
|
|
+ <el-input v-model="formData.actions[formData.actions.length - 1].actionJson.title
|
|
|
+ " style="width: 100%" placeholder="请输入标题" maxlength="50" show-word-limit />
|
|
|
</div>
|
|
|
<div style="font-size: 14px; margin: 20px 0px 10px 0px">内容</div>
|
|
|
- <el-input
|
|
|
- v-model="
|
|
|
- formData.actions[formData.actions.length - 1].actionJson.content
|
|
|
- "
|
|
|
- style="width: 100%"
|
|
|
- :rows="4"
|
|
|
- type="textarea"
|
|
|
- placeholder="请输入通知内容"
|
|
|
- maxlength="500"
|
|
|
- show-word-limit
|
|
|
- />
|
|
|
+ <el-input v-model="formData.actions[formData.actions.length - 1].actionJson.content
|
|
|
+ " style="width: 100%" :rows="4" type="textarea" placeholder="请输入通知内容" maxlength="500" show-word-limit />
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
<template #footer>
|
|
|
<div class="dialog-footer">
|
|
|
- <el-button class="border-[#0083FF] color-[#0083FF]" plain @click="(dialogVisible = false), emit('close')"
|
|
|
- >取消</el-button
|
|
|
- >
|
|
|
+ <el-button class="border-[#0083FF] color-[#0083FF]" plain
|
|
|
+ @click="(dialogVisible = false), emit('close')">取消</el-button>
|
|
|
<el-button type="primary" @click="handleSave">保存</el-button>
|
|
|
</div>
|
|
|
</template>
|
|
|
@@ -567,7 +468,7 @@ onMounted(async () => {
|
|
|
dictionaries.value = dictData || [];
|
|
|
followerList.value = userList;
|
|
|
// formData.value.companyId = props.companyId;
|
|
|
- console.log( props.companyId);
|
|
|
+ console.log(props.companyId);
|
|
|
});
|
|
|
|
|
|
/**
|
|
|
@@ -644,6 +545,7 @@ watch(
|
|
|
.add-action-btn {
|
|
|
margin-top: 8px;
|
|
|
color: #409eff;
|
|
|
+
|
|
|
&:hover {
|
|
|
color: #66b1ff;
|
|
|
}
|