混凝土运输管理微信小程序、替班
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

114 lines
2.6 KiB

1 week ago
  1. <template>
  2. <view class="content">
  3. <view class="mt20">
  4. <view class="re-card-p32">
  5. <view class="flex-sb">
  6. <view class="re-from-label">写在前面</view>
  7. </view>
  8. <view class="re-card-context">
  9. 您添加的员工账号将允许登陆管理订单管理设备请谨慎确认后添加
  10. </view>
  11. </view>
  12. <view class="re-card-p32">
  13. <view class="re-from-line">
  14. <view class="re-from-label">员工姓名</view>
  15. <view class="b-relative">
  16. <input v-model="form.name" maxlength="8" class="re-from-input" placeholder="请填写真实姓名" />
  17. <image class="re-from-icon" src="/static/icons/icon01.png"></image>
  18. </view>
  19. </view>
  20. <view class="re-from-line">
  21. <view class="re-from-label">员工号码</view>
  22. <view class="b-relative">
  23. <input v-model="form.mobile" type="number" maxlength="11" class="re-from-input" placeholder="用于接验证码登陆" />
  24. <image class="re-from-icon" src="/static/icons/icon02.png"></image>
  25. </view>
  26. </view>
  27. </view>
  28. <view class="b-fiexd re-end-pand">
  29. <button @click="submit">提交审核</button>
  30. </view>
  31. </view>
  32. </view>
  33. </template>
  34. <script>
  35. export default {
  36. data() {
  37. return {
  38. show: false,
  39. form: {
  40. name: "",
  41. mobile:"",
  42. }
  43. }
  44. },
  45. onLoad() {
  46. },
  47. methods: {
  48. submit(){
  49. if(!this.form.name){
  50. uni.showToast({ icon: "none", title: "请填写姓名" })
  51. return
  52. }
  53. if(!this.form.mobile){
  54. uni.showToast({ icon: "none", title: "请填写手机" })
  55. return
  56. }
  57. this.doSubmit()
  58. },
  59. doSubmit(){
  60. uni.showLoading({})
  61. this.form.id = this.$utils.generateUUID()
  62. this.form.status = 1
  63. this.form.area = uni.getStorageSync("area")
  64. this.form.enter_id = uni.getStorageSync("enter_id")
  65. this.$httpPost("/api/emp/push", this.form, (res) => {
  66. console.log('[/emp/push]', res);
  67. if(res.data || res.data == 1){
  68. uni.hideLoading({})
  69. uni.showToast({ icon: "none", title: "数据已提交" })
  70. setTimeout(()=>{
  71. uni.navigateBack({ delta: 1 })
  72. }, 1500)
  73. }
  74. })
  75. }
  76. }
  77. }
  78. </script>
  79. <style>
  80. page {
  81. background-color: #F5F5F5;
  82. }
  83. /deep/ uni-radio .uni-radio-input{
  84. background-color: #F40000 !important;
  85. border-color: #F40000 !important;
  86. }
  87. /deep/ uni-radio .uni-radio-input:empty{
  88. background-color: #ffffff !important;
  89. border-color: #888888 !important;
  90. }
  91. .b-fiexd{
  92. min-height: 88rpx;
  93. width: calc(100vw);
  94. padding: 30rpx 0;
  95. position: fixed;
  96. left: 0;
  97. bottom: 0;
  98. box-shadow: -20rpx 10rpx 10rpx #000;
  99. background-color: #ffffff;
  100. }
  101. </style>