|
@@ -0,0 +1,158 @@
|
|
|
+<template>
|
|
|
+ <a-card :bordered="false" class="inventoryCheckingList-wrap">
|
|
|
+ <!-- 搜索条件 -->
|
|
|
+ <div 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-range-picker
|
|
|
+ style="width:100%"
|
|
|
+ id="inventoryCheckingList-creatTime"
|
|
|
+ :disabledDate="disabledDate"
|
|
|
+ @change="creatTimechange"
|
|
|
+ :format="dateFormat"
|
|
|
+ :placeholder="['开始时间', '结束时间']" />
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ <a-col :md="6" :sm="24">
|
|
|
+ <a-form-item label="状态">
|
|
|
+ <v-select code="ENABLED_FLAG" id="inventoryCheckingList-enabledFlag" v-model="queryParam.enabledFlag" allowClear placeholder="请选择状态"></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="inventoryCheckingList-refresh">查询</a-button>
|
|
|
+ <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="inventoryCheckingList-reset">重置</a-button>
|
|
|
+ </a-col>
|
|
|
+ </a-row>
|
|
|
+ </a-form>
|
|
|
+ </div>
|
|
|
+ <!-- 操作按钮 -->
|
|
|
+ <div class="table-operator">
|
|
|
+ <a-button id="inventoryCheckingList-add" type="primary" @click="handleEdit()">新增盘点单</a-button>
|
|
|
+ </div>
|
|
|
+ <!-- 列表 -->
|
|
|
+ <s-table
|
|
|
+ class="sTable"
|
|
|
+ ref="table"
|
|
|
+ size="default"
|
|
|
+ :rowKey="(record) => record.id"
|
|
|
+ :columns="columns"
|
|
|
+ :data="loadData"
|
|
|
+ :showPagination="false"
|
|
|
+ bordered>
|
|
|
+ <!-- 操作 -->
|
|
|
+ <template slot="action" slot-scope="text, record">
|
|
|
+ <a-button size="small" type="primary" @click="handleEdit(record)" id="inventoryCheckingList-edit-btn">审核</a-button>
|
|
|
+ <a-button size="small" type="primary" @click="handleDel(record)" id="inventoryCheckingList-del-btn" style="margin: 0 0 10px 8px">盘点</a-button>
|
|
|
+ <a-button size="small" type="primary" @click="handleDel(record)" id="inventoryCheckingList-del-btn" style="margin: 0 0 10px 8px">监盘审核</a-button>
|
|
|
+ <a-button size="small" type="primary" @click="handleDel(record)" id="inventoryCheckingList-del-btn" style="margin: 0 0 10px 8px">编辑</a-button>
|
|
|
+ <a-button size="small" @click="handleDel(record)" id="inventoryCheckingList-del-btn" style="margin: 0 0 0 8px">详情</a-button>
|
|
|
+ <a-button size="small" type="danger" @click="handleDel(record)" id="inventoryCheckingList-del-btn" style="margin: 0 0 0 8px">删除</a-button>
|
|
|
+ </template>
|
|
|
+ </s-table>
|
|
|
+ <!-- 新增/编辑仓库 -->
|
|
|
+ <inventory-unChecking-modal :openModal="openModal" :nowData="nowData" :itemId="itemId" @ok="handleOk" @close="closeModal" />
|
|
|
+ </a-card>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+import { warehouseFindAll, warehouseDel } from '@/api/warehouse'
|
|
|
+import { STable, VSelect } from '@/components'
|
|
|
+import inventoryUnCheckingModal from './unCheckingModal.vue'
|
|
|
+export default {
|
|
|
+ components: { STable, VSelect, inventoryUnCheckingModal },
|
|
|
+ data () {
|
|
|
+ return {
|
|
|
+ queryParam: { // 查询条件
|
|
|
+ enabledFlag: undefined, // 状态
|
|
|
+ beginDate: '', // 创建时间 开始时间
|
|
|
+ endDate: '', // 创建时间 结束时间
|
|
|
+ },
|
|
|
+ disabled: false, // 查询、重置按钮是否可操作
|
|
|
+ dateFormat: 'YYYY-MM-DD',
|
|
|
+ columns: [
|
|
|
+ { title: '序号', dataIndex: 'no', width: 70, align: 'center' },
|
|
|
+ { title: '创建时间', dataIndex: 'createDate', width: 180, align: 'center' },
|
|
|
+ { title: '盘点单号', dataIndex: 'nsso', width: 70, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '库存总款数', dataIndex: 'no', width: 70, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
+ { title: '库存总数量', dataIndex: 'no', width: 70, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
+ { title: '开单人', dataIndex: 'no', width: 70, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '单据审核时间', dataIndex: 'shcreateDate', width: 180, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '状态', dataIndex: 'name', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '盘点类型', dataIndex: 'sort', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '操作', scopedSlots: { customRender: 'action' }, width: 240, align: 'center' }
|
|
|
+ ],
|
|
|
+ // 加载数据方法 必须为 Promise 对象
|
|
|
+ loadData: parameter => {
|
|
|
+ this.disabled = true
|
|
|
+ return warehouseFindAll( this.queryParam ).then(res => {
|
|
|
+ const data = res.data
|
|
|
+ this.disabled = false
|
|
|
+ return data
|
|
|
+ })
|
|
|
+ },
|
|
|
+ openModal: false, // 新增编辑 弹框
|
|
|
+ itemId: '', // 当前id
|
|
|
+ nowData: null // 当前记录数据
|
|
|
+ }
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ // 不可选日期
|
|
|
+ disabledDate (date, dateStrings) {
|
|
|
+ return date && date.valueOf() > Date.now()
|
|
|
+ },
|
|
|
+ // 创建时间 change
|
|
|
+ creatTimechange(dates, dateStrings){
|
|
|
+ this.queryParam.beginDate = dateStrings[0]
|
|
|
+ this.queryParam.endDate = dateStrings[1]
|
|
|
+ },
|
|
|
+ // 重置
|
|
|
+ resetSearchForm () {
|
|
|
+ this.queryParam.name = ''
|
|
|
+ this.$refs.table.refresh(true)
|
|
|
+ },
|
|
|
+ // 新增/编辑
|
|
|
+ handleEdit(row){
|
|
|
+ this.itemId = row ? row.id : null
|
|
|
+ this.nowData = row ? row : null
|
|
|
+ this.openModal = true
|
|
|
+ },
|
|
|
+ // 新增/编辑 成功
|
|
|
+ handleOk(){
|
|
|
+ this.$refs.table.refresh(true)
|
|
|
+ },
|
|
|
+ // 关闭弹框
|
|
|
+ closeModal(){
|
|
|
+ this.itemId = ''
|
|
|
+ this.openModal = false
|
|
|
+ },
|
|
|
+ // 删除
|
|
|
+ handleDel(row){
|
|
|
+ const _this = this
|
|
|
+ this.$confirm({
|
|
|
+ title: '提示',
|
|
|
+ content: '删除后不可恢复,确定要进行删除吗?',
|
|
|
+ okText: '确定',
|
|
|
+ cancelText: '取消',
|
|
|
+ onOk () {
|
|
|
+ // warehouseDel({
|
|
|
+ // id: row.id
|
|
|
+ // }).then(res => {
|
|
|
+ // if (res.status == 200) {
|
|
|
+ // _this.$message.success(res.message)
|
|
|
+ // _this.$refs.table.refresh()
|
|
|
+ // }
|
|
|
+ // })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 查看仓位
|
|
|
+ goStoringLocation(row){
|
|
|
+ this.$router.push({ path: `/inventoryManagement/storingLocation/${row.id}`, query: { name: row.name } })
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+</script>
|
|
|
+
|
|
|
+<style lang="less"></style>
|