Selaa lähdekoodia

Merge branch 'master' of http://47.107.53.207:3000/ymy/oms

AlanWong 2 vuotta sitten
vanhempi
säilyke
8374cc27e5

+ 7 - 1
src/benyun/components/byTable/byTable.vue

@@ -14,7 +14,8 @@
       :tree-config="{transform: attrs.transform, rowField: attrs.rowField, parentField: attrs.parentField}"
       :row-config="{isHover: true}"
       :tooltip-config="{showAll: true}"
-      :checkbox-config="{ checkMethod: attrs.checkMethod, visibleMethod: attrs.visibleMethod}">
+      :radio-config="{trigger: attrs.triggerRowCheck}"
+      :checkbox-config="{ checkMethod: attrs.checkMethod, visibleMethod: attrs.visibleMethod,trigger: attrs.triggerRowCheck}">
       style="width: 100%">
       <vxe-column v-if="attrs.checkbox" type="checkbox" width="50" fixed="left" />
       <vxe-column v-if="attrs.radio" type="radio" width="50" fixed="left" />
@@ -85,6 +86,7 @@
 /**
   config:{
     attr:{
+      triggerRowCheck:'row'  //点击行选中
       size: medium / small / mini  //尺寸
       height: ''  //高度
       maxHeight:''  //最大高度
@@ -147,6 +149,9 @@ export default class ByTable extends VueViews {
   }
 
   created(){
+    this.initConfig()
+  }
+  initConfig(){
     if(this.propConfig){
       this.setConfig(this.propConfig)
     }
@@ -180,6 +185,7 @@ export default class ByTable extends VueViews {
       this.page.pageSize = this.attrs.pageSize;
     }
     this.recalculate();
+    this.$forceUpdate();
   }
 
   //设置分页

+ 28 - 11
src/views/oms/order/components/addOrder.vue

@@ -506,25 +506,25 @@ export default class AddOrder extends Vue {
       title:'名称',
       field:'name',
       slot:true,
-      width:300
+      // width:300
     },{
       title:'数量',
       field:'qty',
-      width:100,
+      width:130,
       slot:true
     },{
       title:'单价',
       field:'price',
-      width:100,
+      width:130,
       slot:true
     },{
       title:'原价',
       field:'basePrice',
-      width:100
+      width:120
     },{
       title:'成交金额',
       field:'amount',
-      width:100
+      width:120
     },
     // {
     //   title:'库存',
@@ -534,11 +534,19 @@ export default class AddOrder extends Vue {
     {
       title:'操作',
       action:true,
+      width:160,
       plugins:[{
         icon:'el-icon-delete',
         name:'删除',
         audit:'',
         event:{
+          show:(row:any) => {
+            if(row.status == 'Merged' || row.status == 'Cancelled'){
+              return false
+            }else{
+              return true
+            }
+          },
           click:(item:any) => {
             this.deletaProduct(item);
           }
@@ -1028,14 +1036,23 @@ export default class AddOrder extends Vue {
       (this.$refs.infoform as any).setValue(buyerInfo);
       //商品
       const productData:Array<any> = data.items ? data.items : [];
+      for(let dItem of productData){
+        dItem.status = this.orderValue.status
+      }
       (this.$refs.table as any).setValue(productData);
-      (this.$refs.tool as any).setCustomTools([{
-        name: '商品编辑', icon: 'el-icon-edit', event:{
-          click:()=>{
-            this.editProduct()
+      if(this.orderValue.status == 'Merged' || this.orderValue.status == 'Cancelled'){
+        (this.$refs.tool as any).setTool([]);
+      }else{
+        (this.$refs.tool as any).setCustomTools([{
+          name: '商品编辑', icon: 'el-icon-edit', event:{
+            click:()=>{
+              this.editProduct()
+            }
           }
-        }
-      }])
+        }])
+
+      }
+      
       //付款
       this.orderValue.isPay = data.isPay;
       if(this.orderValue.isPay != 0 || this.orderValue.isPay != 1){

+ 2 - 4
src/views/oms/order/components/inputSelect.vue

@@ -39,12 +39,10 @@ export default class InputSelect extends Vue {
   }
   input(v:any){
     if(this.format && v){
-      console.log(this.format.test(v));
-      v=v.replace(this.format,'');
-      console.log(v);
+      this.value=v.replace(this.format,'');
     }
     let obj:any={};
-    obj[this.select] = v;
+    obj[this.select] = this.value;
     this.$emit('input',obj);
   }
 }

+ 4 - 4
src/views/oms/order/components/orderTable.vue

@@ -87,14 +87,14 @@
     <vxe-column field="buyerMessage" title="买家留言" width="120"></vxe-column>
     <vxe-column field="wmsCoId" title="发货仓编号" width="120"></vxe-column>
     <vxe-column field="payDate" title="支付时间" width="140"></vxe-column>
-    <vxe-column field="freeAmount" title="抵扣金额" width="120"></vxe-column>
-    <vxe-column field="payAmount" title="应付+运费" width="120">
+    <vxe-column field="freeAmount" title="抵扣金额" align="right" width="120"></vxe-column>
+    <vxe-column field="payAmount" title="应付+运费" align="right" width="120">
       <template #default="{ row }">
         <span>{{ row.payAmount }}</span> <br/>
         <span style="color: #b9b8b8;">{{ row.freight?row.freight:0 }}</span>
       </template>
     </vxe-column>
-    <vxe-column field="paidAmount" title="实付金额" width="120"></vxe-column>
+    <vxe-column field="paidAmount" title="实付金额" align="right" width="120"></vxe-column>
     <vxe-column field="shopBuyerId" title="买家昵称" width="120"></vxe-column>
     <vxe-column field="openId" title="平台买家唯一值" width="120"></vxe-column>
     <vxe-column field="buyerPaidAmount" title="总买家实付" width="120"></vxe-column>
@@ -120,7 +120,7 @@
     </vxe-column>
     <vxe-column field="remark" title="订单备注" width="120"></vxe-column>
     <vxe-column field="note" title="线下备注" width="120"></vxe-column>
-    <vxe-column title="操作" width="120" fixed="right">
+    <vxe-column title="操作" width="90" fixed="right" align="center">
       <template #default="{ row }">
         <el-button type="text" size="mini" v-if="showMerge(row)" @click="mergeHandle(row)">合并</el-button>
         <el-button type="text" size="mini" v-if="showSplit(row)" @click="splitHandle(row)">拆分</el-button>

+ 3 - 2
src/views/oms/order/index.vue

@@ -262,7 +262,7 @@ export default class Order extends Vue {
   myOptions=[{
     label:'内部订单号',
     value:'orderId',
-    format:/^\d*(,\d*)*$/
+    format:/[^0-9,]*/g
   }]
   outLineOptions=[{
     label:'线上订单号',
@@ -374,7 +374,8 @@ export default class Order extends Vue {
   },{
     label:'排除任意款式编码',
     value:2
-  }]//平台订单状态
+  }]
+  //平台订单状态
   shopStatusListOption:Array<any>=[{
     label:'没有创建支付宝交易',
     value:1

+ 1 - 1
src/views/oms/orderHistory/index.vue

@@ -67,7 +67,7 @@ export default class OrderHistory extends Vue {
   myOptions=[{
     label:'内部订单号',
     value:'orderId',
-    type:'number'
+    format:/[^0-9,]*/g
   }]
   outLineOptions=[{
     label:'线上订单号',