asd26269546 2 yıl önce
ebeveyn
işleme
bcf023996d

+ 3 - 2
libs/utils/http-2.js

@@ -74,7 +74,7 @@ export function post(url, req = {}, headers) {
 		return Promise.reject('请勿频繁提交');
 	}
 	return new Promise((resolve, reject) => {
-		if (Vue.prototype.$token) {
+		if (this.$storage.getStorageSync('token')) {
 			
 			var hander = {
 				'Blade-Auth': 'bearer ' + this.$storage.getStorageSync('token'),
@@ -83,7 +83,7 @@ export function post(url, req = {}, headers) {
 			}
 		} else {
 			var hander = {}
-		}
+		} 
 		if(headers) hander = headers
 		uni.request({
 			url: httpUrl + url,
@@ -91,6 +91,7 @@ export function post(url, req = {}, headers) {
 			method: 'POST',
 			header: hander,
 			success: (res) => {
+				console.log(res)
 				if (res.data.code == 401) {
 					uni.showToast({
 						icon: "error",

+ 20 - 20
libs/utils/request.js

@@ -32,26 +32,26 @@ export default{
 				}
 				let res = response.data
 				// 状态码处理
-				if(res.code == statusCode.OCCUPY_CODE) {
-					msg.showToast('账号信息已过期,请重新登录!')
-					storage.removeStorageSync('token')
-					return utils.openReLaunch('/pages/login/login')
-				}else if(res.code == statusCode.UNKNOW_CODE) {
-					if(res.msg == 'The token field is required.') {
-						if(options.url.indexOf('api/Account/UpdatePhoneOnline') === -1) {
-							msg.showToast('登录信息有误,请重新登录!')
-						}
-						storage.removeStorageSync('token')
-						return utils.openReLaunch('/pages/login/login')
-					}else {
-						console.log(options.url);
-						console.log(res)
-						return msg.showToast(`字段错误!\n${res.msg}`)
-					}
-				}else if(res.code !== 0) {
-					msg.showToast(`${res.msg}`)
-					return resolve(res);
-				}
+				// if(res.code == statusCode.OCCUPY_CODE) {
+				// 	msg.showToast('账号信息已过期,请重新登录!')
+				// 	storage.removeStorageSync('token')
+				// 	return utils.openReLaunch('/pages/login/login')
+				// }else if(res.code == statusCode.UNKNOW_CODE) {
+				// 	if(res.msg == 'The token field is required.') {
+				// 		if(options.url.indexOf('api/Account/UpdatePhoneOnline') === -1) {
+				// 			msg.showToast('登录信息有误,请重新登录!')
+				// 		}
+				// 		storage.removeStorageSync('token')
+				// 		return utils.openReLaunch('/pages/login/login')
+				// 	}else {
+				// 		console.log(options.url);
+				// 		console.log(res)
+				// 		return msg.showToast(`字段错误!\n${res.msg}`)
+				// 	}
+				// }else if(res.code !== 0) {
+				// 	msg.showToast(`${res.msg}`)
+				// 	return resolve(res);
+				// }
 				return resolve(res);
 			}
 			options.fail = (err) => {

+ 5 - 0
libs/utils/util.js

@@ -5,6 +5,11 @@ import storage from './storage.js'
 import DateFormat from '../../js_sdk/xfl-DateFormat/DateFormat.js'
 
 export default {
+	getUserList(_type) {
+		console.log(123123123)
+		//type 1领料列表
+		return storage.getStorageSync('userList')
+	},
 	// 返回
 	back(pageNum = 1) {
 		uni.navigateBack({delta: pageNum})

+ 8 - 1
pages/index/index.vue

@@ -17,7 +17,7 @@
 					<span>{{ menu.name }}</span>
 				</view>
 				<view class="list">
-					<view class="item flex-column-center" @tap="go(item.key)" v-for="(item, index) in menu.children" :key="index">
+					<view class="item flex-column-center" @tap="go(item.path)" v-for="(item, index) in menu.children" :key="index">
 						<u-image width="60%" mode="widthFix" src="../../static/images/smtb.png"></u-image>
 						<span class="title">{{ item.name }}</span>
 					</view>
@@ -41,6 +41,7 @@
 
 <script>
 	import config from '@/libs/config/config.js'
+	
 	export default {
 		data() {
 			return {
@@ -64,6 +65,12 @@
 					}
 					
 				})
+				this.$get('/blade-user/page?current=1&size=100000').then(res=>{
+					if(res.code == 200){
+						this.$storage.setStorageSync('userList',res.data.records)
+					}
+					
+				})
 			},
 			logOut() {
 				this.$http.LoginQuit().then(res => {

+ 13 - 11
pages/store-in-manage/quality/quality.vue

@@ -16,19 +16,19 @@
 					<view class="row">
 						<view class="col">
 							<view class="label">合同号:</view>
-							<view class="value">{{ item.purchaseBillNo }}</view>
+							<view class="value">{{ item.contractCode }}</view>
 						</view>
 					</view>
 					<view class="row">
 						<view class="col">
 							<view class="label">批次号:</view>
-							<view class="value">{{ item.batchNo }}</view>
+							<view class="value">{{ item.id }}</view>
 						</view>
 					</view>
 					<view class="row">
 						<view class="col">
 							<view class="label">供应商:</view>
-							<view class="value">{{ item.supplier }}</view>
+							<view class="value">{{ item.supplierName }}</view>
 						</view>
 					</view>
 					<view class="row">
@@ -40,23 +40,23 @@
 					<view class="row">
 						<view class="col">
 							<view class="label">物料规格:</view>
-							<view class="value">{{ item.spec }}</view>
+							<view class="value">{{ item.materialSpec }}</view>
 						</view>
 					</view>
 					<view class="row border">
 						<view class="col">
 							<view class="label">到货时间:</view>
-							<view class="value">{{ item.arriveTime }}</view>
+							<view class="value">{{ item.arrivalTime }}</view>
 						</view>
 					</view>
 					<view class="row">
 						<view class="col">
 							<view class="label">申购数量:</view>
-							<view class="value">{{ item.purchaseCount }}</view>
+							<view class="value">{{ item.purchaseQuantity }}</view>
 						</view>
 						<view class="col">
 							<view class="label">到货数量:</view>
-							<view class="value">{{ item.inStockQty }}</view>
+							<view class="value">{{ item.arrivalQuantity }}</view>
 						</view>
 					</view>
 					<view class="row" style="justify-content: center;">
@@ -84,12 +84,14 @@
 				this.$utils.open(`/pages/store-in-manage/quality/quality-detail?data=${this.$utils.object2Code(data)}`)
 			},
 			getList() {
-				this.$http.GetStockCheckList().then(res => {
+				this.$post('/storage-restructure/qualityTesting/page',{
+					pageNum:1,
+					pageSize:10000,
+				}).then(res=>{
+					this.data = res.data.records
 					console.log(res)
-					if(res.code === 0) {
-						this.data = res.result
-					}
 				})
+				
 			}
 		},
 		onShow() {

+ 19 - 6
pages/store-in-manage/store-in/store-in-scan.vue

@@ -97,14 +97,12 @@
 				this.$utils.back()
 			},
 			getList() {
-				this.$http.ScanRfidCodeStockTag({
-					rfidCode: this.rfidCode,
-					checkRfidType: 2,
-				}).then(res => {
-					console.log(res)
+				this.$post('/storage-restructure/waterTag/getDetailsByRfid',{
+					rfidCode:this.rfidCode,
+				}).then(res=>{
 					if(res.code === 0) {
 						this.isReading = false
-						this.data = res.result
+						this.data = res.data
 					} else {
 						this.$msg.showToast(res.msg)
 						if(this.isActive) {
@@ -112,6 +110,21 @@
 						}
 					}
 				})
+				// this.$http.ScanRfidCodeStockTag({
+				// 	rfidCode: this.rfidCode,
+				// 	checkRfidType: 2,
+				// }).then(res => {
+				// 	console.log(res)
+				// 	if(res.code === 0) {
+				// 		this.isReading = false
+				// 		this.data = res.result
+				// 	} else {
+				// 		this.$msg.showToast(res.msg)
+				// 		if(this.isActive) {
+				// 			this.scanRfid()
+				// 		}
+				// 	}
+				// })
 			},
 			scanRfid() {
 				this.$pda.uhfScan().then(res => {

+ 17 - 22
pages/store-in-manage/store-in/store-in.vue

@@ -73,6 +73,7 @@
 
 <script>
 	import DateFormat from '../../../js_sdk/xfl-DateFormat/DateFormat.js';
+	import utils from '@/libs/utils/util.js'
 	export default {
 		data() {
 			return {
@@ -161,34 +162,28 @@
 			},
 			/* 获取用户列表 */
 			getUserPageList() {
-				this.$http.GetUserPageList({
-					pageIndex: 1,
-					pageSize: 999,
-					takeUser: true
-				}).then(res => {
-					if(res.code == 0) {
-						let list = res.result.list.map(item => {
-							return {
-							  label: item.realName,
-							  value: item.id
-							}
-						})
-						this.userList = list
+				this.userList = utils.getUserList(1).map(item => {
+					return {
+					  label: item.name,
+					  value: item.id
 					}
 				})
+				
 			},
 			/* 手持机获取仓库 */
 			getStockHouse() {
-				this.$http.GetStockHouse().then(res => {
-					if(res.code === 0) {
-						this.selectList = res.result.map(item => {
-							return {
-								label: item.name,
-								value: item.plcCode
-							}
-						})
-					}
+				this.$post('/storage-restructure/stockHouse/page',{
+					pageNum:1,
+					pageSize:10000,
+				}).then(res=>{
+					this.selectList = res.data.records.map(item => {
+						return {
+							label: item.name,
+							value: item.id
+						}
+					})
 				})
+				
 			}
 		},
 		onLoad(option) {

Dosya farkı çok büyük olduğundan ihmal edildi
+ 0 - 0
unpackage/dist/dev/app-plus/app-service.js


Bu fark içinde çok fazla dosya değişikliği olduğu için bazı dosyalar gösterilmiyor