diff --git a/src/api/measure/source.ts b/src/api/measure/source.ts
index e447f41..8b646b1 100644
--- a/src/api/measure/source.ts
+++ b/src/api/measure/source.ts
@@ -47,7 +47,7 @@
data,
})
}
-// 保存数据
+// 保存至草稿箱
export function sourceSave(data: object) {
return request({
url: `${prefix}/supplier/save`,
@@ -55,6 +55,14 @@
data,
})
}
+// 更新草稿箱文件
+export function sourceDraftUpdate(data: object) {
+ return request({
+ url: `${prefix}/supplier/draftUpdate`,
+ method: 'post',
+ data,
+ })
+}
// 更新数据
export function getSoucreLisUpdate(data: object) {
return request({
diff --git a/src/api/measure/source.ts b/src/api/measure/source.ts
index e447f41..8b646b1 100644
--- a/src/api/measure/source.ts
+++ b/src/api/measure/source.ts
@@ -47,7 +47,7 @@
data,
})
}
-// 保存数据
+// 保存至草稿箱
export function sourceSave(data: object) {
return request({
url: `${prefix}/supplier/save`,
@@ -55,6 +55,14 @@
data,
})
}
+// 更新草稿箱文件
+export function sourceDraftUpdate(data: object) {
+ return request({
+ url: `${prefix}/supplier/draftUpdate`,
+ method: 'post',
+ data,
+ })
+}
// 更新数据
export function getSoucreLisUpdate(data: object) {
return request({
diff --git a/src/router/index.ts b/src/router/index.ts
index 3af58ea..6b9ba93 100644
--- a/src/router/index.ts
+++ b/src/router/index.ts
@@ -136,7 +136,8 @@
to.meta.title && settingsStore.setTitle(typeof to.meta.title === 'function' ? to.meta.title() : to.meta.title)
// 判断当前页面是否开启缓存,如果开启,则将当前页面的 name 信息存入 keep-alive 全局状态
if (to.meta.cache) {
- const componentName = to.matched.at(-1)?.components?.default.name
+ const componentName = to.matched[to.matched.length - 1].components?.default.name
+ // debugger
if (componentName) {
keepAliveStore.add(componentName)
}
@@ -146,7 +147,7 @@
}
// 判断离开页面是否开启缓存,如果开启,则根据缓存规则判断是否需要清空 keep-alive 全局状态里离开页面的 name 信息
if (from.meta.cache) {
- const componentName = from.matched.at(-1)?.components?.default.name
+ const componentName = from.matched[to.matched.length - 1].components?.default.name
if (componentName) {
// 通过 meta.cache 判断针对哪些页面进行缓存
switch (typeof from.meta.cache) {
diff --git a/src/api/measure/source.ts b/src/api/measure/source.ts
index e447f41..8b646b1 100644
--- a/src/api/measure/source.ts
+++ b/src/api/measure/source.ts
@@ -47,7 +47,7 @@
data,
})
}
-// 保存数据
+// 保存至草稿箱
export function sourceSave(data: object) {
return request({
url: `${prefix}/supplier/save`,
@@ -55,6 +55,14 @@
data,
})
}
+// 更新草稿箱文件
+export function sourceDraftUpdate(data: object) {
+ return request({
+ url: `${prefix}/supplier/draftUpdate`,
+ method: 'post',
+ data,
+ })
+}
// 更新数据
export function getSoucreLisUpdate(data: object) {
return request({
diff --git a/src/router/index.ts b/src/router/index.ts
index 3af58ea..6b9ba93 100644
--- a/src/router/index.ts
+++ b/src/router/index.ts
@@ -136,7 +136,8 @@
to.meta.title && settingsStore.setTitle(typeof to.meta.title === 'function' ? to.meta.title() : to.meta.title)
// 判断当前页面是否开启缓存,如果开启,则将当前页面的 name 信息存入 keep-alive 全局状态
if (to.meta.cache) {
- const componentName = to.matched.at(-1)?.components?.default.name
+ const componentName = to.matched[to.matched.length - 1].components?.default.name
+ // debugger
if (componentName) {
keepAliveStore.add(componentName)
}
@@ -146,7 +147,7 @@
}
// 判断离开页面是否开启缓存,如果开启,则根据缓存规则判断是否需要清空 keep-alive 全局状态里离开页面的 name 信息
if (from.meta.cache) {
- const componentName = from.matched.at(-1)?.components?.default.name
+ const componentName = from.matched[to.matched.length - 1].components?.default.name
if (componentName) {
// 通过 meta.cache 判断针对哪些页面进行缓存
switch (typeof from.meta.cache) {
diff --git a/src/router/modules/customer.ts b/src/router/modules/customer.ts
index 88c0f5d..d470c49 100644
--- a/src/router/modules/customer.ts
+++ b/src/router/modules/customer.ts
@@ -65,7 +65,7 @@
path: '/customerManage',
component: Layout,
redirect: '/customerManage/list',
- name: 'MeasureSource',
+ name: 'Customer',
meta: {
title: '客户管理',
icon: 'ep:key',
diff --git a/src/api/measure/source.ts b/src/api/measure/source.ts
index e447f41..8b646b1 100644
--- a/src/api/measure/source.ts
+++ b/src/api/measure/source.ts
@@ -47,7 +47,7 @@
data,
})
}
-// 保存数据
+// 保存至草稿箱
export function sourceSave(data: object) {
return request({
url: `${prefix}/supplier/save`,
@@ -55,6 +55,14 @@
data,
})
}
+// 更新草稿箱文件
+export function sourceDraftUpdate(data: object) {
+ return request({
+ url: `${prefix}/supplier/draftUpdate`,
+ method: 'post',
+ data,
+ })
+}
// 更新数据
export function getSoucreLisUpdate(data: object) {
return request({
diff --git a/src/router/index.ts b/src/router/index.ts
index 3af58ea..6b9ba93 100644
--- a/src/router/index.ts
+++ b/src/router/index.ts
@@ -136,7 +136,8 @@
to.meta.title && settingsStore.setTitle(typeof to.meta.title === 'function' ? to.meta.title() : to.meta.title)
// 判断当前页面是否开启缓存,如果开启,则将当前页面的 name 信息存入 keep-alive 全局状态
if (to.meta.cache) {
- const componentName = to.matched.at(-1)?.components?.default.name
+ const componentName = to.matched[to.matched.length - 1].components?.default.name
+ // debugger
if (componentName) {
keepAliveStore.add(componentName)
}
@@ -146,7 +147,7 @@
}
// 判断离开页面是否开启缓存,如果开启,则根据缓存规则判断是否需要清空 keep-alive 全局状态里离开页面的 name 信息
if (from.meta.cache) {
- const componentName = from.matched.at(-1)?.components?.default.name
+ const componentName = from.matched[to.matched.length - 1].components?.default.name
if (componentName) {
// 通过 meta.cache 判断针对哪些页面进行缓存
switch (typeof from.meta.cache) {
diff --git a/src/router/modules/customer.ts b/src/router/modules/customer.ts
index 88c0f5d..d470c49 100644
--- a/src/router/modules/customer.ts
+++ b/src/router/modules/customer.ts
@@ -65,7 +65,7 @@
path: '/customerManage',
component: Layout,
redirect: '/customerManage/list',
- name: 'MeasureSource',
+ name: 'Customer',
meta: {
title: '客户管理',
icon: 'ep:key',
diff --git a/src/router/modules/measure.ts b/src/router/modules/measure.ts
index 855c6fa..4e41e86 100644
--- a/src/router/modules/measure.ts
+++ b/src/router/modules/measure.ts
@@ -390,7 +390,7 @@
children: [
{
path: 'list',
- name: 'measureSourceList',
+ name: 'MeasureSourceList',
component: () => import('@/views/measure/source/list.vue'),
meta: {
title: '溯源供方列表',
@@ -418,6 +418,7 @@
title: '溯源供方审批',
icon: 'ep:key',
auth: '/measure/measureSource/approve',
+ cache: true,
},
},
{
diff --git a/src/api/measure/source.ts b/src/api/measure/source.ts
index e447f41..8b646b1 100644
--- a/src/api/measure/source.ts
+++ b/src/api/measure/source.ts
@@ -47,7 +47,7 @@
data,
})
}
-// 保存数据
+// 保存至草稿箱
export function sourceSave(data: object) {
return request({
url: `${prefix}/supplier/save`,
@@ -55,6 +55,14 @@
data,
})
}
+// 更新草稿箱文件
+export function sourceDraftUpdate(data: object) {
+ return request({
+ url: `${prefix}/supplier/draftUpdate`,
+ method: 'post',
+ data,
+ })
+}
// 更新数据
export function getSoucreLisUpdate(data: object) {
return request({
diff --git a/src/router/index.ts b/src/router/index.ts
index 3af58ea..6b9ba93 100644
--- a/src/router/index.ts
+++ b/src/router/index.ts
@@ -136,7 +136,8 @@
to.meta.title && settingsStore.setTitle(typeof to.meta.title === 'function' ? to.meta.title() : to.meta.title)
// 判断当前页面是否开启缓存,如果开启,则将当前页面的 name 信息存入 keep-alive 全局状态
if (to.meta.cache) {
- const componentName = to.matched.at(-1)?.components?.default.name
+ const componentName = to.matched[to.matched.length - 1].components?.default.name
+ // debugger
if (componentName) {
keepAliveStore.add(componentName)
}
@@ -146,7 +147,7 @@
}
// 判断离开页面是否开启缓存,如果开启,则根据缓存规则判断是否需要清空 keep-alive 全局状态里离开页面的 name 信息
if (from.meta.cache) {
- const componentName = from.matched.at(-1)?.components?.default.name
+ const componentName = from.matched[to.matched.length - 1].components?.default.name
if (componentName) {
// 通过 meta.cache 判断针对哪些页面进行缓存
switch (typeof from.meta.cache) {
diff --git a/src/router/modules/customer.ts b/src/router/modules/customer.ts
index 88c0f5d..d470c49 100644
--- a/src/router/modules/customer.ts
+++ b/src/router/modules/customer.ts
@@ -65,7 +65,7 @@
path: '/customerManage',
component: Layout,
redirect: '/customerManage/list',
- name: 'MeasureSource',
+ name: 'Customer',
meta: {
title: '客户管理',
icon: 'ep:key',
diff --git a/src/router/modules/measure.ts b/src/router/modules/measure.ts
index 855c6fa..4e41e86 100644
--- a/src/router/modules/measure.ts
+++ b/src/router/modules/measure.ts
@@ -390,7 +390,7 @@
children: [
{
path: 'list',
- name: 'measureSourceList',
+ name: 'MeasureSourceList',
component: () => import('@/views/measure/source/list.vue'),
meta: {
title: '溯源供方列表',
@@ -418,6 +418,7 @@
title: '溯源供方审批',
icon: 'ep:key',
auth: '/measure/measureSource/approve',
+ cache: true,
},
},
{
diff --git a/src/store/modules/dict.ts b/src/store/modules/dict.ts
index 0719c75..be90c53 100644
--- a/src/store/modules/dict.ts
+++ b/src/store/modules/dict.ts
@@ -1,5 +1,8 @@
import type { DeptTreeNode } from '@/views/system/dept/dept-interface'
+interface approvalStatus {
+ [key: string]: string
+}
const useDictStore = defineStore(
'dict',
{
@@ -14,7 +17,7 @@
已通过: '4',
未通过: '5',
已取消: '6',
- }, // 审批状态
+ } as approvalStatus, // 审批状态
}),
getters: {
getAllDeptList: (state) => {
diff --git a/src/api/measure/source.ts b/src/api/measure/source.ts
index e447f41..8b646b1 100644
--- a/src/api/measure/source.ts
+++ b/src/api/measure/source.ts
@@ -47,7 +47,7 @@
data,
})
}
-// 保存数据
+// 保存至草稿箱
export function sourceSave(data: object) {
return request({
url: `${prefix}/supplier/save`,
@@ -55,6 +55,14 @@
data,
})
}
+// 更新草稿箱文件
+export function sourceDraftUpdate(data: object) {
+ return request({
+ url: `${prefix}/supplier/draftUpdate`,
+ method: 'post',
+ data,
+ })
+}
// 更新数据
export function getSoucreLisUpdate(data: object) {
return request({
diff --git a/src/router/index.ts b/src/router/index.ts
index 3af58ea..6b9ba93 100644
--- a/src/router/index.ts
+++ b/src/router/index.ts
@@ -136,7 +136,8 @@
to.meta.title && settingsStore.setTitle(typeof to.meta.title === 'function' ? to.meta.title() : to.meta.title)
// 判断当前页面是否开启缓存,如果开启,则将当前页面的 name 信息存入 keep-alive 全局状态
if (to.meta.cache) {
- const componentName = to.matched.at(-1)?.components?.default.name
+ const componentName = to.matched[to.matched.length - 1].components?.default.name
+ // debugger
if (componentName) {
keepAliveStore.add(componentName)
}
@@ -146,7 +147,7 @@
}
// 判断离开页面是否开启缓存,如果开启,则根据缓存规则判断是否需要清空 keep-alive 全局状态里离开页面的 name 信息
if (from.meta.cache) {
- const componentName = from.matched.at(-1)?.components?.default.name
+ const componentName = from.matched[to.matched.length - 1].components?.default.name
if (componentName) {
// 通过 meta.cache 判断针对哪些页面进行缓存
switch (typeof from.meta.cache) {
diff --git a/src/router/modules/customer.ts b/src/router/modules/customer.ts
index 88c0f5d..d470c49 100644
--- a/src/router/modules/customer.ts
+++ b/src/router/modules/customer.ts
@@ -65,7 +65,7 @@
path: '/customerManage',
component: Layout,
redirect: '/customerManage/list',
- name: 'MeasureSource',
+ name: 'Customer',
meta: {
title: '客户管理',
icon: 'ep:key',
diff --git a/src/router/modules/measure.ts b/src/router/modules/measure.ts
index 855c6fa..4e41e86 100644
--- a/src/router/modules/measure.ts
+++ b/src/router/modules/measure.ts
@@ -390,7 +390,7 @@
children: [
{
path: 'list',
- name: 'measureSourceList',
+ name: 'MeasureSourceList',
component: () => import('@/views/measure/source/list.vue'),
meta: {
title: '溯源供方列表',
@@ -418,6 +418,7 @@
title: '溯源供方审批',
icon: 'ep:key',
auth: '/measure/measureSource/approve',
+ cache: true,
},
},
{
diff --git a/src/store/modules/dict.ts b/src/store/modules/dict.ts
index 0719c75..be90c53 100644
--- a/src/store/modules/dict.ts
+++ b/src/store/modules/dict.ts
@@ -1,5 +1,8 @@
import type { DeptTreeNode } from '@/views/system/dept/dept-interface'
+interface approvalStatus {
+ [key: string]: string
+}
const useDictStore = defineStore(
'dict',
{
@@ -14,7 +17,7 @@
已通过: '4',
未通过: '5',
已取消: '6',
- }, // 审批状态
+ } as approvalStatus, // 审批状态
}),
getters: {
getAllDeptList: (state) => {
diff --git a/src/views/measure/source/approve.vue b/src/views/measure/source/approve.vue
index 9ac8eea..0011ab3 100644
--- a/src/views/measure/source/approve.vue
+++ b/src/views/measure/source/approve.vue
@@ -1,8 +1,9 @@
diff --git a/src/api/measure/source.ts b/src/api/measure/source.ts
index e447f41..8b646b1 100644
--- a/src/api/measure/source.ts
+++ b/src/api/measure/source.ts
@@ -47,7 +47,7 @@
data,
})
}
-// 保存数据
+// 保存至草稿箱
export function sourceSave(data: object) {
return request({
url: `${prefix}/supplier/save`,
@@ -55,6 +55,14 @@
data,
})
}
+// 更新草稿箱文件
+export function sourceDraftUpdate(data: object) {
+ return request({
+ url: `${prefix}/supplier/draftUpdate`,
+ method: 'post',
+ data,
+ })
+}
// 更新数据
export function getSoucreLisUpdate(data: object) {
return request({
diff --git a/src/router/index.ts b/src/router/index.ts
index 3af58ea..6b9ba93 100644
--- a/src/router/index.ts
+++ b/src/router/index.ts
@@ -136,7 +136,8 @@
to.meta.title && settingsStore.setTitle(typeof to.meta.title === 'function' ? to.meta.title() : to.meta.title)
// 判断当前页面是否开启缓存,如果开启,则将当前页面的 name 信息存入 keep-alive 全局状态
if (to.meta.cache) {
- const componentName = to.matched.at(-1)?.components?.default.name
+ const componentName = to.matched[to.matched.length - 1].components?.default.name
+ // debugger
if (componentName) {
keepAliveStore.add(componentName)
}
@@ -146,7 +147,7 @@
}
// 判断离开页面是否开启缓存,如果开启,则根据缓存规则判断是否需要清空 keep-alive 全局状态里离开页面的 name 信息
if (from.meta.cache) {
- const componentName = from.matched.at(-1)?.components?.default.name
+ const componentName = from.matched[to.matched.length - 1].components?.default.name
if (componentName) {
// 通过 meta.cache 判断针对哪些页面进行缓存
switch (typeof from.meta.cache) {
diff --git a/src/router/modules/customer.ts b/src/router/modules/customer.ts
index 88c0f5d..d470c49 100644
--- a/src/router/modules/customer.ts
+++ b/src/router/modules/customer.ts
@@ -65,7 +65,7 @@
path: '/customerManage',
component: Layout,
redirect: '/customerManage/list',
- name: 'MeasureSource',
+ name: 'Customer',
meta: {
title: '客户管理',
icon: 'ep:key',
diff --git a/src/router/modules/measure.ts b/src/router/modules/measure.ts
index 855c6fa..4e41e86 100644
--- a/src/router/modules/measure.ts
+++ b/src/router/modules/measure.ts
@@ -390,7 +390,7 @@
children: [
{
path: 'list',
- name: 'measureSourceList',
+ name: 'MeasureSourceList',
component: () => import('@/views/measure/source/list.vue'),
meta: {
title: '溯源供方列表',
@@ -418,6 +418,7 @@
title: '溯源供方审批',
icon: 'ep:key',
auth: '/measure/measureSource/approve',
+ cache: true,
},
},
{
diff --git a/src/store/modules/dict.ts b/src/store/modules/dict.ts
index 0719c75..be90c53 100644
--- a/src/store/modules/dict.ts
+++ b/src/store/modules/dict.ts
@@ -1,5 +1,8 @@
import type { DeptTreeNode } from '@/views/system/dept/dept-interface'
+interface approvalStatus {
+ [key: string]: string
+}
const useDictStore = defineStore(
'dict',
{
@@ -14,7 +17,7 @@
已通过: '4',
未通过: '5',
已取消: '6',
- }, // 审批状态
+ } as approvalStatus, // 审批状态
}),
getters: {
getAllDeptList: (state) => {
diff --git a/src/views/measure/source/approve.vue b/src/views/measure/source/approve.vue
index 9ac8eea..0011ab3 100644
--- a/src/views/measure/source/approve.vue
+++ b/src/views/measure/source/approve.vue
@@ -1,8 +1,9 @@
diff --git a/src/views/measure/source/components/baseInfoDetail.vue b/src/views/measure/source/components/baseInfoDetail.vue
index 1bbec5b..221bdca 100644
--- a/src/views/measure/source/components/baseInfoDetail.vue
+++ b/src/views/measure/source/components/baseInfoDetail.vue
@@ -14,10 +14,10 @@
},
})
const companyAddress = computed(() => {
- return [props.formData.companyCountry, props.formData.companyProvince, props.formData.companyCity, props.formData.companyArea, props.formData.companyAddress]
+ return [props.formData.companyCountryName, props.formData.companyProvinceName, props.formData.companyCityName, props.formData.companyAreaName, props.formData.companyAddress]
})
const invoiceAddress = computed(() => {
- return [props.formData.invoiceCountry, props.formData.invoiceProvince, props.formData.invoiceCity, props.formData.invoiceArea, props.formData.invoiceAddress]
+ return [props.formData.invoiceCountryName, props.formData.invoiceProvinceName, props.formData.invoiceCityName, props.formData.invoiceAreaName, props.formData.invoiceAddress]
})
const ruleFormRef = ref()
diff --git a/src/api/measure/source.ts b/src/api/measure/source.ts
index e447f41..8b646b1 100644
--- a/src/api/measure/source.ts
+++ b/src/api/measure/source.ts
@@ -47,7 +47,7 @@
data,
})
}
-// 保存数据
+// 保存至草稿箱
export function sourceSave(data: object) {
return request({
url: `${prefix}/supplier/save`,
@@ -55,6 +55,14 @@
data,
})
}
+// 更新草稿箱文件
+export function sourceDraftUpdate(data: object) {
+ return request({
+ url: `${prefix}/supplier/draftUpdate`,
+ method: 'post',
+ data,
+ })
+}
// 更新数据
export function getSoucreLisUpdate(data: object) {
return request({
diff --git a/src/router/index.ts b/src/router/index.ts
index 3af58ea..6b9ba93 100644
--- a/src/router/index.ts
+++ b/src/router/index.ts
@@ -136,7 +136,8 @@
to.meta.title && settingsStore.setTitle(typeof to.meta.title === 'function' ? to.meta.title() : to.meta.title)
// 判断当前页面是否开启缓存,如果开启,则将当前页面的 name 信息存入 keep-alive 全局状态
if (to.meta.cache) {
- const componentName = to.matched.at(-1)?.components?.default.name
+ const componentName = to.matched[to.matched.length - 1].components?.default.name
+ // debugger
if (componentName) {
keepAliveStore.add(componentName)
}
@@ -146,7 +147,7 @@
}
// 判断离开页面是否开启缓存,如果开启,则根据缓存规则判断是否需要清空 keep-alive 全局状态里离开页面的 name 信息
if (from.meta.cache) {
- const componentName = from.matched.at(-1)?.components?.default.name
+ const componentName = from.matched[to.matched.length - 1].components?.default.name
if (componentName) {
// 通过 meta.cache 判断针对哪些页面进行缓存
switch (typeof from.meta.cache) {
diff --git a/src/router/modules/customer.ts b/src/router/modules/customer.ts
index 88c0f5d..d470c49 100644
--- a/src/router/modules/customer.ts
+++ b/src/router/modules/customer.ts
@@ -65,7 +65,7 @@
path: '/customerManage',
component: Layout,
redirect: '/customerManage/list',
- name: 'MeasureSource',
+ name: 'Customer',
meta: {
title: '客户管理',
icon: 'ep:key',
diff --git a/src/router/modules/measure.ts b/src/router/modules/measure.ts
index 855c6fa..4e41e86 100644
--- a/src/router/modules/measure.ts
+++ b/src/router/modules/measure.ts
@@ -390,7 +390,7 @@
children: [
{
path: 'list',
- name: 'measureSourceList',
+ name: 'MeasureSourceList',
component: () => import('@/views/measure/source/list.vue'),
meta: {
title: '溯源供方列表',
@@ -418,6 +418,7 @@
title: '溯源供方审批',
icon: 'ep:key',
auth: '/measure/measureSource/approve',
+ cache: true,
},
},
{
diff --git a/src/store/modules/dict.ts b/src/store/modules/dict.ts
index 0719c75..be90c53 100644
--- a/src/store/modules/dict.ts
+++ b/src/store/modules/dict.ts
@@ -1,5 +1,8 @@
import type { DeptTreeNode } from '@/views/system/dept/dept-interface'
+interface approvalStatus {
+ [key: string]: string
+}
const useDictStore = defineStore(
'dict',
{
@@ -14,7 +17,7 @@
已通过: '4',
未通过: '5',
已取消: '6',
- }, // 审批状态
+ } as approvalStatus, // 审批状态
}),
getters: {
getAllDeptList: (state) => {
diff --git a/src/views/measure/source/approve.vue b/src/views/measure/source/approve.vue
index 9ac8eea..0011ab3 100644
--- a/src/views/measure/source/approve.vue
+++ b/src/views/measure/source/approve.vue
@@ -1,8 +1,9 @@
diff --git a/src/views/measure/source/components/baseInfoDetail.vue b/src/views/measure/source/components/baseInfoDetail.vue
index 1bbec5b..221bdca 100644
--- a/src/views/measure/source/components/baseInfoDetail.vue
+++ b/src/views/measure/source/components/baseInfoDetail.vue
@@ -14,10 +14,10 @@
},
})
const companyAddress = computed(() => {
- return [props.formData.companyCountry, props.formData.companyProvince, props.formData.companyCity, props.formData.companyArea, props.formData.companyAddress]
+ return [props.formData.companyCountryName, props.formData.companyProvinceName, props.formData.companyCityName, props.formData.companyAreaName, props.formData.companyAddress]
})
const invoiceAddress = computed(() => {
- return [props.formData.invoiceCountry, props.formData.invoiceProvince, props.formData.invoiceCity, props.formData.invoiceArea, props.formData.invoiceAddress]
+ return [props.formData.invoiceCountryName, props.formData.invoiceProvinceName, props.formData.invoiceCityName, props.formData.invoiceAreaName, props.formData.invoiceAddress]
})
const ruleFormRef = ref()
diff --git a/src/views/measure/source/components/listApproval.vue b/src/views/measure/source/components/listApproval.vue
index 3880028..e3491d5 100644
--- a/src/views/measure/source/components/listApproval.vue
+++ b/src/views/measure/source/components/listApproval.vue
@@ -47,7 +47,7 @@
const applyShow = ref(false)
// 表头
const columns = ref([
- { text: '溯源供方编号', value: 'supplierNo', width: '120', align: 'center' },
+ { text: '溯源供方编号', value: 'supplierNo', width: '160', align: 'center' },
{ text: '溯源供方名称', value: 'supplierName', width: '120', align: 'center' },
{ text: '业务内容', value: 'businessContent', align: 'center' },
{ text: '业务范围', value: 'businessScope', align: 'center' },
@@ -79,15 +79,15 @@
}
getapprovalListPage(listQuery.value).then((response) => {
list.value = response.data.rows
- list.value = [
- { approvalStatus: '4', approvalStatusName: '已通过', bankAccount: '453', bankAccountNumber: '354', bankName: '543', briefName: '35431', businessContent: '5434', businessScope: '354', companyAddress: '2313', companyArea: '210103', companyCity: '210100', companyCountry: '中国', companyProvince: '210000', createTime: '2022-12-06 17:21:40', director: '354', fax: '354', id: '1600057880174956546', invoiceAddress: '213123', invoiceArea: '150302', invoiceCity: '150300', invoiceCountry: '中国', invoiceProvince: '150000', mailbox: '354', minioFileName: '', mobile: '354', phone: '354', postalCode: '534', remark: '', supplierName: '北京公司2', supplierNo: 'sygf202212060003', taxNumber: '3543', traceSupplierPersonList: [], website: '354' },
- ]
+ // list.value = [
+ // { approvalStatus: '4', approvalStatusName: '已通过', bankAccount: '453', bankAccountNumber: '354', bankName: '543', briefName: '35431', businessContent: '5434', businessScope: '354', companyAddress: '2313', companyArea: '210103', companyCity: '210100', companyCountry: '中国', companyProvince: '210000', createTime: '2022-12-06 17:21:40', director: '354', fax: '354', id: '1600057880174956546', invoiceAddress: '213123', invoiceArea: '150302', invoiceCity: '150300', invoiceCountry: '中国', invoiceProvince: '150000', mailbox: '354', minioFileName: '', mobile: '354', phone: '354', postalCode: '534', remark: '', supplierName: '北京公司2', supplierNo: 'sygf202212060003', taxNumber: '3543', traceSupplierPersonList: [], website: '354' },
+ // ]
total.value = parseInt(response.data.total)
loadingTable.value = false
}).catch((_) => {
- list.value = [
- { approvalStatus: '4', approvalStatusName: '已通过', bankAccount: '453', bankAccountNumber: '354', bankName: '543', briefName: '35431', businessContent: '5434', businessScope: '354', companyAddress: '2313', companyArea: '210103', companyCity: '210100', companyCountry: '中国', companyProvince: '210000', createTime: '2022-12-06 17:21:40', director: '354', fax: '354', id: '1600057880174956546', invoiceAddress: '213123', invoiceArea: '150302', invoiceCity: '150300', invoiceCountry: '中国', invoiceProvince: '150000', mailbox: '354', minioFileName: '', mobile: '354', phone: '354', postalCode: '534', remark: '', supplierName: '北京公司2', supplierNo: 'sygf202212060003', taxNumber: '3543', traceSupplierPersonList: [], website: '354' },
- ]
+ // list.value = [
+ // { approvalStatus: '4', approvalStatusName: '已通过', bankAccount: '453', bankAccountNumber: '354', bankName: '543', briefName: '35431', businessContent: '5434', businessScope: '354', companyAddress: '2313', companyArea: '210103', companyCity: '210100', companyCountry: '中国', companyProvince: '210000', createTime: '2022-12-06 17:21:40', director: '354', fax: '354', id: '1600057880174956546', invoiceAddress: '213123', invoiceArea: '150302', invoiceCity: '150300', invoiceCountry: '中国', invoiceProvince: '150000', mailbox: '354', minioFileName: '', mobile: '354', phone: '354', postalCode: '534', remark: '', supplierName: '北京公司2', supplierNo: 'sygf202212060003', taxNumber: '3543', traceSupplierPersonList: [], website: '354' },
+ // ]
loadingTable.value = false
})
}
diff --git a/src/api/measure/source.ts b/src/api/measure/source.ts
index e447f41..8b646b1 100644
--- a/src/api/measure/source.ts
+++ b/src/api/measure/source.ts
@@ -47,7 +47,7 @@
data,
})
}
-// 保存数据
+// 保存至草稿箱
export function sourceSave(data: object) {
return request({
url: `${prefix}/supplier/save`,
@@ -55,6 +55,14 @@
data,
})
}
+// 更新草稿箱文件
+export function sourceDraftUpdate(data: object) {
+ return request({
+ url: `${prefix}/supplier/draftUpdate`,
+ method: 'post',
+ data,
+ })
+}
// 更新数据
export function getSoucreLisUpdate(data: object) {
return request({
diff --git a/src/router/index.ts b/src/router/index.ts
index 3af58ea..6b9ba93 100644
--- a/src/router/index.ts
+++ b/src/router/index.ts
@@ -136,7 +136,8 @@
to.meta.title && settingsStore.setTitle(typeof to.meta.title === 'function' ? to.meta.title() : to.meta.title)
// 判断当前页面是否开启缓存,如果开启,则将当前页面的 name 信息存入 keep-alive 全局状态
if (to.meta.cache) {
- const componentName = to.matched.at(-1)?.components?.default.name
+ const componentName = to.matched[to.matched.length - 1].components?.default.name
+ // debugger
if (componentName) {
keepAliveStore.add(componentName)
}
@@ -146,7 +147,7 @@
}
// 判断离开页面是否开启缓存,如果开启,则根据缓存规则判断是否需要清空 keep-alive 全局状态里离开页面的 name 信息
if (from.meta.cache) {
- const componentName = from.matched.at(-1)?.components?.default.name
+ const componentName = from.matched[to.matched.length - 1].components?.default.name
if (componentName) {
// 通过 meta.cache 判断针对哪些页面进行缓存
switch (typeof from.meta.cache) {
diff --git a/src/router/modules/customer.ts b/src/router/modules/customer.ts
index 88c0f5d..d470c49 100644
--- a/src/router/modules/customer.ts
+++ b/src/router/modules/customer.ts
@@ -65,7 +65,7 @@
path: '/customerManage',
component: Layout,
redirect: '/customerManage/list',
- name: 'MeasureSource',
+ name: 'Customer',
meta: {
title: '客户管理',
icon: 'ep:key',
diff --git a/src/router/modules/measure.ts b/src/router/modules/measure.ts
index 855c6fa..4e41e86 100644
--- a/src/router/modules/measure.ts
+++ b/src/router/modules/measure.ts
@@ -390,7 +390,7 @@
children: [
{
path: 'list',
- name: 'measureSourceList',
+ name: 'MeasureSourceList',
component: () => import('@/views/measure/source/list.vue'),
meta: {
title: '溯源供方列表',
@@ -418,6 +418,7 @@
title: '溯源供方审批',
icon: 'ep:key',
auth: '/measure/measureSource/approve',
+ cache: true,
},
},
{
diff --git a/src/store/modules/dict.ts b/src/store/modules/dict.ts
index 0719c75..be90c53 100644
--- a/src/store/modules/dict.ts
+++ b/src/store/modules/dict.ts
@@ -1,5 +1,8 @@
import type { DeptTreeNode } from '@/views/system/dept/dept-interface'
+interface approvalStatus {
+ [key: string]: string
+}
const useDictStore = defineStore(
'dict',
{
@@ -14,7 +17,7 @@
已通过: '4',
未通过: '5',
已取消: '6',
- }, // 审批状态
+ } as approvalStatus, // 审批状态
}),
getters: {
getAllDeptList: (state) => {
diff --git a/src/views/measure/source/approve.vue b/src/views/measure/source/approve.vue
index 9ac8eea..0011ab3 100644
--- a/src/views/measure/source/approve.vue
+++ b/src/views/measure/source/approve.vue
@@ -1,8 +1,9 @@
diff --git a/src/views/measure/source/components/baseInfoDetail.vue b/src/views/measure/source/components/baseInfoDetail.vue
index 1bbec5b..221bdca 100644
--- a/src/views/measure/source/components/baseInfoDetail.vue
+++ b/src/views/measure/source/components/baseInfoDetail.vue
@@ -14,10 +14,10 @@
},
})
const companyAddress = computed(() => {
- return [props.formData.companyCountry, props.formData.companyProvince, props.formData.companyCity, props.formData.companyArea, props.formData.companyAddress]
+ return [props.formData.companyCountryName, props.formData.companyProvinceName, props.formData.companyCityName, props.formData.companyAreaName, props.formData.companyAddress]
})
const invoiceAddress = computed(() => {
- return [props.formData.invoiceCountry, props.formData.invoiceProvince, props.formData.invoiceCity, props.formData.invoiceArea, props.formData.invoiceAddress]
+ return [props.formData.invoiceCountryName, props.formData.invoiceProvinceName, props.formData.invoiceCityName, props.formData.invoiceAreaName, props.formData.invoiceAddress]
})
const ruleFormRef = ref()
diff --git a/src/views/measure/source/components/listApproval.vue b/src/views/measure/source/components/listApproval.vue
index 3880028..e3491d5 100644
--- a/src/views/measure/source/components/listApproval.vue
+++ b/src/views/measure/source/components/listApproval.vue
@@ -47,7 +47,7 @@
const applyShow = ref(false)
// 表头
const columns = ref([
- { text: '溯源供方编号', value: 'supplierNo', width: '120', align: 'center' },
+ { text: '溯源供方编号', value: 'supplierNo', width: '160', align: 'center' },
{ text: '溯源供方名称', value: 'supplierName', width: '120', align: 'center' },
{ text: '业务内容', value: 'businessContent', align: 'center' },
{ text: '业务范围', value: 'businessScope', align: 'center' },
@@ -79,15 +79,15 @@
}
getapprovalListPage(listQuery.value).then((response) => {
list.value = response.data.rows
- list.value = [
- { approvalStatus: '4', approvalStatusName: '已通过', bankAccount: '453', bankAccountNumber: '354', bankName: '543', briefName: '35431', businessContent: '5434', businessScope: '354', companyAddress: '2313', companyArea: '210103', companyCity: '210100', companyCountry: '中国', companyProvince: '210000', createTime: '2022-12-06 17:21:40', director: '354', fax: '354', id: '1600057880174956546', invoiceAddress: '213123', invoiceArea: '150302', invoiceCity: '150300', invoiceCountry: '中国', invoiceProvince: '150000', mailbox: '354', minioFileName: '', mobile: '354', phone: '354', postalCode: '534', remark: '', supplierName: '北京公司2', supplierNo: 'sygf202212060003', taxNumber: '3543', traceSupplierPersonList: [], website: '354' },
- ]
+ // list.value = [
+ // { approvalStatus: '4', approvalStatusName: '已通过', bankAccount: '453', bankAccountNumber: '354', bankName: '543', briefName: '35431', businessContent: '5434', businessScope: '354', companyAddress: '2313', companyArea: '210103', companyCity: '210100', companyCountry: '中国', companyProvince: '210000', createTime: '2022-12-06 17:21:40', director: '354', fax: '354', id: '1600057880174956546', invoiceAddress: '213123', invoiceArea: '150302', invoiceCity: '150300', invoiceCountry: '中国', invoiceProvince: '150000', mailbox: '354', minioFileName: '', mobile: '354', phone: '354', postalCode: '534', remark: '', supplierName: '北京公司2', supplierNo: 'sygf202212060003', taxNumber: '3543', traceSupplierPersonList: [], website: '354' },
+ // ]
total.value = parseInt(response.data.total)
loadingTable.value = false
}).catch((_) => {
- list.value = [
- { approvalStatus: '4', approvalStatusName: '已通过', bankAccount: '453', bankAccountNumber: '354', bankName: '543', briefName: '35431', businessContent: '5434', businessScope: '354', companyAddress: '2313', companyArea: '210103', companyCity: '210100', companyCountry: '中国', companyProvince: '210000', createTime: '2022-12-06 17:21:40', director: '354', fax: '354', id: '1600057880174956546', invoiceAddress: '213123', invoiceArea: '150302', invoiceCity: '150300', invoiceCountry: '中国', invoiceProvince: '150000', mailbox: '354', minioFileName: '', mobile: '354', phone: '354', postalCode: '534', remark: '', supplierName: '北京公司2', supplierNo: 'sygf202212060003', taxNumber: '3543', traceSupplierPersonList: [], website: '354' },
- ]
+ // list.value = [
+ // { approvalStatus: '4', approvalStatusName: '已通过', bankAccount: '453', bankAccountNumber: '354', bankName: '543', briefName: '35431', businessContent: '5434', businessScope: '354', companyAddress: '2313', companyArea: '210103', companyCity: '210100', companyCountry: '中国', companyProvince: '210000', createTime: '2022-12-06 17:21:40', director: '354', fax: '354', id: '1600057880174956546', invoiceAddress: '213123', invoiceArea: '150302', invoiceCity: '150300', invoiceCountry: '中国', invoiceProvince: '150000', mailbox: '354', minioFileName: '', mobile: '354', phone: '354', postalCode: '534', remark: '', supplierName: '北京公司2', supplierNo: 'sygf202212060003', taxNumber: '3543', traceSupplierPersonList: [], website: '354' },
+ // ]
loadingTable.value = false
})
}
diff --git a/src/views/measure/source/list.vue b/src/views/measure/source/list.vue
index 28157ad..c36a618 100644
--- a/src/views/measure/source/list.vue
+++ b/src/views/measure/source/list.vue
@@ -9,11 +9,13 @@
import { exportExcel } from '@/utils/exportXlsx'
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
+import { SCHEDULE } from '@/utils/scheduleDict'
// 查询条件
const listQuery: Ref = ref({
supplierNo: '', // 业务内容
supplierName: '', // 溯源供方名称
businessContent: '', // 溯源供方编号
+ formId: SCHEDULE.SUPPLIER_APPROVAL,
offset: 1,
limit: 20,
})
@@ -158,6 +160,7 @@
supplierNo: '', // 业务内容
supplierName: '', // 溯源供方名称
businessContent: '', // 溯源供方编号
+ formId: SCHEDULE.SUPPLIER_APPROVAL,
offset: 1,
limit: 20,
}
diff --git a/src/api/measure/source.ts b/src/api/measure/source.ts
index e447f41..8b646b1 100644
--- a/src/api/measure/source.ts
+++ b/src/api/measure/source.ts
@@ -47,7 +47,7 @@
data,
})
}
-// 保存数据
+// 保存至草稿箱
export function sourceSave(data: object) {
return request({
url: `${prefix}/supplier/save`,
@@ -55,6 +55,14 @@
data,
})
}
+// 更新草稿箱文件
+export function sourceDraftUpdate(data: object) {
+ return request({
+ url: `${prefix}/supplier/draftUpdate`,
+ method: 'post',
+ data,
+ })
+}
// 更新数据
export function getSoucreLisUpdate(data: object) {
return request({
diff --git a/src/router/index.ts b/src/router/index.ts
index 3af58ea..6b9ba93 100644
--- a/src/router/index.ts
+++ b/src/router/index.ts
@@ -136,7 +136,8 @@
to.meta.title && settingsStore.setTitle(typeof to.meta.title === 'function' ? to.meta.title() : to.meta.title)
// 判断当前页面是否开启缓存,如果开启,则将当前页面的 name 信息存入 keep-alive 全局状态
if (to.meta.cache) {
- const componentName = to.matched.at(-1)?.components?.default.name
+ const componentName = to.matched[to.matched.length - 1].components?.default.name
+ // debugger
if (componentName) {
keepAliveStore.add(componentName)
}
@@ -146,7 +147,7 @@
}
// 判断离开页面是否开启缓存,如果开启,则根据缓存规则判断是否需要清空 keep-alive 全局状态里离开页面的 name 信息
if (from.meta.cache) {
- const componentName = from.matched.at(-1)?.components?.default.name
+ const componentName = from.matched[to.matched.length - 1].components?.default.name
if (componentName) {
// 通过 meta.cache 判断针对哪些页面进行缓存
switch (typeof from.meta.cache) {
diff --git a/src/router/modules/customer.ts b/src/router/modules/customer.ts
index 88c0f5d..d470c49 100644
--- a/src/router/modules/customer.ts
+++ b/src/router/modules/customer.ts
@@ -65,7 +65,7 @@
path: '/customerManage',
component: Layout,
redirect: '/customerManage/list',
- name: 'MeasureSource',
+ name: 'Customer',
meta: {
title: '客户管理',
icon: 'ep:key',
diff --git a/src/router/modules/measure.ts b/src/router/modules/measure.ts
index 855c6fa..4e41e86 100644
--- a/src/router/modules/measure.ts
+++ b/src/router/modules/measure.ts
@@ -390,7 +390,7 @@
children: [
{
path: 'list',
- name: 'measureSourceList',
+ name: 'MeasureSourceList',
component: () => import('@/views/measure/source/list.vue'),
meta: {
title: '溯源供方列表',
@@ -418,6 +418,7 @@
title: '溯源供方审批',
icon: 'ep:key',
auth: '/measure/measureSource/approve',
+ cache: true,
},
},
{
diff --git a/src/store/modules/dict.ts b/src/store/modules/dict.ts
index 0719c75..be90c53 100644
--- a/src/store/modules/dict.ts
+++ b/src/store/modules/dict.ts
@@ -1,5 +1,8 @@
import type { DeptTreeNode } from '@/views/system/dept/dept-interface'
+interface approvalStatus {
+ [key: string]: string
+}
const useDictStore = defineStore(
'dict',
{
@@ -14,7 +17,7 @@
已通过: '4',
未通过: '5',
已取消: '6',
- }, // 审批状态
+ } as approvalStatus, // 审批状态
}),
getters: {
getAllDeptList: (state) => {
diff --git a/src/views/measure/source/approve.vue b/src/views/measure/source/approve.vue
index 9ac8eea..0011ab3 100644
--- a/src/views/measure/source/approve.vue
+++ b/src/views/measure/source/approve.vue
@@ -1,8 +1,9 @@
diff --git a/src/views/measure/source/components/baseInfoDetail.vue b/src/views/measure/source/components/baseInfoDetail.vue
index 1bbec5b..221bdca 100644
--- a/src/views/measure/source/components/baseInfoDetail.vue
+++ b/src/views/measure/source/components/baseInfoDetail.vue
@@ -14,10 +14,10 @@
},
})
const companyAddress = computed(() => {
- return [props.formData.companyCountry, props.formData.companyProvince, props.formData.companyCity, props.formData.companyArea, props.formData.companyAddress]
+ return [props.formData.companyCountryName, props.formData.companyProvinceName, props.formData.companyCityName, props.formData.companyAreaName, props.formData.companyAddress]
})
const invoiceAddress = computed(() => {
- return [props.formData.invoiceCountry, props.formData.invoiceProvince, props.formData.invoiceCity, props.formData.invoiceArea, props.formData.invoiceAddress]
+ return [props.formData.invoiceCountryName, props.formData.invoiceProvinceName, props.formData.invoiceCityName, props.formData.invoiceAreaName, props.formData.invoiceAddress]
})
const ruleFormRef = ref()
diff --git a/src/views/measure/source/components/listApproval.vue b/src/views/measure/source/components/listApproval.vue
index 3880028..e3491d5 100644
--- a/src/views/measure/source/components/listApproval.vue
+++ b/src/views/measure/source/components/listApproval.vue
@@ -47,7 +47,7 @@
const applyShow = ref(false)
// 表头
const columns = ref([
- { text: '溯源供方编号', value: 'supplierNo', width: '120', align: 'center' },
+ { text: '溯源供方编号', value: 'supplierNo', width: '160', align: 'center' },
{ text: '溯源供方名称', value: 'supplierName', width: '120', align: 'center' },
{ text: '业务内容', value: 'businessContent', align: 'center' },
{ text: '业务范围', value: 'businessScope', align: 'center' },
@@ -79,15 +79,15 @@
}
getapprovalListPage(listQuery.value).then((response) => {
list.value = response.data.rows
- list.value = [
- { approvalStatus: '4', approvalStatusName: '已通过', bankAccount: '453', bankAccountNumber: '354', bankName: '543', briefName: '35431', businessContent: '5434', businessScope: '354', companyAddress: '2313', companyArea: '210103', companyCity: '210100', companyCountry: '中国', companyProvince: '210000', createTime: '2022-12-06 17:21:40', director: '354', fax: '354', id: '1600057880174956546', invoiceAddress: '213123', invoiceArea: '150302', invoiceCity: '150300', invoiceCountry: '中国', invoiceProvince: '150000', mailbox: '354', minioFileName: '', mobile: '354', phone: '354', postalCode: '534', remark: '', supplierName: '北京公司2', supplierNo: 'sygf202212060003', taxNumber: '3543', traceSupplierPersonList: [], website: '354' },
- ]
+ // list.value = [
+ // { approvalStatus: '4', approvalStatusName: '已通过', bankAccount: '453', bankAccountNumber: '354', bankName: '543', briefName: '35431', businessContent: '5434', businessScope: '354', companyAddress: '2313', companyArea: '210103', companyCity: '210100', companyCountry: '中国', companyProvince: '210000', createTime: '2022-12-06 17:21:40', director: '354', fax: '354', id: '1600057880174956546', invoiceAddress: '213123', invoiceArea: '150302', invoiceCity: '150300', invoiceCountry: '中国', invoiceProvince: '150000', mailbox: '354', minioFileName: '', mobile: '354', phone: '354', postalCode: '534', remark: '', supplierName: '北京公司2', supplierNo: 'sygf202212060003', taxNumber: '3543', traceSupplierPersonList: [], website: '354' },
+ // ]
total.value = parseInt(response.data.total)
loadingTable.value = false
}).catch((_) => {
- list.value = [
- { approvalStatus: '4', approvalStatusName: '已通过', bankAccount: '453', bankAccountNumber: '354', bankName: '543', briefName: '35431', businessContent: '5434', businessScope: '354', companyAddress: '2313', companyArea: '210103', companyCity: '210100', companyCountry: '中国', companyProvince: '210000', createTime: '2022-12-06 17:21:40', director: '354', fax: '354', id: '1600057880174956546', invoiceAddress: '213123', invoiceArea: '150302', invoiceCity: '150300', invoiceCountry: '中国', invoiceProvince: '150000', mailbox: '354', minioFileName: '', mobile: '354', phone: '354', postalCode: '534', remark: '', supplierName: '北京公司2', supplierNo: 'sygf202212060003', taxNumber: '3543', traceSupplierPersonList: [], website: '354' },
- ]
+ // list.value = [
+ // { approvalStatus: '4', approvalStatusName: '已通过', bankAccount: '453', bankAccountNumber: '354', bankName: '543', briefName: '35431', businessContent: '5434', businessScope: '354', companyAddress: '2313', companyArea: '210103', companyCity: '210100', companyCountry: '中国', companyProvince: '210000', createTime: '2022-12-06 17:21:40', director: '354', fax: '354', id: '1600057880174956546', invoiceAddress: '213123', invoiceArea: '150302', invoiceCity: '150300', invoiceCountry: '中国', invoiceProvince: '150000', mailbox: '354', minioFileName: '', mobile: '354', phone: '354', postalCode: '534', remark: '', supplierName: '北京公司2', supplierNo: 'sygf202212060003', taxNumber: '3543', traceSupplierPersonList: [], website: '354' },
+ // ]
loadingTable.value = false
})
}
diff --git a/src/views/measure/source/list.vue b/src/views/measure/source/list.vue
index 28157ad..c36a618 100644
--- a/src/views/measure/source/list.vue
+++ b/src/views/measure/source/list.vue
@@ -9,11 +9,13 @@
import { exportExcel } from '@/utils/exportXlsx'
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
+import { SCHEDULE } from '@/utils/scheduleDict'
// 查询条件
const listQuery: Ref = ref({
supplierNo: '', // 业务内容
supplierName: '', // 溯源供方名称
businessContent: '', // 溯源供方编号
+ formId: SCHEDULE.SUPPLIER_APPROVAL,
offset: 1,
limit: 20,
})
@@ -158,6 +160,7 @@
supplierNo: '', // 业务内容
supplierName: '', // 溯源供方名称
businessContent: '', // 溯源供方编号
+ formId: SCHEDULE.SUPPLIER_APPROVAL,
offset: 1,
limit: 20,
}
diff --git a/src/views/measure/source/listAdd.vue b/src/views/measure/source/listAdd.vue
index a2d1d87..bda1c70 100644
--- a/src/views/measure/source/listAdd.vue
+++ b/src/views/measure/source/listAdd.vue
@@ -9,7 +9,7 @@
import type { ISupplier, traceSupplierPerson } from './list_interface'
import showPhoto from '@/views/system/tool/showPhoto.vue'
import { UploadFile } from '@/api/measure/file'
-import { getSoucreListDetail, getSoucreListlevelType, sourceSave, sourceSubmit } from '@/api/measure/source'
+import { getSoucreListDetail, getSoucreListlevelType, sourceDraftUpdate, sourceSave, sourceSubmit } from '@/api/measure/source'
import { validatePhone } from '@/utils/validate'
import { SCHEDULE } from '@/utils/scheduleDict'
import type { IAddress } from '@/components/AddressSelect/address-interface'
@@ -107,8 +107,18 @@
const getInfo = () => {
getSoucreListDetail({ id: infoId.value }).then((res) => {
formInline.value = res.data
- companyAddress.value = [formInline.value.companyCountry, formInline.value.companyProvince, formInline.value.companyCity, formInline.value.companyArea, formInline.value.companyAddress]
- invoiceAddress.value = [formInline.value.invoiceCountry, formInline.value.invoiceProvince, formInline.value.invoiceCity, formInline.value.invoiceArea, formInline.value.invoiceAddress]
+ // for (const key in formInline.value) {
+ // formInline.value[key] = res.data[key]
+ // }
+ formInline.value.id = infoId.value
+ if (pageType.value !== 'detail') {
+ companyAddress.value = [formInline.value.companyCountry, formInline.value.companyProvince, formInline.value.companyCity, formInline.value.companyArea, formInline.value.companyAddress]
+ invoiceAddress.value = [formInline.value.invoiceCountry, formInline.value.invoiceProvince, formInline.value.invoiceCity, formInline.value.invoiceArea, formInline.value.invoiceAddress]
+ }
+ else {
+ companyAddress.value = [formInline.value.companyCountryName, formInline.value.companyProvinceName, formInline.value.companyCityName, formInline.value.companyAreaName, formInline.value.companyAddress]
+ invoiceAddress.value = [formInline.value.invoiceCountryName, formInline.value.invoiceProvinceName, formInline.value.invoiceCityName, formInline.value.invoiceAreaName, formInline.value.invoiceAddress]
+ }
})
}
// 表格选中
@@ -200,13 +210,22 @@
type: 'warning',
},
).then(() => {
- sourceSave(formInline.value).then((res) => {
- if (res.code === 200) {
- formInline.value.id = res.data.id
- formInline.value.supplierNo = res.data.supplierNo
- ElMessage.success('已保存')
- }
- })
+ if (formInline.value.supplierNo) {
+ sourceDraftUpdate(formInline.value).then((res) => {
+ if (res.code === 200) {
+ ElMessage.success('已保存')
+ }
+ })
+ }
+ else {
+ sourceSave(formInline.value).then((res) => {
+ if (res.code === 200) {
+ formInline.value.id = res.data.id
+ formInline.value.supplierNo = res.data.supplierNo
+ ElMessage.success('已保存')
+ }
+ })
+ }
})
}
})
diff --git a/src/api/measure/source.ts b/src/api/measure/source.ts
index e447f41..8b646b1 100644
--- a/src/api/measure/source.ts
+++ b/src/api/measure/source.ts
@@ -47,7 +47,7 @@
data,
})
}
-// 保存数据
+// 保存至草稿箱
export function sourceSave(data: object) {
return request({
url: `${prefix}/supplier/save`,
@@ -55,6 +55,14 @@
data,
})
}
+// 更新草稿箱文件
+export function sourceDraftUpdate(data: object) {
+ return request({
+ url: `${prefix}/supplier/draftUpdate`,
+ method: 'post',
+ data,
+ })
+}
// 更新数据
export function getSoucreLisUpdate(data: object) {
return request({
diff --git a/src/router/index.ts b/src/router/index.ts
index 3af58ea..6b9ba93 100644
--- a/src/router/index.ts
+++ b/src/router/index.ts
@@ -136,7 +136,8 @@
to.meta.title && settingsStore.setTitle(typeof to.meta.title === 'function' ? to.meta.title() : to.meta.title)
// 判断当前页面是否开启缓存,如果开启,则将当前页面的 name 信息存入 keep-alive 全局状态
if (to.meta.cache) {
- const componentName = to.matched.at(-1)?.components?.default.name
+ const componentName = to.matched[to.matched.length - 1].components?.default.name
+ // debugger
if (componentName) {
keepAliveStore.add(componentName)
}
@@ -146,7 +147,7 @@
}
// 判断离开页面是否开启缓存,如果开启,则根据缓存规则判断是否需要清空 keep-alive 全局状态里离开页面的 name 信息
if (from.meta.cache) {
- const componentName = from.matched.at(-1)?.components?.default.name
+ const componentName = from.matched[to.matched.length - 1].components?.default.name
if (componentName) {
// 通过 meta.cache 判断针对哪些页面进行缓存
switch (typeof from.meta.cache) {
diff --git a/src/router/modules/customer.ts b/src/router/modules/customer.ts
index 88c0f5d..d470c49 100644
--- a/src/router/modules/customer.ts
+++ b/src/router/modules/customer.ts
@@ -65,7 +65,7 @@
path: '/customerManage',
component: Layout,
redirect: '/customerManage/list',
- name: 'MeasureSource',
+ name: 'Customer',
meta: {
title: '客户管理',
icon: 'ep:key',
diff --git a/src/router/modules/measure.ts b/src/router/modules/measure.ts
index 855c6fa..4e41e86 100644
--- a/src/router/modules/measure.ts
+++ b/src/router/modules/measure.ts
@@ -390,7 +390,7 @@
children: [
{
path: 'list',
- name: 'measureSourceList',
+ name: 'MeasureSourceList',
component: () => import('@/views/measure/source/list.vue'),
meta: {
title: '溯源供方列表',
@@ -418,6 +418,7 @@
title: '溯源供方审批',
icon: 'ep:key',
auth: '/measure/measureSource/approve',
+ cache: true,
},
},
{
diff --git a/src/store/modules/dict.ts b/src/store/modules/dict.ts
index 0719c75..be90c53 100644
--- a/src/store/modules/dict.ts
+++ b/src/store/modules/dict.ts
@@ -1,5 +1,8 @@
import type { DeptTreeNode } from '@/views/system/dept/dept-interface'
+interface approvalStatus {
+ [key: string]: string
+}
const useDictStore = defineStore(
'dict',
{
@@ -14,7 +17,7 @@
已通过: '4',
未通过: '5',
已取消: '6',
- }, // 审批状态
+ } as approvalStatus, // 审批状态
}),
getters: {
getAllDeptList: (state) => {
diff --git a/src/views/measure/source/approve.vue b/src/views/measure/source/approve.vue
index 9ac8eea..0011ab3 100644
--- a/src/views/measure/source/approve.vue
+++ b/src/views/measure/source/approve.vue
@@ -1,8 +1,9 @@
diff --git a/src/views/measure/source/components/baseInfoDetail.vue b/src/views/measure/source/components/baseInfoDetail.vue
index 1bbec5b..221bdca 100644
--- a/src/views/measure/source/components/baseInfoDetail.vue
+++ b/src/views/measure/source/components/baseInfoDetail.vue
@@ -14,10 +14,10 @@
},
})
const companyAddress = computed(() => {
- return [props.formData.companyCountry, props.formData.companyProvince, props.formData.companyCity, props.formData.companyArea, props.formData.companyAddress]
+ return [props.formData.companyCountryName, props.formData.companyProvinceName, props.formData.companyCityName, props.formData.companyAreaName, props.formData.companyAddress]
})
const invoiceAddress = computed(() => {
- return [props.formData.invoiceCountry, props.formData.invoiceProvince, props.formData.invoiceCity, props.formData.invoiceArea, props.formData.invoiceAddress]
+ return [props.formData.invoiceCountryName, props.formData.invoiceProvinceName, props.formData.invoiceCityName, props.formData.invoiceAreaName, props.formData.invoiceAddress]
})
const ruleFormRef = ref()
diff --git a/src/views/measure/source/components/listApproval.vue b/src/views/measure/source/components/listApproval.vue
index 3880028..e3491d5 100644
--- a/src/views/measure/source/components/listApproval.vue
+++ b/src/views/measure/source/components/listApproval.vue
@@ -47,7 +47,7 @@
const applyShow = ref(false)
// 表头
const columns = ref([
- { text: '溯源供方编号', value: 'supplierNo', width: '120', align: 'center' },
+ { text: '溯源供方编号', value: 'supplierNo', width: '160', align: 'center' },
{ text: '溯源供方名称', value: 'supplierName', width: '120', align: 'center' },
{ text: '业务内容', value: 'businessContent', align: 'center' },
{ text: '业务范围', value: 'businessScope', align: 'center' },
@@ -79,15 +79,15 @@
}
getapprovalListPage(listQuery.value).then((response) => {
list.value = response.data.rows
- list.value = [
- { approvalStatus: '4', approvalStatusName: '已通过', bankAccount: '453', bankAccountNumber: '354', bankName: '543', briefName: '35431', businessContent: '5434', businessScope: '354', companyAddress: '2313', companyArea: '210103', companyCity: '210100', companyCountry: '中国', companyProvince: '210000', createTime: '2022-12-06 17:21:40', director: '354', fax: '354', id: '1600057880174956546', invoiceAddress: '213123', invoiceArea: '150302', invoiceCity: '150300', invoiceCountry: '中国', invoiceProvince: '150000', mailbox: '354', minioFileName: '', mobile: '354', phone: '354', postalCode: '534', remark: '', supplierName: '北京公司2', supplierNo: 'sygf202212060003', taxNumber: '3543', traceSupplierPersonList: [], website: '354' },
- ]
+ // list.value = [
+ // { approvalStatus: '4', approvalStatusName: '已通过', bankAccount: '453', bankAccountNumber: '354', bankName: '543', briefName: '35431', businessContent: '5434', businessScope: '354', companyAddress: '2313', companyArea: '210103', companyCity: '210100', companyCountry: '中国', companyProvince: '210000', createTime: '2022-12-06 17:21:40', director: '354', fax: '354', id: '1600057880174956546', invoiceAddress: '213123', invoiceArea: '150302', invoiceCity: '150300', invoiceCountry: '中国', invoiceProvince: '150000', mailbox: '354', minioFileName: '', mobile: '354', phone: '354', postalCode: '534', remark: '', supplierName: '北京公司2', supplierNo: 'sygf202212060003', taxNumber: '3543', traceSupplierPersonList: [], website: '354' },
+ // ]
total.value = parseInt(response.data.total)
loadingTable.value = false
}).catch((_) => {
- list.value = [
- { approvalStatus: '4', approvalStatusName: '已通过', bankAccount: '453', bankAccountNumber: '354', bankName: '543', briefName: '35431', businessContent: '5434', businessScope: '354', companyAddress: '2313', companyArea: '210103', companyCity: '210100', companyCountry: '中国', companyProvince: '210000', createTime: '2022-12-06 17:21:40', director: '354', fax: '354', id: '1600057880174956546', invoiceAddress: '213123', invoiceArea: '150302', invoiceCity: '150300', invoiceCountry: '中国', invoiceProvince: '150000', mailbox: '354', minioFileName: '', mobile: '354', phone: '354', postalCode: '534', remark: '', supplierName: '北京公司2', supplierNo: 'sygf202212060003', taxNumber: '3543', traceSupplierPersonList: [], website: '354' },
- ]
+ // list.value = [
+ // { approvalStatus: '4', approvalStatusName: '已通过', bankAccount: '453', bankAccountNumber: '354', bankName: '543', briefName: '35431', businessContent: '5434', businessScope: '354', companyAddress: '2313', companyArea: '210103', companyCity: '210100', companyCountry: '中国', companyProvince: '210000', createTime: '2022-12-06 17:21:40', director: '354', fax: '354', id: '1600057880174956546', invoiceAddress: '213123', invoiceArea: '150302', invoiceCity: '150300', invoiceCountry: '中国', invoiceProvince: '150000', mailbox: '354', minioFileName: '', mobile: '354', phone: '354', postalCode: '534', remark: '', supplierName: '北京公司2', supplierNo: 'sygf202212060003', taxNumber: '3543', traceSupplierPersonList: [], website: '354' },
+ // ]
loadingTable.value = false
})
}
diff --git a/src/views/measure/source/list.vue b/src/views/measure/source/list.vue
index 28157ad..c36a618 100644
--- a/src/views/measure/source/list.vue
+++ b/src/views/measure/source/list.vue
@@ -9,11 +9,13 @@
import { exportExcel } from '@/utils/exportXlsx'
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
+import { SCHEDULE } from '@/utils/scheduleDict'
// 查询条件
const listQuery: Ref = ref({
supplierNo: '', // 业务内容
supplierName: '', // 溯源供方名称
businessContent: '', // 溯源供方编号
+ formId: SCHEDULE.SUPPLIER_APPROVAL,
offset: 1,
limit: 20,
})
@@ -158,6 +160,7 @@
supplierNo: '', // 业务内容
supplierName: '', // 溯源供方名称
businessContent: '', // 溯源供方编号
+ formId: SCHEDULE.SUPPLIER_APPROVAL,
offset: 1,
limit: 20,
}
diff --git a/src/views/measure/source/listAdd.vue b/src/views/measure/source/listAdd.vue
index a2d1d87..bda1c70 100644
--- a/src/views/measure/source/listAdd.vue
+++ b/src/views/measure/source/listAdd.vue
@@ -9,7 +9,7 @@
import type { ISupplier, traceSupplierPerson } from './list_interface'
import showPhoto from '@/views/system/tool/showPhoto.vue'
import { UploadFile } from '@/api/measure/file'
-import { getSoucreListDetail, getSoucreListlevelType, sourceSave, sourceSubmit } from '@/api/measure/source'
+import { getSoucreListDetail, getSoucreListlevelType, sourceDraftUpdate, sourceSave, sourceSubmit } from '@/api/measure/source'
import { validatePhone } from '@/utils/validate'
import { SCHEDULE } from '@/utils/scheduleDict'
import type { IAddress } from '@/components/AddressSelect/address-interface'
@@ -107,8 +107,18 @@
const getInfo = () => {
getSoucreListDetail({ id: infoId.value }).then((res) => {
formInline.value = res.data
- companyAddress.value = [formInline.value.companyCountry, formInline.value.companyProvince, formInline.value.companyCity, formInline.value.companyArea, formInline.value.companyAddress]
- invoiceAddress.value = [formInline.value.invoiceCountry, formInline.value.invoiceProvince, formInline.value.invoiceCity, formInline.value.invoiceArea, formInline.value.invoiceAddress]
+ // for (const key in formInline.value) {
+ // formInline.value[key] = res.data[key]
+ // }
+ formInline.value.id = infoId.value
+ if (pageType.value !== 'detail') {
+ companyAddress.value = [formInline.value.companyCountry, formInline.value.companyProvince, formInline.value.companyCity, formInline.value.companyArea, formInline.value.companyAddress]
+ invoiceAddress.value = [formInline.value.invoiceCountry, formInline.value.invoiceProvince, formInline.value.invoiceCity, formInline.value.invoiceArea, formInline.value.invoiceAddress]
+ }
+ else {
+ companyAddress.value = [formInline.value.companyCountryName, formInline.value.companyProvinceName, formInline.value.companyCityName, formInline.value.companyAreaName, formInline.value.companyAddress]
+ invoiceAddress.value = [formInline.value.invoiceCountryName, formInline.value.invoiceProvinceName, formInline.value.invoiceCityName, formInline.value.invoiceAreaName, formInline.value.invoiceAddress]
+ }
})
}
// 表格选中
@@ -200,13 +210,22 @@
type: 'warning',
},
).then(() => {
- sourceSave(formInline.value).then((res) => {
- if (res.code === 200) {
- formInline.value.id = res.data.id
- formInline.value.supplierNo = res.data.supplierNo
- ElMessage.success('已保存')
- }
- })
+ if (formInline.value.supplierNo) {
+ sourceDraftUpdate(formInline.value).then((res) => {
+ if (res.code === 200) {
+ ElMessage.success('已保存')
+ }
+ })
+ }
+ else {
+ sourceSave(formInline.value).then((res) => {
+ if (res.code === 200) {
+ formInline.value.id = res.data.id
+ formInline.value.supplierNo = res.data.supplierNo
+ ElMessage.success('已保存')
+ }
+ })
+ }
})
}
})
diff --git a/src/views/measure/source/list_interface.ts b/src/views/measure/source/list_interface.ts
index 1ac2abe..7c3efa3 100644
--- a/src/views/measure/source/list_interface.ts
+++ b/src/views/measure/source/list_interface.ts
@@ -5,6 +5,7 @@
logType?: string
offset: number
limit: number
+ formId: string
}
export interface IlistType {