Bläddra i källkod

收购佳屹农规格

高敬炎 2 år sedan
förälder
incheckning
ae887f8e26

+ 2 - 2
components/MyNumberInput.vue

@@ -1,7 +1,7 @@
 <template>
 	<view>
 		<view class="uni-input Numberinput" :class="{'inputdis':Isedit}" @click="maskShow" :id="'input_'+myevent">
-			<text>{{myvalue}}</text><text class="myfous" v-if="IsShow"></text>
+			<text class="myfous" v-if="IsShow"></text><text>{{myvalue}}</text>
 			
 		</view>
 
@@ -118,7 +118,7 @@
 	.Numberinput {
 		display: flex;
 		align-items: center;
-		/* flex-direction: row-reverse; */
+		flex-direction: row-reverse;
 	}
 
 	.myfous {

+ 5 - 3
pages/erpbusiness/acquisitionInformation.vue

@@ -333,7 +333,7 @@
 	}
 
 	.submit {
-		/* width: 90%; */
+		width: 90%;
 		background: #22C572;
 		border-radius: 50rpx;
 	}
@@ -349,7 +349,9 @@
 
 	.bottom-btn {
 		position: fixed;
-		bottom: 30rpx;
-		width: 90%;
+		bottom: 0rpx;
+		left:0;
+		width: 100%;
+		padding:20rpx;
 	}
 </style>

+ 71 - 18
pages/erpbusiness/add_quality_testing.vue

@@ -509,7 +509,7 @@
 					<view class="title">规格(公斤)</view>
 					<view class="con-list">
 						<u-radio-group active-color='#22C572' v-model="gridList.specifications" @change="radioGroupChange">
-							<u-radio name="850">850</u-radio>
+							<u-radio class='radio' name="850">850</u-radio>
 							<u-radio name="830">830</u-radio>
 						</u-radio-group>
 					</view>
@@ -519,7 +519,17 @@
 					<view class="title">工厂</view>
 					<view class="con-list">
 						<input v-model='gridList.factory' :disabled='disabled1'  maxlength="30"
-							placeholder="请输入工厂" name="input" type="digit"></input>
+							placeholder="请输入工厂" name="input" type="text"></input>
+					</view>
+				</view>
+				<view v-show="compName=='辽宁佳屹农商贸有限公司'"
+					class="c-row">
+					<view class="title">生产日期</view>
+					<view class="con-list">
+						<u-calendar v-model="show3" @change="change1" :mode="mode"></u-calendar>
+						<view :style='gridList.produceDate?"color:#000;":"color:#999;"' @click="show3 = true">{{gridList.produceDate?gridList.produceDate:'选择生产日期'}}</view>
+						<!-- <input v-model='gridList.factory' :disabled='disabled1'  maxlength="30"
+							placeholder="请输入工厂" name="input" type="digit"></input> -->
 					</view>
 				</view>
 				<view v-show="compName=='辽宁佳屹农商贸有限公司'" class="c-row">
@@ -536,7 +546,7 @@
 									modelId: '',
 									vesselId: ''}" :action="action" :show-progress='false' :show-tips="false" :max-size="maxSize" :max-count="9"
 							:size-type="['compressed']" @on-success="getImgUrl($event,0)" @on-error="onError"
-							@on-remove="onRemove" @on-uploaded="isAdd = true"
+							@on-remove="onRemove($event,0)" @on-uploaded="isAdd = true"
 							:limitType="['png', 'jpg', 'jpeg', 'webp', 'gif']" @on-progress="onProgress">
 							<view slot="addBtn" class="slot-btn u-list-item" hover-class="slot-btn__hover"
 								hover-stay-time="150">
@@ -561,7 +571,7 @@
 									modelId: '',
 									vesselId: ''}" :action="action" :show-progress='false' :show-tips="false" :max-size="maxSize" :max-count="9"
 							:size-type="['compressed']" @on-success="getImgUrl($event,1)" @on-error="onError"
