高敬炎 преди 2 години
родител
ревизия
7d7085ffbf
променени са 4 файла, в които са добавени 418 реда и са изтрити 16 реда
  1. 122 4
      pages/erpbusiness/add_quality_testing.vue
  2. 139 2
      pages/erpbusiness/edit_quality_testing.vue
  3. 146 0
      pages/erpbusiness/examine_quality_testing.vue
  4. 11 10
      pages/erpbusiness/index.vue

+ 122 - 4
pages/erpbusiness/add_quality_testing.vue

@@ -42,7 +42,7 @@
 				</view>
 			</view>
 			<view  style=' align-items: flex-start;' class="c-row ">
-				<view class="title">任务提示</view>
+				<view class="title">合同提示</view>
 				<view class="con-list">
 					{{gridList.pointOut?gridList.pointOut:'自动获取,不可编辑'}}
 				</view>
@@ -61,7 +61,7 @@
 				</view>
 			</view> -->
 			<view v-show='typevalue==1' style=' align-items: flex-start;' class="c-row ">
-				<view class="title">提示</view>
+				<view class="title"></view>
 				<view class="con-list">
 					{{gridList.tips?gridList.tips:'自动获取,不可编辑'}}
 				</view>
@@ -182,8 +182,8 @@
 					<u-picker :range="tranCarInfoList" range-key="carNo1" @confirm='carNopicker($event,1)'
 						v-model="show9" mode="selector">
 					</u-picker>
-
 				</view>
+				<button v-show="compName=='辽宁佳屹农商贸有限公司'" class='cu-btn bg-green shadow' @click="carchange">选择</button>
 			</view>
 			<view v-show='utils.getCurrectRoles("acquisitionQuality.initial")' class="c-row ">
 				<view class="title">仓位号</view>
@@ -504,6 +504,74 @@
 							placeholder="请输入干粮单价" name="input" type="digit"></input>
 					</view>
 				</view>
+				<view v-show="compName=='辽宁佳屹农商贸有限公司'"
+					class="c-row">
+					<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 name="830">830</u-radio>
+						</u-radio-group>
+					</view>
+				</view>
+				<view v-show="compName=='辽宁佳屹农商贸有限公司'"
+					class="c-row">
+					<view class="title">工厂</view>
+					<view class="con-list">
+						<input v-model='gridList.factory' :disabled='disabled1'  maxlength="30"
+							placeholder="请输入工厂" name="input" type="digit"></input>
+					</view>
+				</view>
+				<view v-show="compName=='辽宁佳屹农商贸有限公司'" class="c-row">
+					<view class="title">污染件数</view>
+					<view class="con-list">
+						<input v-model='gridList.polluteNum' :disabled='disabled1'
+							placeholder="请输入污染件数" name="input" type="digit"></input>
+					</view>
+				</view>
+				<view v-show="compName=='辽宁佳屹农商贸有限公司'"  style='padding:20rpx 30rpx;'>
+					<view class="title">污染附件</view>
+					<view class="con-list">
+						<u-upload :custom-btn='true' class="upload" ref="upload" name='fileName' :form-data="{companyId: pcUserInfo.compId,
+									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"
+							: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">
+								<image style="width:23px;height:23px;" src="../../static/img/liangmai/xiangji-2.png"
+									mode=""></image>
+								<view>选择图片</view>
+							</view>
+						</u-upload>
+					</view>
+				</view>
+				<view v-show="compName=='辽宁佳屹农商贸有限公司'" class="c-row">
+					<view class="title">破损件数</view>
+					<view class="con-list">
+						<input v-model='gridList.wornNum' :disabled='disabled1'
+							placeholder="请输入破损件数" name="input" type="digit"></input>
+					</view>
+				</view>
+				<view v-show="compName=='辽宁佳屹农商贸有限公司'" style='padding:20rpx 30rpx;'>
+					<view class="title">破损附件</view>
+					<view class="con-list">
+						<u-upload :custom-btn='true' class="upload" ref="upload" name='fileName' :form-data="{companyId: pcUserInfo.compId,
+									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"
+							: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">
+								<image style="width:23px;height:23px;" src="../../static/img/liangmai/xiangji-2.png"
+									mode=""></image>
+								<view>选择图片</view>
+							</view>
+						</u-upload>
+					</view>
+				</view>
 			</view>
 		</view>
 
