From adae1f836b4c3ef8bbb49c2bff57608d1e1e8acd Mon Sep 17 00:00:00 2001 From: qb <1191961160@qq.com> Date: Thu, 15 Aug 2024 14:50:45 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=83=A8=E5=88=86bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/option/basicdata/basicdataCarrier2.js | 169 ++++++++++++- .../basicdata/carrier/basicdataCarrier2.vue | 233 ++++++++++++++++-- src/views/waybill/TemporaryStorageList.vue | 2 +- 3 files changed, 385 insertions(+), 19 deletions(-) diff --git a/src/option/basicdata/basicdataCarrier2.js b/src/option/basicdata/basicdataCarrier2.js index 8c1c4bf0..2d73b849 100644 --- a/src/option/basicdata/basicdataCarrier2.js +++ b/src/option/basicdata/basicdataCarrier2.js @@ -46,7 +46,7 @@ export const columnList = [ }, { label: '承运商名称', - prop: 'carrierPhone', + prop: 'carrierName', type: 2, values: '', width: '150', @@ -268,4 +268,171 @@ export const columnList = [ }, ]; +export const formOptions = [ + { + label: '类型', + prop: 'typeName', + type: 1, + checkarr: [], + rules: [], + }, + { + label: '承运商编号', + prop: 'number', + type: 1, + multiple: true, + checkarr: [], + rules: [ + { + required: true, + message: '输入承运商编号', + trigger: ['blur', 'change'], + }, + ], + }, + { + label: '承运商电话', + prop: 'carrierPhone', + type: 1, + checkarr: [], + }, + { + label: '承运商名称', + prop: 'carrierName', + type: 1, + checkarr: [], + }, + { + label: '负责人', + prop: 'head', + type: 1, + checkarr: [], + }, + { + label: '手机号', + prop: 'headPhone', + type: 1, + checkarr: [], + }, + { + label: '营业执照注册号', + prop: 'licenseNub', + type: 1, + checkarr: [], + }, + { + label: '法人', + prop: 'legalPerson', + type: 1, + checkarr: [], + rules: [ + { + required: true, + message: '输入法人名称', + trigger: ['blur', 'change'], + }, + ], + }, + { + label: '法人电话', + prop: 'legalPersonPhone', + type: 1, + checkarr: [], + }, + { + label: '法人身份证', + prop: 'legalPersonId', + type: 1, + checkarr: [], + }, + { + label: '邮箱', + prop: 'mailbox', + type: 1, + checkarr: [], + }, + { + label: '客服电话', + prop: 'customerServicePhone', + type: 1, + checkarr: [], + }, + { + label: '合同开始时间', + prop: 'contractStartTime', + type: 4, + checkarr: [], + }, + { + label: '合同结束时间', + prop: 'contractEndTime', + type: 4, + checkarr: [], + }, + { + label: '道路运输许可证编号', + prop: 'roadTransportNub', + type: 1, + checkarr: [], + rules: [ + { + required: true, + message: '输入道路运输许可证编号', + trigger: ['blur', 'change'], + }, + ], + }, + { + label: '物流园', + prop: 'logisticsPark', + type: 1, + checkarr: [], + }, + { + label: '自有车辆数', + prop: 'freeVehiclesNub', + type: 2, + checkarr: [], + precision: 0, + }, + { + label: '外部车辆数', + prop: 'externalVehiclesNub', + type: 2, + checkarr: [], + precision: 0, + }, + { + label: '星级', + prop: 'starRating', + type: 2, + checkarr: [], + precision: 0, + }, + { + label: '定位地址', + prop: 'locationAddress', + type: 1, + checkarr: [], + }, + { + label: '经度', + prop: 'longitude', + type: 1, + checkarr: [], + }, + { + label: '纬度', + prop: 'latitude', + type: 1, + checkarr: [], + }, + { + label: '备注', + prop: 'notes', + type: 5, + checkarr: [], + }, +]; + export default columnList; diff --git a/src/views/basicdata/carrier/basicdataCarrier2.vue b/src/views/basicdata/carrier/basicdataCarrier2.vue index d8944e9b..4bc27ec9 100644 --- a/src/views/basicdata/carrier/basicdataCarrier2.vue +++ b/src/views/basicdata/carrier/basicdataCarrier2.vue @@ -82,6 +82,150 @@ > + +
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
+ + +
+
@@ -112,7 +256,7 @@ import { handleTranslationDataSeclect, getObjType, } from '@/utils/util'; -import { columnList } from '@/option/basicdata/basicdataCarrier2.js'; +import { columnList, formOptions } from '@/option/basicdata/basicdataCarrier2.js'; import { useRouter } from 'vue-router'; import { ElMessage, ElMessageBox } from 'element-plus'; import { getList, getDetail, add, update, remove } from '@/api/basicdata/basicdataCarrier'; @@ -158,7 +302,7 @@ const details = reactive({ /** 列表 */ columnList: deepClone(columnList), /** 列表数据 */ - data: [{}], + data: [], /** 页面loading */ loadingObj: { /** 列表加载loading */ @@ -178,8 +322,8 @@ const details = reactive({ }, /** 弹出层显示 */ popUpShow: { - /** 图片预览 */ - abnormalVisited: false, + /** 新增 | 编辑 | 查看 */ + dialogVisible: false, }, /** 列表Dom节点 */ listNode: '', @@ -187,8 +331,9 @@ const details = reactive({ /** 全屏 */ fullscreenObj: { /** 查看 */ - view: false, + dialogVisible: false, }, + formOptions: deepClone(formOptions), }); const { search, query, shortcuts, stockupDate, data, loadingObj, selectionList, drawerShow, page } = @@ -206,11 +351,10 @@ onMounted(() => { }); /** 请求页面数据 */ -const onLoad = debounce(async (page?: any, params = {}) => { +const onLoad = debounce(async (params = {}) => { try { details.loadingObj.list = true; let _page = details.page; - if (page) _page = page; const _submitData = { ..._page, ...details.query, ...params }; delete _submitData.total; // 获取暂存单列表 @@ -266,7 +410,7 @@ initData(); /** 搜索 */ const searchChange = () => { - onLoad(details.page); + onLoad(); }; /** 清空表单 */ @@ -275,7 +419,7 @@ const searchReset = () => { details.stockupDate = []; details.page.currentPage = 1; handleClearTableQuery(details.columnList); - onLoad(details.page); + onLoad(); }; /** 展开列表控件 */ @@ -293,7 +437,7 @@ const searchHide = () => { /** 表格表头输入框搜索 */ const inputsc = (index, row) => { handleInputQuery(index, row, details.query); - onLoad(details.page); + onLoad(); }; /** 表格表头时间选择 */ @@ -306,14 +450,14 @@ const timesc = (index, row) => { if (!index) { delete details.query[row.prop]; } - onLoad(details.page); + onLoad(); }; /** 表格表头下拉框选择 */ const selectsc = (index, row) => { handleSelectQuery(index, row, details.query); - onLoad(details.page); + onLoad(); }; /** 表格表头复选框选择 */ @@ -324,7 +468,7 @@ const selectionChange = (list: any) => { /** 每页数量改变执行的回调 */ const sizeChange = (size: number) => { details.page.size = size; - onLoad(details.page); + onLoad(); }; /** 页码改变执行的回调 */ @@ -333,11 +477,35 @@ const currentChange = current => { onLoad(); }; +/** + * 是否开启全屏 + * @params(_type) 开启或关闭 + */ +const handleFullScrean = (_name: string, _type: 'open' | 'close') => { + let _node: any = ''; + if (_name) _node = document.querySelector(`.${_name} .maboxhi`); + + switch (_name) { + case 'packageOrderListlVisited': + details.fullscreenObj.packageOrderListlVisited = + !details.fullscreenObj.packageOrderListlVisited; + + if (_type === 'close') { + if (_node) setNodeHeight(_node, '500px'); + } else { + if (_node) setNodeHeight(_node, '800px'); + } + break; + + default: + details.fullscreenObj[_name] = !details.fullscreenObj[_name]; + break; + } +}; + /** 新增 */ const handleAdd = () => { - $router.push({ - path: '/basicdata/vehicle/basicdataVehicleAddForm', - }); + details.popUpShow.dialogVisible = true; }; /** 删除 @@ -370,7 +538,7 @@ const handleDelete = (isBatch, row: any = {}) => { const { code, msg } = res.data; if (code !== 200) return ElMessage.error(msg); ElMessage.success('删除成功'); - onLoad(details.page); + onLoad(); } catch (error) { console.log('error :>> ', error); } finally { @@ -396,7 +564,38 @@ const handleDelete = (isBatch, row: any = {}) => { margin-top: 20px; } +.mr20 { + margin-right: 20px; +} + .fwb { font-weight: bold; } + +// 弹窗 +:deep(.el-overlay) { + position: absolute; +} + +:deep(.el-overlay-dialog) { + position: absolute; +} + +:deep(.el-form) { + display: flex; + flex-wrap: wrap; + align-items: flex-start; +} + +.w30 { + width: 30%; +} + +.w100 { + width: 100% !important; +} + +:deep(.el-input__inner) { + text-align: left; +} diff --git a/src/views/waybill/TemporaryStorageList.vue b/src/views/waybill/TemporaryStorageList.vue index 529af755..3b47ad21 100644 --- a/src/views/waybill/TemporaryStorageList.vue +++ b/src/views/waybill/TemporaryStorageList.vue @@ -26,7 +26,7 @@ - +handleFullScrean