Commit 4508ee6e authored by 李苏's avatar 李苏 💬

入库作业对接

parent a4eee81e
...@@ -24,22 +24,62 @@ export function getPower(params) { ...@@ -24,22 +24,62 @@ export function getPower(params) {
} }
/* 托盘查询 */ /* 托盘查询 */
export function getTryinfo(params) { export function getTryinfo(params) {
params.ckid = eventBus.$ckid
return http.post('/xgwcs/tpmx/searchTpmxsByCode', params || {}).then(e => { return http.post('/xgwcs/tpmx/searchTpmxsByCode', params || {}).then(e => {
return filter(e) return filter(e)
}) })
} }
/* 托盘调整 */ /* 托盘调整 */
export function adjustTry(params) { export function adjustTry(params) {
params.ckid = eventBus.$ckid
return http.post('/xgwcs/tp/adjustTpByCode ', params || {}).then(e => { return http.post('/xgwcs/tp/adjustTpByCode ', params || {}).then(e => {
return filter(e) return filter(e)
}) })
} }
/* 清空托盘 */ /* 清空托盘 */
export function emptyTry(params) { export function emptyTry(params) {
params.ckid = eventBus.$ckid
return http.post('/xgwcs/tp/emptyTpByCode', params || {}).then(e => { return http.post('/xgwcs/tp/emptyTpByCode', params || {}).then(e => {
return filter(e) return filter(e)
}) })
} }
/* 配盘单号核验 */
export function checkDjid(params){
return http.post('/xgwcs/rktz/queryRktzdByDjid', params || {}).then(e => {
return filter(e)
})
}
/* 查询托盘状态 */
export function checkTpcode(params){
return http.post('/xgwcs/tp/searchTpByCode', params || {}).then(e => {
return filter(e)
})
}
/* 入库绑定 */
export function putinBind(params) {
return http.post('/xgwcs/rkzy/genRkzyByTpAndPhd', params || {}).then(e => {
return filter(e)
})
}
/* 入库登记表查询 */
export function queryUpDrk(params) {
return http.post('/xgwcs/rkzy/queryUpDrk', params || {}).then(e => {
return filter(e)
})
}
/* 检验库位码 */
export function checkKwcode(params) {
return http.post('/xgwcs/kwcx/searchKwByKwCode', params || {}).then(e => {
return filter(e)
})
}
/* 完成入库 */
export function completedRk(params) {
return http.post('/xgwcs/sjrw/completedRkBySjrw ', params || {}).then(e => {
return filter(e)
})
}
/* 删除任务 */
export function deleteRk(params) {
return http.post('/xgwcs/rkzy/delete', params || {}).then(e => {
return filter(e)
})
}
...@@ -76,82 +76,6 @@ ...@@ -76,82 +76,6 @@
<button class="cu-btn bg-gradual-orange wid30" @tap="clearbt()">托盘清空</button> <button class="cu-btn bg-gradual-orange wid30" @tap="clearbt()">托盘清空</button>
<button class="cu-btn bg-gradual-orange wid30" @tap="clearbt()">回库</button> <button class="cu-btn bg-gradual-orange wid30" @tap="clearbt()">回库</button>
</view> </view>
<view class="cu-modal" :class="modalName=='DialogModal1'?'show':''">
<view class="cu-dialog">
<view class="cu-bar bg-white justify-end">
<view class="content">提示</view>
<view class="action" @tap="hideModal">
<text class="cuIcon-close text-red"></text>
</view>
</view>
<view class="padding-xl bg-white">
是否叫料?
</view>
<view class="cu-bar bg-white justify-end">
<view class="action">
<button class="cu-btn line-green text-green" @tap="hideModal">取消</button>
<button class="cu-btn bg-green margin-left" @tap="apiqqjl()">确定</button>
</view>
</view>
</view>
</view>
<view class="cu-modal" :class="modalName=='DialogModal2'?'show':''">
<view class="cu-dialog">
<view class="cu-bar bg-white justify-end">
<view class="content">提示</view>
<view class="action" @tap="hideModal">
<text class="cuIcon-close text-red"></text>
</view>
</view>
<view class="padding-xl bg-white">
是否清空?
</view>
<view class="cu-bar bg-white justify-end">
<view class="action">
<button class="cu-btn line-green text-green" @tap="hideModal">取消</button>
<button class="cu-btn bg-green margin-left" @tap="clearinfo()">确定</button>
</view>
</view>
</view>
</view>
<view class="cu-modal" :class="modalName=='DialogModal3'?'show':''">
<view class="cu-dialog">
<view class="cu-bar bg-white justify-end">
<view class="content">提示</view>
<view class="action" @tap="hideModal">
<text class="cuIcon-close text-red"></text>
</view>
</view>
<view class="padding-xl bg-white">
是否取消叫料?
</view>
<view class="cu-bar bg-white justify-end">
<view class="action">
<button class="cu-btn line-green text-green" @tap="hideModal">取消</button>
<button class="cu-btn bg-green margin-left" @tap="apiqxjl()">确定</button>
</view>
</view>
</view>
</view>
<view class="cu-modal" :class="modalName=='DialogModal4'?'show':''">
<view class="cu-dialog">
<view class="cu-bar bg-white justify-end">
<view class="content">提示</view>
<view class="action" @tap="hideModal">
<text class="cuIcon-close text-red"></text>
</view>
</view>
<view class="padding-xl bg-white">
是否继续操作?
</view>
<view class="cu-bar bg-white justify-end">
<view class="action">
<button class="cu-btn line-green text-green" @tap="hideModal">取消</button>
<button class="cu-btn bg-green margin-left" @tap="apisd()">确定</button>
</view>
</view>
</view>
</view>
</view> </view>
</template> </template>
...@@ -260,6 +184,7 @@ ...@@ -260,6 +184,7 @@
}, },
/* 按钮 */ /* 按钮 */
cmbt(){ cmbt(){
let that=this
uni.showModal({ uni.showModal({
title: '提示', title: '提示',
content: '是否叫料', content: '是否叫料',
...@@ -267,7 +192,7 @@ ...@@ -267,7 +192,7 @@
confirmText: "是", // 确认按钮的文字 confirmText: "是", // 确认按钮的文字
success: function (res) { success: function (res) {
if (res.confirm) { if (res.confirm) {
console.log('用户点击确定'); console.log(that.wlinfor)
} else if (res.cancel) { } else if (res.cancel) {
console.log('用户点击取消'); console.log('用户点击取消');
} }
...@@ -613,19 +538,25 @@ ...@@ -613,19 +538,25 @@
/* 查询工位 */ /* 查询工位 */
}, },
onLoad(e) { onLoad(e) {
console.log("退回执行onload?")
setTimeout(()=>{ setTimeout(()=>{
this.gwinfor=[{status:1,stationname:"测试站",name:"测试名称"},{status:2,stationname:"测试站",name:"测试名称"},{status:3,stationname:"测试站",name:"测试名称"}] this.gwinfor=[{status:1,stationname:"测试站",name:"测试名称"},{status:2,stationname:"测试站",name:"测试名称"},{status:3,stationname:"测试站",name:"测试名称"}]
this.gwObj=this.gwinfor[0] this.gwObj=this.gwinfor[0]
}) })
eventBus.$on('addressInfo', function(data){ eventBus.$on('sendInfo', function(data){
this.wlinfor=data.wlinfor
}.bind(this)); }.bind(this));
if(!e.query){ if(!e.query){
return return
} }
let einfor =JSON.parse(e.query) let einfor =JSON.parse(e.query)
}, },
onShow(){
console.log('退回执行onshow?')
},
onUnload(){ onUnload(){
eventBus.$off('addressInfo') console.log("onunload")
eventBus.$off('sendInfo')
clearInterval(this.interval_gwinfor) clearInterval(this.interval_gwinfor)
}, },
onHide(){ onHide(){
......
...@@ -41,7 +41,10 @@ ...@@ -41,7 +41,10 @@
status:"", status:"",
gwjlinfor:{}, gwjlinfor:{},
wlinfor:[ wlinfor:[
{test:"test"} {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"},
] ]
} }
...@@ -79,7 +82,7 @@ ...@@ -79,7 +82,7 @@
xzwl:"xzwl", xzwl:"xzwl",
wlinfor:item wlinfor:item
} }
eventBus.$emit('addressInfo',"info"); eventBus.$emit('sendInfo',info);
uni.navigateBack({ uni.navigateBack({
delta: 1 delta: 1
}); });
...@@ -91,10 +94,8 @@ ...@@ -91,10 +94,8 @@
// }) // })
}, },
gotoBackPage(){ gotoBackPage(){
this.$router.go(-1) this.$router.go(-1)
} }
}, },
onLoad(e) { onLoad(e) {
if(!e.query){ if(!e.query){
......
<template> <template>
<view class="bg-white" style="height: 100vh;"> <view class="bg-white" style="height: 100vh;">
<cu-custom bgColor="bg-gradual-blue" :isBack="true" :reWrite="'homepage'"> <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>
<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 :focus="ppdmFocus" @confirm="ppdmFocus=false;stpmFocus=true" placeholder="请扫描配盘单码"></input> <input v-model="djid" :focus="djidFocus" @confirm="apiCheckDjid()" placeholder="请扫描配盘单码"></input>
</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 :focus="stpmFocus" @confirm="searchTpm" placeholder="请扫描配盘单码"></input> <input v-model="code" :focus="stpmFocus" @confirm="searchTpm" placeholder="请扫描配盘单码"></input>
</view> </view>
</view> </view>
<view class="padding flex justify-around bg-white "> <view class="padding flex justify-around bg-white ">
<button @tap="watchInfo" class="cu-btn bg-gradual-green xs " style="width: 50%;margin-top: 40vh;">查看入库登记信息</button> <button @tap="watchInfo(true)" class="cu-btn bg-gradual-green xs " style="width: 50%;margin-top: 40vh;">查看入库登记信息</button>
</view> </view>
</view> </view>
</view> </view>
...@@ -25,11 +25,13 @@ ...@@ -25,11 +25,13 @@
</template> </template>
<script> <script>
import {login} from '@/api/dlapi.js'; import {checkDjid,checkTpcode,putinBind} from '@/api/dlapi.js';
export default { export default {
data() { data() {
return { return {
ppdmFocus:true, djid:"",
code:"",
djidFocus:true,
stpmFocus:false stpmFocus:false
} }
}, },
...@@ -44,28 +46,97 @@ ...@@ -44,28 +46,97 @@
} }
}, },
methods: { methods: {
apiCheckDjid() {
// djidFocus=false;stpmFocus=true
this.djidFocus=false;
if(this.djid){
checkDjid({djid:this.djid}).then(e=>{
if(e){
this.stpmFocus=true
}else{
this.djid=""
this.djidFocus=true
}
})
}else{
this.$tip.toast("请扫码配盘单码")
}
},
comfirmStpm(){ comfirmStpm(){
this.ppdmFocus=true this.djidFocus=true
this.stpmFocus=false this.stpmFocus=false
}, },
searchTpm(){ searchTpm(){
this.stpmFocus=false
let that=this
if(!that.djid||!that.code){
that.$tip.toast("请填入必要信息")
return
}
checkTpcode({code:that.code}).then(e=>{
if(!e.records){
this.code=""
that.$tip.toast("请输入正确的托盘号")
this.stpmFocus=true
}else{
if(e.records.zt=="E"){
this.apiPutinBind()
}else if(e.records.zt=="U"){
this.code=""
that.$tip.toast("当前托盘正在使用")
this.stpmFocus=true
}else {
this.code=""
that.$tip.toast("当前托盘为在库状态")
this.stpmFocus=true
}
}
})
},
apiPutinBind(){
let that=this let that=this
uni.showModal({ uni.showModal({
title: '提示', title: '提示',
content: '配盘单码:PPM20220426001\n配盘单码:PPM20220426001', content: '配盘单码:'+that.djid+'\n配盘单码:'+that.code,
cancelText: "继续扫描", // 取消按钮的文字 cancelText: "继续扫描",
confirmText: "开始入库", // 确认按钮的文字 confirmText: "开始入库",
success: function (res) { success: function (res) {
if (res.confirm) {
that.comfirmStpm() that.comfirmStpm()
if (res.confirm) {
that.watchInfo()
} else if (res.cancel) { } else if (res.cancel) {
let data={djid:that.djid,code:that.code}
putinBind(data).then(e=>{
if(e){
that.$tip.toast("绑定成功")
that.code=""
that.djid=""
that.comfirmStpm() that.comfirmStpm()
} }
})
}
} }
}); });
}, },
watchInfo(){ watchInfo(e){
if(e){
this.$Router.push({name:"putin_register"}) this.$Router.push({name:"putin_register"})
return
}
let that=this
let data={djid:that.djid,code:that.code}
putinBind(data).then(e=>{
if(e){
that.$tip.toast("绑定成功")
that.code=""
that.djid=""
this.$Router.push({name:"putin_register"})
}
})
}, },
// 确认按钮 // 确认按钮
......
<template> <template>
<view class="bg-white" style="height: 100vh;"> <view class="bg-white" style="height: 100vh;">
<cu-custom bgColor="bg-gradual-blue" :isBack="true" :reWrite="'homepage'"> <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>
...@@ -74,17 +74,22 @@ ...@@ -74,17 +74,22 @@
<view class="tbtit_son">库位</view> <view class="tbtit_son">库位</view>
<view style="flex: 1;">状态</view> <view style="flex: 1;">状态</view>
</view> </view>
<view class="tbtit_row " :class="item.selected?'selected':''" v-for="(item,index) in rkdjlist" :key="index" @tap="selectTb(item,index)"> <view class="tbtit_row " :class="item.selected?'selected':''" v-for="(item,index) in rkdjlist" :key="index" @tap="selectTb(item,index)" @longtap="longtapTb(item,index)">
<view class="tbtit_row_son1">{{item.tpm}}</view> <view class="tbtit_row_son1">{{item.tpcode}}</view>
<view style="flex: 1">{{item.kw}}</view> <view style="flex: 1">{{item.kwname}}</view>
<view class="tbtit_row_son3">{{item.zt}}</view> <view class="tbtit_row_son3">{{item.zt|ckStatus}}</view>
</view>
<view class="tbtit_row " style="display: flex;" v-if="!rkdjlist[0]" >
<span style="flex: 1;">
暂无数据
</span>
</view> </view>
</view> </view>
<view class="padding flex justify-around bg-white "> <view class="padding flex justify-around bg-white ">
<view class="padding-xs bg-white" style=""> <view class="padding-xs bg-white" style="">
<view class="cu-form-group "> <view class="cu-form-group ">
<view class="title">库位码</view> <view class="title">库位码</view>
<input :focus="kwmFocus" @confirm="searchKwm()" placeholder="扫描库位码"></input> <input :focus="kwmFocus" v-model="code" @confirm="searchKwm()" placeholder="扫描库位码"></input>
</view> </view>
</view> </view>
</view> </view>
...@@ -95,44 +100,28 @@ ...@@ -95,44 +100,28 @@
<script> <script>
import api from '@/api/api.js'; import api from '@/api/api.js';
import {queryUpDrk,checkKwcode,completedRk,deleteRk} from '@/api/dlapi.js'
export default { export default {
watch:{
clicknum(newValue,oldValue){
console.log('新值:'+newValue,'旧值:'+oldValue)
}
},
data() { data() {
return { return {
index:-1,
code:"",
clicknum:0,
kwmFocus:true, kwmFocus:true,
modalName:"", modalName:"",
rkdjlist:[{ rkdjlist:[]
tpm:100010,
kw:100031,
zt:'zt',
selected:false
},
{
tpm:100010,
kw:100031,
zt:'zt',
selected:false
},
{
tpm:100010,
kw:100031,
zt:'zt',
selected:false
},
{
tpm:100010,
kw:100031,
zt:'zt',
selected:false
},
{
tpm:100010,
kw:100031,
zt:'zt',
selected:false
}]
} }
}, },
filters: { filters: {
ckStatus:function(e){
let status={I:"待入库",C:"完成"}
return status[e]
},
formatTime: function(time) { formatTime: function(time) {
if (time != null && time != "") { if (time != null && time != "") {
var date = new Date(time); var date = new Date(time);
...@@ -143,7 +132,14 @@ ...@@ -143,7 +132,14 @@
} }
}, },
methods: { methods: {
cancelbt(){ cancelbt(){
let that=this
if(this.index==-1){
this.$tip.toast("请选中一条数据")
return
}else{
uni.showModal({ uni.showModal({
title: '提示', title: '提示',
content: '是否解除绑定信息', content: '是否解除绑定信息',
...@@ -151,24 +147,71 @@ ...@@ -151,24 +147,71 @@
confirmText: "是", // 确认按钮的文字 confirmText: "是", // 确认按钮的文字
success: function (res) { success: function (res) {
if (res.confirm) { if (res.confirm) {
console.log('用户点击确定'); that.modalName=""
let data={rwid:that.rkdjlist[that.index].id}
deleteRk(data).then(e=>{
if(e){
that.$tip.toast("解除绑定信息成功")
that.apiQueryUpDrk()
}
})
} else if (res.cancel) { } else if (res.cancel) {
console.log('用户点击取消'); console.log('用户点击取消');
} }
} }
}); });
}
}, },
searchKwm(){ searchKwm(){
let that=this
this.kwmFocus=false this.kwmFocus=false
let that=this
if(!this.code){
this.$tip.toast("请输入库位码")
this.kwmFocus=true
return
}
if(this.index==-1){
this.$tip.toast("请选中一条信息")
this.kwmFocus=true
return
}
checkKwcode({code:this.code,kwid:this.rkdjlist[this.index].kwid}).then(e=>{
if(e){
if(that.code==that.rkdjlist[that.index].kwname&&e.records.zt=="L"){
return {rwid:that.rkdjlist[that.index].id,destKwid:e.records.id,text:"是否确认入库"}
}else if(e.code!=that.code&&e.records.zt=="E"){
return {rwid:that.rkdjlist[that.index].id,destKwid:e.records.id,text:"当前库位和已输库位不一致,是否入库"}
}else{
that.$tip.toast("请核对扫描和已选信息,当前状态无法入库")
}
}else{
that.code=""
}
}).then(s=>{
if(s){
that.apiCompletedRk(s)
}
})
/* 三种状态,1,对应库位入库,2,不对应库位,3,非界面的库位 */ /* 三种状态,1,对应库位入库,2,不对应库位,3,非界面的库位 */
},
apiCompletedRk(data){
let that=this
uni.showModal({ uni.showModal({
title: '提示', title: '提示',
content: '确认入库', content: data.text||"",
success: function (res) { success: function (res) {
if (res.confirm) { if (res.confirm) {
that.kwmFocus=true that.kwmFocus=true
console.log('用户点击确定'); completedRk(data).then(e=>{
if(e){
that.$tip.toast("入库成功")
that.code=""
that.apiQueryUpDrk()
}
})
} else if (res.cancel) { } else if (res.cancel) {
that.kwmFocus=true that.kwmFocus=true
console.log('用户点击取消'); console.log('用户点击取消');
...@@ -176,13 +219,37 @@ ...@@ -176,13 +219,37 @@
} }
}); });
}, },
selectTb(item,index){ longtapTb(item,index){
if(item.selected){
this.modalName="Modal" this.modalName="Modal"
}else{
if(this.rkdjlist[index].selected==true){ if(this.rkdjlist[index].selected==true){
this.rkdjlist[index].selected=false this.rkdjlist[index].selected=false
this.index=-1
/* 清除选中值 */ /* 清除选中值 */
}else{ }else{
this.rkdjlist[index].selected=true this.rkdjlist[index].selected=true
this.index=index
/* 存储选中值 */
}
/* 清除其他选中值 */
this.rkdjlist.forEach((e,eindex)=>{
if(index!=eindex){
this.rkdjlist[eindex].selected=false
}
})
this.modalName="Modal"
}
},
selectTb(item,index){
if(this.rkdjlist[index].selected==true){
this.rkdjlist[index].selected=false
this.index=-1
/* 清除选中值 */
}else{
this.rkdjlist[index].selected=true
this.index=index
/* 存储选中值 */ /* 存储选中值 */
} }
/* 清除其他选中值 */ /* 清除其他选中值 */
...@@ -191,14 +258,24 @@ ...@@ -191,14 +258,24 @@
this.rkdjlist[eindex].selected=false this.rkdjlist[eindex].selected=false
} }
}) })
console.log(this.rkdjlist)
}, },
watchInfo(){ watchInfo(){
this.$router.push({name:"putin_register"}) this.$router.push({name:"putin_register"})
}, },
// 确认按钮 // 确认按钮
/* 获取表格数据 */
apiQueryUpDrk(){
queryUpDrk().then(e=>{
if(e.records){
this.index=-1
this.rkdjlist=[]
e.records.forEach(data=>{
data.selected=false
this.rkdjlist.push(data)
})
}
})
},
hideModal(e) { hideModal(e) {
this.modalName = null this.modalName = null
}, },
...@@ -210,7 +287,7 @@ ...@@ -210,7 +287,7 @@
// 任务列表 // 任务列表
}, },
onLoad(e) { onLoad(e) {
this.apiQueryUpDrk()
} }
} }
</script> </script>
......
<template> <template>
<view class="bg-white" style="height: 100vh;"> <view class="bg-white" style="height: 100vh;">
<cu-custom bgColor="bg-gradual-blue" :isBack="true" :reWrite="'homepage'"> <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>
...@@ -70,7 +70,7 @@ ...@@ -70,7 +70,7 @@
<view class="tbtit_son">库位</view> <view class="tbtit_son">库位</view>
<view style="flex: 1;">状态</view> <view style="flex: 1;">状态</view>
</view> </view>
<view class="tbtit_row " :class="item.selected?'selected':''" v-for="(item,index) in rkdjlist" :key="index" @tap="selectTb(item,index)"> <view class="tbtit_row " :class="item.selected?'selected':''" v-for="(item,index) in rkdjlist" :key="index" @tap="selectTb(item,index)" @longtap="longtapTb(item,index)">
<view class="tbtit_row_son1">{{item.tpm}}</view> <view class="tbtit_row_son1">{{item.tpm}}</view>
<view style="flex: 1">{{item.kw}}</view> <view style="flex: 1">{{item.kw}}</view>
<view class="tbtit_row_son3">{{item.zt}}</view> <view class="tbtit_row_son3">{{item.zt}}</view>
...@@ -132,7 +132,8 @@ ...@@ -132,7 +132,8 @@
kw:100031, kw:100031,
zt:'zt', zt:'zt',
selected:false selected:false
}] }],
clicknum:0
} }
}, },
filters: { filters: {
...@@ -174,8 +175,28 @@ ...@@ -174,8 +175,28 @@
} }
}); });
}, },
selectTb(item,index){ longtapTb(item,index){
if(item.selected){
this.modalName="Modal"
}else{
if(this.rkdjlist[index].selected==true){
this.rkdjlist[index].selected=false
/* 清除选中值 */
}else{
this.rkdjlist[index].selected=true
/* 存储选中值 */
}
/* 清除其他选中值 */
this.rkdjlist.forEach((e,eindex)=>{
if(index!=eindex){
this.rkdjlist[eindex].selected=false
}
})
this.modalName="Modal" this.modalName="Modal"
}
},
selectTb(item,index){
if(this.rkdjlist[index].selected==true){ if(this.rkdjlist[index].selected==true){
this.rkdjlist[index].selected=false this.rkdjlist[index].selected=false
/* 清除选中值 */ /* 清除选中值 */
...@@ -189,7 +210,6 @@ ...@@ -189,7 +210,6 @@
this.rkdjlist[eindex].selected=false this.rkdjlist[eindex].selected=false
} }
}) })
console.log(this.rkdjlist)
}, },
watchInfo(){ watchInfo(){
this.$router.push({name:"putin_register"}) this.$router.push({name:"putin_register"})
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
<view class="tbtit_son">库位</view> <view class="tbtit_son">库位</view>
<view style="flex: 1;">状态</view> <view style="flex: 1;">状态</view>
</view> </view>
<view class="tbtit_row " :class="item.selected?'selected':''" v-for="(item,index) in rkdjlist" :key="index" @tap="selectTb(item,index)"> <view class="tbtit_row " :class="item.selected?'selected':''" v-for="(item,index) in rkdjlist" :key="index" @tap="selectTb(item,index)" @longtap="longtapTb(item,index)">
<view class="tbtit_row_son1">{{item.tpm}}</view> <view class="tbtit_row_son1">{{item.tpm}}</view>
<view style="flex: 1">{{item.kw}}</view> <view style="flex: 1">{{item.kw}}</view>
<view class="tbtit_row_son3">{{item.zt}}</view> <view class="tbtit_row_son3">{{item.zt}}</view>
...@@ -106,8 +106,28 @@ ...@@ -106,8 +106,28 @@
} }
}); });
}, },
selectTb(item,index){ longtapTb(item,index){
if(item.selected){
this.modalName="Modal"
}else{
if(this.rkdjlist[index].selected==true){
this.rkdjlist[index].selected=false
/* 清除选中值 */
}else{
this.rkdjlist[index].selected=true
/* 存储选中值 */
}
/* 清除其他选中值 */
this.rkdjlist.forEach((e,eindex)=>{
if(index!=eindex){
this.rkdjlist[eindex].selected=false
}
})
this.modalName="Modal" this.modalName="Modal"
}
},
selectTb(item,index){
if(this.rkdjlist[index].selected==true){ if(this.rkdjlist[index].selected==true){
this.rkdjlist[index].selected=false this.rkdjlist[index].selected=false
/* 清除选中值 */ /* 清除选中值 */
...@@ -121,7 +141,6 @@ ...@@ -121,7 +141,6 @@
this.rkdjlist[eindex].selected=false this.rkdjlist[eindex].selected=false
} }
}) })
console.log(this.rkdjlist)
}, },
watchInfo(){ watchInfo(){
this.$router.push({name:"putin_register"}) this.$router.push({name:"putin_register"})
......
...@@ -2,12 +2,8 @@ ...@@ -2,12 +2,8 @@
<view> <view>
<scroll-view scroll-y class="page"> <scroll-view scroll-y class="page">
<!-- 头部logo--> <!-- 头部logo-->
<view class="UCenter-bg" @click="remove"> <view class="UCenter-bg" >
<image :src="personalList.avatar" round class="png animation-slide-right margin-bottom-sm" mode="widthFix" :style="[{animationDelay: '0.1s'}]"></image> <img src="/static/home/u3.png" alt="" style="height: 100%;width: 100%;" srcset="">
<view class="text-xl animation-slide-left" :style="[{animationDelay: '0.2s'}]">
{{personalList.depart}}
</view>
<image src="/static/wave.gif" mode="scaleToFill" class="gif-wave"></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'}]">
......
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