diff --git a/src/api/business/schedule/order.ts b/src/api/business/schedule/order.ts index e69de29..b10cf2c 100644 --- a/src/api/business/schedule/order.ts +++ b/src/api/business/schedule/order.ts @@ -0,0 +1,71 @@ +/** + * 委托书接口 +*/ +import request from '../../index' +import type { IListQuery } from '@/views/business/schedule/order/orderList_interface' +const prefix = '/business' + +// 列表查询 +export function getOrderList(data: IListQuery) { + return request({ + url: `${prefix}/order/listPage?offset=${data.offset}&limit=${data.limit}`, + method: 'post', + data, + }) +} + +// 导出列表 +export function exportOrderList(data: Omit) { + return request({ + url: `${prefix}/order/export`, + method: 'post', + responseType: 'blob', + data, + }) +} + +// 接收 +export function receiveOrder(data: { id: string }) { + return request({ + url: `${prefix}/order/receive`, + method: 'post', + data, + }) +} + +// 退回 +export function backOrder(data: { id: string }) { + return request({ + url: `${prefix}/order/back`, + method: 'post', + data, + }) +} + +// 新增 +export function addOrder(data: any) { + return request({ + url: `${prefix}/order/add`, + method: 'post', + data, + }) +} + +// 编辑 +export function updateOrder(data: any) { + return request({ + url: `${prefix}/order/update`, + method: 'post', + data, + }) +} + +// 详情 +export function getOrderDetail(data: any) { + return request({ + url: `${prefix}/order/detail`, + method: 'post', + data, + }) +} + diff --git a/src/api/business/schedule/order.ts b/src/api/business/schedule/order.ts index e69de29..b10cf2c 100644 --- a/src/api/business/schedule/order.ts +++ b/src/api/business/schedule/order.ts @@ -0,0 +1,71 @@ +/** + * 委托书接口 +*/ +import request from '../../index' +import type { IListQuery } from '@/views/business/schedule/order/orderList_interface' +const prefix = '/business' + +// 列表查询 +export function getOrderList(data: IListQuery) { + return request({ + url: `${prefix}/order/listPage?offset=${data.offset}&limit=${data.limit}`, + method: 'post', + data, + }) +} + +// 导出列表 +export function exportOrderList(data: Omit) { + return request({ + url: `${prefix}/order/export`, + method: 'post', + responseType: 'blob', + data, + }) +} + +// 接收 +export function receiveOrder(data: { id: string }) { + return request({ + url: `${prefix}/order/receive`, + method: 'post', + data, + }) +} + +// 退回 +export function backOrder(data: { id: string }) { + return request({ + url: `${prefix}/order/back`, + method: 'post', + data, + }) +} + +// 新增 +export function addOrder(data: any) { + return request({ + url: `${prefix}/order/add`, + method: 'post', + data, + }) +} + +// 编辑 +export function updateOrder(data: any) { + return request({ + url: `${prefix}/order/update`, + method: 'post', + data, + }) +} + +// 详情 +export function getOrderDetail(data: any) { + return request({ + url: `${prefix}/order/detail`, + method: 'post', + data, + }) +} + diff --git a/src/router/modules/business.ts b/src/router/modules/business.ts index cfca65f..43e42a0 100644 --- a/src/router/modules/business.ts +++ b/src/router/modules/business.ts @@ -52,7 +52,7 @@ { path: 'order/:type/:id?', name: 'OrderDetail', - component: () => import('@/views/business/schedule/order/orderListEdit.vue'), + component: () => import('@/views/business/schedule/order/orderEdit.vue'), meta: { title: '委托书详情', icon: 'ep:key', diff --git a/src/api/business/schedule/order.ts b/src/api/business/schedule/order.ts index e69de29..b10cf2c 100644 --- a/src/api/business/schedule/order.ts +++ b/src/api/business/schedule/order.ts @@ -0,0 +1,71 @@ +/** + * 委托书接口 +*/ +import request from '../../index' +import type { IListQuery } from '@/views/business/schedule/order/orderList_interface' +const prefix = '/business' + +// 列表查询 +export function getOrderList(data: IListQuery) { + return request({ + url: `${prefix}/order/listPage?offset=${data.offset}&limit=${data.limit}`, + method: 'post', + data, + }) +} + +// 导出列表 +export function exportOrderList(data: Omit) { + return request({ + url: `${prefix}/order/export`, + method: 'post', + responseType: 'blob', + data, + }) +} + +// 接收 +export function receiveOrder(data: { id: string }) { + return request({ + url: `${prefix}/order/receive`, + method: 'post', + data, + }) +} + +// 退回 +export function backOrder(data: { id: string }) { + return request({ + url: `${prefix}/order/back`, + method: 'post', + data, + }) +} + +// 新增 +export function addOrder(data: any) { + return request({ + url: `${prefix}/order/add`, + method: 'post', + data, + }) +} + +// 编辑 +export function updateOrder(data: any) { + return request({ + url: `${prefix}/order/update`, + method: 'post', + data, + }) +} + +// 详情 +export function getOrderDetail(data: any) { + return request({ + url: `${prefix}/order/detail`, + method: 'post', + data, + }) +} + diff --git a/src/router/modules/business.ts b/src/router/modules/business.ts index cfca65f..43e42a0 100644 --- a/src/router/modules/business.ts +++ b/src/router/modules/business.ts @@ -52,7 +52,7 @@ { path: 'order/:type/:id?', name: 'OrderDetail', - component: () => import('@/views/business/schedule/order/orderListEdit.vue'), + component: () => import('@/views/business/schedule/order/orderEdit.vue'), meta: { title: '委托书详情', icon: 'ep:key', diff --git a/src/views/business/schedule/interchange/interchangeEdit.vue b/src/views/business/schedule/interchange/interchangeEdit.vue index 7aea767..27687fc 100644 --- a/src/views/business/schedule/interchange/interchangeEdit.vue +++ b/src/views/business/schedule/interchange/interchangeEdit.vue @@ -99,14 +99,18 @@ lj: '漏检', yqwjd: '逾期未检定', }// 检定结果字典 -const mesureTypeList = [ +const measureTypeList = [ { label: '自检', - value: 'zj', + value: '1', }, { label: '外包', - value: 'wb', + value: '2', + }, + { + label: '外检', + value: '3', }, ]// 检定方式 const dataForm: Ref = ref({ @@ -630,7 +634,7 @@ :disabled="pageType === 'detail'" class="full-width-input" > - + diff --git a/src/api/business/schedule/order.ts b/src/api/business/schedule/order.ts index e69de29..b10cf2c 100644 --- a/src/api/business/schedule/order.ts +++ b/src/api/business/schedule/order.ts @@ -0,0 +1,71 @@ +/** + * 委托书接口 +*/ +import request from '../../index' +import type { IListQuery } from '@/views/business/schedule/order/orderList_interface' +const prefix = '/business' + +// 列表查询 +export function getOrderList(data: IListQuery) { + return request({ + url: `${prefix}/order/listPage?offset=${data.offset}&limit=${data.limit}`, + method: 'post', + data, + }) +} + +// 导出列表 +export function exportOrderList(data: Omit) { + return request({ + url: `${prefix}/order/export`, + method: 'post', + responseType: 'blob', + data, + }) +} + +// 接收 +export function receiveOrder(data: { id: string }) { + return request({ + url: `${prefix}/order/receive`, + method: 'post', + data, + }) +} + +// 退回 +export function backOrder(data: { id: string }) { + return request({ + url: `${prefix}/order/back`, + method: 'post', + data, + }) +} + +// 新增 +export function addOrder(data: any) { + return request({ + url: `${prefix}/order/add`, + method: 'post', + data, + }) +} + +// 编辑 +export function updateOrder(data: any) { + return request({ + url: `${prefix}/order/update`, + method: 'post', + data, + }) +} + +// 详情 +export function getOrderDetail(data: any) { + return request({ + url: `${prefix}/order/detail`, + method: 'post', + data, + }) +} + diff --git a/src/router/modules/business.ts b/src/router/modules/business.ts index cfca65f..43e42a0 100644 --- a/src/router/modules/business.ts +++ b/src/router/modules/business.ts @@ -52,7 +52,7 @@ { path: 'order/:type/:id?', name: 'OrderDetail', - component: () => import('@/views/business/schedule/order/orderListEdit.vue'), + component: () => import('@/views/business/schedule/order/orderEdit.vue'), meta: { title: '委托书详情', icon: 'ep:key', diff --git a/src/views/business/schedule/interchange/interchangeEdit.vue b/src/views/business/schedule/interchange/interchangeEdit.vue index 7aea767..27687fc 100644 --- a/src/views/business/schedule/interchange/interchangeEdit.vue +++ b/src/views/business/schedule/interchange/interchangeEdit.vue @@ -99,14 +99,18 @@ lj: '漏检', yqwjd: '逾期未检定', }// 检定结果字典 -const mesureTypeList = [ +const measureTypeList = [ { label: '自检', - value: 'zj', + value: '1', }, { label: '外包', - value: 'wb', + value: '2', + }, + { + label: '外检', + value: '3', }, ]// 检定方式 const dataForm: Ref = ref({ @@ -630,7 +634,7 @@ :disabled="pageType === 'detail'" class="full-width-input" > - + diff --git a/src/views/business/schedule/interchangeReceipt/receiptList-interface.ts b/src/views/business/schedule/interchangeReceipt/receiptList-interface.ts new file mode 100644 index 0000000..e397b7e --- /dev/null +++ b/src/views/business/schedule/interchangeReceipt/receiptList-interface.ts @@ -0,0 +1,24 @@ +// 查询参数 +export interface IListQuery { + interchangeCode: string // 交接单编号 + customerNo: string // 委托方代码 + customerName: string // 委托方名称 + reciever: string // 接收人 + deliverer: string // 送样人 + startTime: string // 交接开始时间 + endTime: string // 交接结束时间 + offset: number + limit: number +} + +// 表格 +export interface IReceiptList { + id: string + interchangeCode: string // 交接单编号 + customerNo: string // 委托方代码 + customerName: string // 委托方名称 + reciever: string // 接收人 + deliverer: string // 送样人 + deliverTime: string // 交接时间 + remark: string // 备注 +} diff --git a/src/api/business/schedule/order.ts b/src/api/business/schedule/order.ts index e69de29..b10cf2c 100644 --- a/src/api/business/schedule/order.ts +++ b/src/api/business/schedule/order.ts @@ -0,0 +1,71 @@ +/** + * 委托书接口 +*/ +import request from '../../index' +import type { IListQuery } from '@/views/business/schedule/order/orderList_interface' +const prefix = '/business' + +// 列表查询 +export function getOrderList(data: IListQuery) { + return request({ + url: `${prefix}/order/listPage?offset=${data.offset}&limit=${data.limit}`, + method: 'post', + data, + }) +} + +// 导出列表 +export function exportOrderList(data: Omit) { + return request({ + url: `${prefix}/order/export`, + method: 'post', + responseType: 'blob', + data, + }) +} + +// 接收 +export function receiveOrder(data: { id: string }) { + return request({ + url: `${prefix}/order/receive`, + method: 'post', + data, + }) +} + +// 退回 +export function backOrder(data: { id: string }) { + return request({ + url: `${prefix}/order/back`, + method: 'post', + data, + }) +} + +// 新增 +export function addOrder(data: any) { + return request({ + url: `${prefix}/order/add`, + method: 'post', + data, + }) +} + +// 编辑 +export function updateOrder(data: any) { + return request({ + url: `${prefix}/order/update`, + method: 'post', + data, + }) +} + +// 详情 +export function getOrderDetail(data: any) { + return request({ + url: `${prefix}/order/detail`, + method: 'post', + data, + }) +} + diff --git a/src/router/modules/business.ts b/src/router/modules/business.ts index cfca65f..43e42a0 100644 --- a/src/router/modules/business.ts +++ b/src/router/modules/business.ts @@ -52,7 +52,7 @@ { path: 'order/:type/:id?', name: 'OrderDetail', - component: () => import('@/views/business/schedule/order/orderListEdit.vue'), + component: () => import('@/views/business/schedule/order/orderEdit.vue'), meta: { title: '委托书详情', icon: 'ep:key', diff --git a/src/views/business/schedule/interchange/interchangeEdit.vue b/src/views/business/schedule/interchange/interchangeEdit.vue index 7aea767..27687fc 100644 --- a/src/views/business/schedule/interchange/interchangeEdit.vue +++ b/src/views/business/schedule/interchange/interchangeEdit.vue @@ -99,14 +99,18 @@ lj: '漏检', yqwjd: '逾期未检定', }// 检定结果字典 -const mesureTypeList = [ +const measureTypeList = [ { label: '自检', - value: 'zj', + value: '1', }, { label: '外包', - value: 'wb', + value: '2', + }, + { + label: '外检', + value: '3', }, ]// 检定方式 const dataForm: Ref = ref({ @@ -630,7 +634,7 @@ :disabled="pageType === 'detail'" class="full-width-input" > - + diff --git a/src/views/business/schedule/interchangeReceipt/receiptList-interface.ts b/src/views/business/schedule/interchangeReceipt/receiptList-interface.ts new file mode 100644 index 0000000..e397b7e --- /dev/null +++ b/src/views/business/schedule/interchangeReceipt/receiptList-interface.ts @@ -0,0 +1,24 @@ +// 查询参数 +export interface IListQuery { + interchangeCode: string // 交接单编号 + customerNo: string // 委托方代码 + customerName: string // 委托方名称 + reciever: string // 接收人 + deliverer: string // 送样人 + startTime: string // 交接开始时间 + endTime: string // 交接结束时间 + offset: number + limit: number +} + +// 表格 +export interface IReceiptList { + id: string + interchangeCode: string // 交接单编号 + customerNo: string // 委托方代码 + customerName: string // 委托方名称 + reciever: string // 接收人 + deliverer: string // 送样人 + deliverTime: string // 交接时间 + remark: string // 备注 +} diff --git a/src/views/business/schedule/interchangeReceipt/receiptList.vue b/src/views/business/schedule/interchangeReceipt/receiptList.vue index 92c14b2..0c41a5a 100644 --- a/src/views/business/schedule/interchangeReceipt/receiptList.vue +++ b/src/views/business/schedule/interchangeReceipt/receiptList.vue @@ -1,10 +1,285 @@ diff --git a/src/api/business/schedule/order.ts b/src/api/business/schedule/order.ts index e69de29..b10cf2c 100644 --- a/src/api/business/schedule/order.ts +++ b/src/api/business/schedule/order.ts @@ -0,0 +1,71 @@ +/** + * 委托书接口 +*/ +import request from '../../index' +import type { IListQuery } from '@/views/business/schedule/order/orderList_interface' +const prefix = '/business' + +// 列表查询 +export function getOrderList(data: IListQuery) { + return request({ + url: `${prefix}/order/listPage?offset=${data.offset}&limit=${data.limit}`, + method: 'post', + data, + }) +} + +// 导出列表 +export function exportOrderList(data: Omit) { + return request({ + url: `${prefix}/order/export`, + method: 'post', + responseType: 'blob', + data, + }) +} + +// 接收 +export function receiveOrder(data: { id: string }) { + return request({ + url: `${prefix}/order/receive`, + method: 'post', + data, + }) +} + +// 退回 +export function backOrder(data: { id: string }) { + return request({ + url: `${prefix}/order/back`, + method: 'post', + data, + }) +} + +// 新增 +export function addOrder(data: any) { + return request({ + url: `${prefix}/order/add`, + method: 'post', + data, + }) +} + +// 编辑 +export function updateOrder(data: any) { + return request({ + url: `${prefix}/order/update`, + method: 'post', + data, + }) +} + +// 详情 +export function getOrderDetail(data: any) { + return request({ + url: `${prefix}/order/detail`, + method: 'post', + data, + }) +} + diff --git a/src/router/modules/business.ts b/src/router/modules/business.ts index cfca65f..43e42a0 100644 --- a/src/router/modules/business.ts +++ b/src/router/modules/business.ts @@ -52,7 +52,7 @@ { path: 'order/:type/:id?', name: 'OrderDetail', - component: () => import('@/views/business/schedule/order/orderListEdit.vue'), + component: () => import('@/views/business/schedule/order/orderEdit.vue'), meta: { title: '委托书详情', icon: 'ep:key', diff --git a/src/views/business/schedule/interchange/interchangeEdit.vue b/src/views/business/schedule/interchange/interchangeEdit.vue index 7aea767..27687fc 100644 --- a/src/views/business/schedule/interchange/interchangeEdit.vue +++ b/src/views/business/schedule/interchange/interchangeEdit.vue @@ -99,14 +99,18 @@ lj: '漏检', yqwjd: '逾期未检定', }// 检定结果字典 -const mesureTypeList = [ +const measureTypeList = [ { label: '自检', - value: 'zj', + value: '1', }, { label: '外包', - value: 'wb', + value: '2', + }, + { + label: '外检', + value: '3', }, ]// 检定方式 const dataForm: Ref = ref({ @@ -630,7 +634,7 @@ :disabled="pageType === 'detail'" class="full-width-input" > - + diff --git a/src/views/business/schedule/interchangeReceipt/receiptList-interface.ts b/src/views/business/schedule/interchangeReceipt/receiptList-interface.ts new file mode 100644 index 0000000..e397b7e --- /dev/null +++ b/src/views/business/schedule/interchangeReceipt/receiptList-interface.ts @@ -0,0 +1,24 @@ +// 查询参数 +export interface IListQuery { + interchangeCode: string // 交接单编号 + customerNo: string // 委托方代码 + customerName: string // 委托方名称 + reciever: string // 接收人 + deliverer: string // 送样人 + startTime: string // 交接开始时间 + endTime: string // 交接结束时间 + offset: number + limit: number +} + +// 表格 +export interface IReceiptList { + id: string + interchangeCode: string // 交接单编号 + customerNo: string // 委托方代码 + customerName: string // 委托方名称 + reciever: string // 接收人 + deliverer: string // 送样人 + deliverTime: string // 交接时间 + remark: string // 备注 +} diff --git a/src/views/business/schedule/interchangeReceipt/receiptList.vue b/src/views/business/schedule/interchangeReceipt/receiptList.vue index 92c14b2..0c41a5a 100644 --- a/src/views/business/schedule/interchangeReceipt/receiptList.vue +++ b/src/views/business/schedule/interchangeReceipt/receiptList.vue @@ -1,10 +1,285 @@ diff --git a/src/views/business/schedule/order/orderEdit.vue b/src/views/business/schedule/order/orderEdit.vue new file mode 100644 index 0000000..62a642a --- /dev/null +++ b/src/views/business/schedule/order/orderEdit.vue @@ -0,0 +1,666 @@ + + + + + + + diff --git a/src/api/business/schedule/order.ts b/src/api/business/schedule/order.ts index e69de29..b10cf2c 100644 --- a/src/api/business/schedule/order.ts +++ b/src/api/business/schedule/order.ts @@ -0,0 +1,71 @@ +/** + * 委托书接口 +*/ +import request from '../../index' +import type { IListQuery } from '@/views/business/schedule/order/orderList_interface' +const prefix = '/business' + +// 列表查询 +export function getOrderList(data: IListQuery) { + return request({ + url: `${prefix}/order/listPage?offset=${data.offset}&limit=${data.limit}`, + method: 'post', + data, + }) +} + +// 导出列表 +export function exportOrderList(data: Omit) { + return request({ + url: `${prefix}/order/export`, + method: 'post', + responseType: 'blob', + data, + }) +} + +// 接收 +export function receiveOrder(data: { id: string }) { + return request({ + url: `${prefix}/order/receive`, + method: 'post', + data, + }) +} + +// 退回 +export function backOrder(data: { id: string }) { + return request({ + url: `${prefix}/order/back`, + method: 'post', + data, + }) +} + +// 新增 +export function addOrder(data: any) { + return request({ + url: `${prefix}/order/add`, + method: 'post', + data, + }) +} + +// 编辑 +export function updateOrder(data: any) { + return request({ + url: `${prefix}/order/update`, + method: 'post', + data, + }) +} + +// 详情 +export function getOrderDetail(data: any) { + return request({ + url: `${prefix}/order/detail`, + method: 'post', + data, + }) +} + diff --git a/src/router/modules/business.ts b/src/router/modules/business.ts index cfca65f..43e42a0 100644 --- a/src/router/modules/business.ts +++ b/src/router/modules/business.ts @@ -52,7 +52,7 @@ { path: 'order/:type/:id?', name: 'OrderDetail', - component: () => import('@/views/business/schedule/order/orderListEdit.vue'), + component: () => import('@/views/business/schedule/order/orderEdit.vue'), meta: { title: '委托书详情', icon: 'ep:key', diff --git a/src/views/business/schedule/interchange/interchangeEdit.vue b/src/views/business/schedule/interchange/interchangeEdit.vue index 7aea767..27687fc 100644 --- a/src/views/business/schedule/interchange/interchangeEdit.vue +++ b/src/views/business/schedule/interchange/interchangeEdit.vue @@ -99,14 +99,18 @@ lj: '漏检', yqwjd: '逾期未检定', }// 检定结果字典 -const mesureTypeList = [ +const measureTypeList = [ { label: '自检', - value: 'zj', + value: '1', }, { label: '外包', - value: 'wb', + value: '2', + }, + { + label: '外检', + value: '3', }, ]// 检定方式 const dataForm: Ref = ref({ @@ -630,7 +634,7 @@ :disabled="pageType === 'detail'" class="full-width-input" > - + diff --git a/src/views/business/schedule/interchangeReceipt/receiptList-interface.ts b/src/views/business/schedule/interchangeReceipt/receiptList-interface.ts new file mode 100644 index 0000000..e397b7e --- /dev/null +++ b/src/views/business/schedule/interchangeReceipt/receiptList-interface.ts @@ -0,0 +1,24 @@ +// 查询参数 +export interface IListQuery { + interchangeCode: string // 交接单编号 + customerNo: string // 委托方代码 + customerName: string // 委托方名称 + reciever: string // 接收人 + deliverer: string // 送样人 + startTime: string // 交接开始时间 + endTime: string // 交接结束时间 + offset: number + limit: number +} + +// 表格 +export interface IReceiptList { + id: string + interchangeCode: string // 交接单编号 + customerNo: string // 委托方代码 + customerName: string // 委托方名称 + reciever: string // 接收人 + deliverer: string // 送样人 + deliverTime: string // 交接时间 + remark: string // 备注 +} diff --git a/src/views/business/schedule/interchangeReceipt/receiptList.vue b/src/views/business/schedule/interchangeReceipt/receiptList.vue index 92c14b2..0c41a5a 100644 --- a/src/views/business/schedule/interchangeReceipt/receiptList.vue +++ b/src/views/business/schedule/interchangeReceipt/receiptList.vue @@ -1,10 +1,285 @@ diff --git a/src/views/business/schedule/order/orderEdit.vue b/src/views/business/schedule/order/orderEdit.vue new file mode 100644 index 0000000..62a642a --- /dev/null +++ b/src/views/business/schedule/order/orderEdit.vue @@ -0,0 +1,666 @@ + + + + + + + diff --git a/src/views/business/schedule/order/orderList.vue b/src/views/business/schedule/order/orderList.vue index 35541ed..043fb70 100644 --- a/src/views/business/schedule/order/orderList.vue +++ b/src/views/business/schedule/order/orderList.vue @@ -2,11 +2,18 @@ import type { Ref } from 'vue' import { getCurrentInstance, ref } from 'vue' import { ElLoading, ElMessage, ElMessageBox } from 'element-plus' -import type { IListQuery, IOrderList } from './orderList_interface' +import type { IListQuery, IOrderList, dictType } from './orderList_interface' import type { TableColumn } from '@/components/NormalTable/table_interface' import { printJSON } from '@/utils/printUtils' import { exportFile } from '@/utils/exportUtils' -// import { exportOrderList, getOrderList, orderListBack, orderListReceive } from '@/api/business/schedule/order' +import { uploadApi } from '@/api/system/notice' +import { + backOrder, + exportOrderList, + getOrderList, + receiveOrder, +} from '@/api/business/schedule/order' +import { getDictByCode } from '@/api/system/dict' const { proxy } = getCurrentInstance() as any const $router = useRouter() @@ -14,38 +21,27 @@ // 查询条件 const listQuery: Ref = ref({ orderCode: '', // 委托书编号 - customerId: '', // 委托方代码 + customerNo: '', // 委托方代码 customerName: '', // 委托方名称 deliverer: '', // 送样人 - isUrgent: '', // 是否加急 - status: '', // 接收状态 + isUrgent: 2, // 是否加急 2全部 1是 0否 + status: 0, // 接收状态 offset: 1, limit: 20, }) -// 是否加急 -const isUrgentMap = [ - { label: '全部', value: '0' }, - { label: '是', value: '1' }, - { label: '否', value: '2' }, -] -// 接收状态 -const statusMap = [ - { label: '全部', value: '0' }, - { label: '已接收', value: '1' }, - { label: '未接收', value: '2' }, - { label: '已取消', value: '3' }, -] +const isUrgentMap = ref([]) // 是否加急 +const statusMap = ref([]) // 接收状态 const columns = ref([ { text: '委托书编号', value: 'orderCode', align: 'center' }, - { text: '委托方代码', value: 'customerId', align: 'center' }, + { text: '委托方代码', value: 'customerNo', align: 'center', width: '160px' }, { text: '委托方名称', value: 'customerName', align: 'center' }, { text: '送样人', value: 'deliverer', align: 'center' }, - { text: '联系方式', value: 'delivererTel', align: 'center' }, - { text: '样品数量', value: 'sampleQuantity', align: 'center' }, + { text: '联系方式', value: 'customerPhone', align: 'center' }, + { text: '样品数量', value: 'sampleCount', align: 'center' }, { text: '是否加急', value: 'isUrgent', align: 'center', width: '55px', filter: (row: IOrderList) => { return row.isUrgent == '1' ? '是' : '否' }, styleFilter: (row: IOrderList) => { return row.isUrgent == '1' ? 'color: red' : '' } }, - { text: '接收状态', value: 'status', align: 'center' }, - { text: '创建时间', value: 'createTime', align: 'center' }, + { text: '接收状态', value: 'statusName', align: 'center', width: '80px' }, + { text: '创建时间', value: 'createTime', align: 'center', width: '180px' }, { text: '备注', value: 'remark', align: 'center' }, ]) @@ -59,47 +55,55 @@ const checkoutList = ref([]) // 文件上传input const fileRef = ref() + +// 获取字典值 +function getDict() { + // 是否加急 + getDictByCode('isUrgent').then((response) => { + isUrgentMap.value = response.data.map((item: dictType) => { + return { + ...item, + value: parseInt(item.value as string), + } + }) + // 在已有的字典的基础上增加一个全部0进去 + isUrgentMap.value.push({ + id: '', + name: '全部', + value: 2, // 是否加急全部后端定为2 + }) + }) + // 接收状态 + getDictByCode('orderStatus').then((response) => { + statusMap.value = response.data.map((item: dictType) => { + return { + ...item, + value: parseInt(item.value as string), // 后端需要int型,在此转换 + } + }) + // 在已有的字典的基础上增加一个全部0进去 + statusMap.value.push({ + id: '', + name: '全部', + value: 0, + }) + console.log(statusMap.value) + }) +} +getDict() + // 数据查询 function fetchData(isNowPage = false) { - // loadingTable.value = true + loadingTable.value = true if (!isNowPage) { // 是否显示当前页,否则跳转第一页 listQuery.value.offset = 1 } - // getOrderList(listQuery.value).then((response) => { - // response.data.rows = [ - // { - // id: 'test', - // orderCode: 'test', // 委托书编号 - // customerId: 'test', // 委托方代码 - // customerName: 'test', // 委托方名称 - // deliverer: 'test', // 送检人 - // delivererTel: 'test', // 送样人联系方式 - // sampleQuantity: 40, // 样品数量 - // isUrgent: '1', // 是否加急 - // status: 'test', // 接收状态 - // createTime: 'test', // 创建时间 - // remark: '备注', - // }] - // list.value = response.data.rows - // total.value = parseInt(response.data.total) - // loadingTable.value = false - // }) - list.value = [ - { - id: 'test', - orderCode: 'test', // 委托书编号 - customerId: 'test', // 委托方代码 - customerName: 'test', // 委托方名称 - deliverer: 'test', // 送检人 - delivererTel: 'test', // 送样人联系方式 - sampleQuantity: 40, // 样品数量 - isUrgent: '1', // 是否加急 - status: 'test', // 接收状态 - createTime: 'test', // 创建时间 - remark: '备注', - }, - ] + getOrderList(listQuery.value).then((response) => { + list.value = response.data.rows + total.value = parseInt(response.data.total) + loadingTable.value = false + }) } // 点击搜索 const searchList = () => { @@ -109,14 +113,15 @@ const clearList = () => { listQuery.value = { orderCode: '', // 委托书编号 - customerId: '', // 委托方代码 + customerNo: '', // 委托方代码 customerName: '', // 委托方名称 deliverer: '', // 送样人 - isUrgent: '', // 是否加急 - status: '', // 接收状态 + isUrgent: 2, // 是否加急 + status: 0, // 接收状态 offset: 1, limit: 20, } + fetchData(true) } // 多选发生改变时 @@ -148,26 +153,16 @@ ) .then(() => { if (type === 'receive') { // 接收 - // orderListReceive({ id: row.id }).then((res) => { - // if (res.code === 200) { - // ElMessage({ - // type: 'success', - // message: `已${title}`, - // }) - // fetchData(true) - // } - // }) + receiveOrder({ id: row.id }).then(() => { + ElMessage.success(`已${title}`) + fetchData(true) + }) } else if (type === 'back') { // 退回 - // orderListBack({ id: row.id }).then((res) => { - // if (res.code === 200) { - // ElMessage({ - // type: 'success', - // message: `已${title}`, - // }) - // fetchData(true) - // } - // }) + backOrder({ id: row.id }).then(() => { + ElMessage.success(`已${title}`) + fetchData(true) + }) } }) } @@ -182,17 +177,17 @@ if (list.value.length > 0) { const params = { orderCode: '', // 委托书编号 - customerId: '', // 委托方代码 + customerNo: '', // 委托方代码 customerName: '', // 委托方名称 deliverer: '', // 送样人 - isUrgent: '', // 是否加急 - status: '', // 接收状态 + isUrgent: 2, // 是否加急 + status: 0, // 接收状态 ids: checkoutList.value, } - // exportOrderList(params).then((res) => { - // const blob = new Blob([res.data]) - // exportFile(blob, '委托书列表.xlsx') - // }) + exportOrderList(params).then((res) => { + const blob = new Blob([res.data]) + exportFile(blob, '委托书列表.xlsx') + }) } else { ElMessage.warning('无数据可导出数据') @@ -222,9 +217,7 @@ } // 模板下载 -const templateDownload = () => { - -} +const templateDownload = () => {} // 上传文件/批量导入 const onFileChange = (event: any) => { @@ -232,16 +225,16 @@ if (event.target.files[0].type === 'application/pdf') { if (event.target.files?.length !== 0) { // 创建formdata对象 - // const fd = new FormData() - // fd.append('multipartFile', event.target.files[0]) - // uploadApi(fd).then((res) => { - // if (res.code === 200) { - // ElMessage.success('上传成功') - // } - // else { - // ElMessage.error(res.message) - // } - // }) + const fd = new FormData() + fd.append('multipartFile', event.target.files[0]) + uploadApi(fd).then((res) => { + if (res.code === 200) { + ElMessage.success('上传成功') + } + else { + ElMessage.error(res.message) + } + }) } } else { @@ -283,7 +276,7 @@ @@ -312,7 +305,7 @@ @@ -339,6 +332,7 @@ size="small" type="primary" link + :disabled="row.statusName === '已取消'" @click="goEdit(row, 'edit')" > 编辑 @@ -356,6 +350,7 @@ size="small" link type="primary" + :disabled="row.statusName === '已取消' || row.statusName === '已接收'" @click="handleEdit(row, 'receive', '接收')" > 接收 @@ -365,6 +360,7 @@ size="small" link type="primary" + :disabled="row.statusName === '已取消' || row.statusName === '已接收'" @click="handleEdit(row, 'back', '退回')" > 退回 diff --git a/src/api/business/schedule/order.ts b/src/api/business/schedule/order.ts index e69de29..b10cf2c 100644 --- a/src/api/business/schedule/order.ts +++ b/src/api/business/schedule/order.ts @@ -0,0 +1,71 @@ +/** + * 委托书接口 +*/ +import request from '../../index' +import type { IListQuery } from '@/views/business/schedule/order/orderList_interface' +const prefix = '/business' + +// 列表查询 +export function getOrderList(data: IListQuery) { + return request({ + url: `${prefix}/order/listPage?offset=${data.offset}&limit=${data.limit}`, + method: 'post', + data, + }) +} + +// 导出列表 +export function exportOrderList(data: Omit) { + return request({ + url: `${prefix}/order/export`, + method: 'post', + responseType: 'blob', + data, + }) +} + +// 接收 +export function receiveOrder(data: { id: string }) { + return request({ + url: `${prefix}/order/receive`, + method: 'post', + data, + }) +} + +// 退回 +export function backOrder(data: { id: string }) { + return request({ + url: `${prefix}/order/back`, + method: 'post', + data, + }) +} + +// 新增 +export function addOrder(data: any) { + return request({ + url: `${prefix}/order/add`, + method: 'post', + data, + }) +} + +// 编辑 +export function updateOrder(data: any) { + return request({ + url: `${prefix}/order/update`, + method: 'post', + data, + }) +} + +// 详情 +export function getOrderDetail(data: any) { + return request({ + url: `${prefix}/order/detail`, + method: 'post', + data, + }) +} + diff --git a/src/router/modules/business.ts b/src/router/modules/business.ts index cfca65f..43e42a0 100644 --- a/src/router/modules/business.ts +++ b/src/router/modules/business.ts @@ -52,7 +52,7 @@ { path: 'order/:type/:id?', name: 'OrderDetail', - component: () => import('@/views/business/schedule/order/orderListEdit.vue'), + component: () => import('@/views/business/schedule/order/orderEdit.vue'), meta: { title: '委托书详情', icon: 'ep:key', diff --git a/src/views/business/schedule/interchange/interchangeEdit.vue b/src/views/business/schedule/interchange/interchangeEdit.vue index 7aea767..27687fc 100644 --- a/src/views/business/schedule/interchange/interchangeEdit.vue +++ b/src/views/business/schedule/interchange/interchangeEdit.vue @@ -99,14 +99,18 @@ lj: '漏检', yqwjd: '逾期未检定', }// 检定结果字典 -const mesureTypeList = [ +const measureTypeList = [ { label: '自检', - value: 'zj', + value: '1', }, { label: '外包', - value: 'wb', + value: '2', + }, + { + label: '外检', + value: '3', }, ]// 检定方式 const dataForm: Ref = ref({ @@ -630,7 +634,7 @@ :disabled="pageType === 'detail'" class="full-width-input" > - + diff --git a/src/views/business/schedule/interchangeReceipt/receiptList-interface.ts b/src/views/business/schedule/interchangeReceipt/receiptList-interface.ts new file mode 100644 index 0000000..e397b7e --- /dev/null +++ b/src/views/business/schedule/interchangeReceipt/receiptList-interface.ts @@ -0,0 +1,24 @@ +// 查询参数 +export interface IListQuery { + interchangeCode: string // 交接单编号 + customerNo: string // 委托方代码 + customerName: string // 委托方名称 + reciever: string // 接收人 + deliverer: string // 送样人 + startTime: string // 交接开始时间 + endTime: string // 交接结束时间 + offset: number + limit: number +} + +// 表格 +export interface IReceiptList { + id: string + interchangeCode: string // 交接单编号 + customerNo: string // 委托方代码 + customerName: string // 委托方名称 + reciever: string // 接收人 + deliverer: string // 送样人 + deliverTime: string // 交接时间 + remark: string // 备注 +} diff --git a/src/views/business/schedule/interchangeReceipt/receiptList.vue b/src/views/business/schedule/interchangeReceipt/receiptList.vue index 92c14b2..0c41a5a 100644 --- a/src/views/business/schedule/interchangeReceipt/receiptList.vue +++ b/src/views/business/schedule/interchangeReceipt/receiptList.vue @@ -1,10 +1,285 @@ diff --git a/src/views/business/schedule/order/orderEdit.vue b/src/views/business/schedule/order/orderEdit.vue new file mode 100644 index 0000000..62a642a --- /dev/null +++ b/src/views/business/schedule/order/orderEdit.vue @@ -0,0 +1,666 @@ + + + + + + + diff --git a/src/views/business/schedule/order/orderList.vue b/src/views/business/schedule/order/orderList.vue index 35541ed..043fb70 100644 --- a/src/views/business/schedule/order/orderList.vue +++ b/src/views/business/schedule/order/orderList.vue @@ -2,11 +2,18 @@ import type { Ref } from 'vue' import { getCurrentInstance, ref } from 'vue' import { ElLoading, ElMessage, ElMessageBox } from 'element-plus' -import type { IListQuery, IOrderList } from './orderList_interface' +import type { IListQuery, IOrderList, dictType } from './orderList_interface' import type { TableColumn } from '@/components/NormalTable/table_interface' import { printJSON } from '@/utils/printUtils' import { exportFile } from '@/utils/exportUtils' -// import { exportOrderList, getOrderList, orderListBack, orderListReceive } from '@/api/business/schedule/order' +import { uploadApi } from '@/api/system/notice' +import { + backOrder, + exportOrderList, + getOrderList, + receiveOrder, +} from '@/api/business/schedule/order' +import { getDictByCode } from '@/api/system/dict' const { proxy } = getCurrentInstance() as any const $router = useRouter() @@ -14,38 +21,27 @@ // 查询条件 const listQuery: Ref = ref({ orderCode: '', // 委托书编号 - customerId: '', // 委托方代码 + customerNo: '', // 委托方代码 customerName: '', // 委托方名称 deliverer: '', // 送样人 - isUrgent: '', // 是否加急 - status: '', // 接收状态 + isUrgent: 2, // 是否加急 2全部 1是 0否 + status: 0, // 接收状态 offset: 1, limit: 20, }) -// 是否加急 -const isUrgentMap = [ - { label: '全部', value: '0' }, - { label: '是', value: '1' }, - { label: '否', value: '2' }, -] -// 接收状态 -const statusMap = [ - { label: '全部', value: '0' }, - { label: '已接收', value: '1' }, - { label: '未接收', value: '2' }, - { label: '已取消', value: '3' }, -] +const isUrgentMap = ref([]) // 是否加急 +const statusMap = ref([]) // 接收状态 const columns = ref([ { text: '委托书编号', value: 'orderCode', align: 'center' }, - { text: '委托方代码', value: 'customerId', align: 'center' }, + { text: '委托方代码', value: 'customerNo', align: 'center', width: '160px' }, { text: '委托方名称', value: 'customerName', align: 'center' }, { text: '送样人', value: 'deliverer', align: 'center' }, - { text: '联系方式', value: 'delivererTel', align: 'center' }, - { text: '样品数量', value: 'sampleQuantity', align: 'center' }, + { text: '联系方式', value: 'customerPhone', align: 'center' }, + { text: '样品数量', value: 'sampleCount', align: 'center' }, { text: '是否加急', value: 'isUrgent', align: 'center', width: '55px', filter: (row: IOrderList) => { return row.isUrgent == '1' ? '是' : '否' }, styleFilter: (row: IOrderList) => { return row.isUrgent == '1' ? 'color: red' : '' } }, - { text: '接收状态', value: 'status', align: 'center' }, - { text: '创建时间', value: 'createTime', align: 'center' }, + { text: '接收状态', value: 'statusName', align: 'center', width: '80px' }, + { text: '创建时间', value: 'createTime', align: 'center', width: '180px' }, { text: '备注', value: 'remark', align: 'center' }, ]) @@ -59,47 +55,55 @@ const checkoutList = ref([]) // 文件上传input const fileRef = ref() + +// 获取字典值 +function getDict() { + // 是否加急 + getDictByCode('isUrgent').then((response) => { + isUrgentMap.value = response.data.map((item: dictType) => { + return { + ...item, + value: parseInt(item.value as string), + } + }) + // 在已有的字典的基础上增加一个全部0进去 + isUrgentMap.value.push({ + id: '', + name: '全部', + value: 2, // 是否加急全部后端定为2 + }) + }) + // 接收状态 + getDictByCode('orderStatus').then((response) => { + statusMap.value = response.data.map((item: dictType) => { + return { + ...item, + value: parseInt(item.value as string), // 后端需要int型,在此转换 + } + }) + // 在已有的字典的基础上增加一个全部0进去 + statusMap.value.push({ + id: '', + name: '全部', + value: 0, + }) + console.log(statusMap.value) + }) +} +getDict() + // 数据查询 function fetchData(isNowPage = false) { - // loadingTable.value = true + loadingTable.value = true if (!isNowPage) { // 是否显示当前页,否则跳转第一页 listQuery.value.offset = 1 } - // getOrderList(listQuery.value).then((response) => { - // response.data.rows = [ - // { - // id: 'test', - // orderCode: 'test', // 委托书编号 - // customerId: 'test', // 委托方代码 - // customerName: 'test', // 委托方名称 - // deliverer: 'test', // 送检人 - // delivererTel: 'test', // 送样人联系方式 - // sampleQuantity: 40, // 样品数量 - // isUrgent: '1', // 是否加急 - // status: 'test', // 接收状态 - // createTime: 'test', // 创建时间 - // remark: '备注', - // }] - // list.value = response.data.rows - // total.value = parseInt(response.data.total) - // loadingTable.value = false - // }) - list.value = [ - { - id: 'test', - orderCode: 'test', // 委托书编号 - customerId: 'test', // 委托方代码 - customerName: 'test', // 委托方名称 - deliverer: 'test', // 送检人 - delivererTel: 'test', // 送样人联系方式 - sampleQuantity: 40, // 样品数量 - isUrgent: '1', // 是否加急 - status: 'test', // 接收状态 - createTime: 'test', // 创建时间 - remark: '备注', - }, - ] + getOrderList(listQuery.value).then((response) => { + list.value = response.data.rows + total.value = parseInt(response.data.total) + loadingTable.value = false + }) } // 点击搜索 const searchList = () => { @@ -109,14 +113,15 @@ const clearList = () => { listQuery.value = { orderCode: '', // 委托书编号 - customerId: '', // 委托方代码 + customerNo: '', // 委托方代码 customerName: '', // 委托方名称 deliverer: '', // 送样人 - isUrgent: '', // 是否加急 - status: '', // 接收状态 + isUrgent: 2, // 是否加急 + status: 0, // 接收状态 offset: 1, limit: 20, } + fetchData(true) } // 多选发生改变时 @@ -148,26 +153,16 @@ ) .then(() => { if (type === 'receive') { // 接收 - // orderListReceive({ id: row.id }).then((res) => { - // if (res.code === 200) { - // ElMessage({ - // type: 'success', - // message: `已${title}`, - // }) - // fetchData(true) - // } - // }) + receiveOrder({ id: row.id }).then(() => { + ElMessage.success(`已${title}`) + fetchData(true) + }) } else if (type === 'back') { // 退回 - // orderListBack({ id: row.id }).then((res) => { - // if (res.code === 200) { - // ElMessage({ - // type: 'success', - // message: `已${title}`, - // }) - // fetchData(true) - // } - // }) + backOrder({ id: row.id }).then(() => { + ElMessage.success(`已${title}`) + fetchData(true) + }) } }) } @@ -182,17 +177,17 @@ if (list.value.length > 0) { const params = { orderCode: '', // 委托书编号 - customerId: '', // 委托方代码 + customerNo: '', // 委托方代码 customerName: '', // 委托方名称 deliverer: '', // 送样人 - isUrgent: '', // 是否加急 - status: '', // 接收状态 + isUrgent: 2, // 是否加急 + status: 0, // 接收状态 ids: checkoutList.value, } - // exportOrderList(params).then((res) => { - // const blob = new Blob([res.data]) - // exportFile(blob, '委托书列表.xlsx') - // }) + exportOrderList(params).then((res) => { + const blob = new Blob([res.data]) + exportFile(blob, '委托书列表.xlsx') + }) } else { ElMessage.warning('无数据可导出数据') @@ -222,9 +217,7 @@ } // 模板下载 -const templateDownload = () => { - -} +const templateDownload = () => {} // 上传文件/批量导入 const onFileChange = (event: any) => { @@ -232,16 +225,16 @@ if (event.target.files[0].type === 'application/pdf') { if (event.target.files?.length !== 0) { // 创建formdata对象 - // const fd = new FormData() - // fd.append('multipartFile', event.target.files[0]) - // uploadApi(fd).then((res) => { - // if (res.code === 200) { - // ElMessage.success('上传成功') - // } - // else { - // ElMessage.error(res.message) - // } - // }) + const fd = new FormData() + fd.append('multipartFile', event.target.files[0]) + uploadApi(fd).then((res) => { + if (res.code === 200) { + ElMessage.success('上传成功') + } + else { + ElMessage.error(res.message) + } + }) } } else { @@ -283,7 +276,7 @@ @@ -312,7 +305,7 @@ @@ -339,6 +332,7 @@ size="small" type="primary" link + :disabled="row.statusName === '已取消'" @click="goEdit(row, 'edit')" > 编辑 @@ -356,6 +350,7 @@ size="small" link type="primary" + :disabled="row.statusName === '已取消' || row.statusName === '已接收'" @click="handleEdit(row, 'receive', '接收')" > 接收 @@ -365,6 +360,7 @@ size="small" link type="primary" + :disabled="row.statusName === '已取消' || row.statusName === '已接收'" @click="handleEdit(row, 'back', '退回')" > 退回 diff --git a/src/views/business/schedule/order/orderListEdit.vue b/src/views/business/schedule/order/orderListEdit.vue deleted file mode 100644 index 6599250..0000000 --- a/src/views/business/schedule/order/orderListEdit.vue +++ /dev/null @@ -1,597 +0,0 @@ - - - - - - - diff --git a/src/api/business/schedule/order.ts b/src/api/business/schedule/order.ts index e69de29..b10cf2c 100644 --- a/src/api/business/schedule/order.ts +++ b/src/api/business/schedule/order.ts @@ -0,0 +1,71 @@ +/** + * 委托书接口 +*/ +import request from '../../index' +import type { IListQuery } from '@/views/business/schedule/order/orderList_interface' +const prefix = '/business' + +// 列表查询 +export function getOrderList(data: IListQuery) { + return request({ + url: `${prefix}/order/listPage?offset=${data.offset}&limit=${data.limit}`, + method: 'post', + data, + }) +} + +// 导出列表 +export function exportOrderList(data: Omit) { + return request({ + url: `${prefix}/order/export`, + method: 'post', + responseType: 'blob', + data, + }) +} + +// 接收 +export function receiveOrder(data: { id: string }) { + return request({ + url: `${prefix}/order/receive`, + method: 'post', + data, + }) +} + +// 退回 +export function backOrder(data: { id: string }) { + return request({ + url: `${prefix}/order/back`, + method: 'post', + data, + }) +} + +// 新增 +export function addOrder(data: any) { + return request({ + url: `${prefix}/order/add`, + method: 'post', + data, + }) +} + +// 编辑 +export function updateOrder(data: any) { + return request({ + url: `${prefix}/order/update`, + method: 'post', + data, + }) +} + +// 详情 +export function getOrderDetail(data: any) { + return request({ + url: `${prefix}/order/detail`, + method: 'post', + data, + }) +} + diff --git a/src/router/modules/business.ts b/src/router/modules/business.ts index cfca65f..43e42a0 100644 --- a/src/router/modules/business.ts +++ b/src/router/modules/business.ts @@ -52,7 +52,7 @@ { path: 'order/:type/:id?', name: 'OrderDetail', - component: () => import('@/views/business/schedule/order/orderListEdit.vue'), + component: () => import('@/views/business/schedule/order/orderEdit.vue'), meta: { title: '委托书详情', icon: 'ep:key', diff --git a/src/views/business/schedule/interchange/interchangeEdit.vue b/src/views/business/schedule/interchange/interchangeEdit.vue index 7aea767..27687fc 100644 --- a/src/views/business/schedule/interchange/interchangeEdit.vue +++ b/src/views/business/schedule/interchange/interchangeEdit.vue @@ -99,14 +99,18 @@ lj: '漏检', yqwjd: '逾期未检定', }// 检定结果字典 -const mesureTypeList = [ +const measureTypeList = [ { label: '自检', - value: 'zj', + value: '1', }, { label: '外包', - value: 'wb', + value: '2', + }, + { + label: '外检', + value: '3', }, ]// 检定方式 const dataForm: Ref = ref({ @@ -630,7 +634,7 @@ :disabled="pageType === 'detail'" class="full-width-input" > - + diff --git a/src/views/business/schedule/interchangeReceipt/receiptList-interface.ts b/src/views/business/schedule/interchangeReceipt/receiptList-interface.ts new file mode 100644 index 0000000..e397b7e --- /dev/null +++ b/src/views/business/schedule/interchangeReceipt/receiptList-interface.ts @@ -0,0 +1,24 @@ +// 查询参数 +export interface IListQuery { + interchangeCode: string // 交接单编号 + customerNo: string // 委托方代码 + customerName: string // 委托方名称 + reciever: string // 接收人 + deliverer: string // 送样人 + startTime: string // 交接开始时间 + endTime: string // 交接结束时间 + offset: number + limit: number +} + +// 表格 +export interface IReceiptList { + id: string + interchangeCode: string // 交接单编号 + customerNo: string // 委托方代码 + customerName: string // 委托方名称 + reciever: string // 接收人 + deliverer: string // 送样人 + deliverTime: string // 交接时间 + remark: string // 备注 +} diff --git a/src/views/business/schedule/interchangeReceipt/receiptList.vue b/src/views/business/schedule/interchangeReceipt/receiptList.vue index 92c14b2..0c41a5a 100644 --- a/src/views/business/schedule/interchangeReceipt/receiptList.vue +++ b/src/views/business/schedule/interchangeReceipt/receiptList.vue @@ -1,10 +1,285 @@ diff --git a/src/views/business/schedule/order/orderEdit.vue b/src/views/business/schedule/order/orderEdit.vue new file mode 100644 index 0000000..62a642a --- /dev/null +++ b/src/views/business/schedule/order/orderEdit.vue @@ -0,0 +1,666 @@ + + + + + + + diff --git a/src/views/business/schedule/order/orderList.vue b/src/views/business/schedule/order/orderList.vue index 35541ed..043fb70 100644 --- a/src/views/business/schedule/order/orderList.vue +++ b/src/views/business/schedule/order/orderList.vue @@ -2,11 +2,18 @@ import type { Ref } from 'vue' import { getCurrentInstance, ref } from 'vue' import { ElLoading, ElMessage, ElMessageBox } from 'element-plus' -import type { IListQuery, IOrderList } from './orderList_interface' +import type { IListQuery, IOrderList, dictType } from './orderList_interface' import type { TableColumn } from '@/components/NormalTable/table_interface' import { printJSON } from '@/utils/printUtils' import { exportFile } from '@/utils/exportUtils' -// import { exportOrderList, getOrderList, orderListBack, orderListReceive } from '@/api/business/schedule/order' +import { uploadApi } from '@/api/system/notice' +import { + backOrder, + exportOrderList, + getOrderList, + receiveOrder, +} from '@/api/business/schedule/order' +import { getDictByCode } from '@/api/system/dict' const { proxy } = getCurrentInstance() as any const $router = useRouter() @@ -14,38 +21,27 @@ // 查询条件 const listQuery: Ref = ref({ orderCode: '', // 委托书编号 - customerId: '', // 委托方代码 + customerNo: '', // 委托方代码 customerName: '', // 委托方名称 deliverer: '', // 送样人 - isUrgent: '', // 是否加急 - status: '', // 接收状态 + isUrgent: 2, // 是否加急 2全部 1是 0否 + status: 0, // 接收状态 offset: 1, limit: 20, }) -// 是否加急 -const isUrgentMap = [ - { label: '全部', value: '0' }, - { label: '是', value: '1' }, - { label: '否', value: '2' }, -] -// 接收状态 -const statusMap = [ - { label: '全部', value: '0' }, - { label: '已接收', value: '1' }, - { label: '未接收', value: '2' }, - { label: '已取消', value: '3' }, -] +const isUrgentMap = ref([]) // 是否加急 +const statusMap = ref([]) // 接收状态 const columns = ref([ { text: '委托书编号', value: 'orderCode', align: 'center' }, - { text: '委托方代码', value: 'customerId', align: 'center' }, + { text: '委托方代码', value: 'customerNo', align: 'center', width: '160px' }, { text: '委托方名称', value: 'customerName', align: 'center' }, { text: '送样人', value: 'deliverer', align: 'center' }, - { text: '联系方式', value: 'delivererTel', align: 'center' }, - { text: '样品数量', value: 'sampleQuantity', align: 'center' }, + { text: '联系方式', value: 'customerPhone', align: 'center' }, + { text: '样品数量', value: 'sampleCount', align: 'center' }, { text: '是否加急', value: 'isUrgent', align: 'center', width: '55px', filter: (row: IOrderList) => { return row.isUrgent == '1' ? '是' : '否' }, styleFilter: (row: IOrderList) => { return row.isUrgent == '1' ? 'color: red' : '' } }, - { text: '接收状态', value: 'status', align: 'center' }, - { text: '创建时间', value: 'createTime', align: 'center' }, + { text: '接收状态', value: 'statusName', align: 'center', width: '80px' }, + { text: '创建时间', value: 'createTime', align: 'center', width: '180px' }, { text: '备注', value: 'remark', align: 'center' }, ]) @@ -59,47 +55,55 @@ const checkoutList = ref([]) // 文件上传input const fileRef = ref() + +// 获取字典值 +function getDict() { + // 是否加急 + getDictByCode('isUrgent').then((response) => { + isUrgentMap.value = response.data.map((item: dictType) => { + return { + ...item, + value: parseInt(item.value as string), + } + }) + // 在已有的字典的基础上增加一个全部0进去 + isUrgentMap.value.push({ + id: '', + name: '全部', + value: 2, // 是否加急全部后端定为2 + }) + }) + // 接收状态 + getDictByCode('orderStatus').then((response) => { + statusMap.value = response.data.map((item: dictType) => { + return { + ...item, + value: parseInt(item.value as string), // 后端需要int型,在此转换 + } + }) + // 在已有的字典的基础上增加一个全部0进去 + statusMap.value.push({ + id: '', + name: '全部', + value: 0, + }) + console.log(statusMap.value) + }) +} +getDict() + // 数据查询 function fetchData(isNowPage = false) { - // loadingTable.value = true + loadingTable.value = true if (!isNowPage) { // 是否显示当前页,否则跳转第一页 listQuery.value.offset = 1 } - // getOrderList(listQuery.value).then((response) => { - // response.data.rows = [ - // { - // id: 'test', - // orderCode: 'test', // 委托书编号 - // customerId: 'test', // 委托方代码 - // customerName: 'test', // 委托方名称 - // deliverer: 'test', // 送检人 - // delivererTel: 'test', // 送样人联系方式 - // sampleQuantity: 40, // 样品数量 - // isUrgent: '1', // 是否加急 - // status: 'test', // 接收状态 - // createTime: 'test', // 创建时间 - // remark: '备注', - // }] - // list.value = response.data.rows - // total.value = parseInt(response.data.total) - // loadingTable.value = false - // }) - list.value = [ - { - id: 'test', - orderCode: 'test', // 委托书编号 - customerId: 'test', // 委托方代码 - customerName: 'test', // 委托方名称 - deliverer: 'test', // 送检人 - delivererTel: 'test', // 送样人联系方式 - sampleQuantity: 40, // 样品数量 - isUrgent: '1', // 是否加急 - status: 'test', // 接收状态 - createTime: 'test', // 创建时间 - remark: '备注', - }, - ] + getOrderList(listQuery.value).then((response) => { + list.value = response.data.rows + total.value = parseInt(response.data.total) + loadingTable.value = false + }) } // 点击搜索 const searchList = () => { @@ -109,14 +113,15 @@ const clearList = () => { listQuery.value = { orderCode: '', // 委托书编号 - customerId: '', // 委托方代码 + customerNo: '', // 委托方代码 customerName: '', // 委托方名称 deliverer: '', // 送样人 - isUrgent: '', // 是否加急 - status: '', // 接收状态 + isUrgent: 2, // 是否加急 + status: 0, // 接收状态 offset: 1, limit: 20, } + fetchData(true) } // 多选发生改变时 @@ -148,26 +153,16 @@ ) .then(() => { if (type === 'receive') { // 接收 - // orderListReceive({ id: row.id }).then((res) => { - // if (res.code === 200) { - // ElMessage({ - // type: 'success', - // message: `已${title}`, - // }) - // fetchData(true) - // } - // }) + receiveOrder({ id: row.id }).then(() => { + ElMessage.success(`已${title}`) + fetchData(true) + }) } else if (type === 'back') { // 退回 - // orderListBack({ id: row.id }).then((res) => { - // if (res.code === 200) { - // ElMessage({ - // type: 'success', - // message: `已${title}`, - // }) - // fetchData(true) - // } - // }) + backOrder({ id: row.id }).then(() => { + ElMessage.success(`已${title}`) + fetchData(true) + }) } }) } @@ -182,17 +177,17 @@ if (list.value.length > 0) { const params = { orderCode: '', // 委托书编号 - customerId: '', // 委托方代码 + customerNo: '', // 委托方代码 customerName: '', // 委托方名称 deliverer: '', // 送样人 - isUrgent: '', // 是否加急 - status: '', // 接收状态 + isUrgent: 2, // 是否加急 + status: 0, // 接收状态 ids: checkoutList.value, } - // exportOrderList(params).then((res) => { - // const blob = new Blob([res.data]) - // exportFile(blob, '委托书列表.xlsx') - // }) + exportOrderList(params).then((res) => { + const blob = new Blob([res.data]) + exportFile(blob, '委托书列表.xlsx') + }) } else { ElMessage.warning('无数据可导出数据') @@ -222,9 +217,7 @@ } // 模板下载 -const templateDownload = () => { - -} +const templateDownload = () => {} // 上传文件/批量导入 const onFileChange = (event: any) => { @@ -232,16 +225,16 @@ if (event.target.files[0].type === 'application/pdf') { if (event.target.files?.length !== 0) { // 创建formdata对象 - // const fd = new FormData() - // fd.append('multipartFile', event.target.files[0]) - // uploadApi(fd).then((res) => { - // if (res.code === 200) { - // ElMessage.success('上传成功') - // } - // else { - // ElMessage.error(res.message) - // } - // }) + const fd = new FormData() + fd.append('multipartFile', event.target.files[0]) + uploadApi(fd).then((res) => { + if (res.code === 200) { + ElMessage.success('上传成功') + } + else { + ElMessage.error(res.message) + } + }) } } else { @@ -283,7 +276,7 @@ @@ -312,7 +305,7 @@ @@ -339,6 +332,7 @@ size="small" type="primary" link + :disabled="row.statusName === '已取消'" @click="goEdit(row, 'edit')" > 编辑 @@ -356,6 +350,7 @@ size="small" link type="primary" + :disabled="row.statusName === '已取消' || row.statusName === '已接收'" @click="handleEdit(row, 'receive', '接收')" > 接收 @@ -365,6 +360,7 @@ size="small" link type="primary" + :disabled="row.statusName === '已取消' || row.statusName === '已接收'" @click="handleEdit(row, 'back', '退回')" > 退回 diff --git a/src/views/business/schedule/order/orderListEdit.vue b/src/views/business/schedule/order/orderListEdit.vue deleted file mode 100644 index 6599250..0000000 --- a/src/views/business/schedule/order/orderListEdit.vue +++ /dev/null @@ -1,597 +0,0 @@ - - - - - - - diff --git a/src/views/business/schedule/order/orderList_interface.ts b/src/views/business/schedule/order/orderList_interface.ts index 4330569..e05405d 100644 --- a/src/views/business/schedule/order/orderList_interface.ts +++ b/src/views/business/schedule/order/orderList_interface.ts @@ -2,11 +2,11 @@ export interface IListQuery { orderCode: string // 委托书编号 - customerId: string // 委托方代码 + customerNo: string // 委托方代码 customerName: string // 委托方名称 deliverer: string // 送样人 - isUrgent: string // 是否加急 - status: string // 接收状态 + isUrgent: number // 是否加急 + status: number // 接收状态 offset: number limit: number } @@ -15,13 +15,13 @@ export interface IOrderList { id: string orderCode: string // 委托书编号 - customerId: string // 委托方代码 + customerNo: string // 委托方代码 customerName: string // 委托方名称 deliverer: string // 送检人 delivererTel: string // 送样人联系方式 - sampleQuantity: number | string // 样品数量 - isUrgent: string // 是否加急 - status: string // 接收状态 + sampleCount: number | string // 样品数量 + isUrgent: number // 是否加急 + status: number // 接收状态 createTime: string // 创建时间 remark: string // 备注 } @@ -36,12 +36,13 @@ planDeliverTime: string // 预计送达时间 requireOverTime: string // 要求检完时间 customerNo: string // 委托方代码 + customerId: string // 委托方id customerName: string // 委托方名称 phone: string // 委托方电话 companyAddress: string // 委托方地址 remark: string // 备注 minioFileName: string // 附件 - isUrgent: string // 是否加急 + isUrgent: number // 是否加急 certifications: string // 证书类别 } @@ -58,5 +59,13 @@ remark: string // 备注 isEdit?: boolean // 是否可编辑 delId?: string // 删除id + isExistSample?: string // 是否存在样品库中 1存在、0不存在 } +// 字典 +export interface dictType { + id: string + name: string + value: string | number + label?: string // 基本信息添加的信息名称 +} diff --git a/src/api/business/schedule/order.ts b/src/api/business/schedule/order.ts index e69de29..b10cf2c 100644 --- a/src/api/business/schedule/order.ts +++ b/src/api/business/schedule/order.ts @@ -0,0 +1,71 @@ +/** + * 委托书接口 +*/ +import request from '../../index' +import type { IListQuery } from '@/views/business/schedule/order/orderList_interface' +const prefix = '/business' + +// 列表查询 +export function getOrderList(data: IListQuery) { + return request({ + url: `${prefix}/order/listPage?offset=${data.offset}&limit=${data.limit}`, + method: 'post', + data, + }) +} + +// 导出列表 +export function exportOrderList(data: Omit) { + return request({ + url: `${prefix}/order/export`, + method: 'post', + responseType: 'blob', + data, + }) +} + +// 接收 +export function receiveOrder(data: { id: string }) { + return request({ + url: `${prefix}/order/receive`, + method: 'post', + data, + }) +} + +// 退回 +export function backOrder(data: { id: string }) { + return request({ + url: `${prefix}/order/back`, + method: 'post', + data, + }) +} + +// 新增 +export function addOrder(data: any) { + return request({ + url: `${prefix}/order/add`, + method: 'post', + data, + }) +} + +// 编辑 +export function updateOrder(data: any) { + return request({ + url: `${prefix}/order/update`, + method: 'post', + data, + }) +} + +// 详情 +export function getOrderDetail(data: any) { + return request({ + url: `${prefix}/order/detail`, + method: 'post', + data, + }) +} + diff --git a/src/router/modules/business.ts b/src/router/modules/business.ts index cfca65f..43e42a0 100644 --- a/src/router/modules/business.ts +++ b/src/router/modules/business.ts @@ -52,7 +52,7 @@ { path: 'order/:type/:id?', name: 'OrderDetail', - component: () => import('@/views/business/schedule/order/orderListEdit.vue'), + component: () => import('@/views/business/schedule/order/orderEdit.vue'), meta: { title: '委托书详情', icon: 'ep:key', diff --git a/src/views/business/schedule/interchange/interchangeEdit.vue b/src/views/business/schedule/interchange/interchangeEdit.vue index 7aea767..27687fc 100644 --- a/src/views/business/schedule/interchange/interchangeEdit.vue +++ b/src/views/business/schedule/interchange/interchangeEdit.vue @@ -99,14 +99,18 @@ lj: '漏检', yqwjd: '逾期未检定', }// 检定结果字典 -const mesureTypeList = [ +const measureTypeList = [ { label: '自检', - value: 'zj', + value: '1', }, { label: '外包', - value: 'wb', + value: '2', + }, + { + label: '外检', + value: '3', }, ]// 检定方式 const dataForm: Ref = ref({ @@ -630,7 +634,7 @@ :disabled="pageType === 'detail'" class="full-width-input" > - + diff --git a/src/views/business/schedule/interchangeReceipt/receiptList-interface.ts b/src/views/business/schedule/interchangeReceipt/receiptList-interface.ts new file mode 100644 index 0000000..e397b7e --- /dev/null +++ b/src/views/business/schedule/interchangeReceipt/receiptList-interface.ts @@ -0,0 +1,24 @@ +// 查询参数 +export interface IListQuery { + interchangeCode: string // 交接单编号 + customerNo: string // 委托方代码 + customerName: string // 委托方名称 + reciever: string // 接收人 + deliverer: string // 送样人 + startTime: string // 交接开始时间 + endTime: string // 交接结束时间 + offset: number + limit: number +} + +// 表格 +export interface IReceiptList { + id: string + interchangeCode: string // 交接单编号 + customerNo: string // 委托方代码 + customerName: string // 委托方名称 + reciever: string // 接收人 + deliverer: string // 送样人 + deliverTime: string // 交接时间 + remark: string // 备注 +} diff --git a/src/views/business/schedule/interchangeReceipt/receiptList.vue b/src/views/business/schedule/interchangeReceipt/receiptList.vue index 92c14b2..0c41a5a 100644 --- a/src/views/business/schedule/interchangeReceipt/receiptList.vue +++ b/src/views/business/schedule/interchangeReceipt/receiptList.vue @@ -1,10 +1,285 @@ diff --git a/src/views/business/schedule/order/orderEdit.vue b/src/views/business/schedule/order/orderEdit.vue new file mode 100644 index 0000000..62a642a --- /dev/null +++ b/src/views/business/schedule/order/orderEdit.vue @@ -0,0 +1,666 @@ + + + + + + + diff --git a/src/views/business/schedule/order/orderList.vue b/src/views/business/schedule/order/orderList.vue index 35541ed..043fb70 100644 --- a/src/views/business/schedule/order/orderList.vue +++ b/src/views/business/schedule/order/orderList.vue @@ -2,11 +2,18 @@ import type { Ref } from 'vue' import { getCurrentInstance, ref } from 'vue' import { ElLoading, ElMessage, ElMessageBox } from 'element-plus' -import type { IListQuery, IOrderList } from './orderList_interface' +import type { IListQuery, IOrderList, dictType } from './orderList_interface' import type { TableColumn } from '@/components/NormalTable/table_interface' import { printJSON } from '@/utils/printUtils' import { exportFile } from '@/utils/exportUtils' -// import { exportOrderList, getOrderList, orderListBack, orderListReceive } from '@/api/business/schedule/order' +import { uploadApi } from '@/api/system/notice' +import { + backOrder, + exportOrderList, + getOrderList, + receiveOrder, +} from '@/api/business/schedule/order' +import { getDictByCode } from '@/api/system/dict' const { proxy } = getCurrentInstance() as any const $router = useRouter() @@ -14,38 +21,27 @@ // 查询条件 const listQuery: Ref = ref({ orderCode: '', // 委托书编号 - customerId: '', // 委托方代码 + customerNo: '', // 委托方代码 customerName: '', // 委托方名称 deliverer: '', // 送样人 - isUrgent: '', // 是否加急 - status: '', // 接收状态 + isUrgent: 2, // 是否加急 2全部 1是 0否 + status: 0, // 接收状态 offset: 1, limit: 20, }) -// 是否加急 -const isUrgentMap = [ - { label: '全部', value: '0' }, - { label: '是', value: '1' }, - { label: '否', value: '2' }, -] -// 接收状态 -const statusMap = [ - { label: '全部', value: '0' }, - { label: '已接收', value: '1' }, - { label: '未接收', value: '2' }, - { label: '已取消', value: '3' }, -] +const isUrgentMap = ref([]) // 是否加急 +const statusMap = ref([]) // 接收状态 const columns = ref([ { text: '委托书编号', value: 'orderCode', align: 'center' }, - { text: '委托方代码', value: 'customerId', align: 'center' }, + { text: '委托方代码', value: 'customerNo', align: 'center', width: '160px' }, { text: '委托方名称', value: 'customerName', align: 'center' }, { text: '送样人', value: 'deliverer', align: 'center' }, - { text: '联系方式', value: 'delivererTel', align: 'center' }, - { text: '样品数量', value: 'sampleQuantity', align: 'center' }, + { text: '联系方式', value: 'customerPhone', align: 'center' }, + { text: '样品数量', value: 'sampleCount', align: 'center' }, { text: '是否加急', value: 'isUrgent', align: 'center', width: '55px', filter: (row: IOrderList) => { return row.isUrgent == '1' ? '是' : '否' }, styleFilter: (row: IOrderList) => { return row.isUrgent == '1' ? 'color: red' : '' } }, - { text: '接收状态', value: 'status', align: 'center' }, - { text: '创建时间', value: 'createTime', align: 'center' }, + { text: '接收状态', value: 'statusName', align: 'center', width: '80px' }, + { text: '创建时间', value: 'createTime', align: 'center', width: '180px' }, { text: '备注', value: 'remark', align: 'center' }, ]) @@ -59,47 +55,55 @@ const checkoutList = ref([]) // 文件上传input const fileRef = ref() + +// 获取字典值 +function getDict() { + // 是否加急 + getDictByCode('isUrgent').then((response) => { + isUrgentMap.value = response.data.map((item: dictType) => { + return { + ...item, + value: parseInt(item.value as string), + } + }) + // 在已有的字典的基础上增加一个全部0进去 + isUrgentMap.value.push({ + id: '', + name: '全部', + value: 2, // 是否加急全部后端定为2 + }) + }) + // 接收状态 + getDictByCode('orderStatus').then((response) => { + statusMap.value = response.data.map((item: dictType) => { + return { + ...item, + value: parseInt(item.value as string), // 后端需要int型,在此转换 + } + }) + // 在已有的字典的基础上增加一个全部0进去 + statusMap.value.push({ + id: '', + name: '全部', + value: 0, + }) + console.log(statusMap.value) + }) +} +getDict() + // 数据查询 function fetchData(isNowPage = false) { - // loadingTable.value = true + loadingTable.value = true if (!isNowPage) { // 是否显示当前页,否则跳转第一页 listQuery.value.offset = 1 } - // getOrderList(listQuery.value).then((response) => { - // response.data.rows = [ - // { - // id: 'test', - // orderCode: 'test', // 委托书编号 - // customerId: 'test', // 委托方代码 - // customerName: 'test', // 委托方名称 - // deliverer: 'test', // 送检人 - // delivererTel: 'test', // 送样人联系方式 - // sampleQuantity: 40, // 样品数量 - // isUrgent: '1', // 是否加急 - // status: 'test', // 接收状态 - // createTime: 'test', // 创建时间 - // remark: '备注', - // }] - // list.value = response.data.rows - // total.value = parseInt(response.data.total) - // loadingTable.value = false - // }) - list.value = [ - { - id: 'test', - orderCode: 'test', // 委托书编号 - customerId: 'test', // 委托方代码 - customerName: 'test', // 委托方名称 - deliverer: 'test', // 送检人 - delivererTel: 'test', // 送样人联系方式 - sampleQuantity: 40, // 样品数量 - isUrgent: '1', // 是否加急 - status: 'test', // 接收状态 - createTime: 'test', // 创建时间 - remark: '备注', - }, - ] + getOrderList(listQuery.value).then((response) => { + list.value = response.data.rows + total.value = parseInt(response.data.total) + loadingTable.value = false + }) } // 点击搜索 const searchList = () => { @@ -109,14 +113,15 @@ const clearList = () => { listQuery.value = { orderCode: '', // 委托书编号 - customerId: '', // 委托方代码 + customerNo: '', // 委托方代码 customerName: '', // 委托方名称 deliverer: '', // 送样人 - isUrgent: '', // 是否加急 - status: '', // 接收状态 + isUrgent: 2, // 是否加急 + status: 0, // 接收状态 offset: 1, limit: 20, } + fetchData(true) } // 多选发生改变时 @@ -148,26 +153,16 @@ ) .then(() => { if (type === 'receive') { // 接收 - // orderListReceive({ id: row.id }).then((res) => { - // if (res.code === 200) { - // ElMessage({ - // type: 'success', - // message: `已${title}`, - // }) - // fetchData(true) - // } - // }) + receiveOrder({ id: row.id }).then(() => { + ElMessage.success(`已${title}`) + fetchData(true) + }) } else if (type === 'back') { // 退回 - // orderListBack({ id: row.id }).then((res) => { - // if (res.code === 200) { - // ElMessage({ - // type: 'success', - // message: `已${title}`, - // }) - // fetchData(true) - // } - // }) + backOrder({ id: row.id }).then(() => { + ElMessage.success(`已${title}`) + fetchData(true) + }) } }) } @@ -182,17 +177,17 @@ if (list.value.length > 0) { const params = { orderCode: '', // 委托书编号 - customerId: '', // 委托方代码 + customerNo: '', // 委托方代码 customerName: '', // 委托方名称 deliverer: '', // 送样人 - isUrgent: '', // 是否加急 - status: '', // 接收状态 + isUrgent: 2, // 是否加急 + status: 0, // 接收状态 ids: checkoutList.value, } - // exportOrderList(params).then((res) => { - // const blob = new Blob([res.data]) - // exportFile(blob, '委托书列表.xlsx') - // }) + exportOrderList(params).then((res) => { + const blob = new Blob([res.data]) + exportFile(blob, '委托书列表.xlsx') + }) } else { ElMessage.warning('无数据可导出数据') @@ -222,9 +217,7 @@ } // 模板下载 -const templateDownload = () => { - -} +const templateDownload = () => {} // 上传文件/批量导入 const onFileChange = (event: any) => { @@ -232,16 +225,16 @@ if (event.target.files[0].type === 'application/pdf') { if (event.target.files?.length !== 0) { // 创建formdata对象 - // const fd = new FormData() - // fd.append('multipartFile', event.target.files[0]) - // uploadApi(fd).then((res) => { - // if (res.code === 200) { - // ElMessage.success('上传成功') - // } - // else { - // ElMessage.error(res.message) - // } - // }) + const fd = new FormData() + fd.append('multipartFile', event.target.files[0]) + uploadApi(fd).then((res) => { + if (res.code === 200) { + ElMessage.success('上传成功') + } + else { + ElMessage.error(res.message) + } + }) } } else { @@ -283,7 +276,7 @@ @@ -312,7 +305,7 @@ @@ -339,6 +332,7 @@ size="small" type="primary" link + :disabled="row.statusName === '已取消'" @click="goEdit(row, 'edit')" > 编辑 @@ -356,6 +350,7 @@ size="small" link type="primary" + :disabled="row.statusName === '已取消' || row.statusName === '已接收'" @click="handleEdit(row, 'receive', '接收')" > 接收 @@ -365,6 +360,7 @@ size="small" link type="primary" + :disabled="row.statusName === '已取消' || row.statusName === '已接收'" @click="handleEdit(row, 'back', '退回')" > 退回 diff --git a/src/views/business/schedule/order/orderListEdit.vue b/src/views/business/schedule/order/orderListEdit.vue deleted file mode 100644 index 6599250..0000000 --- a/src/views/business/schedule/order/orderListEdit.vue +++ /dev/null @@ -1,597 +0,0 @@ - - - - - - - diff --git a/src/views/business/schedule/order/orderList_interface.ts b/src/views/business/schedule/order/orderList_interface.ts index 4330569..e05405d 100644 --- a/src/views/business/schedule/order/orderList_interface.ts +++ b/src/views/business/schedule/order/orderList_interface.ts @@ -2,11 +2,11 @@ export interface IListQuery { orderCode: string // 委托书编号 - customerId: string // 委托方代码 + customerNo: string // 委托方代码 customerName: string // 委托方名称 deliverer: string // 送样人 - isUrgent: string // 是否加急 - status: string // 接收状态 + isUrgent: number // 是否加急 + status: number // 接收状态 offset: number limit: number } @@ -15,13 +15,13 @@ export interface IOrderList { id: string orderCode: string // 委托书编号 - customerId: string // 委托方代码 + customerNo: string // 委托方代码 customerName: string // 委托方名称 deliverer: string // 送检人 delivererTel: string // 送样人联系方式 - sampleQuantity: number | string // 样品数量 - isUrgent: string // 是否加急 - status: string // 接收状态 + sampleCount: number | string // 样品数量 + isUrgent: number // 是否加急 + status: number // 接收状态 createTime: string // 创建时间 remark: string // 备注 } @@ -36,12 +36,13 @@ planDeliverTime: string // 预计送达时间 requireOverTime: string // 要求检完时间 customerNo: string // 委托方代码 + customerId: string // 委托方id customerName: string // 委托方名称 phone: string // 委托方电话 companyAddress: string // 委托方地址 remark: string // 备注 minioFileName: string // 附件 - isUrgent: string // 是否加急 + isUrgent: number // 是否加急 certifications: string // 证书类别 } @@ -58,5 +59,13 @@ remark: string // 备注 isEdit?: boolean // 是否可编辑 delId?: string // 删除id + isExistSample?: string // 是否存在样品库中 1存在、0不存在 } +// 字典 +export interface dictType { + id: string + name: string + value: string | number + label?: string // 基本信息添加的信息名称 +} diff --git a/src/views/business/schedule/order/selectSample.vue b/src/views/business/schedule/order/selectSample.vue index 914edc9..3060fe5 100644 --- a/src/views/business/schedule/order/selectSample.vue +++ b/src/views/business/schedule/order/selectSample.vue @@ -1,6 +1,6 @@