| | |
| | | <span>{{item.outActnum}}{{item.unitName}}</span> |
| | | </div> |
| | | <div class="page_content_title_bottom"> |
| | | <span class="green" v-if="item.qualityType === 0">合格 <span |
| | | class="black">/</span> </span> |
| | | <span class="warning" v-else-if="item.qualityType === 1">不良 <span |
| | | class="black">/</span> </span> |
| | | <span class="error" v-else-if="item.qualityType === 2">报废 <span |
| | | class="black">/</span> </span> |
| | | <span v-else>- / </span> |
| | | <span>{{item.procedureName ? item.procedureName : '-'}} / </span> |
| | | <span class="green" v-if="item.qualityType === 0">合格<text class="c6" decode>{{ split}}</text></span> |
| | | <span class="warning" v-else-if="item.qualityType === 1">不良<text class="c6" decode>{{ split}}</text></span> |
| | | <span class="error" v-else-if="item.qualityType === 2">报废<text class="c6" decode>{{ split}}</text></span> |
| | | <span v-else>-<text class="c6" decode>{{ split}}</text></span> |
| | | <span>{{item.procedureName ? item.procedureName : '-'}}<text class="c6" decode>{{ split}}</text></span> |
| | | <span>{{item.batch ? item.batch : '-'}}</span> |
| | | </div> |
| | | </div> |
| | |
| | | </div> |
| | | </div> |
| | | <div class="page_yxwl_list_item_sx"> |
| | | <span class="green" v-if="item.qualityType === 0">合格 <span>/</span> </span> |
| | | <span class="warning" v-else-if="item.qualityType === 1">不良 <span>/</span> </span> |
| | | <span class="red" v-else-if="item.qualityType === 2">报废 <span>/</span> </span> |
| | | <span>{{item.procedureName ? item.procedureName : '-'}} <span>/</span> </span> |
| | | <span class="green" v-if="item.qualityType === 0">合格<text class="c6" decode>{{ split}}</text></span> |
| | | <span class="warning" v-else-if="item.qualityType === 1">不良<text class="c6" decode>{{ split}}</text></span> |
| | | <span class="red" v-else-if="item.qualityType === 2">报废<text class="c6" decode>{{ split}}</text></span> |
| | | <span>{{item.procedureName ? item.procedureName : '-'}}<text class="c6" decode>{{ split}}</text></span> |
| | | <span>{{item.batch ? item.batch : '-'}}</span> |
| | | </div> |
| | | <div class="page_yxwl_list_item_num"> |
| | |
| | | </div> |
| | | </div> |
| | | <div class="page_yxwl_list_item_sx"> |
| | | <span class="green" v-if="item1.qualityType === 0">合格 <span>/</span> </span> |
| | | <span class="yellow" v-else-if="item1.qualityType === 1">不良 <span>/</span> </span> |
| | | <span class="red" v-else-if="item1.qualityType === 2">报废 <span>/</span> </span> |
| | | <span>{{item1.procedureName ? item1.procedureName : '-'}} <span>/</span> </span> |
| | | <span class="green" v-if="item1.qualityType === 0">合格<text class="c6" decode>{{ split}}</text></span> |
| | | <span class="yellow" v-else-if="item1.qualityType === 1">不良<text class="c6" decode>{{ split}}</text></span> |
| | | <span class="red" v-else-if="item1.qualityType === 2">报废<text class="c6" decode>{{ split}}</text></span> |
| | | <span>{{item1.procedureName ? item1.procedureName : '-'}}<text class="c6" decode>{{ split}}</text></span> |
| | | <span>{{item1.batch ? item1.batch : '-'}}</span> |
| | | </div> |
| | | <div class="page_yxwl_list_item_num"> |
| | |
| | | }, |
| | | data() { |
| | | return { |
| | | split: ' / ', |
| | | type: '', |
| | | id: '', |
| | | wareHouseId: '', |
| | |
| | | }, |
| | | selectMaterial(val) { |
| | | let material = JSON.parse(JSON.stringify(val)) |
| | | let tempMaterial = this.seleMateriaList.find(item => item.locationId == this.location) |
| | | if (tempMaterial) { |
| | | if (tempMaterial.qualityType == material.qualityType && tempMaterial.procedureId == material |
| | | .procedureId && |
| | | tempMaterial.batch == material.batch && tempMaterial.materialId == material.materialId) { |
| | | uni.$u.toast('相同货位,同一个物料只能有一个') |
| | | return |
| | | let repetition = false |
| | | this.seleMateriaList.forEach(item => { |
| | | if (item.locationId == this.location) { |
| | | if (item.id == material.id) { |
| | | repetition = true |
| | | return |
| | | } |
| | | } |
| | | }) |
| | | if (repetition) { |
| | | uni.$u.toast('相同货位,同一个物料只能有一个') |
| | | return |
| | | } |
| | | // let tempMaterial = this.seleMateriaList.find(item => item.locationId == this.location) |
| | | // debugger |
| | | // if (tempMaterial) { |
| | | // /* |
| | | // tempMaterial.qualityType == material.qualityType |
| | | // && tempMaterial.procedureId == material.procedureId |
| | | // &&tempMaterial.batch == material.batch |
| | | // &&tempMaterial.oldLocationId == material.locationId |
| | | // && tempMaterial.materialId == material.materialId |
| | | // */ |
| | | // if (tempMaterial.id == material.id) { |
| | | // uni.$u.toast('相同货位,同一个物料只能有一个') |
| | | // return |
| | | // } |
| | | // } |
| | | // if (tempMaterial && tempMaterial.id == material.id) { |
| | | // uni.$u.toast('相同货位,同一个物料只能有一个') |
| | | // return |
| | | // } |
| | | let materialNum = 0 |
| | | let num = 0 |
| | | // let selectedM = this.seleMateriaList.find(item => item.id == material.id) |
| | | // let waitMaterial = this.MateriaList.find(item => item.id === material.id) |
| | | this.seleMateriaList.forEach(item => { |
| | | if (item.id === material.id) { |
| | | materialNum += Number(item.outActnum) |
| | |
| | | num = item.outActnum - materialNum |
| | | } |
| | | }) |
| | | |
| | | material.outActnum = num |
| | | this.seleMateriaList.push({ |
| | | ...material, |
| | | oldLocationId: material.locationId, |
| | | locationId: this.location, |
| | | locationName: this.locationName |
| | | }) |