Browse Source

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

master_hella_20240701
songguoqiang 5 months ago
parent
commit
fdc18445b9
  1. 2
      src/api/wms/countJobMain/index.ts
  2. 2
      src/api/wms/countPlanMain/index.ts
  3. 2
      src/api/wms/countRecordMain/index.ts
  4. 2
      src/api/wms/countRequestMain/index.ts
  5. 2
      src/api/wms/countadjustRecordMain/index.ts
  6. 2
      src/api/wms/countadjustRequestMain/index.ts
  7. 4
      src/api/wms/productreceiptRequestDetail/index.ts
  8. 2
      src/api/wms/supplierinvoiceRequestDetail/index.ts
  9. 53
      src/components/Detail/src/Detail.vue
  10. 1
      src/utils/dict.ts
  11. 13
      src/utils/disposition/defaultButtons.ts
  12. 27
      src/views/eam/basicInspectionOption/index.vue
  13. 388
      src/views/eam/basicInspectionOption/itemSelectSetForm.vue
  14. 4
      src/views/eam/basicMaintenanceOption/itemSelectSetForm.vue
  15. 38
      src/views/eam/equipmentRepairJobMain/equipmentRepairJobMain.data.ts
  16. 43
      src/views/eam/equipmentRepairJobMain/index.vue
  17. 344
      src/views/eam/equipmentRepairJobMain/transferForm.vue
  18. 8
      src/views/eam/inspectionItem/inspectionItem.data.ts
  19. 17
      src/views/eam/sparepartsinlocation/index.vue
  20. 41
      src/views/eam/sparepartsinlocation/sparePartsInLocationMain.data.ts
  21. 3
      src/views/wms/productionManage/productreceipt/productreceiptRecordMain/index.vue
  22. 3
      src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRecordMain/productreceiptAssembleRecordMain.data.ts
  23. 12
      src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRequestMain/index.vue
  24. 1
      src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRequestMain/productreceiptscrapRequestMain.data.ts
  25. 2
      src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/purchasereceiptRequestMain.data.ts
  26. 16
      src/views/wms/purchasereceiptManage/supplierdeliver/purchaseMain/index.vue
  27. 4
      src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/index.vue
  28. 21
      src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue
  29. 1
      src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/supplierinvoiceRequestMain.data.ts

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

