diff --git a/api/sale.js b/api/sale.js new file mode 100644 index 0000000..7fc62dc --- /dev/null +++ b/api/sale.js @@ -0,0 +1,10 @@ +// +---------------------------------------------------------------------- +// | CRMEB [ CRMEB赋能开发者,助力企业发展 ] +// +---------------------------------------------------------------------- +// | Copyright (c) 2016~2021 https://www.crmeb.com All rights reserved. +// +---------------------------------------------------------------------- +// | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权 +// +---------------------------------------------------------------------- +// | Author: CRMEB Team +// +---------------------------------------------------------------------- +import request from "@/utils/request.js"; \ No newline at end of file diff --git a/components/orderGoods/index.vue b/components/orderGoods/index.vue index 86242be..58c59a0 100644 --- a/components/orderGoods/index.vue +++ b/components/orderGoods/index.vue @@ -10,75 +10,114 @@ - + + - 预售{{item.cart_info.product.store_name}} - ¥{{item.cart_info.productPresellAttr.presell_price}}
x {{item.product_num}}
+ 预售{{item.cart_info.product.store_name}} + + ¥{{item.cart_info.productPresellAttr.presell_price}}
x + {{item.product_num}}
- {{item.cart_info.productAttr.sku}} - 发货时间: + + {{item.cart_info.productAttr.sku}} + 发货时间: - {{ item.cart_info.productPresell.delivery_type === 1 ? '支付成功后' : '预售结束后' }}{{ item.cart_info.productPresell.delivery_day }}天内 + {{ item.cart_info.productPresell.delivery_type === 1 ? '支付成功后' : '预售结束后' }}{{ item.cart_info.productPresell.delivery_day }}天内 - {{ item.cart_info.productPresell.delivery_type === 1 ? '支付尾款后' : '预售结束后' }}{{ item.cart_info.productPresell.delivery_day }}天内 - - - - 申请退款 - 退款中 x {{item.product_num - item.refund_num}} - 已退款 x {{item.product_num - item.refund_num}} - 去评价 + {{ item.cart_info.productPresell.delivery_type === 1 ? '支付尾款后' : '预售结束后' }}{{ item.cart_info.productPresell.delivery_day }}天内 + + + + 申请退款 + 退款中 x + {{item.product_num - item.refund_num}} + 已退款 x + {{item.product_num - item.refund_num}} + 去评价 已评价
- + 阶段一: 买家已付款 - 商品定金 ¥{{ orderData.pay_price }} - 定金实付款¥{{ orderData.pay_price }} + 商品定金 ¥{{ orderData.pay_price }} + 定金实付款¥{{ orderData.pay_price }} - 阶段二: - 未开始 - 等待买家付尾款 - 交易已关闭 + 阶段二: + 未开始 + 等待买家付尾款 + 交易已关闭 - 商品尾款 ¥{{ orderData.presellOrder.pay_price }} - 尾款需付款¥{{ orderData.presellOrder.pay_price }} + 商品尾款 ¥{{ orderData.presellOrder.pay_price }} + 尾款需付款¥{{ orderData.presellOrder.pay_price }} + - + + - - {{item.product_type == 1 ? "秒杀" : item.product_type == 2 ? "预售" : item.product_type == 3 ? "助力" : item.product_type == 4 ? "拼团" : ""}}{{item.cart_info.product.store_name}} - x {{item.product_num}} - - {{item.cart_info.productAttr.sku}} - ¥{{item.cart_info.productAssistAttr.assist_price}} - ¥{{item.cart_info.activeSku.active_price}} - - ¥{{item.cart_info.productAttr.price}} - + + {{item.product_type == 1 ? "秒杀" : item.product_type == 2 ? "预售" : item.product_type == 3 ? "助力" : item.product_type == 4 ? "拼团" : ""}}{{item.cart_info.product.store_name}} + x {{item.product_num}} + + + {{item.cart_info.productAttr.sku}} + + ¥{{item.cart_info.productAssistAttr.assist_price}} + + ¥{{item.cart_info.activeSku.active_price}} + + ¥{{item.cart_info.productAttr.price}} + + - - 退款中 x {{item.product_num - item.refund_num}} - 已退款 x {{item.product_num - item.refund_num}} - 申请退款 - 去评价 + + + 退款中 x + {{item.product_num - item.refund_num}} + 已退款 x {{item.product_num - item.refund_num}} + + + 申请退款 + 去评价 已评价 - +
@@ -94,10 +133,18 @@ // +---------------------------------------------------------------------- // | Author: CRMEB Team // +---------------------------------------------------------------------- - import { openOrderRefundSubscribe } from '@/utils/SubscribeMessage.js'; - import { goShopDetail } from '@/libs/order.js' - import { initiateAssistApi } from '@/api/activity.js'; - import { mapGetters } from "vuex"; + import { + openOrderRefundSubscribe + } from '@/utils/SubscribeMessage.js'; + import { + goShopDetail + } from '@/libs/order.js' + import { + initiateAssistApi + } from '@/api/activity.js'; + import { + mapGetters + } from "vuex"; export default { props: { evaluate: { @@ -132,14 +179,14 @@ computed: mapGetters(['viewColor']), data() { return { - totalNmu:'', + totalNmu: '', isTimePay: false, //是否到支付时间 }; }, - watch:{ - cartInfo:function(nVal,oVal){ + watch: { + cartInfo: function(nVal, oVal) { let num = 0 - nVal.forEach((item,index)=>{ + nVal.forEach((item, index) => { num += item.cart_num }) this.totalNmu = num @@ -150,52 +197,59 @@ }, mounted() {}, methods: { - evaluateTap:function(unique,orderId){ + evaluateTap: function(unique, orderId) { uni.navigateTo({ - url:`/pages/users/goods_comment_con/index?uni=${unique}&order_id=${orderId}` + url: `/pages/users/goods_comment_con/index?uni=${unique}&order_id=${orderId}` }) }, // 判断是否到支付尾款时间 - isPayBalance(){ + isPayBalance() { let that = this; - if(that.orderData.status === 10){ - if(new Date() < new Date(that.orderData.presellOrder.final_start_time)){ + if (that.orderData.status === 10) { + if (new Date() < new Date(that.orderData.presellOrder.final_start_time)) { that.isTimePay = false; //未开始 - }else if((new Date() >= new Date(that.orderData.presellOrder.final_start_time)) && (new Date() <= new Date(that.orderData.presellOrder.final_start_time)) ){ + } else if ((new Date() >= new Date(that.orderData.presellOrder.final_start_time)) && (new Date() <= + new Date(that.orderData.presellOrder.final_start_time))) { that.isTimePay = true; //立即支付 } } }, - jumpCon:function(item){ - if(item.product_type == 4)item.activity_id = item.cart_info && item.cart_info.activeSku.product_group_id - if(item.product_type == 3)item.activity_id = item.cart_info && item.cart_info.productAssistAttr.product_assist_id + jumpCon: function(item) { + if (item.product_type == 4) item.activity_id = item.cart_info && item.cart_info.activeSku + .product_group_id + if (item.product_type == 3) item.activity_id = item.cart_info && item.cart_info.productAssistAttr + .product_assist_id goShopDetail(item).then(res => { initiateAssistApi(item.activity_id).then(res => { let id = res.data.product_assist_set_id; - uni.hideLoading(); - uni.navigateTo({ - url: '/pages/activity/assist_detail/index?id=' + id - }); - }).catch((err) => { - uni.showToast({ - title: err, - icon: 'none' - }) + uni.hideLoading(); + uni.navigateTo({ + url: '/pages/activity/assist_detail/index?id=' + id + }); + }).catch((err) => { + uni.showToast({ + title: err, + icon: 'none' + }) }); - }) + }) }, // 退款 - refund(item){ + refund(item) { // #ifdef MP openOrderRefundSubscribe().then(() => { uni.hideLoading(); - if(this.evaluate == 0 || this.evaluate == 9 || this.orderData.is_virtual == 1){ + if (this.evaluate == 0 || this.evaluate == 9 || this.orderData.is_virtual == 1) { uni.navigateTo({ - url:'/pages/users/refund/confirm?order_id='+this.orderId+'&type=1'+'&ids='+item.order_product_id+'&refund_type=1&order_type='+this.orderData.order_type + url: '/pages/users/refund/confirm?order_id=' + this.orderId + '&type=1' + + '&ids=' + item.order_product_id + '&refund_type=1&order_type=' + this + .orderData.order_type }) - }else{ + } else { uni.navigateTo({ - url:'/pages/users/refund/select?order_id='+this.orderId+'&type=1&order_type='+this.orderData.order_type+'&ids='+item.order_product_id + url: '/pages/users/refund/select?order_id=' + this.orderId + + '&type=1&order_type=' + this.orderData.order_type + '&ids=' + item + .order_product_id }) } }).catch(() => { @@ -203,13 +257,15 @@ }) // #endif // #ifdef H5 || APP-PLUS - if(this.evaluate == 0 || this.evaluate == 9 || this.orderData.is_virtual == 1){ + if (this.evaluate == 0 || this.evaluate == 9 || this.orderData.is_virtual == 1) { uni.navigateTo({ - url:'/pages/users/refund/confirm?order_id='+this.orderId+'&type=1'+'&ids='+item.order_product_id+'&refund_type=1&order_type='+this.orderData.order_type + url: '/pages/users/refund/confirm?order_id=' + this.orderId + '&type=1' + '&ids=' + item + .order_product_id + '&refund_type=1&order_type=' + this.orderData.order_type }) - }else{ + } else { uni.navigateTo({ - url:'/pages/users/refund/select?order_id='+this.orderId+'&type=1&order_type='+this.orderData.order_type+'&ids='+item.order_product_id + url: '/pages/users/refund/select?order_id=' + this.orderId + '&type=1&order_type=' + this + .orderData.order_type + '&ids=' + item.order_product_id }) } // #endif @@ -222,83 +278,101 @@ .orderGoods { background-color: #fff; } + .p-color { color: var(--view-priceColor); } - .t-color{ + + .t-color { color: var(--view-theme); } - .svip-img{ + + .svip-img { width: 65rpx; height: 28rpx; margin: 4rpx 0 0 4rpx; } - .title{ + + .title { height: 86rpx; position: relative; padding: 0 30rpx; - &::after{ + + &::after { content: ""; width: 750rpx; - border-bottom: 2rpx dotted #D8D8D8; + border-bottom: 2rpx dotted #D8D8D8; position: absolute; bottom: 0; left: 0; } - .item-status{ + + .item-status { color: #999999; font-size: 30rpx; - &.status0{ + + &.status0 { color: #2291F8; } } - .item-date{ + + .item-date { color: #666666; font-size: 28rpx; } - } - .right-btn-box{ + } + + .right-btn-box { display: flex; align-items: center; justify-content: flex-end; - &.event_box{ + + &.event_box { position: static; } - .btn-item{ + + .btn-item { display: flex; align-items: center; justify-content: center; - width:140rpx; - height:46rpx; + width: 140rpx; + height: 46rpx; margin-left: 10rpx; - border:1px solid rgba(187,187,187,1); - border-radius:23rpx; + border: 1px solid rgba(187, 187, 187, 1); + border-radius: 23rpx; font-size: 24rpx; color: #282828; - &.on{ - background:rgba(220,220,220,1); - border-color: rgba(220,220,220,1); + + &.on { + background: rgba(220, 220, 220, 1); + border-color: rgba(220, 220, 220, 1); } - &.err{ - background:rgba(247,247,247,1); - border-color: rgba(247,247,247,1); + + &.err { + background: rgba(247, 247, 247, 1); + border-color: rgba(247, 247, 247, 1); color: #AAAAAA; } } } - .event_bg{ + + .event_bg { background: #FF7F00; } - .event_color{ + + .event_color { color: #FF7F00; } - .presell_item{ + + .presell_item { height: auto; padding-bottom: 15rpx; } - .event_progress{ + + .event_progress { margin-top: 20rpx; background: #fff; + .progress_name { padding-left: 30rpx; height: 60rpx; @@ -307,7 +381,8 @@ font-weight: bold; position: relative; color: var(--view-theme); - &::before{ + + &::before { content: ""; display: inline-block; width: 5rpx; @@ -318,43 +393,49 @@ left: 0; } } - .align_right{ + + .align_right { float: right; font-weight: bold; } - .progress_price{ + + .progress_price { padding: 20rpx 30rpx; color: #999999; font-size: 22rpx; } - .progress_pay{ + + .progress_pay { padding: 25rpx 30rpx; background: var(--view-minorColor); font-size: 26rpx; color: #282828; } } - .event_name{ + + .event_name { display: inline-block; margin-right: 9rpx; color: #fff; font-size: 20rpx; padding: 0 8rpx; - line-height: 30rpx; + line-height: 30rpx; text-align: center; - border-radius: 6rpx; + border-radius: 6rpx; } - .event_ship{ + + .event_ship { font-size: 20rpx; - margin-top: 10rpx; + margin-top: 10rpx; } - .goodWrapper.item1{ - &::after{ + + .goodWrapper.item1 { + &::after { content: ""; display: block; width: 750rpx; height: 14rpx; background: #F0F0F0; - } + } } - + \ No newline at end of file diff --git a/components/realselist/realselist.vue b/components/realselist/realselist.vue new file mode 100644 index 0000000..e1b31f6 --- /dev/null +++ b/components/realselist/realselist.vue @@ -0,0 +1,621 @@ + + + + + \ No newline at end of file diff --git a/components/shoppinglist/shoppinglist.vue b/components/shoppinglist/shoppinglist.vue index 3b921a9..d5aac0b 100644 --- a/components/shoppinglist/shoppinglist.vue +++ b/components/shoppinglist/shoppinglist.vue @@ -62,12 +62,13 @@ 出售数量 + :isMax="true" :isMin="true" index="11" @eventChange="numberChange($event,i)"> + :isMin="true" index="11" @increment="incrementTotal($event,i,item)" + @eventChange="numberChange($event,i)"> @@ -130,7 +131,7 @@ bought: [], checkedArr: [], - + aryys: [], // picker下拉数据源 storageCustomList: [{ CustGoodsCode: "TEST001", @@ -165,14 +166,35 @@ }, mounted() { this.checkedArr = this.checkedObj + this.aryys = this.checkedObj this.getBounht(); }, methods: { //价格 - producrprice(e, i,item) { - + producrprice(e, i, item) { this.bought[i].price = e.detail.value - this.$set(item, 'check',false); + this.$set(item, 'check', false); + for (let i in this.checkedArr) { + if (this.checkedArr[i].product_id == item.product_id) { + this.checkedArr.splice(i, 1) + } + } + + + + }, + incrementTotal(e, i, item) { + this.$set(item, 'check', false); + for (let i in this.checkedArr) { + if (this.checkedArr[i].product_id == item.product_id) { + this.checkedArr.splice(i, 1) + } + } + + + + + }, // picker修改事件 bindPickerChange: function(e, storage, num) { @@ -220,15 +242,22 @@ setValue: function(event) { this.$set(this.whereb, 'keyword', event.detail.value); + if (!event.detail.value) { + this.whereb.page = 1 + this.loadedb = false + this.getBounht() + } }, searchBut() { - this.whereb.page = this.wherec.page = this.wheres.page = - this.bought = [] - this.isActive == 0 ? this.getBounht() : '' + this.bought = [] + this.whereb.page = 1 + this.loadedb = false + this.getBounht() }, getBounht() { var that = this; + // console.log('1111111', that.loadingb, that.loadedb) if (that.loadingb || that.loadedb) return; that.loadingb = true; @@ -268,7 +297,9 @@ getCheckedGoods() { this.checked = [] this.checkedArr.forEach((item, index) => { - this.check.push(item) + this.checkedArr.push(item) + + }) }, /*点击选中与否*/ @@ -278,22 +309,41 @@ if (this.peicenumber == 0) { item.number = 1 } - if (!item.product_attr_unique) { item.product_attr_unique = item.attrValue[0].unique } this.checkedArr.push(item) - + this.arrayUnique(this.checkedArr, 'product_id') } else { - this.checkedArr.splice(this.checkedArr.findIndex(itemn => ((itemn.spu_id == item.spu_id) || (item - .spu_id == ( - itemn.spu && itemn.spu.spu_id)))), 1) + this.checkedArr.splice(this.checkedArr.findIndex(itemn => ((itemn.product_id == item.product_id))), 1) } + }, + //去重 + arrayUnique(arr, name) { + let hash = {} + const result = arr.reduce((acc, cru, index) => { + if (!hash[cru[name]]) { + hash[cru[name]] = { + index: acc.length + } + acc.push(cru) + } else { + console.log(acc, hash[cru[name]]) + acc.splice(hash[cru[name]]['index'], 1, cru) + } + + + return acc; + + }, []) + this.checkedArr = result + + }, /*确定提交*/ submit() { - + this.$emit('getProduct', this.checkedArr); }, diff --git a/components/subtractive/subtractive.vue b/components/subtractive/subtractive.vue index 8ee625e..153637f 100644 --- a/components/subtractive/subtractive.vue +++ b/components/subtractive/subtractive.vue @@ -114,6 +114,7 @@ return; } this.inputValue = newValue / scale; + this.$emit('increment',this.inputValue) }, _getDecimalScale() { let scale = 1; diff --git a/pages.json b/pages.json index 40e01e4..7a0f22d 100644 --- a/pages.json +++ b/pages.json @@ -705,57 +705,65 @@ "root": "pages/releaseManagement", "name": "releaseManagement", "pages": [{ - "path": "/index", + "path": "index", "style": { "navigationBarTitleText": "发布管理", "enablePullDownRefresh": false } - }] + }, + { + "path": "details/index", + "style": { + "navigationBarTitleText": "发起委托", + "enablePullDownRefresh": false + } + + }] }, { "root": "pages/commissionedSales", "name": "commissionedSales", "pages": [{ - "path": "index/index", - "style": { - "navigationBarTitleText": "委托销售", - "enablePullDownRefresh": false - } + "path": "index/index", + "style": { + "navigationBarTitleText": "委托销售", + "enablePullDownRefresh": false + } + + }, + { + "path": "initiateDelegation/index", + "style": { + "navigationBarTitleText": "发起委托", + "enablePullDownRefresh": false + } + + }, + { + "path": "addDelegation/index", + "style": { + "navigationBarTitleText": "新增委托", + "enablePullDownRefresh": false + } + + }, + { + "path": "receivedCommission/index", + "style": { + "navigationBarTitleText": "收到委托", + "enablePullDownRefresh": false + } + + }, + { + "path": "delegation_details/index", + "style": { + "navigationBarTitleText": "委托销售详情", + "enablePullDownRefresh": false + } - }, - { - "path": "initiateDelegation/index", - "style": { - "navigationBarTitleText": "发起委托", - "enablePullDownRefresh": false } - - }, - { - "path": "addDelegation/index", - "style": { - "navigationBarTitleText": "新增委托", - "enablePullDownRefresh": false - } - - }, - { - "path": "receivedCommission/index", - "style": { - "navigationBarTitleText": "收到委托", - "enablePullDownRefresh": false - } - - }, - { - "path": "delegation_details/index", - "style": { - "navigationBarTitleText": "委托销售详情", - "enablePullDownRefresh": false - } - - } ] }, { diff --git a/pages/admin/orderDetail/index.vue b/pages/admin/orderDetail/index.vue index c51bfad..6c792e1 100644 --- a/pages/admin/orderDetail/index.vue +++ b/pages/admin/orderDetail/index.vue @@ -164,10 +164,11 @@ 确认付款 - + + 收件码 - 去发货 + 去发货 去核销 委托周期 - + + + + + 添加产品({{productList.length}}) @@ -34,42 +38,21 @@ - + - + - 良品铺子肉松饼1000g/箱 面... + {{item.store_name}} - 委托价:¥34.90 + 委托价:¥{{item.price}} - 数量:100个 - - - - - - - - - - - - - - 良品铺子肉松饼1000g/箱 面... - - - - 委托价:¥34.90 - - - 数量:100个 + 数量:{{item.number}} @@ -81,7 +64,9 @@ - + @@ -91,17 +76,15 @@ - @@ -157,7 +181,7 @@ .content_center-one { display: flex; - padding: 0 28rpx; + .center-one { margin-top: 32rpx; @@ -391,6 +415,7 @@ font-weight: 500; color: #FFFFFF; } + .release_btn { margin-top: 100rpx; } diff --git a/pages/commissionedSales/delegation_details/index.vue b/pages/commissionedSales/delegation_details/index.vue index df12537..bf4a44a 100644 --- a/pages/commissionedSales/delegation_details/index.vue +++ b/pages/commissionedSales/delegation_details/index.vue @@ -1,6 +1,17 @@ \ No newline at end of file diff --git a/pages/commissionedSales/initiateDelegation/index.vue b/pages/commissionedSales/initiateDelegation/index.vue index ce2d100..1f8eaf2 100644 --- a/pages/commissionedSales/initiateDelegation/index.vue +++ b/pages/commissionedSales/initiateDelegation/index.vue @@ -6,7 +6,7 @@ - + @@ -35,7 +35,7 @@ 处理 - + 详情 @@ -90,7 +90,15 @@ + + + + + + 新增委托 + + @@ -235,6 +243,7 @@ \ No newline at end of file diff --git a/pages/gather/gather.vue b/pages/gather/gather.vue index e96c03d..0200a53 100644 --- a/pages/gather/gather.vue +++ b/pages/gather/gather.vue @@ -127,7 +127,8 @@ 交易大厅 - + 委托销售 @@ -150,7 +151,8 @@ - + + 里海云仓 @@ -220,6 +222,9 @@ + + + + + + + \ No newline at end of file diff --git a/pages/releaseManagement/index.vue b/pages/releaseManagement/index.vue index eb3e655..fc90054 100644 --- a/pages/releaseManagement/index.vue +++ b/pages/releaseManagement/index.vue @@ -5,15 +5,41 @@ - + - + + - + + + - + + + {{item.title}} + + + + ¥ {{item.discount_price}} + + + 结算价:¥{{item.discount_price}} + + + + + + 类型:调货 + + + 类型:打折 + + + {{item.title}} @@ -28,6 +54,9 @@ 类型:打折 + + + @@ -63,13 +92,25 @@ - - - 拒绝 - + + + + 拒绝 + - - 同意 + + 同意 + + + + + 拒绝 + + + + 同意 + @@ -89,9 +130,7 @@