资质功能提交

20240109-yw
yuanwei 1 year ago
parent df4281c73d
commit 4ce83ce80e

@ -0,0 +1,47 @@
import axios from "@/utils/request";
export function filterAuth(query) {
return axios(
{
url: "/udiwms/sup/auth/list",
method: "get",
params: query
}
)
}
export function filterRelAuth(query) {
return axios(
{
url: "/udiwms/sup/auth/filterRel",
method: "get",
params: query
}
)
}
export function batchAddAuth(query) {
return axios({
url: "/udiwms/sup/auth/batchAdd",
method: "post",
data: query
});
}
export function deleteAuth(query) {
return axios({
url: "/udiwms/sup/auth//delete",
method: "post",
data: query
});
}

@ -1,6 +1,38 @@
import request from "@/utils/request";
export function listYlqxzczh(query) {
return request({
url: "/directToCpt/user/cert/list",
method: "get",
params: query
});
}
// 保存
export function saveYlqxzczh(data, formName, method = "post") {
let url =
formName !== "edit"
? "/directToCpt/user/cert/save"
: "/directToCpt/user/cert/edit";
return request({
url: url,
method: method,
data: data
});
}
// 删除
export function deleteYlqxzczh(data) {
return request({
url: "/directToCpt/user/cert/delete",
method: "post",
data: data
});
}
export function filterCompanyCert(param) {
return request({
//url: "/reg/company/cert/filterList",
@ -42,4 +74,4 @@ export function getLocalCompanyCert(param) {
method: "get",
params :param
});
}
}

@ -0,0 +1,47 @@
import axios from "@/utils/request";
export function filterAuth(query) {
return axios(
{
url: "/udiwms/user/auth/list",
method: "get",
params: query
}
)
}
export function filterRelAuth(query) {
return axios(
{
url: "/udiwms/user/auth/filterRel",
method: "get",
params: query
}
)
}
export function batchAddAuth(query) {
return axios({
url: "/udiwms/user/auth/batchAdd",
method: "post",
data: query
});
}
export function deleteAuth(query) {
return axios({
url: "/udiwms/user/auth/delete",
method: "post",
data: query
});
}

