| | |
| | | </view> |
| | | <view class="addBtn"><u-button text="邀请" |
| | | type="primary" |
| | | @click="addToHuoDaiOrDriver"></u-button></view> |
| | | @click="addToHuoDaiOrDriver" |
| | | :loading="loading"></u-button></view> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import { customerId } from '@/utils/status.js'; |
| | | import { mapMutations } from 'vuex'; |
| | | export default { |
| | | onLoad(params) { |
| | | this.role = params.role; |
| | |
| | | name: '', |
| | | phone: '', |
| | | carNo: '', |
| | | customerId |
| | | customerId, |
| | | loading: false |
| | | }; |
| | | }, |
| | | methods: { |
| | | ...mapMutations(['lengthchange']), |
| | | init() {}, |
| | | addToHuoDaiOrDriver() { |
| | | switch (this.role) { |
| | |
| | | }, |
| | | // 邀请货代 |
| | | bindHuoDai() { |
| | | // this.$reqPost('bindHuoDai', { customerId: this.customerId, name: this.name, phone: this.phone }, 'params').then(res => { |
| | | this.loading = true |
| | | this.$reqPost('bindHuoDai', { name: this.name, phone: this.phone }, 'params').then(res => { |
| | | this.loading = false |
| | | if (res.code == 0) { |
| | | this.$u.toast('添加成功'); |
| | | setTimeout(() => { |
| | |
| | | } else { |
| | | this.$u.toast(res.msg ? res.msg : '未成功添加'); |
| | | } |
| | | }); |
| | | }).catch(e => { |
| | | this.loading = false |
| | | }) |
| | | }, |
| | | // 邀请司机 |
| | | bindUserFleet() { |
| | | this.$reqPost('bindUserFleet', { fleetId: this.fleetId, name: this.name, phone: this.phone, carNo: this |
| | | .carNo }, 'params').then(res => { |
| | | this.loading = true |
| | | this.$reqPost('bindUserFleet', { |
| | | fleetId: this.fleetId, |
| | | name: this.name, |
| | | phone: this.phone, |
| | | carNo: this |
| | | .carNo |
| | | }, 'params').then(res => { |
| | | console.log('邀请司机', res); |
| | | this.loading = false |
| | | if (res.code == 0) { |
| | | this.$u.toast(res.msg ? res.msg : '操作成功'); |
| | | this.$reqGet('GetUserFleet', { fleetId: this.fleetId }).then(response => { |
| | | this.lengthchange(response.data.length); |
| | | }); |
| | | setTimeout(() => { |
| | | uni.navigateBack({ |
| | | delta: 1 |
| | | }); |
| | | }, 1000) |
| | | } else { |
| | | uni.showToast({ |
| | | title: res.msg ? res.msg : '操作失败', |
| | | duration: 2000 |
| | | }); |
| | | } |
| | | }); |
| | | }).catch(e => { |
| | | this.loading = false |
| | | }) |
| | | } |
| | | } |
| | | }; |
| | |
| | | type="primary" |
| | | @click="userManage" |
| | | v-if="roleType == 1 && userEntity.isHostUser === '0'"></u-button></view> |
| | | <view class="logout"><u-button text="修改密码" |
| | | <!-- <view class="logout"><u-button text="修改密码" |
| | | type="primary" |
| | | @click="modifyPwd"></u-button></view> |
| | | <view class="logout"><u-button text="重置密码" |
| | | type="primary" |
| | | @click="initPwd"></u-button></view> |
| | | @click="initPwd"></u-button></view> --> |
| | | <view class="logout"><u-button text="退出登录" |
| | | type="primary" |
| | | @click="logout()"></u-button></view> |
| | |
| | | @cancel="logoutCancel"></u-modal> |
| | | </view> |
| | | <!-- 重置密码弹出框 --> |
| | | <view class="initPwdModal"> |
| | | <!-- <view class="initPwdModal"> |
| | | <u-modal :show="initPwdShow" |
| | | title="重置密码" |
| | | showCancelButton |
| | | content="初始密码将变更为123456,是否确认重置" |
| | | @confirm="initPwdConfirm" |
| | | @cancel="initPwdCancel"></u-modal> |
| | | </view> |
| | | </view> --> |
| | | <!-- 修改密码弹出框 --> |
| | | <view class="modifyPwdModal"> |
| | | <!-- <view class="modifyPwdModal"> |
| | | <u-modal :show="modifyPwdShow" |
| | | title="修改密码" |
| | | showCancelButton |
| | |
| | | type="password"></u-input> |
| | | </view> |
| | | </u-modal> |
| | | </view> |
| | | </view> --> |
| | | </view> |
| | | </template> |
| | | |
| | |
| | | margin-left: vww(20); |
| | | padding-bottom: vww(12); |
| | | position: relative; |
| | | @include flex flex-direction: column; |
| | | @include flex; |
| | | flex-direction: column; |
| | | align-items: flex-start; |
| | | |
| | | .first-line { |
| | |
| | | color: #ffffff; |
| | | margin-right: vww(20); |
| | | } |
| | | |
| | | .filedname { |
| | | white-space: nowrap; |
| | | overflow: hidden; |
| | | text-overflow: ellipsis; |
| | | flex: 1; |
| | | } |
| | | } |
| | | |
| | | .main-divider { |
| | |
| | | .first-extra { |
| | | @include firstLine; |
| | | height: vww(32); |
| | | align-items: center; |
| | | |
| | | .main-information { |
| | | width: 100%; |
| | |
| | | height: vww(28); |
| | | line-height: vww(28); |
| | | text-align: center; |
| | | // display: flex; |
| | | // justify-content: center; |
| | | // align-items: center; |
| | | background: url('https://mx.jzeg.cn:9095/appimg/image/banner/redblock.png') no-repeat; |
| | | background-size: contain; |
| | | font-size: 30rpx; |
| | |
| | | color: #ffffff; |
| | | margin-right: vww(20); |
| | | } |
| | | |
| | | .filedname { |
| | | white-space: nowrap; |
| | | overflow: hidden; |
| | | text-overflow: ellipsis; |
| | | flex: 1; |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | <view class="groupCars" |
| | | v-if="groupCarsShow"> |
| | | <u-collapse @change="change" |
| | | @close="close" |
| | | @open="open" |
| | | :border="false" |
| | | :value="['0']"> |
| | | :value="['0']" |
| | | ref="collapse"> |
| | | <u-empty mode="data" |
| | | icon="http://cdn.uviewui.com/uview/empty/data.png" |
| | | v-if="fleetDriverData.length == 0" |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { mapState } from 'vuex'; |
| | | export default { |
| | | computed: { |
| | | ...mapState(['fleetDriverDataLength']) |
| | | }, |
| | | watch: { |
| | | fleetDriverDataLength(v) { |
| | | if (this.fleetDriverData.length !== v) { |
| | | this.GetUserFleet(); |
| | | } |
| | | } |
| | | }, |
| | | onLoad(params) { |
| | | this.deleteDriveObj.fleetId = params.id; |
| | | }, |
| | |
| | | this.$reqGet('GetUserFleet', { fleetId: this.deleteDriveObj.fleetId }).then(res => { |
| | | uni.hideLoading(); |
| | | this.fleetDriverData = res.data; |
| | | this.$nextTick(() => { |
| | | this.$refs.collapse.init() |
| | | }) |
| | | }); |
| | | }, |
| | | change() {}, |
| | | close() {}, |
| | | open() {}, |
| | | deleteGroupClick(args) { |
| | | this.deleteDriveObj.id = args.name; |
| | | this.fleetDriverData.forEach(item => { |
| | |
| | | this.isSkinWeigh = false; |
| | | this.outBuy = true; |
| | | this.temporaryWeighObj.hair = newV; |
| | | this.temporaryWeighObj.clean = (this.temporaryWeighObj.hair - this.weighList.skin).toFixed( |
| | | 2); |
| | | let x = new BigNumber(this.temporaryWeighObj.hair) |
| | | let y = new BigNumber(this.weighList.skin) |
| | | this.temporaryWeighObj.clean = x.minus(y).toNumber().toFixed(2) |
| | | // this.temporaryWeighObj.clean = (this.temporaryWeighObj.hair - this.weighList.skin).toFixed( |
| | | // 2); |
| | | this.isweigh = this.temporaryWeighObj.clean > this.weighList.orderSurplus || this |
| | | .temporaryWeighObj |
| | | .clean < 0; |
| | |
| | | let yy = new BigNumber(newV) |
| | | this.errorTipShow = (xx.minus(yy).toNumber() <= -0.2 || xx.minus(yy).toNumber() >= 0.2) && |
| | | this.avgSkin !== 0; |
| | | this.temporaryWeighObj.clean = (this.weighList.hair - this.temporaryWeighObj.skin).toFixed( |
| | | 2); |
| | | let x = new BigNumber(this.weighList.hair) |
| | | let y = new BigNumber(this.temporaryWeighObj.skin) |
| | | this.temporaryWeighObj.clean = x.minus(y).toNumber().toFixed(2) |
| | | // this.temporaryWeighObj.clean = (this.weighList.hair - this.temporaryWeighObj.skin).toFixed( |
| | | // 2); |
| | | this.isweigh = this.temporaryWeighObj.clean > this.weighList.orderSurplus || this |
| | | .temporaryWeighObj |
| | | .clean < 0; |
| | |
| | | |
| | | <!-- <view class="statistics"><u-button text="发运统计" type="primary" @click="statistics"></u-button></view> --> |
| | | <view class="utils-button"> |
| | | <view class="utils"><u-button text="修改密码" |
| | | <!-- <view class="utils"><u-button text="修改密码" |
| | | type="primary" |
| | | @click="modifyPwd"></u-button></view> |
| | | <view class="utils"><u-button text="重置密码" |
| | | type="primary" |
| | | @click="initPwd"></u-button></view> |
| | | @click="initPwd"></u-button></view> --> |
| | | <view class="utils"><u-button text="退出登录" |
| | | type="primary" |
| | | @click="logout"></u-button></view> |
| | |
| | | @cancel="logoutCancel"></u-modal> |
| | | </view> |
| | | <!-- 重置密码弹出框 --> |
| | | <view class="initPwdModal"> |
| | | <!-- <view class="initPwdModal"> |
| | | <u-modal :show="initPwdShow" |
| | | title="重置密码" |
| | | showCancelButton |
| | | content="初始密码将变更为123456,是否确认重置" |
| | | @confirm="initPwdConfirm" |
| | | @cancel="initPwdCancel"></u-modal> |
| | | </view> |
| | | </view> --> |
| | | <!-- 修改密码弹出框 --> |
| | | <view class="modifyPwdModal"> |
| | | <!-- <view class="modifyPwdModal"> |
| | | <u-modal :show="modifyPwdShow" |
| | | title="修改密码" |
| | | showCancelButton |
| | |
| | | type="password"></u-input> |
| | | </view> |
| | | </u-modal> |
| | | </view> |
| | | </view> --> |
| | | </view> |
| | | </template> |
| | | |
| | |
| | | label="密码" |
| | | required |
| | | borderBottom> |
| | | <u--input v-model="modelForm.password" |
| | | <u-input v-if='inputType==="password"' |
| | | v-model="modelForm.password" |
| | | border="surround" |
| | | placeholder="请输入密码" |
| | | type='password'></u--input> |
| | | placeholder="请输入密码(仅支持数字字母下划线)" |
| | | :type='inputType' /> |
| | | <u-input v-else |
| | | v-model="modelForm.password" |
| | | border="surround" |
| | | placeholder="请输入密码(仅支持数字字母下划线)" |
| | | :type='inputType' /> |
| | | </u-form-item> |
| | | <u-form-item prop="secondPassword" |
| | | label="二次确认" |
| | | required |
| | | borderBottom> |
| | | <u--input v-model="modelForm.secondPassword" |
| | | <u-input v-if='inputType==="password"' |
| | | v-model="modelForm.secondPassword" |
| | | border="surround" |
| | | placeholder="请再次输入密码" |
| | | type='password'></u--input> |
| | | placeholder="请再次输入密码(仅支持数字字母下划线)" |
| | | type='password' /> |
| | | <u-input v-else |
| | | v-model="modelForm.secondPassword" |
| | | border="surround" |
| | | placeholder="请再次输入密码(仅支持数字字母下划线)" |
| | | type='text' /> |
| | | </u-form-item> |
| | | <u-form-item> |
| | | <view class="process-button"> |
| | |
| | | :loading="processLoading" |
| | | @click.stop="process"></u-button> |
| | | </view> |
| | | </u-form-item> |
| | | <u-form-item prop="checkboxValue"> |
| | | <u-checkbox-group v-model="checkboxValue" |
| | | @change="checkChange"> |
| | | <u-checkbox label="显示密码" |
| | | name="显示" |
| | | iconSize="32" |
| | | label-size="32" |
| | | size="40" |
| | | shape="circle"> |
| | | </u-checkbox> |
| | | </u-checkbox-group> |
| | | </u-form-item> |
| | | </u-form> |
| | | </view> |
| | |
| | | data() { |
| | | return { |
| | | userInfo: {}, |
| | | checkboxValue: [], |
| | | inputType: 'password', |
| | | isFocus: false, |
| | | modelForm: { |
| | | password: '', |
| | | secondPassword: '' |
| | |
| | | this.$refs.uForm.setRules(this.rules) |
| | | }, |
| | | methods: { |
| | | checkChange(name) { |
| | | this.inputType = name.length === 0 ? 'password' : '' |
| | | this.isFocus = true |
| | | }, |
| | | process() { |
| | | if (this.modelForm.password !== this.modelForm.secondPassword) return uni.$u.toast('密码不一致,请检查') |
| | | this.userInfo.password = this.modelForm.secondPassword; |
| | |
| | | globalWarning: false, |
| | | }, |
| | | mutations: { |
| | | lengthchange(state, payload) { |
| | | state.fleetDriverDataLength = payload |
| | | }, |
| | | setUserInfo(state, identity) { |
| | | state.userInfo = userObj[identity] |
| | | }, |
| | |
| | | }; |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | <style lang="scss" |
| | | scoped> |
| | | @import "../../libs/css/components.scss"; |
| | | |
| | | .u-input { |