diff --git a/components/shortPopup.vue b/components/shortPopup.vue
index 7937781..751e129 100644
--- a/components/shortPopup.vue
+++ b/components/shortPopup.vue
@@ -151,6 +151,11 @@
},
// 输入购买数量
inputCartNum(e) {
+ if(/\D/.test(this.cart_num+'')){
+ return this.$nextTick(()=>{
+ this.cart_num = this.cart_num.replace(/\D/g, '');
+ })
+ }
if(this.sku){
if (+e.detail.value > this.sku[this.changeSkuKey].stock) {
uni.showToast({
diff --git a/pages/admin/delivery/index.vue b/pages/admin/delivery/index.vue
index 6ff4819..3e013f9 100644
--- a/pages/admin/delivery/index.vue
+++ b/pages/admin/delivery/index.vue
@@ -205,7 +205,8 @@
props: {},
data: function() {
return {
- types: [{
+ types: [
+ {
type: 1,
title: "发货"
},
@@ -235,6 +236,7 @@
delivery: {
user: {}
},
+ mer_info: {},
logistics: [],
delivery_type: 1,
delivery_name: "",
@@ -278,6 +280,15 @@
},
computed: mapGetters(['viewColor']),
onLoad: function(option) {
+ let userInfo = this.$store.state.app.userInfo;
+ if(typeof userInfo == 'string') userInfo = JSON.parse(userInfo);
+ this.mer_info = userInfo.mer_info;
+ if(this.mer_info.type_code == "TypeSupplyChain"){
+ this.types = this.types.filter(item=>{
+ return item.type==2;
+ })
+ this.delivery_type = 2;
+ }
this.order_id = option.id;
this.merId = option.merId
this.getIndex();
diff --git a/pages/nongKe/supply_chain/merchant.vue b/pages/nongKe/supply_chain/merchant.vue
index 14300b9..f2f5616 100644
--- a/pages/nongKe/supply_chain/merchant.vue
+++ b/pages/nongKe/supply_chain/merchant.vue
@@ -41,10 +41,10 @@
- 采购清单
+ 采购清单{{goodsNum}}
-
+
颜色规格
@@ -89,6 +89,9 @@
import {
changeCartNum
} from '@/api/order.js';
+ import {
+ getCartCounts
+ } from '@/api/requesta.js';
import shortPopup from "@/components/shortPopup.vue"
export default {
components: {
@@ -136,7 +139,8 @@
cart_num: 0
}],
goodsLite: {},
- goodsindexL: ''
+ goodsindexL: '',
+ goodsNum: 0
}
},
onLoad(e) {
@@ -148,7 +152,9 @@
// this.list = res.data.list
// })
},
- onShow() {},
+ onShow() {
+ this.cartFn()
+ },
methods: {
initStore(){
getStoreDetail(this.id).then(res=>{
@@ -157,6 +163,15 @@
console.log(e);
})
},
+ // 购物车信息
+ cartFn() {
+ getCartCounts({
+ product_type: 98,
+ source: 11
+ }).then(res => {
+ this.goodsNum = res.data[0].count
+ })
+ },
async searchBtn() {
this.infoData.page = 1
const res = await getStoreGoods(this.id, this.infoData)
@@ -258,7 +273,7 @@
* 跳转到产品详情
*/
navToGoodsDetails(item){
- this.$refs.shortPopupRef.setDatas(item);
+ this.$refs.shortPopupRef.setDatas(item, this.goodsNum);
this.$refs.shortPopupRef.open();
// uni.navigateTo({
// url: `/pages/goods_details/index?id=${item.product_id}&referer=`
diff --git a/pages/nongKe/supply_chain/shopping_trolley.vue b/pages/nongKe/supply_chain/shopping_trolley.vue
index 3580d1c..6ff590c 100644
--- a/pages/nongKe/supply_chain/shopping_trolley.vue
+++ b/pages/nongKe/supply_chain/shopping_trolley.vue
@@ -695,6 +695,11 @@
}
},
inputNum(goods){
+ if(/\D/.test(goods.cart_num+'')){
+ return this.$nextTick(()=>{
+ goods.cart_num = goods.cart_num.replace(/\D/g, '');
+ })
+ }
let cart_num = Number(goods.cart_num);
if(cart_num>+goods.productAttr.stock) {
this.$nextTick(()=>{
@@ -845,7 +850,7 @@
el.list.forEach(e => {
if (e.check) {
totalMoney = this.$util.$h.Add(totalMoney, this.$util.$h.Mul(e.productAttr.procure_price, e.cart_num))
- totalNum += e.cart_num
+ totalNum += +e.cart_num
}
})
})
diff --git a/pages/nongKe/supply_chain/shopping_trolley_a.vue b/pages/nongKe/supply_chain/shopping_trolley_a.vue
index f64d975..c02a6be 100644
--- a/pages/nongKe/supply_chain/shopping_trolley_a.vue
+++ b/pages/nongKe/supply_chain/shopping_trolley_a.vue
@@ -682,6 +682,11 @@
}
},
inputNum(goods){
+ if(/\D/.test(goods.cart_num+'')){
+ return this.$nextTick(()=>{
+ goods.cart_num = goods.cart_num.replace(/\D/g, '');
+ })
+ }
let cart_num = Number(goods.cart_num);
if(cart_num>+goods.productAttr.stock) {
this.$nextTick(()=>{
@@ -832,7 +837,7 @@
el.list.forEach(e => {
if (e.check) {
totalMoney = this.$util.$h.Add(totalMoney, this.$util.$h.Mul(e.productAttr.procure_price, e.cart_num))
- totalNum += e.cart_num
+ totalNum += +e.cart_num
}
})
})
diff --git a/pages/nongKe/supply_chain/shopping_trolley_other.vue b/pages/nongKe/supply_chain/shopping_trolley_other.vue
index c308162..7df678f 100644
--- a/pages/nongKe/supply_chain/shopping_trolley_other.vue
+++ b/pages/nongKe/supply_chain/shopping_trolley_other.vue
@@ -684,6 +684,11 @@
}
},
inputNum(goods){
+ if(/\D/.test(goods.cart_num+'')){
+ return this.$nextTick(()=>{
+ goods.cart_num = goods.cart_num.replace(/\D/g, '');
+ })
+ }
let cart_num = Number(goods.cart_num);
if(cart_num>+goods.productAttr.stock) {
this.$nextTick(()=>{
@@ -840,7 +845,7 @@
el.list.forEach(e => {
if (e.check) {
totalMoney = this.$util.$h.Add(totalMoney, this.$util.$h.Mul(e.productAttr.procure_price, e.cart_num))
- totalNum += e.cart_num
+ totalNum += +e.cart_num
}
})
})
diff --git a/pages/order_details/index.vue b/pages/order_details/index.vue
index 16d9315..e83bece 100644
--- a/pages/order_details/index.vue
+++ b/pages/order_details/index.vue
@@ -306,7 +306,7 @@
-
+ 申请开票
查看详情