Browse Source

前端代储合同附件,收购水分增价

gjy 2 years ago
parent
commit
d4a81a2afe
3 changed files with 136 additions and 14 deletions
  1. 1 1
      config/index.js
  2. 68 1
      pages/erpbusiness/add_quality_testing.vue
  3. 67 12
      pages/task/audit/daichu_details.vue

+ 1 - 1
config/index.js

@@ -4,7 +4,7 @@ const dev = {
 	// baseUrlNew: 'http://192.168.110.67:9100/',
 	// baseUrlNew: 'http://192.168.110.67:9100/',
 	// baseUrlNew: 'http://192.168.1.118:8090/',
 	// baseUrlNew: 'http://192.168.1.118:8090/',
 	// baseUrlNew: 'http://192.168.110.9:9100/',
 	// baseUrlNew: 'http://192.168.110.9:9100/',
-	baseUrlNew: 'http://192.168.110.138:8090/',
+	// baseUrlNew: 'http://192.168.110.138:8090/',
 	// baseUrlNew: 'http://192.168.110.82:8099/',
 	// baseUrlNew: 'http://192.168.110.82:8099/',
 	 // baseUrlNew: 'http://192.168.110.82:8090/',
 	 // baseUrlNew: 'http://192.168.110.82:8090/',
 	// baseUrlNew: 'http://192.168.110.202:8090/',
 	// baseUrlNew: 'http://192.168.110.202:8090/',

+ 68 - 1
pages/erpbusiness/add_quality_testing.vue

@@ -270,6 +270,48 @@
 				</view>
 				</view>
 				<button class='cu-btn bg-green shadow' @click="changeprice">{{pricetext}}</button>
 				<button class='cu-btn bg-green shadow' @click="changeprice">{{pricetext}}</button>
 			</view>
 			</view>
+			<view v-show="gridList.type == '潮粮'&&utils.getCurrectRoles('acquisitionQuality.initial')&&typevalue==1"
+				class="c-row">
+				<view class="title">水分增价(元/公斤)</view>
+				<view class="con-list">
+					<input v-model='gridList.waterPriceIncrease' :disabled='disabled1' @input='deductionchange'
+						placeholder="自动获取,不可编辑" name="input" type="digit"></input>
+				</view>
+			</view>
+			<view v-show="gridList.type == '潮粮'&&utils.getCurrectRoles('acquisitionQuality.initial')&&typevalue==1"
+				class="c-row">
+				<view class="title">水分扣价(元/公斤)</view>
+				<view class="con-list">
+					<input v-model='gridList.waterPriceDeduction' :disabled='disabled1' @input='deductionchange'
+						placeholder="自动获取,不可编辑" name="input" type="digit"></input>
+				</view>
+			</view>
+			<view v-show="gridList.type == '潮粮'&&utils.getCurrectRoles('acquisitionQuality.initial')&&typevalue==1"
+				class="c-row">
+				<view class="title">质量增价(元/公斤)</view>
+				<view class="con-list">
+					<input v-model='gridList.qualityPriceIncrease' :disabled='disabled1' @input='deductionchange'
+						placeholder="自动获取,不可编辑" name="input" type="digit"></input>
+				</view>
+			</view>
+			
+			<view v-show="gridList.type == '潮粮'&&utils.getCurrectRoles('acquisitionQuality.initial')&&typevalue==1"
+				class="c-row">
+				<view class="title">质量扣价(元/公斤)</view>
+				<view class="con-list">
+					<input v-model='gridList.qualityPriceDeduction' :disabled='disabled1' @input='deductionchange'
+						placeholder="自动获取,不可编辑" name="input" type="digit"></input>
+				</view>
+			</view>
+			
+			<view v-show="gridList.type == '潮粮'&&utils.getCurrectRoles('acquisitionQuality.initial')&&typevalue==1"
+				class="c-row">
+				<view class="title">净重单价(元/公斤)</view>
+				<view class="con-list">
+					<input v-model='gridList.tidalGrainPrice' :disabled='disabled1' @blur='inputprice'
+						placeholder="自动获取,不可编辑" name="input" type="digit"></input>
+				</view>
+			</view>
 			<view v-show="gridList.type == '潮粮'&&utils.getCurrectRoles('acquisitionQuality.initial')&&typevalue==1"
 			<view v-show="gridList.type == '潮粮'&&utils.getCurrectRoles('acquisitionQuality.initial')&&typevalue==1"
 				class="c-row">
 				class="c-row">
 				<view class="title">净重单价(元/公斤)</view>
 				<view class="title">净重单价(元/公斤)</view>
@@ -474,6 +516,10 @@
 					customerPhone: '',
 					customerPhone: '',
 					bulkDensity: "",
 					bulkDensity: "",
 					imperfectGrain: "",
 					imperfectGrain: "",
+					waterPriceIncrease:0,
+					waterPriceDeduction:0,
+					qualityPriceIncrease:0,
+					qualityPriceDeduction:0,
 					waterContent: "",
 					waterContent: "",
 					jiaorenli: "",
 					jiaorenli: "",
 					impurity: "",
 					impurity: "",
@@ -576,6 +622,7 @@
 					grossWeight: 0,
 					grossWeight: 0,
 					tare: 0,
 					tare: 0,
 					grade: '',
 					grade: '',
+					
 					// inOutDate: new Date().toISOString().slice(0, 10),
 					// inOutDate: new Date().toISOString().slice(0, 10),
 					netWeight: 0,
 					netWeight: 0,
 					pureWeight: 0,
 					pureWeight: 0,
@@ -836,6 +883,11 @@
 			}
 			}
 		},
 		},
 		methods: {
 		methods: {
+			deductionchange(){
+			    if(this.gridList.tidalGrainPrice&&this.gridList.waterPriceIncreas&&this.gridList.waterPriceDeduction&&this.gridList.qualityPriceIncrease&&this.gridList.qualityPriceDeduction){
+			        this.gridList.tidalGrainPrice=this.gridList.tidalGrainPrice-this.gridList.waterPriceIncrease-this.gridList.waterPriceDeduction-this.gridList.qualityPriceIncrease-this.gridList.qualityPriceDeduction
+			    }
+			},
 			carNopicker(e){
 			carNopicker(e){
 				this.gridList.carNumber=this.tranCarInfoList[e[0]].carNo
 				this.gridList.carNumber=this.tranCarInfoList[e[0]].carNo
 				 for (let i = 0; i < this.tranCarInfoList.length; i++) {
 				 for (let i = 0; i < this.tranCarInfoList.length; i++) {
@@ -1306,11 +1358,26 @@
 							return
 							return
 						}
 						}
 					}
 					}
+					if (this.gridList.waterPriceIncrease>10||this.gridList.waterPriceIncrease<0) {
+						this.$api.msg('水分增价输入错误')
+						return
+					}
+					if (this.gridList.waterPriceDeduction>10||this.gridList.waterPriceDeduction<0) {
+						this.$api.msg('水分扣价输入错误')
+						return
+					}
+					if (this.gridList.qualityPriceIncrease>10||this.gridList.qualityPriceIncrease<0) {
+						this.$api.msg('质量增价输入错误')
+						return
+					}
+					if (this.gridList.qualityPriceDeduction>10||this.gridList.qualityPriceDeduction<0) {
+						this.$api.msg('质量扣价输入错误')
+						return
+					}
 					if (!this.gridList.type) {
 					if (!this.gridList.type) {
 						this.$api.msg('类型不能为空')
 						this.$api.msg('类型不能为空')
 						return
 						return
 					}
 					}
-
 					if (this.value == false) {
 					if (this.value == false) {
 						if (!this.gridList.grade) {
 						if (!this.gridList.grade) {
 							this.$api.msg('等级不能为空')
 							this.$api.msg('等级不能为空')

+ 67 - 12
pages/task/audit/daichu_details.vue

@@ -133,17 +133,34 @@
 				<textarea class='textarea' v-model="list.remarks" input-align="right" placeholder="" disabled />
 				<textarea class='textarea' v-model="list.remarks" input-align="right" placeholder="" disabled />
 			</u-form-item>
 			</u-form-item>
 			<u-form-item label-width='260' label="附件">
 			<u-form-item label-width='260' label="附件">
-				<!-- <view class="textCss">
-					<upload class="upload" ref="upload" :action="action" :max-size="maxSize" :max-count="1"
-						:file-list="imglist" :size-type="['compressed']" @on-success="getImgUrl" @on-error="onError"
-						@on-remove="onRemove" @on-uploaded="isAdd = true" :before-upload="filterFileType"
-						@on-progress="onProgress" :deletable="false" :showProgress = "false"></upload>
-				</view> -->
-				<view v-for='item in imglist'>
-					<view @click='shadeshow(item)'>
-						<image style='width: 200rpx;height: 200rpx;' :src="item" mode=""></image>
+					<view class="form_top">共{{imglist.length}}个附件</view>
+					<view v-if='imglist.length>0'>
+						<view style="justify-content: space-between;" class='flex' v-for='item in imglist'>
+							<view class="img_item">
+								<view class="" style="width: 16%;">
+									<image
+										v-if="item.type == 'pdf'"
+										class="imgsign" src="../../../static/img/oa_office/pdf3.png"
+										mode=""></image>
+									<image v-else-if="item.type == 'xls'||item.type == 'xlsx'"
+										 class="imgsign" src="../../../static/img/oa_office/excle3.png"
+										mode=""></image>
+									<image v-else-if="item.type == 'doc'||item.type == 'docx'"
+										 class="imgsign" src="../../../static/img/oa_office/word3.png"
+										mode=""></image>
+									<image v-else  class="imgsign" :src="item.appendixPath" mode="">
+									</image>
+								</view>
+								<view class="" style="width: 70%;">
+									<view class="char_css">{{item.appendixName}}</view>
+									<view class="img_size">{{item.appendixSize}}</view>
+								</view>
+								<view style="color: #22C572;" class="img_dowload" @click="openDocument(item)">
+									下载
+								</view>
+							</view>
+							</view>
 					</view>
 					</view>
-				</view>
 			</u-form-item>
 			</u-form-item>
 		</u-form>
 		</u-form>
 		<view style='padding:10px;' class='flex bottom-btn'>
 		<view style='padding:10px;' class='flex bottom-btn'>
@@ -243,8 +260,12 @@
 						this.$api.doRequest('get', '/appendix/query/getFileList', {
 						this.$api.doRequest('get', '/appendix/query/getFileList', {
 							appendixIds: that.list.addressUrl
 							appendixIds: that.list.addressUrl
 						}).then(res1 => {
 						}).then(res1 => {
-							for (var i = 0; i < res1.data.data.length; i++) {
-								that.imglist.push(res1.data.data[i].appendixPath)
+							that.imglist=res1.data.data
+							for (let i = 0; i < that.imglist.length; i++) {//获取后缀
+								if (that.imglist[i].appendixName) {
+									let index = that.imglist[i].appendixName.lastIndexOf(".") 
+									that.imglist[i].type = that.imglist[i].appendixName.substring(index+1)
+								}
 							}
 							}
 						})
 						})
 					}
 					}
@@ -585,4 +606,38 @@
 			color: #AFB3BF;
 			color: #AFB3BF;
 		}
 		}
 	}
 	}
+	.img_item {
+		display: flex;
+		width: 100%;
+		margin: 10px 0;
+		padding: 0 10rpx;
+		.imgsign{
+			width: 25px;
+			height: 25px;
+			margin-top: 6px;
+		}
+		.char_css {
+			font-size: 28rpx;
+			font-weight: 600;
+			display: -webkit-box;
+			overflow: hidden;
+			/*! autoprefixer: off; */
+			-webkit-box-orient: vertical;
+			-webkit-line-clamp: 1;
+			-webkit-box-orient: vertical;
+			text-overflow: ellipsis;
+			word-break: break-all;
+		}
+		.img_size{
+			color: #B0B3BF;
+			font-size: 12px;
+			margin-top: 5px;
+		}
+	
+		.img_dowload {
+			width: 14%;
+			color: #22C572;
+			text-align: right;
+		}
+	}
 </style>
 </style>