| | |
| | | <div class="search_thing"> |
| | | <div class="search_label">时间范围:</div> |
| | | <div class="search_input"> |
| | | <el-date-picker |
| | | v-model="dates" |
| | | type="datetimerange" |
| | | range-separator="至" |
| | | format="yyyy-MM-dd HH:mm:ss" |
| | | start-placeholder="开始日期" |
| | | end-placeholder="结束日期" |
| | | size="small"> |
| | | <el-date-picker v-model="dates" type="daterange" range-separator="至" format="yyyy-MM-dd" |
| | | value-format="yyyy-MM-dd" start-placeholder="开始日期" end-placeholder="结束日期" size="small" |
| | | @change="datesChange" :key="index2"> |
| | | </el-date-picker> |
| | | </div> |
| | | </div> |
| | |
| | | </div> |
| | | </div> |
| | | <div class="table"> |
| | | <ValueTable ref="ValueTable" :url="$api.insOrder.costStatistics" :componentData="componentData" |
| | | :key="upIndex" @handleWeave="handleWeave"/> |
| | | <ValueTable ref="ValueTable" :url="$api.insOrder.costStatistics" :componentData="componentData" :key="upIndex" |
| | | @handleWeave="handleWeave" /> |
| | | </div> |
| | | </div> |
| | | <el-dialog title="在线编制" :visible.sync="claimVisible" width="70%" :modal-append-to-body="false"> |
| | |
| | | componentData: { |
| | | entity: { |
| | | name: null, |
| | | dates: null, |
| | | orderBy: { |
| | | field: 'id,ins_sample_id', |
| | | order: 'asc' |
| | | } |
| | | }, |
| | | init: false, |
| | | isIndex: true, |
| | | showSelect: false, |
| | | select: false, |
| | |
| | | linkEvent:{}, |
| | | spanConfig:{ |
| | | //合并行 |
| | | rows:[ |
| | | { |
| | | rows: [{ |
| | | name:'createTime', |
| | | index:1 |
| | | }, |
| | |
| | | // 特殊的合并行,根据main和rows的name来合并 |
| | | special:{ |
| | | main:'insSampleId', |
| | | rows:[ |
| | | { |
| | | rows: [{ |
| | | name:'sample', |
| | | index:3 |
| | | }, |
| | |
| | | entityCopy: {}, |
| | | upIndex: 0, |
| | | claimVisible:false, |
| | | dates: [] |
| | | dates: [], |
| | | index2: 0 |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.getDates() |
| | | this.refreshTable() |
| | | this.entityCopy = this.HaveJson(this.componentData.entity) |
| | | this.getPower() |
| | | }, |
| | | methods: { |
| | | getDates(){ |
| | | //当前月第一天 |
| | | var y = new Date().getFullYear(); //获取年份 |
| | | var m = new Date().getMonth() + 1; //获取月份 |
| | | var d = "01"; |
| | | m = m < 10 ? "0" + m : m; //月份补 0 |
| | | let startDate = [y, m, d].join("-"); |
| | | //当前月最后一天 |
| | | var y = new Date().getFullYear(); //获取年份 |
| | | var m = new Date().getMonth() + 1; //获取月份 |
| | | var d = new Date(y, m, 0).getDate(); //获取当月最后一日 |
| | | m = m < 10 ? "0" + m : m; //月份补 0 |
| | | d = d < 10 ? "0" + d : d; //日数补 0 |
| | | let endDate = [y, m, d].join("-"); |
| | | this.dates = [startDate, endDate] |
| | | this.index2++ |
| | | this.componentData.entity.dates = `["${startDate}","${endDate}"]` |
| | | }, |
| | | refreshTable() { |
| | | this.$refs['ValueTable'].selectList() |
| | | }, |
| | | refresh() { |
| | | this.componentData.entity = this.HaveJson(this.entityCopy) |
| | | this.componentData.init = true |
| | | this.getDates() |
| | | this.upIndex++ |
| | | }, |
| | | handleWeave(){ |
| | |
| | | }, |
| | | confirmClaim(){ |
| | | console.log(11111111111,this.$refs.Word.getValue()) |
| | | }, |
| | | datesChange(val){ |
| | | if(val == null){ |
| | | return |
| | | } |
| | | this.componentData.entity.dates = JSON.stringify(val) |
| | | this.$refs['ValueTable'].selectList() |
| | | } |
| | | } |
| | | } |