Commit e8c8a2b9 authored by 和慭琛's avatar 和慭琛

机身条码手动输入

parent f010a5ed
...@@ -156,7 +156,7 @@ ...@@ -156,7 +156,7 @@
value: '', value: '',
TimeID:-1, TimeID:-1,
userType:'', userType:'',
isContentShow:false, isContentShow:true,
//退单弹窗相关 //退单弹窗相关
isCancelShow:false, isCancelShow:false,
...@@ -322,6 +322,7 @@ ...@@ -322,6 +322,7 @@
//检查用户状态 //检查用户状态
checkUserType: function (){ checkUserType: function (){
//return
//下单用户/师傅用户/后台用户/非法用户 //下单用户/师傅用户/后台用户/非法用户
console.log('当前用户类型:'+ this.userType) console.log('当前用户类型:'+ this.userType)
if(this.userType != '师傅用户'){ if(this.userType != '师傅用户'){
......
...@@ -139,6 +139,28 @@ ...@@ -139,6 +139,28 @@
:show-seconds="true" :show-seconds="true"
@confirm="onSelected" @confirm="onSelected"
@cancel="onSelected" /> @cancel="onSelected" />
<w-picker
:visible.sync="is_MACHINE_CODE_picker_show"
mode="selector"
value=""
default-type="label"
:default-props="MACHINE_CODE_defaultProps"
:options="MACHINE_CODE_list"
@confirm="MACHINE_CODEonConfirm($event,'selector')"
@cancel="MACHINE_CODEonCancel"
ref="selector"
></w-picker>
<view class="shadowBackView" v-if="isInputShow">
<view class="inputCenterView">
<view class="closeView">
<image class="closeIcon" @click="popCloseClick()" :src="icon_close_new" mode=""></image>
</view>
<textarea class="inputView" v-model="inputContent" value="" placeholder="请输入机身条码" placeholder-style='color:#CCCCCC;font-size:28rpx;'/>
<view class="inputConfirmView" @click="inputConfirmClick">
<text class="inputConfirmText">确 认</text>
</view>
</view>
</view>
<!--template> <!--template>
<u-select v-model="is_SPECIFICATIONS_picker_show" mode="single-column" :list="list" @confirm="confirm"></u-select> <u-select v-model="is_SPECIFICATIONS_picker_show" mode="single-column" :list="list" @confirm="confirm"></u-select>
...@@ -170,6 +192,7 @@ ...@@ -170,6 +192,7 @@
orderServiceType:'', orderServiceType:'',
orderInfo:{}, orderInfo:{},
currentIndex:0, currentIndex:0,
currentItem:null,
TimeID:-1, TimeID:-1,
//产品规格 相关 //产品规格 相关
...@@ -202,6 +225,18 @@ ...@@ -202,6 +225,18 @@
date: '2020/01/01', date: '2020/01/01',
value: '', value: '',
//机身扫码相关
is_MACHINE_CODE_picker_show:false,
MACHINE_CODE_defaultProps:{
label:"name",
value:"id"
},
MACHINE_CODE_list:[{'name':'相机扫码','id':0},{'name':'手动输入','id':1}],
isInputShow:false,
icon_close_new:'',
inputContent:'',
//处理措施 相关 //处理措施 相关
measure_showContent:'', measure_showContent:'',
measure_measureTypeName:'', measure_measureTypeName:'',
...@@ -221,7 +256,7 @@ ...@@ -221,7 +256,7 @@
}, },
onLoad(e) { onLoad(e) {
this.icon_close_new = getApp().globalData.icon_close_new
this.getTopInfo(e) this.getTopInfo(e)
//this.getConfig() //this.getConfig()
...@@ -471,7 +506,10 @@ ...@@ -471,7 +506,10 @@
//机器条码 MACHINE_CODE //机器条码 MACHINE_CODE
if(item.fieldsType == 'MACHINE_CODE'){ if(item.fieldsType == 'MACHINE_CODE'){
this.scanCode(item,ikey) this.currentIndex = ikey
this.currentItem = item
this.is_MACHINE_CODE_picker_show = true
//this.scanCode(item,ikey)
} }
//日期 DATE //日期 DATE
...@@ -622,7 +660,7 @@ ...@@ -622,7 +660,7 @@
//产品规格 取消选择 //产品规格 取消选择
SPECIFICATIONSonCancel(){ SPECIFICATIONSonCancel(){
console.log('产品规格 取消选择') //console.log('产品规格 取消选择')
}, },
//"fieldsOptions":"{\"specificationId\":10006,\"specificationName\":\"变频3P\"}","sort":2} //"fieldsOptions":"{\"specificationId\":10006,\"specificationName\":\"变频3P\"}","sort":2}
...@@ -722,14 +760,50 @@ ...@@ -722,14 +760,50 @@
console.log('产品型号 取消选择') console.log('产品型号 取消选择')
}, },
//机身条码 确认选择
MACHINE_CODEonConfirm(res,type){
this.result=res;
// console.log('机身条码 确认选择')
// console.log(res.result)
// console.log(res.value)
if(res.result == '相机扫码'){
this.scanCode(this.currentItem,this.currentIndex)
}
if(res.result == '手动输入'){
this.isInputShow = true
}
},
//机身条码 取消选择
MACHINE_CODEonCancel(){
//console.log('机身条码 取消选择')
},
popCloseClick: function(){
this.isInputShow = false
},
inputConfirmClick: function(){
// console.log('手动输入 确定')
// console.log('手动输入 条码:' + this.inputContent)
this.isInputShow = false
this.updateInfo(this.currentIndex,'MACHINE_CODE',this.inputContent)
},
//机身条码 //机身条码
scanCode: function (item,ikey) { scanCode: function (item,ikey) {
let that = this let that = this
uni.scanCode({ uni.scanCode({
scanType: ['barCode'], scanType: ['barCode'],
success: function (res) { success: function (res) {
console.log('条码类型:' + res.scanType); // console.log('条码类型:' + res.scanType);
console.log('条码内容:' + res.result); // console.log('条码内容:' + res.result);
that.updateInfo(ikey,'MACHINE_CODE',res.result) that.updateInfo(ikey,'MACHINE_CODE',res.result)
} }
}); });
...@@ -1682,7 +1756,7 @@ ...@@ -1682,7 +1756,7 @@
.clickRightView{ .clickRightView{
background-color: #FFFFFF; background-color: #FFFFFF;
width: 40%; width: 60%;
display: flex; display: flex;
flex-direction: row-reverse; flex-direction: row-reverse;
align-items: center; align-items: center;
...@@ -1695,11 +1769,16 @@ ...@@ -1695,11 +1769,16 @@
} }
.clickContent{ .clickContent{
margin-right: 20rpx; padding-right: 20rpx;
font-size: 28rpx; font-size: 28rpx;
color: #333333; color: #333333;
display: block;
overflow: hidden;
white-space: nowrap;
text-overflow:ellipsis;
} }
.inputTypeView{ .inputTypeView{
background-color: #FFFFFF; background-color: #FFFFFF;
width: 100%; width: 100%;
...@@ -1811,9 +1890,59 @@ ...@@ -1811,9 +1890,59 @@
height: 100%; height: 100%;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center;
}
.inputCenterView{
background-color: #FFFFFF;
width: 600rpx;
height: 600rpx;
margin-top: 300rpx;
border-radius: 10rpx;
}
.closeView{
background-color: #FFFFFF;
width: 100%;
height: 80rpx;
display: flex;
flex-direction: row-reverse;
align-items: center;
}
.closeIcon{
background-color: #FFFFFF;
margin-right: 14rpx;
width: 30rpx;
height: 30rpx;
}
.inputView{
background-color: #FFFFFF;
margin-top: 30rpx;
margin-left: 30rpx;
width: 540rpx;
height: 300rpx;
border: 2rpx solid #CCCCCC;
} }
.inputConfirmView{
background-color: #2272FF;
margin-top: 40rpx;
margin-left: 80rpx;
width: 440rpx;
height: 80rpx;
display: flex;
align-items: center;
justify-content: center;
}
.inputConfirmText{
color: #FFFFFF;
font-size: 32rpx;
font-weight: bold;
}
</style> </style>
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