|
@@ -68,8 +68,13 @@
|
|
|
:data-source="materialsOutQuantityData"
|
|
|
:pagination="false"
|
|
|
:scroll="{ y: 500,x:1500 }"
|
|
|
+ :rowClassName="setRowClassName"
|
|
|
: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>
|
|
|
+ </template>
|
|
|
</a-table>
|
|
|
|
|
|
<!-- 导出 打印 返回 -->
|
|
@@ -157,7 +162,8 @@ export default {
|
|
|
dataIndex: 'iprice',
|
|
|
width: 120,
|
|
|
key: '',
|
|
|
- className: 'replacecolor'
|
|
|
+ className: 'replacecolor',
|
|
|
+ scopedSlots: { customRender: 'iprice' },
|
|
|
},
|
|
|
{
|
|
|
title: '数量',
|
|
@@ -301,7 +307,18 @@ export default {
|
|
|
getExportDataList(){
|
|
|
this.materialsOutQuantityData.forEach((record,index)=>record["ccode_ex"]=" "+record["ccode"]);
|
|
|
return this.materialsOutQuantityData;
|
|
|
- }
|
|
|
+ },
|
|
|
+ //改变单价
|
|
|
+ changePrice(record){
|
|
|
+ if(record.iprice !== 0){
|
|
|
+ record.statue = 1
|
|
|
+ }
|
|
|
+ this.$forceUpdate()
|
|
|
+ },
|
|
|
+ // 行样式设置
|
|
|
+ setRowClassName(record) {
|
|
|
+ return record.statue === 0 ? "inputRowStyl" : "inputRowSty2";//赋予点击行样式
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
</script>
|