ccjgmwz 3 năm trước cách đây
mục cha
commit
59a522a725

+ 10 - 1
common/directive.js

@@ -13,7 +13,16 @@ const permission = (el, binding) => {
 }
 }
 const getRoles = ()=>{
 const getRoles = ()=>{
 	let _roles = uni.getStorageSync('jurisdiction');
 	let _roles = uni.getStorageSync('jurisdiction');
-	return getUserAllRoles(_roles)
+	let list = uni.getStorageSync('rolesList');
+	if(list&&list.length > 0){
+		return list
+	}
+	else{
+		list = getUserAllRoles(_roles);
+		uni.setStorageSync("rolesList", list)
+		return list
+	}
+	
 }
 }
 
 
 const getUserAllRoles = (item) => {
 const getUserAllRoles = (item) => {

+ 2 - 2
config/index.js

@@ -1,7 +1,7 @@
 const dev = {
 const dev = {
 	baseUrl: 'https://www.zthymaoyi.com',
 	baseUrl: 'https://www.zthymaoyi.com',
-	baseUrlNew: 'http://192.168.1.102:8090/',
-	// baseUrlNew: 'http://api1.eliangeyun.com/',
+	// baseUrlNew: 'http://192.168.1.122:8090/',
+	baseUrlNew: 'http://api1.eliangeyun.com/',
 	h5Appid: 'wxb66b599f7f61b46f',
 	h5Appid: 'wxb66b599f7f61b46f',
 	debug: false
 	debug: false
 }
 }

+ 2 - 2
manifest.json

@@ -2,8 +2,8 @@
     "name" : "易粮易运",
     "name" : "易粮易运",
     "appid" : "__UNI__7297DA2",
     "appid" : "__UNI__7297DA2",
     "description" : "易粮易运——为天下粮食人服务的App",
     "description" : "易粮易运——为天下粮食人服务的App",
-    "versionName" : "1.1.10",
-    "versionCode" : 1110,
+    "versionName" : "1.1.11",
+    "versionCode" : 1111,
     "transformPx" : false,
     "transformPx" : false,
     /* SDK配置 */
     /* SDK配置 */
     "quickapp" : {},
     "quickapp" : {},

+ 13 - 30
pages/erpbusiness/customer.vue

@@ -85,26 +85,6 @@
 				
 				
 			}
 			}
 		},
 		},
-		// #ifndef MP
-		onNavigationBarButtonTap(e) {
-			const index = e.index;
-			if (index === 0) {
-				this.navTo('/pages/set/set');
-			} else if (index === 1) {
-				// #ifdef APP-PLUS
-				const pages = getCurrentPages();
-				const page = pages[pages.length - 1];
-				const currentWebview = page.$getAppWebview();
-				currentWebview.hideTitleNViewButtonRedDot({
-					index
-				});
-				// #endif
-				uni.navigateTo({
-					url: '/pages/notice/notice'
-				})
-			}
-		},
-		// #endif
 		computed: {
 		computed: {
 			...mapState(['hasLogin', 'userInfo']),
 			...mapState(['hasLogin', 'userInfo']),
 			// 手机号中间4位加*
 			// 手机号中间4位加*
@@ -168,6 +148,8 @@
 						searchContent:item.customerName+'('+item.customerPhone+')',
 						searchContent:item.customerName+'('+item.customerPhone+')',
 						functionType:3
 						functionType:3
 					}).then(res => {
 					}).then(res => {
+						
+						uni.setStorageSync('checkcustomer',item)
 						that.$api.doRequest('get', '/qualityInspectionManagement/api/settledCount',{
 						that.$api.doRequest('get', '/qualityInspectionManagement/api/settledCount',{
 							compId:'',
 							compId:'',
 							customerName: item.customerName,
 							customerName: item.customerName,
@@ -180,7 +162,6 @@
 									customerName: item.customerName,
 									customerName: item.customerName,
 									goodsName: uni.getStorageSync('goodsName'),
 									goodsName: uni.getStorageSync('goodsName'),
 								}).then(res => {
 								}).then(res => {
-									uni.hideLoading()
 									for (let i = 0; i < that.purchasePriceList.length; i++) {
 									for (let i = 0; i < that.purchasePriceList.length; i++) {
 										var data = res.data.data/1000
 										var data = res.data.data/1000
 										if(that.purchasePriceList[i].goodsName== uni.getStorageSync('goodsName')){
 										if(that.purchasePriceList[i].goodsName== uni.getStorageSync('goodsName')){
@@ -189,12 +170,12 @@
 											}
 											}
 										}
 										}
 									}
 									}
+									that.show=false
+									uni.hideLoading()
+									uni.navigateBack()
 								})
 								})
 							}
 							}
 						})
 						})
