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

Merge branch 'master' of http://47.100.3.209:3000/gdc/yiliangyiyun-pc

ccjgmwz пре 3 година
родитељ
комит
2f3b1e627c

+ 141 - 85
src/views/houseSelfCollect/inspectInfo.vue

@@ -48,13 +48,18 @@
                   :value="item.goodsName" />
               </ws-select>
             </ws-form-item>
-            <ws-form-item v-if="inspect.paramType != '1'" label="扣重比" span="1" prop="buckleWeightRatio">
+            
+             <ws-form-item v-if="inspect.paramType != '1'" label="扣重比" span="1" prop="buckleWeightRatio">
               <ws-input type="number" @mousewheel.native.prevent v-model="inspect.buckleWeightRatio" placeholder="请输入扣重比" maxlength="100" size="small"
                 :disabled="disabled" />
             </ws-form-item>
-            <ws-form-item v-else label="扣杂" span="1" prop="buckleMiscellaneous">
-              <ws-input type="number" @mousewheel.native.prevent v-model="inspect.buckleMiscellaneous" @input="waterContentChange" placeholder="请输入扣杂" maxlength="100" size="small"
+            <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"
+                :disabled="disabled" />
+                <ws-input v-if='types==4||inspect.reBuckleMiscellaneous!=null' type="number" @mousewheel.native.prevent v-model="inspect.reBuckleMiscellaneous" placeholder="请输入扣杂" maxlength="100" size="small"
                 :disabled="disabled" />
+                <ws-input v-else type="number" @mousewheel.native.prevent v-model="inspect.reBuckleMiscellaneous" placeholder="未复检" maxlength="100" size="small"
+                disabled />
             </ws-form-item>
             <ws-form-item label="类型" span="1" prop="type">
               <ws-select v-model="inspect.type" :disabled="disabled" @change="typeChange">
@@ -89,6 +94,10 @@
             <ws-form-item label="水分(%)" span="1" prop="waterContent">
               <ws-input type="number" @mousewheel.native.prevent v-model="inspect.waterContent" placeholder="请输入水分占比" maxlength="100" size="small"
                 @change="waterContentChange('water')" :disabled="disabled" />
+                <ws-input v-if='types==4||inspect.reWaterContent!=null' type="number" @mousewheel.native.prevent v-model="inspect.reWaterContent" placeholder="请输入水分占比" maxlength="100" size="small"
+                :disabled="disabled" />
+                <ws-input v-else type="number" @mousewheel.native.prevent v-model="inspect.reWaterContent" placeholder="未复检" maxlength="100" size="small"
+                disabled />
             </ws-form-item>
             <ws-form-item label="霉变粒(%)" span="1" prop="mildewGrain">
               <ws-input type="number" @mousewheel.native.prevent v-model="inspect.mildewGrain" placeholder="请输入霉变粒占比" maxlength="100" size="small"
@@ -109,7 +118,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 != 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="cancel" v-if="this.types == 2" type="primary">关闭</el-button>
           </div>
         </div>
@@ -156,10 +166,10 @@
         inspect: {
           tidalGrainPrice: 0,
           buckleWeightRatio: 0,
-          buckleMiscellaneous:0,
           natureOfGrainPurchase:'贸易粮',
-          type:'潮粮',
-          paramType:'1'
+          BuckleMiscellaneous:0,
+          paramType:1,
+          type:'潮粮'
         },
         disabled: false,
         disabled1: false,
@@ -193,7 +203,6 @@
           tidalGrainPrice: 0,
           buckleWeightRatio: 0,
           natureOfGrainPurchase:'贸易粮',
-          buckleMiscellaneous:0,
           type:'潮粮'
         }
       }
@@ -201,7 +210,7 @@
       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
@@ -211,6 +220,14 @@
         this.disabled = false
         this.disabled1 = true
         this.information = '编辑'
+      }else if (this.types == 4) {
+        this.disabled = false
+        this.disabled1 = true
+        this.information = '编辑'
+      }else if (this.types == 5) {
+        this.disabled = false
+        this.disabled1 = true
+        this.information = '编辑'
       }
       else{
         this.disabled1 = false
@@ -259,18 +276,25 @@
             }).then((response) => {
               //编辑接口
               this.inspect.pictureAddress = response.data.url
+              console.log(this.types)
+              if(this.types==3){
+                this.inspect.flag=0
+              }else if(this.types==4){
+                this.inspect.flag=1
+              }
                getinspectEdit(this.inspect)
                 .toPromise()
-                .then((response) => {
+                .then((response) => { 
+                  this.types = ''
+        // this.inspect = [] 
+        this.isShowPrint = false
+        this.$router.push({path:'inspectionManagement'})
                 })
             })
             this.dialogTableVisible = true;
           }
         })
