| | |
| | | <div class="table_list"> |
| | | <div style="display: flex;justify-content: flex-end;margin-bottom: 20px;"> |
| | | <el-button type="primary" @click="openForm('add')">新增台账</el-button> |
| | | <el-button type="success" @click="openScanAddDialog">扫码新增</el-button> |
| | | <!-- <el-button type="success" @click="openScanAddDialog">扫码新增</el-button> --> |
| | | <el-button @click="handleOut">导出</el-button> |
| | | <el-button type="danger" plain @click="handleDelete">删除</el-button> |
| | | </div> |
| | |
| | | show-summary |
| | | :summary-method="summarizeMainTable" |
| | | @expand-change="expandChange" |
| | | height="calc(100vh - 18.5em)" |
| | | height="calc(100vh - 19em)" |
| | | > |
| | | <el-table-column align="center" type="selection" width="55" /> |
| | | <el-table-column type="expand"> |
| | |
| | | <el-table-column |
| | | label="销售合同号" |
| | | prop="salesContractNo" |
| | | width="200" |
| | | show-overflow-tooltip |
| | | /> |
| | | <el-table-column |
| | | label="供应商名称" |
| | | width="240" |
| | | prop="supplierName" |
| | | show-overflow-tooltip |
| | | /> |
| | |
| | | <el-table-column |
| | | fixed="right" |
| | | label="操作" |
| | | min-width="150" |
| | | min-width="100" |
| | | align="center" |
| | | > |
| | | <template #default="scope"> |
| | |
| | | > |
| | | <el-button |
| | | link |
| | | type="success" |
| | | type="primary" |
| | | size="small" |
| | | @click="showQRCode(scope.row)" |
| | | >生成二维码</el-button |
| | | @click="downLoadFile(scope.row)" |
| | | >附件</el-button |
| | | > |
| | | |
| | | </template> |
| | |
| | | <el-select |
| | | v-model="form.salesLedgerId" |
| | | placeholder="请选择" |
| | | filterable |
| | | clearable |
| | | @change="salesLedgerChange" |
| | | > |
| | |
| | | <el-select |
| | | v-model="form.supplierId" |
| | | placeholder="请选择" |
| | | filterable |
| | | clearable |
| | | filterable |
| | | allow-create |
| | | > |
| | | <el-option |
| | | v-for="item in supplierList" |
| | |
| | | placeholder="请选择" |
| | | clearable |
| | | disabled |
| | | filterable |
| | | > |
| | | <el-option |
| | | v-for="item in userList" |
| | |
| | | </div> |
| | | </template> |
| | | </el-dialog> |
| | | <FileList ref="fileListRef" /> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | import { Search } from "@element-plus/icons-vue"; |
| | | import { ElMessageBox } from "element-plus"; |
| | | import { userListNoPage } from "@/api/system/user.js"; |
| | | import FileList from "./fileList.vue"; |
| | | import { |
| | | getSalesLedgerWithProducts, |
| | | addOrUpdateSalesLedgerProduct, |
| | |
| | | const getModels = (value) => { |
| | | if (value) { |
| | | productForm.value.productCategory = findNodeById(productOptions.value, value) || ""; |
| | | productForm.value.productId = value; |
| | | modelList({ id: value }).then((res) => { |
| | | modelOptions.value = res; |
| | | }); |
| | |
| | | proxy.$modal.msgWarning("请选择数据"); |
| | | return; |
| | | } |
| | | // 保证至少保留一条产品信息 |
| | | const remainingCount = |
| | | productData.value.length - productSelectedRows.value.length; |
| | | if (remainingCount < 1) { |
| | | proxy.$modal.msgWarning("至少保留一条产品信息,无法全部删除"); |
| | | return; |
| | | } |
| | | if (operationType.value === "add") { |
| | | productSelectedRows.value.forEach((selectedRow) => { |
| | | const index = productData.value.findIndex( |
| | |
| | | delProduct(ids).then((res) => { |
| | | proxy.$modal.msgSuccess("删除成功"); |
| | | closeProductDia(); |
| | | getSalesLedgerWithProducts({ id: currentId.value, type: 2 }).then( |
| | | getPurchaseById({ id: currentId.value, type: 2 }).then( |
| | | (res) => { |
| | | productData.value = res.productData; |
| | | } |
| | |
| | | } |
| | | }; |
| | | |
| | | const fileListRef = ref(null) |
| | | const downLoadFile = (row) => { |
| | | fileListRef.value.open(row.salesLedgerFiles) |
| | | } |
| | | |
| | | // 显示二维码 |
| | | const showQRCode = async (row) => { |
| | | try { |