|
|
|
@ -64,7 +64,9 @@
|
|
|
|
|
<!-- </el-row>-->
|
|
|
|
|
<el-row style=" display:flex; flex-wrap: wrap; ">
|
|
|
|
|
<template v-for="(item, index) in queryList">
|
|
|
|
|
<el-form-item v-if="item.columnType == 'input' && item.columnName !='queryName' && executeEval(row,item.expression,true)" :label="item.columnDesc+`:`" :key="item.id">
|
|
|
|
|
<el-form-item
|
|
|
|
|
v-if="item.columnType == 'input' && item.columnName !='queryName' && executeEval(row,item.expression,true)"
|
|
|
|
|
:label="item.columnDesc+`:`" :key="item.id">
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="filterQuery[item.columnName]"
|
|
|
|
|
:placeholder="item.columnDesc"
|
|
|
|
@ -73,7 +75,9 @@
|
|
|
|
|
clearable
|
|
|
|
|
></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item v-if="item.columnType == 'input' && item.columnName =='queryName' && executeEval(row,item.expression,true)" :label="item.columnDesc+`:`" :key="item.id">
|
|
|
|
|
<el-form-item
|
|
|
|
|
v-if="item.columnType == 'input' && item.columnName =='queryName' && executeEval(row,item.expression,true)"
|
|
|
|
|
:label="item.columnDesc+`:`" :key="item.id">
|
|
|
|
|
<el-autocomplete
|
|
|
|
|
class="inline-input"
|
|
|
|
|
style="width: 90%"
|
|
|
|
@ -85,7 +89,8 @@
|
|
|
|
|
@clear="clearQueryProduct"
|
|
|
|
|
></el-autocomplete>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item v-if="item.columnType == 'select' && executeEval(row,item.expression,true)" :label="item.columnDesc+`:`">
|
|
|
|
|
<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"
|
|
|
|
|
@change="executeFuc($event,'5',item.checkRules)"
|
|
|
|
@ -98,10 +103,13 @@
|
|
|
|
|
:value="dict.value"
|
|
|
|
|
/>
|
|
|
|
|
<span style="float: left">{{ item.name }}</span>
|
|
|
|
|
<span v-if="item.isShowXx == '1'" style="float: right; color: #8492a6; font-size: 13px">{{ item.code }}</span>
|
|
|
|
|
<span v-if="item.isShowXx == '1'" style="float: right; color: #8492a6; font-size: 13px">{{
|
|
|
|
|
item.code
|
|
|
|
|
}}</span>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item v-if="item.columnType == 'selectServer' && executeEval(row,item.expression,true)" :label="item.columnDesc+`:`">
|
|
|
|
|
<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"
|
|
|
|
@ -118,10 +126,13 @@
|
|
|
|
|
:value="item.code"
|
|
|
|
|
/>
|
|
|
|
|
<span style="float: left">{{ item.name }}</span>
|
|
|
|
|
<span v-if="item.isShowXx == '1'" style="float: right; color: #8492a6; font-size: 13px">{{ item.code }}</span>
|
|
|
|
|
<span v-if="item.isShowXx == '1'" style="float: right; color: #8492a6; font-size: 13px">{{
|
|
|
|
|
item.code
|
|
|
|
|
}}</span>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item v-if="item.columnType == 'datePicker' && executeEval(row,item.expression,true)" :label="item.columnDesc+`:`">
|
|
|
|
|
<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"
|
|
|
|
@ -133,7 +144,8 @@
|
|
|
|
|
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-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'}`"
|
|
|
|
@ -150,19 +162,23 @@
|
|
|
|
|
<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
|
|
|
|
|
>
|
|
|
|
|
<el-button type="primary" icon="el-icon-refresh" @click="onReset"
|
|
|
|
|
>重置</el-button
|
|
|
|
|
>重置
|
|
|
|
|
</el-button
|
|
|
|
|
>
|
|
|
|
|
<el-button type="primary" icon="el-icon-search" @click="search"
|
|
|
|
|
>查询</el-button
|
|
|
|
|
>查询
|
|
|
|
|
</el-button
|
|
|
|
|
>
|
|
|
|
|
<el-button
|
|
|
|
|
type="primary"
|
|
|
|
|
icon="el-icon-plus"
|
|
|
|
|
icon="el-icon-check"
|
|
|
|
|
@click="addDiProductVisible = true"
|
|
|
|
|
>选入DI信息</el-button
|
|
|
|
|
>选入DI信息
|
|
|
|
|
</el-button
|
|
|
|
|
>
|
|
|
|
|
<el-button
|
|
|
|
|
type="primary"
|
|
|
|
@ -171,6 +187,20 @@
|
|
|
|
|
>添加院内字典
|
|
|
|
|
</el-button
|
|
|
|
|
>
|
|
|
|
|
|
|
|
|
|
<el-upload
|
|
|
|
|
:action="uploadFileUrl"
|
|
|
|
|
multiple
|
|
|
|
|
:limit="1"
|
|
|
|
|
:headers="headers"
|
|
|
|
|
:data="uploadData"
|
|
|
|
|
:show-file-list="false"
|
|
|
|
|
accept=".xls,.xlsx"
|
|
|
|
|
:on-success="handleChange"
|
|
|
|
|
:file-list="fileList"
|
|
|
|
|
>
|
|
|
|
|
<el-button icon="el-icon-upload2" type="primary">Excel导入</el-button>
|
|
|
|
|
</el-upload>
|
|
|
|
|
</el-button-group>
|
|
|
|
|
</div>
|
|
|
|
|
<el-divider style="margin: 15px"></el-divider>
|
|
|
|
@ -262,7 +292,9 @@
|
|
|
|
|
: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>
|
|
|
|
|
<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
|
|
|
|
@ -275,8 +307,11 @@
|
|
|
|
|
: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
|
|
|
|
|
: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>
|
|
|
|
@ -311,7 +346,9 @@
|
|
|
|
|
:key="item.columnName"
|
|
|
|
|
>
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<span :style="{color: executeFuc(scope.row,'4',item,scope.row[item.columnName])}">{{ scope.row[item.columnName] }}</span>
|
|
|
|
|
<span :style="{color: executeFuc(scope.row,'4',item,scope.row[item.columnName])}">{{
|
|
|
|
|
scope.row[item.columnName]
|
|
|
|
|
}}</span>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
</template>
|
|
|
|
@ -400,6 +437,7 @@ import thrProductsDetail from "@/views/supplier/products/supProductsDetail";
|
|
|
|
|
import {
|
|
|
|
|
getHead, executeFuc
|
|
|
|
|
} from "@/utils/customConfig";
|
|
|
|
|
import store from "@/store";
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
|
data() {
|
|
|
|
@ -423,8 +461,7 @@ export default {
|
|
|
|
|
tableHeader2: [],
|
|
|
|
|
queryList2: [],
|
|
|
|
|
fromList2: [],
|
|
|
|
|
options: {
|
|
|
|
|
},
|
|
|
|
|
options: {},
|
|
|
|
|
thirdSys: [],
|
|
|
|
|
delect: null,
|
|
|
|
|
thirdSysDetail: null,
|
|
|
|
@ -450,6 +487,12 @@ export default {
|
|
|
|
|
curRow: null,
|
|
|
|
|
diDetails: null,
|
|
|
|
|
detailDialog: false,
|
|
|
|
|
uploadFileUrl: null,
|
|
|
|
|
uploadData: {
|
|
|
|
|
thirdSys: "thirdId",
|
|
|
|
|
},
|
|
|
|
|
fileList: [],
|
|
|
|
|
headers: {},
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
@ -520,14 +563,14 @@ export default {
|
|
|
|
|
_this.thrProductsDetailVisible = true;
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
deleteProduct(_this,id) {
|
|
|
|
|
deleteProduct(_this, row) {
|
|
|
|
|
let query = {
|
|
|
|
|
id: id,
|
|
|
|
|
id: row.id,
|
|
|
|
|
};
|
|
|
|
|
delThrDiProducts(query).then((res) => {
|
|
|
|
|
if (res.code === 20000) {
|
|
|
|
|
_this.$message.success("删除成功");
|
|
|
|
|
this.getList();
|
|
|
|
|
_this.getList();
|
|
|
|
|
} else {
|
|
|
|
|
_this.$message.error("删除失败");
|
|
|
|
|
}
|
|
|
|
@ -554,15 +597,25 @@ export default {
|
|
|
|
|
return eval(expression);
|
|
|
|
|
}
|
|
|
|
|
return defaultRet;
|
|
|
|
|
},
|
|
|
|
|
handleChange(response, files, fileList) {
|
|
|
|
|
console.log(response);
|
|
|
|
|
if (response.code != 20000) {
|
|
|
|
|
this.$message.error(response.message);
|
|
|
|
|
} else {
|
|
|
|
|
this.$message.success(response.data);
|
|
|
|
|
this.getList();
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
components: {
|
|
|
|
|
thrAddDiProductSelectUdi,
|
|
|
|
|
selectDiDetail,
|
|
|
|
|
thrAddProductSelectUdi,
|
|
|
|
|
thrProductsDetail,
|
|
|
|
|
},
|
|
|
|
|
mounted() {},
|
|
|
|
|
mounted() {
|
|
|
|
|
},
|
|
|
|
|
created() {
|
|
|
|
|
getHead("supProductsAddDi", "1").then((re) => {
|
|
|
|
|
// 处理返回的数据
|
|
|
|
@ -572,6 +625,15 @@ export default {
|
|
|
|
|
this.fromList = re.data.fromList;
|
|
|
|
|
this.getList();
|
|
|
|
|
});
|
|
|
|
|
this.uploadFileUrl = process.env.VUE_APP_BASE_API + "/spms/thrAddDi/excel/upload";
|
|
|
|
|
this.headers = {
|
|
|
|
|
ADMIN_ID: this.$store.getters.adminId,
|
|
|
|
|
ADMIN_TOKEN: this.$store.getters.token,
|
|
|
|
|
};
|
|
|
|
|
console.log(this.headers);
|
|
|
|
|
console.log(this.$store.getters);
|
|
|
|
|
|
|
|
|
|
console.log(this.uploadFileUrl);
|
|
|
|
|
},
|
|
|
|
|
};
|
|
|
|
|
</script>
|
|
|
|
|