From 40c8b5725e562a9a257cde87aacbe9ced70faf1b Mon Sep 17 00:00:00 2001 From: weipengfei <2187978347@qq.com> Date: Wed, 1 Nov 2023 20:01:52 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/api.js | 3 + components/orderGoods/index.vue | 10 +- .../commissionedSales/addDelegation/index.vue | 10 +- .../delegation_details/index.vue | 6 +- .../initiateDelegation/index.vue | 49 +++++---- .../receivedCommission/index.vue | 2 +- pages/nongKe/gather/select_warehouse.vue | 99 +++++++++++++++---- pages/nongKe/supply_chain/merchant.vue | 2 +- pages/order_details/index.vue | 10 +- pages/product/addGoods/commodity.vue | 5 - pages/product/addGoods/index.vue | 30 +++--- pages/product/addGoods/price.vue | 72 ++++++++------ pages/product/addGoods/secound.vue | 2 + pages/product/components/inputGoodsDetils.vue | 4 +- pages/product/components/selectForm.vue | 1 + pages/users/order_confirm/index.vue | 3 +- 16 files changed, 203 insertions(+), 105 deletions(-) diff --git a/api/api.js b/api/api.js index 4b95329..4e21df4 100644 --- a/api/api.js +++ b/api/api.js @@ -36,6 +36,9 @@ export function get_cloud_shop(street_code) { export function post_product_import(id) { return request.post(`micro/product_import`, { id: id }, { noAuth: true }); } +export function micro_product_import(data) { + return request.post(`micro/product_import`, data, { noAuth: true }); +} /** * 公共接口 ,优惠券接口 , 行业此讯 , 手机号码注册 * diff --git a/components/orderGoods/index.vue b/components/orderGoods/index.vue index f1c4653..caab887 100644 --- a/components/orderGoods/index.vue +++ b/components/orderGoods/index.vue @@ -46,7 +46,7 @@ 已退款 x {{item.product_num - item.refund_num}} - 去评价 已评价 @@ -116,7 +116,7 @@ v-if="(item.is_refund ==0 && (evaluate != 10 && evaluate != 11) && orderData.refund_status || item.refund_num > 0)&& evaluate!=9 &&evaluate != 1&&evaluate !=4&& evaluate!=3 || evaluate==2" @click.stop="refund(item)">申请退款 去评价 已评价 @@ -177,7 +177,11 @@ default: function() { return {}; } - } + }, + order_status:{ + type: Number, + default: 0, + } }, computed: mapGetters(['viewColor']), data() { diff --git a/pages/commissionedSales/addDelegation/index.vue b/pages/commissionedSales/addDelegation/index.vue index dfd1189..f1fd411 100644 --- a/pages/commissionedSales/addDelegation/index.vue +++ b/pages/commissionedSales/addDelegation/index.vue @@ -119,7 +119,7 @@ this.type = e.type if (this.type) { uni.setNavigationBarTitle({ - title: '编辑打折' + title: '编辑委托' }) this.editlist(e.id) } @@ -192,13 +192,19 @@ }, //提交 formSubmit(e) { - console.log(e) + // console.log(e) let that = this, value = that.formData; if (value.entrust_day.length == 0 || value.entrust_day <= 0) return that.$util.Tips({ title: '请选择委托周期' }); + if (value.entrust_day < 15) return that.$util.Tips({ + title: '委托周期不得小于15天' + }); + if (value.entrust_day > 90) return that.$util.Tips({ + title: '委托周期不得大于90天' + }); if (value.product_info.length == 0) return that.$util.Tips({ title: '请选择产品' }); diff --git a/pages/commissionedSales/delegation_details/index.vue b/pages/commissionedSales/delegation_details/index.vue index f37ac9c..541fd3b 100644 --- a/pages/commissionedSales/delegation_details/index.vue +++ b/pages/commissionedSales/delegation_details/index.vue @@ -64,7 +64,7 @@ {{objinfo.entrust_day}}天 - + 结算周期: @@ -72,7 +72,7 @@ {{objinfo.mer_info.settle_cycle}}天 - + 结算利息: @@ -154,11 +154,13 @@ } ], type: 0, + credit_buy: 0, } }, onLoad(e) { this.list(e.id) this.type = e.type + this.credit_buy = e.credit_buy || 0; }, onShow() { diff --git a/pages/commissionedSales/initiateDelegation/index.vue b/pages/commissionedSales/initiateDelegation/index.vue index 17180e7..8613885 100644 --- a/pages/commissionedSales/initiateDelegation/index.vue +++ b/pages/commissionedSales/initiateDelegation/index.vue @@ -53,9 +53,9 @@ 编辑 - + 详情 @@ -386,7 +386,7 @@ detail(item) { uni.navigateTo({ - url: '/pages/commissionedSales/delegation_details/index?id=' + item.community_id + url: `/pages/commissionedSales/delegation_details/index?id=${item.community_id}&credit_buy=${item.mer_info.credit_buy}` }) }, // 待处理 @@ -437,24 +437,31 @@ }, //删除订单 deleteOrder(item) { - - checkchain(item.community_id, { - status: 3 - }).then(res => { - this.$util.Tips({ - title: res.message, - icon: 'success' - }) - this.orderList = [] - this.tabTitle = "tabOne" - this.commislist() - }).catch((err) => { - console.log(err) - this.$util.Tips({ - title: err, - icon: 'error' - }) - }) + uni.showModal({ + title:'警告', + content:'删除后不可恢复, 是否继续删除?', + complete: (e) => { + if(e.confirm){ + checkchain(item.community_id, { + status: 3 + }).then(res => { + this.$util.Tips({ + title: res.message, + icon: 'success' + }) + this.orderList = [] + this.tabTitle = "tabOne" + this.commislist() + }).catch((err) => { + console.log(err) + this.$util.Tips({ + title: err, + icon: 'error' + }) + }) + } + } + }) }, // 审核未通过 编辑 auditEdit() { diff --git a/pages/commissionedSales/receivedCommission/index.vue b/pages/commissionedSales/receivedCommission/index.vue index 3685c2a..5d9976b 100644 --- a/pages/commissionedSales/receivedCommission/index.vue +++ b/pages/commissionedSales/receivedCommission/index.vue @@ -367,7 +367,7 @@ //详情 detail(item) { uni.navigateTo({ - url: '/pages/commissionedSales/delegation_details/index?id=' + item.community_id + url: `/pages/commissionedSales/delegation_details/index?id=${item.community_id}&credit_buy=${item.mer_info.credit_buy}` }) }, // 待处理 diff --git a/pages/nongKe/gather/select_warehouse.vue b/pages/nongKe/gather/select_warehouse.vue index ee4f268..c6fdf24 100644 --- a/pages/nongKe/gather/select_warehouse.vue +++ b/pages/nongKe/gather/select_warehouse.vue @@ -12,12 +12,13 @@ - + + {{ item.store_name }} ¥{{ item.price }} - 加入仓库 + 加入店铺 @@ -43,8 +44,25 @@ - + + + + 是否添加到你的仓库中? + + 价格: + + + + 库存: + + + + 取消 + 确定 + + + @@ -68,7 +86,7 @@ } from '@/api/store.js' import { seachBarCodeAPI, - post_product_import + micro_product_import } from '@/api/api.js' import { Toast @@ -77,7 +95,7 @@ data() { return { goodsData: [{ - name: '', + name: '商品名称添加', type: 1, src: 'https://lihai001.oss-cn-chengdu.aliyuncs.com/public/kk/luzhou/static4/mingcheng.png' }, @@ -96,7 +114,24 @@ mer_id: 0, searchGoodsShow: false, searchGoodsName: '', - goods: [], + goods: [ + // { + // "id": 5, + // "store_name": "雨森电商纯木生活260张面巾纸 170X118X260张(5层)", + // "bar_code": "6940074914381", + // "unit_name": "", + // "price": "0.00", + // "cost": "0.00", + // "ot_price": "0.00", + // "stock": 9999999, + // "image": "127.0.0.1:8324/uploads/img/2023-11-01/1698809432.jpg" + // } + ], + putGoods: { + id: '', + price: '', + stock: '', + }, item: [], addGoodsShow: false, stype: '', @@ -104,28 +139,37 @@ }, onLoad(e) { this.mer_id = e.mer_id - this.stype = e.stype - if (this.stype == 1) { - return this.goodsData[0].name = '商品添加' - } - if (this.stype == 2) { - return this.goodsData[0].name = '商品名称添加' - } + // this.stype = e.stype + this.stype = 2 + // if (this.stype == 1) { + // return this.goodsData[0].name = '商品添加' + // } + // if (this.stype == 2) { + // return this.goodsData[0].name = '商品名称添加' + // } }, onShow() { }, methods: { addGoods(item) { + this.putGoods.id = item.id; + this.putGoods.price = ''; + this.putGoods.stock = ''; + this.addGoodsShow = true this.item = item }, addGoodsopen() { - if (this.item) { - post_product_import(this.item.product_id).then(e => { + if (this.putGoods.id) { + console.log('开始'); + micro_product_import(this.putGoods).then(e => { if (e.status == 200) { Toast(e.data.msg) - this.addGoodsShow = false + this.goods = this.goods.filter(item=>{ + return item.id != this.putGoods.id + }) + this.addGoodsShow = false; } else { // console.log(e); Toast(e.message) @@ -149,6 +193,13 @@ }, openSearch() {}, async searchGoodsClose() { + if(this.searchGoodsName=='') { + this.searchGoodsShow = false + this.$nextTick(()=>{ + Toast('请输入商品名称') + }) + return ; + } const rq = { mer_id: this.mer_id, name: this.searchGoodsName @@ -192,6 +243,7 @@ }); return; } + this.searchGoodsName = ''; this.searchGoodsShow = true } else { this.scanCode(); @@ -217,10 +269,12 @@ }) }, async seachBarCode(code) { + console.log('扫码的值', code); await seachBarCodeAPI({ code: code, mer_id: this.mer_id }).then(res => { + console.log(res); if (!res.data) { uni.showToast({ title: res.message, @@ -236,7 +290,9 @@ } this.goods = res.data.list } - }) + }).catch((err)=>{ + console.log('错误',err); + }) }, @@ -311,6 +367,13 @@ padding: 12px; margin: 21.05rpx 0; } + + .putGoods { + height: 87.72rpx; + border: 1px solid #f5f5f5; + border-radius: 8px; + padding: 12px; + } .search_goods_btn { margin-top: 28.07rpx; diff --git a/pages/nongKe/supply_chain/merchant.vue b/pages/nongKe/supply_chain/merchant.vue index 789b784..b2b44c6 100644 --- a/pages/nongKe/supply_chain/merchant.vue +++ b/pages/nongKe/supply_chain/merchant.vue @@ -26,7 +26,7 @@ {{ item.store_name }} 分类:{{ item.cate_name ? item.cate_name : '无' }} - 单位:{{ item.unit_name }} + 单位:{{ item.unit_name ? item.unit_name : '无' }} 条形码:{{item.bar_code?item.bar_code : '无'}} diff --git a/pages/order_details/index.vue b/pages/order_details/index.vue index fd8c56e..7c47e19 100644 --- a/pages/order_details/index.vue +++ b/pages/order_details/index.vue @@ -30,6 +30,7 @@ + 待付款 待发货 等待其他人参加拼团 待核销 @@ -50,7 +51,7 @@ :class="orderInfo.order_status == 8||orderInfo.order_status == 1||orderInfo.order_status == 9 ? 'on':''"> 待付款 待发货 - + :activityType='orderInfo.activity_type' :orderId="order_id" :cartInfo="cartInfo" :jump="true" :order_status="orderInfo.order_status"> + :orderId="item.order_id" :cartInfo="item.orderProduct" :jump="true" :order_status="orderInfo.order_status"> @@ -319,7 +319,7 @@ 取消订单 - + 批量退款 diff --git a/pages/product/addGoods/commodity.vue b/pages/product/addGoods/commodity.vue index c8d718e..50ac6cd 100644 --- a/pages/product/addGoods/commodity.vue +++ b/pages/product/addGoods/commodity.vue @@ -4,11 +4,6 @@ 商品详情 - diff --git a/pages/product/addGoods/index.vue b/pages/product/addGoods/index.vue index df2b7b1..d05d363 100644 --- a/pages/product/addGoods/index.vue +++ b/pages/product/addGoods/index.vue @@ -3,7 +3,7 @@ - 商品编码 + 商品条码 @@ -11,14 +11,16 @@