-							@on-remove="onRemove" @on-uploaded="isAdd = true"
+							@on-remove="onRemove($event,1)" @on-uploaded="isAdd = true"
 							:limitType="['png', 'jpg', 'jpeg', 'webp', 'gif']" @on-progress="onProgress">
 							<view slot="addBtn" class="slot-btn u-list-item" hover-class="slot-btn__hover"
 								hover-stay-time="150">
@@ -683,6 +693,7 @@
 				show3: false,
 				show2: false,
 				goodsList: [],
+				mode: 'date',
 				currentPage: 1,
 				value: false,
 				gridBorder: false,
@@ -936,7 +947,7 @@
 		},
 		onLoad(options) {
 			that = this
-			console.log(that)
+			var date = new Date()
 			console.log(this.cangid)
 			this.commonWarehouseNo = options.commonWarehouseNo
 			this.warehouseCount = Number(options.warehouseCount) + 1
@@ -958,6 +969,7 @@
 			this.gridList.person = options.personCharge
 			this.gridList.personPhone = options.personPhone
 			this.gridList.qualityInspector = uni.getStorageSync("userInfo").userName
+			this.gridList.produceDate = date.getFullYear()+'-'+((date.getMonth()+1)>=10?(date.getMonth()+1):'0'+(date.getMonth()+1))+'-'+((date.getDate())>=10?date.getDate():'0'+date.getDate())
 			// this.$api.doRequest('get', '/qualityInspectionManagement/api/goodsName', {
 			// 	warehouseId: this.cangid
 			// }).then(res => {
@@ -1017,14 +1029,16 @@
 			}
 			this.isQY = this.utils.getCurrectRoles('acquisitionQuality.qview')
 			this.isZJ = this.utils.getCurrectRoles('acquisitionQuality.initial')
