Commit 6b8197c5 by LJM

提示

parent 18ba86ef
Showing with 17 additions and 2 deletions
......@@ -104,7 +104,7 @@
</view>
</view>
</view>
<view class="btn row rowCenter verCenter" @click="submit()">确认提交</view>
<view class="btn row rowCenter verCenter" @click="submit()" :class="{ disabled: disabled }">确认提交</view>
</view>
</template>
......@@ -220,6 +220,7 @@ export default {
getTallyGoods() {
this.request(API.getTallyGoods, 'GET', { erp_order_sn: this.form.erp_order_sn }, true).then(res => {
if (res.err_code === 0) {
this.disabled = false;
this.isInspOrg = Boolean(res.data.isInspOrg); //是否商检
this.list = res.data.entrys;
const length = res.data.entrys.length;
......@@ -230,6 +231,7 @@ export default {
goods_check_pic: ''
}));
} else {
this.disabled = true;
this.list = [];
uni.showToast({
title: res.err_msg,
......@@ -447,7 +449,7 @@ export default {
}
if (this.disabled) {
uni.showModal({
content: '该入仓号已经理货,禁止重复理货',
content: '请检查该入仓号是否正确',
showCancel: false
});
return false;
......@@ -473,6 +475,19 @@ export default {
});
return false;
}
if (this.isInspOrg) {
// 使用every方法检查每个子数组是否满足条件
var isValid = this.goods_check_pic_list.every(subArray => subArray.length >= 2);
if (!isValid) {
uni.showModal({
content: '商检图片上传须大于2张',
showCancel: false
});
return false;
}
}
this.request(API.submitTallyGoods, 'POST', this.form, true).then(res => {
if (res.err_code === 0) {
uni.showModal({
......
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 sign in to comment