|
@@ -760,6 +760,7 @@
|
|
|
<BednetDetail
|
|
|
:mattress-width="LjDetailRef._mainData.mattress_width"
|
|
|
:mattress-length="LjDetailRef._mainData.mattress_length"
|
|
|
+ :ifcopy="ifcopy"
|
|
|
v-bind="bednetDrawerProps"
|
|
|
@aftersave="autoBednetSave"
|
|
|
@aftercancel="LjDrawerRef.hide()"
|
|
@@ -826,6 +827,7 @@ const route = useRoute();
|
|
|
const router = useRouter();
|
|
|
const globalStore = useGlobalStore();
|
|
|
// const { isShowOriginFormulaMattress } = storeToRefs(globalStore);
|
|
|
+const ifcopy = ref(false);
|
|
|
|
|
|
const showOriginFormulaMattress = (value: any) => {
|
|
|
globalStore.setGlobalState("isShowOriginFormulaMattress", Boolean(value));
|
|
@@ -2860,6 +2862,8 @@ const handleAddBednetMx = () => {
|
|
|
bednetDrawerProps.bednetid = 0;
|
|
|
bednetDrawerProps.state = "new";
|
|
|
bednetDrawerProps.onlyView = false;
|
|
|
+
|
|
|
+ ifcopy.value = false;
|
|
|
LjDrawerRef.value.show(true);
|
|
|
});
|
|
|
};
|
|
@@ -2881,6 +2885,8 @@ const handleEditBednetMx = () => {
|
|
|
bednetDrawerProps.dannum_type = LjDetailRef.value._mainData.dannum_type;
|
|
|
bednetDrawerProps.state = "edit";
|
|
|
bednetDrawerProps.onlyView = false;
|
|
|
+
|
|
|
+ ifcopy.value = true;
|
|
|
LjDrawerRef.value.show(true);
|
|
|
});
|
|
|
}
|
|
@@ -2888,14 +2894,14 @@ const handleEditBednetMx = () => {
|
|
|
}
|
|
|
};
|
|
|
|
|
|
-const autoBednetSave = async (res: any) => {
|
|
|
+const autoBednetSave = async (res: any, oldBednetid: number) => {
|
|
|
const $table = bednetMxRef.value.element;
|
|
|
|
|
|
let _res = res.bednet;
|
|
|
_res.bednet_height = res.bednet.mattress_height;
|
|
|
if ($table) {
|
|
|
const { visibleData } = $table.getTableData();
|
|
|
- let idx = visibleData.findIndex(t => t.mtrlid == _res.bednetid || t.mtrlid == 0);
|
|
|
+ let idx = visibleData.findIndex(t => t.mtrlid == oldBednetid || oldBednetid == 0);
|
|
|
let _mtrlname =
|
|
|
_res.typename + " " + _res.bednetcode + " " + _res.mattress_width + "*" + _res.mattress_length + "*" + _res.mattress_height;
|
|
|
if (idx > -1) {
|