| | |
| | | </div> |
| | | </div> |
| | | <div> |
| | | <el-table class="pallet-transports-material-table" :data="palletTransportsMaterialData" style="width: 100%;" |
| | | <el-table class="pallet-transports-material-table" :data="palletTransportsMaterialData" @current-change="handleCurrentChange" style="width: 100%;" |
| | | height="350px" border @selection-change="palletTransportsMaterialSelectionChange" stripe |
| | | ref="palletTransportsMaterialTable"> |
| | | <el-table-column type="selection" width="55"> </el-table-column> |
| | | <!--单选框--> |
| | | <el-table-column align="center" label="单选"> |
| | | <template slot-scope="scope"> |
| | | <el-checkbox class="table-single-checkbox" v-model="scope.row.commonChecked" disabled></el-checkbox> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="partNo" label="零件号" align="center" show-overflow-tooltip> |
| | | </el-table-column> |
| | | <el-table-column prop="partDesc" label="零件描述" align="center" show-overflow-tooltip> |
| | |
| | | </el-table-column> |
| | | <el-table-column label="操作" align="center" width="100"> |
| | | <template slot-scope="scope"> |
| | | <el-button v-show="!scope.row.canEdit" type="text" :disabled="scope.row.detailExistState" |
| | | @click="scope.row.canEdit = true">编辑</el-button> |
| | | <el-button v-show="scope.row.canEdit" type="text" :disabled="scope.row.detailExistState" |
| | | @click="updateMaterial(scope.row)">保存</el-button> |
| | | <!-- <el-button v-show="!scope.row.canEdit" type="text" :disabled="scope.row.detailExistState" |
| | | @click="scope.row.canEdit = true">编辑</el-button> --> |
| | | <!-- <el-button v-show="scope.row.canEdit" type="text" :disabled="scope.row.detailExistState" |
| | | @click="updateMaterial(scope.row)">保存</el-button> --> |
| | | <el-button type="text" :disabled="scope.row.detailExistState" |
| | | @click="delMaterial(scope.row)">删除</el-button> |
| | | </template> |
| | |
| | | }, |
| | | created() { }, |
| | | methods: { |
| | | // 单行选中 |
| | | handleCurrentChange(row) { |
| | | if (row != null) { |
| | | this.palletTransportsMaterialData.forEach((item) => { |
| | | // 排他,每次选择时把其他选项都清除 |
| | | if (item.id !== row.id) { |
| | | item.commonChecked = false |
| | | } else { |
| | | item.commonChecked = true |
| | | } |
| | | }) |
| | | } |
| | | }, |
| | | // 工艺类型中文格式化 |
| | | formatStateType(row, column, cellValue) { |
| | | this.stateOptions.forEach((obj) => { |
| | |
| | | unit: item.unit, |
| | | transportsId: item.transportsId, |
| | | detailExistState: item.detailExistState, |
| | | canEdit: false |
| | | canEdit: false, |
| | | commonChecked: false |
| | | } |
| | | this.palletTransportsMaterialData.push(palletTransportsMaterial) |
| | | }) |
| | |
| | | // this.getPalletTransportsMaterialData() |
| | | this.palletTransportsMaterialSelectionChange(selectionList) |
| | | }) |
| | | .catch(() => { |
| | | }) |
| | | // .catch(() => { |
| | | // }) |
| | | } |
| | | }, |
| | | // 添加ifs物料库存回调 |