|
@@ -144,11 +144,12 @@
|
|
|
appDetailNew,
|
|
|
addToCart,
|
|
|
appModifyPrice,
|
|
|
- stockDescList,
|
|
|
stockDescListV1,
|
|
|
listShareV1,
|
|
|
- isProcurement
|
|
|
+ getGoodsDetailStockByCloud,
|
|
|
+ appDetailCloud,
|
|
|
} from '@/api/tabBar/homeNew.js'
|
|
|
+ import {isProcurement} from '@/api/tabBar/shoppingCart.js'
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
@@ -172,36 +173,71 @@
|
|
|
// 审核状态
|
|
|
checkStatus: '',
|
|
|
adminShow: false,
|
|
|
+ cloudWarehouse: 0
|
|
|
}
|
|
|
},
|
|
|
onLoad(onLoad) {
|
|
|
- this.checkStatus = uni.getStorageSync('checkStatus');
|
|
|
- if (uni.getStorageSync('whether_openShare') == 1) {
|
|
|
- appDetailNew(onLoad).then(res => {
|
|
|
- this.dataForm = res.data
|
|
|
- if (res.data.type == 0) {
|
|
|
- this.form = res.data.thisLocality
|
|
|
- } else {
|
|
|
- this.form = res.data.offsite
|
|
|
- }
|
|
|
- this.form.goodsNum = Number(this.form.goodsNum)
|
|
|
- this.stockDescListfun()
|
|
|
- })
|
|
|
- } else {
|
|
|
- appDetail(onLoad).then(res => {
|
|
|
- this.dataForm = res.data
|
|
|
- if (res.data.type == 0) {
|
|
|
- this.form = res.data.thisLocality
|
|
|
- } else {
|
|
|
- this.form = res.data.offsite
|
|
|
- }
|
|
|
- this.form.goodsNum = Number(this.form.goodsNum)
|
|
|
- this.stockDescListfun()
|
|
|
- })
|
|
|
- }
|
|
|
+ isProcurement({
|
|
|
+ "param": "cloud_warehouse"
|
|
|
+ }).then(res => {
|
|
|
+ this.cloudWarehouse = res.data ? Number(res.data) : 0
|
|
|
+ if (this.cloudWarehouse === 1) {
|
|
|
+ this.getCloudAppDetail(onLoad.id)
|
|
|
+ } else {
|
|
|
+ this.loadList(onLoad)
|
|
|
+ }
|
|
|
+ })
|
|
|
|
|
|
},
|
|
|
methods: {
|
|
|
+ loadList(onLoad){
|
|
|
+ this.checkStatus = uni.getStorageSync('checkStatus');
|
|
|
+ if (uni.getStorageSync('whether_openShare') == 1) {
|
|
|
+ appDetailNew(onLoad).then(res => {
|
|
|
+ this.dataForm = res.data
|
|
|
+ if (res.data.type == 0) {
|
|
|
+ this.form = res.data.thisLocality
|
|
|
+ } else {
|
|
|
+ this.form = res.data.offsite
|
|
|
+ }
|
|
|
+ this.form.goodsNum = Number(this.form.goodsNum)
|
|
|
+ this.stockDescListfun()
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ appDetail(onLoad).then(res => {
|
|
|
+ this.dataForm = res.data
|
|
|
+ if (res.data.type == 0) {
|
|
|
+ this.form = res.data.thisLocality
|
|
|
+ } else {
|
|
|
+ this.form = res.data.offsite
|
|
|
+ }
|
|
|
+ this.form.goodsNum = Number(this.form.goodsNum)
|
|
|
+ this.stockDescListfun()
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
+ loadByCloud(id) {
|
|
|
+ getGoodsDetailStockByCloud(id).then(res => {
|
|
|
+ this.inventoryData = res.data.weChatDetailStockVos
|
|
|
+ this.inventoryDataForm.storeInventory = res.data.storeInventory
|
|
|
+ this.inventoryDataForm.storeInventoryShare = res.data.storeInventoryShare
|
|
|
+ })
|
|
|
+ },
|
|
|
+
|
|
|
+ getCloudAppDetail(id){
|
|
|
+ appDetailCloud(id).then(res => {
|
|
|
+ this.dataForm = res.data
|
|
|
+ if (res.data.type == 0) {
|
|
|
+ this.form = res.data.thisLocality
|
|
|
+ } else {
|
|
|
+ this.form = res.data.offsite
|
|
|
+ }
|
|
|
+ this.form.goodsNum = Number(this.form.goodsNum)
|
|
|
+ this.loadByCloud(id)
|
|
|
+ })
|
|
|
+ },
|
|
|
+
|
|
|
previewImage() {
|
|
|
uni.previewImage({
|
|
|
current: 0, // 当前显示图片的索引,默认是0
|
|
@@ -379,4 +415,4 @@
|
|
|
font-size: 22rpx;
|
|
|
height: 28rpx;
|
|
|
}
|
|
|
-</style>
|
|
|
+</style>
|