@ -0,0 +1,437 @@
<template>
<div>
<el-card class="el-card">
<div>
<el-form :model="filterQuery" size="mini" label-width="125px" v-show="showSearch">
<el-row style=" display:flex; flex-wrap: wrap; ">
<template v-for="(item, index) in queryList" >
<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"
@change="executeFuc($event,'5',item.checkRules)"
: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' && 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 == '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>
</template>
</el-row>
</el-form>
<div class="top-right-btn">
<el-button-group>
<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
:data="udidlList"
style="width: 100%"
border
v-loading="loading"
highlight-current-row="true"
:row-class-name="tableRowClassName"
@current-change="handleErpChange"
@selection-change="handleSelectionUdiChange"
>
<template v-for="(item, index) in tableHeader">
<el-table-column
v-if="item.columnType == 'id' && executeEval(row,item.expression,true)"
type="index" :label="item.columnDesc"></el-table-column>
<el-table-column
v-if="item.columnType == 'selection'"
type="selection"
:width="item.width"
:selectable="(row,number) => executeFuc(row,'3',item.clickFuc)"
></el-table-column>
<el-table-column
v-if="item.columnType == 'radio' && executeEval(row,item.expression,true)"
:prop="item.columnName"
:label="item.columnDesc"
:sortable="item.sort"
:width="item.width"
:show-overflow-tooltip="item.tooltip"
:key="item.columnName"
>
<template slot-scope="scope">
<el-radio :label="scope.row.id" v-model="radioCheck"><span></span></el-radio>
</template>
</el-table-column>
<el-table-column
v-if="item.columnType == 'laber' && executeEval(row,item.expression,true)"
:prop="item.columnName"
:label="item.columnDesc"
:sortable="item.sort"
:width="item.width"
:show-overflow-tooltip="item.tooltip"
:key="item.columnName"
>
<template slot-scope="scope">
<span :style="{color: executeFuc(scope.row,'4',item.lableRuleObj[scope.row[item.columnName]])}">{{ item.lableRuleObj[scope.row[item.columnName]] }}</span>
</template>
</el-table-column>
<el-table-column
v-if="item.columnType == 'eltag' && executeEval(row,item.expression,true)"
:prop="item.columnName"
:label="item.columnDesc"
:sortable="item.sort"
:width="item.width"
:show-overflow-tooltip="item.tooltip"
:key="item.columnName"
>
<template slot-scope="scope">
<el-tag :type="executeFuc(scope.row,'4',item,item.lableRuleObj?item.lableRuleObj[scope.row[item.columnName]]:scope.row[item.columnName])">
<span>{{ item.lableRuleObj?item.lableRuleObj[scope.row[item.columnName]]:scope.row[item.columnName] }}</span>
</el-tag>
</template>
</el-table-column>
<el-table-column
v-if="item.columnType == 'button' && executeEval(row,item.expression,true)"
:prop="item.columnName"
:label="item.columnDesc"
:width="item.width"
:key="item.columnName"
fixed="right"
>
<template slot-scope="scope">
<el-button v-for="(buttonItem, buttonIndex) in item.buttonRulObj"
:type="buttonItem.type"
:size="buttonItem.size"
:style="buttonItem.style"
:key="buttonItem"
v-if="executeEval(scope.row,buttonItem.hasPermi,true)"
:disabled="executeEval(scope.row,buttonItem.disabledFuc,false)"
@click.native.stop="executeFuc(scope.row,'1',buttonItem.clickFuc)"
>{{ buttonItem.name }}
</el-button>
</template>
</el-table-column>
<el-table-column
v-if="item.columnType == 'text' && executeEval(row,item.expression,true)"
:prop="item.columnName"
:label="item.columnDesc"
:sortable="item.sort"
:width="item.width"
:show-overflow-tooltip="item.tooltip"
:key="item.columnName"
>
<template slot-scope="scope">
<span :style="{color: executeFuc(scope.row,'4',item,scope.row[item.columnName])}">{{ scope.row[item.columnName] }}</span>
</template>
</el-table-column>
</template>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="filterQuery.page"
:limit.sync="filterQuery.limit"
@pagination="getList"
/>
</div>
</el-card>
</div>
</template>
<script>
import {filterGroupRel, filterCompany} from "@/api/basic/product/udiInfo";
import {superSearch} from "@/api/basic/udiInfo";
import {filterRelAuth,batchAddAuth} from "@/api/sup/userCertAuth";
import {executeFuc, getHead} from "@/utils/customConfig";
export default {
name: "closeDialog",
props: {
closeDialog: {
type: Function,
required: true,
},
formName: {
type: Object,
required: true,
},
inputQuery: {
type: Object,
required: true,
},
},
data() {
return {
filterQuery: {
page: 1,
limit: 10,
},
cpmctymc1: "",
combineLoading: false,
combineQuery: {
productId: null,
ids: [],
},
checked: true,
udidlList: [],
erpList: [],
pageTotal: 0,
total: 0,
tableHeader:[],
queryList:[],
fromList:[],
currentRow: null,
fromOptions: [],
loading: false,
erpLloading: false,
multipleUdiSelection: [],
selectDialog: false,
diDetails: null,
showSearch: true,
};
},
methods: {
onReset() {
this.$router.push({
path: "",
});
this.filterQuery = {
page: 1,
limit: 10,
};
this.actDateRange = [];
this.udidlList = [];
},
clear() {
this.filterQuery = {
page: 1,
limit: 10,
};
},
searchList() {
this.filterQuery.page = 1;
this.getList();
},
getList() {
this.filterQuery.productId = this.inputQuery.productIdFk;
this.loading = true;
filterRelAuth(this.filterQuery)
.then((response) => {
this.loading = false;
if (response.code == 20000) {
this.udidlList = response.data.list || [];
this.total = response.data.total || 0;
} else {
this.$message.error(response.message);
}
})
.catch(() => {
this.loading = false;
this.udidlList = [];
this.total = 0;
});
},
hideSearch() {
this.showSearch = !this.showSearch;
},
keyup_submit(event) {
this.filterQuery.page = 1;
this.getList();
event.target.select();
},
checkSelectable(_this,row) {
return !row.check;
},
diDetail(row) {
this.diDetails = row;
this.selectDialog = true;
},
handleCurrentChange(val) {
this.filterQuery.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;
let selected = null;
if (this.multipleUdiSelection.length == 0) {
this.$message.warning('请选入产品!');
return;
} else {
selectData.forEach((obj) => {
if (obj.check) {
selected = obj;
}
this.combineQuery.ids.push(obj.id);
});
}
if (selected != null) {
this.$message.warning("公司:" + selected.companyName + "已被选入");
return;
}
this.combineLoading = true;
this.combine();
},
combine() {
this.combineQuery.productId = this.inputQuery.productIdFk;
batchAddAuth(this.combineQuery)
.then((response) => {
this.combineLoading = false;
if (response.code == 20000) {
this.intentBack();
} else {
this.$message.error(response.message);
this.intentBack();
}
})
.catch(() => {
this.combineLoading = false;
this.$emit("closeUdi", false);
});
},
handleSelectionUdiChange(val) {
this.multipleUdiSelection = val;
},
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("userEmpower-add","1").then((re) => {
//
this.tableObj = re.data;
this.tableHeader = re.data.tableList;
this.queryList = re.data.queryList;
this.fromList = re.data.fromList;
});
}
};
</script>
<style scoped>
.checkitemTag {
float: left;
text-align: left;
margin-top: 5px;
width: 100%;
}
div /deep/ .el-table .warning-row {
background: #bebebe;
}
div /deep/ .el-table .success-row {
background: #ffffff;
}
.el-card {
margin-right: 20px;
/*transition: all .5s;*/
}
.query-form-item {
display: block !important;
margin-right: 10px;
margin-bottom: 5px;
}
</style>

