Prechádzať zdrojové kódy

Merge branch 'pre-release' of jianguan-web/qpls-md-app into master

李磊 2 rokov pred
rodič
commit
62dd5e021f

+ 29 - 0
api/approveStore.js

@@ -0,0 +1,29 @@
+import axios from '@/libs/axios.js'
+
+//  申请列表  分页
+export const xprhStoreApplyQueryPage = (params) => {
+  const url = `xprhStoreApply/queryPage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios.request({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+// 审核
+export const xprhStoreApplyAudit = (params) => {
+  const url = `xprhStoreApply/audit`
+  return axios.request({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+// 门店认证详情
+export const xprhStoreApplyDetail = (params) => {
+  return axios.request({
+    url: `xprhStoreApply/findBySn/${params.sn}`,
+    method: 'get'
+  })
+}

+ 17 - 5
api/data.js

@@ -41,9 +41,21 @@ export const getLookUpItem = (params) => {
 
 // 查询省市区
 export const getArea = (params) => {
-  return axios.request({
-    url: `area/queryList`,
-    data: params,
-    method: 'post'
-  })
+  if(params.type == '2' || params.parentId){
+    return axios.request({
+      url: `area/queryList`,
+      data: params,
+      method: 'post'
+    })
+  }
+}
+// 获取省市区,兼容小程序数据
+export const getAreaCgj = (params) => {
+  if(params.type == '2' || params.parentId){
+    return axios.request({
+      url: `areaCgj/queryList`,
+      data: params,
+      method: 'post'
+    })
+  }
 }

+ 11 - 5
components/address.vue

@@ -55,8 +55,7 @@
 </template>
 
 <script>
-	import { getProvince, getCityByPro, getDistrictByCity } from '@/api/data.js'
-	import {getArea} from '@/api/data.js'
+	import {getArea,getAreaCgj} from '@/api/data.js'
 	export default{
 		name: 'Address',
 		props: {
@@ -98,6 +97,10 @@
 				type: String,
 				default: '' // 按钮的字体大小
 			},
+			isJrMini: { 
+				type: Boolean,
+				default: false // 是否兼容小程序数据
+			}
 		},
 		data(){
 			return{
@@ -228,7 +231,8 @@
 			//  获取省下拉数据
 			getProvinceList(idArr){
 				const _this = this
-				getArea({type:"2"}).then(res => {
+				const fun = this.isJrMini ? getAreaCgj : getArea;
+				fun({type:"2"}).then(res => {
 				  if (res.code == 200 || res.status == 204 || res.status == 200) {
 				    _this.provinceDataList = res.data || []  //  省下拉数据
 					//  判断是否有默认值
@@ -251,7 +255,8 @@
 				_this.cityDataList = []
 				_this.areaDataList = []
 				if (val != null && val != '') {
-					getArea({parentId: val,type:3}).then(res => {
+					const fun = this.isJrMini ? getAreaCgj : getArea;
+					fun({parentId: val,type:3}).then(res => {
 						if (res.code == 200 || res.status == 204 || res.status == 200) {
 							_this.cityDataList = res.data || []  //  市下拉数据
 							//  判断是否有默认值
@@ -273,7 +278,8 @@
 				const _this = this
 				this.areaDataList = []
 				if (val != null && val != '') {
-					getArea({parentId: val,type:4}).then(res => {
+					const fun = this.isJrMini ? getAreaCgj : getArea;
+					fun({parentId: val,type:4}).then(res => {
 						if (res.code == 200 || res.status == 204 || res.status == 200) {
 							_this.areaDataList = res.data || []
 							//  判断是否有默认值

+ 1 - 1
config/index.js

@@ -6,7 +6,7 @@ const getConfig = (theme) => {
 			themePath: 'default',
 			pro_URL: 'https://iscm.360arrow.com/qpls-md/', // 生产地址
 			uat_URL: 'http://p.iscm.360arrow.com/qpls-md/', // 预发布地址
-			dev_URL: 'http://192.168.16.103:8503/qpls-md/', // 本地地址
+			dev_URL: 'http://192.168.0.102/qpls-md/', // 本地地址
 			appName: 'iSCM智慧供应链', // app 名称
 			company: '陕西山海高科信息技术有限公司',
 			loadText:{

+ 4 - 3
manifest.json

@@ -2,8 +2,8 @@
     "name" : "iSCM智慧供应链",
     "appid" : "__UNI__5B57B68",
     "description" : "iSCM智慧供应链系统",
-    "versionName" : "1.1.4",
-    "versionCode" : 114,
+    "versionName" : "1.1.5",
+    "versionCode" : 115,
     "transformPx" : false,
     /* 5+App特有相关 */
     "app-plus" : {
@@ -86,7 +86,8 @@
             },
             /* ios打包配置 */
             "ios" : {
-                "idfa" : false
+                "idfa" : false,
+                "dSYMs" : false
             },
             /* SDK配置 */
             "sdkConfigs" : {

+ 27 - 0
pages.json

@@ -313,6 +313,33 @@
             }
             
         }
+        ,{
+            "path" : "pages/approveStore/list",
+            "style" :                                                                                    
+            {
+                "navigationBarTitleText": "门店审核",
+                "enablePullDownRefresh": false
+            }
+            
+        }
+        ,{
+            "path" : "pages/approveStore/authPass",
+            "style" :                                                                                    
+            {
+                "navigationBarTitleText": "审核通过",
+                "enablePullDownRefresh": false
+            }
+            
+        }
+        ,{
+            "path" : "pages/approveStore/detail",
+            "style" :                                                                                    
+            {
+                "navigationBarTitleText": "门店审核详情",
+                "enablePullDownRefresh": false
+            }
+            
+        }
     ],
 	"globalStyle": {
 		"navigationBarTextStyle": "black",

+ 267 - 0
pages/approveStore/authPass.vue

@@ -0,0 +1,267 @@
+<template>
+	<view class="apply-wrap flex flex_column">
+		<view class="login-form">
+			<u-form :model="form" label-width="180rpx" :error-type="['toast']" ref="uForm">
+				<u-form-item label="门头照片" required prop="storeImage">
+					<u-upload 
+					@on-success="uploadStorePhoto" 
+					@on-remove="removeStorePhoto" 
+					:file-list="storePhotoList" 
+					:action="action" 
+					:max-size="2 * 1024 * 1024" 
+					:width="200"
+					:height="150"
+					upload-text="上传门头照片"
+					max-count="1"></u-upload>
+				</u-form-item>
+				<u-form-item label="营业执照">
+					<u-upload
+					@on-success="uploadYyzzPhoto" 
+					@on-remove="removeYyzzPhoto" 
+					:file-list="yyzzPhotoList" 
+					:action="action" 
+					:max-size="2 * 1024 * 1024" 
+					:width="200"
+					:height="150"
+					upload-text="上传营业执照"
+					max-count="1"></u-upload>
+				</u-form-item>
+				<u-form-item label="门店名称" required prop="storeName">
+					<u-input v-model="form.storeName" :maxlength="30" placeholder="请输入门店名称(最多30个字符)"/>
+				</u-form-item>
+				<u-form-item label="所在地区" required prop="label">
+					<u-input v-model="form.label" placeholder="请选择省市区" :disabled="true" @click="openAddress"/>
+					<Address ref="applyAddress" :isJrMini="true" @onConfirm="areaConfirm"></Address>
+				</u-form-item>
+				<u-form-item label="详细地址" required prop="addrDetail">
+					<u-input v-model="form.addrDetail" :maxlength="100" placeholder="请输入详细地址(最多100个字符)"/>
+				</u-form-item>
+				<u-form-item label="联系人姓名" required prop="contactName">
+					<u-input v-model="form.contactName" :maxlength="20" placeholder="请输入联系人姓名(最多20个字符)"/>
+				</u-form-item>
+				<u-form-item label="联系人手机">
+					{{form.contactPhone}}
+				</u-form-item>
+				<u-form-item label="关联客户" required prop="customerSn">
+					<u-input v-model="form.customerName" type="select" placeholder="请输入选择关联客户" @click="chooseCustome" />
+				</u-form-item>
+				<u-form-item label="结算方式" required prop="settleType">
+					<u-input v-model="form.settleTypeDictValue" placeholder="请输入选择结算方式" type="select" @click="settleStyleModal = true" />
+					<u-picker v-model="settleStyleModal" @confirm="settleStyleChange" :range="settleStyleList" range-key="dispName" mode="selector"></u-picker>
+				</u-form-item>
+				<u-form-item label="授信金额" v-if="form.settleType == 'CREDIT'" required prop="creditLimit">
+					<u-input :clearable="false" type="digit" :min="100" :maxlength="8" @input="numberToFixed('creditLimit',2,999999)" v-model.trim="form.creditLimit" placeholder="请输入大于100的数字,最多两位小数"/>
+				</u-form-item>
+			</u-form>
+		</view>
+		<view class="form-btn-con flex justify_center">
+			<u-button class="form-btn" shape="circle" :loading="loading" type="info" :custom-style="{ background: '#066cff', color: '#fff',width:'350rpx' }" @click="formSubmit">审核通过</u-button>
+		</view>
+	</view>
+</template>
+
+<script>
+	import Address from '@/components/address.vue'
+	import { xprhStoreApplyDetail, xprhStoreApplyAudit } from '@/api/approveStore'
+	import { clzConfirm, numberToFixed } from '@/libs/tools';
+	const baseUrl = getApp().globalData.baseUrl
+	export default{
+		components: {
+			Address,
+		},
+		data(){
+			return{
+				loading: false,
+				theme: '',
+				form: {
+					storeName: '', // 门店名称
+					contactPhone: '', //  联系手机
+					contactName: '', //  联系人
+					label: '',
+					addrProvince: undefined, //  省
+					addrProvinceName: '',
+					addrCity: undefined, // 市
+					addrCityName: '',
+					addrDistrict: undefined, // 区
+					addrDistrictName: '',
+					addrDetail: '', //  详细地址
+					storeImage: '', // 门头照片
+					licenseImage: '', // 营业执照
+					settleType: undefined, //  结算方式
+					settleTypeDictValue: undefined,
+					customerSn: undefined, //  关联客户
+					customerName: undefined,
+					creditLimit: '', //  授信额度
+					delearSn: undefined,
+					applySn: undefined,
+					auditStatus: 'PASS' // 通过
+				},
+				rules: {
+					storeImage:[{ required: true, message: '请选择门头照片', trigger: 'change' }],
+					storeName: [{ required: true, message: '请输入门店名称', trigger: 'change' }],
+					contactMobile: [{ required: false, pattern: /^\d{30}$/, message: '请输入正确的手机号', trigger: 'change' }],
+					addrProvince: [{ required: true, message: '请选择省', trigger: 'change' }],
+					addrCity: [{ required: true, message: '请选择市', trigger: 'change' }],
+					addrDistrict: [{ required: true, message: '请选择区/县', trigger: 'change' }],
+					addrDetail: [{ required: true, message: '请输入详细地址', trigger: 'change' }],
+					contactName: [{ required: true, message: '请输入联系人姓名', trigger: 'change' }],
+					settleType: [{ required: true, message: '请选择收结算方式', trigger: 'change' }],
+					customerSn: [{ required: true, message: '请选择关联客户', trigger: 'change' }],
+					// creditLimit: [{ required: true, message: '请输入授信金额', trigger: 'change' }],
+				},
+				areaIdArr: [],  //  省市区id数组
+				labelArr: [],
+				action: baseUrl + 'upload',
+				storePhotoList: [],
+				yyzzPhotoList: [],
+				settleStyleModal: false,
+				settleStyleList: []
+			}
+		},
+		// 必须要在onReady生命周期,因为onLoad生命周期组件可能尚未创建完毕
+		onReady() {
+			this.$refs.uForm.setRules(this.rules);
+		},
+		onLoad(options) {
+			const _this = this
+			this.applySn = options.sn
+			this.getDetail()
+			this.settleStyleList = this.$store.state.vuex_shelfSettleType
+			
+			// 选择关联客户
+			uni.$on("addCustome",function(data){
+				_this.form.customerSn = data.customerSn
+				_this.form.customerName = data.customerName
+			})
+		},
+		onUnload() {
+			uni.$off("addCustome")
+		},
+		methods: {
+			// 小数点后两位
+			numberToFixed: function (key, num, max) {
+				let val = this.form[key]
+				let ret = numberToFixed(val, num, max)
+				this.$nextTick(() => {
+					this.form[key] = ret < 100 ? 100 : ret
+				})
+			},
+			//  获取详细
+			getDetail () {
+			  xprhStoreApplyDetail({ sn: this.applySn }).then(res => {
+			    if (res.status == 200) {
+			      this.form = Object.assign(this.form, res.data)
+			      this.storePhotoList = this.form.storeImage ? [{url:this.form.storeImage}] : []
+			      this.yyzzPhotoList = this.form.licenseImage ? [{url:this.form.licenseImage}] : [],
+			      this.labelArr = [this.form.addrProvinceName,this.form.addrCityName,this.form.addrDistrictName]
+			      this.areaIdArr = [this.form.addrProvince,this.form.addrCity,this.form.addrDistrict]
+			      this.form.label = this.labelArr.join('-')
+			      this.form.auditStatus = 'PASS' // 通过
+			    } else {
+			      this.$refs.ruleForm.resetFields()
+			    }
+			  })
+			},
+			// 上传门店图片成功
+			uploadStorePhoto(res){
+				this.form.storeImage = res.data
+			},
+			// 删除门店图片
+			removeStorePhoto(index){
+				this.form.storeImage = ''
+			},
+			// 上传营业执照图片成功
+			uploadYyzzPhoto(res){
+				this.form.licenseImage = res.data
+			},
+			// 删除营业执照图片
+			removeYyzzPhoto(index){
+				this.form.licenseImage = ''
+			},
+			// 收款方式  change
+			settleStyleChange(ind){
+				this.form.settleType = this.settleStyleList[ind].code || undefined
+				this.form.settleTypeDictValue = this.settleStyleList[ind].dispName || undefined
+				this.form.creditLimit = ''
+			},
+			// 选择关联客户
+			chooseCustome(){
+				uni.navigateTo({
+					url: "/pages/sales/chooseCustomer?backPage=authPass"
+				})
+			},
+			//  表单提交
+			formSubmit(){
+				const _this = this
+				this.$refs.uForm.validate(valid => {
+					if (valid) {
+						if((_this.form.creditLimit >= 100 && _this.form.settleType == 'CREDIT') || _this.form.settleType !== 'CREDIT'){
+							clzConfirm({
+							  title: '提示',
+							  content: '审核通过后,即可成为认证门店,确认审核通过吗?',
+							  success: function(res) {
+							  	if (res.confirm || res.index == 0) {
+								  _this.submitData()
+							  	}
+							  }
+							})
+						}else{
+							uni.showToast({
+								icon: 'none',
+								title: '请输入授信金额'
+							})
+						}
+					} else {
+						console.log('验证失败');
+					}
+				});
+			},
+			submitData(){
+				let obj = this.form
+				obj.addrProvince = this.areaIdArr[0]  //  省id
+				obj.addrCity = this.areaIdArr[1]  //  市id
+				obj.addrDistrict = this.areaIdArr[2]  //  区id
+				obj.addrProvinceName = this.labelArr[0]  //  省
+				obj.addrCityName = this.labelArr[1]  //  市
+				obj.addrDistrictName = this.labelArr[2]  //  区
+				this.loading = true
+				//  申请试用
+				xprhStoreApplyAudit(obj).then(res => {
+					console.log(res)
+					if(res.status == 200){
+						 uni.navigateBack()
+						 uni.$emit("updateAuthState")
+					}
+					uni.showToast({icon: 'none',title: res.message})
+					this.loading = false
+				})
+			},
+			//  选择省区市
+			areaConfirm(e) {
+				console.log('已选择的省市区', e)
+				this.labelArr = e.labelArr
+				this.areaIdArr = [ e.provinceCode, e.cityCode, e.areaCode ]
+				this.form.label = e.label
+			},
+			openAddress(){
+				//  省市区  回显     参数为省市区id数组
+				this.$refs.applyAddress.open(this.areaIdArr)
+			},
+		}
+	}
+</script>
+<style scoped lang="scss">
+	.apply-wrap{
+		width:100%;
+		height: 100vh;
+		background-color: #fff;
+		.login-form{
+			padding: 0.7rem 1.5rem;
+			flex-grow: 1;
+			overflow: auto;
+		}
+		.form-btn-con{
+			padding: 1rem;
+		}
+	}
+</style>

+ 125 - 0
pages/approveStore/detail.vue

@@ -0,0 +1,125 @@
+<template>
+	<view class="apply-wrap flex flex_column" v-if="form" >
+		<view class="title flex align_center justify_center">
+			<u-icon :name="form.auditStatus == 'PASS'?'icon_complete':(form.auditStatus == 'WAIT'?'wait':'icon_cancel')" custom-prefix="iscm-icon" size="40"></u-icon>
+			<text style="margin-left: 0.5rem;">{{form.auditStatusDictValue}}</text>
+		</view>
+		<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-form-item>
+				<u-form-item label="营业执照">
+					<u-image v-if="form.licenseImage" :src="form.licenseImage" width="200" height="150"></u-image>
+					<text v-else>未上传</text>
+				</u-form-item>
+				<u-form-item label="门店名称">
+					<view style="word-break: break-all;line-height: normal;">
+						{{form.storeName||'--'}}
+					</view>
+				</u-form-item>
+				<u-form-item label="所在地区">
+					<view style="word-break: break-all;line-height: normal;">
+						{{form.label||'--'}}
+					</view>
+				</u-form-item>
+				<u-form-item label="详细地址">
+					<view style="word-break: break-all;line-height: normal;">{{form.addrDetail||'--'}}</view>
+				</u-form-item>
+				<u-form-item label="联系人姓名">
+					<view style="word-break: break-all;line-height: normal;">
+					{{form.contactName||'--'}}
+					</view>
+				</u-form-item>
+				<u-form-item label="联系人手机">
+					{{form.contactPhone||'--'}}
+				</u-form-item>
+				<u-form-item label="关联客户" v-if="form.auditStatus == 'PASS'">
+					<view style="word-break: break-all;line-height: normal;">
+						{{form.customerName||'--'}}
+					</view>
+				</u-form-item>
+				<u-form-item label="结算方式" v-if="form.auditStatus == 'PASS'">
+					{{form.settleTypeDictValue||'--'}}
+				</u-form-item>
+				<u-form-item label="授信金额" v-if="form.auditStatus == 'PASS'&&form.settleType == 'CREDIT'">
+					{{form.creditLimit||'--'}}
+				</u-form-item>
+			</u-form>
+		</view>
+	</view>
+</template>
+
+<script>
+	import { xprhStoreApplyDetail } from '@/api/approveStore'
+	export default{
+		data(){
+			return{
+				loading: false,
+				theme: '',
+				form: {
+					storeName: '', // 门店名称
+					contactPhone: '', //  联系手机
+					contactName: '', //  联系人
+					addrProvince: undefined, //  省
+					addrProvinceName: '',
+					addrCity: undefined, // 市
+					addrCityName: '',
+					addrDistrict: undefined, // 区
+					addrDistrictName: '',
+					addrDetail: '', //  详细地址
+					storeImage: '', // 门头照片
+					licenseImage: '', // 营业执照
+					settleType: undefined, //  结算方式
+					settleTypeDictValue: undefined,
+					customerSn: undefined, //  关联客户
+					customerName: undefined,
+					creditLimit: '', //  授信额度
+					delearSn: undefined,
+					applySn: undefined,
+					auditStatus: undefined // 审核状态
+				},
+				rules: {},
+				areaIdArr: [],  //  省市区id数组
+				labelArr: [],
+			}
+		},
+		onLoad(options) {
+			const _this = this
+			this.applySn = options.sn
+			this.getDetail()
+		},
+		methods: {
+			//  获取详细
+			getDetail () {
+			  xprhStoreApplyDetail({ sn: this.applySn }).then(res => {
+				  console.log(res)
+			    if (res.status == 200) {
+			      this.form = Object.assign(this.form, res.data)
+			      this.labelArr = [this.form.addrProvinceName,this.form.addrCityName,this.form.addrDistrictName]
+			      this.areaIdArr = [this.form.addrProvince,this.form.addrCity,this.form.addrDistrict]
+			      this.form.label = this.labelArr.join('-')
+			    }  
+			  })
+			},
+		}
+	}
+</script>
+<style scoped lang="scss">
+	.apply-wrap{
+		width:100%;
+		height: 100vh;
+		background-color: #fff;
+		.title{
+			text-align: center;
+			font-size: 1.2rem;
+			border-bottom: 0.5rem solid #f8f8f8;
+			padding: 0.5rem;
+		}
+		.login-form{
+			padding: 0.7rem 1.5rem;
+			flex-grow: 1;
+			overflow: auto;
+		}
+	}
+</style>

+ 284 - 0
pages/approveStore/list.vue

@@ -0,0 +1,284 @@
+<template>
+	<view class="pagesCons">
+		<view class="utabs">
+			<u-tabs-swiper ref="uTabs" bar-width="160" :list="tabList" name="dispName" :current="current" @change="tabsChange" :is-scroll="false" swiperWidth="750"></u-tabs-swiper>
+			<view class="message">我的邀请码:{{yqcode}} <copyText :text="yqcode" label="邀请码"></copyText></view>
+		</view>
+		<swiper class="check-list" :current="swiperCurrent" @transition="transition" @change="swiperChange" @animationfinish="animationfinish">
+			<swiper-item class="swiper-item" v-for="(tabs, index) in tabList" :key="index">
+				<scroll-view scroll-y class="scroll-view" @scrolltolower="onreachBottom">
+					<view  
+					class="check-order-list" 
+					v-if="index==current"
+					v-for="(item,sindex) in list" 
+					:key="item.id+'-'+sindex"
+					>
+						<view class="check-row">
+							<view>{{item.applyTime}}</view>
+							<view>
+								<text>{{item.auditStatusDictValue}}</text>
+							</view>
+						</view>
+						<view class="check-col">
+							<view class="flex align_item" @click="toDetail(item)">
+								<view class="imgs">
+									<u-image :src="item.storeImage" :width="135" height="135" :border-radius="10"></u-image>
+								</view>
+								<view class="info">
+									<view class="btext">{{item.contactPhone}} {{item.contactName}}</view>
+									<view>{{item.storeName}}</view>
+									<view class="addr">{{item.addrProvinceName +'-'+ item.addrCityName +'-'+ item.addrDistrictName +'-'+ item.addrDetail}}</view>
+								</view>
+							</view>
+							<view style="width: 100%;text-align: right;" v-if="item.auditStatus == 'WAIT'">
+								<u-button size="mini" hover-class="none" @click="handleAudit(item,0)" shape="circle">审核不通过</u-button>
+								<u-button size="mini" type="success" @click="handleAudit(item,1)" :custom-style="customStyle" hover-class="none" shape="circle">审核通过</u-button>
+							</view>
+						</view>
+					 </view>
+					 <u-empty :src="`/static/${$config('themePath')}/def_no_data@3x.png`" icon-size="240" :text="noDataText" img-width="120" v-if="list.length==0 && status!='loading'" mode="list"></u-empty>
+					 <view v-if="index==current" style="padding: 20upx;">
+						 <u-loadmore :load-text="$config('loadText')" v-if="total>pageSize || status=='loading'" :status="status" />
+					 </view>
+				</scroll-view>
+			</swiper-item>
+		</swiper>
+	</view>
+</template>
+
+<script>
+	import { xprhStoreApplyQueryPage, xprhStoreApplyAudit } from '@/api/approveStore'
+	import { clzConfirm } from '@/libs/tools';
+	import copyText from '@/pages/common/copyText.vue'
+	export default {
+		components: {copyText},
+		data() {
+			return {
+				status: 'loadmore',
+				noDataText: '暂无数据',
+				tabList: [],
+				current: 0,
+				swiperCurrent: 0,
+				pageNo: 1,
+				pageSize: 10,
+				list: [],
+				total: 0,
+				action:'swiperChange', // 操作类型,上划分页,或左右滑动
+				customStyle: {
+					background: this.$config('primaryColor'),
+					marginLeft: '20rpx'
+				},
+				yqcode: ''
+			}
+		},
+		onLoad(options) {
+			const _this = this
+			_this.tabList = this.$store.state.vuex_storeAuthState
+			// 邀请码
+			_this.yqcode = this.$store.state.vuex_userData.extInfo.dealer.dealerInviteCode
+			// 获取数据
+			_this.getRow(1)
+			uni.$on("updateAuthState",function(){
+				_this.getRow(1)
+			})
+		},
+		onUnload() {
+			uni.$off("updateAuthState")
+		},
+		methods:{
+			// tabs通知swiper切换
+			tabsChange(index) {
+				this.swiperCurrent = index
+			},
+			swiperChange(event){
+				this.action = 'swiperChange'
+				this.status = 'loading'
+			},
+			// swiper-item左右移动,通知tabs的滑块跟随移动
+			transition(e) {
+				let dx = e.detail.dx
+				this.$refs.uTabs.setDx(dx)
+			},
+			// 由于swiper的内部机制问题,快速切换swiper不会触发dx的连续变化,需要在结束时重置状态
+			// swiper滑动结束,分别设置tabs和swiper的状态
+			animationfinish(e) {
+				let current = e.detail.current
+				let isCurtab = this.current == current
+				if(this.status!="nomore"){
+					let loadData = this.action == 'swiperChange' ? !isCurtab : isCurtab
+					if(loadData){
+						this.$refs.uTabs.setFinishCurrent(current)
+						this.swiperCurrent = current
+						this.current = current
+						this.resetPage()
+					}
+				}
+			},
+			// scroll-view到底部加载更多
+			onreachBottom() {
+				this.action = 'onreachBottom'
+				if(this.list.length < this.total){
+					this.resetPage()
+				}else{
+					this.status = "nomore"
+				}
+			},
+			// 查询列表
+			getRow (pageNo) {
+				if (pageNo) {
+					this.pageNo = pageNo
+				}
+				let params = {
+					pageNo: this.pageNo,
+					pageSize: this.pageSize,
+					auditStatus: this.tabList[this.current].code
+				}
+				this.status = "loading"
+				xprhStoreApplyQueryPage(params).then(res => {
+					if (res.status == 200) {
+						if(this.pageNo>1){
+							this.list = this.list.concat(res.data.list || [])
+						}else{
+							this.list = res.data.list || []
+						}
+						this.total = Number(res.data.count) || 0
+						if(this.current == 0){
+							this.tabList[0].count = this.total
+						}
+					} else {
+						this.list = []
+						this.total = 0
+						this.noDataText = res.message
+					}
+					this.status = "loadmore"
+				})
+			},
+			resetPage(){
+				this.status = 'loading';
+				// 上划分页
+				if(this.action == 'onreachBottom'){
+					this.pageNo += 1
+					this.getRow()
+				}
+				// 左右切换tab
+				if(this.action == 'swiperChange'){
+					this.list = []
+					this.getRow(1)
+				}
+			},
+			// 详情
+			toDetail(row){
+				uni.navigateTo({
+					url: "/pages/approveStore/detail?sn="+row.applySn
+				})
+			},
+			// 审核
+			handleAudit (row, type) {
+			  // 审核通过
+			  if (type == 1) {
+				uni.navigateTo({
+					url: "/pages/approveStore/authPass?sn="+row.applySn
+				})
+			  } else {
+			    const _this = this
+			    clzConfirm({
+			      title: '提示',
+			      content: '确认审核不通过吗?',
+				  success: function(res) {
+				  	if (res.confirm || res.index == 0) {
+						xprhStoreApplyAudit({
+						  applySn: row.applySn,
+						  auditStatus: 'REFUSE'
+						}).then(res => {
+						  if (res.status == 200) {
+						     _this.getRow(1)
+						  }
+						})
+				  	}
+				  }
+			    })
+			  }
+			},
+		}
+	}
+</script>
+
+<style lang="scss">
+	page {
+		height: 100%;
+	}
+	.pagesCons{
+		width: 100%;
+		height: 100%;
+		display: flex;
+		flex-direction: column;
+		.text-right {
+			text-align: right;
+		}
+		.utabs{
+			.message{
+				padding: 0.5rem 1rem;
+				background: #feffb9;
+				margin-top: 0.5rem;
+			}
+		}
+		.check-list{
+			flex: 1;
+			.swiper-item{
+				width: 100%;
+				height: 100%;
+				overflow: hidden;
+				.scroll-view {
+					width: 100%;
+					height: 100%;
+					overflow: auto;
+				}
+			}
+		}
+		 
+		// 列表样式
+		.check-order-list{
+			background: #ffffff;
+			margin: 25upx;
+			border-radius: 25upx;
+			box-shadow: 1px 1px 3px #EEEEEE;
+			.check-row{
+				 display: flex;
+				 justify-content: space-between;
+				 >view{
+					 &:first-child{
+						 color: #999;
+						 font-size: 24rpx;
+						 width: 80%;
+					 }
+					 &:last-child{
+						 font-size: 24rpx;
+						 margin-top: 5rpx;
+					 }
+				 }
+				 border-bottom: 2rpx solid #eee;
+				 padding: 20rpx;
+			}
+			.check-col{
+				padding: 20rpx;
+				> view{
+					padding: 3rpx 0;
+					font-size: 26rpx;
+				}
+				.info{
+					flex-grow: 1;
+					padding: 0 10rpx 0 20rpx;
+				}
+				.btext{
+					font-weight: bold;
+					margin-bottom: 10rpx;
+				}
+				.addr{
+					color: #999;
+					margin-top: 6rpx;
+					word-break: break-all;
+				}
+			}
+		}
+	}
+</style>

+ 31 - 4
pages/index/index.vue

@@ -2,19 +2,33 @@
 	<view class="homePage-container">
 		 <!-- 数字货架 -->
 		 <div class="panel-box">
-		 	<div class="panel-title"><div class="texts">数字货架</div></div>
+		 	<div class="panel-title"><div class="texts">补货管理</div></div>
 		 	<div class="panel-body"><iconItemsList :list="storageRacksNavList"></iconItemsList></div>
 		 </div>
 		 <!-- 调回管理 -->
 		 <div class="graid-box">
 			 <div class="graid-box-1" @click="toPage('/pages/shuntBackManage/shuntBackList')">
+				 <div class="icon">
+					 <u-icon name="huowu-tuihui" custom-prefix="iscm-icon" size="70"></u-icon>
+				 </div>
 				 <div class="title">调回管理</div>
 				 <div>商品调回记录查询</div>
 			 </div>
 			 <div class="graid-box-1" @click="toPage('/pages/latePlay/chooseBulk')">
+				 <div class="icon">
+				 	<u-icon name="icon_remark" custom-prefix="iscm-icon" size="70"></u-icon>
+				 </div>
 				 <div class="title">补打贴签</div>
 				 <div>遗漏标签快捷处理</div>
 			 </div>
+			 <div class="graid-box-1" @click="toPage('/pages/approveStore/list')">
+				 <div class="icon">
+				 	<u-icon name="mendianzhuanxiangshenhe" custom-prefix="iscm-icon" size="70"></u-icon>
+					<u-badge type="error" size="mini" :offset="[-5,20]" :count="storeAuthNums"></u-badge>
+				 </div>
+				 <div class="title">门店审核</div>
+				 <div>审核门店的认证申请</div>
+			 </div>
 			 <!-- <div class="graid-box-1" @click="toPage('/pages/index/printAbc')">
 				 <div class="title">打印ABC</div>
 				 <div>遗漏标签快捷处理</div>
@@ -25,6 +39,7 @@
 <script>
 	import iconItemsList from '@/components/icon-items-list/icon-items-list.vue';
 	import { shelfReplenishStateCount } from '@/api/shelfReplenish'
+	import { xprhStoreApplyQueryPage } from '@/api/approveStore'
 	export default {
 		components: {
 			iconItemsList,
@@ -33,7 +48,8 @@
 			return {
 				// 数字货架
 				storageRacksNavList: [],
-				theme: ''
+				theme: '',
+				storeAuthNums: 0
 			}
 		},
 		onLoad() {
@@ -82,6 +98,7 @@
 		},
 		onShow() {
 			this.queryByTypeSum()
+			this.getStoreNums()
 		},
 		methods:{
 			toPage(url){
@@ -97,6 +114,11 @@
 					}
 				})
 			},
+			getStoreNums(){
+				xprhStoreApplyQueryPage({pageNo:1,pageSize:1,auditStatus:'WAIT'}).then(res => {
+					 this.storeAuthNums = res.data.count || 0
+				})
+			}
 		}
 	}
 </script>
@@ -114,13 +136,18 @@
 				box-shadow: 3upx 2upx 6upx #eee;
 				padding: 30rpx;
 				width: 50%;
-				font-size: 28rpx;
+				font-size: 24rpx;
 				color: #424D5E;
+				text-align: center;
 				.title{
-					font-size: 45rpx;
+					font-size: 28rpx;
 					color: #191919;
 					font-weight: bold;
 				}
+				.icon{
+					text-align: center;
+					position: relative;
+				}
 			}
 			> div{
 				&:first-child{

+ 1 - 1
pages/replenishmentManage/replenishmentList.vue

@@ -1,7 +1,7 @@
 <template>
 	<view class="pagesCons">
 		<view class="utabs">
-			<u-tabs-swiper ref="uTabs" :list="tabList" name="dispName" :current="current" @change="tabsChange" :is-scroll="false" swiperWidth="750"></u-tabs-swiper>
+			<u-tabs-swiper ref="uTabs" bar-width="90" :list="tabList" name="dispName" :current="current" @change="tabsChange" :is-scroll="false" swiperWidth="750"></u-tabs-swiper>
 		</view>
 		<swiper class="check-list" :current="swiperCurrent" @transition="transition" @change="swiperChange" @animationfinish="animationfinish">
 			<swiper-item class="swiper-item" v-for="(tabs, index) in tabList" :key="index">

+ 27 - 31
pages/sales/addCustomer.vue

@@ -11,14 +11,14 @@
 					<textarea :auto-height="true" input-align="right" placeholder="请输入详细地址(最多60个字符)" :maxlength="60" v-model="form.customerAddr" class="receiveAddress" placeholder-style="color:#C0C4CC;font-size:28upx;"/>
 				</u-form-item>
 				<u-form-item label="联系人">
-					<u-input v-model="form.contactName" input-align="right" placeholder="请输入联系人(最多30个字符)" :maxlength="11"/>
+					<u-input v-model="form.contactName" input-align="right" placeholder="请输入联系人(最多20个字符)" :maxlength="20"/>
 				</u-form-item>
 				<u-form-item label="联系电话">
 					<u-input v-model.trim="form.contactTel" placeholder="请输入联系电话(最多15个字符)" input-align="right" :maxlength="15"/>
 				</u-form-item>
 				<u-form-item label="联系手机"><u-input v-model.trim="form.contactMobile" placeholder="请输入联系手机(最多11位字符)" input-align="right" :maxlength="11"/>
 				</u-form-item>
-				<u-form-item label="价格类型" required >
+				<u-form-item label="价格类型" required prop="priceType">
 					<v-select ref="priceType" :disabled="true" placeholder="请选择价格类型" @itemChange="chooseType" code="PRICE_TYPE" style="width: 100%"></v-select>
 				</u-form-item>
 				<u-form-item label="收款方式" required prop="settleStyleSn">
@@ -41,7 +41,7 @@
 			<u-button class="handle-btn" size="medium" shape="circle" hover-class="none" @click="customerSubmit" :custom-style="customBtnStyle">保存</u-button>
 		</view>
 		<!-- 省市区 -->
-		<Address ref="applyAddress" @onConfirm="areaConfirm"></Address>
+		<Address ref="applyAddress" :isJrMini="false" @onConfirm="areaConfirm"></Address>
 		<!-- 选择收款方式 -->
 		<u-picker v-model="showSettle" title="收款方式"  @confirm="settleStyleChange" :range="settleTypeList" range-key="name" mode="selector" :default-selector="JSON.parse(JSON.stringify(defaultSettleIndex))"></u-picker>
 		<!-- 客户类型 -->
@@ -65,7 +65,7 @@
 				},
 				// 客户form
 				form:{
-					id: null,
+					id: undefined,
 					customerName: '', // 客户名称
 					contactTel: '', //  联系电话
 					contactMobile: '', //  联系手机
@@ -81,7 +81,7 @@
 					dispatchType: undefined, //  配送方式
 					satelliteFlag: 0, //  是否卫星仓客户
 					customerTypeSn: undefined, //  客户类型
-					priceType: '', //  价格类型
+					priceType: undefined, //  价格类型
 					settleStyleSn: undefined //  收款方式
 				},
 				showSettle:false,//结算方式初始值
@@ -94,6 +94,7 @@
 				areaIdArr: [],  //  省市区id数组
 				defaultSettleIndex:[0] ,//选中收款方式的下标
 				defaultCustIndex:[0],//选中客户类型的下标
+				backPage: ''
 			}
 		},
 		// 必须要在onReady生命周期,因为onLoad生命周期组件可能尚未创建完毕
@@ -101,13 +102,13 @@
 			this.$refs.uForm.setRules(this.rules);
 		},
 		onLoad(option) {
+			this.backPage = option.backPage
 			this.getSettleStyle()
 			this.getCustomerList()
 		},
 		methods:{
 			// 选择价格类型
 			chooseType(val){
-				console.log(val,'vai')
 				this.form.priceType=val
 			},
 			// 选择配送方式
@@ -170,10 +171,8 @@
 			},
 			// 保存 (新增客户)
 			customerSubmit(){
-				console.log('保存===========')
 				this.$refs.uForm.validate(valid => {
 					if (valid) {
-						console.log('验证通过');
 						if (this.form.customerName ==='') {
 							uni.showToast({
 								title: '请输入客户名称',
@@ -192,24 +191,24 @@
 						}
 						//  省市区
 						if(this.areaIdArr.length == 0){
-							uni.showToast({icon: 'none',title: '请选择省市区'})
+							uni.showToast({icon: 'none',title: '请选择客户地址'})
 							return
 						}
-						if (this.form.priceType ==undefined) {
+						if (!this.form.priceType) {
 							uni.showToast({
 								title: '请选择价格类型',
 								icon: 'none'
 							})
 							return false
 						}
-						if (this.form.settleStyleSn ==undefined) {
+						if (!this.form.settleStyleSn) {
 							uni.showToast({
 								title: '请选择收款方式',
 								icon: 'none'
 							})
 							return false
 						}
-						const params=Object.assign({},this.form,this.areaIdArr)
+						const params=Object.assign({},this.form)
 						console.log(params,'params')
 						if(this.form.id) {
 							params.id = this.form.id
@@ -220,11 +219,18 @@
 									title: res.message,
 									icon: 'none'
 								})
-								setTimeout(()=>{
+								if(!this.backPage){
 									uni.redirectTo({
 										url:'/pages/sales/addSales?pageType=add&nowId='+res.data.id
 									})
-								},300)
+								}
+								// 门店审核通过
+								if(this.backPage == 'authPass'){
+									uni.$emit("addCustome",res.data)
+									uni.navigateBack({
+										delta: 2
+									})
+								}
 							} 
 						})
 					} else {
@@ -237,22 +243,19 @@
 </script>
 
 <style lang="scss">
+	page{
+		height: 100vh;
+	}
 	.addCustomer-content{
 		width: 100%;
-		height: 100vh;
+		height: 100%;
 		background-color: #fff;
 		padding:0 40upx;
 		display: flex;
 		flex-direction: column;
-		.content-customerName{
-			// padding: 10upx;
-			// border-radius: 10upx;
-			// border: 1upx solid #e5e5e5;
-		}
 		.content-form{
-			flex: 1;
-			// box-shadow:0 8upx 24upx rgba(0,0,0,.1);
-			// border: 1upx solid #e5e5e5;
+			flex-grow:1;
+			overflow: auto;
 			.receiveAddress{
 				width: 100%;
 				line-height: 1.5em;
@@ -261,17 +264,10 @@
 				text-align: end;
 			}
 		}
-		.content-form:not(:last-child){
-			border-bottom: none;
-		}
 		.form-footer-btn{
 			background-color: #fff;
-			position: fixed;
-			bottom: 0;
-			left: 0;
 			width: 100%;
-			padding: 16upx 20upx 12upx;
-			z-index: 999;
+			padding: 20upx;
 			.handle-btn{
 				width: 100%;
 				background-color: rgb(51, 95, 182);

+ 1 - 1
pages/sales/addSales.vue

@@ -60,7 +60,7 @@
 			</view>
 		</view>
 		<!-- 省市区 -->
-		<Address ref="applyAddress" @onConfirm="areaConfirm"></Address>
+		<Address ref="applyAddress" :isJrMini="false" @onConfirm="areaConfirm"></Address>
 		<!-- 选择收款方式 -->
 		<u-picker v-model="showSettle" title="收款方式"  @confirm="settleStyleChange" :range="settleTypeList" range-key="name" mode="selector" :default-selector="JSON.parse(JSON.stringify(defaultSettleIndex))"></u-picker>
 		<!-- 客户类型 -->

+ 7 - 2
pages/sales/chooseCustomer.vue

@@ -3,7 +3,7 @@
 		<view class="search">
 			<view class="flex justify_between align_center search-title">
 				<text class="search-label">客户名称</text>
-				<view class="search-btn" v-if="backPage == 'addSales'">
+				<view class="search-btn" v-if="backPage == 'addSales'||backPage == 'authPass'">
 					<text>没有搜索到?</text>
 					<text>点击</text>
 					<text @click="addCustomer">新增客户</text>
@@ -68,7 +68,7 @@
 			// 新增客户
 			addCustomer(){
 				uni.navigateTo({
-					url:'/pages/sales/addCustomer'
+					url:'/pages/sales/addCustomer?backPage='+this.backPage
 				})
 			},
 			getData(){
@@ -107,6 +107,11 @@
 					uni.$emit("searchSalesRecord",item)
 					uni.navigateBack()
 				}
+				// 门店审核通过
+				if(this.backPage == 'authPass'){
+					uni.$emit("addCustome",item)
+					uni.navigateBack()
+				}
 			}
 		},
 	}

+ 9 - 1
pages/sales/index.vue

@@ -122,6 +122,10 @@
 			this.getListLookUp();
 			// 获取支付,收款方式
 			this.getLookUpList('SETTLE_STYLE', 'vuex_paymentTypeList');
+			// 获取门店审核状态
+			this.getLookUpList('XPRH_STORE_APPLY_STATUS', 'vuex_storeAuthState');
+			// 门店审核结算方式
+			this.getLookUpList('SHELF_SETTLE_TYPE', 'vuex_shelfSettleType');
 		},
 		onUnload() {
 			uni.$off('refreshSalesHomeBL')
@@ -145,7 +149,11 @@
 				getLookUpDatas({ pageNo: 1,pageSize: 1000, lookupCode: code}).then(res => {
 					console.log(res)
 					if (res.status == 200) {
-						this.$store.state[vuexKey] = res.data.list || [];
+						const list = res.data.list;
+						list.map(item => {
+							item.count = 0
+						})
+						this.$store.state[vuexKey] = list || [];
 					}
 				});
 			},

Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 0 - 0
static/iconfont/iconfont.css


BIN
static/iconfont/iconfont.ttf


+ 2 - 0
store/index.js

@@ -108,6 +108,8 @@ const store = new Vuex.Store({
 		vuex_OrderAddress: {}, // 地址
 		vuex_allLookUp: [],  //  数据字典
 		vuex_paymentTypeList: [], // 收款方式
+		vuex_storeAuthState: [], // 门店审核状态
+		vuex_shelfSettleType: [], // 门店审核结算方式
 	},
 	mutations: {
 		$uStore(state, payload) {

BIN
证书/ios/开发证书/iscmApp.mobileprovision


Niektoré súbory nie sú zobrazené, pretože je v týchto rozdielových dátach zmenené mnoho súborov