|
|
@@ -20,6 +20,9 @@
|
|
|
</el-button>
|
|
|
<template #dropdown>
|
|
|
<el-dropdown-menu>
|
|
|
+ <el-dropdown-item :disabled="!sysUpAndDownList.length" @click="handleCopy()">批量复制</el-dropdown-item>
|
|
|
+ <el-dropdown-item :disabled="!sysUpAndDownList.length" @click="handleUpdateValidDate()">批量设置有效期</el-dropdown-item>
|
|
|
+ <el-dropdown-item :disabled="!sysUpAndDownList.length" @click="handleUpdateCostRatio()">批量设置比例</el-dropdown-item>
|
|
|
<el-dropdown-item :disabled="!sysUpAndDownList.length" @click="batchDel">删除</el-dropdown-item>
|
|
|
<el-dropdown-item :disabled="!sysUpAndDownList.length" @click="batchdisable">禁用</el-dropdown-item>
|
|
|
<el-dropdown-item :disabled="!sysUpAndDownList.length" @click="batchenable">启用</el-dropdown-item>
|
|
|
@@ -30,6 +33,8 @@
|
|
|
<template v-slot:operation="scope">
|
|
|
<el-button type="primary" link @click="agreemenUpdate(scope.operationData)"> 编辑
|
|
|
</el-button>
|
|
|
+ <el-button type="primary" link @click="operatorTrajectoryRef.operAtorTrajectory(scope.operationData.id)"> 查看轨迹
|
|
|
+ </el-button>
|
|
|
<el-dropdown placement="bottom-start" trigger="click">
|
|
|
<span class="el-dropdown-link">
|
|
|
更 多
|
|
|
@@ -85,6 +90,69 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-dialog>
|
|
|
+ <el-dialog :close-on-click-modal="false" v-model="copyDialog2" title="批量设置有效期" width="500">
|
|
|
+ <el-form>
|
|
|
+ <el-form-item label="开始时间">
|
|
|
+ <el-date-picker v-model="effectiveTime" type="datetime" value-format="YYYY-MM-DD HH:mm:ss" />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="结束时间">
|
|
|
+ <el-date-picker v-model="failureTime" type="datetime" value-format="YYYY-MM-DD HH:mm:ss" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <template #footer>
|
|
|
+ <autoLoadingButton type="primary" :on-click="submitUpdate">确定</autoLoadingButton>
|
|
|
+ </template>
|
|
|
+ </el-dialog>
|
|
|
+ <el-dialog :close-on-click-modal="false" v-model="copyDialog3" title="批量设置比例" width="1000">
|
|
|
+ <el-form :model="costRatioForm" label-width="120px" inline>
|
|
|
+ <el-form-item label="操作类型" class="w-full">
|
|
|
+ <el-radio-group v-model="costRatioForm.operationType">
|
|
|
+ <el-radio value="ADD" size="large">增加</el-radio>
|
|
|
+ <el-radio value="SUBTRACT" size="large">减少</el-radio>
|
|
|
+ </el-radio-group>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="交强入口比例">
|
|
|
+ <el-input-number v-model="costRatioForm.jqInletRatio" :min="0" :max="100" :precision="2" :step="1" />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="商业入口比例">
|
|
|
+ <el-input-number v-model="costRatioForm.syInletRatio" :min="0" :max="100" :precision="2" :step="1" />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="驾意入口比例">
|
|
|
+ <el-input-number v-model="costRatioForm.jyInletRatio" :min="0" :max="100" :precision="2" :step="1" />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="交强出口比例">
|
|
|
+ <el-input-number v-model="costRatioForm.jqExportRatio" :min="0" :max="100" :precision="2" :step="1" />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="商业出口比例">
|
|
|
+ <el-input-number v-model="costRatioForm.syExportRatio" :min="0" :max="100" :precision="2" :step="1" />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="驾意出口比例">
|
|
|
+ <el-input-number v-model="costRatioForm.jyExportRatio" :min="0" :max="100" :precision="2" :step="1" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <template #footer>
|
|
|
+ <autoLoadingButton type="primary" :on-click="submitUpdate1">确定</autoLoadingButton>
|
|
|
+ </template>
|
|
|
+ </el-dialog>
|
|
|
+ <el-dialog :close-on-click-modal="false" v-model="copyDialog" title="复制" width="800">
|
|
|
+ <el-form inline>
|
|
|
+ <el-form-item label="协议">
|
|
|
+ <el-select style="width:300px" v-model="agreementId" placeholder="请选择协议" @change="changeAgreement" filterable>
|
|
|
+ <el-option v-for="item in agreementList" :key="item.id" :value="item.id"
|
|
|
+ :label="item.agreementTitle"></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="规则">
|
|
|
+ <el-select style="width:300px" :disabled="!agreementId" v-model="coverRuleId" placeholder="请选择规则">
|
|
|
+ <el-option v-for="(item, index) in rulesList" :key="item.id" :value="item.id"
|
|
|
+ :label="'承保规则一' + (index + 1)"></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <template #footer>
|
|
|
+ <el-button type="primary" @click="costitemCopy">确定</el-button>
|
|
|
+ </template>
|
|
|
+ </el-dialog>
|
|
|
<!-- 规则费用抽屉组件 -->
|
|
|
<ruleFeeDialog v-if="ruleFeeVisible" :ruleFeeVisible="ruleFeeVisible" :agreementInfo="AgreementInfo"
|
|
|
:RulesInfo="ruleInfo" @save="ruleFeeSave" @cancel="ruleFeeVisible = false" :handlingFee="handlingFeeInfo" />
|
|
|
@@ -92,6 +160,7 @@
|
|
|
<ruleFeeDialogEdit :ruleFeeVisible="ruleFeeEditVisible" :headerTitle="ruleFeeHeaderTitle" :isHideFoot="true"
|
|
|
:agreementInfo="AgreementInfo" :RulesInfo="ruleInfo" :costitemEditInfo="costitemEditInfo" @save="ruleFeeEditSave"
|
|
|
@cancel="ruleFeeEditVisible = false" />
|
|
|
+ <operatorTrajectory ref="operatorTrajectoryRef" />
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
@@ -102,6 +171,11 @@ import { ElMessage, ElMessageBox } from 'element-plus'
|
|
|
import { loadDicts, getDict } from '@/utils/composables/dictService';//字典组件
|
|
|
import ruleFeeDialog from "./agreement/components/ruleFeeDialog.vue";
|
|
|
import ruleFeeDialogEdit from "./agreement/components/ruleFeeDialogEdit.vue";
|
|
|
+import autoLoadingButton from "./agreement/components/autoLoadingButton.vue";
|
|
|
+
|
|
|
+import operatorTrajectory from "./agreement/components/operatorTrajectory.vue";
|
|
|
+const operatorTrajectoryRef = ref(null)
|
|
|
+
|
|
|
import api from '@/api';
|
|
|
interface PageInfo {
|
|
|
pageNum: number;
|
|
|
@@ -630,6 +704,133 @@ const ruleFeeSave = (data: object) => {
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
+
|
|
|
+const copyDialog2 = ref(false)
|
|
|
+const effectiveTime = ref()
|
|
|
+const failureTime = ref()
|
|
|
+const handleUpdateValidDate = () => {
|
|
|
+ if (!sysUpAndDownList.value.length) {
|
|
|
+ ElMessage.error('请选择费用')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ effectiveTime.value = ''
|
|
|
+ failureTime.value = ''
|
|
|
+ copyDialog2.value = true
|
|
|
+}
|
|
|
+const submitUpdate = () => {
|
|
|
+ const params = {
|
|
|
+ costIds: sysUpAndDownList.value,
|
|
|
+ effectiveTime: effectiveTime.value,
|
|
|
+ failureTime: failureTime.value,
|
|
|
+ }
|
|
|
+ api.agreementApi.agreementCostBatchUpdateValidDate(params).then((res: any) => {
|
|
|
+ if (res.code == '200') {
|
|
|
+ ElMessage.success('修改成功')
|
|
|
+ copyDialog2.value = false
|
|
|
+ findpage()
|
|
|
+ }
|
|
|
+ });
|
|
|
+}
|
|
|
+
|
|
|
+const copyDialog3 = ref(false)
|
|
|
+const costRatioForm = ref({})
|
|
|
+const handleUpdateCostRatio = () => {
|
|
|
+ if (!sysUpAndDownList.value.length) {
|
|
|
+ ElMessage.error('请选择费用')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ costRatioForm.value = {
|
|
|
+ operationType: 'ADD',
|
|
|
+ jqInletRatio: undefined,
|
|
|
+ syInletRatio: undefined,
|
|
|
+ jyInletRatio: undefined,
|
|
|
+ jqExportRatio: undefined,
|
|
|
+ syExportRatio: undefined,
|
|
|
+ jyExportRatio: undefined,
|
|
|
+ }
|
|
|
+ copyDialog3.value = true
|
|
|
+}
|
|
|
+const submitUpdate1 = () => {
|
|
|
+ const params = {
|
|
|
+ costIds: sysUpAndDownList.value,
|
|
|
+ ...costRatioForm.value
|
|
|
+ }
|
|
|
+ api.agreementApi.batchAdjustCostRatio(params).then((res: any) => {
|
|
|
+ if (res.code == '200') {
|
|
|
+ ElMessage.success('修改成功')
|
|
|
+ copyDialog3.value = false
|
|
|
+ findpage()
|
|
|
+ }
|
|
|
+ });
|
|
|
+}
|
|
|
+
|
|
|
+const copyDialog = ref(false)
|
|
|
+const costIds = ref([])
|
|
|
+const agreementId = ref('')
|
|
|
+const coverRuleId = ref('')
|
|
|
+const agreementList1 = ref([])
|
|
|
+const rulesList = ref([])
|
|
|
+/** 复制操作处理:记录当前行的ID并打开复制确认对话框 */
|
|
|
+const handleCopy = (row) => {
|
|
|
+ agreementId.value = ''
|
|
|
+ coverRuleId.value = ''
|
|
|
+ openDialog()
|
|
|
+}
|
|
|
+
|
|
|
+const openDialog = () => {
|
|
|
+ api.agreementApi.agreementList({ size: 10000, }).then((res: any) => {
|
|
|
+ if (res.code == '200') {
|
|
|
+ agreementList1.value = res.data.records;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ copyDialog.value = true
|
|
|
+}
|
|
|
+
|
|
|
+const changeAgreement = () => {
|
|
|
+ api.agreementApi.agreementRulesList(agreementId.value).then((res: any) => {
|
|
|
+ if (res.code == '200') {
|
|
|
+ rulesList.value = res.data
|
|
|
+ }
|
|
|
+ });
|
|
|
+}
|
|
|
+//复制费用
|
|
|
+const costitemCopy = () => {
|
|
|
+ if (!agreementId.value) {
|
|
|
+ ElMessage.warning('请选择协议')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (!coverRuleId.value) {
|
|
|
+ ElMessage.warning('请选择规则')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ ElMessageBox.confirm(
|
|
|
+ '确定要复制该费用,请确认是否复制?',
|
|
|
+ '复制费用',
|
|
|
+ {
|
|
|
+ confirmButtonText: '确定复制',
|
|
|
+ type: 'warning',
|
|
|
+ center: true,
|
|
|
+ confirmButtonClass: 'el-button--primary',
|
|
|
+ }
|
|
|
+ ).then(() => {
|
|
|
+ const params = {
|
|
|
+ costIds: costIds.value,
|
|
|
+ agreementId: agreementId.value,
|
|
|
+ coverRuleId: coverRuleId.value,
|
|
|
+ }
|
|
|
+ api.agreementApi.AgreementFeecopy(params).then((res: any) => {
|
|
|
+ if (res.code == '200') {
|
|
|
+ findpage();
|
|
|
+ ElMessage({
|
|
|
+ type: 'success',
|
|
|
+ message: res.msg,
|
|
|
+ plain: true,
|
|
|
+ })
|
|
|
+ copyDialog.value = false
|
|
|
+ }
|
|
|
+ });
|
|
|
+ })
|
|
|
+}
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|