浏览代码

MRP运算清单

jingbb 1 年之前
父节点
当前提交
e881f1fc9a

+ 319 - 0
src/views/production/mrp/modules/MRPDetail.vue

@@ -0,0 +1,319 @@
+<template>
+    <a-modal
+      title="编辑"
+       width="95%"
+      :visible="visible"
+      :maskClosable="false"
+      switchFullscreen
+      @cancel="handleCancel"
+      @ok='handleOk'
+      >
+      <template slot="footer">
+        <a-button  @click="handleCancel">关闭</a-button>
+     </template>
+      <a-card :bordered="false" class="top" style="margin-bottom:1%;margin-top:1%" :loading = 'loading'>
+        <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="form.productionOrg" @search="onSearch" disabled></a-input-search>
+                        </a-form-item>
+                    </a-col>
+                    <a-col :md="4" :sm="24">
+                        <a-form-item label="项目">
+                            <a-input-search placeholder="请输入" v-model="form.project" @search="onSearch" disabled></a-input-search>
+                        </a-form-item>
+                    </a-col>
+                    <a-col :md="4" :sm="24">
+                        <a-form-item label="单据日期">
+                            <a-date-picker showTime valueFormat="YYYY-MM-DD" format = "YYYY-MM-DD" v-model="form.orderDate" style="width:100%" disabled/>
+                        </a-form-item>
+                    </a-col>
+                    
+                    <a-col  :md="4" :sm="24">
+                        <a-form-item label="单据号">
+                            <a-input placeholder="请输入" v-model="form.orderCode" disabled></a-input>
+                        </a-form-item>
+                    </a-col>
+                    <a-col :md="4" :sm="24">
+                        <a-form-item label="业务员">
+                            <a-input placeholder="请输入" v-model="form.salesperson" disabled></a-input>
+                        </a-form-item>
+                    </a-col>
+                    <a-col :md="4" :sm="24">
+                        <a-form-item label="计划部门">
+                            <a-input-search placeholder="请输入" v-model="form.planDept" @search="onSearch" disabled></a-input-search>
+                        </a-form-item>
+                    </a-col>
+                    <a-col :md="4" :sm="24">
+                        <a-form-item label="单据状态">
+                            <a-select v-model="form.state"  style='width:100%' disabled>
+                                <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="备注">
+                            <a-input-search placeholder="请输入" v-model="form.remarks"  @search="onSearch"  disabled></a-input-search>
+                        </a-form-item>
+                    </a-col>
+                    <a-col :md="4" :sm="24">
+                        <a-form-item label="业务类型">
+                            <a-select v-model="form.type"  style='width:100%'  @change="changeType" disabled>
+                                <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="工单号">
+                            <a-input placeholder="请输入" v-model="form.workNo"  disabled></a-input>
+                        </a-form-item>
+                    </a-col>
+                </a-row>
+            </a-form>
+        </div>
+     </a-card>
+     <a-card :bordered="false" class="three" style="margin-bottom:1%" :loading = 'loading'>
+       <div class="table-operator">
+            <a-button type="danger" size="small"  @click="updataProRequirment" v-if="form.type=='工装'" disabled>更新采购需求</a-button>
+            <a-button  size="small" disabled>生成采购单</a-button>
+            <a-button  size="small" disabled>生成转库单</a-button>
+       </div>
+       <a-tabs v-model="activeKey" @change="handleChangeTabs">
+            <a-tab-pane tab="需求" :key="refKeys[0]" :forceRender="true">
+                <demand ref="demand"></demand>
+            </a-tab-pane>
+            <a-tab-pane tab="供应" :key="refKeys[1]" :forceRender="true">
+                <supply ref="supply"></supply>
+            </a-tab-pane>
+            <a-tab-pane tab="供需平衡结果" :key="refKeys[2]" :forceRender="true">
+                <supplyDemandBalance ref="supplyDemandBalance"></supplyDemandBalance>
+            </a-tab-pane>
+            <a-tab-pane tab="采购需求" :key="refKeys[3]" :forceRender="true">
+                <ProRequirementsDetail ref="ProRequirementsDetail"></ProRequirementsDetail>
+            </a-tab-pane>
+            <a-tab-pane tab="转库需求" :key="refKeys[4]" :forceRender="true" v-if="form.type=='工装'">
+                <TraRequirementsDeatail ref="TraRequirementsDeatail"></TraRequirementsDeatail>
+            </a-tab-pane>
+        </a-tabs>
+       
+    </a-card>
+    <a-card :bordered="false" class="bottom" 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="6" :sm="24">
+                        <a-form-item label="制单人">
+                            <a-input placeholder="请输入" v-model="form1.createBy" disabled></a-input>
+                        </a-form-item>
+                    </a-col>
+                    <a-col :md="6" :sm="24">
+                        <a-form-item label="审批人">
+                            <a-input placeholder="请输入" v-model="form1.reviewer" disabled></a-input>
+                        </a-form-item>
+                    </a-col>
+                    <a-col :md="6" :sm="24">
+                        <a-form-item label="最后修改人">
+                            <a-input placeholder="请输入" v-model="form1.updateBy" disabled></a-input>
+                        </a-form-item>
+                    </a-col>
+                    <a-col :md="6" :sm="24">
+                        <a-form-item label="最后修改时间">
+                            <a-date-picker showTime valueFormat="YYYY-MM-DD" format = "YYYY-MM-DD" v-model="form1.updateTime" disabled/>
+                        </a-form-item>
+                    </a-col>
+                </a-row>
+            </a-form>
+         </div>
+    </a-card>
+    </a-modal>
+  </template>
+  <script>
+  
+      import { FormTypes } from '@/utils/JEditableTableUtil'
+      import { JEditableTableModelMixin } from '@/mixins/JEditableTableModelMixin'
+      import moment from "moment"
+      import { httpAction ,getAction,postAction,putAction} from '@/api/manage'
+      import demand from './demand'
+      import supply from './supply'
+      import supplyDemandBalance from './supplyDemandBalance'
+      import ProRequirementsDetail from './ProRequirementsDetail'
+      import TraRequirementsDeatail from './TraRequirementsDeatail'
+      export default {
+        name: 'MRPDetail',
+        mixins: [JEditableTableModelMixin],
+        components: {
+            demand,
+            supply,
+            supplyDemandBalance,
+            ProRequirementsDetail,
+            TraRequirementsDeatail
+        },
+        data() {
+          return {
+            visible:false,
+            form:{},
+            form1:{},
+            execute:undefined,
+            dataSource:[],
+            loading:false,
+            // ipagination:{},
+            selectedRowKeys:[],
+            selectedRows:[],
+            activeKey:'demand',
+            refKeys:['demand','supply','supplyDemandBalance','ProRequirements','Warehousing'],
+          }
+        },
+        created() {
+          
+        },
+        methods: {
+            handleCancel(){
+                this.visible=false
+                this.activeKey='demand',
+                this.dataSource = [] 
+                this.form={}
+                this.form1={}
+                this.$emit('ok')
+            },
+            handleTableChange(){
+
+            },
+            onSearch(){
+               
+            },
+            getMainData(id){
+                getAction('/MRPOperationList/madeOperationList/queryById',{id:id}).then(res=>{
+                    if(res.success){
+                       this.form=res.result
+                       this.form1=res.result
+                       this.getDemandData(this.form.id)
+                       this.getSupplyData(this.form.id)
+                       this.getSupplyDemandBalanceData(this.form.id)
+                       this.getProRequirementsData(this.form.id)
+                       if(this.form.type=='工装'){
+                        this.getTraRequirementsData(this.form.id)
+                       }  
+                    }else{
+                      this.$message.error(res.message);
+                    }
+                })
+            },
+            getDemandData(id){
+                getAction('/MRPOperationList/madeOperationList/queryMadeOperationListDemandByMainId',{id:id}).then(res=>{
+                    if(res.success){
+                      this.$refs.demand.dataSource = res.result
+                    }else{
+                      this.$message.error(res.message);
+                    }
+                })
+            },
+            getSupplyData(id){
+                getAction('/MRPOperationList/madeOperationList/queryMadeOperationListProvideByMainId',{id:id}).then(res=>{
+                    if(res.success){
+                      this.$refs.supply.dataSource = res.result
+                    }else{
+                      this.$message.error(res.message);
+                    }
+                })
+            },
+            getSupplyDemandBalanceData(id){
+                getAction('/MRPOperationList/madeOperationList/queryMadeOperationListResultByMainId',{id:id}).then(res=>{
+                    if(res.success){
+                      this.$refs.supplyDemandBalance.dataSource = res.result
+                    }else{
+                      this.$message.error(res.message);
+                    }
+                })
+            },
+            getProRequirementsData(id){
+                getAction('/MRPOperationList/madeOperationList/queryMadeOperationListPurchaseByMainId',{id:id}).then(res=>{
+                    if(res.success){
+                      this.$refs.ProRequirementsDetail.dataSource = res.result
+                    }else{
+                      this.$message.error(res.message);
+                    }
+                })
+            },
+            getTraRequirementsData(id){
+                getAction('/MRPOperationList/madeOperationList/queryMadeOperationListDepositByMainId',{id:id}).then(res=>{
+                    if(res.success){
+                      this.$refs.TraRequirementsDeatail.dataSource = res.result
+                    }else{
+                      this.$message.error(res.message);
+                    }
+                })
+            },
+            changeType(prop){
+                if(prop=='工装'){
+                    this.getTraRequirementsData(this.form.id)
+                }
+            },
+
+        }
+      }
+  </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/.moddle>.ant-card-body{
+        padding-bottom:0px;
+        padding-top: 12px;
+    }
+    /deep/.top>.ant-card-body{
+        padding-bottom:0px;
+        padding-top: 12px;
+    }
+    /deep/.ant-btn{
+        height:28px
+    }
+    /deep/.ant-modal-body{
+        padding-bottom: 0px;
+        padding-top: 0px;
+    }
+    // /deep/.ant-modal-body{
+    //     background: #f0f2f5;
+    // }
+    /deep/.ant-modal-content{
+        background: #f0f2f5;
+    }
+    /deep/.ant-card-body .table-operator {
+        margin-bottom: 0px;
+    }
+    /deep/.three>.ant-card-body{
+        padding-bottom:12px;
+        padding-top: 12px;
+    }
+    /deep/.bottom>.ant-card-body{
+        padding-bottom:0px;
+        padding-top: 12px;
+    }
+
+    /deep/.ant-calendar-picker{
+        min-width: 0px !important;  
+    }
+    /deep/.sonItem {
+        margin-bottom:0px !important
+    }
+    // /deep/#sonList>.ant-spin-nested-loading>.ant-spin-container>.ant-table>.ant-table-content>.ant-table-scroll>.ant-table-body>.ant-table-fixed>.ant-table-tbody > tr > td {
+    //     padding: 0px 8px !important;
+    // }
+  </style>

