|
@@ -72,8 +72,7 @@
|
|
|
:footer="showTotal"
|
|
|
>
|
|
|
<template slot="iprice" slot-scope="text, record, index">
|
|
|
- <a-input placeholder="请输入物料名称" v-model="record.iprice" v-if="record.statue == '0'" @blur="changePrice(record)" @pressEnter="changePrice(record)"></a-input>
|
|
|
- <span v-if="record.statue == '1'">{{record.iprice}}</span>
|
|
|
+ <a-input placeholder="请输入物料名称" v-model="record.iprice" @blur="changePrice(record)" @pressEnter="changePrice(record)"></a-input>
|
|
|
</template>
|
|
|
</a-table>
|
|
|
|
|
@@ -310,14 +309,11 @@ export default {
|
|
|
},
|
|
|
//改变单价
|
|
|
changePrice(record){
|
|
|
- if(record.iprice !== 0){
|
|
|
- record.statue = 1
|
|
|
- }
|
|
|
- this.$forceUpdate()
|
|
|
+
|
|
|
},
|
|
|
// 行样式设置
|
|
|
setRowClassName(record) {
|
|
|
- return record.statue === 0 ? "inputRowStyl" : "inputRowSty2";//赋予点击行样式
|
|
|
+ return record.iprice == '0' ? "inputRowStyl" : "inputRowSty2";//赋予点击行样式
|
|
|
}
|
|
|
}
|
|
|
}
|