Commit dd83ebf5 by T

借、领合并同步总平台及bug修复

parent c9b3cea7
......@@ -32,7 +32,7 @@ module.exports = {
},
// Various Dev Server settings
host: '192.168.2.105', // can be overwritten by process.env.HOST
host: '192.168.2.246', // can be overwritten by process.env.HOST
port: 9998, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
autoOpenBrowser: true,
errorOverlay: true,
......
......@@ -140,16 +140,16 @@ export default {
}
this.$store.dispatch('Login', user).then(() => {
this.loading = false
if (decrypt(user.password) === '123456') {
this.$router.push({ path: '/user/center', query: {
changePassword: true
} })
setTimeout(() => {
this.$message.warning('应省厅整改要求, 您目前的密码过于简单, 请及时修改')
}, 1500)
} else {
// if (decrypt(user.password) === '123456') {
// this.$router.push({ path: '/user/center', query: {
// changePassword: true
// } })
// setTimeout(() => {
// this.$message.warning('应省厅整改要求, 您目前的密码过于简单, 请及时修改')
// }, 1500)
// } else {
this.$router.push({ path: this.redirect || '/' })
}
// }
setTimeout(this.purchaseAlert , 2000)
this.getOrgList()
}).catch((err) => {
......
......@@ -17,8 +17,16 @@
:default-value="new Date() - 8.64e7" :picker-options="pickerOptions"/>
</el-form-item>
<el-form-item>
<el-input v-model="form.policeNote" style="width: 240px;"
placeholder="请填写借用人名称"/>
<el-select v-model="form.policeId" style="width: 240px;" filterable placeholder="请选择借用人">
<el-option
v-for="item in policeList"
:key="item.name"
:label="item.name"
:value="item.id">
</el-option>
</el-select>
<!-- <el-input v-model="form.policeNote" style="width: 240px;"
placeholder="请填写借用人名称"/> -->
</el-form-item>
</el-collapse-item>
<el-collapse-item name="2">
......
......@@ -37,7 +37,7 @@
</tr>
<tr style="border-bottom:1px solid #e8e8e8;">
<th class="textHeader">借用警员</th>
<td class="textContent">{{form.policeNote}}</td>
<td class="textContent">{{form.policeName}}</td>
<th class="textHeader">拟还时间</th>
<td class="textContent" style="padding-top:8px;padding-bottom:8px;"><el-tag type="warning">{{form.expectedTime}}</el-tag></td>
<th class="textHeader">申请理由</th>
......
......@@ -14,13 +14,17 @@
{{ item.label }}
</el-checkbox>
</el-popover>
<el-radio-group v-model="approveType" style="padding-bottom: 10px;" @change="toPostQuery">
<el-radio-group v-model="actionType" style="padding-bottom: 10px;" @change="toPostQuerychange()" v-if="activeName == 0">
<el-radio-button label="0">借用</el-radio-button>
<el-radio-button label="1">领用</el-radio-button>
</el-radio-group>
<el-radio-group v-model="approveType" class="filter-item" v-if="actionType == '0'" @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-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"
......@@ -38,22 +42,26 @@
start-placeholder="开始日期"
end-placeholder="结束日期"/>
<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" @click="add">借用申请</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="primary" class="filter-item" style="float: right" v-if="activeName == 0 && actionType == '1'" @click="addLY">领用申请</el-button>
</div>
<!--表单组件-->
<apply-form ref="applyForm" :is-add="isAdd" />
<list-form ref="listForm" />
<approval-form ref="approvalForm"/>
<!-- 领用 -->
<apply-ly-form ref="applyLyForm" :is-add="isAdd" />
<list-ly-form ref="listLyForm" />
<!--表格开始-->
<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="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">
<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" v-if="actionType == '0'"/>
<el-table-column prop="note" label="理由" :show-overflow-tooltip="true" align="center" />
<el-table-column prop="flowState" label="审批状态" align="center" width="120px" v-if="actionType == '0'">
<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>
......@@ -62,7 +70,7 @@
<el-tag v-else-if="!scope.row.flowState && scope.row.userInfo === ''" type="danger">已驳回</el-tag>
</template>
</el-table-column>
<el-table-column label="操作" width="150px" align="left" fixed="right">
<el-table-column label="操作" width="150px" align="left" fixed="right" v-if="actionType == '0'">
<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>
......@@ -70,6 +78,23 @@
<el-button size="mini" type="danger" key="4" @click="back(scope.row)" :loading="loading" v-if="!scope.row.flowState && scope.row.userInfo !== '' && activeName == 0">撤销</el-button>
</template>
</el-table-column>
<el-table-column label="操作" width="200" align="left" fixed="right" v-if="actionType == '1'">
<template slot-scope="scope">
<el-button size="mini" type="warning" @click="editLY(scope.row)" :disabled="scope.row.changeFlag === 1">编辑</el-button>
<el-popover
:ref="scope.row.id"
placement="top"
width="180">
<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="subDeleteLY(scope.row.id)">确定</el-button>
</div>
<el-button slot="reference" type="danger" size="mini" :disabled="scope.row.changeFlag === 1">删除</el-button>
</el-popover>
<el-button size="mini" type="primary" @click="showLY(scope.row)">查看</el-button>
</template>
</el-table-column>
</el-table>
<!--分页组件-->
<el-pagination
......@@ -86,26 +111,31 @@ import initData from '@/mixins/initData'
import applyForm from '../apply/form'
import approvalForm from '../approval/form'
import listForm from '../list/form'
import applyLyForm from '../../receive/apply/form'
import listLyForm from '../../receive/apply/detailForm'
import { getProcess } from '@/api/process'
import { approveOrder, getByID } from '@/api/borrow'
import { approveOrder, getByID, deleteOrder } from '@/api/borrow'
export default {
name: 'TransferCommon',
mixins: [initData],
props: ['warehouseList', 'activeName'],
components: { applyForm, listForm, approvalForm },
components: { applyForm, listForm, approvalForm, applyLyForm, listLyForm },
data() {
return {
loading: false,
orderId: '',
actionType: '0',
approveType: '3',
flowType: '',
delLoading: false,
urlList: [
'/api/Borrow/GetAllBorrowOrderList',
'/api/Process/GetPageProcessList',
'/api/Process/GetPageHistoryProcessList'
],
jsonParams: [
{ applyId: this.$store.state.user.user.id, actionType: 0 },
{ applyId: this.$store.state.user.user.id },
{ orgId: this.$store.state.user.user.baseJpOrganization.id, flowType: 'borrowMy', userId: this.$store.state.user.user.id, roleIds: this.$store.state.user.user.roleIds },
{ orgId: this.$store.state.user.user.baseJpOrganization.id, flowType: "borrowMy", userId: this.$store.state.user.user.id, roleIds: this.$store.state.user.user.roleIds }
]
......@@ -140,6 +170,7 @@ export default {
this.params = this.jsonParams[this.activeName]
this.params.page = this.page
this.params.size = this.size
this.params.actionType = this.actionType
this.params['approveType'] = this.approveType
this.params['orderId'] = this.orderId
this.params['warehouseId'] = this.query.warehouseId
......@@ -169,6 +200,11 @@ export default {
_this.getProcess(data.nextStepId)
_this.dialog = true
},
toPostQuerychange(){
this.query.warehouseId= ''
this.approveType= 3
this.initPost()
},
show(data) {
const _this = this.$refs.listForm
getByID({id: data.id}).then(res => {
......@@ -251,6 +287,65 @@ export default {
this.loading = false
console.log(err)
})
},
addLY() {
this.isAdd = true
this.$refs.applyLyForm.getListOrgWarehouse(this.isAdd)
this.$refs.applyLyForm.getPolicemans()
this.$refs.applyLyForm.dialog = true
},
editLY(data) {
this.isAdd = false
const _this = this.$refs.applyLyForm
_this.getPolicemans()
_this.getListOrgWarehouse(this.isAdd)
_this.form = {
id: data.id,
applyId: data.applyId,
applyName: data.applyName,
detailList: data.detailList,
orgCode: data.orgCode,
orgId: data.orgId,
warehouseId: data.warehouseId,
note: data.note,
policeId: data.policeId
}
console.log(_this.form)
_this.dialog = true
},
showLY(data) {
const _this = this.$refs.listLyForm
getByID({id: data.id}).then(res => {
if(res.code == '10000') {
_this.form = res.data
_this.getSteps()
} else {
this.$message.error(res.msg)
}
})
_this.dialog = true
},
subDeleteLY(id) {
this.delLoading = true
deleteOrder({id: id}).then(res => {
if(res.code ==='10000') {
this.$refs[id].doClose()
this.dleChangePage()
this.initPost()
this.$notify({
title: '删除成功',
type: 'success',
duration: 2500
})
} else {
this.$message.error(res.msg)
}
this.delLoading = false
}).catch(err => {
this.delLoading = false
this.$refs[id].doClose()
console.log(err.response.data.message)
})
}
}
}
......
......@@ -3,7 +3,7 @@
<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>
<span slot="label"><i class="el-icon-date"></i> 申请列表</span>
<borrow-my-common :warehouseList="warehouseList" :activeName="activeName" ref="first"/>
</el-tab-pane>
<el-tab-pane name="1" v-if="$store.state.user.user.roleIds.includes(3)">
......
......@@ -79,8 +79,9 @@
<el-table-column label="操作" width="150px" align="left" fixed="right">
<template slot-scope="scope">
<el-button size="mini" type="primary" key="2" @click="show(scope.row)">查看</el-button>
<el-button size="mini" type="warning" key="3" @click="printExcel(scope.row.order)" v-if="scope.row.stateType == '0' && scope.row.type == 1">打印</el-button>
<!-- <el-button size="mini" type="warning" key="4" @click="printExcel2(scope.row.order)" v-if="(scope.row.type == 0 || scope.row.type == 4)">打印</el-button> -->
<!-- 目前暂定宁波市局可以打印,而且调拨申请上来的单子报错不管,因为实际上没有调拨申请 -->
<el-button size="mini" type="warning" key="3" @click="printExcel(scope.row.order)" v-if="scope.row.stateType == '0' && scope.row.type == 1 && orgCode === '330200000000'">打印</el-button>
<el-button size="mini" type="warning" key="4" @click="printExcel2(scope.row.order)" v-if="(scope.row.type == 0 || scope.row.type == 4) && orgCode === '330200000000'">打印</el-button>
<el-button size="mini" type="warning" key="1" v-if="scope.row.type == 11 && scope.row.currentState == 1" @click="transfer(scope.row)">转换</el-button>
</template>
</el-table-column>
......@@ -165,6 +166,7 @@ export default {
dbType: '支',
dbOrder: '',
dialogVisible: false,
orgCode: this.$store.state.user.user.baseJpOrganization.code,
processUrl: {
"p0": '/api/Transfer/GetByID',
"p1": '/api/PuchaseOrder/GetByID',
......
<template>
<el-dialog :append-to-body="true" :close-on-click-modal="false" :visible.sync="dialog" :title="'打印单据'" width="1500px">
<div id="printHtml" align=center x:publishsource="Excel">
<table border=0 cellpadding=0 cellspacing=0 width=1071 style='border-collapse: collapse;table-layout:fixed;width:804pt'>
<col width=54 style='mso-width-source:userset;mso-width-alt:1728;width:41pt'>
<table border=0 cellpadding=0 cellspacing=0 width=1071 style='border-collapse: collapse;table-layout:fixed;width: 794pt'>
<col width=54 style='mso-width-source:userset;mso-width-alt:1728;width:81pt'>
<col width=69 style='mso-width-source:userset;mso-width-alt:2208;width:52pt'>
<col width=59 style='mso-width-source:userset;mso-width-alt:1888;width:44pt'>
<col width=108 style='mso-width-source:userset;mso-width-alt:3456;width:81pt'>
<col width=106 style='mso-width-source:userset;mso-width-alt:3392;width:80pt'>
<col width=106 style='mso-width-source:userset;mso-width-alt:3392;width:60pt'>
<col width=75 style='mso-width-source:userset;mso-width-alt:2400;width:56pt'>
<col width=136 style='mso-width-source:userset;mso-width-alt:4352;width:102pt'>
<col width=136 style='mso-width-source:userset;mso-width-alt:4352;width: 88pt'>
<col width=101 style='mso-width-source:userset;mso-width-alt:3232;width:76pt'>
<col width=156 style='mso-width-source:userset;mso-width-alt:4992;width:117pt'>
<col width=156 style='mso-width-source:userset;mso-width-alt:4992;width:105pt'>
<col width=207 style='mso-width-source:userset;mso-width-alt:6624;width:155pt'>
<tr height=48 style='mso-height-source:userset;height:36.0pt'>
<td colspan=10 height=48 class=xl8426343 width=1071 style='height:36.0pt;
......@@ -172,29 +172,33 @@
<tr height=33 style='mso-height-source:userset;height:24.95pt'>
<td colspan=3 height=33 class=xl8526343 style='height:24.95pt'>合计金额(大写):</td>
<td colspan=5 class=xl8926343 style='border-right:.5pt solid black'>{{digitUppercase(totalPrice)}}</td>
<td class=xl8126343 align=right style='border-top:none;border-left:none'>{{totalPrice.toFixed(2)}}
</td>
<!-- <td class=xl8126343 align=right style='border-top:none;border-left:none'>{{totalPrice.toFixed(2)}}
</td> -->
<td class=xl8126343 style='border-top:none;border-left:none'> </td>
</tr>
<tr height=66 style='mso-height-source:userset;height:50.1pt'>
<td colspan=2 height=66 class=xl8726343 style='height:50.1pt'>发物单位</td>
<td colspan=2 class=xl8826343> </td>
<td colspan=1 class=xl8826343> </td>
<td class=xl7426343 style='border-top:none'>发物单位</td>
<td class=xl7426343 style='border-top:none'> </td>
<td class=xl7526343 style='border-top:none'>发物单位</td>
<td class=xl7426343 style='border-top:none'>发物单位</td>
<td class=xl7426343 style='border-top:none'> </td>
<td class=xl7426343 style='border-top:none'>发物单位</td>
<td class=xl7426343 style='border-top:none'> </td>
<td class=xl7526343 style='border-top:none'>收物单位</td>
<td class=xl7426343 style='border-top:none'>收物单位</td>
<td class=xl8226343 style='border-top:none'> </td>
</tr>
<tr height=66 style='page-break-before:always;mso-height-source:userset;
height:50.1pt'>
<td colspan=2 height=66 class=xl9126343 style='height:50.1pt'>审 批 人</td>
<td colspan=2 class=xl7626343></td>
<td class=xl7726343></td>
<td class=xl7726343>审 核 人</td>
<td class=xl7726343></td>
<td class=xl7726343>财 务 章</td>
<td class=xl7726343> </td>
<td class=xl7826343>经 办 人</td>
<td class=xl7626343> &nbsp;</td>
<td class=xl7826343>经 办 人</td>
<td class=xl7726343></td>
<td class=xl7726343>经 办 人</td>
<td class=xl7726343> &nbsp;</td>
<td class=xl7726343>经 办 人</td>
<td class=xl8326343>&nbsp;</td>
</tr>
<!-- <![if supportMisalignedColumns]> -->
......
......@@ -27,7 +27,7 @@
</tr>
<tr>
<th class="textHeader">领用警员</th>
<td class="textContent">{{form.policeNote}}</td>
<td class="textContent">{{form.policeName}}</td>
<th class="textHeader">领用原因</th>
<td colspan="3" class="textContentLast">{{form.note}}</td>
</tr>
......
......@@ -12,8 +12,14 @@
</el-select>
</el-form-item>
<el-form-item>
<el-input v-model="form.policeNote" style="width: 240px;"
placeholder="请填写领用人名称"/>
<el-select v-model="form.policeId" style="width: 240px;" filterable placeholder="请选择领用人">
<el-option
v-for="item in policeList"
:key="item.name"
:label="item.name"
:value="item.id">
</el-option>
</el-select>
</el-form-item>
</el-collapse-item>
<el-collapse-item name="2">
......@@ -97,7 +103,7 @@
import { getListOrgWarehouse } from '@/api/warehouse'
import { addAndApprovalBorrowOrder } from '@/api/borrow'
import { getAllInventoryList } from '@/api/inventory'
import { deleteTxt, addTxt, getListTxt } from '@/api/policeman'
import { deleteTxt, addTxt, getListTxt, getPagePoliceman } from '@/api/policeman'
import cnchar from "cnchar";
export default {
props: {
......@@ -120,6 +126,7 @@ export default {
orgId : this.$store.state.user.user.baseJpOrganization.id,
orgCode : this.$store.state.user.user.baseJpOrganization.code.substring(0,6),
note : '',
policeId: '',
applyId: this.$store.state.user.user.id,
applyName: this.$store.state.user.user.nickName,
detailList: [],
......@@ -170,6 +177,16 @@ export default {
}
}
},
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)
}
})
console.log(this.form)
},
// 删除行
handleDelete(index, row) {
this.form.detailList.splice(index, 1)
......
......@@ -72,13 +72,13 @@
<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">
<el-table-column label="操作" :width="orgCode === '330200000000' ? '220' : '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="5" @click="printExcel2(scope.row.order)" v-if="activeName != 1 && scope.row.flowState">打印</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>
<el-button size="mini" type="warning" key="5" @click="printExcel2(scope.row.order)" v-if="activeName != 1 && orgCode === '330200000000'">打印</el-button>
</template>
</el-table-column>
</el-table>
......@@ -137,6 +137,7 @@ export default {
{ orgId: this.$store.state.user.user.baseJpOrganization.id, flowType: 'allocation', userId: this.$store.state.user.user.id, roleIds: this.$store.state.user.user.roleIds },
{ orgId: this.$store.state.user.user.baseJpOrganization.id, flowType: "allocation", userId: this.$store.state.user.user.id, roleIds: this.$store.state.user.user.roleIds }
],
orgCode: this.$store.state.user.user.baseJpOrganization.code,
flowTypeOptions:[
{ key: 'allocationUp', display_name: '调拨申请' },
{ key: 'allocationDown', display_name: '调拨下发' }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论