Преглед изворни кода

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

mxx пре 3 година
родитељ
комит
489bb64dc1

+ 15 - 5
public/static/inspection.html

@@ -153,7 +153,8 @@
             <td class="col">{{tableData.waterContent}}</td>
             <td class="col col-bgc">热损伤(%)</td>
             <td class="col">{{tableData.jiaorenli}}</td>
-            <td class="col col-bgc">单价(元/公斤)</td>
+            <td v-if="tableData.confirm == '1'" class="col col-bgc">单价(元/公斤)</td>
+            <td v-else class="col col-bgc">待定单价(元/公斤)</td>
             <td class="col">{{tableData.tidalGrainPrice}}</td>
           </tr>
           <tr class="row">
@@ -161,8 +162,12 @@
             <td class="col">{{tableData.impurity}}</td>
             <td class="col col-bgc">霉变粒(%)</td>
             <td class="col">{{tableData.mildewGrain}}</td>
-            <td class="col col-bgc" colspan="2">购粮性质</td>
-            <td class="col" colspan="2">{{tableData.natureOfGrainPurchase}}</td>
+            <td v-if="tableData.paramType == '1'"  class="col col-bgc">扣杂</td>
+            <td v-if="tableData.paramType == '1'"  class="col">{{tableData.buckleMiscellaneous}}</td>
+            <td v-if="tableData.paramType == '1'" class="col col-bgc" colspan="1">购粮性质</td>
+            <td v-else class="col col-bgc" colspan="2">购粮性质</td>
+            <td v-if="tableData.paramType == '1'" class="col" colspan="1">{{ tableData.natureOfGrainPurchase }}</td>
+            <td v-else class="col" colspan="2">{{ tableData.natureOfGrainPurchase }}</td>
           </tr>
         </table>
         <div class="bottom">
@@ -241,7 +246,8 @@
           <div>{{tableData.jiaorenli}}</div>
         </div>
         <div class="small-row">
-          <div>单价(元/公斤)</div>
+          <div v-if="tableData.confirm == '1'">单价(元/公斤)</div>
+          <div v-else>待定单价(元/公斤)</div>
           <div>{{tableData.tidalGrainPrice}}</div>
         </div>
         <div class="small-row">
@@ -249,9 +255,13 @@
           <div>{{tableData.impurity}}</div>
         </div>
         <div class="small-row">
-          <div>>霉变粒(%)</div>
+          <div>霉变粒(%)</div>
           <div>{{tableData.mildewGrain}}</div>
         </div>
+        <div v-if="tableData.paramType == '1'" class="small-row">
+          <div>扣杂</div>
+          <div>{{tableData.buckleMiscellaneous}}</div>
+        </div>
         <div class="small-row">
           <div>购粮性质</div>
           <div>{{tableData.natureOfGrainPurchase}}</div>

+ 2 - 1
src/views/houseSelfCollect/acquisitionManagementAdd.vue

