|
|
@@ -1,13 +1,13 @@
|
|
|
<template>
|
|
|
<el-dialog title="选择花材" :visible.sync="selDialog" :close-on-click-modal="false" :append-to-body="true" @close="$emit('update:show', false)" width="950px">
|
|
|
<div class="recharge-modal-content">
|
|
|
- <el-checkbox-group v-model="checkList" class="radio-wrap">
|
|
|
- <x-crud class="liu-crud-wrap" @load="onLoad">
|
|
|
+ <el-checkbox-group v-model="checkList" class="radio-wrap" >
|
|
|
|
|
|
+ <x-crud class="liu-crud-wrap" @load="onLoad">
|
|
|
<template #table-column-radio="{scope}">
|
|
|
<div>
|
|
|
<el-checkbox v-if="scope.row.select == 2" disabled :label="scope.row" >{{scope.row.id}}</el-checkbox>
|
|
|
- <el-checkbox v-else :label="scope.row">{{scope.row.id}}</el-checkbox>
|
|
|
+ <el-checkbox v-else :label="scope.row" @click.stop.native="stop" >{{scope.row.id}}</el-checkbox>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
@@ -17,15 +17,15 @@
|
|
|
</template>
|
|
|
|
|
|
<template #table-column-stockWarning="{scope}">
|
|
|
- <el-input v-model="scope.row.stockWarning" placeholder="库存预警值" size="small"></el-input>
|
|
|
+ <el-input v-model="scope.row.stockWarning" @click.stop.native="stop" placeholder="库存预警值" size="small"></el-input>
|
|
|
</template>
|
|
|
|
|
|
<template #table-column-cost="{scope}">
|
|
|
- <el-input v-model="scope.row.cost" placeholder="成本价" size="small" ></el-input>
|
|
|
+ <el-input v-model="scope.row.cost" placeholder="成本价" @click.stop.native="stop" size="small" ></el-input>
|
|
|
</template>
|
|
|
|
|
|
<template #table-column-addPrice="{scope}">
|
|
|
- <el-input v-model="scope.row.addPrice" placeholder="加价" size="small"></el-input>
|
|
|
+ <el-input v-model="scope.row.addPrice" placeholder="加价" @click.stop.native="stop" size="small"></el-input>
|
|
|
</template>
|
|
|
|
|
|
<template #table-column-cover="{scope}">
|
|
|
@@ -33,8 +33,8 @@
|
|
|
<cl-avatar shape="square" :size="40" :src="scope.row.cover | default_avatar" :style="{ margin: 'auto' }" ></cl-avatar>
|
|
|
</div>
|
|
|
</template>
|
|
|
-
|
|
|
</x-crud>
|
|
|
+
|
|
|
</el-checkbox-group>
|
|
|
|
|
|
<div>
|
|
|
@@ -96,6 +96,7 @@ export default {
|
|
|
},
|
|
|
created () { },
|
|
|
methods: {
|
|
|
+ stop(){},
|
|
|
selClassFn(val){
|
|
|
let index = this.itemClassList.findIndex((e) => e.name == val)
|
|
|
this.sonClassId = this.itemClassList[index].id
|
|
|
@@ -122,6 +123,20 @@ export default {
|
|
|
resetForm () {
|
|
|
this.$emit('cancel');
|
|
|
},
|
|
|
+ selectItem(row){
|
|
|
+ console.log(1212121121)
|
|
|
+ console.log(row)
|
|
|
+ //已经选过
|
|
|
+ if(row.select == 2){
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ let index = this.checkList.findIndex(e => e.id == row.id)
|
|
|
+ if(index === -1){
|
|
|
+ this.checkList = [row,...this.checkList]
|
|
|
+ }else{
|
|
|
+ this.checkList.splice(index,1)
|
|
|
+ }
|
|
|
+ },
|
|
|
onLoad ({ ctx, app }) {
|
|
|
|
|
|
this.sonClassId = this.classId
|
|
|
@@ -183,10 +198,11 @@ export default {
|
|
|
align: 'center'
|
|
|
}
|
|
|
],
|
|
|
- on: {
|
|
|
- 'row-click': (row, column) => {
|
|
|
- }
|
|
|
- },
|
|
|
+ on: {
|
|
|
+ 'row-click': (row, column) => {
|
|
|
+ this.selectItem(row)
|
|
|
+ }
|
|
|
+ },
|
|
|
// 操作列
|
|
|
op: {
|
|
|
visible: false // 是否显示
|