Browse Source

Merge branch 'master_hella' into master_hella_20240701

master_hella_20240701
陈薪名 4 months ago
parent
commit
e4eabe549a
  1. 1
      package.json
  2. 2
      src/api/eam/equipmentRepairJobMain/index.ts
  3. 59
      src/api/eam/recordDeviceChanged/index.ts
  4. 4
      src/api/wms/packageoverJobMain/index.ts
  5. 4
      src/components/BasicForm/src/BasicForm.vue
  6. 7
      src/components/TableForm/src/TableForm.vue
  7. 4
      src/main.ts
  8. 13
      src/utils/validator.ts
  9. 121
      src/views/eam/equipmentAccounts/ablesForm.vue
  10. 30
      src/views/eam/equipmentMainPart/equipmentMainPart.data.ts
  11. 44
      src/views/eam/itemAccounts/index.vue
  12. 244
      src/views/eam/recordDeviceChanged/index.vue
  13. 181
      src/views/eam/recordDeviceChanged/recordDeviceChanged.data.ts
  14. 3
      src/views/eam/sparePartsApplyMain/SparePartsApply.data.ts
  15. 10
      src/views/eam/sparePartsApplyMain/index.vue
  16. 4
      src/views/qms/aql/aql.data.ts
  17. 1
      src/views/qms/counter/counter.data.ts
  18. 30
      src/views/qms/inspectionJob/addForm.vue
  19. 77
      src/views/qms/inspectionScheme/addForm.vue
  20. 3
      src/views/qms/inspectionScheme/index.vue
  21. 3
      src/views/qms/inspectionTemplate/addForm.vue
  22. 2
      src/views/system/user/index.vue
  23. 18
      src/views/wms/basicDataManage/itemManage/itembasic/itembasic.data.ts
  24. 2
      src/views/wms/basicDataManage/subject/mstr/mstr.data.ts
  25. 27
      src/views/wms/countManage/count/countJobMain/countJobMain.data.ts
  26. 2
      src/views/wms/countManage/count/countPlanMain/countPlanMain.data.ts
  27. 35
      src/views/wms/countManage/count/countRecordMain/countRecordMain.data.ts
  28. 25
      src/views/wms/countManage/count/countRequestMain/countRequestMain.data.ts
  29. 32
      src/views/wms/countManage/countadjust/countadjustRecordMain/countadjustRecordMain.data.ts
  30. 36
      src/views/wms/countManage/countadjust/countadjustRequestMain/countadjustRequestMain.data.ts
  31. 36
      src/views/wms/inventoryjobManage/packageManage/packageoverMain/packageoverJobMain/index.vue
  32. 18
      src/views/wms/inventoryjobManage/packageManage/packageoverMain/packageoverJobMain/packageoverJobMain.data.ts
  33. 32
      src/views/wms/issueManage/issue/issueRequestMain/index.vue
  34. 47
      src/views/wms/issueManage/issue/issueRequestMain/issueRequestMain.data.ts
  35. 9
      src/views/wms/issueManage/repleinsh/repleinshRequestMain/index.vue
  36. 18
      src/views/wms/issueManage/repleinsh/repleinshRequestMain/repleinshRequestMain.data.ts
  37. 7
      src/views/wms/productionManage/productrepair/productrepairRequestMain/productrepairRequestMain.data.ts
  38. 19
      src/views/wms/productionManage/productscrap/productscrapRequestMain/index.vue
  39. 13
      src/views/wms/productionManage/productscrap/productscrapRequestMain/productscrapRequestMain.data.ts
  40. 9
      src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRecordMain/purchasereturnRecordMain.data.ts

1
package.json

@ -55,6 +55,7 @@
"vue": "^3.3.4",
"vue-dompurify-html": "^4.1.4",
"vue-i18n": "^9.4.1",
"vue-next-focus": "^0.0.12",
"vue-router": "^4.2.5",
"vue-types": "^5.1.1",
"vuedraggable": "^4.1.0",

2
src/api/eam/equipmentRepairJobMain/index.ts

@ -115,7 +115,7 @@ export const backEquipmentRepairOrder = async (data: EquipmentRepairJobMainVO) =
return await request.post({ url: `/eam/equipment-repair-job-main/fallback`, data })
}
//报修验证不通过,生成新工单
//报修验证
export const createEquipmentRepairNewOrder = async (data: EquipmentRepairJobMainVO) => {
return await request.post({ url: `/eam/equipment-repair-job-main/createNew`, data })
}

59
src/api/eam/recordDeviceChanged/index.ts

@ -0,0 +1,59 @@
import request from '@/config/axios'
export interface RecordDeviceChangedVO {
id: number
code: string
name: string
statusBefore: string
statusAfter: string
operator: number
operateTime: Date
departmentCode: string
remark: string
siteId: string
available: string
deletionTime: Date
deleterId: byte[]
concurrencyStamp: number
}
// 查询设备变更记录列表
export const getRecordDeviceChangedPage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/eam/record-device-changed/senior', data })
} else {
return await request.get({ url: `/eam/record-device-changed/page`, params })
}
}
// 查询设备变更记录详情
export const getRecordDeviceChanged = async (id: number) => {
return await request.get({ url: `/eam/record-device-changed/get?id=` + id })
}
// 新增设备变更记录
export const createRecordDeviceChanged = async (data: RecordDeviceChangedVO) => {
return await request.post({ url: `/eam/record-device-changed/create`, data })
}
// 修改设备变更记录
export const updateRecordDeviceChanged = async (data: RecordDeviceChangedVO) => {
return await request.put({ url: `/eam/record-device-changed/update`, data })
}
// 删除设备变更记录
export const deleteRecordDeviceChanged = async (id: number) => {
return await request.delete({ url: `/eam/record-device-changed/delete?id=` + id })
}
// 导出设备变更记录 Excel
export const exportRecordDeviceChanged = async (params) => {
return await request.download({ url: `/eam/record-device-changed/export-excel`, params })
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/eam/record-device-changed/get-import-template' })
}

4
src/api/wms/packageoverJobMain/index.ts