-        this.types = ''
-        // this.inspect = [] 
-        this.isShowPrint = false
-        this.$router.push({path:'inspectionManagement'})
+       
       },
       typeChange(){
         if(this.inspect.type == '干粮' && this.inspect.goodsName){
@@ -282,10 +306,8 @@
         }
       },
       closePrint(){
-           this.types = ''
         // this.inspect = [] 
         this.isShowPrint = false
-        this.$router.push({path:'inspectionManagement'})
       },
       print() {
         if (!this.inspect.qualityNo) {
@@ -345,31 +367,28 @@
           })
           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.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({
             message: '类型不能为空',
@@ -573,6 +592,48 @@
               return false
             })
         } else if (this.types == 3) {
+          this.inspect.flag=0
+          this.$confirm('确定保存质检信息?', '提示', {
+              confirmButtonText: '确定',
+              cancelButtonText: '取消',
+              type: 'warning',
+            })
+            .then(() => {
+              // return
+               getinspectEdit(this.inspect)
+                .toPromise()
+                .then((response) => {
+                  this.$message.success('修改成功')
+                  this.$router.push({path:'inspectionManagement'})
+                })
+            })
+            .catch(() => {
+              return false
+            })
+        }
+        else if (this.types == 4) {
+          this.inspect.flag=1
+          this.inspect.reInspector=sessionStorage.getItem('ws-pf_roleName') + sessionStorage.getItem('ws-pf_staffName')
+          this.$confirm('确定保存质检信息?', '提示', {
+              confirmButtonText: '确定',
+              cancelButtonText: '取消',
+              type: 'warning',
+            })
+            .then(() => {
+              // return
+              getinspectEdit(this.inspect)
+                .toPromise()
+                .then((response) => {
+                  this.$message.success('修改成功')
+                  this.$router.push({path:'inspectionManagement'})
+                })
+            })
+            .catch(() => {
+              return false
+            })
+        }else if (this.types == 5) {
+          this.inspect.flag=2
+          this.inspect.reInspector=sessionStorage.getItem('ws-pf_roleName') + sessionStorage.getItem('ws-pf_staffName')
           this.$confirm('确定保存质检信息?', '提示', {
               confirmButtonText: '确定',
               cancelButtonText: '取消',
@@ -598,6 +659,7 @@
               return false
             })
         }
+
       },
       cancel() {
         this.types = ''
@@ -646,21 +708,20 @@
       //   debugger
       //   if (this.inspect.goodsName) {
       waterContentChange(type) {
-        var that = this
         if (this.inspect.goodsName&&type!='water') {
-          getDryGrainPrice({warehouseId:this.cangid,goodsName:this.inspect.goodsName})
-          .toPromise()
-          .then((response) => { 
-            that.$set(that.inspect,'dryGrainPrice',response)
-            
-          })
           for (var i = 0; i < this.purchasePriceList.length; i++) {
             if (this.purchasePriceList[i].goodsName == this.inspect.goodsName) {
-              this.$set(this.inspect,'buckleWeightRatio',this.purchasePriceList[i].deductWeight)
               this.$set(this.inspect,'paramType',this.purchasePriceList[i].paramType)
-              
+              this.$set(this.inspect,'buckleWeightRatio',this.purchasePriceList[i].deductWeight)
             }
           }
+          if(this.inspect.type == '干粮'){
+             getDryGrainPrice({warehouseId:this.cangid,goodsName:this.inspect.goodsName})
+                .toPromise()
+                .then((response) => { 
+                  this.$set(this.inspect,'dryGrainPrice',response)
+                })
+          }
         }
         //潮粮单价改变事件
         if (
@@ -676,47 +737,43 @@
             })
             .toPromise()
             .then((response) => {
-              if(that.inspect.paramType == '1'){
-                that.inspect.tidalGrainPrice = parseFloat(parseFloat(response) - parseFloat(that.inspect.buckleMiscellaneous)/100*parseFloat(that.inspect.dryGrainPrice)).toFixed(4)
-              }else{
-                that.inspect.tidalGrainPrice = response
-              }
-              that.unitPrice = response
+              this.inspect.tidalGrainPrice = response
+              this.unitPrice = response
             })
         }
         if(this.inspect.goodsName && this.inspect.customerName ){
              // //查看当前用户对应货名有未结算状态的送货
-          let count = 0
-          if (
-            this.inspect.goodsName &&
-            this.inspect.customerName 
-          ) {
-            getCount({
-            compId: sessionStorage.getItem('ws-pf_compId'),
-            customerName: this.inspect.customerName,
-            goodsName: this.inspect.goodsName,
-          })  .toPromise()
-            .then((response) => {
-                count = response
-            })
-          //  货名下拉校验
-          getamount({
-            compId: sessionStorage.getItem('ws-pf_compId'),
-            customerName: this.inspect.customerName,
-            goodsName: this.inspect.goodsName,
+       let count = 0
+        if (
+          this.inspect.goodsName &&
+          this.inspect.customerName 
+        ) {
+          getCount({
+          compId: sessionStorage.getItem('ws-pf_compId'),
+          customerName: this.inspect.customerName,
+          goodsName: this.inspect.goodsName,
+        })  .toPromise()
+          .then((response) => {
+               count = response
           })
-            .toPromise()
-            .then((response) => {
-              for (let i = 0; i < this.purchasePriceList.length; i++) {
-                if (this.inspect.goodsName == this.purchasePriceList[i].goodsName) {
-                  if ((this.purchasePriceList[i].saleLimit - response/1000 < 50 || count > 0 )&&this.tipFlag) {
-                    this.tipFlag = false
-                    this.$message('当前客户已累计销售我司' +this.inspect.goodsName + (response/1000).toFixed(2) +'吨,最高可售' +this.purchasePriceList[i].saleLimit +'吨。');
-                  }
+        //  货名下拉校验
+        getamount({
+          compId: sessionStorage.getItem('ws-pf_compId'),
+          customerName: this.inspect.customerName,
+          goodsName: this.inspect.goodsName,
+        })
+          .toPromise()
+          .then((response) => {
+            for (let i = 0; i < this.purchasePriceList.length; i++) {
+              if (this.inspect.goodsName == this.purchasePriceList[i].goodsName) {
+                if ((this.purchasePriceList[i].saleLimit - response/1000 < 50 || count > 0 )&&this.tipFlag) {
+                  this.tipFlag = false
+                  this.$message('当前客户已累计销售我司' +this.inspect.goodsName + (response/1000).toFixed(2) +'吨,最高可售' +this.purchasePriceList[i].saleLimit +'吨。');
                 }
               }
-            })
-          }
+            }
+          })
+        }
         }
       },
 
@@ -729,7 +786,6 @@
           .then((response) => {
             this.goodNameList = []
             this.goodNameList = response
-            this.purchasePriceList = response
           })
         // 品级
         packList({
@@ -770,7 +826,7 @@
               })
             }
           })
