@@ -7,7 +7,8 @@
<view class="login-form">
<u-form :model="form" label-width="180rpx" :error-type="['toast']" ref="uForm">
<u-form-item label="门头照片">
- <u-image :src="form.storeImage" width="200" height="150"></u-image>
+ <u-image v-if="form.storeImage" :src="form.storeImage" width="200" height="150"></u-image>
+ <text v-else>未上传</text>
</u-form-item>
<u-form-item label="营业执照">
<u-image v-if="form.licenseImage" :src="form.licenseImage" width="200" height="150"></u-image>
@@ -8,8 +8,8 @@
@input="change"
@focus="isGobleSearch=true"
@blur="isGobleSearch=false"
- @custom="getShelfList"
- @search="getShelfList"
+ @custom="search"
+ @search="search"
@clear="clearSearch"
:action-style="{'color': '#fff', 'font-size': '24upx', 'background-color': '#57a3f3', 'border-radius': '6upx', 'padding': '12upx 0'}">
</u-search>
@@ -85,15 +85,18 @@
methods: {
clearSearch(){
this.shelfName = ''
- this.pageNo = 1
- this.shelfList = []
- this.getShelfList()
+ this.search()
},
change(v){
if(v==''){
this.clearSearch()
}
+ search(){
+ this.pageNo = 1
+ this.shelfList = []
+ this.getShelfList()
+ },
// 关联客户
saveShelf(data){
shelfSave({
@@ -168,9 +168,25 @@
// 按照产品搜索货位
toSearchHw(){
- uni.navigateTo({
- url: "/pages/shelfSetting/searchShelfHw?shelfName="+this.detailData.shelfName+"&shelfSn="+this.shelfSn
- })
+ let noBindPro = null;
+ for(let i=0;i<this.placeTab.length;i++){
+ noBindPro = this.shelfPlaceList[this.placeTab[i]].find(item => item.shelfProductApiEntity && item.shelfProductApiEntity.productSn);
+ if(!!noBindPro){
+ break
+ }
+ uni.navigateTo({
+ url: "/pages/shelfSetting/searchShelfHw?shelfName="+this.detailData.shelfName+"&shelfSn="+this.shelfSn
+ })
+ }else{
+ uni.showModal({
+ showCancel:false,
+ confirmText:"好的",
+ title: "提示",
+ content: "所有货位都没有绑定产品,无法搜索!"
// 编辑货位
editHw(item){