|
@@ -2,20 +2,20 @@
|
|
|
<view class="wrap">
|
|
|
<view class='title'>仓库管理</view>
|
|
|
<view class="dropdown">
|
|
|
- <view class="left" @click='show1=true'>
|
|
|
+ <view class="left" @click='show1=true'>
|
|
|
<view>{{warehouseName}}</view>
|
|
|
<u-icon name="arrow-right" color=""></u-icon>
|
|
|
- <u-select v-model="show1" :default-value='[0]' :list="warehouseList" @confirm="confirmWarehouse">
|
|
|
- </u-select>
|
|
|
+ <u-picker @confirm="warehousechange" range-key='warehouseName' mode="selector" v-model="show1"
|
|
|
+ :range="warehouseList"></u-picker>
|
|
|
</view>
|
|
|
- <view class="right" @click='show2=true'>
|
|
|
- <view>{{positionName}}</view>
|
|
|
+ <view class="right" @click='show2=true'>
|
|
|
+ <view>{{binNumber}}</view>
|
|
|
<u-icon name="arrow-right" color=""></u-icon>
|
|
|
- <u-select v-model="show2" :default-value='[0]' :list="positionList" @confirm="confirmPositon">
|
|
|
- </u-select>
|
|
|
+ <u-picker @confirm="warehouseCWchange" range-key='binNumber' mode="selector" v-model="show2"
|
|
|
+ :range="warehouseCWList"></u-picker>
|
|
|
</view>
|
|
|
</view>
|
|
|
-
|
|
|
+
|
|
|
<view class="cu-list grid" :class="['col-' + gridCol,gridBorder?'':'no-border']">
|
|
|
<view class="cu-item" v-for="(item,index) in gridList" :key="index" @click="gridClick(item, index)"
|
|
|
v-if="index<gridCol*2">
|
|
@@ -26,35 +26,30 @@
|
|
|
<text>{{item.name}}</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
+ <u-modal v-model="isShowAlert" confirm-color='#22C572' confirm-text='立即开通' title='您尚未开通ERP业务'
|
|
|
+ :content="content"></u-modal>
|
|
|
</view>
|
|
|
</template>
|
|
|
<script>
|
|
|
import {
|
|
|
mapState
|
|
|
} from 'vuex';
|
|
|
-
|
|
|
+import helper from '@/common/helper.js';
|
|
|
export default {
|
|
|
components: {
|
|
|
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
- show1:false,
|
|
|
- show2:false,
|
|
|
- warehouseName: '鲅鱼圈一号库',
|
|
|
- positionName: '102仓位',
|
|
|
- warehouseList: [
|
|
|
- {
|
|
|
- "label": '1',
|
|
|
- "value": '1'
|
|
|
- }
|
|
|
- ],
|
|
|
- positionList: [
|
|
|
- {
|
|
|
- "label": '102仓位',
|
|
|
- "value": '1'
|
|
|
- }
|
|
|
- ],
|
|
|
+ show1: false,
|
|
|
+ show2: false,
|
|
|
+ isShowAlert: false,
|
|
|
+ content: '易粮易运ERP系统包含合同管理、仓库管理、运输管理、结算管理等多个模块,可为粮企提供粮食贸易的全流程服务,平台诚邀您的加入。',
|
|
|
+ warehouseName: '',
|
|
|
+ binNumber: '',
|
|
|
+ compId:'',
|
|
|
+ warehouseList: [],
|
|
|
+ warehouseCWList:[],
|
|
|
gridCol: 4,
|
|
|
gridBorder: false,
|
|
|
gridList: [{
|
|
@@ -116,7 +111,7 @@
|
|
|
},
|
|
|
|
|
|
onLoad() {
|
|
|
-
|
|
|
+ this.init()
|
|
|
},
|
|
|
// #ifndef MP
|
|
|
onNavigationBarButtonTap(e) {
|
|
@@ -162,7 +157,6 @@
|
|
|
})
|
|
|
}
|
|
|
})
|
|
|
- console.log("hasLogin", this.hasLogin)
|
|
|
},
|
|
|
methods: {
|
|
|
/**
|
|
@@ -197,14 +191,53 @@
|
|
|
})
|
|
|
} else {
|
|
|
if (item.url) {
|
|
|
+ helper.erpWarehouse = {
|
|
|
+ warehouseName:this.warehouseName,
|
|
|
+ binNumber:this.binNumber,
|
|
|
+ compId:this.compId
|
|
|
+
|
|
|
+ }
|
|
|
uni.navigateTo({
|
|
|
url: item.url
|
|
|
})
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
- confirmWarehouse(){},
|
|
|
- confirmPositon(){}
|
|
|
+ confirmWarehouse() {},
|
|
|
+ confirmPositon() {},
|
|
|
+ init() {
|
|
|
+ console.log(this.userInfo)
|
|
|
+ this.$api.doRequest('get', '/warehouseBaseInfo/selectWarehouseSelf', {
|
|
|
+ compId: '',
|
|
|
+ }).then(res => {
|
|
|
+ if (res.data.data) {
|
|
|
+ console.log('res',res.data.data)
|
|
|
+ if (res.data.data.length == 0) {
|
|
|
+ this.isShowAlert = true
|
|
|
+ } else {
|
|
|
+ this.warehouseName = res.data.data[0].warehouseName
|
|
|
+ this.warehouseList = res.data.data;
|
|
|
+ this.compId = res.data.data[0].compId
|
|
|
+ this.binNumber = res.data.data[0].positionInfos[0].binNumber
|
|
|
+ this.warehouseCWList = res.data.data[0].positionInfos
|
|
|
+ console.log('this.warehouseCWList',this.warehouseCWList)
|
|
|
+ // this.makeBinNumber()
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ makeBinNumber(){
|
|
|
+
|
|
|
+ },
|
|
|
+ warehousechange(e) {
|
|
|
+ this.warehouseName = this.warehouseList[e[0]].warehouseName
|
|
|
+ this.compId = this.warehouseList[e[0]].compId
|
|
|
+ this.warehouseCWList = this.warehouseList[e[0]].positionInfos
|
|
|
+ console.log(e)
|
|
|
+ },
|
|
|
+ warehouseCWchange(e){
|
|
|
+ this.binNumber = this.warehouseCWList[e[0]].binNumber
|
|
|
+ }
|
|
|
|
|
|
}
|
|
|
}
|
|
@@ -300,11 +333,14 @@
|
|
|
top: 4px;
|
|
|
margin-right: 6px;
|
|
|
}
|
|
|
- .dropdown{
|
|
|
+
|
|
|
+ .dropdown {
|
|
|
display: flex;
|
|
|
- margin:20rpx 0;
|
|
|
+ margin: 20rpx 0;
|
|
|
justify-content: space-between;
|
|
|
- .left,.right{
|
|
|
+
|
|
|
+ .left,
|
|
|
+ .right {
|
|
|
display: flex;
|
|
|
}
|
|
|
}
|