Commit 83514d62 authored by 李苏's avatar 李苏 💬

徐工道路APP

parent b09847f3
...@@ -2,9 +2,13 @@ ...@@ -2,9 +2,13 @@
import Vue from 'vue' import Vue from 'vue'
import appUpdate from 'common/util/appUpdate.js' import appUpdate from 'common/util/appUpdate.js'
import api from 'api/api.js' import api from 'api/api.js'
import Scan from '@/components/Scan/Scan.vue'
Vue.component('Scan',Scan)
export default { export default {
onLaunch: function() { onLaunch: function() {
// appUpdate() // #ifdef APP-PLUS
plus.screen.lockOrientation("portrait-primary");
// #endif
uni.getSystemInfo({ uni.getSystemInfo({
success: function(e) { success: function(e) {
......
...@@ -4,7 +4,6 @@ import { ...@@ -4,7 +4,6 @@ import {
import configService from '@/common/service/config.service.js'; import configService from '@/common/service/config.service.js';
import tip from '@/common/util/tip.js' import tip from '@/common/util/tip.js'
import eventBus from '@/common/util/eventBus.js' import eventBus from '@/common/util/eventBus.js'
console.log(eventBus.$trim)
/* 过滤对象属性空格 */ /* 过滤对象属性空格 */
function filterSpace(data){ function filterSpace(data){
data=data||{} data=data||{}
...@@ -134,21 +133,58 @@ export function queryDownConfirmRk(params) { ...@@ -134,21 +133,58 @@ export function queryDownConfirmRk(params) {
return filter(e) return filter(e)
}) })
} }
/* 工位叫料站位信息查询 */ /* 查询工位列表 */
const BASE_API="http://124.223.207.61/mock/622f086e725ad60a84001997/mes"
/* agv任务状态查询 */ export function queryGwList(params) {
return http.post("/xgwcs/gw/query ", filterSpace(params) || {}).then(e => {
/*工位对应物料查询 */ return filter(e)
})
/* 工位叫料接口 */ }
/* 查询确认状态的生产订单 */
/*工位取消接口*/ export function queryWlList(params) {
return http.post("/xgwcs/wo/queryConfirmWo ", filterSpace(params) || {}).then(e => {
/* 工位锁定接口 */ return filter(e)
})
/* 回库接口 */ }
/* 停用按钮 */
/* 取消锁定接口 */ export function deactivate(params) {
return http.post("/xgwcs/gw/record/qt", filterSpace(params) || {}).then(e => {
/* 物料查询接口 */ return filter(e)
})
}
/* 查询agv状态 */
export function queryAgvInfo(params) {
return http.post("/xgwcs/gwjl/queryTask", filterSpace(params) || {}).then(e => {
return filter(e)
})
}
/* 叫料 */
export function callMaterials(params) {
return http.post("/xgwcs/gwjl/doCall", filterSpace(params) || {}).then(e => {
return filter(e)
})
}
/* 取消下架作业*/
export function cancelMaterials(params) {
return http.post("/xgwcs/rkzy/delete ", filterSpace(params) || {}).then(e => {
return filter(e)
})
}
/* 锁定 */
export function lockMaterials(params) {
return http.post(BASE_API+"/lockMaterials", filterSpace(params) || {}).then(e => {
return filter(e)
})
}
/* 取消锁定 */
export function unlockMaterials(params) {
return http.post(BASE_API+"/unlockMaterials", filterSpace(params) || {}).then(e => {
return filter(e)
})
}
/* 回库 */
export function backWarehouse(params) {
return http.post("/xgwcs/gwjl/doBack ", filterSpace(params) || {}).then(e => {
return filter(e)
})
}
\ No newline at end of file
...@@ -4,8 +4,8 @@ ...@@ -4,8 +4,8 @@
{{title}} {{title}}
</view> </view>
<view class="infoBody"> <view class="infoBody">
<view :class="itemWidth" v-for="(item,key) in info" :key="key"> <view v-if="key!='id'" :class="itemWidth" v-for="(item,key) in show(info)" :key="key">
<span :class="keyWidth">{{key|getKeys}}:</span><span>{{item||'暂无信息'}}</span> <span :class="keyWidth">{{key|getKeys}}:</span><span>{{item|getstate}}</span>
</view> </view>
<view class="noinfoCard" v-if="Object.keys(info).length==0" > <view class="noinfoCard" v-if="Object.keys(info).length==0" >
暂无信息 暂无信息
...@@ -17,6 +17,19 @@ ...@@ -17,6 +17,19 @@
<script> <script>
export default { export default {
filters:{ filters:{
getstate: function(e) {
let state = {
"C": "完成",
"F": "确认",
"I": "初始"
}
if(state[e]){
return state[e]
}else{
return e
}
},
getKeys: function(e) { getKeys: function(e) {
let keyList = { let keyList = {
"wlname":"物料名称", "wlname":"物料名称",
...@@ -29,7 +42,8 @@ ...@@ -29,7 +42,8 @@
"rwzt":"任务状态", "rwzt":"任务状态",
"agvrwdh":"agv任务单号", "agvrwdh":"agv任务单号",
"agvrwzt":"agv任务状态", "agvrwzt":"agv任务状态",
"djid":"生产订单",
"wlxxName":"产品名称"
}; };
return keyList[e] return keyList[e]
}, },
...@@ -55,8 +69,40 @@ ...@@ -55,8 +69,40 @@
name:"InfoCard", name:"InfoCard",
data() { data() {
return { return {
whiteList:[
"wlname",
"wlgg",
"wlph",
"tpcode",
"ztsl",
"wlcode",
"rwdh",
"rwzt",
"agvrwdh",
"agvrwzt",
/* */
"djid",
"cpname",
"wlxxName"
]
}; };
},
methods:{
getSame(arr1, arr2) {
return [...new Set(arr1)].filter(item =>
arr2.includes(item)
)
},
show(){
let allKeys=Object.keys(this.info)
let newData={}
let newKeys=[]
newKeys=this.getSame(allKeys,this.whiteList)
newKeys.forEach(e=>{
newData[e]=this.info[e]
})
return newData
}
} }
} }
</script> </script>
...@@ -78,7 +124,7 @@ ...@@ -78,7 +124,7 @@
.cardKeyFull{ .cardKeyFull{
display: inline-block; display: inline-block;
width: 50%; width: 50%;
text-align: right; text-align: center;
} }
.infoCard{ .infoCard{
background-color: white; background-color: white;
...@@ -110,6 +156,7 @@ ...@@ -110,6 +156,7 @@
} }
.infoBodyItemFull{ .infoBodyItemFull{
text-align: left;
width: 100%; width: 100%;
padding-left: 10px; padding-left: 10px;
font-size: 14px; font-size: 14px;
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
}, },
computed:{ computed:{
bodyWidth(){ bodyWidth(){
return "width:"+100*this.xList.length+'px' return "width:"+150*this.xList.length+'px'
} }
}, },
data() { data() {
...@@ -62,14 +62,14 @@ ...@@ -62,14 +62,14 @@
} }
.location_body{ .location_body{
height: 50vh;width: 300px; height: 50vh;width:100vw;
margin-bottom: 20px; margin-bottom: 20px;
overflow: auto; overflow: auto;
display: flex; display: flex;
.xList{ .xList{
flex: 1; flex: 1;
height: auto; height: auto;
width: 40px; width: 150px;
.yList{ .yList{
width: 100%; width: 100%;
height: 40px; height: 40px;
......
<template>
<text @tap="scan()" class="cuIcon-barcode" style="font-size: 25px;"></text>
</template>
<script>
export default {
name: "Scan",
components: {
},
props: {
params: {},
app: {},
do: {}
},
methods: {
scan() {
let that = this
uni.scanCode({
onlyFromCamera: true,
success: function(res) {
that.app[that.params] = res.result
that.app[that.do]()
}
})
}
}
}
</script>
<style>
</style>
<template> <template>
<view class="stationAll"> <view class="stationAll">
<view class="stationBody" :class="{status1:itemInfo.status==1,status2:itemInfo.status==2,status3:itemInfo.status==3}"> <view class="stationBody" :class="{status1:itemInfo.status==1,status2:itemInfo.status==2,status3:itemInfo.status==3,status4:itemInfo.status==4}">
<view class="item">{{itemInfo.stationname}}</view> <view class="item">{{itemInfo.ckName}}</view>
<view class="item">{{itemInfo.name}}</view> <view class="item">{{itemInfo.name}}</view>
<view class="item">{{itemInfo.status|getstatus}}</view> <view class="item">{{itemInfo.status|getstatus}}</view>
</view> </view>
...@@ -46,7 +46,8 @@ ...@@ -46,7 +46,8 @@
let ztList = { let ztList = {
"1": "正常", "1": "正常",
"2": "已占用", "2": "已占用",
"3": "锁定" "3": "锁定",
"4": "停用",
}; };
return ztList[e] return ztList[e]
}, },
...@@ -54,7 +55,7 @@ ...@@ -54,7 +55,7 @@
let ztList = { let ztList = {
"1": "bg-green", "1": "bg-green",
"2": "bg-red", "2": "bg-red",
"3": "bg-orange" "3": "bg-orange",
}; };
return ztList[e] return ztList[e]
}, },
...@@ -82,15 +83,16 @@ ...@@ -82,15 +83,16 @@
.checkBody{ .checkBody{
background-color:royalblue; background-color:royalblue;
border-radius: 50%; border-radius: 50%;
padding: 2px; width: 20px;
height: 20px;
.checkItem{ .checkItem{
color: #fff; color: #fff;
font-size: 14px; font-size: 20px;
} }
} }
.stationAll{ .stationAll{
border: 0.5px solid #eee; border: 0.5px solid #eee;
min-height: 130px; min-height: 180px;
padding: 10px; padding: 10px;
} }
.stationSelect{ .stationSelect{
...@@ -126,4 +128,7 @@ ...@@ -126,4 +128,7 @@
.status3{ .status3{
background-color: orange; background-color: orange;
} }
.status4{
background-color: gray;
}
</style> </style>
\ No newline at end of file
This diff is collapsed.
<template> <template>
<view> <view>
<view class="cu-bar bg-white search fixed" :style="[{top:70 + 'px'}]"> <view class="cu-bar bg-white search fixed" :style="[{top:70 + 'px'}]">
<view class="search-form round"> <view class="search-form round">
<text class="cuIcon-search"></text> <text class="cuIcon-search"></text>
<input type="text" placeholder="输入搜索的信息" confirm-type="search" @confirm="searchFood" v-model="serachName"/> <input type="text" placeholder="输入搜索的信息" confirm-type="search" @confirm="searchFood"
</view> v-model="serachName" />
<view class="action"> </view>
<button class="cu-btn bg-gradual-green shadow-blur round" @tap="searchFood">搜索</button> <view class="action">
</view> <button class="cu-btn bg-gradual-green shadow-blur round" @tap="searchFood">搜索</button>
</view> </view>
<view class="bg-white">
<cu-custom bgColor="bg-gradual-blue" :isBack="true"><block slot="content">选择物料</block></cu-custom>
</view>
<view class="cu-bar bg-white solid-bottom">
<view class="action">
<text class="cuIcon-title text-orange "></text> 物料列表
</view> </view>
</view> <view class="bg-white">
<InfoCard :info="item" :title="'序号:#'+(index+1)" v-for="(item,index) in wlinfor" :key="index+'keys'" @tap.native="nextTo(item)"></InfoCard> <cu-custom bgColor="bg-gradual-blue" :isBack="true">
<block slot="content">选择物料</block>
</cu-custom>
</view>
<view class="cu-bar bg-white solid-bottom">
<view class="action">
<text class="cuIcon-title text-orange "></text> 物料列表
</view>
</view>
<InfoCard :keyWidth="'cardKeyFull'" :itemWidth="'infoBodyItemFull'" :info="item" :title="'序号:#'+(index+1)" v-for="(item,index) in wlinfor" :key="index"
@tap.native="nextTo(item)"></InfoCard>
</view> </view>
</template> </template>
<script> <script>
import api from '@/api/api.js'; import api from '@/api/api.js';
import {
queryWlList
} from '@/api/dlapi.js'
import InfoCard from '@/components/InfoCard/InfoCard.vue' import InfoCard from '@/components/InfoCard/InfoCard.vue'
import eventBus from '@/common/util/eventBus.js' import eventBus from '@/common/util/eventBus.js'
export default { export default {
data() { data() {
return { return {
serachName:"", serachName: "",
status:"", status: "",
gwjlinfor:{}, gwjlinfor: {},
wlinfor:[ wlinfor: [
{wlcode:"code&re2119",wlname:"藏红花",wlgg:"10支/盒",tpcode:"tp001",wlph:"10010",ztsl:"100"},
{wlcode:"code&re2119",wlname:"板蓝根",wlgg:"10支/盒",tpcode:"tp001",wlph:"10010",ztsl:"100"}, ]
{wlcode:"code&re2119",wlname:"兰伽颉",wlgg:"10支/盒",tpcode:"tp001",wlph:"10010",ztsl:"100"},
{wlcode:"code&re2119",wlname:"龙葵叶",wlgg:"10支/盒",tpcode:"tp001",wlph:"10010",ztsl:"100"},
]
} }
}, },
onPullDownRefresh(){ onPullDownRefresh() {
setTimeout(()=>{ setTimeout(() => {
uni.stopPullDownRefresh() uni.stopPullDownRefresh()
},2500) }, 2500)
}, },
methods:{ methods: {
apiGetwl(){ apiGetwl() {
let _self=this; queryWlList({
api.postData("xgwms/tpmx/queryWlxx",{ condition: this.serachName
"condition":_self.serachName }).then(e => {
}).then((resp) => { this.wlinfor = e.records
if(resp.data.success){ })
_self.wlinfor=resp.data.data.records
}else{
this.$tip.alert(resp.data.message||"请求失败");
}
}).catch((err) => {
let msg = err.data.message || "请求出现错误,请稍后再试"
this.$tip.alert(msg);
}).finally(()=>{
})
}, },
searchFood(){ searchFood() {
this.apiGetwl() this.apiGetwl()
}, },
nextTo(item){ nextTo(item) {
let info={ let info = {
gwjlinfor:this.gwjlinfor, wlinfor: item
xzwl:"xzwl",
wlinfor:item
} }
eventBus.$emit('sendInfo',info); eventBus.$emit('sendInfo', info);
uni.navigateBack({ uni.navigateBack({
delta: 1 delta: 1
}); });
// this.$Router.replace({ path:'/pages/gwjl/gwjl', query:{
// gwjlinfor:this.gwjlinfor,
// xzwl:"xzwl",
// wlinfor:item
// }
// })
}, },
gotoBackPage(){ gotoBackPage() {
this.$router.go(-1) this.$router.go(-1)
} }
}, },
onLoad(e) { onLoad(e) {
if(!e.query){ queryWlList({}).then(e => {
return 0 this.wlinfor = e.records
} })
let einfor =JSON.parse(e.query)
this.gwjlinfor=einfor.gwjlinfor
this.apiGetwl()
} }
} }
</script> </script>
<style scoped> <style scoped>
.wid50{ .wid50 {
width: 50%; width: 50%;
} }
</style> </style>
<template> <template>
<view class="bg-white" style="height: 100vh;"> <view class="bg-white" style="height: 100vh;">
<cu-custom bgColor="bg-gradual-blue" :isBack="true" > <cu-custom bgColor="bg-gradual-blue" :isBack="true" >
<block slot="backText">返回</block> <block slot="backText">返回</block>
<block slot="content">托盘信息绑定</block> <block slot="content">托盘信息绑定</block>
</cu-custom> </cu-custom>
...@@ -8,12 +8,14 @@ ...@@ -8,12 +8,14 @@
<view class="cu-form-group "> <view class="cu-form-group ">
<view class="title">配盘单码</view> <view class="title">配盘单码</view>
<input v-model="djid" :focus="djidFocus" @confirm="apiCheckDjid()" placeholder="请扫描配盘单码"></input> <input v-model="djid" :focus="djidFocus" @confirm="apiCheckDjid()" placeholder="请扫描配盘单码"></input>
<Scan :app="app" :params="'djid'" :do="'apiCheckDjid'" ></Scan>
</view> </view>
</view> </view>
<view class="padding-xs bg-white"> <view class="padding-xs bg-white">
<view class="cu-form-group "> <view class="cu-form-group ">
<view class="title">扫托盘码</view> <view class="title">扫托盘码</view>
<input v-model="code" :focus="stpmFocus" @confirm="searchTpm" placeholder="请扫描配盘单码"></input> <input v-model="code" :focus="stpmFocus" @confirm="searchTpm" placeholder="请扫描配盘单码"></input>
<Scan :app="app" :params="'code'" :do="'searchTpm'" ></Scan>
</view> </view>
</view> </view>
<view class="padding flex justify-around bg-white "> <view class="padding flex justify-around bg-white ">
...@@ -29,6 +31,7 @@ ...@@ -29,6 +31,7 @@
export default { export default {
data() { data() {
return { return {
app:this,
djid:"", djid:"",
code:"", code:"",
djidFocus:true, djidFocus:true,
...@@ -46,6 +49,11 @@ ...@@ -46,6 +49,11 @@
} }
}, },
methods: { methods: {
/* 扫码赋值方法 */
scan(e){
this.djid=e.result
console.log(e.result)
},
apiCheckDjid() { apiCheckDjid() {
// djidFocus=false;stpmFocus=true // djidFocus=false;stpmFocus=true
this.djidFocus=false; this.djidFocus=false;
......
...@@ -43,6 +43,7 @@ ...@@ -43,6 +43,7 @@
<view class="cu-form-group "> <view class="cu-form-group ">
<view class="title">库位码</view> <view class="title">库位码</view>
<input :focus="kwmFocus" v-model="code" @confirm="searchKwm()" placeholder="扫描库位码"></input> <input :focus="kwmFocus" v-model="code" @confirm="searchKwm()" placeholder="扫描库位码"></input>
<Scan :app="app" :params="'code'" :do="'searchKwm'" ></Scan>
</view> </view>
</view> </view>
</view> </view>
...@@ -66,6 +67,7 @@ ...@@ -66,6 +67,7 @@
}, },
data() { data() {
return { return {
app:this,
xList:[], xList:[],
index:-1, index:-1,
code:"", code:"",
......
...@@ -40,6 +40,7 @@ ...@@ -40,6 +40,7 @@
<view class="cu-form-group "> <view class="cu-form-group ">
<view class="title">库位码</view> <view class="title">库位码</view>
<input focus="true" v-model="kwcode" @confirm="searchKwm()" placeholder="扫描库位码查询"></input> <input focus="true" v-model="kwcode" @confirm="searchKwm()" placeholder="扫描库位码查询"></input>
<Scan :app="app" :params="'kwcode'" :do="'searchKwm'" ></Scan>
</view> </view>
</view> </view>
</view> </view>
...@@ -65,6 +66,7 @@ ...@@ -65,6 +66,7 @@
}, },
data() { data() {
return { return {
app:this,
xList:[], xList:[],
index:-1, index:-1,
kwcode:"", kwcode:"",
......
...@@ -49,6 +49,7 @@ ...@@ -49,6 +49,7 @@
<view class="cu-form-group "> <view class="cu-form-group ">
<view class="title">取料区码</view> <view class="title">取料区码</view>
<input focus="true" @confirm="searchQlqm()" v-model="code" placeholder="扫描取料区码查询"></input> <input focus="true" @confirm="searchQlqm()" v-model="code" placeholder="扫描取料区码查询"></input>
<Scan :app="app" :params="'code'" :do="'searchQlqm'" ></Scan>
</view> </view>
</view> </view>
</view> </view>
...@@ -68,6 +69,7 @@ ...@@ -68,6 +69,7 @@
}, },
data() { data() {
return { return {
app:this,
code:"", code:"",
index:-1, index:-1,
kwcode:"", kwcode:"",
......
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
<view class="cu-form-group"> <view class="cu-form-group">
<view class="title ">托盘号</view> <view class="title ">托盘号</view>
<input v-model="tpcode" placeholder="请扫描托盘号" focus="true" @confirm="apiGetTryinfo()"></input> <input v-model="tpcode" placeholder="请扫描托盘号" focus="true" @confirm="apiGetTryinfo()"></input>
<Scan :app="app" :params="'tpcode'" :do="'apiGetTryinfo'" ></Scan>
</view> </view>
<view class="cu-form-group disable"> <view class="cu-form-group disable">
<view class="title ">已扫托盘号</view> <view class="title ">已扫托盘号</view>
...@@ -49,6 +50,7 @@ ...@@ -49,6 +50,7 @@
export default { export default {
data() { data() {
return { return {
app:this,
selected: "", selected: "",
ystpcode: "", ystpcode: "",
modalName: "", modalName: "",
......
...@@ -5,10 +5,12 @@ ...@@ -5,10 +5,12 @@
<view class="cu-form-group" > <view class="cu-form-group" >
<view class="title ">托盘号</view> <view class="title ">托盘号</view>
<input v-model="tpcode" placeholder="请扫描托盘号" focus="true" @confirm="apiGetTryinfo()" ></input> <input v-model="tpcode" placeholder="请扫描托盘号" focus="true" @confirm="apiGetTryinfo()" ></input>
<Scan :app="app" :params="'tpcode'" :do="'apiGetTryinfo'" ></Scan>
</view> </view>
<view class="cu-form-group disable" > <view class="cu-form-group disable" >
<view class="title ">已扫托盘号</view> <view class="title ">已扫托盘号</view>
<input v-model="ystpcode" disabled="" focus="true"></input> <input v-model="ystpcode" disabled="" focus="true"></input>
</view> </view>
<view v-for="(item,index) in wlinfor" :key="index"> <view v-for="(item,index) in wlinfor" :key="index">
<view class="flex flex-wrap padding bg-grey white radio" style="position: relative;"> <view class="flex flex-wrap padding bg-grey white radio" style="position: relative;">
...@@ -35,6 +37,7 @@ ...@@ -35,6 +37,7 @@
export default { export default {
data() { data() {
return { return {
app:this,
testys:10, testys:10,
selected:"", selected:"",
ystpcode:"", ystpcode:"",
......
...@@ -504,7 +504,6 @@ ...@@ -504,7 +504,6 @@
text-align: center; text-align: center;
margin-top: 40upx; margin-top: 40upx;
} }
.register-section { .register-section {
position: absolute; position: absolute;
left: 0; left: 0;
...@@ -513,15 +512,14 @@ ...@@ -513,15 +512,14 @@
font-size: $font-sm+2upx; font-size: $font-sm+2upx;
color: $font-color-base; color: $font-color-base;
text-align: center; text-align: center;
text { text {
color: $font-color-spec; color: $font-color-spec;
margin-left: 10upx; margin-left: 10upx;
} }
} }
.round{ .round{
width: 18px!important; width: 10vw!important;
height: 18px!important; height: 10vw!important;
} }
</style> </style>
...@@ -3,7 +3,8 @@ ...@@ -3,7 +3,8 @@
<scroll-view scroll-y class="page"> <scroll-view scroll-y class="page">
<!-- 头部logo--> <!-- 头部logo-->
<view class="UCenter-bg" > <view class="UCenter-bg" >
<img src="/static/home/u3.png" alt="" style="height: 100%;width: 100%;" srcset="">
<image src="../../static/home/u3.png" mode="" style="height: 100%;width: 100%;"></image>
</view> </view>
<view class="padding flex text-center text-grey bg-white shadow-warp"> <view class="padding flex text-center text-grey bg-white shadow-warp">
<view class="flex flex-sub flex-direction solid-right animation-slide-top" :style="[{animationDelay: '0.2s'}]"> <view class="flex flex-sub flex-direction solid-right animation-slide-top" :style="[{animationDelay: '0.2s'}]">
......
<template name="user"> <template name="user">
<view> <view>
<scroll-view scroll-y class="page"> <scroll-view scroll-y class="page">
<image src="/static/componentBg.png " mode="widthFix" class="response"></image> <image src="/static/home/u3.png" mode="widthFix" class="response"></image>
<view class="nav-list"> <view class="nav-list">
<navigator hover-class="none" :url="'/pages/common/' + item.name" class="nav-li" navigateTo :class="'bg-'+item.color" <navigator hover-class="none" :url="'/pages/common/' + item.name" class="nav-li" navigateTo :class="'bg-'+item.color"
:style="[{animation: 'show ' + ((index+1)*0.2+1) + 's 1'}]" v-for="(item,index) in elements" :key="index"> :style="[{animation: 'show ' + ((index+1)*0.2+1) + 's 1'}]" v-for="(item,index) in elements" :key="index">
......
...@@ -12,6 +12,12 @@ ...@@ -12,6 +12,12 @@
<view class="action"> <view class="action">
<slot name="right"></slot> <slot name="right"></slot>
</view> </view>
<view v-if="isScan" class="action flex flex-wrap" >
<view class="tit-xzck">
<text @tap="scan" class="cuIcon-barcode" style="font-size: 25px;"></text>
</view>
</view>
<view v-if="isxzck" @tap="xzck()" class="action flex flex-wrap" > <view v-if="isxzck" @tap="xzck()" class="action flex flex-wrap" >
<view class="tit-xzck"> <view class="tit-xzck">
选择仓库 选择仓库
...@@ -48,6 +54,10 @@ ...@@ -48,6 +54,10 @@
} }
}, },
props: { props: {
isScan:{
type: [Boolean, String],
default: false
},
isxzck: { isxzck: {
type: [Boolean, String], type: [Boolean, String],
default: false default: false
...@@ -71,6 +81,15 @@ ...@@ -71,6 +81,15 @@
} }
}, },
methods: { methods: {
scan(){
let that=this
uni.scanCode({
onlyFromCamera:true,
success:function(res){
that.$emit('scan',res)
}
})
},
xzck(){ xzck(){
this.$Router.replaceAll({name:'xzck'}) this.$Router.replaceAll({name:'xzck'})
}, },
......
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