From 2362a3399f333aec47afc83caf0bfb1887af24a5 Mon Sep 17 00:00:00 2001 From: 曹睿 <360930172@qq.com> Date: 星期四, 10 七月 2025 14:16:15 +0800 Subject: [PATCH] Merge branch 'dev' of http://114.132.189.42:9002/r/product-inventory-management into dev --- src/views/salesManagement/salesLedger/index.vue | 18 +++++++++++++----- 1 files changed, 13 insertions(+), 5 deletions(-) diff --git a/src/views/salesManagement/salesLedger/index.vue b/src/views/salesManagement/salesLedger/index.vue index eb0855d..5a269d6 100644 --- a/src/views/salesManagement/salesLedger/index.vue +++ b/src/views/salesManagement/salesLedger/index.vue @@ -3,7 +3,7 @@ <div class="search_form"> <el-form :model="searchForm" :inline="true"> <el-form-item label="瀹㈡埛鍚嶇О锛�"> - <el-input v-model="searchForm.customerContractNo" placeholder="璇疯緭鍏�" clearable prefix-icon="Search" + <el-input v-model="searchForm.customerName" placeholder="璇疯緭鍏�" clearable prefix-icon="Search" @change="handleQuery" /> </el-form-item> <el-form-item label="瀹㈡埛鍚堝悓鍙凤細"> @@ -153,7 +153,7 @@ <el-row> <el-form-item label="浜у搧淇℃伅锛�" prop="entryDate"> <el-button type="primary" @click="openProductForm('add')">娣诲姞</el-button> - <el-button plain type="danger" @click="deleteProduct">鍒犻櫎</el-button> + <el-button plain type="danger" @click="deleteProduct" >鍒犻櫎</el-button> </el-form-item> </el-row> <el-table :data="productData" border @selection-change="productSelected" show-summary @@ -288,6 +288,7 @@ </div> </template> </el-dialog> + <FileList ref="fileListRef" /> </div> </template> @@ -298,6 +299,7 @@ import { ElMessageBox } from "element-plus"; import useUserStore from "@/store/modules/user"; import { userListNoPage } from "@/api/system/user.js"; +import FileList from "./fileList.vue"; import { ledgerListPage, productList, @@ -629,14 +631,15 @@ const submitForm = () => { proxy.$refs["formRef"].validate((valid) => { if (valid) { - if (productData.value.length > 0) { + console.log('productData.value--', productData.value) + if (productData.value !== null && productData.value.length > 0) { form.value.productData = proxy.HaveJson(productData.value); } else { proxy.$modal.msgWarning("璇锋坊鍔犱骇鍝佷俊鎭�"); return; } let tempFileIds = []; - if (fileList.value.length > 0) { + if (fileList.value !== null && fileList.value.length > 0) { tempFileIds = fileList.value.map((item) => item.tempId); } form.value.tempFileIds = tempFileIds; @@ -680,6 +683,7 @@ }; const submitProductEdit = () => { productForm.value.salesLedgerId = currentId.value; + productForm.value.type = 1 addOrUpdateSalesLedgerProduct(productForm.value).then((res) => { proxy.$modal.msgSuccess("鎻愪氦鎴愬姛"); closeProductDia(); @@ -809,8 +813,12 @@ * * @param row 涓嬭浇鏂囦欢鐨勭浉鍏充俊鎭璞� */ +const fileListRef = ref(null) const downLoadFile = (row) => { - console.log('row', row) + getSalesLedgerWithProducts({ id: row.id, type: 1 }).then((res) => { + fileListRef.value.open(res.salesLedgerFiles) + }); + } getList(); </script> -- Gitblit v1.9.3