{"version":3,"sources":["webpack:///./src/mixins/basePageMixin.js","webpack:///./src/mixins/formPageMixin.js","webpack:///./src/mixins/common.js","webpack:///./src/mixins/formMixin.js","webpack:///./src/pages/pedidos/pedidoClienteServirLinea/components/ServirLineaForm.vue?fb51","webpack:///./src/pages/pedidos/pedidoClienteServirLinea/components/ServirLineaFormData.js","webpack:///src/pages/pedidos/pedidoClienteServirLinea/components/ServirLineaForm.vue","webpack:///./src/pages/pedidos/pedidoClienteServirLinea/components/ServirLineaForm.vue?54ef","webpack:///./src/pages/pedidos/pedidoClienteServirLinea/components/ServirLineaForm.vue","webpack:///./src/pages/pedidos/pedidoClienteServirLinea/PedidoClienteServirLinea.vue?36a4","webpack:///./src/pages/pedidos/pedidoClienteServirLinea/PedidoClienteServirLineaData.js","webpack:///src/pages/pedidos/pedidoClienteServirLinea/PedidoClienteServirLinea.vue","webpack:///./src/pages/pedidos/pedidoClienteServirLinea/PedidoClienteServirLinea.vue?2dd4","webpack:///./src/pages/pedidos/pedidoClienteServirLinea/PedidoClienteServirLinea.vue"],"names":["basePageMixin","data","title","routeParams","routeQuery","loadingData","rememberState","rememberScroll","showingDialogs","pageLoaded","bottomNavBarButtons","dbReady","created","this","_","cloneDeep","$route","params","query","extra","decodeBase64","computed","routeFromBrowserHistory","meta","fromBrowserHistory","userPermissions","get","permissions","methods","initDB","$offline","db","$loading","showManual","connect","initSchema","init","hide","closeDB","close","copyRouteParamsToPageStore","pageStoreName","routeParam","storeHasProperty","setStoreProperty","initStore","property","$store","value","set","getStoreProperty","dispatchStore","actionName","payload","dispatch","hasViewPerm","perm","hasInsertPerm","hasEditPerm","hasDeletePerm","hasPerm","beforeRouteLeaveBase","to","from","next","beforeRouteLeaveCommon","initNavigationBottom","addNavigationBottomButton","name","icon","visible","badge","badgeColor","index","push","order","length","formPageMixin","mixins","formData","submitMessage","scrollPosition","gotoScrollPosition","clickSubmit","form","validate","submitForm","formInvalid","saveFormData","Object","keys","fieldname","currentScrollPosition","that","showingDialog","dialog","$set","props","id","type","Number","String","required","isInsert","isEdit","watch","newValue","loadFormData","setFormRule","rule","formRules","createMaxOracleNumberFormRules","precision","createMaxFormRules","size","createRequiredFormRules","emitChangeValues","$emit","loadForm","$watch","deep","addFormRulesAPI","columns","column","API_RESULT_DATATYPES","string","v","addFormRulesVeeValidateAPI","max","render","_vm","_h","$createElement","_c","_self","_l","dato","key","idtdato_articulo","attrs","tdato_articulo_nombre","model","callback","$$v","expression","unidades","_n","nserie_inicial","staticRenderFns","selectDatoArticulo","Vue","idarticulo","apiFilter","APIFilter","setOperator","API_FILTER_OPERATORS","AND","addGT","addExact","$api","call","filter","resp","result","dataset","map","valor_original","valor","unidadesFaltaServir","default","dato_articulo","Data","component","VTextField","on","$event","stopPropagation","$refs","slot","_v","_s","$vuetify","icons","values","check","ref","lineaPedidoCliente","unidades_falta_servir","changeFormData","_e","rowPedidoCliente","idpedidocli","rowLineaPedidoCliente","idlpedidocli","idalbarancliAServir","crearAlbaranDesdePedido","fecha","updateDatoArticulo","iddatoArticulo","iddato_articulo","servirLinea","idalbarancli","nserieInicial","components","ServirLineaForm","pedidoCliente","loadPage","albaranCliente","currentDate","unidadesLabel","articuloLabel","VBtn","VForm","VIcon"],"mappings":"uSAOaA,EAAgB,CAC3BC,KAD2B,WAEzB,MAAO,CACLC,MAAO,GACPC,YAAa,KACbC,WAAY,KACZC,aAAa,EACbC,eAAe,EACfC,gBAAgB,EAChBC,eAAgB,GAChBC,YAAY,EACZC,oBAAqB,GACrBC,SAAS,IAGbC,QAf2B,WAgBzBC,KAAKV,YAAcW,OAAEC,UAAUF,KAAKG,OAAOC,QAC3CJ,KAAKT,WAAaU,OAAEC,UAAUF,KAAKG,OAAOE,OACtCL,KAAKT,WAAWe,QAClBN,KAAKT,WAAWe,MAAQC,eAAaP,KAAKT,WAAWe,SAGzDE,SAAU,CACRC,wBADQ,WAGN,OAAOT,KAAKG,OAAOO,KAAKC,oBAE1BC,gBAAiBC,eAAI,oBACrBC,YANQ,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,sDACA,oBADA,YACAD,EADA,yBACAC,IAjCA,yBAoCA,kBApCA,qBAsCA,oBAtCA,gFC3DgY,I,qECO5XtC,EAAY,eACd,EACA3C,EACAmB,GACA,EACA,KACA,KACA,MAIa,aAAAwB,EAAiB,QAOhC,IAAkBA,EAAW,CAACuC,OAAA,KAAKC,QAAA,KAAMC,QAAA","file":"js/chunk-9da74892.d42ff43a.js","sourcesContent":["import { decodeBase64 } from '@/utils/router'\r\nimport { get } from 'vuex-pathify'\r\nimport _ from '@/utils/lodash'\r\nimport { beforeRouteLeaveCommon } from './common'\r\nimport { hasViewPerm, hasInsertPerm, hasEditPerm, hasDeletePerm, hasPerm, permissions } from '@/utils/permissions'\r\nimport { initSchema, connect } from '@/offline/database'\r\n\r\nexport const basePageMixin = {\r\n data () {\r\n return {\r\n title: '',\r\n routeParams: null,\r\n routeQuery: null,\r\n loadingData: false,\r\n rememberState: false,\r\n rememberScroll: false,\r\n showingDialogs: {},\r\n pageLoaded: false,\r\n bottomNavBarButtons: [],\r\n dbReady: false,\r\n }\r\n },\r\n created () {\r\n this.routeParams = _.cloneDeep(this.$route.params)\r\n this.routeQuery = _.cloneDeep(this.$route.query)\r\n if (this.routeQuery.extra) {\r\n this.routeQuery.extra = decodeBase64(this.routeQuery.extra)\r\n }\r\n },\r\n computed: {\r\n routeFromBrowserHistory () {\r\n // no mostrar alerts en el \"back\" del navegador\r\n return this.$route.meta.fromBrowserHistory\r\n },\r\n userPermissions: get('usuario/permisos'),\r\n permissions () {\r\n return permissions\r\n },\r\n },\r\n methods: {\r\n async initDB () {\r\n if (!this.$offline.db) {\r\n this.$loading.showManual('Inicializando base de datos...')\r\n try {\r\n await this.$offline.init(await connect(initSchema()))\r\n } finally {\r\n this.dbReady = true\r\n this.$loading.hide()\r\n }\r\n } else {\r\n this.dbReady = true\r\n }\r\n },\r\n async closeDB () {\r\n if (this.$offline.db) {\r\n await this.$offline.db.close()\r\n this.$offline.db = null\r\n this.dbReady = false\r\n }\r\n },\r\n async copyRouteParamsToPageStore () {\r\n if (this.pageStoreName) {\r\n for (const routeParam in this.routeParams) {\r\n if (this.storeHasProperty(routeParam)) {\r\n await this.setStoreProperty(routeParam, this.routeParams[routeParam])\r\n }\r\n }\r\n }\r\n },\r\n async initStore () {\r\n // routeParams -> ¿existe en el store de la página? -> copiar valor\r\n // usado para: nextRoute, readonly\r\n await this.copyRouteParamsToPageStore()\r\n },\r\n storeHasProperty (property) {\r\n return property in this.$store.get(`${this.pageStoreName}`)\r\n },\r\n async setStoreProperty (property, value) {\r\n await this.$store.set(`${this.pageStoreName}/${property}`, value)\r\n },\r\n async getStoreProperty (property) {\r\n return await this.$store.get(`${this.pageStoreName}/${property}`)\r\n },\r\n async dispatchStore (actionName, payload) {\r\n return await this.$store.dispatch(`${this.pageStoreName}/${actionName}`, payload)\r\n },\r\n hasViewPerm (perm) {\r\n return hasViewPerm(this.userPermissions, perm)\r\n },\r\n hasInsertPerm (perm) {\r\n return hasInsertPerm(this.userPermissions, perm)\r\n },\r\n hasEditPerm (perm) {\r\n return hasEditPerm(this.userPermissions, perm)\r\n },\r\n hasDeletePerm (perm) {\r\n return hasDeletePerm(this.userPermissions, perm)\r\n },\r\n hasPerm (perm) {\r\n return hasPerm(this.userPermissions, perm)\r\n },\r\n beforeRouteLeaveBase (to, from, next) {\r\n if (!beforeRouteLeaveCommon(this, to, from, next)) {\r\n next()\r\n }\r\n },\r\n initNavigationBottom () {\r\n this.bottomNavBarButtons = []\r\n },\r\n addNavigationBottomButton (title, name, icon, visible = true, badge = null, badgeColor = 'green') {\r\n const index = this.bottomNavBarButtons.push({\r\n title,\r\n name,\r\n icon,\r\n order: this.bottomNavBarButtons.length + 1,\r\n visible,\r\n badge,\r\n badgeColor,\r\n })\r\n return this.bottomNavBarButtons[index - 1]\r\n },\r\n }\r\n}\r\n","import { basePageMixin } from '@/mixins/basePageMixin'\r\nimport { beforeRouteLeaveCommon } from './common'\r\nimport { currentScrollPosition } from '@/utils/ui'\r\nimport { gotoScrollPosition } from '@/utils/ui'\r\n\r\nexport const formPageMixin = {\r\n mixins: [basePageMixin],\r\n data () {\r\n return {\r\n formData: {},\r\n submitMessage: 'Guardando cambios...',\r\n }\r\n },\r\n methods: {\r\n async initStore () {\r\n await this.copyRouteParamsToPageStore()\r\n if (this.scrollPosition > 0) {\r\n gotoScrollPosition(this.scrollPosition)\r\n }\r\n },\r\n async clickSubmit (form) {\r\n if (await form.validate()) {\r\n this.$loading.showManual(this.submitMessage)\r\n try {\r\n // submit de la página donde se aplica el mixin\r\n await this.submitForm()\r\n } finally {\r\n this.$loading.hide()\r\n }\r\n } else {\r\n await this.formInvalid()\r\n }\r\n },\r\n async formInvalid () {\r\n // sobreescribir donde se aplica el mixin\r\n },\r\n async saveFormData (formData) {\r\n for (const fieldname of Object.keys(formData)) {\r\n await this.setStoreProperty(`formData@${fieldname}`, formData[fieldname])\r\n }\r\n },\r\n async beforeRouteLeaveBase (to, from, next) {\r\n if (!beforeRouteLeaveCommon(this, to, from, next)) {\r\n if (this.pageStoreName) {\r\n if (this.rememberScroll) {\r\n await this.setStoreProperty('scrollPosition', currentScrollPosition())\r\n } else {\r\n await this.dispatchStore('resetScroll')\r\n }\r\n if (!this.rememberState) {\r\n await this.dispatchStore('resetStore')\r\n }\r\n }\r\n next()\r\n }\r\n },\r\n }\r\n}\r\n","export const beforeRouteLeaveCommon = (that, to, from, next) => {\r\n if (that.loadingData) {\r\n next(false)\r\n return true\r\n } else {\r\n let showingDialog = false\r\n for (const dialog in that.showingDialogs) {\r\n if (that.showingDialogs[dialog]) {\r\n that.$set(that.showingDialogs, dialog, false)\r\n showingDialog = true\r\n next(false)\r\n break\r\n }\r\n }\r\n return showingDialog\r\n }\r\n}\r\n","import { API_RESULT_DATATYPES } from '@/utils/api'\r\n\r\nexport default {\r\n props: {\r\n id: {\r\n type: [Number, String],\r\n required: false\r\n },\r\n },\r\n computed: {\r\n isInsert () {\r\n if (this.id) {\r\n return false\r\n } else {\r\n return true\r\n }\r\n },\r\n isEdit () {\r\n if (this.id) {\r\n return true\r\n } else {\r\n return false\r\n }\r\n }\r\n },\r\n watch: {\r\n async id (newValue) {\r\n // loadFormData del form donde se aplica el mixin\r\n // cambia el ID del objeto que se esta editando\r\n await this.loadFormData(newValue)\r\n }\r\n },\r\n methods: {\r\n setFormRule(fieldname, rule, value) {\r\n if (!(fieldname in this.formRules)) {\r\n this.$set(this.formRules, fieldname, { [rule]: value });\r\n } else {\r\n this.$set(this.formRules[fieldname], rule, value);\r\n }\r\n },\r\n createMaxOracleNumberFormRules(fieldname, precision) {\r\n this.setFormRule(fieldname, 'oracleNumber', precision)\r\n },\r\n createMaxFormRules(fieldname, size) {\r\n this.setFormRule(fieldname, 'max', size);\r\n },\r\n createRequiredFormRules(fieldname) {\r\n this.setFormRule(fieldname, 'required', true)\r\n },\r\n emitChangeValues () {\r\n this.$emit('change-values', this.form)\r\n },\r\n async loadForm () {\r\n if (!this.isInsert) {\r\n // loadFormData del form donde se aplica el mixin\r\n await this.loadFormData(this.id)\r\n }\r\n this.emitChangeValues()\r\n this.$watch('form', this.emitChangeValues, { deep: true })\r\n },\r\n addFormRulesAPI (columns) {\r\n for (const column of columns) {\r\n // controlar longitud máxima para campos string\r\n if (column.type === API_RESULT_DATATYPES.string && column.name in this.form) {\r\n if (!(column.name in this.formRules)) {\r\n this.$set(this.formRules, column.name, [])\r\n }\r\n this.formRules[column.name].push(\r\n v => (v || '').length <= column.size || `La longitud máxima es de ${column.size} caracteres`,\r\n )\r\n }\r\n }\r\n },\r\n async addFormRulesVeeValidateAPI (columns) {\r\n // La variable columns es lo que devuelve la api como metadatos result.metadata.columns\r\n for (const column of columns) {\r\n // controlar longitud máxima para campos string\r\n if (column.type === API_RESULT_DATATYPES.string && column.name in this.form) {\r\n if (!(column.name in this.formRules)) {\r\n this.$set(this.formRules, column.name, { max: column.size})\r\n } else {\r\n this.$set(this.formRules[column.name], \"max\" , column.size)\r\n }\r\n }\r\n }\r\n },\r\n },\r\n}\r\n","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('b10-base',[_vm._l((_vm.form.dato_articulo),function(dato){return _c('div',{key:dato.idtdato_articulo},[_c('v-text-field',{attrs:{\"label\":dato.tdato_articulo_nombre},model:{value:(dato.valor),callback:function ($$v) {_vm.$set(dato, \"valor\", $$v)},expression:\"dato.valor\"}})],1)}),_c('v-text-field',{attrs:{\"type\":\"number\",\"label\":\"Unidades\",\"rules\":_vm.formRules.unidades},model:{value:(_vm.form.unidades),callback:function ($$v) {_vm.$set(_vm.form, \"unidades\", _vm._n($$v))},expression:\"form.unidades\"}}),_c('v-text-field',{attrs:{\"type\":\"number\",\"label\":\"Nº de serie inicial\",\"rules\":_vm.formRules.nserie_inicial},model:{value:(_vm.form.nserie_inicial),callback:function ($$v) {_vm.$set(_vm.form, \"nserie_inicial\", _vm._n($$v))},expression:\"form.nserie_inicial\"}})],2)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","import { APIFilter, API_FILTER_OPERATORS } from '@/utils/api'\r\n\r\nexport default {\r\n async selectDatoArticulo (Vue, idarticulo) {\r\n const apiFilter = new APIFilter()\r\n apiFilter\r\n .setOperator(API_FILTER_OPERATORS.AND)\r\n .addGT('estado', 0)\r\n .addExact('idarticulo', idarticulo)\r\n .addExact('para_fabricacion', true)\r\n const resp = await Vue.$api.call('datoArticulo.select', { filter: apiFilter })\r\n return resp.data.result.dataset.map(dato => ({ ...dato, valor_original: dato.valor }))\r\n },\r\n}\r\n","\r\n \r\n \r\n \r\n
\r\n \r\n \r\n \r\n\r\n\r\n\r\n","import mod from \"-!../../../../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ServirLineaForm.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ServirLineaForm.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./ServirLineaForm.vue?vue&type=template&id=747c1b5b&\"\nimport script from \"./ServirLineaForm.vue?vue&type=script&lang=js&\"\nexport * from \"./ServirLineaForm.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports\n\n/* vuetify-loader */\nimport installComponents from \"!../../../../../node_modules/vuetify-loader/lib/runtime/installComponents.js\"\nimport { VTextField } from 'vuetify/lib/components/VTextField';\ninstallComponents(component, {VTextField})\n","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('b10-base',[_c('b10-toolbar',{attrs:{\"title\":_vm.title}},[_c('v-btn',{attrs:{\"slot\":\"right\",\"icon\":\"\"},on:{\"click\":function($event){$event.stopPropagation();return _vm.clickSubmit(_vm.$refs.form)}},slot:\"right\"},[_c('v-icon',[_vm._v(_vm._s(_vm.$vuetify.icons.values.check))])],1)],1),_c('b10-page-content',{attrs:{\"padding\":3}},[_c('v-form',{ref:\"form\",attrs:{\"lazy-validation\":\"\"}},[(_vm.lineaPedidoCliente && _vm.lineaPedidoCliente.unidades_falta_servir && _vm.lineaPedidoCliente.idarticulo)?_c('servir-linea-form',{attrs:{\"idarticulo\":_vm.lineaPedidoCliente.idarticulo,\"unidades-falta-servir\":_vm.lineaPedidoCliente.unidades_falta_servir},on:{\"change-values\":_vm.changeFormData}}):_vm._e()],1)],1)],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","import { APIFilter, API_FILTER_OPERATORS } from '@/utils/api'\r\n\r\nexport default {\r\n async rowPedidoCliente (Vue, idpedidocli) {\r\n const apiFilter = new APIFilter()\r\n apiFilter\r\n .setOperator(API_FILTER_OPERATORS.AND)\r\n .addGT('estado', 0)\r\n .addExact('idpedidocli', idpedidocli)\r\n const resp = await Vue.$api.call('pedidocli.select', { filter: apiFilter })\r\n return resp.data.result.dataset[0]\r\n },\r\n async rowLineaPedidoCliente (Vue, idlpedidocli) {\r\n const apiFilter = new APIFilter()\r\n apiFilter\r\n .setOperator(API_FILTER_OPERATORS.AND)\r\n .addGT('estado', 0)\r\n .addExact('idlpedidocli', idlpedidocli)\r\n const resp = await Vue.$api.call('lpedidocli.select', { filter: apiFilter })\r\n return resp.data.result.dataset[0]\r\n },\r\n async idalbarancliAServir (Vue, idpedidocli) {\r\n const resp = await Vue.$api.call('albarancli.idalbarancliAServir', {\r\n idpedidocli\r\n })\r\n if (resp && resp.data && resp.data.result) {\r\n return resp.data.result.dataset[0]\r\n }\r\n },\r\n async crearAlbaranDesdePedido (Vue, idpedidocli, fecha) {\r\n const resp = await Vue.$api.call('albarancli.crearDesdePedido', {\r\n idpedidocli, fecha\r\n })\r\n return resp.data.result.dataset[0]\r\n },\r\n async updateDatoArticulo (Vue, iddatoArticulo, valor) {\r\n await Vue.$api.call('datoArticulo.update', {\r\n values: {\r\n iddato_articulo: iddatoArticulo,\r\n valor\r\n },\r\n })\r\n },\r\n async servirLinea (Vue, idpedidocli, idalbarancli, idarticulo, nserieInicial, unidades) {\r\n await Vue.$api.call('lalbarancli.anadirArticuloMasivo', {\r\n idpedidocli,\r\n idalbarancli,\r\n idarticulo,\r\n nserie_inicial: nserieInicial,\r\n unidades\r\n })\r\n }\r\n}\r\n","\r\n \r\n \r\n \r\n {{ $vuetify.icons.values.check }}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n\r\n\r\n","import mod from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./PedidoClienteServirLinea.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./PedidoClienteServirLinea.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./PedidoClienteServirLinea.vue?vue&type=template&id=13fd061a&\"\nimport script from \"./PedidoClienteServirLinea.vue?vue&type=script&lang=js&\"\nexport * from \"./PedidoClienteServirLinea.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports\n\n/* vuetify-loader */\nimport installComponents from \"!../../../../node_modules/vuetify-loader/lib/runtime/installComponents.js\"\nimport { VBtn } from 'vuetify/lib/components/VBtn';\nimport { VForm } from 'vuetify/lib/components/VForm';\nimport { VIcon } from 'vuetify/lib/components/VIcon';\ninstallComponents(component, {VBtn,VForm,VIcon})\n"],"sourceRoot":""}