|
@@ -25,7 +25,7 @@
|
|
|
<view class="pinfo flex_1">
|
|
|
<view class="ptxt flex align_center justify_between">
|
|
|
<text>{{productEntity.code}}</text>
|
|
|
- <text class="pcode" @click="toBindProduct" v-if="nowData&&nowData.shelfProductApiEntity&&nowData.shelfProductApiEntity.enableFlag==1">
|
|
|
+ <text class="pcode" @click="toBindProduct" v-if="type=='bind'||(type=='edit'&&nowData&&nowData.shelfProductApiEntity&&nowData.shelfProductApiEntity.enableFlag==1)">
|
|
|
<u-icon name='reload'></u-icon>
|
|
|
更换产品
|
|
|
</text>
|
|
@@ -62,7 +62,7 @@
|
|
|
</view>
|
|
|
<view class="flex footer-btn">
|
|
|
<u-button v-if="type=='bind'" class="delbtn" :loading='loading' @click="handleDel" type='primary' shape="circle" size="medium">删除货位</u-button>
|
|
|
- <u-button :disabled="nowData&&nowData.shelfProductApiEntity&&nowData.shelfProductApiEntity.enableFlag==0" :style="{width:type=='bind'?'45%':'100%'}" class="newbtn" :loading='loading' @click="formSubmit" type='primary' shape="circle" size="medium">保存</u-button>
|
|
|
+ <u-button :disabled="type=='edit'&&nowData&&nowData.shelfProductApiEntity&&nowData.shelfProductApiEntity.enableFlag==0" :style="{width:type=='bind'?'45%':'100%'}" class="newbtn" :loading='loading' @click="formSubmit" type='primary' shape="circle" size="medium">保存</u-button>
|
|
|
</view>
|
|
|
</view>
|
|
|
</template>
|
|
@@ -207,7 +207,7 @@
|
|
|
// 禁用货位产品
|
|
|
enableShelfProduct(){
|
|
|
const _this = this
|
|
|
- const isEnable = this.nowData&&this.nowData.shelfProductApiEntity&&this.nowData.shelfProductApiEntity.enableFlag==1 || this.nowData.enableFlag
|
|
|
+ const isEnable = this.nowData&&this.nowData.shelfProductApiEntity&&this.nowData.shelfProductApiEntity.enableFlag==1
|
|
|
if(isEnable){
|
|
|
clzConfirm({
|
|
|
title: '提示',
|
|
@@ -225,7 +225,7 @@
|
|
|
},
|
|
|
enableFun(isEnable){
|
|
|
const _this = this
|
|
|
- const shelfProductSn = this.nowData.shelfProductApiEntity.shelfProductSn||this.nowData.shelfProductSn
|
|
|
+ const shelfProductSn = this.nowData.shelfProductApiEntity.shelfProductSn
|
|
|
_this.spinning = true
|
|
|
shelfProductEnable({ shelfSn: this.nowData.shelfSn, shelfProductSn: shelfProductSn, enableFlag: isEnable ? 0 : 1 }).then(res => {
|
|
|
if (res.status == 200) {
|