 <template>
     <div class="home_wrapper">
         <div class="header_main">
             零工登记
             <div class="return_btn" @click="onClickLeft"></div>
         </div>
       <van-form >
         <div class="list_main">
           <div class="titBox">
             <img src="../../assets/images/sunVillage_info/add_icon_3.png" style="width:22PX;height:22PX;margin-right: 10px;"/>
             <p class="tit">添加零工</p>
           </div>

           <van-field
             readonly
             clickable
             label="出工日期"
             placeholder="请选择"
             v-model="value"
             @click="showBuildTime = true"
             input-align="right"
             right-icon="arrow-down"
             label-width="auto"
             required
             :border="false"
             :rules="[{ required: true , message:'请选择出工日期' }]"
           />
           <van-popup v-model="showBuildTime" position="bottom">
             <van-datetime-picker
               type="date"
               title="选择年月日"
               :min-date="minDate"
               v-model="buildTime"
               @confirm="onConfirmBuildTime"
               @cancel="showBuildTime = false"
             />
           </van-popup>

           <van-field required :rules="[{ required: true, message: '请填写出工姓名' }]" v-model="value" label="出工姓名" placeholder="出工姓名" input-align="right" :border="false" />
           <van-field required :rules="[{ required: true, message: '请填写出工事由' }]" v-model="value" label="出工事由" placeholder="出工事由" input-align="right" :border="false" />
           <van-field required :rules="[{ required: true, message: '请填写记工员' }]" v-model="value" label="记工员" placeholder="记工员" input-align="right" :border="false" />
           <van-field required :rules="[{ required: true, message: '请填写出工数' }]" v-model="value" label="出工数" placeholder="出工数" input-align="right" :border="false" />
           <van-field required :rules="[{ required: true, message: '请填写工日值' }]" v-model="value" label="工日值" placeholder="工日值" input-align="right" :border="false" />
           <van-field required :rules="[{ required: true, message: '请填写金额（元）' }]" v-model="value" label="金额（元）" placeholder="金额（元）" input-align="right" :border="false" />
           <van-field v-model="value" label="备注" placeholder="备注" input-align="right" :border="false" />

         </div>

         <div style="margin: 16px auto;width: 50%;">
           <van-button round block type="primary" native-type="submit">
             保存
           </van-button>
         </div>
       </van-form>
     </div>
 </template>
 <script>
   import { addPermanent } from "@/api/sunVillage_info/fixedAssets";
   export default {
     name: "certificateList",
     data() {
       return {
         minDate:new Date(1900,1,1),

         showBuildTime:false,

         buildTime:new Date(),

         value:''
       };
     },
     created() {

     },
     methods: {
       onConfirmBuildTime(data){
         this.form.buildTime = this.format(data,'yyyy-MM-dd');
         this.showBuildTime = false;
       },
     },
   }
 </script>
 <style scoped lang="scss">
   /deep/ .van-button--primary{
     background: url("../../assets/images/sunVillage_info/btn_bg.png") no-repeat;
     background-size: 100% 100%;
     border: none;
   }
  .home_wrapper{
    background: #e9e9e9;
    min-height: 100vh;
    width: 100vw;
    .header_main {
        height: 116px;
        background: url('../../assets/images/sunVillage_info/list_head.png') no-repeat;
        background-size: 100% 100%;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        font-size: 36px;
        line-height: 116px;
        text-align: center;
        color: #fff;
        position: relative;

        .return_btn {
            width: 24px;
            height: 43.2px;
            background: url('../../assets/images/sunVillage_info/list_icon_5.png') center center no-repeat;
            background-size: 20px 36px;
            position: absolute;
            left: 38px;
            top: 36px;
        }

        .add_btn {
            width: 56.4px;
            height: 40.8px;
            background: url('../../assets/images/sunVillage_info/list_icon_9.png') center center no-repeat;
            background-size: 47px 34px;
            position: absolute;
            right: 38px;
            top: 36px;
        }
    }
    .list_main{
      padding:25px;
      background: #ffffff;
      width: 94%;
      margin: 25px auto 0;
      border-radius: 15PX;
      box-shadow: 4px 6px 5px rgba(63, 68, 75, 0.1);
    }
    .titBox{
      display: flex;
      align-items: center;
    }
    .tit{
      font-size: 36px;
      font-weight: bold;
    }
    /deep/ .van-cell{
      padding-left: 0!important;
      padding-right: 0!important;
      padding-bottom: 0!important;
    }
    /deep/ .van-field__label{
      padding-left: 10PX;
      width: 8.2em;
    }
    /deep/ .van-cell--required::before{
      left: 0;
    }

}







 </style>
