{"version":3,"sources":["webpack:///./node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js","webpack:///./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js","webpack:///./src/views/BarcodeSearchPage.vue","webpack:///./src/views/BarcodeSearchPage.vue?133a","webpack:///./src/views/BarcodeSearchPage.vue?6bf9","webpack:///./src/views/BarcodeSearchPage.vue?213c"],"names":["_objectWithoutPropertiesLoose","source","excluded","key","i","target","sourceKeys","Object","keys","length","indexOf","_objectWithoutProperties","objectWithoutPropertiesLoose","getOwnPropertySymbols","sourceSymbolKeys","prototype","propertyIsEnumerable","call","class","$t","searchType","label","trackingNumberKey","fieldName","trackingNumber","fieldSchema","disabled","externalId","isDisableSearchButton","searchBarcode","isLoading","countPerPage","Math","round","window","innerHeight","searchForm","projectCode","this","projectDetail","code","version","$store","getters","projectVersion","searchConditionBlocks","searchConditions","valueType","value","id","logicalOperator","count","skip","sortOrder","sortKey","trackingNumberSearchItem","push","externalNumberSearchItem","condition","commit","$router","name","params","searchCondition","JSON","stringify","query","flatternConditions","e","errorHandler","others","conditionKeys","reduce","acc","item","idx","state","project","details","fieldType","TEXT","ocrReaderType","DEFAULT","barcodeReaderType","UNKNOWN","components","IconSearch","BaseInput","CompanyName","render","__scopeId"],"mappings":"qLAAe,SAASA,EAA8BC,EAAQC,GAC5D,GAAc,MAAVD,EAAgB,MAAO,GAC3B,IAEIE,EAAKC,EAFLC,EAAS,GACTC,EAAaC,OAAOC,KAAKP,GAG7B,IAAKG,EAAI,EAAGA,EAAIE,EAAWG,OAAQL,IACjCD,EAAMG,EAAWF,GACbF,EAASQ,QAAQP,IAAQ,IAC7BE,EAAOF,GAAOF,EAAOE,IAGvB,OAAOE,ECXM,SAASM,EAAyBV,EAAQC,GACvD,GAAc,MAAVD,EAAgB,MAAO,GAC3B,IACIE,EAAKC,EADLC,EAASO,EAA6BX,EAAQC,GAGlD,GAAIK,OAAOM,sBAAuB,CAChC,IAAIC,EAAmBP,OAAOM,sB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AEjC,MAAOgC,GACP,OAAAC,EAAA,MAAaD,GA/EnB,qJAmF6E,MAAtDvB,EAAsD,EAAtDA,sBAA0ByB,EAA4B,4CACnEC,GAAwC,UAAC1B,EAAsB,GAAGC,wBAA1B,QAA8C,IAAI0B,QAC9F,SAACC,EAAKC,EAAMC,GAAZ,4BAAC,kBACIF,GADL,wCAEUE,GAAQD,EAAKvE,KAFvB,qCAGgBwE,GAAQD,EAAK3B,WAH7B,iCAIY4B,GAAQD,EAAK1B,OAJzB,MAMA,IAGF,wCAAYsB,GAAWC,KA9F3B,oCAQI,OAAOjC,KAAKI,OAAOkC,MAAMC,QAAQC,UARrC,kCAYI,MAAO,CACLC,UAAW,OAAiBC,KAC5BC,cAAe,OAASC,QACxBC,kBAAmB,OAASC,WAflC,4CAoBI,MACuB,gBAApB9C,KAAKlB,aAAiCkB,KAAKX,YACvB,oBAApBW,KAAKlB,aAAqCkB,KAAKd,mBAtBtD,GAA+C,QAA1B,EAAiB,gBAJrC,eAAQ,CACP6D,WAAY,CAAEC,aAAA,KAAYC,YAAA,KAAWC,cAAA,MACrC3B,KAAM,uBAEa,W,UCRrB,EAAO4B,OAASA,EAChB,EAAOC,UAAY,kBAEJ,gB,oCCRf","file":"js/barcodeSearchPage.939c2387.js","sourcesContent":["export default function _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}","import objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nexport default function _objectWithoutProperties(source, excluded) {\n if (source == null) return {};\n var target = objectWithoutPropertiesLoose(source, excluded);\n var key, i;\n\n if (Object.getOwnPropertySymbols) {\n var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n\n for (i = 0; i < sourceSymbolKeys.length; i++) {\n key = sourceSymbolKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n\n return target;\n}","\n\n\n","\nimport BaseInput from '@/components/BaseInput.vue'\nimport CompanyName from '@/components/CompanyName.vue'\nimport IconSearch from '@/components/svg/IconSearch.vue'\nimport { SAVE_BARCODE_SEARCH_PARAMS } from '@/store/actions'\nimport errorHandler from '@/utils/errorHandler'\nimport { EBCRType, ECustomFieldType, EOCRType } from 'smartbarcode-web-core/src/utils/enums/index'\nimport { IBarcodeSearchForm, TError } from 'smartbarcode-web-core/src/utils/types/index'\nimport { Options, Vue } from 'vue-class-component'\n@Options({\n components: { IconSearch, BaseInput, CompanyName },\n name: 'BarcodeSearchPage',\n})\nexport default class BarcodeSearchPage extends Vue {\n searchType = 'tracking-number'\n trackingNumberKey = 'TPNumber'\n trackingNumber = ''\n externalId = ''\n isLoading = false\n\n get projectDetail() {\n return this.$store.state.project.details\n }\n\n get fieldSchema() {\n return {\n fieldType: ECustomFieldType.TEXT,\n ocrReaderType: EOCRType.DEFAULT,\n barcodeReaderType: EBCRType.UNKNOWN,\n }\n }\n\n get isDisableSearchButton() {\n return (\n (this.searchType === 'external-id' && !this.externalId) ||\n (this.searchType === 'tracking-number' && !this.trackingNumber)\n )\n }\n\n // searchConditions: [{ key: 'projectId', valueType: 'string', value: this.projectDetail.id }],\n async searchBarcode() {\n try {\n const countPerPage = Math.round((window.innerHeight - 130) / 100)\n const searchForm: IBarcodeSearchForm = {\n projectCode: this.projectDetail?.code,\n version: this.$store.getters.projectVersion,\n searchConditionBlocks: [\n {\n searchConditions: [{ key: 'projectId', valueType: 'string', value: this.projectDetail.id }],\n logicalOperator: 'and',\n },\n ],\n logicalOperator: 'and',\n count: countPerPage,\n skip: 0,\n sortOrder: -1,\n sortKey: 'audit.createdDateTime',\n }\n\n if (this.searchType === 'tracking-number') {\n const trackingNumberSearchItem = {\n key: 'activationData.trackingNumber',\n valueType: 'string',\n value: this.trackingNumber,\n }\n if (searchForm.searchConditionBlocks[0].searchConditions) {\n searchForm.searchConditionBlocks[0].searchConditions.push(trackingNumberSearchItem)\n }\n }\n\n if (this.searchType === 'external-id') {\n const externalNumberSearchItem = {\n key: 'activationData.externalId',\n valueType: 'string',\n value: this.externalId,\n }\n if (searchForm.searchConditionBlocks[0].searchConditions) {\n searchForm.searchConditionBlocks[0].searchConditions.push(externalNumberSearchItem)\n }\n }\n\n this.isLoading = true\n const condition = { condition: searchForm }\n\n this.$store.commit(SAVE_BARCODE_SEARCH_PARAMS, condition)\n\n this.$router.push({\n name: 'barcodeListPage',\n params: { searchCondition: JSON.stringify(condition) },\n query: this.flatternConditions(searchForm),\n })\n } catch (e) {\n errorHandler(e as TError)\n }\n }\n\n flatternConditions({ searchConditionBlocks, ...others }: IBarcodeSearchForm) {\n const conditionKeys: Record = (searchConditionBlocks[0].searchConditions ?? []).reduce(\n (acc, item, idx) => ({\n ...acc,\n [`key_${idx}`]: item.key,\n [`valueType_${idx}`]: item.valueType,\n [`value_${idx}`]: item.value,\n }),\n {}\n )\n\n return { ...others, ...conditionKeys }\n }\n}\n","import { render } from \"./BarcodeSearchPage.vue?vue&type=template&id=691788a2&scoped=true\"\nimport script from \"./BarcodeSearchPage.vue?vue&type=script&lang=ts\"\nexport * from \"./BarcodeSearchPage.vue?vue&type=script&lang=ts\"\n\nimport \"./BarcodeSearchPage.vue?vue&type=style&index=0&id=691788a2&lang=scss&scoped=true\"\nscript.render = render\nscript.__scopeId = \"data-v-691788a2\"\n\nexport default script","export * from \"-!../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../node_modules/css-loader/dist/cjs.js??ref--8-oneOf-1-1!../../node_modules/vue-loader-v16/dist/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-2!../../node_modules/sass-loader/dist/cjs.js??ref--8-oneOf-1-3!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader-v16/dist/index.js??ref--0-1!./BarcodeSearchPage.vue?vue&type=style&index=0&id=691788a2&lang=scss&scoped=true\""],"sourceRoot":""}