|
@@ -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('点击抽屉取消')
|