-						uni.setStorageSync('checkcustomer',item)
-						that.show=false
-						uni.navigateBack()
 					})
 					})
 					.catch(res => {
 					.catch(res => {
 						uni.showToast({
 						uni.showToast({
@@ -216,17 +197,19 @@
 				var count=''
 				var count=''
 				var that = this
 				var that = this
 				var name=item.searchContent.split('(')[0]
 				var name=item.searchContent.split('(')[0]
+				var phone=item.searchContent.split('(')[1]
+				phone = phone.substring(0,phone.length-1)
 				for(var i=0;i<this.customerList.length;i++){
 				for(var i=0;i<this.customerList.length;i++){
 					// console.log(name,this.customerList[i].customerName,name==this.customerList[i].customerName)
 					// console.log(name,this.customerList[i].customerName,name==this.customerList[i].customerName)
-					if(this.customerList[i].customerName==name){
+					if(this.customerList[i].customerPhone==phone){
 						var tmpName = this.customerList[i].customerName
 						var tmpName = this.customerList[i].customerName
+						uni.setStorageSync('checkcustomer',this.customerList[i])
 						uni.showLoading({title: '加载中'})
 						uni.showLoading({title: '加载中'})
 						that.$api.doRequest('post', '/searchRecordsInfo/api/addInfo',{
 						that.$api.doRequest('post', '/searchRecordsInfo/api/addInfo',{
 							commonId:that.userInfo.id,
 							commonId:that.userInfo.id,
 							searchContent:this.customerList[i].customerName+'('+this.customerList[i].customerPhone+')',
 							searchContent:this.customerList[i].customerName+'('+this.customerList[i].customerPhone+')',
 							functionType:3
 							functionType:3
 						}).then(res => {
 						}).then(res => {
-							uni.setStorageSync('checkcustomer',tmpName)
 							that.$api.doRequest('get', '/qualityInspectionManagement/api/settledCount',{
 							that.$api.doRequest('get', '/qualityInspectionManagement/api/settledCount',{
 								compId:'',
 								compId:'',
 								customerName: tmpName,
 								customerName: tmpName,
@@ -238,7 +221,7 @@
 										compId:'',
 										compId:'',
 										customerName: tmpName,
 										customerName: tmpName,
 										goodsName: uni.getStorageSync('goodsName'),
 										goodsName: uni.getStorageSync('goodsName'),
-									}).then(res => {
+									}).then(res => {	
 										for (let i = 0; i < that.purchasePriceList.length; i++) {
 										for (let i = 0; i < that.purchasePriceList.length; i++) {
 											if(that.purchasePriceList[i].goodsName== uni.getStorageSync('goodsName')){
 											if(that.purchasePriceList[i].goodsName== uni.getStorageSync('goodsName')){
 												var data = res.data.data/1000
 												var data = res.data.data/1000
@@ -247,12 +230,12 @@
 												}
 												}
 											}
 											}
 										}
 										}
+										that.show=false				
+										uni.hideLoading()
+										uni.navigateBack()
 									})
 									})
 								}
 								}
 							})
 							})
-							that.show=false					
-							uni.hideLoading()								
-							uni.navigateBack()
 						})
 						})
 						.catch(res => {
 						.catch(res => {
 							uni.showToast({
 							uni.showToast({

+ 3 - 3
pages/erpbusiness/quality_testing.vue

@@ -52,7 +52,7 @@
 					<view>{{item.goodsName}}({{item.waterContent}}水)</view>
 					<view>{{item.goodsName}}({{item.waterContent}}水)</view>
 				</view>
 				</view>
 				<view class="row3">
 				<view class="row3">
-					<view v-if='item.weighingManagement.status=="已质检"&&managementType==1' @click.stop='del(item)' v-hasPermission="'acquisitionQuality.delete'" class='button'>删除</view>
+					<view v-if='item.weighingManagement&&item.weighingManagement.status=="已质检"&&managementType==1' @click.stop='del(item)' v-hasPermission="'acquisitionQuality.delete'" class='button'>删除</view>
 						<view v-if='item.status=="已初检"&&managementType==1' v-hasPermission="'acquisitionQuality.initial'" @click.stop='edit(item,0)' class='button'>初检</view>
 						<view v-if='item.status=="已初检"&&managementType==1' v-hasPermission="'acquisitionQuality.initial'" @click.stop='edit(item,0)' class='button'>初检</view>
 						<view v-if='item.confirm!="1"&&item.status=="已复检"&&managementType==1' @click.stop='edit(item,2)' v-hasPermission="'acquisitionQuality.con'" class='button'>确认</view>
 						<view v-if='item.confirm!="1"&&item.status=="已复检"&&managementType==1' @click.stop='edit(item,2)' v-hasPermission="'acquisitionQuality.con'" class='button'>确认</view>
 						<view v-if='item.confirm!="1"&&managementType==1'  @click.stop='edit(item,1)' v-hasPermission="'acquisitionQuality.again'" class='button'>复检</view>
 						<view v-if='item.confirm!="1"&&managementType==1'  @click.stop='edit(item,1)' v-hasPermission="'acquisitionQuality.again'" class='button'>复检</view>
@@ -89,11 +89,11 @@
 				<view v-if='item.status=="已称毛重"&&managementType==3' @click.stop='quality_testing(item)' class='button'>质检</view>
 				<view v-if='item.status=="已称毛重"&&managementType==3' @click.stop='quality_testing(item)' class='button'>质检</view>
 			</view>
 			</view>
 		</view> -->
 		</view> -->
-		<view class='flex buttons'>
+		<!-- <view class='flex buttons'>
 			<view v-if='item.status=="已质检"&&managementType==1' @click.stop='del(item)' class='button'>删除</view>
 			<view v-if='item.status=="已质检"&&managementType==1' @click.stop='del(item)' class='button'>删除</view>
 			<view v-if='item.status!="已称皮重"&&managementType==1' @click.stop='edit(item)' class='button'>编辑</view>
 			<view v-if='item.status!="已称皮重"&&managementType==1' @click.stop='edit(item)' class='button'>编辑</view>
 			<view v-if='item.status=="已称毛重"&&managementType==3' @click.stop='quality_testing(item)' class='button'>质检</view>
 			<view v-if='item.status=="已称毛重"&&managementType==3' @click.stop='quality_testing(item)' class='button'>质检</view>
-		</view>
+		</view> -->
 		</view>
 		</view>
 		
 		
 		<view v-show="isContent">
 		<view v-show="isContent">