diff --git a/.env.production b/.env.production
index e439126..3baf54e 100644
--- a/.env.production
+++ b/.env.production
@@ -28,10 +28,10 @@ VITE_SOURCEMAP=false
VITE_BASE_PATH=/
# 输出路径
-VITE_OUT_DIR=dist-test
+VITE_OUT_DIR=eam
# 自定义接口路径
-VITE_INTERFACE_URL='http://dev.ccwin-in.com:25110/magic/web/index.html'
+VITE_INTERFACE_URL='http://10.62.193.15:25110/magic/web/index.html'
# 积木报表请求路径
-VITE_JMREPORT_BASE_URL='http://dev.ccwin-in.com:25110'
+VITE_JMREPORT_BASE_URL='http://10.62.193.15:25110'
diff --git a/.env.test b/.env.test
index 84edcdf..f8d316c 100644
--- a/.env.test
+++ b/.env.test
@@ -4,10 +4,10 @@ NODE_ENV=test
VITE_DEV=false
# 请求路径
-VITE_BASE_URL='http://dev.ccwin-in.com:25100/api'
+VITE_BASE_URL='http://dev.ccwin-in.com:25200/api'
# 上传路径
-VITE_UPLOAD_URL='http://dev.ccwin-in.com:25100/api/admin-api/infra/file/upload'
+VITE_UPLOAD_URL='http://dev.ccwin-in.com:25200/api/admin-api/infra/file/upload'
# 接口前缀
VITE_API_BASEPATH=
@@ -28,10 +28,10 @@ VITE_SOURCEMAP=false
VITE_BASE_PATH=/
# 输出路径
-VITE_OUT_DIR=dist-test
+VITE_OUT_DIR=eam
# 自定义接口路径
-VITE_INTERFACE_URL='http://dev.ccwin-in.com:25110/magic/web/index.html'
+VITE_INTERFACE_URL='http://dev.ccwin-in.com:25210/magic/web/index.html'
# 积木报表请求路径
-VITE_JMREPORT_BASE_URL='http://dev.ccwin-in.com:25110'
+VITE_JMREPORT_BASE_URL='http://dev.ccwin-in.com:25210'
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 0000000..ed98c22
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,7 @@
+# 设置基础镜像
+FROM nginx:WIN-1.25.3
+
+WORKDIR /opt/eam
+COPY nginx.conf /usr/local/nginx/conf/nginx.conf
+# 将dist文件中的内容复制到 /opt/eam 这个目录下面
+COPY eam/ /opt/eam
diff --git a/nginx.conf b/nginx.conf
new file mode 100644
index 0000000..1e179e1
--- /dev/null
+++ b/nginx.conf
@@ -0,0 +1,61 @@
+user root;
+worker_processes 2;
+
+events {
+ worker_connections 1024;
+}
+
+http {
+ include mime.types;
+ charset utf-8,gbk;
+ default_type application/octet-stream;
+ log_format main '$remote_addr - $remote_user [$time_local] "$request" '
+ '$status $body_bytes_sent "$http_referer" '
+ '"$http_user_agent" "$http_x_forwarded_for" "$request_time $upstream_response_time"';
+
+ proxy_cache_path /opt/nginx_cache/ levels=1:2 keys_zone=my_zone:10m inactive=300s max_size=5g;
+ access_log logs/access.log main;
+ sendfile on;
+ #tcp_nopush on;
+ keepalive_timeout 600s;
+ client_max_body_size 200m;
+ gzip on;
+ gzip_min_length 10k;
+ gzip_comp_level 9;
+ gzip_buffers 4 16k;
+ gzip_types text/plain application/javascript text/css application/xml text/javascript image/jpeg image/gif image/png;
+ gzip_vary on;
+ gzip_disable "MSIE [1-6]\.";
+ upstream eam {
+ server localhost:25210 weight=10 max_fails=3 fail_timeout=10s;
+ }
+ server {
+ listen 25200;
+ server_name_in_redirect off;
+ server_name dev.ccwin-in.com;
+ location /api/ {
+ proxy_pass http://eam/;
+ proxy_next_upstream http_500 http_502 http_503 http_504 error timeout invalid_header;
+ proxy_set_header X-Forwared-For $proxy_add_x_forwarded_for;
+ proxy_set_header Host $http_host;
+ proxy_set_header X-Real-IP $remote_addr;
+ proxy_set_header X-Forwarded-For $http_x_forwarded_for;
+ }
+ location /profile/ {
+ proxy_cache my_zone;
+ proxy_cache_valid 200 304 12h;
+ proxy_cache_key $host$uri$is_args$args;
+ alias /opt/profile/;
+ index index.html index.htm;
+ }
+ location / {
+ proxy_cache my_zone;
+ proxy_cache_valid 200 304 12h;
+ proxy_cache_key $host$uri$is_args$args;
+ try_files $uri $uri/ /index.html;
+ root /opt/eam;
+ index index.html index.htm;
+ }
+ }
+}
+
diff --git a/src/api/eam/item/itemApplyMain/index.ts b/src/api/eam/item/itemApplyMain/index.ts
index fd0e19e..af82f15 100644
--- a/src/api/eam/item/itemApplyMain/index.ts
+++ b/src/api/eam/item/itemApplyMain/index.ts
@@ -46,6 +46,12 @@ export const deleteItemApplyMain = async (id: number) => {
return await request.delete({ url: `/eam/item-apply-main/delete?id=` + id })
}
+// 撤销备件申领记录主
+export const backoutItemApplyMain = async (id: number) => {
+ return await request.get({ url: `/eam/item-apply-main/backout?id=` + id })
+}
+
+
// 导出备件申领记录主 Excel
export const exportItemApplyMain = async (params) => {
return await request.download({ url: `/eam/item-apply-main/export-excel`, params })
@@ -54,4 +60,4 @@ export const exportItemApplyMain = async (params) => {
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/eam/item-apply-main/get-import-template' })
-}
\ No newline at end of file
+}
diff --git a/src/components/Detail/src/DetailDeviceLedger.vue b/src/components/Detail/src/DetailDeviceLedger.vue
index c16e5ee..dc74c8e 100644
--- a/src/components/Detail/src/DetailDeviceLedger.vue
+++ b/src/components/Detail/src/DetailDeviceLedger.vue
@@ -25,7 +25,7 @@
/>
-
+
@@ -39,37 +39,30 @@
@searchFormClick="searchFormClick"
:allSchemas="detailAllSchemas"
/>
-
-
-
+
+
+
+
+
点击修改
-
-
-
- 点击修改
-
-
+
+
+
+
+
+
+
+
+
+ 点击修改
+
{}
defineOptions({ name: 'Detail' })
@@ -295,33 +290,12 @@ const props = defineProps({
required: false,
default: false
},
- // 详情上传图片
- upImageRules: {
- type: Array,
- required: false,
- default: null
- },
- imageFormAllSchemas: {
- type: Object,
- required: true,
- default: null
- },
// 详情上传文件
upFileRules: {
type: Array,
required: false,
default: null
},
- fileFormAllSchemas: {
- type: Object,
- required: true,
- default: null
- },
- subIndex: {
- type: String,
- required: false,
- default: 'A'
- },
// 获取图片详情方法
getImageApi: {
type: Function,
@@ -333,21 +307,24 @@ const props = defineProps({
type: Function,
required: false,
default: null
- },
+ }
+})
+const imageFormData = ref({
+ filePathList: []
+})
+const fileFormData = ref({
+ filePathList: []
})
-const subIndex = ref(props.subIndex)
+const subIndex = ref('A')
const isShowDrawer = ref(false)
const detailLoading = ref(false)
const tabsList = ref(JSON.parse(JSON.stringify(props.tabs ? props.tabs : '')))
const subTabsList = ref(JSON.parse(JSON.stringify(props.subTabs ? props.subTabs : '')))
-const imageFormSchemas = ref(props.imageFormAllSchemas?.formSchema)
-const fileFormSchemas = ref(props.fileFormAllSchemas?.formSchema)
-console.log('imageFormSchemas', imageFormSchemas.value)
// Tabs当前选择
const current = ref(0)
-const imageParmas=ref({
+const imageParmas = ref({
funcCode: 'device_mould_picture', //获取图片详情参数
fileBusiType: '' //获取图片详情参数
})
@@ -355,17 +332,24 @@ const change = (item, index) => {
current.value = index
if (item.prop == 'Image') {
imageParmas.value.funcCode = 'device_mould_picture'
+ imageParmas.value.fileBusiType = ''
+ getImage()
} else if (item.prop == 'Word') {
- imageParmas.value.funcCode = 'device_mould_attachment'
- } else{
- imageParmas.value.funcCode = ''
+ imageParmas.value.funcCode = 'device_mould_attachment'
+ imageParmas.value.fileBusiType = 'A'
+ subIndex.value = 'A'
+ formKey.value += 1
+ getImage()
+ } else {
+ imageParmas.value.funcCode = ''
+ imageParmas.value.fileBusiType = ''
}
emit('changeTabs', item)
}
//主表所需的参数
const masterParmas = ref({
- number: '' ,//主表id
+ number: '' //主表id
})
// 列表头部按钮
@@ -376,12 +360,12 @@ const buttondata = ref()
const detailData = ref()
const titleNameRef = ref()
const titleValueRef = ref()
-const tabsKay =ref(0)//刷新tabs组件key值
+const tabsKay = ref(0) //刷新tabs组件key值
const openDetail = async (row: any, titleName: any, titleValue: any, tableName: any) => {
titleNameRef.value = titleName
titleValueRef.value = titleValue
current.value = 0
- tabsKay.value+=1
+ tabsKay.value += 1
// 加载明细列表
if (!props.isBasic || (props.isBasic && props.tabsExtend)) {
// 设置主表id
@@ -394,11 +378,13 @@ const openDetail = async (row: any, titleName: any, titleValue: any, tableName:
}
}
isShowDrawer.value = true
+
+ imageParmas.value.funcCode = 'device_mould_picture'
+
if (row) {
- console.log(row)
detailLoading.value = true
try {
- await getImage()
+ await getImage()
detailData.value = row
// 判断详情新增按钮是否显示
if (routeName.value.indexOf('Job') > -1) {
@@ -470,19 +456,24 @@ const openDetail = async (row: any, titleName: any, titleValue: any, tableName:
defineExpose({ openDetail }) // 提供 open 方法,用于打开弹窗
// 获取图片详情
-const getImage=()=>{
- props.getImageApi({
- number:masterParmas.value.number,
- funcCode:imageParmas.value.funcCode,
- fileBusiType:imageParmas.value.fileBusiType
- }).then((res)=>{
- console.log(res)
- nextTick(() => {
- imageFormRef.value.setValues({
- filePathList:res
- })
+const formKey = ref(0)
+const getImage = () => {
+ props
+ .getImageApi({
+ number: masterParmas.value.number,
+ funcCode: imageParmas.value.funcCode,
+ fileBusiType: imageParmas.value.fileBusiType
+ })
+ .then((res) => {
+ nextTick(() => {
+ if (imageParmas.value.funcCode == 'device_mould_picture') {
+ imageFormData.value.filePathList = res
+ } else {
+ fileFormData.value.filePathList = res
+ formKey.value += 1
+ }
})
- })
+ })
}
const tableObjectRef = ref()
@@ -588,8 +579,7 @@ const emit = defineEmits([
'detailOpenForm',
'tableFormButton',
'openImage',
- 'subTabsChick',
- 'uploadFile'
+ 'subTabsChick'
])
/** 删除按钮操作 */
const handleDelete = async (id: number) => {
@@ -640,17 +630,18 @@ const openImage = (item) => {
}
const imageFormRef = ref()
// 上传图片
-const uploadImage =async () => {
- const elForm = unref(imageFormRef)?.getElFormRef()
- // 校验表单
- if (!elForm) return
- const valid = await elForm.validate()
- if (!valid) return
+const uploadImage = async () => {
+ // const elForm = unref(imageFormRef)?.getElFormRef()
+ // // 校验表单
+ // if (!elForm) return
+ // const valid = await elForm.validate()
+ // if (!valid) return
+ imageFormData
let data = {
- number:masterParmas.value.number,
- filePathList: imageFormRef.value.formModel.filePathList.map((item) => item.url),
+ number: masterParmas.value.number,
+ filePathList: imageFormData.value.filePathList.map((item) => item.url),
funcCode: imageParmas.value.funcCode,
- fileBusiType: imageParmas.value.fileBusiType ? imageParmas.value.fileBusiType : ''
+ fileBusiType: imageParmas.value.fileBusiType ? imageParmas.value.fileBusiType : ''
}
props.uploadImage(data).then((res) => {
message.success('修改成功')
@@ -659,23 +650,29 @@ const uploadImage =async () => {
}
// 选择二级tabs
const fileFormRef = ref()
-const handleTabsChange=(e)=>{
- emit('subTabsChick',e)
+const handleTabsChange = (e) => {
+ imageParmas.value.fileBusiType = e
+ getImage()
}
// 上传文件
-const uploadFile=async(index)=>{
- let _lists = fileFormRef.value?.map(v => unref(v)?.getElFormRef())
- const elForm = _lists[index]
- // 校验表单
- if (!elForm) return
- const valid = await elForm.validate()
- if (!valid) return
- console.log(fileFormRef.value.formModel)
- emit(
- 'uploadFile',
- masterParmas.value.number,
- fileFormRef.value.formModel.filePathList.map((item) => item.url)
- )
+const uploadFile = async () => {
+ console.log(fileFormData.value.filePathList)
+ // const elForm = unref(fileFormRef)?.getElFormRef()
+ // // 校验表单
+ // if (!elForm) return
+ // const valid = await elForm.validate()
+ // if (!valid) return
+ // console.log(fileFormRef.value?.formModel.filePathList)
+ let data = {
+ number: masterParmas.value.number,
+ filePathList: fileFormData.value.filePathList.map((item) => item.url),
+ funcCode: imageParmas.value.funcCode,
+ fileBusiType: imageParmas.value.fileBusiType ? imageParmas.value.fileBusiType : ''
+ }
+ props.uploadImage(data).then((res) => {
+ message.success('修改成功')
+ getImage()
+ })
}
//监视属性
watch(
diff --git a/src/components/UploadFile/src/UploadFile.vue b/src/components/UploadFile/src/UploadFile.vue
index 8db435b..464a54a 100644
--- a/src/components/UploadFile/src/UploadFile.vue
+++ b/src/components/UploadFile/src/UploadFile.vue
@@ -69,6 +69,7 @@ const props = defineProps({
const valueRef = ref(props.modelValue)
const uploadRef = ref()
const uploadList = ref([])
+console.log('88',props.modelValue)
const fileList = props.modelValue && props.modelValue.length > 0 ? ref(props.modelValue) : ref([])
const uploadNumber = ref(0)
const uploadHeaders = ref({
@@ -116,7 +117,7 @@ const handleFileSuccess: UploadProps['onSuccess'] = (res: any): void => {
fileList.value = fileList.value.concat(uploadList.value)
uploadList.value = []
uploadNumber.value = 0
- emit('update:modelValue', listToString(fileList.value))
+ emit('update:modelValue', fileList.value)
}
}
// 文件数超出提示
@@ -137,6 +138,7 @@ const handleRemove = (file) => {
}
const handlePreview: UploadProps['onPreview'] = (uploadFile) => {
console.log(uploadFile)
+ window.open(uploadFile.url)
}
// 对象转成指定字符串分隔
const listToString = (list: UploadUserFile[], separator?: string) => {
diff --git a/src/router/modules/remaining.ts b/src/router/modules/remaining.ts
index 2bdf987..54d3980 100644
--- a/src/router/modules/remaining.ts
+++ b/src/router/modules/remaining.ts
@@ -41,7 +41,7 @@ const remainingRouter: AppRouteRecordRaw[] = [
{
path: '/redirect/:path(.*)',
name: 'Redirect',
- component: () => import('@/views/Redirect/Redirect.vue'),
+ component: () => import('@/views/redirect/redirect.vue'),
meta: {}
}
],
@@ -59,7 +59,7 @@ const remainingRouter: AppRouteRecordRaw[] = [
children: [
{
path: 'index',
- component: () => import('@/views/Home/Index.vue'),
+ component: () => import('@/views/home/index.vue'),
name: 'Index',
meta: {
title: t('router.home'),
@@ -80,7 +80,7 @@ const remainingRouter: AppRouteRecordRaw[] = [
children: [
{
path: 'profile',
- component: () => import('@/views/Profile/Index.vue'),
+ component: () => import('@/views/profile/index.vue'),
name: 'Profile',
meta: {
canTo: true,
@@ -139,7 +139,7 @@ const remainingRouter: AppRouteRecordRaw[] = [
children: [
{
path: 'edit',
- component: () => import('@/views/infra/codegen/EditTable.vue'),
+ component: () => import('@/views/infra/codegen/editTable.vue'),
name: 'InfraCodegenEditTable',
meta: {
noCache: true,
@@ -177,7 +177,7 @@ const remainingRouter: AppRouteRecordRaw[] = [
},
{
path: '/login',
- component: () => import('@/views/Login/Login.vue'),
+ component: () => import('@/views/login/login.vue'),
name: 'Login',
meta: {
hidden: true,
@@ -187,7 +187,7 @@ const remainingRouter: AppRouteRecordRaw[] = [
},
{
path: '/sso',
- component: () => import('@/views/Login/Login.vue'),
+ component: () => import('@/views/login/login.vue'),
name: 'SSOLogin',
meta: {
hidden: true,
@@ -197,7 +197,7 @@ const remainingRouter: AppRouteRecordRaw[] = [
},
{
path: '/403',
- component: () => import('@/views/Error/403.vue'),
+ component: () => import('@/views/error/403.vue'),
name: 'NoAccess',
meta: {
hidden: true,
@@ -207,7 +207,7 @@ const remainingRouter: AppRouteRecordRaw[] = [
},
{
path: '/404',
- component: () => import('@/views/Error/404.vue'),
+ component: () => import('@/views/error/404.vue'),
name: 'NoFound',
meta: {
hidden: true,
@@ -217,7 +217,7 @@ const remainingRouter: AppRouteRecordRaw[] = [
},
{
path: '/500',
- component: () => import('@/views/Error/500.vue'),
+ component: () => import('@/views/error/500.vue'),
name: 'Error',
meta: {
hidden: true,
diff --git a/src/utils/disposition/defaultButtons.ts b/src/utils/disposition/defaultButtons.ts
index d387ee0..e8fc2d0 100644
--- a/src/utils/disposition/defaultButtons.ts
+++ b/src/utils/disposition/defaultButtons.ts
@@ -801,6 +801,19 @@ export function backoutBtn(option:any) {
})
}
+// 主列表-撤销
+export function approveBtn(option:any) {
+ return __defaultBtnOption(option,{
+ label: '审批',
+ name: 'approve',
+ hide: false,
+ type: 'danger',
+ color: '',
+ link: true, // 文本展现按钮
+ hasPermi: ''
+ })
+}
+
// 主列表-接单
export function acceptOrderBtn(option:any) {
return __defaultBtnOption(option,{
diff --git a/src/views/eam/device/deviceAccounts/deviceAccounts.data.ts b/src/views/eam/device/deviceAccounts/deviceAccounts.data.ts
index e9df4c0..0c43812 100644
--- a/src/views/eam/device/deviceAccounts/deviceAccounts.data.ts
+++ b/src/views/eam/device/deviceAccounts/deviceAccounts.data.ts
@@ -157,21 +157,7 @@ export const UpImage = useCrudSchemas(reactive([
}
},
]))
-// 表单校验
-export const UpFileRules = reactive({
- filePath: [required],
-})
-export const UploadFile = useCrudSchemas(reactive([
- {
- label: '上传文件',
- field: 'filePathList',
- sort: 'custom',
- isForm: true,
- form:{
- component:'UploadFile',
- componentProps:{
- limit:10
- }
- }
- },
-]))
\ No newline at end of file
+// // 表单校验
+// export const UpFileRules = reactive({
+// filePath: [required],
+// })
diff --git a/src/views/eam/device/deviceAccounts/index.vue b/src/views/eam/device/deviceAccounts/index.vue
index b159b0e..8921fc5 100644
--- a/src/views/eam/device/deviceAccounts/index.vue
+++ b/src/views/eam/device/deviceAccounts/index.vue
@@ -68,12 +68,6 @@
:apiPage="apiPage"
:tabsExtend="tabsExtend"
:tableObjectExtend="tableObjectExtend"
- :imageFormAllSchemas="UpImage.allSchemas"
- :upImageRules="UpImageRules"
- :fileFormAllSchemas="UploadFile.allSchemas"
- :upFileRules="UpFileRules"
- @subTabsChick="subTabsChick"
- @uploadFile="uploadFile"
:getImageApi="uploadApi.getImage"
:uploadImage="uploadApi.uploadImage"
/>
@@ -92,10 +86,7 @@ import download from '@/utils/download'
import {
DeviceAccounts,
DeviceAccountsRules,
- UpImage,
- UpImageRules,
- UploadFile,
- UpFileRules
+ UpImage
} from './deviceAccounts.data'
import { Item } from '@/views/eam/basic/item/item.data'
import * as ItemApi from '@/api/eam/basic/item'
@@ -322,7 +313,7 @@ const changeTabs = (item) => {
// detailAllSchemas.value = DeviceRepair.allSchemas
} else if (item.prop == 'DeviceReportRecord') {
tabsExtend.value = 3
- apiPage.value = deviceRepairApi.getDeviceRepairPage
+ apiPage.value = deviceRepairApi.getDeviceRepairPage
detailAllSchemas.value = DeviceRepair.allSchemas
} else if (item.prop == 'RepairRecord') {
tabsExtend.value = 3
@@ -346,23 +337,8 @@ const changeTabs = (item) => {
}
]
}
-// 二级切换事件
-const fileBusiType = ref()
-const subTabsChick = (e) => {
- fileBusiType.value = e
-}
-// 上传文件
-const uploadFile = (number, filePath) => {
- let data = {
- number,
- filePathList: filePath,
- funcCode: funcCode.value,
- fileBusiType: fileBusiType.value ? fileBusiType.value : ''
- }
- uploadApi.uploadImage(data).then((res) => {
- console.log(res)
- })
-}
+
+
/** 初始化 **/
onMounted(async () => {
getList()
diff --git a/src/views/eam/device/deviceMaintenanceMain/index.vue b/src/views/eam/device/deviceMaintenanceMain/index.vue
index 5905a94..d0c0164 100644
--- a/src/views/eam/device/deviceMaintenanceMain/index.vue
+++ b/src/views/eam/device/deviceMaintenanceMain/index.vue
@@ -128,7 +128,7 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row) =>
nextTick(() => {
if (type == 'tableForm') {
// 明细查询页赋值
- if (formField == 'itemNumbers') {
+ if (formField == 'itemNumbers1') {
let str = ''
val.forEach((element) => {
str += element.name + ':' + element.qty + ','
diff --git a/src/views/eam/item/applicationRecord/applicationRecordMain.data.ts b/src/views/eam/item/applicationRecord/applicationRecordMain.data.ts
index 77ded41..c83aa89 100644
--- a/src/views/eam/item/applicationRecord/applicationRecordMain.data.ts
+++ b/src/views/eam/item/applicationRecord/applicationRecordMain.data.ts
@@ -1,7 +1,8 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime'
-import { Item } from '@/views/eam/basic/item/item.data'
-import * as ItemApi from '@/api/eam/basic/item'
+import { ItemAccounts } from '@/views/eam/item/itemAccounts/itemAccounts.data'
+import * as ItemAccountsApi from '@/api/eam/item/itemAccounts'
+import * as DeviceMoldItemsApi from '@/api/eam/basic/deviceMaintenance'
import { validateHanset, validateEmail } from '@/utils/validator'
const { t } = useI18n() // 国际化
@@ -47,28 +48,19 @@ export const ApplicationRecordMain = useCrudSchemas(reactive([
sort: 'custom',
},
{
- label: '是否可用',
- field: 'available',
- dictType: DICT_TYPE.TRUE_FALSE,
+ label: '状态',
+ field: 'status',
+ sort: 'custom',
+ dictType: DICT_TYPE.ITEM_APPLY_STATUS,
dictClass: 'string',
- isSearch: false,
+ isSearch: true,
isTable: true,
- sort: 'custom',
table: {
width: 150
},
tableForm: {
type: 'Select',
- inactiveValue: 'FALSE',
disabled: true
- },
- form: {
- component: 'Switch',
- value: 'TRUE',
- componentProps: {
- inactiveValue: 'FALSE',
- activeValue: 'TRUE'
- }
}
},
{
@@ -96,6 +88,30 @@ export const ApplicationRecordMainRules = reactive({
],
})
+export const DeviceMOLD = useCrudSchemas(reactive([
+ {
+ label: '编号',
+ field: 'number',
+ sort: 'custom',
+ isForm: false,
+ table: {
+ width: 180,
+ fixed: 'left'
+ },
+ },
+ {
+ label: '名称',
+ field: 'name',
+ sort: 'custom',
+ },
+ {
+ label: '规格型号',
+ field: 'specification',
+ sort: 'custom',
+ },
+
+]))
+
/**
* @returns {Array} 备件申请子表
*/
@@ -110,8 +126,8 @@ export const ApplicationRecordDetail = useCrudSchemas(reactive([
searchListPlaceholder: '请选择备件编号',
searchField: 'number',
searchTitle: '库区信息',
- searchAllSchemas: Item.allSchemas, // 查询弹窗所需类
- searchPage: ItemApi.getItemPage, // 查询弹窗所需分页方法
+ searchAllSchemas: ItemAccounts.allSchemas, // 查询弹窗所需类
+ searchPage: ItemAccountsApi.getItemAccountsPage, // 查询弹窗所需分页方法
searchCondition: [{
key: 'available',
value: 'TRUE',
@@ -121,7 +137,49 @@ export const ApplicationRecordDetail = useCrudSchemas(reactive([
},
},
{
- label: '数量',
+ label: '类型',
+ field: 'type',
+ sort: 'custom',
+ dictType: DICT_TYPE.DEVICE_MOLD_TYPE,
+ dictClass: 'string',
+ isSearch: true,
+ isTable: true,
+ table: {
+ width: 150
+ },
+ tableForm: {
+ type: 'Select',
+ disabled: false
+ }
+ },
+
+
+ {
+ label: '设备/模具编号',
+ field: 'deviceNumber',
+ sort: 'custom',
+ isSearch: true,
+ tableForm: {
+ isInpuFocusShow: true,
+ searchListPlaceholder: '请选择单号',
+ searchField: 'number',
+ searchTitle: '单号信息',
+ searchAllSchemas: DeviceMOLD.allSchemas, // 查询弹窗所需类
+ searchPage: DeviceMoldItemsApi.getNumber, // 查询弹窗所需分页方法
+ searchCondition: [{
+ key: 'available',
+ value: "TRUE",
+ isMainValue: false
+ }, {
+ key: 'type',
+ value: "type",
+ isMainValue: true
+ }
+ ]
+ },
+ },
+ {
+ label: '申领数量',
field: 'qty',
sort: 'custom',
table: {
@@ -160,6 +218,8 @@ export const ApplicationRecordDetail = useCrudSchemas(reactive([
precision: 6
}
},
+
+
{
label: '是否可用',
field: 'available',
diff --git a/src/views/eam/item/applicationRecord/index.vue b/src/views/eam/item/applicationRecord/index.vue
index 10eede7..c67f0d5 100644
--- a/src/views/eam/item/applicationRecord/index.vue
+++ b/src/views/eam/item/applicationRecord/index.vue
@@ -163,8 +163,9 @@
// 列表-操作按钮
const butttondata = (row) => {
return [
- defaultButtons.mainListEditBtn(null), // 编辑
- defaultButtons.mainListDeleteBtn(null), // 删除
+ defaultButtons.approveBtn({ hide: isShowMainButton(row, ['0']) }), // 撤回
+ // defaultButtons.mainListEditBtn(null), // 编辑
+ // defaultButtons.mainListDeleteBtn(null), // 删除
]
}
@@ -172,6 +173,8 @@
const buttonTableClick = async (val, row) => {
if (val == 'edit') { // 编辑
openForm('update', row)
+ }else if (val == 'approve') { // 删除
+ // handleDelete(row.id)
} else if (val == 'delete') { // 删除
handleDelete(row.id)
}
@@ -287,4 +290,4 @@
getList()
importTemplateData.templateUrl = await ApplicationRecordMainApi.importTemplate()
})
-
\ No newline at end of file
+
diff --git a/src/views/eam/item/itemApplyMain/index.vue b/src/views/eam/item/itemApplyMain/index.vue
index 2d9cc59..bb1ec5c 100644
--- a/src/views/eam/item/itemApplyMain/index.vue
+++ b/src/views/eam/item/itemApplyMain/index.vue
@@ -75,8 +75,9 @@
if (type == 'tableForm') {
// 明细查询页赋值
row[formField] = val[0][searchField]
- row['itemNumber'] = val[0]['number']
+ row['itemNumber'] = val[0]['itemNumber']
row['isRadeIn'] = val[0]['isRadeIn']
+ row['currentQty'] = val[0]['qty']
row['available'] = val[0]['available']
} else {
const setV = {}
@@ -158,9 +159,9 @@
// 列表-操作按钮
const butttondata = (row) => {
return [
- defaultButtons.mainListOrderCloBtn({ hide: isShowMainButton(row, ['0']) }), // 关闭
- defaultButtons.mainListEditBtn(null), // 编辑
- defaultButtons.mainListDeleteBtn(null), // 删除
+ defaultButtons.backoutBtn({ hide: isShowMainButton(row, ['0']) }), // 撤回
+ // defaultButtons.mainListEditBtn(null), // 编辑
+ // defaultButtons.mainListDeleteBtn(null), // 删除
]
}
@@ -168,11 +169,28 @@
const buttonTableClick = async (val, row) => {
if (val == 'edit') { // 编辑
openForm('update', row)
- } else if (val == 'delete') { // 删除
+ }
+ else if (val == 'backout') { // 提交审批
+ backout(row.id)
+ }
+ else if (val == 'delete') { // 删除
handleDelete(row.id)
}
}
+ /** 撤销按钮操作 */
+ const backout = async (id : number) => {
+ try {
+ // 撤销的二次确认
+ await message.confirm('是否撤销所选中数据?')
+ // 发起撤销
+ await ItemApplyMainApi.backoutItemApplyMain(id)
+ message.success(t('撤销成功!'))
+ // 刷新列表
+ await getList()
+ } catch { }
+ }
+
/** 添加/修改操作 */
const formRef = ref()
const openForm = async (type : string, row ?: number) => {
diff --git a/src/views/eam/item/itemApplyMain/itemApplyMain.data.ts b/src/views/eam/item/itemApplyMain/itemApplyMain.data.ts
index d2036bf..7e290e1 100644
--- a/src/views/eam/item/itemApplyMain/itemApplyMain.data.ts
+++ b/src/views/eam/item/itemApplyMain/itemApplyMain.data.ts
@@ -1,7 +1,8 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime'
-import { Item } from '@/views/eam/basic/item/item.data'
-import * as ItemApi from '@/api/eam/basic/item'
+import { ItemAccounts } from '@/views/eam/item/itemAccounts/itemAccounts.data'
+import * as ItemAccountsApi from '@/api/eam/item/itemAccounts'
+import * as DeviceMoldItemsApi from '@/api/eam/basic/deviceMaintenance'
import { validateHanset, validateEmail } from '@/utils/validator'
const { t } = useI18n() // 国际化
@@ -87,6 +88,31 @@ export const ItemApplyMainRules = reactive({
],
})
+
+export const DeviceMOLD = useCrudSchemas(reactive([
+ {
+ label: '编号',
+ field: 'number',
+ sort: 'custom',
+ isForm: false,
+ table: {
+ width: 180,
+ fixed: 'left'
+ },
+ },
+ {
+ label: '名称',
+ field: 'name',
+ sort: 'custom',
+ },
+ {
+ label: '规格型号',
+ field: 'specification',
+ sort: 'custom',
+ },
+
+]))
+
/**
* @returns {Array} 备件申请子表
*/
@@ -101,8 +127,8 @@ export const ItemApplyDetail = useCrudSchemas(reactive([
searchListPlaceholder: '请选择备件编号',
searchField: 'number',
searchTitle: '库区信息',
- searchAllSchemas: Item.allSchemas, // 查询弹窗所需类
- searchPage: ItemApi.getItemPage, // 查询弹窗所需分页方法
+ searchAllSchemas: ItemAccounts.allSchemas, // 查询弹窗所需类
+ searchPage: ItemAccountsApi.getItemAccountsPage, // 查询弹窗所需分页方法
searchCondition: [{
key: 'available',
value: 'TRUE',
@@ -112,7 +138,49 @@ export const ItemApplyDetail = useCrudSchemas(reactive([
},
},
{
- label: '数量',
+ label: '类型',
+ field: 'type',
+ sort: 'custom',
+ dictType: DICT_TYPE.DEVICE_MOLD_TYPE,
+ dictClass: 'string',
+ isSearch: true,
+ isTable: true,
+ table: {
+ width: 150
+ },
+ tableForm: {
+ type: 'Select',
+ disabled: false
+ }
+ },
+
+
+ {
+ label: '设备/模具编号',
+ field: 'deviceNumber',
+ sort: 'custom',
+ isSearch: true,
+ tableForm: {
+ isInpuFocusShow: true,
+ searchListPlaceholder: '请选择单号',
+ searchField: 'number',
+ searchTitle: '单号信息',
+ searchAllSchemas: DeviceMOLD.allSchemas, // 查询弹窗所需类
+ searchPage: DeviceMoldItemsApi.getNumber, // 查询弹窗所需分页方法
+ searchCondition: [{
+ key: 'available',
+ value: "TRUE",
+ isMainValue: false
+ }, {
+ key: 'type',
+ value: "type",
+ isMainValue: true
+ }
+ ]
+ },
+ },
+ {
+ label: '申领数量',
field: 'qty',
sort: 'custom',
table: {
@@ -151,6 +219,8 @@ export const ItemApplyDetail = useCrudSchemas(reactive([
precision: 6
}
},
+
+
{
label: '是否可用',
field: 'available',
diff --git a/src/views/Home/Index copy.vue b/src/views/home/Index copy.vue
similarity index 100%
rename from src/views/Home/Index copy.vue
rename to src/views/home/Index copy.vue
diff --git a/src/views/Home/Index2.vue b/src/views/home/Index2.vue
similarity index 100%
rename from src/views/Home/Index2.vue
rename to src/views/home/Index2.vue
diff --git a/src/views/Home/components/material.vue b/src/views/home/components/material.vue
similarity index 100%
rename from src/views/Home/components/material.vue
rename to src/views/home/components/material.vue
diff --git a/src/views/Home/components/produce.vue b/src/views/home/components/produce.vue
similarity index 100%
rename from src/views/Home/components/produce.vue
rename to src/views/home/components/produce.vue
diff --git a/src/views/Home/components/product.vue b/src/views/home/components/product.vue
similarity index 100%
rename from src/views/Home/components/product.vue
rename to src/views/home/components/product.vue
diff --git a/src/views/Home/components/supplierIndex.vue b/src/views/home/components/supplierIndex.vue
similarity index 100%
rename from src/views/Home/components/supplierIndex.vue
rename to src/views/home/components/supplierIndex.vue
diff --git a/src/views/Home/echarts-data.ts b/src/views/home/echarts-data.ts
similarity index 100%
rename from src/views/Home/echarts-data.ts
rename to src/views/home/echarts-data.ts
diff --git a/src/views/Home/Index.vue b/src/views/home/index.vue
similarity index 100%
rename from src/views/Home/Index.vue
rename to src/views/home/index.vue
diff --git a/src/views/Home/types.ts b/src/views/home/types.ts
similarity index 100%
rename from src/views/Home/types.ts
rename to src/views/home/types.ts
diff --git a/src/views/Login/components/LoginForm.vue b/src/views/login/components/LoginForm.vue
similarity index 100%
rename from src/views/Login/components/LoginForm.vue
rename to src/views/login/components/LoginForm.vue
diff --git a/src/views/Login/components/LoginFormTitle.vue b/src/views/login/components/LoginFormTitle.vue
similarity index 100%
rename from src/views/Login/components/LoginFormTitle.vue
rename to src/views/login/components/LoginFormTitle.vue
diff --git a/src/views/Login/components/MobileForm.vue b/src/views/login/components/MobileForm.vue
similarity index 100%
rename from src/views/Login/components/MobileForm.vue
rename to src/views/login/components/MobileForm.vue
diff --git a/src/views/Login/components/QrCodeForm.vue b/src/views/login/components/QrCodeForm.vue
similarity index 100%
rename from src/views/Login/components/QrCodeForm.vue
rename to src/views/login/components/QrCodeForm.vue
diff --git a/src/views/Login/components/RegisterForm.vue b/src/views/login/components/RegisterForm.vue
similarity index 100%
rename from src/views/Login/components/RegisterForm.vue
rename to src/views/login/components/RegisterForm.vue
diff --git a/src/views/Login/components/SSOLogin.vue b/src/views/login/components/SSOLogin.vue
similarity index 100%
rename from src/views/Login/components/SSOLogin.vue
rename to src/views/login/components/SSOLogin.vue
diff --git a/src/views/Login/components/index.ts b/src/views/login/components/index.ts
similarity index 100%
rename from src/views/Login/components/index.ts
rename to src/views/login/components/index.ts
diff --git a/src/views/Login/components/useLogin.ts b/src/views/login/components/useLogin.ts
similarity index 100%
rename from src/views/Login/components/useLogin.ts
rename to src/views/login/components/useLogin.ts
diff --git a/src/views/Login/Login.vue b/src/views/login/login.vue
similarity index 100%
rename from src/views/Login/Login.vue
rename to src/views/login/login.vue
diff --git a/src/views/Profile/components/BasicInfo.vue b/src/views/profile/components/BasicInfo.vue
similarity index 100%
rename from src/views/Profile/components/BasicInfo.vue
rename to src/views/profile/components/BasicInfo.vue
diff --git a/src/views/Profile/components/ProfileUser.vue b/src/views/profile/components/ProfileUser.vue
similarity index 100%
rename from src/views/Profile/components/ProfileUser.vue
rename to src/views/profile/components/ProfileUser.vue
diff --git a/src/views/Profile/components/ResetPwd.vue b/src/views/profile/components/ResetPwd.vue
similarity index 100%
rename from src/views/Profile/components/ResetPwd.vue
rename to src/views/profile/components/ResetPwd.vue
diff --git a/src/views/Profile/components/UserAvatar.vue b/src/views/profile/components/UserAvatar.vue
similarity index 100%
rename from src/views/Profile/components/UserAvatar.vue
rename to src/views/profile/components/UserAvatar.vue
diff --git a/src/views/Profile/components/UserSocial.vue b/src/views/profile/components/UserSocial.vue
similarity index 100%
rename from src/views/Profile/components/UserSocial.vue
rename to src/views/profile/components/UserSocial.vue
diff --git a/src/views/Profile/components/index.ts b/src/views/profile/components/index.ts
similarity index 100%
rename from src/views/Profile/components/index.ts
rename to src/views/profile/components/index.ts
diff --git a/src/views/Profile/Index.vue b/src/views/profile/index.vue
similarity index 100%
rename from src/views/Profile/Index.vue
rename to src/views/profile/index.vue
diff --git a/src/views/Redirect/Redirect.vue b/src/views/redirect/redirect.vue
similarity index 100%
rename from src/views/Redirect/Redirect.vue
rename to src/views/redirect/redirect.vue