|
@@ -2,11 +2,6 @@
|
|
|
<div class="page-container list-container">
|
|
|
<!-- 功能按钮区 -->
|
|
|
<div class="list-btns-container">
|
|
|
- <!-- <el-button type="primary" size="small" icon="Plus" @click="handleAdd"
|
|
|
- v-hasPermi="['business:workOrder:add']">新增</el-button> -->
|
|
|
-
|
|
|
- <!-- <el-button type="danger" size="small" icon="Delete" :disabled="multiple" @click="handleDelete"
|
|
|
- v-hasPermi="['business:workOrder:remove']">删除</el-button> -->
|
|
|
<el-dropdown>
|
|
|
<el-button type="primary" size="small">
|
|
|
其它<el-icon class="el-icon--right"><arrow-down /></el-icon>
|
|
@@ -16,10 +11,17 @@
|
|
|
<el-dropdown-item
|
|
|
icon="Download"
|
|
|
@click="handleExport"
|
|
|
- v-hasPermi="['business:workOrder:export']"
|
|
|
+ v-if="viewAdviser('business:workOrder:export')"
|
|
|
>
|
|
|
导出</el-dropdown-item
|
|
|
>
|
|
|
+ <el-dropdown-item
|
|
|
+ icon="Edit"
|
|
|
+ @click="handleSetContinue"
|
|
|
+ v-if="viewAdviser('business:workOrder:continue')"
|
|
|
+ >
|
|
|
+ 延续设置</el-dropdown-item
|
|
|
+ >
|
|
|
</el-dropdown-menu>
|
|
|
</template>
|
|
|
</el-dropdown>
|
|
@@ -75,7 +77,6 @@
|
|
|
@selection-change="handleSelectionChange"
|
|
|
>
|
|
|
<el-table-column type="selection" width="55" align="center" />
|
|
|
- <!-- <el-table-column label="工单号" align="center" prop="workOrderNo" width="200" /> -->
|
|
|
<el-table-column
|
|
|
label="客户名称"
|
|
|
align="center"
|
|
@@ -106,7 +107,7 @@
|
|
|
align="center"
|
|
|
prop="taskTypeName"
|
|
|
:resizable="false"
|
|
|
- min-width="120"
|
|
|
+ min-width="100"
|
|
|
>
|
|
|
<template #default="scope">
|
|
|
{{ scope.row.taskTypeName }}
|
|
@@ -117,6 +118,16 @@
|
|
|
}}
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ label="是否延续"
|
|
|
+ align="center"
|
|
|
+ prop="isContinue"
|
|
|
+ :resizable="false"
|
|
|
+ >
|
|
|
+ <template #default="scope">
|
|
|
+ {{ scope.row.isContinue === 0 ? "否" : "是" }}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
<el-table-column
|
|
|
label="合同状态"
|
|
|
align="center"
|
|
@@ -127,21 +138,6 @@
|
|
|
<template #default="scope">
|
|
|
<span v-if="scope.row.type === 1">{{ scope.row.closingMonth }}</span>
|
|
|
<span v-else>{{ scope.row.onceContractStatus }}</span>
|
|
|
- <!-- <el-select
|
|
|
- v-model="queryParams.status"
|
|
|
- type="text"
|
|
|
- placeholder="状态"
|
|
|
- :clearable="true"
|
|
|
- style="width: 130px"
|
|
|
- @clear="clearStatus"
|
|
|
- >
|
|
|
- <el-option
|
|
|
- v-for="item in selectStatus"
|
|
|
- :key="item.value"
|
|
|
- :label="item.label"
|
|
|
- :value="item.value"
|
|
|
- />
|
|
|
- </el-select> -->
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
@@ -265,6 +261,47 @@
|
|
|
@pagination="getList"
|
|
|
/>
|
|
|
<ZeroChangeDialog ref="zeroChangeDialogRef" :save-call-back="thenSave" />
|
|
|
+ <el-dialog
|
|
|
+ title="延续设置"
|
|
|
+ v-model="continueOpen"
|
|
|
+ width="500px"
|
|
|
+ append-to-body
|
|
|
+ draggable
|
|
|
+ @close="close"
|
|
|
+ >
|
|
|
+ <div style="padding: 8px 24px 16px 24px">
|
|
|
+ <el-form size="small" label-width="100px">
|
|
|
+ <el-form-item label="是否延续">
|
|
|
+ <el-select v-model="cont" placeholder="请选择" style="width: 100%">
|
|
|
+ <el-option
|
|
|
+ v-for="item in yesOrNo"
|
|
|
+ :key="item.label"
|
|
|
+ :label="item.label"
|
|
|
+ :value="item.value"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ </div>
|
|
|
+ <div class="form-btns-container" style="height: 40px">
|
|
|
+ <el-button
|
|
|
+ size="small"
|
|
|
+ style="float: right"
|
|
|
+ @click="close"
|
|
|
+ icon="close"
|
|
|
+ >
|
|
|
+ 取消</el-button
|
|
|
+ >
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ icon="Finished"
|
|
|
+ size="small"
|
|
|
+ style="float: right; margin-left: 12px; margin-right: 12px"
|
|
|
+ @click="handleSave"
|
|
|
+ >保存</el-button
|
|
|
+ >
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -274,16 +311,25 @@ import {
|
|
|
delWorkOrder,
|
|
|
exportWorkOrder,
|
|
|
updateWorkOrder,
|
|
|
+ setContract,
|
|
|
} from "@/api/business/crm/workOrder";
|
|
|
+import useUserStore from "@/store/modules/user";
|
|
|
+import { yesOrNo } from "@/utils/default";
|
|
|
+import { get } from "@vueuse/core";
|
|
|
+import { ref } from "vue";
|
|
|
import ZeroChangeDialog from "../ZeroChangeDialog";
|
|
|
const { proxy } = getCurrentInstance();
|
|
|
/** 字典数组区 */
|
|
|
/** 查询 对象 */
|
|
|
|
|
|
const orderList = ref([]);
|
|
|
+const permissions = useUserStore().permissions;
|
|
|
+const all_permission = "*:*:*";
|
|
|
+const continueOpen = ref(false);
|
|
|
const loading = ref(true);
|
|
|
const ids = ref([]);
|
|
|
const single = ref(true);
|
|
|
+const cont = ref(1);
|
|
|
const multiple = ref(true);
|
|
|
const total = ref(0);
|
|
|
const prev = ref([]);
|
|
@@ -332,6 +378,30 @@ function getList() {
|
|
|
});
|
|
|
}
|
|
|
|
|
|
+/** 搜索按钮操作 */
|
|
|
+function handleSetContinue() {
|
|
|
+ console.log(ids.value.length);
|
|
|
+ if (ids.value.length < 1) {
|
|
|
+ proxy.$modal.msgError("至少选择一条数据");
|
|
|
+ } else {
|
|
|
+ continueOpen.value = true;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+/** 延续设置保存操作 */
|
|
|
+function handleSave() {
|
|
|
+ setContract(ids.value, cont.value).then((response) => {
|
|
|
+ proxy.$modal.msgSuccess("保存成功");
|
|
|
+ continueOpen.value = false;
|
|
|
+ getList();
|
|
|
+ });
|
|
|
+}
|
|
|
+
|
|
|
+//判断是否有权限
|
|
|
+function viewAdviser(quer) {
|
|
|
+ return permissions.includes(all_permission) || permissions.includes(quer);
|
|
|
+}
|
|
|
+
|
|
|
/** 搜索按钮操作 */
|
|
|
function handleQuery() {
|
|
|
queryParams.value.pageNum = 1;
|
|
@@ -344,11 +414,14 @@ function resetQuery() {
|
|
|
handleQuery();
|
|
|
}
|
|
|
|
|
|
+function close() {
|
|
|
+ continueOpen.value = false;
|
|
|
+ cont.value = 1;
|
|
|
+}
|
|
|
+
|
|
|
// 多选框选中数据
|
|
|
function handleSelectionChange(selection) {
|
|
|
ids.value = selection.map((item) => item.id);
|
|
|
- single.value = selection.length != 1;
|
|
|
- multiple.value = !selection.length;
|
|
|
}
|
|
|
|
|
|
/** 新增按钮操作 */
|