提交merge1.3
This commit is contained in:
@@ -35,7 +35,7 @@
|
||||
align="center"
|
||||
prop="doseUnitCode_dictText"
|
||||
/> -->
|
||||
<el-table-column label="生产厂家" align="center" prop="manufacturer" />
|
||||
<el-table-column label="生产厂家" align="center" prop="manufacturerText" />
|
||||
</el-table>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -37,6 +37,11 @@
|
||||
>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
|
||||
<el-button type="primary" plain @click="handleExport" v-if="viewStatus == 'view'">导出</el-button>
|
||||
>>>>>>> v1.3
|
||||
<el-form
|
||||
:model="receiptHeaderForm"
|
||||
ref="receiptHeaderRef"
|
||||
@@ -571,17 +576,21 @@
|
||||
<el-table-column
|
||||
label="厂家/产地"
|
||||
align="center"
|
||||
key="manufacturer"
|
||||
prop="manufacturer"
|
||||
key="manufacturerText"
|
||||
prop="manufacturerText"
|
||||
:show-overflow-tooltip="true"
|
||||
width="260"
|
||||
>
|
||||
<template #default="scope">
|
||||
<el-form-item
|
||||
:prop="`purchaseinventoryList.${scope.$index}.manufacturer`"
|
||||
:rules="tableRules.manufacturer"
|
||||
:prop="`purchaseinventoryList.${scope.$index}.manufacturerText`"
|
||||
:rules="tableRules.manufacturerText"
|
||||
>
|
||||
<<<<<<< HEAD
|
||||
<el-input v-model="scope.row.manufacturer" placeholder="" disabled />
|
||||
=======
|
||||
<el-input v-model="scope.row.manufacturerText" placeholder="" disabled />
|
||||
>>>>>>> v1.3
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -701,6 +710,7 @@ import {
|
||||
addBatch, //保存批量盘点
|
||||
productStocktakingApproved,
|
||||
reject,
|
||||
<<<<<<< HEAD
|
||||
getpharmacyCabinetList
|
||||
} from "../components/api";
|
||||
import PopoverList from "@/components/OpenHis/popoverList/index.vue";
|
||||
@@ -708,6 +718,14 @@ import MedicineList from "../components/medicineList.vue";
|
||||
import TraceNoDialog from '@/components/OpenHis/TraceNoDialog/index.vue'
|
||||
import { formatDate,formatDateymd } from "@/utils/index";
|
||||
import { ref } from "vue";
|
||||
=======
|
||||
} from '../components/api';
|
||||
import PopoverList from '@/components/OpenHis/popoverList/index.vue';
|
||||
import MedicineList from '../components/medicineList.vue';
|
||||
import TraceNoDialog from '@/components/OpenHis/TraceNoDialog/index.vue';
|
||||
import { formatDate, formatDateymd } from '@/utils/index';
|
||||
import { ref } from 'vue';
|
||||
>>>>>>> v1.3
|
||||
|
||||
const router = useRouter();
|
||||
const route = useRoute();
|
||||
@@ -1041,7 +1059,7 @@ function selectRow(rowValue, index) {
|
||||
form.purchaseinventoryList[index].volume = rowValue.volume;
|
||||
form.purchaseinventoryList[index].minUnitCode = rowValue.minUnitCode;
|
||||
form.purchaseinventoryList[index].unitCode = rowValue.unitCode;
|
||||
form.purchaseinventoryList[index].manufacturer = rowValue.manufacturer;
|
||||
form.purchaseinventoryList[index].manufacturerText = rowValue.manufacturerText;
|
||||
form.purchaseinventoryList[index].partPercent = rowValue.partPercent;
|
||||
form.purchaseinventoryList[index].unitList = rowValue.unitList[0];
|
||||
form.purchaseinventoryList[index].lotNumber = rowValue.lotNumber;
|
||||
@@ -1079,7 +1097,7 @@ function selectRow(rowValue, index) {
|
||||
// form.purchaseinventoryList[index].itemQuantity = '';
|
||||
// form.purchaseinventoryList[index].reasonCode = '';
|
||||
// form.purchaseinventoryList[index].reason = '';
|
||||
// form.purchaseinventoryList[index].manufacturer = rowValue.manufacturer;
|
||||
// form.purchaseinventoryList[index].manufacturerText = rowValue.manufacturerText;
|
||||
// form.purchaseinventoryList[index].unitCodeList = [
|
||||
// {id:1,name:rowValue.unitCode_dictText,unitName:rowValue.unitCode_dictText,code:rowValue.unitCode},
|
||||
// {id:2,name:rowValue.minUnitCode_dictText,unitName:rowValue.minUnitCode_dictText,code:rowValue.minUnitCode}];
|
||||
@@ -1558,7 +1576,11 @@ function getDetailAll() {
|
||||
// form.purchaseinventoryList[index].statusMaxvalue = false
|
||||
e.volume = e.totalVolume;
|
||||
e.name = e.itemName;
|
||||
<<<<<<< HEAD
|
||||
e.manufacturer = e.manufacturerText;
|
||||
=======
|
||||
e.manufacturerText = e.manufacturerText;
|
||||
>>>>>>> v1.3
|
||||
if (e.purposeTypeEnum) {
|
||||
warehous_type.value.map((item) => {
|
||||
if (item.value == e.purposeTypeEnum) {
|
||||
@@ -1688,7 +1710,11 @@ function getDetail(type) {
|
||||
form.purchaseinventoryList[index].statusMaxvalue = false;
|
||||
e.volume = e.totalVolume;
|
||||
e.name = e.itemName;
|
||||
<<<<<<< HEAD
|
||||
e.manufacturer = e.manufacturerText;
|
||||
=======
|
||||
e.manufacturerText = e.manufacturerText;
|
||||
>>>>>>> v1.3
|
||||
if (e.purposeTypeEnum) {
|
||||
warehous_type.value.map((item) => {
|
||||
if (item.value == e.purposeTypeEnum) {
|
||||
@@ -2071,7 +2097,11 @@ function handleReject() {
|
||||
store.clearCurrentDataPLPDALL();
|
||||
// 跳转到审核页面
|
||||
router.replace({
|
||||
<<<<<<< HEAD
|
||||
path: '/aaaa/medicationmanagement/billapproval',
|
||||
=======
|
||||
path: '/aaaa/billapproval',
|
||||
>>>>>>> v1.3
|
||||
query: { type: 'chkstockBatch' },
|
||||
});
|
||||
}
|
||||
@@ -2088,7 +2118,11 @@ function handelApply() {
|
||||
store.clearCurrentDataPLPDALL();
|
||||
// 跳转到审核页面
|
||||
router.replace({
|
||||
<<<<<<< HEAD
|
||||
path: '/aaaa/medicationmanagement/billapproval',
|
||||
=======
|
||||
path: '/aaaa/billapproval',
|
||||
>>>>>>> v1.3
|
||||
query: { type: 'chkstockBatch' },
|
||||
});
|
||||
}
|
||||
@@ -2165,7 +2199,13 @@ function getStockReceiptTypeList() {
|
||||
console.log('详情页查询下拉树response1111111', response);
|
||||
|
||||
// categoryListOptions.value = response.data.categoryListOptions; // 药品类型
|
||||
<<<<<<< HEAD
|
||||
profitReasonOptions.value = response.data.profitReasonOptions; // 盈亏原因
|
||||
=======
|
||||
profitReasonOptions.value = response.data.profitReasonOptions; // 盈亏原因
|
||||
// receiptHeaderForm.purposeTypeEnum = warehous_type.value[0].value // 仓库类型默认值
|
||||
// handleChangePurposeTypeEnum(receiptHeaderForm.purposeTypeEnum)
|
||||
>>>>>>> v1.3
|
||||
// cabinetListOptionsBk.value = response.data.purposeTypeListOptions; // 盘点仓库列表(未过滤)
|
||||
|
||||
// purposeTypeListOptions.value = cabinetListOptionsBk.value.filter(item => item.formEnum === receiptHeaderForm.purposeTypeEnum) // 盘点仓库列表
|
||||
@@ -2276,6 +2316,7 @@ function totalQuantityChange(rowData, index, value) {
|
||||
editBatchTransfer(index);
|
||||
}
|
||||
// 切换仓库类型获取药房/药库列表 目的仓库切换
|
||||
<<<<<<< HEAD
|
||||
function handleChangePurposeTypeEnum(value,type) {
|
||||
// 确保value是数字类型
|
||||
const numValue = Number(value);
|
||||
@@ -2299,6 +2340,26 @@ function handleChangePurposeTypeEnum(value,type) {
|
||||
console.error('获取仓库列表失败:', error);
|
||||
purposeTypeListOptions.value = [];
|
||||
freightListOptions.value = [];
|
||||
=======
|
||||
function handleChangePurposeTypeEnum(value, type) {
|
||||
if (value == 16) {
|
||||
getPharmacyList().then((res) => {
|
||||
purposeTypeListOptions.value = res.data;
|
||||
if (!route.query.supplyBusNo && !type) {
|
||||
receiptHeaderForm.purposeLocationId = '';
|
||||
receiptHeaderForm.purposeLocationId1 = '';
|
||||
}
|
||||
// getinitValue()
|
||||
});
|
||||
} else if (value == 11) {
|
||||
getDispensaryList().then((res) => {
|
||||
purposeTypeListOptions.value = res.data;
|
||||
if (!route.query.supplyBusNo && !type) {
|
||||
receiptHeaderForm.purposeLocationId = '';
|
||||
receiptHeaderForm.purposeLocationId1 = '';
|
||||
}
|
||||
// getinitValue()
|
||||
>>>>>>> v1.3
|
||||
});
|
||||
} else if (numValue === 17) {
|
||||
// 处理耗材库类型
|
||||
@@ -2382,6 +2443,25 @@ function handleTraceNo(value, row, index) {
|
||||
}
|
||||
getStockReceiptTypeList(); // 详情页查询下拉树结构
|
||||
getbusNo(); // 单据号取得
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
|
||||
// 导出
|
||||
const exportRequiredParams = ref({
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
busNo: route.query.supplyBusNo
|
||||
});
|
||||
function handleExport() {
|
||||
proxy.downloadGet(
|
||||
'/inventory-manage/stocktaking/excel-out',
|
||||
{
|
||||
...exportRequiredParams.value,
|
||||
},
|
||||
`批量盘点单明细_${proxy.formatDateStr(new Date(), 'YYYY-MM-DD')}.xlsx`
|
||||
);
|
||||
}
|
||||
>>>>>>> v1.3
|
||||
</script>
|
||||
<style scoped>
|
||||
.custom-tree-node {
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
align="center"
|
||||
prop="doseUnitCode_dictText"
|
||||
/> -->
|
||||
<el-table-column label="生产厂家" align="center" prop="manufacturer" />
|
||||
<el-table-column label="生产厂家" align="center" prop="manufacturerText" />
|
||||
<el-table-column
|
||||
label="编码"
|
||||
align="center"
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
"paperType": "自定义",
|
||||
"height": 130,
|
||||
"width": 210,
|
||||
<<<<<<< HEAD
|
||||
"paperHeader": 0,
|
||||
"paperFooter": 365.6692913385827,
|
||||
"paperNumberDisabled": true,
|
||||
@@ -26,6 +27,15 @@
|
||||
"timestamp": false,
|
||||
"format": "YYYY-MM-DD HH:mm"
|
||||
},
|
||||
=======
|
||||
"paperHeader": 73.5,
|
||||
"paperFooter": 337.5,
|
||||
"paperNumberDisabled": true,
|
||||
"paperNumberContinue": true,
|
||||
"expandCss": "",
|
||||
"overPrintOptions": {},
|
||||
"watermarkOptions": {},
|
||||
>>>>>>> v1.3
|
||||
"panelLayoutOptions": {},
|
||||
"printElements": [
|
||||
{
|
||||
@@ -34,7 +44,11 @@
|
||||
"top": 12,
|
||||
"height": 12,
|
||||
"width": 115.5,
|
||||
<<<<<<< HEAD
|
||||
"title": "长春大学医院盘点单",
|
||||
=======
|
||||
"title": "长春市朝阳区中医院医院盘点单",
|
||||
>>>>>>> v1.3
|
||||
"coordinateSync": false,
|
||||
"widthHeightSync": false,
|
||||
"fontSize": 12,
|
||||
@@ -85,7 +99,11 @@
|
||||
"top": 33,
|
||||
"height": 9.75,
|
||||
"width": 120,
|
||||
<<<<<<< HEAD
|
||||
"title": "机构:长春大学医院",
|
||||
=======
|
||||
"title": "机构:长春市朝阳区中医院医院",
|
||||
>>>>>>> v1.3
|
||||
"coordinateSync": false,
|
||||
"widthHeightSync": false,
|
||||
"qrCodeLevel": 0
|
||||
@@ -131,7 +149,11 @@
|
||||
"tableQRCodeLevel": 0,
|
||||
"tableSummaryTitle": true,
|
||||
"tableSummary": "",
|
||||
<<<<<<< HEAD
|
||||
"width": 50.418660151829066,
|
||||
=======
|
||||
"width": 59.68821015182906,
|
||||
>>>>>>> v1.3
|
||||
"field": "name",
|
||||
"checked": true,
|
||||
"columnId": "name",
|
||||
@@ -146,7 +168,11 @@
|
||||
"tableQRCodeLevel": 0,
|
||||
"tableSummaryTitle": true,
|
||||
"tableSummary": "",
|
||||
<<<<<<< HEAD
|
||||
"width": 47.38277249096388,
|
||||
=======
|
||||
"width": 46.07372249096389,
|
||||
>>>>>>> v1.3
|
||||
"field": "volume",
|
||||
"checked": true,
|
||||
"columnId": "volume",
|
||||
@@ -161,10 +187,17 @@
|
||||
"tableQRCodeLevel": 0,
|
||||
"tableSummaryTitle": true,
|
||||
"tableSummary": "",
|
||||
<<<<<<< HEAD
|
||||
"width": 70.82692033621548,
|
||||
"field": "manufacturer",
|
||||
"checked": true,
|
||||
"columnId": "manufacturer",
|
||||
=======
|
||||
"width": 62.86642033621548,
|
||||
"field": "manufacturerText",
|
||||
"checked": true,
|
||||
"columnId": "manufacturerText",
|
||||
>>>>>>> v1.3
|
||||
"fixed": false,
|
||||
"rowspan": 1,
|
||||
"colspan": 1
|
||||
@@ -280,6 +313,24 @@
|
||||
"colspan": 1
|
||||
},
|
||||
{
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
"title": "厂家/产地",
|
||||
"titleSync": false,
|
||||
"halign": "center",
|
||||
"tableQRCodeLevel": 0,
|
||||
"tableSummaryTitle": true,
|
||||
"tableSummary": "",
|
||||
"width": 70.82692033621548,
|
||||
"field": "manufacturerText",
|
||||
"checked": false,
|
||||
"columnId": "manufacturerText",
|
||||
"fixed": false,
|
||||
"rowspan": 1,
|
||||
"colspan": 1
|
||||
},
|
||||
{
|
||||
>>>>>>> v1.3
|
||||
"title": "盘前库存",
|
||||
"titleSync": false,
|
||||
"align": "center",
|
||||
@@ -410,6 +461,7 @@
|
||||
},
|
||||
{
|
||||
"options": {
|
||||
<<<<<<< HEAD
|
||||
"left": 480,
|
||||
"top": 130.5,
|
||||
"height": 12,
|
||||
@@ -430,6 +482,10 @@
|
||||
"options": {
|
||||
"left": 261.24609375,
|
||||
"top": 130.74609375,
|
||||
=======
|
||||
"left": 456,
|
||||
"top": 343.5,
|
||||
>>>>>>> v1.3
|
||||
"height": 12,
|
||||
"width": 109.5,
|
||||
"title": "制单人",
|
||||
@@ -446,4 +502,8 @@
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
<<<<<<< HEAD
|
||||
}
|
||||
=======
|
||||
}
|
||||
>>>>>>> v1.3
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -4,12 +4,17 @@ import {parseStrEmpty} from '@/utils/openhis';
|
||||
// 查询盘点列表
|
||||
export function getStockTakeList (query) {
|
||||
return request ({
|
||||
<<<<<<< HEAD
|
||||
url: '/nurse-station/orgdevice-stocktake/summary-from',
|
||||
=======
|
||||
url: '/nurse-station/org-device-stockTake/summary-from',
|
||||
>>>>>>> v1.3
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
<<<<<<< HEAD
|
||||
// 盘点编辑页列表
|
||||
export function getstocktakingDetail (busNo) {
|
||||
return request ({
|
||||
@@ -105,6 +110,8 @@ export function getCount (queryParams) {
|
||||
});
|
||||
}
|
||||
|
||||
=======
|
||||
>>>>>>> v1.3
|
||||
// 获取药房列表
|
||||
export function getPharmacyList () {
|
||||
return request ({
|
||||
@@ -120,10 +127,27 @@ export function getDispensaryList () {
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
<<<<<<< HEAD
|
||||
|
||||
export function stocktakingReceiptAuto () {
|
||||
return request ({
|
||||
url: '/inventory-manage/stocktaking/stocktaking-receipt-auto',
|
||||
method: 'get',
|
||||
=======
|
||||
// 获取药品目录
|
||||
export function getMedicineList (queryParams) {
|
||||
return request ({
|
||||
url: '/app-common/inventory-item',
|
||||
method: 'get',
|
||||
params: queryParams,
|
||||
});
|
||||
}
|
||||
// 科室耗材汇总
|
||||
export function saveOrgDeviceSummary (data) {
|
||||
return request ({
|
||||
url: '/nurse-station/org-device-stockTake/org-device-summary',
|
||||
method: 'put',
|
||||
data,
|
||||
>>>>>>> v1.3
|
||||
});
|
||||
}
|
||||
|
||||
@@ -35,7 +35,11 @@
|
||||
align="center"
|
||||
prop="doseUnitCode_dictText"
|
||||
/> -->
|
||||
<<<<<<< HEAD
|
||||
<el-table-column label="生产厂家" align="center" prop="manufacturer" />
|
||||
=======
|
||||
<el-table-column label="生产厂家" align="center" prop="manufacturerText" />
|
||||
>>>>>>> v1.3
|
||||
<el-table-column
|
||||
label="编码"
|
||||
align="center"
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<<<<<<< HEAD
|
||||
<el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch">
|
||||
=======
|
||||
<el-form :model="queryParams" ref="queryRef" :inline="true" :rules="rules">
|
||||
>>>>>>> v1.3
|
||||
<el-form-item label="项目名称" prop="name">
|
||||
<el-input
|
||||
v-model="queryParams.name"
|
||||
@@ -10,7 +14,11 @@
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<<<<<<< HEAD
|
||||
<el-form-item label="仓库类型" prop="purposeTypeEnum">
|
||||
=======
|
||||
<el-form-item label="仓库" prop="purposeTypeEnum">
|
||||
>>>>>>> v1.3
|
||||
<el-select
|
||||
v-model="queryParams.purposeTypeEnum"
|
||||
placeholder="请选择"
|
||||
@@ -18,6 +26,10 @@
|
||||
filterable
|
||||
style="width: 200px"
|
||||
@change="handleChangePurposeTypeEnum"
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
@keyup.enter="handleQuery"
|
||||
>>>>>>> v1.3
|
||||
>
|
||||
<el-option
|
||||
v-for="item in warehous_type"
|
||||
@@ -27,13 +39,20 @@
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<<<<<<< HEAD
|
||||
<el-form-item label="盘点仓库" prop="purposeLocationId">
|
||||
<el-select
|
||||
v-model="queryParams.purposeLocationId"
|
||||
=======
|
||||
<el-form-item label="盘点仓库" prop="sourceLocationId">
|
||||
<el-select
|
||||
v-model="queryParams.sourceLocationId"
|
||||
>>>>>>> v1.3
|
||||
placeholder="请选择"
|
||||
clearable
|
||||
filterable
|
||||
style="width: 200px"
|
||||
<<<<<<< HEAD
|
||||
@change="handleCabinetChange(receiptHeaderForm.purposeLocationId)"
|
||||
>
|
||||
<el-option
|
||||
@@ -41,6 +60,13 @@
|
||||
{ id: 1, name: '仓库1' },
|
||||
{ id: 2, name: '仓库2' },
|
||||
]"
|
||||
=======
|
||||
:disabled="!queryParams.purposeTypeEnum"
|
||||
@keyup.enter="handleQuery"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in purposeTypeListOptions"
|
||||
>>>>>>> v1.3
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
@@ -55,6 +81,7 @@
|
||||
filterable
|
||||
style="width: 200px"
|
||||
>
|
||||
<<<<<<< HEAD
|
||||
<el-option
|
||||
v-for="item in [
|
||||
{ id: 1, name: '货位1' },
|
||||
@@ -66,17 +93,53 @@
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
=======
|
||||
<el-option v-for="item in []" :key="item.id" :label="item.name" :value="item.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="请求日期" prop="applyTime">
|
||||
<el-date-picker
|
||||
v-model="queryParams.applyTime"
|
||||
type="daterange"
|
||||
range-separator="至"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
value-format="YYYY-MM-DD"
|
||||
format="YYYY-MM-DD"
|
||||
></el-date-picker>
|
||||
</el-form-item>
|
||||
>>>>>>> v1.3
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="Plus"
|
||||
size="small"
|
||||
@click="handleSave()"
|
||||
:disabled="multiple"
|
||||
>批量保存</el-button
|
||||
>
|
||||
</el-col>
|
||||
</el-row>
|
||||
>>>>>>> v1.3
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="dataList"
|
||||
@selection-change="handleSelectionChange"
|
||||
height="calc(100vh - 250px)"
|
||||
>
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
<el-table-column type="selection" width="55" align="center" fixed></el-table-column>
|
||||
>>>>>>> v1.3
|
||||
<el-table-column
|
||||
label="项目"
|
||||
align="center"
|
||||
@@ -86,6 +149,7 @@
|
||||
fixed
|
||||
></el-table-column>
|
||||
<el-table-column label="规格" align="center" prop="totalVolume" />
|
||||
<<<<<<< HEAD
|
||||
<el-table-column label="厂家/产地" align="center" prop="manufacturer" show-overflow-tooltip />
|
||||
<el-table-column label="产品批号" align="center" prop="lotNumber" />
|
||||
<el-table-column label="单价" align="center" key="unit" prop="unitPrice" />
|
||||
@@ -94,6 +158,37 @@
|
||||
<el-table-column label="盈亏数量" align="center" prop="itemQuantity">
|
||||
<template #default="scope">
|
||||
<el-input v-model="scope.row.itemQuantity" :input-style="{ textAlign: 'center' }" type="number" />
|
||||
=======
|
||||
<el-table-column label="厂家/产地" align="center" prop="manufacturerText" show-overflow-tooltip />
|
||||
<el-table-column label="产品批号" align="center" prop="lotNumber" />
|
||||
<el-table-column label="单价(元)" align="center" key="unit" prop="unitPrice" />
|
||||
<el-table-column label="发放数量" align="center" prop="dispenseQuantity">
|
||||
<template #default="scope">
|
||||
{{ formatQuantityWithUnit(scope.row.dispenseQuantity, scope.row.minUnitCode_dictText) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="库存数量" align="center" prop="quantity">
|
||||
<template #default="scope">
|
||||
{{ formatQuantityWithUnit(scope.row.quantity, scope.row.minUnitCode_dictText) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="实盘数量" align="center" prop="stockTakeQuantity">
|
||||
<template #default="scope">
|
||||
<el-input-number
|
||||
v-model="scope.row.stockTakeQuantity"
|
||||
:precision="0"
|
||||
:min="0"
|
||||
:input-style="{ textAlign: 'center' }"
|
||||
:controls="false"
|
||||
style="width: 100%"
|
||||
@keyup.enter="handleSave(scope.row)"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="盈亏数量" align="center" prop="profitLoss">
|
||||
<template #default="scope">
|
||||
{{ calcProfitLoss(scope.row) }}
|
||||
>>>>>>> v1.3
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="单位" align="center" prop="unitCode_dictText" />
|
||||
@@ -102,8 +197,14 @@
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
<<<<<<< HEAD
|
||||
size="mini"
|
||||
type="text"
|
||||
=======
|
||||
size="small"
|
||||
type="primary"
|
||||
link
|
||||
>>>>>>> v1.3
|
||||
icon="Check"
|
||||
@click="handleSave(scope.row)"
|
||||
v-hasPermi="['chkstock:partDeptDevice:edit']"
|
||||
@@ -115,6 +216,7 @@
|
||||
</div>
|
||||
</template>
|
||||
<script setup>
|
||||
<<<<<<< HEAD
|
||||
import { ref, reactive, toRaw, computed, watch, onMounted } from 'vue';
|
||||
const { proxy } = getCurrentInstance();
|
||||
import { getStockTakeList } from './components/api.js';
|
||||
@@ -134,12 +236,49 @@ const getList = () => {
|
||||
loading.value = false;
|
||||
dataList.value = res.data;
|
||||
total.value = res.data.length;
|
||||
=======
|
||||
import { ref, reactive, getCurrentInstance, onMounted } from 'vue';
|
||||
import {
|
||||
getStockTakeList,
|
||||
getPharmacyList,
|
||||
getDispensaryList,
|
||||
saveOrgDeviceSummary,
|
||||
} from './components/api.js';
|
||||
const { proxy } = getCurrentInstance();
|
||||
const { warehous_type } = proxy.useDict('warehous_type');
|
||||
const dataList = ref([]);
|
||||
const queryParams = reactive({
|
||||
name: undefined,
|
||||
purposeTypeEnum: undefined,
|
||||
sourceLocationId: undefined,
|
||||
applyTime: [],
|
||||
applyTimeSTime: undefined,
|
||||
applyTimeETime: undefined,
|
||||
});
|
||||
const loading = ref(false);
|
||||
const rules = ref({});
|
||||
// 获取列表
|
||||
const getList = () => {
|
||||
loading.value = true;
|
||||
const params = {
|
||||
...queryParams,
|
||||
pageNo: queryParams.pageNo || 1,
|
||||
pageSize: queryParams.pageSize || 10,
|
||||
applyTime: undefined,
|
||||
applyTimeSTime: queryParams.applyTime[0] ? `${queryParams.applyTime[0]} 00:00:00` : undefined,
|
||||
applyTimeETime: queryParams.applyTime[1] ? `${queryParams.applyTime[1]} 23:59:59` : undefined,
|
||||
};
|
||||
getStockTakeList(params).then((res) => {
|
||||
loading.value = false;
|
||||
dataList.value = res.data;
|
||||
>>>>>>> v1.3
|
||||
});
|
||||
};
|
||||
// 搜索
|
||||
const handleQuery = () => {
|
||||
getList();
|
||||
};
|
||||
<<<<<<< HEAD
|
||||
// 重置
|
||||
const resetQuery = () => {
|
||||
queryParams.value = {};
|
||||
@@ -158,6 +297,77 @@ const handleSave = (row) => {
|
||||
proxy.$modal.msgWarning('盈亏数量不能为空');
|
||||
return;
|
||||
}
|
||||
=======
|
||||
|
||||
// 重置
|
||||
const resetQuery = () => {
|
||||
Object.assign(queryParams, {
|
||||
name: undefined,
|
||||
purposeTypeEnum: undefined,
|
||||
sourceLocationId: undefined,
|
||||
applyTime: [],
|
||||
});
|
||||
handleQuery();
|
||||
};
|
||||
|
||||
const ids = ref([]);
|
||||
const single = ref(true);
|
||||
const multiple = ref(true);
|
||||
// 多选
|
||||
const handleSelectionChange = (selection) => {
|
||||
ids.value = selection.map((item) => item);
|
||||
single.value = selection.length != 1;
|
||||
multiple.value = !selection.length;
|
||||
};
|
||||
|
||||
const toNumber = (value) => {
|
||||
if (value === '' || value === null || value === undefined) return null;
|
||||
const num = Number(value);
|
||||
return Number.isNaN(num) ? null : num;
|
||||
};
|
||||
const formatQuantityWithUnit = (quantity, unitText) => {
|
||||
const num = toNumber(quantity);
|
||||
if (num === null) return '';
|
||||
return unitText ? `${num} ${unitText}` : `${num}`;
|
||||
};
|
||||
const calcProfitLoss = (row) => {
|
||||
const stockTakeQuantity = toNumber(row.stockTakeQuantity);
|
||||
const dispenseQuantity = toNumber(row.dispenseQuantity);
|
||||
if (stockTakeQuantity === null || dispenseQuantity === null) return '';
|
||||
const profitLoss = stockTakeQuantity - dispenseQuantity;
|
||||
return `${profitLoss} ${row.minUnitCode_dictText ?? ''}`;
|
||||
};
|
||||
|
||||
const buildSummaryPayload = (rows) =>
|
||||
rows.map((item) => ({
|
||||
id: item.id,
|
||||
stockTakeQuantity: Number(item.stockTakeQuantity),
|
||||
useUnitCode: item.minUnitCode,
|
||||
...item,
|
||||
}));
|
||||
|
||||
// 保存(单条/批量)
|
||||
const handleSave = (row) => {
|
||||
const targetRows = row ? [row] : ids.value;
|
||||
|
||||
if (!targetRows.length) {
|
||||
proxy.$modal.msgWarning('请选择需要保存的数据');
|
||||
return;
|
||||
}
|
||||
|
||||
const invalidRow = targetRows.find(
|
||||
(item) =>
|
||||
item.stockTakeQuantity === '' ||
|
||||
item.stockTakeQuantity === null ||
|
||||
item.stockTakeQuantity === undefined
|
||||
);
|
||||
if (invalidRow) {
|
||||
proxy.$modal.msgWarning('实盘数量不能为空');
|
||||
return;
|
||||
}
|
||||
|
||||
const payload = buildSummaryPayload(targetRows);
|
||||
>>>>>>> v1.3
|
||||
proxy.$modal
|
||||
.confirm('确定保存吗?', '保存', {
|
||||
confirmButtonText: '保存',
|
||||
@@ -165,6 +375,7 @@ const handleSave = (row) => {
|
||||
type: 'warning',
|
||||
})
|
||||
.then(() => {
|
||||
<<<<<<< HEAD
|
||||
proxy.$modal.msgSuccess('保存成功');
|
||||
getList();
|
||||
})
|
||||
@@ -172,6 +383,31 @@ const handleSave = (row) => {
|
||||
};
|
||||
const handleChangePurposeTypeEnum = (val) => {};
|
||||
const handleCabinetChange = (val) => {};
|
||||
=======
|
||||
saveOrgDeviceSummary(payload).then(() => {
|
||||
proxy.$modal.msgSuccess('保存成功');
|
||||
getList();
|
||||
});
|
||||
})
|
||||
.catch(() => {});
|
||||
};
|
||||
const purposeTypeListOptions = ref([]);
|
||||
// 仓库类型切换
|
||||
const handleChangePurposeTypeEnum = (val) => {
|
||||
// 药房
|
||||
if (val == '16') {
|
||||
getPharmacyList().then((res) => {
|
||||
purposeTypeListOptions.value = res.data;
|
||||
});
|
||||
} else if (val == '11') {
|
||||
getDispensaryList().then((res) => {
|
||||
purposeTypeListOptions.value = res.data;
|
||||
});
|
||||
}
|
||||
getList();
|
||||
};
|
||||
|
||||
>>>>>>> v1.3
|
||||
onMounted(() => {
|
||||
getList();
|
||||
});
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
align="center"
|
||||
prop="doseUnitCode_dictText"
|
||||
/> -->
|
||||
<el-table-column label="生产厂家" align="center" prop="manufacturer" />
|
||||
<el-table-column label="生产厂家" align="center" prop="manufacturerText" />
|
||||
</el-table>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -1,255 +1,225 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form
|
||||
:model="queryParams"
|
||||
ref="queryRef"
|
||||
:inline="true"
|
||||
v-show="showSearch"
|
||||
label-width="90px"
|
||||
>
|
||||
<el-form-item label="单据号:" prop="searchKey">
|
||||
<el-input
|
||||
v-model="queryParams.searchKey"
|
||||
placeholder="单据号:"
|
||||
clearable
|
||||
style="width: 220px"
|
||||
@keyup.enter="handleQuery"
|
||||
<div class="app-container">
|
||||
<el-form
|
||||
:model="queryParams"
|
||||
ref="queryRef"
|
||||
:inline="true"
|
||||
v-show="showSearch"
|
||||
label-width="90px"
|
||||
>
|
||||
<el-form-item label="单据号:" prop="searchKey">
|
||||
<el-input
|
||||
v-model="queryParams.searchKey"
|
||||
placeholder="单据号:"
|
||||
clearable
|
||||
style="width: 220px"
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="审批状态:" prop="statusEnum" label-width="100px">
|
||||
<el-select v-model="queryParams.statusEnum" placeholder="" clearable style="width: 150px">
|
||||
<el-option
|
||||
v-for="supplyStatus in supplyStatusOptions"
|
||||
:key="supplyStatus.value"
|
||||
:label="supplyStatus.label"
|
||||
:value="supplyStatus.value"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="审批状态:" prop="statusEnum" label-width="100px">
|
||||
<el-select
|
||||
v-model="queryParams.statusEnum"
|
||||
placeholder=""
|
||||
clearable
|
||||
style="width: 150px"
|
||||
>
|
||||
<el-option
|
||||
v-for="supplyStatus in supplyStatusOptions"
|
||||
:key="supplyStatus.value"
|
||||
:label="supplyStatus.label"
|
||||
:value="supplyStatus.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="制单人:" prop="applicantId" label-width="120px">
|
||||
<el-select
|
||||
v-model="queryParams.applicantId"
|
||||
placeholder=""
|
||||
clearable
|
||||
style="width: 150px"
|
||||
>
|
||||
<el-option
|
||||
v-for="practitioner in applicantListOptions"
|
||||
:key="practitioner.value"
|
||||
:label="practitioner.label"
|
||||
:value="practitioner.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="制单日期:">
|
||||
<el-date-picker
|
||||
v-model="occurrenceTime"
|
||||
value-format="YYYY-MM-DD"
|
||||
type="daterange"
|
||||
range-separator="-"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
></el-date-picker>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<!-- 添加记录 -->
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="Plus"
|
||||
@click="openAddStockPart"
|
||||
|
||||
>新增盘点单</el-button
|
||||
>
|
||||
<!-- v-hasPermi="['system:user:add']" -->
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="Plus"
|
||||
@click="openAddStockBatch"
|
||||
|
||||
>新增批量盘点单</el-button
|
||||
>
|
||||
<!-- v-hasPermi="['system:user:add']" -->
|
||||
</el-col>
|
||||
<!-- 查询 -->
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="Search"
|
||||
@click="handleQuery"
|
||||
|
||||
>查询</el-button
|
||||
>
|
||||
<!-- v-hasPermi="['system:user:import']" -->
|
||||
</el-col>
|
||||
<!-- 重置 -->
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="CircleClose"
|
||||
@click="handleClear"
|
||||
|
||||
>重置</el-button
|
||||
>
|
||||
<!-- v-hasPermi="['system:user:export']" -->
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="stockinventoryList"
|
||||
@selection-change="handleSelectionChange"
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="制单人:" prop="applicantId" label-width="120px">
|
||||
<el-select v-model="queryParams.applicantId" placeholder="" clearable style="width: 150px">
|
||||
<el-option
|
||||
v-for="practitioner in applicantListOptions"
|
||||
:key="practitioner.value"
|
||||
:label="practitioner.label"
|
||||
:value="practitioner.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="制单日期:">
|
||||
<el-date-picker
|
||||
v-model="occurrenceTime"
|
||||
value-format="YYYY-MM-DD"
|
||||
type="daterange"
|
||||
range-separator="-"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
></el-date-picker>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<!-- 添加记录 -->
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" plain icon="Plus" @click="openAddStockPart">新增盘点单</el-button>
|
||||
<!-- v-hasPermi="['system:user:add']" -->
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" plain icon="Plus" @click="openAddStockBatch"
|
||||
>新增批量盘点单</el-button
|
||||
>
|
||||
<!-- v-hasPermi="['system:user:add']" -->
|
||||
</el-col>
|
||||
<!-- 查询 -->
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" plain icon="Search" @click="handleQuery">查询</el-button>
|
||||
<!-- v-hasPermi="['system:user:import']" -->
|
||||
</el-col>
|
||||
<!-- 重置 -->
|
||||
<el-col :span="1.5">
|
||||
<el-button type="warning" plain icon="CircleClose" @click="handleClear">重置</el-button>
|
||||
<!-- v-hasPermi="['system:user:export']" -->
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="stockinventoryList"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column type="selection" width="50" align="center" />
|
||||
<el-table-column
|
||||
label="单据号"
|
||||
align="center"
|
||||
key="supplyBusNo"
|
||||
prop="supplyBusNo"
|
||||
width="200"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="单据类型"
|
||||
align="center"
|
||||
key="typeEnum_enumText"
|
||||
prop="typeEnum_enumText"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="审批状态"
|
||||
align="center"
|
||||
key="statusEnum_enumText"
|
||||
prop="statusEnum_enumText"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="盘点仓库"
|
||||
align="center"
|
||||
key="purposeLocationId_dictText"
|
||||
prop="purposeLocationId_dictText"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="盈亏金额"
|
||||
align="center"
|
||||
key="breakevenPrice"
|
||||
prop="breakevenPrice"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="制单人"
|
||||
align="center"
|
||||
key="applicantId_dictText"
|
||||
prop="applicantId_dictText"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="审核人"
|
||||
align="center"
|
||||
key="approverId_dictText"
|
||||
prop="approverId_dictText"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="制单日期"
|
||||
align="center"
|
||||
key="createTime"
|
||||
prop="createTime"
|
||||
width="180"
|
||||
:show-overflow-tooltip="true"
|
||||
>
|
||||
<el-table-column type="selection" width="50" align="center" />
|
||||
<el-table-column
|
||||
label="单据号"
|
||||
align="center"
|
||||
key="supplyBusNo"
|
||||
prop="supplyBusNo"
|
||||
width="200"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="单据类型"
|
||||
align="center"
|
||||
key="typeEnum_enumText"
|
||||
prop="typeEnum_enumText"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="审批状态"
|
||||
align="center"
|
||||
key="statusEnum_enumText"
|
||||
prop="statusEnum_enumText"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="盘点仓库"
|
||||
align="center"
|
||||
key="purposeLocationId_dictText"
|
||||
prop="purposeLocationId_dictText"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="盈亏金额"
|
||||
align="center"
|
||||
key="breakevenPrice"
|
||||
prop="breakevenPrice"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="制单人"
|
||||
align="center"
|
||||
key="applicantId_dictText"
|
||||
prop="applicantId_dictText"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="审核人"
|
||||
align="center"
|
||||
key="approverId_dictText"
|
||||
prop="approverId_dictText"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="制单日期"
|
||||
align="center"
|
||||
key="createTime"
|
||||
prop="createTime"
|
||||
width="180"
|
||||
:show-overflow-tooltip="true"
|
||||
>
|
||||
<template #default="scope">
|
||||
<span>{{ parseTime(scope.row.createTime) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="审核日期 "
|
||||
align="center"
|
||||
key="approvalTime"
|
||||
prop="approvalTime"
|
||||
width="180"
|
||||
:show-overflow-tooltip="true"
|
||||
>
|
||||
<template #default="scope">
|
||||
<span>{{ parseTime(scope.row.approvalTime) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column
|
||||
<template #default="scope">
|
||||
<span>{{ parseTime(scope.row.createTime) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="审核日期 "
|
||||
align="center"
|
||||
key="approvalTime"
|
||||
prop="approvalTime"
|
||||
width="180"
|
||||
:show-overflow-tooltip="true"
|
||||
>
|
||||
<template #default="scope">
|
||||
<span>{{ parseTime(scope.row.approvalTime) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column
|
||||
label="备注"
|
||||
align="center"
|
||||
key="remake"
|
||||
prop="remake"
|
||||
/> -->
|
||||
<el-table-column
|
||||
label="操作"
|
||||
align="center"
|
||||
width="230"
|
||||
class-name="small-padding fixed-width"
|
||||
>
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
icon="View"
|
||||
@click="handleUpdate(scope.row,'view')"
|
||||
|
||||
>详情</el-button
|
||||
>
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
icon="Edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
disabled
|
||||
>编辑</el-button
|
||||
>
|
||||
<!-- :disabled="scope.row.statusEnum != '1' && scope.row.statusEnum != '9' && scope.row.statusEnum != '4'" -->
|
||||
<!-- v-hasPermi="['system:user:edit']" -->
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
icon="View"
|
||||
@click="handleSubmitApproval(scope.row)"
|
||||
|
||||
v-if="scope.row.statusEnum == '1' || scope.row.statusEnum == '9'"
|
||||
>提交审批</el-button
|
||||
>
|
||||
<!-- v-hasPermi="['system:user:remove']" -->
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
icon="View"
|
||||
@click="handleWithdrawApproval(scope.row)"
|
||||
|
||||
v-if="scope.row.statusEnum == '2'"
|
||||
>撤销审批</el-button
|
||||
>
|
||||
<!-- v-hasPermi="['system:user:remove']" -->
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
v-model:page="queryParams.pageNo"
|
||||
v-model:limit="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
<!-- <stock-receipt-dialog
|
||||
<el-table-column
|
||||
label="操作"
|
||||
align="center"
|
||||
width="230"
|
||||
class-name="small-padding fixed-width"
|
||||
>
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
icon="View"
|
||||
@click="
|
||||
() => {
|
||||
proxy.$refs['detailsDialogRef'].open(scope.row.supplyBusNo);
|
||||
}
|
||||
"
|
||||
>详情</el-button
|
||||
>
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
icon="Edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
:disabled="
|
||||
scope.row.statusEnum != '1' &&
|
||||
scope.row.statusEnum != '9' &&
|
||||
scope.row.statusEnum != '4'
|
||||
"
|
||||
>编辑</el-button
|
||||
>
|
||||
<!-- :disabled="scope.row.statusEnum != '1' && scope.row.statusEnum != '9' && scope.row.statusEnum != '4'" -->
|
||||
<!-- v-hasPermi="['system:user:edit']" -->
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
icon="View"
|
||||
@click="handleSubmitApproval(scope.row)"
|
||||
v-if="scope.row.statusEnum == '1' || scope.row.statusEnum == '9'"
|
||||
>提交审批</el-button
|
||||
>
|
||||
<!-- v-hasPermi="['system:user:remove']" -->
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
icon="View"
|
||||
@click="handleWithdrawApproval(scope.row)"
|
||||
v-if="scope.row.statusEnum == '2'"
|
||||
>撤销审批</el-button
|
||||
>
|
||||
<!-- v-hasPermi="['system:user:remove']" -->
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
v-model:page="queryParams.pageNo"
|
||||
v-model:limit="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
<ChkstockDetailsDialog ref="detailsDialogRef" />
|
||||
<!-- <stock-receipt-dialog
|
||||
ref="stockReceiptRef"
|
||||
:cabinetListOptions="cabinetListOptions"
|
||||
:categoryListOptions ="categoryListOptions"
|
||||
@@ -259,195 +229,200 @@
|
||||
:editRow="editRow"
|
||||
@refresh="getList"
|
||||
/> -->
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="ChkstockRecord">
|
||||
// 导入onActivated钩子
|
||||
import { onMounted, onActivated } from 'vue';
|
||||
import {
|
||||
getStockinventoryList,
|
||||
getstocktakingDetail,
|
||||
getInit,
|
||||
submitApproval,
|
||||
withdrawApproval,
|
||||
getDetailInit,
|
||||
} from "../components/api";
|
||||
|
||||
// import stockReceiptDialog from "./components/stockReceiptDialog";
|
||||
|
||||
const router = useRouter();
|
||||
const { proxy } = getCurrentInstance();
|
||||
const stockinventoryList = ref([]);
|
||||
const open = ref(false);
|
||||
const loading = ref(true);
|
||||
const showSearch = ref(true);
|
||||
const ids = ref([]);
|
||||
const single = ref(true);
|
||||
const multiple = ref(true);
|
||||
const total = ref(0);
|
||||
const occurrenceTime = ref([]);
|
||||
const busNoAdd = ref(""); // 单据号新增
|
||||
const applicantListOptions = ref(undefined); // 制单人列表
|
||||
const cabinetListOptions = ref(undefined); // 仓库列表
|
||||
const categoryListOptions = ref(undefined); // 药品类型
|
||||
const pharmacyListOptions = ref(undefined); // 药房列表
|
||||
const supplyStatusOptions = ref(undefined); // 审批状态
|
||||
const profitReasonOptions = ref(undefined); // 盈亏原因
|
||||
const editRow = ref({});
|
||||
// 使用 ref 定义当前编辑的采购
|
||||
const currentData = ref({});
|
||||
// 是否停用
|
||||
const statusFlagOptions = ref(undefined);
|
||||
|
||||
const data = reactive({
|
||||
form: {},
|
||||
queryParams: {
|
||||
supplyBusNo: undefined, // 编码
|
||||
statusEnum: undefined, // 审批状态
|
||||
applicantId: undefined, // 制单人
|
||||
createTimeSTime:undefined,
|
||||
createTimeETime:undefined,
|
||||
pageNo:1,
|
||||
pageSize: 10,
|
||||
searchKey: undefined, // 供应商名称
|
||||
},
|
||||
rules: {},
|
||||
// 导入onActivated钩子
|
||||
import { onMounted, onActivated } from 'vue';
|
||||
import {
|
||||
getStockinventoryList,
|
||||
getstocktakingDetail,
|
||||
getInit,
|
||||
submitApproval,
|
||||
withdrawApproval,
|
||||
getDetailInit,
|
||||
} from '../components/api';
|
||||
import ChkstockDetailsDialog from '../components/chkstockDetailsDialog.vue';
|
||||
// import stockReceiptDialog from "./components/stockReceiptDialog";
|
||||
|
||||
const router = useRouter();
|
||||
const { proxy } = getCurrentInstance();
|
||||
const stockinventoryList = ref([]);
|
||||
const open = ref(false);
|
||||
const loading = ref(true);
|
||||
const showSearch = ref(true);
|
||||
const ids = ref([]);
|
||||
const single = ref(true);
|
||||
const multiple = ref(true);
|
||||
const total = ref(0);
|
||||
const occurrenceTime = ref([]);
|
||||
const busNoAdd = ref(''); // 单据号新增
|
||||
const applicantListOptions = ref(undefined); // 制单人列表
|
||||
const cabinetListOptions = ref(undefined); // 仓库列表
|
||||
const categoryListOptions = ref(undefined); // 药品类型
|
||||
const pharmacyListOptions = ref(undefined); // 药房列表
|
||||
const supplyStatusOptions = ref(undefined); // 审批状态
|
||||
const profitReasonOptions = ref(undefined); // 盈亏原因
|
||||
const editRow = ref({});
|
||||
// 使用 ref 定义当前编辑的采购
|
||||
const currentData = ref({});
|
||||
// 是否停用
|
||||
const statusFlagOptions = ref(undefined);
|
||||
|
||||
const data = reactive({
|
||||
form: {},
|
||||
queryParams: {
|
||||
supplyBusNo: undefined, // 编码
|
||||
statusEnum: undefined, // 审批状态
|
||||
applicantId: undefined, // 制单人
|
||||
createTimeSTime: undefined,
|
||||
createTimeETime: undefined,
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
searchKey: undefined, // 供应商名称
|
||||
},
|
||||
rules: {},
|
||||
});
|
||||
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
|
||||
/** 列表页查询下拉树结构 */
|
||||
function getStockinventoryTypeList() {
|
||||
getInit().then((response) => {
|
||||
console.log('列表页下拉树response1111111', response);
|
||||
busNoAdd.value = response.data.busNo; // 单据号新增
|
||||
applicantListOptions.value = response.data.applicantListOptions; // 制单人列表
|
||||
|
||||
cabinetListOptions.value = response.data.cabinetListOptions; // 仓库列表
|
||||
categoryListOptions.value = response.data.categoryListOptions; // 药品类型列表
|
||||
pharmacyListOptions.value = response.data.pharmacyListOptions; // 药房列表
|
||||
profitReasonOptions.value = response.data.profitReasonOptions; // 盈亏类型列表
|
||||
|
||||
supplyStatusOptions.value = response.data.supplyStatusOptions; // 审批状态
|
||||
});
|
||||
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
|
||||
/** 列表页查询下拉树结构 */
|
||||
function getStockinventoryTypeList() {
|
||||
getInit().then((response) => {
|
||||
console.log('列表页下拉树response1111111',response)
|
||||
busNoAdd.value = response.data.busNo; // 单据号新增
|
||||
applicantListOptions.value = response.data.applicantListOptions; // 制单人列表
|
||||
}
|
||||
/** 详情页查询下拉树结构 */
|
||||
|
||||
cabinetListOptions.value = response.data.cabinetListOptions; // 仓库列表
|
||||
categoryListOptions.value = response.data.categoryListOptions; // 药品类型列表
|
||||
pharmacyListOptions.value = response.data.pharmacyListOptions; // 药房列表
|
||||
profitReasonOptions.value = response.data.profitReasonOptions; // 盈亏类型列表
|
||||
/** 查询盘点列表 */
|
||||
function getList() {
|
||||
loading.value = true;
|
||||
getStockinventoryList(queryParams.value).then((res) => {
|
||||
console.log('查询盘点列表response1111111', res);
|
||||
loading.value = false;
|
||||
stockinventoryList.value = res.data.records;
|
||||
total.value = res.data.total;
|
||||
});
|
||||
}
|
||||
|
||||
supplyStatusOptions.value = response.data.supplyStatusOptions; // 审批状态
|
||||
/** 搜索按钮操作 */
|
||||
function handleQuery() {
|
||||
queryParams.value.createTimeSTime =
|
||||
occurrenceTime.value && occurrenceTime.value.length == 2
|
||||
? occurrenceTime.value[0] + ' 00:00:00'
|
||||
: '';
|
||||
queryParams.value.createTimeETime =
|
||||
occurrenceTime.value && occurrenceTime.value.length == 2
|
||||
? occurrenceTime.value[1] + ' 23:59:59'
|
||||
: '';
|
||||
queryParams.value.pageNo = 1;
|
||||
getList();
|
||||
}
|
||||
|
||||
/** 清空条件按钮操作 */
|
||||
function handleClear() {
|
||||
// 清空查询条件
|
||||
queryParams.value.createTimeSTime = '';
|
||||
queryParams.value.createTimeETime = '';
|
||||
occurrenceTime.value = '';
|
||||
proxy.resetForm('queryRef');
|
||||
getList();
|
||||
}
|
||||
|
||||
/** 选择条数 */
|
||||
function handleSelectionChange(selection) {
|
||||
ids.value = selection.map((item) => item.id);
|
||||
single.value = selection.length != 1;
|
||||
multiple.value = !selection.length;
|
||||
}
|
||||
|
||||
/** 打开商品盘点 */
|
||||
function openAddStockPart() {
|
||||
// nextTick(() => {
|
||||
// proxy.$refs["stockReceiptRef"].show();
|
||||
// });
|
||||
|
||||
router.push({ path: '/medicationmanagement/chkstock/chkstockPart' });
|
||||
}
|
||||
/** 打开批量商品盘点 */
|
||||
function openAddStockBatch() {
|
||||
// nextTick(() => {
|
||||
// proxy.$refs["stockReceiptRef"].show();
|
||||
// });
|
||||
router.push({ path: '/medicationmanagement/chkstock/chkstockBatch' });
|
||||
}
|
||||
|
||||
/** 修改按钮操作 */
|
||||
function handleUpdate(row, view) {
|
||||
editRow.value = row;
|
||||
if (row.typeEnum == 4) {
|
||||
// 盘点
|
||||
router.push({
|
||||
path: '/medicationmanagement/chkstock/chkstockPart',
|
||||
query: { supplyBusNo: editRow.value.supplyBusNo, isEdit: true },
|
||||
});
|
||||
}
|
||||
/** 详情页查询下拉树结构 */
|
||||
|
||||
/** 查询盘点列表 */
|
||||
function getList() {
|
||||
loading.value = true;
|
||||
getStockinventoryList(queryParams.value).then((res) => {
|
||||
console.log('查询盘点列表response1111111',res)
|
||||
loading.value = false;
|
||||
stockinventoryList.value = res.data.records;
|
||||
total.value = res.data.total;
|
||||
});
|
||||
}
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
function handleQuery() {
|
||||
queryParams.value.createTimeSTime =
|
||||
occurrenceTime.value && occurrenceTime.value.length == 2
|
||||
? occurrenceTime.value[0] + " 00:00:00"
|
||||
: "";
|
||||
queryParams.value.createTimeETime =
|
||||
occurrenceTime.value && occurrenceTime.value.length == 2
|
||||
? occurrenceTime.value[1] + " 23:59:59"
|
||||
: "";
|
||||
queryParams.value.pageNo = 1;
|
||||
getList();
|
||||
}
|
||||
|
||||
/** 清空条件按钮操作 */
|
||||
function handleClear() {
|
||||
// 清空查询条件
|
||||
queryParams.value.createTimeSTime = ""
|
||||
queryParams.value.createTimeETime = ""
|
||||
occurrenceTime.value = ""
|
||||
proxy.resetForm("queryRef");
|
||||
getList();
|
||||
}
|
||||
|
||||
/** 选择条数 */
|
||||
function handleSelectionChange(selection) {
|
||||
ids.value = selection.map((item) => item.id);
|
||||
single.value = selection.length != 1;
|
||||
multiple.value = !selection.length;
|
||||
}
|
||||
|
||||
/** 打开商品盘点 */
|
||||
function openAddStockPart() {
|
||||
// nextTick(() => {
|
||||
// proxy.$refs["stockReceiptRef"].show();
|
||||
// });
|
||||
|
||||
|
||||
router.push({ path: '/medicationmanagement/chkstock/chkstockPart' })
|
||||
}
|
||||
/** 打开批量商品盘点 */
|
||||
function openAddStockBatch() {
|
||||
// nextTick(() => {
|
||||
// proxy.$refs["stockReceiptRef"].show();
|
||||
// });
|
||||
router.push({ path: '/medicationmanagement/chkstock/chkstockBatch' })
|
||||
}
|
||||
|
||||
/** 修改按钮操作 */
|
||||
function handleUpdate(row,view) {
|
||||
editRow.value = row;
|
||||
if(row.typeEnum==4){ // 盘点
|
||||
if(view){
|
||||
router.replace({ path: '/medicationmanagement/chkstock/chkstockPart',query:{supplyBusNo:row.supplyBusNo,view:view} })
|
||||
}else{
|
||||
router.push({ path: '/medicationmanagement/chkstock/chkstockPart',query:{supplyBusNo:editRow.value.supplyBusNo} })
|
||||
}
|
||||
}else{
|
||||
if(view){
|
||||
router.replace({ path: '/medicationmanagement/chkstock/chkstockBatch',query:{supplyBusNo:row.supplyBusNo,view:view} })
|
||||
}else{
|
||||
router.push({ path: '/medicationmanagement/chkstock/chkstockBatch',query:{supplyBusNo:editRow.value.supplyBusNo} })
|
||||
}
|
||||
} else {
|
||||
if (view) {
|
||||
router.replace({
|
||||
path: '/medicationmanagement/chkstock/chkstockBatch',
|
||||
query: { supplyBusNo: row.supplyBusNo, view: view },
|
||||
});
|
||||
} else {
|
||||
router.push({
|
||||
path: '/medicationmanagement/chkstock/chkstockBatch',
|
||||
query: { supplyBusNo: editRow.value.supplyBusNo },
|
||||
});
|
||||
}
|
||||
}
|
||||
/** 提交审核按钮 */
|
||||
function handleSubmitApproval(row) {
|
||||
submitApproval(row.supplyBusNo).then((response) => {
|
||||
proxy.$modal.msgSuccess("提交审批成功");
|
||||
open.value = false;
|
||||
getList();
|
||||
});
|
||||
}
|
||||
|
||||
/** 撤回审批按钮 */
|
||||
function handleWithdrawApproval(row) {
|
||||
withdrawApproval(row.supplyBusNo).then((response) => {
|
||||
proxy.$modal.msgSuccess("撤销审批成功");
|
||||
open.value = false;
|
||||
getList();
|
||||
});
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
getStockinventoryTypeList();
|
||||
}
|
||||
/** 提交审核按钮 */
|
||||
function handleSubmitApproval(row) {
|
||||
submitApproval(row.supplyBusNo).then((response) => {
|
||||
proxy.$modal.msgSuccess('提交审批成功');
|
||||
open.value = false;
|
||||
getList();
|
||||
});
|
||||
}
|
||||
|
||||
// 添加组件被激活时的处理逻辑
|
||||
onActivated(() => {
|
||||
/** 撤回审批按钮 */
|
||||
function handleWithdrawApproval(row) {
|
||||
withdrawApproval(row.supplyBusNo).then((response) => {
|
||||
proxy.$modal.msgSuccess('撤销审批成功');
|
||||
open.value = false;
|
||||
getList();
|
||||
});
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
getStockinventoryTypeList();
|
||||
getList();
|
||||
});
|
||||
|
||||
// 添加组件被激活时的处理逻辑
|
||||
onActivated(() => {
|
||||
// 重新加载数据
|
||||
getList();
|
||||
});
|
||||
</script>
|
||||
});
|
||||
</script>
|
||||
<style scoped>
|
||||
.custom-tree-node {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-weight: bold;
|
||||
font-size: large;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
</style>
|
||||
.custom-tree-node {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-weight: bold;
|
||||
font-size: large;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,267 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-dialog
|
||||
v-model="dialogVisible"
|
||||
title="盘点单明细"
|
||||
width="90%"
|
||||
:destroy-on-close="true"
|
||||
v-loading="loading"
|
||||
@close="close"
|
||||
>
|
||||
<el-row style="margin-bottom: 20px">
|
||||
<template v-if="props.isApply">
|
||||
<el-button plain type="primary" icon="Edit" @click="handelApply"> 审批通过 </el-button>
|
||||
<el-button type="primary" plain icon="Edit" @click="handleReject"> 驳回 </el-button>
|
||||
</template>
|
||||
<el-button type="warning" plain icon="Printer" @click="handlePrint"> 打印单据 </el-button>
|
||||
<el-button type="primary" plain icon="Download" @click="handleExport"> 导出 </el-button>
|
||||
</el-row>
|
||||
<el-descriptions :column="4" style="margin-bottom: 10px">
|
||||
<el-descriptions-item label="单据号:">
|
||||
{{ detailsList[0]?.busNo || '-' }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="盘点仓库:">
|
||||
{{ detailsList[0]?.purposeLocationName || '-' }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="项目类型:">
|
||||
{{ detailsList[0]?.itemType_dictText || '-' }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="盘点日期:">
|
||||
{{ proxy.formatDateStr(detailsList[0]?.occurrenceTime, 'YYYY-MM-DD HH:mm:ss') || '-' }}
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<el-table :data="detailsList" border max-height="600">
|
||||
<el-table-column label="序号" width="60" type="index" align="center" />
|
||||
<el-table-column label="项目名称" align="center" prop="itemName" />
|
||||
<el-table-column
|
||||
label="规格"
|
||||
align="center"
|
||||
prop="totalVolume"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="厂家/产地"
|
||||
align="center"
|
||||
prop="manufacturerText"
|
||||
width="180"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column label="产品批号" align="center" prop="lotNumber" />
|
||||
<el-table-column label="单价" align="right" header-align="center" prop="price" width="120">
|
||||
<template #default="scope">
|
||||
{{ scope.row.price.toFixed(2) + ' 元' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="盘点单位"
|
||||
align="center"
|
||||
prop="measurementUnitCode_dictText"
|
||||
width="80"
|
||||
/>
|
||||
<el-table-column
|
||||
label="盘前库存"
|
||||
align="right"
|
||||
header-align="center"
|
||||
prop="itemName"
|
||||
width="100"
|
||||
>
|
||||
<template #default="scope">
|
||||
{{
|
||||
formatQuantity(
|
||||
Number(scope.row.totalQuantity) - Number(scope.row.itemQuantity),
|
||||
scope.row
|
||||
)
|
||||
}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="实盘数量"
|
||||
align="right"
|
||||
header-align="center"
|
||||
prop="totalQuantity"
|
||||
width="100"
|
||||
>
|
||||
<template #default="scope">
|
||||
{{ formatQuantity(scope.row.totalQuantity, scope.row) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="实盘金额"
|
||||
align="right"
|
||||
header-align="center"
|
||||
prop="totalPrice"
|
||||
width="120"
|
||||
>
|
||||
<template #default="scope">
|
||||
{{ scope.row.totalPrice.toFixed(2) + ' 元' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="盈亏数量"
|
||||
align="right"
|
||||
header-align="center"
|
||||
prop="itemQuantity"
|
||||
width="100"
|
||||
>
|
||||
<template #default="scope">
|
||||
{{ formatQuantity(scope.row.itemQuantity, scope.row) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="盈亏金额" align="right" header-align="center" prop="">
|
||||
<template #default="scope">
|
||||
{{
|
||||
((scope.row.itemQuantity * scope.row.price) / scope.row.partPercent).toFixed(2) + '元'
|
||||
}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="盈亏类型" align="center" prop="reasonCode_dictText" />
|
||||
<el-table-column label="盈亏原因" align="center" prop="reason" />
|
||||
</el-table>
|
||||
<div>
|
||||
<span>合计盈亏金额:{{ totalAmount ? totalAmount.toFixed(4) : 0 }}</span>
|
||||
</div>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button @click="dialogVisible = false">关 闭</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { getCurrentInstance } from 'vue';
|
||||
import { getstocktakingDetail, productStocktakingApproved, reject } from './api';
|
||||
import templateJson from '@/views/medicationmanagement/chkstock/chkstockPart/components/template.json';
|
||||
import { hiprint } from 'vue-plugin-hiprint';
|
||||
import useUserStore from '@/store/modules/user';
|
||||
|
||||
const detailsList = ref([]);
|
||||
const dialogVisible = ref(false);
|
||||
const loading = ref(false);
|
||||
const totalAmount = ref(0);
|
||||
const supplyBusNo = ref('');
|
||||
const userStore = useUserStore();
|
||||
const { proxy } = getCurrentInstance();
|
||||
|
||||
const props = defineProps({
|
||||
isApply: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
});
|
||||
|
||||
function open(busNo) {
|
||||
dialogVisible.value = true;
|
||||
supplyBusNo.value = busNo;
|
||||
getstocktakingDetail({ busNo: busNo, pageSize: 1000, pageNo: 1 }).then((res) => {
|
||||
detailsList.value = res.data.records;
|
||||
totalAmount.value = res.data.records.reduce((accumulator, currentRow) => {
|
||||
return accumulator + (Number(((currentRow.itemQuantity * currentRow.price) / currentRow.partPercent).toFixed(2)) || 0);
|
||||
}, 0);
|
||||
});
|
||||
}
|
||||
|
||||
function formatQuantity(quantity, row) {
|
||||
if (row.measurementUnitCode == row.unitCode) {
|
||||
return formatInventory(
|
||||
quantity,
|
||||
row.partPercent,
|
||||
row.unitCode_dictText,
|
||||
row.minUnitCode_dictText
|
||||
);
|
||||
} else {
|
||||
return quantity + row.minUnitCode_dictText;
|
||||
}
|
||||
}
|
||||
|
||||
function handelApply() {
|
||||
loading.value = true;
|
||||
productStocktakingApproved(supplyBusNo.value).then((res) => {
|
||||
if (res.code == 200) {
|
||||
proxy.$modal.msgSuccess('操作成功');
|
||||
loading.value = false;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function handleReject() {
|
||||
reject(supplyBusNo.value).then((res) => {
|
||||
if (res.code == 200) {
|
||||
proxy.$modal.msgSuccess('操作成功');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 格式化库存数量显示(大单位情况)
|
||||
* @param quantity 小单位库存数量
|
||||
* @param partPercent 拆零比
|
||||
* @param unitCode 大单位
|
||||
* @param minUnitCode 小单位
|
||||
*/
|
||||
function formatInventory(quantity, partPercent, unitCode, minUnitCode) {
|
||||
// 处理负数情况
|
||||
const isNegative = quantity < 0;
|
||||
const absQuantity = Math.abs(quantity);
|
||||
|
||||
if (absQuantity % partPercent !== 0) {
|
||||
const integerPart = Math.floor(absQuantity / partPercent);
|
||||
const decimalPart = absQuantity % partPercent;
|
||||
|
||||
let result = integerPart.toString() + ' ' + unitCode;
|
||||
if (decimalPart > 0) {
|
||||
result += decimalPart.toString() + ' ' + minUnitCode;
|
||||
}
|
||||
|
||||
return isNegative ? '-' + result : result;
|
||||
}
|
||||
|
||||
// 整除情况
|
||||
const result = absQuantity / partPercent + ' ' + unitCode;
|
||||
return isNegative ? '-' + result : result;
|
||||
}
|
||||
|
||||
// 打印盘点单
|
||||
function handlePrint() {
|
||||
const result = [];
|
||||
const printList = detailsList.value.map((item) => {
|
||||
return {
|
||||
...item,
|
||||
name: item.itemName,
|
||||
volume: item.totalVolume,
|
||||
price: Number(item.price).toFixed(2),
|
||||
itemQuantity: formatQuantity(item.itemQuantity, item),
|
||||
profitAmount: ((item.itemQuantity * item.price) / item.partPercent).toFixed(2),
|
||||
};
|
||||
});
|
||||
result.push({
|
||||
purposeLocationName: printList[0].purposeLocationName,
|
||||
name: userStore.name,
|
||||
// totalAmount: totalAmount.value.toFixed(2),
|
||||
occurrenceTime: proxy.formatDateStr(printList[0].occurrenceTime, 'YYYY-MM-DD HH:mm:ss'),
|
||||
busNo: printList[0].busNo,
|
||||
purposeLocationName: printList[0].purposeLocationName,
|
||||
purchaseinventoryList: printList,
|
||||
});
|
||||
const printElements = templateJson;
|
||||
var hiprintTemplate = new hiprint.PrintTemplate({ template: printElements }); // 定义模板
|
||||
hiprintTemplate.print2(result, {
|
||||
// printer: 'EPSON LQ-80KFII',
|
||||
title: '打印标题',
|
||||
}); //开始打印
|
||||
}
|
||||
// 导出
|
||||
function handleExport() {
|
||||
proxy.downloadGet(
|
||||
'/inventory-manage/stocktaking/excel-out',
|
||||
{
|
||||
busNo: supplyBusNo.value,
|
||||
},
|
||||
`盘点单明细_${proxy.formatDateStr(new Date(), 'YYYY-MM-DD')}.xlsx`
|
||||
);
|
||||
}
|
||||
defineExpose({
|
||||
open,
|
||||
});
|
||||
</script>
|
||||
@@ -40,12 +40,6 @@
|
||||
label="产品批号"
|
||||
align="center"
|
||||
prop="lotNumber"
|
||||
/>
|
||||
<el-table-column
|
||||
label="包装单位"
|
||||
align="center"
|
||||
prop="unitCode_dictText"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<!-- <el-table-column label="用法" align="center" prop="methodCode_dictText" />
|
||||
<el-table-column label="单次剂量" align="center" prop="dose" />
|
||||
@@ -54,7 +48,7 @@
|
||||
align="center"
|
||||
prop="doseUnitCode_dictText"
|
||||
/> -->
|
||||
<el-table-column label="生产厂家" align="center" prop="manufacturer" />
|
||||
<el-table-column label="生产厂家" align="center" prop="manufacturerText" />
|
||||
<el-table-column
|
||||
label="编码"
|
||||
align="center"
|
||||
|
||||
Reference in New Issue
Block a user