123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605 |
- <template>
- <view class="box">
- <!-- <homenav :iStatusBarHeight="iStatusBarHeight" :title="'施工报告'"></homenav> -->
- <view class="topbox">
- <view class="IncoBox">
- <img src="../../static/img/icon_order_def.png" alt="" class="iconwg">
- <view class="wgTitle">施工报告</view>
- </view>
- </view>
- <view class="shopBox">
- <view class="shopleft">
- <img src="../../static/img/icon_store.png" alt="" class="shopIcon">
- <view class="shopNameBox">
- <view class="shopName">{{headInfo.shopName}}</view>
- <view class="shopAddress">{{headInfo.address?headInfo.address:''}}</view>
- </view>
- </view>
- <view class="shopRight" @click="call">
- <img src="../../static/img/icon_phone.png" alt="" class="wgCall">
- <view class="wgmobilePhone">电话</view>
- </view>
- </view>
- <view class="carBox">
- <view class="carLeft">
-
- <img src="../../static/img/icon_che.png" alt="" class="shopIcon">
- </view>
- <view class="carRight">
- <view class="carRtop">
- <view class="carCp">{{headInfo.plateNumber}}</view>
- <view class="carGongli" v-if="headInfo.currentMileage">{{headInfo.currentMileage}}km</view>
- </view>
- <view class="carMname">{{headInfo.carModel}}</view>
-
- </view>
- </view>
- <view class="newIiembox">
- <view class="newItime">
- <view class="newIname3">项目名称</view>
- <view class="newIname3">施工前照片</view>
- <view class="newIname3">施工后照片</view>
- <view class="newIname3">施工备注</view>
- </view>
- <view class="newItem" v-for="(v,i) in itemDetailList">
- <view class="newItemLine">
- <view class="newsectionName">{{v.sectionName}}</view>
- <view class="itemImgBox" >
- <view class="itemImghz" v-if="v.beforePhotoList" @click="sphotos(v.beforePhotoList.split(','))">
- <img :src="v.beforePhotoList.split(',')[0]" alt="" class="newcarPhotoImg">
- <view class="itemImgYy" v-if="v.beforePhotoList.split(',').length>1">
- <img src="../../static/timg/icon_pic.png" alt="" class="itemImgYyImg">
- <view class="itemImgYyNUm">{{v.beforePhotoList.split(',').length}}</view>
- </view>
- </view>
- <view class="itemImghz" v-else>
- <img src="../../static/timg/noimg.png" alt="" class="newcarPhotoImg">
- </view>
- </view>
- <view class="itemImgBox" >
- <view class="itemImghz" v-if="v.afterPhotoList" @click="sphotos(v.afterPhotoList.split(','))">
- <img :src="v.afterPhotoList.split(',')[0]" alt="" class="newcarPhotoImg">
- <view class="itemImgYy" v-if="v.afterPhotoList.split(',').length>1" >
- <img src=".../../static/timg/icon_pic.png" alt="" class="itemImgYyImg">
- <view class="itemImgYyNUm">{{v.afterPhotoList.split(',').length}}</view>
- </view>
- </view>
- <view class="itemImghz" v-else>
- <img src="../../static/timg/noimg.png" alt="" class="newcarPhotoImg">
- </view>
- </view>
- <view class="newsectionName">{{v.workComment?v.workComment:''}}</view>
- </view>
- </view>
- </view>
- </view>
- </template>
- <script>
- export default {
-
- data() {
- return {
- location: '',
- id: '',
- orderData: '',
- themeColor: '',
- authorizShow: false,
- userInfo: '',
- ext: '',
- wxOpenData: '',
- headInfo: {},
- itemDetailList: '',
- Photos:[],
- PhotosShow:false,
- demo01_index:0,
- iStatusBarHeight:'',
- }
- },
- onLoad(opt) {
- uni.setNavigationBarTitle({
- title: '施工报告' // 设定新标题
- });
- this.id = opt.id
- this.getData();
-
- },
- methods: {
- sphotos(img){
- console.log(img)
- // 预览图片
- uni.previewImage({
- urls: img,
- //current: img,
- longPressActions: {
- itemList: ['发送给朋友', '保存图片', '收藏'],
- success: function(data) {
- console.log('选中了第' + (data.tapIndex + 1) + '个按钮,第' + (data.index + 1) + '张图片');
- },
- fail: function(err) {
- console.log(err.errMsg);
- }
- }
- });
- },
-
- map() {
- console.log("打开地图")
- var that = this;
- if (!that.orderData.billsheet.lat || !that.orderData.billsheet.lng) {
- uni.showToast({
- title: '该店铺未设置定位',
- icon: 'none',
- duration: 3000
- });
- } else {
- uni.openLocation({
- latitude: Number(that.orderData.billsheet.lat),
- longitude: Number(that.orderData.billsheet.lng),
- name: that.orderData.billsheet.ShopName,
- address: that.orderData.billsheet.Address,
- success: function() {
- console.log('success');
- },
- fail(err) {
- console.log(err)
- }
- });
- }
- },
- call() {
- uni.makePhoneCall({
- phoneNumber: this.headInfo.mobilePhone
- });
- },
- getData() {
- let that = this
- uni.showLoading({
- title: '加载中'
- });
- this.$http('checkCarApi/workingReport', {
- sheetID:this.id,// '56D5F8C1-9F11-40BA-8937-B4AABD4666B5',
- }, 'GET').then(res => {
- uni.hideLoading();
- this.itemDetailList=res.data.itemDetailList;
- this.headInfo=res.data.headInfo;
- //console.log('data===', this.orderData);
- })
- },
- //时间对比
- getDateBeforeNow(stringTime) {
- console.log("传参未格式化", stringTime);
- stringTime = new Date(stringTime.replace(/-/g, '/'))
- // 统一单位换算
- var minute = 1000 * 60;
- var hour = minute * 60;
- var day = hour * 24;
- var week = day * 7;
- var month = day * 30;
- var year = month * 12;
- var time1 = new Date().getTime(); //当前的时间戳 console.log("当前时间", time1);
- // 对时间进行毫秒单位转换 var time2 = new Date(stringTime).getTime(); //指定时间的时间戳
- console.log("传过来的时间", time2);
- var time = time1 - time2;
- console.log("计算后的时间", time);
- var result =
- null; // if (time < 0) { // // alert("传过来的时间的时间不能晚于当前时间!"); // result = stringTime; // } else if (time / year >= 1) {
- // result = parseInt(time / year) + "年前";
- // } else if (time / month >= 1) {
- // result = parseInt(time / month) + "月前";
- // } else if (time / week >= 1) { // result = parseInt(time / week) + "周前"; // } else if (time / day >= 1) {
- // result = parseInt(time / day) + "天前";
- // } else if (time / hour >= 1) { // result = parseInt(time / hour) + "小时前";
- // } else if (time / minute >= 1) {
- // result = parseInt(time / minute) + "分钟前"; // } else {
- // result = "刚刚"; // }
- if (time < 0) {
- // alert("传过来的时间的时间不能晚于当前时间!");
- result = -1;
- } else if (time / day >= 0) {
- result = parseInt(time / day); //多少天前
- }
- console.log("多少天前", result);
- return result;
- },
- goback() {
- uni.navigateBack({})
- },
- },
- onPullDownRefresh() {
- this.getData()
- setTimeout(function() {
- uni.stopPullDownRefresh();
- }, 1000);
- },
- }
- </script>
- <style scoped>
- .box{
- width: 100vw;
- min-height: 100vh;
- background: #F4F5F7;
- }
- .topbox{
- width: 750rpx;
- height: 200rpx;
- background: #FF0000;
- }
- .carBox{
- width: 702rpx;
- padding-bottom: 30rpx;
- background: #FFFFFF;
- border-radius: 10rpx;
- margin-left:24rpx;
- margin-top:20rpx;
- display: flex;
- }
- .shopBox{
- width: 702rpx;
- padding-bottom: 30rpx;
- background: #FFFFFF;
- border-radius: 10rpx;
- margin-left:24rpx;
- margin-top:-70rpx;
- display: flex;
- justify-content: space-between;
- }
- .shopleft{
- display: flex;
- padding-top: 32rpx;
- padding-left: 20rpx;
-
- }
- .shopNameBox{
- padding-left: 20rpx;
- }
- .shopAddress{
- width: 450rpx;color: #999999;padding-top: 10rpx;font-size: 24rpx;
- }
- .shopName{
- font-size: 30rpx;
- font-family: PingFangSC-Medium, PingFang SC;
- font-weight: 500;
- color: #3C3C3C;
- }
- .wgCall{
- width:44rpx;
- height:44rpx;
- }
- .carIcon{
- width: 72rpx;
- height: 72rpx;
- border-radius: 36rpx;
- }
- .wgmobilePhone{
- color: #999999;
- font-size: 24rpx;
- padding-top: 10rpx;
- }
- .shopRight{
- text-align: center;padding-top: 30rpx;
- padding-right: 20rpx;
- }
- .carRtop{
- display: flex;
- }
- .carCp{
- font-size: 30rpx;
- font-family: PingFangSC-Medium, PingFang SC;
- font-weight: 500;
- color: #333333;
- line-height: 36rpx;
- padding-right: 30rpx;
- }
- .carGongli{
- font-weight: 500;
- color: #F19D01;
- font-size: 24rpx;
- line-height: 36rpx;
- background: #FFF8EB;
- border-radius: 5rpx;
- padding: 0 10rpx;
- }
- .carLeft{
- padding-left: 20rpx;
- padding-top: 30rpx;
- padding-right: 20rpx;
- }
- .carMname{
- font-weight: 400;
- color: #999999;
- line-height: 33rpx;
- font-size: 24rpx;
- width: 570rpx;
- padding: 10rpx 0;
- overflow: hidden; /*内容会被修剪,并且其余内容是不可见的*/
- text-overflow:ellipsis; /*显示省略符号来代表被修剪的文本。*/
- white-space: nowrap;
- }
- .carRight{
- padding-top: 30rpx;
- }
- .reception{
- display: flex;
- }
- .receptionImg{
- width: 27rpx;
- height: 29rpx;
- }
- .receptionName{
- font-weight: 400;
- color: #999999;
- font-size: 24rpx;
- line-height: 29rpx;
- padding-left: 12rpx;
- }
- .itemLIne{
- width: 662rpx;
- margin-top: 20rpx;
- margin-left: 24rpx;
- background: #FFFFFF;
- border-radius: 10rpx;
- padding: 0 20rpx 15rpx 20rpx;
- }
- .itemTitieBox{
- display: flex;
- justify-content: space-between;
- padding: 28rpx 0;
- border-bottom: 1rpx solid #EEEEEE;
- }
- .itemTitle{
- font-weight: 500;
- color: #333333;
- line-height: 42rpx;
- font-size: 30rpx;
- }
- .itemstate{
- font-weight: 400;
- color: #3F90F7;
- line-height: 42rpx;
- font-size: 28rpx;
- }
- .Construction{
- display: flex;
- padding-top: 29rpx;
- padding-bottom: 15rpx;
- }
- .itemMs{
- font-weight: 400;
- color: #666666;
- font-size: 28rpx;
- }
- .personnel{
- font-weight: 400;
- color: #3C3C3C;
- font-size: 28rpx;
- padding-left: 72rpx;
- }
- .carPhotoImg{
- width: 150rpx;
- height: 150rpx;
- border-radius: 5rpx;
- margin-right: 20rpx;
- margin-top: 16rpx;
- }
- .carPhoto{
-
- display: flex;
- flex-wrap: wrap;
- }
- .carPhotoImg:nth-child(4n){
- margin-right: 0;
- }
- .carPhotoBox{
- padding-top: 15rpx;
- padding-bottom: 15rpx;
- }
- .IncoBox{
- display: flex;
- justify-content: center;
- padding-top:43rpx;
- }
- .iconwg{
- width:44rpx;
- height:44rpx;
- }
- .wgTitle{
- color:#ffffff;
- line-height:44rpx;
- padding-left: 18rpx;
- font-size: 36rpx;
- }
- .shopIcon{
- width:44rpx;
- height:44rpx;
- }
- .newIiembox{
- background: #ffffff;
- margin-top:20rpx;
- width: 702rpx;
- margin-left:24rpx;
- }
- .newItime{
- display: flex; border-bottom:1rpx solid #EEEEEE;
- }
- .newIname1{
- width:338rpx;
- text-align: center;
- color: #999999;
- padding:20rpx 0;
- }
- .newIname2{
- width:182rpx;
- text-align: center;
- color: #999999;
- padding:20rpx 0;
- }
- .newItemName{
- width:318rpx;
- color: #333333;
- padding-left:20rpx;
- height:150rpx;
- display: flex;
- align-items: center;
- }
- .newcarPhotoImg{
- width: 150rpx;
- height: 150rpx;
- border-radius: 10rpx;
- }
- .itemImgBox{
- width: 150rpx;
- padding:0 16rpx;
- height: 150rpx;
- }
- .itemImghz{
- width: 150rpx;
- height: 150rpx;
- border-radius: 10rpx;
- overflow: hidden;
- position: relative;
- }
- .itemImgYy{
- position:absolute;
- width: 68rpx;
- height: 36rpx;
- background: rgba(0, 0, 0, 0.4);
- border-radius: 10rpx 0rpx 10rpx 0rpx;
- display: flex;
- justify-content: center;
- align-items: center;
- bottom:0;
- right:0;
- }
- .newItemLine{
- display: flex;
- padding:20rpx 0;
- border-bottom:1rpx solid #EEEEEE;
- }
- .itemImgYyImg{
- width: 26rpx;
- height: 26rpx;
- }
- .itemImgYyNUm{
- color: #FFFFFF;
- line-height: 26rpx;
- font-size: 22rpx;
- padding-left: 5rpx;
- }
- .lbImgBOx{
- position: fixed;
- width: 100%;
- height:100vh;
- background: rgba(0, 0, 0, 0.9);
- left: 0;
- top: 0;
- display: flex;
- justify-content: center;
- align-items: center;
- }
- .lbImgview{
- width:100%;
-
- }
- .newIname3{
- width:175rpx;
- text-align: center;
- color: #999999;
- padding:20rpx 0;
- font-size: 24rpx;
- }
- .newsectionName{
- width:155rpx;
- color: #333333;
- padding-left:20rpx;
- height:150rpx;
- display: flex;
- align-items: center;
- font-size: 26rpx;
- }
- .authorizBox{
- width: 100vw;
- height: 100vh;
- background: rgba(0, 0, 0, 0.5);
- position: fixed;
- top: 0;
- left: 0;
- }
- .authorizCont{
- margin-top: 30vh;
- width: 564rpx;
- height: 408rpx;
- background: #FFFFFF;
- border-radius: 24rpx;
- margin-left: 93rpx;
- position: relative;
- }
- .authorizCloseImg{
- width: 62rpx;
- height: 62rpx;
- }
- .sqLogoBox{
- width: 180rpx;
- height: 180rpx;
- background: #FFFFFF;
- border-radius: 90rpx;
- text-align: center;
- position: absolute;
- top: -50rpx;
- left: 192rpx;
- }
- .authorizName{
- color: #333333;
- line-height: 42rpx;
- font-size: 30rpx;
- text-align: center;
- padding-top: 58rpx;
- }
- .authorizMs{
- color: #999999;
- line-height: 36rpx;
- font-size: 26rpx;
- width: 452rpx;
- padding-top: 24rpx;
- text-align: center;
- margin-left: 56rpx;
- }
- .authorizContbutton{
- width: 422rpx;
- height: 88rpx;
- background: #D53533;
- border-radius: 44rpx;
- line-height: 88rpx;
- text-align: center;
- font-size:30rpx;
- color: #FFFFFF;
- margin-top: 62rpx;
- margin-left:71rpx;
- }
- </style>
|