登录页面接口、订单管理列表页面接口先跟进aps项目接口联调及部分代码删减
27个文件已删除
1个文件已添加
12个文件已修改
| | |
| | | method: "get", |
| | | params: data |
| | | }) |
| | | } |
| | | } |
| | | // 获取产品信息 |
| | | export const getMaterialList = (data) => { |
| | | return request({ |
| | | url: "/api-s/v1/material/getMaterialList", |
| | | method: "post", |
| | | IsHeader: true, |
| | | data |
| | | }) |
| | | } |
New file |
| | |
| | | import request from "@/common/untils/request.js" |
| | | |
| | | /** 委外订单 */ |
| | | // 委外订单列表 |
| | | export const outsourceOrderList = (data) => { |
| | | return request({ |
| | | url: "/api-s/v1/outsourcing/order/list", |
| | | method: "get", |
| | | params: data |
| | | }) |
| | | } |
| | | |
| | | // 委外订单统计 |
| | | export const outsourceOrderOverview = () => { |
| | | return request({ |
| | | url: "/api-s/v1/outsourcing/order/overview", |
| | | method: "get" |
| | | }) |
| | | } |
| | | |
| | | // 委外订单产品列表 |
| | | export const outsourceOrderProductList = (data) => { |
| | | return request({ |
| | | url: "/api-s/v1/outsourcing/order/productList", |
| | | method: "get", |
| | | params: data |
| | | }) |
| | | } |
| | | |
| | | // 委外企业供货历史 |
| | | export const outsourcenterpriseProductList = (data) => { |
| | | return request({ |
| | | url: "/api-s/v1/outsourcing/enterprise/productList", |
| | | method: "get", |
| | | params: data |
| | | }) |
| | | } |
| | | |
| | | // // 委外供应商 |
| | | // export const orderAssign = (data) => { |
| | | // return request({ |
| | | // url: "/api-s/v1/outsourcing/order/assign", |
| | | // method: "post", |
| | | // data |
| | | // }) |
| | | // } |
| | | |
| | | // 保存物料申请单 |
| | | export const saveMaterialApply = (data) => { |
| | | return request({ |
| | | url: "/api-s/v1/outsourcing/order/saveMaterialApply", |
| | | method: "post", |
| | | data |
| | | }) |
| | | } |
| | | |
| | | // 获取物料申请单 |
| | | export const getMaterialApplyList = (data) => { |
| | | return request({ |
| | | url: "/api-s/v1/outsourcing/order/getMaterialApplyList", |
| | | method: "post", |
| | | data |
| | | }) |
| | | } |
| | | |
| | | // 修改状态 |
| | | export const changeOutsourceOrderStatus = (data) => { |
| | | return request({ |
| | | url: "/api-s/v1/outsourcing/order/changeStatus", |
| | | method: "post", |
| | | data |
| | | }) |
| | | } |
| | |
| | | |
| | | // import router from '@/router' |
| | | // 开发环境下将自己的token复制到这里, 也可以在浏览器中手动添加token到cookie中,cookie中的token优先 |
| | | const DEV_TOKEN = '' |
| | | function environmentType(){ |
| | | const DEV_TOKEN = "" |
| | | function environmentType() { |
| | | let type |
| | | if (location.href.includes('192.168.20.119')) { |
| | | type = 'test' |
| | | } else if (location.href.includes('192.168') || location.href.includes('localhost')) { |
| | | type = 'dev' |
| | | if (location.href.includes("192.168.20.119")) { |
| | | type = "test" |
| | | } else if (location.href.includes("192.168") || location.href.includes("localhost")) { |
| | | type = "dev" |
| | | } else { |
| | | type = 'prod' |
| | | type = "prod" |
| | | } |
| | | |
| | | return type |
| | | } |
| | | |
| | | const isDev = environmentType() === 'dev' |
| | | const isDev = environmentType() === "dev" |
| | | |
| | | const Axios = axios.create({ |
| | | responseType: "json", |
| | |
| | | const getApsPage = () => { |
| | | // 首页部署在各个环境的端口 |
| | | const loginPathMap = { |
| | | prod:`//${window.location.hostname}:9080`, |
| | | test:`//192.168.20.119:9080`, |
| | | dev: `//192.168.8.107:8080` |
| | | prod: `//${window.location.hostname}:9080`, |
| | | test: `//192.168.20.119:9080`, |
| | | dev: `//192.168.8.107:8080` |
| | | } |
| | | return loginPathMap[environmentType()] |
| | | } |
| | |
| | | // // if (token != undefined) { |
| | | // // config.headers.Authorization = "Bearer " + token; |
| | | // // } |
| | | let token = document.cookie.replace( |
| | | /(?:(?:^|.*;\s*)token\s*=\s*([^;]*).*$)|^.*$/, |
| | | "$1", |
| | | ); |
| | | if (isDev){ |
| | | // let token = localStorage.getItem("token") |
| | | let token = document.cookie.replace(/(?:(?:^|.*;\s*)token\s*=\s*([^;]*).*$)|^.*$/, "$1") |
| | | if (isDev) { |
| | | token = token || DEV_TOKEN |
| | | } |
| | | if (token) { |
| | | config.headers.Authorization = "Bearer " + token; |
| | | config.headers.Authorization = "Bearer " + token |
| | | } |
| | | return config |
| | | }, |
| | |
| | | /* //返回状态判断(添加响应拦截器) */ |
| | | Axios.interceptors.response.use( |
| | | (res) => { |
| | | console.log("99999", res) |
| | | /* //对响应数据做些事 */ |
| | | if (res.data.code === 200) { |
| | | return res.data ? res.data : {} |
| | | } else if([2012,2013,2014,2015].includes(res.data.code)){ |
| | | if (isDev){ |
| | | } else if ([2012, 2013, 2014, 2015].includes(res.data.code)) { |
| | | if (isDev) { |
| | | alert("JWT失效,即将跳转至登录页..") |
| | | window.location = getApsPage()+'/login' |
| | | }else { |
| | | window.location = getApsPage() + "/login" |
| | | } else { |
| | | // JWT鉴权失效 跳转到登录页 |
| | | window.location = getApsPage()+'/login' |
| | | window.location = getApsPage() + "/login" |
| | | } |
| | | // Message({ |
| | | // message: res.data.msg, |
| | |
| | | // duration: 5 * 1000 |
| | | // }) |
| | | return Promise.reject(res.data) |
| | | }else if([2036].includes(res.data.code)){ |
| | | if (isDev){ |
| | | window.location = getApsPage()+'/commonWeb?resetPwd=true' |
| | | }else { |
| | | } else if ([2036].includes(res.data.code)) { |
| | | if (isDev) { |
| | | window.location = getApsPage() + "/commonWeb?resetPwd=true" |
| | | } else { |
| | | // JWT鉴权失效 跳转到登录页 |
| | | window.location = getApsPage()+'/commonWeb?resetPwd=true' |
| | | window.location = getApsPage() + "/commonWeb?resetPwd=true" |
| | | } |
| | | return Promise.reject(res.data) |
| | | |
| | | // if(window.location.pathname && window.location.pathname !== '/login'){ |
| | | // window.location = window.location.origin+'/login' |
| | | // } |
| | | } else { |
| | | return res.data ? res.data : {} |
| | | } |
| | | }, |
| | | (error) => { |
| | | if(error.response.status === 401){ |
| | | if (isDev){ |
| | | alert("JWT失效,即将跳转至登录页..") |
| | | window.location = getApsPage()+'/login' |
| | | }else { |
| | | // JWT鉴权失效 跳转到登录页 |
| | | window.location = getApsPage()+'/login' |
| | | } |
| | | } |
| | | // if (error.response.status === 401) { |
| | | // if (isDev) { |
| | | // alert("JWT失效,即将跳转至登录页..") |
| | | // window.location = getApsPage() + "/login" |
| | | // } else { |
| | | // // JWT鉴权失效 跳转到登录页 |
| | | // window.location = getApsPage() + "/login" |
| | | // } |
| | | // } |
| | | let { message } = error |
| | | if (message === "Network Error") { |
| | | message = "后端接口连接异常" |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import Cookies from "js-cookie" |
| | | import UpdatePassWord from "./components/updatePassWord" |
| | | export default { |
| | | name: "SalesLead", |
| | |
| | | } |
| | | }, |
| | | created() { |
| | | const userObj = Cookies.get("userObj") |
| | | if (userObj) { |
| | | let userInfo = JSON.parse(userObj) |
| | | this.editConfig.userId = userInfo.id |
| | | this.username = userInfo.nickName |
| | | } else { |
| | | console.log("Object not found in cookie") |
| | | } |
| | | console.log(localStorage, "dddd") |
| | | }, |
| | | mounted() { |
| | | // this.username = document.cookie.replace(/(?:(?:^|.*;\s*)username\s*=\s*([^;]*).*$)|^.*$/, "$1") |
| | | console.log(localStorage, "mounted") |
| | | console.log(localStorage) |
| | | this.editConfig.userId = localStorage.getItem("uuid") |
| | | this.username = localStorage.getItem("username") |
| | | }, |
| | | methods: { |
| | | environmentType() { |
| | |
| | | type: "warning" |
| | | }) |
| | | .then(() => { |
| | | Cookies.remove("token") |
| | | // Cookies.remove("token") |
| | | // window.location.href = 'http://localhost:8080/login'; //本地的智慧工厂-登录页 |
| | | // window.location.href = "http:" + this.getApsPage() + "/login" |
| | | localStorage.removeItem("token") |
| | | localStorage.removeItem("uuid") |
| | | localStorage.removeItem("username") |
| | | // 跳转路由 |
| | | this.$router.push({ path: "/login" }) |
| | | this.$message({ |
| | |
| | | <el-table-column v-if="tableList.selectBox" type="selection" width="40" :selectable="selectable"> |
| | | </el-table-column> |
| | | <el-table-column v-if="tableList.selectIndex" type="index" label="序号" width="50"></el-table-column> |
| | | <slot name="tableLeft" /> |
| | | <el-table-column |
| | | v-for="(item, i) in tableList.tableColumn" |
| | | :key="i" |
| | |
| | | return { |
| | | pagerOptions: { |
| | | currPage: 1, |
| | | pageSize: 10, |
| | | pageSize: 15, |
| | | totalCount: 0 |
| | | }, |
| | | pagerEvents |
| | |
| | | import Vue from 'vue' |
| | | import Vuex from 'vuex' |
| | | import getSupplierName from "./modules/getSupplierName" |
| | | import Vue from "vue" |
| | | import Vuex from "vuex" |
| | | // import getSupplierName from "./modules/getSupplierName" |
| | | |
| | | Vue.use(Vuex) |
| | | |
| | | export default new Vuex.Store({ |
| | | state: { |
| | | menus:[], |
| | | menus: [] |
| | | }, |
| | | getters: { |
| | | }, |
| | | getters: {}, |
| | | mutations: { |
| | | setMenus(state,payload){ |
| | | setMenus(state, payload) { |
| | | state.menus = payload |
| | | } |
| | | }, |
| | | actions: { |
| | | }, |
| | | actions: {}, |
| | | modules: { |
| | | getSupplierName |
| | | // getSupplierName |
| | | } |
| | | }) |
| | |
| | | <el-table-column prop="materialName" show-overflow-tooltip label="产品名称"> </el-table-column> |
| | | </template> |
| | | <template slot="tableButton"> |
| | | <el-table-column prop="amount" label="数量" min-width="110"> |
| | | <el-table-column prop="amount" label="数量"> |
| | | <template slot-scope="scope"> |
| | | <el-input |
| | | style="width: 100%" |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | // import { saveMaterialApply } from "@/api/outsourceEnterpriseManage/index" |
| | | import { saveMaterialApply } from "@/api/orderManageModule/orderManage" |
| | | import SelectCommonDialog from "@/views/other/commonDialog/SelectCommonDialog" |
| | | export default { |
| | | name: "AddSalesDetailsDialog", |
| | |
| | | const params = this.saveParams() |
| | | console.log(params) |
| | | this.isAddloading = true |
| | | // saveMaterialApply(params).then((res) => { |
| | | // if (res.code === 200) { |
| | | // this.editRow.visible = false |
| | | // this.$message.success(this.editRow.title + "成功!") |
| | | // this.$emit("reRreshData") |
| | | // } |
| | | // this.isAddloading = false |
| | | // }) |
| | | saveMaterialApply(params).then((res) => { |
| | | if (res.code === 200) { |
| | | this.editRow.visible = false |
| | | this.$message.success(this.editRow.title + "成功!") |
| | | this.$emit("reRreshData") |
| | | } |
| | | this.isAddloading = false |
| | | }) |
| | | }, |
| | | saveParams() { |
| | | let commonParam = { |
| | |
| | | <template slot="tableButton"> |
| | | <el-table-column label="操作" width="160" fixed="right"> |
| | | <template slot-scope="scope"> |
| | | <el-button v-if="scope.row.status == 0" type="text" size="small">待确认</el-button> |
| | | <template v-if="scope.row.status == 1"> |
| | | <el-button type="text" size="small">确认</el-button> |
| | | <el-button type="text" size="small">取消</el-button> |
| | | </template> |
| | | <el-button |
| | | v-else-if="scope.row.status == 2 || scope.row.status == 4" |
| | | type="text" |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { |
| | | outsourceOrderList, |
| | | outsourceOrderOverview, |
| | | outsourceOrderProductList, |
| | | getMaterialApplyList |
| | | // changeOutsourceOrderStatus |
| | | } from "@/api/orderManageModule/orderManage" |
| | | import pageMixin from "@/components/makepager/pager/mixin/pageMixin" |
| | | import ApplyMaterialsDialog from "@/views/orderManageModule/orderManage/components/ApplyMaterialsDialog" |
| | | import DeliveryDialog from "@/views/orderManageModule/orderManage/components/DeliveryDialog" |
| | |
| | | tableList: {}, |
| | | tableColumn: [ |
| | | { label: "订单编号", prop: "number", min: 90, default: true }, |
| | | { label: "产品数量", prop: "quotationName", min: 120 }, |
| | | { label: "签约日期", prop: "validity_date", min: 100 }, |
| | | { label: "交付日期", prop: "client_name", min: 120 }, |
| | | { label: "状态", prop: "quotationStatus", isCallMethod: true, getCallMethod: this.getStatus } |
| | | { label: "产品数量", prop: "productQuantity", min: 120 }, |
| | | { label: "签约日期", prop: "signTime", min: 100 }, |
| | | { label: "交付日期", prop: "deliveryDate", min: 120 }, |
| | | { label: "状态", prop: "status", isCallMethod: true, getCallMethod: this.getStatus } |
| | | ], |
| | | showCol: ["订单编号", "产品数量", "签约日期", "交付日期", "状态"], |
| | | selectRow: {}, |
| | |
| | | bottomTwoTableList2: {}, |
| | | bottomTwoTableList3: {}, |
| | | productColumn: [ |
| | | { label: "产品名称", prop: "number", min: 90, default: true }, |
| | | { label: "产品编号", prop: "quotationName", min: 120 }, |
| | | { label: "Bom编号", prop: "validity_date", min: 100 }, |
| | | { label: "产品规格", prop: "client_name", min: 120 }, |
| | | { label: "产品数量", prop: "quotationStatus" }, |
| | | { label: "单位", prop: "client_name", min: 120 } |
| | | { label: "产品名称", prop: "productName", min: 90, default: true }, |
| | | { label: "产品编号", prop: "productId", min: 120 }, |
| | | { label: "Bom编号", prop: "bomID", min: 100 }, |
| | | { label: "产品规格", prop: "specs", min: 120 }, |
| | | { label: "产品数量", prop: "amount" }, |
| | | { label: "单位", prop: "unit", min: 120 } |
| | | ], |
| | | showProductCol: ["产品名称", "产品编号", "Bom编号", "产品规格", "产品数量", "单位"], |
| | | materialRquestColumn: [ |
| | | { label: "产品名称", prop: "number", min: 90, default: true }, |
| | | { label: "产品编号", prop: "quotationName", min: 120 }, |
| | | { label: "产品数量", prop: "validity_date", min: 100 }, |
| | | { label: "产品规格", prop: "client_name", min: 120 }, |
| | | { label: "产品型号", prop: "quotationStatus" }, |
| | | { label: "单位", prop: "client_name", min: 120 } |
| | | { label: "产品名称", prop: "materialName", min: 90, default: true }, |
| | | { label: "产品编号", prop: "materialNumber", min: 120 }, |
| | | { label: "产品数量", prop: "amount", min: 100 }, |
| | | { label: "产品规格", prop: "specs", min: 120 }, |
| | | { label: "产品型号", prop: "type" }, |
| | | { label: "单位", prop: "unit", min: 120 } |
| | | ], |
| | | showMaterialRquestCol: ["产品名称", "产品编号", "产品数量", "产品规格", "产品型号", "单位"], |
| | | deliveryRquestColumn: [ |
| | | { label: "发货单号", prop: "number", default: true }, |
| | | { label: "产品名称", prop: "number", default: true }, |
| | | { label: "产品编号", prop: "quotationName" }, |
| | | { label: "订单数量", prop: "validity_date" }, |
| | | { label: "产品名称", prop: "productName", default: true }, |
| | | { label: "产品编号", prop: "productId" }, |
| | | { label: "订单数量", prop: "amount" }, |
| | | { label: "发货数量", prop: "validity_date" }, |
| | | { label: "产品规格", prop: "client_name" }, |
| | | { label: "产品型号", prop: "quotationStatus" }, |
| | | { label: "单位", prop: "client_name" }, |
| | | { label: "产品规格", prop: "specs" }, |
| | | { label: "产品型号", prop: "model" }, |
| | | { label: "单位", prop: "unit" }, |
| | | { label: "运单号", prop: "validity_date" }, |
| | | { label: "承运商", prop: "validity_date" }, |
| | | { label: "创建时间", prop: "client_name", min: 100 } |
| | |
| | | visible: false, |
| | | title: "发货", |
| | | infomation: {} |
| | | }, |
| | | searchParam: { |
| | | keyword: "", |
| | | page: 1, |
| | | pageSize: 15 |
| | | } |
| | | } |
| | | }, |
| | | created() { |
| | | this.setTable() |
| | | this.getData() |
| | | }, |
| | | methods: { |
| | | reRreshData() { |
| | | this.getData() |
| | | }, |
| | | // 获取top订单列表数据 |
| | | async getData() { |
| | | this.searchParam.page = this.pagerOptions.currPage |
| | | this.searchParam.pageSize = this.pagerOptions.pageSize |
| | | let rsp = await outsourceOrderList(this.searchParam) |
| | | let list = rsp |
| | | console.log(list) |
| | | if (list && list.code == 200) { |
| | | this.tableList.tableInfomation = list.data |
| | | this.pagerOptions.totalCount = list.total |
| | | if (list.total > 0) { |
| | | this.selectRow = list.data[0] |
| | | this.getProductListMethod(list.data[0].id) |
| | | } |
| | | this.overview() |
| | | } |
| | | }, |
| | | // 获取产品信息 |
| | | getProductListMethod(id) { |
| | | outsourceOrderProductList({ outsourcingOrderId: id }).then((res) => { |
| | | console.log(res) |
| | | if (res.code == 200) { |
| | | this.bottomTwoTableList1.tableInfomation = res.data |
| | | } |
| | | }) |
| | | }, |
| | | // 获取物料申请单 |
| | | getMaterialApplyList(number) { |
| | | getMaterialApplyList({ number: number, page: 1, pageSize: 15 }).then((res) => { |
| | | console.log(res) |
| | | if (res.code == 200) { |
| | | this.bottomTwoTableList2.tableInfomation = res.data |
| | | } |
| | | }) |
| | | }, |
| | | overview() { |
| | | outsourceOrderOverview().then((reply) => { |
| | | this.totalObject.value = reply.data.total || 0 |
| | | this.otherOptions.map((item) => { |
| | | if (item.label === "待分配") { |
| | | item.value = reply.data.waitAssigned |
| | | } else if (item.label === "已分配") { |
| | | item.value = reply.data.hasAssigned |
| | | } |
| | | }) |
| | | }) |
| | | }, |
| | | addCommonClick() { |
| | | alert("露西666") |
| | | }, |
| | | searchClick() {}, |
| | | onFilterSearch() {}, |
| | | tableRowClick() {}, |
| | | tableRowClick(row, column, event) { |
| | | console.log(row, column, event) |
| | | this.selectRow = row |
| | | if (this.activeNameBottom == 1) { |
| | | this.getProductListMethod(this.selectRow.id) |
| | | } else { |
| | | this.getMaterialApplyList(this.selectRow.number) |
| | | } |
| | | }, |
| | | tableRowClassName({ row }) { |
| | | if (row.id == this.selectRow.id) { |
| | | return "onSelect" |
| | | } |
| | | }, |
| | | getSelectArray() {}, |
| | | // 申请物料 |
| | | applyClick(row) { |
| | |
| | | }, |
| | | tabClickBottom(activeNameBottom) { |
| | | this.activeNameBottom = activeNameBottom |
| | | // if (activeNameBottom == 1) { |
| | | // this.getProductListMethod(this.selectRow.id); |
| | | // } else { |
| | | // this.getMaterialApplyList(this.selectRow.number); |
| | | // } |
| | | if (activeNameBottom == 1) { |
| | | this.getProductListMethod(this.selectRow.id) |
| | | } else { |
| | | this.getMaterialApplyList(this.selectRow.number) |
| | | } |
| | | }, |
| | | setTable() { |
| | | this.tableList = { |
| | | selectIndex: true, |
| | | selectBox: true, |
| | | tableInfomation: [ |
| | | { |
| | | number: "1111", |
| | | status: 4 |
| | | } |
| | | ], |
| | | tableInfomation: [], |
| | | allcol: [], |
| | | showcol: this.showCol, |
| | | tableColumn: this.setColumnVisible(this.showCol, this.tableColumn) |
| | |
| | | }, |
| | | // 状态 |
| | | getStatus(val) { |
| | | return val === 0 |
| | | ? "待分配" |
| | | : val === 1 |
| | | ? "已分配" |
| | | return val === 1 |
| | | ? "待确认" |
| | | : val === 2 |
| | | ? "待生产" |
| | | : val === 3 |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { getSupplierTypeList, updateSupplierType, updateIndustry, getIndustryList } from "@/api/supplierManage/supplier" |
| | | // import { getSupplierTypeList, updateSupplierType, updateIndustry, getIndustryList } from "@/api/supplierManage/supplier" |
| | | export default { |
| | | name: "EditDropdownDialog", |
| | | props: { |
| | |
| | | this.getIndustryList() |
| | | } |
| | | }, |
| | | // 供应商类型 |
| | | async getSupplierTypeList() { |
| | | await getSupplierTypeList({ |
| | | page: 1, |
| | | pageSize: 100 |
| | | }).then((res) => { |
| | | console.log(res.data) |
| | | this.tableData = res.data.list |
| | | }) |
| | | }, |
| | | // 所属行业 |
| | | async getIndustryList() { |
| | | await getIndustryList({ |
| | | page: 1, |
| | | pageSize: 100 |
| | | }).then((res) => { |
| | | console.log(res.data) |
| | | this.tableData = res.data.list |
| | | }) |
| | | }, |
| | | |
| | | handleClose() { |
| | | this.editConfig.editVisible = false |
| | | }, |
| | |
| | | ite.ID = 0 |
| | | return { ...ite } |
| | | }) |
| | | if (this.editConfig.title === "供应商类型") { |
| | | updateSupplierType({ |
| | | supplierTypes: this.tableData |
| | | }).then((res) => { |
| | | console.log(res) |
| | | if (res.code === 200) { |
| | | this.$message.success("编辑成功") |
| | | this.$parent.getSupplierTypeList() |
| | | this.handleClose() |
| | | } |
| | | }) |
| | | } else if (this.editConfig.title === "所属行业") { |
| | | updateIndustry({ |
| | | industries: this.tableData |
| | | }).then((res) => { |
| | | console.log(res) |
| | | if (res.code === 200) { |
| | | this.$message.success("编辑成功") |
| | | this.$parent.getIndustryList() |
| | | this.handleClose() |
| | | } |
| | | }) |
| | | } |
| | | // if (this.editConfig.title === "供应商类型") { |
| | | // } else if (this.editConfig.title === "所属行业") { |
| | | // } |
| | | } |
| | | } |
| | | } |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | // import { postGetMaterialList } from "@/api/ProductiveTask/productBom" |
| | | import { getMaterialList } from "@/api/common/other" |
| | | import pageMixin from "@/components/makepager/pager/mixin/pageMixin" |
| | | export default { |
| | | name: "EditSelCommonDialog", |
| | |
| | | bomParams: { |
| | | keyword: "", |
| | | page: 1, |
| | | pageSize: 10, |
| | | types: ["原材料", "半成品", "成品"] |
| | | pageSize: 10 |
| | | } |
| | | } |
| | | }, |
| | |
| | | { |
| | | label: "产品编码", |
| | | prop: "id", |
| | | min: 110, |
| | | isShowColumn: true, |
| | | default: true |
| | | }, |
| | |
| | | { |
| | | label: "产品型号", |
| | | prop: "type", |
| | | width: 90, |
| | | isShowColumn: showcol.includes("产品型号"), |
| | | default: false |
| | | } |
| | |
| | | }, |
| | | // 产品名称 |
| | | async getProductList() { |
| | | this.bomParams.page = this.pagerOptions.currPage ? this.pagerOptions.currPage : 1 |
| | | this.bomParams.pageSize = this.pagerOptions.pageSize ? this.pagerOptions.pageSize : 15 |
| | | // let params = JSON.parse(JSON.stringify(this.bomParams)) |
| | | // await postGetMaterialList(params).then((res) => { |
| | | // console.log(res.data) |
| | | // if (res.code === 200) { |
| | | // if (res.data) { |
| | | // this.tableList.tableInfomation = res.data || [] |
| | | // this.pagerOptions.totalCount = res.total ? res.total : 0 |
| | | // } else { |
| | | // this.tableList.tableInfomation = [] |
| | | // } |
| | | // } |
| | | // this.loading = false |
| | | // }) |
| | | // this.bomParams.page = this.pagerOptions.currPage ? this.pagerOptions.currPage : 1 |
| | | // this.bomParams.pageSize = this.pagerOptions.pageSize ? this.pagerOptions.pageSize : 15 |
| | | let params = JSON.parse(JSON.stringify(this.bomParams)) |
| | | console.log(params) |
| | | await getMaterialList(params).then((res) => { |
| | | console.log(res.data) |
| | | if (res.code === 200) { |
| | | if (res.data) { |
| | | this.tableList.tableInfomation = res.data || [] |
| | | this.pagerOptions.totalCount = res.total ? res.total : 0 |
| | | } else { |
| | | this.tableList.tableInfomation = [] |
| | | } |
| | | } |
| | | this.loading = false |
| | | }) |
| | | }, |
| | | handleClose() { |
| | | this.editConfig.editVisible = false |
| | |
| | | this.$refs.loginForm.validate((valid) => { |
| | | if (valid) { |
| | | // 登录 |
| | | // 注意 这里的演示没有传验证码 |
| | | // 具体需要传递的数据请自行修改代码 |
| | | login({ |
| | | username: this.formLogin.username, |
| | | password: this.formLogin.password, |
| | | captcha: this.formLogin.code, |
| | | captchaId: this.captchaId |
| | | }).then((rsp) => { |
| | | // 重定向对象不存在则返回顶层路径 |
| | | if (rsp != "") { |
| | | // this.$message.warning(rsp); |
| | | this.error = "填入信息错误,请检查!" |
| | | let _this = this |
| | | setTimeout(function () { |
| | | _this.error = "" |
| | | }, 3000) |
| | | if (rsp.indexOf("验证码错误") > -1) { |
| | | }).then((res) => { |
| | | if (res.code == 200) { |
| | | this.$message.success("登录成功") |
| | | this.$router.push({ path: "/orderManageModule/orderManage" }) |
| | | localStorage.setItem("token", res.data.token) |
| | | localStorage.setItem("username", res.data.user.username) |
| | | localStorage.setItem("uuid", res.data.user.id) |
| | | } else { |
| | | this.$message.warning(res.msg) |
| | | if (res.msg == "验证码错误") { |
| | | this.getCaptchaData() |
| | | } |
| | | return |
| | | } |
| | | this.$router.push({ path: "/commonWeb" }) |
| | | console.log(res, "dddd") |
| | | }) |
| | | } else { |
| | | // 登录表单校验失败 |
| | |
| | | lintOnSave: false, |
| | | productionSourceMap: false, // 如果你不需要生产环境的source map, 可以将其设置为false 以加速生产环境构建 |
| | | devServer: { |
| | | historyApiFallback: true, |
| | | allowedHosts: "all", |
| | | proxy: { |
| | | "/api/menu":{ |
| | | target:"http://192.168.20.119:8001", |
| | | // "/api/menu": { |
| | | // target: "http://192.168.20.119:8001", |
| | | // ws: true, |
| | | // changeOrigin: true |
| | | // }, |
| | | "/api-s": { |
| | | target: "http://192.168.20.119:9081", |
| | | ws: true, |
| | | changeOrigin: true |
| | | }, |
| | | "/api": { |
| | | |
| | | // target: "http://192.168.20.118:8889", // http://192.168.20.119:8002 http://fai365.com:30150/ |
| | | // target: "http://192.168.20.120:8004", |
| | | target: "http://192.168.20.119:8004", // http://192.168.20.119:8004 http://fai365.com:30150/ |
| | | target: "http://192.168.20.119:8001", |
| | | ws: true, |
| | | changeOrigin: true |
| | | } |