From e1e224627c25b855f5666260d6bccb90ef1eea6e Mon Sep 17 00:00:00 2001 From: chuzhichao Date: Wed, 28 Jun 2023 14:44:32 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=9A=E5=91=98=E8=AE=A2=E5=8D=95=E5=88=97?= =?UTF-8?q?=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/system/common.js | 10 + src/config/business.js | 2 +- src/store/getters.js | 1 + src/store/modules/mall.js | 17 +- .../components/AddressSelector/index.vue | 62 ++ src/views/oms/order/index.vue | 587 +++++------------- 6 files changed, 258 insertions(+), 421 deletions(-) create mode 100644 src/api/system/common.js create mode 100644 src/views/components/AddressSelector/index.vue diff --git a/src/api/system/common.js b/src/api/system/common.js new file mode 100644 index 0000000..d42ccf9 --- /dev/null +++ b/src/api/system/common.js @@ -0,0 +1,10 @@ +import request from '@/utils/request' + +// 查询省市区列表 +export function areaSelect(query) { + return request({ + url: '/common/area', + method: 'get', + params: query + }) +} diff --git a/src/config/business.js b/src/config/business.js index 969a9fb..6ebf3e9 100644 --- a/src/config/business.js +++ b/src/config/business.js @@ -2,5 +2,5 @@ export const dict_types = ["sys_user_sex", "sys_show_hide", "sys_normal_disable", "sys_job_status", "sys_job_group", "sys_yes_no", "sys_notice_type", "sys_notice_status", "sys_oper_type", "sys_common_status", "wms_item_type", "wms_carrier_level", "wms_supplier_level", "wms_receipt_type", "wms_receipt_status", "wms_shipment_type", "wms_shipment_status", "wms_movement_type", "wms_movement_status", - "pms_publish_status", 'sku_sort_list', 'sys_show_status' + "pms_publish_status", 'sku_sort_list', 'sys_show_status','oms_pay_type','oms_order_status' ]; diff --git a/src/store/getters.js b/src/store/getters.js index a013ad8..0d97c03 100644 --- a/src/store/getters.js +++ b/src/store/getters.js @@ -17,6 +17,7 @@ const getters = { dictMap: state => state.dict.dictMap, productCategories: state => state.mall.productCategories, + areaSelect: state => state.mall.areaSelect, brandList: state => state.mall.brandList, } export default getters diff --git a/src/store/modules/mall.js b/src/store/modules/mall.js index f7e468f..4fbaf08 100644 --- a/src/store/modules/mall.js +++ b/src/store/modules/mall.js @@ -1,14 +1,19 @@ import {listPmsProductCategory} from "@/api/pms/productCategory"; import {allBrand} from "@/api/pms/brand"; +import {areaSelect} from "@/api/system/common"; const state = { productCategories: [], - brandList: [] + brandList: [], + areaSelect: [] } const mutations = { SET_PRODUCT_CATEGORIES: (state, value) => { state.productCategories = value }, + SET_areaSelect: (state, value) => { + state.areaSelect = value + }, SET_BRAND_LIST: (state, value) => { state.brandList = value }, @@ -22,6 +27,14 @@ const actions = { commit('SET_PRODUCT_CATEGORIES', res); }) }, + loadAreaSelect({ commit, state }, force = false) { + if (!force && state.areaSelect.length > 0) { + return Promise.resolve(); + } + return areaSelect({},{}).then(res => { + commit('SET_areaSelect', res.data); + }) + }, loadBrandList({ commit, state }, force = false) { if (!force && state.brandList.length > 0) { return Promise.resolve(); @@ -37,4 +50,4 @@ export default { state, mutations, actions -} \ No newline at end of file +} diff --git a/src/views/components/AddressSelector/index.vue b/src/views/components/AddressSelector/index.vue new file mode 100644 index 0000000..ad9ff4e --- /dev/null +++ b/src/views/components/AddressSelector/index.vue @@ -0,0 +1,62 @@ + + + + diff --git a/src/views/oms/order/index.vue b/src/views/oms/order/index.vue index 4ddf960..4ac3e7f 100644 --- a/src/views/oms/order/index.vue +++ b/src/views/oms/order/index.vue @@ -1,285 +1,89 @@ - + + + + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 请选择字典生成 - - - - - 请选择字典生成 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 请选择字典生成 - - - - - 请选择字典生成 - - - - - - - - - - - - - - - - -