@@ -563,6 +631,9 @@
 				Data: {
 					ktv: '111111'
 				},
+				action: this.$uploadUrl,
+				pcUserInfo: uni.getStorageSync('pcUserInfo'),
+				maxSize: 50 * 1024 * 1024,
 				Isedit: false,
 				MykeywordShow: false,
 				InputEvent: '',
@@ -648,6 +719,7 @@
 					buckleWeightRatio: 0,
 					buckleMiscellaneous: 0,
 					paramType: 1,
+					specifications:830,
 					warehouseInOutDetail: {
 						grade: '',
 						reGrade: '',
@@ -767,6 +839,7 @@
 				managementType: '',
 				flag: 2,
 				warehouseName: '',
+				compName:'',
 				warehouseList: [],
 				warehouseCount: '',
 				commonWarehouseNo: '',
@@ -826,7 +899,9 @@
 					value: '正常'
 				}, {
 					value: '异常'
-				}]
+				}],
+				imglist:[],
+				imglist1:[],
 			}
 		},
 		// #ifndef MP
@@ -936,6 +1011,10 @@
 			this.gridListInit = this.gridList
 		},
 		async onShow() {
+			var that = this
+			if(uni.getStorageSync('compName1')){
+				that.compName = uni.getStorageSync('compName1').company
+			}
 			this.isQY = this.utils.getCurrectRoles('acquisitionQuality.qview')
 			this.isZJ = this.utils.getCurrectRoles('acquisitionQuality.initial')
 
@@ -1043,8 +1122,34 @@
 					})
 				}
 			}
+			if(uni.getStorageSync('carNo')&&this.typevalue==1){
+				this.gridList.carNumber=uni.getStorageSync('carNo')
+			}
 		},
 		methods: {
+			carchange(){
+				uni.navigateTo({
+					url: '/pages/erpbusiness/customercar?cangid=' + this.cangid + '&warehouseName=' + this.gridList
+						.warehouseName + '&goodsName=' + this.gridList.goodsName
+				})
+			},
+			getImgUrl(res,status) {
+				var that = this
+				this.$api.doRequest('post', '/appendix/api/saveFilesApp', {
+					newAppendixs: [res.data],
+					oldAppendixIds: ""
+				}).then(res1 => {
+					if(status==0){
+						that.imglist.push(res1.data.data[0])
+						that.gridList.polluteUrl=that.imglist.toString()
+					}else{
+						that.imglist1.push(res1.data.data[0])
+						that.gridList.wornUrl=that.imglist1.toString()
+					}
+					
+					console.log(res)
+				})
+			},
 			colorLustreClick(e) {
 				this.gridList.colorLustre = this.colorLustreList[e[0]].value
 			},
@@ -2319,4 +2424,17 @@
 	/deep/.u-radio-group {
 		flex-direction: row-reverse;
 	}
+	/deep/.u-upload .u-list-item {
+		background: #fff;
+		border: 1px dashed #ccc;
+		border-radius: 10rpx;
+		height: 190rpx !important;
+		width: 190rpx !important;
+		margin: 10rpx;
+		text-align: center;
+		display: flex;
+		align-items: center;
+		justify-content: center;
+		flex-direction: column;
+	}
 </style>

+ 139 - 2
pages/erpbusiness/edit_quality_testing.vue

@@ -521,6 +521,74 @@
 					<input v-model='gridList.dryGrainPrice' :disabled='pricedisabled' type="digit"  @blur='inputprice' placeholder="请输入干粮单价" name="input"></input>
 					</view>
 				</view>
+				<view v-show="compName=='辽宁佳屹农商贸有限公司'"
+					class="c-row">
+					<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 name="830">830</u-radio>
+						</u-radio-group>
+					</view>
+				</view>
+				<view v-show="compName=='辽宁佳屹农商贸有限公司'"
+					class="c-row">
+					<view class="title">工厂</view>
+					<view class="con-list">
+						<input v-model='gridList.factory' :disabled='disabled1'  maxlength="30"
+							placeholder="请输入工厂" name="input" type="digit"></input>
+					</view>
+				</view>
+				<view v-show="compName=='辽宁佳屹农商贸有限公司'" class="c-row">
+					<view class="title">污染件数</view>
+					<view class="con-list">
+						<input v-model='gridList.polluteNum' :disabled='disabled1'
+							placeholder="请输入污染件数" name="input" type="digit"></input>
+					</view>
+				</view>
+				<view v-show="compName=='辽宁佳屹农商贸有限公司'"  style='padding:20rpx 30rpx;'>
+					<view class="title">污染附件</view>
+					<view class="con-list">
+						<u-upload :custom-btn='true' class="upload" ref="upload" name='fileName' :form-data="{companyId: pcUserInfo.compId,
+									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"
+							: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">
+								<image style="width:23px;height:23px;" src="../../static/img/liangmai/xiangji-2.png"
+									mode=""></image>
+								<view>选择图片</view>
+							</view>
+						</u-upload>
+					</view>
+				</view>
+				<view v-show="compName=='辽宁佳屹农商贸有限公司'" class="c-row">
+					<view class="title">破损件数</view>
+					<view class="con-list">
+						<input v-model='gridList.wornNum' :disabled='disabled1'
+							placeholder="请输入破损件数" name="input" type="digit"></input>
+					</view>
+				</view>
+				<view v-show="compName=='辽宁佳屹农商贸有限公司'" style='padding:20rpx 30rpx;'>
+					<view class="title">破损附件</view>
+					<view class="con-list">
+						<u-upload :custom-btn='true' :file-list="fileList1" class="upload" ref="upload" name='fileName' :form-data="{companyId: pcUserInfo.compId,
+									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"
+							: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">
+								<image style="width:23px;height:23px;" src="../../static/img/liangmai/xiangji-2.png"
+									mode=""></image>
+								<view>选择图片</view>
+							</view>
+						</u-upload>
+					</view>
+				</view>
 			</view>
 		</view>
 
@@ -634,8 +702,12 @@
 					dryGrainPrice: '',
 					carNumber: '',
 					carModel: '',
-					serviceManagementType:'3'
+					serviceManagementType:'3',
+					specifications:830
 				},
+				action: this.$uploadUrl,
+				pcUserInfo: uni.getStorageSync('pcUserInfo'),
+				maxSize: 50 * 1024 * 1024,
 				managementType: '',
 				warehouseName: '',
 				warehouseList: [],
@@ -675,7 +747,12 @@
 				transgeneShow:false,
 				transgeneList:[{value:'非转基因'},{value:'转基因'}],
 				colorLustreShow : false,
-				colorLustreList:[{value:'正常'},{value:'异常'}]
+				colorLustreList:[{value:'正常'},{value:'异常'}],
+				imglist:[],
+				imglist1:[],
+				fileList:[],
+				fileList1:[],
+				compName: "",
 			}
 		},
 		// #ifndef MP
@@ -721,6 +798,7 @@
 			uni.showLoading({
 				title:"加载中"
 			})