@@ -381,7 +381,8 @@
     },
     mounted() {},
     methods: {
-      paramTypeChange(){
+      paramTypeChange(e){
+        console.log(e)
         // this.makeTableList()
       },
       // 查看/编辑获取数据

+ 8 - 3
src/views/houseSelfCollect/component/inspectInfoPrint.vue

@@ -36,7 +36,8 @@
         <td class="col">{{ printData.waterContent }}</td>
         <td class="col col-bgc">热损伤(%)</td>
         <td class="col">{{ printData.jiaorenli }}</td>
-        <td class="col col-bgc">单价(元/公斤)</td>
+        <td v-if="printData.confirm == '1'" class="col col-bgc">单价(元/公斤)</td>
+        <td v-else class="col col-bgc">待定单价(元/公斤)</td>
         <td v-if="printData.type == '潮粮'" class="col">{{ printData.tidalGrainPrice }}</td>
         <td v-else class="col">{{ printData.dryGrainPrice }}</td>
       </tr>
@@ -45,8 +46,12 @@
         <td class="col">{{ printData.impurity }}</td>
         <td class="col col-bgc">霉变粒(%)</td>
         <td class="col">{{ printData.mildewGrain }}</td>
-        <td class="col col-bgc" colspan="2">购粮性质</td>
-        <td class="col" colspan="2">{{ printData.natureOfGrainPurchase }}</td>
+        <td v-if="printData.paramType == '1'"  class="col col-bgc">扣杂</td>
+        <td v-if="printData.paramType == '1'"  class="col">{{printData.buckleMiscellaneous}}</td>
+        <td v-if="printData.paramType == '1'" class="col col-bgc" colspan="1">购粮性质</td>
+        <td v-else class="col col-bgc" colspan="2">购粮性质</td>
+        <td v-if="printData.paramType == '1'" class="col" colspan="1">{{ printData.natureOfGrainPurchase }}</td>
+        <td v-else class="col" colspan="2">{{ printData.natureOfGrainPurchase }}</td>
       </tr>
     </table>
     <div class="bottom">

+ 53 - 50
src/views/houseSelfCollect/inspectInfo.vue

@@ -3,7 +3,7 @@
   <div class="center">
     <el-row>
       <el-col :span="12">
-        <h2 class="bg-left titleup">{{ information }}质检信息</h2>
+        <h2 class="bg-left titleup">{{ information }}信息</h2>
       </el-col>
       <el-col :span="12" class="bg-right">
         <el-button class="bg-bottom" type="primary" size="small" @click="cancel"><img width="6" height="10"
@@ -54,9 +54,9 @@
                 :disabled="disabled" />
             </ws-form-item>
             <ws-form-item v-else label="扣杂" span="1" prop="buckleWeightRatio">
-              <ws-input type="number" @mousewheel.native.prevent v-model="inspect.buckleMiscellaneous" placeholder="请输入扣杂" maxlength="100" size="small"
+              <ws-input type="number" style="padding-right:30px" @mousewheel.native.prevent v-model="inspect.buckleMiscellaneous" @input="waterContentChange" placeholder="请输入扣杂" maxlength="100" size="small"
                 :disabled="disabled" />
-                <ws-input v-if='types==4' type="number" @mousewheel.native.prevent v-model="inspect.reBuckleMiscellaneous" placeholder="请输入扣杂" maxlength="100" size="small"
+                <ws-input v-if='types==4' type="number"  @mousewheel.native.prevent v-model="inspect.reBuckleMiscellaneous" placeholder="请输入扣杂" maxlength="100" size="small"
                 />
                 <ws-input v-else type="number" @mousewheel.native.prevent v-model="inspect.reBuckleMiscellaneous" placeholder="未复检" maxlength="100" size="small"
                 disabled />
@@ -92,7 +92,8 @@
                 :disabled="disabled" />
             </ws-form-item>
             <ws-form-item label="水分(%)" span="1" prop="waterContent">
-              <ws-input type="number" @mousewheel.native.prevent v-model="inspect.waterContent" placeholder="请输入水分占比" maxlength="100" size="small"
+
+              <ws-input type="number" @mousewheel.native.prevent style="padding-right:30px" v-model="inspect.waterContent" placeholder="请输入水分占比" maxlength="100" size="small"
                 @change="waterContentChange('water')" :disabled="disabled" />
                 <ws-input v-if='types==4' type="number" @mousewheel.native.prevent v-model="inspect.reWaterContent" placeholder="请输入水分占比" maxlength="100" size="small"
                 />
@@ -118,8 +119,8 @@
           </ws-info-table>
           <div class="but">
             <el-button @click="cancel" v-if="this.types != 2" type="primary">取消</el-button>
-              <el-button @click="print" v-if="this.types ==3 || this.types ==4 ||this.types ==1" type="primary">保存</el-button>
-            <el-button @click="print" v-if="this.types ==5 " type="primary">保存并打印</el-button>
+            <el-button @click="print" v-if="this.types ==3 || this.types ==4 ||this.types ==1" type="primary">保存</el-button>
+            <el-button @click="print" v-if="this.types ==5 " type="primary">确认并打印</el-button>
             <el-button @click="cancel" v-if="this.types == 2" type="primary">关闭</el-button>
           </div>
         </div>
@@ -167,14 +168,14 @@
           tidalGrainPrice: 0,
           buckleWeightRatio: 0,
           natureOfGrainPurchase:'贸易粮',
-          BuckleMiscellaneous:0,
+          buckleMiscellaneous:0,
           paramType:1,
           type:'潮粮'
         },
         disabled: false,
         disabled1: false,
         types: '1',
-        information: '添加',
+        information: '添加初检',
         goodNameList: [],
         gradeList: [],
         customerList: [],
@@ -197,7 +198,7 @@
       this.types = this.$route.query.type
       if(!this.types){
           this.types = 1
-           this.information = '添加'
+           this.information = '添加初检'
            this.disabled = false
            this.inspect = {
           tidalGrainPrice: 0,
@@ -210,24 +211,24 @@
       this.warehouseName = this.$route.query.warehouseName
       this.cangNo = this.$route.query.warehouseNo
       this.count = Number(this.$route.query.count) + 1
-      this.purchasePriceList = this.$route.query.purchasePriceList
+      // this.purchasePriceList = this.$route.query.purchasePriceList
       this.id = this.$route.query.id
       if (this.types == 2) {
         this.disabled = true
         this.disabled1 = true
-        this.information = '查看'
+        this.information = '查看质检'
       } else if (this.types == 3) {
         this.disabled = false
         this.disabled1 = true
-        this.information = '编辑'
+        this.information = '编辑初检'
       }else if (this.types == 4) {
         this.disabled = true
         this.disabled1 = true
-        this.information = '编辑'
+        this.information = '编辑复检'
       }else if (this.types == 5) {
         this.disabled = false
         this.disabled1 = true
-        this.information = '编辑'
+        this.information = '确认质检'
       }
       else{
         this.disabled1 = false
@@ -367,27 +368,29 @@
           })
           return
         }
-        if (
-          this.inspect.buckleWeightRatio < 0 ||
-          this.inspect.buckleWeightRatio > 2
-        ) {
-          this.$message({
-            message: '扣重比输入错误',
-            type: 'warning',
-          })
-          return
-        }
-        if (
-          String(this.inspect.buckleWeightRatio).indexOf('.') != -1 &&
-          String(this.inspect.buckleWeightRatio).length -
-            (String(this.inspect.buckleWeightRatio).indexOf('.') + 1) >
-            2
-        ) {
-          this.$message({
-            message: '扣重比输入错误',
-            type: 'warning',
-          })
-          return
+        if(this.inspect.paramType == '2'){
+          if (
+            this.inspect.buckleWeightRatio < 0 ||
+            this.inspect.buckleWeightRatio > 2
+          ) {
+            this.$message({
+              message: '扣重比输入错误',
+              type: 'warning',
+            })
+            return
+          }
+          if (
+            String(this.inspect.buckleWeightRatio).indexOf('.') != -1 &&
+            String(this.inspect.buckleWeightRatio).length -
+              (String(this.inspect.buckleWeightRatio).indexOf('.') + 1) >
+              2
+          ) {
+            this.$message({
+              message: '扣重比输入错误',
+              type: 'warning',
+            })
+            return
+          }
         }
         if (!this.inspect.type) {
           this.$message({
@@ -593,7 +596,7 @@
             })
         } else if (this.types == 3) {
           this.inspect.flag=0
-          this.$confirm('确定保存检信息?', '提示', {
+          this.$confirm('确定保存检信息?', '提示', {
               confirmButtonText: '确定',
               cancelButtonText: '取消',
               type: 'warning',
@@ -614,7 +617,7 @@
         else if (this.types == 4) {
           this.inspect.flag=1
           this.inspect.reInspector=sessionStorage.getItem('ws-pf_roleName') + sessionStorage.getItem('ws-pf_staffName')
-          this.$confirm('确定保存检信息?', '提示', {
+          this.$confirm('确定保存检信息?', '提示', {
               confirmButtonText: '确定',
               cancelButtonText: '取消',
               type: 'warning',
@@ -704,24 +707,20 @@
         }
       },
 
-      // waterContentChange() {
-      //   debugger
-      //   if (this.inspect.goodsName) {
       waterContentChange(type) {
         if (this.inspect.goodsName&&type!='water') {
+          getDryGrainPrice({warehouseId:this.cangid,goodsName:this.inspect.goodsName})
+          .toPromise()
+          .then((response) => { 
+            this.$set(this.inspect,'dryGrainPrice',response)
+          })
           for (var i = 0; i < this.purchasePriceList.length; i++) {
             if (this.purchasePriceList[i].goodsName == this.inspect.goodsName) {
-              this.$set(this.inspect,'paramType',this.purchasePriceList[i].paramType)
               this.$set(this.inspect,'buckleWeightRatio',this.purchasePriceList[i].deductWeight)
+              this.$set(this.inspect,'paramType',this.purchasePriceList[i].paramType)
+              
             }
           }
-          if(this.inspect.type == '干粮'){
-             getDryGrainPrice({warehouseId:this.cangid,goodsName:this.inspect.goodsName})
-                .toPromise()
-                .then((response) => { 
-                  this.$set(this.inspect,'dryGrainPrice',response)
-                })
-          }
         }
         //潮粮单价改变事件
         if (
@@ -737,8 +736,11 @@
             })
             .toPromise()
             .then((response) => {
-              this.inspect.tidalGrainPrice = response
-              this.unitPrice = response
+              if(this.inspect.paramType == '1'){
+                this.inspect.tidalGrainPrice = parseFloat(parseFloat(response) - parseFloat(this.inspect.buckleMiscellaneous)/100*parseFloat(this.inspect.dryGrainPrice)).toFixed(4)
+              }else{
+                this.inspect.tidalGrainPrice = response
+              }
             })
         }
         if(this.inspect.goodsName && this.inspect.customerName ){
@@ -786,6 +788,7 @@
           .then((response) => {
             this.goodNameList = []
             this.goodNameList = response
+            this.purchasePriceList = response
           })
         // 品级
         packList({

+ 16 - 13
src/views/houseSelfCollect/inspectionManagement.vue

@@ -66,7 +66,17 @@
       <el-table-column prop="customerName" label="客户"></el-table-column>
       <el-table-column prop="carNumber" label="车牌号"></el-table-column>
       <el-table-column prop="goodsName" label="货名"></el-table-column>
-      <el-table-column prop="waterContent" label="水分(%)"></el-table-column>
+      <el-table-column prop="waterContent" label="水分(%)">
+        <template scope="scope">
+          <span>{{scope.row.waterContent}} | {{scope.row.reWaterContent ? scope.row.reWaterContent : '未复检' }}</span>
+        </template>
+      </el-table-column>
+       <el-table-column prop="buckleMiscellaneous" label="扣杂">
+         <template scope="scope">
+           <div v-if="scope.row.paramType == 1"> <span>{{scope.row.buckleMiscellaneous}} | {{scope.row.reBuckleMiscellaneous ? scope.row.reBuckleMiscellaneous : '未复检'}}</span></div>
+         <!-- <div v-else>{{scope.row.reBuckleMiscellaneous}}</div> -->
+        </template>
+       </el-table-column>
        <el-table-column prop="type" label="类型"></el-table-column>
       <el-table-column
         prop="tidalGrainPrice"
@@ -96,13 +106,13 @@
         <template slot-scope="scope">
           <el-button @click="inspectInfo(scope.row, 2)" v-hasPermission="`acquisitionManagement.acquisitionQuality.view`">查看</el-button>
           
-          <el-button @click="inspectInfo(scope.row, 3)" v-if="scope.row.status=='已初检'" v-hasPermission="`acquisitionManagement.acquisitionQuality.initial`">初检</el-button>
-           <el-button @click="inspectInfo(scope.row, 5)" v-if="scope.row.confirm!='1'" v-hasPermission="`acquisitionManagement.acquisitionQuality.con`">确认</el-button>
+          <el-button @click="inspectInfo(scope.row, 3)" v-if="scope.row.status=='已初检'&& scope.row.confirm!='1'" v-hasPermission="`acquisitionManagement.acquisitionQuality.initial`">初检</el-button>
+           <el-button @click="inspectInfo(scope.row, 5)" v-if="scope.row.confirm!='1' && scope.row.status=='已复检'" v-hasPermission="`acquisitionManagement.acquisitionQuality.con`">确认</el-button>
            <el-button @click="inspectInfo(scope.row, 4)" v-if="scope.row.confirm!='1'" v-hasPermission="`acquisitionManagement.acquisitionQuality.again`">复检</el-button>
             <!-- <el-button @click="inspectInfo(scope.row, 3)" v-if="scope.row.status=='已初检'" v-hasPermission="`acquisitionManagement.acquisitionQuality.edit`">初检</el-button>
             <el-button @click="inspectInfo(scope.row, 5)" v-if="scope.row.confirm!='1'" v-hasPermission="`acquisitionManagement.acquisitionQuality.edit`">确认</el-button>
             <el-button @click="inspectInfo(scope.row, 4)" v-if="scope.row.status!='1'" v-hasPermission="`acquisitionManagement.acquisitionQuality.edit`">复检</el-button> -->
-          <el-button @click="del(scope.row)" v-if="scope.row.weighingManagement.status=='已质检'" type="danger" v-hasPermission="`acquisitionManagement.acquisitionQuality.delete`">删除</el-button>
+          <el-button @click="del(scope.row)" v-if="!scope.row.weighingManagement || scope.row.weighingManagement.status=='已质检'" type="danger" v-hasPermission="`acquisitionManagement.acquisitionQuality.delete`">删除</el-button>
           <el-button @click="print(scope.row)" v-hasPermission="`acquisitionManagement.acquisitionQuality.print`">打印</el-button>
         </template>
       </el-table-column>
@@ -166,9 +176,7 @@ export default {
       isShowPrint: false,
       printData: {},
       deductWeight:'',//扣重比
-      saleLimit:'',
-      purchasePriceList:[]
-
+      saleLimit:''
     }
   },
   activated() {
@@ -203,8 +211,7 @@ export default {
           id: row.id,
           warehouseName: this.warehouseName,
           count: this.warehouseCount,
-          warehouseNo: this.warehouseNo,
-          purchasePriceList:this.purchasePriceList
+          warehouseNo: this.warehouseNo
         },
       })
     },
@@ -216,7 +223,6 @@ export default {
           this.warehouseNo = this.warehouseList[i].No
           this.cangid = this.warehouseList[i].id
           this.WAREHOUSE[1].payname = this.warehouseList[i].value
-          this.purchasePriceList = this.warehouseList[i].purchasePriceList
         }
       }
       this.getList()
@@ -270,14 +276,12 @@ export default {
               value: response[i].warehouseName,
               id: response[i].id,
               count: response[i].count,
-              purchasePriceList: response[i].purchasePriceList,
               No:response[i].commonWarehouseNo
             })
             if (this.cangid&&this.cangid == response[i].id) {
               this.warehouseName = response[i].warehouseName
               this.warehouseCount =  response[i].count
               this.warehouseNo =  response[i].commonWarehouseNo
-              this.purchasePriceList =  response[i].purchasePriceList
             } 
           }
           if(this.warehouseList.length > 0 && !this.cangid){
@@ -285,7 +289,6 @@ export default {
             this.warehouseCount =  this.warehouseList[0].count
             this.warehouseNo =  this.warehouseList[0].No
             this.cangid =  this.warehouseList[0].id
-            this.purchasePriceList =  this.warehouseList[0].purchasePriceList
             this.WAREHOUSE[1].payname = this.warehouseList[0].value
           }
           this.getList()

+ 4 - 4
src/views/houseSelfCollect/settlement.vue

@@ -163,10 +163,10 @@
             <ws-form-item v-if='paymentList.type=="潮粮" && paymentList.qualityInspectionManagement.paramType == "1"' label="扣重" span="1" prop="waterContent">
               <ws-input type="number" @mousewheel.native.prevent v-model="paymentList.qualityInspectionManagement.weightDeduction" placeholder="请输入扣重" maxlength="100" size="small" disabled/>
             </ws-form-item>
-            <ws-form-item v-if='paymentList.type=="潮粮"' label="掉水(%)" span="1" prop="waterContent">
+            <ws-form-item v-if='paymentList.type=="潮粮" && paymentList.qualityInspectionManagement.paramType != 1' label="掉水(%)" span="1" prop="waterContent" >
               <ws-input type="number" @mousewheel.native.prevent v-model="paymentList.qualityInspectionManagement.waterContent-paymentList.qualityInspectionManagement.waterMin" placeholder="请输入掉水" maxlength="100" size="small" disabled/>
             </ws-form-item>
-            <ws-form-item v-if='paymentList.type=="潮粮"' label="基数" span="1" prop="waterContent">
+            <ws-form-item v-if='paymentList.type=="潮粮" && paymentList.qualityInspectionManagement.paramType != 1' label="基数" span="1" prop="waterContent">
               <ws-input type="number" @mousewheel.native.prevent v-model="paymentList.base" placeholder="请输入基数" maxlength="100" size="small" disabled/>
             </ws-form-item>
             <ws-form-item v-if='paymentList.type=="潮粮"' label="毛重(公斤)" span="1" prop="waterContent">
@@ -191,7 +191,7 @@
               disabled
               />
             </ws-form-item>
-            <ws-form-item v-if='paymentList.type=="潮粮"' label="扣杂(公斤)" span="1" prop="waterContent">
+            <ws-form-item v-if='paymentList.type=="潮粮"' label="扣杂" span="1" prop="waterContent">
               <ws-input type="number" @mousewheel.native.prevent v-model="paymentList.qualityInspectionManagement.buckleMiscellaneous" placeholder="请输入扣杂" maxlength="100" size="small" disabled/>
             </ws-form-item>
             <ws-form-item  label="扣单价(元/公斤)" span="1" prop="unitDeduction">
@@ -624,7 +624,7 @@ export default {
           return chineseStr;
         },
     print() {
-      if(this.paymentList.type == '潮粮'){
+      if(this.paymentList.type == '潮粮' && this.paymentList.qualityInspectionManagement.paramType != 1){
         if (!this.paymentList.buckleWeightRatio) {
           this.$message({
             message: '扣重比不能为空',

+ 1 - 0
src/views/statisticalReport/autoSettlementList.vue

@@ -1252,6 +1252,7 @@ export default {
     },
     //列表
     getList() {
+      console.log(this.contractNo,"this.contractNo值")
       autoList({
         compId: sessionStorage.getItem('ws-pf_compId'),
         currentPage: this.currentPage,

+ 1 - 6
vue.config.js

@@ -141,12 +141,7 @@ module.exports = {
         // target: 'https://product-server.winsea.com/', //目标地址
         // target: 'http://standard-dev.winsea.com/', //目标地址
         // target: 'http://localhost:8090/',
-        target: 'http://192.168.1.101:8090/',
-        // target: 'http://192.168.1.115:8090/',
-        // target: 'http://192.168.1.122:8090/',
-        // target: 'http://192.168.1.115:8090/',
-        // target: 'http://192.168.1.122:9100/',
-        // target: 'http://192.168.1.121:8090/',
+        target: 'http://192.168.1.122:8090/',
         // target: 'http://192.168.1.119:8090/',
         // target: 'http://192.168.24.5:8098',//目标地址
         // target: 'http://product-server.winsea.com/',