| | |
| | | <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="productCategory"> |
| | | <!-- <el-select v-model="productForm.productCategory" placeholder="请选择" clearable> |
| | | <el-option v-for="item in userList" :key="item.nickName" :label="item.nickName" :value="item.nickName"/> |
| | | </el-select> --> |
| | | <el-tree-select v-model="productForm.productCategory" placeholder="请选择" clearable check-strictly |
| | | @change="getModels" :data="productOptions" :render-after-expand="false" filterable style="width: 100%" /> |
| | | <el-form-item label="产品选择:" prop="productSelect"> |
| | | <div style="display: flex; gap: 10px;"> |
| | | <el-input |
| | | v-model="productForm.productCategory" |
| | | placeholder="请选择产品" |
| | | disabled |
| | | style="flex: 1;" |
| | | /> |
| | | <el-button type="primary" @click="openProductSelectDialog">选择</el-button> |
| | | </div> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="30"> |
| | | <el-col :span="24"> |
| | | <el-form-item label="图纸编号:" prop="productModelId"> |
| | | <el-select v-model="productForm.productModelId" placeholder="请选择" clearable @change="getProductModel" filterable> |
| | | <el-option v-for="item in modelOptions" :key="item.id" :label="item.model" :value="item.id" /> |
| | | </el-select> |
| | | <el-form-item label="图纸编号:" prop="specificationModel"> |
| | | <el-input v-model="productForm.specificationModel" placeholder="请输入图纸编号" disabled /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | </div> |
| | | </template> |
| | | </el-dialog> |
| | | |
| | | <!-- 产品选择对话框 --> |
| | | <ProductSelectDialog |
| | | v-model="productSelectVisible" |
| | | :single="true" |
| | | @confirm="handleProductSelect" |
| | | /> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | import { getToken } from "@/utils/auth"; |
| | | import pagination from "@/components/PIMTable/Pagination.vue"; |
| | | import {onMounted, ref, getCurrentInstance} from "vue"; |
| | | import ProductSelectDialog from "@/views/basicData/product/ProductSelectDialog.vue"; |
| | | import { addShippingInfo } from "@/api/salesManagement/deliveryLedger.js"; |
| | | import { ElMessageBox, ElMessage } from "element-plus"; |
| | | import { UploadFilled, Download } from "@element-plus/icons-vue"; |
| | |
| | | const productFormVisible = ref(false); |
| | | const productOperationType = ref(""); |
| | | const currentId = ref(""); |
| | | const productSelectVisible = ref(false); |
| | | const productFormData = reactive({ |
| | | productForm: { |
| | | productCategory: "", |
| | |
| | | proxy.resetForm("productFormRef"); |
| | | productFormVisible.value = false; |
| | | }; |
| | | |
| | | // 打开产品选择对话框 |
| | | const openProductSelectDialog = () => { |
| | | productSelectVisible.value = true; |
| | | }; |
| | | |
| | | // 处理产品选择 |
| | | const handleProductSelect = (selectedProducts) => { |
| | | if (selectedProducts && selectedProducts.length > 0) { |
| | | const product = selectedProducts[0]; |
| | | productForm.value.productCategory = product.productName; |
| | | productForm.value.specificationModel = product.model; |
| | | productForm.value.unit = product.unit; |
| | | } |
| | | }; |
| | | |
| | | // 导入 |
| | | const handleImport = () => { |
| | | importUpload.title = "导入销售台账"; |