Commit b28cfd4d authored by huhaiqing's avatar huhaiqing

修复海运缺陷单

parent 2a6cd853
...@@ -103,6 +103,9 @@ service.interceptors.response.use(res => { ...@@ -103,6 +103,9 @@ service.interceptors.response.use(res => {
+ '<div>5 分钟搭建本地环境</div>', + '<div>5 分钟搭建本地环境</div>',
}) })
return Promise.reject(new Error(msg)) return Promise.reject(new Error(msg))
} else if (code === 555) {
// 额外情况
return Promise.reject(res.data)
} else if (code !== 200) { } else if (code !== 200) {
Notification.error({ Notification.error({
title: msg title: msg
......
...@@ -193,7 +193,7 @@ ...@@ -193,7 +193,7 @@
</div> </div>
</div> </div>
</el-row> </el-row>
<el-pagination background layout="prev, pager, next" :page-size="pageParam.pageSize" :total="total" @current-change="pageChange" v-show="total > 0"></el-pagination> <el-pagination background layout="prev, pager, next" :current-page="pageParam.pageNo" :page-size="pageParam.pageSize" :total="total" @current-change="pageChange" v-show="total > 0"></el-pagination>
<el-scrollbar style="height:calc(100% - 75px)"> <el-scrollbar style="height:calc(100% - 75px)">
<el-row v-for="(item, index) in toBePreList" :key="index" class="tobePre-row"> <el-row v-for="(item, index) in toBePreList" :key="index" class="tobePre-row">
<el-row class="preinstall-title order-title"> <el-row class="preinstall-title order-title">
...@@ -581,9 +581,11 @@ export default { ...@@ -581,9 +581,11 @@ export default {
createGoods(params).then((res) => { createGoods(params).then((res) => {
serviceMsg(res, this).then(() => { serviceMsg(res, this).then(() => {
this.queryAllData(); this.queryAllData();
}).catch(() => { })
}).catch((res) => {
if(res.code === 555) { if(res.code === 555) {
this.$confirm(res.msg, this.$t("提示"), { const msg = res.msg && res.msg.replaceAll(',',"");
this.$confirm(msg, this.$t("提示"), {
type: "warning", type: "warning",
}) })
.then((_) => { .then((_) => {
...@@ -596,7 +598,6 @@ export default { ...@@ -596,7 +598,6 @@ export default {
.catch((_) => {}); .catch((_) => {});
} }
}); });
});
} else { } else {
let params = { let params = {
secId: part.id, secId: part.id,
...@@ -634,8 +635,8 @@ export default { ...@@ -634,8 +635,8 @@ export default {
}, },
/* 查询所有数据 */ /* 查询所有数据 */
queryAllData() { queryAllData() {
this.getSecGoods();
this.pageParam.pageNo = 1; this.pageParam.pageNo = 1;
this.getSecGoods();
this.getPreLoad(); this.getPreLoad();
}, },
/* 获取参数 */ /* 获取参数 */
......
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
<script> <script>
import { createError } from "@/api/ecw/boxSea"; import { createError } from "@/api/ecw/boxSea";
import { serviceMsg } from "../../utils"; import { serviceMsg } from "../../utils";
import { debounce } from "throttle-debounce";
/** /**
* 卸柜异常 * 卸柜异常
*/ */
...@@ -41,8 +42,12 @@ export default { ...@@ -41,8 +42,12 @@ export default {
return { return {
// 校验 // 校验
rules: { rules: {
exceptionType: [{ required: true, message: this.$t("必填"), trigger: "change" }], exceptionType: [
productNum: [{ required: true, message: this.$t("必填"), trigger: "change" }], { required: true, message: this.$t("必填"), trigger: "change" },
],
productNum: [
{ required: true, message: this.$t("必填"), trigger: "change" },
],
}, },
// 异常对象 // 异常对象
errorObj: { errorObj: {
...@@ -54,7 +59,7 @@ export default { ...@@ -54,7 +59,7 @@ export default {
}, },
methods: { methods: {
/** 提交 */ /** 提交 */
onSubmit() { onSubmit: debounce(340, function onSubmit() {
this.$refs["errorForm"].validate((valid) => { this.$refs["errorForm"].validate((valid) => {
if (valid) { if (valid) {
const { productNum = 0 } = this.errorObj; const { productNum = 0 } = this.errorObj;
...@@ -74,7 +79,7 @@ export default { ...@@ -74,7 +79,7 @@ export default {
}); });
} }
}); });
}, }),
}, },
}; };
</script> </script>
......
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