@ -76,7 +76,7 @@ export const exportCountJobMain = async (params) => {
if (params.isSearch) { if (params.isSearch) {
delete params.isSearch delete params.isSearch
const data = {...params} const data = {...params}
return request.post({ url: '/wms/count-job-main/export-excel-senior', data }) return request.downloadPost({ url: '/wms/count-job-main/export-excel-senior', data })
} else { } else {
return await request.download({ url: `/wms/count-job-main/export-excel`, params }) return await request.download({ url: `/wms/count-job-main/export-excel`, params })
} }

2
src/api/wms/countPlanMain/index.ts

@ -63,7 +63,7 @@ export const exportCountPlanMain = async (params) => {
if (params.isSearch) { if (params.isSearch) {
delete params.isSearch delete params.isSearch
const data = {...params} const data = {...params}
return request.post({ url: '/wms/count-plan-main/export-excel-senior', data }) return request.downloadPost({ url: '/wms/count-plan-main/export-excel-senior', data })
} else { } else {
return await request.download({ url: `/wms/count-plan-main/export-excel`, params }) return await request.download({ url: `/wms/count-plan-main/export-excel`, params })
} }

2
src/api/wms/countRecordMain/index.ts

@ -59,7 +59,7 @@ export const exportCountRecordMain = async (params) => {
if (params.isSearch) { if (params.isSearch) {
delete params.isSearch delete params.isSearch
const data = {...params} const data = {...params}
return request.post({ url: '/wms/count-record-main/export-excel-senior', data }) return request.downloadPost({ url: '/wms/count-record-main/export-excel-senior', data })
} else { } else {
return await request.download({ url: `/wms/count-record-main/export-excel`, params }) return await request.download({ url: `/wms/count-record-main/export-excel`, params })
} }

2
src/api/wms/countRequestMain/index.ts

@ -58,7 +58,7 @@ export const exportCountRequestMain = async (params) => {
if (params.isSearch) { if (params.isSearch) {
delete params.isSearch delete params.isSearch
const data = {...params} const data = {...params}
return request.post({ url: '/wms/count-request-main/export-excel-senior', data }) return request.downloadPost({ url: '/wms/count-request-main/export-excel-senior', data })
} else { } else {
return await request.download({ url: `/wms/count-request-main/export-excel`, params }) return await request.download({ url: `/wms/count-request-main/export-excel`, params })
} }

2
src/api/wms/countadjustRecordMain/index.ts

@ -57,7 +57,7 @@ export const exportCountadjustRecordMain = async (params) => {
if (params.isSearch) { if (params.isSearch) {
delete params.isSearch delete params.isSearch
const data = {...params} const data = {...params}
return request.post({ url: '/wms/countadjust-record-main/export-excel-senior', data }) return request.downloadPost({ url: '/wms/countadjust-record-main/export-excel-senior', data })
} else { } else {
return await request.download({ url: `/wms/countadjust-record-main/export-excel`, params }) return await request.download({ url: `/wms/countadjust-record-main/export-excel`, params })
} }

2
src/api/wms/countadjustRequestMain/index.ts

@ -57,7 +57,7 @@ export const exportCountadjustRequestMain = async (params) => {
if (params.isSearch) { if (params.isSearch) {
delete params.isSearch delete params.isSearch
const data = {...params} const data = {...params}
return request.post({ url: '/wms/countadjust-request-main/export-excel-senior', data }) return request.downloadPost({ url: '/wms/countadjust-request-main/export-excel-senior', data })
} else { } else {
return await request.download({ url: `/wms/countadjust-request-main/export-excel`, params }) return await request.download({ url: `/wms/countadjust-request-main/export-excel`, params })
} }

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

@ -65,6 +65,10 @@ export const getProductreceiptRequestDetailPageScrap = async (params) => {
return await request.get({ url: `/wms/productreceipt-request-detail/page`, params }) return await request.get({ url: `/wms/productreceipt-request-detail/page`, params })
} }
} }
// 根据物料代码查计量单位
export const getQueryItemCodeInfo = async (data) => {
return await request.post({ url: 'wms/itembasic/queryItemCodeInfo', data })
}
// 查询制品收货申请子详情 // 查询制品收货申请子详情
export const getProductreceiptRequestDetail = async (id: number) => { export const getProductreceiptRequestDetail = async (id: number) => {

2
src/api/wms/supplierinvoiceRequestDetail/index.ts

@ -51,7 +51,7 @@ export const getSupplierinvoiceRequestDetail = async (id: number) => {
} }
// 新增供应商发票申请子 // 新增供应商发票申请子
export const createSupplierinvoiceRequestDetail = async (data: SupplierinvoiceRequestDetailVO) => { export const createSupplierinvoiceRequestDetail = async (data) => {
return await request.post({ url: `/wms/supplierinvoice-request-detail/create`, data }) return await request.post({ url: `/wms/supplierinvoice-request-detail/create`, data })
} }

53
src/components/Detail/src/Detail.vue

@ -384,12 +384,23 @@ const props = defineProps({
required: false, required: false,
default: false default: false
}, },
fieldTableColumn:{
type: String,
required: false,
default: ''
},
// //
otherHeadButttonData:{ otherHeadButttonData:{
type:Array, type:Array,
required: false, required: false,
default: () => [] default: () => []
} },
//--
mainSubmitCreateApi:{
type: Boolean,
required: false,
default: false
},
}) })
const isShowDrawer = ref(false) const isShowDrawer = ref(false)
const detailLoading = ref(false) const detailLoading = ref(false)
@ -671,7 +682,10 @@ const openDetail = async (row: any, titleName: any, titleValue: any, tableName:
} }
} }
} }
defineExpose({ openDetail, formRef }) // open const updateList = ()=>{
getList()
}
defineExpose({ openDetail, formRef ,updateList}) // open
// //
const getRemarkList = async () => { const getRemarkList = async () => {
@ -728,16 +742,19 @@ const buttonBaseClick = (val, item) => {
masterId: masterParmas.value.masterId, masterId: masterParmas.value.masterId,
number: masterParmas.value.number number: masterParmas.value.number
}) })
const item = props.detailAllSchemas.formSchema[0] if(props.fieldTableColumn!=''){
opensearchTable( const item = props.detailAllSchemas.formSchema.find(item=>item.field == props.fieldTableColumn)
item.field, item?.componentProps?.searchField, opensearchTable(
item?.componentProps?.searchTitle, item.field, item?.componentProps?.searchField,
item?.componentProps?.searchAllSchemas, item?.componentProps?.searchTitle,
item?.componentProps?.searchPage, item?.componentProps?.searchAllSchemas,
item?.componentProps?.searchCondition, item?.componentProps?.searchPage,
item?.componentProps?.multiple, item?.componentProps?.searchCondition,
undefined,undefined item?.componentProps?.multiple,
) undefined,undefined
)
}
}else{ }else{
openForm('create') openForm('create')
} }
@ -867,13 +884,19 @@ const submitForm = async (formType, data) => {
const searchTableSuccess1 = (formField, searchField, val, formRef) => { const searchTableSuccess1 = (formField, searchField, val, formRef) => {
searchTableFormModel.value[formField] = val.map(item=>item[searchField]).join(',') searchTableFormModel.value[formField] = val.map(item=>item[searchField]).join(',')
console.log('searchTableSuccess1',searchTableFormModel) console.log('searchTableSuccess1',searchTableFormModel)
submitForm(searchTableFormType.value,searchTableFormModel.value) if(props.mainSubmitCreateApi){
emit('searchTableSuccessDetail', formField, searchField, val, formRef) emit('searchTableSuccessDetail', formField, searchField, val, formRef,searchTableFormModel.value)
}else{
submitForm(searchTableFormType.value,searchTableFormModel.value)
emit('searchTableSuccessDetail', formField, searchField, val, formRef)
}
} }
// //
const searchTableSuccess = (formField, searchField, val, formRef) => { const searchTableSuccess = (formField, searchField, val, formRef) => {
emit('searchTableSuccessDetail', formField, searchField, val, formRef) emit('searchTableSuccessDetail', formField, searchField, val, formRef)
} }
// //
const emit = defineEmits([ const emit = defineEmits([
'searchTableSuccessDetail', 'searchTableSuccessDetail',
@ -885,7 +908,7 @@ const emit = defineEmits([
'onBlur', 'onBlur',
'detailBasicFormOnChange', 'detailBasicFormOnChange',
'formFormDateChange', 'formFormDateChange',
'buttonBaseClick' 'buttonBaseClick',
]) ])
/** 删除按钮操作 */ /** 删除按钮操作 */
const handleDelete = async (id: number) => { const handleDelete = async (id: number) => {

1
src/utils/dict.ts

@ -367,4 +367,5 @@ export enum DICT_TYPE {
OFF_BACK_STATUS = 'off_back_status', OFF_BACK_STATUS = 'off_back_status',
SPAREPARTS_APPLY_STATUS_ENUM = 'spareparts_apply_status_enum',// 流程状态 SPAREPARTS_APPLY_STATUS_ENUM = 'spareparts_apply_status_enum',// 流程状态
IS_LINE_ITEM = 'is_line_item', // 是否是线边 IS_LINE_ITEM = 'is_line_item', // 是否是线边
PUT_IN_TYPE = 'put_in_type',// 入库类型
} }

13
src/utils/disposition/defaultButtons.ts

@ -389,6 +389,19 @@ export function mainListExecuteBtn(option:any) {
}) })
} }
// 主列表-转办按钮
export function mainListTransferBtn(option:any) {
return __defaultBtnOption(option,{
label: t(`ts.转办`).replace('ts.', ''),
name: 'transfer',
hide: false,
type: 'primary',
color: '',
link: true, // 文本展现按钮
hasPermi: ''
})
}
// 主列表-完成按钮 // 主列表-完成按钮
export function mainListFinishBtn(option:any) { export function mainListFinishBtn(option:any) {
return __defaultBtnOption(option,{ return __defaultBtnOption(option,{

27
src/views/eam/basicInspectionOption/index.vue

@ -39,16 +39,17 @@
</ContentWrap> </ContentWrap>
<!-- 表单弹窗添加/修改 --> <!-- 表单弹窗添加/修改 -->
<BasicForm <!-- <BasicForm-->
ref="basicFormRef" <!-- ref="basicFormRef"-->
@success="formsSuccess" <!-- @success="formsSuccess"-->
:rules="BasicInspectionOptionRules" <!-- :rules="BasicInspectionOptionRules"-->
:formAllSchemas="BasicInspectionOption.allSchemas" <!-- :formAllSchemas="BasicInspectionOption.allSchemas"-->
:apiUpdate="BasicInspectionOptionApi.updateBasicInspectionOption" <!-- :apiUpdate="BasicInspectionOptionApi.updateBasicInspectionOption"-->
:apiCreate="BasicInspectionOptionApi.createBasicInspectionOption" <!-- :apiCreate="BasicInspectionOptionApi.createBasicInspectionOption"-->
@searchTableSuccess="searchTableSuccess" <!-- @searchTableSuccess="searchTableSuccess"-->
:isBusiness="false" <!-- :isBusiness="false"-->
/> <!-- />-->
<ItemForm ref="basicFormRef" @success="getData"/>
<!-- 详情 --> <!-- 详情 -->
<Detail ref="detailRef" :isBasic="true" :allSchemas="BasicInspectionOption.allSchemas" /> <Detail ref="detailRef" :isBasic="true" :allSchemas="BasicInspectionOption.allSchemas" />
@ -65,6 +66,7 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue' import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import Detail from '@/components/Detail/src/Detail.vue' import Detail from '@/components/Detail/src/Detail.vue'
import ItemForm from "@/views/eam/basicInspectionOption/itemSelectSetForm.vue";
defineOptions({ name: 'BasicInspectionOption' }) defineOptions({ name: 'BasicInspectionOption' })
@ -205,6 +207,11 @@ const formsSuccess = async (formType,data) => {
getList() getList()
} }
//
const getData = async() => {
getList();
}
/** 详情操作 */ /** 详情操作 */
const detailRef = ref() const detailRef = ref()
const openDetail = (row: any, titleName: any, titleValue: any) => { const openDetail = (row: any, titleName: any, titleValue: any) => {

388
src/views/eam/basicInspectionOption/itemSelectSetForm.vue

@ -0,0 +1,388 @@
<template>
<Dialog v-model="dialogVisible" :title="dialogTitle">
<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="code">
<el-input v-model="formData.code" placeholder="方案编号" :disabled="isDisabled"/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="方案名称" prop="name">
<el-input v-model="formData.name" placeholder="请输入方案名称" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="是否可修改" prop="isUpdated">
<el-select v-model="formData.isUpdated" style="width: 200px">
<el-option label="是" value="TRUE"></el-option>
<el-option label="否" value="FALSE"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="描述" prop="describing">
<el-input v-model="formData.describing" placeholder="请输入描述" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="是否可用" prop="available">
<el-select v-model="formData.available" style="width: 200px">
<el-option label="是" value="TRUE"></el-option>
<el-option label="否" value="FALSE"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="备注" prop="remark">
<el-input v-model="formData.remark" placeholder="请输入备注" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="11">
<el-form-item label="选择集ID" prop="selectId">
<div class="tag-container flex gap-2">
<el-tag v-for="ent in tags" :key="ent.selectId" closable :disable-transitions="false" @close="handleClose(ent.selectId)">
{{ ent.selectId}}
</el-tag>
<el-input v-if="inputVisible" ref="InputRef" v-model="inputValue" class="w-20" size="small"/>
<el-button v-else class="button-new-tag" size="small" @click="addItem">
添加巡检选择集
</el-button>
</div>
</el-form-item>
</el-col>
</el-row>
</el-form>
<el-table :data="inspectionItemData" style="width: 100%; height: 80%">
<el-table-column prop="itemCode" label="巡检项ID" />
<el-table-column prop="itemName" label="巡检名称" />
<el-table-column prop="isSelectd" label="" width="150" >
<template #header>
<span>是否必选默认是</span>
</template>
<template #default="scope">
<el-switch
v-model="scope.row.isSelectd"
active-color="#13ce66"
inactive-color="#ff4949"
active-text="是"
inactive-text="否"
/>
</template>
</el-table-column>
</el-table>
<template #footer>
<el-button :disabled="formLoading" type="primary" @click="submitForm"> </el-button>
<el-button @click="dialogVisible = false"> </el-button>
</template>
</Dialog>
<!--添加巡检项弹窗-->
<SearchTable ref="searchTableRef" @searchTableSuccess="searchTableSuccess" />
</template>
<script lang="ts" setup>
import * as BasicInspectionOptionApi from '@/api/eam/basicInspectionOption'
import request from "@/config/axios";
import { SearchTable } from '@/components/SearchTable'
import { InspectionItemSelectSet} from "@/views/eam/inspectionItemSelectSet/inspectionItemSelectSet.data";
import * as inspectionItemItemSelectSetApi from "@/api/eam/inspectionItemSelectSet";
import {ElInput} from "element-plus";
import {
createBasicInspectionOption,
updateBasicInspectionOption
} from "@/api/eam/basicInspectionOption";
defineOptions({ name: 'TeamForm' })
const { t } = useI18n() //
const message = useMessage() //
const dialogVisible = ref(false) //
const dialogTitle = ref('') //
const formLoading = ref(false) // 12
const formType = ref('') // create - update -
const tags=ref([])
const inputValue = ref('')
const inputVisible = ref(false)
const isDisabled = ref(false)
const InputRef = ref<InstanceType<typeof ElInput>>()
//
const inspectionItemData = ref([])
const itemData = ref({
id: '',
content: '',
selectId:''
})
const formData = ref({
code: '',
name: '',
describing: '',
isUpdated: '',
remark: '',
available: '',
selectId: '',
optionItem:[]
})
const formRules = reactive({
code: [
{ required: true, message: '方案编号不能为空', trigger: 'blur' },
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
],
name: [
{ required: true, message: '方案名称不能为空', trigger: 'blur' },
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
],
isUpdated: [
{ required: true, message: '不能为空', trigger: 'blur' },
],
available: [
{ required: true, message: '不能为空', trigger: 'blur' },
],
remark: [
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
],
})
const basicFormRef = ref() // Ref
/** 删除巡检项 */
const handleClose = (id: string) => {
const index = tags.value.findIndex(tag => tag.selectId === id);
if (index !== -1) {
tags.value.splice(index, 1);
}
}
/** 弹窗相关参数 */
const searchTableRef = ref();
const _searchTableTitle = ref();
const _searchTableAllSchemas = ref();
const _searchTablePage = ref();
const _formField = ref();
const _searchField = ref();
const _multiple = ref();
const _type = ref();
const _row = ref();
const _searchCondition = ref({})
const addItem = () =>{
addItemCommon(true,'xunJianItem')
}
/** 选择巡检项弹窗 */
const addItemCommon = (multiple,field) => {
_searchCondition.value = {}
const filters: any[] = []
filters.push({
action: "==",
column: 'available',
value: 'TRUE'
})
//
_searchCondition.value.isSearch = true
_searchCondition.value.filters = filters
_searchTableTitle.value = '选择巡检项'
//_multiple.value = multiple
_formField.value = field
_searchField.value = field
_searchTablePage.value = inspectionItemItemSelectSetApi.getInspectionItemSelectSetPage
_searchTableAllSchemas.value = InspectionItemSelectSet.allSchemas
openCommon()
}
/** 弹窗选择之后 回调函数 添加选择集 */
const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => {
nextTick?.(async () => {
if (formField === 'xunJianItem') {
let itemsId = '';
//ID
val.forEach(item => {
const isExist = tags.value.some(tag => tag.id === item.id);
if (!isExist) {
const newItem = {};
newItem['itemCode'] = item.itemCode;
newItem['selectId'] = item.id;
tags.value = [];
tags.value.push(newItem);
}
itemsId = item.itemCode;
});
//
try {
formLoading.value = true;
inspectionItemData.value = [];
for (const item of itemsId.split(",")) {
let res = await request.get({url: `/eam/basic/inspection-item/get?id=` + item})
console.log(res)
const newItem = {};
newItem['itemCode'] = res.id;
newItem['itemName'] = res.name;
newItem['equipmentParts'] = res.equipmentParts;
newItem['isSelectd'] = true;
inspectionItemData.value.push(newItem);
}
} finally {
formLoading.value = false;
}
}
})
}
/*打开弹窗*/
const openCommon = () => {
searchTableRef.value.open(
_searchTableTitle.value,
_searchTableAllSchemas.value,
_searchTablePage.value,
_formField.value,
_searchField.value,
_multiple.value,
_type.value,
_row.value,
_searchCondition.value
)
}
/** 初始化弹窗 */
const open = async (type: string, row?: object) => {
dialogVisible.value = true
dialogTitle.value = t('action.' + type)
formType.value = type
//
if (row) {
isDisabled.value = true;
formLoading.value = true
formData.value = row;
//
let item = (row.id.toString()).split(",")
try {
tags.value=[];
for (var i = 0; i < item.length; i++) {
itemData.value = await request.get({ url: `/eam/basic-inspection-option/get?id=` + item[i] });
tags.value.push(itemData.value);
}
} finally {
formLoading.value = false
}
//
let res = await request.get({url: `/eam/relation-inspection-option-item/getList?optionCode=` + row.code})
try {
inspectionItemData.value = [];
formLoading.value = true;
for (const item of res) {
const newItem = {};
newItem['id'] = item.id;
newItem['itemCode'] = item.itemCode;
newItem['itemName'] = item.itemName;
newItem['isSelectd'] = item.isSelectd;
inspectionItemData.value.push(newItem);
}
} finally {
formLoading.value = false;
}
}
//
else {
resetForm()
isDisabled.value = false;
}
}
defineExpose({ open }) // open
/** 提交表单 */
const emit = defineEmits(['success']) // success
const submitForm = async () => {
//
if (!basicFormRef) return
const valid = await basicFormRef.value.validate()
if (!valid) return
if (inspectionItemData.value.length > 10 ){
message.warning('巡检项最多10个');
return
}
// ID
formData.value.selectId = tags.value[0].selectId
//
formLoading.value = true
try {
if (formType.value === 'create') {
for (var i = 0; i < inspectionItemData.value.length; i++) {
inspectionItemData.value[i].optionCode = formData.value.code
}
formData.value.optionItem = inspectionItemData.value
//
await BasicInspectionOptionApi.createBasicInspectionOption(formData.value)
message.success(t('common.createSuccess'))
} else {
for (var i = 0; i < inspectionItemData.value.length; i++) {
inspectionItemData.value[i].optionCode = formData.value.code
}
formData.value.optionItem = inspectionItemData.value
await BasicInspectionOptionApi.updateBasicInspectionOption(formData.value)
message.success(t('common.updateSuccess'))
}
dialogVisible.value = false
//
emit('success')
} finally {
formLoading.value = false
}
}
/** 重置表单 */
const resetForm = () => {
formData.value = {
code: '',
name: '',
describing: '',
isUpdated: '',
remark: '',
available: '',
selectId: ''
}
tags.value=[];
inspectionItemData.value = [];
basicFormRef.value?.resetFields()
}
</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>

4
src/views/eam/basicMaintenanceOption/itemSelectSetForm.vue

@ -101,10 +101,6 @@ import { SearchTable } from '@/components/SearchTable'
import { BasicMaintenanceItemSelectSet} from "@/views/eam/maintenanceItemSelectSet/maintenanceItemSelectSet.data"; import { BasicMaintenanceItemSelectSet} from "@/views/eam/maintenanceItemSelectSet/maintenanceItemSelectSet.data";
import * as maintenanceItemSelectSetApi from "@/api/eam/maintenanceItemSelectSet"; import * as maintenanceItemSelectSetApi from "@/api/eam/maintenanceItemSelectSet";
import {ElInput} from "element-plus"; import {ElInput} from "element-plus";
import {
BasicMaintenanceOptionVO,
createBasicMaintenanceOption, updateBasicMaintenanceOption
} from "@/api/eam/basicMaintenanceOption";
defineOptions({ name: 'TeamForm' }) defineOptions({ name: 'TeamForm' })

38
src/views/eam/equipmentRepairJobMain/equipmentRepairJobMain.data.ts

@ -4,6 +4,10 @@ import {EquipmentAccounts} from "@/views/eam/equipmentAccounts/equipmentAccounts
import * as EquipmentItemApi from "@/api/eam/equipmentAccounts"; import * as EquipmentItemApi from "@/api/eam/equipmentAccounts";
import {BasicFaultCause} from "@/views/eam/basicFaultCause/basicFaultCause.data"; import {BasicFaultCause} from "@/views/eam/basicFaultCause/basicFaultCause.data";
import * as ItemApi from "@/api/eam/basicFaultCause"; import * as ItemApi from "@/api/eam/basicFaultCause";
import {Workshop} from "@/views/wms/basicDataManage/factoryModeling/workshop/workshop.data";
import * as WorkshopApi from "@/api/wms/workshop";
import {BasicFaultType} from "@/views/eam/basicFaultType/basicFaultType.data";
import * as BasicFaultTypeApi from "@/api/eam/basicFaultType";
// 表单校验 // 表单校验
export const EquipmentRepairJobMainRules = reactive({ export const EquipmentRepairJobMainRules = reactive({
@ -388,10 +392,23 @@ export const EquipmentRepairJobMain = useCrudSchemas(reactive<CrudSchema[]>([
{ {
label: '故障类型', label: '故障类型',
field: 'faultType', field: 'faultType',
dictType: DICT_TYPE.FAILURE_REASON,
dictClass: 'string',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
form: {
componentProps: {
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择故障类型', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '车间信息', // 查询弹窗标题
searchAllSchemas: BasicFaultType.allSchemas, // 查询弹窗所需类
searchPage: BasicFaultTypeApi.getBasicFaultTypePage, // 查询弹窗所需分页方法
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
}
},
}, },
{ {
label: '流程状态', label: '流程状态',
@ -442,6 +459,23 @@ export const EquipmentRepairJobMain = useCrudSchemas(reactive<CrudSchema[]>([
field: 'workshopCode', field: 'workshopCode',
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
required: true,
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择车间', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '车间信息', // 查询弹窗标题
searchAllSchemas: Workshop.allSchemas, // 查询弹窗所需类
searchPage: WorkshopApi.getWorkshopPage, // 查询弹窗所需分页方法
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
}
},
}, },
// { // {
// label: '产线编号', // label: '产线编号',

43
src/views/eam/equipmentRepairJobMain/index.vue

@ -54,6 +54,7 @@
<FinishForm1 ref="finishForm1Ref" @success="getData1" @close="getClosed1"/> <FinishForm1 ref="finishForm1Ref" @success="getData1" @close="getClosed1"/>
<FinishForm2 ref="finishForm2Ref" @success="getData2" @close="getClosed2"/> <FinishForm2 ref="finishForm2Ref" @success="getData2" @close="getClosed2"/>
<FinishForm3 ref="finishForm3Ref" @success="getData3" @close="getClosed3"/> <FinishForm3 ref="finishForm3Ref" @success="getData3" @close="getClosed3"/>
<TransferForm ref="transferForm" @success="getData4" @close="getClosed4"/>
<!-- 详情 --> <!-- 详情 -->
<Detail ref="detailRef" <Detail ref="detailRef"
@ -89,6 +90,7 @@ import Detail from '@/views/eam/equipmentRepairJobMain/EquipmentRepairJobDetail.
import FinishForm1 from '@/views/eam/equipmentRepairJobMain/finishForm1.vue' import FinishForm1 from '@/views/eam/equipmentRepairJobMain/finishForm1.vue'
import FinishForm2 from '@/views/eam/equipmentRepairJobMain/finishForm2.vue' import FinishForm2 from '@/views/eam/equipmentRepairJobMain/finishForm2.vue'
import FinishForm3 from '@/views/eam/equipmentRepairJobMain/finishForm3.vue' import FinishForm3 from '@/views/eam/equipmentRepairJobMain/finishForm3.vue'
import TransferForm from '@/views/eam/equipmentRepairJobMain/transferForm.vue'
import {EquipmentAccounts} from "@/views/eam/equipmentAccounts/equipmentAccounts.data"; import {EquipmentAccounts} from "@/views/eam/equipmentAccounts/equipmentAccounts.data";
import * as EquipmentItemApi from "@/api/eam/equipmentAccounts"; import * as EquipmentItemApi from "@/api/eam/equipmentAccounts";
import {ToolAccounts} from "@/views/eam/toolAccounts/toolAccounts.data"; import {ToolAccounts} from "@/views/eam/toolAccounts/toolAccounts.data";
@ -184,6 +186,7 @@ const butttondata = (row) => {
defaultButtons.mainListEditBtn({hasPermi:'eam:equipmentRepairJobMain:update'}), // defaultButtons.mainListEditBtn({hasPermi:'eam:equipmentRepairJobMain:update'}), //
defaultButtons.mainListReceiveOrderBtn({hide: isShowStatusButton(row,['3']),hasPermi:'eam:equipmentRepairJobMain:update'}), // defaultButtons.mainListReceiveOrderBtn({hide: isShowStatusButton(row,['3']),hasPermi:'eam:equipmentRepairJobMain:update'}), //
defaultButtons.mainListExecuteBtn({hide: isShowStatusButton(row,['4']),hasPermi:'eam:equipmentRepairJobMain:update'}), // defaultButtons.mainListExecuteBtn({hide: isShowStatusButton(row,['4']),hasPermi:'eam:equipmentRepairJobMain:update'}), //
defaultButtons.mainListTransferBtn({hide: isShowStatusButton(row,['4']),hasPermi:'eam:equipmentRepairJobMain:update'}), //
defaultButtons.mainListFinishBtn({hide: isShowStatusButton(row,['5']),hasPermi:'eam:equipmentRepairJobMain:update'}), // defaultButtons.mainListFinishBtn({hide: isShowStatusButton(row,['5']),hasPermi:'eam:equipmentRepairJobMain:update'}), //
defaultButtons.mainListValidateRepairBtn({hide: isShowStatusButton(row,['6']),hasPermi:'eam:equipmentRepairJobMain:update'}), // defaultButtons.mainListValidateRepairBtn({hide: isShowStatusButton(row,['6']),hasPermi:'eam:equipmentRepairJobMain:update'}), //
defaultButtons.mainListValidateReportBtn({hide: isShowBaoXiuButton(row),hasPermi:'eam:equipmentRepairJobMain:update'}), // defaultButtons.mainListValidateReportBtn({hide: isShowBaoXiuButton(row),hasPermi:'eam:equipmentRepairJobMain:update'}), //
@ -206,6 +209,8 @@ const buttonTableClick = async (val, row) => {
handleValidateRepair(row) handleValidateRepair(row)
} else if (val == 'validate_report') { // } else if (val == 'validate_report') { //
handleValidateReport(row) handleValidateReport(row)
} else if (val == 'transfer') { //
handleTransferReport(row)
} }
@ -296,6 +301,14 @@ const searchTableSuccessDetail = (formField, searchField, val, formRef ) => {
}) })
} }
/** 转办按钮操作 */
const transferForm = ref()
const handleTransferReport = async (row) => {
await message.delConfirm('是否转办所选中工单?');
transferForm.value.open('update', row);
}
/** 报修验证按钮操作 */ /** 报修验证按钮操作 */
const finishForm3Ref = ref() const finishForm3Ref = ref()
@ -500,6 +513,36 @@ const getData3=(val)=> {
) )
} }
//finishForm4
const getClosed4=(val)=> {
nextTick?.(() => {
console.log(val)
getList()
})
}
//finishForm4
const getData4=(val)=> {
nextTick?.(async () => {
console.log(val)
try {
const params = ref({
id: '',
status:'',
})
params.value.id = val
params.value.status = '3'
await EquipmentRepairJobMainApi.updateEquipmentRepairOrder(params.value)
message.success(t('工单已流转'))
//
await getList()
} catch {}
}
)
}
const onChange = (field, item) => { const onChange = (field, item) => {
// //
if(field == 'type' && item == 'DEVICE'){ if(field == 'type' && item == 'DEVICE'){

344
src/views/eam/equipmentRepairJobMain/transferForm.vue

@ -0,0 +1,344 @@
<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="transferType">
<el-select v-model="formData.transferType" placeholder="请选择转办类型" style="width: 150px" @change="onChangeSec">
<el-option label="人员转办" value="0"></el-option>
<el-option label="类型转办" value="1"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="故障类型" prop="faultType">
<el-input v-model="formData.faultType" style="width: 150px" disabled></el-input>
<el-button :icon="Search" @click="chooseFaultType" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="设备类别" prop="type" >
<el-select v-model="formData.type" placeholder="请选择设备类别" style="width: 150px" :disabled = "isDisabled1" @change="onChangeType">
<el-option label="设备" value="DEVICE"></el-option>
<el-option label="工装" value="EQUIPMENT"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="设备编号" prop="equipmentCode" >
<el-input v-model="formData.equipmentCode" style="width: 150px" disabled></el-input>
<el-button :icon="Search" @click="chooseEquipmentCode" :disabled = "isDisabled1"/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="车间" prop="workshopCode">
<el-input v-model="formData.workshopCode" style="width: 150px" disabled></el-input>
<el-button :icon="Search" @click="chooseWorkshopCode" :disabled = "isDisabled2"/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="维修人" prop="maintenancer">
<el-input v-model="formData.maintenancer" style="width: 150px" :disabled = "isDisabled2"></el-input>
<!-- <el-button :icon="Search" @click="chooseWorkshopCode" />-->
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="班组" prop="classType">
<el-select v-model="formData.classType" placeholder="请选择班组类别" style="width: 150px">
<el-option label="白班" value="0"></el-option>
<el-option label="夜班" value="1"></el-option>
</el-select>
</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>
<!--添加巡检项弹窗-->
<SearchTable ref="searchTableRef" @searchTableSuccess="searchTableSuccess" />
</template>
<script lang="ts" setup>
import { SearchTable } from '@/components/SearchTable'
import {ElInput} from "element-plus";
import { Search } from '@element-plus/icons-vue'
import * as EquipmentRepairJobMainApi from "@/api/eam/equipmentRepairJobMain";
import * as WorkshopApi from "@/api/wms/workshop";
import {Workshop} from "@/views/wms/basicDataManage/factoryModeling/workshop/workshop.data";
import {EquipmentAccounts} from "@/views/eam/equipmentAccounts/equipmentAccounts.data";
import * as EquipmentItemApi from "@/api/eam/equipmentAccounts";
import {ToolAccounts} from "@/views/eam/toolAccounts/toolAccounts.data";
import * as ToolItemApi from "@/api/eam/toolAccounts";
import {BasicFaultType} from "@/views/eam/basicFaultType/basicFaultType.data";
import * as BasicFaultTypeApi from "@/api/eam/basicFaultType";
defineOptions({ name: 'TeamForm' })
const { t } = useI18n() //
const message = useMessage() //
const dialogVisible = ref(false) //
const dialogTitle = ref('转办') //
const formLoading = ref(false) // 12
const formType = ref('') // create - update -
const tags=ref([])
const typeValue = ref('')
const inputVisible = ref(false)
const isDisabled1 = ref(false)
const isDisabled2 = ref(false)
const InputRef = ref<InstanceType<typeof ElInput>>()
const formData = ref({
id:'',
number:'',
transferType:'',
faultType:'',
type:'',
equipmentCode:'',
workshopCode:'',
maintenancer: '',
classType: '',
})
const formRules = reactive({
transferType: [
{ required: true, message: '转办类型不能为空', trigger: 'change' },
{ max: 50, message: '不得超过50个字符', trigger: 'change' }
],
faultType: [
{ required: true, message: '故障类型不能为空', trigger: 'change' },
],
classType: [
{ required: true, message: '班次不能为空', trigger: 'change' },
],
workshopCode: [
{ required: false, message: '车间不能为空', trigger: 'change' },
],
maintenancer: [
{ required: false, message: '维修人不能为空', trigger: 'change' },
],
type: [
{ required: false, message: '设备类别不能为空', trigger: 'change' },
],
equipmentCode: [
{ required: false, message: '设备编号不能为空', trigger: 'change' },
],
})
const basicFormRef = ref() // Ref
// /** */
const searchTableRef = ref();
const _searchTableTitle = ref();
const _searchTableAllSchemas = ref();
const _searchTablePage = ref();
const _searchField = ref();
const _formField = ref();
const _multiple = ref();
const _searchCondition = ref({})
/** 选择故障类型弹窗 */
const chooseFaultType = (field) => {
_searchCondition.value = {}
const filters: any[] = []
filters.push({
key: 'available',
value: 'TRUE',
isMainValue: false
})
//
_searchCondition.value.isSearch = true
_searchCondition.value.filters = filters
_searchTableTitle.value = '选择故障类型'
_searchField.value = "faultType"
_formField.value = 'faultType'
_searchTablePage.value = BasicFaultTypeApi.getBasicFaultTypePage,
_searchTableAllSchemas.value = BasicFaultType.allSchemas,
openCommon()
}
/** 选择设备编码弹窗 */
const chooseEquipmentCode = (field) => {
_searchCondition.value = {}
const filters: any[] = []
filters.push({
key: 'status',
value: 'NORMAL',
action: '==',
isSearch: true,
isMainValue: false
})
//
_searchCondition.value.isSearch = true
_searchCondition.value.filters = filters
_searchField.value = "equipmentCode"
_formField.value = 'equipmentCode'
if(typeValue.value == 'DEVICE'){
_searchTableTitle.value = '选择设备编号'
_searchTablePage.value = EquipmentItemApi.getEquipmentAccountsPage,
_searchTableAllSchemas.value = EquipmentAccounts.allSchemas
}else{
_searchTableTitle.value = '选择工装编号'
_searchTablePage.value = ToolItemApi.getToolAccountsPage,
_searchTableAllSchemas.value = ToolAccounts.allSchemas
}
openCommon()
}
/** 选择车间弹窗 */
const chooseWorkshopCode = (field) => {
_searchCondition.value = {}
const filters: any[] = []
filters.push({
key: 'available',
value: 'TRUE',
isMainValue: false
})
//
_searchCondition.value.isSearch = true
_searchCondition.value.filters = filters
_searchTableTitle.value = '选择车间'
_searchField.value = "workshopCode"
_formField.value = 'workshopCode'
_searchTablePage.value = WorkshopApi.getWorkshopPage,
_searchTableAllSchemas.value = Workshop.allSchemas,
openCommon()
}
/*打开弹窗*/
const openCommon = () => {
searchTableRef.value.open(
_searchTableTitle.value,
_searchTableAllSchemas.value,
_searchTablePage.value,
_searchField.value,
_searchCondition.value
)
}
/** 弹窗选择之后 回调函数 */
const searchTableSuccess = (formField, searchField, val) => {
nextTick?.(() => {
console.log(formField)
if (formField === 'workshopCode') {
formData.value.workshopCode = val[0].code
}
if (formField === 'equipmentCode') {
formData.value.equipmentCode = val[0].code
}
if (formField === 'faultType') {
formData.value.faultType = val[0].code
}
})
}
/** 初始化弹窗 */
const open = async (type: string, row?: object) => {
dialogVisible.value = true
dialogTitle.value = t('action.' + type)
formType.value = type
//
formData.value.id = row.id
formData.value.number = row.number
}
defineExpose({ open }) // open
const onChangeType = (field) => {
typeValue.value = ''
if(field == 'DEVICE'){
typeValue.value = 'DEVICE'
formData.value.equipmentCode = null
}else if(field == 'EQUIPMENT'){
typeValue.value = 'EQUIPMENT'
formData.value.equipmentCode = null
}
}
const onChangeSec = (field) => {
//
if(field == '0'){
formData.value.equipmentCode = null
formData.value.type = null
isDisabled1.value = true
isDisabled2.value = false
formRules.workshopCode[0].required = true
formRules.maintenancer[0].required = true
formRules.type[0].required = false
formRules.equipmentCode[0].required = false
}else{
//
formData.value.workshopCode = null
formData.value.maintenancer = null
isDisabled1.value = false
isDisabled2.value = true
formRules.workshopCode[0].required = false
formRules.maintenancer[0].required = false
formRules.type[0].required = true
formRules.equipmentCode[0].required = true
}
}
/** 提交表单 */
const submitForm = async (val) => {
//
if (!basicFormRef) return
const valid = await basicFormRef.value.validate()
if (!valid) return
await message.delConfirm('是否提交数据?');
//
await EquipmentRepairJobMainApi.updateEquipmentRepairJobMain(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>

8
src/views/eam/inspectionItem/inspectionItem.data.ts

@ -27,6 +27,12 @@ export const InspectionItem = useCrudSchemas(reactive<CrudSchema[]>([
component:'InputNumber' component:'InputNumber'
}, },
}, },
{
label: '巡检名称',
field: 'name',
sort: 'custom',
isSearch: true
},
{ {
label: '巡检内容', label: '巡检内容',
field: 'content', field: 'content',
@ -40,7 +46,7 @@ export const InspectionItem = useCrudSchemas(reactive<CrudSchema[]>([
} }
}, },
{ {
label: '保养部位', label: '巡检部位',
field: 'equipmentParts', field: 'equipmentParts',
sort: 'custom', sort: 'custom',
isSearch: true isSearch: true

17
src/views/eam/sparepartsinlocation/index.vue

@ -82,7 +82,7 @@
<!-- 导入 --> <!-- 导入 -->
<ImportForm <ImportForm
ref="importFormRef" ref="importFormRef"
url="/eam/sparePartsApplyDetail/import" url="/eam/spare-parts-in-location-main/import"
:importTemplateData="importTemplateData" :importTemplateData="importTemplateData"
@success="importSuccess" @success="importSuccess"
/> />
@ -131,6 +131,7 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row) =>
row['areaCode'] = val[0].areaCode row['areaCode'] = val[0].areaCode
row['sparePartsCode'] = val[0].sparePartsCode row['sparePartsCode'] = val[0].sparePartsCode
row['currentQty'] = val[0].qty row['currentQty'] = val[0].qty
row['isRadeIn'] = val[0].isRadeIn
} }
} else { } else {
if (formField == 'locationCode') { if (formField == 'locationCode') {
@ -138,6 +139,7 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row) =>
setV['areaCode'] = val[0].areaCode setV['areaCode'] = val[0].areaCode
setV['sparePartsCode'] = val[0].sparePartsCode setV['sparePartsCode'] = val[0].sparePartsCode
setV['currentQty'] = val[0].qty setV['currentQty'] = val[0].qty
setV['isRadeIn'] = val[0].isRadeIn
} }
} }
@ -149,9 +151,12 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row) =>
const searchTableSuccessDetail = (formField, searchField, val, formRef) => { const searchTableSuccessDetail = (formField, searchField, val, formRef) => {
nextTick(async () => { nextTick(async () => {
const setV = {} const setV = {}
if (formField == 'sparePartsCode') { if (formField == 'locationCode') {
setV['sparePartsCode'] = val[0].itemNumber setV['locationCode'] = val[0].code
setV['currentQty'] = val[0].qty setV['areaCode'] = val[0].areaCode
setV['sparePartsCode'] = val[0].sparePartsCode
setV['currentQty'] = val[0].qty
setV['isRadeIn'] = val[0].isRadeIn
} }
formRef.setValues(setV) formRef.setValues(setV)
}) })
@ -218,8 +223,8 @@ const isShowMainButton = (row, val) => {
// - // -
const butttondata = (row) => { const butttondata = (row) => {
return [ return [
defaultButtons.mainListEditBtn({ hasPermi: 'eam:spare-parts-in-location-main:update' }) // defaultButtons.mainListEditBtn({ hasPermi: 'eam:spare-parts-in-location-main:update' }), //
// defaultButtons.mainListDeleteBtn({ hasPermi: 'wms:sparePartsInLocationMain:delete' }) // defaultButtons.mainListDeleteBtn({ hasPermi: 'eam:spare-parts-in-location-main:delete' }) //
] ]
} }

41
src/views/eam/sparepartsinlocation/sparePartsInLocationMain.data.ts

@ -10,10 +10,7 @@ import { ItemAccounts } from '@/views/eam/itemAccounts/itemAccounts.data'
export const SparePartsInLocationMainRules = reactive({ export const SparePartsInLocationMainRules = reactive({
number: [required], number: [required],
theme: [required], theme: [required],
// status: [required], type: [required],
// areaCode: [required],
// locationCode: [required],
concurrencyStamp: [required],
}) })
// 备件入库主表 // 备件入库主表
export const SparePartsInLocationMain = useCrudSchemas(reactive<CrudSchema[]>([ export const SparePartsInLocationMain = useCrudSchemas(reactive<CrudSchema[]>([
@ -38,6 +35,13 @@ export const SparePartsInLocationMain = useCrudSchemas(reactive<CrudSchema[]>([
field: 'theme', field: 'theme',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
},{
label: '入库类型',
field: 'type',
sort: 'custom',
dictType: DICT_TYPE.PUT_IN_TYPE,
dictClass: 'string',
}, },
{ {
label: '流程状态', label: '流程状态',
@ -140,7 +144,6 @@ export const SparePartsInLocationDetailRules = reactive({
areaCode: [required], areaCode: [required],
sparePartsCode: [required], sparePartsCode: [required],
applyQty: [required], applyQty: [required],
concurrencyStamp: [required],
}) })
export const SparePartsInLocationDetail = useCrudSchemas(reactive<CrudSchema[]>([ export const SparePartsInLocationDetail = useCrudSchemas(reactive<CrudSchema[]>([
@ -167,19 +170,19 @@ export const SparePartsInLocationDetail = useCrudSchemas(reactive<CrudSchema[]>(
} }
}, },
tableForm: { tableForm: {
// isInpuFocusShow: true, isInpuFocusShow: true,
// searchListPlaceholder: '请选择备件编号', // 输入框占位文本 searchListPlaceholder: '请选择备件编号', // 输入框占位文本
// searchField: 'itemNumber', // 查询弹窗赋值字段 searchField: 'itemNumber', // 查询弹窗赋值字段
// searchTitle: '备件信息', // 查询弹窗标题 searchTitle: '备件信息', // 查询弹窗标题
// searchAllSchemas: Location.allSchemas, // 查询弹窗所需类 searchAllSchemas: Location.allSchemas, // 查询弹窗所需类
// searchPage: LocationApi.getLocationPage, // 查询弹窗所需分页方法 searchPage: LocationApi.getLocationPage, // 查询弹窗所需分页方法
// searchCondition: [ searchCondition: [
// { {
// key: 'available', key: 'available',
// value: 'TRUE', value: 'TRUE',
// isMainValue: false isMainValue: false
// } }
// ] ]
} }
}, },
{ {
@ -193,7 +196,7 @@ export const SparePartsInLocationDetail = useCrudSchemas(reactive<CrudSchema[]>(
} }
}, },
tableForm:{ tableForm:{
// disabled: true disabled: true
} }
}, },
{ {

3
src/views/wms/productionManage/productreceipt/productreceiptRecordMain/index.vue

@ -177,7 +177,8 @@ const butttondata = (row,$index) => {
return [] return []
} }
return [ return [
defaultButtons.mainInspectRequestBtn({hasPermi:'wms:productreceipt-record-main:createInspectRequest',hide:row.inspectRequestFlag == "FALSE" }),// // defaultButtons.mainInspectRequestBtn({hasPermi:'wms:productreceipt-record-main:createInspectRequest',hide:row.inspectRequestFlag == "FALSE" }),//
defaultButtons.mainInspectRequestBtn({hide:row.inspectRequestFlag == "FALSE" }),//
] ]
} }

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

@ -534,6 +534,7 @@ export const ProductreceiptRecordDetail = useCrudSchemas(reactive<CrudSchema[]>(
label: '单据号', label: '单据号',
field: 'number', field: 'number',
sort: 'custom', sort: 'custom',
hiddenInMain:true,
table: { table: {
width: 180 width: 180
}, },
@ -696,7 +697,7 @@ export const ProductreceiptRecordDetail = useCrudSchemas(reactive<CrudSchema[]>(
width: 150, width: 150,
fixed: 'right' fixed: 'right'
}, },
hiddenInMain: true, hiddenInMain: false,
isTableForm:false, isTableForm:false,
} }
])) ]))

12
src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRequestMain/index.vue

@ -120,6 +120,7 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
//
import download from '@/utils/download' import download from '@/utils/download'
import { CACHE_KEY, useCache } from '@/hooks/web/useCache' import { CACHE_KEY, useCache } from '@/hooks/web/useCache'
import { ProductreceiptRequestMain,ProductreceiptRequestMainRules,ProductreceiptRequestDetail, import { ProductreceiptRequestMain,ProductreceiptRequestMainRules,ProductreceiptRequestDetail,
@ -184,12 +185,19 @@ const updataTableColumns = (val) => {
} }
// //
const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => { const searchTableSuccess = async (formField, searchField, val, formRef, type, row ) => {
nextTick(() => { nextTick(async () => {
if (type == 'tableForm') { if (type == 'tableForm') {
if (formField == 'secondPackUnit') { if (formField == 'secondPackUnit') {
row['secondPackUnit'] = val[0]['packUnit'] row['secondPackUnit'] = val[0]['packUnit']
row['secondPackQty'] = val[0]['packQty'] row['secondPackQty'] = val[0]['packQty']
}else if(formField == 'itemCode'){
let res = await ProductreceiptRequestDetailApi.getQueryItemCodeInfo({itemCodes:val.map(item=>item.itemCode).join(',')})
if(res.length>0){
row['uom'] = res[0]['uom']
}
console.log('获取计量单位',res)
} }
// //
row[formField] = val[0][searchField] row[formField] = val[0][searchField]

1
src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRequestMain/productreceiptscrapRequestMain.data.ts

@ -953,6 +953,7 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
width: 150 width: 150
}, },
tableForm: { tableForm: {
disabled:true,
type: 'Select' type: 'Select'
} }

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

@ -197,7 +197,7 @@ export const PurchasereceiptRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
disabled: true disabled: true
} }
}, },
isSearch: false, isSearch: true,
}, },
{ {
label: '从仓库代码', label: '从仓库代码',

16
src/views/wms/purchasereceiptManage/supplierdeliver/purchaseMain/index.vue

@ -10,7 +10,7 @@
<!-- 列表 --> <!-- 列表 -->
<ContentWrap> <ContentWrap>
<Table v-clientTable ref="elTableRef" <Table v-clientTable ref="elTableRef"
:selection="true" :selection="false"
:columns="tableColumns" :data="tableObject.tableList" :loading="tableObject.loading" :pagination="{ :columns="tableColumns" :data="tableObject.tableList" :loading="tableObject.loading" :pagination="{
total: tableObject.total total: tableObject.total
}" v-model:pageSize="tableObject.pageSize" v-model:currentPage="tableObject.currentPage" }" v-model:pageSize="tableObject.pageSize" v-model:currentPage="tableObject.currentPage"
@ -173,12 +173,12 @@ console.log('PurchaseMain.allSchemas.searchSchema',PurchaseMain.allSchemas.searc
newRow['uom'] = item['supplierUom'] newRow['uom'] = item['supplierUom']
tableData.value.push(newRow) tableData.value.push(newRow)
}) })
const itemCodes = val.map(valItem=>valItem['itemCode']) // const itemCodes = val.map(valItem=>valItem['itemCode'])
await ItembasicApi.getItembasicPage({ // await ItembasicApi.getItembasicPage({
code: itemCodes.join(',') // code: itemCodes.join(',')
}).then(res => { // }).then(res => {
row['uom'] = res.list[0].uom // row['uom'] = res.list[0].uom
}) // })
} }
} }
@ -229,7 +229,7 @@ console.log('PurchaseMain.allSchemas.searchSchema',PurchaseMain.allSchemas.searc
defaultButtons.defaultAddBtn({ hasPermi: 'wms:purchase-main:create' }), // defaultButtons.defaultAddBtn({ hasPermi: 'wms:purchase-main:create' }), //
defaultButtons.defaultImportBtn({ hasPermi: 'wms:purchase-main:import' }), // defaultButtons.defaultImportBtn({ hasPermi: 'wms:purchase-main:import' }), //
defaultButtons.defaultExportBtn({ hasPermi: 'wms:purchase-main:export' }), // defaultButtons.defaultExportBtn({ hasPermi: 'wms:purchase-main:export' }), //
defaultButtons.mainListSelectionOrderPubBtn(null), // // defaultButtons.mainListSelectionOrderPubBtn(null), //
defaultButtons.defaultFreshBtn(null), // defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), // defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), // defaultButtons.defaultSetBtn(null), //

4
src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/index.vue

@ -12,7 +12,7 @@
<!-- 列表 --> <!-- 列表 -->
<ContentWrap> <ContentWrap>
<Table ref="tableRef" v-clientTable <Table ref="tableRef" v-clientTable
:selection="true" :selection="false"
:columns="tableColumns" :columns="tableColumns"
:data="tableObject.tableList" :data="tableObject.tableList"
:loading="tableObject.loading" :loading="tableObject.loading"
@ -248,7 +248,7 @@ const getSearchTableData = async (number,formField,searchField)=>{
defaultButtons.defaultAddBtn({ hasPermi: 'wms:purchase-plan-main:create' }), // defaultButtons.defaultAddBtn({ hasPermi: 'wms:purchase-plan-main:create' }), //
defaultButtons.defaultImportBtn({ hasPermi: 'wms:purchase-plan-main:import' }), // defaultButtons.defaultImportBtn({ hasPermi: 'wms:purchase-plan-main:import' }), //
defaultButtons.defaultExportBtn({ hasPermi: 'wms:purchase-plan-main:export' }), // defaultButtons.defaultExportBtn({ hasPermi: 'wms:purchase-plan-main:export' }), //
defaultButtons.mainListSelectionOrderPubBtn(null), // // defaultButtons.mainListSelectionOrderPubBtn(null), //
defaultButtons.defaultFreshBtn(null), // defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), // defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), // defaultButtons.defaultSetBtn(null), //

21
src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue

@ -83,6 +83,8 @@
<!-- 详情 --> <!-- 详情 -->
<Detail <Detail
ref="detailRef" ref="detailRef"
:isOpenSearchTable="true"
fieldTableColumn="poLine"
:annexTable="[{ :annexTable="[{
label: t('ts.合同附件'), label: t('ts.合同附件'),
prop: 'Annex', prop: 'Annex',
@ -148,12 +150,14 @@
:apiPage="SupplierinvoiceRequestDetailApi.getSupplierinvoiceRequestDetailPage" :apiPage="SupplierinvoiceRequestDetailApi.getSupplierinvoiceRequestDetailPage"
:apiDelete="SupplierinvoiceRequestDetailApi.deleteSupplierinvoiceRequestDetail" :apiDelete="SupplierinvoiceRequestDetailApi.deleteSupplierinvoiceRequestDetail"
:Echo="Echo" :Echo="Echo"
:detailButtonIsShowEdit="true" :detailButtonIsShowEdit="false"
:detailButtonIsShowAddStatusArray="['1','6']" :detailButtonIsShowAddStatusArray="['1','6']"
:detailButtonIsShowDelete="false" :detailButtonIsShowDelete="true"
:detailButtonIsShowAdd="false" :detailButtonIsShowAdd="true"
@buttonBaseClick="detailButtonBaseClick" @buttonBaseClick="detailButtonBaseClick"
@tableFormButton="tableFormButton" @tableFormButton="tableFormButton"
:mainSubmitCreateApi="true"
@searchTableSuccessDetail="searchTableSuccessDetail"
> >
<template #differencePrice="{row}"> <template #differencePrice="{row}">
<span :class="{'red-text':row.differencePrice!=0}">{{ row.differencePrice }}</span> <span :class="{'red-text':row.differencePrice!=0}">{{ row.differencePrice }}</span>
@ -172,8 +176,8 @@
/> />
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
//
import download from '@/utils/download' import download from '@/utils/download'
import { CACHE_KEY, useCache } from '@/hooks/web/useCache' import { CACHE_KEY, useCache } from '@/hooks/web/useCache'
import { SupplierinvoiceRequestMain, import { SupplierinvoiceRequestMain,
@ -232,6 +236,15 @@ const getSelectionRows = (currentPage,currentPageSelectionRows) => {
} }
} }
const searchTableSuccessDetail = async (formField, searchField, val, formRef,searchTableFormModel)=>{
console.log('详情',formField, searchField, val, formRef,searchTableFormModel)
let res = await SupplierinvoiceRequestDetailApi.createSupplierinvoiceRequestDetail({
masterId:searchTableFormModel.masterId,
subList:val
})
detailRef.value.updateList()
}
// //
const searchTableSuccess = (formField, searchField, val, searchFormRef, type, row) => { const searchTableSuccess = (formField, searchField, val, searchFormRef, type, row) => {
nextTick(() => { nextTick(() => {

1
src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/supplierinvoiceRequestMain.data.ts

@ -839,6 +839,7 @@ export const SupplierinvoiceRequestDetail = useCrudSchemas(reactive<CrudSchema[]
form: { form: {
// labelMessage: '信息提示说明!!!', // labelMessage: '信息提示说明!!!',
componentProps: { componentProps: {
multiple:true,//多选
isSearchList: true, isSearchList: true,
searchListPlaceholder: '请选择订单行', searchListPlaceholder: '请选择订单行',
searchField: 'poLine', searchField: 'poLine',

Loading…
Cancel
Save