销售明细单日期选择添加限制,菜单栏数据存储vuex
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import {getMenuTreeByRole} from "@/api/menus/index" |
| | | export default { |
| | | name: "AppSidebar", |
| | | props: {}, |
| | |
| | | }, |
| | | methods: { |
| | | getMenuTreeByRole(){ |
| | | getMenuTreeByRole().then((res)=>{ |
| | | console.log(res.data.list,"crm菜单") |
| | | res.data.list.map((item)=>{ |
| | | if(item.systemType===2){ |
| | | let newList= JSON.parse(JSON.stringify([...item.menus])) |
| | | // 隐藏了 生成计划 和 服务收费管理模块 |
| | | if(newList[1]){ |
| | | const found = newList[1].children.find(obj => obj.title === "生成计划") |
| | | if(found){ |
| | | newList[1].children=[...newList[1].children.slice(0, -1)]; |
| | | } |
| | | } |
| | | if(newList[2]){ |
| | | const found1 = newList[2].children.find(obj => obj.title === "服务收费管理") |
| | | if(found1){ |
| | | newList[2].children=[...newList[2].children.slice(0, -1)]; |
| | | } |
| | | } |
| | | this.menus=newList |
| | | } |
| | | }) |
| | | }) |
| | | let newList=this.$store.state.menus |
| | | console.log(newList,"newList") |
| | | // 隐藏了 生成计划 和 服务收费管理模块 |
| | | if(newList[1]){ |
| | | const found = newList[1].children.find(obj => obj.title === "生成计划") |
| | | if(found){ |
| | | newList[1].children=[...newList[1].children.slice(0, -1)]; |
| | | } |
| | | } |
| | | if(newList[2]){ |
| | | const found1 = newList[2].children.find(obj => obj.title === "服务收费管理") |
| | | if(found1){ |
| | | newList[2].children=[...newList[2].children.slice(0, -1)]; |
| | | } |
| | | } |
| | | this.menus=newList |
| | | }, |
| | | // 监听路由 |
| | | initNavMenu() { |
| | |
| | | import salesRouter from "./sales/index.js" |
| | | import serviceRouter from "./service/index.js" |
| | | import {getMenuTreeByRole} from "@/api/menus/index" |
| | | import store from '@/store/index.js'; |
| | | // import backgroundConfigRouter from "./backgroundConfig/index.js" |
| | | |
| | | Vue.use(Router) |
| | |
| | | }; |
| | | const foundObject = res.data.list.find(obj => obj.systemType === 2); |
| | | if (foundObject) { |
| | | store.commit('setMenus', foundObject.menus); |
| | | foundObject.menus.forEach(item => { |
| | | const nextPath = item.children.find(obj => obj.path === routePath); |
| | | if (nextPath) { |
| | |
| | | |
| | | Vue.use(Vuex) |
| | | export default new Vuex.Store({ |
| | | state:{ |
| | | menus:[] |
| | | }, |
| | | mutations: { |
| | | setMenus(state, payload) { |
| | | state.menus = payload; |
| | | }, |
| | | }, |
| | | modules: { |
| | | getClientName |
| | | } |
| | | }, |
| | | }) |
| | |
| | | <template slot="title"> |
| | | <div class="header"> |
| | | <span class="header-label">合同管理</span> |
| | | <span class="header-title">{{ detailConfig.infomation.number }}</span> |
| | | <span class="header-title">{{ detailConfig.infomation.contractName }}</span> |
| | | </div> |
| | | </template> |
| | | <div class="content"> |
| | |
| | | :show-download="false" |
| | | :amount-view="false" |
| | | :show-action-btn="false" |
| | | placeholder="请输入单据编号" |
| | | placeholder="请输入合同名称或单据编号" |
| | | @searchClick="onFilterSearch" |
| | | > |
| | | <template slot="leftButton"> |
| | |
| | | }, |
| | | selValueList: [], |
| | | search_map: {}, |
| | | searchSel: { |
| | | value: "number", |
| | | label: "单据编号" |
| | | }, |
| | | tableColumn: [ |
| | | { label: "单据编号", prop: "number", min: 120, isCommonClick: true, default: true }, |
| | | { label: "合同名称", prop: "contractName", min: 120, isCommonClick: true, default: true }, |
| | | { label: "负责人", prop: "member_name", min: 90 }, |
| | | { label: "客户名称", prop: "client_name" }, |
| | | { label: "合同状态", prop: "serviceContractStatus_name", min: 100 }, |
| | | { label: "创建时间", prop: "created_at" } |
| | | ], |
| | | showCol: ["单据编号", "负责人", "客户名称", "合同状态", "创建时间"], |
| | | showCol: ["合同名称", "负责人", "客户名称", "合同状态", "创建时间"], |
| | | keyword:'' |
| | | } |
| | | }, |
| | |
| | | }, |
| | | // 合同管理详情 |
| | | selCommonClick(row) { |
| | | console.log(row) |
| | | console.log(row,"合同详情") |
| | | this.contractDetail.visible = true |
| | | this.contractDetail.infomation = { ...row } |
| | | } |
| | |
| | | placeholder="选择日期" |
| | | style="width: 100%" |
| | | :disabled="isView" |
| | | :picker-options="pickerOptionsBefore" |
| | | > |
| | | </el-date-picker> |
| | | </el-form-item> |
| | |
| | | placeholder="选择日期" |
| | | style="width: 100%" |
| | | :disabled="isView" |
| | | :picker-options="pickerOptions" |
| | | > |
| | | </el-date-picker> |
| | | </el-form-item> |
| | |
| | | selProductData: [], |
| | | isView: this.editCommonConfig.title === "查看", |
| | | selectBox: this.editCommonConfig.title !== "查看", |
| | | thatMember: {} |
| | | thatMember: {}, |
| | | pickerOptions: { |
| | | disabledDate(time) { |
| | | return time.getTime() < Date.now() - 8.64e7; |
| | | }, |
| | | }, |
| | | pickerOptionsBefore:{ |
| | | disabledDate(time) { |
| | | return time.getTime() > Date.now(); |
| | | }, |
| | | } |
| | | } |
| | | }, |
| | | created() { |