Prechádzať zdrojové kódy

Merge branch 'master' of http://git.zthymaoyi.com/gdc/yiliangyiyun-app

wangchao 3 rokov pred
rodič
commit
0582bc08d2

+ 9 - 1
pages/erp/exWarehousing/exWarehousing.vue

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

+ 9 - 1
pages/erp/warehousing/warehousing.vue

@@ -473,7 +473,15 @@
 					for (var i = 0; i < this.contractNoList.length; i++) {
 						if (this.contractNoList[i].contractNo == this.detailData.contractNo) {
 							if (this.detailData.inOutType == '采购入库') {
-								this.detailData.tips = '卖方' + this.contractNoList[i].seller
+								if(this.contractNoList[i].unitContractPrice){
+									this.detailData.tips = '卖方' + this.contractNoList[i].seller+
+              '( ' +
+              this.contractNoList[i].unitContractPrice +
+              '元/吨)'
+								}else{
+									this.detailData.tips = '卖方' + this.contractNoList[i].seller
+								}
+								
 							} else if (this.detailData.inOutType == '移库入库') {
 								this.detailData.tips = '出货库' + this.inOutNoList[0].warehouseName
 							} else if (this.detailData.inOutType == '退库') {

+ 3 - 1
pages/erpbusiness/acquisitionInspection/tareDetail.vue

@@ -61,12 +61,14 @@
 			return {
 				detailData: {
 					tare: 0,
-					buckleMiscellaneous: 0
+					buckleMiscellaneous: 0,
+					qualityInspectionManagement:{}
 				},
 				purchasePriceList: []
 			}
 		},
 		onShow() {
+			
 			this.$api.doRequest('get', '/qualityInspectionManagement/api/goodsName', {
 				warehouseId: this.detailData.warehouseId
 			}).then(res => {

+ 36 - 26
pages/erpbusiness/add_quality_testing.vue

@@ -14,6 +14,15 @@
 					{{gridList.qualityNo}}
 				</view>
 			</view>
+			<view class="c-row ">
+				<view class="title">货名</view>
+				<view class="con-list">
+					<view @click='show2=true'>{{gridList.goodsName}}</view>
+					<u-picker :range="goodsList" range-key="goodsName" @confirm='goodspicker($event)' v-model="show2"
+						mode="selector">
+					</u-picker>
+				</view>
+			</view>
 			<view class="c-row ">
 				<view class="title">客户</view>
 				<view class="con-list">
@@ -68,15 +77,6 @@
 					<input type="digit" v-model='gridList.storageTagNo' placeholder="请输入囤位号" name="input"></input>
 				</view>
 			</view>
-			<view class="c-row ">
-				<view class="title">货名</view>
-				<view class="con-list">
-					<view @click='show2=true'>{{gridList.goodsName}}</view>
-					<u-picker :range="goodsList" range-key="goodsName" @confirm='goodspicker($event)' v-model="show2"
-						mode="selector">
-					</u-picker>
-				</view>
-			</view>
 			<view class="c-row ">
 				<view class="title">类型</view>
 				<view v-if="!edit" class="con-list">
@@ -320,20 +320,6 @@
 			}
 			this.gridList.grade = this.gradeList[0].value
 			this.gridList.gradeKey = this.gradeList[0].key
-			this.$api.doRequest('get', '/identityAuthenticationInfo/identityAuthenticationInfoCustomer', {
-				compId: '',
-				authenticationStatusKey: 7
-			}).then(res => {
-				if (res.data.data) {
-					// let data = res.data.data
-					// that.gridList =data
-					that.$api.doRequest('get', '/warehouseBaseInfo/getWarehouse', {
-						id: this.cangid
-					}).then(res => {
-						that.warehouseList = res.data.data.warehousePositionInfoList
-					})
-				}
-			})
 			this.$api.doRequest('get', '/qualityInspectionManagement/api/goodsName', {
 				warehouseId: this.cangid
 			}).then(res => {
@@ -350,6 +336,14 @@
 						} else {
 							that.edit = false
 						}
+						this.$api.doRequest('get', '/identityAuthenticationInfo/identityAuthenticationInfoCustomer', {
+							warehouseId: this.cangid,
+							goodsName: that.gridList.goodsName
+						}).then(res => {
+							if (res.data.data) {
+								uni.hideLoading()
+							}
+						})
 						uni.setStorageSync('purchasePriceList', that.goodsList)
 						that.purchasePriceList = uni.getStorageSync('purchasePriceList')
 						that.waterContentChange()
@@ -452,8 +446,7 @@
 			},
 			gocustomer() {
 				uni.navigateTo({
-					url: '/pages/erpbusiness/customer?cangid=' + this.cangid + '&warehouseName=' + this.gridList
-						.warehouseName
+					url: '/pages/erpbusiness/customer?cangid=' + this.cangid + '&warehouseName=' + this.gridList.warehouseName + '&goodsName=' + this.gridList.goodsName
 				})
 			},
 			getdate() {
@@ -568,7 +561,6 @@
 												that.gridList.goodsName == that.purchasePriceList[i]
 												.goodsName
 											) {
-												debugger
 												let count = (that.purchasePriceList[i].saleLimit -
 													response.data.data / 1000).toFixed(2)
 													console.log(count,that.purchasePriceList[i].saleLimit,
@@ -610,6 +602,7 @@
 				this.waterContentChange()
 			},
 			setGoodName(e) {
+				uni.showLoading({title: '加载中',mask:true})
 				// [e[0]] = 0
 				// this.$set(this.gradeList,'grade',this.gradeList[e[0]].value)
 				if (this.goodsList[e[0]].goodsName == '玉米') {
@@ -622,7 +615,23 @@
 					this.gridList.type = '干粮'
 					this.edit = false
 				}
+				var that = this
 				this.gridList.goodsName = this.goodsList[e[0]].goodsName
+				this.$api.doRequest('get', '/identityAuthenticationInfo/identityAuthenticationInfoCustomer', {
+					warehouseId: this.cangid,
+					goodsName: this.gridList.goodsName
+				}).then(res => {
+					if (res.data.data) {
+						uni.hideLoading()
+						// let data = res.data.data
+						// that.gridList =data
+						that.$api.doRequest('get', '/warehouseBaseInfo/getWarehouse', {
+							id: this.cangid
+						}).then(res => {
+							that.warehouseList = res.data.data.warehousePositionInfoList
+						})
+					}
+				})
 				uni.setStorageSync('goodsName', this.gridList.goodsName)
 				if (this.gridList.type == "干粮" && this.gridList.goodsName) {
 					this.$api.doRequest('get', '/purchasePrice/dryGrainPrice', {
@@ -630,6 +639,7 @@
 						goodsName: this.gridList.goodsName
 					}).then(res => {
 						this.gridList.dryGrainPrice = res.data.data
+						
 					})
 				}
 				this.waterContentChange()

+ 3 - 2
pages/erpbusiness/customer.vue

@@ -116,6 +116,7 @@
 		onLoad(options) {
 			this.cangid = options.cangid
 			this.warehouseName = options.warehouseName
+			this.goodsName = options.goodsName
 			this.$api.doRequest('get', '/qualityInspectionManagement/api/goodsName', {
 				warehouseId: this.cangid
 			}).then(res => {
@@ -371,8 +372,8 @@
 				if (this.searchKeyWord.length > 0) {
 					url = '/identityAuthenticationInfo/identityAuthenticationInfoCustomer'
 					data = {
-						compId: '',
-						authenticationStatusKey: 7,
+						warehouseId: that.cangid,
+						goodsName: that.goodsName,
 						searchKeyWord: this.searchKeyWord
 					}
 				} else {

+ 2 - 4
pages/erpbusiness/edit_quality_testing.vue

@@ -65,14 +65,14 @@
 			<view class="c-row ">
 				<view class="title">囤位号</view>
 				<view class="con-list">
-					<input :disabled='flag==1' v-model='gridList.storageTagNo' placeholder="请输入囤位号"
+					<input v-model='gridList.storageTagNo' placeholder="请输入囤位号"
 						name="input"></input>
 				</view>
 			</view>
 			<view class="c-row ">
 				<view class="title">货名</view>
 				<view class="con-list">
-					<view v-if="flag == '1'">
+					<view v-if="flag == '1'||flag == '0'">
 						{{gridList.goodsName}}
 					</view>
 					<view @click='goodsName = true' v-if="flag == '2'">{{gridList.goodsName}}</view>
@@ -111,8 +111,6 @@
 					<view class='title_b'>化验信息</view>
 					<u-switch v-if='flag!=1' v-model="value" @change="change"></u-switch>
 				</view>
-				
-
 				<view class="c-row ">
 					<view class="title">等级</view>
 					<view class="con-list">

+ 186 - 25
pages/erpbusiness/sm/sm.vue

@@ -27,16 +27,40 @@
 						</view>
 					</view>
 				</view>
-
 				<view class="nolist" v-if="grainMerchantList.length==0">
 					<image class="img" :src="img2" alt=""></image>
 					<view class="text">您还未认证个人粮商身份</view>
 				</view>
-				<button v-if="grainMerchantList.length>0" :class="flag?'':'custom-style'" @click="submit">{{btnVal}}</button>
-				<button v-if="grainMerchantList.length==0" class="custom-style" @click="toGrainMerchantCertification()">接受并去认证</button>
+				<button v-if="grainMerchantList.length>0" :class="flag?'':'custom-style'"
+					@click="submit">{{btnVal}}</button>
+				<button v-if="grainMerchantList.length==0" class="custom-style"
+					@click="toGrainMerchantCertification()">接受并去认证</button>
 			</div>
 		</u-popup>
+		<u-toast ref="warning" />
+		<u-popup v-model="show1" class="popup" @close="close" mode="bottom" border-radius="30" :closeable="true">
+			<view class="buns_item">
+				<view class="but_css" @click="skip(1)" v-if="getRoles('acquisitionQuality.initial') && status == '已初检'">
+					去初检
+				</view>
+				<view class="but_css" @click="skip(2)"
+					v-if="getRoles('acquisitionQuality.again') && (status == '已初检'|| status == '已复检')">去复检</view>
+				<view class="but_css" @click="skip(3)"
+					v-if="getRoles('acquisitionWeight.mao') && weightStatus != '已称皮重' && (weightStatus == '已质检'|| weightStatus == '已称毛重')">
+					去称毛重</view>
+				<view class="but_css" @click="skip(4)"
+					v-if="getRoles('acquisitionWeight.weight') && (weightStatus == '已称毛重' || weightStatus == '已称皮重')">
+					去称皮重
+				</view>
+				<view class="but_css" @click="skip(5)"
+					v-if="getRoles('acquisitionQuality.con') && confirm != '1' && status == '已复检'">
+					去确认质检
+				</view>
+				<view class="but_css" @click="close">返回</view>
+			</view>
+		</u-popup>
 	</view>
+
 </template>
 
 <script>
@@ -46,9 +70,10 @@
 	export default {
 		data() {
 			return {
-				img1:require("../../../static/img/select.png"),
-				img2:require("../../../static/img/nolist.png"),
-				show: true,
+				img1: require("../../../static/img/select.png"),
+				img2: require("../../../static/img/nolist.png"),
+				show: false,
+				show1: true,
 				identityAuthenticationInfo: {},
 				grainMerchantList: [],
 				selectID: "",
@@ -57,32 +82,155 @@
 					title: '',
 					companyId: ''
 				},
-				isAllselect:false,
-				flag : true
+				isAllselect: false,
+				flag: true,
+				cangid: "", //仓库id
+				managementType: 1,
+				warehouseName: "", //仓库名
+				status: "", //质检状态
+				weightStatus: "", //检斤状态
+				qualityNo: "",
+				confirm: "", //确认初检确认状态
+				detailData: {},
+				userName: "", //仓库负责人
+				companyId: "",
+				decide: false
 			}
 		},
 		computed: {
 			...mapState(['hasLogin', 'userInfo'])
 		},
 		onLoad(options) {
-			  //#ifdef APP-PLUS
-			  this.user.title = options.data.split(',')[2]
-			  this.user.companyId = options.data.split(',')[1]
-			  //#endif
+			//#ifdef APP-PLUS
+			this.user.title = options.data.split(',')[2]
+			this.user.companyId = options.data.split(',')[1]
+			this.compId = options.data.split(',')[1]
+			this.qualityNo = options.data.split(',')[2]
+			this.cangid = options.data.split(',')[3]
+			//#endif
 		},
 		onShow() {
-			this.getList()
+			// this.qualityNo = "SGRK202112140060004"
+			// this.cangid = "374a8a02ecfe40dc9abdcd902dd564f5"
+			// this.compId = "2710b21efc1e4393930c5dc800010dc4"
+			console.log(this.qualityNo,this.cangid,this.compId)
+			if (this.cangid) { //判断是在哪扫码进入的
+				this.show = false
+				this.show1 = true
+				this.companyId = uni.getStorageSync('pcUserInfo').compId
+				this.userName = uni.getStorageSync('userInfo').userName.split("-")[1]
+				if (this.companyId == this.compId) {
+					this.$api.doRequest('get', '/warehouseBaseInfo/getWarehouse', {
+						id: this.cangid
+					}).then(res => {
+						let cangList = res.data.data
+						let person = cangList.otherPersonCharge.split(",")
+						person.push(cangList.personCharge)
+						for (let i = 0; i < person.length; i++) {
+							if (person[i].indexOf(uni.getStorageSync('userInfo').userName.split("-")[1]) != -1) {
+								this.decide = true
+								this.getShow()
+								return
+							}
+						}
+						if (!this.decide) {
+							this.$refs.warning.show({
+								title: '当前身份不可操作',
+								type: "error",
+								icon: false
+							})
+						}
+					}).catch(res => {});
+				}
+			} else {//邀请客户
+				this.show = true
+				this.show1 = false
+				this.getList()
+			}
+			// this.getShow()
 		},
 		methods: {
+			//查看权限
+			getRoles: function(role) {
+				let _roles = uni.getStorageSync('rolesList')
+				for (let i = 0; i < _roles.length; i++) {
+					if (_roles[i] == role) {
+						return true
+					}
+				}
+				return false
+			},
+			getShow() {
+				let tmp = {
+					compId: this.compId,
+					number: this.qualityNo,
+					warehouseId: this.cangid
+				}
+				this.$api.doRequest('get', '/weighingManagement/getQRcode', tmp).then(res => {
+						this.detailData = res.data.data
+						this.status = this.detailData.qualityInspectionManagement.status
+						this.confirm = this.detailData.qualityInspectionManagement.confirm
+						this.weightStatus = this.detailData.status
+					})
+					.catch(res => {
+						if (res.message) {
+							uni.showToast({
+								title: res.message,
+								icon: 'none',
+								duration: 2000
+							})
+						} else {
+							uni.showToast({
+								title: "请稍后再试!",
+								icon: 'none',
+								duration: 2000
+							})
+						}
+					});
+			},
+			//跳转
+			skip(val) {
+				if (val == 1) {
+					uni.navigateTo({
+						url: '/pages/erpbusiness/edit_quality_testing?id=' + this.detailData
+							.qualityInspectionManagement.id + '&managementType=' + this
+							.managementType + '&cangid=' + this.cangid + '&flag=' + '0'
+					})
+				} else if (val == 2) {
+					uni.navigateTo({
+						url: '/pages/erpbusiness/edit_quality_testing?id=' + this.detailData
+							.qualityInspectionManagement.id + '&managementType=' + this
+							.managementType + '&cangid=' + this.cangid + '&flag=' + '1'
+					})
+				} else if (val == 3) {
+					this.detailData.warehouseId = this.cangid
+					uni.navigateTo({
+						url: '/pages/erpbusiness/acquisitionInspection/grossWeightDetail?detailData=' +
+							JSON.stringify(this.detailData)
+					})
+				} else if (val == 4) {
+					this.detailData.warehouseId = this.cangid
+					uni.navigateTo({
+						url: '/pages/erpbusiness/acquisitionInspection/tareDetail??detailData=' + JSON
+							.stringify(this.detailData)
+					})
+				} else if (val == 5) {
+					uni.navigateTo({
+						url: '/pages/erpbusiness/edit_quality_testing?id=' + this.detailData
+							.qualityInspectionManagement.id + '&managementType=' + this
+							.managementType + '&cangid=' + this.cangid + '&flag=' + '2'
+					})
+				}
+			},
 			selectItem(item) {
-				if(item.authenticationStatus=="已接受") return
+				if (item.authenticationStatus == "已接受") return
 				for (let i = 0; i < this.grainMerchantList.length; i++) {
 					if (this.grainMerchantList[i].id == item.id) {
 						this.grainMerchantList[i].check = !this.grainMerchantList[i].check
 						if (this.grainMerchantList[i].check) {
 							this.selectID = this.grainMerchantList[i].id
 						}
-					} 
+					}
 				}
 			},
 			//查询粮商身份
@@ -90,14 +238,14 @@
 				//
 			},
 			//粮商认证
-			toGrainMerchantCertification(){
+			toGrainMerchantCertification() {
 				var that = this
 				// url: `/pageA/product/list?keywords=${key}&TabCur=${TabCur}`
 				uni.navigateTo({
-					url:`/pageD/identity/companyIdentity?status=1&compId=${that.user.companyId}&ids=${that.user.title}` ,
+					url: `/pageD/identity/companyIdentity?status=1&compId=${that.user.companyId}&ids=${that.user.title}`,
 				})
 			},
-			
+
 			getList() {
 				this.identityAuthenticationInfo.commonId = this.userInfo.id
 				this.grainMerchantList = []
@@ -105,7 +253,7 @@
 						pageSize: 100,
 						currentPage: 1,
 						commonId: this.userInfo.id,
-						compId:this.user.companyId,
+						compId: this.user.companyId,
 						flag: 3
 					}, 'application/json;charset=UTF-8').then(res => {
 						for (var i = 0; i < res.data.data.records.length; i++) {
@@ -116,8 +264,7 @@
 						}
 						var data = res.data.data.records
 						for (var i = 0; i < data.length; i++) {
-							if(data[i].authenticationStatus == "未通过")
-							{
+							if (data[i].authenticationStatus == "未通过") {
 								continue
 							}
 							if (data[i].customerTypeFlag == 2) {
@@ -130,12 +277,12 @@
 								this.isAllselect = true
 							} else {
 								data[i].check = false
-								this.isAllselect = false								
+								this.isAllselect = false
 								this.flag = false
 							}
 							this.grainMerchantList.push(data[i])
 						}
-						if(this.flag){
+						if (this.flag) {
 							this.btnVal = "已接受"
 						}
 					})
@@ -156,7 +303,7 @@
 					});
 			},
 			submit() {
-				if(this.flag) return
+				if (this.flag) return
 				let _isAllCheck = false
 				for (let i = 0; i < this.grainMerchantList.length; i++) {
 					if (this.grainMerchantList[i].check) {
@@ -172,7 +319,7 @@
 				}
 				this.$api.doRequest('get', '/identityAuthenticationInfo/saveCompanyIdentity', {
 						id: this.selectID,
-						compId:this.user.companyId,
+						compId: this.user.companyId,
 					}, 'application/json;charset=UTF-8').then(res => {
 						console.log(res);
 						if (res.data.code == 200) {
@@ -344,4 +491,18 @@
 			color: #8E93A3;
 		}
 	}
+
+	.but_css {
+		width: 200rpx;
+		height: 80rpx;
+		background-color: #22C572;
+		margin: 20rpx auto;
+		color: #FFFFFF;
+		line-height: 80rpx;
+		border-radius: 20rpx;
+		text-align: center;
+	}
+	.buns_item{
+		margin: 100rpx;
+	}
 </style>

+ 2 - 2
pages/user/depotAcquisition/grainDeliveryRegistration.vue

@@ -3,7 +3,7 @@
 		<view class="content1">
 			<view class="row1">
 				<view class="title">{{dataList.warehouseName}}</view>
-				<view class="validityDate"> {{dataList.validityDate}} 0时前有效</view>
+				<view class="validityDate"> {{dataList.validityDate}} 0时前有效</view>
 			</view>
 			<view class="row2">
 				<view class="start-time">{{startDate}}创建</view>
@@ -248,7 +248,7 @@
 			getTime() {
 				let _startTime = new Date().format("yyyy-MM-dd");
 				var _endTime = new Date();
-				_endTime.setDate(_endTime.getDate() + 2);
+				_endTime.setDate(_endTime.getDate() + 3);
 				_endTime = _endTime.format("yyyy-MM-dd");
 				return [_startTime, _endTime]
 			},

+ 0 - 1
pages/user/user.vue

@@ -445,7 +445,6 @@
 						}
 					});
 				}
-
 			},
 			fankui() {
 				uni.navigateTo({