|
@@ -1,9 +1,6 @@
|
|
|
<template>
|
|
<template>
|
|
|
<div class="app-list-content">
|
|
<div class="app-list-content">
|
|
|
- <x-crud
|
|
|
|
|
- class="liu-crud-wrap"
|
|
|
|
|
- @load="onLoad"
|
|
|
|
|
- >
|
|
|
|
|
|
|
+ <x-crud class="liu-crud-wrap" ref="xCrud" @load="onLoad">
|
|
|
<template #slot-tabs>
|
|
<template #slot-tabs>
|
|
|
<el-tabs class="liu-tabs" type="border-card" v-model="tabIndex" @tab-click="tabClick">
|
|
<el-tabs class="liu-tabs" type="border-card" v-model="tabIndex" @tab-click="tabClick">
|
|
|
<el-tab-pane v-for="(item, index) in tabsData" :key="index" :label="item.text" :name="item.key">
|
|
<el-tab-pane v-for="(item, index) in tabsData" :key="index" :label="item.text" :name="item.key">
|
|
@@ -224,6 +221,23 @@
|
|
|
<el-button type="primary" size="small" @click="replaceConfirmFn">确认</el-button>
|
|
<el-button type="primary" size="small" @click="replaceConfirmFn">确认</el-button>
|
|
|
</div>
|
|
</div>
|
|
|
</el-dialog>
|
|
</el-dialog>
|
|
|
|
|
+ <!--//批量修改-->
|
|
|
|
|
+ <el-dialog width="600px" title="批量修改" :visible.sync="dialogFormVisible">
|
|
|
|
|
+ <div class="flex-center">
|
|
|
|
|
+ <el-input placeholder="批量修改" v-model="batchAlter" autocomplete="off"></el-input>
|
|
|
|
|
+ <el-button style="margin: 0 30px" type="primary" @click="batchAlterFun">确 定</el-button>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="flex-center" style="margin-top: 30px">
|
|
|
|
|
+ <el-input placeholder="批量加价" v-model="batchAddPrice" autocomplete="off"></el-input>
|
|
|
|
|
+ <el-button style="margin: 0 30px" type="primary" @click="batchAddPriceFun">确 定</el-button>
|
|
|
|
|
+ </div>
|
|
|
|
|
+
|
|
|
|
|
+ <!--<div slot="footer" class="dialog-footer">-->
|
|
|
|
|
+ <!--<el-button @click="dialogFormVisible = false">取 消</el-button>-->
|
|
|
|
|
+ <!--<el-button type="primary" @click="dialogFormVisible = false">确 定</el-button>-->
|
|
|
|
|
+ <!--</div>-->
|
|
|
|
|
+ </el-dialog>
|
|
|
|
|
+
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
<script>
|
|
<script>
|
|
@@ -250,6 +264,9 @@ export default {
|
|
|
sort: {
|
|
sort: {
|
|
|
status: false
|
|
status: false
|
|
|
},
|
|
},
|
|
|
|
|
+ batchAlter:'',
|
|
|
|
|
+ batchAddPrice:'',
|
|
|
|
|
+ dialogFormVisible:false,
|
|
|
canAddPrice:false,
|
|
canAddPrice:false,
|
|
|
canAddRatio:false,
|
|
canAddRatio:false,
|
|
|
costPrice: false,
|
|
costPrice: false,
|
|
@@ -713,8 +730,34 @@ export default {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
},
|
|
},
|
|
|
|
|
+ //批量加价
|
|
|
|
|
+ batchAddPriceFun(){
|
|
|
|
|
+ this.dataList.form.type = 'addPrice'
|
|
|
|
|
+ let data = this.$refs['xCrud'].table.data;
|
|
|
|
|
+ data.forEach((ele)=>{
|
|
|
|
|
+ ele.addPrice = Number(this.batchAddPrice) + Number(ele.addPrice)
|
|
|
|
|
+ this.initData.push({id:ele.id,addPrice:ele.addPrice})
|
|
|
|
|
+ })
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ this.dialogFormVisible = false;
|
|
|
|
|
+ // data[0].cost = 999
|
|
|
|
|
+ },
|
|
|
|
|
+ //批量改价
|
|
|
|
|
+ batchAlterFun(){
|
|
|
|
|
+ this.dataList.form.type = 'addPrice'
|
|
|
|
|
+ // batchAlter
|
|
|
|
|
+ let data = this.$refs['xCrud'].table.data;
|
|
|
|
|
+ data.forEach((ele)=>{
|
|
|
|
|
+ ele.addPrice = this.batchAlter
|
|
|
|
|
+ this.initData.push({id:ele.id,addPrice:this.batchAlter})
|
|
|
|
|
+ })
|
|
|
|
|
+ this.dialogFormVisible = false
|
|
|
|
|
+ // console.log(this.$refs['xCrud'].table.data,'1111');
|
|
|
|
|
+ },
|
|
|
changeAllSort(e){
|
|
changeAllSort(e){
|
|
|
- console.log(e,'1111');
|
|
|
|
|
|
|
+ this.dialogFormVisible = true;
|
|
|
|
|
+
|
|
|
},
|
|
},
|
|
|
changeSort (d, type) {
|
|
changeSort (d, type) {
|
|
|
this.dataList.form.type = type
|
|
this.dataList.form.type = type
|