11/19 器械申购管理页面优化

20240912_adapter
wangwei 5 months ago
parent 04b69d06d7
commit b13a4528f7

@ -1,7 +1,7 @@
<template> <template>
<div> <div>
<el-card class="el-card"> <el-card class="el-card">
<el-form v-if="queryList && queryList.length > 0 && showSearch" :model="filterQuery" class="query-form" label-width="100px"> <el-form v-if="queryList && queryList.length > 0 " :model="filterQuery" class="query-form" label-width="100px">
<!-- <el-row>--> <!-- <el-row>-->
<!-- <el-col :span="8">--> <!-- <el-col :span="8">-->
<!-- <el-form-item label="申购单号:">--> <!-- <el-form-item label="申购单号:">-->
@ -83,6 +83,7 @@
<!-- </el-row>--> <!-- </el-row>-->
<el-row style=" display:flex; flex-wrap: wrap; "> <el-row style=" display:flex; flex-wrap: wrap; ">
<template v-for="(item, index) in queryList" > <template v-for="(item, index) in queryList" >
<div v-if="showSearch || item.isImport">
<el-form-item v-if="item.columnType == 'input' && executeEval(row,item.expression,true)" :label="item.columnDesc+`:`" :key="item.id"> <el-form-item v-if="item.columnType == 'input' && executeEval(row,item.expression,true)" :label="item.columnDesc+`:`" :key="item.id">
<el-input <el-input
v-model="filterQuery[item.columnName]" v-model="filterQuery[item.columnName]"
@ -144,13 +145,14 @@
:placeholder="item.columnDesc" :placeholder="item.columnDesc"
></el-date-picker> ></el-date-picker>
</el-form-item> </el-form-item>
</div>
</template> </template>
</el-row> </el-row>
</el-form> </el-form>
<div class="top-right-btn"> <div class="top-right-btn">
<el-button-group style="display:flex;"> <el-button-group style="display:flex;">
<el-button icon="el-icon-view" type="primary" @click="hideSearch">/</el-button> <el-button icon="el-icon-view" type="primary" @click="hideSearch"></el-button>
<el-button type="primary" icon="el-icon-refresh" @click="onReset"></el-button> <el-button type="primary" icon="el-icon-refresh" @click="onReset"></el-button>
<el-button type="primary" icon="el-icon-search" @click="onSubmitFind"></el-button> <el-button type="primary" icon="el-icon-search" @click="onSubmitFind"></el-button>
<el-button type="primary" icon="el-icon-plus" @click="newDistributionForm()" :loading="loading">新增单据 <el-button type="primary" icon="el-icon-plus" @click="newDistributionForm()" :loading="loading">新增单据
@ -428,7 +430,7 @@ export default {
return { return {
pageType:null, pageType:null,
defaultSort: {prop: 'createTime', order: 'desc'}, defaultSort: {prop: 'createTime', order: 'desc'},
showSearch: true, showSearch: false,
pId: null, pId: null,
filterQuery: { filterQuery: {
billAction: null, billAction: null,
@ -544,7 +546,8 @@ export default {
targetDeptCode: this.invCodebe, targetDeptCode: this.invCodebe,
targetInvCode: null, targetInvCode: null,
invCode: this.$store.getters.locInvCode, invCode: this.$store.getters.locInvCode,
pageType: this.pageType pageType: this.pageType,
productType: 1,
}; };
this.initActDateRange() this.initActDateRange()
if (deptCode != this.invCodebe) { if (deptCode != this.invCodebe) {

@ -1,7 +1,7 @@
<template> <template>
<div> <div>
<el-card class="el-card"> <el-card class="el-card">
<el-form v-if="queryList && queryList.length > 0 && showSearch" :model="filterQuery" class="query-form" label-width="100px"> <el-form v-if="queryList && queryList.length > 0 " :model="filterQuery" class="query-form" label-width="100px">
<!-- <el-row>--> <!-- <el-row>-->
<!-- <el-col :span="8">--> <!-- <el-col :span="8">-->
<!-- <el-form-item label="申购单号">--> <!-- <el-form-item label="申购单号">-->
@ -84,6 +84,7 @@
<!-- </el-row>--> <!-- </el-row>-->
<el-row style=" display:flex; flex-wrap: wrap; "> <el-row style=" display:flex; flex-wrap: wrap; ">
<template v-for="(item, index) in queryList" > <template v-for="(item, index) in queryList" >
<div v-if="showSearch || item.isImport">
<el-form-item v-if="item.columnType == 'input' && executeEval(row,item.expression,true)" :label="item.columnDesc+`:`" :key="item.id"> <el-form-item v-if="item.columnType == 'input' && executeEval(row,item.expression,true)" :label="item.columnDesc+`:`" :key="item.id">
<el-input <el-input
v-model="filterQuery[item.columnName]" v-model="filterQuery[item.columnName]"
@ -145,13 +146,14 @@
:placeholder="item.columnDesc" :placeholder="item.columnDesc"
></el-date-picker> ></el-date-picker>
</el-form-item> </el-form-item>
</div>
</template> </template>
</el-row> </el-row>
</el-form> </el-form>
<div class="top-right-btn"> <div class="top-right-btn">
<el-button-group style="display:flex;"> <el-button-group style="display:flex;">
<el-button icon="el-icon-view" type="primary" @click="hideSearch">/</el-button> <el-button icon="el-icon-view" type="primary" @click="hideSearch"></el-button>
<el-button type="primary" icon="el-icon-refresh" @click="onReset"></el-button> <el-button type="primary" icon="el-icon-refresh" @click="onReset"></el-button>
<el-button type="primary" icon="el-icon-search" @click="onSubmitFind"></el-button> <el-button type="primary" icon="el-icon-search" @click="onSubmitFind"></el-button>
</el-button-group> </el-button-group>
@ -423,7 +425,7 @@ export default {
return { return {
pageType:null, pageType:null,
defaultSort: {prop: 'createTime', order: 'desc'}, defaultSort: {prop: 'createTime', order: 'desc'},
showSearch: true, showSearch: false,
filterQuery: { filterQuery: {
billAction: null, billAction: null,
billNo: "", billNo: "",
@ -537,7 +539,8 @@ export default {
editStatus: 1, editStatus: 1,
targetDeptCode: this.invCodebe, targetDeptCode: this.invCodebe,
targetInvCode: null, targetInvCode: null,
pageType: this.$route.query.pageType pageType: this.$route.query.pageType,
productType: 1,
}; };
if (deptCode != this.invCodebe) { if (deptCode != this.invCodebe) {
this.getInvList(this) this.getInvList(this)

@ -1,7 +1,7 @@
<template> <template>
<div> <div>
<el-card class="el-card"> <el-card class="el-card">
<el-form v-if="queryList && queryList.length > 0 && showSearch" :model="filterQuery" class="query-form" label-width="100px"> <el-form v-if="queryList && queryList.length > 0 " :model="filterQuery" class="query-form" label-width="100px">
<!-- <el-row>--> <!-- <el-row>-->
<!-- <el-col :span="8">--> <!-- <el-col :span="8">-->
<!-- <el-form-item label="申购单号">--> <!-- <el-form-item label="申购单号">-->
@ -97,6 +97,7 @@
<!-- </el-row>--> <!-- </el-row>-->
<el-row style=" display:flex; flex-wrap: wrap; "> <el-row style=" display:flex; flex-wrap: wrap; ">
<template v-for="(item, index) in queryList" > <template v-for="(item, index) in queryList" >
<div v-if="showSearch || item.isImport">
<el-form-item v-if="item.columnType == 'input' && executeEval(row,item.expression,true)" :label="item.columnDesc+`:`" :key="item.id"> <el-form-item v-if="item.columnType == 'input' && executeEval(row,item.expression,true)" :label="item.columnDesc+`:`" :key="item.id">
<el-input <el-input
v-model="filterQuery[item.columnName]" v-model="filterQuery[item.columnName]"
@ -170,13 +171,14 @@
:placeholder="item.columnDesc" :placeholder="item.columnDesc"
></el-date-picker> ></el-date-picker>
</el-form-item> </el-form-item>
</div>
</template> </template>
</el-row> </el-row>
</el-form> </el-form>
<div class="top-right-btn"> <div class="top-right-btn">
<el-button-group style="display:flex;"> <el-button-group style="display:flex;">
<el-button icon="el-icon-view" type="primary" @click="hideSearch">/</el-button> <el-button icon="el-icon-view" type="primary" @click="hideSearch"></el-button>
<el-button type="primary" icon="el-icon-refresh" @click="onReset"></el-button> <el-button type="primary" icon="el-icon-refresh" @click="onReset"></el-button>
<el-button type="primary" icon="el-icon-search" @click="onSubmitFind"></el-button> <el-button type="primary" icon="el-icon-search" @click="onSubmitFind"></el-button>
</el-button-group> </el-button-group>
@ -487,7 +489,7 @@ export default {
return { return {
pageType:null, pageType:null,
defaultSort: {prop: 'createTime', order: 'desc'}, defaultSort: {prop: 'createTime', order: 'desc'},
showSearch: true, showSearch: false,
filterQuery: { filterQuery: {
billAction: null, billAction: null,
billNo: "", billNo: "",
@ -642,7 +644,8 @@ export default {
editStatus: 1, editStatus: 1,
invCode: this.$store.getters.locInvCode, invCode: this.$store.getters.locInvCode,
targetDeptCode: this.invCodebe, targetDeptCode: this.invCodebe,
pageType: this.$route.query.pageType pageType: this.$route.query.pageType,
productType: 1,
}; };
if (targetDeptCode != this.invCodebe) { if (targetDeptCode != this.invCodebe) {
this.getInvList(this) this.getInvList(this)

@ -1,7 +1,7 @@
<template> <template>
<div> <div>
<el-card class="el-card"> <el-card class="el-card">
<el-form v-if="queryList && queryList.length > 0 && showSearch" :model="filterQuery" class="query-form" label-width="100px" > <el-form v-if="queryList && queryList.length > 0 " :model="filterQuery" class="query-form" label-width="100px" >
<!-- <el-row>--> <!-- <el-row>-->
<!-- <el-col :span="8">--> <!-- <el-col :span="8">-->
<!-- <el-form-item label="申购单号:">--> <!-- <el-form-item label="申购单号:">-->
@ -95,6 +95,7 @@
<!-- </el-row>--> <!-- </el-row>-->
<el-row style=" display:flex; flex-wrap: wrap; "> <el-row style=" display:flex; flex-wrap: wrap; ">
<template v-for="(item, index) in queryList" > <template v-for="(item, index) in queryList" >
<div v-if="showSearch || item.isImport">
<el-form-item v-if="item.columnType == 'input' && executeEval(row,item.expression,true)" :label="item.columnDesc+`:`" :key="item.id"> <el-form-item v-if="item.columnType == 'input' && executeEval(row,item.expression,true)" :label="item.columnDesc+`:`" :key="item.id">
<el-input <el-input
v-model="filterQuery[item.columnName]" v-model="filterQuery[item.columnName]"
@ -168,13 +169,14 @@
:placeholder="item.columnDesc" :placeholder="item.columnDesc"
></el-date-picker> ></el-date-picker>
</el-form-item> </el-form-item>
</div>
</template> </template>
</el-row> </el-row>
</el-form> </el-form>
<div class="top-right-btn"> <div class="top-right-btn">
<el-button-group style="display:flex;"> <el-button-group style="display:flex;">
<el-button icon="el-icon-view" type="primary" @click="hideSearch">/</el-button> <el-button icon="el-icon-view" type="primary" @click="hideSearch"></el-button>
<el-button type="primary" icon="el-icon-refresh" @click="onReset"></el-button> <el-button type="primary" icon="el-icon-refresh" @click="onReset"></el-button>
<el-button type="primary" icon="el-icon-search" @click="onSubmitFind"></el-button> <el-button type="primary" icon="el-icon-search" @click="onSubmitFind"></el-button>
</el-button-group> </el-button-group>
@ -469,7 +471,7 @@ export default {
return { return {
pageType:null, pageType:null,
defaultSort: {prop: 'createTime', order: 'desc'}, defaultSort: {prop: 'createTime', order: 'desc'},
showSearch: true, showSearch: false,
filterQuery: { filterQuery: {
billAction: null, billAction: null,
billNo: "", billNo: "",
@ -621,7 +623,8 @@ export default {
type: 1, type: 1,
editStatus: 1, editStatus: 1,
deptCode: this.invCodebe, deptCode: this.invCodebe,
pageType: this.$route.query.pageType pageType: this.$route.query.pageType,
productType: 1,
}; };
if (deptCode != this.invCodebe) { if (deptCode != this.invCodebe) {
this.getInvList(this) this.getInvList(this)

@ -1,72 +1,152 @@
<template> <template>
<div> <div>
<el-card class="el-card"> <el-card class="el-card">
<el-form :model="filterQuery" class="query-form" label-width="100px" v-if="showSearch"> <!--<el-form :model="filterQuery" class="query-form" label-width="100px" v-if="showSearch">-->
<el-row> <!-- <el-row>-->
<el-col :span="6"> <!-- <el-col :span="6">-->
<el-form-item label="申购单号:"> <!-- <el-form-item label="申购单号:">-->
<el-input v-model="filterQuery.billNo" style="width: 90%" placeholder="请输入单据号" clearable></el-input> <!-- <el-input v-model="filterQuery.billNo" style="width: 90%" 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="DI/物资编码:"> <!-- <el-form-item label="DI/物资编码:">-->
<el-input v-model="filterQuery.nameCode" style="width: 90%" placeholder="请输入DI/物资编码" <!-- <el-input v-model="filterQuery.nameCode" style="width: 90%" placeholder="请输入DI/物资编码"-->
clearable></el-input> <!-- 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="物资名称:">-->
<el-input v-model="filterQuery.productName" style="width: 90%" placeholder="请输入物资名称" <!-- <el-input v-model="filterQuery.productName" style="width: 90%" placeholder="请输入物资名称"-->
clearable></el-input> <!-- 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="规格型号:">-->
<el-input v-model="filterQuery.spec" style="width: 90%" placeholder="请输入规格型号" clearable></el-input> <!-- <el-input v-model="filterQuery.spec" style="width: 90%" placeholder="请输入规格型号" clearable></el-input>-->
</el-form-item> <!-- </el-form-item>-->
</el-col> <!-- </el-col>-->
</el-row> <!-- </el-row>-->
<el-row> <!-- <el-row>-->
<el-col :span="6"> <!-- <el-col :span="6">-->
<el-form-item label="注册/备案号:"> <!-- <el-form-item label="注册/备案号:">-->
<el-input v-model="filterQuery.zczbhhzbapzbh" style="width: 90%" placeholder="请输入注册/备案号" <!-- <el-input v-model="filterQuery.zczbhhzbapzbh" style="width: 90%" placeholder="请输入注册/备案号"-->
clearable></el-input> <!-- 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="生产企业:">-->
<el-input v-model="filterQuery.manufactory" style="width: 90%" placeholder="请输入生产企业" <!-- <el-input v-model="filterQuery.manufactory" style="width: 90%" placeholder="请输入生产企业"-->
clearable></el-input> <!-- 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="创建时间:">-->
<el-date-picker <!-- <el-date-picker-->
:picker-options="pickerOptions" <!-- :picker-options="pickerOptions"-->
v-model="actDateRange" <!-- v-model="actDateRange"-->
type="daterange" <!-- type="daterange"-->
format="yyyy 年 MM 月 dd 日" <!-- format="yyyy 年 MM 月 dd 日"-->
style="width: 90%" <!-- style="width: 90%"-->
value-format="yyyy-MM-dd" <!-- value-format="yyyy-MM-dd"-->
range-separator="至" <!-- range-separator="至"-->
start-placeholder="开始日期" <!-- start-placeholder="开始日期"-->
end-placeholder="结束日期" <!-- end-placeholder="结束日期"-->
> <!-- >-->
</el-date-picker> <!-- </el-date-picker>-->
</el-form-item> <!-- </el-form-item>-->
</el-col> <!-- </el-col>-->
<!-- </el-row>-->
<!--</el-form>-->
<el-form v-if="queryList && queryList.length > 0 " :model="filterQuery" class="query-form" label-width="100px" >
<el-row style=" display:flex; flex-wrap: wrap; ">
<template v-for="(item, index) in queryList" >
<div v-if="showSearch || item.isImport">
<el-form-item v-if="item.columnType == 'input' && executeEval(row,item.expression,true)" :label="item.columnDesc+`:`" :key="item.id">
<el-input
v-model="filterQuery[item.columnName]"
:placeholder="item.columnDesc"
:disabled="executeEval(null,item.disabledFuc,false)"
@keyup.enter.native="executeFuc($event,'5',item.clickFuc)"
clearable
></el-input>
</el-form-item>
<el-form-item v-if="item.columnType == 'select' && executeEval(row,item.expression,true)" :label="item.columnDesc+`:`">
<el-select v-model="filterQuery[item.columnName]"
:placeholder="item.columnDesc"
:disabled="executeEval(null,item.disabledFuc,false)"
clearable>
<el-option
v-for="dict in item.lableRuleObj"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item v-if="item.columnType == 'selectServer' && executeEval(row,item.expression,true)" :label="item.columnDesc+`:`">
<el-select
v-model="filterQuery[item.columnName]"
:placeholder="item.columnDesc"
:disabled="executeEval(null,item.disabledFuc,false)"
filterable
remote
:remote-method="(query) => executeFuc(query,'5',item.clickFuc)"
clearable>
<el-option
v-for="item in options[item.clickFuc]"
:key="item.code"
:label="item.label"
:value="item.code"
/>
</el-select>
</el-form-item>
<el-form-item v-if="item.columnType == 'datePicker' && item.columnName == 'actDateRange' && executeEval(row,item.expression,true)" :label="item.columnDesc+`:`">
<el-date-picker
:picker-options="pickerOptions"
v-model="actDateRange"
type="daterange"
format="yyyy 年 MM 月 dd 日"
value-format="yyyy-MM-dd"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
></el-date-picker>
</el-form-item>
<el-form-item v-if="item.columnType == 'datePicker' && item.columnName == 'actAuditDateRange' && executeEval(row,item.expression,true)" :label="item.columnDesc+`:`">
<el-date-picker
:picker-options="pickerOptions"
v-model="actAuditDateRange"
type="daterange"
format="yyyy 年 MM 月 dd 日"
value-format="yyyy-MM-dd"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
></el-date-picker>
</el-form-item>
<el-form-item v-if="item.columnType == 'date' && executeEval(row,item.expression,true)" :label="item.columnDesc+`:`">
<el-date-picker
v-model="filterQuery[item.columnName]"
:style="`width:${item.width+'px'}`"
value-format="yyyy-MM-dd"
:disabled="executeEval(null,item.disabledFuc,false)"
type="date"
:placeholder="item.columnDesc"
></el-date-picker>
</el-form-item>
</div>
</template>
</el-row> </el-row>
</el-form> </el-form>
<div class="top-right-btn"> <div class="top-right-btn">
<el-button-group style="display:flex;"> <el-button-group style="display:flex;">
<el-button icon="el-icon-view" type="primary" @click="hideSearch">/</el-button> <el-button icon="el-icon-view" type="primary" @click="hideSearch"></el-button>
<el-button type="primary" icon="el-icon-refresh" @click="onReset"></el-button> <el-button type="primary" icon="el-icon-refresh" @click="onReset"></el-button>
<el-button type="primary" icon="el-icon-search" @click="onSubmitFind"></el-button> <el-button type="primary" icon="el-icon-search" @click="onSubmitFind"></el-button>
</el-button-group> </el-button-group>
@ -96,16 +176,23 @@
></pagination> ></pagination>
</el-card> </el-card>
</div> </div>
</template> </template>
<script> <script>
import {getDetailList} from "@/api/purchase/purApply"; import {getDetailList} from "@/api/purchase/purApply";
import { executeFuc, getHead } from '@/utils/customConfig'
export default { export default {
data() { data() {
return { return {
//
tableHeader:[],
queryList:[],
fromList:[],
pageType:null, pageType:null,
showSearch: true, showSearch: false,
filterQuery: { filterQuery: {
billNo: null, billNo: null,
productId: null, productId: null,
@ -191,6 +278,17 @@ export default {
}, },
methods: { methods: {
executeFuc(row,type,clickFuc,value){
return executeFuc(this,row,type,clickFuc,value);
},
executeEval(row,expression,defaultRet){
if(expression){
return eval(expression);
}
return defaultRet;
},
onReset() { onReset() {
this.filterQuery = { this.filterQuery = {
billNo: null, billNo: null,
@ -203,7 +301,8 @@ export default {
endDate: null, endDate: null,
page: 1, page: 1,
limit: 10, limit: 10,
pageType: this.$route.query.pageType pageType: this.$route.query.pageType,
productType: 1,
}; };
this.actDateRange = []; this.actDateRange = [];
this.getList(); this.getList();
@ -259,6 +358,13 @@ export default {
mounted() { mounted() {
}, },
created() { created() {
getHead("pureApplySearchDetails-qxmx","1").then((re) => {
//
this.tableObj = re.data;
this.tableHeader = re.data.tableList;
this.queryList = re.data.queryList;
this.fromList = re.data.fromList;
});
this.getList(); this.getList();
this.pageType = this.$route.query.pageType; this.pageType = this.$route.query.pageType;
}, },

Loading…
Cancel
Save