| | |
| | | </div> |
| | | </div> |
| | | <el-table :data="tableData" border v-loading="tableLoading" @selection-change="handleSelectionChange" |
| | | :expand-row-keys="expandedRowKeys" :row-key="(row) => row.id" :row-class-name="tableRowClassName" show-summary style="width: 100%" |
| | | :expand-row-keys="expandedRowKeys" :row-key="(row) => row.id" :row-class-name="tableRowClassName" |
| | | show-summary style="width: 100%" |
| | | :summary-method="summarizeMainTable" @expand-change="expandChange" height="calc(100vh - 18.5em)"> |
| | | <el-table-column align="center" type="selection" width="55" fixed="left"/> |
| | | <el-table-column type="expand" width="60" fixed="left"> |
| | |
| | | <el-table-column label="规格型号" prop="specificationModel" /> |
| | | <el-table-column label="批号" prop="batchNo" /> |
| | | <el-table-column label="UID码" prop="uidNo" /> |
| | | <el-table-column label="已发货数量" prop="shippedQty" width="100px"/> |
| | | <el-table-column label="单位" prop="unit" /> |
| | | <el-table-column label="产品状态" |
| | | width="100px" |
| | | align="center"> |
| | | <template #default="scope"> |
| | | <el-tag v-if="scope.row.approveStatus === 1" |
| | | type="success">充足</el-tag> |
| | | type="success">充足 |
| | | </el-tag> |
| | | <el-tag v-else |
| | | type="danger">不足</el-tag> |
| | | type="danger">不足 |
| | | </el-tag> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="发货状态" width="140" align="center"> |
| | |
| | | <div> |
| | | <div v-if="scope.row.shippingDate">{{ scope.row.shippingDate }}</div> |
| | | <el-tag v-else |
| | | type="info">-</el-tag> |
| | | type="info">- |
| | | </el-tag> |
| | | </div> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | <el-table-column label="备注" prop="remarks" width="200" show-overflow-tooltip /> |
| | | <el-table-column fixed="right" label="操作" min-width="100" align="center"> |
| | | <template #default="scope"> |
| | | <el-button link type="primary" size="small" @click="openForm('edit', scope.row)" :disabled="!scope.row.isEdit">编辑</el-button> |
| | | <el-button link type="primary" size="small" @click="openForm('edit', scope.row)" |
| | | :disabled="!scope.row.isEdit">编辑 |
| | | </el-button> |
| | | <!-- <el-button link type="primary" size="small" @click="openForm('view', scope.row)">详情</el-button>--> |
| | | <el-button link type="primary" size="small" @click="downLoadFile(scope.row)">附件</el-button> |
| | | <el-button link type="primary" size="small" @click="exportSaleOutbound(scope.row)">打印销售出库单</el-button> |
| | | <el-button link type="primary" size="small" @click="exportSaleOutbound(scope.row)">打印销售出库单 |
| | | </el-button> |
| | | <!-- <el-button link type="primary" size="small" @click="openDeliveryForm(scope.row)">发货</el-button>--> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | <pagination v-show="total > 0" :total="total" layout="total, sizes, prev, pager, next, jumper" |
| | | :page="page.current" :limit="page.size" @pagination="paginationChange" /> |
| | | </div> |
| | | <FormDialog v-model="dialogFormVisible" :title="operationType === 'add' ? '新增销售台账页面' : '编辑销售台账页面'" :width="'70%'" |
| | | <FormDialog v-model="dialogFormVisible" :title="operationType === 'add' ? '新增销售台账页面' : '编辑销售台账页面'" |
| | | :width="'70%'" |
| | | :operation-type="operationType" @close="closeDia" @confirm="submitForm" @cancel="closeDia"> |
| | | <el-form :model="form" label-width="140px" label-position="top" :rules="rules" ref="formRef"> |
| | | <!-- 报价单导入入口:放在表单顶部,选择后反显客户/业务员等 --> |
| | |
| | | <el-col :span="12"> |
| | | <el-form-item label="签订日期:" prop="executionDate"> |
| | | <el-date-picker style="width: 100%" v-model="form.executionDate" value-format="YYYY-MM-DD" |
| | | format="YYYY-MM-DD" type="date" placeholder="请选择" clearable :disabled="operationType === 'view'" /> |
| | | format="YYYY-MM-DD" type="date" placeholder="请选择" clearable |
| | | :disabled="operationType === 'view'"/> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | <el-row :gutter="30"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="交货日期:" prop="entryDate"> |
| | | <el-date-picker style="width: 100%" v-model="form.deliveryDate" value-format="YYYY-MM-DD" format="YYYY-MM-DD" |
| | | <el-date-picker style="width: 100%" v-model="form.deliveryDate" value-format="YYYY-MM-DD" |
| | | format="YYYY-MM-DD" |
| | | type="date" placeholder="请选择" clearable /> |
| | | </el-form-item> |
| | | </el-col> |
| | |
| | | <template #default="scope"> |
| | | <el-button link type="primary" size="small" |
| | | :disabled="isProductShipped(scope.row)" |
| | | @click="openProductForm('edit', scope.row,scope.$index)">编辑</el-button> |
| | | @click="openProductForm('edit', scope.row,scope.$index)">编辑 |
| | | </el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <el-row :gutter="30"> |
| | | <el-col :span="24"> |
| | | <el-form-item label="备注:" prop="remarks"> |
| | | <el-input v-model="form.remarks" placeholder="请输入" clearable type="textarea" :rows="2" :disabled="operationType === 'view'" /> |
| | | <el-input v-model="form.remarks" placeholder="请输入" clearable type="textarea" :rows="2" |
| | | :disabled="operationType === 'view'"/> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | <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" style="width: 100%" /> |
| | | @change="getModels" :data="productOptions" :render-after-expand="false" |
| | | style="width: 100%"/> |
| | | </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-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> |
| | |
| | | <el-row :gutter="30"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="含税总价(元):" prop="taxInclusiveTotalPrice"> |
| | | <el-input v-model="productForm.taxInclusiveTotalPrice" placeholder="请输入" clearable @change="calculateFromTotalPrice" /> |
| | | <el-input v-model="productForm.taxInclusiveTotalPrice" placeholder="请输入" clearable |
| | | @change="calculateFromTotalPrice"/> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="不含税总价(元):" prop="taxExclusiveTotalPrice"> |
| | | <el-input v-model="productForm.taxExclusiveTotalPrice" placeholder="请输入" clearable @change="calculateFromExclusiveTotalPrice" /> |
| | | <el-input v-model="productForm.taxExclusiveTotalPrice" placeholder="请输入" clearable |
| | | @change="calculateFromExclusiveTotalPrice"/> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | <div v-if="printData.length === 0" style="text-align: center; padding: 50px; color: #999;"> |
| | | 暂无打印数据 |
| | | </div> |
| | | <div v-else style="text-align: center; padding: 10px; color: #666; font-size: 14px; background: #e8f4fd; margin-bottom: 10px;"> |
| | | <div v-else |
| | | style="text-align: center; padding: 10px; color: #666; font-size: 14px; background: #e8f4fd; margin-bottom: 10px;"> |
| | | 共 {{ printData.length }} 条数据待打印 |
| | | </div> |
| | | <div v-for="(item, index) in printData" :key="index" class="print-page"> |
| | |
| | | width="40%" |
| | | @close="closeDeliveryDia" |
| | | > |
| | | <el-form :model="deliveryForm" label-width="120px" label-position="top" :rules="deliveryRules" ref="deliveryFormRef"> |
| | | <el-form :model="deliveryForm" label-width="120px" label-position="top" :rules="deliveryRules" |
| | | ref="deliveryFormRef"> |
| | | <el-row :gutter="30"> |
| | | <el-col :span="24"> |
| | | <el-form-item label="发货类型:" prop="type"> |
| | |
| | | <el-option label="货车" value="货车" /> |
| | | <el-option label="快递" value="快递" /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="发货数量:" prop="shippedQty"> |
| | | <el-input-number v-model="deliveryForm.shippedQty" :min="0" |
| | | :max="deliveryForm.quantity-deliveryForm.qty" style="width: 100%"/> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | const deliveryFormData = reactive({ |
| | | deliveryForm: { |
| | | type: "货车", // 货车, 快递 |
| | | shippedQty: undefined, |
| | | quantity: undefined, |
| | | qty: undefined, |
| | | }, |
| | | deliveryRules: { |
| | | type: [ |
| | |
| | | productForm.value.customer = ""; |
| | | } |
| | | }; |
| | | |
| | | // 根据名称反查产品大类 id,便于仅存名称时的反显 |
| | | function findNodeIdByLabel(nodes, label) { |
| | | if (!label) return null; |
| | |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | // 表格选择数据 |
| | | const handleSelectionChange = (selection) => { |
| | | // 过滤掉子数据 |
| | |
| | | |
| | | quotationDialogVisible.value = false; |
| | | }; |
| | | |
| | | function changs(val) { |
| | | console.log(val); |
| | | } |
| | | |
| | | // 上传前校检 |
| | | function handleBeforeUpload(file) { |
| | | // 校检文件大小 |
| | |
| | | proxy.$modal.loading("正在上传文件,请稍候..."); |
| | | return true; |
| | | } |
| | | |
| | | // 上传失败 |
| | | function handleUploadError(err) { |
| | | proxy.$modal.msgError("上传文件失败"); |
| | | proxy.$modal.closeLoading(); |
| | | } |
| | | |
| | | // 上传成功回调 |
| | | function handleUploadSuccess(res, file, uploadFiles) { |
| | | proxy.$modal.closeLoading(); |
| | |
| | | proxy.$refs.fileUpload.handleRemove(file); |
| | | } |
| | | } |
| | | |
| | | // 移除文件 |
| | | function handleRemove(file) { |
| | | if (operationType.value === "edit") { |
| | |
| | | }); |
| | | } |
| | | } |
| | | |
| | | // 提交表单 |
| | | const submitForm = () => { |
| | | proxy.$refs["formRef"].validate((valid) => { |
| | |
| | | if (row.approveStatus !== 1) { |
| | | return false; |
| | | } |
| | | return row.quantity > row.shippedQty |
| | | |
| | | // 获取发货状态 |
| | | const shippingStatus = row.shippingStatus; |
| | | |
| | | // 如果已发货(有发货日期或车牌号),不能再次发货 |
| | | if (row.shippingDate || row.shippingCarNumber) { |
| | | return false; |
| | | } |
| | | |
| | | // 发货状态必须是"待发货"或"审核拒绝" |
| | | const statusStr = shippingStatus ? String(shippingStatus).trim() : ''; |
| | | return statusStr === '待发货' || statusStr === '审核拒绝'; |
| | | // // 获取发货状态 |
| | | // const shippingStatus = row.shippingStatus; |
| | | // |
| | | // // 如果已发货(有发货日期或车牌号),不能再次发货 |
| | | // if (row.shippingDate || row.shippingCarNumber) { |
| | | // return false; |
| | | // } |
| | | // |
| | | // // 发货状态必须是"待发货"或"审核拒绝" |
| | | // const statusStr = shippingStatus ? String(shippingStatus).trim() : ''; |
| | | // return statusStr === '待发货' || statusStr === '审核拒绝'; |
| | | }; |
| | | |
| | | /** |
| | |
| | | currentDeliveryRow.value = row; |
| | | deliveryForm.value = { |
| | | type: "货车", |
| | | quantity: row.quantity, |
| | | qty: row.shippedQty |
| | | }; |
| | | // 重置审批人节点(默认一个空节点) |
| | | approverNodes.value = [{ id: 1, userId: null }]; |
| | | nextApproverId = 2; |
| | | // approverNodes.value = [{ id: 1, userId: null }]; |
| | | // nextApproverId = 2; |
| | | deliveryFormVisible.value = true; |
| | | }; |
| | | |
| | |
| | | addShippingInfo({ |
| | | salesLedgerId: salesLedgerId, |
| | | salesLedgerProductId: currentDeliveryRow.value.id, |
| | | shippedQty: deliveryForm.value.shippedQty, |
| | | type: deliveryForm.value.type, |
| | | }) |
| | | .then(() => { |
| | |
| | | justify-content: space-between; |
| | | margin-bottom: 10px; |
| | | } |
| | | |
| | | .print-preview-dialog { |
| | | .el-dialog__body { |
| | | padding: 0; |