作者 lihongjuan

222

... ... @@ -264,6 +264,7 @@
this.getintroduce()
},
onShow() {
uni.setStorageSync("baseurl",'https://icr.gangjuren.com')
// 判断是否有资格进入详情页
this.get_cations()
}
... ...
... ... @@ -25,21 +25,39 @@
<view class="toutext">
<input type="text" placeholder="请输入姓名" :value="name" @blur="entername" />
</view>
<!-- <view class="rowright">
<image src="/static/img/rowright.png"></image>
</view> -->
</view>
</view>
<view class="gerenitem" v-if="bangdingkehu==''" @click="bangding_kehu">
<view class="gerenleft">
公司名称
</view>
<view class="gerenright">
<view class="toutext" >
绑定公司
</view>
<!-- <view class="toutext" v-else @click="bangding_kehu">
{{bangdingkehu}}
</view> -->
<view class="rowright">
<image src="/static/img/rowright.png"></image>
</view>
</view>
</view>
<view class="gerenitem">
<view class="gerenitem" v-else @click="bangding_kehu">
<view class="gerenleft">
公司名称
</view>
<view class="gerenright">
<view class="toutext" v-if="bangdingkehu==''" @click="bangding_kehu">
<!-- <view class="toutext" v-if="bangdingkehu==''" @click="bangding_kehu">
绑定公司
</view>
<view class="toutext" v-else @click="bangding_kehu">
</view> -->
<view class="toutext" >
{{bangdingkehu}}
</view>
<view class="rowright">
... ... @@ -48,21 +66,44 @@
</view>
</view>
<view class="gerenitem">
<view class="gerenitem" v-if="bangdingpeople==''" @click="bangding">
<view class="gerenleft">
推荐人
</view>
<view class="gerenright">
<view class="toutext" v-if="bangdingpeople==''" @click="bangding">
<view class="toutext" >
绑定推荐人
</view>
<view class="toutext" v-else @click="bangding">
<!-- <view class="toutext" v-else @click="bangding">
{{bangdingpeople}}
</view> -->
<view class="rowright">
<image src="/static/img/rowright.png"></image>
</view>
</view>
</view>
<view class="gerenitem" v-else @click="bangding">
<view class="gerenleft">
推荐人
</view>
<view class="gerenright">
<!-- <view class="toutext" v-if="bangdingpeople==''" @click="bangding">
绑定推荐人
</view> -->
<view class="toutext" >
{{bangdingpeople}}
</view>
<view class="rowright">
<image src="/static/img/rowright.png"></image>
</view>
</view>
</view>
</view>
<view class="register" v-if="showbang">
... ...
... ... @@ -5,7 +5,7 @@
<view class="fapiaoitem">
<view class="fleft">抬头类型</view>
<view class="fleft lei">抬头类型</view>
<view class="fright">
<!-- <view class="qdan">企业单位</view> -->
<view class="qdan">
... ... @@ -19,13 +19,13 @@
</view>
</picker>
<view class="fapiaoitem">
<view class="fleft">发票抬头</view>
<view class="fleft lei">发票抬头</view>
<view class="fright fatai">
<input type="text" placeholder="填写发票抬头" placeholder-class="fapiao" v-model="taitou" />
</view>
</view>
<view class="fapiaoitem">
<view class="fleft">税号</view>
<view class="fleft lei">税号</view>
<view class="fright fatai">
<input type="text" placeholder="填写纳税人识别号" placeholder-class="fapiao" v-model="shuihao" />
</view>
... ... @@ -87,19 +87,19 @@
<view class="fapiaolist">
<view class="shouinfo">收件人信息</view>
<view class="fapiaoitem">
<view class="fleft">姓名</view>
<view class="fleft lei">姓名</view>
<view class="fright fatai">
<input type="text" placeholder="填写收件人姓名" placeholder-class="fapiao" v-model="shouname" />
</view>
</view>
<view class="fapiaoitem">
<view class="fleft">电话</view>
<view class="fleft lei">电话</view>
<view class="fright fatai">
<input type="text" placeholder="填写收件人电话" placeholder-class="fapiao" v-model="shouphone" />
</view>
</view>
<view class="fapiaoitem">
<view class="fleft">地址</view>
<view class="fleft lei">地址</view>
<view class="fright fatai">
<input type="text" placeholder="填写收件人地址" placeholder-class="fapiao" v-model="shouaddress" />
</view>
... ... @@ -194,67 +194,66 @@
return false
}
if (this.remark == '') {
uni.showToast({
title: '请填写备注说明',
icon: 'none',
})
return false
}
if (this.address == '') {
uni.showToast({
title: '请填写地址',
icon: 'none',
})
return false
}
if (this.phone == '') {
uni.showToast({
title: '请填写电话',
icon: 'none',
})
return false
}
var regphone = /^[1][3,4,5,6,7,8,9][0-9]{9}$/;
if (!regphone.test(this.phone)) {
uni.showToast({
title: '请填写正确的电话',
icon: 'none',
})
return false
}
if (this.bank == '') {
uni.showToast({
title: '请填写开户行',
icon: 'none',
})
return false
}
if (this.banknum == '') {
uni.showToast({
title: '请填写开户行账号',
icon: 'none',
})
return false
}
// if (this.remark == '') {
// uni.showToast({
// title: '请填写备注说明',
// icon: 'none',
// })
//
// return false
// }
//
// if (this.address == '') {
// uni.showToast({
// title: '请填写地址',
// icon: 'none',
// })
//
// return false
// }
//
// if (this.phone == '') {
// uni.showToast({
// title: '请填写电话',
// icon: 'none',
// })
//
// return false
// }
// var regphone = /^[1][3,4,5,6,7,8,9][0-9]{9}$/;
// if (!regphone.test(this.phone)) {
// uni.showToast({
// title: '请填写正确的电话',
// icon: 'none',
// })
//
// return false
// }
// if (this.bank == '') {
// uni.showToast({
// title: '请填写开户行',
// icon: 'none',
// })
//
// return false
// }
// if (this.banknum == '') {
// uni.showToast({
// title: '请填写开户行账号',
// icon: 'none',
// })
//
// return false
// }
if (this.shouname == '') {
uni.showToast({
title: '请填写收货人姓名',
icon: 'none',
})
return false
}
... ... @@ -286,8 +285,6 @@
}
this.kaipiaoshow=false
var param = {
order_ids:this.select_id,
type: this.selectid,
... ... @@ -481,4 +478,17 @@
line-height: 100rpx;
margin: 34rpx auto;
}
.lei{
position: relative;
}
.lei:before{
display:block;
content: "*";
color:#E60000;
font-size: 30rpx;
position: absolute;
top:0;
left:-15rpx;
}
</style>
... ...
... ... @@ -79,14 +79,14 @@
<view class="sybanitem">详情</view>
</view>
<view class="shebeilitem" v-for="(item,index) in guan_list" :key="index" v-if="guan_list != ''">
<view class="sbitem sbdate">{{item.date}}<br/>{{item.time}}</view>
<view class="sbitem sbdate">{{item.date}}<br />{{item.time}}</view>
<view class="sbitem sbhao">{{item.image_id}}</view>
<view class="sbitem sbt">
<image :src="item.files"></image>
</view>
<view class="sbitem ck" @click="look_guan(item.id)">查看</view>
</view>
<view class="shebeilitem" v-if="guan_list == ''">
<view class="shebeilitem" v-if="guan_list.length==0">
<view class="nodatas">暂无数据</view>
</view>
</view>
... ... @@ -118,7 +118,7 @@
cHeight: '',
pixelRatio: 1,
// 获取剩余可用次数
shenyu_times:"",
shenyu_times: "",
// 图表数据
//*数板*//
shuban: [],
... ... @@ -129,7 +129,8 @@
shuguan: [],
shuguan_x: [],
/*数管列表数据*/
guan_list:""
guan_list: [],
page: 1
}
},
onLoad() {
... ... @@ -147,7 +148,7 @@
let ban = [];
let banX = []
app.post(url, param, 'post').then(r => {
console.log('88888888',r)
console.log('88888888', r)
for (var i = 0; i < r.user_equipment_log.length; i++) {
banX.unshift(r.user_equipment_log[i].date)
ban.unshift(r.user_equipment_log[i].count)
... ... @@ -157,8 +158,8 @@
t.getServerData1();
t.ban_list = r.equipment;
let newban_list=t.ban_list;
for(var obj of newban_list){
let newban_list = t.ban_list;
for (var obj of newban_list) {
let number = obj.time;
// // 时间戳处理
var totalSecond = number;
... ... @@ -182,7 +183,7 @@
if (secStr.length == 1) secStr = secStr;
obj.time = dayStr + '天' + hrStr + '小时' + minStr + "分钟"
}
this.ban_list=newban_list
this.ban_list = newban_list
}).catch(err => {
console.log(err)
... ... @@ -192,7 +193,9 @@
get_shuguanchart() {
let t = this;
let url = "api/person/getUserShuguanLog";
let param = {};
let param = {
page: this.page
};
let guan = [];
let guanX = []
app.post(url, param, 'post').then(r => {
... ... @@ -203,14 +206,16 @@
t.shuguan = guan;
t.shuguan_x = guanX;
t.getServerData();
t.guan_list = r.shuguan
//t.guan_list =r.shuguan
t.guan_list = t.guan_list.concat(r.shuguan);
console.log('9999', t.guan_list)
}).catch(err => {
console.log(err)
})
},
timechange(){
timechange() {
let number = this.shengyuqixian;
// // 时间戳处理
var totalSecond = number;
... ... @@ -296,24 +301,24 @@
});
},
// 前往数板详情
go_shuban(e){
go_shuban(e) {
console.log(e)
uni.navigateTo({
url: '/pages/shubanxinxi/shubanxinxi?num='+e.number,
url: '/pages/shubanxinxi/shubanxinxi?num=' + e.number,
success: res => {},
fail: () => {},
complete: () => {}
});
},
// 获取剩余可用次数
get_shenyu(){
get_shenyu() {
let t = this;
let url = "api/shuguan/getShuguanRule";
let param = {};
app.post(url,param,'post').then(r =>{
console.log(r,"获取剩余可用次数")
app.post(url, param, 'post').then(r => {
console.log(r, "获取剩余可用次数")
t.shenyu_times = r;
let newshenyu_times=t.shenyu_times;
let newshenyu_times = t.shenyu_times;
let number = newshenyu_times.shengyu;
... ... @@ -340,16 +345,16 @@
newshenyu_times.shengyu = dayStr + '天' + hrStr + '小时' + minStr + "分钟"
this.shenyu_times=newshenyu_times
}).catch(err =>{
this.shenyu_times = newshenyu_times
}).catch(err => {
console.log(err)
})
},
// 数管列表查看
look_guan(e){
look_guan(e) {
console.log(e)
uni.navigateTo({
url: '/pages/shuguanshujudetail/shuguanshujudetail?id='+e,
url: '/pages/shuguanshujudetail/shuguanshujudetail?id=' + e,
success: res => {},
fail: () => {},
complete: () => {}
... ... @@ -435,6 +440,9 @@
this.getServerData1();
} else {
this.getServerData();
// this.shuguan=[];
// this.page=1;
// this.get_shuguanchart()
}
},
},
... ... @@ -444,20 +452,26 @@
// 获取数管图表数据
this.get_shuguanchart();
// 获取剩余可用次数
this.get_shenyu()
}
this.get_shenyu();
},
onReachBottom: function() {
let newpage=this.page;
newpage++;
this.page=newpage
this.get_shuguanchart();
},
}
</script>
<style>
.nodatas{
color:#7F8389;
font-size:36rpx;
.nodatas {
color: #7F8389;
font-size: 36rpx;
margin: 100rpx 0 50rpx;
}
/*样式的width和height一定要与定义的cWidth和cHeight相对应*/
.qiun-charts {
width: 750upx;
... ...
... ... @@ -99,7 +99,7 @@
<view v-for="(item,index) in imglist" :key="index" class="imgshang">
<view class="upload" >
<image :src="item"></image>
<image :src="item" @click="viewimgtu(index)"></image>
<view class="chahao" @click="del(index)">
<image src="../../static/img/chahao3.png"></image>
</view>
... ... @@ -116,8 +116,25 @@
</view>
</view>
<view class="subshuju" @click="set_number" v-if="fenxiangor">提交数据</view>
<view class="subshuju" v-else>提交数据</view>
<view class="photo" v-else>
<view class="aboutphoto">相关照片</view>
<view class="imgbox">
<view v-for="(item,index) in imglist" :key="index" class="imgshang">
<view class="upload" >
<image :src="item" @click="viewimgtu(index)"></image>
</view>
</view>
</view>
</view>
<view class="subshuju" @click="edifenxiangor?set_number:''" v-if="edifenxiangor">提交数据</view>
<!-- <view class="subshuju" v-else>提交数据</view> -->
... ... @@ -145,12 +162,14 @@
number:'',
id:'',
is_share:0,
fenxiangor:true
fenxiangor:true,
edifenxiangor:true
}
},
methods: {
//选择照片
shoseimg() {
let baseurl=uni.getStorageSync("baseurl")
uni.chooseImage({
count: 1,
... ... @@ -170,7 +189,7 @@
}
uni.uploadFile({
url: 'https://icr.gangjuren.com/api/person/upload', //仅为示例,非真实的接口地址
url: baseurl+'/api/person/upload',
filePath: tempFilePaths[0],
name: 'images',
token: uni.getStorageSync('token'),
... ... @@ -181,6 +200,8 @@
console.log(uploadFileRes);
let data = JSON.parse(uploadFileRes.data)
console.log(data)
console.log('000999888',this.imglist)
this.imglist.push(data.data.src)
}
});
... ... @@ -197,6 +218,7 @@
//拍摄照片上传
camera() {
let baseurl=uni.getStorageSync("baseurl")
uni.chooseImage({
count:1,
sizeType: ['original', 'compressed'],
... ... @@ -215,7 +237,7 @@
}
uni.uploadFile({
url: 'https://icr.gangjuren.com/api/person/upload', //仅为示例,非真实的接口地址
url: baseurl+'/api/person/upload',
filePath: tempFilePaths[0],
name: 'images',
token: uni.getStorageSync('token'),
... ... @@ -249,7 +271,8 @@
}
this.imglist=newimglist
this.imglist=newimglist;
console.log('9999888',this.imglist)
},
// 获取数管剩余时间次数
... ... @@ -268,6 +291,16 @@
app.post(url, param, 'post').then(r => {
console.log(r, "获取数板详情")
t.equipment_log = r.equipment_log;
t.biaoshi=r.equipment_log.biaoshi;
t.description=r.equipment_log.description;
t.ziduan1=r.equipment_log.ziduan1;
t.ziduan2=r.equipment_log.ziduan2;
t.ziduan3=r.equipment_log.ziduan3;
t.ziduan4=r.equipment_log.ziduan4;
t.ziduan5=r.equipment_log.ziduan5;
t.imglist=r.equipment_log.images
}).catch(err => {
console.log(err)
})
... ... @@ -304,28 +337,48 @@
title:'编辑成功',
icon:'none'
})
t.fenxiangor=false
t.edifenxiangor=false
}).catch(err => {
console.log(err)
})
}
},
//图片预览
viewimgtu(index) {
console.log('999000',index)
uni.previewImage({
current: this.imglist[index],
urls: this.imglist,
success: function(res) {},
fail: function(res) {},
complete: function(res) {},
})
},
},
onLoad(options) {
console.log('777777',options)
this.number=options.number;
this.id=options.id;
if(options.type==1){
this.is_share=1;
this.fenxiangor=false
this.fenxiangor=false;
this.edifenxiangor=false
}else{
this.is_share=0;
this.fenxiangor=true
this.fenxiangor=true;
this.edifenxiangor=true
}
this.get_shubandetail()
},
onShow() {
this.fenxiangor=true
this.get_shubandetail()
},
onShareAppMessage: function(res) {
if (res.from === 'button') {
... ... @@ -343,6 +396,7 @@
.imgbox{
display:flex;
align-items: center;
flex-wrap: wrap;
}
.imgshang{
display:flex;
... ... @@ -490,7 +544,7 @@
height: 160rpx;
font-size: 0;
margin-top: 30rpx;
margin-left:20rpx;
margin-left:14rpx;
position: relative;
}
.chahao{
... ...
... ... @@ -98,11 +98,20 @@
},
methods: {
shubandetail(e) {
let that = this;
if(that.is_share==1){
clearInterval(that.interval_number);
uni.navigateTo({
url: '/pages/shubandetail/shubandetail?id=' + e.id + '&number=' + this.number+'&type='+1
})
}else{
clearInterval(that.interval_number);
uni.navigateTo({
url: '/pages/shubandetail/shubandetail?id=' + e.id + '&number=' + this.number
url: '/pages/shubandetail/shubandetail?id=' + e.id + '&number=' + this.number+'&type='+0
})
}
},
// 获取当前时间
get_nowtime() {
... ...
... ... @@ -104,6 +104,7 @@
//选择照片
shoseimg() {
let t = this;
let baseurl=uni.getStorageSync("baseurl")
uni.chooseImage({
count: 1,
sizeType: ['original', 'compressed'],
... ... @@ -175,6 +176,8 @@
// }
// });
let baseurl=uni.getStorageSync("baseurl")
uni.chooseImage({
count: 1,
sizeType: ['original', 'compressed'],
... ...
... ... @@ -140,19 +140,26 @@
<view class="writeheng"></view>
</view>
<view class="guanlistbox">
<view class="guanlist" v-for="(item,index) in log_list" :key="index" @click="fuhe(item.id)">
<view class="guanlist" v-for="(item,index) in log_list" :key="index" @click="fengxiangshare?fuhe(item.id):''" >
<view class="guanitem">{{item.type}}</view>
<view class="guanitem">{{item.confirmation}}</view>
<view class="guanitem">{{item.distrust}}</view>
<view class="guanitem">{{item.fuhe}}</view>
<view class="write" v-if="fengxiangshare">
<view class="write" >
<image src="/static/img/write.png"></image>
</view>
</view>
<view class="write" v-else>
<!-- <view class="guanlist" v-for="(item,index1) in log_list" :key="index1" v-else>
<view class="guanitem">{{item.type}}</view>
<view class="guanitem">{{item.confirmation}}</view>
<view class="guanitem">{{item.distrust}}</view>
<view class="guanitem">{{item.fuhe}}</view>
<view class="write" >
<image src="/static/img/write.png"></image>
</view>
</view>
</view> -->
<!-- <view class="guanlist">
<view class="guanitem">DN50</view>
<view class="guanitem">5000</view>
... ...