Переглянути джерело

添加价格是否编辑判断

gjy 2 роки тому
батько
коміт
0ca47249ab
1 змінених файлів з 20 додано та 3 видалено
  1. 20 3
      src/views/outboundManagement/weighingManagementNew.vue

+ 20 - 3
src/views/outboundManagement/weighingManagementNew.vue

@@ -117,7 +117,7 @@
                           maxlength="10" size="small" />
                       </ws-form-item>
                       <ws-form-item label="价格" span="1" prop="contractPrice">
-                        <ws-input :disabled="recheck" v-model="weighingList.contractPrice" placeholder="请输入价格(元/吨)"
+                        <ws-input :disabled="priceedit" v-model="weighingList.contractPrice" placeholder="请输入价格(元/吨)"
                           maxlength="10" size="small" />
                       </ws-form-item>
                       <ws-form-item v-if="tpyeNo == 2" label="备注" span="1" prop="customer">
@@ -412,6 +412,7 @@
         warehouseList1: [],
         currentPage: 1,
         pageSize: 50,
+        priceedit:false,
         submitAllow: false,
         deliveryList: [],
         inOutTypeList:[],
@@ -1131,7 +1132,8 @@
           //   })
           //   return
           // }
-          if (!this.weighingList.contractPrice && this.weighingList.inOutType != '移库出库') {
+          if (!this.weighingList.contractPrice && this.weighingList.inOutType != '移库出库'
+          ||this.weighingList.inOutType == '移库出库'&&this.weighingList.priceType=='随行就市'&&this.weighingList.warehouseType==2) {
             this.$message({
               message: '价格不能为空',
               type: 'warning',
@@ -1954,6 +1956,13 @@
             this.weighingList.grade = this.outContractNo[i].grade
             this.weighingList.inOutType = this.outContractNo[i].inOutType
             if (this.outContractNo[i].inOutType == '销售出库') {
+              if(this.outContractNo[i].priceType=='随行就市'){
+                this.priceedit=false
+              }else if(this.outContractNo[i].priceType=='定价销售'){
+                this.priceedit=false
+              }{
+
+              }
               this.warehouseCount = '000' + (Number(this.warehouseCount) + 1)
               this.weighingList.numberLetter = 'XSCK'
               this.weighingList.buyer = this.outContractNo[i].buyer
@@ -1972,12 +1981,20 @@
             } else if (this.outContractNo[i].inOutType == '移库出库') {
               for (let q = 0; q < this.warehouseList1.length; q++) {
                 if (this.warehouseList1[q].warehouseName == this.warehouseName) {
-                  if(this.warehouseList1[q].warehouseType==2&&this.warehouseList1[q].createType==1){
+                  if(this.warehouseList1[q].warehouseType==2&&this.warehouseList1[q].createType==1&&this.outContractNo[i].priceType=='定价销售'){
                     // console.log(this.outContractNo[i].contractPrice,11111111111)
+                    this.priceedit=true
                     this.weighingList.contractPrice=this.outContractNo[i].contractPrice
                   }
+                  if(this.warehouseList1[q].warehouseType==2&&this.warehouseList1[q].createType==1&&this.outContractNo[i].priceType=='随行就市'){
+                    this.priceedit=false
+                  }
+                   if(this.warehouseList1[q].warehouseType==1){
+                     this.priceedit=true
+                   }
                 }
               }
+              this.weighingList.priceType=this.outContractNo[i].priceType
               this.warehouseCount = '000' + (Number(this.warehouseCount) + 1)
               this.weighingList.numberLetter = 'YKCK'