%PDF- %PDF-
Direktori : /home/ugotscom/kma/resources/js/components/Payments/ |
Current File : /home/ugotscom/kma/resources/js/components/Payments/addpayment.vue |
<template> <div class="page-content"> <div class="add_client_form"> <div class=""> <form action="" method="POST" @submit.prevent="addpayments()"> <div class="form-group"> <label for="">Select Company</label> <v-select :options="companies" v-model="company" :reduce="company => company.company_name" label="company_name" @input="setSelected()"></v-select> </div> <table class="table styled-table"> <thead> <tr> <th scope="col">Product</th> <th scope="col">Product Category</th> <th scope="col">Quantity</th> <th scope="col">Specs</th> <th scope="col">Reference</th> <th scope="col">Dispatch Quantity</th> </tr> </thead> <tbody> <tr v-for ="member in members" :key="member.id"> <td>{{pqrproduct.product}}</td> <td>{{pqrproduct.category}}</td> <td>{{pqrproduct.quantity}}</td> <td>{{pqrproduct.specs}}</td> <td>{{pqrproduct.reference}}</td> <td><input type="text" v-model="pqrproduct.dispatchqty" placeholder="enter dispatch Quantity" class="form-control" /></td> </tr> </tbody> </table> <div class="form-group"> <label for="">Select Date</label> <input type="date" name="" id="" v-model="date" class="form-control"> </div> <div class="form-group"> <label for="">Payment Method</label> <select v-model="transaction_type" class="form-control"> <option value="1">Cash</option> <option value="2">Online</option> <option value="3">Cheque</option> </select> </div> <div class="form-group" v-if="transaction_type==3"> <label for="">Cheque No</label> <input type="text" name="" id="" class="form-control" placeholder="" aria-describedby="helpId" v-model="transaction_id"> <label for="">Bank</label> <input type="text" name="" id="" class="form-control" placeholder="" aria-describedby="helpId" v-model="transaction_id"> </div> <div class="form-group" v-else> <label for="">Transaction Id</label> <input type="text" name="" id="" class="form-control" placeholder="" aria-describedby="helpId" v-model="transaction_id"> </div> <div class="form-group"> <label for="">Amount</label> <input type="text" name="" id="" class="form-control" placeholder="" aria-describedby="helpId" v-model="amount"> </div> <div class="form-group"> <label for="">Bank</label> <input type="text" name="" id="" class="form-control" placeholder="" aria-describedby="helpId" v-model="bank"> </div> <div class="form-group"> <label for="">Note</label> <textarea class="form-control" id="exampleFormControlTextarea1" rows="5" v-model="note"></textarea> </div> <button type="submit" value="submit" class="btn btn-primary">Submit</button> </form> </div> </div> </div> </template> <script> export default { data(){ return{ member_code:'', name:'', designation:'', email:'', email2:'', phone:'', phone2:'', company_name:'', status:'', company_address:'', home_address:'', amount:'', status:1, proposed_by:'', member_type:'', cc:'', message:'', source:'', searchQuery:'', refsource:'', users:[], phonecheck:'', companies:[], company:[] } }, mounted() { console.log('Component mounted.') }, methods: { addmembers(){ axios .post('/members', { member_code:this.member_code, name: this.name, designation:this.designation, company_name:this.company_name, company_address:this.company_address, home_address:this.home_address, email: this.email, email2: this.email2, phone: this.phone.replace(/\s+/g, ''), phone2: this.phone2.replace(/\s+/g, ''), proposed_by:this.proposed_by, member_type:this.member_type, status:this.status, }) .then( this.$toaster.success('Registration Added'), this.$root.$emit('bv::toggle::collapse', 'add-client'), this.$router.push({ path: '/member'}) ); }, jack(){ if(this.sameas!=""){ this.wphone=this.phone, this.wcc=this.cc } }, setSelected(){ alert(this.company); }, loadcompanies(){ axios.get('/members/all') .then(response => { this.companies = response.data }) }, getData:function(searchQuery) { this.isLoading = true; axios.get('client/searchquery?q=' + searchQuery.replace(/\s+/g, '')) .then(response => { this.users = response.data; }); } }, created: function(){ this.loadcompanies() }, } </script> <style scoped> .rbt.radio-block ul { width: 100%; overflow: auto; padding: 0; } .rbt.radio-block li { display: inline-block; clear: both; padding: 10px; border-radius: 30px; margin-bottom: 2px; font-family: Helvetica, Arial, sans-serif; } .rbt.radio-block input[type="radio"], input[type="checkbox"] { margin-right: 5px; } .rbt input[type="radio"]{ -webkit-appearance:none; } .rbt label{ appearance: none; background-color: #fff; border-style: none; box-shadow: inset 0 0 0 1px #002f34; border-radius: 4px; color: #002f34; cursor: pointer; font-size: 14px; height: 36px; margin-bottom: 8px; margin-right: 8px; min-width: 124px; outline: 0; padding: 8px 16px; } .fa{ font-size: 80px; position: absolute; top:50%; left: 50%; transform: translate(-50%,-80%); } .rbt label>span{ font-size: 14px; transform: translate(-50%,80%); font-family: "Poppins",sans-serif; font-weight: 500; } .rbt input[type="radio"]:checked + label{ background-color: #6b80ef; color: white; } </style>