| | |
| | | // 客户管理列表 |
| | | export function getClientList(data) { |
| | | return request({ |
| | | url: "/api/client/list", |
| | | url: "/api-srm/client/list", |
| | | method: "post", |
| | | data |
| | | }) |
| | |
| | | // 添加客户管理 |
| | | export function getAddClient(data) { |
| | | return request({ |
| | | url: "/api/client/add", |
| | | url: "/api-srm/client/add", |
| | | method: "post", |
| | | data |
| | | }) |
| | |
| | | // 删除客户管理 |
| | | export function getDeleteClient(data) { |
| | | return request({ |
| | | url: "/api/client/delete", |
| | | url: "/api-srm/client/delete", |
| | | method: "delete", |
| | | data |
| | | }) |
| | |
| | | // 更新客户管理 |
| | | export function getUpdateClient(data) { |
| | | return request({ |
| | | url: "/api/client/update", |
| | | url: "/api-srm/client/update", |
| | | method: "put", |
| | | data |
| | | }) |
| | |
| | | // 获取客户来源列表 |
| | | export function getClientOrigin() { |
| | | return request({ |
| | | url: "/api/clientOrigin/list", |
| | | url: "/api-srm/clientOrigin/list", |
| | | method: "get" |
| | | }) |
| | | } |
| | |
| | | // 获取客户状态列表 |
| | | export function getClientStatus() { |
| | | return request({ |
| | | url: "/api/clientStatus/list", |
| | | url: "/api-srm/clientStatus/list", |
| | | method: "get" |
| | | }) |
| | | } |
| | |
| | | // 获取客户来源等所有数据 |
| | | export function getAllData() { |
| | | return request({ |
| | | url: "/api/data/getAllData", |
| | | url: "/api-srm/data/getAllData", |
| | | method: "get" |
| | | }) |
| | | } |
| | |
| | | // 检查客户名称是否重复 |
| | | export function checkNameClient(data) { |
| | | return request({ |
| | | url: "/api/client/checkName", |
| | | url: "/api-srm/client/checkName", |
| | | method: "post", |
| | | data |
| | | }) |
| | |
| | | // 销售线索列表 |
| | | export function getSalesLeadsList(data) { |
| | | return request({ |
| | | url: "/api/salesLeads/list", |
| | | url: "/api-srm/salesLeads/list", |
| | | method: "post", |
| | | data |
| | | }) |
| | |
| | | // 添加销售线索 |
| | | export function getAddSalesLeads(data) { |
| | | return request({ |
| | | url: "/api/salesLeads/add", |
| | | url: "/api-srm/salesLeads/add", |
| | | method: "post", |
| | | data |
| | | }) |
| | |
| | | // 删除销售线索 |
| | | export function getDeleteSalesLeads(data) { |
| | | return request({ |
| | | url: "/api/salesLeads/delete", |
| | | url: "/api-srm/salesLeads/delete", |
| | | method: "delete", |
| | | data |
| | | }) |
| | |
| | | // 更新销售线索 |
| | | export function getUpdateSalesLeads(data) { |
| | | return request({ |
| | | url: "/api/salesLeads/update", |
| | | url: "/api-srm/salesLeads/update", |
| | | method: "put", |
| | | data |
| | | }) |
| | |
| | | // 推进销售线索 |
| | | export function pushSalesSources(data) { |
| | | return request({ |
| | | url: "/api/salesLeads/push", |
| | | url: "/api-srm/salesLeads/push", |
| | | method: "post", |
| | | data |
| | | }) |
| | |
| | | // 商机来源列表 |
| | | export function getSalesSourcesList() { |
| | | return request({ |
| | | url: "/api/salesSources/list", |
| | | url: "/api-srm/salesSources/list", |
| | | method: "get" |
| | | }) |
| | | } |
| | |
| | | |
| | | // 负责人 |
| | | // export const getMemberListFromGrpc = async (data) => { |
| | | // return await axios.get(`/api/m/getMemberListFromGrpc`, { |
| | | // return await axios.get(`/api-srm/m/getMemberListFromGrpc`, { |
| | | // params: data |
| | | // }) |
| | | // } |
| | | export function getMemberListFromGrpc(data) { |
| | | return request({ |
| | | url: "/api/m/getMemberListFromGrpc", |
| | | url: "/api-srm/m/getMemberListFromGrpc", |
| | | method: "get", |
| | | params: data |
| | | }) |
| | | } |
| | | } |
| | | // plc配置的列表 |
| | | export const getMiniDictList = (data) => { |
| | | return request({ |
| | | url: "/api-srm/dict/getMiniDictList", |
| | | method: "post", |
| | | data, |
| | | }); |
| | | }; |
| | | // plc配置的更新 |
| | | export const saveMiniDict = (data) => { |
| | | return request({ |
| | | url: "/api-srm/dict/saveMiniDict", |
| | | method: "post", |
| | | data, |
| | | }); |
| | | }; |
| | |
| | | import request from "@/common/untils/request" |
| | | export function getCodeStandardList(data) { |
| | | // return axios.get(`/api/code/getCodeList`, { |
| | | // return axios.get(`/api-srm/code/getCodeList`, { |
| | | // params: data |
| | | // }) |
| | | |
| | | return request({ |
| | | url: "/api/code/getCodeList", |
| | | url: "/api-srm/code/getCodeList", |
| | | method: "get", |
| | | params: data |
| | | }) |
| | |
| | | // 获取自动编码 |
| | | export function getAutoCode(data) { |
| | | return request({ |
| | | url: "/api/code/getAutoCode", |
| | | url: "/api-srm/code/getAutoCode", |
| | | method: "post", |
| | | data |
| | | }) |
| | |
| | | |
| | | // 产品列表 |
| | | // export const getProductList = async (data) => { |
| | | // return await axios.get(`/api/p/getProductList`, { |
| | | // return await axios.get(`/api-srm/p/getProductList`, { |
| | | // params: data |
| | | // }) |
| | | // } |
| | | export function getProductList(data) { |
| | | return request({ |
| | | url: "/api/p/getProductList", |
| | | url: "/api-srm/p/getProductList", |
| | | method: "get", |
| | | params:data |
| | | }) |
| | |
| | | // 查询单条供应商数据 |
| | | export function getSupplierByNumber(data) { |
| | | return request({ |
| | | url: `/api/s/getSupplierByNumber/${data}`, |
| | | url: `/api-srm/s/getSupplierByNumber/${data}`, |
| | | method: "get", |
| | | data |
| | | }) |
| | |
| | | // 创建产品 |
| | | export function createProduct(data) { |
| | | return request({ |
| | | url: "/api/p/createProduct", |
| | | url: "/api-srm/p/createProduct", |
| | | method: "post", |
| | | data |
| | | }) |
| | |
| | | // 删除产品 |
| | | export function deleteProduct(data) { |
| | | return request({ |
| | | url: "/api/p/deleteProduct", |
| | | url: "/api-srm/p/deleteProduct", |
| | | method: "delete", |
| | | data |
| | | }) |
| | |
| | | // 更新产品 |
| | | export function updateProduct(data) { |
| | | return request({ |
| | | url: "/api/p/updateProduct", |
| | | url: "/api-srm/p/updateProduct", |
| | | method: "put", |
| | | data |
| | | }) |
| | |
| | | |
| | | // 添加产品获取产品列表 |
| | | // export const getProductListFromGrpc = async (data) => { |
| | | // return await axios.get(`/api/p/getProductListFromGrpc`, { |
| | | // return await axios.get(`/api-srm/p/getProductListFromGrpc`, { |
| | | // params: data |
| | | // }) |
| | | // } |
| | | export function getProductListFromGrpc(data) { |
| | | return request({ |
| | | url: "/api/p/getProductListFromGrpc", |
| | | url: "/api-srm/p/getProductListFromGrpc", |
| | | method: "get", |
| | | params:data |
| | | }) |
| | |
| | | // 销售线索列表 |
| | | export function getSalesLeadsList(data) { |
| | | return request({ |
| | | url: "/api/salesLeads/list", |
| | | url: "/api-srm/salesLeads/list", |
| | | method: "post", |
| | | data |
| | | }) |
| | |
| | | // 添加销售线索 |
| | | export function getAddSalesLeads(data) { |
| | | return request({ |
| | | url: "/api/salesLeads/add", |
| | | url: "/api-srm/salesLeads/add", |
| | | method: "post", |
| | | data |
| | | }) |
| | |
| | | // 删除销售线索 |
| | | export function getDeleteSalesLeads(data) { |
| | | return request({ |
| | | url: "/api/salesLeads/delete", |
| | | url: "/api-srm/salesLeads/delete", |
| | | method: "delete", |
| | | data |
| | | }) |
| | |
| | | // 更新销售线索 |
| | | export function getUpdateSalesLeads(data) { |
| | | return request({ |
| | | url: "/api/salesLeads/update", |
| | | url: "/api-srm/salesLeads/update", |
| | | method: "put", |
| | | data |
| | | }) |
| | |
| | | // 推进销售线索 |
| | | export function pushSalesSources(data) { |
| | | return request({ |
| | | url: "/api/salesLeads/push", |
| | | url: "/api-srm/salesLeads/push", |
| | | method: "post", |
| | | data |
| | | }) |
| | |
| | | // 商机来源列表 |
| | | export function getSalesSourcesList() { |
| | | return request({ |
| | | url: "/api/salesSources/list", |
| | | url: "/api-srm/salesSources/list", |
| | | method: "get" |
| | | }) |
| | | } |
| | | // 采购单列表 |
| | | // export const getPurchaseList = async (data) => { |
| | | // return await axios.get(`/api/purchase/purchaseList`, { |
| | | // return await axios.get(`/api-srm/purchase/purchaseList`, { |
| | | // params: data |
| | | // }) |
| | | // } |
| | | export function getPurchaseList(data) { |
| | | return request({ |
| | | url: "/api/purchase/purchaseList", |
| | | url: "/api-srm/purchase/purchaseList", |
| | | method: "get", |
| | | params: data |
| | | }) |
| | |
| | | // 创建采购单 |
| | | export function addPurchase(data) { |
| | | return request({ |
| | | url: "/api/purchase/purchase", |
| | | url: "/api-srm/purchase/purchase", |
| | | method: "post", |
| | | data |
| | | }) |
| | |
| | | // 更新采购单 |
| | | export function updatePurchase(data) { |
| | | return request({ |
| | | url: "/api/purchase/purchase", |
| | | url: "/api-srm/purchase/purchase", |
| | | method: "put", |
| | | data |
| | | }) |
| | |
| | | // 获取采购单信息 |
| | | export function getPurchaseInfo(data) { |
| | | return request({ |
| | | url: "/api/purchase/purchase/" + data.id, |
| | | url: "/api-srm/purchase/purchase/" + data.id, |
| | | method: "get", |
| | | data |
| | | }) |
| | |
| | | // 删除采购单信息 |
| | | export function deletePurchase(data) { |
| | | return request({ |
| | | url: "/api/purchase/purchase/" + data.id, |
| | | url: "/api-srm/purchase/purchase/" + data.id, |
| | | method: "delete", |
| | | data |
| | | }) |
| | |
| | | // 提交采购单 |
| | | export function submitPurchase(data) { |
| | | return request({ |
| | | url: "/api/purchase/submit", |
| | | url: "/api-srm/purchase/submit", |
| | | method: "post", |
| | | data |
| | | }) |
| | |
| | | // 确认采购单 |
| | | export function newSubmitPurchase(data) { |
| | | return request({ |
| | | url: "/api/purchase/newSubmit", |
| | | url: "/api-srm/purchase/newSubmit", |
| | | method: "post", |
| | | data |
| | | }) |
| | |
| | | // 新建采购类型 |
| | | export function savePurchaseType(data) { |
| | | return request({ |
| | | url: "/api/purchase/purchaseType", |
| | | url: "/api-srm/purchase/purchaseType", |
| | | method: "post", |
| | | data |
| | | }) |
| | |
| | | // 获取采购类型 |
| | | export function getPurchaseType(data) { |
| | | return request({ |
| | | url: "/api/purchase/purchaseTypeList", |
| | | url: "/api-srm/purchase/purchaseTypeList", |
| | | method: "get", |
| | | data |
| | | }) |
| | | } |
| | | // 质检列表 |
| | | export const qualityInspectList = async (data) => { |
| | | return await axios.get(`/api/purchase/qualityInspectList`, { |
| | | return await axios.get(`/api-srm/purchase/qualityInspectList`, { |
| | | params: data |
| | | }) |
| | | } |
| | | // 获取仓库列表 |
| | | export function getWarehouseInfo() { |
| | | return request({ |
| | | url: "/api/purchase/getWarehouseInfo/", |
| | | url: "/api-srm/purchase/getWarehouseInfo/", |
| | | method: "get" |
| | | }) |
| | | } |
| | | // 获取产品/收货信息 |
| | | export function getOperationInfo(data) { |
| | | return request({ |
| | | url: "/api/purchase/getOperationInfo/" + data.id, |
| | | url: "/api-srm/purchase/getOperationInfo/" + data.id, |
| | | method: "get", |
| | | data |
| | | }) |
| | |
| | | // 获取确认列表信息 |
| | | export function getPurchaseProductConfirmInfo(data) { |
| | | return request({ |
| | | url: "/api/purchase/getPurchaseProductConfirmInfo/" + data, |
| | | url: "/api-srm/purchase/getPurchaseProductConfirmInfo/" + data, |
| | | method: "get", |
| | | data |
| | | }) |
| | |
| | | // 确认收货 |
| | | export function savePurchaseProductConfirm(data) { |
| | | return request({ |
| | | url: "/api/purchase/savePurchaseProductConfirm", |
| | | url: "/api-srm/purchase/savePurchaseProductConfirm", |
| | | method: "post", |
| | | data |
| | | }) |
| | |
| | | // 获取质检列表信息 |
| | | export function getPurchaseQualityInspectionInfo(data) { |
| | | return request({ |
| | | url: "/api/purchase/getPurchaseQualityInspectionInfo", |
| | | url: "/api-srm/purchase/getPurchaseQualityInspectionInfo", |
| | | method: "post", |
| | | data |
| | | }) |
| | |
| | | // 批量合格入库 |
| | | export function savePurchaseQualityInspectionInfo(data) { |
| | | return request({ |
| | | url: "/api/purchase/savePurchaseQualityInspectionInfo", |
| | | url: "/api-srm/purchase/savePurchaseQualityInspectionInfo", |
| | | method: "post", |
| | | data |
| | | }) |
| | |
| | | // 全部合格入库 |
| | | export function allProductInWarehouse(data) { |
| | | return request({ |
| | | url: "/api/purchase/allProductInWarehouse", |
| | | url: "/api-srm/purchase/allProductInWarehouse", |
| | | method: "post", |
| | | data |
| | | }) |
| | |
| | | // 委外企业新增 |
| | | export const addEnterprise = (data) => { |
| | | return request({ |
| | | url: "/api-s/v1/outsourcing/enterprise/add", |
| | | url: "/api-srm/outsourcing/enterprise/add", |
| | | method: "post", |
| | | data |
| | | }) |
| | |
| | | // 委外企业修改 |
| | | export const updateEnterprise = (data) => { |
| | | return request({ |
| | | url: "/api-s/v1/outsourcing/enterprise/update", |
| | | url: "/api-srm/outsourcing/enterprise/update", |
| | | method: "post", |
| | | data |
| | | }) |
| | |
| | | // 委外企业列表 |
| | | export const enterpriseList = (data) => { |
| | | return request({ |
| | | url: "/api-s/v1/outsourcing/enterprise/list", |
| | | url: "/api-srm/outsourcing/enterprise/list", |
| | | method: "get", |
| | | params: data |
| | | }) |
| | |
| | | // 委外企业统计 |
| | | export const enterpriseOverview = () => { |
| | | return request({ |
| | | url: "/api-s/v1/outsourcing/enterprise/overview", |
| | | url: "/api-srm/outsourcing/enterprise/overview", |
| | | method: "get" |
| | | }) |
| | | } |
| | |
| | | // 服务商列表 |
| | | export function getSupplierList(data) { |
| | | return request({ |
| | | url: "/api/s/getSupplierList", |
| | | url: "/api-srm/s/getSupplierList", |
| | | method: "get", |
| | | params: data |
| | | }) |
| | |
| | | // 创建服务商 |
| | | export function createSupplier(data) { |
| | | return request({ |
| | | url: "/api/s/createSupplier", |
| | | url: "/api-srm/s/createSupplier", |
| | | method: "post", |
| | | data |
| | | }) |
| | |
| | | // 删除服务商 |
| | | export function deleteSupplier(data) { |
| | | return request({ |
| | | url: "/api/s/deleteSupplier", |
| | | url: "/api-srm/s/deleteSupplier", |
| | | method: "delete", |
| | | data |
| | | }) |
| | |
| | | // 更新服务商 |
| | | export function updateSupplier(data) { |
| | | return request({ |
| | | url: "/api/s/updateSupplier", |
| | | url: "/api-srm/s/updateSupplier", |
| | | method: "put", |
| | | data |
| | | }) |
| | |
| | | // 修改服务商状态 |
| | | export function changeSupplierStatus(data) { |
| | | return request({ |
| | | url: "/api/s/changeSupplierStatus", |
| | | url: "/api-srm/s/changeSupplierStatus", |
| | | method: "post", |
| | | data |
| | | }) |
| | |
| | | // 用id查询服务商 |
| | | export function findSupplier(data) { |
| | | return request({ |
| | | url: "/api/s/findSupplier", |
| | | url: "/api-srm/s/findSupplier", |
| | | method: "get", |
| | | params: data |
| | | }) |
| | |
| | | // 更新服务商类型 |
| | | export function updateSupplierType(data) { |
| | | return request({ |
| | | url: "/api/st/updateSupplierType", |
| | | url: "/api-srm/st/updateSupplierType", |
| | | method: "put", |
| | | data |
| | | }) |
| | |
| | | // 服务商类型列表 |
| | | export function getSupplierTypeList(data) { |
| | | return request({ |
| | | url: "/api/st/getSupplierTypeList", |
| | | url: "/api-srm/st/getSupplierTypeList", |
| | | method: "get", |
| | | params: data |
| | | }) |
| | |
| | | |
| | | // 上传合同 |
| | | // export const createContract = async (data) => { |
| | | // return await axios.post(`/api/con/createContract`, data, { |
| | | // return await axios.post(`/api-srm/con/createContract`, data, { |
| | | // headers: { "Content-Type": "application/x-www-form-urlencoded;charset=utf-8" } |
| | | // }) |
| | | // } |
| | | export function createContract(data) { |
| | | return request({ |
| | | url: "/api/con/createContract", |
| | | url: "/api-srm/con/createContract", |
| | | method: "post", |
| | | data |
| | | }) |
| | |
| | | // 删除合同 |
| | | export function deleteContract(data) { |
| | | return request({ |
| | | url: "/api/con/deleteContract", |
| | | url: "/api-srm/con/deleteContract", |
| | | method: "delete", |
| | | data |
| | | }) |
| | |
| | | // 预览合同 |
| | | export function previewContract(data) { |
| | | return request({ |
| | | url: "/api/con/previewContract", |
| | | url: "/api-srm/con/previewContract", |
| | | method: "get", |
| | | params: data |
| | | }) |
| | |
| | | // 下载合同 |
| | | export function downloadContract(data) { |
| | | return request({ |
| | | url: "/api/downloadContract", |
| | | url: "/api-srm/downloadContract", |
| | | method: "get", |
| | | params: data |
| | | }) |
| | |
| | | // 更新所属行业 |
| | | export function updateIndustry(data) { |
| | | return request({ |
| | | url: "/api/i/updateIndustry", |
| | | url: "/api-srm/i/updateIndustry", |
| | | method: "put", |
| | | data |
| | | }) |
| | |
| | | // 所属行业列表 |
| | | export function getIndustryList(data) { |
| | | return request({ |
| | | url: "/api/i/getIndustryList", |
| | | url: "/api-srm/i/getIndustryList", |
| | | method: "get", |
| | | params: data |
| | | }) |
| | |
| | | border: 0; |
| | | outline: 0; |
| | | } |
| | | .Badge { |
| | | width: 6px; |
| | | height: 6px; |
| | | background: red; |
| | | border-radius: 100%; |
| | | display: inline-block; |
| | | margin-bottom: 1px; |
| | | margin-right: 5px; |
| | | } |
| | | .success { |
| | | color: #06c062; |
| | | } |
| | | .error { |
| | | color: #f62f2f; |
| | | } |
| | | .warning-radio { |
| | | color: #e6a23c; |
| | | } |
| | | .warning { |
| | | color: rgba(0, 0, 0, 0.4); |
| | | } |
| | | // 间距 |
| | | .margin_left_3px { |
| | | margin-left: 3px; |
| | |
| | | </dl> |
| | | </div> |
| | | <div class="top_right" style="width: 50%; margin-right: 15px"> |
| | | <dl v-for="item in otherOptions" :key="item.value"> |
| | | <dl v-for="(item,index) in otherOptions" :key="index"> |
| | | <dd class="font_weight"> |
| | | {{ item.value }} |
| | | </dd> |
| | |
| | | flex: 1; |
| | | display: flex; |
| | | justify-content: right; |
| | | dd{ |
| | | margin-left:0; |
| | | } |
| | | .top_left { |
| | | width: 10%; |
| | | border-right: 1px solid #ccc; |
| | |
| | | justify-content: center; |
| | | align-items: center; |
| | | text-align: center; |
| | | |
| | | .font_weight { |
| | | font-weight: 500; |
| | | font-size: 18px; |
| | |
| | | } |
| | | .top_right_bottom { |
| | | font-size: 12px; |
| | | |
| | | } |
| | | } |
| | | .top_right { |
| | |
| | | } |
| | | .top_right_bottom { |
| | | font-size: 12px; |
| | | margin-left:0; |
| | | } |
| | | } |
| | | } |
| | |
| | | font-weight: bold; |
| | | } |
| | | } |
| | | .el-table__fixed-body-wrapper { |
| | | top:37px!important; |
| | | } |
| | | } |
| | | |
| | | ::v-deep .el-table .cell { |
| | |
| | | // const type from '@/router/deployCode' |
| | | |
| | | const supplier = (resolve) => require(["@/views/supplierManage/supplier/index"], resolve) // 供应商管理 |
| | | |
| | | const outsourceSupplier= (resolve) => require(["@/views/supplierManage/outsourceSupplier/index"], resolve) // 委外供应商 |
| | | const appconfig = [ |
| | | { |
| | | path: "/supplierManage/supplier", |
| | |
| | | title: "供应商管理", |
| | | requireAuth: true |
| | | } |
| | | }, |
| | | { |
| | | path: "/supplierManage/outsourceSupplier", |
| | | name: "outsourceSupplier", |
| | | component: outsourceSupplier, |
| | | meta: { |
| | | title: "委外供应商", |
| | | requireAuth: true |
| | | } |
| | | } |
| | | ] |
| | | |
New file |
| | |
| | | <template> |
| | | <el-dialog |
| | | :close-on-click-modal="false" |
| | | :visible.sync="islook" |
| | | width="35rem" |
| | | class="add-event-dialog" |
| | | @close="shutdown" |
| | | > |
| | | <div slot="title" class="tac drawerHeader"> |
| | | <span>{{ "创建账号" }}</span> |
| | | </div> |
| | | <div class="dialog-content-box"> |
| | | <el-form |
| | | ref="form" |
| | | :rules="rules" |
| | | :model="form" |
| | | label-width="100px" |
| | | label-position="left" |
| | | > |
| | | <el-form-item label="用户名" prop="tel"> |
| | | <span v-if="editRow.look == 'look'">{{ form.tel }}</span> |
| | | <el-input |
| | | v-else |
| | | v-model="form.tel" |
| | | clearable |
| | | placeholder="请输入手机号作为用户名" |
| | | :disabled="titleName == '编辑' ? true : false" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="登录密码" prop="password"> |
| | | <span v-if="editRow.look == 'look'">{{ form.password }}</span> |
| | | <div v-else class="login-password-box"> |
| | | <el-input |
| | | v-model="form.password" |
| | | placeholder="请输入登录密码" |
| | | :auto-complete="'new-password'" |
| | | type="password" |
| | | :disabled="titleName == '编辑' ? true : false" |
| | | show-password |
| | | ></el-input> |
| | | <el-button |
| | | v-if="titleName !== '编辑'" |
| | | type="text" |
| | | style="margin-left: 5px" |
| | | @click="generateRandomNumber" |
| | | >生成随机密码</el-button |
| | | > |
| | | </div> |
| | | </el-form-item> |
| | | </el-form> |
| | | </div> |
| | | <div slot="footer" class="dialog-footer tac"> |
| | | <el-button @click="shutdown">取消</el-button> |
| | | <el-button type="primary" @click="onSubmit(form)">确定</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | </template> |
| | | |
| | | <script> |
| | | import { |
| | | addOutsideUser, |
| | | updateEnterprise, |
| | | } from "@/api/supplierManage/outsourceSupplier" |
| | | export default { |
| | | components: {}, |
| | | props: { |
| | | titleName: { |
| | | type: String, |
| | | default: "新增", |
| | | }, |
| | | editRow: { |
| | | type: [Object], |
| | | default: () => { |
| | | return {}; |
| | | }, |
| | | }, |
| | | showList: { |
| | | type: [Array], |
| | | }, |
| | | }, |
| | | data() { |
| | | return { |
| | | islook: false, |
| | | form: { |
| | | tel: "", |
| | | password: "123456", |
| | | }, |
| | | rules: { |
| | | tel: [ |
| | | { required: true, message: "请填写联系方式", trigger: "blur" }, // 联系方式 |
| | | ], |
| | | password: [ |
| | | { required: true, message: "请填写登录密码", trigger: "blur" }, // 登录密码 |
| | | ], |
| | | }, |
| | | editParams: {}, |
| | | }; |
| | | }, |
| | | mounted() { |
| | | // this.handleGetList(5); |
| | | // this.handleGetList(6); |
| | | // this.handleGetList(7); |
| | | }, |
| | | watch: { |
| | | editRow(val) { |
| | | if (val.id && this.islook) { |
| | | this.initFormData(val); |
| | | } else { |
| | | this.$nextTick(() => { |
| | | this.$refs.form.resetFields(); |
| | | }); |
| | | } |
| | | }, |
| | | islook(val) { |
| | | if (val) { |
| | | this.form = { |
| | | tel: "", |
| | | password: "123456", |
| | | }; |
| | | } |
| | | }, |
| | | }, |
| | | methods: { |
| | | initFormData(row) { |
| | | if (row.id) { |
| | | this.editParams = JSON.parse(JSON.stringify(row)); |
| | | // if (this.form.takerId && this.form.takerName) { |
| | | // this.form.takerObj = this.form.takerId + "&" + this.form.takerName; |
| | | // } |
| | | } |
| | | }, |
| | | onSubmit() { |
| | | this.$refs.form.validate((valid) => { |
| | | if (valid) { |
| | | this.addOutsideUser(this.editRow); |
| | | } |
| | | }); |
| | | }, |
| | | // 添加外部用户 |
| | | addOutsideUser(data) { |
| | | addOutsideUser({ |
| | | companyId: data.id, |
| | | companyName: data.name, |
| | | companyNumber: data.number, |
| | | passWord: this.form.password, |
| | | userName: this.form.tel, |
| | | }).then((res) => { |
| | | console.log(res); |
| | | if (res.code == 200) { |
| | | this.updateEnterprise(); |
| | | this.$message.success("创建账号成功!"); |
| | | this.shutdown(); |
| | | } |
| | | }); |
| | | }, |
| | | updateEnterprise() { |
| | | this.editParams.tel = this.form.tel; |
| | | updateEnterprise(this.editParams).then((res) => { |
| | | if (res.code == 200) { |
| | | this.$emit("shutdown"); |
| | | } |
| | | }); |
| | | }, |
| | | shutdown() { |
| | | this.$refs.form.resetFields(); |
| | | this.islook = false; |
| | | }, |
| | | // 随机生成六位数密码 |
| | | generateRandomNumber() { |
| | | let passwordStr = Math.floor(100000 + Math.random() * 900000); |
| | | console.log(passwordStr); |
| | | this.$set(this.form, "password", passwordStr+''); |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | .dialog-content-box { |
| | | padding: 0px 30px; |
| | | // overflow-y: auto; |
| | | // .el-form { |
| | | // overflow: hidden; |
| | | // } |
| | | .login-password-box { |
| | | display: flex; |
| | | } |
| | | } |
| | | |
| | | ::v-deep { |
| | | .el-tabs__content { |
| | | height: calc(100% - 55px); |
| | | overflow-y: auto; |
| | | } |
| | | .el-dialog__body{ |
| | | padding-top:15px; |
| | | } |
| | | } |
| | | </style> |
| | |
| | | <el-dialog |
| | | :close-on-click-modal="false" |
| | | :visible.sync="islook" |
| | | width="35rem" |
| | | width="38rem" |
| | | class="add-event-dialog" |
| | | @close="shutdown" |
| | | > |
| | |
| | | <span>{{ titleName }}企业</span> |
| | | </div> |
| | | <div class="dialog-content-box"> |
| | | <el-form ref="form" :rules="rules" :model="form" label-width="100px" label-position="left"> |
| | | <div class="basic-info-title">基本信息</div> |
| | | <el-form |
| | | ref="form" |
| | | :rules="rules" |
| | | :model="form" |
| | | label-width="100px" |
| | | label-position="left" |
| | | > |
| | | <el-form-item label="企业编码" prop="number"> |
| | | <span v-if="editRow.look == 'look'">{{ form.number }}</span> |
| | | <el-input v-else v-model="form.number" clearable placeholder="请输入"></el-input> |
| | | <el-input |
| | | v-else |
| | | v-model="form.number" |
| | | clearable |
| | | placeholder="请输入" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="企业名称" prop="name"> |
| | | <span v-if="editRow.look == 'look'">{{ form.name }}</span> |
| | | <el-input v-else v-model="form.name" clearable placeholder="请输入"></el-input> |
| | | <el-input |
| | | v-else |
| | | v-model="form.name" |
| | | clearable |
| | | placeholder="请输入" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="企业类型" prop="enterpriseType"> |
| | | <span v-if="editRow.look == 'look'">{{ form.enterpriseType }}</span> |
| | | <el-select v-model="form.enterpriseType" placeholder="企业类型" filterable style="width: calc(100% - 30px)"> |
| | | <el-option v-for="ele in enterpriseTypeList" :key="ele.id" :label="ele.name" :value="ele.name"></el-option> |
| | | <el-select |
| | | v-model="form.enterpriseType" |
| | | placeholder="企业类型" |
| | | filterable |
| | | style="width: calc(100% - 30px)" |
| | | > |
| | | <el-option |
| | | v-for="ele in enterpriseTypeList" |
| | | :key="ele.id" |
| | | :label="ele.name" |
| | | :value="ele.name" |
| | | ></el-option> |
| | | </el-select> |
| | | <i |
| | | class="el-icon-setting margin_left_10px cursor_pointer" |
| | |
| | | </el-form-item> |
| | | <el-form-item label="联系人" prop="contact"> |
| | | <span v-if="editRow.look == 'look'">{{ form.contact }}</span> |
| | | <el-input v-else v-model="form.contact" clearable placeholder="请输入"></el-input> |
| | | <el-input |
| | | v-else |
| | | v-model="form.contact" |
| | | clearable |
| | | placeholder="请输入" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="联系方式" prop="tel"> |
| | | <el-form-item v-if="titleName == '编辑'" label="联系方式" prop="tel"> |
| | | <span v-if="editRow.look == 'look'">{{ form.tel }}</span> |
| | | <el-input |
| | | v-else |
| | |
| | | :disabled="titleName == '编辑' ? true : false" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="登录密码" prop="password"> |
| | | <el-form-item |
| | | v-if="titleName == '编辑'" |
| | | label="登录密码" |
| | | prop="password" |
| | | > |
| | | <span v-if="editRow.look == 'look'">{{ form.password }}</span> |
| | | <div v-else class="login-password-box"> |
| | | <el-input |
| | |
| | | :disabled="titleName == '编辑' ? true : false" |
| | | show-password |
| | | ></el-input> |
| | | <el-button v-if="titleName !== '编辑'" type="text" style="margin-left: 5px" @click="generateRandomNumber" |
| | | <el-button |
| | | v-if="titleName !== '编辑'" |
| | | type="text" |
| | | style="margin-left: 5px" |
| | | @click="generateRandomNumber" |
| | | >生成随机密码</el-button |
| | | > |
| | | </div> |
| | |
| | | filterable |
| | | style="width: calc(100% - 30px)" |
| | | > |
| | | <el-option v-for="item in creditGradeList" :key="item.id" :label="item.name" :value="item.name"> |
| | | <el-option |
| | | v-for="item in creditGradeList" |
| | | :key="item.id" |
| | | :label="item.name" |
| | | :value="item.name" |
| | | > |
| | | </el-option> |
| | | </el-select> |
| | | <i |
| | |
| | | </el-form-item> |
| | | <el-form-item label="详细地址" prop="address"> |
| | | <span v-if="editRow.look == 'look'">{{ form.address }}</span> |
| | | <el-input v-else v-model="form.address" clearable placeholder="请输入"></el-input> |
| | | <el-input |
| | | v-else |
| | | v-model="form.address" |
| | | clearable |
| | | placeholder="请输入" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="供货能力" prop="supplyCapacity"> |
| | | <span v-if="editRow.look == 'look'">{{ form.supplyCapacity }}</span> |
| | | <el-input v-else v-model="form.supplyCapacity" clearable placeholder="请输入"></el-input> |
| | | <el-input |
| | | v-else |
| | | v-model="form.supplyCapacity" |
| | | clearable |
| | | placeholder="请输入" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="组织机构代码" prop="organizationCode"> |
| | | <span v-if="editRow.look == 'look'">{{ form.organizationCode }}</span> |
| | | <el-input v-else v-model="form.organizationCode" clearable placeholder="请输入"></el-input> |
| | | <el-input |
| | | v-else |
| | | v-model="form.organizationCode" |
| | | clearable |
| | | placeholder="请输入" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="供货范围" prop="supplyRange"> |
| | | <span v-if="editRow.look == 'look'">{{ form.supplyRange }}</span> |
| | |
| | | filterable |
| | | style="width: calc(100% - 30px)" |
| | | > |
| | | <el-option v-for="item in supplyRangeList" :key="item.id" :label="item.name" :value="item.name"> |
| | | <el-option |
| | | v-for="item in supplyRangeList" |
| | | :key="item.id" |
| | | :label="item.name" |
| | | :value="item.name" |
| | | > |
| | | </el-option> |
| | | </el-select> |
| | | <i |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { addEnterprise, updateEnterprise, addOutsideUser } from "@/api/supplierManage/outsourceSupplier" |
| | | import { getMiniDictList, saveMiniDict } from "@/api/common/other" // 质检方式 |
| | | import VersionType from "@/views/supplierManage/outsourceSupplier/components/VersionType" |
| | | import { |
| | | addEnterprise, |
| | | updateEnterprise, |
| | | addOutsideUser, |
| | | } from "@/api/supplierManage/outsourceSupplier" |
| | | import { getMiniDictList, saveMiniDict } from "@/api/common/other"; // 质检方式 |
| | | import VersionType from "@/views/supplierManage/outsourceSupplier/components/VersionType"; |
| | | export default { |
| | | components: { |
| | | VersionType |
| | | VersionType, |
| | | }, |
| | | props: { |
| | | titleName: { |
| | | type: String, |
| | | default: "新增" |
| | | default: "新增", |
| | | }, |
| | | editRow: { |
| | | type: [Object], |
| | | default: () => { |
| | | return {} |
| | | } |
| | | return {}; |
| | | }, |
| | | }, |
| | | showList: { |
| | | type: [Array] |
| | | } |
| | | type: [Array], |
| | | }, |
| | | }, |
| | | data() { |
| | | return { |
| | |
| | | organizationCode: "", |
| | | supplyRange: "", |
| | | status: 0, |
| | | password: "123456" |
| | | password: "123456", |
| | | }, |
| | | rules: { |
| | | number: [ |
| | | { required: true, message: "请填写企业编码", trigger: "blur" } // 企业编码 |
| | | { required: true, message: "请填写企业编码", trigger: "blur" }, // 企业编码 |
| | | ], |
| | | name: [ |
| | | { required: true, message: "请填写企业名称", trigger: "blur" } // 企业名称 |
| | | { required: true, message: "请填写企业名称", trigger: "blur" }, // 企业名称 |
| | | ], |
| | | enterpriseType: [ |
| | | { required: true, message: "请选择企业类型", trigger: "change" } // 企业类型 |
| | | { required: true, message: "请选择企业类型", trigger: "change" }, // 企业类型 |
| | | ], |
| | | tel: [ |
| | | { required: true, message: "请填写联系方式", trigger: "blur" } // 联系方式 |
| | | { required: true, message: "请填写联系方式", trigger: "blur" }, // 联系方式 |
| | | ], |
| | | password: [ |
| | | { required: true, message: "请填写登录密码", trigger: "blur" } // 登录密码 |
| | | ] |
| | | { required: true, message: "请填写登录密码", trigger: "blur" }, // 登录密码 |
| | | ], |
| | | }, |
| | | editDropdownList: [], |
| | | enterpriseTypeList: [], // 企业类型列表 |
| | | creditGradeList: [], // 信用等级 |
| | | supplyRangeList: [], // 供货范围 |
| | | currentType: 0, |
| | | editDropdownTitle: "" |
| | | } |
| | | editDropdownTitle: "", |
| | | }; |
| | | }, |
| | | mounted() { |
| | | this.handleGetList(5) |
| | | this.handleGetList(6) |
| | | this.handleGetList(7) |
| | | this.handleGetList(5); |
| | | this.handleGetList(6); |
| | | this.handleGetList(7); |
| | | }, |
| | | watch: { |
| | | editRow(val) { |
| | | if (val.id && this.islook) { |
| | | this.initFormData(val) |
| | | this.initFormData(val); |
| | | } else { |
| | | this.$nextTick(() => { |
| | | this.$refs.form.resetFields() |
| | | }) |
| | | this.$refs.form.resetFields(); |
| | | }); |
| | | } |
| | | }, |
| | | islook(val) { |
| | | if (val) { |
| | | debugger |
| | | this.form = { |
| | | number: "", |
| | | name: "", |
| | |
| | | supplyCapacity: "", |
| | | organizationCode: "", |
| | | supplyRange: "", |
| | | status: 0 |
| | | } |
| | | status: 0, |
| | | }; |
| | | if (this.editRow && this.editRow.id) { |
| | | this.initFormData(this.editRow) |
| | | this.initFormData(this.editRow); |
| | | } else { |
| | | this.$nextTick(() => { |
| | | this.$refs.form.resetFields() |
| | | }) |
| | | this.$refs.form.resetFields(); |
| | | this.$forceUpdate() |
| | | }); |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | }, |
| | | methods: { |
| | | addPreProduction() { |
| | | this.$refs.add.materialVisible = true |
| | | this.$refs.add.materialVisible = true; |
| | | }, |
| | | initFormData(row) { |
| | | if (row.id) { |
| | | this.form = JSON.parse(JSON.stringify(row)) |
| | | this.form = JSON.parse(JSON.stringify(row)); |
| | | // if (this.form.takerId && this.form.takerName) { |
| | | // this.form.takerObj = this.form.takerId + "&" + this.form.takerName; |
| | | // } |
| | |
| | | onSubmit() { |
| | | this.$refs.form.validate((valid) => { |
| | | if (valid) { |
| | | let params = JSON.parse(JSON.stringify(this.form)) |
| | | let params = JSON.parse(JSON.stringify(this.form)); |
| | | // params.takerId = params.takerObj.split("&")[0]; |
| | | // params.takerName = params.takerObj.split("&")[1]; |
| | | if (this.editRow && this.editRow.id) { |
| | | params.id = this.editRow.id |
| | | params.id = this.editRow.id; |
| | | updateEnterprise(params).then((res) => { |
| | | if (res.code == 200) { |
| | | this.$message.success("编辑成功!") |
| | | this.$emit("shutdown", this.form) |
| | | this.shutdown() |
| | | this.$message.success("编辑企业成功!"); |
| | | this.$emit("shutdown", this.form); |
| | | this.shutdown(); |
| | | } |
| | | }) |
| | | }); |
| | | } else { |
| | | addEnterprise(params).then((res) => { |
| | | if (res.code == 200) { |
| | | console.log(res, "5555") |
| | | this.addOutsideUser(res.data) |
| | | this.$message.success("新增企业成功!"); |
| | | this.$emit("shutdown", this.form); |
| | | this.shutdown(); |
| | | } |
| | | }) |
| | | }); |
| | | } |
| | | } |
| | | }) |
| | | }); |
| | | }, |
| | | // 添加外部用户 |
| | | addOutsideUser(data) { |
| | |
| | | companyName: data.name, |
| | | companyNumber: data.number, |
| | | passWord: this.form.password, |
| | | userName: data.tel |
| | | userName: data.tel, |
| | | }).then((res) => { |
| | | console.log(res) |
| | | console.log(res); |
| | | if (res.code == 200) { |
| | | this.$message.success("添加成功!") |
| | | this.$emit("shutdown", this.form) |
| | | this.shutdown() |
| | | this.$message.success("添加成功!"); |
| | | this.$emit("shutdown", this.form); |
| | | this.shutdown(); |
| | | } |
| | | }) |
| | | }); |
| | | }, |
| | | // 企业类型?信用等级/供货范围点击 |
| | | handleCommonShow(type) { |
| | | this.currentType = type |
| | | this.editDropdownTitle = type == 5 ? "企业类型" : type == 6 ? "信用等级" : type == 7 ? "供货范围" : "" |
| | | this.editDropdownList = [] |
| | | this.handleGetList(type) |
| | | this.$refs.editDialog.isvisible = true |
| | | this.currentType = type; |
| | | this.editDropdownTitle = |
| | | type == 5 |
| | | ? "企业类型" |
| | | : type == 6 |
| | | ? "信用等级" |
| | | : type == 7 |
| | | ? "供货范围" |
| | | : ""; |
| | | this.editDropdownList = []; |
| | | this.handleGetList(type); |
| | | this.$refs.editDialog.isvisible = true; |
| | | }, |
| | | // 获取企业类型?信用等级/供货范围 |
| | | handleGetList(type) { |
| | | this.currentType = type |
| | | this.currentType = type; |
| | | getMiniDictList({ type: type }).then((res) => { |
| | | this.editDropdownList = res.data |
| | | this.editDropdownList = res.data; |
| | | if (type == 5) { |
| | | this.enterpriseTypeList = res.data |
| | | this.enterpriseTypeList = res.data; |
| | | } else if (type == 6) { |
| | | this.creditGradeList = res.data |
| | | this.creditGradeList = res.data; |
| | | } else if (type == 7) { |
| | | this.supplyRangeList = res.data |
| | | this.supplyRangeList = res.data; |
| | | } |
| | | }) |
| | | }); |
| | | }, |
| | | // 保存企业类型?信用等级/供货范围 |
| | | handleConfirmSave(data) { |
| | |
| | | if (res.code == 200) { |
| | | this.$message({ |
| | | message: "操作成功!", |
| | | type: "success" |
| | | }) |
| | | this.$refs.editDialog.isvisible = false |
| | | this.handleGetList(this.currentType) |
| | | type: "success", |
| | | }); |
| | | this.$refs.editDialog.isvisible = false; |
| | | this.handleGetList(this.currentType); |
| | | } |
| | | }) |
| | | }); |
| | | }, |
| | | shutdown() { |
| | | this.$refs.form.resetFields() |
| | | this.islook = false |
| | | this.$refs.form.resetFields(); |
| | | this.islook = false; |
| | | }, |
| | | // 随机生成六位数密码 |
| | | generateRandomNumber() { |
| | | let passwordStr = Math.floor(100000 + Math.random() * 900000) |
| | | console.log(passwordStr) |
| | | this.$set(this.form, "password", passwordStr) |
| | | } |
| | | } |
| | | } |
| | | let passwordStr = Math.floor(100000 + Math.random() * 900000); |
| | | console.log(passwordStr); |
| | | this.$set(this.form, "password", passwordStr); |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | .dialog-content-box { |
| | | padding: 0px 30px; |
| | | height:480px; |
| | | overflow-y:auto; |
| | | // overflow-y: auto; |
| | | // .el-form { |
| | | // overflow: hidden; |
| | |
| | | .login-password-box { |
| | | display: flex; |
| | | } |
| | | .basic-info-title { |
| | | background-color: #f4f8fe; |
| | | padding-left: 10px; |
| | | font-size: 15px; |
| | | font-weight: bold; |
| | | color: #666; |
| | | height: 42px; |
| | | line-height: 42px; |
| | | margin-bottom:15px; |
| | | } |
| | | .el-form{ |
| | | padding: 0px 30px; |
| | | } |
| | | } |
| | | |
| | | ::v-deep { |
| | |
| | | <template> |
| | | <d2-container> |
| | | <template slot="header"> |
| | | <div class="top"> |
| | | <SearchCommonView |
| | | <div class="outsource-supplier-manage"> |
| | | <div class="filter"> |
| | | <div class="filter-card"> |
| | | <CommonSearch |
| | | :add-title="'新增企业'" |
| | | :total-object="totalObject" |
| | | :other-options="otherOptions" |
| | | :placeholder="'请输入名称'" |
| | | @addCommonClick="addEnterpriseClick" |
| | | @searchClick="getEnterpriseList" |
| | | @clearClick="getEnterpriseList" |
| | | /> |
| | | </div> |
| | | </template> |
| | | </div> |
| | | <div class="content"> |
| | | <div class="content-top"> |
| | | <div class="body-card"> |
| | | <div class="list-view"> |
| | | <TableCommonView ref="tableListRef" :table-list="tableList" @selTableCol="selTableCol"> |
| | | <template slot="tableButton"> |
| | | <el-table-column label="操作" width="160" fixed="right"> |
| | | <el-table-column label="操作" width="150" fixed="right"> |
| | | <template slot-scope="scope"> |
| | | <el-button |
| | | v-if="scope.row.tel.length == 0" |
| | | type="text" |
| | | size="small" |
| | | @click="createAccountClick(scope.row)" |
| | | >创建账号</el-button |
| | | > |
| | | <el-button v-if="scope.row.status == 1" type="text" size="small" @click="statusModifyClick(scope.row)" |
| | | >停用</el-button |
| | | > |
| | |
| | | <PagerView class="page" :pager-options="pagerOptions" v-on="pagerEvents" /> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <!-- <div class="overSpread" v-show="isopen || isCreateShop"></div> --> |
| | | <!-- 添加/编辑备件 --> |
| | | <AddEnterprise ref="add" :showList="showList" :titleName="titleName" :editRow="editRow" @shutdown="shutdown" /> |
| | | </d2-container> |
| | | <!-- 创建账号 --> |
| | | <CreateAccount |
| | | ref="create" |
| | | :editRow="createRow" |
| | | @shutdown="shutCreateDown" |
| | | /> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | |
| | | editOutsideUser |
| | | } from "@/api/supplierManage/outsourceSupplier" |
| | | import AddEnterprise from "@/views/supplierManage/outsourceSupplier/components/addEnterprise" |
| | | import CreateAccount from "@/views/supplierManage/outsourceSupplier/components/CreateAccount"; |
| | | import pageMixin from "@/components/makepager/pager/mixin/pageMixin" |
| | | export default { |
| | | name: "outsourceManage", |
| | | mixins: [pageMixin], |
| | | components: { |
| | | AddEnterprise |
| | | AddEnterprise, |
| | | CreateAccount |
| | | }, |
| | | beforeMount() { |
| | | this.getData() |
| | |
| | | "添加时间", |
| | | "状态" |
| | | ], |
| | | showList: [] |
| | | showList: [], |
| | | createRow: {}, |
| | | } |
| | | }, |
| | | mounted() { |
| | |
| | | { |
| | | label: "组织机构代码", |
| | | prop: "organizationCode", |
| | | min:140, |
| | | isShowColumn: showcol.includes("组织机构代码"), |
| | | default: false |
| | | }, |
| | |
| | | }, |
| | | // 搜索触发 |
| | | async getEnterpriseList(val) { |
| | | this.searchParam.keyword = val |
| | | this.searchParam.keyword = val?val:'' |
| | | this.pagerOptions.currPage = 1 |
| | | this.getData() |
| | | }, |
| | |
| | | editClick(val) { |
| | | let params = JSON.parse(JSON.stringify(val)) |
| | | this.titleName = "编辑" |
| | | this.editRow = { ...params, password: "000000" } |
| | | this.editRow = { ...params, password: "000000",id:params.id?params.id:params.ID, } |
| | | this.$refs.add.islook = true |
| | | }, |
| | | // 启用/停用 |
| | |
| | | updateEnterprise(params) |
| | | .then((reply) => { |
| | | if (reply && reply.code == 200) { |
| | | this.editOutsideUser(row) |
| | | // this.getData(); |
| | | // this.$message.success(row.status == 1 ? "停用成功" : "启用成功"); |
| | | if(row.tel){ |
| | | this.editOutsideUser(row) |
| | | }else{ |
| | | this.getData() |
| | | this.$message.success(row.status == 1 ? "停用成功" : "启用成功") |
| | | } |
| | | |
| | | } else { |
| | | this.$message.error(row.status == 1 ? "停用失败" : "启用失败") |
| | | } |
| | | }) |
| | | .catch(() => {}) |
| | | }) |
| | | }).catch(() => {}) |
| | | }, |
| | | // 启用停用外部用户 |
| | | editOutsideUser(row) { |
| | |
| | | // 获取状态 |
| | | getStatus(val) { |
| | | return val == 0 ? "新建" : val == 1 ? "启用" : val == 2 ? "停用" : "--" |
| | | } |
| | | }, |
| | | shutCreateDown() { |
| | | this.$refs.create.islook = false; |
| | | this.getData(); |
| | | }, |
| | | // 创建账号 |
| | | createAccountClick(row) { |
| | | let params = JSON.parse(JSON.stringify(row)) |
| | | this.createRow = { ...params,id:row.id?row.id:row.ID }; |
| | | this.$refs.create.islook = true; |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | .top { |
| | | width: 100%; |
| | | height: 61px; |
| | | display: flex; |
| | | align-items: center; |
| | | .fon_weight { |
| | | font-size: 28px; |
| | | height: 32px; |
| | | } |
| | | .top_right_bottom { |
| | | font-size: 14px; |
| | | line-height: 20px; |
| | | color: #000; |
| | | opacity: 0.6; |
| | | margin-top: 9px; |
| | | font-family: "PingFangSC-Medium," sans-serif; |
| | | .outsource-supplier-manage{ |
| | | height: 100%; |
| | | overflow: hidden; |
| | | .filter { |
| | | height: 80px; |
| | | display: flex; |
| | | align-items: center; |
| | | padding: 12px 20px 0 20px; |
| | | &-card { |
| | | height: 80px; |
| | | display: flex; |
| | | align-items: center; |
| | | box-sizing: border-box; |
| | | padding: 10px 20px; |
| | | flex: 1; |
| | | border-radius: 12px; |
| | | background-color: #fff; |
| | | } |
| | | } |
| | | } |
| | | |
| | | .el-button { |
| | | font-family: "PingFangSC"; |
| | | } |
| | | .content { |
| | | width: 100%; |
| | | height: calc(100% - 30px); |
| | | background: #fff; |
| | | // width: 100%; |
| | | height: calc(100% - 92px); |
| | | border-radius: 12px; |
| | | box-sizing: border-box; |
| | | .content-top { |
| | | height: calc(100% - 60px); |
| | | } |
| | | padding: 10px 20px; |
| | | .body-card { |
| | | background-color: #fff; |
| | | border-radius: 12px; |
| | | height: 100%; |
| | | overflow: hidden; |
| | | } |
| | | .list-view { |
| | | height: calc(100% - 60px); |
| | | overflow: hidden; |
| | | } |
| | | .btn-pager { |
| | | display: flex; |
| | | .page { |
| | | margin-left: auto; |
| | | } |
| | | } |
| | | } |
| | | ::v-deep { |
| | | .el-table { |
| | |
| | | }, |
| | | // 下载合同 |
| | | downloadClick() { |
| | | let url = "/api/downloadContract?id=" + this.file_id |
| | | let url = "/api-srm/downloadContract?id=" + this.file_id |
| | | download(url, "", "") |
| | | }, |
| | | // 删除合同 |
| | |
| | | }, |
| | | // 预览合同 |
| | | // async previewClick() { |
| | | // this.previewUrl = "/api/con/previewContract?id=" + this.file_id |
| | | // this.previewUrl = "/api-srm/con/previewContract?id=" + this.file_id |
| | | // if (this.file_name.includes("pdf")) { |
| | | // window.open(this.previewUrl, "_blank") |
| | | // } else { |
| | |
| | | // } |
| | | // } |
| | | async previewClick() { |
| | | this.previewUrl = "/api/previewContract?id=" + this.file_id |
| | | this.previewUrl = "/api-srm/previewContract?id=" + this.file_id |
| | | if (this.file_name.includes("pdf")) { |
| | | console.log("是pdf文件") |
| | | await axios |
| | |
| | | // 下载合同附件 |
| | | downLoadFiles(){ |
| | | if(this.detailConfig.infomation.contract.fileName){ |
| | | let url = "/api/downloadContract?id=" + this.commonDetail.infomation.fileId |
| | | let url = "/api-srm/downloadContract?id=" + this.commonDetail.infomation.fileId |
| | | download(url, "", "") |
| | | } |
| | | } |
| | |
| | | ws: true, |
| | | changeOrigin: true |
| | | }, |
| | | "/api": { |
| | | "/api-srm": { |
| | | |
| | | // 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/ |
| | | ws: true, |
| | | changeOrigin: true |
| | | } |
| | | }, |
| | | "/api":{ |
| | | target:"http://192.168.20.119:8001", |
| | | ws: true, |
| | | changeOrigin: true |
| | | }, |
| | | } |
| | | }, |
| | | transpileDependencies: [ |