弹框
This commit is contained in:
@@ -11,22 +11,67 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="box2 buttons_wrapper">
|
<div class="box2 buttons_wrapper">
|
||||||
<button class="button_control" @click="toSure('3')"><p>{{ $t('carrypoint.button1') }}</p></button>
|
<button class="button_control" @click="toSure(selectObj.point_code, '3')"><p>{{ $t('carrypoint.button1') }}</p></button>
|
||||||
<button class="button_control" @click="toSure('4')"><p>{{ $t('carrypoint.button2') }}</p></button>
|
<button class="button_control" @click="toSure(selectObj.point_code, '4')"><p>{{ $t('carrypoint.button2') }}</p></button>
|
||||||
<button class="button_control" @click="toSure('1')"><p>{{ $t('carrypoint.button3') }}</p></button>
|
<button class="button_control" @click="showDialog('1')"><p>{{ $t('carrypoint.button3') }}</p></button>
|
||||||
<button class="button_control" @click="toSure('1')"><p>{{ $t('carrypoint.button4') }}</p></button>
|
<button class="button_control" @click="toSure(selectObj.point_code, '1')"><p>{{ $t('carrypoint.button4') }}</p></button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<jxDialog
|
||||||
|
ref="child"
|
||||||
|
:title="$t('carrypoint.dialoginfo')"
|
||||||
|
:type="type"
|
||||||
|
:unclick="unclick"
|
||||||
|
@toSure="toSureDialog"
|
||||||
|
@toCancle="toCancle"
|
||||||
|
>
|
||||||
|
<div v-if="type === '1' || type === '2'" class="form_wraper">
|
||||||
|
<div class="form">
|
||||||
|
<div class="form_item">
|
||||||
|
<div class="form_item__label"><i>*</i>{{ $t('carrypoint.pointcode') }}</div>
|
||||||
|
<div class="form_item__content">
|
||||||
|
<!-- <input type="text" class="form_item__input" v-model="pointcode" @focus="show" data-layout="normal"> -->
|
||||||
|
<keyboard-input
|
||||||
|
inputClass="form_item__input"
|
||||||
|
keyboardClass="pointcode"
|
||||||
|
:value="pointcode"
|
||||||
|
@inputChange="inputChange1"
|
||||||
|
@inputFocus="inputFocus"
|
||||||
|
></keyboard-input>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</jxDialog>
|
||||||
</div>
|
</div>
|
||||||
|
<vue-touch-keyboard id="keyboard" :options="keyoptions" v-if="visible" :layout="layout" :cancel="hide" :accept="accept" :input="input" :next="next" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import jxDialog from '@components/dialog.vue'
|
||||||
|
import KeyboardInput from '@components/keyboard-input'
|
||||||
import {queryPoint, confirmPoint} from '@/config/getData.js'
|
import {queryPoint, confirmPoint} from '@/config/getData.js'
|
||||||
export default {
|
export default {
|
||||||
name: 'CarryPoint',
|
name: 'CarryPoint',
|
||||||
|
components: {
|
||||||
|
jxDialog,
|
||||||
|
KeyboardInput
|
||||||
|
},
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
|
type: '',
|
||||||
|
title: '',
|
||||||
|
pointcode: '',
|
||||||
|
unclick: false,
|
||||||
|
disabled: false,
|
||||||
|
visible: false,
|
||||||
|
layout: 'normal',
|
||||||
|
input: null,
|
||||||
|
keyoptions: {
|
||||||
|
useKbEvents: false,
|
||||||
|
preventClickEvent: false
|
||||||
|
},
|
||||||
statusbg: false,
|
statusbg: false,
|
||||||
pkId: '',
|
pkId: '',
|
||||||
selectObj: {},
|
selectObj: {},
|
||||||
@@ -159,6 +204,39 @@ export default {
|
|||||||
this.initData()
|
this.initData()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
showDialog (type, e) {
|
||||||
|
this.type = type
|
||||||
|
this.$refs.child.active = true
|
||||||
|
switch (type) {
|
||||||
|
case '1':
|
||||||
|
this.pointcode = ''
|
||||||
|
this.remark = ''
|
||||||
|
this.unclick = true
|
||||||
|
break
|
||||||
|
}
|
||||||
|
},
|
||||||
|
toSureDialog (type) {
|
||||||
|
switch (type) {
|
||||||
|
case '1':
|
||||||
|
this.confirmPoint(this.pointcode, '1')
|
||||||
|
break
|
||||||
|
}
|
||||||
|
this.hide()
|
||||||
|
},
|
||||||
|
toCancle () {
|
||||||
|
this.hide()
|
||||||
|
},
|
||||||
|
inputFocus () {
|
||||||
|
this.visible = false
|
||||||
|
},
|
||||||
|
hide () {
|
||||||
|
this.visible = false
|
||||||
|
},
|
||||||
|
inputChange1 (val) {
|
||||||
|
// this.pointcode = val
|
||||||
|
// 限制只能输入数字
|
||||||
|
this.pointcode = val.replace(/[^\d]/g, '')
|
||||||
|
},
|
||||||
// 这个接口需要放到agv上去才行
|
// 这个接口需要放到agv上去才行
|
||||||
async initData () {
|
async initData () {
|
||||||
let res = await queryPoint()
|
let res = await queryPoint()
|
||||||
@@ -168,8 +246,8 @@ export default {
|
|||||||
this.toast(res.desc)
|
this.toast(res.desc)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async confirmPoint (type) {
|
async confirmPoint (pcode, type) {
|
||||||
let res = await confirmPoint(this.selectObj.point_code, type)
|
let res = await confirmPoint(pcode, type)
|
||||||
if (res.code === '1') {
|
if (res.code === '1') {
|
||||||
this.toast(res.desc)
|
this.toast(res.desc)
|
||||||
this.selectObj = {}
|
this.selectObj = {}
|
||||||
@@ -232,8 +310,8 @@ export default {
|
|||||||
background center / 100% 100% url(../../../images/new/bg1.png) no-repeat !important
|
background center / 100% 100% url(../../../images/new/bg1.png) no-repeat !important
|
||||||
.box2
|
.box2
|
||||||
position fixed
|
position fixed
|
||||||
left 300px
|
left 310px
|
||||||
bottom 50px
|
bottom 50px
|
||||||
.button_control p
|
.enClass .button_control p
|
||||||
font-size 28px
|
font-size 28px
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user