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