Ver Fonte

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

gjy há 3 anos atrás
pai
commit
2ace57c69d

+ 12 - 5
src/views/houseSelfCollect/customerManagementAdd.vue

@@ -269,7 +269,7 @@
         disabled: false,
         identity: [],
         bank: [],
-        trader: '新增',
+        trader: '',
         switchType: '',
         identityImgUp: [{
           url: '',
@@ -298,13 +298,15 @@
     },
     activated() {
       this.switchType = this.$route.query.types
-      if (this.$route.query.types == null) {
+      if (!this.switchType) {
         this.switchType = 1
         this.trader = '新增'
         this.imageUrl1 = ''
         this.imageUrl2 = ''
         this.imageUrl3 = ''
         this.imageUrl4 = ''
+        this.trader = '新增'
+         this.disabled = false
         this.customerList = {}
       }
       let id = this.$route.query.id
@@ -396,8 +398,6 @@
               } else {}
             })
         }
-
-
       },
       cancel() {
         this.customerList = {}
@@ -410,13 +410,20 @@
       },
       obtainWH(e,index){
           //获取图片宽高
+          let type = this.$route.query.types
           var img_url = e.url;//图片URL地址
              var imgObj = new Image();//创建对象
              imgObj.src = img_url;//改变图片地址
              imgObj.onload = function(){
                if(Number(imgObj.width) < Number(imgObj.height)){
                  let i = document.getElementsByClassName("avatar");
-                 i[index].style.width='auto'
+                 if(!type){
+                   for( j = 0 ; j < i.length ; j++){
+                     i[j].style.width='auto'
+                   }
+                 }else{
+                    i[index].style.width='auto'
+                 }
                   let j = document.getElementsByClassName("avatar-uploader" + (index+1))
                   j[0].style.background = "#e7e3e3"
                }

+ 43 - 4
src/views/taskManagement/tranManagementWarehouseInOutTaskAdd.vue

@@ -324,7 +324,7 @@
 					</el-form-item>
 							<!--预估运费(元/吨)-->
 					<el-form-item label="预估运费(元/吨)" span="1" >
-						<el-input v-model="dataList1.estimatedFreight" placeholder="请输入预估运费"
+						<el-input v-model="dataList.estimatedFreight" placeholder="请输入预估运费"
 							maxlength="20" size="small"  />
 					</el-form-item>
 					<!--发货人-->
@@ -861,7 +861,8 @@
 						})
 						return
 					}
-					if (!this.dataList.unitPrice) {
+					if(this.Pricetype){
+						if (!this.dataList.unitPrice) {
 						this.$message({
 							message: '单价不能为空!',
 							type: 'warning'
@@ -883,6 +884,9 @@
 						})
 						return
 					}
+					}
+					
+					
 					if (!this.dataList.predictDate) {
 						this.$message({
 							message: '预计出库日期不能为空!',
@@ -890,6 +894,13 @@
 						})
 						return
 					}
+				    if (isNaN(this.dataList.estimatedFreight)) {
+						this.$message({
+							message: '预估运费输入错误!',
+							type: 'warning'
+						})
+						return
+					}
 					// if (!this.dataList.agent) {
 					//   this.$message({
 					//     message: '出库经办人不能为空!',
@@ -1001,7 +1012,8 @@
 						})
 						return
 					}
-					if (!this.dataList1.unitPrice) {
+					if(this.Pricetype){
+						if (!this.dataList1.unitPrice) {
 						this.$message({
 							message: '单价不能为空!',
 							type: 'warning'
@@ -1023,12 +1035,21 @@
 						})
 						return
 					}
+					}
+					
 					if (!this.dataList1.predictDate) {
 						this.$message({
 							message: '预计入库日期不能为空!',
 							type: 'warning'
 						})
 						return
+					}
+					 if (isNaN(this.dataList1.estimatedFreight)) {
+						this.$message({
+							message: '预估运费输入错误!',
+							type: 'warning'
+						})
+						return
 					}
 					// if (!this.dataList1.agent) {
 					//   this.$message({
@@ -1095,6 +1116,13 @@
 							type: 'warning'
 						})
 						return
+					}
+					 if (isNaN(this.dataList1.estimatedFreight)) {
+						this.$message({
+							message: '预估运费输入错误!',
+							type: 'warning'
+						})
+						return
 					}
 					if (!this.dataList1.predictDate) {
 						this.$message({
@@ -1235,7 +1263,8 @@
 						})
 						return
 					}
-					if (!this.dataList1.unitPrice) {
+					if(this.Pricetype){
+						if (!this.dataList1.unitPrice) {
 						this.$message({
 							message: '单价不能为空!',
 							type: 'warning'
@@ -1257,6 +1286,8 @@
 						})
 						return
 					}
+					}
+					
 					if (!this.dataList.predictDate) {
 						this.$message({
 							message: '预计出库日期不能为空!',
@@ -1264,12 +1295,20 @@
 						})
 						return
 					}
+					
 					if (!this.dataList1.predictDate) {
 						this.$message({
 							message: '预计入库日期不能为空!',
 							type: 'warning'
 						})
 						return
+					}
+					 if (isNaN(this.dataList1.estimatedFreight)) {
+						this.$message({
+							message: '预估运费输入错误!',
+							type: 'warning'
+						})
+						return
 					}
 					// if (!this.dataList.agent) {
 					//   this.$message({