@ -0,0 +1,270 @@
<template>
<div>
<el-card>
<el-form :model="inputQuery" label-width="150px" >
<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="dict.value"
:label="dict.label"
:value="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
:style="item.style"
v-model="inputQuery[item.columnName]"
:placeholder="item.columnDesc"
@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.code"
:label="item.label"
:value="item.code"
>
<span style="float: left">{{ item.label }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{
item.code
}}</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 =='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>
<el-form-item v-if="item.columnType =='custom'" :prop="item.columnName">
<span slot="label">
{{item.columnDesc}}
</span>
<updateZz :user="inputQuery" />
</el-form-item>
</div>
</el-col>
</template>
</el-row>
</template>
<div style='text-align: center; margin-bottom: 10px;margin-top: 18px ;'>
<el-button @click="closeDialog"></el-button>
<el-button type="primary" @click="submitInv"></el-button>
</div>
</el-form>
</el-card>
</div>
</template>
<script>
import {saveYlqxzczh} from "@/api/sup/userCert";
import {getCertType} from "@/api/purchase/supCertType";
import updateZz from "@/views/basic/manu/updateZz";
import {
getHead,executeFuc
} from "@/utils/customConfig";
export default {
name: "companyPilotDialog",
props: {
closeDialog: {
type: Function,
required: true,
},
formName: {
type: Object,
required: true,
},
inputQuery: {
type: Object,
required: true,
},
},
data() {
return {
BASE_URL: process.env.VUE_APP_BASE_API,
tableHeader:[],
queryList:[],
fromList:[],
tableObj:[],
invList:[],
options: {
getCertTypeMethod:[],
},
uploadUrl: "",
fileList: [],
headers: {},
choiceFile: "选取文件",
option: {
img: this.inputQuery.filePath, //
info: false, // ()
outputSize: 0.9, // (0.1~1)
outputType: 'jpeg', // (jpg(jpg jpeg))
canScale: false, // (truefalse)
autoCrop: true, //
//
autoCropWidth: 0, //
autoCropHeight: 0, //
fixedBox: true, //
fixed: true, //
fixedNumber: [1, 1], // ([1,1][100,100])
full: true, //
canMove: true, //
canMoveBox: false, //
original: false, //
centerBox: false, //
infoTrue: true // true false
},
}
},
methods: {
submitInv(){
if(this.formName==1){
saveYlqxzczh(this.inputQuery,"add").then((response) => {
if(response.code == 20000){
this.closeDialog();
}else{
this.$message.error(response.message);
}
})
.catch(() => {
this.$message.error("添加失败");
});
}else{
saveYlqxzczh(this.inputQuery,"edit").then((response) => {
if(response.code == 20000){
this.closeDialog();
}else{
this.$message.error(response.message);
}
})
.catch(() => {
this.$message.error("添加失败");
});
}
},
executeFuc(row,type,clickFuc,value){
return executeFuc(this,row,type,clickFuc,value);
},
executeEval(row,expression,defaultRet){
if(expression){
return eval(expression);
}
return defaultRet;
},
getCertTypeMethod(_this,query) {
_this.fromOptions = [];
let cQuery = {
searchKey: query,
page: 1,
limit: 10,
};
getCertType(cQuery)
.then((response) => {
_this.loading = false;
_this.options.getCertTypeMethod = response.data || [];
})
.catch(() => {
_this.loading = false;
_this.options.findMethod= [];
});
},
change(_this) {
var pinyin = require("pinyin");
var py = pinyin(_this.inputQuery.companyName, {
style: pinyin.STYLE_FIRST_LETTER, //
heteronym: true,
});
var str = "";
py.forEach((item) => {
str = str + item[0];
});
_this.inputQuery.spell = str;
},
},
components: {
updateZz
},
created() {
this.uploadUrl = this.BASE_URL + "/udiwms/upload/register/file";
getHead("usercert","1").then((re) => {
//
this.tableObj = re.data;
this.tableHeader = re.data.tableList;
this.queryList = re.data.queryList;
this.fromList = re.data.fromList;
});
this.getCertTypeMethod(this);
},
}
</script>
<style scoped>
</style>

