Forráskód Böngészése

选择客户问题

wangchao 3 éve
szülő
commit
fcd6c5688d

+ 4 - 4
pages/erp/exWarehousing/exWarehousing.vue

@@ -454,13 +454,13 @@
 				this.detailData.grade = this.inOutNoList[e[0]].grade
 				this.detailData.inOutType = this.inOutNoList[e[0]].inOutType
 				if (this.detailData.inOutType == '销售出库') {
-					if(this.detailData.tips = '买方' + this.contractNoList[i].buyer){
-						this.detailData.tips = '买方' + this.contractNoList[i].buyer+
+					if(this.detailData.tips = '买方' + this.contractNoList[e[0]].buyer){
+						this.detailData.tips = '买方' + this.contractNoList[e[0]].buyer+
 						'( ' +
-						this.contractNoList[i].unitContractPrice +
+						this.contractNoList[e[0]].unitContractPrice +
 						'元/吨)'
 					}else{
-						this.detailData.tips = '买方' + this.contractNoList[i].buyer
+						this.detailData.tips = '买方' + this.contractNoList[e[0]].buyer
 					}
 				} else if (this.detailData.inOutType == '移库出库') {
 					this.detailData.tips = '入货库' + this.inOutNoList[e[0]].warehouseName

+ 2 - 2
pages/erpbusiness/add_quality_testing.vue

@@ -310,17 +310,17 @@
 			this.managementType = options.managementType
 		},
 		onShow() {
-
 			let that = this
 			this.purchasePriceList = uni.getStorageSync('purchasePriceList')
 			if (uni.getStorageSync('checkcustomer')) {
 
 				let _customerInfo = uni.getStorageSync('checkcustomer')
 				if (_customerInfo.shipperName) {
+					this.gridList.identityId = _customerInfo.id
 					//点击登记客户
 					this.gridList.customerName = _customerInfo.shipperName
 					this.gridList.customerPhone = _customerInfo.shipperPhone
-					this.gridList.carNumber=uni.getStorageSync('carNo')
+					this.gridList.carNumber=_customerInfo.carNo
 				} else {
 					//点击搜索客户
 					this.gridList.customerName = _customerInfo.customerName

+ 20 - 15
pages/erpbusiness/customer.vue

@@ -31,16 +31,16 @@
 		<view class="content content1">
 			<view style='padding-left:20px;color:#AFB3BF;font-size:14px;' v-if='show==false'>登记客户</view>
 
-			<view v-for='item in registeredCustomer'>
-				<view class="dj-customer" v-for="(item1,index) in item.carList" @click="registeredCustomerClick(item,item1)">
-					<view class="left">{{item1}}</view>
+			<!-- <view v-for='item in registeredCustomer'> -->
+				<view class="dj-customer" v-for="(item,index) in registeredCustomer" @click="registeredCustomerClick(item,item1)">
+					<view class="left">{{item.carNo}}</view>
 					<view class="right">
 						<view class="span1">{{item.shipperName}}(货)</view>
 						<view class="">{{item.supplier}}(商)</view>
 					</view>
 
 				</view>
-			</view>
+			<!-- </view> -->
 		</view>
 
 		<view v-show="isContent">
@@ -142,23 +142,28 @@
 				this.recentCustomers = []
 			}
 
-			this.$api.doRequest('get', '/grainDeliveryRegistration/grainDeliveryRegistrationCustomer', {
-				warehouseName: this.warehouseName
+			this.$api.doRequest('get', '/shippingInformation/selectShippingInformation', {
+				warehouseName: this.warehouseName,
+				compId:  uni.getStorageSync('pcUserInfo').compId,
 			}).then(res => {
 				if (res.data.data) {
 					let _endTime = Date.parse(new Date());
 					let _startTime = ""
 					for (let i = 0; i < res.data.data.length; i++) {
-						let _carList = res.data.data[i].shippingInformationList
-						for (let k = 0; k < _carList.length; k++) {
-							//判断是记录是否失效
 							_startTime = new Date((res.data.data[i].validityDate + ' 00:00:00')).getTime();
-							if (_endTime - _startTime <= 0) {
-								let _ecarList = _carList[k].carNo.split(',')
-									_carList[k].carList = _ecarList
-									this.registeredCustomer.push(_carList[k])
-							}
-						}
+								if (_endTime - _startTime <= 0) {
+										this.registeredCustomer.push(res.data.data[i])
+								}
+						// let _carList = res.data.data[i].shippingInformationList
+						// for (let k = 0; k < _carList.length; k++) {
+						// 	//判断是记录是否失效
+						// 	_startTime = new Date((res.data.data[i].validityDate + ' 00:00:00')).getTime();
+						// 	if (_endTime - _startTime <= 0) {
+						// 		let _ecarList = _carList[k].carNo.split(',')
+						// 			_carList[k].carList = _ecarList
+						// 			this.registeredCustomer.push(_carList[k])
+						// 	}
+						// }
 					}
 					console.log(this.registeredCustomer)
 				}

+ 1 - 1
pages/user/depotAcquisition/grainDeliveryRecord.vue

@@ -109,7 +109,7 @@
 				}
 				this.$api.doRequest('get', '/grainDeliveryRegistration/selectGrainDeliveryRegistration', _obj)
 					.then(res => {
-						if (res.data.code == 200) {debugger
+						if (res.data.code == 200) {
 							let curPageData = []
 							for (let i = 0; i < res.data.data.length; i++) {
 								let _data = res.data.data[i];