{"version":3,"sources":["webpack:///./src/API/dealerMaster.ts","webpack:///./src/hooks/useFetchCommon.ts","webpack:///./src/views/DealerMasterData/Dealer/DealerEdit.vue?281f","webpack:///./src/views/DealerMasterData/Dealer/DealerEdit.vue?4729","webpack:///./src/views/DealerMasterData/Dealer/DealerEdit.vue","webpack:///./src/views/DealerMasterData/Dealer/DealerEdit.vue?028c"],"names":["getAllBu","getDealerGroup","getDealerType","newRegion","reqBody","updateRegion","deleteRegion","params","id","getRegion","getRegionDetail","getDealerList","getDealerDetail","dealerId","updateDealerInfo","getDealerHistory","page","size","checkDealer","dealerInfoId","dealerCode","getDealerBlockList","saveBlockRecord","getBlockCodeList","getDealerBlockLink","documentId","type","fileName","deleteBlockRecord","getDealerBlockView","blockCode","updateAuditState","exportDealerInfo","a","post","responseType","useFetchCommon","parameter","pagination","sizi","total","data","initData","refreshFetch","resetPage","_params","isPagination","Object","assign","fetchApi","then","res","resTransform","number","totalElements","value","content","_withScopeId","n","_hoisted_1","class","_hoisted_2","_hoisted_3","_hoisted_4","style","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","_hoisted_9","_hoisted_10","_hoisted_11","_hoisted_12","_hoisted_13","_hoisted_14","_hoisted_15","key","_hoisted_16","_hoisted_17","_hoisted_18","_hoisted_19","_hoisted_20","_hoisted_21","_hoisted_22","_hoisted_23","_hoisted_24","_hoisted_25","render","_ctx","_cache","$props","$setup","$data","$options","_component_Breadcrumb","_component_a_input","_component_a_checkbox","_component_a_button","_component_a_select_option","_component_a_select","_component_a_radio","_component_a_radio_group","_component_a_checkbox_group","_component_a_date_picker","_component_main_wrapper","className","header","dataSource","name","$t","default","tmDealerInfoDto","$event","disabled","status","nameCn","statusName","onChange","handlerCheckboxChange","checked","active","_","onClick","handlerSave","dealerInfoMapping","item","index","e","i","source","options","radioItem","radioIndex","buValue","handlerBuCheckboxChange","bu","buRegionValue","regionDto","regionItem","subRegionEn","typeCn","placeholder","format","valueFormat","poccDate","props","String","setup","back","dealerGroup","gsCode","gcCode","nameEn","dealerGroupNameCn","dealerGroupNameEn","provinceEn","provinceCn","cityCn","cityEn","legalNameCn","legalNameEn","additionalNameCn","additionalNameEn","addressCn","addressEn","zipCode","contactEmail","fixPhone","mobilePhone","fax","mbafcCode","swtCode","vendorCode","isGovernmentRelated","languageValue","dosCode","tmDealerDealerTypeMappingDto","tmDealerRegionMappingDto","t","regionValue","map","buId","regionId","uuid","filter","dealerTypeValue","dealerTypeId","isDelete","message","error","length","success","setTimeout","getDealerDetailData","_dealerType","_bu","dealerDetailData","forEach","result","ele","push","catch","some","__exports__"],"mappings":"kHAAA,+uBAmBaA,EAAW,WACtB,OAAO,eAAS,gBAGLC,EAAiB,WAC5B,OAAO,eAAS,mBAGLC,EAAgB,WAC3B,OAAO,eAAS,kBAGLC,EAAY,SAACC,GACxB,OAAO,eAAa,kBAAmBA,IAG5BC,EAAe,SAACD,GAC3B,OAAO,eAAY,qBAAsBA,IAG9BE,EAAe,SAACC,GAC3B,OAAO,eAAe,sBAAsBA,EAAOC,KAGxCC,EAAY,SAACF,GAGxB,OAAO,eAAS,qBAAsB,CAAEA,OAAM,KAGnCG,EAAkB,SAACH,GAG9B,OAAO,eAAS,gBAAgBA,EAAOC,KAK5BG,EAAgB,SAC3BJ,GAEA,OAAO,eAAS,wBAAyB,CAAEA,OAAM,KAGtCK,EAAkB,SAACL,GAG9B,OAAO,eAAS,oBAAoBA,EAAOM,WAGhCC,EAAmB,SAACV,GAC/B,OAAO,eAAS,mBAAoBA,IAGzBW,EAAmB,SAACR,GAK/B,OAAO,eAAS,uBAAuBA,EAAOM,SAAY,CACxDN,OAAQ,CAAES,KAAMT,EAAOS,KAAMC,KAAMV,EAAOU,SAIjCC,EAAc,SAACX,GAI1B,OAAO,eACL,oBAAoBA,EAAOY,aAAY,IAAIZ,EAAOa,aAKzCC,EAAqB,SAACd,GACjC,YADiC,IAAAA,MAAA,IAC1B,eAAS,yBAA0B,CAAEA,OAAM,KAIvCe,EAAkB,SAAC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,EAAOR,OAAS,GAChBvD,EAAGC,cAAgB,W,QACf,OAEI,QAFJ,EAAY,QAAZ,EAAAD,EAAGE,iBAAS,eAAE+C,QACV,SAAC3D,GAAS,OAAAA,EAAKrH,KAAO8L,EAAO,GAAGhB,YAClC,UAAE,QAAI,KAHO,GAInB/C,EAAGgD,KAAOe,EAAO,GAAG9L,GACpB6H,EAAQ9E,MAAMiJ,KAAKjE,KAEnBA,EAAGC,cAAgB,KACnBD,EAAGgD,KAAO,OAKtBxI,OAAOC,OAAOP,EAAM2J,GAEpB1K,EAAK6B,MAAQ2I,EACb3D,EAAGhF,MAAQ4I,E,YAGT7E,EAAwB,WACrB7E,EAAKsE,gBAAgB3F,WAI1B,eAAY,CACRD,aAAc8H,EAAMpI,SACpBO,WAAYqB,EAAKsE,gBAAgB3F,aAEhC8B,MAAK,SAACC,GACHqE,EAAOjE,OAASiE,EAAOjE,SAE1BkJ,OAAM,SAAC1E,GACJP,EAAOjE,OAAQ,KAXnBqI,EAAA,KAAQC,MAAM,oBAehBvD,EAA0B,SAAC/E,GAC7BgF,EAAGhF,MAAM8I,SAAQ,SAAC9D,GACThF,EAAMmJ,MAAK,SAAC7E,GAAS,OAAAA,EAAKrH,KAAO+H,EAAG/H,QACrC+H,EAAGC,cAAgB,UAS/B,OAJA,wBAAU,WACNyD,OAGG,CACHvK,KAAI,EACJe,KAAI,EACJ+E,OAAM,EAEN6B,YAAW,EACXd,GAAE,EACFF,QAAO,EAEPT,kBAAiB,EAEjBD,YAAW,EACXL,sBAAqB,EACrBgB,wBAAuB,M,iCC3anC,MAAMqE,EAA2B,IAAgB,EAAQ,CAAC,CAAC,SAASpH,GAAQ,CAAC,YAAY,qBAE1E,gB","file":"js/chunk-1aab556a.fee93cd5.js","sourcesContent":["import {fetchDelete, fetchDeletePic, fetchGet, fetchPost, fetchPostPic, fetchPut, fetchPutPic} from \"./index\";\nimport {\n DealerListQueryParams,\n DealerDetail,\n DealerListProps,\n DealerChangeHistoryProps,\n} from \"@/views/DealerMasterData/Dealer/types\";\nimport {\n Bu,\n DealerGroup,\n DealerType,\n} from \"@/views/DealerMasterData/Region/types\";\nimport {\n NewRegionProps,\n RegionListProps,\n UpdateRegionProps,\n} from \"@/views/DealerMasterData/Region/types\";\nimport axios from \"axios\";\n\nexport const getAllBu = (): Promise => {\n return fetchGet(\"/dapi/allBu\");\n};\n\nexport const getDealerGroup = (): Promise => {\n return fetchGet(\"/dapi/allGroup\");\n};\n\nexport const getDealerType = (): Promise => {\n return fetchGet(\"/dapi/allType\");\n};\n\nexport const newRegion = (reqBody: NewRegionProps): Promise => {\n return fetchPostPic(\"/dapi/newRegion\", reqBody);\n};\n\nexport const updateRegion = (reqBody: UpdateRegionProps): Promise => {\n return fetchPutPic(\"/dapi/updateRegion\", reqBody);\n};\n\nexport const deleteRegion = (params: { id: string }): Promise => {\n return fetchDeletePic(`/dapi/deleteRegion/${params.id}`);\n};\n\nexport const getRegion = (params: {\n buId: number;\n}): Promise => {\n return fetchGet(\"/dapi/dealerRegion\", { params });\n};\n\nexport const getRegionDetail = (params: {\n id: number;\n}): Promise => {\n return fetchGet(`/dapi/region/${params.id}`);\n};\n\n//dealer\n\nexport const getDealerList = (\n params: DealerListQueryParams\n): Promise => {\n return fetchGet(\"/dapi/dealerInfo/list\", { params });\n};\n\nexport const getDealerDetail = (params: {\n dealerId: string;\n}): Promise => {\n return fetchGet(`/dapi/dealerInfo/${params.dealerId}`);\n};\n\nexport const updateDealerInfo = (reqBody: DealerDetail): Promise => {\n return fetchPut(\"/dapi/dealerInfo\", reqBody);\n};\n\nexport const getDealerHistory = (params: {\n dealerId: string;\n page: number;\n size: number;\n}): Promise => {\n return fetchGet(`/dapi/dealerHistory/${params.dealerId}`, {\n params: { page: params.page, size: params.size },\n });\n};\n\nexport const checkDealer = (params: {\n dealerInfoId: string;\n dealerCode: string;\n}): Promise => {\n return fetchGet(\n `/dapi/dealerInfo/${params.dealerInfoId}/${params.dealerCode}`\n );\n};\n\n// dealer block\nexport const getDealerBlockList = (params = {}): Promise => {\n return fetchGet(\"/dapi/dealerBlock/list\", { params });\n};\n\n// 上传后保存\nexport const saveBlockRecord = (params = {}): Promise => {\n return fetchPost(\"/dapi/dealerBlock/blockRecord\", params);\n};\n\n// 获取dealerblockcode\nexport const getBlockCodeList = () => {\n return fetchGet(\"/dapi/dealerBlock/allDealerBlockCode\");\n};\n\n// 获取下载文件历史链接\nexport const getDealerBlockLink = (\n documentId: string,\n type: string,\n fileName: string\n) => {\n return fetchGet(\n `/dapi/dealerBlock/download/${documentId}/${type}/${fileName}/link`\n );\n};\n\n// 删除block数据\nexport const deleteBlockRecord = (id: string) => {\n return fetchDelete(`/dapi/dealerBlock/blockRecord/${id}`);\n};\n\n// view的table数据\nexport const getDealerBlockView = (blockCode: string) => {\n return fetchGet(`/dapi/dealerBlock/blockRecord/${blockCode}`);\n};\n\n// 更改状态\nexport const updateAuditState = (params = {}) => {\n return fetchPost(`/dapi/dealerBlock/blockRecord/audit`, {}, { params });\n};\n\nexport const exportDealerInfo = (params: any) => {\n return axios.post(\n \"/dapi/dealerInfo/export\",\n {},\n { params, responseType: \"blob\" }\n );\n};\n","import { onMounted, reactive, ref } from \"vue\";\n\ninterface Pagination {\n size: number; //每页多少条\n page: number; //当前页数\n total: number; //总条数\n}\n\ninterface Params {\n [key: string]: any;\n}\n\n/**\n * 所有的返回的分页都是这个数据格式\n * @param parameter\n * @param parameter params ajax 查询参数\n * @param parameter initData 初始化数据\n * @param parameter fetchApi ajax请求api\n * @param parameter resTransform response 处理函数\n * @param parameter isPagination 是否带分页查询\n *\n */\nfunction useFetchCommon(parameter: { params?: Params; initData: T; fetchApi: Function; resTransform?: Function; isPagination?: boolean }) {\n const pagination = reactive({\n size: parameter.params?.sizi ?? 10,\n page: 1,\n total: 0,\n })\n\n const data = ref(parameter.initData);\n\n /**\n *\n * @param resetPage 是否重置分页page 1\n */\n const refreshFetch = (resetPage = true): void => {\n let _params: Params = {};\n if (parameter.isPagination) {\n _params = resetPage ? Object.assign({}, parameter.params, pagination, { page: 1 }) : Object.assign({}, parameter.params, pagination);\n 'total' in _params && delete _params.total;\n } else {\n _params = parameter.params ?? {};\n }\n parameter.fetchApi(_params).then((res: any) => {\n parameter.resTransform && parameter.resTransform(res);\n if ('number' in res && 'size' in res && 'totalElements' in res) {\n Object.assign(pagination, { size: res.size, page: res.number + 1, total: res.totalElements });\n }\n //处理返回的res.content 和 res.data\n if ('content' in res) {\n data.value = res.content;\n } else if ('data' in res) {\n data.value = res.data;\n } else {\n data.value = res;\n }\n })\n }\n\n onMounted(refreshFetch);\n\n return {\n pagination,\n data,\n refreshFetch\n };\n}\n\nexport default useFetchCommon;\n","export * from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--9-oneOf-1-0!../../../../node_modules/@vue/cli-service/node_modules/css-loader/dist/cjs.js??ref--9-oneOf-1-1!../../../../node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--9-oneOf-1-2!../../../../node_modules/sass-loader/dist/cjs.js??ref--9-oneOf-1-3!../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/index.js??ref--1-1!./DealerEdit.vue?vue&type=style&index=0&id=254b00e8&scoped=true&lang=scss\"","import { resolveComponent as _resolveComponent, createVNode as _createVNode, toDisplayString as _toDisplayString, createElementVNode as _createElementVNode, createTextVNode as _createTextVNode, vShow as _vShow, withCtx as _withCtx, withDirectives as _withDirectives, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, createBlock as _createBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-254b00e8\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"d-f justify-b bg-fff m-t-8 p-16 p-r\" }\nconst _hoisted_2 = { class: \"flex-w-auto align-s-c\" }\nconst _hoisted_3 = { class: \"text-label\" }\nconst _hoisted_4 = {\n class: \"flex-w-auto align-s-c\",\n style: {\"margin-right\":\"40px\"}\n}\nconst _hoisted_5 = { class: \"text-label\" }\nconst _hoisted_6 = { class: \"text-black\" }\nconst _hoisted_7 = { class: \"flex-w-auto align-s-c\" }\nconst _hoisted_8 = { class: \"text-label\" }\nconst _hoisted_9 = { class: \"text-black\" }\nconst _hoisted_10 = { class: \"flex-w-auto align-s-c\" }\nconst _hoisted_11 = { class: \"m-t-30 sales-info-wrapper bg-fff p-16\" }\nconst _hoisted_12 = { class: \"title sign-line-b p-r\" }\nconst _hoisted_13 = { class: \"sales-main\" }\nconst _hoisted_14 = { class: \"text-label\" }\nconst _hoisted_15 = {\n key: 0,\n class: \"flex-w-auto text-black\"\n}\nconst _hoisted_16 = { class: \"m-t-30 base-info-wrapper bg-fff p-16\" }\nconst _hoisted_17 = { class: \"title sign-line-b p-r\" }\nconst _hoisted_18 = { class: \"base-info-main m-t-20\" }\nconst _hoisted_19 = { class: \"d-f\" }\nconst _hoisted_20 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"span\", {\n class: \"text-label\",\n style: {\"width\":\"calc( 100% / 3 / 3.4 )\"}\n}, \"Business Unit:\", -1))\nconst _hoisted_21 = {\n style: {\"width\":\"calc( 100% / 3 / 3.4 )\"},\n class: \"text-label\"\n}\nconst _hoisted_22 = { class: \"m-t-30 dealer-type-wrapper bg-fff p-16\" }\nconst _hoisted_23 = { class: \"title sign-line-b p-r\" }\nconst _hoisted_24 = { class: \"d-f flex-wrap\" }\nconst _hoisted_25 = { class: \"m-t-10 dealer-text\" }\n\nexport function render(_ctx: any,_cache: any,$props: any,$setup: any,$data: any,$options: any) {\n const _component_Breadcrumb = _resolveComponent(\"Breadcrumb\")!\n const _component_a_input = _resolveComponent(\"a-input\")!\n const _component_a_checkbox = _resolveComponent(\"a-checkbox\")!\n const _component_a_button = _resolveComponent(\"a-button\")!\n const _component_a_select_option = _resolveComponent(\"a-select-option\")!\n const _component_a_select = _resolveComponent(\"a-select\")!\n const _component_a_radio = _resolveComponent(\"a-radio\")!\n const _component_a_radio_group = _resolveComponent(\"a-radio-group\")!\n const _component_a_checkbox_group = _resolveComponent(\"a-checkbox-group\")!\n const _component_a_date_picker = _resolveComponent(\"a-date-picker\")!\n const _component_main_wrapper = _resolveComponent(\"main-wrapper\")!\n\n return (_openBlock(), _createBlock(_component_main_wrapper, { className: \"p-l-r-10\" }, {\n header: _withCtx(() => [\n _createVNode(_component_Breadcrumb, {\n dataSource: [{ name: _ctx.$t('dealerData.edit') }]\n }, null, 8, [\"dataSource\"])\n ]),\n default: _withCtx(() => [\n _createElementVNode(\"div\", _hoisted_1, [\n _createElementVNode(\"p\", _hoisted_2, [\n _createElementVNode(\"span\", _hoisted_3, _toDisplayString(_ctx.$t('dealerDataEdit.dealerCode')) + \":\", 1),\n _createVNode(_component_a_input, {\n style: {\"width\":\"180px\"},\n value: _ctx.data.tmDealerInfoDto.dealerCode,\n \"onUpdate:value\": _cache[0] || (_cache[0] = ($event: any) => ((_ctx.data.tmDealerInfoDto.dealerCode) = $event)),\n disabled: _ctx.data.tmDealerInfoDto.status !== 1\n }, null, 8, [\"value\", \"disabled\"])\n ]),\n _createElementVNode(\"p\", _hoisted_4, [\n _createElementVNode(\"span\", _hoisted_5, _toDisplayString(_ctx.$t('dealerDataEdit.dealerNameCn')) + \":\", 1),\n _createElementVNode(\"span\", _hoisted_6, _toDisplayString(_ctx.data.tmDealerInfoDto.nameCn), 1)\n ]),\n _createElementVNode(\"p\", _hoisted_7, [\n _createElementVNode(\"span\", _hoisted_8, _toDisplayString(_ctx.$t('dealerDataEdit.status')) + \":\", 1),\n _createElementVNode(\"span\", _hoisted_9, _toDisplayString(_ctx.data.tmDealerInfoDto.statusName), 1)\n ]),\n _createElementVNode(\"p\", _hoisted_10, [\n _withDirectives(_createVNode(_component_a_checkbox, {\n onChange: _ctx.handlerCheckboxChange,\n checked: _ctx.active,\n class: \"text-value\"\n }, {\n default: _withCtx(() => [\n _createTextVNode(_toDisplayString(_ctx.$t('dealerDataEdit.active')), 1)\n ]),\n _: 1\n }, 8, [\"onChange\", \"checked\"]), [\n [_vShow, _ctx.data.tmDealerInfoDto.status == 1]\n ])\n ]),\n _createVNode(_component_a_button, {\n type: \"primary\",\n class: \"save-button\",\n onClick: _ctx.handlerSave\n }, {\n default: _withCtx(() => [\n _createTextVNode(_toDisplayString(_ctx.$t('dealerDataEdit.save')), 1)\n ]),\n _: 1\n }, 8, [\"onClick\"])\n ]),\n _createElementVNode(\"div\", _hoisted_11, [\n _createElementVNode(\"h2\", _hoisted_12, _toDisplayString(_ctx.$t('dealerDataEdit.baseInfo')), 1),\n _createElementVNode(\"div\", _hoisted_13, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.dealerInfoMapping, (item, index) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"d-f justify-b sales-info-row\",\n key: index\n }, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(item, (e, i) => {\n return (_openBlock(), _createElementBlock(\"p\", {\n class: \"flex-w-auto d-f\",\n key: i\n }, [\n _createElementVNode(\"span\", _hoisted_14, _toDisplayString(e.name ? e.name + ':' : ''), 1),\n (e.type === 'text')\n ? (_openBlock(), _createElementBlock(\"span\", _hoisted_15, _toDisplayString(_ctx.data.tmDealerInfoDto[e.key]), 1))\n : (e.type === 'select')\n ? (_openBlock(), _createBlock(_component_a_select, {\n key: 1,\n value: _ctx.data.tmDealerInfoDto[e.key],\n \"onUpdate:value\": ($event: any) => ((_ctx.data.tmDealerInfoDto[e.key]) = $event),\n style: {\"width\":\"180px\"}\n }, {\n default: _withCtx(() => [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(e.source, (options) => {\n return (_openBlock(), _createBlock(_component_a_select_option, {\n style: {\"width\":\"180px\"},\n value: options.id,\n \"onUpdate:value\": ($event: any) => ((options.id) = $event),\n key: options.id\n }, {\n default: _withCtx(() => [\n _createTextVNode(_toDisplayString(options.nameCn), 1)\n ]),\n _: 2\n }, 1032, [\"value\", \"onUpdate:value\"]))\n }), 128))\n ]),\n _: 2\n }, 1032, [\"value\", \"onUpdate:value\"]))\n : (e.type === 'radio')\n ? (_openBlock(), _createBlock(_component_a_radio_group, {\n key: 2,\n value: _ctx.data.tmDealerInfoDto[e.key],\n \"onUpdate:value\": ($event: any) => ((_ctx.data.tmDealerInfoDto[e.key]) = $event)\n }, {\n default: _withCtx(() => [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(e.source, (radioItem, radioIndex) => {\n return (_openBlock(), _createBlock(_component_a_radio, {\n value: radioItem.value,\n key: radioIndex\n }, {\n default: _withCtx(() => [\n _createTextVNode(_toDisplayString(radioItem.name), 1)\n ]),\n _: 2\n }, 1032, [\"value\"]))\n }), 128))\n ]),\n _: 2\n }, 1032, [\"value\", \"onUpdate:value\"]))\n : (e.type === 'input')\n ? (_openBlock(), _createBlock(_component_a_input, {\n key: 3,\n style: {\"width\":\"180px\"},\n value: _ctx.data.tmDealerInfoDto[e.key],\n \"onUpdate:value\": ($event: any) => ((_ctx.data.tmDealerInfoDto[e.key]) = $event)\n }, null, 8, [\"value\", \"onUpdate:value\"]))\n : _createCommentVNode(\"\", true)\n ]))\n }), 128))\n ]))\n }), 128))\n ])\n ]),\n _createElementVNode(\"div\", _hoisted_16, [\n _createElementVNode(\"h2\", _hoisted_17, _toDisplayString(_ctx.$t('dealerDataEdit.salesInfo')), 1),\n _createElementVNode(\"div\", _hoisted_18, [\n _createElementVNode(\"div\", _hoisted_19, [\n _hoisted_20,\n _createVNode(_component_a_checkbox_group, {\n value: _ctx.buValue,\n \"onUpdate:value\": _cache[1] || (_cache[1] = ($event: any) => ((_ctx.buValue) = $event)),\n onChange: _ctx.handlerBuCheckboxChange\n }, {\n default: _withCtx(() => [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.bu, (item) => {\n return (_openBlock(), _createBlock(_component_a_checkbox, {\n value: item,\n key: item.id\n }, {\n default: _withCtx(() => [\n _createTextVNode(_toDisplayString(item.nameCn), 1)\n ]),\n _: 2\n }, 1032, [\"value\"]))\n }), 128))\n ]),\n _: 1\n }, 8, [\"value\", \"onChange\"])\n ]),\n _createElementVNode(\"ul\", null, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.buValue, (item) => {\n return (_openBlock(), _createElementBlock(\"li\", {\n class: \"d-f m-t-20\",\n key: item.id\n }, [\n _createElementVNode(\"span\", _hoisted_21, _toDisplayString(item.nameCn), 1),\n _createVNode(_component_a_radio_group, {\n value: item.buRegionValue,\n \"onUpdate:value\": ($event: any) => ((item.buRegionValue) = $event)\n }, {\n default: _withCtx(() => [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(item.regionDto, (regionItem) => {\n return (_openBlock(), _createBlock(_component_a_radio, {\n value: regionItem,\n key: regionItem.id\n }, {\n default: _withCtx(() => [\n _createTextVNode(_toDisplayString(regionItem.subRegionEn), 1)\n ]),\n _: 2\n }, 1032, [\"value\"]))\n }), 128))\n ]),\n _: 2\n }, 1032, [\"value\", \"onUpdate:value\"])\n ]))\n }), 128))\n ])\n ])\n ]),\n _createElementVNode(\"div\", _hoisted_22, [\n _createElementVNode(\"h2\", _hoisted_23, _toDisplayString(_ctx.$t('dealerDataEdit.dealerType')), 1),\n _createElementVNode(\"div\", _hoisted_24, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.type, (item) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"dealer-type-item flex-d-c d-f m-l-16\",\n key: item.id\n }, [\n _createElementVNode(\"span\", _hoisted_25, _toDisplayString(item.typeCn), 1),\n _createVNode(_component_a_date_picker, {\n \"show-time\": \"\",\n placeholder: \"Select Time\",\n format: \"YYYY-MM-DD HH:mm:ss\",\n valueFormat: \"YYYY-MM-DD HH:mm:ss\",\n value: item.poccDate,\n \"onUpdate:value\": ($event: any) => ((item.poccDate) = $event)\n }, null, 8, [\"value\", \"onUpdate:value\"])\n ]))\n }), 128))\n ])\n ])\n ]),\n _: 1\n }))\n}","\nimport { defineComponent, reactive, ref, onMounted } from 'vue';\nimport { useRouter } from 'vue-router';\nimport useFetchCommon from '@/hooks/useFetchCommon';\nimport {\n getDealerType,\n getDealerGroup,\n getDealerDetail,\n getAllBu,\n checkDealer,\n} from '@/API/dealerMaster';\nimport {\n DealerType,\n DealerGroup,\n Bu,\n} from '@/views/DealerMasterData/Region/types';\nimport {\n DealerDetail,\n DealerRegionMappingDto,\n DealerTypeMappingDto,\n} from './types';\nimport { updateDealerInfo } from '@/API/dealerMaster';\nimport { message } from 'ant-design-vue';\nimport { useI18n } from 'vue-i18n';\n\nexport default defineComponent({\n name: 'DealerEdit',\n props: {\n dealerId: {\n type: String,\n },\n },\n setup(props) {\n const { back } = useRouter();\n\n const buValue = ref([]);\n\n const { data: dealerGroup } = useFetchCommon({\n initData: [],\n fetchApi: getDealerGroup,\n });\n\n const active = ref(false);\n\n const initData = {\n tmDealerInfoDto: {\n id: '',\n dealerCode: '',\n gsCode: '',\n gcCode: '',\n statusName: '',\n nameCn: '',\n nameEn: '',\n dealerGroup: '',\n dealerGroupNameCn: '',\n dealerGroupNameEn: '',\n provinceEn: '',\n provinceCn: '',\n cityCn: '',\n cityEn: '',\n legalNameCn: '',\n legalNameEn: '',\n additionalNameCn: '',\n additionalNameEn: '',\n addressCn: '',\n addressEn: '',\n zipCode: '',\n format: '',\n contactEmail: '',\n fixPhone: '',\n mobilePhone: '',\n fax: '',\n mbafcCode: null,\n swtCode: null,\n vendorCode: null,\n isGovernmentRelated: 0,\n languageValue: null,\n dosCode: null,\n },\n tmDealerDealerTypeMappingDto: [],\n tmDealerRegionMappingDto: [],\n };\n\n const data = reactive(initData);\n\n const type = ref([]);\n\n const bu = ref([]);\n\n const { t } = useI18n();\n\n const dealerInfoMapping = reactive([\n [\n {\n name: t('dealerDataEdit.legalNameCn'),\n key: 'legalNameCn',\n type: 'text',\n },\n {\n name: t('dealerDataEdit.legalNameEn'),\n key: 'legalNameEn',\n type: 'text',\n },\n {\n name: t('dealerDataEdit.additionalNameCn'),\n key: 'additionalNameCn',\n type: 'text',\n },\n ],\n [\n {\n name: t('dealerDataEdit.additionalNameEn'),\n key: 'additionalNameEn',\n type: 'text',\n },\n {\n name: t('dealerDataEdit.provinceCn'),\n key: 'provinceCn',\n type: 'text',\n },\n {\n name: t('dealerDataEdit.provinceEn2'),\n key: 'provinceEn',\n type: 'text',\n },\n ],\n [\n {\n name: t('dealerDataEdit.cityCn'),\n key: 'cityCn',\n type: 'text',\n },\n {\n name: t('dealerDataEdit.cityEn2'),\n key: 'cityEn',\n type: 'text',\n },\n {\n name: t('dealerDataEdit.addressCn'),\n key: 'addressCn',\n type: 'text',\n },\n ],\n [\n {\n name: t('dealerDataEdit.addressEn'),\n key: 'addressEn',\n type: 'text',\n },\n {\n name: t('dealerDataEdit.zipCode'),\n key: 'zipCode',\n type: 'text',\n },\n {\n name: t('dealerDataEdit.format'),\n key: 'format',\n type: 'text',\n },\n ],\n [\n {\n name: t('dealerDataEdit.contactEmail'),\n key: 'contactEmail',\n type: 'text',\n },\n {\n name: t('dealerDataEdit.fixPhone'),\n key: 'fixPhone',\n type: 'text',\n },\n // {\n // t( dealerDataEdit.name: 'MobilePhone'),\n // key: 'mobilePhone',\n // type: 'text'\n // },\n {\n name: t('dealerDataEdit.dealerGroup2'),\n key: 'dealerGroup',\n type: 'select',\n source: dealerGroup,\n },\n ],\n [\n {\n name: t('dealerDataEdit.swtCode'),\n key: 'swtCode',\n type: 'input',\n },\n {\n name: t('dealerDataEdit.vendorCode'),\n key: 'vendorCode',\n type: 'input',\n },\n {\n name: t('dealerDataEdit.mbafcCode'),\n key: 'mbafcCode',\n type: 'input',\n },\n ],\n [\n {\n name: t('dealerDataEdit.languageValue'),\n key: 'languageValue',\n type: 'input',\n },\n {\n name: t('dealerDataEdit.dosCode'),\n key: 'dosCode',\n type: 'input',\n },\n {\n name: t('dealerDataEdit.isGovernmentRelated'),\n key: 'isGovernmentRelated',\n type: 'radio',\n source: [\n {\n name: t('dealerDataEdit.yes'),\n value: 1,\n },\n {\n name: t('dealerDataEdit.no'),\n value: 0,\n },\n ],\n },\n ],\n [\n {\n name: t('dealerDataEdit.dealer400Code'),\n key: 'dealer400Code',\n type: 'input',\n },\n {\n name: '',\n key: '',\n type: 'text',\n },\n {\n name: '',\n key: '',\n type: 'text',\n },\n ],\n [\n {\n name: '',\n key: '',\n type: 'text',\n },\n ],\n ]);\n\n const handlerSave = () => {\n const regionValue = bu.value\n .map((item) =>\n item.buRegionValue\n ? {\n buId: item.buRegionValue.buId,\n dealerInfoId: props.dealerId,\n regionId: item.buRegionValue.id,\n id: item.uuid,\n }\n : null\n )\n .filter((item) => item);\n\n const dealerTypeValue = type.value\n .map((item) =>\n item.poccDate || item.uuid\n ? {\n dealerInfoId: props.dealerId,\n dealerTypeId: item.id,\n id: item.uuid,\n isDelete:\n item.poccDate && !item.uuid\n ? 0\n : !item.poccDate && item.uuid\n ? 1\n : 0,\n poccDate: item.poccDate,\n }\n : null\n )\n .filter((item) => item);\n\n if (data.tmDealerInfoDto.status === 1) {\n if (!data.tmDealerInfoDto.dealerCode) {\n message.error('DealerCode 不能为空');\n return;\n }\n checkDealer({\n dealerInfoId: props.dealerId as string,\n dealerCode: data.tmDealerInfoDto.dealerCode,\n }).then((res) => {\n // 勾选了active\n if (active.value) {\n if (\n dealerTypeValue.length > 0 &&\n regionValue.length > 0\n ) {\n data.tmDealerInfoDto.status = active.value\n ? 2\n : data.tmDealerInfoDto.status;\n data.tmDealerRegionMappingDto = regionValue as DealerRegionMappingDto[];\n data.tmDealerDealerTypeMappingDto = dealerTypeValue as DealerTypeMappingDto[];\n updateDealerInfo(data).then((res) => {\n message.success(\n 'update dealer info successfully'\n );\n setTimeout(() => {\n back();\n }, 1000);\n });\n } else {\n message.error('请完善信息');\n }\n } else {\n data.tmDealerInfoDto.status = active.value\n ? 2\n : data.tmDealerInfoDto.status;\n data.tmDealerRegionMappingDto = regionValue as DealerRegionMappingDto[];\n data.tmDealerDealerTypeMappingDto = dealerTypeValue as DealerTypeMappingDto[];\n updateDealerInfo(data).then((res) => {\n message.success('update dealer info successfully');\n setTimeout(() => {\n back();\n }, 1000);\n });\n }\n });\n } else {\n data.tmDealerInfoDto.status = active.value\n ? 2\n : data.tmDealerInfoDto.status;\n data.tmDealerRegionMappingDto = regionValue as DealerRegionMappingDto[];\n data.tmDealerDealerTypeMappingDto = dealerTypeValue as DealerTypeMappingDto[];\n updateDealerInfo(data).then((res) => {\n message.success('update dealer info successfully');\n setTimeout(() => {\n back();\n }, 1000);\n });\n }\n };\n\n const getDealerDetailData = async () => {\n const _dealerType = await getDealerType();\n const _bu = await getAllBu();\n const dealerDetailData = await getDealerDetail({\n dealerId: props.dealerId as string,\n });\n\n if (dealerDetailData.tmDealerDealerTypeMappingDto.length > 0) {\n _dealerType.forEach((item) => {\n const result = dealerDetailData.tmDealerDealerTypeMappingDto.filter(\n (ele) => ele.dealerTypeId == item.id\n );\n if (result.length > 0) {\n item.poccDate = result[0].poccDate;\n item.uuid = result[0].id;\n } else {\n item.poccDate = '';\n }\n });\n }\n\n if (dealerDetailData.tmDealerRegionMappingDto.length > 0) {\n _bu.forEach((bu) => {\n const result = dealerDetailData.tmDealerRegionMappingDto.filter(\n (ele) => ele.buId == bu.id\n );\n if (result.length > 0) {\n bu.buRegionValue = (() =>\n bu.regionDto?.filter(\n (item) => item.id === result[0].regionId\n )[0] ?? null)();\n bu.uuid = result[0].id;\n buValue.value.push(bu);\n } else {\n bu.buRegionValue = null;\n bu.uuid = '';\n }\n });\n }\n\n Object.assign(data, dealerDetailData);\n\n type.value = _dealerType;\n bu.value = _bu;\n };\n\n const handlerCheckboxChange = () => {\n if (!data.tmDealerInfoDto.dealerCode) {\n message.error('DealerCode 不能为空');\n return;\n }\n checkDealer({\n dealerInfoId: props.dealerId as string,\n dealerCode: data.tmDealerInfoDto.dealerCode,\n })\n .then((res) => {\n active.value = !active.value;\n })\n .catch((e) => {\n active.value = false;\n });\n };\n\n const handlerBuCheckboxChange = (value: Bu[]) => {\n bu.value.forEach((bu) => {\n if (!value.some((item) => item.id === bu.id)) {\n bu.buRegionValue = null;\n }\n });\n };\n\n onMounted(() => {\n getDealerDetailData();\n });\n\n return {\n type,\n data,\n active,\n\n dealerGroup,\n bu,\n buValue,\n\n dealerInfoMapping,\n\n handlerSave,\n handlerCheckboxChange,\n handlerBuCheckboxChange,\n };\n },\n});\n","import { render } from \"./DealerEdit.vue?vue&type=template&id=254b00e8&scoped=true&ts=true\"\nimport script from \"./DealerEdit.vue?vue&type=script&lang=ts\"\nexport * from \"./DealerEdit.vue?vue&type=script&lang=ts\"\n\nimport \"./DealerEdit.vue?vue&type=style&index=0&id=254b00e8&scoped=true&lang=scss\"\n\nimport exportComponent from \"/app/node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-254b00e8\"]])\n\nexport default __exports__"],"sourceRoot":""}