16 changed files with 6224 additions and 0 deletions
-
55src/api/base/properties.js
-
234src/api/changeManagement/changeManagement.js
-
27src/api/customer/customerContact.js
-
71src/api/dict.js
-
8src/api/quote/priceCheckProperties.js
-
141src/api/quote/quotationInformation.js
-
10src/api/test/testProperties.js
-
147src/views/modules/common/transferTable.vue
-
414src/views/modules/quote/priceCheckProperties.vue
-
141src/views/modules/quote/quotation_upload.vue
-
136src/views/modules/quote/quotation_upload_file.vue
-
3594src/views/modules/quote/requestForQuote.vue
-
102src/views/modules/sys/dict-data-select.vue
-
396src/views/modules/sys/dict-data.vue
-
353src/views/modules/sys/dict.vue
-
395src/views/modules/test/testAttribute/testProperties.vue
@ -0,0 +1,55 @@ |
|||||
|
import { createAPI } from "@/utils/httpRequest.js"; |
||||
|
|
||||
|
export const propertiesItemSearch = data => createAPI(`/properties/propertiesItemSearch`,'post',data) |
||||
|
export const propertiesItemList = data => createAPI(`/properties/propertiesItemList`,'get',data) |
||||
|
export const propertiesList = data => createAPI(`/properties/propertiesList`,'get',data) |
||||
|
export const propertiesAvailableList = data => createAPI(`/properties/propertiesAvailableList`,'get',data) |
||||
|
export const propertiesItemSave = data => createAPI(`/properties/propertiesItemSave`,'post',data) |
||||
|
export const propertiesItemEdit = data => createAPI(`/properties/propertiesItemEdit`,'post',data) |
||||
|
export const propertiesItemDelete = data => createAPI(`/properties/propertiesItemDelete`,'post',data) |
||||
|
export const searchItemAvailable = data => createAPI(`/properties/searchItemAvailable`,'post',data) |
||||
|
export const propertiesModelSearch = data => createAPI(`/properties/propertiesModelSearch`,'post',data) |
||||
|
export const propertiesModelSave = data => createAPI(`/properties/propertiesModelSave`,'post',data) |
||||
|
export const propertiesModelEdit = data => createAPI(`/properties/propertiesModelEdit`,'post',data) |
||||
|
export const propertiesModelDelete = data => createAPI(`/properties/propertiesModelDelete`,'post',data) |
||||
|
export const searchModalDetails = data => createAPI(`/properties/searchModalDetails`,'post',data) |
||||
|
export const partPropertiesList = data => createAPI(`/properties/partPropertiesList`,'get',data) |
||||
|
export const saveModalDetails = data => createAPI(`/properties/saveModalDetails`,'post',data) |
||||
|
export const deleteModalDetails = data => createAPI(`/properties/deleteModalDetails`,'post',data) // 多选删除
|
||||
|
export const getItemLists = data => createAPI(`/properties/getItemLists`,'post',data) |
||||
|
export const deleteModalDetail = data => createAPI(`/properties/deleteModalDetail`,'post',data) |
||||
|
export const saveItemAvailable = data => createAPI(`/properties/saveItemAvailable`,'post',data) |
||||
|
export const deleteItemAvailable = data => createAPI(`/properties/deleteItemAvailable`,'post',data) |
||||
|
|
||||
|
|
||||
|
export const getItemModal = data => createAPI(`/properties/getItemModal`,'post',data) |
||||
|
export const itemSaveData = data => createAPI(`/properties/itemSaveData`,'post',data) |
||||
|
export const getItemData = data => createAPI(`/properties/getItemData`,'post',data) |
||||
|
export const refreshItemModal = data => createAPI(`/properties/refreshItemModal`,'post',data) |
||||
|
|
||||
|
|
||||
|
|
||||
|
export const propertiesModelSearchForBM = data => createAPI(`/properties/propertiesModelSearchForBM`,'post',data) |
||||
|
export const searchModalDetailsForBM= data => createAPI(`/properties/searchModalDetailsForBM`,'post',data) |
||||
|
export const getItemListsForBM= data => createAPI(`/properties/getItemListsForBM`,'post',data) |
||||
|
export const saveModalDetailsForBM= data => createAPI(`/properties/saveModalDetailsForBM`,'post',data) |
||||
|
export const deleteModalDetailsForBM= data => createAPI(`/properties/deleteModalDetailsForBM`,'post',data) |
||||
|
export const deleteModalDetailForBM= data => createAPI(`/properties/deleteModalDetailForBM`,'post',data) |
||||
|
|
||||
|
export const goUpItemForBM= data => createAPI(`/properties/goUpItemForBM`,'post',data) |
||||
|
export const goDownForBM= data => createAPI(`/properties/goDownForBM`,'post',data) |
||||
|
|
||||
|
|
||||
|
export const goUpItem= data => createAPI(`/properties/goUpItem`,'post',data) |
||||
|
export const goDownItem= data => createAPI(`/properties/goDownItem`,'post',data) |
||||
|
|
||||
|
export const updateBMModal= data => createAPI(`/technicalSpecification/updateBMModal`,'post',data) |
||||
|
export const searchMenuAllListId= (data) => createAPI(`/properties/menu/list`,'post',data) |
||||
|
export const searchBUList= (data) => createAPI(`/properties/bu/list`,'post',data) |
||||
|
export const searchPropertiesGroup= (data) => createAPI(`/properties/group/list`,'post',data) |
||||
|
export const searchBUPropertiesList= (data) => createAPI(`/bu/properties/list`,'post',data) |
||||
|
export const saveBUPropertiesList= (data) => createAPI(`/bu/properties/save`,'post',data) |
||||
|
export const searchAllItemTypeList= (data) => createAPI(`/properties/item/type/list`,'post',data) |
||||
|
export const searchAllTypeList= (data) => createAPI(`/properties/type/list`,'get',data) |
||||
|
export const searchAllTypeRelationshipList = (data) => createAPI(`/properties/type/relationship/list`,'post',data) |
||||
|
|
||||
@ -0,0 +1,234 @@ |
|||||
|
import { createAPI } from "@/utils/httpRequest.js"; |
||||
|
|
||||
|
/** |
||||
|
* 获取技术参数卡列表 |
||||
|
* @param data |
||||
|
* @returns {*} |
||||
|
*/ |
||||
|
export const technicalSpecificationSearch = data => createAPI(`/plm/changeManagement/technicalSpecificationSearch`,'post',data) |
||||
|
|
||||
|
/** |
||||
|
* 根据用户编码获得用户部门 |
||||
|
* @param data |
||||
|
* @returns {*} |
||||
|
*/ |
||||
|
export const getDepartmentByUserName = data => createAPI(`/plm/changeManagement/getDepartmentByUserName`,'post',data) |
||||
|
|
||||
|
/** |
||||
|
* 新增变更申请 |
||||
|
* @param data |
||||
|
* @returns {*} |
||||
|
*/ |
||||
|
export const changeRequestSave = data => createAPI(`/plm/changeManagement/changeRequestSave`,'post',data) |
||||
|
|
||||
|
/** |
||||
|
* 获取申请单号 |
||||
|
* @param data |
||||
|
* @returns {*} |
||||
|
*/ |
||||
|
export const getChangeNo = data => createAPI(`/plm/changeManagement/getChangeNo`,'post',data) |
||||
|
|
||||
|
/** |
||||
|
* 根据变更单号删除文件 |
||||
|
* @param data |
||||
|
* @returns {*} |
||||
|
*/ |
||||
|
export const deleteChangeFiles = data => createAPI(`/plm/changeManagement/deleteChangeFiles`,'post',data) |
||||
|
|
||||
|
|
||||
|
|
||||
|
// ============================================================================================================ //
|
||||
|
|
||||
|
/** |
||||
|
* 获取工程变更记录列表 |
||||
|
* @param data |
||||
|
* @returns {*} |
||||
|
*/ |
||||
|
export const changeRecordSearch = data => createAPI(`/plm/changeManagement/changeRecordSearch`,'post',data) |
||||
|
|
||||
|
/** |
||||
|
* 变更单详情的列表 |
||||
|
* @param data |
||||
|
* @returns {*} |
||||
|
*/ |
||||
|
export const changeDetailSearch = data => createAPI(`/plm/changeManagement/changeDetailSearch`,'post',data) |
||||
|
|
||||
|
/** |
||||
|
* 变更单文件的列表 |
||||
|
* @param data |
||||
|
* @returns {*} |
||||
|
*/ |
||||
|
export const changeFileSearch = data => createAPI(`/plm/changeManagement/changeFileSearch`,'post',data) |
||||
|
|
||||
|
/** |
||||
|
* 删除变更单文件 |
||||
|
* @param data |
||||
|
* @returns {*} |
||||
|
*/ |
||||
|
export const deleteChangeFile = data => createAPI(`/plm/changeManagement/deleteChangeFile`,'post',data) |
||||
|
|
||||
|
/** |
||||
|
* 查询库存成本影响 |
||||
|
* @param data |
||||
|
* @returns {*} |
||||
|
*/ |
||||
|
export const costImpactSearch = data => createAPI(`/plm/changeManagement/costImpactSearch`,'post',data) |
||||
|
|
||||
|
/** |
||||
|
* 查询库存成本影响 |
||||
|
* @param data |
||||
|
* @returns {*} |
||||
|
*/ |
||||
|
export const costImpactSave = data => createAPI(`/plm/changeManagement/costImpactSave`,'post',data) |
||||
|
|
||||
|
/** |
||||
|
* 新增执行信息 |
||||
|
* @param data |
||||
|
* @returns {*} |
||||
|
*/ |
||||
|
export const executionSave = data => createAPI(`/plm/changeManagement/executionSave`,'post',data) |
||||
|
|
||||
|
/** |
||||
|
* 编辑库存成本影响 |
||||
|
* @param data |
||||
|
* @returns {*} |
||||
|
*/ |
||||
|
export const costImpactUpdate = data => createAPI(`/plm/changeManagement/costImpactUpdate`,'post',data) |
||||
|
|
||||
|
/** |
||||
|
* 查询ECN种类数据 |
||||
|
* @param data |
||||
|
* @returns {*} |
||||
|
*/ |
||||
|
export const getEcnTypeData = data => createAPI(`/plm/changeManagement/getEcnTypeData`,'post',data) |
||||
|
|
||||
|
/** |
||||
|
* 查询ECN的模板 |
||||
|
* @param data |
||||
|
* @returns {*} |
||||
|
*/ |
||||
|
export const getEcnModel = data => createAPI(`/plm/changeManagement/getEcnModel`,'post',data) |
||||
|
|
||||
|
/** |
||||
|
* 查询模板属性 |
||||
|
* @param data |
||||
|
* @returns {*} |
||||
|
*/ |
||||
|
export const getItemList = data => createAPI(`/plm/changeManagement/getItemList`,'post',data) |
||||
|
|
||||
|
/** |
||||
|
* 查询执行信息 |
||||
|
* @param data |
||||
|
* @returns {*} |
||||
|
*/ |
||||
|
export const executionInfoSearch = data => createAPI(`/plm/changeManagement/executionInfoSearch`,'post',data) |
||||
|
|
||||
|
/** |
||||
|
* 查询变更明细 |
||||
|
* @param data |
||||
|
* @returns {*} |
||||
|
*/ |
||||
|
export const requestDetailSearch = data => createAPI(`/plm/changeManagement/requestDetailSearch`,'post',data) |
||||
|
|
||||
|
/** |
||||
|
* 删除变更明细 |
||||
|
* @param data |
||||
|
* @returns {*} |
||||
|
*/ |
||||
|
export const deleteChangeDetail = data => createAPI(`/plm/changeManagement/deleteChangeDetail`,'post',data) |
||||
|
|
||||
|
/** |
||||
|
* 编辑变更单基础信息 |
||||
|
* @param data |
||||
|
* @returns {*} |
||||
|
*/ |
||||
|
export const changeRequestUpdate = data => createAPI(`/plm/changeManagement/changeRequestUpdate`,'post',data) |
||||
|
|
||||
|
/** |
||||
|
* 查询所选择的ECN种类 |
||||
|
* @param data |
||||
|
* @returns {*} |
||||
|
*/ |
||||
|
export const getChooseEcnType = data => createAPI(`/plm/changeManagement/getChooseEcnType`,'post',data) |
||||
|
|
||||
|
/** |
||||
|
* 修改执行信息 |
||||
|
* @param data |
||||
|
* @returns {*} |
||||
|
*/ |
||||
|
export const executionUpdate = data => createAPI(`/plm/changeManagement/executionUpdate`,'post',data) |
||||
|
|
||||
|
/** |
||||
|
* 新增会签信息 |
||||
|
* @param data |
||||
|
* @returns {*} |
||||
|
*/ |
||||
|
export const countersignatureSave = data => createAPI(`/plm/changeManagement/countersignatureSave`,'post',data) |
||||
|
|
||||
|
/** |
||||
|
* 查询会签信息 |
||||
|
* @param data |
||||
|
* @returns {*} |
||||
|
*/ |
||||
|
export const countersignatureSearch = data => createAPI(`/plm/changeManagement/countersignatureSearch`,'post',data) |
||||
|
|
||||
|
/** |
||||
|
* 编辑会签信息 |
||||
|
* @param data |
||||
|
* @returns {*} |
||||
|
*/ |
||||
|
export const countersignatureUpdate = data => createAPI(`/plm/changeManagement/countersignatureUpdate`,'post',data) |
||||
|
|
||||
|
/** |
||||
|
* 下达 |
||||
|
* @param data |
||||
|
* @returns {*} |
||||
|
*/ |
||||
|
export const issueChange = data => createAPI(`/plm/changeManagement/issueChange`,'post',data) |
||||
|
|
||||
|
/** |
||||
|
* 提交 |
||||
|
* @param data |
||||
|
* @returns {*} |
||||
|
*/ |
||||
|
export const submitChange = data => createAPI(`/plm/changeManagement/submitChange`,'post',data) |
||||
|
|
||||
|
/** |
||||
|
* 获取节点权限 |
||||
|
* @param data |
||||
|
* @returns {*} |
||||
|
*/ |
||||
|
export const getNodeAuthority = data => createAPI(`/plm/changeManagement/getNodeAuthority`,'post',data) |
||||
|
|
||||
|
/** |
||||
|
* 下达 |
||||
|
* @param data |
||||
|
* @returns {*} |
||||
|
*/ |
||||
|
export const issueChange2 = data => createAPI(`/plm/changeManagement/issueChange2`,'post',data) |
||||
|
|
||||
|
/** |
||||
|
* 提交 |
||||
|
* @param data |
||||
|
* @returns {*} |
||||
|
*/ |
||||
|
export const submitChange2 = data => createAPI(`/plm/changeManagement/submitChange2`,'post',data) |
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
@ -0,0 +1,27 @@ |
|||||
|
import { createAPI } from "@/utils/httpRequest.js"; |
||||
|
|
||||
|
/** |
||||
|
* 客户联系人列表查询 |
||||
|
* @param data |
||||
|
* @returns {*} |
||||
|
*/ |
||||
|
export const customerContactSearch = data => createAPI(`/plm/customerContact/customerContactSearch`,'post',data) |
||||
|
/** |
||||
|
* 客户联系人新增 |
||||
|
* @param data |
||||
|
* @returns {*} |
||||
|
*/ |
||||
|
export const customerContactSave = data => createAPI(`/plm/customerContact/customerContactSave`,'post',data) |
||||
|
/** |
||||
|
* 客户联系人编辑 |
||||
|
* @param data |
||||
|
* @returns {*} |
||||
|
*/ |
||||
|
export const customerContactEdit = data => createAPI(`/plm/customerContact/customerContactEdit`,'post',data) |
||||
|
/** |
||||
|
* 客户联系人删除 |
||||
|
* @param data |
||||
|
* @returns {*} |
||||
|
*/ |
||||
|
export const customerContactDelete = data => createAPI(`/plm/customerContact/customerContactDelete`,'post',data) |
||||
|
|
||||
@ -0,0 +1,71 @@ |
|||||
|
import {createAPI} from "../utils/httpRequest"; |
||||
|
|
||||
|
/** |
||||
|
* 查询字典类型 |
||||
|
* @param no |
||||
|
* @param size |
||||
|
* @param data |
||||
|
* @returns {*} |
||||
|
*/ |
||||
|
export const selectDictTypePage = (no,size,data) =>createAPI(`/sys/dictType/${no}/${size}`,'get',data) |
||||
|
export const selectDictTypeList = (data) =>createAPI(`/sys/dictType/list`,'get',data) |
||||
|
/** |
||||
|
* 新增字典类型 |
||||
|
* @param data |
||||
|
* @returns {*} |
||||
|
*/ |
||||
|
export const saveDictType = (data) => createAPI(`/sys/dictType/save`,'post',data); |
||||
|
/** |
||||
|
* 删除字典类型 |
||||
|
* @param data |
||||
|
* @returns {*} |
||||
|
*/ |
||||
|
export const removeDictType = (data) => createAPI(`/sys/dictType/remove`,'post',data); |
||||
|
/** |
||||
|
* 删除字典类型 |
||||
|
* @param data |
||||
|
* @returns {*} |
||||
|
*/ |
||||
|
export const delDictType = (data) => createAPI(`/sys/dictType/del`,'post',data); |
||||
|
export const delBatchDictType = (data) => createAPI(`/sys/dictType/delBatch`,'post',data); |
||||
|
/** |
||||
|
* 修改字典类型 |
||||
|
* @param data |
||||
|
* @returns {*} |
||||
|
*/ |
||||
|
export const updateDictType = (data) => createAPI(`/sys/dictType/update`,'post',data); |
||||
|
/** |
||||
|
* 查询字典数据 |
||||
|
* @param no |
||||
|
* @param size |
||||
|
* @param data |
||||
|
* @returns {*} |
||||
|
*/ |
||||
|
export const selectDictDataPage = (no,size,data) =>createAPI(`/sys/dictData/${no}/${size}`,'get',data) |
||||
|
export const selectDictDataList = (data) =>createAPI(`/sys/dictData/list`,'post',data) |
||||
|
/** |
||||
|
* 新增字典数据 |
||||
|
* @param data |
||||
|
* @returns {*} |
||||
|
*/ |
||||
|
export const saveDictData = (data) => createAPI(`/sys/dictData/save`,'post',data); |
||||
|
/** |
||||
|
* 删除字典数据 |
||||
|
* @param data |
||||
|
* @returns {*} |
||||
|
*/ |
||||
|
export const removeDictData = (data) => createAPI(`/sys/dictData/remove`,'post',data); |
||||
|
export const removeBatchDictData = (data) => createAPI(`/sys/dictData/removeBatch`,'post',data); |
||||
|
/** |
||||
|
* 删除字典数据 |
||||
|
* @param data |
||||
|
* @returns {*} |
||||
|
*/ |
||||
|
export const delDictData = (data) => createAPI(`/sys/dictData/del`,'post',data); |
||||
|
export const delBatchDictData = (data) => createAPI(`/sys/dictData/delBatch`,'post',data); |
||||
|
/** |
||||
|
* 修改字典数据 |
||||
|
* @param data |
||||
|
* @returns {*} |
||||
|
*/ |
||||
|
export const updateDictData = (data) => createAPI(`/sys/dictData/update`,'post',data); |
||||
@ -0,0 +1,8 @@ |
|||||
|
import {createAPI} from "../../utils/httpRequest"; |
||||
|
|
||||
|
export const getPriceCheckPropertiesList = (data)=>createAPI(`/quotation/properties/list`,'post',data) |
||||
|
export const updatePriceCheckPropertiesList = (data)=>createAPI(`/quotation/properties/update`,'post',data) |
||||
|
export const searchPriceCheckPropertiesList = (data)=>createAPI(`/quotation/properties/search`,'post',data) |
||||
|
export const searchPriceCheckPropertiesItemList = (data)=>createAPI(`/quotation/properties/item/list`,'post',data) |
||||
|
export const savePriceCheckPropertiesItem = (data)=>createAPI(`/quotation/properties/item/save`,'post',data) |
||||
|
export const removePriceCheckPropertiesItem = (data)=>createAPI(`/quotation/properties/item/remove`,'post',data) |
||||
@ -0,0 +1,141 @@ |
|||||
|
import { createAPI } from "@/utils/httpRequest.js"; |
||||
|
import {data} from "autoprefixer"; |
||||
|
|
||||
|
/** |
||||
|
* 报价信息列表查询 |
||||
|
* @param data |
||||
|
* @returns {*} |
||||
|
*/ |
||||
|
export const quotationInformationSearch = data => createAPI(`/plm/quotationInformation/quotationInformationSearch`,'post',data) |
||||
|
/** |
||||
|
* 报价信息新增 |
||||
|
* @param data |
||||
|
* @returns {*} |
||||
|
*/ |
||||
|
export const quotationInformationSave = data => createAPI(`/plm/quotationInformation/quotationInformationSave`,'post',data) |
||||
|
/** |
||||
|
* 报价信息编辑 |
||||
|
* @param data |
||||
|
* @returns {*} |
||||
|
*/ |
||||
|
export const quotationInformationEdit = data => createAPI(`/plm/quotationInformation/quotationInformationEdit`,'post',data) |
||||
|
/** |
||||
|
* 报价信息删除 |
||||
|
* @param data |
||||
|
* @returns {*} |
||||
|
*/ |
||||
|
export const quotationInformationDelete = data => createAPI(`/plm/quotationInformation/quotationInformationDelete`,'post',data) |
||||
|
/** |
||||
|
* 获取报价单附件列表 |
||||
|
* @param data |
||||
|
* @returns {*} |
||||
|
*/ |
||||
|
export const getFileContentList = data => createAPI(`/plm/quotationInformation/getFileContentList`,'post',data) |
||||
|
/** |
||||
|
* 获取报价结果对象 |
||||
|
* @param data |
||||
|
* @returns {*} |
||||
|
*/ |
||||
|
export const quotationResultSearch = data => createAPI(`/plm/quotationInformation/quotationResultSearch`,'post',data) |
||||
|
/** |
||||
|
* 文件上传 |
||||
|
* @param data |
||||
|
* @returns {*} |
||||
|
*/ |
||||
|
export const uploadFile = data => createAPI(`/plm/quotationInformation/uploadFile`,'post',data) |
||||
|
/** |
||||
|
* 文件删除 |
||||
|
* @param data |
||||
|
* @returns {*} |
||||
|
*/ |
||||
|
export const deleteQuotationFile = data => createAPI(`/plm/quotationInformation/deleteQuotationFile`,'post',data) |
||||
|
/** |
||||
|
* 保存报价结果 |
||||
|
* @param data |
||||
|
* @returns {*} |
||||
|
*/ |
||||
|
export const saveQuotationResult = data => createAPI(`/plm/quotationInformation/saveQuotationResult`,'post',data) |
||||
|
/** |
||||
|
* 文件下载 |
||||
|
* @param data |
||||
|
* @returns {*} |
||||
|
*/ |
||||
|
export const downLoadQuotationFile = data => createAPI(`/plm/quotationInformation/downLoadQuotationFile?id=`+data.id,'post','download') |
||||
|
/** |
||||
|
* 保存提交结果 |
||||
|
* @param data |
||||
|
* @returns {*} |
||||
|
*/ |
||||
|
export const saveSubmitResult = data => createAPI(`/plm/quotationInformation/saveSubmitResult`,'post',data) |
||||
|
/** |
||||
|
* 保存客户回复 |
||||
|
* @param data |
||||
|
* @returns {*} |
||||
|
*/ |
||||
|
export const saveCustomerResponse = data => createAPI(`/plm/quotationInformation/saveCustomerResponse`,'post',data) |
||||
|
/** |
||||
|
* 获取产品列表 |
||||
|
* @param data |
||||
|
* @returns {*} |
||||
|
*/ |
||||
|
export const getProjectPartList = data => createAPI(`/pms/eamProject/eamProjectPartSearch`,'post',data) |
||||
|
/** |
||||
|
* 获取项目列表 |
||||
|
* @param data |
||||
|
* @returns {*} |
||||
|
*/ |
||||
|
export const searchProjectInfoList = data => createAPI(`/pms/eamProject/eamProjectInfoSearch`,'post',data) |
||||
|
/** |
||||
|
* 检查报价进度 |
||||
|
* @param data |
||||
|
* @returns {*} |
||||
|
*/ |
||||
|
export const checkQuotationStatus = data => createAPI(`/plm/quotationInformation/checkQuotationStatus`,'post',data) |
||||
|
/** |
||||
|
* 获取项目信息 |
||||
|
* @param data |
||||
|
* @returns {*} |
||||
|
*/ |
||||
|
export const getProjectInformation = data => createAPI(`/pms/eamProject/eamProjectInfoSearch`,'post',data) |
||||
|
/** |
||||
|
* 获取客户信息 |
||||
|
* @param data |
||||
|
* @returns {*} |
||||
|
*/ |
||||
|
export const getCustomerInformation = data => createAPI(`/customer/queryCustomerList`,'post',data) |
||||
|
/** |
||||
|
* 批量文件删除 |
||||
|
* @param data |
||||
|
* @returns {*} |
||||
|
*/ |
||||
|
export const batchDeleteQuotationFile = data => createAPI(`/plm/quotationInformation/batchDeleteQuotationFile`,'post',data) |
||||
|
/** |
||||
|
* 关闭模态框删除文件 |
||||
|
* @param data |
||||
|
* @returns {*} |
||||
|
*/ |
||||
|
export const closeModalDeleteFile = data => createAPI(`/plm/quotationInformation/closeModalDeleteFile`,'post',data) |
||||
|
/** |
||||
|
* 通过询价单编号查询询价单信息 |
||||
|
* @param data |
||||
|
* @returns {*} |
||||
|
*/ |
||||
|
export const searchQuotationByQuotationNo = data => createAPI(`/plm/quotationInformation/searchQuotationByQuotationNo`,'post',data) |
||||
|
/** |
||||
|
* 提交 |
||||
|
* @param data |
||||
|
* @returns {*} |
||||
|
*/ |
||||
|
export const submitChange = data => createAPI(`/plm/quotationInformation/submitChange`,'post',data) |
||||
|
|
||||
|
/** |
||||
|
* 下达 |
||||
|
* @param data |
||||
|
* @returns {*} |
||||
|
*/ |
||||
|
export const quotationInformationEditStatus = data => createAPI(`/plm/quotationInformation/quotationInformationEditStatus`,'post',data) |
||||
|
|
||||
|
|
||||
|
export const uploadExcel = data => createAPI(`plm/quotationInformation/uploadExcel`,'post',data) |
||||
|
|
||||
|
export const queryFileId = data => createAPI(`/pms/qc/queryFileId`,'post',data) |
||||
@ -0,0 +1,10 @@ |
|||||
|
import {createAPI} from "../../utils/httpRequest"; |
||||
|
|
||||
|
export const getTestPropertiesList = (data)=>createAPI(`/test/properties/list`,'post',data) |
||||
|
export const updateTestPropertiesList = (data)=>createAPI(`/test/properties/update`,'post',data) |
||||
|
export const searchTestPropertiesList = (data)=>createAPI(`/test/properties/search`,'post',data) |
||||
|
export const searchModalDetails = (data)=>createAPI(`/properties/searchModalDetails`,'post',data) |
||||
|
export const searchTestPropertiesItem = (data)=>createAPI(`/test/properties/item`,'post',data) |
||||
|
export const removeTestPropertiesItem = (data)=>createAPI(`/test/properties/remove`,'post',data) |
||||
|
export const saveTestPropertiesItem = (data)=>createAPI(`/test/properties/save`,'post',data) |
||||
|
export const searchTestPropertiesItemList = (data)=>createAPI(`/test/properties/item/list`,'post',data) |
||||
@ -0,0 +1,147 @@ |
|||||
|
<script> |
||||
|
export default { |
||||
|
name: "transferTable", |
||||
|
props: { |
||||
|
dataList: { |
||||
|
type: Array, |
||||
|
default: () => [] |
||||
|
}, |
||||
|
modelList: { |
||||
|
type: Array, |
||||
|
default: () => [] |
||||
|
} |
||||
|
}, |
||||
|
model:{ |
||||
|
prop: "modelList", |
||||
|
event: "change" |
||||
|
}, |
||||
|
data(){ |
||||
|
return{ |
||||
|
searchModel: { |
||||
|
itemNo: "", |
||||
|
itemDesc: "" |
||||
|
}, |
||||
|
searchTableList: [], |
||||
|
dataTableList: [] |
||||
|
} |
||||
|
}, |
||||
|
methods:{ |
||||
|
handleSearch(){ |
||||
|
this.$emit("search", this.searchModel) |
||||
|
}, |
||||
|
handleAdd(){ |
||||
|
if (this.searchTableList.length === 0){ |
||||
|
this.$message.warning("请选择需要新增的属性") |
||||
|
return |
||||
|
} |
||||
|
let params = JSON.parse(JSON.stringify(this.searchModel)) |
||||
|
params.searchTableList = JSON.parse(JSON.stringify(this.searchTableList)) |
||||
|
this.$emit("add",params) |
||||
|
}, |
||||
|
handleDelete() { |
||||
|
if (this.dataTableList.length === 0){ |
||||
|
this.$message.warning("请选择需要删除的属性") |
||||
|
return |
||||
|
} |
||||
|
let params = JSON.parse(JSON.stringify(this.searchModel)) |
||||
|
params.dataTableList = JSON.parse(JSON.stringify(this.dataTableList)) |
||||
|
this.$emit("delete",params) |
||||
|
}, |
||||
|
handleRowClick(row, column, event, table) { |
||||
|
this.$refs[table].toggleRowSelection(row) |
||||
|
}, |
||||
|
handleSelectionChange(selection, table) { |
||||
|
this[`${table}List`] = selection |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
<template> |
||||
|
<div> |
||||
|
<el-form :model="searchModel" label-position="top" :inline="true"> |
||||
|
<el-form-item label="属性编码"> |
||||
|
<el-input v-model="searchModel.itemNo"></el-input> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="属性名称"> |
||||
|
<el-input v-model="searchModel.itemDesc"></el-input> |
||||
|
</el-form-item> |
||||
|
<el-form-item label=" "> |
||||
|
<el-button type="primary" @click="handleSearch">查询</el-button> |
||||
|
</el-form-item> |
||||
|
</el-form> |
||||
|
<el-row :gutter="20"> |
||||
|
<!--表格1--> |
||||
|
<el-col :span="11"> |
||||
|
<span style="font-size: 12px">可选属性:</span> |
||||
|
<el-table |
||||
|
height="400px" |
||||
|
:data="dataList" |
||||
|
ref="searchTable" |
||||
|
@selection-change="(selection)=>handleSelectionChange(selection,'searchTable')" |
||||
|
@row-click="(row,column,event)=>handleRowClick(row,column,event,'searchTable')" |
||||
|
border> |
||||
|
<el-table-column |
||||
|
type="selection" |
||||
|
header-align="center" |
||||
|
align="center" |
||||
|
width="50"> |
||||
|
</el-table-column> |
||||
|
<el-table-column |
||||
|
prop="itemNo" |
||||
|
header-align="center" |
||||
|
align="left" |
||||
|
label="属性编码"> |
||||
|
</el-table-column> |
||||
|
<el-table-column |
||||
|
prop="itemDesc" |
||||
|
header-align="center" |
||||
|
align="left" |
||||
|
label="属性名称"> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
</el-col> |
||||
|
<!--按钮--> |
||||
|
<el-col :span="2"> |
||||
|
<div style="text-align: center;display: flex;flex-direction: column;align-items: center;justify-content: center;height: 400px"> |
||||
|
<div><el-button type="primary" @click="handleAdd">新增<i class="el-icon-d-arrow-right el-icon--right"></i></el-button></div> |
||||
|
<div><el-button type="primary" @click="handleDelete" icon="el-icon-d-arrow-left" style="margin-top: 10px">删除</el-button></div> |
||||
|
</div> |
||||
|
</el-col> |
||||
|
<!--表格2--> |
||||
|
<el-col :span="11"> |
||||
|
<span style="font-size: 12px">已有属性:</span> |
||||
|
<el-table |
||||
|
height="400px" |
||||
|
:data="modelList" |
||||
|
ref="dataTable" |
||||
|
@selection-change="(selection)=>handleSelectionChange(selection,'dataTable')" |
||||
|
@row-click="(row,column,event)=>handleRowClick(row,column,event,'dataTable')" |
||||
|
border> |
||||
|
<el-table-column |
||||
|
type="selection" |
||||
|
header-align="center" |
||||
|
align="center" |
||||
|
width="50"> |
||||
|
</el-table-column> |
||||
|
<el-table-column |
||||
|
prop="itemNo" |
||||
|
header-align="center" |
||||
|
align="left" |
||||
|
label="属性编码"> |
||||
|
</el-table-column> |
||||
|
<el-table-column |
||||
|
prop="itemDesc" |
||||
|
header-align="center" |
||||
|
align="left" |
||||
|
label="属性名称"> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<style scoped> |
||||
|
|
||||
|
</style> |
||||
@ -0,0 +1,414 @@ |
|||||
|
<script> |
||||
|
import { |
||||
|
getPriceCheckPropertiesList, |
||||
|
removePriceCheckPropertiesItem, |
||||
|
savePriceCheckPropertiesItem, |
||||
|
searchPriceCheckPropertiesItemList, |
||||
|
searchPriceCheckPropertiesList, |
||||
|
updatePriceCheckPropertiesList, |
||||
|
} from "../../../api/quote/priceCheckProperties"; |
||||
|
import TransferTable from "../common/transferTable.vue"; |
||||
|
|
||||
|
export default { |
||||
|
name: "priceCheckProperties", |
||||
|
components: {TransferTable}, |
||||
|
props:{ |
||||
|
dataList:{ |
||||
|
type: Array, |
||||
|
default: ()=>[], |
||||
|
}, |
||||
|
quotationNo:{ |
||||
|
type:String, |
||||
|
}, |
||||
|
columnList:{ |
||||
|
type: Array, |
||||
|
default: ()=>[], |
||||
|
}, |
||||
|
height:{ |
||||
|
type:Number, |
||||
|
default:200 |
||||
|
}, |
||||
|
}, |
||||
|
model:{ |
||||
|
prop:"dataList", |
||||
|
event:"change" |
||||
|
}, |
||||
|
data(){ |
||||
|
return{ |
||||
|
attributeSaveDialog:false, |
||||
|
loading:false, |
||||
|
attributeDialog:true, |
||||
|
copyAttributeList:[], |
||||
|
productColumnList: [ |
||||
|
{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 100002001, |
||||
|
serialNumber: '100002001TableItemNo', |
||||
|
tableId: "100002001Table", |
||||
|
tableName: "属性表", |
||||
|
columnProp: 'itemNo', |
||||
|
headerAlign: "center", |
||||
|
align: "left", |
||||
|
columnLabel: '属性编码', |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
},{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 100002001, |
||||
|
serialNumber: '100002001TableItemDesc', |
||||
|
tableId: "100002001Table", |
||||
|
tableName: "属性表", |
||||
|
columnProp: 'itemDesc', |
||||
|
headerAlign: "center", |
||||
|
align: "left", |
||||
|
columnLabel: '属性名称', |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
}, |
||||
|
{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 100002001, |
||||
|
serialNumber: '100002001TableValueType', |
||||
|
tableId: "100002001Table", |
||||
|
tableName: "属性表", |
||||
|
columnProp: 'valueType', |
||||
|
headerAlign: "center", |
||||
|
align: "center", |
||||
|
columnLabel: '值类型', |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth:80, |
||||
|
}, |
||||
|
// { |
||||
|
// userId: this.$store.state.user.name, |
||||
|
// functionId: 100002001, |
||||
|
// serialNumber: '100002001TableMinValue', |
||||
|
// tableId: "100002001Table", |
||||
|
// tableName: "属性表", |
||||
|
// columnProp: 'minValue', |
||||
|
// headerAlign: "center", |
||||
|
// align: "center", |
||||
|
// columnLabel: '最小值', |
||||
|
// columnHidden: false, |
||||
|
// columnImage: false, |
||||
|
// columnSortable: false, |
||||
|
// sortLv: 0, |
||||
|
// status: true, |
||||
|
// fixed: '', |
||||
|
// columnWidth:80, |
||||
|
// },{ |
||||
|
// userId: this.$store.state.user.name, |
||||
|
// functionId: 100002001, |
||||
|
// serialNumber: '100002001TableMaxValue', |
||||
|
// tableId: "100002001Table", |
||||
|
// tableName: "属性表", |
||||
|
// columnProp: 'maxValue', |
||||
|
// headerAlign: "center", |
||||
|
// align: "center", |
||||
|
// columnLabel: '最大值', |
||||
|
// columnHidden: false, |
||||
|
// columnImage: false, |
||||
|
// columnSortable: false, |
||||
|
// sortLv: 0, |
||||
|
// status: true, |
||||
|
// fixed: '', |
||||
|
// columnWidth:80, |
||||
|
// }, |
||||
|
{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 100002001, |
||||
|
serialNumber: '100002001TableMaxValue', |
||||
|
tableId: "100002001Table", |
||||
|
tableName: "属性表", |
||||
|
columnProp: 'textValue', |
||||
|
headerAlign: "center", |
||||
|
align: "left", |
||||
|
columnLabel: '属性值', |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth:120, |
||||
|
}, |
||||
|
// { |
||||
|
// userId: this.$store.state.user.name, |
||||
|
// functionId: 100002001, |
||||
|
// serialNumber: '100002001TableMinValue', |
||||
|
// tableId: "100002001Table", |
||||
|
// tableName: "属性表", |
||||
|
// columnProp: 'numValue', |
||||
|
// headerAlign: "center", |
||||
|
// align: "right", |
||||
|
// columnLabel: '数字值', |
||||
|
// columnHidden: false, |
||||
|
// columnImage: false, |
||||
|
// columnSortable: false, |
||||
|
// sortLv: 0, |
||||
|
// status: true, |
||||
|
// fixed: '', |
||||
|
// columnWidth:120, |
||||
|
// }, |
||||
|
// { |
||||
|
// userId: this.$store.state.user.name, |
||||
|
// functionId: 100002001, |
||||
|
// serialNumber: '100002001TableDefaultValue', |
||||
|
// tableId: "100002001Table", |
||||
|
// tableName: "属性表", |
||||
|
// columnProp: 'defaultValue', |
||||
|
// headerAlign: "center", |
||||
|
// align: "right", |
||||
|
// columnLabel: '参照值', |
||||
|
// columnHidden: false, |
||||
|
// columnImage: false, |
||||
|
// columnSortable: false, |
||||
|
// sortLv: 0, |
||||
|
// status: true, |
||||
|
// fixed: '', |
||||
|
// }, |
||||
|
], |
||||
|
searchDataList:[], |
||||
|
} |
||||
|
}, |
||||
|
|
||||
|
mounted() { |
||||
|
this.$nextTick(() => { |
||||
|
/*第二个表格高度的动态调整*/ |
||||
|
this.secondHeight = window.innerHeight -this.height; |
||||
|
}) |
||||
|
}, |
||||
|
|
||||
|
methods:{ |
||||
|
savePriceCheckPropertiesItem(params){ |
||||
|
let i = 0; |
||||
|
let arr = params.searchTableList.map(item=>{ |
||||
|
item.quotationNo = this.quotationNo; |
||||
|
item.seqNo = i++; |
||||
|
return item |
||||
|
}) |
||||
|
savePriceCheckPropertiesItem(arr).then(({data})=>{ |
||||
|
if (data && data.code === 0){ |
||||
|
this.$message.success(data.msg); |
||||
|
this.getPriceCheckProperties(params); |
||||
|
}else { |
||||
|
this.$message.warning(data.msg); |
||||
|
} |
||||
|
}).catch((error)=>{ |
||||
|
this.$message.error(error) |
||||
|
}) |
||||
|
}, |
||||
|
removePriceCheckPropertiesItem(params){ |
||||
|
removePriceCheckPropertiesItem(params.dataTableList).then(({data})=>{ |
||||
|
if (data && data.code === 0){ |
||||
|
this.$message.success(data.msg); |
||||
|
this.getPriceCheckProperties(params); |
||||
|
}else { |
||||
|
this.$message.warning(data.msg); |
||||
|
} |
||||
|
}).catch((error)=>{ |
||||
|
this.$message.error(error) |
||||
|
}) |
||||
|
}, |
||||
|
searchPriceCheckPropertiesItemList(value){ |
||||
|
let params= JSON.parse(JSON.stringify(value)) |
||||
|
params.site=this.$store.state.user.site; |
||||
|
params.list = this.dataList; |
||||
|
if (!this.attributeSaveDialog){ |
||||
|
this.searchDataList = []; |
||||
|
} |
||||
|
searchPriceCheckPropertiesItemList(params).then(({data})=>{ |
||||
|
if (data && data.code === 0){ |
||||
|
this.searchDataList = data.rows; |
||||
|
this.attributeSaveDialog = true; |
||||
|
}else { |
||||
|
this.$message.warning(data.msg) |
||||
|
} |
||||
|
}).catch((error)=>{ |
||||
|
this.$message.error(error) |
||||
|
}) |
||||
|
}, |
||||
|
getPriceCheckProperties(searchData){ |
||||
|
let params = { |
||||
|
site:this.$store.state.user.site, |
||||
|
quotationNo: this.quotationNo |
||||
|
} |
||||
|
getPriceCheckPropertiesList(params).then(({data})=>{ |
||||
|
if (data && data.code === 0){ |
||||
|
this.$emit("change",data.rows) |
||||
|
if (searchData){ |
||||
|
this.$nextTick(()=>{ |
||||
|
this.searchPriceCheckPropertiesItemList(searchData); |
||||
|
}) |
||||
|
} |
||||
|
}else { |
||||
|
this.$message.warning(data.msg) |
||||
|
} |
||||
|
}).catch((error)=>{ |
||||
|
this.$message.error(error) |
||||
|
}) |
||||
|
}, |
||||
|
updatePriceCheckPropertiesList(){ |
||||
|
updatePriceCheckPropertiesList(this.copyAttributeList).then(({data})=>{ |
||||
|
if (data && data.code === 0){ |
||||
|
this.$message.success(data.msg); |
||||
|
this.$emit("change",this.copyAttributeList) |
||||
|
this.getPriceCheckProperties(); |
||||
|
this.attributeDialog = true; |
||||
|
}else { |
||||
|
this.$message.warning(data.msg); |
||||
|
} |
||||
|
}).catch((error)=>{ |
||||
|
this.$message.error(error) |
||||
|
}) |
||||
|
}, |
||||
|
searchPriceCheckPropertiesList(){ |
||||
|
let params = { |
||||
|
site:this.$store.state.user.site, |
||||
|
quotationNo: this.quotationNo |
||||
|
} |
||||
|
this.loading = true |
||||
|
searchPriceCheckPropertiesList(params).then(({data})=>{ |
||||
|
if (data && data.code === 0){ |
||||
|
this.getPriceCheckProperties(); |
||||
|
}else { |
||||
|
this.$message.warning(data.msg) |
||||
|
} |
||||
|
this.loading = false |
||||
|
}).catch((error)=>{ |
||||
|
this.loading = false |
||||
|
this.$message.error(error) |
||||
|
}) |
||||
|
}, |
||||
|
saveClick(){ |
||||
|
if (this.attributeDialog){ |
||||
|
this.copyAttributeList = JSON.parse(JSON.stringify(this.dataList)) |
||||
|
this.attributeDialog = false; |
||||
|
}else { |
||||
|
this.updatePriceCheckPropertiesList(); |
||||
|
} |
||||
|
}, |
||||
|
saveBtnClick(){ |
||||
|
if (!this.attributeDialog) { |
||||
|
this.$message.warning('请保存更改!') |
||||
|
return |
||||
|
} |
||||
|
this.searchPriceCheckPropertiesItemList({}) |
||||
|
}, |
||||
|
}, |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
<template> |
||||
|
<div> |
||||
|
<div style="margin-top: 5px"> |
||||
|
<!-- <el-button type="primary" :loading="loading" v-if="quotationNo" @click="searchPriceCheckPropertiesList">刷新属性</el-button>--> |
||||
|
<el-button type="primary" :loading="loading" v-if="quotationNo" @click="saveBtnClick">新增</el-button> |
||||
|
<el-button type="primary" @click="saveClick" v-if="quotationNo">{{ attributeDialog?'编辑':'保存' }}</el-button> |
||||
|
</div> |
||||
|
<div class="rq" v-if="attributeDialog" style="height: 100%"> |
||||
|
<el-table |
||||
|
:height="this.height + 30" |
||||
|
:data="dataList" |
||||
|
border |
||||
|
style="width: 100%;margin-top: 5px"> |
||||
|
<el-table-column |
||||
|
v-for="(item,index) in productColumnList" :key="index" |
||||
|
:sortable="item.columnSortable" |
||||
|
:prop="item.columnProp" |
||||
|
:header-align="item.headerAlign" |
||||
|
:show-overflow-tooltip="item.showOverflowTooltip" |
||||
|
:align="item.align" |
||||
|
:fixed="item.fixed===''?false:item.fixed" |
||||
|
:min-width="item.columnWidth" |
||||
|
:label="item.columnLabel"> |
||||
|
<template slot-scope="scope"> |
||||
|
<div v-if="item.columnProp !== 'textValue' && item.columnProp !== 'numValue'"> |
||||
|
<span v-if="!item.columnHidden">{{ scope.row[item.columnProp] }}</span> |
||||
|
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span> |
||||
|
</div> |
||||
|
<div v-else> |
||||
|
{{scope.row.textValue?scope.row.textValue:scope.row.numValue}} |
||||
|
</div> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
</div> |
||||
|
<div class="rq" v-else style="height: 100%"> |
||||
|
<el-table |
||||
|
:height="this.height +30" |
||||
|
:data="copyAttributeList" |
||||
|
border |
||||
|
style="width: 100%;margin-top: 5px"> |
||||
|
<el-table-column |
||||
|
v-for="(item,index) in productColumnList" :key="index" |
||||
|
:sortable="item.columnSortable" |
||||
|
:prop="item.columnProp" |
||||
|
:header-align="item.headerAlign" |
||||
|
:show-overflow-tooltip="item.showOverflowTooltip" |
||||
|
:align="item.align" |
||||
|
:fixed="item.fixed===''?false:item.fixed" |
||||
|
:min-width="item.columnWidth" |
||||
|
:label="item.columnLabel"> |
||||
|
<template slot-scope="scope"> |
||||
|
<div v-if="item.columnProp !== 'textValue' && item.columnProp !== 'numValue'"> |
||||
|
<span v-if="!item.columnHidden">{{ scope.row[item.columnProp] }}</span> |
||||
|
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span> |
||||
|
</div> |
||||
|
<div v-else> |
||||
|
<div v-if="scope.row.valueChooseFlag !== 'Y'"> |
||||
|
<el-input-number v-model="scope.row.numValue" style="padding: 0;width: 100%" v-if="scope.row.valueType === '数字'" :controls="false"></el-input-number> |
||||
|
<el-input v-model="scope.row.textValue" v-else></el-input> |
||||
|
</div> |
||||
|
<div v-else> |
||||
|
<el-select style="width: 100%;" v-if="scope.row.valueType === '文本'" v-model="scope.row.textValue"> |
||||
|
<el-option :value="i.availableValue" :label="i.availableValue" v-for="(i,key) in scope.row.list" :key="key"></el-option> |
||||
|
</el-select> |
||||
|
<el-select style="width: 100%;" v-else v-model="scope.row.numValue"> |
||||
|
<el-option :value="i.availableValue" :label="i.availableValue" v-for="(i,key) in scope.row.list" :key="key"></el-option> |
||||
|
</el-select> |
||||
|
</div> |
||||
|
</div> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
</div> |
||||
|
<el-dialog title="属性项目" v-drag :visible.sync="attributeSaveDialog" append-to-body> |
||||
|
<transfer-table v-if="attributeSaveDialog" |
||||
|
v-model="dataList" |
||||
|
:data-list="searchDataList" |
||||
|
@add="savePriceCheckPropertiesItem" |
||||
|
@delete="removePriceCheckPropertiesItem" |
||||
|
@search="searchPriceCheckPropertiesItemList"></transfer-table> |
||||
|
<el-footer style="height:40px;margin-top: 20px;text-align:center"> |
||||
|
<el-button type="primary" @click="attributeSaveDialog = false">关闭</el-button> |
||||
|
</el-footer> |
||||
|
</el-dialog> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<style scoped> |
||||
|
.el-input-number /deep/ .el-input__inner { |
||||
|
text-align: right; |
||||
|
padding-right: 5px !important; |
||||
|
} |
||||
|
|
||||
|
/deep/ .el-input .el-input--medium{ |
||||
|
line-height: 20px; |
||||
|
} |
||||
|
/deep/ .el-input-number .el-input--medium{ |
||||
|
line-height: 20px; |
||||
|
} |
||||
|
</style> |
||||
@ -0,0 +1,141 @@ |
|||||
|
<template> |
||||
|
<div class="customer-css"> |
||||
|
<el-dialog :title="titleCon" :close-on-click-modal="false" :visible.sync="visible" width="390px" style="height: 520px;" class="customer-dialog"> |
||||
|
<el-form :inline="true" label-position="top" label-width="80px"> |
||||
|
<el-button type="primary" @click="downloadFile()">下载文件模板</el-button> |
||||
|
<el-row> |
||||
|
<el-col :span="24"> |
||||
|
<el-upload class="customer-upload" drag action="javascript:void(0);" ref="uploadFile" :limit="1" accept=".xlsx,.xls" |
||||
|
:before-upload="beforeUploadHandle" :on-change="onChange" :auto-upload="false" style="text-align: left;"> |
||||
|
<i class="el-icon-upload"></i> |
||||
|
<div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div> |
||||
|
</el-upload> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
</el-form> |
||||
|
<span slot="footer" class="dialog-footer"> |
||||
|
<el-button type="primary" @click="saveUploadFile()">保存</el-button> |
||||
|
<el-button type="primary" @click="closeDialog">关闭</el-button> |
||||
|
</span> |
||||
|
</el-dialog> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import { |
||||
|
uploadExcel, // 导入项目文件 |
||||
|
queryFileId, // 查询文件ID |
||||
|
} from "@/api/quote/quotationInformation.js" |
||||
|
import { downLoadObjectFile } from '@/api/eam/eam_object_list.js' |
||||
|
import axios from 'axios' |
||||
|
import Vue from 'vue' |
||||
|
export default { |
||||
|
data() { |
||||
|
return { |
||||
|
titleCon: '文件导入', |
||||
|
visible: false, |
||||
|
fileList: [], |
||||
|
pageData: { |
||||
|
createBy: '', |
||||
|
site: '' |
||||
|
}, |
||||
|
} |
||||
|
}, |
||||
|
methods: { |
||||
|
//初始化组件的参数 |
||||
|
init(currentRow) { |
||||
|
// 获得类别 |
||||
|
this.pageData = JSON.parse(JSON.stringify(currentRow)) |
||||
|
//打开页面 |
||||
|
this.visible = true; |
||||
|
}, |
||||
|
// 上传之前 |
||||
|
beforeUploadHandle(file) { |
||||
|
let extName = file[0].name.substring(file[0].name.lastIndexOf('.')).toLowerCase() |
||||
|
if (!(extName === '.xlsx' || extName === '.xls')) { |
||||
|
this.$message.error('数据导入失败,请选择正确的xlsx模板文件') |
||||
|
return false |
||||
|
} |
||||
|
}, |
||||
|
/*选择上传文件时*/ |
||||
|
onChange(file) { |
||||
|
this.fileList.push(file); |
||||
|
}, |
||||
|
/*关闭modal*/ |
||||
|
closeDialog() { |
||||
|
this.fileList = []; |
||||
|
// 刷新报工的页面 |
||||
|
this.$emit('refreshPageTables'); |
||||
|
// 关闭当前的页面 |
||||
|
this.visible = false; |
||||
|
}, |
||||
|
/*保修当前的数据*/ |
||||
|
saveUploadFile() { |
||||
|
/*判断文件是否上传*/ |
||||
|
if (null == this.fileList || 0 == this.fileList.length) { |
||||
|
this.$message.error("请先上传文件!"); |
||||
|
return false; |
||||
|
} |
||||
|
const formData = new FormData(); |
||||
|
formData.append("file", this.fileList[0].raw); |
||||
|
formData.append("createBy", this.pageData.createBy); |
||||
|
formData.append("site", this.pageData.site); |
||||
|
uploadExcel(formData).then(({data}) => { |
||||
|
if (data.code === 0) { |
||||
|
this.$message.success(data.msg); |
||||
|
// 清空文件上传记录 |
||||
|
this.$refs.uploadFile.clearFiles(); |
||||
|
// 关闭窗口并刷新页面 |
||||
|
this.closeDialog(); |
||||
|
} else { |
||||
|
this.$message.warning(data.msg); |
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
// 下载 |
||||
|
async downloadFile(){ |
||||
|
let file = { |
||||
|
id: 0, |
||||
|
fileName: '' |
||||
|
} |
||||
|
let tempData = { |
||||
|
orderRef1: '', |
||||
|
orderRef2: '' |
||||
|
} |
||||
|
tempData.orderRef1 = 'quotation'; |
||||
|
tempData.orderRef2 = 'quotationFormat'; |
||||
|
await queryFileId(tempData).then(({data}) => { |
||||
|
if (data && data.code === 0) { |
||||
|
file.id = data.data.id |
||||
|
file.fileName = data.data.fileName |
||||
|
} else { |
||||
|
this.$alert(data.msg, '错误', { |
||||
|
confirmButtonText: '确定' |
||||
|
}) |
||||
|
} |
||||
|
}) |
||||
|
await downLoadObjectFile(file).then(({data}) => { |
||||
|
// 不限制文件下载类型 |
||||
|
const blob = new Blob([data], {type: "application/octet-stream"}) |
||||
|
// 下载文件名称 |
||||
|
const fileName = file.fileName |
||||
|
// a标签下载 |
||||
|
const linkNode = document.createElement('a') |
||||
|
// a标签的download属性规定下载文件的名称 |
||||
|
linkNode.download = fileName |
||||
|
linkNode.style.display = 'none' |
||||
|
// 生成一个Blob URL |
||||
|
linkNode.href = URL.createObjectURL(blob) |
||||
|
document.body.appendChild(linkNode) |
||||
|
// 模拟在按钮上的一次鼠标单击 |
||||
|
linkNode.click() |
||||
|
// 释放URL 对象 |
||||
|
URL.revokeObjectURL(linkNode.href) |
||||
|
document.body.removeChild(linkNode) |
||||
|
}) |
||||
|
}, |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
<style scoped lang="scss"> |
||||
|
</style> |
||||
@ -0,0 +1,136 @@ |
|||||
|
<template> |
||||
|
<div class="customer-css"> |
||||
|
<el-dialog :title="pageData.titleCon" :close-on-click-modal="false" :visible.sync="visible" width="390px" style="height: 520px;" class="customer-dialog"> |
||||
|
<el-form :inline="true" label-position="top" label-width="80px"> |
||||
|
<el-row> |
||||
|
<el-col :span="12"> |
||||
|
<el-form-item class="customer-item" label="申请单号:" > |
||||
|
<el-input v-model="pageData.quotationNo" readonly style="width: 120px"></el-input> |
||||
|
<!-- <el-select v-model="pageData.quotationNo" placeholder="请选择" style="width: 120px;">--> |
||||
|
<!-- <el-option--> |
||||
|
<!-- v-for = "item in options"--> |
||||
|
<!-- :key = "item.key"--> |
||||
|
<!-- :label = "item.value"--> |
||||
|
<!-- :value = "item.value">--> |
||||
|
<!-- </el-option>--> |
||||
|
<!-- </el-select>--> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
<el-row> |
||||
|
<el-col :span="24"> |
||||
|
<el-upload class="customer-upload" drag |
||||
|
action="javascript:void(0);" ref="uploadFile" :limit="1" |
||||
|
:before-upload="beforeUploadHandle" :on-change="onChange" |
||||
|
accept="*" :auto-upload="false" |
||||
|
style="text-align: left;"> |
||||
|
<i class="el-icon-upload"></i> |
||||
|
<div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div> |
||||
|
</el-upload> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
<el-row> |
||||
|
<el-col :span="24" style="margin-bottom: 30px;"> |
||||
|
<el-form-item class="customer-item" label="备注:" > |
||||
|
<el-input type="textarea" style="width: 360px;" placeholder="请输入内容" v-model="pageData.fileRemark"></el-input> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
<el-row> |
||||
|
</el-row> |
||||
|
</el-form> |
||||
|
<span slot="footer" class="dialog-footer"> |
||||
|
<el-button type="primary" @click="saveUploadFile()">保存</el-button> |
||||
|
<el-button type="primary" @click="closeDialog">关闭</el-button> |
||||
|
</span> |
||||
|
</el-dialog> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import { |
||||
|
uploadFile // 文件上传 |
||||
|
} from '@/api/quote/quotationInformation.js' |
||||
|
export default { |
||||
|
data() { |
||||
|
return { |
||||
|
folder: '', |
||||
|
visible: false, |
||||
|
fileList: [], |
||||
|
pageData: { |
||||
|
titleCon: '', |
||||
|
site: this.$store.state.user.site, |
||||
|
createBy: this.$store.state.user.name, |
||||
|
quotationNo: '', |
||||
|
fileRemark: '', |
||||
|
folder: '', |
||||
|
// options: [] |
||||
|
}, |
||||
|
// options: [], |
||||
|
dataListLoading: false, |
||||
|
} |
||||
|
}, |
||||
|
methods: { |
||||
|
// 初始化组件的参数 |
||||
|
init(currentRow) { |
||||
|
// 初始化参数 |
||||
|
this.pageData = JSON.parse(JSON.stringify(currentRow)) |
||||
|
// this.options = this.pageData.options |
||||
|
this.folder = this.pageData.folder |
||||
|
// 打开页面 |
||||
|
this.visible = true |
||||
|
}, |
||||
|
// 上传之前 |
||||
|
beforeUploadHandle(file) {}, |
||||
|
/*选择上传文件时*/ |
||||
|
onChange(file){ |
||||
|
this.fileList.push(file) |
||||
|
}, |
||||
|
/*关闭modal*/ |
||||
|
closeDialog(){ |
||||
|
this.fileList = [] |
||||
|
// 刷新报工的页面 |
||||
|
this.$emit('refreshPageTables') |
||||
|
//关闭当前的页面 |
||||
|
this.visible = false |
||||
|
}, |
||||
|
/*保修当前的数据*/ |
||||
|
saveUploadFile(){ |
||||
|
let remark = this.pageData.fileRemark |
||||
|
if(remark == null || remark == undefined){ |
||||
|
remark = '' |
||||
|
} |
||||
|
/*判断文件是否上传*/ |
||||
|
if(this.fileList == null || this.fileList.length === 0){ |
||||
|
this.$message.error("请先上传文件!") |
||||
|
return false |
||||
|
} |
||||
|
// if(this.pageData.quotationNo === '' || this.pageData.quotationNo == null){ |
||||
|
// this.$message.error("请选择申请单号!") |
||||
|
// return false |
||||
|
// } |
||||
|
const formData = new FormData() |
||||
|
//片接文件 |
||||
|
formData.append("file", this.fileList[0].raw) |
||||
|
formData.append("folder", this.folder) |
||||
|
formData.append("orderRef1", this.pageData.site) |
||||
|
formData.append("orderRef2", this.pageData.quotationNo) |
||||
|
formData.append("fileRemark", remark) |
||||
|
uploadFile(formData).then(({data}) => { |
||||
|
if (data.code === 0) { |
||||
|
this.$message.success(data.msg) |
||||
|
// 清空文件上传记录 |
||||
|
this.$refs.uploadFile.clearFiles() |
||||
|
this.pageData.fileRemark = '' |
||||
|
this.fileList = [] |
||||
|
}else { |
||||
|
this.$message.warning(data.msg) |
||||
|
} |
||||
|
}) |
||||
|
} |
||||
|
}, |
||||
|
} |
||||
|
</script> |
||||
|
<style scoped lang="scss"> |
||||
|
|
||||
|
</style> |
||||
3594
src/views/modules/quote/requestForQuote.vue
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
@ -0,0 +1,102 @@ |
|||||
|
<template> |
||||
|
<div> |
||||
|
<el-select v-bind="$attrs" v-on="$listeners" :value="value" style="width: 100%" @change="changeDictData"> |
||||
|
<el-option v-for="(item, index) in options" |
||||
|
:key="index" :label="item.dictLabel" |
||||
|
:value="item.dictValue" |
||||
|
:disabled="item.status === 'N' || disabledOptionsValue.includes(item.dictValue)"> |
||||
|
<slot :label="item.dictLabel" :value="item.dictValue"></slot> |
||||
|
</el-option> |
||||
|
</el-select> |
||||
|
</div> |
||||
|
</template> |
||||
|
<script> |
||||
|
import {selectDictDataList} from "../../../api/dict"; |
||||
|
export default { |
||||
|
name:'dictDataSelect', |
||||
|
model:{ |
||||
|
prop:'value', |
||||
|
event:'change' |
||||
|
}, |
||||
|
props:{ |
||||
|
dictType: { |
||||
|
type: String, |
||||
|
}, |
||||
|
dictTypeList:{ |
||||
|
type:Array, |
||||
|
default:()=>[], |
||||
|
}, |
||||
|
value:{ |
||||
|
required: true, |
||||
|
}, |
||||
|
useDefaultValue:{ |
||||
|
type:Boolean, |
||||
|
default:true, |
||||
|
}, |
||||
|
useSite:{ |
||||
|
type:Boolean, |
||||
|
default:true, |
||||
|
}, |
||||
|
disabledOptionsValue:{ |
||||
|
type:Array, |
||||
|
default:()=>[], |
||||
|
}, |
||||
|
site:{ |
||||
|
type:String, |
||||
|
default:undefined, |
||||
|
} |
||||
|
}, |
||||
|
data () { |
||||
|
return { |
||||
|
options: [] |
||||
|
} |
||||
|
}, |
||||
|
created () { |
||||
|
this.initOption() |
||||
|
}, |
||||
|
methods: { |
||||
|
dictDefaultValue(){ |
||||
|
// 当value值不存在 并且查询的下拉框存在默认值列,将value赋值为默认 |
||||
|
if (!this.value && this.options.length > 0){ |
||||
|
let find = this.options.find(item=>item.isDefault === 'Y'); |
||||
|
if (find && find.status === 'Y'){ |
||||
|
this.$emit("change",find.dictValue); |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
//初始化options |
||||
|
async initOption () { |
||||
|
// 组合查询条件 |
||||
|
let params = { |
||||
|
site:this.useSite?this.$store.state.user.site:"*", |
||||
|
dictType:this.dictType, |
||||
|
dictTypeList: this.dictTypeList |
||||
|
} |
||||
|
if (this.site){ |
||||
|
params.site = this.site |
||||
|
} |
||||
|
|
||||
|
try { |
||||
|
// 等待返回值 |
||||
|
let {data} = await selectDictDataList(params); |
||||
|
// 参数赋值 |
||||
|
if (data && data.code === 0){ |
||||
|
this.options = data.rows; |
||||
|
if (this.options.length === 0){ |
||||
|
this.$emit("change",'') |
||||
|
} |
||||
|
} |
||||
|
if (this.useDefaultValue){ |
||||
|
this.dictDefaultValue(); |
||||
|
} |
||||
|
}catch (e) { |
||||
|
return Promise.reject(e) |
||||
|
} |
||||
|
}, |
||||
|
// el-select @change事件,修改父组件值 |
||||
|
changeDictData(val){ |
||||
|
this.$emit('change',val) |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
@ -0,0 +1,396 @@ |
|||||
|
<script> |
||||
|
import {updateDictData,selectDictTypeList,saveDictData,selectDictDataPage,delDictData,delBatchDictData,removeBatchDictData} from "../../../api/dict"; |
||||
|
import DictDataSelect from "./dict-data-select.vue"; |
||||
|
export default { |
||||
|
name: "dictData", |
||||
|
components: {DictDataSelect}, |
||||
|
data(){ |
||||
|
return{ |
||||
|
// 查询对象 |
||||
|
searchData:{ |
||||
|
site:this.$store.state.user.site, |
||||
|
dictLabel:undefined, |
||||
|
dictType:undefined, |
||||
|
status:undefined, |
||||
|
}, |
||||
|
// 分页条件 |
||||
|
no:1, |
||||
|
size:50, |
||||
|
total:0, |
||||
|
// 新增对象 |
||||
|
saveData:{ |
||||
|
dictId:undefined, |
||||
|
dictLabel:undefined, |
||||
|
dictType: undefined, |
||||
|
dictValue: undefined, |
||||
|
dictSort: 1, |
||||
|
isDefault: 'N', |
||||
|
status:'Y', |
||||
|
createBy:this.$store.state.user.name, |
||||
|
createDate:undefined, |
||||
|
updateBy:this.$store.state.user.name, |
||||
|
updateDate:undefined, |
||||
|
remark:undefined, |
||||
|
site:this.$store.state.user.site, |
||||
|
}, |
||||
|
// 校验提示 |
||||
|
dataLabelValue:[ |
||||
|
{label:'字典标签',value:'dictLabel'}, |
||||
|
{label:'字典类型',value:'dictType'}, |
||||
|
{label:'字典键值',value:'dictValue'}, |
||||
|
{label:'字典排序',value:'dictSort'}, |
||||
|
{label:'状态',value:'status'}, |
||||
|
], |
||||
|
// 字典类型集合 |
||||
|
dictDataList:[], |
||||
|
dictTypeList:[], |
||||
|
// 模态框开关 |
||||
|
saveDataDialogFlag:false, |
||||
|
// 新增修改状态(0新增,1修改) |
||||
|
insertOrUpdate:0, |
||||
|
// 新增修改规则 |
||||
|
dictDataRules: { |
||||
|
dictLabel:[{required:true,message:' ',tagger:['blur','change']}], |
||||
|
dictType:[{required:true,message:' ',tagger:['blur','change']}], |
||||
|
dictValue:[{required:true,message:' ',tagger:['blur','change']}], |
||||
|
dictSort:[{required:true,type:'number',message:' ',tagger:['blur','change']}], |
||||
|
status:[{required:true,message:' ',tagger:['blur','change']}], |
||||
|
}, |
||||
|
// 选择的表格列 |
||||
|
selectionDictDataList:[], |
||||
|
// 选中的标签页 |
||||
|
activeTabs:'dictData', |
||||
|
} |
||||
|
}, |
||||
|
methods:{ |
||||
|
initDictData(){ |
||||
|
this.dictDataList = [] |
||||
|
selectDictDataPage(this.no,this.size,this.searchData).then(({data})=>{ |
||||
|
if (data && data.code === 0){ |
||||
|
this.dictDataList = data.rows; |
||||
|
this.total = data.total; |
||||
|
this.$refs.dictDataTable.clearSelection(); |
||||
|
}else { |
||||
|
this.$message.error(data.msg) |
||||
|
} |
||||
|
}).catch((error)=>{ |
||||
|
|
||||
|
}) |
||||
|
}, |
||||
|
openDictTypeDialog(val,row){ |
||||
|
this.insertOrUpdate = val; |
||||
|
if (row){ |
||||
|
this.saveData = {...row} |
||||
|
} |
||||
|
this.saveDataDialogFlag = true |
||||
|
}, |
||||
|
closeSaveDataDialog(){ |
||||
|
this.$refs.saveDataForm.resetFields(); |
||||
|
this.saveData = { |
||||
|
dictId:undefined, |
||||
|
dictLabel:undefined, |
||||
|
dictType: undefined, |
||||
|
dictValue: undefined, |
||||
|
dictSort: 1, |
||||
|
isDefault: 'N', |
||||
|
status:'Y', |
||||
|
createBy:this.$store.state.user.name, |
||||
|
createDate:undefined, |
||||
|
updateBy:this.$store.state.user.name, |
||||
|
updateDate:undefined, |
||||
|
remark:undefined, |
||||
|
site:this.$store.state.user.site, |
||||
|
} |
||||
|
}, |
||||
|
openSaveDataDialog(){ |
||||
|
this.saveData.dictType = this.searchData.dictType; |
||||
|
}, |
||||
|
saveOrUpdate(){ |
||||
|
this.$refs.saveDataForm.validate((validate,objects)=> { |
||||
|
if (validate) { |
||||
|
if (this.insertOrUpdate === 0){ |
||||
|
this.saveDictData(); |
||||
|
}else { |
||||
|
this.updateDictData(); |
||||
|
} |
||||
|
} else { |
||||
|
this.rulesValidateLabel(objects,this.dataLabelValue) |
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
saveDictData(){ |
||||
|
saveDictData(this.saveData).then(({data})=>{ |
||||
|
if (data && data.code === 0){ |
||||
|
this.$message.success(data.msg); |
||||
|
this.initDictData(); |
||||
|
this.saveDataDialogFlag = false; |
||||
|
}else { |
||||
|
this.$message.error(data.msg) |
||||
|
} |
||||
|
}).catch((error)=>{ |
||||
|
this.$message.error(error) |
||||
|
}) |
||||
|
}, |
||||
|
updateDictData(){ |
||||
|
updateDictData(this.saveData).then(({data})=>{ |
||||
|
if (data && data.code === 0){ |
||||
|
this.$message.success(data.msg); |
||||
|
this.initDictData(); |
||||
|
this.saveDataDialogFlag = false; |
||||
|
}else { |
||||
|
this.$message.error(data.msg) |
||||
|
} |
||||
|
}).catch((error)=>{ |
||||
|
this.$message.error(error) |
||||
|
}) |
||||
|
}, |
||||
|
delDictData(row){ |
||||
|
this.$confirm('此操作将永久删除该文件, 是否继续?', '提示', { |
||||
|
confirmButtonText: '确定', |
||||
|
cancelButtonText: '取消', |
||||
|
type: 'warning' |
||||
|
}).then(() => { |
||||
|
delDictData(row).then(({data})=>{ |
||||
|
if (data && data.code === 0){ |
||||
|
this.$message.success(data.msg); |
||||
|
this.initDictData(); |
||||
|
}else { |
||||
|
this.$message.error(data.msg) |
||||
|
} |
||||
|
}).catch((error)=>{ |
||||
|
this.$message.error(error) |
||||
|
}) |
||||
|
}).catch(() => { |
||||
|
this.$message({ |
||||
|
type: 'info', |
||||
|
message: '已取消删除' |
||||
|
}); |
||||
|
}); |
||||
|
}, |
||||
|
delBatchDictData(){ |
||||
|
let some = this.selectionDictDataList.some(item=>item.isSystem === 'N'); |
||||
|
if (!some){ |
||||
|
this.$alert('系统参数,无法删除', '警告', {confirmButtonText: '确定',}); |
||||
|
return; |
||||
|
} |
||||
|
this.$confirm('此操作将永久删除该文件, 是否继续?', '提示', { |
||||
|
confirmButtonText: '确定', |
||||
|
cancelButtonText: '取消', |
||||
|
type: 'warning' |
||||
|
}).then(() => { |
||||
|
delBatchDictData(this.selectionDictDataList).then(({data})=>{ |
||||
|
if (data && data.code === 0){ |
||||
|
this.$message.success(data.msg); |
||||
|
this.initDictData(); |
||||
|
this.$refs.dictDataTable.clearSelection(); |
||||
|
}else { |
||||
|
this.$message.error(data.msg) |
||||
|
} |
||||
|
}).catch((error)=>{ |
||||
|
this.$message.error(error) |
||||
|
}) |
||||
|
}).catch(() => { |
||||
|
|
||||
|
}); |
||||
|
}, |
||||
|
removeBatchDictData(){ |
||||
|
let some = this.selectionDictDataList.some(item=>item.isSystem === 'N'); |
||||
|
if (!some){ |
||||
|
this.$alert('系统参数,无法停用', '警告', {confirmButtonText: '确定',}); |
||||
|
return; |
||||
|
} |
||||
|
removeBatchDictData(this.selectionDictDataList).then(({data})=>{ |
||||
|
if (data && data.code === 0){ |
||||
|
this.$message.success(data.msg); |
||||
|
this.initDictData(); |
||||
|
this.$refs.dictDataTable.clearSelection(); |
||||
|
}else { |
||||
|
this.$message.error(data.msg) |
||||
|
} |
||||
|
}).catch((error)=>{ |
||||
|
this.$message.error(error) |
||||
|
}) |
||||
|
}, |
||||
|
handleSelectionChange(val){ |
||||
|
this.selectionDictDataList = val; |
||||
|
}, |
||||
|
dictTypeSizeChange(val){ |
||||
|
this.no = 1 |
||||
|
this.size = val |
||||
|
this.initDictData(); |
||||
|
}, |
||||
|
dictTypeNoChange(val){ |
||||
|
this.no = val |
||||
|
this.initDictData(); |
||||
|
}, |
||||
|
selectDictTypeList(){ |
||||
|
let params = { |
||||
|
site:this.$store.state.user.site, |
||||
|
} |
||||
|
selectDictTypeList(params).then(({data})=>{ |
||||
|
if (data && data.code === 0){ |
||||
|
this.dictTypeList = data.rows; |
||||
|
if (this.$route.params.dictType){ |
||||
|
this.searchData.dictType = this.$route.params.dictType |
||||
|
}else { |
||||
|
if (this.dictTypeList.length > 0){ |
||||
|
this.searchData.dictType = this.dictTypeList[0].dictType; |
||||
|
} |
||||
|
} |
||||
|
this.initDictData(); |
||||
|
} |
||||
|
}).catch((error)=>{ |
||||
|
|
||||
|
}) |
||||
|
}, |
||||
|
// 校验处理 |
||||
|
rulesValidateLabel(objects, labels) { |
||||
|
for (let filed in objects) { |
||||
|
for (let i = 0; i < labels.length; i++) { |
||||
|
let quotationToolColumn = labels[i]; |
||||
|
if (quotationToolColumn.value === filed) { |
||||
|
this.$message.warning(quotationToolColumn.label+"为空或填写不正确"); |
||||
|
return |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
}, |
||||
|
created() { |
||||
|
|
||||
|
}, |
||||
|
activated() { |
||||
|
this.selectDictTypeList() |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
<template> |
||||
|
<div> |
||||
|
<el-form ref="form" label-position="top" :model="searchData" label-width="80px"> |
||||
|
<el-row :gutter="20"> |
||||
|
<el-col :span="3"> |
||||
|
<el-form-item label="字典名称"> |
||||
|
<el-select filterable v-model="searchData.dictType" style="width: 100%" placeholder="请选择"> |
||||
|
<el-option |
||||
|
v-for="item in dictTypeList" |
||||
|
:key="item.dictType" |
||||
|
:label="item.dictName" |
||||
|
:value="item.dictType"> |
||||
|
</el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="3"> |
||||
|
<el-form-item label="字典标签"> |
||||
|
<el-input v-model="searchData.dictLabel" clearable/> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="3"> |
||||
|
<el-form-item label="状态"> |
||||
|
<dict-data-select v-model="searchData.status" clearable dict-type="sys_status" :use-default-value="false"></dict-data-select> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="4"> |
||||
|
<el-form-item label=" "> |
||||
|
<el-button type="primary" @click="initDictData" icon="el-icon-search">查 询</el-button> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
</el-form> |
||||
|
<div style="margin-bottom: 8px;margin-top: 8px"> |
||||
|
<el-button type="primary" icon="el-icon-plus" @click="openDictTypeDialog(0)">新 增</el-button> |
||||
|
<el-button type="primary" icon="el-icon-delete" v-if="false" @click="delBatchDictData">删 除</el-button> |
||||
|
<el-button type="primary" @click="removeBatchDictData">停 用</el-button> |
||||
|
</div> |
||||
|
<el-table |
||||
|
border height="75vh" row-key="dictCode" |
||||
|
:data="dictDataList" |
||||
|
ref="dictDataTable" |
||||
|
@selection-change="handleSelectionChange" |
||||
|
style="width: 100%"> |
||||
|
<el-table-column type="selection" width="55" align="center" :reserve-selection="true"/> |
||||
|
<el-table-column type="index" width="80" header-align="center" label="字典序号" align="right"/> |
||||
|
<el-table-column prop="dictLabel" header-align="center" align="center" label="字典标签"/> |
||||
|
<el-table-column prop="dictValue" header-align="center" label="字典键值"/> |
||||
|
<el-table-column prop="dictSort" header-align="center" label="字典排序"/> |
||||
|
<el-table-column prop="status" header-align="center" width="80" align="center" label="字典状态"> |
||||
|
<template slot-scope="{row,$index}"> |
||||
|
<span :style="{color:row.status === 'Y'?'#67C23A':'red'}">{{row.status === 'Y'?'启用':'停用'}}</span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column prop="isDefault" header-align="center" width="80" align="center" label="是否默认"> |
||||
|
<template slot-scope="{row,$index}"> |
||||
|
<span>{{row.isDefault === 'Y'?'是':'否'}}</span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column prop="remark" header-align="center" align="left" label="备注"/> |
||||
|
<el-table-column prop="createBy" header-align="center" label="创建者"/> |
||||
|
<el-table-column prop="createDate" header-align="center" align="center" label="创建时间"/> |
||||
|
<el-table-column header-align="center" align="center" label="操作" width="160"> |
||||
|
<template slot-scope="{row,$index}"> |
||||
|
<el-button type="text" :disabled="row.isSystem === 'Y'" @click="openDictTypeDialog(1,row)" icon="el-icon-edit">修改</el-button> |
||||
|
<el-button type="text" :disabled="row.isSystem === 'Y'" v-if="false" @click="delDictData(row)" icon="el-icon-delete">删除</el-button> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
<el-pagination |
||||
|
@size-change="dictTypeSizeChange" |
||||
|
@current-change="dictTypeNoChange" |
||||
|
:current-page="no" |
||||
|
:page-sizes="[20, 50, 100, 200, 500]" |
||||
|
:page-size="size" |
||||
|
:total="total" |
||||
|
layout="total,sizes, prev, pager, next, jumper"> |
||||
|
</el-pagination> |
||||
|
<el-dialog :visible.sync="saveDataDialogFlag" @open="openSaveDataDialog" @close="closeSaveDataDialog" width="30%" :title="insertOrUpdate === 0?'新增-字典数据':'修改-字典数据'"> |
||||
|
<el-form ref="saveDataForm" label-position="top" :rules="dictDataRules" :model="saveData" label-width="80px"> |
||||
|
<el-form-item label="字典类型" prop="dictType"> |
||||
|
<el-input disabled v-model="saveData.dictType" clearable/> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="字典标签" prop="dictLabel"> |
||||
|
<el-input v-model="saveData.dictLabel" clearable/> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="数据键值" prop="dictValue"> |
||||
|
<el-input v-model="saveData.dictValue" clearable/> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="数据排序" prop="dictSort"> |
||||
|
<el-input-number v-model="saveData.dictSort" :min="0" :controls="false"/> |
||||
|
</el-form-item> |
||||
|
<el-row :gutter="20"> |
||||
|
<el-col :span="8"> |
||||
|
<el-form-item label="状态" prop="status"> |
||||
|
<el-radio-group v-model="saveData.status"> |
||||
|
<el-radio :label="'Y'">启用</el-radio> |
||||
|
<el-radio :label="'N'">停用</el-radio> |
||||
|
</el-radio-group> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="8"> |
||||
|
<el-form-item label=" " > |
||||
|
<el-checkbox v-model="saveData.isDefault" :true-label="'Y'" :false-label="'N'">默认</el-checkbox> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
<el-form-item label="备注" style="height: 90px"> |
||||
|
<el-input type="textarea" :autosize="{minRows: 3, maxRows: 3}" resize='none' v-model="saveData.remark"/> |
||||
|
</el-form-item> |
||||
|
</el-form> |
||||
|
<span slot="footer" class="dialog-footer"> |
||||
|
<el-button type="primary" @click="saveOrUpdate">确 定</el-button> |
||||
|
<el-button @click="saveDataDialogFlag = false">取 消</el-button> |
||||
|
</span> |
||||
|
</el-dialog> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<style scoped> |
||||
|
/deep/ .el-table .cell { |
||||
|
line-height: 14px; |
||||
|
font-size: 12px; |
||||
|
height: auto; |
||||
|
} |
||||
|
/deep/ .el-textarea .el-textarea__inner { |
||||
|
padding: 0px 5px; |
||||
|
} |
||||
|
</style> |
||||
@ -0,0 +1,353 @@ |
|||||
|
<script> |
||||
|
import {saveDictType,selectDictTypePage,delDictType,delBatchDictType,updateDictType} from "../../../api/dict"; |
||||
|
import DictData from "./dict-data.vue"; |
||||
|
import DictDataSelect from "./dict-data-select.vue"; |
||||
|
import {searchMenuAllListId} from "../../../api/base/properties"; |
||||
|
export default { |
||||
|
name: "dict", |
||||
|
components: {DictDataSelect, DictData}, |
||||
|
data(){ |
||||
|
return{ |
||||
|
menuList:[], |
||||
|
// 查询对象 |
||||
|
searchData:{ |
||||
|
site:this.$store.state.user.site, |
||||
|
dictName:undefined, |
||||
|
dictType:undefined, |
||||
|
status:undefined, |
||||
|
menuId:undefined, |
||||
|
}, |
||||
|
// 分页条件 |
||||
|
no:1, |
||||
|
size:50, |
||||
|
total:0, |
||||
|
// 新增对象 |
||||
|
saveData:{ |
||||
|
dictId:undefined, |
||||
|
dictName:undefined, |
||||
|
dictType: undefined, |
||||
|
status:'Y', |
||||
|
createBy:this.$store.state.user.name, |
||||
|
createDate:undefined, |
||||
|
updateBy:this.$store.state.user.name, |
||||
|
updateDate:undefined, |
||||
|
remark:undefined, |
||||
|
menuId:undefined, |
||||
|
site:this.$store.state.user.site, |
||||
|
}, |
||||
|
// |
||||
|
dataLabelValue:[ |
||||
|
{label:'字典名称',value:'dictName'}, |
||||
|
{label:'字典类型',value:'dictType'}, |
||||
|
{label:'状态',value:'status'}, |
||||
|
{label:'应用菜单',value:'menuId'}, |
||||
|
], |
||||
|
// 字典类型集合 |
||||
|
dictTypeList:[], |
||||
|
// 模态框开关 |
||||
|
saveDataDialogFlag:false, |
||||
|
// 新增修改状态(0新增,1修改) |
||||
|
insertOrUpdate:0, |
||||
|
// 新增修改规则 |
||||
|
dictTypeRules: { |
||||
|
dictName:[{required:true,message:' ',tagger:['blur','change']}], |
||||
|
dictType:[{required:true,message:' ',tagger:['blur','change']}], |
||||
|
status:[{required:true,message:' ',tagger:['blur','change']}], |
||||
|
menuId:[{required:true,message:' ',tagger:['blur','change']}], |
||||
|
}, |
||||
|
// 选择的表格列 |
||||
|
selectionDictTypeList:[], |
||||
|
// 选中的标签页 |
||||
|
activeTabs:'dictData', |
||||
|
} |
||||
|
}, |
||||
|
methods:{ |
||||
|
initDictTypeData(){ |
||||
|
selectDictTypePage(this.no,this.size,this.searchData).then(({data})=>{ |
||||
|
if (data && data.code === 0){ |
||||
|
this.dictTypeList = data.rows; |
||||
|
this.total = data.total; |
||||
|
}else { |
||||
|
this.$message.error(data.msg) |
||||
|
} |
||||
|
}).catch((error)=>{ |
||||
|
|
||||
|
}) |
||||
|
}, |
||||
|
removeDictType(row){ |
||||
|
this.$message.success(row) |
||||
|
}, |
||||
|
openDictTypeDialog(val,row){ |
||||
|
this.insertOrUpdate = val; |
||||
|
if (row){ |
||||
|
this.saveData = {...row} |
||||
|
} |
||||
|
this.saveDataDialogFlag = true |
||||
|
}, |
||||
|
closeSaveDataDialog(){ |
||||
|
this.$refs.saveDataForm.resetFields(); |
||||
|
this.saveData={ |
||||
|
dictId:undefined, |
||||
|
dictName:undefined, |
||||
|
dictType: undefined, |
||||
|
status:'Y', |
||||
|
createBy:this.$store.state.user.name, |
||||
|
createDate:undefined, |
||||
|
updateBy:this.$store.state.user.name, |
||||
|
updateDate:undefined, |
||||
|
remark:undefined, |
||||
|
site:this.$store.state.user.site, |
||||
|
} |
||||
|
}, |
||||
|
saveOrUpdate(){ |
||||
|
this.$refs.saveDataForm.validate((validate,objects)=>{ |
||||
|
if (validate){ |
||||
|
if (this.insertOrUpdate === 0){ |
||||
|
this.saveDictType(); |
||||
|
}else { |
||||
|
this.updateDictType(); |
||||
|
} |
||||
|
}else { |
||||
|
this.rulesValidateLabel(objects,this.dataLabelValue); |
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
saveDictType(){ |
||||
|
saveDictType(this.saveData).then(({data})=>{ |
||||
|
if (data && data.code === 0){ |
||||
|
this.$message.success(data.msg); |
||||
|
this.initDictTypeData(); |
||||
|
this.saveDataDialogFlag = false; |
||||
|
}else { |
||||
|
this.$message.error(data.msg) |
||||
|
} |
||||
|
}).catch((error)=>{ |
||||
|
this.$message.error(error) |
||||
|
}) |
||||
|
}, |
||||
|
updateDictType(){ |
||||
|
updateDictType(this.saveData).then(({data})=>{ |
||||
|
if (data && data.code === 0){ |
||||
|
this.$message.success(data.msg); |
||||
|
this.initDictTypeData(); |
||||
|
this.saveDataDialogFlag = false; |
||||
|
}else { |
||||
|
this.$message.error(data.msg) |
||||
|
} |
||||
|
}).catch((error)=>{ |
||||
|
this.$message.error(error) |
||||
|
}) |
||||
|
}, |
||||
|
delDictType(row){ |
||||
|
this.$confirm('此操作将永久删除该文件, 是否继续?', '提示', { |
||||
|
confirmButtonText: '确定', |
||||
|
cancelButtonText: '取消', |
||||
|
type: 'warning' |
||||
|
}).then(() => { |
||||
|
delDictType(row).then(({data})=>{ |
||||
|
if (data && data.code === 0){ |
||||
|
this.$message.success(data.msg); |
||||
|
this.initDictTypeData(); |
||||
|
}else { |
||||
|
this.$message.error(data.msg) |
||||
|
} |
||||
|
}).catch((error)=>{ |
||||
|
this.$message.error(error) |
||||
|
}) |
||||
|
}).catch(() => { |
||||
|
|
||||
|
}); |
||||
|
}, |
||||
|
delBatchDictType(){ |
||||
|
this.$confirm('此操作将永久删除该文件, 是否继续?', '提示', { |
||||
|
confirmButtonText: '确定', |
||||
|
cancelButtonText: '取消', |
||||
|
type: 'warning' |
||||
|
}).then(() => { |
||||
|
delBatchDictType(this.selectionDictTypeList).then(({data})=>{ |
||||
|
if (data && data.code === 0){ |
||||
|
this.$message.success(data.msg); |
||||
|
this.initDictTypeData(); |
||||
|
this.$refs.dictTypeTable.clearSelection(); |
||||
|
}else { |
||||
|
this.$message.error(data.msg) |
||||
|
} |
||||
|
}).catch((error)=>{ |
||||
|
this.$message.error(error) |
||||
|
}) |
||||
|
}).catch(() => { |
||||
|
this.$message({ |
||||
|
type: 'info', |
||||
|
message: '已取消删除' |
||||
|
}); |
||||
|
}); |
||||
|
}, |
||||
|
handleSelectionChange(val){ |
||||
|
this.selectionDictTypeList = val; |
||||
|
}, |
||||
|
dictTypeSizeChange(val){ |
||||
|
this.no = 1 |
||||
|
this.size = val |
||||
|
this.initDictTypeData(); |
||||
|
}, |
||||
|
dictTypeNoChange(val){ |
||||
|
this.no = val |
||||
|
this.initDictTypeData(); |
||||
|
}, |
||||
|
clickDictType(dictType){ |
||||
|
this.$router.push({name:"sys-dict-data",params:{dictType:dictType},}) |
||||
|
}, |
||||
|
// 校验处理 |
||||
|
rulesValidateLabel(objects, labels) { |
||||
|
for (let filed in objects) { |
||||
|
for (let i = 0; i < labels.length; i++) { |
||||
|
let quotationToolColumn = labels[i]; |
||||
|
if (quotationToolColumn.value === filed) { |
||||
|
this.$message.warning(quotationToolColumn.label+"为空或填写不正确"); |
||||
|
return |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
searchMenuList() { |
||||
|
let params = { |
||||
|
site: this.$store.state.user.site |
||||
|
} |
||||
|
searchMenuAllListId(params).then(({data}) => { |
||||
|
if (data && data.code === 0) { |
||||
|
this.menuList = data.rows; |
||||
|
if (this.menuList.length > 0) { |
||||
|
this.searchData.menuId = this.menuList[0].menuId |
||||
|
} |
||||
|
this.initDictTypeData(); |
||||
|
} else { |
||||
|
this.$message.warning(data.msg) |
||||
|
} |
||||
|
}).catch((error) => { |
||||
|
this.$message.error(error) |
||||
|
}) |
||||
|
}, |
||||
|
}, |
||||
|
created() { |
||||
|
this.searchMenuList(); |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
<template> |
||||
|
<div> |
||||
|
<el-form ref="form" label-position="top" :model="searchData" label-width="80px"> |
||||
|
<el-row :gutter="10"> |
||||
|
<el-col :span="3"> |
||||
|
<el-form-item label="字典名称"> |
||||
|
<el-input v-model="searchData.dictName" clearable/> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="3"> |
||||
|
<el-form-item label="字典类型"> |
||||
|
<el-input v-model="searchData.dictType" clearable/> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="3"> |
||||
|
<el-form-item label="应用菜单"> |
||||
|
<el-select v-model="searchData.menuId" @change="initDictTypeData" clearable style="width: 100%;"> |
||||
|
<el-option :value="i.menuId" :label="i.name" v-for="i in menuList" :key="i.menuId"></el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="3"> |
||||
|
<el-form-item label="状态"> |
||||
|
<dict-data-select v-model="searchData.status" clearable dict-type="sys_status" :use-default-value="false"></dict-data-select> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="4"> |
||||
|
<el-form-item label=" "> |
||||
|
<el-button type="primary" @click="initDictTypeData" icon="el-icon-search">查 询</el-button> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
</el-form> |
||||
|
<div style="margin-bottom: 8px;margin-top: 8px"> |
||||
|
<el-button type="primary" icon="el-icon-plus" @click="openDictTypeDialog(0)" >新 增</el-button><!-- v-if="false" --> |
||||
|
<el-button type="primary" icon="el-icon-delete" @click="delBatchDictType" v-if="false">删 除</el-button> |
||||
|
</div> |
||||
|
<el-table |
||||
|
border height="75vh" row-key="dictId" |
||||
|
:data="dictTypeList" |
||||
|
ref="dictTypeTable" |
||||
|
@selection-change="handleSelectionChange" |
||||
|
style="width: 100%"> |
||||
|
<el-table-column type="selection" width="55" align="center" :reserve-selection="true"/> |
||||
|
<el-table-column type="index" width="80" header-align="center" label="字典序号" align="right"/> |
||||
|
<el-table-column prop="dictName" header-align="center" label="字典名称" show-overflow-tooltip/> |
||||
|
<el-table-column prop="dictType" header-align="center" align="left" label="字典类型" show-overflow-tooltip> |
||||
|
<template slot-scope="{row,$index}"> |
||||
|
<el-link style="cursor: pointer" @click="clickDictType(row.dictType)">{{row.dictType}}</el-link> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column prop="status" header-align="center" width="80" align="center" label="字典状态"> |
||||
|
<template slot-scope="{row,$index}"> |
||||
|
<span :style="{color:row.status === 'Y'?'#67C23A':'red'}">{{row.status === 'Y'?'启用':'停用'}}</span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column prop="remark" header-align="center" align="left" label="备注"/> |
||||
|
<el-table-column prop="createBy" header-align="center" label="创建者"/> |
||||
|
<el-table-column prop="createDate" header-align="center" align="center" label="创建时间"/> |
||||
|
<!-- <el-table-column header-align="center" align="center" label="操作" width="160" v-if="false">--> |
||||
|
<el-table-column header-align="center" align="center" label="操作" width="160"> |
||||
|
<template slot-scope="{row,$index}"> |
||||
|
<el-button type="text" @click="openDictTypeDialog(1,row)" icon="el-icon-edit">修改</el-button> |
||||
|
<el-button type="text" @click="delDictType(row)" icon="el-icon-delete" v-if="false">删除</el-button> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
<el-pagination |
||||
|
@size-change="dictTypeSizeChange" |
||||
|
@current-change="dictTypeNoChange" |
||||
|
:current-page="no" |
||||
|
:page-sizes="[20, 50, 100, 200, 500]" |
||||
|
:page-size="size" |
||||
|
:total="total" |
||||
|
layout="total,sizes, prev, pager, next, jumper"> |
||||
|
</el-pagination> |
||||
|
<el-dialog :visible.sync="saveDataDialogFlag" v-drag @close="closeSaveDataDialog" width="30%" :title="insertOrUpdate === 0?'新增-字典类型':'修改-字典类型'"> |
||||
|
<el-form ref="saveDataForm" label-position="top" :rules="dictTypeRules" :model="saveData" label-width="80px"> |
||||
|
<el-form-item label="字典名称" prop="dictName"> |
||||
|
<el-input v-model="saveData.dictName" clearable/> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="字典类型" prop="dictType"> |
||||
|
<el-input v-model="saveData.dictType" :disabled="insertOrUpdate !== 0" clearable/> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="应用菜单" prop="menuId"> |
||||
|
<el-select v-model="saveData.menuId" style="width: 40%;"> |
||||
|
<el-option :value="i.menuId" :label="i.name" v-for="i in menuList" :key="i.menuId"></el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="状态" prop="status"> |
||||
|
<el-radio-group v-model="saveData.status"> |
||||
|
<el-radio :label="'Y'">启用</el-radio> |
||||
|
<el-radio :label="'N'">停用</el-radio> |
||||
|
</el-radio-group> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="备注" style="height: 90px"> |
||||
|
<el-input type="textarea" :autosize="{minRows: 3, maxRows: 3}" resize='none' v-model="saveData.remark"/> |
||||
|
</el-form-item> |
||||
|
</el-form> |
||||
|
<span slot="footer" class="dialog-footer"> |
||||
|
<el-button type="primary" @click="saveOrUpdate">确 定</el-button> |
||||
|
<el-button @click="saveDataDialogFlag = false">取 消</el-button> |
||||
|
</span> |
||||
|
</el-dialog> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<style scoped> |
||||
|
/deep/ .el-table .cell { |
||||
|
line-height: 14px; |
||||
|
font-size: 12px; |
||||
|
height: auto; |
||||
|
} |
||||
|
/deep/ .el-textarea .el-textarea__inner { |
||||
|
padding: 0px 5px; |
||||
|
} |
||||
|
</style> |
||||
@ -0,0 +1,395 @@ |
|||||
|
<script> |
||||
|
import { |
||||
|
getTestPropertiesList, |
||||
|
removeTestPropertiesItem, |
||||
|
saveTestPropertiesItem, |
||||
|
searchTestPropertiesItem, |
||||
|
searchTestPropertiesItemList, |
||||
|
searchTestPropertiesList, |
||||
|
updateTestPropertiesList |
||||
|
} from "../../../../api/test/testProperties"; |
||||
|
import TransferTable from "../../common/transferTable.vue"; |
||||
|
|
||||
|
export default { |
||||
|
name: "testProperties", |
||||
|
components: {TransferTable}, |
||||
|
props:{ |
||||
|
dataList:{ |
||||
|
type: Array, |
||||
|
default: ()=>[], |
||||
|
}, |
||||
|
testNo:{ |
||||
|
type:String, |
||||
|
}, |
||||
|
testNumber:{ |
||||
|
type:[String,Number], |
||||
|
}, |
||||
|
columnList:{ |
||||
|
type: Array, |
||||
|
default: ()=>[], |
||||
|
}, |
||||
|
height:{ |
||||
|
type:Number, |
||||
|
default:300 |
||||
|
}, |
||||
|
}, |
||||
|
model:{ |
||||
|
prop:"dataList", |
||||
|
event:"change" |
||||
|
}, |
||||
|
data(){ |
||||
|
return{ |
||||
|
loading:false, |
||||
|
attributeDialog:true, |
||||
|
copyAttributeList:[], |
||||
|
attributeSaveDialog:false, |
||||
|
productColumnList: [ |
||||
|
{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 100002001, |
||||
|
serialNumber: '100002001TableItemNo', |
||||
|
tableId: "100002001Table", |
||||
|
tableName: "属性表", |
||||
|
columnProp: 'itemNo', |
||||
|
headerAlign: "center", |
||||
|
align: "left", |
||||
|
columnLabel: '属性编码', |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
},{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 100002001, |
||||
|
serialNumber: '100002001TableItemDesc', |
||||
|
tableId: "100002001Table", |
||||
|
tableName: "属性表", |
||||
|
columnProp: 'itemDesc', |
||||
|
headerAlign: "center", |
||||
|
align: "left", |
||||
|
columnLabel: '属性名称', |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
}, |
||||
|
{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 100002001, |
||||
|
serialNumber: '100002001TableValueType', |
||||
|
tableId: "100002001Table", |
||||
|
tableName: "属性表", |
||||
|
columnProp: 'valueType', |
||||
|
headerAlign: "center", |
||||
|
align: "center", |
||||
|
columnLabel: '值类型', |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth:80, |
||||
|
}, |
||||
|
// { |
||||
|
// userId: this.$store.state.user.name, |
||||
|
// functionId: 100002001, |
||||
|
// serialNumber: '100002001TableMinValue', |
||||
|
// tableId: "100002001Table", |
||||
|
// tableName: "属性表", |
||||
|
// columnProp: 'minValue', |
||||
|
// headerAlign: "center", |
||||
|
// align: "center", |
||||
|
// columnLabel: '最小值', |
||||
|
// columnHidden: false, |
||||
|
// columnImage: false, |
||||
|
// columnSortable: false, |
||||
|
// sortLv: 0, |
||||
|
// status: true, |
||||
|
// fixed: '', |
||||
|
// columnWidth:80, |
||||
|
// },{ |
||||
|
// userId: this.$store.state.user.name, |
||||
|
// functionId: 100002001, |
||||
|
// serialNumber: '100002001TableMaxValue', |
||||
|
// tableId: "100002001Table", |
||||
|
// tableName: "属性表", |
||||
|
// columnProp: 'maxValue', |
||||
|
// headerAlign: "center", |
||||
|
// align: "center", |
||||
|
// columnLabel: '最大值', |
||||
|
// columnHidden: false, |
||||
|
// columnImage: false, |
||||
|
// columnSortable: false, |
||||
|
// sortLv: 0, |
||||
|
// status: true, |
||||
|
// fixed: '', |
||||
|
// columnWidth:80, |
||||
|
// }, |
||||
|
{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 100002001, |
||||
|
serialNumber: '100002001TableMaxValue', |
||||
|
tableId: "100002001Table", |
||||
|
tableName: "属性表", |
||||
|
columnProp: 'textValue', |
||||
|
headerAlign: "center", |
||||
|
align: "left", |
||||
|
columnLabel: '属性值', |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth:120, |
||||
|
}, |
||||
|
// { |
||||
|
// userId: this.$store.state.user.name, |
||||
|
// functionId: 100002001, |
||||
|
// serialNumber: '100002001TableMinValue', |
||||
|
// tableId: "100002001Table", |
||||
|
// tableName: "属性表", |
||||
|
// columnProp: 'numValue', |
||||
|
// headerAlign: "center", |
||||
|
// align: "right", |
||||
|
// columnLabel: '数字值', |
||||
|
// columnHidden: false, |
||||
|
// columnImage: false, |
||||
|
// columnSortable: false, |
||||
|
// sortLv: 0, |
||||
|
// status: true, |
||||
|
// fixed: '', |
||||
|
// columnWidth:120, |
||||
|
// }, |
||||
|
// { |
||||
|
// userId: this.$store.state.user.name, |
||||
|
// functionId: 100002001, |
||||
|
// serialNumber: '100002001TableDefaultValue', |
||||
|
// tableId: "100002001Table", |
||||
|
// tableName: "属性表", |
||||
|
// columnProp: 'defaultValue', |
||||
|
// headerAlign: "center", |
||||
|
// align: "right", |
||||
|
// columnLabel: '参照值', |
||||
|
// columnHidden: false, |
||||
|
// columnImage: false, |
||||
|
// columnSortable: false, |
||||
|
// sortLv: 0, |
||||
|
// status: true, |
||||
|
// fixed: '', |
||||
|
// }, |
||||
|
], |
||||
|
searchDataList:[], |
||||
|
} |
||||
|
}, |
||||
|
methods:{ |
||||
|
searchAttributeList(data){ |
||||
|
let params= JSON.parse(JSON.stringify(data)) |
||||
|
params.site=this.$store.state.user.site; |
||||
|
params.list = this.dataList; |
||||
|
if (!this.attributeSaveDialog){ |
||||
|
this.searchDataList = []; |
||||
|
} |
||||
|
searchTestPropertiesItemList(params).then(({data}) => { |
||||
|
if (data && data.code === 0){ |
||||
|
this.searchDataList = data.rows; |
||||
|
this.attributeSaveDialog = true; |
||||
|
}else { |
||||
|
this.$message.warning(data.msg) |
||||
|
} |
||||
|
}).catch((error)=>{ |
||||
|
this.$message.error(error) |
||||
|
}) |
||||
|
}, |
||||
|
saveTestPropertiesItem(params){ |
||||
|
let i = 0; |
||||
|
let arr = params.searchTableList.map(item=>{ |
||||
|
item.testNo = this.testNo; |
||||
|
item.seqNo = i++; |
||||
|
return item |
||||
|
}) |
||||
|
saveTestPropertiesItem(arr).then(({data})=>{ |
||||
|
if (data && data.code === 0){ |
||||
|
this.$message.success(data.msg); |
||||
|
this.getTestProperties(params) |
||||
|
}else { |
||||
|
this.$message.warning(data.msg); |
||||
|
} |
||||
|
}).catch((error)=>{ |
||||
|
this.$message.error(error) |
||||
|
}) |
||||
|
}, |
||||
|
getTestProperties(searchData){ |
||||
|
let params = { |
||||
|
site:this.$store.state.user.site, |
||||
|
testNo: this.testNo |
||||
|
} |
||||
|
getTestPropertiesList(params).then(({data})=>{ |
||||
|
if (data && data.code === 0){ |
||||
|
this.$emit("change",data.rows) |
||||
|
if (searchData){ |
||||
|
this.$nextTick(()=>{ |
||||
|
this.searchAttributeList(searchData) |
||||
|
}) |
||||
|
} |
||||
|
}else { |
||||
|
this.$message.warning(data.msg) |
||||
|
} |
||||
|
}).catch((error)=>{ |
||||
|
this.$message.error(error) |
||||
|
}) |
||||
|
}, |
||||
|
updateTestPropertiesList(){ |
||||
|
this.loading = true |
||||
|
updateTestPropertiesList(this.copyAttributeList).then(({data})=>{ |
||||
|
if (data && data.code === 0){ |
||||
|
this.$message.success(data.msg); |
||||
|
this.$emit("change",this.copyAttributeList) |
||||
|
this.getTestProperties(); |
||||
|
this.attributeDialog = true; |
||||
|
}else { |
||||
|
this.$message.warning(data.msg); |
||||
|
} |
||||
|
this.loading = false |
||||
|
}).catch((error)=>{ |
||||
|
this.$message.error(error) |
||||
|
this.loading = false |
||||
|
}) |
||||
|
}, |
||||
|
clickSave(){ |
||||
|
if (!this.attributeDialog){ |
||||
|
this.updateTestPropertiesList(); |
||||
|
}else { |
||||
|
this.copyAttributeList = JSON.parse(JSON.stringify(this.dataList)) |
||||
|
this.attributeDialog = false; |
||||
|
} |
||||
|
}, |
||||
|
clickSaveBtn(){ |
||||
|
if (!this.attributeDialog) { |
||||
|
this.$message.warning('请保存更改!') |
||||
|
return |
||||
|
} |
||||
|
//查询 属性模板 |
||||
|
this.searchAttributeList({}) |
||||
|
}, |
||||
|
removeTestPropertiesItem(params){ |
||||
|
removeTestPropertiesItem(params.dataTableList).then(({data})=>{ |
||||
|
if (data && data.code === 0){ |
||||
|
this.$message.success(data.msg); |
||||
|
this.getTestProperties(params) |
||||
|
}else { |
||||
|
this.$message.warning(data.msg); |
||||
|
} |
||||
|
}).catch((error)=>{ |
||||
|
this.$message.error(error) |
||||
|
}) |
||||
|
} |
||||
|
}, |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
<template> |
||||
|
<div> |
||||
|
<div style="margin-top: 5px"> |
||||
|
<el-button type="primary" @click="clickSaveBtn" v-if="testNo">新增</el-button> |
||||
|
<el-button type="primary" :loading="loading" v-if="testNo" @click="clickSave">{{ attributeDialog?'编辑':'保存' }}</el-button> |
||||
|
</div> |
||||
|
<div class="rq " v-if="attributeDialog"> |
||||
|
<el-table |
||||
|
:height="height" |
||||
|
:data="dataList" |
||||
|
border |
||||
|
style="width: 100%;margin-top: 5px"> |
||||
|
<el-table-column |
||||
|
v-for="(item,index) in productColumnList" :key="index" |
||||
|
:sortable="item.columnSortable" |
||||
|
:prop="item.columnProp" |
||||
|
:header-align="item.headerAlign" |
||||
|
:show-overflow-tooltip="item.showOverflowTooltip" |
||||
|
:align="item.align" |
||||
|
:fixed="item.fixed===''?false:item.fixed" |
||||
|
:min-width="item.columnWidth" |
||||
|
:label="item.columnLabel"> |
||||
|
<template slot-scope="scope"> |
||||
|
<div v-if="item.columnProp !== 'textValue' && item.columnProp !== 'numValue'"> |
||||
|
<span v-if="!item.columnHidden">{{ scope.row[item.columnProp] }}</span> |
||||
|
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span> |
||||
|
</div> |
||||
|
<div v-else> |
||||
|
{{scope.row.textValue?scope.row.textValue:scope.row.numValue}} |
||||
|
</div> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
</div> |
||||
|
<div class="rq " v-else> |
||||
|
<el-table |
||||
|
:height="height" |
||||
|
:data="copyAttributeList" |
||||
|
border |
||||
|
style="width: 100%;margin-top: 5px"> |
||||
|
<el-table-column |
||||
|
v-for="(item,index) in productColumnList" :key="index" |
||||
|
:sortable="item.columnSortable" |
||||
|
:prop="item.columnProp" |
||||
|
:header-align="item.headerAlign" |
||||
|
:show-overflow-tooltip="item.showOverflowTooltip" |
||||
|
:align="item.align" |
||||
|
:fixed="item.fixed===''?false:item.fixed" |
||||
|
:min-width="item.columnWidth" |
||||
|
:label="item.columnLabel"> |
||||
|
<template slot-scope="scope"> |
||||
|
<div v-if="item.columnProp !== 'textValue' && item.columnProp !== 'numValue'"> |
||||
|
<span v-if="!item.columnHidden">{{ scope.row[item.columnProp] }}</span> |
||||
|
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span> |
||||
|
</div> |
||||
|
<div v-else> |
||||
|
<div v-if="scope.row.valueChooseFlag !== 'Y'"> |
||||
|
<el-input-number v-model="scope.row.numValue" style="padding: 0;width: 100%" v-if="scope.row.valueType === '数字'" :controls="false"></el-input-number> |
||||
|
<el-input v-model="scope.row.textValue" v-else></el-input> |
||||
|
</div> |
||||
|
<div v-else> |
||||
|
<el-select style="width: 100%;" v-if="scope.row.valueType === '文本'" v-model="scope.row.textValue"> |
||||
|
<el-option :value="i.availableValue" :label="i.availableValue" v-for="(i,key) in scope.row.list" :key="key"></el-option> |
||||
|
</el-select> |
||||
|
<el-select style="width: 100%;" v-else v-model="scope.row.numValue"> |
||||
|
<el-option :value="i.availableValue" :label="i.availableValue" v-for="(i,key) in scope.row.list" :key="key"></el-option> |
||||
|
</el-select> |
||||
|
</div> |
||||
|
</div> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
</div> |
||||
|
<el-dialog title="属性项目" v-drag :visible.sync="attributeSaveDialog" append-to-body> |
||||
|
<transfer-table v-if="attributeSaveDialog" |
||||
|
v-model="dataList" |
||||
|
:data-list="searchDataList" |
||||
|
@add="saveTestPropertiesItem" |
||||
|
@delete="removeTestPropertiesItem" |
||||
|
@search="searchAttributeList"></transfer-table> |
||||
|
<el-footer style="height:40px;margin-top: 20px;text-align:center"> |
||||
|
<el-button type="primary" @click="attributeSaveDialog = false">关闭</el-button> |
||||
|
</el-footer> |
||||
|
</el-dialog> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<style scoped> |
||||
|
.el-input-number /deep/ .el-input__inner { |
||||
|
text-align: right; |
||||
|
padding-right: 5px !important; |
||||
|
} |
||||
|
|
||||
|
/deep/ .el-input .el-input--medium{ |
||||
|
line-height: 20px; |
||||
|
} |
||||
|
/deep/ .el-input-number .el-input--medium{ |
||||
|
line-height: 20px; |
||||
|
} |
||||
|
</style> |
||||
Write
Preview
Loading…
Cancel
Save
Reference in new issue