|
@@ -78,6 +78,12 @@
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="说明" align="center" prop="explain" min-width="180" />
|
|
|
+ <el-table-column label="合同" align="center" min-width="180" >
|
|
|
+ <template #default="scope">
|
|
|
+ <el-button link type="primary" size="small" @click="viewContract(scope.row)"
|
|
|
+ v-hasPermi="['business:archive:order:edit']">查看</el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
<el-table-column label="委托时间" align="center" min-width="140">
|
|
|
<template #default="scope">
|
|
|
{{
|
|
@@ -114,6 +120,20 @@
|
|
|
}}
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
+ <el-table-column label="已收款" prop="arriveAmount" align="center" min-width="140">
|
|
|
+ <template #default="scope">
|
|
|
+ {{rowNum(scope.row.arriveAmount)}}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+
|
|
|
+ <el-table-column label="完成进度" align="center" prop="onWorkDetail" min-width="140">
|
|
|
+ <template #default="scope">
|
|
|
+ {{scope.row.onWorkDetail}}
|
|
|
+ <el-button link type="primary" icon="Edit" size="small" style="padding: 0"
|
|
|
+ @click="viewOnWorkDetail(scope.row)" />
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+
|
|
|
<el-table-column label="完成人" align="center" min-width="100">
|
|
|
<template #default="scope">
|
|
|
{{
|
|
@@ -132,6 +152,14 @@
|
|
|
}}
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
+ <el-table-column label="结果情况" align="center" min-width="140">
|
|
|
+ <template #default="scope">
|
|
|
+ {{ scope.row.record == null? '' : scope.row.record.status === 7 ?'暂停办理':scope.row.record.status === 5?'终止任务':scope.row.record.status === 1?'办理中':scope.row.record.status === 0?'未开始':'完成任务' }}
|
|
|
+
|
|
|
+ <el-button link type="primary" icon="Edit" size="small" style="padding: 0"
|
|
|
+ @click="viewResult(scope.row)" />
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
<el-table-column label="状态" align="center" width="100">
|
|
|
<template #default="scope">
|
|
|
<div :style="getStatusStyle(scope.row)">
|
|
@@ -178,15 +206,18 @@
|
|
|
<el-table-column label="操作" width="130" align="center" prop="">
|
|
|
<template #default="scope">
|
|
|
|
|
|
- <el-button v-if="scope.row.record != null && scope.row.record.status == 1" size="small" type="primary" link
|
|
|
- v-hasPermi="['business:production:onceWork:finished']" @click="finishedHandle(scope.row)">
|
|
|
+ <el-button v-if="scope.row.record != null && scope.row.record.status === 7" size="small" type="primary" link
|
|
|
+ v-hasPermi="['business:production:onceWork:finished']" @click="continueHandle(scope.row)">
|
|
|
+ 继续办理
|
|
|
+ </el-button>
|
|
|
+ <el-button v-if="scope.row.record != null && scope.row.record.status === 1 && scope.row.record.handlerId === useUserStore().user.userId" size="small" type="primary" link
|
|
|
+ v-hasPermi="['business:production:onceWork:finished']" @click="finishedHandle(scope.row)">
|
|
|
完成
|
|
|
</el-button>
|
|
|
- <el-button v-if="scope.row.record == null || scope.row.record.status == 0" size="small" type="primary" link
|
|
|
+ <el-button v-if="scope.row.record == null" size="small" type="primary" link
|
|
|
v-hasPermi="['business:production:onceWork:finished']" @click="finishedHandle2(scope.row)">
|
|
|
领取
|
|
|
</el-button>
|
|
|
-
|
|
|
<el-button
|
|
|
v-if="scope.row.record !== undefined && scope.row.record.status == 1 && scope.row.record.handlerId === useUserStore().user.userId"
|
|
|
size="small" type="primary" link v-hasPermi="['business:production:onceWork:finished']"
|
|
@@ -200,6 +231,9 @@
|
|
|
<!-- 分页 -->
|
|
|
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum"
|
|
|
v-model:limit="queryParams.pageSize" @pagination="getList" />
|
|
|
+ <contract-form ref="contractRef" :get-list="getContractList" />
|
|
|
+ <result-dialog ref="resultDialogView" :get-list="getList" />
|
|
|
+ <on-work-detail ref="onWorkDetailView" />
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -209,10 +243,14 @@
|
|
|
import {
|
|
|
listOnceWorkOrder,
|
|
|
saveDetail,
|
|
|
- exportOnceWork, receive
|
|
|
+ exportOnceWork,receive,continueHandleApi
|
|
|
} from "@/api/business/production/onceWorkOrder";
|
|
|
import { toRefs } from "vue";
|
|
|
import useUserStore from "@/store/modules/user";
|
|
|
+ import {listOrder} from "@/api/business/crm/contract";
|
|
|
+ import contractForm from "@/views/business/crm/order/form.vue"
|
|
|
+ import resultDialog from "@/views/business/production/onceWork/resultDialog.vue"
|
|
|
+ import onWorkDetail from "@/views/business/production/onWorkDetail/onWorkDetailDialog.vue"
|
|
|
const { proxy } = getCurrentInstance();
|
|
|
|
|
|
const data = reactive({
|
|
@@ -225,15 +263,28 @@
|
|
|
{
|
|
|
label: "办理中",
|
|
|
value: 1,
|
|
|
- color: "#FFB836",
|
|
|
+ color: "#ff8c00",
|
|
|
},
|
|
|
{
|
|
|
label: "已完成",
|
|
|
value: 3,
|
|
|
color: "#2FCB81",
|
|
|
},
|
|
|
-
|
|
|
-
|
|
|
+ {
|
|
|
+ label: "已完成(终止任务)",
|
|
|
+ value: 5,
|
|
|
+ color: "#2FCB81",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "已完成(完成任务)",
|
|
|
+ value: 6,
|
|
|
+ color: "#2FCB81",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "暂停中",
|
|
|
+ value: 7,
|
|
|
+ color: "#888",
|
|
|
+ },
|
|
|
],
|
|
|
});
|
|
|
|
|
@@ -251,11 +302,12 @@
|
|
|
const multiple = ref(false);
|
|
|
const total = ref(0);
|
|
|
const prev = ref([]);
|
|
|
+ const resultDialogView = ref();
|
|
|
const flag = ref(checkPermission(['business:once:person']))
|
|
|
const flag2 = ref(checkPermission(['business:once:myself']))
|
|
|
const activeName = flag.value ? ref('first') : ref('second');
|
|
|
const setEntrustDialogRef = ref(null);
|
|
|
-
|
|
|
+ const onWorkDetailView = ref();
|
|
|
const { contract_verify_status } = proxy.useDict("contract_verify_status");
|
|
|
const { contract_status } = proxy.useDict("contract_status");
|
|
|
/** 查询对象 */
|
|
@@ -367,28 +419,8 @@
|
|
|
}
|
|
|
|
|
|
function finishedHandle(row) {
|
|
|
- proxy.$modal
|
|
|
- .confirm("确认完成工单么?")
|
|
|
- .then((_) => {
|
|
|
-
|
|
|
- const finishedValue =
|
|
|
- row.record != null
|
|
|
- ? row.record
|
|
|
- : {
|
|
|
- companyId: row.companyId,
|
|
|
- workOrderId: row.id,
|
|
|
- tenantId: row.tenantId,
|
|
|
- status: 3,
|
|
|
- };
|
|
|
-
|
|
|
-
|
|
|
- loading.value = true
|
|
|
- saveDetail(finishedValue).then((res) => getList());
|
|
|
- })
|
|
|
- .catch((_) => {
|
|
|
- proxy.$modal.msgError("取消完成工单");
|
|
|
- }).finally(() => loading.value = false);
|
|
|
-
|
|
|
+ const id = row.id || ids.value;
|
|
|
+ resultDialogView.value.openView(id,row.record.status,row.record.handlerId,row.tenantId);
|
|
|
}
|
|
|
function finishedHandle2(row) {
|
|
|
proxy.$modal
|
|
@@ -412,6 +444,7 @@
|
|
|
}).finally(() => loading.value = false);
|
|
|
}
|
|
|
|
|
|
+
|
|
|
function finishedHandle3(row) {
|
|
|
proxy.$modal
|
|
|
.confirm("确认取消领取么?")
|
|
@@ -434,4 +467,44 @@
|
|
|
}).finally(() => loading.value = false);
|
|
|
}
|
|
|
getList();
|
|
|
+ const viewOnWorkDetail = (row) =>{
|
|
|
+ const id = row.id || ids.value;
|
|
|
+ onWorkDetailView.value.openView(id);
|
|
|
+ }
|
|
|
+ const viewContract = (row) =>{
|
|
|
+ const id = row.contractId || ids.value;
|
|
|
+ proxy.$refs.contractRef.open(id);
|
|
|
+ }
|
|
|
+ const viewResult = (row) =>{
|
|
|
+ const id = row.id || ids.value;
|
|
|
+ console.log(row.record.status!== 5)
|
|
|
+ resultDialogView.value.openView(id,row.record.status,row.record.handlerId,row.tenantId);
|
|
|
+ }
|
|
|
+ const rowNum = (num)=> {
|
|
|
+ if (!num) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ num = num.toLocaleString(); // 3,000
|
|
|
+ if (num.indexOf(".") == -1) {
|
|
|
+ num = num + ".00"; //3,000.00
|
|
|
+ } else if (num.charAt(num.indexOf(".") == num.length - 2)) {
|
|
|
+ num = num + "0";
|
|
|
+ }
|
|
|
+ return num;
|
|
|
+ }
|
|
|
+ const orderList = ref([]);
|
|
|
+ function getContractList() {
|
|
|
+ loading.value = true;
|
|
|
+ listOrder(queryParams.value).then((response) => {
|
|
|
+ orderList.value = response.rows;
|
|
|
+ total.value = response.total;
|
|
|
+ loading.value = false;
|
|
|
+ });
|
|
|
+ }
|
|
|
+ function continueHandle(row){
|
|
|
+ continueHandleApi(row.id).then((response) => {
|
|
|
+ proxy.$modal.msgSuccess("继续办理成功");
|
|
|
+ getList();
|
|
|
+ })
|
|
|
+ }
|
|
|
</script>
|