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

优化

parent 38bf73ee
......@@ -16,6 +16,7 @@
<u-form-item prop="cc002" class="under">
<input
v-model="daohuoForm.cc002"
:focus="isFocus"
type="text"
:placeholder="$t('到货单号')"
@confirm="inputCC"
......@@ -54,6 +55,7 @@ import i18n from '../../lang/index'
show: true,
wxparams: "",
loading: false,
isFocus: false,
daohuoForm: {
cc001: "3701",
cc002: ""
......@@ -65,6 +67,10 @@ import i18n from '../../lang/index'
}
},
created() {
this.$nextTick(() => {
this.isFocus = true;
uni.hideKeyboard()
});
},
methods: {
inputCC(e){
......
......@@ -111,7 +111,10 @@ import i18n from '../../lang/index'
})
.then(res => {
if (res.success) {
this.goMypage('pages/abnormalRemove/abnormalRemove')
this.$u.toast(i18n.t('提交成功'));
setTimeout(()=> {
this.goMypage('pages/abnormalRemove/abnormalRemove')
}, 200)
}
})
}
......
......@@ -24,7 +24,7 @@
<!-- @confirm="inputCC" -->
</input>
</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"/>
<!-- @confirm="inputCC" -->
</u-form>
......@@ -104,15 +104,10 @@ import BottomBtn from "@/components/BottomBtn/index.vue";
},
methods: {
focus(){
this.$nextTick(() => {
uni.hideKeyboard()
});
// if(plus && plus.key) {
// plus.key.hideSoftKeybord()
// }
},
blur(){
this.isFocus = false
this.isFocus = false;
this.$nextTick(() => {
this.isFocus = true;
});
......@@ -131,7 +126,7 @@ import BottomBtn from "@/components/BottomBtn/index.vue";
uni.navigateBack();
},
async inputCC(e){
console.log('asdas', e.detail.value)
console.log('asdas', e.detail.value, this.input)
if(e.detail.value && e.detail.value) {
// 2028-330-20250106001-0019-A1010004-5
if(e.detail.value.includes("-")){
......@@ -167,8 +162,11 @@ import BottomBtn from "@/components/BottomBtn/index.vue";
}
this.input = ''
this.daohuoForm.supplierNo = arr[0]
} else {
this.input = ''
}
} else {
this.input = ''
}
}
},
......
......@@ -80,6 +80,11 @@ import i18n from '../../lang/index'
onLoad(option) {
if (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.info = data
}
......@@ -108,7 +113,10 @@ import i18n from '../../lang/index'
})
.then(res => {
if (res.success) {
this.goMypage('pages/forcheck/forcheckMain')
this.$u.toast(i18n.t('提交成功'));
setTimeout(()=> {
this.goMypage('pages/forcheck/forcheckMain')
}, 200)
}
})
}
......
......@@ -16,6 +16,7 @@
<u-form-item prop="cc002" class="under">
<input
v-model="daohuoForm.cc002"
:focus="isFocus"
type="text"
:placeholder="$t('到货单号')"
@confirm="inputCC"
......@@ -52,6 +53,7 @@ import i18n from '../../lang/index'
number: 0,
totalNum: 0,
show: true,
isFocus: false,
wxparams: "",
loading: false,
daohuoForm: {
......@@ -65,6 +67,10 @@ import i18n from '../../lang/index'
}
},
created() {
this.$nextTick(() => {
this.isFocus = true;
uni.hideKeyboard()
});
},
methods: {
inputCC(e){
......
......@@ -143,7 +143,7 @@ import i18n from '../../lang/index'
},
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}))
this.$u.api.purcccheck({
this.$u.api.purtgcreate({
cc001: this.info.cc001,
cc002: this.info.cc002,
tg001: this.form.tg001,
......@@ -151,7 +151,10 @@ import i18n from '../../lang/index'
})
.then(res => {
if (res.success) {
this.goMypage('pages/forcreate/Main')
this.$u.toast(i18n.t('提交成功'));
setTimeout(()=> {
this.goMypage('pages/forcreate/Main')
}, 200)
}
})
}
......
......@@ -17,6 +17,7 @@
<input
v-model="daohuoForm.cc002"
type="text"
:focus="isFocus"
@confirm="inputCC"
:placeholder="$t('到货单号')"
>
......@@ -54,6 +55,7 @@ import i18n from '../../lang/index'
show: true,
wxparams: "",
loading: false,
isFocus: false,
daohuoForm: {
cc001: "3701",
cc002: ""
......@@ -65,6 +67,10 @@ import i18n from '../../lang/index'
}
},
created() {
this.$nextTick(() => {
this.isFocus = true;
uni.hideKeyboard()
});
},
methods: {
inputCC(e){
......
......@@ -116,7 +116,10 @@ import i18n from '../../lang/index'
})
.then(res => {
if (res.success) {
this.goMypage('pages/forprint/Main')
this.$u.toast(i18n.t('提交成功'));
setTimeout(()=> {
this.goMypage('pages/forprint/Main')
}, 200)
}
})
}
......
......@@ -17,6 +17,7 @@
<input
v-model="daohuoForm.th002"
type="text"
:focus="isFocus"
@confirm="inputCC"
:placeholder="$t('委外进货单号')"
>
......@@ -54,6 +55,7 @@ import i18n from '../../lang/index'
show: true,
wxparams: "",
loading: false,
isFocus: false,
daohuoForm: {
th001: "5901",
th002: ""
......@@ -65,6 +67,10 @@ import i18n from '../../lang/index'
}
},
created() {
this.$nextTick(() => {
this.isFocus = true;
uni.hideKeyboard()
});
},
methods: {
inputCC(e){
......
......@@ -8,6 +8,7 @@
<input
v-model="daohuoForm.mb001"
type="text"
:focus="isFocus"
@confirm="inputCC"
:placeholder="$t('品号')"
>
......@@ -43,6 +44,7 @@ import i18n from '../../lang/index'
number: 0,
totalNum: 0,
show: true,
isFocus: false,
wxparams: "",
loading: false,
daohuoForm: {
......@@ -51,6 +53,10 @@ import i18n from '../../lang/index'
}
},
created() {
this.$nextTick(() => {
this.isFocus = true;
uni.hideKeyboard()
});
},
methods: {
inputCC(e){
......
......@@ -145,7 +145,10 @@ import i18n from '../../lang/index'
})
.then(res => {
if (res.success) {
this.goMypage('pages/moctcforcreate/Main')
this.$u.toast(i18n.t('提交成功'));
setTimeout(()=> {
this.goMypage('pages/moctcforcreate/Main')
}, 200)
}
})
}
......
......@@ -18,6 +18,7 @@
v-model="daohuoForm.ta002"
type="text"
@confirm="inputCC"
:focus="isFocus"
:placeholder="$t('工单单号')"
>
</input>
......@@ -51,6 +52,7 @@ export default {
return {
number: 0,
totalNum: 0,
isFocus: false,
show: true,
wxparams: "",
loading: false,
......@@ -65,6 +67,10 @@ export default {
}
},
created() {
this.$nextTick(() => {
this.isFocus = true;
uni.hideKeyboard()
});
},
methods: {
inputCC(e){
......
......@@ -116,7 +116,10 @@ import i18n from '../../lang/index'
})
.then(res => {
if (res.success) {
this.goMypage('pages/mocthforcheck/Main')
this.$u.toast(i18n.t('提交成功'));
setTimeout(()=> {
this.goMypage('pages/mocthforcheck/Main')
}, 200)
}
})
}
......
......@@ -16,6 +16,7 @@
<u-form-item prop="th002" class="under">
<input
v-model="daohuoForm.th002"
:focus="isFocus"
type="text"
@confirm="inputCC"
:placeholder="$t('委外进货单号')"
......@@ -54,6 +55,7 @@ import i18n from '../../lang/index'
show: true,
wxparams: "",
loading: false,
isFocus: false,
daohuoForm: {
th001: "5901",
th002: ""
......@@ -65,6 +67,10 @@ import i18n from '../../lang/index'
}
},
created() {
this.$nextTick(() => {
this.isFocus = true;
uni.hideKeyboard()
});
},
methods: {
inputCC(e){
......
......@@ -132,7 +132,10 @@ import i18n from '../../lang/index'
})
.then(res => {
if (res.success) {
this.goMypage('pages/mocthgetforputon/Main')
this.$u.toast(i18n.t('提交成功'));
setTimeout(()=> {
this.goMypage('pages/mocthgetforputon/Main')
}, 200)
}
})
}
......
......@@ -17,6 +17,7 @@
<input
v-model="daohuoForm.th002"
type="text"
:focus="isFocus"
@confirm="inputCC"
:placeholder="$t('委外进货单号')"
>
......@@ -54,6 +55,7 @@ import i18n from '../../lang/index'
show: true,
wxparams: "",
loading: false,
isFocus: false,
daohuoForm: {
th001: "5901",
th002: ""
......@@ -65,6 +67,10 @@ import i18n from '../../lang/index'
}
},
created() {
this.$nextTick(() => {
this.isFocus = true;
uni.hideKeyboard()
});
},
methods: {
inputCC(e){
......
......@@ -45,10 +45,13 @@ export default {
};
},
created() {
this.$nextTick(() => {
this.isFocus = true;
uni.hideKeyboard()
});
},
methods: {
handleConfirm(e) {
this.isFocus = false;
e && this.getPlnr(e);
// uni.navigateTo({
// url: `/pages/saleck/saleckList?order=${e}`
......@@ -60,15 +63,11 @@ export default {
saleOutNo: VBELN
})
.then(({data, errorMessage}) => {
setTimeout(() => {
this.isFocus = true;
}, 1000);
if (data && data.applyNo) {
uni.navigateTo({
url: `/pages/saleck/saleckList?order=${VBELN}`
});
} else {
// 删除本地缓存的单号
this.$u.toast(errorMessage);
}
this.loading = false;
......
......@@ -98,7 +98,7 @@ export default {
"materialNo": info.materialNo,
"outQuantity": vvvv.outQuantity,
"planOutDate": info.planOutDate,
"unit": info.materialNo,
"unit": info.unit,
"warehouse": vvvv.ml002
})
}
......@@ -154,8 +154,11 @@ export default {
data: arr
}).then(res => {
if (res.success) {
this.$u.toast(i18n.t('保存成功'))
uni.navigateBack()
this.$u.toast(i18n.t('提交成功'))
setTimeout(()=>{
uni.navigateBack()
}, 300)
}
})
},
......@@ -174,21 +177,12 @@ export default {
},
outQuantity(materialNo) {
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)
return isNaN(num) ? 0 : num
},
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 @@
</view>
<view class="search-area">
<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>
</view>
<uni-easyinput v-model="warehouse" class="warehouse-input" prefixIcon="search"
......
......@@ -3,7 +3,7 @@
<NavBar :title="$t('库存调拨')"></NavBar>
<view class="container">
<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>
</view>
<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