Browse Source

优化门店按钮操作流程

Qukatie 5 days ago
parent
commit
4861e1758e
2 changed files with 99 additions and 86 deletions
  1. 2 2
      manifest.json
  2. 97 84
      pages/home/store/details.vue

+ 2 - 2
manifest.json

@@ -2,8 +2,8 @@
     "name" : "库比森轮胎-经销商端",
     "appid" : "__UNI__D89E6F8",
     "description" : "",
-    "versionName" : "1.0.14",
-    "versionCode" : 1014,
+    "versionName" : "1.0.19",
+    "versionCode" : 1019,
     "transformPx" : false,
     "ios" : {
         "bundleIdentifer" : "uni.app.UNID89E6F8" // 替换为你的 Bundle ID

+ 97 - 84
pages/home/store/details.vue

@@ -271,6 +271,15 @@
 			<uni-goods-nav v-if="!(form.checkStatus=='录入'||form.checkStatus=='审核驳回')" :fill="true" :options="[]"
 				:buttonGroup="buttonGroup2" @buttonClick="buttonClick2" />
 		</view>
+		<u-modal :show="modalShow" confirmText="通过" cancelText="驳回" :showCancelButton="true" confirmColor="#18bc37"
+			cancelColor="#e43d33" :closeOnClickOverlay="true" @close="modalShow=false" @confirm="approval(1)"
+			@cancel="approval(2)">
+			<view style="height: 120rpx;display: flex;align-items: center;">
+				<text style="font-size: 34rpx;">
+					是否通过审核?
+				</text>
+			</view>
+		</u-modal>
 	</view>
 </template>
 
@@ -297,15 +306,16 @@
 	export default {
 		data() {
 			return {
+				modalShow: false,
 				popupShow: false,
 				buttonGroup: [{
-						text: '通过',
-						backgroundColor: '#18bc37',
+						text: '保存',
+						backgroundColor: '#03803B',
 						color: '#fff'
 					},
 					{
-						text: '驳回',
-						backgroundColor: '#e64340',
+						text: '审批',
+						backgroundColor: '#18bc37',
 						color: '#fff'
 					}
 				],
@@ -410,10 +420,90 @@
 			},
 			buttonClick(e) {
 				if (e.index == 0) {
-					this.approval(1)
+					this.submit()
+					// this.approval(1)
 				}
 				if (e.index == 1) {
-					this.approval(2)
+					if (!this.form.cname) {
+						uni.showToast({
+							title: '请输入店铺名称',
+							icon: 'none'
+						});
+						return
+					}
+					if (this.form.corpsFilesList.filter(item => item.isDeleted == 0).length == 0) {
+						uni.showToast({
+							title: '请上传店面照片',
+							icon: 'none'
+						});
+						return
+					}
+
+					if (!this.form.contacts) {
+						uni.showToast({
+							title: '请输入联系人',
+							icon: 'none'
+						});
+						return
+					}
+					if (!this.form.contactsPhone) {
+						uni.showToast({
+							title: '请输入电话',
+							icon: 'none'
+						});
+						return
+					}
+					if (!/^[1][3,4,5,7,8,9][0-9]{9}$/.test(this.form.contactsPhone)) {
+						uni.showToast({
+							title: '请输入正确电话',
+							icon: 'none'
+						});
+						return;
+					}
+					if (!this.form.salesmanName) {
+						uni.showToast({
+							title: '请选择业务员',
+							icon: 'none'
+						});
+						return
+					}
+					if (!this.form.deliveryWarehouseName) {
+						uni.showToast({
+							title: '请选择发货仓库',
+							icon: 'none'
+						});
+						return
+					}
+					if (!this.form.priceSystem) {
+						uni.showToast({
+							title: '请选择商城价格',
+							icon: 'none'
+						});
+						return
+					}
+					if (!this.form.address) {
+						uni.showToast({
+							title: '请选择所属区域',
+							icon: 'none'
+						});
+						return
+					}
+					if (!this.form.detailedAddress) {
+						uni.showToast({
+							title: '请输入详细地址',
+							icon: 'none'
+						});
+						return
+					}
+					if (!this.form.corpsTypeId) {
+						uni.showToast({
+							title: '请选择店面分类',
+							icon: 'none'
+						});
+						return
+					}
+					this.modalShow = true
+					// this.approval(2)
 				}
 			},
 			buttonClick2(e) {
@@ -795,84 +885,7 @@
 					});
 			},
 			async approval(type) {
-				if (!this.form.cname) {
-					uni.showToast({
-						title: '请输入店铺名称',
-						icon: 'none'
-					});
-					return
-				}
-				if (this.form.corpsFilesList.filter(item => item.isDeleted == 0).length == 0) {
-					uni.showToast({
-						title: '请上传店面照片',
-						icon: 'none'
-					});
-					return
-				}
-
-				if (!this.form.contacts) {
-					uni.showToast({
-						title: '请输入联系人',
-						icon: 'none'
-					});
-					return
-				}
-				if (!this.form.contactsPhone) {
-					uni.showToast({
-						title: '请输入电话',
-						icon: 'none'
-					});
-					return
-				}
-				if (!/^[1][3,4,5,7,8,9][0-9]{9}$/.test(this.form.contactsPhone)) {
-					uni.showToast({
-						title: '请输入正确电话',
-						icon: 'none'
-					});
-					return;
-				}
-				if (!this.form.salesmanName) {
-					uni.showToast({
-						title: '请选择业务员',
-						icon: 'none'
-					});
-					return
-				}
-				if (!this.form.deliveryWarehouseName) {
-					uni.showToast({
-						title: '请选择发货仓库',
-						icon: 'none'
-					});
-					return
-				}
-				if (!this.form.priceSystem) {
-					uni.showToast({
-						title: '请选择商城价格',
-						icon: 'none'
-					});
-					return
-				}
-				if (!this.form.address) {
-					uni.showToast({
-						title: '请选择所属区域',
-						icon: 'none'
-					});
-					return
-				}
-				if (!this.form.detailedAddress) {
-					uni.showToast({
-						title: '请输入详细地址',
-						icon: 'none'
-					});
-					return
-				}
-				if (!this.form.corpsTypeId) {
-					uni.showToast({
-						title: '请选择店面分类',
-						icon: 'none'
-					});
-					return
-				}
+				this.modalShow = false
 				let obj = await this.convertData(this.$deepClone(this.form))
 				console.log(obj)
 				let _this = this