diff --git a/src/api/freight.js b/src/api/freight.js index d8b6d65..4456c91 100644 --- a/src/api/freight.js +++ b/src/api/freight.js @@ -1,4 +1,3 @@ - import request from './request' /** @@ -37,3 +36,47 @@ export function expressStatuseApi(id, is_show) { export function syncExpressApi() { return request.get('store/express/sync') } + + +/** + * @description 运费模板 -- 城市 + */ +export function cityList() { + return request.get('system/city/lst') +} +export function cityListV2(pid) { + return request.get('v2/system/city/lst/' + pid) +} +/** + * @description 运费模板 -- 列表 + */ +export function templateListApi(data) { + return request.get('store/shipping/lst', data) +} +/** + * @description 运费模板 -- 新增 + */ +export function templateCreateApi(data) { + return request.post('store/shipping/create', data) +} +/** + * @description 运费模板 -- 编辑 + */ +export function templateUpdateApi(id, data) { + return request.post(`store/shipping/update/${id}`, data) +} +/** + * @description 运费模板 -- 详情 + */ +export function templateDetailApi(id) { + return request.get(`/store/shipping/detail/${id}`) +} +/** + * @description 运费模板 -- 删除 + */ +export function templateDeleteApi(id) { + return request.delete(`store/shipping/delete/${id}`) +} + + + diff --git a/src/api/product.js b/src/api/product.js index 9f42b25..844d972 100644 --- a/src/api/product.js +++ b/src/api/product.js @@ -42,6 +42,12 @@ export function storeCategoryStatusApi(id, status) { export function storeCategoryRecommendApi(id, status) { return request.post(`store/category/is_hot/${id}`, { status }) } +/** + * @description 商品列表 -- 商户分类 + */ +export function categorySelectApi() { + return request.get(`store/category/select`) +} /** * @description 品牌分类 -- 列表 */ @@ -72,6 +78,12 @@ export function brandCategoryDeleteApi(id) { export function brandCategoryStatusApi(id, status) { return request.post(`store/brand/category/status/${id}`, { status }) } +/** + * @description 商品列表 -- 品牌分类 + */ +export function categoryBrandListApi() { + return request.get(`store/category/brandlist`) +} /** * @description 品牌 -- 列表 */ @@ -420,6 +432,7 @@ export function guaranteeUpdateApi(id) { export function guaranteeDeleteApi(id) { return request.delete(`guarantee/delete/${id}`) } + /** * @description 商品列表 -- 编辑排序 */ @@ -519,3 +532,67 @@ export function merSpecsList(data) { export function merProductLstApi(data) { return request.get(`store/product/list`, data) } +// 复制商品 -- 剩余次数 +export function productCopyCountApi() { + return request.get(`store/productcopy/count`) +} +// 商品列表 -- 运费模板筛选 +export function shippingListApi() { + return request.get(`store/shipping/list`) +} +// 商品添加 -- 属性规则 +export function templateLsitApi() { + return request.get(`/store/attr/template/list`) +} +// 添加商品 -- 参数筛选 +export function specsSelectedApi(data) { + return request.get(`store/params/temp/select`,data) +} +// 配置状态 +export function productConfigApi() { + return request.get(`store/product/config`) +} +// 属性规则 -- 添加 +export function attrCreatApi(data) { + return request.post('store/attr/template/create', data) +} +// 商品列表 -- 立即生成规格 +export function generateAttrApi(id,data) { + return request.post(`store/product/get_attr_value/${id}`, data) +} +// 服务保障 -- 添加 +export function guaranteeTemplateAddApi(data) { + return request.post(`guaranteeTemplate/create`, data) +} +// 服务保障 - 搜索 +export function guaranteeTemplateSelectApi(data) { + return request.get(`guaranteeTemplate/select`, data) +} +// 服务保障 - 详情 +export function guaranteeTemplateDetailApi(id) { + return request.get(`guaranteeTemplate/detail/${id}`) +} +// 添加商品 -- 获取服务保障模板列表 +export function guaranteeTemplateListApi() { + return request.get(`guaranteeTemplate/list`) +} +// 添加商品 -- 参数筛选详情 +export function productSpecsDetailApi(data) { + return request.get(`store/params/temp/show`, data) +} +// 商品列表 -- 添加 +export function productCreateApi(data) { + return request.post(`store/product/create`, data) +} +// 商品列表 -- 编辑 +export function productEditApi(id, data) { + return request.post(`store/product/edit/${id}`, data) +} +// 商品列表 -- 商品上下架 +export function changeProductStatus(id, status) { + return request.post(`store/product/change_status/${id}`, { status }) +} + + + + diff --git a/src/components/attrFrom/index.vue b/src/components/attrFrom/index.vue new file mode 100644 index 0000000..6994aa9 --- /dev/null +++ b/src/components/attrFrom/index.vue @@ -0,0 +1,278 @@ + + + + + diff --git a/src/components/couponList/index.vue b/src/components/couponList/index.vue new file mode 100644 index 0000000..b3c1f3b --- /dev/null +++ b/src/components/couponList/index.vue @@ -0,0 +1,287 @@ + + + + + diff --git a/src/components/lazyCascader/index.vue b/src/components/lazyCascader/index.vue new file mode 100644 index 0000000..be20747 --- /dev/null +++ b/src/components/lazyCascader/index.vue @@ -0,0 +1,470 @@ + + + diff --git a/src/components/serviceGuarantee/index.vue b/src/components/serviceGuarantee/index.vue new file mode 100644 index 0000000..3cfbf77 --- /dev/null +++ b/src/components/serviceGuarantee/index.vue @@ -0,0 +1,234 @@ + + + + diff --git a/src/components/templatesFrom/index.vue b/src/components/templatesFrom/index.vue new file mode 100644 index 0000000..1420b62 --- /dev/null +++ b/src/components/templatesFrom/index.vue @@ -0,0 +1,488 @@ + + + + + diff --git a/src/libs/modal-attr.js b/src/libs/modal-attr.js new file mode 100644 index 0000000..f459a68 --- /dev/null +++ b/src/libs/modal-attr.js @@ -0,0 +1,34 @@ + +export default function modalAttr(val, callback) { + const h = this.$createElement + return new Promise((resolve, reject) => { + this.$msgbox({ + title: '属性规格', + customClass: 'upload-form', + closeOnClickModal: false, + showClose: false, + message: h('div', { class: 'common-form-upload' }, [ + h('attrFrom', { + props: { + currentRow: val + }, + on: { + getList() { + callback() + } + } + }) + ]), + showCancelButton: false, + showConfirmButton: false + }).then(() => { + resolve() + }).catch(() => { + reject() + this.$message({ + type: 'info', + message: '已取消' + }) + }) + }) +} diff --git a/src/libs/modal-coupon.js b/src/libs/modal-coupon.js new file mode 100644 index 0000000..74dd466 --- /dev/null +++ b/src/libs/modal-coupon.js @@ -0,0 +1,37 @@ + +export default function modalCoupon(couponData, handle, couponId, keyNum, callback) { + const h = this.$createElement + return new Promise((resolve, reject) => { + this.$msgbox({ + title: '优惠券列表', + customClass: 'upload-form-coupon', + closeOnClickModal: false, + showClose: false, + message: h('div', { class: 'common-form-upload' }, [ + h('couponList', { + props: { + couponData: couponData, + handle: handle, + couponId: couponId, + keyNum: keyNum + }, + on: { + getCouponId(id) { + callback(id) + } + } + }) + ]), + showCancelButton: false, + showConfirmButton: false + }).then(() => { + resolve() + }).catch(() => { + reject() + this.$message({ + type: 'info', + message: '已取消' + }) + }) + }) +} diff --git a/src/libs/modal-templates.js b/src/libs/modal-templates.js new file mode 100644 index 0000000..3523b25 --- /dev/null +++ b/src/libs/modal-templates.js @@ -0,0 +1,35 @@ + +export default function modalTemplates(id, callback, componentKey) { + const h = this.$createElement + return new Promise((resolve, reject) => { + this.$msgbox({ + title: '运费模板', + customClass: 'upload-form-temp', + closeOnClickModal: false, + showClose: false, + message: h('div', { class: 'common-form-upload' }, [ + h('templatesFrom', { + props: { + tempId: id, + componentKey: componentKey + }, + on: { + getList() { + callback() + } + } + }) + ]), + showCancelButton: false, + showConfirmButton: false + }).then(() => { + resolve() + }).catch(() => { + reject() + this.$message({ + type: 'info', + message: '已取消' + }) + }) + }) +} diff --git a/src/main.js b/src/main.js index 04f7a1b..8be1718 100644 --- a/src/main.js +++ b/src/main.js @@ -25,6 +25,9 @@ import FormCreate from "@form-create/element-ui"; import uploadPicture from "./components/uploadPicture/uploadFrom"; import VueUeditorWrap from "vue-ueditor-wrap"; import newsCategory from "./components/newsCategory/newsCategoryFrom"; +import couponList from './components/couponList' +import attrFrom from './components/attrFrom' +import templatesFrom from './components/templatesFrom' import { getToken } from "./utils/auth"; import "./icons"; // icon @@ -36,6 +39,9 @@ import { modalSure, deleteSure } from "@/libs/public"; import { modalSureDelete } from "@/libs/public"; import * as filters from "./filters"; import notice from "@/libs/notice"; +import modalCoupon from '@/libs/modal-coupon' +import modalAttr from '@/libs/modal-attr' +import modalTemplates from '@/libs/modal-templates' import guidancePop from "@/components/guidancePop"; // swiper import VueAwesomeSwiper from "vue-awesome-swiper"; @@ -45,6 +51,9 @@ Vue.use(uploadPicture); Vue.use(FormCreate); Vue.use(newsCategory); Vue.component("vue-ueditor-wrap", VueUeditorWrap); +Vue.component('couponList', couponList) +Vue.component('attrFrom', attrFrom) +Vue.component('templatesFrom', templatesFrom) Vue.use(VueAwesomeSwiper); Vue.use(Viewer, { defaultOptions: { @@ -72,6 +81,9 @@ Vue.prototype.$videoCloud = videoCloud; Vue.prototype.$modalSure = modalSure; Vue.prototype.$deleteSure = deleteSure; Vue.prototype.$modalSureDelete = modalSureDelete; +Vue.prototype.$modalCoupon = modalCoupon +Vue.prototype.$modalAttr = modalAttr +Vue.prototype.$modalTemplates = modalTemplates Vue.prototype.moment = Moment; Vue.component('guidancePop',guidancePop); diff --git a/src/router/modules/product.js b/src/router/modules/product.js index 6c91d8e..070e9e7 100644 --- a/src/router/modules/product.js +++ b/src/router/modules/product.js @@ -123,7 +123,17 @@ const productRouter = noCache: true }, component: () => import('@/views/product/productGuarantee/index.vue') - } + }, + { + path: 'addProduct/:id?/:edit?', + component: () => import('@/views/product/addProduct/index'), + name: 'AddProduct', + meta: { + title: '商品添加', + noCache: true + }, + hidden: true + }, ] } diff --git a/src/styles/styles.scss b/src/styles/styles.scss index 01f1917..4755e71 100644 --- a/src/styles/styles.scss +++ b/src/styles/styles.scss @@ -438,7 +438,7 @@ table .el-image{ height: 46px!important; line-height: 46px!important; font-size: 13px; - padding-left: 0!important; + padding-left: 0!important; } .styleTwo .el-submenu__title{ @@ -453,7 +453,7 @@ table .el-image{ background: #77777D!important; .el-submenu__title{ background: #77777D!important; - } + } } .styleTwo .router-link-active{ background: #ffffff; @@ -464,3 +464,10 @@ table .el-image{ .el-slider__button-wrapper{ z-index: 100 } +.upload-form-coupon{ + min-width: 1100px!important; + max-height:700px!important; +} +.upload-form-temp{ + min-width: 1000px!important; +} diff --git a/src/views/product/addProduct/addCarMy.vue b/src/views/product/addProduct/addCarMy.vue new file mode 100644 index 0000000..5882096 --- /dev/null +++ b/src/views/product/addProduct/addCarMy.vue @@ -0,0 +1,260 @@ + + + + diff --git a/src/views/product/addProduct/copyRecord.vue b/src/views/product/addProduct/copyRecord.vue new file mode 100644 index 0000000..05be5fc --- /dev/null +++ b/src/views/product/addProduct/copyRecord.vue @@ -0,0 +1,102 @@ + + + + + diff --git a/src/views/product/addProduct/index.vue b/src/views/product/addProduct/index.vue new file mode 100644 index 0000000..a69eec4 --- /dev/null +++ b/src/views/product/addProduct/index.vue @@ -0,0 +1,3299 @@ + + + + diff --git a/src/views/product/addProduct/taoBao.vue b/src/views/product/addProduct/taoBao.vue new file mode 100644 index 0000000..e7c035d --- /dev/null +++ b/src/views/product/addProduct/taoBao.vue @@ -0,0 +1,800 @@ + + + + + diff --git a/src/views/product/productExamine/index.vue b/src/views/product/productExamine/index.vue index 4292842..0389c45 100644 --- a/src/views/product/productExamine/index.vue +++ b/src/views/product/productExamine/index.vue @@ -1,6 +1,7 @@