|
@@ -23,7 +23,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
- import {findStoreList} from '@/api/store'
|
|
|
+ import {findStoreList,findAllStore} from '@/api/store'
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
@@ -43,16 +43,36 @@
|
|
|
item.id = item.storeId || item.id
|
|
|
})
|
|
|
this.type = opts.type || 'checkbox'
|
|
|
- // 查询门店
|
|
|
- findStoreList({}).then(res=>{
|
|
|
- if(res.status == 200){
|
|
|
- this.list = res.data || []
|
|
|
- } else {
|
|
|
- this.noDataText = res.message
|
|
|
- }
|
|
|
- })
|
|
|
+
|
|
|
+ if(opts.isAll == '1'){
|
|
|
+ // 所有门店
|
|
|
+ this.findAllStore()
|
|
|
+ }else{
|
|
|
+ // 查询门店
|
|
|
+ this.findStoreList()
|
|
|
+ }
|
|
|
},
|
|
|
methods: {
|
|
|
+ // 查询门店
|
|
|
+ findStoreList(){
|
|
|
+ findStoreList({}).then(res=>{
|
|
|
+ if(res.status == 200){
|
|
|
+ this.list = res.data || []
|
|
|
+ } else {
|
|
|
+ this.noDataText = res.message
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 查询所有门店
|
|
|
+ findAllStore(){
|
|
|
+ findAllStore({}).then(res=>{
|
|
|
+ if(res.status == 200){
|
|
|
+ this.list = res.data || []
|
|
|
+ } else {
|
|
|
+ this.noDataText = res.message
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
// 选中门店,item 返回的是数组
|
|
|
chooseOk(item) {
|
|
|
console.log(item)
|