|
@@ -1,109 +1,109 @@
|
|
<template>
|
|
<template>
|
|
<div>
|
|
<div>
|
|
- <a-card size="small" :bordered="false" class="searchBoxNormal">
|
|
|
|
- <!-- 搜索条件 -->
|
|
|
|
- <div ref="tableSearch" class="table-page-search-wrapper">
|
|
|
|
- <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
|
|
|
|
- <a-row :gutter="15">
|
|
|
|
- <a-col :md="6" :sm="24">
|
|
|
|
- <a-form-item label="盘点单号">
|
|
|
|
- <a-input id="inventoryCheckList-checkWarehouseNo" v-model.trim="queryParam.checkWarehouseNo" allowClear placeholder="请输入盘点单号"/>
|
|
|
|
- </a-form-item>
|
|
|
|
- </a-col>
|
|
|
|
- <a-col :md="4" :sm="24" v-show="isShowWarehouse">
|
|
|
|
- <a-form-item label="仓库">
|
|
|
|
- <warehouse
|
|
|
|
- v-model="queryParam.warehouseSn"
|
|
|
|
- isPermission
|
|
|
|
- id="inventoryCheckList-warehouseSn"
|
|
|
|
- placeholder="请选择仓库"
|
|
|
|
- />
|
|
|
|
- </a-form-item>
|
|
|
|
- </a-col>
|
|
|
|
- <a-col :md="4" :sm="24">
|
|
|
|
- <a-form-item label="盘点状态">
|
|
|
|
- <v-select
|
|
|
|
- v-model="queryParam.checkState"
|
|
|
|
- ref="checkState"
|
|
|
|
- id="inventoryCheckList-checkState"
|
|
|
|
- code="CHECK_WAREHOUSE_STATE"
|
|
|
|
- placeholder="请选择盘点状态"
|
|
|
|
- allowClear
|
|
|
|
- ></v-select>
|
|
|
|
- </a-form-item>
|
|
|
|
- </a-col>
|
|
|
|
- <a-col :md="4" :sm="24">
|
|
|
|
- <a-form-item label="监盘状态">
|
|
|
|
- <v-select
|
|
|
|
- v-model="queryParam.checkSuperviseState"
|
|
|
|
- ref="checkSuperviseState"
|
|
|
|
- id="inventoryCheckList-checkSuperviseState"
|
|
|
|
- code="CHECK_WAREHOUSE_SUPERVISE_STATE"
|
|
|
|
- placeholder="请选择监盘状态"
|
|
|
|
- allowClear
|
|
|
|
- ></v-select>
|
|
|
|
- </a-form-item>
|
|
|
|
- </a-col>
|
|
|
|
- <a-col :md="6" :sm="24">
|
|
|
|
- <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="inventoryCheckList-refresh">查询</a-button>
|
|
|
|
- <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="inventoryCheckList-reset">重置</a-button>
|
|
|
|
- </a-col>
|
|
|
|
- </a-row>
|
|
|
|
- </a-form>
|
|
|
|
- </div>
|
|
|
|
- </a-card>
|
|
|
|
- <a-card size="small" :bordered="false" class="inventoryCheckList-wrap">
|
|
|
|
- <a-spin :spinning="spinning" tip="Loading...">
|
|
|
|
- <!-- 操作按钮 -->
|
|
|
|
- <div class="table-operator flex-center" style="justify-content: space-between;">
|
|
|
|
- <div class="flex-center">
|
|
|
|
- <a-button v-if="$hasPermissions('B_inventoryCheckAdd')" id="inventoryCheckList-add" type="primary" @click="handleAdd">新增</a-button>
|
|
|
|
- </div>
|
|
|
|
- <div>
|
|
|
|
- <a-radio-group v-model="queryParam.deleteFlag" @change="handleTabChange">
|
|
|
|
- <a-radio-button v-for="item in tabPaneData" :key="item.type" :value="item.type">
|
|
|
|
- {{ item.name }}
|
|
|
|
- </a-radio-button>
|
|
|
|
- </a-radio-group>
|
|
|
|
- </div>
|
|
|
|
|
|
+ <a-card size="small" :bordered="false" class="searchBoxNormal">
|
|
|
|
+ <!-- 搜索条件 -->
|
|
|
|
+ <div ref="tableSearch" class="table-page-search-wrapper">
|
|
|
|
+ <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
|
|
|
|
+ <a-row :gutter="15">
|
|
|
|
+ <a-col :md="6" :sm="24">
|
|
|
|
+ <a-form-item label="盘点单号">
|
|
|
|
+ <a-input id="inventoryCheckList-checkWarehouseNo" v-model.trim="queryParam.checkWarehouseNo" allowClear placeholder="请输入盘点单号"/>
|
|
|
|
+ </a-form-item>
|
|
|
|
+ </a-col>
|
|
|
|
+ <a-col :md="4" :sm="24" v-show="isShowWarehouse">
|
|
|
|
+ <a-form-item label="仓库">
|
|
|
|
+ <warehouse
|
|
|
|
+ v-model="queryParam.warehouseSn"
|
|
|
|
+ isPermission
|
|
|
|
+ id="inventoryCheckList-warehouseSn"
|
|
|
|
+ placeholder="请选择仓库"
|
|
|
|
+ />
|
|
|
|
+ </a-form-item>
|
|
|
|
+ </a-col>
|
|
|
|
+ <a-col :md="4" :sm="24">
|
|
|
|
+ <a-form-item label="盘点状态">
|
|
|
|
+ <v-select
|
|
|
|
+ v-model="queryParam.checkState"
|
|
|
|
+ ref="checkState"
|
|
|
|
+ id="inventoryCheckList-checkState"
|
|
|
|
+ code="CHECK_WAREHOUSE_STATE"
|
|
|
|
+ placeholder="请选择盘点状态"
|
|
|
|
+ allowClear
|
|
|
|
+ ></v-select>
|
|
|
|
+ </a-form-item>
|
|
|
|
+ </a-col>
|
|
|
|
+ <a-col :md="4" :sm="24">
|
|
|
|
+ <a-form-item label="监盘状态">
|
|
|
|
+ <v-select
|
|
|
|
+ v-model="queryParam.checkSuperviseState"
|
|
|
|
+ ref="checkSuperviseState"
|
|
|
|
+ id="inventoryCheckList-checkSuperviseState"
|
|
|
|
+ code="CHECK_WAREHOUSE_SUPERVISE_STATE"
|
|
|
|
+ placeholder="请选择监盘状态"
|
|
|
|
+ allowClear
|
|
|
|
+ ></v-select>
|
|
|
|
+ </a-form-item>
|
|
|
|
+ </a-col>
|
|
|
|
+ <a-col :md="6" :sm="24">
|
|
|
|
+ <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="inventoryCheckList-refresh">查询</a-button>
|
|
|
|
+ <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="inventoryCheckList-reset">重置</a-button>
|
|
|
|
+ </a-col>
|
|
|
|
+ </a-row>
|
|
|
|
+ </a-form>
|
|
</div>
|
|
</div>
|
|
- <!-- 列表 -->
|
|
|
|
- <s-table
|
|
|
|
- class="sTable fixPagination"
|
|
|
|
- ref="table"
|
|
|
|
- :style="{ height: tableHeight+70+'px' }"
|
|
|
|
- size="small"
|
|
|
|
- :rowKey="(record) => record.id"
|
|
|
|
- :columns="columns"
|
|
|
|
- :data="loadData"
|
|
|
|
- :scroll="{ y: tableHeight }"
|
|
|
|
- :pageSize="30"
|
|
|
|
- :defaultLoadData="false"
|
|
|
|
- bordered>
|
|
|
|
- <!-- 操作 -->
|
|
|
|
- <template slot="action" slot-scope="text, record">
|
|
|
|
- <a-button
|
|
|
|
- size="small"
|
|
|
|
- type="link"
|
|
|
|
- v-if="$hasPermissions('B_inventoryCheckDetail')"
|
|
|
|
- class="button-success"
|
|
|
|
- @click="handleDetail(record)"
|
|
|
|
- id="inventoryCheckList-audit-btn">详情</a-button>
|
|
|
|
- <span v-else>--</span>
|
|
|
|
- </template>
|
|
|
|
- </s-table>
|
|
|
|
- </a-spin>
|
|
|
|
- <!-- 新增盘点单 -->
|
|
|
|
- <inventory-check-add-modal :openModal="openAddModal" @ok="handleAddOk" @close="openAddModal=false" />
|
|
|
|
- <!-- 盘点校验 -->
|
|
|
|
- <common-modal
|
|
|
|
- :openModal="openCommonModal"
|
|
|
|
- :modalHtml="modalHtml"
|
|
|
|
- okText="好的"
|
|
|
|
- :isCancel="false"
|
|
|
|
- @ok="openCommonModal=false"
|
|
|
|
- @cancel="openCommonModal=false" />
|
|
|
|
- </a-card>
|
|
|
|
|
|
+ </a-card>
|
|
|
|
+ <a-card size="small" :bordered="false" class="inventoryCheckList-wrap">
|
|
|
|
+ <a-spin :spinning="spinning" tip="Loading...">
|
|
|
|
+ <!-- 操作按钮 -->
|
|
|
|
+ <div class="table-operator flex-center" style="justify-content: space-between;">
|
|
|
|
+ <div class="flex-center">
|
|
|
|
+ <a-button v-if="$hasPermissions('B_inventoryCheckAdd')" id="inventoryCheckList-add" type="primary" @click="handleAdd">新增</a-button>
|
|
|
|
+ </div>
|
|
|
|
+ <div>
|
|
|
|
+ <a-radio-group v-model="queryParam.deleteFlag" @change="handleTabChange" id="inventoryCheckList-radio-tab">
|
|
|
|
+ <a-radio-button v-for="item in tabPaneData" :key="item.type" :id="item.type" :value="item.type">
|
|
|
|
+ {{ item.name }}
|
|
|
|
+ </a-radio-button>
|
|
|
|
+ </a-radio-group>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ <!-- 列表 -->
|
|
|
|
+ <s-table
|
|
|
|
+ class="sTable fixPagination"
|
|
|
|
+ ref="table"
|
|
|
|
+ :style="{ height: tableHeight+70+'px' }"
|
|
|
|
+ size="small"
|
|
|
|
+ :rowKey="(record) => record.id"
|
|
|
|
+ :columns="columns"
|
|
|
|
+ :data="loadData"
|
|
|
|
+ :scroll="{ y: tableHeight }"
|
|
|
|
+ :pageSize="30"
|
|
|
|
+ :defaultLoadData="false"
|
|
|
|
+ bordered>
|
|
|
|
+ <!-- 操作 -->
|
|
|
|
+ <template slot="action" slot-scope="text, record">
|
|
|
|
+ <a-button
|
|
|
|
+ size="small"
|
|
|
|
+ type="link"
|
|
|
|
+ v-if="$hasPermissions('B_inventoryCheckDetail')"
|
|
|
|
+ class="button-success"
|
|
|
|
+ @click="handleDetail(record)"
|
|
|
|
+ :id="'inventoryCheckList-audit-'+record.id">详情</a-button>
|
|
|
|
+ <span v-else>--</span>
|
|
|
|
+ </template>
|
|
|
|
+ </s-table>
|
|
|
|
+ </a-spin>
|
|
|
|
+ <!-- 新增盘点单 -->
|
|
|
|
+ <inventory-check-add-modal :openModal="openAddModal" @ok="handleAddOk" @close="openAddModal=false" />
|
|
|
|
+ <!-- 盘点校验 -->
|
|
|
|
+ <common-modal
|
|
|
|
+ :openModal="openCommonModal"
|
|
|
|
+ :modalHtml="modalHtml"
|
|
|
|
+ okText="好的"
|
|
|
|
+ :isCancel="false"
|
|
|
|
+ @ok="openCommonModal=false"
|
|
|
|
+ @cancel="openCommonModal=false" />
|
|
|
|
+ </a-card>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
@@ -123,11 +123,11 @@ export default {
|
|
spinning: false,
|
|
spinning: false,
|
|
tableHeight: 0,
|
|
tableHeight: 0,
|
|
queryParam: { // 查询条件
|
|
queryParam: { // 查询条件
|
|
- deleteFlag: this.$route.params.type,
|
|
|
|
- checkWarehouseNo: '',
|
|
|
|
- checkState: undefined,
|
|
|
|
- warehouseSn: undefined,
|
|
|
|
- checkSuperviseState: undefined
|
|
|
|
|
|
+ deleteFlag: this.$route.params.type, // 类型
|
|
|
|
+ checkWarehouseNo: '', // 盘点单号
|
|
|
|
+ checkState: undefined, // 盘点状态
|
|
|
|
+ warehouseSn: undefined, // 仓库
|
|
|
|
+ checkSuperviseState: undefined // 监盘状态
|
|
},
|
|
},
|
|
disabled: false, // 查询、重置按钮是否可操作
|
|
disabled: false, // 查询、重置按钮是否可操作
|
|
tabPaneData: [
|
|
tabPaneData: [
|
|
@@ -153,25 +153,25 @@ export default {
|
|
})
|
|
})
|
|
},
|
|
},
|
|
openModal: false,
|
|
openModal: false,
|
|
- itemSn: '',
|
|
|
|
- openAddModal: false,
|
|
|
|
- openCommonModal: false,
|
|
|
|
- modalHtml: ''
|
|
|
|
|
|
+ itemSn: '', // 当前编辑sn
|
|
|
|
+ openAddModal: false, // 新增盘点单弹框
|
|
|
|
+ openCommonModal: false, // 盘点校验提示弹框
|
|
|
|
+ modalHtml: '' // 盘点校验弹框内容
|
|
}
|
|
}
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
columns () {
|
|
columns () {
|
|
let arr = [
|
|
let arr = [
|
|
- { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
|
|
|
|
- { title: '盘点单号', dataIndex: 'checkWarehouseNo', width: '10%', align: 'center' },
|
|
|
|
- // { title: '仓库', dataIndex: 'warehouseName', width: '12%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
- { title: '盘点状态', dataIndex: 'checkStateDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
- { title: '监盘状态', dataIndex: 'checkSuperviseStateDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
- { title: '盘点人', dataIndex: 'checkPersonName', align: 'center', width: '8%', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
|
- { title: '盘点提交时间', dataIndex: 'checkTime', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
- { title: '监盘人', dataIndex: 'checkSupervisePersonName', align: 'center', width: '8%', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
|
- { title: '监盘提交时间', dataIndex: 'checkSuperviseTime', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
- ]
|
|
|
|
|
|
+ { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
|
|
|
|
+ { title: '盘点单号', dataIndex: 'checkWarehouseNo', width: '10%', align: 'center' },
|
|
|
|
+ // { title: '仓库', dataIndex: 'warehouseName', width: '12%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
+ { title: '盘点状态', dataIndex: 'checkStateDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
+ { title: '监盘状态', dataIndex: 'checkSuperviseStateDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
+ { title: '盘点人', dataIndex: 'checkPersonName', align: 'center', width: '8%', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
|
+ { title: '盘点提交时间', dataIndex: 'checkTime', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
+ { title: '监盘人', dataIndex: 'checkSupervisePersonName', align: 'center', width: '8%', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
|
+ { title: '监盘提交时间', dataIndex: 'checkSuperviseTime', width: '10%', align: 'center', customRender: function (text) { return text || '--' } }
|
|
|
|
+ ]
|
|
|
|
|
|
if (this.queryParam.deleteFlag == '0') { // 正常
|
|
if (this.queryParam.deleteFlag == '0') { // 正常
|
|
arr = arr.concat([
|
|
arr = arr.concat([
|
|
@@ -187,8 +187,8 @@ export default {
|
|
])
|
|
])
|
|
}
|
|
}
|
|
|
|
|
|
- if(this.isShowWarehouse){
|
|
|
|
- arr.splice(2,0,{ title: '仓库', dataIndex: 'warehouseName', width: '12%', align: 'center', customRender: function (text) { return text || '--' } })
|
|
|
|
|
|
+ if (this.isShowWarehouse) {
|
|
|
|
+ arr.splice(2, 0, { title: '仓库', dataIndex: 'warehouseName', width: '12%', align: 'center', customRender: function (text) { return text || '--' } })
|
|
}
|
|
}
|
|
return arr
|
|
return arr
|
|
}
|
|
}
|
|
@@ -200,7 +200,8 @@ export default {
|
|
},
|
|
},
|
|
// 新增 成功
|
|
// 新增 成功
|
|
handleAddOk (data) {
|
|
handleAddOk (data) {
|
|
- this.$router.push({ path: `/inventoryManagement/inventoryCheck/detail/${data.checkWarehouseSn}` })
|
|
|
|
|
|
+ this.openAddModal = false
|
|
|
|
+ this.handleDetail(data)
|
|
},
|
|
},
|
|
// 选择类型
|
|
// 选择类型
|
|
handleTabChange (event) {
|
|
handleTabChange (event) {
|
|
@@ -209,10 +210,9 @@ export default {
|
|
},
|
|
},
|
|
// 详情
|
|
// 详情
|
|
handleDetail (row) {
|
|
handleDetail (row) {
|
|
- if (this.$hasPermissions('B_inventoryCheckDetail')) {
|
|
|
|
- this.$router.push({ path: `/inventoryManagement/inventoryCheck/detail/${row.checkWarehouseSn}` })
|
|
|
|
- }
|
|
|
|
|
|
+ this.$router.push({ name: 'inventoryCheckDetail', params: { sn: row.checkWarehouseSn } })
|
|
},
|
|
},
|
|
|
|
+ // 重置列表
|
|
resetSearchForm () {
|
|
resetSearchForm () {
|
|
this.queryParam.checkWarehouseNo = ''
|
|
this.queryParam.checkWarehouseNo = ''
|
|
this.queryParam.checkState = undefined
|
|
this.queryParam.checkState = undefined
|
|
@@ -220,16 +220,13 @@ export default {
|
|
this.queryParam.warehouseSn = undefined
|
|
this.queryParam.warehouseSn = undefined
|
|
this.$refs.table.refresh(true)
|
|
this.$refs.table.refresh(true)
|
|
},
|
|
},
|
|
- closeModal () {
|
|
|
|
- this.itemSn = ''
|
|
|
|
- this.openModal = false
|
|
|
|
- },
|
|
|
|
pageInit () {
|
|
pageInit () {
|
|
const _this = this
|
|
const _this = this
|
|
this.$nextTick(() => { // 页面渲染完成后的回调
|
|
this.$nextTick(() => { // 页面渲染完成后的回调
|
|
_this.setTableH()
|
|
_this.setTableH()
|
|
})
|
|
})
|
|
},
|
|
},
|
|
|
|
+ // 表格高度计算
|
|
setTableH () {
|
|
setTableH () {
|
|
this.tableHeight = window.innerHeight - 283
|
|
this.tableHeight = window.innerHeight - 283
|
|
}
|
|
}
|
|
@@ -272,6 +269,6 @@ export default {
|
|
|
|
|
|
<style lang="less">
|
|
<style lang="less">
|
|
.inventoryCheckList-wrap{
|
|
.inventoryCheckList-wrap{
|
|
-
|
|
|
|
|
|
+
|
|
}
|
|
}
|
|
</style>
|
|
</style>
|