| xqd
@@ -14,7 +14,7 @@
|
|
|
</el-input>
|
|
|
</div>
|
|
|
<!-- 供应商查询 -->
|
|
|
- <div class="grid-content bg-purple">
|
|
|
+ <div v-if="isOpenSupplierName" class="grid-content bg-purple">
|
|
|
<el-input
|
|
|
v-model="formData.supplierName"
|
|
|
placeholder="请输入供应商名称"
|
| xqd
@@ -268,6 +268,8 @@
|
|
|
<script>
|
|
|
import { dataConversionUtil } from "../../utils/Excel.js";
|
|
|
import { contractsPageApi, contractsExportApi } from "@/api/contracts";
|
|
|
+import { mapGetters } from "vuex";
|
|
|
+
|
|
|
export default {
|
|
|
filters: {
|
|
|
statusFilter(status) {
|
| xqd
@@ -279,6 +281,9 @@ export default {
|
|
|
return statusMap[status];
|
|
|
},
|
|
|
},
|
|
|
+ computed: {
|
|
|
+ ...mapGetters(["roles"]),
|
|
|
+ },
|
|
|
data() {
|
|
|
return {
|
|
|
// 表单数据
|
| xqd
@@ -293,6 +298,7 @@ export default {
|
|
|
contractStatus: "",
|
|
|
draftStatus: "",
|
|
|
},
|
|
|
+ isOpenSupplierName:false,//是否显示供应商查询
|
|
|
srcList: [],
|
|
|
list: [],
|
|
|
/* 表格数据 */
|
| xqd
@@ -346,6 +352,8 @@ export default {
|
|
|
mounted() {
|
|
|
this.checked = this.$store.state.user.checked;
|
|
|
this.getData();
|
|
|
+ //是否显示供应商查询
|
|
|
+ this.getSupplierName()
|
|
|
},
|
|
|
methods: {
|
|
|
/* ajax发请求获取列表数据 */
|
| xqd
@@ -621,6 +629,18 @@ export default {
|
|
|
this.getData(this.searchForm);
|
|
|
},
|
|
|
|
|
|
+ //是否显示供应商查询
|
|
|
+ getSupplierName(){
|
|
|
+ console.log(this.roles);
|
|
|
+ if( this.roles[0] === "admin"){
|
|
|
+ this.isOpenSupplierName=true
|
|
|
+ }else if(this.roles[0]==="salesman"){
|
|
|
+ this.isOpenSupplierName=true
|
|
|
+ }else{
|
|
|
+ this.isOpenSupplierName=false
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
handleSelectionChange(data) {
|
|
|
this.multipleSelection = data;
|
|
|
console.log(this.multipleSelection);
|