Commit 4192a3f7 authored by limengyang's avatar limengyang

feat: 三个单位主体共用采购平台建设第二期

Closes {https://jira.frp.frontso.com.cn/browse/TML-7826?filter=-1}
parent db5cd3d7
......@@ -61,7 +61,8 @@
margin-top: 10rpx;
padding-left: 20rpx;background: white;height: 150rpx;width: 100%;
box-sizing: border-box;
display: flex;flex-direction: row;align-items: center
display: flex;flex-direction: column;
justify-content: center;
}
.van-tabs__line {
z-index: 1;
......@@ -73,6 +74,35 @@
background-color: #409EFF !important;
}
.project-source-container {
position: relative;
}
.project-source-field .van-field__value {
padding-right: 80rpx !important;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
max-width: calc(100% - 80rpx);
}
.delete-icon {
position: absolute;
right: 26rpx;
top: 50%;
transform: translateY(-50%);
color: #969799;
font-size: 32rpx;
padding: 10rpx;
z-index: 10;
background: white;
border-radius: 50%;
}
.delete-icon:active {
color: #ee0a24;
}
</style>
<!--<wxs module="m1" lang="babel">-->
<!--const getTime = (time) => {-->
......@@ -94,10 +124,39 @@
<van-tab title="试剂耗材"></van-tab>
<van-tab title="实验动物"></van-tab>
</van-tabs>
<div v-if="(platform === 'ckzv' || platform === 'ckzvSydw') && (roleNum === 'JS0010' || roleNum === 'JS0011' || roleNum === 'JS0012' || roleNum === 'JS0013')">
<div class="project-source-container">
<van-field
readonly
clickable
:value="projectSources"
label="报销主体"
placeholder="点击选择报销主体"
@click="showPicker = true"
custom-class="project-source-field"
/>
<van-icon
v-if="projectSources"
name="cross"
class="delete-icon"
@click="clearProjectSource"
/>
</div>
<van-action-sheet
show="{{ showPicker }}"
title="选择报销主体"
bind:close="onClose"
bind:select="onSelect"
actions="{{ columns }}"
/>
</div>
<van-empty v-if="orderList.length === 0" description="暂无待审批订单" />
<div @tap="item_click(item)" v-for="(item,index) in orderList" class="item">
{{ item.orderSn }}
<div v-if="platform === 'ckzv' || platform === 'ckzvSydw'">
<van-tag plain type="primary">{{ item.omsOrderApproveItemVoList[0].projectSources || '' }}</van-tag>
</div>
</div>
</div>
</div>
......@@ -139,7 +198,14 @@ wepy.page({
activeTab: 0,
activeTitle: '试剂耗材',
platform: '',
requestTask: null
roleNum: '',
requestTask: null,
projectSources: '',
showPicker: false,
columns: [
{ name: '阜外华中心血管病医院' },
{ name: '河南心血管病中心(国家心血管病中心华中 分中心)' }
]
},
computed: {},
methods: {
......@@ -227,7 +293,8 @@ wepy.page({
data: {
searchText: '',
startTime: '',
endTime: ''
endTime: '',
projectSources: this.projectSources
},
success: (res) => {
if (res.data.success) {
......@@ -276,7 +343,8 @@ wepy.page({
},
data: {
searchText: '',
roleNum: this.userInfo.roleNum
roleNum: this.userInfo.roleNum,
projectSources: this.projectSources
},
success: (res) => {
if (res.data.success) {
......@@ -318,6 +386,18 @@ wepy.page({
} else if (event.$wx.detail.title === '实验动物') {
this.getSydwList()
}
},
onSelect(event) {
this.projectSources = event.$wx.detail.name
this.showPicker = false
this.getList()
},
onClose() {
this.showPicker = false
},
clearProjectSource() {
this.projectSources = ''
this.getList()
}
},
onShow() {
......@@ -410,6 +490,7 @@ wepy.page({
let username = arrPara[1]
let plat = arrPara[3]
let requestURL = this.platformOptions.find(v => v.platformNum === plat).platformUrl
this.roleNum = role
this.platform = plat.replace('_test', '')
wx.setStorage({
key: 'requestURL',
......@@ -478,6 +559,7 @@ wepy.page({
success: (res) => {
this.userInfo = JSON.parse(res.data);
this.platform = this.userInfo.platform
this.roleNum = this.userInfo.角色编号
this.getList()
},
fail: function() {
......@@ -561,7 +643,9 @@ header: '~@/components/header',
"van-tabbar": "module:@vant/weapp/lib/tabbar/index",
"van-tabbar-item": "module:@vant/weapp/lib/tabbar-item/index",
"van-tabs": "module:@vant/weapp/lib/tabs/index",
"van-tab": "module:@vant/weapp/lib/tab/index"
"van-tab": "module:@vant/weapp/lib/tab/index",
"van-tag": "module:@vant/weapp/lib/tag/index",
"van-field": "module:@vant/weapp/lib/field/index"
}
}
</config>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment