Explorar el Código

面辅料单价计算

jbb hace 2 años
padre
commit
e6053c02ea

+ 0 - 2
src/store/modules/user.js

@@ -176,8 +176,6 @@ const user = {
           if (process.env.VUE_APP_SSO == 'true') {
             let sevice = 'http://' + window.location.host + '/'
             let serviceUrl = encodeURIComponent(sevice)
-            console.log(process.env.VUE_APP_CAS_BASE_URL)
-            debugger
             // window.location.href = 'http://220.191.168.86:18005/cas/logout?service=' + serviceUrl
             window.location.href = process.env.VUE_APP_CAS_BASE_URL + '/logout?service=' + serviceUrl
           }

+ 0 - 1
src/views/book/addBookDrawer.vue

@@ -810,7 +810,6 @@ export default {
         moneytotal += item.totalPrice;
        })
        this.addBook.money = moneytotal.toFixed(2);
-       debugger
        }
       })
 

+ 14 - 1
src/views/packing-list/packinglist-fabrics/addFabricDrawer.vue

@@ -177,6 +177,12 @@
                   <a-input style="width:100%" type="text" v-model="record.rolls" />
                 </a-form-model-item>
               </template>
+              <!-- 价格 -->
+              <template slot="price" slot-scope="text, record, index">
+                <a-form-model-item prop="price" :rules="rules.price">
+                  <a-input style="width:100%" type="text" v-model="record.price"  @change="handleValueChange(record)"/>
+                </a-form-model-item>
+              </template>
 
               <!-- 毛重 -->
               <template slot="grossWeight" slot-scope="text, record, index">
@@ -609,6 +615,7 @@ export default {
           dataIndex: 'price',
           width: 120,
           className: 'replacecolor',
+           scopedSlots: { customRender: 'price' },
           ellipsis: true,
         },
         {
@@ -856,7 +863,13 @@ export default {
       this.addFabricData.splice(index+1, 0, newRow);
     },
     // -------------------------------------
-
+  handleValueChange(record){
+    if (record.price != undefined && record.price != "" && record.masterMetering =='KG'){
+     record.totalPrice = record.netWeight*record.price
+    }else if (record.price != undefined && record.price != "" && record.masterMetering !=='KG'){
+      record.totalPrice = record.actualDeclaredQuantity*record.price
+    }
+  },
     // 抽屉 取消
     handleCancel() {
       console.log('点击抽屉取消')