| | |
| | | </div> |
| | | <el-table :data="tableData" border v-loading="tableLoading" @selection-change="handleSelectionChange" |
| | | :expand-row-keys="expandedRowKeys" :row-key="(row) => row.id" show-summary style="width: 100%" |
| | | :summary-method="summarizeMainTable" @expand-change="expandChange" height="calc(100vh - 18.5em)"> |
| | | :summary-method="summarizeMainTable" @expand-change="expandChange" height="calc(100vh - 21em)"> |
| | | <el-table-column align="center" type="selection" width="55" /> |
| | | <el-table-column type="expand"> |
| | | <template #default="props"> |
| | |
| | | <el-table-column label="签订日期" prop="executionDate" width="120" show-overflow-tooltip /> |
| | | <el-table-column fixed="right" label="操作" min-width="200" align="center"> |
| | | <template #default="scope"> |
| | | <el-button link type="primary" size="small" :disabled="scope.row.invoiceTotal>0 || scope.row.entryPersonName !== userStore.nickName" @click="openForm('edit', scope.row)">编辑</el-button> |
| | | <el-button link type="primary" size="small" @click="openForm('edit', scope.row)">编辑</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="openDeliveryForm(scope.row)">发货</el-button> |
| | |
| | | const getList = () => { |
| | | tableLoading.value = true; |
| | | const { entryDate, ...rest } = searchForm; |
| | | ledgerListPage({ ...rest, ...page }) |
| | | // 将范围日期字段传递给后端 |
| | | const params = { ...rest, ...page }; |
| | | // 移除录入日期的默认值设置,只保留范围日期字段 |
| | | delete params.entryDate; |
| | | ledgerListPage(params) |
| | | .then((res) => { |
| | | tableLoading.value = false; |
| | | tableData.value = res.records; |
| | |
| | | // form.value.entryPerson = userAll.user.userId // 设置默认业务员为当前用户 |
| | | // } |
| | | // }); |
| | | form.value.entryDate = getCurrentDate(); // 设置默认录入日期为当前日期 |
| | | // 移除录入日期默认值设置,只处理范围日期字段 |
| | | dialogFormVisible.value = true; |
| | | }; |
| | | function changs(val) { |
| | |
| | | const openDeliveryForm = (row) => { |
| | | currentDeliveryRow.value = row; |
| | | deliveryForm.value = { |
| | | shippingDate: getCurrentDate(), |
| | | shippingDate: "", // 移除默认值设置 |
| | | shippingCarNumber: "", |
| | | }; |
| | | deliveryFormVisible.value = true; |
| | |
| | | }; |
| | | |
| | | onMounted(() => { |
| | | getList(); |
| | | // 设置录入日期范围默认值为当天 |
| | | const today = dayjs().format('YYYY-MM-DD'); |
| | | searchForm.entryDate = [today, today]; |
| | | // 设置范围日期字段的起始和结束时间 |
| | | searchForm.entryDateStart = today; |
| | | searchForm.entryDateEnd = today; |
| | | getList(); |
| | | }); |
| | | </script> |
| | | |