|
@@ -17,7 +17,21 @@
|
|
</a-tabs></template
|
|
</a-tabs></template
|
|
>
|
|
>
|
|
<div class="desc-wrap-BasicTable">
|
|
<div class="desc-wrap-BasicTable">
|
|
- <BasicTable @register="registerTable">
|
|
|
|
|
|
+ <BasicTable @register="registerTable" v-show="tableType == null">
|
|
|
|
+ <template #action="{ record }">
|
|
|
|
+ <TableAction
|
|
|
|
+ stopButtonPropagation
|
|
|
|
+ :actions="[
|
|
|
|
+ {
|
|
|
|
+ label: '详情',
|
|
|
|
+ //ifShow:getCheckPerm('work_detail'),
|
|
|
|
+ onClick: handleDetail.bind(null, record),
|
|
|
|
+ },
|
|
|
|
+ ]"
|
|
|
|
+ />
|
|
|
|
+ </template>
|
|
|
|
+ </BasicTable>
|
|
|
|
+ <BasicTable @register="registerTable1" v-show="tableType != null">
|
|
<template #action="{ record }">
|
|
<template #action="{ record }">
|
|
<TableAction
|
|
<TableAction
|
|
stopButtonPropagation
|
|
stopButtonPropagation
|
|
@@ -75,101 +89,9 @@ export default defineComponent({
|
|
onMounted(() => {
|
|
onMounted(() => {
|
|
// console.log(router.currentRoute.value.params.id);
|
|
// console.log(router.currentRoute.value.params.id);
|
|
});
|
|
});
|
|
- const columns: BasicColumn[] = [
|
|
|
|
- {
|
|
|
|
- title: '报修日期',
|
|
|
|
- dataIndex: 'createTime',
|
|
|
|
- width: 180,
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- title: '客户名称',
|
|
|
|
- dataIndex: 'customerName',
|
|
|
|
- width: 80,
|
|
|
|
- // customRender: ({ record }) => {
|
|
|
|
- // return t(`routes.equity.operation.${record.operationType || 0}`);
|
|
|
|
- // },
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- title: '产品类型',
|
|
|
|
- dataIndex: 'cameraType',
|
|
|
|
- width: 80,
|
|
|
|
- customRender: ({ record }) => {
|
|
|
|
- return t(`routes.scene.tableType.${record.cameraType || 0}`);
|
|
|
|
- },
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- title: '产品SN码',
|
|
|
|
- dataIndex: 'cameraSnCode',
|
|
|
|
- width: 100,
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- title: '报修方式',
|
|
|
|
- dataIndex: 'receiverType',
|
|
|
|
- width: 100,
|
|
|
|
- customRender: ({ record }) => {
|
|
|
|
- return record.receiverType == 0 ? '系统录单' : '公众号报修';
|
|
|
|
- },
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- title: '保修类型',
|
|
|
|
- dataIndex: 'warrantyType',
|
|
|
|
- width: 100,
|
|
|
|
- customRender: ({ record }) => {
|
|
|
|
- return record.warrantyType == 0 ? '保修期内' : record.warrantyType == 1 ? '保修期外' : '非保修项目';
|
|
|
|
- },
|
|
|
|
- },{
|
|
|
|
- title: '售后工程师',
|
|
|
|
- dataIndex: 'saleName',
|
|
|
|
- width: 100,
|
|
|
|
- },{
|
|
|
|
- title: '接单日期',
|
|
|
|
- dataIndex: 'orderReceivingTime',
|
|
|
|
- width: 150,
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- title: '故障分析',
|
|
|
|
- dataIndex: 'checkResult',
|
|
|
|
- width: 100,
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- title: '维修工程师',
|
|
|
|
- dataIndex: 'repairManName',
|
|
|
|
- width: 100,
|
|
|
|
- },{
|
|
|
|
- title: '维修完成日期',
|
|
|
|
- dataIndex: 'repairOverTime',
|
|
|
|
- width: 150,
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- title: '状态',
|
|
|
|
- dataIndex: 'status',
|
|
|
|
- width: 100,
|
|
|
|
- customRender: ({ record }) => {
|
|
|
|
- return t(`routes.spares.tableType.${record.status || 0}`);
|
|
|
|
- },
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- title: '维修单号',
|
|
|
|
- dataIndex: 'repairId',
|
|
|
|
- width: 180,
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- title: t('common.operating'),
|
|
|
|
- dataIndex: 'action',
|
|
|
|
- slots: { customRender: 'action' },
|
|
|
|
- ifShow: true,
|
|
|
|
- fixed: 'right',
|
|
|
|
- flag: 'ACTION',
|
|
|
|
- width: 120,
|
|
|
|
- },
|
|
|
|
- ];
|
|
|
|
- const searchForm: Partial<FormProps> = {
|
|
|
|
- labelWidth: 120,
|
|
|
|
- autoAdvancedLine: 1,
|
|
|
|
- actionColOptions: {
|
|
|
|
- span: 24,
|
|
|
|
- },
|
|
|
|
- schemas: [
|
|
|
|
|
|
+
|
|
|
|
+ const getSchemas = (status) => {
|
|
|
|
+ return [
|
|
{
|
|
{
|
|
field: 'receiverType',
|
|
field: 'receiverType',
|
|
component: 'Select',
|
|
component: 'Select',
|
|
@@ -307,6 +229,7 @@ export default defineComponent({
|
|
field: 'status',
|
|
field: 'status',
|
|
component: 'Select',
|
|
component: 'Select',
|
|
label: '工单状态',
|
|
label: '工单状态',
|
|
|
|
+ ifShow: Boolean(status),
|
|
colProps: {
|
|
colProps: {
|
|
span: 7,
|
|
span: 7,
|
|
},
|
|
},
|
|
@@ -364,8 +287,9 @@ export default defineComponent({
|
|
],
|
|
],
|
|
},
|
|
},
|
|
},{
|
|
},{
|
|
- field: 'commentStatus',
|
|
|
|
|
|
+ field: 'payStatus',
|
|
component: 'Select',
|
|
component: 'Select',
|
|
|
|
+ ifShow: Boolean(status),
|
|
label: '支付状态',
|
|
label: '支付状态',
|
|
colProps: {
|
|
colProps: {
|
|
span: 7,
|
|
span: 7,
|
|
@@ -373,6 +297,31 @@ export default defineComponent({
|
|
componentProps: {
|
|
componentProps: {
|
|
options: [
|
|
options: [
|
|
{
|
|
{
|
|
|
|
+ label: '未支付',
|
|
|
|
+ value: 0,
|
|
|
|
+ key: '0',
|
|
|
|
+ },{
|
|
|
|
+ label: '支付成功',
|
|
|
|
+ value: 1,
|
|
|
|
+ key: '1',
|
|
|
|
+ },{
|
|
|
|
+ label: '支付失败',
|
|
|
|
+ value: 2,
|
|
|
|
+ key: '2',
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ },{
|
|
|
|
+ field: 'commentStatus',
|
|
|
|
+ component: 'Select',
|
|
|
|
+ ifShow: Boolean(status),
|
|
|
|
+ label: '评价状态',
|
|
|
|
+ colProps: {
|
|
|
|
+ span: 7,
|
|
|
|
+ },
|
|
|
|
+ componentProps: {
|
|
|
|
+ options: [
|
|
|
|
+ {
|
|
label: '未评论',
|
|
label: '未评论',
|
|
value: 0,
|
|
value: 0,
|
|
key: '0',
|
|
key: '0',
|
|
@@ -398,10 +347,115 @@ export default defineComponent({
|
|
span: 7,
|
|
span: 7,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
- ],
|
|
|
|
|
|
+ ]
|
|
|
|
+ }
|
|
|
|
+ const columns: BasicColumn[] = [
|
|
|
|
+ {
|
|
|
|
+ title: '报修日期',
|
|
|
|
+ dataIndex: 'createTime',
|
|
|
|
+ width: 180,
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ title: '客户名称',
|
|
|
|
+ dataIndex: 'customerName',
|
|
|
|
+ width: 80,
|
|
|
|
+ // customRender: ({ record }) => {
|
|
|
|
+ // return t(`routes.equity.operation.${record.operationType || 0}`);
|
|
|
|
+ // },
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ title: '产品类型',
|
|
|
|
+ dataIndex: 'cameraType',
|
|
|
|
+ width: 80,
|
|
|
|
+ customRender: ({ record }) => {
|
|
|
|
+ return t(`routes.scene.tableType.${record.cameraType || 0}`);
|
|
|
|
+ },
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ title: '产品SN码',
|
|
|
|
+ dataIndex: 'cameraSnCode',
|
|
|
|
+ width: 100,
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ title: '报修方式',
|
|
|
|
+ dataIndex: 'receiverType',
|
|
|
|
+ width: 100,
|
|
|
|
+ customRender: ({ record }) => {
|
|
|
|
+ return record.receiverType == 0 ? '系统录单' : '公众号报修';
|
|
|
|
+ },
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ title: '保修类型',
|
|
|
|
+ dataIndex: 'warrantyType',
|
|
|
|
+ width: 100,
|
|
|
|
+ customRender: ({ record }) => {
|
|
|
|
+ return record.warrantyType == 0 ? '保修期内' : record.warrantyType == 1 ? '保修期外' : '非保修项目';
|
|
|
|
+ },
|
|
|
|
+ },{
|
|
|
|
+ title: '售后工程师',
|
|
|
|
+ dataIndex: 'saleName',
|
|
|
|
+ width: 100,
|
|
|
|
+ },{
|
|
|
|
+ title: '接单日期',
|
|
|
|
+ dataIndex: 'orderReceivingTime',
|
|
|
|
+ width: 150,
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ title: '故障分析',
|
|
|
|
+ dataIndex: 'checkResult',
|
|
|
|
+ width: 100,
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ title: '维修工程师',
|
|
|
|
+ dataIndex: 'repairManName',
|
|
|
|
+ width: 100,
|
|
|
|
+ },{
|
|
|
|
+ title: '维修完成日期',
|
|
|
|
+ dataIndex: 'repairOverTime',
|
|
|
|
+ width: 150,
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ title: '状态',
|
|
|
|
+ dataIndex: 'status',
|
|
|
|
+ width: 100,
|
|
|
|
+ customRender: ({ record }) => {
|
|
|
|
+ return t(`routes.spares.tableType.${record.status || 0}`);
|
|
|
|
+ },
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ title: '维修单号',
|
|
|
|
+ dataIndex: 'repairId',
|
|
|
|
+ width: 180,
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ title: t('common.operating'),
|
|
|
|
+ dataIndex: 'action',
|
|
|
|
+ slots: { customRender: 'action' },
|
|
|
|
+ ifShow: true,
|
|
|
|
+ fixed: 'right',
|
|
|
|
+ flag: 'ACTION',
|
|
|
|
+ width: 120,
|
|
|
|
+ },
|
|
|
|
+ ];
|
|
|
|
+ const searchForm: Partial<FormProps> = {
|
|
|
|
+ labelWidth: 120,
|
|
|
|
+ autoAdvancedLine: 1,
|
|
|
|
+ actionColOptions: {
|
|
|
|
+ span: 24,
|
|
|
|
+ },
|
|
|
|
+ schemas:getSchemas(true)
|
|
|
|
+ };
|
|
|
|
+
|
|
|
|
+ const searchForm1: Partial<FormProps> = {
|
|
|
|
+ labelWidth: 120,
|
|
|
|
+ autoAdvancedLine: 1,
|
|
|
|
+ actionColOptions: {
|
|
|
|
+ span: 24,
|
|
|
|
+ },
|
|
|
|
+ schemas:getSchemas(false)
|
|
};
|
|
};
|
|
const [registerRecovery, { openModal }] = useModal();
|
|
const [registerRecovery, { openModal }] = useModal();
|
|
- const [registerTable, { reload }] = useTable({
|
|
|
|
|
|
+ const [registerTable, { reload:reload0 }] = useTable({
|
|
api: queryList,
|
|
api: queryList,
|
|
columns: columns,
|
|
columns: columns,
|
|
useSearchForm: true,
|
|
useSearchForm: true,
|
|
@@ -417,9 +471,29 @@ export default defineComponent({
|
|
},
|
|
},
|
|
canResize: false,
|
|
canResize: false,
|
|
});
|
|
});
|
|
|
|
+ const [registerTable1, { reload:reload1 }] = useTable({
|
|
|
|
+ api: queryList,
|
|
|
|
+ columns: columns,
|
|
|
|
+ useSearchForm: true,
|
|
|
|
+ searchInfo: { status: tableType },
|
|
|
|
+ formConfig: searchForm1,
|
|
|
|
+ showTableSetting: true,
|
|
|
|
+ showIndexColumn: false,
|
|
|
|
+ fetchSetting: {
|
|
|
|
+ pageField: 'pageNum',
|
|
|
|
+ sizeField: 'pageSize',
|
|
|
|
+ listField: 'list',
|
|
|
|
+ totalField: 'total',
|
|
|
|
+ },
|
|
|
|
+ canResize: false,
|
|
|
|
+ });
|
|
onActivated(()=>{
|
|
onActivated(()=>{
|
|
reload();
|
|
reload();
|
|
})
|
|
})
|
|
|
|
+ const reload = () => {
|
|
|
|
+ reload1();
|
|
|
|
+ reload0()
|
|
|
|
+ }
|
|
async function handleDetail(record: Recordable) {
|
|
async function handleDetail(record: Recordable) {
|
|
console.log('record', record);
|
|
console.log('record', record);
|
|
router.push({path:`detail/${record.repairId||'20230215174919387'}`})
|
|
router.push({path:`detail/${record.repairId||'20230215174919387'}`})
|
|
@@ -435,6 +509,7 @@ export default defineComponent({
|
|
}
|
|
}
|
|
return {
|
|
return {
|
|
registerTable,
|
|
registerTable,
|
|
|
|
+ registerTable1,
|
|
reload,
|
|
reload,
|
|
t,
|
|
t,
|
|
tableType,
|
|
tableType,
|