From a9ed2b5a1e4370ecf4c0d4f40d515daef0e999df Mon Sep 17 00:00:00 2001
From: yuan <123@>
Date: 星期二, 04 八月 2026 16:04:58 +0800
Subject: [PATCH] 1
---
src/views/procurementManagement/procurementLedger/index.vue | 50 +++++++++++++++++++++++++++++++++++---------------
1 files changed, 35 insertions(+), 15 deletions(-)
diff --git a/src/views/procurementManagement/procurementLedger/index.vue b/src/views/procurementManagement/procurementLedger/index.vue
index 685a8aa..6167e6c 100644
--- a/src/views/procurementManagement/procurementLedger/index.vue
+++ b/src/views/procurementManagement/procurementLedger/index.vue
@@ -108,7 +108,7 @@
<el-button link type="primary" @click="openForm('edit', scope.row)"
:disabled="scope.row.stockInStatus === '瀹屽叏鍏ュ簱'">缂栬緫
</el-button>
- <el-button link type="primary" @click="downloadOrder(scope.row.id)">涓嬭浇</el-button>
+ <el-button link type="primary" @click="openFileDialog(scope.row)">闄勪欢</el-button> <!--downloadOrder(scope.row.id) 涓嬭浇-->
</template>
</el-table-column>
</el-table>
@@ -137,7 +137,7 @@
<el-col :span="12">
<el-form-item label="渚涘簲鍟嗗悕绉帮細" prop="supplierId">
<el-select v-model="form.supplierId" placeholder="璇烽�夋嫨" filterable clearable>
- <el-option v-for="item in supplierList" :key="item.id" :label="item.supplierName" :value="item.id">{{ item.supplierName + '---' + item.supplierType }}</el-option>
+ <el-option v-for="item in supplierList" :key="item.id" :label="item.supplierName" :value="item.id">{{ item.supplierType ? item.supplierName + '---' + item.supplierType : item.supplierName }}</el-option>
</el-select>
</el-form-item>
</el-col>
@@ -277,20 +277,22 @@
@cancel="closeProductDia">
<el-form :model="productForm" label-width="140px" label-position="top" :rules="productRules" ref="productFormRef">
<el-row :gutter="30">
- <el-col :span="24">
- <el-form-item label="浜у搧澶х被锛�" prop="productId">
- <el-tree-select v-model="productForm.productId" placeholder="璇烽�夋嫨" clearable filterable check-strictly
- @change="getModels" :data="productOptions" :render-after-expand="false" style="width: 100%" />
+ <el-col :span="12">
+ <el-form-item label="浜у搧澶х被锛�" prop="productCategory">
+ <el-input v-model="productForm.productCategory"
+ placeholder="鐐瑰嚮閫夋嫨"
+ readonly
+ @click="showProductSelectDialog = true"
+ style="cursor:pointer" />
</el-form-item>
</el-col>
- </el-row>
- <el-row :gutter="30">
- <el-col :span="24">
+ <el-col :span="12">
<el-form-item label="瑙勬牸鍨嬪彿锛�" prop="productModelId">
- <el-select v-model="productForm.productModelId" placeholder="璇烽�夋嫨" filterable clearable
- @change="getProductModel">
- <el-option v-for="item in modelOptions" :key="item.id" :label="item.model" :value="item.id" />
- </el-select>
+ <el-input v-model="productForm.specificationModel"
+ placeholder="鐐瑰嚮閫夋嫨"
+ readonly
+ @click="showProductSelectDialog = true"
+ style="cursor:pointer" />
</el-form-item>
</el-col>
</el-row>
@@ -372,6 +374,9 @@
</el-row>-->
</el-form>
</FormDialog>
+ <ProductSelectDialog v-model="showProductSelectDialog"
+ @confirm="handleProductSelect"
+ single />
<FileList v-if="fileListDialogVisible" v-model:visible="fileListDialogVisible" record-type="purchase_ledger"
:record-id="recordId" />
<Detail ref="detailRef" />
@@ -445,6 +450,7 @@
const fileList = ref([]);
import useUserStore from "@/store/modules/user";
import { modelList, productTreeList } from "@/api/basicData/product.js";
+import ProductSelectDialog from "@/views/basicData/product/ProductSelectDialog.vue";
import dayjs from "dayjs";
import FileUpload from "@/components/AttachmentUpload/file/index.vue";
import { tableAmountFormatter, formatDecimal, buildAmountSummaryFormat } from '@/utils/numberFormat';
@@ -648,6 +654,7 @@
// 浜у搧琛ㄥ崟寮规鏁版嵁
const productFormVisible = ref(false);
+const showProductSelectDialog = ref(false);
const productOperationType = ref("");
const productOperationIndex = ref("");
const currentId = ref("");
@@ -668,8 +675,8 @@
isChecked: false,
},
productRules: {
- productId: [{ required: true, message: "璇烽�夋嫨", trigger: "change" }],
- productModelId: [{ required: true, message: "璇烽�夋嫨", trigger: "change" }],
+ productCategory: [{ required: true, message: "璇烽�夋嫨浜у搧澶х被", trigger: "change" }],
+ productModelId: [{ required: true, message: "璇烽�夋嫨瑙勬牸鍨嬪彿", trigger: "change" }],
unit: [{ required: true, message: "璇疯緭鍏�", trigger: "blur" }],
quantity: [{ required: true, message: "璇疯緭鍏�", trigger: "blur" }],
taxInclusiveUnitPrice: [
@@ -1257,6 +1264,19 @@
await nextTick();
}
};
+
+// ProductSelectDialog 閫変腑鍥炶皟
+const handleProductSelect = (products) => {
+ if (!products || !products.length) return;
+ const p = products[0];
+ productForm.value.productId = p.productId;
+ productForm.value.productCategory = p.productName || '';
+ productForm.value.productModelId = p.id;
+ productForm.value.specificationModel = p.model || '';
+ productForm.value.unit = p.unit || '';
+ showProductSelectDialog.value = false;
+};
+
const getProductOptions = () => {
return productTreeList().then(res => {
productOptions.value = convertIdToValue(res);
--
Gitblit v1.9.3