yujialong 1 year ago
parent c75afe4844
commit 7aa59bf42d
  1. 4
      config/request.js
  2. 29
      order/editCourse/editCourse.vue
  3. 30
      pages/clientDetail/clientDetail.vue

@ -5,9 +5,9 @@
*/ */
export default { export default {
// baseURL: 'https://huorantech.cn/', baseURL: 'https://huorantech.cn/',
// baseURL: 'http://192.168.31.151:9000/', // baseURL: 'http://192.168.31.151:9000/',
baseURL: 'http://121.37.12.51/', // baseURL: 'http://121.37.12.51/',
headers: { headers: {
'Content-Type': 'application/json;charset=UTF-8' 'Content-Type': 'application/json;charset=UTF-8'
}, },

@ -20,7 +20,10 @@
</view> </view>
<view :class="['line', {err: err === 'periodOfUse' + item.dataOrCourseId + item.authority}]"> <view :class="['line', {err: err === 'periodOfUse' + item.dataOrCourseId + item.authority}]">
<view class="name">使用期限</view> <view class="name">使用期限</view>
<input class="period" type="number" v-model="item.periodOfUse" placeholder="请输入" :disabled="isEdit" @input="calcDate(item, !item.authority)" @change="handleErr(item, 'periodOfUse')"> <view class="period-wrap">
<input class="period" type="number" v-model="item.periodOfUse" placeholder="请输入" :disabled="isEdit" @input="calcDate(item, !item.authority)" @change="handleErr(item, 'periodOfUse')">
<uni-icons class="edit" type="compose" size="20" color="#b3b3b3"></uni-icons>
</view>
<view v-if="isEdit">{{ units.find(e => e.id === item.options).text }}</view> <view v-if="isEdit">{{ units.find(e => e.id === item.options).text }}</view>
<view v-else class="val unit" @click="selectUnit(item)"> <view v-else class="val unit" @click="selectUnit(item)">
<text>{{ units.find(e => e.id === item.options).text }}</text> <text>{{ units.find(e => e.id === item.options).text }}</text>
@ -30,11 +33,14 @@
<view :class="['line req', {err: err === 'startTime' + item.dataOrCourseId + item.authority}]"> <view :class="['line req', {err: err === 'startTime' + item.dataOrCourseId + item.authority}]">
<view class="name">起止日期</view> <view class="name">起止日期</view>
<view v-if="isEdit">{{ item.endTime ? item.startTime + ' - ' + item.endTime : item.startTime}}</view> <view v-if="isEdit">{{ item.endTime ? item.startTime + ' - ' + item.endTime : item.startTime}}</view>
<uni-datetime-picker v-else type="date" v-model="item.startTime" :border="false" @change="calcDate(item)"> <view v-else class="val unit">
<view :class="['ph', {val: item.startTime}]"> <uni-datetime-picker type="date" v-model="item.startTime" :border="false" @change="calcDate(item)">
{{ item.endTime ? item.startTime + ' - ' + item.endTime : item.startTime}} <view :class="['ph', {val: item.startTime}]">
</view> {{ item.endTime ? item.startTime + ' - ' + item.endTime : item.startTime}}
</uni-datetime-picker> </view>
</uni-datetime-picker>
<image class="icon" src="@/static/image/arrow-down.png" mode="widthFix"></image>
</view>
</view> </view>
<view :class="['line req', {err: err === 'accountNum' + item.dataOrCourseId + item.authority}]"> <view :class="['line req', {err: err === 'accountNum' + item.dataOrCourseId + item.authority}]">
<view class="name">数量</view> <view class="name">数量</view>
@ -50,6 +56,7 @@
<view class="inline"> <view class="inline">
<input type="number" v-model="item.settlementPrice" placeholder="请输入" @change="handleErr(item, 'settlementPrice')"> <input type="number" v-model="item.settlementPrice" placeholder="请输入" @change="handleErr(item, 'settlementPrice')">
<uni-icons class="edit" type="compose" size="20" color="#b3b3b3"></uni-icons>
</view> </view>
</view> </view>
<view class="line"> <view class="line">
@ -65,6 +72,7 @@
<view class="inline"> <view class="inline">
<input type="number" v-model="item.finalPrice" placeholder="请输入" :disabled="isEdit && !item.authority" @input="calcFinalValue(item)" @change="handleErr(item, 'finalPrice')"> <input type="number" v-model="item.finalPrice" placeholder="请输入" :disabled="isEdit && !item.authority" @input="calcFinalValue(item)" @change="handleErr(item, 'finalPrice')">
<uni-icons class="edit" type="compose" size="20" color="#b3b3b3"></uni-icons>
</view> </view>
</view> </view>
</view> </view>
@ -436,7 +444,13 @@
.form-list { .form-list {
padding: 0 24rpx; padding: 0 24rpx;
border-top: 0; border-top: 0;
.period-wrap {
display: inline-flex;
align-items: center;
}
.period { .period {
flex: none;
width: 100rpx;
text-align: center; text-align: center;
} }
.unit { .unit {
@ -447,5 +461,8 @@
margin-left: 20rpx; margin-left: 20rpx;
} }
} }
.edit {
margin-left: 10rpx;
}
} }
</style> </style>

@ -37,27 +37,42 @@
<view :class="['line req', {err: err === 'name'}]"> <view :class="['line req', {err: err === 'name'}]">
<view class="name">联系人姓名</view> <view class="name">联系人姓名</view>
<view v-if="isDetail" class="val">{{ form.name }}</view> <view v-if="isDetail" class="val">{{ form.name }}</view>
<input v-else type="text" placeholder="请输入" v-model="form.name" @change="handleErr('name')"> <template v-else>
<input type="text" placeholder="请输入" v-model="form.name" @change="handleErr('name')">
<uni-icons class="edit" type="compose" size="20" color="#b3b3b3"></uni-icons>
</template>
</view> </view>
<view :class="['line req', {err: err === 'phone'}]"> <view :class="['line req', {err: err === 'phone'}]">
<view class="name">手机</view> <view class="name">手机</view>
<view v-if="isDetail" class="val">{{ form.phone }}</view> <view v-if="isDetail" class="val">{{ form.phone }}</view>
<input v-else type="number" maxlength="11" placeholder="请输入" v-model="form.phone" @change="handleErr('phone')"> <template v-else>
<input type="number" maxlength="11" placeholder="请输入" v-model="form.phone" @change="handleErr('phone')">
<uni-icons class="edit" type="compose" size="20" color="#b3b3b3"></uni-icons>
</template>
</view> </view>
<view :class="['line req', {err: err === 'account'}]"> <view :class="['line req', {err: err === 'account'}]">
<view class="name">账号</view> <view class="name">账号</view>
<view v-if="isDetail" class="val">{{ form.account }}</view> <view v-if="isDetail" class="val">{{ form.account }}</view>
<input v-else type="text" placeholder="请以院校首字母+admin的格式来设置" v-model="form.account" @change="handleErr('account')"> <template v-else>
<input type="text" placeholder="请以院校首字母+admin的格式来设置" v-model="form.account" @change="handleErr('account')">
<uni-icons class="edit" type="compose" size="20" color="#b3b3b3"></uni-icons>
</template>
</view> </view>
<view class="line"> <view class="line">
<view class="name">职务</view> <view class="name">职务</view>
<view v-if="isDetail" class="val">{{ form.position }}</view> <view v-if="isDetail" class="val">{{ form.position }}</view>
<input v-else type="text" placeholder="请输入" v-model="form.position"> <template v-else>
<input type="text" placeholder="请输入" v-model="form.position">
<uni-icons class="edit" type="compose" size="20" color="#b3b3b3"></uni-icons>
</template>
</view> </view>
<view class="line"> <view class="line">
<view class="name">邮箱</view> <view class="name">邮箱</view>
<view v-if="isDetail" class="val">{{ form.email }}</view> <view v-if="isDetail" class="val">{{ form.email }}</view>
<input v-else type="text" placeholder="请输入" v-model="form.email"> <template v-else>
<input type="text" placeholder="请输入" v-model="form.email">
<uni-icons class="edit" type="compose" size="20" color="#b3b3b3"></uni-icons>
</template>
</view> </view>
<view v-if="customerId" class="line"> <view v-if="customerId" class="line">
<view class="name">产品到期时间</view> <view class="name">产品到期时间</view>
@ -355,6 +370,11 @@
margin-right: 10rpx; margin-right: 10rpx;
} }
} }
.form-list {
.edit {
margin-left: 10rpx;
}
}
.editIcon { .editIcon {
width: 50rpx; width: 50rpx;
height: 50rpx; height: 50rpx;

Loading…
Cancel
Save