ymy il y a 11 mois
Parent
commit
d5169854d7

+ 2 - 0
src/benyun/components/byTable/byTable.vue

@@ -12,6 +12,8 @@
       :stripe="attrs.stripe"
       :border="attrs.border"
       :align="attrs.align"
+      :show-footer="attrs.showFooter"
+      :footer-method="attrs.footerMethod"
       :tree-config="{transform: attrs.transform, rowField: attrs.rowField, parentField: attrs.parentField}"
       :row-config="{isHover: true}"
       :tooltip-config="{showAll: true}"

+ 3 - 1
src/benyun/components/moduleView/moduleView.vue

@@ -83,7 +83,9 @@ export default class ModuleView extends ModuleViewHandle {
     // this.getList() 
     this.$nextTick(()=>{
       if(this.attrs.calculateH){
-        this.initTable();
+        setTimeout(()=>{
+          this.initTable()
+        },200) 
       }
     })
   }

+ 17 - 1
src/components/skuModal/productModal.vue

@@ -70,7 +70,19 @@ export default class ProductModal extends Vue {
               placeholder:'请输入商品名称'
             }
           }
-        }]
+        },{
+            span: 10,
+            label: '69码-商品条码',
+            prop: 'barCode',
+            labelWidth: '130px',
+            component: 'by-input',
+            compConfig: {
+              attr: {
+                placeholder: '69码-商品条码',
+                clearable: true
+              }
+            }
+          },]
       ]
     },
     tool:{
@@ -96,6 +108,10 @@ export default class ProductModal extends Vue {
         field:'skuTitle',
         ellipsis:true,
         // width:150
+      },{
+        title:'69码',
+        field:'barCode',
+        width:140
       },{
         width: '80px',
         title: '是否已同步WMS',

+ 17 - 0
src/views/audit/productManagement/index.vue

@@ -1062,6 +1062,19 @@
 								}
 							}
 						},
+						{
+							span: 6,
+							label: '物料编码',
+							prop: 'materialCode',
+							component: 'by-input',
+							labelWidth: '70px',
+							compConfig: {
+								attr: {
+									placeholder: '请输入物料编码',
+									clearable: true
+								}
+							}
+						},
 					],
 				]
 			},
@@ -1101,6 +1114,10 @@
 					width: 200,
 					title: '货号',
 					field: 'itemNumber'
