|
@@ -4,7 +4,7 @@
|
|
|
<uni-nav-bar fixed="true" statusBar="true" left-icon="back" title="搜索" @clickLeft="back">
|
|
<uni-nav-bar fixed="true" statusBar="true" left-icon="back" title="搜索" @clickLeft="back">
|
|
|
<!--右菜单-->
|
|
<!--右菜单-->
|
|
|
<template slot="right">
|
|
<template slot="right">
|
|
|
- <u-button type="success" size="small" class="u-reset-button" @click="$refs.treePicker._show()"
|
|
|
|
|
|
|
+ <u-button type="success" size="small" class="u-reset-button" @click="openTreePicker"
|
|
|
text="选择分类"></u-button>
|
|
text="选择分类"></u-button>
|
|
|
</template>
|
|
</template>
|
|
|
</uni-nav-bar>
|
|
</uni-nav-bar>
|
|
@@ -12,10 +12,10 @@
|
|
|
|
|
|
|
|
<view class="top-wrapper">
|
|
<view class="top-wrapper">
|
|
|
<view class="searchBox rx-bc">
|
|
<view class="searchBox rx-bc">
|
|
|
- <input v-model="searchFrom.keyWord" placeholder="请输入关键字搜索" class="searchInput" />
|
|
|
|
|
|
|
+ <input v-model="keyWord" placeholder="请输入关键字搜索" class="searchInput" />
|
|
|
|
|
|
|
|
<view>
|
|
<view>
|
|
|
- <u-button @click="doSearch" type="success" class="u-reset-button" text="搜索">
|
|
|
|
|
|
|
+ <u-button @click="getList" type="success" class="u-reset-button" text="搜索">
|
|
|
</u-button>
|
|
</u-button>
|
|
|
</view>
|
|
</view>
|
|
|
|
|
|
|
@@ -24,7 +24,7 @@
|
|
|
|
|
|
|
|
<view class="list_box">
|
|
<view class="list_box">
|
|
|
<u-list>
|
|
<u-list>
|
|
|
- <view v-for="(item,index) in 100">
|
|
|
|
|
|
|
+ <view v-for="(item,index) in list">
|
|
|
<view>{{item}}</view>
|
|
<view>{{item}}</view>
|
|
|
</view>
|
|
</view>
|
|
|
</u-list>
|
|
</u-list>
|
|
@@ -44,7 +44,7 @@
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
|
|
|
|
|
- <ba-tree-picker ref="treePicker" key="verify" :multiple="false" @select-change="confirm" title="选择分类"
|
|
|
|
|
|
|
+ <ba-tree-picker ref="treePicker" key="verify" :multiple="false" @select-change="confirm" title="选择分类"
|
|
|
:localdata="classificationList" valueKey="id" textKey="name" childrenKey="children" />
|
|
:localdata="classificationList" valueKey="id" textKey="name" childrenKey="children" />
|
|
|
|
|
|
|
|
</view>
|
|
</view>
|
|
@@ -52,6 +52,10 @@
|
|
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
import baTreePicker from '@/components/ba-tree-picker/ba-tree-picker.vue'
|
|
import baTreePicker from '@/components/ba-tree-picker/ba-tree-picker.vue'
|
|
|
|
|
+ import {
|
|
|
|
|
+ treeByPid,
|
|
|
|
|
+ pageeLedgerMain
|
|
|
|
|
+ } from '@/api/pda/workOrder.js'
|
|
|
export default {
|
|
export default {
|
|
|
components: {
|
|
components: {
|
|
|
baTreePicker
|
|
baTreePicker
|
|
@@ -59,20 +63,60 @@
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
|
|
|
|
|
- searchFrom: {
|
|
|
|
|
- keyWord: null
|
|
|
|
|
- },
|
|
|
|
|
|
|
+ keyWord: null,
|
|
|
|
|
+ categoryLevelId: null,
|
|
|
|
|
+ classificationList: [],
|
|
|
|
|
+ treePickerShow: false,
|
|
|
|
|
+ list: [],
|
|
|
|
|
|
|
|
seletedAll: false, //全选状态
|
|
seletedAll: false, //全选状态
|
|
|
checkListLen: 0,
|
|
checkListLen: 0,
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
|
|
+ onLoad(option) {
|
|
|
|
|
+ this.getTreeList()
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
methods: {
|
|
methods: {
|
|
|
_seletedAll() {
|
|
_seletedAll() {
|
|
|
this.seletedAll = !this.seletedAll
|
|
this.seletedAll = !this.seletedAll
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
- confirm() {},
|
|
|
|
|
|
|
+ openTreePicker() {
|
|
|
|
|
+
|
|
|
|
|
+ this.$refs.treePicker._show()
|
|
|
|
|
+
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+ getTreeList() {
|
|
|
|
|
+ let params = {
|
|
|
|
|
+ ids: [1, 5, 7, 8, 10, 14, ]
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+ treeByPid(params).then(res => {
|
|
|
|
|
+ this.classificationList = res
|
|
|
|
|
+ this.confirm([res[0].id], res[0].name)
|
|
|
|
|
+ })
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+ confirm(id, name) {
|
|
|
|
|
+ this.categoryLevelId = id
|
|
|
|
|
+ this.getList()
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+ getList() {
|
|
|
|
|
+ let param = {
|
|
|
|
|
+ categoryLevelId: this.categoryLevelId,
|
|
|
|
|
+ keyWord: this.keyWord,
|
|
|
|
|
+ pageNum: 1,
|
|
|
|
|
+ size: -1
|
|
|
|
|
+ }
|
|
|
|
|
+ pageeLedgerMain(param).then(res => {
|
|
|
|
|
+ this.list = res.list
|
|
|
|
|
+ })
|
|
|
|
|
+ },
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
</script>
|
|
</script>
|