+ 343 - 0
src/views/production/mrp/modules/MRPEdit.vue

@@ -0,0 +1,343 @@
+<template>
+    <a-modal
+      title="编辑"
+       width="95%"
+      :visible="visible"
+      :maskClosable="false"
+      switchFullscreen
+      @cancel="handleCancel"
+      @ok='handleOk'
+      >
+      <template slot="footer">
+        <a-button  @click="handleCancel">关闭</a-button>
+        <a-button type="primary"  @click="handleOk" >保存</a-button>
+     </template>
+      <a-card :bordered="false" class="top" style="margin-bottom:1%;margin-top:1%" :loading = 'loading'>
+        <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="form.productionOrg" @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="form.project" @search="onSearch" ></a-input-search>
+                        </a-form-item>
+                    </a-col>
+                    <a-col :md="4" :sm="24">
+                        <a-form-item label="单据日期">
+                            <a-date-picker showTime valueFormat="YYYY-MM-DD" format = "YYYY-MM-DD" v-model="form.orderDate" style="width:100%" />
+                        </a-form-item>
+                    </a-col>
+                    
+                    <a-col  :md="4" :sm="24">
+                        <a-form-item label="单据号">
+                            <a-input placeholder="请输入" v-model="form.orderCode" ></a-input>
+                        </a-form-item>
+                    </a-col>
+                    <a-col :md="4" :sm="24">
+                        <a-form-item label="业务员">
+                            <a-input placeholder="请输入" v-model="form.salesperson" ></a-input>
+                        </a-form-item>
+                    </a-col>
+                    <a-col :md="4" :sm="24">
+                        <a-form-item label="计划部门">
+                            <a-input-search placeholder="请输入" v-model="form.planDept" @search="onSearch" ></a-input-search>
+                        </a-form-item>
+                    </a-col>
+                    <a-col :md="4" :sm="24">
+                        <a-form-item label="单据状态">
+                            <a-select v-model="form.state"  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="备注">
+                            <a-input-search placeholder="请输入" v-model="form.remarks"  @search="onSearch" ></a-input-search>
+                        </a-form-item>
+                    </a-col>
+                    <a-col :md="4" :sm="24">
+                        <a-form-item label="业务类型">
+                            <a-select v-model="form.type"  style='width:100%'  @change="changeType">
+                                <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="工单号">
+                            <a-input placeholder="请输入" v-model="form.workNo"  ></a-input>
+                        </a-form-item>
+                    </a-col>
+                </a-row>
+            </a-form>
+        </div>
+     </a-card>
+     <a-card :bordered="false" class="three" style="margin-bottom:1%" :loading = 'loading'>
+       <div class="table-operator">
+            <a-button type="danger" size="small"  @click="updataProRequirment" v-if="form.type=='工装'">更新采购需求</a-button>
+            <a-button  size="small">生成采购单</a-button>
+            <a-button  size="small">生成转库单</a-button>
+       </div>
+       <a-tabs v-model="activeKey" @change="handleChangeTabs">
+            <a-tab-pane tab="需求" :key="refKeys[0]" :forceRender="true">
+                <demand ref="demand"></demand>
+            </a-tab-pane>
+            <a-tab-pane tab="供应" :key="refKeys[1]" :forceRender="true">
+                <supply ref="supply"></supply>
+            </a-tab-pane>
+            <a-tab-pane tab="供需平衡结果" :key="refKeys[2]" :forceRender="true">
+                <supplyDemandBalance ref="supplyDemandBalance"></supplyDemandBalance>
+            </a-tab-pane>
+            <a-tab-pane tab="采购需求" :key="refKeys[3]" :forceRender="true">
+                <ProRequirements ref="ProRequirements"></ProRequirements>
+            </a-tab-pane>
+            <a-tab-pane tab="转库需求" :key="refKeys[4]" :forceRender="true" v-if="form.type=='工装'">
+                <TraRequirements ref="TraRequirements"></TraRequirements>
+            </a-tab-pane>
+        </a-tabs>
+       
+    </a-card>
+    <a-card :bordered="false" class="bottom" 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="6" :sm="24">
+                        <a-form-item label="制单人">
+                            <a-input placeholder="请输入" v-model="form1.createBy" disabled></a-input>
+                        </a-form-item>
+                    </a-col>
+                    <a-col :md="6" :sm="24">
+                        <a-form-item label="审批人">
+                            <a-input placeholder="请输入" v-model="form1.reviewer" disabled></a-input>
+                        </a-form-item>
+                    </a-col>
+                    <a-col :md="6" :sm="24">
+                        <a-form-item label="最后修改人">
+                            <a-input placeholder="请输入" v-model="form1.updateBy" disabled></a-input>
+                        </a-form-item>
+                    </a-col>
+                    <a-col :md="6" :sm="24">
+                        <a-form-item label="最后修改时间">
+                            <a-date-picker showTime valueFormat="YYYY-MM-DD" format = "YYYY-MM-DD" v-model="form1.updateTime" disabled/>
+                        </a-form-item>
+                    </a-col>
+                </a-row>
+            </a-form>
+         </div>
+    </a-card>
+    </a-modal>
+  </template>
+  <script>
+  
+      import { FormTypes } from '@/utils/JEditableTableUtil'
+      import { JEditableTableModelMixin } from '@/mixins/JEditableTableModelMixin'
+      import moment from "moment"
+      import { httpAction ,getAction,postAction,putAction} from '@/api/manage'
+      import demand from './demand'
+      import supply from './supply'
+      import supplyDemandBalance from './supplyDemandBalance'
+      import ProRequirements from './ProRequirements'
+      import TraRequirements from './TraRequirements'
+      export default {
+        name: 'MRPEdit',
+        mixins: [JEditableTableModelMixin],
+        components: {
+            demand,
+            supply,
+            supplyDemandBalance,
+            ProRequirements,
+            TraRequirements
+        },
+        data() {
+          return {
+            visible:false,
+            form:{},
+            form1:{},
+            execute:undefined,
+            dataSource:[],
+            loading:false,
+            // ipagination:{},
+            selectedRowKeys:[],
+            selectedRows:[],
+            activeKey:'demand',
+            refKeys:['demand','supply','supplyDemandBalance','ProRequirements','Warehousing'],
+          }
+        },
+        created() {
+          
+        },
+        methods: {
+            handleCancel(){
+                this.visible=false
+                this.activeKey='demand',
+                this.dataSource = [] 
+                this.form={}
+                this.form1={}
+                this.$emit('ok')
+            },
+            handleTableChange(){
+
+            },
+            onSearch(){
+               
+            },
+            getMainData(id){
+                getAction('/MRPOperationList/madeOperationList/queryById',{id:id}).then(res=>{
+                    if(res.success){
+                       this.form=res.result
+                       this.form1=res.result
+                       this.getDemandData(this.form.id)
+                       this.getSupplyData(this.form.id)
+                       this.getSupplyDemandBalanceData(this.form.id)
+                       this.getProRequirementsData(this.form.id)
+                       if(this.form.type=='工装'){
+                        this.getTraRequirementsData(this.form.id)
+                       }  
+                    }else{
+                      this.$message.error(res.message);
+                    }
+                })
+            },
+            getDemandData(id){
+                getAction('/MRPOperationList/madeOperationList/queryMadeOperationListDemandByMainId',{id:id}).then(res=>{
+                    if(res.success){
+                      this.$refs.demand.dataSource = res.result
+                    }else{
+                      this.$message.error(res.message);
+                    }
+                })
+            },
+            getSupplyData(id){
+                getAction('/MRPOperationList/madeOperationList/queryMadeOperationListProvideByMainId',{id:id}).then(res=>{
+                    if(res.success){
+                      this.$refs.supply.dataSource = res.result
+                    }else{
+                      this.$message.error(res.message);
+                    }
+                })
+            },
+            getSupplyDemandBalanceData(id){
+                getAction('/MRPOperationList/madeOperationList/queryMadeOperationListResultByMainId',{id:id}).then(res=>{
+                    if(res.success){
+                      this.$refs.supplyDemandBalance.dataSource = res.result
+                    }else{
+                      this.$message.error(res.message);
+                    }
+                })
+            },
+            getProRequirementsData(id){
+                getAction('/MRPOperationList/madeOperationList/queryMadeOperationListPurchaseByMainId',{id:id}).then(res=>{
+                    if(res.success){
+                      this.$refs.ProRequirements.dataSource = res.result
+                    }else{
+                      this.$message.error(res.message);
+                    }
+                })
+            },
+            getTraRequirementsData(id){
+                getAction('/MRPOperationList/madeOperationList/queryMadeOperationListDepositByMainId',{id:id}).then(res=>{
+                    if(res.success){
+                      this.$refs.TraRequirements.dataSource = res.result
+                    }else{
+                      this.$message.error(res.message);
+                    }
+                })
+            },
+            changeType(prop){
+                if(prop=='工装'){
+                    this.getTraRequirementsData(this.form.id)
+                }
+            },
+            handleOk(){
+                var madeOperationListPage = this.form
+                madeOperationListPage.madeOperationListDemandList = this.$refs.demand.dataSource
+                madeOperationListPage.madeOperationListDepositList = this.$refs.TraRequirements.dataSource
+                madeOperationListPage.madeOperationListProvideList = this.$refs.supply.dataSource
+                madeOperationListPage.madeOperationListPurchaseList = this.$refs.ProRequirements.dataSource
+                madeOperationListPage.madeOperationListResultList = this.$refs.supplyDemandBalance.dataSource
+                this.loading = true
+                postAction('/MRPOperationList/madeOperationList/edit', madeOperationListPage).then((res) => {
+                    if (res.success) {
+                        this.$message.success('编辑成功!');
+                        this.handleCancel()
+                        this.$emit('ok')
+                    } else {
+                        this.$message.error(res.message);
+                    }
+                }).finally(() => {
+                    this.loading = false
+                })
+            },
+            updataProRequirment(){
+
+            }
+
+        }
+      }
+  </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/.moddle>.ant-card-body{
+        padding-bottom:0px;
+        padding-top: 12px;
+    }
+    /deep/.top>.ant-card-body{
+        padding-bottom:0px;
+        padding-top: 12px;
+    }
+    /deep/.ant-btn{
+        height:28px
+    }
+    /deep/.ant-modal-body{
+        padding-bottom: 0px;
+        padding-top: 0px;
+    }
+    // /deep/.ant-modal-body{
+    //     background: #f0f2f5;
+    // }
+    /deep/.ant-modal-content{
+        background: #f0f2f5;
+    }
+    /deep/.ant-card-body .table-operator {
+        margin-bottom: 0px;
+    }
+    /deep/.three>.ant-card-body{
+        padding-bottom:12px;
+        padding-top: 12px;
+    }
+    /deep/.bottom>.ant-card-body{
+        padding-bottom:0px;
+        padding-top: 12px;
+    }
+
+    /deep/.ant-calendar-picker{
+        min-width: 0px !important;  
+    }
+    /deep/.sonItem {
+        margin-bottom:0px !important
+    }
+    // /deep/#sonList>.ant-spin-nested-loading>.ant-spin-container>.ant-table>.ant-table-content>.ant-table-scroll>.ant-table-body>.ant-table-fixed>.ant-table-tbody > tr > td {
+    //     padding: 0px 8px !important;
+    // }
+  </style>

