提交merge1.3

This commit is contained in:
2025-12-27 15:30:40 +08:00
parent 088861f66e
commit 3c497417dc
167 changed files with 0 additions and 17577 deletions

View File

@@ -203,15 +203,11 @@
show-summary 每页单独合计-->
<el-table-column type="selection" width="60px" align="center" />
<el-table-column
<<<<<<< HEAD
v-if="inventoryScope == 1 || inventoryScope == 3 || inventoryScope == 5"
=======
v-if="
queryParams.inventoryScope == 1 ||
queryParams.inventoryScope == 3 ||
queryParams.inventoryScope == 5
"
>>>>>>> v1.3
label="发药人"
align="center"
key="practitionerName"
@@ -220,15 +216,11 @@
:show-overflow-tooltip="true"
/>
<el-table-column
<<<<<<< HEAD
v-if="inventoryScope == 1 || inventoryScope == 3 || inventoryScope == 5"
=======
v-if="
queryParams.inventoryScope == 1 ||
queryParams.inventoryScope == 3 ||
queryParams.inventoryScope == 5
"
>>>>>>> v1.3
label="发药单号"
align="center"
key="dispenseNo"
@@ -237,17 +229,12 @@
:show-overflow-tooltip="true"
/>
<el-table-column
<<<<<<< HEAD
v-if="inventoryScope == 2 || inventoryScope == 4 || inventoryScope == 6"
:label="inventoryScope == 2 ? '门诊号' : '住院号'"
=======
v-if="
queryParams.inventoryScope == 2 ||
queryParams.inventoryScope == 4 ||
queryParams.inventoryScope == 6
"
:label="queryParams.inventoryScope == 2 ? '门诊号' : '住院号'"
>>>>>>> v1.3
align="center"
key="outpatientNo"
prop="outpatientNo"
@@ -261,15 +248,11 @@
</template>
</el-table-column> -->
<el-table-column
<<<<<<< HEAD
v-if="inventoryScope == 2 || inventoryScope == 4 || inventoryScope == 6"
=======
v-if="
queryParams.inventoryScope == 2 ||
queryParams.inventoryScope == 4 ||
queryParams.inventoryScope == 6
"
>>>>>>> v1.3
label="处方号"
align="center"
key="prescriptionNo"
@@ -278,15 +261,11 @@
:show-overflow-tooltip="true"
/>
<el-table-column
<<<<<<< HEAD
v-if="inventoryScope == 2 || inventoryScope == 4 || inventoryScope == 6"
=======
v-if="
queryParams.inventoryScope == 2 ||
queryParams.inventoryScope == 4 ||
queryParams.inventoryScope == 6
"
>>>>>>> v1.3
label="病人"
align="center"
key="patientName"
@@ -295,15 +274,11 @@
:show-overflow-tooltip="true"
/>
<el-table-column
<<<<<<< HEAD
v-if="inventoryScope == 2 || inventoryScope == 4 || inventoryScope == 6"
=======
v-if="
queryParams.inventoryScope == 2 ||
queryParams.inventoryScope == 4 ||
queryParams.inventoryScope == 6
"
>>>>>>> v1.3
label="发药人"
align="center"
key="practitionerName"
@@ -312,15 +287,11 @@
:show-overflow-tooltip="true"
/>
<el-table-column
<<<<<<< HEAD
v-if="inventoryScope == 2 || inventoryScope == 4 || inventoryScope == 6"
=======
v-if="
queryParams.inventoryScope == 2 ||
queryParams.inventoryScope == 4 ||
queryParams.inventoryScope == 6
"
>>>>>>> v1.3
label="发药单号"
align="center"
key="dispenseNo"
@@ -337,11 +308,7 @@
:show-overflow-tooltip="true"
/>
<el-table-column
<<<<<<< HEAD
v-if="inventoryScope == 1 || inventoryScope == 3"
=======
v-if="queryParams.inventoryScope == 1 || queryParams.inventoryScope == 3"
>>>>>>> v1.3
label="药品编码"
align="center"
key="busNo"
@@ -359,11 +326,7 @@
:show-overflow-tooltip="true"
/> -->
<el-table-column
<<<<<<< HEAD
v-if="inventoryScope == 1 || inventoryScope == 3"
=======
v-if="queryParams.inventoryScope == 1 || queryParams.inventoryScope == 3"
>>>>>>> v1.3
label="医保编码"
align="center"
key="ybNo"
@@ -541,10 +504,6 @@ const multiple = ref(true);
const total = ref(0);
const occurrenceTime = ref([]);
const practitionerNameOptions = ref([]);
<<<<<<< HEAD
const inventoryScope = ref(1);
=======
>>>>>>> v1.3
const locationIdList = ref([]);
const data = reactive({
@@ -561,11 +520,8 @@ const data = reactive({
// patientName: undefined,
dispenseTimeSTime: undefined,
dispenseTimeETime: undefined,
<<<<<<< HEAD
=======
inventoryScope: 1,
flag: 2,
>>>>>>> v1.3
},
rules: {},
});
@@ -580,16 +536,6 @@ watch(
},
{ immediate: true }
);
<<<<<<< HEAD
watch(
() => inventoryScope.value,
(newVlaue) => {
inventoryScope.value = newVlaue;
},
{ immediate: true }
);
=======
>>>>>>> v1.3
// 监听路由变化
watch(
() => route.query,
@@ -611,11 +557,8 @@ watch(
queryParams.value.dispenseTimeETime = newQuery.occurrenceTimeETime + ' 23:59:59';
}
queryParams.value.flag = 1;
<<<<<<< HEAD
=======
console.log('11111111111111');
>>>>>>> v1.3
// 执行查询
getList();
}
@@ -667,13 +610,9 @@ const arraySpanMethod = ({ row, column, rowIndex, columnIndex }) => {
// 合并一样的列住院号 outpatientNumber属性
if (
columnIndex === 1 &&
<<<<<<< HEAD
(inventoryScope.value == 2 || inventoryScope.value == 4 || inventoryScope.value == 6)
=======
(queryParams.value.inventoryScope == 2 ||
queryParams.value.inventoryScope == 4 ||
queryParams.value.inventoryScope == 6)
>>>>>>> v1.3
) {
if (
rowIndex === 0 ||
@@ -757,18 +696,12 @@ const getSummaries = (param) => {
};
function inventoryChange(val) {
<<<<<<< HEAD
inventoryScope.value = val;
xiaojiTotal.value = [];
purchaseinventoryList.value = [];
=======
xiaojiTotal.value = [];
purchaseinventoryList.value = [];
console.log('val=======>', val);
queryParams.value.flag = val == 1 || val == 2 ? 2 : 1;
console.log('queryParams=======>', JSON.stringify(queryParams));
>>>>>>> v1.3
getList();
}
function getPharmacyCabinetLists() {
@@ -801,196 +734,6 @@ function getPharmacyCabinetLists() {
}
/** 查询调拨管理项目列表 */
function getList(type) {
<<<<<<< HEAD
if (type) {
xiaojiTotal.value = [];
purchaseinventoryList.value = [];
}
loading.value = true;
// let queryParamsValues ={...queryParams.value}
// delete queryParamsValues.inventoryScope
if (inventoryScope.value == 1 || inventoryScope.value == 3 || inventoryScope.value == 5) {
var dispensePrice = 0;
var refundPrice = 0;
getAmbPractitionerDetail(queryParams.value).then((res) => {
purchaseinventoryList.value = res.data.records;
total.value = res.data.total;
loading.value = false;
if (purchaseinventoryList.value.length == 0) {
return;
}
purchaseinventoryList.value.map((k) => {
k.dispensePrice = k.dispensePrice || '0.00';
k.refundPrice = k.refundPrice || '0.00';
k.dispenseQuantity = k.dispenseQuantity
? k.dispenseQuantity + k.unitCode_dictText
: '0.00' + k.unitCode_dictText;
k.refundQuantity = k.refundQuantity
? k.refundQuantity + k.refundUnitCode_dictText
: '0.00' + k.unitCode_dictText;
if (total.value && total.value <= queryParams.value.pageSize) {
dispensePrice += Number(k.dispensePrice);
refundPrice += Number(k.refundPrice);
}
});
// 1页数据
if (total.value && total.value <= queryParams.value.pageSize) {
dispensePrice = dispensePrice ? dispensePrice.toFixed(4) : dispensePrice;
refundPrice = refundPrice ? refundPrice.toFixed(4) : refundPrice;
let pageNoAll = total.value / queryParams.value.pageSize;
if (Math.ceil(pageNoAll) == queryParams.value.pageNo) {
purchaseinventoryList.value.push({
practitionerName: '合计',
dispensePrice: dispensePrice,
refundPrice: refundPrice,
});
}
}
// 带分页数据
if (total.value && total.value > queryParams.value.pageSize) {
let queryParamsValue = {
pageNo: 1,
pageSize: total.value,
};
getAmbPractitionerDetail(queryParamsValue).then((res) => {
purchaseinventoryListAll.value = res.data.records || [];
if (purchaseinventoryListAll.value.length > 0) {
purchaseinventoryListAll.value.map((k) => {
k.dispensePrice = k.dispensePrice || '0.00';
k.refundPrice = k.refundPrice || '0.00';
k.dispenseQuantity = k.dispenseQuantity
? k.dispenseQuantity + k.unitCode_dictText
: '0.00' + k.unitCode_dictText;
k.refundQuantity = k.refundQuantity
? k.refundQuantity + k.refundUnitCode_dictText
: '0.00' + k.unitCode_dictText;
dispensePrice += Number(k.dispensePrice);
refundPrice += Number(k.refundPrice);
});
dispensePrice = dispensePrice ? dispensePrice.toFixed(4) : dispensePrice;
refundPrice = refundPrice ? refundPrice.toFixed(4) : refundPrice;
let pageNoAll = total.value / queryParams.value.pageSize;
if (Math.ceil(pageNoAll) == queryParams.value.pageNo) {
purchaseinventoryList.value.push({
practitionerName: '合计',
dispensePrice: dispensePrice,
refundPrice: refundPrice,
});
}
}
});
}
});
} else if (inventoryScope.value == 2 || inventoryScope.value == 4 || inventoryScope.value == 6) {
var dispensePrice2 = 0;
var refundPrice2 = 0;
getAmbMedicationDetail(queryParams.value).then((res) => {
purchaseinventoryList.value = res.data.records;
total.value = res.data.total;
if (purchaseinventoryList.value.length == 0) {
return;
}
purchaseinventoryList.value.map((k) => {
k.dispensePrice = k.dispensePrice || '0.00';
k.refundPrice = k.refundPrice || '0.00';
k.dispenseQuantity = k.dispenseQuantity
? k.dispenseQuantity + k.unitCode_dictText
: '0.00' + k.unitCode_dictText;
k.refundQuantity = k.refundQuantity
? k.refundQuantity + k.refundUnitCode_dictText
: '0.00' + k.unitCode_dictText;
if (total.value && total.value <= queryParams.value.pageSize) {
dispensePrice2 += Number(k.dispensePrice);
refundPrice2 += Number(k.refundPrice);
}
});
// 1页数据
if (total.value && total.value <= queryParams.value.pageSize) {
dispensePrice2 = dispensePrice2 ? dispensePrice2.toFixed(4) : dispensePrice2;
refundPrice2 = refundPrice2 ? refundPrice2.toFixed(4) : refundPrice2;
let pageNoAll = total.value / queryParams.value.pageSize;
if (Math.ceil(pageNoAll) == queryParams.value.pageNo) {
purchaseinventoryList.value.push({
prescriptionNo: '合计',
dispensePrice: dispensePrice2,
refundPrice: refundPrice2,
});
}
}
loading.value = false;
// 带分页数据
if (total.value && total.value > queryParams.value.pageSize) {
let queryParamsValue = {
pageNo: 1,
pageSize: total.value,
};
getAmbMedicationDetail(queryParamsValue).then((res) => {
purchaseinventoryListAll.value = res.data.records;
if (purchaseinventoryListAll.value.length == 0) {
return;
}
purchaseinventoryListAll.value.map((k, index) => {
k.dispensePrice = k.dispensePrice || '0.00';
k.refundPrice = k.refundPrice || '0.00';
k.dispenseQuantity = k.dispenseQuantity
? k.dispenseQuantity + k.unitCode_dictText
: '0.00' + k.unitCode_dictText;
k.refundQuantity = k.refundQuantity
? k.refundQuantity + k.refundUnitCode_dictText
: '0.00' + k.unitCode_dictText;
dispensePrice2 += Number(k.dispensePrice);
refundPrice2 += Number(k.refundPrice);
//处理每页门诊号相同数据分开不在一页的问题start
for (let m = 1; m < queryParams.value.pageSize && m < index; m++) {
if (
queryParams.value.pageNo > 1 &&
index == queryParams.value.pageSize * (queryParams.value.pageNo - 1) &&
k.outpatientNo == purchaseinventoryListAll.value[index - m]?.outpatientNo
) {
purchaseinventoryList.value.unshift(purchaseinventoryListAll.value[index - m]); // 加
//修改计算的小计缺少加过来的部分
let dispenseNoIndex1 = purchaseinventoryList.value.findIndex(
(o) =>
o.prescriptionNo == '小计' &&
o.outpatientNo == purchaseinventoryListAll.value[index - m].outpatientNo
);
purchaseinventoryList.value[dispenseNoIndex1].dispensePrice =
Number(purchaseinventoryList.value[dispenseNoIndex1].dispensePrice) +
Number(purchaseinventoryListAll.value[index - m].dispensePrice);
purchaseinventoryList.value[dispenseNoIndex1].refundPrice =
Number(purchaseinventoryList.value[dispenseNoIndex1].refundPrice) +
Number(purchaseinventoryListAll.value[index - m].refundPrice);
}
if (
index + m == queryParams.value.pageSize * queryParams.value.pageNo &&
k.outpatientNo == purchaseinventoryListAll.value[index + m]?.outpatientNo
) {
let dispenseNoIndex = purchaseinventoryList.value.findIndex(
(o) => o.dispenseNo == k.dispenseNo
);
purchaseinventoryList.value.splice(dispenseNoIndex, 1); // 减
if (
purchaseinventoryList.value[dispenseNoIndex - 1] &&
purchaseinventoryList.value[dispenseNoIndex - 1].prescriptionNo == '小计'
) {
purchaseinventoryList.value.splice(dispenseNoIndex + 1, 1); // 减掉带小计的
}
}
}
// end
});
dispensePrice2 = dispensePrice2 ? dispensePrice2.toFixed(4) : dispensePrice2;
refundPrice2 = refundPrice2 ? refundPrice2.toFixed(4) : refundPrice2;
let pageNoAll = total.value / queryParams.value.pageSize;
if (Math.ceil(pageNoAll) == queryParams.value.pageNo) {
purchaseinventoryList.value.push({
prescriptionNo: '合计',
dispensePrice: dispensePrice2,
refundPrice: refundPrice2,
});
=======
console.log('query=======>', JSON.stringify(queryParams));
if (type) {
@@ -1072,13 +815,10 @@ function getList(type) {
refundPrice: refundPrice,
});
}
>>>>>>> v1.3
}
});
}
});
<<<<<<< HEAD
=======
} else if (
queryParams.value.inventoryScope == 2 ||
queryParams.value.inventoryScope == 4 ||
@@ -1197,7 +937,6 @@ function getList(type) {
});
}
});
>>>>>>> v1.3
} else {
total.value = 0;
loading.value = false;