H5端齐采药项目,uniapp框架
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

423 lines
9.1 KiB

<template>
<view class="upper">
<view class="specific-date df aic jcsb">
<!-- <div class="df aic specific-time"><span>2023.09.12-2023.10.12</span> -->
<!-- <u-icon name="arrow-down"></u-icon> -->
<!-- </div>
-->
<div></div>
<div class="df aic New-visit" @click="xinzbf">
<image :src="$util.img(`/upload/weapp/pageSalesman/search.png`)" mode=""></image>
<span>新增拜访</span>
</div>
</view>
<view class="" v-for="(item,index) in listobj" :key="index">
<view class="formwork">
<!-- <div class="formwork-name">北京市好大夫诊所</div> -->
<div class="formwork-information df aic">
<div class="formwork-contacts">
联系人:{{item.member_name}}
</div>
<div class="contact-information">联系方式:{{item.create_time}}</div>
</div>
<div class="xuixan"></div>
<div class="next-time">{{item.content}}</div>
<div class="img df">
<div class="df">
<div v-if="imgone"><image :src="$util.img(imgone)" mode=""></image></div>
<div v-if="imgtwo"><image class="imgs" :src="$util.img(imgtwo)" mode=""></image></div>
</div>
</div>
</view>
</view>
<u-overlay :show="show">
<view class="afterbody">
<div class="New-visit df aic jcsb">
<div></div>
<div>新增拜访</div>
<image @click="show=false" :src="$util.img(`/upload/weapp/pageSalesman/cancel.png`)" mode=""></image>
</div>
<div class="df aic connection-name">
<div>客户名称</div>
<input v-model="value2" type="text" placeholder-class="placeholder" placeholder="请输入">
</div>
<div class="Visit-record df">
<span>拜访记录:</span>
<textarea v-model="daily" name="" id="" cols="30" rows="10" placeholder="请输入拜访总结"></textarea>
<div class="it-img" v-if="img">
<image :src="$util.img(img)" mode=""></image>
</div>
<div class="it-imgtwo" v-if="imgtwo">
<image :src="$util.img(imgtwo)" mode=""></image>
</div>
<div class="Visit-img df aic jcsa" :style="img?'left: 295rpx;':''">
<div @click="upload()"><image :src="$util.img(`/upload/weapp/pageSalesman/reportForm/plussign.png`)" mode=""></image></div>
</div>
</div>
<div class="df btn">
<div class="btn1 df aic jcsa" @click="show = false">保存草稿</div>
<div class="btn2 df aic jcsa" @click="accomplish">完成记录</div>
</div>
</view>
</u-overlay>
</view>
</template>
<script>
export default {
data(){
return {
value2:"",
show: false,
value1: '',
msg:this.msgabcabc,//状态
img:'',
imgtwo:'',
list:[],//图片数组
daily:'',
listobj:[],
imgone:'',
imgtwo:''
}
},
props:{
msgabcabc:Array,
},
created(){
let _this=this
this.$api.sendRequest({
url: '/api/salasman/visitLogList',
data:{
member_id:this.msg.msg
},
success: res => {
console.log(res.data.list,555);
// console.log(res.data.list[0].images.split(","),'list0');
_this.listobj=res.data.list
},
});
setTimeout(() => {
console.log(this.listobj,'msg');
if(this.listobj.length>0){
console.log(_this.listobj[0].images.split(",")[0],'666');
_this.imgone=_this.listobj[0].images.split(",")[0]
_this.imgtwo=_this.listobj[0].images.split(",")[1]
}
}, 200);
},
filters:{
filterCount(num){
},
},
methods:{
upload(type,size=1){
this.$util.upload(size,{
path:'otherImage'
},res=>{
this.list.push(res)
console.log(res);
if(this.list[0]){
this.img=this.list[0][0]
}
if(this.list[1]){
this.imgtwo=this.list[1][0]
}
})
},
accomplish(){
// if(this.list[0]){
// console.log(this.list[]);
// }
console.log(this.list.flat());
this.$api.sendRequest({
url: '/api/salasman/visitLogAdd',
data:{
member_id:this.msg.msg,
member_name:this.value2,
content:this.daily,
images:this.list.flat()
},
success: res => {
this.$util.showToast({
title: '提交成功'
});
this.show=false
},
});
},
xinzbf(){
this.show=true
}
}
}
</script>
<style lang="scss">
::v-deep{
.u-textarea__field{
width: 534rpx !important;
height: 244rpx !important;
background: #F6F6F6 !important;
border-radius: 8rpx !important;
}
.u-textarea{
// box-sizing: border-box;
padding: 0rpx;
flex: 0;
}
}
.upper{
padding: 32rpx 24rpx;
.specific-date{
.specific-time{
font-size: 24rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #585858;
line-height: 34rpx;
span{
margin-right: 12rpx;
}
}
.New-visit{
width: 176rpx;
height: 50rpx;
background: #FFFFFF;
border-radius: 25rpx;
border: 2rpx solid #E6E6E6;
image{
width: 20rpx;
height: 20rpx;
margin: 0 10rpx 0 26rpx;
}
span{
font-size: 24rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #585858;
line-height: 34rpx;
}
}
}
.formwork{
width: 702rpx;
// height: 500rpx;
background: #FFFFFF;
border-radius: 16rpx;
padding: 28rpx 32rpx;
box-sizing: border-box;
margin-top: 24rpx;
.formwork-name{
font-size: 28rpx;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #222222;
line-height: 40rpx;
}
.formwork-information{
margin-top: 24rpx;
.formwork-contacts{
font-size: 28rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #585858;
line-height: 40rpx;
}
.contact-information{
font-size: 28rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #585858;
line-height: 40rpx;
margin-left: 50rpx;
}
}
}
.Detailed-address{
margin-top: 24rpx;
.address{
font-size: 28rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #585858;
line-height: 40rpx;
}
.Detailed{
width: 486rpx;
height: 80rpx;
font-size: 28rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #585858;
line-height: 40rpx;
}
}
.xuixan{
width: 638rpx;
height: 2rpx;
background: #F2F2F2;
border-radius: 16rpx;
margin: 28rpx 0;
}
.next-time{
font-size: 28rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #222222;
line-height: 40rpx;
}
.img{
margin-top: 24rpx;
image{
width: 108rpx;
height: 110rpx;
}
.imgs{
margin-left: 24rpx;
}
}
.afterbody{
width: 750rpx;
height: 668rpx;
background: #FFFFFF;
border-radius: 32rpx 32rpx 0rpx 0rpx;
position: fixed;
bottom: 0;
padding: 32rpx;
box-sizing: border-box;
.New-visit{
font-size: 32rpx;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #222222;
line-height: 44rpx;
image{
width: 40rpx;
height: 40rpx;
}
}
.connection-name{
margin-top: 56rpx;
div{
font-size: 28rpx;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #585858;
line-height: 40rpx;
margin-right: 12rpx;
}
input{
width: 534rpx;
height: 70rpx;
background: #F6F6F6;
border-radius: 8rpx;
padding: 0 22rpx;
box-sizing: border-box;
}
.placeholder{
font-size: 28rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #999999;
line-height: 40rpx;
}
}
.Visit-record{
margin-top: 32rpx;
position: relative;
textarea{
width: 534rpx;
height: 244rpx;
background: #F6F6F6;
border-radius: 8rpx;
}
.Visit-img{
position: absolute;
top: 144rpx;
left: 174rpx;
width: 80rpx;
height: 80rpx;
background: #EFEFEF;
border-radius: 16rpx;
image{
width: 24rpx;
height: 24rpx;
}
}
.it-img{
position: absolute;
top: 144rpx;
left: 174rpx;
width: 80rpx;
height: 80rpx;
image{
width: 80rpx;
height: 80rpx;
}
}
.it-imgtwo{
position: absolute;
top: 144rpx;
left: 295rpx;
width: 80rpx;
height: 80rpx;
image{
width: 80rpx;
height: 80rpx;
}
}
span{
font-size: 28rpx;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #585858;
line-height: 40rpx;
margin-right: 12rpx;
}
}
.btn{
margin-top: 58rpx;
.btn1{
width: 206rpx;
height: 72rpx;
border-radius: 40rpx;
border: 2rpx solid #E8E8E8;
font-size: 28rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #222222;
line-height: 40rpx;
margin-left: 154rpx;
margin-right: 32rpx;
}
.btn2{
width: 206rpx;
height: 72rpx;
background: #21BBF3;
border-radius: 40rpx;
font-size: 28rpx;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #FFFFFF;
line-height: 40rpx;
}
}
}
}
</style>