Commit ffb8e796 authored by 刘用法's avatar 刘用法

材料用量可编辑

parent a1b9910f
......@@ -13,7 +13,8 @@
<view class="line-view"></view>
<u-tr class="u-tr" v-for="(item, index) in list" :key="index">
<u-td class="u-td" v-for="(value, key) in titles" :key="key">
<text :class="['tab-th-txt', {'left': key == firstKey}]">{{item[key]}}</text>
<u-input v-if="key == 'useLength'" type="digit" placeholder="0" v-model="item[key]" placeholder-style="color: #999999;font-size:26rpx" input-align="center" :clearable="false"><u-icon name="edit"></u-icon></u-input>
<text v-else :class="['tab-th-txt', {'left': key == firstKey}]">{{item[key]}}</text>
</u-td>
</u-tr>
</u-table>
......@@ -80,22 +81,12 @@
};
},
titles() {
if(this.isMaterial){
return {
matName: '材料名称',
matUnit: '单位',
freeLength: '免费量',
unitAmt: '单价/元',
useLength: '用量'
}
}else{
return {
matName: '工艺名称',
matUnit: '单位',
freeLength: '免费量',
unitAmt: '单价/元',
useLength: '用量'
}
return {
matName: this.isMaterial ? '工艺名称' : '材料名称',
matUnit: '单位',
freeLength: '免费量',
unitAmt: '单价/元',
useLength: '用量'
}
},
thStyle() {
......@@ -148,6 +139,13 @@
self.formatServiceMoreList(data)
}
});
// 测试数据
// var item = {matName: '碳纤维',
// matUnit: '米',
// freeLength: 4,
// unitAmt: '2',
// useLength: 6}
// this.list = [{...item}, {...item}, {...item}, {...item}]
},
created() {
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment