shish 3 роки тому
батько
коміт
16474173ea

+ 15 - 11
hdApp/src/admin/goods/cgNewPlant.vue

@@ -156,13 +156,17 @@ export default {
       }
       let kindName = this.option.kindName ? this.option.kindName : ''
       let form = JSON.parse(JSON.stringify(this.form))
-      uni.showLoading({mask:true})
-      cgPlant({...form,kindId:kindId,name:kindName,kindName:kindName}).then(res => {
-        uni.hideLoading()
-        if(res.code == 1){
-          this.pageTo({url: '/admin/goods/cgNewPlantResult',type:2,query:{id:res.data.id}})
-        }
-      })
+
+			let that = this
+			this.$util.confirmModal({content:'确认提交'},() => {
+        uni.showLoading({mask:true})
+        cgPlant({...form,kindId:kindId,name:kindName,kindName:kindName}).then(res => {
+          uni.hideLoading()
+          if(res.code == 1){
+            that.pageTo({url: '/admin/goods/cgNewPlantResult',type:2,query:{id:res.data.id}})
+          }
+        })
+			})
     },
     formSubmit(e) {
       let rules = [
@@ -184,11 +188,11 @@ export default {
       ];
       let formData = e.detail.value;
       let checkRes = form.validation(formData, rules);
-      if (!checkRes) {
-          this.confirmFn()
-      } else {
-        this.$msg(checkRes);
+      if (checkRes) {
+        this.$msg(checkRes)
+        return false
       }
+      this.confirmFn()
     }
   }
 };

+ 3 - 0
hdApp/src/admin/goods/cgNewPlantResult.vue

@@ -16,6 +16,9 @@
 export default {
     name: "success",
 	methods: {
+		init(){
+
+		},
 		goBackHome() {
 			uni.navigateBack({})
 		},

+ 3 - 0
hdApp/src/admin/goods/list.vue

@@ -113,6 +113,9 @@ export default {
     this.getCategoryData()
   },
   methods: {
+    init(){
+
+    },
 		moreToDo(item){
 			let that=this;
 			let doList = ['打1个标签', '打2个标签','打5个标签', '打10个标签','设置为散花']

+ 4 - 0
hdApp/src/admin/goods/plantCg.vue

@@ -64,6 +64,10 @@ export default {
       uni.stopPullDownRefresh()
     })
   },
+  onShow() {
+  	//this.resetList();
+    this.getCgList()
+  },
   methods: {
     change(e) {
 			if (this.tabIndex == e.index) {

+ 3 - 3
hdApp/src/admin/home/workbench.vue

@@ -41,7 +41,7 @@
             {{ $util.numberFormat(data.todayData.bouquet) || 0 }}
           </div>
         </div>
-        <div class="info-list" @click="goToExpend" >
+        <div class="info-list" @click="goToWastage" >
           <div class="info-list-name">损耗</div>
           <div class="info-list-value">
             {{ $util.numberFormat(data.todayData.wastage) || 0 }}
@@ -413,8 +413,8 @@ export default {
     noticeFn (item) {
       this.$util.pageTo({ url: item.page })
     },
-    goToExpend () {
-      uni.navigateTo({url:'/pagesStore/me/expend'})
+    goToWastage () {
+      this.$util.pageTo({url:'/admin/breakage/list'})
     },
     goToKindStat(){
       this.$util.pageTo({url:'/admin/stat/kind'})