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

临时提交

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