@@ -1,310 +0,0 @@
|
||||
{
|
||||
"panels": [
|
||||
{
|
||||
"index": 0,
|
||||
"name": 1,
|
||||
"paperType": "A4",
|
||||
"height": 297,
|
||||
"width": 210,
|
||||
"paperHeader": 73.5,
|
||||
"paperFooter": 817.5,
|
||||
"paperNumberContinue": true,
|
||||
"overPrintOptions": {},
|
||||
"watermarkOptions": {},
|
||||
"panelLayoutOptions": {},
|
||||
"printElements": [
|
||||
{
|
||||
"options": {
|
||||
"left": 249,
|
||||
"top": 12,
|
||||
"height": 12,
|
||||
"width": 70.5,
|
||||
"title": "调拨单据",
|
||||
"coordinateSync": false,
|
||||
"widthHeightSync": false,
|
||||
"fontSize": 16.5,
|
||||
"qrCodeLevel": 0
|
||||
},
|
||||
"printElementType": {
|
||||
"title": "文本",
|
||||
"type": "text"
|
||||
}
|
||||
},
|
||||
{
|
||||
"options": {
|
||||
"left": 10.5,
|
||||
"top": 46.5,
|
||||
"height": 9.75,
|
||||
"width": 120,
|
||||
"title": "单据号",
|
||||
"field": "busNo",
|
||||
"coordinateSync": false,
|
||||
"widthHeightSync": false,
|
||||
"qrCodeLevel": 0
|
||||
},
|
||||
"printElementType": {
|
||||
"title": "文本",
|
||||
"type": "text"
|
||||
}
|
||||
},
|
||||
{
|
||||
"options": {
|
||||
"left": 141,
|
||||
"top": 46.5,
|
||||
"height": 9.75,
|
||||
"width": 97.5,
|
||||
"title": "源仓库",
|
||||
"field": "sourceLocationName",
|
||||
"coordinateSync": false,
|
||||
"widthHeightSync": false,
|
||||
"qrCodeLevel": 0
|
||||
},
|
||||
"printElementType": {
|
||||
"title": "文本",
|
||||
"type": "text"
|
||||
}
|
||||
},
|
||||
{
|
||||
"options": {
|
||||
"left": 249,
|
||||
"top": 46.5,
|
||||
"height": 9.75,
|
||||
"width": 97.5,
|
||||
"title": "目的仓库",
|
||||
"coordinateSync": false,
|
||||
"widthHeightSync": false,
|
||||
"qrCodeLevel": 0,
|
||||
"field": "purposeLocationName"
|
||||
},
|
||||
"printElementType": {
|
||||
"title": "文本",
|
||||
"type": "text"
|
||||
}
|
||||
},
|
||||
{
|
||||
"options": {
|
||||
"left": 360.99609375,
|
||||
"top": 46.5,
|
||||
"height": 9.75,
|
||||
"width": 78,
|
||||
"title": "项目类型",
|
||||
"coordinateSync": false,
|
||||
"widthHeightSync": false,
|
||||
"qrCodeLevel": 0,
|
||||
"field": "itemType_dictText"
|
||||
},
|
||||
"printElementType": {
|
||||
"title": "文本",
|
||||
"type": "text"
|
||||
}
|
||||
},
|
||||
{
|
||||
"options": {
|
||||
"left": 445.5,
|
||||
"top": 46.5,
|
||||
"height": 9.75,
|
||||
"width": 136.5,
|
||||
"title": "制单日期",
|
||||
"field": "occurrenceTime",
|
||||
"coordinateSync": false,
|
||||
"widthHeightSync": false,
|
||||
"qrCodeLevel": 0
|
||||
},
|
||||
"printElementType": {
|
||||
"title": "文本",
|
||||
"type": "text"
|
||||
}
|
||||
},
|
||||
{
|
||||
"options": {
|
||||
"left": 9,
|
||||
"top": 88.5,
|
||||
"height": 36,
|
||||
"width": 573,
|
||||
"title": "undefined+beforeDragIn",
|
||||
"field": "detailsList",
|
||||
"coordinateSync": false,
|
||||
"widthHeightSync": false,
|
||||
"columns": [
|
||||
[
|
||||
{
|
||||
"title": "项目名称",
|
||||
"titleSync": false,
|
||||
"halign": "center",
|
||||
"tableQRCodeLevel": 0,
|
||||
"tableSummaryTitle": true,
|
||||
"tableSummary": "",
|
||||
"width": 86.67519359101631,
|
||||
"field": "name",
|
||||
"checked": true,
|
||||
"columnId": "name",
|
||||
"fixed": false,
|
||||
"rowspan": 1,
|
||||
"colspan": 1
|
||||
},
|
||||
{
|
||||
"title": "规格",
|
||||
"titleSync": false,
|
||||
"halign": "center",
|
||||
"tableQRCodeLevel": 0,
|
||||
"tableSummaryTitle": true,
|
||||
"tableSummary": "",
|
||||
"width": 80.21549132169478,
|
||||
"field": "totalVolume",
|
||||
"checked": true,
|
||||
"columnId": "totalVolume",
|
||||
"fixed": false,
|
||||
"rowspan": 1,
|
||||
"colspan": 1
|
||||
},
|
||||
{
|
||||
"title": "厂家",
|
||||
"titleSync": false,
|
||||
"halign": "center",
|
||||
"tableQRCodeLevel": 0,
|
||||
"tableSummaryTitle": true,
|
||||
"tableSummary": "",
|
||||
"width": 75.93737727220328,
|
||||
"field": "manufacturerText",
|
||||
"checked": true,
|
||||
"columnId": "manufacturerText",
|
||||
"fixed": false,
|
||||
"rowspan": 1,
|
||||
"colspan": 1
|
||||
},
|
||||
{
|
||||
"title": "批号",
|
||||
"titleSync": false,
|
||||
"halign": "center",
|
||||
"tableQRCodeLevel": 0,
|
||||
"tableSummaryTitle": true,
|
||||
"tableSummary": "",
|
||||
"width": 67.21760769186436,
|
||||
"field": "lotNumber",
|
||||
"checked": true,
|
||||
"columnId": "lotNumber",
|
||||
"fixed": false,
|
||||
"rowspan": 1,
|
||||
"colspan": 1
|
||||
},
|
||||
{
|
||||
"title": "单价",
|
||||
"titleSync": false,
|
||||
"align": "right",
|
||||
"halign": "center",
|
||||
"tableQRCodeLevel": 0,
|
||||
"tableSummaryTitle": true,
|
||||
"tableSummary": "",
|
||||
"width": 60.17562958542372,
|
||||
"field": "price",
|
||||
"checked": true,
|
||||
"columnId": "price",
|
||||
"fixed": false,
|
||||
"rowspan": 1,
|
||||
"colspan": 1
|
||||
},
|
||||
{
|
||||
"title": "调拨单位",
|
||||
"titleSync": false,
|
||||
"align": "center",
|
||||
"halign": "center",
|
||||
"tableQRCodeLevel": 0,
|
||||
"tableSummaryTitle": true,
|
||||
"tableSummary": "",
|
||||
"width": 30.9839942645893,
|
||||
"field": "measurementUnitCode_dictText",
|
||||
"checked": true,
|
||||
"columnId": "measurementUnitCode_dictText",
|
||||
"fixed": false,
|
||||
"rowspan": 1,
|
||||
"colspan": 1
|
||||
},
|
||||
{
|
||||
"title": "源库存数",
|
||||
"titleSync": false,
|
||||
"align": "right",
|
||||
"halign": "center",
|
||||
"tableQRCodeLevel": 0,
|
||||
"tableSummaryTitle": true,
|
||||
"tableSummary": "",
|
||||
"width": 55.062860531575446,
|
||||
"field": "totalSourceQuantity",
|
||||
"checked": true,
|
||||
"columnId": "totalSourceQuantity",
|
||||
"fixed": false,
|
||||
"rowspan": 1,
|
||||
"colspan": 1
|
||||
},
|
||||
{
|
||||
"title": "调拨数",
|
||||
"titleSync": false,
|
||||
"align": "right",
|
||||
"halign": "center",
|
||||
"tableQRCodeLevel": 0,
|
||||
"tableSummaryTitle": true,
|
||||
"tableSummary": "",
|
||||
"width": 63.064593526717786,
|
||||
"field": "itemQuantity",
|
||||
"checked": true,
|
||||
"columnId": "itemQuantity",
|
||||
"fixed": false,
|
||||
"rowspan": 1,
|
||||
"colspan": 1
|
||||
},
|
||||
{
|
||||
"title": "合计金额",
|
||||
"titleSync": false,
|
||||
"align": "right",
|
||||
"halign": "center",
|
||||
"tableQRCodeLevel": 0,
|
||||
"tableSummaryTitle": true,
|
||||
"tableSummary": "",
|
||||
"width": 53.66725221491505,
|
||||
"field": "totalPrice",
|
||||
"checked": true,
|
||||
"columnId": "totalPrice",
|
||||
"fixed": false,
|
||||
"rowspan": 1,
|
||||
"colspan": 1
|
||||
},
|
||||
{
|
||||
"width": 85.25,
|
||||
"checked": false,
|
||||
"fixed": false,
|
||||
"rowspan": 1,
|
||||
"colspan": 1
|
||||
},
|
||||
{
|
||||
"width": 85.25,
|
||||
"checked": false,
|
||||
"fixed": false,
|
||||
"rowspan": 1,
|
||||
"colspan": 1
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"printElementType": {
|
||||
"title": "表格",
|
||||
"type": "table",
|
||||
"editable": true,
|
||||
"columnDisplayEditable": true,
|
||||
"columnDisplayIndexEditable": true,
|
||||
"columnTitleEditable": true,
|
||||
"columnResizable": true,
|
||||
"columnAlignEditable": true,
|
||||
"isEnableEditField": true,
|
||||
"isEnableContextMenu": true,
|
||||
"isEnableInsertRow": true,
|
||||
"isEnableDeleteRow": true,
|
||||
"isEnableInsertColumn": true,
|
||||
"isEnableDeleteColumn": true,
|
||||
"isEnableMergeCell": true
|
||||
}
|
||||
}
|
||||
],
|
||||
"paperNumberLeft": 565,
|
||||
"paperNumberTop": 819
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,264 +0,0 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-dialog
|
||||
v-model="dialogVisible"
|
||||
title="批量调拨单明细"
|
||||
width="90%"
|
||||
:destroy-on-close="true"
|
||||
@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="primary" plain icon="Download" @click="handleExport"> 导出 </el-button>
|
||||
<el-button type="warning" plain icon="Printer" @click="handlePrint"> 打印单据 </el-button>
|
||||
</el-row>
|
||||
<el-descriptions :column="5" style="margin-bottom: 10px">
|
||||
<el-descriptions-item label="单据号:">
|
||||
{{ detailsList[0]?.busNo || '-' }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="源仓库:">
|
||||
{{ detailsList[0]?.sourceLocationName || '-' }}
|
||||
</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="650" v-loading="loading">
|
||||
<el-table-column label="序号" width="60" type="index" align="center" />
|
||||
<el-table-column label="项目名称" align="center" prop="name" />
|
||||
<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.totalSourceQuantity), scope.row) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column
|
||||
label="目的库存数"
|
||||
align="right"
|
||||
header-align="center"
|
||||
prop="itemName"
|
||||
width="100"
|
||||
>
|
||||
<template #default="scope">
|
||||
{{
|
||||
formatQuantity(
|
||||
Number(scope.row.itemQuantity) - Number(scope.row.totalSourceQuantity),
|
||||
scope.row
|
||||
)
|
||||
}}
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
<el-table-column
|
||||
label="调拨数量"
|
||||
align="right"
|
||||
header-align="center"
|
||||
prop="totalQuitemQuantityantity"
|
||||
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="totalPrice"
|
||||
width="120"
|
||||
>
|
||||
<template #default="scope">
|
||||
{{ scope.row.totalPrice?.toFixed(2) + ' 元' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="生产日期" align="center" prop="startTime" width="120">
|
||||
<template #default="scope">
|
||||
{{ proxy.formatDateStr(scope.row.startTime, 'YYYY-MM-DD') }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="有效期至" align="center" prop="endTime" width="120">
|
||||
<template #default="scope">
|
||||
{{ proxy.formatDateStr(scope.row.endTime, 'YYYY-MM-DD') }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<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 { getTransferProductDetail, productTransferApproved, reject } from './transferManagement';
|
||||
import templateJson from './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 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;
|
||||
loading.value = true;
|
||||
getTransferProductDetail({ busNo: busNo, pageSize: 1000, pageNo: 1 }).then((res) => {
|
||||
detailsList.value = res.data.records;
|
||||
loading.value = false;
|
||||
});
|
||||
}
|
||||
|
||||
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;
|
||||
productTransferApproved(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,
|
||||
volume: item.totalVolume,
|
||||
price: Number(item.price).toFixed(2) + ' 元',
|
||||
totalPrice: Number(item.totalPrice).toFixed(2) + ' 元',
|
||||
totalSourceQuantity: formatQuantity(Number(item.totalSourceQuantity), item),
|
||||
itemQuantity: formatQuantity(Number(item.itemQuantity), item),
|
||||
profitAmount: ((item.itemQuantity * item.price) / item.partPercent).toFixed(2),
|
||||
};
|
||||
});
|
||||
result.push({
|
||||
purposeLocationName: printList[0].purposeLocationName,
|
||||
sourceLocationName: printList[0].sourceLocationName,
|
||||
itemType_dictText: printList[0].itemType_dictText,
|
||||
name: userStore.name,
|
||||
occurrenceTime: proxy.formatDateStr(printList[0].occurrenceTime, 'YYYY-MM-DD HH:mm:ss'),
|
||||
busNo: printList[0].busNo,
|
||||
detailsList: printList,
|
||||
});
|
||||
const printElements = templateJson;
|
||||
var hiprintTemplate = new hiprint.PrintTemplate({ template: printElements }); // 定义模板
|
||||
hiprintTemplate.print2(result, {
|
||||
title: '打印标题',
|
||||
}); //开始打印
|
||||
}
|
||||
function handleExport() {
|
||||
proxy.downloadGet(
|
||||
'/inventory-manage/transfer/excel-out',
|
||||
{
|
||||
busNo: supplyBusNo.value,
|
||||
},
|
||||
`批量调拨单据明细记录_${proxy.formatDateStr(new Date(), 'YYYY-MM-DD')}.xlsx`
|
||||
);
|
||||
}
|
||||
defineExpose({
|
||||
open,
|
||||
});
|
||||
</script>
|
||||
@@ -54,7 +54,7 @@
|
||||
align="center"
|
||||
prop="doseUnitCode_dictText"
|
||||
/> -->
|
||||
<el-table-column label="生产厂家" align="center" prop="manufacturerText" />
|
||||
<el-table-column label="生产厂家" align="center" prop="manufacturer" />
|
||||
<el-table-column
|
||||
label="编码"
|
||||
align="center"
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -7,18 +7,23 @@
|
||||
v-show="showSearch"
|
||||
label-width="90px"
|
||||
>
|
||||
<!-- supplyBusNo searchKey-->
|
||||
<!-- supplyBusNo searchKey-->
|
||||
<el-form-item label="单据号:" prop="searchKey">
|
||||
<el-input
|
||||
v-model="queryParams.searchKey"
|
||||
placeholder="单据号:"
|
||||
clearable
|
||||
style="width: 220px"
|
||||
style="width: 220px;"
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="单据类型:" prop="typeEnum">
|
||||
<el-select v-model="queryParams.typeEnum" placeholder="" clearable style="width: 150px">
|
||||
<el-select
|
||||
v-model="queryParams.typeEnum"
|
||||
placeholder=""
|
||||
clearable
|
||||
style="width: 150px"
|
||||
>
|
||||
<el-option
|
||||
v-for="supplyStatus in supplyTypeOptions"
|
||||
:key="supplyStatus.value"
|
||||
@@ -66,10 +71,15 @@
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="审批状态:" prop="statusEnum">
|
||||
<el-select v-model="queryParams.statusEnum" placeholder="" clearable style="width: 150px">
|
||||
<el-form-item label="审批状态:" prop="statusEnum">
|
||||
<el-select
|
||||
v-model="queryParams.statusEnum"
|
||||
placeholder=""
|
||||
clearable
|
||||
style="width: 150px"
|
||||
>
|
||||
<el-option
|
||||
v-for="supplyStatus in supplyStatusOptions"
|
||||
v-for="supplyStatus in supplyStatusOptions"
|
||||
:key="supplyStatus.value"
|
||||
:label="supplyStatus.label"
|
||||
:value="supplyStatus.value"
|
||||
@@ -91,28 +101,49 @@
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<!-- 添加记录 -->
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" plain icon="Plus" @click="openAddaddTransferProductDialog"
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="Plus"
|
||||
@click="openAddaddTransferProductDialog"
|
||||
|
||||
>新增调拨单</el-button
|
||||
>
|
||||
<!-- v-hasPermi="['system:user:add']" -->
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" plain icon="Plus" @click="openAddaddTransferProducts"
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="Plus"
|
||||
@click="openAddaddTransferProducts"
|
||||
|
||||
>新增批量调拨单</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>
|
||||
<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>
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="CircleClose"
|
||||
@click="handleClear"
|
||||
|
||||
>重置</el-button
|
||||
>
|
||||
<!-- v-hasPermi="['system:user:export']" -->
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" plain icon="Download" @click="handleExport">导出</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-table
|
||||
@@ -121,7 +152,7 @@
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column type="selection" width="50" align="center" />
|
||||
<!-- <el-table-column
|
||||
<!-- <el-table-column
|
||||
label="药品名称"
|
||||
align="center"
|
||||
key="name"
|
||||
@@ -134,7 +165,7 @@
|
||||
align="center"
|
||||
key="supplyBusNo"
|
||||
prop="supplyBusNo"
|
||||
width="200"
|
||||
width="200"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<!-- itemTable -->
|
||||
@@ -221,11 +252,7 @@
|
||||
link
|
||||
type="primary"
|
||||
icon="View"
|
||||
@click="
|
||||
() => {
|
||||
proxy.$refs['detailsDialogRef'].open(scope.row.supplyBusNo);
|
||||
}
|
||||
"
|
||||
@click="handleUpdate(scope.row,'view')"
|
||||
>详情</el-button
|
||||
>
|
||||
<el-button
|
||||
@@ -233,10 +260,9 @@
|
||||
type="primary"
|
||||
icon="Edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
|
||||
:disabled="
|
||||
scope.row.statusEnum != '1' &&
|
||||
scope.row.statusEnum != '9' &&
|
||||
scope.row.statusEnum != '4'
|
||||
scope.row.statusEnum != '1' && scope.row.statusEnum != '9' && scope.row.statusEnum != '4'
|
||||
"
|
||||
>编辑</el-button
|
||||
>
|
||||
@@ -246,6 +272,7 @@
|
||||
type="primary"
|
||||
icon="View"
|
||||
@click="handleSubmitApproval(scope.row)"
|
||||
|
||||
v-if="scope.row.statusEnum == '1' || scope.row.statusEnum == '9'"
|
||||
>提交审批</el-button
|
||||
>
|
||||
@@ -255,6 +282,7 @@
|
||||
type="primary"
|
||||
icon="View"
|
||||
@click="handleWithdrawApproval(scope.row)"
|
||||
|
||||
v-if="scope.row.statusEnum == '2'"
|
||||
>撤销审批</el-button
|
||||
>
|
||||
@@ -269,7 +297,6 @@
|
||||
v-model:limit="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
<TransferDetailsDialog ref="detailsDialogRef" />
|
||||
<!-- <Dialog
|
||||
ref="transferProductRef"
|
||||
:supplyTypeOptions="supplyTypeOptions"
|
||||
@@ -290,10 +317,9 @@ import {
|
||||
submitApproval,
|
||||
withdrawApproval,
|
||||
delTransferProduct,
|
||||
getpharmacyCabinetList,
|
||||
} from '../components/transferManagement';
|
||||
getpharmacyCabinetList
|
||||
} from "../components/transferManagement";
|
||||
import { useStore } from '@/store/store';
|
||||
import TransferDetailsDialog from '../components/transferDetailsDialog.vue';
|
||||
const store = useStore();
|
||||
// import Dialog from "./components/Dialog";
|
||||
|
||||
@@ -301,7 +327,7 @@ const router = useRouter();
|
||||
const { proxy } = getCurrentInstance();
|
||||
|
||||
const purchaseinventoryRef = ref(null); // 初始化 ref
|
||||
const getpharmacyCabinetOptions = ref([]);
|
||||
const getpharmacyCabinetOptions = ref([])
|
||||
const purchaseinventoryList = ref([]);
|
||||
const open = ref(false);
|
||||
const loading = ref(true);
|
||||
@@ -310,12 +336,12 @@ const ids = ref([]);
|
||||
const single = ref(true);
|
||||
const multiple = ref(true);
|
||||
const total = ref(0);
|
||||
const title = ref('');
|
||||
const title = ref("");
|
||||
const occurrenceTime = ref([]);
|
||||
const busNoAdd = ref(''); // 单据号新增
|
||||
const busNoAdd = ref(""); // 单据号新增
|
||||
const purposeTypeListOptions = ref(undefined);
|
||||
const sourceTypeListOptions = ref(undefined);
|
||||
const supplyTypeOptions = ref(undefined);
|
||||
const sourceTypeListOptions = ref(undefined)
|
||||
const supplyTypeOptions = ref(undefined);
|
||||
const sourceLocationIdListOptions = ref(undefined); // 源仓库
|
||||
const purposeLocationIdListOptions = ref(undefined); //目的仓库
|
||||
const supplyStatusOptions = ref(undefined);
|
||||
@@ -328,13 +354,13 @@ const data = reactive({
|
||||
queryParams: {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
searchKey: undefined,
|
||||
typeEnum: undefined, // 单据类型
|
||||
sourceLocationId: undefined, //源仓库
|
||||
purposeLocationId: undefined, // 目的仓库
|
||||
searchKey: undefined,
|
||||
typeEnum:undefined, // 单据类型
|
||||
sourceLocationId:undefined,//源仓库
|
||||
purposeLocationId:undefined,// 目的仓库
|
||||
statusEnum: undefined, // 单据状态
|
||||
createTimeSTime: undefined,
|
||||
createTimeETime: undefined,
|
||||
createTimeSTime:undefined,
|
||||
createTimeETime:undefined,
|
||||
},
|
||||
rules: {},
|
||||
});
|
||||
@@ -344,14 +370,14 @@ const { queryParams, form, rules } = toRefs(data);
|
||||
/** 调拨管理查询下拉树结构 */
|
||||
function getTransferProductTypeList() {
|
||||
getInit().then((response) => {
|
||||
purposeTypeListOptions.value = response.data.purposeTypeListOptions;
|
||||
purposeTypeListOptions.value = response.data.purposeTypeListOptions;
|
||||
sourceTypeListOptions.value = response.data.sourceTypeListOptions;
|
||||
supplyTypeOptions.value = response.data.supplyTypeOptions;
|
||||
supplyStatusOptions.value = response.data.supplyStatusOptions;
|
||||
supplyTypeOptions.value = response.data.supplyTypeOptions ;
|
||||
supplyStatusOptions.value = response.data.supplyStatusOptions;
|
||||
});
|
||||
getpharmacyCabinetList().then((response) => {
|
||||
getpharmacyCabinetOptions.value = response.data;
|
||||
});
|
||||
getpharmacyCabinetOptions.value = response.data
|
||||
})
|
||||
}
|
||||
|
||||
/** 查询调拨管理项目列表 */
|
||||
@@ -368,12 +394,12 @@ function getList() {
|
||||
function handleQuery() {
|
||||
queryParams.value.createTimeSTime =
|
||||
occurrenceTime.value && occurrenceTime.value.length == 2
|
||||
? occurrenceTime.value[0] + ' 00:00:00'
|
||||
: '';
|
||||
? occurrenceTime.value[0] + " 00:00:00"
|
||||
: "";
|
||||
queryParams.value.createTimeETime =
|
||||
occurrenceTime.value && occurrenceTime.value.length == 2
|
||||
? occurrenceTime.value[1] + ' 23:59:59'
|
||||
: '';
|
||||
? occurrenceTime.value[1] + " 23:59:59"
|
||||
: "";
|
||||
queryParams.value.pageNo = 1;
|
||||
getList();
|
||||
}
|
||||
@@ -381,10 +407,10 @@ function handleQuery() {
|
||||
/** 清空条件按钮操作 */
|
||||
function handleClear() {
|
||||
// 清空查询条件
|
||||
queryParams.value.createTimeSTime = '';
|
||||
queryParams.value.createTimeETime = '';
|
||||
occurrenceTime.value = '';
|
||||
proxy.resetForm('queryRef');
|
||||
queryParams.value.createTimeSTime = ""
|
||||
queryParams.value.createTimeETime = ""
|
||||
occurrenceTime.value = ""
|
||||
proxy.resetForm("queryRef");
|
||||
getList();
|
||||
}
|
||||
|
||||
@@ -395,8 +421,8 @@ function handleSelectionChange(selection) {
|
||||
multiple.value = !selection.length;
|
||||
}
|
||||
/** 打开批量新增 */
|
||||
function openAddaddTransferProducts() {
|
||||
router.push({ path: '/medicationmanagement/transferManagement/batchTransfer' });
|
||||
function openAddaddTransferProducts(){
|
||||
router.push({ path: '/medicationmanagement/transferManagement/batchTransfer'})
|
||||
}
|
||||
/** 打开新增 */
|
||||
function openAddaddTransferProductDialog() {
|
||||
@@ -408,31 +434,32 @@ function openAddaddTransferProductDialog() {
|
||||
// const partItem = {partFlg: 'add',rowData: []}
|
||||
// item: JSON.stringify(partItem)
|
||||
// ,query:{item: JSON.stringify(partItem)}
|
||||
sessionStorage.setItem('busNo', '');
|
||||
store.clearCurrentDataDB();
|
||||
router.push({ path: '/medicationmanagement/transferManagement/transferManagent' });
|
||||
sessionStorage.setItem('busNo',"")
|
||||
store.clearCurrentDataDB()
|
||||
router.push({ path: '/medicationmanagement/transferManagement/transferManagent'})
|
||||
}
|
||||
|
||||
/** 修改按钮操作 */
|
||||
function handleUpdate(row, view) {
|
||||
function handleUpdate(row,view) {
|
||||
editRow.value = row;
|
||||
if (row.typeEnum == 8) {
|
||||
// 批量调拨
|
||||
router.replace({
|
||||
path: '/medicationmanagement/transferManagement/batchTransfer',
|
||||
query: { supplyBusNo: editRow.value.supplyBusNo, isEdit: true },
|
||||
});
|
||||
} else {
|
||||
router.replace({
|
||||
path: '/medicationmanagement/transferManagement/transferManagent',
|
||||
query: { supplyBusNo: editRow.value.supplyBusNo, isEdit: true },
|
||||
});
|
||||
if(row.typeEnum==8){ // 批量调拨
|
||||
if(view){
|
||||
router.replace({ path: '/medicationmanagement/transferManagement/batchTransfer',query:{supplyBusNo:row.supplyBusNo,view:view}})
|
||||
}else{
|
||||
router.push({ path: '/medicationmanagement/transferManagement/batchTransfer',query:{supplyBusNo:editRow.value.supplyBusNo}})
|
||||
}
|
||||
}else{
|
||||
if(view){
|
||||
router.replace({path: '/medicationmanagement/transferManagement/transferManagent',query:{supplyBusNo:row.supplyBusNo,view:view}});
|
||||
}else{
|
||||
router.push({ path: '/medicationmanagement/transferManagement/transferManagent',query:{supplyBusNo:editRow.value.supplyBusNo}})
|
||||
}
|
||||
}
|
||||
}
|
||||
/** 提交审核按钮 */
|
||||
function handleSubmitApproval(row) {
|
||||
submitApproval(row.supplyBusNo).then((response) => {
|
||||
proxy.$modal.msgSuccess('提交审批成功');
|
||||
proxy.$modal.msgSuccess("提交审批成功");
|
||||
open.value = false;
|
||||
getList();
|
||||
});
|
||||
@@ -441,7 +468,7 @@ function handleSubmitApproval(row) {
|
||||
/** 撤回审批按钮 */
|
||||
function handleWithdrawApproval(row) {
|
||||
withdrawApproval(row.supplyBusNo).then((response) => {
|
||||
proxy.$modal.msgSuccess('撤销审批成功');
|
||||
proxy.$modal.msgSuccess("撤销审批成功");
|
||||
open.value = false;
|
||||
getList();
|
||||
});
|
||||
@@ -451,25 +478,16 @@ function handleWithdrawApproval(row) {
|
||||
function handleDelete(row) {
|
||||
const delId = row.id || ids.value;
|
||||
proxy.$modal
|
||||
.confirm('是否确认删除以上数据?')
|
||||
.confirm("是否确认删除以上数据?")
|
||||
.then(function () {
|
||||
return delTransferProduct({ ids: delId.join(',') });
|
||||
return delTransferProduct({ ids: delId.join(",") });
|
||||
})
|
||||
.then(() => {
|
||||
getList();
|
||||
proxy.$modal.msgSuccess('删除成功');
|
||||
proxy.$modal.msgSuccess("删除成功");
|
||||
})
|
||||
.catch(() => {});
|
||||
}
|
||||
function handleExport() {
|
||||
proxy.downloadGet(
|
||||
'inventory-manage/transfer/export-excel',
|
||||
{
|
||||
...queryParams.value,
|
||||
},
|
||||
`调拨单_${proxy.formatDateStr(new Date(), 'YYYY-MM-DD')}.xlsx`
|
||||
);
|
||||
}
|
||||
|
||||
getTransferProductTypeList();
|
||||
getList();
|
||||
|
||||
Reference in New Issue
Block a user