| | |
| | | <el-button type="primary" @click="handleQuery" style="margin-left: 10px">搜索</el-button> |
| | | </div> |
| | | <div> |
| | | <el-button type="primary" @click="openForm('add')">新增</el-button> |
| | | <el-button type="primary" @click="openForm('add')">新增入库</el-button> |
| | | <el-button @click="handleOut">导出</el-button> |
| | | <el-button type="danger" plain @click="handleDelete">删除</el-button> |
| | | </div> |
| | |
| | | :summary-method="summarizeMainTable" height="calc(100vh - 18.5em)"> |
| | | <el-table-column align="center" type="selection" width="55" /> |
| | | <el-table-column align="center" label="序号" type="index" width="60" /> |
| | | <el-table-column label="入库时间" prop="salesContractNo" width="180" show-overflow-tooltip /> |
| | | <el-table-column label="入库批次" prop="customerContractNo" width="180" show-overflow-tooltip /> |
| | | <el-table-column label="供应商名称" prop="customerName" width="300" show-overflow-tooltip /> |
| | | <el-table-column label="入库时间" prop="salesContractNo" width="100" show-overflow-tooltip /> |
| | | <el-table-column label="入库批次" prop="customerContractNo" width="160" show-overflow-tooltip /> |
| | | <el-table-column label="供应商名称" prop="customerName" width="160" show-overflow-tooltip /> |
| | | <el-table-column label="产品大类" prop="salesman" width="100" show-overflow-tooltip /> |
| | | <el-table-column label="规格型号" prop="projectName" width="180" show-overflow-tooltip /> |
| | | <el-table-column label="单位" prop="contractAmount" width="180" show-overflow-tooltip /> |
| | | <el-table-column label="入库数量" prop="entryPersonName" width="100" show-overflow-tooltip /> |
| | | <el-table-column label="含税单价" prop="entryDate" width="120" show-overflow-tooltip /> |
| | | <el-table-column label="含税总价" prop="executionDate" width="120" show-overflow-tooltip /> |
| | | <el-table-column label="税率" prop="executionDate" width="120" show-overflow-tooltip /> |
| | | <el-table-column label="不含税总价" prop="executionDate" width="120" show-overflow-tooltip /> |
| | | <el-table-column label="入库人" prop="executionDate" width="120" show-overflow-tooltip /> |
| | | <el-table-column label="规格型号" prop="projectName" width="160" show-overflow-tooltip /> |
| | | <el-table-column label="单位" prop="contractAmount" width="70" show-overflow-tooltip /> |
| | | <el-table-column label="入库数量" prop="entryPersonName" width="90" show-overflow-tooltip /> |
| | | <el-table-column label="含税单价(元)" prop="entryDate" width="100" show-overflow-tooltip /> |
| | | <el-table-column label="含税总价(元)" prop="executionDate" width="100" show-overflow-tooltip /> |
| | | <el-table-column label="税率(%)" prop="executionDate" width="80" show-overflow-tooltip /> |
| | | <el-table-column label="不含税总价(元)" prop="executionDate" width="180" show-overflow-tooltip /> |
| | | <el-table-column label="入库人" prop="executionDate" width="80" show-overflow-tooltip /> |
| | | <el-table-column fixed="right" label="操作" min-width="60" align="center"> |
| | | <template #default="scope"> |
| | | <el-button link type="primary" size="small" @click="openForm('edit', scope.row);">编辑</el-button> |
| | |
| | | <el-dialog v-model="dialogFormVisible" :title="operationType === 'add' ? '新增入库' : '编辑入库'" width="70%" |
| | | @close="closeDia"> |
| | | <el-form :model="form" label-width="140px" label-position="top" :rules="rules" ref="formRef"> |
| | | <el-row :gutter="30"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="供应商名称:" prop="salesContractNo"> |
| | | <el-form-item label="采购订单号" prop="salesContractNo"> |
| | | <el-input v-model="form.salesContractNo" placeholder="请输入" clearable /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="产品大类:" prop="salesman"> |
| | | <el-select v-model="form.salesman" placeholder="请选择" clearable> |
| | | <el-option v-for="item in userList" :key="item.nickName" :label="item.nickName" |
| | | :value="item.nickName" /> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="30"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="规格型号:" prop="customerContractNo"> |
| | | <el-input v-model="form.customerContractNo" placeholder="请输入" clearable /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="单位:" prop="customerId"> |
| | | <el-input v-model="form.customerContractNo" placeholder="请输入" clearable /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="30"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="入库时间:" prop="projectName"> |
| | | <el-date-picker style="width: 100%" v-model="form.entryDate" value-format="YYYY-MM-DD" format="YYYY-MM-DD" |
| | | type="date" placeholder="请选择" clearable /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="入库批次:" prop="entryPerson"> |
| | | <el-input v-model="form.customerContractNo" placeholder="请输入" clearable /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="30"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="入库数量:" prop="customerContractNo"> |
| | | <el-input v-model="form.customerContractNo" placeholder="请输入" clearable /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="含税单价:" prop="customerId"> |
| | | <el-input v-model="form.customerContractNo" placeholder="请输入" clearable /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="30"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="含税总价:" prop="customerContractNo"> |
| | | <el-input v-model="form.customerContractNo" placeholder="请输入" clearable /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="税率:" prop="customerId"> |
| | | <el-input v-model="form.customerContractNo" placeholder="请输入" clearable /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="30"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="不含税总价:" prop="entryDate"> |
| | | <el-input v-model="form.customerContractNo" placeholder="请输入" clearable /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="入库人:" prop="entryPerson"> |
| | | <el-select v-model="form.entryPerson" placeholder="请选择" clearable> |
| | | <el-option v-for="item in userList" :key="item.userId" :label="item.nickName" :value="item.userId" /> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-table |
| | | :data="productData" |
| | | border |
| | | @selection-change="productSelected" |
| | | > |
| | | <el-table-column align="center" type="selection" width="55" /> |
| | | <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="unit" width="70" /> |
| | | <el-table-column label="采购数量" prop="quantity" width="100" /> |
| | | <el-table-column label="待入库数量" prop="quantity0" width="100" /> |
| | | <el-table-column label="本次入库数量" prop="quantityStock" width="120"> |
| | | <template #default="scope"> |
| | | <el-input v-model="scope.row.quantityStock" type="number" :min="0" :max="scope.row.quantity0" /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="税率(%)" prop="taxRate" width="120" /> |
| | | <el-table-column |
| | | label="含税单价(元)" |
| | | prop="taxInclusiveUnitPrice" |
| | | :formatter="formattedNumber" |
| | | width="150" |
| | | /> |
| | | <el-table-column |
| | | label="含税总价(元)" |
| | | prop="taxInclusiveTotalPrice" |
| | | :formatter="formattedNumber" |
| | | width="150" |
| | | /> |
| | | <el-table-column |
| | | label="不含税总价(元)" |
| | | prop="taxExclusiveTotalPrice" |
| | | :formatter="formattedNumber" |
| | | width="150" |
| | | /> |
| | | </el-table> |
| | | </el-form> |
| | | <template #footer> |
| | | <div class="dialog-footer"> |
| | |
| | | size: 100, |
| | | }) |
| | | const total = ref(0) |
| | | const fileList = ref([]) |
| | | |
| | | // 用户信息表单弹框数据 |
| | | const operationType = ref('') |
| | |
| | | form.value = { ...res } |
| | | form.value.entryPerson = Number(res.entryPerson) |
| | | productData.value = form.value.productData |
| | | fileList.value = form.value.salesLedgerFiles |
| | | }) |
| | | } |
| | | // let userAll = await userStore.getInfo() |
| | |
| | | return |
| | | } |
| | | let tempFileIds = [] |
| | | if (fileList.value.length > 0) { |
| | | tempFileIds = fileList.value.map(item => item.tempId) |
| | | } |
| | | form.value.tempFileIds = tempFileIds |
| | | form.value.type = 1 |
| | | addOrUpdateSalesLedger(form.value).then(res => { |
| | |
| | | const day = String(today.getDate()).padStart(2, '0'); |
| | | return `${year}-${month}-${day}`; |
| | | } |
| | | |
| | | const productSelectedRows = ref([]) |
| | | const productSelected = (selectedRows) => { |
| | | productSelectedRows.value = selectedRows; |
| | | }; |
| | | |
| | | const formattedNumber = (row, column, cellValue) => { |
| | | return parseFloat(cellValue).toFixed(2); |
| | | }; |
| | | onMounted(() => { |
| | | getList() |
| | | }) |