-        if (this.types == 2 || this.types == 3) {
+        if (this.types !=1) {
           //查看
           getinspectLook({
               id: ids

+ 28 - 6
src/views/houseSelfCollect/inspectionManagement.vue

@@ -82,12 +82,27 @@
       <el-table-column prop="storageTagNo" label="囤位号"></el-table-column>
       <el-table-column prop="qualityInspector" label="质检员"></el-table-column>
       <el-table-column prop="updateDate" label="质检时间"></el-table-column>
-      <el-table-column prop="status" label="状态"></el-table-column>
-      <el-table-column width="400" label="操作">
+      <el-table-column prop="status" label="状态">
+        <template slot-scope="scope">
+          <span v-if='scope.row.confirm=="1"'>
+            已确认
+          </span>
+          <span v-else>
+            {{scope.row.status}}
+          </span>
+          </template>
+      </el-table-column>
+      <el-table-column width="500" label="操作">
         <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.edit`">编辑</el-button>
-          <el-button @click="del(scope.row)" v-if="scope.row.status=='已质检'" type="danger" v-hasPermission="`acquisitionManagement.acquisitionQuality.delete`">删除</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, 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="print(scope.row)" v-hasPermission="`acquisitionManagement.acquisitionQuality.print`">打印</el-button>
         </template>
       </el-table-column>
@@ -151,7 +166,9 @@ export default {
       isShowPrint: false,
       printData: {},
       deductWeight:'',//扣重比
-      saleLimit:''
+      saleLimit:'',
+      purchasePriceList:[]
+
     }
   },
   activated() {
@@ -186,7 +203,8 @@ export default {
           id: row.id,
           warehouseName: this.warehouseName,
           count: this.warehouseCount,
-          warehouseNo: this.warehouseNo
+          warehouseNo: this.warehouseNo,
+          purchasePriceList:this.purchasePriceList
         },
       })
     },
@@ -198,6 +216,7 @@ 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()
@@ -251,12 +270,14 @@ 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){
@@ -264,6 +285,7 @@ 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()

+ 2 - 0
src/views/workNotification/message.vue

@@ -298,6 +298,8 @@ export default {
               this.number.report = item.number
             } else if (item.businessType === 'SALE') {
               this.number.sale = item.number
+            }else if (item.businessType === 'Tran') {
+              this.number.tran = item.number
             }
 
             this.tabIndexs.forEach(ite => {

+ 3 - 1
vue.config.js

@@ -141,7 +141,9 @@ module.exports = {
         // target: 'https://product-server.winsea.com/', //目标地址
         // target: 'http://standard-dev.winsea.com/', //目标地址
         // target: 'http://localhost:8090/',
-        target: 'http://192.168.1.122: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/',