|
@@ -79,6 +79,7 @@
|
|
<div class="table-operations" @click.stop>
|
|
<div class="table-operations" @click.stop>
|
|
<template v-if="perm.LINK_Delimit || perm.LINK_ReDelimit">
|
|
<template v-if="perm.LINK_Delimit || perm.LINK_ReDelimit">
|
|
<t-link
|
|
<t-link
|
|
|
|
+ v-if="row.serviceUnitStatus !== 'FINISH'"
|
|
theme="primary"
|
|
theme="primary"
|
|
hover="color"
|
|
hover="color"
|
|
@click="handleDelineation(row)"
|
|
@click="handleDelineation(row)"
|
|
@@ -86,14 +87,16 @@
|
|
{{ row.serviceId ? '重新划定' : '划定' }}
|
|
{{ row.serviceId ? '重新划定' : '划定' }}
|
|
</t-link>
|
|
</t-link>
|
|
</template>
|
|
</template>
|
|
- <t-link
|
|
|
|
- v-if="perm.LINK_Update"
|
|
|
|
- theme="primary"
|
|
|
|
- hover="color"
|
|
|
|
- @click="handleEdit(row)"
|
|
|
|
- >
|
|
|
|
- 修改
|
|
|
|
- </t-link>
|
|
|
|
|
|
+ <template v-if="perm.LINK_Update">
|
|
|
|
+ <t-link
|
|
|
|
+ v-if="row.serviceUnitStatus !== 'FINISH'"
|
|
|
|
+ theme="primary"
|
|
|
|
+ hover="color"
|
|
|
|
+ @click="handleEdit(row)"
|
|
|
|
+ >
|
|
|
|
+ 修改
|
|
|
|
+ </t-link>
|
|
|
|
+ </template>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
</t-table>
|
|
</t-table>
|
|
@@ -112,6 +115,7 @@
|
|
"
|
|
"
|
|
v-model:visible="showMultDelineationDialog"
|
|
v-model:visible="showMultDelineationDialog"
|
|
:crm-ids="curCrmIds"
|
|
:crm-ids="curCrmIds"
|
|
|
|
+ :custom-type="curCrmCustomType"
|
|
:dialog-title="curRow?.serviceId ? '重新划定服务单元' : undefined"
|
|
:dialog-title="curRow?.serviceId ? '重新划定服务单元' : undefined"
|
|
@success="refresh"
|
|
@success="refresh"
|
|
>
|
|
>
|
|
@@ -195,12 +199,15 @@ import { timestampFilter, customerTypeFilter } from '@/utils/filter';
|
|
const showMultDelineationDialog = ref(false);
|
|
const showMultDelineationDialog = ref(false);
|
|
const curRow = ref(null);
|
|
const curRow = ref(null);
|
|
const curCrmIds = ref([]);
|
|
const curCrmIds = ref([]);
|
|
|
|
+const curCrmCustomType = ref('');
|
|
const showAddDispatchDialog = ref(false);
|
|
const showAddDispatchDialog = ref(false);
|
|
let waitCount = ref(0);
|
|
let waitCount = ref(0);
|
|
|
|
|
|
const selectedRowKeys = ref([]);
|
|
const selectedRowKeys = ref([]);
|
|
-const selectChange = (value) => {
|
|
|
|
|
|
+const selectedRows = ref([]);
|
|
|
|
+const selectChange = (value, { selectedRowData }) => {
|
|
selectedRowKeys.value = value;
|
|
selectedRowKeys.value = value;
|
|
|
|
+ selectedRows.value = selectedRowData;
|
|
};
|
|
};
|
|
|
|
|
|
const fields = ref([
|
|
const fields = ref([
|
|
@@ -367,8 +374,15 @@ const handleMultDelineation = () => {
|
|
MessagePlugin.error('请选择要划定的记录');
|
|
MessagePlugin.error('请选择要划定的记录');
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ const customType = selectedRows.value[0].customType;
|
|
|
|
+ if (selectedRows.value.some((item) => item.customType !== customType)) {
|
|
|
|
+ MessagePlugin.error('只能操作统一客户类型的数据');
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
curRow.value = null;
|
|
curRow.value = null;
|
|
curCrmIds.value = selectedRowKeys.value;
|
|
curCrmIds.value = selectedRowKeys.value;
|
|
|
|
+ curCrmCustomType.value = customType;
|
|
showMultDelineationDialog.value = true;
|
|
showMultDelineationDialog.value = true;
|
|
};
|
|
};
|
|
const handleDelineation = (row) => {
|
|
const handleDelineation = (row) => {
|
|
@@ -382,12 +396,14 @@ const handleDelineation = (row) => {
|
|
confirmDia.hide();
|
|
confirmDia.hide();
|
|
curRow.value = row;
|
|
curRow.value = row;
|
|
curCrmIds.value = [curRow.value.id];
|
|
curCrmIds.value = [curRow.value.id];
|
|
|
|
+ curCrmCustomType.value = curRow.customType;
|
|
showMultDelineationDialog.value = true;
|
|
showMultDelineationDialog.value = true;
|
|
},
|
|
},
|
|
});
|
|
});
|
|
} else {
|
|
} else {
|
|
curRow.value = row;
|
|
curRow.value = row;
|
|
curCrmIds.value = [curRow.value.id];
|
|
curCrmIds.value = [curRow.value.id];
|
|
|
|
+ curCrmCustomType.value = curRow.customType;
|
|
showMultDelineationDialog.value = true;
|
|
showMultDelineationDialog.value = true;
|
|
}
|
|
}
|
|
};
|
|
};
|