4/16 自动抽查设置主体 (记录小bug待修改)

20240109-yw
wangwei 12 months ago
parent 92b2b8e22e
commit e34e03cce6

@ -0,0 +1,37 @@
import axios from "@/utils/request";
//查询
export function listSet(query) {
return axios({
url: "/udi/autoSet/list",
method: "get",
params: query
});
}
// 保存
export function saveSet(data, formName, method = "post") {
let url =
formName !== "edit"
? "/udi/autoSet/save"
: "/udi/autoSet/edit";
return axios({
url: url,
method: method,
data: data
});
}
// 删除
export function deleteSet(data) {
return axios({
url: "/udi/autoSet/delete",
method: "post",
data: data
});
}

@ -0,0 +1,41 @@
import axios from "@/utils/request";
//查询 -- 后端controller 带写
export function listSetDetail(query) {
return axios({
url: "/udi/autoSetDetail/list",
method: "get",
params: query
});
}
// 保存
export function saveSetDetail(data, formName, method = "post") {
let url =
formName !== "edit"
? "/udi/autoSetDetail/save"
: "/udi/autoSetDetail/edit";
return axios({
url: url,
method: method,
data: data
});
}
// 删除
export function deleteSetDetail(data) {
return axios({
url: "/udi/autoSetDetail/delete",
method: "post",
data: data
});
}
export function getUdiProduct(query) {
return axios({
url: "/udi/autoSetDetail/getUdiProduct",
method: "get",
params: query
});
}

@ -309,12 +309,13 @@
:closeDialog="closeCertDialog"
:inputQuery="inputCertQuery"
:formName="formCertName"
:rules="rules"
></setDetailDialog>
</el-dialog>
<el-dialog
:title="新增配置"
:title="formMap[formName]"
:visible.sync="addDialogVisible"
:before-close="close"
width="60%"

