Explorar o código

feature_20260513_新建专业五金店

zhujindu hai 2 semanas
pai
achega
1371c01c7c
Modificáronse 2 ficheiros con 28 adicións e 4 borrados
  1. 9 0
      src/api/index.js
  2. 19 4
      src/views/storeManagement/storeAdd.vue

+ 9 - 0
src/api/index.js

@@ -1214,3 +1214,12 @@ export function shareReportMobile(data) {
     data,
   });
 }
+
+// 陈列照识别接口
+export function recognizeDisplayPhoto(query) {
+  return request({
+    url: 'mobile/store/recognizeDisplayPhoto',
+    method: 'get',
+    params: query,
+  });
+}

+ 19 - 4
src/views/storeManagement/storeAdd.vue

@@ -818,6 +818,7 @@ import {
   getCustomerNatureList,
   getpotentialCustomerTypeList,
   getDictOption,
+  recognizeDisplayPhoto,
 } from '@/api/index';
 import uploadImg from '@/components/uploadImgVStore';
 import uploadImgc from '@/components/uploadImgVStorec';
@@ -1583,8 +1584,8 @@ export default {
             // ***********************************
             // ***************************************
             // ****************************** */
-            // this.addVisits();
-            this.beforeAddFn();
+            this.addVisits();
+            // this.beforeAddFn();
           })
           .catch((error) => {
             this.beforeAddFn();
@@ -1879,6 +1880,7 @@ export default {
       this.moreTypeShow = false;
     },
     onSubmit() {
+      this.fromValue.tempStoreCode = null;
       var that = this;
       var arrList = [];
       for (var n2 = 0; n2 < this.sfaOrderProducts.length; n2++) {
@@ -2080,7 +2082,20 @@ export default {
               this.fromValue.orgName.indexOf('BMD') != -1
             ) {
               this.progress();
-              this.addStoreFun('BMD');
+              recognizeDisplayPhoto({ imgSed: this.fromValue.imgSed })
+                .then((response) => {
+                  if (response.code == 200) {
+                    this.fromValue.tempStoreCode = response.data.storeCode;
+                    this.addStoreFun();
+                  }
+                })
+                .catch(() => {
+                  this.resetProgress();
+                  this.$dialog.alert({
+                    title: '系统提示',
+                    message: response.msg,
+                  });
+                });
             } else {
               this.$dialog
                 .confirm({
@@ -2101,7 +2116,7 @@ export default {
       }
     },
     // 添加门店
-    addStoreFun(BMDtype) {
+    addStoreFun() {
       addStore(this.fromValue)
         .then((res) => {
           this.toastLoading().clear();