File diff suppressed because it is too large Load Diff

@ -95,7 +95,7 @@
<!-- <el-button type="primary" icon="el-icon-plus" @click.native="handleForm(null, null)"-->
<!-- :disabled="!configParms.basicCorp">新增-->
<!-- </el-button>-->
<el-button type="primary" icon="el-icon-plus" @click.native="handleForm()">新增</el-button>
<el-button type="primary" icon="el-icon-plus" @click.native="addForm()">新增</el-button>
<!-- <el-button type="primary" icon="el-icon-bottom-right" @click="intentDetail"></el-button>-->
</el-button-group>
</div>
@ -843,45 +843,29 @@ export default {
_this.formVisible = true;
// this.formName = "add";
_this.spellUpdate = false;
_this.editQuery = {
id: "",
thirdId: "",
erpId: "",
name: "",
spell: "",
addr: "",
status: "",
type: "",
creditNo: "",
contact: "",
mobile: ""
};
_this.formName = "cert";
_this.spellUpdate = true;
_this.editQuery = row;
//this.getThirdSysDetail();
},
//
addForm() {
this.editQuery = {};
this.formVisible = true;
this.formName = "add";
this.spellUpdate = false;
},
//
handleForm(_this, row) {
if(_this == null){
_this = this
}
_this.formVisible = true;
_this.formName = "add";
_this.spellUpdate = false;
_this.editQuery = {
id: "",
thirdId: "",
erpId: "",
name: "",
spell: "",
addr: "",
status: "",
type: "",
creditNo: "",
contact: "",
mobile: ""
};
_this.formName = "update";
_this.spellUpdate = true;
_this.editQuery= row;
//this.getThirdSysDetail();
},

