Commit 4bc8013e by huangqy

111

parent afb273a6
......@@ -10,7 +10,7 @@
<script>
window._CONFIG = {};
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>
</head>
<body>
......
import request from '@/utils/request'
import md5 from 'js-md5'
export function get() {
return request({
......
import request from '@/utils/request'
import md5 from 'js-md5'
export function add(data) {
return request({
......
import request from '@/utils/request'
import { transform } from '@/utils/index'
export function getPageBag(data) {
return request({
url: window._CONFIG['serviceURL'] + '/api/Mission/GetPageBag',
method: 'post',
data
data: transform(data)
})
}
......@@ -12,7 +13,7 @@ export function addOrUpdateBag(data) {
return request({
url: window._CONFIG['serviceURL'] + '/api/Mission/AddOrUpdateBag',
method: 'post',
data
data: transform(data)
})
}
......@@ -20,7 +21,7 @@ export function deleteBag(data) {
return request({
url: window._CONFIG['serviceURL'] + '/api/Mission/DeleteBag',
method: 'post',
data
data: transform(data)
})
}
......@@ -28,7 +29,7 @@ export function bindBag(data) {
return request({
url: window._CONFIG['serviceURL'] + '/api/Mission/BindBag',
method: 'post',
data
data: transform(data)
})
}
......@@ -36,7 +37,7 @@ export function releaseBag(data) {
return request({
url: window._CONFIG['serviceURL'] + '/api/Mission/ReleaseBag',
method: 'post',
data
data: transform(data)
})
}
......@@ -44,7 +45,7 @@ export function reBindBag(data) {
return request({
url: window._CONFIG['serviceURL'] + '/api/Mission/ReBindBag',
method: 'post',
data
data: transform(data)
})
}
......@@ -53,7 +54,7 @@ export function addOrUpdateModel(data) {
return request({
url: window._CONFIG['serviceURL'] + '/api/Mission/AddOrUpdateModel',
method: 'post',
data
data: transform(data)
})
}
......@@ -61,6 +62,47 @@ export function deleteModel(data) {
return request({
url: window._CONFIG['serviceURL'] + '/api/Mission/DeleteModel',
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 md5 from 'js-md5'
import { transform } from '@/utils/index'
// 充电台
export function getPageChargeList(data) {
return request({
url: window._CONFIG['serviceURL'] + '/api/BaseCharge/GetPageChargeList',
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)))
}
data: transform(data)
})
}
import request from '@/utils/request'
import md5 from 'js-md5'
import { transform } from '@/utils/index'
// 获取装备列表
export function getListEquipmentDetail(data) {
return request({
url: window._CONFIG['serviceURL'] + '/api/EquipmentDetail/GetListEquipmentDetail',
method: 'post',
data
data: transform(data)
})
}
......@@ -15,14 +15,7 @@ export function getPageEquipmentDetail(data) {
return request({
url: window._CONFIG['serviceURL'] +'/api/EquipmentDetail/GetPageEquipmentDetail',
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)))
}
data: transform(data)
})
}
......@@ -31,14 +24,7 @@ export function addOrUpdateEquipmentDetail(data) {
return request({
url: window._CONFIG['serviceURL'] + '/api/EquipmentDetail/AddOrUpdateEquipmentDetail',
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)))
}
data: transform(data)
})
}
......@@ -47,14 +33,7 @@ export function deleteEquipmentDetail(data) {
return request({
url: window._CONFIG['serviceURL'] + '/api/EquipmentDetail/DeleteEquipmentDetail',
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)))
}
data: transform(data)
})
}
......@@ -63,14 +42,7 @@ export function addSizeDetailSupplier(data) {
return request({
url: window._CONFIG['serviceURL'] + '/api/EquipmentDetail/AddSizeDetailSupplier',
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)))
}
data: transform(data)
})
}
......@@ -78,13 +50,6 @@ export function approverSizeDetailSupplier(data) {
return request({
url: window._CONFIG['serviceURL'] + '/api/EquipmentDetail/ApproverSizeDetailSupplier',
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)))
}
data: transform(data)
})
}
import request from '@/utils/request'
import md5 from 'js-md5'
import { transform } from '@/utils/index'
export function getListEquipmentSize(data) {
return request({
url: window._CONFIG['serviceURL'] + '/api/EquipmentSize/GetListEquipmentSize',
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)))
}
data: transform(data)
})
}
......@@ -21,14 +14,7 @@ export function getPageEquipmentSize(data) {
return request({
url: window._CONFIG['serviceURL'] + '/api/EquipmentSize/GetPageEquipmentSize',
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)))
}
data: transform(data)
})
}
......@@ -37,14 +23,7 @@ export function addOrUpdateEquipmentSize(data) {
return request({
url: window._CONFIG['serviceURL'] + '/api/EquipmentSize/AddOrUpdateEquipmentSize',
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)))
}
data: transform(data)
})
}
......@@ -52,13 +31,6 @@ export function deleteEquipmentSize(data) {
return request({
url: window._CONFIG['serviceURL'] + '/api/EquipmentSize/DeleteEquipmentSize',
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)))
}
data: transform(data)
})
}
......@@ -55,7 +55,14 @@ export function getAllFixs(data) {
return request({
url: window._CONFIG['serviceURL'] + '/api/FixReceiveApply/GetWzByEpc',
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 md5 from 'js-md5'
import { transform } from '@/utils/index'
//获取组织机构及下级的所有库存
export function getOrgListEquipmentDetail(data) {
......@@ -179,7 +180,15 @@ export function getOrgListEquipmentDetail(data) {
return request({
url: window._CONFIG['serviceURL'] + '/api/Inventory/GetInfoByID',
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) {
return request({
url: window._CONFIG['serviceURL'] + '/api/Warehouse/GetListOrgWarehouse',
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) {
  })
}
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) {
  return request({
......
......@@ -33,15 +33,15 @@ export default {
}
return new Promise((resolve, reject) => {
this.loading = true
// 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, 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') {
this.total = res.data.totalElements
this.data = res.data.content
......
/**
* Created by jiachenpan on 16/11/18.
*/
import md5 from 'js-md5'
export function parseTime(time) {
if (time) {
......@@ -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) {
const url = window.URL.createObjectURL(new Blob([obj]))
const link = document.createElement('a')
......
......@@ -107,6 +107,7 @@ export default {
this.epcList = []
if (value) {
let obj = this.bagList.find(i => i.id === this.form.bagId)
console.log(obj)
this.bagReadList = obj.bagList
}
},
......@@ -184,6 +185,8 @@ export default {
}, 1000)
}
})
if (!this.form.warehouseId) { return this.$message.warning('请选择仓库') }
if (this.form.equipmentList.length === 0) { return this.$message.warning('未绑定装备') }
if(flag) return;
bindBag(this.form).then(res => {
if (res.code === '10000') {
......
......@@ -65,6 +65,8 @@
</el-table-column>
</el-table>
<el-divider></el-divider>
<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 prop="name" label="装备名称" align="center"/>
......@@ -93,6 +95,7 @@ import { initPdata } from '@/api/data'
import { getWzByEpc } from '@/api/fixReceiveApply'
import eForm from './form'
import infoForm from '../../warehouse/maintenance/form'
import md5 from 'js-md5'
export default {
name: 'Person',
components: { eForm, infoForm },
......@@ -133,7 +136,15 @@ export default {
}
return new Promise((resolve, reject) => {
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') {
this.total = res.data.totalElements
this.data = res.data.content
......
......@@ -23,7 +23,7 @@
</template>
<script>
import { controlDev } from '@/api/warehouseDev'
import { controlDev, updateHumid } from '@/api/warehouseDev'
export default {
data() {
return {
......@@ -45,6 +45,7 @@ export default {
this.resetForm()
},
doSubmit(){
updateHumid(this.form)
controlDev(this.form).then(res => {
if (res.code == '10000') {
this.dialog = false
......
......@@ -11,6 +11,26 @@
<span>业务单激活</span>
<el-switch v-model="isLocked" active-text="解库" inactive-text="锁库" active-color="#409EFF" inactive-color="#F56C6C" style="float: right" @change="changeLocked"></el-switch>
</div>
<div v-if="taskData.length > 0">
<el-table :data="taskData" style="width:100%" stripe border>
<el-table-column type="index" align="center" width="50" label="序号"/>
<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 label="操作" width="150" align="center" fixed="right">
<template slot-scope="scope">
<el-button size="mini" type="primary" @click="showTaskDetail(scope.row)">查看</el-button>
<el-button size="mini" type="warning" @click="stopTask(scope.row)">终止</el-button>
</template>
</el-table-column>
</el-table>
<el-pagination :total="total1" :current-page="page1 + 1" style="margin-top: 8px;" layout="total, prev, pager, next"
:page-size="3" @current-change="postPageChange1"/>
</div>
<div v-else>
<el-table :data="orderData" style="width:100%" stripe border>
<el-table-column type="index" align="center" width="50" label="序号"/>
<el-table-column prop='orderType' align="center" label="业务类型" width="150" />
......@@ -32,8 +52,10 @@
</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 class="box-card" style="margin-top:10px;">
......@@ -123,7 +145,11 @@
<td class="textContent">{{ warehouseWd }}℃</td>
</tr>
<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>
</tr>
<tr style="border-bottom:1px solid #e8e8e8;">
......@@ -158,6 +184,8 @@
<transfer-detail ref="库存调拨" />
<receive-detail ref="领用" />
<return-other-detail ref="跨库归还" />
<task-detail ref="任务" />
</div>
</template>
......@@ -169,6 +197,7 @@ import DataSet from '@antv/data-set'
import { getListDev } from '@/api/warehouseDev'
import { getListOrgWarehouse, getGroupByCount } from '@/api/warehouse'
import { getAllInOutTop10History, getOrderInfo, changeOrderIsWork, setWarehouseState, closeOrder } from '@/api/inventory'
import { getMissionOrderInfo, changeWorkState } from '@/api/bag'
import { getWarehouseInfo } from '@/api/warehouseDev'
import eForm from './form'
import hForm from './hForm'
......@@ -178,10 +207,11 @@ import BorrowOtherDetail from '@/views/warehouse/borrowOther/list/form'
import TransferDetail from '@/views/warehouse/transfer/list/form'
import ReceiveDetail from '@/views/warehouse/receive/apply/detailForm'
import ReturnOtherDetail from '@/views/warehouse/returnOther/list/form'
import taskDetail from '@/views/warehouse/task/taskInfo'
import md5 from 'js-md5'
export default {
name: 'HouseBaseInfo',
components: { eForm, hForm, BorrowDetail, BorrowOtherDetail, TransferDetail, ReceiveDetail, ReturnOtherDetail },
components: { eForm, hForm, BorrowDetail, BorrowOtherDetail, TransferDetail, ReceiveDetail, ReturnOtherDetail, taskDetail },
mixins: [initData],
data() {
return {
......@@ -238,10 +268,13 @@ export default {
}],
warehouseSd: 0,
warehouseWd: 0,
setSd: 0,
devIp: '',
nowtime: new Date(),
orderData: [],
taskData: [],
page: 0, size: 3, total: 0,
page1: 0, size1: 3, total1: 0,
humidity: 20,
isShow: false,
src: 'http://127.0.0.1:8080/ckzp.html',
......@@ -252,7 +285,8 @@ export default {
"跨库借用": '/api/Transfer/GetByID',
"库存调拨": '/api/Transfer/GetByID',
"领用": '/api/Borrow/GetByID',
"跨库归还": '/api/Transfer/GetByID'
"跨库归还": '/api/Transfer/GetByID',
"任务": '/api/Mission/GetMissionById'
}
}
},
......@@ -375,6 +409,15 @@ export default {
})
},
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 => {
if (res.code == '10000'){
this.orderData = res.data.content
......@@ -419,6 +462,7 @@ export default {
getWarehouseInfo({warehouseId: this.warehouseId, devIp: this.devIp}).then(res => {
this.sourceData = res.data.list
this.warehouseSd = res.data.warehouseSd
this.setSd = res.data.setSd
this.warehouseWd = res.data.warehouseWd
this.devState = res.data.devState
})
......@@ -433,6 +477,7 @@ export default {
getWarehouseInfo({warehouseId: this.warehouseId, devIp: res.data[0].devIp}).then(res => {
this.sourceData = res.data.list
this.warehouseSd = res.data.warehouseSd
this.setSd = res.data.setSd
this.warehouseWd = res.data.warehouseWd
this.devState = res.data.devState
})
......@@ -474,6 +519,10 @@ export default {
this.page = e - 1
this.initOrderInfo()
},
postPageChange1(e) {
this.page1 = e - 1
this.initOrderInfo()
},
showDetail(row) {
const _this = this.$refs[row.orderType]
var params = {id: row.applyId}
......@@ -488,7 +537,7 @@ export default {
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 => {
initPdata( window._CONFIG['serviceURL'] + this.processUrl[row.orderType], data).then(res => {
if(res.code == '10000') {
_this.form = res.data
_this.getSteps(res.data.flowType, res.data.orgId)
......@@ -497,6 +546,41 @@ export default {
}
})
_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 {
}
.textContent{
background-color:#ffffff;
padding:16px 20px;
padding: 8px 8px;
text-align:left;
}
/deep/ .el-dialog{
......
......@@ -144,7 +144,7 @@ export default {
}
},
handleDelete(index, row) {
this.form.bagList.splice(index, 1)
this.form.modelList.splice(index, 1)
},
cancel() {
this.resetForm()
......
......@@ -11,15 +11,7 @@
<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-column type="expand" align="center">
<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 type="index" align="center" width="50"></el-table-column>
<el-table-column prop="orgName" label="组织机构名称" align="center"/>
<el-table-column prop="name" label="装备包名称" align="center"/>
<el-table-column label="操作" width="150" align="center" fixed="right">
......
......@@ -102,8 +102,9 @@
<el-table-column prop="insideRealCount" align="center" label="已归还数量"/>
<el-table-column prop="state" label="出入库状态" align="center">
<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-else type="warning">未完成</el-tag>
<el-tag v-if="scope.row.state === 2" type="success">已完成</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>
</el-table-column>
</el-table>
......
......@@ -40,14 +40,14 @@
</div>
</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 label="订单编号" :show-overflow-tooltip="true" align="center" v-if="actionState!=13" width="200">
<template slot-scope="scope">
<el-link type="primary" @click="showOrder(scope.row)">{{ scope.row.order }}</el-link>
</template>
</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="sizeName" label="装备型号名称" align="center"/>
<el-table-column prop="policeName" label="操作人员" align="center"/>
......@@ -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 === 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 === 20 || scope.row.actionState === 21" type="success">出警任务</el-tag>
</template>
</el-table-column>
<el-table-column label="安全等级" align="center" width="150px">
......@@ -97,6 +98,7 @@
@current-change="postPageChange"/>
<!--表单组件-->
<equ-info-detail ref="equInfoDetail"/>
<bag-info-detail ref="bagInfoDetail"/>
<borrow-detail ref="p2"/>
<receive-detail ref='p3'/>
......@@ -118,7 +120,8 @@ import initData from '@/mixins/initData'
import { parseTimes } from '@/utils/index'
import { mapGetters } from 'vuex'
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 md5 from 'js-md5'
import BorrowDetail from '@/views/warehouse/borrow/list/form'
......@@ -134,7 +137,7 @@ export default {
name: 'WarehouseLog',
mixins: [initData],
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() {
return {
loading: false,
......@@ -213,7 +216,7 @@ export default {
},
beforeInit() {
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 date = this.date
const equipmentName = this.equipmentName
......@@ -239,6 +242,19 @@ export default {
this.dialogVisible = true
},
show(data) {
if (data.bagInventoryId) {
const _this = this.$refs.bagInfoDetail
getBagInfoByID({id: data.bagInventoryId}).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
} else {
const _this = this.$refs.equInfoDetail
getInfoByID({id: data.equipmentId}).then(res => {
if(res.code == '10000') {
......@@ -250,6 +266,7 @@ export default {
}
})
_this.dialog = true
}
},
showOrder(data) {
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>
<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">
<span slot="label"><i class="el-icon-document"></i>&nbsp;领用信息</span>
<el-collapse v-model="collapseNum">
<el-collapse-item name="1">
<template slot="title"> <el-tag>第一步: 选择仓库 (必选)</el-tag></template>
<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-select>
</el-form-item>
<el-form-item>
<el-input v-model="form.policeNote" style="width: 240px;"
placeholder="请填写领用人名称"/>
<el-input v-model="form.name" style="width: 240px;" placeholder="请填写任务名称" :disabled="disabled"/>
</el-form-item>
</el-collapse-item>
<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-col :span="7">
<el-form-item>
<el-select v-model="equipmentDetailId" clearable filterable placeholder="请选择装备"
@change="getInventoryCount" @focus="getAllInventoryList" :filter-method="dataFilter"
style="width: 240px;" >
<el-select v-model="modelId" clearable filterable placeholder="请选择模块" style="width: 240px;" >
<el-option
v-for="item in equipmentList"
:key="item.equipmentDetailId"
:label="item.equipmentDetailName"
:value="item.equipmentDetailId">
v-for="item in modelList"
:key="item.id"
:label="item.name"
:value="item.id">
</el-option>
</el-select>
</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>
<template slot-scope="scope">
<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-button size="mini" type="success" round plain icon="el-icon-plus" style="width:240px" @click="handleAdd()" :disabled="disabled">添加模块</el-button>
</el-form-item>
</el-col>
<el-col :span="17">
<el-table :data="form.detailList" class="form-table" border>
<el-table-column type="index" label="序号" 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="装备数量">
<el-table :data="form.modelList" class="form-table" border>
<el-table-column type="expand" align="center" width="50">
<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>
<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 prop="name" align="center" label="模块名称" />
<el-table-column align="center" label="操作">
<template slot-scope="scope">
<el-button
size="mini"
type="danger"
round plain
icon="el-icon-delete"
@click="handleDelete(scope.$index, scope.row)">
删除
</el-button>
<el-button size="mini" type="danger" round plain icon="el-icon-delete" @click="handleDelete(scope.$index, scope.row)" :disabled="disabled">删除</el-button>
</template>
</el-table-column>
</el-table>
......@@ -81,22 +62,21 @@
@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;"
@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-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>
<div slot="footer" class="dialog-footer">
<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>
</el-dialog>
</template>
<script>
import { getListOrgWarehouse } from '@/api/warehouse'
import { addAndApprovalBorrowOrder } from '@/api/borrow'
import { getAllInventoryList } from '@/api/inventory'
import { getPageModel,addOrUpdateMission } from '@/api/bag'
import { deleteTxt, addTxt, getListTxt } from '@/api/policeman'
import cnchar from "cnchar";
export default {
......@@ -108,21 +88,21 @@ export default {
},
data() {
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:[],
sizeCount : null,
visible: false,
collapseNum: ['1', '2'],
orgizationId:this.$store.state.user.user.baseJpOrganization.id,
orgId: this.$store.state.user.user.baseJpOrganization.id,
form: {
id: '',
warehouseId : '',
orgId : this.$store.state.user.user.baseJpOrganization.id,
orgCode : this.$store.state.user.user.baseJpOrganization.code.substring(0,6),
note : '',
applyId: this.$store.state.user.user.id,
applyName: this.$store.state.user.user.nickName,
detailList: [],
name : '',
modelList: [],
note: ''
},
processForm: {},
rules: {
......@@ -132,47 +112,28 @@ export default {
},
texts: [],
inputVisible: false,
disabled: false,
inputValue: ''
}
},
methods: {
// 添加行
handleAdd() {
if(this.equipmentName == null || this.equipmentName == undefined){
this.$message({
message: '请选择装备',
type: 'warning'
})
}else{
var iseEquipmentAdd = false;
for(var i=0;i<this.form.detailList.length;i++){
if(this.form.detailList[i].equipmentDetailId === this.equipmentDetailId){
iseEquipmentAdd = true;
break;
}
}
if(iseEquipmentAdd){
this.$message({
message: '此装备已添加过',
type: 'warning'
})
} else {
let obj = this.modelList.find(i => i.id == this.modelId)
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)
modelId: obj.id,
name: obj.name,
modelList: obj.modelList
}
var res = this.form.modelList.find(i => i.modelId == row.modelId)
if (res) {
return this.$message.warning('该模块已添加')
}
this.form.modelList.push(row)
},
// 删除行
handleDelete(index, row) {
this.form.detailList.splice(index, 1)
this.form.modelList.splice(index, 1)
},
cancel() {
this.resetForm()
......@@ -180,9 +141,9 @@ export default {
doSubmit() {
this.$refs['form'].validate((valid) => {
if (valid) {
if (this.form.detailList.length < 1) {
if (this.form.modelList.length < 1) {
this.$message({
message: '请至少添加一件装备',
message: '请至少添加一个模块',
type: 'warning'
})
} else {
......@@ -193,8 +154,11 @@ export default {
})
},
doThing() {
console.log(this.form)
addAndApprovalBorrowOrder(this.form).then(res => {
if (!this.form.name) {
this.loading = false
return this.$message.warning('任务名称不能为空')
}
addOrUpdateMission(this.form).then(res => {
if(res.code === "10000"){
this.resetForm()
this.$notify({
......@@ -203,7 +167,7 @@ export default {
duration: 2500
})
this.loading = false
this.$parent.initPost()
this.$emit('ok')
}else{
this.$message.error(res.msg)
this.loading = false
......@@ -219,69 +183,26 @@ export default {
id: '',
warehouseId : '',
orgId : this.$store.state.user.user.baseJpOrganization.id,
orgCode : this.$store.state.user.user.baseJpOrganization.code.substring(0,6),
note : '',
applyId: this.$store.state.user.user.id,
applyName: this.$store.state.user.user.nickName,
detailList: []
name : '',
modelList: [],
note: ''
}
},
//获取仓库列表
getListOrgWarehouse(isAdd) {
getListOrgWarehouse({ orgizationId: this.$store.state.user.user.baseJpOrganization.id }).then(res => {
this.warehouseList = res.data
if (this.warehouseList.length == 1 && isAdd) { this.form.warehouseId = res.data[0].id }
this.getAllInventoryList()
})
getListTxt({username: this.$store.state.user.user.username, type: "领用申请" }).then(res => {
getListOrgWarehouse(isAdd, warehouseList, warehouseId) {
this.warehouseList = warehouseList
this.form.warehouseId = warehouseId
this.getModelList()
getListTxt({username: this.$store.state.user.user.username, type: "出警任务" }).then(res => {
this.texts = res.data
})
},
//获取装备库存
getAllInventoryList() {
this.equipmentList = []
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;
getModelList() {
getPageModel({page: 0, size: 40, orgId: this.orgId}).then(res => {
this.modelList = res.data.content
})
},
handleClose(tag) {
this.texts.splice(this.texts.indexOf(tag), 1)
deleteTxt({id: tag.id})
......@@ -295,9 +216,9 @@ export default {
handleInputConfirm() {
let inputValue = this.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') {
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
})
}
......
......@@ -4,8 +4,7 @@
<div style="margin-left:20px">
<!-- 搜索栏开始 -->
<div class="head-container">
<el-select v-model="query.warehouseId" placeholder="请选择仓库" clearable style="width: 240px;padding-bottom: 10px;display: inline-block;vertical-align: middle;"
@change="toPostQuery">
<el-select v-model="warehouseId" placeholder="请选择仓库" clearable style="width: 240px;padding-bottom: 10px;display: inline-block;vertical-align: middle;" @change="toPostQuery">
<el-option
v-for="item in warehouseList"
:key="item.name"
......@@ -13,44 +12,53 @@
:value="item.id">
</el-option>
</el-select>
<el-date-picker
v-model="query.date"
type="daterange"
range-separator=":"
class="filter-item"
style="width: 260px"
value-format="yyyy-MM-dd"
start-placeholder="开始日期"
end-placeholder="结束日期"/>
<el-input v-model="query.name" placeholder="请输入任务名称" class="filter-item" style="width: 260px"/>
<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>
</div>
<!--表单组件-->
<apply-form ref="applyForm" :is-add="isAdd" />
<!-- <list-form ref="listForm" /> -->
<apply-form ref="applyForm" :is-add="isAdd" @ok="initPost()"/>
<task-info ref="taskInfo" />
<!--表格开始-->
<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 prop="orderCode" label="领用单号" align="center"/>
<el-table-column prop="warehouseName" label="目标仓库" align="center"/>
<el-table-column prop="applyName" 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">
<el-table-column prop="warehouseName" label="任务仓库" align="center"/>
<el-table-column prop="name" label="任务名称" align="center"/>
<el-table-column prop="state" label="单据状态" align="center">
<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-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"
placement="top"
width="180">
<p>确定删除本条数据吗?</p>
<p>确定结束该任务吗?</p>
<div style="text-align: right; margin: 0">
<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>
<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-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>
</el-table-column>
</el-table>
......@@ -69,83 +77,98 @@
<script>
import initData from '@/mixins/initData'
import applyForm from './form'
// import listForm from '../apply/detailForm'
import { deleteOrder, getByID } from '@/api/borrow'
import taskInfo from './taskInfo'
import { getListOrgWarehouse } from '@/api/warehouse'
import { changeWorkState } from '@/api/bag'
export default {
name: 'ReceiveCommon',
mixins: [initData],
props: ['warehouseList'],
components: { applyForm },
components: { applyForm, taskInfo },
data() {
return {
loading: false,
delLoading: false,
warehouseList: [],
warehouseId: ''
}
},
created() {
this.query.orderId = this.$route.query.orderId
this.$nextTick(() => {
this.initWarehouseList()
})
},
methods: {
tabChange() {
this.query = {}
this.$nextTick(() => {
initWarehouseList() {
getListOrgWarehouse({ orgizationId: this.$store.state.user.user.baseJpOrganization.id }).then(res => {
this.warehouseList = res.data
this.warehouseId = this.warehouseList[0].id
this.initPost()
})
},
beforeInit() {
this.url = window._CONFIG['serviceURL'] + '/api/Borrow/GetAllBorrowOrderList'
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 }
const warehouseId = this.query.warehouseId // 仓库
const date = this.query.date // 日期
this.url = window._CONFIG['serviceURL'] + '/api/Mission/GetPageMission'
this.params = { page: this.page, size: this.size, orgId: this.$store.state.user.user.baseJpOrganization.id }
const warehouseId = this.warehouseId // 仓库
const name = this.query.name // 日期
if (warehouseId !== '' && warehouseId !== null) { this.params['warehouseId'] = warehouseId }
if (date) {
this.params['startTime'] = date[0]
this.params['endTime'] = date[1]
if (name) {
this.params['name'] = name
}
return true
},
add() {
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
},
edit(data) {
this.isAdd = false
const _this = this.$refs.applyForm
_this.getListOrgWarehouse(this.isAdd)
_this.disabled = false
_this.getListOrgWarehouse(this.isAdd, this.warehouseList, this.warehouseId)
_this.form = {
id: data.id,
applyId: data.applyId,
applyName: data.applyName,
detailList: data.detailList,
orgCode: data.orgCode,
name: data.name,
orgId: data.orgId,
warehouseId: data.warehouseId,
note: data.note
modelList: data.missionChild
}
_this.dialog = true
},
show(data) {
const _this = this.$refs.listForm
getByID({id: data.id}).then(res => {
const _this = this.$refs.taskInfo
_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') {
_this.form = res.data
_this.getSteps()
this.$message.success('操作成功')
this.initPost()
} else {
this.$message.error(res.msg)
}
})
_this.dialog = true
},
subDelete(id) {
endTask(data) {
this.delLoading = true
deleteOrder({id: id}).then(res => {
changeWorkState({"missionId":data.id, state: 2}).then(res => {
if(res.code ==='10000') {
this.$refs[id].doClose()
this.dleChangePage()
this.$refs[data.id].doClose()
this.initPost()
this.$notify({
title: '删除成功',
title: '结束成功',
type: 'success',
duration: 2500
})
......@@ -155,7 +178,7 @@ export default {
this.delLoading = false
}).catch(err => {
this.delLoading = false
this.$refs[id].doClose()
this.$refs[data.id].doClose()
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 @@
<el-table-column prop="insideRealCount" align="center" label="已入库数量"/>
<el-table-column prop="state" label="出入库状态" align="center">
<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-else-if="scope.row.quantity == scope.row.realCount" type="primary">进行中</el-tag>
<el-tag v-else type="warning">未完成</el-tag>
<el-tag v-if="scope.row.state === 2" type="success">已完成</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>
</el-table-column>
</el-table>
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论