| | |
| | | <el-select v-model="form.customerId" placeholder="请选择" clearable :disabled="operationType === 'view'" filterable> |
| | | <el-option v-for="item in customerOption" :key="item.id" :label="item.customerName" :value="item.id"> |
| | | {{ |
| | | item.customerName + "——" + item.taxpayerIdentificationNumber |
| | | item.customerName+'-'+item.type |
| | | }} |
| | | </el-option> |
| | | </el-select> |
| | |
| | | <el-col :span="12"> |
| | | <el-form-item label="是否开票" prop="isInvoice"> |
| | | <el-select v-model="form.isInvoice" placeholder="请选择" clearable> |
| | | <el-option label="是" value="1" /> |
| | | <el-option label="否" value="2" /> |
| | | <el-option label="是" :value="1" /> |
| | | <el-option label="否" :value="2" /> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | |
| | | <div v-for="(item, index) in printData" :key="index" class="print-page"> |
| | | <div class="delivery-note"> |
| | | <div class="header"> |
| | | <div class="company-name">鼎诚瑞实业有限责任公司</div> |
| | | <div class="company-name">青海湟水峡农业发展有限公司</div> |
| | | <div class="document-title">零售发货单</div> |
| | | </div> |
| | | |
| | |
| | | delProduct, |
| | | delLedgerFile, |
| | | } from "@/api/salesManagement/salesLedger.js"; |
| | | import { getQuotationDetail } from "@/api/salesManagement/salesQuotation.js"; |
| | | import { modelList, productTreeList } from "@/api/basicData/product.js"; |
| | | import useFormData from "@/hooks/useFormData.js"; |
| | | import dayjs from "dayjs"; |
| | |
| | | if (index !== -1) { |
| | | productForm.value.specificationModel = modelOptions.value[index].model; |
| | | productForm.value.unit = modelOptions.value[index].unit; |
| | | fetchQuotationPrice(); |
| | | } else { |
| | | productForm.value.specificationModel = null; |
| | | productForm.value.unit = null; |
| | |
| | | } |
| | | } |
| | | return null; // 没有找到节点,返回null |
| | | }; |
| | | // 根据报价接口回填单价 |
| | | const fetchQuotationPrice = async () => { |
| | | // 需要客户类型、产品名称、规格 |
| | | const customer = customerOption.value.find((c) => c.id === form.value.customerId); |
| | | const customerType = customer?.customerType || customer?.type; |
| | | const productName = productForm.value.productCategory; |
| | | const specification = productForm.value.specificationModel; |
| | | |
| | | try { |
| | | const { data } = await getQuotationDetail({ |
| | | type: customerType, |
| | | productName, |
| | | specification, |
| | | }); |
| | | const price = data; |
| | | if (price !== null && price !== undefined) { |
| | | productForm.value.taxInclusiveUnitPrice = Number(price); |
| | | mathNum(); // 重新计算总价 |
| | | } |
| | | } catch (error) { |
| | | console.error("获取报价单价失败", error); |
| | | } |
| | | }; |
| | | function convertIdToValue(data) { |
| | | return data.map((item) => { |
| | |
| | | <div class="print-page"> |
| | | <div class="delivery-note"> |
| | | <div class="header"> |
| | | <div class="company-name">鼎诚瑞实业有限责任公司</div> |
| | | <div class="company-name">青海湟水峡农业发展有限公司</div> |
| | | <div class="document-title">零售发货单</div> |
| | | </div> |
| | | |