+				},{
+					title: '物料编码',
+					field: 'materialCode',
+					width: 110,
 				}, {
 					width: 200,
 					title: '国际码',

+ 2 - 0
src/views/oms/WMSProduct/component/ItemSku.vue

@@ -8,6 +8,7 @@
       <vxe-column type="seq" title="序号" width="60"></vxe-column>
       <vxe-column field="skuId" title="编码" width="120"></vxe-column>
       <vxe-column field="name" title="物料名称"></vxe-column>
+      <vxe-column field="barCode" title="商品条码"></vxe-column>
       <vxe-column field="qty" title="数量" width="120">
         <template #default="{row}">
           <vxe-input v-model="row.qty" size="mini" min="1" type="integer" @input="qtyChange(row)"></vxe-input>
@@ -34,6 +35,7 @@ export default class ItemSku extends Vue {
       let obj:any = {}
       obj.name = item.skuTitle;
       obj.skuId = item.id;
+      obj.barCode = item.barCode;
       obj.qty = 1;
       this.data.push(obj);
     }

+ 82 - 0
src/views/oms/WMSProduct/component/itemsModal.vue

@@ -0,0 +1,82 @@
+<template>
+  <vxe-modal v-model="value" id="wmsItemstModel" width="60%" v-loading="load" @show="show" height="60%" show-zoom resize transfer>
+    <template #title>
+      <span>入库商品信息</span>
+    </template>
+    <by-table :propConfig="tableConfig" ref="table" id="item-table"></by-table>
+  </vxe-modal>
+</template>
+
+<script lang="ts">
+import { Component, Prop, Vue, Watch } from "vue-property-decorator";
+import { queryPrice } from '@/api/priceManage'
+@Component({components:{}})
+export default class QuestModel extends Vue {
+  value=false;
+  load=false;
+  tableConfig:any={
+    attr:{
+      size:'mini',
+      seq:true,
+      align:'center',
+      showFooter:true,
+      footerMethod: data => {
+        let d:Array<any> = [];
+        let n = 0;
+        for(let i = 0; i < data.columns.length; i++){
+          d.push('')
+        }
+        for(const item of data.data){
+          if(Number(item.quantity)){
+            n = n + Number(item.quantity)
+          }
+        }
+        d[d.length - 1] = '总数(' + n + ')'
+        return [d];
+      }
+    },
+    columns:[{
+      title:'商品条码',
+      field:'barCode'
+    },
+    {
+      title:'数量',
+      field:'quantity'
+    }
+  ]}
+  data:Array<any>=[]
+  mounted(){
+    
+  }
+  btn(){
+    let data:Array<any> = (this.$refs.table as any).getSelectData();
+    if(!data || data.length == 0){
+      this.$message('请选择数据!');
+      return
+    }
+    this.$emit('priceHandle', data[0].price)
+    this.value = false
+  }
+  show(){
+    let height = (document.getElementById('item-table') as any).parentNode.offsetHeight;
+    this.tableConfig.attr.height=height - 36;
+    (this.$refs.table as any).setConfig(this.tableConfig);
+  }
+  setData(data:Array<any>){
+    if(data){
+      this.$nextTick(()=>{
+        (this.$refs.table as any).setValue(data)
+      })
+    }
+    
+  }
+
+  setShow(v:boolean){
+    this.value = v;
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+
+</style>

+ 42 - 16
src/views/oms/WMSProduct/index.vue

@@ -2,6 +2,7 @@
   <div class="wmsProduct">
     <module-view :propConfig="config" ref="view" v-loading="load" @pagination="pagination" @modalHandle="modalHandle" @onRefresh="getList" 
     @resert="queryList" @search="queryList" @clickHandle="clickHandle" @detail="detail" />
+    <itemsModal ref="itemsModal" />
   </div>
 </template>
 
@@ -10,7 +11,8 @@ import { Component, Prop, Vue, Watch } from "vue-property-decorator";
 import TagState from "./component/tagState.vue";
 import ItemSku from "./component/ItemSku.vue";
 import {query,WMSCreateEntryOrder} from '@/api/WMSInstoreBill'
-@Component({components:{}})
+import itemsModal from './component/itemsModal.vue'
+@Component({components:{itemsModal}})
 export default class WMSProduct extends Vue {
   load=false;
   time:any;
@@ -152,27 +154,36 @@ export default class WMSProduct extends Vue {
         field:'orderConfirmTime',
         width:150
       },
-      // {
-      //   title:'操作',
-      //   action:true,
-      //   width:100,
-      //   plugins:[{
-      //     name:'删除',
-      //     event:{
-      //       click:(item:any) => {
-      //         this.del(item);
-      //       }
-      //     }
-      //   }]
-      // }
+      {
+        title:'操作',
+        action:true,
+        width:100,
+        plugins:[{
+          name:'查看商品',
+          event:{
+            click:(item:any) => {
+              this.itemInfo(item.items);
+            }
+          }
+        }]
+      }
     ]
     },
     modal:{
       tool:{
         tools:{
           return:true,
-          add:true
-        }
+          // add:true
+        },
+        customTools:[{
+          name: '入库推送', 
+          icon: 'el-icon-plus',
+          event:{
+            click:() => {
+              (this.$refs.view as any).getFormValidate(this.addInStore)
+            }
+          }
+        }]
       },
       form:{
         attr:{
@@ -252,6 +263,21 @@ export default class WMSProduct extends Vue {
       this.getList()
     })
   }
+  //查看商品信息
+  itemInfo(item:any){
+    if(!item){
+      this.$message('无法查到商品信息!');
+      return
+    }
+    try{
+      let data = JSON.parse(item);
+      (this.$refs.itemsModal as any).setShow(true);
+      (this.$refs.itemsModal as any).setData(data);
+    }catch(e){
+      this.$message('商品信息有误,请检查!');
+    }
+    
+  }
   //分页
   pagination(){
     if(this.isSearch){