feat: 修改配置文件和页面逻辑,优化商品采购、订单获取和门店管理功能
This commit is contained in:
parent
56217754ec
commit
4681988864
|
@ -3,3 +3,7 @@ import request from '@/utils/request';
|
||||||
export const menuList = (data) => {
|
export const menuList = (data) => {
|
||||||
return request.get('/store/store/menu_list', data);
|
return request.get('/store/store/menu_list', data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export const store_statistics = (data) => {
|
||||||
|
return request.get('/store/store/store_statistics', data);
|
||||||
|
}
|
|
@ -7,3 +7,7 @@ export const SystemStoreStorageLists = (data) => {
|
||||||
export const SystemStoreStorageGroupLists = (data) => {
|
export const SystemStoreStorageGroupLists = (data) => {
|
||||||
return request.get('/system_store_storage/SystemStoreStorage/group_lists', data);
|
return request.get('/system_store_storage/SystemStoreStorage/group_lists', data);
|
||||||
}
|
}
|
||||||
|
// 确认入库
|
||||||
|
export const SystemStoreStorageWarehousingAdd = (data) => {
|
||||||
|
return request.post('/system_store_storage/SystemStoreStorage/warehousing_add', data);
|
||||||
|
}
|
||||||
|
|
|
@ -3,9 +3,9 @@ let WSS_URL
|
||||||
import store from "@/store/user.js"
|
import store from "@/store/user.js"
|
||||||
// 环境
|
// 环境
|
||||||
// let env = "dev"
|
// let env = "dev"
|
||||||
// let env = "prod"
|
let env = "prod"
|
||||||
// let env = "release";
|
// let env = "release";
|
||||||
let env = "local";
|
// let env = "local";
|
||||||
|
|
||||||
switch (env) {
|
switch (env) {
|
||||||
case 'dev':
|
case 'dev':
|
||||||
|
|
|
@ -258,7 +258,7 @@
|
||||||
"path" : "statistics/index",
|
"path" : "statistics/index",
|
||||||
"style" :
|
"style" :
|
||||||
{
|
{
|
||||||
"navigationBarTitleText" : "门店统计"
|
"navigationBarTitleText" : "门店收支"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
@ -123,7 +123,7 @@
|
||||||
<up-cell title="我的地址" :isLink="true" url="/pagesOrder/addressList/addressList"></up-cell>
|
<up-cell title="我的地址" :isLink="true" url="/pagesOrder/addressList/addressList"></up-cell>
|
||||||
<up-cell title="支付密码" :isLink="true" url="/pagesOrder/setPayPassword/index"></up-cell>
|
<up-cell title="支付密码" :isLink="true" url="/pagesOrder/setPayPassword/index"></up-cell>
|
||||||
<up-cell title="商品列表" :isLink="true" url="pages/product/product" v-if="userInfo.system_store_id>0"></up-cell>
|
<up-cell title="商品列表" :isLink="true" url="pages/product/product" v-if="userInfo.system_store_id>0"></up-cell>
|
||||||
<up-cell title="门店管理" :isLink="true" url="pagesOrder/store/index"></up-cell>
|
<up-cell title="门店管理" :isLink="true" url="pagesOrder/store/index" v-if="userInfo.system_store_id>0"></up-cell>
|
||||||
<up-cell title="采购列表" :isLink="true" url="pageQuota/purchase_product_offer/index" v-if="userInfo.delivery_service_id>0"></up-cell>
|
<up-cell title="采购列表" :isLink="true" url="pageQuota/purchase_product_offer/index" v-if="userInfo.delivery_service_id>0"></up-cell>
|
||||||
<up-cell title="我要批发" :isLink="true" url="pages/wholesale/index" v-if="userInfo.label_id==99"></up-cell>
|
<up-cell title="我要批发" :isLink="true" url="pages/wholesale/index" v-if="userInfo.label_id==99"></up-cell>
|
||||||
</up-cell-group>
|
</up-cell-group>
|
||||||
|
|
|
@ -51,21 +51,8 @@
|
||||||
<up-empty v-else mode="data" icon="http://cdn.uviewui.com/uview/empty/data.png">
|
<up-empty v-else mode="data" icon="http://cdn.uviewui.com/uview/empty/data.png">
|
||||||
</up-empty>
|
</up-empty>
|
||||||
</up-transition>
|
</up-transition>
|
||||||
<up-modal :show="show" title="采购确认" showCancelButton @cancel="show=false" @confirm="offerUpdate()">
|
<up-modal :show="show" title="入库确认" content="是否确认该商品入库" showCancelButton @cancel="show=false" @confirm="offerUpdate()">
|
||||||
<up-form labelPosition="left">
|
|
||||||
<up-form-item label="名称">
|
|
||||||
<up-input v-model="formData.store_name" border="none"></up-input>
|
|
||||||
</up-form-item>
|
|
||||||
<up-form-item label="数量">
|
|
||||||
<up-input v-model="formData.nums" border="none" @change='changeInputPrice'></up-input>
|
|
||||||
</up-form-item>
|
|
||||||
<up-form-item label="单价">
|
|
||||||
<up-input v-model="formData.price" border="none" @change='changeInputPrice'></up-input>
|
|
||||||
</up-form-item>
|
|
||||||
<up-form-item label="总价">
|
|
||||||
<up-input v-model="formData.total_price" border="none"></up-input>
|
|
||||||
</up-form-item>
|
|
||||||
</up-form>
|
|
||||||
</up-modal>
|
</up-modal>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
|
@ -84,6 +71,7 @@
|
||||||
} from "vue"
|
} from "vue"
|
||||||
import {
|
import {
|
||||||
SystemStoreStorageLists,
|
SystemStoreStorageLists,
|
||||||
|
SystemStoreStorageWarehousingAdd
|
||||||
} from "@/api/system_store_storage.js"
|
} from "@/api/system_store_storage.js"
|
||||||
|
|
||||||
const show = ref(false)
|
const show = ref(false)
|
||||||
|
@ -97,11 +85,7 @@
|
||||||
const calendarShow = ref(false)
|
const calendarShow = ref(false)
|
||||||
const formData = ref({
|
const formData = ref({
|
||||||
"id": '',
|
"id": '',
|
||||||
"store_name": '',
|
|
||||||
'product_id': '',
|
'product_id': '',
|
||||||
'nums': '',
|
|
||||||
'price': '',
|
|
||||||
'total_price': ''
|
|
||||||
})
|
})
|
||||||
const calendarConfirm = (e) => {
|
const calendarConfirm = (e) => {
|
||||||
where.value.start_time = e;
|
where.value.start_time = e;
|
||||||
|
@ -111,14 +95,8 @@
|
||||||
calendarShow.value = false
|
calendarShow.value = false
|
||||||
}
|
}
|
||||||
|
|
||||||
const priceBlur = (index, goodsList) => {
|
|
||||||
goodsList[index].price = Number(goodsList[index].price).toFixed(2)
|
|
||||||
}
|
|
||||||
|
|
||||||
// 列表
|
// 列表
|
||||||
const showGoods = ref(false)
|
|
||||||
const showGoods1 = ref(false)
|
const showGoods1 = ref(false)
|
||||||
const goodsList = ref([])
|
|
||||||
const goodsList1 = ref([])
|
const goodsList1 = ref([])
|
||||||
|
|
||||||
const getGoodsList = async () => {
|
const getGoodsList = async () => {
|
||||||
|
@ -127,23 +105,18 @@
|
||||||
}
|
}
|
||||||
const cancleOrder = (item) => {
|
const cancleOrder = (item) => {
|
||||||
show.value = true
|
show.value = true
|
||||||
formData.value.store_name = item['store_name']
|
|
||||||
formData.value.id = item['id']
|
formData.value.id = item['id']
|
||||||
formData.value.nums = item['need_num']
|
|
||||||
formData.value.product_id = item['product_id']
|
formData.value.product_id = item['product_id']
|
||||||
}
|
}
|
||||||
const offerUpdate = () => {
|
const offerUpdate = () => {
|
||||||
purchaseProductOfferUpdate(formData.value).then(res => {
|
SystemStoreStorageWarehousingAdd(formData.value).then(res => {
|
||||||
uni.$u.toast(res.msg);
|
uni.$u.toast(res.msg);
|
||||||
show.value = false
|
show.value = false
|
||||||
|
goodsList1.value = []
|
||||||
getGoodsList()
|
getGoodsList()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
const changeInputPrice = (e) => {
|
|
||||||
if (formData.value.nums > 0 && formData.value.price > 0) {
|
|
||||||
formData.value.total_price = formData.value.nums * formData.value.price
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const keyword = ref('');
|
const keyword = ref('');
|
||||||
|
|
||||||
const searchKeyword = () => {
|
const searchKeyword = () => {
|
||||||
|
@ -194,26 +167,6 @@
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.head {
|
|
||||||
padding: 20rpx;
|
|
||||||
background-color: white;
|
|
||||||
position: relative;
|
|
||||||
|
|
||||||
.act {
|
|
||||||
color: #20B128;
|
|
||||||
}
|
|
||||||
|
|
||||||
.line {
|
|
||||||
width: 26px;
|
|
||||||
height: 5rpx;
|
|
||||||
background-color: #20B128;
|
|
||||||
border-radius: 50rpx;
|
|
||||||
position: absolute;
|
|
||||||
transition: 300ms;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.content {
|
.content {
|
||||||
padding: 20rpx;
|
padding: 20rpx;
|
||||||
padding-bottom: 150rpx;
|
padding-bottom: 150rpx;
|
||||||
|
@ -270,11 +223,6 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.status-png {
|
|
||||||
position: absolute;
|
|
||||||
right: 20rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.card-footer {
|
.card-footer {
|
||||||
|
@ -284,28 +232,7 @@
|
||||||
color: #060606;
|
color: #060606;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.submit-btn {
|
|
||||||
position: fixed;
|
|
||||||
bottom: 50rpx;
|
|
||||||
width: 710rpx;
|
|
||||||
margin: 0 auto;
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
.detail {
|
|
||||||
width: 88rpx;
|
|
||||||
height: 88rpx;
|
|
||||||
border-radius: 88rpx;
|
|
||||||
text-align: center;
|
|
||||||
line-height: 88rpx;
|
|
||||||
background-color: #50C758;
|
|
||||||
color: white;
|
|
||||||
position: absolute;
|
|
||||||
bottom: 300rpx;
|
|
||||||
right: 20rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.ellipsis {
|
.ellipsis {
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
|
|
@ -167,6 +167,10 @@
|
||||||
<view>下单时间</view>
|
<view>下单时间</view>
|
||||||
<view>{{datas.create_time}}</view>
|
<view>{{datas.create_time}}</view>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="row">
|
||||||
|
<view>备注</view>
|
||||||
|
<view>{{datas.mark}}</view>
|
||||||
|
</view>
|
||||||
<view class="row" style="margin-bottom: 0;">
|
<view class="row" style="margin-bottom: 0;">
|
||||||
<view>支付状态</view>
|
<view>支付状态</view>
|
||||||
<view v-if="datas.paid == 1">已支付</view>
|
<view v-if="datas.paid == 1">已支付</view>
|
||||||
|
@ -386,9 +390,9 @@
|
||||||
const rePay = () => {
|
const rePay = () => {
|
||||||
rePaymentApi({
|
rePaymentApi({
|
||||||
order_id: datas.value.id,
|
order_id: datas.value.id,
|
||||||
mer_id: shopInfo.value.mer_id,
|
// mer_id: shopInfo.value.mer_id,
|
||||||
address_id: addressInfo.value.address_id,
|
address_id: addressInfo.value.address_id,
|
||||||
pay_type: 1
|
pay_type: datas.value.pay_type
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
if (!res.data?.nonceStr) return uni.$u.toast('支付失败!');
|
if (!res.data?.nonceStr) return uni.$u.toast('支付失败!');
|
||||||
uni.requestPayment({
|
uni.requestPayment({
|
||||||
|
|
|
@ -3,13 +3,13 @@
|
||||||
<up-row customStyle="margin-bottom: 10px;">
|
<up-row customStyle="margin-bottom: 10px;">
|
||||||
<up-col span="6">
|
<up-col span="6">
|
||||||
<view style="padding: 30rpx 40rpx 0 40rpx;">
|
<view style="padding: 30rpx 40rpx 0 40rpx;">
|
||||||
<up-count-to :startVal="30" :endVal="500.03" fontSize="40" decimals="2"></up-count-to>
|
<up-count-to :startVal="30" :endVal="data.total_price" fontSize="40" decimals="2"></up-count-to>
|
||||||
<view style="padding: 20rpx;">累计铺货金额</view>
|
<view style="padding: 20rpx;">累计铺货金额</view>
|
||||||
</view>
|
</view>
|
||||||
</up-col>
|
</up-col>
|
||||||
<up-col span="6">
|
<up-col span="6">
|
||||||
<view style="padding: 30rpx 40rpx 0 40rpx;">
|
<view style="padding: 30rpx 40rpx 0 40rpx;">
|
||||||
<up-count-to :startVal="30" :endVal="500.03" fontSize="40" decimals="2"></up-count-to>
|
<up-count-to :startVal="30" :endVal="data.pay_price" fontSize="40" decimals="2"></up-count-to>
|
||||||
<view style="padding: 20rpx;">累计销售金额</view>
|
<view style="padding: 20rpx;">累计销售金额</view>
|
||||||
</view>
|
</view>
|
||||||
</up-col>
|
</up-col>
|
||||||
|
@ -17,13 +17,13 @@
|
||||||
<up-row customStyle="margin-bottom: 10px;">
|
<up-row customStyle="margin-bottom: 10px;">
|
||||||
<up-col span="6">
|
<up-col span="6">
|
||||||
<view style="padding: 30rpx 40rpx 0 40rpx;">
|
<view style="padding: 30rpx 40rpx 0 40rpx;">
|
||||||
<up-count-to :startVal="30" :endVal="500.03" fontSize="40" decimals="2"></up-count-to>
|
<up-count-to :startVal="30" :endVal="data.expenditure" fontSize="40" decimals="2"></up-count-to>
|
||||||
<view style="padding: 20rpx;">总支出</view>
|
<view style="padding: 20rpx;">总支出</view>
|
||||||
</view>
|
</view>
|
||||||
</up-col>
|
</up-col>
|
||||||
<up-col span="6">
|
<up-col span="6">
|
||||||
<view style="padding: 30rpx 40rpx 0 40rpx;">
|
<view style="padding: 30rpx 40rpx 0 40rpx;">
|
||||||
<up-count-to :startVal="30" :endVal="500.03" fontSize="40" decimals="2"></up-count-to>
|
<up-count-to :startVal="30" :endVal="data.store_money" fontSize="40" decimals="2"></up-count-to>
|
||||||
<view style="padding: 20rpx;">利润</view>
|
<view style="padding: 20rpx;">利润</view>
|
||||||
</view>
|
</view>
|
||||||
</up-col>
|
</up-col>
|
||||||
|
@ -40,8 +40,28 @@
|
||||||
import {
|
import {
|
||||||
ref
|
ref
|
||||||
} from 'vue';
|
} from 'vue';
|
||||||
|
import {
|
||||||
|
store_statistics,
|
||||||
|
} from "@/api/store.js"
|
||||||
|
const data = ref({
|
||||||
|
total_price: 0,
|
||||||
|
pay_price: 0,
|
||||||
|
store_money:0,
|
||||||
|
commission: 0,
|
||||||
|
bond: 0,
|
||||||
|
village: 0,
|
||||||
|
vip: 0,
|
||||||
|
brigade: 0,
|
||||||
|
attrition: 0
|
||||||
|
})
|
||||||
|
const getLists = () => {
|
||||||
|
store_statistics().then(res => {
|
||||||
|
data.value = res.data
|
||||||
|
chartData.value.series=res.data.list
|
||||||
|
|
||||||
|
})
|
||||||
|
}
|
||||||
|
getLists()
|
||||||
const opts = ref({
|
const opts = ref({
|
||||||
color: ["#1890FF", "#91CB74", "#FAC858", "#EE6666", "#73C0DE", "#3CA272", "#FC8452", "#9A60B4", "#ea7ccc"],
|
color: ["#1890FF", "#91CB74", "#FAC858", "#EE6666", "#73C0DE", "#3CA272", "#FC8452", "#9A60B4", "#ea7ccc"],
|
||||||
padding: [15, 15, 0, 5],
|
padding: [15, 15, 0, 5],
|
||||||
|
@ -58,6 +78,7 @@
|
||||||
extra: {
|
extra: {
|
||||||
column: {
|
column: {
|
||||||
type: "group",
|
type: "group",
|
||||||
|
seriesGap:30,
|
||||||
width: 30,
|
width: 30,
|
||||||
activeBgColor: "#000000",
|
activeBgColor: "#000000",
|
||||||
activeBgOpacity: 0.08
|
activeBgOpacity: 0.08
|
||||||
|
@ -65,31 +86,30 @@
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
const chartData = ref({
|
const chartData = ref({
|
||||||
categories: ["2024"],
|
categories: [""],
|
||||||
series: [
|
series: [{
|
||||||
{
|
|
||||||
name: "手续费",
|
name: "手续费",
|
||||||
data: [35]
|
data: [0]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "保证金",
|
name: "保证金",
|
||||||
data: [30]
|
data: [0]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "损耗金",
|
name: "损耗金",
|
||||||
data: [18]
|
data: [0]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "村长",
|
name: "村长",
|
||||||
data: [8]
|
data: [0]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "队长",
|
name: "队长",
|
||||||
data: [16]
|
data: [0]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "厨师",
|
name: "厨师",
|
||||||
data: [18]
|
data: [0]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue