军泰伟业
1.订单分批发货后,对应仓库出库数据有误
2.新增退货单并处理成功后,已退货数量、未退货数量显示有误
3.自制、外购、委外来源需拆分为合格来源、不合格来源
4.规格型号改为图纸编号
| | |
| | | }); |
| | | } |
| | | |
| | | // 根据ID获取发货信息 |
| | | export function getShippingInfoById(id) { |
| | | return request({ |
| | | url: "/shippingInfo/getById", |
| | | method: "get", |
| | | params: { id }, |
| | | }); |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | // 销售退货-根据出库单查询销售订单以及产品信息 |
| | | // /returnManagement/getByShippingId |
| | | export function returnManagementGetByShippingId(query) { |
| | | return request({ |
| | | url: "/returnManagement/getByShippingId", |
| | |
| | | <h4>产品明细</h4> |
| | | <el-table :data="currentQuotation.products || []" border style="width: 100%"> |
| | | <el-table-column prop="product" label="产品名称" /> |
| | | <el-table-column prop="specification" label="规格型号" /> |
| | | <el-table-column prop="specification" label="图纸编号" /> |
| | | <el-table-column prop="unit" label="单位" /> |
| | | <el-table-column prop="unitPrice" label="单价"> |
| | | <template #default="scope">¥{{ Number(scope.row.unitPrice ?? 0).toFixed(2) }}</template> |
| | |
| | | <h4>产品明细</h4> |
| | | <el-table :data="currentPurchase.productData || []" border style="width: 100%"> |
| | | <el-table-column prop="productCategory" label="产品名称" /> |
| | | <el-table-column prop="specificationModel" label="规格型号" /> |
| | | <el-table-column prop="specificationModel" label="图纸编号" /> |
| | | <el-table-column prop="unit" label="单位" /> |
| | | <el-table-column prop="quantity" label="数量" /> |
| | | <el-table-column prop="taxInclusiveUnitPrice" label="含税单价"> |
| | |
| | | width="60" |
| | | /> |
| | | <el-table-column label="产品大类" prop="productCategory" /> |
| | | <el-table-column label="规格型号" prop="specificationModel" /> |
| | | <el-table-column label="图纸编号" prop="specificationModel" /> |
| | | <el-table-column label="单位" prop="unit" /> |
| | | <el-table-column label="数量" prop="quantity" /> |
| | | <el-table-column label="税率(%)" prop="taxRate" /> |
| | |
| | | width: 200 |
| | | }, |
| | | { |
| | | label: "规格型号", |
| | | label: "图纸编号", |
| | | prop: "specificationModel", |
| | | width: 220 |
| | | }, |
| | |
| | | <el-table-column align="center" label="序号" type="index" width="60" /> |
| | | <el-table-column label="供应商名称" prop="supplierName" width="240" show-overflow-tooltip /> |
| | | <el-table-column label="产品" prop="productCategory" min-width="100" show-overflow-tooltip /> |
| | | <el-table-column label="规格型号" prop="specificationModel" min-width="200" show-overflow-tooltip /> |
| | | <el-table-column label="图纸编号" prop="specificationModel" min-width="200" show-overflow-tooltip /> |
| | | <el-table-column label="单位" prop="unit" width="70" show-overflow-tooltip /> |
| | | <el-table-column label="入库数量" prop="inboundNum" width="90" show-overflow-tooltip /> |
| | | <el-table-column label="库存数量" prop="inboundNum0" width="90" show-overflow-tooltip /> |
| | |
| | | show-overflow-tooltip |
| | | /> |
| | | <el-table-column |
| | | label="规格型号" |
| | | label="图纸编号" |
| | | prop="model" |
| | | show-overflow-tooltip |
| | | /> |
| | |
| | | |
| | | // 获取来源类型选项 |
| | | const fetchStockRecordTypeOptions = () => { |
| | | if (props.type === 1 || props.type === 2) { |
| | | findAllQualifiedStockOutRecordTypeOptions() |
| | | .then(res => { |
| | | stockRecordTypeOptions.value = res.data; |
| | | }) |
| | | } else { |
| | | Promise.all([ |
| | | findAllQualifiedStockOutRecordTypeOptions(), |
| | | findAllUnQualifiedStockOutRecordTypeOptions() |
| | | .then(res => { |
| | | stockRecordTypeOptions.value = res.data; |
| | | }) |
| | | } |
| | | ]) |
| | | .then(([qualifiedRes, unQualifiedRes]) => { |
| | | const qualifiedData = qualifiedRes.data || []; |
| | | const unQualifiedData = unQualifiedRes.data || []; |
| | | const allData = [...qualifiedData, ...unQualifiedData]; |
| | | const uniqueData = []; |
| | | const valueSet = new Set(); |
| | | allData.forEach(item => { |
| | | if (!valueSet.has(item.value)) { |
| | | valueSet.add(item.value); |
| | | uniqueData.push(item); |
| | | } |
| | | }); |
| | | stockRecordTypeOptions.value = uniqueData; |
| | | }) |
| | | .catch(() => { |
| | | stockRecordTypeOptions.value = []; |
| | | }); |
| | | } |
| | | |
| | | // 表格选择数据 |
| | |
| | | <thead> |
| | | <tr> |
| | | <th>产品名称</th> |
| | | <th>规格型号</th> |
| | | <th>图纸编号</th> |
| | | <th>单位</th> |
| | | <th>单价</th> |
| | | <th>零售数量</th> |
| | |
| | | <el-table-column label="入库批次" prop="inboundBatches" width="160" show-overflow-tooltip /> |
| | | <el-table-column label="供应商名称" prop="supplierName" width="240" show-overflow-tooltip /> |
| | | <el-table-column label="产品大类" prop="productCategory" width="100" show-overflow-tooltip /> |
| | | <el-table-column label="规格型号" prop="specificationModel" width="200" show-overflow-tooltip /> |
| | | <el-table-column label="图纸编号" prop="specificationModel" width="200" show-overflow-tooltip /> |
| | | <el-table-column label="单位" prop="unit" width="70" show-overflow-tooltip /> |
| | | <el-table-column label="入库数量" prop="inboundNum" width="90" show-overflow-tooltip /> |
| | | <el-table-column label="库存数量" prop="inboundNum0" width="90" show-overflow-tooltip /> |
| | |
| | | <el-table-column label="产品大类" |
| | | prop="productName" |
| | | show-overflow-tooltip/> |
| | | <el-table-column label="规格型号" |
| | | <el-table-column label="图纸编号" |
| | | prop="model" |
| | | show-overflow-tooltip/> |
| | | <el-table-column label="单位" |
| | |
| | | |
| | | // 获取来源类型选项 |
| | | const fetchStockRecordTypeOptions = () => { |
| | | if (props.type === 1 || props.type === 2) { |
| | | findAllQualifiedStockInRecordTypeOptions() |
| | | .then(res => { |
| | | stockRecordTypeOptions.value = res.data; |
| | | }) |
| | | } else { |
| | | Promise.all([ |
| | | findAllQualifiedStockInRecordTypeOptions(), |
| | | findAllUnQualifiedStockInRecordTypeOptions() |
| | | .then(res => { |
| | | stockRecordTypeOptions.value = res.data; |
| | | }) |
| | | } |
| | | ]) |
| | | .then(([qualifiedRes, unQualifiedRes]) => { |
| | | const qualifiedData = qualifiedRes.data || []; |
| | | const unQualifiedData = unQualifiedRes.data || []; |
| | | const allData = [...qualifiedData, ...unQualifiedData]; |
| | | const uniqueData = []; |
| | | const valueSet = new Set(); |
| | | allData.forEach(item => { |
| | | if (!valueSet.has(item.value)) { |
| | | valueSet.add(item.value); |
| | | uniqueData.push(item); |
| | | } |
| | | }); |
| | | stockRecordTypeOptions.value = uniqueData; |
| | | }) |
| | | .catch(() => { |
| | | stockRecordTypeOptions.value = []; |
| | | }); |
| | | } |
| | | |
| | | // 表格选择数据 |
| | |
| | | </el-form-item> |
| | | |
| | | <el-form-item |
| | | label="规格" |
| | | label="图纸编号" |
| | | prop="productModelName" |
| | | > |
| | | <el-input v-model="formState.productModelName" disabled /> |
| | |
| | | <el-table-column align="center" type="selection" width="55" /> |
| | | <el-table-column align="center" label="序号" type="index" width="60" /> |
| | | <el-table-column label="产品大类" prop="productName" show-overflow-tooltip /> |
| | | <el-table-column label="规格型号" prop="model" show-overflow-tooltip /> |
| | | <el-table-column label="图纸编号" prop="model" show-overflow-tooltip /> |
| | | <el-table-column label="单位" prop="unit" show-overflow-tooltip /> |
| | | <el-table-column label="库存数量" prop="qualitity" show-overflow-tooltip /> |
| | | <el-table-column label="质检状态" |
| | |
| | | <el-table-column align="center" type="selection" width="55" /> |
| | | <el-table-column align="center" label="序号" type="index" width="60" /> |
| | | <el-table-column label="产品大类" prop="productName" show-overflow-tooltip /> |
| | | <el-table-column label="规格型号" prop="model" show-overflow-tooltip /> |
| | | <el-table-column label="图纸编号" prop="model" show-overflow-tooltip /> |
| | | <el-table-column label="单位" prop="unit" show-overflow-tooltip /> |
| | | <el-table-column label="库存数量" prop="qualitity" show-overflow-tooltip /> |
| | | <el-table-column label="质检状态" |
| | |
| | | show-overflow-tooltip |
| | | /> |
| | | <el-table-column |
| | | label="规格型号" |
| | | label="图纸编号" |
| | | prop="model" |
| | | show-overflow-tooltip |
| | | /> |
| | |
| | | prop: "productCategory", |
| | | }, |
| | | { |
| | | label: "规格型号", |
| | | label: "图纸编号", |
| | | prop: "specificationModel", |
| | | }, |
| | | { |
| | |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="产品大类" prop="productCategory" /> |
| | | <el-table-column label="规格型号" prop="specificationModel" width="150" /> |
| | | <el-table-column label="图纸编号" prop="specificationModel" width="150" /> |
| | | <el-table-column label="单位" prop="unit" width="70" /> |
| | | <el-table-column label="数量" prop="quantity" width="70" /> |
| | | <el-table-column label="税率(%)" prop="taxRate" width="80" /> |
| | |
| | | width: 120, |
| | | }, |
| | | { |
| | | label: "规格型号", |
| | | label: "图纸编号", |
| | | prop: "specificationModel", |
| | | width: 120, |
| | | }, |
| | |
| | | width="100" |
| | | /> |
| | | <el-table-column |
| | | label="规格型号" |
| | | label="图纸编号" |
| | | prop="specificationModel" |
| | | show-overflow-tooltip |
| | | width="150" |
| | |
| | | showOverflowTooltip: true, |
| | | }, |
| | | { |
| | | label: "规格型号", |
| | | label: "图纸编号", |
| | | prop: "specificationModel", |
| | | showOverflowTooltip: true, |
| | | width: 150 |
| | |
| | | <el-table :data="tableData" border v-loading="loading" @selection-change="handleSelectionChange"> |
| | | <el-table-column type="selection" width="55" align="center" /> |
| | | <el-table-column label="商品名称" prop="productName" /> |
| | | <el-table-column label="规格型号" prop="specification" /> |
| | | <el-table-column label="图纸编号" prop="specification" /> |
| | | <el-table-column label="供应商名称" prop="supplierName" /> |
| | | <el-table-column label="原价格" prop="oldPrice" width="120"> |
| | | <template #default="{ row }">¥{{ row.oldPrice.toFixed(2) }}</template> |
| | |
| | | <el-option label="商品C" value="商品C" /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="规格型号"> |
| | | <el-form-item label="图纸编号"> |
| | | <el-input v-model="formData.specification" placeholder="请输入规格型号" /> |
| | | </el-form-item> |
| | | <el-form-item label="供应商名称"> |
| | |
| | | width: 150, |
| | | }, |
| | | { |
| | | label: "规格型号", |
| | | label: "图纸编号", |
| | | prop: "specificationModel", |
| | | width: 150, |
| | | }, |
| | |
| | | width="60" /> |
| | | <el-table-column label="产品大类" |
| | | prop="productCategory" /> |
| | | <el-table-column label="规格型号" |
| | | <el-table-column label="图纸编号" |
| | | prop="specificationModel" /> |
| | | <el-table-column label="单位" |
| | | prop="unit" /> |
| | |
| | | width="60" /> |
| | | <el-table-column label="产品大类" |
| | | prop="productCategory" /> |
| | | <el-table-column label="规格型号" |
| | | <el-table-column label="图纸编号" |
| | | prop="specificationModel" /> |
| | | <el-table-column label="单位" |
| | | prop="unit" |
| | |
| | | </el-row> |
| | | <el-row :gutter="30"> |
| | | <el-col :span="24"> |
| | | <el-form-item label="规格型号:" |
| | | <el-form-item label="图纸编号:" |
| | | prop="productModelId"> |
| | | <el-select v-model="productForm.productModelId" |
| | | placeholder="请选择" |
| | |
| | | prop: 'productCategory', |
| | | }, |
| | | { |
| | | label: '规格型号', |
| | | label: '图纸编号', |
| | | prop: 'specificationModel', |
| | | }, |
| | | { |
| | |
| | | width="60" |
| | | /> |
| | | <el-table-column label="产品大类" prop="productCategory" /> |
| | | <el-table-column label="规格型号" prop="specificationModel" /> |
| | | <el-table-column label="图纸编号" prop="specificationModel" /> |
| | | <el-table-column label="单位" prop="unit" width="70" /> |
| | | <el-table-column label="供应商" prop="supplierName" width="100" /> |
| | | <el-table-column label="采购数量" prop="quantity" width="100" /> |
| | |
| | | width: 150, |
| | | }, |
| | | { |
| | | label: "规格型号", |
| | | label: "图纸编号", |
| | | prop: "specificationModel", |
| | | width: 150, |
| | | }, |
| | |
| | | </el-table-column> |
| | | <el-table-column label="产品编码" prop="productCode" /> |
| | | <el-table-column label="产品名称" prop="productName" /> |
| | | <el-table-column label="规格型号" prop="model" /> |
| | | <el-table-column label="图纸编号" prop="model" /> |
| | | <el-table-column label="单位" prop="unit" /> |
| | | </el-table> |
| | | |
| | |
| | | <el-table-column label="客户名称" prop="customerName" width="200" /> |
| | | <!-- <el-table-column label="项目名称" prop="projectName" width="250" /> --> |
| | | <el-table-column label="产品大类" prop="productCategory" width="150" /> |
| | | <el-table-column label="规格型号" prop="specificationModel" width="200" /> |
| | | <el-table-column label="图纸编号" prop="specificationModel" width="200" /> |
| | | <el-table-column label="绑定机器" prop="speculativeTradingName" width="120" /> |
| | | <el-table-column label="总数量" prop="quantity" width="100" align="right" /> |
| | | <el-table-column label="已排产" prop="schedulingNum" width="100" align="right" fixed="right" /> |
| | |
| | | </el-row> --> |
| | | <el-row :gutter="30"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="规格型号:" prop="specificationModel"> |
| | | <el-form-item label="图纸编号:" prop="specificationModel"> |
| | | <el-input v-model="form.specificationModel" placeholder="请输入" clearable disabled/> |
| | | </el-form-item> |
| | | </el-col> |
| | |
| | | form: { |
| | | projectName: "", |
| | | productCategory: "", |
| | | specificationModel: "", // 规格型号 |
| | | specificationModel: "", // 图纸编号 |
| | | quantity: "", |
| | | schedulingNum: "", |
| | | schedulingUserId: "", |
| | |
| | | width: 160, |
| | | }, |
| | | { |
| | | label: "规格型号", |
| | | label: "图纸编号", |
| | | prop: "specificationModel", |
| | | width: 120, |
| | | }, |
| | |
| | | }, |
| | | { |
| | | label: "产品图纸编号", |
| | | prop: "productModelName" |
| | | prop: "productModelName", |
| | | width: 160, |
| | | }, |
| | | { |
| | |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="规格型号:" prop="productModelId"> |
| | | <el-form-item label="图纸编号:" prop="productModelId"> |
| | | <el-select v-model="form.productModelId" placeholder="请选择" clearable :disabled="operationType === 'edit'" |
| | | filterable readonly @change="handleChangeModel"> |
| | | <el-option v-for="item in modelOptions" :key="item.id" :label="item.model" :value="item.id" /> |
| | |
| | | prop: "productName", |
| | | }, |
| | | { |
| | | label: "规格型号", |
| | | label: "图纸编号", |
| | | prop: "model", |
| | | }, |
| | | { |
| | |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="规格型号:" prop="model"> |
| | | <el-form-item label="图纸编号:" prop="model"> |
| | | <el-select v-model="form.model" placeholder="请选择" clearable :disabled="operationType === 'edit'" |
| | | filterable readonly @change="handleChangeModel"> |
| | | <el-option v-for="item in modelOptions" :key="item.id" :label="item.model" :value="item.id" /> |
| | |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="规格型号:" prop="model"> |
| | | <el-form-item label="图纸编号:" prop="model"> |
| | | <el-input v-model="form.model" placeholder="请输入" clearable disabled/> |
| | | </el-form-item> |
| | | </el-col> |
| | |
| | | prop: "productName", |
| | | }, |
| | | { |
| | | label: "规格型号", |
| | | label: "图纸编号", |
| | | prop: "model", |
| | | }, |
| | | { |
| | |
| | | </el-row> |
| | | <el-row :gutter="30"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="规格型号:" prop="productModelId"> |
| | | <el-form-item label="图纸编号:" prop="productModelId"> |
| | | <el-select v-model="form.productModelId" placeholder="请选择" clearable :disabled="operationType === 'edit'" |
| | | filterable readonly @change="handleChangeModel"> |
| | | <el-option v-for="item in modelOptions" :key="item.id" :label="item.model" :value="item.id" /> |
| | |
| | | prop: "productName", |
| | | }, |
| | | { |
| | | label: "规格型号", |
| | | label: "图纸编号", |
| | | prop: "model", |
| | | }, |
| | | { |
| | |
| | | </el-row> |
| | | <el-row :gutter="30"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="规格型号:" prop="productModelId"> |
| | | <el-form-item label="图纸编号:" prop="productModelId"> |
| | | <el-select v-model="form.productModelId" placeholder="请选择" clearable :disabled="operationType === 'edit'" |
| | | filterable readonly @change="handleChangeModel"> |
| | | <el-option v-for="item in modelOptions" :key="item.id" :label="item.model" :value="item.id" /> |
| | |
| | | prop: "productName", |
| | | }, |
| | | { |
| | | label: "规格型号", |
| | | label: "图纸编号", |
| | | prop: "model", |
| | | }, |
| | | { |
| | |
| | | <el-table-column prop="product" |
| | | label="产品名称" /> |
| | | <el-table-column prop="specification" |
| | | label="规格型号" /> |
| | | label="图纸编号" /> |
| | | <el-table-column prop="unit" |
| | | label="单位" /> |
| | | <el-table-column prop="unitPrice" |
| | |
| | | <el-table-column prop="productCategory" |
| | | label="产品名称" /> |
| | | <el-table-column prop="specificationModel" |
| | | label="规格型号" /> |
| | | label="图纸编号" /> |
| | | <el-table-column prop="unit" |
| | | label="单位" /> |
| | | <el-table-column prop="quantity" |
| | |
| | | </div> |
| | | <div class="summary-item"> |
| | | <div class="summary-label">已退货数量</div> |
| | | <div class="summary-value returned">{{ currentShippingOrder.returnedQuantity || 0 }}</div> |
| | | <div class="summary-value returned">{{ currentShippingOrder.returnTotal || 0 }}</div> |
| | | </div> |
| | | <div class="summary-item"> |
| | | <div class="summary-label">待发货数量</div> |
| | |
| | | </div> |
| | | <div class="info-row"> |
| | | <span class="info-label">退货数量</span> |
| | | <span class="info-value returned">{{ record.returnNum || 0 }}</span> |
| | | <span class="info-value returned">{{ record.returnTotal || 0 }}</span> |
| | | </div> |
| | | <div class="info-row" v-if="record.type === '货车'"> |
| | | <span class="info-label">车牌号</span> |
| | |
| | | addShippingInfoDetail, |
| | | updateShippingInfoDetail, |
| | | delShippingInfoDetail, |
| | | getShippingInfoById, |
| | | } from "@/api/salesManagement/deliveryLedger.js"; |
| | | import { delLedgerFile } from "@/api/salesManagement/salesLedger.js"; |
| | | |
| | |
| | | addShippingInfoDetail(payload).then((res) => { |
| | | proxy.$modal.msgSuccess("发货成功"); |
| | | hideAddShippingForm(); |
| | | getShippingInfoById(currentShippingOrder.value.id).then((infoRes) => { |
| | | if (infoRes.code === 200) { |
| | | currentShippingOrder.value = infoRes.data; |
| | | } |
| | | }); |
| | | loadShippingRecords(currentShippingOrder.value.id); |
| | | getList(); |
| | | }); |
| | |
| | | <el-table-column label="销售合同号" prop="salesContractNo" show-overflow-tooltip width="180" /> |
| | | <el-table-column label="客户名称" prop="customerName" show-overflow-tooltip width="240" /> |
| | | <el-table-column label="产品大类" prop="productCategory" width="200" /> |
| | | <el-table-column label="规格型号" prop="specificationModel" width="160" show-overflow-tooltip /> |
| | | <el-table-column label="图纸编号" prop="specificationModel" width="160" show-overflow-tooltip /> |
| | | <el-table-column label="发票号" prop="invoiceNo" width="200" show-overflow-tooltip /> |
| | | <el-table-column label="发票金额(元)" prop="invoiceTotal" show-overflow-tooltip :formatter="formattedNumber" |
| | | width="200" /> |
| | |
| | | /> |
| | | <el-table-column label="产品大类" prop="productCategory" /> |
| | | <el-table-column |
| | | label="规格型号" |
| | | label="图纸编号" |
| | | prop="specificationModel" |
| | | width="150" |
| | | /> |
| | |
| | | </el-table-column> |
| | | <el-table-column label="产品大类" prop="productCategory" /> |
| | | <el-table-column |
| | | label="规格型号" |
| | | label="图纸编号" |
| | | prop="specificationModel" |
| | | width="150" |
| | | /> |
| | |
| | | width="100" |
| | | /> |
| | | <el-table-column |
| | | label="规格型号" |
| | | label="图纸编号" |
| | | prop="specificationModel" |
| | | show-overflow-tooltip |
| | | width="200" |
| | |
| | | width="100" |
| | | /> |
| | | <el-table-column |
| | | label="规格型号" |
| | | label="图纸编号" |
| | | prop="specificationModel" |
| | | show-overflow-tooltip |
| | | width="200" |
| | |
| | | |
| | | <div style="padding-top: 20px"> |
| | | <span class="descriptions">产品列表</span> |
| | | <PIMTable :isShowPagination="false" rowKey="id" :column="tableColumn" :tableData="tableData" /> |
| | | <PIMTable :isShowPagination="false" rowKey="id" :column="tableColumn" :tableData="tableData"> |
| | | <template #unQuantity="{ row }"> |
| | | {{ calcAlreadyReturned(row) }} |
| | | </template> |
| | | </PIMTable> |
| | | </div> |
| | | </div> |
| | | <template #footer> |
| | |
| | | const tableData = ref([]); |
| | | const availableProducts = ref([]); |
| | | |
| | | const calcAlreadyReturned = (row) => { |
| | | const total = Number(row?.shippingNum ?? row?.totalQuantity ?? 0); |
| | | const returned = Number(row?.returnQuantity ?? row?.num ?? 0); |
| | | if (!Number.isFinite(total) || !Number.isFinite(returned)) return 0; |
| | | return total - returned; |
| | | }; |
| | | |
| | | const tableColumn = [ |
| | | {align: "center", label: "产品大类", prop: "productCategory"}, |
| | | {align: "center", label: "规格型号", prop: "specificationModel"}, |
| | | {align: "center", label: "图纸编号", prop: "specificationModel"}, |
| | | {align: "center", label: "单位", prop: "unit", width: 80}, |
| | | {align: "center", label: "总数量", prop: "shippingNum", width: 120}, |
| | | {align: "center", label: "已退货数量", prop: "totalReturnNum", width: 120}, |
| | | {align: "center", label: "未退货数量", prop: "unQuantity", width: 120}, |
| | | {align: "center", label: "未退货数量", prop: "unQuantity", width: 120, dataType: "slot", slot: "unQuantity"}, |
| | | {align: "center", label: "退货数量", prop: "returnQuantity", width: 120}, |
| | | {align: "center", label: "退货产品单价", prop: "price", width: 120}, |
| | | {align: "center", label: "退货产品金额", prop: "amount", width: 120}, |
| | |
| | | isQuality: raw?.isQuality ?? 2, |
| | | remark: raw?.remark ?? "", |
| | | }; |
| | | return product ? { ...product, ...normalized } : normalized; |
| | | return product ? { ...product, ...normalized, returnQuantity: normalized.returnQuantity } : normalized; |
| | | }) : []; |
| | | } catch (e) { |
| | | console.error("Failed to load detail", e); |
| | |
| | | <el-button type="primary" @click="openProductSelection" :disabled="!form.shippingId">添加产品</el-button> |
| | | </div> |
| | | <PIMTable :isShowPagination="false" rowKey="id" :column="tableColumn" :tableData="tableData"> |
| | | <template #unQuantity="{ row }"> |
| | | {{ calcAlreadyReturned(row) }} |
| | | </template> |
| | | <template #returnQuantity="{ row }"> |
| | | <el-input |
| | | v-model="row.returnQuantity" |
| | |
| | | > |
| | | <el-table-column align="center" type="selection" width="55" /> |
| | | <el-table-column align="center" prop="productCategory" label="产品大类" /> |
| | | <el-table-column align="center" prop="specificationModel" label="规格型号" /> |
| | | <el-table-column align="center" prop="specificationModel" label="图纸编号" /> |
| | | <el-table-column align="center" prop="unit" label="单位" /> |
| | | <el-table-column align="center" prop="shippingNum" label="总数量" /> |
| | | <el-table-column align="center" prop="unQuantity" label="未退货数量" /> |
| | |
| | | const { form, rules } = toRefs(data); |
| | | |
| | | const calcAlreadyReturned = (row) => { |
| | | const total = Number(row?.shippingNum ?? row?.totalQuantity ?? row?.totalReturnNum ?? 0); |
| | | const un = Number(row?.unQuantity ?? 0); |
| | | if (!Number.isFinite(total) || !Number.isFinite(un)) return 0; |
| | | return Math.max(total - un, 0); |
| | | const total = Number(row?.shippingNum ?? row?.totalQuantity ?? 0); |
| | | const returned = Number(row?.returnQuantity ?? row?.num ?? 0); |
| | | if (!Number.isFinite(total) || !Number.isFinite(returned)) return 0; |
| | | return total - returned; |
| | | }; |
| | | |
| | | const tableColumn = ref([ |
| | | {align: "center", label: "产品大类", prop: "productCategory" }, |
| | | {align: "center", label: "规格型号", prop: "specificationModel" }, |
| | | {align: "center", label: "图纸编号", prop: "specificationModel" }, |
| | | {align: "center", label: "单位", prop: "unit", width: 80 }, |
| | | {align: "center", label: "总数量", prop: "shippingNum", width: 120 }, |
| | | {align: "center", label: "已退货数量", prop: "totalReturnNum", width: 120 }, |
| | | {align: "center", label: "未退货数量", prop: "unQuantity", width: 120 }, |
| | | {align: "center", label: "未退货数量", prop: "unQuantity", width: 120, dataType: "slot", slot: "unQuantity"}, |
| | | {align: "center", label: "退货数量", prop: "returnQuantity", dataType: "slot", slot: "returnQuantity", width: 120 }, |
| | | {align: "center", label: "退货产品单价", prop: "price", dataType: "slot", slot: "price", width: 120 }, |
| | | {align: "center", label: "退货产品金额", prop: "amount", dataType: "slot", slot: "amount", width: 120 }, |
| | |
| | | specificationModel: product.specificationModel, |
| | | unit: product.unit, |
| | | shippingNum: product.shippingNum, |
| | | totalReturnNum: product.totalReturnNum, |
| | | unQuantity: product.unQuantity |
| | | }); |
| | | } |
| | |
| | | <el-table :data="props.row.children" border show-summary :summary-method="summarizeChildrenTable"> |
| | | <el-table-column align="center" label="序号" type="index"/> |
| | | <el-table-column label="产品大类" prop="productCategory" /> |
| | | <el-table-column label="规格型号" prop="specificationModel" /> |
| | | <el-table-column label="图纸编号" prop="specificationModel" /> |
| | | <el-table-column label="单位" prop="unit" /> |
| | | <el-table-column label="产品状态" |
| | | width="100px" |
| | |
| | | :selectable="(row) => !isProductShipped(row)" /> |
| | | <el-table-column align="center" label="序号" type="index" width="60" /> |
| | | <el-table-column label="产品大类" prop="productCategory" /> |
| | | <el-table-column label="规格型号" prop="specificationModel" /> |
| | | <el-table-column label="图纸编号" prop="specificationModel" /> |
| | | <el-table-column label="单位" prop="unit" /> |
| | | <el-table-column label="数量" prop="quantity" /> |
| | | <el-table-column label="税率(%)" prop="taxRate" /> |
| | |
| | | </el-row> |
| | | <el-row :gutter="30"> |
| | | <el-col :span="24"> |
| | | <el-form-item label="规格型号:" prop="productModelId"> |
| | | <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> |
| | |
| | | <thead> |
| | | <tr> |
| | | <th>产品名称</th> |
| | | <th>规格型号</th> |
| | | <th>图纸编号</th> |
| | | <th>单位</th> |
| | | <th>单价</th> |
| | | <th>零售数量</th> |
| | |
| | | <thead> |
| | | <tr> |
| | | <th>产品名称</th> |
| | | <th>规格型号</th> |
| | | <th>图纸编号</th> |
| | | <th>单位</th> |
| | | <th>单价</th> |
| | | <th>零售数量</th> |
| | |
| | | </el-form-item> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="specification" label="规格型号" width="200"> |
| | | <el-table-column prop="specification" label="图纸编号" width="200"> |
| | | <template #default="scope"> |
| | | <el-form-item :prop="`products.${scope.$index}.specificationId`" class="product-table-form-item"> |
| | | <el-select |
| | |
| | | <h4>产品明细</h4> |
| | | <el-table :data="currentQuotation.products" border style="width: 100%"> |
| | | <el-table-column prop="product" label="产品名称" /> |
| | | <el-table-column prop="specification" label="规格型号" /> |
| | | <el-table-column prop="specification" label="图纸编号" /> |
| | | <el-table-column prop="unit" label="单位" /> |
| | | <el-table-column prop="unitPrice" label="单价"> |
| | | <template #default="scope"> |
| | |
| | | </el-table-column> |
| | | <el-table-column prop="customerName" label="客户名称" width="180"/> |
| | | <el-table-column prop="productName" label="产品名称" width="200"/> |
| | | <el-table-column prop="specification" label="规格型号" width="120"/> |
| | | <el-table-column prop="specification" label="图纸编号" width="120"/> |
| | | <el-table-column prop="basePrice" label="基础价格" width="100"> |
| | | <template #default="scope"> |
| | | ¥{{ scope.row.basePrice }}/吨 |
| | |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="规格型号" prop="specification"> |
| | | <el-input v-model="priceStrategyForm.specification" placeholder="请输入规格型号" :disabled="priceStrategyDialogMode === 'view'" /> |
| | | <el-form-item label="图纸编号" prop="specification"> |
| | | <el-input v-model="priceStrategyForm.specification" placeholder="请输入图纸编号" :disabled="priceStrategyDialogMode === 'view'" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |