123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339 |
- <template>
- <view class="container qualifications" :style="{ paddingBottom: isIphoneX ? '68rpx' : '0' }">
- <view class="remarks-content">
- <template v-if="handleType === '1'">
- <view class="list-view-title">
- <view class="list-view-h1">机构名称:<text class="none">蔡欣欣夕是大街上的按键上的</text></view>
- </view>
- <view class="list-view-title">
- <view class="list-view-h1">联系人:<text class="none">欧特是</text></view>
- </view>
- </template>
- <template v-else>
- <view class="list-view-title">
- <view class="list-view-h1">咨询人:<text class="none">阿萨德对方水电费</text></view>
- </view>
- </template>
- <view class="list-view-title"> <view class="list-view-h1">报备商品:</view> </view>
- <view class="tui-remarks-content">
- <view class="tui-remarks-goods-input" v-if="handleGoods.length === 0" @click="handleShowGoodPopup">
- <view class="input-add"> <text class="iconfont icon-jiahao"></text> </view>
- <view class="input-text"> 点击添加客户咨询的商品 </view>
- </view>
- <view class="tui-remarks-showgoods" v-else>
- <view class="tui-remarks-goods" v-for="(pros, index) in handleGoods" :key="index">
- <view class="goods-image"> <image :src="pros.images" mode=""></image> </view>
- <view class="goods-main">
- <view class="name"> {{ pros.name }} </view>
- <view class="shop"> 供应商:{{ pros.shopName }} </view>
- </view>
- </view>
- <view class="tui-remarks-btn">
- <view class="btn delete" @click="handleClean">删除</view>
- <view class="btn update" @click="handleShowGoodPopup">更换</view>
- </view>
- </view>
- </view>
- <view class="list-view-title">
- <view class="list-view-h1"><text>*</text>报备事由:</view>
- </view>
- <view class="remarks-textarea">
- <textarea
- class="textarea"
- v-model="remarksParams.extra"
- value=""
- placeholder="请输入其他需要说明的内容"
- maxlength="200"
- @input="conInput"
- />
- <text class="limit-text">{{ min }}/{{ max }}</text>
- </view>
- </view>
- <!-- 商品列表弹窗 -->
- <cm-goodspopup
- ref="cmgoodspopup"
- v-if="isGoodspopup"
- :show="isGoodspopup"
- @handleChoiceaGoods="handleChoiceaGoodsData"
- >
- </cm-goodspopup>
- </view>
- </template>
- <script>
- import { mapState, mapMutations } from 'vuex'
- import authorize from '@/common/config/authorize.js'
- import cmGoodspopup from '@/components/cm-module/cm-seller/cm-goods-popup'
- export default {
- components: {
- cmGoodspopup
- },
- data() {
- return {
- isIphoneX: this.$store.state.isIphoneX,
- min: 0,
- max: 200,
- isGoodspopup: false,
- handleGoods: [],
- handleType:'',// 1 机构添加报备 2 未注册客户添加报备
- remarksParams: {},
- remarksId: 0
- }
- },
- onLoad(option) {
- console.log(option)
- this.remarksId = option.remarksId
- this.handleType = option.type
- this.getUserRemarksVisitDetail()
- },
- methods: {
- ...mapMutations(['login']),
- getUserRemarksVisitDetail() {
- //资料详情
- this.UserService.getUserRemarksVisitDetail({
- remarksId: this.remarksId
- })
- .then(response => {
- this.remarksParams = response.data
- })
- .catch(error => {
- this.$util.msg(error.msg, 2000)
- })
- },
- handleShowGoodPopup() {
- // 显示添加商品弹窗
- this.isGoodspopup = true
- },
- handleClean(){//删除选择的商品
- this.handleGoods = []
- },
- handleChoiceaGoodsData(data) {
- console.log('data', data)
- this.handleGoods = []
- this.handleGoods.push(data)
- },
- conInput(e) {
- //备注文字字数限制
- let value = e.detail.value
- let len = parseInt(value.length)
- if (len > this.max) return
- this.min = len
- if (this.min == 200) {
- this.$util.msg('您输入的字数已达上限', 2000)
- }
- }
- },
- onShow() {}
- }
- </script>
- <style lang="scss">
- page {
- height: auto;
- background: #ffffff;
- }
- .remarks-content {
- width: 100%;
- height: auto;
- box-sizing: border-box;
- padding: 0 24rpx;
- padding-bottom: 80rpx;
- .list-view-title {
- width: 100%;
- height: auto;
- margin-bottom: 16rpx;
- margin-top: 40rpx;
- .list-view-h1 {
- line-height: 40rpx;
- font-size: $font-size-30;
- color: #333333;
- text-align: left;
- font-weight: bold;
- text {
- color: #ff2a2a;
- &.none{
- color: #999999;
- font-weight: normal;
- }
- }
- }
- }
- .remarks-textarea {
- width: 100%;
- height: 226rpx;
- padding: 16rpx;
- margin: 20rpx 0 0 0;
- border-radius: 6rpx;
- position: relative;
- border: 1px solid #b2b2b2;
- box-sizing: border-box;
- .textarea {
- width: 100%;
- height: 100%;
- line-height: 36rpx;
- font-size: $font-size-26;
- color: $text-color;
- z-index: 1;
- }
- .limit-text {
- position: absolute;
- right: 20rpx;
- bottom: 16rpx;
- line-height: 44rpx;
- font-size: $font-size-24;
- color: #b2b2b2;
- }
- }
- .tui-remarks-content {
- width: 100%;
- height: auto;
- margin-bottom: 24rpx;
- .tui-remarks-goods-input {
- width: 100%;
- height: 180rpx;
- box-sizing: border-box;
- background-color: #f7f7f7;
- padding: 26rpx;
- border-radius: 6rpx;
- .input-add {
- width: 128rpx;
- height: 128rpx;
- line-height: 128rpx;
- float: left;
- text-align: center;
- box-sizing: border-box;
- border: 1px dashed #b2b2b2;
- border-radius: 6rpx;
- .iconfont {
- font-size: 44rpx;
- color: #b2b2b2;
- }
- }
- .input-text {
- height: 128rpx;
- box-sizing: border-box;
- padding: 0 32rpx;
- line-height: 128rpx;
- text-align: left;
- font-size: 26rpx;
- color: #b2b2b2;
- float: left;
- }
- }
- .tui-remarks-showgoods {
- width: 100%;
- height: 180rpx;
- box-sizing: border-box;
- .tui-remarks-btn {
- width: 90rpx;
- height: 180rpx;
- float: right;
- .btn {
- width: 100%;
- height: 90rpx;
- float: left;
- line-height: 90rpx;
- text-align: center;
- font-size: 26rpx;
- &.delete {
- color: #f94b4b;
- }
- &.update {
- color: #1890f9;
- }
- }
- }
- .tui-remarks-goods {
- width: 612rpx;
- height: 180rpx;
- box-sizing: border-box;
- background-color: #f7f7f7;
- padding: 26rpx;
- border-radius: 6rpx;
- float: left;
- .goods-image {
- width: 128rpx;
- height: 128rpx;
- float: left;
- image {
- width: 128rpx;
- height: 128rpx;
- display: block;
- border-radius: 4rpx;
- }
- }
- .goods-main {
- width: 432rpx;
- height: 128rpx;
- box-sizing: border-box;
- padding-left: 32rpx;
- float: right;
- .name {
- width: 100%;
- height: 60rpx;
- box-sizing: border-box;
- line-height: 60rpx;
- color: #333333;
- text-overflow: ellipsis;
- overflow: hidden;
- display: -webkit-box;
- -webkit-line-clamp: 1;
- line-clamp: 1;
- -webkit-box-orient: vertical;
- font-size: 26rpx;
- }
- .shop {
- line-height: 60rpx;
- color: #999999;
- font-size: 26rpx;
- text-overflow: ellipsis;
- overflow: hidden;
- display: -webkit-box;
- -webkit-line-clamp: 1;
- line-clamp: 1;
- -webkit-box-orient: vertical;
- }
- }
- }
- }
- }
- .list-view {
- width: 100%;
- height: auto;
- margin-top: 20rpx;
- .list-view-text {
- width: 100%;
- float: left;
- .input {
- width: 500rpx;
- height: 50rpx;
- box-sizing: border-box;
- line-height: 50rpx;
- color: #333333;
- text-overflow: ellipsis;
- overflow: hidden;
- display: -webkit-box;
- -webkit-line-clamp: 1;
- line-clamp: 1;
- -webkit-box-orient: vertical;
- float: left;
- font-size: 26rpx;
- }
- .delbtn {
- width: 96rpx;
- height: 44rpx;
- border-radius: 8rpx;
- font-size: $font-size-24;
- color: #e15616;
- line-height: 44rpx;
- text-align: center;
- float: left;
- &.down {
- color: #1890f9;
- }
- }
- }
- }
- }
- </style>
|