-
-			if (this.isZJ && !this.isQY) {
-				this.typevalue = '1'
-				this.contractFlag = 7
-			} else {
-				this.typevalue = '3'
-				this.contractFlag = 10
+			if(this.compName!='辽宁佳屹农商贸有限公司'){
+				if (this.isZJ && !this.isQY) {
+					this.typevalue = '1'
+					this.contractFlag = 7
+				} else {
+					this.typevalue = '3'
+					this.contractFlag = 10
+				}
 			}
+			
 			uni.showLoading({
 				title: '加载中',
 				mask: true
@@ -1039,13 +1053,11 @@
 				flag: this.flag,
 				warehouseName: this.gridList.warehouseName
 			}).then(res => {
-				console.log(1)
-				console.log(res)
 				for (let i = 0; i < res.data.data.length; i++) {
 					this.$set(res.data.data[i], 'inOutTaskNo1', res.data.data[i].inOutTaskNo + (res.data.data[
 						i].taskFlag ? '(' + res.data.data[i].taskFlag + ')' : ''))
 				}
-				console.log(res.data.data, 22222)
+				// console.log(res.data.data, 22222)
 				this.taskNolist = res.data.data
 			})
 			this.multiSelector1 = [{
@@ -1056,7 +1068,7 @@
 				warehouseName: this.gridList.warehouseName
 			}).then(res => {
 				uni.hideLoading();
-				console.log(2)
+				// console.log(2)
 				// console.log(res)
 				if (res.data.data.contractManagementInfoList) {
 					for (let i = 0; i < res.data.data.contractManagementInfoList.length; i++) {
@@ -1122,13 +1134,47 @@
 					})
 				}
 			}
-			if(uni.getStorageSync('carNo')&&uni.getStorageSync('gridList')&&this.typevalue==1){
+			if(uni.getStorageSync('gridList')&&this.typevalue==1&&this.compName=='辽宁佳屹农商贸有限公司'){
+				
+				if(uni.getStorageSync('typevalue')){
+					this.typevalue=uni.getStorageSync('typevalue')
+				}
 				this.gridList=uni.getStorageSync('gridList')
-				this.gridList.carNumber=uni.getStorageSync('carNo')
+				if(uni.getStorageSync('carNo')){
+					this.gridList.carNumber=uni.getStorageSync('carNo')
+				}
 			}
 		},
 		methods: {
+			onError(error) {
+				alert(error)
+				console.log('------------error-----------')
+				console.log(error)
+			},
+			onProgress(e) {
+				console.log(e)
+			},
+			radioGroupChange(e){
+				console.log(e)
+				this.gridList.specifications=e
+			},
+			change1(e) {
+				this.gridList.produceDate=e.result
+				console.log(e);
+			},
+			onRemove(index,i) {
+				console.log(index,i)
+				if(i==0){
+					this.imglist.splice(index, 1)
+					this.gridList.polluteUrl=this.imglist.toString()
+				}else{
+					this.imglist1.splice(index, 1)
+					this.gridList.wornUrl=this.imglist1.toString()
+				}
+				console.log(this.imglist,this.imglist1)
+			},
 			carchange(){
+				uni.setStorageSync('typevalue', this.typevalue)
 				uni.setStorageSync('gridList', this.gridList)
 				uni.navigateTo({
 					url: '/pages/erpbusiness/customercar?cangid=' + this.cangid + '&warehouseName=' + this.gridList
@@ -1841,6 +1887,8 @@
 									this.gridList.compId = uni.getStorageSync(
 										'pcUserInfo').compId
 									uni.setStorageSync("quality_print", this.gridList)
+									uni.setStorageSync('typevalue', 3)
+									uni.setStorageSync('gridList', {})
 									if (this.isZJ) {
 										this.isShowPrint = true
 									} else {
@@ -1884,6 +1932,8 @@
 									uni.setStorageSync(
 										'checkcustomer', {}
 									)
+									uni.setStorageSync('typevalue', 3)
+									uni.setStorageSync('gridList', {})
 									console.log('that.gridList', this.gridList)
 									// uni.navigateBack({})
 								} else if(res.data.message == '货物种类与类型不符,请确认!'){
@@ -2439,4 +2489,7 @@
 		justify-content: center;
 		flex-direction: column;
 	}
+	/deep/.radio .u-radio__label{
+		margin-right:0;
+	}
 </style>

+ 39 - 3
pages/erpbusiness/edit_quality_testing.vue

@@ -536,7 +536,17 @@
 					<view class="title">工厂</view>
 					<view class="con-list">
 						<input v-model='gridList.factory' :disabled='disabled1'  maxlength="30"
-							placeholder="请输入工厂" name="input" type="digit"></input>
+							placeholder="请输入工厂" name="input"  type="text"></input>
+					</view>
+				</view>
+				<view v-show="compName=='辽宁佳屹农商贸有限公司'"
+					class="c-row">
+					<view class="title">生产日期</view>
+					<view class="con-list">
+						<u-calendar v-model="show3" @change="change1" :mode="mode"></u-calendar>
+						<view :style='gridList.produceDate?"color:#000;":"color:#999;"' @click="show3 = true">{{gridList.produceDate?gridList.produceDate:'选择生产日期'}}</view>
+						<!-- <input v-model='gridList.factory' :disabled='disabled1'  maxlength="30"
+							placeholder="请输入工厂" name="input" type="digit"></input> -->
 					</view>
 				</view>
 				<view v-show="compName=='辽宁佳屹农商贸有限公司'" class="c-row">
@@ -553,7 +563,7 @@
 									modelId: '',
 									vesselId: ''}" :file-list="fileList" :action="action" :show-progress='false' :show-tips="false" :max-size="maxSize" :max-count="9"
 							:size-type="['compressed']" @on-success="getImgUrl($event,0)" @on-error="onError"
-							@on-remove="onRemove" @on-uploaded="isAdd = true"
+							@on-remove="onRemove($event,0)" @on-uploaded="isAdd = true"
 							:limitType="['png', 'jpg', 'jpeg', 'webp', 'gif']" @on-progress="onProgress">
 							<view slot="addBtn" class="slot-btn u-list-item" hover-class="slot-btn__hover"
 								hover-stay-time="150">
@@ -578,7 +588,7 @@
 									modelId: '',
 									vesselId: ''}" :action="action" :show-progress='false' :show-tips="false" :max-size="maxSize" :max-count="9"
 							:size-type="['compressed']" @on-success="getImgUrl($event,1)" @on-error="onError"
-							@on-remove="onRemove" @on-uploaded="isAdd = true"
+							@on-remove="onRemove($event,1)" @on-uploaded="isAdd = true"
 							:limitType="['png', 'jpg', 'jpeg', 'webp', 'gif']" @on-progress="onProgress">
 							<view slot="addBtn" class="slot-btn u-list-item" hover-class="slot-btn__hover"
 								hover-stay-time="150">
@@ -1005,6 +1015,32 @@
 			}
 		},
 		methods: {
+			onError(error) {
+				alert(error)
+				console.log('------------error-----------')
+				console.log(error)
+			},
+			onProgress(e) {
+				console.log(e)
+			},
+			radioGroupChange(e){
+				console.log(e)
+				this.gridList.specifications=e
+			},
+			change1(e) {
+				this.gridList.produceDate=e.result
+				console.log(e);
+			},
+			onRemove(index,i) {
+				console.log(index,i)
+				if(i==0){
+					this.imglist.splice(index, 1)
+					this.gridList.polluteUrl=this.imglist.toString()
+				}else{
+					this.imglist1.splice(index, 1)
+					this.gridList.wornUrl=this.imglist1.toString()
+				}
+			},
 			getImgUrl(res,status) {
 				var that = this
 				this.$api.doRequest('post', '/appendix/api/saveFilesApp', {

+ 40 - 38
pages/erpbusiness/examine_quality_testing.vue

@@ -301,6 +301,13 @@
 						{{gridList.factory}}
 					</view>
 				</view>
+				<view v-show="compName=='辽宁佳屹农商贸有限公司'"
+					class="c-row">
+					<view class="title">生产日期</view>
+					<view class="con-list">
+						{{gridList.produceDate}}
+					</view>
+				</view>
 				<view v-show="compName=='辽宁佳屹农商贸有限公司'" class="c-row">
 					<view class="title">污染件数</view>
 					<view class="con-list">
@@ -311,29 +318,20 @@
 					<view class="title">污染附件</view>
 				</view>
 				<view>
-					<view v-if='fileList.length>0&&compName=="辽宁佳屹农商贸有限公司"'>
-						<view style="margin-top: 20rpx;" v-for='item in fileList'>
-							<view class="img_item">
-								<view class="" style="width: 16%;">
-									<image
-										v-if="item.type == 'pdf'"
-										style="width: 40px; height: 40px;" src="../../static/img/oa_office/pdf3.png"
-										mode=""></image>
-									<image v-else-if="item.type == 'xls'||item.type == 'xlsx'"
-										style="width: 40px; height: 40px;" src="../../static/img/oa_office/excle3.png"
-										mode=""></image>
-									<image v-else-if="item.type == 'doc'||item.type == 'docx'"
-										style="width: 40px; height: 40px;" src="../../static/img/oa_office/word3.png"
-										mode=""></image>
-									<image v-else style="width: 40px; height: 40px;" :src="item.appendixPath" mode="">
-									</image>
-								</view>
-								<view class="" style="width: 70%;">
-									<view class="char_css">{{item.appendixName}}</view>
-									<view class="">{{item.appendixSize}}</view>
-								</view>
-								<view class="img_dowload" @click="openDocument(item)">下载</view>
-							</view>
+					<view style='display: flex;flex-wrap: wrap;' v-if='fileList.length>0&&compName=="辽宁佳屹农商贸有限公司"'>
+						<view style="margin: 10rpx;" v-for='item in fileList'>
+							<image
+								v-if="item.type == 'pdf'"
+								style="width: 100px; height: 100px;" src="../../static/img/oa_office/pdf3.png"
+								mode=""></image>
+							<image v-else-if="item.type == 'xls'||item.type == 'xlsx'"
+								style="width: 100px; height: 100px;" src="../../static/img/oa_office/excle3.png"
+								mode=""></image>
+							<image v-else-if="item.type == 'doc'||item.type == 'docx'"
+								style="width: 100px; height: 100px;" src="../../static/img/oa_office/word3.png"
+								mode=""></image>
+							<image v-else @click='lookImg(item.appendixPath)' style="width: 100px; height: 100px;" :src="item.appendixPath" mode="">
+							</image>
 						</view>
 					</view>
 				</view>
@@ -347,29 +345,21 @@
 					<view class="title">破损附件</view>
 				</view>
 				<view>
-					<view v-if='fileList1.length>0&&compName=="辽宁佳屹农商贸有限公司"'>
-						<view style="margin-top: 20rpx;" v-for='item in fileList1'>
-							<view class="img_item">
-								<view class="" style="width: 16%;">
+					<view style='display: flex;flex-wrap: wrap;' v-if='fileList1.length>0&&compName=="辽宁佳屹农商贸有限公司"'>
+						<view style="margin: 10rpx;" v-for='item in fileList1'>
 									<image
 										v-if="item.type == 'pdf'"
-										style="width: 40px; height: 40px;" src="../../static/img/oa_office/pdf3.png"
+										style="width: 100px; height: 100px;" src="../../static/img/oa_office/pdf3.png"
 										mode=""></image>
 									<image v-else-if="item.type == 'xls'||item.type == 'xlsx'"
-										style="width: 40px; height: 40px;" src="../../static/img/oa_office/excle3.png"
+										style="width: 100px; height: 100px;" src="../../static/img/oa_office/excle3.png"
 										mode=""></image>
 									<image v-else-if="item.type == 'doc'||item.type == 'docx'"
-										style="width: 40px; height: 40px;" src="../../static/img/oa_office/word3.png"
+										style="width: 100px; height: 100px;" src="../../static/img/oa_office/word3.png"
 										mode=""></image>
-									<image v-else style="width: 40px; height: 40px;" :src="item.appendixPath" mode="">
+									<image v-else @click='lookImg(item.appendixPath)' style="width: 100px; height: 100px;" :src="item.appendixPath" mode="">
 									</image>
-								</view>
-								<view class="" style="width: 70%;">
-									<view class="char_css">{{item.appendixName}}</view>
-									<view class="">{{item.appendixSize}}</view>
-								</view>
-								<view class="img_dowload" @click="openDocument(item)">下载</view>
-							</view>
+								
 						</view>
 					</view>
 				</view>
@@ -550,6 +540,18 @@
 					}
 				});
 			},
+			lookImg(item){
+				uni.previewImage({
+				    current: 0,
+					urls: [item],
+					success: function(data) {
+						console.log('预览成功');
+					},
+					fail: function(err) {
+						console.log('预览失败+'+err.errMsg);
+					}	
+				});
+			},
 			gradepicker(e) {
 				console.log(e)
 				// this.$set(this.gradeList,'grade',this.gradeList[e[0]].value)

+ 5 - 3
pages/erpbusiness/quality_testing.vue

@@ -1180,11 +1180,13 @@
 	/* 	position: fixed; */
 		right: 0;
 		/* top: 17.5%; */
-		background: url('../../static/img/qiyebeijing.png') no-repeat;
-		background-size: 100% 100%;
-		width: 60%;
+		background: linear-gradient(to right,#EFEEF6, #DCDAEA);
+		/* background: url('../../static/img/qiyebeijing.png') no-repeat; */
+		/* background-size: 100% 100%; */
+		/* width: 60%; */
 		font-size: 11px;
 		padding-bottom: 5px;
+		padding-left:10px;
 		padding-right: 10px;
 		text-align:right;
 		border-radius: 40rpx 0 0 40rpx;