+ 338 - 0
src/views/production/mrp/modules/ProRequirements.vue

@@ -0,0 +1,338 @@
+<template>
+    <div >
+        <a-form-model ref="formRef">
+            <a-table
+            ref="table"
+            size="middle"
+            bordered
+            id='sonList'
+            :columns="columns"
+            rowKey="rowNo"
+            :dataSource="dataSource"
+            :pagination="false"
+            :scroll="{ x: 5500, y: 300 }"
+            :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
+            @change="handleTableChange"
+            >
+            <template slot="purchaseQuantity" slot-scope="text, record, index">
+                <a-form-model-item prop="purchaseQuantity" class='sonItem'>
+                    <a-input placeholder="请输入" v-model="record.purchaseQuantity"></a-input>
+                </a-form-model-item>
+            </template>
+            <template slot="purchaseUnQuantity" slot-scope="text, record, index">
+                <a-form-model-item prop="purchaseUnQuantity" class='sonItem'>
+                    <a-input placeholder="请输入" v-model="record.purchaseUnQuantity"></a-input>
+                </a-form-model-item>
+            </template>
+            </a-table>
+        </a-form-model>
+    </div>
+  </template>
+  
+  <script>
+  import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+  import JEllipsis from '@/components/jeecg/JEllipsis'
+  import moment from 'moment'
+  export default {
+    name: 'ProRequirements', //  Tabs 详情
+    mixins: [JeecgListMixin],
+    components: {
+      JEllipsis,
+      moment,
+    },
+    data() {
+      return {
+        selectedRowKeys:[],
+        selectedRows:[],
+        dataSource:[],
+        columns: [
+                {
+                    title: '#',
+                    dataIndex: '',
+                    key: 'rowIndex',
+                    width: 60,
+                    align: "center",
+                    customRender:function (t, r, index) {
+                        return parseInt(index)+1;
+                    }
+                },
+                {
+                    title: '供应类型',
+                    align:"center",
+                    dataIndex: 'provideType',
+                    ellipsis: true,
+                },
+                {
+                    title: '项目编码',
+                    align:"center",
+                    dataIndex: 'projectCode',
+                    ellipsis: true,
+                },
+                {
+                    title: '项目名称',
+                    align:"center",
+                    dataIndex: 'projectName',
+                    ellipsis: true,
+                },
+                {
+                    title: '按辅计量单位',
+                    align:"center",
+                    dataIndex: 'isAuxiliaryUnit',
+                    ellipsis: true,
+                },
+                {
+                    title: '项目分类名称',
+                    align:"center",
+                    dataIndex: 'projectClassName',
+                    ellipsis: true,
+
+                },
+                {
+                    title: '批次',
+                    align:"center",
+                    dataIndex: 'batch',
+                    ellipsis: true,
+
+                },
+                {
+                    title: '仓库',
+                    align:"center",
+                    dataIndex: 'warehouse',
+                    ellipsis: true,
+
+                },
+                {
+                    title: '存货编码',
+                    align:"center",
+                    dataIndex: 'inventoryCode',
+                    ellipsis: true,
+
+                },
+                {
+                    title: '存货名称',
+                    align:"center",
+                    dataIndex: 'inventoryName',
+                    ellipsis: true,
+
+                },
+                {
+                    title: '规格',
+                    align:"center",
+                    dataIndex: 'specs',
+                    ellipsis: true,
+                },
+                {
+                    title: '型号',
+                    align:"center",
+                    dataIndex: 'model',
+                    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: 'meterWeight',
+                    ellipsis: true,
+                },
+                {
+                    title: '装饰面周长',
+                    align:"center",
+                    dataIndex: 'decorationLength',
+                    ellipsis: true,
+                },
+                {
+                    title: '配置',
+                    align:"center",
+                    dataIndex: 'allocation',
+                    ellipsis: true,
+                },
+                {
+                    title: '宽度',
+                    align:"center",
+                    dataIndex: 'width',
+                    ellipsis: true,
+                },
+                {
+                    title: '高度',
+                    align:"center",
+                    dataIndex: 'height',
+                    ellipsis: true,
+                },
+                {
+                    title: '起订点',
+                    align:"center",
+                    dataIndex: 'startingPoint',
+                    ellipsis: true,
+                },                
+                {
+                    title: '安全库存',
+                    align:"center",
+                    dataIndex: 'safetyStock',
+                    ellipsis: true,
+                 },
+                 {
+                    title: '家装在途数量',
+                    align:"center",
+                    dataIndex: 'theWayNum',
+                    ellipsis: true,
+                 },
+                 {
+                    title: '家装现存量',
+                    align:"center",
+                    dataIndex: 'handQuantity',
+                    ellipsis: true,
+                 },
+                 {
+                    title: '建议执行数量',
+                    align:"center",
+                    dataIndex: 'adviseExecuteNum',
+                    ellipsis: true,
+                 },
+                 {
+                    title: '本次采购主数量',
+                    align:"center",
+                    dataIndex: 'purchaseQuantity',
+                    ellipsis: true,
+                    scopedSlots: { customRender: 'purchaseQuantity' } 
+                 },
+                 {
+                    title: '本次采购辅数量',
+                    align:"center",
+                    dataIndex: 'purchaseUnQuantity',
+                    ellipsis: true,
+                    scopedSlots: { customRender: 'purchaseUnQuantity' } 
+                 },
+                 {
+                    title: '材料请购单主数量',
+                    align:"center",
+                    dataIndex: 'requisitionQuantity',
+                    ellipsis: true,
+                 },
+                 {
+                    title: '材料请购单辅数量',
+                    align:"center",
+                    dataIndex: 'requisitionUnQuantity',
+                    ellipsis: true,
+                 },
+                 {
+                    title: '计量单位',
+                    align:"center",
+                    dataIndex: 'unit',
+                    ellipsis: true,
+                 },
+                 {
+                    title: '辅助计量单位',
+                    align:"center",
+                    dataIndex: 'auxiliaryUnit',
+                    ellipsis: true,
+                 },
+          ],
+      }
+    },
+     props: {
+      
+    },
+  
+    created() {},
+    methods: {
+        onSelectChange(selectedRowKeys, selectionRows) {
+            this.selectedRowKeys = selectedRowKeys;
+            this.selectedRows = selectionRows;
+        },
+        handleTableChange(){
+
+        }
+       
+    },
+  
+    computed: {
+      // 合计数据
+      // sumInfoSource() {}
+    }
+  }
+  </script>
+  
+  <style lang="less" scoped>
+  /* @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/.moddle>.ant-card-body{
+        padding-bottom:0px;
+        padding-top: 12px;
+    }
+    /deep/.top>.ant-card-body{
+        padding-bottom:0px;
+        padding-top: 12px;
+    }
+    /deep/.ant-btn{
+        height:28px
+    }
+    /deep/.ant-modal-body{
+        padding-bottom: 0px;
+        padding-top: 0px;
+    }
+    // /deep/.ant-modal-body{
+    //     background: #f0f2f5;
+    // }
+    /deep/.ant-modal-content{
+        background: #f0f2f5;
+    }
+    /deep/.ant-card-body .table-operator {
+        margin-bottom: 0px;
+    }
+    /deep/.three>.ant-card-body{
+        padding-bottom:12px;
+        padding-top: 12px;
+    }
+    /deep/.bottom>.ant-card-body{
+        padding-bottom:0px;
+        padding-top: 12px;
+    }
+
+    /deep/.ant-calendar-picker{
+        min-width: 0px !important;  
+    }
+    /deep/.sonItem {
+        margin-bottom:0px !important
+    }
+    /deep/#sonList>.ant-spin-nested-loading>.ant-spin-container>.ant-table>.ant-table-content>.ant-table-scroll>.ant-table-body>.ant-table-fixed>.ant-table-tbody > tr > td {
+        padding: 0px 8px !important;
+    }
+  </style>
+  

+ 326 - 0
src/views/production/mrp/modules/ProRequirementsDetail.vue

@@ -0,0 +1,326 @@
+<template>
+    <div >
+        <a-form-model ref="formRef">
+            <a-table
+            ref="table"
+            size="middle"
+            bordered
+            id='sonList'
+            :columns="columns"
+            rowKey="rowNo"
+            :dataSource="dataSource"
+            :pagination="false"
+            :scroll="{ x: 5500, y: 300 }"
+            :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
+            @change="handleTableChange"
+            >
+            </a-table>
+        </a-form-model>
+    </div>
+  </template>
+  
+  <script>
+  import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+  import JEllipsis from '@/components/jeecg/JEllipsis'
+  import moment from 'moment'
+  export default {
+    name: 'ProRequirementsDetail', //  Tabs 详情
+    mixins: [JeecgListMixin],
+    components: {
+      JEllipsis,
+      moment,
+    },
+    data() {
+      return {
+        selectedRowKeys:[],
+        selectedRows:[],
+        dataSource:[],
+        columns: [
+                {
+                    title: '#',
+                    dataIndex: '',
+                    key: 'rowIndex',
+                    width: 60,
+                    align: "center",
+                    customRender:function (t, r, index) {
+                        return parseInt(index)+1;
+                    }
+                },
+                {
+                    title: '供应类型',
+                    align:"center",
+                    dataIndex: 'provideType',
+                    ellipsis: true,
+                },
+                {
+                    title: '项目编码',
+                    align:"center",
+                    dataIndex: 'projectCode',
+                    ellipsis: true,
+                },
+                {
+                    title: '项目名称',
+                    align:"center",
+                    dataIndex: 'projectName',
+                    ellipsis: true,
+                },
+                {
+                    title: '按辅计量单位',
+                    align:"center",
+                    dataIndex: 'isAuxiliaryUnit',
+                    ellipsis: true,
+                },
+                {
+                    title: '项目分类名称',
+                    align:"center",
+                    dataIndex: 'projectClassName',
+                    ellipsis: true,
+
+                },
+                {
+                    title: '批次',
+                    align:"center",
+                    dataIndex: 'batch',
+                    ellipsis: true,
+
+                },
+                {
+                    title: '仓库',
+                    align:"center",
+                    dataIndex: 'warehouse',
+                    ellipsis: true,
+
+                },
+                {
+                    title: '存货编码',
+                    align:"center",
+                    dataIndex: 'inventoryCode',
+                    ellipsis: true,
+
+                },
+                {
+                    title: '存货名称',
+                    align:"center",
+                    dataIndex: 'inventoryName',
+                    ellipsis: true,
+
+                },
+                {
+                    title: '规格',
+                    align:"center",
+                    dataIndex: 'specs',
+                    ellipsis: true,
+                },
+                {
+                    title: '型号',
+                    align:"center",
+                    dataIndex: 'model',
+                    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: 'meterWeight',
+                    ellipsis: true,
+                },
+                {
+                    title: '装饰面周长',
+                    align:"center",
+                    dataIndex: 'decorationLength',
+                    ellipsis: true,
+                },
+                {
+                    title: '配置',
+                    align:"center",
+                    dataIndex: 'allocation',
+                    ellipsis: true,
+                },
+                {
+                    title: '宽度',
+                    align:"center",
+                    dataIndex: 'width',
+                    ellipsis: true,
+                },
+                {
+                    title: '高度',
+                    align:"center",
+                    dataIndex: 'height',
+                    ellipsis: true,
+                },
+                {
+                    title: '起订点',
+                    align:"center",
+                    dataIndex: 'startingPoint',
+                    ellipsis: true,
+                },                
+                {
+                    title: '安全库存',
+                    align:"center",
+                    dataIndex: 'safetyStock',
+                    ellipsis: true,
+                 },
+                 {
+                    title: '家装在途数量',
+                    align:"center",
+                    dataIndex: 'theWayNum',
+                    ellipsis: true,
+                 },
+                 {
+                    title: '家装现存量',
+                    align:"center",
+                    dataIndex: 'handQuantity',
+                    ellipsis: true,
+                 },
+                 {
+                    title: '建议执行数量',
+                    align:"center",
+                    dataIndex: 'adviseExecuteNum',
+                    ellipsis: true,
+                 },
+                 {
+                    title: '本次采购主数量',
+                    align:"center",
+                    dataIndex: 'purchaseQuantity',
+                    ellipsis: true,
+                 },
+                 {
+                    title: '本次采购辅数量',
+                    align:"center",
+                    dataIndex: 'purchaseUnQuantity',
+                    ellipsis: true,
+                 },
+                 {
+                    title: '材料请购单主数量',
+                    align:"center",
+                    dataIndex: 'requisitionQuantity',
+                    ellipsis: true,
+                 },
+                 {
+                    title: '材料请购单辅数量',
+                    align:"center",
+                    dataIndex: 'requisitionUnQuantity',
+                    ellipsis: true,
+                 },
+                 {
+                    title: '计量单位',
+                    align:"center",
+                    dataIndex: 'unit',
+                    ellipsis: true,
+                 },
+                 {
+                    title: '辅助计量单位',
+                    align:"center",
+                    dataIndex: 'auxiliaryUnit',
+                    ellipsis: true,
+                 },
+          ],
+      }
+    },
+     props: {
+      
+    },
+  
+    created() {},
+    methods: {
+        onSelectChange(selectedRowKeys, selectionRows) {
+            this.selectedRowKeys = selectedRowKeys;
+            this.selectedRows = selectionRows;
+        },
+        handleTableChange(){
+
+        }
+       
+    },
+  
+    computed: {
+      // 合计数据
+      // sumInfoSource() {}
+    }
+  }
+  </script>
+  
+  <style lang="less" scoped>
+  /* @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/.moddle>.ant-card-body{
+        padding-bottom:0px;
+        padding-top: 12px;
+    }
+    /deep/.top>.ant-card-body{
+        padding-bottom:0px;
+        padding-top: 12px;
+    }
+    /deep/.ant-btn{
+        height:28px
+    }
+    /deep/.ant-modal-body{
+        padding-bottom: 0px;
+        padding-top: 0px;
+    }
+    // /deep/.ant-modal-body{
+    //     background: #f0f2f5;
+    // }
+    /deep/.ant-modal-content{
+        background: #f0f2f5;
+    }
+    /deep/.ant-card-body .table-operator {
+        margin-bottom: 0px;
+    }
+    /deep/.three>.ant-card-body{
+        padding-bottom:12px;
+        padding-top: 12px;
+    }
+    /deep/.bottom>.ant-card-body{
+        padding-bottom:0px;
+        padding-top: 12px;
+    }
+
+    /deep/.ant-calendar-picker{
+        min-width: 0px !important;  
+    }
+    /deep/.sonItem {
+        margin-bottom:0px !important
+    }
+    // /deep/#sonList>.ant-spin-nested-loading>.ant-spin-container>.ant-table>.ant-table-content>.ant-table-scroll>.ant-table-body>.ant-table-fixed>.ant-table-tbody > tr > td {
+    //     padding: 0px 8px !important;
+    // }
+  </style>
+  

+ 295 - 0
src/views/production/mrp/modules/TraRequirements.vue

@@ -0,0 +1,295 @@
+<template>
+    <div >
+        <a-form-model ref="formRef">
+            <a-table
+            ref="table"
+            size="middle"
+            bordered
+            id='sonList'
+            :columns="columns"
+            rowKey="rowNo"
+            :dataSource="dataSource"
+            :pagination="false"
+            :scroll="{ x: 5500, y: 300 }"
+            :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
+            @change="handleTableChange"
+            >
+            <template slot="quantity" slot-scope="text, record, index">
+                <a-form-model-item prop="quantity" class='sonItem'>
+                    <a-input placeholder="请输入" v-model="record.quantity"></a-input>
+                </a-form-model-item>
+            </template>
+            </a-table>
+        </a-form-model>
+    </div>
+  </template>
+  
+  <script>
+  import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+  import JEllipsis from '@/components/jeecg/JEllipsis'
+  import moment from 'moment'
+  export default {
+    name: 'TraRequirements', //  Tabs 详情
+    mixins: [JeecgListMixin],
+    components: {
+      JEllipsis,
+      moment,
+    },
+    data() {
+      return {
+        selectedRowKeys:[],
+        selectedRows:[],
+        dataSource:[],
+        columns: [
+                {
+                    title: '#',
+                    dataIndex: '',
+                    key: 'rowIndex',
+                    width: 60,
+                    align: "center",
+                    customRender:function (t, r, index) {
+                        return parseInt(index)+1;
+                    }
+                },
+                {
+                    title: '供应类型',
+                    align:"center",
+                    dataIndex: 'provideType',
+                    ellipsis: true,
+                },
+                {
+                    title: '转出仓库',
+                    align:"center",
+                    dataIndex: 'outWarehouse',
+                    ellipsis: true,
+                },
+                {
+                    title: '转入仓库',
+                    align:"center",
+                    dataIndex: 'inWarehouse;',
+                    ellipsis: true,
+                },
+                {
+                    title: '现存量',
+                    align:"center",
+                    dataIndex: 'handQuantity',
+                    ellipsis: true,
+                },
+                {
+                    title: '数量',
+                    align:"center",
+                    dataIndex: 'quantity',
+                    ellipsis: true,
+                    scopedSlots: { customRender: 'quantity' } 
+
+                },
+                {
+                    title: '建议执行数量',
+                    align:"center",
+                    dataIndex: 'adviseExecuteNum',
+                    ellipsis: true,
+
+                },
+                {
+                    title: '存货编码',
+                    align:"center",
+                    dataIndex: 'inventoryCode',
+                    ellipsis: true,
+
+                },
+                {
+                    title: '存货名称',
+                    align:"center",
+                    dataIndex: 'inventoryName',
+                    ellipsis: true,
+
+                },
+                {
+                    title: '转出批次',
+                    align:"center",
+                    dataIndex: 'batchOut',
+                    ellipsis: true,
+                },
+                {
+                    title: '转入批次',
+                    align:"center",
+                    dataIndex: 'batchIn',
+                    ellipsis: true,
+                },
+                {
+                    title: '型号',
+                    align:"center",
+                    dataIndex: 'model',
+                    ellipsis: true,
+                },
+                {
+                    title: '规格',
+                    align:"center",
+                    dataIndex: 'specs',
+                    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: 'meterWeight',
+                    ellipsis: true,
+                },
+                {
+                    title: '装饰面周长',
+                    align:"center",
+                    dataIndex: 'decorationLength',
+                    ellipsis: true,
+                },
+                {
+                    title: '配置',
+                    align:"center",
+                    dataIndex: 'allocation',
+                    ellipsis: true,
+                },
+                {
+                    title: '宽度',
+                    align:"center",
+                    dataIndex: 'width',
+                    ellipsis: true,
+                },
+                {
+                    title: '高度',
+                    align:"center",
+                    dataIndex: 'height',
+                    ellipsis: true,
+                },
+                 {
+                    title: '计量单位',
+                    align:"center",
+                    dataIndex: 'unit',
+                    ellipsis: true,
+                 },
+                 {
+                    title: '辅助计量单位',
+                    align:"center",
+                    dataIndex: 'auxiliaryUnit',
+                    ellipsis: true,
+                 },
+                 {
+                    title: '辅数量',
+                    align:"center",
+                    dataIndex: 'unQuantity',
+                    ellipsis: true,
+                 },
+                 {
+                    title: '换算率',
+                    align:"center",
+                    dataIndex: 'rate',
+                    ellipsis: true,
+                 },
+          ],
+      }
+    },
+     props: {
+      
+    },
+  
+    created() {},
+    methods: {
+        onSelectChange(selectedRowKeys, selectionRows) {
+            this.selectedRowKeys = selectedRowKeys;
+            this.selectedRows = selectionRows;
+        },
+        handleTableChange(){
+
+        }
+       
+    },
+  
+    computed: {
+      // 合计数据
+      // sumInfoSource() {}
+    }
+  }
+  </script>
+  
+  <style lang="less" scoped>
+  /* @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/.moddle>.ant-card-body{
+        padding-bottom:0px;
+        padding-top: 12px;
+    }
+    /deep/.top>.ant-card-body{
+        padding-bottom:0px;
+        padding-top: 12px;
+    }
+    /deep/.ant-btn{
+        height:28px
+    }
+    /deep/.ant-modal-body{
+        padding-bottom: 0px;
+        padding-top: 0px;
+    }
+    // /deep/.ant-modal-body{
+    //     background: #f0f2f5;
+    // }
+    /deep/.ant-modal-content{
+        background: #f0f2f5;
+    }
+    /deep/.ant-card-body .table-operator {
+        margin-bottom: 0px;
+    }
+    /deep/.three>.ant-card-body{
+        padding-bottom:12px;
+        padding-top: 12px;
+    }
+    /deep/.bottom>.ant-card-body{
+        padding-bottom:0px;
+        padding-top: 12px;
+    }
+
+    /deep/.ant-calendar-picker{
+        min-width: 0px !important;  
+    }
+    /deep/.sonItem {
+        margin-bottom:0px !important
+    }
+    /deep/#sonList>.ant-spin-nested-loading>.ant-spin-container>.ant-table>.ant-table-content>.ant-table-scroll>.ant-table-body>.ant-table-fixed>.ant-table-tbody > tr > td {
+        padding: 0px 8px !important;
+    }
+  </style>
+  

+ 289 - 0
src/views/production/mrp/modules/TraRequirementsDeatail.vue

@@ -0,0 +1,289 @@
+<template>
+    <div >
+        <a-form-model ref="formRef">
+            <a-table
+            ref="table"
+            size="middle"
+            bordered
+            id='sonList'
+            :columns="columns"
+            rowKey="rowNo"
+            :dataSource="dataSource"
+            :pagination="false"
+            :scroll="{ x: 5500, y: 300 }"
+            :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
+            @change="handleTableChange"
+            >
+            </a-table>
+        </a-form-model>
+    </div>
+  </template>
+  
+  <script>
+  import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+  import JEllipsis from '@/components/jeecg/JEllipsis'
+  import moment from 'moment'
+  export default {
+    name: 'TraRequirementsDeatail', //  Tabs 详情
+    mixins: [JeecgListMixin],
+    components: {
+      JEllipsis,
+      moment,
+    },
+    data() {
+      return {
+        selectedRowKeys:[],
+        selectedRows:[],
+        dataSource:[],
+        columns: [
+                {
+                    title: '#',
+                    dataIndex: '',
+                    key: 'rowIndex',
+                    width: 60,
+                    align: "center",
+                    customRender:function (t, r, index) {
+                        return parseInt(index)+1;
+                    }
+                },
+                {
+                    title: '供应类型',
+                    align:"center",
+                    dataIndex: 'provideType',
+                    ellipsis: true,
+                },
+                {
+                    title: '转出仓库',
+                    align:"center",
+                    dataIndex: 'outWarehouse',
+                    ellipsis: true,
+                },
+                {
+                    title: '转入仓库',
+                    align:"center",
+                    dataIndex: 'inWarehouse;',
+                    ellipsis: true,
+                },
+                {
+                    title: '现存量',
+                    align:"center",
+                    dataIndex: 'handQuantity',
+                    ellipsis: true,
+                },
+                {
+                    title: '数量',
+                    align:"center",
+                    dataIndex: 'quantity',
+                    ellipsis: true,
+
+                },
+                {
+                    title: '建议执行数量',
+                    align:"center",
+                    dataIndex: 'adviseExecuteNum',
+                    ellipsis: true,
+
+                },
+                {
+                    title: '存货编码',
+                    align:"center",
+                    dataIndex: 'inventoryCode',
+                    ellipsis: true,
+
+                },
+                {
+                    title: '存货名称',
+                    align:"center",
+                    dataIndex: 'inventoryName',
+                    ellipsis: true,
+
+                },
+                {
+                    title: '转出批次',
+                    align:"center",
+                    dataIndex: 'batchOut',
+                    ellipsis: true,
+                },
+                {
+                    title: '转入批次',
+                    align:"center",
+                    dataIndex: 'batchIn',
+                    ellipsis: true,
+                },
+                {
+                    title: '型号',
+                    align:"center",
+                    dataIndex: 'model',
+                    ellipsis: true,
+                },
+                {
+                    title: '规格',
+                    align:"center",
+                    dataIndex: 'specs',
+                    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: 'meterWeight',
+                    ellipsis: true,
+                },
+                {
+                    title: '装饰面周长',
+                    align:"center",
+                    dataIndex: 'decorationLength',
+                    ellipsis: true,
+                },
+                {
+                    title: '配置',
+                    align:"center",
+                    dataIndex: 'allocation',
+                    ellipsis: true,
+                },
+                {
+                    title: '宽度',
+                    align:"center",
+                    dataIndex: 'width',
+                    ellipsis: true,
+                },
+                {
+                    title: '高度',
+                    align:"center",
+                    dataIndex: 'height',
+                    ellipsis: true,
+                },
+                 {
+                    title: '计量单位',
+                    align:"center",
+                    dataIndex: 'unit',
+                    ellipsis: true,
+                 },
+                 {
+                    title: '辅助计量单位',
+                    align:"center",
+                    dataIndex: 'auxiliaryUnit',
+                    ellipsis: true,
+                 },
+                 {
+                    title: '辅数量',
+                    align:"center",
+                    dataIndex: 'unQuantity',
+                    ellipsis: true,
+                 },
+                 {
+                    title: '换算率',
+                    align:"center",
+                    dataIndex: 'rate',
+                    ellipsis: true,
+                 },
+          ],
+      }
+    },
+     props: {
+      
+    },
+  
+    created() {},
+    methods: {
+        onSelectChange(selectedRowKeys, selectionRows) {
+            this.selectedRowKeys = selectedRowKeys;
+            this.selectedRows = selectionRows;
+        },
+        handleTableChange(){
+
+        }
+       
+    },
+  
+    computed: {
+      // 合计数据
+      // sumInfoSource() {}
+    }
+  }
+  </script>
+  
+  <style lang="less" scoped>
+  /* @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/.moddle>.ant-card-body{
+        padding-bottom:0px;
+        padding-top: 12px;
+    }
+    /deep/.top>.ant-card-body{
+        padding-bottom:0px;
+        padding-top: 12px;
+    }
+    /deep/.ant-btn{
+        height:28px
+    }
+    /deep/.ant-modal-body{
+        padding-bottom: 0px;
+        padding-top: 0px;
+    }
+    // /deep/.ant-modal-body{
+    //     background: #f0f2f5;
+    // }
+    /deep/.ant-modal-content{
+        background: #f0f2f5;
+    }
+    /deep/.ant-card-body .table-operator {
+        margin-bottom: 0px;
+    }
+    /deep/.three>.ant-card-body{
+        padding-bottom:12px;
+        padding-top: 12px;
+    }
+    /deep/.bottom>.ant-card-body{
+        padding-bottom:0px;
+        padding-top: 12px;
+    }
+
+    /deep/.ant-calendar-picker{
+        min-width: 0px !important;  
+    }
+    /deep/.sonItem {
+        margin-bottom:0px !important
+    }
+    // /deep/#sonList>.ant-spin-nested-loading>.ant-spin-container>.ant-table>.ant-table-content>.ant-table-scroll>.ant-table-body>.ant-table-fixed>.ant-table-tbody > tr > td {
+    //     padding: 0px 8px !important;
+    // }
+  </style>
+  

+ 290 - 0
src/views/production/mrp/modules/demand.vue

@@ -0,0 +1,290 @@
+<template>
+    <div >
+        <a-form-model ref="formRef">
+            <a-table
+            ref="table"
+            size="middle"
+            bordered
+            id='sonList'
+            :columns="columns"
+            rowKey="rowNo"
+            :dataSource="dataSource"
+            :pagination="false"
+            :scroll="{ x: 5500, y: 300 }"
+            :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
+            @change="handleTableChange"
+            >
+            </a-table>
+        </a-form-model>
+    </div>
+  </template>
+  
+  <script>
+  import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+  import JEllipsis from '@/components/jeecg/JEllipsis'
+  import moment from 'moment'
+  export default {
+    name: 'demand', //  Tabs 详情
+    mixins: [JeecgListMixin],
+    components: {
+      JEllipsis,
+      moment,
+    },
+    data() {
+      return {
+        selectedRowKeys:[],
+        selectedRows:[],
+        dataSource:[],
+        columns: [
+                {
+                    title: '#',
+                    dataIndex: '',
+                    key: 'rowIndex',
+                    width: 60,
+                    align: "center",
+                    customRender:function (t, r, index) {
+                        return parseInt(index)+1;
+                    }
+                },
+                {
+                    title: '需求类型',
+                    align:"center",
+                    dataIndex: 'demandType',
+                    ellipsis: true,
+                },
+                {
+                    title: '需求日期',
+                    align:"center",
+                    dataIndex: 'demandTime',
+                    ellipsis: true,
+                },
+                {
+                    title: '批次',
+                    align:"center",
+                    dataIndex: 'batch',
+                    ellipsis: true,
+                },
+                {
+                    title: '仓库',
+                    align:"center",
+                    dataIndex: 'warehouse',
+                    ellipsis: true,
+                },
+                {
+                    title: '存货编码',
+                    align:"center",
+                    dataIndex: 'inventoryCode',
+                    ellipsis: true,
+
+                },
+                {
+                    title: '存货名称',
+                    align:"center",
+                    dataIndex: 'inventoryName',
+                    ellipsis: true,
+
+                },
+                {
+                    title: '规格',
+                    align:"center",
+                    dataIndex: 'specs',
+                    ellipsis: true,
+
+                },
+                {
+                    title: '型号',
+                    align:"center",
+                    dataIndex: 'model',
+                    ellipsis: true,
+
+                },
+                {
+                    title: '主数量',
+                    align:"center",
+                    dataIndex: 'quantity',
+                    ellipsis: true,
+
+                },
+                {
+                    title: '项目编码',
+                    align:"center",
+                    dataIndex: 'projectCode',
+                    ellipsis: true,
+                },
+                {
+                    title: '项目名称',
+                    align:"center",
+                    dataIndex: 'projectName',
+                    ellipsis: true,
+                },
+                {
+                    title: '按辅计量单位',
+                    align:"center",
+                    dataIndex: 'isAuxiliaryUnit',
+                    ellipsis: true,
+                },
+                {
+                    title: '项目分类名称',
+                    align:"center",
+                    dataIndex: 'projectClassName',
+                    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: 'meterWeight',
+                    ellipsis: true,
+                },
+                {
+                    title: '装饰面周长',
+                    align:"center",
+                    dataIndex: 'decorationLength',
+                    ellipsis: true,
+                },
+                {
+                    title: '配置',
+                    align:"center",
+                    dataIndex: 'allocation',
+                    ellipsis: true,
+                },
+                {
+                    title: '宽度',
+                    align:"center",
+                    dataIndex: 'width',
+                    ellipsis: true,
+                },
+                {
+                    title: '高度',
+                    align:"center",
+                    dataIndex: 'height',
+                    ellipsis: true,
+                },
+                {
+                    title: '计量单位',
+                    align:"center",
+                    dataIndex: 'unit',
+                    ellipsis: true,
+                },      
+                {
+                    title: '辅助计量单位',
+                    align:"center",
+                    dataIndex: 'auxiliaryUnit',
+                    ellipsis: true,
+                },           
+                {
+                    title: '辅数量',
+                    align:"center",
+                    dataIndex: 'unQuantity',
+                    ellipsis: true,
+                 },
+          ],
+      }
+    },
+     props: {
+      
+    },
+  
+    created() {},
+    methods: {
+        onSelectChange(selectedRowKeys, selectionRows) {
+            this.selectedRowKeys = selectedRowKeys;
+            this.selectedRows = selectionRows;
+        },
+        handleTableChange(){
+
+        }
+       
+    },
+  
+    computed: {
+      // 合计数据
+      // sumInfoSource() {}
+    }
+  }
+  </script>
+  
+  <style lang="less" scoped>
+  /* @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/.moddle>.ant-card-body{
+        padding-bottom:0px;
+        padding-top: 12px;
+    }
+    /deep/.top>.ant-card-body{
+        padding-bottom:0px;
+        padding-top: 12px;
+    }
+    /deep/.ant-btn{
+        height:28px
+    }
+    /deep/.ant-modal-body{
+        padding-bottom: 0px;
+        padding-top: 0px;
+    }
+    // /deep/.ant-modal-body{
+    //     background: #f0f2f5;
+    // }
+    /deep/.ant-modal-content{
+        background: #f0f2f5;
+    }
+    /deep/.ant-card-body .table-operator {
+        margin-bottom: 0px;
+    }
+    /deep/.three>.ant-card-body{
+        padding-bottom:12px;
+        padding-top: 12px;
+    }
+    /deep/.bottom>.ant-card-body{
+        padding-bottom:0px;
+        padding-top: 12px;
+    }
+
+    /deep/.ant-calendar-picker{
+        min-width: 0px !important;  
+    }
+    /deep/.sonItem {
+        margin-bottom:0px !important
+    }
+    // /deep/#sonList>.ant-spin-nested-loading>.ant-spin-container>.ant-table>.ant-table-content>.ant-table-scroll>.ant-table-body>.ant-table-fixed>.ant-table-tbody > tr > td {
+    //     padding: 0px 8px !important;
+    // }
+  </style>
+  

+ 147 - 0
src/views/production/mrp/modules/operation.vue

@@ -0,0 +1,147 @@
+<template>
+    <a-modal
+      title="MRP运算"
+       width="35%"
+      :visible="visible"
+      :maskClosable="false"
+      switchFullscreen
+      @cancel="handleCancel"
+      @ok='handleOk'
+      >
+      <a-card :bordered="false" class="top" style="margin-bottom:1%;margin-top:1%" :loading = 'loading'>
+        <div class="table-page-search-wrapper">
+            <a-form layout="inline" @keyup.enter.native="searchQuery">
+                <a-row :gutter="24">
+                    <a-col :md="24" :sm="24">
+                        <a-form-item label="业务类型">
+                            <a-select v-model="form.type"  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="24" :sm="24">
+                        <a-form-item label="项目名称">
+                            <a-input-search placeholder="请输入" v-model="form.planOrg" @search="onSearch"></a-input-search>
+                        </a-form-item>
+                    </a-col>
+                    <a-col :md="24" :sm="24">
+                        <a-form-item label="工单号">
+                            <a-input-search placeholder="请输入" v-model="form.planOrg" @search="onSearch"></a-input-search>
+                        </a-form-item>
+                    </a-col>
+                    <a-col :md="24" :sm="24">
+                        <a-form-item label="存货分类">
+                            <a-input-search placeholder="请输入" v-model="form.planOrg" @search="onSearch"></a-input-search>
+                        </a-form-item>
+                    </a-col>
+   
+                </a-row>
+            </a-form>
+        </div>
+     </a-card>
+    </a-modal>
+  </template>
+  <script>
+  
+      import { FormTypes } from '@/utils/JEditableTableUtil'
+      import { JEditableTableModelMixin } from '@/mixins/JEditableTableModelMixin'
+      import moment from "moment"
+      import { httpAction ,getAction,postAction,putAction} from '@/api/manage'
+      export default {
+        name: 'operation',
+        mixins: [JEditableTableModelMixin],
+        components: {
+        },
+        data() {
+          return {
+            visible:false,
+            form:{},
+            form1:{},
+            loading:false,
+            // ipagination:{},
+            selectedRowKeys:[],
+            selectedRows:[],
+          }
+        },
+        created() {
+          
+        },
+        methods: {
+            handleCancel(){
+                this.visible=false
+                this.defaultMethod='add'
+                this.dataSource = [] 
+                this.form={}
+                this.form1={}
+            },
+            handleOk(){
+            },
+            onSearch(){
+               
+            },
+
+        }
+      }
+  </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/.moddle>.ant-card-body{
+        padding-bottom:0px;
+        padding-top: 12px;
+    }
+    /deep/.top>.ant-card-body{
+        padding-bottom:0px;
+        padding-top: 12px;
+    }
+    /deep/.ant-btn{
+        height:28px
+    }
+    /deep/.ant-modal-body{
+        padding-bottom: 0px;
+        padding-top: 0px;
+    }
+    // /deep/.ant-modal-body{
+    //     background: #f0f2f5;
+    // }
+    /deep/.ant-modal-content{
+        background: #f0f2f5;
+    }
+    /deep/.ant-card-body .table-operator {
+        margin-bottom: 0px;
+    }
+    /deep/.three>.ant-card-body{
+        padding-bottom:12px;
+        padding-top: 12px;
+    }
+    /deep/.bottom>.ant-card-body{
+        padding-bottom:0px;
+        padding-top: 12px;
+    }
+
+    /deep/.ant-calendar-picker{
+        min-width: 0px !important;  
+    }
+    /deep/.sonItem {
+        margin-bottom:0px !important
+    }
+    /deep/#sonList>.ant-spin-nested-loading>.ant-spin-container>.ant-table>.ant-table-content>.ant-table-scroll>.ant-table-body>.ant-table-fixed>.ant-table-tbody > tr > td {
+        padding: 0px 8px !important;
+    }
+  </style>

+ 272 - 0
src/views/production/mrp/modules/supply.vue

@@ -0,0 +1,272 @@
+<template>
+    <div >
+        <a-form-model ref="formRef">
+            <a-table
+            ref="table"
+            size="middle"
+            bordered
+            id='sonList'
+            :columns="columns"
+            rowKey="rowNo"
+            :dataSource="dataSource"
+            :pagination="false"
+            :scroll="{ x: 5500, y: 300 }"
+            :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
+            @change="handleTableChange"
+            >
+            </a-table>
+        </a-form-model>
+    </div>
+  </template>
+  
+  <script>
+  import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+  import JEllipsis from '@/components/jeecg/JEllipsis'
+  import moment from 'moment'
+  export default {
+    name: 'supply', //  Tabs 详情
+    mixins: [JeecgListMixin],
+    components: {
+      JEllipsis,
+      moment,
+    },
+    data() {
+      return {
+        selectedRowKeys:[],
+        selectedRows:[],
+        dataSource:[],
+        columns: [
+                {
+                    title: '#',
+                    dataIndex: '',
+                    key: 'rowIndex',
+                    width: 60,
+                    align: "center",
+                    customRender:function (t, r, index) {
+                        return parseInt(index)+1;
+                    }
+                },
+                {
+                    title: '供应类型',
+                    align:"center",
+                    dataIndex: 'provideType',
+                    ellipsis: true,
+                },
+                {
+                    title: '项目编码',
+                    align:"center",
+                    dataIndex: 'projectCode',
+                    ellipsis: true,
+                },
+                {
+                    title: '项目名称',
+                    align:"center",
+                    dataIndex: 'projectName',
+                    ellipsis: true,
+                },
+                {
+                    title: '项目分类编码',
+                    align:"center",
+                    dataIndex: 'projectClassCode',
+                    ellipsis: true,
+                },
+                {
+                    title: '项目分类名称',
+                    align:"center",
+                    dataIndex: 'projectClassName',
+                    ellipsis: true,
+
+                },
+                {
+                    title: '批次',
+                    align:"center",
+                    dataIndex: 'batch',
+                    ellipsis: true,
+
+                },
+                {
+                    title: '存货编码',
+                    align:"center",
+                    dataIndex: 'inventoryCode',
+                    ellipsis: true,
+
+                },
+                {
+                    title: '存货名称',
+                    align:"center",
+                    dataIndex: 'inventoryName',
+                    ellipsis: true,
+
+                },
+                {
+                    title: '规格',
+                    align:"center",
+                    dataIndex: 'specs',
+                    ellipsis: true,
+
+                },
+                {
+                    title: '型号',
+                    align:"center",
+                    dataIndex: 'model',
+                    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: 'meterWeight',
+                    ellipsis: true,
+                },
+                {
+                    title: '装饰面周长',
+                    align:"center",
+                    dataIndex: 'decorationLength',
+                    ellipsis: true,
+                },
+                {
+                    title: '配置',
+                    align:"center",
+                    dataIndex: 'allocation',
+                    ellipsis: true,
+                },
+                {
+                    title: '宽度',
+                    align:"center",
+                    dataIndex: 'width',
+                    ellipsis: true,
+                },
+                {
+                    title: '高度',
+                    align:"center",
+                    dataIndex: 'height',
+                    ellipsis: true,
+                },
+                {
+                    title: '计量单位',
+                    align:"center",
+                    dataIndex: 'unit',
+                    ellipsis: true,
+                },                
+                {
+                    title: '仓库',
+                    align:"center",
+                    dataIndex: 'warehouse',
+                    ellipsis: true,
+                 },
+                 {
+                    title: '主数量',
+                    align:"center",
+                    dataIndex: 'quantity',
+                    ellipsis: true,
+                 },
+          ],
+      }
+    },
+     props: {
+      
+    },
+  
+    created() {},
+    methods: {
+        onSelectChange(selectedRowKeys, selectionRows) {
+            this.selectedRowKeys = selectedRowKeys;
+            this.selectedRows = selectionRows;
+        },
+        handleTableChange(){
+
+        }
+       
+    },
+  
+    computed: {
+      // 合计数据
+      // sumInfoSource() {}
+    }
+  }
+  </script>
+  
+  <style lang="less" scoped>
+  /* @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/.moddle>.ant-card-body{
+        padding-bottom:0px;
+        padding-top: 12px;
+    }
+    /deep/.top>.ant-card-body{
+        padding-bottom:0px;
+        padding-top: 12px;
+    }
+    /deep/.ant-btn{
+        height:28px
+    }
+    /deep/.ant-modal-body{
+        padding-bottom: 0px;
+        padding-top: 0px;
+    }
+    // /deep/.ant-modal-body{
+    //     background: #f0f2f5;
+    // }
+    /deep/.ant-modal-content{
+        background: #f0f2f5;
+    }
+    /deep/.ant-card-body .table-operator {
+        margin-bottom: 0px;
+    }
+    /deep/.three>.ant-card-body{
+        padding-bottom:12px;
+        padding-top: 12px;
+    }
+    /deep/.bottom>.ant-card-body{
+        padding-bottom:0px;
+        padding-top: 12px;
+    }
+
+    /deep/.ant-calendar-picker{
+        min-width: 0px !important;  
+    }
+    /deep/.sonItem {
+        margin-bottom:0px !important
+    }
+    // /deep/#sonList>.ant-spin-nested-loading>.ant-spin-container>.ant-table>.ant-table-content>.ant-table-scroll>.ant-table-body>.ant-table-fixed>.ant-table-tbody > tr > td {
+    //     padding: 0px 8px !important;
+    // }
+  </style>
+  

+ 338 - 0
src/views/production/mrp/modules/supplyDemandBalance.vue

@@ -0,0 +1,338 @@
+<template>
+    <div >
+        <a-form-model ref="formRef">
+            <a-table
+            ref="table"
+            size="middle"
+            bordered
+            id='sonList'
+            :columns="columns"
+            rowKey="rowNo"
+            :dataSource="dataSource"
+            :pagination="false"
+            :scroll="{ x: 5500, y: 300 }"
+            :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
+            @change="handleTableChange"
+            >
+            </a-table>
+        </a-form-model>
+    </div>
+  </template>
+  
+  <script>
+  import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+  import JEllipsis from '@/components/jeecg/JEllipsis'
+  import moment from 'moment'
+  export default {
+    name: 'supplyDemandBalance', //  Tabs 详情
+    mixins: [JeecgListMixin],
+    components: {
+      JEllipsis,
+      moment,
+    },
+    data() {
+      return {
+        selectedRowKeys:[],
+        selectedRows:[],
+        dataSource:[],
+        columns: [
+                {
+                    title: '#',
+                    dataIndex: '',
+                    key: 'rowIndex',
+                    width: 60,
+                    align: "center",
+                    customRender:function (t, r, index) {
+                        return parseInt(index)+1;
+                    }
+                },
+                {
+                    title: '需求类型',
+                    align:"center",
+                    dataIndex: 'demandType',
+                    ellipsis: true,
+                },
+                {
+                    title: '需求日期',
+                    align:"center",
+                    dataIndex: 'demandTime',
+                    ellipsis: true,
+                },
+                {
+                    title: '供应类型',
+                    align:"center",
+                    dataIndex: 'provideType',
+                    ellipsis: true,
+                },
+                {
+                    title: '存货编码',
+                    align:"center",
+                    dataIndex: 'inventoryCode',
+                    ellipsis: true,
+                },
+                {
+                    title: '存货名称',
+                    align:"center",
+                    dataIndex: 'inventoryName',
+                    ellipsis: true,
+
+                },
+                {
+                    title: '建议执行',
+                    align:"center",
+                    dataIndex: 'adviseExecute',
+                    ellipsis: true,
+
+                },
+                {
+                    title: '建议执行数量',
+                    align:"center",
+                    dataIndex: 'adviseExecuteNum',
+                    ellipsis: true,
+
+                },
+                {
+                    title: '仓库',
+                    align:"center",
+                    dataIndex: 'warehouse',
+                    ellipsis: true,
+
+                },
+                {
+                    title: '主数量',
+                    align:"center",
+                    dataIndex: 'quantity',
+                    ellipsis: true,
+
+                },
+                {
+                    title: '已匹配主数量',
+                    align:"center",
+                    dataIndex: 'matchQuantity',
+                    ellipsis: true,
+                },
+                {
+                    title: '剩余需求主数量',
+                    align:"center",
+                    dataIndex: 'surplusQuantity',
+                    ellipsis: true,
+                },
+                {
+                    title: '辅数量',
+                    align:"center",
+                    dataIndex: 'unQuantity',
+                    ellipsis: true,
+                },
+                {
+                    title: '已匹配辅数量',
+                    align:"center",
+                    dataIndex: 'matchUnQuantity',
+                    ellipsis: true,
+                },
+                {   
+                    title: '剩余需求辅数量',
+                    align:"center",
+                    dataIndex: 'surplusUnQuantity',
+                    ellipsis: true,
+                },
+                {
+                    title: '项目编码',
+                    align:"center",
+                    dataIndex: 'projectCode',
+                    ellipsis: true,
+                },
+                {
+                    title: '项目名称',
+                    align:"center",
+                    dataIndex: 'projectName',
+                    ellipsis: true,
+                },
+                {
+                    title: '按辅计量单位',
+                    align:"center",
+                    dataIndex: 'isAuxiliaryUnit',
+                    ellipsis: true,
+                },
+                {
+                    title: '项目分类名称',
+                    align:"center",
+                    dataIndex: 'projectClassName',
+                    ellipsis: true,
+                },
+                {
+                    title: '批次',
+                    align:"center",
+                    dataIndex: 'batch',
+                    ellipsis: true,
+                },
+                {
+                    title: '规格',
+                    align:"center",
+                    dataIndex: 'specs',
+                    ellipsis: true,
+                },                
+                {
+                    title: '型号',
+                    align:"center",
+                    dataIndex: 'model',
+                    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: 'meterWeight',
+                    ellipsis: true,
+                 },
+                 {
+                    title: '装饰面周长',
+                    align:"center",
+                    dataIndex: 'decorationLength',
+                    ellipsis: true,
+                 },
+                 {
+                    title: '配置',
+                    align:"center",
+                    dataIndex: 'allocation',
+                    ellipsis: true,
+                 },
+                 {
+                    title: '宽度',
+                    align:"center",
+                    dataIndex: 'width',
+                    ellipsis: true,
+                 },
+                 {
+                    title: '高度',
+                    align:"center",
+                    dataIndex: 'height',
+                    ellipsis: true,
+                 },
+                 {
+                    title: '计量单位',
+                    align:"center",
+                    dataIndex: 'unit',
+                    ellipsis: true,
+                 },
+                 {
+                    title: '辅助计量单位',
+                    align:"center",
+                    dataIndex: 'auxiliaryUnit',
+                    ellipsis: true,
+                 },
+                 {
+                    title: '转库和采购关联PK',
+                    align:"center",
+                    dataIndex: 'correlationPk',
+                    ellipsis: true,
+                 },
+          ],
+      }
+    },
+     props: {
+      
+    },
+  
+    created() {},
+    methods: {
+        onSelectChange(selectedRowKeys, selectionRows) {
+            this.selectedRowKeys = selectedRowKeys;
+            this.selectedRows = selectionRows;
+        },
+        handleTableChange(){
+
+        }
+       
+    },
+  
+    computed: {
+      // 合计数据
+      // sumInfoSource() {}
+    }
+  }
+  </script>
+  
+  <style lang="less" scoped>
+  /* @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/.moddle>.ant-card-body{
+        padding-bottom:0px;
+        padding-top: 12px;
+    }
+    /deep/.top>.ant-card-body{
+        padding-bottom:0px;
+        padding-top: 12px;
+    }
+    /deep/.ant-btn{
+        height:28px
+    }
+    /deep/.ant-modal-body{
+        padding-bottom: 0px;
+        padding-top: 0px;
+    }
+    // /deep/.ant-modal-body{
+    //     background: #f0f2f5;
+    // }
+    /deep/.ant-modal-content{
+        background: #f0f2f5;
+    }
+    /deep/.ant-card-body .table-operator {
+        margin-bottom: 0px;
+    }
+    /deep/.three>.ant-card-body{
+        padding-bottom:12px;
+        padding-top: 12px;
+    }
+    /deep/.bottom>.ant-card-body{
+        padding-bottom:0px;
+        padding-top: 12px;
+    }
+
+    /deep/.ant-calendar-picker{
+        min-width: 0px !important;  
+    }
+    /deep/.sonItem {
+        margin-bottom:0px !important
+    }
+    // /deep/#sonList>.ant-spin-nested-loading>.ant-spin-container>.ant-table>.ant-table-content>.ant-table-scroll>.ant-table-body>.ant-table-fixed>.ant-table-tbody > tr > td {
+    //     padding: 0px 8px !important;
+    // }
+  </style>
+  

+ 131 - 19
src/views/production/mrp/mrp.vue

@@ -23,14 +23,8 @@
                     </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 label="项目">
+                      <a-input-search placeholder="请输入" v-model="queryParam.project" @search="onSearch"></a-input-search>
                     </a-form-item>
                   </a-col>
                 <template v-if="toggleSearchStatus">
@@ -45,25 +39,33 @@
                     </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 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>
                   <a-col :md="4" :sm="24">
-                    <a-form-item label="备注">
-                      <a-input placeholder="请输入" v-model="queryParam.remarks"></a-input>
+                    <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-select v-model="queryParam.type"  style='width:100%' >
-                            <a-select-option value='1'> 1</a-select-option>
+                            <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="工单号">
-                      <a-input placeholder="请输入" v-model="queryParam.workNo"></a-input>
+                    <a-form-item label="备注">
+                      <a-input placeholder="请输入" v-model="queryParam.remarks"></a-input>
                     </a-form-item>
                   </a-col>
                   <a-col :md="4" :sm="24">
@@ -102,7 +104,12 @@
         <a-card class="middle" style="margin-bottom:1%">
           <!-- 操作按钮区域 -->
           <div class="table-operator">
-            <a-button type="danger" size="small" @click='addList'>新增</a-button>
+            <a-button type="danger" size="small" @click='operationList'>运算</a-button>
+            <a-button  size="small" @click='editList'>修改</a-button>
+            <a-button  size="small" @click='detailList'>详情</a-button>
+            <a-button  size="small" @click='DelectList'>删除</a-button>
+            <a-button  size="small" @click='examine'>审批</a-button>
+            <a-button  size="small" @click='abandonExamine'>弃审</a-button>
           </div>
       
           <!-- table区域-begin -->
@@ -123,6 +130,9 @@
       
             </a-table>
           </div>
+          <operation ref="operation"></operation>
+          <MRPEdit ref="MRPEdit" @ok="searchQuery"></MRPEdit>
+          <MRPDetail ref="MRPDetail" @ok="searchQuery"></MRPDetail>
           <!-- table区域-end -->
       
         </a-card>
@@ -136,12 +146,18 @@
         import { httpAction ,getAction,postAction,putAction,deleteAction,downFile} from '@/api/manage'
         import {queryDepartTreeList} from '@/api/api'
         import alertModal from '../../../plugins/modal'
+        import operation from './modules/operation'
+        import MRPEdit from './modules/MRPEdit'
+        import MRPDetail from './modules/MRPDetail'
         import { Message } from "element-ui";
         //---------workflow  by fhf end -------------
         export default {
           name: "materialProcurementList",
           mixins: [JeecgListMixin],
           components: {
+            operation,
+            MRPEdit,
+            MRPDetail
           },
           data () {
             return {
@@ -305,11 +321,14 @@
                             }
                         }else{
                           this.$message.error(res.message);
+                          
                         }
                     })
             },
             //查询
             searchQuery(){
+              this.selectedRowKeys=[]
+              this.selectedRows=[]
               this.queryParam.pageNo=1
               this.getTableList()
             },
@@ -328,8 +347,99 @@
                 this.getTableList()
             },
             //新增
-            addList(){
-               
+            operationList(){
+               this.$refs.operation.visible = true
+            },
+            editList(){
+              if(this.selectedRowKeys.length!==1){
+                this.$message.warning('请勾选一条数据!')
+              }else{
+                this.$refs.MRPEdit.visible = true
+                this.$refs.MRPEdit.getMainData(this.selectedRowKeys[0])
+              }
+            },
+            detailList(){
+              if(this.selectedRowKeys.length!==1){
+                this.$message.warning('请勾选一条数据!')
+              }else{
+                this.$refs.MRPDetail.visible = true
+                this.$refs.MRPDetail.getMainData(this.selectedRowKeys[0])
+              }
+            },
+            DelectList(){
+              if(this.selectedRowKeys.length==0){
+                this.$message.warning('请勾选数据!')
+              }else if(this.selectedRowKeys.length==1){
+                this.$confirm({
+                  title: '确认删除',
+                  content: '是否删除选中数据?',
+                  onOk:  ()=>{
+                      alertModal.loading("执行中,请稍后!")
+                      deleteAction('/MRPOperationList/madeOperationList/delete', {id: this.selectedRowKeys[0]}).then((res) => {
+                          alertModal.closeLoading();
+                          if (res.success) {
+                            this.$message.success('删除成功!');
+                            this.getTableList()
+                          } else {
+                            this.$message.error(res.message);
+                          }
+                     });
+                  }
+                 })
+              }else{
+                this.$confirm({
+                  title: '确认删除',
+                  content: '是否删除选中数据?',
+                  onOk:  ()=> {
+                    var ids =  this.selectedRowKeys.toString()
+                    alertModal.loading("执行中,请稍后!")
+                    deleteAction('/MRPOperationList/madeOperationList/deleteBatch', {ids: ids}).then((res) => {
+                      alertModal.closeLoading();
+                      if (res.success) {
+                        this.$message.success('删除成功!');
+                        this.getTableList()
+                      } else {
+                        this.$message.error(res.message);
+                      }
+                    });
+                  }
+                })
+              }
+            },
+            examine(){
+              if(this.selectedRowKeys.length==0){
+                this.$message.warning('请选择数据!')
+              }else{
+                this.$confirm({
+                  title: '确认弃审',
+                  content: '是否弃审选中数据?',
+                  onOk:  ()=> {
+                    var ids =  this.selectedRowKeys.toString()
+                    alertModal.loading("执行中,请稍后!")
+                    getAction('/materialRequisition/madeMaterialRequisition/unReviewerByIds',{ids:ids}).then(res=>{
+                        alertModal.closeLoading();
+                        if(res.success){
+                          var arr = res.message.split(";");
+                          var str = arr.join(' <br/> ');
+                          this.getTableList()
+                          Message({
+                            dangerouslyUseHTMLString: true,
+                            message: str,
+                            type: 'info'
+                          });
+                    }else{
+                      var arr = res.message.split(";");
+                      var str = arr.join(' <br/> ');
+                      Message({
+                        dangerouslyUseHTMLString: true,
+                        message: str,
+                        type: 'error'
+                      });
+                    }
+                })
+              }
+            })
+          }
             },
         
             //勾选
@@ -348,7 +458,9 @@
               return {
                 on: {
                   dblclick: () => {
-                   
+                    this.$refs.MRPDetail.visible=true
+                    //获取主表信息
+                    this.$refs.MRPDetail.getMainData(record.id)
                   },
                 }
               }