派工添加NC下发
This commit is contained in:
parent
65b3d20420
commit
8f9bf2bdf2
@ -101,3 +101,11 @@ export function exportNccode(params:any) {
|
|||||||
params
|
params
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//加载全部NC代码
|
||||||
|
export function loadAllNcCode() {
|
||||||
|
return request({
|
||||||
|
url: `biz/ncCode/loadAllNcCode`,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|||||||
@ -35,8 +35,12 @@
|
|||||||
value: '2'
|
value: '2'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '其他异常',
|
label: '设备异常',
|
||||||
value: '3'
|
value: '3'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '其他异常',
|
||||||
|
value: '4'
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
@ -170,16 +174,11 @@
|
|||||||
<n-form inline :model="searchForm" label-placement="left">
|
<n-form inline :model="searchForm" label-placement="left">
|
||||||
<n-grid :x-gap="8" :cols="4">
|
<n-grid :x-gap="8" :cols="4">
|
||||||
<n-gi>
|
<n-gi>
|
||||||
<n-form-item label="异常编号">
|
<n-form-item label="报警异常">
|
||||||
<n-input v-model:value="searchForm.abnormalCode" placeholder="请输入异常编号" clearable style="width: 200px"/>
|
|
||||||
</n-form-item>
|
|
||||||
</n-gi>
|
|
||||||
<n-gi>
|
|
||||||
<n-form-item label="操作人员">
|
|
||||||
<n-select
|
<n-select
|
||||||
v-model:value="searchForm.abnormalType"
|
v-model:value="searchForm.abnormalType"
|
||||||
:options="abnormalTypes"
|
:options="abnormalTypes"
|
||||||
placeholder="请选择异常类型"
|
placeholder="请选择报警异常"
|
||||||
clearable
|
clearable
|
||||||
style="width: 200px"
|
style="width: 200px"
|
||||||
/>
|
/>
|
||||||
|
|||||||
@ -742,7 +742,7 @@ const dispatchLoading = ref(false)
|
|||||||
const dispatchformRef = ref()
|
const dispatchformRef = ref()
|
||||||
const dispatchform = reactive<any>({
|
const dispatchform = reactive<any>({
|
||||||
id: '', name: '', beginTime: '', endTime: '', quantity: '', sectionId: null as number | null, workshopId: null as number | null,
|
id: '', name: '', beginTime: '', endTime: '', quantity: '', sectionId: null as number | null, workshopId: null as number | null,
|
||||||
list: [{ sectionId:'',deviceId:'', quantity: '' }],
|
list: [{ sectionId:'',deviceId:'', quantity: '', ncId:'' }],
|
||||||
})
|
})
|
||||||
const dispatchrules = {}
|
const dispatchrules = {}
|
||||||
|
|
||||||
@ -1267,11 +1267,11 @@ function disphand(process: ProcessPlanItemVO, order?: OrderProcessPlanVO) {
|
|||||||
dispatchform.sort = entity.sort
|
dispatchform.sort = entity.sort
|
||||||
dispatchform.sectionId = entity.sectionId ?? process.sectionId ?? null
|
dispatchform.sectionId = entity.sectionId ?? process.sectionId ?? null
|
||||||
dispatchform.workshopId = entity.workshopId ?? process.workshopId ?? order?.workshopId ?? null
|
dispatchform.workshopId = entity.workshopId ?? process.workshopId ?? order?.workshopId ?? null
|
||||||
dispatchform.list = [{ sectionId: '', deviceId: '', quantity: remainQty || '' }]
|
dispatchform.list = [{ sectionId: '', deviceId: '', quantity: remainQty || '',ncId:'' }]
|
||||||
}
|
}
|
||||||
|
|
||||||
function addpgnum() {
|
function addpgnum() {
|
||||||
dispatchform.list.push({ sectionId: '', deviceId: '', quantity: '' })
|
dispatchform.list.push({ sectionId: '', deviceId: '', quantity: '',ncId:'' })
|
||||||
}
|
}
|
||||||
|
|
||||||
function deletenum(index: number) {
|
function deletenum(index: number) {
|
||||||
|
|||||||
@ -40,10 +40,8 @@
|
|||||||
/>
|
/>
|
||||||
</n-form-item>
|
</n-form-item>
|
||||||
</n-gi>
|
</n-gi>
|
||||||
|
|
||||||
</n-grid>
|
</n-grid>
|
||||||
<n-grid>
|
<n-grid>
|
||||||
|
|
||||||
<n-gi :span="10">
|
<n-gi :span="10">
|
||||||
<n-form-item
|
<n-form-item
|
||||||
label="数量"
|
label="数量"
|
||||||
@ -57,6 +55,22 @@
|
|||||||
<n-input v-model:value="obj.quantity"/>
|
<n-input v-model:value="obj.quantity"/>
|
||||||
</n-form-item>
|
</n-form-item>
|
||||||
</n-gi>
|
</n-gi>
|
||||||
|
<n-gi :span="10">
|
||||||
|
<n-form-item
|
||||||
|
label="NC下发"
|
||||||
|
:path="`${listname}[${index}].ncId`"
|
||||||
|
>
|
||||||
|
<n-select
|
||||||
|
v-model:value="obj.ncId"
|
||||||
|
filterable
|
||||||
|
placeholder="请选择下发NC"
|
||||||
|
:options="ncList"
|
||||||
|
clearable
|
||||||
|
remote
|
||||||
|
:clear-filter-after-select="false"
|
||||||
|
/>
|
||||||
|
</n-form-item>
|
||||||
|
</n-gi>
|
||||||
<n-gi :span="4" style="padding-left:10px;">
|
<n-gi :span="4" style="padding-left:10px;">
|
||||||
<n-icon
|
<n-icon
|
||||||
v-if="index == 0"
|
v-if="index == 0"
|
||||||
@ -89,6 +103,7 @@
|
|||||||
AddOutline,
|
AddOutline,
|
||||||
TrashOutline,
|
TrashOutline,
|
||||||
} from '@vicons/ionicons5'
|
} from '@vicons/ionicons5'
|
||||||
|
import {loadAllNcCode} from '@/api/nccode.ts'
|
||||||
|
|
||||||
const props = withDefaults(defineProps<{
|
const props = withDefaults(defineProps<{
|
||||||
listname: any
|
listname: any
|
||||||
@ -106,7 +121,6 @@
|
|||||||
}>()
|
}>()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// function updatehand() {
|
// function updatehand() {
|
||||||
// emit('update')
|
// emit('update')
|
||||||
// }
|
// }
|
||||||
@ -114,6 +128,7 @@
|
|||||||
function addpgnum() {
|
function addpgnum() {
|
||||||
emit('addhand')
|
emit('addhand')
|
||||||
}
|
}
|
||||||
|
|
||||||
function deletenum(index: any) {
|
function deletenum(index: any) {
|
||||||
emit('delehand', index)
|
emit('delehand', index)
|
||||||
}
|
}
|
||||||
@ -125,6 +140,7 @@
|
|||||||
|
|
||||||
let deviceList = ref<any>([])
|
let deviceList = ref<any>([])
|
||||||
|
|
||||||
|
let ncList = ref<any>([])
|
||||||
|
|
||||||
function slehand(v?: any) {
|
function slehand(v?: any) {
|
||||||
loadingRef.value = true
|
loadingRef.value = true
|
||||||
@ -175,21 +191,21 @@
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// function searchSection(sectionId?:number){
|
//加载下发数据
|
||||||
// if(!sectionId) return
|
async function loadNc() {
|
||||||
// props.obj.deviceId = ''
|
const res = await loadAllNcCode()
|
||||||
// deviceList.value = []
|
ncList.value = res.map((n: any) => {
|
||||||
// deviceApi.list(sectionId).then(res=>{
|
return {
|
||||||
// deviceList.value = res.map((n:any)=>{
|
label: n.ncName,
|
||||||
// return {
|
value: n.id
|
||||||
// label:n.name,
|
}
|
||||||
// value:n.id+''
|
})
|
||||||
// }
|
console.log(ncList.value)
|
||||||
// })
|
}
|
||||||
// })
|
|
||||||
// }
|
|
||||||
|
|
||||||
loadSection()
|
loadSection()
|
||||||
slehand()
|
slehand()
|
||||||
// handleDevice()
|
loadNc()
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
Loading…
Reference in New Issue
Block a user