feat(发版):32,彩包前端校验

This commit is contained in:
chengzhaofeng 2024-11-07 10:55:00 +08:00
parent 25794c02b7
commit cf65512615
2 changed files with 48 additions and 11 deletions

View File

@ -2,8 +2,8 @@
"name" : "MES",
"appid" : "__UNI__C949EA1",
"description" : "MES",
"versionName" : "30",
"versionCode" : 30,
"versionName" : "32",
"versionCode" : 32,
"transformPx" : false,
"app-plus" : {
"compatible" : {

View File

@ -62,7 +62,6 @@
<u-row class="row">
<u-col span="3">
<view class="title">
<span class="inputRequired">*</span>
U8描述:
</view>
</u-col>
@ -73,7 +72,6 @@
<u-row class="row">
<u-col span="3">
<view class="title">
<span class="inputRequired">*</span>
SAP料号:
</view>
</u-col>
@ -408,6 +406,48 @@ export default {
bind() {
let me = this;
uni.showLoading();
if (isBlank(me.formObj.typeValue)) {
me.$u.toast('请选择包装类型!');
return;
}
if (isBlank(me.formObj.ueightCode)) {
me.$u.toast('请输入U8料号!');
return;
}
if (isBlank(me.formObj.singleVolumeLength)) {
me.$u.toast('请输入单卷米数!');
return;
}
if (isBlank(me.formObj.volumeQty)) {
me.$u.toast('请输入卷数!');
return;
}
if (isBlank(me.formObj.grade)) {
me.$u.toast('请选择等级!');
return;
}
if (isBlank(me.formObj.stage)) {
me.$u.toast('请输入阶段!');
return;
}
if (isBlank(me.printer)) {
me.$u.toast('请选择打印机!');
return;
}
if (me.formObj.customerCode === '' && me.formObj.customerRemarks === '') {
me.$u.toast('当不选择客户时,必须填写备注!');
inputFocus(this, "customerRemarks");
return;
}
let param = {
site: me.site,
u8Code: me.formObj.ueightCode,
@ -426,11 +466,6 @@ export default {
ext2: me.formObj.customerRemarks
}
if (me.formObj.customerCode === '' && me.formObj.customerRemarks === '') {
me.$u.toast('当不选择客户时,必须填写备注!');
inputFocus(this, "customerRemarks");
return;
}
if(me.errorShow || me.isLoading) {
me.$set(me, "ueightCode", "");
return
@ -443,7 +478,8 @@ export default {
uni.hideLoading();
if (res.code !== 0) {
me.$u.toast(res.msg);
inputFocus(this, "ueightCode");
uni.hideLoading();
inputFocus(this, "ueightCode");
return;
}
me.formObj.singleVolumeLength = '';
@ -461,7 +497,8 @@ export default {
}
catch(err){
console.log(err)
this.focusUeightCodeInput();
uni.hideLoading();
this.focusUeightCodeInput();
}
}
},