gjy пре 2 година
родитељ
комит
58077292b6

+ 2 - 0
src/api/V2/contract/index.js

@@ -113,3 +113,5 @@ export const API_EDIT_CONTRACT ='/contractCostInfo/editInfo'
 export const API_DELETE_CONTRACT ='/contractCostInfo/deleteInfo'
 // 付款
 export const API_PAYMENT ='/contractCostInfo/payment'
+// 获取合同结算单价
+export const API_GET_SETTLEMENTPRICE ='/contractManagementInfo/settlementPrice'

+ 1 - 1
src/api/V2/profitable/index.js

@@ -37,7 +37,7 @@ export const API_GET_SELECTWAREHOUSINGORDER ='/expenseInfo/selectWarehousingOrde
 // 费用管理编辑、分配、完成、确认收款、确认分配
 export const API_EDIT_EXPENSEINFO ='/expenseInfo/editInfo'
 // 费用管理查看
-export const API_LOOK_EXPENSEINFO ='/expenseInfo/getInfo'
+export const API_LOOK_EXPENSEINFO ='/expenseInfo/ExpenseInfo'
 // 费用管理删除
 export const API_DEL_EXPENSEINFO ='/expenseInfo/deleteInfo'
 // 费用管理分配删除

+ 4 - 1
src/model/contarct/index.js

@@ -48,7 +48,8 @@ import {
     API_ADD_CONTRACT,
     API_EDIT_CONTRACT,
     API_DELETE_CONTRACT,
-    API_PAYMENT
+    API_PAYMENT,
+    API_GET_SETTLEMENTPRICE
 } from '@/api/V2/contract'
 // 列表
 export const getList = appRx.get(API_GET_CONTRACT_TENANT, errorCatcher, errorHandle, filter)
