|
@@ -2,7 +2,7 @@
|
|
|
<view class="content" v-if="nowData">
|
|
|
<view class="productInfo">
|
|
|
<view><u-image :src="nowData.images" border-radius="16" width="160" height="160" bg-color="#EBEBEB"></u-image></view>
|
|
|
- <view><text class="item-no">{{ nowData.shelfPlaceCode }}</text><text>{{ nowData.code }}</text></view>
|
|
|
+ <view style="display: block;"><text class="item-no">{{ nowData.shelfPlaceCode }}</text><text>{{ nowData.code }}</text></view>
|
|
|
<view class="item-name">
|
|
|
<text>{{ nowData.name }}</text>
|
|
|
</view>
|
|
@@ -11,7 +11,17 @@
|
|
|
<view class="u-ninput">
|
|
|
<u-number-box :min="1" :max="nowData.currentInven" v-model="qty" color="#000" bg-color="#fff" size="36" :input-height="80" :input-width="180"></u-number-box>
|
|
|
</view>
|
|
|
- <view class="kucun">可用库存:<text>{{nowData.currentInven}}</text>{{nowData.unit}}</view>
|
|
|
+ <view class="kucun flex justify_center">
|
|
|
+ <view class="pcode" v-if="showPrice[0]">
|
|
|
+ <view v-if="showPrice[1]=='PURCHASES_PRICE'">
|
|
|
+ 价格:<text class="item-price" v-if="isAdmin || showPrice[2]">{{nowData.cost||0}}</text>
|
|
|
+ </view>
|
|
|
+ 价格:<text v-else class="item-price">{{nowData.price||0}}</text>
|
|
|
+ </view>
|
|
|
+ <view>
|
|
|
+ 可用库存:<text>{{nowData.currentInven}}</text>{{nowData.unit}}
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
<view class="buttons">
|
|
|
<u-button :throttle-time="100" :loading="loading" @click="onSubmit" :custom-style="{ background: '#066cff', color: '#fff',width:'400rpx' }" shape="circle" type="info">
|
|
@@ -34,6 +44,17 @@
|
|
|
onLoad(options) {
|
|
|
this.nowData = this.$store.state.vuex_tempData
|
|
|
},
|
|
|
+ computed: {
|
|
|
+ userInfo(){
|
|
|
+ return this.$store.state.vuex_userInfo
|
|
|
+ },
|
|
|
+ showPrice(){
|
|
|
+ return this.$store.state.vuex_showPrice
|
|
|
+ },
|
|
|
+ isAdmin(){
|
|
|
+ return this.userInfo.superAdmin == 1
|
|
|
+ }
|
|
|
+ },
|
|
|
methods: {
|
|
|
onSubmit(){
|
|
|
const _this = this
|
|
@@ -59,15 +80,24 @@
|
|
|
}]
|
|
|
}).then(res => {
|
|
|
if(res.status == 200){
|
|
|
- uni.showToast({
|
|
|
- icon:'none',
|
|
|
- title: res.message,
|
|
|
- duration: 4000
|
|
|
- })
|
|
|
- uni.$emit("updateQueryByCodeList")
|
|
|
- uni.redirectTo({
|
|
|
- url: "/pages/digitalShelf/orderDetail?shelfOrderSn="+res.data.shelfOrderSn
|
|
|
- })
|
|
|
+ if(res.data&&res.data.remindMessage){
|
|
|
+ uni.showModal({
|
|
|
+ title: '提示',
|
|
|
+ content: res.data.remindMessage,
|
|
|
+ confirmText: '知道了',
|
|
|
+ showCancel: false
|
|
|
+ })
|
|
|
+ }else{
|
|
|
+ uni.showToast({
|
|
|
+ icon:'none',
|
|
|
+ title: res.message,
|
|
|
+ duration: 4000
|
|
|
+ })
|
|
|
+ uni.$emit("updateQueryByCodeList")
|
|
|
+ uni.redirectTo({
|
|
|
+ url: "/pages/digitalShelf/orderDetail?shelfOrderSn="+res.data.shelfOrderSn
|
|
|
+ })
|
|
|
+ }
|
|
|
}else{
|
|
|
uni.showModal({
|
|
|
title: res.errCode == 'VALIDATE_STOCK_LACK' ? '以下产品库存不足' : '提示',
|
|
@@ -121,6 +151,9 @@
|
|
|
text{
|
|
|
color: #333;
|
|
|
}
|
|
|
+ .pcode{
|
|
|
+ margin-right: 20upx;
|
|
|
+ }
|
|
|
}
|
|
|
.u-ninput{
|
|
|
border: 2rpx solid #eee;
|