Browse Source

工单需求

ops-management-platform-frontend-dev
wbc 2 weeks ago
parent
commit
808701c525
  1. 2
      src/views/IO/workOrder/orderAudit/auditModal.vue
  2. 6
      src/views/IO/workOrder/orderHandle/data.ts
  3. 51
      src/views/IO/workOrder/orderHandle/index.vue
  4. 1
      src/views/IO/workOrder/orderSend/sendModal.vue
  5. 1
      src/views/project/contractManage/data.ts
  6. 2
      src/views/project/serviceManage/addModal.vue
  7. 40
      src/views/property/point/addModal.vue
  8. 12
      src/views/property/point/api.ts
  9. 29
      src/views/property/point/index.vue

2
src/views/IO/workOrder/orderAudit/auditModal.vue

@ -133,6 +133,8 @@
if (status.value == 5) { if (status.value == 5) {
form.isCloseCase = '是'; form.isCloseCase = '是';
} }
form.otherCost = 0
form.otherCostReason = '无'
}; };
const handleOk = () => { const handleOk = () => {

6
src/views/IO/workOrder/orderHandle/data.ts

@ -81,8 +81,12 @@ export const columns: BasicColumn[] = [
dataIndex: 'faultLocation', dataIndex: 'faultLocation',
}, },
{ {
title: '剩余时间', title: '剩余处理时间',
dataIndex: 'restTime', dataIndex: 'restTime',
},
{
title: '剩余接单时间',
dataIndex: 'orderAcceptDeadline',
}, },
{ {
title: '当前状态', title: '当前状态',

51
src/views/IO/workOrder/orderHandle/index.vue

@ -12,9 +12,30 @@
> >
<a-button type="link" v-if="record.status == 1">接单</a-button> <a-button type="link" v-if="record.status == 1">接单</a-button>
</a-popconfirm> </a-popconfirm>
<a-button type="link" @click="handle(record.id)" v-if="record.status==2||record.status==7">处理</a-button> <a-button
<a-button type="link" @click="back(record.id)" v-if="record.status==2||record.status==7">回退</a-button> type="link"
<a-button type="link" @click="delay(record.id)" v-if="record.status==2||record.status==7">延期</a-button> @click="handle(record.id)"
v-if="record.status == 2 || record.status == 7"
>处理</a-button
>
<a-button
type="link"
@click="back(record.id)"
v-if="record.status == 2 || record.status == 7"
>回退</a-button
>
<a-button
type="link"
@click="delay(record.id)"
v-if="record.status == 2 || record.status == 7"
>延期</a-button
>
</template>
<template v-if="column && record && column.key === 'restTime'">
<span style="color: red">{{ record.restTime }}</span>
</template>
<template v-if="column && record && column.key === 'orderAcceptDeadline'">
<span style="color: red">{{ record.orderAcceptDeadline }}</span>
</template> </template>
</template> </template>
</BasicTable> </BasicTable>
@ -67,21 +88,21 @@
detailDrawerRef.value.showDrawer(id); detailDrawerRef.value.showDrawer(id);
}; };
const receive = async (id: any) => { const receive = async (id: any) => {
await takeOrder(id) await takeOrder(id);
reload(); reload();
}; };
const backModalRef = ref() const backModalRef = ref();
const back = (id: any) => { const back = (id: any) => {
backModalRef.value.showModal(id) backModalRef.value.showModal(id);
} };
const delayModalRef = ref() const delayModalRef = ref();
const delay = (id: any) => { const delay = (id: any) => {
delayModalRef.value.showModal(id) delayModalRef.value.showModal(id);
} };
const handleModalRef = ref() const handleModalRef = ref();
const handle = (id: any) => { const handle = (id: any) => {
handleModalRef.value.showModal(id) handleModalRef.value.showModal(id);
} };
const projectOptions = ref([]); const projectOptions = ref([]);
const getProjectOptions = async () => { const getProjectOptions = async () => {
const res = await getProjectInfo(); const res = await getProjectInfo();
@ -97,8 +118,8 @@
}; };
getOptions(); getOptions();
onActivated(() => { onActivated(() => {
reload() reload();
}) });
// //
</script> </script>

1
src/views/IO/workOrder/orderSend/sendModal.vue

@ -127,6 +127,7 @@
for (let i in form) { for (let i in form) {
form[i] = data[i]; form[i] = data[i];
} }
form.dispatchOpinion = ''
const res = await getContractNamesByProjectName({ projectName: form.projectName }); const res = await getContractNamesByProjectName({ projectName: form.projectName });
contractNameOptions.value = res; contractNameOptions.value = res;
}; };

