Browse Source

Merge branch 'master_hella' of http://dev.ccwin-in.com:3000/sfms3.0/sfms3.0-ui into master_hella

master_hella_20240701
zhousq 6 months ago
parent
commit
cd191458dd
  1. 1
      README.md
  2. 2
      index.html
  3. 36
      src/api/eam/sparePart/index.ts
  4. 10
      src/api/wms/countJobMain/index.ts
  5. 339
      src/components/ImportForm/src/ImportDetailForm.vue
  6. 2
      src/components/TableForm/src/TableForm.vue
  7. 4
      src/components/UploadFile/src/UploadFile.vue
  8. 3
      src/hooks/web/useTitle.ts
  9. 3
      src/layout/components/Footer/src/Footer.vue
  10. 22
      src/locales/en-US.ts
  11. 22
      src/locales/zh-CN.ts
  12. 6
      src/main.ts
  13. 4
      src/views/eam/sparePart/index.vue
  14. 215
      src/views/eam/sparePart/sparePart.data.ts
  15. 2
      src/views/login/components/LoginForm.vue
  16. 4
      src/views/login/login.vue
  17. 4
      src/views/wms/basicDataManage/itemManage/itemarea/itemarea.data.ts
  18. 2
      src/views/wms/basicDataManage/itemManage/itemwarehouse/itemwarehouse.data.ts
  19. 2
      src/views/wms/countManage/count/countJobMain/countJobMain.data.ts
  20. 69
      src/views/wms/countManage/count/countJobMain/index.vue
  21. 2
      src/views/wms/deliversettlementManage/saleShipmentMainRecord/saleShipmentMainRecord.data.ts
  22. 4
      src/views/wms/inventoryjobManage/packageManage/packageoverMain/packageoverJobMain/packageoverJobMain.data.ts
  23. 2
      src/views/wms/inventoryjobManage/packageManage/packageoverMain/packageoverRetrospect/packageoverRetrospect.data.ts
  24. 2
      src/views/wms/productionManage/productreceipt/productreceiptRequestMain/index.vue
  25. 2
      src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRecordMain/productreceiptAssembleRecordMain.data.ts
  26. 2
      src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRequestMain/index.vue
  27. 2
      src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptJobMain/purchasereceiptJobMain.data.ts
  28. 2
      src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/index.vue
  29. 2
      src/views/wms/purchasereceiptManage/sparereceipt/sparereceiptRequestMain/index.vue
  30. 2
      src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverBasicForm.vue

1
README.md

