|
@@ -1,17 +1,17 @@
|
|
|
<template>
|
|
|
<template-page
|
|
|
ref="pageRef"
|
|
|
- :getList="getList"
|
|
|
+ :get-list="getList"
|
|
|
:operation="operation()"
|
|
|
- :optionsEvensGroup="optionsEvensGroup"
|
|
|
- :exportList="exportList"
|
|
|
- :columnParsing="columnParsing"
|
|
|
- :tableAttributes="tableAttributes"
|
|
|
- :tableEvents="tableEvents"
|
|
|
+ :options-evens-group="optionsEvensGroup"
|
|
|
+ :export-list="exportList"
|
|
|
+ :column-parsing="columnParsing"
|
|
|
+ :table-attributes="tableAttributes"
|
|
|
+ :table-events="tableEvents"
|
|
|
>
|
|
|
<Popu v-if="isShowForm || isShowDetail">
|
|
|
- <ReserveDetail :listItem="queryItem" v-if="isShowDetail" @backListFormDetail="backList" />
|
|
|
- <ReserveForm :listItem="queryItem" v-if="isShowForm" @backListFormDetail="backList" />
|
|
|
+ <ReserveDetail v-if="isShowDetail" :list-item="queryItem" @backListFormDetail="backList" />
|
|
|
+ <ReserveForm v-if="isShowForm" :list-item="queryItem" @backListFormDetail="backList" />
|
|
|
</Popu>
|
|
|
</template-page>
|
|
|
</template>
|
|
@@ -22,7 +22,7 @@ import Popu from '@/components/template/popu.vue'
|
|
|
import import_mixin from '@/components/template/import_mixin.js'
|
|
|
|
|
|
import {
|
|
|
- getList,
|
|
|
+ closeList,
|
|
|
closeData,
|
|
|
getWarehouseList,
|
|
|
reserveListV2,
|
|
@@ -35,7 +35,6 @@ import ReserveForm from '@/views/supply/reserve/components/reserve_form'
|
|
|
|
|
|
let that
|
|
|
export default {
|
|
|
- mixins: [import_mixin],
|
|
|
components: {
|
|
|
ReserveDetail,
|
|
|
ReserveForm,
|
|
@@ -48,6 +47,7 @@ export default {
|
|
|
return obj ? obj.label : ''
|
|
|
}
|
|
|
},
|
|
|
+ mixins: [import_mixin],
|
|
|
data() {
|
|
|
return {
|
|
|
// 事件组合
|
|
@@ -66,6 +66,33 @@ export default {
|
|
|
[
|
|
|
[
|
|
|
{
|
|
|
+ name: '批量关闭预留单',
|
|
|
+ click: async() => {
|
|
|
+ if (this.recordSelected.length === 0) {
|
|
|
+ this.$message.error('请选择需要关闭的数据')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ for (let i = 0; i < this.recordSelected.length; i++) {
|
|
|
+ if (this.recordSelected[i].status == '关闭') {
|
|
|
+ this.$message.error(`已关闭的数据不能再操作`)
|
|
|
+ return
|
|
|
+ }
|
|
|
+ }
|
|
|
+ const itemId = this.recordSelected.map(k => k.itemId).join(',')
|
|
|
+ await closeList({ itemId })
|
|
|
+ this.$message({
|
|
|
+ message: '操作成功',
|
|
|
+ type: 'success'
|
|
|
+ })
|
|
|
+ this.$refs.pageRef.refreshList()
|
|
|
+ }
|
|
|
+ // isRole: this.$checkBtnRole('add', this.$route.meta.roles)
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ ],
|
|
|
+ [
|
|
|
+ [
|
|
|
+ {
|
|
|
name: '下载模板',
|
|
|
click: () => {
|
|
|
reserveImportDataExcel({}, `${this.$route.meta.title}`)
|
|
@@ -185,11 +212,11 @@ export default {
|
|
|
operation() {
|
|
|
return (h, { row, index, column }) => {
|
|
|
return (
|
|
|
- <div class="operation-btns">
|
|
|
+ <div class='operation-btns'>
|
|
|
<el-button
|
|
|
- size="mini"
|
|
|
- type="text"
|
|
|
- onClick={async () => {
|
|
|
+ size='mini'
|
|
|
+ type='text'
|
|
|
+ onClick={async() => {
|
|
|
this.toDetail(row)
|
|
|
}}
|
|
|
>
|
|
@@ -198,9 +225,9 @@ export default {
|
|
|
|
|
|
{this.$checkBtnRole('edit', this.$route.meta.roles) && !row.printNum ? (
|
|
|
<el-button
|
|
|
- size="mini"
|
|
|
- type="text"
|
|
|
- onClick={async () => {
|
|
|
+ size='mini'
|
|
|
+ type='text'
|
|
|
+ onClick={async() => {
|
|
|
this.toForm(row)
|
|
|
}}
|
|
|
>
|
|
@@ -212,12 +239,12 @@ export default {
|
|
|
|
|
|
{this.$checkBtnRole('examine', this.$route.meta.roles) && row.status === 1 ? (
|
|
|
<el-popconfirm
|
|
|
- onConfirm={async () => {
|
|
|
+ onConfirm={async() => {
|
|
|
this.handleClose(row.itemId)
|
|
|
}}
|
|
|
- title="是否确定需要关闭该项内容?"
|
|
|
+ title='是否确定需要关闭该项内容?'
|
|
|
>
|
|
|
- <el-button slot="reference" size="mini" type="text">
|
|
|
+ <el-button slot='reference' size='mini' type='text'>
|
|
|
关闭
|
|
|
</el-button>
|
|
|
</el-popconfirm>
|