Commit 4ad2494c by T

快速出库、装备统计报表新需求及其它bug修复

parent 2dec3035
File deleted
...@@ -36,11 +36,14 @@ ...@@ -36,11 +36,14 @@
"lodash": "^4.17.21", "lodash": "^4.17.21",
"mavon-editor": "^2.7.0", "mavon-editor": "^2.7.0",
"moment": "^2.25.3", "moment": "^2.25.3",
"mux.js": "^6.3.0",
"normalize.css": "7.0.0", "normalize.css": "7.0.0",
"nprogress": "0.2.0", "nprogress": "0.2.0",
"path-to-regexp": "2.4.0", "path-to-regexp": "2.4.0",
"screenfull": "3.3.3", "screenfull": "3.3.3",
"vbt-table": "^1.0.5", "vbt-table": "^1.0.5",
"video.js": "^8.0.4",
"videojs-contrib-hls": "^5.15.0",
"viser-vue": "^2.4.8", "viser-vue": "^2.4.8",
"vue-count-to": "1.0.13", "vue-count-to": "1.0.13",
"vue-native-websocket": "^2.0.14", "vue-native-websocket": "^2.0.14",
...@@ -100,8 +103,8 @@ ...@@ -100,8 +103,8 @@
"url-loader": "1.0.1", "url-loader": "1.0.1",
"vue": "^2.6.14", "vue": "^2.6.14",
"vue-loader": "^15.9.7", "vue-loader": "^15.9.7",
"vue-template-compiler": "^2.6.14",
"vue-style-loader": "4.1.2", "vue-style-loader": "4.1.2",
"vue-template-compiler": "^2.6.14",
"webpack": "^4.41.2", "webpack": "^4.41.2",
"webpack-bundle-analyzer": "^3.6.0", "webpack-bundle-analyzer": "^3.6.0",
"webpack-cli": "^3.3.9", "webpack-cli": "^3.3.9",
......
...@@ -54,6 +54,15 @@ export function getAllFixs(data) { ...@@ -54,6 +54,15 @@ export function getAllFixs(data) {
data: transform(data) data: transform(data)
}) })
} }
//快速出库单据创建(借用,领用,报废)
export function quickAddOut(data) {
return request({
url: window._CONFIG['serviceURL'] + '/api/QuickOrder/QuickAddOrder',
method: 'post',
data: transform(data)
})
}
// 查看维修报废明细 // 查看维修报废明细
export function getByID(data) { export function getByID(data) {
......
...@@ -23,9 +23,13 @@ import '@/assets/fonts/screen/iconfont.css' ...@@ -23,9 +23,13 @@ import '@/assets/fonts/screen/iconfont.css'
import Viser from 'viser-vue' import Viser from 'viser-vue'
//import "video.js/dist/video-js.css"; // 引入video.js的css
//import hls from "videojs-contrib-hls"; // 播放hls流需要的插件
window.eventBus = new Vue(); window.eventBus = new Vue();
//Vue.use(hls)
Vue.use(Viser) Vue.use(Viser)
Vue.use(mavonEditor) Vue.use(mavonEditor)
Vue.use(permission) Vue.use(permission)
......
...@@ -85,6 +85,19 @@ export const constantRouterMap = [ ...@@ -85,6 +85,19 @@ export const constantRouterMap = [
meta: { title: '库房监控', icon: 'user' } meta: { title: '库房监控', icon: 'user' }
} }
] ]
},
{
path: '/videoHstory',
hidden: true,
component: Layout,
children: [
{
path: 'list',
component: () => import('@/views/base/houseBaseInfo/videoHstory'),
name: '库房监控视频记录',
meta: { title: '库房监控视频记录', icon: 'user' }
}
]
} }
// { path: '*', redirect: '/404', hidden: true } // { path: '*', redirect: '/404', hidden: true }
] ]
......
...@@ -137,8 +137,9 @@ ...@@ -137,8 +137,9 @@
</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" style="margin-top:-10px;"><el-button type="primary" size="small" <td class="textContent" style="margin-top:-10px;">
@click="setHumidity" style="margin-top:-10px;margin-bottom:-10px;">设置</el-button></td> <el-button type="primary" size="small" @click="setHumidity" style="margin-top:-10px;margin-bottom:-10px;">设置</el-button>
</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
...@@ -420,11 +421,13 @@ export default { ...@@ -420,11 +421,13 @@ export default {
radioChange(value) { radioChange(value) {
if (value == '库存状态') { if (value == '库存状态') {
this.dataSource = this.pieList.tjList this.dataSource = this.pieList.tjList
this.guideOpts.content = '装备总数'
} }
if (value == '装备库存') { if (value == '装备库存') {
this.dataSource = this.pieList.typeList this.dataSource = this.pieList.typeList
this.guideOpts.content = '在库总数'
} }
this.guideOpts.content = '装备总数' //this.guideOpts.content = '装备总数'
this.guideOpts1.content = this.dataSource.map(item => item.count).reduce((total, num) => total + num) this.guideOpts1.content = this.dataSource.map(item => item.count).reduce((total, num) => total + num)
}, },
humidityChange() { humidityChange() {
......
...@@ -103,11 +103,13 @@ export default { ...@@ -103,11 +103,13 @@ export default {
radioChange(value) { radioChange(value) {
if (value == '库存状态') { if (value == '库存状态') {
this.dataSource = this.pieList.tjList this.dataSource = this.pieList.tjList
this.guideOpts.content = '装备总数'
} }
if (value == '装备库存') { if (value == '装备库存') {
this.dataSource = this.pieList.typeList this.dataSource = this.pieList.typeList
this.guideOpts.content = '在库总数'
} }
this.guideOpts.content = '装备总数' //this.guideOpts.content = '装备总数'
this.guideOpts1.content = this.dataSource.map(item => item.count).reduce((total, num) => total + num) this.guideOpts1.content = this.dataSource.map(item => item.count).reduce((total, num) => total + num)
}, },
itemTplLegend: function itemTpl(value, color, checked, index) { itemTplLegend: function itemTpl(value, color, checked, index) {
......
...@@ -4,51 +4,59 @@ ...@@ -4,51 +4,59 @@
<span>快速开始 / 便捷导航</span> <span>快速开始 / 便捷导航</span>
</div> </div>
<div class="item-group"> <div class="item-group">
<el-row> <el-row >
<el-col :span="8"> <el-col :span="8">
<el-badge :value="cqwhCount"><el-button type="text" style="font-size: 15px;" @click="$router.push('/notice/index?type=1&processType=overtime')">超期提醒</el-button></el-badge> <el-badge :value="cqwhCount"><el-button type="text" style="font-size: 15px; " @click="$router.push('/notice/index?type=1&processType=overtime')">超期提醒</el-button></el-badge>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-badge :value="ycqCount" ><el-button type="text" style="font-size: 15px;" @click="$router.push('/notice/index?type=1&processType=scrapwarn')">报废提醒</el-button></el-badge> <el-badge :value="ycqCount" ><el-button type="text" style="font-size: 15px; " @click="$router.push('/notice/index?type=1&processType=scrapwarn')">报废提醒</el-button></el-badge>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-button type="text" style=" font-size: 15px;" @click="$router.push('/houseBaseInfo/index')">仓库管理</el-button> <el-button type="text" style="font-size: 15px; " @click="$router.push('/houseBaseInfo/index')">仓库管理</el-button>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-button type="text" style=" font-size: 15px;" @click="$router.push('/warehouse/inAndOut')">出入库记录</el-button> <el-button type="text" style="font-size: 15px; " @click="$router.push('/warehouse/maintenance')">装备维护</el-button>
</el-col>
<el-col :span="8">
<el-button type="text" style="font-size: 15px; " @click="$router.push('/warehouse/sysPanKu')">盘库列表</el-button>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-button type="text" style=" font-size: 15px;" @click="$router.push('/warehouse/stock')">本库装备列表</el-button> <el-button type="text" style="font-size: 15px;" @click="$router.push('/warehouse/threshold')">库存阈值</el-button>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-button type="text" style=" font-size: 15px;" @click="$router.push('/warehouse/maintenance')">装备维护</el-button> <el-button v-if="$store.state.user.user.roleIds.includes(2)" type="text" style="font-size: 15px; " @click="qoApply()">快速出库</el-button>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-button type="text" style=" font-size: 15px;" @click="$router.push('/warehouse/sysPanKu')">盘库列表</el-button> <el-button type="text" style="font-size: 15px; " @click="$router.push('/warehouse/inAndOut')">出入库记录</el-button>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-button type="text" style=" font-size: 15px;" @click="$router.push('/warehouse/threshold')">库存阈值</el-button> <el-button type="text" style="font-size: 15px; " @click="$router.push('/warehouse/stock')">本库装备列表</el-button>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-button v-if="$store.state.user.user.roleIds.includes(3)" type="text" style=" font-size: 15px;" @click="$router.push('/data/reportForm')">类型统计报表</el-button> <el-button v-if="$store.state.user.user.roleIds.includes(3)" type="text" style="font-size: 15px; " @click="$router.push('/data/reportForm')">类型统计报表</el-button>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-button v-if="$store.state.user.user.roleIds.includes(3)" type="text" style=" font-size: 15px;" @click="$router.push('/data/finance')">财务统计报表</el-button> <el-button v-if="$store.state.user.user.roleIds.includes(3)" type="text" style="font-size: 15px; " @click="$router.push('/data/finance')">财务统计报表</el-button>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-button v-if="$store.state.user.user.roleIds.includes(3)" type="text" style=" font-size: 15px;" @click="$router.push('/data/usingReport')">使用统计报表</el-button> <el-button v-if="$store.state.user.user.roleIds.includes(3)" type="text" style="font-size: 15px; " @click="$router.push('/data/usingReport')">使用统计报表</el-button>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-button v-if="$store.state.user.user.roleIds.includes(3)" type="text" style=" font-size: 15px;" @click="$router.push('/data/inventorySupEquiReport')">供应商装备报表</el-button> <el-button v-if="$store.state.user.user.roleIds.includes(3)" type="text" style="font-size: 15px; " @click="$router.push('/data/inventorySupEquiReport')">供应商装备报表</el-button>
</el-col> </el-col>
</el-row> </el-row>
</div> </div>
<!--表单组件-->
<apply-form ref="applyForm" @ok="handleRefresh"/>
</el-card> </el-card>
</template> </template>
<script> <script>
import { getCountOrg } from '@/api/view' import { getCountOrg } from '@/api/view'
import applyForm from './addQoAppy'
export default { export default {
components: { applyForm },
data() { data() {
return { return {
cqwhCount: 0, cqwhCount: 0,
...@@ -69,7 +77,18 @@ export default { ...@@ -69,7 +77,18 @@ export default {
this.$message.error(res.msg) this.$message.error(res.msg)
} }
}) })
} },
qoApply(){
// this.isAdd = true
this.$refs.applyForm.getListOrgWarehouse()
this.$refs.applyForm.getPolicemans()
this.$refs.applyForm.dialog = true
this.$refs.applyForm.form.qoOutTpyId= '0'
this.$refs.applyForm.getProcess('borrowMy')
},
handleRefresh(){
},
} }
} }
</script> </script>
......
<template>
<el-dialog :append-to-body="true" :close-on-click-modal="false" :before-close="cancel" :visible.sync="dialog" title="新增快速出库" width="1200px">
<el-form ref="form" :model="form" :rules="rules" size="small" label-width="40px">
<el-tabs tab-position="left">
<el-tab-pane style="margin-left: 20px">
<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>
<div style="display: flex; align-items: center; margin-top:10px;">
<el-form-item prop="warehouseId">
<el-select v-model="form.warehouseId" style="width:240px" filterable placeholder="请选择目标仓库" :disabled="form.detailList.length > 0">
<el-option
v-for="item in warehouseList"
:key="item.name"
:label="item.name"
:value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item prop="qoOutTpyId">
<el-select v-model="form.qoOutTpyId" @change="handleChange" style="width:240px" filterable placeholder="请选择出库类型" >
<el-option
v-for="item in qoOutTpyList"
:key="item.name"
:label="item.name"
:value="item.id"
>
</el-option>
</el-select>
</el-form-item>
</div>
<div style="display: flex; align-items: center;">
<el-form-item prop="expectedTime" v-if="form.qoOutTpyId =='0'">
<el-date-picker type="date" v-model="form.expectedTime" placeholder="请选择归还日期" value-format="yyyy-MM-dd" style="width: 240px;"
:default-value="new Date() - 8.64e7" :picker-options="pickerOptions"/>
</el-form-item>
<el-form-item v-if="form.qoOutTpyId=='0'||form.qoOutTpyId=='1'">
<el-select v-model="form.policeNote" style="width: 240px;" filterable placeholder="请选择人员">
<el-option
v-for="item in policeList"
:key="item.name"
:label="item.name"
:value="item.name">
</el-option>
</el-select>
</el-form-item>
</div>
</el-collapse-item>
<el-collapse-item name="2">
<template slot="title"> <el-tag>第二步: 读取装备 (必选)</el-tag></template>
<el-table :data="form.detailList" class="form-table" border>
<el-table-column >
<template slot="header" slot-scope="scope">
<el-button type="primary" @click="readEpcs" :loading="readloading" style="width: 240px">读取装备</el-button>
<el-input v-model="eqEpc" style="width: 675px" placeholder="请输入Epc..."/>
<el-button type="warning" @click="epcAdd">添加</el-button>
</template>
<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="supplierName" 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>
</template>
</el-table-column>
</el-table-column>
</el-table>
</el-collapse-item>
</el-collapse>
<el-tag :key="tag.id" v-for="tag in texts" closable @close="handleClose(tag)" style="margin-top:15px;cursor:pointer;margin-left: 6px;"
@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-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-form-item>
</el-tab-pane>
<el-tab-pane 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-steps :active="0" finish-status="wait" process-status="success" align-center>
<el-step v-for="(step, index) in steps" :key="index" :title="step"/>
</el-steps>
</el-card>
<el-card style="margin-bottom: 15px">
<div slot="header" class="clearfix">
<span>审核详情</span>
</div>
<el-table :data="form.historyList" style="width: 100%" border>
<el-table-column type="index" label="序号" align="center" width="50"/>
<el-table-column prop="stepName" align="center" label="步骤名称"/>
<el-table-column prop="auditUserName" align="center" label="审核人"/>
<el-table-column prop="updateTime" align="center" label="操作时间"/>
<el-table-column prop="auditMind" align="center" :show-overflow-tooltip="true" label="审核意见" />
</el-table>
</el-card>
</el-tab-pane>
</el-tabs>
</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>
</div>
</el-dialog>
</template>
<script>
import { quickAddOut,getWzByEpc } from '@/api/fixReceiveApply'
import {getListOrgWarehouse } from '@/api/warehouse'
import { getProcess, getAllProcess } from '@/api/process'
import { deleteTxt, addTxt, getListTxt, getPagePoliceman } from '@/api/policeman'
export default {
data() {
return {
loading: false,
readloading: false,
websock: null,
dialog: false, warehouseList: [], warehouseId: null,
qoOutTpy:[],policeList: [],
detailList: [],epsList : [],
visible: false,
collapseNum: ['1', '2'], steps: [], epc: '', eqEpc: '',
orgizationId: this.$store.state.user.user.baseJpOrganization.id,
qoOutTpyList:[
{
id: '0',
name: '借用出库'
}, {
id: '1',
name: '领用出库'
}, {
id: '2',
name: '报废出库'
}
],
form: {
id: '',
action: '',
warehouseId : '',
qoOutTpyId:'',
expectedTime:'',
policeNote:'',
policeNote:'',
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: [],
currentStepName: '',
dataScope: '',
flowId: '',
flowName: '',
flowState: '',
flowType: '',
nextStepId: '',
orgId: '',
userInfo: '',
userType: ''
},
processForm: {},
rules: {
warehouseId: [
{ required: true, message: '请选择仓库', trigger: 'change' }
],
qoOutTpyId:[
{ required: true, message: '请选择出库类型', trigger: 'change' }
]
},
// 设置只能选择当前日期及之后的日期
pickerOptions: {
disabledDate(time) {
return time.getTime() < Date.now() - 8.64e7 + 1*24*3600*1000;//如果没有后面的-8.64e7就是不可以选择今天的
}
},
texts: [],
inputVisible: false,
inputValue: ''
}
},
mounted() {
// 获取URL中的参数,并赋值给form.qoOutTpyId
//this.form.qoOutTpyId = this.$route.query.qoOutTpyId
//console.log('000'+this.$route.query.qoOutTpyId)
},
methods: {
//获取仓库列表
getListOrgWarehouse() {
getListOrgWarehouse({ orgizationId: this.$store.state.user.user.baseJpOrganization.id }).then(res => {
this.warehouseList = res.data
if ( this.warehouseList.length != 0) { this.form.warehouseId = res.data[0].id }
})
},
getPolicemans() {
getPagePoliceman({page:0,size:999,orgizationCode:this.$store.state.user.user.baseJpOrganization.id,level:'本级'}).then(res => {
if(res.code == '10000') {
this.policeList = res.data.content
} else {
this.$message.error(res.msg)
}
})
},
//切换出库类型,对应流程也跟着变化
handleChange(){
console.log(this.form.qoOutTpyId);
if(this.form.qoOutTpyId==0){
this.form.flowType='borrowMy'
this.getProcess('borrowMy')
}
if(this.form.qoOutTpyId==1){
this.form.flowType='collect'
this.getProcess('collect')
}
if(this.form.qoOutTpyId==2){
this.form.flowType='scrap'
this.getProcess('scrap')
}
this.form.expectedTime='';
this.form.policeId='';
},
readEpcs() {
if (this.form.warehouseId == '' || this.form.warehouseId == undefined) {
this.$message.warning('请先选择仓库')
return
}
this.readloading = true
this.websock = new WebSocket('ws://127.0.0.1:8081');
this.websock.onopen = this.websocketOnopen;
this.websock.onerror = this.websocketOnerror;
this.websock.onmessage = this.websocketOnmessage;
this.websock.onclose = this.websocketOnclose;
},
websocketOnopen(e) {
console.log('WebSocket连接建立');
this.websock.send(JSON.stringify({CmdType:0,Content:""}))
},
websocketOnerror: function (e) {
console.log("WebSocket连接发生错误");
},
websocketOnmessage: function (e) {
var backMessObj = JSON.parse(e.data);
if(backMessObj.CmdType == 2) {
getWzByEpc({epc : backMessObj.Content}).then(res => {
if (res.code === "10000") {
if (!this.epsList.includes(backMessObj.Content)) {
if (res.data.warehouseId == this.form.warehouseId) {
this.epsList.push(backMessObj.Content)
this.handleAdd(res.data)
}
}
}
})
} else if(![0,1,2,5].includes(backMessObj.CmdType)) {
this.$message.error(backMessObj.Content)
}
setTimeout(() => {
this.websock.close()
this.readloading = false
}, 1000)
},
websocketOnclose: function (e) {
console.log("connection closed (" + e + ")");
},
// 添加行
handleAdd(data) {
//判断此epc装备数据是否已经添加过
var isHere = false
for(var i=0;i<this.form.detailList.length;i++){
if(this.form.detailList[i].epc === data.epc){
isHere = true
break
}
}
if(!isHere){
let row = {
equipmentName : data.equipmentName,
equipmentSizeName : data.equipmentSizeName,
equipmentId : data.equipmentId,
equipmentSizeId : data.equipmentSizeId,
supplierId : data.supplierId,
supplierName : data.supplierName,
warehouseName : data.warehouseName,
warehouseId : data.warehouseId,
epc : data.epc,
quantity : 1,
note : ""
}
this.form.detailList.push(row)
}
},
epcAdd() {
if (this.form.warehouseId == '' || this.form.warehouseId == undefined) {
this.$message.warning('请选择仓库')
return
}
if (this.eqEpc) {
getWzByEpc({epc : this.eqEpc}).then(res => {
if(res.code === "10000"){
if (!this.epsList.includes(this.eqEpc)) {
if (res.data.warehouseId == this.form.warehouseId) {
this.epsList.push(this.eqEpc)
this.handleAdd(res.data)
}
}
} else {
this.$message.warning(res.msg)
}
})
}
},
// 删除行
handleDelete(index, row) {
this.epsList.splice(this.epsList.findIndex(item => item.epc === row.epc), 1)
this.form.detailList.splice(index, 1)
},
cancel() {
this.resetForm()
},
doSubmit() {
this.form.orgCode = this.$store.state.user.user.baseJpOrganization.code.substring(0,6)
this.form.orgId = this.$store.state.user.user.baseJpOrganization.id,
this.form.action = this.form.qoOutTpyId
this.$refs['form'].validate((valid) => {
if (valid) {
if (this.form.detailList.length>0) {
this.loading = true
this.handleConfirm()
} else {
this.$message.warning('请添加装备')
}
}
})
},
handleConfirm() {
let form = { ...this.form, ...this.processForm }
quickAddOut(form).then(res => {
if(res.code === "10000"){
this.resetForm()
this.$notify({
title: '操作成功',
type: 'success',
duration: 2500
})
this.loading = false
this.$emit('ok')
}else{
this.$message.error(res.msg)
this.loading = false
}
})
},
async temporarySave() {
const _this = this
this.processForm = {
detailList: _this.form.detailList,
action: 0,
orgId : _this.$store.state.user.user.baseJpOrganization.id,
applyId: _this.$store.state.user.user.id,
orgCode : this.$store.state.user.user.baseJpOrganization.code.substring(0,6),
flowType: _this.processForm.flowType,
flowState : false,
approvalMsg : _this.form.note,
warehouseId: _this.form.warehouseId,
flowName: _this.processForm.flowName,
userType: '',
userInfo: '',
dataScope: '',
nextStepId: '',
currentStepName: _this.processForm.flowName,
auditUser: _this.$store.state.user.user.id,
auditUserName: _this.$store.state.user.user.nickName
}
let form = { ...this.form, ...this.processForm }
if (form.detailList.length < 1) {
this.$message.warning('请至少添加一件装备')
return
}
await addOrUpdateFixed(form).then(res => {
if (res.code === "10000") {
this.$notify({
title: '暂存成功',
type: 'success',
duration: 2500
})
this.resetForm()
_this.$parent.initPost()
} else {
this.$notify({
title: res.msg,
type: 'danger',
duration: 2500
})
}
})
},
resetForm() {
this.dialog = false
this.$refs['form'].resetFields()
this.epsList = []
this.form = {
id: "",
applyReason : "",
orgId : this.$store.state.user.user.baseJpOrganization.id,
orgCode : this.$store.state.user.user.baseJpOrganization.code.substring(0,6),
applyId : this.$store.state.user.user.id,
applyName : this.$store.state.user.user.nickName,
approvalId : '',
approvalName : '',
note: "",
warehouseId : "",
detailList: [],
approvalResult : 0,
supplierId : ''
}
},
getProcess(data) {
//console.log('5888'+data)
const params = {
// code: "repair",
code: data,
orgId: this.$store.state.user.user.baseJpOrganization.id,
stepId: data || "",
flowGateway: ""
}
getProcess(params).then(res => {
if(res.code === "10000") {
this.processForm = {
currentStepName: res.data.currentStepName,
dataScope: res.data.dataScope,
flowId: res.data.flowId,
flowName: res.data.flowName,
flowState: res.data.flowState,
flowType: res.data.flowType,
nextStepId: res.data.nextStepId,
orgId: res.data.orgId,
userInfo: res.data.userInfo,
userType: res.data.userType
}
}
})
getAllProcess({ code: data, orgId: this.$store.state.user.user.baseJpOrganization.id }).then(res => {
this.steps = res.data
})
getListTxt({username: this.$store.state.user.user.username, type: "借用申请" }).then(res => {
this.texts = res.data
})
},
handleClose(tag) {
this.texts.splice(this.texts.indexOf(tag), 1)
deleteTxt({id: tag.id})
},
showInput() {
this.inputVisible = true;
this.$nextTick(_ => {
this.$refs.saveTagInput.$refs.input.focus();
});
},
handleInputConfirm() {
let inputValue = this.inputValue
if (inputValue != '') {
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 => {
this.texts = res.data
})
}
})
}
this.inputVisible = false;
this.inputValue = ''
},
}
}
</script>
<style lang="less" scoped>
/deep/ .el-input-number .el-input__inner {
text-align: left;
}
/deep/.el-card .el-card__header{
background:#ffffff;
color:#000000;
font-size: 16px;
}
.form-table{
/deep/&.el-table{
overflow: visible;
.el-table__body-wrapper{
overflow: visible;
.cell{
overflow: visible;
}
}
}
}
</style>
<template >
<router-view />
</template>
<template>
<div style="margin-left:20px">
<!-- 搜索栏开始 -->
<div class="head-container">
<el-popover placement="bottom-end" width="150" trigger="click">
<el-button class="filter-item" slot="reference" icon="el-icon-s-grid" style="float: right;"/>
<el-checkbox v-model="allColumnsSelected" :indeterminate="allColumnsSelectedIndeterminate" @change="handleCheckAllChange">全选</el-checkbox>
<el-checkbox
v-for="item in columns"
:key="item.label"
v-model="item.visible"
@change="handleCheckedTableColumnsChange(item)"
>
{{ item.label }}
</el-checkbox>
</el-popover>
<el-radio-group v-model="approveType" style="padding-bottom: 10px;" @change="toPostQuery">
<el-radio-button label="3">全部</el-radio-button>
<el-radio-button label="0">待审批</el-radio-button>
<el-radio-button label="1">已通过</el-radio-button>
<el-radio-button label="2">驳回、撤销</el-radio-button>
</el-radio-group>
<el-select v-model="query.warehouseId" placeholder="请选择仓库" clearable style="width: 240px;" class="filter-item" @change="toPostQuery">
<el-option
v-for="item in warehouseList"
:key="item.name"
:label="item.name"
: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-button class="filter-item" type="primary" icon="el-icon-search" @click="toPostQuery">搜索</el-button>
<el-button type="primary" icon="el-icon-plus" class="filter-item" style="float: right" v-if="activeName == 0" @click="add">出库申请</el-button>
</div>
<!--表单组件-->
<apply-form ref="applyForm" :is-add="isAdd" @ok="handleRefresh"/>
<list-form ref="listForm" />
<approval-form ref="approvalForm"/>
<!--表格开始-->
<el-table ref="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="出库单号" width="200px" align="center"/>
<el-table-column prop="warehouseName" label="目标仓库" align="center"/>
<el-table-column prop="applyName" label="申请人" width="120px" align="center"/>
<el-table-column prop="applyTime" label="申请时间" width="160px" align="center"/>
<el-table-column prop="updateTime" label="更新时间" width="160px" align="center"/>
<el-table-column prop="note" label="申请理由" :show-overflow-tooltip="true" align="center" />
<el-table-column prop="flowState" label="审批状态" align="center" width="120px">
<template slot-scope="scope">
<el-tag v-if="scope.row.flowState" type="success">已通过</el-tag>
<el-tag v-else-if="!scope.row.flowState && scope.row.userInfo !== ''" type="warning">待审批</el-tag>
<el-tag v-else-if="!scope.row.flowState && scope.row.actionResult === '0' && scope.row.nextStepId === ''" type="primary">暂存</el-tag>
<el-tag v-else-if="!scope.row.flowState && scope.row.actionResult === '0'" type="danger">撤销</el-tag>
<el-tag v-else-if="!scope.row.flowState && scope.row.userInfo === ''" type="danger">已驳回</el-tag>
</template>
</el-table-column>
<el-table-column prop="flowState" label="出库类型" align="center" width="120px">
<template slot-scope="scope">
<el-tag v-if="scope.row.flowState" type="success">已通过</el-tag>
<el-tag v-else-if="!scope.row.flowState && scope.row.userInfo !== ''" type="warning">待审批</el-tag>
<el-tag v-else-if="!scope.row.flowState && scope.row.actionResult === '0' && scope.row.nextStepId === ''" type="primary">暂存</el-tag>
<el-tag v-else-if="!scope.row.flowState && scope.row.actionResult === '0'" type="danger">撤销</el-tag>
<el-tag v-else-if="!scope.row.flowState && scope.row.userInfo === ''" type="danger">已驳回</el-tag>
</template>
</el-table-column>
<el-table-column label="操作" width="150" align="left" fixed="right">
<template slot-scope="scope">
<el-button size="mini" type="primary" key="1" @click="show(scope.row)" v-if="activeName != 1">查看</el-button>
<el-button size="mini" type="warning" key="2" @click="edit(scope.row)" v-if="!scope.row.flowState && scope.row.userInfo === '' && activeName == 0">编辑</el-button>
<el-button size="mini" type="warning" key="3" @click="approval(scope.row)" v-if="activeName == 1">审批</el-button>
<el-button size="mini" type="danger" key="4" :loading="loading" v-if="!scope.row.flowState && scope.row.userInfo !== '' && activeName == 0" @click="back(scope.row)">撤销</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, sizes"
@size-change="postSizeChange"
@current-change="postPageChange"/>
</div>
</template>
<script>
import initData from '@/mixins/initData'
import applyForm from '../qoApply/form'
import approvalForm from '../qoApproval/form'
import listForm from '../qoList/form'
import { getProcess } from '@/api/process'
import { approveOrder, getByID } from '@/api/fixReceiveApply'
export default {
name: 'RepairCommon',
mixins: [initData],
props: ['warehouseList', 'activeName'],
components: { applyForm, listForm, approvalForm },
data() {
return {
loading: false,
orderId: '',
approveType: '3',
urlList: [
'/api/FixReceiveApply/GetAllFixs',
'/api/Process/GetPageProcessList',
'/api/Process/GetPageHistoryProcessList'
],
jsonParams: [
{ action : 'repair', applyId: this.$store.state.user.user.id },
{ orgId: this.$store.state.user.user.baseJpOrganization.id, flowType: 'repair', userId: this.$store.state.user.user.id, roleIds: this.$store.state.user.user.roleIds },
{ orgId: this.$store.state.user.user.baseJpOrganization.id, flowType: "repair", userId: this.$store.state.user.user.id, roleIds: this.$store.state.user.user.roleIds }
]
}
},
created() {
this.orderId = this.$route.query.orderId
},
methods: {
tabChange() {
this.query = {}
this.$nextTick(() => {
this.initPost()
const columns = []
this.$refs['table'].columns.forEach((e, index) => {
if (!e.property || e.type !== 'default') {
return
}
e.__index = index
columns.push({
property: e.property,
index,
label: e.label,
visible: true
})
})
this.columns = columns
})
},
beforeInit() {
this.url = window._CONFIG['serviceURL'] + this.urlList[this.activeName]
this.params = this.jsonParams[this.activeName]
this.params.page = this.page
this.params.size = this.size
this.params['orderId'] = this.orderId
this.params['approveType'] = this.approveType
this.params['warehouseId'] = this.query.warehouseId
if (this.query.date) {
this.params['startTime'] = this.query.date[0]
this.params['endTime'] = this.query.date[1]
} else {
this.params['startTime'] = ''
this.params['endTime'] = ''
}
return true
},
handleRefresh() {
this.initPost()
},
add() {
this.isAdd = true
this.$refs.applyForm.getListOrgWarehouse(this.isAdd)
this.$refs.applyForm.getProcess()
this.$refs.applyForm.dialog = true
},
edit(data) {
this.isAdd = false
const _this = this.$refs.applyForm
_this.getListOrgWarehouse(this.isAdd)
_this.form = data
_this.getProcess(data.nextStepId)
_this.dialog = true
},
show(data) {
const _this = this.$refs.listForm
getByID({id: data.id}).then(res => {
if(res.code == '10000') {
_this.form = res.data
_this.getSteps(res.data.flowType,res.data.orgId)
} else {
this.$message.error(res.msg)
}
})
_this.dialog = true
},
approval(data) {
this.isAdd = false
const _this = this.$refs.approvalForm
getByID({id: data.id}).then(res => {
if(res.code == '10000') {
_this.form = res.data
_this.getSteps(res.data.orgId)
} else {
this.$message.error(res.msg)
}
})
_this.dialog = true
},
back(row) {
this.$confirm('是否确认撤销?', '确认操作', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.loading = true
this.approve(row)
})
},
// 审批
async approve(row) {
const _this = this
_this.loading = true
var data = {
code: row.flowType,
orgId: row.orgId,
stepId: row.nextStepId,
flowGateway: "撤销"
}
await getProcess(data).then(res => {
_this.form = {
id: row.id,
detailList: row.detailList,
orgId : _this.$store.state.user.user.baseJpOrganization.id,
flowState : res.data.flowState,
approvalMsg : data.approvalMsg ? data.approvalMsg : "撤销",
warehouseId: data.warehouseId,
userType: res.data.userType,
userInfo: res.data.userInfo,
dataScope: res.data.dataScope,
nextStepId: res.data.nextStepId,
currentStepName: res.data.currentStepName,
auditUser: _this.$store.state.user.user.id,
auditUserName: _this.$store.state.user.user.nickName
}
})
await approveOrder(_this.form).then(res => {
if (res.code === "10000") {
this.$notify({
title: '撤销成功',
type: 'success',
duration: 2500
})
this.loading = false
this.initPost()
}else{
this.$notify({
title: res.msg,
type: 'danger',
duration: 2500
})
this.loading = false
}
}).catch(err => {
this.loading = false
console.log(err)
})
}
}
}
</script>
<style lang="scss" scoped>
</style>
<template>
<div class="dashboard-editor-container">
<el-card>
<el-tabs v-model="activeName" tab-position="left" style="padding: 5px;" @tab-click="handleClick">
<el-tab-pane name="0" v-if="$store.state.user.user.roleIds.includes(2)">
<span slot="label"><i class="el-icon-date"></i> 出库申请</span>
<repair-common :warehouseList="warehouseList" :activeName="activeName" ref="first"/>
</el-tab-pane>
<el-tab-pane name="1" v-if="$store.state.user.user.roleIds.includes(3)">
<span slot="label"><i class="el-icon-date"></i> 出库审批</span>
<repair-common :warehouseList="warehouseList" :activeName="activeName" ref="second"/>
</el-tab-pane>
<el-tab-pane name="2">
<span slot="label"><i class="el-icon-date"></i> 出库列表</span>
<repair-common :warehouseList="warehouseList" :activeName="activeName" ref="third"/>
</el-tab-pane>
</el-tabs>
</el-card>
</div>
</template>
<script>
import RepairCommon from './common'
import { getListOrgWarehouse } from '@/api/warehouse'
export default {
name: 'Repair',
components: { RepairCommon },
data() {
return {
activeName: '0',
warehouseList: []
}
},
mounted() {
this.init()
},
methods: {
init() {
getListOrgWarehouse({ orgizationId: this.$store.state.user.user.baseJpOrganization.id }).then(res => {
this.warehouseList = res.data
})
this.activeName = this.$store.state.user.user.roleIds.includes(2) ? '0' : '1'
if (this.activeName === '0') { this.$refs.first.tabChange() }
else if (this.activeName === '1') { this.$refs.second.tabChange() }
},
handleClick(pObject) {
pObject.$children[0].tabChange()
}
}
}
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
.dashboard-editor-container {
padding: 10px 12px 12px 12px;
background-color: rgb(240, 242, 245);
}
</style>
<template>
<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-tabs tab-position="left">
<el-tab-pane style="margin-left: 20px">
<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 prop="warehouseId">
<el-select v-model="form.warehouseId" style="width:240px" filterable placeholder="请选择目标仓库" :disabled="form.detailList.length > 0">
<el-option
v-for="item in warehouseList"
:key="item.name"
:label="item.name"
:value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item prop="qoOutTpyId">
<el-select v-model="form.qoOutTpyId" style="width:240px" filterable placeholder="请选择出库类型" >
<el-option
v-for="item in qoOutTpyList"
:key="item.name"
:label="item.name"
:value="item.id">
</el-option>
</el-select>
</el-form-item>
</el-collapse-item>
<el-collapse-item name="2">
<template slot="title"> <el-tag>第二步: 读取装备 (必选)</el-tag></template>
<el-table :data="form.detailList" class="form-table" border>
<el-table-column >
<template slot="header" slot-scope="scope">
<el-button type="primary" @click="readEpcs" :loading="readloading" style="width: 240px">读取装备</el-button>
<el-input v-model="eqEpc" style="width: 675px" placeholder="请输入Epc..."/>
<el-button type="warning" @click="epcAdd">添加</el-button>
</template>
<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="supplierName" 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>
</template>
</el-table-column>
</el-table-column>
</el-table>
</el-collapse-item>
</el-collapse>
<el-tag :key="tag.id" v-for="tag in texts" closable @close="handleClose(tag)" style="margin-top:15px;cursor:pointer;margin-left: 6px;"
@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-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-form-item>
</el-tab-pane>
<el-tab-pane 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-steps :active="0" finish-status="wait" process-status="success" align-center>
<el-step v-for="(step, index) in steps" :key="index" :title="step"/>
</el-steps>
</el-card>
<el-card style="margin-bottom: 15px">
<div slot="header" class="clearfix">
<span>审核详情</span>
</div>
<el-table :data="form.historyList" style="width: 100%" border>
<el-table-column type="index" label="序号" align="center" width="50"/>
<el-table-column prop="stepName" align="center" label="步骤名称"/>
<el-table-column prop="auditUserName" align="center" label="审核人"/>
<el-table-column prop="updateTime" align="center" label="操作时间"/>
<el-table-column prop="auditMind" align="center" :show-overflow-tooltip="true" label="审核意见" />
</el-table>
</el-card>
</el-tab-pane>
</el-tabs>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="temporarySave" 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>
</div>
</el-dialog>
</template>
<script>
import { addOrUpdateFixed,getWzByEpc } from '@/api/fixReceiveApply'
import {getListOrgWarehouse } from '@/api/warehouse'
import { getProcess, getAllProcess } from '@/api/process'
import { deleteTxt, addTxt, getListTxt } from '@/api/policeman'
export default {
props: {
isAdd: {
type: Boolean,
required: true
}
},
data() {
return {
loading: false,
readloading: false,
websock: null,
dialog: false, warehouseList: [], warehouseId: null,
qoOutTpy:[],
detailList: [],epsList : [],
visible: false,
collapseNum: ['1', '2'], steps: [], epc: '', eqEpc: '',
orgizationId: this.$store.state.user.user.baseJpOrganization.id,
qoOutTpyList:[
{
id: '1',
name: '领用'
}, {
id: '2',
name: '借用'
}, {
id: '3',
name: '报废'
}
],
form: {
id: '',
action: 0,
warehouseId : '',
qoOutTpyId:'',
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: [],
currentStepName: '',
dataScope: '',
flowId: '',
flowName: '',
flowState: '',
flowType: '',
nextStepId: '',
orgId: '',
userInfo: '',
userType: ''
},
processForm: {},
rules: {
warehouseId: [
{ required: true, message: '请选择仓库', trigger: 'change' }
],
qoOutTpyId:[
{ required: true, message: '请选择出库类型', trigger: 'change' }
]
},
texts: [],
inputVisible: false,
inputValue: ''
}
},
methods: {
//获取仓库列表
getListOrgWarehouse(isAdd) {
getListOrgWarehouse({ orgizationId: this.$store.state.user.user.baseJpOrganization.id }).then(res => {
this.warehouseList = res.data
if (isAdd && this.warehouseList.length == 1) { this.form.warehouseId = res.data[0].id }
})
},
readEpcs() {
if (this.form.warehouseId == '' || this.form.warehouseId == undefined) {
this.$message.warning('请选择仓库')
return
}
this.readloading = true
this.websock = new WebSocket('ws://127.0.0.1:8081');
this.websock.onopen = this.websocketOnopen;
this.websock.onerror = this.websocketOnerror;
this.websock.onmessage = this.websocketOnmessage;
this.websock.onclose = this.websocketOnclose;
},
websocketOnopen(e) {
console.log('WebSocket连接建立');
this.websock.send(JSON.stringify({CmdType:0,Content:""}))
},
websocketOnerror: function (e) {
console.log("WebSocket连接发生错误");
},
websocketOnmessage: function (e) {
var backMessObj = JSON.parse(e.data);
if(backMessObj.CmdType == 2) {
getWzByEpc({epc : backMessObj.Content}).then(res => {
if (res.code === "10000") {
if (!this.epsList.includes(backMessObj.Content)) {
if (res.data.warehouseId == this.form.warehouseId) {
this.epsList.push(backMessObj.Content)
this.handleAdd(res.data)
}
}
}
})
} else if(![0,1,2,5].includes(backMessObj.CmdType)) {
this.$message.error(backMessObj.Content)
}
setTimeout(() => {
this.websock.close()
this.readloading = false
}, 1000)
},
websocketOnclose: function (e) {
console.log("connection closed (" + e + ")");
},
// 添加行
handleAdd(data) {
//判断此epc装备数据是否已经添加过
var isHere = false
for(var i=0;i<this.form.detailList.length;i++){
if(this.form.detailList[i].epc === data.epc){
isHere = true
break
}
}
if(!isHere){
let row = {
equipmentName : data.equipmentName,
equipmentSizeName : data.equipmentSizeName,
equipmentId : data.equipmentId,
equipmentSizeId : data.equipmentSizeId,
supplierId : data.supplierId,
supplierName : data.supplierName,
warehouseName : data.warehouseName,
warehouseId : data.warehouseId,
epc : data.epc,
quantity : 1,
note : ""
}
this.form.detailList.push(row)
}
},
epcAdd() {
if (this.form.warehouseId == '' || this.form.warehouseId == undefined) {
this.$message.warning('请选择仓库')
return
}
if (this.eqEpc) {
getWzByEpc({epc : this.eqEpc}).then(res => {
if(res.code === "10000"){
if (!this.epsList.includes(this.eqEpc)) {
if (res.data.warehouseId == this.form.warehouseId) {
this.epsList.push(this.eqEpc)
this.handleAdd(res.data)
}
}
} else {
this.$message.warning(res.msg)
}
})
}
},
// 删除行
handleDelete(index, row) {
this.epsList.splice(this.epsList.findIndex(item => item.epc === row.epc), 1)
this.form.detailList.splice(index, 1)
},
cancel() {
this.resetForm()
},
doSubmit() {
this.form.orgCode = this.$store.state.user.user.baseJpOrganization.code.substring(0,6)
this.form.action = 0
this.$refs['form'].validate((valid) => {
if (valid) {
if (this.form.detailList.length>0) {
this.loading = true
this.handleConfirm()
} else {
this.$message.warning('请添加装备')
}
}
})
},
handleConfirm() {
let form = { ...this.form, ...this.processForm }
addOrUpdateFixed(form).then(res => {
if(res.code === "10000"){
this.resetForm()
this.$notify({
title: '成功',
type: 'success',
duration: 2500
})
this.loading = false
this.$emit('ok')
}else{
this.$message.error(res.msg)
this.loading = false
}
})
},
async temporarySave() {
const _this = this
this.processForm = {
detailList: _this.form.detailList,
action: 0,
orgId : _this.$store.state.user.user.baseJpOrganization.id,
applyId: _this.$store.state.user.user.id,
orgCode : this.$store.state.user.user.baseJpOrganization.code.substring(0,6),
flowType: _this.processForm.flowType,
flowState : false,
approvalMsg : _this.form.note,
warehouseId: _this.form.warehouseId,
flowName: _this.processForm.flowName,
userType: '',
userInfo: '',
dataScope: '',
nextStepId: '',
currentStepName: _this.processForm.flowName,
auditUser: _this.$store.state.user.user.id,
auditUserName: _this.$store.state.user.user.nickName
}
let form = { ...this.form, ...this.processForm }
if (form.detailList.length < 1) {
this.$message.warning('请至少添加一件装备')
return
}
await addOrUpdateFixed(form).then(res => {
if (res.code === "10000") {
this.$notify({
title: '暂存成功',
type: 'success',
duration: 2500
})
this.resetForm()
_this.$parent.initPost()
} else {
this.$notify({
title: res.msg,
type: 'danger',
duration: 2500
})
}
})
},
resetForm() {
this.dialog = false
this.$refs['form'].resetFields()
this.epsList = []
this.form = {
id: "",
applyReason : "",
orgId : this.$store.state.user.user.baseJpOrganization.id,
orgCode : this.$store.state.user.user.baseJpOrganization.code.substring(0,6),
applyId : this.$store.state.user.user.id,
applyName : this.$store.state.user.user.nickName,
approvalId : '',
approvalName : '',
note: "",
warehouseId : "",
detailList: [],
approvalResult : 0,
supplierId : ''
}
},
getProcess(data) {
const params = {
code: "repair",
orgId: this.$store.state.user.user.baseJpOrganization.id,
stepId: data || "",
flowGateway: ""
}
getProcess(params).then(res => {
if(res.code === "10000") {
this.processForm = {
currentStepName: res.data.currentStepName,
dataScope: res.data.dataScope,
flowId: res.data.flowId,
flowName: res.data.flowName,
flowState: res.data.flowState,
flowType: res.data.flowType,
nextStepId: res.data.nextStepId,
orgId: res.data.orgId,
userInfo: res.data.userInfo,
userType: res.data.userType
}
}
})
getAllProcess({ code: "repair", orgId: this.$store.state.user.user.baseJpOrganization.id }).then(res => {
this.steps = res.data
})
getListTxt({username: this.$store.state.user.user.username, type: "维修申请" }).then(res => {
this.texts = res.data
})
},
handleClose(tag) {
this.texts.splice(this.texts.indexOf(tag), 1)
deleteTxt({id: tag.id})
},
showInput() {
this.inputVisible = true;
this.$nextTick(_ => {
this.$refs.saveTagInput.$refs.input.focus();
});
},
handleInputConfirm() {
let inputValue = this.inputValue
if (inputValue != '') {
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 => {
this.texts = res.data
})
}
})
}
this.inputVisible = false;
this.inputValue = ''
},
}
}
</script>
<style lang="less" scoped>
/deep/ .el-input-number .el-input__inner {
text-align: left;
}
/deep/.el-card .el-card__header{
background:#ffffff;
color:#000000;
font-size: 16px;
}
.form-table{
/deep/&.el-table{
overflow: visible;
.el-table__body-wrapper{
overflow: visible;
.cell{
overflow: visible;
}
}
}
}
</style>
<template>
<div class="app-container">
<!--工具栏-->
<div class="head-container">
<!-- 搜索 -->
<el-input v-model="orderCode" clearable placeholder="输入报修单号搜索" style="width: 250px;" class="filter-item" @keyup.enter.native="toPostQuery"/>
<el-select v-model="approveType" clearable placeholder="--审批状态--" class="filter-item" style="width: 130px" @change="toPostQuery">
<el-option v-for="item in approvalTypeOptions" :key="item.key" :label="item.display_name" :value="item.key"/>
</el-select>
<el-button class="filter-item" size="mini" type="success" icon="el-icon-search" @click="toPostQuery">搜索</el-button>
<!-- 新增 -->
<div v-permission="['admin']" style="display: inline-block;margin: 0px 2px;">
<el-button
class="filter-item"
size="mini"
type="primary"
icon="el-icon-plus"
@click="add">申请维修</el-button>
</div>
</div>
<!--表单组件-->
<eForm ref="form" :is-add="isAdd"/>
<eListForm ref="eListForm" :is-add="isAdd"/>
<!--表格渲染-->
<el-table v-loading="loading" :data="data" size="small" style="width: 100%;" stripe border >
<el-table-column type="index" label="序号" width="50"/>
<el-table-column prop="orderCode" label="报修单号"/>
<el-table-column prop="warehouseName" label="仓库"/>
<el-table-column prop="applyName" label="申请人"/>
<el-table-column prop="createTime" label="申请时间"/>
<el-table-column prop="flowState" label="审批状态">
<template slot-scope="scope">
<el-tag v-if="scope.row.flowState" type="success">已通过</el-tag>
<el-tag v-else-if="!scope.row.flowState && scope.row.userInfo !== ''" type="warning">待审批</el-tag>
<el-tag v-else-if="!scope.row.flowState && scope.row.actionResult === '0'" type="danger">撤销</el-tag>
<el-tag v-else-if="!scope.row.flowState && scope.row.userInfo === ''" type="danger">已驳回</el-tag>
</template>
</el-table-column>
<el-table-column label="操作" width="200px" align="center" fixed="right">
<template slot-scope="scope">
<el-button size="mini" type="warning" @click="edit(scope.row)" v-if="!scope.row.flowState && scope.row.userInfo === ''">编辑</el-button>
<el-button size="mini" type="primary" @click="show(scope.row)">查看</el-button>
<el-button size="mini" type="danger" :loading="loading" v-if="!scope.row.flowState && scope.row.userInfo !== ''" @click="back(scope.row)">撤销</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, sizes"
@size-change="postSizeChange"
@current-change="postPageChange"/>
</div>
</template>
<script>
import checkPermission from '@/utils/permission'
import initData from '@/mixins/initData'
import { deleteOrder } from '@/api/fixReceiveApply'
import { parseTime, downloadFile } from '@/utils/index'
import eForm from './form'
import eListForm from '../qoList/form'
import { approveOrder } from '@/api/fixReceiveApply'
import { getProcess } from '@/api/process'
export default {
name: 'Job',
components: { eForm, eListForm },
mixins: [initData],
data() {
return {
orderCode : null,
approveType : '',
form: '',
loading: false,
orgId : this.$store.state.user.user.baseJpOrganization.id,
approvalTypeOptions:[
{ key: '0', display_name: '待审批' },
{ key: '1', display_name: '已通过' },
{ key: '2', display_name: '已驳回/撤销' }
],
purchasesList : []
}
},
created() {
this.$nextTick(() => {
this.initPost()
})
},
methods: {
parseTime,
checkPermission,
beforeInit() {
this.url = window._CONFIG['serviceURL'] + '/api/FixReceiveApply/GetAllFixs'
this.params = { page: this.page, size: this.size, action : 'repair', applyId: this.$store.state.user.user.id }
//const query = this.query
const orderCode = this.orderCode//订单号
const approveType = this.approveType//0待审批,1已审批,2已驳回
if (orderCode) { this.params['orderCode'] = orderCode }
if (approveType !== '' && approveType !== null) { this.params['approveType'] = approveType }
return true
},
add() {
//console.log(this.$store.state.user.user.baseJpOrganization.code.substring(0,6));
this.isAdd = true
this.$refs.form.getListOrgWarehouse()
this.$refs.form.getProcess()
this.$refs.form.dialog = true
},
edit(data) {
this.isAdd = false
this.editWarehouseId = data.warehouseId
this.$refs.form.getListOrgWarehouse()
// this.$refs.form.getOrgUser()
const _this = this.$refs.form
_this.form = data
this.$refs.form.getProcess(data.nextStepId)
_this.dialog = true
},
show(data) {
this.isAdd = false
const _this = this.$refs.eListForm
_this.form = data
_this.getSteps(data.orgId)
_this.dialog = true
},
back(row) {
this.$confirm('是否确认撤销?', '确认操作', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.loading = true
this.approve(row)
})
},
// 审批
async approve(row) {
const _this = this
_this.loading = true
var data = {
code: row.flowType,
orgId: row.orgId,
stepId: row.nextStepId,
flowGateway: "撤销"
}
await getProcess(data).then(res => {
_this.form = {
id: row.id,
detailList: row.detailList,
orgId : _this.$store.state.user.user.baseJpOrganization.id,
flowState : res.data.flowState,
approvalMsg : data.approvalMsg ? data.approvalMsg : "撤销",
warehouseId: data.warehouseId,
userType: res.data.userType,
userInfo: res.data.userInfo,
dataScope: res.data.dataScope,
nextStepId: res.data.nextStepId,
currentStepName: res.data.currentStepName,
auditUser: _this.$store.state.user.user.id,
auditUserName: _this.$store.state.user.user.nickName
}
})
await approveOrder(_this.form).then(res => {
if (res.code === "10000") {
this.$notify({
title: '撤销成功',
type: 'success',
duration: 2500
})
this.loading = false
this.initPost()
}else{
this.$notify({
title: res.msg,
type: 'danger',
duration: 2500
})
this.loading = false
}
}).catch(err => {
this.loading = false
console.log(err)
})
}
}
}
</script>
<style scoped>
</style>
<template>
<el-dialog :append-to-body="true" :close-on-click-modal="false" :before-close="cancel" :visible.sync="dialog" title="维修审批" width="1200px">
<el-form ref="form" :model="form" :rules="rules" size="small" label-width="40px">
<el-tabs v-model="activeName" 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>基本信息</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.orderCode}}</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="form.flowState" type="success">已通过</el-tag>
<el-tag v-else-if="!form.flowState && form.userInfo !== ''" type="warning">待审批</el-tag>
<el-tag v-else-if="!form.flowState && form.actionResult === '0'" type="danger">撤销</el-tag>
<el-tag v-else-if="!form.flowState && form.userInfo === ''" type="danger">已驳回</el-tag>
</td>
</tr>
<tr style="border-bottom:1px solid #e8e8e8;">
<th class="textHeader">申请人</th>
<td class="textContent">{{form.applyName}}</td>
<th class="textHeader">申请时间</th>
<td class="textContent">{{form.applyTime}}</td>
<th class="textHeader">更新时间</th>
<td class="textContentLast">{{form.updateTime}}</td>
</tr>
<tr>
<th class="textHeader">申请理由</th>
<td colspan="5" class="textContentLast">{{form.note}}</td>
</tr>
</tbody>
</table>
</div>
</el-card>
<el-card style="margin-bottom: 15px">
<div slot="header" class="clearfix">
<span>装备信息</span>
</div>
<el-table :data="form.detailList" style="width: 100%" 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="supplierName" align="center" label="供应商" />
<el-table-column prop="quantity" align="center" label="数量" />
</el-table>
</el-card>
</el-tab-pane>
<el-tab-pane name="second" 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-steps :active="form.flowState ? steps.length-1 : steps.findIndex(i => i === form.currentStepName)"
finish-status="wait" process-status="success" align-center>
<el-step v-for="(step, index) in steps" :key="index" :title="step"/>
</el-steps>
</el-card>
<el-card style="margin-bottom: 15px;">
<div slot="header" class="clearfix">
<span>审核详情</span>
</div>
<el-table :data="historyArray" style="width: 100%" border>
<el-table-column type="index" label="序号" align="center" width="50"/>
<el-table-column prop="stepName" align="center" label="步骤名称"/>
<el-table-column prop="auditUserName" align="center" label="审核人"/>
<el-table-column prop="updateTime" align="center" label="操作时间"/>
<el-table-column prop="auditMind" align="center" :show-overflow-tooltip="true" label="审核意见" />
</el-table>
<el-pagination style="margin-top: 8px;" layout="prev, pager, next" :total="historyTotal" :page-size="3" :current-page="historyCurrentPage" @current-change="handleCurrentChang"></el-pagination>
</el-card>
</el-tab-pane>
</el-tabs>
<el-tag type="success" style="margin-left: 40px;cursor:pointer" @click="approvalMsg = '同意'">同意</el-tag>
<el-tag type="success" style="cursor:pointer" @click="approvalMsg = '申请理由充分、同意此次申请.'">申请理由充分、同意此次申请.</el-tag>
<el-tag type="success" style="cursor:pointer" @click="approvalMsg = '所列项目齐全符合规范要求、同意此次申请.'">所列项目齐全符合规范要求、同意此次申请.</el-tag>
<el-tag type="danger" style="cursor:pointer" @click="approvalMsg = '不同意'">不同意</el-tag>
<el-tag type="danger" style="cursor:pointer" @click="approvalMsg = '申请理由不充分、请完善后重新提交.'">申请理由不充分、请完善后重新提交.</el-tag>
<el-tag type="danger" style="cursor:pointer" @click="approvalMsg = '申请数量有误、请检查后修改再次提交.'">申请数量有误、请检查后修改再次提交.</el-tag>
<el-tag type="danger" style="cursor:pointer" @click="approvalMsg = '其他原因、驳回.'">其他原因、驳回.</el-tag>
<el-form-item>
<el-input v-model="approvalMsg" 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-popover
ref="repair"
placement="top"
width="180">
<p>确定不通过吗?</p>
<div style="text-align: right; margin: 0">
<el-button size="mini" type="text" @click="$refs.repair.doClose()">取消</el-button>
<el-button type="primary" size="mini" @click="approve(2)">确定</el-button>
</div>
<el-button slot="reference" type="danger">不通过</el-button>
</el-popover>
<el-button type="success" :loading="loading" @click="approve(1)">通 过</el-button>
</div>
</el-dialog>
</template>
<script>
import { addOrUpdateFixed,getWzByEp,approveOrder } from '@/api/fixReceiveApply'
import { getProcess, getAllProcess } from '@/api/process'
export default {
data() {
return {
loading: false, dialog: false, warehouseList: [], warehouseId: null, steps: [], activeName: 'first',
detailList: [],quantity:1, epsList : [], historyArray: [], historyTotal: 0, historyCurrentPage: 1,
visible: false,
orgizationId:this.$store.state.user.user.baseJpOrganization.id,
form: {
id: "",
applyReason : "",
orgId : this.$store.state.user.user.baseJpOrganization.id,
approvalId : this.$store.state.user.user.id,
approvalName : this.$store.state.user.user.nickName,
orgCode : this.$store.state.user.user.baseJpOrganization.code.substring(0,6),
applyId : this.$store.state.user.user.id,
title: "",
warehouseId : "",
detailList: [],
approvalResult : 0
},
approvalMsg : "",
rules: {
applyReason: [
{ required: true, message: '请输入采购原因', trigger: 'blur' },
{ min: 2, max: 20, message: '长度在 2 到 20 个字符', trigger: 'blur' }
],
warehouseId: [
{ required: true, message: '请选择仓库', trigger: 'change' }
]
}
}
},
methods: {
cancel() {
this.resetForm()
this.epsList = []
},
//审批
async approve(approvalResult) {
const _this = this
_this.loading = true
var data = {
code: this.form.flowType,
orgId: this.form.orgId,
stepId: this.form.nextStepId,
flowGateway: approvalResult === 1 ? "同意" : "不同意"
}
await getProcess(data).then(res => {
_this.data = {
id: _this.form.id,
orgId : _this.$store.state.user.user.baseJpOrganization.id,
flowState : res.data.flowState,
approvalMsg : _this.approvalMsg ? _this.approvalMsg : data.flowGateway,
userType: res.data.userType,
userInfo: res.data.userInfo,
dataScope: res.data.dataScope,
nextStepId: res.data.nextStepId,
currentStepName: res.data.currentStepName,
auditUser: _this.$store.state.user.user.id,
auditUserName: _this.$store.state.user.user.nickName
}
})
await approveOrder(_this.data).then(res => {
if(res.code === "10000"){
this.resetForm()
this.$notify({
title: '审批成功',
type: 'success',
duration: 2500
})
this.loading = false
this.$refs.repair.doClose()
this.$emit('ok')
this.$parent.initPost()
}else{
this.$notify({
title: res.msg,
type: 'danger',
duration: 2500
})
this.$refs.repair.doClose()
this.loading = false
}
}).catch(err => {
this.$refs.repair.doClose()
this.loading = false
console.log(err)
})
},
resetForm() {
this.dialog = false
this.$refs['form'].resetFields()
this.form = {
id: "",
applyReason : "",
orgId : this.$store.state.user.user.baseJpOrganization.id,
orgCode : this.$store.state.user.user.baseJpOrganization.code.substring(0,6),
approvalId : this.$store.state.user.user.id,
approvalName : this.$store.state.user.user.nickName,
title: "",
warehouseId : "",
detailList: [],
approvalResult : 0,
supplierId : ''
}
},
getSteps(orgId) {
this.historyArray = this.form.historyList.slice(0, 3)
this.historyTotal = this.form.historyList.length
var data = {
code: "repair",
orgId: orgId
}
getAllProcess(data).then(res => {
this.steps = res.data
})
},
handleCurrentChang(currentPage) {
this.historyCurrentPage = currentPage
this.historyArray = this.form.historyList.slice((this.historyCurrentPage-1)*3, this.historyCurrentPage*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;
}
</style>
<template>
<div class="app-container">
<!--工具栏-->
<div class="head-container">
<!-- 搜索 -->
<!-- <el-button class="filter-item" size="mini" type="primary" icon="el-icon-check" @click="approvalAll()">一键通过</el-button> -->
<el-input v-model="orderCode" clearable placeholder="输入报修单号搜索" style="width: 250px;" class="filter-item" @keyup.enter.native="toPostQuery"/>
<el-select v-model="approveType" clearable placeholder="--审批状态--" class="filter-item" style="width: 130px" @change="toPostQuery">
<el-option v-for="item in approvalTypeOptions" :key="item.key" :label="item.display_name" :value="item.key"/>
</el-select>
<el-button class="filter-item" size="mini" type="success" icon="el-icon-search" @click="toPostQuery">搜索</el-button>
</div>
<!--表单组件-->
<eForm ref="form" :is-add="isAdd"/>
<!--表格渲染-->
<el-table v-loading="loading" :data="data" size="small" style="width: 100%;" stripe border>
<!-- <el-table-column type="selection" width="55"/> -->
<el-table-column type="index" label="序号" width="50"/>
<el-table-column prop="orderCode" label="报修单号"/>
<el-table-column prop="warehouseName" label="仓库"/>
<el-table-column prop="applyName" label="申请人"/>
<el-table-column prop="createTime" label="申请时间"/>
<el-table-column prop="flowState" label="审批状态">
<template slot-scope="scope">
<el-tag v-if="scope.row.flowState" type="success">已通过</el-tag>
<el-tag v-else-if="!scope.row.flowState && scope.row.userInfo !== ''" type="warning">待审批</el-tag>
<el-tag v-else-if="!scope.row.flowState && scope.row.userInfo === ''" type="danger">已驳回</el-tag>
</template>
</el-table-column>
<el-table-column label="操作" width="130px" align="center" fixed="right">
<template slot-scope="scope">
<el-button size="mini" type="warning" @click="approval(scope.row)">审批</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, sizes"
@size-change="postSizeChange"
@current-change="postPageChange"/>
</div>
</template>
<script>
import checkPermission from '@/utils/permission'
import initData from '@/mixins/initData'
import { deleteOrder,approveOrder} from '@/api/fixReceiveApply'
import { parseTime, downloadFile } from '@/utils/index'
import eForm from './form'
export default {
name: 'Job',
components: { eForm },
mixins: [initData],
// 设置数据字典
data() {
return {
orderCode : null,
approveType : '',
testUrl : global.testUrl,
delLoading: false,
orgId : this.$store.state.user.user.baseJpOrganization.id,
approvalTypeOptions:[
{ key: '0', display_name: '待审批' },
{ key: '1', display_name: '已通过' },
{ key: '2', display_name: '已驳回/撤销' }
],
purchasesList : []
}
},
created() {
this.$nextTick(() => {
this.initPost()
})
},
methods: {
parseTime,
checkPermission,
beforeInit() {
this.url = window._CONFIG['serviceURL'] + '/api/Process/GetPageProcessList'
this.params = {
page: this.page,
size: this.size,
orgId: this.$store.state.user.user.baseJpOrganization.id,
flowType: 'repair',
userId: this.$store.state.user.user.id,
roleIds: this.$store.state.user.user.roleIds,
}
const orderCode = this.orderCode//订单号
const approveType = this.approveType//0待审批,1已审批,2已驳回
if (orderCode) { this.params['orderCode'] = orderCode }
if (approveType !== '' && approveType !== null) { this.params['approveType'] = approveType }
return true
},
approval(data) {
this.isAdd = false
const _this = this.$refs.form
_this.form = data
_this.getSteps(data.orgId)
_this.dialog = true
},
subDelete(id) {
console.log("id"+id)
this.delLoading = true
const params = {id:id,orgId:this.orgId}
deleteOrder(params).then(res => {
this.delLoading = false
this.$refs[id].doClose()
if(res.code === "10000"){
this.$notify({
title: '删除成功',
type: 'success',
duration: 2500
})
this.dleChangePage()
this.initPost()
}else{
this.$notify({
title: '删除失败',
type: 'danger',
duration: 2500
})
}
}).catch(err => {
this.delLoading = false
this.$refs[id].doClose()
console.log(err.response)
})
},
add() {
this.isAdd = true
this.$refs.form.dialog = true
},
edit(data) {
this.isAdd = false
const _this = this.$refs.form
_this.form = {
id: data.id,
applyReason : data.applyReason,
orgId : this.orgizationId,
applyId : data.applyId,
title: data.title,
warehouseId : data.warehouseId,
warehouseName : data.warehouseName,
detailList: data.detailList,
approvalResult : data.approvalResult
}
_this.dialog = true
}
}
}
</script>
<style scoped>
</style>
<template>
<el-dialog :append-to-body="true" :close-on-click-modal="false" :before-close="cancel" :visible.sync="dialog" title="查看详情" width="1200px">
<el-form ref="form" :model="form" :inline="true" size="small" label-width="80px">
<el-tabs v-model="activeName" 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>基本信息</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.orderCode}}</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="form.flowState" type="success">已通过</el-tag>
<el-tag v-else-if="!form.flowState && form.userInfo !== ''" type="warning">待审批</el-tag>
<el-tag v-else-if="!form.flowState && form.actionResult === '0' && form.nextStepId === ''" type="primary">暂存</el-tag>
<el-tag v-else-if="!form.flowState && form.actionResult === '0'" type="danger">撤销</el-tag>
<el-tag v-else-if="!form.flowState && form.userInfo === ''" type="danger">已驳回</el-tag>
</td>
</tr>
<tr style="border-bottom:1px solid #e8e8e8;">
<th class="textHeader">申请人</th>
<td class="textContent">{{form.applyName}}</td>
<th class="textHeader">申请时间</th>
<td class="textContent">{{form.applyTime}}</td>
<th class="textHeader">更新时间</th>
<td class="textContentLast">{{form.updateTime}}</td>
</tr>
<tr>
<th class="textHeader">申请理由</th>
<td colspan="5" class="textContentLast">{{form.note}}</td>
</tr>
</tbody>
</table>
</div>
</el-card>
<el-card style="margin-bottom: 15px">
<div slot="header" class="clearfix">
<span>装备信息</span>
</div>
<el-table :data="form.detailList" style="width: 100%" border>
<el-table-column type="index" label="序号" align="center" width="50"/>
<el-table-column align="center" label="装备名称">
<template slot-scope="scope">
<el-link type="primary" @click="toInventoryList(scope.row.equipmentName)">{{ scope.row.equipmentName }}</el-link>
</template>
</el-table-column>
<el-table-column prop="equipmentSizeName" align="center" label="装备型号名称"/>
<el-table-column prop="supplierName" align="center" label="供应商" />
<el-table-column prop="quantity" align="center" label="装备数量" />
</el-table>
</el-card>
</el-tab-pane>
<el-tab-pane name="second" 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-steps :active="form.flowState ? steps.length-1 : steps.findIndex(i => i === form.currentStepName)"
finish-status="wait" process-status="success" align-center>
<el-step v-for="(step, index) in steps" :key="index" :title="step"/>
</el-steps>
</el-card>
<el-card>
<div slot="header" class="clearfix">
<span>审核详情</span>
</div>
<el-table :data="historyArray" style="width: 100%" border>
<el-table-column type="index" label="序号" align="center" width="50"/>
<el-table-column prop="stepName" align="center" label="步骤名称"/>
<el-table-column prop="auditUserName" align="center" label="审核人"/>
<el-table-column prop="updateTime" align="center" label="操作时间"/>
<el-table-column prop="auditMind" align="center" :show-overflow-tooltip="true" label="审核意见" />
</el-table>
<el-pagination style="margin-top: 8px;" layout="prev, pager, next" :total="historyTotal" :page-size="5" :current-page="historyCurrentPage" @current-change="handleCurrentChang"></el-pagination>
</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-table :data="inOutdetailList" style="width: 100%" border>
<el-table-column type="index" label="序号" align="center" width="50"/>
<el-table-column prop="equipmentDetailName" align="center" label="装备名称"/>
<el-table-column prop="warehouseName" label="发出仓库" align="center" v-if="[0, 4, 7, 8].includes(form.type)"/>
<el-table-column prop="supplierName" label="供应商" align="center" v-if="[1, 5, 6].includes(form.type)"/>
<el-table-column prop="equipmentCount" align="center" label="计划数量"/>
<el-table-column prop="realCount" align="center" label="实际数量"/>
<el-table-column prop="state" label="出入库状态" align="center">
<template slot-scope="scope">
<el-tag v-if="scope.row.equipmentCount == scope.row.realCount" type="success">已完成</el-tag>
<el-tag v-else type="warning">未完成</el-tag>
</template>
</el-table-column>
</el-table>
</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 { getAllProcess } from '@/api/process'
import { getInOutDetail } from '@/api/inventory'
export default {
data() {
return {
loading: false, dialog: false, warehouseId: null,
activeName: 'first', steps: [],
historyArray: [], historyTotal: 0, historyCurrentPage: 1,
orgizationId:this.$store.state.user.user.baseJpOrganization.id,
form: {
id: "",
applyReason : "",
orgId : this.$store.state.user.user.baseJpOrganization.id,
orgCode : this.$store.state.user.user.baseJpOrganization.code.substring(0,6),
policeId : "",
title: "",
warehouseId : "",
detailList: [],
approvalResult : 0
},
inOutdetailList: []
}
},
methods: {
cancel() {
this.resetForm()
},
toInventoryList(name) {
this.$router.push({
path: '/warehouse/inventoryList',
query: {
type: '维修数量',
level: '本级及下级',
name: name
}
})
},
getSteps(flowType, orgId) {
this.historyArray = this.form.historyList.slice(0, 5)
this.historyTotal = this.form.historyList.length
var data = {
code: flowType,
orgId: orgId
}
getAllProcess(data).then(res => {
this.steps = res.data
})
getInOutDetail({id: this.form.id, type: this.form.type}).then(res => {
if(res.code == '10000') {
this.inOutdetailList = res.data
} else {
this.$message.error(res.msg)
}
})
},
resetForm() {
this.dialog = false
},
handleCurrentChang(currentPage) {
this.historyCurrentPage = currentPage
this.historyArray = this.form.historyList.slice((this.historyCurrentPage-1)*5, this.historyCurrentPage*5)
}
}
}
</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;
}
</style>
<template>
<div class="app-container">
<!--工具栏-->
<div class="head-container">
<!-- 搜索 -->
<el-input v-model="orderCode" clearable placeholder="输入报修单号搜索" style="width: 250px;" class="filter-item" @keyup.enter.native="toPostQuery"/>
<el-select v-model="approveType" clearable placeholder="--审批状态--" class="filter-item" style="width: 130px" @change="toPostQuery">
<el-option v-for="item in approvalTypeOptions" :key="item.key" :label="item.display_name" :value="item.key"/>
</el-select>
<el-button class="filter-item" size="mini" type="success" icon="el-icon-search" @click="toPostQuery">搜索</el-button>
</div>
<!--表单组件-->
<eForm ref="form" :is-add="isAdd"/>
<eListForm ref="eListForm" :is-add="isAdd"/>
<!--表格渲染-->
<el-table v-loading="loading" :data="data" size="small" style="width: 100%;" stripe border >
<el-table-column type="index" label="序号" width="50"/>
<el-table-column prop="orderCode" label="报修单号"/>
<el-table-column prop="warehouseName" label="仓库"/>
<el-table-column prop="applyName" label="申请人"/>
<el-table-column prop="createTime" label="申请时间"/>
<el-table-column prop="approvalResult" label="审批状态">
<template slot-scope="scope">
<el-tag v-if="scope.row.flowState" type="success">已通过</el-tag>
<el-tag v-else-if="!scope.row.flowState && scope.row.userInfo !== ''" type="warning">待审批</el-tag>
<el-tag v-else-if="!scope.row.flowState && scope.row.actionResult === '0'" type="danger">撤销</el-tag>
<el-tag v-else-if="!scope.row.flowState && scope.row.userInfo === ''" type="danger">已驳回</el-tag>
</template>
</el-table-column>
<el-table-column label="操作" width="200px" align="center" fixed="right">
<template slot-scope="scope">
<el-button size="mini" type="warning" v-if="scope.row.currentState" @click="approval(scope.row)">审批</el-button>
<el-button size="mini" type="primary" @click="show(scope.row)">查看</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, sizes"
@size-change="postSizeChange"
@current-change="postPageChange"/>
</div>
</template>
<script>
import checkPermission from '@/utils/permission'
import initData from '@/mixins/initData'
import { deleteOrder } from '@/api/fixReceiveApply'
import { parseTime, downloadFile } from '@/utils/index'
import eForm from './form'
import eListForm from '../qoApproval/form'
export default {
name: 'Job',
components: { eForm, eListForm },
mixins: [initData],
data() {
return {
orderCode : null,
approveType : '',
testUrl : global.testUrl,
delLoading: false,
orgId : this.$store.state.user.user.baseJpOrganization.id,
approvalTypeOptions:[
{ key: '0', display_name: '待审批' },
{ key: '1', display_name: '已通过' },
{ key: '2', display_name: '已驳回/撤销' }
],
purchasesList : []
}
},
created() {
this.query.orderId = this.$route.query.orderId
this.$nextTick(() => {
this.initPost()
})
},
methods: {
parseTime,
checkPermission,
beforeInit() {
this.url = window._CONFIG['serviceURL'] + '/api/Process/GetPageHistoryProcessList'
this.params = { page: this.page, size: this.size,userId: this.$store.state.user.user.id, flowType: "repair",
orgId: this.$store.state.user.user.baseJpOrganization.id,
roleIds: this.$store.state.user.user.roleIds }
const orderCode = this.orderCode//订单号
const approveType = this.approveType//0待审批,1已审批,2已驳回
const orderId = this.query.orderId
if (orderCode) { this.params['orderCode'] = orderCode }
if (approveType !== '' && approveType !== null) { this.params['approveType'] = approveType }
if (orderId !== '' && orderId !== null) { this.params['orderId'] = orderId }
return true
},
subDelete(id) {
console.log("id"+id)
this.delLoading = true
const params = { id:id,orgId:this.orgId }
deleteOrder(params).then(res => {
this.delLoading = false
this.$refs[id].doClose()
if(res.code === "10000"){
this.$notify({
title: '删除成功',
type: 'success',
duration: 2500
})
this.dleChangePage()
this.initPost()
}else{
this.$notify({
title: '删除失败',
type: 'danger',
duration: 2500
})
}
}).catch(err => {
this.delLoading = false
this.$refs[id].doClose()
console.log(err.response)
})
},
add() {
this.isAdd = true
this.$refs.form.dialog = true
},
show(data) {
const _this = this.$refs.form
_this.form = data
_this.getSteps(data.orgId)
_this.initRoles()
_this.dialog = true
},
approval(data) {
const _this = this.$refs.eListForm
_this.form = data
_this.getSteps(data.orgId)
_this.dialog = true
},
}
}
</script>
<style scoped>
</style>
...@@ -38,6 +38,8 @@ ...@@ -38,6 +38,8 @@
start-placeholder="开始日期" start-placeholder="开始日期"
end-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="warning" icon="el-icon-plus" class="filter-item" style="float: right" v-if="activeName == 0" @click="qoApply('2')">快速出库</el-button>
<el-button type="primary" icon="el-icon-plus" class="filter-item" style="float: right" v-if="activeName == 0" @click="add">申请报废</el-button> <el-button type="primary" icon="el-icon-plus" class="filter-item" style="float: right" v-if="activeName == 0" @click="add">申请报废</el-button>
</div> </div>
<!--表单组件--> <!--表单组件-->
...@@ -71,6 +73,8 @@ ...@@ -71,6 +73,8 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<!--表单组件-->
<addQoAppy ref="addQoAppy" @ok="handleRefresh"/>
<!--分页组件--> <!--分页组件-->
<el-pagination <el-pagination
:total="total" :total="total"
...@@ -88,11 +92,12 @@ import approvalForm from '../scrapApproval/form' ...@@ -88,11 +92,12 @@ import approvalForm from '../scrapApproval/form'
import listForm from '../scrapList/form' import listForm from '../scrapList/form'
import { getProcess } from '@/api/process' import { getProcess } from '@/api/process'
import { approveOrder, getByID } from '@/api/fixReceiveApply' import { approveOrder, getByID } from '@/api/fixReceiveApply'
import addQoAppy from '@/views/dashboard/addQoAppy'
export default { export default {
name: 'RepairCommon', name: 'RepairCommon',
mixins: [initData], mixins: [initData],
props: ['warehouseList', 'activeName'], props: ['warehouseList', 'activeName'],
components: { applyForm, listForm, approvalForm }, components: { applyForm, listForm, approvalForm, addQoAppy },
data() { data() {
return { return {
loading: false, loading: false,
...@@ -151,6 +156,18 @@ export default { ...@@ -151,6 +156,18 @@ export default {
} }
return true return true
}, },
qoApply(){
// this.isAdd = true
this.$refs.addQoAppy.getListOrgWarehouse()
this.$refs.addQoAppy.getPolicemans()
let code ='scrap'
this.$refs.addQoAppy.getProcess(code)
this.$refs.addQoAppy.dialog = true
this.$refs.addQoAppy.form.qoOutTpyId= '2'
},
handleRefresh(){
this.initPost()
},
add() { add() {
this.isAdd = true this.isAdd = true
this.$refs.applyForm.getListOrgWarehouse(this.isAdd) this.$refs.applyForm.getListOrgWarehouse(this.isAdd)
......
...@@ -248,6 +248,7 @@ export default { ...@@ -248,6 +248,7 @@ export default {
}, },
cancel() { cancel() {
this.resetForm() this.resetForm()
this.$parent.initPost()
}, },
doSubmit() { doSubmit() {
this.form.orgCode = this.$store.state.user.user.baseJpOrganization.code.substring(0,6) this.form.orgCode = this.$store.state.user.user.baseJpOrganization.code.substring(0,6)
......
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
</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">{{form.policeName}}</td> <td class="textContent">{{form.policeNote}}</td>
<th class="textHeader">拟还时间</th> <th class="textHeader">拟还时间</th>
<td class="textContent" style="padding-top:8px;padding-bottom:8px;"><el-tag type="warning">{{form.expectedTime}}</el-tag></td> <td class="textContent" style="padding-top:8px;padding-bottom:8px;"><el-tag type="warning">{{form.expectedTime}}</el-tag></td>
<th class="textHeader">申请理由</th> <th class="textHeader">申请理由</th>
......
...@@ -42,10 +42,13 @@ ...@@ -42,10 +42,13 @@
start-placeholder="开始日期" start-placeholder="开始日期"
end-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" v-if="activeName == 0 && actionType == '0'" @click="add">借用申请</el-button> <el-button type="warning" class="filter-item" icon="el-icon-plus" style="float: right" v-if="activeName == 0 && actionType == '0'" @click="qoApply(1)">快速出库</el-button>
<el-button type="primary" class="filter-item" style="float: right" v-if="activeName == 0 && actionType == '1'" @click="addLY">领用申请</el-button> <el-button type="warning" class="filter-item" icon="el-icon-plus" style="float: right" v-if="activeName == 0&& actionType == '1'" @click="qoApply(2)">快速出库</el-button>
<el-button type="primary" class="filter-item" icon="el-icon-plus" style="float: right" v-if="activeName == 0 && actionType == '0'" @click="add">借用申请</el-button>
<el-button type="primary" class="filter-item" icon="el-icon-plus" style="float: right" v-if="activeName == 0 && actionType == '1'" @click="addLY">领用申请</el-button>
</div> </div>
<!--表单组件--> <!--表单组件-->
<addQoAppy ref="addQoAppy" @ok="handleRefresh"/>
<apply-form ref="applyForm" :is-add="isAdd" /> <apply-form ref="applyForm" :is-add="isAdd" />
<list-form ref="listForm" /> <list-form ref="listForm" />
<approval-form ref="approvalForm"/> <approval-form ref="approvalForm"/>
...@@ -116,11 +119,12 @@ import applyLyForm from '../../receive/apply/form' ...@@ -116,11 +119,12 @@ import applyLyForm from '../../receive/apply/form'
import listLyForm from '../../receive/apply/detailForm' import listLyForm from '../../receive/apply/detailForm'
import { getProcess } from '@/api/process' import { getProcess } from '@/api/process'
import { approveOrder, getByID, deleteOrder } from '@/api/borrow' import { approveOrder, getByID, deleteOrder } from '@/api/borrow'
import addQoAppy from '@/views/dashboard/addQoAppy'
export default { export default {
name: 'TransferCommon', name: 'TransferCommon',
mixins: [initData], mixins: [initData],
props: ['warehouseList', 'activeName'], props: ['warehouseList', 'activeName'],
components: { applyForm, listForm, approvalForm, applyLyForm, listLyForm }, components: { applyForm, listForm, approvalForm, applyLyForm, listLyForm, addQoAppy},
data() { data() {
return { return {
loading: false, loading: false,
...@@ -183,6 +187,26 @@ export default { ...@@ -183,6 +187,26 @@ export default {
} }
return true return true
}, },
qoApply(a){
// this.isAdd = true
this.$refs.addQoAppy.getListOrgWarehouse()
this.$refs.addQoAppy.getPolicemans()
this.$refs.addQoAppy.dialog = true
if(a==1){
console.log('000')
this.$refs.addQoAppy.form.qoOutTpyId= '0'
let code ='borrowMy'
this.$refs.addQoAppy.getProcess(code)
}else{
console.log('111')
this.$refs.addQoAppy.form.qoOutTpyId= '1'
let code ='collect'
this.$refs.addQoAppy.getProcess(code)
}
},
handleRefresh(){
this.initPost()
},
add() { add() {
this.isAdd = true this.isAdd = true
const _this = this.$refs.applyForm const _this = this.$refs.applyForm
......
...@@ -40,9 +40,10 @@ export default { ...@@ -40,9 +40,10 @@ export default {
} }
}, },
methods: { methods: {
initTable(equipmentId, findCode, orgCode, code) { initTable(equipmentId, sizeId, findCode, orgCode, code) {
this.url = window._CONFIG['serviceURL'] + '/api/Inventory/GetListEquByFindCode' this.url = window._CONFIG['serviceURL'] + '/api/Inventory/GetListEquByequipmentSizecode'
this.params = { findCode: findCode, equipmentId: equipmentId, orgCode: orgCode.substring(6,8) === '00' ? (orgCode === code ? orgCode: '') : orgCode } // 先判断是不是 派出所还是上级,派出所直接传orgCode,上级会包含本级及下级的,相等的话传本级 this.params = { findCode: findCode, equipmentId: equipmentId,equipmentSizecode:sizeId, orgCode: orgCode.substring(6,8) === '00' ? (orgCode === code ? orgCode: '') : orgCode } // 先判断是不是 派出所还是上级,派出所直接传orgCode,上级会包含本级及下级的,相等的话传本级
//this.params = { findCode: findCode, equipmentId: equipmentId,equipmentSizecode:sizeId }
this.initPost() this.initPost()
}, },
getRowKeys(row) { getRowKeys(row) {
......
...@@ -53,14 +53,15 @@ ...@@ -53,14 +53,15 @@
<template slot-scope="props"> <template slot-scope="props">
<el-table :data="props.row.children" stripe border style="width: 94%;margin: auto;"> <el-table :data="props.row.children" stripe border style="width: 94%;margin: auto;">
<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"/>
<el-table-column prop="sizeName" label="装备号型" align="center"/>
<el-table-column prop="zsCount" label="总数" sortable align="center"/> <el-table-column prop="zsCount" label="总数" sortable align="center"/>
<el-table-column prop="zkCount" label="今年入库数" sortable align="center"/> <el-table-column prop="zkCount" label="今年入库数" sortable align="center"/>
<el-table-column prop="ckCount" label="今年出库数" sortable align="center"/> <el-table-column prop="ckCount" label="今年出库数" sortable align="center"/>
<el-table-column prop="bfCount" label="今年报废数" sortable align="center"/> <el-table-column prop="bfCount" label="今年报废数" sortable align="center"/>
<el-table-column label="操作" width="80" align="center" fixed="right"> <el-table-column label="操作" width="80" align="center" fixed="right">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button size="mini" type="primary" @click="show(scope.row.id, props.row.findCode, props.row.orgCode)">查看</el-button> <el-button size="mini" type="primary" @click="show(scope.row.id, scope.row.sizeId, props.row.findCode, props.row.orgCode)">查看</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -149,7 +150,7 @@ export default { ...@@ -149,7 +150,7 @@ export default {
}, },
methods: { methods: {
beforeInit() { beforeInit() {
this.url = window._CONFIG['serviceURL'] + '/api/Tj/GetPageOrgTj' this.url = window._CONFIG['serviceURL'] + '/api/Tj/GetPageOrgEqmTj'
this.params = { page: this.page, size: this.size, orgId: this.orgId || this.$store.state.user.user.baseJpOrganization.id } this.params = { page: this.page, size: this.size, orgId: this.orgId || this.$store.state.user.user.baseJpOrganization.id }
const typeId = this.typeId const typeId = this.typeId
const equipmentCode = this.equipmentCode const equipmentCode = this.equipmentCode
...@@ -257,8 +258,8 @@ export default { ...@@ -257,8 +258,8 @@ export default {
if(res.code == '10000') { if(res.code == '10000') {
list = res.data.content list = res.data.content
import('@/utils/Export2Excel').then(excel => { import('@/utils/Export2Excel').then(excel => {
const tHeader = ['装备名称', '总数', '今年入库数', '今年出库数', '今年报废数'] const tHeader = ['装备名称','装备号型', '总数', '今年入库数', '今年出库数', '今年报废数']
const filterVal = ['name', 'zsCount', 'zkCount', 'ckCount', 'bfCount'] const filterVal = ['name','sizeName', 'zsCount', 'zkCount', 'ckCount', 'bfCount']
for (let org of list) { for (let org of list) {
result.push({ result.push({
sheetTitle: org.orgName, sheetTitle: org.orgName,
...@@ -269,7 +270,7 @@ export default { ...@@ -269,7 +270,7 @@ export default {
excel.export_json_to_excel({ excel.export_json_to_excel({
// header: tHeader, // header: tHeader,
data: result, data: result,
filename: this.excelName || '库存统计报表', filename: this.excelName || '装备统计报表',
autoWidth: true, autoWidth: true,
bookType: 'xlsx' bookType: 'xlsx'
}) })
...@@ -312,9 +313,9 @@ export default { ...@@ -312,9 +313,9 @@ export default {
return sums; return sums;
}, },
show(equipmentId, findCode, orgCode) { show(equipmentId, sizeId, findCode, orgCode) {
const _this = this.$refs.form const _this = this.$refs.form
_this.initTable(equipmentId, findCode, orgCode, this.code) _this.initTable(equipmentId, sizeId, findCode, orgCode, this.code)
_this.dialog = true _this.dialog = true
} }
} }
......
...@@ -11,7 +11,6 @@ ...@@ -11,7 +11,6 @@
class="filter-item" class="filter-item"
:filterable="true" :filterable="true"
clearable clearable
:filter-method="dataFilterV2"
placeholder="请选择供应商" placeholder="请选择供应商"
@change="initPost" @change="initPost"
> >
...@@ -22,7 +21,6 @@ ...@@ -22,7 +21,6 @@
class="filter-item" class="filter-item"
:filterable="true" :filterable="true"
clearable clearable
:filter-method="dataFilter"
placeholder="请选择装备" placeholder="请选择装备"
@change="getListEquipmentSize" @change="getListEquipmentSize"
ref="select"> ref="select">
......
...@@ -148,7 +148,8 @@ export default { ...@@ -148,7 +148,8 @@ export default {
page: '0', page: '0',
size: '999', size: '999',
orgizationCode: this.orgId || this.$store.state.user.user.baseJpOrganization.id, orgizationCode: this.orgId || this.$store.state.user.user.baseJpOrganization.id,
level: '本级' //level: '本级'
level:this.level
} }
getPagePoliceman(params).then(res => { getPagePoliceman(params).then(res => {
if (res.code == '10000') { if (res.code == '10000') {
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
</tr> </tr>
<tr> <tr>
<th class="textHeader">领用警员</th> <th class="textHeader">领用警员</th>
<td class="textContent">{{form.policeName}}</td> <td class="textContent">{{form.policeNote}}</td>
<th class="textHeader">领用原因</th> <th class="textHeader">领用原因</th>
<td colspan="3" class="textContentLast">{{form.note}}</td> <td colspan="3" class="textContentLast">{{form.note}}</td>
</tr> </tr>
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论