| | |
| | | :page="page.current" :limit="page.size" @pagination="paginationChange" /> |
| | | </div> |
| | | <el-dialog v-model="dialogFormVisible" :title="operationType === 'add' ? '新增销售台账页面' : '编辑销售台账页面'" width="70%" |
| | | draggable |
| | | @close="closeDia"> |
| | | <el-form :model="form" label-width="140px" label-position="top" :rules="rules" ref="formRef"> |
| | | <el-row :gutter="30"> |
| | |
| | | </template> |
| | | </el-dialog> |
| | | <el-dialog v-model="productFormVisible" :title="productOperationType === 'add' ? '新增产品' : '编辑产品'" width="40%" |
| | | draggable |
| | | @close="closeProductDia"> |
| | | <el-form :model="productForm" label-width="140px" label-position="top" :rules="productRules" ref="productFormRef"> |
| | | <el-row :gutter="30"> |
| | |
| | | </el-dialog> |
| | | <!-- 打印预览弹窗 --> |
| | | <el-dialog |
| | | draggable |
| | | v-model="printPreviewVisible" |
| | | title="打印预览" |
| | | width="90%" |
| | |
| | | </el-dialog> |
| | | <!-- 发货弹框 --> |
| | | <el-dialog |
| | | draggable |
| | | v-model="deliveryFormVisible" |
| | | title="发货信息" |
| | | width="40%" |
| | |
| | | if (type === "add") { |
| | | // 新增时设置录入日期为当天 |
| | | form.value.entryDate = getCurrentDate(); |
| | | // 业务员默认为许红峰(从下拉框选项中查找) |
| | | const xuHongFeng = userList.value.find(item => item.nickName === "许红峰"); |
| | | if (xuHongFeng) { |
| | | form.value.salesman = xuHongFeng.nickName; |
| | | } |
| | | // 签订日期默认为当天 |
| | | form.value.executionDate = getCurrentDate(); |
| | | } else { |
| | | currentId.value = row.id; |
| | | getSalesLedgerWithProducts({ id: row.id, type: 1 }).then((res) => { |
| | |
| | | if (type === "edit") { |
| | | productForm.value = { ...row }; |
| | | productIndex.value = index; |
| | | } else { |
| | | // 新增时设置默认值 |
| | | productForm.value.taxRate = "13"; // 税率默认为13% |
| | | productForm.value.invoiceType = "增专票"; // 发票类型默认为增专票 |
| | | } |
| | | productFormVisible.value = true; |
| | | getProductOptions(); |