From 810148c891ced79e6d2f1a71fe8e2bccafdd76a5 Mon Sep 17 00:00:00 2001 From: Vinjor Date: Tue, 22 Oct 2024 15:06:49 +0800 Subject: [PATCH] 1 --- pages-home/home/home.vue | 79 +++- pages-home/static/alow.png | Bin 0 -> 431 bytes pages-home/static/no.png | Bin 0 -> 411 bytes pages-home/static/up.png | Bin 0 -> 460 bytes pages-order/orderDetail/orderDetail.vue | 41 +- pages-order/orderList/orderList.vue | 4 +- pages-repair/apply/applyForm.vue | 382 +++++++++++++++++ pages-repair/applyList/applyList.vue | 18 +- pages-repair/home/home.vue | 545 ------------------------ pages-repair/orderList/orderList.vue | 4 +- pages-warehouse/home/home.vue | 4 +- pages.json | 4 +- pages/detedetails/detelisthygg.vue | 34 +- utils/utils.js | 10 + 14 files changed, 509 insertions(+), 616 deletions(-) create mode 100644 pages-home/static/alow.png create mode 100644 pages-home/static/no.png create mode 100644 pages-home/static/up.png create mode 100644 pages-repair/apply/applyForm.vue delete mode 100644 pages-repair/home/home.vue diff --git a/pages-home/home/home.vue b/pages-home/home/home.vue index ba36f70..10c14a7 100644 --- a/pages-home/home/home.vue +++ b/pages-home/home/home.vue @@ -22,8 +22,29 @@ + + + 审批单处理全部 + + + 已提交 + 4 + + + + 未通过 + 1 + + + + 已通过 + 6 + + + + - + 维修中 4 @@ -43,7 +64,7 @@ - @@ -106,7 +127,7 @@ export default { pageSize: 10, total: 0, //下来刷新状态 - isTriggered:false, + isTriggered:true, orderList: [ ], defaultAvatar: require('@/static/icons/avatar.png') @@ -138,7 +159,7 @@ export default { /** * 上滑加载数据 */ - onReachBottom() { + onReachBottomCus() { //判断 如果页码*页容量大于等于总条数,提示该页数据加载完毕 if (this.pageNo * this.pageSize >= this.total) { uni.$u.toast('没有更多数据了') @@ -382,6 +403,55 @@ export default { } } + .body-card { + border-radius: 6px 6px 6px 6px; + margin: 18px; + padding: 15px; + background: #FFFFFF; + .title { + margin-bottom: 30rpx; + font-weight: bold; + font-size: 32rpx; + color: #113A68; + box-sizing: border-box; + display: flex; + align-items: center; + justify-content: space-between; + column-gap: 20rpx; + } + .formValue { + flex: 1; + width: 0; + text-align: right; + font-weight: 500; + font-size: 13px; + color: #858BA0; + } + .title-box{ + display: flex; + justify-content: space-around; + .title-box-item{ + width: 33%; + text-align: center; + .titleDesc { + font-weight: 500; + font-size: 24rpx; + color: #858BA0; + } + .titleNumber{ + font-weight: 500; + font-size: 40rpx; + color: #333333; + margin: 4px; + } + .titleImg{ + width: 48rpx; + height: 48rpx; + } + } + } + } + .orderCount { margin: 40rpx 32rpx; background: #FFFFFF; @@ -437,6 +507,7 @@ export default { display: flex; flex-direction: column; row-gap: 20rpx; + height: calc(100vh - 500rpx); } } diff --git a/pages-home/static/alow.png b/pages-home/static/alow.png new file mode 100644 index 0000000000000000000000000000000000000000..db054cc973c2bda8109f1bb0b257df45ace589b6 GIT binary patch literal 431 zcmV;g0Z{&lP)Px#mQYMoMF0Q*72mZK)~yrSvlQO36WOd2+OQYeuoc;`72dEF+Oe_y?u+!^yZ`XL z|M0y3@fO;z7TT~E+pibfuov2}7u&EF+piYeu(tm17u&EH+prniupHd79^A4j-L^2_ zxIEyzMB%?j;=oDbz;N!@4Wxro%cO)r zm_Tpwgbg$W0JJSQ6BTD{I1&+!9k4##vTQZ1Lov(d7Z5EQ_FFd`o{xw|xQ=Y|F_bM*kgAguSW2LN3^GIQj2 ZfEQKPG?_4(Bn|)o002ovPDHLkV1oN-)1CkT literal 0 HcmV?d00001 diff --git a/pages-home/static/no.png b/pages-home/static/no.png new file mode 100644 index 0000000000000000000000000000000000000000..0757fd60a769e70f32d6c353755e367845a0a1db GIT binary patch literal 411 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaM3?#3wJbMaAF%}28J29*~C-V}>sSEH4aRt)< zr+WSGcmLn#^M8Wh{~q7}6a4>A@&~am@A`ja{{I^X{@*zG|K@@J6aB#`03-`!PXaTp z?gcTX1pl8I^M7vg|AiUJ^BCXwg1nq2blm=0Mvf#$p2eM|3AL`|K*+kFYo?; z|Lp(g*Z=?jul|0F5$FQ3k|4ie1_?=Nbq#Y{yNuG(^13}2FMt2>=ifgEBM(!cij|%& zjv*T7=U%!k)TAK5_Ta3K^{j}AH#|=T-TTiPZSbVx>OF%$_cy%ZVQ>fwDOq(`s^n?Q zt%-p7Yc2h0U6;^lLzqkIpv#GW?r6=drglwpvWz{gq#(a0cU> sSr_0F;tHf0 zO8+wyyk;o;#!&Wyq4*O+$v1|=?+nG?H(&kVx$p0Rd;bsK|9{~Ae}>|33?*L~ioXIC zFap&Se`AE9-M9V$MVL#!v6OvdFaO3{{f)2sn?TJsq1tbv_1`2Kzv=aSH}3x)zW7Jn zvL9J%e-&^3-M#-;|DoR#5C5Ka^!M~*zvrF$z2NlU#b^I+z5Z|e^*=xZ_ul$*@ZSHs zZ~i`b_xJ11f8T!n`~UyH!@l2)KnF{d1o;IsNJvVnYna>GWt5hd*X_A@`TO@DKmPpt zm-*&u7*Nd$PZ!4!jq_{I9v5nI5Ma3=CfdW16v3nMOy>H9|NoQaL{h|0O|G5wGCY|1 zz?Ntwzuiq5VZkcJYg`|2h(2-WS=hXWnW0NcW=YNc7aJx7om$0J=g)C5exBa+yvW9@ zYI4>;SNqhQBKb%+bjH|X{IXLYOd*l3Hir1d#z5Z#RDA0D; zC*TuvPtFO(-Zl3a1Bx#1&1P)Ktj>CSQ|$v&gpcVGkIxeufNo~+boFyt=akR{0DSA= A{{R30 literal 0 HcmV?d00001 diff --git a/pages-order/orderDetail/orderDetail.vue b/pages-order/orderDetail/orderDetail.vue index 717380e..2e165c9 100644 --- a/pages-order/orderDetail/orderDetail.vue +++ b/pages-order/orderDetail/orderDetail.vue @@ -257,8 +257,8 @@ import VNavigationBar from '@/components/VNavigationBar.vue' import {bus} from "@/utils/eventBus"; import request from '@/utils/request'; import upload from '@/utils/upload' -import {getOrderStatusText,formatDate,formatTimestamp,getDictTextByCodeAndValue,saveTicketsRecords,setStorageWithExpiry,getStorageWithExpiry} from "@/utils/utils"; -import {getUserInfo,setJSONData} from '@/utils/auth' +import {getOrderStatusText,formatDate,formatTimestamp,getDictTextByCodeAndValue,saveTicketsRecords} from "@/utils/utils"; +import {getUserInfo,setJSONData,setStorageWithExpiry,getStorageWithExpiry} from '@/utils/auth' import config from '@/config' export default { components: { @@ -497,6 +497,11 @@ export default { }else if("start" == e.item.code){ //开始施工 this.startWork(this.ticketInfo.id) + }else if("apply" == e.item.code){ + //配件申请 + uni.navigateTo({ + url: '/pages-repair/apply/applyForm?ticketId='+this.ticketId + }) } // uni.showModal({ // title: '提示', @@ -693,37 +698,7 @@ export default { }, //翻译配件单位 getItemUnit(unitCode){ - if(unitCode){ - let dictArray = getStorageWithExpiry("repair_unit"); - if(null==dictArray || undefined==dictArray){ - request({ - url: '/admin-api/system/dict-data/type', - method: 'get', - tenantIdFlag:false, - params:{type:"repair_unit"} - }).then((res) => { - console.log(res) - if (res.code == 200) { - setStorageWithExpiry("repair_unit",res.data,3600) - let dictObj = dictArray.find(dict => dict.value == unitCode) - console.log(dictObj, "dictObj") - if (dictObj) { - return dictObj.label - } else { - return "未知数据" - } - } - }) - }else{ - let dictObj = dictArray.find(dict => dict.value == unitCode) - console.log(dictObj, "dictObj") - if (dictObj) { - return dictObj.label - } else { - return "未知数据" - } - } - } + return getDictTextByCodeAndValue("repair_unit",unitCode); }, /** * 点击配件申请单提醒,查看相关配件 diff --git a/pages-order/orderList/orderList.vue b/pages-order/orderList/orderList.vue index df2c2d2..9b0d463 100644 --- a/pages-order/orderList/orderList.vue +++ b/pages-order/orderList/orderList.vue @@ -16,7 +16,7 @@ - @@ -88,7 +88,7 @@ export default { /** * 上滑加载数据 */ - onReachBottom() { + onReachBottomCus() { //判断 如果页码*页容量大于等于总条数,提示该页数据加载完毕 if (this.pageNo * this.pageSize >= this.total) { uni.$u.toast('没有更多数据了') diff --git a/pages-repair/apply/applyForm.vue b/pages-repair/apply/applyForm.vue new file mode 100644 index 0000000..a69937c --- /dev/null +++ b/pages-repair/apply/applyForm.vue @@ -0,0 +1,382 @@ + + + + + diff --git a/pages-repair/applyList/applyList.vue b/pages-repair/applyList/applyList.vue index bf406a4..9c04fea 100644 --- a/pages-repair/applyList/applyList.vue +++ b/pages-repair/applyList/applyList.vue @@ -10,7 +10,7 @@ - @@ -93,7 +93,7 @@ this.getOrderList() }, getOrderList(){ - + } } } @@ -106,21 +106,21 @@ display: flex; flex-direction: column; color: #333333; - + .body { flex: 1; height: 0; padding: 24rpx 32rpx; overflow: auto; } - + .tabList { background: #FFFFFF; border-radius: 12rpx 12rpx 12rpx 12rpx; display: flex; align-items: center; padding: 0 40rpx; - + .tabItem { padding: 30rpx; flex: 1; @@ -128,11 +128,11 @@ text-align: center; position: relative; font-size: 28rpx; - + &.actived { color: #0174F6; } - + .activeLine { position: absolute; bottom: 0; @@ -145,7 +145,7 @@ } } } - + .orderList { //padding: 30rpx 0; padding-top: 10rpx; @@ -153,7 +153,7 @@ display: flex; flex-direction: column; row-gap: 20rpx; - + .stateImg { } } diff --git a/pages-repair/home/home.vue b/pages-repair/home/home.vue deleted file mode 100644 index c8b9ecf..0000000 --- a/pages-repair/home/home.vue +++ /dev/null @@ -1,545 +0,0 @@ - - - - - diff --git a/pages-repair/orderList/orderList.vue b/pages-repair/orderList/orderList.vue index 73a873b..5f99523 100644 --- a/pages-repair/orderList/orderList.vue +++ b/pages-repair/orderList/orderList.vue @@ -16,7 +16,7 @@ - @@ -88,7 +88,7 @@ export default { /** * 上滑加载数据 */ - onReachBottom() { + onReachBottomCus() { //判断 如果页码*页容量大于等于总条数,提示该页数据加载完毕 if (this.pageNo * this.pageSize >= this.total) { uni.$u.toast('没有更多数据了') diff --git a/pages-warehouse/home/home.vue b/pages-warehouse/home/home.vue index 6048262..456ba05 100644 --- a/pages-warehouse/home/home.vue +++ b/pages-warehouse/home/home.vue @@ -31,7 +31,7 @@ - @@ -184,7 +184,7 @@ export default { /** * 上滑加载数据 */ - onReachBottom() { + onReachBottomCus() { //判断 如果页码*页容量大于等于总条数,提示该页数据加载完毕 if (this.pageNo * this.pageSize >= this.total) { uni.$u.toast('没有更多数据了') diff --git a/pages.json b/pages.json index 294b799..3b6038f 100644 --- a/pages.json +++ b/pages.json @@ -129,7 +129,7 @@ "root": "pages-repair", "pages": [ { - "path": "home/home", + "path": "apply/applyForm", "style": { "navigationBarTitleText": "" } @@ -148,7 +148,7 @@ }, { "path" : "applyList/applyList", - "style" : + "style" : { "navigationBarTitleText" : "" } diff --git a/pages/detedetails/detelisthygg.vue b/pages/detedetails/detelisthygg.vue index 78f8a43..0f39c10 100644 --- a/pages/detedetails/detelisthygg.vue +++ b/pages/detedetails/detelisthygg.vue @@ -33,7 +33,7 @@ - + @@ -60,7 +60,7 @@ - + @@ -117,14 +117,14 @@ }) } }, - onReachBottom() { + onReachBottomCus() { console.log(111) if (this.pageNum >= this.totalPages) { uni.showToast({ title: '没有下一页数据', icon: 'none' }) - + } else { this.pageNum++ this.arrlist=[] @@ -137,7 +137,7 @@ url: '/admin-api/appInspection/news/listGfClass', method: 'get' }) - + this.typeList = typeRes.data }, getfab() { @@ -152,7 +152,7 @@ getback(){ uni.navigateBack({ delta:1, - }) + }) }, async getlistindex(){ //行业公告分类 @@ -180,8 +180,8 @@ this.arrlist = res.rows } let total = res.total - this.totalPages = Math.ceil(total / this.pageSize); - + this.totalPages = Math.ceil(total / this.pageSize); + }, getdetails(id){ uni.navigateTo({ @@ -205,9 +205,9 @@ url:'/pages/detedetails/managelist?type=hygg' }) } - + } - + } @@ -315,7 +315,7 @@ width: 100%; height: 100%; } - + } .t-right{ width: 60%; @@ -324,7 +324,7 @@ font-size: 20px; font-weight: bold; color: #333333; - white-space: nowrap; + white-space: nowrap; overflow: hidden; text-overflow: ellipsis; @@ -335,10 +335,10 @@ font-size: 16px; font-weight: bold; color: #5e5e5e; - white-space: nowrap; + white-space: nowrap; overflow: hidden; text-overflow: ellipsis; - + } .t-zi{ font-size: 14px; @@ -346,7 +346,7 @@ color: #666666; overflow: hidden; text-overflow: ellipsis; - display: -webkit-box; + display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; @@ -419,6 +419,6 @@ border-style:solid; border-width:2px; font-size: 15px; - + } - \ No newline at end of file + diff --git a/utils/utils.js b/utils/utils.js index 1a40c58..3191430 100644 --- a/utils/utils.js +++ b/utils/utils.js @@ -230,4 +230,14 @@ export function formatDate(timestamp) { return `${year}-${month}-${day}`; } +/** + * 生成一个16位的纯数字的唯一ID + * 生成策略 head + 当前时间戳 + 随机数 + * @param head 前缀 + */ +export function createUniqueCodeByHead(head = '') { + const min = 100; // 最小值 + const max = 999; // 最大值 + return head.toString() + Date.now().toString() + Math.floor(Math.random() * (max - min + 1)) + min; +}