Commit 0179cf7f authored by 何远江's avatar 何远江

添加工厂别选择,增加仓位选择。

parent 24ad5a69
<template>
<view class="factoryBox">
<zxz-uni-data-select filterable v-model="warehouseCode" dataKey="label" placeholder="请选择仓库别" dataValue="value"
:localdata="warehouseData" @change='onWarehouseChange' />
</view>
</template>
<script>
export default {
model: {
prop: 'value',
event: 'update'
},
props: {
value: {
type: String,
defualt: ''
}
},
data() {
return {
warehouseData: []
}
},
computed: {
warehouseCode: {
get() {
return this.value
},
set(v) {
this.$emit('update', v)
}
}
},
created() {
this.getDepotLists()
},
methods: {
onWarehouseChange(e) {
this.$emit('change', e);
},
getDepotLists() {
this.$u.api.sapApi
.sapDict({
FIELDNAME: 'T001L'
})
.then((res) => {
if (res) {
res.forEach((ele) => {
ele.label = ele.LGORT + "-" + ele.LGOBE;
ele.value = ele.LGORT
});
this.warehouseData = res;
} else {
this.warehouseData = [];
}
});
},
}
}
</script>
<style lang="scss">
.factoryBox {
padding: 10rpx 20rpx 0;
.item-select {
margin-bottom: 20rpx;
}
}
</style>
<template> <template>
<view class="homePage" :style="'height:' + screenHeight + 'px;'"> <view class="homePage" :style="'height:' + screenHeight + 'px;'">
<view class="title">广州市宝绅科技应用</view> <view class="title">
<view class="lines"></view> <text>工厂别:</text>
<view class="boxs"> <zxz-uni-data-select :clear='false' class="item-select" filterable v-model="factoryCode" placeholder="请选择工厂"
<uni-section v-for="(item, index) in tableData" :key="index" :title="item.title" type="line"> dataKey="label" dataValue="value" :localdata="factoryData" @change="factoryChange"/>
<u-row gutter="10"> </view>
<u-col v-for="(v, i) in item.list" :key="i" span="3"> <view class="lines"></view>
<navigator :url="v.url" open-type="navigate"> <view class="boxs">
<view class="demo-layout"> <uni-section v-for="(item, index) in tableData" :key="index" :title="item.title" type="line">
<u-image :src="v.src" width="100rpx" height="100rpx"></u-image> <u-row gutter="10">
<text>{{ v.text }}</text> <u-col v-for="(v, i) in item.list" :key="i" span="3">
</view> <navigator :url="v.url" open-type="navigate">
</navigator> <view class="demo-layout">
</u-col> <u-image :src="v.src" width="100rpx" height="100rpx"></u-image>
</u-row> <text>{{ v.text }}</text>
</uni-section> </view>
</view> </navigator>
</view> </u-col>
</template> </u-row>
</uni-section>
<script> </view>
export default { </view>
data() { </template>
return {
screenHeight: 0, <script>
src: require('@/static/images/cgrk.png'), export default {
tableData: [ data() {
{ return {
title: '仓库扫描作业', screenHeight: 0,
list: [ src: require('@/static/images/cgrk.png'),
{ factoryData: [{
src: require('@/static/images/cgrk.png'), label: '1000 - 广州市宝绅科技有限公司',
text: '采购入库', value: '1000'
url: '/pages/purchaseStorage/purchaseStorage' },
}, {
{ label: '1010 - 广州市宝绅科技有限公司RFID工厂',
src: require('@/static/images/cgrk.png'), value: '1010'
text: '采购下架', },
url: '/pages/purchase/purchaseRemove' ],
}, tableData: [{
{ title: '仓库扫描作业',
src: require('@/static/images/cgrk.png'), list: [{
text: '质量异常下架', src: require('@/static/images/cgrk.png'),
url: '/pages/abnormal/abnormalRemove' text: '采购入库',
}, url: '/pages/purchaseStorage/purchaseStorage'
{ },
src: require('@/static/images/fclyk.png'), {
text: '仓位调拨', src: require('@/static/images/cgrk.png'),
url: '/pages/positionTansfer/positionTansfer' text: '采购下架',
}, url: '/pages/purchase/purchaseRemove'
{ },
src: require('@/static/images/kglrk.png'), {
text: '完工入库', src: require('@/static/images/cgrk.png'),
url: '/pages/confirComplete/confirComplete' text: '质量异常下架',
}, url: '/pages/abnormal/abnormalRemove'
{ },
src: require('@/static/images/qtck.png'), {
text: '库存盘点', src: require('@/static/images/fclyk.png'),
url: '/pages/inventoryCounting/inventoryCounting' text: '仓位调拨',
}, url: '/pages/positionTansfer/positionTansfer'
{ },
src: require('@/static/images/scfl.png'), {
text: '生产发料', src: require('@/static/images/kglrk.png'),
url: '/pages/productionIssuance/productionIssuance' text: '完工入库',
}, url: '/pages/confirComplete/confirComplete'
{ },
src: require('@/static/images/xsth.png'), {
text: '销售退货', src: require('@/static/images/qtck.png'),
url: '/pages/salesReturns/salesReturns' text: '库存盘点',
}, url: '/pages/inventoryCounting/inventoryCounting'
{ },
src: require('@/static/images/sctl.png'), {
text: '生产退料', src: require('@/static/images/scfl.png'),
url: '/pages/produceReturn/produceReturn' text: '生产发料',
}, url: '/pages/productionIssuance/productionIssuance'
{ },
src: require('@/static/images/wwfl.png'), {
text: '委外发料', src: require('@/static/images/xsth.png'),
url: '/pages/outsourcedMaterial/outsourcedMaterial' text: '销售退货',
}, url: '/pages/salesReturns/salesReturns'
{ },
src: require('@/static/images/wwfl.png'), {
text: '委外退料', src: require('@/static/images/sctl.png'),
url: '/pages/outsourcedReturn/outsourcedReturn' text: '生产退料',
}, url: '/pages/produceReturn/produceReturn'
{ },
src: require('@/static/images/xsck.png'), {
text: '销售拣货', src: require('@/static/images/wwfl.png'),
url: '/pages/salesOutbound/salesOutbound' text: '委外发料',
}, url: '/pages/outsourcedMaterial/outsourcedMaterial'
{ },
src: require('@/static/images/xsck.png'), {
text: '装箱', src: require('@/static/images/wwfl.png'),
url: '/pages/packing/packing' text: '委外退料',
}, url: '/pages/outsourcedReturn/outsourcedReturn'
{ },
src: require('@/static/images/xsck.png'), {
text: '发货过账', src: require('@/static/images/xsck.png'),
url: '/pages/posting/posting' text: '销售拣货',
}, url: '/pages/salesOutbound/salesOutbound'
{ },
src: require('@/static/images/xsck.png'), {
text: '反冲料移库', src: require('@/static/images/xsck.png'),
url: '/pages/recoil/recoilMaterial' text: '装箱',
}, url: '/pages/packing/packing'
] },
} {
] src: require('@/static/images/xsck.png'),
}; text: '发货过账',
}, url: '/pages/posting/posting'
created() { },
this.screenHeight = uni.getSystemInfoSync().screenHeight; {
}, src: require('@/static/images/xsck.png'),
methods: { text: '反冲料移库',
handleClick(v) { url: '/pages/recoil/recoilMaterial'
uni.nav; },
} ]
} }]
}; };
</script> },
computed: {
<style lang="scss" scoped> factoryCode: {
.homePage { get() {
background: #fff; return this.vuex_user_factory || 1000
.title { },
background: #fff; set(e) {
padding-top: 20rpx; this.$u.vuex('vuex_user_factory', e)
height: 60rpx; }
font-size: 28rpx; }
line-height: 40rpx; },
padding-left: 32rpx; created() {
font-weight: 600; this.screenHeight = uni.getSystemInfoSync().screenHeight;
} },
.lines { methods: {
height: 32rpx; handleClick(v) {
background: #f8f8f8; uni.nav;
} },
} factoryChange(e) {
console.log(e, 'factoryChange')
.demo-layout { },
height: 164rpx; }
border-radius: 4px; };
margin-bottom: 10px; </script>
display: flex;
flex-direction: column; <style lang="scss" scoped>
align-items: center; .homePage {
text { background: #fff;
margin-top: 24rpx;
font-size: 24rpx; .title {
color: #000; background: #fff;
} padding: 20rpx 32rpx;
} font-size: 28rpx;
</style> line-height: 40rpx;
font-weight: 600;
display: flex;
flex-direction: row;
align-items: center;
}
.lines {
height: 32rpx;
background: #f8f8f8;
}
}
.demo-layout {
height: 164rpx;
border-radius: 4px;
margin-bottom: 10px;
display: flex;
flex-direction: column;
align-items: center;
text {
margin-top: 24rpx;
font-size: 24rpx;
color: #000;
}
}
</style>
<template> <template>
<view class="login"> <view class="login">
<u-form ref="loginForm" :modelValue="loginForm" :rules="loginRules" class="login-form"> <u-form ref="loginForm" :modelValue="loginForm" :rules="loginRules" class="login-form">
<h3 class="title">MES作业端</h3> <h3 class="title">PDA作业端</h3>
<u-form-item prop="username"> <u-form-item prop="username">
<input <input
v-model="loginForm.username" v-model="loginForm.username"
...@@ -68,12 +68,6 @@ ...@@ -68,12 +68,6 @@
}, },
methods: { methods: {
submit(){ submit(){
// if(1){
// uni.reLaunch({
// url: '/pages/index/index'
// });
// return
// }
this.$refs.loginForm.validate().then(valid => { this.$refs.loginForm.validate().then(valid => {
if (valid) { if (valid) {
this.loading = true; this.loading = true;
...@@ -85,16 +79,17 @@ ...@@ -85,16 +79,17 @@
}) })
.then(res => { .then(res => {
this.loading = false; this.loading = false;
if(res.msg){ this.$u.vuex('vuex_token', res.token)
this.$u.toast(res.msg); this.$u.vuex('vuex_user', res.user)
}
if (res.code == '200') { if (res.code == '200') {
setTimeout(() => { setTimeout(() => {
uni.reLaunch({ uni.reLaunch({
url: '/pages/index/index' url: '/pages/index/index'
}); });
}, 500); }, 500);
} } else {
this.$u.toast(res.msg);
}
}); });
} }
}); });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment