From 836a673520fa07161978d1f48b1f87d3d4aa215b Mon Sep 17 00:00:00 2001
From: wangwei <1610949092@qq.com>
Date: Fri, 25 Oct 2024 18:25:28 +0800
Subject: [PATCH] =?UTF-8?q?10/25=20bug=20=E4=BC=98=E5=8C=961.0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../basic/product/UdiInfoSelectLocalUdi.vue | 3 +
src/views/basic/product/product.vue | 45 ++----
src/views/basic/product/productEdit.vue | 56 ++++---
src/views/basic/product/productUdiType.vue | 26 +++-
src/views/inout/PanelCreateOrderBizDetail.vue | 19 ++-
.../purOrder/purOrderDetailDialog.vue | 5 +
.../supplier/company/basicCompanyProducts.vue | 15 +-
.../company/basicCompanyproductDetail.vue | 52 ++++---
.../company/basicCompanyproductEdit.vue | 137 +++++++++++++++---
.../products/supAddDiProductSelectUdi.vue | 65 +++++++--
.../supplier/products/supProductsAdd.vue | 1 +
src/views/thirdSys/product/thrProducts.vue | 2 -
12 files changed, 311 insertions(+), 115 deletions(-)
diff --git a/src/views/basic/product/UdiInfoSelectLocalUdi.vue b/src/views/basic/product/UdiInfoSelectLocalUdi.vue
index 96d0463..3419a04 100644
--- a/src/views/basic/product/UdiInfoSelectLocalUdi.vue
+++ b/src/views/basic/product/UdiInfoSelectLocalUdi.vue
@@ -716,6 +716,9 @@ export default {
checkCombine() {
debugger
+ if (this.multipleUdiSelection.length == 0){
+ return this.$message.error("请选择器械信息")
+ }
if (isBlank(this.relId)) {
this.checkedUdi();
} else {
diff --git a/src/views/basic/product/product.vue b/src/views/basic/product/product.vue
index 98dda7d..e74d1ea 100644
--- a/src/views/basic/product/product.vue
+++ b/src/views/basic/product/product.vue
@@ -1650,22 +1650,7 @@
@closePre="closeUdi"
>
-
- 提交
-
- 取消
-
-
+
{
- if (response.code == 20000) {
- this.getList();
- this.cancelDialog();
- this.editDialogVisible = false;
- } else {
- this.$message.error(response.message);
- }
- })
- .catch(() => {
- this.cancelDialog();
- });
+ console.log("使用剂量胆怯",this.editFormat.useLevel);
+ console.log("流通剂量胆怯",this.editFormat.distributeLevel);
+ // updatetUdiInfos(this.editFormat)
+ // .then((response) => {
+ // if (response.code == 20000) {
+ // this.getList();
+ // this.cancelDialog();
+ // this.editDialogVisible = false;
+ // } else {
+ // this.$message.error(response.message);
+ // }
+ // })
+ // .catch(() => {
+ // this.cancelDialog();
+ // });
},
onAddSingleSubmit() {
diff --git a/src/views/basic/product/productEdit.vue b/src/views/basic/product/productEdit.vue
index 6e36212..2bb39a0 100644
--- a/src/views/basic/product/productEdit.vue
+++ b/src/views/basic/product/productEdit.vue
@@ -566,12 +566,12 @@
-
+
@@ -1138,6 +1138,21 @@
+
+ 提交
+
+ 取消
+
+
@@ -1313,17 +1328,20 @@ export default {
},
methods: {
distributeLevelDiChange(val) {
+ console.log("gdgdgdgdgd",this.editQuery.distributeLevel)
const matchingItem = this.detailList.find(item => item.nameCode == val);
if (matchingItem) {
this.editQuery.distributeLevelUnit = matchingItem.packUnit;
this.editQuery.distributeLevel = matchingItem.packLevel
}
- calculateDistCount(matchingItem).then((res) => {
- this.editQuery = {
- ...this.editQuery,
- distributeLevelCount: res.data.distributeLevelCount,
- }
- })
+ // calculateDistCount(matchingItem).then((res) => {
+ // this.editQuery = {
+ // ...this.editQuery,
+ // distributeLevelCount: res.data.distributeLevelCount,
+ // }
+ // })
+
+
},
useLevelDiChange(val) {
const matchingItem = this.detailList.find(item => item.nameCode == val);
@@ -1331,12 +1349,12 @@ export default {
this.editQuery.useLevelUnit = matchingItem.packUnit;
this.editQuery.useLevel = matchingItem.packLevel;
}
- calculateUseCount(matchingItem).then((res) => {
- this.editQuery = {
- ...this.editQuery,
- useLeverCount: res.data.useLeverCount,
- }
- })
+ // calculateUseCount(matchingItem).then((res) => {
+ // this.editQuery = {
+ // ...this.editQuery,
+ // useLeverCount: res.data.useLeverCount,
+ // }
+ // })
},
classifyChange() {
this.classifyChange(this.editQuery.flbm)
@@ -1381,7 +1399,6 @@ export default {
},
addDrugLevel() {
- console.log('this.detailList',this.detailList)
this.detailList.push({
nameCode: '',
packLevel: null,
@@ -1461,6 +1478,8 @@ export default {
},
cancelDialog() {
this.editSingleDiDialogVisible = false;
+ this.onAddLoading = false;
+ this.$emit("closePre", true);
},
singleDiEdit(val) {
let temp = val;
@@ -1768,9 +1787,10 @@ export default {
})
},
rowChange(index, val) {
- console.log("rowChange===",index)
- this.selectedIndex = index
-
+ // if (this.selectedIndex != null && this.selectedIndex != index){
+ // this.levelSave(val)
+ // }else
+ this.selectedIndex = index
this.isSave = false
},
diff --git a/src/views/basic/product/productUdiType.vue b/src/views/basic/product/productUdiType.vue
index f27d932..6139300 100644
--- a/src/views/basic/product/productUdiType.vue
+++ b/src/views/basic/product/productUdiType.vue
@@ -29,13 +29,31 @@
-
+
+
+
+
+
新增
编辑
- 删除
- 绑定
- 解绑
+ 删除
+ 绑定
+ 解绑
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/inout/PanelCreateOrderBizDetail.vue b/src/views/inout/PanelCreateOrderBizDetail.vue
index 41aa21a..a78677c 100644
--- a/src/views/inout/PanelCreateOrderBizDetail.vue
+++ b/src/views/inout/PanelCreateOrderBizDetail.vue
@@ -405,7 +405,7 @@ export default {
if (!this.validateAndSetDate(row, 'productDate')) return;
// 对expireDate进行校验和设置
- if (row.productDate !== '' && row.expireDate !== null)
+ if (row.expireDate !== '' && row.expireDate !== null)
if (!this.validateAndSetDate(row, 'expireDate')) return;
@@ -436,7 +436,7 @@ export default {
if (row[fieldName] === '') {
row[fieldName] = null;
} else {
- let msg = this.checkTimeFormat(row[fieldName]);
+ let msg = this.checkTimeFormat(row[fieldName],fieldName);
if (msg !== "") {
this.$message.error(msg);
return false;
@@ -541,9 +541,14 @@ export default {
}
,
- checkTimeFormat(dateStr) {
+ checkTimeFormat(dateStr,fieldName) {
let errorMessage = '';
-
+ let dateName = '';
+ if (fieldName == 'productDate'){
+ dateName = '生产日期'
+ }else{
+ dateName = '失效日期'
+ }
// 异常处理和边界条件覆盖
if (typeof dateStr !== 'string' || dateStr === null || dateStr === undefined) {
errorMessage = '输入参数必须是非空字符串';
@@ -552,7 +557,7 @@ export default {
const regex = /^\d{6}$/;
if (!regex.test(dateStr)) {
- errorMessage = '时间格式不正确,应为 yyMMdd';
+ errorMessage = dateName + '时间格式不正确,应为 yyMMdd';
} else {
// 增强日期有效性检查
const year = parseInt(dateStr.substring(0, 2), 10);
@@ -563,7 +568,7 @@ export default {
if (year < 0 || year > 99 ||
month < 1 || month > 12 ||
day < 1 || day > 31) {
- errorMessage = '时间格式不正确!';
+ errorMessage = dateName + '时间格式不正确!';
} else {
// 修正年份的两位数到四位数
const fullYear = year < 50 ? 2000 + year : 1900 + year;
@@ -571,7 +576,7 @@ export default {
// 检查是否为有效日期
if (dateObj.getFullYear() !== fullYear || dateObj.getMonth() + 1 !== month || dateObj.getDate() !== day) {
- errorMessage = '时间格式不正确!';
+ errorMessage = dateName + '时间格式不正确!';
}
}
}
diff --git a/src/views/purchase/purOrder/purOrderDetailDialog.vue b/src/views/purchase/purOrder/purOrderDetailDialog.vue
index 00e0d69..2b308db 100644
--- a/src/views/purchase/purOrder/purOrderDetailDialog.vue
+++ b/src/views/purchase/purOrder/purOrderDetailDialog.vue
@@ -283,6 +283,11 @@ export default {
})
},
saveOrder(status) {
+ //todo 入库反类型判断
+ if (this.formData.targetBillAction == null){
+ return this.$message.error("请选择入库单据类型")
+ }
+
let tip = ''
if (status == '1') {
if (this.formData.dealStatus == 1) {
diff --git a/src/views/supplier/company/basicCompanyProducts.vue b/src/views/supplier/company/basicCompanyProducts.vue
index 323a662..add1918 100644
--- a/src/views/supplier/company/basicCompanyProducts.vue
+++ b/src/views/supplier/company/basicCompanyProducts.vue
@@ -365,7 +365,20 @@
:editQuery="editQuery"
:closeDialog="closeDialog">
-
+
+ 提交
+
+ 取消
+
+
-
-
-
- 关联
-
- 解绑
-
-
-
+
+
+
+
+
+
+
+
+
+
@@ -28,19 +28,27 @@
margin-bottom: 8px">
产品标识:
-
- 解绑DI器械信息
-
-
+
+
+
+
+
+
+
-
-
+
+
+
+ {{ diTypeMap[scope.row.diType] }}
+
+
-
+
+
+
+
+
@@ -1037,6 +1045,10 @@ export default {
editSingleDiDialogVisible: false,
selectErpDialogVisible: false, //选入ERP产品
updateLoading: false,
+ diTypeMap: {
+ 1 : '最小销售标识',
+ 4 : '外包装标识'
+ }
}
},
diff --git a/src/views/supplier/company/basicCompanyproductEdit.vue b/src/views/supplier/company/basicCompanyproductEdit.vue
index 1c12a39..88462c0 100644
--- a/src/views/supplier/company/basicCompanyproductEdit.vue
+++ b/src/views/supplier/company/basicCompanyproductEdit.vue
@@ -493,27 +493,52 @@
-
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+ filterable
+ remote
+ clearable="true"
+ reserve-keyword
+ placeholder="请选择物资类别"
+ :remote-method="findThrTypeMethod"
+ style="width: 80%"
+ >
+
+ {{ item.name }}
+ {{ item.code }}
+
+
-
+
-
+
@@ -689,14 +714,17 @@ import {getYbHcflDetail, disableUdi, removeDiRl, removeRl, thirdSysDetail} from
import {updateById} from '@/api/basic/udiRelevance'
import {filterByUuid} from '@/api/basic/udiInfo'
import selectErp from "./udiInfoselectErpUdi";
+import Treeselect from "@riophae/vue-treeselect";
import selectUdiVersion from '@/views/basic/product/UdiinfoSelectVersion'
import {getHslbs, getThrProductType} from "@/api/thrsys/thrHsfl";
import {filterClassify} from '@/api/purchase/classifyCode'
-import { calculateDistCount } from '@/api/basic/product/drugUdiinfos'
+import { calculateDistCount, updateLevelDrug } from '@/api/basic/product/drugUdiinfos'
import { levelByUuid } from '@/api/basic/product/udiInfo'
+import { getListMenu, getOneName } from '@/api/basic/basicHospType'
+import { isBlank } from '@/utils/strUtil'
export default {
- name: 'productEdit',
+ name: 'basicCompanyproductEdit',
props: {
editQuery: {
type: Object,
@@ -757,6 +785,7 @@ export default {
}
],
levelUnitList: [],
+ fromDeptOptions: [],
}
},
@@ -1024,13 +1053,85 @@ export default {
});
},
+
+ /** 转换菜单数据结构 */
+ normalizer(node) {
+ if (node.children && !node.children.length) {
+ delete node.children;
+ }
+ return {
+ id: node.code,
+ label: node.name,
+ children: node.children
+ };
+ },
+ getTreeselect() {
+ getOneName().then(res => {
+ const menu = {id: res.data.id, code: res.data.code, name: res.data.name, children: []};
+ getListMenu({}).then(response => {
+ this.fromDeptOptions = [];
+ menu.children = this.handleTree(response.data, "code", "parentCode");
+ console.log(menu)
+ this.fromDeptOptions.push(menu);
+ });
+ })
+ },
+
+ //层级保存
+ levelSave(row) {
+ if (isBlank(row.nameCode)) {
+ this.$message.error('层级标识不能为空')
+ return
+ }
+ if (isBlank(row.packLevel)) {
+ this.$message.error('包装级别不能为空')
+ return
+ }
+ if (isBlank(row.packUnit)) {
+ this.$message.error('层级单位不能为空')
+ return
+ }
+ let editQuery = {
+ nameCode: row.nameCode,
+ packLevel: row.packLevel,
+ packUnit: row.packUnit,
+ sjcpbm: row.sjcpbm,
+ bhxjcpbm: row.bhxjcpbm,
+ bhxjsl: row.bhxjsl,
+ relId: this.editQuery.rlId,
+ uuid: this.editQuery.uuid,
+ productId: row.productId,
+ diType: row.diType,
+ xjdw: row.xjdw
+ }
+ updateLevelDrug(editQuery).then(res => {
+ this.saveLoading = false
+ if (res.code == 20000) {
+ this.isSave = true
+ this.$message.success('保存成功!')
+ this.selectedIndex = null
+ this.getDetailList()
+ this.getDiLevel();
+ } else {
+ this.isSave = true
+ this.$message.error(res.message)
+ }
+ })
+ },
+ rowChange(index, val) {
+ console.log("rowChange===",index)
+ this.selectedIndex = index
+
+ this.isSave = false
+ },
},
components: {
- selectErp
+ selectErp,Treeselect
},
created() {
this.getDiLevel()
this.getThirdSysDetail();
+ this.getTreeselect();
var ttquery = {
id: this.editQuery.rlId,
page: 1,
diff --git a/src/views/supplier/products/supAddDiProductSelectUdi.vue b/src/views/supplier/products/supAddDiProductSelectUdi.vue
index 63bbab8..5d0c7fc 100644
--- a/src/views/supplier/products/supAddDiProductSelectUdi.vue
+++ b/src/views/supplier/products/supAddDiProductSelectUdi.vue
@@ -124,7 +124,7 @@
-
+
@@ -216,8 +216,8 @@
-
-
+
+
@@ -244,13 +244,13 @@
-
+
-
+
-
+
-
+
是
@@ -349,7 +350,7 @@
-
+
-
+
{
- if (res.code === 20000) {
- this.$message.success('添加成功')
- this.$emit('closeUdi', true)
- } else {
- this.$message.error(res.message)
+ this.$refs.editQuery.validate((valid) => {
+ if (valid) {
+ addDiProduct(this.editQuery).then((res) => {
+ if (res.code === 20000) {
+ this.$message.success('添加成功')
+ this.$emit('closeUdi', true)
+ } else {
+ this.$message.error(res.message)
+ }
+ }).catch((error) => {
+ })
}
- }).catch((error) => {
})
+
},
combine() {
diff --git a/src/views/supplier/products/supProductsAdd.vue b/src/views/supplier/products/supProductsAdd.vue
index 662f7eb..2f759f3 100644
--- a/src/views/supplier/products/supProductsAdd.vue
+++ b/src/views/supplier/products/supProductsAdd.vue
@@ -569,6 +569,7 @@ export default {
created() {
this.findBasicProductSet();
this.getBasicThirdSys();
+ this.findThrTypeMethod("")
},
}
diff --git a/src/views/thirdSys/product/thrProducts.vue b/src/views/thirdSys/product/thrProducts.vue
index cb8ea3e..45988a6 100644
--- a/src/views/thirdSys/product/thrProducts.vue
+++ b/src/views/thirdSys/product/thrProducts.vue
@@ -353,9 +353,7 @@ export default {
this.thrProductsEditVisible = false;
this.thrProductsDetailVisible = false;
this.addProductVisible = false;
- if (val) {
this.getList();
- }
Object.keys(this.newProductData).forEach(key => this.newProductData[key] = null);
},
getSyncConfig() {