From 3c83179579806c8d2287ca9259894796035be363 Mon Sep 17 00:00:00 2001 From: Yer <17633066053@163.com> Date: Tue, 4 Jul 2023 10:24:21 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20:sparkles:=20=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E7=AB=AF=E6=96=B0=E5=A2=9E=E6=A0=BC=E5=BC=8F=E5=8C=96=E4=BB=B7?= =?UTF-8?q?=E6=A0=BC=E6=96=87=E4=BB=B6=E6=8F=92=E4=BB=B6=E5=B9=B6=E5=9C=A8?= =?UTF-8?q?=E4=BB=A3=E7=A0=81=E4=B8=AD=E5=BC=95=E5=85=A5,=E6=9B=B4?= =?UTF-8?q?=E6=96=B0=E4=BB=A3=E7=A0=81=E9=9C=80=E8=A6=81install=E6=8F=92?= =?UTF-8?q?=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- manager/package.json | 3 +- manager/src/config/index.js | 3 +- manager/src/main.js | 6 ++- .../src/views/distribution/distribution.vue | 16 ++---- .../views/distribution/distributionCash.vue | 4 +- .../views/distribution/distributionGoods.vue | 12 ++--- .../views/distribution/distributionOrder.vue | 9 ++-- manager/src/views/goods/goods-info/goods.vue | 5 +- .../src/views/goods/goods-info/goodsApply.vue | 2 +- .../views/goods/goods-info/goodsDetail.vue | 14 +++-- .../src/views/goods/goods-manage/category.vue | 4 +- manager/src/views/home/home.vue | 11 ++-- manager/src/views/member/advance/recharge.vue | 7 +-- .../src/views/member/advance/walletLog.vue | 26 ++-------- .../views/member/advance/withdrawApply.vue | 20 ++++---- .../src/views/member/list/memberDetail.vue | 51 ++++++------------- manager/src/views/member/point/point.vue | 17 +------ .../order/after-order/afterSaleOrder.vue | 9 +--- .../after-order/afterSaleOrderDetail.vue | 12 +++-- .../order/after-order/orderComplaint.vue | 1 + .../after-order/orderComplaintDetail.vue | 2 +- manager/src/views/order/flow/paymentLog.vue | 7 +-- manager/src/views/order/flow/refundLog.vue | 6 +-- .../views/order/order/fictitiousOrderList.vue | 5 +- manager/src/views/order/order/orderDetail.vue | 14 ++--- manager/src/views/order/order/orderList.vue | 6 +-- .../coupon-activity/coupon-info.vue | 10 +++- .../coupon-activity/coupon-publish.vue | 5 +- .../promotions/coupon/coupon-publish.vue | 2 +- .../promotions/coupon/coupon-receive.vue | 7 ++- .../src/views/promotions/coupon/coupon.vue | 6 +-- .../full-discount/full-discount-detail.vue | 5 +- .../kanjia/kanjia-activity-add-goods.vue | 2 +- .../kanjia/kanjia-activity-edit-goods.vue | 14 ++--- .../kanjia/kanjia-activity-goods.vue | 5 +- .../promotions/pintuan/pintuan-goods.vue | 2 +- .../points-goods/points-goods-add.vue | 5 +- .../points-goods/points-goods-edit.vue | 4 +- .../promotions/points-goods/points-goods.vue | 8 ++- .../promotions/seckill/seckill-goods.vue | 8 ++- .../seller/bill/accountStatementBill.vue | 6 +-- manager/src/views/seller/bill/bill-detail.vue | 19 ++----- manager/src/views/seller/bill/bill.vue | 8 ++- manager/src/views/seller/shop/shopDetail.vue | 14 +---- manager/src/views/statistics/goods.vue | 6 +-- manager/src/views/statistics/order.vue | 11 +--- .../views/statistics/order/orderDetail.vue | 5 +- .../views/statistics/order/refundOrder.vue | 4 +- 48 files changed, 165 insertions(+), 263 deletions(-) diff --git a/manager/package.json b/manager/package.json index 45dbf723..e7cc6f19 100644 --- a/manager/package.json +++ b/manager/package.json @@ -32,7 +32,8 @@ "vue-router": "^3.1.3", "vuedraggable": "^2.23.2", "vuex": "^3.4.0", - "xss": "^1.0.7" + "xss": "^1.0.7", + "price-color":"1.0.2" }, "devDependencies": { "@vue/cli-plugin-babel": "^4.4.4", diff --git a/manager/src/config/index.js b/manager/src/config/index.js index cbbf0588..d8e2ebb6 100644 --- a/manager/src/config/index.js +++ b/manager/src/config/index.js @@ -11,5 +11,6 @@ module.exports = { website: "https://www.pickmall.cn", //官网地址 enableCDN: true, //生产环境 是否启用cdn加载 vue等js port: 10003, //端口 - inputMaxLength:'140' //全局输入框默认最大输入长度字 + inputMaxLength:'140', //全局输入框默认最大输入长度字 + mainColor:"#ff5c58", //主题色 }; diff --git a/manager/src/main.js b/manager/src/main.js index 595d42ce..cc153c1a 100644 --- a/manager/src/main.js +++ b/manager/src/main.js @@ -25,7 +25,7 @@ import {md5} from '@/utils/md5.js'; import Print from 'vue-print-nb'; Vue.use(Print); -const {aMapSecurityJsCode, inputMaxLength} = require("@/config"); +const {aMapSecurityJsCode, inputMaxLength,mainColor } = require("@/config"); // 高德安全密钥 if (aMapSecurityJsCode) { window._AMapSecurityConfig = { @@ -45,6 +45,9 @@ Vue.prototype.wapLinkTo = function (goodsId, skuId) { // app端二维码 return `${WAP_URL}/pages/product/goods?id=${skuId}&goodsId=${goodsId}` }; +// 引入价格格式化组件 +import priceColorScheme from 'price-color' +Vue.use(priceColorScheme); const copyViewUi = {...ViewUI} copyViewUi.Input.props.maxlength.default = inputMaxLength // 挂载最大输入值 @@ -66,6 +69,7 @@ Vue.prototype.uploadFileRequest = uploadFileRequest; Vue.prototype.setStore = setStore; Vue.prototype.getStore = getStore; Vue.prototype.removeStore = removeStore; +Vue.prototype.$mainColor = mainColor; Vue.prototype.md5 = md5; Array.prototype.remove = function (from, to) { diff --git a/manager/src/views/distribution/distribution.vue b/manager/src/views/distribution/distribution.vue index 761bc2ef..62eac804 100644 --- a/manager/src/views/distribution/distribution.vue +++ b/manager/src/views/distribution/distribution.vue @@ -105,11 +105,9 @@ export default { width: 150, sortable: false, render: (h, params) => { - return h( - "div", - this.$options.filters.unitPrice(params.row.rebateTotal, "¥") - ); + return h("priceColorScheme", {props:{value:params.row.rebateTotal,color:this.$mainColor}} ); }, + }, { title: "可用金额", @@ -117,10 +115,7 @@ export default { width: 150, sortable: false, render: (h, params) => { - return h( - "div", - this.$options.filters.unitPrice(params.row.canRebate, "¥") - ); + return h("priceColorScheme", {props:{value:params.row.canRebate,color:'green'}} ); }, }, { @@ -129,10 +124,7 @@ export default { width: 150, sortable: false, render: (h, params) => { - return h( - "div", - this.$options.filters.unitPrice(params.row.commissionFrozen, "¥") - ); + return h("priceColorScheme", {props:{value:params.row.commissionFrozen,color:'#347dda'}} ); }, }, { diff --git a/manager/src/views/distribution/distributionCash.vue b/manager/src/views/distribution/distributionCash.vue index 7e130b5f..c76a798d 100644 --- a/manager/src/views/distribution/distributionCash.vue +++ b/manager/src/views/distribution/distributionCash.vue @@ -97,8 +97,8 @@ export default { key: "price", minWidth: 90, render: (h, params) => { - return h("div", this.$options.filters.unitPrice(params.row.price,'¥')); - } + return h("priceColorScheme", {props:{value:params.row.price,color:this.$mainColor}} ); + }, }, { title: "申请时间", diff --git a/manager/src/views/distribution/distributionGoods.vue b/manager/src/views/distribution/distributionGoods.vue index 2053cfe1..53dca285 100644 --- a/manager/src/views/distribution/distributionGoods.vue +++ b/manager/src/views/distribution/distributionGoods.vue @@ -98,11 +98,9 @@ export default { key: "price", minWidth: 100, render: (h, params) => { - return h( - "div", - this.$options.filters.unitPrice(params.row.price, "¥") - ); + return h("priceColorScheme", {props:{value:params.row.price,color:this.$mainColor}} ); }, + }, { title: "库存", @@ -126,11 +124,9 @@ export default { minWidth: 100, sortable: false, render: (h, params) => { - return h( - "div", - this.$options.filters.unitPrice(params.row.commission, "¥") - ); + return h("priceColorScheme", {props:{value:params.row.commission,color:this.$mainColor}} ); }, + }, { title: "操作", diff --git a/manager/src/views/distribution/distributionOrder.vue b/manager/src/views/distribution/distributionOrder.vue index 2f0c8852..53a372f1 100644 --- a/manager/src/views/distribution/distributionOrder.vue +++ b/manager/src/views/distribution/distributionOrder.vue @@ -126,13 +126,10 @@ minWidth:80, sortable: false, render: (h, params) => { - if(params.row.rebate == null){ - return h("div", this.$options.filters.unitPrice(0, '¥')); - }else{ - return h("div", this.$options.filters.unitPrice(params.row.rebate, '¥')); - } + return h("priceColorScheme", {props:{value:params.row.rebate,color:this.$mainColor}} ); + }, + - } }, { fixed: "right", diff --git a/manager/src/views/goods/goods-info/goods.vue b/manager/src/views/goods/goods-info/goods.vue index a7862b16..94a3b332 100644 --- a/manager/src/views/goods/goods-info/goods.vue +++ b/manager/src/views/goods/goods-info/goods.vue @@ -200,10 +200,7 @@ export default { key: "price", width: 130, render: (h, params) => { - return h( - "div", - this.$options.filters.unitPrice(params.row.price, "¥") - ); + return h("priceColorScheme", {props:{value:params.row.price,color:this.$mainColor}} ); }, }, { diff --git a/manager/src/views/goods/goods-info/goodsApply.vue b/manager/src/views/goods/goods-info/goodsApply.vue index e6438bc7..7c7080a0 100644 --- a/manager/src/views/goods/goods-info/goodsApply.vue +++ b/manager/src/views/goods/goods-info/goodsApply.vue @@ -115,7 +115,7 @@ export default { key: "price", minWidth: 130, render: (h, params) => { - return h("div", this.$options.filters.unitPrice(params.row.price, "¥")); + return h("priceColorScheme", {props:{value:params.row.price,color:this.$mainColor}} ); }, }, { diff --git a/manager/src/views/goods/goods-info/goodsDetail.vue b/manager/src/views/goods/goods-info/goodsDetail.vue index e83198e3..2ef4e8c9 100644 --- a/manager/src/views/goods/goods-info/goodsDetail.vue +++ b/manager/src/views/goods/goods-info/goodsDetail.vue @@ -38,7 +38,8 @@