feat:完成了工单接口(关单,删除,获取工单列表)的对接,工单详情对了一部分,将其代码copy到了历史和待处理工单
This commit is contained in:
@@ -1,17 +1,18 @@
|
||||
<template>
|
||||
<fvSearchForm :searchConfig="searchConfig" @search="search">
|
||||
<FvSelect></FvSelect>
|
||||
</fvSearchForm>
|
||||
<fvTable ref="tableIns" :tableConfig="tableConfig" :data="mockData" @headBtnClick="headBtnClick"></fvTable>
|
||||
<WorkDialog ref="workDialogRef"></WorkDialog>
|
||||
|
||||
<WorkDialog ref="workDialogRef" :rowData="rowData" />
|
||||
</template>
|
||||
|
||||
<script setup lang="jsx">
|
||||
import { shallowRef } from 'vue';
|
||||
import { isShallow, reactive, shallowRef } from 'vue';
|
||||
import fvSelect from '@/fvcomponents/fvSelect/index.vue'
|
||||
import WorkDialog from '../components/WorkDialog.vue';
|
||||
import { orderdDetele, orderdClose, orderAdd } from "@/api/order/order.js"
|
||||
|
||||
const rowData = ref()
|
||||
const isShow = ref(false)
|
||||
const workDialogRef = ref()
|
||||
const router = useRouter()
|
||||
const tableIns = ref()
|
||||
@@ -59,7 +60,6 @@ const searchConfig = reactive([
|
||||
cacheKey: 'work_order_status',
|
||||
clearable: true,
|
||||
filterable: true,
|
||||
filterable: true,
|
||||
},
|
||||
component: shallowRef(fvSelect),
|
||||
}, {
|
||||
@@ -83,7 +83,7 @@ const searchConfig = reactive([
|
||||
},
|
||||
{
|
||||
label: '创建日期',
|
||||
prop: 'requirementName',
|
||||
prop: 'requirementDate',
|
||||
props: {
|
||||
placeholder: '请选择',
|
||||
clearable: true,
|
||||
@@ -92,7 +92,7 @@ const searchConfig = reactive([
|
||||
component: 'el-date-picker',
|
||||
}, {
|
||||
label: '处理时间',
|
||||
prop: 'requirementName',
|
||||
prop: 'requirementDate',
|
||||
props: {
|
||||
placeholder: '请选择',
|
||||
clearable: true,
|
||||
@@ -101,7 +101,7 @@ const searchConfig = reactive([
|
||||
component: 'el-date-picker',
|
||||
}, {
|
||||
label: '完成时间',
|
||||
prop: 'requirementName',
|
||||
prop: 'requirementDate',
|
||||
props: {
|
||||
placeholder: '请选择',
|
||||
clearable: true,
|
||||
@@ -121,22 +121,25 @@ const tableConfig = reactive({
|
||||
width: 80,
|
||||
},
|
||||
{
|
||||
prop: 'workOrderNumber',
|
||||
prop: 'orderNumber',
|
||||
label: '工单号',
|
||||
align: 'center'
|
||||
align: 'center',
|
||||
width: 200
|
||||
},
|
||||
{
|
||||
prop: 'workOrderNumber',
|
||||
prop: 'siteName',
|
||||
label: '工单名称',
|
||||
align: 'center'
|
||||
align: 'center',
|
||||
width: 200
|
||||
},
|
||||
{
|
||||
prop: 'workOrderNumber',
|
||||
prop: 'orderContent',
|
||||
label: '工单内容',
|
||||
align: 'center'
|
||||
align: 'center',
|
||||
width: 200
|
||||
},
|
||||
{
|
||||
prop: 'state',
|
||||
prop: 'orderState',
|
||||
label: '工单状态',
|
||||
align: 'center',
|
||||
showOverflowTooltip: false,
|
||||
@@ -162,29 +165,29 @@ const tableConfig = reactive({
|
||||
}
|
||||
},
|
||||
{
|
||||
prop: 'workOrderNumber',
|
||||
prop: 'operationUser',
|
||||
label: '处理人',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'workOrderNumber',
|
||||
prop: 'processedContent',
|
||||
label: '处理内容',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'workOrderTime',
|
||||
prop: 'createTime',
|
||||
label: '创建时间',
|
||||
align: 'center',
|
||||
width: 200
|
||||
},
|
||||
{
|
||||
prop: 'workOrderTime',
|
||||
prop: 'processedTime',
|
||||
label: '处理时间',
|
||||
align: 'center',
|
||||
width: 200
|
||||
},
|
||||
{
|
||||
prop: 'workOrderTime',
|
||||
prop: 'completionTime',
|
||||
label: '完成时间',
|
||||
align: 'center',
|
||||
width: 200
|
||||
@@ -197,6 +200,8 @@ const tableConfig = reactive({
|
||||
width: 150,
|
||||
showOverflowTooltip: false,
|
||||
currentRender: ({ row, index }) => {
|
||||
// console.log(row);
|
||||
|
||||
let btn = []
|
||||
btn.push({ label: '详情', prem: auths.detail, func: () => handleDetail(row), type: 'primary' })
|
||||
btn.push({ label: '关单', prem: auths.detail, func: () => handleClose(row), type: 'primary' })
|
||||
@@ -220,14 +225,14 @@ const tableConfig = reactive({
|
||||
}
|
||||
}
|
||||
],
|
||||
api: '',
|
||||
api: '/order/list',
|
||||
params: {},
|
||||
btns: [
|
||||
// {name: '新增', key: 'add', color: '#DED0B2', auth: auths.report},
|
||||
]
|
||||
})
|
||||
const headBtnClick = (key) => {
|
||||
console.log(key);
|
||||
// console.log(key);
|
||||
|
||||
switch (key) {
|
||||
case 'add':
|
||||
@@ -238,9 +243,12 @@ const headBtnClick = (key) => {
|
||||
|
||||
const handleDetail = (row) => {
|
||||
workDialogRef.value.open(row)
|
||||
rowData.value = row
|
||||
}
|
||||
|
||||
const handleClose = (row) => {
|
||||
const handleClose = async (row) => {
|
||||
// console.log(row.orderNumber);
|
||||
|
||||
ElMessageBox.confirm(
|
||||
'确定要关单吗?',
|
||||
'温馨提示',
|
||||
@@ -250,7 +258,8 @@ const handleClose = (row) => {
|
||||
type: 'warning',
|
||||
}
|
||||
)
|
||||
.then(() => {
|
||||
.then(async () => {
|
||||
await orderdClose(row.orderNumber)
|
||||
ElMessage({
|
||||
type: 'success',
|
||||
message: '关闭成功',
|
||||
@@ -264,7 +273,8 @@ const handleClose = (row) => {
|
||||
})
|
||||
}
|
||||
|
||||
const handleDelete = (row) => {
|
||||
const handleDelete = async (row) => {
|
||||
|
||||
ElMessageBox.confirm(
|
||||
'确定要删除吗?',
|
||||
'温馨提示',
|
||||
@@ -274,7 +284,8 @@ const handleDelete = (row) => {
|
||||
type: 'warning',
|
||||
}
|
||||
)
|
||||
.then(() => {
|
||||
.then(async () => {
|
||||
await orderdDetele(row.orderNumber)
|
||||
ElMessage({
|
||||
type: 'success',
|
||||
message: '删除成功',
|
||||
|
||||
@@ -1,17 +1,18 @@
|
||||
<template>
|
||||
<fvSearchForm :searchConfig="searchConfig" @search="search">
|
||||
<FvSelect></FvSelect>
|
||||
</fvSearchForm>
|
||||
<fvTable ref="tableIns" :tableConfig="tableConfig" :data="mockData" @headBtnClick="headBtnClick"></fvTable>
|
||||
<WorkDialog ref="workDialogRef"></WorkDialog>
|
||||
|
||||
<WorkDialog ref="workDialogRef" :rowData="rowData" />
|
||||
</template>
|
||||
|
||||
<script setup lang="jsx">
|
||||
import { shallowRef } from 'vue';
|
||||
import { isShallow, reactive, shallowRef } from 'vue';
|
||||
import fvSelect from '@/fvcomponents/fvSelect/index.vue'
|
||||
import WorkDialog from '../components/WorkDialog.vue';
|
||||
import { orderdDetele, orderdClose, orderAdd } from "@/api/order/order.js"
|
||||
|
||||
const rowData = ref()
|
||||
const isShow = ref(false)
|
||||
const workDialogRef = ref()
|
||||
const router = useRouter()
|
||||
const tableIns = ref()
|
||||
@@ -59,7 +60,6 @@ const searchConfig = reactive([
|
||||
cacheKey: 'work_order_status',
|
||||
clearable: true,
|
||||
filterable: true,
|
||||
filterable: true,
|
||||
},
|
||||
component: shallowRef(fvSelect),
|
||||
}, {
|
||||
@@ -83,7 +83,7 @@ const searchConfig = reactive([
|
||||
},
|
||||
{
|
||||
label: '创建日期',
|
||||
prop: 'requirementName',
|
||||
prop: 'requirementDate',
|
||||
props: {
|
||||
placeholder: '请选择',
|
||||
clearable: true,
|
||||
@@ -92,7 +92,7 @@ const searchConfig = reactive([
|
||||
component: 'el-date-picker',
|
||||
}, {
|
||||
label: '处理时间',
|
||||
prop: 'requirementName',
|
||||
prop: 'requirementDate',
|
||||
props: {
|
||||
placeholder: '请选择',
|
||||
clearable: true,
|
||||
@@ -101,7 +101,7 @@ const searchConfig = reactive([
|
||||
component: 'el-date-picker',
|
||||
}, {
|
||||
label: '完成时间',
|
||||
prop: 'requirementName',
|
||||
prop: 'requirementDate',
|
||||
props: {
|
||||
placeholder: '请选择',
|
||||
clearable: true,
|
||||
@@ -121,22 +121,25 @@ const tableConfig = reactive({
|
||||
width: 80,
|
||||
},
|
||||
{
|
||||
prop: 'workOrderNumber',
|
||||
prop: 'orderNumber',
|
||||
label: '工单号',
|
||||
align: 'center'
|
||||
align: 'center',
|
||||
width: 200
|
||||
},
|
||||
{
|
||||
prop: 'workOrderNumber',
|
||||
prop: 'siteName',
|
||||
label: '工单名称',
|
||||
align: 'center'
|
||||
align: 'center',
|
||||
width: 200
|
||||
},
|
||||
{
|
||||
prop: 'workOrderNumber',
|
||||
prop: 'orderContent',
|
||||
label: '工单内容',
|
||||
align: 'center'
|
||||
align: 'center',
|
||||
width: 200
|
||||
},
|
||||
{
|
||||
prop: 'state',
|
||||
prop: 'orderState',
|
||||
label: '工单状态',
|
||||
align: 'center',
|
||||
showOverflowTooltip: false,
|
||||
@@ -162,29 +165,29 @@ const tableConfig = reactive({
|
||||
}
|
||||
},
|
||||
{
|
||||
prop: 'workOrderNumber',
|
||||
prop: 'operationUser',
|
||||
label: '处理人',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'workOrderNumber',
|
||||
prop: 'processedContent',
|
||||
label: '处理内容',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'workOrderTime',
|
||||
prop: 'createTime',
|
||||
label: '创建时间',
|
||||
align: 'center',
|
||||
width: 200
|
||||
},
|
||||
{
|
||||
prop: 'workOrderTime',
|
||||
prop: 'processedTime',
|
||||
label: '处理时间',
|
||||
align: 'center',
|
||||
width: 200
|
||||
},
|
||||
{
|
||||
prop: 'workOrderTime',
|
||||
prop: 'completionTime',
|
||||
label: '完成时间',
|
||||
align: 'center',
|
||||
width: 200
|
||||
@@ -197,6 +200,8 @@ const tableConfig = reactive({
|
||||
width: 150,
|
||||
showOverflowTooltip: false,
|
||||
currentRender: ({ row, index }) => {
|
||||
// console.log(row);
|
||||
|
||||
let btn = []
|
||||
btn.push({ label: '详情', prem: auths.detail, func: () => handleDetail(row), type: 'primary' })
|
||||
btn.push({ label: '关单', prem: auths.detail, func: () => handleClose(row), type: 'primary' })
|
||||
@@ -220,14 +225,14 @@ const tableConfig = reactive({
|
||||
}
|
||||
}
|
||||
],
|
||||
api: '',
|
||||
api: '/order/list',
|
||||
params: {},
|
||||
btns: [
|
||||
// {name: '新增', key: 'add', color: '#DED0B2', auth: auths.report},
|
||||
]
|
||||
})
|
||||
const headBtnClick = (key) => {
|
||||
console.log(key);
|
||||
// console.log(key);
|
||||
|
||||
switch (key) {
|
||||
case 'add':
|
||||
@@ -238,9 +243,12 @@ const headBtnClick = (key) => {
|
||||
|
||||
const handleDetail = (row) => {
|
||||
workDialogRef.value.open(row)
|
||||
rowData.value = row
|
||||
}
|
||||
|
||||
const handleClose = (row) => {
|
||||
const handleClose = async (row) => {
|
||||
// console.log(row.orderNumber);
|
||||
|
||||
ElMessageBox.confirm(
|
||||
'确定要关单吗?',
|
||||
'温馨提示',
|
||||
@@ -250,7 +258,8 @@ const handleClose = (row) => {
|
||||
type: 'warning',
|
||||
}
|
||||
)
|
||||
.then(() => {
|
||||
.then(async () => {
|
||||
await orderdClose(row.orderNumber)
|
||||
ElMessage({
|
||||
type: 'success',
|
||||
message: '关闭成功',
|
||||
@@ -264,7 +273,8 @@ const handleClose = (row) => {
|
||||
})
|
||||
}
|
||||
|
||||
const handleDelete = (row) => {
|
||||
const handleDelete = async (row) => {
|
||||
|
||||
ElMessageBox.confirm(
|
||||
'确定要删除吗?',
|
||||
'温馨提示',
|
||||
@@ -274,7 +284,8 @@ const handleDelete = (row) => {
|
||||
type: 'warning',
|
||||
}
|
||||
)
|
||||
.then(() => {
|
||||
.then(async () => {
|
||||
await orderdDetele(row.orderNumber)
|
||||
ElMessage({
|
||||
type: 'success',
|
||||
message: '删除成功',
|
||||
|
||||
Reference in New Issue
Block a user