From 726ac947e3e03c83cfbec36de26582c67d8e40e0 Mon Sep 17 00:00:00 2001 From: dingtalk_umvbsp <m13724205240@163.com> Date: Mon, 30 Jan 2023 17:17:49 +0800 Subject: [PATCH] =?UTF-8?q?=E8=81=94=E8=B0=83=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/request.js | 2 +- pages.js | 1 - pages/home/index.vue | 8 +- pages/massif/add_farming.vue | 43 +++++- pages/massif/collectList.vue | 2 +- pages/massif/mana/farmRecord.vue | 15 +- pages/massif/mana/index.vue | 9 +- pages/massif/mana/plantPlan.vue | 44 ++++-- pages/massif/mana/recovery.vue | 78 +++++++--- pages/massif/plant_info.vue | 9 +- pages/massif/plant_plan.vue | 6 +- pages/purchase/index.vue | 139 ++++++++++++++++++ pages/purchase/newSpecs.vue | 15 +- pages/purchase/specs.vue | 14 ++ router/purchase.js | 11 ++ .../d-form/components/d-form/d-form.vue | 9 +- 16 files changed, 340 insertions(+), 65 deletions(-) create mode 100644 pages/purchase/index.vue diff --git a/common/request.js b/common/request.js index d913056..7b99414 100644 --- a/common/request.js +++ b/common/request.js @@ -4,7 +4,7 @@ export function host(host='default',suffix='/plant_manage'){ return( process.env.NODE_ENV === 'development'?{ default:`http://xvff42.natappfree.cc${suffix}` //陈 - // default:`http://mq3s8b.natappfree.cc${suffix}` //马 + // default:`http://6h8nxd.natappfree.cc${suffix}` //马 }:{ default:`http://qv6mj8.natappfree.cc${suffix}` } diff --git a/pages.js b/pages.js index a6d10b4..29ea2be 100644 --- a/pages.js +++ b/pages.js @@ -27,7 +27,6 @@ module.exports = hot((pagesJson)=>{ color:"#999", selectedColor:"#10C176", backgroundColor:"#fff", - // iconWidth:"35rpx", list:[ {pagePath:"pages/home/index",text:"首页",iconPath: "/static/tab_home.png",selectedIconPath: "/static/tab_home_active.png"}, {pagePath:"pages/massif/index",text:"地块管理",iconPath: "/static/tab_massif.png",selectedIconPath: "/static/tab_massif_active.png"}, diff --git a/pages/home/index.vue b/pages/home/index.vue index bfd9f64..a1e0b4e 100644 --- a/pages/home/index.vue +++ b/pages/home/index.vue @@ -291,7 +291,7 @@ <view class="item meansAgrProd">农资库存</view> <view class="item agrProd">农产品库存</view> </view> - <view class="card stock" style="--c:#ffc353;" @click="$u.route({url:'pages/purchase/apply'})"> + <view class="card stock" style="--c:#ffc353;" @click="$u.route({url:'pages/purchase/index'})"> <view class="title">采购申请</view> <view class="item warehousing">入库管理</view> @@ -340,7 +340,6 @@ import request from '@/common/request.js' }, onLoad() { // this.getMassif() - // this.getPurchase() this.isAdmin && this.getPlantBase() }, onShow(){ @@ -362,11 +361,6 @@ import request from '@/common/request.js' }) } }, - // //获取采购申请数据 - // async getPurchase(){ - // var res=await request("/purchaseMain/purchaseMain/listPlantPurchaseSubByMainId") - // console.log(res,'------------res----------') - // }, //获取基地列表 async getPlantBase(){ var res=await request("/api/plantPlot/getAllPlantBaseInfo",{ diff --git a/pages/massif/add_farming.vue b/pages/massif/add_farming.vue index 182383f..828d268 100644 --- a/pages/massif/add_farming.vue +++ b/pages/massif/add_farming.vue @@ -93,8 +93,8 @@ </d-navbar> <view class="card"> - <view class="plant-dikuaimianji">阳光玫瑰种植1号地块</view> - <view class="plant-batch-add" @click="$u.route({url:'pages/massif/collectList'})"/> + <view class="plant-dikuaimianji">{{massif.plotName}}</view> + <view class="plant-batch-add" @click="toCollectList"/> </view> <view class="card"> @@ -114,16 +114,20 @@ :key="k" v-bind="v" :field="k" - :required="!!rules[k]"/> + :required="!!rules[k]" + :value="[]"/> </u-form> </view> </view> </template> <script> +import request from '@/common/request' export default { data(){ return{ fields:{ + // people:{label:"操作人",}, + // date:{label:"操作日期"}, imgs:{label:"农事图片",type:"upImg"}, intro:{label:"产品介绍",type:"textarea"}, }, @@ -131,12 +135,35 @@ export default { name:"", }, rules:{ - - } + intro:{required:true}, + }, + massif:{} } }, - onLoad(){ - - } + onLoad(options){ + this.getMassifDetail(options.plotId) + }, + methods:{ + async getMassifDetail(id){ + var res=await request("/api/plantPlot/queryById",{ + params:{id} + }) + if(res.statu){ + this.massif=res.data + }else{ + uni.showModal({ + title:"提示", + content:res.msg||"获取地块信息失败!", + showCancel:false, + }) + } + }, + toCollectList(){ + uni.navigateTo({ + url:"/pages/massif/collectList", + event:{ add:()=>{} } + }) + }, + }, } </script> \ No newline at end of file diff --git a/pages/massif/collectList.vue b/pages/massif/collectList.vue index 8d0d7a2..4e1b752 100644 --- a/pages/massif/collectList.vue +++ b/pages/massif/collectList.vue @@ -2,7 +2,7 @@ .container{ min-height:100%; background:#f6f6f6; - padding:30rpx 0; + // padding:30rpx 0; .card{ .name{ diff --git a/pages/massif/mana/farmRecord.vue b/pages/massif/mana/farmRecord.vue index dabdc88..1b1cb96 100644 --- a/pages/massif/mana/farmRecord.vue +++ b/pages/massif/mana/farmRecord.vue @@ -68,7 +68,7 @@ <view class="head"> <image mode="aspectFit" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAXhJREFUOE+dk7FLw1AQxr+LbSyInQuODiIW+hc4iZP/QCfBpXmmUHR26eRopdT0ZRLX7k7FybmgKAUJjrZriTqY2Jy80IQ0aik5eMO7++7H4953hFRYlrWlaZoAcEBEG6rMzG8AboMgkKZpviRbKLo0m81cqVQ6B3BKRLk0eAb6JqIWgDPDMHyVCwHtdnu1UCj0mXn3r8Z0jpnvPc/bbzQaXyHAtm0JwFimOdIwsxRCHFOn09nJ5/OPAFaiYrVaxWAwgOM4i5hT3/crJKVsEdFJUlmr1UKAOouCmS/Jtu0hgO2MgKECfABYywIA8KkALoD1jIB3BXgCUE4DRqMRxuPx3Ahc150bLDM/K8CFMk9SqX6hWCz+mt9kMkGv14vzQRC0qNvtljVNe0h+45J+mBJRJTSSlPKKiMwlG0MZM1tCiHpsZV3X+0SUzcrRPui6rl5yBED75zUBM197nldXexAvU1I8s/YhgD0Am7PaK4A7Zr4RQijjxfEDDjS1T8RMzc4AAAAASUVORK5CYII="/> <text class="title">农资使用情况</text> - <text class="add" @click="$u.route({url:'pages/massif/add_farming'})">+添加农事</text> + <text class="add" @click="toAdd">+添加农事</text> </view> <view class="card"> <view class="name"> @@ -83,10 +83,23 @@ <script> export default { name:"farmRecord", + props:{ + plotId:{ + type:String, + default:"" + } + }, data(){ return{ } + }, + methods:{ + toAdd(){ + uni.navigateTo({ + url:`/pages/massif/add_farming?plotId=${this.plotId}` + }) + } } } </script> \ No newline at end of file diff --git a/pages/massif/mana/index.vue b/pages/massif/mana/index.vue index 9e84348..4fd5021 100644 --- a/pages/massif/mana/index.vue +++ b/pages/massif/mana/index.vue @@ -20,9 +20,9 @@ <u-tabs :list="tabs" :current="tabIndex" activeStyle="color:#10C176;" lineColor="#10C176" lineWidth="50" :scrollable="false" @change="tabIndex=$event.index"/> - <plant-plan v-if="tabIndex==0" :id="plantId"/> - <farmRecord v-else-if="tabIndex==1" /> - <recovery v-else /> + <plant-plan v-if="tabIndex==0" :plotId="plotId" @trigger="tabIndex=$event.tabIndex;plantId=$event.plantId"/> + <farmRecord v-else-if="tabIndex==1" :plotId="plotId"/> + <recovery v-else :plotId="plotId"/> </view> </template> <script> @@ -39,11 +39,12 @@ export default { {name:"农事记录",}, {name:"采收记录",}, ], + plotId:"", plantId:"", } }, onLoad(options){ - this.plantId=options.id + this.plotId=options.id }, onReady(){ /* #ifdef APP-PLUS */ diff --git a/pages/massif/mana/plantPlan.vue b/pages/massif/mana/plantPlan.vue index 46b58c5..a45e7d2 100644 --- a/pages/massif/mana/plantPlan.vue +++ b/pages/massif/mana/plantPlan.vue @@ -19,10 +19,6 @@ min-width:80rpx; text-align: center; } - &/deep/ image{ - color:red; - border-radius: 20rpx!important; - } } &>.detail{ flex-grow: 1; @@ -75,6 +71,14 @@ color:#999; font-size:24rpx; margin-right:auto; + &.over{ + background:#F7F7F7; + border-radius: 8rpx; + height:48rpx; + line-height: 48rpx; + padding:0 20rpx; + margin:0 0 0 auto; + } } button{ margin:0 0 0 20rpx; @@ -93,7 +97,7 @@ <view class="plant_plan"> <view class="card" v-for="(v,k) in list" :key="k"> <view class="info" @click="reDetail(v.id)"> - <u-image :data-type="v.plantType" width="170rpx" height="140rpx" mode="aspectFill" src="https://cdn.uviewui.com/uview/album/1.jpg"> + <u-image :data-type="v.plantType" radius="20rpx" width="170rpx" height="140rpx" mode="aspectFill" src="https://cdn.uviewui.com/uview/album/1.jpg"> <view slot="error" style="font-size: 24rpx;">加载失败</view> </u-image> <view class="detail"> @@ -107,11 +111,15 @@ </view> <view class="date"> <text>本次预估采收时间:{{v.harvestTime}}</text> - <button class="cu-btn" style="--c:255, 196, 87;" @click.stop="finishPlant(v.id)">结束种植</button> - <button class="cu-btn" style="--c:153, 153, 153;" @click.stop="$u.route({url:'pages/massif/plant_info',params:{plantId:v.id,plotId:id}})">采收</button> + <template v-if="v.status==1"> + <button class="cu-btn" style="--c:255, 196, 87;" @click.stop="finishPlant(k)">结束种植</button> + <button class="cu-btn" style="--c:153, 153, 153;" @click.stop="toAdd(v.id)">采收</button> + </template> + <text v-if="v.status==2" class="over">已结束</text> </view> </view> <u-empty v-if="list.length==0" icon="http://cdn.uviewui.com/uview/empty/data.png"/> + <button class="cu-btn round bg-green shadow submit" @click="addPlant">+新增种植计划</button> </view> </template> @@ -120,7 +128,7 @@ import request,{host} from '@/common/request' export default { name:"plantPlan", props:{ - id:{ + plotId:{ type:String, default:"" } @@ -150,7 +158,7 @@ export default { var res=await request('/api/plantPlan/list',{ params: { ...this.searchVal, - plotId: this.id + plotId: this.plotId } }) if(res.statu){ @@ -167,8 +175,8 @@ export default { }, addPlant(){ uni.navigateTo({ - url:`/pages/massif/plant_plan?plotId=${this.id}`, - event:{update:()=> {this.clean();this.search()} } + url:`/pages/massif/plant_plan?plotId=${this.plotId}`, + event:{ update:()=> {this.clean();this.search()} } }) }, reDetail(id){ @@ -178,12 +186,13 @@ export default { }) }, //结束种植 - async finishPlant(plantPlanId){ + async finishPlant(index){ var res=await request("/api/plantPlan/finishPlant",{ - params:{plantPlanId} + params:{plantPlanId:this.list[index].id} }) if(res.statu){ - + uni.showToast({title:"结束成功!",duration:1500}) + this.list[index].status=2 }else{ uni.showModal({ title:"提示", @@ -192,6 +201,13 @@ export default { }) } }, + //跳转新增采收页面 + toAdd(plantId){ + uni.navigateTo({ + url:`/pages/massif/plant_info?plantId=${plantId}&plotId=${this.plotId}`, + event:{ toRecovery:()=> {this.$emit("trigger",{tabIndex:2,plantId})} } + }) + } } } </script> \ No newline at end of file diff --git a/pages/massif/mana/recovery.vue b/pages/massif/mana/recovery.vue index 2b8efeb..5b1f240 100644 --- a/pages/massif/mana/recovery.vue +++ b/pages/massif/mana/recovery.vue @@ -13,7 +13,7 @@ background:#fff; height:48rpx; font-size:24rpx; - color:#999; + color:#333; border-radius: 8rpx; padding:0 10rpx; min-width:226rpx; @@ -21,6 +21,9 @@ &:before{ transform: rotate(90deg); } + &.noDate{ + color:#999; + } } &:nth-child(2){ color:#999; @@ -30,10 +33,8 @@ } .card{ display:flex; - image{ + .u-transition{ flex-shrink: 0; - width:90rpx; - height:90rpx; margin-right:20rpx; } .detail{ @@ -59,6 +60,9 @@ .info{ font-size: 24rpx; color:#999; + text:nth-child(2){ + margin-left:20rpx; + } } } } @@ -67,27 +71,37 @@ <template> <view class="recovery"> <view class="dateRange"> - <text class="plant-youbian">请选择开始时间</text> + <text class="plant-youbian" :class="{noDate:!searchVal.startTime}" @click="dateType='startTime';show=true">{{searchVal.startTime||"请选择开始时间"}}</text> <text>~</text> - <text class="plant-youbian">请选择结束时间</text> + <text class="plant-youbian" :class="{noDate:!searchVal.endTime}" @click="dateType='endTime';show=true">{{searchVal.endTime||"请选择结束时间"}}</text> </view> - <view class="card"> - <image mode="aspectFill" src="/static/logo.png"/> + <view class="card" v-for="(v,k) in list" :key="k"> + <u-image width="90rpx" height="90rpx" radius="6rpx" mode="aspectFill" :src="`${host}/${v.images}`"/> <view class="detail"> <view class="name"> - <text>精品小黄瓜</text> - <text data-unit="kg">200</text></view> + <text>{{v.plantName}}</text> + <text data-unit="kg">{{v.harvestNum}}</text></view> <view class="info"> - <text>负责人:张召忠</text> - <text>采收时间:2022-12-12</text> + <text>负责人:{{v.principal}}</text> + <text>采收时间:{{v.harvestTime}}</text> </view> </view> </view> + <u-empty v-if="list.length==0" icon="http://cdn.uviewui.com/uview/empty/data.png"/> + + <u-datetime-picker + :show="show" + mode="date" + closeOnClickOverlay + @close="show=false" + @cancel="show=false" + :value="date" + @confirm="searchVal[dateType]=new Date($event.value).format('yyyy-MM-dd');show=false"/> </view> </template> <script> -import request from '@/common/request' +import request,{host} from '@/common/request' export default { name:"recovery", props:{ @@ -98,14 +112,23 @@ export default { }, data(){ return{ + show:false, + dateType:"startTime", + host:host(undefined,"/plant_manage/sys/common/static"), searchVal:{ - plotId:"", plantScheduleId:"",// 种植计划id - pageNo:"", - pageSize:"", + pageNo:1, + pageSize:5, startTime:"", endTime:"", - } + }, + list:[], + total:0, + } + }, + computed:{ + date(){ + return new Date().format('yyyy-MM-dd') } }, created(){ @@ -113,9 +136,24 @@ export default { }, methods:{ async search(){ - var res=await request("/api/plantHarvest/list",{ - params:this.searchVal - }) + if(this.total==0||this.list.length<this.total){ + var res=await request("/api/plantHarvest/list",{ + params:{ + ...this.searchVal, + plotId:this.plotId + } + }) + if(res.statu){ + this.list=this.list.concat(res.data.records) + this.total=res.data.total + }else{ + uni.showModal({ + title:"提示", + content:res.msg||"获取采收记录列表失败!", + showCancel:false, + }) + } + } }, } } diff --git a/pages/massif/plant_info.vue b/pages/massif/plant_info.vue index 1c3ebf8..0ab9873 100644 --- a/pages/massif/plant_info.vue +++ b/pages/massif/plant_info.vue @@ -19,7 +19,7 @@ :field="k" :required="!!rules[k]" :value="/^select$/.test(v.type)?fields[k].value:formData[k]" - @select="fields[k].value=$event.indexs;formData[k]=$event.value[0].value" + @select="fields[k].value=$event.value.map(v=>v.value);formData[k]=$event.value[0].value" @input="formData[k]=$event"/> </u-form> </view> @@ -51,10 +51,12 @@ export default { principal:{required:true, message:"负责人必填!", trigger:"blur"}, harvestTime:{required:true, message:"采收时间必填!", trigger:"blur"}, status:{required:true, message:"采收状态必填!", trigger:"blur"}, - } + }, + eventChannel:null, } }, onLoad(options){ + this.eventChannel=this.getOpenerEventChannel() this.formData.plantSchedulId=options.plantId this.formData.plotId=options.plotId this.init() @@ -80,7 +82,8 @@ export default { body: this.formData }) if(res.statu){ - + this.eventChannel('toRecovery') + uni.navigateBack() }else{ uni.showModal({ title:"提示", diff --git a/pages/massif/plant_plan.vue b/pages/massif/plant_plan.vue index 55a420e..2ee3bf1 100644 --- a/pages/massif/plant_plan.vue +++ b/pages/massif/plant_plan.vue @@ -75,7 +75,11 @@ export default { plantStandard: {required:true, message:"种植标准必填!", trigger:"blur"}, plantBatch: {required:true, message:"种植批次号必填!", trigger:"blur"}, principal: {required:true, message:"负责人必填!", trigger:"blur"}, - principalId: {required:true, message:"负责人身份证必填!", trigger:"blur"}, + principalId: {required:true, validator(rule,val,call){ + if(!val)call(new Error("负责人身份证必填!")); + else if(!/^[1-9]\d{5}(18|19|20)\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/.test(val))call(new Error("请输入正确身份证格式!")); + else call(); + }, trigger:"blur"}, }, eventChannel:null, } diff --git a/pages/purchase/index.vue b/pages/purchase/index.vue new file mode 100644 index 0000000..9d577a3 --- /dev/null +++ b/pages/purchase/index.vue @@ -0,0 +1,139 @@ +<style lang="scss"> + .container{ + min-height: 100%; + background:#f6f6f6; + // padding:30rpx 0; + + scroll-view{ + flex-grow: 1; + height:1rpx; + border:1rpx solid transparent; + .card{ + margin-top:0; + &>.info{ + display:flex; + align-items: center; + margin-bottom:20rpx; + text{ + &:first-child{ + font-size:20rpx; + color:#fff; + background:#10C176; + border-radius: 0 20rpx 0 20rpx; + height:40rpx; + width:80rpx; + line-height: 40rpx; + text-align: center; + margin-right:16rpx; + } + &:nth-child(2){ + font-weight: bold; + } + &:nth-child(3){ + color:#999; + font-size: 20rpx; + margin-left:6rpx; + } + } + } + &>.name{ + text{ + &:first-child{ + color:#FBA83C; + } + &:nth-child(2){ + color:#999; + margin-left:22rpx; + } + } + } + &>.data{ + display:flex; + align-items: center; + justify-content: space-between; + border-top:2rpx solid #D8D8D8; + margin-top:20rpx; + padding-top:16rpx; + text{ + &:first-child{ + color:#999; + font-size:24rpx; + } + &:nth-child(2){ + font-weight: bold; + &:after{ + content:"("attr(data-unit)")"; + font-weight: normal; + margin-left:5rpx; + } + } + } + } + } + } + } +</style> +<template> + <view class="container flex"> + <d-search v-model="searchVal.baseName" @search="clean();search()"/> + + <scroll-view scroll-y > + <view class="card" v-for="(v,k) in list" :key="k"> + <view class="info"> + <text>化肥</text> <text>中量元素水溶肥</text> <text>(100kg/袋)</text> + </view> + <view class="name"> + <text>微量元素肥</text> <text>云南云天化股份有限公司</text> + </view> + <view class="data"> + <text>采购时间:{{v.applicantTime}}</text> <text data-unit="共200kg">2袋</text> + </view> + </view> + <u-empty v-if="list.length==0" icon="http://cdn.uviewui.com/uview/empty/data.png"/> + </scroll-view> + </view> +</template> +<script> +import request from '@/common/request' +export default { + data(){ + return{ + searchVal:{ + pageNo:1, + pageSize:5, + companyId: this.$store.getters['userInfo'].companyId + }, + list:[], + total:0, + } + }, + onLoad(){ + this.search() + }, + methods:{ + clean(){ + this.list=[] + this.total=0 + this.searchVal.pageNo=1 + }, + async search(){ + if(this.total==0||this.list.length<this.total){ + var res=await request("/api/purchase/purchaseList",{ + methods:"post", + body: this.searchVal + }) + if(res.statu){ + this.list=this.list.concat(res.data.records) + this.total=res.data.total + }else{ + uni.showModal({ + title:"提示", + content:res.msg||"获取采购列表失败!", + showCancel:false, + }) + } + } + }, + } +} +</script> \ No newline at end of file diff --git a/pages/purchase/newSpecs.vue b/pages/purchase/newSpecs.vue index de62a72..48445ae 100644 --- a/pages/purchase/newSpecs.vue +++ b/pages/purchase/newSpecs.vue @@ -64,10 +64,23 @@ <view class="title_mast">预警值</view> <view class="input"><input placeholder="请输入预警值"/><text>kg</text></view> </view> + + <button class="cu-btn round bg-green shadow submit">确定</button> </view> </template> <script> +import request from '@/common/request' export default { - + data(){ + return{ + + } + }, + onLoad(){}, + methods:{ + async init(){ + var res=await request("") + } + }, } </script> \ No newline at end of file diff --git a/pages/purchase/specs.vue b/pages/purchase/specs.vue index ef322f3..231225e 100644 --- a/pages/purchase/specs.vue +++ b/pages/purchase/specs.vue @@ -155,6 +155,7 @@ export default{ data(){ return{ purchase:null, + specList:[], } }, onLoad(options){ @@ -174,6 +175,19 @@ export default{ showCancel:false, }) } + + var res=await request("/api/goods/queryGoodsSpecification",{ + params:{goodsName:this.purchase.goodsName} + }) + if(res.statu){ + this.specList=res.data.map(v=>({label:v.goodsSpecification,value:v.id})) + }else{ + uni.showModal({ + title:"提示", + content:res.msg||"获取规格选项失败!", + showCancel:false, + }) + } }, } } diff --git a/router/purchase.js b/router/purchase.js index 765eb6d..79273ba 100644 --- a/router/purchase.js +++ b/router/purchase.js @@ -1,4 +1,15 @@ module.exports=[ + { + path:"pages/purchase/index", + style:{ + navigationBarTitleText:"采购管理", + navigationBarBackgroundColor:"#10C176", + navigationBarTextStyle:"white", + "app-plus":{ + titleNView:true + } + } + }, { path:"pages/purchase/apply", style:{ diff --git a/uni_modules/d-form/components/d-form/d-form.vue b/uni_modules/d-form/components/d-form/d-form.vue index 6153649..e69da1c 100644 --- a/uni_modules/d-form/components/d-form/d-form.vue +++ b/uni_modules/d-form/components/d-form/d-form.vue @@ -133,7 +133,10 @@ } &/deep/ { .u-form-item__body__left__content{ - margin-left:20rpx; + .u-form-item__body__left__content__required{ + position:initial; + margin-right:4rpx; + } } .u-form-item__body__right__message{ margin-left:0!important; @@ -377,8 +380,8 @@ import {dataType} from 'black-knight/lib/config/tools' this.$emit('imgs',this.imgs.map(v=>({saved:v.url,unsaved:v.tempUrl})[v.type]).join(',')) }, pickerChange(e){ - if(e.value[e.columnIndex].hasOwnProperty('children')){ - this.$refs.picker.setColumnValues(e.columnIndex+1,e.value[0].children||[]) + if(dataType(e.value[e.columnIndex].children, 'array')){ + this.$refs.picker.setColumnValues(e.columnIndex+1,e.value[0].children) } }, },