Przeglądaj źródła

feature_20260513_新建专业五金店

zhujindu 2 tygodni temu
rodzic
commit
fdf9ebd4cb

+ 9 - 0
src/components/uploadImgVStore.vue

@@ -94,6 +94,11 @@ export default {
       type: String,
       default: '0',
     },
+    displayImg: {
+      // 专业五金店-陈列照的图片
+      type: Array,
+      default: () => [],
+    },
   },
   data() {
     return {
@@ -124,6 +129,10 @@ export default {
       ImagePreview(this.imgUrlArr);
     },
     uploadImg() {
+      if (this.displayImg.length >= 3 && this.displayPhoto == '1') {
+        this.$toast('陈列照最多只能上传三张!');
+        return;
+      }
       if (this.disabled) return;
       if (localStorage.getItem('chainName') == null) {
         this.$toast('请输入名称!');

+ 3 - 3
src/views/storeManagement/storeAdd.vue

@@ -364,8 +364,7 @@
                       v-if="
                         fromValue.storeCategory == '126565' &&
                         fromValue.orgName &&
-                        fromValue.orgName.indexOf('BMD') != -1 &&
-                        displayImg.length < 3
+                        fromValue.orgName.indexOf('BMD') != -1
                       ">
                       <van-col span="12">
                         <div>
@@ -376,6 +375,7 @@
                             imgText="陈列照"
                             :type="2"
                             :displayPhoto="'1'"
+                            :displayImg="displayImg"
                             :count="1"></upload-img>
                         </div>
                       </van-col>
@@ -2104,7 +2104,7 @@ export default {
     addStoreFun(BMDtype) {
       addStore(this.fromValue).then((res) => {
         this.toastLoading().clear();
-          this.resetProgress();
+        this.resetProgress();
         if (res.code == 200) {
           if (res.data.serverCode) {
             this.fromValue.storeCode = res.data.sfaStore.storeCode;

+ 10 - 21
src/views/storeManagement/storeEdit.vue

@@ -361,27 +361,16 @@
                   </template>
                   <div class="displayImgBox" v-if="fromValue.ifJzStoreType != 1">
                     <div v-if="storeTypePOP">
-                      <template v-if="fromValue.storeCategory == '126565' && displayImg.length < 3">
-                        <upload-img
-                          v-if="fromValue.ifJzStoreType != 1"
-                          :uploadid="uploadid2"
-                          imgArr=""
-                          @newimgarr="newimgarr1"
-                          imgText="陈列照(至少一张)"
-                          :type="2"
-                          :displayPhoto="'1'"
-                          :count="1"></upload-img>
-                      </template>
-                      <template v-else>
-                        <upload-img
-                          v-if="fromValue.ifJzStoreType != 1"
-                          :uploadid="uploadid2"
-                          imgArr=""
-                          @newimgarr="newimgarr1"
-                          imgText="陈列照(至少一张)"
-                          :type="2"
-                          :count="1"></upload-img>
-                      </template>
+                      <upload-img
+                        v-if="fromValue.ifJzStoreType != 1"
+                        :uploadid="uploadid2"
+                        imgArr=""
+                        @newimgarr="newimgarr1"
+                        imgText="陈列照(至少一张)"
+                        :type="2"
+                        :count="1"
+                        :displayPhoto="fromValue.storeCategory == '126565' ? '1' : '0'"
+                        :displayImg="displayImg"></upload-img>
                     </div>
                   </div>
                 </div>