当前状态{{ processNodeData.measureStatusName }}
diff --git a/src/views/business/schedule/task/taskEdit.vue b/src/views/business/schedule/task/taskEdit.vue
index d64aa23..1d1e04f 100644
--- a/src/views/business/schedule/task/taskEdit.vue
+++ b/src/views/business/schedule/task/taskEdit.vue
@@ -215,8 +215,11 @@
taskForm.value.deliverer = res.data.deliverer // 送检人
taskForm.value.delivererTel = res.data.delivererTel // 送检人联系方式
taskForm.value.measureContent = res.data.measureContent // 检定项目
- taskForm.value.measureProcessList = res.data.measureProcessList
- taskForm.value.measureSendBackList = res.data.measureSendBackList
+ taskForm.value.measureProcessList = res.data.measureProcessList // 检定流程
+ taskForm.value.measureSendBackList = res.data.measureSendBackList // 退回流程
+ console.log('pppppp')
+ console.log(taskForm.value.measureProcessList)
+
// 改用一个接口获取
sampleForm.value = res.data
})
@@ -558,7 +561,11 @@
保存
-->
-
+
+
+
+
+
diff --git a/src/views/business/schedule/task/taskList.vue b/src/views/business/schedule/task/taskList.vue
index 64473c3..0efec98 100644
--- a/src/views/business/schedule/task/taskList.vue
+++ b/src/views/business/schedule/task/taskList.vue
@@ -46,7 +46,7 @@
getDictByCode('sampleStatus').then((response) => {
// 制作右上角的菜单
response.data.forEach((item: dictType) => {
- if (['待分发', '检测中', '检测完成', '已超期(查询使用)'].includes(item.name)) {
+ if (['待分发', '检测中', '检测完成', '已超期'].includes(item.name)) {
if (item.name === '待分发') {
active.value = item.value
activeTitle.value = item.name
@@ -58,6 +58,7 @@
})
}
})
+ console.log('88', menu.value)
if (window.sessionStorage.getItem('taskActive') != null) {
active.value = window.sessionStorage.getItem('taskActive') as string
@@ -99,6 +100,7 @@
// 是否显示当前页,否则跳转第一页
listQuery.value.offset = 1
}
+ listQuery.value.sampleStatus = active.value || '2'
getTaskList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: ITaskList) => {
item.isUrgentName = item.isUrgent == 1 ? '是' : '否'
@@ -146,7 +148,7 @@
// 点击分发, 弹窗
const distributeDialogRef = ref()
const handleDistribute = (row: ITaskList) => {
- distributeDialogRef.value.initDialog(row.orderId, row.sampleId)
+ distributeDialogRef.value.initDialog(row.orderId, row.sampleId, listQuery.value.sampleStatus)
}
// 点击标签绑定
const barCodeBind = ref()
@@ -323,6 +325,7 @@
标签绑定
+
props.columns, () => {
+ console.log(searchQuery.value)
+ searchQuery.value.offset = 1
+})
// 页数发生变化后的操作,可能是页码变化,可能是每页容量变化,此函数必写
const changePage = (val: { size?: number; page?: number }) => {
if (val && val.size) {
diff --git a/src/views/customer/sample/list/edit.vue b/src/views/customer/sample/list/edit.vue
index 207aaff..ae4f0d6 100644
--- a/src/views/customer/sample/list/edit.vue
+++ b/src/views/customer/sample/list/edit.vue
@@ -4,6 +4,7 @@
import { ElMessage, ElMessageBox } from 'element-plus'
import type { FormInstance, UploadUserFile } from 'element-plus'
import { ref } from 'vue'
+import dayjs from 'dayjs'
import type { ISampleEdit, Menu, SimpleCertification, SimpleMeasureRecord, dictType } from './sample_list_interface'
import selectCustomer from './selectCustomer.vue'
import showPhoto from '@/views/system/tool/showPhoto.vue'
@@ -13,7 +14,7 @@
import { UploadFile } from '@/api/measure/file'
import type { ICustomer } from '@/views/customer/customerInfo/customer_interface'
import { getDictByCode } from '@/api/system/dict'
-
+import type { IRecord } from '@/views/business/schedule/interchange/interchange_interface'
const textMap: { [key: string]: string } = {
edit: '编辑',
add: '新建',
@@ -109,11 +110,26 @@
}
getDict()
+const listQuery = ref({
+ sampleId: infoId.value, // 样品id
+ customerId: '', // 客户id
+ offset: 1,
+ limit: 10,
+})
+const totalRecords = ref(0) // 检定记录
+const totalCertifications = ref(0) // 检定证书
// 获取检定记录
const fetchMeasureRecords = (query = null) => {
if (pageType.value === 'detail') {
- getMesureRecords({ sampleId: infoId.value, customerId: '' }).then((res) => {
- dataList.value.measureRecords = res.data.rows
+ getMesureRecords(listQuery.value).then((res) => {
+ dataList.value.measureRecords = res.data.rows.map((item: { orderTime: string; deliverTime: string }) => {
+ return {
+ ...item,
+ orderTime: item.orderTime ? dayjs(item.orderTime).format('YYYY-MM-DD') : '',
+ deliverTime: item.deliverTime ? dayjs(item.deliverTime).format('YYYY-MM-DD') : '',
+ }
+ })
+ totalRecords.value = parseInt(res.data.total)
})
}
}
@@ -121,8 +137,16 @@
// 获取检定证书
const fetchCertifications = (query = null) => {
if (pageType.value === 'detail') {
- getCertification({ sampleId: infoId.value, customerId: '' }).then((res) => {
- dataList.value.certificationRecords = res.data.rows
+ getCertification(listQuery.value).then((res) => {
+ dataList.value.certificationRecords = res.data.rows.map((item: { effectiveDate: string; expirationDate: string }) => {
+ return {
+ ...item,
+ effectiveDate: item.effectiveDate ? dayjs(item.effectiveDate).format('YYYY-MM-DD') : '',
+ expirationDate: item.expirationDate ? dayjs(item.expirationDate).format('YYYY-MM-DD') : '',
+
+ }
+ })
+ totalCertifications.value = parseInt(res.data.total)
})
}
}
@@ -133,11 +157,11 @@
name: '检定记录',
columns: [
{ text: '委托单编号', value: 'orderCode', align: 'center' },
- { text: '委托单日期', value: 'orderTime', align: 'center' },
+ { text: '委托单日期', value: 'orderTime', align: 'center', width: '120' },
{ text: '委托方代码', value: 'customerCode', align: 'center' },
{ text: '委托方名称', value: 'customerName', align: 'center' },
{ text: '送检人', value: 'deliverer', align: 'center' },
- { text: '送检日期', value: 'deliverTime', align: 'center' },
+ { text: '送检日期', value: 'deliverTime', align: 'center', width: '120' },
],
list: 'measureRecords',
pagination: true,
@@ -149,8 +173,8 @@
{ text: '证书编号', value: 'certificationCode', align: 'center' },
{ text: '证书名称', value: 'certificationName', align: 'center' },
{ text: '证书类型', value: 'certificationClassName', align: 'center' },
- { text: '证书出具日期', value: 'effectiveDate', align: 'center' },
- { text: '证书有效期', value: 'expirationDate', align: 'center' },
+ { text: '证书出具日期', value: 'effectiveDate', align: 'center', width: '120' },
+ { text: '证书有效期', value: 'expirationDate', align: 'center', width: '120' },
],
list: 'certificationRecords',
pagination: true,
@@ -162,6 +186,23 @@
const currentMenuObj = computed(() => {
return menu.find(item => item.name === currentMenu.value)
})
+watch(currentMenuObj, () => {
+ listQuery.value.offset = 1
+ currentMenuObj.value?.searchFunc()
+},
+{
+ deep: true,
+ immediate: true,
+})
+
+// 监听检定记录和证书报告页数变化
+const changePage = (val: any) => {
+ if (val.value && currentMenuObj) {
+ listQuery.value.offset = val.value.offset
+ listQuery.value.limit = val.value.limit
+ currentMenuObj.value?.searchFunc()
+ }
+}
// 从路由中获取页面类型参数
const $route = useRoute()
@@ -616,7 +657,8 @@
-
+
+
diff --git a/src/api/business/schedule/interchangeReceipt.ts b/src/api/business/schedule/interchangeReceipt.ts
index 574d62e..df5e257 100644
--- a/src/api/business/schedule/interchangeReceipt.ts
+++ b/src/api/business/schedule/interchangeReceipt.ts
@@ -61,9 +61,18 @@
}
// 关联委托书的且是已收入的样品的列表
+// export function getSampleList(data: ISampleListQuery) {
+// return request({
+// url: `${prefix}/sampleList?offset=${data.offset}&limit=${data.limit}`,
+// method: 'post',
+// data,
+// })
+// }
+
+// 查询样品列表
export function getSampleList(data: ISampleListQuery) {
return request({
- url: `${prefix}/sampleList?offset=${data.offset}&limit=${data.limit}`,
+ url: `/customer/sample/listPageByInterchange?offset=${data.offset}&limit=${data.limit}`,
method: 'post',
data,
})
diff --git a/src/api/customer/sampleList.ts b/src/api/customer/sampleList.ts
index e82a99e..65acbce 100644
--- a/src/api/customer/sampleList.ts
+++ b/src/api/customer/sampleList.ts
@@ -60,18 +60,18 @@
}
// 查询检定记录
-export function getMesureRecords(data: { customerId?: string; sampleId?: string }) {
+export function getMesureRecords(data: { customerId?: string; sampleId?: string; offset: number; limit: number }) {
return request({
- url: `${prefix}/sample/measureRecordsById`,
+ url: `${prefix}/sample/measureRecordsById?offset=${data.offset}&limit=${data.limit}`,
method: 'post',
data,
})
}
// 查询检定证书
-export function getCertification(data: { customerId?: string; sampleId?: string }) {
+export function getCertification(data: { customerId?: string; sampleId?: string; offset: number; limit: number }) {
return request({
- url: '/business/certificateReport/certificateRecordsById',
+ url: `/business/certificateReport/certificateRecordsById?offset=${data.offset}&limit=${data.limit}`,
method: 'post',
data,
})
diff --git a/src/assets/icons/business-board.svg b/src/assets/icons/business-board.svg
new file mode 100644
index 0000000..990fe35
--- /dev/null
+++ b/src/assets/icons/business-board.svg
@@ -0,0 +1 @@
+
diff --git a/src/assets/icons/icon-create.svg b/src/assets/icons/icon-create.svg
new file mode 100644
index 0000000..5d651db
--- /dev/null
+++ b/src/assets/icons/icon-create.svg
@@ -0,0 +1 @@
+
diff --git a/src/router/modules/business.ts b/src/router/modules/business.ts
index be78584..db0b317 100644
--- a/src/router/modules/business.ts
+++ b/src/router/modules/business.ts
@@ -29,6 +29,41 @@
],
},
{
+ path: '/board',
+ component: Layout,
+ redirect: '/board/overdueReminderList',
+ name: 'Board',
+ meta: {
+ title: '业务看板',
+ icon: 'ep:key',
+ auth: '/business/board',
+ },
+ children: [
+ {
+ path: 'overdueReminderList',
+ name: 'OverdueReminderList',
+ component: () => import('@/views/business/board/overdueReminder/list.vue'),
+ meta: {
+ title: '样品超期提醒',
+ icon: 'ep:key',
+ auth: '/business/board/overdueReminder',
+ },
+ },
+ {
+ path: 'overdueReminderDetail/:id',
+ name: 'OverdueReminderDetail',
+ component: () => import('@/views/business/board/overdueReminder/detail.vue'),
+ meta: {
+ title: '样品超期提醒详情',
+ icon: 'ep:key',
+ sidebar: false,
+ breadcrumb: true,
+ activeMenu: '/board/overdueReminderList',
+ },
+ },
+ ],
+ },
+ {
path: '/schedule',
component: Layout,
redirect: '/schedule/orderList',
@@ -374,7 +409,7 @@
{
path: '/:type/:id?',
name: 'taskDetail',
- component: () => import('@/views/business/schedule/certificate/edit.vue'),
+ component: () => import('@/views/business/subpackage/certificate/edit.vue'),
meta: {
title: '分包证书详情',
icon: 'ep:key',
diff --git a/src/views/business/board/overdueReminder/detail.vue b/src/views/business/board/overdueReminder/detail.vue
new file mode 100644
index 0000000..50aa545
--- /dev/null
+++ b/src/views/business/board/overdueReminder/detail.vue
@@ -0,0 +1,543 @@
+
+
+
+
+
+
+
+
+ 关闭
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 无
+
+
+ {{ sampleForm.minioFileName === '' ? '上传' : '更换附件' }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ item.name }}
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/business/board/overdueReminder/list.vue b/src/views/business/board/overdueReminder/list.vue
new file mode 100644
index 0000000..2421546
--- /dev/null
+++ b/src/views/business/board/overdueReminder/list.vue
@@ -0,0 +1,269 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ (listQuery.offset - 1) * listQuery.limit + scope.$index + 1 }}
+
+
+
+
+
+
+
+ 详情
+
+
+ 催办
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/business/board/overdueReminder/overdueReminder_interface.ts b/src/views/business/board/overdueReminder/overdueReminder_interface.ts
new file mode 100644
index 0000000..45bcf9e
--- /dev/null
+++ b/src/views/business/board/overdueReminder/overdueReminder_interface.ts
@@ -0,0 +1,31 @@
+// 筛选
+export interface IListQuery {
+ sampleNo: string // 样品编号
+ sampleName: string // 样品名称
+ orderNo: string // 委托书编号
+ customerNo: string // 委托方代码
+ customerName: string // 委托方名称
+ isUrgent: string // 是否加急
+ sampleBelong: string // 样品属性
+ sampleStatus: string // 分发状态
+ startTime: string // 应检定开始时间
+ endTime: string // 应检定结束时间
+ limit: number
+ offset: number
+}
+// 表格
+export interface IList {
+ id: string // 主键
+ sampleId: string // 样品id
+ sampleNo: string // 样品编号
+ sampleName: string// 样品名称
+ sampleModel: string// 型号
+ manufacturingNo: string// 出厂编号
+ orderId: string // 委托书id
+ orderCode: string// 委托书编号
+ customerNo: string// 委托方代码
+ customerName: string// 委托方名称
+ deliverer: string// 送检人
+ remark: string// 备注
+}
+
diff --git a/src/views/business/schedule/components/terminateDialog.vue b/src/views/business/schedule/components/terminateDialog.vue
index d5f85a0..17c8b15 100644
--- a/src/views/business/schedule/components/terminateDialog.vue
+++ b/src/views/business/schedule/components/terminateDialog.vue
@@ -32,7 +32,7 @@
* @param orderId 委托书id
* @param sampleId 样品id
*/
-function initDialog(row) {
+function initDialog(row: any) {
// dataFormRef.value!.clearValidate()
formData.value.orderId = row.orderId
formData.value.sampleId = row.sampleId
diff --git a/src/views/business/schedule/interchange/interchangeDetail.vue b/src/views/business/schedule/interchange/interchangeDetail.vue
index 789505f..5244f44 100644
--- a/src/views/business/schedule/interchange/interchangeDetail.vue
+++ b/src/views/business/schedule/interchange/interchangeDetail.vue
@@ -4,6 +4,8 @@
import { ElMessage, ElMessageBox } from 'element-plus'
import type { FormInstance, UploadUserFile } from 'element-plus'
import { ref } from 'vue'
+import dayjs from 'dayjs'
+import type { IRecord } from './interchange_interface'
import type { ISampleEdit, Menu, SimpleCertification, SimpleMeasureRecord, dictType } from '@/views/customer/sample/list/sample_list_interface'
import selectCustomer from '@/views/customer/sample/list/selectCustomer.vue'
import showPhoto from '@/views/system/tool/showPhoto.vue'
@@ -13,7 +15,6 @@
import { UploadFile } from '@/api/measure/file'
import type { ICustomer } from '@/views/customer/customerInfo/customer_interface'
import { getDictByCode } from '@/api/system/dict'
-
const textMap: { [key: string]: string } = {
edit: '编辑',
add: '新建',
@@ -27,6 +28,7 @@
const mesureCategoryList = ref
([]) // 校检类别
const measureTypeList = ref([]) // 检定方式
const powerVoltageList = ref([]) // 电源电压
+const total = ref(0)
const dataForm: Ref = ref({
id: '',
sampleNo: '', // 样品编号
@@ -86,12 +88,6 @@
powerVoltage: [{ required: true, message: '要求电源电压不能为空', trigger: 'change' }],
}) // 表单验证规则
-// 其他关联数据列表
-const dataList = ref({
- measureRecords: [] as SimpleMeasureRecord[],
- certificationRecords: [] as SimpleCertification[],
-})
-
// 获取字典值
function getDict() {
// 校检类别
@@ -109,11 +105,33 @@
}
getDict()
+// --------------------------检定记录、检定证书-----------------------------------------
+// 其他关联数据列表
+const dataList = ref({
+ measureRecords: [] as SimpleMeasureRecord[],
+ certificationRecords: [] as SimpleCertification[],
+})
+
+const listQuery = ref({
+ sampleId: infoId.value, // 样品id
+ customerId: '', // 客户id
+ offset: 1,
+ limit: 10,
+})
+const totalRecords = ref(0) // 检定记录总条数
+const totalCertifications = ref(0) // 检定证书总条数
// 获取检定记录
const fetchMeasureRecords = (query = null) => {
if (pageType.value === 'detail') {
- getMesureRecords({ sampleId: infoId.value, customerId: '' }).then((res) => {
- dataList.value.measureRecords = res.data.rows
+ getMesureRecords(listQuery.value).then((res) => {
+ dataList.value.measureRecords = res.data.rows.map((item: { orderTime: string; deliverTime: string }) => {
+ return {
+ ...item,
+ orderTime: item.orderTime ? dayjs(item.orderTime).format('YYYY-MM-DD') : '',
+ deliverTime: item.deliverTime ? dayjs(item.deliverTime).format('YYYY-MM-DD') : '',
+ }
+ })
+ totalRecords.value = parseInt(res.data.total)
})
}
}
@@ -121,8 +139,16 @@
// 获取检定证书
const fetchCertifications = (query = null) => {
if (pageType.value === 'detail') {
- getCertification({ sampleId: infoId.value, customerId: '' }).then((res) => {
- dataList.value.certificationRecords = res.data.rows
+ getCertification(listQuery.value).then((res) => {
+ dataList.value.certificationRecords = res.data.rows.map((item: { effectiveDate: string; expirationDate: string }) => {
+ return {
+ ...item,
+ effectiveDate: item.effectiveDate ? dayjs(item.effectiveDate).format('YYYY-MM-DD') : '',
+ expirationDate: item.expirationDate ? dayjs(item.expirationDate).format('YYYY-MM-DD') : '',
+
+ }
+ })
+ totalCertifications.value = parseInt(res.data.total)
})
}
}
@@ -133,11 +159,11 @@
name: '检定记录',
columns: [
{ text: '委托单编号', value: 'orderCode', align: 'center' },
- { text: '委托单日期', value: 'orderTime', align: 'center' },
+ { text: '委托单日期', value: 'orderTime', align: 'center', width: '120' },
{ text: '委托方代码', value: 'customerCode', align: 'center' },
{ text: '委托方名称', value: 'customerName', align: 'center' },
{ text: '送检人', value: 'deliverer', align: 'center' },
- { text: '送检日期', value: 'deliverTime', align: 'center' },
+ { text: '送检日期', value: 'deliverTime', align: 'center', width: '120' },
],
list: 'measureRecords',
pagination: true,
@@ -149,8 +175,8 @@
{ text: '证书编号', value: 'certificationCode', align: 'center' },
{ text: '证书名称', value: 'certificationName', align: 'center' },
{ text: '证书类型', value: 'certificationClassName', align: 'center' },
- { text: '证书出具日期', value: 'effectiveDate', align: 'center' },
- { text: '证书有效期', value: 'expirationDate', align: 'center' },
+ { text: '证书出具日期', value: 'effectiveDate', align: 'center', width: '120' },
+ { text: '证书有效期', value: 'expirationDate', align: 'center', width: '120' },
],
list: 'certificationRecords',
pagination: true,
@@ -162,6 +188,25 @@
const currentMenuObj = computed(() => {
return menu.find(item => item.name === currentMenu.value)
})
+watch(currentMenuObj, () => {
+ listQuery.value.offset = 1
+ currentMenuObj.value?.searchFunc()
+},
+{
+ deep: true,
+ immediate: true,
+})
+
+// 监听检定记录和证书报告页数变化
+const changePage = (val: any) => {
+ if (val.value && currentMenuObj) {
+ listQuery.value.offset = val.value.offset
+ listQuery.value.limit = val.value.limit
+ currentMenuObj.value?.searchFunc()
+ }
+}
+
+// -------------------------------------底部--------------------------------------
// 从路由中获取页面类型参数
const $route = useRoute()
@@ -615,7 +660,8 @@
-
+
+
diff --git a/src/views/business/schedule/interchange/interchangeList.vue b/src/views/business/schedule/interchange/interchangeList.vue
index 61ca5e5..51321f8 100644
--- a/src/views/business/schedule/interchange/interchangeList.vue
+++ b/src/views/business/schedule/interchange/interchangeList.vue
@@ -32,7 +32,7 @@
sampleNo: '', // 样品编号
sampleName: '', // 样品名称
orderNo: '', // 委托书编号
- customerId: '', // 委托方代码
+ customerNo: '', // 委托方代码
startTime: '', // 预计送达开始时间
endTime: '', // 预计送达结束时间
isUrgent: '2', // 是否加急 //2全部
@@ -174,12 +174,12 @@
sampleNo: '', // 样品编号
sampleName: '', // 样品名称
orderNo: '', // 委托书编号
- customerId: '', // 委托方代码
+ customerNo: '', // 委托方代码
startTime: '', // 预计送达开始时间
endTime: '', // 预计送达结束时间
isUrgent: '2', // 是否加急
sampleBelong: '2', // 样品属性
- sampleStatus: '',
+ sampleStatus: '', // 样品状态
offset: 1,
limit: 20,
}
@@ -238,7 +238,7 @@
sampleNo: listQuery.value.sampleNo, // 样品编号
sampleName: listQuery.value.sampleName, // 样品名称
orderNo: listQuery.value.orderNo, // 委托书编号
- customerId: listQuery.value.customerId, // 委托方代码
+ customerNo: listQuery.value.customerNo, // 委托方代码
startTime: listQuery.value.startTime, // 预计送达开始时间
endTime: listQuery.value.endTime, // 预计送达结束时间
isUrgent: listQuery.value.isUrgent, // 是否加急
@@ -363,6 +363,11 @@
$router.push(`/schedule/interchange/${pageType}/${row.sampleId}`)
}
+// 点击生成设备交接单
+const createInterchangeReceipt = () => {
+ $router.push('/schedule/receipt/add')
+}
+
onMounted(async () => {
await getDict() // 字典
if (window.sessionStorage.getItem('interchangeActive')) {
@@ -407,7 +412,7 @@
+
diff --git a/src/views/business/schedule/interchange/interchange_interface.ts b/src/views/business/schedule/interchange/interchange_interface.ts
index f1a3f91..ffa18b0 100644
--- a/src/views/business/schedule/interchange/interchange_interface.ts
+++ b/src/views/business/schedule/interchange/interchange_interface.ts
@@ -4,7 +4,8 @@
sampleNo: string // 样品编号
sampleName: string // 样品名称
orderNo: string // 委托书编号
- customerId: string // 委托方代码
+ customerId?: string // 委托方代码
+ customerNo?: string // 委托方代码
startTime: string // 预计送达开始时间
endTime: string // 预计送达结束时间
isUrgent: string // 是否加急
@@ -35,6 +36,13 @@
orderId: string | number // 委托书id
sampleId: string | number// 样品id
}
+// 检定记录检定证书查询条件
+export interface IRecord {
+ sampleId: string // 样品id
+ customerId: string // 客户id
+ offset: number
+ limit: number
+}
// 检定记录
export interface SimpleMeasureRecord {
diff --git a/src/views/business/schedule/interchangeReceipt/receiptEdit.vue b/src/views/business/schedule/interchangeReceipt/receiptEdit.vue
index c629542..83a076e 100644
--- a/src/views/business/schedule/interchangeReceipt/receiptEdit.vue
+++ b/src/views/business/schedule/interchangeReceipt/receiptEdit.vue
@@ -220,6 +220,7 @@
const confirmCheckoutOrder = (val: Array) => {
if (val && val.length) {
dataForm.value.orderCode = val[0].orderCode // 委托书编号
+ dataForm.value.orderNo = val[0].orderCode // 委托书编号
dataForm.value.orderId = val[0].id // 委托书id
dataForm.value.deliverer = val[0].deliverer // 送检人
dataForm.value.delivererTel = val[0].delivererTel // 送检人
@@ -233,13 +234,17 @@
}
}
-// ------------------------样品-----------------------------
+// ----------------------------------样品----------------------------------------------
// 点击批量增加
const multiAdd = () => {
- if (!dataForm.value.customerNo) {
+ if (!dataForm.value.orderCode) {
ElMessage.warning('请先选择委托书')
return
}
+ if (!dataForm.value.customerNo) {
+ ElMessage.warning('没有委托方代码,请检查')
+ return
+ }
sampleVisible.value = true
}
// 修改委托方对话框显隐
diff --git a/src/views/business/schedule/interchangeReceipt/receiptList-interface.ts b/src/views/business/schedule/interchangeReceipt/receiptList-interface.ts
index b3089b4..4b4432e 100644
--- a/src/views/business/schedule/interchangeReceipt/receiptList-interface.ts
+++ b/src/views/business/schedule/interchangeReceipt/receiptList-interface.ts
@@ -79,6 +79,7 @@
customerId: string // 委托方id
sampleName: string // 样品名称
sampleNo: string // 样品编号
+ customerName: string // 委托方名称
offset: number
limit: number
}
diff --git a/src/views/business/schedule/interchangeReceipt/selectSample.vue b/src/views/business/schedule/interchangeReceipt/selectSample.vue
index 11d3092..6c1cb6c 100644
--- a/src/views/business/schedule/interchangeReceipt/selectSample.vue
+++ b/src/views/business/schedule/interchangeReceipt/selectSample.vue
@@ -25,6 +25,7 @@
customerId: '', // 委托方id
sampleName: '', // 样品名称
sampleNo: '', // 样品编号
+ customerName: '', // 委托方名称
offset: 1,
limit: 20,
})
@@ -36,9 +37,9 @@
{ text: '出厂编号', value: 'manufacturingNo', align: 'center' },
{ text: '委托方代码', value: 'customerNo', align: 'center' },
{ text: '委托方名称', value: 'customerName', align: 'center' },
- { text: '检定周期', value: 'measurePeriod', align: 'center' },
- { text: '上次检定时间', value: 'measureLastTime', align: 'center', width: '180px' },
- { text: '样品状态', value: 'sampleSatusName', align: 'center', width: '80px' },
+ // { text: '检定周期', value: 'measurePeriod', align: 'center' },
+ // { text: '上次检定时间', value: 'measureLastTime', align: 'center', width: '180px' },
+ // { text: '样品状态', value: 'sampleSatusName', align: 'center', width: '80px' },
{ text: '备注', value: 'remark', align: 'center', width: '180px' },
])
// 表格数据
@@ -84,6 +85,7 @@
customerId: '', // 委托方id
sampleName: '', // 样品名称
sampleNo: '', // 样品编号
+ customerName: '', // 委托方名称
offset: 1,
limit: 20,
}
@@ -127,56 +129,55 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ (listQuery.offset - 1) * listQuery.limit + scope.$index + 1 }}
-
-
-
-
-
-
- 确定
-
-
- 取消
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ (listQuery.offset - 1) * listQuery.limit + scope.$index + 1 }}
+
+
-
-
+
+
+
+ 确定
+
+
+ 取消
+
+
+
diff --git a/src/views/business/schedule/order/orderEdit.vue b/src/views/business/schedule/order/orderEdit.vue
index 68ced75..142db45 100644
--- a/src/views/business/schedule/order/orderEdit.vue
+++ b/src/views/business/schedule/order/orderEdit.vue
@@ -313,6 +313,10 @@
// 点击保存
const saveForm = (formEl: FormInstance | undefined) => {
+ if (!list.value.length) {
+ ElMessage.warning('要求样品清单不能为空')
+ return
+ }
// 检查表格是否存在增加行信息没有完善的情况
const result = checkList()
if (result !== 'pass') {
diff --git a/src/views/business/schedule/order/selectSample.vue b/src/views/business/schedule/order/selectSample.vue
index 720a2e3..5c07d92 100644
--- a/src/views/business/schedule/order/selectSample.vue
+++ b/src/views/business/schedule/order/selectSample.vue
@@ -29,8 +29,8 @@
// 查询条件
const listQuery = ref({
- // sampleNo: '', // 样品编号
- // sampleName: '', // 样品名称
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
// sampleModel: '', // 型号
orderId: props.orderId || '', // 委托书id
customerId: props.customerId || '', // 委托方id
@@ -51,8 +51,8 @@
{ text: '委托方代码', value: 'customerNo', align: 'center' },
{ text: '委托方名称', value: 'customerName', align: 'center' },
{ text: '检定周期', value: 'measurePeriod', align: 'center' },
- { text: '上次检定时间', value: 'measureLastTime', align: 'center', width: '180px' },
- { text: '样品状态', value: 'sampleSatusName', align: 'center', width: '80px' },
+ // { text: '上次检定时间', value: 'measureLastTime', align: 'center', width: '180px' },
+ // { text: '样品状态', value: 'sampleSatusName', align: 'center', width: '80px' },
{ text: '备注', value: 'remark', align: 'center', width: '180px' },
])
// 表格数据
@@ -97,12 +97,14 @@
listQuery.value = {
sampleNo: '', // 样品编号
sampleName: '', // 样品名称
- sampleModel: '', // 型号
- customerNo: '', // 委托方代码
- customerName: '', // 委托方名称
- startTime: '', // 检定开始时间
- endTime: '', // 检定结束时间
- overtimeStatus: '', // 样品超期状态 1已超期、0未超期、空字符串 已超期+未超期
+ // sampleModel: '', // 型号
+ orderId: props.orderId || '', // 委托书id
+ customerId: props.customerId || '', // 委托方id
+ customerNo: props.customerNo || '', // 委托方代码
+ // customerName: '', // 委托方名称
+ // startTime: '', // 检定开始时间
+ // endTime: '', // 检定结束时间
+ // overtimeStatus: '', // 样品超期状态 1已超期、0未超期、空字符串 已超期+未超期
offset: 1,
limit: 20,
}
@@ -146,48 +148,57 @@
-
-
-
-
-
-
- 确定
-
-
- 取消
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ (listQuery.offset - 1) * listQuery.limit + scope.$index + 1 }}
+
+
-
-
+
+
+
+ 确定
+
+
+ 取消
+
+
+
+
diff --git a/src/views/business/schedule/task/components/chooseLab.vue b/src/views/business/schedule/task/components/chooseLab.vue
index a8222ac..0dcebfc 100644
--- a/src/views/business/schedule/task/components/chooseLab.vue
+++ b/src/views/business/schedule/task/components/chooseLab.vue
@@ -161,7 +161,6 @@
:columns="columns"
:query="listQuery"
:list-loading="loadingTable"
-
:pagination="false"
size="small"
@multi-select="handleSelectionChange"
@@ -169,6 +168,11 @@
+
+
+ {{ scope.$index + 1 }}
+
+
diff --git a/src/views/business/schedule/task/components/distributeDialog.vue b/src/views/business/schedule/task/components/distributeDialog.vue
index 6474dce..fb6a3f5 100644
--- a/src/views/business/schedule/task/components/distributeDialog.vue
+++ b/src/views/business/schedule/task/components/distributeDialog.vue
@@ -10,7 +10,7 @@
const dialogVisible = ref(false) // 弹窗显示
const sampleId = ref('') // 样品id
const orderId = ref('') // 委托单id
-
+const type = ref('distribute')
// 委托书-证书类别列表
const certificationTypes = ref([])
// 获取字典值
@@ -53,10 +53,16 @@
}
// 初始化弹窗
-const initDialog = (orderid: string, sampleid: string) => {
+const initDialog = (orderid: string, sampleid: string, sampleStatus: string) => {
dialogVisible.value = true
sampleId.value = sampleid
orderId.value = orderid
+ if (sampleStatus === '3') { // 检测中
+ type.value = 'testing'
+ }
+ else if (sampleStatus === '2') { // 待分发
+ type.value = 'distribute'
+ }
getInfo()
}
@@ -105,7 +111,7 @@
批量添加
-
+
确定
diff --git a/src/views/business/schedule/task/components/processConfig.vue b/src/views/business/schedule/task/components/processConfig.vue
index 43f2165..bb66076 100644
--- a/src/views/business/schedule/task/components/processConfig.vue
+++ b/src/views/business/schedule/task/components/processConfig.vue
@@ -56,7 +56,8 @@
if (props.list.length > 0) {
processList.value = props.list as ISchedule[]
}
-})
+},
+{ deep: true, immediate: true })
// 点击添加流程
const processAdd = () => {
@@ -103,6 +104,7 @@
const saveProcess = () => {
const form = {
measureProcessList: processList.value,
+ executiveList: processList.value,
orderId: props.orderId,
sampleId: props.sampleId,
}
@@ -138,7 +140,7 @@
-
+
diff --git a/src/views/business/schedule/task/components/processNode.vue b/src/views/business/schedule/task/components/processNode.vue
index d76d41d..fad76ab 100644
--- a/src/views/business/schedule/task/components/processNode.vue
+++ b/src/views/business/schedule/task/components/processNode.vue
@@ -25,7 +25,7 @@
}
},
},
- // 是否为详情展示页面-暂时无用
+ // 是否为详情展示页面
detail: {
type: Boolean,
default: false,
@@ -111,10 +111,10 @@
{{ props.step }}
检定环节
-
-
+
+
检定人员
-
-
+
+
- 应出具证书 份
+ 应出具证书 份
当前状态{{ processNodeData.measureStatusName }}
diff --git a/src/views/business/schedule/task/taskEdit.vue b/src/views/business/schedule/task/taskEdit.vue
index d64aa23..1d1e04f 100644
--- a/src/views/business/schedule/task/taskEdit.vue
+++ b/src/views/business/schedule/task/taskEdit.vue
@@ -215,8 +215,11 @@
taskForm.value.deliverer = res.data.deliverer // 送检人
taskForm.value.delivererTel = res.data.delivererTel // 送检人联系方式
taskForm.value.measureContent = res.data.measureContent // 检定项目
- taskForm.value.measureProcessList = res.data.measureProcessList
- taskForm.value.measureSendBackList = res.data.measureSendBackList
+ taskForm.value.measureProcessList = res.data.measureProcessList // 检定流程
+ taskForm.value.measureSendBackList = res.data.measureSendBackList // 退回流程
+ console.log('pppppp')
+ console.log(taskForm.value.measureProcessList)
+
// 改用一个接口获取
sampleForm.value = res.data
})
@@ -558,7 +561,11 @@
保存
-->
-
+
+
+
+
+
diff --git a/src/views/business/schedule/task/taskList.vue b/src/views/business/schedule/task/taskList.vue
index 64473c3..0efec98 100644
--- a/src/views/business/schedule/task/taskList.vue
+++ b/src/views/business/schedule/task/taskList.vue
@@ -46,7 +46,7 @@
getDictByCode('sampleStatus').then((response) => {
// 制作右上角的菜单
response.data.forEach((item: dictType) => {
- if (['待分发', '检测中', '检测完成', '已超期(查询使用)'].includes(item.name)) {
+ if (['待分发', '检测中', '检测完成', '已超期'].includes(item.name)) {
if (item.name === '待分发') {
active.value = item.value
activeTitle.value = item.name
@@ -58,6 +58,7 @@
})
}
})
+ console.log('88', menu.value)
if (window.sessionStorage.getItem('taskActive') != null) {
active.value = window.sessionStorage.getItem('taskActive') as string
@@ -99,6 +100,7 @@
// 是否显示当前页,否则跳转第一页
listQuery.value.offset = 1
}
+ listQuery.value.sampleStatus = active.value || '2'
getTaskList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: ITaskList) => {
item.isUrgentName = item.isUrgent == 1 ? '是' : '否'
@@ -146,7 +148,7 @@
// 点击分发, 弹窗
const distributeDialogRef = ref()
const handleDistribute = (row: ITaskList) => {
- distributeDialogRef.value.initDialog(row.orderId, row.sampleId)
+ distributeDialogRef.value.initDialog(row.orderId, row.sampleId, listQuery.value.sampleStatus)
}
// 点击标签绑定
const barCodeBind = ref()
@@ -323,6 +325,7 @@
标签绑定
+
props.columns, () => {
+ console.log(searchQuery.value)
+ searchQuery.value.offset = 1
+})
// 页数发生变化后的操作,可能是页码变化,可能是每页容量变化,此函数必写
const changePage = (val: { size?: number; page?: number }) => {
if (val && val.size) {
diff --git a/src/views/customer/sample/list/edit.vue b/src/views/customer/sample/list/edit.vue
index 207aaff..ae4f0d6 100644
--- a/src/views/customer/sample/list/edit.vue
+++ b/src/views/customer/sample/list/edit.vue
@@ -4,6 +4,7 @@
import { ElMessage, ElMessageBox } from 'element-plus'
import type { FormInstance, UploadUserFile } from 'element-plus'
import { ref } from 'vue'
+import dayjs from 'dayjs'
import type { ISampleEdit, Menu, SimpleCertification, SimpleMeasureRecord, dictType } from './sample_list_interface'
import selectCustomer from './selectCustomer.vue'
import showPhoto from '@/views/system/tool/showPhoto.vue'
@@ -13,7 +14,7 @@
import { UploadFile } from '@/api/measure/file'
import type { ICustomer } from '@/views/customer/customerInfo/customer_interface'
import { getDictByCode } from '@/api/system/dict'
-
+import type { IRecord } from '@/views/business/schedule/interchange/interchange_interface'
const textMap: { [key: string]: string } = {
edit: '编辑',
add: '新建',
@@ -109,11 +110,26 @@
}
getDict()
+const listQuery = ref({
+ sampleId: infoId.value, // 样品id
+ customerId: '', // 客户id
+ offset: 1,
+ limit: 10,
+})
+const totalRecords = ref(0) // 检定记录
+const totalCertifications = ref(0) // 检定证书
// 获取检定记录
const fetchMeasureRecords = (query = null) => {
if (pageType.value === 'detail') {
- getMesureRecords({ sampleId: infoId.value, customerId: '' }).then((res) => {
- dataList.value.measureRecords = res.data.rows
+ getMesureRecords(listQuery.value).then((res) => {
+ dataList.value.measureRecords = res.data.rows.map((item: { orderTime: string; deliverTime: string }) => {
+ return {
+ ...item,
+ orderTime: item.orderTime ? dayjs(item.orderTime).format('YYYY-MM-DD') : '',
+ deliverTime: item.deliverTime ? dayjs(item.deliverTime).format('YYYY-MM-DD') : '',
+ }
+ })
+ totalRecords.value = parseInt(res.data.total)
})
}
}
@@ -121,8 +137,16 @@
// 获取检定证书
const fetchCertifications = (query = null) => {
if (pageType.value === 'detail') {
- getCertification({ sampleId: infoId.value, customerId: '' }).then((res) => {
- dataList.value.certificationRecords = res.data.rows
+ getCertification(listQuery.value).then((res) => {
+ dataList.value.certificationRecords = res.data.rows.map((item: { effectiveDate: string; expirationDate: string }) => {
+ return {
+ ...item,
+ effectiveDate: item.effectiveDate ? dayjs(item.effectiveDate).format('YYYY-MM-DD') : '',
+ expirationDate: item.expirationDate ? dayjs(item.expirationDate).format('YYYY-MM-DD') : '',
+
+ }
+ })
+ totalCertifications.value = parseInt(res.data.total)
})
}
}
@@ -133,11 +157,11 @@
name: '检定记录',
columns: [
{ text: '委托单编号', value: 'orderCode', align: 'center' },
- { text: '委托单日期', value: 'orderTime', align: 'center' },
+ { text: '委托单日期', value: 'orderTime', align: 'center', width: '120' },
{ text: '委托方代码', value: 'customerCode', align: 'center' },
{ text: '委托方名称', value: 'customerName', align: 'center' },
{ text: '送检人', value: 'deliverer', align: 'center' },
- { text: '送检日期', value: 'deliverTime', align: 'center' },
+ { text: '送检日期', value: 'deliverTime', align: 'center', width: '120' },
],
list: 'measureRecords',
pagination: true,
@@ -149,8 +173,8 @@
{ text: '证书编号', value: 'certificationCode', align: 'center' },
{ text: '证书名称', value: 'certificationName', align: 'center' },
{ text: '证书类型', value: 'certificationClassName', align: 'center' },
- { text: '证书出具日期', value: 'effectiveDate', align: 'center' },
- { text: '证书有效期', value: 'expirationDate', align: 'center' },
+ { text: '证书出具日期', value: 'effectiveDate', align: 'center', width: '120' },
+ { text: '证书有效期', value: 'expirationDate', align: 'center', width: '120' },
],
list: 'certificationRecords',
pagination: true,
@@ -162,6 +186,23 @@
const currentMenuObj = computed(() => {
return menu.find(item => item.name === currentMenu.value)
})
+watch(currentMenuObj, () => {
+ listQuery.value.offset = 1
+ currentMenuObj.value?.searchFunc()
+},
+{
+ deep: true,
+ immediate: true,
+})
+
+// 监听检定记录和证书报告页数变化
+const changePage = (val: any) => {
+ if (val.value && currentMenuObj) {
+ listQuery.value.offset = val.value.offset
+ listQuery.value.limit = val.value.limit
+ currentMenuObj.value?.searchFunc()
+ }
+}
// 从路由中获取页面类型参数
const $route = useRoute()
@@ -616,7 +657,8 @@
-
+
+
diff --git a/src/views/customer/sample/list/list.vue b/src/views/customer/sample/list/list.vue
index 322a197..434d21c 100644
--- a/src/views/customer/sample/list/list.vue
+++ b/src/views/customer/sample/list/list.vue
@@ -1,3 +1,4 @@
+
+
+
+
+
+
+
+ 关闭
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 无
+
+
+ {{ sampleForm.minioFileName === '' ? '上传' : '更换附件' }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ item.name }}
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/business/board/overdueReminder/list.vue b/src/views/business/board/overdueReminder/list.vue
new file mode 100644
index 0000000..2421546
--- /dev/null
+++ b/src/views/business/board/overdueReminder/list.vue
@@ -0,0 +1,269 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ (listQuery.offset - 1) * listQuery.limit + scope.$index + 1 }}
+
+
+
+
+
+
+
+ 详情
+
+
+ 催办
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/business/board/overdueReminder/overdueReminder_interface.ts b/src/views/business/board/overdueReminder/overdueReminder_interface.ts
new file mode 100644
index 0000000..45bcf9e
--- /dev/null
+++ b/src/views/business/board/overdueReminder/overdueReminder_interface.ts
@@ -0,0 +1,31 @@
+// 筛选
+export interface IListQuery {
+ sampleNo: string // 样品编号
+ sampleName: string // 样品名称
+ orderNo: string // 委托书编号
+ customerNo: string // 委托方代码
+ customerName: string // 委托方名称
+ isUrgent: string // 是否加急
+ sampleBelong: string // 样品属性
+ sampleStatus: string // 分发状态
+ startTime: string // 应检定开始时间
+ endTime: string // 应检定结束时间
+ limit: number
+ offset: number
+}
+// 表格
+export interface IList {
+ id: string // 主键
+ sampleId: string // 样品id
+ sampleNo: string // 样品编号
+ sampleName: string// 样品名称
+ sampleModel: string// 型号
+ manufacturingNo: string// 出厂编号
+ orderId: string // 委托书id
+ orderCode: string// 委托书编号
+ customerNo: string// 委托方代码
+ customerName: string// 委托方名称
+ deliverer: string// 送检人
+ remark: string// 备注
+}
+
diff --git a/src/views/business/schedule/components/terminateDialog.vue b/src/views/business/schedule/components/terminateDialog.vue
index d5f85a0..17c8b15 100644
--- a/src/views/business/schedule/components/terminateDialog.vue
+++ b/src/views/business/schedule/components/terminateDialog.vue
@@ -32,7 +32,7 @@
* @param orderId 委托书id
* @param sampleId 样品id
*/
-function initDialog(row) {
+function initDialog(row: any) {
// dataFormRef.value!.clearValidate()
formData.value.orderId = row.orderId
formData.value.sampleId = row.sampleId
diff --git a/src/views/business/schedule/interchange/interchangeDetail.vue b/src/views/business/schedule/interchange/interchangeDetail.vue
index 789505f..5244f44 100644
--- a/src/views/business/schedule/interchange/interchangeDetail.vue
+++ b/src/views/business/schedule/interchange/interchangeDetail.vue
@@ -4,6 +4,8 @@
import { ElMessage, ElMessageBox } from 'element-plus'
import type { FormInstance, UploadUserFile } from 'element-plus'
import { ref } from 'vue'
+import dayjs from 'dayjs'
+import type { IRecord } from './interchange_interface'
import type { ISampleEdit, Menu, SimpleCertification, SimpleMeasureRecord, dictType } from '@/views/customer/sample/list/sample_list_interface'
import selectCustomer from '@/views/customer/sample/list/selectCustomer.vue'
import showPhoto from '@/views/system/tool/showPhoto.vue'
@@ -13,7 +15,6 @@
import { UploadFile } from '@/api/measure/file'
import type { ICustomer } from '@/views/customer/customerInfo/customer_interface'
import { getDictByCode } from '@/api/system/dict'
-
const textMap: { [key: string]: string } = {
edit: '编辑',
add: '新建',
@@ -27,6 +28,7 @@
const mesureCategoryList = ref
([]) // 校检类别
const measureTypeList = ref([]) // 检定方式
const powerVoltageList = ref([]) // 电源电压
+const total = ref(0)
const dataForm: Ref = ref({
id: '',
sampleNo: '', // 样品编号
@@ -86,12 +88,6 @@
powerVoltage: [{ required: true, message: '要求电源电压不能为空', trigger: 'change' }],
}) // 表单验证规则
-// 其他关联数据列表
-const dataList = ref({
- measureRecords: [] as SimpleMeasureRecord[],
- certificationRecords: [] as SimpleCertification[],
-})
-
// 获取字典值
function getDict() {
// 校检类别
@@ -109,11 +105,33 @@
}
getDict()
+// --------------------------检定记录、检定证书-----------------------------------------
+// 其他关联数据列表
+const dataList = ref({
+ measureRecords: [] as SimpleMeasureRecord[],
+ certificationRecords: [] as SimpleCertification[],
+})
+
+const listQuery = ref({
+ sampleId: infoId.value, // 样品id
+ customerId: '', // 客户id
+ offset: 1,
+ limit: 10,
+})
+const totalRecords = ref(0) // 检定记录总条数
+const totalCertifications = ref(0) // 检定证书总条数
// 获取检定记录
const fetchMeasureRecords = (query = null) => {
if (pageType.value === 'detail') {
- getMesureRecords({ sampleId: infoId.value, customerId: '' }).then((res) => {
- dataList.value.measureRecords = res.data.rows
+ getMesureRecords(listQuery.value).then((res) => {
+ dataList.value.measureRecords = res.data.rows.map((item: { orderTime: string; deliverTime: string }) => {
+ return {
+ ...item,
+ orderTime: item.orderTime ? dayjs(item.orderTime).format('YYYY-MM-DD') : '',
+ deliverTime: item.deliverTime ? dayjs(item.deliverTime).format('YYYY-MM-DD') : '',
+ }
+ })
+ totalRecords.value = parseInt(res.data.total)
})
}
}
@@ -121,8 +139,16 @@
// 获取检定证书
const fetchCertifications = (query = null) => {
if (pageType.value === 'detail') {
- getCertification({ sampleId: infoId.value, customerId: '' }).then((res) => {
- dataList.value.certificationRecords = res.data.rows
+ getCertification(listQuery.value).then((res) => {
+ dataList.value.certificationRecords = res.data.rows.map((item: { effectiveDate: string; expirationDate: string }) => {
+ return {
+ ...item,
+ effectiveDate: item.effectiveDate ? dayjs(item.effectiveDate).format('YYYY-MM-DD') : '',
+ expirationDate: item.expirationDate ? dayjs(item.expirationDate).format('YYYY-MM-DD') : '',
+
+ }
+ })
+ totalCertifications.value = parseInt(res.data.total)
})
}
}
@@ -133,11 +159,11 @@
name: '检定记录',
columns: [
{ text: '委托单编号', value: 'orderCode', align: 'center' },
- { text: '委托单日期', value: 'orderTime', align: 'center' },
+ { text: '委托单日期', value: 'orderTime', align: 'center', width: '120' },
{ text: '委托方代码', value: 'customerCode', align: 'center' },
{ text: '委托方名称', value: 'customerName', align: 'center' },
{ text: '送检人', value: 'deliverer', align: 'center' },
- { text: '送检日期', value: 'deliverTime', align: 'center' },
+ { text: '送检日期', value: 'deliverTime', align: 'center', width: '120' },
],
list: 'measureRecords',
pagination: true,
@@ -149,8 +175,8 @@
{ text: '证书编号', value: 'certificationCode', align: 'center' },
{ text: '证书名称', value: 'certificationName', align: 'center' },
{ text: '证书类型', value: 'certificationClassName', align: 'center' },
- { text: '证书出具日期', value: 'effectiveDate', align: 'center' },
- { text: '证书有效期', value: 'expirationDate', align: 'center' },
+ { text: '证书出具日期', value: 'effectiveDate', align: 'center', width: '120' },
+ { text: '证书有效期', value: 'expirationDate', align: 'center', width: '120' },
],
list: 'certificationRecords',
pagination: true,
@@ -162,6 +188,25 @@
const currentMenuObj = computed(() => {
return menu.find(item => item.name === currentMenu.value)
})
+watch(currentMenuObj, () => {
+ listQuery.value.offset = 1
+ currentMenuObj.value?.searchFunc()
+},
+{
+ deep: true,
+ immediate: true,
+})
+
+// 监听检定记录和证书报告页数变化
+const changePage = (val: any) => {
+ if (val.value && currentMenuObj) {
+ listQuery.value.offset = val.value.offset
+ listQuery.value.limit = val.value.limit
+ currentMenuObj.value?.searchFunc()
+ }
+}
+
+// -------------------------------------底部--------------------------------------
// 从路由中获取页面类型参数
const $route = useRoute()
@@ -615,7 +660,8 @@
-
+
+
diff --git a/src/views/business/schedule/interchange/interchangeList.vue b/src/views/business/schedule/interchange/interchangeList.vue
index 61ca5e5..51321f8 100644
--- a/src/views/business/schedule/interchange/interchangeList.vue
+++ b/src/views/business/schedule/interchange/interchangeList.vue
@@ -32,7 +32,7 @@
sampleNo: '', // 样品编号
sampleName: '', // 样品名称
orderNo: '', // 委托书编号
- customerId: '', // 委托方代码
+ customerNo: '', // 委托方代码
startTime: '', // 预计送达开始时间
endTime: '', // 预计送达结束时间
isUrgent: '2', // 是否加急 //2全部
@@ -174,12 +174,12 @@
sampleNo: '', // 样品编号
sampleName: '', // 样品名称
orderNo: '', // 委托书编号
- customerId: '', // 委托方代码
+ customerNo: '', // 委托方代码
startTime: '', // 预计送达开始时间
endTime: '', // 预计送达结束时间
isUrgent: '2', // 是否加急
sampleBelong: '2', // 样品属性
- sampleStatus: '',
+ sampleStatus: '', // 样品状态
offset: 1,
limit: 20,
}
@@ -238,7 +238,7 @@
sampleNo: listQuery.value.sampleNo, // 样品编号
sampleName: listQuery.value.sampleName, // 样品名称
orderNo: listQuery.value.orderNo, // 委托书编号
- customerId: listQuery.value.customerId, // 委托方代码
+ customerNo: listQuery.value.customerNo, // 委托方代码
startTime: listQuery.value.startTime, // 预计送达开始时间
endTime: listQuery.value.endTime, // 预计送达结束时间
isUrgent: listQuery.value.isUrgent, // 是否加急
@@ -363,6 +363,11 @@
$router.push(`/schedule/interchange/${pageType}/${row.sampleId}`)
}
+// 点击生成设备交接单
+const createInterchangeReceipt = () => {
+ $router.push('/schedule/receipt/add')
+}
+
onMounted(async () => {
await getDict() // 字典
if (window.sessionStorage.getItem('interchangeActive')) {
@@ -407,7 +412,7 @@
+
diff --git a/src/views/business/schedule/interchange/interchange_interface.ts b/src/views/business/schedule/interchange/interchange_interface.ts
index f1a3f91..ffa18b0 100644
--- a/src/views/business/schedule/interchange/interchange_interface.ts
+++ b/src/views/business/schedule/interchange/interchange_interface.ts
@@ -4,7 +4,8 @@
sampleNo: string // 样品编号
sampleName: string // 样品名称
orderNo: string // 委托书编号
- customerId: string // 委托方代码
+ customerId?: string // 委托方代码
+ customerNo?: string // 委托方代码
startTime: string // 预计送达开始时间
endTime: string // 预计送达结束时间
isUrgent: string // 是否加急
@@ -35,6 +36,13 @@
orderId: string | number // 委托书id
sampleId: string | number// 样品id
}
+// 检定记录检定证书查询条件
+export interface IRecord {
+ sampleId: string // 样品id
+ customerId: string // 客户id
+ offset: number
+ limit: number
+}
// 检定记录
export interface SimpleMeasureRecord {
diff --git a/src/views/business/schedule/interchangeReceipt/receiptEdit.vue b/src/views/business/schedule/interchangeReceipt/receiptEdit.vue
index c629542..83a076e 100644
--- a/src/views/business/schedule/interchangeReceipt/receiptEdit.vue
+++ b/src/views/business/schedule/interchangeReceipt/receiptEdit.vue
@@ -220,6 +220,7 @@
const confirmCheckoutOrder = (val: Array) => {
if (val && val.length) {
dataForm.value.orderCode = val[0].orderCode // 委托书编号
+ dataForm.value.orderNo = val[0].orderCode // 委托书编号
dataForm.value.orderId = val[0].id // 委托书id
dataForm.value.deliverer = val[0].deliverer // 送检人
dataForm.value.delivererTel = val[0].delivererTel // 送检人
@@ -233,13 +234,17 @@
}
}
-// ------------------------样品-----------------------------
+// ----------------------------------样品----------------------------------------------
// 点击批量增加
const multiAdd = () => {
- if (!dataForm.value.customerNo) {
+ if (!dataForm.value.orderCode) {
ElMessage.warning('请先选择委托书')
return
}
+ if (!dataForm.value.customerNo) {
+ ElMessage.warning('没有委托方代码,请检查')
+ return
+ }
sampleVisible.value = true
}
// 修改委托方对话框显隐
diff --git a/src/views/business/schedule/interchangeReceipt/receiptList-interface.ts b/src/views/business/schedule/interchangeReceipt/receiptList-interface.ts
index b3089b4..4b4432e 100644
--- a/src/views/business/schedule/interchangeReceipt/receiptList-interface.ts
+++ b/src/views/business/schedule/interchangeReceipt/receiptList-interface.ts
@@ -79,6 +79,7 @@
customerId: string // 委托方id
sampleName: string // 样品名称
sampleNo: string // 样品编号
+ customerName: string // 委托方名称
offset: number
limit: number
}
diff --git a/src/views/business/schedule/interchangeReceipt/selectSample.vue b/src/views/business/schedule/interchangeReceipt/selectSample.vue
index 11d3092..6c1cb6c 100644
--- a/src/views/business/schedule/interchangeReceipt/selectSample.vue
+++ b/src/views/business/schedule/interchangeReceipt/selectSample.vue
@@ -25,6 +25,7 @@
customerId: '', // 委托方id
sampleName: '', // 样品名称
sampleNo: '', // 样品编号
+ customerName: '', // 委托方名称
offset: 1,
limit: 20,
})
@@ -36,9 +37,9 @@
{ text: '出厂编号', value: 'manufacturingNo', align: 'center' },
{ text: '委托方代码', value: 'customerNo', align: 'center' },
{ text: '委托方名称', value: 'customerName', align: 'center' },
- { text: '检定周期', value: 'measurePeriod', align: 'center' },
- { text: '上次检定时间', value: 'measureLastTime', align: 'center', width: '180px' },
- { text: '样品状态', value: 'sampleSatusName', align: 'center', width: '80px' },
+ // { text: '检定周期', value: 'measurePeriod', align: 'center' },
+ // { text: '上次检定时间', value: 'measureLastTime', align: 'center', width: '180px' },
+ // { text: '样品状态', value: 'sampleSatusName', align: 'center', width: '80px' },
{ text: '备注', value: 'remark', align: 'center', width: '180px' },
])
// 表格数据
@@ -84,6 +85,7 @@
customerId: '', // 委托方id
sampleName: '', // 样品名称
sampleNo: '', // 样品编号
+ customerName: '', // 委托方名称
offset: 1,
limit: 20,
}
@@ -127,56 +129,55 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ (listQuery.offset - 1) * listQuery.limit + scope.$index + 1 }}
-
-
-
-
-
-
- 确定
-
-
- 取消
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ (listQuery.offset - 1) * listQuery.limit + scope.$index + 1 }}
+
+
-
-
+
+
+
+ 确定
+
+
+ 取消
+
+
+
diff --git a/src/views/business/schedule/order/orderEdit.vue b/src/views/business/schedule/order/orderEdit.vue
index 68ced75..142db45 100644
--- a/src/views/business/schedule/order/orderEdit.vue
+++ b/src/views/business/schedule/order/orderEdit.vue
@@ -313,6 +313,10 @@
// 点击保存
const saveForm = (formEl: FormInstance | undefined) => {
+ if (!list.value.length) {
+ ElMessage.warning('要求样品清单不能为空')
+ return
+ }
// 检查表格是否存在增加行信息没有完善的情况
const result = checkList()
if (result !== 'pass') {
diff --git a/src/views/business/schedule/order/selectSample.vue b/src/views/business/schedule/order/selectSample.vue
index 720a2e3..5c07d92 100644
--- a/src/views/business/schedule/order/selectSample.vue
+++ b/src/views/business/schedule/order/selectSample.vue
@@ -29,8 +29,8 @@
// 查询条件
const listQuery = ref({
- // sampleNo: '', // 样品编号
- // sampleName: '', // 样品名称
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
// sampleModel: '', // 型号
orderId: props.orderId || '', // 委托书id
customerId: props.customerId || '', // 委托方id
@@ -51,8 +51,8 @@
{ text: '委托方代码', value: 'customerNo', align: 'center' },
{ text: '委托方名称', value: 'customerName', align: 'center' },
{ text: '检定周期', value: 'measurePeriod', align: 'center' },
- { text: '上次检定时间', value: 'measureLastTime', align: 'center', width: '180px' },
- { text: '样品状态', value: 'sampleSatusName', align: 'center', width: '80px' },
+ // { text: '上次检定时间', value: 'measureLastTime', align: 'center', width: '180px' },
+ // { text: '样品状态', value: 'sampleSatusName', align: 'center', width: '80px' },
{ text: '备注', value: 'remark', align: 'center', width: '180px' },
])
// 表格数据
@@ -97,12 +97,14 @@
listQuery.value = {
sampleNo: '', // 样品编号
sampleName: '', // 样品名称
- sampleModel: '', // 型号
- customerNo: '', // 委托方代码
- customerName: '', // 委托方名称
- startTime: '', // 检定开始时间
- endTime: '', // 检定结束时间
- overtimeStatus: '', // 样品超期状态 1已超期、0未超期、空字符串 已超期+未超期
+ // sampleModel: '', // 型号
+ orderId: props.orderId || '', // 委托书id
+ customerId: props.customerId || '', // 委托方id
+ customerNo: props.customerNo || '', // 委托方代码
+ // customerName: '', // 委托方名称
+ // startTime: '', // 检定开始时间
+ // endTime: '', // 检定结束时间
+ // overtimeStatus: '', // 样品超期状态 1已超期、0未超期、空字符串 已超期+未超期
offset: 1,
limit: 20,
}
@@ -146,48 +148,57 @@
-
-
-
-
-
-
- 确定
-
-
- 取消
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ (listQuery.offset - 1) * listQuery.limit + scope.$index + 1 }}
+
+
-
-
+
+
+
+ 确定
+
+
+ 取消
+
+
+
+
diff --git a/src/views/business/schedule/task/components/chooseLab.vue b/src/views/business/schedule/task/components/chooseLab.vue
index a8222ac..0dcebfc 100644
--- a/src/views/business/schedule/task/components/chooseLab.vue
+++ b/src/views/business/schedule/task/components/chooseLab.vue
@@ -161,7 +161,6 @@
:columns="columns"
:query="listQuery"
:list-loading="loadingTable"
-
:pagination="false"
size="small"
@multi-select="handleSelectionChange"
@@ -169,6 +168,11 @@
+
+
+ {{ scope.$index + 1 }}
+
+
diff --git a/src/views/business/schedule/task/components/distributeDialog.vue b/src/views/business/schedule/task/components/distributeDialog.vue
index 6474dce..fb6a3f5 100644
--- a/src/views/business/schedule/task/components/distributeDialog.vue
+++ b/src/views/business/schedule/task/components/distributeDialog.vue
@@ -10,7 +10,7 @@
const dialogVisible = ref(false) // 弹窗显示
const sampleId = ref('') // 样品id
const orderId = ref('') // 委托单id
-
+const type = ref('distribute')
// 委托书-证书类别列表
const certificationTypes = ref([])
// 获取字典值
@@ -53,10 +53,16 @@
}
// 初始化弹窗
-const initDialog = (orderid: string, sampleid: string) => {
+const initDialog = (orderid: string, sampleid: string, sampleStatus: string) => {
dialogVisible.value = true
sampleId.value = sampleid
orderId.value = orderid
+ if (sampleStatus === '3') { // 检测中
+ type.value = 'testing'
+ }
+ else if (sampleStatus === '2') { // 待分发
+ type.value = 'distribute'
+ }
getInfo()
}
@@ -105,7 +111,7 @@
批量添加
-
+
确定
diff --git a/src/views/business/schedule/task/components/processConfig.vue b/src/views/business/schedule/task/components/processConfig.vue
index 43f2165..bb66076 100644
--- a/src/views/business/schedule/task/components/processConfig.vue
+++ b/src/views/business/schedule/task/components/processConfig.vue
@@ -56,7 +56,8 @@
if (props.list.length > 0) {
processList.value = props.list as ISchedule[]
}
-})
+},
+{ deep: true, immediate: true })
// 点击添加流程
const processAdd = () => {
@@ -103,6 +104,7 @@
const saveProcess = () => {
const form = {
measureProcessList: processList.value,
+ executiveList: processList.value,
orderId: props.orderId,
sampleId: props.sampleId,
}
@@ -138,7 +140,7 @@
-
+
diff --git a/src/views/business/schedule/task/components/processNode.vue b/src/views/business/schedule/task/components/processNode.vue
index d76d41d..fad76ab 100644
--- a/src/views/business/schedule/task/components/processNode.vue
+++ b/src/views/business/schedule/task/components/processNode.vue
@@ -25,7 +25,7 @@
}
},
},
- // 是否为详情展示页面-暂时无用
+ // 是否为详情展示页面
detail: {
type: Boolean,
default: false,
@@ -111,10 +111,10 @@
{{ props.step }}
-
+
-
+
@@ -122,22 +122,22 @@
检定环节
-
-
+
+
检定人员
-
-
+
+
- 应出具证书 份
+ 应出具证书 份
当前状态{{ processNodeData.measureStatusName }}
diff --git a/src/views/business/schedule/task/taskEdit.vue b/src/views/business/schedule/task/taskEdit.vue
index d64aa23..1d1e04f 100644
--- a/src/views/business/schedule/task/taskEdit.vue
+++ b/src/views/business/schedule/task/taskEdit.vue
@@ -215,8 +215,11 @@
taskForm.value.deliverer = res.data.deliverer // 送检人
taskForm.value.delivererTel = res.data.delivererTel // 送检人联系方式
taskForm.value.measureContent = res.data.measureContent // 检定项目
- taskForm.value.measureProcessList = res.data.measureProcessList
- taskForm.value.measureSendBackList = res.data.measureSendBackList
+ taskForm.value.measureProcessList = res.data.measureProcessList // 检定流程
+ taskForm.value.measureSendBackList = res.data.measureSendBackList // 退回流程
+ console.log('pppppp')
+ console.log(taskForm.value.measureProcessList)
+
// 改用一个接口获取
sampleForm.value = res.data
})
@@ -558,7 +561,11 @@
保存
-->
-
+
+
+
+
+
diff --git a/src/views/business/schedule/task/taskList.vue b/src/views/business/schedule/task/taskList.vue
index 64473c3..0efec98 100644
--- a/src/views/business/schedule/task/taskList.vue
+++ b/src/views/business/schedule/task/taskList.vue
@@ -46,7 +46,7 @@
getDictByCode('sampleStatus').then((response) => {
// 制作右上角的菜单
response.data.forEach((item: dictType) => {
- if (['待分发', '检测中', '检测完成', '已超期(查询使用)'].includes(item.name)) {
+ if (['待分发', '检测中', '检测完成', '已超期'].includes(item.name)) {
if (item.name === '待分发') {
active.value = item.value
activeTitle.value = item.name
@@ -58,6 +58,7 @@
})
}
})
+ console.log('88', menu.value)
if (window.sessionStorage.getItem('taskActive') != null) {
active.value = window.sessionStorage.getItem('taskActive') as string
@@ -99,6 +100,7 @@
// 是否显示当前页,否则跳转第一页
listQuery.value.offset = 1
}
+ listQuery.value.sampleStatus = active.value || '2'
getTaskList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: ITaskList) => {
item.isUrgentName = item.isUrgent == 1 ? '是' : '否'
@@ -146,7 +148,7 @@
// 点击分发, 弹窗
const distributeDialogRef = ref()
const handleDistribute = (row: ITaskList) => {
- distributeDialogRef.value.initDialog(row.orderId, row.sampleId)
+ distributeDialogRef.value.initDialog(row.orderId, row.sampleId, listQuery.value.sampleStatus)
}
// 点击标签绑定
const barCodeBind = ref()
@@ -323,6 +325,7 @@
标签绑定
+
props.columns, () => {
+ console.log(searchQuery.value)
+ searchQuery.value.offset = 1
+})
// 页数发生变化后的操作,可能是页码变化,可能是每页容量变化,此函数必写
const changePage = (val: { size?: number; page?: number }) => {
if (val && val.size) {
diff --git a/src/views/customer/sample/list/edit.vue b/src/views/customer/sample/list/edit.vue
index 207aaff..ae4f0d6 100644
--- a/src/views/customer/sample/list/edit.vue
+++ b/src/views/customer/sample/list/edit.vue
@@ -4,6 +4,7 @@
import { ElMessage, ElMessageBox } from 'element-plus'
import type { FormInstance, UploadUserFile } from 'element-plus'
import { ref } from 'vue'
+import dayjs from 'dayjs'
import type { ISampleEdit, Menu, SimpleCertification, SimpleMeasureRecord, dictType } from './sample_list_interface'
import selectCustomer from './selectCustomer.vue'
import showPhoto from '@/views/system/tool/showPhoto.vue'
@@ -13,7 +14,7 @@
import { UploadFile } from '@/api/measure/file'
import type { ICustomer } from '@/views/customer/customerInfo/customer_interface'
import { getDictByCode } from '@/api/system/dict'
-
+import type { IRecord } from '@/views/business/schedule/interchange/interchange_interface'
const textMap: { [key: string]: string } = {
edit: '编辑',
add: '新建',
@@ -109,11 +110,26 @@
}
getDict()
+const listQuery = ref({
+ sampleId: infoId.value, // 样品id
+ customerId: '', // 客户id
+ offset: 1,
+ limit: 10,
+})
+const totalRecords = ref(0) // 检定记录
+const totalCertifications = ref(0) // 检定证书
// 获取检定记录
const fetchMeasureRecords = (query = null) => {
if (pageType.value === 'detail') {
- getMesureRecords({ sampleId: infoId.value, customerId: '' }).then((res) => {
- dataList.value.measureRecords = res.data.rows
+ getMesureRecords(listQuery.value).then((res) => {
+ dataList.value.measureRecords = res.data.rows.map((item: { orderTime: string; deliverTime: string }) => {
+ return {
+ ...item,
+ orderTime: item.orderTime ? dayjs(item.orderTime).format('YYYY-MM-DD') : '',
+ deliverTime: item.deliverTime ? dayjs(item.deliverTime).format('YYYY-MM-DD') : '',
+ }
+ })
+ totalRecords.value = parseInt(res.data.total)
})
}
}
@@ -121,8 +137,16 @@
// 获取检定证书
const fetchCertifications = (query = null) => {
if (pageType.value === 'detail') {
- getCertification({ sampleId: infoId.value, customerId: '' }).then((res) => {
- dataList.value.certificationRecords = res.data.rows
+ getCertification(listQuery.value).then((res) => {
+ dataList.value.certificationRecords = res.data.rows.map((item: { effectiveDate: string; expirationDate: string }) => {
+ return {
+ ...item,
+ effectiveDate: item.effectiveDate ? dayjs(item.effectiveDate).format('YYYY-MM-DD') : '',
+ expirationDate: item.expirationDate ? dayjs(item.expirationDate).format('YYYY-MM-DD') : '',
+
+ }
+ })
+ totalCertifications.value = parseInt(res.data.total)
})
}
}
@@ -133,11 +157,11 @@
name: '检定记录',
columns: [
{ text: '委托单编号', value: 'orderCode', align: 'center' },
- { text: '委托单日期', value: 'orderTime', align: 'center' },
+ { text: '委托单日期', value: 'orderTime', align: 'center', width: '120' },
{ text: '委托方代码', value: 'customerCode', align: 'center' },
{ text: '委托方名称', value: 'customerName', align: 'center' },
{ text: '送检人', value: 'deliverer', align: 'center' },
- { text: '送检日期', value: 'deliverTime', align: 'center' },
+ { text: '送检日期', value: 'deliverTime', align: 'center', width: '120' },
],
list: 'measureRecords',
pagination: true,
@@ -149,8 +173,8 @@
{ text: '证书编号', value: 'certificationCode', align: 'center' },
{ text: '证书名称', value: 'certificationName', align: 'center' },
{ text: '证书类型', value: 'certificationClassName', align: 'center' },
- { text: '证书出具日期', value: 'effectiveDate', align: 'center' },
- { text: '证书有效期', value: 'expirationDate', align: 'center' },
+ { text: '证书出具日期', value: 'effectiveDate', align: 'center', width: '120' },
+ { text: '证书有效期', value: 'expirationDate', align: 'center', width: '120' },
],
list: 'certificationRecords',
pagination: true,
@@ -162,6 +186,23 @@
const currentMenuObj = computed(() => {
return menu.find(item => item.name === currentMenu.value)
})
+watch(currentMenuObj, () => {
+ listQuery.value.offset = 1
+ currentMenuObj.value?.searchFunc()
+},
+{
+ deep: true,
+ immediate: true,
+})
+
+// 监听检定记录和证书报告页数变化
+const changePage = (val: any) => {
+ if (val.value && currentMenuObj) {
+ listQuery.value.offset = val.value.offset
+ listQuery.value.limit = val.value.limit
+ currentMenuObj.value?.searchFunc()
+ }
+}
// 从路由中获取页面类型参数
const $route = useRoute()
@@ -616,7 +657,8 @@
-
+
+
diff --git a/src/views/customer/sample/list/list.vue b/src/views/customer/sample/list/list.vue
index 322a197..434d21c 100644
--- a/src/views/customer/sample/list/list.vue
+++ b/src/views/customer/sample/list/list.vue
@@ -1,3 +1,4 @@
+
+
+
+
+
+
+
+ 关闭
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 无
+
+
+ {{ sampleForm.minioFileName === '' ? '上传' : '更换附件' }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ item.name }}
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/business/board/overdueReminder/list.vue b/src/views/business/board/overdueReminder/list.vue
new file mode 100644
index 0000000..2421546
--- /dev/null
+++ b/src/views/business/board/overdueReminder/list.vue
@@ -0,0 +1,269 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ (listQuery.offset - 1) * listQuery.limit + scope.$index + 1 }}
+
+
+
+
+
+
+
+ 详情
+
+
+ 催办
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/business/board/overdueReminder/overdueReminder_interface.ts b/src/views/business/board/overdueReminder/overdueReminder_interface.ts
new file mode 100644
index 0000000..45bcf9e
--- /dev/null
+++ b/src/views/business/board/overdueReminder/overdueReminder_interface.ts
@@ -0,0 +1,31 @@
+// 筛选
+export interface IListQuery {
+ sampleNo: string // 样品编号
+ sampleName: string // 样品名称
+ orderNo: string // 委托书编号
+ customerNo: string // 委托方代码
+ customerName: string // 委托方名称
+ isUrgent: string // 是否加急
+ sampleBelong: string // 样品属性
+ sampleStatus: string // 分发状态
+ startTime: string // 应检定开始时间
+ endTime: string // 应检定结束时间
+ limit: number
+ offset: number
+}
+// 表格
+export interface IList {
+ id: string // 主键
+ sampleId: string // 样品id
+ sampleNo: string // 样品编号
+ sampleName: string// 样品名称
+ sampleModel: string// 型号
+ manufacturingNo: string// 出厂编号
+ orderId: string // 委托书id
+ orderCode: string// 委托书编号
+ customerNo: string// 委托方代码
+ customerName: string// 委托方名称
+ deliverer: string// 送检人
+ remark: string// 备注
+}
+
diff --git a/src/views/business/schedule/components/terminateDialog.vue b/src/views/business/schedule/components/terminateDialog.vue
index d5f85a0..17c8b15 100644
--- a/src/views/business/schedule/components/terminateDialog.vue
+++ b/src/views/business/schedule/components/terminateDialog.vue
@@ -32,7 +32,7 @@
* @param orderId 委托书id
* @param sampleId 样品id
*/
-function initDialog(row) {
+function initDialog(row: any) {
// dataFormRef.value!.clearValidate()
formData.value.orderId = row.orderId
formData.value.sampleId = row.sampleId
diff --git a/src/views/business/schedule/interchange/interchangeDetail.vue b/src/views/business/schedule/interchange/interchangeDetail.vue
index 789505f..5244f44 100644
--- a/src/views/business/schedule/interchange/interchangeDetail.vue
+++ b/src/views/business/schedule/interchange/interchangeDetail.vue
@@ -4,6 +4,8 @@
import { ElMessage, ElMessageBox } from 'element-plus'
import type { FormInstance, UploadUserFile } from 'element-plus'
import { ref } from 'vue'
+import dayjs from 'dayjs'
+import type { IRecord } from './interchange_interface'
import type { ISampleEdit, Menu, SimpleCertification, SimpleMeasureRecord, dictType } from '@/views/customer/sample/list/sample_list_interface'
import selectCustomer from '@/views/customer/sample/list/selectCustomer.vue'
import showPhoto from '@/views/system/tool/showPhoto.vue'
@@ -13,7 +15,6 @@
import { UploadFile } from '@/api/measure/file'
import type { ICustomer } from '@/views/customer/customerInfo/customer_interface'
import { getDictByCode } from '@/api/system/dict'
-
const textMap: { [key: string]: string } = {
edit: '编辑',
add: '新建',
@@ -27,6 +28,7 @@
const mesureCategoryList = ref
([]) // 校检类别
const measureTypeList = ref([]) // 检定方式
const powerVoltageList = ref([]) // 电源电压
+const total = ref(0)
const dataForm: Ref = ref({
id: '',
sampleNo: '', // 样品编号
@@ -86,12 +88,6 @@
powerVoltage: [{ required: true, message: '要求电源电压不能为空', trigger: 'change' }],
}) // 表单验证规则
-// 其他关联数据列表
-const dataList = ref({
- measureRecords: [] as SimpleMeasureRecord[],
- certificationRecords: [] as SimpleCertification[],
-})
-
// 获取字典值
function getDict() {
// 校检类别
@@ -109,11 +105,33 @@
}
getDict()
+// --------------------------检定记录、检定证书-----------------------------------------
+// 其他关联数据列表
+const dataList = ref({
+ measureRecords: [] as SimpleMeasureRecord[],
+ certificationRecords: [] as SimpleCertification[],
+})
+
+const listQuery = ref({
+ sampleId: infoId.value, // 样品id
+ customerId: '', // 客户id
+ offset: 1,
+ limit: 10,
+})
+const totalRecords = ref(0) // 检定记录总条数
+const totalCertifications = ref(0) // 检定证书总条数
// 获取检定记录
const fetchMeasureRecords = (query = null) => {
if (pageType.value === 'detail') {
- getMesureRecords({ sampleId: infoId.value, customerId: '' }).then((res) => {
- dataList.value.measureRecords = res.data.rows
+ getMesureRecords(listQuery.value).then((res) => {
+ dataList.value.measureRecords = res.data.rows.map((item: { orderTime: string; deliverTime: string }) => {
+ return {
+ ...item,
+ orderTime: item.orderTime ? dayjs(item.orderTime).format('YYYY-MM-DD') : '',
+ deliverTime: item.deliverTime ? dayjs(item.deliverTime).format('YYYY-MM-DD') : '',
+ }
+ })
+ totalRecords.value = parseInt(res.data.total)
})
}
}
@@ -121,8 +139,16 @@
// 获取检定证书
const fetchCertifications = (query = null) => {
if (pageType.value === 'detail') {
- getCertification({ sampleId: infoId.value, customerId: '' }).then((res) => {
- dataList.value.certificationRecords = res.data.rows
+ getCertification(listQuery.value).then((res) => {
+ dataList.value.certificationRecords = res.data.rows.map((item: { effectiveDate: string; expirationDate: string }) => {
+ return {
+ ...item,
+ effectiveDate: item.effectiveDate ? dayjs(item.effectiveDate).format('YYYY-MM-DD') : '',
+ expirationDate: item.expirationDate ? dayjs(item.expirationDate).format('YYYY-MM-DD') : '',
+
+ }
+ })
+ totalCertifications.value = parseInt(res.data.total)
})
}
}
@@ -133,11 +159,11 @@
name: '检定记录',
columns: [
{ text: '委托单编号', value: 'orderCode', align: 'center' },
- { text: '委托单日期', value: 'orderTime', align: 'center' },
+ { text: '委托单日期', value: 'orderTime', align: 'center', width: '120' },
{ text: '委托方代码', value: 'customerCode', align: 'center' },
{ text: '委托方名称', value: 'customerName', align: 'center' },
{ text: '送检人', value: 'deliverer', align: 'center' },
- { text: '送检日期', value: 'deliverTime', align: 'center' },
+ { text: '送检日期', value: 'deliverTime', align: 'center', width: '120' },
],
list: 'measureRecords',
pagination: true,
@@ -149,8 +175,8 @@
{ text: '证书编号', value: 'certificationCode', align: 'center' },
{ text: '证书名称', value: 'certificationName', align: 'center' },
{ text: '证书类型', value: 'certificationClassName', align: 'center' },
- { text: '证书出具日期', value: 'effectiveDate', align: 'center' },
- { text: '证书有效期', value: 'expirationDate', align: 'center' },
+ { text: '证书出具日期', value: 'effectiveDate', align: 'center', width: '120' },
+ { text: '证书有效期', value: 'expirationDate', align: 'center', width: '120' },
],
list: 'certificationRecords',
pagination: true,
@@ -162,6 +188,25 @@
const currentMenuObj = computed(() => {
return menu.find(item => item.name === currentMenu.value)
})
+watch(currentMenuObj, () => {
+ listQuery.value.offset = 1
+ currentMenuObj.value?.searchFunc()
+},
+{
+ deep: true,
+ immediate: true,
+})
+
+// 监听检定记录和证书报告页数变化
+const changePage = (val: any) => {
+ if (val.value && currentMenuObj) {
+ listQuery.value.offset = val.value.offset
+ listQuery.value.limit = val.value.limit
+ currentMenuObj.value?.searchFunc()
+ }
+}
+
+// -------------------------------------底部--------------------------------------
// 从路由中获取页面类型参数
const $route = useRoute()
@@ -615,7 +660,8 @@
-
+
+
diff --git a/src/views/business/schedule/interchange/interchangeList.vue b/src/views/business/schedule/interchange/interchangeList.vue
index 61ca5e5..51321f8 100644
--- a/src/views/business/schedule/interchange/interchangeList.vue
+++ b/src/views/business/schedule/interchange/interchangeList.vue
@@ -32,7 +32,7 @@
sampleNo: '', // 样品编号
sampleName: '', // 样品名称
orderNo: '', // 委托书编号
- customerId: '', // 委托方代码
+ customerNo: '', // 委托方代码
startTime: '', // 预计送达开始时间
endTime: '', // 预计送达结束时间
isUrgent: '2', // 是否加急 //2全部
@@ -174,12 +174,12 @@
sampleNo: '', // 样品编号
sampleName: '', // 样品名称
orderNo: '', // 委托书编号
- customerId: '', // 委托方代码
+ customerNo: '', // 委托方代码
startTime: '', // 预计送达开始时间
endTime: '', // 预计送达结束时间
isUrgent: '2', // 是否加急
sampleBelong: '2', // 样品属性
- sampleStatus: '',
+ sampleStatus: '', // 样品状态
offset: 1,
limit: 20,
}
@@ -238,7 +238,7 @@
sampleNo: listQuery.value.sampleNo, // 样品编号
sampleName: listQuery.value.sampleName, // 样品名称
orderNo: listQuery.value.orderNo, // 委托书编号
- customerId: listQuery.value.customerId, // 委托方代码
+ customerNo: listQuery.value.customerNo, // 委托方代码
startTime: listQuery.value.startTime, // 预计送达开始时间
endTime: listQuery.value.endTime, // 预计送达结束时间
isUrgent: listQuery.value.isUrgent, // 是否加急
@@ -363,6 +363,11 @@
$router.push(`/schedule/interchange/${pageType}/${row.sampleId}`)
}
+// 点击生成设备交接单
+const createInterchangeReceipt = () => {
+ $router.push('/schedule/receipt/add')
+}
+
onMounted(async () => {
await getDict() // 字典
if (window.sessionStorage.getItem('interchangeActive')) {
@@ -407,7 +412,7 @@
+
diff --git a/src/views/business/schedule/interchange/interchange_interface.ts b/src/views/business/schedule/interchange/interchange_interface.ts
index f1a3f91..ffa18b0 100644
--- a/src/views/business/schedule/interchange/interchange_interface.ts
+++ b/src/views/business/schedule/interchange/interchange_interface.ts
@@ -4,7 +4,8 @@
sampleNo: string // 样品编号
sampleName: string // 样品名称
orderNo: string // 委托书编号
- customerId: string // 委托方代码
+ customerId?: string // 委托方代码
+ customerNo?: string // 委托方代码
startTime: string // 预计送达开始时间
endTime: string // 预计送达结束时间
isUrgent: string // 是否加急
@@ -35,6 +36,13 @@
orderId: string | number // 委托书id
sampleId: string | number// 样品id
}
+// 检定记录检定证书查询条件
+export interface IRecord {
+ sampleId: string // 样品id
+ customerId: string // 客户id
+ offset: number
+ limit: number
+}
// 检定记录
export interface SimpleMeasureRecord {
diff --git a/src/views/business/schedule/interchangeReceipt/receiptEdit.vue b/src/views/business/schedule/interchangeReceipt/receiptEdit.vue
index c629542..83a076e 100644
--- a/src/views/business/schedule/interchangeReceipt/receiptEdit.vue
+++ b/src/views/business/schedule/interchangeReceipt/receiptEdit.vue
@@ -220,6 +220,7 @@
const confirmCheckoutOrder = (val: Array) => {
if (val && val.length) {
dataForm.value.orderCode = val[0].orderCode // 委托书编号
+ dataForm.value.orderNo = val[0].orderCode // 委托书编号
dataForm.value.orderId = val[0].id // 委托书id
dataForm.value.deliverer = val[0].deliverer // 送检人
dataForm.value.delivererTel = val[0].delivererTel // 送检人
@@ -233,13 +234,17 @@
}
}
-// ------------------------样品-----------------------------
+// ----------------------------------样品----------------------------------------------
// 点击批量增加
const multiAdd = () => {
- if (!dataForm.value.customerNo) {
+ if (!dataForm.value.orderCode) {
ElMessage.warning('请先选择委托书')
return
}
+ if (!dataForm.value.customerNo) {
+ ElMessage.warning('没有委托方代码,请检查')
+ return
+ }
sampleVisible.value = true
}
// 修改委托方对话框显隐
diff --git a/src/views/business/schedule/interchangeReceipt/receiptList-interface.ts b/src/views/business/schedule/interchangeReceipt/receiptList-interface.ts
index b3089b4..4b4432e 100644
--- a/src/views/business/schedule/interchangeReceipt/receiptList-interface.ts
+++ b/src/views/business/schedule/interchangeReceipt/receiptList-interface.ts
@@ -79,6 +79,7 @@
customerId: string // 委托方id
sampleName: string // 样品名称
sampleNo: string // 样品编号
+ customerName: string // 委托方名称
offset: number
limit: number
}
diff --git a/src/views/business/schedule/interchangeReceipt/selectSample.vue b/src/views/business/schedule/interchangeReceipt/selectSample.vue
index 11d3092..6c1cb6c 100644
--- a/src/views/business/schedule/interchangeReceipt/selectSample.vue
+++ b/src/views/business/schedule/interchangeReceipt/selectSample.vue
@@ -25,6 +25,7 @@
customerId: '', // 委托方id
sampleName: '', // 样品名称
sampleNo: '', // 样品编号
+ customerName: '', // 委托方名称
offset: 1,
limit: 20,
})
@@ -36,9 +37,9 @@
{ text: '出厂编号', value: 'manufacturingNo', align: 'center' },
{ text: '委托方代码', value: 'customerNo', align: 'center' },
{ text: '委托方名称', value: 'customerName', align: 'center' },
- { text: '检定周期', value: 'measurePeriod', align: 'center' },
- { text: '上次检定时间', value: 'measureLastTime', align: 'center', width: '180px' },
- { text: '样品状态', value: 'sampleSatusName', align: 'center', width: '80px' },
+ // { text: '检定周期', value: 'measurePeriod', align: 'center' },
+ // { text: '上次检定时间', value: 'measureLastTime', align: 'center', width: '180px' },
+ // { text: '样品状态', value: 'sampleSatusName', align: 'center', width: '80px' },
{ text: '备注', value: 'remark', align: 'center', width: '180px' },
])
// 表格数据
@@ -84,6 +85,7 @@
customerId: '', // 委托方id
sampleName: '', // 样品名称
sampleNo: '', // 样品编号
+ customerName: '', // 委托方名称
offset: 1,
limit: 20,
}
@@ -127,56 +129,55 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ (listQuery.offset - 1) * listQuery.limit + scope.$index + 1 }}
-
-
-
-
-
-
- 确定
-
-
- 取消
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ (listQuery.offset - 1) * listQuery.limit + scope.$index + 1 }}
+
+
-
-
+
+
+
+ 确定
+
+
+ 取消
+
+
+
diff --git a/src/views/business/schedule/order/orderEdit.vue b/src/views/business/schedule/order/orderEdit.vue
index 68ced75..142db45 100644
--- a/src/views/business/schedule/order/orderEdit.vue
+++ b/src/views/business/schedule/order/orderEdit.vue
@@ -313,6 +313,10 @@
// 点击保存
const saveForm = (formEl: FormInstance | undefined) => {
+ if (!list.value.length) {
+ ElMessage.warning('要求样品清单不能为空')
+ return
+ }
// 检查表格是否存在增加行信息没有完善的情况
const result = checkList()
if (result !== 'pass') {
diff --git a/src/views/business/schedule/order/selectSample.vue b/src/views/business/schedule/order/selectSample.vue
index 720a2e3..5c07d92 100644
--- a/src/views/business/schedule/order/selectSample.vue
+++ b/src/views/business/schedule/order/selectSample.vue
@@ -29,8 +29,8 @@
// 查询条件
const listQuery = ref({
- // sampleNo: '', // 样品编号
- // sampleName: '', // 样品名称
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
// sampleModel: '', // 型号
orderId: props.orderId || '', // 委托书id
customerId: props.customerId || '', // 委托方id
@@ -51,8 +51,8 @@
{ text: '委托方代码', value: 'customerNo', align: 'center' },
{ text: '委托方名称', value: 'customerName', align: 'center' },
{ text: '检定周期', value: 'measurePeriod', align: 'center' },
- { text: '上次检定时间', value: 'measureLastTime', align: 'center', width: '180px' },
- { text: '样品状态', value: 'sampleSatusName', align: 'center', width: '80px' },
+ // { text: '上次检定时间', value: 'measureLastTime', align: 'center', width: '180px' },
+ // { text: '样品状态', value: 'sampleSatusName', align: 'center', width: '80px' },
{ text: '备注', value: 'remark', align: 'center', width: '180px' },
])
// 表格数据
@@ -97,12 +97,14 @@
listQuery.value = {
sampleNo: '', // 样品编号
sampleName: '', // 样品名称
- sampleModel: '', // 型号
- customerNo: '', // 委托方代码
- customerName: '', // 委托方名称
- startTime: '', // 检定开始时间
- endTime: '', // 检定结束时间
- overtimeStatus: '', // 样品超期状态 1已超期、0未超期、空字符串 已超期+未超期
+ // sampleModel: '', // 型号
+ orderId: props.orderId || '', // 委托书id
+ customerId: props.customerId || '', // 委托方id
+ customerNo: props.customerNo || '', // 委托方代码
+ // customerName: '', // 委托方名称
+ // startTime: '', // 检定开始时间
+ // endTime: '', // 检定结束时间
+ // overtimeStatus: '', // 样品超期状态 1已超期、0未超期、空字符串 已超期+未超期
offset: 1,
limit: 20,
}
@@ -146,48 +148,57 @@
-
-
-
-
-
-
- 确定
-
-
- 取消
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ (listQuery.offset - 1) * listQuery.limit + scope.$index + 1 }}
+
+
-
-
+
+
+
+ 确定
+
+
+ 取消
+
+
+
+
diff --git a/src/views/business/schedule/task/components/chooseLab.vue b/src/views/business/schedule/task/components/chooseLab.vue
index a8222ac..0dcebfc 100644
--- a/src/views/business/schedule/task/components/chooseLab.vue
+++ b/src/views/business/schedule/task/components/chooseLab.vue
@@ -161,7 +161,6 @@
:columns="columns"
:query="listQuery"
:list-loading="loadingTable"
-
:pagination="false"
size="small"
@multi-select="handleSelectionChange"
@@ -169,6 +168,11 @@
+
+
+ {{ scope.$index + 1 }}
+
+
diff --git a/src/views/business/schedule/task/components/distributeDialog.vue b/src/views/business/schedule/task/components/distributeDialog.vue
index 6474dce..fb6a3f5 100644
--- a/src/views/business/schedule/task/components/distributeDialog.vue
+++ b/src/views/business/schedule/task/components/distributeDialog.vue
@@ -10,7 +10,7 @@
const dialogVisible = ref(false) // 弹窗显示
const sampleId = ref('') // 样品id
const orderId = ref('') // 委托单id
-
+const type = ref('distribute')
// 委托书-证书类别列表
const certificationTypes = ref([])
// 获取字典值
@@ -53,10 +53,16 @@
}
// 初始化弹窗
-const initDialog = (orderid: string, sampleid: string) => {
+const initDialog = (orderid: string, sampleid: string, sampleStatus: string) => {
dialogVisible.value = true
sampleId.value = sampleid
orderId.value = orderid
+ if (sampleStatus === '3') { // 检测中
+ type.value = 'testing'
+ }
+ else if (sampleStatus === '2') { // 待分发
+ type.value = 'distribute'
+ }
getInfo()
}
@@ -105,7 +111,7 @@
批量添加
-
+
确定
diff --git a/src/views/business/schedule/task/components/processConfig.vue b/src/views/business/schedule/task/components/processConfig.vue
index 43f2165..bb66076 100644
--- a/src/views/business/schedule/task/components/processConfig.vue
+++ b/src/views/business/schedule/task/components/processConfig.vue
@@ -56,7 +56,8 @@
if (props.list.length > 0) {
processList.value = props.list as ISchedule[]
}
-})
+},
+{ deep: true, immediate: true })
// 点击添加流程
const processAdd = () => {
@@ -103,6 +104,7 @@
const saveProcess = () => {
const form = {
measureProcessList: processList.value,
+ executiveList: processList.value,
orderId: props.orderId,
sampleId: props.sampleId,
}
@@ -138,7 +140,7 @@
-
+
diff --git a/src/views/business/schedule/task/components/processNode.vue b/src/views/business/schedule/task/components/processNode.vue
index d76d41d..fad76ab 100644
--- a/src/views/business/schedule/task/components/processNode.vue
+++ b/src/views/business/schedule/task/components/processNode.vue
@@ -25,7 +25,7 @@
}
},
},
- // 是否为详情展示页面-暂时无用
+ // 是否为详情展示页面
detail: {
type: Boolean,
default: false,
@@ -111,10 +111,10 @@
{{ props.step }}
-
+
-
+
@@ -122,22 +122,22 @@
检定环节
-
-
+
+
检定人员
-
-
+
+
- 应出具证书 份
+ 应出具证书 份
当前状态{{ processNodeData.measureStatusName }}
diff --git a/src/views/business/schedule/task/taskEdit.vue b/src/views/business/schedule/task/taskEdit.vue
index d64aa23..1d1e04f 100644
--- a/src/views/business/schedule/task/taskEdit.vue
+++ b/src/views/business/schedule/task/taskEdit.vue
@@ -215,8 +215,11 @@
taskForm.value.deliverer = res.data.deliverer // 送检人
taskForm.value.delivererTel = res.data.delivererTel // 送检人联系方式
taskForm.value.measureContent = res.data.measureContent // 检定项目
- taskForm.value.measureProcessList = res.data.measureProcessList
- taskForm.value.measureSendBackList = res.data.measureSendBackList
+ taskForm.value.measureProcessList = res.data.measureProcessList // 检定流程
+ taskForm.value.measureSendBackList = res.data.measureSendBackList // 退回流程
+ console.log('pppppp')
+ console.log(taskForm.value.measureProcessList)
+
// 改用一个接口获取
sampleForm.value = res.data
})
@@ -558,7 +561,11 @@
保存
-->
-
+
+
+
+
+
diff --git a/src/views/business/schedule/task/taskList.vue b/src/views/business/schedule/task/taskList.vue
index 64473c3..0efec98 100644
--- a/src/views/business/schedule/task/taskList.vue
+++ b/src/views/business/schedule/task/taskList.vue
@@ -46,7 +46,7 @@
getDictByCode('sampleStatus').then((response) => {
// 制作右上角的菜单
response.data.forEach((item: dictType) => {
- if (['待分发', '检测中', '检测完成', '已超期(查询使用)'].includes(item.name)) {
+ if (['待分发', '检测中', '检测完成', '已超期'].includes(item.name)) {
if (item.name === '待分发') {
active.value = item.value
activeTitle.value = item.name
@@ -58,6 +58,7 @@
})
}
})
+ console.log('88', menu.value)
if (window.sessionStorage.getItem('taskActive') != null) {
active.value = window.sessionStorage.getItem('taskActive') as string
@@ -99,6 +100,7 @@
// 是否显示当前页,否则跳转第一页
listQuery.value.offset = 1
}
+ listQuery.value.sampleStatus = active.value || '2'
getTaskList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: ITaskList) => {
item.isUrgentName = item.isUrgent == 1 ? '是' : '否'
@@ -146,7 +148,7 @@
// 点击分发, 弹窗
const distributeDialogRef = ref()
const handleDistribute = (row: ITaskList) => {
- distributeDialogRef.value.initDialog(row.orderId, row.sampleId)
+ distributeDialogRef.value.initDialog(row.orderId, row.sampleId, listQuery.value.sampleStatus)
}
// 点击标签绑定
const barCodeBind = ref()
@@ -323,6 +325,7 @@
标签绑定
+
props.columns, () => {
+ console.log(searchQuery.value)
+ searchQuery.value.offset = 1
+})
// 页数发生变化后的操作,可能是页码变化,可能是每页容量变化,此函数必写
const changePage = (val: { size?: number; page?: number }) => {
if (val && val.size) {
diff --git a/src/views/customer/sample/list/edit.vue b/src/views/customer/sample/list/edit.vue
index 207aaff..ae4f0d6 100644
--- a/src/views/customer/sample/list/edit.vue
+++ b/src/views/customer/sample/list/edit.vue
@@ -4,6 +4,7 @@
import { ElMessage, ElMessageBox } from 'element-plus'
import type { FormInstance, UploadUserFile } from 'element-plus'
import { ref } from 'vue'
+import dayjs from 'dayjs'
import type { ISampleEdit, Menu, SimpleCertification, SimpleMeasureRecord, dictType } from './sample_list_interface'
import selectCustomer from './selectCustomer.vue'
import showPhoto from '@/views/system/tool/showPhoto.vue'
@@ -13,7 +14,7 @@
import { UploadFile } from '@/api/measure/file'
import type { ICustomer } from '@/views/customer/customerInfo/customer_interface'
import { getDictByCode } from '@/api/system/dict'
-
+import type { IRecord } from '@/views/business/schedule/interchange/interchange_interface'
const textMap: { [key: string]: string } = {
edit: '编辑',
add: '新建',
@@ -109,11 +110,26 @@
}
getDict()
+const listQuery = ref({
+ sampleId: infoId.value, // 样品id
+ customerId: '', // 客户id
+ offset: 1,
+ limit: 10,
+})
+const totalRecords = ref(0) // 检定记录
+const totalCertifications = ref(0) // 检定证书
// 获取检定记录
const fetchMeasureRecords = (query = null) => {
if (pageType.value === 'detail') {
- getMesureRecords({ sampleId: infoId.value, customerId: '' }).then((res) => {
- dataList.value.measureRecords = res.data.rows
+ getMesureRecords(listQuery.value).then((res) => {
+ dataList.value.measureRecords = res.data.rows.map((item: { orderTime: string; deliverTime: string }) => {
+ return {
+ ...item,
+ orderTime: item.orderTime ? dayjs(item.orderTime).format('YYYY-MM-DD') : '',
+ deliverTime: item.deliverTime ? dayjs(item.deliverTime).format('YYYY-MM-DD') : '',
+ }
+ })
+ totalRecords.value = parseInt(res.data.total)
})
}
}
@@ -121,8 +137,16 @@
// 获取检定证书
const fetchCertifications = (query = null) => {
if (pageType.value === 'detail') {
- getCertification({ sampleId: infoId.value, customerId: '' }).then((res) => {
- dataList.value.certificationRecords = res.data.rows
+ getCertification(listQuery.value).then((res) => {
+ dataList.value.certificationRecords = res.data.rows.map((item: { effectiveDate: string; expirationDate: string }) => {
+ return {
+ ...item,
+ effectiveDate: item.effectiveDate ? dayjs(item.effectiveDate).format('YYYY-MM-DD') : '',
+ expirationDate: item.expirationDate ? dayjs(item.expirationDate).format('YYYY-MM-DD') : '',
+
+ }
+ })
+ totalCertifications.value = parseInt(res.data.total)
})
}
}
@@ -133,11 +157,11 @@
name: '检定记录',
columns: [
{ text: '委托单编号', value: 'orderCode', align: 'center' },
- { text: '委托单日期', value: 'orderTime', align: 'center' },
+ { text: '委托单日期', value: 'orderTime', align: 'center', width: '120' },
{ text: '委托方代码', value: 'customerCode', align: 'center' },
{ text: '委托方名称', value: 'customerName', align: 'center' },
{ text: '送检人', value: 'deliverer', align: 'center' },
- { text: '送检日期', value: 'deliverTime', align: 'center' },
+ { text: '送检日期', value: 'deliverTime', align: 'center', width: '120' },
],
list: 'measureRecords',
pagination: true,
@@ -149,8 +173,8 @@
{ text: '证书编号', value: 'certificationCode', align: 'center' },
{ text: '证书名称', value: 'certificationName', align: 'center' },
{ text: '证书类型', value: 'certificationClassName', align: 'center' },
- { text: '证书出具日期', value: 'effectiveDate', align: 'center' },
- { text: '证书有效期', value: 'expirationDate', align: 'center' },
+ { text: '证书出具日期', value: 'effectiveDate', align: 'center', width: '120' },
+ { text: '证书有效期', value: 'expirationDate', align: 'center', width: '120' },
],
list: 'certificationRecords',
pagination: true,
@@ -162,6 +186,23 @@
const currentMenuObj = computed(() => {
return menu.find(item => item.name === currentMenu.value)
})
+watch(currentMenuObj, () => {
+ listQuery.value.offset = 1
+ currentMenuObj.value?.searchFunc()
+},
+{
+ deep: true,
+ immediate: true,
+})
+
+// 监听检定记录和证书报告页数变化
+const changePage = (val: any) => {
+ if (val.value && currentMenuObj) {
+ listQuery.value.offset = val.value.offset
+ listQuery.value.limit = val.value.limit
+ currentMenuObj.value?.searchFunc()
+ }
+}
// 从路由中获取页面类型参数
const $route = useRoute()
@@ -616,7 +657,8 @@
-
+
+
diff --git a/src/views/customer/sample/list/list.vue b/src/views/customer/sample/list/list.vue
index 322a197..434d21c 100644
--- a/src/views/customer/sample/list/list.vue
+++ b/src/views/customer/sample/list/list.vue
@@ -1,3 +1,4 @@
+
+
+
+
+
+
+
+ 关闭
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 无
+
+
+ {{ sampleForm.minioFileName === '' ? '上传' : '更换附件' }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ item.name }}
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/business/board/overdueReminder/list.vue b/src/views/business/board/overdueReminder/list.vue
new file mode 100644
index 0000000..2421546
--- /dev/null
+++ b/src/views/business/board/overdueReminder/list.vue
@@ -0,0 +1,269 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ (listQuery.offset - 1) * listQuery.limit + scope.$index + 1 }}
+
+
+
+
+
+
+
+ 详情
+
+
+ 催办
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/business/board/overdueReminder/overdueReminder_interface.ts b/src/views/business/board/overdueReminder/overdueReminder_interface.ts
new file mode 100644
index 0000000..45bcf9e
--- /dev/null
+++ b/src/views/business/board/overdueReminder/overdueReminder_interface.ts
@@ -0,0 +1,31 @@
+// 筛选
+export interface IListQuery {
+ sampleNo: string // 样品编号
+ sampleName: string // 样品名称
+ orderNo: string // 委托书编号
+ customerNo: string // 委托方代码
+ customerName: string // 委托方名称
+ isUrgent: string // 是否加急
+ sampleBelong: string // 样品属性
+ sampleStatus: string // 分发状态
+ startTime: string // 应检定开始时间
+ endTime: string // 应检定结束时间
+ limit: number
+ offset: number
+}
+// 表格
+export interface IList {
+ id: string // 主键
+ sampleId: string // 样品id
+ sampleNo: string // 样品编号
+ sampleName: string// 样品名称
+ sampleModel: string// 型号
+ manufacturingNo: string// 出厂编号
+ orderId: string // 委托书id
+ orderCode: string// 委托书编号
+ customerNo: string// 委托方代码
+ customerName: string// 委托方名称
+ deliverer: string// 送检人
+ remark: string// 备注
+}
+
diff --git a/src/views/business/schedule/components/terminateDialog.vue b/src/views/business/schedule/components/terminateDialog.vue
index d5f85a0..17c8b15 100644
--- a/src/views/business/schedule/components/terminateDialog.vue
+++ b/src/views/business/schedule/components/terminateDialog.vue
@@ -32,7 +32,7 @@
* @param orderId 委托书id
* @param sampleId 样品id
*/
-function initDialog(row) {
+function initDialog(row: any) {
// dataFormRef.value!.clearValidate()
formData.value.orderId = row.orderId
formData.value.sampleId = row.sampleId
diff --git a/src/views/business/schedule/interchange/interchangeDetail.vue b/src/views/business/schedule/interchange/interchangeDetail.vue
index 789505f..5244f44 100644
--- a/src/views/business/schedule/interchange/interchangeDetail.vue
+++ b/src/views/business/schedule/interchange/interchangeDetail.vue
@@ -4,6 +4,8 @@
import { ElMessage, ElMessageBox } from 'element-plus'
import type { FormInstance, UploadUserFile } from 'element-plus'
import { ref } from 'vue'
+import dayjs from 'dayjs'
+import type { IRecord } from './interchange_interface'
import type { ISampleEdit, Menu, SimpleCertification, SimpleMeasureRecord, dictType } from '@/views/customer/sample/list/sample_list_interface'
import selectCustomer from '@/views/customer/sample/list/selectCustomer.vue'
import showPhoto from '@/views/system/tool/showPhoto.vue'
@@ -13,7 +15,6 @@
import { UploadFile } from '@/api/measure/file'
import type { ICustomer } from '@/views/customer/customerInfo/customer_interface'
import { getDictByCode } from '@/api/system/dict'
-
const textMap: { [key: string]: string } = {
edit: '编辑',
add: '新建',
@@ -27,6 +28,7 @@
const mesureCategoryList = ref
([]) // 校检类别
const measureTypeList = ref([]) // 检定方式
const powerVoltageList = ref([]) // 电源电压
+const total = ref(0)
const dataForm: Ref = ref({
id: '',
sampleNo: '', // 样品编号
@@ -86,12 +88,6 @@
powerVoltage: [{ required: true, message: '要求电源电压不能为空', trigger: 'change' }],
}) // 表单验证规则
-// 其他关联数据列表
-const dataList = ref({
- measureRecords: [] as SimpleMeasureRecord[],
- certificationRecords: [] as SimpleCertification[],
-})
-
// 获取字典值
function getDict() {
// 校检类别
@@ -109,11 +105,33 @@
}
getDict()
+// --------------------------检定记录、检定证书-----------------------------------------
+// 其他关联数据列表
+const dataList = ref({
+ measureRecords: [] as SimpleMeasureRecord[],
+ certificationRecords: [] as SimpleCertification[],
+})
+
+const listQuery = ref({
+ sampleId: infoId.value, // 样品id
+ customerId: '', // 客户id
+ offset: 1,
+ limit: 10,
+})
+const totalRecords = ref(0) // 检定记录总条数
+const totalCertifications = ref(0) // 检定证书总条数
// 获取检定记录
const fetchMeasureRecords = (query = null) => {
if (pageType.value === 'detail') {
- getMesureRecords({ sampleId: infoId.value, customerId: '' }).then((res) => {
- dataList.value.measureRecords = res.data.rows
+ getMesureRecords(listQuery.value).then((res) => {
+ dataList.value.measureRecords = res.data.rows.map((item: { orderTime: string; deliverTime: string }) => {
+ return {
+ ...item,
+ orderTime: item.orderTime ? dayjs(item.orderTime).format('YYYY-MM-DD') : '',
+ deliverTime: item.deliverTime ? dayjs(item.deliverTime).format('YYYY-MM-DD') : '',
+ }
+ })
+ totalRecords.value = parseInt(res.data.total)
})
}
}
@@ -121,8 +139,16 @@
// 获取检定证书
const fetchCertifications = (query = null) => {
if (pageType.value === 'detail') {
- getCertification({ sampleId: infoId.value, customerId: '' }).then((res) => {
- dataList.value.certificationRecords = res.data.rows
+ getCertification(listQuery.value).then((res) => {
+ dataList.value.certificationRecords = res.data.rows.map((item: { effectiveDate: string; expirationDate: string }) => {
+ return {
+ ...item,
+ effectiveDate: item.effectiveDate ? dayjs(item.effectiveDate).format('YYYY-MM-DD') : '',
+ expirationDate: item.expirationDate ? dayjs(item.expirationDate).format('YYYY-MM-DD') : '',
+
+ }
+ })
+ totalCertifications.value = parseInt(res.data.total)
})
}
}
@@ -133,11 +159,11 @@
name: '检定记录',
columns: [
{ text: '委托单编号', value: 'orderCode', align: 'center' },
- { text: '委托单日期', value: 'orderTime', align: 'center' },
+ { text: '委托单日期', value: 'orderTime', align: 'center', width: '120' },
{ text: '委托方代码', value: 'customerCode', align: 'center' },
{ text: '委托方名称', value: 'customerName', align: 'center' },
{ text: '送检人', value: 'deliverer', align: 'center' },
- { text: '送检日期', value: 'deliverTime', align: 'center' },
+ { text: '送检日期', value: 'deliverTime', align: 'center', width: '120' },
],
list: 'measureRecords',
pagination: true,
@@ -149,8 +175,8 @@
{ text: '证书编号', value: 'certificationCode', align: 'center' },
{ text: '证书名称', value: 'certificationName', align: 'center' },
{ text: '证书类型', value: 'certificationClassName', align: 'center' },
- { text: '证书出具日期', value: 'effectiveDate', align: 'center' },
- { text: '证书有效期', value: 'expirationDate', align: 'center' },
+ { text: '证书出具日期', value: 'effectiveDate', align: 'center', width: '120' },
+ { text: '证书有效期', value: 'expirationDate', align: 'center', width: '120' },
],
list: 'certificationRecords',
pagination: true,
@@ -162,6 +188,25 @@
const currentMenuObj = computed(() => {
return menu.find(item => item.name === currentMenu.value)
})
+watch(currentMenuObj, () => {
+ listQuery.value.offset = 1
+ currentMenuObj.value?.searchFunc()
+},
+{
+ deep: true,
+ immediate: true,
+})
+
+// 监听检定记录和证书报告页数变化
+const changePage = (val: any) => {
+ if (val.value && currentMenuObj) {
+ listQuery.value.offset = val.value.offset
+ listQuery.value.limit = val.value.limit
+ currentMenuObj.value?.searchFunc()
+ }
+}
+
+// -------------------------------------底部--------------------------------------
// 从路由中获取页面类型参数
const $route = useRoute()
@@ -615,7 +660,8 @@
-
+
+
diff --git a/src/views/business/schedule/interchange/interchangeList.vue b/src/views/business/schedule/interchange/interchangeList.vue
index 61ca5e5..51321f8 100644
--- a/src/views/business/schedule/interchange/interchangeList.vue
+++ b/src/views/business/schedule/interchange/interchangeList.vue
@@ -32,7 +32,7 @@
sampleNo: '', // 样品编号
sampleName: '', // 样品名称
orderNo: '', // 委托书编号
- customerId: '', // 委托方代码
+ customerNo: '', // 委托方代码
startTime: '', // 预计送达开始时间
endTime: '', // 预计送达结束时间
isUrgent: '2', // 是否加急 //2全部
@@ -174,12 +174,12 @@
sampleNo: '', // 样品编号
sampleName: '', // 样品名称
orderNo: '', // 委托书编号
- customerId: '', // 委托方代码
+ customerNo: '', // 委托方代码
startTime: '', // 预计送达开始时间
endTime: '', // 预计送达结束时间
isUrgent: '2', // 是否加急
sampleBelong: '2', // 样品属性
- sampleStatus: '',
+ sampleStatus: '', // 样品状态
offset: 1,
limit: 20,
}
@@ -238,7 +238,7 @@
sampleNo: listQuery.value.sampleNo, // 样品编号
sampleName: listQuery.value.sampleName, // 样品名称
orderNo: listQuery.value.orderNo, // 委托书编号
- customerId: listQuery.value.customerId, // 委托方代码
+ customerNo: listQuery.value.customerNo, // 委托方代码
startTime: listQuery.value.startTime, // 预计送达开始时间
endTime: listQuery.value.endTime, // 预计送达结束时间
isUrgent: listQuery.value.isUrgent, // 是否加急
@@ -363,6 +363,11 @@
$router.push(`/schedule/interchange/${pageType}/${row.sampleId}`)
}
+// 点击生成设备交接单
+const createInterchangeReceipt = () => {
+ $router.push('/schedule/receipt/add')
+}
+
onMounted(async () => {
await getDict() // 字典
if (window.sessionStorage.getItem('interchangeActive')) {
@@ -407,7 +412,7 @@
+
diff --git a/src/views/business/schedule/interchange/interchange_interface.ts b/src/views/business/schedule/interchange/interchange_interface.ts
index f1a3f91..ffa18b0 100644
--- a/src/views/business/schedule/interchange/interchange_interface.ts
+++ b/src/views/business/schedule/interchange/interchange_interface.ts
@@ -4,7 +4,8 @@
sampleNo: string // 样品编号
sampleName: string // 样品名称
orderNo: string // 委托书编号
- customerId: string // 委托方代码
+ customerId?: string // 委托方代码
+ customerNo?: string // 委托方代码
startTime: string // 预计送达开始时间
endTime: string // 预计送达结束时间
isUrgent: string // 是否加急
@@ -35,6 +36,13 @@
orderId: string | number // 委托书id
sampleId: string | number// 样品id
}
+// 检定记录检定证书查询条件
+export interface IRecord {
+ sampleId: string // 样品id
+ customerId: string // 客户id
+ offset: number
+ limit: number
+}
// 检定记录
export interface SimpleMeasureRecord {
diff --git a/src/views/business/schedule/interchangeReceipt/receiptEdit.vue b/src/views/business/schedule/interchangeReceipt/receiptEdit.vue
index c629542..83a076e 100644
--- a/src/views/business/schedule/interchangeReceipt/receiptEdit.vue
+++ b/src/views/business/schedule/interchangeReceipt/receiptEdit.vue
@@ -220,6 +220,7 @@
const confirmCheckoutOrder = (val: Array) => {
if (val && val.length) {
dataForm.value.orderCode = val[0].orderCode // 委托书编号
+ dataForm.value.orderNo = val[0].orderCode // 委托书编号
dataForm.value.orderId = val[0].id // 委托书id
dataForm.value.deliverer = val[0].deliverer // 送检人
dataForm.value.delivererTel = val[0].delivererTel // 送检人
@@ -233,13 +234,17 @@
}
}
-// ------------------------样品-----------------------------
+// ----------------------------------样品----------------------------------------------
// 点击批量增加
const multiAdd = () => {
- if (!dataForm.value.customerNo) {
+ if (!dataForm.value.orderCode) {
ElMessage.warning('请先选择委托书')
return
}
+ if (!dataForm.value.customerNo) {
+ ElMessage.warning('没有委托方代码,请检查')
+ return
+ }
sampleVisible.value = true
}
// 修改委托方对话框显隐
diff --git a/src/views/business/schedule/interchangeReceipt/receiptList-interface.ts b/src/views/business/schedule/interchangeReceipt/receiptList-interface.ts
index b3089b4..4b4432e 100644
--- a/src/views/business/schedule/interchangeReceipt/receiptList-interface.ts
+++ b/src/views/business/schedule/interchangeReceipt/receiptList-interface.ts
@@ -79,6 +79,7 @@
customerId: string // 委托方id
sampleName: string // 样品名称
sampleNo: string // 样品编号
+ customerName: string // 委托方名称
offset: number
limit: number
}
diff --git a/src/views/business/schedule/interchangeReceipt/selectSample.vue b/src/views/business/schedule/interchangeReceipt/selectSample.vue
index 11d3092..6c1cb6c 100644
--- a/src/views/business/schedule/interchangeReceipt/selectSample.vue
+++ b/src/views/business/schedule/interchangeReceipt/selectSample.vue
@@ -25,6 +25,7 @@
customerId: '', // 委托方id
sampleName: '', // 样品名称
sampleNo: '', // 样品编号
+ customerName: '', // 委托方名称
offset: 1,
limit: 20,
})
@@ -36,9 +37,9 @@
{ text: '出厂编号', value: 'manufacturingNo', align: 'center' },
{ text: '委托方代码', value: 'customerNo', align: 'center' },
{ text: '委托方名称', value: 'customerName', align: 'center' },
- { text: '检定周期', value: 'measurePeriod', align: 'center' },
- { text: '上次检定时间', value: 'measureLastTime', align: 'center', width: '180px' },
- { text: '样品状态', value: 'sampleSatusName', align: 'center', width: '80px' },
+ // { text: '检定周期', value: 'measurePeriod', align: 'center' },
+ // { text: '上次检定时间', value: 'measureLastTime', align: 'center', width: '180px' },
+ // { text: '样品状态', value: 'sampleSatusName', align: 'center', width: '80px' },
{ text: '备注', value: 'remark', align: 'center', width: '180px' },
])
// 表格数据
@@ -84,6 +85,7 @@
customerId: '', // 委托方id
sampleName: '', // 样品名称
sampleNo: '', // 样品编号
+ customerName: '', // 委托方名称
offset: 1,
limit: 20,
}
@@ -127,56 +129,55 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ (listQuery.offset - 1) * listQuery.limit + scope.$index + 1 }}
-
-
-
-
-
-
- 确定
-
-
- 取消
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ (listQuery.offset - 1) * listQuery.limit + scope.$index + 1 }}
+
+
-
-
+
+
+
+ 确定
+
+
+ 取消
+
+
+
diff --git a/src/views/business/schedule/order/orderEdit.vue b/src/views/business/schedule/order/orderEdit.vue
index 68ced75..142db45 100644
--- a/src/views/business/schedule/order/orderEdit.vue
+++ b/src/views/business/schedule/order/orderEdit.vue
@@ -313,6 +313,10 @@
// 点击保存
const saveForm = (formEl: FormInstance | undefined) => {
+ if (!list.value.length) {
+ ElMessage.warning('要求样品清单不能为空')
+ return
+ }
// 检查表格是否存在增加行信息没有完善的情况
const result = checkList()
if (result !== 'pass') {
diff --git a/src/views/business/schedule/order/selectSample.vue b/src/views/business/schedule/order/selectSample.vue
index 720a2e3..5c07d92 100644
--- a/src/views/business/schedule/order/selectSample.vue
+++ b/src/views/business/schedule/order/selectSample.vue
@@ -29,8 +29,8 @@
// 查询条件
const listQuery = ref({
- // sampleNo: '', // 样品编号
- // sampleName: '', // 样品名称
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
// sampleModel: '', // 型号
orderId: props.orderId || '', // 委托书id
customerId: props.customerId || '', // 委托方id
@@ -51,8 +51,8 @@
{ text: '委托方代码', value: 'customerNo', align: 'center' },
{ text: '委托方名称', value: 'customerName', align: 'center' },
{ text: '检定周期', value: 'measurePeriod', align: 'center' },
- { text: '上次检定时间', value: 'measureLastTime', align: 'center', width: '180px' },
- { text: '样品状态', value: 'sampleSatusName', align: 'center', width: '80px' },
+ // { text: '上次检定时间', value: 'measureLastTime', align: 'center', width: '180px' },
+ // { text: '样品状态', value: 'sampleSatusName', align: 'center', width: '80px' },
{ text: '备注', value: 'remark', align: 'center', width: '180px' },
])
// 表格数据
@@ -97,12 +97,14 @@
listQuery.value = {
sampleNo: '', // 样品编号
sampleName: '', // 样品名称
- sampleModel: '', // 型号
- customerNo: '', // 委托方代码
- customerName: '', // 委托方名称
- startTime: '', // 检定开始时间
- endTime: '', // 检定结束时间
- overtimeStatus: '', // 样品超期状态 1已超期、0未超期、空字符串 已超期+未超期
+ // sampleModel: '', // 型号
+ orderId: props.orderId || '', // 委托书id
+ customerId: props.customerId || '', // 委托方id
+ customerNo: props.customerNo || '', // 委托方代码
+ // customerName: '', // 委托方名称
+ // startTime: '', // 检定开始时间
+ // endTime: '', // 检定结束时间
+ // overtimeStatus: '', // 样品超期状态 1已超期、0未超期、空字符串 已超期+未超期
offset: 1,
limit: 20,
}
@@ -146,48 +148,57 @@
-
-
-
-
-
-
- 确定
-
-
- 取消
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ (listQuery.offset - 1) * listQuery.limit + scope.$index + 1 }}
+
+
-
-
+
+
+
+ 确定
+
+
+ 取消
+
+
+
+
diff --git a/src/views/business/schedule/task/components/chooseLab.vue b/src/views/business/schedule/task/components/chooseLab.vue
index a8222ac..0dcebfc 100644
--- a/src/views/business/schedule/task/components/chooseLab.vue
+++ b/src/views/business/schedule/task/components/chooseLab.vue
@@ -161,7 +161,6 @@
:columns="columns"
:query="listQuery"
:list-loading="loadingTable"
-
:pagination="false"
size="small"
@multi-select="handleSelectionChange"
@@ -169,6 +168,11 @@
+
+
+ {{ scope.$index + 1 }}
+
+
diff --git a/src/views/business/schedule/task/components/distributeDialog.vue b/src/views/business/schedule/task/components/distributeDialog.vue
index 6474dce..fb6a3f5 100644
--- a/src/views/business/schedule/task/components/distributeDialog.vue
+++ b/src/views/business/schedule/task/components/distributeDialog.vue
@@ -10,7 +10,7 @@
const dialogVisible = ref(false) // 弹窗显示
const sampleId = ref('') // 样品id
const orderId = ref('') // 委托单id
-
+const type = ref('distribute')
// 委托书-证书类别列表
const certificationTypes = ref([])
// 获取字典值
@@ -53,10 +53,16 @@
}
// 初始化弹窗
-const initDialog = (orderid: string, sampleid: string) => {
+const initDialog = (orderid: string, sampleid: string, sampleStatus: string) => {
dialogVisible.value = true
sampleId.value = sampleid
orderId.value = orderid
+ if (sampleStatus === '3') { // 检测中
+ type.value = 'testing'
+ }
+ else if (sampleStatus === '2') { // 待分发
+ type.value = 'distribute'
+ }
getInfo()
}
@@ -105,7 +111,7 @@
批量添加
-
+
确定
diff --git a/src/views/business/schedule/task/components/processConfig.vue b/src/views/business/schedule/task/components/processConfig.vue
index 43f2165..bb66076 100644
--- a/src/views/business/schedule/task/components/processConfig.vue
+++ b/src/views/business/schedule/task/components/processConfig.vue
@@ -56,7 +56,8 @@
if (props.list.length > 0) {
processList.value = props.list as ISchedule[]
}
-})
+},
+{ deep: true, immediate: true })
// 点击添加流程
const processAdd = () => {
@@ -103,6 +104,7 @@
const saveProcess = () => {
const form = {
measureProcessList: processList.value,
+ executiveList: processList.value,
orderId: props.orderId,
sampleId: props.sampleId,
}
@@ -138,7 +140,7 @@
-
+
diff --git a/src/views/business/schedule/task/components/processNode.vue b/src/views/business/schedule/task/components/processNode.vue
index d76d41d..fad76ab 100644
--- a/src/views/business/schedule/task/components/processNode.vue
+++ b/src/views/business/schedule/task/components/processNode.vue
@@ -25,7 +25,7 @@
}
},
},
- // 是否为详情展示页面-暂时无用
+ // 是否为详情展示页面
detail: {
type: Boolean,
default: false,
@@ -111,10 +111,10 @@
{{ props.step }}
-
+
-
+
@@ -122,22 +122,22 @@
检定环节
-
-
+
+
检定人员
-
-
+
+
- 应出具证书 份
+ 应出具证书 份
当前状态{{ processNodeData.measureStatusName }}
diff --git a/src/views/business/schedule/task/taskEdit.vue b/src/views/business/schedule/task/taskEdit.vue
index d64aa23..1d1e04f 100644
--- a/src/views/business/schedule/task/taskEdit.vue
+++ b/src/views/business/schedule/task/taskEdit.vue
@@ -215,8 +215,11 @@
taskForm.value.deliverer = res.data.deliverer // 送检人
taskForm.value.delivererTel = res.data.delivererTel // 送检人联系方式
taskForm.value.measureContent = res.data.measureContent // 检定项目
- taskForm.value.measureProcessList = res.data.measureProcessList
- taskForm.value.measureSendBackList = res.data.measureSendBackList
+ taskForm.value.measureProcessList = res.data.measureProcessList // 检定流程
+ taskForm.value.measureSendBackList = res.data.measureSendBackList // 退回流程
+ console.log('pppppp')
+ console.log(taskForm.value.measureProcessList)
+
// 改用一个接口获取
sampleForm.value = res.data
})
@@ -558,7 +561,11 @@
保存
-->
-
+
+
+
+
+
diff --git a/src/views/business/schedule/task/taskList.vue b/src/views/business/schedule/task/taskList.vue
index 64473c3..0efec98 100644
--- a/src/views/business/schedule/task/taskList.vue
+++ b/src/views/business/schedule/task/taskList.vue
@@ -46,7 +46,7 @@
getDictByCode('sampleStatus').then((response) => {
// 制作右上角的菜单
response.data.forEach((item: dictType) => {
- if (['待分发', '检测中', '检测完成', '已超期(查询使用)'].includes(item.name)) {
+ if (['待分发', '检测中', '检测完成', '已超期'].includes(item.name)) {
if (item.name === '待分发') {
active.value = item.value
activeTitle.value = item.name
@@ -58,6 +58,7 @@
})
}
})
+ console.log('88', menu.value)
if (window.sessionStorage.getItem('taskActive') != null) {
active.value = window.sessionStorage.getItem('taskActive') as string
@@ -99,6 +100,7 @@
// 是否显示当前页,否则跳转第一页
listQuery.value.offset = 1
}
+ listQuery.value.sampleStatus = active.value || '2'
getTaskList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: ITaskList) => {
item.isUrgentName = item.isUrgent == 1 ? '是' : '否'
@@ -146,7 +148,7 @@
// 点击分发, 弹窗
const distributeDialogRef = ref()
const handleDistribute = (row: ITaskList) => {
- distributeDialogRef.value.initDialog(row.orderId, row.sampleId)
+ distributeDialogRef.value.initDialog(row.orderId, row.sampleId, listQuery.value.sampleStatus)
}
// 点击标签绑定
const barCodeBind = ref()
@@ -323,6 +325,7 @@
标签绑定
+
props.columns, () => {
+ console.log(searchQuery.value)
+ searchQuery.value.offset = 1
+})
// 页数发生变化后的操作,可能是页码变化,可能是每页容量变化,此函数必写
const changePage = (val: { size?: number; page?: number }) => {
if (val && val.size) {
diff --git a/src/views/customer/sample/list/edit.vue b/src/views/customer/sample/list/edit.vue
index 207aaff..ae4f0d6 100644
--- a/src/views/customer/sample/list/edit.vue
+++ b/src/views/customer/sample/list/edit.vue
@@ -4,6 +4,7 @@
import { ElMessage, ElMessageBox } from 'element-plus'
import type { FormInstance, UploadUserFile } from 'element-plus'
import { ref } from 'vue'
+import dayjs from 'dayjs'
import type { ISampleEdit, Menu, SimpleCertification, SimpleMeasureRecord, dictType } from './sample_list_interface'
import selectCustomer from './selectCustomer.vue'
import showPhoto from '@/views/system/tool/showPhoto.vue'
@@ -13,7 +14,7 @@
import { UploadFile } from '@/api/measure/file'
import type { ICustomer } from '@/views/customer/customerInfo/customer_interface'
import { getDictByCode } from '@/api/system/dict'
-
+import type { IRecord } from '@/views/business/schedule/interchange/interchange_interface'
const textMap: { [key: string]: string } = {
edit: '编辑',
add: '新建',
@@ -109,11 +110,26 @@
}
getDict()
+const listQuery = ref({
+ sampleId: infoId.value, // 样品id
+ customerId: '', // 客户id
+ offset: 1,
+ limit: 10,
+})
+const totalRecords = ref(0) // 检定记录
+const totalCertifications = ref(0) // 检定证书
// 获取检定记录
const fetchMeasureRecords = (query = null) => {
if (pageType.value === 'detail') {
- getMesureRecords({ sampleId: infoId.value, customerId: '' }).then((res) => {
- dataList.value.measureRecords = res.data.rows
+ getMesureRecords(listQuery.value).then((res) => {
+ dataList.value.measureRecords = res.data.rows.map((item: { orderTime: string; deliverTime: string }) => {
+ return {
+ ...item,
+ orderTime: item.orderTime ? dayjs(item.orderTime).format('YYYY-MM-DD') : '',
+ deliverTime: item.deliverTime ? dayjs(item.deliverTime).format('YYYY-MM-DD') : '',
+ }
+ })
+ totalRecords.value = parseInt(res.data.total)
})
}
}
@@ -121,8 +137,16 @@
// 获取检定证书
const fetchCertifications = (query = null) => {
if (pageType.value === 'detail') {
- getCertification({ sampleId: infoId.value, customerId: '' }).then((res) => {
- dataList.value.certificationRecords = res.data.rows
+ getCertification(listQuery.value).then((res) => {
+ dataList.value.certificationRecords = res.data.rows.map((item: { effectiveDate: string; expirationDate: string }) => {
+ return {
+ ...item,
+ effectiveDate: item.effectiveDate ? dayjs(item.effectiveDate).format('YYYY-MM-DD') : '',
+ expirationDate: item.expirationDate ? dayjs(item.expirationDate).format('YYYY-MM-DD') : '',
+
+ }
+ })
+ totalCertifications.value = parseInt(res.data.total)
})
}
}
@@ -133,11 +157,11 @@
name: '检定记录',
columns: [
{ text: '委托单编号', value: 'orderCode', align: 'center' },
- { text: '委托单日期', value: 'orderTime', align: 'center' },
+ { text: '委托单日期', value: 'orderTime', align: 'center', width: '120' },
{ text: '委托方代码', value: 'customerCode', align: 'center' },
{ text: '委托方名称', value: 'customerName', align: 'center' },
{ text: '送检人', value: 'deliverer', align: 'center' },
- { text: '送检日期', value: 'deliverTime', align: 'center' },
+ { text: '送检日期', value: 'deliverTime', align: 'center', width: '120' },
],
list: 'measureRecords',
pagination: true,
@@ -149,8 +173,8 @@
{ text: '证书编号', value: 'certificationCode', align: 'center' },
{ text: '证书名称', value: 'certificationName', align: 'center' },
{ text: '证书类型', value: 'certificationClassName', align: 'center' },
- { text: '证书出具日期', value: 'effectiveDate', align: 'center' },
- { text: '证书有效期', value: 'expirationDate', align: 'center' },
+ { text: '证书出具日期', value: 'effectiveDate', align: 'center', width: '120' },
+ { text: '证书有效期', value: 'expirationDate', align: 'center', width: '120' },
],
list: 'certificationRecords',
pagination: true,
@@ -162,6 +186,23 @@
const currentMenuObj = computed(() => {
return menu.find(item => item.name === currentMenu.value)
})
+watch(currentMenuObj, () => {
+ listQuery.value.offset = 1
+ currentMenuObj.value?.searchFunc()
+},
+{
+ deep: true,
+ immediate: true,
+})
+
+// 监听检定记录和证书报告页数变化
+const changePage = (val: any) => {
+ if (val.value && currentMenuObj) {
+ listQuery.value.offset = val.value.offset
+ listQuery.value.limit = val.value.limit
+ currentMenuObj.value?.searchFunc()
+ }
+}
// 从路由中获取页面类型参数
const $route = useRoute()
@@ -616,7 +657,8 @@
-
+
+
diff --git a/src/views/customer/sample/list/list.vue b/src/views/customer/sample/list/list.vue
index 322a197..434d21c 100644
--- a/src/views/customer/sample/list/list.vue
+++ b/src/views/customer/sample/list/list.vue
@@ -1,3 +1,4 @@
+
+
+
+
+
+
+
+ 关闭
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 无
+
+
+ {{ sampleForm.minioFileName === '' ? '上传' : '更换附件' }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ item.name }}
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/business/board/overdueReminder/list.vue b/src/views/business/board/overdueReminder/list.vue
new file mode 100644
index 0000000..2421546
--- /dev/null
+++ b/src/views/business/board/overdueReminder/list.vue
@@ -0,0 +1,269 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ (listQuery.offset - 1) * listQuery.limit + scope.$index + 1 }}
+
+
+
+
+
+
+
+ 详情
+
+
+ 催办
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/business/board/overdueReminder/overdueReminder_interface.ts b/src/views/business/board/overdueReminder/overdueReminder_interface.ts
new file mode 100644
index 0000000..45bcf9e
--- /dev/null
+++ b/src/views/business/board/overdueReminder/overdueReminder_interface.ts
@@ -0,0 +1,31 @@
+// 筛选
+export interface IListQuery {
+ sampleNo: string // 样品编号
+ sampleName: string // 样品名称
+ orderNo: string // 委托书编号
+ customerNo: string // 委托方代码
+ customerName: string // 委托方名称
+ isUrgent: string // 是否加急
+ sampleBelong: string // 样品属性
+ sampleStatus: string // 分发状态
+ startTime: string // 应检定开始时间
+ endTime: string // 应检定结束时间
+ limit: number
+ offset: number
+}
+// 表格
+export interface IList {
+ id: string // 主键
+ sampleId: string // 样品id
+ sampleNo: string // 样品编号
+ sampleName: string// 样品名称
+ sampleModel: string// 型号
+ manufacturingNo: string// 出厂编号
+ orderId: string // 委托书id
+ orderCode: string// 委托书编号
+ customerNo: string// 委托方代码
+ customerName: string// 委托方名称
+ deliverer: string// 送检人
+ remark: string// 备注
+}
+
diff --git a/src/views/business/schedule/components/terminateDialog.vue b/src/views/business/schedule/components/terminateDialog.vue
index d5f85a0..17c8b15 100644
--- a/src/views/business/schedule/components/terminateDialog.vue
+++ b/src/views/business/schedule/components/terminateDialog.vue
@@ -32,7 +32,7 @@
* @param orderId 委托书id
* @param sampleId 样品id
*/
-function initDialog(row) {
+function initDialog(row: any) {
// dataFormRef.value!.clearValidate()
formData.value.orderId = row.orderId
formData.value.sampleId = row.sampleId
diff --git a/src/views/business/schedule/interchange/interchangeDetail.vue b/src/views/business/schedule/interchange/interchangeDetail.vue
index 789505f..5244f44 100644
--- a/src/views/business/schedule/interchange/interchangeDetail.vue
+++ b/src/views/business/schedule/interchange/interchangeDetail.vue
@@ -4,6 +4,8 @@
import { ElMessage, ElMessageBox } from 'element-plus'
import type { FormInstance, UploadUserFile } from 'element-plus'
import { ref } from 'vue'
+import dayjs from 'dayjs'
+import type { IRecord } from './interchange_interface'
import type { ISampleEdit, Menu, SimpleCertification, SimpleMeasureRecord, dictType } from '@/views/customer/sample/list/sample_list_interface'
import selectCustomer from '@/views/customer/sample/list/selectCustomer.vue'
import showPhoto from '@/views/system/tool/showPhoto.vue'
@@ -13,7 +15,6 @@
import { UploadFile } from '@/api/measure/file'
import type { ICustomer } from '@/views/customer/customerInfo/customer_interface'
import { getDictByCode } from '@/api/system/dict'
-
const textMap: { [key: string]: string } = {
edit: '编辑',
add: '新建',
@@ -27,6 +28,7 @@
const mesureCategoryList = ref
([]) // 校检类别
const measureTypeList = ref([]) // 检定方式
const powerVoltageList = ref([]) // 电源电压
+const total = ref(0)
const dataForm: Ref = ref({
id: '',
sampleNo: '', // 样品编号
@@ -86,12 +88,6 @@
powerVoltage: [{ required: true, message: '要求电源电压不能为空', trigger: 'change' }],
}) // 表单验证规则
-// 其他关联数据列表
-const dataList = ref({
- measureRecords: [] as SimpleMeasureRecord[],
- certificationRecords: [] as SimpleCertification[],
-})
-
// 获取字典值
function getDict() {
// 校检类别
@@ -109,11 +105,33 @@
}
getDict()
+// --------------------------检定记录、检定证书-----------------------------------------
+// 其他关联数据列表
+const dataList = ref({
+ measureRecords: [] as SimpleMeasureRecord[],
+ certificationRecords: [] as SimpleCertification[],
+})
+
+const listQuery = ref({
+ sampleId: infoId.value, // 样品id
+ customerId: '', // 客户id
+ offset: 1,
+ limit: 10,
+})
+const totalRecords = ref(0) // 检定记录总条数
+const totalCertifications = ref(0) // 检定证书总条数
// 获取检定记录
const fetchMeasureRecords = (query = null) => {
if (pageType.value === 'detail') {
- getMesureRecords({ sampleId: infoId.value, customerId: '' }).then((res) => {
- dataList.value.measureRecords = res.data.rows
+ getMesureRecords(listQuery.value).then((res) => {
+ dataList.value.measureRecords = res.data.rows.map((item: { orderTime: string; deliverTime: string }) => {
+ return {
+ ...item,
+ orderTime: item.orderTime ? dayjs(item.orderTime).format('YYYY-MM-DD') : '',
+ deliverTime: item.deliverTime ? dayjs(item.deliverTime).format('YYYY-MM-DD') : '',
+ }
+ })
+ totalRecords.value = parseInt(res.data.total)
})
}
}
@@ -121,8 +139,16 @@
// 获取检定证书
const fetchCertifications = (query = null) => {
if (pageType.value === 'detail') {
- getCertification({ sampleId: infoId.value, customerId: '' }).then((res) => {
- dataList.value.certificationRecords = res.data.rows
+ getCertification(listQuery.value).then((res) => {
+ dataList.value.certificationRecords = res.data.rows.map((item: { effectiveDate: string; expirationDate: string }) => {
+ return {
+ ...item,
+ effectiveDate: item.effectiveDate ? dayjs(item.effectiveDate).format('YYYY-MM-DD') : '',
+ expirationDate: item.expirationDate ? dayjs(item.expirationDate).format('YYYY-MM-DD') : '',
+
+ }
+ })
+ totalCertifications.value = parseInt(res.data.total)
})
}
}
@@ -133,11 +159,11 @@
name: '检定记录',
columns: [
{ text: '委托单编号', value: 'orderCode', align: 'center' },
- { text: '委托单日期', value: 'orderTime', align: 'center' },
+ { text: '委托单日期', value: 'orderTime', align: 'center', width: '120' },
{ text: '委托方代码', value: 'customerCode', align: 'center' },
{ text: '委托方名称', value: 'customerName', align: 'center' },
{ text: '送检人', value: 'deliverer', align: 'center' },
- { text: '送检日期', value: 'deliverTime', align: 'center' },
+ { text: '送检日期', value: 'deliverTime', align: 'center', width: '120' },
],
list: 'measureRecords',
pagination: true,
@@ -149,8 +175,8 @@
{ text: '证书编号', value: 'certificationCode', align: 'center' },
{ text: '证书名称', value: 'certificationName', align: 'center' },
{ text: '证书类型', value: 'certificationClassName', align: 'center' },
- { text: '证书出具日期', value: 'effectiveDate', align: 'center' },
- { text: '证书有效期', value: 'expirationDate', align: 'center' },
+ { text: '证书出具日期', value: 'effectiveDate', align: 'center', width: '120' },
+ { text: '证书有效期', value: 'expirationDate', align: 'center', width: '120' },
],
list: 'certificationRecords',
pagination: true,
@@ -162,6 +188,25 @@
const currentMenuObj = computed(() => {
return menu.find(item => item.name === currentMenu.value)
})
+watch(currentMenuObj, () => {
+ listQuery.value.offset = 1
+ currentMenuObj.value?.searchFunc()
+},
+{
+ deep: true,
+ immediate: true,
+})
+
+// 监听检定记录和证书报告页数变化
+const changePage = (val: any) => {
+ if (val.value && currentMenuObj) {
+ listQuery.value.offset = val.value.offset
+ listQuery.value.limit = val.value.limit
+ currentMenuObj.value?.searchFunc()
+ }
+}
+
+// -------------------------------------底部--------------------------------------
// 从路由中获取页面类型参数
const $route = useRoute()
@@ -615,7 +660,8 @@
-
+
+
diff --git a/src/views/business/schedule/interchange/interchangeList.vue b/src/views/business/schedule/interchange/interchangeList.vue
index 61ca5e5..51321f8 100644
--- a/src/views/business/schedule/interchange/interchangeList.vue
+++ b/src/views/business/schedule/interchange/interchangeList.vue
@@ -32,7 +32,7 @@
sampleNo: '', // 样品编号
sampleName: '', // 样品名称
orderNo: '', // 委托书编号
- customerId: '', // 委托方代码
+ customerNo: '', // 委托方代码
startTime: '', // 预计送达开始时间
endTime: '', // 预计送达结束时间
isUrgent: '2', // 是否加急 //2全部
@@ -174,12 +174,12 @@
sampleNo: '', // 样品编号
sampleName: '', // 样品名称
orderNo: '', // 委托书编号
- customerId: '', // 委托方代码
+ customerNo: '', // 委托方代码
startTime: '', // 预计送达开始时间
endTime: '', // 预计送达结束时间
isUrgent: '2', // 是否加急
sampleBelong: '2', // 样品属性
- sampleStatus: '',
+ sampleStatus: '', // 样品状态
offset: 1,
limit: 20,
}
@@ -238,7 +238,7 @@
sampleNo: listQuery.value.sampleNo, // 样品编号
sampleName: listQuery.value.sampleName, // 样品名称
orderNo: listQuery.value.orderNo, // 委托书编号
- customerId: listQuery.value.customerId, // 委托方代码
+ customerNo: listQuery.value.customerNo, // 委托方代码
startTime: listQuery.value.startTime, // 预计送达开始时间
endTime: listQuery.value.endTime, // 预计送达结束时间
isUrgent: listQuery.value.isUrgent, // 是否加急
@@ -363,6 +363,11 @@
$router.push(`/schedule/interchange/${pageType}/${row.sampleId}`)
}
+// 点击生成设备交接单
+const createInterchangeReceipt = () => {
+ $router.push('/schedule/receipt/add')
+}
+
onMounted(async () => {
await getDict() // 字典
if (window.sessionStorage.getItem('interchangeActive')) {
@@ -407,7 +412,7 @@
+
diff --git a/src/views/business/schedule/interchange/interchange_interface.ts b/src/views/business/schedule/interchange/interchange_interface.ts
index f1a3f91..ffa18b0 100644
--- a/src/views/business/schedule/interchange/interchange_interface.ts
+++ b/src/views/business/schedule/interchange/interchange_interface.ts
@@ -4,7 +4,8 @@
sampleNo: string // 样品编号
sampleName: string // 样品名称
orderNo: string // 委托书编号
- customerId: string // 委托方代码
+ customerId?: string // 委托方代码
+ customerNo?: string // 委托方代码
startTime: string // 预计送达开始时间
endTime: string // 预计送达结束时间
isUrgent: string // 是否加急
@@ -35,6 +36,13 @@
orderId: string | number // 委托书id
sampleId: string | number// 样品id
}
+// 检定记录检定证书查询条件
+export interface IRecord {
+ sampleId: string // 样品id
+ customerId: string // 客户id
+ offset: number
+ limit: number
+}
// 检定记录
export interface SimpleMeasureRecord {
diff --git a/src/views/business/schedule/interchangeReceipt/receiptEdit.vue b/src/views/business/schedule/interchangeReceipt/receiptEdit.vue
index c629542..83a076e 100644
--- a/src/views/business/schedule/interchangeReceipt/receiptEdit.vue
+++ b/src/views/business/schedule/interchangeReceipt/receiptEdit.vue
@@ -220,6 +220,7 @@
const confirmCheckoutOrder = (val: Array) => {
if (val && val.length) {
dataForm.value.orderCode = val[0].orderCode // 委托书编号
+ dataForm.value.orderNo = val[0].orderCode // 委托书编号
dataForm.value.orderId = val[0].id // 委托书id
dataForm.value.deliverer = val[0].deliverer // 送检人
dataForm.value.delivererTel = val[0].delivererTel // 送检人
@@ -233,13 +234,17 @@
}
}
-// ------------------------样品-----------------------------
+// ----------------------------------样品----------------------------------------------
// 点击批量增加
const multiAdd = () => {
- if (!dataForm.value.customerNo) {
+ if (!dataForm.value.orderCode) {
ElMessage.warning('请先选择委托书')
return
}
+ if (!dataForm.value.customerNo) {
+ ElMessage.warning('没有委托方代码,请检查')
+ return
+ }
sampleVisible.value = true
}
// 修改委托方对话框显隐
diff --git a/src/views/business/schedule/interchangeReceipt/receiptList-interface.ts b/src/views/business/schedule/interchangeReceipt/receiptList-interface.ts
index b3089b4..4b4432e 100644
--- a/src/views/business/schedule/interchangeReceipt/receiptList-interface.ts
+++ b/src/views/business/schedule/interchangeReceipt/receiptList-interface.ts
@@ -79,6 +79,7 @@
customerId: string // 委托方id
sampleName: string // 样品名称
sampleNo: string // 样品编号
+ customerName: string // 委托方名称
offset: number
limit: number
}
diff --git a/src/views/business/schedule/interchangeReceipt/selectSample.vue b/src/views/business/schedule/interchangeReceipt/selectSample.vue
index 11d3092..6c1cb6c 100644
--- a/src/views/business/schedule/interchangeReceipt/selectSample.vue
+++ b/src/views/business/schedule/interchangeReceipt/selectSample.vue
@@ -25,6 +25,7 @@
customerId: '', // 委托方id
sampleName: '', // 样品名称
sampleNo: '', // 样品编号
+ customerName: '', // 委托方名称
offset: 1,
limit: 20,
})
@@ -36,9 +37,9 @@
{ text: '出厂编号', value: 'manufacturingNo', align: 'center' },
{ text: '委托方代码', value: 'customerNo', align: 'center' },
{ text: '委托方名称', value: 'customerName', align: 'center' },
- { text: '检定周期', value: 'measurePeriod', align: 'center' },
- { text: '上次检定时间', value: 'measureLastTime', align: 'center', width: '180px' },
- { text: '样品状态', value: 'sampleSatusName', align: 'center', width: '80px' },
+ // { text: '检定周期', value: 'measurePeriod', align: 'center' },
+ // { text: '上次检定时间', value: 'measureLastTime', align: 'center', width: '180px' },
+ // { text: '样品状态', value: 'sampleSatusName', align: 'center', width: '80px' },
{ text: '备注', value: 'remark', align: 'center', width: '180px' },
])
// 表格数据
@@ -84,6 +85,7 @@
customerId: '', // 委托方id
sampleName: '', // 样品名称
sampleNo: '', // 样品编号
+ customerName: '', // 委托方名称
offset: 1,
limit: 20,
}
@@ -127,56 +129,55 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ (listQuery.offset - 1) * listQuery.limit + scope.$index + 1 }}
-
-
-
-
-
-
- 确定
-
-
- 取消
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ (listQuery.offset - 1) * listQuery.limit + scope.$index + 1 }}
+
+
-
-
+
+
+
+ 确定
+
+
+ 取消
+
+
+
diff --git a/src/views/business/schedule/order/orderEdit.vue b/src/views/business/schedule/order/orderEdit.vue
index 68ced75..142db45 100644
--- a/src/views/business/schedule/order/orderEdit.vue
+++ b/src/views/business/schedule/order/orderEdit.vue
@@ -313,6 +313,10 @@
// 点击保存
const saveForm = (formEl: FormInstance | undefined) => {
+ if (!list.value.length) {
+ ElMessage.warning('要求样品清单不能为空')
+ return
+ }
// 检查表格是否存在增加行信息没有完善的情况
const result = checkList()
if (result !== 'pass') {
diff --git a/src/views/business/schedule/order/selectSample.vue b/src/views/business/schedule/order/selectSample.vue
index 720a2e3..5c07d92 100644
--- a/src/views/business/schedule/order/selectSample.vue
+++ b/src/views/business/schedule/order/selectSample.vue
@@ -29,8 +29,8 @@
// 查询条件
const listQuery = ref({
- // sampleNo: '', // 样品编号
- // sampleName: '', // 样品名称
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
// sampleModel: '', // 型号
orderId: props.orderId || '', // 委托书id
customerId: props.customerId || '', // 委托方id
@@ -51,8 +51,8 @@
{ text: '委托方代码', value: 'customerNo', align: 'center' },
{ text: '委托方名称', value: 'customerName', align: 'center' },
{ text: '检定周期', value: 'measurePeriod', align: 'center' },
- { text: '上次检定时间', value: 'measureLastTime', align: 'center', width: '180px' },
- { text: '样品状态', value: 'sampleSatusName', align: 'center', width: '80px' },
+ // { text: '上次检定时间', value: 'measureLastTime', align: 'center', width: '180px' },
+ // { text: '样品状态', value: 'sampleSatusName', align: 'center', width: '80px' },
{ text: '备注', value: 'remark', align: 'center', width: '180px' },
])
// 表格数据
@@ -97,12 +97,14 @@
listQuery.value = {
sampleNo: '', // 样品编号
sampleName: '', // 样品名称
- sampleModel: '', // 型号
- customerNo: '', // 委托方代码
- customerName: '', // 委托方名称
- startTime: '', // 检定开始时间
- endTime: '', // 检定结束时间
- overtimeStatus: '', // 样品超期状态 1已超期、0未超期、空字符串 已超期+未超期
+ // sampleModel: '', // 型号
+ orderId: props.orderId || '', // 委托书id
+ customerId: props.customerId || '', // 委托方id
+ customerNo: props.customerNo || '', // 委托方代码
+ // customerName: '', // 委托方名称
+ // startTime: '', // 检定开始时间
+ // endTime: '', // 检定结束时间
+ // overtimeStatus: '', // 样品超期状态 1已超期、0未超期、空字符串 已超期+未超期
offset: 1,
limit: 20,
}
@@ -146,48 +148,57 @@
-
-
-
-
-
-
- 确定
-
-
- 取消
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ (listQuery.offset - 1) * listQuery.limit + scope.$index + 1 }}
+
+
-
-
+
+
+
+ 确定
+
+
+ 取消
+
+
+
+
diff --git a/src/views/business/schedule/task/components/chooseLab.vue b/src/views/business/schedule/task/components/chooseLab.vue
index a8222ac..0dcebfc 100644
--- a/src/views/business/schedule/task/components/chooseLab.vue
+++ b/src/views/business/schedule/task/components/chooseLab.vue
@@ -161,7 +161,6 @@
:columns="columns"
:query="listQuery"
:list-loading="loadingTable"
-
:pagination="false"
size="small"
@multi-select="handleSelectionChange"
@@ -169,6 +168,11 @@
+
+
+ {{ scope.$index + 1 }}
+
+
diff --git a/src/views/business/schedule/task/components/distributeDialog.vue b/src/views/business/schedule/task/components/distributeDialog.vue
index 6474dce..fb6a3f5 100644
--- a/src/views/business/schedule/task/components/distributeDialog.vue
+++ b/src/views/business/schedule/task/components/distributeDialog.vue
@@ -10,7 +10,7 @@
const dialogVisible = ref(false) // 弹窗显示
const sampleId = ref('') // 样品id
const orderId = ref('') // 委托单id
-
+const type = ref('distribute')
// 委托书-证书类别列表
const certificationTypes = ref([])
// 获取字典值
@@ -53,10 +53,16 @@
}
// 初始化弹窗
-const initDialog = (orderid: string, sampleid: string) => {
+const initDialog = (orderid: string, sampleid: string, sampleStatus: string) => {
dialogVisible.value = true
sampleId.value = sampleid
orderId.value = orderid
+ if (sampleStatus === '3') { // 检测中
+ type.value = 'testing'
+ }
+ else if (sampleStatus === '2') { // 待分发
+ type.value = 'distribute'
+ }
getInfo()
}
@@ -105,7 +111,7 @@
批量添加
-
+
确定
diff --git a/src/views/business/schedule/task/components/processConfig.vue b/src/views/business/schedule/task/components/processConfig.vue
index 43f2165..bb66076 100644
--- a/src/views/business/schedule/task/components/processConfig.vue
+++ b/src/views/business/schedule/task/components/processConfig.vue
@@ -56,7 +56,8 @@
if (props.list.length > 0) {
processList.value = props.list as ISchedule[]
}
-})
+},
+{ deep: true, immediate: true })
// 点击添加流程
const processAdd = () => {
@@ -103,6 +104,7 @@
const saveProcess = () => {
const form = {
measureProcessList: processList.value,
+ executiveList: processList.value,
orderId: props.orderId,
sampleId: props.sampleId,
}
@@ -138,7 +140,7 @@
-
+
diff --git a/src/views/business/schedule/task/components/processNode.vue b/src/views/business/schedule/task/components/processNode.vue
index d76d41d..fad76ab 100644
--- a/src/views/business/schedule/task/components/processNode.vue
+++ b/src/views/business/schedule/task/components/processNode.vue
@@ -25,7 +25,7 @@
}
},
},
- // 是否为详情展示页面-暂时无用
+ // 是否为详情展示页面
detail: {
type: Boolean,
default: false,
@@ -111,10 +111,10 @@
{{ props.step }}
-
+
-
+
@@ -122,22 +122,22 @@
检定环节
-
-
+
+
检定人员
-
-
+
+
- 应出具证书 份
+ 应出具证书 份
当前状态{{ processNodeData.measureStatusName }}
diff --git a/src/views/business/schedule/task/taskEdit.vue b/src/views/business/schedule/task/taskEdit.vue
index d64aa23..1d1e04f 100644
--- a/src/views/business/schedule/task/taskEdit.vue
+++ b/src/views/business/schedule/task/taskEdit.vue
@@ -215,8 +215,11 @@
taskForm.value.deliverer = res.data.deliverer // 送检人
taskForm.value.delivererTel = res.data.delivererTel // 送检人联系方式
taskForm.value.measureContent = res.data.measureContent // 检定项目
- taskForm.value.measureProcessList = res.data.measureProcessList
- taskForm.value.measureSendBackList = res.data.measureSendBackList
+ taskForm.value.measureProcessList = res.data.measureProcessList // 检定流程
+ taskForm.value.measureSendBackList = res.data.measureSendBackList // 退回流程
+ console.log('pppppp')
+ console.log(taskForm.value.measureProcessList)
+
// 改用一个接口获取
sampleForm.value = res.data
})
@@ -558,7 +561,11 @@
保存
-->
-
+
+
+
+
+
diff --git a/src/views/business/schedule/task/taskList.vue b/src/views/business/schedule/task/taskList.vue
index 64473c3..0efec98 100644
--- a/src/views/business/schedule/task/taskList.vue
+++ b/src/views/business/schedule/task/taskList.vue
@@ -46,7 +46,7 @@
getDictByCode('sampleStatus').then((response) => {
// 制作右上角的菜单
response.data.forEach((item: dictType) => {
- if (['待分发', '检测中', '检测完成', '已超期(查询使用)'].includes(item.name)) {
+ if (['待分发', '检测中', '检测完成', '已超期'].includes(item.name)) {
if (item.name === '待分发') {
active.value = item.value
activeTitle.value = item.name
@@ -58,6 +58,7 @@
})
}
})
+ console.log('88', menu.value)
if (window.sessionStorage.getItem('taskActive') != null) {
active.value = window.sessionStorage.getItem('taskActive') as string
@@ -99,6 +100,7 @@
// 是否显示当前页,否则跳转第一页
listQuery.value.offset = 1
}
+ listQuery.value.sampleStatus = active.value || '2'
getTaskList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: ITaskList) => {
item.isUrgentName = item.isUrgent == 1 ? '是' : '否'
@@ -146,7 +148,7 @@
// 点击分发, 弹窗
const distributeDialogRef = ref()
const handleDistribute = (row: ITaskList) => {
- distributeDialogRef.value.initDialog(row.orderId, row.sampleId)
+ distributeDialogRef.value.initDialog(row.orderId, row.sampleId, listQuery.value.sampleStatus)
}
// 点击标签绑定
const barCodeBind = ref()
@@ -323,6 +325,7 @@
标签绑定
+
props.columns, () => {
+ console.log(searchQuery.value)
+ searchQuery.value.offset = 1
+})
// 页数发生变化后的操作,可能是页码变化,可能是每页容量变化,此函数必写
const changePage = (val: { size?: number; page?: number }) => {
if (val && val.size) {
diff --git a/src/views/customer/sample/list/edit.vue b/src/views/customer/sample/list/edit.vue
index 207aaff..ae4f0d6 100644
--- a/src/views/customer/sample/list/edit.vue
+++ b/src/views/customer/sample/list/edit.vue
@@ -4,6 +4,7 @@
import { ElMessage, ElMessageBox } from 'element-plus'
import type { FormInstance, UploadUserFile } from 'element-plus'
import { ref } from 'vue'
+import dayjs from 'dayjs'
import type { ISampleEdit, Menu, SimpleCertification, SimpleMeasureRecord, dictType } from './sample_list_interface'
import selectCustomer from './selectCustomer.vue'
import showPhoto from '@/views/system/tool/showPhoto.vue'
@@ -13,7 +14,7 @@
import { UploadFile } from '@/api/measure/file'
import type { ICustomer } from '@/views/customer/customerInfo/customer_interface'
import { getDictByCode } from '@/api/system/dict'
-
+import type { IRecord } from '@/views/business/schedule/interchange/interchange_interface'
const textMap: { [key: string]: string } = {
edit: '编辑',
add: '新建',
@@ -109,11 +110,26 @@
}
getDict()
+const listQuery = ref({
+ sampleId: infoId.value, // 样品id
+ customerId: '', // 客户id
+ offset: 1,
+ limit: 10,
+})
+const totalRecords = ref(0) // 检定记录
+const totalCertifications = ref(0) // 检定证书
// 获取检定记录
const fetchMeasureRecords = (query = null) => {
if (pageType.value === 'detail') {
- getMesureRecords({ sampleId: infoId.value, customerId: '' }).then((res) => {
- dataList.value.measureRecords = res.data.rows
+ getMesureRecords(listQuery.value).then((res) => {
+ dataList.value.measureRecords = res.data.rows.map((item: { orderTime: string; deliverTime: string }) => {
+ return {
+ ...item,
+ orderTime: item.orderTime ? dayjs(item.orderTime).format('YYYY-MM-DD') : '',
+ deliverTime: item.deliverTime ? dayjs(item.deliverTime).format('YYYY-MM-DD') : '',
+ }
+ })
+ totalRecords.value = parseInt(res.data.total)
})
}
}
@@ -121,8 +137,16 @@
// 获取检定证书
const fetchCertifications = (query = null) => {
if (pageType.value === 'detail') {
- getCertification({ sampleId: infoId.value, customerId: '' }).then((res) => {
- dataList.value.certificationRecords = res.data.rows
+ getCertification(listQuery.value).then((res) => {
+ dataList.value.certificationRecords = res.data.rows.map((item: { effectiveDate: string; expirationDate: string }) => {
+ return {
+ ...item,
+ effectiveDate: item.effectiveDate ? dayjs(item.effectiveDate).format('YYYY-MM-DD') : '',
+ expirationDate: item.expirationDate ? dayjs(item.expirationDate).format('YYYY-MM-DD') : '',
+
+ }
+ })
+ totalCertifications.value = parseInt(res.data.total)
})
}
}
@@ -133,11 +157,11 @@
name: '检定记录',
columns: [
{ text: '委托单编号', value: 'orderCode', align: 'center' },
- { text: '委托单日期', value: 'orderTime', align: 'center' },
+ { text: '委托单日期', value: 'orderTime', align: 'center', width: '120' },
{ text: '委托方代码', value: 'customerCode', align: 'center' },
{ text: '委托方名称', value: 'customerName', align: 'center' },
{ text: '送检人', value: 'deliverer', align: 'center' },
- { text: '送检日期', value: 'deliverTime', align: 'center' },
+ { text: '送检日期', value: 'deliverTime', align: 'center', width: '120' },
],
list: 'measureRecords',
pagination: true,
@@ -149,8 +173,8 @@
{ text: '证书编号', value: 'certificationCode', align: 'center' },
{ text: '证书名称', value: 'certificationName', align: 'center' },
{ text: '证书类型', value: 'certificationClassName', align: 'center' },
- { text: '证书出具日期', value: 'effectiveDate', align: 'center' },
- { text: '证书有效期', value: 'expirationDate', align: 'center' },
+ { text: '证书出具日期', value: 'effectiveDate', align: 'center', width: '120' },
+ { text: '证书有效期', value: 'expirationDate', align: 'center', width: '120' },
],
list: 'certificationRecords',
pagination: true,
@@ -162,6 +186,23 @@
const currentMenuObj = computed(() => {
return menu.find(item => item.name === currentMenu.value)
})
+watch(currentMenuObj, () => {
+ listQuery.value.offset = 1
+ currentMenuObj.value?.searchFunc()
+},
+{
+ deep: true,
+ immediate: true,
+})
+
+// 监听检定记录和证书报告页数变化
+const changePage = (val: any) => {
+ if (val.value && currentMenuObj) {
+ listQuery.value.offset = val.value.offset
+ listQuery.value.limit = val.value.limit
+ currentMenuObj.value?.searchFunc()
+ }
+}
// 从路由中获取页面类型参数
const $route = useRoute()
@@ -616,7 +657,8 @@
-
+
+
diff --git a/src/views/customer/sample/list/list.vue b/src/views/customer/sample/list/list.vue
index 322a197..434d21c 100644
--- a/src/views/customer/sample/list/list.vue
+++ b/src/views/customer/sample/list/list.vue
@@ -1,3 +1,4 @@
+
+
+
+
+
+
+
+ 关闭
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 无
+
+
+ {{ sampleForm.minioFileName === '' ? '上传' : '更换附件' }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ item.name }}
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/business/board/overdueReminder/list.vue b/src/views/business/board/overdueReminder/list.vue
new file mode 100644
index 0000000..2421546
--- /dev/null
+++ b/src/views/business/board/overdueReminder/list.vue
@@ -0,0 +1,269 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ (listQuery.offset - 1) * listQuery.limit + scope.$index + 1 }}
+
+
+
+
+
+
+
+ 详情
+
+
+ 催办
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/business/board/overdueReminder/overdueReminder_interface.ts b/src/views/business/board/overdueReminder/overdueReminder_interface.ts
new file mode 100644
index 0000000..45bcf9e
--- /dev/null
+++ b/src/views/business/board/overdueReminder/overdueReminder_interface.ts
@@ -0,0 +1,31 @@
+// 筛选
+export interface IListQuery {
+ sampleNo: string // 样品编号
+ sampleName: string // 样品名称
+ orderNo: string // 委托书编号
+ customerNo: string // 委托方代码
+ customerName: string // 委托方名称
+ isUrgent: string // 是否加急
+ sampleBelong: string // 样品属性
+ sampleStatus: string // 分发状态
+ startTime: string // 应检定开始时间
+ endTime: string // 应检定结束时间
+ limit: number
+ offset: number
+}
+// 表格
+export interface IList {
+ id: string // 主键
+ sampleId: string // 样品id
+ sampleNo: string // 样品编号
+ sampleName: string// 样品名称
+ sampleModel: string// 型号
+ manufacturingNo: string// 出厂编号
+ orderId: string // 委托书id
+ orderCode: string// 委托书编号
+ customerNo: string// 委托方代码
+ customerName: string// 委托方名称
+ deliverer: string// 送检人
+ remark: string// 备注
+}
+
diff --git a/src/views/business/schedule/components/terminateDialog.vue b/src/views/business/schedule/components/terminateDialog.vue
index d5f85a0..17c8b15 100644
--- a/src/views/business/schedule/components/terminateDialog.vue
+++ b/src/views/business/schedule/components/terminateDialog.vue
@@ -32,7 +32,7 @@
* @param orderId 委托书id
* @param sampleId 样品id
*/
-function initDialog(row) {
+function initDialog(row: any) {
// dataFormRef.value!.clearValidate()
formData.value.orderId = row.orderId
formData.value.sampleId = row.sampleId
diff --git a/src/views/business/schedule/interchange/interchangeDetail.vue b/src/views/business/schedule/interchange/interchangeDetail.vue
index 789505f..5244f44 100644
--- a/src/views/business/schedule/interchange/interchangeDetail.vue
+++ b/src/views/business/schedule/interchange/interchangeDetail.vue
@@ -4,6 +4,8 @@
import { ElMessage, ElMessageBox } from 'element-plus'
import type { FormInstance, UploadUserFile } from 'element-plus'
import { ref } from 'vue'
+import dayjs from 'dayjs'
+import type { IRecord } from './interchange_interface'
import type { ISampleEdit, Menu, SimpleCertification, SimpleMeasureRecord, dictType } from '@/views/customer/sample/list/sample_list_interface'
import selectCustomer from '@/views/customer/sample/list/selectCustomer.vue'
import showPhoto from '@/views/system/tool/showPhoto.vue'
@@ -13,7 +15,6 @@
import { UploadFile } from '@/api/measure/file'
import type { ICustomer } from '@/views/customer/customerInfo/customer_interface'
import { getDictByCode } from '@/api/system/dict'
-
const textMap: { [key: string]: string } = {
edit: '编辑',
add: '新建',
@@ -27,6 +28,7 @@
const mesureCategoryList = ref
([]) // 校检类别
const measureTypeList = ref([]) // 检定方式
const powerVoltageList = ref([]) // 电源电压
+const total = ref(0)
const dataForm: Ref = ref({
id: '',
sampleNo: '', // 样品编号
@@ -86,12 +88,6 @@
powerVoltage: [{ required: true, message: '要求电源电压不能为空', trigger: 'change' }],
}) // 表单验证规则
-// 其他关联数据列表
-const dataList = ref({
- measureRecords: [] as SimpleMeasureRecord[],
- certificationRecords: [] as SimpleCertification[],
-})
-
// 获取字典值
function getDict() {
// 校检类别
@@ -109,11 +105,33 @@
}
getDict()
+// --------------------------检定记录、检定证书-----------------------------------------
+// 其他关联数据列表
+const dataList = ref({
+ measureRecords: [] as SimpleMeasureRecord[],
+ certificationRecords: [] as SimpleCertification[],
+})
+
+const listQuery = ref({
+ sampleId: infoId.value, // 样品id
+ customerId: '', // 客户id
+ offset: 1,
+ limit: 10,
+})
+const totalRecords = ref(0) // 检定记录总条数
+const totalCertifications = ref(0) // 检定证书总条数
// 获取检定记录
const fetchMeasureRecords = (query = null) => {
if (pageType.value === 'detail') {
- getMesureRecords({ sampleId: infoId.value, customerId: '' }).then((res) => {
- dataList.value.measureRecords = res.data.rows
+ getMesureRecords(listQuery.value).then((res) => {
+ dataList.value.measureRecords = res.data.rows.map((item: { orderTime: string; deliverTime: string }) => {
+ return {
+ ...item,
+ orderTime: item.orderTime ? dayjs(item.orderTime).format('YYYY-MM-DD') : '',
+ deliverTime: item.deliverTime ? dayjs(item.deliverTime).format('YYYY-MM-DD') : '',
+ }
+ })
+ totalRecords.value = parseInt(res.data.total)
})
}
}
@@ -121,8 +139,16 @@
// 获取检定证书
const fetchCertifications = (query = null) => {
if (pageType.value === 'detail') {
- getCertification({ sampleId: infoId.value, customerId: '' }).then((res) => {
- dataList.value.certificationRecords = res.data.rows
+ getCertification(listQuery.value).then((res) => {
+ dataList.value.certificationRecords = res.data.rows.map((item: { effectiveDate: string; expirationDate: string }) => {
+ return {
+ ...item,
+ effectiveDate: item.effectiveDate ? dayjs(item.effectiveDate).format('YYYY-MM-DD') : '',
+ expirationDate: item.expirationDate ? dayjs(item.expirationDate).format('YYYY-MM-DD') : '',
+
+ }
+ })
+ totalCertifications.value = parseInt(res.data.total)
})
}
}
@@ -133,11 +159,11 @@
name: '检定记录',
columns: [
{ text: '委托单编号', value: 'orderCode', align: 'center' },
- { text: '委托单日期', value: 'orderTime', align: 'center' },
+ { text: '委托单日期', value: 'orderTime', align: 'center', width: '120' },
{ text: '委托方代码', value: 'customerCode', align: 'center' },
{ text: '委托方名称', value: 'customerName', align: 'center' },
{ text: '送检人', value: 'deliverer', align: 'center' },
- { text: '送检日期', value: 'deliverTime', align: 'center' },
+ { text: '送检日期', value: 'deliverTime', align: 'center', width: '120' },
],
list: 'measureRecords',
pagination: true,
@@ -149,8 +175,8 @@
{ text: '证书编号', value: 'certificationCode', align: 'center' },
{ text: '证书名称', value: 'certificationName', align: 'center' },
{ text: '证书类型', value: 'certificationClassName', align: 'center' },
- { text: '证书出具日期', value: 'effectiveDate', align: 'center' },
- { text: '证书有效期', value: 'expirationDate', align: 'center' },
+ { text: '证书出具日期', value: 'effectiveDate', align: 'center', width: '120' },
+ { text: '证书有效期', value: 'expirationDate', align: 'center', width: '120' },
],
list: 'certificationRecords',
pagination: true,
@@ -162,6 +188,25 @@
const currentMenuObj = computed(() => {
return menu.find(item => item.name === currentMenu.value)
})
+watch(currentMenuObj, () => {
+ listQuery.value.offset = 1
+ currentMenuObj.value?.searchFunc()
+},
+{
+ deep: true,
+ immediate: true,
+})
+
+// 监听检定记录和证书报告页数变化
+const changePage = (val: any) => {
+ if (val.value && currentMenuObj) {
+ listQuery.value.offset = val.value.offset
+ listQuery.value.limit = val.value.limit
+ currentMenuObj.value?.searchFunc()
+ }
+}
+
+// -------------------------------------底部--------------------------------------
// 从路由中获取页面类型参数
const $route = useRoute()
@@ -615,7 +660,8 @@
-
+
+
diff --git a/src/views/business/schedule/interchange/interchangeList.vue b/src/views/business/schedule/interchange/interchangeList.vue
index 61ca5e5..51321f8 100644
--- a/src/views/business/schedule/interchange/interchangeList.vue
+++ b/src/views/business/schedule/interchange/interchangeList.vue
@@ -32,7 +32,7 @@
sampleNo: '', // 样品编号
sampleName: '', // 样品名称
orderNo: '', // 委托书编号
- customerId: '', // 委托方代码
+ customerNo: '', // 委托方代码
startTime: '', // 预计送达开始时间
endTime: '', // 预计送达结束时间
isUrgent: '2', // 是否加急 //2全部
@@ -174,12 +174,12 @@
sampleNo: '', // 样品编号
sampleName: '', // 样品名称
orderNo: '', // 委托书编号
- customerId: '', // 委托方代码
+ customerNo: '', // 委托方代码
startTime: '', // 预计送达开始时间
endTime: '', // 预计送达结束时间
isUrgent: '2', // 是否加急
sampleBelong: '2', // 样品属性
- sampleStatus: '',
+ sampleStatus: '', // 样品状态
offset: 1,
limit: 20,
}
@@ -238,7 +238,7 @@
sampleNo: listQuery.value.sampleNo, // 样品编号
sampleName: listQuery.value.sampleName, // 样品名称
orderNo: listQuery.value.orderNo, // 委托书编号
- customerId: listQuery.value.customerId, // 委托方代码
+ customerNo: listQuery.value.customerNo, // 委托方代码
startTime: listQuery.value.startTime, // 预计送达开始时间
endTime: listQuery.value.endTime, // 预计送达结束时间
isUrgent: listQuery.value.isUrgent, // 是否加急
@@ -363,6 +363,11 @@
$router.push(`/schedule/interchange/${pageType}/${row.sampleId}`)
}
+// 点击生成设备交接单
+const createInterchangeReceipt = () => {
+ $router.push('/schedule/receipt/add')
+}
+
onMounted(async () => {
await getDict() // 字典
if (window.sessionStorage.getItem('interchangeActive')) {
@@ -407,7 +412,7 @@
+
diff --git a/src/views/business/schedule/interchange/interchange_interface.ts b/src/views/business/schedule/interchange/interchange_interface.ts
index f1a3f91..ffa18b0 100644
--- a/src/views/business/schedule/interchange/interchange_interface.ts
+++ b/src/views/business/schedule/interchange/interchange_interface.ts
@@ -4,7 +4,8 @@
sampleNo: string // 样品编号
sampleName: string // 样品名称
orderNo: string // 委托书编号
- customerId: string // 委托方代码
+ customerId?: string // 委托方代码
+ customerNo?: string // 委托方代码
startTime: string // 预计送达开始时间
endTime: string // 预计送达结束时间
isUrgent: string // 是否加急
@@ -35,6 +36,13 @@
orderId: string | number // 委托书id
sampleId: string | number// 样品id
}
+// 检定记录检定证书查询条件
+export interface IRecord {
+ sampleId: string // 样品id
+ customerId: string // 客户id
+ offset: number
+ limit: number
+}
// 检定记录
export interface SimpleMeasureRecord {
diff --git a/src/views/business/schedule/interchangeReceipt/receiptEdit.vue b/src/views/business/schedule/interchangeReceipt/receiptEdit.vue
index c629542..83a076e 100644
--- a/src/views/business/schedule/interchangeReceipt/receiptEdit.vue
+++ b/src/views/business/schedule/interchangeReceipt/receiptEdit.vue
@@ -220,6 +220,7 @@
const confirmCheckoutOrder = (val: Array) => {
if (val && val.length) {
dataForm.value.orderCode = val[0].orderCode // 委托书编号
+ dataForm.value.orderNo = val[0].orderCode // 委托书编号
dataForm.value.orderId = val[0].id // 委托书id
dataForm.value.deliverer = val[0].deliverer // 送检人
dataForm.value.delivererTel = val[0].delivererTel // 送检人
@@ -233,13 +234,17 @@
}
}
-// ------------------------样品-----------------------------
+// ----------------------------------样品----------------------------------------------
// 点击批量增加
const multiAdd = () => {
- if (!dataForm.value.customerNo) {
+ if (!dataForm.value.orderCode) {
ElMessage.warning('请先选择委托书')
return
}
+ if (!dataForm.value.customerNo) {
+ ElMessage.warning('没有委托方代码,请检查')
+ return
+ }
sampleVisible.value = true
}
// 修改委托方对话框显隐
diff --git a/src/views/business/schedule/interchangeReceipt/receiptList-interface.ts b/src/views/business/schedule/interchangeReceipt/receiptList-interface.ts
index b3089b4..4b4432e 100644
--- a/src/views/business/schedule/interchangeReceipt/receiptList-interface.ts
+++ b/src/views/business/schedule/interchangeReceipt/receiptList-interface.ts
@@ -79,6 +79,7 @@
customerId: string // 委托方id
sampleName: string // 样品名称
sampleNo: string // 样品编号
+ customerName: string // 委托方名称
offset: number
limit: number
}
diff --git a/src/views/business/schedule/interchangeReceipt/selectSample.vue b/src/views/business/schedule/interchangeReceipt/selectSample.vue
index 11d3092..6c1cb6c 100644
--- a/src/views/business/schedule/interchangeReceipt/selectSample.vue
+++ b/src/views/business/schedule/interchangeReceipt/selectSample.vue
@@ -25,6 +25,7 @@
customerId: '', // 委托方id
sampleName: '', // 样品名称
sampleNo: '', // 样品编号
+ customerName: '', // 委托方名称
offset: 1,
limit: 20,
})
@@ -36,9 +37,9 @@
{ text: '出厂编号', value: 'manufacturingNo', align: 'center' },
{ text: '委托方代码', value: 'customerNo', align: 'center' },
{ text: '委托方名称', value: 'customerName', align: 'center' },
- { text: '检定周期', value: 'measurePeriod', align: 'center' },
- { text: '上次检定时间', value: 'measureLastTime', align: 'center', width: '180px' },
- { text: '样品状态', value: 'sampleSatusName', align: 'center', width: '80px' },
+ // { text: '检定周期', value: 'measurePeriod', align: 'center' },
+ // { text: '上次检定时间', value: 'measureLastTime', align: 'center', width: '180px' },
+ // { text: '样品状态', value: 'sampleSatusName', align: 'center', width: '80px' },
{ text: '备注', value: 'remark', align: 'center', width: '180px' },
])
// 表格数据
@@ -84,6 +85,7 @@
customerId: '', // 委托方id
sampleName: '', // 样品名称
sampleNo: '', // 样品编号
+ customerName: '', // 委托方名称
offset: 1,
limit: 20,
}
@@ -127,56 +129,55 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ (listQuery.offset - 1) * listQuery.limit + scope.$index + 1 }}
-
-
-
-
-
-
- 确定
-
-
- 取消
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ (listQuery.offset - 1) * listQuery.limit + scope.$index + 1 }}
+
+
-
-
+
+
+
+ 确定
+
+
+ 取消
+
+
+
diff --git a/src/views/business/schedule/order/orderEdit.vue b/src/views/business/schedule/order/orderEdit.vue
index 68ced75..142db45 100644
--- a/src/views/business/schedule/order/orderEdit.vue
+++ b/src/views/business/schedule/order/orderEdit.vue
@@ -313,6 +313,10 @@
// 点击保存
const saveForm = (formEl: FormInstance | undefined) => {
+ if (!list.value.length) {
+ ElMessage.warning('要求样品清单不能为空')
+ return
+ }
// 检查表格是否存在增加行信息没有完善的情况
const result = checkList()
if (result !== 'pass') {
diff --git a/src/views/business/schedule/order/selectSample.vue b/src/views/business/schedule/order/selectSample.vue
index 720a2e3..5c07d92 100644
--- a/src/views/business/schedule/order/selectSample.vue
+++ b/src/views/business/schedule/order/selectSample.vue
@@ -29,8 +29,8 @@
// 查询条件
const listQuery = ref({
- // sampleNo: '', // 样品编号
- // sampleName: '', // 样品名称
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
// sampleModel: '', // 型号
orderId: props.orderId || '', // 委托书id
customerId: props.customerId || '', // 委托方id
@@ -51,8 +51,8 @@
{ text: '委托方代码', value: 'customerNo', align: 'center' },
{ text: '委托方名称', value: 'customerName', align: 'center' },
{ text: '检定周期', value: 'measurePeriod', align: 'center' },
- { text: '上次检定时间', value: 'measureLastTime', align: 'center', width: '180px' },
- { text: '样品状态', value: 'sampleSatusName', align: 'center', width: '80px' },
+ // { text: '上次检定时间', value: 'measureLastTime', align: 'center', width: '180px' },
+ // { text: '样品状态', value: 'sampleSatusName', align: 'center', width: '80px' },
{ text: '备注', value: 'remark', align: 'center', width: '180px' },
])
// 表格数据
@@ -97,12 +97,14 @@
listQuery.value = {
sampleNo: '', // 样品编号
sampleName: '', // 样品名称
- sampleModel: '', // 型号
- customerNo: '', // 委托方代码
- customerName: '', // 委托方名称
- startTime: '', // 检定开始时间
- endTime: '', // 检定结束时间
- overtimeStatus: '', // 样品超期状态 1已超期、0未超期、空字符串 已超期+未超期
+ // sampleModel: '', // 型号
+ orderId: props.orderId || '', // 委托书id
+ customerId: props.customerId || '', // 委托方id
+ customerNo: props.customerNo || '', // 委托方代码
+ // customerName: '', // 委托方名称
+ // startTime: '', // 检定开始时间
+ // endTime: '', // 检定结束时间
+ // overtimeStatus: '', // 样品超期状态 1已超期、0未超期、空字符串 已超期+未超期
offset: 1,
limit: 20,
}
@@ -146,48 +148,57 @@
-
-
-
-
-
-
- 确定
-
-
- 取消
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ (listQuery.offset - 1) * listQuery.limit + scope.$index + 1 }}
+
+
-
-
+
+
+
+ 确定
+
+
+ 取消
+
+
+
+
diff --git a/src/views/business/schedule/task/components/chooseLab.vue b/src/views/business/schedule/task/components/chooseLab.vue
index a8222ac..0dcebfc 100644
--- a/src/views/business/schedule/task/components/chooseLab.vue
+++ b/src/views/business/schedule/task/components/chooseLab.vue
@@ -161,7 +161,6 @@
:columns="columns"
:query="listQuery"
:list-loading="loadingTable"
-
:pagination="false"
size="small"
@multi-select="handleSelectionChange"
@@ -169,6 +168,11 @@
+
+
+ {{ scope.$index + 1 }}
+
+
diff --git a/src/views/business/schedule/task/components/distributeDialog.vue b/src/views/business/schedule/task/components/distributeDialog.vue
index 6474dce..fb6a3f5 100644
--- a/src/views/business/schedule/task/components/distributeDialog.vue
+++ b/src/views/business/schedule/task/components/distributeDialog.vue
@@ -10,7 +10,7 @@
const dialogVisible = ref(false) // 弹窗显示
const sampleId = ref('') // 样品id
const orderId = ref('') // 委托单id
-
+const type = ref('distribute')
// 委托书-证书类别列表
const certificationTypes = ref([])
// 获取字典值
@@ -53,10 +53,16 @@
}
// 初始化弹窗
-const initDialog = (orderid: string, sampleid: string) => {
+const initDialog = (orderid: string, sampleid: string, sampleStatus: string) => {
dialogVisible.value = true
sampleId.value = sampleid
orderId.value = orderid
+ if (sampleStatus === '3') { // 检测中
+ type.value = 'testing'
+ }
+ else if (sampleStatus === '2') { // 待分发
+ type.value = 'distribute'
+ }
getInfo()
}
@@ -105,7 +111,7 @@
批量添加
-
+
确定
diff --git a/src/views/business/schedule/task/components/processConfig.vue b/src/views/business/schedule/task/components/processConfig.vue
index 43f2165..bb66076 100644
--- a/src/views/business/schedule/task/components/processConfig.vue
+++ b/src/views/business/schedule/task/components/processConfig.vue
@@ -56,7 +56,8 @@
if (props.list.length > 0) {
processList.value = props.list as ISchedule[]
}
-})
+},
+{ deep: true, immediate: true })
// 点击添加流程
const processAdd = () => {
@@ -103,6 +104,7 @@
const saveProcess = () => {
const form = {
measureProcessList: processList.value,
+ executiveList: processList.value,
orderId: props.orderId,
sampleId: props.sampleId,
}
@@ -138,7 +140,7 @@
-
+
diff --git a/src/views/business/schedule/task/components/processNode.vue b/src/views/business/schedule/task/components/processNode.vue
index d76d41d..fad76ab 100644
--- a/src/views/business/schedule/task/components/processNode.vue
+++ b/src/views/business/schedule/task/components/processNode.vue
@@ -25,7 +25,7 @@
}
},
},
- // 是否为详情展示页面-暂时无用
+ // 是否为详情展示页面
detail: {
type: Boolean,
default: false,
@@ -111,10 +111,10 @@
{{ props.step }}
-
+
-
+
@@ -122,22 +122,22 @@
检定环节
-
-
+
+
检定人员
-
-
+
+
- 应出具证书 份
+ 应出具证书 份
当前状态{{ processNodeData.measureStatusName }}
diff --git a/src/views/business/schedule/task/taskEdit.vue b/src/views/business/schedule/task/taskEdit.vue
index d64aa23..1d1e04f 100644
--- a/src/views/business/schedule/task/taskEdit.vue
+++ b/src/views/business/schedule/task/taskEdit.vue
@@ -215,8 +215,11 @@
taskForm.value.deliverer = res.data.deliverer // 送检人
taskForm.value.delivererTel = res.data.delivererTel // 送检人联系方式
taskForm.value.measureContent = res.data.measureContent // 检定项目
- taskForm.value.measureProcessList = res.data.measureProcessList
- taskForm.value.measureSendBackList = res.data.measureSendBackList
+ taskForm.value.measureProcessList = res.data.measureProcessList // 检定流程
+ taskForm.value.measureSendBackList = res.data.measureSendBackList // 退回流程
+ console.log('pppppp')
+ console.log(taskForm.value.measureProcessList)
+
// 改用一个接口获取
sampleForm.value = res.data
})
@@ -558,7 +561,11 @@
保存
-->
-
+
+
+
+
+
diff --git a/src/views/business/schedule/task/taskList.vue b/src/views/business/schedule/task/taskList.vue
index 64473c3..0efec98 100644
--- a/src/views/business/schedule/task/taskList.vue
+++ b/src/views/business/schedule/task/taskList.vue
@@ -46,7 +46,7 @@
getDictByCode('sampleStatus').then((response) => {
// 制作右上角的菜单
response.data.forEach((item: dictType) => {
- if (['待分发', '检测中', '检测完成', '已超期(查询使用)'].includes(item.name)) {
+ if (['待分发', '检测中', '检测完成', '已超期'].includes(item.name)) {
if (item.name === '待分发') {
active.value = item.value
activeTitle.value = item.name
@@ -58,6 +58,7 @@
})
}
})
+ console.log('88', menu.value)
if (window.sessionStorage.getItem('taskActive') != null) {
active.value = window.sessionStorage.getItem('taskActive') as string
@@ -99,6 +100,7 @@
// 是否显示当前页,否则跳转第一页
listQuery.value.offset = 1
}
+ listQuery.value.sampleStatus = active.value || '2'
getTaskList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: ITaskList) => {
item.isUrgentName = item.isUrgent == 1 ? '是' : '否'
@@ -146,7 +148,7 @@
// 点击分发, 弹窗
const distributeDialogRef = ref()
const handleDistribute = (row: ITaskList) => {
- distributeDialogRef.value.initDialog(row.orderId, row.sampleId)
+ distributeDialogRef.value.initDialog(row.orderId, row.sampleId, listQuery.value.sampleStatus)
}
// 点击标签绑定
const barCodeBind = ref()
@@ -323,6 +325,7 @@
标签绑定
+
props.columns, () => {
+ console.log(searchQuery.value)
+ searchQuery.value.offset = 1
+})
// 页数发生变化后的操作,可能是页码变化,可能是每页容量变化,此函数必写
const changePage = (val: { size?: number; page?: number }) => {
if (val && val.size) {
diff --git a/src/views/customer/sample/list/edit.vue b/src/views/customer/sample/list/edit.vue
index 207aaff..ae4f0d6 100644
--- a/src/views/customer/sample/list/edit.vue
+++ b/src/views/customer/sample/list/edit.vue
@@ -4,6 +4,7 @@
import { ElMessage, ElMessageBox } from 'element-plus'
import type { FormInstance, UploadUserFile } from 'element-plus'
import { ref } from 'vue'
+import dayjs from 'dayjs'
import type { ISampleEdit, Menu, SimpleCertification, SimpleMeasureRecord, dictType } from './sample_list_interface'
import selectCustomer from './selectCustomer.vue'
import showPhoto from '@/views/system/tool/showPhoto.vue'
@@ -13,7 +14,7 @@
import { UploadFile } from '@/api/measure/file'
import type { ICustomer } from '@/views/customer/customerInfo/customer_interface'
import { getDictByCode } from '@/api/system/dict'
-
+import type { IRecord } from '@/views/business/schedule/interchange/interchange_interface'
const textMap: { [key: string]: string } = {
edit: '编辑',
add: '新建',
@@ -109,11 +110,26 @@
}
getDict()
+const listQuery = ref({
+ sampleId: infoId.value, // 样品id
+ customerId: '', // 客户id
+ offset: 1,
+ limit: 10,
+})
+const totalRecords = ref(0) // 检定记录
+const totalCertifications = ref(0) // 检定证书
// 获取检定记录
const fetchMeasureRecords = (query = null) => {
if (pageType.value === 'detail') {
- getMesureRecords({ sampleId: infoId.value, customerId: '' }).then((res) => {
- dataList.value.measureRecords = res.data.rows
+ getMesureRecords(listQuery.value).then((res) => {
+ dataList.value.measureRecords = res.data.rows.map((item: { orderTime: string; deliverTime: string }) => {
+ return {
+ ...item,
+ orderTime: item.orderTime ? dayjs(item.orderTime).format('YYYY-MM-DD') : '',
+ deliverTime: item.deliverTime ? dayjs(item.deliverTime).format('YYYY-MM-DD') : '',
+ }
+ })
+ totalRecords.value = parseInt(res.data.total)
})
}
}
@@ -121,8 +137,16 @@
// 获取检定证书
const fetchCertifications = (query = null) => {
if (pageType.value === 'detail') {
- getCertification({ sampleId: infoId.value, customerId: '' }).then((res) => {
- dataList.value.certificationRecords = res.data.rows
+ getCertification(listQuery.value).then((res) => {
+ dataList.value.certificationRecords = res.data.rows.map((item: { effectiveDate: string; expirationDate: string }) => {
+ return {
+ ...item,
+ effectiveDate: item.effectiveDate ? dayjs(item.effectiveDate).format('YYYY-MM-DD') : '',
+ expirationDate: item.expirationDate ? dayjs(item.expirationDate).format('YYYY-MM-DD') : '',
+
+ }
+ })
+ totalCertifications.value = parseInt(res.data.total)
})
}
}
@@ -133,11 +157,11 @@
name: '检定记录',
columns: [
{ text: '委托单编号', value: 'orderCode', align: 'center' },
- { text: '委托单日期', value: 'orderTime', align: 'center' },
+ { text: '委托单日期', value: 'orderTime', align: 'center', width: '120' },
{ text: '委托方代码', value: 'customerCode', align: 'center' },
{ text: '委托方名称', value: 'customerName', align: 'center' },
{ text: '送检人', value: 'deliverer', align: 'center' },
- { text: '送检日期', value: 'deliverTime', align: 'center' },
+ { text: '送检日期', value: 'deliverTime', align: 'center', width: '120' },
],
list: 'measureRecords',
pagination: true,
@@ -149,8 +173,8 @@
{ text: '证书编号', value: 'certificationCode', align: 'center' },
{ text: '证书名称', value: 'certificationName', align: 'center' },
{ text: '证书类型', value: 'certificationClassName', align: 'center' },
- { text: '证书出具日期', value: 'effectiveDate', align: 'center' },
- { text: '证书有效期', value: 'expirationDate', align: 'center' },
+ { text: '证书出具日期', value: 'effectiveDate', align: 'center', width: '120' },
+ { text: '证书有效期', value: 'expirationDate', align: 'center', width: '120' },
],
list: 'certificationRecords',
pagination: true,
@@ -162,6 +186,23 @@
const currentMenuObj = computed(() => {
return menu.find(item => item.name === currentMenu.value)
})
+watch(currentMenuObj, () => {
+ listQuery.value.offset = 1
+ currentMenuObj.value?.searchFunc()
+},
+{
+ deep: true,
+ immediate: true,
+})
+
+// 监听检定记录和证书报告页数变化
+const changePage = (val: any) => {
+ if (val.value && currentMenuObj) {
+ listQuery.value.offset = val.value.offset
+ listQuery.value.limit = val.value.limit
+ currentMenuObj.value?.searchFunc()
+ }
+}
// 从路由中获取页面类型参数
const $route = useRoute()
@@ -616,7 +657,8 @@
-
+
+
diff --git a/src/views/customer/sample/list/list.vue b/src/views/customer/sample/list/list.vue
index 322a197..434d21c 100644
--- a/src/views/customer/sample/list/list.vue
+++ b/src/views/customer/sample/list/list.vue
@@ -1,3 +1,4 @@
+
@@ -231,12 +267,25 @@
-
+ /> -->
+
+
+
diff --git a/src/api/business/schedule/interchangeReceipt.ts b/src/api/business/schedule/interchangeReceipt.ts
index 574d62e..df5e257 100644
--- a/src/api/business/schedule/interchangeReceipt.ts
+++ b/src/api/business/schedule/interchangeReceipt.ts
@@ -61,9 +61,18 @@
}
// 关联委托书的且是已收入的样品的列表
+// export function getSampleList(data: ISampleListQuery) {
+// return request({
+// url: `${prefix}/sampleList?offset=${data.offset}&limit=${data.limit}`,
+// method: 'post',
+// data,
+// })
+// }
+
+// 查询样品列表
export function getSampleList(data: ISampleListQuery) {
return request({
- url: `${prefix}/sampleList?offset=${data.offset}&limit=${data.limit}`,
+ url: `/customer/sample/listPageByInterchange?offset=${data.offset}&limit=${data.limit}`,
method: 'post',
data,
})
diff --git a/src/api/customer/sampleList.ts b/src/api/customer/sampleList.ts
index e82a99e..65acbce 100644
--- a/src/api/customer/sampleList.ts
+++ b/src/api/customer/sampleList.ts
@@ -60,18 +60,18 @@
}
// 查询检定记录
-export function getMesureRecords(data: { customerId?: string; sampleId?: string }) {
+export function getMesureRecords(data: { customerId?: string; sampleId?: string; offset: number; limit: number }) {
return request({
- url: `${prefix}/sample/measureRecordsById`,
+ url: `${prefix}/sample/measureRecordsById?offset=${data.offset}&limit=${data.limit}`,
method: 'post',
data,
})
}
// 查询检定证书
-export function getCertification(data: { customerId?: string; sampleId?: string }) {
+export function getCertification(data: { customerId?: string; sampleId?: string; offset: number; limit: number }) {
return request({
- url: '/business/certificateReport/certificateRecordsById',
+ url: `/business/certificateReport/certificateRecordsById?offset=${data.offset}&limit=${data.limit}`,
method: 'post',
data,
})
diff --git a/src/assets/icons/business-board.svg b/src/assets/icons/business-board.svg
new file mode 100644
index 0000000..990fe35
--- /dev/null
+++ b/src/assets/icons/business-board.svg
@@ -0,0 +1 @@
+
diff --git a/src/assets/icons/icon-create.svg b/src/assets/icons/icon-create.svg
new file mode 100644
index 0000000..5d651db
--- /dev/null
+++ b/src/assets/icons/icon-create.svg
@@ -0,0 +1 @@
+
diff --git a/src/router/modules/business.ts b/src/router/modules/business.ts
index be78584..db0b317 100644
--- a/src/router/modules/business.ts
+++ b/src/router/modules/business.ts
@@ -29,6 +29,41 @@
],
},
{
+ path: '/board',
+ component: Layout,
+ redirect: '/board/overdueReminderList',
+ name: 'Board',
+ meta: {
+ title: '业务看板',
+ icon: 'ep:key',
+ auth: '/business/board',
+ },
+ children: [
+ {
+ path: 'overdueReminderList',
+ name: 'OverdueReminderList',
+ component: () => import('@/views/business/board/overdueReminder/list.vue'),
+ meta: {
+ title: '样品超期提醒',
+ icon: 'ep:key',
+ auth: '/business/board/overdueReminder',
+ },
+ },
+ {
+ path: 'overdueReminderDetail/:id',
+ name: 'OverdueReminderDetail',
+ component: () => import('@/views/business/board/overdueReminder/detail.vue'),
+ meta: {
+ title: '样品超期提醒详情',
+ icon: 'ep:key',
+ sidebar: false,
+ breadcrumb: true,
+ activeMenu: '/board/overdueReminderList',
+ },
+ },
+ ],
+ },
+ {
path: '/schedule',
component: Layout,
redirect: '/schedule/orderList',
@@ -374,7 +409,7 @@
{
path: '/:type/:id?',
name: 'taskDetail',
- component: () => import('@/views/business/schedule/certificate/edit.vue'),
+ component: () => import('@/views/business/subpackage/certificate/edit.vue'),
meta: {
title: '分包证书详情',
icon: 'ep:key',
diff --git a/src/views/business/board/overdueReminder/detail.vue b/src/views/business/board/overdueReminder/detail.vue
new file mode 100644
index 0000000..50aa545
--- /dev/null
+++ b/src/views/business/board/overdueReminder/detail.vue
@@ -0,0 +1,543 @@
+
+
+
+
+
+
+
+
+ 关闭
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 无
+
+
+ {{ sampleForm.minioFileName === '' ? '上传' : '更换附件' }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ item.name }}
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/business/board/overdueReminder/list.vue b/src/views/business/board/overdueReminder/list.vue
new file mode 100644
index 0000000..2421546
--- /dev/null
+++ b/src/views/business/board/overdueReminder/list.vue
@@ -0,0 +1,269 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ (listQuery.offset - 1) * listQuery.limit + scope.$index + 1 }}
+
+
+
+
+
+
+
+ 详情
+
+
+ 催办
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/business/board/overdueReminder/overdueReminder_interface.ts b/src/views/business/board/overdueReminder/overdueReminder_interface.ts
new file mode 100644
index 0000000..45bcf9e
--- /dev/null
+++ b/src/views/business/board/overdueReminder/overdueReminder_interface.ts
@@ -0,0 +1,31 @@
+// 筛选
+export interface IListQuery {
+ sampleNo: string // 样品编号
+ sampleName: string // 样品名称
+ orderNo: string // 委托书编号
+ customerNo: string // 委托方代码
+ customerName: string // 委托方名称
+ isUrgent: string // 是否加急
+ sampleBelong: string // 样品属性
+ sampleStatus: string // 分发状态
+ startTime: string // 应检定开始时间
+ endTime: string // 应检定结束时间
+ limit: number
+ offset: number
+}
+// 表格
+export interface IList {
+ id: string // 主键
+ sampleId: string // 样品id
+ sampleNo: string // 样品编号
+ sampleName: string// 样品名称
+ sampleModel: string// 型号
+ manufacturingNo: string// 出厂编号
+ orderId: string // 委托书id
+ orderCode: string// 委托书编号
+ customerNo: string// 委托方代码
+ customerName: string// 委托方名称
+ deliverer: string// 送检人
+ remark: string// 备注
+}
+
diff --git a/src/views/business/schedule/components/terminateDialog.vue b/src/views/business/schedule/components/terminateDialog.vue
index d5f85a0..17c8b15 100644
--- a/src/views/business/schedule/components/terminateDialog.vue
+++ b/src/views/business/schedule/components/terminateDialog.vue
@@ -32,7 +32,7 @@
* @param orderId 委托书id
* @param sampleId 样品id
*/
-function initDialog(row) {
+function initDialog(row: any) {
// dataFormRef.value!.clearValidate()
formData.value.orderId = row.orderId
formData.value.sampleId = row.sampleId
diff --git a/src/views/business/schedule/interchange/interchangeDetail.vue b/src/views/business/schedule/interchange/interchangeDetail.vue
index 789505f..5244f44 100644
--- a/src/views/business/schedule/interchange/interchangeDetail.vue
+++ b/src/views/business/schedule/interchange/interchangeDetail.vue
@@ -4,6 +4,8 @@
import { ElMessage, ElMessageBox } from 'element-plus'
import type { FormInstance, UploadUserFile } from 'element-plus'
import { ref } from 'vue'
+import dayjs from 'dayjs'
+import type { IRecord } from './interchange_interface'
import type { ISampleEdit, Menu, SimpleCertification, SimpleMeasureRecord, dictType } from '@/views/customer/sample/list/sample_list_interface'
import selectCustomer from '@/views/customer/sample/list/selectCustomer.vue'
import showPhoto from '@/views/system/tool/showPhoto.vue'
@@ -13,7 +15,6 @@
import { UploadFile } from '@/api/measure/file'
import type { ICustomer } from '@/views/customer/customerInfo/customer_interface'
import { getDictByCode } from '@/api/system/dict'
-
const textMap: { [key: string]: string } = {
edit: '编辑',
add: '新建',
@@ -27,6 +28,7 @@
const mesureCategoryList = ref([]) // 校检类别
const measureTypeList = ref([]) // 检定方式
const powerVoltageList = ref([]) // 电源电压
+const total = ref(0)
const dataForm: Ref = ref({
id: '',
sampleNo: '', // 样品编号
@@ -86,12 +88,6 @@
powerVoltage: [{ required: true, message: '要求电源电压不能为空', trigger: 'change' }],
}) // 表单验证规则
-// 其他关联数据列表
-const dataList = ref({
- measureRecords: [] as SimpleMeasureRecord[],
- certificationRecords: [] as SimpleCertification[],
-})
-
// 获取字典值
function getDict() {
// 校检类别
@@ -109,11 +105,33 @@
}
getDict()
+// --------------------------检定记录、检定证书-----------------------------------------
+// 其他关联数据列表
+const dataList = ref({
+ measureRecords: [] as SimpleMeasureRecord[],
+ certificationRecords: [] as SimpleCertification[],
+})
+
+const listQuery = ref({
+ sampleId: infoId.value, // 样品id
+ customerId: '', // 客户id
+ offset: 1,
+ limit: 10,
+})
+const totalRecords = ref(0) // 检定记录总条数
+const totalCertifications = ref(0) // 检定证书总条数
// 获取检定记录
const fetchMeasureRecords = (query = null) => {
if (pageType.value === 'detail') {
- getMesureRecords({ sampleId: infoId.value, customerId: '' }).then((res) => {
- dataList.value.measureRecords = res.data.rows
+ getMesureRecords(listQuery.value).then((res) => {
+ dataList.value.measureRecords = res.data.rows.map((item: { orderTime: string; deliverTime: string }) => {
+ return {
+ ...item,
+ orderTime: item.orderTime ? dayjs(item.orderTime).format('YYYY-MM-DD') : '',
+ deliverTime: item.deliverTime ? dayjs(item.deliverTime).format('YYYY-MM-DD') : '',
+ }
+ })
+ totalRecords.value = parseInt(res.data.total)
})
}
}
@@ -121,8 +139,16 @@
// 获取检定证书
const fetchCertifications = (query = null) => {
if (pageType.value === 'detail') {
- getCertification({ sampleId: infoId.value, customerId: '' }).then((res) => {
- dataList.value.certificationRecords = res.data.rows
+ getCertification(listQuery.value).then((res) => {
+ dataList.value.certificationRecords = res.data.rows.map((item: { effectiveDate: string; expirationDate: string }) => {
+ return {
+ ...item,
+ effectiveDate: item.effectiveDate ? dayjs(item.effectiveDate).format('YYYY-MM-DD') : '',
+ expirationDate: item.expirationDate ? dayjs(item.expirationDate).format('YYYY-MM-DD') : '',
+
+ }
+ })
+ totalCertifications.value = parseInt(res.data.total)
})
}
}
@@ -133,11 +159,11 @@
name: '检定记录',
columns: [
{ text: '委托单编号', value: 'orderCode', align: 'center' },
- { text: '委托单日期', value: 'orderTime', align: 'center' },
+ { text: '委托单日期', value: 'orderTime', align: 'center', width: '120' },
{ text: '委托方代码', value: 'customerCode', align: 'center' },
{ text: '委托方名称', value: 'customerName', align: 'center' },
{ text: '送检人', value: 'deliverer', align: 'center' },
- { text: '送检日期', value: 'deliverTime', align: 'center' },
+ { text: '送检日期', value: 'deliverTime', align: 'center', width: '120' },
],
list: 'measureRecords',
pagination: true,
@@ -149,8 +175,8 @@
{ text: '证书编号', value: 'certificationCode', align: 'center' },
{ text: '证书名称', value: 'certificationName', align: 'center' },
{ text: '证书类型', value: 'certificationClassName', align: 'center' },
- { text: '证书出具日期', value: 'effectiveDate', align: 'center' },
- { text: '证书有效期', value: 'expirationDate', align: 'center' },
+ { text: '证书出具日期', value: 'effectiveDate', align: 'center', width: '120' },
+ { text: '证书有效期', value: 'expirationDate', align: 'center', width: '120' },
],
list: 'certificationRecords',
pagination: true,
@@ -162,6 +188,25 @@
const currentMenuObj = computed(() => {
return menu.find(item => item.name === currentMenu.value)
})
+watch(currentMenuObj, () => {
+ listQuery.value.offset = 1
+ currentMenuObj.value?.searchFunc()
+},
+{
+ deep: true,
+ immediate: true,
+})
+
+// 监听检定记录和证书报告页数变化
+const changePage = (val: any) => {
+ if (val.value && currentMenuObj) {
+ listQuery.value.offset = val.value.offset
+ listQuery.value.limit = val.value.limit
+ currentMenuObj.value?.searchFunc()
+ }
+}
+
+// -------------------------------------底部--------------------------------------
// 从路由中获取页面类型参数
const $route = useRoute()
@@ -615,7 +660,8 @@
-
+
+
diff --git a/src/views/business/schedule/interchange/interchangeList.vue b/src/views/business/schedule/interchange/interchangeList.vue
index 61ca5e5..51321f8 100644
--- a/src/views/business/schedule/interchange/interchangeList.vue
+++ b/src/views/business/schedule/interchange/interchangeList.vue
@@ -32,7 +32,7 @@
sampleNo: '', // 样品编号
sampleName: '', // 样品名称
orderNo: '', // 委托书编号
- customerId: '', // 委托方代码
+ customerNo: '', // 委托方代码
startTime: '', // 预计送达开始时间
endTime: '', // 预计送达结束时间
isUrgent: '2', // 是否加急 //2全部
@@ -174,12 +174,12 @@
sampleNo: '', // 样品编号
sampleName: '', // 样品名称
orderNo: '', // 委托书编号
- customerId: '', // 委托方代码
+ customerNo: '', // 委托方代码
startTime: '', // 预计送达开始时间
endTime: '', // 预计送达结束时间
isUrgent: '2', // 是否加急
sampleBelong: '2', // 样品属性
- sampleStatus: '',
+ sampleStatus: '', // 样品状态
offset: 1,
limit: 20,
}
@@ -238,7 +238,7 @@
sampleNo: listQuery.value.sampleNo, // 样品编号
sampleName: listQuery.value.sampleName, // 样品名称
orderNo: listQuery.value.orderNo, // 委托书编号
- customerId: listQuery.value.customerId, // 委托方代码
+ customerNo: listQuery.value.customerNo, // 委托方代码
startTime: listQuery.value.startTime, // 预计送达开始时间
endTime: listQuery.value.endTime, // 预计送达结束时间
isUrgent: listQuery.value.isUrgent, // 是否加急
@@ -363,6 +363,11 @@
$router.push(`/schedule/interchange/${pageType}/${row.sampleId}`)
}
+// 点击生成设备交接单
+const createInterchangeReceipt = () => {
+ $router.push('/schedule/receipt/add')
+}
+
onMounted(async () => {
await getDict() // 字典
if (window.sessionStorage.getItem('interchangeActive')) {
@@ -407,7 +412,7 @@
+
diff --git a/src/views/business/schedule/interchange/interchange_interface.ts b/src/views/business/schedule/interchange/interchange_interface.ts
index f1a3f91..ffa18b0 100644
--- a/src/views/business/schedule/interchange/interchange_interface.ts
+++ b/src/views/business/schedule/interchange/interchange_interface.ts
@@ -4,7 +4,8 @@
sampleNo: string // 样品编号
sampleName: string // 样品名称
orderNo: string // 委托书编号
- customerId: string // 委托方代码
+ customerId?: string // 委托方代码
+ customerNo?: string // 委托方代码
startTime: string // 预计送达开始时间
endTime: string // 预计送达结束时间
isUrgent: string // 是否加急
@@ -35,6 +36,13 @@
orderId: string | number // 委托书id
sampleId: string | number// 样品id
}
+// 检定记录检定证书查询条件
+export interface IRecord {
+ sampleId: string // 样品id
+ customerId: string // 客户id
+ offset: number
+ limit: number
+}
// 检定记录
export interface SimpleMeasureRecord {
diff --git a/src/views/business/schedule/interchangeReceipt/receiptEdit.vue b/src/views/business/schedule/interchangeReceipt/receiptEdit.vue
index c629542..83a076e 100644
--- a/src/views/business/schedule/interchangeReceipt/receiptEdit.vue
+++ b/src/views/business/schedule/interchangeReceipt/receiptEdit.vue
@@ -220,6 +220,7 @@
const confirmCheckoutOrder = (val: Array) => {
if (val && val.length) {
dataForm.value.orderCode = val[0].orderCode // 委托书编号
+ dataForm.value.orderNo = val[0].orderCode // 委托书编号
dataForm.value.orderId = val[0].id // 委托书id
dataForm.value.deliverer = val[0].deliverer // 送检人
dataForm.value.delivererTel = val[0].delivererTel // 送检人
@@ -233,13 +234,17 @@
}
}
-// ------------------------样品-----------------------------
+// ----------------------------------样品----------------------------------------------
// 点击批量增加
const multiAdd = () => {
- if (!dataForm.value.customerNo) {
+ if (!dataForm.value.orderCode) {
ElMessage.warning('请先选择委托书')
return
}
+ if (!dataForm.value.customerNo) {
+ ElMessage.warning('没有委托方代码,请检查')
+ return
+ }
sampleVisible.value = true
}
// 修改委托方对话框显隐
diff --git a/src/views/business/schedule/interchangeReceipt/receiptList-interface.ts b/src/views/business/schedule/interchangeReceipt/receiptList-interface.ts
index b3089b4..4b4432e 100644
--- a/src/views/business/schedule/interchangeReceipt/receiptList-interface.ts
+++ b/src/views/business/schedule/interchangeReceipt/receiptList-interface.ts
@@ -79,6 +79,7 @@
customerId: string // 委托方id
sampleName: string // 样品名称
sampleNo: string // 样品编号
+ customerName: string // 委托方名称
offset: number
limit: number
}
diff --git a/src/views/business/schedule/interchangeReceipt/selectSample.vue b/src/views/business/schedule/interchangeReceipt/selectSample.vue
index 11d3092..6c1cb6c 100644
--- a/src/views/business/schedule/interchangeReceipt/selectSample.vue
+++ b/src/views/business/schedule/interchangeReceipt/selectSample.vue
@@ -25,6 +25,7 @@
customerId: '', // 委托方id
sampleName: '', // 样品名称
sampleNo: '', // 样品编号
+ customerName: '', // 委托方名称
offset: 1,
limit: 20,
})
@@ -36,9 +37,9 @@
{ text: '出厂编号', value: 'manufacturingNo', align: 'center' },
{ text: '委托方代码', value: 'customerNo', align: 'center' },
{ text: '委托方名称', value: 'customerName', align: 'center' },
- { text: '检定周期', value: 'measurePeriod', align: 'center' },
- { text: '上次检定时间', value: 'measureLastTime', align: 'center', width: '180px' },
- { text: '样品状态', value: 'sampleSatusName', align: 'center', width: '80px' },
+ // { text: '检定周期', value: 'measurePeriod', align: 'center' },
+ // { text: '上次检定时间', value: 'measureLastTime', align: 'center', width: '180px' },
+ // { text: '样品状态', value: 'sampleSatusName', align: 'center', width: '80px' },
{ text: '备注', value: 'remark', align: 'center', width: '180px' },
])
// 表格数据
@@ -84,6 +85,7 @@
customerId: '', // 委托方id
sampleName: '', // 样品名称
sampleNo: '', // 样品编号
+ customerName: '', // 委托方名称
offset: 1,
limit: 20,
}
@@ -127,56 +129,55 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ (listQuery.offset - 1) * listQuery.limit + scope.$index + 1 }}
-
-
-
-
-
-
- 确定
-
-
- 取消
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ (listQuery.offset - 1) * listQuery.limit + scope.$index + 1 }}
+
+
-
-
+
+
+
+ 确定
+
+
+ 取消
+
+
+
diff --git a/src/views/business/schedule/order/orderEdit.vue b/src/views/business/schedule/order/orderEdit.vue
index 68ced75..142db45 100644
--- a/src/views/business/schedule/order/orderEdit.vue
+++ b/src/views/business/schedule/order/orderEdit.vue
@@ -313,6 +313,10 @@
// 点击保存
const saveForm = (formEl: FormInstance | undefined) => {
+ if (!list.value.length) {
+ ElMessage.warning('要求样品清单不能为空')
+ return
+ }
// 检查表格是否存在增加行信息没有完善的情况
const result = checkList()
if (result !== 'pass') {
diff --git a/src/views/business/schedule/order/selectSample.vue b/src/views/business/schedule/order/selectSample.vue
index 720a2e3..5c07d92 100644
--- a/src/views/business/schedule/order/selectSample.vue
+++ b/src/views/business/schedule/order/selectSample.vue
@@ -29,8 +29,8 @@
// 查询条件
const listQuery = ref({
- // sampleNo: '', // 样品编号
- // sampleName: '', // 样品名称
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
// sampleModel: '', // 型号
orderId: props.orderId || '', // 委托书id
customerId: props.customerId || '', // 委托方id
@@ -51,8 +51,8 @@
{ text: '委托方代码', value: 'customerNo', align: 'center' },
{ text: '委托方名称', value: 'customerName', align: 'center' },
{ text: '检定周期', value: 'measurePeriod', align: 'center' },
- { text: '上次检定时间', value: 'measureLastTime', align: 'center', width: '180px' },
- { text: '样品状态', value: 'sampleSatusName', align: 'center', width: '80px' },
+ // { text: '上次检定时间', value: 'measureLastTime', align: 'center', width: '180px' },
+ // { text: '样品状态', value: 'sampleSatusName', align: 'center', width: '80px' },
{ text: '备注', value: 'remark', align: 'center', width: '180px' },
])
// 表格数据
@@ -97,12 +97,14 @@
listQuery.value = {
sampleNo: '', // 样品编号
sampleName: '', // 样品名称
- sampleModel: '', // 型号
- customerNo: '', // 委托方代码
- customerName: '', // 委托方名称
- startTime: '', // 检定开始时间
- endTime: '', // 检定结束时间
- overtimeStatus: '', // 样品超期状态 1已超期、0未超期、空字符串 已超期+未超期
+ // sampleModel: '', // 型号
+ orderId: props.orderId || '', // 委托书id
+ customerId: props.customerId || '', // 委托方id
+ customerNo: props.customerNo || '', // 委托方代码
+ // customerName: '', // 委托方名称
+ // startTime: '', // 检定开始时间
+ // endTime: '', // 检定结束时间
+ // overtimeStatus: '', // 样品超期状态 1已超期、0未超期、空字符串 已超期+未超期
offset: 1,
limit: 20,
}
@@ -146,48 +148,57 @@
-
-
-
-
-
-
- 确定
-
-
- 取消
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ (listQuery.offset - 1) * listQuery.limit + scope.$index + 1 }}
+
+
-
-
+
+
+
+ 确定
+
+
+ 取消
+
+
+
+
diff --git a/src/views/business/schedule/task/components/chooseLab.vue b/src/views/business/schedule/task/components/chooseLab.vue
index a8222ac..0dcebfc 100644
--- a/src/views/business/schedule/task/components/chooseLab.vue
+++ b/src/views/business/schedule/task/components/chooseLab.vue
@@ -161,7 +161,6 @@
:columns="columns"
:query="listQuery"
:list-loading="loadingTable"
-
:pagination="false"
size="small"
@multi-select="handleSelectionChange"
@@ -169,6 +168,11 @@
+
+
+ {{ scope.$index + 1 }}
+
+
diff --git a/src/views/business/schedule/task/components/distributeDialog.vue b/src/views/business/schedule/task/components/distributeDialog.vue
index 6474dce..fb6a3f5 100644
--- a/src/views/business/schedule/task/components/distributeDialog.vue
+++ b/src/views/business/schedule/task/components/distributeDialog.vue
@@ -10,7 +10,7 @@
const dialogVisible = ref(false) // 弹窗显示
const sampleId = ref('') // 样品id
const orderId = ref('') // 委托单id
-
+const type = ref('distribute')
// 委托书-证书类别列表
const certificationTypes = ref([])
// 获取字典值
@@ -53,10 +53,16 @@
}
// 初始化弹窗
-const initDialog = (orderid: string, sampleid: string) => {
+const initDialog = (orderid: string, sampleid: string, sampleStatus: string) => {
dialogVisible.value = true
sampleId.value = sampleid
orderId.value = orderid
+ if (sampleStatus === '3') { // 检测中
+ type.value = 'testing'
+ }
+ else if (sampleStatus === '2') { // 待分发
+ type.value = 'distribute'
+ }
getInfo()
}
@@ -105,7 +111,7 @@
批量添加
-
+
确定
diff --git a/src/views/business/schedule/task/components/processConfig.vue b/src/views/business/schedule/task/components/processConfig.vue
index 43f2165..bb66076 100644
--- a/src/views/business/schedule/task/components/processConfig.vue
+++ b/src/views/business/schedule/task/components/processConfig.vue
@@ -56,7 +56,8 @@
if (props.list.length > 0) {
processList.value = props.list as ISchedule[]
}
-})
+},
+{ deep: true, immediate: true })
// 点击添加流程
const processAdd = () => {
@@ -103,6 +104,7 @@
const saveProcess = () => {
const form = {
measureProcessList: processList.value,
+ executiveList: processList.value,
orderId: props.orderId,
sampleId: props.sampleId,
}
@@ -138,7 +140,7 @@
-
+
diff --git a/src/views/business/schedule/task/components/processNode.vue b/src/views/business/schedule/task/components/processNode.vue
index d76d41d..fad76ab 100644
--- a/src/views/business/schedule/task/components/processNode.vue
+++ b/src/views/business/schedule/task/components/processNode.vue
@@ -25,7 +25,7 @@
}
},
},
- // 是否为详情展示页面-暂时无用
+ // 是否为详情展示页面
detail: {
type: Boolean,
default: false,
@@ -111,10 +111,10 @@
{{ props.step }}
-
+
-
+
@@ -122,22 +122,22 @@
检定环节
-
-
+
+
检定人员
-
-
+
+
- 应出具证书 份
+ 应出具证书 份
当前状态{{ processNodeData.measureStatusName }}
diff --git a/src/views/business/schedule/task/taskEdit.vue b/src/views/business/schedule/task/taskEdit.vue
index d64aa23..1d1e04f 100644
--- a/src/views/business/schedule/task/taskEdit.vue
+++ b/src/views/business/schedule/task/taskEdit.vue
@@ -215,8 +215,11 @@
taskForm.value.deliverer = res.data.deliverer // 送检人
taskForm.value.delivererTel = res.data.delivererTel // 送检人联系方式
taskForm.value.measureContent = res.data.measureContent // 检定项目
- taskForm.value.measureProcessList = res.data.measureProcessList
- taskForm.value.measureSendBackList = res.data.measureSendBackList
+ taskForm.value.measureProcessList = res.data.measureProcessList // 检定流程
+ taskForm.value.measureSendBackList = res.data.measureSendBackList // 退回流程
+ console.log('pppppp')
+ console.log(taskForm.value.measureProcessList)
+
// 改用一个接口获取
sampleForm.value = res.data
})
@@ -558,7 +561,11 @@
保存
-->
-
+
+
+
+
+
diff --git a/src/views/business/schedule/task/taskList.vue b/src/views/business/schedule/task/taskList.vue
index 64473c3..0efec98 100644
--- a/src/views/business/schedule/task/taskList.vue
+++ b/src/views/business/schedule/task/taskList.vue
@@ -46,7 +46,7 @@
getDictByCode('sampleStatus').then((response) => {
// 制作右上角的菜单
response.data.forEach((item: dictType) => {
- if (['待分发', '检测中', '检测完成', '已超期(查询使用)'].includes(item.name)) {
+ if (['待分发', '检测中', '检测完成', '已超期'].includes(item.name)) {
if (item.name === '待分发') {
active.value = item.value
activeTitle.value = item.name
@@ -58,6 +58,7 @@
})
}
})
+ console.log('88', menu.value)
if (window.sessionStorage.getItem('taskActive') != null) {
active.value = window.sessionStorage.getItem('taskActive') as string
@@ -99,6 +100,7 @@
// 是否显示当前页,否则跳转第一页
listQuery.value.offset = 1
}
+ listQuery.value.sampleStatus = active.value || '2'
getTaskList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: ITaskList) => {
item.isUrgentName = item.isUrgent == 1 ? '是' : '否'
@@ -146,7 +148,7 @@
// 点击分发, 弹窗
const distributeDialogRef = ref()
const handleDistribute = (row: ITaskList) => {
- distributeDialogRef.value.initDialog(row.orderId, row.sampleId)
+ distributeDialogRef.value.initDialog(row.orderId, row.sampleId, listQuery.value.sampleStatus)
}
// 点击标签绑定
const barCodeBind = ref()
@@ -323,6 +325,7 @@
标签绑定
+
props.columns, () => {
+ console.log(searchQuery.value)
+ searchQuery.value.offset = 1
+})
// 页数发生变化后的操作,可能是页码变化,可能是每页容量变化,此函数必写
const changePage = (val: { size?: number; page?: number }) => {
if (val && val.size) {
diff --git a/src/views/customer/sample/list/edit.vue b/src/views/customer/sample/list/edit.vue
index 207aaff..ae4f0d6 100644
--- a/src/views/customer/sample/list/edit.vue
+++ b/src/views/customer/sample/list/edit.vue
@@ -4,6 +4,7 @@
import { ElMessage, ElMessageBox } from 'element-plus'
import type { FormInstance, UploadUserFile } from 'element-plus'
import { ref } from 'vue'
+import dayjs from 'dayjs'
import type { ISampleEdit, Menu, SimpleCertification, SimpleMeasureRecord, dictType } from './sample_list_interface'
import selectCustomer from './selectCustomer.vue'
import showPhoto from '@/views/system/tool/showPhoto.vue'
@@ -13,7 +14,7 @@
import { UploadFile } from '@/api/measure/file'
import type { ICustomer } from '@/views/customer/customerInfo/customer_interface'
import { getDictByCode } from '@/api/system/dict'
-
+import type { IRecord } from '@/views/business/schedule/interchange/interchange_interface'
const textMap: { [key: string]: string } = {
edit: '编辑',
add: '新建',
@@ -109,11 +110,26 @@
}
getDict()
+const listQuery = ref({
+ sampleId: infoId.value, // 样品id
+ customerId: '', // 客户id
+ offset: 1,
+ limit: 10,
+})
+const totalRecords = ref(0) // 检定记录
+const totalCertifications = ref(0) // 检定证书
// 获取检定记录
const fetchMeasureRecords = (query = null) => {
if (pageType.value === 'detail') {
- getMesureRecords({ sampleId: infoId.value, customerId: '' }).then((res) => {
- dataList.value.measureRecords = res.data.rows
+ getMesureRecords(listQuery.value).then((res) => {
+ dataList.value.measureRecords = res.data.rows.map((item: { orderTime: string; deliverTime: string }) => {
+ return {
+ ...item,
+ orderTime: item.orderTime ? dayjs(item.orderTime).format('YYYY-MM-DD') : '',
+ deliverTime: item.deliverTime ? dayjs(item.deliverTime).format('YYYY-MM-DD') : '',
+ }
+ })
+ totalRecords.value = parseInt(res.data.total)
})
}
}
@@ -121,8 +137,16 @@
// 获取检定证书
const fetchCertifications = (query = null) => {
if (pageType.value === 'detail') {
- getCertification({ sampleId: infoId.value, customerId: '' }).then((res) => {
- dataList.value.certificationRecords = res.data.rows
+ getCertification(listQuery.value).then((res) => {
+ dataList.value.certificationRecords = res.data.rows.map((item: { effectiveDate: string; expirationDate: string }) => {
+ return {
+ ...item,
+ effectiveDate: item.effectiveDate ? dayjs(item.effectiveDate).format('YYYY-MM-DD') : '',
+ expirationDate: item.expirationDate ? dayjs(item.expirationDate).format('YYYY-MM-DD') : '',
+
+ }
+ })
+ totalCertifications.value = parseInt(res.data.total)
})
}
}
@@ -133,11 +157,11 @@
name: '检定记录',
columns: [
{ text: '委托单编号', value: 'orderCode', align: 'center' },
- { text: '委托单日期', value: 'orderTime', align: 'center' },
+ { text: '委托单日期', value: 'orderTime', align: 'center', width: '120' },
{ text: '委托方代码', value: 'customerCode', align: 'center' },
{ text: '委托方名称', value: 'customerName', align: 'center' },
{ text: '送检人', value: 'deliverer', align: 'center' },
- { text: '送检日期', value: 'deliverTime', align: 'center' },
+ { text: '送检日期', value: 'deliverTime', align: 'center', width: '120' },
],
list: 'measureRecords',
pagination: true,
@@ -149,8 +173,8 @@
{ text: '证书编号', value: 'certificationCode', align: 'center' },
{ text: '证书名称', value: 'certificationName', align: 'center' },
{ text: '证书类型', value: 'certificationClassName', align: 'center' },
- { text: '证书出具日期', value: 'effectiveDate', align: 'center' },
- { text: '证书有效期', value: 'expirationDate', align: 'center' },
+ { text: '证书出具日期', value: 'effectiveDate', align: 'center', width: '120' },
+ { text: '证书有效期', value: 'expirationDate', align: 'center', width: '120' },
],
list: 'certificationRecords',
pagination: true,
@@ -162,6 +186,23 @@
const currentMenuObj = computed(() => {
return menu.find(item => item.name === currentMenu.value)
})
+watch(currentMenuObj, () => {
+ listQuery.value.offset = 1
+ currentMenuObj.value?.searchFunc()
+},
+{
+ deep: true,
+ immediate: true,
+})
+
+// 监听检定记录和证书报告页数变化
+const changePage = (val: any) => {
+ if (val.value && currentMenuObj) {
+ listQuery.value.offset = val.value.offset
+ listQuery.value.limit = val.value.limit
+ currentMenuObj.value?.searchFunc()
+ }
+}
// 从路由中获取页面类型参数
const $route = useRoute()
@@ -616,7 +657,8 @@
-
+
+
diff --git a/src/views/customer/sample/list/list.vue b/src/views/customer/sample/list/list.vue
index 322a197..434d21c 100644
--- a/src/views/customer/sample/list/list.vue
+++ b/src/views/customer/sample/list/list.vue
@@ -1,3 +1,4 @@
+
@@ -231,12 +267,25 @@
-
+ /> -->
+
+
+
diff --git a/src/views/device/standardEquipment/components/listApply/listPageAdd.vue b/src/views/device/standardEquipment/components/listApply/listPageAdd.vue
index 4668128..88bcb77 100644
--- a/src/views/device/standardEquipment/components/listApply/listPageAdd.vue
+++ b/src/views/device/standardEquipment/components/listApply/listPageAdd.vue
@@ -121,6 +121,8 @@
approvalStatus: '', // 审批状态
applyEquipmentList: [], // 申请设备列表
fixedAssetsList: [], // 申请设备上传列表
+ newApplyEquipmentList: [], // 申请设备列表
+ newFixedAssetsList: [], // 申请设备上传列表
approvalStatusName: '', // 审批状态名称
constructionStandardUnitName: '', // 建标单位名称
createTime: null, // 创建时间
@@ -135,6 +137,8 @@
standardOwner: '', // 标准负责人
taskId: '', // 任务id
minioFileName: [], // 附件
+ newSupportEquipmentList: [], // 替换后的设备列表
+ oldSupportEquipmentList: [], // 需要被替换的设备列表
})
// 下拉框数组类型
interface IOptions {
@@ -392,12 +396,20 @@
// -----------------------------------------------------------------------------------
// 选择标准配套设备
const equipmentDialog = ref()
+const listNewIndex = ref()
+const tableType = ref('old') // 是需要更换的表格还是更换为的表格
// 点击标准配套设备选择按钮
-const chooseList = (row: object, index: number) => {
- listIndex.value = index
+const chooseList = (row: object, index: number, type: string) => {
+ tableType.value = type
+ if (type === 'old') {
+ listIndex.value = index
+ }
+ if (type === 'new') {
+ listNewIndex.value = index
+ }
equipmentDialog.value.initDialog()
}
-// 测试数据
+// 证书测试数据
const simulateObject = {
data: dayjs(`${new Date()}`).format('YYYY.MM.DD'), // 有效日期
certificateNo: '199926465422', // 证书编号
@@ -405,49 +417,95 @@
authorityOfDate: dayjs(`${new Date()}`).format('YYYY.MM.DD'), // 发证日期
}
-// ---------------------------------------操作表格-------------------------------------
+// ---------------------------------------操作表格-需要更换------------------------------------
// 点击增加行
-const addRow = () => {
- // 判断applyEquipmentList上一条数据是否填写
- if (fromListInfo.value.applyEquipmentList.length >= 1 && fromListInfo.value.applyEquipmentList[fromListInfo.value.applyEquipmentList.length - 1].equipmentId === '') {
- ElMessage.warning('请完善上一条设备信息')
+const addRow = (type: string) => {
+ console.log(type)
+
+ if (type === 'old') { // 需要更换
+ // 判断applyEquipmentList上一条数据是否填写
+ if (fromListInfo.value.applyEquipmentList.length >= 1 && fromListInfo.value.applyEquipmentList[fromListInfo.value.applyEquipmentList.length - 1].equipmentId === '') {
+ ElMessage.warning('请完善上一条设备信息')
+ }
+ else {
+ fromListInfo.value.applyEquipmentList.push({
+ equipmentId: '',
+ standardApplyId: '',
+ })
+ fromListInfo.value.fixedAssetsList.push({ id: '' })
+ }
}
- else {
- fromListInfo.value.applyEquipmentList.push({
- equipmentId: '',
- standardApplyId: '',
- })
- fromListInfo.value.fixedAssetsList.push({ id: '' })
+ else { // 更换为
+ // 判断applyEquipmentList上一条数据是否填写
+ if (fromListInfo.value.newApplyEquipmentList.length >= 1 && fromListInfo.value.newApplyEquipmentList[fromListInfo.value.newApplyEquipmentList.length - 1].equipmentId === '') {
+ ElMessage.warning('请完善上一条设备信息')
+ }
+ else {
+ fromListInfo.value.newApplyEquipmentList.push({
+ equipmentId: '',
+ standardApplyId: '',
+ })
+ fromListInfo.value.newFixedAssetsList.push({ id: '' })
+ }
}
}
// 删除行
-const removeRow = () => {
- if (selectionList.value.length > 0) {
- fromListInfo.value.fixedAssetsList = fromListInfo.value.fixedAssetsList.filter((item) => {
- return !selectionList.value.includes(item)
- })
- fromListInfo.value.applyEquipmentList = fromListInfo.value.fixedAssetsList.filter((item) => {
- return !selectionList.value.includes(item)
- })
+const removeRow = (type: string) => {
+ if (type === 'old') { // 需要更换
+ if (selectionList.value.length > 0) {
+ fromListInfo.value.fixedAssetsList = fromListInfo.value.fixedAssetsList.filter((item) => {
+ return !selectionList.value.includes(item)
+ })
+ fromListInfo.value.applyEquipmentList = fromListInfo.value.fixedAssetsList.filter((item) => {
+ return !selectionList.value.includes(item)
+ })
+ }
+ else {
+ ElMessage.warning('请选中')
+ }
}
- else {
- ElMessage.warning('请选中')
+ else { // 更换为
+ if (selectionList.value.length > 0) {
+ fromListInfo.value.newFixedAssetsList = fromListInfo.value.newFixedAssetsList.filter((item) => {
+ return !selectionList.value.includes(item)
+ })
+ fromListInfo.value.newApplyEquipmentList = fromListInfo.value.newFixedAssetsList.filter((item) => {
+ return !selectionList.value.includes(item)
+ })
+ }
+ else {
+ ElMessage.warning('请选中')
+ }
}
}
// 选择好标准配套设备
const equipmentAddRow = (data: IFixedAssetsList) => {
data.validDate = dayjs(data.validDate).format('YYYY-MM-DD') || ''
- const index = fromListInfo.value.fixedAssetsList.findIndex(item => item.id === data.id)
- if (index === -1) {
- fromListInfo.value.fixedAssetsList[listIndex.value] = data
- fromListInfo.value.applyEquipmentList[listIndex.value].equipmentId = data.id
- fromListInfo.value.applyEquipmentList[listIndex.value].standardApplyId = infoId.value || ''
+
+ if (tableType.value === 'old') { // 需要被更换
+ const index = fromListInfo.value.fixedAssetsList.findIndex(item => item.id === data.id)
+ if (index === -1) {
+ fromListInfo.value.fixedAssetsList[listIndex.value] = data
+ fromListInfo.value.applyEquipmentList[listIndex.value].equipmentId = data.id
+ fromListInfo.value.applyEquipmentList[listIndex.value].standardApplyId = infoId.value || ''
+ }
+ else {
+ ElMessage.warning('该设备已存在')
+ }
}
- else {
- ElMessage.warning('该设备已存在')
+
+ if (tableType.value === 'new') { // 更换为
+ const index = fromListInfo.value.newFixedAssetsList.findIndex(item => item.id === data.id)
+ if (index === -1) {
+ fromListInfo.value.newFixedAssetsList[listNewIndex.value] = data
+ fromListInfo.value.newApplyEquipmentList[listNewIndex.value].equipmentId = data.id
+ fromListInfo.value.newApplyEquipmentList[listNewIndex.value].standardApplyId = infoId.value || ''
+ }
+ else {
+ ElMessage.warning('该设备已存在')
+ }
}
}
-
// -------------------------------------------------------------------------------------
// 点击文件预览
@@ -470,7 +528,25 @@
// 拿到当前的标准设备id
fromListInfo.value.standardEquipmentId = res.data.id
// 拿到当前的设备信息
- fromListInfo.value.fixedAssetsList = res.data.fixedAssetsList
+ // fromListInfo.value.fixedAssetsList = res.data.fixedAssetsList
+ // 需要更换的表格
+ if (res.data.oldSupportEquipmentList && res.data.oldSupportEquipmentList.length) {
+ fromListInfo.value.fixedAssetsList = res.data.oldSupportEquipmentList.map((item: any) => {
+ return {
+ ...item,
+ validDate: item.validDate ? dayjs(item.validDate).format('YYYY-MM-DD') : '',
+ }
+ })
+ }
+ // 更换为的表格
+ if (res.data.newSupportEquipmentList && res.data.newSupportEquipmentList.length) {
+ fromListInfo.value.newFixedAssetsList = res.data.newSupportEquipmentList.map((item: any) => {
+ return {
+ ...item,
+ validDate: item.validDate ? dayjs(item.validDate).format('YYYY-MM-DD') : '',
+ }
+ })
+ }
formInline.value.applyNo = res.data.applyNo // 申请编号
formInline.value.applyName = res.data.applyName // 申请名称
formInline.value.applyTime = res.data.applyTime // 申请时间
@@ -548,7 +624,13 @@
// 添加校验条件
if ($route.meta.title === '更换申请' && fromListInfo.value.fixedAssetsList) {
if (!fromListInfo.value.fixedAssetsList[0]?.id) {
- ElMessage.warning('标准配套设备不能为空')
+ ElMessage.warning('需要更换的标准配套设备不能为空')
+ return false
+ }
+ }
+ if ($route.meta.title === '更换申请' && fromListInfo.value.newFixedAssetsList) {
+ if (!fromListInfo.value.newFixedAssetsList[0]?.id) {
+ ElMessage.warning('更换成的标准配套设备不能为空')
return false
}
}
@@ -573,6 +655,15 @@
fromListInfo.value.fixedAssetsList.splice(index, 1)
}
}
+ // 保存之前清除空行、避免传给后端无用空对象
+ if (fromListInfo.value.newFixedAssetsList && fromListInfo.value.newFixedAssetsList.length) {
+ const index = fromListInfo.value.newFixedAssetsList.findIndex((item: any) => !item.id)
+ if (index !== -1) {
+ fromListInfo.value.newFixedAssetsList.splice(index, 1)
+ }
+ }
+ fromListInfo.value.newSupportEquipmentList = fromListInfo.value.newFixedAssetsList
+ fromListInfo.value.oldSupportEquipmentList = fromListInfo.value.fixedAssetsList
fromListInfo.value.applyName = formInline.value.applyName // 申请名称固定
fromListInfo.value.applyUnit = formInline.value.applyUnit // 申请单位
fromListInfo.value.applyUnitName = formInline.value.applyUnitName // 申请单位名称
@@ -1194,12 +1285,12 @@
-
+
-
+
增加行
-
+
删除行
@@ -1239,7 +1330,64 @@
+ 选择
+
+
+
+
+
+
+
+
+
+
+
+
+ 增加行
+
+
+ 删除行
+
+
+
+
+
+
+
+ *{{ item.text }}
+
+
+
+
+
选择
diff --git a/src/api/business/schedule/interchangeReceipt.ts b/src/api/business/schedule/interchangeReceipt.ts
index 574d62e..df5e257 100644
--- a/src/api/business/schedule/interchangeReceipt.ts
+++ b/src/api/business/schedule/interchangeReceipt.ts
@@ -61,9 +61,18 @@
}
// 关联委托书的且是已收入的样品的列表
+// export function getSampleList(data: ISampleListQuery) {
+// return request({
+// url: `${prefix}/sampleList?offset=${data.offset}&limit=${data.limit}`,
+// method: 'post',
+// data,
+// })
+// }
+
+// 查询样品列表
export function getSampleList(data: ISampleListQuery) {
return request({
- url: `${prefix}/sampleList?offset=${data.offset}&limit=${data.limit}`,
+ url: `/customer/sample/listPageByInterchange?offset=${data.offset}&limit=${data.limit}`,
method: 'post',
data,
})
diff --git a/src/api/customer/sampleList.ts b/src/api/customer/sampleList.ts
index e82a99e..65acbce 100644
--- a/src/api/customer/sampleList.ts
+++ b/src/api/customer/sampleList.ts
@@ -60,18 +60,18 @@
}
// 查询检定记录
-export function getMesureRecords(data: { customerId?: string; sampleId?: string }) {
+export function getMesureRecords(data: { customerId?: string; sampleId?: string; offset: number; limit: number }) {
return request({
- url: `${prefix}/sample/measureRecordsById`,
+ url: `${prefix}/sample/measureRecordsById?offset=${data.offset}&limit=${data.limit}`,
method: 'post',
data,
})
}
// 查询检定证书
-export function getCertification(data: { customerId?: string; sampleId?: string }) {
+export function getCertification(data: { customerId?: string; sampleId?: string; offset: number; limit: number }) {
return request({
- url: '/business/certificateReport/certificateRecordsById',
+ url: `/business/certificateReport/certificateRecordsById?offset=${data.offset}&limit=${data.limit}`,
method: 'post',
data,
})
diff --git a/src/assets/icons/business-board.svg b/src/assets/icons/business-board.svg
new file mode 100644
index 0000000..990fe35
--- /dev/null
+++ b/src/assets/icons/business-board.svg
@@ -0,0 +1 @@
+
diff --git a/src/assets/icons/icon-create.svg b/src/assets/icons/icon-create.svg
new file mode 100644
index 0000000..5d651db
--- /dev/null
+++ b/src/assets/icons/icon-create.svg
@@ -0,0 +1 @@
+
diff --git a/src/router/modules/business.ts b/src/router/modules/business.ts
index be78584..db0b317 100644
--- a/src/router/modules/business.ts
+++ b/src/router/modules/business.ts
@@ -29,6 +29,41 @@
],
},
{
+ path: '/board',
+ component: Layout,
+ redirect: '/board/overdueReminderList',
+ name: 'Board',
+ meta: {
+ title: '业务看板',
+ icon: 'ep:key',
+ auth: '/business/board',
+ },
+ children: [
+ {
+ path: 'overdueReminderList',
+ name: 'OverdueReminderList',
+ component: () => import('@/views/business/board/overdueReminder/list.vue'),
+ meta: {
+ title: '样品超期提醒',
+ icon: 'ep:key',
+ auth: '/business/board/overdueReminder',
+ },
+ },
+ {
+ path: 'overdueReminderDetail/:id',
+ name: 'OverdueReminderDetail',
+ component: () => import('@/views/business/board/overdueReminder/detail.vue'),
+ meta: {
+ title: '样品超期提醒详情',
+ icon: 'ep:key',
+ sidebar: false,
+ breadcrumb: true,
+ activeMenu: '/board/overdueReminderList',
+ },
+ },
+ ],
+ },
+ {
path: '/schedule',
component: Layout,
redirect: '/schedule/orderList',
@@ -374,7 +409,7 @@
{
path: '/:type/:id?',
name: 'taskDetail',
- component: () => import('@/views/business/schedule/certificate/edit.vue'),
+ component: () => import('@/views/business/subpackage/certificate/edit.vue'),
meta: {
title: '分包证书详情',
icon: 'ep:key',
diff --git a/src/views/business/board/overdueReminder/detail.vue b/src/views/business/board/overdueReminder/detail.vue
new file mode 100644
index 0000000..50aa545
--- /dev/null
+++ b/src/views/business/board/overdueReminder/detail.vue
@@ -0,0 +1,543 @@
+
+
+
+
+
+
+
+
+ 关闭
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 无
+
+
+ {{ sampleForm.minioFileName === '' ? '上传' : '更换附件' }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ item.name }}
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/business/board/overdueReminder/list.vue b/src/views/business/board/overdueReminder/list.vue
new file mode 100644
index 0000000..2421546
--- /dev/null
+++ b/src/views/business/board/overdueReminder/list.vue
@@ -0,0 +1,269 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ (listQuery.offset - 1) * listQuery.limit + scope.$index + 1 }}
+
+
+
+
+
+
+
+ 详情
+
+
+ 催办
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/business/board/overdueReminder/overdueReminder_interface.ts b/src/views/business/board/overdueReminder/overdueReminder_interface.ts
new file mode 100644
index 0000000..45bcf9e
--- /dev/null
+++ b/src/views/business/board/overdueReminder/overdueReminder_interface.ts
@@ -0,0 +1,31 @@
+// 筛选
+export interface IListQuery {
+ sampleNo: string // 样品编号
+ sampleName: string // 样品名称
+ orderNo: string // 委托书编号
+ customerNo: string // 委托方代码
+ customerName: string // 委托方名称
+ isUrgent: string // 是否加急
+ sampleBelong: string // 样品属性
+ sampleStatus: string // 分发状态
+ startTime: string // 应检定开始时间
+ endTime: string // 应检定结束时间
+ limit: number
+ offset: number
+}
+// 表格
+export interface IList {
+ id: string // 主键
+ sampleId: string // 样品id
+ sampleNo: string // 样品编号
+ sampleName: string// 样品名称
+ sampleModel: string// 型号
+ manufacturingNo: string// 出厂编号
+ orderId: string // 委托书id
+ orderCode: string// 委托书编号
+ customerNo: string// 委托方代码
+ customerName: string// 委托方名称
+ deliverer: string// 送检人
+ remark: string// 备注
+}
+
diff --git a/src/views/business/schedule/components/terminateDialog.vue b/src/views/business/schedule/components/terminateDialog.vue
index d5f85a0..17c8b15 100644
--- a/src/views/business/schedule/components/terminateDialog.vue
+++ b/src/views/business/schedule/components/terminateDialog.vue
@@ -32,7 +32,7 @@
* @param orderId 委托书id
* @param sampleId 样品id
*/
-function initDialog(row) {
+function initDialog(row: any) {
// dataFormRef.value!.clearValidate()
formData.value.orderId = row.orderId
formData.value.sampleId = row.sampleId
diff --git a/src/views/business/schedule/interchange/interchangeDetail.vue b/src/views/business/schedule/interchange/interchangeDetail.vue
index 789505f..5244f44 100644
--- a/src/views/business/schedule/interchange/interchangeDetail.vue
+++ b/src/views/business/schedule/interchange/interchangeDetail.vue
@@ -4,6 +4,8 @@
import { ElMessage, ElMessageBox } from 'element-plus'
import type { FormInstance, UploadUserFile } from 'element-plus'
import { ref } from 'vue'
+import dayjs from 'dayjs'
+import type { IRecord } from './interchange_interface'
import type { ISampleEdit, Menu, SimpleCertification, SimpleMeasureRecord, dictType } from '@/views/customer/sample/list/sample_list_interface'
import selectCustomer from '@/views/customer/sample/list/selectCustomer.vue'
import showPhoto from '@/views/system/tool/showPhoto.vue'
@@ -13,7 +15,6 @@
import { UploadFile } from '@/api/measure/file'
import type { ICustomer } from '@/views/customer/customerInfo/customer_interface'
import { getDictByCode } from '@/api/system/dict'
-
const textMap: { [key: string]: string } = {
edit: '编辑',
add: '新建',
@@ -27,6 +28,7 @@
const mesureCategoryList = ref([]) // 校检类别
const measureTypeList = ref([]) // 检定方式
const powerVoltageList = ref([]) // 电源电压
+const total = ref(0)
const dataForm: Ref = ref({
id: '',
sampleNo: '', // 样品编号
@@ -86,12 +88,6 @@
powerVoltage: [{ required: true, message: '要求电源电压不能为空', trigger: 'change' }],
}) // 表单验证规则
-// 其他关联数据列表
-const dataList = ref({
- measureRecords: [] as SimpleMeasureRecord[],
- certificationRecords: [] as SimpleCertification[],
-})
-
// 获取字典值
function getDict() {
// 校检类别
@@ -109,11 +105,33 @@
}
getDict()
+// --------------------------检定记录、检定证书-----------------------------------------
+// 其他关联数据列表
+const dataList = ref({
+ measureRecords: [] as SimpleMeasureRecord[],
+ certificationRecords: [] as SimpleCertification[],
+})
+
+const listQuery = ref({
+ sampleId: infoId.value, // 样品id
+ customerId: '', // 客户id
+ offset: 1,
+ limit: 10,
+})
+const totalRecords = ref(0) // 检定记录总条数
+const totalCertifications = ref(0) // 检定证书总条数
// 获取检定记录
const fetchMeasureRecords = (query = null) => {
if (pageType.value === 'detail') {
- getMesureRecords({ sampleId: infoId.value, customerId: '' }).then((res) => {
- dataList.value.measureRecords = res.data.rows
+ getMesureRecords(listQuery.value).then((res) => {
+ dataList.value.measureRecords = res.data.rows.map((item: { orderTime: string; deliverTime: string }) => {
+ return {
+ ...item,
+ orderTime: item.orderTime ? dayjs(item.orderTime).format('YYYY-MM-DD') : '',
+ deliverTime: item.deliverTime ? dayjs(item.deliverTime).format('YYYY-MM-DD') : '',
+ }
+ })
+ totalRecords.value = parseInt(res.data.total)
})
}
}
@@ -121,8 +139,16 @@
// 获取检定证书
const fetchCertifications = (query = null) => {
if (pageType.value === 'detail') {
- getCertification({ sampleId: infoId.value, customerId: '' }).then((res) => {
- dataList.value.certificationRecords = res.data.rows
+ getCertification(listQuery.value).then((res) => {
+ dataList.value.certificationRecords = res.data.rows.map((item: { effectiveDate: string; expirationDate: string }) => {
+ return {
+ ...item,
+ effectiveDate: item.effectiveDate ? dayjs(item.effectiveDate).format('YYYY-MM-DD') : '',
+ expirationDate: item.expirationDate ? dayjs(item.expirationDate).format('YYYY-MM-DD') : '',
+
+ }
+ })
+ totalCertifications.value = parseInt(res.data.total)
})
}
}
@@ -133,11 +159,11 @@
name: '检定记录',
columns: [
{ text: '委托单编号', value: 'orderCode', align: 'center' },
- { text: '委托单日期', value: 'orderTime', align: 'center' },
+ { text: '委托单日期', value: 'orderTime', align: 'center', width: '120' },
{ text: '委托方代码', value: 'customerCode', align: 'center' },
{ text: '委托方名称', value: 'customerName', align: 'center' },
{ text: '送检人', value: 'deliverer', align: 'center' },
- { text: '送检日期', value: 'deliverTime', align: 'center' },
+ { text: '送检日期', value: 'deliverTime', align: 'center', width: '120' },
],
list: 'measureRecords',
pagination: true,
@@ -149,8 +175,8 @@
{ text: '证书编号', value: 'certificationCode', align: 'center' },
{ text: '证书名称', value: 'certificationName', align: 'center' },
{ text: '证书类型', value: 'certificationClassName', align: 'center' },
- { text: '证书出具日期', value: 'effectiveDate', align: 'center' },
- { text: '证书有效期', value: 'expirationDate', align: 'center' },
+ { text: '证书出具日期', value: 'effectiveDate', align: 'center', width: '120' },
+ { text: '证书有效期', value: 'expirationDate', align: 'center', width: '120' },
],
list: 'certificationRecords',
pagination: true,
@@ -162,6 +188,25 @@
const currentMenuObj = computed(() => {
return menu.find(item => item.name === currentMenu.value)
})
+watch(currentMenuObj, () => {
+ listQuery.value.offset = 1
+ currentMenuObj.value?.searchFunc()
+},
+{
+ deep: true,
+ immediate: true,
+})
+
+// 监听检定记录和证书报告页数变化
+const changePage = (val: any) => {
+ if (val.value && currentMenuObj) {
+ listQuery.value.offset = val.value.offset
+ listQuery.value.limit = val.value.limit
+ currentMenuObj.value?.searchFunc()
+ }
+}
+
+// -------------------------------------底部--------------------------------------
// 从路由中获取页面类型参数
const $route = useRoute()
@@ -615,7 +660,8 @@
-
+
+
diff --git a/src/views/business/schedule/interchange/interchangeList.vue b/src/views/business/schedule/interchange/interchangeList.vue
index 61ca5e5..51321f8 100644
--- a/src/views/business/schedule/interchange/interchangeList.vue
+++ b/src/views/business/schedule/interchange/interchangeList.vue
@@ -32,7 +32,7 @@
sampleNo: '', // 样品编号
sampleName: '', // 样品名称
orderNo: '', // 委托书编号
- customerId: '', // 委托方代码
+ customerNo: '', // 委托方代码
startTime: '', // 预计送达开始时间
endTime: '', // 预计送达结束时间
isUrgent: '2', // 是否加急 //2全部
@@ -174,12 +174,12 @@
sampleNo: '', // 样品编号
sampleName: '', // 样品名称
orderNo: '', // 委托书编号
- customerId: '', // 委托方代码
+ customerNo: '', // 委托方代码
startTime: '', // 预计送达开始时间
endTime: '', // 预计送达结束时间
isUrgent: '2', // 是否加急
sampleBelong: '2', // 样品属性
- sampleStatus: '',
+ sampleStatus: '', // 样品状态
offset: 1,
limit: 20,
}
@@ -238,7 +238,7 @@
sampleNo: listQuery.value.sampleNo, // 样品编号
sampleName: listQuery.value.sampleName, // 样品名称
orderNo: listQuery.value.orderNo, // 委托书编号
- customerId: listQuery.value.customerId, // 委托方代码
+ customerNo: listQuery.value.customerNo, // 委托方代码
startTime: listQuery.value.startTime, // 预计送达开始时间
endTime: listQuery.value.endTime, // 预计送达结束时间
isUrgent: listQuery.value.isUrgent, // 是否加急
@@ -363,6 +363,11 @@
$router.push(`/schedule/interchange/${pageType}/${row.sampleId}`)
}
+// 点击生成设备交接单
+const createInterchangeReceipt = () => {
+ $router.push('/schedule/receipt/add')
+}
+
onMounted(async () => {
await getDict() // 字典
if (window.sessionStorage.getItem('interchangeActive')) {
@@ -407,7 +412,7 @@
+
diff --git a/src/views/business/schedule/interchange/interchange_interface.ts b/src/views/business/schedule/interchange/interchange_interface.ts
index f1a3f91..ffa18b0 100644
--- a/src/views/business/schedule/interchange/interchange_interface.ts
+++ b/src/views/business/schedule/interchange/interchange_interface.ts
@@ -4,7 +4,8 @@
sampleNo: string // 样品编号
sampleName: string // 样品名称
orderNo: string // 委托书编号
- customerId: string // 委托方代码
+ customerId?: string // 委托方代码
+ customerNo?: string // 委托方代码
startTime: string // 预计送达开始时间
endTime: string // 预计送达结束时间
isUrgent: string // 是否加急
@@ -35,6 +36,13 @@
orderId: string | number // 委托书id
sampleId: string | number// 样品id
}
+// 检定记录检定证书查询条件
+export interface IRecord {
+ sampleId: string // 样品id
+ customerId: string // 客户id
+ offset: number
+ limit: number
+}
// 检定记录
export interface SimpleMeasureRecord {
diff --git a/src/views/business/schedule/interchangeReceipt/receiptEdit.vue b/src/views/business/schedule/interchangeReceipt/receiptEdit.vue
index c629542..83a076e 100644
--- a/src/views/business/schedule/interchangeReceipt/receiptEdit.vue
+++ b/src/views/business/schedule/interchangeReceipt/receiptEdit.vue
@@ -220,6 +220,7 @@
const confirmCheckoutOrder = (val: Array) => {
if (val && val.length) {
dataForm.value.orderCode = val[0].orderCode // 委托书编号
+ dataForm.value.orderNo = val[0].orderCode // 委托书编号
dataForm.value.orderId = val[0].id // 委托书id
dataForm.value.deliverer = val[0].deliverer // 送检人
dataForm.value.delivererTel = val[0].delivererTel // 送检人
@@ -233,13 +234,17 @@
}
}
-// ------------------------样品-----------------------------
+// ----------------------------------样品----------------------------------------------
// 点击批量增加
const multiAdd = () => {
- if (!dataForm.value.customerNo) {
+ if (!dataForm.value.orderCode) {
ElMessage.warning('请先选择委托书')
return
}
+ if (!dataForm.value.customerNo) {
+ ElMessage.warning('没有委托方代码,请检查')
+ return
+ }
sampleVisible.value = true
}
// 修改委托方对话框显隐
diff --git a/src/views/business/schedule/interchangeReceipt/receiptList-interface.ts b/src/views/business/schedule/interchangeReceipt/receiptList-interface.ts
index b3089b4..4b4432e 100644
--- a/src/views/business/schedule/interchangeReceipt/receiptList-interface.ts
+++ b/src/views/business/schedule/interchangeReceipt/receiptList-interface.ts
@@ -79,6 +79,7 @@
customerId: string // 委托方id
sampleName: string // 样品名称
sampleNo: string // 样品编号
+ customerName: string // 委托方名称
offset: number
limit: number
}
diff --git a/src/views/business/schedule/interchangeReceipt/selectSample.vue b/src/views/business/schedule/interchangeReceipt/selectSample.vue
index 11d3092..6c1cb6c 100644
--- a/src/views/business/schedule/interchangeReceipt/selectSample.vue
+++ b/src/views/business/schedule/interchangeReceipt/selectSample.vue
@@ -25,6 +25,7 @@
customerId: '', // 委托方id
sampleName: '', // 样品名称
sampleNo: '', // 样品编号
+ customerName: '', // 委托方名称
offset: 1,
limit: 20,
})
@@ -36,9 +37,9 @@
{ text: '出厂编号', value: 'manufacturingNo', align: 'center' },
{ text: '委托方代码', value: 'customerNo', align: 'center' },
{ text: '委托方名称', value: 'customerName', align: 'center' },
- { text: '检定周期', value: 'measurePeriod', align: 'center' },
- { text: '上次检定时间', value: 'measureLastTime', align: 'center', width: '180px' },
- { text: '样品状态', value: 'sampleSatusName', align: 'center', width: '80px' },
+ // { text: '检定周期', value: 'measurePeriod', align: 'center' },
+ // { text: '上次检定时间', value: 'measureLastTime', align: 'center', width: '180px' },
+ // { text: '样品状态', value: 'sampleSatusName', align: 'center', width: '80px' },
{ text: '备注', value: 'remark', align: 'center', width: '180px' },
])
// 表格数据
@@ -84,6 +85,7 @@
customerId: '', // 委托方id
sampleName: '', // 样品名称
sampleNo: '', // 样品编号
+ customerName: '', // 委托方名称
offset: 1,
limit: 20,
}
@@ -127,56 +129,55 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ (listQuery.offset - 1) * listQuery.limit + scope.$index + 1 }}
-
-
-
-
-
-
- 确定
-
-
- 取消
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ (listQuery.offset - 1) * listQuery.limit + scope.$index + 1 }}
+
+
-
-
+
+
+
+ 确定
+
+
+ 取消
+
+
+
diff --git a/src/views/business/schedule/order/orderEdit.vue b/src/views/business/schedule/order/orderEdit.vue
index 68ced75..142db45 100644
--- a/src/views/business/schedule/order/orderEdit.vue
+++ b/src/views/business/schedule/order/orderEdit.vue
@@ -313,6 +313,10 @@
// 点击保存
const saveForm = (formEl: FormInstance | undefined) => {
+ if (!list.value.length) {
+ ElMessage.warning('要求样品清单不能为空')
+ return
+ }
// 检查表格是否存在增加行信息没有完善的情况
const result = checkList()
if (result !== 'pass') {
diff --git a/src/views/business/schedule/order/selectSample.vue b/src/views/business/schedule/order/selectSample.vue
index 720a2e3..5c07d92 100644
--- a/src/views/business/schedule/order/selectSample.vue
+++ b/src/views/business/schedule/order/selectSample.vue
@@ -29,8 +29,8 @@
// 查询条件
const listQuery = ref({
- // sampleNo: '', // 样品编号
- // sampleName: '', // 样品名称
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
// sampleModel: '', // 型号
orderId: props.orderId || '', // 委托书id
customerId: props.customerId || '', // 委托方id
@@ -51,8 +51,8 @@
{ text: '委托方代码', value: 'customerNo', align: 'center' },
{ text: '委托方名称', value: 'customerName', align: 'center' },
{ text: '检定周期', value: 'measurePeriod', align: 'center' },
- { text: '上次检定时间', value: 'measureLastTime', align: 'center', width: '180px' },
- { text: '样品状态', value: 'sampleSatusName', align: 'center', width: '80px' },
+ // { text: '上次检定时间', value: 'measureLastTime', align: 'center', width: '180px' },
+ // { text: '样品状态', value: 'sampleSatusName', align: 'center', width: '80px' },
{ text: '备注', value: 'remark', align: 'center', width: '180px' },
])
// 表格数据
@@ -97,12 +97,14 @@
listQuery.value = {
sampleNo: '', // 样品编号
sampleName: '', // 样品名称
- sampleModel: '', // 型号
- customerNo: '', // 委托方代码
- customerName: '', // 委托方名称
- startTime: '', // 检定开始时间
- endTime: '', // 检定结束时间
- overtimeStatus: '', // 样品超期状态 1已超期、0未超期、空字符串 已超期+未超期
+ // sampleModel: '', // 型号
+ orderId: props.orderId || '', // 委托书id
+ customerId: props.customerId || '', // 委托方id
+ customerNo: props.customerNo || '', // 委托方代码
+ // customerName: '', // 委托方名称
+ // startTime: '', // 检定开始时间
+ // endTime: '', // 检定结束时间
+ // overtimeStatus: '', // 样品超期状态 1已超期、0未超期、空字符串 已超期+未超期
offset: 1,
limit: 20,
}
@@ -146,48 +148,57 @@
-
-
-
-
-
-
- 确定
-
-
- 取消
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ (listQuery.offset - 1) * listQuery.limit + scope.$index + 1 }}
+
+
-
-
+
+
+
+ 确定
+
+
+ 取消
+
+
+
+
diff --git a/src/views/business/schedule/task/components/chooseLab.vue b/src/views/business/schedule/task/components/chooseLab.vue
index a8222ac..0dcebfc 100644
--- a/src/views/business/schedule/task/components/chooseLab.vue
+++ b/src/views/business/schedule/task/components/chooseLab.vue
@@ -161,7 +161,6 @@
:columns="columns"
:query="listQuery"
:list-loading="loadingTable"
-
:pagination="false"
size="small"
@multi-select="handleSelectionChange"
@@ -169,6 +168,11 @@
+
+
+ {{ scope.$index + 1 }}
+
+
diff --git a/src/views/business/schedule/task/components/distributeDialog.vue b/src/views/business/schedule/task/components/distributeDialog.vue
index 6474dce..fb6a3f5 100644
--- a/src/views/business/schedule/task/components/distributeDialog.vue
+++ b/src/views/business/schedule/task/components/distributeDialog.vue
@@ -10,7 +10,7 @@
const dialogVisible = ref(false) // 弹窗显示
const sampleId = ref('') // 样品id
const orderId = ref('') // 委托单id
-
+const type = ref('distribute')
// 委托书-证书类别列表
const certificationTypes = ref([])
// 获取字典值
@@ -53,10 +53,16 @@
}
// 初始化弹窗
-const initDialog = (orderid: string, sampleid: string) => {
+const initDialog = (orderid: string, sampleid: string, sampleStatus: string) => {
dialogVisible.value = true
sampleId.value = sampleid
orderId.value = orderid
+ if (sampleStatus === '3') { // 检测中
+ type.value = 'testing'
+ }
+ else if (sampleStatus === '2') { // 待分发
+ type.value = 'distribute'
+ }
getInfo()
}
@@ -105,7 +111,7 @@
批量添加
-
+
确定
diff --git a/src/views/business/schedule/task/components/processConfig.vue b/src/views/business/schedule/task/components/processConfig.vue
index 43f2165..bb66076 100644
--- a/src/views/business/schedule/task/components/processConfig.vue
+++ b/src/views/business/schedule/task/components/processConfig.vue
@@ -56,7 +56,8 @@
if (props.list.length > 0) {
processList.value = props.list as ISchedule[]
}
-})
+},
+{ deep: true, immediate: true })
// 点击添加流程
const processAdd = () => {
@@ -103,6 +104,7 @@
const saveProcess = () => {
const form = {
measureProcessList: processList.value,
+ executiveList: processList.value,
orderId: props.orderId,
sampleId: props.sampleId,
}
@@ -138,7 +140,7 @@
-
+
diff --git a/src/views/business/schedule/task/components/processNode.vue b/src/views/business/schedule/task/components/processNode.vue
index d76d41d..fad76ab 100644
--- a/src/views/business/schedule/task/components/processNode.vue
+++ b/src/views/business/schedule/task/components/processNode.vue
@@ -25,7 +25,7 @@
}
},
},
- // 是否为详情展示页面-暂时无用
+ // 是否为详情展示页面
detail: {
type: Boolean,
default: false,
@@ -111,10 +111,10 @@
{{ props.step }}
-
+
-
+
@@ -122,22 +122,22 @@
检定环节
-
-
+
+
检定人员
-
-
+
+
- 应出具证书 份
+ 应出具证书 份
当前状态{{ processNodeData.measureStatusName }}
diff --git a/src/views/business/schedule/task/taskEdit.vue b/src/views/business/schedule/task/taskEdit.vue
index d64aa23..1d1e04f 100644
--- a/src/views/business/schedule/task/taskEdit.vue
+++ b/src/views/business/schedule/task/taskEdit.vue
@@ -215,8 +215,11 @@
taskForm.value.deliverer = res.data.deliverer // 送检人
taskForm.value.delivererTel = res.data.delivererTel // 送检人联系方式
taskForm.value.measureContent = res.data.measureContent // 检定项目
- taskForm.value.measureProcessList = res.data.measureProcessList
- taskForm.value.measureSendBackList = res.data.measureSendBackList
+ taskForm.value.measureProcessList = res.data.measureProcessList // 检定流程
+ taskForm.value.measureSendBackList = res.data.measureSendBackList // 退回流程
+ console.log('pppppp')
+ console.log(taskForm.value.measureProcessList)
+
// 改用一个接口获取
sampleForm.value = res.data
})
@@ -558,7 +561,11 @@
保存
-->
-
+
+
+
+
+
diff --git a/src/views/business/schedule/task/taskList.vue b/src/views/business/schedule/task/taskList.vue
index 64473c3..0efec98 100644
--- a/src/views/business/schedule/task/taskList.vue
+++ b/src/views/business/schedule/task/taskList.vue
@@ -46,7 +46,7 @@
getDictByCode('sampleStatus').then((response) => {
// 制作右上角的菜单
response.data.forEach((item: dictType) => {
- if (['待分发', '检测中', '检测完成', '已超期(查询使用)'].includes(item.name)) {
+ if (['待分发', '检测中', '检测完成', '已超期'].includes(item.name)) {
if (item.name === '待分发') {
active.value = item.value
activeTitle.value = item.name
@@ -58,6 +58,7 @@
})
}
})
+ console.log('88', menu.value)
if (window.sessionStorage.getItem('taskActive') != null) {
active.value = window.sessionStorage.getItem('taskActive') as string
@@ -99,6 +100,7 @@
// 是否显示当前页,否则跳转第一页
listQuery.value.offset = 1
}
+ listQuery.value.sampleStatus = active.value || '2'
getTaskList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: ITaskList) => {
item.isUrgentName = item.isUrgent == 1 ? '是' : '否'
@@ -146,7 +148,7 @@
// 点击分发, 弹窗
const distributeDialogRef = ref()
const handleDistribute = (row: ITaskList) => {
- distributeDialogRef.value.initDialog(row.orderId, row.sampleId)
+ distributeDialogRef.value.initDialog(row.orderId, row.sampleId, listQuery.value.sampleStatus)
}
// 点击标签绑定
const barCodeBind = ref()
@@ -323,6 +325,7 @@
标签绑定
+
props.columns, () => {
+ console.log(searchQuery.value)
+ searchQuery.value.offset = 1
+})
// 页数发生变化后的操作,可能是页码变化,可能是每页容量变化,此函数必写
const changePage = (val: { size?: number; page?: number }) => {
if (val && val.size) {
diff --git a/src/views/customer/sample/list/edit.vue b/src/views/customer/sample/list/edit.vue
index 207aaff..ae4f0d6 100644
--- a/src/views/customer/sample/list/edit.vue
+++ b/src/views/customer/sample/list/edit.vue
@@ -4,6 +4,7 @@
import { ElMessage, ElMessageBox } from 'element-plus'
import type { FormInstance, UploadUserFile } from 'element-plus'
import { ref } from 'vue'
+import dayjs from 'dayjs'
import type { ISampleEdit, Menu, SimpleCertification, SimpleMeasureRecord, dictType } from './sample_list_interface'
import selectCustomer from './selectCustomer.vue'
import showPhoto from '@/views/system/tool/showPhoto.vue'
@@ -13,7 +14,7 @@
import { UploadFile } from '@/api/measure/file'
import type { ICustomer } from '@/views/customer/customerInfo/customer_interface'
import { getDictByCode } from '@/api/system/dict'
-
+import type { IRecord } from '@/views/business/schedule/interchange/interchange_interface'
const textMap: { [key: string]: string } = {
edit: '编辑',
add: '新建',
@@ -109,11 +110,26 @@
}
getDict()
+const listQuery = ref({
+ sampleId: infoId.value, // 样品id
+ customerId: '', // 客户id
+ offset: 1,
+ limit: 10,
+})
+const totalRecords = ref(0) // 检定记录
+const totalCertifications = ref(0) // 检定证书
// 获取检定记录
const fetchMeasureRecords = (query = null) => {
if (pageType.value === 'detail') {
- getMesureRecords({ sampleId: infoId.value, customerId: '' }).then((res) => {
- dataList.value.measureRecords = res.data.rows
+ getMesureRecords(listQuery.value).then((res) => {
+ dataList.value.measureRecords = res.data.rows.map((item: { orderTime: string; deliverTime: string }) => {
+ return {
+ ...item,
+ orderTime: item.orderTime ? dayjs(item.orderTime).format('YYYY-MM-DD') : '',
+ deliverTime: item.deliverTime ? dayjs(item.deliverTime).format('YYYY-MM-DD') : '',
+ }
+ })
+ totalRecords.value = parseInt(res.data.total)
})
}
}
@@ -121,8 +137,16 @@
// 获取检定证书
const fetchCertifications = (query = null) => {
if (pageType.value === 'detail') {
- getCertification({ sampleId: infoId.value, customerId: '' }).then((res) => {
- dataList.value.certificationRecords = res.data.rows
+ getCertification(listQuery.value).then((res) => {
+ dataList.value.certificationRecords = res.data.rows.map((item: { effectiveDate: string; expirationDate: string }) => {
+ return {
+ ...item,
+ effectiveDate: item.effectiveDate ? dayjs(item.effectiveDate).format('YYYY-MM-DD') : '',
+ expirationDate: item.expirationDate ? dayjs(item.expirationDate).format('YYYY-MM-DD') : '',
+
+ }
+ })
+ totalCertifications.value = parseInt(res.data.total)
})
}
}
@@ -133,11 +157,11 @@
name: '检定记录',
columns: [
{ text: '委托单编号', value: 'orderCode', align: 'center' },
- { text: '委托单日期', value: 'orderTime', align: 'center' },
+ { text: '委托单日期', value: 'orderTime', align: 'center', width: '120' },
{ text: '委托方代码', value: 'customerCode', align: 'center' },
{ text: '委托方名称', value: 'customerName', align: 'center' },
{ text: '送检人', value: 'deliverer', align: 'center' },
- { text: '送检日期', value: 'deliverTime', align: 'center' },
+ { text: '送检日期', value: 'deliverTime', align: 'center', width: '120' },
],
list: 'measureRecords',
pagination: true,
@@ -149,8 +173,8 @@
{ text: '证书编号', value: 'certificationCode', align: 'center' },
{ text: '证书名称', value: 'certificationName', align: 'center' },
{ text: '证书类型', value: 'certificationClassName', align: 'center' },
- { text: '证书出具日期', value: 'effectiveDate', align: 'center' },
- { text: '证书有效期', value: 'expirationDate', align: 'center' },
+ { text: '证书出具日期', value: 'effectiveDate', align: 'center', width: '120' },
+ { text: '证书有效期', value: 'expirationDate', align: 'center', width: '120' },
],
list: 'certificationRecords',
pagination: true,
@@ -162,6 +186,23 @@
const currentMenuObj = computed(() => {
return menu.find(item => item.name === currentMenu.value)
})
+watch(currentMenuObj, () => {
+ listQuery.value.offset = 1
+ currentMenuObj.value?.searchFunc()
+},
+{
+ deep: true,
+ immediate: true,
+})
+
+// 监听检定记录和证书报告页数变化
+const changePage = (val: any) => {
+ if (val.value && currentMenuObj) {
+ listQuery.value.offset = val.value.offset
+ listQuery.value.limit = val.value.limit
+ currentMenuObj.value?.searchFunc()
+ }
+}
// 从路由中获取页面类型参数
const $route = useRoute()
@@ -616,7 +657,8 @@
-
+
+
diff --git a/src/views/customer/sample/list/list.vue b/src/views/customer/sample/list/list.vue
index 322a197..434d21c 100644
--- a/src/views/customer/sample/list/list.vue
+++ b/src/views/customer/sample/list/list.vue
@@ -1,3 +1,4 @@
+
@@ -231,12 +267,25 @@
-
+ /> -->
+
+
+
diff --git a/src/views/device/standardEquipment/components/listApply/listPageAdd.vue b/src/views/device/standardEquipment/components/listApply/listPageAdd.vue
index 4668128..88bcb77 100644
--- a/src/views/device/standardEquipment/components/listApply/listPageAdd.vue
+++ b/src/views/device/standardEquipment/components/listApply/listPageAdd.vue
@@ -121,6 +121,8 @@
approvalStatus: '', // 审批状态
applyEquipmentList: [], // 申请设备列表
fixedAssetsList: [], // 申请设备上传列表
+ newApplyEquipmentList: [], // 申请设备列表
+ newFixedAssetsList: [], // 申请设备上传列表
approvalStatusName: '', // 审批状态名称
constructionStandardUnitName: '', // 建标单位名称
createTime: null, // 创建时间
@@ -135,6 +137,8 @@
standardOwner: '', // 标准负责人
taskId: '', // 任务id
minioFileName: [], // 附件
+ newSupportEquipmentList: [], // 替换后的设备列表
+ oldSupportEquipmentList: [], // 需要被替换的设备列表
})
// 下拉框数组类型
interface IOptions {
@@ -392,12 +396,20 @@
// -----------------------------------------------------------------------------------
// 选择标准配套设备
const equipmentDialog = ref()
+const listNewIndex = ref()
+const tableType = ref('old') // 是需要更换的表格还是更换为的表格
// 点击标准配套设备选择按钮
-const chooseList = (row: object, index: number) => {
- listIndex.value = index
+const chooseList = (row: object, index: number, type: string) => {
+ tableType.value = type
+ if (type === 'old') {
+ listIndex.value = index
+ }
+ if (type === 'new') {
+ listNewIndex.value = index
+ }
equipmentDialog.value.initDialog()
}
-// 测试数据
+// 证书测试数据
const simulateObject = {
data: dayjs(`${new Date()}`).format('YYYY.MM.DD'), // 有效日期
certificateNo: '199926465422', // 证书编号
@@ -405,49 +417,95 @@
authorityOfDate: dayjs(`${new Date()}`).format('YYYY.MM.DD'), // 发证日期
}
-// ---------------------------------------操作表格-------------------------------------
+// ---------------------------------------操作表格-需要更换------------------------------------
// 点击增加行
-const addRow = () => {
- // 判断applyEquipmentList上一条数据是否填写
- if (fromListInfo.value.applyEquipmentList.length >= 1 && fromListInfo.value.applyEquipmentList[fromListInfo.value.applyEquipmentList.length - 1].equipmentId === '') {
- ElMessage.warning('请完善上一条设备信息')
+const addRow = (type: string) => {
+ console.log(type)
+
+ if (type === 'old') { // 需要更换
+ // 判断applyEquipmentList上一条数据是否填写
+ if (fromListInfo.value.applyEquipmentList.length >= 1 && fromListInfo.value.applyEquipmentList[fromListInfo.value.applyEquipmentList.length - 1].equipmentId === '') {
+ ElMessage.warning('请完善上一条设备信息')
+ }
+ else {
+ fromListInfo.value.applyEquipmentList.push({
+ equipmentId: '',
+ standardApplyId: '',
+ })
+ fromListInfo.value.fixedAssetsList.push({ id: '' })
+ }
}
- else {
- fromListInfo.value.applyEquipmentList.push({
- equipmentId: '',
- standardApplyId: '',
- })
- fromListInfo.value.fixedAssetsList.push({ id: '' })
+ else { // 更换为
+ // 判断applyEquipmentList上一条数据是否填写
+ if (fromListInfo.value.newApplyEquipmentList.length >= 1 && fromListInfo.value.newApplyEquipmentList[fromListInfo.value.newApplyEquipmentList.length - 1].equipmentId === '') {
+ ElMessage.warning('请完善上一条设备信息')
+ }
+ else {
+ fromListInfo.value.newApplyEquipmentList.push({
+ equipmentId: '',
+ standardApplyId: '',
+ })
+ fromListInfo.value.newFixedAssetsList.push({ id: '' })
+ }
}
}
// 删除行
-const removeRow = () => {
- if (selectionList.value.length > 0) {
- fromListInfo.value.fixedAssetsList = fromListInfo.value.fixedAssetsList.filter((item) => {
- return !selectionList.value.includes(item)
- })
- fromListInfo.value.applyEquipmentList = fromListInfo.value.fixedAssetsList.filter((item) => {
- return !selectionList.value.includes(item)
- })
+const removeRow = (type: string) => {
+ if (type === 'old') { // 需要更换
+ if (selectionList.value.length > 0) {
+ fromListInfo.value.fixedAssetsList = fromListInfo.value.fixedAssetsList.filter((item) => {
+ return !selectionList.value.includes(item)
+ })
+ fromListInfo.value.applyEquipmentList = fromListInfo.value.fixedAssetsList.filter((item) => {
+ return !selectionList.value.includes(item)
+ })
+ }
+ else {
+ ElMessage.warning('请选中')
+ }
}
- else {
- ElMessage.warning('请选中')
+ else { // 更换为
+ if (selectionList.value.length > 0) {
+ fromListInfo.value.newFixedAssetsList = fromListInfo.value.newFixedAssetsList.filter((item) => {
+ return !selectionList.value.includes(item)
+ })
+ fromListInfo.value.newApplyEquipmentList = fromListInfo.value.newFixedAssetsList.filter((item) => {
+ return !selectionList.value.includes(item)
+ })
+ }
+ else {
+ ElMessage.warning('请选中')
+ }
}
}
// 选择好标准配套设备
const equipmentAddRow = (data: IFixedAssetsList) => {
data.validDate = dayjs(data.validDate).format('YYYY-MM-DD') || ''
- const index = fromListInfo.value.fixedAssetsList.findIndex(item => item.id === data.id)
- if (index === -1) {
- fromListInfo.value.fixedAssetsList[listIndex.value] = data
- fromListInfo.value.applyEquipmentList[listIndex.value].equipmentId = data.id
- fromListInfo.value.applyEquipmentList[listIndex.value].standardApplyId = infoId.value || ''
+
+ if (tableType.value === 'old') { // 需要被更换
+ const index = fromListInfo.value.fixedAssetsList.findIndex(item => item.id === data.id)
+ if (index === -1) {
+ fromListInfo.value.fixedAssetsList[listIndex.value] = data
+ fromListInfo.value.applyEquipmentList[listIndex.value].equipmentId = data.id
+ fromListInfo.value.applyEquipmentList[listIndex.value].standardApplyId = infoId.value || ''
+ }
+ else {
+ ElMessage.warning('该设备已存在')
+ }
}
- else {
- ElMessage.warning('该设备已存在')
+
+ if (tableType.value === 'new') { // 更换为
+ const index = fromListInfo.value.newFixedAssetsList.findIndex(item => item.id === data.id)
+ if (index === -1) {
+ fromListInfo.value.newFixedAssetsList[listNewIndex.value] = data
+ fromListInfo.value.newApplyEquipmentList[listNewIndex.value].equipmentId = data.id
+ fromListInfo.value.newApplyEquipmentList[listNewIndex.value].standardApplyId = infoId.value || ''
+ }
+ else {
+ ElMessage.warning('该设备已存在')
+ }
}
}
-
// -------------------------------------------------------------------------------------
// 点击文件预览
@@ -470,7 +528,25 @@
// 拿到当前的标准设备id
fromListInfo.value.standardEquipmentId = res.data.id
// 拿到当前的设备信息
- fromListInfo.value.fixedAssetsList = res.data.fixedAssetsList
+ // fromListInfo.value.fixedAssetsList = res.data.fixedAssetsList
+ // 需要更换的表格
+ if (res.data.oldSupportEquipmentList && res.data.oldSupportEquipmentList.length) {
+ fromListInfo.value.fixedAssetsList = res.data.oldSupportEquipmentList.map((item: any) => {
+ return {
+ ...item,
+ validDate: item.validDate ? dayjs(item.validDate).format('YYYY-MM-DD') : '',
+ }
+ })
+ }
+ // 更换为的表格
+ if (res.data.newSupportEquipmentList && res.data.newSupportEquipmentList.length) {
+ fromListInfo.value.newFixedAssetsList = res.data.newSupportEquipmentList.map((item: any) => {
+ return {
+ ...item,
+ validDate: item.validDate ? dayjs(item.validDate).format('YYYY-MM-DD') : '',
+ }
+ })
+ }
formInline.value.applyNo = res.data.applyNo // 申请编号
formInline.value.applyName = res.data.applyName // 申请名称
formInline.value.applyTime = res.data.applyTime // 申请时间
@@ -548,7 +624,13 @@
// 添加校验条件
if ($route.meta.title === '更换申请' && fromListInfo.value.fixedAssetsList) {
if (!fromListInfo.value.fixedAssetsList[0]?.id) {
- ElMessage.warning('标准配套设备不能为空')
+ ElMessage.warning('需要更换的标准配套设备不能为空')
+ return false
+ }
+ }
+ if ($route.meta.title === '更换申请' && fromListInfo.value.newFixedAssetsList) {
+ if (!fromListInfo.value.newFixedAssetsList[0]?.id) {
+ ElMessage.warning('更换成的标准配套设备不能为空')
return false
}
}
@@ -573,6 +655,15 @@
fromListInfo.value.fixedAssetsList.splice(index, 1)
}
}
+ // 保存之前清除空行、避免传给后端无用空对象
+ if (fromListInfo.value.newFixedAssetsList && fromListInfo.value.newFixedAssetsList.length) {
+ const index = fromListInfo.value.newFixedAssetsList.findIndex((item: any) => !item.id)
+ if (index !== -1) {
+ fromListInfo.value.newFixedAssetsList.splice(index, 1)
+ }
+ }
+ fromListInfo.value.newSupportEquipmentList = fromListInfo.value.newFixedAssetsList
+ fromListInfo.value.oldSupportEquipmentList = fromListInfo.value.fixedAssetsList
fromListInfo.value.applyName = formInline.value.applyName // 申请名称固定
fromListInfo.value.applyUnit = formInline.value.applyUnit // 申请单位
fromListInfo.value.applyUnitName = formInline.value.applyUnitName // 申请单位名称
@@ -1194,12 +1285,12 @@
-
+
-
+
增加行
-
+
删除行
@@ -1239,7 +1330,64 @@
+ 选择
+
+
+
+
+
+
+
+
+
+
+
+
+ 增加行
+
+
+ 删除行
+
+
+
+
+
+
+
+ *{{ item.text }}
+
+
+
+
+
选择
diff --git a/src/views/device/standardEquipment/standard_interface.ts b/src/views/device/standardEquipment/standard_interface.ts
index 3f55a30..953932b 100644
--- a/src/views/device/standardEquipment/standard_interface.ts
+++ b/src/views/device/standardEquipment/standard_interface.ts
@@ -173,6 +173,7 @@
equipmentId?: string
standardApplyId?: string
id?: string
+ standardEquipmentId?: string
}
// 计量人员列表item类型
@@ -221,6 +222,8 @@
approvalStatus: string // 审批状态
applyEquipmentList: IApplyEquipmentList[] // 申请设备列表
fixedAssetsList: IApplyEquipmentList[] // 申请设备上传列表
+ newApplyEquipmentList: IApplyEquipmentList[] // 申请设备列表
+ newFixedAssetsList: IApplyEquipmentList[] // 申请设备上传列表
approvalStatusName: string // 审批状态名称
constructionStandardUnitName: string // 建标单位名称
createTime: null // 创建时间
@@ -235,4 +238,6 @@
standardOwner: string // 标准负责人
taskId: string // 任务id
minioFileName: any // 附件名称数组
+ newSupportEquipmentList: IApplyEquipmentList[] // 替换后的设备列表
+ oldSupportEquipmentList: IApplyEquipmentList[] // 需要被替换的设备列表
}