This commit is contained in:
曹辉 2022-12-02 16:02:53 +08:00
parent ffb349cc9f
commit 7396fbdac8
10 changed files with 144 additions and 39 deletions

View File

@ -43,7 +43,9 @@
<view class="selected"> <view class="selected">
图文服务 图文服务
</view> </view>
<image v-for="(item,index) in info" :src="item.image" mode=""></image> <view class="textInfo" v-html="goodsDetailslist.goodsRemark">
</view>
<!-- <image v-for="(item,index) in info" :src="item.image" mode=""></image> -->
</view> </view>
<view class="Purchasecolumn"> <view class="Purchasecolumn">
<view class="buy" @tap="buyshow=true"> <view class="buy" @tap="buyshow=true">
@ -131,7 +133,7 @@
export default { export default {
data() { data() {
return { return {
timer:null, timer: null,
goodsInfoId: null, //id goodsInfoId: null, //id
baseurl: '', //url baseurl: '', //url
image: null, // image: null, //
@ -296,6 +298,8 @@
// //
goodsDetailsinfo(goodsInfoId) { goodsDetailsinfo(goodsInfoId) {
goodsDetails(goodsInfoId).then(res => { goodsDetails(goodsInfoId).then(res => {
res.data[0].goodsRemark = res.data[0].goodsRemark.replace(/\<img/gi,
"<br/> <img class='richPic'")
res.data[0].goodsPictureUrl = this.baseurl + res.data[0].goodsPictureUrl res.data[0].goodsPictureUrl = this.baseurl + res.data[0].goodsPictureUrl
this.image = res.data[0].goodsPictureUrl this.image = res.data[0].goodsPictureUrl
var obj = { var obj = {

View File

@ -238,7 +238,18 @@
box-shadow: 0px 9px 31px 9px rgba(0, 0, 0, 0.03); box-shadow: 0px 9px 31px 9px rgba(0, 0, 0, 0.03);
position: relative; position: relative;
padding-bottom: 110rpx; padding-bottom: 110rpx;
.textInfo {
word-break:break-all;
font-size: 29rpx;
text-indent: 2rem;
line-height: 42rpx;
// color: #666666;
padding: 0 20rpx;
/deep/ .richPic {
width: 100% !important;
height: 100% !important;
}
}
.selected { .selected {
padding: 20rpx 0 0 5%; padding: 20rpx 0 0 5%;
color: #969394; color: #969394;

View File

@ -60,7 +60,7 @@
bottom:20rpx; bottom:20rpx;
right:5%; right:5%;
} }
.detail { .detailtitle {
position: relative; position: relative;
width: 94%; width: 94%;
height: 100%; height: 100%;

View File

@ -14,9 +14,10 @@
<span>{{list.consumableTotalPrice==null?'0':list.consumableTotalPrice}}</span> <span>{{list.consumableTotalPrice==null?'0':list.consumableTotalPrice}}</span>
<view class="detail" v-for='(item,index) in list.itemConsumableList' :key="index"> <view class="detail" v-for='(item,index) in list.itemConsumableList' :key="index">
·{{item.consumableDetail}} ·{{item.consumableDetail}}
<span>{{item.consumableCount}}{{item.consumableUnit}}/{{item.consumablePrice}}</span>
</view> </view>
</view> </view>
<view class="detail"> <view class="detailtitle">
<view class="Introduction">服务详情:</view> <view class="Introduction">服务详情:</view>
<view class="textInfo" v-html="list.nurseItemContent"> <view class="textInfo" v-html="list.nurseItemContent">
</view> </view>
@ -144,9 +145,7 @@
getlist(stationId, stationItemId, stationItemPriceId) { getlist(stationId, stationItemId, stationItemPriceId) {
getAppStationItemInfo(stationId, stationItemId, stationItemPriceId).then(res => { getAppStationItemInfo(stationId, stationItemId, stationItemPriceId).then(res => {
res.data.nurseItemContent = res.data.nurseItemContent.replace(/\<img/gi, res.data.nurseItemContent = res.data.nurseItemContent.replace(/\<img/gi,
"<img class='richPic'") "<br/> <img class='richPic'")
// res.data.nurseItemContent = res.data.nurseItemContent.replace(/\<img/,
// "<br/> <img class='richPic'")
res.data.itemPictureUrl = baseurl + res.data.itemPictureUrl res.data.itemPictureUrl = baseurl + res.data.itemPictureUrl
this.list = res.data this.list = res.data
}) })

View File

@ -38,13 +38,11 @@
} }
// 服务商家 // 服务商家
.detail { .detail {
margin-top: 3%; margin: 30rpx 0 0 3%;
line-height: 31rpx; line-height: 31rpx;
font-size: 32rpx; font-size: 32rpx;
color: #666666; color: #666666;
line-height: 31rpx; line-height: 31rpx;
margin-left: 3%;
} }
.name { .name {
@ -111,7 +109,6 @@
/* 耗材包 */ /* 耗材包 */
.Consumablespackage { .Consumablespackage {
width: 95%; width: 95%;
// height: 188rpx;
margin: 20rpx auto; margin: 20rpx auto;
padding: 3% 3% 50rpx; padding: 3% 3% 50rpx;
background: #FFFFFF; background: #FFFFFF;

View File

@ -47,6 +47,7 @@
<span>{{list.consumableTotalPrice}}</span> <span>{{list.consumableTotalPrice}}</span>
<view class="detail" v-for='(item,index) in list.itemConsumableList' :key="index"> <view class="detail" v-for='(item,index) in list.itemConsumableList' :key="index">
·{{item.orderConsumableName}} ·{{item.orderConsumableName}}
<!-- <span style='font-size: 30rpx;'>{{item.orderConsumableCount}}{{item.consumableUnit}}/{{item.orderConsumablePrice}}</span> -->
</view> </view>
</view> </view>
<view class="remarks"> <view class="remarks">

View File

@ -87,7 +87,7 @@
color: #D43953; color: #D43953;
position: absolute; position: absolute;
right: 5%; right: 5%;
top: 20%; top: 15%;
} }
.user { .user {
@ -248,22 +248,39 @@
} }
} }
.Consumablespackage .money {
top: 8%;
}
/* 耗材包 */ /* 耗材包 */
.Consumablespackage { .Consumablespackage {
width: 94%; width: 94%;
margin: 10rpx auto; margin: 10rpx auto;
padding: 3%; padding: 3% 0 3% 3%;
font-size: 34rpx; font-size: 34rpx;
background: #FFFFFF; background: #FFFFFF;
border-radius: 20rpx; border-radius: 20rpx;
margin-top: 20rpx; margin-top: 20rpx;
position: relative; position: relative;
padding-bottom: 40rpx; padding-bottom: 40rpx;
.detail { .detail {
width: 100%; width: 100%;
line-height: 60rpx; line-height: 100rpx;
margin: 20rpx 0 0 40rpx; // padding: 20rpx 0 0 40rpx;
/deep/ .u-checkbox{
margin: 40rpx 0 0;
position: relative;
}
span{
width: 100%;
display: inline-block;
font-size: 30rpx;
color: #D43953;
text-align: right;
position: absolute;
right:5%;
top:50%;
transform: translateY(-50%);
}
} }
} }
@ -272,7 +289,7 @@
width: 94%; width: 94%;
height: 150rpx; height: 150rpx;
margin: 10rpx auto; margin: 10rpx auto;
padding: 3%; padding: 3% 0 3% 3%;
font-size: 34rpx; font-size: 34rpx;
background: #FFFFFF; background: #FFFFFF;
border-radius: 20rpx; border-radius: 20rpx;

View File

@ -48,10 +48,11 @@
<text class="money">{{orderlist.consumableTotalPrice}}</text> <text class="money">{{orderlist.consumableTotalPrice}}</text>
<view class="detail"> <view class="detail">
<u-checkbox-group @change="checkboxGroupChange" wrap='true'> <u-checkbox-group @change="checkboxGroupChange" wrap='true'>
<u-checkbox @change="checkboxChange" v-model="item.radio" <u-checkbox @change="checkboxChange(item)" v-model="item.radio"
v-for="(item, index) in orderlist.itemConsumableList" :key="index" v-for="(item, index) in orderlist.itemConsumableList" :key="index"
:name="item.consumableDetail"> :name="item.consumableDetail">
{{item.consumableDetail}} <view style='display: inline-block;'> {{item.consumableDetail}}</view>
<span>{{item.consumableCount}}{{item.consumableUnit}}/{{item.consumablePrice}}</span>
</u-checkbox> </u-checkbox>
</u-checkbox-group> </u-checkbox-group>
</view> </view>
@ -310,11 +311,75 @@
this.radio = 2; this.radio = 2;
this.maskshow = false this.maskshow = false
}, },
checkboxChange(e) {}, checkboxChange(e) {
if (e.radio) {
this.orderlist.totalPrice = this.argSubtr(this.orderlist.totalPrice, e.consumablePrice)
} else {
this.orderlist.totalPrice = this.argAdd(this.orderlist.totalPrice, e.consumablePrice)
}
},
argAdd(arg1, arg2) {
//
var _this = this,
r1 = 0,
r2 = 0,
m = 0;
try {
r1 = arg1.toString().split(".")[1].length
} catch (e) {}
try {
r2 = arg2.toString().split(".")[1].length
} catch (e) {}
m = Math.pow(10, Math.max(r1, r2))
return _this.argDiv((_this.argMul(arg1, m) + _this.argMul(arg2, m)), m)
},
argSubtr(arg1, arg2) {
//
var _this = this,
r1 = 0,
r2 = 0,
m = 0;
try {
r1 = arg1.toString().split(".")[1].length
} catch (e) {}
try {
r2 = arg2.toString().split(".")[1].length
} catch (e) {}
m = Math.pow(10, Math.max(r1, r2));
return _this.argDiv((_this.argMul(arg1, m) - _this.argMul(arg2, m)), m)
},
argMul(arg1, arg2) {
//
var _this = this,
m = 0,
s1 = arg1.toString(),
s2 = arg2.toString();
try {
m += s1.split(".")[1].length
} catch (e) {}
try {
m += s2.split(".")[1].length
} catch (e) {}
return Number(s1.replace(".", "")) * Number(s2.replace(".", "")) / Math.pow(10, m)
},
argDiv(arg1, arg2) {
//
var _this = this,
t1 = 0,
t2 = 0,
r1, r2;
try {
t1 = arg1.toString().split(".")[1].length
} catch (e) {}
try {
t2 = arg2.toString().split(".")[1].length
} catch (e) {}
r1 = Number(arg1.toString().replace(".", ""))
r2 = Number(arg2.toString().replace(".", ""))
return _this.argMul((r1 / r2), Math.pow(10, t2 - t1));
},
// checkboxcheckbox-group // checkboxcheckbox-group
checkboxGroupChange(e) {}, checkboxGroupChange(e) {},
//
checkedAll() {},
// //
timeconfirm(e) { timeconfirm(e) {
this.orderlist.serviceStartTime = e.hour + ":" + e.minute this.orderlist.serviceStartTime = e.hour + ":" + e.minute

View File

@ -71,6 +71,7 @@
export default { export default {
data() { data() {
return { return {
timer:null,
isedit: true, // isedit: true, //
delshow: false, // delshow: false, //
content: '确认要删除信息吗?', content: '确认要删除信息吗?',
@ -78,7 +79,7 @@
areashow: false, // areashow: false, //
arealist: [], //list arealist: [], //list
areaCode: '', areaCode: '',
shipAddress: '添加收货地址', shipAddress: '添加地址',
infolist: { infolist: {
receiveName: '', receiveName: '',
receivePhone: '', receivePhone: '',
@ -97,7 +98,6 @@
let that = this let that = this
this.url = options.url this.url = options.url
this.updata = JSON.parse(options.updata) this.updata = JSON.parse(options.updata)
//
this.goodsList() this.goodsList()
this.areaInfo() this.areaInfo()
}, },
@ -119,7 +119,6 @@
const value = uni.getStorageSync('patientId'); const value = uni.getStorageSync('patientId');
if (value) { if (value) {
that.patientId = value that.patientId = value
that.infolist.patientId = value
goodPatientInfo(that.patientId).then(res => { goodPatientInfo(that.patientId).then(res => {
res.data.forEach(e => { res.data.forEach(e => {
e.address = e.provinceName + e.cityName + e.regionName + e e.address = e.provinceName + e.cityName + e.regionName + e
@ -127,6 +126,19 @@
}) })
that.goodPatient = res.data that.goodPatient = res.data
}) })
} else {
that.$refs.uToast.show({
title: '登录状态异常',
type: 'error'
})
if (that.timer) {
clearTimeout(that.timer)
}
that.timer = setTimeout(e => {
uni.navigateBack({
delta:2
})
}, 1500)
} }
} catch (e) {} } catch (e) {}
}, },
@ -138,24 +150,24 @@
if (res.code == 200) { if (res.code == 200) {
uni.showToast({ uni.showToast({
title: '新增成功', title: '新增成功',
duration: 1500 duration: 1000
}); });
that.show = false; that.show = false;
setTimeout(e => { setTimeout(e => {
that.goodsList() that.goodsList()
}, 1500) }, 1000)
} }
}) })
} else { } else {
updatenursingStation(that.infolist).then(res => { updatenursingStation(that.infolist).then(res => {
uni.showToast({ uni.showToast({
title: '修改成功', title: '修改成功',
duration: 1500 duration: 1000
}); });
that.show = false; that.show = false;
setTimeout(e => { setTimeout(e => {
that.goodsList() that.goodsList()
}, 1500) }, 1000)
}) })
} }
}, },
@ -194,16 +206,14 @@
delnursingStation(item.id).then(res => { delnursingStation(item.id).then(res => {
uni.showToast({ uni.showToast({
title: '删除成功', title: '删除成功',
duration: 1500, duration: 1000,
}); });
setTimeout(e => { setTimeout(e => {
that.goodsList() that.goodsList()
}, 1500) }, 1000)
that.delshow = false; that.delshow = false;
}) })
} else if (res.cancel) { } else if (res.cancel) {}
}
} }
}); });
}, },