1
src/views/project/contractManage/data.ts

@ -20,6 +20,7 @@ export const columns: BasicColumn[] = [
{ {
title: '合同名称', title: '合同名称',
dataIndex: 'contractName', dataIndex: 'contractName',
width:300
}, },
{ {
title: '合同金额(万元)', title: '合同金额(万元)',

2
src/views/project/serviceManage/addModal.vue

@ -47,7 +47,7 @@
> >
<a-input <a-input
v-model:value="form.frequency" v-model:value="form.frequency"
placeholder="例如1日1次,1月一次" placeholder="例如1日1次,1周1次"
/> />
</a-form-item> </a-form-item>
</a-col> </a-col>

40
src/views/property/point/addModal.vue

@ -18,6 +18,24 @@
</a-form-item> </a-form-item>
</a-col> </a-col>
</a-row> </a-row>
<a-row :gutter="[16, 16]">
<a-col :span="24">
<a-form-item label="所属合同" name="contractName">
<a-select
v-model:value="form.contractName"
:options="contractNameOptions"
placeholder="请选择"
:disabled="!form.projectName"
:fieldNames="{
label: 'contractName',
value: 'contractName',
options: 'options',
}"
@change="contractNameChange"
/>
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="[16, 16]"> <a-row :gutter="[16, 16]">
<a-col :span="24"> <a-col :span="24">
<a-form-item label="所属机构" name="organizationName"> <a-form-item label="所属机构" name="organizationName">
@ -89,6 +107,8 @@
getProjectInfo, getProjectInfo,
getOrganizationType, getOrganizationType,
getContractPartyBNameByProjectName, getContractPartyBNameByProjectName,
getIoCompanyByName,
getContractNamesByProjectName,
} from './api'; } from './api';
export default { export default {
setup(props, { emit }) { setup(props, { emit }) {
@ -117,6 +137,7 @@
const res = await getOrganizationType(); const res = await getOrganizationType();
organizationNameOptions.value = res.rows; organizationNameOptions.value = res.rows;
}; };
const contractNameOptions = ref([]);
const showModal = async (type, id, projectId, selectInfo) => { const showModal = async (type, id, projectId, selectInfo) => {
console.log(selectInfo); console.log(selectInfo);
visible.value = true; visible.value = true;
@ -125,10 +146,12 @@
title.value = '新增'; title.value = '新增';
form.projectName = selectInfo.node.ownerName; form.projectName = selectInfo.node.ownerName;
form.organizationName = selectInfo.node.projectName; form.organizationName = selectInfo.node.projectName;
const res = await getContractPartyBNameByProjectName({ const res = await getContractNamesByProjectName({ projectName: form.projectName });
projectName: selectInfo.node.ownerName, contractNameOptions.value = res;
}); // const res = await getContractPartyBNameByProjectName({
form.maintenanceUnit = res; // projectName: selectInfo.node.ownerName,
// });
// form.maintenanceUnit = res;
initMap(); initMap();
} else if (type == 2) { } else if (type == 2) {
title.value = '编辑'; title.value = '编辑';
@ -136,13 +159,18 @@
for (let i in form) { for (let i in form) {
form[i] = data[i]; form[i] = data[i];
} }
const res = await getContractNamesByProjectName({ projectName: form.projectName });
contractNameOptions.value = res;
initMap(); initMap();
} }
form.projectId = projectId; form.projectId = projectId;
getProjectNameOptions(); getProjectNameOptions();
getOrganizationNameOptions(); getOrganizationNameOptions();
}; };
const contractNameChange = async (val) => {
const res = await getIoCompanyByName(val);
form.maintenanceUnit = res;
};
const handleOk = () => { const handleOk = () => {
formRef.value.validate().then((valid) => { formRef.value.validate().then((valid) => {
if (valid) { if (valid) {
@ -246,6 +274,8 @@
closeModal, closeModal,
formRef, formRef,
rules, rules,
contractNameChange,
contractNameOptions,
}; };
}, },
}; };

12
src/views/property/point/api.ts

@ -13,7 +13,8 @@ enum Api {
getContractNamesByProjectName = '/platform/contractInfo/getContractNamesByProjectName', getContractNamesByProjectName = '/platform/contractInfo/getContractNamesByProjectName',
getIoCompanyByName = '/platform/contractInfo/getIoCompany', getIoCompanyByName = '/platform/contractInfo/getIoCompany',
getContractPartyBNameByProjectName = '/platform/projectInfo/getContractPartyBNameByProjectName', getContractPartyBNameByProjectName = '/platform/projectInfo/getContractPartyBNameByProjectName',
upload = '/platform/excel/uploadPointInfo', uploadPointInfo = '/platform/excel/uploadPointInfo',
uploadWorkOrderInfo = '/platform/excel/uploadWorkOrderInfo',
} }
export function list(params: any) { export function list(params: any) {
@ -31,7 +32,14 @@ export function getInfo(id: ID) {
} }
export function listUpload(params: any) { export function listUpload(params: any) {
return defHttp.post({ return defHttp.post({
url: Api.upload, url: Api.uploadPointInfo,
headers: { 'Content-Type': 'multipart/form-data' },
params,
});
}
export function uploadWorkOrderInfo(params: any) {
return defHttp.post({
url: Api.uploadWorkOrderInfo,
headers: { 'Content-Type': 'multipart/form-data' }, headers: { 'Content-Type': 'multipart/form-data' },
params, params,
}); });

29
src/views/property/point/index.vue

@ -28,9 +28,16 @@
> >
<a-button type="primary"> 导入 </a-button> <a-button type="primary"> 导入 </a-button>
</a-upload> </a-upload>
<a-upload
<a-button name="file"
@click="downloadExcel(exportExcel, '点位信息', getForm().getFieldsValue())" :before-upload="reportUpload"
@change="reportChange"
:showUploadList="false"
v-if="checkedTree.length > 0"
>
<a-button type="primary"> 批量点位上报 </a-button>
</a-upload>
<a-button @click="downloadExcel(exportExcel, '点位信息', getForm().getFieldsValue())"
>导出</a-button >导出</a-button
> >
</template> </template>
@ -61,13 +68,14 @@
<script setup lang="ts"> <script setup lang="ts">
import { PageWrapper } from '@/components/Page'; import { PageWrapper } from '@/components/Page';
import { BasicTable, useTable } from '@/components/Table'; import { BasicTable, useTable } from '@/components/Table';
import { list, tree, removeByIds, listUpload ,exportExcel} from './api'; import { list, tree, removeByIds, listUpload, exportExcel,uploadWorkOrderInfo} from './api';
import { formSchemas, columns } from './data'; import { formSchemas, columns } from './data';
import detailDrawer from './detailDrawer.vue'; import detailDrawer from './detailDrawer.vue';
import addModal from './addModal.vue'; import addModal from './addModal.vue';
import { ref, onMounted } from 'vue'; import { ref, onMounted } from 'vue';
import pointModal from './pointModal.vue'; import pointModal from './pointModal.vue';
import { downloadExcel } from '@/utils/file/download'; import { downloadExcel } from '@/utils/file/download';
import { message } from 'ant-design-vue';
defineOptions({ name: 'Point' }); defineOptions({ name: 'Point' });
const [registerTable, { getForm, reload }] = useTable({ const [registerTable, { getForm, reload }] = useTable({
@ -148,6 +156,19 @@
return false; return false;
}; };
const importChange = () => { const importChange = () => {
message.success('导入成功');
reload();
};
const reportUpload = async (file: any) => {
console.log(file);
const params = {
file: file,
};
await uploadWorkOrderInfo(params);
return false;
};
const reportChange = () => {
message.success('导入成功');
reload(); reload();
}; };
onMounted(() => { onMounted(() => {

Loading…
Cancel
Save