|
@@ -1,494 +0,0 @@
|
|
|
-<template>
|
|
|
- <div>
|
|
|
- <a-card :bordered="false" class="top" style="margin-bottom:1%;margin-top:1%">
|
|
|
-
|
|
|
- <!-- 查询区域 -->
|
|
|
- <div class="table-page-search-wrapper">
|
|
|
- <a-form layout="inline" @keyup.enter.native="searchQuery">
|
|
|
- <a-row :gutter="24">
|
|
|
- <a-col :md="4" :sm="24">
|
|
|
- <a-form-item label="存货编码">
|
|
|
- <a-input-search placeholder="请输入" v-model="queryParam.inventoryCode" @search="onSearch"></a-input-search>
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- <a-col :md="4" :sm="24">
|
|
|
- <a-form-item label="存货名称">
|
|
|
- <a-input placeholder="请输入" v-model="queryParam.inventoryName"></a-input>
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- <a-col :md="4" :sm="24">
|
|
|
- <a-form-item label="颜色">
|
|
|
- <a-input-search placeholder="请输入" v-model="queryParam.color" @search="onSearch"></a-input-search>
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- <a-col :md="4" :sm="24">
|
|
|
- <a-form-item label="定尺">
|
|
|
- <a-input-search placeholder="请输入" v-model="queryParam.fixedLength" @search="onSearch"></a-input-search>
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- <template v-if="toggleSearchStatus">
|
|
|
- <a-col :md="4" :sm="24">
|
|
|
- <a-form-item label="合金">
|
|
|
- <a-input-search placeholder="请输入" v-model="queryParam.alloy" @search="onSearch"></a-input-search>
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- <a-col :md="4" :sm="24">
|
|
|
- <a-form-item label="标准">
|
|
|
- <a-input-search placeholder="请输入" v-model="queryParam.standard" @search="onSearch"></a-input-search>
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- <a-col :md="4" :sm="24">
|
|
|
- <a-form-item label="规格">
|
|
|
- <a-input placeholder="请输入" v-model="queryParam.specs"></a-input>
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- <a-col :md="4" :sm="24">
|
|
|
- <a-form-item label="型号">
|
|
|
- <a-input-search placeholder="请输入" v-model="queryParam.model" @search="onSearch"></a-input-search>
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- <a-col :md="4" :sm="24">
|
|
|
- <a-form-item label="安全库存">
|
|
|
- <a-input placeholder="请输入" v-model="queryParam.safetyStock"></a-input>
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- <a-col :md="4" :sm="24">
|
|
|
- <a-form-item label="最高库存">
|
|
|
- <a-input placeholder="请输入" v-model="queryParam.maxStock"></a-input>
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- <a-col :md="4" :sm="24">
|
|
|
- <a-form-item label="起订点">
|
|
|
- <a-input placeholder="请输入" v-model="queryParam.startingPoint"></a-input>
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- <a-col :md="4" :sm="24">
|
|
|
- <a-form-item label="辅单位">
|
|
|
- <a-input placeholder="请输入" v-model="queryParam.auxiliaryUnit"></a-input>
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- <a-col :md="4" :sm="24">
|
|
|
- <a-form-item label="单位">
|
|
|
- <a-input placeholder="请输入" v-model="queryParam.unit"></a-input>
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- <a-col :md="4" :sm="24">
|
|
|
- <a-form-item label="按辅计量计算" prop='isAuxiliaryUnit'>
|
|
|
- <a-select v-model="queryParam.isAuxiliaryUnit" style='width:100%' >
|
|
|
- <a-select-option value='是'> 是</a-select-option>
|
|
|
- <a-select-option value='否'> 否</a-select-option>
|
|
|
- </a-select>
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- <a-col :md="4" :sm="24">
|
|
|
- <a-form-item label="米重" prop='meterWeight'>
|
|
|
- <a-input placeholder="请输入" v-model="queryParam.meterWeight"></a-input>
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- <a-col :md="4" :sm="24">
|
|
|
- <a-form-item label="窗号" prop='windowNo'>
|
|
|
- <a-input placeholder="请输入" v-model="queryParam.windowNo"></a-input>
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- <a-col :md="4" :sm="24">
|
|
|
- <a-form-item label="装饰面周长" prop='decorationLength'>
|
|
|
- <a-input placeholder="请输入" v-model="queryParam.decorationLength"></a-input>
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- <a-col :md="4" :sm="24">
|
|
|
- <a-form-item label="专用区" prop='exclusiveZone'>
|
|
|
- <a-input placeholder="请输入" v-model="queryParam.exclusiveZone"></a-input>
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- </template>
|
|
|
- <a-col :md="4" :sm="24">
|
|
|
- <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
|
|
|
- <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
|
|
|
- <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
|
|
|
- <a @click="handleToggleSearch" style="margin-left: 8px">
|
|
|
- {{ toggleSearchStatus ? '收起' : '展开' }}
|
|
|
- <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
|
|
|
- </a>
|
|
|
- </span>
|
|
|
- </a-col>
|
|
|
-
|
|
|
- </a-row>
|
|
|
- </a-form>
|
|
|
- </div>
|
|
|
- </a-card>
|
|
|
-
|
|
|
- <a-card class="middle" style="margin-bottom:1%">
|
|
|
- <!-- 操作按钮区域 -->
|
|
|
- <div class="table-operator">
|
|
|
- <a-button type="danger" size="small" @click='addList'>新增</a-button>
|
|
|
- <a-button size="small" @click='editList'>修改</a-button>
|
|
|
- <a-button size="small" @click='delectList'>删除</a-button>
|
|
|
- <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl">
|
|
|
- <a-button size="small">导入</a-button>
|
|
|
- </a-upload>
|
|
|
- <a-button size="small" @click="exportList('安全库存列表')">导出</a-button>
|
|
|
- </div>
|
|
|
-
|
|
|
- <!-- table区域-begin -->
|
|
|
- <div>
|
|
|
- <a-table
|
|
|
- ref="table"
|
|
|
- size="middle"
|
|
|
- bordered
|
|
|
- rowKey="id"
|
|
|
- :columns="columns"
|
|
|
- :dataSource="dataSource"
|
|
|
- :pagination="ipagination"
|
|
|
- :scroll="{ x: 2500, y: 300 }"
|
|
|
- :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
|
|
|
- @change="handleTableChange"
|
|
|
- >
|
|
|
-
|
|
|
- </a-table>
|
|
|
- </div>
|
|
|
- <!-- table区域-end -->
|
|
|
-
|
|
|
- </a-card>
|
|
|
- <safetyStockListAdd ref="safetyStockListAdd" @ok='searchQuery'></safetyStockListAdd>
|
|
|
- </div>
|
|
|
- </template>
|
|
|
-
|
|
|
- <script>
|
|
|
-
|
|
|
- import { JeecgListMixin } from '@/mixins/JeecgListMixin'
|
|
|
- import moment from 'dayjs'
|
|
|
- import { httpAction ,getAction,postAction,putAction,deleteAction,downFile} from '@/api/manage'
|
|
|
- import {queryDepartTreeList} from '@/api/api'
|
|
|
- import safetyStockListAdd from './modules/safetyStockListAdd'
|
|
|
- //---------workflow by fhf end -------------
|
|
|
- export default {
|
|
|
- name: "SafetyStockList",
|
|
|
- mixins: [JeecgListMixin],
|
|
|
- components: {
|
|
|
- safetyStockListAdd
|
|
|
- },
|
|
|
- data () {
|
|
|
- return {
|
|
|
- description: '安全库存列表页面',
|
|
|
- queryParam:{},
|
|
|
- selectedRowKeys:[],
|
|
|
- selectedRow:[],
|
|
|
- documentData:[],
|
|
|
- toggleSearchStatus:false,
|
|
|
- dataSource:[{}],
|
|
|
- ipagination:{
|
|
|
- current: 1,
|
|
|
- pageSize: 10,
|
|
|
- pageSizeOptions: ['10', '20', '30'],
|
|
|
- showTotal: (total, range) => {
|
|
|
- return range[0] + '-' + range[1] + ' 共' + total + '条'
|
|
|
- },
|
|
|
- showQuickJumper: true,
|
|
|
- showSizeChanger: true,
|
|
|
- total: 0
|
|
|
- },
|
|
|
- // 表头
|
|
|
- columns: [
|
|
|
- {
|
|
|
- title: '#',
|
|
|
- dataIndex: '',
|
|
|
- key: 'rowIndex',
|
|
|
- width: 60,
|
|
|
- align: "center",
|
|
|
- customRender:function (t, r, index) {
|
|
|
- return parseInt(index)+1;
|
|
|
- }
|
|
|
- },
|
|
|
- {
|
|
|
- title: '存货编码',
|
|
|
- align:"center",
|
|
|
- dataIndex: 'inventoryCode',
|
|
|
- ellipsis: true,
|
|
|
-
|
|
|
- },
|
|
|
- {
|
|
|
- title: '存货名称',
|
|
|
- align:"center",
|
|
|
- dataIndex: 'inventoryName',
|
|
|
- ellipsis: true,
|
|
|
-
|
|
|
- },
|
|
|
- {
|
|
|
- title: '颜色',
|
|
|
- align:"center",
|
|
|
- dataIndex: 'color',
|
|
|
- ellipsis: true,
|
|
|
-
|
|
|
- },
|
|
|
- {
|
|
|
- title: '定尺',
|
|
|
- align:"center",
|
|
|
- dataIndex: 'fixedLength',
|
|
|
- ellipsis: true,
|
|
|
-
|
|
|
- },
|
|
|
- {
|
|
|
- title: '合金',
|
|
|
- align:"center",
|
|
|
- dataIndex: 'alloy',
|
|
|
- ellipsis: true,
|
|
|
-
|
|
|
- },
|
|
|
- {
|
|
|
- title: '标准',
|
|
|
- align:"center",
|
|
|
- dataIndex: 'standard',
|
|
|
- ellipsis: true,
|
|
|
-
|
|
|
- },
|
|
|
- {
|
|
|
- title: '规格',
|
|
|
- align:"center",
|
|
|
- dataIndex: 'specs',
|
|
|
- ellipsis: true,
|
|
|
-
|
|
|
- },
|
|
|
- {
|
|
|
- title: '型号',
|
|
|
- align:"center",
|
|
|
- dataIndex: 'model',
|
|
|
- ellipsis: true,
|
|
|
-
|
|
|
- },
|
|
|
- {
|
|
|
- title: '安全库存',
|
|
|
- align:"center",
|
|
|
- dataIndex: 'safetyStock',
|
|
|
- ellipsis: true,
|
|
|
-
|
|
|
- },
|
|
|
- {
|
|
|
- title: '最高库存',
|
|
|
- align:"center",
|
|
|
- dataIndex: 'maxStock',
|
|
|
- ellipsis: true,
|
|
|
-
|
|
|
- },
|
|
|
- {
|
|
|
- title: '起订点',
|
|
|
- align:"center",
|
|
|
- dataIndex: 'startingPoint',
|
|
|
- ellipsis: true,
|
|
|
-
|
|
|
- },
|
|
|
- {
|
|
|
- title: '辅单位',
|
|
|
- align:"center",
|
|
|
- dataIndex: 'auxiliaryUnit',
|
|
|
- ellipsis: true,
|
|
|
-
|
|
|
- },
|
|
|
- {
|
|
|
- title: '单位',
|
|
|
- align:"center",
|
|
|
- dataIndex: 'unit',
|
|
|
- ellipsis: true,
|
|
|
-
|
|
|
- },
|
|
|
- {
|
|
|
- title: '按辅计量计算',
|
|
|
- align:"center",
|
|
|
- dataIndex: 'isAuxiliaryUnit',
|
|
|
- ellipsis: true,
|
|
|
-
|
|
|
- },
|
|
|
- {
|
|
|
- title: '米重',
|
|
|
- align:"center",
|
|
|
- dataIndex: 'meterWeight',
|
|
|
- ellipsis: true,
|
|
|
-
|
|
|
- },
|
|
|
- {
|
|
|
- title: '窗号',
|
|
|
- align:"center",
|
|
|
- dataIndex: 'windowNo',
|
|
|
- ellipsis: true,
|
|
|
-
|
|
|
- },
|
|
|
- {
|
|
|
- title: '装饰面周长',
|
|
|
- align:"center",
|
|
|
- dataIndex: 'decorationLength',
|
|
|
- ellipsis: true,
|
|
|
-
|
|
|
- },
|
|
|
- {
|
|
|
- title: '专用区',
|
|
|
- align:"center",
|
|
|
- dataIndex: 'exclusiveZone',
|
|
|
- ellipsis: true,
|
|
|
-
|
|
|
- },
|
|
|
- ],
|
|
|
- url: {
|
|
|
- list: "/production/safetyStock/list",
|
|
|
- },
|
|
|
- importExcelUrl:'/production/safetyStock/importExcel',
|
|
|
- // ---------workflow by fhf start -------------
|
|
|
- serviceName: 'assetAllocationService',
|
|
|
- // ---------workflow by fhf end -------------
|
|
|
- }
|
|
|
- },
|
|
|
- created () {
|
|
|
- this.getTableList()
|
|
|
- },
|
|
|
- computed: {
|
|
|
- importExcelUrl: function(){
|
|
|
- return `${window._CONFIG['domianURL']}/${this.importExcelUrl}`;
|
|
|
- },
|
|
|
- },
|
|
|
- methods: {
|
|
|
- getTableList(){
|
|
|
- getAction('/production/safetyStock/list',this.queryParam).then(res=>{
|
|
|
- if(res.success){
|
|
|
- this.dataSource =res.result.records
|
|
|
- this.ipagination = {
|
|
|
- total: res.result.total,
|
|
|
- current: res.result.current,
|
|
|
- pageSize: res.result.size
|
|
|
- }
|
|
|
- }else{
|
|
|
- this.$message.error(res.message);
|
|
|
- }
|
|
|
- })
|
|
|
- },
|
|
|
- //单据日期
|
|
|
- changeStartDate(){
|
|
|
-
|
|
|
- },
|
|
|
- onSearch(){
|
|
|
- // this.$refs.materialProcurementSearch.visible = true
|
|
|
- },
|
|
|
- exportList(fileName){
|
|
|
- downFile('/production/safetyStock/exportXls', this.queryParam).then(data => {
|
|
|
- if (!data) {
|
|
|
- this.$message.warning('文件下载失败')
|
|
|
- return
|
|
|
- }
|
|
|
- if (typeof window.navigator.msSaveBlob !== 'undefined') {
|
|
|
- window.navigator.msSaveBlob(new Blob([data], { type: 'application/vnd.ms-excel' }), fileName + '.xlsx')
|
|
|
- } else {
|
|
|
- let url = window.URL.createObjectURL(new Blob([data], { type: 'application/vnd.ms-excel' }))
|
|
|
- let link = document.createElement('a')
|
|
|
- link.style.display = 'none'
|
|
|
- link.href = url
|
|
|
- link.setAttribute('download', fileName + '.xlsx')
|
|
|
- document.body.appendChild(link)
|
|
|
- link.click()
|
|
|
- document.body.removeChild(link) // 下载完成移除元素
|
|
|
- window.URL.revokeObjectURL(url) // 释放掉blob对象
|
|
|
- }
|
|
|
- })
|
|
|
- },
|
|
|
- searchReset(){
|
|
|
- this.queryParam={}
|
|
|
- this.getTableList()
|
|
|
- },
|
|
|
- searchQuery(){
|
|
|
- this.queryParam.pageNo = '1'
|
|
|
- this.getTableList()
|
|
|
- },
|
|
|
- addList(){
|
|
|
- this.$refs.safetyStockListAdd.visible=true
|
|
|
- this.$refs.safetyStockListAdd.defaultMethod='add'
|
|
|
- },
|
|
|
- editList(){
|
|
|
- if(this.selectedRowKeys.length==0){
|
|
|
- this.$message.warning('请勾选数据!')
|
|
|
- }else if(this.selectedRowKeys.length>1){
|
|
|
- this.$message.warning('只可勾选一条数据')
|
|
|
- }else{
|
|
|
- this.$refs.safetyStockListAdd.visible=true
|
|
|
- this.$refs.safetyStockListAdd.defaultMethod='edit'
|
|
|
- this.$refs.safetyStockListAdd.getEditData(this.selectedRowKeys[0])
|
|
|
- }
|
|
|
- },
|
|
|
- delectList(){
|
|
|
- if(this.selectedRowKeys.length==0){
|
|
|
- this.$message.warning('请勾选数据!')
|
|
|
- }else if(this.selectedRowKeys.length>1){
|
|
|
- var ids = this.selectedRowKeys.toString()
|
|
|
- var that = this
|
|
|
- deleteAction('/production/safetyStock/deleteBatch', {ids: ids}).then((res) => {
|
|
|
- if (res.success) {
|
|
|
- this.$message.success('删除成功!');
|
|
|
- this.getTableList()
|
|
|
- } else {
|
|
|
- that.$message.error(res.message);
|
|
|
- }
|
|
|
- });
|
|
|
- }else{
|
|
|
- deleteAction('/production/safetyStock/delete', {id: this.selectedRowKeys[0]}).then((res) => {
|
|
|
- if (res.success) {
|
|
|
- this.$message.success('删除成功!');
|
|
|
- this.getTableList()
|
|
|
- } else {
|
|
|
- that.$message.error(res.message);
|
|
|
- }
|
|
|
- });
|
|
|
- }
|
|
|
- },
|
|
|
- onSelectChange(selectedRowKeys, selectionRows) {
|
|
|
- this.selectedRowKeys = selectedRowKeys;
|
|
|
- this.selectedRow = selectionRows;
|
|
|
- },
|
|
|
- handleTableChange(pagination, filters, sorter) {
|
|
|
- // console.log('当前页信息>>>>',pagination)
|
|
|
- this.queryParam.pageNo = pagination.current
|
|
|
- this.queryParam.pageSize = pagination.pageSize
|
|
|
- this.getTableList()
|
|
|
- },
|
|
|
- }
|
|
|
- }
|
|
|
- </script>
|
|
|
- <style scoped lang="less">
|
|
|
- /* @import '~@assets/less/common.less' */
|
|
|
- /deep/.ant-input{
|
|
|
- height:29px;
|
|
|
- }
|
|
|
- /deep/.ant-select-selection--single {
|
|
|
- height: 29px;
|
|
|
-
|
|
|
- }
|
|
|
- /deep/.ant-select{
|
|
|
- font-size: 12px;
|
|
|
- }
|
|
|
- /deep/.ant-form label{
|
|
|
- font-size: 12px;
|
|
|
- }
|
|
|
- /deep/.table-page-search-wrapper .ant-form-inline .ant-form-item{
|
|
|
- margin-bottom:9px
|
|
|
- }
|
|
|
- /deep/.top>.ant-card-body{
|
|
|
- padding-bottom:0px;
|
|
|
- padding-top: 12px;
|
|
|
- }
|
|
|
- /deep/.ant-btn{
|
|
|
- height:28px
|
|
|
- }
|
|
|
- /deep/.ant-table-thead > tr > th{
|
|
|
- padding: 6px 8px !important;
|
|
|
- }
|
|
|
- /deep/ .ant-table-tbody > tr > td{
|
|
|
- padding: 6px 8px !important;
|
|
|
- }
|
|
|
- /deep/ .ant-table{
|
|
|
- font-size:12px
|
|
|
- }
|
|
|
- /deep/.ant-table-fixed-header .ant-table-scroll .ant-table-header{
|
|
|
- width: calc(100% + 9px);//减去滚动条的宽度
|
|
|
- }
|
|
|
- /deep/.middle>.ant-card-body{
|
|
|
- padding-bottom:14px;
|
|
|
- padding-top:14px;
|
|
|
- }
|
|
|
- /deep/.ant-select-sm .ant-select-selection__rendered{
|
|
|
- line-height: 27px;
|
|
|
- }
|
|
|
- </style>
|