Commit 644948ee authored by 沈翠玲's avatar 沈翠玲

优化

parent 38bf73ee
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
<u-form-item prop="cc002" class="under"> <u-form-item prop="cc002" class="under">
<input <input
v-model="daohuoForm.cc002" v-model="daohuoForm.cc002"
:focus="isFocus"
type="text" type="text"
:placeholder="$t('到货单号')" :placeholder="$t('到货单号')"
@confirm="inputCC" @confirm="inputCC"
...@@ -54,6 +55,7 @@ import i18n from '../../lang/index' ...@@ -54,6 +55,7 @@ import i18n from '../../lang/index'
show: true, show: true,
wxparams: "", wxparams: "",
loading: false, loading: false,
isFocus: false,
daohuoForm: { daohuoForm: {
cc001: "3701", cc001: "3701",
cc002: "" cc002: ""
...@@ -65,6 +67,10 @@ import i18n from '../../lang/index' ...@@ -65,6 +67,10 @@ import i18n from '../../lang/index'
} }
}, },
created() { created() {
this.$nextTick(() => {
this.isFocus = true;
uni.hideKeyboard()
});
}, },
methods: { methods: {
inputCC(e){ inputCC(e){
......
...@@ -111,7 +111,10 @@ import i18n from '../../lang/index' ...@@ -111,7 +111,10 @@ import i18n from '../../lang/index'
}) })
.then(res => { .then(res => {
if (res.success) { if (res.success) {
this.$u.toast(i18n.t('提交成功'));
setTimeout(()=> {
this.goMypage('pages/abnormalRemove/abnormalRemove') this.goMypage('pages/abnormalRemove/abnormalRemove')
}, 200)
} }
}) })
} }
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
<!-- @confirm="inputCC" --> <!-- @confirm="inputCC" -->
</input> </input>
</u-form-item> </u-form-item>
<input style="width: 100px;height: 20px" type="text" v-model="input" :focus="isFocus" inputmode="search" <input style="width: 100px;height: 20px" type="text" v-model="input" :focus="isFocus" @focus="focus"
@blur="blur" @confirm="inputCC"/> @blur="blur" @confirm="inputCC"/>
<!-- @confirm="inputCC" --> <!-- @confirm="inputCC" -->
</u-form> </u-form>
...@@ -104,15 +104,10 @@ import BottomBtn from "@/components/BottomBtn/index.vue"; ...@@ -104,15 +104,10 @@ import BottomBtn from "@/components/BottomBtn/index.vue";
}, },
methods: { methods: {
focus(){ focus(){
this.$nextTick(() => {
uni.hideKeyboard()
});
// if(plus && plus.key) {
// plus.key.hideSoftKeybord()
// }
}, },
blur(){ blur(){
this.isFocus = false this.isFocus = false;
this.$nextTick(() => { this.$nextTick(() => {
this.isFocus = true; this.isFocus = true;
}); });
...@@ -131,7 +126,7 @@ import BottomBtn from "@/components/BottomBtn/index.vue"; ...@@ -131,7 +126,7 @@ import BottomBtn from "@/components/BottomBtn/index.vue";
uni.navigateBack(); uni.navigateBack();
}, },
async inputCC(e){ async inputCC(e){
console.log('asdas', e.detail.value) console.log('asdas', e.detail.value, this.input)
if(e.detail.value && 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("-")){
...@@ -167,8 +162,11 @@ import BottomBtn from "@/components/BottomBtn/index.vue"; ...@@ -167,8 +162,11 @@ import BottomBtn from "@/components/BottomBtn/index.vue";
} }
this.input = '' this.input = ''
this.daohuoForm.supplierNo = arr[0] this.daohuoForm.supplierNo = arr[0]
} else {
this.input = ''
} }
} else { } else {
this.input = ''
} }
} }
}, },
......
...@@ -80,6 +80,11 @@ import i18n from '../../lang/index' ...@@ -80,6 +80,11 @@ import i18n from '../../lang/index'
onLoad(option) { onLoad(option) {
if (option.info) { if (option.info) {
let data = JSON.parse(decodeURIComponent(option.info)); let data = JSON.parse(decodeURIComponent(option.info));
data.purcds.forEach(element => {
if(!element['cd018']) {
element['cd018'] = element['cd008']
}
});
this.chargaArr = data.purcds this.chargaArr = data.purcds
this.info = data this.info = data
} }
...@@ -108,7 +113,10 @@ import i18n from '../../lang/index' ...@@ -108,7 +113,10 @@ import i18n from '../../lang/index'
}) })
.then(res => { .then(res => {
if (res.success) { if (res.success) {
this.$u.toast(i18n.t('提交成功'));
setTimeout(()=> {
this.goMypage('pages/forcheck/forcheckMain') this.goMypage('pages/forcheck/forcheckMain')
}, 200)
} }
}) })
} }
......
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
<u-form-item prop="cc002" class="under"> <u-form-item prop="cc002" class="under">
<input <input
v-model="daohuoForm.cc002" v-model="daohuoForm.cc002"
:focus="isFocus"
type="text" type="text"
:placeholder="$t('到货单号')" :placeholder="$t('到货单号')"
@confirm="inputCC" @confirm="inputCC"
...@@ -52,6 +53,7 @@ import i18n from '../../lang/index' ...@@ -52,6 +53,7 @@ import i18n from '../../lang/index'
number: 0, number: 0,
totalNum: 0, totalNum: 0,
show: true, show: true,
isFocus: false,
wxparams: "", wxparams: "",
loading: false, loading: false,
daohuoForm: { daohuoForm: {
...@@ -65,6 +67,10 @@ import i18n from '../../lang/index' ...@@ -65,6 +67,10 @@ import i18n from '../../lang/index'
} }
}, },
created() { created() {
this.$nextTick(() => {
this.isFocus = true;
uni.hideKeyboard()
});
}, },
methods: { methods: {
inputCC(e){ inputCC(e){
......
...@@ -143,7 +143,7 @@ import i18n from '../../lang/index' ...@@ -143,7 +143,7 @@ import i18n from '../../lang/index'
}, },
submit(){ submit(){
const purcdPrintParamsList = this.chargaArr.map(v => ({cd001: v.cd001, cd002: v.cd002, cd003: v.cd003, th009: v.th009, th010: v.th010, th015: v.th015, th016: v.th016, th017: v.th017, th072: v.th072})) const purcdPrintParamsList = this.chargaArr.map(v => ({cd001: v.cd001, cd002: v.cd002, cd003: v.cd003, th009: v.th009, th010: v.th010, th015: v.th015, th016: v.th016, th017: v.th017, th072: v.th072}))
this.$u.api.purcccheck({ this.$u.api.purtgcreate({
cc001: this.info.cc001, cc001: this.info.cc001,
cc002: this.info.cc002, cc002: this.info.cc002,
tg001: this.form.tg001, tg001: this.form.tg001,
...@@ -151,7 +151,10 @@ import i18n from '../../lang/index' ...@@ -151,7 +151,10 @@ import i18n from '../../lang/index'
}) })
.then(res => { .then(res => {
if (res.success) { if (res.success) {
this.$u.toast(i18n.t('提交成功'));
setTimeout(()=> {
this.goMypage('pages/forcreate/Main') this.goMypage('pages/forcreate/Main')
}, 200)
} }
}) })
} }
......
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
<input <input
v-model="daohuoForm.cc002" v-model="daohuoForm.cc002"
type="text" type="text"
:focus="isFocus"
@confirm="inputCC" @confirm="inputCC"
:placeholder="$t('到货单号')" :placeholder="$t('到货单号')"
> >
...@@ -54,6 +55,7 @@ import i18n from '../../lang/index' ...@@ -54,6 +55,7 @@ import i18n from '../../lang/index'
show: true, show: true,
wxparams: "", wxparams: "",
loading: false, loading: false,
isFocus: false,
daohuoForm: { daohuoForm: {
cc001: "3701", cc001: "3701",
cc002: "" cc002: ""
...@@ -65,6 +67,10 @@ import i18n from '../../lang/index' ...@@ -65,6 +67,10 @@ import i18n from '../../lang/index'
} }
}, },
created() { created() {
this.$nextTick(() => {
this.isFocus = true;
uni.hideKeyboard()
});
}, },
methods: { methods: {
inputCC(e){ inputCC(e){
......
...@@ -116,7 +116,10 @@ import i18n from '../../lang/index' ...@@ -116,7 +116,10 @@ import i18n from '../../lang/index'
}) })
.then(res => { .then(res => {
if (res.success) { if (res.success) {
this.$u.toast(i18n.t('提交成功'));
setTimeout(()=> {
this.goMypage('pages/forprint/Main') this.goMypage('pages/forprint/Main')
}, 200)
} }
}) })
} }
......
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
<input <input
v-model="daohuoForm.th002" v-model="daohuoForm.th002"
type="text" type="text"
:focus="isFocus"
@confirm="inputCC" @confirm="inputCC"
:placeholder="$t('委外进货单号')" :placeholder="$t('委外进货单号')"
> >
...@@ -54,6 +55,7 @@ import i18n from '../../lang/index' ...@@ -54,6 +55,7 @@ import i18n from '../../lang/index'
show: true, show: true,
wxparams: "", wxparams: "",
loading: false, loading: false,
isFocus: false,
daohuoForm: { daohuoForm: {
th001: "5901", th001: "5901",
th002: "" th002: ""
...@@ -65,6 +67,10 @@ import i18n from '../../lang/index' ...@@ -65,6 +67,10 @@ import i18n from '../../lang/index'
} }
}, },
created() { created() {
this.$nextTick(() => {
this.isFocus = true;
uni.hideKeyboard()
});
}, },
methods: { methods: {
inputCC(e){ inputCC(e){
......
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
<input <input
v-model="daohuoForm.mb001" v-model="daohuoForm.mb001"
type="text" type="text"
:focus="isFocus"
@confirm="inputCC" @confirm="inputCC"
:placeholder="$t('品号')" :placeholder="$t('品号')"
> >
...@@ -43,6 +44,7 @@ import i18n from '../../lang/index' ...@@ -43,6 +44,7 @@ import i18n from '../../lang/index'
number: 0, number: 0,
totalNum: 0, totalNum: 0,
show: true, show: true,
isFocus: false,
wxparams: "", wxparams: "",
loading: false, loading: false,
daohuoForm: { daohuoForm: {
...@@ -51,6 +53,10 @@ import i18n from '../../lang/index' ...@@ -51,6 +53,10 @@ import i18n from '../../lang/index'
} }
}, },
created() { created() {
this.$nextTick(() => {
this.isFocus = true;
uni.hideKeyboard()
});
}, },
methods: { methods: {
inputCC(e){ inputCC(e){
......
...@@ -145,7 +145,10 @@ import i18n from '../../lang/index' ...@@ -145,7 +145,10 @@ import i18n from '../../lang/index'
}) })
.then(res => { .then(res => {
if (res.success) { if (res.success) {
this.$u.toast(i18n.t('提交成功'));
setTimeout(()=> {
this.goMypage('pages/moctcforcreate/Main') this.goMypage('pages/moctcforcreate/Main')
}, 200)
} }
}) })
} }
......
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
v-model="daohuoForm.ta002" v-model="daohuoForm.ta002"
type="text" type="text"
@confirm="inputCC" @confirm="inputCC"
:focus="isFocus"
:placeholder="$t('工单单号')" :placeholder="$t('工单单号')"
> >
</input> </input>
...@@ -51,6 +52,7 @@ export default { ...@@ -51,6 +52,7 @@ export default {
return { return {
number: 0, number: 0,
totalNum: 0, totalNum: 0,
isFocus: false,
show: true, show: true,
wxparams: "", wxparams: "",
loading: false, loading: false,
...@@ -65,6 +67,10 @@ export default { ...@@ -65,6 +67,10 @@ export default {
} }
}, },
created() { created() {
this.$nextTick(() => {
this.isFocus = true;
uni.hideKeyboard()
});
}, },
methods: { methods: {
inputCC(e){ inputCC(e){
......
...@@ -116,7 +116,10 @@ import i18n from '../../lang/index' ...@@ -116,7 +116,10 @@ import i18n from '../../lang/index'
}) })
.then(res => { .then(res => {
if (res.success) { if (res.success) {
this.$u.toast(i18n.t('提交成功'));
setTimeout(()=> {
this.goMypage('pages/mocthforcheck/Main') this.goMypage('pages/mocthforcheck/Main')
}, 200)
} }
}) })
} }
......
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
<u-form-item prop="th002" class="under"> <u-form-item prop="th002" class="under">
<input <input
v-model="daohuoForm.th002" v-model="daohuoForm.th002"
:focus="isFocus"
type="text" type="text"
@confirm="inputCC" @confirm="inputCC"
:placeholder="$t('委外进货单号')" :placeholder="$t('委外进货单号')"
...@@ -54,6 +55,7 @@ import i18n from '../../lang/index' ...@@ -54,6 +55,7 @@ import i18n from '../../lang/index'
show: true, show: true,
wxparams: "", wxparams: "",
loading: false, loading: false,
isFocus: false,
daohuoForm: { daohuoForm: {
th001: "5901", th001: "5901",
th002: "" th002: ""
...@@ -65,6 +67,10 @@ import i18n from '../../lang/index' ...@@ -65,6 +67,10 @@ import i18n from '../../lang/index'
} }
}, },
created() { created() {
this.$nextTick(() => {
this.isFocus = true;
uni.hideKeyboard()
});
}, },
methods: { methods: {
inputCC(e){ inputCC(e){
......
...@@ -132,7 +132,10 @@ import i18n from '../../lang/index' ...@@ -132,7 +132,10 @@ import i18n from '../../lang/index'
}) })
.then(res => { .then(res => {
if (res.success) { if (res.success) {
this.$u.toast(i18n.t('提交成功'));
setTimeout(()=> {
this.goMypage('pages/mocthgetforputon/Main') this.goMypage('pages/mocthgetforputon/Main')
}, 200)
} }
}) })
} }
......
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
<input <input
v-model="daohuoForm.th002" v-model="daohuoForm.th002"
type="text" type="text"
:focus="isFocus"
@confirm="inputCC" @confirm="inputCC"
:placeholder="$t('委外进货单号')" :placeholder="$t('委外进货单号')"
> >
...@@ -54,6 +55,7 @@ import i18n from '../../lang/index' ...@@ -54,6 +55,7 @@ import i18n from '../../lang/index'
show: true, show: true,
wxparams: "", wxparams: "",
loading: false, loading: false,
isFocus: false,
daohuoForm: { daohuoForm: {
th001: "5901", th001: "5901",
th002: "" th002: ""
...@@ -65,6 +67,10 @@ import i18n from '../../lang/index' ...@@ -65,6 +67,10 @@ import i18n from '../../lang/index'
} }
}, },
created() { created() {
this.$nextTick(() => {
this.isFocus = true;
uni.hideKeyboard()
});
}, },
methods: { methods: {
inputCC(e){ inputCC(e){
......
...@@ -45,10 +45,13 @@ export default { ...@@ -45,10 +45,13 @@ export default {
}; };
}, },
created() { created() {
this.$nextTick(() => {
this.isFocus = true;
uni.hideKeyboard()
});
}, },
methods: { methods: {
handleConfirm(e) { handleConfirm(e) {
this.isFocus = false;
e && this.getPlnr(e); e && this.getPlnr(e);
// uni.navigateTo({ // uni.navigateTo({
// url: `/pages/saleck/saleckList?order=${e}` // url: `/pages/saleck/saleckList?order=${e}`
...@@ -60,15 +63,11 @@ export default { ...@@ -60,15 +63,11 @@ export default {
saleOutNo: VBELN saleOutNo: VBELN
}) })
.then(({data, errorMessage}) => { .then(({data, errorMessage}) => {
setTimeout(() => {
this.isFocus = true;
}, 1000);
if (data && data.applyNo) { if (data && data.applyNo) {
uni.navigateTo({ uni.navigateTo({
url: `/pages/saleck/saleckList?order=${VBELN}` url: `/pages/saleck/saleckList?order=${VBELN}`
}); });
} else { } else {
// 删除本地缓存的单号
this.$u.toast(errorMessage); this.$u.toast(errorMessage);
} }
this.loading = false; this.loading = false;
......
...@@ -98,7 +98,7 @@ export default { ...@@ -98,7 +98,7 @@ export default {
"materialNo": info.materialNo, "materialNo": info.materialNo,
"outQuantity": vvvv.outQuantity, "outQuantity": vvvv.outQuantity,
"planOutDate": info.planOutDate, "planOutDate": info.planOutDate,
"unit": info.materialNo, "unit": info.unit,
"warehouse": vvvv.ml002 "warehouse": vvvv.ml002
}) })
} }
...@@ -154,8 +154,11 @@ export default { ...@@ -154,8 +154,11 @@ export default {
data: arr data: arr
}).then(res => { }).then(res => {
if (res.success) { if (res.success) {
this.$u.toast(i18n.t('保存成功')) this.$u.toast(i18n.t('提交成功'))
setTimeout(()=>{
uni.navigateBack() uni.navigateBack()
}, 300)
} }
}) })
}, },
...@@ -174,21 +177,12 @@ export default { ...@@ -174,21 +177,12 @@ export default {
}, },
outQuantity(materialNo) { outQuantity(materialNo) {
const y = JSON.parse(JSON.stringify(this.list)) const y = JSON.parse(JSON.stringify(this.list))
const arr = y.filter(i => i.materialNo = materialNo) const arr = y.filter(i => i.materialNo === materialNo)
const num = arr.reduce((pre, cur) => pre + (cur.outQuantity ? Number(cur.outQuantity) : 0), 0) const num = arr.reduce((pre, cur) => pre + (cur.outQuantity ? Number(cur.outQuantity) : 0), 0)
return isNaN(num) ? 0 : num return isNaN(num) ? 0 : num
}, },
deleGonds(row, idx) { deleGonds(row, idx) {
this.$emit('deleGonds', row, idx); this.$emit('deleGonds', row, idx);
},
handleNum(){
let num = 0
this.list.forEach(ele => {
if(ele.ZSIZE === this.item.ZSIZE && ele.MATNR === this.item.MATNR && ele.PLNR){
num += (ele.PACMG-0)
}
});
return num
} }
} }
}; };
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
</view> </view>
<view class="search-area"> <view class="search-area">
<view class="top"> <view class="top">
<uni-easyinput v-model="value" prefixIcon="search" :placeholder="$t('请输入盘点产品号')" trim="all" /> <uni-easyinput v-model="value" prefixIcon="search" :placeholder="$t('请输入盘点产品号')" trim="all" focus/>
<button class="search-btn" :loading="loadings" @click="handleSearch">{{$t('确认')}}</button> <button class="search-btn" :loading="loadings" @click="handleSearch">{{$t('确认')}}</button>
</view> </view>
<uni-easyinput v-model="warehouse" class="warehouse-input" prefixIcon="search" <uni-easyinput v-model="warehouse" class="warehouse-input" prefixIcon="search"
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<NavBar :title="$t('库存调拨')"></NavBar> <NavBar :title="$t('库存调拨')"></NavBar>
<view class="container"> <view class="container">
<view class="search-area"> <view class="search-area">
<uni-easyinput v-model="value" prefixIcon="search" :placeholder="$t('请输入调拨产品号')" trim="all" /> <uni-easyinput v-model="value" prefixIcon="search" :placeholder="$t('请输入调拨产品号')" trim="all" focus />
<button class="search-btn" :loading="loadings" @click="handleSearch">{{$t('确认')}}</button> <button class="search-btn" :loading="loadings" @click="handleSearch">{{$t('确认')}}</button>
</view> </view>
<view class="sub-title"> <view class="sub-title">
......
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