feat():前端样式调整;

master
jiyufei 2 months ago
parent 9fe69f9e8d
commit 33f534173f

@ -1,56 +1,46 @@
<template> <template>
<div class="JNPF-common-layout"> <div class="JNPF-common-layout">
<div class="JNPF-common-layout-center"> <div class="JNPF-common-layout-center">
<el-row class="JNPF-common-search-box" :gutter="16"> <el-row class="JNPF-common-search-box" :gutter="16">
<el-form @submit.native.prevent> <el-form @submit.native.prevent>
<el-col :span="6"> <el-col :span="6">
<el-form-item label="物料需求计划单号"> <el-form-item label="物料需求计划单号">
<el-input v-model="query.planNumber" placeholder="请输入" clearable> </el-input> <el-input v-model="query.planNumber" placeholder="请输入" clearable> </el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item label="年月"> <el-form-item label="年月">
<JnpfDateRangePicker v-model="query.planYearMonth" <JnpfDateRangePicker v-model="query.planYearMonth" format="yyyy-MM" startPlaceholder="开始日期"
format="yyyy-MM" startPlaceholder="开始日期" endPlaceholder="结束日期">
endPlaceholder="结束日期" > </JnpfDateRangePicker>
</JnpfDateRangePicker> </el-form-item>
</el-form-item> </el-col>
</el-col> <el-col :span="6">
<el-col :span="6"> <el-form-item label="单据日期">
<el-form-item label="单据日期"> <JnpfDateRangePicker v-model="query.orderDate" format="yyyy-MM-dd" startPlaceholder="开始日期"
<JnpfDateRangePicker v-model="query.orderDate" endPlaceholder="结束日期">
format="yyyy-MM-dd" startPlaceholder="开始日期" </JnpfDateRangePicker>
endPlaceholder="结束日期" > </el-form-item>
</JnpfDateRangePicker> </el-col>
</el-form-item> <template v-if="showAll">
</el-col> <el-col :span="6">
<template v-if="showAll"> <el-form-item label="是否生成采购计划">
<el-col :span="6"> <JnpfSelect v-model="query.isCreatePlan" placeholder="请选择" clearable
<el-form-item label="是否生成采购计划"> :options="isCreatePlanOptions" :props="isCreatePlanProps" multiple>
<JnpfSelect v-model="query.isCreatePlan" placeholder="请选择" clearable </JnpfSelect>
:options="isCreatePlanOptions" </el-form-item>
:props="isCreatePlanProps" multiple > </el-col>
</JnpfSelect> </template>
</el-form-item>
</el-col>
</template>
<el-col :span="6"> <el-col :span="6">
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" @click="search()"></el-button> <el-button type="primary" icon="el-icon-search" @click="search()"></el-button>
<el-button icon="el-icon-refresh-right" @click="reset()"></el-button> <el-button icon="el-icon-refresh-right" @click="reset()"></el-button>
<el-button type="text" icon="el-icon-arrow-down" @click="showAll=true" v-if="!showAll"> <el-button type="text" icon="el-icon-arrow-down" @click="showAll = true" v-if="!showAll">
展开 展开
</el-button> </el-button>
<el-button type="text" icon="el-icon-arrow-up" @click="showAll=false" v-else> <el-button type="text" icon="el-icon-arrow-up" @click="showAll = false" v-else>
收起 收起
</el-button> </el-button>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-form> </el-form>
@ -58,442 +48,432 @@
<div class="JNPF-common-layout-main JNPF-flex-main"> <div class="JNPF-common-layout-main JNPF-flex-main">
<div class="JNPF-common-head"> <div class="JNPF-common-head">
<div> <div>
<el-button type="primary" icon="icon-ym icon-ym-btn-add" v-has="'btn_add'" @click="addOrUpdateHandle()"> <el-button type="primary" icon="icon-ym icon-ym-btn-add" v-has="'btn_add'"
</el-button> @click="addOrUpdateHandle()">新增
<el-button type="text" icon="icon-ym icon-ym-btn-download" @click="exportData()" v-has="'btn_download'" >导出 </el-button>
</el-button> <el-button type="text" icon="icon-ym icon-ym-btn-download" @click="exportData()"
v-has="'btn_download'">导出
</el-button>
</div> </div>
<div class="JNPF-common-head-right"> <div class="JNPF-common-head-right">
<el-tooltip content="高级查询" placement="top" v-if="true"> <el-tooltip content="高级查询" placement="top" v-if="true">
<el-link icon="icon-ym icon-ym-filter JNPF-common-head-icon" :underline="false" <el-link icon="icon-ym icon-ym-filter JNPF-common-head-icon" :underline="false"
@click="openSuperQuery()" /> @click="openSuperQuery()" />
</el-tooltip> </el-tooltip>
<el-tooltip effect="dark" :content="$t('common.refresh')" placement="top"> <el-tooltip effect="dark" :content="$t('common.refresh')" placement="top">
<el-link icon="icon-ym icon-ym-Refresh JNPF-common-head-icon" :underline="false" <el-link icon="icon-ym icon-ym-Refresh JNPF-common-head-icon" :underline="false"
@click="initData()" /> @click="initData()" />
</el-tooltip> </el-tooltip>
</div> </div>
</div> </div>
<JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange' <JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange'
:span-method="arraySpanMethod" :span-method="arraySpanMethod" border>
<el-table-column prop="planNumber" label="物料需求计划单号" align="center">
> </el-table-column>
<el-table-column <el-table-column prop="reamrk" label="备注" align="center">
prop="planNumber" </el-table-column>
label="物料需求计划单号" align="left" <el-table-column label="是否生成采购计划" prop="isCreatePlan" align="center">
> <!-- <template slot-scope="scope">
</el-table-column> {{ scope.row.isCreatePlan }}
<el-table-column </template> -->
prop="reamrk" <template slot-scope="scope">
label="备注" align="left" <el-tag v-if="scope.row.isCreatePlan == '是'"></el-tag>
> <el-tag type="success" v-else-if="scope.row.isCreatePlan == ''"></el-tag>
</el-table-column> </template>
<el-table-column label="是否生成采购计划" prop="isCreatePlan" algin="left" </el-table-column>
> <el-table-column prop="planYearMonth" label="年月" align="center">
<template slot-scope="scope"> </el-table-column>
{{ scope.row.isCreatePlan}} <el-table-column prop="orderDate" label="单据日期" align="center">
</template> </el-table-column>
</el-table-column> <el-table-column label="操作" fixed="right" width="150">
<el-table-column <template slot-scope="scope">
prop="planYearMonth" <el-button type="text" @click="addOrUpdateHandle(scope.row)" v-has="'btn_edit'">
label="年月" align="left" </el-button>
> <el-button type="text" class="JNPF-table-delBtn" v-has="'btn_remove'"
</el-table-column> @click="handleDel(scope.row.id)">删除
<el-table-column </el-button>
prop="orderDate" <el-button type="text" v-has="'btn_detail'" @click="goDetail(scope.row.id)">
label="单据日期" align="left" </el-button>
> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作"
fixed="right" width="150" >
<template slot-scope="scope" >
<el-button type="text"
@click="addOrUpdateHandle(scope.row)" v-has="'btn_edit'" >编辑
</el-button>
<el-button type="text" class="JNPF-table-delBtn" v-has="'btn_remove'" @click="handleDel(scope.row.id)">
</el-button>
<el-button type="text" v-has="'btn_detail'"
@click="goDetail(scope.row.id)">详情
</el-button>
</template>
</el-table-column>
</JNPF-table> </JNPF-table>
<pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize" @pagination="initData"/> <pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize"
</div> @pagination="initData" />
</div>
</div> </div>
<JNPF-Form v-if="formVisible" ref="JNPFForm" @refresh="refresh"/> <JNPF-Form v-if="formVisible" ref="JNPFForm" @refresh="refresh" />
<ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download"/> <ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download" />
<ImportBox v-if="uploadBoxVisible" ref="UploadBox" @refresh="initData" /> <ImportBox v-if="uploadBoxVisible" ref="UploadBox" @refresh="initData" />
<Detail v-if="detailVisible" ref="Detail" @refresh="detailVisible=false"/> <Detail v-if="detailVisible" ref="Detail" @refresh="detailVisible = false" />
<ToFormDetail v-if="toFormDetailVisible" ref="toFormDetail" @close="toFormDetailVisible = false" /> <ToFormDetail v-if="toFormDetailVisible" ref="toFormDetail" @close="toFormDetailVisible = false" />
<SuperQuery v-if="superQueryVisible" ref="SuperQuery" :columnOptions="superQueryJson" <SuperQuery v-if="superQueryVisible" ref="SuperQuery" :columnOptions="superQueryJson"
@superQuery="superQuery" /> @superQuery="superQuery" />
</div> </div>
</template> </template>
<script> <script>
import request from '@/utils/request' import request from '@/utils/request'
import {mapGetters} from "vuex"; import { mapGetters } from "vuex";
import {getDictionaryDataSelector} from '@/api/systemData/dictionary' import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
import JNPFForm from './form' import JNPFForm from './form'
import Detail from './Detail' import Detail from './Detail'
import ExportBox from '@/components/ExportBox' import ExportBox from '@/components/ExportBox'
import ToFormDetail from '@/views/basic/dynamicModel/list/detail' import ToFormDetail from '@/views/basic/dynamicModel/list/detail'
import {getDataInterfaceRes} from '@/api/systemData/dataInterface' import { getDataInterfaceRes } from '@/api/systemData/dataInterface'
import { getConfigData } from '@/api/onlineDev/visualDev' import { getConfigData } from '@/api/onlineDev/visualDev'
import { getDefaultCurrentValueUserIdAsync } from '@/api/permission/user' import { getDefaultCurrentValueUserIdAsync } from '@/api/permission/user'
import { getDefaultCurrentValueDepartmentIdAsync } from '@/api/permission/organize' import { getDefaultCurrentValueDepartmentIdAsync } from '@/api/permission/organize'
import columnList from './columnList' import columnList from './columnList'
import { thousandsFormat } from "@/components/Generator/utils/index" import { thousandsFormat } from "@/components/Generator/utils/index"
import SuperQuery from '@/components/SuperQuery' import SuperQuery from '@/components/SuperQuery'
import superQueryJson from './superQueryJson' import superQueryJson from './superQueryJson'
export default { export default {
components: { components: {
JNPFForm, JNPFForm,
Detail, Detail,
ExportBox,ToFormDetail , SuperQuery ExportBox, ToFormDetail, SuperQuery
}, },
data() { data() {
return { return {
keyword:'', keyword: '',
expandsTree: true, expandsTree: true,
refreshTree: true, refreshTree: true,
toFormDetailVisible:false, toFormDetailVisible: false,
expandObj:{}, expandObj: {},
columnOptions: [], columnOptions: [],
mergeList: [], mergeList: [],
exportList:[], exportList: [],
columnList, columnList,
showAll: false, showAll: false,
superQueryVisible: false, superQueryVisible: false,
superQueryJson, superQueryJson,
uploadBoxVisible: false, uploadBoxVisible: false,
detailVisible: false, detailVisible: false,
query: { query: {
planNumber:undefined, planNumber: undefined,
planYearMonth:undefined, planYearMonth: undefined,
orderDate:undefined, orderDate: undefined,
isCreatePlan:undefined, isCreatePlan: undefined,
}, },
treeProps: { treeProps: {
children: 'children', children: 'children',
label: 'fullName', label: 'fullName',
value: 'id', value: 'id',
isLeaf: 'isLeaf' isLeaf: 'isLeaf'
}, },
list: [], list: [],
listLoading: true, listLoading: true,
total: 0, total: 0,
queryData: {}, queryData: {},
listQuery: { listQuery: {
superQueryJson: '', superQueryJson: '',
currentPage: 1, currentPage: 1,
pageSize: 20, pageSize: 20,
sort: "desc", sort: "desc",
sidx: "orderDate", sidx: "orderDate",
}, },
formVisible: false, formVisible: false,
flowVisible: false, flowVisible: false,
flowListVisible: false, flowListVisible: false,
flowList: [], flowList: [],
exportBoxVisible: false, exportBoxVisible: false,
isCreatePlanOptions:[{"fullName":"是","id":"1"},{"fullName":"否","id":"2"}], isCreatePlanOptions: [{ "fullName": "是", "id": "1" }, { "fullName": "否", "id": "2" }],
isCreatePlanProps:{"label":"fullName","value":"id" }, isCreatePlanProps: { "label": "fullName", "value": "id" },
interfaceRes: { interfaceRes: {
},
}
},
computed: {
...mapGetters(['userInfo']),
menuId() {
return this.$route.meta.modelId || ''
}
},
created() {
this.getColumnList(),
this.initSearchDataAndListData()
this.queryData = JSON.parse(JSON.stringify(this.query))
},
methods: {
toDetail(defaultValue, modelId) {
if (!defaultValue) return
getConfigData(modelId).then(res => {
if (!res.data || !res.data.formData) return
let formData = JSON.parse(res.data.formData)
formData.popupType = 'general'
this.toFormDetailVisible = true
this.$nextTick(() => {
this.$refs.toFormDetail.init(formData, modelId, defaultValue)
})
})
}, },
toggleTreeExpand(expands) { }
this.refreshTree = false },
this.expandsTree = expands computed: {
...mapGetters(['userInfo']),
menuId() {
return this.$route.meta.modelId || ''
}
},
created() {
this.getColumnList(),
this.initSearchDataAndListData()
this.queryData = JSON.parse(JSON.stringify(this.query))
},
methods: {
toDetail(defaultValue, modelId) {
if (!defaultValue) return
getConfigData(modelId).then(res => {
if (!res.data || !res.data.formData) return
let formData = JSON.parse(res.data.formData)
formData.popupType = 'general'
this.toFormDetailVisible = true
this.$nextTick(() => { this.$nextTick(() => {
this.refreshTree = true this.$refs.toFormDetail.init(formData, modelId, defaultValue)
this.$nextTick(() => {
this.$refs.treeBox.setCurrentKey(null)
})
}) })
}, })
filterNode(value, data) { },
if (!value) return true; toggleTreeExpand(expands) {
return data[this.treeProps.label].indexOf(value) !== -1; this.refreshTree = false
}, this.expandsTree = expands
loadNode(node, resolve) { this.$nextTick(() => {
const nodeData = node.data this.refreshTree = true
const config ={ this.$nextTick(() => {
treeInterfaceId:"", this.$refs.treeBox.setCurrentKey(null)
treeTemplateJson:[] })
} })
if (config.treeInterfaceId) { },
// filterNode(value, data) {
if (config.treeTemplateJson && config.treeTemplateJson.length) { if (!value) return true;
for (let i = 0; i < config.treeTemplateJson.length; i++) { return data[this.treeProps.label].indexOf(value) !== -1;
const element = config.treeTemplateJson[i]; },
element.defaultValue = nodeData[element.relationField] || '' loadNode(node, resolve) {
} const nodeData = node.data
} const config = {
// treeInterfaceId: "",
let query = { treeTemplateJson: []
paramList: config.treeTemplateJson || [], }
} if (config.treeInterfaceId) {
// //
getDataInterfaceRes(config.treeInterfaceId, query).then(res => { if (config.treeTemplateJson && config.treeTemplateJson.length) {
let data = res.data for (let i = 0; i < config.treeTemplateJson.length; i++) {
if (Array.isArray(data)) { const element = config.treeTemplateJson[i];
resolve(data); element.defaultValue = nodeData[element.relationField] || ''
} else {
resolve([]);
}
})
}
},
getColumnList() {
//
this.columnOptions = this.transformColumnList(this.columnList)
},
transformColumnList(columnList) {
let list = []
for (let i = 0; i < columnList.length; i++) {
const e = columnList[i];
if (!e.prop.includes('-')) {
list.push(e)
} else {
let prop = e.prop.split('-')[0]
let label = e.label.split('-')[0]
let vModel = e.prop.split('-')[1]
let newItem = {
align: "center",
jnpfKey: "table",
prop,
label,
children: []
}
e.vModel = vModel
if (!this.expandObj.hasOwnProperty(`${prop}Expand`)) this.$set(this.expandObj, `${prop}Expand`, false)
if (!list.some(o => o.prop === prop)) list.push(newItem)
for (let i = 0; i < list.length; i++) {
if (list[i].prop === prop) {
list[i].children.push(e)
break
}
}
} }
} }
this.getMergeList(list) //
this.getExportList(list) let query = {
return list paramList: config.treeTemplateJson || [],
},
arraySpanMethod({ column }) {
for (let i = 0; i < this.mergeList.length; i++) {
if (column.property == this.mergeList[i].prop) {
return [this.mergeList[i].rowspan, this.mergeList[i].colspan]
}
} }
}, //
getMergeList(list) { getDataInterfaceRes(config.treeInterfaceId, query).then(res => {
let newList = JSON.parse(JSON.stringify(list)) let data = res.data
newList.forEach(item => { if (Array.isArray(data)) {
if (item.children && item.children.length) { resolve(data);
let child = {
prop: item.prop + '-child-first'
}
item.children.unshift(child)
}
})
newList.forEach(item => {
if (item.children && item.children.length ) {
item.children.forEach((child, index) => {
if (index == 0) {
this.mergeList.push({
prop: child.prop,
rowspan: 1,
colspan: item.children.length
})
} else {
this.mergeList.push({
prop: child.prop,
rowspan: 0,
colspan: 0
})
}
})
} else { } else {
this.mergeList.push({ resolve([]);
prop: item.prop,
rowspan: 1,
colspan: 1
})
} }
}) })
}, }
getExportList(list) { },
let exportList = [] getColumnList() {
for (let i = 0; i < list.length; i++) { //
if (list[i].jnpfKey === 'table') { this.columnOptions = this.transformColumnList(this.columnList)
for (let j = 0; j < list[i].children.length; j++) { },
exportList.push(list[i].children[j]) transformColumnList(columnList) {
let list = []
for (let i = 0; i < columnList.length; i++) {
const e = columnList[i];
if (!e.prop.includes('-')) {
list.push(e)
} else {
let prop = e.prop.split('-')[0]
let label = e.label.split('-')[0]
let vModel = e.prop.split('-')[1]
let newItem = {
align: "center",
jnpfKey: "table",
prop,
label,
children: []
}
e.vModel = vModel
if (!this.expandObj.hasOwnProperty(`${prop}Expand`)) this.$set(this.expandObj, `${prop}Expand`, false)
if (!list.some(o => o.prop === prop)) list.push(newItem)
for (let i = 0; i < list.length; i++) {
if (list[i].prop === prop) {
list[i].children.push(e)
break
} }
} else {
exportList.push(list[i])
} }
} }
this.exportList = exportList }
}, this.getMergeList(list)
goDetail(id){ this.getExportList(list)
this.detailVisible = true return list
this.$nextTick(() => { },
this.$refs.Detail.init(id) arraySpanMethod({ column }) {
}) for (let i = 0; i < this.mergeList.length; i++) {
}, if (column.property == this.mergeList[i].prop) {
sortChange({column, prop, order}) { return [this.mergeList[i].rowspan, this.mergeList[i].colspan]
this.listQuery.sort = order == 'ascending' ? 'asc' : 'desc' }
this.listQuery.sidx = !order ? '' : prop }
this.initData() },
}, getMergeList(list) {
async initSearchDataAndListData() { let newList = JSON.parse(JSON.stringify(list))
await this.initSearchData() newList.forEach(item => {
this.initData() if (item.children && item.children.length) {
}, let child = {
// prop: item.prop + '-child-first'
async initSearchData() { }
}, item.children.unshift(child)
initData() { }
this.listLoading = true; })
let _query = { newList.forEach(item => {
...this.listQuery, if (item.children && item.children.length) {
...this.query, item.children.forEach((child, index) => {
keyword: this.keyword, if (index == 0) {
dataType: 0, this.mergeList.push({
menuId:this.menuId, prop: child.prop,
moduleId:'590812661621456901', rowspan: 1,
type:1, colspan: item.children.length
}; })
request({ } else {
url: `/api/example/YysMaterialRequirementPlan/getList`, this.mergeList.push({
method: 'post', prop: child.prop,
data: _query rowspan: 0,
}).then(res => { colspan: 0
var _list =res.data.list; })
this.list = _list.map(o => ({ }
...o,
...this.expandObj,
}))
this.total = res.data.pagination.total
this.listLoading = false
})
},
handleDel(id) {
this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
type: 'warning'
}).then(() => {
request({
url: `/api/example/YysMaterialRequirementPlan/${id}`,
method: 'DELETE'
}).then(res => {
this.$message({
type: 'success',
message: res.msg,
onClose: () => {
this.initData()
}
});
}) })
}).catch(() => { } else {
}); this.mergeList.push({
}, prop: item.prop,
handelUpload(){ rowspan: 1,
this.uploadBoxVisible = true colspan: 1
this.$nextTick(() => {
this.$refs.UploadBox.init("","example/YysMaterialRequirementPlan")
})
},
openSuperQuery() {
this.superQueryVisible = true
this.$nextTick(() => {
this.$refs.SuperQuery.init()
}) })
}, }
superQuery(queryJson) { })
this.listQuery.superQueryJson = queryJson },
this.listQuery.currentPage = 1 getExportList(list) {
this.initData() let exportList = []
}, for (let i = 0; i < list.length; i++) {
addOrUpdateHandle(row, isDetail) { if (list[i].jnpfKey === 'table') {
let id = row?row.id:"" for (let j = 0; j < list[i].children.length; j++) {
this.formVisible = true exportList.push(list[i].children[j])
this.$nextTick(() => { }
this.$refs.JNPFForm.init(id, isDetail,this.list) } else {
}) exportList.push(list[i])
}, }
exportData() { }
this.exportBoxVisible = true this.exportList = exportList
this.$nextTick(() => { },
this.$refs.ExportBox.init(this.exportList) goDetail(id) {
}) this.detailVisible = true
}, this.$nextTick(() => {
download(data) { this.$refs.Detail.init(id)
let query = {...data, ...this.listQuery, ...this.query,menuId:this.menuId} })
},
sortChange({ column, prop, order }) {
this.listQuery.sort = order == 'ascending' ? 'asc' : 'desc'
this.listQuery.sidx = !order ? '' : prop
this.initData()
},
async initSearchDataAndListData() {
await this.initSearchData()
this.initData()
},
//
async initSearchData() {
},
initData() {
this.listLoading = true;
let _query = {
...this.listQuery,
...this.query,
keyword: this.keyword,
dataType: 0,
menuId: this.menuId,
moduleId: '590812661621456901',
type: 1,
};
request({
url: `/api/example/YysMaterialRequirementPlan/getList`,
method: 'post',
data: _query
}).then(res => {
var _list = res.data.list;
this.list = _list.map(o => ({
...o,
...this.expandObj,
}))
this.total = res.data.pagination.total
this.listLoading = false
})
},
handleDel(id) {
this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
type: 'warning'
}).then(() => {
request({ request({
url: `/api/example/YysMaterialRequirementPlan/Actions/Export`, url: `/api/example/YysMaterialRequirementPlan/${id}`,
method: 'post', method: 'DELETE'
data: query
}).then(res => { }).then(res => {
if (!res.data.url) return this.$message({
this.jnpf.downloadFile(res.data.url) type: 'success',
this.$refs.ExportBox.visible = false message: res.msg,
this.exportBoxVisible = false onClose: () => {
this.initData()
}
});
}) })
}, }).catch(() => {
search() { });
this.listQuery.currentPage=1 },
this.listQuery.pageSize=20 handelUpload() {
this.listQuery.sort="desc" this.uploadBoxVisible = true
this.listQuery.sidx="orderDate" this.$nextTick(() => {
this.initData() this.$refs.UploadBox.init("", "example/YysMaterialRequirementPlan")
}, })
refresh(isrRefresh) { },
this.formVisible = false openSuperQuery() {
if (isrRefresh) this.reset() this.superQueryVisible = true
}, this.$nextTick(() => {
reset() { this.$refs.SuperQuery.init()
this.query = JSON.parse(JSON.stringify(this.queryData)) })
this.search() },
}, superQuery(queryJson) {
colseFlow(isrRefresh) { this.listQuery.superQueryJson = queryJson
this.flowVisible = false this.listQuery.currentPage = 1
if (isrRefresh) this.reset() this.initData()
}, },
} addOrUpdateHandle(row, isDetail) {
let id = row ? row.id : ""
this.formVisible = true
this.$nextTick(() => {
this.$refs.JNPFForm.init(id, isDetail, this.list)
})
},
exportData() {
this.exportBoxVisible = true
this.$nextTick(() => {
this.$refs.ExportBox.init(this.exportList)
})
},
download(data) {
let query = { ...data, ...this.listQuery, ...this.query, menuId: this.menuId }
request({
url: `/api/example/YysMaterialRequirementPlan/Actions/Export`,
method: 'post',
data: query
}).then(res => {
if (!res.data.url) return
this.jnpf.downloadFile(res.data.url)
this.$refs.ExportBox.visible = false
this.exportBoxVisible = false
})
},
search() {
this.listQuery.currentPage = 1
this.listQuery.pageSize = 20
this.listQuery.sort = "desc"
this.listQuery.sidx = "orderDate"
this.initData()
},
refresh(isrRefresh) {
this.formVisible = false
if (isrRefresh) this.reset()
},
reset() {
this.query = JSON.parse(JSON.stringify(this.queryData))
this.search()
},
colseFlow(isrRefresh) {
this.flowVisible = false
if (isrRefresh) this.reset()
},
} }
}
</script> </script>

@ -80,7 +80,7 @@
<JnpfNumber v-model="scope.row.sort" :thousands="false" /> <JnpfNumber v-model="scope.row.sort" :thousands="false" />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="班次" prop="post" algin="center" width="150"> <el-table-column label="班次" prop="post" align="center" width="150">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.post }} {{ scope.row.post }}
</template> </template>

Loading…
Cancel
Save