123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239 |
- <template>
- <view>
- <view class='wrap'>
- <view class="xinxi" v-if="detailData.expensesType == '2'" style="font-size: 28rpx; ">请款信息</view>
- <view class="xinxi" v-if="detailData.expensesType == '1'" style="font-size: 28rpx; ">收款信息</view>
- <view class="c-row">
- <view class="title">用途</view>
- <view class="con-list">
- <view>{{detailData.purpose}}</view>
- </view>
- </view>
- <view class="c-row" v-if="detailData.purpose == '库点费用'">
- <view class="title">仓库名称</view>
- <view class="con-list">
- <view>{{detailData.warehouseName}}</view>
- </view>
- </view>
- <view class="c-row" v-if="detailData.purpose == '合同费用'">
- <view class="title">合同编号</view>
- <view class="con-list">
- <view>{{detailData.contractNo}}</view>
- </view>
- </view>
- <view class="c-row">
- <view class="title">费用名称</view>
- <view class="con-list">
- <view>{{detailData.expenseName}}</view>
- </view>
- </view>
- <view class="c-row">
- <view class="title">金额(元)</view>
- <view class="con-list">
- <view>{{detailData.amountMoney}}</view>
- </view>
- </view>
- <view class="c-row">
- <view class="left">备注</view>
- </view>
- <view style='position:relative;' class="wrap no-boder">
- <u-input class='textarea' v-model="detailData.remark" :disabled="disabled" :type="type" :border="border"
- placeholder="选填,不超过150字" :height="height" :auto-height="autoHeight" maxlength="150" />
- <view style='position:absolute;right:10px;bottom:20px;color:#AFB3BF;'>
- {{detailData.remark?detailData.remark.length:"0"}}/150个字
- </view>
- </view>
- <view class="c-row">
- <view class="title">附件(选填)</view>
- </view>
- <view style="display: flex;flex-wrap: wrap;">
- <view v-for='(item,index) in imglist2' v-if="imglist2.length >0"
- style="position: relative;margin-left: 20rpx;">
- <image :src="item.appendixPath" mode="" style="width: 100px;height: 100px;"></image>
- </view>
- </view>
- </view>
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- disabled: false,
- detailData: {
- purpose: '',
- remark: "",
- warehouseName: '',
- expenseName: '',
- amountMoney: '',
- contractNo: '',
- expensesPurpose: ''
- },
- type: 'textarea',
- border: true,
- imglist: [], //存
- imglist2: [], //展示
- height: 150,
- autoHeight: true,
- }
- },
- onLoad(options) {
- this.id = options.id
- if (this.id) {
- this.disabled = true
- } else {
- return
- }
- this.getList()
- },
- watch: {
- imglist: {
- handler: function() {
- this.$api.doRequest('get', 'appendix/query/getFileList', {
- appendixIds: this.imglist.toString()
- }).then(res => {
- this.imglist2 = res.data.data
- console.log(res)
- })
- },
- deep: true
- }
- },
- methods: {
- calculate() {
- const query = uni.createSelectorQuery().in(this);
- query.selectAll('.left')
- console.log(query)
- },
- //获取信息
- getList() {
- this.$api.doRequest('get', '/expenseInfo/getInfo', {
- id: this.id,
- }).then(res => {
- if (res.data.code == 200) {
- this.detailData = res.data.data
- this.imglist= this.detailData.addressUrl.split(',')
- }
- })
- },
- },
- }
- </script>
- <style lang='scss' scoped>
- page {
- background: #F5F6FA;
- }
- .delete_img {
- position: absolute;
- z-index: 9999;
- left: 84px;
- color: #ffffff;
- font-size: 28rpx;
- border: 1px;
- border-radius: 5rpx;
- width: 32rpx;
- height: 32rpx;
- background-color: #ff0000;
- text-align: center;
- }
- .title_b {
- margin: 20rpx 20rpx 0rpx 20rpx;
- padding: 20rpx 10rpx 20rpx 10rpx;
- font-size: 18px;
- font-weight: 550;
- }
- .xinxi {
- padding: 20rpx 30rpx;
- }
- .c-row {
- display: -webkit-box;
- display: -webkit-flex;
- display: flex;
- -webkit-box-align: center;
- -webkit-align-items: center;
- align-items: center;
- padding: 20rpx 30rpx;
- position: relative;
- }
- .con-list {
- -webkit-box-flex: 1;
- flex: 1;
- display: flex;
- -webkit-box-orient: vertical;
- -webkit-box-direction: normal;
- flex-direction: column;
- color: #303133;
- line-height: 20px;
- text-align: right;
- padding-right: 10px;
- justify-content: space-between;
- }
- .wrap {
- padding-bottom: 10px;
- font-size: 14px;
- background: #fff;
- margin: 10px;
- border-radius: 10px;
- input {
- font-size: 14px;
- }
- >.title {
- padding: 10px 16px;
- }
- }
- .buns_item {
- display: flex;
- padding: 80rpx 0 50rpx 0;
- justify-content: space-around;
- }
- .but_css {
- background: #22C572;
- width: 40%;
- padding: 20rpx;
- color: #fff;
- text-align: center;
- border-radius: 20rpx;
- }
- /deep/.u-radio-group {
- flex-direction: row-reverse;
- }
- .no-boder {
- border: 0;
- }
- .textarea {
- background: #F9F9FA;
- border: 1px solid #EEEEEE;
- }
- .submit {
- width: 100%;
- background: #2c8ac5;
- border-radius: 10rpx;
- }
- .bottom-btn {
- padding: 30rpx;
- background: #FFFFFF;
- width: 100%;
- position: fixed;
- bottom: 0rpx;
- display: flex;
- z-index: 9999;
- }
- </style>
|