ljlong_2630 10 months ago
parent
commit
9c93cfae0a
  1. 6
      .env.production
  2. 10
      .env.test
  3. 7
      Dockerfile
  4. 61
      nginx.conf
  5. 6
      src/api/eam/item/itemApplyMain/index.ts
  6. 179
      src/components/Detail/src/DetailDeviceLedger.vue
  7. 4
      src/components/UploadFile/src/UploadFile.vue
  8. 18
      src/router/modules/remaining.ts
  9. 13
      src/utils/disposition/defaultButtons.ts
  10. 22
      src/views/eam/device/deviceAccounts/deviceAccounts.data.ts
  11. 30
      src/views/eam/device/deviceAccounts/index.vue
  12. 2
      src/views/eam/device/deviceMaintenanceMain/index.vue
  13. 98
      src/views/eam/item/applicationRecord/applicationRecordMain.data.ts
  14. 7
      src/views/eam/item/applicationRecord/index.vue
  15. 28
      src/views/eam/item/itemApplyMain/index.vue
  16. 80
      src/views/eam/item/itemApplyMain/itemApplyMain.data.ts
  17. 0
      src/views/home/Index copy.vue
  18. 0
      src/views/home/Index2.vue
  19. 0
      src/views/home/components/material.vue
  20. 0
      src/views/home/components/produce.vue
  21. 0
      src/views/home/components/product.vue
  22. 0
      src/views/home/components/supplierIndex.vue
  23. 0
      src/views/home/echarts-data.ts
  24. 0
      src/views/home/index.vue
  25. 0
      src/views/home/types.ts
  26. 0
      src/views/login/components/LoginForm.vue
  27. 0
      src/views/login/components/LoginFormTitle.vue
  28. 0
      src/views/login/components/MobileForm.vue
  29. 0
      src/views/login/components/QrCodeForm.vue
  30. 0
      src/views/login/components/RegisterForm.vue
  31. 0
      src/views/login/components/SSOLogin.vue
  32. 0
      src/views/login/components/index.ts
  33. 0
      src/views/login/components/useLogin.ts
  34. 0
      src/views/login/login.vue
  35. 0
      src/views/profile/components/BasicInfo.vue
  36. 0
      src/views/profile/components/ProfileUser.vue
  37. 0
      src/views/profile/components/ResetPwd.vue
  38. 0
      src/views/profile/components/UserAvatar.vue
  39. 0
      src/views/profile/components/UserSocial.vue
  40. 0
      src/views/profile/components/index.ts
  41. 0
      src/views/profile/index.vue
  42. 0
      src/views/redirect/redirect.vue

6
.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'

10
.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'

7
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

61
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;
}
}
}

6
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 })

179
src/components/Detail/src/DetailDeviceLedger.vue

@ -25,7 +25,7 @@
/>
</ContentWrap>
<Tabs :tabsList="tabsList" :current="current" @change="change" :key="tabsKay"/>
<Tabs :tabsList="tabsList" :current="current" @change="change" :key="tabsKay" />
<div class="flex">
<!-- 详情 -->
<ContentWrap class="w-[100%]">
@ -39,37 +39,30 @@
@searchFormClick="searchFormClick"
:allSchemas="detailAllSchemas"
/>
<!-- 默认单表展现 -->
<!-- <Descriptions
v-if="isBasic && !tabsExtend"
:data="detailData"
:schema="allSchemas.detailSchema"
:columns="2"
/> -->
<div v-if="isBasic && tabsExtend == 1">
<Form
ref="imageFormRef"
:rules="upImageRules"
:schema="imageFormSchemas"
/>
<el-form ref="imageFormRef" :model="imageFormData" :key="formKey">
<el-form-item label="文件上传">
<UploadImgs v-model="imageFormData.filePathList" />
</el-form-item>
</el-form>
<el-button type="primary" @click="uploadImage">点击修改</el-button>
</div>
<el-tabs type="border-card" class="demo-tabs" v-model="subIndex" v-if="isBasic && tabsExtend == 2" @tab-change="handleTabsChange">
<div v-if="isBasic && tabsExtend == 2">
<el-tabs class="demo-tabs" v-model="imageParmas.fileBusiType" @tab-change="handleTabsChange">
<el-tab-pane
v-for="(item,index) in subTabsList"
v-for="item in subTabsList"
:key="item.value"
:label="item.label"
:name="item.value"
>
<Form
:ref="'fileFormRef'"
:rules="upFileRules"
:schema="fileFormSchemas"
:is-col="true"
/>
<el-button type="primary" @click="uploadFile(index)">点击修改</el-button>
</el-tab-pane>
</el-tabs>
<el-form ref="fileFormRef" :model="fileFormData" :key="formKey">
<el-form-item label="文件上传">
<UploadFile v-model="fileFormData.filePathList" :limit="20" />
</el-form-item>
</el-form>
<el-button type="primary" @click="uploadFile">点击修改</el-button>
</div>
<!-- 单表切换tabs 展现table -->
<Table
v-if="isBasic && tabsExtend == 3"
@ -157,9 +150,11 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons'
import BasicForm from '@/components/BasicForm/src/BasicForm.vue'
import TableHead from '@/components/TableHead/src/TableHead.vue'
import DetailTable from '@/components/DetailTable/src/DetailTable.vue'
import { getCurrentInstance} from 'vue'
import { getCurrentInstance } from 'vue'
import { get } from 'http'
import { findIndex } from '@/utils'
const { proxy } = getCurrentInstance()
const changeFile = () => {}
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 subIndex = ref(props.subIndex)
const imageFormData = ref({
filePathList: []
})
const fileFormData = ref({
filePathList: []
})
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.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)//tabskey
const tabsKay = ref(0) //tabskey
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,8 +378,10 @@ 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()
@ -470,17 +456,22 @@ 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
}
})
})
}
@ -588,8 +579,7 @@ const emit = defineEmits([
'detailOpenForm',
'tableFormButton',
'openImage',
'subTabsChick',
'uploadFile'
'subTabsChick'
])
/** 删除按钮操作 */
const handleDelete = async (id: number) => {
@ -640,15 +630,16 @@ 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 : ''
}
@ -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(

4
src/components/UploadFile/src/UploadFile.vue

@ -69,6 +69,7 @@ const props = defineProps({
const valueRef = ref(props.modelValue)
const uploadRef = ref<UploadInstance>()
const uploadList = ref<UploadUserFile[]>([])
console.log('88',props.modelValue)
const fileList = props.modelValue && props.modelValue.length > 0 ? ref<UploadUserFile[]>(props.modelValue) : ref<UploadUserFile[]>([])
const uploadNumber = ref<number>(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) => {

18
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,

13
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,{

22
src/views/eam/device/deviceAccounts/deviceAccounts.data.ts

@ -157,21 +157,7 @@ export const UpImage = useCrudSchemas(reactive<CrudSchema[]>([
}
},
]))
// 表单校验
export const UpFileRules = reactive({
filePath: [required],
})
export const UploadFile = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '上传文件',
field: 'filePathList',
sort: 'custom',
isForm: true,
form:{
component:'UploadFile',
componentProps:{
limit:10
}
}
},
]))
// // 表单校验
// export const UpFileRules = reactive({
// filePath: [required],
// })

