| | |
| | | return format |
| | | } |
| | | return '' |
| | | } |
| | | |
| | | /** |
| | | * 获取年月日 26号+1 |
| | | * @param date |
| | | * @returns {string} |
| | | */ |
| | | export function getYearAndMonthAndDaysZTZB(date = new Date()) { |
| | | let year = date.getFullYear(); |
| | | let month = date.getMonth(); |
| | | let days = date.getDate(); |
| | | |
| | | // 判断是否是26号 |
| | | if (days === 26) { |
| | | month++; |
| | | if (month > 11) { |
| | | month = 0; |
| | | year++; |
| | | } |
| | | } |
| | | |
| | | month += 1; |
| | | month = month < 10 ? '0' + month + '-' : month + '-'; |
| | | year = year + '-'; |
| | | days = days < 10 ? '0' + days : days; |
| | | |
| | | return (year + month + days); |
| | | } |
| | |
| | | </el-input> |
| | | </el-form-item> |
| | | <el-form-item label="样品名称" prop="sampleName"> |
| | | <el-input v-model="entity.partNo" clearable placeholder="请输入" size="small" |
| | | <el-input v-model="entity.sampleName" clearable placeholder="请输入" size="small" |
| | | @keyup.enter.native="refreshTable"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="样品型号" prop="sampleModel"> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { getYearAndMonthAndDays } from "@/utils/date"; |
| | | import { getYearAndMonthAndDays, getYearAndMonthAndDaysZTZB } from "@/utils/date"; |
| | | import limsTable from "@/components/Table/lims-table.vue"; |
| | | import { selectAuxiliaryAllByMonth } from "@/api/performance/manHour"; |
| | | export default { |
| | |
| | | data() { |
| | | return { |
| | | queryParams: { |
| | | month: getYearAndMonthAndDays().slice(0, 7), |
| | | month: getYearAndMonthAndDaysZTZB().slice(0, 7), |
| | | name: "", |
| | | departLims: "", |
| | | }, |
| | |
| | | }, |
| | | refresh() { |
| | | this.queryParams = { |
| | | month: getYearAndMonthAndDays().slice(0, 7), |
| | | month: getYearAndMonthAndDaysZTZB().slice(0, 7), |
| | | name: "", |
| | | departLims: "", |
| | | }; |