| | |
| | | <div class="app-container"> |
| | | <div class="search_form"> |
| | | <el-form :model="searchForm" :inline="true"> |
| | | <el-form-item label="总合同号:"> |
| | | <el-input |
| | | v-model="searchForm.masterContractNo" |
| | | placeholder="请输入" |
| | | clearable |
| | | prefix-icon="Search" |
| | | @change="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="客户名称:"> |
| | | <el-input |
| | | v-model="searchForm.customerName" |
| | |
| | | >导入 |
| | | </el-button> |
| | | <el-button @click="handleOut">导出</el-button> |
| | | <el-button type="danger" plain @click="handleDelete">删除 </el-button> |
| | | <el-button type="danger" plain @click="handleDelete" v-hasPermi="['salesManagement:salesLedger:remove']">删除 </el-button> |
| | | <el-button type="primary" plain @click="handlePrint">打印 </el-button> |
| | | </div> |
| | | </div> |
| | |
| | | </el-table-column> |
| | | <el-table-column align="center" label="序号" type="index" width="60" /> |
| | | <el-table-column |
| | | label="销售总合同号" |
| | | prop="masterContractNo" |
| | | width="150" |
| | | show-overflow-tooltip |
| | | /> |
| | | <el-table-column |
| | | label="销售合同号" |
| | | prop="salesContractNo" |
| | | width="180" |
| | | show-overflow-tooltip |
| | | /> |
| | | <el-table-column |
| | | label="采购合同号" |
| | | prop="purchaseMasterContractNo" |
| | | width="150" |
| | | show-overflow-tooltip |
| | | /> |
| | | <el-table-column |
| | |
| | | width="200" |
| | | show-overflow-tooltip |
| | | /> |
| | | <el-table-column |
| | | label="退货状态" |
| | | prop="returnStatus" |
| | | align="center" |
| | | width="100" |
| | | > |
| | | <template #default="scope"> |
| | | <el-tag |
| | | :type="getReturnStatusType(scope.row.returnStatus)" |
| | | size="small" |
| | | > |
| | | {{ scope.row.returnStatus || '无退货' }} |
| | | </el-tag> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column fixed="right" label="操作" width="220" align="center"> |
| | | <template #default="scope"> |
| | | <el-button |
| | | link |
| | | type="primary" |
| | | @click="openForm('edit', scope.row)" |
| | | >编辑 |
| | | </el-button> |
| | | <el-button link type="primary" @click="openForm('view', scope.row)" |
| | | >详情 |
| | | </el-button> |
| | | <el-button |
| | | link |
| | | type="primary" |
| | | @click="openForm('edit', scope.row)" |
| | | :disabled=" |
| | | !scope.row.isEdit || |
| | | scope.row.hasProductionRecord || |
| | | !canEditLedger(scope.row) |
| | | " |
| | | >编辑 |
| | | </el-button> |
| | | <el-button link type="primary" @click="openFileDialog(scope.row)" |
| | | >附件 |
| | |
| | | <el-button type="primary" plain @click="openQuotationDialog"> |
| | | 从销售报价导入 |
| | | </el-button> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="30"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="总合同号:"> |
| | | <el-input |
| | | v-model="form.masterContractNo" |
| | | placeholder="请输入" |
| | | clearable |
| | | :disabled="operationType === 'view'" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="30"> |
| | |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="付款方式"> |
| | | <el-input |
| | | <el-select |
| | | v-model="form.paymentMethod" |
| | | placeholder="请输入" |
| | | placeholder="请选择" |
| | | clearable |
| | | :disabled="operationType === 'view'" |
| | | /> |
| | | style="width: 100%" |
| | | > |
| | | <el-option label="现金" value="现金" /> |
| | | <el-option label="电汇" value="电汇" /> |
| | | <el-option label="微信" value="微信" /> |
| | | <el-option label="支付宝" value="支付宝" /> |
| | | <el-option label="支票" value="支票" /> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | v-if="operationType !== 'view'" |
| | | plain |
| | | type="danger" |
| | | @click="deleteProduct" |
| | | >删除 |
| | | @click="deleteProduct">删除 |
| | | </el-button> |
| | | </el-form-item> |
| | | </el-row> |
| | |
| | | <el-table-column |
| | | label="含税单价(元)" |
| | | prop="taxInclusiveUnitPrice" |
| | | :formatter="formattedNumber" |
| | | :formatter="sensitiveAmountFormatter" |
| | | /> |
| | | <el-table-column |
| | | label="含税总价(元)" |
| | | prop="taxInclusiveTotalPrice" |
| | | :formatter="formattedNumber" |
| | | :formatter="sensitiveAmountFormatter" |
| | | /> |
| | | <el-table-column |
| | | label="不含税总价(元)" |
| | | prop="taxExclusiveTotalPrice" |
| | | :formatter="formattedNumber" |
| | | :formatter="sensitiveAmountFormatter" |
| | | /> |
| | | <!-- 是否生产列已隐藏,默认值为 false --> |
| | | <!-- <el-table-column label="是否生产" prop="isProduction" width="150"> |
| | |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="24" v-if="deliveryForm.type === '货车'"> |
| | | <el-form-item label="出库批号:" prop="outboundBatches"> |
| | | <el-input |
| | | v-model="deliveryForm.outboundBatches" |
| | | placeholder="请输入出库批号" |
| | | clearable |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="24" v-else> |
| | | <el-form-item label="快递公司:" prop="expressCompany"> |
| | | <el-input |
| | |
| | | searchForm: { |
| | | customerName: "", // 客户名称 |
| | | salesContractNo: "", // 销售合同编号 |
| | | masterContractNo: "", // 总合同号 |
| | | entryDate: null, // 录入日期 |
| | | entryDateStart: undefined, |
| | | entryDateEnd: undefined, |
| | |
| | | executionDate: "", |
| | | hasProductionRecord: false, |
| | | createTime: "", |
| | | masterContractNo: "", |
| | | purchaseContractNumber: "", |
| | | }, |
| | | rules: { |
| | |
| | | expressCompany: "", |
| | | expressNumber: "", |
| | | type: "货车", // 货车, 快递 |
| | | outboundBatches: "", |
| | | }, |
| | | deliveryRules: { |
| | | shippingCarNumber: [ |
| | |
| | | }; |
| | | // 打开弹框 |
| | | const openForm = async (type, row) => { |
| | | if (type === "edit" && row && !canEditLedger(row)) { |
| | | proxy.$modal.msgWarning("当前系统登录人不是维护人,不能编辑数据"); |
| | | return; |
| | | } |
| | | operationType.value = type; |
| | | form.value = {}; |
| | | productData.value = []; |
| | |
| | | type: "货车", |
| | | batchNo: [], |
| | | batchNoList, |
| | | outboundBatches: "", |
| | | }; |
| | | deliveryFileList.value = []; |
| | | deliveryFormVisible.value = true; |
| | |
| | | shippingCarNumber: |
| | | deliveryForm.value.type === "货车" |
| | | ? deliveryForm.value.shippingCarNumber |
| | | : "", |
| | | outboundBatches: |
| | | deliveryForm.value.type === "货车" |
| | | ? deliveryForm.value.outboundBatches |
| | | : "", |
| | | expressCompany: |
| | | deliveryForm.value.type === "快递" |
| | |
| | | let res = await userStore.getInfo(); |
| | | currentFactoryName.value = res.user.currentFactoryName; |
| | | }; |
| | | |
| | | // 获取退货状态标签类型 |
| | | const getReturnStatusType = (returnStatus) => { |
| | | const statusMap = { |
| | | '无退货': 'success', |
| | | '部分退货': 'warning', |
| | | '全部退货': 'danger', |
| | | }; |
| | | return statusMap[returnStatus] || 'info'; |
| | | }; |
| | | |
| | | onMounted(() => { |
| | | searchForm.salesContractNo = route.query.salesContractNo; |
| | | getList(); |