jingbb vor 1 Jahr
Ursprung
Commit
8e5bce42ec
1 geänderte Dateien mit 403 neuen und 0 gelöschten Zeilen
  1. 403 0
      src/views/production/mrp/mrp.vue

+ 403 - 0
src/views/production/mrp/mrp.vue

@@ -0,0 +1,403 @@
+<template>
+    <div>
+        <a-card :bordered="false" class="top" style="margin-bottom: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.productionOrg" @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.orderCode"></a-input>
+                  </a-form-item>
+                </a-col>
+                <a-col :md="4" :sm="24">
+                    <a-form-item label="单据日期">
+                    <a-range-picker v-model="orderDate"  style="width: 100%;" @change="changeStartDate" />
+                      <!-- <a-date-picker showTime valueFormat="YYYY-MM-DD" format = "YYYY-MM-DD" v-model="queryParam.transferDate" style="width: 100%"/>            -->
+                    </a-form-item>
+                  </a-col>
+                  <a-col :md="4" :sm="24">
+                    <a-form-item label="单据状态">
+                      <a-select v-model="queryParam.state"  style='width:100%' >
+                        <a-select-option value='自由'> 自由</a-select-option>
+                        <a-select-option value='已批准'> 已批准</a-select-option>
+                        <a-select-option value='已运算'> 已运算</a-select-option>
+                        <a-select-option value='已请购'> 已请购</a-select-option>
+                        <a-select-option value='已关闭'> 已关闭</a-select-option>
+                       </a-select>
+                    </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.salesperson" @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.planDept" @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.project" @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.remarks"></a-input>
+                    </a-form-item>
+                  </a-col>
+                  <a-col :md="4" :sm="24">
+                    <a-form-item label="业务类型">
+                      <a-select v-model="queryParam.type"  style='width:100%' >
+                            <a-select-option value='1'> 1</a-select-option>
+                       </a-select>
+                    </a-form-item>
+                  </a-col>
+                  <a-col :md="4" :sm="24">
+                    <a-form-item label="工单号">
+                      <a-input placeholder="请输入" v-model="queryParam.workNo"></a-input>
+                    </a-form-item>
+                  </a-col>
+                  <a-col :md="4" :sm="24">
+                    <a-form-item label="制单人">
+                      <a-input placeholder="请输入" v-model="queryParam.createBy"></a-input>
+                    </a-form-item>
+                  </a-col>
+                  <a-col :md="4" :sm="24">
+                    <a-form-item label="审核人">
+                      <a-input placeholder="请输入" v-model="queryParam.reviewer"></a-input>
+                    </a-form-item>
+                  </a-col>
+                  <a-col :md="4" :sm="24">
+                    <a-form-item label="最后修改人">
+                      <a-input placeholder="请输入" v-model="queryParam.updateBy"></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>
+          </div>
+      
+          <!-- table区域-begin -->
+          <div>  
+            <a-table
+              ref="table"
+              size="middle"
+              bordered
+              rowKey="id"
+              :columns="columns"
+              :dataSource="dataSource"
+              :pagination="ipagination"
+              :scroll="{ x: 1500, y: 300 }"
+              :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
+              @change="handleTableChange"
+              :customRow ="clickRow"
+              >
+      
+            </a-table>
+          </div>
+          <!-- table区域-end -->
+      
+        </a-card>
+    </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 alertModal from '../../../plugins/modal'
+        import { Message } from "element-ui";
+        //---------workflow  by fhf end -------------
+        export default {
+          name: "materialProcurementList",
+          mixins: [JeecgListMixin],
+          components: {
+          },
+          data () {
+            return {
+              description: '资产调拨主表管理页面',
+              queryParam:{},
+              selectedRowKeys:[],
+              selectedRows:[],
+              documentData:[],
+              orderDate:[],
+              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: 'productionOrg',
+                  ellipsis: true,
+    
+                },
+                {
+                  title: '单据号',
+                  align:"center",
+                  dataIndex: 'orderCode',
+                  ellipsis: true,
+    
+                },
+                {
+                  title: '单据日期',
+                  align:"center",
+                  dataIndex: 'orderDate',
+                  ellipsis: true,
+    
+                },
+                {
+                  title: '单据状态',
+                  align:"center",
+                  dataIndex: 'state',
+                  ellipsis: true,
+    
+                },
+                {
+                  title: '业务员',
+                  align:"center",
+                  dataIndex: 'salesperson',
+                  ellipsis: true,
+    
+                },
+                {
+                  title: '计划部门',
+                  align:"center",
+                  dataIndex: 'planDept',
+                  ellipsis: true,
+    
+                },
+                {
+                  title: '项目',
+                  align:"center",
+                  dataIndex: 'project',
+                  ellipsis: true,
+    
+                },
+                {
+                  title: '备注',
+                  align:"center",
+                  dataIndex: 'remarks',
+                  ellipsis: true,
+    
+                },
+                {
+                  title: '业务类型',
+                  align:"center",
+                  dataIndex: 'type',
+                  ellipsis: true,
+    
+                },
+                {
+                  title: '工单号',
+                  align:"center",
+                  dataIndex: 'workNo',
+                  ellipsis: true,
+    
+                },
+                {
+                  title: '制单人',
+                  align:"center",
+                  dataIndex: 'createBy',
+                  ellipsis: true,
+    
+                },
+                {
+                  title: '审核人',
+                  align:"center",
+                  dataIndex: 'reviewer',
+                  ellipsis: true,
+    
+                },
+                
+                {
+                  title: '最后修改人',
+                  align:"center",
+                  dataIndex: 'updateBy',
+                  ellipsis: true,
+    
+                },
+                {
+                  title: '最后修改时间',
+                  align:"center",
+                  dataIndex: 'updateTime',
+                  ellipsis: true,
+                },
+              ],
+              importExcelUrl:'/production/safetyStock/importExcel',
+                 // ---------workflow  by fhf start -------------
+              serviceName: 'assetAllocationService',
+              // ---------workflow  by fhf end -------------
+              }
+            },
+            computed: {
+              importExcelUrl: function(){
+                  return `${window._CONFIG['domianURL']}/${this.importExcelUrl}`;
+              },
+            },
+      
+          created () {
+            this.getTableList()
+           },
+          methods: {
+            //获取数据
+            getTableList(){
+              alertModal.loading("执行中,请稍后!")
+              getAction('/MRPOperationList/madeOperationList/list',this.queryParam).then(res=>{
+                        alertModal.closeLoading();
+                        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);
+                        }
+                    })
+            },
+            //查询
+            searchQuery(){
+              this.queryParam.pageNo=1
+              this.getTableList()
+            },
+            //单据日期
+            changeStartDate(data){
+              this.orderDate = data
+              this.queryParam.orderDate_begin = data.length==2?moment(data[0]).format('YYYY-MM-DD'):''
+              this.queryParam.orderDate_end = data.length==2?moment(data[1]).format('YYYY-MM-DD'):''
+            },
+            onSearch(){
+            },
+            //重置
+            searchReset(){
+                this.queryParam={}
+                this.orderDate = []
+                this.getTableList()
+            },
+            //新增
+            addList(){
+               
+            },
+        
+            //勾选
+            onSelectChange(selectedRowKeys, selectionRows) {
+              this.selectedRowKeys = selectedRowKeys;
+              this.selectedRows = selectionRows;
+            },
+            handleTableChange(pagination, filters, sorter) {
+                this.queryParam.pageNo = pagination.current
+                this.queryParam.pageSize = pagination.pageSize
+                this.getTableList()
+            },
+           
+            //双击
+            clickRow(record, index){
+              return {
+                on: {
+                  dblclick: () => {
+                   
+                  },
+                }
+              }       
+           },
+        }
+    }
+      </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:2px;
+            padding-top:14px;
+        }
+        /deep/.ant-select-sm .ant-select-selection__rendered{
+            line-height: 27px;
+        }
+      </style>