|
@@ -218,19 +218,42 @@
|
|
<!-- 添加或修改交易记录对话框 -->
|
|
<!-- 添加或修改交易记录对话框 -->
|
|
<el-dialog :title="title" :visible.sync="open" width="500px">
|
|
<el-dialog :title="title" :visible.sync="open" width="500px">
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
|
- <!-- <el-form-item label="" prop="companyId">
|
|
|
|
- <el-input v-model="form.companyId" placeholder="请输入" />
|
|
|
|
- </el-form-item> -->
|
|
|
|
- <el-form-item label="分值" prop="orderId">
|
|
|
|
- <div @click="selectType">{{ orderName ? orderName : '选择分值' }}</div>
|
|
|
|
- <!-- <el-select v-model="form.orderId" clearable style="width: 100%" class="filter-item" placeholder="请选择分值" >
|
|
|
|
- <el-option v-for="(item,index) in threeList" :key="index" :label="item.typeId" :value="item.id" />
|
|
|
|
- </el-select> -->
|
|
|
|
- <!-- <el-input v-model="form.orderId" placeholder="请输入分值id" /> -->
|
|
|
|
|
|
+ <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="grade">
|
|
|
|
+ <el-input v-model="form.grade" placeholder="请输入名称" />
|
|
</el-form-item>
|
|
</el-form-item>
|
|
- <!-- <el-form-item label="分值图片" prop="number">
|
|
|
|
- <img v-for="item in urlPath" :src="item" width="40">
|
|
|
|
- </el-form-item> -->
|
|
|
|
<el-form-item label="类目图片" prop="urlPath">
|
|
<el-form-item label="类目图片" prop="urlPath">
|
|
<el-upload
|
|
<el-upload
|
|
:action="uploadPath"
|
|
:action="uploadPath"
|
|
@@ -250,9 +273,6 @@
|
|
<el-form-item label="编号" prop="number">
|
|
<el-form-item label="编号" prop="number">
|
|
<el-input v-model="form.number" placeholder="请输入编号" />
|
|
<el-input v-model="form.number" placeholder="请输入编号" />
|
|
</el-form-item>
|
|
</el-form-item>
|
|
- <el-form-item label="分值等级" prop="grade">
|
|
|
|
- <el-input v-model="form.grade" placeholder="请输入分值等级" />
|
|
|
|
- </el-form-item>
|
|
|
|
<el-form-item label="时间" prop="collection">
|
|
<el-form-item label="时间" prop="collection">
|
|
<el-date-picker
|
|
<el-date-picker
|
|
v-model="form.collection"
|
|
v-model="form.collection"
|
|
@@ -313,8 +333,39 @@
|
|
</div>
|
|
</div>
|
|
</el-dialog>
|
|
</el-dialog>
|
|
<el-dialog :visible.sync="dialogFormVisible1" title="分类">
|
|
<el-dialog :visible.sync="dialogFormVisible1" title="分类">
|
|
- <el-tree :data="data" :props="defaultProps" @node-click="handleNodeClick1"/>
|
|
|
|
-
|
|
|
|
|
|
+ <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">
|
|
<div slot="footer" class="dialog-footer">
|
|
<el-button @click="dialogFormVisible1 = false">取 消</el-button>
|
|
<el-button @click="dialogFormVisible1 = false">取 消</el-button>
|
|
<el-button type="primary" @click="typeConfirm1">确 定</el-button>
|
|
<el-button type="primary" @click="typeConfirm1">确 定</el-button>
|
|
@@ -326,11 +377,19 @@
|
|
<script>
|
|
<script>
|
|
import { uploadPath } from '@/api/storage'
|
|
import { uploadPath } from '@/api/storage'
|
|
import { getToken } from '@/utils/auth'
|
|
import { getToken } from '@/utils/auth'
|
|
|
|
+import { listInfo, getInfo, delInfo, addInfo, updateInfo, exportInfo, clearCache } from '@/api/gubi/info'
|
|
|
|
+import { listSecond, getSecond, delSecond, addSecond, updateSecond, exportSecond } from '@/api/gubi/second'
|
|
import { listTransaction, getTransaction, delTransaction, addTransaction, updateTransaction, exportTransaction, typeList } from '@/api/gubi/transaction'
|
|
import { listTransaction, getTransaction, delTransaction, addTransaction, updateTransaction, exportTransaction, typeList } from '@/api/gubi/transaction'
|
|
import { listThree, getThree, delThree, addThree, updateThree, exportThree } from '@/api/gubi/three'
|
|
import { listThree, getThree, delThree, addThree, updateThree, exportThree } from '@/api/gubi/three'
|
|
export default {
|
|
export default {
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
|
|
+ first: [],
|
|
|
|
+ second:[],
|
|
|
|
+ tertiary:[],
|
|
|
|
+ value1: '',
|
|
|
|
+ value2: '',
|
|
|
|
+ value3: '',
|
|
dialogFormVisible1: false,
|
|
dialogFormVisible1: false,
|
|
imgsFileList: [],
|
|
imgsFileList: [],
|
|
uploadPath,
|
|
uploadPath,
|
|
@@ -454,9 +513,45 @@ export default {
|
|
selectType() {
|
|
selectType() {
|
|
this.dialogFormVisible = true
|
|
this.dialogFormVisible = true
|
|
},
|
|
},
|
|
|
|
+ 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
|
|
|
|
+ },
|
|
/** 查询交易记录列表 */
|
|
/** 查询交易记录列表 */
|
|
getList() {
|
|
getList() {
|
|
this.loading = true
|
|
this.loading = true
|
|
|
|
+ listInfo().then(response => {
|
|
|
|
+ this.first = response.data.data.items
|
|
|
|
+ });
|
|
listTransaction(this.queryParams).then(response => {
|
|
listTransaction(this.queryParams).then(response => {
|
|
this.transactionList = response.data.data.items
|
|
this.transactionList = response.data.data.items
|
|
for (let i = 0; i < this.transactionList.length; i++) {
|
|
for (let i = 0; i < this.transactionList.length; i++) {
|
|
@@ -469,40 +564,7 @@ export default {
|
|
this.total = response.data.data.count
|
|
this.total = response.data.data.count
|
|
this.loading = false
|
|
this.loading = false
|
|
})
|
|
})
|
|
- typeList().then(response => {
|
|
|
|
- this.makeData(response.data.data)
|
|
|
|
|
|
|
|
- // this.threeList = response.data.data.items
|
|
|
|
- // for(let i =0;i<this.threeList.length;i++){
|
|
|
|
- // if(this.threeList[i].urlPath){
|
|
|
|
- // this.threeList[i].urlPath = this.threeList[i].urlPath.split(',')
|
|
|
|
- // }else{
|
|
|
|
- // this.threeList[i].urlPath=[]
|
|
|
|
- // }
|
|
|
|
- // }
|
|
|
|
- // this.total = response.data.data.count
|
|
|
|
- // this.loading = false;
|
|
|
|
- })
|
|
|
|
- },
|
|
|
|
- makeData(val) {
|
|
|
|
- for (let i = 0; i < val.length; i++) {
|
|
|
|
- if (val[i].children) {
|
|
|
|
- for (let j = 0; j < val[i].children.length; j++) {
|
|
|
|
- const _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++) {
|
|
|
|
- const _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() {
|
|
cancel() {
|
|
@@ -536,6 +598,7 @@ export default {
|
|
},
|
|
},
|
|
/** 重置按钮操作 */
|
|
/** 重置按钮操作 */
|
|
resetQuery() {
|
|
resetQuery() {
|
|
|
|
+ this.queryParams.orderId = '';
|
|
this.resetForm('queryForm')
|
|
this.resetForm('queryForm')
|
|
this.handleQuery()
|
|
this.handleQuery()
|
|
},
|
|
},
|