30
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'
@ -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()

2
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 + ','

98
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<CrudSchema[]>([
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<CrudSchema[]>([
{
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<CrudSchema[]>([
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<CrudSchema[]>([
},
},
{
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<CrudSchema[]>([
precision: 6
}
},
{
label: '是否可用',
field: 'available',

7
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)
}

28
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) => {

80
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<CrudSchema[]>([
{
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<CrudSchema[]>([
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<CrudSchema[]>([
},
},
{
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<CrudSchema[]>([
precision: 6
}
},
{
label: '是否可用',
field: 'available',

0
src/views/Home/Index copy.vue → src/views/home/Index copy.vue

0
src/views/Home/Index2.vue → src/views/home/Index2.vue

0
src/views/Home/components/material.vue → src/views/home/components/material.vue

0
src/views/Home/components/produce.vue → src/views/home/components/produce.vue

0
src/views/Home/components/product.vue → src/views/home/components/product.vue

0
src/views/Home/components/supplierIndex.vue → src/views/home/components/supplierIndex.vue

0
src/views/Home/echarts-data.ts → src/views/home/echarts-data.ts

0
src/views/Home/Index.vue → src/views/home/index.vue

0
src/views/Home/types.ts → src/views/home/types.ts

0
src/views/Login/components/LoginForm.vue → src/views/login/components/LoginForm.vue

0
src/views/Login/components/LoginFormTitle.vue → src/views/login/components/LoginFormTitle.vue

0
src/views/Login/components/MobileForm.vue → src/views/login/components/MobileForm.vue

0
src/views/Login/components/QrCodeForm.vue → src/views/login/components/QrCodeForm.vue

0
src/views/Login/components/RegisterForm.vue → src/views/login/components/RegisterForm.vue

0
src/views/Login/components/SSOLogin.vue → src/views/login/components/SSOLogin.vue

0
src/views/Login/components/index.ts → src/views/login/components/index.ts

0
src/views/Login/components/useLogin.ts → src/views/login/components/useLogin.ts

0
src/views/Login/Login.vue → src/views/login/login.vue

0
src/views/Profile/components/BasicInfo.vue → src/views/profile/components/BasicInfo.vue

0
src/views/Profile/components/ProfileUser.vue → src/views/profile/components/ProfileUser.vue

0
src/views/Profile/components/ResetPwd.vue → src/views/profile/components/ResetPwd.vue

0
src/views/Profile/components/UserAvatar.vue → src/views/profile/components/UserAvatar.vue

0
src/views/Profile/components/UserSocial.vue → src/views/profile/components/UserSocial.vue

0
src/views/Profile/components/index.ts → src/views/profile/components/index.ts

0
src/views/Profile/Index.vue → src/views/profile/index.vue

0
src/views/Redirect/Redirect.vue → src/views/redirect/redirect.vue

Loading…
Cancel
Save