|
@@ -1,18 +1,12 @@
|
|
|
<template>
|
|
|
<div>
|
|
|
<el-row :gutter="24" style="margin: 0 0 12px 0"> </el-row>
|
|
|
- <el-table
|
|
|
- border
|
|
|
- :data="tableData"
|
|
|
- stripe
|
|
|
- style="width: 100%"
|
|
|
- :header-cell-style="{
|
|
|
- background: 'rgba(250,250,250)',
|
|
|
- color: 'rgb(50,59,65)',
|
|
|
- height: '39px',
|
|
|
- textAlign: 'center'
|
|
|
- }"
|
|
|
- >
|
|
|
+ <el-table border :data="tableData" stripe style="width: 100%" :header-cell-style="{
|
|
|
+ background: 'rgba(250,250,250)',
|
|
|
+ color: 'rgb(50,59,65)',
|
|
|
+ height: '39px',
|
|
|
+ textAlign: 'center'
|
|
|
+ }">
|
|
|
<el-table-column type="index" width="50" label="序号" align="center"> </el-table-column>
|
|
|
<!-- <el-table-column type="index" label="序号" width="50" align="center"> -->
|
|
|
<el-table-column prop="matterTypeName" label="厂家" align="center"> </el-table-column>
|
|
@@ -22,22 +16,15 @@
|
|
|
<el-table-column prop="availableqty" label="库存" align="center"> </el-table-column>
|
|
|
<el-table-column prop="yuliang" label="本次领取" align="center">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-input
|
|
|
- class="tf-input-border"
|
|
|
- v-model="scope.row.yuliang"
|
|
|
- v-bind:ref="'r' + scope.$index + 'c' + 1"
|
|
|
- size="small"
|
|
|
- :disabled="isDetailShow"
|
|
|
- maxlength="15"
|
|
|
- @change="changePriceFn(scope.row.yuliang, scope.$index, scope.row)"
|
|
|
- ></el-input>
|
|
|
+ <el-input class="tf-input-border" v-model="scope.row.yuliang" v-bind:ref="'r' + scope.$index + 'c' + 1"
|
|
|
+ size="small" :disabled="isDetailShow" maxlength="15"
|
|
|
+ @change="changePriceFn(scope.row.yuliang, scope.$index, scope.row)"></el-input>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="prop" label="操作" align="center" width="60px" fixed="right" v-if="!isDetailShow">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-button v-if="!scope.row.isDeteltShow" type="text" style="color: #f40" @click="delMaterial(scope.row)"
|
|
|
- >删除</el-button
|
|
|
- >
|
|
|
+ <el-button v-if="!scope.row.isDeteltShow" type="text" style="color: #f40"
|
|
|
+ @click="delMaterial(scope.row)">删除</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
@@ -186,11 +173,11 @@ export default {
|
|
|
changePriceFn(value, index, row) {
|
|
|
// console.log('12222222222222', row)
|
|
|
const fValue = parseFloat(value) || 0
|
|
|
- if (fValue > Number(row.availableqty)) {
|
|
|
- this.tableData[index].yuliang = Number(row.availableqty)
|
|
|
- } else {
|
|
|
- this.tableData[index].yuliang = fValue
|
|
|
- }
|
|
|
+ // if (fValue > Number(row.availableqty)) {
|
|
|
+ // this.tableData[index].yuliang = Number(row.availableqty)
|
|
|
+ // } else {
|
|
|
+ this.tableData[index].yuliang = fValue || 0
|
|
|
+ // }
|
|
|
},
|
|
|
/**
|
|
|
* 提交文件
|
|
@@ -216,6 +203,5 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
</script>
|
|
|
-
|
|
|
-<style lang = "scss" scoped>
|
|
|
-</style>
|
|
|
+
|
|
|
+<style lang="scss" scoped></style>
|