Commit 3f8aabe5 authored by 沈翠玲's avatar 沈翠玲

适配条码枪

parent 023cdbc3
......@@ -16,8 +16,12 @@
<view>
<u-form :model="tableParams" labelAlign="right" class="tableForm">
<u-form-item :label="$t('扫码')" label-width="50px" name="arrangeCode">
<uni-easyinput type="text" suffixIcon="scan" v-model="tableParams.arrangeCode" style="width: 200px"
@iconClick="iconClickArrangeCode" @confirm="getTaskList()" :placeholder="$t('请输入工单编号或编排单号')" />
<!-- <uni-easyinput type="text" suffixIcon="scan" :focus="isFocus" v-model="tableParams.arrangeCode" style="width: 200px"
@iconClick="iconClickArrangeCode" @confirm="confirmArrange($event)" :placeholder="$t('请输入工单编号或编排单号')" /> -->
<view class="public-input">
<u-input v-model="tableParams.arrangeCode" @confirm="confirmArrange($event)" :placeholder="$t('请输入工单编号或编排单号')" :clearable="false" />
<uni-icons color="rgb(209 206 206)" type="scan" size="20" @click="iconClickArrangeCode"></uni-icons>
</view>
</u-form-item>
<u-form-item name="allowProduce" label-width="80px" :label="$t('当前可加工')">
<uni-data-checkbox v-model="tableParams.allowProduce" @change="getTaskList()"
......@@ -135,8 +139,10 @@
</u-col>
<u-col :span="6" v-if="feedback.isSerialReport && Number(feedback.isSerialReport) === 1">
<u-form-item :label="$t('序列号:')" name="qrcode">
<uni-easyinput type="text" suffixIcon="scan" v-model="feedback.qrcode" style="width: 200px" @change="onQrcodechange"
@iconClick="iconClickQrcode" :placeholder="$t('请输入序列号')" @focus="feedback.oldqrcode = feedback.qrcode" />
<view class="public-input" style="width: 100%;">
<u-input v-model="feedback.qrcode" @confirm="onQrcodechange($event)" @focus="feedback.oldqrcode = feedback.qrcode" :placeholder="$t('请输入序列号')" :clearable="false" />
<uni-icons color="rgb(209 206 206)" type="scan" size="20" @click="iconClickQrcode"></uni-icons>
</view>
</u-form-item>
</u-col>
</u-row>
......@@ -818,6 +824,7 @@ export default {
materialRequestVisible: false,
materialReturnVisible: false,
materialReturn: false,
isFocus: false,
stockInVisible: false,
material: false,
feedingInspectionList: [],
......@@ -1278,6 +1285,7 @@ export default {
});
},
onQrcodechange(val){
this.feedbackForms[0]['qrcode'] = val
if (!val) return
const datas = Object.assign({}, this.feedbackForms[0]);
this.$u.api.validateSerialNo({
......@@ -1695,11 +1703,21 @@ export default {
});
});
},
confirmArrange (e) {
console.log('e', e)
this.isFocus = false;
this.tableParams.arrangeCode = e
this.getTaskList(this.tableParams)
},
getTaskList(params) {
this.form = {};
const t = this;
this.tableData = [];
this.$nextTick(() => {
if(this.$refs['zbtable']) {
this.$refs['zbtable'].selectArr = []
}
})
this.tableSelectData = []
let apires
if(this.isWaiXie) {
......@@ -1719,6 +1737,7 @@ export default {
})
}
apires.then((res) => {
this.isFocus = true;
if (res.code === 200) {
let currentIndex = -1
this.$refs['zbtable'].bodyScrollTop = 0
......@@ -1727,6 +1746,11 @@ export default {
if (item.location) {
currentIndex = index
item['checked'] = true
this.$nextTick(() => {
if(this.$refs['zbtable']) {
this.$refs['zbtable'].selectArr = [item]
}
})
this.tableSelectData.push(item)
}
const returnPra = {
......
......@@ -31,4 +31,11 @@ body {
}
uni-modal {
z-index: 999999 !important;
}
.public-input {
border: 1px solid #fff;
padding: 0 20rpx;
border-color: rgb(229, 229, 229);
background-color: rgb(255, 255, 255);
display: flex;
}
\ No newline at end of file
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