|
@@ -44,7 +44,32 @@
|
|
|
@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" min-width="250" prop="companyName" />
|
|
|
+ <el-table-column label="客户名称" align="center" min-width="250" prop="companyName" >
|
|
|
+ <template #default="scope">
|
|
|
+ <div style="display: flex; align-items: center; ">
|
|
|
+ <template v-if="scope.row.entrustExamine && scope.row.entrustExamine.status == 0">
|
|
|
+ <el-tooltip content="等待取消委托确认" placement="top">
|
|
|
+ <el-icon :size="15">
|
|
|
+ <Clock />
|
|
|
+ </el-icon>
|
|
|
+ </el-tooltip>
|
|
|
+ <span style="padding-left:5px;">{{ scope.row.companyName }}</span>
|
|
|
+ </template>
|
|
|
+ <template v-else-if="scope.row.entrustExamine && scope.row.entrustExamine.status == 2">
|
|
|
+ <el-tooltip :content="str+scope.row.entrustExamine.refuseReason" placement="top">
|
|
|
+ <el-icon :size="15" color="#E22121">
|
|
|
+ <WarnTriangleFilled />
|
|
|
+ </el-icon>
|
|
|
+ </el-tooltip>
|
|
|
+ <span style="padding-left:5px;">{{ scope.row.companyName }}</span>
|
|
|
+ </template>
|
|
|
+ <template v-else>
|
|
|
+ <div style="width: 20px; height: 15px;"></div>
|
|
|
+ <span>{{ scope.row.companyName }}</span>
|
|
|
+ </template>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
<el-table-column label="税号" align="center" prop="socialCreditCode" min-width="200" />
|
|
|
<el-table-column label="工单类型" align="center" prop="amount" min-width="90">
|
|
|
<template #default="scope">
|
|
@@ -102,6 +127,23 @@
|
|
|
<!-- 分页 -->
|
|
|
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum"
|
|
|
v-model:limit="queryParams.pageSize" @pagination="getList" />
|
|
|
+ <el-dialog title="取消委托" v-model="cancelEntrust" width="720px" append-to-body size="small" draggable
|
|
|
+ :close-on-click-modal="false">
|
|
|
+ <span style="font-size: 12px;">
|
|
|
+ {{companyName}} 的服务工厂已经开始了,<br>需要工厂确认才可以取消,请填写取消理由
|
|
|
+ </span>
|
|
|
+
|
|
|
+ <el-form-item label="取消理由" prop="cancelReason" style="margin-top: 10px">
|
|
|
+ <el-input v-model="form.cancelReason" type="textarea" placeholder="请输入取消理由" />
|
|
|
+ </el-form-item>
|
|
|
+ <template #footer>
|
|
|
+ <div class="dialog-footer">
|
|
|
+ <el-button type="primary" icon="Finished" size="small" @click="submitForm">确 定</el-button>
|
|
|
+ <el-button icon="close" size="small" @click="cancelEntrust = false">取 消</el-button>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-dialog>
|
|
|
+
|
|
|
<init-month-dialog ref="initMonthDialogRef" :get-list="getList" :setCurrentMonth="setCurrentMonth" />
|
|
|
<set-entrust-dialog ref="setEntrustDialogRef" :get-list="getList" @submit="handleAddEntrust" />
|
|
|
</div>
|
|
@@ -117,7 +159,7 @@
|
|
|
delEntrust,
|
|
|
addEntrust,
|
|
|
} from "@/api/business/entrust/nextWorkOrder";
|
|
|
- import { exportNextStore } from "@/api/business/entrust/currentWorkOrder";
|
|
|
+ import { exportNextStore ,saveExamine} from "@/api/business/entrust/currentWorkOrder";
|
|
|
import SetEntrustDialog from "../setEntrustDialog";
|
|
|
import useUserStore from "@/store/modules/user";
|
|
|
const { proxy } = getCurrentInstance();
|
|
@@ -136,10 +178,12 @@
|
|
|
const prev = ref([]);
|
|
|
const permissions = useUserStore().permissions;
|
|
|
const all_permission = "*:*:*";
|
|
|
-
|
|
|
+ const companyName = ref(null);
|
|
|
+ const str = ref("拒绝取消委托,原因:")
|
|
|
+ const form = ref({});
|
|
|
const initMonthDialogRef = ref(null);
|
|
|
const setEntrustDialogRef = ref(null);
|
|
|
-
|
|
|
+ const cancelEntrust = ref(false);
|
|
|
const showInitMonth = ref(false);
|
|
|
|
|
|
const { contract_verify_status } = proxy.useDict("contract_verify_status");
|
|
@@ -171,7 +215,21 @@
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
-
|
|
|
+ function submitForm() {
|
|
|
+ if (form.value.cancelReason == undefined || form.value.cancelReason == "") {
|
|
|
+ proxy.$modal.msgError("请输入取消原因");
|
|
|
+ }
|
|
|
+ form.value.workMonth = currentMonth.value,
|
|
|
+ form.value.nextFlag = 1
|
|
|
+ loading.value = true;
|
|
|
+ saveExamine(form.value).then((res) => {
|
|
|
+ proxy.$modal.msgSuccess("取消成功");
|
|
|
+ cancelEntrust.value = false
|
|
|
+ getList();
|
|
|
+ }).finally(() => {
|
|
|
+ loading.value = false;
|
|
|
+ })
|
|
|
+ }
|
|
|
//判断是否有权限
|
|
|
function viewAdviser(quer) {
|
|
|
return permissions.includes(all_permission) || permissions.includes(quer);
|
|
@@ -268,11 +326,30 @@
|
|
|
workMonth: currentMonth.value,
|
|
|
workOrderIds: ids.value,
|
|
|
};
|
|
|
+ // proxy.$modal.confirm("是否确认取消委托?").then(() => {
|
|
|
+ // delEntrust(entrust).then((res) => {
|
|
|
+ // proxy.$modal.msgSuccess("取消成功");
|
|
|
+ // getList();
|
|
|
+ // });
|
|
|
+ // });
|
|
|
proxy.$modal.confirm("是否确认取消委托?").then(() => {
|
|
|
+ loading.value = true; //
|
|
|
delEntrust(entrust).then((res) => {
|
|
|
- proxy.$modal.msgSuccess("取消成功");
|
|
|
- getList();
|
|
|
- });
|
|
|
+ if (res.data != null) {
|
|
|
+ companyName.value = res.data.companyName
|
|
|
+ form.value.workOrderIds = res.data.workOrderIds
|
|
|
+ // res.data.com
|
|
|
+ cancelEntrust.value = true;
|
|
|
+ } else {
|
|
|
+ proxy.$modal.msgSuccess("取消成功");
|
|
|
+ getList();
|
|
|
+ }
|
|
|
+ loading.value = false;
|
|
|
+ }).catch(() => {
|
|
|
+
|
|
|
+ }).finally(() => {
|
|
|
+ loading.value = false; // 确保在请求完成时也关闭加载状态
|
|
|
+ })
|
|
|
});
|
|
|
}
|
|
|
|