| | |
| | | <van-icon name="arrow" size="20" color="#999999" /> |
| | | </div> |
| | | </div> |
| | | <div class="rework_qd_item" v-if="form.type != 25" @click="openGX(index)"> |
| | | <span>生产工序</span> |
| | | <div class="rework_qd_item_right"> |
| | | <span :class="item.procedureName ? 'black' : ''">{{item.procedureName ? item.procedureName : '请选择'}}</span> |
| | | <van-icon name="arrow" size="20" color="#999999" /> |
| | | <template v-if="form.type !== 25"> |
| | | <div class="rework_qd_item" v-if="item.hasBom !== 0" @click="openGX(index)"> |
| | | <span>生产工序</span> |
| | | <div class="rework_qd_item_right"> |
| | | <span :class="item.procedureName ? 'black' : ''">{{item.procedureName ? item.procedureName : '请选择'}}</span> |
| | | <van-icon name="arrow" size="20" color="#999999" /> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | <div class="rework_qd_item" @click="openQ(index)"> |
| | | <span><b>*</b>质量属性</span> |
| | | <div class="rework_qd_item_right"> |
| | |
| | | materialId: '', |
| | | materialName: '', |
| | | num: '', |
| | | hasBom: '', |
| | | procedureId: '', |
| | | procedureName: '', |
| | | qualityType: '', |
| | |
| | | } |
| | | // 打开工序 |
| | | const openGX = (index: number) => { |
| | | if (!list.value[index].materialId) return Toast('请先选择入库物料') |
| | | i.value = index |
| | | productionShow.value = true |
| | | } |
| | |
| | | if (!form.warehouseId) return Toast('请选择入库仓库') |
| | | list.value.push({ |
| | | batch: '', |
| | | locationId: '', |
| | | locationName: '', |
| | | locationId: list.value[list.value.length - 1].locationId, |
| | | locationName: list.value[list.value.length - 1].locationName, |
| | | locationIdLabel: list.value[list.value.length - 1].locationIdLabel, |
| | | materialId: '', |
| | | materialName: '', |
| | | num: '', |
| | | hasBom: '', |
| | | procedureId: '', |
| | | procedureName: '', |
| | | qualityType: list.value[list.value.length - 1].qualityType, |
| | |
| | | if (!list.value[i].locationId) return Toast(`第${i+1}项入库货位不能为空`) |
| | | if (!list.value[i].materialId) return Toast(`第${i+1}项入库物料不能为空`) |
| | | if (!list.value[i].qualityType) return Toast(`第${i+1}项质量属性不能为空`) |
| | | if (!list.value[i].num || list.value[i].num == '' || list.value[i].num == 0) { |
| | | if (list.value[i].num <= 0) { |
| | | return Toast(`第${i + 1}项入库数量必须大于0`) |
| | | } |
| | | } |
| | |
| | | } else { |
| | | location.value = true |
| | | list.value.forEach(item => { |
| | | item.locationId = '' |
| | | item.locationName = '' |
| | | item.locationId = res.data[0].id |
| | | item.locationName = res.data[0].unionName |
| | | }) |
| | | // list.value.forEach(item => { |
| | | // item.locationId = '' |
| | | // item.locationName = '' |
| | | // }) |
| | | } |
| | | } |
| | | }) |
| | |
| | | list.value[i.value].materialName = item.mmodelUnionName |
| | | list.value[i.value].materialId = item.id |
| | | list.value[i.value].unitId = item.unitId |
| | | list.value[i.value].hasBom = item.hasBom |
| | | list.value[i.value].unitName = item.umodelName |
| | | // 获取物料下工序 |
| | | getListByMaterialId({ |