下单退款相关更新
This commit is contained in:
@@ -148,7 +148,6 @@
|
||||
getConsGrpupList({
|
||||
page: 1,
|
||||
size: 30,
|
||||
shopId: uni.getStorageSync("shopId"),
|
||||
}).then(res => {
|
||||
datas.typeList = res
|
||||
res.forEach(ele => {
|
||||
|
||||
@@ -1,72 +1,60 @@
|
||||
<template>
|
||||
<view style="position: fixed;right: 50rpx;top: 80vh;background-color: #fff;border-radius: 50%;width: 65rpx;height: 65rpx;display: flex;align-items: center;justify-content: center;">
|
||||
<image src="./time.png" style="width: 50rpx;height: 50rpx;" @tap="popPu"
|
||||
mode=""></image>
|
||||
</view>
|
||||
<view :style="{height:showStatus?statusHeight:0}" class="tranistion status overflow-hide">
|
||||
<view @tap="changeNowStatusIndex(index)" class="u-flex u-p-l-30 lh30 u-p-r-30 u-row-between"
|
||||
v-for="(item,index) in datas.status" :key="index">
|
||||
<view :class="{'color-main':nowStatusIndex===index}">{{item.conTypeName}}</view>
|
||||
<uni-icons v-if="nowStatusIndex===index" type="checkmarkempty" :color="color.ColorMain"></uni-icons>
|
||||
</view>
|
||||
<view :style="{height: '14px'}"></view>
|
||||
</view>
|
||||
<view class="viewrecordsTop">
|
||||
<view class="viewrecordsTop" v-if="datas.countList">
|
||||
<view style="padding:32rpx 16rpx;">
|
||||
<view @tap="getNewdata('addCountNumber')">
|
||||
<view @tap="getInOutType('in')">
|
||||
增加数量 <text
|
||||
style="color: #76ACF0;font-weight: bold;">{{datas.countList.addCountNumber?datas.countList.addCountNumber:'0'}}</text>
|
||||
style="color: #76ACF0;font-weight: bold;">{{datas.countList.inSumTotal?datas.countList.inSumTotal:'0'}}</text>
|
||||
</view>
|
||||
<view class="df viewdf">
|
||||
<view @tap="getNewdata('stockInNumber')"
|
||||
<view @tap="getNewdata('manual-in','in')"
|
||||
style="font-size: 24rpx;border-right: 1px solid #999; width: 142rpx;text-align: center;">
|
||||
<view style="color: #999999;">
|
||||
入库
|
||||
</view>
|
||||
<view class="">
|
||||
{{datas.countList.stockInNumber?datas.countList.stockInNumber:0}}
|
||||
{{datas.countList.stockInNum?datas.countList.stockInNum:0}}
|
||||
</view>
|
||||
</view>
|
||||
<view @tap="getNewdata('addNumber')" style="font-size: 24rpx;width: 178rpx;text-align: center;">
|
||||
<view @tap="getNewdata('win-in','in')" style="font-size: 24rpx;width: 178rpx;text-align: center;">
|
||||
<view style="color: #999999;">
|
||||
手动增加
|
||||
</view>
|
||||
<view class="">
|
||||
{{datas.countList.addNumber?datas.countList.addNumber:'0'}}
|
||||
{{datas.countList.winInNum?datas.countList.winInNum:'0'}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view style="padding:32rpx 16rpx;">
|
||||
<view class="" @tap="getNewdata('subCountNumber')">
|
||||
<view class="" @tap="getInOutType('out')">
|
||||
减少数量 <text
|
||||
style="color: #52BDA4;font-weight: bold;">{{datas.countList.subCountNumber?datas.countList.subCountNumber:0}}</text>
|
||||
style="color: #52BDA4;font-weight: bold;">{{datas.countList.outSumTotal?datas.countList.outSumTotal:0}}</text>
|
||||
</view>
|
||||
<view class="df viewdf">
|
||||
<view @tap="getNewdata('subNumber')"
|
||||
<view @tap="getNewdata('loss-out','out')"
|
||||
style="font-size: 24rpx;border-right: 1px solid #999; width: 112rpx;text-align: center;">
|
||||
<view style="color: #999999;">
|
||||
手动减少
|
||||
</view>
|
||||
<view class="">
|
||||
{{datas.countList.subNumber?datas.countList.subNumber:0}}
|
||||
{{datas.countList.lossOutNum?datas.countList.lossOutNum:0}}
|
||||
</view>
|
||||
</view>
|
||||
<view @tap="getNewdata('stockOutNumber')"
|
||||
<view @tap="getNewdata('manual-out','out')"
|
||||
style="font-size: 24rpx;border-right: 1px solid #999; width: 82rpx;text-align: center;">
|
||||
<view style="color: #999999;">
|
||||
出库
|
||||
</view>
|
||||
<view class="">
|
||||
{{datas.countList.stockOutNumber?datas.countList.stockOutNumber:0}}
|
||||
{{datas.countList.stockOutNum?datas.countList.stockOutNum:0}}
|
||||
</view>
|
||||
</view>
|
||||
<view @tap="getNewdata('saleNumber')" style="font-size: 24rpx;width: 112rpx;text-align: center;">
|
||||
<view @tap="getNewdata('order-out','out')" style="font-size: 24rpx;width: 112rpx;text-align: center;">
|
||||
<view style="color: #999999;">
|
||||
商品消耗
|
||||
</view>
|
||||
<view class="">
|
||||
{{datas.countList.saleNumber?datas.countList.saleNumber:0}}
|
||||
{{datas.countList.consumeNum?datas.countList.consumeNum:0}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -75,26 +63,22 @@
|
||||
<view class="viewrecords">
|
||||
<view v-for="item in datas.list" :key="item.id">
|
||||
<view class="">
|
||||
<view class="">
|
||||
{{item.createTime}}
|
||||
</view>
|
||||
<view class="">
|
||||
{{item.operator}} {{item.bizName}}
|
||||
</view>
|
||||
<view class=""> {{item.createTime}} </view>
|
||||
<view class=""> {{item.operator}} {{item.conName}} </view>
|
||||
</view>
|
||||
<view class="">
|
||||
<view class="">
|
||||
<view style="font-size: 24rpx;color: #666666;">
|
||||
库存 {{ inventory(item.balance,item.bizType,item.amount)}} <text
|
||||
:style="{color:item.bizType=='+'?'#1bca72':'red'}"> → {{ item.amount|0 }}</text>
|
||||
库存 {{ item.beforeNumber }} <text
|
||||
:style="{color:item.inOutType=='in'?'#1bca72':'red'}"> → {{ item.inOutNumber|0 }}</text>
|
||||
</view>
|
||||
<view style="font-size: 24rpx;color: #666666;">
|
||||
剩余库存 {{item.balance}}
|
||||
剩余库存 {{item.afterNumber}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="">
|
||||
<view :style="{color:item.bizType=='+'?'#1bca72':'red'}" style="font-weight: 400;">
|
||||
{{ item.bizType }}{{ item.amount|0 }}
|
||||
<view :style="{color:item.inOutType=='in'?'#1bca72':'red'}" style="font-weight: 400;">
|
||||
{{ item.inOutType == 'in' ? '+' : '-' }}{{ item.inOutNumber|0 }}
|
||||
</view>
|
||||
<view style="font-size: 24rpx;color: #666666;">
|
||||
变动库存
|
||||
@@ -103,24 +87,13 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<datePickerview @confirm="datePickerConfirm" ref="datePicker"></datePickerview>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {
|
||||
onMounted,
|
||||
reactive,
|
||||
ref,
|
||||
computed,
|
||||
getCurrentInstance
|
||||
} from 'vue';
|
||||
import datePickerview from './components/my-date-pickerview.vue'
|
||||
import { onMounted, reactive, ref, computed, getCurrentInstance } from 'vue';
|
||||
import color from '@/commons/color.js';
|
||||
import {
|
||||
tbConsInfoFlowstock,
|
||||
tbConsInfoFlowcount,
|
||||
tbConsTypes
|
||||
} from '@/http/yskApi/requestAll.js';
|
||||
import { stockFlow,consStatistics } from '@/http/api/cons.js';
|
||||
|
||||
let props = defineProps({
|
||||
item: {
|
||||
type: String
|
||||
@@ -129,88 +102,55 @@
|
||||
|
||||
let datas = reactive({
|
||||
list: [],
|
||||
countList: null,
|
||||
// 类型
|
||||
status: [],
|
||||
statusTitle: "类型"
|
||||
countList: {},
|
||||
inOutType: '',
|
||||
inOutItem: '',
|
||||
})
|
||||
let showStatus = ref(false)
|
||||
|
||||
onMounted(() => {
|
||||
let items = JSON.parse(props.item)
|
||||
getlist()
|
||||
})
|
||||
const refs = getCurrentInstance()
|
||||
let popPu = () => {
|
||||
refs.ctx.$refs.datePicker.toggle()
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 时间筛选
|
||||
* @param {Object} e
|
||||
*/
|
||||
function datePickerConfirm(e) {
|
||||
getlist("", e.start, e.end)
|
||||
}
|
||||
|
||||
function inventory(a, b, c) {
|
||||
let data = 0
|
||||
if (b == '-') {
|
||||
data = a + c
|
||||
} else {
|
||||
data = a - c
|
||||
}
|
||||
return data
|
||||
}
|
||||
let nowStatusIndex = ref(0)
|
||||
let columnName = ref('')
|
||||
let getNewdata = (d) => {
|
||||
columnName.value = d
|
||||
|
||||
function getNewdata (d,e) {
|
||||
datas.inOutType = e
|
||||
datas.inOutItem = d
|
||||
getlist()
|
||||
}
|
||||
|
||||
function changeNowStatusIndex(i) {
|
||||
nowStatusIndex.value = i
|
||||
showStatus.value = false
|
||||
datas.statusTitle = datas.status[i].conTypeName
|
||||
getlist(datas.status[i].id)
|
||||
|
||||
function getInOutType (e) {
|
||||
datas.inOutType = e
|
||||
getlist()
|
||||
}
|
||||
const statusHeight = computed(() => {
|
||||
return 30 * datas.status.length + 14 + 'px'
|
||||
})
|
||||
let getlist = (conTypeId = "", start, end, ) => {
|
||||
|
||||
/**
|
||||
* 获取数据
|
||||
*/
|
||||
function getlist (conTypeId = "", start, end, ) {
|
||||
let ids = JSON.parse(props.item)
|
||||
// 列表
|
||||
tbConsInfoFlowstock({
|
||||
page: 0,
|
||||
shopId: uni.getStorageSync("shopId"),
|
||||
size: 30,
|
||||
consId: ids.id,
|
||||
column: columnName.value,
|
||||
conTypeId,
|
||||
|
||||
|
||||
stockFlow({
|
||||
conId: ids.id,
|
||||
inOutType: datas.inOutType,
|
||||
inOutItem: datas.inOutItem
|
||||
}).then(res => {
|
||||
datas.list = res.content
|
||||
datas.list = res.records
|
||||
})
|
||||
// 顶部数据
|
||||
tbConsInfoFlowcount({
|
||||
page: 0,
|
||||
shopId: uni.getStorageSync("shopId"),
|
||||
size: 30,
|
||||
sort: "createTime,desc",
|
||||
conTypeId,
|
||||
startTime: start,
|
||||
endTime: end,
|
||||
consId: JSON.parse(props.item).id,
|
||||
consStatistics({
|
||||
conId: ids.id,
|
||||
}).then(res => {
|
||||
datas.countList = res
|
||||
})
|
||||
|
||||
// 获取顶部类型/
|
||||
tbConsTypes({
|
||||
page: 0,
|
||||
shopId: uni.getStorageSync("shopId"),
|
||||
size: 100,
|
||||
}).then(res => {
|
||||
datas.status = res.content
|
||||
})
|
||||
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
|
||||
Reference in New Issue
Block a user