Changa purchese #40
@@ -5,7 +5,7 @@
 | 
			
		||||
  <meta charset="UTF-8" />
 | 
			
		||||
  <link rel="icon" href="/favicon.ico" />
 | 
			
		||||
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
 | 
			
		||||
  <title>Welcome to Vuetify 3</title>
 | 
			
		||||
  <title>Don Confiao</title>
 | 
			
		||||
</head>
 | 
			
		||||
 | 
			
		||||
<body>
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										
											BIN
										
									
								
								tienda_ilusion/don_confiao/frontend/don-confiao/public/1.ico
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								tienda_ilusion/don_confiao/frontend/don-confiao/public/1.ico
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| 
		 After Width: | Height: | Size: 15 KiB  | 
										
											Binary file not shown.
										
									
								
							| 
		 Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 55 KiB  | 
										
											Binary file not shown.
										
									
								
							| 
		 Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 46 KiB  | 
@@ -14,13 +14,7 @@
 | 
			
		||||
    <v-main>
 | 
			
		||||
    <v-container>
 | 
			
		||||
      <v-form ref="form" v-model="valid">
 | 
			
		||||
        <v-text-field
 | 
			
		||||
          v-model="purchase.date"
 | 
			
		||||
          label="Fecha"
 | 
			
		||||
          type="date"
 | 
			
		||||
          :rules="[rules.required]"
 | 
			
		||||
          required
 | 
			
		||||
        ></v-text-field>
 | 
			
		||||
        <div class="d-flex mb-4">
 | 
			
		||||
          <v-select
 | 
			
		||||
            v-model="purchase.customer"
 | 
			
		||||
            :items="clients"
 | 
			
		||||
@@ -29,10 +23,22 @@
 | 
			
		||||
            label="Cliente"
 | 
			
		||||
            :rules="[rules.required]"
 | 
			
		||||
            required
 | 
			
		||||
            class="mr-4"
 | 
			
		||||
          ></v-select>
 | 
			
		||||
          <v-text-field
 | 
			
		||||
            v-model="purchase.date"
 | 
			
		||||
            label="Fecha"
 | 
			
		||||
            type="date"
 | 
			
		||||
            :rules="[rules.required]"
 | 
			
		||||
            required
 | 
			
		||||
            style="flex: 0 1 250px;"
 | 
			
		||||
          ></v-text-field>
 | 
			
		||||
        </div>
 | 
			
		||||
 | 
			
		||||
        <v-textarea
 | 
			
		||||
          v-model="purchase.notes"
 | 
			
		||||
          label="Notas"
 | 
			
		||||
          rows="2"
 | 
			
		||||
        ></v-textarea>
 | 
			
		||||
        <v-divider></v-divider>
 | 
			
		||||
        <v-container>
 | 
			
		||||
@@ -117,7 +123,7 @@
 | 
			
		||||
      return {
 | 
			
		||||
        valid: false,
 | 
			
		||||
        purchase: {
 | 
			
		||||
          date: '',
 | 
			
		||||
          date: this.getCurrentDate(),
 | 
			
		||||
          client: null,
 | 
			
		||||
          notes: '',
 | 
			
		||||
          saleline_set: [{product:'', unit_price: 0, quantity: 0}],
 | 
			
		||||
@@ -145,6 +151,14 @@
 | 
			
		||||
      },
 | 
			
		||||
    },
 | 
			
		||||
    methods: {
 | 
			
		||||
      getCurrentDate() {
 | 
			
		||||
        const today = new Date();
 | 
			
		||||
        const yyyy = today.getFullYear();
 | 
			
		||||
        const mm = String(today.getMonth() + 1).padStart(2, '0');
 | 
			
		||||
        const dd = String(today.getDate()).padStart(2, '0');
 | 
			
		||||
        return `${yyyy}-${mm}-${dd}`;
 | 
			
		||||
      },
 | 
			
		||||
      
 | 
			
		||||
      onProductChange(index) {
 | 
			
		||||
        const selectedProductId = this.purchase.saleline_set[index].product;
 | 
			
		||||
        const selectedProduct = this.products.find(p => p.id == selectedProductId);
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user