Browse Source

新搜索、进售价更改

master
zq 3 months ago
parent
commit
728f8b6dcd
  1. 169
      components/listWrap.vue
  2. 2
      components/visitorInfo.vue
  3. 10
      pages.json
  4. 277
      pages/coinsDetail/index.vue
  5. 330
      pages/home/index.vue
  6. 250
      pages/searchCoinName/index.vue
  7. BIN
      static/images/form_edit.png
  8. 1
      static/images/prescriptSearch.svg

169
components/listWrap.vue

@ -0,0 +1,169 @@
<template>
<view class="bed-wait-item" v-for="(item, index) in bedWaitList" :key="index" @tap="lookDetail(item)">
<view class="bed-wait-info">
<view class="bed-wait-name PfScMedium">{{ item.coin_name }}</view>
<view class="bed-desc flex">
<view :class="['bed-age',type == '1' ? 'bold':'']">{{ item.buying_price }}{{ type == '2' ?'进':'' }}</view>
<view class="bed-sex bed-sex-bold" v-if="type == '2'">{{ item.price }}元售</view>
</view>
</view>
<view class="bed-wait-time">
<view class="bed-left">
<!-- 布局修改 -->
<view class="bed-left-flex">
<view class="bed-sex">{{ item.year }}</view>
<view class="bed-visit-format" v-if="item.format">{{ item.format }}</view>
</view>
<view>{{ item.rating_department }}</view>
</view>
<view class="bed-checkin-time flex-between">
<view class="bed-visit-time">{{ item.operate_time }}</view>
<view>{{ item.rating_code }}</view>
</view>
</view>
</view>
</template>
<script>
export default {
props:['bedWaitList','type'],
options: { styleIsolation: "shared" },
components: {
},
data() {
return {
list:[]
}
},
methods:{
lookDetail(item) {
uni.setStorageSync('detail', JSON.stringify(item))
let url = `/pages/coinsDetail/index?id=${item.rating_code}`
this.$nav.navToPath(url)
},
}
}
</script>
<style lang="scss" scoped>
.bold{
font-weight: 500 !important;
color: #000000 !important;
}
.bed-wait-item {
padding: 36rpx 0rpx;
border-bottom: 2rpx solid #F1F1F1;
position: relative;
}
.bed-wait-info {
display: flex;
align-items: center;
.bed-wait-name {
font-size: 32rpx;
color: #000000;
margin-right: 24rpx;
font-weight: 500;
}
.bed-visit-type-desc {
padding: 0 18rpx;
height: 40rpx;
box-sizing: border-box;
display: flex;
align-items: center;
justify-content: center;
font-size: 26rpx;
line-height: normal;
border-radius: 6rpx;
margin-left: 24rpx;
background: #F7FCFF;
color: #007FD0;
border: 1rpx solid #5FA1CB;
&.ml-auto {
margin-left: auto;
}
}
.bed-desc {
color: #999999;
font-size: 28rpx;
margin-left: auto;
gap: 12rpx;
}
.bed-sex {
font-size: 28rpx;
font-weight: normal;
line-height: 44rpx;
color: #242833;
letter-spacing: 0.86rpx;
}
.bed-sex-bold,.bed-age{
font-family: PingFang SC;
font-size: 30rpx;
font-weight: 500;
line-height: 44rpx;
letter-spacing: 0.86rpx;
color: #000000;
}
.bed-age {
font-size: 30rpx;
font-weight: normal;
line-height: 44rpx;
letter-spacing: 0.86rpx;
color: #999999;
font-weight: normal;
}
}
.bed-wait-time {
display: flex;
column-gap: 24rpx;
margin-top: 16rpx;
flex-direction: column;
gap: 16rpx;
view {
font-size: 24rpx;
color: #999999;
}
.bed-visit-format {
border-radius: 6rpx;
background: #EBEBEB;
padding: 2rpx 16rpx;
font-family: PingFang SC;
font-size: 26rpx;
font-weight: normal;
line-height: normal;
letter-spacing: normal;
color: #666666;
width: fit-content;
}
.bed-left {
display: flex;
gap: 16rpx;
align-items: center;
justify-content: space-between;
}
.bed-left-flex{
display: flex;
gap: 24rpx;
align-items: center;
}
}
.flex-between{
display: flex;
justify-content: space-between;
}
</style>

