|
@@ -87,6 +87,11 @@
|
|
|
<el-form-item>
|
|
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
|
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ size="mini"
|
|
|
+ @click="sx"
|
|
|
+ >筛选</el-button>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
|
|
@@ -193,10 +198,40 @@
|
|
|
<el-form-item label="分值id" prop="orderId">
|
|
|
<el-input v-model="form.orderId" placeholder="请输入分值id" />
|
|
|
</el-form-item> -->
|
|
|
- <el-form-item label="分值" prop="orderId">
|
|
|
- <div @click="selectType">{{ orderName ? orderName : '选择分值' }}</div>
|
|
|
-
|
|
|
+ <el-form-item label="一级分类" prop="">
|
|
|
+ <!-- <div @click="selectType">{{ orderName ? orderName : '选择分值' }}</div> -->
|
|
|
+ <el-select v-model="value1" filterable placeholder="请选择" @change="type1" style="width: 100%">
|
|
|
+ <el-option
|
|
|
+ v-for="item in first"
|
|
|
+ :key="item.id"
|
|
|
+ :label="item.typeName"
|
|
|
+ :value="item.id">
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="二级分类" prop="">
|
|
|
+ <!-- <div @click="selectType">{{ orderName ? orderName : '选择分值' }}</div> -->
|
|
|
+ <el-select v-model="value2" filterable placeholder="请选择" @change="type2" style="width: 100%">
|
|
|
+ <el-option
|
|
|
+ v-for="item in second"
|
|
|
+ :key="item.id"
|
|
|
+ :label="item.secondName"
|
|
|
+ :value="item.id">
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
</el-form-item>
|
|
|
+ <el-form-item label="三级分类" prop="">
|
|
|
+ <!-- <div @click="selectType">{{ orderName ? orderName : '选择分值' }}</div> -->
|
|
|
+ <el-select v-model="value3" filterable placeholder="请选择" @change="type33" style="width: 100%">
|
|
|
+ <el-option
|
|
|
+ v-for="item in tertiary"
|
|
|
+ :key="item.id"
|
|
|
+ :label="item.typeId"
|
|
|
+ :value="item.id">
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+
|
|
|
<el-form-item label="时间" prop="collection">
|
|
|
<el-date-picker clearable size="small" style="width: 100%"
|
|
|
v-model="form.collection"
|
|
@@ -244,7 +279,7 @@
|
|
|
<el-button @click="cancel">取 消</el-button>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
- <el-dialog title="分值" :visible.sync="dialogFormVisible">
|
|
|
+ <!-- <el-dialog title="分值" :visible.sync="dialogFormVisible">
|
|
|
<el-form :model="form">
|
|
|
<el-tree :data="data" :props="defaultProps" @node-click="handleNodeClick"></el-tree>
|
|
|
</el-form>
|
|
@@ -252,16 +287,67 @@
|
|
|
<el-button @click="dialogFormVisible = false">取 消</el-button>
|
|
|
<el-button type="primary" @click="typeConfirm">确 定</el-button>
|
|
|
</div>
|
|
|
+ </el-dialog> -->
|
|
|
+ <el-dialog :visible.sync="dialogFormVisible1" title="分类">
|
|
|
+
|
|
|
+ <!-- <el-tree :data="data" :props="defaultProps" @node-click="handleNodeClick"/> -->
|
|
|
+ <div>
|
|
|
+ <div style="margin-bottom:20px">一级分类</div>
|
|
|
+ <el-select v-model="value1" filterable placeholder="请选择" @change="type1">
|
|
|
+ <el-option
|
|
|
+ v-for="item in first"
|
|
|
+ :key="item.id"
|
|
|
+ :label="item.typeName"
|
|
|
+ :value="item.id">
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </div>
|
|
|
+ <div style="margin-top:20px">
|
|
|
+ <div style="margin-bottom:20px">二级分类</div>
|
|
|
+ <el-select v-model="value2" filterable placeholder="请选择" @change="type2">
|
|
|
+ <el-option
|
|
|
+ v-for="item in second"
|
|
|
+ :key="item.id"
|
|
|
+ :label="item.secondName"
|
|
|
+ :value="item.id">
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </div>
|
|
|
+ <div style="margin-top:20px">
|
|
|
+ <div style="margin-bottom:20px">三级分类</div>
|
|
|
+ <el-select v-model="value3" filterable placeholder="请选择" @change="type3">
|
|
|
+ <el-option
|
|
|
+ v-for="item in tertiary"
|
|
|
+ :key="item.id"
|
|
|
+ :label="item.typeId"
|
|
|
+ :value="item.id">
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </div>
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
+ <el-button @click="dialogFormVisible1 = false">取 消</el-button>
|
|
|
+ <el-button type="primary" @click="typeConfirm1">确 定</el-button>
|
|
|
+ </div>
|
|
|
</el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+import { listInfo, getInfo, delInfo, addInfo, updateInfo, exportInfo, clearCache } from '@/api/gubi/info'
|
|
|
+import { listThree, getThree, delThree, addThree, updateThree, exportThree } from '@/api/gubi/three'
|
|
|
+import { listSecond, getSecond, delSecond, addSecond, updateSecond, exportSecond } from '@/api/gubi/second'
|
|
|
import { listPriceHis, getPriceHis, delPriceHis, addPriceHis, updatePriceHis, exportPriceHis } from "@/api/gubi/priceHis";
|
|
|
import { listTransaction, getTransaction, delTransaction, addTransaction, updateTransaction, exportTransaction, typeList } from "@/api/gubi/transaction";
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
+ first: [],
|
|
|
+ second:[],
|
|
|
+ tertiary:[],
|
|
|
+ value1: '',
|
|
|
+ value2: '',
|
|
|
+ value3: '',
|
|
|
+ dialogFormVisible1:false,
|
|
|
defaultProps: {
|
|
|
children: 'children',
|
|
|
label: 'typeName'
|
|
@@ -313,6 +399,46 @@ export default {
|
|
|
this.getList();
|
|
|
},
|
|
|
methods: {
|
|
|
+ typeConfirm1() {
|
|
|
+ this.dialogFormVisible1 = false
|
|
|
+ this.handleQuery()
|
|
|
+ },
|
|
|
+ type1(e){
|
|
|
+ this.value2=''
|
|
|
+ this.value3=''
|
|
|
+ console.log(e)
|
|
|
+ listSecond({
|
|
|
+ page: 1,
|
|
|
+ limit: 100,
|
|
|
+ typeId: e,
|
|
|
+ },).then(response => {
|
|
|
+ this.second = response.data.data.items
|
|
|
+
|
|
|
+ });
|
|
|
+ },
|
|
|
+ type2(e){
|
|
|
+ console.log(e)
|
|
|
+ this.value3=''
|
|
|
+ listThree({
|
|
|
+ page: 1,
|
|
|
+ limit: 100,
|
|
|
+ secondId: e,
|
|
|
+ },).then(response => {
|
|
|
+ this.tertiary = response.data.data.items
|
|
|
+
|
|
|
+ });
|
|
|
+ },
|
|
|
+ type3(e){
|
|
|
+ console.log(e)
|
|
|
+ this.queryParams.orderId = e
|
|
|
+ },
|
|
|
+ type33(e){
|
|
|
+ console.log(e)
|
|
|
+ this.form.orderId = e
|
|
|
+ },
|
|
|
+ sx() {
|
|
|
+ this.dialogFormVisible1 = true
|
|
|
+ },
|
|
|
handleNodeClick(data) {
|
|
|
console.log(data);
|
|
|
this.form.orderId = data.id
|
|
@@ -328,35 +454,38 @@ export default {
|
|
|
/** 查询价格历史列表 */
|
|
|
getList() {
|
|
|
this.loading = true;
|
|
|
+ listInfo().then(response => {
|
|
|
+ this.first = response.data.data.items
|
|
|
+ });
|
|
|
listPriceHis(this.queryParams).then(response => {
|
|
|
this.priceHisList = response.data.data.items
|
|
|
this.total = response.data.data.count
|
|
|
this.loading = false;
|
|
|
});
|
|
|
- typeList().then(response => {
|
|
|
- this.makeData(response.data.data)
|
|
|
- });
|
|
|
- },
|
|
|
- makeData(val) {
|
|
|
- for (let i = 0; i < val.length; i++) {
|
|
|
- if (val[i].children) {
|
|
|
- for (let j = 0; j < val[i].children.length; j++) {
|
|
|
- let _obj = val[i].children[j]
|
|
|
- _obj.typeName = val[i].children[j].secondName
|
|
|
- val[i].children[j] = _obj
|
|
|
- if (val[i].children[j].children) {
|
|
|
- for (let k = 0; k < val[i].children[j].children.length; k++) {
|
|
|
- let _obj1 = val[i].children[j].children[k]
|
|
|
- _obj1.typeName = val[i].children[j].children[k].typeId
|
|
|
- val[i].children[j].children[k] = _obj1
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- this.data = val
|
|
|
- console.log(this.data)
|
|
|
+ // typeList().then(response => {
|
|
|
+ // this.makeData(response.data.data)
|
|
|
+ // });
|
|
|
},
|
|
|
+ // makeData(val) {
|
|
|
+ // for (let i = 0; i < val.length; i++) {
|
|
|
+ // if (val[i].children) {
|
|
|
+ // for (let j = 0; j < val[i].children.length; j++) {
|
|
|
+ // let _obj = val[i].children[j]
|
|
|
+ // _obj.typeName = val[i].children[j].secondName
|
|
|
+ // val[i].children[j] = _obj
|
|
|
+ // if (val[i].children[j].children) {
|
|
|
+ // for (let k = 0; k < val[i].children[j].children.length; k++) {
|
|
|
+ // let _obj1 = val[i].children[j].children[k]
|
|
|
+ // _obj1.typeName = val[i].children[j].children[k].typeId
|
|
|
+ // val[i].children[j].children[k] = _obj1
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // this.data = val
|
|
|
+ // console.log(this.data)
|
|
|
+ // },
|
|
|
// 取消按钮
|
|
|
cancel() {
|
|
|
this.open = false;
|
|
@@ -386,7 +515,9 @@ export default {
|
|
|
},
|
|
|
/** 重置按钮操作 */
|
|
|
resetQuery() {
|
|
|
+ this.queryParams.orderId = '';
|
|
|
this.resetForm("queryForm");
|
|
|
+
|
|
|
this.handleQuery();
|
|
|
},
|
|
|
// 多选框选中数据
|