View File

@ -130,12 +130,12 @@
}, },
onShow() { onShow() {
this.usershow = false this.usershow = false
this.getInfo()
this.serveinfo()
this.productinfo()
}, },
onLoad(options) { onLoad(options) {
this.nurseStationId = options.nurseStationId this.nurseStationId = options.nurseStationId
this.getInfo()
this.serveinfo()
this.productinfo()
}, },
methods: { methods: {
goappointments(item) { goappointments(item) {
@ -207,7 +207,8 @@
getInfo() { getInfo() {
introductionList(this.nurseStationId).then(res => { introductionList(this.nurseStationId).then(res => {
res.data.stationIntroducePcitureUrl = baseurl + res.data.stationIntroducePcitureUrl res.data.stationIntroducePcitureUrl = baseurl + res.data.stationIntroducePcitureUrl
res.data.agencyIntroduce = res.data.agencyIntroduce.replace(/\<img/gi, "<img class='richPic'") res.data.agencyIntroduce = res.data.agencyIntroduce.replace(/\<img/gi,
"<br/><img class='richPic'")
// res.data.agencyIntroduce = res.data.agencyIntroduce.replace(/\<img/, // res.data.agencyIntroduce = res.data.agencyIntroduce.replace(/\<img/,
// "<br/> <img class='richPic'") // "<br/> <img class='richPic'")
this.list = res.data this.list = res.data