|
@@ -6,22 +6,23 @@
|
|
|
<a-row :gutter="48">
|
|
|
<a-col :md="6" :sm="24">
|
|
|
<a-form-item label="关键字">
|
|
|
- <a-input v-model.trim="queryParam.keyword" placeholder="请输入单号"/>
|
|
|
+ <a-input v-model.trim="queryParam.keyword" placeholder="请输入单号" />
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="24">
|
|
|
<a-form-item label="用友单号">
|
|
|
- <a-input v-model.trim="queryParam.yyId" placeholder="请输入用友单号"/>
|
|
|
+ <a-input v-model.trim="queryParam.yyId" placeholder="请输入用友单号" />
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="24">
|
|
|
<a-form-item label="出库类型">
|
|
|
<a-select v-model="queryParam.type" placeholder="请选择">
|
|
|
<a-select-option
|
|
|
- v-for="(label,value) in typeMap"
|
|
|
+ v-for="(label, value) in typeMap"
|
|
|
:key="value"
|
|
|
:label="label"
|
|
|
- :value="parseInt(value)">{{ label }}
|
|
|
+ :value="parseInt(value)"
|
|
|
+ >{{ label }}
|
|
|
</a-select-option>
|
|
|
</a-select>
|
|
|
</a-form-item>
|
|
@@ -30,10 +31,11 @@
|
|
|
<a-form-item label="申请部门">
|
|
|
<a-select v-model="queryParam.applyDept" placeholder="请选择">
|
|
|
<a-select-option
|
|
|
- v-for="(label,value) in deptYYMap"
|
|
|
+ v-for="(label, value) in deptYYMap"
|
|
|
:key="value"
|
|
|
:label="label"
|
|
|
- :value="parseInt(value)">{{ label }}
|
|
|
+ :value="parseInt(value)"
|
|
|
+ >{{ label }}
|
|
|
</a-select-option>
|
|
|
</a-select>
|
|
|
</a-form-item>
|
|
@@ -42,22 +44,31 @@
|
|
|
<a-form-item label="出库状态">
|
|
|
<a-select v-model="queryParam.status" placeholder="请选择">
|
|
|
<a-select-option
|
|
|
- v-for="(label,value) in statusMap"
|
|
|
+ v-for="(label, value) in statusMap"
|
|
|
:key="value"
|
|
|
:label="label"
|
|
|
- :value="parseInt(value)">{{ label }}
|
|
|
+ :value="parseInt(value)"
|
|
|
+ >{{ label }}
|
|
|
</a-select-option>
|
|
|
</a-select>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="24">
|
|
|
<a-form-item label="开始时间">
|
|
|
- <a-date-picker style="width:100%" v-model.trim="queryParam.searchStartTime" placeholder="请选择开始时间"/>
|
|
|
+ <a-date-picker
|
|
|
+ style="width:100%"
|
|
|
+ v-model.trim="queryParam.searchStartTime"
|
|
|
+ placeholder="请选择开始时间"
|
|
|
+ />
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="24">
|
|
|
<a-form-item label="结束时间">
|
|
|
- <a-date-picker style="width:100%" v-model.trim="queryParam.searchEndTime" placeholder="请选择结束时间"/>
|
|
|
+ <a-date-picker
|
|
|
+ style="width:100%"
|
|
|
+ v-model.trim="queryParam.searchEndTime"
|
|
|
+ placeholder="请选择结束时间"
|
|
|
+ />
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :md="6 || 24" :sm="24">
|
|
@@ -71,8 +82,17 @@
|
|
|
</div>
|
|
|
|
|
|
<div class="table-operator" style="margin-bottom: 8px;">
|
|
|
- <a-button v-if="$auth('store-out-store-forms-add')" type="primary" icon="plus" @click="handleAdd()">{{ outFlag?'新增':'退库申请' }}</a-button>
|
|
|
- <a-button style="margin-left: 8px" v-if="$auth('store-out-store-forms-export')" type="primary" icon="download" @click="doExport">导出</a-button>
|
|
|
+ <a-button v-if="$auth('store-out-store-forms-add')" type="primary" icon="plus" @click="handleAdd()">{{
|
|
|
+ outFlag ? '新增' : '退库申请'
|
|
|
+ }}</a-button>
|
|
|
+ <a-button
|
|
|
+ style="margin-left: 8px"
|
|
|
+ v-if="$auth('store-out-store-forms-export')"
|
|
|
+ type="primary"
|
|
|
+ icon="download"
|
|
|
+ @click="doExport"
|
|
|
+ >导出</a-button
|
|
|
+ >
|
|
|
<!--<a-dropdown v-action:edit v-if="selectedRowKeys.length > 0 && $auth('store-out-store-forms-del')">
|
|
|
<a-menu slot="overlay">
|
|
|
<a-popconfirm title="是否要删除所选数据?" @confirm="batchDelete()">
|
|
@@ -97,20 +117,28 @@
|
|
|
<span slot="action" slot-scope="record">
|
|
|
<template>
|
|
|
<a @click="handleView(record)">查看</a>
|
|
|
- <a-divider v-if="(record.status==0 || record.status == 3)&&outFlag" type="vertical" />
|
|
|
- <a v-if="$auth('store-out-store-forms-edit')&&(record.status==0 || record.status == 3)&&outFlag" @click="handleEdit(record)">修改</a>
|
|
|
+ <a-divider v-if="(record.status == 0 || record.status == 3) && outFlag" type="vertical" />
|
|
|
+ <a
|
|
|
+ v-if="$auth('store-out-store-forms-edit') && (record.status == 0 || record.status == 3) && outFlag"
|
|
|
+ @click="handleEdit(record)"
|
|
|
+ >修改</a
|
|
|
+ >
|
|
|
<a-divider v-if="record.status == 0 || record.status == 5 || record.status == 4" type="vertical" />
|
|
|
<a v-if="record.status == 4 || record.status == 5" @click="handleViewTicket(record)">打印</a>
|
|
|
- <a-divider v-if="record.status==0" type="vertical" />
|
|
|
- <a-popconfirm v-if="record.status==0" title="是否提交审核?" @confirm="updateStore(record.id)">
|
|
|
+ <a-divider v-if="record.status == 0" type="vertical" />
|
|
|
+ <a-popconfirm v-if="record.status == 0" title="是否提交审核?" @confirm="updateStore(record)">
|
|
|
<a>提交审核</a>
|
|
|
</a-popconfirm>
|
|
|
- <a-divider v-if="record.status==3" type="vertical" />
|
|
|
- <a-popconfirm v-if="record.status==3" title="重新推送?" @confirm="rePush(record.id)">
|
|
|
+ <a-divider v-if="record.status == 3" type="vertical" />
|
|
|
+ <a-popconfirm v-if="record.status == 3" title="重新推送?" @confirm="rePush(record.id)">
|
|
|
<a>重新推送</a>
|
|
|
</a-popconfirm>
|
|
|
- <a-divider v-if="record.status==0" type="vertical" />
|
|
|
- <a-popconfirm v-if="$auth('store-out-store-forms-del')&&record.status==0" title="是否要删除该条数据?" @confirm="batchDelete(record.id)">
|
|
|
+ <a-divider v-if="record.status == 0" type="vertical" />
|
|
|
+ <a-popconfirm
|
|
|
+ v-if="$auth('store-out-store-forms-del') && record.status == 0"
|
|
|
+ title="是否要删除该条数据?"
|
|
|
+ @confirm="batchDelete(record.id)"
|
|
|
+ >
|
|
|
<a>删除</a>
|
|
|
</a-popconfirm>
|
|
|
<!-- <a-divider v-if="record.status==2" type="vertical" />
|
|
@@ -120,17 +148,14 @@
|
|
|
</template>
|
|
|
</span>
|
|
|
<span slot="status" slot-scope="text">
|
|
|
- <badge
|
|
|
- :status="DictCache.COLOR.OUT_STORE_FORM_STATUS[text]"
|
|
|
- :text="statusMap[text]" />
|
|
|
+ <badge :status="DictCache.COLOR.OUT_STORE_FORM_STATUS[text]" :text="statusMap[text]" />
|
|
|
</span>
|
|
|
</s-table>
|
|
|
</div>
|
|
|
- <detail ref="detailModal" @ok="handleOk"/>
|
|
|
- <base-form ref="baseModal" @ok="handleOk"/>
|
|
|
- <base-form-back ref="baseBackModal" @ok="handleOk"/>
|
|
|
+ <detail ref="detailModal" @ok="handleOk" />
|
|
|
+ <base-form ref="baseModal" @ok="handleOk" />
|
|
|
+ <base-form-back ref="baseBackModal" @ok="handleOk" />
|
|
|
<ticket-form ref="ticketForm" @ok="handleOk" />
|
|
|
-
|
|
|
</a-card>
|
|
|
</template>
|
|
|
|
|
@@ -141,7 +166,13 @@ import BaseFormBack from './modules/BaseFormBackYY'
|
|
|
import Detail from './modules/DetailYY'
|
|
|
import TicketForm from './modules/TicketForm'
|
|
|
|
|
|
-import { updateStoreBack, getOutStoreFormPage, deleteOutStoreForms, fetchOutStoreForm, exportOutStoreForm } from '@/api/store/outstoreform'
|
|
|
+import {
|
|
|
+ updateStoreBack,
|
|
|
+ getOutStoreFormPage,
|
|
|
+ deleteOutStoreForms,
|
|
|
+ fetchOutStoreForm,
|
|
|
+ exportOutStoreForm
|
|
|
+} from '@/api/store/outstoreform'
|
|
|
import { addOutFormYY } from '@/api/yongyou/yongyou'
|
|
|
import { startSbInfoScrap } from '@/api/activiti/activiti-sb-scrap'
|
|
|
|
|
@@ -165,7 +196,7 @@ export default {
|
|
|
default: 1
|
|
|
}
|
|
|
},
|
|
|
- data () {
|
|
|
+ data() {
|
|
|
return {
|
|
|
// 查询参数
|
|
|
queryParam: {
|
|
@@ -179,7 +210,9 @@ export default {
|
|
|
title: '序号',
|
|
|
dataIndex: 'index',
|
|
|
customRender: (text, record, index) => {
|
|
|
- return `${(this.$refs.table.localPagination.current - 1) * this.$refs.table.localPagination.pageSize + index + 1}`
|
|
|
+ return `${(this.$refs.table.localPagination.current - 1) * this.$refs.table.localPagination.pageSize +
|
|
|
+ index +
|
|
|
+ 1}`
|
|
|
}
|
|
|
},
|
|
|
{
|
|
@@ -235,10 +268,14 @@ export default {
|
|
|
// 加载数据方法 必须为 Promise 对象
|
|
|
loadData: parameter => {
|
|
|
if (this.queryParam.searchStartTime) {
|
|
|
- this.queryParam.searchStartTime = this.BaseTool.Date.formatter(this.queryParam.searchStartTime, this.BaseTool.Date.PICKER_NORM_DATE_PATTERN) + ' 00:00:00'
|
|
|
+ this.queryParam.searchStartTime =
|
|
|
+ this.BaseTool.Date.formatter(this.queryParam.searchStartTime, this.BaseTool.Date.PICKER_NORM_DATE_PATTERN) +
|
|
|
+ ' 00:00:00'
|
|
|
}
|
|
|
if (this.queryParam.searchEndTime) {
|
|
|
- this.queryParam.searchEndTime = this.BaseTool.Date.formatter(this.queryParam.searchEndTime, this.BaseTool.Date.PICKER_NORM_DATE_PATTERN) + ' 23:59:59'
|
|
|
+ this.queryParam.searchEndTime =
|
|
|
+ this.BaseTool.Date.formatter(this.queryParam.searchEndTime, this.BaseTool.Date.PICKER_NORM_DATE_PATTERN) +
|
|
|
+ ' 23:59:59'
|
|
|
}
|
|
|
parameter = {
|
|
|
...parameter,
|
|
@@ -248,16 +285,20 @@ export default {
|
|
|
sortName: 'update_time'
|
|
|
}
|
|
|
}
|
|
|
- return getOutStoreFormPage(Object.assign(parameter, this.queryParam))
|
|
|
- .then(res => {
|
|
|
- return res.data
|
|
|
- })
|
|
|
+ return getOutStoreFormPage(Object.assign(parameter, this.queryParam)).then(res => {
|
|
|
+ return res.data
|
|
|
+ })
|
|
|
},
|
|
|
selectedRowKeys: [],
|
|
|
selectedRows: [],
|
|
|
visible: true,
|
|
|
options: {
|
|
|
- alert: { show: true, clear: () => { this.selectedRowKeys = [] } },
|
|
|
+ alert: {
|
|
|
+ show: true,
|
|
|
+ clear: () => {
|
|
|
+ this.selectedRowKeys = []
|
|
|
+ }
|
|
|
+ },
|
|
|
rowSelection: {
|
|
|
selectedRowKeys: this.selectedRowKeys,
|
|
|
onChange: this.onSelectChange
|
|
@@ -266,9 +307,12 @@ export default {
|
|
|
optionAlertShow: false
|
|
|
}
|
|
|
},
|
|
|
- created () {
|
|
|
+ created() {
|
|
|
// 下拉框map
|
|
|
- this.deptYYMap = { ...this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.OUT_STORE_FORM_DEPT_CODE), ...this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.SBB) }
|
|
|
+ this.deptYYMap = {
|
|
|
+ ...this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.OUT_STORE_FORM_DEPT_CODE),
|
|
|
+ ...this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.SBB)
|
|
|
+ }
|
|
|
// console.log(this.deptYYMap)
|
|
|
if (this.outFlag === 1) {
|
|
|
this.typeMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.OUT_STORE_FORM_TYPE)
|
|
@@ -279,10 +323,15 @@ export default {
|
|
|
this.tableOption()
|
|
|
},
|
|
|
methods: {
|
|
|
- tableOption () {
|
|
|
+ tableOption() {
|
|
|
if (!this.optionAlertShow) {
|
|
|
this.options = {
|
|
|
- alert: { show: true, clear: () => { this.selectedRowKeys = [] } },
|
|
|
+ alert: {
|
|
|
+ show: true,
|
|
|
+ clear: () => {
|
|
|
+ this.selectedRowKeys = []
|
|
|
+ }
|
|
|
+ },
|
|
|
rowSelection: {
|
|
|
selectedRowKeys: this.selectedRowKeys,
|
|
|
onChange: this.onSelectChange,
|
|
@@ -303,7 +352,7 @@ export default {
|
|
|
this.optionAlertShow = false
|
|
|
}
|
|
|
},
|
|
|
- batchDelete (id) {
|
|
|
+ batchDelete(id) {
|
|
|
let ids = []
|
|
|
if (this.BaseTool.String.isBlank(id)) {
|
|
|
const length = this.selectedRows.length
|
|
@@ -321,26 +370,26 @@ export default {
|
|
|
this.$refs.table.clearSelected()
|
|
|
})
|
|
|
},
|
|
|
- handleViewTicket (record) {
|
|
|
+ handleViewTicket(record) {
|
|
|
this.visible = false
|
|
|
fetchOutStoreForm({ id: record.id }).then(res => {
|
|
|
const modal = this.$refs.ticketForm
|
|
|
modal.base(res.data, this.outFlag)
|
|
|
})
|
|
|
},
|
|
|
- handleView (record) {
|
|
|
+ handleView(record) {
|
|
|
this.visible = false
|
|
|
fetchOutStoreForm({ id: record.id }).then(res => {
|
|
|
const modal = this.$refs.detailModal
|
|
|
modal.base(res.data)
|
|
|
})
|
|
|
},
|
|
|
- handleAdd () {
|
|
|
+ handleAdd() {
|
|
|
this.visible = false
|
|
|
const modal = this.outFlag ? this.$refs.baseModal : this.$refs.baseBackModal
|
|
|
modal.base({ outFlag: this.outFlag }, {})
|
|
|
},
|
|
|
- handleEdit (record) {
|
|
|
+ handleEdit(record) {
|
|
|
this.visible = false
|
|
|
fetchOutStoreForm({ id: record.id }).then(res => {
|
|
|
const modal = this.outFlag ? this.$refs.baseModal : this.$refs.baseBackModal
|
|
@@ -348,44 +397,46 @@ export default {
|
|
|
modal.base(res.data)
|
|
|
})
|
|
|
},
|
|
|
- updateStore (id) {
|
|
|
+ updateStore(record) {
|
|
|
const params = {}
|
|
|
- params.id = id
|
|
|
+ params.id = record.id
|
|
|
params.processInstanceId = ''
|
|
|
- params.auditModelName = '仓库审批'
|
|
|
- params.auditModelKey = 'out_store_back'
|
|
|
+ params.auditModelName =
|
|
|
+ !record.projectName || record.projectName.indexOf('龚文林') === -1 ? '仓库审批' : '仓库审批-龚文林_1'
|
|
|
+ params.auditModelKey =
|
|
|
+ !record.projectName || record.projectName.indexOf('龚文林') === -1 ? 'out_store_back' : 'out_store_back_gwl_1'
|
|
|
startSbInfoScrap(params).then(res => {
|
|
|
this.$message.info('已提交,请等待主管审核')
|
|
|
this.$refs.table.refresh()
|
|
|
})
|
|
|
},
|
|
|
- updateStoreBack (id) {
|
|
|
+ updateStoreBack(id) {
|
|
|
updateStoreBack({ id: id }).then(res => {
|
|
|
this.$message.info('撤销成功')
|
|
|
this.$refs.table.refresh()
|
|
|
})
|
|
|
},
|
|
|
- rePush (id) {
|
|
|
+ rePush(id) {
|
|
|
addOutFormYY({ id: id }).then(res => {
|
|
|
this.$message.info('撤销成功')
|
|
|
this.$refs.table.refresh()
|
|
|
})
|
|
|
},
|
|
|
- handleOk () {
|
|
|
+ handleOk() {
|
|
|
this.visible = true
|
|
|
this.$refs.table.refresh()
|
|
|
},
|
|
|
- onSelectChange (selectedRowKeys, selectedRows) {
|
|
|
+ onSelectChange(selectedRowKeys, selectedRows) {
|
|
|
this.selectedRowKeys = selectedRowKeys
|
|
|
this.selectedRows = selectedRows
|
|
|
},
|
|
|
- resetSearchForm () {
|
|
|
+ resetSearchForm() {
|
|
|
this.queryParam = {
|
|
|
filter: this.filter
|
|
|
}
|
|
|
this.$refs.table.refresh(true)
|
|
|
},
|
|
|
- doExport () {
|
|
|
+ doExport() {
|
|
|
const parameter = {
|
|
|
...this.queryParam,
|
|
|
ids: this.selectedRowKeys
|
|
@@ -394,7 +445,7 @@ export default {
|
|
|
this.BaseTool.UPLOAD.downLoadExportExcel(file)
|
|
|
})
|
|
|
},
|
|
|
- handleEnter () {
|
|
|
+ handleEnter() {
|
|
|
this.$refs.table.refresh(true)
|
|
|
}
|
|
|
}
|