|
|
@@ -289,6 +289,7 @@
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="SecondUnit" min-width="110" label="二级单位" align="center" show-overflow-tooltip>
|
|
|
+ <template slot="header" slot-scope="scope">二级单位 <i @click="batchSetSecUnit" class="el-icon-arrow-down" style="cursor: pointer;"></i> </template>
|
|
|
<template slot-scope="scope">
|
|
|
<el-form-item style="margin-bottom: 0px;" :prop="'tableData.' + scope.$index + '.SecondUnit'" :rules="rules.SecondUnit">
|
|
|
<el-select filterable size="small" v-model="scope.row.SecondUnit" placeholder="请选择" style="width: 100%">
|
|
|
@@ -877,6 +878,15 @@
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
+ batchSetSecUnit () {
|
|
|
+ let that = this
|
|
|
+ let selectedId = that.tableDataList.tableData[0].SecondUnit
|
|
|
+ if (selectedId) {
|
|
|
+ that.tableDataList.tableData.forEach((item, index) => {
|
|
|
+ that.$set(that.tableDataList.tableData[index], 'SecondUnit', selectedId)
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
// 状态判断
|
|
|
statusFun () {
|
|
|
let data = {
|