@ -69,6 +69,10 @@ export const updatePackageoverJobMain = async (data: PackageoverJobMainVO) => {
export const deletePackageoverJobMain = async (id: number) => {
return await request.delete({ url: `/wms/packageover-job-main/delete?id=` + id })
}
// 关闭翻包任务主
export const closePackageoverJobMain = async (id: number) => {
return await request.put({ url: `/wms/packageover-job-main/close?id=` + id })
}
// 导出翻包任务主 Excel
export const exportPackageoverJobMain = async (params) => {

4
src/components/BasicForm/src/BasicForm.vue

@ -619,12 +619,14 @@ const submitForm = async () => {
formLoading.value = true
if (formType.value == 'create') {
const validateForm = await tableFormRef.value.validateForm()
if (props.tableFormDataLength) {
if (!validateForm && props.tableFormDataLength) {
if (props.tableData.length == 0) {
message.warning('请填写明细信息!')
formLoading.value = false
return
}
formLoading.value = false
return
}
//
try {

7
src/components/TableForm/src/TableForm.vue

@ -62,8 +62,8 @@
:prop="headerItem.field"
:align="headerItem?.tableForm?.align || 'center'"
:sortable="headerItem?.tableForm?.sortable || false"
:width="headerItem?.tableForm?.width || '200px'"
:min-width="headerItem?.tableForm?.minWidth || 'auto'"
:width="headerItem?.tableForm?.width"
:min-width="headerItem?.tableForm?.minWidth || '200px'"
>
<el-form
ref="TableBaseForm_Ref"
@ -608,6 +608,9 @@ const TableBaseForm_Ref = ref()
const validateForm = () => {
console.log(TableBaseForm_Ref.value)
let _lists = TableBaseForm_Ref.value?.map((v) => v.validate())
if(!_lists ||_lists.length == 0){
return false
}
return Promise.all(_lists)
.then(() => {
return true

4
src/main.ts

@ -45,6 +45,9 @@ import VueDOMPurifyHTML from 'vue-dompurify-html' // 解决v-html 的安全隐
import DataVVue3 from '@kjgl77/datav-vue3'
import { useLocaleStore } from '@/store/modules/locale'
import { vue_next_focus } from "vue-next-focus";
// 创建实例
const setupAll = async () => {
const app = createApp(App)
@ -67,6 +70,7 @@ const setupAll = async () => {
app.use(VueDOMPurifyHTML)
app.use(DataVVue3)
app.use( vue_next_focus )
app.mount('#app')
app.config.warnHandler = () => null;

13
src/utils/validator.ts

@ -788,6 +788,19 @@ export function validatePercent(rule, value, callback){
}
}
export function validateSampleCode(rule, value, callback){
if (value) {
const orgReg =/[A-Z]/
if (orgReg.test(value)) {
callback()
} else {
callback(new Error('样本字码错误'))
}
} else {
callback()
}
}
export default {
validateCode,
validateEmail,

121
src/views/eam/equipmentAccounts/ablesForm.vue

@ -0,0 +1,121 @@
<template>
<Dialog v-model="dialogVisible" :title="dialogTitle" :close-on-click-modal="false">
<el-form ref="basicFormRef" v-loading="formLoading" :model="formData" :rules="formRules" label-width="100px">
<el-row>
<el-col :span="12">
<el-form-item label="变更原因" prop="verifyContent">
<el-input v-model="formData.changeReason" type="textarea" :input-style="{height:'100px'}" maxlength="300" placeholder="请输入变更原因" />
</el-form-item>
</el-col>
</el-row>
</el-form>
<template #footer>
<el-button :disabled="formLoading" type="primary" @click="submitForm('success')"> </el-button>
<el-button @click="handleClose('close')"> </el-button>
</template>
</Dialog>
</template>
<script lang="ts" setup>
import * as EquipmentAccountsApi from '@/api/eam/equipmentAccounts'
import {ElInput} from "element-plus";
defineOptions({ name: 'TeamForm' })
const { t } = useI18n() //
const message = useMessage() //
const dialogVisible = ref(false) //
const dialogTitle = ref('') //
const formLoading = ref(false) // 12
const formType = ref('') //
const formData = ref({
id:'',
code:'',
changeReason: '',
status:'',
available:''
})
const formRules = reactive({
changeReason: [
{ required: true, message: '变更原因不能为空', trigger: 'blur' },
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
],
})
const basicFormRef = ref() // Ref
/** 初始化弹窗 */
const open = async (type: string, row?: object) => {
dialogVisible.value = true
if(type == 'disable'){
dialogTitle.value = '禁用'
formData.value.status = 'DISABLE'
formData.value.available = 'FALSE'
}else if(type == 'enable'){
dialogTitle.value = '启用'
formData.value.status = 'NORMAL'
formData.value.available = 'TRUE'
}else{
dialogTitle.value = t('action.' + type)
}
formType.value = type
//
formData.value.id = row.id
formData.value.code = row.code
}
defineExpose({ open }) // open
/** 提交表单 */
const submitForm = async (val) => {
//
if (!basicFormRef) return
const valid = await basicFormRef.value.validate()
if (!valid) return
//
await EquipmentAccountsApi.ableEquipmentAccountsMain(formData.value)
//success
emit('success',formData.value.id)
dialogVisible.value = false
}
const handleClose=(val)=>{
dialogVisible.value = false
emit('close',val)
}
//
const emit = defineEmits(['close','success'])
</script>
<style scoped>
.tag-container {
margin-top: 10px; /* 可根据需要调整标签容器与表单项之间的间距 */
border: 1px solid #ccc; /* 添加边框样式 */
padding: 10px; /* 可根据需要调整容器内边距 */
width: 950px; /* 设置固定宽度为 950px */
overflow-y: auto; /* 当内容溢出容器高度时显示滚动条 */
word-wrap: break-word; /* 使用 word-wrap 属性实现超出范围换行 */
overflow-wrap: break-word; /* 兼容性更好的写法 */
flex-wrap: wrap;
}
.input-with-button {
display: flex;
align-items: center;
width: 100%;
}
.input-with-button > .el-input {
flex: 1;
/*margin-right: 10px;*/
}
</style>

30
src/views/eam/equipmentMainPart/equipmentMainPart.data.ts

@ -5,10 +5,11 @@ import { dateFormatter } from '@/utils/formatTime'
export const EquipmentMainPartRules = reactive({
name: [required],
code: [required],
type: [required],
type: [required]
})
export const EquipmentMainPart = useCrudSchemas(reactive<CrudSchema[]>([
export const EquipmentMainPart = useCrudSchemas(
reactive<CrudSchema[]>([
{
label: 'id',
field: 'id',
@ -16,19 +17,19 @@ export const EquipmentMainPart = useCrudSchemas(reactive<CrudSchema[]>([
isSearch: false,
isTable: false,
isForm: false,
isDetail:false,
isDetail: false
},
{
label: '编码',
field: 'code',
sort: 'custom',
isSearch: true,
isSearch: true
},
{
label: '名称',
field: 'name',
sort: 'custom',
isSearch: true,
isSearch: true
},
{
label: '类型',
@ -55,7 +56,7 @@ export const EquipmentMainPart = useCrudSchemas(reactive<CrudSchema[]>([
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
isForm: false,
isForm: false
},
{
label: '部门id',
@ -64,13 +65,13 @@ export const EquipmentMainPart = useCrudSchemas(reactive<CrudSchema[]>([
isSearch: false,
isTable: false,
isForm: false,
isDetail:false,
isDetail: false
},
{
label: '备注',
field: 'remark',
sort: 'custom',
isSearch: false,
isSearch: false
},
{
label: '地点ID',
@ -79,7 +80,7 @@ export const EquipmentMainPart = useCrudSchemas(reactive<CrudSchema[]>([
isSearch: false,
isTable: false,
isForm: false,
isDetail:false,
isDetail: false
},
{
label: '是否启用',
@ -91,7 +92,7 @@ export const EquipmentMainPart = useCrudSchemas(reactive<CrudSchema[]>([
isDetail: false,
isSearch: false,
isTableForm: false,
isForm: false,
isForm: false
},
{
label: '删除时间',
@ -116,7 +117,7 @@ export const EquipmentMainPart = useCrudSchemas(reactive<CrudSchema[]>([
type: 'datetime',
valueFormat: 'x'
}
},
}
},
{
label: '删除人id',
@ -125,7 +126,7 @@ export const EquipmentMainPart = useCrudSchemas(reactive<CrudSchema[]>([
isSearch: false,
isTable: false,
isForm: false,
isDetail:false,
isDetail: false
},
{
label: '并发乐观锁',
@ -138,7 +139,7 @@ export const EquipmentMainPart = useCrudSchemas(reactive<CrudSchema[]>([
form: {
component: 'InputNumber',
value: 0
},
}
},
{
label: '操作',
@ -149,4 +150,5 @@ export const EquipmentMainPart = useCrudSchemas(reactive<CrudSchema[]>([
fixed: 'right'
}
}
]))
])
)

44
src/views/eam/itemAccounts/index.vue

@ -31,9 +31,9 @@
v-model:currentPage="tableObject.currentPage"
v-model:sort="tableObject.sort"
>
<template #code="{ row }">
<el-button type="primary" link @click="openDetail(row, '代码', row.code)">
<span>{{ row.code }}</span>
<template #itemNumber="{ row }">
<el-button type="primary" link @click="openDetail(row, '代码', row.itemNumber)">
<span>{{ row.itemNumber }}</span>
</el-button>
</template>
<template #action="{ row }">
@ -42,13 +42,6 @@
@button-base-click="buttonTableClick($event, row)"
/>
</template>
<!-- <template #upload="{ row }">
<ButtonBase
v-if="row.filePathList != null && row.filePathList.length != 0"
:Butttondata="butttondataView(row)"
@button-base-click="buttonTableClick($event, row)"
/>
</template> -->
</Table>
</ContentWrap>
@ -67,7 +60,20 @@
<SearchTable ref="searchTableRef" @searchTableSuccess="submitItem" />
<!-- 详情 -->
<Detail ref="detailRef" :isBasic="true" :allSchemas="ItemAccounts.allSchemas" />
<DetailLedger
ref="detailRef"
:isBasic="true"
:allSchemas="ItemAccounts.allSchemas"
:subTabs="subTabList"
:operationRecordList="operationRecordList"
@handleOperationTabsChange="handleOperationTabsChange"
:detailAllSchemas="detailAllSchemas"
:apiPage="apiPage"
:dialogApiPage="dialogApiPage"
:dialogAllSchemas="dialogAllSchemas"
:dynamicInfoFields="dynamicInfoFields"
funcCode="tool_mould_file"
/>
<!-- 导入 -->
<ImportForm
@ -309,6 +315,20 @@ const openForm = (type: string, row?: any) => {
urls.value = row.filePathList
viewKey.value += 1
} else {
if (type == 'create') {
ItemAccounts.allSchemas.formSchema.forEach((item) => {
if (item.field == 'qty') {
item.componentProps.disabled = false
}
})
} else if (type == 'update') {
ItemAccounts.allSchemas.formSchema.forEach((item) => {
if (item.field == 'qty') {
item.componentProps.disabled = true
}
})
}
basicFormRef.value.open(type, row)
}
}
@ -340,7 +360,7 @@ const formsSuccess = async (formType, data) => {
/** 详情操作 */
const detailRef = ref()
const openDetail = (row: any, titleName: any, titleValue: any) => {
detailRef.value.openDetail(row, titleName, titleValue, 'basicItemAccounts')
detailRef.value.openDetail(row, titleName, titleValue, 'ItemAccounts')
}
/** 删除按钮操作 */

244
src/views/eam/recordDeviceChanged/index.vue

@ -0,0 +1,244 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<Search :schema="RecordDeviceChanged.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" />
</ContentWrap>
<!-- 列表头部 -->
<TableHead
:HeadButttondata="HeadButttondata"
@button-base-click="buttonBaseClick"
:routeName="routeName"
@updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick"
:allSchemas="RecordDeviceChanged.allSchemas"
/>
<!-- 列表 -->
<ContentWrap>
<Table
:columns="tableColumns"
:data="tableObject.tableList"
:loading="tableObject.loading"
:pagination="{
total: tableObject.total
}"
v-model:pageSize="tableObject.pageSize"
v-model:currentPage="tableObject.currentPage"
v-model:sort="tableObject.sort"
>
<template #code="{row}">
<el-button type="primary" link @click="openDetail(row, '代码', row.code)">
<span>{{ row.code }}</span>
</el-button>
</template>
<template #action="{ row }">
<ButtonBase :Butttondata="butttondata" @button-base-click="buttonTableClick($event,row)" />
</template>
</Table>
</ContentWrap>
<!-- 表单弹窗添加/修改 -->
<BasicForm
ref="basicFormRef"
@success="formsSuccess"
:rules="RecordDeviceChangedRules"
:formAllSchemas="RecordDeviceChanged.allSchemas"
:apiUpdate="RecordDeviceChangedApi.updateRecordDeviceChanged"
:apiCreate="RecordDeviceChangedApi.createRecordDeviceChanged"
@searchTableSuccess="searchTableSuccess"
:isBusiness="false"
/>
<!-- 详情 -->
<Detail ref="detailRef" :isBasic="true" :allSchemas="RecordDeviceChanged.allSchemas" />
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/eam/record-device-changed/import" :importTemplateData="importTemplateData" @success="importSuccess" />
</template>
<script setup lang="ts">
import download from '@/utils/download'
import { RecordDeviceChanged,RecordDeviceChangedRules } from './recordDeviceChanged.data'
import * as RecordDeviceChangedApi from '@/api/eam/recordDeviceChanged'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import Detail from '@/components/Detail/src/Detail.vue'
defineOptions({ name: 'RecordDeviceChanged' })
const message = useMessage() //
const { t } = useI18n() //
const route = useRoute() //
const routeName = ref()
routeName.value = route.name
const tableColumns = ref(RecordDeviceChanged.allSchemas.tableColumns)
//
const searchTableSuccess = (formField, searchField, val, formRef) => {
nextTick(() => {
const setV = {}
setV[formField] = val[0][searchField]
formRef.setValues(setV)
})
}
//
const updataTableColumns = (val) => {
tableColumns.value = val
}
const { tableObject, tableMethods } = useTable({
getListApi: RecordDeviceChangedApi.getRecordDeviceChangedPage //
})
//
const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
//defaultButtons.defaultAddBtn({hasPermi:'eam:recordDeviceChanged:create'}), //
//defaultButtons.defaultImportBtn({hasPermi:'eam:recordDeviceChanged:import'}), //
defaultButtons.defaultExportBtn({hasPermi:'eam:recordDeviceChanged:export'}), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), //
// {
// label: '',
// name: 'zdy',
// hide: false,
// type: 'primary',
// icon: 'Select',
// color: ''
// },
]
//
const buttonBaseClick = (val, item) => {
if (val == 'add') { //
openForm('create')
} else if (val == 'import') { //
handleImport()
} else if (val == 'export') { //
handleExport()
} else if (val == 'refresh') { //
getList()
} else if (val == 'filtrate') { //
} else { //
console.log('其他按钮', item)
}
}
// -
const butttondata = [
//defaultButtons.mainListEditBtn({hasPermi:'eam:recordDeviceChanged:update'}), //
//defaultButtons.mainListDeleteBtn({hasPermi:'eam:recordDeviceChanged:delete'}), //
]
// -
const buttonTableClick = async (val, row) => {
if (val == 'edit') { //
openForm('update', row)
} else if (val == 'delete') { //
handleDelete(row.id)
}
}
/** 添加/修改操作 */
const basicFormRef = ref()
const openForm = (type: string, row?: any) => {
basicFormRef.value.open(type, row)
}
// form
const formsSuccess = async (formType,data) => {
var isHave =RecordDeviceChanged.allSchemas.formSchema.some(function (item) {
return item.field === 'activeTime' || item.field === 'expireTime';
});
if(isHave){
if(data.activeTime && data.expireTime && data.activeTime >=data.expireTime){
message.error('失效时间要大于生效时间')
return;
}
}
if(data.activeTime==0)data.activeTime = null;
if(data.expireTime==0)data.expireTime = null;
if (formType === 'create') {
await RecordDeviceChangedApi.createRecordDeviceChanged(data)
message.success(t('common.createSuccess'))
} else {
await RecordDeviceChangedApi.updateRecordDeviceChanged(data)
message.success(t('common.updateSuccess'))
}
basicFormRef.value.dialogVisible = false
getList()
}
/** 详情操作 */
const detailRef = ref()
const openDetail = (row: any, titleName: any, titleValue: any) => {
detailRef.value.openDetail(row, titleName, titleValue, 'basicRecordDeviceChanged')
}
/** 删除按钮操作 */
const handleDelete = async (id: number) => {
try {
//
await message.delConfirm()
//
await RecordDeviceChangedApi.deleteRecordDeviceChanged(id)
message.success(t('common.delSuccess'))
//
await getList()
} catch {}
}
/** 导出按钮操作 */
const exportLoading = ref(false) //
const handleExport = async () => {
try {
//
await message.exportConfirm()
//
exportLoading.value = true
const data = await RecordDeviceChangedApi.exportRecordDeviceChanged(tableObject.params)
download.excel(data, '设备变更记录.xlsx')
} catch {
} finally {
exportLoading.value = false
}
}
/** 导入 */
const importFormRef = ref()
const handleImport = () => {
importFormRef.value.open()
}
//
const importTemplateData = reactive({
templateUrl: '',
templateTitle: '设备变更记录导入模版.xlsx'
})
//
const importSuccess = () => {
getList()
}
//
const searchFormClick = (searchData) => {
tableObject.params = {
isSearch: true,
filters: searchData.filters
}
getList() //
}
/** 初始化 **/
onMounted(async () => {
getList()
//importTemplateData.templateUrl = await RecordDeviceChangedApi.importTemplate()
})
</script>

181
src/views/eam/recordDeviceChanged/recordDeviceChanged.data.ts

@ -0,0 +1,181 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime'
// 表单校验
export const RecordDeviceChangedRules = reactive({
code: [required],
name: [required],
})
export const RecordDeviceChanged = useCrudSchemas(reactive<CrudSchema[]>([
{
label: 'id',
field: 'id',
sort: 'custom',
isForm: false,
},
{
label: '设备编号',
field: 'code',
sort: 'custom',
isSearch: true,
},
{
label: '名称',
field: 'name',
sort: 'custom',
isSearch: true,
},
{
label: '变更前状态',
field: 'statusBefore',
sort: 'custom',
dictType: DICT_TYPE.DEVICE_STATUS,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
isSearch: true,
},
{
label: '变更后状态',
field: 'statusAfter',
sort: 'custom',
dictType: DICT_TYPE.DEVICE_STATUS,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
isSearch: true,
},
{
label: '操作人',
field: 'operator',
sort: 'custom',
isSearch: true,
},
{
label: '操作时间',
field: 'operateTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: true,
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')]
}
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
valueFormat: 'x'
}
},
},
{
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: '部门id',
field: 'departmentCode',
sort: 'custom',
isSearch: false,
isTable: false,
isForm: false,
isDetail:false,
},
{
label: '备注',
field: 'remark',
sort: 'custom',
isSearch: true,
},
{
label: '地点ID',
field: 'siteId',
sort: 'custom',
isSearch: false,
isTable: false,
isForm: false,
isDetail:false,
},
{
label: '是否可用默认TRUE',
field: 'available',
sort: 'custom',
isSearch: false,
isTable: false,
isForm: false,
isDetail:false,
},
{
label: '删除时间',
field: 'deletionTime',
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')]
}
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
valueFormat: 'x'
}
},
},
{
label: '删除人id',
field: 'deleterId',
sort: 'custom',
isSearch: false,
isTable: false,
isForm: false,
isDetail:false,
},
{
label: '并发乐观锁',
field: 'concurrencyStamp',
sort: 'custom',
isSearch: false,
isTable: false,
isForm: false,
isDetail:false,
form: {
component: 'InputNumber',
value: 0
},
},
{
label: '操作',
field: 'action',
isForm: false,
table: {
width: 150,
fixed: 'right'
}
}
]))

3
src/views/eam/sparePartsApplyMain/SparePartsApply.data.ts

@ -208,7 +208,7 @@ export const SparePartsApplyMain = useCrudSchemas(
isForm: false
},
{
label: '操作11',
label: '操作',
field: 'action',
isForm: false,
table: {
@ -257,7 +257,6 @@ export const SparePartsApplyDetail = useCrudSchemas(
searchListPlaceholder: '请选择备件编号', // 输入框占位文本
searchField: 'itemNumber', // 查询弹窗赋值字段
searchTitle: '备件信息', // 查询弹窗标题
searchAllSchemas: ItemAccounts.allSchemas, // 查询弹窗所需类
searchPage: ItemAccountsApi.getItemAccountsPage, // 查询弹窗所需分页方法
searchCondition: [

10
src/views/eam/sparePartsApplyMain/index.vue

@ -254,11 +254,11 @@ const butttondata = (row) => {
defaultButtons.mainListApproveBtn({
hide: isShowStatusButton(row, ['3']),
hasPermi: 'eam:spare-parts-in-location-main:approve'
}), //
defaultButtons.mainListFinishBtn({
hide: isShowStatusButton(row, ['4']),
hasPermi: 'eam:spare-parts-in-location-main:finish'
}) //
}) //
// defaultButtons.mainListFinishBtn({
// hide: isShowStatusButton(row, ['4']),
// hasPermi: 'eam:spare-parts-in-location-main:finish'
// }) //
]
}

4
src/views/qms/aql/aql.data.ts

@ -1,13 +1,13 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime'
import { getSamplingScheme } from "@/api/qms/aql";
import { validateNum } from "@/utils/validator";
import {validateNum, validateSampleCode} from "@/utils/validator";
// 表单校验
export const AqlRules = reactive({
code: [required],
inspectionQualification: [required],
sampleCharacterCode: [required, {max: 1, message: '长度不得超过1个字符', trigger: 'blur' }],
sampleCharacterCode: [required, {max: 1, message: '长度不得超过1个字符', trigger: 'blur' }, {validator: validateSampleCode, message: '请输入1个大写字母', trigger: 'blur' }],
sampleQty: [required,{ validator: validateNum, message: '请输入整数', trigger: 'blur' }],
a0separator010: [required,{ validator: validateNum, message: '请输入整数', trigger: 'blur' }],
r0separator010: [required,{ validator: validateNum, message: '请输入整数', trigger: 'blur' }],

1
src/views/qms/counter/counter.data.ts

@ -30,6 +30,7 @@ export const Counter = useCrudSchemas(reactive<CrudSchema[]>([
field: 'inspectionType',
sort: 'custom',
isSearch: true,
dictType: DICT_TYPE.INSPECTION_TYPE,
table: {
width: 175
}

30
src/views/qms/inspectionJob/addForm.vue

@ -2,7 +2,8 @@
<div>
<Dialog :title="dialogTitle" v-model="dialogVisible" :width="dialogWidth" :close-on-click-modal="false"
:vLoading="formLoading">
<div style="max-height: 80vh; overflow-y: auto; padding: 0px 20px">
<div class="box" style="max-height: 80vh; overflow-y: auto; padding: 0px 20px" ref="mianscroll">
<el-backtop :right="40" :bottom="100" target='.box' @click="topScrollClick"/>
<Form ref="formMainRef" :rules="rules" :schema="formSchema" :is-col="true" @opensearchTable="opensearchTable" />
<div class="small-title">包装列表</div>
<div style="border:1px solid #dedede;margin-bottom:20px;display: flex;">
@ -12,7 +13,7 @@
</div>
<el-tabs v-model="editableTabsValue" class="demo-tabs" @edit="handleTabsEdit" type="border-card"
tab-position="left" :stretch="false">
<el-tab-pane v-for="item in data.subList" :key="item.name" :label="item.processDescribe" :name="item.name">
<el-tab-pane v-for="item in data.subList" :key="item.name" :label="item.processDescribe" :name="item.name" v-next-focus>
<div class="small-title">检验工序</div>
<el-form :model="item" label-width="auto" :rules="rules" ref="formProcessRef">
<el-row :gutter="20">
@ -175,7 +176,7 @@
</el-col>
<!-- 手动评估的时候显示 -->
<el-col :span="12" v-if="item.samplingProcessRespVO.evaluationMode == 1">
<el-form-item label="评估代码" required>
<el-form-item label="评估代码" required prop="inspectionJobCharacteristicsUpdateReqVO.estimateCode">
<el-select v-model="item.inspectionJobCharacteristicsUpdateReqVO.estimateCode" placeholder="请选择评估代码"
@change="changeFeatureType">
<el-option v-for="dict in getStrDictOptions(DICT_TYPE.EVALUATION_CODE)" :key="dict.value"
@ -415,7 +416,7 @@
list = await InspectionJobDetailPageApi.getInspectionJobDetailList(row.id)
data.value.packageList = await InspectionJobPackageApi.getInspectionJobPackageList(row.id)
list.forEach((item, index) => {
editableTabsValue.value = index + 1
// editableTabsValue.value = index + 1
item.name = index + 1
item.inspectionJobCharacteristicsUpdateReqVO = item.inspectionJobCharacteristicsRespVO
@ -444,8 +445,8 @@
inspectionValue: '', //
qualitativeCode: '', //
defectLevel: '', //
qualifiedQuantity: '', //
unqualifiedQuantity: '' //
qualifiedQuantity: parseFloat((parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.sampleQty) * parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.samplePieceSize)).toFixed(6)), //
unqualifiedQuantity: '0' //
}
)
}
@ -473,6 +474,9 @@
rules.value['inspectionJobCharacteristicsUpdateReqVO.estimateCode'][0].required = false
}
})
list.forEach(item => {
item.inspectionJobCharacteristicsUpdateReqVO.inspectionStartTime = new Date()
})
data.value.subList = list
/**
设置采样数量默认第一个包装采样数量<总数量显示数量字段第二个包装和剩下的总数量对比以此类推
@ -520,7 +524,7 @@
defineExpose({ open, dialogVisible, formLoading }) // open
import type { TabPaneName } from 'element-plus'
const editableTabsValue = ref('1')
const editableTabsValue = ref(1)
// const editableTabs = ref([])
const handleTabsEdit = (targetName : TabPaneName | undefined, action : 'remove' | 'add') => {
if (action === 'add') {
@ -1028,6 +1032,12 @@
cur.defectLevel = obj.defectLevel
cur.estimateCode = obj.estimateCode
}
const mianscroll =ref()
const topScrollClick=()=> {
nextTick(() => {
mianscroll.value.scrollTo({ top: 550, behavior: 'smooth' });
})
}
</script>
<style scoped>
.small-title {
@ -1039,11 +1049,15 @@
</style>
<style>
.el-tabs--left .el-tabs__header.is-left {
min-height: 700px !important;
padding-bottom: 5000px;
margin-bottom: -5000px;
min-width: 150px !important;
}
.el-tabs--left.el-tabs--border-card .el-tabs__item.is-left {
min-width: 120px !important;
}
.el-backtop{
position: absolute!important;
}
</style>

77
src/views/qms/inspectionScheme/addForm.vue

@ -819,6 +819,76 @@ const open = async (type: string, row?: any, masterParmas?: any, titleName?: any
isShowField.value = 0 //isShowField == 0aql
if (row) {
data.value = JSON.parse(JSON.stringify(row))
//
if(formType.value == 'create'){
data.value.id = ''
data.value.code = ''
data.value.itemCode = ''
data.value.process= []
let list =[]
if (row.content) {
list = JSON.parse(row.content)
} else {
list = await InspectionProcessPageApi.getListByTempleteCode(row.programmeTemplateCode)
}
let arr = []
list.forEach((item, index) => {
editableTabsValue.value = index + 1
item.name = index + 1
console.log(item.inspectionCharacteristicsBaseVO)
let obj = {
inspectionCode:item.inspectionCode,
description:item.description,
inspectionCharCode:item.inspectionCharCode,
sequenceCode:item.sequenceCode,
name : index + 1,
inspectionCharacteristicsBaseVO:{
description:item.inspectionCharacteristicsBaseVO.description,
featureType:item.inspectionCharacteristicsBaseVO.featureType,
inspectionMethodCode:item.inspectionCharacteristicsBaseVO.inspectionMethodCode,
inspectionMethodName:item.inspectionCharacteristicsBaseVO.inspectionMethodName,
samplingProcessCode:item.inspectionCharacteristicsBaseVO.samplingProcessCode,
isCanUpdate:item.inspectionCharacteristicsBaseVO.isCanUpdate,
isDestructionInspection:item.inspectionCharacteristicsBaseVO.isDestructionInspection,
quantifyCapping:item.inspectionCharacteristicsBaseVO.quantifyCapping,
quantifyDecimal:item.inspectionCharacteristicsBaseVO.quantifyDecimal,
quantifyIsCapping:item.inspectionCharacteristicsBaseVO.quantifyIsCapping,
quantifyIsLowlimit:item.inspectionCharacteristicsBaseVO.quantifyIsLowlimit,
quantifyIsTarget:item.inspectionCharacteristicsBaseVO.quantifyIsTarget,
quantifyLowlimit:item.inspectionCharacteristicsBaseVO.quantifyLowlimit,
quantifyQuantifyCode:item.inspectionCharacteristicsBaseVO.quantifyQuantifyCode,
quantifyQuantifyName:item.inspectionCharacteristicsBaseVO.quantifyQuantifyName,
quantifyTarget:item.inspectionCharacteristicsBaseVO.quantifyTarget,
quantifyUom:item.inspectionCharacteristicsBaseVO.quantifyUom,
resultEntryMethod:item.inspectionCharacteristicsBaseVO.resultEntryMethod,
samplingProcessCode:item.inspectionCharacteristicsBaseVO.samplingProcessCode,
samplingProcessName:item.inspectionCharacteristicsBaseVO.samplingProcessName,
}
}
//
if (item.inspectionCharacteristicsBaseVO.quantifyIsCapping) {
rules.value['inspectionCharacteristicsBaseVO.quantifyCapping'][0].required = true
} else {
rules.value['inspectionCharacteristicsBaseVO.quantifyCapping'][0].required = false
}
if (item.inspectionCharacteristicsBaseVO.quantifyIsLowlimit) {
rules.value['inspectionCharacteristicsBaseVO.quantifyLowlimit'][0].required = true
} else {
rules.value['inspectionCharacteristicsBaseVO.quantifyLowlimit'][0].required = false
}
if (item.inspectionCharacteristicsBaseVO.quantifyIsTarget) {
rules.value['inspectionCharacteristicsBaseVO.quantifyTarget'][0].required = true
} else {
rules.value['inspectionCharacteristicsBaseVO.quantifyTarget'][0].required = false
}
arr.push(obj)
})
data.value.process = arr
console.log(111, data.value)
}else{
let list = []
if (row.content) {
list = JSON.parse(row.content)
@ -858,6 +928,10 @@ const open = async (type: string, row?: any, masterParmas?: any, titleName?: any
rules.value.aql[0].required = false
}
data.value.process = list
}
} else {
data.value = {
code: '',
@ -1323,7 +1397,8 @@ const changeIsTarget = (e, item) => {
</style>
<style>
.el-tabs--left .el-tabs__header.is-left {
min-height: 700px !important;
padding-bottom: 5000px;
margin-bottom: -5000px;
min-width: 150px !important;
}
.el-tabs--left.el-tabs--border-card .el-tabs__item.is-left {

3
src/views/qms/inspectionScheme/index.vue

@ -139,6 +139,7 @@ const butttondata = (row) => {
defaultButtons.mainListEditBtn({hasPermi: 'qms:inspection-scheme:update'}),
defaultButtons.mainListEnableBtn({hide:isShowMainButton(row,['FALSE']),hasPermi:'qms:inspection-scheme:enable'}),
defaultButtons.mainListDisableBtn({hide:isShowMainButton(row,['TRUE']),hasPermi:'qms:inspection-scheme:disable'}),
defaultButtons.mainCopyBtn({hasPermi:'qms:programme-template:copy'}),
]
}
@ -152,6 +153,8 @@ const buttonTableClick = async (val, row) => {
handleEnable(row.id)
}else if (val == 'disable') {
handleDisable(row.id)
}else if (val == 'copy') {
openForm('create', row)
}
}

3
src/views/qms/inspectionTemplate/addForm.vue

@ -1027,7 +1027,8 @@ const changeIsTarget = (e,item) => {
</style>
<style>
.el-tabs--left .el-tabs__header.is-left {
min-height: 700px !important;
padding-bottom: 5000px;
margin-bottom: -5000px;
min-width: 150px !important;
}
.el-tabs--left.el-tabs--border-card .el-tabs__item.is-left {

2
src/views/system/user/index.vue

@ -90,7 +90,7 @@
</el-row>
<!-- 添加或修改用户对话框 -->
<!-- <UserForm ref="formRef" @success="getList" /> -->
<UserForm ref="formRef" @success="getList" />
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/system/user/import" :updateIsDisable='true' :coverIsDisable='true' :mode='2' :importTemplateData="importTemplateData" @success="importSuccess" />

18
src/views/wms/basicDataManage/itemManage/itembasic/itembasic.data.ts

@ -248,6 +248,15 @@ export const Itembasic = useCrudSchemas(reactive<CrudSchema[]>([
width: 100
} ,
},
{
label: '产品类',
field: 'prodCla',
sort: 'custom',
isForm:false,
table: {
width: 100
} ,
},
{
label: '种类',
field: 'category',
@ -337,15 +346,6 @@ export const Itembasic = useCrudSchemas(reactive<CrudSchema[]>([
}
},
},
{
label: '产品类',
field: 'prodCla',
sort: 'custom',
isForm:false,
table: {
width: 100
} ,
},
{
label: '是否可用',
field: 'available',

2
src/views/wms/basicDataManage/subject/mstr/mstr.data.ts

@ -13,7 +13,7 @@ export const MstrRules = reactive({
export const Mstr = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '域代码',
field: 'hflccHflcd',
field: 'plDomain',
sort: 'custom',
isSearch: true,
},

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

@ -27,6 +27,33 @@ export const CountJobMain = useCrudSchemas(reactive<CrudSchema[]>([
width: 150
},
},
{
label: '任务拆分方式',
field: 'countSplitType',
dictType: DICT_TYPE.COUNT_SPLIT_TYPE,
dictClass: 'string',
sort: 'custom',
table: {
width: 150
},
isTable:true,
isForm: true,
form: {
value: 'locationCode'
}
},
{
label: '任务拆分值',
field: 'countSplitCode',
dictClass: 'string',
sort: 'custom',
table: {
width: 150
},
isTable:true,
isForm: true
},
{
label: '计划单号',
field: 'planNumber',

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

@ -85,7 +85,7 @@ export const CountPlanMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
isTable:false,
isTable:true,
isForm: true,
form: {
value: 'locationCode'

35
src/views/wms/countManage/count/countRecordMain/countRecordMain.data.ts

@ -40,14 +40,33 @@ export const CountRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
width: 150
},
},
// {
// label: '仓库代码',
// field: 'warehouseCode',
// sort: 'custom',
// table: {
// width: 150
// },
// },
{
label: '任务拆分方式',
field: 'countSplitType',
dictType: DICT_TYPE.COUNT_SPLIT_TYPE,
dictClass: 'string',
sort: 'custom',
table: {
width: 150
},
isTable:true,
isForm: true,
form: {
value: 'locationCode'
}
},
{
label: '任务拆分值',
field: 'countSplitCode',
dictClass: 'string',
sort: 'custom',
table: {
width: 150
},
isTable:true,
isForm: true
},
{
label: '阶段',
field: 'stage',

25
src/views/wms/countManage/count/countRequestMain/countRequestMain.data.ts

@ -90,15 +90,22 @@ export const CountRequestMain = useCrudSchemas(<CrudSchema[]>([
},
isSearch: true,
},
// {
// label: '仓库代码',
// field: 'warehouseCode',
// sort: 'custom',
// table: {
// width: 150
// },
// isSearch: true,
// },
{
label: '任务拆分方式',
field: 'countSplitType',
dictType: DICT_TYPE.COUNT_SPLIT_TYPE,
dictClass: 'string',
sort: 'custom',
table: {
width: 150
},
isTable:true,
isForm: true,
form: {
value: 'locationCode'
}
},
{
label: '申请时间',
field: 'requestTime',

32
src/views/wms/countManage/countadjust/countadjustRecordMain/countadjustRecordMain.data.ts

@ -24,22 +24,32 @@ export const CountadjustRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
},
isSearch: true
},
// {
// label: '盘点记录单号',
// field: 'countRecordNumber',
// sort: 'custom',
// table: {
// width: 180
// },
// isSearch: true
// },
{
label: '仓库代码',
field: 'warehouseCode',
label: '任务拆分方式',
field: 'countSplitType',
dictType: DICT_TYPE.COUNT_SPLIT_TYPE,
dictClass: 'string',
sort: 'custom',
table: {
width: 150
},
isTable:true,
isForm: true,
form: {
value: 'locationCode'
}
},
{
label: '任务拆分值',
field: 'countSplitCode',
dictClass: 'string',
sort: 'custom',
table: {
width: 150
},
isTable:true,
isForm: true
},
{
label: '出库事务类型',

36
src/views/wms/countManage/countadjust/countadjustRequestMain/countadjustRequestMain.data.ts

@ -55,6 +55,33 @@ export const CountadjustRequestMain = useCrudSchemas(<CrudSchema[]>([
},
},
{
label: '任务拆分方式',
field: 'countSplitType',
dictType: DICT_TYPE.COUNT_SPLIT_TYPE,
dictClass: 'string',
sort: 'custom',
table: {
width: 150
},
isTable:true,
isForm: true,
form: {
value: 'locationCode'
}
},
{
label: '任务拆分值',
field: 'countSplitCode',
dictClass: 'string',
sort: 'custom',
table: {
width: 150
},
isTable:true,
isForm: true
},
// {
// label: '申请单号',
// field: 'requestNumber',
@ -89,15 +116,6 @@ export const CountadjustRequestMain = useCrudSchemas(<CrudSchema[]>([
}
}
},
{
label: '库位代码',
field: 'locationCode',
sort: 'custom',
table: {
width: 150
},
isSearch: true,
},
{
label: '申请时间',
field: 'requestTime',

36
src/views/wms/inventoryjobManage/packageManage/packageoverMain/packageoverJobMain/index.vue

@ -33,9 +33,9 @@
<span>{{ row.number }}</span>
</el-button>
</template>
<!-- <template #action="{ row,$index }">
<template #action="{ row,$index }">
<ButtonBase :Butttondata="butttondata(row,$index)" @button-base-click="buttonTableClick($event,row)" />
</template> -->
</template>
</Table>
</ContentWrap>
@ -138,16 +138,34 @@ const buttonBaseClick = (val, item) => {
console.log('其他按钮', item)
}
}
// -
const butttondata = [
defaultButtons.mainListEditBtn({hasPermi:'wms:packageover-job-main:update'}), //
defaultButtons.mainListDeleteBtn({hasPermi:'wms:packageover-job-main:delete'}), //
const butttondata = (row,$index) => {
const findIndex = row['masterId']?tableObject.tableList.findIndex(item=>item['masterId'] == row['masterId']):-1
if(findIndex>-1&&findIndex<$index){
return []
}
return [
// defaultButtons.mainListEditBtn({hasPermi:'wms:packageover-job-main:update'}), //
defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:packageover-job-main:close'}), //
// defaultButtons.mainListDeleteBtn({hasPermi:'wms:packageover-job-main:delete'}), //
]
}
//
const isShowMainButton = (row, val) => {
if (val.indexOf(row.status) > -1) {
return false
} else {
return true
}
}
// -
const buttonTableClick = async (val, row) => {
if (val == 'edit') { //
if (val == 'mainClose') { //
//
await message.confirm('确认要关闭吗?')
await PackageoverJobMainApi.closePackageoverJobMain(row.masterId)
//
await getList()
}else if (val == 'edit') { //
openForm('update', row)
} else if (val == 'delete') { //
handleDelete(row.masterId)

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

@ -523,15 +523,15 @@ export const PackageoverJobMain = useCrudSchemas(reactive<CrudSchema[]>([
},
isTable: false
},
// {
// label: '操作',
// field: 'action',
// isForm: false,
// table: {
// width: 150,
// fixed: 'right'
// }
// }
{
label: '操作',
field: 'action',
isForm: false,
table: {
width: 150,
fixed: 'right'
}
}
]))
// 表单校验

32
src/views/wms/issueManage/issue/issueRequestMain/index.vue

@ -42,6 +42,8 @@
<!-- 表单弹窗添加/修改 -->
<BasicForm
ref="formRef"
:isOpenSearchTable="true"
fieldTableColumn="itemCode"
@success="getList"
:rules="IssueRequestMainRules"
:formAllSchemas="IssueRequestMain.allSchemas"
@ -57,6 +59,7 @@
@tableSelectionDelete="tableSelectionDelete"
@searchTableSuccess="searchTableSuccess"
@submitForm="submitForm"
@onEnter="onEnter"
/>
<!-- 详情 -->
@ -104,14 +107,39 @@ const updataTableColumns = (val) => {
tableColumns.value = val
}
const onEnter = async (field,value) => {
if (field == 'productionLineCode') {
//线
let res = await WorkstationApi.getWorkstationPage({
productionLineCode:value,
pageSize: 20,
pageNo: 1
})
if(res&&res.list&&res.list.length>0){
const setV = {}
setV['workStationCode'] = res.list[0].code
formRef.value.formRef.setValues(setV)
}
}
}
//
const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => {
nextTick(async() => {
if (type == 'tableForm') {
//
if (formField == 'itemCode') {
row['itemCode'] = val[0]['code']
row['uom'] = val[0]['uom']
val.forEach(item=>{
let tableForm = JSON.parse(JSON.stringify(tableFormKeys))
if (tableData.value.length > 0) {
tableForm.productionLineCode = tableData.value[0].productionLineCode
tableForm.workStationCode = tableData.value[0].workStationCode
}
if(tableData.value.find(item1=>item1['itemCode'] == item['itemCode'])) return
const newRow = JSON.parse(JSON.stringify({...tableForm,...item}))
newRow['itemCode'] = item['code']
newRow['uom'] = item['uom']
tableData.value.push(newRow)
})
} else {
row[formField] = val[0][searchField]
}

47
src/views/wms/issueManage/issue/issueRequestMain/issueRequestMain.data.ts

@ -112,6 +112,7 @@ export const IssueRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
enterSearch:true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择生产线代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
@ -161,6 +162,7 @@ export const IssueRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
enterSearch:true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择工位代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
@ -766,6 +768,7 @@ export const IssueRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
sortSearchDefault:2,
sortTableDefault:3,
tableForm:{
multiple: true,
enterSearch:true,
isInpuFocusShow: true,
isSearchList: true, // 开启查询弹窗
@ -809,7 +812,27 @@ export const IssueRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
}
}
},
{
label: '数量',
field: 'qty',
sort: 'custom',
table: {
width: 150
},
hiddenInMain:true,
tableForm: {
type: 'InputNumber',
min: 0,
precision: 6
},
form: {
component: 'InputNumber',
componentProps: {
min: 0,
precision: 6
}
}
},
{
label: '计量单位',
@ -991,27 +1014,7 @@ export const IssueRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
isTableForm: false,
isForm: false
},
{
label: '数量',
field: 'qty',
sort: 'custom',
table: {
width: 150
},
hiddenInMain:true,
tableForm: {
type: 'InputNumber',
min: 0,
precision: 6
},
form: {
component: 'InputNumber',
componentProps: {
min: 0,
precision: 6
}
}
},
{
label: '从货主代码',
field: 'fromOwnerCode',

9
src/views/wms/issueManage/repleinsh/repleinshRequestMain/index.vue

@ -118,6 +118,7 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
newRow['itemCode'] = item['code']
newRow['uom'] = item['uom']
newRow['id'] = item['id']
newRow['toLocationCode'] = formRef.formModel['toLocationCode']
tableData.value.push(newRow)
})
} else {
@ -359,6 +360,7 @@ const tableData = ref([])
//
const handleAddTable = () => {
tableData.value.push(JSON.parse(JSON.stringify(tableFormKeys)))
}
//
const handleDeleteTable = (item, index) => {
@ -376,10 +378,11 @@ const submitForm = async (formType, submitData) => {
if(data.masterId){
data.id = data.masterId
}
tableData.value.forEach(item=>{
item.toLocationCode = data.toLocationCode
})
data.subList = tableData.value //
if( data.subList.length>1){
message.warning('明细只能选择一条数据')
return;
}
if(tableData.value.find(item => (item.qty <= 0))) {
message.warning('数量必须大于0')
formRef.value.formLoading = false

18
src/views/wms/issueManage/repleinsh/repleinshRequestMain/repleinshRequestMain.data.ts

@ -498,6 +498,9 @@ export const RepleinshRequestMainRules = reactive({
autoExecute: [
{ required: true, message: '请选择是否自动执行', trigger: 'change' }
],
toLocationCode: [
{ required: true, message: '请输入到库位代码', trigger: ['change', 'blur']}
],
directCreateRecord: [
{ required: true, message: '请选择是否跳过任务直接生成记录', trigger: 'change' }
],
@ -541,7 +544,6 @@ export const RepleinshRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
},
tableForm:{
isInpuFocusShow: true,
multiple:true,
searchListPlaceholder: '请选择物料代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '物料基础信息', // 查询弹窗标题
@ -629,6 +631,20 @@ export const RepleinshRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
}
}
},
{
label: '到库位代码',
field: 'toLocationCode',
sort: 'custom',
table: {
width: 150
},
hiddenInMain:true,
sortSearchDefault:1000,
isSearch: true,
sortTableDefault:1100,
// isTableForm: false,
},
// {
// label: '包装号',

7
src/views/wms/productionManage/productrepair/productrepairRequestMain/productrepairRequestMain.data.ts

@ -118,7 +118,7 @@ export const ProductrepairRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
sortTableDefault:4,
tableForm:{
isInpuFocusShow: true,
searchListPlaceholder: '请选择生产线代码', // 输入框占位文本
searchListPlaceholder: '请选择返修生产线代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '生产线信息', // 查询弹窗标题
searchAllSchemas: Productionline.allSchemas, // 查询弹窗所需类
@ -138,7 +138,7 @@ export const ProductrepairRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择生产线代码', // 输入框占位文本
searchListPlaceholder: '请选择返修生产线代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '生产线信息', // 查询弹窗标题
searchAllSchemas: Productionline.allSchemas, // 查询弹窗所需类
@ -501,6 +501,9 @@ export const ProductrepairRequestMainRules = reactive({
workshopCode: [
{ required: true, message: '请选择车间代码', trigger: 'change' }
],
productionLineCode: [
{ required: true, message: '请选择返修生产线', trigger: 'change' }
],
// dueTime: [
// { required: true, message: '请选择截止时间', trigger: 'change' }
// ],

19
src/views/wms/productionManage/productscrap/productscrapRequestMain/index.vue

@ -116,6 +116,7 @@ import * as ProductscrapRequestDetailApi from '@/api/wms/productscrapRequestDeta
import * as StdcostpriceApi from '@/api/wms/stdcostprice'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import * as BomDismantleApi from "@/api/wms/bomDismantle"
import * as BomApi from "@/api/wms/bom";
//
defineOptions({ name: 'ProductscrapRequestMain' })
@ -315,6 +316,24 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
row['uom'] = res.uom
row['singlePrice'] = res.price
})
// BOM
console.log(formRef.formModel)
const param1 = {
productItemCode: val[0]['itemCode'],
available: 'TRUE',
pageSize: 20,
pageNo: 1,
sort: '',
by: 'ASC',
}
BomApi.getBomPage(param1).then(res => {
console.log(res)
if(res?.list?.length>0){
row['bomVersion'] = res.list[0].version
}
// row['singlePrice'] = res.price
})
}else if(formField == 'bomVersion'){
row['bomVersion'] = val[0]['version']
}

13
src/views/wms/productionManage/productscrap/productscrapRequestMain/productscrapRequestMain.data.ts

@ -740,7 +740,8 @@ export const ProductscrapRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
width: 150,
},
isForm: false,
isTable:true,
isTable:false,
isTableForm:false,
},
{
label: '报废数量',
@ -802,7 +803,9 @@ export const ProductscrapRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
type: 'InputNumber',
min: 0,
precision: 6
}
},
isTable:false,
isTableForm:false,
},
{
label: '金额',
@ -825,6 +828,8 @@ export const ProductscrapRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
min: 0,
precision: 6,
},
isTable:false,
isTableForm:false,
},
{
label: '来源库位',
@ -840,7 +845,9 @@ export const ProductscrapRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
componentProps:{
disabled: true
}
}
},
isTable:false,
isTableForm:false,
},
{

9
src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRecordMain/purchasereturnRecordMain.data.ts

@ -45,15 +45,16 @@ export const PurchasereturnRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
isSearch: true,
sortTableDefault: 3,
sortSearchDefault: 5,
},
{
}, {
label: 'qad采购退货记录单号',
field: 'qadPurchaseRrturnRecordCode',
field: 'qadPurchaseReturnRecordCode',
sort: 'custom',
table: {
width: 180
},
isTable: false
sortSearchDefault:3,
sortTableDefault: 4,
isTable: true
},
{
label: '发货单号',

Loading…
Cancel
Save