|
@ -68,6 +68,7 @@ |
|
|
</div> |
|
|
</div> |
|
|
</li> |
|
|
</li> |
|
|
<li style="text-align:center;padding:20px 0"><el-button type="primary" :disabled="!(btnChecked.every(item=>item===2))" class="btn-save" @click="handleSave">保存</el-button></li> |
|
|
<li style="text-align:center;padding:20px 0"><el-button type="primary" :disabled="!(btnChecked.every(item=>item===2))" class="btn-save" @click="handleSave">保存</el-button></li> |
|
|
|
|
|
<!-- <li style="text-align:center;padding:20px 0"><el-button type="primary" class="btn-save" @click="handleSave">保存</el-button></li> --> |
|
|
</ul> |
|
|
</ul> |
|
|
<!-- 回转柜 --> |
|
|
<!-- 回转柜 --> |
|
|
<ul v-if="cnName==='回转柜'"> |
|
|
<ul v-if="cnName==='回转柜'"> |
|
@ -118,7 +119,8 @@ |
|
|
</template> |
|
|
</template> |
|
|
|
|
|
|
|
|
<script> |
|
|
<script> |
|
|
import { isOccupy } from '@/api/archivesManage/outInStorage' |
|
|
|
|
|
|
|
|
import { isOccupy, collect } from '@/api/archivesManage/outInStorage' |
|
|
|
|
|
|
|
|
export default { |
|
|
export default { |
|
|
data() { |
|
|
data() { |
|
|
return { |
|
|
return { |
|
@ -143,7 +145,8 @@ export default { |
|
|
directionOptions: [ |
|
|
directionOptions: [ |
|
|
{ value: '1', label: '左边' }, |
|
|
{ value: '1', label: '左边' }, |
|
|
{ value: '2', label: '右边' } |
|
|
{ value: '2', label: '右边' } |
|
|
] |
|
|
|
|
|
|
|
|
], |
|
|
|
|
|
isOccupy: [] // |
|
|
// 回转柜 |
|
|
// 回转柜 |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
@ -157,6 +160,7 @@ export default { |
|
|
console.log(data) |
|
|
console.log(data) |
|
|
// 按钮状态 |
|
|
// 按钮状态 |
|
|
this.btnChecked = this.childArr(1) |
|
|
this.btnChecked = this.childArr(1) |
|
|
|
|
|
this.isOccupy = this.childArr('') |
|
|
// 选择器 |
|
|
// 选择器 |
|
|
if (data.cnName === '密集架') { |
|
|
if (data.cnName === '密集架') { |
|
|
const obj = { colNum: '', sectionNum: '', levelNum: '', direction: '' } |
|
|
const obj = { colNum: '', sectionNum: '', levelNum: '', direction: '' } |
|
@ -188,28 +192,46 @@ export default { |
|
|
} |
|
|
} |
|
|
if (bool === 0) { |
|
|
if (bool === 0) { |
|
|
const params = { |
|
|
const params = { |
|
|
// false |
|
|
|
|
|
// deviceId: '3734A977C269ABEF6E284C', |
|
|
|
|
|
// position: '1-5-6-2-1', |
|
|
|
|
|
deviceId: 'FA0B05E2728EA8129A9F15', |
|
|
deviceId: 'FA0B05E2728EA8129A9F15', |
|
|
position: '1-1-3-4-1', |
|
|
position: '1-1-3-4-1', |
|
|
|
|
|
// deviceId: 'DE1517EF06F7511FFF19C0', |
|
|
|
|
|
// position: '1-1-3-4-1', |
|
|
deviceType: '1' |
|
|
deviceType: '1' |
|
|
} |
|
|
} |
|
|
const res = await isOccupy(params).then(res => { |
|
|
const res = await isOccupy(params).then(res => { |
|
|
console.log(res, '--res') |
|
|
console.log(res, '--res') |
|
|
|
|
|
return res |
|
|
}) |
|
|
}) |
|
|
// 按钮变化 |
|
|
// 按钮变化 |
|
|
if (res) { |
|
|
if (res) { |
|
|
this.btnChecked[index] = 2 |
|
|
this.btnChecked[index] = 2 |
|
|
|
|
|
this.isOccupy[index] = res |
|
|
} else { |
|
|
} else { |
|
|
this.btnChecked[index] = 3 |
|
|
this.btnChecked[index] = 3 |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
console.log(this.btnChecked, this.isOccupy, 'check') |
|
|
this.$forceUpdate() |
|
|
this.$forceUpdate() |
|
|
}, |
|
|
}, |
|
|
// 保存 |
|
|
// 保存 |
|
|
handleSave() { |
|
|
handleSave() { |
|
|
|
|
|
|
|
|
|
|
|
// const caseId = this.childData.map(item => item.id) |
|
|
|
|
|
// console.log(caseId, '---caseId') |
|
|
|
|
|
const params = [] |
|
|
|
|
|
this.isOccupy.forEach((item, i) => { |
|
|
|
|
|
const obj = {} |
|
|
|
|
|
obj.caseId = this.childData[i].id |
|
|
|
|
|
obj.deviceId = item.deviceInfoId |
|
|
|
|
|
obj.position = item.position |
|
|
|
|
|
obj.positionName = item.position_name |
|
|
|
|
|
obj.shelfId = item.id |
|
|
|
|
|
params.push(obj) |
|
|
|
|
|
}) |
|
|
|
|
|
console.log(params, '==========') |
|
|
|
|
|
collect(params).then(data => { |
|
|
|
|
|
console.log(data, 'data') |
|
|
|
|
|
}) |
|
|
|
|
|
this.dialogVisible = false |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|