feat():前端样式调整;

master
jiyufei 2 months ago
parent 9fe69f9e8d
commit 33f534173f

@ -1,10 +1,3 @@
<template>
<div class="JNPF-common-layout">
<div class="JNPF-common-layout-center">
@ -17,17 +10,15 @@
</el-col>
<el-col :span="6">
<el-form-item label="年月">
<JnpfDateRangePicker v-model="query.planYearMonth"
format="yyyy-MM" startPlaceholder="开始日期"
endPlaceholder="结束日期" >
<JnpfDateRangePicker v-model="query.planYearMonth" format="yyyy-MM" startPlaceholder="开始日期"
endPlaceholder="结束日期">
</JnpfDateRangePicker>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="单据日期">
<JnpfDateRangePicker v-model="query.orderDate"
format="yyyy-MM-dd" startPlaceholder="开始日期"
endPlaceholder="结束日期" >
<JnpfDateRangePicker v-model="query.orderDate" format="yyyy-MM-dd" startPlaceholder="开始日期"
endPlaceholder="结束日期">
</JnpfDateRangePicker>
</el-form-item>
</el-col>
@ -35,8 +26,7 @@
<el-col :span="6">
<el-form-item label="是否生成采购计划">
<JnpfSelect v-model="query.isCreatePlan" placeholder="请选择" clearable
:options="isCreatePlanOptions"
:props="isCreatePlanProps" multiple >
:options="isCreatePlanOptions" :props="isCreatePlanProps" multiple>
</JnpfSelect>
</el-form-item>
</el-col>
@ -45,10 +35,10 @@
<el-form-item>
<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 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 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-form-item>
@ -58,9 +48,11 @@
<div class="JNPF-common-layout-main JNPF-flex-main">
<div class="JNPF-common-head">
<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'"
@click="addOrUpdateHandle()">新增
</el-button>
<el-button type="text" icon="icon-ym icon-ym-btn-download" @click="exportData()" v-has="'btn_download'" >导出
<el-button type="text" icon="icon-ym icon-ym-btn-download" @click="exportData()"
v-has="'btn_download'">导出
</el-button>
</div>
<div class="JNPF-common-head-right">
@ -75,60 +67,48 @@
</div>
</div>
<JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange'
:span-method="arraySpanMethod"
>
<el-table-column
prop="planNumber"
label="物料需求计划单号" align="left"
>
:span-method="arraySpanMethod" border>
<el-table-column prop="planNumber" label="物料需求计划单号" align="center">
</el-table-column>
<el-table-column
prop="reamrk"
label="备注" align="left"
>
<el-table-column prop="reamrk" label="备注" align="center">
</el-table-column>
<el-table-column label="是否生成采购计划" prop="isCreatePlan" algin="left"
>
<el-table-column label="是否生成采购计划" prop="isCreatePlan" align="center">
<!-- <template slot-scope="scope">
{{ scope.row.isCreatePlan }}
</template> -->
<template slot-scope="scope">
{{ scope.row.isCreatePlan}}
<el-tag v-if="scope.row.isCreatePlan == '是'"></el-tag>
<el-tag type="success" v-else-if="scope.row.isCreatePlan == ''"></el-tag>
</template>
</el-table-column>
<el-table-column
prop="planYearMonth"
label="年月" align="left"
>
<el-table-column prop="planYearMonth" label="年月" align="center">
</el-table-column>
<el-table-column
prop="orderDate"
label="单据日期" align="left"
>
<el-table-column prop="orderDate" label="单据日期" align="center">
</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-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 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 type="text" v-has="'btn_detail'" @click="goDetail(scope.row.id)">
</el-button>
</template>
</el-table-column>
</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"
@pagination="initData" />
</div>
</div>
<JNPF-Form v-if="formVisible" ref="JNPFForm" @refresh="refresh"/>
<ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download"/>
<JNPF-Form v-if="formVisible" ref="JNPFForm" @refresh="refresh" />
<ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download" />
<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" />
<SuperQuery v-if="superQueryVisible" ref="SuperQuery" :columnOptions="superQueryJson"
@superQuery="superQuery" />
@ -137,39 +117,39 @@
<script>
import request from '@/utils/request'
import {mapGetters} from "vuex";
import {getDictionaryDataSelector} from '@/api/systemData/dictionary'
import JNPFForm from './form'
import Detail from './Detail'
import ExportBox from '@/components/ExportBox'
import ToFormDetail from '@/views/basic/dynamicModel/list/detail'
import {getDataInterfaceRes} from '@/api/systemData/dataInterface'
import { getConfigData } from '@/api/onlineDev/visualDev'
import { getDefaultCurrentValueUserIdAsync } from '@/api/permission/user'
import { getDefaultCurrentValueDepartmentIdAsync } from '@/api/permission/organize'
import columnList from './columnList'
import { thousandsFormat } from "@/components/Generator/utils/index"
import SuperQuery from '@/components/SuperQuery'
import superQueryJson from './superQueryJson'
import request from '@/utils/request'
import { mapGetters } from "vuex";
import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
import JNPFForm from './form'
import Detail from './Detail'
import ExportBox from '@/components/ExportBox'
import ToFormDetail from '@/views/basic/dynamicModel/list/detail'
import { getDataInterfaceRes } from '@/api/systemData/dataInterface'
import { getConfigData } from '@/api/onlineDev/visualDev'
import { getDefaultCurrentValueUserIdAsync } from '@/api/permission/user'
import { getDefaultCurrentValueDepartmentIdAsync } from '@/api/permission/organize'
import columnList from './columnList'
import { thousandsFormat } from "@/components/Generator/utils/index"
import SuperQuery from '@/components/SuperQuery'
import superQueryJson from './superQueryJson'
export default {
export default {
components: {
JNPFForm,
Detail,
ExportBox,ToFormDetail , SuperQuery
ExportBox, ToFormDetail, SuperQuery
},
data() {
return {
keyword:'',
keyword: '',
expandsTree: true,
refreshTree: true,
toFormDetailVisible:false,
expandObj:{},
toFormDetailVisible: false,
expandObj: {},
columnOptions: [],
mergeList: [],
exportList:[],
exportList: [],
columnList,
showAll: false,
@ -178,10 +158,10 @@
uploadBoxVisible: false,
detailVisible: false,
query: {
planNumber:undefined,
planYearMonth:undefined,
orderDate:undefined,
isCreatePlan:undefined,
planNumber: undefined,
planYearMonth: undefined,
orderDate: undefined,
isCreatePlan: undefined,
},
treeProps: {
children: 'children',
@ -205,8 +185,8 @@
flowListVisible: false,
flowList: [],
exportBoxVisible: false,
isCreatePlanOptions:[{"fullName":"是","id":"1"},{"fullName":"否","id":"2"}],
isCreatePlanProps:{"label":"fullName","value":"id" },
isCreatePlanOptions: [{ "fullName": "是", "id": "1" }, { "fullName": "否", "id": "2" }],
isCreatePlanProps: { "label": "fullName", "value": "id" },
interfaceRes: {
},
}
@ -251,9 +231,9 @@
},
loadNode(node, resolve) {
const nodeData = node.data
const config ={
treeInterfaceId:"",
treeTemplateJson:[]
const config = {
treeInterfaceId: "",
treeTemplateJson: []
}
if (config.treeInterfaceId) {
//
@ -332,7 +312,7 @@
}
})
newList.forEach(item => {
if (item.children && item.children.length ) {
if (item.children && item.children.length) {
item.children.forEach((child, index) => {
if (index == 0) {
this.mergeList.push({
@ -370,13 +350,13 @@
}
this.exportList = exportList
},
goDetail(id){
goDetail(id) {
this.detailVisible = true
this.$nextTick(() => {
this.$refs.Detail.init(id)
})
},
sortChange({column, prop, order}) {
sortChange({ column, prop, order }) {
this.listQuery.sort = order == 'ascending' ? 'asc' : 'desc'
this.listQuery.sidx = !order ? '' : prop
this.initData()
@ -395,16 +375,16 @@
...this.query,
keyword: this.keyword,
dataType: 0,
menuId:this.menuId,
moduleId:'590812661621456901',
type:1,
menuId: this.menuId,
moduleId: '590812661621456901',
type: 1,
};
request({
url: `/api/example/YysMaterialRequirementPlan/getList`,
method: 'post',
data: _query
}).then(res => {
var _list =res.data.list;
var _list = res.data.list;
this.list = _list.map(o => ({
...o,
...this.expandObj,
@ -432,10 +412,10 @@
}).catch(() => {
});
},
handelUpload(){
handelUpload() {
this.uploadBoxVisible = true
this.$nextTick(() => {
this.$refs.UploadBox.init("","example/YysMaterialRequirementPlan")
this.$refs.UploadBox.init("", "example/YysMaterialRequirementPlan")
})
},
openSuperQuery() {
@ -450,10 +430,10 @@
this.initData()
},
addOrUpdateHandle(row, isDetail) {
let id = row?row.id:""
let id = row ? row.id : ""
this.formVisible = true
this.$nextTick(() => {
this.$refs.JNPFForm.init(id, isDetail,this.list)
this.$refs.JNPFForm.init(id, isDetail, this.list)
})
},
exportData() {
@ -463,7 +443,7 @@
})
},
download(data) {
let query = {...data, ...this.listQuery, ...this.query,menuId:this.menuId}
let query = { ...data, ...this.listQuery, ...this.query, menuId: this.menuId }
request({
url: `/api/example/YysMaterialRequirementPlan/Actions/Export`,
method: 'post',
@ -476,10 +456,10 @@
})
},
search() {
this.listQuery.currentPage=1
this.listQuery.pageSize=20
this.listQuery.sort="desc"
this.listQuery.sidx="orderDate"
this.listQuery.currentPage = 1
this.listQuery.pageSize = 20
this.listQuery.sort = "desc"
this.listQuery.sidx = "orderDate"
this.initData()
},
refresh(isrRefresh) {
@ -495,5 +475,5 @@
if (isrRefresh) this.reset()
},
}
}
}
</script>

@ -80,7 +80,7 @@
<JnpfNumber v-model="scope.row.sort" :thousands="false" />
</template>
</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">
{{ scope.row.post }}
</template>

Loading…
Cancel
Save