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 @@
-
- {{ setFormData.store_name.length }}
- 0
- /60
+
+ (品牌,名称,规格,口味)
+
+ {{ setFormData.store_name.length }}
+ 0/60
+
- 建议:图片尺寸为750*750px, 上传2张以上
+ 建议:图片尺寸为750*750px, 上传2张以上
@@ -84,7 +86,7 @@
-
+
+
-
+
关键字
@@ -799,6 +801,10 @@
return;
}
},
+ // 更新商品条码
+ updateCode(e){
+ this.code = e + '';
+ },
// 选择规格部分(新)结束
// switch切换
switchChange(value, item) {
diff --git a/pages/product/addGoods/price.vue b/pages/product/addGoods/price.vue
index ad7de0c..ebd5b93 100644
--- a/pages/product/addGoods/price.vue
+++ b/pages/product/addGoods/price.vue
@@ -29,7 +29,7 @@
price: '', // 售价
cost: '', // 成本价
stock: '', // 库存
- ot_price: '', // 原价
+ ot_price: '', // 批发价
bar_code: '', // 商品条码
weight: '', // 重量
volume: '', // 体积
@@ -39,53 +39,60 @@
},
moreThanFlag: true,
formList: [{
- id: 1,
- label: '售价',
- type: 'digit',
- model: 'price',
- holder: '请填写售价'
- }, {
- id: 10,
- label: '库存',
- type: 'digit',
- model: 'stock',
- holder: '请填写库存',
- disable: true
- }],
- moreThanList: [{
+ id: 1,
+ label: '售价',
+ type: 'digit',
+ model: 'price',
+ holder: '请填写售价',
+ require: true,
+ }, {
+ id: 10,
+ label: '库存',
+ type: 'digit',
+ model: 'stock',
+ holder: '请填写库存',
+ disable: true,
+ require: true,
+ }, {
id: 2,
label: '成本价',
type: 'digit',
holder: '请填写成本价',
- model: 'cost'
+ model: 'cost',
+ require: true,
},
{
id: 3,
- label: '原价',
+ label: '批发价',
type: 'digit',
- holder: '请填写原价',
- model: 'ot_price'
- },
- {
- id: 5,
- label: '商品条码',
- type: 'input',
- holder: '请填写商品条码',
- model: 'bar_code'
- },
- {
+ holder: '请填写批发价',
+ model: 'ot_price',
+ require: true,
+ }
+ ],
+ moreThanList: [{
id: 6,
label: '重量',
type: 'digit',
holder: '请输入重量',
- model: 'weight'
+ model: 'weight',
+ require: false,
},
{
id: 7,
label: '体积',
type: 'digit',
holder: '请输入体积',
- model: 'volume'
+ model: 'volume',
+ require: false,
+ },
+ {
+ id: 5,
+ label: '商品条码',
+ type: 'input',
+ holder: '请填写商品条码',
+ model: 'bar_code',
+ require: false,
},
// {
// id: 8,
@@ -111,6 +118,7 @@
handler(val, old) {
this.singleSpecification = val;
this.saveSingleSpecification();
+ this.$emit('updateCode', val.bar_code);
},
deep: true
},
@@ -148,7 +156,7 @@
}
})
}
- this.singleSpecification.bar_code = this.$props.bar_code;
+ this.singleSpecification.bar_code = this.$props.bar_code + '';
// if (!this.$props.product_id) {
// this.formList.push({
// id: 10,
@@ -171,7 +179,7 @@
spliceMoreThan() {
this.moreThanFlag = true;
// this.formList.splice(!this.$props.product_id ? 2 : 1, this.formList.length);
- this.formList.splice(2, this.formList.length);
+ this.formList.splice(4, this.formList.length);
},
input(val) {
this.singleSpecification = val
diff --git a/pages/product/addGoods/secound.vue b/pages/product/addGoods/secound.vue
index f63dee5..659e7f8 100644
--- a/pages/product/addGoods/secound.vue
+++ b/pages/product/addGoods/secound.vue
@@ -271,6 +271,8 @@
if(!postData.unit_name||postData.unit_name?.trim().length<=0)return Toast('请输入商品单位');
if(!postData.attrValue[0]?.price||postData.attrValue[0]?.price<0)return Toast('价格不能小于0');
if(!postData.stock||postData.stock<0)return Toast('库存不能小于0');
+ if(!postData.attrValue[0]?.cost||postData.attrValue[0]?.cost<0)return Toast('成本价不能小于0');
+ if(!postData.attrValue[0]?.ot_price||postData.attrValue[0]?.ot_price<0)return Toast('批发价不能小于0');
// if(!postData.content.title||postData.content.title?.trim().length<=0)return Toast('请输入商品详情');
// if(!postData.content.image||postData.content.image?.length<=0)return Toast('请上传商品图片');
// return Toast('通过');
diff --git a/pages/product/components/inputGoodsDetils.vue b/pages/product/components/inputGoodsDetils.vue
index c43097a..9b408b0 100644
--- a/pages/product/components/inputGoodsDetils.vue
+++ b/pages/product/components/inputGoodsDetils.vue
@@ -1,12 +1,12 @@
-
+
diff --git a/pages/product/components/selectForm.vue b/pages/product/components/selectForm.vue
index 71858d4..56b1156 100644
--- a/pages/product/components/selectForm.vue
+++ b/pages/product/components/selectForm.vue
@@ -2,6 +2,7 @@
+ *
diff --git a/pages/users/order_confirm/index.vue b/pages/users/order_confirm/index.vue
index 56d561b..547cbbe 100644
--- a/pages/users/order_confirm/index.vue
+++ b/pages/users/order_confirm/index.vue
@@ -1083,7 +1083,8 @@
that.order_key = res.data.key
that.cartArr[4].title =
`结算周期:${res.data.order[0].settle_cycle}天 日利率:${res.data.order[0].interest_rate}%`
-
+
+ // console.log(res.data);
if (res.data.order[0].credit_buy == 1 && (this.type_id == 12||this.type_id == 10||this.type_id == 17) && (res.data.order_type==99||res.data.order_type==98)) {
this.cartArr[4].payStatus = 1
} else {