Commit dd83ebf5 by T

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

parent c9b3cea7
...@@ -32,7 +32,7 @@ module.exports = { ...@@ -32,7 +32,7 @@ module.exports = {
}, },
// Various Dev Server settings // 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 port: 9998, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
autoOpenBrowser: true, autoOpenBrowser: true,
errorOverlay: true, errorOverlay: true,
......
...@@ -140,16 +140,16 @@ export default { ...@@ -140,16 +140,16 @@ export default {
} }
this.$store.dispatch('Login', user).then(() => { this.$store.dispatch('Login', user).then(() => {
this.loading = false this.loading = false
if (decrypt(user.password) === '123456') { // if (decrypt(user.password) === '123456') {
this.$router.push({ path: '/user/center', query: { // this.$router.push({ path: '/user/center', query: {
changePassword: true // changePassword: true
} }) // } })
setTimeout(() => { // setTimeout(() => {
this.$message.warning('应省厅整改要求, 您目前的密码过于简单, 请及时修改') // this.$message.warning('应省厅整改要求, 您目前的密码过于简单, 请及时修改')
}, 1500) // }, 1500)
} else { // } else {
this.$router.push({ path: this.redirect || '/' }) this.$router.push({ path: this.redirect || '/' })
} // }
setTimeout(this.purchaseAlert , 2000) setTimeout(this.purchaseAlert , 2000)
this.getOrgList() this.getOrgList()
}).catch((err) => { }).catch((err) => {
......
...@@ -17,8 +17,16 @@ ...@@ -17,8 +17,16 @@
:default-value="new Date() - 8.64e7" :picker-options="pickerOptions"/> :default-value="new Date() - 8.64e7" :picker-options="pickerOptions"/>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-input v-model="form.policeNote" style="width: 240px;" <el-select v-model="form.policeId" style="width: 240px;" filterable placeholder="请选择借用人">
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-form-item>
</el-collapse-item> </el-collapse-item>
<el-collapse-item name="2"> <el-collapse-item name="2">
......
...@@ -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.policeNote}}</td> <td class="textContent">{{form.policeName}}</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>
......
...@@ -14,7 +14,11 @@ ...@@ -14,7 +14,11 @@
{{ item.label }} {{ item.label }}
</el-checkbox> </el-checkbox>
</el-popover> </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="3">全部</el-radio-button>
<el-radio-button label="0">待审批</el-radio-button> <el-radio-button label="0">待审批</el-radio-button>
<el-radio-button label="1">已通过</el-radio-button> <el-radio-button label="1">已通过</el-radio-button>
...@@ -38,22 +42,26 @@ ...@@ -38,22 +42,26 @@
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" @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> </div>
<!--表单组件--> <!--表单组件-->
<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"/>
<!-- 领用 -->
<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 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 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="warehouseName" label="目标仓库" align="center"/>
<el-table-column prop="applyName" label="申请人" width="120px" 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="applyTime" label="创建时间" width="160px" align="center"/>
<el-table-column prop="updateTime" 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="note" label="理由" :show-overflow-tooltip="true" align="center" />
<el-table-column prop="flowState" label="审批状态" align="center" width="120px"> <el-table-column prop="flowState" label="审批状态" align="center" width="120px" v-if="actionType == '0'">
<template slot-scope="scope"> <template slot-scope="scope">
<el-tag v-if="scope.row.flowState" type="success">已通过</el-tag> <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="warning">待审批</el-tag>
...@@ -62,7 +70,7 @@ ...@@ -62,7 +70,7 @@
<el-tag v-else-if="!scope.row.flowState && scope.row.userInfo === ''" type="danger">已驳回</el-tag> <el-tag v-else-if="!scope.row.flowState && scope.row.userInfo === ''" type="danger">已驳回</el-tag>
</template> </template>
</el-table-column> </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"> <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="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="2" @click="edit(scope.row)" v-if="!scope.row.flowState && scope.row.userInfo === '' && activeName == 0">编辑</el-button>
...@@ -70,6 +78,23 @@ ...@@ -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> <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> </template>
</el-table-column> </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-table>
<!--分页组件--> <!--分页组件-->
<el-pagination <el-pagination
...@@ -86,26 +111,31 @@ import initData from '@/mixins/initData' ...@@ -86,26 +111,31 @@ import initData from '@/mixins/initData'
import applyForm from '../apply/form' import applyForm from '../apply/form'
import approvalForm from '../approval/form' import approvalForm from '../approval/form'
import listForm from '../list/form' import listForm from '../list/form'
import applyLyForm from '../../receive/apply/form'
import listLyForm from '../../receive/apply/detailForm'
import { getProcess } from '@/api/process' import { getProcess } from '@/api/process'
import { approveOrder, getByID } from '@/api/borrow' import { approveOrder, getByID, deleteOrder } from '@/api/borrow'
export default { export default {
name: 'TransferCommon', name: 'TransferCommon',
mixins: [initData], mixins: [initData],
props: ['warehouseList', 'activeName'], props: ['warehouseList', 'activeName'],
components: { applyForm, listForm, approvalForm }, components: { applyForm, listForm, approvalForm, applyLyForm, listLyForm },
data() { data() {
return { return {
loading: false, loading: false,
orderId: '', orderId: '',
actionType: '0',
approveType: '3', approveType: '3',
flowType: '', flowType: '',
delLoading: false,
urlList: [ urlList: [
'/api/Borrow/GetAllBorrowOrderList', '/api/Borrow/GetAllBorrowOrderList',
'/api/Process/GetPageProcessList', '/api/Process/GetPageProcessList',
'/api/Process/GetPageHistoryProcessList' '/api/Process/GetPageHistoryProcessList'
], ],
jsonParams: [ 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 },
{ 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 { ...@@ -140,6 +170,7 @@ export default {
this.params = this.jsonParams[this.activeName] this.params = this.jsonParams[this.activeName]
this.params.page = this.page this.params.page = this.page
this.params.size = this.size this.params.size = this.size
this.params.actionType = this.actionType
this.params['approveType'] = this.approveType this.params['approveType'] = this.approveType
this.params['orderId'] = this.orderId this.params['orderId'] = this.orderId
this.params['warehouseId'] = this.query.warehouseId this.params['warehouseId'] = this.query.warehouseId
...@@ -169,6 +200,11 @@ export default { ...@@ -169,6 +200,11 @@ export default {
_this.getProcess(data.nextStepId) _this.getProcess(data.nextStepId)
_this.dialog = true _this.dialog = true
}, },
toPostQuerychange(){
this.query.warehouseId= ''
this.approveType= 3
this.initPost()
},
show(data) { show(data) {
const _this = this.$refs.listForm const _this = this.$refs.listForm
getByID({id: data.id}).then(res => { getByID({id: data.id}).then(res => {
...@@ -251,6 +287,65 @@ export default { ...@@ -251,6 +287,65 @@ export default {
this.loading = false this.loading = false
console.log(err) 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 @@ ...@@ -3,7 +3,7 @@
<el-card> <el-card>
<el-tabs v-model="activeName" tab-position="left" style="padding: 5px;" @tab-click="handleClick"> <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)"> <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"/> <borrow-my-common :warehouseList="warehouseList" :activeName="activeName" ref="first"/>
</el-tab-pane> </el-tab-pane>
<el-tab-pane name="1" v-if="$store.state.user.user.roleIds.includes(3)"> <el-tab-pane name="1" v-if="$store.state.user.user.roleIds.includes(3)">
......
<template>
<div class="dashboard-editor-container">
<el-card>
<!-- 搜索 -->
<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="level" style="padding-bottom: 10px;" @change="toPostQuery">
<el-radio-button label="本级">本级</el-radio-button>
<el-radio-button label="本级及下级">本级及下级</el-radio-button>
</el-radio-group> -->
<el-cascader v-model="orgId" :options="orgList"
:props="{ value: 'id', label: 'name', checkStrictly: true, emitPath: false }" filterable
clearable :show-all-levels="false" class="filter-item" style="width: 300px;margin-left:0px" placeholder="请选择本级或下级的组织机构" @change="orgChange"/>
<el-cascader v-model="typeId" :options="typeList"
:props="{ value: 'id', label: 'name', checkStrictly: true, emitPath: false }" filterable
clearable :show-all-levels="false" class="filter-item" style="width: 300px;" placeholder="请选择装备类型" @change="typeChange"/>
<el-select v-model="equipmentCode"
style="width:240px"
class="filter-item"
:filterable="true"
clearable
:filter-method="dataFilter"
placeholder="请选择装备"
@change="equipmentChange"
ref="select">
<el-option v-for="item in equipmentList" :key="item.id" :label="item.name" :value="item.id"/>
</el-select>
<el-select v-model="equipmentSizecode"
style="width:240px"
clearable
class="filter-item"
:filterable="true"
placeholder="请选择装备型号"
@change="initPost">
<el-option v-for="item in equipmentSizeList" :key="item.id" :label="item.sizeName" :value="item.id"/>
</el-select>
<el-button :loading="downloadLoading" class="filter-item" type="warning" icon="el-icon-download" style="float: right" @click="download">导出</el-button>
</div>
<!--表格渲染-->
<el-table ref="table" v-loading="loading" :data="data" show-summary :summary-method="getSummaries" stripe border style="width: 100%;">
<el-table-column type="index" label="序号" align="center" width="50"/>
<el-table-column prop="parentName" label="类别" align="center"/>
<el-table-column prop="equipmentName" label="装备名称" sortable align="center">
<template slot-scope="scope">
{{scope.row.equipmentName + (scope.row.sizeName != '无号配号' ? '(' + scope.row.sizeName + ')' : '')}}
</template>
</el-table-column>
<el-table-column prop="zsCount" label="数量" sortable align="center"/>
<el-table-column prop="price" label="单价(元)" sortable align="center"/>
<el-table-column prop="sumPrice" label="合计(元)" sortable align="center"/>
</el-table>
<!--分页组件-->
<el-pagination
:total="total"
:current-page="page + 1"
style="margin-top: 8px;"
:page-sizes="[10, 20, 50, 100, 200]"
layout="total, prev, pager, next, sizes"
@size-change="postSizeChange"
@current-change="postPageChange"/>
</el-card>
</div>
</template>
<script>
import { getListOrg, getOrgById } from '@/api/org'
import { getListEquipment } from '@/api/equipmentInfo'
import { getListEquipmentDetail } from '@/api/equipmentDetail'
import { getListEquipmentSize } from '@/api/equipmentSize'
import initData from '@/mixins/initData'
import { initPdata } from '@/api/data'
import md5 from 'js-md5'
import cnchar from "cnchar";
export default {
name: 'Equipmentall',
mixins: [initData],
data() {
return {
orgId: this.$store.state.user.user.baseJpOrganization.id,
code: this.$store.state.user.user.baseJpOrganization.code,
level: '本级',
typeId: '',
year: (new Date()).getFullYear() + '',
pickerOptions: {
disabledDate(time) {
return (
time.getFullYear() < "2020" ||
time.getFullYear() > new Date().getFullYear()
); // 注意是 || 不是 && 哦
}
},
orgList: [],
typeList: [],
equipmentCode: '',
equipmentSizecode: '',
copy: [],
equipmentList: [],
equipmentSizeList: [],
downloadLoading: false,
excelName: '',
sheetNameArray: [],// 导出sheet表名称
openEdData: {} // 展开的数据列
}
},
created() {
this.initOrgList()
this.initTypeList()
this.initEquipmentList()
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
})
},
methods: {
beforeInit() {
this.url = window._CONFIG['serviceURL'] + '/api/Tj/GetPageCBTjExp'
this.params = { page: this.page, size: this.size, orgId: this.orgId || this.$store.state.user.user.baseJpOrganization.id }
const typeId = this.typeId
const equipmentCode = this.equipmentCode
const equipmentSizecode = this.equipmentSizecode
const level = this.level
const warehouseId = this.warehouseId
if (level) { this.params['level'] = level }
if (typeId) { this.params['typeId'] = typeId }
if (equipmentCode) { this.params['equipmentCode'] = equipmentCode }
if (equipmentSizecode) { this.params['equipmentSizecode'] = equipmentSizecode }
if (warehouseId) { this.params['warehouseId'] = warehouseId }
return true
},
async initPost() {
if (!await this.beforeInit()) {
return
}
return new Promise((resolve, reject) => {
this.loading = true
initPdata(this.url, this.params).then(res => {
if (res.code === '10000') {
this.total = res.data.totalElements
this.data = res.data.content
setTimeout(() => {
this.loading = false
}, this.time)
resolve(res)
} else this.$message.error(res.msg)
}).catch(err => {
this.loading = false
reject(err)
})
})
},
initOrgList() {
getListOrg({id: this.orgId}).then(res => {
this.orgList = res.data
})
},
orgChange(id) {
getOrgById({id:id}).then(res => {
this.code = res.data.code
this.initPost()
})
},
initTypeList() {
getListEquipment({}).then(res => {
this.typeList = res.data
})
},
initEquipmentList() {
this.equipmentSizecode = ''
this.equipmentSizeList = []
getListEquipmentDetail({equipmentId: this.typeId}).then(res => {
this.equipmentList = res.data
//保留数据源
this.copy = Object.assign(this.equipmentList)
})
},
typeChange() {
this.initEquipmentList()
this.initPost()
},
equipmentChange() {
this.equipmentSizecode = ''
this.equipmentSizeList = []
this.getListEquipmentSize()
this.initPost()
},
getListEquipmentSize() {
if (this.equipmentCode) {
getListEquipmentSize({detailId : this.equipmentCode}).then(res => {
this.equipmentSizeList = res.data
})
}
},
dataFilter(v) {
//对绑定数据赋值
this.equipmentList = this.copy.filter((item) => {
console.log(item)
//如果直接包含输入值直接返回true
if (item.name.indexOf(v) !== -1) return true;
//将label拆散成小写拼音数组
let arr = item.name.spell('array','first','low');
//拼接成完整label的拼音
let spell = arr.join('');
//lengths 是label完整拼音 中每个汉字第一个拼音字母的index值的数组
let lengths = [0];
for (var i = 0; i < arr.length - 1; i++) {
lengths.push(lengths[i] + arr[i].length);
};
//判断label完整拼音 中 输入值的 index 是不是等于某个汉字第一个拼音字母的index值
return lengths.indexOf(spell.indexOf(v)) !== -1;
})
},
download() {
this.downloadLoading = true
var params = { orgId: this.orgId || this.$store.state.user.user.baseJpOrganization.id, page: 0, size: 999 }
const typeId = this.typeId
const equipmentCode = this.equipmentCode
const equipmentSizecode = this.equipmentSizecode
const level = this.level
const warehouseId = this.warehouseId
if (level) { params['level'] = level }
if (typeId) { params['typeId'] = typeId }
if (equipmentCode) { params['equipmentCode'] = equipmentCode }
if (equipmentSizecode) { params['equipmentSizecode'] = equipmentSizecode }
if (warehouseId) { params['warehouseId'] = warehouseId }
let list = []
let result = []
initPdata(window._CONFIG['serviceURL'] + '/api/Tj/GetPageCBTjExp', params).then(res => {
if(res.code == '10000') {
list = res.data.content
import('@/utils/Export2Excel备份').then(excel => {
const tHeader = ['类别', '装备名称', '数量', '单价(元)', '合计(元)']
const filterVal = ['parentName', 'equipmentName', 'zsCount', 'price', 'sumPrice']
result = this.formatJson(filterVal, list)
excel.export_json_to_excel({
header: tHeader,
data: result,
filename: this.excelName || '警用装备储备统计表',
autoWidth: true,
bookType: 'xlsx'
})
this.downloadLoading = false
})
} else {
this.$message.error(res.msg)
}
})
},
formatJson(filterVal, jsonData) {
return jsonData.map(v => filterVal.map(j => {
if (j == 'equipmentName' && v['sizeName'] != '无号配号' ) {
return v[j] + '(' + v['sizeName'] + ')'
} else {
return v[j]
}
}))
},
getSummaries(param) {
const { columns, data } = param;
const sums = [];
columns.forEach((column, index) => {
if (index === 1) {
sums[index] = '本页合计';
return;
}
const values = data.map(item => Number(item[column.property]));
if (!values.every(value => isNaN(value))) {
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr);
if (!isNaN(value)) {
return prev + curr;
} else {
return prev;
}
}, 0);
sums[index] += '';
} else {
sums[index] = '';
}
});
return sums;
}
}
}
</script>
<style scoped>
</style>
<style rel="stylesheet/scss" lang="scss" scoped>
.dashboard-editor-container {
padding: 10px 12px 12px 12px;
background-color: rgb(240, 242, 245);
}
</style>
...@@ -79,8 +79,9 @@ ...@@ -79,8 +79,9 @@
<el-table-column label="操作" width="150px" align="left" fixed="right"> <el-table-column label="操作" width="150px" align="left" fixed="right">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button size="mini" type="primary" key="2" @click="show(scope.row)">查看</el-button> <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> <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> </template>
</el-table-column> </el-table-column>
...@@ -165,6 +166,7 @@ export default { ...@@ -165,6 +166,7 @@ export default {
dbType: '支', dbType: '支',
dbOrder: '', dbOrder: '',
dialogVisible: false, dialogVisible: false,
orgCode: this.$store.state.user.user.baseJpOrganization.code,
processUrl: { processUrl: {
"p0": '/api/Transfer/GetByID', "p0": '/api/Transfer/GetByID',
"p1": '/api/PuchaseOrder/GetByID', "p1": '/api/PuchaseOrder/GetByID',
......
<template> <template>
<el-dialog :append-to-body="true" :close-on-click-modal="false" :visible.sync="dialog" :title="'打印单据'" width="1500px"> <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"> <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'> <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:41pt'> <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=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=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=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=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=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'> <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'> <tr height=48 style='mso-height-source:userset;height:36.0pt'>
<td colspan=10 height=48 class=xl8426343 width=1071 style='height:36.0pt; <td colspan=10 height=48 class=xl8426343 width=1071 style='height:36.0pt;
...@@ -172,29 +172,33 @@ ...@@ -172,29 +172,33 @@
<tr height=33 style='mso-height-source:userset;height:24.95pt'> <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=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 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 class=xl8126343 align=right style='border-top:none;border-left:none'>{{totalPrice.toFixed(2)}}
</td> </td> -->
<td class=xl8126343 style='border-top:none;border-left:none'> </td> <td class=xl8126343 style='border-top:none;border-left:none'> </td>
</tr> </tr>
<tr height=66 style='mso-height-source:userset;height:50.1pt'> <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 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=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=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> <td class=xl8226343 style='border-top:none'> </td>
</tr> </tr>
<tr height=66 style='page-break-before:always;mso-height-source:userset; <tr height=66 style='page-break-before:always;mso-height-source:userset;
height:50.1pt'> height:50.1pt'>
<td colspan=2 height=66 class=xl9126343 style='height:50.1pt'>审 批 人</td> <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=xl7726343> </td> <td class=xl7726343></td>
<td class=xl7826343>经 办 人</td> <td class=xl7726343>经 办 人</td>
<td class=xl7626343> &nbsp;</td> <td class=xl7726343> &nbsp;</td>
<td class=xl7826343>经 办 人</td> <td class=xl7726343>经 办 人</td>
<td class=xl8326343>&nbsp;</td> <td class=xl8326343>&nbsp;</td>
</tr> </tr>
<!-- <![if supportMisalignedColumns]> --> <!-- <![if supportMisalignedColumns]> -->
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
</tr> </tr>
<tr> <tr>
<th class="textHeader">领用警员</th> <th class="textHeader">领用警员</th>
<td class="textContent">{{form.policeNote}}</td> <td class="textContent">{{form.policeName}}</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>
......
...@@ -12,8 +12,14 @@ ...@@ -12,8 +12,14 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-input v-model="form.policeNote" style="width: 240px;" <el-select v-model="form.policeId" style="width: 240px;" filterable placeholder="请选择领用人">
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-form-item>
</el-collapse-item> </el-collapse-item>
<el-collapse-item name="2"> <el-collapse-item name="2">
...@@ -97,7 +103,7 @@ ...@@ -97,7 +103,7 @@
import { getListOrgWarehouse } from '@/api/warehouse' import { getListOrgWarehouse } from '@/api/warehouse'
import { addAndApprovalBorrowOrder } from '@/api/borrow' import { addAndApprovalBorrowOrder } from '@/api/borrow'
import { getAllInventoryList } from '@/api/inventory' import { getAllInventoryList } from '@/api/inventory'
import { deleteTxt, addTxt, getListTxt } from '@/api/policeman' import { deleteTxt, addTxt, getListTxt, getPagePoliceman } from '@/api/policeman'
import cnchar from "cnchar"; import cnchar from "cnchar";
export default { export default {
props: { props: {
...@@ -120,6 +126,7 @@ export default { ...@@ -120,6 +126,7 @@ export default {
orgId : this.$store.state.user.user.baseJpOrganization.id, orgId : this.$store.state.user.user.baseJpOrganization.id,
orgCode : this.$store.state.user.user.baseJpOrganization.code.substring(0,6), orgCode : this.$store.state.user.user.baseJpOrganization.code.substring(0,6),
note : '', note : '',
policeId: '',
applyId: this.$store.state.user.user.id, applyId: this.$store.state.user.user.id,
applyName: this.$store.state.user.user.nickName, applyName: this.$store.state.user.user.nickName,
detailList: [], detailList: [],
...@@ -170,6 +177,16 @@ export default { ...@@ -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) { handleDelete(index, row) {
this.form.detailList.splice(index, 1) this.form.detailList.splice(index, 1)
......
...@@ -72,13 +72,13 @@ ...@@ -72,13 +72,13 @@
<el-tag v-else-if="!scope.row.flowState && scope.row.userInfo === ''" type="danger">已驳回</el-tag> <el-tag v-else-if="!scope.row.flowState && scope.row.userInfo === ''" type="danger">已驳回</el-tag>
</template> </template>
</el-table-column> </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"> <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="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="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="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="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> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -137,6 +137,7 @@ export default { ...@@ -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 },
{ 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:[ flowTypeOptions:[
{ key: 'allocationUp', display_name: '调拨申请' }, { key: 'allocationUp', display_name: '调拨申请' },
{ key: 'allocationDown', display_name: '调拨下发' } { key: 'allocationDown', display_name: '调拨下发' }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论