返回点
This commit is contained in:
@@ -14,12 +14,13 @@
|
||||
<button class="button_control" @click="toSure(selectObj.point_code, '3')"><p>{{ $t('carrypoint.button1') }}</p></button>
|
||||
<button class="button_control" @click="toSure(selectObj.point_code, '4')"><p>{{ $t('carrypoint.button2') }}</p></button>
|
||||
<button class="button_control" @click="showDialog('1')"><p>{{ $t('carrypoint.button3') }}</p></button>
|
||||
<button class="button_control" @click="toSure(selectObj.point_code, '1')"><p>{{ $t('carrypoint.button4') }}</p></button>
|
||||
<!-- <button class="button_control" @click="toSure(selectObj.point_code, '1')"><p>{{ $t('carrypoint.button4') }}</p></button> -->
|
||||
<button class="button_control" @click="showDialog('2')"><p>{{ $t('carrypoint.button4') }}</p></button>
|
||||
</div>
|
||||
</div>
|
||||
<jxDialog
|
||||
ref="child"
|
||||
:title="$t('carrypoint.dialoginfo')"
|
||||
:title="type === '1' ? $t('carrypoint.dialoginfo') : $t('carrypoint.dialogtip')"
|
||||
:type="type"
|
||||
:unclick="unclick"
|
||||
@toSure="toSureDialog"
|
||||
@@ -42,6 +43,23 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="type === '2'" class="form_wraper">
|
||||
<div class="form">
|
||||
<div class="form_item">
|
||||
<div class="form_item__label">{{ $t('carrypoint.returnsite') }}</div>
|
||||
<div class="form_item__content">
|
||||
<el-select v-model="value" filterable :placeholder="$t('common.pleaseselect')">
|
||||
<el-option
|
||||
v-for="item in options"
|
||||
:key="item.point_code"
|
||||
:label="$i18n.locale === 'en-us' ? item.en_code_name : item.code_name"
|
||||
:value="item.point_code">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</jxDialog>
|
||||
</div>
|
||||
<vue-touch-keyboard id="keyboard" :options="keyoptions" v-if="visible" :layout="layout" :cancel="hide" :accept="accept" :input="input" :next="next" />
|
||||
@@ -75,14 +93,16 @@ export default {
|
||||
statusbg: false,
|
||||
pkId: '',
|
||||
selectObj: {},
|
||||
value: '',
|
||||
dataList: []
|
||||
// dataList: [
|
||||
// {
|
||||
// point_code: '1',
|
||||
// code_name: '18-一线起升电机'
|
||||
// point_code: '01',
|
||||
// code_name: '18-一线起升电机',
|
||||
// en_code_name: 'english-test'
|
||||
// },
|
||||
// {
|
||||
// point_code: '2',
|
||||
// point_code: '02',
|
||||
// code_name: 'A-ZD102'
|
||||
// },
|
||||
// {
|
||||
@@ -142,59 +162,43 @@ export default {
|
||||
// code_name: 'A-ZD101'
|
||||
// },
|
||||
// {
|
||||
// point_code: '10',
|
||||
// point_code: '17',
|
||||
// code_name: 'A-ZD101'
|
||||
// },
|
||||
// {
|
||||
// point_code: '11',
|
||||
// point_code: '18',
|
||||
// code_name: 'A-ZD101'
|
||||
// },
|
||||
// {
|
||||
// point_code: '12',
|
||||
// point_code: '19',
|
||||
// code_name: 'A-ZD101'
|
||||
// },
|
||||
// {
|
||||
// point_code: '13',
|
||||
// point_code: '20',
|
||||
// code_name: 'A-ZD101'
|
||||
// },
|
||||
// {
|
||||
// point_code: '14',
|
||||
// point_code: '21',
|
||||
// code_name: 'A-ZD101'
|
||||
// },
|
||||
// {
|
||||
// point_code: '15',
|
||||
// point_code: '22',
|
||||
// code_name: 'A-ZD101'
|
||||
// },
|
||||
// {
|
||||
// point_code: '16',
|
||||
// point_code: '23',
|
||||
// code_name: 'A-ZD101'
|
||||
// },
|
||||
// {
|
||||
// point_code: '10',
|
||||
// point_code: '24',
|
||||
// code_name: 'A-ZD101'
|
||||
// },
|
||||
// {
|
||||
// point_code: '11',
|
||||
// point_code: '25',
|
||||
// code_name: 'A-ZD101'
|
||||
// },
|
||||
// {
|
||||
// point_code: '12',
|
||||
// code_name: 'A-ZD101'
|
||||
// },
|
||||
// {
|
||||
// point_code: '13',
|
||||
// code_name: 'A-ZD101'
|
||||
// },
|
||||
// {
|
||||
// point_code: '14',
|
||||
// code_name: 'A-ZD101'
|
||||
// },
|
||||
// {
|
||||
// point_code: '15',
|
||||
// code_name: 'A-ZD101'
|
||||
// },
|
||||
// {
|
||||
// point_code: '16',
|
||||
// point_code: '26',
|
||||
// code_name: 'A-ZD101'
|
||||
// }
|
||||
// ]
|
||||
@@ -212,6 +216,10 @@ export default {
|
||||
this.pointcode = ''
|
||||
this.unclick = true
|
||||
break
|
||||
case '2':
|
||||
this.options = [...this.dataList]
|
||||
this.unclick = true
|
||||
break
|
||||
}
|
||||
},
|
||||
toSureDialog (type) {
|
||||
@@ -219,10 +227,23 @@ export default {
|
||||
case '1':
|
||||
this.confirmPoint(this.pointcode, '1')
|
||||
break
|
||||
case '2':
|
||||
if (this.value) {
|
||||
this.confirmPoint(this.pkId, '1', this.value)
|
||||
this.value = ''
|
||||
}
|
||||
break
|
||||
}
|
||||
this.hide()
|
||||
},
|
||||
toCancle () {
|
||||
toCancle (type) {
|
||||
switch (type) {
|
||||
case '1':
|
||||
break
|
||||
case '2':
|
||||
this.confirmPoint(this.pkId, '1', '')
|
||||
this.value = ''
|
||||
break
|
||||
}
|
||||
this.hide()
|
||||
},
|
||||
inputFocus () {
|
||||
@@ -245,16 +266,16 @@ export default {
|
||||
this.toast(res.desc)
|
||||
}
|
||||
},
|
||||
async confirmPoint (pcode, type) {
|
||||
let res = await confirmPoint(pcode, type)
|
||||
async confirmPoint (pcode, type, ncode) {
|
||||
let res = await confirmPoint(pcode, type, ncode)
|
||||
if (res.code === '1') {
|
||||
this.toast(res.desc)
|
||||
this.selectObj = {}
|
||||
this.$refs.child.active = false
|
||||
this.$refs.child.disabled = false
|
||||
} else {
|
||||
this.toast(res.desc)
|
||||
}
|
||||
this.$refs.child.active = false
|
||||
this.$refs.child.disabled = false
|
||||
},
|
||||
toRadio (e) {
|
||||
this.pkId = this.pkId === e.point_code ? '' : e.point_code
|
||||
|
||||
Reference in New Issue
Block a user