+			var that = this
 			this.$api.doRequest('get', '/qualityInspectionManagement/api/getQualityInspection', {
 				id: this.id
 			}).then(res => {
@@ -732,6 +810,28 @@
 					} else {
 						that.value = false
 					}
+					if(data.polluteUrl){
+						this.imglist=data.polluteUrl.split(',')
+						this.$api.doRequest('get', 'appendix/query/getFileList', {
+							appendixIds: data.polluteUrl
+						}).then(res1 => {
+							for (var i = 0; i < res1.data.data.length; i++) {
+								res1.data.data[i].url=res1.data.data[i].appendixPath
+							}
+							this.fileList=res1.data.data
+						})
+					}
+					if(data.wornUrl){
+						this.imglist1=data.wornUrl.split(',')
+						this.$api.doRequest('get', 'appendix/query/getFileList', {
+							appendixIds: data.wornUrl
+						}).then(res1 => {
+							for (var i = 0; i < res1.data.data.length; i++) {
+								res1.data.data[i].url=res1.data.data[i].appendixPath
+							}
+							this.fileList1=res1.data.data
+						})
+					}
 					that.gridList = data
 					
 					if(that.gridList.type=='干粮'){
@@ -856,6 +956,10 @@
 			this.gridList.gradeKey = this.gradeList[2].key
 		},
 		onShow() {
+			var that = this
+			if(uni.getStorageSync('compName1')){
+				that.compName = uni.getStorageSync('compName1').company
+			}
 			this.multiSelector1=[{name:'他运',value:'他运'}]
 			this.$api.doRequest('get', '/inOutWarehouseTask/getContractNo', {
 				warehouseName:this.warehouseName
@@ -901,6 +1005,23 @@
 			}
 		},
 		methods: {
+			getImgUrl(res,status) {
+				var that = this
+				this.$api.doRequest('post', '/appendix/api/saveFilesApp', {
+					newAppendixs: [res.data],
+					oldAppendixIds: ""
+				}).then(res1 => {
+					if(status==0){
+						that.imglist.push(res1.data.data[0])
+						that.gridList.polluteUrl=that.imglist.toString()
+					}else{
+						that.imglist1.push(res1.data.data[0])
+						that.gridList.wornUrl=that.imglist1.toString()
+					}
+					
+					console.log(res)
+				})
+			},
 			colorLustreClick(e){
 				this.gridList.colorLustre = this.colorLustreList[e[0]].value
 			},
@@ -1738,4 +1859,20 @@
 		text-align: center;
 		border-radius: 20rpx;
 	}
+	/deep/.u-radio-group {
+		flex-direction: row-reverse;
+	}
+	/deep/.u-upload .u-list-item {
+		background: #fff;
+		border: 1px dashed #ccc;
+		border-radius: 10rpx;
+		height: 190rpx !important;
+		width: 190rpx !important;
+		margin: 10rpx;
+		text-align: center;
+		display: flex;
+		align-items: center;
+		justify-content: center;
+		flex-direction: column;
+	}
 </style>

+ 146 - 0
pages/erpbusiness/examine_quality_testing.vue

@@ -287,6 +287,92 @@
 						{{gridList.dryGrainPrice}}
 					</view>
 				</view>
+				<view v-show="compName=='辽宁佳屹农商贸有限公司'"
+					class="c-row">
+					<view class="title">规格(公斤)</view>
+					<view class="con-list">
+						{{gridList.specifications}}
+					</view>
+				</view>
+				<view v-show="compName=='辽宁佳屹农商贸有限公司'"
+					class="c-row">
+					<view class="title">工厂</view>
+					<view class="con-list">
+						{{gridList.factory}}
+					</view>
+				</view>
+				<view v-show="compName=='辽宁佳屹农商贸有限公司'" class="c-row">
+					<view class="title">污染件数</view>
+					<view class="con-list">
+						{{gridList.polluteNum}}
+					</view>
+				</view>
+				<view class="c-row">
+					<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>
+					</view>
+				</view>
+				<view v-show="compName=='辽宁佳屹农商贸有限公司'" class="c-row">
+					<view class="title">破损件数</view>
+					<view class="con-list">
+						{{gridList.wornNum}}
+					</view>
+				</view>
+				<view class="c-row">
+					<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%;">
+									<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>
+					</view>
+				</view>
 			</view>
 		</view>
 
@@ -360,6 +446,12 @@
 				],
 				cangid: '',
 				statusShow:"",
+				action: this.$uploadUrl,
+				pcUserInfo: uni.getStorageSync('pcUserInfo'),
+				maxSize: 50 * 1024 * 1024,
+				compName: "",
+				fileList:[],
+				fileList1:[],
 			}
 		},
 		// #ifndef MP