2
components/visitorInfo.vue

@ -65,7 +65,7 @@ export default {
.user-info-com {
font-family: PingFang SC;
.user-info {
margin: 0 18rpx 20rpx;
margin: 0 18rpx 0rpx;
background: #FFFFFF;
padding: 34rpx 24rpx 44rpx;
position: relative;

10
pages.json

@ -19,6 +19,16 @@
"titleNView": false
}
}
},
{
"path": "pages/searchCoinName/index",
"style": {
"navigationBarTitleText": "搜索钱币信息",
"enablePullDownRefresh": true,
"app-plus": {
"titleNView": false
}
}
}
],

277
pages/coinsDetail/index.vue

@ -1,10 +1,58 @@
<template>
<view class="coinsDetail-wrap">
<view :class="{'top':id}">
<VisitorInfo :visitorInfo="detailItem"/>
<view :class="{ 'top': id,'bottom':id }">
<VisitorInfo :visitorInfo="detailItem" />
</view>
<view v-if="!id" class="showPriceContent">
<view :class="['showPriceWrap',detailItem.ancient_coin_status == 0 ? 'green':'orange']">
<view class="flex-between">
<view class="label">{{ textObj[detailItem.ancient_coin_status] }}</view>
<view class="status3" v-if="detailItem.ancient_coin_status == '1' && detailItem.buying_price">进价 {{ detailItem.buying_price }}</view>
<view class="flex status3" v-if="detailItem.ancient_coin_status == '2'">
历史:
<view v-if="String(detailItem.buying_price).length > 0">{{ detailItem.buying_price }}元进 </view>
<view v-if="String(detailItem.price).length > 0">
{{ detailItem.price }}元售
</view>
</view>
</view>
<view class="inputWrap" :class="{ 'greenBorder': price2Length > 0 && detailItem.ancient_coin_status == 0, 'orangeBorder':price2Length > 0 && detailItem.ancient_coin_status != 0 }">
<input type="text" placeholder="输入" :focus="isFocus" v-model="price2" >
<view class="unit"></view>
</view>
</view>
</view>
<view class="list-wrap">
<view class="list-box-com" v-if="detailItem.status =='2' && id">
<view class="item flex-between">
<view :class="'left ft30'">
售价
</view>
<view class="right ft30">
<view class="flex1">
<input type="text" v-model="price" @blur="updatePrice('price')">
<view></view>
</view>
<img class="editImg" :src="cssUrl + 'form_edit.png'" alt="">
</view>
</view>
</view>
<view class="list-box-com" v-if="id">
<view class="item flex-between">
<view :class="'left ft30'">
进价
</view>
<view class="right ft30">
<view class="flex1">
<input type="text" v-model="buying_price" @blur="updatePrice('buying_price')">
<view></view>
</view>
<img class="editImg" :src="cssUrl + 'form_edit.png'" alt="">
</view>
</view>
</view>
<ListBox v-if="detailItem.rating_code" leftTitle="评级部门" :rightTitle="detailItem.rating_department" />
<ListBox v-if="detailItem.rating_code" leftTitle="评级编号" :rightTitle="detailItem.rating_code" />
<ListBox v-if="detailItem.material" leftTitle="材质" :rightTitle="detailItem.material" />
@ -25,37 +73,57 @@ import VisitorInfo from '@/components/visitorInfo.vue';
export default {
name: "coinsDetail",
props:['scanCodeDetail'],
props: ['scanCodeDetail'],
components: {
VisitorInfo,
ListBox
},
data() {
return {
textObj:{
0:'进价:',
'1':'售价:',
'2':'再次入库价:',
},
cssUrl: this.cssUrl1,
visitorInfo: {},
id:'',
id: '',
detailItem: {},
scan_code_detail:''
scan_code_detail: '',
price: '',
buying_price:'',
price2:'',
isFocus:false
}
},
computed: {
price2Length() {
return this.price2.length
}
},
watch: {
scanCodeDetail(newVal, oldVal) {
this.detailItem = {...newVal}//
this.detailItem = { ...newVal }//
}
},
mounted(){
if(this.scanCodeDetail && Object.keys(this.scanCodeDetail).length > 0){
this.detailItem = {...this.scanCodeDetail}
mounted() {
if (this.scanCodeDetail && Object.keys(this.scanCodeDetail).length > 0) {
this.detailItem = { ...this.scanCodeDetail }
}
},
},
onLoad(options) {
// console.log(options,'this.$route.query-=',this.scanCodeDetail);
const {id} = options;
//
if(id){
const { id } = options;
//
if (id) {
this.id = id;
let detailItem = uni.getStorageSync('detail')
if (detailItem)this.detailItem = JSON.parse(detailItem)
if (detailItem) this.detailItem = JSON.parse(detailItem)
this.price = this.detailItem.price;
// this.price1 = this.detailItem.price1 || ''
this.buying_price = this.detailItem.buying_price;
}
// else{
// //
@ -63,14 +131,191 @@ export default {
// this.detailItem = {...this.scanCodeDetail}
// }
},
methods:{
updatePrice(type){
let params={
scan_code_detail:JSON.stringify({...this.detailItem}),
rating_code:this.detailItem.rating_code,
rating_agency_id:this.detailItem.rating_agency_id
}
if(type == 'buying_price'){
params.buying_price = this.buying_price;
}else{
params.price = this.price;
}
this.$http.req('/api/update_price', {
...params
}, 'POST').then(data => {
if (data == -1) return
this.$pop.modelShow(data.msg)
}).catch(res => {
});
}
}
};
</script>
<style lang="scss" scoped>
.flex1{
display: flex;
align-items: center;
flex: 1;
input{
flex: 1;
text-align: right;
}
}
.flex-between {
display: flex;
justify-content: space-between;
align-items: center;
}
.status3{
font-size: 28rpx;
font-weight: normal;
line-height: normal;
text-align: right;
letter-spacing: 0.24rpx;
color: #E81F1F;
gap: 10rpx;
}
.label{
color: #333333;
font-size: 28rpx;
letter-spacing: 0.24rpx;
}
.green{
background: #F0F9EB; /* #F0F9EB */
input{
border-color: #39D067;
}
}
.orange{
background: #FFEFE3;
input{
border-color: #DCDCDC;
}
}
.bottom{
margin-bottom: 20rpx;
}
.showPriceContent{
padding: 0 42rpx 24rpx 42rpx;
background: #fff;
}
.showPriceWrap{
padding: 24rpx;
font-family: PingFang SC;
font-size: 28rpx;
font-weight: normal;
line-height: normal;
text-align: right;
letter-spacing: 0.24rpx;
color: #333333;
input{
text-align: left;
flex: 1;
&::placeholder{
color: #999999;
}
}
.inputWrap{
// width: 618rpx;
margin-top: 12rpx;
height: 86rpx;
display: flex;
justify-content: space-between;
align-items: center;
padding: 22rpx 24rpx;
align-self: stretch;
border-radius: 10rpx;
box-sizing: border-box;
background: #FFFFFF;
border: 2rpx solid #DCDCDC;
transition: all .3s;
font-size: 30rpx;
font-weight: normal;
line-height: normal;
letter-spacing: 0.22rpx;
color: #000000;
}
.unit{
font-family: PingFang SC;
font-size: 30rpx;
font-weight: normal;
line-height: normal;
letter-spacing: 0.22rpx;
color: #333333;
}
}
.list-box-com {
width: 100%;
background: #FFFFFF;
box-sizing: border-box;
.item {
// width: 692rpx;
box-sizing: border-box;
margin: 0 auto;
display: flex;
background: #FFFFFF;
justify-content: space-between;
line-height: 44rpx;
font-weight: 400;
align-items: center;
padding: 42rpx 0;
margin: 0 24rpx;
border-bottom: 2rpx solid #F0F0F0;
.left {
text-align: left;
font-size: 32rpx;
font-weight: 500;
line-height: 44rpx;
letter-spacing: 2rpx;
color: #222222;
}
.right {
flex-grow: 1;
display: flex;
justify-content: flex-end;
font-size: 32rpx;
font-weight: normal;
line-height: normal;
text-align: right;
letter-spacing: 0.24rpx;
color: #666666;
gap: 24rpx;
align-items: center;
}
}
}
.greenBorder {
border: 2rpx solid #39D067 !important;
transition: all .3s;
background: #fff;
}
.orangeBorder {
border: 2rpx solid rgba(253, 123, 19, 0.6) !important;
transition: all .3s;
background: #fff;
}
.editImg {
width: 32rpx;
height: 32rpx;
}
.coinsDetail-wrap {
.list-wrap {
padding: 0 18rpx 20rpx 18rpx;;
padding: 0 18rpx 20rpx 18rpx;
;
}
.top{
.top {
margin-top: 20rpx;
}
}

330
pages/home/index.vue

@ -10,6 +10,15 @@
<view class="outbound">{{ delivery_count || 0 }}</view>
</view>
</view>
<view class="search-wrapper flex" >
<div class="search-main" @tap="getSearch">
<view class="flex search-main-left">
<image class="icon" :src="cssUrl + 'prescriptSearch.svg'" mode="widthFix"></image>
<view>搜索钱币名称</view>
</view>
<view class="search-text">搜索</view>
</div>
</view>
<view class="patientTab">
<view :class="'notActive ft32' + (status == '1' ? ' active PfScMedium' : '')" @tap="changeWaitType('1')">
库存列表</view>
@ -20,31 +29,7 @@
<scroll-view class="patient-type-tab1" @scrolltolower="onScroll" scroll-y>
<view class="bed-wait-container">
<view class="bed-wait-list">
<view class="bed-wait-item" v-for="(item, index) in bedWaitList" :key="index"
@tap="lookDetail(item)">
<view class="bed-wait-info">
<view class="bed-wait-name PfScMedium">{{ item.coin_name }}</view>
<view class="bed-sex">{{ item.year }}</view>
<view :class="'bed-desc'">
{{ item.rating_department }}
</view>
</view>
<view class="bed-wait-time flex-between">
<view class="bed-left">
<view class="bed-visit-format" v-if="item.format">{{ item.format }}</view>
<view class="bed-visit-time">{{ item.operate_time }}</view>
</view>
<view class="bed-checkin-time">{{ item.rating_code }}</view>
</view>
</view>
</view>
<ListWrap :bedWaitList="bedWaitList" :type="status"/>
</view>
<view v-if="loading" class="loading-text">加载中...</view>
<view v-if="noMore" class="no-more-text">没有更多数据了</view>
@ -57,14 +42,15 @@
</view>
<PopUpCommon ref="coinsPopup" :showClose="true" zIndex="top">
<view class="popWrap">
<view class="popWrap" ref="popWrap">
<view class="pop-title PfScMedium">{{ titleType[scanCodeDetail.ancient_coin_status] }}</view>
<view class="content">
<CoinsDetail :scanCodeDetail="scanCodeDetail" />
<CoinsDetail v-if="isShowCoinModal" :scanCodeDetail="scanCodeDetail" ref="coinsDetail"/>
</view>
<view class="qrcode_wrap page-bottom-btn-container flex-between">
<view class="bottom-btn cancel" @click="onCancel">取消</view>
<view class="bottom-btn PfScMedium primary" @click="onConfirm">{{ btnText[scanCodeDetail.ancient_coin_status] }}</view>
<view class="bottom-btn PfScMedium primary" @click="onConfirm">{{
btnText[scanCodeDetail.ancient_coin_status] }}</view>
</view>
</view>
</PopUpCommon>
@ -75,6 +61,7 @@ import ListBox from '@/components/listBox.vue';
import PopUpCommon from '@/components/common/popUpCommon.vue';
import CoinsDetail from '../coinsDetail';
import PageBottomBtn from '@/components/pageBottomBtn.vue'
import ListWrap from '@/components/listWrap.vue'
export default {
options: { styleIsolation: "shared" },
@ -82,6 +69,7 @@ export default {
PopUpCommon,
PageBottomBtn,
ListBox,
ListWrap,
CoinsDetail
},
data() {
@ -111,21 +99,25 @@ export default {
storage_count: '',
delivery_count: '',
scanCodeDetail: {
ancient_coin_status: 0,
ancient_coin_status_desc: "未入库",
coin_name: "机制光绪通宝",
format: "库平一钱满汉广",
grade: "AU 58",
rating_agency_id: "1",
rating_code: "1310684212",
rating_department: "北京公博二部",
size: "24.0*1.1mm,3.5g",
year: "1889"
"coin_name": "机制光绪通宝",
"rating_code": "1310684212",
"rating_department": "北京公博二部",
"grade": "AU 58",
"size": "24.0*1.1mm,3.5g",
"year": "1889",
"format": "库平一钱满汉广",
"rating_agency_id": "1",
"ancient_coin_status": "1",
"ancient_coin_status_desc": "已入库",
"buying_price": "188.00",
"price": "0.00"
},
loading: false,
noMore: false,
page: 1,
pagesize: 10
pagesize: 10,
name:'',
isShowCoinModal:false
}
},
@ -133,6 +125,7 @@ export default {
// var token = uni.getStorageSync("u_token");
//
this.getCoinsList()
// this.isShowCoinModal = true;
// this.$refs.coinsPopup.openPop();
},
onPullDownRefresh() {
@ -146,7 +139,17 @@ export default {
this.getCoinsList();
}
},
methods: {
open(){
this.isShowCoinModal = true;
this.$refs.coinsPopup.openPop();
},
getSearch() {
let url = `/pages/searchCoinName/index`
this.$nav.navToPath(url)
},
onScroll() {
if (!this.noMore && !this.loading) {
this.page++;
@ -181,11 +184,11 @@ export default {
let url = `/pages/coinsDetail/index?id=${item.rating_code}`
this.$nav.navToPath(url)
},
changeWaitType(type) {
this.status = type;
//
this.getCoinsList()
},
// changeWaitType(type) {
// this.status = type;
// //
// this.getCoinsList()
// },
changeWaitType(type) {
this.status = type;
this.page = 1;
@ -197,7 +200,7 @@ export default {
// #ifdef MP-WEIXIN
uni.scanCode({
scanType: ['barCode','qrCode'],
scanType: ['barCode', 'qrCode'],
success: (res) => {
this.getScanQrcode(res.result)
},
@ -220,18 +223,22 @@ export default {
this.$http.req('/api/get_scan_code_detail', {
url: result
}, 'POST').then(data => {
console.log(data, 'data===data');
if(data == -1)return
if (data == -1) return
this.scanCodeDetail = data;
this.$set(this, 'scanCodeDetail', data)
setTimeout(() => {
console.log(this.scanCodeDetail, '222');
this.isShowCoinModal = true
this.$refs.coinsPopup.openPop();
setTimeout(()=>{
this.$refs.coinsDetail.isFocus = true
},700)
}, 500)
}).catch(res => {
});
},
async onConfirm() {
// console.log(this.$refs.coinsDetail.price2,'coinsDetail====-');
let price2 = this.$refs.coinsDetail.price2
//
let url = '/api/operate'//
let operate = ''
@ -245,9 +252,12 @@ export default {
//
this.$http.req(url, {
scan_code_detail: JSON.stringify(this.scanCodeDetail),
operate: operate
operate: operate,
price:price2
}, 'POST').then(data => {
// -
this.$refs.coinsDetail.price2 = ''
this.$refs.coinsDetail.isFocus = false
//
if (status == 0 || status == '2') {
if (this.status != '1') this.status = '1'
@ -259,6 +269,11 @@ export default {
//
this.getCoinsList()
this.$refs.coinsPopup.closePop()
this.isShowCoinModal = false
uni.pageScrollTo({
scrollTop: 0,
duration: 300 // ms
})
}).catch(res => {
this.loading = false;
});
@ -267,64 +282,119 @@ export default {
},
onCancel() {
// this.scrollToTop()
this.$refs.coinsPopup.closePop()
this.isShowCoinModal = false
},
scrollToTop() {
this.$nextTick(() => {
const node = this.$refs.popWrap;
if (node && node.$el) {
node.$el.scrollTop = 0;
}
});
}
}
}
</script>
<style lang="scss" scoped>
.flex-between{
.flex-between {
display: flex;
justify-content: space-between;
}
.popWrap{
.popWrap {
display: flex;
flex-direction: column;
max-height: 800rpx;
.content{
max-height: 70%;
.content {
flex: 1;
}
}
.search-wrapper {
// margin-top: 20rpx;
// border-bottom: 2rpx solid #e6e6e6;
padding:0 24rpx 36rpx 24rpx;
background: #fff;
.search-main {
width: 100%;
border-radius: 6px;
background: #F7F7F7;
box-sizing: border-box;
display: flex;
height: 70rpx;
align-items: center;
padding: 0rpx 20rpx;
justify-content: space-between;
}
.search-main-left{
align-items: center;
gap: 12rpx;
color: #999999;
}
.input-box {
height: 70rpx;
line-height: 70rpx;
font-size: 28rpx;
color: #000000;
text-align: left;
flex: 1;
padding-left: 12rpx;
}
.icon {
width: 34rpx;
display: block;
}
}
.bottom-btn {
height: 92rpx;
width: 100%;
margin: 16rpx 0;
line-height: 92rpx;
text-align: center;
font-size: 32rpx;
border-radius: 16rpx;
border: none;
padding: 0;
&.primary{
background-color: #39D067;
color: #FFFFFF;
}
&.cancel{
background-color: #F1F2F3;
color: #616266;
}
&::after {
height: 92rpx;
width: 100%;
margin: 16rpx 0;
line-height: 92rpx;
text-align: center;
font-size: 32rpx;
border-radius: 16rpx;
border: none;
}
padding: 0;
&.disabled {
background-color: #CCCCCC;
opacity: 0.7;
}
&.primary {
background-color: #39D067;
color: #FFFFFF;
}
&.cancel {
background-color: #F1F2F3;
color: #616266;
}
&::after {
border: none;
}
&.disabled {
background-color: #CCCCCC;
opacity: 0.7;
}
}
.page-bottom-btn-container {
box-sizing: border-box;
background-color: #FFFFFF;
padding: 0rpx 54rpx;
box-shadow: 0px -2rpx 6rpx 0rpx rgba(181, 181, 181, 0.1319);
z-index: 9;
padding-bottom: constant(safe-area-inset-bottom);
box-sizing: border-box;
background-color: #FFFFFF;
padding: 0rpx 54rpx;
box-shadow: 0px -2rpx 6rpx 0rpx rgba(181, 181, 181, 0.1319);
z-index: 9;
padding-bottom: constant(safe-area-inset-bottom);
padding-bottom: env(safe-area-inset-bottom);
column-gap: 50rpx;
column-gap: 50rpx;
}
.home-wrap {
display: flex;
flex-direction: column;
@ -332,7 +402,7 @@ export default {
.amountWrap {
gap: 16rpx;
padding: 36rpx 24rpx;
padding: 36rpx 24rpx 24rpx;
box-sizing: border-box;
background: #fff;
@ -448,94 +518,6 @@ export default {
box-sizing: border-box;
}
.bed-wait-item {
padding: 36rpx 0rpx;
border-bottom: 2rpx solid #F1F1F1;
position: relative;
}
.bed-wait-info {
display: flex;
.bed-wait-name {
font-size: 32rpx;
color: #000000;
margin-right: 24rpx;
font-weight: 500;
}
.bed-visit-type-desc {
padding: 0 18rpx;
height: 40rpx;
box-sizing: border-box;
display: flex;
align-items: center;
justify-content: center;
font-size: 26rpx;
line-height: normal;
border-radius: 6rpx;
margin-left: 24rpx;
background: #F7FCFF;
color: #007FD0;
border: 1rpx solid #5FA1CB;
&.ml-auto {
margin-left: auto;
}
}
.bed-desc {
color: #999999;
font-size: 28rpx;
margin-left: auto;
&.active {
color: #4DC56D;
}
}
.bed-sex,
.bed-age {
font-size: 28rpx;
font-weight: normal;
line-height: 44rpx;
color: #242833;
letter-spacing: 0.86rpx;
}
.bed-age {
margin-left: 24rpx;
}
}
.bed-wait-time {
display: flex;
column-gap: 24rpx;
margin-top: 16rpx;
align-items: stretch;
view {
font-size: 24rpx;
color: #999999;
}
.bed-visit-format{
border-radius: 6rpx;
background: #EBEBEB;
padding: 2rpx 16rpx;
font-family: PingFang SC;
font-size: 26rpx;
font-weight: normal;
line-height: normal;
letter-spacing: normal;
color: #666666;
width: fit-content;
}
.bed-left{
display: flex;
gap: 16rpx;
flex-direction: column;
}
}
}
.list-wrap {

250
pages/searchCoinName/index.vue

@ -0,0 +1,250 @@
<template>
<view class="column">
<view class="search-wrapper flex">
<div class="search-main" :class="{ 'search-main-focus': keyWords > 0 }">
<image class="icon" :src="cssUrl + 'prescriptSearch.svg'" mode="widthFix"></image>
<input class="ft46 input-box" placeholder-class="placeholder-style" placeholder="搜索患者姓名"
v-model="keyword" />
<view class="search-text" :class="{ 'green': keyWords > 0 }" @click="getSearch">搜索</view>
</div>
</view>
<view class="patientTab">
<view :class="'notActive ft32' + (status == '1' ? ' active PfScMedium' : '')" @tap="changeWaitType('1')">
库存列表</view>
<view :class="'notActive ft32' + (status == '2' ? ' active PfScMedium' : '')" @tap="changeWaitType('2')">
出库列表
</view>
</view>
<scroll-view class="patient-type-tab1" @scrolltolower="onScroll" scroll-y>
<view class="bed-wait-container">
<ListWrap :bedWaitList="bedWaitList" :type="status" />
</view>
<view v-if="loading" class="loading-text">加载中...</view>
<view v-if="noMore" class="no-more-text">没有更多数据了</view>
<view class="page-padding" v-show="bedWaitList && bedWaitList.length && bedWaitList.length > 0">
</view>
</scroll-view>
</view>
</template>
<script>
import ListWrap from '@/components/listWrap.vue'
export default {
options: { styleIsolation: "shared" },
components: {
ListWrap,
},
data() {
return {
list: [],
cssUrl: this.cssUrl1,
status: '1',
loading: false,
noMore: false,
page: 1,
pagesize: 10,
keyword: '',
bedWaitList: []
}
},
computed: {
keyWords() {
return this.keyword.length
}
},
onLoad(option) {
// var token = uni.getStorageSync("u_token");
//
this.getCoinsList()
// this.$refs.coinsPopup.openPop();
},
onPullDownRefresh() {
this.bedWaitList = [];
this.page = 1;
this.getCoinsList()
},
onReachBottom() {
if (!this.noMore && !this.loading) {
this.page++;
this.getCoinsList();
}
},
methods: {
onScroll() {
if (!this.noMore && !this.loading) {
this.page++;
this.getCoinsList();
}
},
getSearch(){
this.page = 1;
this.getCoinsList()
},
changeWaitType(type) {
this.status = type;
this.page = 1;
this.bedWaitList = [];
//
this.getCoinsList()
},
getCoinsList() {
this.loading = true;
//
this.$http.req('/api/getlist', { status: this.status, page: this.page, pagesize: this.pagesize, keyword: this.keyword }, 'POST').then(data => {
uni.stopPullDownRefresh();
this.loading = false;
if (data.list.length === 0 || data.length == 0) {
this.noMore = true;
uni.showToast({ title: '没有更多数据了', icon: 'none' });
return;
}
//
if (this.page === 1) {
this.bedWaitList = data.list;
} else {
this.bedWaitList = [...this.bedWaitList, ...data.list];
}
console.log(this.bedWaitList,'bedWaitList===');
this.storage_count = data.storage_count;
this.delivery_count = data.delivery_count;
}).catch(res => {
this.loading = false;
});
},
}
}
</script>
<style lang="scss" scoped>
.column{
display: flex;
height: 100%;
flex-direction: column;
}
.loading-text,
.no-more-text {
text-align: center;
padding: 20rpx;
color: #999;
}
.patient-type-tab1 {
height: 0;
width: 100%;
background: white;
flex: 1;
.bed-wait-container {
padding: 0rpx 42rpx;
background: white;
box-sizing: border-box;
}
}
.search-main-focus {
border: 2rpx solid #39D067 !important;
transition: all .3s;
background: #fff;
}
.green {
color: #4DC56D !important;
}
.search-wrapper {
margin-top: 20rpx;
padding: 20rpx 42rpx;
background: #fff;
input:focus {
border-color: #39D067;
}
.search-main {
transition: all .3s;
border: 2rpx solid transparent;
width: 100%;
border-radius: 6px;
background: #F7F7F7;
box-sizing: border-box;
display: flex;
height: 70rpx;
align-items: center;
padding: 0rpx 20rpx;
justify-content: space-between;
}
.search-main-left {
align-items: center;
gap: 12rpx;
color: #999999;
}
.input-box {
height: 70rpx;
line-height: 70rpx;
font-size: 28rpx;
color: #000000;
text-align: left;
flex: 1;
padding-left: 12rpx;
}
.icon {
width: 34rpx;
display: block;
}
}
.patientTab {
width: 100%;
display: flex;
justify-content: center;
height: 120rpx;
align-items: center;
margin-top: 20rpx;
padding: 0 62rpx;
box-sizing: border-box;
justify-content: space-between;
background: white;
border-radius: 12rpx 12rpx 0rpx 0rpx;
border-bottom: 2rpx solid rgba(0, 0, 0, 0.15);
// box-shadow: 0px 1rpx 0rpx 0rpx rgba(0, 0, 0, 0.15);
.notActive {
width: 269rpx;
height: 100%;
text-align: center;
font-weight: 400;
color: #666666;
font-size: 32rpx;
line-height: 120rpx;
display: flex;
justify-content: center;
align-items: center;
.wait-bed-num {
padding: 0px 14rpx;
box-sizing: border-box;
width: auto;
height: 38rpx;
min-width: 60rpx;
display: flex;
justify-content: center;
align-items: center;
border-radius: 60rpx;
background: #FFEBEB;
font-size: 28rpx;
color: #FF1818;
margin-left: 10rpx;
}
}
.active {
font-weight: 500;
color: #4DC56D;
box-sizing: border-box;
border-bottom: 4rpx solid #4DC56D;
}
}
</style>

BIN
static/images/form_edit.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

1
static/images/prescriptSearch.svg

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 6.0 KiB

Loading…
Cancel
Save