修改导入产品全选问题

featFunction
zhengmingliang 2 years ago
parent 0dbb546fce
commit 6e9d8172cd

@ -45,12 +45,17 @@
style="width: 100%" style="width: 100%"
ref="diList" ref="diList"
highlight-current-row highlight-current-row
@selection-change="handleSelectionChange" :header-cell-class-name="cellClass"
@current-change="handleSelectionChange"
> >
<el-table-column type="selection" width="55" :selectable="checkSelectable"></el-table-column> <el-table-column label width="45">
<template slot-scope="scope">
<el-radio :label="scope.row.id" v-model="radioCheck"><span></span></el-radio>
</template>
</el-table-column>
<el-table-column label="序号" type="index"></el-table-column> <el-table-column label="序号" type="index"></el-table-column>
<el-table-column <el-table-column
label="最小销售产品标识" label="最222小销售产品标识"
prop="nameCode" prop="nameCode"
width="140" width="140"
show-overflow-tooltip show-overflow-tooltip
@ -830,6 +835,7 @@ export default {
}, },
data() { data() {
return { return {
radioCheck:null,
filterQuery: { filterQuery: {
customerId: null, customerId: null,
ylqxzcrbarmc: "", ylqxzcrbarmc: "",
@ -892,6 +898,7 @@ export default {
methods: { methods: {
onReset() { onReset() {
this.radioCheck=null;
this.$router.push({ this.$router.push({
path: "", path: "",
}); });
@ -960,8 +967,13 @@ export default {
}); });
}, },
cellClass(row){
if (row.columnIndex === 0) {
return 'disabledCheck'
}
},
selectExport() { selectExport() {
var selectData = this.multipleSelection; var selectData = this.multipleSelection;
if (selectData == null || selectData.length == 0) { if (selectData == null || selectData.length == 0) {
this.$message.warning("请先选入产品!"); this.$message.warning("请先选入产品!");
@ -970,11 +982,8 @@ export default {
if (this.repEditQuery.price<0) { if (this.repEditQuery.price<0) {
this.$message.error("产品价格不能小于0元"); this.$message.error("产品价格不能小于0元");
return; return;
} }
this.postQuery.rlIds.push(selectData.id);
selectData.forEach((obj) => {
this.postQuery.rlIds.push(obj.id);
});
this.allExport(); this.allExport();
}, },
@ -1038,7 +1047,7 @@ export default {
}); });
}, },
handleSelectionChange(selection) { handleSelectionChange(selection) {
this.radioCheck=selection.id;
this.curSelectDi = selection[0]; this.curSelectDi = selection[0];
if (selection.length > 1) { if (selection.length > 1) {
this.$refs.diList.clearSelection(); this.$refs.diList.clearSelection();
@ -1173,6 +1182,10 @@ export default {
}; };
</script> </script>
<style scoped> <style scoped>
.el-table .disabledCheck .cell .el-checkbox .el-checkbox__input{
display: none !important;
}
.itemTag { .itemTag {
float: left; float: left;
text-align: left; text-align: left;

Loading…
Cancel
Save