@@ -401,11 +493,38 @@
 		},
 		onShow() {
 			var that = this
+			if(uni.getStorageSync('compName1')){
+				that.compName = uni.getStorageSync('compName1').company
+			}
 			this.$api.doRequest('get', '/qualityInspectionManagement/api/getQualityInspection', {
 				id: this.id
 			}).then(res => {
 				if (res.data.data) {
 					let data = res.data.data
+					if(data.polluteUrl){
+						this.$api.doRequest('get', 'appendix/query/getFileList', {
+							appendixIds: data.polluteUrl
+						}).then(res1 => {
+							for (var i = 0; i < res1.data.data.length; i++) {
+								if (res1.data.data[i].appendixName) {
+									res1.data.data[i].type = res1.data.data[i].appendixName.split(".")[1]
+								}
+							}
+							this.fileList=res1.data.data
+						})
+					}
+					if(data.wornUrl){
+						this.$api.doRequest('get', 'appendix/query/getFileList', {
+							appendixIds: data.wornUrl
+						}).then(res1 => {
+							for (var i = 0; i < res1.data.data.length; i++) {
+								if (res1.data.data[i].appendixName) {
+									res1.data.data[i].type = res1.data.data[i].appendixName.split(".")[1]
+								}
+							}
+							this.fileList1=res1.data.data
+						})
+					}
 					that.gridList = data
 					that.$api.doRequest('get', '/warehouseBaseInfo/getWarehouse', {
 						id: this.cangid
@@ -416,6 +535,21 @@
 			})
 		},
 		methods: {
+			openDocument(src) {
+				uni.downloadFile({
+					url: src.appendixPath,
+					success: function(res) {
+						var filePath = res.tempFilePath;
+						uni.openDocument({
+							filePath: filePath,
+							showMenu: true,
+							success: function(res) {
+								console.log('打开文档成功');
+							}
+						});
+					}
+				});
+			},
 			gradepicker(e) {
 				console.log(e)
 				// this.$set(this.gradeList,'grade',this.gradeList[e[0]].value)
@@ -633,4 +767,16 @@
 	.c-row-fj{
 		padding:20rpx
 	}
+	.img_item {
+		display: flex;
+		width: 100%;
+		margin: 10px 0;
+		padding: 0 10rpx;
+	
+		.img_dowload {
+			width: 14%;
+			color: #22C572;
+			text-align: right;
+		}
+	}
 </style>

+ 11 - 10
pages/erpbusiness/index.vue

@@ -4,7 +4,8 @@
 			<!-- <view class='title'>收购业务管理</view> -->
 			<view class="cu-list grid" :class="['col-' + gridCol,gridBorder?'':'no-border']">
 				<view class="cu-item" v-for="(item,index) in gridList" :key="index" @click="gridClick(item, index)"
-					v-if="index<gridCol*2 && item.show">
+					v-show="index<gridCol*2 && item.show">
+
 					<view :class="['cuIcon-' + item.cuIcon,'text-' + item.color]">
 						<image :src="item.src" class="sign"></image>
 					</view>
@@ -325,15 +326,15 @@
 				return false
 			},
 			isShow() {
-				for (let i = 0; i < this.gridList.length; i++) {
-					if (i == 1) {
-						this.gridList[i].show = this.getRoles('acquisitionQuality.view')
-					} else if (i == 2) {
-						this.gridList[i].show = this.getRoles('acquisitionWeight.view')
-					} else if (i == 3) {
-						this.gridList[i].show = this.utils.getRoles('acquisitionInfor.view')
-					}
-				}
+				// for (let i = 0; i < this.gridList.length; i++) {
+				// 	if (i == 1) {
+				// 		this.gridList[i].show = this.getRoles('acquisitionQuality.view')
+				// 	} else if (i == 2) {
+				// 		this.gridList[i].show = this.getRoles('acquisitionWeight.view')
+				// 	} else if (i == 3) {
+				// 		this.gridList[i].show = this.utils.getRoles('acquisitionInfor.view')
+				// 	}
+				// }
 				for (let k = 0; k < this.gridList1.length; k++) {
 					if (k == 0) {
 						this.gridList1[k].show = this.getRoles('acquisitionWeightOut.view')