Browse Source

生产总订单-材料入库

jingbb 11 months ago
parent
commit
a56c487a32

+ 3 - 4
src/views/production/productionTotalOrder/modules/KSOutbound.vue

@@ -356,10 +356,7 @@
             this.selectedRows = selectionRows;
             this.selectedRows = selectionRows;
         },
         },
         handleOk(){
         handleOk(){
-            // this.$refs.formRef.validate(success => {
-            //     if (success) {
-            //     }
-            // })
+            
             if(this.selectedRows.length==0){
             if(this.selectedRows.length==0){
                 this.$message.warning('请勾选数据')
                 this.$message.warning('请勾选数据')
             }else{
             }else{
@@ -378,6 +375,8 @@
         },
         },
         handleCancel(){
         handleCancel(){
             this.visible = false
             this.visible = false
+            this.selectedRowKeys = []
+            this.selectedRows = []
         }
         }
     },
     },
   
   

+ 2 - 0
src/views/production/productionTotalOrder/modules/KSWarehousing.vue

@@ -334,6 +334,8 @@
         },
         },
         handleCancel(){
         handleCancel(){
             this.visible = false
             this.visible = false
+            this.selectedRowKeys = []
+            this.selectedRows = []
         },
         },
         onSelectChange(selectedRowKeys, selectionRows) {
         onSelectChange(selectedRowKeys, selectionRows) {
             this.selectedRowKeys = selectedRowKeys;
             this.selectedRowKeys = selectedRowKeys;

+ 449 - 0
src/views/production/productionTotalOrder/modules/materiaWaring.vue

@@ -0,0 +1,449 @@
+<template>
+    <a-modal
+      title="材料入库"
+       width="95%"
+      :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 >
+            <a-form-model ref="formRef" :model="form">
+                <a-table
+                    ref="table"
+                    size="middle"
+                    bordered
+                    id='KS'
+                    :columns="columns"
+                    rowKey="rowNo"
+                    :dataSource="form.dataSource"
+                    :pagination="false"
+                    :scroll="{ x: 5500, y: 300 }"
+                    :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
+                >
+                    <span slot="nowExecutionQuantityTitle" class="form-table-heard">
+                       本次执行主数量
+                    </span>
+                    <template slot="nowExecutionQuan" slot-scope="text, record, index">
+                        <a-form-model-item :prop="'dataSource.'+index+'.nowExecutionQuan'" class='sonItem' :rules="rules.nowExecutionQuan">
+                            <a-input placeholder="请输入" v-model="record.nowExecutionQuan" ></a-input>
+                        </a-form-model-item>
+                    </template> 
+                    <span slot="nowAuxiliaryQuanTitle" class="form-table-heard">
+                       本次执行辅数量
+                    </span>
+                    <template slot="nowAuxiliaryQuan" slot-scope="text, record, index">
+                        <a-form-model-item :prop="'dataSource.'+index+'.nowAuxiliaryQuan'" class='sonItem' :rules="rules.nowAuxiliaryQuan">
+                            <a-input placeholder="请输入" v-model="record.nowAuxiliaryQuan" ></a-input>
+                        </a-form-model-item>
+                    </template> 
+                </a-table>
+            </a-form-model>
+        </div>
+    </a-card>
+    </a-modal>
+  </template>
+  
+  <script>
+  import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+  import JEllipsis from '@/components/jeecg/JEllipsis'
+  import { httpAction ,getAction,postAction,putAction} from '@/api/manage'
+  import moment from 'moment'
+  export default {
+    name: 'materiaWaring', 
+    mixins: [JeecgListMixin],
+    components: {
+      JEllipsis,
+      moment,
+    },
+    data() {
+      return {
+        form:{
+            dataSource:[],
+        },
+        loading:false,
+        columns: [
+                {
+                    title: '#',
+                    dataIndex: '',
+                    key: 'rowIndex',
+                    width: 60,
+                    align: "center",
+                    customRender:function (t, r, index) {
+                        return parseInt(index)+1;
+                    }
+                },
+                {
+                    // title: '本次执行主数量',
+                    align:"center",
+                    dataIndex: 'nowExecutionQuan',
+                    ellipsis: true,
+                    scopedSlots: { customRender: 'nowExecutionQuan' } ,
+                    slots:{title:'nowExecutionQuantityTitle'},
+                },
+                {
+                    // title: '本次执行辅数量',
+                    align:"center",
+                    dataIndex: 'nowAuxiliaryQuan',
+                    ellipsis: true,
+                    scopedSlots: { customRender: 'nowAuxiliaryQuan' } ,
+                    slots:{title:'nowAuxiliaryQuanTitle'},
+                },
+                {
+                    title: '辅数量',
+                    align:"center",
+                    dataIndex: 'unQuantity',
+                    ellipsis: true,
+                    scopedSlots: { customRender: 'unQuantity' } ,
+                    slots:{title:'unQuantityTitle'},
+                },
+                {
+                    title: '项目编码',
+                    align:"center",
+                    dataIndex: 'projectCode',
+                    ellipsis: true,
+                },
+                {
+                    title: '项目名称',
+                    align:"center",
+                    dataIndex: 'projectName',
+                    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: 'attribute',
+                    ellipsis: true,
+                },
+                {
+                    title: '计量单位',
+                    align:"center",
+                    dataIndex: 'unit',
+                    ellipsis: true,
+                },
+                {
+                    title: '辅计量单位',
+                    align:"center",
+                    dataIndex: 'auxiliaryUnit',
+                    ellipsis: true,
+                },
+                {
+                    title: '主数量',
+                    align:"center",
+                    dataIndex: 'quantity',
+                    ellipsis: true,
+
+                },
+                {
+                    title: '辅数量',
+                    align:"center",
+                    dataIndex: 'unQuantity',
+                    ellipsis: true,
+                },
+                {
+                    title: '已执行辅数量',
+                    align:"center",
+                    dataIndex: 'unQuantityExecute',
+                    ellipsis: true,
+                },
+                {
+                    title: '已执行主数量',
+                    align:"center",
+                    dataIndex: 'quantityExecute',
+                    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: 'fixedNum',
+                    ellipsis: true,
+                },
+                {   
+                    title: '定尺',
+                    align:"center",
+                    dataIndex: 'fixedLength',
+                    ellipsis: true,
+                },
+                {
+                    title: '宽/高',
+                    align:"center",
+                    dataIndex: 'widthHeight',
+                    ellipsis: true,
+                },
+                {   
+                    title: '片数',
+                    align:"center",
+                    dataIndex: 'pieces',
+                    ellipsis: true,
+                },
+                {
+                    title: '备注',
+                    align:"center",
+                    dataIndex: 'remarks',
+                    ellipsis: true,
+                },
+                {
+                    title: '米重',
+                    align:"center",
+                    dataIndex: 'meterWeight',
+                    ellipsis: true,
+                },
+                {
+                    title: '装饰面周长',
+                    align:"center",
+                    dataIndex: 'decorationLength',
+                    ellipsis: true,
+                },
+                {
+                    title: '窗号',
+                    align:"center",
+                    dataIndex: 'windowNo',
+                    ellipsis: true,
+                },
+                {
+                    title: '专用区',
+                    align:"center",
+                    dataIndex: 'exclusiveZone',
+                    ellipsis: true,
+                },
+                {
+                    title: '宽度/长度',
+                    align:"center",
+                    dataIndex: 'widthLength',
+                    ellipsis: true,
+                },
+                {
+                    title: '高度',
+                    align:"center",
+                    dataIndex: 'height',
+                    ellipsis: true,
+                },
+                {
+                    title: '楼层楼号',
+                    align:"center",
+                    dataIndex: 'buildingNumber',
+                    ellipsis: true,
+                },
+                {
+                    title: '樘数(数量)',
+                    align:"center",
+                    dataIndex: 'framesTang',
+                    ellipsis: true,
+                },
+                
+                {
+                    title: '框统计',
+                    align:"center",
+                    dataIndex: 'framesCount',
+                    ellipsis: true,
+                 },
+                {
+                    title: '扇统计',
+                    align:"center",
+                    dataIndex: 'leafCount',
+                    ellipsis: true,
+                },
+                {
+                    title: '半成品分类',
+                    align:"center",
+                    dataIndex: 'semiClass',
+                    ellipsis: true,
+                },
+                {
+                    title: '面积',
+                    align:"center",
+                    dataIndex: 'area',
+                    ellipsis: true,
+                },
+                {
+                    title: '切割长度',
+                    align:"center",
+                    dataIndex: 'cuttingLength',
+                    ellipsis: true,
+                },
+                {
+                    title: '切割角度左下',
+                    align:"center",
+                    dataIndex: 'cuttingLeftDown',
+                    ellipsis: true,
+                },
+                {
+                    title: '切割角度右上',
+                    align:"center",
+                    dataIndex: 'cuttingRightTop',
+                    ellipsis: true,
+                },
+                
+                {
+                    title: '系列',
+                    align:"center",
+                    dataIndex: 'series',
+                    ellipsis: true,
+                },
+                {
+                    title: '玻璃编号',
+                    align:"center",
+                    dataIndex: 'glassNumber',
+                    ellipsis: true,
+                },
+          ],
+          visible:false,
+          selectedRowKeys:[],
+          selectedRows:[]
+      }
+    },
+     props: {
+      
+    },
+  
+    created() {},
+    methods: {
+        handleOk(){
+            var idExistence = 'yes'
+            this.selectedRows.map(item=>{
+                if(!item.id||item.id==''){
+                    idExistence = 'no'
+                }
+            })
+            if(this.selectedRows.length==0){
+                this.$message.warning('请勾选数据')
+            }else if(idExistence=='no'){
+                this.$message.warning('请先保存材料明细')
+            }else{
+                this.loading =true
+                postAction('/productionOrder/madeProductionOrders/syNcMadeProductionOrdersMaterialList', {madeProductionOrdersMaterialList:this.selectedRows}).then((res) => {
+                    if (res.success) {
+                        this.$emit('ok')
+                        this.handleCancel()
+                    } else {
+                        this.$message.error(res.message);
+                    }
+                }).finally(() => {
+                    this.loading = false
+                })
+            }
+        },
+        handleCancel(){
+            this.visible = false
+            this.selectedRowKeys = []
+            this.selectedRows = []
+        },
+        onSelectChange(selectedRowKeys, selectionRows) {
+            this.selectedRowKeys = selectedRowKeys;
+            this.selectedRows = selectionRows;
+        },
+    },
+  
+    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/#KS>.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: 8px 8px !important;
+    }
+    .form-table-heard:before {
+    content:'*';
+    color:red
+   }
+   /deep/.ant-form-explain, .ant-form-split {
+        display: none;
+   }
+  </style>
+  

+ 4 - 0
src/views/production/productionTotalOrder/modules/productWarehousModel.vue

@@ -55,6 +55,8 @@
         form:{
         form:{
             dataSource:[],
             dataSource:[],
         },
         },
+        selectedRowKeys:[],
+        selectedRows:[],
         loading:false,
         loading:false,
         columns: [
         columns: [
                 {
                 {
@@ -359,6 +361,8 @@
         },
         },
         handleCancel(){
         handleCancel(){
             this.visible = false
             this.visible = false
+            this.selectedRowKeys = []
+            this.selectedRows = []
         }
         }
     },
     },
   
   

+ 24 - 5
src/views/production/productionTotalOrder/modules/productionTotalOrderAdd.vue

@@ -92,9 +92,12 @@
        <div class="table-operator">
        <div class="table-operator">
             <a-button type="danger" size="small"  @click="addList" >增行</a-button>
             <a-button type="danger" size="small"  @click="addList" >增行</a-button>
             <a-button size="small" @click="delectRow" >删行</a-button>
             <a-button size="small" @click="delectRow" >删行</a-button>
-            <a-button size="small" @click="productWarehous" >成品入库</a-button>
-            <a-button size="small" @click="KSWarehousing" >框/扇入库</a-button>
-            <a-button size="small" @click="KSOutbound" >框/扇出库</a-button>
+            <a-button size="small" @click="productWarehous" :disabled="activeKey!=='finishProduct'">成品入库</a-button>
+            <a-button size="small" @click="materiaWarehous" :disabled="activeKey!=='material'">材料入库</a-button>
+            <a-button size="small" @click="KSWarehousing" :disabled="activeKey!=='finishProduct'">框/扇入库</a-button>
+            <a-button size="small" @click="KSOutbound" :disabled="activeKey!=='finishProduct'">框/扇出库</a-button>
+            <a-button size="small" @click="sendOrReceive('in')" :disabled="activeKey!=='SurplusMaterials'">杂发</a-button>
+            <a-button size="small" @click="sendOrReceive('out')" :disabled="activeKey!=='SurplusMaterials'">杂收</a-button>
             <!-- <a-dropdown>
             <!-- <a-dropdown>
                 <a-button size="small"> 委外 <a-icon type="down" /> </a-button>
                 <a-button size="small"> 委外 <a-icon type="down" /> </a-button>
                 <a-menu slot="overlay" >
                 <a-menu slot="overlay" >
@@ -120,7 +123,7 @@
                 <TemporaryStorage ref='TemporaryStorage'></TemporaryStorage>
                 <TemporaryStorage ref='TemporaryStorage'></TemporaryStorage>
             </a-tab-pane>
             </a-tab-pane>
             <a-tab-pane tab="余料管理" :key="refKeys[3]" :forceRender="true">
             <a-tab-pane tab="余料管理" :key="refKeys[3]" :forceRender="true">
-                <SurplusMaterials ref='SurplusMaterials' ></SurplusMaterials>
+                <SurplusMaterials ref='SurplusMaterials' @ok="handleCancel"></SurplusMaterials>
             </a-tab-pane>
             </a-tab-pane>
         </a-tabs>
         </a-tabs>
        
        
@@ -128,6 +131,7 @@
     <productWarehousModel ref="productWarehousModel" @ok="RefreshList('product')"></productWarehousModel>
     <productWarehousModel ref="productWarehousModel" @ok="RefreshList('product')"></productWarehousModel>
     <KSOutbound ref="KSOutbound" @ok="RefreshList('out')"></KSOutbound>
     <KSOutbound ref="KSOutbound" @ok="RefreshList('out')"></KSOutbound>
     <KSWarehousing ref="KSWarehousing" @ok="RefreshList('ware')"></KSWarehousing>
     <KSWarehousing ref="KSWarehousing" @ok="RefreshList('ware')"></KSWarehousing>
+    <materiaWaring ref="materiaWaring" @ok="RefreshMateriaList()"></materiaWaring>
     <organizationPopup ref="organizationPopup" @okData="okDataOrganization"></organizationPopup>
     <organizationPopup ref="organizationPopup" @okData="okDataOrganization"></organizationPopup>
     <OperatorsPopup ref="OperatorsPopup" @okData="okDataOperators"></OperatorsPopup>
     <OperatorsPopup ref="OperatorsPopup" @okData="okDataOperators"></OperatorsPopup>
     <deparmentPopup ref="deparmentPopup" @okData="okDataDeparment"></deparmentPopup>
     <deparmentPopup ref="deparmentPopup" @okData="okDataDeparment"></deparmentPopup>
@@ -145,6 +149,7 @@
       import productWarehousModel from './productWarehousModel'
       import productWarehousModel from './productWarehousModel'
       import KSOutbound from './KSOutbound'
       import KSOutbound from './KSOutbound'
       import KSWarehousing from './KSWarehousing'
       import KSWarehousing from './KSWarehousing'
+      import materiaWaring from './materiaWaring'
       import moment from "moment"
       import moment from "moment"
       import { httpAction ,getAction,postAction,putAction} from '@/api/manage'
       import { httpAction ,getAction,postAction,putAction} from '@/api/manage'
       import organizationPopup from '../../Popup/organizationPopup.vue'
       import organizationPopup from '../../Popup/organizationPopup.vue'
@@ -165,7 +170,8 @@
             projectPopup,
             projectPopup,
             productWarehousModel,
             productWarehousModel,
             KSOutbound,
             KSOutbound,
-            KSWarehousing
+            KSWarehousing,
+            materiaWaring
         },
         },
         data() {
         data() {
           return {
           return {
@@ -208,11 +214,14 @@
         methods: {
         methods: {
             handleCancel(){
             handleCancel(){
                 this.visible=false
                 this.visible=false
+                this.loading=false
                 this.defaultMethod='add'
                 this.defaultMethod='add'
                 this.activeKey='finishProduct',
                 this.activeKey='finishProduct',
                 this.execute = ''
                 this.execute = ''
                 this.dataSource = [] 
                 this.dataSource = [] 
                 this.form={ }
                 this.form={ }
+                this.selectedRowKeys = []
+                this.selectedRows = []
                 this.$emit('ok')
                 this.$emit('ok')
             },
             },
             // changeChose(prop){
             // changeChose(prop){
@@ -508,11 +517,21 @@
                 this.$refs.KSOutbound.visible = true
                 this.$refs.KSOutbound.visible = true
                 this.$refs.KSOutbound.form.dataSource = this.$refs.productDetails.form.dataSource
                 this.$refs.KSOutbound.form.dataSource = this.$refs.productDetails.form.dataSource
             },
             },
+            materiaWarehous(){
+                this.$refs.materiaWaring.visible = true
+                this.$refs.materiaWaring.form.dataSource = this.$refs.material.form.dataSource
+            },
             RefreshList(data){
             RefreshList(data){
                 this.getProductData(this.form.id)
                 this.getProductData(this.form.id)
                 if(data!=='product'){
                 if(data!=='product'){
                     this.getTemporaryStorageData(this.form.id)
                     this.getTemporaryStorageData(this.form.id)
                 }
                 }
+            },
+            sendOrReceive(data){
+                 this.$refs.SurplusMaterials.sendOrReceive(data)
+            },
+            RefreshMateriaList(){
+                this.getMaterialData(this.form.id)
             }
             }
         }
         }
       }
       }