Browse Source

库房密集架操作

master
xuhuajiao 2 years ago
parent
commit
4366bdf59b
  1. 38
      src/api/storeManage/deviceManage/device.js
  2. 93
      src/views/storeManage/warehouse3D/deseCabinet/index.vue

38
src/api/storeManage/deviceManage/device.js

@ -108,4 +108,40 @@ export function unbind(data) {
})
}
export default { add, edit, del, getSupplier, getDeviceType, getDeviceById, getDesecabinetById, getRotarycabinetById, getDeviceList, FetchInBorrowByQuCol, unbind }
// 打开架体具体某一列
export function FetchCallExternalOpenCol(params) {
return request({
url: 'api/callExternal/openCol',
method: 'get',
params
})
}
// 密集架合架
export function FetchCallExternalResetCol(params) {
return request({
url: 'api/callExternal/reset',
method: 'get',
params
})
}
// 密集架通风
export function FetchCallExternalVent(params) {
return request({
url: 'api/callExternal/vent',
method: 'get',
params
})
}
// 停止移动
export function FetchCallExternalStopMove(params) {
return request({
url: 'api/callExternal/stopMove',
method: 'get',
params
})
}
export default { add, edit, del, getSupplier, getDeviceType, getDeviceById, getDesecabinetById, getRotarycabinetById, getDeviceList, FetchInBorrowByQuCol, unbind, FetchCallExternalOpenCol, FetchCallExternalResetCol, FetchCallExternalVent, FetchCallExternalStopMove }

93
src/views/storeManage/warehouse3D/deseCabinet/index.vue

@ -91,17 +91,17 @@
</div>
</div>
<div class="cabinet-bottom">
<el-button type="primary" :disabled="isFixed">开架</el-button>
<el-button type="primary">合架</el-button>
<el-button type="primary">通风</el-button>
<el-button type="primary">停止</el-button>
<el-button type="primary" :disabled="isFixed" @click="openCol">开架</el-button>
<el-button type="primary" @click="resetCol">合架</el-button>
<el-button type="primary" @click="ventHandle">通风</el-button>
<el-button type="primary" @click="stopMove">停止</el-button>
</div>
</div>
</template>
<script>
import { FetchGetArchivesNum } from '@/api/archivesManage/statistics'
import { getDeviceList, FetchInBorrowByQuCol } from '@/api/storeManage/deviceManage/device'
import CallExternal from '@/api/storeManage/deviceManage/device'
export default {
name: 'DeseCabinet',
data() {
@ -178,7 +178,7 @@ export default {
sort: 'sequence,asc',
storeroomId: this.storeroomId
}
getDeviceList(params).then(data => {
CallExternal.getDeviceList(params).then(data => {
data.content.map(item => {
if (item.deviceTypeId.name === '密集架') { //
this.deviceData = item
@ -212,7 +212,7 @@ export default {
quNo: this.deviceData.areaNo,
colNo: this.cabinetNum
}
FetchInBorrowByQuCol(params).then(data => {
CallExternal.FetchInBorrowByQuCol(params).then(data => {
data.forEach(item => {
if (item.direction === '左') {
this.left.push(item)
@ -276,6 +276,85 @@ export default {
}
})
},
//
openCol() {
const params = {
deviceId: this.deviceData.id,
quNo: this.deviceData.areaNo,
colNo: this.cabinetNum,
leNo: '',
divNo: '',
zyNo: ''
}
CallExternal.FetchCallExternalOpenCol(params).then(res => {
console.log(res)
res = JSON.parse(res)
if (res.code && res.code === '0') {
this.$message.success('开架执行成功')
} else {
this.$message.error('开架执行失败')
}
}).catch((error) => {
console.log(error)
this.$message.error('连接失败')
})
},
//
resetCol() {
const params = {
deviceId: this.deviceData.id,
quNo: this.deviceData.areaNo
}
CallExternal.FetchCallExternalResetCol(params).then(res => {
res = JSON.parse(res)
if (res.code && res.code === '0') {
this.$message.success('合架执行成功')
} else {
this.$message.error('合架执行失败')
}
}).catch((error) => {
console.log(error)
this.$message.error('连接失败')
})
},
//
ventHandle() {
const params = {
deviceId: this.deviceData.id,
quNo: this.deviceData.areaNo
}
CallExternal.FetchCallExternalVent(params).then(res => {
console.log(res)
res = JSON.parse(res)
if (res.code && res.code === '0') {
this.$message.success('密集架通风执行成功')
} else {
this.$message.error('密集架通风执行失败')
}
}).catch((error) => {
console.log(error)
this.$message.error('连接失败')
})
},
//
stopMove() {
const params = {
deviceId: this.deviceData.id,
quNo: this.deviceData.areaNo
}
CallExternal.FetchCallExternalStopMove(params).then(res => {
console.log(res)
res = JSON.parse(res)
if (res.code && res.code === '0') {
this.$message.success('密集架停止移动执行成功')
} else {
this.$message.error('密集架停止移动执行失败')
}
}).catch((error) => {
console.log(error)
this.$message.error('连接失败')
})
},
// 3D
backWarehouse() {
this.$router.push('/storeManage/warehouse3D')

Loading…
Cancel
Save