ready for rpa
This commit is contained in:
@@ -2,15 +2,6 @@
|
||||
<q-layout view="lHh Lpr lFf">
|
||||
<q-header elevated style="margin-top: 40px;">
|
||||
<q-toolbar>
|
||||
<q-btn
|
||||
flat
|
||||
dense
|
||||
round
|
||||
icon="menu"
|
||||
aria-label="Menu"
|
||||
@click="toggleLeftDrawer"
|
||||
/>
|
||||
|
||||
<q-toolbar-title>
|
||||
Bordro Robotu
|
||||
</q-toolbar-title>
|
||||
|
||||
@@ -17,12 +17,56 @@
|
||||
label="Yeni Şirket Ekle"
|
||||
color="primary"
|
||||
@click="createCompany"
|
||||
no-caps
|
||||
/>
|
||||
</template>
|
||||
</q-select>
|
||||
</div>
|
||||
</div>
|
||||
</q-card-section>
|
||||
|
||||
<q-card-section>
|
||||
<div class="row q-col-gutter-sm items-center">
|
||||
<div class="col-shrink">
|
||||
<q-btn label="Excel Yükle"
|
||||
@click="upload"
|
||||
no-caps
|
||||
color="secondary"
|
||||
/>
|
||||
</div>
|
||||
<div class="col-11 text-right">
|
||||
{{ ld.xlsFile }}
|
||||
</div>
|
||||
<div class="col-6">
|
||||
<q-select v-model="ld.year" :options="[2024, 2025, 2026, 2027, 2028]"
|
||||
label="Aktarım Yıl"
|
||||
/>
|
||||
</div>
|
||||
<div class="col-6">
|
||||
<q-select v-model="ld.month" :options="[1,2,3,4,5,6,7,8,9,10,11,12]"
|
||||
label="Aktarım Ay"
|
||||
/>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<q-btn
|
||||
no-caps
|
||||
label="Aktarıma Başla"
|
||||
color="warning"
|
||||
class="full-width"
|
||||
@click="doRpa"
|
||||
:disable="!ld.xlsFile || !ld.companyID"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</q-card-section>
|
||||
|
||||
<q-card-section>
|
||||
<div style="max-height: 200px; overflow: scroll; border: 1px gray solid;" class="q-pa-xs">
|
||||
<span v-for="(ln, ndx) in ld.logProcess" :key="ndx">
|
||||
{{ ndx }} {{ ln }}
|
||||
</span>
|
||||
</div>
|
||||
</q-card-section>
|
||||
</q-card>
|
||||
|
||||
</q-page>
|
||||
@@ -32,17 +76,26 @@
|
||||
import { onMounted, reactive } from 'vue'
|
||||
import Company from 'components/dlg/Company.vue'
|
||||
import { useQuasar } from 'quasar'
|
||||
import { Companies, CreateCompany } from 'app/bindings/lib/dbsrv/Srv'
|
||||
import { Companies, CreateCompany, Rpa, UploadExcel } from 'app/bindings/lib/srv/Srv'
|
||||
import * as wails from '@wailsio/runtime'
|
||||
|
||||
const $q = useQuasar()
|
||||
|
||||
const ld = reactive({
|
||||
companyID: null,
|
||||
companies: [],
|
||||
xlsFile: '',
|
||||
logProcess: [],
|
||||
year: 2024,
|
||||
month: 1,
|
||||
})
|
||||
|
||||
onMounted(()=> {
|
||||
onMounted(() => {
|
||||
getCompanies()
|
||||
|
||||
wails.Events.On('logProcess', function (ev) {
|
||||
ld.logProcess.push(ev.data)
|
||||
})
|
||||
})
|
||||
|
||||
const createCompany = function () {
|
||||
@@ -50,7 +103,7 @@ const createCompany = function () {
|
||||
component: Company,
|
||||
parent: this,
|
||||
// ----------------------
|
||||
// props that are passed to component instancde
|
||||
// props that are passed to component instance
|
||||
}).onOk(data => {
|
||||
CreateCompany(data.name, data.memberNumber, data.username, data.password)
|
||||
})
|
||||
@@ -61,7 +114,16 @@ const getCompanies = function () {
|
||||
Companies().then(res => {
|
||||
ld.companies.push(...res)
|
||||
})
|
||||
}
|
||||
|
||||
const upload = function () {
|
||||
UploadExcel().then(res => {
|
||||
ld.xlsFile = res
|
||||
})
|
||||
}
|
||||
|
||||
const doRpa = function () {
|
||||
Rpa(Math.trunc(ld.month), Math.trunc(ld.year)).catch(err => console.log(err))
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user