修复bug

This commit is contained in:
weipengfei 2023-11-06 17:55:17 +08:00
parent e5f1430eee
commit 0c25b1c6e4
9 changed files with 35 additions and 15 deletions

View File

@ -121,7 +121,11 @@
// //
getindex(){ getindex(){
getUserInfo().then(res => { getUserInfo().then(res => {
if (res.data.mer_info.length == 0) {
return uni.showModal({
title: '暂无商户信息'
})
}
this.mer_id = res.data.service.mer_id; this.mer_id = res.data.service.mer_id;
if(this.isLogin){ if(this.isLogin){
this.getList(this.mer_id) this.getList(this.mer_id)

View File

@ -939,6 +939,7 @@
// console.log(res); // console.log(res);
this.userid = res.data.uid this.userid = res.data.uid
this.userInfoData = res.data this.userInfoData = res.data
this.$store.commit('SET_USERINFO', res.data);
this.merchantData.phone = res.data.phone this.merchantData.phone = res.data.phone
if (res.data.service == null) { if (res.data.service == null) {
// console.log('123'); // console.log('123');

View File

@ -34,11 +34,11 @@
<image class="icon_img" src="@/static/images/index21.png" mode="aspectFit"></image> <image class="icon_img" src="@/static/images/index21.png" mode="aspectFit"></image>
<text class="text">在售管理</text> <text class="text">在售管理</text>
</view> </view>
<view class="examine" <!-- <view class="examine"
@click="navigator(`/pages/admin/order/index?mer_id=${mer_id}&product_type=98&type_id=${userInfoData.mer_info.type_id}`)"> @click="navigator(`/pages/admin/order/index?mer_id=${mer_id}&product_type=98&type_id=${userInfoData.mer_info.type_id}`)">
<image class="icon_img" src="@/static/images/index18.png" mode="aspectFit"> <image class="icon_img" src="@/static/images/index18.png" mode="aspectFit">
<text class="text">财务管理</text> <text class="text">财务管理</text>
</view> </view> -->
<!-- <view class="examine" <!-- <view class="examine"
@click="navigator(`/pages/admin/financial_management/index?mer_id=${mer_id}&product_type=98&type_id=${userInfoData.mer_info.type_id}`)"> @click="navigator(`/pages/admin/financial_management/index?mer_id=${mer_id}&product_type=98&type_id=${userInfoData.mer_info.type_id}`)">
<image class="icon_img" src="@/static/images/index18.png" mode="aspectFit"> <image class="icon_img" src="@/static/images/index18.png" mode="aspectFit">

View File

@ -16,8 +16,8 @@
<view class="message"> <view class="message">
<view class="goodstitle">{{item.store_name}}</view> <view class="goodstitle">{{item.store_name}}</view>
<view class="flex_a_c"> <view class="flex_a_c">
<view class="">分类{{item.storeCategory.cate_name}}</view> <view class="">分类{{item.storeCategory && item.storeCategory.cate_name}}</view>
<view class="unit">单位{{item.unit_name}}</view> <view class="unit">规格{{item.unit_name}}</view>
</view> </view>
<view class="bar_code">条形码{{ item.bar_code || "无" }}</view> <view class="bar_code">条形码{{ item.bar_code || "无" }}</view>
</view> </view>
@ -33,8 +33,8 @@
<view class="popup_cont" v-if="redactGoods.store_name"> <view class="popup_cont" v-if="redactGoods.store_name">
<view class="title">{{redactGoods.store_name}}</view> <view class="title">{{redactGoods.store_name}}</view>
<view class="message flex_a_c_j_sb"> <view class="message flex_a_c_j_sb">
<view class="">分类{{redactGoods.storeCategory.cate_name}}</view> <view class="">分类{{redactGoods.storeCategory && redactGoods.storeCategory.cate_name}}</view>
<view class="">单位{{redactGoods.unit_name}}</view> <view class="">规格{{redactGoods.unit_name}}</view>
<view class="">订货价{{redactGoods.price}}</view> <view class="">订货价{{redactGoods.price}}</view>
</view> </view>
<view class="bar_code flex_a_c_j_sb"> <view class="bar_code flex_a_c_j_sb">
@ -129,9 +129,10 @@
if (data.length < 9) this.status = 'nomore'; if (data.length < 9) this.status = 'nomore';
}, },
redactShow(item) { redactShow(item) {
console.log(item);
this.product_id = item.product_id this.product_id = item.product_id
this.merId = item.mer_id this.merId = item.mer_id
this.redactGoods = item this.redactGoods = {...item}
this.popupShow = true this.popupShow = true
productDetail(item.mer_id, item.product_id).then(res => { productDetail(item.mer_id, item.product_id).then(res => {
this.particulars = res.data this.particulars = res.data
@ -145,7 +146,8 @@
}, },
// //
async submitCreatedGoods() { async submitCreatedGoods() {
this.particulars.attrValue[0].stock = Number(this.goodsNum) console.log(this.particulars);
// this.particulars.attrValue[0].stock = Number(this.goodsNum)
this.particulars.attrValue[0].price = this.goodsPrive this.particulars.attrValue[0].price = this.goodsPrive
const res = await productUpdateFree(this.product_id, { const res = await productUpdateFree(this.product_id, {
attr:this.particulars.attr, attr:this.particulars.attr,

View File

@ -251,7 +251,15 @@
])), ])),
onReady() {}, onReady() {},
mounted: function() {}, mounted: function() {},
onLoad: function(options) {}, onLoad: function(options) {
let userInfo = this.$store.state.app.userInfo;
if(typeof userInfo == 'string') userInfo = JSON.parse(userInfo);
if (userInfo?.mer_info?.length == 0) {
uni.showModal({
title: '暂无商户信息'
})
}
},
onShow: function() { onShow: function() {
let that = this let that = this
let routes = getCurrentPages(); let routes = getCurrentPages();

View File

@ -128,7 +128,7 @@
线上入库 线上入库
</view> --> </view> -->
<view class="" class="bnt" @click="Fline(item)" style="width:150rpx"> <view class="" class="bnt" @click="Fline(item)" style="width:150rpx">
线下入库 修改库存
</view> </view>
<view v-if="item.is_show == 1 && item.status == 1" class="bnt" <view v-if="item.is_show == 1 && item.status == 1" class="bnt"
@ -155,7 +155,7 @@
<u-popup :show="show" @close="close" mode="center" bgColor='transparent'> <u-popup :show="show" @close="close" mode="center" bgColor='transparent'>
<image src="@/static/images/xianxia.png" mode="widthFix"></image> <image src="@/static/images/xianxia.png" mode="widthFix"></image>
<view class="popen"> <view class="popen">
<h4 v-if="this.on_line==1">线下入库</h4> <h4 v-if="this.on_line==1">修改库存</h4>
<h4 v-else>线上入库</h4> <h4 v-else>线上入库</h4>
<view class="guige"> <view class="guige">
<scroll-view scroll-y="true" class="scroll_y"> <scroll-view scroll-y="true" class="scroll_y">
@ -171,7 +171,7 @@
</view> </view>
<view class="shuru" v-if="this.on_line == 1"> <view class="shuru" v-if="this.on_line == 1">
数量: <input type="number" v-model="data.number" placeholder="请输入"> <view>数量: </view><input type="number" v-model="data.number" placeholder="请输入">
</view> </view>
<view class="btn"> <view class="btn">
<button class="btn_l" @click="close()">取消</button> <button class="btn_l" @click="close()">取消</button>
@ -391,6 +391,7 @@
this.show = true this.show = true
this.data.product_id = this.checkboxList1[0].product_id this.data.product_id = this.checkboxList1[0].product_id
this.data.unique = this.checkboxList1[0].unique this.data.unique = this.checkboxList1[0].unique
this.data.number = this.checkboxList1[0].stock
this.on_line = 1 this.on_line = 1
} else { } else {
this.show = false this.show = false
@ -971,10 +972,13 @@
.shuru { .shuru {
display: flex; display: flex;
justify-content: flex-start;
align-items: center; align-items: center;
padding: 5px; padding: 5px;
margin-left: 20px; width: 80%;
margin: 0 auto;
&>view{
flex-shrink: 0;
}
input { input {
background: #F5F5F5; background: #F5F5F5;
@ -982,6 +986,7 @@
border: 1px solid #999999; border: 1px solid #999999;
padding-left: 3px; padding-left: 3px;
margin-left: 3px; margin-left: 3px;
flex: 1;
} }
} }

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB