diff --git a/dist.tar.gz b/dist.tar.gz index 1488d0be..93fbffe3 100644 Binary files a/dist.tar.gz and b/dist.tar.gz differ diff --git a/src/api/setting/account.ts b/src/api/setting/account.ts index cfea0f5a..53760897 100644 --- a/src/api/setting/account.ts +++ b/src/api/setting/account.ts @@ -2,7 +2,7 @@ import request from '@/utils/request' const v = "1.0"; -export function accountList(query: any) { +export function accountList(query: { status?: number, includeDisabled?: boolean, where?: any }) { return request({ url: '/system', method: 'post', @@ -16,8 +16,7 @@ export function accountList(query: any) { } /** - * 新增工号,按手机号复用或创建账号后绑定到当前主体 - * 接口文档:ids(角色组ID数组)为必填项 + * 新增工号 */ export function accountAdd(data: { phone: string @@ -41,7 +40,6 @@ export function accountAdd(data: { /** * 停用工号(不删除账号) - * 接口文档:参数为 employee_id(单个) */ export function accountdelete(data: { employee_id: number }) { return request({ @@ -57,10 +55,9 @@ export function accountdelete(data: { employee_id: number }) { } /** - * 更新工号姓名、头像引用和角色组 ids - * 接口文档:ids 为必填项,整体替换角色组 + * 更新工号 */ -export function accountUpdate(data: { employee_id: number, real_name?: string, file_id?: number, status?: number, email?: string, ids: number[] }) { +export function accountUpdate(data: { employee_id: number, real_name?: string, file_id?: number, ids: number[] }) { return request({ url: '/system', method: 'post', diff --git a/src/api/setting/role.ts b/src/api/setting/role.ts index 51a77cbf..d1a3b445 100644 --- a/src/api/setting/role.ts +++ b/src/api/setting/role.ts @@ -3,10 +3,9 @@ import request from '@/utils/request' const v = "1.0"; /** - * 查询当前主体可分配角色列表,按当前登录工号返回角色选中状态 - * 文档:includeDisabled / includeSystem,不支持 employee_id + * 查询当前登录工号的下级角色列表 */ -export function roleList(data: { includeDisabled?: boolean, includeSystem?: boolean, employee_id?: number }) { +export function roleList(data: { includeDisabled?: boolean, includeSystem?: boolean }) { return request({ url: '/system', method: 'post', @@ -19,7 +18,10 @@ export function roleList(data: { includeDisabled?: boolean, includeSystem?: bool }) } -export function permissionroleList(data: { role_id?: number, includeDisabled?: boolean, includeSystem?: boolean, employee_id?: number }) { +/** + * 查询角色权限列表(全量) + */ +export function permissionroleList(data: { role_id?: number, type?: string, keyword?: string, includeDisabled?: boolean }) { return request({ url: '/system', method: 'post', diff --git a/src/api/store.ts b/src/api/store.ts index b63f6061..70581e80 100644 --- a/src/api/store.ts +++ b/src/api/store.ts @@ -83,3 +83,64 @@ export function getStoreRoles(data:any) { isSystemApi: true } as any) } + +/** 查询仓货签约列表 */ +export function storeWarehouseList(data: { + counterparty_id?: number + auth_status?: number + use_status?: number + keyword?: string + page?: number + page_size?: number +}) { + return request({ + url: '/system', + method: 'post', + params: { + method: 'storeWarehouse.store.list', + v, + timestamp: new Date().getTime() + }, + data, + isSystemApi: true + } as any) +} + +/** 发起/预览/确认签约 */ +export function storeWarehouseSign(data: { + temp_code?: string + action?: 'preview' | 'confirm' + counterparty_id?: number + remask?: string +}) { + return request({ + url: '/system', + method: 'post', + params: { + method: 'storeWarehouse.store.sign', + v, + timestamp: new Date().getTime() + }, + data, + isSystemApi: true + } as any) +} + +/** 修改签约关系使用状态 */ +export function storeWarehouseUnbind(data: { + id?: number + counterparty_id?: number + use_status?: number +}) { + return request({ + url: '/system', + method: 'post', + params: { + method: 'storeWarehouse.store.unbind', + v, + timestamp: new Date().getTime() + }, + data, + isSystemApi: true + } as any) +} diff --git a/src/lang/en-US.ts b/src/lang/en-US.ts index d7ee150f..6c678686 100644 --- a/src/lang/en-US.ts +++ b/src/lang/en-US.ts @@ -46,7 +46,7 @@ export default { "Material": "Material", "Finance": "Finance", "Warehouse": "Warehouse", - "Store": "Store", + "stores": "Store", "Express": "Express", "Data": "Data", "Video": "Video", @@ -55,6 +55,7 @@ export default { "printTemplate": "Print Template", 'Permission': 'Permission', 'Role':'Role', + // 'StoreIndex':'Store', }, "login": { "title": "Login", diff --git a/src/lang/zh-CN.ts b/src/lang/zh-CN.ts index 38b9c1da..408720b7 100644 --- a/src/lang/zh-CN.ts +++ b/src/lang/zh-CN.ts @@ -46,7 +46,7 @@ export default { "Material": "耗材", "Finance": "财务", "Warehouse": "仓库", - "Store": "货主", + "stores": "货主", "Express": "快递", "Data": "数据", "Video": "录像", @@ -55,6 +55,8 @@ export default { "printTemplate": "打印模板", 'Permission': '权限管理', 'Role':'角色管理', + // 'StoreIndex':'货主', + }, "login": { "title": "登录", diff --git a/src/router/map.ts b/src/router/map.ts index 5193bfb4..78c49732 100644 --- a/src/router/map.ts +++ b/src/router/map.ts @@ -15,6 +15,7 @@ export const componentMap: Record = { 'storage/entry': () => import('@/views/storage/entry/index.vue'), 'storage/inventory': () => import('@/views/storage/inventory/index.vue'), 'storage/stockout': () => import('@/views/storage/stockout/index.vue'), + 'store/index': () => import('@/views/store/index.vue'), 'role/index': () => import('@/views/system/setting/role/index.vue'),'system/setting/role/index': () => import('@/views/system/setting/role/index.vue'), 'system/setting/printTemplate/index': () => import('@/views/system/setting/printTemplate/index.vue'), // 'system/setting/printStation/index': () => import('@/views/system/setting/printStation/index.vue'), diff --git a/src/views/storage/receiving/component/DetailsPanel.vue b/src/views/storage/receiving/component/DetailsPanel.vue index c129c599..d2057b51 100644 --- a/src/views/storage/receiving/component/DetailsPanel.vue +++ b/src/views/storage/receiving/component/DetailsPanel.vue @@ -34,12 +34,19 @@ - + -
-
- -

收货图片占位区

+
+
+
+ +
+
+
+
+ +

暂无收货图片

+
@@ -57,11 +64,15 @@
+ + + 预览 +
+ + \ No newline at end of file diff --git a/src/views/store/store-config.ts b/src/views/store/store-config.ts new file mode 100644 index 00000000..dd389913 --- /dev/null +++ b/src/views/store/store-config.ts @@ -0,0 +1,42 @@ +export const columns = [ + { prop: 'counterparty_name', label: '对方主体', minWidth: 140 }, + { prop: 'current_subject_role', label: '当前角色', width: 90, align: 'center' }, + { prop: 'auth_status', label: '签约状态', width: 100, align: 'center' }, + { prop: 'use_status', label: '使用状态', width: 90, align: 'center' }, + { prop: 'is_auth_valid', label: '授权有效', width: 90, align: 'center' }, + { prop: 'remaining_days', label: '剩余天数', width: 90, align: 'center' }, + { prop: 'apply_time', label: '申请时间', width: 160, align: 'center' }, + { prop: 'actions', label: '操作', width: 120, align: 'center', fixed: 'right' } +] + +export const availableFields = [ + { label: '对方主体', value: 'counterparty_id', type: 'number' }, + { + label: '签约状态', + value: 'auth_status', + type: 'select', + options: [ + { label: '待审核', value: 1 }, + { label: '已通过', value: 2 }, + { label: '已拒绝', value: 3 }, + { label: '已终止', value: 4 } + ] + }, + { + label: '使用状态', + value: 'use_status', + type: 'select', + options: [ + { label: '启用', value: 1 }, + { label: '禁用', value: 0 } + ] + } +] + +export const presetTree: any[] = [] + +export default { + columns, + availableFields, + presetTree +} diff --git a/src/views/system/setting/account/index.vue b/src/views/system/setting/account/index.vue index 7d1542f1..7339c9dd 100644 --- a/src/views/system/setting/account/index.vue +++ b/src/views/system/setting/account/index.vue @@ -305,7 +305,14 @@ const textMap: Record = { create: '新增工号' } -const rules = accountRules +const rules = computed(() => { + const baseRules = { ...accountRules } + // 编辑状态下,手机号不可修改且允许为空(不校验必填) + if (dialogStatus.value === 'update') { + baseRules.phone = baseRules.phone.filter(r => !r.required) + } + return baseRules +}) const flattenRoles = (rawRoles: any[]) => { const tempMap = new Map() @@ -367,7 +374,6 @@ const createData = async () => { await dataForm.value.validate(async (valid: boolean) => { if (!valid) return try { - // 按接口文档,accountAdd 需传 phone, real_name, ids(必填), username, password, email const { phone, real_name, username, password, email, role_ids } = temp await accountAdd({ phone, real_name, ids: role_ids, username, password, email }) dialogFormVisible.value = false @@ -396,9 +402,15 @@ const updateData = async () => { await dataForm.value.validate(async (valid: boolean) => { if (!valid) return try { - // 按接口文档,accountUpdate 需传 employee_id, real_name, file_id, ids(必填) 等 - const { employee_id, real_name, file_id, email, role_ids } = temp - await accountUpdate({ employee_id: employee_id!, real_name, file_id, email, ids: role_ids }) + const { employee_id, real_name, file_id, role_ids } = temp + // 接口文档 setting.account.update 仅支持 employee_id, real_name, file_id, ids + // 手机号 (phone) 在接口中不可修改,因此更新时不传 + await accountUpdate({ + employee_id: employee_id!, + real_name, + file_id, + ids: role_ids + }) dialogFormVisible.value = false ElMessage.success('更新成功') getList() @@ -414,7 +426,6 @@ const handleDelete = (row: any) => { cancelButtonText: '取消', type: 'warning' }).then(async () => { - // 按接口文档,accountdelete 需传 employee_id: number(单个) await accountdelete({ employee_id: row.employee_id }) ElMessage.success('已停用') getList() @@ -428,7 +439,7 @@ const handleEnable = (row: any) => { type: 'info' }).then(async () => { // 启用时保留原有角色组,ids 必传 - await accountUpdate({ employee_id: row.employee_id, status: 1, ids: row.role_ids || [] }) + await accountUpdate({ employee_id: row.employee_id, ids: row.role_ids || [] }) ElMessage.success('已启用') getList() }) diff --git a/src/views/system/setting/permission/index.vue b/src/views/system/setting/permission/index.vue index 34f7ab01..a1651663 100644 --- a/src/views/system/setting/permission/index.vue +++ b/src/views/system/setting/permission/index.vue @@ -46,6 +46,7 @@ +