@ -0,0 +1,437 @@
<template>
<div>
<el-card class="el-card">
<div>
<el-form :model="filterQuery" size="mini" label-width="125px" v-show="showSearch">
<el-row style=" display:flex; flex-wrap: wrap; ">
<template v-for="(item, index) in queryList" >
<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"
@change="executeFuc($event,'5',item.checkRules)"
: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' && 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 == '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>
</template>
</el-row>
</el-form>
<div class="top-right-btn">
<el-button-group>
<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
:data="udidlList"
style="width: 100%"
border
v-loading="loading"
highlight-current-row="true"
:row-class-name="tableRowClassName"
@current-change="handleErpChange"
@selection-change="handleSelectionUdiChange"
>
<template v-for="(item, index) in tableHeader">
<el-table-column
v-if="item.columnType == 'id' && executeEval(row,item.expression,true)"
type="index" :label="item.columnDesc"></el-table-column>
<el-table-column
v-if="item.columnType == 'selection'"
type="selection"
:width="item.width"
:selectable="(row,number) => executeFuc(row,'3',item.clickFuc)"
></el-table-column>
<el-table-column
v-if="item.columnType == 'radio' && executeEval(row,item.expression,true)"
:prop="item.columnName"
:label="item.columnDesc"
:sortable="item.sort"
:width="item.width"
:show-overflow-tooltip="item.tooltip"
:key="item.columnName"
>
<template slot-scope="scope">
<el-radio :label="scope.row.id" v-model="radioCheck"><span></span></el-radio>
</template>
</el-table-column>
<el-table-column
v-if="item.columnType == 'laber' && executeEval(row,item.expression,true)"
:prop="item.columnName"
:label="item.columnDesc"
:sortable="item.sort"
:width="item.width"
:show-overflow-tooltip="item.tooltip"
:key="item.columnName"
>
<template slot-scope="scope">
<span :style="{color: executeFuc(scope.row,'4',item.lableRuleObj[scope.row[item.columnName]])}">{{ item.lableRuleObj[scope.row[item.columnName]] }}</span>
</template>
</el-table-column>
<el-table-column
v-if="item.columnType == 'eltag' && executeEval(row,item.expression,true)"
:prop="item.columnName"
:label="item.columnDesc"
:sortable="item.sort"
:width="item.width"
:show-overflow-tooltip="item.tooltip"
:key="item.columnName"
>
<template slot-scope="scope">
<el-tag :type="executeFuc(scope.row,'4',item,item.lableRuleObj?item.lableRuleObj[scope.row[item.columnName]]:scope.row[item.columnName])">
<span>{{ item.lableRuleObj?item.lableRuleObj[scope.row[item.columnName]]:scope.row[item.columnName] }}</span>
</el-tag>
</template>
</el-table-column>
<el-table-column
v-if="item.columnType == 'button' && executeEval(row,item.expression,true)"
:prop="item.columnName"
:label="item.columnDesc"
:width="item.width"
:key="item.columnName"
fixed="right"
>
<template slot-scope="scope">
<el-button v-for="(buttonItem, buttonIndex) in item.buttonRulObj"
:type="buttonItem.type"
:size="buttonItem.size"
:style="buttonItem.style"
:key="buttonItem"
v-if="executeEval(scope.row,buttonItem.hasPermi,true)"
:disabled="executeEval(scope.row,buttonItem.disabledFuc,false)"
@click.native.stop="executeFuc(scope.row,'1',buttonItem.clickFuc)"
>{{ buttonItem.name }}
</el-button>
</template>
</el-table-column>
<el-table-column
v-if="item.columnType == 'text' && executeEval(row,item.expression,true)"
:prop="item.columnName"
:label="item.columnDesc"
:sortable="item.sort"
:width="item.width"
:show-overflow-tooltip="item.tooltip"
:key="item.columnName"
>
<template slot-scope="scope">
<span :style="{color: executeFuc(scope.row,'4',item,scope.row[item.columnName])}">{{ scope.row[item.columnName] }}</span>
</template>
</el-table-column>
</template>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="filterQuery.page"
:limit.sync="filterQuery.limit"
@pagination="getList"
/>
</div>
</el-card>
</div>
</template>
<script>
import {filterGroupRel, filterCompany} from "@/api/basic/product/udiInfo";
import {superSearch} from "@/api/basic/udiInfo";
import {filterRelAuth,batchAddAuth} from "@/api/purchase/supProductAuth";
import {executeFuc, getHead} from "@/utils/customConfig";
export default {
name: "closeDialog",
props: {
closeDialog: {
type: Function,
required: true,
},
formName: {
type: Object,
required: true,
},
inputQuery: {
type: Object,
required: true,
},
},
data() {
return {
filterQuery: {
page: 1,
limit: 10,
},
cpmctymc1: "",
combineLoading: false,
combineQuery: {
productId: null,
ids: [],
},
checked: true,
udidlList: [],
erpList: [],
pageTotal: 0,
total: 0,
tableHeader:[],
queryList:[],
fromList:[],
currentRow: null,
fromOptions: [],
loading: false,
erpLloading: false,
multipleUdiSelection: [],
selectDialog: false,
diDetails: null,
showSearch: true,
};
},
methods: {
onReset() {
this.$router.push({
path: "",
});
this.filterQuery = {
page: 1,
limit: 10,
};
this.actDateRange = [];
this.udidlList = [];
},
clear() {
this.filterQuery = {
page: 1,
limit: 10,
};
},
searchList() {
this.filterQuery.page = 1;
this.getList();
},
getList() {
this.filterQuery.corpId = this.inputQuery.corpId;
this.loading = true;
filterRelAuth(this.filterQuery)
.then((response) => {
this.loading = false;
if (response.code == 20000) {
this.udidlList = response.data.list || [];
this.total = response.data.total || 0;
} else {
this.$message.error(response.message);
}
})
.catch(() => {
this.loading = false;
this.udidlList = [];
this.total = 0;
});
},
hideSearch() {
this.showSearch = !this.showSearch;
},
keyup_submit(event) {
this.filterQuery.page = 1;
this.getList();
event.target.select();
},
checkSelectable(_this,row) {
return !row.check;
},
diDetail(row) {
this.diDetails = row;
this.selectDialog = true;
},
handleCurrentChange(val) {
this.filterQuery.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;
let selected = null;
if (this.multipleUdiSelection.length == 0) {
this.$message.warning('请选入产品!');
return;
} else {
selectData.forEach((obj) => {
if (obj.check) {
selected = obj;
}
this.combineQuery.ids.push(obj.id);
});
}
if (selected != null) {
this.$message.warning("公司:" + selected.companyName + "已被选入");
return;
}
this.combineLoading = true;
this.combine();
},
combine() {
this.combineQuery.corpId = this.inputQuery.corpId;
batchAddAuth(this.combineQuery)
.then((response) => {
this.combineLoading = false;
if (response.code == 20000) {
this.intentBack();
} else {
this.$message.error(response.message);
this.intentBack();
}
})
.catch(() => {
this.combineLoading = false;
this.$emit("closeUdi", false);
});
},
handleSelectionUdiChange(val) {
this.multipleUdiSelection = val;
},
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("supEmpower-add","1").then((re) => {
//
this.tableObj = re.data;
this.tableHeader = re.data.tableList;
this.queryList = re.data.queryList;
this.fromList = re.data.fromList;
});
}
};
</script>
<style scoped>
.checkitemTag {
float: left;
text-align: left;
margin-top: 5px;
width: 100%;
}
div /deep/ .el-table .warning-row {
background: #bebebe;
}
div /deep/ .el-table .success-row {
background: #ffffff;
}
.el-card {
margin-right: 20px;
/*transition: all .5s;*/
}
.query-form-item {
display: block !important;
margin-right: 10px;
margin-bottom: 5px;
}
</style>

