提交merge1.3
This commit is contained in:
@@ -118,10 +118,10 @@
|
||||
</el-form-item>
|
||||
<el-form-item label="统计类型:">
|
||||
<el-select
|
||||
v-model="inventoryScope"
|
||||
v-model="queryParams.inventoryScope"
|
||||
placeholder=""
|
||||
style="width: 220px"
|
||||
@change="inventoryChange(inventoryScope)"
|
||||
@change="inventoryChange"
|
||||
>
|
||||
<el-option
|
||||
v-for="supplyStatus in inventoryOptions"
|
||||
@@ -203,7 +203,15 @@
|
||||
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"
|
||||
@@ -212,7 +220,15 @@
|
||||
: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"
|
||||
@@ -221,8 +237,17 @@
|
||||
: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"
|
||||
@@ -236,7 +261,15 @@
|
||||
</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"
|
||||
@@ -245,7 +278,15 @@
|
||||
: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"
|
||||
@@ -254,7 +295,15 @@
|
||||
: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"
|
||||
@@ -263,7 +312,15 @@
|
||||
: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"
|
||||
@@ -280,7 +337,11 @@
|
||||
: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"
|
||||
@@ -298,7 +359,11 @@
|
||||
: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"
|
||||
@@ -476,7 +541,10 @@ 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({
|
||||
@@ -493,6 +561,11 @@ const data = reactive({
|
||||
// patientName: undefined,
|
||||
dispenseTimeSTime: undefined,
|
||||
dispenseTimeETime: undefined,
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
inventoryScope: 1,
|
||||
flag: 2,
|
||||
>>>>>>> v1.3
|
||||
},
|
||||
rules: {},
|
||||
});
|
||||
@@ -507,6 +580,7 @@ watch(
|
||||
},
|
||||
{ immediate: true }
|
||||
);
|
||||
<<<<<<< HEAD
|
||||
watch(
|
||||
() => inventoryScope.value,
|
||||
(newVlaue) => {
|
||||
@@ -514,6 +588,8 @@ watch(
|
||||
},
|
||||
{ immediate: true }
|
||||
);
|
||||
=======
|
||||
>>>>>>> v1.3
|
||||
// 监听路由变化
|
||||
watch(
|
||||
() => route.query,
|
||||
@@ -535,6 +611,11 @@ watch(
|
||||
queryParams.value.dispenseTimeETime = newQuery.occurrenceTimeETime + ' 23:59:59';
|
||||
}
|
||||
queryParams.value.flag = 1;
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
console.log('11111111111111');
|
||||
|
||||
>>>>>>> v1.3
|
||||
// 执行查询
|
||||
getList();
|
||||
}
|
||||
@@ -586,7 +667,13 @@ 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 ||
|
||||
@@ -670,9 +757,18 @@ 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() {
|
||||
@@ -705,6 +801,7 @@ function getPharmacyCabinetLists() {
|
||||
}
|
||||
/** 查询调拨管理项目列表 */
|
||||
function getList(type) {
|
||||
<<<<<<< HEAD
|
||||
if (type) {
|
||||
xiaojiTotal.value = [];
|
||||
purchaseinventoryList.value = [];
|
||||
@@ -893,10 +990,214 @@ function getList(type) {
|
||||
dispensePrice: dispensePrice2,
|
||||
refundPrice: refundPrice2,
|
||||
});
|
||||
=======
|
||||
console.log('query=======>', JSON.stringify(queryParams));
|
||||
|
||||
if (type) {
|
||||
xiaojiTotal.value = [];
|
||||
purchaseinventoryList.value = [];
|
||||
}
|
||||
loading.value = true;
|
||||
// let queryParamsValues ={...queryParams.value}
|
||||
// delete queryParamsValues.inventoryScope
|
||||
if (
|
||||
queryParams.value.inventoryScope == 1 ||
|
||||
queryParams.value.inventoryScope == 3 ||
|
||||
queryParams.value.inventoryScope == 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,
|
||||
});
|
||||
}
|
||||
>>>>>>> v1.3
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
} else if (
|
||||
queryParams.value.inventoryScope == 2 ||
|
||||
queryParams.value.inventoryScope == 4 ||
|
||||
queryParams.value.inventoryScope == 6
|
||||
) {
|
||||
var dispensePrice2 = 0;
|
||||
var refundPrice2 = 0;
|
||||
getAmbMedicationDetail(queryParams.value).then((res) => {
|
||||
loading.value = false;
|
||||
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,
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
>>>>>>> v1.3
|
||||
} else {
|
||||
total.value = 0;
|
||||
loading.value = false;
|
||||
@@ -966,4 +1267,4 @@ getPharmacyCabinetLists();
|
||||
.pagination-container {
|
||||
margin-right: 20px;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user