diff --git a/src/utils/strUtil.js b/src/utils/strUtil.js
index c5a88ce..85395bb 100644
--- a/src/utils/strUtil.js
+++ b/src/utils/strUtil.js
@@ -1,11 +1,11 @@
//封装字符串相关的方法
export function isBlank(value) {
- if (value === "" || value === null) {
+ if (value === "" || value === null || value === undefined) {
return true;
}
-
+ value = value + "";
value = value.trim();
- if (value === "string" || value === "undefined") {
+ if ("" === value || value === "string" || value === "undefined") {
return true;
}
}
diff --git a/src/views/basic/BasicThirdSys.vue b/src/views/basic/BasicThirdSys.vue
index 5e27c8a..e3fcafe 100644
--- a/src/views/basic/BasicThirdSys.vue
+++ b/src/views/basic/BasicThirdSys.vue
@@ -89,7 +89,7 @@
-
@@ -165,7 +165,7 @@
添加单据类型
-
+
@@ -410,6 +410,7 @@ import {getOriginBusType} from "../../api/basic/busOriginType";
import modifyDialog from "./BasicThirdSysModify";
import modifyDetailDialog from "./BasicThirdSysDetailModify";
import {filterForThirdSys} from "../../api/basic/busLocalType";
+import {isBlank} from "@/utils/strUtil";
export default {
data() {
@@ -472,7 +473,8 @@ export default {
},
thirdBuyList: [], //第三方系统单据类型,
thirdSysDetailList: [],
- selectInterfaceList: []
+ selectInterfaceList: [],
+ currentRow: null
};
},
@@ -491,6 +493,7 @@ export default {
this.getList();
},
cancelDialog() {
+ this.getDetailList(this.currentRow);
this.modifyDialogVisible = false;
this.modifyDetailDialogVisible = false;
this.modifyBusYypeDialogVisible = false;
@@ -499,6 +502,7 @@ export default {
if (row != null) {
this.thirdSysFk = row.thirdId;
}
+ this.currentRow = row;
this.getDetailList(row);
},
handleBustypeChange(row) {
@@ -575,6 +579,10 @@ export default {
});
},
onModifySubmit() {
+ if (isBlank(this.inputQuery.thirdName)) {
+ this.$message.warning("系统名称不能为空")
+ return;
+ }
this.modifyDialogVisible = false;
updateBasicThirdSys(this.inputQuery)
.then((response) => {
@@ -680,13 +688,33 @@ export default {
})
},
addBussinessTypeData() {
+ //校验表单数据
+ if (isBlank(this.thirdBuyForm.name)) {
+ this.$message.error("单据类型不能为空!")
+ return;
+ }
+ if (isBlank(this.thirdBuyForm.thirdBuyName)) {
+ this.$message.error("第三方单据类型不能为空!")
+ return;
+ }
+ if (isBlank(this.thirdBuyForm.url)) {
+ this.$message.error("接口地址不能为空!")
+ return;
+ }
+
+ if (!isBlank(this.thirdBuyForm.remark)) {
+ if (this.thirdBuyForm.remark.length > 200) {
+ this.$message.error("备注信息不得超过200字");
+ return;
+ }
+ }
+
if (this.getOrdersEditBtnVisible) {
this.editGeOrderParamVisible = false;
} else {
this.bussinessTypeFormVisible = false;
}
-
//匹配编码
this.bussinessTypeList.forEach(item =>{
//单据业务类型编码
@@ -709,12 +737,29 @@ export default {
})
},
handleDelete(index, row) {
- let params = {id: row.id};
- deleteThirdSysBusType(params).then((res) => {
- this.handleBustypeChange(this.submitOrderRow);
- }).catch((error) => {
- this.$message.error(error.message);
- })
+ this.$confirm('是否确认删除业务单据类型?', '提示', {
+ confirmButtonText: '确定',
+ cancelButtonText: '取消',
+ type: 'warning'
+ }).then(() => {
+ let params = {id: row.id};
+ deleteThirdSysBusType(params).then((res) => {
+ if (res.code === 20000) {
+ this.$message({
+ type: 'success',
+ message: '删除成功!'
+ });
+ }
+ this.handleBustypeChange(this.submitOrderRow);
+ }).catch((error) => {
+ this.$message.error(error.message);
+ })
+ }).catch(() => {
+ this.$message({
+ type: 'info',
+ message: '已取消删除'
+ });
+ });
},
getThirdBuyType() {
let query = {
@@ -787,28 +832,40 @@ export default {
});
},
disableInterface(row) {
- let data = [{id: row.id, enabled: false}];
- updateInterfaceStatus(data).then((res) => {
- if (res.code === 20000) {
- this.$message.success("移除成功");
- let query = {
- thirdSysFk: this.thirdSysFk,
- enabled: true
- };
- this.loading = true;
- getDetailBasicThirdSys(query)
- .then((response) => {
- this.loading = false;
- this.detailList = response.data.list || [];
- this.total = response.data.total || 0;
- })
- .catch(() => {
- this.loading = false;
- this.list = [];
- this.total = 0;
- });
- }
- })
+ this.$confirm('是否确认移除此接口?', '提示', {
+ confirmButtonText: '确定',
+ cancelButtonText: '取消',
+ type: 'warning'
+ }).then(() => {
+ let data = [{id: row.id, enabled: false}];
+ updateInterfaceStatus(data).then((res) => {
+ if (res.code === 20000) {
+ this.$message.success("移除成功");
+ let query = {
+ thirdSysFk: this.thirdSysFk,
+ enabled: true
+ };
+ this.loading = true;
+ getDetailBasicThirdSys(query)
+ .then((response) => {
+ this.loading = false;
+ this.detailList = response.data.list || [];
+ this.total = response.data.total || 0;
+ })
+ .catch(() => {
+ this.loading = false;
+ this.list = [];
+ this.total = 0;
+ });
+ }
+ })
+ }).catch(() => {
+ this.$message({
+ type: 'info',
+ message: '已取消删除'
+ });
+ });
+
},
editGeOrderParam(index,row) {
this.formName = "edit";
diff --git a/src/views/basic/CorpRelevance.vue b/src/views/basic/CorpRelevance.vue
index 05c96db..c84e223 100644
--- a/src/views/basic/CorpRelevance.vue
+++ b/src/views/basic/CorpRelevance.vue
@@ -65,8 +65,8 @@
@@ -84,6 +84,7 @@
+
查询
选入
@@ -162,6 +163,18 @@ export default {
};
},
methods: {
+ onReset() {
+ this.$router.push({
+ path: "",
+ });
+ this.unitQuery = {
+ key: "",
+ page: 1,
+ limit: 10,
+ thirdSys: null,
+ };
+ this.getList();
+ },
handlepageChange(val) {
this.unitQuery.page = val;
this.getList();
diff --git a/src/views/basic/UdiInfoManage.vue b/src/views/basic/UdiInfoManage.vue
index 917aea4..2449ab3 100644
--- a/src/views/basic/UdiInfoManage.vue
+++ b/src/views/basic/UdiInfoManage.vue
@@ -789,6 +789,7 @@
@current-change="handleCurrentChange"
layout="prev, pager, next"
:total="total"
+ :current-page="filterQuery.page"
>
diff --git a/src/views/basic/UdiInfoselectErpUdi.vue b/src/views/basic/UdiInfoselectErpUdi.vue
index af1761e..c3308bb 100644
--- a/src/views/basic/UdiInfoselectErpUdi.vue
+++ b/src/views/basic/UdiInfoselectErpUdi.vue
@@ -64,6 +64,7 @@
+
查询
选入
@@ -105,6 +106,7 @@
@current-change="handleErpPageChange"
layout="prev, pager, next"
:total="pageTotal"
+ :current-page="erpQuery.page"
>
@@ -391,6 +393,22 @@ export default {
};
},
methods: {
+ onReset() {
+ this.$router.push({
+ path: "",
+ });
+ this.erpQuery = {
+ code: null,
+ name: null,
+ spec: null,
+ registerNo: null,
+ manufactory: null,
+ supName: null,
+ page: 1,
+ limit: 10,
+ };
+ this.getErpList();
+ },
tableRowClassName({row}) {
if (row.checked) return "warning-row";
return "";
diff --git a/src/views/basic/invWarehouse.vue b/src/views/basic/invWarehouse.vue
index 01abe2e..02df647 100644
--- a/src/views/basic/invWarehouse.vue
+++ b/src/views/basic/invWarehouse.vue
@@ -611,11 +611,9 @@ import {
deleteWarehouseUser, deleteWarehouseBussinessType,
bindThrWarehouse, unbindThrWarehouse, getThrsysDetail
} from "../../api/basic/invWarehouse";
-
import {
filterSubAll, saveSubWarehouse, deleteSubWarehouse
} from "../../api/basic/invSubWarehouse";
-
import {filterThrList} from "@/api/thrsys/thrInvWarehouse";
import {getHospitalUserList} from "../../api/auth/authUser";
import {getJoinBussinessType} from "../../api/basic/bussinessType";
@@ -623,6 +621,7 @@ import {formatDate} from "@/utils/date";
import axios from "axios";
import store from "@/store";
import {findConfig} from "@/api/thrsys/spsSyncStatus";
+import {isBlank} from "@/utils/strUtil";
const formJson = {
id: null,
@@ -718,7 +717,6 @@ export default {
configParms: {},
subData: {},
subFromName: "add",
-
};
},
methods: {
@@ -762,6 +760,7 @@ export default {
// 更改值
this.formVisible = false;
this.subFormVisible = false;
+ this.loadSubData(this.currentCode);
return true;
},
// 显示表单
@@ -827,10 +826,14 @@ export default {
this.$refs["dataForm"].validate((valid) => {
if (valid) {
- if (this.formData.pcode == null && this.formData.level != 1) {
+ if (isBlank(this.formData.pcode) && this.formData.level != 1) {
this.$message.warning("上级仓库不能为空");
return;
}
+ if (isBlank(this.formData.name)) {
+ this.$message.warning("仓库名称不能为空");
+ return;
+ }
this.formLoading = true;
let data = Object.assign({}, this.formData);
saveWarehouse(data, this.formName)
@@ -1060,6 +1063,7 @@ export default {
this.subList = [];
this.userList = null;
this.bussinessTypeList = null;
+ this.currentCode = row.code;
this.loadSubData(row.code);
},
diff --git a/src/views/business/stockOrderNewDistribution.vue b/src/views/business/stockOrderNewDistribution.vue
index 9e18981..3899849 100644
--- a/src/views/business/stockOrderNewDistribution.vue
+++ b/src/views/business/stockOrderNewDistribution.vue
@@ -530,7 +530,6 @@ export default {
},
methods: {
saveOrder(status) {
-
this.code = "";
this.$refs.multipleTable.setCurrentRow();
this.currentRow = {};
@@ -769,6 +768,10 @@ export default {
this.$message.error("往来信息和单据类型不能为空!")
return;
}
+ if (isBlank(this.formData.invWarehouseCode)) {
+ this.$message.error("当前分库未选择!");
+ return;
+ }
this.code = "";
this.$refs.multipleTable.setCurrentRow();
this.currentRow = {};
diff --git a/src/views/thrsys/ThrCorpsImport.vue b/src/views/thrsys/ThrCorpsImport.vue
index fd35fc0..15c9932 100644
--- a/src/views/thrsys/ThrCorpsImport.vue
+++ b/src/views/thrsys/ThrCorpsImport.vue
@@ -9,9 +9,9 @@
-
-
-
+
+
+
@@ -242,13 +242,11 @@
},
sysChange() {
this.getThirdSysDetail();
- // console.log( this.thirdSysDetail.thirdId+"\n"+ this.thirdSysDetail.fromType+"\n"+this.thirdSysDetail.enable);
},
handleDetailClick(row) {
this.currentRow = row;
- console.log(this.currentRow.genKey)
this.udiImportDetailVisible = true;
}
@@ -315,7 +313,6 @@
// // 基础地址
// let response = res.data.BASE_URL;
// this.uploadFileUrl = response + "/udiwms/thrOrder/importLog/upload";
- // console.log(res.data.BASE_URL + "\n" + res.data.BASE_URL2);
//
// });
@@ -334,12 +331,10 @@
}
,
handleChange(response, files, fileList) {
- console.log(response);
if (response.code != 20000) {
this.$message.error(response.message);
this.getList();
} else {
- // console.log(files[0] + "\n" + this.fileList[0] + "\n" + fileList[0]);
this.$message.success(response.data);
this.getList();
}
diff --git a/src/views/thrsys/ThrInvWarehouse.vue b/src/views/thrsys/ThrInvWarehouse.vue
index b207ed6..b466ecf 100644
--- a/src/views/thrsys/ThrInvWarehouse.vue
+++ b/src/views/thrsys/ThrInvWarehouse.vue
@@ -180,8 +180,9 @@
>
-
+
@@ -194,13 +195,13 @@
-
+
-
+
{
if (valid) {
this.formLoading = true;