@@ -162,3 +163,5 @@ export const editcontractcost = appRx.post(API_EDIT_CONTRACT, errorCatcher, erro
 export const delcontractcost = appRx.post(API_DELETE_CONTRACT, errorCatcher, errorHandle, filter)
 // 付款
 export const payment = appRx.post(API_PAYMENT, errorCatcher, errorHandle, filter)
+// 获取合同结算单价
+export const getsettlementprice = appRx.get(API_GET_SETTLEMENTPRICE, errorCatcher, errorHandle, filter)

+ 17 - 4
src/views/contractManagement/acquisitionContract.vue

@@ -1,4 +1,4 @@
-<!--现货采购合同-->
+<!--购合同-->
 <!--2019年5月30日 20:25:16 by jlx-->
 <template>
   <div>
@@ -85,6 +85,7 @@
               style="color: #8890b1" />
           </el-select>
           <el-select v-else v-model="scope.row.status" placeholder="" class="statusselect"
+            disabled
             @change='selectstatuschange($event,scope.row)'
 
             :value="scope.row.status">
@@ -212,7 +213,7 @@
     billoperatehis,
     deletecontract,
     editInfo,
-    
+    getsettlementprice
   } from '@/model/contarct/index'
   import {
     downloadFile
@@ -415,12 +416,19 @@
       },
       selectstatuschange(e,row){
         var data={}
-        if(e=='发运结束'){
+        var text=`是否将状态改为${e}`
+        getsettlementprice({contractNo:row.contractNo}).toPromise()
+        .then((response) => {
+                if(e=='发运结束'){
           data={id: row.id,endFlag:1}
+        }else if(e=='已完成'){
+          data={id:row.id,settlementPrice:response}
+          text=`合同单价${response}元/吨,确定合同已完成?`
         }else{
           data={id: row.id}
         }
-        this.$confirm(`是否将状态改为${e}`, {
+        
+        this.$confirm(text, {
             confirmButtonText: '确定',
             cancelButtonText: '取消',
             type: 'warning',
@@ -443,6 +451,11 @@
             row.status=row.currectstatus
             return false
           })
+          })
+          .catch((response) => {
+                // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
+          })
+        
       },
       handleSizeChange(val) {
         console.log(`每页 ${val} 条`)

+ 16 - 3
src/views/contractManagement/purchaseContract.vue

@@ -85,6 +85,7 @@
               style="color: #8890b1" />
           </el-select>
           <el-select v-else v-model="scope.row.status" placeholder="" class="statusselect"
+          disabled
             @change='selectstatuschange($event,scope.row)'
 
             :value="scope.row.status">
@@ -212,7 +213,7 @@
     billoperatehis,
     deletecontract,
     editInfo,
-    
+    getsettlementprice
   } from '@/model/contarct/index'
   import {
     downloadFile
@@ -415,12 +416,19 @@
       },
       selectstatuschange(e,row){
         var data={}
-        if(e=='发运结束'){
+        var text=`是否将状态改为${e}`
+        getsettlementprice({contractNo:row.contractNo}).toPromise()
+        .then((response) => {
+                if(e=='发运结束'){
           data={id: row.id,endFlag:1}
+        }else if(e=='已完成'){
+          data={id:row.id,settlementPrice:response}
+          text=`合同单价${response}元/吨,确定合同已完成?`
         }else{
           data={id: row.id}
         }
-        this.$confirm(`是否将状态改为${e}`, {
+        
+        this.$confirm(text, {
             confirmButtonText: '确定',
             cancelButtonText: '取消',
             type: 'warning',
@@ -443,6 +451,11 @@
             row.status=row.currectstatus
             return false
           })
+          })
+          .catch((response) => {
+                // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
+          })
+        
       },
       handleSizeChange(val) {
         console.log(`每页 ${val} 条`)

+ 60 - 3
src/views/contractManagement/salesContract.vue

@@ -88,7 +88,7 @@
           </el-select>
           <el-select v-else v-model="scope.row.status" placeholder="" class="statusselect"
             @change='selectstatuschange($event,scope.row)'
-
+            disabled
             :value="scope.row.status">
               <el-option label="执行中" value="执行中"
               style="color: #8890b1" />
@@ -205,6 +205,26 @@
       <ws-upload ref="upload" :size-limit="size" @onChange="onChange" :comp-id="compId" :appendix-ids="appendixIdss"
         accept=".jpg, .jpeg, .png, .pdf, .doc, .zip, .rar" />
     </WinseaContentModal>
+    <el-dialog
+    title="合同完成"
+    :visible.sync="show"
+    width="30%"
+    :before-close="handleClose">
+    <span>该合同为随行就市的销售合同,结算单价确认后不可修改。</span>
+    <div style="margin-top:10px;">
+      <el-form class="priceform" ref="form" >
+        <el-form-item label="结算单价">
+          <el-input v-model="currectPrice"></el-input>
+          元/吨
+        </el-form-item>
+      </el-form>
+      
+    </div>
+    <span slot="footer" class="dialog-footer">
+      <el-button @click="handleClose1">取 消</el-button>
+      <el-button type="primary" @click="selectstatuschange1()">确 定</el-button>
+    </span>
+  </el-dialog>
   </div>
 </template>
 <script>
@@ -215,6 +235,7 @@
     billoperatehis,
     deletecontract,
     editInfo,
+    getsettlementprice
   } from '@/model/contarct/index'
   import {
     downloadFile
@@ -246,6 +267,8 @@
         //弹出框
         dialogViewSpareMoney: false,
         dialogApproveFormVisible: false,
+        currectPrice:'',
+        currectdata:{},
         // 船舶类型
         monetaryKey: null,
         // 表格显示数据
@@ -380,10 +403,35 @@
           },
         })
       },
-      selectstatuschange(e,row){
+      handleClose1(){
+        this.show=false
+        this.getList()
+      },
+      async selectstatuschange1(){
+        var data={id:this.currectdata.id,settlementPrice:this.currectPrice}
+        editstatus(data)
+              .toPromise()
+              .then((response) => {
+                this.$notify.success({
+                  title: '成功',
+                  message: '状态修改成功',
+                })
+                this.show=false
+                this.getList()
+              })
+              .catch((response) => {
+                // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
+              })
+      },
+      async selectstatuschange(e,row){
+        var response=await getsettlementprice({contractNo:row.contractNo}).toPromise()
         var data={}
+        var text=`是否将状态改为${e}`
         if(e=='发运结束'){
           data={id: row.id,endFlag:1}
+        }else if(e=='已完成'&&row.priceType!='随行就市'){
+          data={id:row.id,settlementPrice:response}
+          text=`合同单价${response}元/吨,确定合同已完成?`
         }else{
           data={id: row.id}
         }
@@ -397,7 +445,8 @@
           }
           console.log(row)
         }
-        this.$confirm(`是否将状态改为${e}`, {
+        if(e!='已完成'||e=='已完成'&&row.priceType!='随行就市'){
+          this.$confirm(text, {
             confirmButtonText: '确定',
             cancelButtonText: '取消',
             type: 'warning',
@@ -420,6 +469,11 @@
             row.status=row.currectstatus
             return false
           })
+        }else{
+          this.currectdata=row
+          this.currectPrice=response
+          this.show=true
+        }      
       },
       onChange() {
         this.$refs.upload
@@ -990,6 +1044,9 @@
     width: 100%;
     z-index: 1;
   }
+  .priceform .el-input{
+    width:79%;
+  }
 
   /*.crt-main .textarea /deep/ .el-form-item__label {*/
   /*  height: 82px;*/

+ 87 - 25
src/views/houseSelfCollect/inspectionManagementNew.vue

@@ -365,12 +365,12 @@
                     maxlength="40" size="small" />
                 </ws-form-item>
                 <!--容重(克/升)-->
-                <ws-form-item label="容重(克/升)" span="1" prop="bulkDensity">
+                <ws-form-item :label="deptBudgetList.goodsName!='大豆'?'容重(克/升)':'蛋白'" span="1" prop="bulkDensity">
                   <ws-input v-if='statusTypetext != "复检"'
-                    v-model="deptBudgetList.bulkDensity" type="number" @mousewheel.native.prevent placeholder="请输入容重"
+                    v-model="deptBudgetList.bulkDensity" type="number" @mousewheel.native.prevent :placeholder="deptBudgetList.goodsName!='大豆'?'请输入容重':'请输入蛋白'"
                     maxlength="40" size="small" />
                   <ws-input :disabled='disablednotarize' v-if='statusTypetext != "初检"'
-                    v-model="deptBudgetList.reBulkDensity" type="number" @mousewheel.native.prevent placeholder="请输入容重"
+                    v-model="deptBudgetList.reBulkDensity" type="number" @mousewheel.native.prevent :placeholder="deptBudgetList.goodsName!='大豆'?'请输入容重':'请输入蛋白'"
                     maxlength="40" size="small" />
                 </ws-form-item>
                 <!--霉变粒(%)<=-->
@@ -1801,11 +1801,20 @@ export default {
       this.deptBudgetList.warehouseInOutDetail.reBulkDensity = this.deptBudgetList.reBulkDensity
       if (this.deptBudgetList.reBulkDensity) {
         if (isNaN(this.deptBudgetList.reBulkDensity)) {
-          this.$message({
-            message: '复检容重(克/升)非数字!',
-            type: 'warning',
-          })
-          return
+          
+          if(this.deptBudgetList.goodsName!='大豆'){
+            this.$message({
+              message: '复检容重(克/升)非数字!',
+              type: 'warning',
+            })
+            return
+          }else{
+              this.$message({
+              message: '复检蛋白非数字!',
+              type: 'warning',
+            })
+            return
+          }
         }
         if (
           (this.deptBudgetList.reBulkDensity &&
@@ -1822,11 +1831,20 @@ export default {
           this.deptBudgetList.reBulkDensity > 1000 ||
           this.deptBudgetList.reBulkDensity < 0
         ) {
-          this.$message({
-            message: '复检容重输入错误',
-            type: 'warning',
-          })
-          return
+          if(this.deptBudgetList.goodsName!='大豆'){
+            this.$message({
+              message: '复检容重输入错误',
+              type: 'warning',
+            })
+            return
+            }else{
+              this.$message({
+                message: '复检蛋白输入错误',
+                type: 'warning',
+              })
+              return
+            }
+          
         }
       }
       this.$confirm('确定初检信息后,初检员不需要再次确认质检信息,是否确认提交', '提示', {
@@ -2237,18 +2255,36 @@ export default {
           this.deptBudgetList.warehouseInOutDetail.bulkDensity =
             this.deptBudgetList.bulkDensity
           if (!this.deptBudgetList.bulkDensity) {
-            this.$message({
-              message: '请输入容重!',
-              type: 'warning',
-            })
-            return
+            if(this.deptBudgetList.goodsName!='大豆'){
+              this.$message({
+                message: '请输入容重!',
+                type: 'warning',
+              })
+              return
+            }else{
+              this.$message({
+                message: '请输入蛋白!',
+                type: 'warning',
+              })
+              return
+            }
+            
           }
           if (isNaN(this.deptBudgetList.bulkDensity)) {
-            this.$message({
+            if(this.deptBudgetList.goodsName!='大豆'){
+              this.$message({
               message: '容重(克/升)非数字!',
               type: 'warning',
             })
             return
+            }else{
+              this.$message({
+              message: '蛋白非数字!',
+              type: 'warning',
+            })
+            return
+            }
+            
           }
           if (
             (this.deptBudgetList.bulkDensity &&
@@ -2259,11 +2295,20 @@ export default {
             this.deptBudgetList.bulkDensity > 1000 ||
             this.deptBudgetList.bulkDensity < 0
           ) {
-            this.$message({
+            
+            if(this.deptBudgetList.goodsName!='大豆'){
+              this.$message({
               message: '容重输入错误',
               type: 'warning',
             })
             return
+            }else{
+              this.$message({
+              message: '蛋白输入错误',
+              type: 'warning',
+            })
+            return
+            }
           }
 
         }
@@ -2413,11 +2458,20 @@ export default {
         this.deptBudgetList.warehouseInOutDetail.reBulkDensity = this.deptBudgetList.reBulkDensity
         if (this.deptBudgetList.reBulkDensity) {
           if (isNaN(this.deptBudgetList.reBulkDensity)) {
-            this.$message({
-              message: '复检容重(克/升)非数字!',
-              type: 'warning',
-            })
-            return
+            
+            if(this.deptBudgetList.goodsName!='大豆'){
+              this.$message({
+                message: '复检容重(克/升)非数字!',
+                type: 'warning',
+              })
+              return
+            }else{
+              this.$message({
+                message: '复检蛋白非数字!',
+                type: 'warning',
+              })
+              return
+            }
           }
           if (
             (this.deptBudgetList.reBulkDensity &&
@@ -2434,11 +2488,19 @@ export default {
             this.deptBudgetList.reBulkDensity > 1000 ||
             this.deptBudgetList.reBulkDensity < 0
           ) {
+            if(this.deptBudgetList.goodsName!='大豆'){
             this.$message({
               message: '复检容重输入错误',
               type: 'warning',
             })
             return
+            }else{
+              this.$message({
+                message: '复检蛋白输入错误',
+                type: 'warning',
+              })
+              return
+            }
           }
         }
 

+ 27 - 9
src/views/outboundManagement/newQualityInspectionManagement.vue

@@ -155,8 +155,8 @@
               <el-input v-model="inspect.mildewGrain" placeholder="请输入霉变粒占比" maxlength="10" size="small" type="number"
                 :disabled="disabled" />
             </ws-form-item>
-            <ws-form-item label="容重(克/升)" prop="bulkDensity">
-              <el-input v-model="inspect.bulkDensity" placeholder="请输入容重" maxlength="10" size="small" type="number"
+            <ws-form-item :label="inspect.goodsName!='大豆'?'容重(克/升)':'蛋白'" prop="bulkDensity">
+              <el-input v-model="inspect.bulkDensity" :placeholder="inspect.goodsName!='大豆'?'请输入容重':'请输入蛋白'" maxlength="10" size="small" type="number"
                 :disabled="disabled" />
             </ws-form-item>
             <ws-form-item label="热损伤(%)" prop="jiaorenli">
@@ -661,20 +661,38 @@
         //   return
         // }
         if (this.inspect.bulkDensity && this.inspect.bulkDensity < 500 || this.inspect.bulkDensity > 1000) {
-          this.$message({
-            message: '容重输入错误',
-            type: 'warning',
-          })
-          return
+          if(this.inspect.goodsName!='大豆'){
+            this.$message({
+              message: '容重输入错误',
+              type: 'warning',
+            })
+            return
+          }else{
+            this.$message({
+              message: '蛋白输入错误',
+              type: 'warning',
+            })
+            return
+          }
+          
         }
         if (this.inspect.bulkDensity && String(this.inspect.bulkDensity).indexOf('.') != -1 && String(this.inspect
             .bulkDensity).length - (String(
             this.inspect.bulkDensity).indexOf('.') + 1) > 0) {
-          this.$message({
-            message: '容重需输入整数',
+          if(this.inspect.goodsName!='大豆'){
+            this.$message({
+              message: '容重需输入整数',
+              type: 'warning',
+            })
+            return
+          }else{
+            this.$message({
+            message: '蛋白需输入整数',
             type: 'warning',
           })
           return
+          }
+          
         }
         // if (!this.inspect.jiaorenli) {
         //   this.$message({