提交merge1.3

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

View File

@@ -39,17 +39,9 @@
>
</el-col>
</el-row>
<<<<<<< HEAD
<el-button type="primary" icon="View" @click="handlePrintPreview">
预览单据
</el-button>
<el-button type="success" plain icon="Printer" @click="handlePrint">
打印单据
=======
<el-button type="primary" plain icon="Printer" @click="handlePrint"> 打印单据 </el-button>
<el-button type="primary" plain @click="handleExport" v-if="viewStatus == 'view'">
导出
>>>>>>> v1.3
</el-button>
<el-form
:model="receiptHeaderForm"
@@ -260,15 +252,7 @@
:prop="`purchaseinventoryList.${scope.$index}.manufacturerText`"
:rules="tableRules.manufacturerText"
>
<<<<<<< HEAD
<el-input
v-model="scope.row.manufacturerText"
placeholder=""
disabled
/>
=======
<el-input v-model="scope.row.manufacturerText" placeholder="" disabled />
>>>>>>> v1.3
</el-form-item>
</template>
</el-table-column>
@@ -792,18 +776,6 @@ const data = reactive({
medicationType: [{ required: true, message: "请选择药品类型", trigger: "change" }],
},
tableRules: {
<<<<<<< HEAD
itemId: [{ required: true, message: "项目不能为空", trigger: "blur" }],
statusEnum_enumText: [{ required: true, message: "规格不能为空", trigger: "blur" }],
unitCode: [{ required: true, message: "计量单位不能为空", trigger: "blur" }],
purposeLocationId: [{ required: true, message: "目的仓库不能为空", trigger: "blur" }],
lotNumber: [{ required: true, message: "产品批号不能为空", trigger: "change" }],
startTime: [{ required: true, message: "开始时间不能为空", trigger: "blur" }],
endTime: [{ required: true, message: "结束时间不能为空", trigger: "blur" }],
price: [{ required: true, message: "单价不能为空", trigger: "blur" }],
invoiceNo: [{ required: true, message: "发票号不能为空", trigger: "blur" }],
totalPrice: [{ required: true, message: "总价不能为空", trigger: "blur" }],
=======
itemId: [{ required: true, message: '项目不能为空', trigger: 'blur' }],
statusEnum_enumText: [{ required: true, message: '规格不能为空', trigger: 'blur' }],
unitCode: [{ required: true, message: '计量单位不能为空', trigger: 'blur' }],
@@ -814,7 +786,6 @@ const data = reactive({
price: [{ required: true, message: '单价不能为空', trigger: 'blur' }],
invoiceNo: [{ required: true, message: '发票号不能为空', trigger: 'blur' }],
totalPrice: [{ required: true, message: '总价不能为空', trigger: 'blur' }],
>>>>>>> v1.3
},
});
@@ -905,26 +876,16 @@ onUnmounted(() => {
function addNewRow() {
// 先校验表头表单
<<<<<<< HEAD
proxy.$refs["receiptHeaderRef"].validate((valid) => {
=======
proxy.$refs['receiptHeaderRef'].validate((valid) => {
>>>>>>> v1.3
if (valid) {
// 检查表格中是否有未保存的行
const unsavedRows = form.purchaseinventoryList.filter((row) => !row.isSave);
if (unsavedRows.length > 0) {
// 校验表格中未保存的行
<<<<<<< HEAD
proxy.$refs["formRef"].validate((tableValid) => {
if (!tableValid) {
proxy.$message.warning("请先完善当前行的必填信息后再添加新行");
=======
proxy.$refs['formRef'].validate((tableValid) => {
if (!tableValid) {
proxy.$message.warning('请先完善当前行的必填信息后再添加新行');
>>>>>>> v1.3
return;
}
@@ -936,39 +897,6 @@ function addNewRow() {
// 检查必填字段
if (!row.itemId || !row.name) {
<<<<<<< HEAD
errors.push("项目");
}
if (!row.volume) {
errors.push("规格");
}
if (!row.unitCode) {
errors.push("计量单位");
}
if (!row.purposeLocationId) {
errors.push("仓库");
}
if (!row.itemQuantity || row.itemQuantity === "" || row.itemQuantity === 0) {
errors.push("采购数量");
}
if (!row.lotNumber) {
errors.push("产品批号");
}
if (!row.startTime) {
errors.push("生产日期");
}
if (!row.endTime) {
errors.push("有效期至");
}
if (!row.price || row.price === "" || row.price === 0) {
errors.push("采购单价");
}
if (!row.invoiceNo || row.invoiceNo === "") {
errors.push("发票号");
}
if (!row.totalPrice || row.totalPrice === "" || row.totalPrice === 0) {
errors.push("合计金额");
=======
errors.push('项目');
}
if (!row.volume) {
@@ -1000,17 +928,12 @@ function addNewRow() {
}
if (!row.totalPrice || row.totalPrice === '' || row.totalPrice === 0) {
errors.push('合计金额');
>>>>>>> v1.3
}
if (errors.length > 0) {
invalidRows.push({
rowIndex: rowIndex + 1,
<<<<<<< HEAD
errors: errors.join("、"),
=======
errors: errors.join('、'),
>>>>>>> v1.3
});
}
});
@@ -1018,40 +941,14 @@ function addNewRow() {
if (invalidRows.length > 0) {
const errorMsg = invalidRows
.map((item) => `${item.rowIndex}行缺少:${item.errors}`)
<<<<<<< HEAD
.join("");
proxy.$message.warning(errorMsg + ",请完善后再添加新行");
=======
.join('');
proxy.$message.warning(errorMsg + ',请完善后再添加新行');
>>>>>>> v1.3
return;
}
// 所有校验通过,允许新增
const newRow = {
rowKey: Date.now(),
<<<<<<< HEAD
id: "",
itemTable: "",
itemQuantity: "",
itemId: "",
unitCode: "",
remake: "",
supplierId: "",
purposeTypeEnum: "",
purposeLocationId: null,
purposeLocationStoreId: null,
practitionerId: "",
traceNo: "",
invoiceNo: "-",
startTime: "",
endTime: "",
price: "",
totalPrice: "",
sellPrice: "",
minSellPrice: "",
=======
id: '',
itemTable: '',
itemQuantity: '',
@@ -1071,7 +968,6 @@ function addNewRow() {
totalPrice: '',
sellPrice: '',
minSellPrice: '',
>>>>>>> v1.3
unitList: {}, // 单位列表
isEditing: true, // 标记当前行是否正在编辑
error: false, // 新增 error 字段
@@ -1084,27 +980,6 @@ function addNewRow() {
// 没有未保存的行,直接新增
const newRow = {
rowKey: Date.now(),
<<<<<<< HEAD
id: "",
itemTable: "",
itemQuantity: "",
itemId: "",
unitCode: "",
remake: "",
supplierId: "",
purposeTypeEnum: "",
purposeLocationId: null,
purposeLocationStoreId: null,
practitionerId: "",
traceNo: "",
invoiceNo: "-",
startTime: "",
endTime: "",
price: "",
totalPrice: "",
sellPrice: "",
minSellPrice: "",
=======
id: '',
itemTable: '',
itemQuantity: '',
@@ -1124,7 +999,6 @@ function addNewRow() {
totalPrice: '',
sellPrice: '',
minSellPrice: '',
>>>>>>> v1.3
unitList: {}, // 单位列表
isEditing: true, // 标记当前行是否正在编辑
error: false, // 新增 error 字段
@@ -1233,15 +1107,6 @@ function selectRow(rowValue, index) {
form.purchaseinventoryList[index].unitCode = rowValue.unitCode;
form.purchaseinventoryList[index].manufacturerText = rowValue.manufacturerText;
form.purchaseinventoryList[index].partPercent = rowValue.partPercent;
<<<<<<< HEAD
form.purchaseinventoryList[index].invoiceNo = "-";
form.purchaseinventoryList[index].price = (rowValue.purchaseAmount || 0).toFixed(2);
price.value = (rowValue.purchaseAmount || 0).toFixed(2);
form.purchaseinventoryList[index].unitList = rowValue.unitList[0];
unitMap.value["unitCode"] = rowValue.unitCode;
unitMap.value["minUnitCode"] = rowValue.minUnitCode;
unitMap.value["currentCode"] = rowValue.unitCode;
=======
form.purchaseinventoryList[index].invoiceNo = '-';
form.purchaseinventoryList[index].price = rowValue.purchaseAmount || 0;
price.value = rowValue.purchaseAmount || 0;
@@ -1249,7 +1114,6 @@ function selectRow(rowValue, index) {
unitMap.value['unitCode'] = rowValue.unitCode;
unitMap.value['minUnitCode'] = rowValue.minUnitCode;
unitMap.value['currentCode'] = rowValue.unitCode;
>>>>>>> v1.3
form.purchaseinventoryList[index].itemQuantity = 0;
form.purchaseinventoryList[index].totalPrice = 0;
}
@@ -1274,17 +1138,9 @@ function handleLocationClick(item, row, index) {
row.unitList.minUnitCode_dictText
) || 0;
<<<<<<< HEAD
form.purchaseinventoryList[index].itemTable = res.data[0].itemTable || "";
form.purchaseinventoryList[index].startTime =
formatDateymd(res.data[0].productionDate) || "";
form.purchaseinventoryList[index].endTime =
formatDateymd(res.data[0].expirationDate) || "";
=======
form.purchaseinventoryList[index].itemTable = res.data[0].itemTable || '';
form.purchaseinventoryList[index].startTime = formatDateymd(res.data[0].productionDate) || '';
form.purchaseinventoryList[index].endTime = formatDateymd(res.data[0].expirationDate) || '';
>>>>>>> v1.3
startTimeOld.value = form.purchaseinventoryList[index].startTime
? form.purchaseinventoryList[index].startTime
: "";
@@ -1510,11 +1366,7 @@ function addPurchaseinventorys(rowList) {
}
function handleTraceNoInput(value, row) {
<<<<<<< HEAD
row.traceNo = value.concat(",");
=======
row.traceNo = value.concat(',');
>>>>>>> v1.3
}
/** 选择条数 */
@@ -1794,16 +1646,6 @@ function formatPrintData() {
),
printDate: new Date().toLocaleString("zh-CN"),
...receiptHeaderForm,
<<<<<<< HEAD
purchaseinventoryList: form.purchaseinventoryList.map((item, index) => ({
...item,
rowNumber: index + 1,
itemQuantity: Number(item.itemQuantity) || 0,
price: Number(item.price).toFixed(2),
totalPrice: Number(item.totalPrice).toFixed(2),
})),
};
=======
purchaseinventoryList: form.purchaseinventoryList,
});
const printElements = templateJson;
@@ -1812,7 +1654,6 @@ function formatPrintData() {
printer: 'EPSON LQ-80KFII',
title: '打印标题',
}); //开始打印
>>>>>>> v1.3
}
function deleteSelectedRows() {
@@ -1854,11 +1695,7 @@ function handleTotalAmount() {
/** 重置操作表单 */
function reset() {
<<<<<<< HEAD
proxy.resetForm("receiptHeaderRef");
=======
proxy.resetForm('receiptHeaderRef');
>>>>>>> v1.3
form.purchaseinventoryList = [];
// 完全重置所有表单字段
Object.assign(receiptHeaderForm, {
@@ -1967,13 +1804,8 @@ function handleReject() {
store.clearCurrentData();
// 跳转到审核页面
router.replace({
<<<<<<< HEAD
path: "/aaaa/medicationmanagement/billapproval",
query: { type: "purchaseDocument" },
=======
path: '/aaaa/billapproval',
query: { type: 'purchaseDocument' },
>>>>>>> v1.3
});
}
});
@@ -1989,13 +1821,8 @@ function handelApply() {
store.clearCurrentData();
// 跳转到审核页面
router.replace({
<<<<<<< HEAD
path: "/aaaa/medicationmanagement/billapproval",
query: { type: "purchaseDocument" },
=======
path: '/aaaa/billapproval',
query: { type: 'purchaseDocument' },
>>>>>>> v1.3
});
}
})