This commit is contained in:
parent
fcc6a0faa9
commit
04b40ebb48
|
@ -151,6 +151,11 @@
|
||||||
},
|
},
|
||||||
// 输入购买数量
|
// 输入购买数量
|
||||||
inputCartNum(e) {
|
inputCartNum(e) {
|
||||||
|
if(/\D/.test(this.cart_num+'')){
|
||||||
|
return this.$nextTick(()=>{
|
||||||
|
this.cart_num = this.cart_num.replace(/\D/g, '');
|
||||||
|
})
|
||||||
|
}
|
||||||
if(this.sku){
|
if(this.sku){
|
||||||
if (+e.detail.value > this.sku[this.changeSkuKey].stock) {
|
if (+e.detail.value > this.sku[this.changeSkuKey].stock) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
|
|
|
@ -205,7 +205,8 @@
|
||||||
props: {},
|
props: {},
|
||||||
data: function() {
|
data: function() {
|
||||||
return {
|
return {
|
||||||
types: [{
|
types: [
|
||||||
|
{
|
||||||
type: 1,
|
type: 1,
|
||||||
title: "发货"
|
title: "发货"
|
||||||
},
|
},
|
||||||
|
@ -235,6 +236,7 @@
|
||||||
delivery: {
|
delivery: {
|
||||||
user: {}
|
user: {}
|
||||||
},
|
},
|
||||||
|
mer_info: {},
|
||||||
logistics: [],
|
logistics: [],
|
||||||
delivery_type: 1,
|
delivery_type: 1,
|
||||||
delivery_name: "",
|
delivery_name: "",
|
||||||
|
@ -278,6 +280,15 @@
|
||||||
},
|
},
|
||||||
computed: mapGetters(['viewColor']),
|
computed: mapGetters(['viewColor']),
|
||||||
onLoad: function(option) {
|
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.order_id = option.id;
|
||||||
this.merId = option.merId
|
this.merId = option.merId
|
||||||
this.getIndex();
|
this.getIndex();
|
||||||
|
|
|
@ -41,10 +41,10 @@
|
||||||
</block>
|
</block>
|
||||||
<u-loadmore :status="status" :loading-text="loadingText" :loadmore-text="loadmoreText" :nomore-text="nomoreText" />
|
<u-loadmore :status="status" :loading-text="loadingText" :loadmore-text="loadmoreText" :nomore-text="nomoreText" />
|
||||||
|
|
||||||
<navigator class="bottom_purchase" url="./shopping_trolley_a" open-type="navigate">采购清单</navigator>
|
<navigator class="bottom_purchase" url="./shopping_trolley_a" open-type="navigate">采购清单<text v-if="goodsNum">{{goodsNum}}</text></navigator>
|
||||||
|
|
||||||
<goodsPopup :goodsStatu="isPopupShow" @colses="isPopupShow=false" :goods_info="goodsInfo"></goodsPopup>
|
<goodsPopup :goodsStatu="isPopupShow" @colses="isPopupShow=false" :goods_info="goodsInfo"></goodsPopup>
|
||||||
<shortPopup ref="shortPopupRef" ></shortPopup>
|
<shortPopup ref="shortPopupRef"></shortPopup>
|
||||||
<u-popup :show="show" @close="close">
|
<u-popup :show="show" @close="close">
|
||||||
<view>
|
<view>
|
||||||
<h3 style=" margin: 15px 5px 5px 24px;">颜色规格</h3>
|
<h3 style=" margin: 15px 5px 5px 24px;">颜色规格</h3>
|
||||||
|
@ -89,6 +89,9 @@
|
||||||
import {
|
import {
|
||||||
changeCartNum
|
changeCartNum
|
||||||
} from '@/api/order.js';
|
} from '@/api/order.js';
|
||||||
|
import {
|
||||||
|
getCartCounts
|
||||||
|
} from '@/api/requesta.js';
|
||||||
import shortPopup from "@/components/shortPopup.vue"
|
import shortPopup from "@/components/shortPopup.vue"
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
|
@ -136,7 +139,8 @@
|
||||||
cart_num: 0
|
cart_num: 0
|
||||||
}],
|
}],
|
||||||
goodsLite: {},
|
goodsLite: {},
|
||||||
goodsindexL: ''
|
goodsindexL: '',
|
||||||
|
goodsNum: 0
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad(e) {
|
onLoad(e) {
|
||||||
|
@ -148,7 +152,9 @@
|
||||||
// this.list = res.data.list
|
// this.list = res.data.list
|
||||||
// })
|
// })
|
||||||
},
|
},
|
||||||
onShow() {},
|
onShow() {
|
||||||
|
this.cartFn()
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
initStore(){
|
initStore(){
|
||||||
getStoreDetail(this.id).then(res=>{
|
getStoreDetail(this.id).then(res=>{
|
||||||
|
@ -157,6 +163,15 @@
|
||||||
console.log(e);
|
console.log(e);
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
// 购物车信息
|
||||||
|
cartFn() {
|
||||||
|
getCartCounts({
|
||||||
|
product_type: 98,
|
||||||
|
source: 11
|
||||||
|
}).then(res => {
|
||||||
|
this.goodsNum = res.data[0].count
|
||||||
|
})
|
||||||
|
},
|
||||||
async searchBtn() {
|
async searchBtn() {
|
||||||
this.infoData.page = 1
|
this.infoData.page = 1
|
||||||
const res = await getStoreGoods(this.id, this.infoData)
|
const res = await getStoreGoods(this.id, this.infoData)
|
||||||
|
@ -258,7 +273,7 @@
|
||||||
* 跳转到产品详情
|
* 跳转到产品详情
|
||||||
*/
|
*/
|
||||||
navToGoodsDetails(item){
|
navToGoodsDetails(item){
|
||||||
this.$refs.shortPopupRef.setDatas(item);
|
this.$refs.shortPopupRef.setDatas(item, this.goodsNum);
|
||||||
this.$refs.shortPopupRef.open();
|
this.$refs.shortPopupRef.open();
|
||||||
// uni.navigateTo({
|
// uni.navigateTo({
|
||||||
// url: `/pages/goods_details/index?id=${item.product_id}&referer=`
|
// url: `/pages/goods_details/index?id=${item.product_id}&referer=`
|
||||||
|
|
|
@ -695,6 +695,11 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
inputNum(goods){
|
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);
|
let cart_num = Number(goods.cart_num);
|
||||||
if(cart_num>+goods.productAttr.stock) {
|
if(cart_num>+goods.productAttr.stock) {
|
||||||
this.$nextTick(()=>{
|
this.$nextTick(()=>{
|
||||||
|
@ -845,7 +850,7 @@
|
||||||
el.list.forEach(e => {
|
el.list.forEach(e => {
|
||||||
if (e.check) {
|
if (e.check) {
|
||||||
totalMoney = this.$util.$h.Add(totalMoney, this.$util.$h.Mul(e.productAttr.procure_price, e.cart_num))
|
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
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
|
@ -682,6 +682,11 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
inputNum(goods){
|
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);
|
let cart_num = Number(goods.cart_num);
|
||||||
if(cart_num>+goods.productAttr.stock) {
|
if(cart_num>+goods.productAttr.stock) {
|
||||||
this.$nextTick(()=>{
|
this.$nextTick(()=>{
|
||||||
|
@ -832,7 +837,7 @@
|
||||||
el.list.forEach(e => {
|
el.list.forEach(e => {
|
||||||
if (e.check) {
|
if (e.check) {
|
||||||
totalMoney = this.$util.$h.Add(totalMoney, this.$util.$h.Mul(e.productAttr.procure_price, e.cart_num))
|
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
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
|
@ -684,6 +684,11 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
inputNum(goods){
|
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);
|
let cart_num = Number(goods.cart_num);
|
||||||
if(cart_num>+goods.productAttr.stock) {
|
if(cart_num>+goods.productAttr.stock) {
|
||||||
this.$nextTick(()=>{
|
this.$nextTick(()=>{
|
||||||
|
@ -840,7 +845,7 @@
|
||||||
el.list.forEach(e => {
|
el.list.forEach(e => {
|
||||||
if (e.check) {
|
if (e.check) {
|
||||||
totalMoney = this.$util.$h.Add(totalMoney, this.$util.$h.Mul(e.productAttr.procure_price, e.cart_num))
|
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
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
|
@ -306,7 +306,7 @@
|
||||||
<view class="content-clip"></view>
|
<view class="content-clip"></view>
|
||||||
<view class='footer acea-row row-right row-middle' v-if="isGoodsReturn==false">
|
<view class='footer acea-row row-right row-middle' v-if="isGoodsReturn==false">
|
||||||
<!-- <view class='bnt cancel' @click="cancelSales">取消售后</view> -->
|
<!-- <view class='bnt cancel' @click="cancelSales">取消售后</view> -->
|
||||||
<!-- <view v-if="!orderInfo.receipt && !isGoodsReturn" class='bnt cancel' @click="applyInvoice">申请开票</view> -->
|
<view v-if="!orderInfo.receipt && !isGoodsReturn" class='bnt cancel' @click="applyInvoice">申请开票</view>
|
||||||
<view v-if="orderInfo.activity_type == 2 && (orderInfo.status == 10 || orderInfo.status == 11)"
|
<view v-if="orderInfo.activity_type == 2 && (orderInfo.status == 10 || orderInfo.status == 11)"
|
||||||
class=" acea-row row-right row-middle">
|
class=" acea-row row-right row-middle">
|
||||||
<view v-if="orderInfo.presellOrder.activeStatus == 0" class='bnt b-color btn_auto'>
|
<view v-if="orderInfo.presellOrder.activeStatus == 0" class='bnt b-color btn_auto'>
|
||||||
|
|
|
@ -261,8 +261,8 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class='bottom acea-row row-right row-middle'>
|
<view class='bottom acea-row row-right row-middle'>
|
||||||
<!-- <view v-if="!item.receipt && item.status != -1" class='bnt cancelBnt'
|
<view v-if="!item.receipt && item.status != -1" class='bnt cancelBnt'
|
||||||
@click.stop='applyInvoice(item.order_id)'>申请开票</view> -->
|
@click.stop='applyInvoice(item.order_id)'>申请开票</view>
|
||||||
<block v-if="item.order_status==2">
|
<block v-if="item.order_status==2">
|
||||||
<view class='bnt b-color' @click='consignment(item.order_id)'>去发货</view>
|
<view class='bnt b-color' @click='consignment(item.order_id)'>去发货</view>
|
||||||
</block>
|
</block>
|
||||||
|
|
|
@ -260,8 +260,8 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class='bottom acea-row row-right row-middle'>
|
<view class='bottom acea-row row-right row-middle'>
|
||||||
<!-- <view v-if="!item.receipt && item.status != -1" class='bnt cancelBnt'
|
<view v-if="!item.receipt && item.status != -1 && (item.status != 0)" class='bnt cancelBnt'
|
||||||
@click.stop='applyInvoice(item.order_id)'>申请开票</view> -->
|
@click.stop='applyInvoice(item.order_id)'>申请开票</view>
|
||||||
<block v-if="item.status == 0 || item.status == 9 || item.status == -1">
|
<block v-if="item.status == 0 || item.status == 9 || item.status == -1">
|
||||||
<view class='bnt b-color' @click='goOrderDetails(item.order_id, item)'>查看详情</view>
|
<view class='bnt b-color' @click='goOrderDetails(item.order_id, item)'>查看详情</view>
|
||||||
</block>
|
</block>
|
||||||
|
|
Loading…
Reference in New Issue