zouzexu 6 місяців тому
батько
коміт
9cd4d94e42
70 змінених файлів з 0 додано та 11151 видалено
  1. 0 53
      src/api/brand.js
  2. 0 7
      src/api/companyAddress.js
  3. 0 38
      src/api/coupon.js
  4. 0 8
      src/api/couponHistory.js
  5. 0 35
      src/api/flash.js
  6. 0 28
      src/api/flashProductRelation.js
  7. 0 48
      src/api/flashSession.js
  8. 0 43
      src/api/homeAdvertise.js
  9. 0 40
      src/api/homeBrand.js
  10. 0 40
      src/api/homeSubject.js
  11. 0 40
      src/api/hotProduct.js
  12. 0 8
      src/api/memberLevel.js
  13. 0 40
      src/api/newProduct.js
  14. 0 63
      src/api/order.js
  15. 0 15
      src/api/orderSetting.js
  16. 0 7
      src/api/prefrenceArea.js
  17. 0 72
      src/api/product.js
  18. 0 45
      src/api/productAttr.js
  19. 0 37
      src/api/productAttrCate.js
  20. 0 60
      src/api/productCate.js
  21. 0 30
      src/api/returnApply.js
  22. 0 47
      src/api/returnReason.js
  23. 0 16
      src/api/skuStock.js
  24. 0 15
      src/api/subject.js
  25. 0 387
      src/views/oms/apply/applyDetail.vue
  26. 0 275
      src/views/oms/apply/index.vue
  27. 0 273
      src/views/oms/apply/reason.vue
  28. 0 59
      src/views/oms/order/components/logisticsDialog.vue
  29. 0 99
      src/views/oms/order/deliverOrderList.vue
  30. 0 463
      src/views/oms/order/index.vue
  31. 0 714
      src/views/oms/order/orderDetail.vue
  32. 0 127
      src/views/oms/order/setting.vue
  33. 0 14
      src/views/pms/brand/add.vue
  34. 0 145
      src/views/pms/brand/components/BrandDetail.vue
  35. 0 309
      src/views/pms/brand/index.vue
  36. 0 14
      src/views/pms/brand/update.vue
  37. 0 12
      src/views/pms/product/add.vue
  38. 0 640
      src/views/pms/product/components/ProductAttrDetail.vue
  39. 0 188
      src/views/pms/product/components/ProductDetail.vue
  40. 0 200
      src/views/pms/product/components/ProductInfoDetail.vue
  41. 0 145
      src/views/pms/product/components/ProductRelationDetail.vue
  42. 0 306
      src/views/pms/product/components/ProductSaleDetail.vue
  43. 0 649
      src/views/pms/product/index.vue
  44. 0 12
      src/views/pms/product/update.vue
  45. 0 15
      src/views/pms/productAttr/addProductAttr.vue
  46. 0 185
      src/views/pms/productAttr/components/ProductAttrDetail.vue
  47. 0 210
      src/views/pms/productAttr/index.vue
  48. 0 219
      src/views/pms/productAttr/productAttrList.vue
  49. 0 15
      src/views/pms/productAttr/updateProductAttr.vue
  50. 0 14
      src/views/pms/productCate/add.vue
  51. 0 264
      src/views/pms/productCate/components/ProductCateDetail.vue
  52. 0 230
      src/views/pms/productCate/index.vue
  53. 0 14
      src/views/pms/productCate/update.vue
  54. 0 13
      src/views/sms/advertise/add.vue
  55. 0 185
      src/views/sms/advertise/components/HomeAdvertiseDetail.vue
  56. 0 307
      src/views/sms/advertise/index.vue
  57. 0 13
      src/views/sms/advertise/update.vue
  58. 0 434
      src/views/sms/brand/index.vue
  59. 0 14
      src/views/sms/coupon/add.vue
  60. 0 375
      src/views/sms/coupon/components/CouponDetail.vue
  61. 0 313
      src/views/sms/coupon/history.vue
  62. 0 254
      src/views/sms/coupon/index.vue
  63. 0 14
      src/views/sms/coupon/update.vue
  64. 0 296
      src/views/sms/flash/index.vue
  65. 0 311
      src/views/sms/flash/productRelationList.vue
  66. 0 83
      src/views/sms/flash/selectSessionList.vue
  67. 0 208
      src/views/sms/flash/sessionList.vue
  68. 0 430
      src/views/sms/hot/index.vue
  69. 0 430
      src/views/sms/new/index.vue
  70. 0 439
      src/views/sms/subject/index.vue

+ 0 - 53
src/api/brand.js

@@ -1,53 +0,0 @@
-import request from '@/utils/request'
-export function fetchList(params) {
-  return request({
-    url:'/brand/list',
-    method:'get',
-    params:params
-  })
-}
-export function createBrand(data) {
-  return request({
-    url:'/brand/create',
-    method:'post',
-    data:data
-  })
-}
-export function updateShowStatus(data) {
-  return request({
-    url:'/brand/update/showStatus',
-    method:'post',
-    data:data
-  })
-}
-
-export function updateFactoryStatus(data) {
-  return request({
-    url:'/brand/update/factoryStatus',
-    method:'post',
-    data:data
-  })
-}
-
-export function deleteBrand(id) {
-  return request({
-    url:'/brand/delete/'+id,
-    method:'get',
-  })
-}
-
-export function getBrand(id) {
-  return request({
-    url:'/brand/'+id,
-    method:'get',
-  })
-}
-
-export function updateBrand(id,data) {
-  return request({
-    url:'/brand/update/'+id,
-    method:'post',
-    data:data
-  })
-}
-

+ 0 - 7
src/api/companyAddress.js

@@ -1,7 +0,0 @@
-import request from '@/utils/request'
-export function fetchList() {
-  return request({
-    url:'/companyAddress/list',
-    method:'get'
-  })
-}

+ 0 - 38
src/api/coupon.js

@@ -1,38 +0,0 @@
-import request from '@/utils/request'
-export function fetchList(params) {
-  return request({
-    url:'/coupon/list',
-    method:'get',
-    params:params
-  })
-}
-
-export function createCoupon(data) {
-  return request({
-    url:'/coupon/create',
-    method:'post',
-    data:data
-  })
-}
-
-export function getCoupon(id) {
-  return request({
-    url:'/coupon/'+id,
-    method:'get',
-  })
-}
-
-export function updateCoupon(id,data) {
-  return request({
-    url:'/coupon/update/'+id,
-    method:'post',
-    data:data
-  })
-}
-
-export function deleteCoupon(id) {
-  return request({
-    url:'/coupon/delete/'+id,
-    method:'post',
-  })
-}

+ 0 - 8
src/api/couponHistory.js

@@ -1,8 +0,0 @@
-import request from '@/utils/request'
-export function fetchList(params) {
-  return request({
-    url:'/couponHistory/list',
-    method:'get',
-    params:params
-  })
-}

+ 0 - 35
src/api/flash.js

@@ -1,35 +0,0 @@
-import request from '@/utils/request'
-export function fetchList(params) {
-  return request({
-    url:'/flash/list',
-    method:'get',
-    params:params
-  })
-}
-export function updateStatus(id,params) {
-  return request({
-    url:'/flash/update/status/'+id,
-    method:'post',
-    params:params
-  })
-}
-export function deleteFlash(id) {
-  return request({
-    url:'/flash/delete/'+id,
-    method:'post'
-  })
-}
-export function createFlash(data) {
-  return request({
-    url:'/flash/create',
-    method:'post',
-    data:data
-  })
-}
-export function updateFlash(id,data) {
-  return request({
-    url:'/flash/update/'+id,
-    method:'post',
-    data:data
-  })
-}

+ 0 - 28
src/api/flashProductRelation.js

@@ -1,28 +0,0 @@
-import request from '@/utils/request'
-export function fetchList(params) {
-  return request({
-    url:'/flashProductRelation/list',
-    method:'get',
-    params:params
-  })
-}
-export function createFlashProductRelation(data) {
-  return request({
-    url:'/flashProductRelation/create',
-    method:'post',
-    data:data
-  })
-}
-export function deleteFlashProductRelation(id) {
-  return request({
-    url:'/flashProductRelation/delete/'+id,
-    method:'post'
-  })
-}
-export function updateFlashProductRelation(id,data) {
-  return request({
-    url:'/flashProductRelation/update/'+id,
-    method:'post',
-    data:data
-  })
-}

+ 0 - 48
src/api/flashSession.js

@@ -1,48 +0,0 @@
-import request from '@/utils/request'
-
-export function fetchList(params) {
-  return request({
-    url: '/flashSession/list',
-    method: 'get',
-    params: params
-  })
-}
-
-export function fetchSelectList(params) {
-  return request({
-    url: '/flashSession/selectList',
-    method: 'get',
-    params: params
-  })
-}
-
-export function updateStatus(id, params) {
-  return request({
-    url: '/flashSession/update/status/' + id,
-    method: 'post',
-    params: params
-  })
-}
-
-export function deleteSession(id) {
-  return request({
-    url: '/flashSession/delete/' + id,
-    method: 'post'
-  })
-}
-
-export function createSession(data) {
-  return request({
-    url: '/flashSession/create',
-    method: 'post',
-    data: data
-  })
-}
-
-export function updateSession(id, data) {
-  return request({
-    url: '/flashSession/update/' + id,
-    method: 'post',
-    data: data
-  })
-}

+ 0 - 43
src/api/homeAdvertise.js

@@ -1,43 +0,0 @@
-import request from '@/utils/request'
-export function fetchList(params) {
-  return request({
-    url:'/home/advertise/list',
-    method:'get',
-    params:params
-  })
-}
-export function updateStatus(id,params) {
-  return request({
-    url:'/home/advertise/update/status/'+id,
-    method:'post',
-    params:params
-  })
-}
-export function deleteHomeAdvertise(data) {
-  return request({
-    url:'/home/advertise/delete',
-    method:'post',
-    data:data
-  })
-}
-export function createHomeAdvertise(data) {
-  return request({
-    url:'/home/advertise/create',
-    method:'post',
-    data:data
-  })
-}
-export function getHomeAdvertise(id) {
-  return request({
-    url:'/home/advertise/'+id,
-    method:'get',
-  })
-}
-
-export function updateHomeAdvertise(id,data) {
-  return request({
-    url:'/home/advertise/update/'+id,
-    method:'post',
-    data:data
-  })
-}

+ 0 - 40
src/api/homeBrand.js

@@ -1,40 +0,0 @@
-import request from '@/utils/request'
-export function fetchList(params) {
-  return request({
-    url:'/home/brand/list',
-    method:'get',
-    params:params
-  })
-}
-
-export function updateRecommendStatus(data) {
-  return request({
-    url:'/home/brand/update/recommendStatus',
-    method:'post',
-    data:data
-  })
-}
-
-export function deleteHomeBrand(data) {
-  return request({
-    url:'/home/brand/delete',
-    method:'post',
-    data:data
-  })
-}
-
-export function createHomeBrand(data) {
-  return request({
-    url:'/home/brand/create',
-    method:'post',
-    data:data
-  })
-}
-
-export function updateHomeBrandSort(params) {
-  return request({
-    url:'/home/brand/update/sort/'+params.id,
-    method:'post',
-    params:params
-  })
-}

+ 0 - 40
src/api/homeSubject.js

@@ -1,40 +0,0 @@
-import request from '@/utils/request'
-export function fetchList(params) {
-  return request({
-    url:'/home/recommendSubject/list',
-    method:'get',
-    params:params
-  })
-}
-
-export function updateRecommendStatus(data) {
-  return request({
-    url:'/home/recommendSubject/update/recommendStatus',
-    method:'post',
-    data:data
-  })
-}
-
-export function deleteHomeSubject(data) {
-  return request({
-    url:'/home/recommendSubject/delete',
-    method:'post',
-    data:data
-  })
-}
-
-export function createHomeSubject(data) {
-  return request({
-    url:'/home/recommendSubject/create',
-    method:'post',
-    data:data
-  })
-}
-
-export function updateHomeSubjectSort(params) {
-  return request({
-    url:'/home/recommendSubject/update/sort/'+params.id,
-    method:'post',
-    params:params
-  })
-}

+ 0 - 40
src/api/hotProduct.js

@@ -1,40 +0,0 @@
-import request from '@/utils/request'
-export function fetchList(params) {
-  return request({
-    url:'/home/recommendProduct/list',
-    method:'get',
-    params:params
-  })
-}
-
-export function updateRecommendStatus(data) {
-  return request({
-    url:'/home/recommendProduct/update/recommendStatus',
-    method:'post',
-    data:data
-  })
-}
-
-export function deleteHotProduct(data) {
-  return request({
-    url:'/home/recommendProduct/delete',
-    method:'post',
-    data:data
-  })
-}
-
-export function createHotProduct(data) {
-  return request({
-    url:'/home/recommendProduct/create',
-    method:'post',
-    data:data
-  })
-}
-
-export function updateHotProductSort(params) {
-  return request({
-    url:'/home/recommendProduct/update/sort/'+params.id,
-    method:'post',
-    params:params
-  })
-}

+ 0 - 8
src/api/memberLevel.js

@@ -1,8 +0,0 @@
-import request from '@/utils/request'
-export function fetchList(params) {
-  return request({
-    url:'/memberLevel/list',
-    method:'get',
-    params:params
-  })
-}

+ 0 - 40
src/api/newProduct.js

@@ -1,40 +0,0 @@
-import request from '@/utils/request'
-export function fetchList(params) {
-  return request({
-    url:'/home/newProduct/list',
-    method:'get',
-    params:params
-  })
-}
-
-export function updateRecommendStatus(data) {
-  return request({
-    url:'/home/newProduct/update/recommendStatus',
-    method:'post',
-    data:data
-  })
-}
-
-export function deleteNewProduct(data) {
-  return request({
-    url:'/home/newProduct/delete',
-    method:'post',
-    data:data
-  })
-}
-
-export function createNewProduct(data) {
-  return request({
-    url:'/home/newProduct/create',
-    method:'post',
-    data:data
-  })
-}
-
-export function updateNewProductSort(params) {
-  return request({
-    url:'/home/newProduct/update/sort/'+params.id,
-    method:'post',
-    params:params
-  })
-}

+ 0 - 63
src/api/order.js

@@ -1,63 +0,0 @@
-import request from '@/utils/request'
-export function fetchList(params) {
-  return request({
-    url:'/order/list',
-    method:'get',
-    params:params
-  })
-}
-
-export function closeOrder(params) {
-  return request({
-    url:'/order/update/close',
-    method:'post',
-    params:params
-  })
-}
-
-export function deleteOrder(params) {
-  return request({
-    url:'/order/delete',
-    method:'post',
-    params:params
-  })
-}
-
-export function deliveryOrder(data) {
-  return request({
-    url:'/order/update/delivery',
-    method:'post',
-    data:data
-  });
-}
-
-export function getOrderDetail(id) {
-  return request({
-    url:'/order/'+id,
-    method:'get'
-  });
-}
-
-export function updateReceiverInfo(data) {
-  return request({
-    url:'/order/update/receiverInfo',
-    method:'post',
-    data:data
-  });
-}
-
-export function updateMoneyInfo(data) {
-  return request({
-    url:'/order/update/moneyInfo',
-    method:'post',
-    data:data
-  });
-}
-
-export function updateOrderNote(params) {
-  return request({
-    url:'/order/update/note',
-    method:'post',
-    params:params
-  })
-}

+ 0 - 15
src/api/orderSetting.js

@@ -1,15 +0,0 @@
-import request from '@/utils/request'
-export function getOrderSetting(id) {
-  return request({
-    url:'/orderSetting/'+id,
-    method:'get',
-  })
-}
-
-export function updateOrderSetting(id,data) {
-  return request({
-    url:'/orderSetting/update/'+id,
-    method:'post',
-    data:data
-  })
-}

+ 0 - 7
src/api/prefrenceArea.js

@@ -1,7 +0,0 @@
-import request from '@/utils/request'
-export function fetchList() {
-  return request({
-    url:'/prefrenceArea/listAll',
-    method:'get',
-  })
-}

+ 0 - 72
src/api/product.js

@@ -1,72 +0,0 @@
-import request from '@/utils/request'
-export function fetchList(params) {
-  return request({
-    url:'/product/list',
-    method:'get',
-    params:params
-  })
-}
-
-export function fetchSimpleList(params) {
-  return request({
-    url:'/product/simpleList',
-    method:'get',
-    params:params
-  })
-}
-
-export function updateDeleteStatus(params) {
-  return request({
-    url:'/product/update/deleteStatus',
-    method:'post',
-    params:params
-  })
-}
-
-export function updateNewStatus(params) {
-  return request({
-    url:'/product/update/newStatus',
-    method:'post',
-    params:params
-  })
-}
-
-export function updateRecommendStatus(params) {
-  return request({
-    url:'/product/update/recommendStatus',
-    method:'post',
-    params:params
-  })
-}
-
-export function updatePublishStatus(params) {
-  return request({
-    url:'/product/update/publishStatus',
-    method:'post',
-    params:params
-  })
-}
-
-export function createProduct(data) {
-  return request({
-    url:'/product/create',
-    method:'post',
-    data:data
-  })
-}
-
-export function updateProduct(id,data) {
-  return request({
-    url:'/product/update/'+id,
-    method:'post',
-    data:data
-  })
-}
-
-export function getProduct(id) {
-  return request({
-    url:'/product/updateInfo/'+id,
-    method:'get',
-  })
-}
-

+ 0 - 45
src/api/productAttr.js

@@ -1,45 +0,0 @@
-import request from '@/utils/request'
-export function fetchList(cid,params) {
-  return request({
-    url:'/productAttribute/list/'+cid,
-    method:'get',
-    params:params
-  })
-}
-
-export function deleteProductAttr(data) {
-  return request({
-    url:'/productAttribute/delete',
-    method:'post',
-    data:data
-  })
-}
-
-export function createProductAttr(data) {
-  return request({
-    url:'/productAttribute/create',
-    method:'post',
-    data:data
-  })
-}
-
-export function updateProductAttr(id,data) {
-  return request({
-    url:'/productAttribute/update/'+id,
-    method:'post',
-    data:data
-  })
-}
-export function getProductAttr(id) {
-  return request({
-    url:'/productAttribute/'+id,
-    method:'get'
-  })
-}
-
-export function getProductAttrInfo(productCategoryId) {
-  return request({
-    url:'/productAttribute/attrInfo/'+productCategoryId,
-    method:'get'
-  })
-}

+ 0 - 37
src/api/productAttrCate.js

@@ -1,37 +0,0 @@
-import request from '@/utils/request'
-export function fetchList(params) {
-  return request({
-    url:'/productAttribute/category/list',
-    method:'get',
-    params:params
-  })
-}
-
-export function createProductAttrCate(data) {
-  return request({
-    url:'/productAttribute/category/create',
-    method:'post',
-    data:data
-  })
-}
-
-export function deleteProductAttrCate(id) {
-  return request({
-    url:'/productAttribute/category/delete/'+id,
-    method:'get'
-  })
-}
-
-export function updateProductAttrCate(id,data) {
-  return request({
-    url:'/productAttribute/category/update/'+id,
-    method:'post',
-    data:data
-  })
-}
-export function fetchListWithAttr() {
-  return request({
-    url:'/productAttribute/category/list/withAttr',
-    method:'get'
-  })
-}

+ 0 - 60
src/api/productCate.js

@@ -1,60 +0,0 @@
-import request from '@/utils/request'
-export function fetchList(parentId,params) {
-  return request({
-    url:'/productCategory/list/'+parentId,
-    method:'get',
-    params:params
-  })
-}
-export function deleteProductCate(id) {
-  return request({
-    url:'/productCategory/delete/'+id,
-    method:'post'
-  })
-}
-
-export function createProductCate(data) {
-  return request({
-    url:'/productCategory/create',
-    method:'post',
-    data:data
-  })
-}
-
-export function updateProductCate(id,data) {
-  return request({
-    url:'/productCategory/update/'+id,
-    method:'post',
-    data:data
-  })
-}
-
-export function getProductCate(id) {
-  return request({
-    url:'/productCategory/'+id,
-    method:'get',
-  })
-}
-
-export function updateShowStatus(data) {
-  return request({
-    url:'/productCategory/update/showStatus',
-    method:'post',
-    data:data
-  })
-}
-
-export function updateNavStatus(data) {
-  return request({
-    url:'/productCategory/update/navStatus',
-    method:'post',
-    data:data
-  })
-}
-
-export function fetchListWithChildren() {
-  return request({
-    url:'/productCategory/list/withChildren',
-    method:'get'
-  })
-}

+ 0 - 30
src/api/returnApply.js

@@ -1,30 +0,0 @@
-import request from '@/utils/request'
-export function fetchList(params) {
-  return request({
-    url:'/returnApply/list',
-    method:'get',
-    params:params
-  })
-}
-
-export function deleteApply(params) {
-  return request({
-    url:'/returnApply/delete',
-    method:'post',
-    params:params
-  })
-}
-export function updateApplyStatus(id,data) {
-  return request({
-    url:'/returnApply/update/status/'+id,
-    method:'post',
-    data:data
-  })
-}
-
-export function getApplyDetail(id) {
-  return request({
-    url:'/returnApply/'+id,
-    method:'get'
-  })
-}

+ 0 - 47
src/api/returnReason.js

@@ -1,47 +0,0 @@
-import request from '@/utils/request'
-export function fetchList(params) {
-  return request({
-    url:'/returnReason/list',
-    method:'get',
-    params:params
-  })
-}
-
-export function deleteReason(params) {
-  return request({
-    url:'/returnReason/delete',
-    method:'post',
-    params:params
-  })
-}
-
-export function updateStatus(params) {
-  return request({
-    url:'/returnReason/update/status',
-    method:'post',
-    params:params
-  })
-}
-
-export function addReason(data) {
-  return request({
-    url:'/returnReason/create',
-    method:'post',
-    data:data
-  })
-}
-
-export function getReasonDetail(id) {
-  return request({
-    url:'/returnReason/'+id,
-    method:'get'
-  })
-}
-
-export function updateReason(id,data) {
-  return request({
-    url:'/returnReason/update/'+id,
-    method:'post',
-    data:data
-  })
-}

+ 0 - 16
src/api/skuStock.js

@@ -1,16 +0,0 @@
-import request from '@/utils/request'
-export function fetchList(pid,params) {
-  return request({
-    url:'/sku/'+pid,
-    method:'get',
-    params:params
-  })
-}
-
-export function update(pid,data) {
-  return request({
-    url:'/sku/update/'+pid,
-    method:'post',
-    data:data
-  })
-}

+ 0 - 15
src/api/subject.js

@@ -1,15 +0,0 @@
-import request from '@/utils/request'
-export function fetchListAll() {
-  return request({
-    url:'/subject/listAll',
-    method:'get',
-  })
-}
-
-export function fetchList(params) {
-  return request({
-    url:'/subject/list',
-    method:'get',
-    params:params
-  })
-}

+ 0 - 387
src/views/oms/apply/applyDetail.vue

@@ -1,387 +0,0 @@
-<template>
-  <div class="detail-container">
-    <el-card shadow="never">
-      <span class="font-title-medium">退货商品</span>
-      <el-table
-        border
-        class="standard-margin"
-        ref="productTable"
-        :data="productList">
-        <el-table-column label="商品图片" width="160" align="center">
-          <template slot-scope="scope">
-            <img style="height:80px" :src="scope.row.productPic">
-          </template>
-        </el-table-column>
-        <el-table-column label="商品名称" align="center">
-          <template slot-scope="scope">
-            <span class="font-small">{{scope.row.productName}}</span><br>
-            <span class="font-small">品牌:{{scope.row.productBrand}}</span>
-          </template>
-        </el-table-column>
-        <el-table-column label="价格/货号" width="180" align="center">
-          <template slot-scope="scope">
-            <span class="font-small">价格:¥{{scope.row.productRealPrice}}</span><br>
-            <span class="font-small">货号:NO.{{scope.row.productId}}</span>
-          </template>
-        </el-table-column>
-        <el-table-column label="属性" width="180" align="center">
-          <template slot-scope="scope">{{scope.row.productAttr}}</template>
-        </el-table-column>
-        <el-table-column label="数量" width="100" align="center">
-          <template slot-scope="scope">{{scope.row.productCount}}</template>
-        </el-table-column>
-        <el-table-column label="小计" width="100" align="center">
-          <template slot-scope="scope">¥{{totalAmount}}</template>
-        </el-table-column>
-      </el-table>
-      <div style="float:right;margin-top:15px;margin-bottom:15px">
-        <span class="font-title-medium">合计:</span>
-        <span class="font-title-medium color-danger">¥{{totalAmount}}</span>
-      </div>
-    </el-card>
-    <el-card shadow="never" class="standard-margin">
-      <span class="font-title-medium">服务单信息</span>
-      <div class="form-container-border">
-        <el-row>
-          <el-col :span="6" class="form-border form-left-bg font-small">服务单号</el-col>
-          <el-col class="form-border font-small" :span="18">{{orderReturnApply.id}}</el-col>
-        </el-row>
-        <el-row>
-          <el-col class="form-border form-left-bg font-small" :span="6">申请状态</el-col>
-          <el-col class="form-border font-small" :span="18">{{orderReturnApply.status | formatStatus}}</el-col>
-        </el-row>
-        <el-row>
-          <el-col :span="6" class="form-border form-left-bg font-small" style="height:50px;line-height:30px">订单编号
-          </el-col>
-          <el-col class="form-border font-small" :span="18" style="height:50px">
-            {{orderReturnApply.orderSn}}
-            <el-button type="text" size="small" @click="handleViewOrder">查看</el-button>
-          </el-col>
-        </el-row>
-        <el-row>
-          <el-col class="form-border form-left-bg font-small" :span="6">申请时间</el-col>
-          <el-col class="form-border font-small" :span="18">{{orderReturnApply.createTime | formatTime}}</el-col>
-        </el-row>
-        <el-row>
-          <el-col class="form-border form-left-bg font-small" :span="6">用户账号</el-col>
-          <el-col class="form-border font-small" :span="18">{{orderReturnApply.memberUsername}}</el-col>
-        </el-row>
-        <el-row>
-          <el-col class="form-border form-left-bg font-small" :span="6">联系人</el-col>
-          <el-col class="form-border font-small" :span="18">{{orderReturnApply.returnName}}</el-col>
-        </el-row>
-        <el-row>
-          <el-col class="form-border form-left-bg font-small" :span="6">联系电话</el-col>
-          <el-col class="form-border font-small" :span="18">{{orderReturnApply.returnPhone}}</el-col>
-        </el-row>
-        <el-row>
-          <el-col class="form-border form-left-bg font-small" :span="6">退货原因</el-col>
-          <el-col class="form-border font-small" :span="18">{{orderReturnApply.reason}}</el-col>
-        </el-row>
-        <el-row>
-          <el-col class="form-border form-left-bg font-small" :span="6">问题描述</el-col>
-          <el-col class="form-border font-small" :span="18">{{orderReturnApply.description}}</el-col>
-        </el-row>
-        <el-row>
-          <el-col class="form-border form-left-bg font-small" :span="6" style="height:100px;line-height:80px">凭证图片
-          </el-col>
-          <el-col class="form-border font-small" :span="18" style="height:100px">
-            <img v-for="item in proofPics" style="width:80px;height:80px" :src="item">
-          </el-col>
-        </el-row>
-      </div>
-      <div class="form-container-border">
-        <el-row>
-          <el-col class="form-border form-left-bg font-small" :span="6">订单金额</el-col>
-          <el-col class="form-border font-small" :span="18">¥{{totalAmount}}</el-col>
-        </el-row>
-        <el-row>
-          <el-col class="form-border form-left-bg font-small" :span="6" style="height:52px;line-height:32px">确认退款金额
-          </el-col>
-          <el-col class="form-border font-small" style="height:52px" :span="18">
-            ¥
-            <el-input size="small" v-model="updateStatusParam.returnAmount"
-                      :disabled="orderReturnApply.status!==0"
-                      style="width:200px;margin-left: 10px"></el-input>
-          </el-col>
-        </el-row>
-        <div v-show="orderReturnApply.status!==3">
-        <el-row>
-          <el-col class="form-border form-left-bg font-small" :span="6" style="height:52px;line-height:32px">选择收货点
-          </el-col>
-          <el-col class="form-border font-small" style="height:52px" :span="18">
-            <el-select size="small"
-                       style="width:200px"
-                       :disabled="orderReturnApply.status!==0"
-                       v-model="updateStatusParam.companyAddressId">
-              <el-option v-for="address in companyAddressList"
-                         :key="address.id"
-                         :value="address.id"
-                         :label="address.addressName">
-              </el-option>
-            </el-select>
-          </el-col>
-        </el-row>
-        <el-row>
-          <el-col class="form-border form-left-bg font-small" :span="6">收货人姓名</el-col>
-          <el-col class="form-border font-small" :span="18">{{currentAddress.name}}</el-col>
-        </el-row>
-        <el-row>
-          <el-col class="form-border form-left-bg font-small" :span="6">所在区域</el-col>
-          <el-col class="form-border font-small" :span="18">{{currentAddress | formatRegion}}</el-col>
-        </el-row>
-        <el-row>
-          <el-col class="form-border form-left-bg font-small" :span="6">详细地址</el-col>
-          <el-col class="form-border font-small" :span="18">{{currentAddress.detailAddress}}</el-col>
-        </el-row>
-        <el-row>
-          <el-col class="form-border form-left-bg font-small" :span="6">联系电话</el-col>
-          <el-col class="form-border font-small" :span="18">{{currentAddress.phone}}</el-col>
-        </el-row>
-        </div>
-      </div>
-      <div class="form-container-border" v-show="orderReturnApply.status!==0">
-        <el-row>
-          <el-col class="form-border form-left-bg font-small" :span="6">处理人员</el-col>
-          <el-col class="form-border font-small" :span="18">{{orderReturnApply.handleMan}}</el-col>
-        </el-row>
-        <el-row>
-          <el-col class="form-border form-left-bg font-small" :span="6">处理时间</el-col>
-          <el-col class="form-border font-small" :span="18">{{orderReturnApply.handleTime | formatTime}}</el-col>
-        </el-row>
-        <el-row>
-          <el-col class="form-border form-left-bg font-small" :span="6">处理备注</el-col>
-          <el-col class="form-border font-small" :span="18">{{orderReturnApply.handleNote}}</el-col>
-        </el-row>
-      </div>
-      <div class="form-container-border" v-show="orderReturnApply.status===2">
-        <el-row>
-          <el-col class="form-border form-left-bg font-small" :span="6">收货人员</el-col>
-          <el-col class="form-border font-small" :span="18">{{orderReturnApply.receiveMan}}</el-col>
-        </el-row>
-        <el-row>
-          <el-col class="form-border form-left-bg font-small" :span="6" >收货时间</el-col>
-          <el-col class="form-border font-small" :span="18">{{orderReturnApply.receiveTime | formatTime}}</el-col>
-        </el-row>
-        <el-row>
-          <el-col class="form-border form-left-bg font-small" :span="6">收货备注</el-col>
-          <el-col class="form-border font-small" :span="18">{{orderReturnApply.receiveNote}}</el-col>
-        </el-row>
-      </div>
-      <div class="form-container-border" v-show="orderReturnApply.status===0">
-        <el-row>
-          <el-col class="form-border form-left-bg font-small" :span="6" style="height:52px;line-height:32px">处理备注</el-col>
-          <el-col class="form-border font-small" :span="18">
-            <el-input  size="small" v-model="updateStatusParam.handleNote" style="width:200px;margin-left: 10px"></el-input>
-          </el-col>
-        </el-row>
-      </div>
-      <div class="form-container-border" v-show="orderReturnApply.status===1">
-        <el-row>
-          <el-col class="form-border form-left-bg font-small" :span="6" style="height:52px;line-height:32px">收货备注</el-col>
-          <el-col class="form-border font-small" :span="18">
-            <el-input  size="small" v-model="updateStatusParam.receiveNote" style="width:200px;margin-left: 10px"></el-input>
-          </el-col>
-        </el-row>
-      </div>
-      <div style="margin-top:15px;text-align: center" v-show="orderReturnApply.status===0">
-        <el-button type="primary" size="small" @click="handleUpdateStatus(1)">确认退货</el-button>
-        <el-button type="danger" size="small" @click="handleUpdateStatus(3)">拒绝退货</el-button>
-      </div>
-      <div style="margin-top:15px;text-align: center" v-show="orderReturnApply.status===1">
-        <el-button type="primary" size="small" @click="handleUpdateStatus(2)">确认收货</el-button>
-      </div>
-    </el-card>
-  </div>
-</template>
-<script>
-  import {getApplyDetail,updateApplyStatus} from '@/api/returnApply';
-  import {fetchList} from '@/api/companyAddress';
-  import {formatDate} from '@/utils/date';
-
-  const defaultUpdateStatusParam = {
-    companyAddressId: null,
-    handleMan: 'admin',
-    handleNote: null,
-    receiveMan: 'admin',
-    receiveNote: null,
-    returnAmount: 0,
-    status: 0
-  };
-  const defaultOrderReturnApply = {
-    id: null,
-    orderId: null,
-    companyAddressId: null,
-    productId: null,
-    orderSn: null,
-    createTime: null,
-    memberUsername: null,
-    returnAmount: null,
-    returnName: null,
-    returnPhone: null,
-    status: null,
-    handleTime: null,
-    productPic: null,
-    productName: null,
-    productBrand: null,
-    productAttr: null,
-    productCount: null,
-    productPrice: null,
-    productRealPrice: null,
-    reason: null,
-    description: null,
-    proofPics: null,
-    handleNote: null,
-    handleMan: null,
-    receiveMan: null,
-    receiveTime: null,
-    receiveNote: null
-  };
-  export default {
-    name: 'returnApplyDetail',
-    data() {
-      return {
-        id: null,
-        orderReturnApply: Object.assign({},defaultOrderReturnApply),
-        productList: null,
-        proofPics: null,
-        updateStatusParam: Object.assign({}, defaultUpdateStatusParam),
-        companyAddressList: null
-      }
-    },
-    created() {
-      this.id = this.$route.query.id;
-      this.getDetail();
-    },
-    computed: {
-      totalAmount() {
-        if (this.orderReturnApply != null) {
-          return this.orderReturnApply.productRealPrice * this.orderReturnApply.productCount;
-        } else {
-          return 0;
-        }
-      },
-      currentAddress() {
-        console.log("currentAddress()");
-        let id = this.updateStatusParam.companyAddressId;
-        if(this.companyAddressList==null)return {};
-        for (let i = 0; i < this.companyAddressList.length; i++) {
-          let address = this.companyAddressList[i];
-          if (address.id === id) {
-            return address;
-          }
-        }
-        return null;
-      }
-    },
-    filters: {
-      formatStatus(status) {
-        if (status === 0) {
-          return "待处理";
-        } else if (status === 1) {
-          return "退货中";
-        } else if (status === 2) {
-          return "已完成";
-        } else {
-          return "已拒绝";
-        }
-      },
-      formatTime(time) {
-        if (time == null || time === '') {
-          return 'N/A';
-        }
-        let date = new Date(time);
-        return formatDate(date, 'yyyy-MM-dd hh:mm:ss')
-      },
-      formatRegion(address) {
-        let str = address.province;
-        if (address.city != null) {
-          str += "  " + address.city;
-        }
-        str += "  " + address.region;
-        return str;
-      }
-    },
-    methods: {
-      handleViewOrder(){
-        this.$router.push({path:'/oms/orderDetail',query:{id:this.orderReturnApply.orderId}});
-      },
-      getDetail() {
-        getApplyDetail(this.id).then(response => {
-          console.log("getDetail")
-          this.orderReturnApply = response.data;
-          this.productList = [];
-          this.productList.push(this.orderReturnApply);
-          if (this.orderReturnApply.proofPics != null) {
-            this.proofPics = this.orderReturnApply.proofPics.split(",")
-          }
-          //退货中和完成
-          if(this.orderReturnApply.status===1||this.orderReturnApply.status===2){
-            this.updateStatusParam.returnAmount=this.orderReturnApply.returnAmount;
-            this.updateStatusParam.companyAddressId=this.orderReturnApply.companyAddressId;
-          }
-          this.getCompanyAddressList();
-        });
-      },
-      getCompanyAddressList() {
-        fetchList().then(response => {
-          console.log("getCompanyAddressList()")
-          this.companyAddressList = response.data;
-          for (let i = 0; i < this.companyAddressList.length; i++) {
-            if (this.companyAddressList[i].receiveStatus === 1&&this.orderReturnApply.status===0) {
-              this.updateStatusParam.companyAddressId = this.companyAddressList[i].id;
-            }
-          }
-        });
-      },
-      handleUpdateStatus(status){
-        this.updateStatusParam.status=status;
-        this.$confirm('是否要进行此操作?', '提示', {
-          confirmButtonText: '确定',
-          cancelButtonText: '取消',
-          type: 'warning'
-        }).then(() => {
-          updateApplyStatus(this.id,this.updateStatusParam).then(response=>{
-            this.$message({
-              type: 'success',
-              message: '操作成功!',
-              duration:1000
-            });
-            this.$router.back();
-          });
-        });
-      }
-    }
-  }
-</script>
-<style scoped>
-  .detail-container {
-    position: absolute;
-    left: 0;
-    right: 0;
-    width: 1080px;
-    padding: 35px 35px 15px 35px;
-    margin: 20px auto;
-  }
-
-  .standard-margin {
-    margin-top: 15px;
-  }
-  .form-border {
-    border-right: 1px solid #DCDFE6;
-    border-bottom: 1px solid #DCDFE6;
-    padding: 10px;
-  }
-
-  .form-container-border {
-    border-left: 1px solid #DCDFE6;
-    border-top: 1px solid #DCDFE6;
-    margin-top: 15px;
-  }
-
-  .form-left-bg {
-    background: #F2F6FC;
-  }
-</style>
-
-

+ 0 - 275
src/views/oms/apply/index.vue

@@ -1,275 +0,0 @@
-<template> 
-  <div class="app-container">
-    <el-card class="filter-container" shadow="never">
-      <div>
-        <i class="el-icon-search"></i>
-        <span>筛选搜索</span>
-        <el-button
-          style="float:right"
-          type="primary"
-          @click="handleSearchList()"
-          size="small">
-          查询搜索
-        </el-button>
-        <el-button
-          style="float:right;margin-right: 15px"
-          @click="handleResetSearch()"
-          size="small">
-          重置
-        </el-button>
-      </div>
-      <div style="margin-top: 15px">
-        <el-form :inline="true" :model="listQuery" size="small" label-width="140px">
-          <el-form-item label="输入搜索:">
-            <el-input v-model="listQuery.id" class="input-width" placeholder="服务单号"></el-input>
-          </el-form-item>
-          <el-form-item label="处理状态:">
-            <el-select v-model="listQuery.status" placeholder="全部" clearable class="input-width">
-              <el-option v-for="item in statusOptions"
-                         :key="item.value"
-                         :label="item.label"
-                         :value="item.value">
-              </el-option>
-            </el-select>
-          </el-form-item>
-          <el-form-item label="申请时间:">
-            <el-date-picker
-              class="input-width"
-              v-model="listQuery.createTime"
-              value-format="yyyy-MM-dd"
-              type="date"
-              placeholder="请选择时间">
-            </el-date-picker>
-          </el-form-item>
-          <el-form-item label="操作人员:">
-            <el-input v-model="listQuery.handleMan" class="input-width" placeholder="全部"></el-input>
-          </el-form-item>
-          <el-form-item label="处理时间:">
-            <el-date-picker
-              class="input-width"
-              v-model="listQuery.handleTime"
-              value-format="yyyy-MM-dd"
-              type="date"
-              placeholder="请选择时间">
-            </el-date-picker>
-          </el-form-item>
-        </el-form>
-      </div>
-    </el-card>
-    <el-card class="operate-container" shadow="never">
-      <i class="el-icon-tickets"></i>
-      <span>数据列表</span>
-    </el-card>
-    <div class="table-container">
-      <el-table ref="returnApplyTable"
-                :data="list"
-                style="width: 100%;"
-                @selection-change="handleSelectionChange"
-                v-loading="listLoading" border>
-        <el-table-column type="selection" width="60" align="center"></el-table-column>
-        <el-table-column label="服务单号" width="180" align="center">
-          <template slot-scope="scope">{{scope.row.id}}</template>
-        </el-table-column>
-        <el-table-column label="申请时间" width="180" align="center">
-          <template slot-scope="scope">{{scope.row.createTime | formatTime}}</template>
-        </el-table-column>
-        <el-table-column label="用户账号" align="center">
-          <template slot-scope="scope">{{scope.row.memberUsername}}</template>
-        </el-table-column>
-        <el-table-column label="退款金额" width="180" align="center">
-          <template slot-scope="scope">¥{{scope.row | formatReturnAmount}}</template>
-        </el-table-column>
-        <el-table-column label="申请状态" width="180" align="center">
-          <template slot-scope="scope">{{scope.row.status | formatStatus}}</template>
-        </el-table-column>
-        <el-table-column label="处理时间" width="180" align="center">
-          <template slot-scope="scope">{{scope.row.handleTime | formatTime}}</template>
-        </el-table-column>
-        <el-table-column label="操作" width="180" align="center">
-          <template slot-scope="scope">
-            <el-button
-            size="mini"
-            @click="handleViewDetail(scope.$index, scope.row)">查看详情</el-button>
-          </template>
-        </el-table-column>
-      </el-table>
-    </div>
-    <div class="batch-operate-container">
-      <el-select
-        size="small"
-        v-model="operateType" placeholder="批量操作">
-        <el-option
-          v-for="item in operateOptions"
-          :key="item.value"
-          :label="item.label"
-          :value="item.value">
-        </el-option>
-      </el-select>
-      <el-button
-        style="margin-left: 20px"
-        class="search-button"
-        @click="handleBatchOperate()"
-        type="primary"
-        size="small">
-        确定
-      </el-button>
-    </div>
-    <div class="pagination-container">
-      <el-pagination
-        background
-        @size-change="handleSizeChange"
-        @current-change="handleCurrentChange"
-        layout="total, sizes,prev, pager, next,jumper"
-        :current-page.sync="listQuery.pageNum"
-        :page-size="listQuery.pageSize"
-        :page-sizes="[5,10,15]"
-        :total="total">
-      </el-pagination>
-    </div>
-  </div>
-</template>
-<script>
-  import {formatDate} from '@/utils/date';
-  import {fetchList,deleteApply} from '@/api/returnApply';
-  const defaultListQuery = {
-    pageNum: 1,
-    pageSize: 10,
-    id: null,
-    receiverKeyword: null,
-    status: null,
-    createTime: null,
-    handleMan: null,
-    handleTime: null
-  };
-  const defaultStatusOptions=[
-    {
-      label: '待处理',
-      value: 0
-    },
-    {
-      label: '退货中',
-      value: 1
-    },
-    {
-      label: '已完成',
-      value: 2
-    },
-    {
-      label: '已拒绝',
-      value: 3
-    }
-  ];
-  export default {
-    name:'returnApplyList',
-    data() {
-      return {
-        listQuery:Object.assign({},defaultListQuery),
-        statusOptions: Object.assign({},defaultStatusOptions),
-        list:null,
-        total:null,
-        listLoading:false,
-        multipleSelection:[],
-        operateType:1,
-        operateOptions: [
-          {
-            label: "批量删除",
-            value: 1
-          }
-        ],
-      }
-    },
-    created(){
-      this.getList();
-    },
-    filters:{
-      formatTime(time) {
-        if(time==null||time===''){
-          return 'N/A';
-        }
-        let date = new Date(time);
-        return formatDate(date, 'yyyy-MM-dd hh:mm:ss')
-      },
-      formatStatus(status){
-        for(let i=0;i<defaultStatusOptions.length;i++){
-          if(status===defaultStatusOptions[i].value){
-            return defaultStatusOptions[i].label;
-          }
-        }
-      },
-      formatReturnAmount(row){
-        return row.productRealPrice*row.productCount;
-      }
-    },
-    methods:{
-      handleSelectionChange(val){
-        this.multipleSelection = val;
-      },
-      handleResetSearch() {
-        this.listQuery = Object.assign({}, defaultListQuery);
-      },
-      handleSearchList() {
-        this.listQuery.pageNum = 1;
-        this.getList();
-      },
-      handleViewDetail(index,row){
-        this.$router.push({path:'/oms/returnApplyDetail',query:{id:row.id}})
-      },
-      handleBatchOperate(){
-        if(this.multipleSelection==null||this.multipleSelection.length<1){
-          this.$message({
-            message: '请选择要操作的申请',
-            type: 'warning',
-            duration: 1000
-          });
-          return;
-        }
-        if(this.operateType===1){
-          //批量删除
-          this.$confirm('是否要进行删除操作?', '提示', {
-            confirmButtonText: '确定',
-            cancelButtonText: '取消',
-            type: 'warning'
-          }).then(() => {
-            let params = new URLSearchParams();
-            let ids=[];
-            for(let i=0;i<this.multipleSelection.length;i++){
-              ids.push(this.multipleSelection[i].id);
-            }
-            params.append("ids",ids);
-            deleteApply(params).then(response=>{
-              this.getList();
-              this.$message({
-                type: 'success',
-                message: '删除成功!'
-              });
-            });
-          })
-        }
-      },
-      handleSizeChange(val){
-        this.listQuery.pageNum = 1;
-        this.listQuery.pageSize = val;
-        this.getList();
-      },
-      handleCurrentChange(val){
-        this.listQuery.pageNum = val;
-        this.getList();
-      },
-      getList(){
-        this.listLoading=true;
-        fetchList(this.listQuery).then(response => {
-          this.listLoading = false;
-          this.list = response.data.list;
-          this.total = response.data.total;
-        });
-      }
-    }
-  }
-</script>
-<style scoped>
-  .input-width {
-    width: 203px;
-  }
-</style>
-
-

+ 0 - 273
src/views/oms/apply/reason.vue

@@ -1,273 +0,0 @@
-<template> 
-  <div class="app-container">
-    <el-card class="operate-container" shadow="never">
-      <i class="el-icon-tickets"></i>
-      <span>数据列表</span>
-      <el-button
-        size="mini"
-        @click="handleAdd"
-        class="btn-add">添加
-      </el-button>
-    </el-card>
-    <div class="table-container">
-      <el-table ref="returnReasonTable"
-                :data="list"
-                style="width: 100%;"
-                @selection-change="handleSelectionChange"
-                v-loading="listLoading" border>
-        <el-table-column type="selection" width="60" align="center"></el-table-column>
-        <el-table-column label="编号" width="80" align="center">
-          <template slot-scope="scope">{{scope.row.id}}</template>
-        </el-table-column>
-        <el-table-column label="原因类型" align="center">
-          <template slot-scope="scope">{{scope.row.name}}</template>
-        </el-table-column>
-        <el-table-column label="排序" width="100" align="center">
-          <template slot-scope="scope">{{scope.row.sort }}</template>
-        </el-table-column>
-        <el-table-column label="是否可用" align="center">
-          <template slot-scope="scope">
-            <el-switch
-              v-model="scope.row.status"
-              @change="handleStatusChange(scope.$index,scope.row)"
-              :active-value="1"
-              :inactive-value="0">
-            </el-switch>
-          </template>
-        </el-table-column>
-        <el-table-column label="添加时间" width="180" align="center">
-          <template slot-scope="scope">{{scope.row.createTime | formatCreateTime}}</template>
-        </el-table-column>
-        <el-table-column label="操作" width="160" align="center">
-          <template slot-scope="scope">
-            <el-button
-              size="mini"
-              @click="handleUpdate(scope.$index, scope.row)">编辑</el-button>
-            <el-button
-              size="mini"
-              @click="handleDelete(scope.$index, scope.row)">删除</el-button>
-          </template>
-        </el-table-column>
-      </el-table>
-    </div>
-    <div class="batch-operate-container">
-      <el-select
-        size="small"
-        v-model="operateType" placeholder="批量操作">
-        <el-option
-          v-for="item in operateOptions"
-          :key="item.value"
-          :label="item.label"
-          :value="item.value">
-        </el-option>
-      </el-select>
-      <el-button
-        style="margin-left: 20px"
-        class="search-button"
-        @click="handleBatchOperate"
-        type="primary"
-        size="small">
-        确定
-      </el-button>
-    </div>
-    <div class="pagination-container">
-      <el-pagination
-        background
-        @size-change="handleSizeChange"
-        @current-change="handleCurrentChange"
-        layout="total, sizes,prev, pager, next,jumper"
-        :current-page.sync="listQuery.pageNum"
-        :page-size="listQuery.pageSize"
-        :page-sizes="[5,10,15]"
-        :total="total">
-      </el-pagination>
-    </div>
-    <el-dialog
-      title="添加退货原因"
-      :visible.sync="dialogVisible" width="30%">
-      <el-form :model="returnReason"
-               ref="reasonForm" label-width="150px">
-        <el-form-item label="原因类型:">
-          <el-input v-model="returnReason.name" class="input-width"></el-input>
-        </el-form-item>
-        <el-form-item label="排序:">
-          <el-input v-model="returnReason.sort" class="input-width"></el-input>
-        </el-form-item>
-        <el-form-item label="是否启用:">
-          <el-switch v-model="returnReason.status" :active-value="1" :inactive-value="0"></el-switch>
-        </el-form-item>
-      </el-form>
-      <span slot="footer" class="dialog-footer">
-        <el-button @click="dialogVisible = false">取 消</el-button>
-        <el-button type="primary" @click="handleConfirm">确 定</el-button>
-      </span>
-    </el-dialog>
-  </div>
-</template>
-<script>
-  import {formatDate} from '@/utils/date';
-  import {fetchList,deleteReason,updateStatus,addReason,getReasonDetail,updateReason} from '@/api/returnReason';
-  const defaultListQuery = {
-    pageNum: 1,
-    pageSize: 5
-  };
-  const defaultReturnReason = {
-    name:null,
-    sort:0,
-    status:1,
-    createTime:null
-  };
-  export default {
-    name: 'returnReasonList',
-    data() {
-      return {
-        list: null,
-        total: null,
-        multipleSelection: [],
-        listLoading:true,
-        listQuery:Object.assign({}, defaultListQuery),
-        operateType:null,
-        operateOptions: [
-          {
-            label: "删除",
-            value: 1
-          }
-        ],
-        dialogVisible:false,
-        returnReason:Object.assign({},defaultReturnReason),
-        operateReasonId:null
-      }
-    },
-    created(){
-      this.getList();
-    },
-    filters:{
-      formatCreateTime(time) {
-        let date = new Date(time);
-        return formatDate(date, 'yyyy-MM-dd hh:mm:ss')
-      }
-    },
-    methods: {
-      handleAdd() {
-        this.dialogVisible=true;
-        this.operateReasonId=null;
-        this.returnReason=Object.assign({},defaultReturnReason);
-      },
-      handleConfirm(){
-        if(this.operateReasonId==null){
-          //添加操作
-          addReason(this.returnReason).then(response=>{
-            this.dialogVisible=false;
-            this.operateReasonId=null;
-            this.$message({
-              message: '添加成功!',
-              type: 'success',
-              duration:1000
-            });
-            this.getList();
-          });
-        }else{
-          //编辑操作
-          updateReason(this.operateReasonId,this.returnReason).then(response=>{
-            this.dialogVisible=false;
-            this.operateReasonId=null;
-            this.$message({
-              message: '修改成功!',
-              type: 'success',
-              duration:1000
-            });
-            this.getList();
-          });
-        }
-      },
-      handleUpdate(index, row){
-        this.dialogVisible=true;
-        this.operateReasonId=row.id;
-        getReasonDetail(row.id).then(response=>{
-          this.returnReason=response.data;
-        });
-      },
-      handleDelete(index, row){
-        let ids=[];
-        ids.push(row.id);
-        this.deleteReason(ids);
-      },
-      handleSelectionChange(val){
-        this.multipleSelection = val;
-      },
-      handleStatusChange(index,row){
-        let ids=[];
-        ids.push(row.id);
-        let param = new URLSearchParams();
-        param.append("status",row.status);
-        param.append("ids",ids);
-        updateStatus(param).then(response=>{
-          this.$message({
-            message: '状态修改成功',
-            type: 'success'
-          });
-        });
-      },
-      handleBatchOperate(){
-        if(this.multipleSelection==null||this.multipleSelection.length<1){
-          this.$message({
-            message: '请选择要操作的条目',
-            type: 'warning',
-            duration: 1000
-          });
-          return;
-        }
-        if(this.operateType===1){
-          let ids=[];
-          for(let i=0;i<this.multipleSelection.length;i++){
-            ids.push(this.multipleSelection[i].id);
-          }
-          this.deleteReason(ids);
-        }
-      },
-      handleSizeChange(val){
-        this.listQuery.pageNum = 1;
-        this.listQuery.pageSize = val;
-        this.getList();
-      },
-      handleCurrentChange(val){
-        this.listQuery.pageNum = val;
-        this.getList();
-      },
-      getList(){
-        this.listLoading = true;
-        fetchList(this.listQuery).then(response => {
-          this.listLoading = false;
-          this.list = response.data.list;
-          this.total = response.data.total;
-        });
-      },
-      deleteReason(ids){
-        this.$confirm('是否要进行该删除操作?', '提示', {
-          confirmButtonText: '确定',
-          cancelButtonText: '取消',
-          type: 'warning'
-        }).then(() => {
-          let params = new URLSearchParams();
-          params.append("ids",ids);
-          deleteReason(params).then(response=>{
-            this.$message({
-              message: '删除成功!',
-              type: 'success',
-              duration: 1000
-            });
-            this.listQuery.pageNum=1;
-            this.getList();
-          });
-        })
-      },
-    }
-  }
-</script>
-<style scoped>
-  .input-width {
-    width: 80%;
-  }
-</style>
-
-

+ 0 - 59
src/views/oms/order/components/logisticsDialog.vue

@@ -1,59 +0,0 @@
-<template> 
-  <el-dialog title="订单跟踪"
-             :visible.sync="visible"
-             :before-close="handleClose"
-             width="40%">
-    <el-steps direction="vertical"
-              :active="6"
-              finish-status="success"
-              space="50px">
-      <el-step  v-for="item in logisticsList"
-                :key="item.name"
-                :title="item.name"
-                :description="item.time"></el-step>
-    </el-steps>
-  </el-dialog>
-</template>
-<script>
-  const defaultLogisticsList=[
-    {name: '订单已提交,等待付款',time:'2017-04-01 12:00:00 '},
-    {name: '订单付款成功',time:'2017-04-01 12:00:00 '},
-    {name: '在北京市进行下级地点扫描,等待付款',time:'2017-04-01 12:00:00 '},
-    {name: '在分拨中心广东深圳公司进行卸车扫描,等待付款',time:'2017-04-01 12:00:00 '},
-    {name: '在广东深圳公司进行发出扫描',time:'2017-04-01 12:00:00 '},
-    {name: '到达目的地网点广东深圳公司,快件将很快进行派送',time:'2017-04-01 12:00:00 '},
-    {name: '订单已签收,期待再次为您服务',time:'2017-04-01 12:00:00 '}
-  ];
-  export default {
-    name:'logisticsDialog',
-    props: {
-      value: Boolean
-    },
-    computed:{
-      visible: {
-        get() {
-          return this.value;
-        },
-        set(visible){
-          this.value=visible;
-        }
-      }
-    },
-    data() {
-      return {
-        logisticsList:Object.assign({},defaultLogisticsList)
-      }
-    },
-    methods:{
-      emitInput(val) {
-        this.$emit('input', val)
-      },
-      handleClose(){
-        this.emitInput(false);
-      }
-    }
-  }
-</script>
-<style></style>
-
-

+ 0 - 99
src/views/oms/order/deliverOrderList.vue

@@ -1,99 +0,0 @@
-<template> 
-  <div class="app-container">
-    <el-card class="operate-container" shadow="never">
-      <i class="el-icon-tickets"></i>
-      <span>发货列表</span>
-    </el-card>
-    <div class="table-container">
-      <el-table ref="deliverOrderTable"
-                style="width: 100%;"
-                :data="list" border>
-        <el-table-column label="订单编号" width="180" align="center">
-          <template slot-scope="scope">{{scope.row.orderSn}}</template>
-        </el-table-column>
-        <el-table-column label="收货人" width="180" align="center">
-          <template slot-scope="scope">{{scope.row.receiverName}}</template>
-        </el-table-column>
-        <el-table-column label="手机号码" width="160" align="center">
-          <template slot-scope="scope">{{scope.row.receiverPhone}}</template>
-        </el-table-column>
-        <el-table-column label="邮政编码" width="160" align="center">
-          <template slot-scope="scope">{{scope.row.receiverPostCode}}</template>
-        </el-table-column>
-        <el-table-column label="收货地址" align="center">
-          <template slot-scope="scope">{{scope.row.address}}</template>
-        </el-table-column>
-        <el-table-column label="配送方式" width="160" align="center">
-          <template slot-scope="scope">
-            <el-select placeholder="请选择物流公司"
-                       v-model="scope.row.deliveryCompany"
-                       size="small">
-              <el-option v-for="item in companyOptions"
-                         :key="item"
-                         :label="item"
-                         :value="item">
-              </el-option>
-            </el-select>
-          </template>
-        </el-table-column>
-        <el-table-column label="物流单号" width="180" align="center">
-          <template slot-scope="scope">
-            <el-input size="small" v-model="scope.row.deliverySn"></el-input>
-          </template>
-        </el-table-column>
-      </el-table>
-      <div style="margin-top: 15px;text-align: center">
-        <el-button @click="cancel">取消</el-button>
-        <el-button @click="confirm" type="primary">确定</el-button>
-      </div>
-    </div>
-  </div>
-</template>
-<script>
-  import {deliveryOrder} from '@/api/order'
-  const defaultLogisticsCompanies=["顺丰快递","圆通快递","中通快递","韵达快递"];
-  export default {
-    name: 'deliverOrderList',
-    data() {
-      return {
-        list:[],
-        companyOptions:defaultLogisticsCompanies
-      }
-    },
-    created(){
-      this.list= this.$route.query.list;
-      //当list不为数组时转换为数组
-      if(this.list instanceof Array===false){
-        this.list=[];
-      }
-    },
-    methods:{
-      cancel(){
-        this.$router.back();
-      },
-      confirm(){
-        this.$confirm('是否要进行发货操作?', '提示', {
-          confirmButtonText: '确定',
-          cancelButtonText: '取消',
-          type: 'warning'
-        }).then(() => {
-          deliveryOrder(this.list).then(response=>{
-            this.$router.back();
-            this.$message({
-              type: 'success',
-              message: '发货成功!'
-            });
-          });
-        }).catch(() => {
-          this.$message({
-            type: 'info',
-            message: '已取消发货'
-          });
-        });
-      }
-    }
-  }
-</script>
-<style></style>
-
-

+ 0 - 463
src/views/oms/order/index.vue

@@ -1,463 +0,0 @@
-<template> 
-  <div class="app-container">
-    <el-card class="filter-container" shadow="never">
-      <div>
-        <i class="el-icon-search"></i>
-        <span>筛选搜索</span>
-        <el-button
-          style="float:right"
-          type="primary"
-          @click="handleSearchList()"
-          size="small">
-          查询搜索
-        </el-button>
-        <el-button
-          style="float:right;margin-right: 15px"
-          @click="handleResetSearch()"
-          size="small">
-          重置
-        </el-button>
-      </div>
-      <div style="margin-top: 15px">
-        <el-form :inline="true" :model="listQuery" size="small" label-width="140px">
-          <el-form-item label="输入搜索:">
-            <el-input v-model="listQuery.orderSn" class="input-width" placeholder="订单编号"></el-input>
-          </el-form-item>
-          <el-form-item label="收货人:">
-            <el-input v-model="listQuery.receiverKeyword" class="input-width" placeholder="收货人姓名/手机号码"></el-input>
-          </el-form-item>
-          <el-form-item label="提交时间:">
-            <el-date-picker
-              class="input-width"
-              v-model="listQuery.createTime"
-              value-format="yyyy-MM-dd"
-              type="date"
-              placeholder="请选择时间">
-            </el-date-picker>
-          </el-form-item>
-          <el-form-item label="订单状态:">
-            <el-select v-model="listQuery.status" class="input-width" placeholder="全部" clearable>
-              <el-option v-for="item in statusOptions"
-                         :key="item.value"
-                         :label="item.label"
-                         :value="item.value">
-              </el-option>
-            </el-select>
-          </el-form-item>
-          <el-form-item label="订单分类:">
-            <el-select v-model="listQuery.orderType" class="input-width" placeholder="全部" clearable>
-              <el-option v-for="item in orderTypeOptions"
-                         :key="item.value"
-                         :label="item.label"
-                         :value="item.value">
-              </el-option>
-            </el-select>
-          </el-form-item>
-          <el-form-item label="订单来源:">
-            <el-select v-model="listQuery.sourceType" class="input-width" placeholder="全部" clearable>
-              <el-option v-for="item in sourceTypeOptions"
-                         :key="item.value"
-                         :label="item.label"
-                         :value="item.value">
-              </el-option>
-            </el-select>
-          </el-form-item>
-        </el-form>
-      </div>
-    </el-card>
-    <el-card class="operate-container" shadow="never">
-      <i class="el-icon-tickets"></i>
-      <span>数据列表</span>
-    </el-card>
-    <div class="table-container">
-      <el-table ref="orderTable"
-                :data="list"
-                style="width: 100%;"
-                @selection-change="handleSelectionChange"
-                v-loading="listLoading" border>
-        <el-table-column type="selection" width="60" align="center"></el-table-column>
-        <el-table-column label="编号" width="80" align="center">
-          <template slot-scope="scope">{{scope.row.id}}</template>
-        </el-table-column>
-        <el-table-column label="订单编号" width="180" align="center">
-          <template slot-scope="scope">{{scope.row.orderSn}}</template>
-        </el-table-column>
-        <el-table-column label="提交时间" width="180" align="center">
-          <template slot-scope="scope">{{scope.row.createTime | formatCreateTime}}</template>
-        </el-table-column>
-        <el-table-column label="用户账号" align="center">
-          <template slot-scope="scope">{{scope.row.memberUsername}}</template>
-        </el-table-column>
-        <el-table-column label="订单金额" width="120" align="center">
-          <template slot-scope="scope">¥{{scope.row.totalAmount}}</template>
-        </el-table-column>
-        <el-table-column label="支付方式" width="120" align="center">
-          <template slot-scope="scope">{{scope.row.payType | formatPayType}}</template>
-        </el-table-column>
-        <el-table-column label="订单来源" width="120" align="center">
-          <template slot-scope="scope">{{scope.row.sourceType | formatSourceType}}</template>
-        </el-table-column>
-        <el-table-column label="订单状态" width="120" align="center">
-          <template slot-scope="scope">{{scope.row.status | formatStatus}}</template>
-        </el-table-column>
-        <el-table-column label="操作" width="200" align="center">
-          <template slot-scope="scope">
-            <el-button
-              size="mini"
-              @click="handleViewOrder(scope.$index, scope.row)"
-            >查看订单</el-button>
-            <el-button
-              size="mini"
-              @click="handleCloseOrder(scope.$index, scope.row)"
-              v-show="scope.row.status===0">关闭订单</el-button>
-            <el-button
-              size="mini"
-              @click="handleDeliveryOrder(scope.$index, scope.row)"
-              v-show="scope.row.status===1">订单发货</el-button>
-            <el-button
-              size="mini"
-              @click="handleViewLogistics(scope.$index, scope.row)"
-              v-show="scope.row.status===2||scope.row.status===3">订单跟踪</el-button>
-            <el-button
-              size="mini"
-              type="danger"
-              @click="handleDeleteOrder(scope.$index, scope.row)"
-              v-show="scope.row.status===4">删除订单</el-button>
-          </template>
-        </el-table-column>
-      </el-table>
-    </div>
-    <div class="batch-operate-container">
-      <el-select
-        size="small"
-        v-model="operateType" placeholder="批量操作">
-        <el-option
-          v-for="item in operateOptions"
-          :key="item.value"
-          :label="item.label"
-          :value="item.value">
-        </el-option>
-      </el-select>
-      <el-button
-        style="margin-left: 20px"
-        class="search-button"
-        @click="handleBatchOperate()"
-        type="primary"
-        size="small">
-        确定
-      </el-button>
-    </div>
-    <div class="pagination-container">
-      <el-pagination
-        background
-        @size-change="handleSizeChange"
-        @current-change="handleCurrentChange"
-        layout="total, sizes,prev, pager, next,jumper"
-        :current-page.sync="listQuery.pageNum"
-        :page-size="listQuery.pageSize"
-        :page-sizes="[5,10,15]"
-        :total="total">
-      </el-pagination>
-    </div>
-    <el-dialog
-      title="关闭订单"
-      :visible.sync="closeOrder.dialogVisible" width="30%">
-      <span style="vertical-align: top">操作备注:</span>
-      <el-input
-        style="width: 80%"
-        type="textarea"
-        :rows="5"
-        placeholder="请输入内容"
-        v-model="closeOrder.content">
-      </el-input>
-      <span slot="footer" class="dialog-footer">
-        <el-button @click="closeOrder.dialogVisible = false">取 消</el-button>
-        <el-button type="primary" @click="handleCloseOrderConfirm">确 定</el-button>
-      </span>
-    </el-dialog>
-    <logistics-dialog v-model="logisticsDialogVisible"></logistics-dialog>
-  </div>
-</template>
-<script>
-  import {fetchList,closeOrder,deleteOrder} from '@/api/order'
-  import {formatDate} from '@/utils/date';
-  import LogisticsDialog from '@/views/oms/order/components/logisticsDialog';
-  const defaultListQuery = {
-    pageNum: 1,
-    pageSize: 10,
-    orderSn: null,
-    receiverKeyword: null,
-    status: null,
-    orderType: null,
-    sourceType: null,
-    createTime: null,
-  };
-  export default {
-    name: "orderList",
-    components:{LogisticsDialog},
-    data() {
-      return {
-        listQuery: Object.assign({}, defaultListQuery),
-        listLoading: true,
-        list: null,
-        total: null,
-        operateType: null,
-        multipleSelection: [],
-        closeOrder:{
-          dialogVisible:false,
-          content:null,
-          orderIds:[]
-        },
-        statusOptions: [
-          {
-            label: '待付款',
-            value: 0
-          },
-          {
-            label: '待发货',
-            value: 1
-          },
-          {
-            label: '已发货',
-            value: 2
-          },
-          {
-            label: '已完成',
-            value: 3
-          },
-          {
-            label: '已关闭',
-            value: 4
-          }
-        ],
-        orderTypeOptions: [
-          {
-            label: '正常订单',
-            value: 0
-          },
-          {
-            label: '秒杀订单',
-            value: 1
-          }
-        ],
-        sourceTypeOptions: [
-          {
-            label: 'PC订单',
-            value: 0
-          },
-          {
-            label: 'APP订单',
-            value: 1
-          }
-        ],
-        operateOptions: [
-          {
-            label: "批量发货",
-            value: 1
-          },
-          {
-            label: "关闭订单",
-            value: 2
-          },
-          {
-            label: "删除订单",
-            value: 3
-          }
-        ],
-        logisticsDialogVisible:false
-      }
-    },
-    created() {
-      this.getList();
-    },
-    filters: {
-      formatCreateTime(time) {
-        let date = new Date(time);
-        return formatDate(date, 'yyyy-MM-dd hh:mm:ss')
-      },
-      formatPayType(value) {
-        if (value === 1) {
-          return '支付宝';
-        } else if (value === 2) {
-          return '微信';
-        } else {
-          return '未支付';
-        }
-      },
-      formatSourceType(value) {
-        if (value === 1) {
-          return 'APP订单';
-        } else {
-          return 'PC订单';
-        }
-      },
-      formatStatus(value) {
-        if (value === 1) {
-          return '待发货';
-        } else if (value === 2) {
-          return '已发货';
-        } else if (value === 3) {
-          return '已完成';
-        } else if (value === 4) {
-          return '已关闭';
-        } else if (value === 5) {
-          return '无效订单';
-        } else {
-          return '待付款';
-        }
-      },
-    },
-    methods: {
-      handleResetSearch() {
-        this.listQuery = Object.assign({}, defaultListQuery);
-      },
-      handleSearchList() {
-        this.listQuery.pageNum = 1;
-        this.getList();
-      },
-      handleSelectionChange(val){
-        this.multipleSelection = val;
-      },
-      handleViewOrder(index, row){
-        this.$router.push({path:'/oms/orderDetail',query:{id:row.id}})
-      },
-      handleCloseOrder(index, row){
-        this.closeOrder.dialogVisible=true;
-        this.closeOrder.orderIds=[row.id];
-      },
-      handleDeliveryOrder(index, row){
-        let listItem = this.covertOrder(row);
-        this.$router.push({path:'/oms/deliverOrderList',query:{list:[listItem]}})
-      },
-      handleViewLogistics(index, row){
-        this.logisticsDialogVisible=true;
-      },
-      handleDeleteOrder(index, row){
-        let ids=[];
-        ids.push(row.id);
-        this.deleteOrder(ids);
-      },
-      handleBatchOperate(){
-        if(this.multipleSelection==null||this.multipleSelection.length<1){
-          this.$message({
-            message: '请选择要操作的订单',
-            type: 'warning',
-            duration: 1000
-          });
-          return;
-        }
-        if(this.operateType===1){
-          //批量发货
-          let list=[];
-          for(let i=0;i<this.multipleSelection.length;i++){
-            if(this.multipleSelection[i].status===1){
-              list.push(this.covertOrder(this.multipleSelection[i]));
-            }
-          }
-          if(list.length===0){
-            this.$message({
-              message: '选中订单中没有可以发货的订单',
-              type: 'warning',
-              duration: 1000
-            });
-            return;
-          }
-          this.$router.push({path:'/oms/deliverOrderList',query:{list:list}})
-        }else if(this.operateType===2){
-          //关闭订单
-          this.closeOrder.orderIds=[];
-          for(let i=0;i<this.multipleSelection.length;i++){
-            this.closeOrder.orderIds.push(this.multipleSelection[i].id);
-          }
-          this.closeOrder.dialogVisible=true;
-        }else if(this.operateType===3){
-          //删除订单
-          let ids=[];
-          for(let i=0;i<this.multipleSelection.length;i++){
-            ids.push(this.multipleSelection[i].id);
-          }
-          this.deleteOrder(ids);
-        }
-      },
-      handleSizeChange(val){
-        this.listQuery.pageNum = 1;
-        this.listQuery.pageSize = val;
-        this.getList();
-      },
-      handleCurrentChange(val){
-        this.listQuery.pageNum = val;
-        this.getList();
-      },
-      handleCloseOrderConfirm() {
-        if (this.closeOrder.content == null || this.closeOrder.content === '') {
-          this.$message({
-            message: '操作备注不能为空',
-            type: 'warning',
-            duration: 1000
-          });
-          return;
-        }
-        let params = new URLSearchParams();
-        params.append('ids', this.closeOrder.orderIds);
-        params.append('note', this.closeOrder.content);
-        closeOrder(params).then(response=>{
-          this.closeOrder.orderIds=[];
-          this.closeOrder.dialogVisible=false;
-          this.getList();
-          this.$message({
-            message: '修改成功',
-            type: 'success',
-            duration: 1000
-          });
-        });
-      },
-      getList() {
-        this.listLoading = true;
-        fetchList(this.listQuery).then(response => {
-          this.listLoading = false;
-          this.list = response.data.list;
-          this.total = response.data.total;
-        });
-      },
-      deleteOrder(ids){
-        this.$confirm('是否要进行该删除操作?', '提示', {
-          confirmButtonText: '确定',
-          cancelButtonText: '取消',
-          type: 'warning'
-        }).then(() => {
-          let params = new URLSearchParams();
-          params.append("ids",ids);
-          deleteOrder(params).then(response=>{
-            this.$message({
-              message: '删除成功!',
-              type: 'success',
-              duration: 1000
-            });
-            this.getList();
-          });
-        })
-      },
-      covertOrder(order){
-        let address=order.receiverProvince+order.receiverCity+order.receiverRegion+order.receiverDetailAddress;
-        let listItem={
-          orderId:order.id,
-          orderSn:order.orderSn,
-          receiverName:order.receiverName,
-          receiverPhone:order.receiverPhone,
-          receiverPostCode:order.receiverPostCode,
-          address:address,
-          deliveryCompany:null,
-          deliverySn:null
-        };
-        return listItem;
-      }
-    }
-  }
-</script>
-<style scoped>
-  .input-width {
-    width: 203px;
-  }
-</style>
-
-

+ 0 - 714
src/views/oms/order/orderDetail.vue

@@ -1,714 +0,0 @@
-<template> 
-  <div class="detail-container">
-    <div>
-      <el-steps :active="formatStepStatus(order.status)" finish-status="success" align-center>
-        <el-step title="提交订单" :description="formatTime(order.createTime)"></el-step>
-        <el-step title="支付订单" :description="formatTime(order.paymentTime)"></el-step>
-        <el-step title="平台发货" :description="formatTime(order.deliveryTime)"></el-step>
-        <el-step title="确认收货" :description="formatTime(order.receiveTime)"></el-step>
-        <el-step title="完成评价" :description="formatTime(order.commentTime)"></el-step>
-      </el-steps>
-    </div>
-    <el-card shadow="never" style="margin-top: 15px">
-      <div class="operate-container">
-        <i class="el-icon-warning color-danger" style="margin-left: 20px"></i>
-        <span class="color-danger">当前订单状态:{{order.status | formatStatus}}</span>
-        <div class="operate-button-container" v-show="order.status===0">
-          <el-button size="mini" @click="showUpdateReceiverDialog">修改收货人信息</el-button>
-          <el-button size="mini" @click="showUpdateMoneyDialog">修改费用信息</el-button>
-          <el-button size="mini" @click="showMessageDialog">发送站内信</el-button>
-          <el-button size="mini" @click="showCloseOrderDialog">关闭订单</el-button>
-          <el-button size="mini" @click="showMarkOrderDialog">备注订单</el-button>
-        </div>
-        <div class="operate-button-container" v-show="order.status===1">
-          <el-button size="mini" @click="showUpdateReceiverDialog">修改收货人信息</el-button>
-          <el-button size="mini" @click="showMessageDialog">发送站内信</el-button>
-          <el-button size="mini">取消订单</el-button>
-          <el-button size="mini" @click="showMarkOrderDialog">备注订单</el-button>
-        </div>
-        <div class="operate-button-container" v-show="order.status===2||order.status===3">
-          <el-button size="mini" @click="showLogisticsDialog">订单跟踪</el-button>
-          <el-button size="mini" @click="showMessageDialog">发送站内信</el-button>
-          <el-button size="mini" @click="showMarkOrderDialog">备注订单</el-button>
-        </div>
-        <div class="operate-button-container" v-show="order.status===4">
-          <el-button size="mini" @click="handleDeleteOrder">删除订单</el-button>
-          <el-button size="mini" @click="showMarkOrderDialog">备注订单</el-button>
-        </div>
-      </div>
-      <div style="margin-top: 20px">
-        <svg-icon icon-class="marker" style="color: #606266"></svg-icon>
-        <span class="font-small">基本信息</span>
-      </div>
-      <div class="table-layout">
-        <el-row>
-          <el-col :span="4" class="table-cell-title">订单编号</el-col>
-          <el-col :span="4" class="table-cell-title">发货单流水号</el-col>
-          <el-col :span="4" class="table-cell-title">用户账号</el-col>
-          <el-col :span="4" class="table-cell-title">支付方式</el-col>
-          <el-col :span="4" class="table-cell-title">订单来源</el-col>
-          <el-col :span="4" class="table-cell-title">订单类型</el-col>
-        </el-row>
-        <el-row>
-          <el-col :span="4" class="table-cell">{{order.orderSn}}</el-col>
-          <el-col :span="4" class="table-cell">暂无</el-col>
-          <el-col :span="4" class="table-cell">{{order.memberUsername}}</el-col>
-          <el-col :span="4" class="table-cell">{{order.payType | formatPayType}}</el-col>
-          <el-col :span="4" class="table-cell">{{order.sourceType | formatSourceType}}</el-col>
-          <el-col :span="4" class="table-cell">{{order.orderType | formatOrderType}}</el-col>
-        </el-row>
-        <el-row>
-          <el-col :span="4" class="table-cell-title">配送方式</el-col>
-          <el-col :span="4" class="table-cell-title">物流单号</el-col>
-          <el-col :span="4" class="table-cell-title">自动确认收货时间</el-col>
-          <el-col :span="4" class="table-cell-title">订单可得优币</el-col>
-          <el-col :span="4" class="table-cell-title">订单可得成长值</el-col>
-          <el-col :span="4" class="table-cell-title">活动信息</el-col>
-        </el-row>
-        <el-row>
-          <el-col :span="4" class="table-cell">{{order.deliveryCompany | formatNull}}</el-col>
-          <el-col :span="4" class="table-cell">{{order.deliverySn | formatNull}}</el-col>
-          <el-col :span="4" class="table-cell">{{order.autoConfirmDay}}天</el-col>
-          <el-col :span="4" class="table-cell">{{order.integration}}</el-col>
-          <el-col :span="4" class="table-cell">{{order.growth}}</el-col>
-          <el-col :span="4" class="table-cell">
-            <el-popover
-              placement="top-start"
-              title="活动信息"
-              width="200"
-              trigger="hover"
-              :content="order.promotionInfo">
-              <span slot="reference">{{order.promotionInfo | formatLongText}}</span>
-            </el-popover>
-          </el-col>
-        </el-row>
-      </div>
-      <div style="margin-top: 20px">
-        <svg-icon icon-class="marker" style="color: #606266"></svg-icon>
-        <span class="font-small">收货人信息</span>
-      </div>
-      <div class="table-layout">
-        <el-row>
-          <el-col :span="6" class="table-cell-title">收货人</el-col>
-          <el-col :span="6" class="table-cell-title">手机号码</el-col>
-          <el-col :span="6" class="table-cell-title">邮政编码</el-col>
-          <el-col :span="6" class="table-cell-title">收货地址</el-col>
-        </el-row>
-        <el-row>
-          <el-col :span="6" class="table-cell">{{order.receiverName}}</el-col>
-          <el-col :span="6" class="table-cell">{{order.receiverPhone}}</el-col>
-          <el-col :span="6" class="table-cell">{{order.receiverPostCode}}</el-col>
-          <el-col :span="6" class="table-cell">{{order | formatAddress}}</el-col>
-        </el-row>
-      </div>
-      <div style="margin-top: 20px">
-        <svg-icon icon-class="marker" style="color: #606266"></svg-icon>
-        <span class="font-small">商品信息</span>
-      </div>
-      <el-table
-        ref="orderItemTable"
-        :data="order.orderItemList"
-        style="width: 100%;margin-top: 20px" border>
-        <el-table-column label="商品图片" width="120" align="center">
-          <template slot-scope="scope">
-            <img :src="scope.row.productPic" style="height: 80px">
-          </template>
-        </el-table-column>
-        <el-table-column label="商品名称" align="center">
-          <template slot-scope="scope">
-            <p>{{scope.row.productName}}</p>
-            <p>品牌:{{scope.row.productBrand}}</p>
-          </template>
-        </el-table-column>
-        <el-table-column label="价格/货号" width="120" align="center">
-          <template slot-scope="scope">
-            <p>价格:¥{{scope.row.productPrice}}</p>
-            <p>货号:{{scope.row.productSn}}</p>
-          </template>
-        </el-table-column>
-        <el-table-column label="属性" width="120" align="center">
-          <template slot-scope="scope">
-            {{scope.row.productAttr | formatProductAttr}}
-          </template>
-        </el-table-column>
-        <el-table-column label="数量" width="120" align="center">
-          <template slot-scope="scope">
-            {{scope.row.productQuantity}}
-          </template>
-        </el-table-column>
-        <el-table-column label="小计" width="120" align="center">
-          <template slot-scope="scope">
-            ¥{{scope.row.productPrice*scope.row.productQuantity}}
-          </template>
-        </el-table-column>
-      </el-table>
-      <div style="float: right;margin: 20px">
-        合计:<span class="color-danger">¥{{order.totalAmount}}</span>
-      </div>
-      <div style="margin-top: 60px">
-        <svg-icon icon-class="marker" style="color: #606266"></svg-icon>
-        <span class="font-small">费用信息</span>
-      </div>
-      <div class="table-layout">
-        <el-row>
-          <el-col :span="6" class="table-cell-title">商品合计</el-col>
-          <el-col :span="6" class="table-cell-title">运费</el-col>
-          <el-col :span="6" class="table-cell-title">优惠券</el-col>
-          <el-col :span="6" class="table-cell-title">积分抵扣</el-col>
-        </el-row>
-        <el-row>
-          <el-col :span="6" class="table-cell">¥{{order.totalAmount}}</el-col>
-          <el-col :span="6" class="table-cell">¥{{order.freightAmount}}</el-col>
-          <el-col :span="6" class="table-cell">-¥{{order.couponAmount}}</el-col>
-          <el-col :span="6" class="table-cell">-¥{{order.integrationAmount}}</el-col>
-        </el-row>
-        <el-row>
-          <el-col :span="6" class="table-cell-title">活动优惠</el-col>
-          <el-col :span="6" class="table-cell-title">折扣金额</el-col>
-          <el-col :span="6" class="table-cell-title">订单总金额</el-col>
-          <el-col :span="6" class="table-cell-title">应付款金额</el-col>
-        </el-row>
-        <el-row>
-          <el-col :span="6" class="table-cell">-¥{{order.promotionAmount}}</el-col>
-          <el-col :span="6" class="table-cell">-¥{{order.discountAmount}}</el-col>
-          <el-col :span="6" class="table-cell">
-            <span class="color-danger">¥{{order.totalAmount+order.freightAmount}}</span>
-          </el-col>
-          <el-col :span="6" class="table-cell">
-            <span class="color-danger">¥{{order.payAmount+order.freightAmount-order.discountAmount}}</span>
-          </el-col>
-        </el-row>
-      </div>
-      <div style="margin-top: 20px">
-        <svg-icon icon-class="marker" style="color: #606266"></svg-icon>
-        <span class="font-small">操作信息</span>
-      </div>
-      <el-table style="margin-top: 20px;width: 100%"
-                ref="orderHistoryTable"
-                :data="order.historyList" border>
-        <el-table-column label="操作者"  width="120" align="center">
-          <template slot-scope="scope">
-            {{scope.row.operateMan}}
-          </template>
-        </el-table-column>
-        <el-table-column label="操作时间"  width="160" align="center">
-          <template slot-scope="scope">
-            {{formatTime(scope.row.createTime)}}
-          </template>
-        </el-table-column>
-        <el-table-column label="订单状态"  width="120" align="center">
-          <template slot-scope="scope">
-            {{scope.row.orderStatus | formatStatus}}
-          </template>
-        </el-table-column>
-        <el-table-column label="付款状态"  width="120" align="center">
-          <template slot-scope="scope">
-            {{scope.row.orderStatus | formatPayStatus}}
-          </template>
-        </el-table-column>
-        <el-table-column label="发货状态"  width="120" align="center">
-          <template slot-scope="scope">
-            {{scope.row.orderStatus | formatDeliverStatus}}
-          </template>
-        </el-table-column>
-        <el-table-column label="备注" align="center">
-          <template slot-scope="scope">
-            {{scope.row.note}}
-          </template>
-        </el-table-column>
-      </el-table>
-    </el-card>
-    <el-dialog title="修改收货人信息"
-               :visible.sync="receiverDialogVisible"
-               width="40%">
-      <el-form :model="receiverInfo"
-               ref="receiverInfoForm"
-               label-width="150px">
-        <el-form-item label="收货人姓名:">
-          <el-input v-model="receiverInfo.receiverName" style="width: 200px"></el-input>
-        </el-form-item>
-        <el-form-item label="手机号码:">
-          <el-input v-model="receiverInfo.receiverPhone" style="width: 200px">
-          </el-input>
-        </el-form-item>
-        <el-form-item label="邮政编码:">
-          <el-input v-model="receiverInfo.receiverPostCode" style="width: 200px">
-          </el-input>
-        </el-form-item>
-        <el-form-item label="所在区域:">
-          <v-distpicker :province="receiverInfo.receiverProvince"
-                        :city="receiverInfo.receiverCity"
-                        :area="receiverInfo.receiverRegion"
-                        @selected="onSelectRegion"></v-distpicker>
-        </el-form-item>
-        <el-form-item label="详细地址:">
-          <el-input v-model="receiverInfo.receiverDetailAddress" type="textarea" rows="3">
-          </el-input>
-        </el-form-item>
-      </el-form>
-      <span slot="footer" class="dialog-footer">
-      <el-button @click="receiverDialogVisible = false">取 消</el-button>
-      <el-button type="primary" @click="handleUpdateReceiverInfo">确 定</el-button>
-      </span>
-    </el-dialog>
-    <el-dialog title="修改费用信息"
-               :visible.sync="moneyDialogVisible"
-               width="40%">
-      <div class="table-layout">
-        <el-row>
-          <el-col :span="6" class="table-cell-title">商品合计</el-col>
-          <el-col :span="6" class="table-cell-title">运费</el-col>
-          <el-col :span="6" class="table-cell-title">优惠券</el-col>
-          <el-col :span="6" class="table-cell-title">积分抵扣</el-col>
-        </el-row>
-        <el-row>
-          <el-col :span="6" class="table-cell">¥{{order.totalAmount}}</el-col>
-          <el-col :span="6" class="table-cell">
-            <el-input v-model.number="moneyInfo.freightAmount" size="mini"><template slot="prepend">¥</template></el-input>
-          </el-col>
-          <el-col :span="6" class="table-cell">-¥{{order.couponAmount}}</el-col>
-          <el-col :span="6" class="table-cell">-¥{{order.integrationAmount}}</el-col>
-        </el-row>
-        <el-row>
-          <el-col :span="6" class="table-cell-title">活动优惠</el-col>
-          <el-col :span="6" class="table-cell-title">折扣金额</el-col>
-          <el-col :span="6" class="table-cell-title">订单总金额</el-col>
-          <el-col :span="6" class="table-cell-title">应付款金额</el-col>
-        </el-row>
-        <el-row>
-          <el-col :span="6" class="table-cell">-¥{{order.promotionAmount}}</el-col>
-          <el-col :span="6" class="table-cell">
-            <el-input v-model.number="moneyInfo.discountAmount" size="mini"><template slot="prepend">-¥</template></el-input>
-          </el-col>
-          <el-col :span="6" class="table-cell">
-            <span class="color-danger">¥{{order.totalAmount+moneyInfo.freightAmount}}</span>
-          </el-col>
-          <el-col :span="6" class="table-cell">
-            <span class="color-danger">¥{{order.payAmount+moneyInfo.freightAmount-moneyInfo.discountAmount}}</span>
-          </el-col>
-        </el-row>
-      </div>
-      <span slot="footer" class="dialog-footer">
-      <el-button @click="moneyDialogVisible = false">取 消</el-button>
-      <el-button type="primary" @click="handleUpdateMoneyInfo">确 定</el-button>
-      </span>
-    </el-dialog>
-    <el-dialog title="发送站内信"
-               :visible.sync="messageDialogVisible"
-               width="40%">
-      <el-form :model="message"
-               ref="receiverInfoForm"
-               label-width="150px">
-        <el-form-item label="标题:">
-          <el-input v-model="message.title" style="width: 200px"></el-input>
-        </el-form-item>
-        <el-form-item label="内容:">
-          <el-input v-model="message.content" type="textarea" rows="3">
-          </el-input>
-        </el-form-item>
-      </el-form>
-      <span slot="footer" class="dialog-footer">
-        <el-button @click="messageDialogVisible = false">取 消</el-button>
-        <el-button type="primary" @click="handleSendMessage">确 定</el-button>
-      </span>
-    </el-dialog>
-    <el-dialog title="关闭订单"
-               :visible.sync="closeDialogVisible"
-               width="40%">
-      <el-form :model="closeInfo"
-               label-width="150px">
-        <el-form-item label="操作备注:">
-          <el-input v-model="closeInfo.note" type="textarea" rows="3">
-          </el-input>
-        </el-form-item>
-      </el-form>
-      <span slot="footer" class="dialog-footer">
-        <el-button @click="closeDialogVisible = false">取 消</el-button>
-        <el-button type="primary" @click="handleCloseOrder">确 定</el-button>
-      </span>
-    </el-dialog>
-    <el-dialog title="备注订单"
-               :visible.sync="markOrderDialogVisible"
-               width="40%">
-      <el-form :model="markInfo"
-               label-width="150px">
-        <el-form-item label="操作备注:">
-          <el-input v-model="markInfo.note" type="textarea" rows="3">
-          </el-input>
-        </el-form-item>
-      </el-form>
-      <span slot="footer" class="dialog-footer">
-        <el-button @click="markOrderDialogVisible = false">取 消</el-button>
-        <el-button type="primary" @click="handleMarkOrder">确 定</el-button>
-      </span>
-    </el-dialog>
-    <logistics-dialog v-model="logisticsDialogVisible"></logistics-dialog>
-  </div>
-</template>
-<script>
-  import {getOrderDetail,updateReceiverInfo,updateMoneyInfo,closeOrder,updateOrderNote,deleteOrder} from '@/api/order';
-  import LogisticsDialog from '@/views/oms/order/components/logisticsDialog';
-  import {formatDate} from '@/utils/date';
-  import VDistpicker from 'v-distpicker';
-  const defaultReceiverInfo = {
-    orderId:null,
-    receiverName:null,
-    receiverPhone:null,
-    receiverPostCode:null,
-    receiverDetailAddress:null,
-    receiverProvince:null,
-    receiverCity:null,
-    receiverRegion:null,
-    status:null
-  };
-  export default {
-    name: 'orderDetail',
-    components: { VDistpicker, LogisticsDialog},
-    data() {
-      return {
-        id: null,
-        order: {},
-        receiverDialogVisible:false,
-        receiverInfo:Object.assign({},defaultReceiverInfo),
-        moneyDialogVisible:false,
-        moneyInfo:{orderId:null, freightAmount:0, discountAmount:0,status:null},
-        messageDialogVisible:false,
-        message: {title:null, content:null},
-        closeDialogVisible:false,
-        closeInfo:{note:null,id:null},
-        markOrderDialogVisible:false,
-        markInfo:{note:null},
-        logisticsDialogVisible:false
-      }
-    },
-    created() {
-      this.id = this.list = this.$route.query.id;
-      getOrderDetail(this.id).then(response => {
-        this.order = response.data;
-      });
-    },
-    filters: {
-      formatNull(value) {
-        if(value===undefined||value===null||value===''){
-          return '暂无';
-        }else{
-          return value;
-        }
-      },
-      formatLongText(value) {
-        if(value===undefined||value===null||value===''){
-          return '暂无';
-        }else if(value.length>8){
-          return value.substr(0, 8) + '...';
-        }else{
-          return value;
-        }
-      },
-      formatPayType(value) {
-        if (value === 1) {
-          return '支付宝';
-        } else if (value === 2) {
-          return '微信';
-        } else {
-          return '未支付';
-        }
-      },
-      formatSourceType(value) {
-        if (value === 1) {
-          return 'APP订单';
-        } else {
-          return 'PC订单';
-        }
-      },
-      formatOrderType(value) {
-        if (value === 1) {
-          return '秒杀订单';
-        } else {
-          return '正常订单';
-        }
-      },
-      formatAddress(order) {
-        let str = order.receiverProvince;
-        if (order.receiverCity != null) {
-          str += "  " + order.receiverCity;
-        }
-        str += "  " + order.receiverRegion;
-        str += "  " + order.receiverDetailAddress;
-        return str;
-      },
-      formatStatus(value) {
-        if (value === 1) {
-          return '待发货';
-        } else if (value === 2) {
-          return '已发货';
-        } else if (value === 3) {
-          return '已完成';
-        } else if (value === 4) {
-          return '已关闭';
-        } else if (value === 5) {
-          return '无效订单';
-        } else {
-          return '待付款';
-        }
-      },
-      formatPayStatus(value) {
-        if (value === 0) {
-          return '未支付';
-        } else if(value===4){
-          return '已退款';
-        }else{
-          return '已支付';
-        }
-      },
-      formatDeliverStatus(value) {
-        if (value === 0||value === 1) {
-          return '未发货';
-        } else {
-          return '已发货';
-        }
-      },
-      formatProductAttr(value){
-        if(value==null){
-          return '';
-        }else{
-          let attr = JSON.parse(value);
-          let result='';
-          for(let i=0;i<attr.length;i++){
-            result+=attr[i].key;
-            result+=":";
-            result+=attr[i].value;
-            result+=";";
-          }
-          return result;
-        }
-      }
-    },
-    methods: {
-      onSelectRegion(data){
-        this.receiverInfo.receiverProvince=data.province.value;
-        this.receiverInfo.receiverCity=data.city.value;
-        this.receiverInfo.receiverRegion=data.area.value;
-      },
-      formatTime(time) {
-        if (time == null || time === '') {
-          return '';
-        }
-        let date = new Date(time);
-        return formatDate(date, 'yyyy-MM-dd hh:mm:ss')
-      },
-      formatStepStatus(value) {
-        if (value === 1) {
-          //待发货
-          return 2;
-        } else if (value === 2) {
-          //已发货
-          return 3;
-        } else if (value === 3) {
-          //已完成
-          return 4;
-        }else {
-          //待付款、已关闭、无限订单
-          return 1;
-        }
-      },
-      showUpdateReceiverDialog(){
-        this.receiverDialogVisible=true;
-        this.receiverInfo={
-          orderId:this.order.id,
-          receiverName:this.order.receiverName,
-          receiverPhone:this.order.receiverPhone,
-          receiverPostCode:this.order.receiverPostCode,
-          receiverDetailAddress:this.order.receiverDetailAddress,
-          receiverProvince:this.order.receiverProvince,
-          receiverCity:this.order.receiverCity,
-          receiverRegion:this.order.receiverRegion,
-          status:this.order.status
-        }
-      },
-      handleUpdateReceiverInfo(){
-        this.$confirm('是否要修改收货信息?', '提示', {
-          confirmButtonText: '确定',
-          cancelButtonText: '取消',
-          type: 'warning'
-        }).then(() => {
-          updateReceiverInfo(this.receiverInfo).then(response=>{
-            this.receiverDialogVisible=false;
-            this.$message({
-              type: 'success',
-              message: '修改成功!'
-            });
-            getOrderDetail(this.id).then(response => {
-              this.order = response.data;
-            });
-          });
-        });
-      },
-      showUpdateMoneyDialog(){
-        this.moneyDialogVisible=true;
-        this.moneyInfo.orderId=this.order.id;
-        this.moneyInfo.freightAmount=this.order.freightAmount;
-        this.moneyInfo.discountAmount=this.order.discountAmount;
-        this.moneyInfo.status=this.order.status;
-      },
-      handleUpdateMoneyInfo(){
-        this.$confirm('是否要修改费用信息?', '提示', {
-          confirmButtonText: '确定',
-          cancelButtonText: '取消',
-          type: 'warning'
-        }).then(() => {
-          updateMoneyInfo(this.moneyInfo).then(response=>{
-            this.moneyDialogVisible=false;
-            this.$message({
-              type: 'success',
-              message: '修改成功!'
-            });
-            getOrderDetail(this.id).then(response => {
-              this.order = response.data;
-            });
-          });
-        });
-      },
-      showMessageDialog(){
-        this.messageDialogVisible=true;
-        this.message.title=null;
-        this.message.content=null;
-      },
-      handleSendMessage(){
-        this.$confirm('是否要发送站内信?', '提示', {
-          confirmButtonText: '确定',
-          cancelButtonText: '取消',
-          type: 'warning'
-        }).then(() => {
-          this.messageDialogVisible=false;
-          this.$message({
-            type: 'success',
-            message: '发送成功!'
-          });
-        });
-      },
-      showCloseOrderDialog(){
-        this.closeDialogVisible=true;
-        this.closeInfo.note=null;
-        this.closeInfo.id=this.id;
-      },
-      handleCloseOrder(){
-        this.$confirm('是否要关闭?', '提示', {
-          confirmButtonText: '确定',
-          cancelButtonText: '取消',
-          type: 'warning'
-        }).then(() => {
-            let params = new URLSearchParams();
-            params.append("ids",[this.closeInfo.id]);
-            params.append("note",this.closeInfo.note);
-            closeOrder(params).then(response=>{
-              this.closeDialogVisible=false;
-              this.$message({
-                type: 'success',
-                message: '订单关闭成功!'
-              });
-              getOrderDetail(this.id).then(response => {
-                this.order = response.data;
-              });
-            });
-        });
-      },
-      showMarkOrderDialog(){
-        this.markOrderDialogVisible=true;
-        this.markInfo.id=this.id;
-        this.closeOrder.note=null;
-      },
-      handleMarkOrder(){
-        this.$confirm('是否要备注订单?', '提示', {
-          confirmButtonText: '确定',
-          cancelButtonText: '取消',
-          type: 'warning'
-        }).then(() => {
-          let params = new URLSearchParams();
-          params.append("id",this.markInfo.id);
-          params.append("note",this.markInfo.note);
-          params.append("status",this.order.status);
-          updateOrderNote(params).then(response=>{
-            this.markOrderDialogVisible=false;
-            this.$message({
-              type: 'success',
-              message: '订单备注成功!'
-            });
-            getOrderDetail(this.id).then(response => {
-              this.order = response.data;
-            });
-          });
-        });
-      },
-      handleDeleteOrder(){
-        this.$confirm('是否要进行该删除操作?', '提示', {
-          confirmButtonText: '确定',
-          cancelButtonText: '取消',
-          type: 'warning'
-        }).then(() => {
-          let params = new URLSearchParams();
-          params.append("ids",[this.id]);
-          deleteOrder(params).then(response=>{
-            this.$message({
-              message: '删除成功!',
-              type: 'success',
-              duration: 1000
-            });
-            this.$router.back();
-          });
-        })
-      },
-      showLogisticsDialog(){
-        this.logisticsDialogVisible=true;
-      }
-    }
-  }
-</script>
-<style scoped>
-  .detail-container {
-    width: 80%;
-    padding: 20px 20px 20px 20px;
-    margin: 20px auto;
-  }
-
-  .operate-container {
-    background: #F2F6FC;
-    height: 80px;
-    margin: -20px -20px 0;
-    line-height: 80px;
-  }
-
-  .operate-button-container {
-    float: right;
-    margin-right: 20px
-  }
-
-  .table-layout {
-    margin-top: 20px;
-    border-left: 1px solid #DCDFE6;
-    border-top: 1px solid #DCDFE6;
-  }
-
-  .table-cell {
-    height: 60px;
-    line-height: 40px;
-    border-right: 1px solid #DCDFE6;
-    border-bottom: 1px solid #DCDFE6;
-    padding: 10px;
-    font-size: 14px;
-    color: #606266;
-    text-align: center;
-    overflow: hidden;
-  }
-
-  .table-cell-title {
-    border-right: 1px solid #DCDFE6;
-    border-bottom: 1px solid #DCDFE6;
-    padding: 10px;
-    background: #F2F6FC;
-    text-align: center;
-    font-size: 14px;
-    color: #303133;
-  }
-</style>
-
-

+ 0 - 127
src/views/oms/order/setting.vue

@@ -1,127 +0,0 @@
-<template> 
-  <el-card class="form-container" shadow="never">
-    <el-form :model="orderSetting"
-             ref="orderSettingForm"
-             :rules="rules"
-             label-width="150px">
-      <el-form-item label="秒杀订单超过:" prop="flashOrderOvertime">
-        <el-input v-model="orderSetting.flashOrderOvertime" class="input-width">
-          <template slot="append">分</template>
-        </el-input>
-        <span class="note-margin">未付款,订单自动关闭</span>
-      </el-form-item>
-      <el-form-item label="正常订单超过:" prop="normalOrderOvertime">
-        <el-input v-model="orderSetting.normalOrderOvertime" class="input-width">
-          <template slot="append">分</template>
-        </el-input>
-        <span class="note-margin">未付款,订单自动关闭</span>
-      </el-form-item>
-      <el-form-item label="发货超过:" prop="confirmOvertime">
-        <el-input v-model="orderSetting.confirmOvertime" class="input-width">
-          <template slot="append">天</template>
-        </el-input>
-        <span class="note-margin">未收货,订单自动完成</span>
-      </el-form-item>
-      <el-form-item label="订单完成超过:" prop="finishOvertime">
-        <el-input v-model="orderSetting.finishOvertime" class="input-width">
-          <template slot="append">天</template>
-        </el-input>
-        <span class="note-margin">自动结束交易,不能申请售后</span>
-      </el-form-item>
-      <el-form-item label="订单完成超过:" prop="commentOvertime">
-        <el-input v-model="orderSetting.commentOvertime" class="input-width">
-          <template slot="append">天</template>
-        </el-input>
-        <span class="note-margin">自动五星好评</span>
-      </el-form-item>
-      <el-form-item>
-        <el-button
-          @click="confirm('orderSettingForm')"
-          type="primary">提交</el-button>
-      </el-form-item>
-    </el-form>
-  </el-card>
-</template>
-<script>
-  import {getOrderSetting,updateOrderSetting} from '@/api/orderSetting';
-  const defaultOrderSetting = {
-    id: null,
-    flashOrderOvertime: 0,
-    normalOrderOvertime: 0,
-    confirmOvertime: 0,
-    finishOvertime: 0,
-    commentOvertime: 0
-  };
-  const checkTime = (rule, value, callback) => {
-    if (!value) {
-      return callback(new Error('时间不能为空'));
-    }
-    console.log("checkTime",value);
-    let intValue = parseInt(value);
-    if (!Number.isInteger(intValue)) {
-      return callback(new Error('请输入数字值'));
-    }
-    callback();
-  };
-  export default {
-    name: 'orderSetting',
-    data() {
-      return {
-        orderSetting: Object.assign({}, defaultOrderSetting),
-        rules: {
-          flashOrderOvertime:{validator: checkTime, trigger: 'blur' },
-          normalOrderOvertime:{validator: checkTime, trigger: 'blur' },
-          confirmOvertime: {validator: checkTime, trigger: 'blur' },
-          finishOvertime: {validator: checkTime, trigger: 'blur' },
-          commentOvertime:{validator: checkTime, trigger: 'blur' }
-        }
-      }
-    },
-    created(){
-      this.getDetail();
-    },
-    methods:{
-      confirm(formName){
-        this.$refs[formName].validate((valid) => {
-          if (valid) {
-            this.$confirm('是否要提交修改?', '提示', {
-              confirmButtonText: '确定',
-              cancelButtonText: '取消',
-              type: 'warning'
-            }).then(() => {
-              updateOrderSetting(1,this.orderSetting).then(response=>{
-                this.$message({
-                  type: 'success',
-                  message: '提交成功!',
-                  duration:1000
-                });
-              })
-            });
-          } else {
-            this.$message({
-              message: '提交参数不合法',
-              type: 'warning'
-            });
-            return false;
-          }
-        });
-      },
-      getDetail(){
-        getOrderSetting(1).then(response=>{
-          this.orderSetting=response.data;
-        })
-      }
-    }
-  }
-</script>
-<style scoped>
-  .input-width {
-    width: 50%;
-  }
-
-  .note-margin {
-    margin-left: 15px;
-  }
-</style>
-
-

+ 0 - 14
src/views/pms/brand/add.vue

@@ -1,14 +0,0 @@
-<template> 
-  <brand-detail :is-edit='false'></brand-detail>
-</template>
-<script>
-  import BrandDetail from './components/BrandDetail'
-  export default {
-    name: 'addBrand',
-    components: { BrandDetail }
-  }
-</script>
-<style>
-</style>
-
-

+ 0 - 145
src/views/pms/brand/components/BrandDetail.vue

@@ -1,145 +0,0 @@
-<template> 
-  <el-card class="form-container" shadow="never">
-    <el-form :model="brand" :rules="rules" ref="brandFrom" label-width="150px">
-      <el-form-item label="品牌名称:" prop="name">
-        <el-input v-model="brand.name"></el-input>
-      </el-form-item>
-      <el-form-item label="品牌首字母:">
-        <el-input v-model="brand.firstLetter"></el-input>
-      </el-form-item>
-      <el-form-item label="品牌LOGO:" prop="logo">
-        <single-upload v-model="brand.logo"></single-upload>
-      </el-form-item>
-      <el-form-item label="品牌专区大图:">
-        <single-upload v-model="brand.bigPic"></single-upload>
-      </el-form-item>
-      <el-form-item label="品牌故事:">
-        <el-input
-          placeholder="请输入内容"
-          type="textarea"
-          v-model="brand.brandStory"
-          :autosize="true"></el-input>
-      </el-form-item>
-      <el-form-item label="排序:" prop="sort">
-        <el-input v-model.number="brand.sort"></el-input>
-      </el-form-item>
-      <el-form-item label="是否显示:">
-        <el-radio-group v-model="brand.showStatus">
-          <el-radio :label="1">是</el-radio>
-          <el-radio :label="0">否</el-radio>
-        </el-radio-group>
-      </el-form-item>
-      <el-form-item label="品牌制造商:">
-        <el-radio-group v-model="brand.factoryStatus">
-          <el-radio :label="1">是</el-radio>
-          <el-radio :label="0">否</el-radio>
-        </el-radio-group>
-      </el-form-item>
-      <el-form-item>
-        <el-button type="primary" @click="onSubmit('brandFrom')">提交</el-button>
-        <el-button v-if="!isEdit" @click="resetForm('brandFrom')">重置</el-button>
-      </el-form-item>
-    </el-form>
-  </el-card>
-</template>
-<script>
-  import {createBrand, getBrand, updateBrand} from '@/api/brand'
-  import SingleUpload from '@/components/Upload/singleUpload'
-  const defaultBrand={
-    bigPic: '',
-    brandStory: '',
-    factoryStatus: 0,
-    firstLetter: '',
-    logo: '',
-    name: '',
-    showStatus: 0,
-    sort: 0
-  };
-  export default {
-    name: 'BrandDetail',
-    components:{SingleUpload},
-    props: {
-      isEdit: {
-        type: Boolean,
-        default: false
-      }
-    },
-    data() {
-      return {
-        brand:Object.assign({}, defaultBrand),
-        rules: {
-          name: [
-            {required: true, message: '请输入品牌名称', trigger: 'blur'},
-            {min: 2, max: 140, message: '长度在 2 到 140 个字符', trigger: 'blur'}
-          ],
-          logo: [
-            {required: true, message: '请输入品牌logo', trigger: 'blur'}
-          ],
-          sort: [
-            {type: 'number', message: '排序必须为数字'}
-          ],
-        }
-      }
-    },
-    created() {
-      if (this.isEdit) {
-        getBrand(this.$route.query.id).then(response => {
-          this.brand = response.data;
-        });
-      }else{
-        this.brand = Object.assign({},defaultBrand);
-      }
-    },
-    methods: {
-      onSubmit(formName) {
-        this.$refs[formName].validate((valid) => {
-          if (valid) {
-            this.$confirm('是否提交数据', '提示', {
-              confirmButtonText: '确定',
-              cancelButtonText: '取消',
-              type: 'warning'
-            }).then(() => {
-              if (this.isEdit) {
-                updateBrand(this.$route.query.id, this.brand).then(response => {
-                  this.$refs[formName].resetFields();
-                  this.$message({
-                    message: '修改成功',
-                    type: 'success',
-                    duration:1000
-                  });
-                  this.$router.back();
-                });
-              } else {
-                createBrand(this.brand).then(response => {
-                  this.$refs[formName].resetFields();
-                  this.brand = Object.assign({},defaultBrand);
-                  this.$message({
-                    message: '提交成功',
-                    type: 'success',
-                    duration:1000
-                  });
-                });
-              }
-            });
-
-          } else {
-            this.$message({
-              message: '验证失败',
-              type: 'error',
-              duration:1000
-            });
-            return false;
-          }
-        });
-      },
-      resetForm(formName) {
-        this.$refs[formName].resetFields();
-        this.brand = Object.assign({},defaultBrand);
-      }
-    }
-  }
-</script>
-<style>
-</style>
-
-

+ 0 - 309
src/views/pms/brand/index.vue

@@ -1,309 +0,0 @@
-<template> 
-  <div class="app-container">
-    <el-card class="filter-container" shadow="never">
-        <div>
-          <i class="el-icon-search"></i>
-          <span>筛选搜索</span>
-          <el-button
-            style="float: right"
-            @click="searchBrandList()"
-            type="primary"
-            size="small">
-            查询结果
-          </el-button>
-        </div>
-        <div style="margin-top: 15px">
-          <el-form :inline="true" :model="listQuery" size="small" label-width="140px">
-            <el-form-item label="输入搜索:">
-              <el-input style="width: 203px" v-model="listQuery.keyword" placeholder="品牌名称/关键字"></el-input>
-            </el-form-item>
-          </el-form>
-        </div>
-    </el-card>
-    <el-card class="operate-container" shadow="never">
-      <i class="el-icon-tickets"></i>
-      <span>数据列表</span>
-      <el-button
-        class="btn-add"
-        @click="addBrand()"
-        size="mini">
-        添加
-      </el-button>
-    </el-card>
-    <div class="table-container">
-      <el-table ref="brandTable"
-                :data="list"
-                style="width: 100%"
-                @selection-change="handleSelectionChange"
-                v-loading="listLoading"
-                border>
-        <el-table-column type="selection" width="60" align="center"></el-table-column>
-        <el-table-column label="编号" width="100" align="center">
-          <template slot-scope="scope">{{scope.row.id}}</template>
-        </el-table-column>
-        <el-table-column label="品牌名称" align="center">
-          <template slot-scope="scope">{{scope.row.name}}</template>
-        </el-table-column>
-        <el-table-column label="品牌首字母" width="100" align="center">
-          <template slot-scope="scope">{{scope.row.firstLetter}}</template>
-        </el-table-column>
-        <el-table-column label="排序" width="100" align="center">
-          <template slot-scope="scope">{{scope.row.sort}}</template>
-        </el-table-column>
-        <el-table-column label="品牌制造商" width="100" align="center">
-          <template slot-scope="scope">
-            <el-switch
-              @change="handleFactoryStatusChange(scope.$index, scope.row)"
-              :active-value="1"
-              :inactive-value="0"
-              v-model="scope.row.factoryStatus">
-            </el-switch>
-          </template>
-        </el-table-column>
-        <el-table-column label="是否显示" width="100" align="center">
-          <template slot-scope="scope">
-            <el-switch
-              @change="handleShowStatusChange(scope.$index, scope.row)"
-              :active-value="1"
-              :inactive-value="0"
-              v-model="scope.row.showStatus">
-            </el-switch>
-          </template>
-        </el-table-column>
-        <el-table-column label="相关" width="220" align="center">
-          <template slot-scope="scope">
-            <span>商品:</span>
-            <el-button
-              size="mini"
-              type="text"
-              @click="getProductList(scope.$index, scope.row)">100
-            </el-button>
-            <span>评价:</span>
-            <el-button
-              size="mini"
-              type="text"
-              @click="getProductCommentList(scope.$index, scope.row)">1000
-            </el-button>
-          </template>
-        </el-table-column>
-        <el-table-column label="操作" width="200" align="center">
-          <template slot-scope="scope">
-            <el-button
-              size="mini"
-              @click="handleUpdate(scope.$index, scope.row)">编辑
-            </el-button>
-            <el-button
-              size="mini"
-              type="danger"
-              @click="handleDelete(scope.$index, scope.row)">删除
-            </el-button>
-          </template>
-        </el-table-column>
-      </el-table>
-    </div>
-    <div class="batch-operate-container">
-      <el-select
-        size="small"
-        v-model="operateType" placeholder="批量操作">
-        <el-option
-          v-for="item in operates"
-          :key="item.value"
-          :label="item.label"
-          :value="item.value">
-        </el-option>
-      </el-select>
-      <el-button
-        style="margin-left: 20px"
-        class="search-button"
-        @click="handleBatchOperate()"
-        type="primary"
-        size="small">
-        确定
-      </el-button>
-    </div>
-    <div class="pagination-container">
-      <el-pagination
-        background
-        @size-change="handleSizeChange"
-        @current-change="handleCurrentChange"
-        layout="total, sizes,prev, pager, next,jumper"
-        :page-size="listQuery.pageSize"
-        :page-sizes="[5,10,15]"
-        :current-page.sync="listQuery.pageNum"
-        :total="total">
-      </el-pagination>
-    </div>
-  </div>
-</template>
-<script>
-  import {fetchList, updateShowStatus, updateFactoryStatus, deleteBrand} from '@/api/brand'
-
-  export default {
-    name: 'brandList',
-    data() {
-      return {
-        operates: [
-          {
-            label: "显示品牌",
-            value: "showBrand"
-          },
-          {
-            label: "隐藏品牌",
-            value: "hideBrand"
-          }
-        ],
-        operateType: null,
-        listQuery: {
-          keyword: null,
-          pageNum: 1,
-          pageSize: 10
-        },
-        list: null,
-        total: null,
-        listLoading: true,
-        multipleSelection: []
-      }
-    },
-    created() {
-      this.getList();
-    },
-    methods: {
-      getList() {
-        this.listLoading = true;
-        fetchList(this.listQuery).then(response => {
-          this.listLoading = false;
-          this.list = response.data.list;
-          this.total = response.data.total;
-          this.totalPage = response.data.totalPage;
-          this.pageSize = response.data.pageSize;
-        });
-      },
-      handleSelectionChange(val) {
-        this.multipleSelection = val;
-      },
-      handleUpdate(index, row) {
-        this.$router.push({path: '/pms/updateBrand', query: {id: row.id}})
-      },
-      handleDelete(index, row) {
-        this.$confirm('是否要删除该品牌', '提示', {
-          confirmButtonText: '确定',
-          cancelButtonText: '取消',
-          type: 'warning'
-        }).then(() => {
-          deleteBrand(row.id).then(response => {
-            this.$message({
-              message: '删除成功',
-              type: 'success',
-              duration: 1000
-            });
-            this.getList();
-          });
-        });
-      },
-      getProductList(index, row) {
-        console.log(index, row);
-      },
-      getProductCommentList(index, row) {
-        console.log(index, row);
-      },
-      handleFactoryStatusChange(index, row) {
-        var data = new URLSearchParams();
-        data.append("ids", row.id);
-        data.append("factoryStatus", row.factoryStatus);
-        updateFactoryStatus(data).then(response => {
-          this.$message({
-            message: '修改成功',
-            type: 'success',
-            duration: 1000
-          });
-        }).catch(error => {
-          if (row.factoryStatus === 0) {
-            row.factoryStatus = 1;
-          } else {
-            row.factoryStatus = 0;
-          }
-        });
-      },
-      handleShowStatusChange(index, row) {
-        let data = new URLSearchParams();
-        ;
-        data.append("ids", row.id);
-        data.append("showStatus", row.showStatus);
-        updateShowStatus(data).then(response => {
-          this.$message({
-            message: '修改成功',
-            type: 'success',
-            duration: 1000
-          });
-        }).catch(error => {
-          if (row.showStatus === 0) {
-            row.showStatus = 1;
-          } else {
-            row.showStatus = 0;
-          }
-        });
-      },
-      handleSizeChange(val) {
-        this.listQuery.pageNum = 1;
-        this.listQuery.pageSize = val;
-        this.getList();
-      },
-      handleCurrentChange(val) {
-        this.listQuery.pageNum = val;
-        this.getList();
-      },
-      searchBrandList() {
-        this.listQuery.pageNum = 1;
-        this.getList();
-      },
-      handleBatchOperate() {
-        console.log(this.multipleSelection);
-        if (this.multipleSelection < 1) {
-          this.$message({
-            message: '请选择一条记录',
-            type: 'warning',
-            duration: 1000
-          });
-          return;
-        }
-        let showStatus = 0;
-        if (this.operateType === 'showBrand') {
-          showStatus = 1;
-        } else if (this.operateType === 'hideBrand') {
-          showStatus = 0;
-        } else {
-          this.$message({
-            message: '请选择批量操作类型',
-            type: 'warning',
-            duration: 1000
-          });
-          return;
-        }
-        let ids = [];
-        for (let i = 0; i < this.multipleSelection.length; i++) {
-          ids.push(this.multipleSelection[i].id);
-        }
-        let data = new URLSearchParams();
-        data.append("ids", ids);
-        data.append("showStatus", showStatus);
-        updateShowStatus(data).then(response => {
-          this.getList();
-          this.$message({
-            message: '修改成功',
-            type: 'success',
-            duration: 1000
-          });
-        });
-      },
-      addBrand() {
-        this.$router.push({path: '/pms/addBrand'})
-      }
-    }
-  }
-</script>
-<style rel="stylesheet/scss" lang="scss" scoped>
-
-
-</style>
-
-

+ 0 - 14
src/views/pms/brand/update.vue

@@ -1,14 +0,0 @@
-<template> 
-  <brand-detail :is-edit='true'></brand-detail>
-</template>
-<script>
-  import BrandDetail from './components/BrandDetail'
-  export default {
-    name: 'updateBrand',
-    components: { BrandDetail }
-  }
-</script>
-<style>
-</style>
-
-

+ 0 - 12
src/views/pms/product/add.vue

@@ -1,12 +0,0 @@
-<template> 
-  <product-detail :is-edit='false'></product-detail>
-</template>
-<script>
-  import ProductDetail from './components/ProductDetail'
-  export default {
-    name: 'addProduct',
-    components: { ProductDetail }
-  }
-</script>
-<style>
-</style>

+ 0 - 640
src/views/pms/product/components/ProductAttrDetail.vue

@@ -1,640 +0,0 @@
-<template>
-  <div style="margin-top: 50px">
-    <el-form :model="value" ref="productAttrForm" label-width="120px" class="form-inner-container" size="small">
-      <el-form-item label="属性类型:">
-        <el-select v-model="value.productAttributeCategoryId"
-                   placeholder="请选择属性类型"
-                   @change="handleProductAttrChange">
-          <el-option
-            v-for="item in productAttributeCategoryOptions"
-            :key="item.value"
-            :label="item.label"
-            :value="item.value">
-          </el-option>
-        </el-select>
-      </el-form-item>
-      <el-form-item label="商品规格:">
-        <el-card shadow="never" class="cardBg">
-          <div v-for="(productAttr,idx) in selectProductAttr">
-            {{productAttr.name}}:
-            <el-checkbox-group v-if="productAttr.handAddStatus===0" v-model="selectProductAttr[idx].values">
-              <el-checkbox v-for="item in getInputListArr(productAttr.inputList)" :label="item" :key="item"
-                           class="littleMarginLeft"></el-checkbox>
-            </el-checkbox-group>
-            <div v-else>
-              <el-checkbox-group v-model="selectProductAttr[idx].values">
-                <div v-for="(item,index) in selectProductAttr[idx].options" style="display: inline-block"
-                     class="littleMarginLeft">
-                  <el-checkbox :label="item" :key="item"></el-checkbox>
-                  <el-button type="text" class="littleMarginLeft" @click="handleRemoveProductAttrValue(idx,index)">删除
-                  </el-button>
-                </div>
-              </el-checkbox-group>
-              <el-input v-model="addProductAttrValue" style="width: 160px;margin-left: 10px" clearable></el-input>
-              <el-button class="littleMarginLeft" @click="handleAddProductAttrValue(idx)">增加</el-button>
-            </div>
-          </div>
-        </el-card>
-        <el-table style="width: 100%;margin-top: 20px"
-                  :data="value.skuStockList"
-                  border>
-          <el-table-column
-            v-for="(item,index) in selectProductAttr"
-            :label="item.name"
-            :key="item.id"
-            align="center">
-            <template slot-scope="scope">
-              {{getProductSkuSp(scope.row,index)}}
-            </template>
-          </el-table-column>
-          <el-table-column
-            label="销售价格"
-            width="100"
-            align="center">
-            <template slot-scope="scope">
-              <el-input v-model="scope.row.price"></el-input>
-            </template>
-          </el-table-column>
-          <el-table-column
-            label="促销价格"
-            width="100"
-            align="center">
-            <template slot-scope="scope">
-              <el-input v-model="scope.row.promotionPrice"></el-input>
-            </template>
-          </el-table-column>
-          <el-table-column
-            label="商品库存"
-            width="80"
-            align="center">
-            <template slot-scope="scope">
-              <el-input v-model="scope.row.stock"></el-input>
-            </template>
-          </el-table-column>
-          <el-table-column
-            label="库存预警值"
-            width="80"
-            align="center">
-            <template slot-scope="scope">
-              <el-input v-model="scope.row.lowStock"></el-input>
-            </template>
-          </el-table-column>
-          <el-table-column
-            label="SKU编号"
-            width="160"
-            align="center">
-            <template slot-scope="scope">
-              <el-input v-model="scope.row.skuCode"></el-input>
-            </template>
-          </el-table-column>
-          <el-table-column
-            label="操作"
-            width="80"
-            align="center">
-            <template slot-scope="scope">
-              <el-button
-                type="text"
-                @click="handleRemoveProductSku(scope.$index, scope.row)">删除
-              </el-button>
-            </template>
-          </el-table-column>
-        </el-table>
-        <el-button
-          type="primary"
-          style="margin-top: 20px"
-          @click="handleRefreshProductSkuList">刷新列表
-        </el-button>
-        <el-button
-          type="primary"
-          style="margin-top: 20px"
-          @click="handleSyncProductSkuPrice">同步价格
-        </el-button>
-        <el-button
-          type="primary"
-          style="margin-top: 20px"
-          @click="handleSyncProductSkuStock">同步库存
-        </el-button>
-      </el-form-item>
-      <el-form-item label="属性图片:" v-if="hasAttrPic">
-        <el-card shadow="never" class="cardBg">
-          <div v-for="(item,index) in selectProductAttrPics">
-            <span>{{item.name}}:</span>
-            <single-upload v-model="item.pic"
-                           style="width: 300px;display: inline-block;margin-left: 10px"></single-upload>
-          </div>
-        </el-card>
-      </el-form-item>
-      <el-form-item label="商品参数:">
-        <el-card shadow="never" class="cardBg">
-          <div v-for="(item,index) in selectProductParam" :class="{littleMarginTop:index!==0}">
-            <div class="paramInputLabel">{{item.name}}:</div>
-            <el-select v-if="item.inputType===1" class="paramInput" v-model="selectProductParam[index].value">
-              <el-option
-                v-for="item in getParamInputList(item.inputList)"
-                :key="item"
-                :label="item"
-                :value="item">
-              </el-option>
-            </el-select>
-            <el-input v-else class="paramInput" v-model="selectProductParam[index].value"></el-input>
-          </div>
-        </el-card>
-      </el-form-item>
-      <el-form-item label="商品相册:">
-        <multi-upload v-model="selectProductPics"></multi-upload>
-      </el-form-item>
-      <el-form-item label="商品详情:">
-        <el-tabs v-model="activeHtmlName" type="card">
-          <el-tab-pane label="电脑端详情" name="pc">
-            <tinymce :width="595" :height="300" v-model="value.detailHtml"></tinymce>
-          </el-tab-pane>
-          <el-tab-pane label="移动端详情" name="mobile">
-            <tinymce :width="595" :height="300" v-model="value.detailMobileHtml"></tinymce>
-          </el-tab-pane>
-        </el-tabs>
-      </el-form-item>
-      <el-form-item style="text-align: center">
-        <el-button size="medium" @click="handlePrev">上一步,填写商品促销</el-button>
-        <el-button type="primary" size="medium" @click="handleNext">下一步,选择商品关联</el-button>
-      </el-form-item>
-    </el-form>
-  </div>
-</template>
-
-<script>
-  import {fetchList as fetchProductAttrCateList} from '@/api/productAttrCate'
-  import {fetchList as fetchProductAttrList} from '@/api/productAttr'
-  import SingleUpload from '@/components/Upload/singleUpload'
-  import MultiUpload from '@/components/Upload/multiUpload'
-  import Tinymce from '@/components/Tinymce'
-
-  export default {
-    name: "ProductAttrDetail",
-    components: {SingleUpload, MultiUpload, Tinymce},
-    props: {
-      value: Object,
-      isEdit: {
-        type: Boolean,
-        default: false
-      }
-    },
-    data() {
-      return {
-        //编辑模式时是否初始化成功
-        hasEditCreated:false,
-        //商品属性分类下拉选项
-        productAttributeCategoryOptions: [],
-        //选中的商品属性
-        selectProductAttr: [],
-        //选中的商品参数
-        selectProductParam: [],
-        //选中的商品属性图片
-        selectProductAttrPics: [],
-        //可手动添加的商品属性
-        addProductAttrValue: '',
-        //商品富文本详情激活类型
-        activeHtmlName: 'pc'
-      }
-    },
-    computed: {
-      //是否有商品属性图片
-      hasAttrPic() {
-        if (this.selectProductAttrPics.length < 1) {
-          return false;
-        }
-        return true;
-      },
-      //商品的编号
-      productId(){
-        return this.value.id;
-      },
-      //商品的主图和画册图片
-      selectProductPics:{
-        get:function () {
-          let pics=[];
-          if(this.value.pic===undefined||this.value.pic==null||this.value.pic===''){
-            return pics;
-          }
-          pics.push(this.value.pic);
-          if(this.value.albumPics===undefined||this.value.albumPics==null||this.value.albumPics===''){
-            return pics;
-          }
-          let albumPics = this.value.albumPics.split(',');
-          for(let i=0;i<albumPics.length;i++){
-            pics.push(albumPics[i]);
-          }
-          return pics;
-        },
-        set:function (newValue) {
-          if (newValue == null || newValue.length === 0) {
-            this.value.pic = null;
-            this.value.albumPics = null;
-          } else {
-            this.value.pic = newValue[0];
-            this.value.albumPics = '';
-            if (newValue.length > 1) {
-              for (let i = 1; i < newValue.length; i++) {
-                this.value.albumPics += newValue[i];
-                if (i !== newValue.length - 1) {
-                  this.value.albumPics += ',';
-                }
-              }
-            }
-          }
-        }
-      }
-    },
-    created() {
-      this.getProductAttrCateList();
-    },
-    watch: {
-      productId:function (newValue) {
-        if(!this.isEdit)return;
-        if(this.hasEditCreated)return;
-        if(newValue===undefined||newValue==null||newValue===0)return;
-        this.handleEditCreated();
-      }
-    },
-    methods: {
-      handleEditCreated() {
-        //根据商品属性分类id获取属性和参数
-        if(this.value.productAttributeCategoryId!=null){
-          this.handleProductAttrChange(this.value.productAttributeCategoryId);
-        }
-        this.hasEditCreated=true;
-      },
-      getProductAttrCateList() {
-        let param = {pageNum: 1, pageSize: 100};
-        fetchProductAttrCateList(param).then(response => {
-          this.productAttributeCategoryOptions = [];
-          let list = response.data.list;
-          for (let i = 0; i < list.length; i++) {
-            this.productAttributeCategoryOptions.push({label: list[i].name, value: list[i].id});
-          }
-        });
-      },
-      getProductAttrList(type, cid) {
-        let param = {pageNum: 1, pageSize: 100, type: type};
-        fetchProductAttrList(cid, param).then(response => {
-          let list = response.data.list;
-          if (type === 0) {
-            this.selectProductAttr = [];
-            for (let i = 0; i < list.length; i++) {
-              let options = [];
-              let values = [];
-              if (this.isEdit) {
-                if (list[i].handAddStatus === 1) {
-                  //编辑状态下获取手动添加编辑属性
-                  options = this.getEditAttrOptions(list[i].id);
-                }
-                //编辑状态下获取选中属性
-                values = this.getEditAttrValues(i);
-              }
-              this.selectProductAttr.push({
-                id: list[i].id,
-                name: list[i].name,
-                handAddStatus: list[i].handAddStatus,
-                inputList: list[i].inputList,
-                values: values,
-                options: options
-              });
-            }
-            if(this.isEdit){
-              //编辑模式下刷新商品属性图片
-              this.refreshProductAttrPics();
-            }
-          } else {
-            this.selectProductParam = [];
-            for (let i = 0; i < list.length; i++) {
-              let value=null;
-              if(this.isEdit){
-                //编辑模式下获取参数属性
-                value= this.getEditParamValue(list[i].id);
-              }
-              this.selectProductParam.push({
-                id: list[i].id,
-                name: list[i].name,
-                value: value,
-                inputType: list[i].inputType,
-                inputList: list[i].inputList
-              });
-            }
-          }
-        });
-      },
-      //获取设置的可手动添加属性值
-      getEditAttrOptions(id) {
-        let options = [];
-        for (let i = 0; i < this.value.productAttributeValueList.length; i++) {
-          let attrValue = this.value.productAttributeValueList[i];
-          if (attrValue.productAttributeId === id) {
-            let strArr = attrValue.value.split(',');
-            for (let j = 0; j < strArr.length; j++) {
-              options.push(strArr[j]);
-            }
-            break;
-          }
-        }
-        return options;
-      },
-      //获取选中的属性值
-      getEditAttrValues(index) {
-        let values = new Set();
-        if (index === 0) {
-          for (let i = 0; i < this.value.skuStockList.length; i++) {
-            let sku = this.value.skuStockList[i];
-            let spData = JSON.parse(sku.spData);
-            if (spData!= null && spData.length>=1) {
-              values.add(spData[0].value);
-            }
-          }
-        } else if (index === 1) {
-          for (let i = 0; i < this.value.skuStockList.length; i++) {
-            let sku = this.value.skuStockList[i];
-            let spData = JSON.parse(sku.spData);
-            if (spData!= null && spData.length>=2) {
-              values.add(spData[1].value);
-            }
-          }
-        } else {
-          for (let i = 0; i < this.value.skuStockList.length; i++) {
-            let sku = this.value.skuStockList[i];
-            let spData = JSON.parse(sku.spData);
-            if (spData!= null && spData.length>=3) {
-              values.add(spData[2].value);
-            }
-          }
-        }
-        return Array.from(values);
-      },
-      //获取属性的值
-      getEditParamValue(id){
-        for(let i=0;i<this.value.productAttributeValueList.length;i++){
-          if(id===this.value.productAttributeValueList[i].productAttributeId){
-            return this.value.productAttributeValueList[i].value;
-          }
-        }
-      },
-      handleProductAttrChange(value) {
-        this.getProductAttrList(0, value);
-        this.getProductAttrList(1, value);
-      },
-      getInputListArr(inputList) {
-        return inputList.split(',');
-      },
-      handleAddProductAttrValue(idx) {
-        let options = this.selectProductAttr[idx].options;
-        if (this.addProductAttrValue == null || this.addProductAttrValue == '') {
-          this.$message({
-            message: '属性值不能为空',
-            type: 'warning',
-            duration: 1000
-          });
-          return
-        }
-        if (options.indexOf(this.addProductAttrValue) !== -1) {
-          this.$message({
-            message: '属性值不能重复',
-            type: 'warning',
-            duration: 1000
-          });
-          return;
-        }
-        this.selectProductAttr[idx].options.push(this.addProductAttrValue);
-        this.addProductAttrValue = null;
-      },
-      handleRemoveProductAttrValue(idx, index) {
-        this.selectProductAttr[idx].options.splice(index, 1);
-      },
-      getProductSkuSp(row, index) {
-        let spData = JSON.parse(row.spData);
-        if(spData!=null&&index<spData.length){
-          return spData[index].value;
-        }else{
-          return null;
-        }
-      },
-      handleRefreshProductSkuList() {
-        this.$confirm('刷新列表将导致sku信息重新生成,是否要刷新', '提示', {
-          confirmButtonText: '确定',
-          cancelButtonText: '取消',
-          type: 'warning'
-        }).then(() => {
-          this.refreshProductAttrPics();
-          this.refreshProductSkuList();
-        });
-      },
-      handleSyncProductSkuPrice(){
-        this.$confirm('将同步第一个sku的价格到所有sku,是否继续', '提示', {
-          confirmButtonText: '确定',
-          cancelButtonText: '取消',
-          type: 'warning'
-        }).then(() => {
-          if(this.value.skuStockList!==null&&this.value.skuStockList.length>0){
-            let tempSkuList = [];
-            tempSkuList = tempSkuList.concat(tempSkuList,this.value.skuStockList);
-            let price=this.value.skuStockList[0].price;
-            for(let i=0;i<tempSkuList.length;i++){
-              tempSkuList[i].price=price;
-            }
-            this.value.skuStockList=[];
-            this.value.skuStockList=this.value.skuStockList.concat(this.value.skuStockList,tempSkuList);
-          }
-        });
-      },
-      handleSyncProductSkuStock(){
-        this.$confirm('将同步第一个sku的库存到所有sku,是否继续', '提示', {
-          confirmButtonText: '确定',
-          cancelButtonText: '取消',
-          type: 'warning'
-        }).then(() => {
-          if(this.value.skuStockList!==null&&this.value.skuStockList.length>0){
-            let tempSkuList = [];
-            tempSkuList = tempSkuList.concat(tempSkuList,this.value.skuStockList);
-            let stock=this.value.skuStockList[0].stock;
-            let lowStock=this.value.skuStockList[0].lowStock;
-            for(let i=0;i<tempSkuList.length;i++){
-              tempSkuList[i].stock=stock;
-              tempSkuList[i].lowStock=lowStock;
-            }
-            this.value.skuStockList=[];
-            this.value.skuStockList=this.value.skuStockList.concat(this.value.skuStockList,tempSkuList);
-          }
-        });
-      },
-      refreshProductSkuList() {
-        this.value.skuStockList = [];
-        let skuList = this.value.skuStockList;
-        //只有一个属性时
-        if (this.selectProductAttr.length === 1) {
-          let attr = this.selectProductAttr[0];
-          for (let i = 0; i < attr.values.length; i++) {
-            skuList.push({
-              spData: JSON.stringify([{key:attr.name,value:attr.values[i]}])
-            });
-          }
-        } else if (this.selectProductAttr.length === 2) {
-          let attr0 = this.selectProductAttr[0];
-          let attr1 = this.selectProductAttr[1];
-          for (let i = 0; i < attr0.values.length; i++) {
-            if (attr1.values.length === 0) {
-              skuList.push({
-                spData: JSON.stringify([{key:attr0.name,value:attr0.values[i]}])
-              });
-              continue;
-            }
-            for (let j = 0; j < attr1.values.length; j++) {
-              let spData = [];
-              spData.push({key:attr0.name,value:attr0.values[i]});
-              spData.push({key:attr1.name,value:attr1.values[j]});
-              skuList.push({
-                spData: JSON.stringify(spData)
-              });
-            }
-          }
-        } else {
-          let attr0 = this.selectProductAttr[0];
-          let attr1 = this.selectProductAttr[1];
-          let attr2 = this.selectProductAttr[2];
-          for (let i = 0; i < attr0.values.length; i++) {
-            if (attr1.values.length === 0) {
-              skuList.push({
-                spData: JSON.stringify([{key:attr0.name,value:attr0.values[i]}])
-              });
-              continue;
-            }
-            for (let j = 0; j < attr1.values.length; j++) {
-              if (attr2.values.length === 0) {
-                let spData = [];
-                spData.push({key:attr0.name,value:attr0.values[i]});
-                spData.push({key:attr1.name,value:attr1.values[j]});
-                skuList.push({
-                  spData: JSON.stringify(spData)
-                });
-                continue;
-              }
-              for (let k = 0; k < attr2.values.length; k++) {
-                let spData = [];
-                spData.push({key:attr0.name,value:attr0.values[i]});
-                spData.push({key:attr1.name,value:attr1.values[j]});
-                spData.push({key:attr2.name,value:attr2.values[k]});
-                skuList.push({
-                  spData: JSON.stringify(spData)
-                });
-              }
-            }
-          }
-        }
-      },
-      refreshProductAttrPics() {
-        this.selectProductAttrPics = [];
-        if (this.selectProductAttr.length >= 1) {
-          let values = this.selectProductAttr[0].values;
-          for (let i = 0; i < values.length; i++) {
-            let pic=null;
-            if(this.isEdit){
-              //编辑状态下获取图片
-              pic=this.getProductSkuPic(values[i]);
-            }
-            this.selectProductAttrPics.push({name: values[i], pic: pic})
-          }
-        }
-      },
-      //获取商品相关属性的图片
-      getProductSkuPic(name){
-        for(let i=0;i<this.value.skuStockList.length;i++){
-          let spData = JSON.parse(this.value.skuStockList[i].spData);
-          if(name===spData[0].value){
-            return this.value.skuStockList[i].pic;
-          }
-        }
-        return null;
-      },
-      //合并商品属性
-      mergeProductAttrValue() {
-        this.value.productAttributeValueList = [];
-        for (let i = 0; i < this.selectProductAttr.length; i++) {
-          let attr = this.selectProductAttr[i];
-          if (attr.handAddStatus === 1 && attr.options != null && attr.options.length > 0) {
-            this.value.productAttributeValueList.push({
-              productAttributeId: attr.id,
-              value: this.getOptionStr(attr.options)
-            });
-          }
-        }
-        for (let i = 0; i < this.selectProductParam.length; i++) {
-          let param = this.selectProductParam[i];
-          this.value.productAttributeValueList.push({
-            productAttributeId: param.id,
-            value: param.value
-          });
-        }
-      },
-      //合并商品属性图片
-      mergeProductAttrPics() {
-        for (let i = 0; i < this.selectProductAttrPics.length; i++) {
-          for (let j = 0; j < this.value.skuStockList.length; j++) {
-            let spData = JSON.parse(this.value.skuStockList[j].spData);
-            if (spData[0].value === this.selectProductAttrPics[i].name) {
-              this.value.skuStockList[j].pic = this.selectProductAttrPics[i].pic;
-            }
-          }
-        }
-      },
-      getOptionStr(arr) {
-        let str = '';
-        for (let i = 0; i < arr.length; i++) {
-          str += arr[i];
-          if (i != arr.length - 1) {
-            str += ',';
-          }
-        }
-        return str;
-      },
-      handleRemoveProductSku(index, row) {
-        let list = this.value.skuStockList;
-        if (list.length === 1) {
-          list.pop();
-        } else {
-          list.splice(index, 1);
-        }
-      },
-      getParamInputList(inputList) {
-        return inputList.split(',');
-      },
-      handlePrev() {
-        this.$emit('prevStep')
-      },
-      handleNext() {
-        this.mergeProductAttrValue();
-        this.mergeProductAttrPics();
-        this.$emit('nextStep')
-      }
-    }
-  }
-</script>
-
-<style scoped>
-  .littleMarginLeft {
-    margin-left: 10px;
-  }
-
-  .littleMarginTop {
-    margin-top: 10px;
-  }
-
-  .paramInput {
-    width: 250px;
-  }
-
-  .paramInputLabel {
-    display: inline-block;
-    width: 100px;
-    text-align: right;
-    padding-right: 10px
-  }
-
-  .cardBg {
-    background: #F8F9FC;
-  }
-</style>

+ 0 - 188
src/views/pms/product/components/ProductDetail.vue

@@ -1,188 +0,0 @@
-<template> 
-  <el-card class="form-container" shadow="never">
-    <el-steps :active="active" finish-status="success" align-center>
-      <el-step title="填写商品信息"></el-step>
-      <el-step title="填写商品促销"></el-step>
-      <el-step title="填写商品属性"></el-step>
-      <el-step title="选择商品关联"></el-step>
-    </el-steps>
-    <product-info-detail
-      v-show="showStatus[0]"
-      v-model="productParam"
-      :is-edit="isEdit"
-      @nextStep="nextStep">
-    </product-info-detail>
-    <product-sale-detail
-      v-show="showStatus[1]"
-      v-model="productParam"
-      :is-edit="isEdit"
-      @nextStep="nextStep"
-      @prevStep="prevStep">
-    </product-sale-detail>
-    <product-attr-detail
-      v-show="showStatus[2]"
-      v-model="productParam"
-      :is-edit="isEdit"
-      @nextStep="nextStep"
-      @prevStep="prevStep">
-    </product-attr-detail>
-    <product-relation-detail
-      v-show="showStatus[3]"
-      v-model="productParam"
-      :is-edit="isEdit"
-      @prevStep="prevStep"
-      @finishCommit="finishCommit">
-    </product-relation-detail>
-  </el-card>
-</template>
-<script>
-  import ProductInfoDetail from './ProductInfoDetail';
-  import ProductSaleDetail from './ProductSaleDetail';
-  import ProductAttrDetail from './ProductAttrDetail';
-  import ProductRelationDetail from './ProductRelationDetail';
-  import {createProduct,getProduct,updateProduct} from '@/api/product';
-
-  const defaultProductParam = {
-    albumPics: '',
-    brandId: null,
-    brandName: '',
-    deleteStatus: 0,
-    description: '',
-    detailDesc: '',
-    detailHtml: '',
-    detailMobileHtml: '',
-    detailTitle: '',
-    feightTemplateId: 0,
-    flashPromotionCount: 0,
-    flashPromotionId: 0,
-    flashPromotionPrice: 0,
-    flashPromotionSort: 0,
-    giftPoint: 0,
-    giftGrowth: 0,
-    keywords: '',
-    lowStock: 0,
-    name: '',
-    newStatus: 0,
-    note: '',
-    originalPrice: 0,
-    pic: '',
-    //会员价格{memberLevelId: 0,memberPrice: 0,memberLevelName: null}
-    memberPriceList: [],
-    //商品满减
-    productFullReductionList: [{fullPrice: 0, reducePrice: 0}],
-    //商品阶梯价格
-    productLadderList: [{count: 0,discount: 0,price: 0}],
-    previewStatus: 0,
-    price: 0,
-    productAttributeCategoryId: null,
-    //商品属性相关{productAttributeId: 0, value: ''}
-    productAttributeValueList: [],
-    //商品sku库存信息{lowStock: 0, pic: '', price: 0, sale: 0, skuCode: '', spData: '', stock: 0}
-    skuStockList: [],
-    //商品相关专题{subjectId: 0}
-    subjectProductRelationList: [],
-    //商品相关优选{prefrenceAreaId: 0}
-    prefrenceAreaProductRelationList: [],
-    productCategoryId: null,
-    productCategoryName: '',
-    productSn: '',
-    promotionEndTime: '',
-    promotionPerLimit: 0,
-    promotionPrice: null,
-    promotionStartTime: '',
-    promotionType: 0,
-    publishStatus: 0,
-    recommandStatus: 0,
-    sale: 0,
-    serviceIds: '',
-    sort: 0,
-    stock: 0,
-    subTitle: '',
-    unit: '',
-    usePointLimit: 0,
-    verifyStatus: 0,
-    weight: 0
-  };
-  export default {
-    name: 'ProductDetail',
-    components: {ProductInfoDetail, ProductSaleDetail, ProductAttrDetail, ProductRelationDetail},
-    props: {
-      isEdit: {
-        type: Boolean,
-        default: false
-      }
-    },
-    data() {
-      return {
-        active: 0,
-        productParam: Object.assign({}, defaultProductParam),
-        showStatus: [true, false, false, false]
-      }
-    },
-    created(){
-      if(this.isEdit){
-        getProduct(this.$route.query.id).then(response=>{
-          this.productParam=response.data;
-        });
-      }
-    },
-    methods: {
-      hideAll() {
-        for (let i = 0; i < this.showStatus.length; i++) {
-          this.showStatus[i] = false;
-        }
-      },
-      prevStep() {
-        if (this.active > 0 && this.active < this.showStatus.length) {
-          this.active--;
-          this.hideAll();
-          this.showStatus[this.active] = true;
-        }
-      },
-      nextStep() {
-        if (this.active < this.showStatus.length - 1) {
-          this.active++;
-          this.hideAll();
-          this.showStatus[this.active] = true;
-        }
-      },
-      finishCommit(isEdit) {
-        this.$confirm('是否要提交该产品', '提示', {
-          confirmButtonText: '确定',
-          cancelButtonText: '取消',
-          type: 'warning'
-        }).then(() => {
-          if(isEdit){
-            updateProduct(this.$route.query.id,this.productParam).then(response=>{
-              this.$message({
-                type: 'success',
-                message: '提交成功',
-                duration:1000
-              });
-              this.$router.back();
-            });
-          }else{
-            createProduct(this.productParam).then(response=>{
-              this.$message({
-                type: 'success',
-                message: '提交成功',
-                duration:1000
-              });
-              location.reload();
-            });
-          }
-        })
-      }
-    }
-  }
-</script>
-<style>
-  .form-container {
-    width: 960px;
-  }
-  .form-inner-container {
-    width: 800px;
-  }
-</style>
-
-

+ 0 - 200
src/views/pms/product/components/ProductInfoDetail.vue

@@ -1,200 +0,0 @@
-<template>
-  <div style="margin-top: 50px">
-    <el-form :model="value" :rules="rules" ref="productInfoForm" label-width="120px" class="form-inner-container" size="small">
-      <el-form-item label="商品分类:" prop="productCategoryId">
-        <el-cascader
-          v-model="selectProductCateValue"
-          :options="productCateOptions">
-        </el-cascader>
-      </el-form-item>
-      <el-form-item label="商品名称:" prop="name">
-        <el-input v-model="value.name"></el-input>
-      </el-form-item>
-      <el-form-item label="副标题:" prop="subTitle">
-        <el-input v-model="value.subTitle"></el-input>
-      </el-form-item>
-      <el-form-item label="商品品牌:" prop="brandId">
-        <el-select
-          v-model="value.brandId"
-          @change="handleBrandChange"
-          placeholder="请选择品牌">
-          <el-option
-            v-for="item in brandOptions"
-            :key="item.value"
-            :label="item.label"
-            :value="item.value">
-          </el-option>
-        </el-select>
-      </el-form-item>
-      <el-form-item label="商品介绍:">
-        <el-input
-          :autoSize="true"
-          v-model="value.description"
-          type="textarea"
-          placeholder="请输入内容"></el-input>
-      </el-form-item>
-      <el-form-item label="商品货号:">
-        <el-input v-model="value.productSn"></el-input>
-      </el-form-item>
-      <el-form-item label="商品售价:">
-        <el-input v-model="value.price"></el-input>
-      </el-form-item>
-      <el-form-item label="市场价:">
-        <el-input v-model="value.originalPrice"></el-input>
-      </el-form-item>
-      <el-form-item label="商品库存:">
-        <el-input v-model="value.stock"></el-input>
-      </el-form-item>
-      <el-form-item label="计量单位:">
-        <el-input v-model="value.unit"></el-input>
-      </el-form-item>
-      <el-form-item label="商品重量:">
-        <el-input v-model="value.weight" style="width: 300px"></el-input>
-        <span style="margin-left: 20px">克</span>
-      </el-form-item>
-      <el-form-item label="排序">
-        <el-input v-model="value.sort"></el-input>
-      </el-form-item>
-      <el-form-item style="text-align: center">
-        <el-button type="primary" size="medium" @click="handleNext('productInfoForm')">下一步,填写商品促销</el-button>
-      </el-form-item>
-    </el-form>
-  </div>
-</template>
-
-<script>
-  import {fetchListWithChildren} from '@/api/productCate'
-  import {fetchList as fetchBrandList} from '@/api/brand'
-  import {getProduct} from '@/api/product';
-
-  export default {
-    name: "ProductInfoDetail",
-    props: {
-      value: Object,
-      isEdit: {
-        type: Boolean,
-        default: false
-      }
-    },
-    data() {
-      return {
-        hasEditCreated:false,
-        //选中商品分类的值
-        selectProductCateValue: [],
-        productCateOptions: [],
-        brandOptions: [],
-        rules: {
-          name: [
-            {required: true, message: '请输入商品名称', trigger: 'blur'},
-            {min: 2, max: 140, message: '长度在 2 到 140 个字符', trigger: 'blur'}
-          ],
-          subTitle: [{required: true, message: '请输入商品副标题', trigger: 'blur'}],
-          productCategoryId: [{required: true, message: '请选择商品分类', trigger: 'blur'}],
-          brandId: [{required: true, message: '请选择商品品牌', trigger: 'blur'}],
-          description: [{required: true, message: '请输入商品介绍', trigger: 'blur'}],
-          requiredProp: [{required: true, message: '该项为必填项', trigger: 'blur'}]
-        }
-      };
-    },
-    created() {
-      this.getProductCateList();
-      this.getBrandList();
-    },
-    computed:{
-      //商品的编号
-      productId(){
-        return this.value.id;
-      }
-    },
-    watch: {
-      productId:function(newValue){
-        if(!this.isEdit)return;
-        if(this.hasEditCreated)return;
-        if(newValue===undefined||newValue==null||newValue===0)return;
-        this.handleEditCreated();
-      },
-      selectProductCateValue: function (newValue) {
-        if (newValue != null && newValue.length === 2) {
-          this.value.productCategoryId = newValue[1];
-          this.value.productCategoryName= this.getCateNameById(this.value.productCategoryId);
-        } else {
-          this.value.productCategoryId = null;
-          this.value.productCategoryName=null;
-        }
-      }
-    },
-    methods: {
-      //处理编辑逻辑
-      handleEditCreated(){
-        if(this.value.productCategoryId!=null){
-          this.selectProductCateValue.push(this.value.cateParentId);
-          this.selectProductCateValue.push(this.value.productCategoryId);
-        }
-        this.hasEditCreated=true;
-      },
-      getProductCateList() {
-        fetchListWithChildren().then(response => {
-          let list = response.data;
-          this.productCateOptions = [];
-          for (let i = 0; i < list.length; i++) {
-            let children = [];
-            if (list[i].children != null && list[i].children.length > 0) {
-              for (let j = 0; j < list[i].children.length; j++) {
-                children.push({label: list[i].children[j].name, value: list[i].children[j].id});
-              }
-            }
-            this.productCateOptions.push({label: list[i].name, value: list[i].id, children: children});
-          }
-        });
-      },
-      getBrandList() {
-        fetchBrandList({pageNum: 1, pageSize: 100}).then(response => {
-          this.brandOptions = [];
-          let brandList = response.data.list;
-          for (let i = 0; i < brandList.length; i++) {
-            this.brandOptions.push({label: brandList[i].name, value: brandList[i].id});
-          }
-        });
-      },
-      getCateNameById(id){
-        let name=null;
-        for(let i=0;i<this.productCateOptions.length;i++){
-          for(let j=0;j<this.productCateOptions[i].children.length;j++){
-            if(this.productCateOptions[i].children[j].value===id){
-              name=this.productCateOptions[i].children[j].label;
-              return name;
-            }
-          }
-        }
-        return name;
-      },
-      handleNext(formName){
-        this.$refs[formName].validate((valid) => {
-          if (valid) {
-            this.$emit('nextStep');
-          } else {
-            this.$message({
-              message: '验证失败',
-              type: 'error',
-              duration:1000
-            });
-            return false;
-          }
-        });
-      },
-      handleBrandChange(val) {
-        let brandName = '';
-        for (let i = 0; i < this.brandOptions.length; i++) {
-          if (this.brandOptions[i].value === val) {
-            brandName = this.brandOptions[i].label;
-            break;
-          }
-        }
-        this.value.brandName = brandName;
-      }
-    }
-  }
-</script>
-
-<style scoped>
-</style>

+ 0 - 145
src/views/pms/product/components/ProductRelationDetail.vue

@@ -1,145 +0,0 @@
-<template>
-  <div style="margin-top: 50px">
-    <el-form :model="value"
-             ref="productRelationForm"
-             label-width="120px"
-             class="form-inner-container"
-             size="small">
-      <el-form-item label="关联专题:">
-        <el-transfer
-          style="display: inline-block"
-          filterable
-          :filter-method="filterMethod"
-          filter-placeholder="请输入专题名称"
-          v-model="selectSubject"
-          :titles="subjectTitles"
-          :data="subjectList">
-        </el-transfer>
-      </el-form-item>
-      <el-form-item label="关联优选:">
-        <el-transfer
-          style="display: inline-block"
-          filterable
-          :filter-method="filterMethod"
-          filter-placeholder="请输入优选名称"
-          v-model="selectPrefrenceArea"
-          :titles="prefrenceAreaTitles"
-          :data="prefrenceAreaList">
-        </el-transfer>
-      </el-form-item>
-      <el-form-item style="text-align: center">
-        <el-button size="medium" @click="handlePrev">上一步,填写商品属性</el-button>
-        <el-button type="primary" size="medium" @click="handleFinishCommit">完成,提交商品</el-button>
-      </el-form-item>
-    </el-form>
-  </div>
-</template>
-
-<script>
-  import {fetchListAll as fetchSubjectList} from '@/api/subject'
-  import {fetchList as fetchPrefrenceAreaList} from '@/api/prefrenceArea'
-
-  export default {
-    name: "ProductRelationDetail",
-    props: {
-      value: Object,
-      isEdit: {
-        type: Boolean,
-        default: false
-      }
-    },
-    data() {
-      return {
-        //所有专题列表
-        subjectList: [],
-        //专题左右标题
-        subjectTitles: ['待选择', '已选择'],
-        //所有专题列表
-        prefrenceAreaList: [],
-        //专题左右标题
-        prefrenceAreaTitles: ['待选择', '已选择']
-      };
-    },
-    created() {
-      this.getSubjectList();
-      this.getPrefrenceAreaList();
-    },
-    computed:{
-      //选中的专题
-      selectSubject:{
-        get:function () {
-          let subjects =[];
-          if(this.value.subjectProductRelationList==null||this.value.subjectProductRelationList.length<=0){
-            return subjects;
-          }
-          for(let i=0;i<this.value.subjectProductRelationList.length;i++){
-            subjects.push(this.value.subjectProductRelationList[i].subjectId);
-          }
-          return subjects;
-        },
-        set:function (newValue) {
-          this.value.subjectProductRelationList=[];
-          for(let i=0;i<newValue.length;i++){
-            this.value.subjectProductRelationList.push({subjectId:newValue[i]});
-          }
-        }
-      },
-      //选中的优选
-      selectPrefrenceArea:{
-        get:function () {
-          let prefrenceAreas =[];
-          if(this.value.prefrenceAreaProductRelationList==null||this.value.prefrenceAreaProductRelationList.length<=0){
-            return prefrenceAreas;
-          }
-          for(let i=0;i<this.value.prefrenceAreaProductRelationList.length;i++){
-            prefrenceAreas.push(this.value.prefrenceAreaProductRelationList[i].prefrenceAreaId);
-          }
-          return prefrenceAreas;
-        },
-        set:function (newValue) {
-          this.value.prefrenceAreaProductRelationList=[];
-          for(let i=0;i<newValue.length;i++){
-            this.value.prefrenceAreaProductRelationList.push({prefrenceAreaId:newValue[i]});
-          }
-        }
-      }
-    },
-    methods: {
-      filterMethod(query, item) {
-        return item.label.indexOf(query) > -1;
-      },
-      getSubjectList() {
-        fetchSubjectList().then(response => {
-          let list = response.data;
-          for (let i = 0; i < list.length; i++) {
-            this.subjectList.push({
-              label: list[i].title,
-              key: list[i].id
-            });
-          }
-        });
-      },
-      getPrefrenceAreaList() {
-        fetchPrefrenceAreaList().then(response=>{
-          let list = response.data;
-          for (let i = 0; i < list.length; i++) {
-            this.prefrenceAreaList.push({
-              label: list[i].name,
-              key: list[i].id
-            });
-          }
-        });
-      },
-      handlePrev(){
-        this.$emit('prevStep')
-      },
-      handleFinishCommit(){
-        this.$emit('finishCommit',this.isEdit);
-      }
-    }
-  }
-</script>
-
-<style scoped>
-
-</style>

+ 0 - 306
src/views/pms/product/components/ProductSaleDetail.vue

@@ -1,306 +0,0 @@
-<template>
-  <div style="margin-top: 50px">
-    <el-form :model="value" ref="productSaleForm" label-width="120px" class="form-inner-container" size="small">
-      <el-form-item label="赠送积分:">
-        <el-input v-model="value.giftPoint"></el-input>
-      </el-form-item>
-      <el-form-item label="赠送成长值:">
-        <el-input v-model="value.giftGrowth"></el-input>
-      </el-form-item>
-      <el-form-item label="积分购买限制:">
-        <el-input v-model="value.usePointLimit"></el-input>
-      </el-form-item>
-      <el-form-item label="预告商品:">
-        <el-switch
-          v-model="value.previewStatus"
-          :active-value="1"
-          :inactive-value="0">
-        </el-switch>
-      </el-form-item>
-      <el-form-item label="商品上架:">
-        <el-switch
-          v-model="value.publishStatus"
-          :active-value="1"
-          :inactive-value="0">
-        </el-switch>
-      </el-form-item>
-      <el-form-item label="商品推荐:">
-        <span style="margin-right: 10px">新品</span>
-        <el-switch
-          v-model="value.newStatus"
-          :active-value="1"
-          :inactive-value="0">
-        </el-switch>
-        <span style="margin-left: 10px;margin-right: 10px">推荐</span>
-        <el-switch
-          v-model="value.recommandStatus"
-          :active-value="1"
-          :inactive-value="0">
-        </el-switch>
-      </el-form-item>
-      <el-form-item label="服务保证:">
-        <el-checkbox-group v-model="selectServiceList">
-          <el-checkbox :label="1">无忧退货</el-checkbox>
-          <el-checkbox :label="2">快速退款</el-checkbox>
-          <el-checkbox :label="3">免费包邮</el-checkbox>
-        </el-checkbox-group>
-      </el-form-item>
-      <el-form-item label="详细页标题:">
-        <el-input v-model="value.detailTitle"></el-input>
-      </el-form-item>
-      <el-form-item label="详细页描述:">
-        <el-input v-model="value.detailDesc"></el-input>
-      </el-form-item>
-      <el-form-item label="商品关键字:">
-        <el-input v-model="value.keywords"></el-input>
-      </el-form-item>
-      <el-form-item label="商品备注:">
-        <el-input v-model="value.note" type="textarea" :autoSize="true"></el-input>
-      </el-form-item>
-      <el-form-item label="选择优惠方式:">
-        <el-radio-group v-model="value.promotionType" size="small">
-          <el-radio-button :label="0">无优惠</el-radio-button>
-          <el-radio-button :label="1">特惠促销</el-radio-button>
-          <el-radio-button :label="2">会员价格</el-radio-button>
-          <el-radio-button :label="3">阶梯价格</el-radio-button>
-          <el-radio-button :label="4">满减价格</el-radio-button>
-        </el-radio-group>
-      </el-form-item>
-      <el-form-item v-show="value.promotionType===1">
-        <div>
-          开始时间:
-          <el-date-picker
-            v-model="value.promotionStartTime"
-            type="datetime"
-            :picker-options="pickerOptions1"
-            placeholder="选择开始时间">
-          </el-date-picker>
-        </div>
-        <div class="littleMargin">
-          结束时间:
-          <el-date-picker
-            v-model="value.promotionEndTime"
-            type="datetime"
-            :picker-options="pickerOptions1"
-            placeholder="选择结束时间">
-          </el-date-picker>
-        </div>
-        <div class="littleMargin">
-          促销价格:
-          <el-input style="width: 220px" v-model="value.promotionPrice" placeholder="输入促销价格"></el-input>
-        </div>
-
-      </el-form-item>
-      <el-form-item v-show="value.promotionType===2">
-        <div v-for="(item, index) in value.memberPriceList" :class="{littleMargin:index!==0}">
-          {{item.memberLevelName}}:
-          <el-input v-model="item.memberPrice" style="width: 200px"></el-input>
-        </div>
-      </el-form-item>
-      <el-form-item v-show="value.promotionType===3">
-        <el-table :data="value.productLadderList"
-                  style="width: 80%" border>
-          <el-table-column
-            label="数量"
-            align="center"
-            width="120">
-            <template slot-scope="scope">
-              <el-input v-model="scope.row.count"></el-input>
-            </template>
-          </el-table-column>
-          <el-table-column
-            label="折扣"
-            align="center"
-            width="120">
-            <template slot-scope="scope">
-              <el-input v-model="scope.row.discount"></el-input>
-            </template>
-          </el-table-column>
-          <el-table-column
-            align="center"
-            label="操作">
-            <template slot-scope="scope">
-              <el-button type="text" @click="handleRemoveProductLadder(scope.$index, scope.row)">删除</el-button>
-              <el-button type="text" @click="handleAddProductLadder(scope.$index, scope.row)">添加</el-button>
-            </template>
-          </el-table-column>
-        </el-table>
-      </el-form-item>
-      <el-form-item v-show="value.promotionType===4">
-        <el-table :data="value.productFullReductionList"
-                  style="width: 80%" border>
-          <el-table-column
-            label="满"
-            align="center"
-            width="120">
-            <template slot-scope="scope">
-              <el-input v-model="scope.row.fullPrice"></el-input>
-            </template>
-          </el-table-column>
-          <el-table-column
-            label="立减"
-            align="center"
-            width="120">
-            <template slot-scope="scope">
-              <el-input v-model="scope.row.reducePrice"></el-input>
-            </template>
-          </el-table-column>
-          <el-table-column
-            align="center"
-            label="操作">
-            <template slot-scope="scope">
-              <el-button type="text" @click="handleRemoveFullReduction(scope.$index, scope.row)">删除</el-button>
-              <el-button type="text" @click="handleAddFullReduction(scope.$index, scope.row)">添加</el-button>
-            </template>
-          </el-table-column>
-        </el-table>
-      </el-form-item>
-      <el-form-item style="text-align: center">
-        <el-button size="medium" @click="handlePrev">上一步,填写商品信息</el-button>
-        <el-button type="primary" size="medium" @click="handleNext">下一步,填写商品属性</el-button>
-      </el-form-item>
-    </el-form>
-  </div>
-</template>
-
-<script>
-  import {fetchList as fetchMemberLevelList} from '@/api/memberLevel'
-
-  export default {
-    name: "ProductSaleDetail",
-    props: {
-      value: Object,
-      isEdit: {
-        type: Boolean,
-        default: false
-      }
-    },
-    data() {
-      return {
-        //日期选择器配置
-        pickerOptions1: {
-          disabledDate(time) {
-            return time.getTime() < Date.now();
-          }
-        }
-      }
-    },
-    created() {
-      if (this.isEdit) {
-        // this.handleEditCreated();
-      } else {
-        fetchMemberLevelList({defaultStatus: 0}).then(response => {
-          let memberPriceList = [];
-          for (let i = 0; i < response.data.length; i++) {
-            let item = response.data[i];
-            memberPriceList.push({memberLevelId: item.id, memberLevelName: item.name})
-          }
-          this.value.memberPriceList = memberPriceList;
-        });
-      }
-    },
-    computed: {
-      //选中的服务保证
-      selectServiceList: {
-        get() {
-          let list = [];
-          if (this.value.serviceIds === undefined || this.value.serviceIds == null || this.value.serviceIds === '') return list;
-          let ids = this.value.serviceIds.split(',');
-          for (let i = 0; i < ids.length; i++) {
-            list.push(Number(ids[i]));
-          }
-          return list;
-        },
-        set(newValue) {
-          let serviceIds = '';
-          if (newValue != null && newValue.length > 0) {
-            for (let i = 0; i < newValue.length; i++) {
-              serviceIds += newValue[i] + ',';
-            }
-            if (serviceIds.endsWith(',')) {
-              serviceIds = serviceIds.substr(0, serviceIds.length - 1)
-            }
-            this.value.serviceIds = serviceIds;
-          } else {
-            this.value.serviceIds = null;
-          }
-        }
-      }
-    },
-    methods: {
-      handleEditCreated() {
-        let ids = this.value.serviceIds.split(',');
-        console.log('handleEditCreated', ids);
-        for (let i = 0; i < ids.length; i++) {
-          this.selectServiceList.push(Number(ids[i]));
-        }
-      },
-      handleRemoveProductLadder(index, row) {
-        let productLadderList = this.value.productLadderList;
-        if (productLadderList.length === 1) {
-          productLadderList.pop();
-          productLadderList.push({
-            count: 0,
-            discount: 0,
-            price: 0
-          })
-        } else {
-          productLadderList.splice(index, 1);
-        }
-      },
-      handleAddProductLadder(index, row) {
-        let productLadderList = this.value.productLadderList;
-        if (productLadderList.length < 3) {
-          productLadderList.push({
-            count: 0,
-            discount: 0,
-            price: 0
-          })
-        } else {
-          this.$message({
-            message: '最多只能添加三条',
-            type: 'warning'
-          });
-        }
-      },
-      handleRemoveFullReduction(index, row) {
-        let fullReductionList = this.value.productFullReductionList;
-        if (fullReductionList.length === 1) {
-          fullReductionList.pop();
-          fullReductionList.push({
-            fullPrice: 0,
-            reducePrice: 0
-          });
-        } else {
-          fullReductionList.splice(index, 1);
-        }
-      },
-      handleAddFullReduction(index, row) {
-        let fullReductionList = this.value.productFullReductionList;
-        if (fullReductionList.length < 3) {
-          fullReductionList.push({
-            fullPrice: 0,
-            reducePrice: 0
-          });
-        } else {
-          this.$message({
-            message: '最多只能添加三条',
-            type: 'warning'
-          });
-        }
-      },
-      handlePrev() {
-        this.$emit('prevStep')
-      },
-      handleNext() {
-        this.$emit('nextStep')
-      }
-    }
-  }
-</script>
-
-<style scoped>
-  .littleMargin {
-    margin-top: 10px;
-  }
-</style>

+ 0 - 649
src/views/pms/product/index.vue

@@ -1,649 +0,0 @@
-<template> 
-  <div class="app-container">
-    <el-card class="filter-container" shadow="never">
-      <div>
-        <i class="el-icon-search"></i>
-        <span>筛选搜索</span>
-        <el-button
-          style="float: right"
-          @click="handleSearchList()"
-          type="primary"
-          size="small">
-          查询结果
-        </el-button>
-        <el-button
-          style="float: right;margin-right: 15px"
-          @click="handleResetSearch()"
-          size="small">
-          重置
-        </el-button>
-      </div>
-      <div style="margin-top: 15px">
-        <el-form :inline="true" :model="listQuery" size="small" label-width="140px">
-          <el-form-item label="输入搜索:">
-            <el-input style="width: 203px" v-model="listQuery.keyword" placeholder="商品名称"></el-input>
-          </el-form-item>
-          <el-form-item label="商品货号:">
-            <el-input style="width: 203px" v-model="listQuery.productSn" placeholder="商品货号"></el-input>
-          </el-form-item>
-          <el-form-item label="商品分类:">
-            <el-cascader
-              clearable
-              v-model="selectProductCateValue"
-              :options="productCateOptions">
-            </el-cascader>
-          </el-form-item>
-          <el-form-item label="商品品牌:">
-            <el-select v-model="listQuery.brandId" placeholder="请选择品牌" clearable>
-              <el-option
-                v-for="item in brandOptions"
-                :key="item.value"
-                :label="item.label"
-                :value="item.value">
-              </el-option>
-            </el-select>
-          </el-form-item>
-          <el-form-item label="上架状态:">
-            <el-select v-model="listQuery.publishStatus" placeholder="全部" clearable>
-              <el-option
-                v-for="item in publishStatusOptions"
-                :key="item.value"
-                :label="item.label"
-                :value="item.value">
-              </el-option>
-            </el-select>
-          </el-form-item>
-          <el-form-item label="审核状态:">
-            <el-select v-model="listQuery.verifyStatus" placeholder="全部" clearable>
-              <el-option
-                v-for="item in verifyStatusOptions"
-                :key="item.value"
-                :label="item.label"
-                :value="item.value">
-              </el-option>
-            </el-select>
-          </el-form-item>
-        </el-form>
-      </div>
-    </el-card>
-    <el-card class="operate-container" shadow="never">
-      <i class="el-icon-tickets"></i>
-      <span>数据列表</span>
-      <el-button
-        class="btn-add"
-        @click="handleAddProduct()"
-        size="mini">
-        添加
-      </el-button>
-    </el-card>
-    <div class="table-container">
-      <el-table ref="productTable"
-                :data="list"
-                style="width: 100%"
-                @selection-change="handleSelectionChange"
-                v-loading="listLoading"
-                border>
-        <el-table-column type="selection" width="60" align="center"></el-table-column>
-        <el-table-column label="编号" width="100" align="center">
-          <template slot-scope="scope">{{scope.row.id}}</template>
-        </el-table-column>
-        <el-table-column label="商品图片" width="120" align="center">
-          <template slot-scope="scope"><img style="height: 80px" :src="scope.row.pic"></template>
-        </el-table-column>
-        <el-table-column label="商品名称" align="center">
-          <template slot-scope="scope">
-            <p>{{scope.row.name}}</p>
-            <p>品牌:{{scope.row.brandName}}</p>
-          </template>
-        </el-table-column>
-        <el-table-column label="价格/货号" width="120" align="center">
-          <template slot-scope="scope">
-            <p>价格:¥{{scope.row.price}}</p>
-            <p>货号:{{scope.row.productSn}}</p>
-          </template>
-        </el-table-column>
-        <el-table-column label="标签" width="140" align="center">
-          <template slot-scope="scope">
-            <p>上架:
-              <el-switch
-                @change="handlePublishStatusChange(scope.$index, scope.row)"
-                :active-value="1"
-                :inactive-value="0"
-                v-model="scope.row.publishStatus">
-              </el-switch>
-            </p>
-            <p>新品:
-              <el-switch
-                @change="handleNewStatusChange(scope.$index, scope.row)"
-                :active-value="1"
-                :inactive-value="0"
-                v-model="scope.row.newStatus">
-              </el-switch>
-            </p>
-            <p>推荐:
-              <el-switch
-                @change="handleRecommendStatusChange(scope.$index, scope.row)"
-                :active-value="1"
-                :inactive-value="0"
-                v-model="scope.row.recommandStatus">
-              </el-switch>
-            </p>
-          </template>
-        </el-table-column>
-        <el-table-column label="排序" width="100" align="center">
-          <template slot-scope="scope">{{scope.row.sort}}</template>
-        </el-table-column>
-        <el-table-column label="SKU库存" width="100" align="center">
-          <template slot-scope="scope">
-            <el-button type="primary" icon="el-icon-edit" @click="handleShowSkuEditDialog(scope.$index, scope.row)" circle></el-button>
-          </template>
-        </el-table-column>
-        <el-table-column label="销量" width="100" align="center">
-          <template slot-scope="scope">{{scope.row.sale}}</template>
-        </el-table-column>
-        <el-table-column label="审核状态" width="100" align="center">
-          <template slot-scope="scope">
-            <p>{{scope.row.verifyStatus | verifyStatusFilter}}</p>
-            <p>
-              <el-button
-                type="text"
-                @click="handleShowVerifyDetail(scope.$index, scope.row)">审核详情
-              </el-button>
-            </p>
-          </template>
-        </el-table-column>
-        <el-table-column label="操作" width="160" align="center">
-          <template slot-scope="scope">
-            <p>
-              <el-button
-                size="mini"
-                @click="handleShowProduct(scope.$index, scope.row)">查看
-              </el-button>
-              <el-button
-                size="mini"
-                @click="handleUpdateProduct(scope.$index, scope.row)">编辑
-              </el-button>
-            </p>
-            <p>
-              <el-button
-                size="mini"
-                @click="handleShowLog(scope.$index, scope.row)">日志
-              </el-button>
-              <el-button
-                size="mini"
-                type="danger"
-                @click="handleDelete(scope.$index, scope.row)">删除
-              </el-button>
-            </p>
-          </template>
-        </el-table-column>
-      </el-table>
-    </div>
-    <div class="batch-operate-container">
-      <el-select
-        size="small"
-        v-model="operateType" placeholder="批量操作">
-        <el-option
-          v-for="item in operates"
-          :key="item.value"
-          :label="item.label"
-          :value="item.value">
-        </el-option>
-      </el-select>
-      <el-button
-        style="margin-left: 20px"
-        class="search-button"
-        @click="handleBatchOperate()"
-        type="primary"
-        size="small">
-        确定
-      </el-button>
-    </div>
-    <div class="pagination-container">
-      <el-pagination
-        background
-        @size-change="handleSizeChange"
-        @current-change="handleCurrentChange"
-        layout="total, sizes,prev, pager, next,jumper"
-        :page-size="listQuery.pageSize"
-        :page-sizes="[5,10,15]"
-        :current-page.sync="listQuery.pageNum"
-        :total="total">
-      </el-pagination>
-    </div>
-    <el-dialog
-      title="编辑货品信息"
-      :visible.sync="editSkuInfo.dialogVisible"
-      width="40%">
-      <span>商品货号:</span>
-      <span>{{editSkuInfo.productSn}}</span>
-      <el-input placeholder="按sku编号搜索" v-model="editSkuInfo.keyword" size="small" style="width: 50%;margin-left: 20px">
-        <el-button slot="append" icon="el-icon-search" @click="handleSearchEditSku"></el-button>
-      </el-input>
-      <el-table style="width: 100%;margin-top: 20px"
-                :data="editSkuInfo.stockList"
-                border>
-        <el-table-column
-          label="SKU编号"
-          align="center">
-          <template slot-scope="scope">
-            <el-input v-model="scope.row.skuCode"></el-input>
-          </template>
-        </el-table-column>
-        <el-table-column
-          v-for="(item,index) in editSkuInfo.productAttr"
-          :label="item.name"
-          :key="item.id"
-          align="center">
-          <template slot-scope="scope">
-            {{getProductSkuSp(scope.row,index)}}
-          </template>
-        </el-table-column>
-        <el-table-column
-          label="销售价格"
-          width="80"
-          align="center">
-          <template slot-scope="scope">
-            <el-input v-model="scope.row.price"></el-input>
-          </template>
-        </el-table-column>
-        <el-table-column
-          label="商品库存"
-          width="80"
-          align="center">
-          <template slot-scope="scope">
-            <el-input v-model="scope.row.stock"></el-input>
-          </template>
-        </el-table-column>
-        <el-table-column
-          label="库存预警值"
-          width="100"
-          align="center">
-          <template slot-scope="scope">
-            <el-input v-model="scope.row.lowStock"></el-input>
-          </template>
-        </el-table-column>
-      </el-table>
-      <span slot="footer" class="dialog-footer">
-        <el-button @click="editSkuInfo.dialogVisible = false">取 消</el-button>
-        <el-button type="primary" @click="handleEditSkuConfirm">确 定</el-button>
-      </span>
-    </el-dialog>
-  </div>
-</template>
-<script>
-  import {
-    fetchList,
-    updateDeleteStatus,
-    updateNewStatus,
-    updateRecommendStatus,
-    updatePublishStatus
-  } from '@/api/product'
-  import {fetchList as fetchSkuStockList,update as updateSkuStockList} from '@/api/skuStock'
-  import {fetchList as fetchProductAttrList} from '@/api/productAttr'
-  import {fetchList as fetchBrandList} from '@/api/brand'
-  import {fetchListWithChildren} from '@/api/productCate'
-
-  const defaultListQuery = {
-    keyword: null,
-    pageNum: 1,
-    pageSize: 5,
-    publishStatus: null,
-    verifyStatus: null,
-    productSn: null,
-    productCategoryId: null,
-    brandId: null
-  };
-  export default {
-    name: "productList",
-    data() {
-      return {
-        editSkuInfo:{
-          dialogVisible:false,
-          productId:null,
-          productSn:'',
-          productAttributeCategoryId:null,
-          stockList:[],
-          productAttr:[],
-          keyword:null
-        },
-        operates: [
-          {
-            label: "商品上架",
-            value: "publishOn"
-          },
-          {
-            label: "商品下架",
-            value: "publishOff"
-          },
-          {
-            label: "设为推荐",
-            value: "recommendOn"
-          },
-          {
-            label: "取消推荐",
-            value: "recommendOff"
-          },
-          {
-            label: "设为新品",
-            value: "newOn"
-          },
-          {
-            label: "取消新品",
-            value: "newOff"
-          },
-          {
-            label: "转移到分类",
-            value: "transferCategory"
-          },
-          {
-            label: "移入回收站",
-            value: "recycle"
-          }
-        ],
-        operateType: null,
-        listQuery: Object.assign({}, defaultListQuery),
-        list: null,
-        total: null,
-        listLoading: true,
-        selectProductCateValue: null,
-        multipleSelection: [],
-        productCateOptions: [],
-        brandOptions: [],
-        publishStatusOptions: [{
-          value: 1,
-          label: '上架'
-        }, {
-          value: 0,
-          label: '下架'
-        }],
-        verifyStatusOptions: [{
-          value: 1,
-          label: '审核通过'
-        }, {
-          value: 0,
-          label: '未审核'
-        }]
-      }
-    },
-    created() {
-      this.getList();
-      this.getBrandList();
-      this.getProductCateList();
-    },
-    watch: {
-      selectProductCateValue: function (newValue) {
-        if (newValue != null && newValue.length == 2) {
-          this.listQuery.productCategoryId = newValue[1];
-        } else {
-          this.listQuery.productCategoryId = null;
-        }
-
-      }
-    },
-    filters: {
-      verifyStatusFilter(value) {
-        if (value === 1) {
-          return '审核通过';
-        } else {
-          return '未审核';
-        }
-      }
-    },
-    methods: {
-      getProductSkuSp(row, index) {
-        let spData = JSON.parse(row.spData);
-        if(spData!=null&&index<spData.length){
-          return spData[index].value;
-        }else{
-          return null;
-        }
-      },
-      getList() {
-        this.listLoading = true;
-        fetchList(this.listQuery).then(response => {
-          this.listLoading = false;
-          this.list = response.data.list;
-          this.total = response.data.total;
-        });
-      },
-      getBrandList() {
-        fetchBrandList({pageNum: 1, pageSize: 100}).then(response => {
-          this.brandOptions = [];
-          let brandList = response.data.list;
-          for (let i = 0; i < brandList.length; i++) {
-            this.brandOptions.push({label: brandList[i].name, value: brandList[i].id});
-          }
-        });
-      },
-      getProductCateList() {
-        fetchListWithChildren().then(response => {
-          let list = response.data;
-          this.productCateOptions = [];
-          for (let i = 0; i < list.length; i++) {
-            let children = [];
-            if (list[i].children != null && list[i].children.length > 0) {
-              for (let j = 0; j < list[i].children.length; j++) {
-                children.push({label: list[i].children[j].name, value: list[i].children[j].id});
-              }
-            }
-            this.productCateOptions.push({label: list[i].name, value: list[i].id, children: children});
-          }
-        });
-      },
-      handleShowSkuEditDialog(index,row){
-        this.editSkuInfo.dialogVisible=true;
-        this.editSkuInfo.productId=row.id;
-        this.editSkuInfo.productSn=row.productSn;
-        this.editSkuInfo.productAttributeCategoryId = row.productAttributeCategoryId;
-        this.editSkuInfo.keyword=null;
-        fetchSkuStockList(row.id,{keyword:this.editSkuInfo.keyword}).then(response=>{
-          this.editSkuInfo.stockList=response.data;
-        });
-        if(row.productAttributeCategoryId!=null){
-          fetchProductAttrList(row.productAttributeCategoryId,{type:0}).then(response=>{
-            this.editSkuInfo.productAttr=response.data.list;
-          });
-        }
-      },
-      handleSearchEditSku(){
-        fetchSkuStockList(this.editSkuInfo.productId,{keyword:this.editSkuInfo.keyword}).then(response=>{
-          this.editSkuInfo.stockList=response.data;
-        });
-      },
-      handleEditSkuConfirm(){
-        if(this.editSkuInfo.stockList==null||this.editSkuInfo.stockList.length<=0){
-          this.$message({
-            message: '暂无sku信息',
-            type: 'warning',
-            duration: 1000
-          });
-          return
-        }
-        this.$confirm('是否要进行修改', '提示', {
-          confirmButtonText: '确定',
-          cancelButtonText: '取消',
-          type: 'warning'
-        }).then(()=>{
-          updateSkuStockList(this.editSkuInfo.productId,this.editSkuInfo.stockList).then(response=>{
-            this.$message({
-              message: '修改成功',
-              type: 'success',
-              duration: 1000
-            });
-            this.editSkuInfo.dialogVisible=false;
-          });
-        });
-      },
-      handleSearchList() {
-        this.listQuery.pageNum = 1;
-        this.getList();
-      },
-      handleAddProduct() {
-        this.$router.push({path:'/pms/addProduct'});
-      },
-      handleBatchOperate() {
-        if(this.operateType==null){
-          this.$message({
-            message: '请选择操作类型',
-            type: 'warning',
-            duration: 1000
-          });
-          return;
-        }
-        if(this.multipleSelection==null||this.multipleSelection.length<1){
-          this.$message({
-            message: '请选择要操作的商品',
-            type: 'warning',
-            duration: 1000
-          });
-          return;
-        }
-        this.$confirm('是否要进行该批量操作?', '提示', {
-          confirmButtonText: '确定',
-          cancelButtonText: '取消',
-          type: 'warning'
-        }).then(() => {
-          let ids=[];
-          for(let i=0;i<this.multipleSelection.length;i++){
-            ids.push(this.multipleSelection[i].id);
-          }
-          switch (this.operateType) {
-            case this.operates[0].value:
-              this.updatePublishStatus(1,ids);
-              break;
-            case this.operates[1].value:
-              this.updatePublishStatus(0,ids);
-              break;
-            case this.operates[2].value:
-              this.updateRecommendStatus(1,ids);
-              break;
-            case this.operates[3].value:
-              this.updateRecommendStatus(0,ids);
-              break;
-            case this.operates[4].value:
-              this.updateNewStatus(1,ids);
-              break;
-            case this.operates[5].value:
-              this.updateNewStatus(0,ids);
-              break;
-            case this.operates[6].value:
-              break;
-            case this.operates[7].value:
-              this.updateDeleteStatus(1,ids);
-              break;
-            default:
-              break;
-          }
-          this.getList();
-        });
-      },
-      handleSizeChange(val) {
-        this.listQuery.pageNum = 1;
-        this.listQuery.pageSize = val;
-        this.getList();
-      },
-      handleCurrentChange(val) {
-        this.listQuery.pageNum = val;
-        this.getList();
-      },
-      handleSelectionChange(val) {
-        this.multipleSelection = val;
-      },
-      handlePublishStatusChange(index, row) {
-        let ids = [];
-        ids.push(row.id);
-        this.updatePublishStatus(row.publishStatus, ids);
-      },
-      handleNewStatusChange(index, row) {
-        let ids = [];
-        ids.push(row.id);
-        this.updateNewStatus(row.newStatus, ids);
-      },
-      handleRecommendStatusChange(index, row) {
-        let ids = [];
-        ids.push(row.id);
-        this.updateRecommendStatus(row.recommandStatus, ids);
-      },
-      handleResetSearch() {
-        this.selectProductCateValue = [];
-        this.listQuery = Object.assign({}, defaultListQuery);
-      },
-      handleDelete(index, row){
-        this.$confirm('是否要进行删除操作?', '提示', {
-          confirmButtonText: '确定',
-          cancelButtonText: '取消',
-          type: 'warning'
-        }).then(() => {
-          let ids = [];
-          ids.push(row.id);
-          this.updateDeleteStatus(1,ids);
-        });
-      },
-      handleUpdateProduct(index,row){
-        this.$router.push({path:'/pms/updateProduct',query:{id:row.id}});
-      },
-      handleShowProduct(index,row){
-        console.log("handleShowProduct",row);
-      },
-      handleShowVerifyDetail(index,row){
-        console.log("handleShowVerifyDetail",row);
-      },
-      handleShowLog(index,row){
-        console.log("handleShowLog",row);
-      },
-      updatePublishStatus(publishStatus, ids) {
-        let params = new URLSearchParams();
-        params.append('ids', ids);
-        params.append('publishStatus', publishStatus);
-        updatePublishStatus(params).then(response => {
-          this.$message({
-            message: '修改成功',
-            type: 'success',
-            duration: 1000
-          });
-        });
-      },
-      updateNewStatus(newStatus, ids) {
-        let params = new URLSearchParams();
-        params.append('ids', ids);
-        params.append('newStatus', newStatus);
-        updateNewStatus(params).then(response => {
-          this.$message({
-            message: '修改成功',
-            type: 'success',
-            duration: 1000
-          });
-        });
-      },
-      updateRecommendStatus(recommendStatus, ids) {
-        let params = new URLSearchParams();
-        params.append('ids', ids);
-        params.append('recommendStatus', recommendStatus);
-        updateRecommendStatus(params).then(response => {
-          this.$message({
-            message: '修改成功',
-            type: 'success',
-            duration: 1000
-          });
-        });
-      },
-      updateDeleteStatus(deleteStatus, ids) {
-        let params = new URLSearchParams();
-        params.append('ids', ids);
-        params.append('deleteStatus', deleteStatus);
-        updateDeleteStatus(params).then(response => {
-          this.$message({
-            message: '删除成功',
-            type: 'success',
-            duration: 1000
-          });
-        });
-        this.getList();
-      }
-    }
-  }
-</script>
-<style></style>
-
-

+ 0 - 12
src/views/pms/product/update.vue

@@ -1,12 +0,0 @@
-<template> 
-  <product-detail :is-edit='true'></product-detail>
-</template>
-<script>
-  import ProductDetail from './components/ProductDetail'
-  export default {
-    name: 'updateProduct',
-    components: { ProductDetail }
-  }
-</script>
-<style>
-</style>

+ 0 - 15
src/views/pms/productAttr/addProductAttr.vue

@@ -1,15 +0,0 @@
-<template>
-  <product-attr-detail :is-edit='false'></product-attr-detail>
-</template>
-
-<script>
-  import ProductAttrDetail from './components/ProductAttrDetail'
-  export default {
-    name: 'addProductAttr',
-    components: { ProductAttrDetail }
-  }
-</script>
-
-<style scoped>
-
-</style>

+ 0 - 185
src/views/pms/productAttr/components/ProductAttrDetail.vue

@@ -1,185 +0,0 @@
-<template>
-  <el-card class="form-container" shadow="never">
-    <el-form :model="productAttr" :rules="rules" ref="productAttrFrom" label-width="150px">
-      <el-form-item label="属性名称:" prop="name">
-        <el-input v-model="productAttr.name"></el-input>
-      </el-form-item>
-      <el-form-item label="商品类型:">
-        <el-select v-model="productAttr.productAttributeCategoryId" placeholder="请选择">
-          <el-option
-            v-for="item in productAttrCateList"
-            :key="item.id"
-            :label="item.name"
-            :value="item.id">
-          </el-option>
-        </el-select>
-      </el-form-item>
-      <el-form-item label="分类筛选样式:">
-        <el-radio-group v-model="productAttr.filterType">
-          <el-radio :label="0">普通</el-radio>
-          <el-radio :label="1">颜色</el-radio>
-        </el-radio-group>
-      </el-form-item>
-      <el-form-item label="能否进行检索:">
-        <el-radio-group v-model="productAttr.searchType">
-          <el-radio :label="0">不需要检索</el-radio>
-          <el-radio :label="1">关键字检索</el-radio>
-          <el-radio :label="2">范围检索</el-radio>
-        </el-radio-group>
-      </el-form-item>
-      <el-form-item label="商品属性关联:">
-        <el-radio-group v-model="productAttr.relatedStatus">
-          <el-radio :label="1">是</el-radio>
-          <el-radio :label="0">否</el-radio>
-        </el-radio-group>
-      </el-form-item>
-      <el-form-item label="属性是否可选:">
-        <el-radio-group v-model="productAttr.selectType">
-          <el-radio :label="0">唯一</el-radio>
-          <el-radio :label="1">单选</el-radio>
-          <el-radio :label="2">复选</el-radio>
-        </el-radio-group>
-      </el-form-item>
-      <el-form-item label="属性值的录入方式:">
-        <el-radio-group v-model="productAttr.inputType">
-          <el-radio :label="0">手工录入</el-radio>
-          <el-radio :label="1">从下面列表中选择</el-radio>
-        </el-radio-group>
-      </el-form-item>
-      <el-form-item label="属性值可选值列表:">
-        <el-input :autosize="true" type="textarea" v-model="inputListFormat"></el-input>
-      </el-form-item>
-      <el-form-item label="是否支持手动新增:">
-        <el-radio-group v-model="productAttr.handAddStatus">
-          <el-radio :label="1">是</el-radio>
-          <el-radio :label="0">否</el-radio>
-        </el-radio-group>
-      </el-form-item>
-      <el-form-item label="排序属性:">
-        <el-input v-model="productAttr.sort"></el-input>
-      </el-form-item>
-      <el-form-item>
-        <el-button type="primary" @click="onSubmit('productAttrFrom')">提交</el-button>
-        <el-button  v-if="!isEdit" @click="resetForm('productAttrFrom')">重置</el-button>
-      </el-form-item>
-    </el-form>
-  </el-card>
-</template>
-
-<script>
-  import {fetchList} from '@/api/productAttrCate'
-  import {createProductAttr,getProductAttr,updateProductAttr} from '@/api/productAttr'
-
-  const defaultProductAttr = {
-    filterType: 0,
-    handAddStatus: 0,
-    inputList: '',
-    inputType: 0,
-    name: '',
-    productAttributeCategoryId: 0,
-    relatedStatus: 0,
-    searchType: 0,
-    selectType: 0,
-    sort: 0,
-    type: 0
-  };
-  export default {
-    name: "ProductAttrDetail",
-    props: {
-      isEdit: {
-        type: Boolean,
-        default: false
-      }
-    },
-    data() {
-      return {
-        productAttr: Object.assign({}, defaultProductAttr),
-        rules: {
-          name: [
-            {required: true, message: '请输入属性名称', trigger: 'blur'},
-            {min: 2, max: 140, message: '长度在 2 到 140 个字符', trigger: 'blur'}
-          ]
-        },
-        productAttrCateList: null,
-        inputListFormat:null
-      }
-    },
-    created() {
-      if(this.isEdit){
-        getProductAttr(this.$route.query.id).then(response => {
-          this.productAttr = response.data;
-          this.inputListFormat = this.productAttr.inputList.replace(/,/g,'\n');
-        });
-      }else{
-        this.resetProductAttr();
-      }
-      this.getCateList();
-    },
-    watch:{
-      inputListFormat: function (newValue, oldValue) {
-        newValue = newValue.replace(/\n/g,',');
-        this.productAttr.inputList = newValue;
-      }
-    },
-    methods: {
-      getCateList() {
-        let listQuery = {pageNum: 1, pageSize: 100};
-        fetchList(listQuery).then(response => {
-          this.productAttrCateList = response.data.list;
-        });
-      },
-      resetProductAttr() {
-        this.productAttr = Object.assign({}, defaultProductAttr);
-        this.productAttr.productAttributeCategoryId = Number(this.$route.query.cid);
-        this.productAttr.type = Number(this.$route.query.type);
-      },
-      onSubmit(formName) {
-        this.$refs[formName].validate((valid) => {
-          if (valid) {
-            this.$confirm('是否提交数据', '提示', {
-              confirmButtonText: '确定',
-              cancelButtonText: '取消',
-              type: 'warning'
-            }).then(() => {
-              if(this.isEdit){
-                updateProductAttr(this.$route.query.id,this.productAttr).then(response=>{
-                  this.$message({
-                    message: '修改成功',
-                    type: 'success',
-                    duration: 1000
-                  });
-                  this.$router.back();
-                });
-              }else{
-                createProductAttr(this.productAttr).then(response=>{
-                  this.$message({
-                    message: '提交成功',
-                    type: 'success',
-                    duration: 1000
-                  });
-                  this.resetForm('productAttrFrom');
-                });
-              }
-            });
-
-          } else {
-            this.$message({
-              message: '验证失败',
-              type: 'error',
-              duration: 1000
-            });
-            return false;
-          }
-        });
-      },
-      resetForm(formName) {
-        this.$refs[formName].resetFields();
-        this.resetProductAttr();
-      }
-    },
-  }
-</script>
-
-<style scoped>
-
-</style>

+ 0 - 210
src/views/pms/productAttr/index.vue

@@ -1,210 +0,0 @@
-<template> 
-  <div class="app-container">
-    <el-card class="operate-container" shadow="never">
-      <i class="el-icon-tickets" style="margin-top: 5px"></i>
-      <span style="margin-top: 5px">数据列表</span>
-      <el-button
-        class="btn-add"
-        @click="addProductAttrCate()"
-        size="mini">
-        添加
-      </el-button>
-    </el-card>
-    <div class="table-container">
-      <el-table ref="productAttrCateTable"
-                style="width: 100%"
-                :data="list"
-                v-loading="listLoading"
-                border>
-        <el-table-column label="编号" width="100" align="center">
-          <template slot-scope="scope">{{scope.row.id}}</template>
-        </el-table-column>
-        <el-table-column label="类型名称" align="center">
-          <template slot-scope="scope">{{scope.row.name}}</template>
-        </el-table-column>
-        <el-table-column label="属性数量" width="200" align="center">
-          <template slot-scope="scope">{{scope.row.attributeCount==null?0:scope.row.attributeCount}}</template>
-        </el-table-column>
-        <el-table-column label="参数数量" width="200" align="center">
-          <template slot-scope="scope">{{scope.row.paramCount==null?0:scope.row.paramCount}}</template>
-        </el-table-column>
-        <el-table-column label="设置" width="200" align="center">
-          <template slot-scope="scope">
-            <el-button
-              size="mini"
-              @click="getAttrList(scope.$index, scope.row)">属性列表
-            </el-button>
-            <el-button
-              size="mini"
-              @click="getParamList(scope.$index, scope.row)">参数列表
-            </el-button>
-          </template>
-        </el-table-column>
-        <el-table-column label="操作" width="200" align="center">
-          <template slot-scope="scope">
-            <el-button
-              size="mini"
-              @click="handleUpdate(scope.$index, scope.row)">编辑
-            </el-button>
-            <el-button
-              size="mini"
-              type="danger"
-              @click="handleDelete(scope.$index, scope.row)">删除
-            </el-button>
-          </template>
-        </el-table-column>
-      </el-table>
-    </div>
-    <div class="pagination-container">
-      <el-pagination
-        background
-        @size-change="handleSizeChange"
-        @current-change="handleCurrentChange"
-        layout="total, sizes,prev, pager, next,jumper"
-        :page-size="listQuery.pageSize"
-        :page-sizes="[5,10,15]"
-        :current-page.sync="listQuery.pageNum"
-        :total="total">
-      </el-pagination>
-    </div>
-    <el-dialog
-      :title="dialogTitle"
-      :visible.sync="dialogVisible"
-      :before-close="handleClose()"
-      width="30%">
-      <el-form ref="productAttrCatForm":model="productAttrCate" :rules="rules" label-width="120px">
-        <el-form-item label="类型名称" prop="name">
-          <el-input v-model="productAttrCate.name" auto-complete="off"></el-input>
-        </el-form-item>
-      </el-form>
-      <span slot="footer" class="dialog-footer">
-        <el-button @click="dialogVisible = false">取 消</el-button>
-        <el-button type="primary" @click="handleConfirm('productAttrCatForm')">确 定</el-button>
-      </span>
-    </el-dialog>
-  </div>
-</template>
-<script>
-  import {fetchList,createProductAttrCate,deleteProductAttrCate,updateProductAttrCate} from '@/api/productAttrCate'
-
-  export default {
-    name: 'productAttrCateList',
-    data() {
-      return {
-        list: null,
-        total: null,
-        listLoading: true,
-        listQuery: {
-          pageNum: 1,
-          pageSize: 5
-        },
-        dialogVisible: false,
-        dialogTitle:'',
-        productAttrCate:{
-          name:'',
-          id:null
-        },
-        rules: {
-          name: [
-            { required: true, message: '请输入类型名称', trigger: 'blur' }
-          ]
-        }
-      }
-    },
-    created() {
-      this.getList();
-    },
-    methods: {
-      getList() {
-        this.listLoading = true;
-        fetchList(this.listQuery).then(response => {
-          this.listLoading = false;
-          this.list = response.data.list;
-          this.total = response.data.total;
-        });
-      },
-      addProductAttrCate() {
-        this.dialogVisible = true;
-        this.dialogTitle = "添加类型";
-      },
-      handleSizeChange(val) {
-        this.listQuery.pageNum = 1;
-        this.listQuery.pageSize = val;
-        this.getList();
-      },
-      handleCurrentChange(val) {
-        this.listQuery.pageNum = val;
-        this.getList();
-      },
-      handleDelete(index, row) {
-        this.$confirm('是否要删除该品牌', '提示', {
-          confirmButtonText: '确定',
-          cancelButtonText: '取消',
-          type: 'warning'
-        }).then(() => {
-          deleteProductAttrCate(row.id).then(response=>{
-            this.$message({
-              message: '删除成功',
-              type: 'success',
-              duration:1000
-            });
-            this.getList();
-          });
-        });
-      },
-      handleUpdate(index, row) {
-        this.dialogVisible = true;
-        this.dialogTitle = "编辑类型";
-        this.productAttrCate.name = row.name;
-        this.productAttrCate.id = row.id;
-      },
-      getAttrList(index, row) {
-        this.$router.push({path: '/pms/productAttrList',query:{cid:row.id,cname:row.name,type:0}})
-      },
-      getParamList(index, row) {
-        this.$router.push({path: '/pms/productAttrList',query:{cid:row.id,cname:row.name,type:1}})
-      },
-      handleConfirm(formName){
-        this.$refs[formName].validate((valid) => {
-          if (valid) {
-            let data = new URLSearchParams();
-            data.append("name",this.productAttrCate.name);
-            if(this.dialogTitle==="添加类型"){
-              createProductAttrCate(data).then(response=>{
-                this.$message({
-                  message: '添加成功',
-                  type: 'success',
-                  duration:1000
-                });
-                this.dialogVisible = false;
-                this.getList();
-              });
-            }else{
-              updateProductAttrCate(this.productAttrCate.id,data).then(response=>{
-                this.$message({
-                  message: '修改成功',
-                  type: 'success',
-                  duration:1000
-                });
-                this.dialogVisible = false;
-                this.getList();
-              });
-            }
-          } else {
-            console.log('error submit!!');
-            return false;
-          }
-        });
-      },
-      handleClose(){
-        if (!this.dialogVisible && this.$refs.productAttrCatForm) {
-          this.$refs.productAttrCatForm.clearValidate()
-        }
-      }
-    }
-  }
-</script>
-<style rel="stylesheet/scss" lang="scss" scoped>
-</style>
-
-

+ 0 - 219
src/views/pms/productAttr/productAttrList.vue

@@ -1,219 +0,0 @@
-<template> 
-  <div class="app-container">
-    <el-card class="operate-container" shadow="never">
-
-      <i class="el-icon-tickets" style="margin-top: 5px"></i>
-      <span style="margin-top: 5px">数据列表</span>
-      <el-button
-        class="btn-add"
-        @click="addProductAttr()"
-        size="mini">
-        添加
-      </el-button>
-    </el-card>
-    <div class="table-container">
-      <el-table ref="productAttrTable"
-                :data="list"
-                style="width: 100%"
-                @selection-change="handleSelectionChange"
-                v-loading="listLoading"
-                border>
-        <el-table-column type="selection" width="60" align="center"></el-table-column>
-        <el-table-column label="编号" width="100" align="center">
-          <template slot-scope="scope">{{scope.row.id}}</template>
-        </el-table-column>
-        <el-table-column label="属性名称" width="140" align="center">
-          <template slot-scope="scope">{{scope.row.name}}</template>
-        </el-table-column>
-        <el-table-column label="商品类型" width="140" align="center">
-          <template slot-scope="scope">{{$route.query.cname}}</template>
-        </el-table-column>
-        <el-table-column label="属性是否可选" width="120" align="center">
-          <template slot-scope="scope">{{scope.row.selectType|selectTypeFilter}}</template>
-        </el-table-column>
-        <el-table-column label="属性值的录入方式" width="150" align="center">
-          <template slot-scope="scope">{{scope.row.inputType|inputTypeFilter}}</template>
-        </el-table-column>
-        <el-table-column label="可选值列表" align="center">
-          <template slot-scope="scope">{{scope.row.inputList}}</template>
-        </el-table-column>
-        <el-table-column label="排序" width="100" align="center">
-          <template slot-scope="scope">{{scope.row.sort}}</template>
-        </el-table-column>
-        <el-table-column label="操作" width="200" align="center">
-          <template slot-scope="scope">
-            <el-button
-              size="mini"
-              @click="handleUpdate(scope.$index, scope.row)">编辑
-            </el-button>
-            <el-button
-              size="mini"
-              type="danger"
-              @click="handleDelete(scope.$index, scope.row)">删除
-            </el-button>
-          </template>
-        </el-table-column>
-      </el-table>
-    </div>
-    <div class="batch-operate-container">
-      <el-select
-        size="small"
-        v-model="operateType" placeholder="批量操作">
-        <el-option
-          v-for="item in operates"
-          :key="item.value"
-          :label="item.label"
-          :value="item.value">
-        </el-option>
-      </el-select>
-      <el-button
-        style="margin-left: 20px"
-        class="search-button"
-        @click="handleBatchOperate()"
-        type="primary"
-        size="small">
-        确定
-      </el-button>
-    </div>
-    <div class="pagination-container">
-      <el-pagination
-        background
-        @size-change="handleSizeChange"
-        @current-change="handleCurrentChange"
-        layout="total, sizes,prev, pager, next,jumper"
-        :page-size="listQuery.pageSize"
-        :page-sizes="[5,10,15]"
-        :current-page.sync="listQuery.pageNum"
-        :total="total">
-      </el-pagination>
-    </div>
-  </div>
-</template>
-<script>
-  import {fetchList, deleteProductAttr} from '@/api/productAttr'
-
-  export default {
-    name: 'productAttrList',
-    data() {
-      return {
-        list: null,
-        total: null,
-        listLoading: true,
-        listQuery: {
-          pageNum: 1,
-          pageSize: 5,
-          type: this.$route.query.type
-        },
-        operateType: null,
-        multipleSelection: [],
-        operates: [
-          {
-            label: "删除",
-            value: "deleteProductAttr"
-          }
-        ]
-      }
-    },
-    created() {
-      this.getList();
-    },
-    methods: {
-      getList() {
-        this.listLoading = true;
-        fetchList(this.$route.query.cid, this.listQuery).then(response => {
-          this.listLoading = false;
-          this.list = response.data.list;
-          this.total = response.data.total;
-        });
-      },
-      addProductAttr() {
-        this.$router.push({path:'/pms/addProductAttr',query:{cid:this.$route.query.cid,type:this.$route.query.type}});
-      },
-      handleSelectionChange(val) {
-        this.multipleSelection = val;
-      },
-      handleBatchOperate() {
-        if (this.multipleSelection < 1) {
-          this.$message({
-            message: '请选择一条记录',
-            type: 'warning',
-            duration: 1000
-          });
-          return;
-        }
-        if (this.operateType !== 'deleteProductAttr') {
-          this.$message({
-            message: '请选择批量操作类型',
-            type: 'warning',
-            duration: 1000
-          });
-          return;
-        }
-        let ids = [];
-        for (let i = 0; i < this.multipleSelection.length; i++) {
-          ids.push(this.multipleSelection[i].id);
-        }
-        this.handleDeleteProductAttr(ids);
-      },
-      handleSizeChange(val) {
-        this.listQuery.pageNum = 1;
-        this.listQuery.pageSize = val;
-        this.getList();
-      },
-      handleCurrentChange(val) {
-        this.listQuery.pageNum = val;
-        this.getList();
-      },
-      handleUpdate(index, row) {
-        this.$router.push({path:'/pms/updateProductAttr',query:{id:row.id}});
-      },
-      handleDeleteProductAttr(ids) {
-        this.$confirm('是否要删除该属性', '提示', {
-          confirmButtonText: '确定',
-          cancelButtonText: '取消',
-          type: 'warning'
-        }).then(() => {
-          let data = new URLSearchParams();
-          data.append("ids", ids);
-          deleteProductAttr(data).then(response => {
-            this.$message({
-              message: '删除成功',
-              type: 'success',
-              duration: 1000
-            });
-            this.getList();
-          });
-        });
-      },
-      handleDelete(index, row) {
-        let ids = [];
-        ids.push(row.id);
-        this.handleDeleteProductAttr(ids);
-      },
-    },
-    filters: {
-      inputTypeFilter(value) {
-        if (value === 1) {
-          return '从列表中选取';
-        } else {
-          return '手工录入'
-        }
-      },
-      selectTypeFilter(value) {
-        if (value === 1) {
-          return '单选';
-        } else if (value === 2) {
-          return '多选';
-        } else {
-          return '唯一'
-        }
-      },
-    }
-  }
-</script>
-
-<style rel="stylesheet/scss" lang="scss" scoped>
-
-</style>
-
-

+ 0 - 15
src/views/pms/productAttr/updateProductAttr.vue

@@ -1,15 +0,0 @@
-<template>
-  <product-attr-detail :is-edit='true'></product-attr-detail>
-</template>
-
-<script>
-  import ProductAttrDetail from './components/ProductAttrDetail'
-  export default {
-    name: 'updateProductAttr',
-    components: { ProductAttrDetail }
-  }
-</script>
-
-<style scoped>
-
-</style>

+ 0 - 14
src/views/pms/productCate/add.vue

@@ -1,14 +0,0 @@
-<template> 
-  <product-cate-detail :is-edit='false'></product-cate-detail>
-</template>
-<script>
-  import ProductCateDetail from './components/ProductCateDetail'
-  export default {
-    name: 'addProductCate',
-    components: { ProductCateDetail }
-  }
-</script>
-<style>
-</style>
-
-

+ 0 - 264
src/views/pms/productCate/components/ProductCateDetail.vue

@@ -1,264 +0,0 @@
-<template>
-  <el-card class="form-container" shadow="never">
-    <el-form :model="productCate"
-             :rules="rules"
-             ref="productCateFrom"
-             label-width="150px">
-      <el-form-item label="分类名称:" prop="name">
-        <el-input v-model="productCate.name"></el-input>
-      </el-form-item>
-      <el-form-item label="上级分类:">
-        <el-select v-model="productCate.parentId"
-                   placeholder="请选择分类">
-          <el-option
-            v-for="item in selectProductCateList"
-            :key="item.id"
-            :label="item.name"
-            :value="item.id">
-          </el-option>
-        </el-select>
-      </el-form-item>
-      <el-form-item label="数量单位:">
-        <el-input v-model="productCate.productUnit"></el-input>
-      </el-form-item>
-      <el-form-item label="排序:">
-        <el-input v-model="productCate.sort"></el-input>
-      </el-form-item>
-      <el-form-item label="是否显示:">
-        <el-radio-group v-model="productCate.showStatus">
-          <el-radio :label="1">是</el-radio>
-          <el-radio :label="0">否</el-radio>
-        </el-radio-group>
-      </el-form-item>
-      <el-form-item label="是否显示在导航栏:">
-        <el-radio-group v-model="productCate.navStatus">
-          <el-radio :label="1">是</el-radio>
-          <el-radio :label="0">否</el-radio>
-        </el-radio-group>
-      </el-form-item>
-      <el-form-item label="分类图标:">
-        <single-upload v-model="productCate.icon"></single-upload>
-      </el-form-item>
-      <el-form-item v-for="(filterProductAttr, index) in filterProductAttrList"
-                    :label="index | filterLabelFilter"
-                    :key="filterProductAttr.key"
-      >
-        <el-cascader
-          clearable
-          v-model="filterProductAttr.value"
-          :options="filterAttrs">
-        </el-cascader>
-        <el-button style="margin-left: 20px" @click.prevent="removeFilterAttr(filterProductAttr)">删除</el-button>
-      </el-form-item>
-      <el-form-item>
-        <el-button size="small" type="primary" @click="handleAddFilterAttr()">新增</el-button>
-      </el-form-item>
-      <el-form-item label="关键词:">
-        <el-input v-model="productCate.keywords"></el-input>
-      </el-form-item>
-      <el-form-item label="分类描述:">
-        <el-input type="textarea" :autosize="true" v-model="productCate.description"></el-input>
-      </el-form-item>
-      <el-form-item>
-        <el-button type="primary" @click="onSubmit('productCateFrom')">提交</el-button>
-        <el-button v-if="!isEdit" @click="resetForm('productCateFrom')">重置</el-button>
-      </el-form-item>
-    </el-form>
-  </el-card>
-</template>
-
-<script>
-  import {fetchList, createProductCate, updateProductCate, getProductCate} from '@/api/productCate';
-  import {fetchListWithAttr} from '@/api/productAttrCate';
-  import {getProductAttrInfo} from '@/api/productAttr';
-  import SingleUpload from '@/components/Upload/singleUpload';
-
-  const defaultProductCate = {
-    description: '',
-    icon: '',
-    keywords: '',
-    name: '',
-    navStatus: 0,
-    parentId: 0,
-    productUnit: '',
-    showStatus: 0,
-    sort: 0,
-    productAttributeIdList: []
-  };
-  export default {
-    name: "ProductCateDetail",
-    components: {SingleUpload},
-    props: {
-      isEdit: {
-        type: Boolean,
-        default: false
-      }
-    },
-    data() {
-      return {
-        productCate: Object.assign({}, defaultProductCate),
-        selectProductCateList: [],
-        rules: {
-          name: [
-            {required: true, message: '请输入品牌名称', trigger: 'blur'},
-            {min: 2, max: 140, message: '长度在 2 到 140 个字符', trigger: 'blur'}
-          ]
-        },
-        filterAttrs: [],
-        filterProductAttrList: [{
-          value: []
-        }]
-      }
-    },
-    created() {
-      if (this.isEdit) {
-        getProductCate(this.$route.query.id).then(response => {
-          this.productCate = response.data;
-        });
-        getProductAttrInfo(this.$route.query.id).then(response => {
-          if (response.data != null && response.data.length > 0) {
-            this.filterProductAttrList = [];
-            for (let i = 0; i < response.data.length; i++) {
-              this.filterProductAttrList.push({
-                key: Date.now() + i,
-                value: [response.data[i].attributeCategoryId, response.data[i].attributeId]
-              })
-            }
-          }
-        });
-      } else {
-        this.productCate = Object.assign({}, defaultProductCate);
-      }
-      this.getSelectProductCateList();
-      this.getProductAttrCateList();
-    },
-    methods: {
-      getSelectProductCateList() {
-        fetchList(0, {pageSize: 100, pageNum: 1}).then(response => {
-          this.selectProductCateList = response.data.list;
-          this.selectProductCateList.unshift({id: 0, name: '无上级分类'});
-        });
-      },
-      getProductAttrCateList() {
-        fetchListWithAttr().then(response => {
-          let list = response.data;
-          for (let i = 0; i < list.length; i++) {
-            let productAttrCate = list[i];
-            let children = [];
-            if (productAttrCate.productAttributeList != null && productAttrCate.productAttributeList.length > 0) {
-              for (let j = 0; j < productAttrCate.productAttributeList.length; j++) {
-                children.push({
-                  label: productAttrCate.productAttributeList[j].name,
-                  value: productAttrCate.productAttributeList[j].id
-                })
-              }
-            }
-            this.filterAttrs.push({label: productAttrCate.name, value: productAttrCate.id, children: children});
-          }
-        });
-      },
-      getProductAttributeIdList() {
-        //获取选中的筛选商品属性
-        let productAttributeIdList = [];
-        for (let i = 0; i < this.filterProductAttrList.length; i++) {
-          let item = this.filterProductAttrList[i];
-          if (item.value !== null && item.value.length === 2) {
-            productAttributeIdList.push(item.value[1]);
-          }
-        }
-        return productAttributeIdList;
-      },
-      onSubmit(formName) {
-        this.$refs[formName].validate((valid) => {
-          if (valid) {
-            this.$confirm('是否提交数据', '提示', {
-              confirmButtonText: '确定',
-              cancelButtonText: '取消',
-              type: 'warning'
-            }).then(() => {
-              if (this.isEdit) {
-                this.productCate.productAttributeIdList = this.getProductAttributeIdList();
-                updateProductCate(this.$route.query.id, this.productCate).then(response => {
-                  this.$message({
-                    message: '修改成功',
-                    type: 'success',
-                    duration: 1000
-                  });
-                  this.$router.back();
-                });
-              } else {
-                this.productCate.productAttributeIdList = this.getProductAttributeIdList();
-                createProductCate(this.productCate).then(response => {
-                  this.$refs[formName].resetFields();
-                  this.resetForm(formName);
-                  this.$message({
-                    message: '提交成功',
-                    type: 'success',
-                    duration: 1000
-                  });
-                });
-              }
-            });
-
-          } else {
-            this.$message({
-              message: '验证失败',
-              type: 'error',
-              duration: 1000
-            });
-            return false;
-          }
-        });
-      },
-      resetForm(formName) {
-        this.$refs[formName].resetFields();
-        this.productCate = Object.assign({}, defaultProductCate);
-        this.getSelectProductCateList();
-        this.filterProductAttrList = [{
-          value: []
-        }];
-      },
-      removeFilterAttr(productAttributeId) {
-        if (this.filterProductAttrList.length === 1) {
-          this.$message({
-            message: '至少要留一个',
-            type: 'warning',
-            duration: 1000
-          });
-          return;
-        }
-        var index = this.filterProductAttrList.indexOf(productAttributeId);
-        if (index !== -1) {
-          this.filterProductAttrList.splice(index, 1)
-        }
-      },
-      handleAddFilterAttr() {
-        if (this.filterProductAttrList.length === 3) {
-          this.$message({
-            message: '最多添加三个',
-            type: 'warning',
-            duration: 1000
-          });
-          return;
-        }
-        this.filterProductAttrList.push({
-          value: null,
-          key: Date.now()
-        });
-      }
-    },
-    filters: {
-      filterLabelFilter(index) {
-        if (index === 0) {
-          return '筛选属性:';
-        } else {
-          return '';
-        }
-      }
-    }
-  }
-</script>
-
-<style scoped>
-
-</style>

+ 0 - 230
src/views/pms/productCate/index.vue

@@ -1,230 +0,0 @@
-<template>
-  <div class="app-container">
-    <el-card class="operate-container" shadow="never">
-      <i class="el-icon-tickets" style="margin-top: 5px"></i>
-      <span style="margin-top: 5px">数据列表</span>
-      <el-button
-        class="btn-add"
-        @click="handleAddProductCate()"
-        size="mini">
-        添加
-      </el-button>
-    </el-card>
-    <div class="table-container">
-      <el-table ref="productCateTable"
-                style="width: 100%"
-                :data="list"
-                v-loading="listLoading" border>
-        <el-table-column label="编号" width="100" align="center">
-          <template slot-scope="scope">{{scope.row.id}}</template>
-        </el-table-column>
-        <el-table-column label="分类名称" align="center">
-          <template slot-scope="scope">{{scope.row.name}}</template>
-        </el-table-column>
-        <el-table-column label="级别" width="100" align="center">
-          <template slot-scope="scope">{{scope.row.level | levelFilter}}</template>
-        </el-table-column>
-        <el-table-column label="商品数量" width="100" align="center">
-          <template slot-scope="scope">{{scope.row.productCount }}</template>
-        </el-table-column>
-        <el-table-column label="数量单位" width="100" align="center">
-          <template slot-scope="scope">{{scope.row.productUnit }}</template>
-        </el-table-column>
-        <el-table-column label="导航栏" width="100" align="center">
-          <template slot-scope="scope">
-            <el-switch
-              @change="handleNavStatusChange(scope.$index, scope.row)"
-              :active-value="1"
-              :inactive-value="0"
-              v-model="scope.row.navStatus">
-            </el-switch>
-          </template>
-        </el-table-column>
-        <el-table-column label="是否显示" width="100" align="center">
-          <template slot-scope="scope">
-            <el-switch
-              @change="handleShowStatusChange(scope.$index, scope.row)"
-              :active-value="1"
-              :inactive-value="0"
-              v-model="scope.row.showStatus">
-            </el-switch>
-          </template>
-        </el-table-column>
-        <el-table-column label="排序" width="100" align="center">
-          <template slot-scope="scope">{{scope.row.sort }}</template>
-        </el-table-column>
-        <el-table-column label="设置" width="200" align="center">
-          <template slot-scope="scope">
-            <el-button
-              size="mini"
-              :disabled="scope.row.level | disableNextLevel"
-              @click="handleShowNextLevel(scope.$index, scope.row)">查看下级
-            </el-button>
-            <el-button
-              size="mini"
-              @click="handleTransferProduct(scope.$index, scope.row)">转移商品
-            </el-button>
-          </template>
-        </el-table-column>
-        <el-table-column label="操作" width="200" align="center">
-          <template slot-scope="scope">
-            <el-button
-              size="mini"
-              @click="handleUpdate(scope.$index, scope.row)">编辑
-            </el-button>
-            <el-button
-              size="mini"
-              type="danger"
-              @click="handleDelete(scope.$index, scope.row)">删除
-            </el-button>
-          </template>
-        </el-table-column>
-      </el-table>
-    </div>
-    <div class="pagination-container">
-      <el-pagination
-        background
-        @size-change="handleSizeChange"
-        @current-change="handleCurrentChange"
-        layout="total, sizes,prev, pager, next,jumper"
-        :page-size="listQuery.pageSize"
-        :page-sizes="[5,10,15]"
-        :current-page.sync="listQuery.pageNum"
-        :total="total">
-      </el-pagination>
-    </div>
-  </div>
-</template>
-
-<script>
-  import {fetchList,deleteProductCate,updateShowStatus,updateNavStatus} from '@/api/productCate'
-
-  export default {
-    name: "productCateList",
-    data() {
-      return {
-        list: null,
-        total: null,
-        listLoading: true,
-        listQuery: {
-          pageNum: 1,
-          pageSize: 5
-        },
-        parentId: 0
-      }
-    },
-    created() {
-      this.resetParentId();
-      this.getList();
-    },
-    watch: {
-      $route(route) {
-        this.resetParentId();
-        this.getList();
-      }
-    },
-    methods: {
-      resetParentId(){
-        this.listQuery.pageNum = 1;
-        if (this.$route.query.parentId != null) {
-          this.parentId = this.$route.query.parentId;
-        } else {
-          this.parentId = 0;
-        }
-      },
-      handleAddProductCate() {
-        this.$router.push('/pms/addProductCate');
-      },
-      getList() {
-        this.listLoading = true;
-        fetchList(this.parentId, this.listQuery).then(response => {
-          this.listLoading = false;
-          this.list = response.data.list;
-          this.total = response.data.total;
-        });
-      },
-      handleSizeChange(val) {
-        this.listQuery.pageNum = 1;
-        this.listQuery.pageSize = val;
-        this.getList();
-      },
-      handleCurrentChange(val) {
-        this.listQuery.pageNum = val;
-        this.getList();
-      },
-      handleNavStatusChange(index, row) {
-        let data = new URLSearchParams();
-        let ids=[];
-        ids.push(row.id)
-        data.append('ids',ids);
-        data.append('navStatus',row.navStatus);
-        updateNavStatus(data).then(response=>{
-          this.$message({
-            message: '修改成功',
-            type: 'success',
-            duration: 1000
-          });
-        });
-      },
-      handleShowStatusChange(index, row) {
-        let data = new URLSearchParams();
-        let ids=[];
-        ids.push(row.id)
-        data.append('ids',ids);
-        data.append('showStatus',row.showStatus);
-        updateShowStatus(data).then(response=>{
-          this.$message({
-            message: '修改成功',
-            type: 'success',
-            duration: 1000
-          });
-        });
-      },
-      handleShowNextLevel(index, row) {
-        this.$router.push({path: '/pms/productCate', query: {parentId: row.id}})
-      },
-      handleTransferProduct(index, row) {
-        console.log('handleAddProductCate');
-      },
-      handleUpdate(index, row) {
-        this.$router.push({path:'/pms/updateProductCate',query:{id:row.id}});
-      },
-      handleDelete(index, row) {
-        this.$confirm('是否要删除该品牌', '提示', {
-          confirmButtonText: '确定',
-          cancelButtonText: '取消',
-          type: 'warning'
-        }).then(() => {
-          deleteProductCate(row.id).then(response => {
-            this.$message({
-              message: '删除成功',
-              type: 'success',
-              duration: 1000
-            });
-            this.getList();
-          });
-        });
-      }
-    },
-    filters: {
-      levelFilter(value) {
-        if (value === 0) {
-          return '一级';
-        } else if (value === 1) {
-          return '二级';
-        }
-      },
-      disableNextLevel(value) {
-        if (value === 0) {
-          return false;
-        } else {
-          return true;
-        }
-      }
-    }
-  }
-</script>
-
-<style scoped>
-
-</style>

+ 0 - 14
src/views/pms/productCate/update.vue

@@ -1,14 +0,0 @@
-<template> 
-  <product-cate-detail :is-edit='true'></product-cate-detail>
-</template>
-<script>
-  import ProductCateDetail from './components/ProductCateDetail'
-  export default {
-    name: 'updateProductCate',
-    components: { ProductCateDetail }
-  }
-</script>
-<style>
-</style>
-
-

+ 0 - 13
src/views/sms/advertise/add.vue

@@ -1,13 +0,0 @@
-<template> 
-  <home-advertise-detail :isEdit="false"></home-advertise-detail>
-</template>
-<script>
-  import HomeAdvertiseDetail from './components/HomeAdvertiseDetail'
-  export default {
-    name: 'addHomeAdvertise',
-    components: { HomeAdvertiseDetail }
-  }
-</script>
-<style></style>
-
-

+ 0 - 185
src/views/sms/advertise/components/HomeAdvertiseDetail.vue

@@ -1,185 +0,0 @@
-<template> 
-  <el-card class="form-container" shadow="never">
-    <el-form :model="homeAdvertise"
-             :rules="rules"
-             ref="homeAdvertiseFrom"
-             label-width="150px"
-             size="small">
-      <el-form-item label="广告名称:" prop="name">
-        <el-input v-model="homeAdvertise.name" class="input-width"></el-input>
-      </el-form-item>
-      <el-form-item label="广告位置:">
-        <el-select v-model="homeAdvertise.type">
-          <el-option
-            v-for="type in typeOptions"
-            :key="type.value"
-            :label="type.label"
-            :value="type.value">
-          </el-option>
-        </el-select>
-      </el-form-item>
-      <el-form-item label="开始时间:" prop="startTime">
-        <el-date-picker
-          type="datetime"
-          placeholder="选择日期"
-          v-model="homeAdvertise.startTime"></el-date-picker>
-      </el-form-item>
-      <el-form-item label="到期时间:" prop="endTime">
-        <el-date-picker
-          type="datetime"
-          placeholder="选择日期"
-          v-model="homeAdvertise.endTime"></el-date-picker>
-      </el-form-item>
-      <el-form-item label="上线/下线:">
-        <el-radio-group v-model="homeAdvertise.status">
-          <el-radio :label="0">下线</el-radio>
-          <el-radio :label="1">上线</el-radio>
-        </el-radio-group>
-      </el-form-item>
-      <el-form-item label="广告图片:">
-        <single-upload v-model="homeAdvertise.pic"></single-upload>
-      </el-form-item>
-      <el-form-item label="排序:">
-        <el-input v-model="homeAdvertise.sort" class="input-width"></el-input>
-      </el-form-item>
-      <el-form-item label="广告链接:" prop="url">
-        <el-input v-model="homeAdvertise.url" class="input-width"></el-input>
-      </el-form-item>
-      <el-form-item label="广告备注:">
-        <el-input
-          class="input-width"
-          type="textarea"
-          :rows="5"
-          placeholder="请输入内容"
-          v-model="homeAdvertise.note">
-        </el-input>
-      </el-form-item>
-      <el-form-item>
-        <el-button type="primary" @click="onSubmit('homeAdvertiseFrom')">提交</el-button>
-        <el-button v-if="!isEdit" @click="resetForm('homeAdvertiseFrom')">重置</el-button>
-      </el-form-item>
-    </el-form>
-  </el-card>
-</template>
-<script>
-  import SingleUpload from '@/components/Upload/singleUpload'
-  import {createHomeAdvertise, getHomeAdvertise, updateHomeAdvertise} from '@/api/homeAdvertise'
-  const defaultTypeOptions = [
-    {
-      label: 'PC首页轮播',
-      value: 0
-    },
-    {
-      label: 'APP首页轮播',
-      value: 1
-    }
-  ];
-  const defaultHomeAdvertise = {
-    name: null,
-    type: 1,
-    pic: null,
-    startTime: null,
-    endTime: null,
-    status: 0,
-    url: null,
-    note: null,
-    sort: 0
-  };
-  export default {
-    name: 'HomeAdvertiseDetail',
-    components:{SingleUpload},
-    props: {
-      isEdit: {
-        type: Boolean,
-        default: false
-      }
-    },
-    data() {
-      return {
-        homeAdvertise: null,
-        rules: {
-          name: [
-            {required: true, message: '请输入广告名称', trigger: 'blur'},
-            {min: 2, max: 140, message: '长度在 2 到 140 个字符', trigger: 'blur'}
-          ],
-          url: [
-            {required: true, message: '请输入广告链接', trigger: 'blur'}
-          ],
-          startTime: [
-            {required: true, message: '请选择开始时间', trigger: 'blur'}
-          ],
-          endTime: [
-            {required: true, message: '请选择到期时间', trigger: 'blur'}
-          ],
-          pic: [
-            {required: true, message: '请选择广告图片', trigger: 'blur'}
-          ]
-        },
-        typeOptions: Object.assign({}, defaultTypeOptions)
-      }
-    },
-    created(){
-      if (this.isEdit) {
-        getHomeAdvertise(this.$route.query.id).then(response => {
-          this.homeAdvertise = response.data;
-        });
-      }else{
-        this.homeAdvertise = Object.assign({},defaultHomeAdvertise);
-      }
-    },
-    methods: {
-      onSubmit(formName) {
-        this.$refs[formName].validate((valid) => {
-          if (valid) {
-            this.$confirm('是否提交数据', '提示', {
-              confirmButtonText: '确定',
-              cancelButtonText: '取消',
-              type: 'warning'
-            }).then(() => {
-              if (this.isEdit) {
-                updateHomeAdvertise(this.$route.query.id, this.homeAdvertise).then(response => {
-                  this.$refs[formName].resetFields();
-                  this.$message({
-                    message: '修改成功',
-                    type: 'success',
-                    duration:1000
-                  });
-                  this.$router.back();
-                });
-              } else {
-                createHomeAdvertise(this.homeAdvertise).then(response => {
-                  this.$refs[formName].resetFields();
-                  this.homeAdvertise = Object.assign({},defaultHomeAdvertise);
-                  this.$message({
-                    message: '提交成功',
-                    type: 'success',
-                    duration:1000
-                  });
-                });
-              }
-            });
-
-          } else {
-            this.$message({
-              message: '验证失败',
-              type: 'error',
-              duration:1000
-            });
-            return false;
-          }
-        });
-      },
-      resetForm(formName) {
-        this.$refs[formName].resetFields();
-        this.homeAdvertise = Object.assign({},defaultHomeAdvertise);
-      }
-    }
-  }
-</script>
-<style scoped>
-  .input-width {
-    width: 70%;
-  }
-</style>
-
-

+ 0 - 307
src/views/sms/advertise/index.vue

@@ -1,307 +0,0 @@
-<template> 
-  <div class="app-container">
-    <el-card class="filter-container" shadow="never">
-      <div>
-        <i class="el-icon-search"></i>
-        <span>筛选搜索</span>
-        <el-button
-          style="float:right"
-          type="primary"
-          @click="handleSearchList()"
-          size="small">
-          查询搜索
-        </el-button>
-        <el-button
-          style="float:right;margin-right: 15px"
-          @click="handleResetSearch()"
-          size="small">
-          重置
-        </el-button>
-      </div>
-      <div style="margin-top: 15px">
-        <el-form :inline="true" :model="listQuery" size="small" label-width="140px">
-          <el-form-item label="广告名称:">
-            <el-input v-model="listQuery.name" class="input-width" placeholder="广告名称"></el-input>
-          </el-form-item>
-          <el-form-item label="广告位置:">
-            <el-select v-model="listQuery.type" placeholder="全部" clearable class="input-width">
-              <el-option v-for="item in typeOptions"
-                         :key="item.value"
-                         :label="item.label"
-                         :value="item.value">
-              </el-option>
-            </el-select>
-          </el-form-item>
-          <el-form-item label="到期时间:">
-            <el-date-picker
-              class="input-width"
-              v-model="listQuery.endTime"
-              value-format="yyyy-MM-dd"
-              type="date"
-              placeholder="请选择时间">
-            </el-date-picker>
-          </el-form-item>
-        </el-form>
-      </div>
-    </el-card>
-    <el-card class="operate-container" shadow="never">
-      <i class="el-icon-tickets"></i>
-      <span>数据列表</span>
-      <el-button size="mini" class="btn-add" @click="handleAdd()">添加广告</el-button>
-    </el-card>
-    <div class="table-container">
-      <el-table ref="homeAdvertiseTable"
-                :data="list"
-                style="width: 100%;"
-                @selection-change="handleSelectionChange"
-                v-loading="listLoading" border>
-        <el-table-column type="selection" width="60" align="center"></el-table-column>
-        <el-table-column label="编号" width="120" align="center">
-          <template slot-scope="scope">{{scope.row.id}}</template>
-        </el-table-column>
-        <el-table-column label="广告名称" align="center">
-          <template slot-scope="scope">{{scope.row.name}}</template>
-        </el-table-column>
-        <el-table-column label="广告位置" width="120" align="center">
-          <template slot-scope="scope">{{scope.row.type | formatType}}</template>
-        </el-table-column>
-        <el-table-column label="广告图片" width="120" align="center">
-          <template slot-scope="scope"><img style="height: 80px" :src="scope.row.pic"></template>
-        </el-table-column>
-        <el-table-column label="时间" width="220" align="center">
-          <template slot-scope="scope">
-            <p>开始时间:{{scope.row.startTime | formatTime}}</p>
-            <p>到期时间:{{scope.row.endTime | formatTime}}</p>
-          </template>
-        </el-table-column>
-        <el-table-column label="上线/下线" width="120" align="center">
-          <template slot-scope="scope">
-            <el-switch
-              @change="handleUpdateStatus(scope.$index, scope.row)"
-              :active-value="1"
-              :inactive-value="0"
-              v-model="scope.row.status">
-            </el-switch>
-          </template>
-        </el-table-column>
-        <el-table-column label="点击次数" width="120" align="center">
-          <template slot-scope="scope">{{scope.row.clickCount}}</template>
-        </el-table-column>
-        <el-table-column label="生成订单" width="120" align="center">
-          <template slot-scope="scope">{{scope.row.orderCount}}</template>
-        </el-table-column>
-        <el-table-column label="操作" width="120" align="center">
-          <template slot-scope="scope">
-            <el-button size="mini"
-                       type="text"
-                       @click="handleUpdate(scope.$index, scope.row)">编辑
-            </el-button>
-            <el-button size="mini"
-                       type="text"
-                       @click="handleDelete(scope.$index, scope.row)">删除
-            </el-button>
-          </template>
-        </el-table-column>
-      </el-table>
-    </div>
-    <div class="batch-operate-container">
-      <el-select
-        size="small"
-        v-model="operateType" placeholder="批量操作">
-        <el-option
-          v-for="item in operates"
-          :key="item.value"
-          :label="item.label"
-          :value="item.value">
-        </el-option>
-      </el-select>
-      <el-button
-        style="margin-left: 20px"
-        class="search-button"
-        @click="handleBatchOperate()"
-        type="primary"
-        size="small">
-        确定
-      </el-button>
-    </div>
-    <div class="pagination-container">
-      <el-pagination
-        background
-        @size-change="handleSizeChange"
-        @current-change="handleCurrentChange"
-        layout="total, sizes,prev, pager, next,jumper"
-        :page-size="listQuery.pageSize"
-        :page-sizes="[5,10,15]"
-        :current-page.sync="listQuery.pageNum"
-        :total="total">
-      </el-pagination>
-    </div>
-  </div>
-</template>
-<script>
-  import {fetchList,updateStatus,deleteHomeAdvertise} from '@/api/homeAdvertise';
-  import {formatDate} from '@/utils/date';
-  const defaultListQuery = {
-    pageNum: 1,
-    pageSize: 5,
-    name: null,
-    type: null,
-    endTime:null
-  };
-  const defaultTypeOptions = [
-    {
-      label: 'PC首页轮播',
-      value: 0
-    },
-    {
-      label: 'APP首页轮播',
-      value: 1
-    }
-  ];
-  export default {
-    name: 'homeAdvertiseList',
-    data() {
-      return {
-        listQuery: Object.assign({}, defaultListQuery),
-        typeOptions: Object.assign({}, defaultTypeOptions),
-        list: null,
-        total: null,
-        listLoading: false,
-        multipleSelection: [],
-        operates: [
-          {
-            label: "删除",
-            value: 0
-          }
-        ],
-        operateType: null
-      }
-    },
-    created() {
-      this.getList();
-    },
-    filters:{
-      formatType(type){
-        if(type===1){
-          return 'APP首页轮播';
-        }else{
-          return 'PC首页轮播';
-        }
-      },
-      formatTime(time){
-        if(time==null||time===''){
-          return 'N/A';
-        }
-        let date = new Date(time);
-        return formatDate(date, 'yyyy-MM-dd hh:mm:ss')
-      },
-    },
-    methods: {
-      handleResetSearch() {
-        this.listQuery = Object.assign({}, defaultListQuery);
-      },
-      handleSearchList() {
-        this.listQuery.pageNum = 1;
-        this.getList();
-      },
-      handleSelectionChange(val){
-        this.multipleSelection = val;
-      },
-      handleSizeChange(val) {
-        this.listQuery.pageNum = 1;
-        this.listQuery.pageSize = val;
-        this.getList();
-      },
-      handleCurrentChange(val) {
-        this.listQuery.pageNum = val;
-        this.getList();
-      },
-      handleUpdateStatus(index,row){
-        this.$confirm('是否要修改上线/下线状态?', '提示', {
-          confirmButtonText: '确定',
-          cancelButtonText: '取消',
-          type: 'warning'
-        }).then(() => {
-          updateStatus(row.id,{status:row.status}).then(response=>{
-            this.getList();
-            this.$message({
-              type: 'success',
-              message: '修改成功!'
-            });
-          });
-        }).catch(() => {
-          this.$message({
-            type: 'success',
-            message: '已取消操作!'
-          });
-          this.getList();
-        });
-      },
-      handleDelete(index,row){
-        this.deleteHomeAdvertise(row.id);
-      },
-      handleBatchOperate(){
-        if (this.multipleSelection < 1) {
-          this.$message({
-            message: '请选择一条记录',
-            type: 'warning',
-            duration: 1000
-          });
-          return;
-        }
-        let ids = [];
-        for (let i = 0; i < this.multipleSelection.length; i++) {
-          ids.push(this.multipleSelection[i].id);
-        }
-        if(this.operateType===0){
-          //删除
-          this.deleteHomeAdvertise(ids);
-        }else {
-          this.$message({
-            message: '请选择批量操作类型',
-            type: 'warning',
-            duration: 1000
-          });
-        }
-      },
-      handleAdd(){
-        this.$router.push({path: '/sms/addAdvertise'})
-      },
-      handleUpdate(index,row){
-        this.$router.push({path: '/sms/updateAdvertise', query: {id: row.id}})
-      },
-      getList() {
-        this.listLoading = true;
-        fetchList(this.listQuery).then(response => {
-          this.listLoading = false;
-          this.list = response.data.list;
-          this.total = response.data.total;
-        })
-      },
-      deleteHomeAdvertise(ids){
-        this.$confirm('是否要删除该广告?', '提示', {
-          confirmButtonText: '确定',
-          cancelButtonText: '取消',
-          type: 'warning'
-        }).then(() => {
-          let params=new URLSearchParams();
-          params.append("ids",ids);
-          deleteHomeAdvertise(params).then(response=>{
-            this.getList();
-            this.$message({
-              type: 'success',
-              message: '删除成功!'
-            });
-          });
-        })
-      }
-    }
-  }
-</script>
-<style scoped>
-  .input-width {
-    width: 203px;
-  }
-</style>
-
-

+ 0 - 13
src/views/sms/advertise/update.vue

@@ -1,13 +0,0 @@
-<template> 
-  <home-advertise-detail :isEdit="true"></home-advertise-detail>
-</template>
-<script>
-  import HomeAdvertiseDetail from './components/HomeAdvertiseDetail'
-  export default {
-    name: 'updateHomeAdvertise',
-    components: { HomeAdvertiseDetail }
-  }
-</script>
-<style></style>
-
-

+ 0 - 434
src/views/sms/brand/index.vue

@@ -1,434 +0,0 @@
-<template> 
-  <div class="app-container">
-    <el-card class="filter-container" shadow="never">
-      <div>
-        <i class="el-icon-search"></i>
-        <span>筛选搜索</span>
-        <el-button
-          style="float:right"
-          type="primary"
-          @click="handleSearchList()"
-          size="small">
-          查询搜索
-        </el-button>
-        <el-button
-          style="float:right;margin-right: 15px"
-          @click="handleResetSearch()"
-          size="small">
-          重置
-        </el-button>
-      </div>
-      <div style="margin-top: 15px">
-        <el-form :inline="true" :model="listQuery" size="small" label-width="140px">
-          <el-form-item label="品牌名称:">
-            <el-input v-model="listQuery.brandName" class="input-width" placeholder="品牌名称"></el-input>
-          </el-form-item>
-          <el-form-item label="推荐状态:">
-            <el-select v-model="listQuery.recommendStatus" placeholder="全部" clearable class="input-width">
-              <el-option v-for="item in recommendOptions"
-                         :key="item.value"
-                         :label="item.label"
-                         :value="item.value">
-              </el-option>
-            </el-select>
-          </el-form-item>
-        </el-form>
-      </div>
-    </el-card>
-    <el-card class="operate-container" shadow="never">
-      <i class="el-icon-tickets"></i>
-      <span>数据列表</span>
-      <el-button size="mini" class="btn-add" @click="handleSelectBrand()">选择品牌</el-button>
-    </el-card>
-    <div class="table-container">
-      <el-table ref="homeBrandTable"
-                :data="list"
-                style="width: 100%;"
-                @selection-change="handleSelectionChange"
-                v-loading="listLoading" border>
-        <el-table-column type="selection" width="60" align="center"></el-table-column>
-        <el-table-column label="编号" width="120" align="center">
-          <template slot-scope="scope">{{scope.row.id}}</template>
-        </el-table-column>
-        <el-table-column label="品牌名称" align="center">
-          <template slot-scope="scope">{{scope.row.brandName}}</template>
-        </el-table-column>
-        <el-table-column label="是否推荐" width="200" align="center">
-          <template slot-scope="scope">
-            <el-switch
-            @change="handleRecommendStatusStatusChange(scope.$index, scope.row)"
-            :active-value="1"
-            :inactive-value="0"
-            v-model="scope.row.recommendStatus">
-          </el-switch>
-          </template>
-        </el-table-column>
-        <el-table-column label="排序" width="160" align="center">
-          <template slot-scope="scope">{{scope.row.sort}}</template>
-        </el-table-column>
-        <el-table-column label="状态" width="160" align="center">
-          <template slot-scope="scope">{{scope.row.recommendStatus | formatRecommendStatus}}</template>
-        </el-table-column>
-        <el-table-column label="操作" width="180" align="center">
-          <template slot-scope="scope">
-            <el-button size="mini"
-                       type="text"
-                       @click="handleEditSort(scope.$index, scope.row)">设置排序
-            </el-button>
-            <el-button size="mini"
-                       type="text"
-                       @click="handleDelete(scope.$index, scope.row)">删除
-            </el-button>
-          </template>
-        </el-table-column>
-      </el-table>
-    </div>
-    <div class="batch-operate-container">
-      <el-select
-        size="small"
-        v-model="operateType" placeholder="批量操作">
-        <el-option
-          v-for="item in operates"
-          :key="item.value"
-          :label="item.label"
-          :value="item.value">
-        </el-option>
-      </el-select>
-      <el-button
-        style="margin-left: 20px"
-        class="search-button"
-        @click="handleBatchOperate()"
-        type="primary"
-        size="small">
-        确定
-      </el-button>
-    </div>
-    <div class="pagination-container">
-      <el-pagination
-        background
-        @size-change="handleSizeChange"
-        @current-change="handleCurrentChange"
-        layout="total, sizes,prev, pager, next,jumper"
-        :page-size="listQuery.pageSize"
-        :page-sizes="[5,10,15]"
-        :current-page.sync="listQuery.pageNum"
-        :total="total">
-      </el-pagination>
-    </div>
-    <el-dialog title="选择品牌" :visible.sync="selectDialogVisible" width="40%">
-      <el-input v-model="dialogData.listQuery.keyword"
-                style="width: 250px;margin-bottom: 20px"
-                size="small"
-                placeholder="品牌名称搜索">
-        <el-button slot="append" icon="el-icon-search" @click="handleSelectSearch()"></el-button>
-      </el-input>
-      <el-table :data="dialogData.list"
-                @selection-change="handleDialogSelectionChange" border>
-        <el-table-column type="selection" width="60" align="center"></el-table-column>
-        <el-table-column label="品牌名称"align="center">
-          <template slot-scope="scope">{{scope.row.name}}</template>
-        </el-table-column>
-        <el-table-column label="相关" width="220" align="center">
-          <template slot-scope="scope">
-            商品:<span class="color-main">{{scope.row.productCount}}</span>
-            评价:<span class="color-main">{{scope.row.productCommentCount}}</span>
-          </template>
-        </el-table-column>
-      </el-table>
-      <div class="pagination-container">
-        <el-pagination
-          background
-          @size-change="handleDialogSizeChange"
-          @current-change="handleDialogCurrentChange"
-          layout="prev, pager, next"
-          :current-page.sync="dialogData.listQuery.pageNum"
-          :page-size="dialogData.listQuery.pageSize"
-          :page-sizes="[5,10,15]"
-          :total="dialogData.total">
-        </el-pagination>
-      </div>
-      <div style="clear: both;"></div>
-      <div slot="footer">
-        <el-button  size="small" @click="selectDialogVisible = false">取 消</el-button>
-        <el-button  size="small" type="primary" @click="handleSelectDialogConfirm()">确 定</el-button>
-      </div>
-    </el-dialog>
-    <el-dialog title="设置排序"
-               :visible.sync="sortDialogVisible"
-               width="40%">
-      <el-form :model="sortDialogData"
-               label-width="150px">
-        <el-form-item label="排序:">
-          <el-input v-model="sortDialogData.sort" style="width: 200px"></el-input>
-        </el-form-item>
-      </el-form>
-      <span slot="footer">
-        <el-button @click="sortDialogVisible = false" size="small">取 消</el-button>
-        <el-button type="primary" @click="handleUpdateSort" size="small">确 定</el-button>
-      </span>
-    </el-dialog>
-  </div>
-</template>
-<script>
-  import {fetchList,updateRecommendStatus,deleteHomeBrand,createHomeBrand,updateHomeBrandSort} from '@/api/homeBrand';
-  import {fetchList as fetchBrandList} from '@/api/brand';
-
-  const defaultListQuery = {
-    pageNum: 1,
-    pageSize: 5,
-    brandName: null,
-    recommendStatus: null
-  };
-  const defaultRecommendOptions = [
-    {
-      label: '未推荐',
-      value: 0
-    },
-    {
-      label: '推荐中',
-      value: 1
-    }
-  ];
-  export default {
-    name: 'homeBrandList',
-    data() {
-      return {
-        listQuery: Object.assign({}, defaultListQuery),
-        recommendOptions: Object.assign({}, defaultRecommendOptions),
-        list: null,
-        total: null,
-        listLoading: false,
-        multipleSelection: [],
-        operates: [
-          {
-            label: "设为推荐",
-            value: 0
-          },
-          {
-            label: "取消推荐",
-            value: 1
-          },
-          {
-            label: "删除",
-            value: 2
-          }
-        ],
-        operateType: null,
-        selectDialogVisible:false,
-        dialogData:{
-          list: null,
-          total: null,
-          multipleSelection:[],
-          listQuery:{
-            keyword: null,
-            showStatus:1,
-            pageNum: 1,
-            pageSize: 5
-          }
-        },
-        sortDialogVisible:false,
-        sortDialogData:{sort:0,id:null}
-      }
-    },
-    created() {
-      this.getList();
-    },
-    filters:{
-      formatRecommendStatus(status){
-        if(status===1){
-          return '推荐中';
-        }else{
-          return '未推荐';
-        }
-      }
-    },
-    methods: {
-      handleResetSearch() {
-        this.listQuery = Object.assign({}, defaultListQuery);
-      },
-      handleSearchList() {
-        this.listQuery.pageNum = 1;
-        this.getList();
-      },
-      handleSelectionChange(val){
-        this.multipleSelection = val;
-      },
-      handleSizeChange(val) {
-        this.listQuery.pageNum = 1;
-        this.listQuery.pageSize = val;
-        this.getList();
-      },
-      handleCurrentChange(val) {
-        this.listQuery.pageNum = val;
-        this.getList();
-      },
-      handleRecommendStatusStatusChange(index,row){
-        this.updateRecommendStatusStatus(row.id,row.recommendStatus);
-      },
-      handleDelete(index,row){
-        this.deleteBrand(row.id);
-      },
-      handleBatchOperate(){
-        if (this.multipleSelection < 1) {
-          this.$message({
-            message: '请选择一条记录',
-            type: 'warning',
-            duration: 1000
-          });
-          return;
-        }
-        let ids = [];
-        for (let i = 0; i < this.multipleSelection.length; i++) {
-          ids.push(this.multipleSelection[i].id);
-        }
-        if (this.operateType === 0) {
-          //设为推荐
-          this.updateRecommendStatusStatus(ids,1);
-        } else if (this.operateType === 1) {
-          //取消推荐
-          this.updateRecommendStatusStatus(ids,0);
-        } else if(this.operateType===2){
-          //删除
-          this.deleteBrand(ids);
-        }else {
-          this.$message({
-            message: '请选择批量操作类型',
-            type: 'warning',
-            duration: 1000
-          });
-          return;
-        }
-      },
-      handleSelectBrand(){
-        this.selectDialogVisible=true;
-        this.getDialogList();
-      },
-      handleSelectSearch(){
-        this.getDialogList();
-      },
-      handleDialogSizeChange(val) {
-        this.dialogData.listQuery.pageNum = 1;
-        this.dialogData.listQuery.pageSize = val;
-        this.getDialogList();
-      },
-      handleDialogCurrentChange(val) {
-        this.dialogData.listQuery.pageNum = val;
-        this.getDialogList();
-      },
-      handleDialogSelectionChange(val){
-        this.dialogData.multipleSelection = val;
-      },
-      handleSelectDialogConfirm(){
-        if (this.dialogData.multipleSelection < 1) {
-          this.$message({
-            message: '请选择一条记录',
-            type: 'warning',
-            duration: 1000
-          });
-          return;
-        }
-        let selectBrands = [];
-        for (let i = 0; i < this.dialogData.multipleSelection.length; i++) {
-          selectBrands.push({
-            brandId:this.dialogData.multipleSelection[i].id,
-            brandName:this.dialogData.multipleSelection[i].name
-          });
-        }
-        this.$confirm('使用要进行添加操作?', '提示', {
-          confirmButtonText: '确定',
-          cancelButtonText: '取消',
-          type: 'warning'
-        }).then(() => {
-          createHomeBrand(selectBrands).then(response=>{
-            this.selectDialogVisible=false;
-            this.dialogData.multipleSelection=[];
-            this.getList();
-            this.$message({
-              type: 'success',
-              message: '添加成功!'
-            });
-          });
-        });
-      },
-      handleEditSort(index,row){
-        this.sortDialogVisible=true;
-        this.sortDialogData.sort=row.sort;
-        this.sortDialogData.id=row.id;
-      },
-      handleUpdateSort(){
-        this.$confirm('是否要修改排序?', '提示', {
-          confirmButtonText: '确定',
-          cancelButtonText: '取消',
-          type: 'warning'
-        }).then(() => {
-          updateHomeBrandSort(this.sortDialogData).then(response=>{
-            this.sortDialogVisible=false;
-            this.getList();
-            this.$message({
-              type: 'success',
-              message: '删除成功!'
-            });
-          });
-        })
-      },
-      getList() {
-        this.listLoading = true;
-        fetchList(this.listQuery).then(response => {
-          this.listLoading = false;
-          this.list = response.data.list;
-          this.total = response.data.total;
-        })
-      },
-      updateRecommendStatusStatus(ids,status){
-        this.$confirm('是否要修改推荐状态?', '提示', {
-          confirmButtonText: '确定',
-          cancelButtonText: '取消',
-          type: 'warning'
-        }).then(() => {
-          let params=new URLSearchParams();
-          params.append("ids",ids);
-          params.append("recommendStatus",status);
-          updateRecommendStatus(params).then(response=>{
-            this.getList();
-            this.$message({
-              type: 'success',
-              message: '修改成功!'
-            });
-          });
-        }).catch(() => {
-          this.$message({
-            type: 'success',
-            message: '已取消操作!'
-          });
-          this.getList();
-        });
-      },
-      deleteBrand(ids){
-        this.$confirm('是否要删除该推荐?', '提示', {
-          confirmButtonText: '确定',
-          cancelButtonText: '取消',
-          type: 'warning'
-        }).then(() => {
-          let params=new URLSearchParams();
-          params.append("ids",ids);
-          deleteHomeBrand(params).then(response=>{
-            this.getList();
-            this.$message({
-              type: 'success',
-              message: '删成功!'
-            });
-          });
-        })
-      },
-      getDialogList(){
-        fetchBrandList(this.dialogData.listQuery).then(response=>{
-          this.dialogData.list=response.data.list;
-          this.dialogData.total=response.data.total;
-        })
-      }
-    }
-  }
-</script>
-<style></style>
-
-

+ 0 - 14
src/views/sms/coupon/add.vue

@@ -1,14 +0,0 @@
-<template> 
-  <coupon-detail :isEdit="false"></coupon-detail>
-</template>
-<script>
-  import CouponDetail from './components/CouponDetail'
-  export default {
-    name: 'addCoupon',
-    components: { CouponDetail }
-  }
-</script>
-<style scoped>
-</style>
-
-

+ 0 - 375
src/views/sms/coupon/components/CouponDetail.vue

@@ -1,375 +0,0 @@
-<template> 
-  <el-card class="form-container" shadow="never">
-    <el-form :model="coupon"
-             :rules="rules"
-             ref="couponFrom"
-             label-width="150px"
-             size="small">
-      <el-form-item label="优惠券类型:">
-        <el-select v-model="coupon.type">
-          <el-option
-            v-for="type in typeOptions"
-            :key="type.value"
-            :label="type.label"
-            :value="type.value">
-          </el-option>
-        </el-select>
-      </el-form-item>
-      <el-form-item label="优惠券名称:" prop="name">
-        <el-input v-model="coupon.name" class="input-width"></el-input>
-      </el-form-item>
-      <el-form-item label="适用平台:">
-        <el-select v-model="coupon.platform">
-          <el-option
-            v-for="item in platformOptions"
-            :key="item.value"
-            :label="item.label"
-            :value="item.value">
-          </el-option>
-        </el-select>
-      </el-form-item>
-      <el-form-item label="总发行量:" prop="publishCount">
-        <el-input v-model.number="coupon.publishCount" placeholder="只能输入正整数" class="input-width"></el-input>
-      </el-form-item>
-      <el-form-item label="面额:" prop="amount">
-        <el-input v-model.number="coupon.amount" placeholder="面值只能是数值,限2位小数" class="input-width">
-          <template slot="append">元</template>
-        </el-input>
-      </el-form-item>
-      <el-form-item label="每人限领:">
-        <el-input v-model="coupon.perLimit" placeholder="只能输入正整数" class="input-width">
-          <template slot="append">张</template>
-        </el-input>
-      </el-form-item>
-      <el-form-item label="使用门槛:" prop="minPoint">
-        <el-input v-model.number="coupon.minPoint" placeholder="只能输入正整数" class="input-width">
-          <template slot="prepend">满</template>
-          <template slot="append">元可用</template>
-        </el-input>
-      </el-form-item>
-      <el-form-item label="领取日期:" prop="enableTime">
-        <el-date-picker type="date" placeholder="选择日期" v-model="coupon.enableTime" class="input-width"></el-date-picker>
-      </el-form-item>
-      <el-form-item label="有效期:">
-        <el-date-picker type="date" placeholder="选择日期" v-model="coupon.startTime" style="width: 150px"></el-date-picker>
-        <span style="margin-left: 20px;margin-right: 20px">至</span>
-        <el-date-picker type="date" placeholder="选择日期" v-model="coupon.endTime" style="width: 150px"></el-date-picker>
-      </el-form-item>
-      <el-form-item label="可使用商品:">
-        <el-radio-group v-model="coupon.useType">
-          <el-radio-button :label="0">全场通用</el-radio-button>
-          <el-radio-button :label="1">指定分类</el-radio-button>
-          <el-radio-button :label="2">指定商品</el-radio-button>
-        </el-radio-group>
-      </el-form-item>
-      <el-form-item v-show="coupon.useType===1">
-        <el-cascader
-          clearable
-          placeholder="请选择分类名称"
-          v-model="selectProductCate"
-          :options="productCateOptions">
-        </el-cascader>
-        <el-button @click="handleAddProductCategoryRelation()">添加</el-button>
-        <el-table ref="productCateRelationTable"
-                  :data="coupon.productCategoryRelationList"
-                  style="width: 100%;margin-top: 20px"
-                  border>
-          <el-table-column label="分类名称" align="center">
-            <template slot-scope="scope">{{scope.row.parentCategoryName}}>{{scope.row.productCategoryName}}</template>
-          </el-table-column>
-          <el-table-column label="操作" align="center" width="100">
-            <template slot-scope="scope">
-              <el-button size="mini"
-                         type="text"
-                         @click="handleDeleteProductCateRelation(scope.$index, scope.row)">删除
-              </el-button>
-            </template>
-          </el-table-column>
-        </el-table>
-      </el-form-item>
-      <el-form-item v-show="coupon.useType===2">
-        <el-select
-          v-model="selectProduct"
-          filterable
-          remote
-          reserve-keyword
-          placeholder="商品名称/商品货号"
-          :remote-method="searchProductMethod"
-          :loading="selectProductLoading">
-          <el-option
-            v-for="item in selectProductOptions"
-            :key="item.productId"
-            :label="item.productName"
-            :value="item.productId">
-            <span style="float: left">{{ item.productName }}</span>
-            <span style="float: right; color: #8492a6; font-size: 13px">NO.{{ item.productSn }}</span>
-          </el-option>
-        </el-select>
-        <el-button @click="handleAddProductRelation()">添加</el-button>
-        <el-table ref="productRelationTable"
-                  :data="coupon.productRelationList"
-                  style="width: 100%;margin-top: 20px"
-                  border>
-          <el-table-column label="商品名称" align="center">
-            <template slot-scope="scope">{{scope.row.productName}}</template>
-          </el-table-column>
-          <el-table-column label="货号" align="center"  width="120" >
-            <template slot-scope="scope">NO.{{scope.row.productSn}}</template>
-          </el-table-column>
-          <el-table-column label="操作" align="center" width="100">
-            <template slot-scope="scope">
-              <el-button size="mini"
-                         type="text"
-                         @click="handleDeleteProductRelation(scope.$index, scope.row)">删除
-              </el-button>
-            </template>
-          </el-table-column>
-        </el-table>
-      </el-form-item>
-      <el-form-item label="备注:">
-        <el-input
-          class="input-width"
-          type="textarea"
-          :rows="5"
-          placeholder="请输入内容"
-          v-model="coupon.note">
-        </el-input>
-      </el-form-item>
-      <el-form-item>
-        <el-button type="primary" @click="onSubmit('couponFrom')">提交</el-button>
-        <el-button v-if="!isEdit" @click="resetForm('couponFrom')">重置</el-button>
-      </el-form-item>
-    </el-form>
-  </el-card>
-</template>
-<script>
-  import {createCoupon,getCoupon,updateCoupon} from '@/api/coupon';
-  import {fetchSimpleList as fetchProductList} from '@/api/product';
-  import {fetchListWithChildren} from '@/api/productCate'
-  const defaultCoupon = {
-    type: 0,
-    name: null,
-    platform: 0,
-    amount: null,
-    perLimit: 1,
-    minPoint: null,
-    startTime: null,
-    endTime: null,
-    useType: 0,
-    note: null,
-    publishCount: null,
-    productRelationList: [],
-    productCategoryRelationList: []
-  };
-  const defaultTypeOptions = [
-    {
-      label: '全场赠券',
-      value: 0
-    },
-    {
-      label: '会员赠券',
-      value: 1
-    },
-    {
-      label: '购物赠券',
-      value: 2
-    },
-    {
-      label: '注册赠券',
-      value: 3
-    }
-  ];
-  const defaultPlatformOptions = [
-    {
-      label: '全平台',
-      value: 0
-    },
-    {
-      label: '移动平台',
-      value: 1
-    },
-    {
-      label: 'PC平台',
-      value: 2
-    }
-  ];
-  export default {
-    name: 'CouponDetail',
-    props: {
-      isEdit: {
-        type: Boolean,
-        default: false
-      }
-    },
-    data() {
-      return {
-        coupon: Object.assign({}, defaultCoupon),
-        typeOptions: Object.assign({}, defaultTypeOptions),
-        platformOptions: Object.assign({}, defaultPlatformOptions),
-        rules: {
-          name: [
-            {required: true, message: '请输入优惠券名称', trigger: 'blur'},
-            {min: 2, max: 140, message: '长度在 2 到 140 个字符', trigger: 'blur'}
-          ],
-          publishCount: [
-            {type: 'number',required: true, message: '只能输入正整数', trigger: 'blur'}
-          ],
-          amount: [
-            {type: 'number',required: true,message: '面值只能是数值,0.01-10000,限2位小数',trigger: 'blur'}
-          ],
-          minPoint: [
-            {type: 'number',required: true,message: '只能输入正整数',trigger: 'blur'}
-          ]
-        },
-        selectProduct:null,
-        selectProductLoading: false,
-        selectProductOptions:[],
-        selectProductCate: null,
-        productCateOptions: []
-      }
-    },
-    created(){
-      if(this.isEdit){
-        getCoupon(this.$route.query.id).then(response=>{
-          this.coupon=response.data;
-        });
-      }
-      this.getProductCateList();
-    },
-    methods:{
-      onSubmit(formName) {
-        this.$refs[formName].validate((valid) => {
-          if (valid) {
-            this.$confirm('是否提交数据', '提示', {
-              confirmButtonText: '确定',
-              cancelButtonText: '取消',
-              type: 'warning'
-            }).then(() => {
-              if(this.isEdit){
-                updateCoupon(this.$route.query.id,this.coupon).then(response=>{
-                  this.$refs[formName].resetFields();
-                  this.$message({
-                    message: '修改成功',
-                    type: 'success',
-                    duration:1000
-                  });
-                  this.$router.back();
-                });
-              }else{
-                createCoupon(this.coupon).then(response=>{
-                  this.$refs[formName].resetFields();
-                  this.$message({
-                    message: '提交成功',
-                    type: 'success',
-                    duration:1000
-                  });
-                  this.$router.back();
-                });
-              }
-            });
-          } else {
-            this.$message({
-              message: '验证失败',
-              type: 'error',
-              duration:1000
-            });
-            return false;
-          }
-        });
-      },
-      resetForm(formName) {
-        this.$refs[formName].resetFields();
-        this.coupon = Object.assign({},defaultCoupon);
-      },
-      searchProductMethod(query){
-        if (query !== '') {
-          this.loading = true;
-          fetchProductList({keyword:query}).then(response=>{
-            this.loading=false;
-            let productList = response.data;
-            this.selectProductOptions = [];
-            for(let i=0;i<productList.length;i++){
-              let item = productList[i];
-              this.selectProductOptions.push({productId:item.id,productName:item.name,productSn:item.productSn});
-            }
-          });
-        } else {
-          this.selectProductOptions = [];
-        }
-      },
-      handleAddProductRelation(){
-        if(this.selectProduct===null){
-          this.$message({
-            message: '请先选择商品',
-            type: 'warning'
-          });
-          return
-        }
-        this.coupon.productRelationList.push(this.getProductById(this.selectProduct));
-        this.selectProduct=null;
-      },
-      handleDeleteProductRelation(index,row){
-        this.coupon.productRelationList.splice(index,1);
-      },
-      handleAddProductCategoryRelation(){
-        if(this.selectProductCate===null||this.selectProductCate.length===0){
-          this.$message({
-            message: '请先选择商品分类',
-            type: 'warning'
-          });
-          return
-        }
-        this.coupon.productCategoryRelationList.push(this.getProductCateByIds(this.selectProductCate));
-        this.selectProductCate=[];
-      },
-      handleDeleteProductCateRelation(index,row){
-        this.coupon.productCategoryRelationList.splice(index,1);
-      },
-      getProductById(id){
-        for(let i=0;i<this.selectProductOptions.length;i++){
-          if(id===this.selectProductOptions[i].productId){
-            return this.selectProductOptions[i];
-          }
-        }
-        return null;
-      },
-      getProductCateList() {
-        fetchListWithChildren().then(response => {
-          let list = response.data;
-          this.productCateOptions = [];
-          for (let i = 0; i < list.length; i++) {
-            let children = [];
-            if (list[i].children != null && list[i].children.length > 0) {
-              for (let j = 0; j < list[i].children.length; j++) {
-                children.push({label: list[i].children[j].name, value: list[i].children[j].id});
-              }
-            }
-            this.productCateOptions.push({label: list[i].name, value: list[i].id, children: children});
-          }
-        });
-      },
-      getProductCateByIds(ids){
-        let name;
-        let parentName;
-        for (let i = 0; i < this.productCateOptions.length; i++) {
-          if (this.productCateOptions[i].value === ids[0]) {
-            parentName = this.productCateOptions[i].label;
-            for (let j = 0; j < this.productCateOptions[i].children.length; j++) {
-              if (this.productCateOptions[i].children[j].value === ids[1]) {
-                name = this.productCateOptions[i].children[j].label;
-              }
-            }
-          }
-        }
-        return {productCategoryId: ids[1], productCategoryName: name, parentCategoryName: parentName};
-      }
-    }
-  }
-</script>
-<style scoped>
-  .input-width {
-    width: 60%;
-  }
-</style>
-
-

+ 0 - 313
src/views/sms/coupon/history.vue

@@ -1,313 +0,0 @@
-<template> 
-  <div class="app-container">
-    <div class="table-layout">
-      <el-row>
-        <el-col :span="4" class="table-cell-title">名称</el-col>
-        <el-col :span="4" class="table-cell-title">优惠券类型</el-col>
-        <el-col :span="4" class="table-cell-title">可使用商品</el-col>
-        <el-col :span="4" class="table-cell-title">使用门槛</el-col>
-        <el-col :span="4" class="table-cell-title">面值</el-col>
-        <el-col :span="4" class="table-cell-title">状态</el-col>
-      </el-row>
-      <el-row>
-        <el-col :span="4" class="table-cell">{{coupon.name}}</el-col>
-        <el-col :span="4" class="table-cell">{{coupon.type | formatType}}</el-col>
-        <el-col :span="4" class="table-cell">{{coupon.useType | formatUseType}}</el-col>
-        <el-col :span="4" class="table-cell">满{{coupon.minPoint}}元可用</el-col>
-        <el-col :span="4" class="table-cell">{{coupon.amount}}元</el-col>
-        <el-col :span="4" class="table-cell">{{coupon.endTime | formatStatus}}</el-col>
-      </el-row>
-      <el-row>
-        <el-col :span="4" class="table-cell-title">有效期</el-col>
-        <el-col :span="4" class="table-cell-title">总发行量</el-col>
-        <el-col :span="4" class="table-cell-title">已领取</el-col>
-        <el-col :span="4" class="table-cell-title">待领取</el-col>
-        <el-col :span="4" class="table-cell-title">已使用</el-col>
-        <el-col :span="4" class="table-cell-title">未使用</el-col>
-      </el-row>
-      <el-row>
-        <el-col :span="4" class="table-cell" style="font-size: 13px">
-          {{coupon.startTime|formatDate}}至{{coupon.endTime|formatDate}}
-        </el-col>
-        <el-col :span="4" class="table-cell">{{coupon.publishCount}}</el-col>
-        <el-col :span="4" class="table-cell">{{coupon.receiveCount}}</el-col>
-        <el-col :span="4" class="table-cell">{{coupon.publishCount-coupon.receiveCount}}</el-col>
-        <el-col :span="4" class="table-cell">{{coupon.useCount}}</el-col>
-        <el-col :span="4" class="table-cell">{{coupon.publishCount-coupon.useCount}}</el-col>
-      </el-row>
-    </div>
-    <el-card class="filter-container" shadow="never">
-      <div>
-        <i class="el-icon-search"></i>
-        <span>筛选搜索</span>
-        <el-button
-          style="float:right"
-          type="primary"
-          @click="handleSearchList()"
-          size="small">
-          查询搜索
-        </el-button>
-        <el-button
-          style="float:right;margin-right: 15px"
-          @click="handleResetSearch()"
-          size="small">
-          重置
-        </el-button>
-      </div>
-      <div style="margin-top: 15px">
-        <el-form :inline="true" :model="listQuery" size="small" label-width="140px">
-          <el-form-item label="使用状态:">
-            <el-select v-model="listQuery.useStatus" placeholder="全部" clearable class="input-width">
-              <el-option v-for="item in useTypeOptions"
-                         :key="item.value"
-                         :label="item.label"
-                         :value="item.value">
-              </el-option>
-            </el-select>
-          </el-form-item>
-          <el-form-item label="订单编号:">
-            <el-input v-model="listQuery.orderSn" class="input-width" placeholder="订单编号"></el-input>
-          </el-form-item>
-        </el-form>
-      </div>
-    </el-card>
-    <div class="table-container">
-      <el-table ref="couponHistoryTable"
-                :data="list"
-                style="width: 100%;"
-                v-loading="listLoading" border>
-        <el-table-column label="优惠码" width="160" align="center">
-          <template slot-scope="scope">{{scope.row.couponCode}}</template>
-        </el-table-column>
-        <el-table-column label="领取会员" width="140" align="center">
-          <template slot-scope="scope">{{scope.row.memberNickname}}</template>
-        </el-table-column>
-        <el-table-column label="领取方式" width="100" align="center">
-          <template slot-scope="scope">{{scope.row.getType | formatGetType}}</template>
-        </el-table-column>
-        <el-table-column label="领取时间" width="160" align="center">
-          <template slot-scope="scope">{{scope.row.createTime | formatTime}}</template>
-        </el-table-column>
-        <el-table-column label="当前状态" width="140" align="center">
-          <template slot-scope="scope">{{scope.row.useStatus | formatCouponHistoryUseType}}</template>
-        </el-table-column>
-        <el-table-column label="使用时间" width="160" align="center">
-          <template slot-scope="scope">{{scope.row.useTime | formatTime}}</template>
-        </el-table-column>
-        <el-table-column label="订单编号" align="center">
-          <template slot-scope="scope">{{scope.row.orderSn===null?'N/A':scope.row.orderSn}}</template>
-        </el-table-column>
-      </el-table>
-    </div>
-    <div class="pagination-container">
-      <el-pagination
-        background
-        @size-change="handleSizeChange"
-        @current-change="handleCurrentChange"
-        layout="total, sizes,prev, pager, next,jumper"
-        :current-page.sync="listQuery.pageNum"
-        :page-size="listQuery.pageSize"
-        :page-sizes="[5,10,15]"
-        :total="total">
-      </el-pagination>
-    </div>
-  </div>
-</template>
-<script>
-  import {formatDate} from '@/utils/date';
-  import {getCoupon} from '@/api/coupon';
-  import {fetchList as fetchCouponHistoryList} from '@/api/couponHistory';
-
-  const defaultTypeOptions = [
-    {
-      label: '全场赠券',
-      value: 0
-    },
-    {
-      label: '会员赠券',
-      value: 1
-    },
-    {
-      label: '购物赠券',
-      value: 2
-    },
-    {
-      label: '注册赠券',
-      value: 3
-    }
-  ];
-  const defaultListQuery = {
-    pageNum: 1,
-    pageSize: 10,
-    useStatus: null,
-    orderSn: null,
-    couponId: null
-  };
-  const defaultUseTypeOptions= [
-    {
-      label: "未使用",
-      value: 0
-    },
-    {
-      label: "已使用",
-      value: 1
-    },
-    {
-      label: "已过期",
-      value: 2
-    }
-  ];
-  export default {
-    name: 'couponHistoryList',
-    data() {
-      return {
-        coupon: {},
-        listQuery: Object.assign({}, defaultListQuery),
-        useTypeOptions:Object.assign({},defaultUseTypeOptions),
-        list:null,
-        total:null,
-        listLoading:false
-      }
-    },
-    created() {
-      getCoupon(this.$route.query.id).then(response => {
-        this.coupon = response.data;
-      });
-      this.listQuery.couponId=this.$route.query.id;
-      this.getList();
-    },
-    filters: {
-      formatType(type) {
-        for (let i = 0; i < defaultTypeOptions.length; i++) {
-          if (type === defaultTypeOptions[i].value) {
-            return defaultTypeOptions[i].label;
-          }
-        }
-        return '';
-      },
-      formatUseType(useType) {
-        if (useType === 0) {
-          return '全场通用';
-        } else if (useType === 1) {
-          return '指定分类';
-        } else {
-          return '指定商品';
-        }
-      },
-      formatPlatform(platform) {
-        if (platform === 1) {
-          return '移动平台';
-        } else if (platform === 2) {
-          return 'PC平台';
-        } else {
-          return '全平台';
-        }
-      },
-      formatDate(time) {
-        if (time == null || time === '') {
-          return 'N/A';
-        }
-        let date = new Date(time);
-        return formatDate(date, 'yyyy-MM-dd')
-      },
-      formatStatus(endTime) {
-        let now = new Date().getTime();
-        if (endTime > now) {
-          return '未过期'
-        } else {
-          return '已过期';
-        }
-      },
-      formatGetType(type) {
-        if(type===1){
-          return '主动获取';
-        }else{
-          return '后台赠送';
-        }
-      },
-      formatCouponHistoryUseType(useType) {
-        if (useType === 0) {
-          return '未使用';
-        } else if (useType === 1) {
-          return '已使用';
-        } else {
-          return '已过期';
-        }
-      },
-      formatTime(time) {
-        if (time == null || time === '') {
-          return 'N/A';
-        }
-        let date = new Date(time);
-        return formatDate(date, 'yyyy-MM-dd hh:mm:ss')
-      },
-    },
-    methods: {
-      getList(){
-        this.listLoading=true;
-        fetchCouponHistoryList(this.listQuery).then(response=>{
-          this.listLoading=false;
-          this.list=response.data.list;
-          this.total=response.data.total;
-        });
-      },
-      handleResetSearch() {
-        this.listQuery = Object.assign({}, defaultListQuery);
-        this.listQuery.couponId=this.$route.query.id;
-      },
-      handleSearchList() {
-        this.listQuery.pageNum = 1;
-        this.getList();
-      },
-      handleSizeChange(val) {
-        this.listQuery.pageNum = 1;
-        this.listQuery.pageSize = val;
-        this.getList();
-      },
-      handleCurrentChange(val) {
-        this.listQuery.pageNum = val;
-        this.getList();
-      }
-    }
-  }
-</script>
-<style scoped>
-  .app-container {
-    width: 80%;
-    margin: 20px auto;
-  }
-
-  .filter-container {
-    margin-top: 20px;
-  }
-
-  .table-layout {
-    margin-top: 20px;
-    border-left: 1px solid #DCDFE6;
-    border-top: 1px solid #DCDFE6;
-  }
-
-  .table-cell {
-    height: 60px;
-    line-height: 40px;
-    border-right: 1px solid #DCDFE6;
-    border-bottom: 1px solid #DCDFE6;
-    padding: 10px;
-    font-size: 14px;
-    color: #606266;
-    text-align: center;
-    overflow: hidden;
-  }
-
-  .table-cell-title {
-    border-right: 1px solid #DCDFE6;
-    border-bottom: 1px solid #DCDFE6;
-    padding: 10px;
-    background: #F2F6FC;
-    text-align: center;
-    font-size: 14px;
-    color: #303133;
-  }
-</style>
-
-

+ 0 - 254
src/views/sms/coupon/index.vue

@@ -1,254 +0,0 @@
-<template> 
-  <div class="app-container">
-    <el-card class="filter-container" shadow="never">
-      <div>
-        <i class="el-icon-search"></i>
-        <span>筛选搜索</span>
-        <el-button
-          style="float:right"
-          type="primary"
-          @click="handleSearchList()"
-          size="small">
-          查询搜索
-        </el-button>
-        <el-button
-          style="float:right;margin-right: 15px"
-          @click="handleResetSearch()"
-          size="small">
-          重置
-        </el-button>
-      </div>
-      <div style="margin-top: 15px">
-        <el-form :inline="true" :model="listQuery" size="small" label-width="140px">
-          <el-form-item label="优惠券名称:">
-            <el-input v-model="listQuery.name" class="input-width" placeholder="优惠券名称"></el-input>
-          </el-form-item>
-          <el-form-item label="优惠券类型:">
-            <el-select v-model="listQuery.type" placeholder="全部" clearable class="input-width">
-              <el-option v-for="item in typeOptions"
-                         :key="item.value"
-                         :label="item.label"
-                         :value="item.value">
-              </el-option>
-            </el-select>
-          </el-form-item>
-        </el-form>
-      </div>
-    </el-card>
-    <el-card class="operate-container" shadow="never">
-      <i class="el-icon-tickets"></i>
-      <span>数据列表</span>
-      <el-button size="mini" class="btn-add" @click="handleAdd()">添加</el-button>
-    </el-card>
-    <div class="table-container">
-      <el-table ref="couponTable"
-                :data="list"
-                style="width: 100%;"
-                @selection-change="handleSelectionChange"
-                v-loading="listLoading" border>
-        <el-table-column type="selection" width="60" align="center"></el-table-column>
-        <el-table-column label="编号" width="100" align="center">
-          <template slot-scope="scope">{{scope.row.id}}</template>
-        </el-table-column>
-        <el-table-column label="优惠劵名称" align="center">
-          <template slot-scope="scope">{{scope.row.name}}</template>
-        </el-table-column>
-        <el-table-column label="优惠券类型" width="100" align="center">
-          <template slot-scope="scope">{{scope.row.type | formatType}}</template>
-        </el-table-column>
-        <el-table-column label="可使用商品" width="100" align="center">
-          <template slot-scope="scope">{{scope.row.useType | formatUseType}}</template>
-        </el-table-column>
-        <el-table-column label="使用门槛" width="140" align="center">
-          <template slot-scope="scope">满{{scope.row.minPoint}}元可用</template>
-        </el-table-column>
-        <el-table-column label="面值" width="100" align="center">
-          <template slot-scope="scope">{{scope.row.amount}}元</template>
-        </el-table-column>
-        <el-table-column label="适用平台" width="100" align="center">
-          <template slot-scope="scope">{{scope.row.platform | formatPlatform}}</template>
-        </el-table-column>
-        <el-table-column label="有效期" width="180" align="center">
-          <template slot-scope="scope">{{scope.row.startTime|formatDate}}至{{scope.row.endTime|formatDate}}</template>
-        </el-table-column>
-        <el-table-column label="状态" width="100" align="center">
-          <template slot-scope="scope">{{scope.row.endTime | formatStatus}}</template>
-        </el-table-column>
-        <el-table-column label="操作" width="180" align="center">
-          <template slot-scope="scope">
-            <el-button size="mini"
-                       type="text"
-                       @click="handleView(scope.$index, scope.row)">查看</el-button>
-            <el-button size="mini"
-                       type="text"
-                       @click="handleUpdate(scope.$index, scope.row)">
-              编辑</el-button>
-            <el-button size="mini"
-                       type="text"
-                       @click="handleDelete(scope.$index, scope.row)">删除</el-button>
-          </template>
-        </el-table-column>
-      </el-table>
-    </div>
-    <div class="pagination-container">
-      <el-pagination
-        background
-        @size-change="handleSizeChange"
-        @current-change="handleCurrentChange"
-        layout="total, sizes,prev, pager, next,jumper"
-        :current-page.sync="listQuery.pageNum"
-        :page-size="listQuery.pageSize"
-        :page-sizes="[5,10,15]"
-        :total="total">
-      </el-pagination>
-    </div>
-  </div>
-</template>
-<script>
-  import {fetchList,deleteCoupon} from '@/api/coupon';
-  import {formatDate} from '@/utils/date';
-  const defaultListQuery = {
-    pageNum: 1,
-    pageSize: 10,
-    name: null,
-    type: null
-  };
-  const defaultTypeOptions=[
-    {
-      label: '全场赠券',
-      value: 0
-    },
-    {
-      label: '会员赠券',
-      value: 1
-    },
-    {
-      label: '购物赠券',
-      value: 2
-    },
-    {
-      label: '注册赠券',
-      value: 3
-    }
-  ];
-  export default {
-    name:'couponList',
-    data() {
-      return {
-        listQuery:Object.assign({},defaultListQuery),
-        typeOptions:Object.assign({},defaultTypeOptions),
-        list:null,
-        total:null,
-        listLoading:false,
-        multipleSelection:[]
-      }
-    },
-    created(){
-      this.getList();
-    },
-    filters:{
-      formatType(type){
-        for(let i=0;i<defaultTypeOptions.length;i++){
-          if(type===defaultTypeOptions[i].value){
-            return defaultTypeOptions[i].label;
-          }
-        }
-        return '';
-      },
-      formatUseType(useType){
-        if(useType===0){
-          return '全场通用';
-        }else if(useType===1){
-          return '指定分类';
-        }else{
-          return '指定商品';
-        }
-      },
-      formatPlatform(platform){
-        if(platform===1){
-          return '移动平台';
-        }else if(platform===2){
-          return 'PC平台';
-        }else{
-          return '全平台';
-        }
-      },
-      formatDate(time){
-        if(time==null||time===''){
-          return 'N/A';
-        }
-        let date = new Date(time);
-        return formatDate(date, 'yyyy-MM-dd')
-      },
-      formatStatus(endTime){
-        let now = new Date().getTime();
-        let endDate = new Date(endTime);
-        if(endDate>now){
-          return '未过期'
-        }else{
-          return '已过期';
-        }
-      }
-    },
-    methods:{
-      handleResetSearch() {
-        this.listQuery = Object.assign({}, defaultListQuery);
-      },
-      handleSearchList() {
-        this.listQuery.pageNum = 1;
-        this.getList();
-      },
-      handleSelectionChange(val){
-        this.multipleSelection = val;
-      },
-      handleSizeChange(val) {
-        this.listQuery.pageNum = 1;
-        this.listQuery.pageSize = val;
-        this.getList();
-      },
-      handleCurrentChange(val) {
-        this.listQuery.pageNum = val;
-        this.getList();
-      },
-      handleAdd(){
-        this.$router.push({path: '/sms/addCoupon'})
-      },
-      handleView(index, row) {
-        this.$router.push({path: '/sms/couponHistory', query: {id: row.id}})
-      },
-      handleUpdate(index, row) {
-        this.$router.push({path: '/sms/updateCoupon', query: {id: row.id}})
-      },
-      handleDelete(index, row) {
-        this.$confirm('是否进行删除操作?', '提示', {
-          confirmButtonText: '确定',
-          cancelButtonText: '取消',
-          type: 'warning'
-        }).then(() => {
-          deleteCoupon(row.id).then(response=>{
-            this.$message({
-              type: 'success',
-              message: '删除成功!'
-            });
-            this.getList();
-          });
-        })
-      },
-      getList(){
-        this.listLoading=true;
-        fetchList(this.listQuery).then(response=>{
-          this.listLoading = false;
-          this.list = response.data.list;
-          this.total = response.data.total;
-        });
-      }
-    }
-  }
-</script>
-<style scoped>
-  .input-width {
-    width: 203px;
-  }
-</style>
-
-

+ 0 - 14
src/views/sms/coupon/update.vue

@@ -1,14 +0,0 @@
-<template> 
-  <coupon-detail :isEdit="true"></coupon-detail>
-</template>
-<script>
-  import CouponDetail from './components/CouponDetail'
-  export default {
-    name: 'updateCoupon',
-    components: { CouponDetail }
-  }
-</script>
-<style scoped>
-</style>
-
-

+ 0 - 296
src/views/sms/flash/index.vue

@@ -1,296 +0,0 @@
-<template> 
-  <div class="app-container">
-    <el-card class="filter-container" shadow="never">
-      <div>
-        <i class="el-icon-search"></i>
-        <span>筛选搜索</span>
-        <el-button
-          style="float:right"
-          type="primary"
-          @click="handleSearchList()"
-          size="small">
-          查询搜索
-        </el-button>
-        <el-button
-          style="float:right;margin-right: 15px"
-          @click="handleResetSearch()"
-          size="small">
-          重置
-        </el-button>
-      </div>
-      <div style="margin-top: 15px">
-        <el-form :inline="true" :model="listQuery" size="small" label-width="140px">
-          <el-form-item label="活动名称:">
-            <el-input v-model="listQuery.keyword" class="input-width" placeholder="活动名称" clearable></el-input>
-          </el-form-item>
-        </el-form>
-      </div>
-    </el-card>
-    <el-card class="operate-container" shadow="never">
-      <i class="el-icon-tickets"></i>
-      <span>数据列表</span>
-      <el-button size="mini" class="btn-add" @click="handleAdd()" style="margin-left: 20px">添加活动</el-button>
-      <el-button size="mini" class="btn-add" @click="handleShowSessionList()">秒杀时间段列表</el-button>
-    </el-card>
-    <div class="table-container">
-      <el-table ref="flashTable"
-                :data="list"
-                style="width: 100%;"
-                v-loading="listLoading" border>
-        <el-table-column type="selection" width="60" align="center"></el-table-column>
-        <el-table-column label="编号" width="100" align="center">
-          <template slot-scope="scope">{{scope.row.id}}</template>
-        </el-table-column>
-        <el-table-column label="活动标题" align="center">
-          <template slot-scope="scope">{{scope.row.title}}</template>
-        </el-table-column>
-        <el-table-column label="活动状态" width="140" align="center">
-          <template slot-scope="scope">{{scope.row |formatActiveStatus}}</template>
-        </el-table-column>
-        <el-table-column label="开始时间" width="140" align="center">
-          <template slot-scope="scope">{{scope.row.startDate | formatDate}}</template>
-        </el-table-column>
-        <el-table-column label="结束时间" width="140" align="center">
-          <template slot-scope="scope">{{scope.row.endDate | formatDate}}</template>
-        </el-table-column>
-        <el-table-column label="上线/下线" width="200" align="center">
-          <template slot-scope="scope">
-            <el-switch
-              @change="handleStatusChange(scope.$index, scope.row)"
-              :active-value="1"
-              :inactive-value="0"
-              v-model="scope.row.status">
-            </el-switch>
-          </template>
-        </el-table-column>
-        <el-table-column label="操作" width="180" align="center">
-          <template slot-scope="scope">
-            <el-button size="mini"
-                       type="text"
-                       @click="handleSelectSession(scope.$index, scope.row)">设置商品
-            </el-button>
-            <el-button size="mini"
-                       type="text"
-                       @click="handleUpdate(scope.$index, scope.row)">
-              编辑
-            </el-button>
-            <el-button size="mini"
-                       type="text"
-                       @click="handleDelete(scope.$index, scope.row)">删除
-            </el-button>
-          </template>
-        </el-table-column>
-      </el-table>
-    </div>
-    <div class="pagination-container">
-      <el-pagination
-        background
-        @size-change="handleSizeChange"
-        @current-change="handleCurrentChange"
-        layout="total, sizes,prev, pager, next,jumper"
-        :current-page.sync="listQuery.pageNum"
-        :page-size="listQuery.pageSize"
-        :page-sizes="[5,10,15]"
-        :total="total">
-      </el-pagination>
-    </div>
-    <el-dialog
-      title="添加活动"
-      :visible.sync="dialogVisible"
-      width="40%">
-      <el-form :model="flashPromotion"
-               ref="flashPromotionForm"
-               label-width="150px" size="small">
-        <el-form-item label="活动标题:">
-          <el-input v-model="flashPromotion.title" style="width: 250px"></el-input>
-        </el-form-item>
-        <el-form-item label="开始时间:">
-          <el-date-picker
-            v-model="flashPromotion.startDate"
-            type="date"
-            placeholder="请选择时间">
-          </el-date-picker>
-        </el-form-item>
-        <el-form-item label="结束时间:">
-          <el-date-picker
-            v-model="flashPromotion.endDate"
-            type="date"
-            placeholder="请选择时间">
-          </el-date-picker>
-        </el-form-item>
-        <el-form-item label="上线/下线">
-          <el-radio-group v-model="flashPromotion.status">
-            <el-radio :label="1">上线</el-radio>
-            <el-radio :label="0">下线</el-radio>
-          </el-radio-group>
-        </el-form-item>
-      </el-form>
-      <span slot="footer" class="dialog-footer">
-        <el-button @click="dialogVisible = false" size="small">取 消</el-button>
-        <el-button type="primary" @click="handleDialogConfirm()" size="small">确 定</el-button>
-      </span>
-    </el-dialog>
-  </div>
-</template>
-<script>
-  import {fetchList, updateStatus, deleteFlash, createFlash, updateFlash} from '@/api/flash';
-  import {formatDate} from '@/utils/date';
-
-  const defaultListQuery = {
-    pageNum: 1,
-    pageSize: 5,
-    keyword: null
-  };
-  const defaultFlashPromotion = {
-    id: null,
-    title: null,
-    startDate: null,
-    endDate: null,
-    status: 0
-  };
-  export default {
-    name: 'flashPromotionList',
-    data() {
-      return {
-        listQuery: Object.assign({}, defaultListQuery),
-        list: null,
-        total: null,
-        listLoading: false,
-        dialogVisible: false,
-        flashPromotion: Object.assign({}, defaultFlashPromotion),
-        isEdit: false
-      }
-    },
-    created() {
-      this.getList();
-    },
-    filters: {
-      formatActiveStatus(row) {
-        let nowDate = new Date();
-        let startDate = new Date(row.startDate);
-        let endDate = new Date(row.endDate);
-        if (nowDate.getTime() >= startDate.getTime() && nowDate.getTime() <= endDate.getTime()) {
-          return '活动进行中';
-        } else if (nowDate.getTime() > endDate.getTime()) {
-          return '活动已结束';
-        } else {
-          return '活动未开始';
-        }
-      },
-      formatDate(time) {
-        if (time == null || time === '') {
-          return 'N/A';
-        }
-        let date = new Date(time);
-        return formatDate(date, 'yyyy-MM-dd')
-      }
-    },
-    methods: {
-      handleResetSearch() {
-        this.listQuery = Object.assign({}, defaultListQuery);
-      },
-      handleSearchList() {
-        this.listQuery.pageNum = 1;
-        this.getList();
-      },
-      handleSizeChange(val) {
-        this.listQuery.pageNum = 1;
-        this.listQuery.pageSize = val;
-        this.getList();
-      },
-      handleCurrentChange(val) {
-        this.listQuery.pageNum = val;
-        this.getList();
-      },
-      handleAdd() {
-        this.dialogVisible = true;
-        this.isEdit = false;
-        this.flashPromotion = Object.assign({},defaultFlashPromotion);
-      },
-      handleShowSessionList() {
-        this.$router.push({path: '/sms/flashSession'})
-      },
-      handleStatusChange(index, row) {
-        this.$confirm('是否要修改该状态?', '提示', {
-          confirmButtonText: '确定',
-          cancelButtonText: '取消',
-          type: 'warning'
-        }).then(() => {
-          updateStatus(row.id, {status: row.status}).then(response => {
-            this.$message({
-              type: 'success',
-              message: '修改成功!'
-            });
-          });
-        }).catch(() => {
-          this.$message({
-            type: 'info',
-            message: '取消修改'
-          });
-          this.getList();
-        });
-      },
-      handleDelete(index, row) {
-        this.$confirm('是否要删除该活动?', '提示', {
-          confirmButtonText: '确定',
-          cancelButtonText: '取消',
-          type: 'warning'
-        }).then(() => {
-          deleteFlash(row.id).then(response => {
-            this.$message({
-              type: 'success',
-              message: '删除成功!'
-            });
-            this.getList();
-          });
-        });
-      },
-      handleUpdate(index, row) {
-        this.dialogVisible = true;
-        this.isEdit = true;
-        this.flashPromotion = Object.assign({},row);
-      },
-      handleDialogConfirm() {
-        this.$confirm('是否要确认?', '提示', {
-          confirmButtonText: '确定',
-          cancelButtonText: '取消',
-          type: 'warning'
-        }).then(() => {
-          if (this.isEdit) {
-            updateFlash(this.flashPromotion.id,this.flashPromotion).then(response => {
-              this.$message({
-                message: '修改成功!',
-                type: 'success'
-              });
-              this.dialogVisible =false;
-              this.getList();
-            })
-          } else {
-            createFlash(this.flashPromotion).then(response => {
-              this.$message({
-                message: '添加成功!',
-                type: 'success'
-              });
-              this.dialogVisible =false;
-              this.getList();
-            })
-          }
-        })
-      },
-      handleSelectSession(index,row){
-        this.$router.push({path:'/sms/selectSession',query:{flashPromotionId:row.id}})
-      },
-      getList() {
-        this.listLoading = true;
-        fetchList(this.listQuery).then(response => {
-          this.listLoading = false;
-          this.list = response.data.list;
-          this.total = response.data.total;
-        });
-      }
-    }
-  }
-</script>
-<style></style>
-
-

+ 0 - 311
src/views/sms/flash/productRelationList.vue

@@ -1,311 +0,0 @@
-<template> 
-  <div class="app-container">
-    <el-card class="operate-container" shadow="never">
-      <i class="el-icon-tickets"></i>
-      <span>数据列表</span>
-      <el-button size="mini" class="btn-add" @click="handleSelectProduct()" style="margin-left: 20px">添加</el-button>
-    </el-card>
-    <div class="table-container">
-      <el-table ref="productRelationTable"
-                :data="list"
-                style="width: 100%;"
-                v-loading="listLoading" border>
-        <el-table-column label="编号" width="100" align="center">
-          <template slot-scope="scope">{{scope.row.id}}</template>
-        </el-table-column>
-        <el-table-column label="商品名称" align="center">
-          <template slot-scope="scope">{{scope.row.product.name}}</template>
-        </el-table-column>
-        <el-table-column label="货号" width="140" align="center">
-          <template slot-scope="scope">NO.{{scope.row.product.productSn}}</template>
-        </el-table-column>
-        <el-table-column label="商品价格" width="100" align="center">
-          <template slot-scope="scope">¥{{scope.row.product.price}}</template>
-        </el-table-column>
-        <el-table-column label="剩余数量" width="100" align="center">
-          <template slot-scope="scope">{{scope.row.product.stock}}</template>
-        </el-table-column>
-        <el-table-column label="秒杀价格" width="100" align="center">
-          <template slot-scope="scope">
-            <p v-if="scope.row.flashPromotionPrice!==null">
-              ¥{{scope.row.flashPromotionPrice}}
-            </p>
-          </template>
-        </el-table-column>
-        <el-table-column label="秒杀数量" width="100" align="center">
-          <template slot-scope="scope">{{scope.row.flashPromotionCount}}</template>
-        </el-table-column>
-        <el-table-column label="限购数量" width="100" align="center">
-          <template slot-scope="scope">{{scope.row.flashPromotionLimit}}</template>
-        </el-table-column>
-        <el-table-column label="排序" width="100" align="center">
-          <template slot-scope="scope">{{scope.row.sort}}</template>
-        </el-table-column>
-        <el-table-column label="操作" width="100" align="center">
-          <template slot-scope="scope">
-            <el-button size="mini"
-                       type="text"
-                       @click="handleUpdate(scope.$index, scope.row)">编辑
-            </el-button>
-            <el-button size="mini"
-                       type="text"
-                       @click="handleDelete(scope.$index, scope.row)">删除
-            </el-button>
-          </template>
-        </el-table-column>
-      </el-table>
-    </div>
-    <div class="pagination-container">
-      <el-pagination
-        background
-        @size-change="handleSizeChange"
-        @current-change="handleCurrentChange"
-        layout="total, sizes,prev, pager, next,jumper"
-        :current-page.sync="listQuery.pageNum"
-        :page-size="listQuery.pageSize"
-        :page-sizes="[5,10,15]"
-        :total="total">
-      </el-pagination>
-    </div>
-    <el-dialog title="选择商品" :visible.sync="selectDialogVisible" width="50%">
-      <el-input v-model="dialogData.listQuery.keyword"
-                style="width: 250px;margin-bottom: 20px"
-                size="small"
-                placeholder="商品名称搜索">
-        <el-button slot="append" icon="el-icon-search" @click="handleSelectSearch()"></el-button>
-      </el-input>
-      <el-table :data="dialogData.list"
-                @selection-change="handleDialogSelectionChange" border>
-        <el-table-column type="selection" width="60" align="center"></el-table-column>
-        <el-table-column label="商品名称" align="center">
-          <template slot-scope="scope">{{scope.row.name}}</template>
-        </el-table-column>
-        <el-table-column label="货号" width="160" align="center">
-          <template slot-scope="scope">NO.{{scope.row.productSn}}</template>
-        </el-table-column>
-        <el-table-column label="价格" width="120" align="center">
-          <template slot-scope="scope">¥{{scope.row.price}}</template>
-        </el-table-column>
-      </el-table>
-      <div class="pagination-container">
-        <el-pagination
-          background
-          @size-change="handleDialogSizeChange"
-          @current-change="handleDialogCurrentChange"
-          layout="prev, pager, next"
-          :current-page.sync="dialogData.listQuery.pageNum"
-          :page-size="dialogData.listQuery.pageSize"
-          :page-sizes="[5,10,15]"
-          :total="dialogData.total">
-        </el-pagination>
-      </div>
-      <div style="clear: both;"></div>
-      <div slot="footer">
-        <el-button  size="small" @click="selectDialogVisible = false">取 消</el-button>
-        <el-button  size="small" type="primary" @click="handleSelectDialogConfirm()">确 定</el-button>
-      </div>
-    </el-dialog>
-    <el-dialog title="编辑秒杀商品信息"
-      :visible.sync="editDialogVisible"
-      width="40%">
-      <el-form :model="flashProductRelation"
-               ref="flashProductRelationForm"
-               label-width="150px" size="small">
-        <el-form-item label="商品名称:">
-          <span>{{flashProductRelation.product.name}}</span>
-        </el-form-item>
-        <el-form-item label="货号:">
-          <span>NO.{{flashProductRelation.product.productSn}}</span>
-        </el-form-item>
-        <el-form-item label="商品价格:">
-          <span>¥{{flashProductRelation.product.price}}</span>
-        </el-form-item>
-        <el-form-item label="秒杀价格:">
-          <el-input v-model="flashProductRelation.flashPromotionPrice" class="input-width">
-            <template slot="prepend">¥</template>
-          </el-input>
-        </el-form-item>
-        <el-form-item label="剩余数量:">
-          <span>{{flashProductRelation.product.stock}}</span>
-        </el-form-item>
-        <el-form-item label="秒杀数量:">
-          <el-input v-model="flashProductRelation.flashPromotionCount" class="input-width"></el-input>
-        </el-form-item>
-        <el-form-item label="限购数量:">
-          <el-input v-model="flashProductRelation.flashPromotionLimit" class="input-width"></el-input>
-        </el-form-item>
-        <el-form-item label="排序:">
-          <el-input v-model="flashProductRelation.sort" class="input-width"></el-input>
-        </el-form-item>
-      </el-form>
-      <span slot="footer" class="dialog-footer">
-        <el-button @click="editDialogVisible = false" size="small">取 消</el-button>
-        <el-button type="primary" @click="handleEditDialogConfirm()" size="small">确 定</el-button>
-      </span>
-    </el-dialog>
-  </div>
-</template>
-<script>
-  import {fetchList,createFlashProductRelation,deleteFlashProductRelation,updateFlashProductRelation} from '@/api/flashProductRelation';
-  import {fetchList as fetchProductList} from '@/api/product';
-  const defaultListQuery = {
-    pageNum: 1,
-    pageSize: 5,
-    flashPromotionId: null,
-    flashPromotionSessionId: null
-  };
-  export default {
-    name:'flashPromotionProductRelationList',
-    data() {
-      return {
-        listQuery: Object.assign({}, defaultListQuery),
-        list: null,
-        total: null,
-        listLoading: false,
-        dialogVisible: false,
-        selectDialogVisible:false,
-        dialogData:{
-          list: null,
-          total: null,
-          multipleSelection:[],
-          listQuery:{
-            keyword: null,
-            pageNum: 1,
-            pageSize: 5
-          }
-        },
-        editDialogVisible:false,
-        flashProductRelation:{
-          product:{}
-        }
-      }
-    },
-    created(){
-      this.listQuery.flashPromotionId=this.$route.query.flashPromotionId;
-      this.listQuery.flashPromotionSessionId=this.$route.query.flashPromotionSessionId;
-      this.getList();
-    },
-    methods:{
-      handleSizeChange(val) {
-        this.listQuery.pageNum = 1;
-        this.listQuery.pageSize = val;
-        this.getList();
-      },
-      handleCurrentChange(val) {
-        this.listQuery.pageNum = val;
-        this.getList();
-      },
-      handleSelectProduct(){
-        this.selectDialogVisible=true;
-        this.getDialogList();
-      },
-      handleUpdate(index,row){
-        this.editDialogVisible = true;
-        this.flashProductRelation = Object.assign({},row);
-      },
-      handleDelete(index,row){
-        this.$confirm('是否要删除该商品?', '提示', {
-          confirmButtonText: '确定',
-          cancelButtonText: '取消',
-          type: 'warning'
-        }).then(() => {
-          deleteFlashProductRelation(row.id).then(response => {
-            this.$message({
-              type: 'success',
-              message: '删除成功!'
-            });
-            this.getList();
-          });
-        });
-      },
-      handleSelectSearch(){
-        this.getDialogList();
-      },
-      handleDialogSizeChange(val) {
-        this.dialogData.listQuery.pageNum = 1;
-        this.dialogData.listQuery.pageSize = val;
-        this.getDialogList();
-      },
-      handleDialogCurrentChange(val) {
-        this.dialogData.listQuery.pageNum = val;
-        this.getDialogList();
-      },
-      handleDialogSelectionChange(val){
-        this.dialogData.multipleSelection = val;
-      },
-      handleSelectDialogConfirm(){
-        if (this.dialogData.multipleSelection < 1) {
-          this.$message({
-            message: '请选择一条记录',
-            type: 'warning',
-            duration: 1000
-          });
-          return;
-        }
-        let selectProducts = [];
-        for (let i = 0; i < this.dialogData.multipleSelection.length; i++) {
-          selectProducts.push({
-            productId:this.dialogData.multipleSelection[i].id,
-            flashPromotionId:this.listQuery.flashPromotionId,
-            flashPromotionSessionId:this.listQuery.flashPromotionSessionId
-          });
-        }
-        this.$confirm('使用要进行添加操作?', '提示', {
-          confirmButtonText: '确定',
-          cancelButtonText: '取消',
-          type: 'warning'
-        }).then(() => {
-          createFlashProductRelation(selectProducts).then(response=>{
-            this.selectDialogVisible=false;
-            this.dialogData.multipleSelection=[];
-            this.getList();
-            this.$message({
-              type: 'success',
-              message: '添加成功!'
-            });
-          });
-        });
-      },
-      handleEditDialogConfirm(){
-        this.$confirm('是否要确认?', '提示', {
-          confirmButtonText: '确定',
-          cancelButtonText: '取消',
-          type: 'warning'
-        }).then(() => {
-            updateFlashProductRelation(this.flashProductRelation.id,this.flashProductRelation).then(response => {
-              this.$message({
-                message: '修改成功!',
-                type: 'success'
-              });
-              this.editDialogVisible =false;
-              this.getList();
-            })
-        })
-      },
-      getList() {
-        this.listLoading = true;
-        fetchList(this.listQuery).then(response => {
-          this.listLoading = false;
-          this.list = response.data.list;
-          this.total = response.data.total;
-        });
-      },
-      getDialogList(){
-        fetchProductList(this.dialogData.listQuery).then(response=>{
-          this.dialogData.list=response.data.list;
-          this.dialogData.total=response.data.total;
-        })
-      }
-    }
-  }
-</script>
-<style scoped>
-  .operate-container{
-    margin-top: 0;
-  }
-  .input-width{
-    width: 200px;
-  }
-</style>
-
-

+ 0 - 83
src/views/sms/flash/selectSessionList.vue

@@ -1,83 +0,0 @@
-<template> 
-  <div class="app-container">
-    <el-card shadow="never" class="operate-container">
-      <i class="el-icon-tickets"></i>
-      <span>数据列表</span>
-    </el-card>
-    <div class="table-container">
-      <el-table ref="selectSessionTable"
-                :data="list"
-                style="width: 100%;"
-                v-loading="listLoading" border>
-        <el-table-column label="编号" width="100" align="center">
-          <template slot-scope="scope">{{scope.row.id}}</template>
-        </el-table-column>
-        <el-table-column label="秒杀时间段名称" align="center">
-          <template slot-scope="scope">{{scope.row.name}}</template>
-        </el-table-column>
-        <el-table-column label="每日开始时间" align="center">
-          <template slot-scope="scope">{{scope.row.startTime | formatTime}}</template>
-        </el-table-column>
-        <el-table-column label="每日结束时间" align="center">
-          <template slot-scope="scope">{{scope.row.endTime | formatTime}}</template>
-        </el-table-column>
-        <el-table-column label="商品数量" align="center">
-          <template slot-scope="scope">{{scope.row.productCount}}</template>
-        </el-table-column>
-        <el-table-column label="操作" align="center">
-          <template slot-scope="scope">
-            <el-button size="mini"
-                       type="text"
-                       @click="handleShowRelation(scope.$index, scope.row)">商品列表
-            </el-button>
-          </template>
-        </el-table-column>
-      </el-table>
-    </div>
-  </div>
-</template>
-<script>
-  import {fetchSelectList} from '@/api/flashSession';
-  import {formatDate} from '@/utils/date';
-  export default {
-    name: 'selectSessionList',
-    data() {
-      return {
-        list: null,
-        listLoading: false
-      }
-    },
-    created() {
-      this.getList();
-    },
-    filters:{
-      formatTime(time) {
-        if (time == null || time === '') {
-          return 'N/A';
-        }
-        let date = new Date(time);
-        return formatDate(date, 'hh:mm:ss')
-      }
-    },
-    methods: {
-      handleShowRelation(index,row){
-        this.$router.push({path:'/sms/flashProductRelation',query:{
-          flashPromotionId:this.$route.query.flashPromotionId, flashPromotionSessionId:row.id}})
-      },
-      getList() {
-        this.listLoading = true;
-        fetchSelectList({flashPromotionId:this.$route.query.flashPromotionId}).then(response => {
-          this.listLoading = false;
-          this.list = response.data;
-        });
-      }
-    }
-  }
-</script>
-<style scoped>
-  .operate-container {
-    margin-top: 0;
-  }
-</style>
-
-

+ 0 - 208
src/views/sms/flash/sessionList.vue

@@ -1,208 +0,0 @@
-<template> 
-  <div class="app-container">
-    <el-card shadow="never" class="operate-container">
-      <i class="el-icon-tickets"></i>
-      <span>数据列表</span>
-      <el-button size="mini" class="btn-add" @click="handleAdd()">添加</el-button>
-    </el-card>
-    <div class="table-container">
-      <el-table ref="flashSessionTable"
-                :data="list"
-                style="width: 100%;"
-                v-loading="listLoading" border>
-        <el-table-column label="编号" width="100" align="center">
-          <template slot-scope="scope">{{scope.row.id}}</template>
-        </el-table-column>
-        <el-table-column label="秒杀时间段名称" align="center">
-          <template slot-scope="scope">{{scope.row.name}}</template>
-        </el-table-column>
-        <el-table-column label="每日开始时间" align="center">
-          <template slot-scope="scope">{{scope.row.startTime | formatTime}}</template>
-        </el-table-column>
-        <el-table-column label="每日结束时间" align="center">
-          <template slot-scope="scope">{{scope.row.endTime | formatTime}}</template>
-        </el-table-column>
-        <el-table-column label="启用" align="center">
-          <template slot-scope="scope">
-            <el-switch
-              @change="handleStatusChange(scope.$index, scope.row)"
-              :active-value="1"
-              :inactive-value="0"
-              v-model="scope.row.status">
-            </el-switch>
-          </template>
-        </el-table-column>
-        <el-table-column label="操作" width="180" align="center">
-          <template slot-scope="scope">
-            <el-button size="mini"
-                       type="text"
-                       @click="handleUpdate(scope.$index, scope.row)">编辑
-            </el-button>
-            <el-button size="mini"
-                       type="text"
-                       @click="handleDelete(scope.$index, scope.row)">删除
-            </el-button>
-          </template>
-        </el-table-column>
-      </el-table>
-    </div>
-    <el-dialog
-      title="添加时间段"
-      :visible.sync="dialogVisible"
-      width="40%">
-      <el-form :model="flashSession"
-               ref="flashSessionForm"
-               label-width="150px" size="small">
-        <el-form-item label="秒杀时间段名称:">
-          <el-input v-model="flashSession.name" style="width: 250px"></el-input>
-        </el-form-item>
-        <el-form-item label="每日开始时间:">
-          <el-time-picker
-            v-model="flashSession.startTime"
-            placeholder="请选择时间">
-          </el-time-picker>
-        </el-form-item>
-        <el-form-item label="每日结束时间:">
-          <el-time-picker
-            v-model="flashSession.endTime"
-            placeholder="请选择时间">
-          </el-time-picker>
-        </el-form-item>
-        <el-form-item label="是否启用">
-          <el-radio-group v-model="flashSession.status">
-            <el-radio :label="1">启用</el-radio>
-            <el-radio :label="0">不启用</el-radio>
-          </el-radio-group>
-        </el-form-item>
-      </el-form>
-      <span slot="footer" class="dialog-footer">
-        <el-button @click="dialogVisible = false" size="small">取 消</el-button>
-        <el-button type="primary" @click="handleDialogConfirm()" size="small">确 定</el-button>
-      </span>
-    </el-dialog>
-  </div>
-</template>
-<script>
-  import {fetchList,updateStatus,deleteSession,createSession,updateSession} from '@/api/flashSession';
-  import {formatDate} from '@/utils/date';
-  const defaultFlashSession={
-    name:null,
-    startTime:null,
-    endTime:null,
-    status:0
-  };
-  export default {
-    name: 'flashPromotionSessionList',
-    data() {
-      return {
-        list: null,
-        listLoading: false,
-        dialogVisible:false,
-        isEdit:false,
-        flashSession:Object.assign({},defaultFlashSession)
-      }
-    },
-    created() {
-      this.getList();
-    },
-    filters:{
-      formatTime(time) {
-        if (time == null || time === '') {
-          return 'N/A';
-        }
-        let date = new Date(time);
-        return formatDate(date, 'hh:mm:ss')
-      }
-    },
-    methods: {
-      handleAdd() {
-        this.dialogVisible = true;
-        this.isEdit = false;
-        this.flashSession = Object.assign({},defaultFlashSession);
-      },
-      handleStatusChange(index,row){
-        this.$confirm('是否要修改该状态?', '提示', {
-          confirmButtonText: '确定',
-          cancelButtonText: '取消',
-          type: 'warning'
-        }).then(() => {
-          updateStatus(row.id, {status: row.status}).then(response => {
-            this.$message({
-              type: 'success',
-              message: '修改成功!'
-            });
-          });
-        }).catch(() => {
-          this.$message({
-            type: 'info',
-            message: '取消修改'
-          });
-          this.getList();
-        });
-      },
-      handleUpdate(index,row){
-        this.dialogVisible = true;
-        this.isEdit = true;
-        this.flashSession = Object.assign({},row);
-        this.flashSession.startTime=new Date(row.startTime);
-        this.flashSession.endTime=new Date(row.endTime);
-      },
-      handleDelete(index,row){
-        this.$confirm('是否要删除该时间段?', '提示', {
-          confirmButtonText: '确定',
-          cancelButtonText: '取消',
-          type: 'warning'
-        }).then(() => {
-          deleteSession(row.id).then(response => {
-            this.$message({
-              type: 'success',
-              message: '删除成功!'
-            });
-            this.getList();
-          });
-        });
-      },
-      handleDialogConfirm() {
-        this.$confirm('是否要确认?', '提示', {
-          confirmButtonText: '确定',
-          cancelButtonText: '取消',
-          type: 'warning'
-        }).then(() => {
-          if (this.isEdit) {
-            updateSession(this.flashSession.id,this.flashSession).then(response => {
-              this.$message({
-                message: '修改成功!',
-                type: 'success'
-              });
-              this.dialogVisible =false;
-              this.getList();
-            })
-          } else {
-            createSession(this.flashSession).then(response => {
-              this.$message({
-                message: '添加成功!',
-                type: 'success'
-              });
-              this.dialogVisible =false;
-              this.getList();
-            })
-          }
-        })
-      },
-      getList() {
-        this.listLoading = true;
-        fetchList({}).then(response => {
-          this.listLoading = false;
-          this.list = response.data;
-        });
-      }
-    }
-  }
-</script>
-<style scoped>
-  .operate-container {
-    margin-top: 0;
-  }
-</style>
-
-

+ 0 - 430
src/views/sms/hot/index.vue

@@ -1,430 +0,0 @@
-<template> 
-  <div class="app-container">
-    <el-card class="filter-container" shadow="never">
-      <div>
-        <i class="el-icon-search"></i>
-        <span>筛选搜索</span>
-        <el-button
-          style="float:right"
-          type="primary"
-          @click="handleSearchList()"
-          size="small">
-          查询搜索
-        </el-button>
-        <el-button
-          style="float:right;margin-right: 15px"
-          @click="handleResetSearch()"
-          size="small">
-          重置
-        </el-button>
-      </div>
-      <div style="margin-top: 15px">
-        <el-form :inline="true" :model="listQuery" size="small" label-width="140px">
-          <el-form-item label="商品名称:">
-            <el-input v-model="listQuery.productName" class="input-width" placeholder="商品名称"></el-input>
-          </el-form-item>
-          <el-form-item label="推荐状态:">
-            <el-select v-model="listQuery.recommendStatus" placeholder="全部" clearable class="input-width">
-              <el-option v-for="item in recommendOptions"
-                         :key="item.value"
-                         :label="item.label"
-                         :value="item.value">
-              </el-option>
-            </el-select>
-          </el-form-item>
-        </el-form>
-      </div>
-    </el-card>
-    <el-card class="operate-container" shadow="never">
-      <i class="el-icon-tickets"></i>
-      <span>数据列表</span>
-      <el-button size="mini" class="btn-add" @click="handleSelectProduct()">选择商品</el-button>
-    </el-card>
-    <div class="table-container">
-      <el-table ref="newProductTable"
-                :data="list"
-                style="width: 100%;"
-                @selection-change="handleSelectionChange"
-                v-loading="listLoading" border>
-        <el-table-column type="selection" width="60" align="center"></el-table-column>
-        <el-table-column label="编号" width="120" align="center">
-          <template slot-scope="scope">{{scope.row.id}}</template>
-        </el-table-column>
-        <el-table-column label="商品名称" align="center">
-          <template slot-scope="scope">{{scope.row.productName}}</template>
-        </el-table-column>
-        <el-table-column label="是否推荐" width="200" align="center">
-          <template slot-scope="scope">
-            <el-switch
-              @change="handleRecommendStatusStatusChange(scope.$index, scope.row)"
-              :active-value="1"
-              :inactive-value="0"
-              v-model="scope.row.recommendStatus">
-            </el-switch>
-          </template>
-        </el-table-column>
-        <el-table-column label="排序" width="160" align="center">
-          <template slot-scope="scope">{{scope.row.sort}}</template>
-        </el-table-column>
-        <el-table-column label="状态" width="160" align="center">
-          <template slot-scope="scope">{{scope.row.recommendStatus | formatRecommendStatus}}</template>
-        </el-table-column>
-        <el-table-column label="操作" width="180" align="center">
-          <template slot-scope="scope">
-            <el-button size="mini"
-                       type="text"
-                       @click="handleEditSort(scope.$index, scope.row)">设置排序
-            </el-button>
-            <el-button size="mini"
-                       type="text"
-                       @click="handleDelete(scope.$index, scope.row)">删除
-            </el-button>
-          </template>
-        </el-table-column>
-      </el-table>
-    </div>
-    <div class="batch-operate-container">
-      <el-select
-        size="small"
-        v-model="operateType" placeholder="批量操作">
-        <el-option
-          v-for="item in operates"
-          :key="item.value"
-          :label="item.label"
-          :value="item.value">
-        </el-option>
-      </el-select>
-      <el-button
-        style="margin-left: 20px"
-        class="search-button"
-        @click="handleBatchOperate()"
-        type="primary"
-        size="small">
-        确定
-      </el-button>
-    </div>
-    <div class="pagination-container">
-      <el-pagination
-        background
-        @size-change="handleSizeChange"
-        @current-change="handleCurrentChange"
-        layout="total, sizes,prev, pager, next,jumper"
-        :page-size="listQuery.pageSize"
-        :page-sizes="[5,10,15]"
-        :current-page.sync="listQuery.pageNum"
-        :total="total">
-      </el-pagination>
-    </div>
-    <el-dialog title="选择商品" :visible.sync="selectDialogVisible" width="50%">
-      <el-input v-model="dialogData.listQuery.keyword"
-                style="width: 250px;margin-bottom: 20px"
-                size="small"
-                placeholder="商品名称搜索">
-        <el-button slot="append" icon="el-icon-search" @click="handleSelectSearch()"></el-button>
-      </el-input>
-      <el-table :data="dialogData.list"
-                @selection-change="handleDialogSelectionChange" border>
-        <el-table-column type="selection" width="60" align="center"></el-table-column>
-        <el-table-column label="商品名称" align="center">
-          <template slot-scope="scope">{{scope.row.name}}</template>
-        </el-table-column>
-        <el-table-column label="货号" width="160" align="center">
-          <template slot-scope="scope">NO.{{scope.row.productSn}}</template>
-        </el-table-column>
-        <el-table-column label="价格" width="120" align="center">
-          <template slot-scope="scope">¥{{scope.row.price}}</template>
-        </el-table-column>
-      </el-table>
-      <div class="pagination-container">
-        <el-pagination
-          background
-          @size-change="handleDialogSizeChange"
-          @current-change="handleDialogCurrentChange"
-          layout="prev, pager, next"
-          :current-page.sync="dialogData.listQuery.pageNum"
-          :page-size="dialogData.listQuery.pageSize"
-          :page-sizes="[5,10,15]"
-          :total="dialogData.total">
-        </el-pagination>
-      </div>
-      <div style="clear: both;"></div>
-      <div slot="footer">
-        <el-button  size="small" @click="selectDialogVisible = false">取 消</el-button>
-        <el-button  size="small" type="primary" @click="handleSelectDialogConfirm()">确 定</el-button>
-      </div>
-    </el-dialog>
-    <el-dialog title="设置排序"
-               :visible.sync="sortDialogVisible"
-               width="40%">
-      <el-form :model="sortDialogData"
-               label-width="150px">
-        <el-form-item label="排序:">
-          <el-input v-model="sortDialogData.sort" style="width: 200px"></el-input>
-        </el-form-item>
-      </el-form>
-      <span slot="footer">
-        <el-button @click="sortDialogVisible = false" size="small">取 消</el-button>
-        <el-button type="primary" @click="handleUpdateSort" size="small">确 定</el-button>
-      </span>
-    </el-dialog>
-  </div>
-</template>
-<script>
-  import {fetchList,updateRecommendStatus,deleteHotProduct,createHotProduct,updateHotProductSort} from '@/api/hotProduct';
-  import {fetchList as fetchProductList} from '@/api/product';
-
-  const defaultListQuery = {
-    pageNum: 1,
-    pageSize: 5,
-    productName: null,
-    recommendStatus: null
-  };
-  const defaultRecommendOptions = [
-    {
-      label: '未推荐',
-      value: 0
-    },
-    {
-      label: '推荐中',
-      value: 1
-    }
-  ];
-  export default {
-    name: 'hotProductList',
-    data() {
-      return {
-        listQuery: Object.assign({}, defaultListQuery),
-        recommendOptions: Object.assign({}, defaultRecommendOptions),
-        list: null,
-        total: null,
-        listLoading: false,
-        multipleSelection: [],
-        operates: [
-          {
-            label: "设为推荐",
-            value: 0
-          },
-          {
-            label: "取消推荐",
-            value: 1
-          },
-          {
-            label: "删除",
-            value: 2
-          }
-        ],
-        operateType: null,
-        selectDialogVisible:false,
-        dialogData:{
-          list: null,
-          total: null,
-          multipleSelection:[],
-          listQuery:{
-            keyword: null,
-            pageNum: 1,
-            pageSize: 5
-          }
-        },
-        sortDialogVisible:false,
-        sortDialogData:{sort:0,id:null}
-      }
-    },
-    created() {
-      this.getList();
-    },
-    filters:{
-      formatRecommendStatus(status){
-        if(status===1){
-          return '推荐中';
-        }else{
-          return '未推荐';
-        }
-      }
-    },
-    methods: {
-      handleResetSearch() {
-        this.listQuery = Object.assign({}, defaultListQuery);
-      },
-      handleSearchList() {
-        this.listQuery.pageNum = 1;
-        this.getList();
-      },
-      handleSelectionChange(val){
-        this.multipleSelection = val;
-      },
-      handleSizeChange(val) {
-        this.listQuery.pageNum = 1;
-        this.listQuery.pageSize = val;
-        this.getList();
-      },
-      handleCurrentChange(val) {
-        this.listQuery.pageNum = val;
-        this.getList();
-      },
-      handleRecommendStatusStatusChange(index,row){
-        this.updateRecommendStatusStatus(row.id,row.recommendStatus);
-      },
-      handleDelete(index,row){
-        this.deleteProduct(row.id);
-      },
-      handleBatchOperate(){
-        if (this.multipleSelection < 1) {
-          this.$message({
-            message: '请选择一条记录',
-            type: 'warning',
-            duration: 1000
-          });
-          return;
-        }
-        let ids = [];
-        for (let i = 0; i < this.multipleSelection.length; i++) {
-          ids.push(this.multipleSelection[i].id);
-        }
-        if (this.operateType === 0) {
-          //设为推荐
-          this.updateRecommendStatusStatus(ids,1);
-        } else if (this.operateType === 1) {
-          //取消推荐
-          this.updateRecommendStatusStatus(ids,0);
-        } else if(this.operateType===2){
-          //删除
-          this.deleteProduct(ids);
-        }else {
-          this.$message({
-            message: '请选择批量操作类型',
-            type: 'warning',
-            duration: 1000
-          });
-        }
-      },
-      handleSelectProduct(){
-        this.selectDialogVisible=true;
-        this.getDialogList();
-      },
-      handleSelectSearch(){
-        this.getDialogList();
-      },
-      handleDialogSizeChange(val) {
-        this.dialogData.listQuery.pageNum = 1;
-        this.dialogData.listQuery.pageSize = val;
-        this.getDialogList();
-      },
-      handleDialogCurrentChange(val) {
-        this.dialogData.listQuery.pageNum = val;
-        this.getDialogList();
-      },
-      handleDialogSelectionChange(val){
-        this.dialogData.multipleSelection = val;
-      },
-      handleSelectDialogConfirm(){
-        if (this.dialogData.multipleSelection < 1) {
-          this.$message({
-            message: '请选择一条记录',
-            type: 'warning',
-            duration: 1000
-          });
-          return;
-        }
-        let selectProducts = [];
-        for (let i = 0; i < this.dialogData.multipleSelection.length; i++) {
-          selectProducts.push({
-            productId:this.dialogData.multipleSelection[i].id,
-            productName:this.dialogData.multipleSelection[i].name
-          });
-        }
-        this.$confirm('使用要进行添加操作?', '提示', {
-          confirmButtonText: '确定',
-          cancelButtonText: '取消',
-          type: 'warning'
-        }).then(() => {
-          createHotProduct(selectProducts).then(response=>{
-            this.selectDialogVisible=false;
-            this.dialogData.multipleSelection=[];
-            this.getList();
-            this.$message({
-              type: 'success',
-              message: '添加成功!'
-            });
-          });
-        });
-      },
-      handleEditSort(index,row){
-        this.sortDialogVisible=true;
-        this.sortDialogData.sort=row.sort;
-        this.sortDialogData.id=row.id;
-      },
-      handleUpdateSort(){
-        this.$confirm('是否要修改排序?', '提示', {
-          confirmButtonText: '确定',
-          cancelButtonText: '取消',
-          type: 'warning'
-        }).then(() => {
-          updateHotProductSort(this.sortDialogData).then(response=>{
-            this.sortDialogVisible=false;
-            this.getList();
-            this.$message({
-              type: 'success',
-              message: '删除成功!'
-            });
-          });
-        })
-      },
-      getList() {
-        this.listLoading = true;
-        fetchList(this.listQuery).then(response => {
-          this.listLoading = false;
-          this.list = response.data.list;
-          this.total = response.data.total;
-        })
-      },
-      updateRecommendStatusStatus(ids,status){
-        this.$confirm('是否要修改推荐状态?', '提示', {
-          confirmButtonText: '确定',
-          cancelButtonText: '取消',
-          type: 'warning'
-        }).then(() => {
-          let params=new URLSearchParams();
-          params.append("ids",ids);
-          params.append("recommendStatus",status);
-          updateRecommendStatus(params).then(response=>{
-            this.getList();
-            this.$message({
-              type: 'success',
-              message: '修改成功!'
-            });
-          });
-        }).catch(() => {
-          this.$message({
-            type: 'success',
-            message: '已取消操作!'
-          });
-          this.getList();
-        });
-      },
-      deleteProduct(ids){
-        this.$confirm('是否要删除该推荐?', '提示', {
-          confirmButtonText: '确定',
-          cancelButtonText: '取消',
-          type: 'warning'
-        }).then(() => {
-          let params=new URLSearchParams();
-          params.append("ids",ids);
-          deleteHotProduct(params).then(response=>{
-            this.getList();
-            this.$message({
-              type: 'success',
-              message: '删除成功!'
-            });
-          });
-        })
-      },
-      getDialogList(){
-        fetchProductList(this.dialogData.listQuery).then(response=>{
-          this.dialogData.list=response.data.list;
-          this.dialogData.total=response.data.total;
-        })
-      }
-    }
-  }
-</script>
-<style></style>

+ 0 - 430
src/views/sms/new/index.vue

@@ -1,430 +0,0 @@
-<template> 
-  <div class="app-container">
-    <el-card class="filter-container" shadow="never">
-      <div>
-        <i class="el-icon-search"></i>
-        <span>筛选搜索</span>
-        <el-button
-          style="float:right"
-          type="primary"
-          @click="handleSearchList()"
-          size="small">
-          查询搜索
-        </el-button>
-        <el-button
-          style="float:right;margin-right: 15px"
-          @click="handleResetSearch()"
-          size="small">
-          重置
-        </el-button>
-      </div>
-      <div style="margin-top: 15px">
-        <el-form :inline="true" :model="listQuery" size="small" label-width="140px">
-          <el-form-item label="商品名称:">
-            <el-input v-model="listQuery.productName" class="input-width" placeholder="商品名称"></el-input>
-          </el-form-item>
-          <el-form-item label="推荐状态:">
-            <el-select v-model="listQuery.recommendStatus" placeholder="全部" clearable class="input-width">
-              <el-option v-for="item in recommendOptions"
-                         :key="item.value"
-                         :label="item.label"
-                         :value="item.value">
-              </el-option>
-            </el-select>
-          </el-form-item>
-        </el-form>
-      </div>
-    </el-card>
-    <el-card class="operate-container" shadow="never">
-      <i class="el-icon-tickets"></i>
-      <span>数据列表</span>
-      <el-button size="mini" class="btn-add" @click="handleSelectProduct()">选择商品</el-button>
-    </el-card>
-    <div class="table-container">
-      <el-table ref="newProductTable"
-                :data="list"
-                style="width: 100%;"
-                @selection-change="handleSelectionChange"
-                v-loading="listLoading" border>
-        <el-table-column type="selection" width="60" align="center"></el-table-column>
-        <el-table-column label="编号" width="120" align="center">
-          <template slot-scope="scope">{{scope.row.id}}</template>
-        </el-table-column>
-        <el-table-column label="商品名称" align="center">
-          <template slot-scope="scope">{{scope.row.productName}}</template>
-        </el-table-column>
-        <el-table-column label="是否推荐" width="200" align="center">
-          <template slot-scope="scope">
-            <el-switch
-              @change="handleRecommendStatusStatusChange(scope.$index, scope.row)"
-              :active-value="1"
-              :inactive-value="0"
-              v-model="scope.row.recommendStatus">
-            </el-switch>
-          </template>
-        </el-table-column>
-        <el-table-column label="排序" width="160" align="center">
-          <template slot-scope="scope">{{scope.row.sort}}</template>
-        </el-table-column>
-        <el-table-column label="状态" width="160" align="center">
-          <template slot-scope="scope">{{scope.row.recommendStatus | formatRecommendStatus}}</template>
-        </el-table-column>
-        <el-table-column label="操作" width="180" align="center">
-          <template slot-scope="scope">
-            <el-button size="mini"
-                       type="text"
-                       @click="handleEditSort(scope.$index, scope.row)">设置排序
-            </el-button>
-            <el-button size="mini"
-                       type="text"
-                       @click="handleDelete(scope.$index, scope.row)">删除
-            </el-button>
-          </template>
-        </el-table-column>
-      </el-table>
-    </div>
-    <div class="batch-operate-container">
-      <el-select
-        size="small"
-        v-model="operateType" placeholder="批量操作">
-        <el-option
-          v-for="item in operates"
-          :key="item.value"
-          :label="item.label"
-          :value="item.value">
-        </el-option>
-      </el-select>
-      <el-button
-        style="margin-left: 20px"
-        class="search-button"
-        @click="handleBatchOperate()"
-        type="primary"
-        size="small">
-        确定
-      </el-button>
-    </div>
-    <div class="pagination-container">
-      <el-pagination
-        background
-        @size-change="handleSizeChange"
-        @current-change="handleCurrentChange"
-        layout="total, sizes,prev, pager, next,jumper"
-        :page-size="listQuery.pageSize"
-        :page-sizes="[5,10,15]"
-        :current-page.sync="listQuery.pageNum"
-        :total="total">
-      </el-pagination>
-    </div>
-    <el-dialog title="选择商品" :visible.sync="selectDialogVisible" width="50%">
-      <el-input v-model="dialogData.listQuery.keyword"
-                style="width: 250px;margin-bottom: 20px"
-                size="small"
-                placeholder="商品名称搜索">
-        <el-button slot="append" icon="el-icon-search" @click="handleSelectSearch()"></el-button>
-      </el-input>
-      <el-table :data="dialogData.list"
-                @selection-change="handleDialogSelectionChange" border>
-        <el-table-column type="selection" width="60" align="center"></el-table-column>
-        <el-table-column label="商品名称" align="center">
-          <template slot-scope="scope">{{scope.row.name}}</template>
-        </el-table-column>
-        <el-table-column label="货号" width="160" align="center">
-          <template slot-scope="scope">NO.{{scope.row.productSn}}</template>
-        </el-table-column>
-        <el-table-column label="价格" width="120" align="center">
-          <template slot-scope="scope">¥{{scope.row.price}}</template>
-        </el-table-column>
-      </el-table>
-      <div class="pagination-container">
-        <el-pagination
-          background
-          @size-change="handleDialogSizeChange"
-          @current-change="handleDialogCurrentChange"
-          layout="prev, pager, next"
-          :current-page.sync="dialogData.listQuery.pageNum"
-          :page-size="dialogData.listQuery.pageSize"
-          :page-sizes="[5,10,15]"
-          :total="dialogData.total">
-        </el-pagination>
-      </div>
-      <div style="clear: both;"></div>
-      <div slot="footer">
-        <el-button  size="small" @click="selectDialogVisible = false">取 消</el-button>
-        <el-button  size="small" type="primary" @click="handleSelectDialogConfirm()">确 定</el-button>
-      </div>
-    </el-dialog>
-    <el-dialog title="设置排序"
-               :visible.sync="sortDialogVisible"
-               width="40%">
-      <el-form :model="sortDialogData"
-               label-width="150px">
-        <el-form-item label="排序:">
-          <el-input v-model="sortDialogData.sort" style="width: 200px"></el-input>
-        </el-form-item>
-      </el-form>
-      <span slot="footer">
-        <el-button @click="sortDialogVisible = false" size="small">取 消</el-button>
-        <el-button type="primary" @click="handleUpdateSort" size="small">确 定</el-button>
-      </span>
-    </el-dialog>
-  </div>
-</template>
-<script>
-  import {fetchList,updateRecommendStatus,deleteNewProduct,createNewProduct,updateNewProductSort} from '@/api/newProduct';
-  import {fetchList as fetchProductList} from '@/api/product';
-
-  const defaultListQuery = {
-    pageNum: 1,
-    pageSize: 5,
-    productName: null,
-    recommendStatus: null
-  };
-  const defaultRecommendOptions = [
-    {
-      label: '未推荐',
-      value: 0
-    },
-    {
-      label: '推荐中',
-      value: 1
-    }
-  ];
-  export default {
-    name: 'newProductList',
-    data() {
-      return {
-        listQuery: Object.assign({}, defaultListQuery),
-        recommendOptions: Object.assign({}, defaultRecommendOptions),
-        list: null,
-        total: null,
-        listLoading: false,
-        multipleSelection: [],
-        operates: [
-          {
-            label: "设为推荐",
-            value: 0
-          },
-          {
-            label: "取消推荐",
-            value: 1
-          },
-          {
-            label: "删除",
-            value: 2
-          }
-        ],
-        operateType: null,
-        selectDialogVisible:false,
-        dialogData:{
-          list: null,
-          total: null,
-          multipleSelection:[],
-          listQuery:{
-            keyword: null,
-            pageNum: 1,
-            pageSize: 5
-          }
-        },
-        sortDialogVisible:false,
-        sortDialogData:{sort:0,id:null}
-      }
-    },
-    created() {
-      this.getList();
-    },
-    filters:{
-      formatRecommendStatus(status){
-        if(status===1){
-          return '推荐中';
-        }else{
-          return '未推荐';
-        }
-      }
-    },
-    methods: {
-      handleResetSearch() {
-        this.listQuery = Object.assign({}, defaultListQuery);
-      },
-      handleSearchList() {
-        this.listQuery.pageNum = 1;
-        this.getList();
-      },
-      handleSelectionChange(val){
-        this.multipleSelection = val;
-      },
-      handleSizeChange(val) {
-        this.listQuery.pageNum = 1;
-        this.listQuery.pageSize = val;
-        this.getList();
-      },
-      handleCurrentChange(val) {
-        this.listQuery.pageNum = val;
-        this.getList();
-      },
-      handleRecommendStatusStatusChange(index,row){
-        this.updateRecommendStatusStatus(row.id,row.recommendStatus);
-      },
-      handleDelete(index,row){
-        this.deleteProduct(row.id);
-      },
-      handleBatchOperate(){
-        if (this.multipleSelection < 1) {
-          this.$message({
-            message: '请选择一条记录',
-            type: 'warning',
-            duration: 1000
-          });
-          return;
-        }
-        let ids = [];
-        for (let i = 0; i < this.multipleSelection.length; i++) {
-          ids.push(this.multipleSelection[i].id);
-        }
-        if (this.operateType === 0) {
-          //设为推荐
-          this.updateRecommendStatusStatus(ids,1);
-        } else if (this.operateType === 1) {
-          //取消推荐
-          this.updateRecommendStatusStatus(ids,0);
-        } else if(this.operateType===2){
-          //删除
-          this.deleteProduct(ids);
-        }else {
-          this.$message({
-            message: '请选择批量操作类型',
-            type: 'warning',
-            duration: 1000
-          });
-        }
-      },
-      handleSelectProduct(){
-        this.selectDialogVisible=true;
-        this.getDialogList();
-      },
-      handleSelectSearch(){
-        this.getDialogList();
-      },
-      handleDialogSizeChange(val) {
-        this.dialogData.listQuery.pageNum = 1;
-        this.dialogData.listQuery.pageSize = val;
-        this.getDialogList();
-      },
-      handleDialogCurrentChange(val) {
-        this.dialogData.listQuery.pageNum = val;
-        this.getDialogList();
-      },
-      handleDialogSelectionChange(val){
-        this.dialogData.multipleSelection = val;
-      },
-      handleSelectDialogConfirm(){
-        if (this.dialogData.multipleSelection < 1) {
-          this.$message({
-            message: '请选择一条记录',
-            type: 'warning',
-            duration: 1000
-          });
-          return;
-        }
-        let selectProducts = [];
-        for (let i = 0; i < this.dialogData.multipleSelection.length; i++) {
-          selectProducts.push({
-            productId:this.dialogData.multipleSelection[i].id,
-            productName:this.dialogData.multipleSelection[i].name
-          });
-        }
-        this.$confirm('使用要进行添加操作?', '提示', {
-          confirmButtonText: '确定',
-          cancelButtonText: '取消',
-          type: 'warning'
-        }).then(() => {
-          createNewProduct(selectProducts).then(response=>{
-            this.selectDialogVisible=false;
-            this.dialogData.multipleSelection=[];
-            this.getList();
-            this.$message({
-              type: 'success',
-              message: '添加成功!'
-            });
-          });
-        });
-      },
-      handleEditSort(index,row){
-        this.sortDialogVisible=true;
-        this.sortDialogData.sort=row.sort;
-        this.sortDialogData.id=row.id;
-      },
-      handleUpdateSort(){
-        this.$confirm('是否要修改排序?', '提示', {
-          confirmButtonText: '确定',
-          cancelButtonText: '取消',
-          type: 'warning'
-        }).then(() => {
-          updateNewProductSort(this.sortDialogData).then(response=>{
-            this.sortDialogVisible=false;
-            this.getList();
-            this.$message({
-              type: 'success',
-              message: '删除成功!'
-            });
-          });
-        })
-      },
-      getList() {
-        this.listLoading = true;
-        fetchList(this.listQuery).then(response => {
-          this.listLoading = false;
-          this.list = response.data.list;
-          this.total = response.data.total;
-        })
-      },
-      updateRecommendStatusStatus(ids,status){
-        this.$confirm('是否要修改推荐状态?', '提示', {
-          confirmButtonText: '确定',
-          cancelButtonText: '取消',
-          type: 'warning'
-        }).then(() => {
-          let params=new URLSearchParams();
-          params.append("ids",ids);
-          params.append("recommendStatus",status);
-          updateRecommendStatus(params).then(response=>{
-            this.getList();
-            this.$message({
-              type: 'success',
-              message: '修改成功!'
-            });
-          });
-        }).catch(() => {
-          this.$message({
-            type: 'success',
-            message: '已取消操作!'
-          });
-          this.getList();
-        });
-      },
-      deleteProduct(ids){
-        this.$confirm('是否要删除该推荐?', '提示', {
-          confirmButtonText: '确定',
-          cancelButtonText: '取消',
-          type: 'warning'
-        }).then(() => {
-          let params=new URLSearchParams();
-          params.append("ids",ids);
-          deleteNewProduct(params).then(response=>{
-            this.getList();
-            this.$message({
-              type: 'success',
-              message: '删除成功!'
-            });
-          });
-        })
-      },
-      getDialogList(){
-        fetchProductList(this.dialogData.listQuery).then(response=>{
-          this.dialogData.list=response.data.list;
-          this.dialogData.total=response.data.total;
-        })
-      }
-    }
-  }
-</script>
-<style></style>

+ 0 - 439
src/views/sms/subject/index.vue

@@ -1,439 +0,0 @@
-<template> 
-  <div class="app-container">
-    <el-card class="filter-container" shadow="never">
-      <div>
-        <i class="el-icon-search"></i>
-        <span>筛选搜索</span>
-        <el-button
-          style="float:right"
-          type="primary"
-          @click="handleSearchList()"
-          size="small">
-          查询搜索
-        </el-button>
-        <el-button
-          style="float:right;margin-right: 15px"
-          @click="handleResetSearch()"
-          size="small">
-          重置
-        </el-button>
-      </div>
-      <div style="margin-top: 15px">
-        <el-form :inline="true" :model="listQuery" size="small" label-width="140px">
-          <el-form-item label="专题名称:">
-            <el-input v-model="listQuery.subjectName" class="input-width" placeholder="专题名称"></el-input>
-          </el-form-item>
-          <el-form-item label="推荐状态:">
-            <el-select v-model="listQuery.recommendStatus" placeholder="全部" clearable class="input-width">
-              <el-option v-for="item in recommendOptions"
-                         :key="item.value"
-                         :label="item.label"
-                         :value="item.value">
-              </el-option>
-            </el-select>
-          </el-form-item>
-        </el-form>
-      </div>
-    </el-card>
-    <el-card class="operate-container" shadow="never">
-      <i class="el-icon-tickets"></i>
-      <span>数据列表</span>
-      <el-button size="mini" class="btn-add" @click="handleSelectSubject()">选择专题</el-button>
-    </el-card>
-    <div class="table-container">
-      <el-table ref="newSubjectTable"
-                :data="list"
-                style="width: 100%;"
-                @selection-change="handleSelectionChange"
-                v-loading="listLoading" border>
-        <el-table-column type="selection" width="60" align="center"></el-table-column>
-        <el-table-column label="编号" width="120" align="center">
-          <template slot-scope="scope">{{scope.row.id}}</template>
-        </el-table-column>
-        <el-table-column label="专题名称" align="center">
-          <template slot-scope="scope">{{scope.row.subjectName}}</template>
-        </el-table-column>
-        <el-table-column label="是否推荐" width="200" align="center">
-          <template slot-scope="scope">
-            <el-switch
-              @change="handleRecommendStatusStatusChange(scope.$index, scope.row)"
-              :active-value="1"
-              :inactive-value="0"
-              v-model="scope.row.recommendStatus">
-            </el-switch>
-          </template>
-        </el-table-column>
-        <el-table-column label="排序" width="160" align="center">
-          <template slot-scope="scope">{{scope.row.sort}}</template>
-        </el-table-column>
-        <el-table-column label="状态" width="160" align="center">
-          <template slot-scope="scope">{{scope.row.recommendStatus | formatRecommendStatus}}</template>
-        </el-table-column>
-        <el-table-column label="操作" width="180" align="center">
-          <template slot-scope="scope">
-            <el-button size="mini"
-                       type="text"
-                       @click="handleEditSort(scope.$index, scope.row)">设置排序
-            </el-button>
-            <el-button size="mini"
-                       type="text"
-                       @click="handleDelete(scope.$index, scope.row)">删除
-            </el-button>
-          </template>
-        </el-table-column>
-      </el-table>
-    </div>
-    <div class="batch-operate-container">
-      <el-select
-        size="small"
-        v-model="operateType" placeholder="批量操作">
-        <el-option
-          v-for="item in operates"
-          :key="item.value"
-          :label="item.label"
-          :value="item.value">
-        </el-option>
-      </el-select>
-      <el-button
-        style="margin-left: 20px"
-        class="search-button"
-        @click="handleBatchOperate()"
-        type="primary"
-        size="small">
-        确定
-      </el-button>
-    </div>
-    <div class="pagination-container">
-      <el-pagination
-        background
-        @size-change="handleSizeChange"
-        @current-change="handleCurrentChange"
-        layout="total, sizes,prev, pager, next,jumper"
-        :page-size="listQuery.pageSize"
-        :page-sizes="[5,10,15]"
-        :current-page.sync="listQuery.pageNum"
-        :total="total">
-      </el-pagination>
-    </div>
-    <el-dialog title="选择专题" :visible.sync="selectDialogVisible" width="50%">
-      <el-input v-model="dialogData.listQuery.keyword"
-                style="width: 250px;margin-bottom: 20px"
-                size="small"
-                placeholder="专题名称搜索">
-        <el-button slot="append" icon="el-icon-search" @click="handleSelectSearch()"></el-button>
-      </el-input>
-      <el-table :data="dialogData.list"
-                @selection-change="handleDialogSelectionChange" border>
-        <el-table-column type="selection" width="60" align="center"></el-table-column>
-        <el-table-column label="专题名称" align="center">
-          <template slot-scope="scope">{{scope.row.title}}</template>
-        </el-table-column>
-        <el-table-column label="所属分类" width="160" align="center">
-          <template slot-scope="scope">{{scope.row.categoryName}}</template>
-        </el-table-column>
-        <el-table-column label="添加时间" width="160" align="center">
-          <template slot-scope="scope">{{scope.row.createTime | formatTime}}</template>
-        </el-table-column>
-      </el-table>
-      <div class="pagination-container">
-        <el-pagination
-          background
-          @size-change="handleDialogSizeChange"
-          @current-change="handleDialogCurrentChange"
-          layout="prev, pager, next"
-          :current-page.sync="dialogData.listQuery.pageNum"
-          :page-size="dialogData.listQuery.pageSize"
-          :page-sizes="[5,10,15]"
-          :total="dialogData.total">
-        </el-pagination>
-      </div>
-      <div style="clear: both;"></div>
-      <div slot="footer">
-        <el-button  size="small" @click="selectDialogVisible = false">取 消</el-button>
-        <el-button  size="small" type="primary" @click="handleSelectDialogConfirm()">确 定</el-button>
-      </div>
-    </el-dialog>
-    <el-dialog title="设置排序"
-               :visible.sync="sortDialogVisible"
-               width="40%">
-      <el-form :model="sortDialogData"
-               label-width="150px">
-        <el-form-item label="排序:">
-          <el-input v-model="sortDialogData.sort" style="width: 200px"></el-input>
-        </el-form-item>
-      </el-form>
-      <span slot="footer">
-        <el-button @click="sortDialogVisible = false" size="small">取 消</el-button>
-        <el-button type="primary" @click="handleUpdateSort" size="small">确 定</el-button>
-      </span>
-    </el-dialog>
-  </div>
-</template>
-<script>
-  import {fetchList,updateRecommendStatus,deleteHomeSubject,createHomeSubject,updateHomeSubjectSort} from '@/api/homeSubject';
-  import {fetchList as fetchSubjectList} from '@/api/subject';
-  import {formatDate} from '@/utils/date';
-
-  const defaultListQuery = {
-    pageNum: 1,
-    pageSize: 5,
-    subjectName: null,
-    recommendStatus: null
-  };
-  const defaultRecommendOptions = [
-    {
-      label: '未推荐',
-      value: 0
-    },
-    {
-      label: '推荐中',
-      value: 1
-    }
-  ];
-  export default {
-    name: 'homeSubjectList',
-    data() {
-      return {
-        listQuery: Object.assign({}, defaultListQuery),
-        recommendOptions: Object.assign({}, defaultRecommendOptions),
-        list: null,
-        total: null,
-        listLoading: false,
-        multipleSelection: [],
-        operates: [
-          {
-            label: "设为推荐",
-            value: 0
-          },
-          {
-            label: "取消推荐",
-            value: 1
-          },
-          {
-            label: "删除",
-            value: 2
-          }
-        ],
-        operateType: null,
-        selectDialogVisible:false,
-        dialogData:{
-          list: null,
-          total: null,
-          multipleSelection:[],
-          listQuery:{
-            keyword: null,
-            pageNum: 1,
-            pageSize: 5
-          }
-        },
-        sortDialogVisible:false,
-        sortDialogData:{sort:0,id:null}
-      }
-    },
-    created() {
-      this.getList();
-    },
-    filters:{
-      formatRecommendStatus(status){
-        if(status===1){
-          return '推荐中';
-        }else{
-          return '未推荐';
-        }
-      },
-      formatTime(time){
-        if(time==null||time===''){
-          return 'N/A';
-        }
-        let date = new Date(time);
-        return formatDate(date, 'yyyy-MM-dd hh:mm:ss')
-      },
-    },
-    methods: {
-      handleResetSearch() {
-        this.listQuery = Object.assign({}, defaultListQuery);
-      },
-      handleSearchList() {
-        this.listQuery.pageNum = 1;
-        this.getList();
-      },
-      handleSelectionChange(val){
-        this.multipleSelection = val;
-      },
-      handleSizeChange(val) {
-        this.listQuery.pageNum = 1;
-        this.listQuery.pageSize = val;
-        this.getList();
-      },
-      handleCurrentChange(val) {
-        this.listQuery.pageNum = val;
-        this.getList();
-      },
-      handleRecommendStatusStatusChange(index,row){
-        this.updateRecommendStatusStatus(row.id,row.recommendStatus);
-      },
-      handleDelete(index,row){
-        this.deleteSubject(row.id);
-      },
-      handleBatchOperate(){
-        if (this.multipleSelection < 1) {
-          this.$message({
-            message: '请选择一条记录',
-            type: 'warning',
-            duration: 1000
-          });
-          return;
-        }
-        let ids = [];
-        for (let i = 0; i < this.multipleSelection.length; i++) {
-          ids.push(this.multipleSelection[i].id);
-        }
-        if (this.operateType === 0) {
-          //设为推荐
-          this.updateRecommendStatusStatus(ids,1);
-        } else if (this.operateType === 1) {
-          //取消推荐
-          this.updateRecommendStatusStatus(ids,0);
-        } else if(this.operateType===2){
-          //删除
-          this.deleteSubject(ids);
-        }else {
-          this.$message({
-            message: '请选择批量操作类型',
-            type: 'warning',
-            duration: 1000
-          });
-        }
-      },
-      handleSelectSubject(){
-        this.selectDialogVisible=true;
-        this.dialogData.listQuery.keyword=null;
-        this.getDialogList();
-      },
-      handleSelectSearch(){
-        this.getDialogList();
-      },
-      handleDialogSizeChange(val) {
-        this.dialogData.listQuery.pageNum = 1;
-        this.dialogData.listQuery.pageSize = val;
-        this.getDialogList();
-      },
-      handleDialogCurrentChange(val) {
-        this.dialogData.listQuery.pageNum = val;
-        this.getDialogList();
-      },
-      handleDialogSelectionChange(val){
-        this.dialogData.multipleSelection = val;
-      },
-      handleSelectDialogConfirm(){
-        if (this.dialogData.multipleSelection < 1) {
-          this.$message({
-            message: '请选择一条记录',
-            type: 'warning',
-            duration: 1000
-          });
-          return;
-        }
-        let selectSubjects = [];
-        for (let i = 0; i < this.dialogData.multipleSelection.length; i++) {
-          selectSubjects.push({
-            subjectId:this.dialogData.multipleSelection[i].id,
-            subjectName:this.dialogData.multipleSelection[i].title
-          });
-        }
-        this.$confirm('使用要进行添加操作?', '提示', {
-          confirmButtonText: '确定',
-          cancelButtonText: '取消',
-          type: 'warning'
-        }).then(() => {
-          createHomeSubject(selectSubjects).then(response=>{
-            this.selectDialogVisible=false;
-            this.dialogData.multipleSelection=[];
-            this.getList();
-            this.$message({
-              type: 'success',
-              message: '添加成功!'
-            });
-          });
-        });
-      },
-      handleEditSort(index,row){
-        this.sortDialogVisible=true;
-        this.sortDialogData.sort=row.sort;
-        this.sortDialogData.id=row.id;
-      },
-      handleUpdateSort(){
-        this.$confirm('是否要修改排序?', '提示', {
-          confirmButtonText: '确定',
-          cancelButtonText: '取消',
-          type: 'warning'
-        }).then(() => {
-          updateHomeSubjectSort(this.sortDialogData).then(response=>{
-            this.sortDialogVisible=false;
-            this.getList();
-            this.$message({
-              type: 'success',
-              message: '删除成功!'
-            });
-          });
-        })
-      },
-      getList() {
-        this.listLoading = true;
-        fetchList(this.listQuery).then(response => {
-          this.listLoading = false;
-          this.list = response.data.list;
-          this.total = response.data.total;
-        })
-      },
-      updateRecommendStatusStatus(ids,status){
-        this.$confirm('是否要修改推荐状态?', '提示', {
-          confirmButtonText: '确定',
-          cancelButtonText: '取消',
-          type: 'warning'
-        }).then(() => {
-          let params=new URLSearchParams();
-          params.append("ids",ids);
-          params.append("recommendStatus",status);
-          updateRecommendStatus(params).then(response=>{
-            this.getList();
-            this.$message({
-              type: 'success',
-              message: '修改成功!'
-            });
-          });
-        }).catch(() => {
-          this.$message({
-            type: 'success',
-            message: '已取消操作!'
-          });
-          this.getList();
-        });
-      },
-      deleteSubject(ids){
-        this.$confirm('是否要删除该推荐?', '提示', {
-          confirmButtonText: '确定',
-          cancelButtonText: '取消',
-          type: 'warning'
-        }).then(() => {
-          let params=new URLSearchParams();
-          params.append("ids",ids);
-          deleteHomeSubject(params).then(response=>{
-            this.getList();
-            this.$message({
-              type: 'success',
-              message: '删除成功!'
-            });
-          });
-        })
-      },
-      getDialogList(){
-        fetchSubjectList(this.dialogData.listQuery).then(response=>{
-          this.dialogData.list=response.data.list;
-          this.dialogData.total=response.data.total;
-        })
-      }
-    }
-  }
-</script>
-<style></style>