@ -433,7 +433,7 @@
<el-button-group style="display:flex;">
<el-button type="primary" icon="el-icon-refresh" @click="onCodeReset"></el-button>
<el-button type="primary" icon="el-icon-search" @click="onCodeSubmit"></el-button>
<el-button type="primary" icon="el-icon-plus" @click="selectProduct()"></el-button>
<el-button type="primary" icon="el-icon-plus" @click="addOrderMutiEmpower()"></el-button>
</el-button-group>
</div>
<el-table v-loading="codeDetailLoading" :data="codeDetailList" style="width: 100%" border
@ -574,7 +574,7 @@
:before-close="close"
width="60%"
v-if="orderMutiSetCertVisible"
@close='closeDialog'
@close='closeCertDialog'
:close-on-click-modal="false"
:close-on-press-escape="false"
>
@ -584,6 +584,24 @@
:formName="formCertName"
></ylqxzczhManuDialog>
</el-dialog>
<el-dialog
:title="formEmpowerMap[formEmpowerName]"
:visible.sync="orderMutiSetEmpowerVisible"
:before-close="close"
width="60%"
v-if="orderMutiSetEmpowerVisible"
@close='closeEmpowerDialog'
:close-on-click-modal="false"
:close-on-press-escape="false"
>
<addEmpower
:closeDialog="closeEmpowerDialog"
:inputQuery="inputEmpowerQuery"
:formName="formEmpowerName"
></addEmpower>
</el-dialog>
</div>
</template>
@ -594,8 +612,10 @@ import {seachCompanyOptimize} from "@/api/basic/udiRlCompany";
import {filterCompany, deleteCompany, updateCompany} from "@/api/purchase/supProduct";
import {executeFuc, getHead} from "@/utils/customConfig";
import ylqxzczhManuDialog from "./ylqxzczhManuDialog";
import addEmpower from "./addEmpower";
import {isBlank} from "@/utils/strUtil";
import {deleteYlqxzczh, listYlqxzczh} from "@/api/purchase/supCert";
import {deleteAuth, filterAuth} from "@/api/purchase/supProductAuth";
import {
filterCompanyName
} from "@/api/udi/udiTrace";
@ -611,6 +631,13 @@ export default {
},
inputCertQuery:{},
orderMutiSetCertVisible: false,
formEmpowerName: 1,
formEmpowerMap: {
1: "新增授权",
2: "编辑授权",
},
inputEmpowerQuery:{},
orderMutiSetEmpowerVisible: false,
filterQuery: {
unionCode: null,
udiCode: null,
@ -911,6 +938,46 @@ export default {
});
},
closeEmpowerDialog(){
this.orderMutiSetEmpowerVisible = false;
this.getCodeDetailList();
},
addOrderMutiEmpower(){
if (isBlank(this.currentRow.productIdFk)) {
this.$message.error("请先选择产品!")
return;
}
this.inputEmpowerQuery={
productIdFk:this.currentRow.productIdFk
}
this.formEmpowerName=1;
this.orderMutiSetEmpowerVisible = true;
},
editEmpowerDialog(_this,row){
_this.formEmpowerName=2;
_this.inputEmpowerQuery=row
_this.orderMutiSetEmpowerVisible = true;
},
deleteEmpowerDialog(_this,row) {
_this.$confirm("确认删除吗?", "提示", {
type: "warning",
})
.then(() => {
deleteAuth(row)
.then((response) => {
if(response.code == 20000){
_this.getCodeDetailList();
}else{
_this.$message.error(response.message);
}
})
.catch(() => {
_this.$message.error(response.message);
});
});
},
handleSelectionChange(_this,val) {
_this.currentRow.productIdFk = val.id;
_this.getOrderDetails();
@ -987,7 +1054,7 @@ export default {
this.codeQuery.productIdFk = this.currentRow.productIdFk;
this.codeDetailLoading = true;
listYlqxzczh(this.codeQuery).then((res) => {
filterAuth(this.codeQuery).then((res) => {
this.codeDetailLoading = false;
if (res.code === 20000) {
this.codeDetailList = res.data.list || [];
@ -1021,7 +1088,8 @@ export default {
components: {
selectLocalUdi,
productManuDialog,
ylqxzczhManuDialog
ylqxzczhManuDialog,
addEmpower
}
,
created() {
@ -1040,7 +1108,7 @@ export default {
this.queryList2 = re.data.queryList;
this.fromList2 = re.data.fromList;
});
getHead("supProduct","1").then((re) => {
getHead("supEmpower","1").then((re) => {
//
this.tableObj3 = re.data;
this.tableHeader3 = re.data.tableList;

Loading…
Cancel
Save