@ -1,6 +1,6 @@
<template>
<div>
<el-form :model="inputQuery" label-width="120px" >
<el-form :model="inputQuery" label-width="120px" :rules="rules">
<el-card>
<el-row>
<div style="margin: 0px 60px 10px auto; height: 35px; float: right;">
@ -185,7 +185,7 @@
</el-form>
<el-dialog
:title="选择产品"
:title="titlea"
:visible.sync="productVisible"
:before-close="close"
width="60%"
@ -230,6 +230,7 @@ export default {
},
data() {
return {
titlea:"选择产品",
tableHeader:[],
query: {
page: 1,
@ -245,6 +246,8 @@ export default {
options: {
},
required:true,
inputQuery:{},
productVisible:false,
relationId: null,
actDateRange: [],
@ -275,6 +278,14 @@ export default {
},
],
},
rules: {
title: [
{required: true, message: '请输入活动名称', trigger: 'blur'},
],
frequency: [
{required: true, message: '请输入周期', trigger: 'blur'},
],
}
}
},
methods: {
@ -375,19 +386,19 @@ export default {
this.inputQuery.startDate = null;
this.inputQuery.endDate = null;
}
saveSet(this.inputQuery,"add").then((response) => {
if(response.code == 20000){
this.inputQuery.id = response.data.id;
this.relationId = this.inputQuery.id;
this.productVisible = true;
}else{
this.$message.error(response.message);
}
saveSet(this.inputQuery,"add").then((response) => {
if(response.code == 20000){
this.$message.error("添加成功");
this.inputQuery.id = response.data.id;
this.relationId = this.inputQuery.id;
this.productVisible = true;
}else {
this.$message.error(response.message);
}
}).catch(() => {
this.$message.error("添加失败");
});
})
.catch(() => {
this.$message.error("添加失败");
});
}else{
this.relationId = this.inputQuery.id;
this.productVisible = true;

@ -0,0 +1,259 @@
<template>
<div>
<el-card class="el-card">
<div>
<el-form :model="filterQuery" label-width="120px" v-show="showSearch">
<el-row>
<el-col :span="8">
<el-form-item label="产品编码:" class="query-form-item">
<el-input v-model="filterQuery.unionCode" style="width: 90%" placeholder="请输入DI/医保编码/商品条码"
clearable="true"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="产品通用名称:" class="query-form-item">
<el-input v-model="filterQuery.cpmctymc" style="width: 90%" placeholder="请输入物资名称"
clearable="true"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="规格型号:" class="query-form-item">
<el-input v-model="filterQuery.ggxh" style="width: 90%" placeholder="请输入规格型号" clearable="true"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<el-form-item label="生产企业:" class="query-form-item">
<el-input v-model="filterQuery.ylqxzcrbarmc" style="width: 90%" placeholder="请输入生产企业/注册备案人"
clearable="true"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="注册备案号:" class="query-form-item">
<el-input v-model="filterQuery.zczbhhzbapzbh" style="width: 90%" placeholder="请输入注册备案号"
clearable="true"></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div class="top-right-btn">
<el-button-group style="display:flex;">
<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-search" @click="searchList"></el-button>
<el-button type="primary" icon="el-icon-bottom-left" @click="checkCombine"
:loading="combineLoading"
>选入</el-button>
</el-button-group>
</div>
<el-divider style="margin: 15px"></el-divider>
<el-table v-loading="loading" :data="list" key="1" style="width: 100%"
@selection-change="handleSelectionUdiChange"
border>
<!--选择当前行判断-->
<!--:selectable="checkSelectable"-->
<el-table-column
type="selection"
width="55"
></el-table-column>
<el-table-column label="序号" type="index"></el-table-column>
<el-table-column label="产品通用名称" prop="cpmctymc" show-overflow-tooltip></el-table-column>
<el-table-column label="规格型号" prop="ggxh" show-overflow-tooltip></el-table-column>
<el-table-column label="医疗器械注册人" prop="ylqxzcrbarmc" show-overflow-tooltip></el-table-column>
<el-table-column label="注册/备案号" prop="zczbhhzbapzbh" show-overflow-tooltip></el-table-column>
<el-table-column label="产品DI标识" prop="nameCode" show-overflow-tooltip></el-table-column>
</el-table>
</div>
</el-card>
</div>
</template>
<script>
import {saveSetDetail,getUdiProduct} from "@/api/udi/autoSetDetail";
export default {
name: "closeDialog",
props: {
closeDialog: {
type: Function,
required: true,
},
relationId: {
type: Object,
required: true,
}
},
data() {
return {
filterQuery: {
unionCode: null,
udiCode: null,
ylqxzcrbarmc: "",
cpmctymc: "",
nameCode: "",
ggxh: null,
page: 1,
limit: 20,
thrPiId: null,
filterType: null,
companyName: null,
companyIdFk: null,
},
cpmctymc1: "",
combineLoading: false,
combineQuery: {
setFk: null,
products: [],
},
checked: true,
udidlList: [],
erpList: [],
pageTotal: 0,
total: 0,
currentRow: null,
fromOptions: [],
loading: false,
erpLloading: false,
multipleUdiSelection: [],
selectDialog: false,
diDetails: null,
showSearch: true,
};
},
methods: {
onReset() {
this.$router.push({
path: "",
});
this.filterQuery = {
lockStatus: null,
unionCode: null,
udiCode: null,
ylqxzcrbarmc: "",
cpmctymc: "",
thrPiId: null,
nameCode: "",
ggxh: null,
page: 1,
limit: 20,
addType: 1,
};
this.actDateRange = [];
this.udidlList = [];
},
clear() {
this.unionQuery.ylqxzcrbarmc == null;
this.unionQuery.cpmctymc = null;
},
searchList() {
this.filterQuery.page = 1;
this.getList();
},
getList() {
this.loading = true;
this.filterQuery.setFk = this.relationId;
console.log("过滤条件是事实是私事是",this.filterQuery)
getUdiProduct(this.filterQuery)
.then((response) => {
this.loading = false;
this.list = response.data.list || [];
this.total = response.data.total || 0;
})
.catch(() => {
this.loading = false;
this.list = [];
this.total = 0;
});
},
hideSearch() {
this.showSearch = !this.showSearch;
},
// checkSelectable(row) {
// return !row.check;
// },
diDetail(row) {
this.diDetails = row;
this.selectDialog = true;
},
handleCurrentChange(val) {
this.unionQuery.page = val;
this.getList();
},
tableRowClassName({row, rowIndex}) {
if (row.check) return "warning-row";
return "";
},
handleErpChange(val) {
this.cpmctymc1 = val.cpmctymc;
this.currentRow = val;
},
intentBack() {
this.closeDialog();
},
checkCombine() {
this.checkedUdi();
},
checkedUdi() {
let selectData = this.multipleUdiSelection;
console.log("打印出当前的",selectData);
let selected = null;
if (this.multipleUdiSelection.length == 0) {
this.$message.warning('请选入产品!');
return;
} else {
selectData.forEach((obj) => {
if (obj.check) {
selected = obj;
}
this.combineQuery.products.push(obj);
});
}
console.log("hhshhshshhshshAelectd",selected)
//
// if (selected != null) {
// this.$message.warning("" + selected.cpmctymc + "");
// return;
// }
this.combineLoading = true;
this.combine();
},
combine() {
this.combineQuery.setFk = this.relationId;
saveSetDetail(this.combineQuery,"add").then((response) => {
if(response.code == 20000){
this.closeDialog();
}else{
this.$message.error(response.message);
}
})
.catch(() => {
this.$message.error("添加失败");
});
},
handleSelectionUdiChange(val) {
this.multipleUdiSelection = val;
}
},
components: {
},
created() {
}
};
</script>

@ -0,0 +1,486 @@
<template>
<div>
<el-form :model="inputQuery" label-width="120px" >
<el-card>
<el-row>
<div style="margin: 0px 60px 10px auto; height: 35px; float: right;">
<el-button-group>
<el-button
type="primary"
ref="mainTable"
@click.native.stop="addSet()"
:loading="loading"
>保存
</el-button
>
</el-button-group>
</div>
</el-row>
<el-row :gutter="20" class="el-row" type="flex">
<el-col span="10" class="el-col" type="flex">
<el-form-item prop="title" label="标题:" class="query-form-item">
<el-input
style="width: 80%"
size="small"
placeholder="请输入标题"
v-model="inputQuery.title"
></el-input>
</el-form-item>
</el-col>
<el-col span="10" class="el-col" type="flex">
<el-form-item prop="frequency" label="周期:" class="query-form-item">
<el-input
style="width: 80%"
size="small"
type="number"
placeholder="请输入周期"
v-model="inputQuery.frequency"
></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20" class="el-row" type="flex">
<el-col class="el-col" span="20" type="flex">
<el-form-item label="时间范围:" class="query-form-item">
<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-col>
</el-row>
<el-row :gutter="20" class="el-row" type="flex">
<el-col class="el-col" span="20" type="flex">
<el-form-item prop="remark" label="备注:" class="query-form-item">
<el-input
style="width: 100%"
size="small"
placeholder="请输入备注"
v-model="inputQuery.remark"
></el-input>
</el-form-item>
</el-col>
</el-row>
</el-card>
<el-card>
<el-row>
<div style="margin: 0px 60px 10px auto; height: 35px; float: right;">
<el-button-group>
<el-button
type="primary"
ref="mainTable"
@click.native.stop="selectProductFunction()"
:loading="loading"
>产品录入
</el-button
>
</el-button-group>
</div>
</el-row>
<el-table v-loading="loading" :data="detailList" style="width: 100%;"
:row-class-name="tableRowClassName"
border
:row-style="rowStyle"
max-height="350" height="350" ref="multipleTable">
<el-table-column label="序号" type="index" width="50"></el-table-column>
<el-table-column width="150"
label="产品品种"
prop="cpmctymc"
show-overflow-tooltip
></el-table-column>
<el-table-column width="150"
label="规格型号"
prop="ggxh"
show-overflow-tooltip
></el-table-column>
<el-table-column width="120" label="注册/备案号">
<template slot-scope="scope">
<el-input v-model="scope.row.zczbhhzbapzbh"
:disabled="scope.row.id !== selectedIndex"
placeholder="请输入注册/备案号"></el-input>
</template>
</el-table-column>
<el-table-column width="120" label="医疗器械注册人">
<template slot-scope="scope">
<el-input v-model="scope.row.ylqxzcrbarmc"
:disabled="scope.row.id !== selectedIndex"
placeholder="请输入医疗器械注册人"></el-input>
</template>
</el-table-column>
<el-table-column width="120" label="企业类型">
<template slot-scope="scope">
<el-select v-model="scope.row.bussinessType" placeholder="请选择企业类型" :disabled="scope.row.id !== selectedIndex">
<el-option label="生产企业" :value="1"></el-option>
<el-option label="流通企业" :value="2"></el-option>
<el-option label="医疗机构" :value="3"></el-option>
</el-select>
</template>
</el-table-column>
<el-table-column width="120" label="注册企业名称">
<template slot-scope="scope">
<el-select
v-model="scope.row.companyName"
placeholder="请选择注册企业名称"
filterable
remote
:disabled="scope.row.id !== selectedIndex"
remote-method="findMethod"
clearable>
<el-option
v-for="item in fromOptions"
:key="item.label"
:label="item.label"
:value="item.label"
>
<span style="float: left">{{ item.label }}</span></el-option>
</el-select>
</template>
</el-table-column>
<el-table-column width="120" label="di/标识">
<template slot-scope="scope">
<el-input v-model="scope.row.nameCode"
:disabled="scope.row.id !== selectedIndex"
placeholder="请输入di/标识"></el-input>
</template>
</el-table-column>
<el-table-column width="120" label="省">
<template slot-scope="scope">
<el-input v-model="scope.row.provinceCode"
:disabled="scope.row.id !== selectedIndex"
placeholder="请输入省"></el-input>
</template>
</el-table-column>
<el-table-column width="120" label="市">
<template slot-scope="scope">
<el-input v-model="scope.row.cityCode"
:disabled="scope.row.id !== selectedIndex"
placeholder="请输入市"></el-input>
</template>
</el-table-column>
<el-table-column label="操作" width="160" fixed="right">
<template slot-scope="scope">
<el-button type="text" size="small" v-if="scope.row.id == selectedIndex"
@click.native="saveChange(scope.row)">保存
</el-button>
<el-button type="text" size="small" v-if="scope.row.id != selectedIndex"
@click.native="rowChange(scope.row)">编辑
</el-button>
<el-button type="text" size="small" @click.native="deleteDetail(scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
<div style='text-align: center; margin-bottom: 10px;margin-top: 18px ;'>
<el-button @click="closeDialog"></el-button>
</div>
</el-card>
</el-form>
<el-dialog
:title="titlea"
:visible.sync="productVisible"
:before-close="close"
width="60%"
v-if="productVisible"
append-to-body
@close='closeProductDialog'
:close-on-click-modal="false"
:close-on-press-escape="false"
>
<setSelecProduct
:closeDialog="closeProductDialog"
:relationId="relationId"
></setSelecProduct>
</el-dialog>
</div>
</template>
<script>
import {saveSet} from "@/api/udi/autoSet";
import {listSetDetail,deleteSetDetail,saveSetDetail} from "@/api/udi/autoSetDetail";
import setSelecProduct from "@/views/udi/trace/auto/AutosetSelecProduct";
import { getHead,executeFuc} from "@/utils/customConfig";
import { seachCompanyOptimize } from "@/api/basic/udiRlCompany";
export default {
name: "traceAutoDialog",
props: {
closeDialog: {
type: Function,
required: true,
},
formName: {
type: Object,
required: true,
},
inputQuery: {
type: Object,
required: true,
},
},
data() {
return {
tableHeader:[],
query: {
page: 1,
limit: 10,
setFk: this.inputQuery.id,
},
selectedIndex: null,
queryList:[],
fromList:[],
tableObj:[],
invList:[],
detailList:[],
options: {
},
titlea:"选择产品",
productVisible:false,
relationId: null,
actDateRange: [],
pickerOptions: {
shortcuts: [
{
text: "本月",
onClick(picker) {
const end = new Date();
const start = new Date();
start.setDate(1);
end.setMonth(end.getMonth() + 1);
end.setDate(0);
picker.$emit("pick", [start, end]);
},
},
{
text: "下一个月",
onClick(picker) {
const end = new Date();
const start = new Date();
start.setMonth(start.getMonth() + 1);
start.setDate(1);
end.setMonth(end.getMonth() + 2);
end.setDate(0);
picker.$emit("pick", [start, end]);
},
},
],
},
}
},
methods: {
tableRowClassName({row, rowIndex}) {
row.index = rowIndex;
},
rowStyle({row, rowIndex}) {
let rowBackground = {};
if (!this.$isNotBlank(row.supId) || !this.$isNotBlank(row.bindRlFk)) {
rowBackground.color = '#f60303';
return rowBackground;
}
if (this.viewType == 1)
return null;
if (!row.checkSuccess) {
rowBackground.color = '#f60303';
}
return rowBackground;
},
getOrderDetails() {
if(!this.inputQuery.id){
return
}
this.query.setFk = this.inputQuery.id
this.loading = true;
listSetDetail(this.query) //
.then((response) => {
this.detailList = response.data.list || [];
this.total = response.data.total || 0;
this.loading = false;
})
.catch(() => {
this.loading = false;
this.detailList = [];
this.total = 0;
});
},
rowChange(val) {
this.selectedIndex = val.id;
},
deleteDetail(row) {
let data = {
id: row.id,
}
this.loading = true;
this.$confirm("确认删除吗?", "提示", {
type: "warning",
})
.then(() => {
deleteSetDetail(data)
.then((response) => {
this.loading = false;
if (response.code === 20000) {
this.getOrderDetails();
} else {
this.$message.error(response.message);
}
})
.catch(() => {
this.loading = false;
this.dataList = [];
this.pageTotal = 0;
});
});
},
closeProductDialog() {
this.productVisible = false;
this.relationId = this.inputQuery.id;
this.getOrderDetails();
},
saveChange(row) {
saveSetDetail(row,"edit")
.then((response) => {
this.loading = false;
if (response.code === 20000) {
this.$message.success("保存成功!");
this.selectedIndex = null;
this.refreshPanel();
} else {
this.$message.error(response.message);
}
})
.catch(() => {
this.loading = false;
this.dataList = [];
this.pageTotal = 0;
});
},
selectProductFunction(){
if(!this.inputQuery.id){
if (this.actDateRange !== null) {
this.inputQuery.startDate = this.actDateRange[0]+" 00:00:00";
this.inputQuery.endDate = this.actDateRange[1]+" 23:59:59";
} else {
this.inputQuery.startDate = null;
this.inputQuery.endDate = null;
}
saveSet(this.inputQuery,"add").then((response) => {
console.log("hahhahahahhahahahhhahahah1",response)
if(response.code == 20000){
this.inputQuery.id = response.data.id;
this.relationId = this.inputQuery.id;
this.productVisible = true;
}else{
this.$message.error(response.message);
}
})
.catch(() => {
console.log("caicaishibushihshsshsh")
this.$message.error("添加失败");
});
}else{
this.relationId = this.inputQuery.id;
this.productVisible = true;
}
},
findMethod(query) {
this.fromOptions = [];
let cQuery = {
searchKey: query,
page: 1,
limit: 10,
};
seachCompanyOptimize(cQuery)
.then((response) => {
this.loading = false;
this.fromOptions = response.data.list || [];
})
.catch(() => {
this.loading = false;
this.fromOptions = [];
});
},
addSet(){
if (this.actDateRange !== null) {
this.inputQuery.startDate = this.actDateRange[0]+" 00:00:00";
this.inputQuery.endDate = this.actDateRange[1]+" 23:59:59";
} else {
this.inputQuery.startDate = null;
this.inputQuery.endDate = null;
}
if(!this.inputQuery.id){
saveSet(this.inputQuery,"add").then((response) => {
console.log("hahhahahahhahahahhhahahah2",response)
if(response.code == 20000){
this.$message.success("保存成功!");
console.log("jinlailalalla hh ",response.data.id)
this.inputQuery.id = response.data.id;
this.closeDialog()
}else{
this.$message.error(response.message);
}
})
}else{
saveSet(this.inputQuery,"edit").then((response) => {
if(response.code == 20000){
this.closeDialog()
}else{
this.$message.error(response.message);
}
})
.catch((e) => {
console.log(e)
this.$message.error("修改失败");
});
}
},
editCertDialog(_this,row){
_this.formName=2;
_this.inputCertQuery=row;
_this.manuCertDialogVisible = true;
},
executeFuc(row,type,clickFuc,value){
return executeFuc(this,row,type,clickFuc,value);
},
executeEval(row,expression,defaultRet){
if(expression){
return eval(expression);
}
return defaultRet;
}
},
components: {setSelecProduct},
created() {
getHead("manu-1","1").then((re) => {
//
this.tableObj = re.data;
this.tableHeader = re.data.tableList;
this.queryList = re.data.queryList;
this.fromList = re.data.fromList;
});
if(this.inputQuery.id){
this.getOrderDetails();
this.actDateRange = [this.inputQuery.startDate, this.inputQuery.endDate];
}
this.findMethod()
},
}
</script>
<style scoped>
</style>

@ -0,0 +1,237 @@
<template>
<div>
<el-card>
<el-form :model="inputQuery" label-width="120px" >
<template v-for="(itemRow, indexRow) in fromList">
<el-row :gutter="20" class="el-row" type="flex">
<template v-for="(item, index) in itemRow.list">
<el-col :span="item.width" class="el-col" type="flex">
<div class="text item">
<el-form-item v-if="item.columnType =='input'" :rules="item.checkRulesObj" :prop="item.columnName">
<span slot="label">
{{item.columnDesc}}
</span>
<el-input
v-model="inputQuery[item.columnName]"
:style="item.style"
:size="item.size"
:type="item.inputType"
:placeholder="item.columnDesc"
:disabled="item.disabled"
@input="executeFuc($event,'5',item.clickFuc)"
></el-input>
</el-form-item>
<el-form-item v-if="item.columnType =='radio'" :prop="item.columnName">
<span slot="label">
{{item.columnDesc}}
</span>
<el-radio-group :style="item.style" v-model="inputQuery[item.columnName]">
<el-radio
v-for="dict in item.lableRuleObj"
:key="parseInt(dict.value)"
:label="parseInt(dict.value)"
:disabled="item.disabled"
>{{dict.label}}</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item v-if="item.columnType =='select'" :prop="item.columnName">
<span slot="label">
{{item.columnDesc}}
</span>
<el-select v-model="inputQuery[item.columnName]" :style="item.style">
<el-option
v-for="dict in item.lableRuleObj"
:key="parseInt(dict.value)"
:label="dict.label"
:value="parseInt(dict.value)"
/>
</el-select>
</el-form-item>
<el-form-item v-if="item.columnType =='selectServer'" :prop="item.columnName">
<span slot="label">
{{item.columnDesc}}
</span>
<el-select
v-model="inputQuery[item.columnName]"
:placeholder="item.columnDesc"
:style="item.style"
@change="executeFuc($event,'5',item.clickFuc)"
:disabled="executeEval(null,item.disabledFuc,false)"
filterable
remote
:remote-method="(query) => executeFuc(query,'5',item.dataFuc)"
clearable>
<el-option
v-for="item in options[item.dataFuc]"
:key="item.label"
:label="item.label"
:value="item.label"
>
<span style="float: left">{{ item.label }}</span></el-option>
</el-select>
</el-form-item>
<el-form-item v-if="item.columnType =='date'" :rules="item.checkRulesObj" :prop="item.columnName">
<span slot="label">
{{item.columnDesc}}
</span>
<el-date-picker
v-model="inputQuery[item.columnName]"
:style="item.style"
value-format="yyyy-MM-dd"
type="date"
:placeholder="item.columnDesc"
></el-date-picker>
</el-form-item>
<el-form-item v-if="item.columnType =='datetime'" :rules="item.checkRulesObj" :prop="item.columnName">
<span slot="label">
{{item.columnDesc}}
</span>
<el-date-picker
v-model="inputQuery[item.columnName]"
:style="item.style"
value-format="yyyy-MM-dd HH:mm:ss"
type="datetime"
:placeholder="item.columnDesc"
></el-date-picker>
</el-form-item>
<el-form-item v-if="item.columnType =='treeCustom'" :prop="item.columnName">
<span slot="label">
{{item.columnDesc}}
</span>
<treeselect
v-model="inputQuery[item.columnName]"
:options="menuOptions"
:normalizer="normalizer"
:show-count="true"
:placeholder="item.columnName"
/>
</el-form-item>
</div>
</el-col>
</template>
</el-row>
</template>
<div style='text-align: center; margin-bottom: 10px;margin-top: 18px ;'>
<el-button type="primary" @click="submitInv"></el-button>
<el-button @click="closeDialog"></el-button>
</div>
</el-form>
</el-card>
</div>
</template>
<script>
import {saveSetDetail} from "@/api/udi/autoSetDetail";
import {seachCompanyOptimize} from "@/api/basic/udiRlCompany.js";
import {
getHead,executeFuc
} from "@/utils/customConfig";
export default {
name: "ylqxzcrDialog",
props: {
closeDialog: {
type: Function,
required: true,
},
formName: {
type: Object,
required: true,
},
inputQuery: {
type: Object,
required: true,
},
},
data() {
return {
tableHeader:[],
queryList:[],
fromList:[],
tableObj:[],
invList:[],
options: {
getYlqxzczh:[],
findMethod:[]
}
}
},
methods: {
submitInv(){
if(this.formName==1){
saveSetDetail(this.inputQuery,"add").then((response) => {
if(response.code == 20000){
this.closeDialog();
this.$message.error("添加成功");
}else{
this.$message.error(response.message);
}
})
.catch(() => {
this.$message.error("添加失败");
});
}else{
saveSetDetail(this.inputQuery,"edit").then((response) => {
if(response.code == 20000){
this.closeDialog();
this.$message.error("修改成功");
}else{
this.$message.error(response.message);
}
})
.catch(() => {
this.$message.error("修改失败");
});
}
},
findMethod(_this,query) {
_this.fromOptions = [];
let cQuery = {
searchKey: query,
page: 1,
limit: 10,
};
seachCompanyOptimize(cQuery)
.then((response) => {
_this.loading = false;
_this.options.findMethod = response.data.list || [];
})
.catch(() => {
_this.loading = false;
_this.options.findMethod= [];
});
},
executeFuc(row,type,clickFuc,value){
return executeFuc(this,row,type,clickFuc,value);
},
executeEval(row,expression,defaultRet){
if(expression){
return eval(expression);
}
return defaultRet;
},
},
components: {},
created() {
getHead("auto-set-2","1").then((re) => {
//
this.tableObj = re.data;
this.tableHeader = re.data.tableList;
console.log("打印出当前的table列表",this.tableHeader)
this.queryList = re.data.queryList;
console.log("打印出当前的queryList列表",this.queryList)
this.fromList = re.data.fromList;
console.log("打印出当前的fromList列表",this.fromList)
});
this.findMethod(this)
},
}
</script>
<style scoped>
</style>
Loading…
Cancel
Save