diff --git a/.env.development b/.env.development index 24b7f33..cad65fb 100644 --- a/.env.development +++ b/.env.development @@ -2,7 +2,8 @@ VITE_APP_TITLE = 计量管理系统 # 接口请求地址,会设置到 axios 的 baseURL 参数上 # VITE_APP_API_BASEURL = http://111.198.10.15:11309 -VITE_APP_API_BASEURL = http://111.198.10.15:21409 +# VITE_APP_API_BASEURL = http://111.198.10.15:21409 +VITE_APP_API_BASEURL = http://111.198.10.15:21609 # 调试工具,可设置 eruda 或 vconsole,如果不需要开启则留空 VITE_APP_DEBUG_TOOL = diff --git a/.env.development b/.env.development index 24b7f33..cad65fb 100644 --- a/.env.development +++ b/.env.development @@ -2,7 +2,8 @@ VITE_APP_TITLE = 计量管理系统 # 接口请求地址,会设置到 axios 的 baseURL 参数上 # VITE_APP_API_BASEURL = http://111.198.10.15:11309 -VITE_APP_API_BASEURL = http://111.198.10.15:21409 +# VITE_APP_API_BASEURL = http://111.198.10.15:21409 +VITE_APP_API_BASEURL = http://111.198.10.15:21609 # 调试工具,可设置 eruda 或 vconsole,如果不需要开启则留空 VITE_APP_DEBUG_TOOL = diff --git a/.env.production b/.env.production index 09991f2..b160531 100644 --- a/.env.production +++ b/.env.production @@ -3,6 +3,7 @@ # 页面标题 VITE_APP_TITLE = 计量业务系统 # 接口请求地址,会设置到 axios 的 baseURL 参数上 +# VITE_APP_API_BASEURL = http://111.198.10.15:21609 VITE_APP_API_BASEURL = http://111.198.10.15:21409 # 调试工具,可设置 eruda 或 vconsole,如果不需要开启则留空 VITE_APP_DEBUG_TOOL = diff --git a/.env.development b/.env.development index 24b7f33..cad65fb 100644 --- a/.env.development +++ b/.env.development @@ -2,7 +2,8 @@ VITE_APP_TITLE = 计量管理系统 # 接口请求地址,会设置到 axios 的 baseURL 参数上 # VITE_APP_API_BASEURL = http://111.198.10.15:11309 -VITE_APP_API_BASEURL = http://111.198.10.15:21409 +# VITE_APP_API_BASEURL = http://111.198.10.15:21409 +VITE_APP_API_BASEURL = http://111.198.10.15:21609 # 调试工具,可设置 eruda 或 vconsole,如果不需要开启则留空 VITE_APP_DEBUG_TOOL = diff --git a/.env.production b/.env.production index 09991f2..b160531 100644 --- a/.env.production +++ b/.env.production @@ -3,6 +3,7 @@ # 页面标题 VITE_APP_TITLE = 计量业务系统 # 接口请求地址,会设置到 axios 的 baseURL 参数上 +# VITE_APP_API_BASEURL = http://111.198.10.15:21609 VITE_APP_API_BASEURL = http://111.198.10.15:21409 # 调试工具,可设置 eruda 或 vconsole,如果不需要开启则留空 VITE_APP_DEBUG_TOOL = diff --git a/src/api/customer/sampleList.ts b/src/api/customer/sampleList.ts index 44338aa..5ba0a6d 100644 --- a/src/api/customer/sampleList.ts +++ b/src/api/customer/sampleList.ts @@ -32,3 +32,29 @@ data, }) } + +// 新增数据 +export function addSample(data: object) { + return request({ + url: `${prefix}/sample/submit`, + method: 'post', + data, + }) +} +// 编辑数据 +export function updateSample(data: object) { + return request({ + url: `${prefix}/sample/update`, + method: 'post', + data, + }) +} + +// 查看详情 +export function getSapmleDetail(data: { id: string }) { + return request({ + url: `${prefix}/sample/detail`, + method: 'post', + data, + }) +} diff --git a/.env.development b/.env.development index 24b7f33..cad65fb 100644 --- a/.env.development +++ b/.env.development @@ -2,7 +2,8 @@ VITE_APP_TITLE = 计量管理系统 # 接口请求地址,会设置到 axios 的 baseURL 参数上 # VITE_APP_API_BASEURL = http://111.198.10.15:11309 -VITE_APP_API_BASEURL = http://111.198.10.15:21409 +# VITE_APP_API_BASEURL = http://111.198.10.15:21409 +VITE_APP_API_BASEURL = http://111.198.10.15:21609 # 调试工具,可设置 eruda 或 vconsole,如果不需要开启则留空 VITE_APP_DEBUG_TOOL = diff --git a/.env.production b/.env.production index 09991f2..b160531 100644 --- a/.env.production +++ b/.env.production @@ -3,6 +3,7 @@ # 页面标题 VITE_APP_TITLE = 计量业务系统 # 接口请求地址,会设置到 axios 的 baseURL 参数上 +# VITE_APP_API_BASEURL = http://111.198.10.15:21609 VITE_APP_API_BASEURL = http://111.198.10.15:21409 # 调试工具,可设置 eruda 或 vconsole,如果不需要开启则留空 VITE_APP_DEBUG_TOOL = diff --git a/src/api/customer/sampleList.ts b/src/api/customer/sampleList.ts index 44338aa..5ba0a6d 100644 --- a/src/api/customer/sampleList.ts +++ b/src/api/customer/sampleList.ts @@ -32,3 +32,29 @@ data, }) } + +// 新增数据 +export function addSample(data: object) { + return request({ + url: `${prefix}/sample/submit`, + method: 'post', + data, + }) +} +// 编辑数据 +export function updateSample(data: object) { + return request({ + url: `${prefix}/sample/update`, + method: 'post', + data, + }) +} + +// 查看详情 +export function getSapmleDetail(data: { id: string }) { + return request({ + url: `${prefix}/sample/detail`, + method: 'post', + data, + }) +} diff --git a/src/router/modules/customer.ts b/src/router/modules/customer.ts index d470c49..389d4ee 100644 --- a/src/router/modules/customer.ts +++ b/src/router/modules/customer.ts @@ -50,6 +50,42 @@ }, }, { + path: ':type/:id?', + name: 'SampleDetail', + component: () => import('@/views/customer/sample/list/edit.vue'), + meta: { + title: '样品详情', + icon: 'ep:key', + sidebar: false, + breadcrumb: true, + activeMenu: '/sample/list', + }, + }, + // { + // path: 'edit', + // name: 'SampleEdit', + // component: () => import('@/views/customer/sample/list/edit.vue'), + // meta: { + // title: '编辑样品', + // icon: 'ep:key', + // sidebar: false, + // breadcrumb: true, + // activeMenu: '/sample/list', + // }, + // }, + // { + // path: 'detail', + // name: 'SampleDetail', + // component: () => import('@/views/customer/sample/list/detail.vue'), + // meta: { + // title: '样品详情', + // icon: 'ep:key', + // sidebar: false, + // breadcrumb: true, + // activeMenu: '/sample/list', + // }, + // }, + { path: 'overtime', name: 'OvertimeSample', component: () => import('@/views/customer/sample/overTime/list.vue'), diff --git a/.env.development b/.env.development index 24b7f33..cad65fb 100644 --- a/.env.development +++ b/.env.development @@ -2,7 +2,8 @@ VITE_APP_TITLE = 计量管理系统 # 接口请求地址,会设置到 axios 的 baseURL 参数上 # VITE_APP_API_BASEURL = http://111.198.10.15:11309 -VITE_APP_API_BASEURL = http://111.198.10.15:21409 +# VITE_APP_API_BASEURL = http://111.198.10.15:21409 +VITE_APP_API_BASEURL = http://111.198.10.15:21609 # 调试工具,可设置 eruda 或 vconsole,如果不需要开启则留空 VITE_APP_DEBUG_TOOL = diff --git a/.env.production b/.env.production index 09991f2..b160531 100644 --- a/.env.production +++ b/.env.production @@ -3,6 +3,7 @@ # 页面标题 VITE_APP_TITLE = 计量业务系统 # 接口请求地址,会设置到 axios 的 baseURL 参数上 +# VITE_APP_API_BASEURL = http://111.198.10.15:21609 VITE_APP_API_BASEURL = http://111.198.10.15:21409 # 调试工具,可设置 eruda 或 vconsole,如果不需要开启则留空 VITE_APP_DEBUG_TOOL = diff --git a/src/api/customer/sampleList.ts b/src/api/customer/sampleList.ts index 44338aa..5ba0a6d 100644 --- a/src/api/customer/sampleList.ts +++ b/src/api/customer/sampleList.ts @@ -32,3 +32,29 @@ data, }) } + +// 新增数据 +export function addSample(data: object) { + return request({ + url: `${prefix}/sample/submit`, + method: 'post', + data, + }) +} +// 编辑数据 +export function updateSample(data: object) { + return request({ + url: `${prefix}/sample/update`, + method: 'post', + data, + }) +} + +// 查看详情 +export function getSapmleDetail(data: { id: string }) { + return request({ + url: `${prefix}/sample/detail`, + method: 'post', + data, + }) +} diff --git a/src/router/modules/customer.ts b/src/router/modules/customer.ts index d470c49..389d4ee 100644 --- a/src/router/modules/customer.ts +++ b/src/router/modules/customer.ts @@ -50,6 +50,42 @@ }, }, { + path: ':type/:id?', + name: 'SampleDetail', + component: () => import('@/views/customer/sample/list/edit.vue'), + meta: { + title: '样品详情', + icon: 'ep:key', + sidebar: false, + breadcrumb: true, + activeMenu: '/sample/list', + }, + }, + // { + // path: 'edit', + // name: 'SampleEdit', + // component: () => import('@/views/customer/sample/list/edit.vue'), + // meta: { + // title: '编辑样品', + // icon: 'ep:key', + // sidebar: false, + // breadcrumb: true, + // activeMenu: '/sample/list', + // }, + // }, + // { + // path: 'detail', + // name: 'SampleDetail', + // component: () => import('@/views/customer/sample/list/detail.vue'), + // meta: { + // title: '样品详情', + // icon: 'ep:key', + // sidebar: false, + // breadcrumb: true, + // activeMenu: '/sample/list', + // }, + // }, + { path: 'overtime', name: 'OvertimeSample', component: () => import('@/views/customer/sample/overTime/list.vue'), diff --git a/src/views/customer/sample/list/edit.vue b/src/views/customer/sample/list/edit.vue new file mode 100644 index 0000000..e133fdb --- /dev/null +++ b/src/views/customer/sample/list/edit.vue @@ -0,0 +1,713 @@ + + + + + + + diff --git a/.env.development b/.env.development index 24b7f33..cad65fb 100644 --- a/.env.development +++ b/.env.development @@ -2,7 +2,8 @@ VITE_APP_TITLE = 计量管理系统 # 接口请求地址,会设置到 axios 的 baseURL 参数上 # VITE_APP_API_BASEURL = http://111.198.10.15:11309 -VITE_APP_API_BASEURL = http://111.198.10.15:21409 +# VITE_APP_API_BASEURL = http://111.198.10.15:21409 +VITE_APP_API_BASEURL = http://111.198.10.15:21609 # 调试工具,可设置 eruda 或 vconsole,如果不需要开启则留空 VITE_APP_DEBUG_TOOL = diff --git a/.env.production b/.env.production index 09991f2..b160531 100644 --- a/.env.production +++ b/.env.production @@ -3,6 +3,7 @@ # 页面标题 VITE_APP_TITLE = 计量业务系统 # 接口请求地址,会设置到 axios 的 baseURL 参数上 +# VITE_APP_API_BASEURL = http://111.198.10.15:21609 VITE_APP_API_BASEURL = http://111.198.10.15:21409 # 调试工具,可设置 eruda 或 vconsole,如果不需要开启则留空 VITE_APP_DEBUG_TOOL = diff --git a/src/api/customer/sampleList.ts b/src/api/customer/sampleList.ts index 44338aa..5ba0a6d 100644 --- a/src/api/customer/sampleList.ts +++ b/src/api/customer/sampleList.ts @@ -32,3 +32,29 @@ data, }) } + +// 新增数据 +export function addSample(data: object) { + return request({ + url: `${prefix}/sample/submit`, + method: 'post', + data, + }) +} +// 编辑数据 +export function updateSample(data: object) { + return request({ + url: `${prefix}/sample/update`, + method: 'post', + data, + }) +} + +// 查看详情 +export function getSapmleDetail(data: { id: string }) { + return request({ + url: `${prefix}/sample/detail`, + method: 'post', + data, + }) +} diff --git a/src/router/modules/customer.ts b/src/router/modules/customer.ts index d470c49..389d4ee 100644 --- a/src/router/modules/customer.ts +++ b/src/router/modules/customer.ts @@ -50,6 +50,42 @@ }, }, { + path: ':type/:id?', + name: 'SampleDetail', + component: () => import('@/views/customer/sample/list/edit.vue'), + meta: { + title: '样品详情', + icon: 'ep:key', + sidebar: false, + breadcrumb: true, + activeMenu: '/sample/list', + }, + }, + // { + // path: 'edit', + // name: 'SampleEdit', + // component: () => import('@/views/customer/sample/list/edit.vue'), + // meta: { + // title: '编辑样品', + // icon: 'ep:key', + // sidebar: false, + // breadcrumb: true, + // activeMenu: '/sample/list', + // }, + // }, + // { + // path: 'detail', + // name: 'SampleDetail', + // component: () => import('@/views/customer/sample/list/detail.vue'), + // meta: { + // title: '样品详情', + // icon: 'ep:key', + // sidebar: false, + // breadcrumb: true, + // activeMenu: '/sample/list', + // }, + // }, + { path: 'overtime', name: 'OvertimeSample', component: () => import('@/views/customer/sample/overTime/list.vue'), diff --git a/src/views/customer/sample/list/edit.vue b/src/views/customer/sample/list/edit.vue new file mode 100644 index 0000000..e133fdb --- /dev/null +++ b/src/views/customer/sample/list/edit.vue @@ -0,0 +1,713 @@ + + + + + + + diff --git a/src/views/customer/sample/list/list.vue b/src/views/customer/sample/list/list.vue index 79f4348..3d46b46 100644 --- a/src/views/customer/sample/list/list.vue +++ b/src/views/customer/sample/list/list.vue @@ -17,8 +17,8 @@ sampleModel: '', // 型号 customerId: '', // 委托方代码 customerName: '', // 委托方名称 - startTime: '1', // 投诉开始时间 - endTime: '1', // 投诉结束时间 + startTime: '1', // 检定开始时间 + endTime: '1', // 检定结束时间 offset: 1, limit: 20, }) @@ -56,19 +56,20 @@ listQuery.value.endTime = timeRange.value[1] as string || '' getSampleList(listQuery.value).then((response) => { // 模拟数据 - response.data.rows = [ - { - id: '1597579843411234817', - sampleNo: '1', // 样品编号 - sampleName: '1', // 样品名称 - sampleModel: '1', // 型号 - evaluationName: '1', // 出厂编号 - customerId: '1', // 委托方代码 - customerName: '1', // 委托方名称 - mesurePeriod: '1', // 检定周期 - effectiveDate: '1', // 上次检定时间 - remark: '备注', // 备注 - }] + + // response.data.rows = [ + // { + // id: '1597579843411234817', + // sampleNo: '1', // 样品编号 + // sampleName: '1', // 样品名称 + // sampleModel: '1', // 型号 + // evaluationName: '1', // 出厂编号 + // customerId: '1', // 委托方代码 + // customerName: '1', // 委托方名称 + // mesurePeriod: '1', // 检定周期 + // effectiveDate: '1', // 上次检定时间 + // remark: '备注', // 备注 + // }] list.value = response.data.rows total.value = parseInt(response.data.total) loadingTable.value = false @@ -81,7 +82,7 @@ // 点击编辑/详情 const handleEdit = (row: ISampleList, pageType: 'edit' | 'detail') => { - $router.push(`/customerManage/advice/${pageType}/${row.id}`) + $router.push(`/sample/${pageType}/${row.id}`) } // 点击删除 const handleDelete = (index: string, row: ISampleList) => { @@ -166,9 +167,9 @@ const uploadAll = () => { fileRef.value.click() } -// 添加客户 +// 新建样品 const add = () => { - $router.push('/customerManage/advice/add') + $router.push('/sample/add') } // 导出 const exportAll = () => { @@ -281,7 +282,7 @@