| | |
| | | { |
| | | batch: '', |
| | | locationId: '', |
| | | locationIdLabel: '', |
| | | locationName: '', |
| | | materialId: '', |
| | | materialName: '', |
| | |
| | | } |
| | | // 打开选择物料 |
| | | const openQ = (index: number) => { |
| | | if (list.value[index].locationIdLabel == 'APPLIANCE_ONTEST' || list.value[index].locationIdLabel == 'APPLIANCE_OFFTEST' || list.value[index].locationIdLabel == 'APPLIANCE_USELESS') { |
| | | return |
| | | } |
| | | i.value = index |
| | | qualityShow.value = true |
| | | } |
| | |
| | | locationShow.value = true |
| | | } |
| | | const addItem = () => { |
| | | // if (!form.warehouseId) return Toast('请选择入库仓库') |
| | | if (!form.warehouseId) return Toast('请选择入库仓库') |
| | | list.value.push({ |
| | | batch: '', |
| | | locationId: '', |
| | | locationName: '', |
| | | locationIdLabel: list.value[list.value.length - 1].locationIdLabel, |
| | | materialId: '', |
| | | materialName: '', |
| | | num: '', |
| | | procedureId: '', |
| | | procedureName: '', |
| | | qualityType: '', |
| | | qualityTypeName: '', |
| | | qualityType: list.value[list.value.length - 1].qualityType, |
| | | qualityTypeName: list.value[list.value.length - 1].qualityTypeName, |
| | | unitId: '', |
| | | unitName: '' |
| | | }) |
| | |
| | | item.locationId = res.data[0].id |
| | | item.locationName = res.data[0].unionName |
| | | }) |
| | | list.value[i.value].locationIdLabel = res.data[0].label |
| | | if (res.data[0].label === 'APPLIANCE_ONTEST') { |
| | | list.value[i.value].qualityType = '0' |
| | | list.value[i.value].qualityTypeName = '合格' |
| | | } else if (res.data[0].label === 'APPLIANCE_OFFTEST') { |
| | | list.value[i.value].qualityType = '1' |
| | | list.value[i.value].qualityTypeName = '不良' |
| | | } else if (res.data[0].label === 'APPLIANCE_USELESS') { |
| | | list.value[i.value].qualityType = '2' |
| | | list.value[i.value].qualityTypeName = '报废' |
| | | } |
| | | } else { |
| | | location.value = true |
| | | list.value.forEach(item => { |
| | |
| | | const getValue3 = (item: any): void => { |
| | | list.value[i.value].locationId = item.id |
| | | list.value[i.value].locationName = item.unionName |
| | | list.value[i.value].qualityType = '' |
| | | list.value[i.value].qualityTypeName = '' |
| | | list.value[i.value].locationIdLabel = item.label |
| | | if (item.label === 'APPLIANCE_ONTEST') { |
| | | list.value[i.value].qualityType = '0' |
| | | list.value[i.value].qualityTypeName = '合格' |
| | | } else if (item.label === 'APPLIANCE_OFFTEST') { |
| | | list.value[i.value].qualityType = '1' |
| | | list.value[i.value].qualityTypeName = '不良' |
| | | } else if (item.label === 'APPLIANCE_USELESS') { |
| | | list.value[i.value].qualityType = '2' |
| | | list.value[i.value].qualityTypeName = '报废' |
| | | } |
| | | locationShow.value = false |
| | | } |
| | | // 选择工序 |