Browse Source

pc开单-打印增加合计、实收、欠款,界面优化,库存不足也可开单,供货商字段更改

jf 5 years ago
parent
commit
bb4a101734
1 changed files with 20 additions and 11 deletions
  1. 20 11
      ghs/src/views/order/add.vue

+ 20 - 11
ghs/src/views/order/add.vue

@@ -56,7 +56,7 @@
     bottom: 70px;
     right: 20%;
     width: 70%;
-    //height: 310px;
+    max-height: 310px;
     overflow: hidden;
     //overflow-y: scroll;
   }
@@ -66,10 +66,13 @@
     right: 20%;
     // transform: translateX(-50%);
     .allPrice {
-      margin-left: 20px;
+      margin-left: 80px;
       // color: #606266;
       font-size: 16px;
       font-weight: 700;
+      &.active{
+        margin-left: 200px;
+      }
     }
   }
   .el-dialog-center{
@@ -141,12 +144,12 @@
     </div>
     <div class="bottom_input">
       <el-form ref="form" label-width="80px" style="display: inline-block">
-        <el-form-item label="花材">
+        <el-form-item label="花材" style="font-weight: 700;">
           <el-input style="width: 200px" @keyup.enter.native="enterSeekFun()" placeholder="请输入名称,支持拼音首字母,按Esc取消" type="text" ref="commodityInput" v-model="seekVal"></el-input></el-form-item>
       </el-form>
       <div style="display: inline-block;" class="allPrice">总金额: {{ totalMoney.toFixed(2) }}</div>
       <div style="display: inline-block;" class="allPrice">总数量: {{tableData.length}}</div>
-      <div style="display: inline-block;" class="allPrice">
+      <div style="display: inline-block;" class="allPrice active">
         <el-checkbox v-model="checked"></el-checkbox>
         结账后自动打印
         <el-input style="width: 50px;" type="text" v-model="printAmount"></el-input></el-form-item>
@@ -178,7 +181,7 @@
             <el-option
                 v-for="item in allShopList"
                 :key="item.id"
-                :label="item.shopName"
+                :label="item.name"
                 :value="item.id">
             </el-option>
           </el-select>
@@ -216,7 +219,7 @@
         <div class="accounts-list">
           {{ payType }}
           <div class="accounts-center">
-            ¥{{ totalMoney }}
+            ¥{{ totalMoney.toFixed(2) }}
           </div>
         </div>
         <div class="accounts-list">
@@ -259,6 +262,12 @@
           <td style="padding: 10px;width: 100px;text-align: center;">{{ res.money }}</td>
           <td style="padding: 10px;width: 100px;text-align: center;"></td>
         </tr>
+        <tr>
+          <td style="padding: 10px;width: 100px;" colspan="2">合计:{{totalMoney.toFixed(2)}}</td>
+          <td style="padding: 10px;width: 100px;" colspan="2">实收:{{payType=='已收款'?totalMoney.toFixed(2):'0.00'}}</td>
+          <td style="padding: 10px;width: 100px;" colspan="2">欠款:{{payType=='欠款'?totalMoney.toFixed(2):'0.00'}}</td>
+          <td style="padding: 10px;width: 100px;"></td>
+        </tr>
         <tr>
           <td style="padding: 10px;width: 100px;">其他说明:</td>
           <td style="padding: 10px;width: 100px;" colspan="6">{{remark}}</td>
@@ -433,7 +442,7 @@ export default {
         sendCost:this.freight,
         product:JSON.stringify(product),
         remark:this.remark,
-        clearType:this.payType='欠款'?1:2,
+        clearType:this.payType=='欠款'?1:2,
       }
       this.$service.order.orderCreate(parameter).then(res => {
         this.orderMsg = res;
@@ -473,10 +482,10 @@ export default {
     async enterSeekFun(){
       if(this.seekVal==''){this.isSeek = false;return;}
       if(this.seekVal==this.seekOldVal&&this.seekList!=''){
-        if(Number(this.seekList[this.seekListIndex].stock)==0){
-          this.$message({message: '库存不足',type: 'warning'});
-          return;
-        }
+        // if(Number(this.seekList[this.seekListIndex].stock)==0){
+        //   this.$message({message: '库存不足',type: 'warning'});
+        //   return;
+        // }
         this.isSeek = false;
         this.isSelectNumber = true;
         console.log(this.seekList[this.seekListIndex])