@ -4,6 +4,7 @@
form: { form: {
labelMessage: '信息提示说明!!!', labelMessage: '信息提示说明!!!',
componentProps: { componentProps: {
enterSearch: true, //可输入回车 对应绑定事件:@onEnter="onEnter"
isSearchList: true, // 开启查询弹窗 isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择物料代码', // 输入框占位文本 searchListPlaceholder: '请选择物料代码', // 输入框占位文本
searchField: 'itemCode', // 查询弹窗赋值字段 searchField: 'itemCode', // 查询弹窗赋值字段

2
index.html

@ -138,7 +138,7 @@
<div class="app-loading-wrap"> <div class="app-loading-wrap">
<div class="app-loading-title"> <div class="app-loading-title">
<img src="/src/assets/imgs/logo_white.png" class="app-loading-logo" alt="Logo" /> <img src="/src/assets/imgs/logo_white.png" class="app-loading-logo" alt="Logo" />
<div class="app-loading-title">%VITE_APP_TITLE%</div> <div class="app-loading-title" id="app-loading-title">%VITE_APP_TITLE%</div>
</div> </div>
<div class="app-loading-item"> <div class="app-loading-item">
<div class="app-loading-outter"></div> <div class="app-loading-outter"></div>

36
src/api/eam/sparePart/index.ts

@ -7,23 +7,19 @@ export interface SparePartVO {
brand: string brand: string
specifications: string specifications: string
isOverall: string isOverall: string
isConstant: string
subject: string subject: string
subjectCode: string subjectCode: string
category: string type: string
images: string
region: string region: string
classification: string classification: string
uom: string uom: string
singlePrice: number singlePrice: number
stockAge: number manufacturer: string
reprocurement: number minInventory: number
safetyStock: number maxInventory: number
cost: string replacementCycle: number
purchaser: string storageLocation: string
financer: string
purchaseTime: Date
isFramework: string
isRadeIn: string
departmentCode: string departmentCode: string
remark: string remark: string
siteId: string siteId: string
@ -38,38 +34,38 @@ export const getSparePartPage = async (params) => {
if (params.isSearch) { if (params.isSearch) {
delete params.isSearch delete params.isSearch
const data = {...params} const data = {...params}
return await request.post({ url: '/eam/sparepart/spare-part/senior', data }) return await request.post({ url: '/eam/basic/spare-part/senior', data })
} else { } else {
return await request.get({ url: `/eam/sparepart/spare-part/page`, params }) return await request.get({ url: `/eam/basic/spare-part/page`, params })
} }
} }
// 查询备件基础详情 // 查询备件基础详情
export const getSparePart = async (id: number) => { export const getSparePart = async (id: number) => {
return await request.get({ url: `/eam/sparepart/spare-part/get?id=` + id }) return await request.get({ url: `/eam/basic/spare-part/get?id=` + id })
} }
// 新增备件基础 // 新增备件基础
export const createSparePart = async (data: SparePartVO) => { export const createSparePart = async (data: SparePartVO) => {
return await request.post({ url: `/eam/sparepart/spare-part/create`, data }) return await request.post({ url: `/eam/basic/spare-part/create`, data })
} }
// 修改备件基础 // 修改备件基础
export const updateSparePart = async (data: SparePartVO) => { export const updateSparePart = async (data: SparePartVO) => {
return await request.put({ url: `/eam/sparepart/spare-part/update`, data }) return await request.put({ url: `/eam/basic/spare-part/update`, data })
} }
// 删除备件基础 // 删除备件基础
export const deleteSparePart = async (id: number) => { export const deleteSparePart = async (id: number) => {
return await request.delete({ url: `/eam/sparepart/spare-part/delete?id=` + id }) return await request.delete({ url: `/eam/basic/spare-part/delete?id=` + id })
} }
// 导出备件基础 Excel // 导出备件基础 Excel
export const exportSparePart = async (params) => { export const exportSparePart = async (params) => {
return await request.download({ url: `/eam/sparepart/spare-part/export-excel`, params }) return await request.download({ url: `/eam/basic/spare-part/export-excel`, params })
} }
// 下载用户导入模板 // 下载用户导入模板
export const importTemplate = () => { export const importTemplate = () => {
return request.download({ url: '/eam/sparepart/spare-part/get-import-template' }) return request.download({ url: '/eam/basic/spare-part/get-import-template' })
} }

10
src/api/wms/countJobMain/index.ts

@ -89,5 +89,13 @@ export const importTemplate = () => {
// 关闭盘点任务主 // 关闭盘点任务主
export const closeCountJobMain = (id: number) => { export const closeCountJobMain = (id: number) => {
return request.download({ url: '/wms/count-job-main/close?id=' + id }) return request.put({ url: '/wms/count-job-main/close?id=' + id })
} }
// 关闭盘点任务主
export const handleExportCountJob = async (id: number) => {
let params = {
masterId:id
}
return await request.download({ url: `/wms/count-job-main/export-excel-single`, params })
}

339
src/components/ImportForm/src/ImportDetailForm.vue

@ -0,0 +1,339 @@
<!-- 导入组件 -->
<template>
<Dialog v-model="dialogVisible" :title="t('ts.导入')" width="600" :close-on-click-modal="false">
<el-upload
ref="uploadRef"
v-model:file-list="fileList"
:action="
importUrl +
'?mode=' +
mode +
'&file=' +
file +
'&updatePart=' +
updatePart +
'&outFile=' +
outFile +
'&extend=' + extend +
'&fromInventoryStatus=' + fromInventoryStatus +
'&toInventoryStatus=' + toInventoryStatus
"
:auto-upload="false"
:disabled="formLoading"
:headers="uploadHeaders"
:limit="1"
:on-error="submitFormError"
:on-exceed="handleExceed"
:on-success="submitFormSuccess"
:accept="accept"
drag
style="width: 300px; margin: 0 auto"
v-loading="formLoading"
>
<Icon icon="ep:upload-filled" color="#c0c4cc" :size="60" />
<div class="el-upload__text">{{t('ts.将文件拖到此处,或')}}<em>{{t('ts.点击上传')}}</em></div>
<template #tip>
<div class="el-upload__tip ml--126px mr--80px">
<div class="flex">
<div
class="label h-32px mr-26px color-#acaeb3 font-size-14px w-100px text-right"
style="line-height: 32px"
>{{t('ts.导入模式')}}</div
>
<div class="">
<div class="radio">
<el-radio-group v-model="mode">
<el-radio :label="1" :disabled="updateIsDisable">{{ t('ts.更新')}}</el-radio>
<!-- <el-radio :label="2" :disabled="appendIsDisable">{{ t('ts.追加') }}</el-radio>
<el-radio :label="3" :disabled="coverIsDisable">{{ t('ts.覆盖') }}</el-radio> -->
</el-radio-group>
</div>
<div class="tips color-#acaeb3 font-size-14px">
<div class="mt-2">{{t('ts.更新:新增并修改')}}</div>
<!-- <div class="mt-2">{{ t('ts.追加:只新增,不修改') }}</div>
<div class="mt-2">{{ t('ts.覆盖:只修改不新增') }}</div> -->
</div>
</div>
</div>
<div class="flex mt-16px">
<!-- <div
class="label h-32px mr-26px color-#acaeb3 font-size-14px w-100px text-right"
style="line-height: 32px"
>{{ t('ts.部分保存') }}</div
>
<div class="">
<div class="switch">
<el-switch v-model="updatePart" />
</div>
<div class="tips color-#acaeb3 font-size-14px">
<div class="mt-2">{{ t('ts.部分保存:如存在错误数据,正确数据正常导入') }}</div>
<div class="mt-2">{{ t('ts.全部保存:全部数据正确,才能导入') }}</div>
</div>
</div> -->
</div>
<div class="flex mt-16px" v-if="isShowOut">
<div
class="label h-32px mr-26px color-#acaeb3 font-size-14px w-100px text-right"
style="line-height: 32px"
>是否外部资源</div
>
<div class="">
<div class="switch">
<el-switch v-model="outFile" />
</div>
</div>
</div>
</div>
</template>
</el-upload>
<template #footer>
<div class="flex items-center">
<div class="flex-1 text-left">
<!-- <el-button type="primary" plain @click="importTemplate">
<Icon icon="ep:download" />
{{ t('ts.下载模板') }}
</el-button> -->
</div>
<el-button :disabled="formLoading" type="primary" @click="submitForm">{{ t('ts.确 ') }}</el-button>
<el-button @click="dialogVisible = false">{{ t('ts.取 消') }}</el-button>
</div>
</template>
</Dialog>
</template>
<script lang="ts" setup>
import { getAccessToken, getTenantId } from '@/utils/auth'
import download from '@/utils/download'
defineOptions({ name: 'ImportDetailForm' })
const { t } = useI18n()
const message = useMessage() //
const dialogVisible = ref(false) //
const formLoading = ref(false) //
const uploadRef = ref()
const uploadHeaders = ref() // Header
const fileList = ref([]) //
const file = ref('')
const props = defineProps({
importTemplateData: {
type: Object,
required: true
},
//
accept: {
type: String,
required: false,
default: '.xlsx,.xls'
},
// .1
mode: {
type: Number,
required: false,
default: 1
},
// ,
updateIsDisable: {
type: Boolean,
required: false,
default: false
},
// ,
appendIsDisable: {
type: Boolean,
required: false,
default: false
},
// ,
coverIsDisable: {
type: Boolean,
required: false,
default: false
},
// ,
updatePart: {
type: Boolean,
required: false,
default: false
},
url: {
type: String,
required: false
},
//
isShowOut: {
type: Boolean,
required: false,
default: false
},
outFile: {
type: Boolean,
required: false,
default: false
},
//
extend: {
type: String,
required: false,
default: ''
},
// TODO: cxm
fromInventoryStatus: {
type: String,
required: false,
default: ''
},
// TODO: cxm
toInventoryStatus: {
type: String,
required: false,
default: ''
}
})
const importTemplateData = ref(props.importTemplateData)
const accept = ref(props.accept)
const mode = ref(props.mode) //.1
const updateIsDisable = ref(props.updateIsDisable) //,
const appendIsDisable = ref(props.appendIsDisable) //,
const coverIsDisable = ref(props.coverIsDisable) //,
const updatePart = ref(props.updatePart) //
const outFile = ref(props.outFile) //
const importUrl = import.meta.env.VITE_BASE_URL + import.meta.env.VITE_API_URL + props.url
/** 打开弹窗 */
const open = () => {
dialogVisible.value = true
resetForm()
}
defineExpose({ open }) // open
/** 提交表单 */
const submitForm = async () => {
if (fileList.value.length == 0) {
message.error('请上传文件')
return
}
file.value = fileList.value[0].name
//
uploadHeaders.value = {
Authorization: 'Bearer ' + getAccessToken(),
'tenant-id': getTenantId()
}
formLoading.value = true
uploadRef.value!.submit()
}
/** 文件上传成功 */
const emits = defineEmits(['success'])
const submitFormSuccess = (response: any) => {
formLoading.value = true
console.log(response)
if (response) {
if (response.code == 500) {
uploadRef.value!.clearFiles()
message.error('导入失败')
formLoading.value = false
return
} else if (response.code == 0) {
if (response.data.errorCount > 0) {
message.confirm('文件中有部分数据导入失败,是否下载失败数据?').then(() => {
// download.excel(file, 'file_' + new Date().getTime())
// url
// const downloadElement = document.createElement('a')
// console.log(172, import.meta.env.VITE_BASE_URL + import.meta.env.VITE_API_URL + '/' + response.data.errorFile)
// console.log(172, import.meta.env.VITE_BASE_URL + '/admin-api/opt/profile/' + response.data.errorFile)
window.open(
import.meta.env.VITE_BASE_URL + '/admin-api' + response.data.errorFile,
'222'
)
// downloadElement.setAttribute('href', import.meta.env.VITE_BASE_URL + import.meta.env.VITE_API_URL + response.data.errorFile )
//
// downloadElement.click()
})
} else {
message.success('导入成功')
}
}else if(response.data == null){
message.error(response.msg)
}
}
// if (response.code !== 0) {
// message.error(response.msg)
// formLoading.value = false
// return
// }
// //
// const data = response.data
// const create = response.data.importResult[0]
// const update = response.data.importResult[1]
// const failure = response.data.importResult[2]
// let text = '' + data[create].length + ';'
// for (let name of data[create]) {
// text += '< ' + name + ' >'
// }
// text += '' + data[update].length + ';'
// for (const name of data[update]) {
// text += '< ' + name + ' >'
// }
// text += '' + Object.keys(data[failure]).length + ';'
// for (const name in data[failure]) {
// text += '< ' + name + ': ' + data[failure][name] + ' >'
// }
// message.alert(text)
//
formLoading.value = false
emits('success')
dialogVisible.value = false
}
/** 上传错误提示 */
const submitFormError = (): void => {
message.error('上传失败,请您重新上传!')
formLoading.value = false
}
/** 重置表单 */
const resetForm = () => {
//
formLoading.value = false
uploadRef.value?.clearFiles()
fileList.value = []
}
/** 文件数超出提示 */
const handleExceed = (): void => {
message.error('最多只能上传一个文件!')
}
/** 下载模板操作 */
const importTemplate = () => {
const res = importTemplateData.value.templateUrl
download.excel(res, importTemplateData.value.templateTitle)
}
</script>
<style scoped lang="scss">
.tips {
div {
position: relative;
padding-left: 22px;
&::before {
width: 4px;
height: 4px;
border-radius: 50%;
content: '';
background: #c2c2c2;
position: absolute;
top: 50%;
margin-top: -2px;
left: 4px;
}
}
}
</style>

2
src/components/TableForm/src/TableForm.vue

@ -64,7 +64,7 @@
v-model="row[headerItem.field]" v-model="row[headerItem.field]"
clearable clearable
:type="headerItem?.tableForm?.inputType" :type="headerItem?.tableForm?.inputType"
:placeholder="headerItem?.tableForm?.placeholder || '请输入' + headerItem.label" :placeholder="t(`ts.${headerItem?.tableForm?.placeholder || '请输入' + headerItem.label}`)"
:disabled="headerItem?.tableForm?.disabled ? true: headerItem?.tableForm?.isInpuFocusShow ? true : false" :disabled="headerItem?.tableForm?.disabled ? true: headerItem?.tableForm?.isInpuFocusShow ? true : false"
style="flex:1" style="flex:1"
@blur="inputStringBlur(headerItem.field, row[headerItem.field], row)" @blur="inputStringBlur(headerItem.field, row[headerItem.field], row)"

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

@ -23,10 +23,10 @@
<el-button type="primary"><Icon icon="ep:upload-filled" />{{ title }}</el-button> <el-button type="primary"><Icon icon="ep:upload-filled" />{{ title }}</el-button>
<template v-if="isShowTip" #tip> <template v-if="isShowTip" #tip>
<div style="font-size: 8px;margin-top: 10px;line-height: initial;"> <div style="font-size: 8px;margin-top: 10px;line-height: initial;">
大小不超过 <b style="color: #f56c6c">{{ fileSize }}MB</b> {{t('ts.大小不超过')}} <b style="color: #f56c6c">{{ fileSize }}MB</b>
</div> </div>
<div style="font-size: 8px;line-height: initial;"> <div style="font-size: 8px;line-height: initial;">
格式为 <b style="color: #f56c6c">{{ fileType.join('/') }}</b> 的文件 {{ t('ts.格式为') }} <b style="color: #f56c6c">{{ fileType.join('/') }}</b> {{ t('ts.的文件') }}
</div> </div>
</template> </template>
<template v-if="!isShowFile" #file > <template v-if="!isShowFile" #file >

3
src/hooks/web/useTitle.ts

@ -1,6 +1,7 @@
import { watch, ref } from 'vue' import { watch, ref } from 'vue'
import { isString } from '@/utils/is' import { isString } from '@/utils/is'
import { useAppStoreWithOut } from '@/store/modules/app' import { useAppStoreWithOut } from '@/store/modules/app'
const { t } = useI18n() // 国际化
const appStore = useAppStoreWithOut() const appStore = useAppStoreWithOut()
@ -14,7 +15,7 @@ export const useTitle = (newTitle?: string) => {
title, title,
(n, o) => { (n, o) => {
if (isString(n) && n !== o && document) { if (isString(n) && n !== o && document) {
document.title = n document.title = n.replace(import.meta.env.VITE_APP_TITLE,t(`ts.${import.meta.env.VITE_APP_TITLE}`))
} }
}, },
{ immediate: true } { immediate: true }

3
src/layout/components/Footer/src/Footer.vue

@ -1,6 +1,7 @@
<script lang="ts" setup> <script lang="ts" setup>
import { useAppStore } from '@/store/modules/app' import { useAppStore } from '@/store/modules/app'
import { useDesign } from '@/hooks/web/useDesign' import { useDesign } from '@/hooks/web/useDesign'
const { t } = useI18n()
// eslint-disable-next-line vue/no-reserved-component-names // eslint-disable-next-line vue/no-reserved-component-names
defineOptions({ name: 'Footer' }) defineOptions({ name: 'Footer' })
@ -19,6 +20,6 @@ const title = computed(() => appStore.getTitle)
:class="prefixCls" :class="prefixCls"
class="h-[var(--app-footer-height)] bg-[var(--app-content-bg-color)] text-center leading-[var(--app-footer-height)] text-[var(--el-text-color-placeholder)] dark:bg-[var(--el-bg-color)]" class="h-[var(--app-footer-height)] bg-[var(--app-content-bg-color)] text-center leading-[var(--app-footer-height)] text-[var(--el-text-color-placeholder)] dark:bg-[var(--el-bg-color)]"
> >
<p style="font-size: 14px">Copyright ©2022-{{ title }}</p> <p style="font-size: 14px">Copyright ©2022-{{ t(`ts.${title}`) }}</p>
</div> </div>
</template> </template>

22
src/locales/en-US.ts

@ -1063,7 +1063,6 @@ export default {
:'Purchasing price approver', :'Purchasing price approver',
:'Supplier\'s invoice number', :'Supplier\'s invoice number',
:'loading', :'loading',
:'Please enter remarks',
'正在上传文件,请稍候':'Please wait while uploading files', '正在上传文件,请稍候':'Please wait while uploading files',
:'upload successful', :'upload successful',
:'The number of uploaded files cannot exceed', :'The number of uploaded files cannot exceed',
@ -1084,7 +1083,26 @@ export default {
:'Invoicing calendar management', :'Invoicing calendar management',
:'description', :'description',
:'Batch delete', :'Batch delete',
:'Check the quality inspection report' :'Check the quality inspection report',
:'ChangChun',
:'ChengDu',
:'HELLR Smart Factory Management Platform',
:'Purchase unreceived record',
:'Please select the desired shipment tracking number',
:'Not more in size',
:'File in',
:'format',
:'Receive',
:'Please input batch',
:'Please input the supplier batch',
:'Option Date',
:'Please input comment',
// 格式为…的文件:The format is... File of
1:'Please input package specification1',
1:'Please input package quantity1',
2:'Please input package specification2',
2:'Please input package quantity2',
:'submit for approval'

22
src/locales/zh-CN.ts

@ -1063,7 +1063,6 @@ export default {
:'采购价格审批人', :'采购价格审批人',
:'供应商发货单号', :'供应商发货单号',
:'加载中', :'加载中',
:'请输入备注',
'正在上传文件,请稍候':'正在上传文件,请稍候...', '正在上传文件,请稍候':'正在上传文件,请稍候...',
:'上传成功', :'上传成功',
:'上传文件数量不能超过', :'上传文件数量不能超过',
@ -1084,7 +1083,26 @@ export default {
:'开票日历管理', :'开票日历管理',
:'描述', :'描述',
:'批量删除', :'批量删除',
:'查看质检报告' :'查看质检报告',
:'长春',
:'成都',
:'富维海拉智慧工厂管理平台',
:'采购未收货记录',
:'请选择要货计划单号',
:'大小不超过',
:'格式为',
:'的文件',
:'接收',
:'请输入批次',
:'请输入供应商批次',
:'选择日期',
:'请输入备注',
// 格式为…的文件:The format is... File of
1:'请输入包装规格1',
1:'请输入包装数量1',
2:'请输入包装规格2',
2:'请输入包装数量2',
:'提交审批'

6
src/main.ts

@ -43,6 +43,7 @@ import Logger from '@/utils/Logger'
import VueDOMPurifyHTML from 'vue-dompurify-html' // 解决v-html 的安全隐患 import VueDOMPurifyHTML from 'vue-dompurify-html' // 解决v-html 的安全隐患
import DataVVue3 from '@kjgl77/datav-vue3' import DataVVue3 from '@kjgl77/datav-vue3'
import { useLocaleStore } from '@/store/modules/locale'
// 创建实例 // 创建实例
const setupAll = async () => { const setupAll = async () => {
@ -70,6 +71,11 @@ const setupAll = async () => {
app.mount('#app') app.mount('#app')
app.config.warnHandler = () => null; app.config.warnHandler = () => null;
} }
// 多语言相关
const localeStore = useLocaleStore()
if(localeStore&&localeStore.currentLocale&&localeStore.currentLocale.lang.indexOf('en')>-1&&document.querySelector('#app-loading-title')){
document.querySelector('#app-loading-title').innerHTML = 'HELLR Smart Factory Management Platform' // 富维海拉智慧工厂管理平台
}
setupAll() setupAll()

4
src/views/eam/sparePart/index.vue

@ -54,7 +54,7 @@
<Detail ref="detailRef" :isBasic="true" :allSchemas="SparePart.allSchemas" /> <Detail ref="detailRef" :isBasic="true" :allSchemas="SparePart.allSchemas" />
<!-- 导入 --> <!-- 导入 -->
<ImportForm ref="importFormRef" url="/eam/sparepart/spare-part/import" :importTemplateData="importTemplateData" @success="importSuccess" /> <ImportForm ref="importFormRef" url="/eam/basic/spare-part/import" :importTemplateData="importTemplateData" @success="importSuccess" />
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
@ -134,7 +134,7 @@ const buttonBaseClick = (val, item) => {
// - // -
const butttondata = [ const butttondata = [
defaultButtons.mainListEditBtn({hasPermi:'eam:spare-part:update'}), // defaultButtons.mainListEditBtn({hasPermi:'eam:spare-part:update'}), //
// defaultButtons.mainListDeleteBtn({hasPermi:'eam:spare-part:delete'}), // //defaultButtons.mainListDeleteBtn({hasPermi:'eam:sparePart:delete'}), //
] ]
// - // -

215
src/views/eam/sparePart/sparePart.data.ts

@ -1,5 +1,6 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas' import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime' import { dateFormatter } from '@/utils/formatTime'
import * as ConfigApi from '@/api/infra/config' import * as ConfigApi from '@/api/infra/config'
const autoCodeSwitch = await ConfigApi.getConfigKey('sparePartCodeAutoSwitch') const autoCodeSwitch = await ConfigApi.getConfigKey('sparePartCodeAutoSwitch')
const autoSwitch = ref(false) const autoSwitch = ref(false)
@ -12,11 +13,20 @@ export const SparePartRules = reactive({
code: [required], code: [required],
name: [required], name: [required],
isOverall: [required], isOverall: [required],
images: [required],
uom: [required], uom: [required],
concurrencyStamp: [required]
}) })
export const SparePart = useCrudSchemas(reactive<CrudSchema[]>([ export const SparePart = useCrudSchemas(reactive<CrudSchema[]>([
{
label: 'id',
field: 'id',
sort: 'custom',
isSearch: false,
isTable: false,
isForm: false,
isDetail:false,
},
{ {
label: '备件编号', label: '备件编号',
field: 'code', field: 'code',
@ -29,19 +39,19 @@ export const SparePart = useCrudSchemas(reactive<CrudSchema[]>([
label: '名称', label: '名称',
field: 'name', field: 'name',
sort: 'custom', sort: 'custom',
isSearch: true isSearch: true,
}, },
{ {
label: '品牌', label: '品牌',
field: 'brand', field: 'brand',
sort: 'custom', sort: 'custom',
isSearch: false isSearch: true,
}, },
{ {
label: '规格型号', label: '规格型号',
field: 'specifications', field: 'specifications',
sort: 'custom', sort: 'custom',
isSearch: false isSearch: true,
}, },
{ {
label: '是否全局', label: '是否全局',
@ -59,22 +69,6 @@ export const SparePart = useCrudSchemas(reactive<CrudSchema[]>([
} }
} }
}, },
{
label: '是否存储',
field: 'isConstant',
sort: 'custom',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
isSearch: true,
form: {
component: 'Switch',
value: 'TRUE',
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE'
}
}
},
{ {
label: '科目', label: '科目',
field: 'subject', field: 'subject',
@ -90,13 +84,19 @@ export const SparePart = useCrudSchemas(reactive<CrudSchema[]>([
label: '科目代码', label: '科目代码',
field: 'subjectCode', field: 'subjectCode',
sort: 'custom', sort: 'custom',
isSearch: false isSearch: true,
}, },
{ {
label: '类别', label: '类别',
field: 'category', field: 'type',
sort: 'custom',
isSearch: true,
},
{
label: '图片',
field: 'images',
sort: 'custom', sort: 'custom',
isSearch: false isSearch: false,
}, },
{ {
label: '区域', label: '区域',
@ -104,7 +104,7 @@ export const SparePart = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom', sort: 'custom',
dictType: DICT_TYPE.REGION, dictType: DICT_TYPE.REGION,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑 dictClass: 'string', // 默认都是字符串类型其他暂不考虑
isSearch: false, isSearch: true,
form: { form: {
component: 'Select' component: 'Select'
} }
@ -121,71 +121,126 @@ export const SparePart = useCrudSchemas(reactive<CrudSchema[]>([
} }
}, },
{ {
label: '单位', label: '计量单位字典',
field: 'uom', field: 'uom',
sort: 'custom', sort: 'custom',
isSearch: false dictType: DICT_TYPE.UOM,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
isSearch: true,
}, },
{ {
label: '单价', label: '单价',
field: 'singlePrice', field: 'singlePrice',
sort: 'custom', sort: 'custom',
isSearch: false isSearch: true,
form: {
component: 'InputNumber',
value: 0
},
}, },
{ {
label: '库龄', label: '生产厂家字符',
field: 'stockAge', field: 'manufacturer',
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: true,
},
{
label: '库存下限',
field: 'minInventory',
sort: 'custom',
isSearch: true,
form: { form: {
component: 'InputNumber', component: 'InputNumber',
value: 0 value: 0
} },
}, },
{ {
label: '重采购点', label: '库存上限',
field: 'reprocurement', field: 'maxInventory',
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: true,
form: { form: {
component: 'InputNumber', component: 'InputNumber',
value: 0 value: 0
} },
}, },
{ {
label: '安全库存', label: '更换周期',
field: 'safetyStock', field: 'replacementCycle',
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: true,
form: { form: {
component: 'InputNumber', component: 'InputNumber',
value: 0 value: 0
} },
},
{
label: '存放位置描述',
field: 'storageLocation',
sort: 'custom',
isSearch: false,
},
{
label: '创建时间',
field: 'createTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: false,
isTable: false,
isForm: false,
isDetail:false,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
isForm: false,
}, },
{ {
label: '成本中心', label: '部门id',
field: 'cost', field: 'departmentCode',
sort: 'custom', sort: 'custom',
isSearch: false isSearch: false,
isTable: false,
isForm: false,
isDetail:false,
}, },
{ {
label: '采购员', label: '备注',
field: 'purchaser', field: 'remark',
sort: 'custom', sort: 'custom',
isSearch: false isSearch: false,
}, },
{ {
label: '财务', label: '地点ID',
field: 'financer', field: 'siteId',
sort: 'custom', sort: 'custom',
isSearch: false isSearch: false,
isTable: false,
isForm: false,
isDetail:false,
}, },
{ {
label: '采购时间', label: '是否可用默认TRUE',
field: 'purchaseTime', field: 'available',
sort: 'custom',
isSearch: false,
isTable: false,
isForm: false,
isDetail:false,
},
{
label: '删除时间',
field: 'deletionTime',
sort: 'custom', sort: 'custom',
formatter: dateFormatter, formatter: dateFormatter,
isSearch: false, isSearch: false,
isTable: false,
isForm: false,
isDetail:false,
search: { search: {
component: 'DatePicker', component: 'DatePicker',
componentProps: { componentProps: {
@ -200,57 +255,29 @@ export const SparePart = useCrudSchemas(reactive<CrudSchema[]>([
type: 'datetime', type: 'datetime',
valueFormat: 'x' valueFormat: 'x'
} }
} },
},
{
label: '是否框架协议',
field: 'isFramework',
sort: 'custom',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
isSearch: true,
form: {
component: 'Switch',
value: 'TRUE',
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE'
}
}
},
{
label: '是否以旧换新',
field: 'isRadeIn',
sort: 'custom',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
isSearch: true,
form: {
component: 'Switch',
value: 'TRUE',
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE'
}
}
}, },
{ {
label: '备注', label: '删除人id',
field: 'remark', field: 'deleterId',
sort: 'custom', sort: 'custom',
isSearch: true isSearch: false,
isTable: false,
isForm: false,
isDetail:false,
}, },
{ {
label: '是否可用', label: '并发乐观锁',
field: 'available', field: 'concurrencyStamp',
sort: 'custom', sort: 'custom',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
isTable: true,
isDetail: false,
isForm: false,
isSearch: false, isSearch: false,
isTableForm: false, isTable: false,
isForm: false,
isDetail:false,
form: {
component: 'InputNumber',
value: 0
},
}, },
{ {
label: '操作', label: '操作',

2
src/views/login/components/LoginForm.vue

@ -15,7 +15,7 @@
<el-option <el-option
v-for="item in tenantArray" v-for="item in tenantArray"
:key="item" :key="item"
:label="item" :label="t(`ts.${item}`)"
:value="item" :value="item"
/> />
</el-select> </el-select>

4
src/views/login/login.vue

@ -10,7 +10,7 @@
<!-- 左上角的 logo + 系统标题 --> <!-- 左上角的 logo + 系统标题 -->
<div class="relative flex items-center "> <div class="relative flex items-center ">
<img alt="" class="mr-10px w-144px h-36px" src="@/assets/imgs/logo_white.png" /> <img alt="" class="mr-10px w-144px h-36px" src="@/assets/imgs/logo_white.png" />
<span class="text-20px font-bold">{{ underlineToHump(appStore.getTitle) }}</span> <span class="text-20px font-bold">{{ t(`ts.${underlineToHump(appStore.getTitle)}`) }}</span>
</div> </div>
<!-- 左边的背景图 + 欢迎语 --> <!-- 左边的背景图 + 欢迎语 -->
<div class="h-[calc(100%-60px)] flex items-center justify-center"> <div class="h-[calc(100%-60px)] flex items-center justify-center">
@ -34,7 +34,7 @@
> >
<div class="flex items-center at-2xl:hidden at-xl:hidden"> <div class="flex items-center at-2xl:hidden at-xl:hidden">
<img alt="" class="mr-10px w-144px h-36px" src="@/assets/imgs/logo_white.png" /> <img alt="" class="mr-10px w-144px h-36px" src="@/assets/imgs/logo_white.png" />
<span class="text-20px font-bold">{{ underlineToHump(appStore.getTitle) }}</span> <span class="text-20px font-bold">{{ t(`ts.${underlineToHump(appStore.getTitle)}`) }}</span>
</div> </div>
<div class="flex items-center justify-end space-x-10px"> <div class="flex items-center justify-end space-x-10px">
<!-- <ThemeSwitch /> --> <!-- <ThemeSwitch /> -->

4
src/views/wms/basicDataManage/itemManage/itemarea/itemarea.data.ts

@ -16,7 +16,7 @@ import { t } from '@/hooks/web/useI18n'
export const Itemarea = useCrudSchemas(reactive<CrudSchema[]>([ export const Itemarea = useCrudSchemas(reactive<CrudSchema[]>([
{ {
label: '物代码', label: '物代码',
field: 'itemCode', field: 'itemCode',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
@ -752,4 +752,4 @@ export const ItemareaDetail = useCrudSchemas(reactive<CrudSchema[]>([
// 表单校验 // 表单校验
export const ItemareaDetailRules = reactive({ export const ItemareaDetailRules = reactive({
}) })

2
src/views/wms/basicDataManage/itemManage/itemwarehouse/itemwarehouse.data.ts

@ -9,7 +9,7 @@ import { Itempackaging } from '../itempackage/itempackage.data'
export const Itemwarehouse = useCrudSchemas(reactive<CrudSchema[]>([ export const Itemwarehouse = useCrudSchemas(reactive<CrudSchema[]>([
{ {
label: '物代码', label: '物代码',
field: 'itemCode', field: 'itemCode',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,

2
src/views/wms/countManage/count/countJobMain/countJobMain.data.ts

@ -501,7 +501,7 @@ export const CountJobMain = useCrudSchemas(reactive<CrudSchema[]>([
isDetail: false, isDetail: false,
isForm: false, isForm: false,
table: { table: {
width: 120, width: 180,
fixed: 'right' fixed: 'right'
}, },
} }

69
src/views/wms/countManage/count/countJobMain/index.vue

@ -64,6 +64,19 @@
:searchTableParams="searchTableParams" :searchTableParams="searchTableParams"
:apiPage="CountJobDetailApi.getCountJobDetailPage" :apiPage="CountJobDetailApi.getCountJobDetailPage"
/> />
<!-- 导入 -->
<ImportDetailForm
ref="importFormRef"
url="/wms/count-job-main/import"
:importTemplateData="importTemplateData"
@success="importSuccess"
:updateIsDisable="true"
:coverIsDisable="true"
:mode="1"
:extend="rowMasterIdRef"
/>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
@ -186,7 +199,25 @@ const butttondata = (row,$index) => {
} }
return [ return [
// defaultButtons.mainListJobAccBtn({hide:isShowMainButton(row,['1'])}), // // defaultButtons.mainListJobAccBtn({hide:isShowMainButton(row,['1'])}), //
defaultButtons.mainListJobCloBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:count-job-main:close'}), // defaultButtons.mainListJobCloBtn({hide:isShowMainButton(row,['1','2']),hasPermi:'wms:count-job-main:close'}), //
{
label: '导出',
name: 'exportCountJob',
hide: isShowMainButton(row,['1','2']),
type: 'primary',
color: '',
link: true, //
hasPermi: '' // wms:count-job-main:exportCountJob
},
{
label: '导入',
name: 'importCountJob',
hide: isShowMainButton(row,['1','2']),
type: 'success',
color: '',
link: true, //
hasPermi: '' // wms:count-job-main:importCountJob
}
// defaultButtons.mainListJobAbaBtn({hide:isShowMainButton(row,['2'])}), // // defaultButtons.mainListJobAbaBtn({hide:isShowMainButton(row,['2'])}), //
// defaultButtons.mainListJobExeBtn({hide:isShowMainButton(row,['2'])}), // // defaultButtons.mainListJobExeBtn({hide:isShowMainButton(row,['2'])}), //
] ]
@ -202,6 +233,10 @@ const buttonTableClick = async (val, row) => {
handleClose(row.masterId) handleClose(row.masterId)
} else if (val == 'mainJobAcc') { // } else if (val == 'mainJobAcc') { //
console.log('列表-操作按钮事件-承接') console.log('列表-操作按钮事件-承接')
} else if (val == 'exportCountJob'){//
handleExportCountJob(row.masterId,row.number)
} else if( val == 'importCountJob'){ //
handleImport(row.masterId)
} }
} }
@ -240,6 +275,38 @@ const handleExport = async () => {
} }
} }
/** 单条任务导出 */
const handleExportCountJob = async (id: number,number: string) => {
try {
await message.exportConfirm()
exportLoading.value = true
const data = await CountJobMainApi.handleExportCountJob(id)
download.excel(data, '盘点任务主'+number+'.xlsx')
} catch {
}finally {
exportLoading.value = false
}
}
/** 导入 */
const importFormRef = ref()
const rowMasterIdRef = ref('')
const handleImport = (id: string) => {
rowMasterIdRef.value = id;
importFormRef.value.open()
}
//
const importTemplateData = reactive({
templateUrl: '',
templateTitle: '盘点任务导入模版.xlsx'
})
//
const importSuccess = () => {
getList()
}
// //
const searchFormClick = (searchData) => { const searchFormClick = (searchData) => {
tableObject.params = { tableObject.params = {

2
src/views/wms/deliversettlementManage/saleShipmentMainRecord/saleShipmentMainRecord.data.ts

@ -201,7 +201,7 @@ export const SaleShipmentDetailRecord = useCrudSchemas(reactive<CrudSchema[]>([
isTable:false isTable:false
}, },
{ {
label: '物代码', label: '物代码',
field: 'itemCode', field: 'itemCode',
sort: 'custom', sort: 'custom',
table: { table: {

4
src/views/wms/inventoryjobManage/packageManage/packageoverMain/packageoverJobMain/packageoverJobMain.data.ts

@ -545,7 +545,7 @@ export const PackageoverJobDetail = useCrudSchemas(reactive<CrudSchema[]>([
}, },
}, },
{ {
label: '物代码', label: '物代码',
field: 'itemCode', field: 'itemCode',
sort: 'custom', sort: 'custom',
table: { table: {
@ -818,4 +818,4 @@ export const PackageoverJobDetail = useCrudSchemas(reactive<CrudSchema[]>([
// 表单校验 // 表单校验
export const PackageoverJobDetailRules = reactive({ export const PackageoverJobDetailRules = reactive({
}) })

2
src/views/wms/inventoryjobManage/packageManage/packageoverMain/packageoverRetrospect/packageoverRetrospect.data.ts

@ -56,7 +56,7 @@ export const PackageoverRetrospect = useCrudSchemas(reactive<CrudSchema[]>([
}, },
}, },
{ {
label: '物代码', label: '物代码',
field: 'itemCode', field: 'itemCode',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,

2
src/views/wms/productionManage/productreceipt/productreceiptRequestMain/index.vue

@ -63,7 +63,7 @@
:clearable="true" :clearable="true"
style="width: 100%" style="width: 100%"
:disabled="true" :disabled="true"
placeholder="选择日期"/> :placeholder="t('ts.选择日期')"/>
</template> </template>
</BasicForm> </BasicForm>

2
src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRecordMain/productreceiptAssembleRecordMain.data.ts

@ -1028,7 +1028,7 @@ export const ProductreceiptDetailb = useCrudSchemas(reactive<CrudSchema[]>([
isSearch: true, isSearch: true,
}, },
{ {
label: '物代码', label: '物代码',
field: 'itemCode', field: 'itemCode',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,

2
src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRequestMain/index.vue

@ -63,7 +63,7 @@
:clearable="true" :clearable="true"
style="width: 100%" style="width: 100%"
:disabled="true" :disabled="true"
placeholder="选择日期"/> :placeholder="t('ts.选择日期')"/>
</template> </template>
</BasicForm> </BasicForm>

2
src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptJobMain/purchasereceiptJobMain.data.ts

@ -609,7 +609,7 @@ export const PurchasereceiptJobMain = useCrudSchemas(reactive<CrudSchema[]>([
isDetail: false, isDetail: false,
isForm: false, isForm: false,
table: { table: {
width: 120, width: 180,
fixed: 'right' fixed: 'right'
}, },
}, },

2
src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/index.vue

@ -66,7 +66,7 @@
:clearable="true" :clearable="true"
style="width: 100%" style="width: 100%"
:disabled="true" :disabled="true"
placeholder="选择日期"/> :placeholder="t('ts.选择日期')"/>
</template> </template>
</BasicForm> </BasicForm>
<!-- 详情 --> <!-- 详情 -->

2
src/views/wms/purchasereceiptManage/sparereceipt/sparereceiptRequestMain/index.vue

@ -67,7 +67,7 @@
:clearable="true" :clearable="true"
style="width: 100%" style="width: 100%"
:disabled="true" :disabled="true"
placeholder="选择日期"/> :placeholder="t('ts.选择日期')"/>
</template> </template>
</BasicForm> </BasicForm>

2
src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverBasicForm.vue

@ -29,7 +29,7 @@
:clearable="true" :clearable="true"
style="width: 100%" style="width: 100%"
:disabled="true" :disabled="true"
placeholder="选择日期"/> :placeholder="t('ts.选择日期')"/>
</template> </template>
</BasicForm> </BasicForm>
</template> </template>

Loading…
Cancel
Save