Commit 39b3b0da authored by 沈翠玲's avatar 沈翠玲

临时提交

parent c500d158
......@@ -4,6 +4,8 @@
<NavBar :title="$t('录入到货单')"></NavBar>
</StickyNavBar>
<view style="padding: 0 10px;">
<u-form ref="daohuoForm" :modelValue="daohuoForm" :rules="rules" labelWidth="200">
<u-form-item prop="warehouse" class="under" :label="$t('到货仓')">
<uni-data-select
......@@ -14,13 +16,17 @@
</u-form-item>
<u-form-item prop="supplierNo" class="under" :label="$t('到货供应商')">
<input
v-model="input"
v-model="daohuoForm.supplierNo"
type="text"
@confirm="inputCC"
disabled
:placeholder="$t('供应商代码')"
>
<!-- @confirm="inputCC" -->
</input>
</u-form-item>
<input style="width: 0px;height: 1px" type="text" v-model="input" :focus="isFocus" inputmode="search"
@blur="blur" @confirm="inputCC"/>
<!-- @confirm="inputCC" -->
</u-form>
<view v-if="goodsList.length > 0">{{$t('到货明细')}}</view>
</view>
......@@ -73,6 +79,7 @@ import BottomBtn from "@/components/BottomBtn/index.vue";
},
],
wxparams: "",
isFocus: false,
input: '',
loading: false,
daohuoForm: {
......@@ -84,11 +91,32 @@ import BottomBtn from "@/components/BottomBtn/index.vue";
purchaseType: { required: true, type: 'string',trigger: ['blur'], errorMessage: "11" }
},
}
},
beforeDestroy(){
},
created() {
this.warehouseList()
this.$nextTick(() => {
this.isFocus = true;
});
},
methods: {
focus(){
this.$nextTick(() => {
uni.hideKeyboard()
});
// if(plus && plus.key) {
// plus.key.hideSoftKeybord()
// }
},
blur(){
this.isFocus = false
this.$nextTick(() => {
this.isFocus = true;
});
},
warehouseList() {
this.$u.api.warehouseList().then(res => {
if(res.success) {
......@@ -103,7 +131,8 @@ import BottomBtn from "@/components/BottomBtn/index.vue";
uni.navigateBack();
},
async inputCC(e){
if(e && e.detail.value) {
console.log('asdas', e.detail.value)
if(e.detail.value && e.detail.value) {
// 2028-330-20250106001-0019-A1010004-5
if(e.detail.value.includes("-")){
const arr = e.detail.value.split("-")
......@@ -228,7 +257,7 @@ import BottomBtn from "@/components/BottomBtn/index.vue";
}
.cardbox {
min-height: calc(100vh - 520rpx);
min-height: calc(100vh - 570rpx);
padding: 0rpx 20rpx;
margin-top: 20rpx;
}
......
......@@ -85,12 +85,8 @@ import {setLocal} from '@/lang'
.then(res => {
this.loading = false;
this.$u.vuex('vuex_token', res.data.token)
this.$u.api.getInfo().then(res1 => {
if(!res1.user) this.$u.toast( i18n.t('获取用户语言失败'))
res1.user.locale ? setLocal(res1.user.locale.substring(0, 2)) : setLocal('zh')
}).catch(e => {
console.log('getInfo', e)
})
console.log('res.data', res.data)
res.data.locale ? setLocal(res.data.locale.substring(0, 2)) : setLocal('zh')
this.$u.vuex('vuex_user', res.data)
if (res.success) {
setTimeout(() => {
......
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