Browse Source

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

master_hella_20240701
ljlong_2630 6 months ago
parent
commit
15b6566ba9
  1. 15
      src/api/eam/equipmentRepairJobMain/index.ts
  2. 14
      src/components/rowDrop/index.vue
  3. 3
      src/hooks/web/useMessage.ts
  4. 26
      src/utils/disposition/defaultButtons.ts
  5. 5
      src/views/eam/equipmentMaintenanceMain/finishForm1.vue
  6. 4
      src/views/eam/equipmentMaintenanceMain/index.vue
  7. 46
      src/views/eam/equipmentRepairJobMain/equipmentRepairJobMain.data.ts
  8. 211
      src/views/eam/equipmentRepairJobMain/finishForm1.vue
  9. 209
      src/views/eam/equipmentRepairJobMain/finishForm3.vue
  10. 117
      src/views/eam/equipmentRepairJobMain/index.vue
  11. 2
      src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/supplierinvoiceRequestMain.data.ts

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

@ -14,9 +14,12 @@ export interface EquipmentRepairJobMainVO {
startTime: Date startTime: Date
endTime: Date endTime: Date
totalMinutes: number totalMinutes: number
verifyer: number verifyerRepair: number
verifyContent: string verifyContentRepair: string
verifyTime: Date verifyTimeRepair: Date
verifyerReport: number
verifyContentReport: string
verifyTimeReport: Date
maintenancer: number maintenancer: number
maintenancePhone: string maintenancePhone: string
completeResult: string completeResult: string
@ -100,3 +103,9 @@ export const importTemplate = () => {
export const updateEquipmentRepairOrder = async (data: EquipmentRepairJobMainVO) => { export const updateEquipmentRepairOrder = async (data: EquipmentRepairJobMainVO) => {
return await request.post({ url: `/eam/equipment-repair-job-main/updateOrder`, data }) return await request.post({ url: `/eam/equipment-repair-job-main/updateOrder`, data })
} }
//验证不通过,打回维修工单
export const backEquipmentRepairOrder = async (data: EquipmentRepairJobMainVO) => {
return await request.post({ url: `/eam/equipment-repair-job-main/fallback`, data })
}

14
src/components/rowDrop/index.vue

@ -47,14 +47,14 @@ const allData = ref([]) // 字段设置列表展现字段 除操作外
const checkedDataList = ref([]) const checkedDataList = ref([])
const checkAll = ref(true) const checkAll = ref(true)
const handlecheckallchange = (val: boolean) => { const handlecheckallchange = (val: boolean) => {
console.log('handlecheckallchange全部',val) // console.log('handlecheckallchange',val)
checkedDataList.value = val ? allData.value : [] checkedDataList.value = val ? allData.value : []
isIndeterminate.value = false isIndeterminate.value = false
save() save()
} }
const handlecheckedchange = (value: string[]) => { const handlecheckedchange = (value: string[]) => {
console.log('handlecheckedchange',value) // console.log('handlecheckedchange',value)
console.log('allData',allData.value) // console.log('allData',allData.value)
const checkedCount = value.length const checkedCount = value.length
checkAll.value = checkedCount === allData.value.length checkAll.value = checkedCount === allData.value.length
isIndeterminate.value = checkedCount > 0 && checkedCount < allData.value.length isIndeterminate.value = checkedCount > 0 && checkedCount < allData.value.length
@ -88,9 +88,9 @@ const save = () => {
if(props.detailAllSchemas){ if(props.detailAllSchemas){
myTableColumns = [...props.allSchemas?.tableColumns,...props.detailAllSchemas?.tableMainColumns] myTableColumns = [...props.allSchemas?.tableColumns,...props.detailAllSchemas?.tableMainColumns]
} }
console.log('myTableColumns',myTableColumns) // console.log('myTableColumns',myTableColumns)
console.log('checkedDataList',checkedDataList) // console.log('checkedDataList',checkedDataList)
console.log('allData',allData.value) // console.log('allData',allData.value)
let leftArr = [] let leftArr = []
let rightArr = [] let rightArr = []
@ -119,7 +119,7 @@ const save = () => {
field:item.field, field:item.field,
isTable:item.isTable isTable:item.isTable
})) }))
console.log('paramsData',paramsData) // console.log('paramsData',paramsData)
RedisApi.addRedis({key: routeName.value,value: JSON.stringify(paramsData)}).then(() => { RedisApi.addRedis({key: routeName.value,value: JSON.stringify(paramsData)}).then(() => {
}).catch(err => { }).catch(err => {
console.log(err) console.log(err)

3
src/hooks/web/useMessage.ts

@ -62,9 +62,10 @@ export const useMessage = () => {
// 验证窗体 // 验证窗体
confirmPassword(content: string, tip?: string) { confirmPassword(content: string, tip?: string) {
return ElMessageBox.confirm(content, tip ? tip : t('common.confirmTitle'), { return ElMessageBox.confirm(content, tip ? tip : t('common.confirmTitle'), {
distinguishCancelAndClose: true,
confirmButtonText: t('验证通过'), confirmButtonText: t('验证通过'),
cancelButtonText: t('验证不通过'), cancelButtonText: t('验证不通过'),
type: 'warning' type: 'warning',
}) })
}, },
// 审核窗体 // 审核窗体

26
src/utils/disposition/defaultButtons.ts

@ -415,6 +415,32 @@ export function mainListValidateBtn(option:any) {
}) })
} }
// 主列表-报修验证按钮
export function mainListValidateReportBtn(option:any) {
return __defaultBtnOption(option,{
label: t(`ts.报修验证`).replace('ts.', ''),
name: 'validate_report',
hide: false,
type: 'primary',
color: '',
link: true, // 文本展现按钮
hasPermi: ''
})
}
// 主列表-维修验证按钮
export function mainListValidateRepairBtn(option:any) {
return __defaultBtnOption(option,{
label: t(`ts.维修验证`).replace('ts.', ''),
name: 'validate_repair',
hide: false,
type: 'primary',
color: '',
link: true, // 文本展现按钮
hasPermi: ''
})
}
// 主列表-审核按钮 // 主列表-审核按钮
export function mainListAuditingBtn(option:any) { export function mainListAuditingBtn(option:any) {
return __defaultBtnOption(option,{ return __defaultBtnOption(option,{

5
src/views/eam/equipmentMaintenanceMain/finishForm1.vue

@ -169,8 +169,7 @@ defineExpose({ open }) // 提供 open 方法,用于打开弹窗
/** 提交表单 */ /** 提交表单 */
const submitForm = async (val) => { const submitForm = async (val) => {
//success
emit('success',formData.value.id)
// //
if (!basicFormRef) return if (!basicFormRef) return
const valid = await basicFormRef.value.validate() const valid = await basicFormRef.value.validate()
@ -178,6 +177,8 @@ const submitForm = async (val) => {
// //
await EquipmentMaintenanceMainApi.updateEquipmentMaintenanceMain(formData.value) await EquipmentMaintenanceMainApi.updateEquipmentMaintenanceMain(formData.value)
//success
emit('success',formData.value.id)
dialogVisible.value = false dialogVisible.value = false
} }

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

@ -363,7 +363,8 @@ const handleValidate = async (row) => {
// //
// //
finishForm1Ref.value.open('update', row); finishForm1Ref.value.open('update', row);
}).catch (async () => { }).catch (async (action: Action) => {
if(action === 'cancel'){
const params = ref({id: '', status:''}) const params = ref({id: '', status:''})
params.value.id = row.id params.value.id = row.id
params.value.status = '5' params.value.status = '5'
@ -371,6 +372,7 @@ const handleValidate = async (row) => {
message.success(t('工单已打回')) message.success(t('工单已打回'))
// //
await getList() await getList()
}
}) })
} }

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

@ -166,20 +166,54 @@ export const EquipmentRepairJobMain = useCrudSchemas(reactive<CrudSchema[]>([
isSearch: false, isSearch: false,
}, },
{ {
label: '验证人', label: '维修验证人',
field: 'verifyer', field: 'verifyerRepair',
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
}, },
{ {
label: '验证内容', label: '维修验证内容',
field: 'verifyContent', field: 'verifyContentRepair',
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
}, },
{ {
label: '验证时间', label: '维修验证时间',
field: 'verifyTime', field: 'verifyTimeRepair',
sort: 'custom',
formatter: dateFormatter,
isSearch: 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: '报修验证人',
field: 'verifyerReport',
sort: 'custom',
isSearch: false,
},
{
label: '报修验证内容',
field: 'verifyContentReport',
sort: 'custom',
isSearch: false,
},
{
label: '报修验证时间',
field: 'verifyTimeReport',
sort: 'custom', sort: 'custom',
formatter: dateFormatter, formatter: dateFormatter,
isSearch: false, isSearch: false,

211
src/views/eam/equipmentRepairJobMain/finishForm1.vue

@ -0,0 +1,211 @@
<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="verifyerRepair">
<el-input v-model="formData.verifyerRepair" placeholder="请输入维修验证人" :disabled="isDisabled"/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="维修验证内容" prop="verifyContentRepair">
<el-input v-model="formData.verifyContentRepair" placeholder="请输入维修验证内容" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="维修验证时间" prop="verifyTimeRepair">
<el-date-picker
v-model="formData.verifyTimeRepair"
type="datetime"
value-format="x"
placeholder="选择维修验证时间">
</el-date-picker>
</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 * as EquipmentMaintenanceMainApi from '@/api/eam/equipmentMaintenanceMain'
import { SearchTable } from '@/components/SearchTable'
import {ElInput} from "element-plus";
import * as EquipmentRepairJobMainApi from "@/api/eam/equipmentRepairJobMain";
import {updateEquipmentRepairJobMain} from "@/api/eam/equipmentRepairJobMain";
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 formData = ref({
id:'',
number:'',
verifyerRepair: '',
verifyContentRepair: '',
verifyTimeRepair: '',
})
const formRules = reactive({
verifyerRepair: [
{ required: true, message: '验证人不能为空', trigger: 'blur' },
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
],
verifyContentRepair: [
{ required: true, message: '验证内容不能为空', trigger: 'blur' },
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
],
verifyTimeRepair: [
{ required: true, message: '验证时间不能为空', trigger: 'blur' },
],
})
const basicFormRef = ref() // Ref
// /** */
// 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 = inspectionItemApi.getInspectionItemPage
// _searchTableAllSchemas.value = InspectionItem.allSchemas
// openCommon()
// }
//
// /** */
// const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => {
// nextTick?.(() => {
// if (formField === 'xunJianItem') {
// val.forEach(item => {
// const isExist = tags.value.some(tag => tag.content === item.content);
// if (!isExist){
// const newItem = {};
// newItem['content'] = item.content;
// newItem['id'] = item.id;
// tags.value.push(newItem);
// }
// });
// }
// })
// }
// /**/
// 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
//
formData.value.id = row.id
formData.value.number = row.number
}
defineExpose({ open }) // open
/** 提交表单 */
const submitForm = async (val) => {
//
if (!basicFormRef) return
const valid = await basicFormRef.value.validate()
if (!valid) return
//
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>

209
src/views/eam/equipmentRepairJobMain/finishForm3.vue

@ -0,0 +1,209 @@
<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="verifyerReport">
<el-input v-model="formData.verifyerReport" placeholder="请输入报修验证人" :disabled="isDisabled"/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="报修验证内容" prop="verifyContentReport">
<el-input v-model="formData.verifyContentReport" placeholder="请输入报修验证内容" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="报修验证时间" prop="verifyTimeReport">
<el-date-picker
v-model="formData.verifyTimeReport"
type="datetime"
value-format="x"
placeholder="选择报修验证时间">
</el-date-picker>
</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 * as EquipmentRepairJobMainApi from "@/api/eam/equipmentRepairJobMain";
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 formData = ref({
id:'',
number:'',
verifyerReport: '',
verifyContentReport: '',
verifyTimeReport: '',
})
const formRules = reactive({
verifyerReport: [
{ required: true, message: '验证人不能为空', trigger: 'blur' },
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
],
verifyContentReport: [
{ required: true, message: '验证内容不能为空', trigger: 'blur' },
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
],
verifyTimeReport: [
{ required: true, message: '验证时间不能为空', trigger: 'blur' },
],
})
const basicFormRef = ref() // Ref
// /** */
// 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 = inspectionItemApi.getInspectionItemPage
// _searchTableAllSchemas.value = InspectionItem.allSchemas
// openCommon()
// }
//
// /** */
// const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => {
// nextTick?.(() => {
// if (formField === 'xunJianItem') {
// val.forEach(item => {
// const isExist = tags.value.some(tag => tag.content === item.content);
// if (!isExist){
// const newItem = {};
// newItem['content'] = item.content;
// newItem['id'] = item.id;
// tags.value.push(newItem);
// }
// });
// }
// })
// }
// /**/
// 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
//
formData.value.id = row.id
formData.value.number = row.number
}
defineExpose({ open }) // open
/** 提交表单 */
const submitForm = async (val) => {
//
if (!basicFormRef) return
const valid = await basicFormRef.value.validate()
if (!valid) return
//
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>

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

@ -50,7 +50,9 @@
:isBusiness="false" :isBusiness="false"
/> />
<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"/>
<!-- 详情 --> <!-- 详情 -->
<Detail ref="detailRef" <Detail ref="detailRef"
@ -83,7 +85,9 @@ 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 '@/views/eam/equipmentRepairJobMain/EquipmentRepairJobDetail.vue' import Detail from '@/views/eam/equipmentRepairJobMain/EquipmentRepairJobDetail.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'
defineOptions({ name: 'EquipmentRepairJobMain' }) defineOptions({ name: 'EquipmentRepairJobMain' })
@ -167,6 +171,8 @@ const butttondata = (row) => {
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.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.mainListValidateReportBtn({hide: isShowStatusButton(row,['7']),hasPermi:'eam:equipmentRepairJobMain:update'}), //
] ]
} }
@ -182,6 +188,10 @@ const buttonTableClick = async (val, row) => {
handleExecute(row.id) handleExecute(row.id)
} else if (val == 'finish') { // } else if (val == 'finish') { //
handleFinish(row) handleFinish(row)
} else if (val == 'validate_repair') { //
handleValidateRepair(row)
} else if (val == 'validate_report') { //
handleValidateReport(row)
} }
@ -251,6 +261,52 @@ const searchTableSuccessDetail = (formField, searchField, val, formRef ) => {
}) })
} }
/** 报修验证按钮操作 */
const finishForm3Ref = ref()
const handleValidateReport = async (row) => {
await message.delConfirm('是否验证所选中工单?');
message.confirmPassword(t('')).then(async () => {
//
//
finishForm3Ref.value.open('update', row);
}).catch (async (action: Action) => {
if(action === 'cancel'){
const params = ref({id: '', status:''})
params.value.id = row.id
params.value.status = '5'
//
await EquipmentRepairJobMainApi.backEquipmentRepairOrder(params.value)
message.success(t('工单已打回'))
//
await getList()
}
})
}
/** 维修验证按钮操作 */
const finishForm1Ref = ref()
const handleValidateRepair = async (row) => {
await message.delConfirm('是否验证所选中工单?');
message.confirmPassword(t('')).then(async () => {
//
//
finishForm1Ref.value.open('update', row);
}).catch (async (action: Action) => {
if(action === 'cancel'){
const params = ref({id: '', status:''})
params.value.id = row.id
params.value.status = '5'
await EquipmentRepairJobMainApi.backEquipmentRepairOrder(params.value)
message.success(t('工单已打回'))
//
await getList()
}
})
}
/** 完成按钮操作 */ /** 完成按钮操作 */
const finishForm2Ref = ref() const finishForm2Ref = ref()
const handleFinish = async (row) => { const handleFinish = async (row) => {
@ -313,6 +369,36 @@ const handleDelete = async (id: number) => {
} }
//finishForm1
const getClosed1=(val)=> {
nextTick?.(() => {
console.log(val)
getList()
})
}
//finishForm1
const getData1=(val)=> {
nextTick?.(async () => {
console.log(val)
try {
const params = ref({
id: '',
status:'',
})
params.value.id = val
params.value.status = '7'
await EquipmentRepairJobMainApi.updateEquipmentRepairOrder(params.value)
message.success(t('工单已流转'))
//
await getList()
} catch {}
}
)
}
//finishForm2 //finishForm2
const getClosed2=(val)=> { const getClosed2=(val)=> {
@ -338,6 +424,37 @@ const getData2=(val)=> {
}) })
} }
//finishForm3
const getClosed3=(val)=> {
nextTick?.(() => {
console.log(val)
getList()
})
}
//finishForm3
const getData3=(val)=> {
nextTick?.(async () => {
console.log(val)
try {
const params = ref({
id: '',
status:'',
})
params.value.id = val
params.value.status = '7'
await EquipmentRepairJobMainApi.updateEquipmentRepairOrder(params.value)
message.success(t('工单已流转'))
//
await getList()
} catch {}
}
)
}
/** 导出按钮操作 */ /** 导出按钮操作 */
const exportLoading = ref(false) // const exportLoading = ref(false) //
const handleExport = async () => { const handleExport = async () => {

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

@ -28,7 +28,7 @@ const requestsettingData = data?.list[0] || {}
userDept.id = userDept.id.toString() userDept.id = userDept.id.toString()
const userDeptArray:any = [userDept] const userDeptArray:any = [userDept]
const procurementCreators = await SupplierinvoiceRequestMainApi.queryUserInfoByRoleCode({ roleCode: 'purchase',pageSize: 1000,pageNo: 1,sort: '',by: 'ASC' }) const procurementCreators = await SupplierinvoiceRequestMainApi.queryUserInfoByRoleCode({ roleCode: 'procurement_role',pageSize: 1000,pageNo: 1,sort: '',by: 'ASC' })
/** /**
* @returns {Array} * @returns {Array}
*/ */

Loading…
Cancel
Save