Commit 4bc8013e by huangqy

111

parent afb273a6
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
<script> <script>
window._CONFIG = {}; window._CONFIG = {};
window._CONFIG['serviceURL'] = 'http://192.168.3.1:5000'; window._CONFIG['serviceURL'] = 'http://192.168.3.1:5000';
window._CONFIG['userURL'] = 'http://192.168.3.101:10004'; window._CONFIG['userURL'] = 'http://192.168.2.112:10004';
</script> </script>
</head> </head>
<body> <body>
......
import request from '@/utils/request' import request from '@/utils/request'
import md5 from 'js-md5'
export function get() { export function get() {
return request({ return request({
......
import request from '@/utils/request' import request from '@/utils/request'
import md5 from 'js-md5'
export function add(data) { export function add(data) {
return request({ return request({
......
import request from '@/utils/request' import request from '@/utils/request'
import { transform } from '@/utils/index'
export function getPageBag(data) { export function getPageBag(data) {
return request({ return request({
url: window._CONFIG['serviceURL'] + '/api/Mission/GetPageBag', url: window._CONFIG['serviceURL'] + '/api/Mission/GetPageBag',
method: 'post', method: 'post',
data data: transform(data)
}) })
} }
...@@ -12,7 +13,7 @@ export function addOrUpdateBag(data) { ...@@ -12,7 +13,7 @@ export function addOrUpdateBag(data) {
return request({ return request({
url: window._CONFIG['serviceURL'] + '/api/Mission/AddOrUpdateBag', url: window._CONFIG['serviceURL'] + '/api/Mission/AddOrUpdateBag',
method: 'post', method: 'post',
data data: transform(data)
}) })
} }
...@@ -20,7 +21,7 @@ export function deleteBag(data) { ...@@ -20,7 +21,7 @@ export function deleteBag(data) {
return request({ return request({
url: window._CONFIG['serviceURL'] + '/api/Mission/DeleteBag', url: window._CONFIG['serviceURL'] + '/api/Mission/DeleteBag',
method: 'post', method: 'post',
data data: transform(data)
}) })
} }
...@@ -28,7 +29,7 @@ export function bindBag(data) { ...@@ -28,7 +29,7 @@ export function bindBag(data) {
return request({ return request({
url: window._CONFIG['serviceURL'] + '/api/Mission/BindBag', url: window._CONFIG['serviceURL'] + '/api/Mission/BindBag',
method: 'post', method: 'post',
data data: transform(data)
}) })
} }
...@@ -36,7 +37,7 @@ export function releaseBag(data) { ...@@ -36,7 +37,7 @@ export function releaseBag(data) {
return request({ return request({
url: window._CONFIG['serviceURL'] + '/api/Mission/ReleaseBag', url: window._CONFIG['serviceURL'] + '/api/Mission/ReleaseBag',
method: 'post', method: 'post',
data data: transform(data)
}) })
} }
...@@ -44,7 +45,7 @@ export function reBindBag(data) { ...@@ -44,7 +45,7 @@ export function reBindBag(data) {
return request({ return request({
url: window._CONFIG['serviceURL'] + '/api/Mission/ReBindBag', url: window._CONFIG['serviceURL'] + '/api/Mission/ReBindBag',
method: 'post', method: 'post',
data data: transform(data)
}) })
} }
...@@ -53,7 +54,7 @@ export function addOrUpdateModel(data) { ...@@ -53,7 +54,7 @@ export function addOrUpdateModel(data) {
return request({ return request({
url: window._CONFIG['serviceURL'] + '/api/Mission/AddOrUpdateModel', url: window._CONFIG['serviceURL'] + '/api/Mission/AddOrUpdateModel',
method: 'post', method: 'post',
data data: transform(data)
}) })
} }
...@@ -61,6 +62,47 @@ export function deleteModel(data) { ...@@ -61,6 +62,47 @@ export function deleteModel(data) {
return request({ return request({
url: window._CONFIG['serviceURL'] + '/api/Mission/DeleteModel', url: window._CONFIG['serviceURL'] + '/api/Mission/DeleteModel',
method: 'post', method: 'post',
data data: transform(data)
}) })
} }
export function getPageModel(data) {
return request({
url: window._CONFIG['serviceURL'] + '/api/Mission/GetPageModel',
method: 'post',
data: transform(data)
})
}
export function addOrUpdateMission(data) {
return request({
url: window._CONFIG['serviceURL'] + '/api/Mission/AddOrUpdateMission',
method: 'post',
data: transform(data)
})
}
export function changeWorkState(data) {
return request({
url: window._CONFIG['serviceURL'] + '/api/Mission/changeWorkState',
method: 'post',
data: transform(data)
})
}
export function getMissionInOutInfo(data) {
return request({
url: window._CONFIG['serviceURL'] + '/api/Mission/GetMissionInOutInfo',
method: 'post',
data: transform(data)
})
}
export function getMissionOrderInfo(data) {
return request({
url: window._CONFIG['serviceURL'] + '/api/Mission/getMissionOrderInfo',
method: 'post',
data: transform(data)
})
}
\ No newline at end of file
import request from '@/utils/request' import request from '@/utils/request'
import md5 from 'js-md5' import { transform } from '@/utils/index'
// 充电台 // 充电台
export function getPageChargeList(data) { export function getPageChargeList(data) {
return request({ return request({
url: window._CONFIG['serviceURL'] + '/api/BaseCharge/GetPageChargeList', url: window._CONFIG['serviceURL'] + '/api/BaseCharge/GetPageChargeList',
method: 'post', method: 'post',
data: { data: transform(data)
appKey: 'odykzzWm1GASj15K1AGxwQ==',
orgId: '',
version: '1.0',
timestamp: parseInt(new Date().getTime()/1000),
body: escape(JSON.stringify(data)),
sign: md5('a1dca4cf35a6d460128f5e4ad401b1c1'+parseInt(new Date().getTime()/1000)+'1.0'+escape(JSON.stringify(data)))
}
}) })
} }
import request from '@/utils/request' import request from '@/utils/request'
import md5 from 'js-md5' import { transform } from '@/utils/index'
// 获取装备列表 // 获取装备列表
export function getListEquipmentDetail(data) { export function getListEquipmentDetail(data) {
return request({ return request({
url: window._CONFIG['serviceURL'] + '/api/EquipmentDetail/GetListEquipmentDetail', url: window._CONFIG['serviceURL'] + '/api/EquipmentDetail/GetListEquipmentDetail',
method: 'post', method: 'post',
data data: transform(data)
}) })
} }
...@@ -15,14 +15,7 @@ export function getPageEquipmentDetail(data) { ...@@ -15,14 +15,7 @@ export function getPageEquipmentDetail(data) {
return request({ return request({
url: window._CONFIG['serviceURL'] +'/api/EquipmentDetail/GetPageEquipmentDetail', url: window._CONFIG['serviceURL'] +'/api/EquipmentDetail/GetPageEquipmentDetail',
method: 'post', method: 'post',
data: { data: transform(data)
appKey: 'odykzzWm1GASj15K1AGxwQ==',
orgId: '',
version: '1.0',
timestamp: parseInt(new Date().getTime()/1000),
body: escape(JSON.stringify(data)),
sign: md5('a1dca4cf35a6d460128f5e4ad401b1c1'+parseInt(new Date().getTime()/1000)+'1.0'+escape(JSON.stringify(data)))
}
}) })
} }
...@@ -31,14 +24,7 @@ export function addOrUpdateEquipmentDetail(data) { ...@@ -31,14 +24,7 @@ export function addOrUpdateEquipmentDetail(data) {
return request({ return request({
url: window._CONFIG['serviceURL'] + '/api/EquipmentDetail/AddOrUpdateEquipmentDetail', url: window._CONFIG['serviceURL'] + '/api/EquipmentDetail/AddOrUpdateEquipmentDetail',
method: 'post', method: 'post',
data: { data: transform(data)
appKey: 'odykzzWm1GASj15K1AGxwQ==',
orgId: '',
version: '1.0',
timestamp: parseInt(new Date().getTime()/1000),
body: escape(JSON.stringify(data)),
sign: md5('a1dca4cf35a6d460128f5e4ad401b1c1'+parseInt(new Date().getTime()/1000)+'1.0'+escape(JSON.stringify(data)))
}
}) })
} }
...@@ -47,14 +33,7 @@ export function deleteEquipmentDetail(data) { ...@@ -47,14 +33,7 @@ export function deleteEquipmentDetail(data) {
return request({ return request({
url: window._CONFIG['serviceURL'] + '/api/EquipmentDetail/DeleteEquipmentDetail', url: window._CONFIG['serviceURL'] + '/api/EquipmentDetail/DeleteEquipmentDetail',
method: 'post', method: 'post',
data: { data: transform(data)
appKey: 'odykzzWm1GASj15K1AGxwQ==',
orgId: '',
version: '1.0',
timestamp: parseInt(new Date().getTime()/1000),
body: escape(JSON.stringify(data)),
sign: md5('a1dca4cf35a6d460128f5e4ad401b1c1'+parseInt(new Date().getTime()/1000)+'1.0'+escape(JSON.stringify(data)))
}
}) })
} }
...@@ -63,14 +42,7 @@ export function addSizeDetailSupplier(data) { ...@@ -63,14 +42,7 @@ export function addSizeDetailSupplier(data) {
return request({ return request({
url: window._CONFIG['serviceURL'] + '/api/EquipmentDetail/AddSizeDetailSupplier', url: window._CONFIG['serviceURL'] + '/api/EquipmentDetail/AddSizeDetailSupplier',
method: 'post', method: 'post',
data: { data: transform(data)
appKey: 'odykzzWm1GASj15K1AGxwQ==',
orgId: '',
version: '1.0',
timestamp: parseInt(new Date().getTime()/1000),
body: escape(JSON.stringify(data)),
sign: md5('a1dca4cf35a6d460128f5e4ad401b1c1'+parseInt(new Date().getTime()/1000)+'1.0'+escape(JSON.stringify(data)))
}
}) })
} }
...@@ -78,13 +50,6 @@ export function approverSizeDetailSupplier(data) { ...@@ -78,13 +50,6 @@ export function approverSizeDetailSupplier(data) {
return request({ return request({
url: window._CONFIG['serviceURL'] + '/api/EquipmentDetail/ApproverSizeDetailSupplier', url: window._CONFIG['serviceURL'] + '/api/EquipmentDetail/ApproverSizeDetailSupplier',
method: 'post', method: 'post',
data: { data: transform(data)
appKey: 'odykzzWm1GASj15K1AGxwQ==',
orgId: '',
version: '1.0',
timestamp: parseInt(new Date().getTime()/1000),
body: escape(JSON.stringify(data)),
sign: md5('a1dca4cf35a6d460128f5e4ad401b1c1'+parseInt(new Date().getTime()/1000)+'1.0'+escape(JSON.stringify(data)))
}
}) })
} }
import request from '@/utils/request' import request from '@/utils/request'
import md5 from 'js-md5' import { transform } from '@/utils/index'
export function getListEquipmentSize(data) { export function getListEquipmentSize(data) {
return request({ return request({
url: window._CONFIG['serviceURL'] + '/api/EquipmentSize/GetListEquipmentSize', url: window._CONFIG['serviceURL'] + '/api/EquipmentSize/GetListEquipmentSize',
method: 'post', method: 'post',
data: { data: transform(data)
appKey: 'odykzzWm1GASj15K1AGxwQ==',
orgId: '',
version: '1.0',
timestamp: parseInt(new Date().getTime()/1000),
body: escape(JSON.stringify(data)),
sign: md5('a1dca4cf35a6d460128f5e4ad401b1c1'+parseInt(new Date().getTime()/1000)+'1.0'+escape(JSON.stringify(data)))
}
}) })
} }
...@@ -21,14 +14,7 @@ export function getPageEquipmentSize(data) { ...@@ -21,14 +14,7 @@ export function getPageEquipmentSize(data) {
return request({ return request({
url: window._CONFIG['serviceURL'] + '/api/EquipmentSize/GetPageEquipmentSize', url: window._CONFIG['serviceURL'] + '/api/EquipmentSize/GetPageEquipmentSize',
method: 'post', method: 'post',
data: { data: transform(data)
appKey: 'odykzzWm1GASj15K1AGxwQ==',
orgId: '',
version: '1.0',
timestamp: parseInt(new Date().getTime()/1000),
body: escape(JSON.stringify(data)),
sign: md5('a1dca4cf35a6d460128f5e4ad401b1c1'+parseInt(new Date().getTime()/1000)+'1.0'+escape(JSON.stringify(data)))
}
}) })
} }
...@@ -37,14 +23,7 @@ export function addOrUpdateEquipmentSize(data) { ...@@ -37,14 +23,7 @@ export function addOrUpdateEquipmentSize(data) {
return request({ return request({
url: window._CONFIG['serviceURL'] + '/api/EquipmentSize/AddOrUpdateEquipmentSize', url: window._CONFIG['serviceURL'] + '/api/EquipmentSize/AddOrUpdateEquipmentSize',
method: 'post', method: 'post',
data: { data: transform(data)
appKey: 'odykzzWm1GASj15K1AGxwQ==',
orgId: '',
version: '1.0',
timestamp: parseInt(new Date().getTime()/1000),
body: escape(JSON.stringify(data)),
sign: md5('a1dca4cf35a6d460128f5e4ad401b1c1'+parseInt(new Date().getTime()/1000)+'1.0'+escape(JSON.stringify(data)))
}
}) })
} }
...@@ -52,13 +31,6 @@ export function deleteEquipmentSize(data) { ...@@ -52,13 +31,6 @@ export function deleteEquipmentSize(data) {
return request({ return request({
url: window._CONFIG['serviceURL'] + '/api/EquipmentSize/DeleteEquipmentSize', url: window._CONFIG['serviceURL'] + '/api/EquipmentSize/DeleteEquipmentSize',
method: 'post', method: 'post',
data: { data: transform(data)
appKey: 'odykzzWm1GASj15K1AGxwQ==',
orgId: '',
version: '1.0',
timestamp: parseInt(new Date().getTime()/1000),
body: escape(JSON.stringify(data)),
sign: md5('a1dca4cf35a6d460128f5e4ad401b1c1'+parseInt(new Date().getTime()/1000)+'1.0'+escape(JSON.stringify(data)))
}
}) })
} }
...@@ -55,7 +55,14 @@ export function getAllFixs(data) { ...@@ -55,7 +55,14 @@ export function getAllFixs(data) {
return request({ return request({
url: window._CONFIG['serviceURL'] + '/api/FixReceiveApply/GetWzByEpc', url: window._CONFIG['serviceURL'] + '/api/FixReceiveApply/GetWzByEpc',
method: 'post', method: 'post',
data data: {
appKey: 'odykzzWm1GASj15K1AGxwQ==',
orgId: '',
version: '1.0',
timestamp: parseInt(new Date().getTime()/1000),
body: escape(JSON.stringify(data)),
sign: md5('a1dca4cf35a6d460128f5e4ad401b1c1'+parseInt(new Date().getTime()/1000)+'1.0'+escape(JSON.stringify(data)))
}
}) })
} }
......
import request from '@/utils/request' import request from '@/utils/request'
import md5 from 'js-md5' import md5 from 'js-md5'
import { transform } from '@/utils/index'
//获取组织机构及下级的所有库存 //获取组织机构及下级的所有库存
export function getOrgListEquipmentDetail(data) { export function getOrgListEquipmentDetail(data) {
...@@ -179,7 +180,15 @@ export function getOrgListEquipmentDetail(data) { ...@@ -179,7 +180,15 @@ export function getOrgListEquipmentDetail(data) {
return request({ return request({
url: window._CONFIG['serviceURL'] + '/api/Inventory/GetInfoByID', url: window._CONFIG['serviceURL'] + '/api/Inventory/GetInfoByID',
method: 'post', method: 'post',
data data: transform(data)
})
}
export function getBagInfoByID(data) {
return request({
url: window._CONFIG['serviceURL'] + '/api/Inventory/GetBagInfoByID',
method: 'post',
data: transform(data)
}) })
} }
......
...@@ -85,7 +85,14 @@ export function getListOrgWarehouse(data) { ...@@ -85,7 +85,14 @@ export function getListOrgWarehouse(data) {
return request({ return request({
url: window._CONFIG['serviceURL'] + '/api/Warehouse/GetListOrgWarehouse', url: window._CONFIG['serviceURL'] + '/api/Warehouse/GetListOrgWarehouse',
method: 'post', method: 'post',
data data: {
appKey: 'odykzzWm1GASj15K1AGxwQ==',
orgId: '',
version: '1.0',
timestamp: parseInt(new Date().getTime()/1000),
body: escape(JSON.stringify(data)),
sign: md5('a1dca4cf35a6d460128f5e4ad401b1c1'+parseInt(new Date().getTime()/1000)+'1.0'+escape(JSON.stringify(data)))
}
}) })
} }
......
...@@ -57,6 +57,22 @@ export function controlDev(data) { ...@@ -57,6 +57,22 @@ export function controlDev(data) {
  })   })
} }
export function updateHumid(data) {
  return request({
    url: window._CONFIG['serviceURL'] + '/api/WarehouseDev/UpdateHumid',
    method: 'post',
    data: {
appKey: 'odykzzWm1GASj15K1AGxwQ==',
orgId: '',
version: '1.0',
timestamp: parseInt(new Date().getTime()/1000),
body: escape(JSON.stringify(data)),
sign: md5('a1dca4cf35a6d460128f5e4ad401b1c1'+parseInt(new Date().getTime()/1000)+'1.0'+escape(JSON.stringify(data)))
}
  })
}
// 获取物资 // 获取物资
export function getWarehouseInfo(data) { export function getWarehouseInfo(data) {
  return request({   return request({
......
...@@ -33,15 +33,15 @@ export default { ...@@ -33,15 +33,15 @@ export default {
} }
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
this.loading = true this.loading = true
// var jydata = { var jydata = {
// appKey: 'odykzzWm1GASj15K1AGxwQ==', appKey: 'odykzzWm1GASj15K1AGxwQ==',
// orgId: '', orgId: '',
// version: '1.0', version: '1.0',
// timestamp: parseInt(new Date().getTime()/1000), timestamp: parseInt(new Date().getTime()/1000),
// body: escape(JSON.stringify(this.params)), body: escape(JSON.stringify(this.params)),
// sign: md5('a1dca4cf35a6d460128f5e4ad401b1c1'+parseInt(new Date().getTime()/1000)+'1.0'+escape(JSON.stringify(this.params))) sign: md5('a1dca4cf35a6d460128f5e4ad401b1c1'+parseInt(new Date().getTime()/1000)+'1.0'+escape(JSON.stringify(this.params)))
// } }
initPdata(this.url, this.params).then(res => { initPdata(this.url, jydata).then(res => {
if (res.code === '10000') { if (res.code === '10000') {
this.total = res.data.totalElements this.total = res.data.totalElements
this.data = res.data.content this.data = res.data.content
......
/** /**
* Created by jiachenpan on 16/11/18. * Created by jiachenpan on 16/11/18.
*/ */
import md5 from 'js-md5'
export function parseTime(time) { export function parseTime(time) {
if (time) { if (time) {
...@@ -164,6 +165,19 @@ export function removeClass(ele, cls) { ...@@ -164,6 +165,19 @@ export function removeClass(ele, cls) {
} }
} }
export function transform(data) {
let k = {
appKey: 'odykzzWm1GASj15K1AGxwQ==',
orgId: '',
version: '1.0',
timestamp: parseInt(new Date().getTime()/1000),
body: escape(JSON.stringify(data)),
sign: md5('a1dca4cf35a6d460128f5e4ad401b1c1'+parseInt(new Date().getTime()/1000)+'1.0'+escape(JSON.stringify(data)))
}
return k;
}
export function downloadFile(obj, name, suffix) { export function downloadFile(obj, name, suffix) {
const url = window.URL.createObjectURL(new Blob([obj])) const url = window.URL.createObjectURL(new Blob([obj]))
const link = document.createElement('a') const link = document.createElement('a')
......
...@@ -107,6 +107,7 @@ export default { ...@@ -107,6 +107,7 @@ export default {
this.epcList = [] this.epcList = []
if (value) { if (value) {
let obj = this.bagList.find(i => i.id === this.form.bagId) let obj = this.bagList.find(i => i.id === this.form.bagId)
console.log(obj)
this.bagReadList = obj.bagList this.bagReadList = obj.bagList
} }
}, },
...@@ -184,6 +185,8 @@ export default { ...@@ -184,6 +185,8 @@ export default {
}, 1000) }, 1000)
} }
}) })
if (!this.form.warehouseId) { return this.$message.warning('请选择仓库') }
if (this.form.equipmentList.length === 0) { return this.$message.warning('未绑定装备') }
if(flag) return; if(flag) return;
bindBag(this.form).then(res => { bindBag(this.form).then(res => {
if (res.code === '10000') { if (res.code === '10000') {
......
...@@ -65,6 +65,8 @@ ...@@ -65,6 +65,8 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
<el-divider></el-divider>
<el-table :data="bottomData" stripe border style="width: 100%;margin-top: 20px;"> <el-table :data="bottomData" stripe border style="width: 100%;margin-top: 20px;">
<el-table-column type="index" label="序号" align="center" width="50"/> <el-table-column type="index" label="序号" align="center" width="50"/>
<el-table-column prop="name" label="装备名称" align="center"/> <el-table-column prop="name" label="装备名称" align="center"/>
...@@ -93,6 +95,7 @@ import { initPdata } from '@/api/data' ...@@ -93,6 +95,7 @@ import { initPdata } from '@/api/data'
import { getWzByEpc } from '@/api/fixReceiveApply' import { getWzByEpc } from '@/api/fixReceiveApply'
import eForm from './form' import eForm from './form'
import infoForm from '../../warehouse/maintenance/form' import infoForm from '../../warehouse/maintenance/form'
import md5 from 'js-md5'
export default { export default {
name: 'Person', name: 'Person',
components: { eForm, infoForm }, components: { eForm, infoForm },
...@@ -133,7 +136,15 @@ export default { ...@@ -133,7 +136,15 @@ export default {
} }
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
this.loading = true this.loading = true
initPdata(this.url, this.params).then(res => { var jydata = {
appKey: 'odykzzWm1GASj15K1AGxwQ==',
orgId: '',
version: '1.0',
timestamp: parseInt(new Date().getTime()/1000),
body: escape(JSON.stringify(this.params)),
sign: md5('a1dca4cf35a6d460128f5e4ad401b1c1'+parseInt(new Date().getTime()/1000)+'1.0'+escape(JSON.stringify(this.params)))
}
initPdata(this.url, jydata).then(res => {
if (res.code === '10000') { if (res.code === '10000') {
this.total = res.data.totalElements this.total = res.data.totalElements
this.data = res.data.content this.data = res.data.content
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
</template> </template>
<script> <script>
import { controlDev } from '@/api/warehouseDev' import { controlDev, updateHumid } from '@/api/warehouseDev'
export default { export default {
data() { data() {
return { return {
...@@ -45,6 +45,7 @@ export default { ...@@ -45,6 +45,7 @@ export default {
this.resetForm() this.resetForm()
}, },
doSubmit(){ doSubmit(){
updateHumid(this.form)
controlDev(this.form).then(res => { controlDev(this.form).then(res => {
if (res.code == '10000') { if (res.code == '10000') {
this.dialog = false this.dialog = false
......
...@@ -11,29 +11,51 @@ ...@@ -11,29 +11,51 @@
<span>业务单激活</span> <span>业务单激活</span>
<el-switch v-model="isLocked" active-text="解库" inactive-text="锁库" active-color="#409EFF" inactive-color="#F56C6C" style="float: right" @change="changeLocked"></el-switch> <el-switch v-model="isLocked" active-text="解库" inactive-text="锁库" active-color="#409EFF" inactive-color="#F56C6C" style="float: right" @change="changeLocked"></el-switch>
</div> </div>
<el-table :data="orderData" style="width:100%" stripe border>
<el-table-column type="index" align="center" width="50" label="序号"/> <div v-if="taskData.length > 0">
<el-table-column prop='orderType' align="center" label="业务类型" width="150" /> <el-table :data="taskData" style="width:100%" stripe border>
<el-table-column prop='equNames' align="center" label="装备名称" :show-overflow-tooltip="true" /> <el-table-column type="index" align="center" width="50" label="序号"/>
<el-table-column prop='createTime' align="center" label="创建时间" /> <el-table-column prop='orderType' align="center" label="业务类型" width="150" />
<el-table-column prop='isWork' align="center" label="是否激活" width="100"> <el-table-column prop='equNames' align="center" label="装备名称" :show-overflow-tooltip="true" />
<template slot-scope="scope"> <el-table-column prop='createTime' align="center" label="创建时间" />
<el-switch <el-table-column label="操作" width="150" align="center" fixed="right">
v-model="scope.row.isWork" <template slot-scope="scope">
active-color="#409EFF" <el-button size="mini" type="primary" @click="showTaskDetail(scope.row)">查看</el-button>
inactive-color="#F56C6C" <el-button size="mini" type="warning" @click="stopTask(scope.row)">终止</el-button>
@change="changeWorked(scope.row, scope.row.isWork)"/> </template>
</template> </el-table-column>
</el-table-column> </el-table>
<el-table-column label="操作" width="150" align="center" fixed="right">
<template slot-scope="scope"> <el-pagination :total="total1" :current-page="page1 + 1" style="margin-top: 8px;" layout="total, prev, pager, next"
<el-button size="mini" type="primary" @click="showDetail(scope.row)">查看</el-button> :page-size="3" @current-change="postPageChange1"/>
<el-button size="mini" type="warning" @click="stop(scope.row)" v-if="scope.row.orderType==='库存调拨' || scope.row.orderType==='借用'">终止</el-button> </div>
</template>
</el-table-column> <div v-else>
</el-table> <el-table :data="orderData" style="width:100%" stripe border>
<el-pagination :total="total" :current-page="page + 1" style="margin-top: 8px;" layout="total, prev, pager, next" <el-table-column type="index" align="center" width="50" label="序号"/>
:page-size="3" @current-change="postPageChange"/> <el-table-column prop='orderType' align="center" label="业务类型" width="150" />
<el-table-column prop='equNames' align="center" label="装备名称" :show-overflow-tooltip="true" />
<el-table-column prop='createTime' align="center" label="创建时间" />
<el-table-column prop='isWork' align="center" label="是否激活" width="100">
<template slot-scope="scope">
<el-switch
v-model="scope.row.isWork"
active-color="#409EFF"
inactive-color="#F56C6C"
@change="changeWorked(scope.row, scope.row.isWork)"/>
</template>
</el-table-column>
<el-table-column label="操作" width="150" align="center" fixed="right">
<template slot-scope="scope">
<el-button size="mini" type="primary" @click="showDetail(scope.row)">查看</el-button>
<el-button size="mini" type="warning" @click="stop(scope.row)" v-if="scope.row.orderType==='库存调拨' || scope.row.orderType==='借用'">终止</el-button>
</template>
</el-table-column>
</el-table>
<el-pagination :total="total" :current-page="page + 1" style="margin-top: 8px;" layout="total, prev, pager, next"
:page-size="3" @current-change="postPageChange"/>
</div>
</el-card > </el-card >
<el-card class="box-card" style="margin-top:10px;"> <el-card class="box-card" style="margin-top:10px;">
...@@ -123,7 +145,11 @@ ...@@ -123,7 +145,11 @@
<td class="textContent">{{ warehouseWd }}℃</td> <td class="textContent">{{ warehouseWd }}℃</td>
</tr> </tr>
<tr style="border-bottom:1px solid #e8e8e8;"> <tr style="border-bottom:1px solid #e8e8e8;">
<th class="textHeader">湿度</th> <th class="textHeader">设置湿度</th>
<td class="textContent">{{ setSd }}%</td>
</tr>
<tr style="border-bottom:1px solid #e8e8e8;">
<th class="textHeader">当前湿度</th>
<td class="textContent">{{ warehouseSd }}%</td> <td class="textContent">{{ warehouseSd }}%</td>
</tr> </tr>
<tr style="border-bottom:1px solid #e8e8e8;"> <tr style="border-bottom:1px solid #e8e8e8;">
...@@ -158,6 +184,8 @@ ...@@ -158,6 +184,8 @@
<transfer-detail ref="库存调拨" /> <transfer-detail ref="库存调拨" />
<receive-detail ref="领用" /> <receive-detail ref="领用" />
<return-other-detail ref="跨库归还" /> <return-other-detail ref="跨库归还" />
<task-detail ref="任务" />
</div> </div>
</template> </template>
...@@ -169,6 +197,7 @@ import DataSet from '@antv/data-set' ...@@ -169,6 +197,7 @@ import DataSet from '@antv/data-set'
import { getListDev } from '@/api/warehouseDev' import { getListDev } from '@/api/warehouseDev'
import { getListOrgWarehouse, getGroupByCount } from '@/api/warehouse' import { getListOrgWarehouse, getGroupByCount } from '@/api/warehouse'
import { getAllInOutTop10History, getOrderInfo, changeOrderIsWork, setWarehouseState, closeOrder } from '@/api/inventory' import { getAllInOutTop10History, getOrderInfo, changeOrderIsWork, setWarehouseState, closeOrder } from '@/api/inventory'
import { getMissionOrderInfo, changeWorkState } from '@/api/bag'
import { getWarehouseInfo } from '@/api/warehouseDev' import { getWarehouseInfo } from '@/api/warehouseDev'
import eForm from './form' import eForm from './form'
import hForm from './hForm' import hForm from './hForm'
...@@ -178,10 +207,11 @@ import BorrowOtherDetail from '@/views/warehouse/borrowOther/list/form' ...@@ -178,10 +207,11 @@ import BorrowOtherDetail from '@/views/warehouse/borrowOther/list/form'
import TransferDetail from '@/views/warehouse/transfer/list/form' import TransferDetail from '@/views/warehouse/transfer/list/form'
import ReceiveDetail from '@/views/warehouse/receive/apply/detailForm' import ReceiveDetail from '@/views/warehouse/receive/apply/detailForm'
import ReturnOtherDetail from '@/views/warehouse/returnOther/list/form' import ReturnOtherDetail from '@/views/warehouse/returnOther/list/form'
import taskDetail from '@/views/warehouse/task/taskInfo'
import md5 from 'js-md5' import md5 from 'js-md5'
export default { export default {
name: 'HouseBaseInfo', name: 'HouseBaseInfo',
components: { eForm, hForm, BorrowDetail, BorrowOtherDetail, TransferDetail, ReceiveDetail, ReturnOtherDetail }, components: { eForm, hForm, BorrowDetail, BorrowOtherDetail, TransferDetail, ReceiveDetail, ReturnOtherDetail, taskDetail },
mixins: [initData], mixins: [initData],
data() { data() {
return { return {
...@@ -238,10 +268,13 @@ export default { ...@@ -238,10 +268,13 @@ export default {
}], }],
warehouseSd: 0, warehouseSd: 0,
warehouseWd: 0, warehouseWd: 0,
setSd: 0,
devIp: '', devIp: '',
nowtime: new Date(), nowtime: new Date(),
orderData: [], orderData: [],
taskData: [],
page: 0, size: 3, total: 0, page: 0, size: 3, total: 0,
page1: 0, size1: 3, total1: 0,
humidity: 20, humidity: 20,
isShow: false, isShow: false,
src: 'http://127.0.0.1:8080/ckzp.html', src: 'http://127.0.0.1:8080/ckzp.html',
...@@ -252,7 +285,8 @@ export default { ...@@ -252,7 +285,8 @@ export default {
"跨库借用": '/api/Transfer/GetByID', "跨库借用": '/api/Transfer/GetByID',
"库存调拨": '/api/Transfer/GetByID', "库存调拨": '/api/Transfer/GetByID',
"领用": '/api/Borrow/GetByID', "领用": '/api/Borrow/GetByID',
"跨库归还": '/api/Transfer/GetByID' "跨库归还": '/api/Transfer/GetByID',
"任务": '/api/Mission/GetMissionById'
} }
} }
}, },
...@@ -375,6 +409,15 @@ export default { ...@@ -375,6 +409,15 @@ export default {
}) })
}, },
initOrderInfo() { initOrderInfo() {
getMissionOrderInfo({page: this.page1, size: this.size1, warehouseId: this.warehouseId}).then(res => {
if (res.code == '10000'){
this.taskData = res.data.content
this.total1 = res.data.totalElements
} else {
this.$message.error(res.msg)
}
})
getOrderInfo({page: this.page, size: this.size, warehouseId: this.warehouseId}).then(res => { getOrderInfo({page: this.page, size: this.size, warehouseId: this.warehouseId}).then(res => {
if (res.code == '10000'){ if (res.code == '10000'){
this.orderData = res.data.content this.orderData = res.data.content
...@@ -396,8 +439,8 @@ export default { ...@@ -396,8 +439,8 @@ export default {
}, },
itemTplLegend: function itemTpl(value, color, checked, index) { itemTplLegend: function itemTpl(value, color, checked, index) {
const obj = this.chartData[index]; const obj = this.chartData[index];
var percent = '0%'; var percent = '0%';
var objCount = 0; var objCount = 0;
if(obj){ if(obj){
percent=(obj.percent * 100).toFixed(2) +'%'; percent=(obj.percent * 100).toFixed(2) +'%';
objCount=obj.count; objCount=obj.count;
...@@ -419,6 +462,7 @@ export default { ...@@ -419,6 +462,7 @@ export default {
getWarehouseInfo({warehouseId: this.warehouseId, devIp: this.devIp}).then(res => { getWarehouseInfo({warehouseId: this.warehouseId, devIp: this.devIp}).then(res => {
this.sourceData = res.data.list this.sourceData = res.data.list
this.warehouseSd = res.data.warehouseSd this.warehouseSd = res.data.warehouseSd
this.setSd = res.data.setSd
this.warehouseWd = res.data.warehouseWd this.warehouseWd = res.data.warehouseWd
this.devState = res.data.devState this.devState = res.data.devState
}) })
...@@ -433,6 +477,7 @@ export default { ...@@ -433,6 +477,7 @@ export default {
getWarehouseInfo({warehouseId: this.warehouseId, devIp: res.data[0].devIp}).then(res => { getWarehouseInfo({warehouseId: this.warehouseId, devIp: res.data[0].devIp}).then(res => {
this.sourceData = res.data.list this.sourceData = res.data.list
this.warehouseSd = res.data.warehouseSd this.warehouseSd = res.data.warehouseSd
this.setSd = res.data.setSd
this.warehouseWd = res.data.warehouseWd this.warehouseWd = res.data.warehouseWd
this.devState = res.data.devState this.devState = res.data.devState
}) })
...@@ -474,6 +519,10 @@ export default { ...@@ -474,6 +519,10 @@ export default {
this.page = e - 1 this.page = e - 1
this.initOrderInfo() this.initOrderInfo()
}, },
postPageChange1(e) {
this.page1 = e - 1
this.initOrderInfo()
},
showDetail(row) { showDetail(row) {
const _this = this.$refs[row.orderType] const _this = this.$refs[row.orderType]
var params = {id: row.applyId} var params = {id: row.applyId}
...@@ -488,7 +537,7 @@ export default { ...@@ -488,7 +537,7 @@ export default {
body: escape(JSON.stringify(params)), body: escape(JSON.stringify(params)),
sign: md5('a1dca4cf35a6d460128f5e4ad401b1c1'+parseInt(new Date().getTime()/1000)+'1.0'+escape(JSON.stringify(params))) sign: md5('a1dca4cf35a6d460128f5e4ad401b1c1'+parseInt(new Date().getTime()/1000)+'1.0'+escape(JSON.stringify(params)))
} }
initPdata( window._CONFIG['serviceURL'] + this.processUrl[row.orderType] ,data).then(res => { initPdata( window._CONFIG['serviceURL'] + this.processUrl[row.orderType], data).then(res => {
if(res.code == '10000') { if(res.code == '10000') {
_this.form = res.data _this.form = res.data
_this.getSteps(res.data.flowType, res.data.orgId) _this.getSteps(res.data.flowType, res.data.orgId)
...@@ -497,6 +546,41 @@ export default { ...@@ -497,6 +546,41 @@ export default {
} }
}) })
_this.dialog = true _this.dialog = true
},
showTaskDetail(row) {
const _this = this.$refs[row.orderType]
var params = {id: row.id}
var data = {
appKey: 'odykzzWm1GASj15K1AGxwQ==',
orgId: '',
version: '1.0',
timestamp: parseInt(new Date().getTime()/1000),
body: escape(JSON.stringify(params)),
sign: md5('a1dca4cf35a6d460128f5e4ad401b1c1'+parseInt(new Date().getTime()/1000)+'1.0'+escape(JSON.stringify(params)))
}
initPdata( window._CONFIG['serviceURL'] + this.processUrl[row.orderType], data).then(res => {
if(res.code == '10000') {
_this.form = res.data
_this.getMissionInOutInfo(res.data.id)
} else {
this.$message.error(res.msg)
}
})
_this.dialog = true
},
stopTask(data) {
changeWorkState({"missionId":data.id, state: 2}).then(res => {
if(res.code ==='10000') {
this.initOrderInfo()
this.$notify({
title: '结束成功',
type: 'success',
duration: 2500
})
} else {
this.$message.error(res.msg)
}
})
} }
} }
} }
...@@ -522,7 +606,7 @@ export default { ...@@ -522,7 +606,7 @@ export default {
} }
.textContent{ .textContent{
background-color:#ffffff; background-color:#ffffff;
padding:16px 20px; padding: 8px 8px;
text-align:left; text-align:left;
} }
/deep/ .el-dialog{ /deep/ .el-dialog{
......
...@@ -144,7 +144,7 @@ export default { ...@@ -144,7 +144,7 @@ export default {
} }
}, },
handleDelete(index, row) { handleDelete(index, row) {
this.form.bagList.splice(index, 1) this.form.modelList.splice(index, 1)
}, },
cancel() { cancel() {
this.resetForm() this.resetForm()
......
...@@ -11,15 +11,7 @@ ...@@ -11,15 +11,7 @@
<eForm ref="form" :is-add="isAdd" @ok="handeleInit"/> <eForm ref="form" :is-add="isAdd" @ok="handeleInit"/>
<!--表格渲染--> <!--表格渲染-->
<el-table ref="table" v-loading="loading" :data="data" highlight-current-row border style="width: 100%;"> <el-table ref="table" v-loading="loading" :data="data" highlight-current-row border style="width: 100%;">
<el-table-column type="expand" align="center"> <el-table-column type="index" align="center" width="50"></el-table-column>
<template slot-scope="props">
<el-table :data="props.row.bagList" stripe border style="width: 100%;">
<el-table-column type="index" label="序号" align="center" width="50"/>
<el-table-column prop="name" label="装备名称" align="center"/>
<el-table-column prop="count" label="数量" align="center"/>
</el-table>
</template>
</el-table-column>
<el-table-column prop="orgName" label="组织机构名称" align="center"/> <el-table-column prop="orgName" label="组织机构名称" align="center"/>
<el-table-column prop="name" label="装备包名称" align="center"/> <el-table-column prop="name" label="装备包名称" align="center"/>
<el-table-column label="操作" width="150" align="center" fixed="right"> <el-table-column label="操作" width="150" align="center" fixed="right">
......
...@@ -102,8 +102,9 @@ ...@@ -102,8 +102,9 @@
<el-table-column prop="insideRealCount" align="center" label="已归还数量"/> <el-table-column prop="insideRealCount" align="center" label="已归还数量"/>
<el-table-column prop="state" label="出入库状态" align="center"> <el-table-column prop="state" label="出入库状态" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-tag v-if="scope.row.quantity == scope.row.realCount && scope.row.realCount == scope.row.insideRealCount" type="success">已完成</el-tag> <el-tag v-if="scope.row.state === 2" type="success">已完成</el-tag>
<el-tag v-else type="warning">未完成</el-tag> <el-tag v-else-if="scope.row.state === 1" type="primary">进行中</el-tag>
<el-tag v-else-if="scope.row.state === 0" type="warning">未完成</el-tag>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
......
...@@ -40,14 +40,14 @@ ...@@ -40,14 +40,14 @@
</div> </div>
</el-dialog> </el-dialog>
<!--表格开始--> <!--表格开始-->
<el-table v-loading="loading" :data="data" style="width: 100%;" stripe border :header-cell-style="{'text-align':'center'}"> <el-table v-loading="loading" :data="data" style="width: 100%;" stripe border :header-cell-style="{'text-align':'center'}" row-key="key" :tree-props="{children: 'bagIncludeList'}">
<el-table-column type="index" label="序号" width="50" align="center"/> <el-table-column type="index" label="序号" width="50" align="center"/>
<el-table-column label="订单编号" :show-overflow-tooltip="true" align="center" v-if="actionState!=13" width="200"> <el-table-column label="订单编号" :show-overflow-tooltip="true" align="center" v-if="actionState!=13" width="200">
<template slot-scope="scope"> <template slot-scope="scope">
<el-link type="primary" @click="showOrder(scope.row)">{{ scope.row.order }}</el-link> <el-link type="primary" @click="showOrder(scope.row)">{{ scope.row.order }}</el-link>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="warehouseName" label="仓库名称" align="center"/> <el-table-column prop="warehouseName" label="仓库名称" align="center" width="180" :show-overflow-tooltip="true"/>
<el-table-column prop="equipmentName" label="装备名称" align="center"/> <el-table-column prop="equipmentName" label="装备名称" align="center"/>
<el-table-column prop="sizeName" label="装备型号名称" align="center"/> <el-table-column prop="sizeName" label="装备型号名称" align="center"/>
<el-table-column prop="policeName" label="操作人员" align="center"/> <el-table-column prop="policeName" label="操作人员" align="center"/>
...@@ -65,6 +65,7 @@ ...@@ -65,6 +65,7 @@
<el-tag v-else-if="scope.row.actionState === 15 || scope.row.actionState === 16" type="warning">跨仓库借用</el-tag> <el-tag v-else-if="scope.row.actionState === 15 || scope.row.actionState === 16" type="warning">跨仓库借用</el-tag>
<el-tag v-else-if="scope.row.actionState === 17 || scope.row.actionState === 18" type="success">跨仓库归还</el-tag> <el-tag v-else-if="scope.row.actionState === 17 || scope.row.actionState === 18" type="success">跨仓库归还</el-tag>
<el-tag v-else-if="scope.row.actionState === 19" type="success">装备回库</el-tag> <el-tag v-else-if="scope.row.actionState === 19" type="success">装备回库</el-tag>
<el-tag v-else-if="scope.row.actionState === 20 || scope.row.actionState === 21" type="success">出警任务</el-tag>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="安全等级" align="center" width="150px"> <el-table-column label="安全等级" align="center" width="150px">
...@@ -97,6 +98,7 @@ ...@@ -97,6 +98,7 @@
@current-change="postPageChange"/> @current-change="postPageChange"/>
<!--表单组件--> <!--表单组件-->
<equ-info-detail ref="equInfoDetail"/> <equ-info-detail ref="equInfoDetail"/>
<bag-info-detail ref="bagInfoDetail"/>
<borrow-detail ref="p2"/> <borrow-detail ref="p2"/>
<receive-detail ref='p3'/> <receive-detail ref='p3'/>
...@@ -118,7 +120,8 @@ import initData from '@/mixins/initData' ...@@ -118,7 +120,8 @@ import initData from '@/mixins/initData'
import { parseTimes } from '@/utils/index' import { parseTimes } from '@/utils/index'
import { mapGetters } from 'vuex' import { mapGetters } from 'vuex'
import equInfoDetail from '@/views/warehouse/maintenance/form' import equInfoDetail from '@/views/warehouse/maintenance/form'
import { getInfoByID } from '@/api/inventory' import bagInfoDetail from '@/views/warehouse/maintenance/bagForm'
import { getInfoByID, getBagInfoByID } from '@/api/inventory'
import { initPdata } from '@/api/data' import { initPdata } from '@/api/data'
import md5 from 'js-md5' import md5 from 'js-md5'
import BorrowDetail from '@/views/warehouse/borrow/list/form' import BorrowDetail from '@/views/warehouse/borrow/list/form'
...@@ -134,7 +137,7 @@ export default { ...@@ -134,7 +137,7 @@ export default {
name: 'WarehouseLog', name: 'WarehouseLog',
mixins: [initData], mixins: [initData],
props: ['orgList', 'warehouseList', 'actionState'], props: ['orgList', 'warehouseList', 'actionState'],
components: { equInfoDetail,BorrowDetail, PurseDetail, RmDetail, ScrapDetail, BorrowOtherDetail, ReturnOtherDetail, TransferDetail, ReceiveDetail, InventoryReturnDetail }, components: { equInfoDetail ,bagInfoDetail, BorrowDetail, PurseDetail, RmDetail, ScrapDetail, BorrowOtherDetail, ReturnOtherDetail, TransferDetail, ReceiveDetail, InventoryReturnDetail },
data() { data() {
return { return {
loading: false, loading: false,
...@@ -213,7 +216,7 @@ export default { ...@@ -213,7 +216,7 @@ export default {
}, },
beforeInit() { beforeInit() {
this.url = window._CONFIG['serviceURL'] + '/api/Inventory/GetAllInOutHistory' this.url = window._CONFIG['serviceURL'] + '/api/Inventory/GetAllInOutHistory'
this.params = {page: this.page,size: this.size, orgId: this.orgId || this.$store.state.user.user.baseJpOrganization.id,actionState: this.actionState } this.params = {page: this.page,size: this.size, orgId: this.orgId || this.$store.state.user.user.baseJpOrganization.id, actionState: this.actionState }
const warehouseId = this.warehouseId // 仓库 const warehouseId = this.warehouseId // 仓库
const date = this.date const date = this.date
const equipmentName = this.equipmentName const equipmentName = this.equipmentName
...@@ -239,17 +242,31 @@ export default { ...@@ -239,17 +242,31 @@ export default {
this.dialogVisible = true this.dialogVisible = true
}, },
show(data) { show(data) {
const _this = this.$refs.equInfoDetail if (data.bagInventoryId) {
getInfoByID({id: data.equipmentId}).then(res => { const _this = this.$refs.bagInfoDetail
if(res.code == '10000') { getBagInfoByID({id: data.bagInventoryId}).then(res => {
_this.form = res.data if(res.code == '10000') {
_this.stateList = res.data.stateList.slice(0, 3) _this.form = res.data
_this.total = res.data.stateList.length _this.stateList = res.data.stateList.slice(0, 3)
} else { _this.total = res.data.stateList.length
this.$message.error(res.msg) } else {
} this.$message.error(res.msg)
}) }
_this.dialog = true })
_this.dialog = true
} else {
const _this = this.$refs.equInfoDetail
getInfoByID({id: data.equipmentId}).then(res => {
if(res.code == '10000') {
_this.form = res.data
_this.stateList = res.data.stateList.slice(0, 3)
_this.total = res.data.stateList.length
} else {
this.$message.error(res.msg)
}
})
_this.dialog = true
}
}, },
showOrder(data) { showOrder(data) {
const _this = this.$refs['p' + data.actionState] const _this = this.$refs['p' + data.actionState]
......
<template>
<el-dialog :append-to-body="true" :close-on-click-modal="false" :before-close="cancel" :visible.sync="dialog" title="查看详情" width="1200px">
<!-- 弹出的图片窗口 -->
<el-dialog :append-to-body="true" :close-on-click-modal="false" :visible.sync="dialogVisible" title="图片预览" width="50%">
<img :src="picUrl" width="100%"/>
      <div slot="footer" class="dialog-footer">
<el-button type="info" plain @click="dialogVisible = false">关闭</el-button>
</div>
</el-dialog>
<el-form ref="form" :model="form" :inline="true" size="small" label-width="80px">
<el-card style="margin-bottom: 15px">
<div slot="header" class="clearfix">
<span style="cursor:pointer" @click="show=!show">基本信息 &nbsp;&nbsp;&nbsp; </span> <span v-show="show"> [{{form.epc}}] </span>
</div>
<div style="border:1px solid #e8e8e8;">
<table style="table-layout:auto; width:100%;border-collapse:collapse;box-sizing:border-box;">
<tbody>
<tr style="border-bottom:1px solid #e8e8e8;">
<th class="textHeader">所属组织机构</th>
<td class="textContent">{{form.name}}</td>
<th class="textHeader">所属仓库</th>
<td class="textContent">
{{form.warehouseName}}
</td>
<th class="textHeader">装备包状态</th>
<td class="textContentLast" style="padding-top:8px;padding-bottom:8px;">
<el-tag v-if="[0,3].includes(form.currentState)" type="success">在库</el-tag>
<el-tag v-else-if="[6].includes(form.currentState)" type="danger">已报废</el-tag>
<el-tag v-else type="warning">出库</el-tag>
</td>
</tr>
<tr style="border-bottom:1px solid #e8e8e8;">
<th class="textHeader">装备包名称</th>
<td class="textContent">{{form.equipmentName}}</td>
<th class="textHeader">使用次数</th>
<td class="textContent">{{form.useCount}}</td>
<th class="textHeader">维修次数</th>
<td class="textContentLast">{{form.fixCount}}</td>
</tr>
</tbody>
</table>
</div>
</el-card>
<el-card style="margin-bottom: 15px">
<div slot="header" class="clearfix">
<span>历史出入库信息</span>
</div>
<el-table :data="stateList" style="width: 100%" border>
<el-table-column type="index" label="序号" align="center" width="50"/>
<el-table-column prop="policeName" align="center" label="操作人员"/>
<el-table-column prop="name" align="center" label="仓库名称"/>
<el-table-column prop="createTime" align="center" label="出入库时间" />
<el-table-column align="center" label="出入库状态">
<template slot-scope="scope">
<span v-if="scope.row.actionState == 1">采购</span>
<span v-else-if="scope.row.actionState == 2">借用</span>
<span v-else-if="scope.row.actionState == 3">领用</span>
<span v-else-if="scope.row.actionState == 4">调拨</span>
<span v-else-if="scope.row.actionState == 6">维修</span>
<span v-else-if="scope.row.actionState == 7">报废</span>
<span v-else-if="scope.row.actionState == 13 || scope.row.actionState == 14">本仓库借用</span>
<span v-else-if="scope.row.actionState == 15 || scope.row.actionState == 16">跨仓库借用</span>
<span v-else-if="scope.row.actionState == 17 || scope.row.actionState == 18">跨仓库归还</span>
<span v-else-if="scope.row.actionState == 19">装备回库</span>
{{scope.row.outInState == 0 ? '出库': '入库'}}
</template>
</el-table-column>
<el-table-column label="操作" align="center" fixed="right">
<template slot-scope="scope">
<el-button size="mini" type="warning" v-if="scope.row.picUrl" @click="previewPic(encodeURI(baseApi2 + scope.row.picUrl))">预览</el-button>
</template>
</el-table-column>
</el-table>
<!--分页组件-->
<el-pagination style="margin-top: 8px;" layout="prev, pager, next" :total="total" :page-size="3" :current-page="currentPage" @current-change="handleCurrentChange"/>
</el-card>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="cancel" type="info" plain>关闭</el-button>
</div>
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex'
import { parseTimes } from '@/utils/index'
export default {
data() {
return {
loading: false, dialog: false, total: 0,
dialogVisible: false,
picUrl: '',
currentPage: 1, stateList: [],
form: {},
show: false
}
},
computed: {
...mapGetters([
'baseApi2'
])
},
methods: {
parseTimes,
cancel() {
this.resetForm()
},
previewPic(url) { //预览出入库的图片
this.picUrl = url
this.dialogVisible = true
},
resetForm() {
this.dialog = false
},
handleCurrentChange(currentPage) {
this.currentPage = currentPage
this.stateList = this.form.stateList.slice((this.currentPage-1)*3, this.currentPage*3)
}
}
}
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
/deep/ .el-input-number .el-input__inner {
text-align: left;
}
/deep/.el-card .el-card__header{
background:#ffffff;
color:#000000;
font-size: 16px;
}
.textHeader{
background-color:#fafafa;
padding:16px 24px;
border-right:1px solid #e8e8e8;
text-align:center;
}
.textContent{
background-color:#ffffff;
padding:16px 24px;
border-right:1px solid #e8e8e8;
text-align:left;
}
.textContentLast{
background-color:#ffffff;
padding:16px 24px;
text-align:left;
}
/deep/ .el-dialog{
display: flex;
flex-direction: column;
margin:0 !important;
position:absolute;
top:50%;
left:50%;
transform:translate(-50%,-50%);
/*height:600px;*/
max-height:calc(100% - 30px);
max-width:calc(100% - 30px);
}
/deep/ .el-dialog .el-dialog__body{
flex:1;
overflow: auto;
}
</style>
<template> <template>
<el-dialog :append-to-body="true" :close-on-click-modal="false" :before-close="cancel" :visible.sync="dialog" :title="isAdd ? '新增领用单据' : '编辑领用单据'" width="1200px"> <el-dialog :append-to-body="true" :close-on-click-modal="false" :before-close="cancel" :visible.sync="dialog" :title="isAdd ? '新增任务单据' : '编辑任务单据'" width="1200px">
<el-form ref="form" :model="form" :rules="rules" size="small" label-width="40px"> <el-form ref="form" :model="form" :rules="rules" size="small" label-width="40px">
<span slot="label"><i class="el-icon-document"></i>&nbsp;领用信息</span>
<span slot="label"><i class="el-icon-document"></i>&nbsp;领用信息</span>
<el-collapse v-model="collapseNum"> <el-collapse v-model="collapseNum">
<el-collapse-item name="1"> <el-collapse-item name="1">
<template slot="title"> <el-tag>第一步: 选择仓库 (必选)</el-tag></template> <template slot="title"> <el-tag>第一步: 选择仓库 (必选)</el-tag></template>
<el-form-item> <el-form-item>
<el-select v-model="form.warehouseId" filterable placeholder="请选择领用的仓库" style="width: 240px;" :disabled="form.detailList.length > 0" @change="getAllInventoryList"> <el-select v-model="form.warehouseId" filterable placeholder="请选择仓库" style="width: 240px;" :disabled="form.modelList.length > 0">
<el-option v-for="item in warehouseList" :key="item.name" :label="item.name" :value="item.id" /> <el-option v-for="item in warehouseList" :key="item.name" :label="item.name" :value="item.id" />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-input v-model="form.policeNote" style="width: 240px;" <el-input v-model="form.name" style="width: 240px;" placeholder="请填写任务名称" :disabled="disabled"/>
placeholder="请填写领用人名称"/>
</el-form-item> </el-form-item>
</el-collapse-item> </el-collapse-item>
<el-collapse-item name="2"> <el-collapse-item name="2">
<template slot="title"> <el-tag>第二步: 选择装备 (必选)</el-tag></template> <template slot="title"> <el-tag>第二步: 选择模块 (必选)</el-tag></template>
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="7"> <el-col :span="7">
<el-form-item> <el-form-item>
<el-select v-model="equipmentDetailId" clearable filterable placeholder="请选择装备" <el-select v-model="modelId" clearable filterable placeholder="请选择模块" style="width: 240px;" >
@change="getInventoryCount" @focus="getAllInventoryList" :filter-method="dataFilter"
style="width: 240px;" >
<el-option <el-option
v-for="item in equipmentList" v-for="item in modelList"
:key="item.equipmentDetailId" :key="item.id"
:label="item.equipmentDetailName" :label="item.name"
:value="item.equipmentDetailId"> :value="item.id">
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<!-- <el-form-item>
<el-select v-model="equipmentSizeId" clearable filterable placeholder="请选择装备型号名称" @change="selectSize" style="width: 240px;" >
<el-option
v-for="item in equipmentSizeList"
:key="item.sizeId"
:label="item.sizeName"
:value="item.sizeId">
</el-option>
</el-select>
</el-form-item> -->
<el-form-item> <el-form-item>
<template slot-scope="scope"> <el-button size="mini" type="success" round plain icon="el-icon-plus" style="width:240px" @click="handleAdd()" :disabled="disabled">添加模块</el-button>
<el-button v-model="handleAdd" size="mini" type="success" round plain icon="el-icon-plus"
style="width:240px" @click="handleAdd(scope.$index, scope.row)">添加装备</el-button>
</template>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="17"> <el-col :span="17">
<el-table :data="form.detailList" class="form-table" border> <el-table :data="form.modelList" class="form-table" border>
<el-table-column type="index" label="序号" align="center" width="50"/> <el-table-column type="expand" align="center" width="50">
<el-table-column prop="equipmentName" align="center" label="装备名称" />
<!-- <el-table-column prop="equipmentSizeName" align="center" label="装备型号名称" /> -->
<el-table-column prop="sizeCount" align="center" label="库存数量" />
<el-table-column prop="maxValue" align="center" width="150" label="装备数量">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input-number v-model="scope.row.quantity" size="small" :min="1" :max="scope.row.sizeCount" :precision="0"/> <el-table :data="scope.row.modelList" border>
</template> <el-table-column align="center" label="类型">
<template slot-scope="props">
{{props.row.type == "equipment" ? '装备' : '装备包'}}
</template>
</el-table-column>
<el-table-column prop="name" align="center" label="名称"/>
<el-table-column prop="count" align="center" label="数量"/>
</el-table>
</template>
</el-table-column> </el-table-column>
<el-table-column prop="name" align="center" label="模块名称" />
<el-table-column align="center" label="操作"> <el-table-column align="center" label="操作">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button size="mini" type="danger" round plain icon="el-icon-delete" @click="handleDelete(scope.$index, scope.row)" :disabled="disabled">删除</el-button>
size="mini"
type="danger"
round plain
icon="el-icon-delete"
@click="handleDelete(scope.$index, scope.row)">
删除
</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -81,22 +62,21 @@ ...@@ -81,22 +62,21 @@
@click="form.note = tag.txt">{{tag.txt}}</el-tag> @click="form.note = tag.txt">{{tag.txt}}</el-tag>
<el-input class="input-new-tag" v-if="inputVisible" v-model="inputValue" ref="saveTagInput" size="small" style="margin-top:15px;width:350px;margin-left: 6px;" <el-input class="input-new-tag" v-if="inputVisible" v-model="inputValue" ref="saveTagInput" size="small" style="margin-top:15px;width:350px;margin-left: 6px;"
@keyup.enter.native="handleInputConfirm" @blur="handleInputConfirm"/> @keyup.enter.native="handleInputConfirm" @blur="handleInputConfirm"/>
<el-button v-else style="margin-top:15px;cursor:pointer;margin-left: 6px;" size="small" @click="showInput">+ 新建 领用原因</el-button> <el-button v-else style="margin-top:15px;cursor:pointer;margin-left: 6px;" size="small" @click="showInput">+ 新建 任务原因</el-button>
<el-form-item label-width="6px"> <el-form-item label-width="6px">
<el-input v-model="form.note" style="margin-top:15px;" type="textarea" :rows="4" maxlength="255" show-word-limit placeholder="请输入领用原因"/> <el-input v-model="form.note" style="margin-top:15px;" type="textarea" :rows="4" maxlength="255" show-word-limit placeholder="请输入任务原因"/>
</el-form-item> </el-form-item>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button @click="cancel" type="info" plain>关闭</el-button> <el-button @click="cancel" type="info" plain>关闭</el-button>
<el-button :loading="loading" type="primary" @click="doSubmit" v-if="!form.flowState">确认</el-button> <el-button :loading="loading" type="primary" @click="doSubmit" v-if="!disabled">确认</el-button>
</div> </div>
</el-dialog> </el-dialog>
</template> </template>
<script> <script>
import { getListOrgWarehouse } from '@/api/warehouse' import { getListOrgWarehouse } from '@/api/warehouse'
import { addAndApprovalBorrowOrder } from '@/api/borrow' import { getPageModel,addOrUpdateMission } from '@/api/bag'
import { getAllInventoryList } from '@/api/inventory'
import { deleteTxt, addTxt, getListTxt } from '@/api/policeman' import { deleteTxt, addTxt, getListTxt } from '@/api/policeman'
import cnchar from "cnchar"; import cnchar from "cnchar";
export default { export default {
...@@ -108,21 +88,21 @@ export default { ...@@ -108,21 +88,21 @@ export default {
}, },
data() { data() {
return { return {
loading: false, dialog: false, warehouseList: [], warehouseId: null, policeList: [], loading: false, dialog: false, warehouseList: [], warehouseId: null,
modelId: '',
modelList: [],
equipmentList: [], equipmentDetailId: null,equipmentSizeList: [], equipmentSizeId: null,detailList: [],quantity:1,approvalList:[], equipmentList: [], equipmentDetailId: null,equipmentSizeList: [], equipmentSizeId: null,detailList: [],quantity:1,approvalList:[],
sizeCount : null, sizeCount : null,
visible: false, visible: false,
collapseNum: ['1', '2'], collapseNum: ['1', '2'],
orgizationId:this.$store.state.user.user.baseJpOrganization.id, orgId: this.$store.state.user.user.baseJpOrganization.id,
form: { form: {
id: '', id: '',
warehouseId : '', warehouseId : '',
orgId : this.$store.state.user.user.baseJpOrganization.id, orgId : this.$store.state.user.user.baseJpOrganization.id,
orgCode : this.$store.state.user.user.baseJpOrganization.code.substring(0,6), name : '',
note : '', modelList: [],
applyId: this.$store.state.user.user.id, note: ''
applyName: this.$store.state.user.user.nickName,
detailList: [],
}, },
processForm: {}, processForm: {},
rules: { rules: {
...@@ -132,47 +112,28 @@ export default { ...@@ -132,47 +112,28 @@ export default {
}, },
texts: [], texts: [],
inputVisible: false, inputVisible: false,
disabled: false,
inputValue: '' inputValue: ''
} }
}, },
methods: { methods: {
// 添加行 // 添加行
handleAdd() { handleAdd() {
if(this.equipmentName == null || this.equipmentName == undefined){ let obj = this.modelList.find(i => i.id == this.modelId)
this.$message({ let row = {
message: '请选择装备', modelId: obj.id,
type: 'warning' name: obj.name,
}) modelList: obj.modelList
}else{ }
var iseEquipmentAdd = false; var res = this.form.modelList.find(i => i.modelId == row.modelId)
for(var i=0;i<this.form.detailList.length;i++){ if (res) {
if(this.form.detailList[i].equipmentDetailId === this.equipmentDetailId){ return this.$message.warning('该模块已添加')
iseEquipmentAdd = true;
break;
}
}
if(iseEquipmentAdd){
this.$message({
message: '此装备已添加过',
type: 'warning'
})
} else {
let row = {
estimateId : "",
equipmentName : this.equipmentName,
// equipmentSizeName : this.equipmentSizeName,
equipmentDetailId : this.equipmentDetailId,
// equipmentSizeId : this.equipmentSizeId,
sizeCount: this.sizeCount,
quantity : this.quantity
}
this.form.detailList.push(row)
}
} }
this.form.modelList.push(row)
}, },
// 删除行 // 删除行
handleDelete(index, row) { handleDelete(index, row) {
this.form.detailList.splice(index, 1) this.form.modelList.splice(index, 1)
}, },
cancel() { cancel() {
this.resetForm() this.resetForm()
...@@ -180,9 +141,9 @@ export default { ...@@ -180,9 +141,9 @@ export default {
doSubmit() { doSubmit() {
this.$refs['form'].validate((valid) => { this.$refs['form'].validate((valid) => {
if (valid) { if (valid) {
if (this.form.detailList.length < 1) { if (this.form.modelList.length < 1) {
this.$message({ this.$message({
message: '请至少添加一件装备', message: '请至少添加一个模块',
type: 'warning' type: 'warning'
}) })
} else { } else {
...@@ -193,8 +154,11 @@ export default { ...@@ -193,8 +154,11 @@ export default {
}) })
}, },
doThing() { doThing() {
console.log(this.form) if (!this.form.name) {
addAndApprovalBorrowOrder(this.form).then(res => { this.loading = false
return this.$message.warning('任务名称不能为空')
}
addOrUpdateMission(this.form).then(res => {
if(res.code === "10000"){ if(res.code === "10000"){
this.resetForm() this.resetForm()
this.$notify({ this.$notify({
...@@ -203,7 +167,7 @@ export default { ...@@ -203,7 +167,7 @@ export default {
duration: 2500 duration: 2500
}) })
this.loading = false this.loading = false
this.$parent.initPost() this.$emit('ok')
}else{ }else{
this.$message.error(res.msg) this.$message.error(res.msg)
this.loading = false this.loading = false
...@@ -219,69 +183,26 @@ export default { ...@@ -219,69 +183,26 @@ export default {
id: '', id: '',
warehouseId : '', warehouseId : '',
orgId : this.$store.state.user.user.baseJpOrganization.id, orgId : this.$store.state.user.user.baseJpOrganization.id,
orgCode : this.$store.state.user.user.baseJpOrganization.code.substring(0,6), name : '',
note : '', modelList: [],
applyId: this.$store.state.user.user.id, note: ''
applyName: this.$store.state.user.user.nickName,
detailList: []
} }
}, },
//获取仓库列表 //获取仓库列表
getListOrgWarehouse(isAdd) { getListOrgWarehouse(isAdd, warehouseList, warehouseId) {
getListOrgWarehouse({ orgizationId: this.$store.state.user.user.baseJpOrganization.id }).then(res => { this.warehouseList = warehouseList
this.warehouseList = res.data this.form.warehouseId = warehouseId
if (this.warehouseList.length == 1 && isAdd) { this.form.warehouseId = res.data[0].id } this.getModelList()
this.getAllInventoryList() getListTxt({username: this.$store.state.user.user.username, type: "出警任务" }).then(res => {
})
getListTxt({username: this.$store.state.user.user.username, type: "领用申请" }).then(res => {
this.texts = res.data this.texts = res.data
}) })
}, },
//获取装备库存 getModelList() {
getAllInventoryList() { getPageModel({page: 0, size: 40, orgId: this.orgId}).then(res => {
this.equipmentList = [] this.modelList = res.data.content
this.equipmentName = null
this.equipmentDetailId = null
this.equipmentSizeList = []
this.equipmentSizeName = null
this.equipmentSizeId = null
this.quantity = 1
getAllInventoryList({warehouseId : this.form.warehouseId}).then(res => {
this.equipmentList = res.data
//保留数据源
this.copy = Object.assign(this.equipmentList)
})
},
getInventoryCount(data) {
this.sizeCount = null
this.equipmentName = null
if(this.equipmentDetailId != ""){
let obj = {};
obj = this.equipmentList.find((item)=>{
return item.equipmentDetailId === data;
});
this.equipmentName = obj.equipmentDetailName;
this.sizeCount = obj.detailCount;
}
},
dataFilter(v) {
//对绑定数据赋值
this.equipmentList = this.copy.filter((item) => {
//如果直接包含输入值直接返回true
if (item.equipmentDetailName.indexOf(v) !== -1) return true;
//将label拆散成小写拼音数组
let arr = item.equipmentDetailName.spell('array','first','low');
//拼接成完整label的拼音
let spell = arr.join('');
//lengths 是label完整拼音 中每个汉字第一个拼音字母的index值的数组
let lengths = [0];
for (var i = 0; i < arr.length - 1; i++) {
lengths.push(lengths[i] + arr[i].length);
};
//判断label完整拼音 中 输入值的 index 是不是等于某个汉字第一个拼音字母的index值
return lengths.indexOf(spell.indexOf(v)) !== -1;
}) })
}, },
handleClose(tag) { handleClose(tag) {
this.texts.splice(this.texts.indexOf(tag), 1) this.texts.splice(this.texts.indexOf(tag), 1)
deleteTxt({id: tag.id}) deleteTxt({id: tag.id})
...@@ -295,9 +216,9 @@ export default { ...@@ -295,9 +216,9 @@ export default {
handleInputConfirm() { handleInputConfirm() {
let inputValue = this.inputValue let inputValue = this.inputValue
if (inputValue != '') { if (inputValue != '') {
addTxt({username: this.$store.state.user.user.username, type: "领用申请", txt: inputValue}).then(res => { addTxt({username: this.$store.state.user.user.username, type: "出警任务", txt: inputValue}).then(res => {
if (res.code == '10000') { if (res.code == '10000') {
getListTxt({username: this.$store.state.user.user.username, type: "领用申请" }).then(res => { getListTxt({username: this.$store.state.user.user.username, type: "出警任务" }).then(res => {
this.texts = res.data this.texts = res.data
}) })
} }
......
...@@ -4,55 +4,63 @@ ...@@ -4,55 +4,63 @@
<div style="margin-left:20px"> <div style="margin-left:20px">
<!-- 搜索栏开始 --> <!-- 搜索栏开始 -->
<div class="head-container"> <div class="head-container">
<el-select v-model="query.warehouseId" placeholder="请选择仓库" clearable style="width: 240px;padding-bottom: 10px;display: inline-block;vertical-align: middle;" <el-select v-model="warehouseId" placeholder="请选择仓库" clearable style="width: 240px;padding-bottom: 10px;display: inline-block;vertical-align: middle;" @change="toPostQuery">
@change="toPostQuery"> <el-option
<el-option
v-for="item in warehouseList" v-for="item in warehouseList"
:key="item.name" :key="item.name"
:label="item.name" :label="item.name"
:value="item.id"> :value="item.id">
</el-option> </el-option>
</el-select> </el-select>
<el-date-picker <el-input v-model="query.name" placeholder="请输入任务名称" class="filter-item" style="width: 260px"/>
v-model="query.date"
type="daterange"
range-separator=":"
class="filter-item"
style="width: 260px"
value-format="yyyy-MM-dd"
start-placeholder="开始日期"
end-placeholder="结束日期"/>
<el-button class="filter-item" type="primary" icon="el-icon-search" @click="toPostQuery">搜索</el-button> <el-button class="filter-item" type="primary" icon="el-icon-search" @click="toPostQuery">搜索</el-button>
<el-button type="primary" class="filter-item" style="float: right" @click="add">出警任务</el-button> <el-button type="primary" class="filter-item" style="float: right" @click="add">出警任务</el-button>
</div> </div>
<!--表单组件--> <!--表单组件-->
<apply-form ref="applyForm" :is-add="isAdd" /> <apply-form ref="applyForm" :is-add="isAdd" @ok="initPost()"/>
<!-- <list-form ref="listForm" /> --> <task-info ref="taskInfo" />
<!--表格开始--> <!--表格开始-->
<el-table v-loading="loading" :data="data" style="width: 100%;" stripe border :header-cell-style="{'text-align':'center'}"> <el-table v-loading="loading" :data="data" style="width: 100%;" stripe border :header-cell-style="{'text-align':'center'}">
<el-table-column type="index" label="序号" width="50" align="center"/> <el-table-column type="index" label="序号" width="50" align="center"/>
<el-table-column prop="orderCode" label="领用单号" align="center"/> <el-table-column prop="warehouseName" label="任务仓库" align="center"/>
<el-table-column prop="warehouseName" label="目标仓库" align="center"/> <el-table-column prop="name" label="任务名称" align="center"/>
<el-table-column prop="applyName" label="创建人" align="center"/> <el-table-column prop="state" label="单据状态" align="center">
<el-table-column prop="applyTime" label="创建时间" align="center"/>
<el-table-column prop="note" label="领用原因" :show-overflow-tooltip="true" align="center"/>
<el-table-column label="操作" width="200" align="left" fixed="right">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button size="mini" type="warning" @click="edit(scope.row)" :disabled="scope.row.changeFlag === 1">编辑</el-button> <el-tag type="warning" v-if="scope.row.state == 0">未开始</el-tag>
<el-popover <el-tag type="primary" v-if="scope.row.state == 1">进行中</el-tag>
<el-tag type="success" v-if="scope.row.state == 2">已完成</el-tag>
</template>
</el-table-column>
<el-table-column label="创建时间" align="center" prop="createTime"></el-table-column>
<el-table-column label="工作状态" align="center">
<template slot-scope="scope">
<el-switch
v-model="scope.row.isWork"
active-color="#409EFF"
inactive-color="#F56C6C"
:active-value="true"
:inactive-value="false"
v-if="scope.row.state !== 2"
@change="start(scope.row, scope.row.isWork)"/>
</template>
</el-table-column>
<el-table-column label="操作" width="208" align="left" fixed="right">
<template slot-scope="scope">
<el-button size="mini" type="warning" @click="edit(scope.row)" :disabled="scope.row.state !== 0 || scope.row.isWork">编辑</el-button>
<el-popover
:ref="scope.row.id" :ref="scope.row.id"
placement="top" placement="top"
width="180"> width="180">
<p>确定删除本条数据吗?</p> <p>确定结束该任务吗?</p>
<div style="text-align: right; margin: 0"> <div style="text-align: right; margin: 0">
<el-button size="mini" type="text" @click="$refs[scope.row.id].doClose()">取消</el-button> <el-button size="mini" type="text" @click="$refs[scope.row.id].doClose()">取消</el-button>
<el-button :loading="delLoading" type="primary" size="mini" @click="subDelete(scope.row.id)">确定</el-button> <el-button :loading="delLoading" type="primary" size="mini" @click="endTask(scope.row)">确定</el-button>
</div> </div>
<el-button slot="reference" type="danger" size="mini" :disabled="scope.row.changeFlag === 1">删除</el-button> <el-button slot="reference" type="danger" size="mini" :disabled="scope.row.state == 2">结束</el-button>
</el-popover> </el-popover>
<el-button size="mini" type="primary" @click="show(scope.row)">查看</el-button> <el-button size="mini" type="primary" style="margin-left: 2px;" @click="show(scope.row)">查看</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<!--分页组件--> <!--分页组件-->
<el-pagination <el-pagination
...@@ -69,83 +77,98 @@ ...@@ -69,83 +77,98 @@
<script> <script>
import initData from '@/mixins/initData' import initData from '@/mixins/initData'
import applyForm from './form' import applyForm from './form'
// import listForm from '../apply/detailForm' import taskInfo from './taskInfo'
import { deleteOrder, getByID } from '@/api/borrow' import { getListOrgWarehouse } from '@/api/warehouse'
import { changeWorkState } from '@/api/bag'
export default { export default {
name: 'ReceiveCommon', name: 'ReceiveCommon',
mixins: [initData], mixins: [initData],
props: ['warehouseList'], components: { applyForm, taskInfo },
components: { applyForm },
data() { data() {
return { return {
loading: false, loading: false,
delLoading: false, delLoading: false,
warehouseList: [],
warehouseId: ''
} }
}, },
created() { created() {
this.query.orderId = this.$route.query.orderId this.$nextTick(() => {
this.initWarehouseList()
})
}, },
methods: { methods: {
tabChange() { initWarehouseList() {
this.query = {} getListOrgWarehouse({ orgizationId: this.$store.state.user.user.baseJpOrganization.id }).then(res => {
this.$nextTick(() => { this.warehouseList = res.data
this.warehouseId = this.warehouseList[0].id
this.initPost() this.initPost()
}) })
}, },
beforeInit() { beforeInit() {
this.url = window._CONFIG['serviceURL'] + '/api/Borrow/GetAllBorrowOrderList' this.url = window._CONFIG['serviceURL'] + '/api/Mission/GetPageMission'
this.params = { page: this.page, size: this.size, actionType: 1, applyId: this.$store.state.user.user.id, orgId: this.$store.state.user.user.baseJpOrganization.id } this.params = { page: this.page, size: this.size, orgId: this.$store.state.user.user.baseJpOrganization.id }
const warehouseId = this.query.warehouseId // 仓库 const warehouseId = this.warehouseId // 仓库
const date = this.query.date // 日期 const name = this.query.name // 日期
if (warehouseId !== '' && warehouseId !== null) { this.params['warehouseId'] = warehouseId } if (warehouseId !== '' && warehouseId !== null) { this.params['warehouseId'] = warehouseId }
if (date) { if (name) {
this.params['startTime'] = date[0] this.params['name'] = name
this.params['endTime'] = date[1]
} }
return true return true
}, },
add() { add() {
this.isAdd = true this.isAdd = true
this.$refs.applyForm.getListOrgWarehouse(this.isAdd) this.$refs.applyForm.disabled = false
this.$refs.applyForm.getListOrgWarehouse(this.isAdd, this.warehouseList, this.warehouseId)
this.$refs.applyForm.dialog = true this.$refs.applyForm.dialog = true
}, },
edit(data) { edit(data) {
this.isAdd = false this.isAdd = false
const _this = this.$refs.applyForm const _this = this.$refs.applyForm
_this.getListOrgWarehouse(this.isAdd) _this.disabled = false
_this.getListOrgWarehouse(this.isAdd, this.warehouseList, this.warehouseId)
_this.form = { _this.form = {
id: data.id, id: data.id,
applyId: data.applyId,
applyName: data.applyName,
detailList: data.detailList, detailList: data.detailList,
orgCode: data.orgCode, name: data.name,
orgId: data.orgId, orgId: data.orgId,
warehouseId: data.warehouseId, warehouseId: data.warehouseId,
note: data.note modelList: data.missionChild
} }
_this.dialog = true _this.dialog = true
}, },
show(data) { show(data) {
const _this = this.$refs.listForm const _this = this.$refs.taskInfo
getByID({id: data.id}).then(res => { _this.form = {
id: data.id,
name: data.name,
warehouseName: data.warehouseName,
state: data.state,
isWork: data.isWork,
createTime: data.createTime,
missionChild: data.missionChild
}
_this.getMissionInOutInfo(data.id)
_this.dialog = true
},
start(data, isWork) {
changeWorkState({workState: isWork,missionId:data.id}).then(res => {
if(res.code == '10000') { if(res.code == '10000') {
_this.form = res.data this.$message.success('操作成功')
_this.getSteps() this.initPost()
} else { } else {
this.$message.error(res.msg) this.$message.error(res.msg)
} }
}) })
_this.dialog = true
}, },
subDelete(id) { endTask(data) {
this.delLoading = true this.delLoading = true
deleteOrder({id: id}).then(res => { changeWorkState({"missionId":data.id, state: 2}).then(res => {
if(res.code ==='10000') { if(res.code ==='10000') {
this.$refs[id].doClose() this.$refs[data.id].doClose()
this.dleChangePage()
this.initPost() this.initPost()
this.$notify({ this.$notify({
title: '删除成功', title: '结束成功',
type: 'success', type: 'success',
duration: 2500 duration: 2500
}) })
...@@ -155,7 +178,7 @@ export default { ...@@ -155,7 +178,7 @@ export default {
this.delLoading = false this.delLoading = false
}).catch(err => { }).catch(err => {
this.delLoading = false this.delLoading = false
this.$refs[id].doClose() this.$refs[data.id].doClose()
console.log(err.response.data.message) console.log(err.response.data.message)
}) })
} }
......
<template>
<el-dialog :append-to-body="true" :close-on-click-modal="false" :before-close="cancel" :visible.sync="dialog" title="查看详情" width="1200px">
<!-- 弹出的图片窗口 -->
<el-dialog :append-to-body="true" :close-on-click-modal="false" :visible.sync="dialogVisible" title="图片预览" width="50%">
<img :src="picUrl" width="100%"/>
<div slot="footer" class="dialog-footer">
<el-button type="info" plain @click="dialogVisible = false">关闭</el-button>
</div>
</el-dialog>
<el-form ref="form" :model="form" :inline="true" size="small" label-width="80px">
<el-tabs v-model="active" tab-position="left">
<el-tab-pane name="first" style="margin-left: 20px">
<span slot="label"><i class="el-icon-document"></i>&nbsp;任务信息</span>
<el-card style="margin-bottom: 15px">
<div slot="header" class="clearfix">
<span style="cursor:pointer" @click="show=!show">基本信息 &nbsp;&nbsp;&nbsp; </span>
</div>
<div style="border:1px solid #e8e8e8;">
<table style="table-layout:auto; width:100%;border-collapse:collapse;box-sizing:border-box;">
<tbody>
<tr style="border-bottom:1px solid #e8e8e8;">
<th class="textHeader">任务名称</th>
<td class="textContent">{{form.name}}</td>
<th class="textHeader">仓库名称</th>
<td class="textContent">
{{form.warehouseName}}
</td>
<th class="textHeader">任务状态</th>
<td class="textContentLast" style="padding-top:8px;padding-bottom:8px;">
<el-tag type="warning" v-if="form.state == 0">未开始</el-tag>
<el-tag type="primary" v-if="form.state == 1">进行中</el-tag>
<el-tag type="success" v-if="form.state == 2">已完成</el-tag>
</td>
</tr>
<tr style="border-bottom:1px solid #e8e8e8;">
<th class="textHeader">工作状态</th>
<td class="textContent">
<el-tag type="primary" v-if="!form.isWork">未工作</el-tag>
<el-tag type="success" v-if="form.isWork">工作中</el-tag>
</td>
<th class="textHeader">任务时间</th>
<td class="textContentLast">{{form.createTime}}</td>
</tr>
</tbody>
</table>
</div>
</el-card>
<el-card style="margin-bottom: 15px">
<div slot="header" class="clearfix">
<span>模块信息</span>
</div>
<el-tabs v-model="activeName">
<el-tab-pane :label="item.name" :name="index.toString()" v-for="(item,index) in form.missionChild" :key="item.modelId">
<el-table :data="item.modelList" style="width: 100%" border row-key="name" :tree-props="{children: 'bagList'}">
<el-table-column type="index" label="序号" align="center" width="50"/>
<el-table-column align="center" label="类别">
<template slot-scope="scope">
{{scope.row.type === 'bag' ? '装备包' : scope.row.type === 'equipment' ? '装备' : ''}}
</template>
</el-table-column>
<el-table-column prop="name" align="center" label="名称"/>
<el-table-column prop="count" align="center" label="数量"/>
</el-table>
</el-tab-pane>
</el-tabs>
</el-card>
</el-tab-pane>
<el-tab-pane name="third" style="margin-left: 20px">
<span slot="label"><i class="el-icon-tickets"></i>&nbsp;通道信息</span>
<el-card style="margin-bottom: 15px">
<div slot="header" class="clearfix">
<span>查看出入库状态</span>
</div>
<el-tabs v-model="activethree">
<el-tab-pane :label="item.name" :name="index.toString()" v-for="(item,index) in inoutList" :key="item.id">
<el-table :data="item.modelBagList" style="width: 100%" border>
<el-table-column type="index" label="序号" align="center" width="50"/>
<el-table-column prop="type" align="center" label="类型">
<template slot-scope="scope">
{{scope.row.type === 'bag' ? '装备包' : scope.row.type === 'equipment' ? '装备' : ''}}
</template>
</el-table-column>
<el-table-column prop="name" align="center" label="名称"/>
<el-table-column prop="count" align="center" label="计划数量"/>
<el-table-column prop="realOutCount" align="center" label="实际出库数量"/>
<el-table-column prop="realInCount" align="center" label="实际回库数量"/>
<!-- <el-table-column prop="state" label="出入库状态" align="center">
<template slot-scope="scope">
<el-tag v-if="scope.row.realInCount == scope.row.realOutCount" type="success">已完成</el-tag>
<el-tag v-else type="warning">未完成</el-tag>
</template>
</el-table-column> -->
</el-table>
</el-tab-pane>
</el-tabs>
</el-card>
</el-tab-pane>
</el-tabs>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="cancel" type="info" plain>关闭</el-button>
</div>
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex'
import { parseTimes } from '@/utils/index'
import {getMissionInOutInfo} from '@/api/bag'
export default {
data() {
return {
loading: false, dialog: false, total: 0,
dialogVisible: false,
picUrl: '',
currentPage: 1, stateList: [],
form: {},
show: false,
active: 'first',
activeName: "0",
activethree: '0',
inoutList: [],
inOutdetailList: []
}
},
computed: {
...mapGetters([
'baseApi2'
])
},
methods: {
parseTimes,
cancel() {
this.resetForm()
},
previewPic(url) { //预览出入库的图片
this.picUrl = url
this.dialogVisible = true
},
resetForm() {
this.dialog = false
},
getMissionInOutInfo(id) {
getMissionInOutInfo({id:id}).then(res => {
if (res.code == '10000') {
this.inoutList = res.data
} else {
this.$message.error(res.message)
}
})
},
handleCurrentChange(currentPage) {
this.currentPage = currentPage
this.stateList = this.form.stateList.slice((this.currentPage-1)*3, this.currentPage*3)
}
}
}
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
/deep/ .el-input-number .el-input__inner {
text-align: left;
}
/deep/.el-card .el-card__header{
background:#ffffff;
color:#000000;
font-size: 16px;
}
.textHeader{
background-color:#fafafa;
padding:16px 24px;
border-right:1px solid #e8e8e8;
text-align:center;
}
.textContent{
background-color:#ffffff;
padding:16px 24px;
border-right:1px solid #e8e8e8;
text-align:left;
}
.textContentLast{
background-color:#ffffff;
padding:16px 24px;
text-align:left;
}
/deep/ .el-dialog{
display: flex;
flex-direction: column;
margin:0 !important;
position:absolute;
top:50%;
left:50%;
transform:translate(-50%,-50%);
/*height:600px;*/
max-height:calc(100% - 30px);
max-width:calc(100% - 30px);
}
/deep/ .el-dialog .el-dialog__body{
flex:1;
overflow: auto;
}
</style>
...@@ -116,9 +116,9 @@ ...@@ -116,9 +116,9 @@
<el-table-column prop="insideRealCount" align="center" label="已入库数量"/> <el-table-column prop="insideRealCount" align="center" label="已入库数量"/>
<el-table-column prop="state" label="出入库状态" align="center"> <el-table-column prop="state" label="出入库状态" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-tag v-if="scope.row.quantity == scope.row.realCount && scope.row.realCount == scope.row.insideRealCount" type="success">已完成</el-tag> <el-tag v-if="scope.row.state === 2" type="success">已完成</el-tag>
<el-tag v-else-if="scope.row.quantity == scope.row.realCount" type="primary">进行中</el-tag> <el-tag v-else-if="scope.row.state === 1" type="primary">进行中</el-tag>
<el-tag v-else type="warning">未完成</el-tag> <el-tag v-else-if="scope.row.state === 0" type="warning">未完成</el-tag>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论