qingyiay
2023-08-28 82a7eba143cc761b303b99889193f7aad2dc9d08
pages/customer-page/addTo-freightForwarder-driver/addTo-freightForwarder-driver.vue
@@ -2,15 +2,28 @@
   <!-- 添加货代或司机 -->
   <view class="addTo-freightForwarder-drvier">
      <view class="addForm">
         <u--form labelPosition="top" ref="form1">
            <u-form-item labelWidth="20%" label="姓名" ref="item1"><u--input v-model="name" :customStyle="{ border: '1px solid #dddddd' }"></u--input></u-form-item>
            <u-form-item labelWidth="25%" label="手机号" ref="item1"><u--input v-model="phone" :customStyle="{ border: '1px solid #dddddd' }"></u--input></u-form-item>
            <u-form-item labelWidth="25%" label="汽车车牌号" ref="item1" v-if="role == 2">
               <u--input v-model="carNo" :customStyle="{ border: '1px solid #dddddd' }"></u--input>
         <u--form labelPosition="top"
            ref="form1">
            <u-form-item labelWidth="20%"
               label="姓名"
               ref="item1"><u--input v-model="name"
                  :customStyle="{ border: '1px solid #dddddd' }"></u--input></u-form-item>
            <u-form-item labelWidth="25%"
               label="手机号"
               ref="item1"><u--input v-model="phone"
                  :customStyle="{ border: '1px solid #dddddd' }"></u--input></u-form-item>
            <u-form-item labelWidth="25%"
               label="汽车车牌号"
               ref="item1"
               v-if="role == 2">
               <u--input v-model="carNo"
                  :customStyle="{ border: '1px solid #dddddd' }"></u--input>
            </u-form-item>
         </u--form>
      </view>
      <view class="addBtn"><u-button text="邀请" type="primary" @click="addToHuoDaiOrDriver"></u-button></view>
      <view class="addBtn"><u-button text="邀请"
            type="primary"
            @click="addToHuoDaiOrDriver"></u-button></view>
   </view>
</template>
@@ -82,7 +95,8 @@
      },
      // 邀请司机
      bindUserFleet() {
         this.$reqPost('bindUserFleet', { fleetId: this.fleetId, name: this.name, phone: this.phone, carNo: this.carNo }, 'params').then(res => {
            this.$reqPost('bindUserFleet', { fleetId: this.fleetId, name: this.name, phone: this.phone, carNo: this
                  .carNo }, 'params').then(res => {
            console.log('邀请司机', res);
            if (res.code == 0) {
               this.$u.toast(res.msg ? res.msg : '操作成功');
@@ -95,7 +109,6 @@
            } else {
               uni.showToast({
                  title: res.msg ? res.msg : '操作失败',
                  icon: 'null',
                  duration: 2000
               });
            }
@@ -105,13 +118,16 @@
};
</script>
<style lang="scss" scoped>
<style lang="scss"
   scoped>
::v-deep.addTo-freightForwarder-drvier {
   width: 90%;
   margin: 0 auto;
   .addForm {
      margin: 0 auto;
   }
   .addBtn {
      width: 90%;
      position: fixed;