Browse Source

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

# Conflicts:
#	src/views/home/index.vue
achao 2 years ago
parent
commit
80ce77ab36

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

@@ -48,4 +48,6 @@ export const API_POST_IMPORT_SALE ='/weighingManagement/api/importWeighingOut'
 export const API_POST_IMPORT_YK ='/weighingManagement/api/importWeighingMoveOut'
 //出库类型查询
 export const API_GAT_INFO = '/commonSysParameter/getInfo'
+// 是否创建运输任务
+export const API_GET_TRANTASK ='/inOutWarehouseTask/tranTaskCount'
 

+ 5 - 2
src/model/outboundManagement/index.js

@@ -26,7 +26,8 @@ import {
     API_POST_IMPORT_SALE,
     API_POST_IMPORT_YK,
     API_POST_GO_BACK,
-    API_GAT_INFO
+    API_GAT_INFO,
+    API_GET_TRANTASK
 }   from '@/api/V2/outboundManagement'
 
   //质检列表
@@ -78,4 +79,6 @@ export const importWordSale = appRx.post(API_POST_IMPORT_SALE, errorCatcher, err
 // 导入移库出库
 export const importWordYk = appRx.post(API_POST_IMPORT_YK, errorCatcher, errorHandle, filter)
 // 导入移库出库
-export const getInfo = appRx.get(API_GAT_INFO, errorCatcher, errorHandle, filter)
+export const getInfo = appRx.get(API_GAT_INFO, errorCatcher, errorHandle, filter)
+// 是否创建运输任务
+export const gettask = appRx.get(API_GET_TRANTASK, errorCatcher, errorHandle, filter)

+ 5 - 4
src/views/houseSelfCollect/inspectionManagementNew.vue

@@ -78,7 +78,7 @@
                   </el-select>
                 </ws-form-item>
 
-                <ws-form-item v-if='serviceManagementType == 3 && qyJurisdiction&&statusTypetext == "初检"||serviceManagementType == 3 && statusTypetext != "初检"' label="货名" span="1"
+                <ws-form-item label="货名" span="1"
                   prop="inOutTaskNo">
                   <el-select :disabled='disablednotarize || goodsdisabled' v-model="deptBudgetList.goodsName" clearable
                     filterable placeholder="请选择" class="typeselect" @change="goodsNameChange">
@@ -2600,8 +2600,7 @@ export default {
               this.deptBudgetList.warehouseName = this.warehouseName
               this.deptBudgetList.serviceManagementType = this.serviceManagementType
               this.deptBudgetList.compId = localStorage.getItem('ws-pf_compId')
-              this.deptBudgetList.secretaryWeigher =
-                localStorage.getItem('ws-pf_staffName')
+              
               this.deptBudgetList.inOutFlag = 2
               this.deptBudgetList.pcFlag = 1
               this.deptBudgetList.statusFlag = 1
@@ -2610,6 +2609,8 @@ export default {
               }
               
               if (this.statusTypetext == '初检') {
+                this.deptBudgetList.agent =
+                localStorage.getItem('ws-pf_staffName')
                 addstorageputList(this.deptBudgetList)
                   .toPromise()
                   .then((response) => {
@@ -3148,7 +3149,7 @@ export default {
           }
           this.deptBudgetList.inOutType = this.outContractNo[i].inOutType
           if (this.outContractNo[i].inOutType == '移库入库') {
-            this.isSelectType = false
+            this.isSelectType = true
 
           } else {
             this.isSelectType = true

+ 2 - 0
src/views/houseSelfCollect/newWeighingManagement.vue

@@ -1463,6 +1463,8 @@
             }
             // 毛重
             if (this.tpyeNo == 1) {
+              this.deptBudgetList.secretaryWeigher =
+                localStorage.getItem('ws-pf_staffName')
               // console.log(this.weighingList)
               if (this.weighingList.customerNumberCard) {
                 //毛检保存前进行校验

+ 2 - 1
src/views/outboundManagement/newQualityInspectionManagement.vue

@@ -572,7 +572,8 @@
       print() {
         this.inspect.warehouseName = this.warehouseName
         // this.inspect.id = this.$route.query.id
-        this.inspect.qualityInspector = localStorage.getItem('ws-pf_staffName')
+        // 质检员
+        this.inspect.backOffice = localStorage.getItem('ws-pf_staffName')
         this.inspect.compId = localStorage.getItem('ws-pf_compId')
         // if (!this.inspect.grade) {
         //   this.$message({

+ 25 - 2
src/views/outboundManagement/weighingManagementNew.vue

@@ -374,7 +374,8 @@
     selectWarehouseSelf,
     delelteWeighing,
     newSubmit,
-    getInfo
+    getInfo,
+    gettask
   } from '@/model/outboundManagement/index'
   import {
     pullDown,
@@ -1260,6 +1261,8 @@
             //   this.weighingList.buckleMiscellaneous = this.weighingList.buckleMiscellaneous / 1000
             // }
             if (this.tpyeNo == 1) {
+              this.deptBudgetList.skinInspector =
+                localStorage.getItem('ws-pf_staffName')
               //  this.weighingList.serviceManagementType=2
               this.weighingList.statusFlag = 1
               this.weighingList.relationId = this.relationId
@@ -1875,6 +1878,7 @@
           },
           inOutDate: ''
         }
+        this.getNowTime()
         this.weighingList.inOutTaskNo=e
         this.warehouseCount = this.warehouseCount1
         var data = null
@@ -1886,8 +1890,20 @@
             this.weighingList.goodsName = this.taskNolist[i].goodsName
             this.weighingList.tips = this.taskNolist[i].businessDescribe
             data = this.taskNolist[i]
+            
             if(this.taskNolist[i].inOutType=='移库出库'){
               this.weighingList.contractNo = this.taskNolist[i].moveTaskNo
+              gettask({moveTaskNo:this.taskNolist[i].moveTaskNo,compId:localStorage.getItem('ws-pf_compId')}).toPromise().then((response) => {
+                // console.log(response)
+                if(!response){
+                  this.$message({
+                      message: '联系内勤创建运输任务',
+                      type: 'warning',
+                      
+                    });
+                }
+              })
+              this.carjudge=true
               
               if(this.warehouseType == '1'){
                 this.recheckPrice = true
@@ -1896,6 +1912,7 @@
               }
               
             }else{
+              this.carjudge=false
               if (this.taskNolist[i].contractNo) {
                 // console.log(this.taskNolist[i])
                 this.weighingList.contractNo = this.taskNolist[i].contractNo
@@ -1904,7 +1921,13 @@
               }
               this.recheckPrice = false
             }
-            
+            if (this.carjudge) {
+                this.weighingList.selfLoading = '1'
+                this.carChange1 = '识别下拉'
+              } else {
+                this.weighingList.selfLoading = '0'
+                this.carChange1 = '手动填写'
+              }
           }
         }
         // if (!data) return

+ 5 - 1
src/views/profitable/warehouseprofitsdetails.vue

@@ -42,7 +42,8 @@
           <el-table-column prop="saleWeight" label="销量(吨)"></el-table-column>
           <el-table-column prop="salesVolume" label="销售额(万元)"></el-table-column>
           <el-table-column prop="cost" label="成本(万元)"></el-table-column>
-          <el-table-column prop="profit" label="利润(万元)"></el-table-column>
+          <el-table-column prop="profit" label="利润(万元)">
+          </el-table-column>
           <el-table-column prop="address" label="操作" width="200">
             <template slot-scope="scope">
               <el-button @click="inventory(scope.row)" type="primary">库存</el-button>
@@ -143,6 +144,9 @@
           .toPromise()
           .then(response => {
             this.tableData = response.records
+            for (let q = 0; q < this.tableData.length; q++) {
+                this.tableData[q].profit=this.tableData[q].salesVolume-this.tableData[q].cost
+            }
            this.deptBudgetTotal = response.total
           })
       },

+ 1 - 1
src/views/taskManagement/supplyofgoodsedit.vue

@@ -58,7 +58,7 @@
         </el-table-column>
         <el-table-column prop="surplusWeight" class="table_td" label="剩余重量(吨)"></el-table-column>
         <el-table-column prop="avgCost" class="table_td" label="平均成本(吨)"></el-table-column>
-        <el-table-column prop="issuingTimeOther" class="table_td" label="入库单日期"></el-table-column>
+        <el-table-column prop="issuingTime" class="table_td" label="入库单日期"></el-table-column>
         <el-table-column prop="outWeight" class="table_td" label="预计出库重量(吨)">
             <template slot-scope="scope">
                 <el-input  @input='outweightchange' v-model="scope.row.estimateOutWarehouseWeight" placeholder="输入本次出库重量"></el-input>

+ 1 - 2
src/views/taskManagement/tranManagementWarehouseInOutTaskEdit.vue

@@ -925,8 +925,7 @@ export default {
           this.$router.push({
             name: 'supplyofgoodsedit',
             query: {
-              list: JSON.stringify(this.dataList1.sourceRelationInfoList),
-              
+              list: JSON.stringify(this.dataList.sourceRelationInfoList),
             },
           })
         } else {

+ 38 - 23
src/views/warehousenew/inventoryCheck.vue

@@ -46,11 +46,11 @@
         <div>{{item.issuingTime}}</div>
         <div>{{item.warehouseName}}入库单<span v-if='item.warehouseType==2'>(临)</span></div>
         <div>
-          <ws-button type="primary" @click="profit(item.warehouseName)" v-hasPermission="
+          <ws-button type="primary" @click="profit(item.id)" v-hasPermission="
             `warehouseManagement.warehousingOrder.surplus`
           ">盘盈
         </ws-button>
-         <ws-button type="primary" @click="lose(item.warehouseName)" v-hasPermission="
+         <ws-button type="primary" @click="lose(item.id)" v-hasPermission="
             `warehouseManagement.warehousingOrder.loss`
           ">盘亏
         </ws-button>
@@ -59,7 +59,7 @@
       <el-table class="wenzi" :data="item.warehousingOrderList" style="width: 100%"   >
         <el-table-column  width="40">
           <template scope="scope">
-            <img v-if="!scope.row.select" style='width:15px;vertical-align: text-top;' @click='radiochange(index,scope.row)' src="../../../public/img/wxz.png" alt="">
+            <img v-if="!scope.row.select" style='width:15px;vertical-align: text-top;' @click='radiochange1(index,scope.row)' src="../../../public/img/wxz.png" alt="">
             <img v-if="scope.row.select" style='width:15px;vertical-align: text-top;' @click='radiochange(index,scope.row)' src="../../../public/img/xz.png" alt="">
             <!-- <el-radio @change='radiochange(scope.row)' :name='indexMethod()+index' v-model="scope.row.select" :label="scope.row.id"><span></span></el-radio> -->
              <!-- <el-radio :label="scope.row.id" v-model="scope.row.select" @change.native="radiochange(index,scope.row)">&nbsp;</el-radio> -->
@@ -332,23 +332,24 @@
         this.getList()
       },
       radiochange(index,row){
-        console.log(index,row)
+        console.log(index,row.select)
         var data=this.gainList[index].warehousingOrderList
-        
-        
-        if(row.select){
-          for (let i = 0; i < data.length; i++) {
+        for (let i = 0; i < data.length; i++) {
           data[i].select=false
           }
-          this.multipleSelection[row.warehouseName]=row
-        }else{
-          for (let i = 0; i < data.length; i++) {
+        row.select=!row.select
+        
+        console.log(this.multipleSelection)
+      },
+      radiochange1(index,row){
+        console.log(index,row.select)
+        var data=this.gainList[index].warehousingOrderList
+        for (let i = 0; i < data.length; i++) {
           data[i].select=false
           }
           row.select=!row.select
-        }
-        
-        // console.log(this.multipleSelection[row.warehouseName])
+        this.multipleSelection[row.id]=row
+        console.log(this.multipleSelection[row.id])
       },
        handleCurrentChange(val) {
         this.currentRow = val;
@@ -374,6 +375,7 @@
       },
       lose(ware){
         if(localStorage.getItem('ws-pf_roleName')=='销售内勤'||localStorage.getItem('ws-pf_roleName')=='采购内勤'){
+          console.log(this.multipleSelection[ware])
           if(this.multipleSelection[ware]){
             this.form.id=this.multipleSelection[ware].id
             this.form.workflowId=this.multipleSelection[ware].workflowId
@@ -381,10 +383,11 @@
             this.form.profitAndLoss=this.multipleSelection[ware].profitAndLoss
             this.title='盘亏'
             this.slecetwarehouseName=''
-            if(this.multipleSelection[ware].approveStatus){
+            // console.log(this.multipleSelection[ware].approveStatus,1111111111111)
+            if(this.multipleSelection[ware].inventoryStatus){
             this.$notify.warning({
               title: '警告',
-              message: '未选择要盘点的入库记录',
+              message: '当前数据审核中',
             })
             return
           }
@@ -396,6 +399,12 @@
               message: '未选择要盘点的入库记录',
             })
           }
+        }else{
+          this.$notify.warning({
+              title: '警告',
+              message: '暂无盘点权限',
+            })
+            return
         }
       },
       profit(ware){
@@ -406,10 +415,10 @@
           this.form.surplusWeight=this.multipleSelection[ware].surplusWeight
           this.form.profitAndLoss=this.multipleSelection[ware].profitAndLoss
           this.title='盘盈'
-          if(this.multipleSelection[ware].approveStatus){
+          if(this.multipleSelection[ware].inventoryStatus){
             this.$notify.warning({
               title: '警告',
-              message: '未选择要盘点的入库记录',
+              message: '当前数据审核中',
             })
             return
           }
@@ -421,6 +430,12 @@
               message: '未选择要盘点的入库记录',
             })
           }
+        }else{
+          this.$notify.warning({
+              title: '警告',
+              message: '暂无盘点权限',
+            })
+            return
         }
         
       },
@@ -604,13 +619,13 @@
               response.records[i].payshow=true
               var data=response.records[i].warehousingOrderList
               for (let q = 0; q < data.length; q++) {
-                if(data[q].inType=='收购入库'){
-                  data[q].inWarehouseWeight1=Number((data[q].inWarehouseWeight/1000).toFixed(3))
-                   data[q].surplusWeight=(data[q].inWarehouseWeight/1000)-data[q].outWarehouseWeight+data[q].profitAndLoss
-                }else{
+                // if(data[q].inType=='收购入库'){
+                //   data[q].inWarehouseWeight1=Number((data[q].inWarehouseWeight/1000).toFixed(3))
+                //    data[q].surplusWeight=(data[q].inWarehouseWeight/1000)-data[q].outWarehouseWeight+data[q].profitAndLoss
+                // }else{
                   data[q].inWarehouseWeight1=data[q].inWarehouseWeight.toFixed(3)
                   data[q].surplusWeight=data[q].inWarehouseWeight-data[q].outWarehouseWeight+data[q].profitAndLoss
-                }
+                // }
                 data[q].select=false
                 data[q].weightedit=false
                 data[q].warehouseType=response.records[i].warehouseType

+ 10 - 2
src/views/warehousenew/warehouseManagementRecord.vue

@@ -162,9 +162,17 @@
           </el-table-column>
           <el-table-column prop="wingNumberOther" label="车厢号-2">
           </el-table-column>
-          <el-table-column prop="agent" label="经办人">
+          <el-table-column prop="agent" label="检斤员">
+            <template slot-scope="scope">
+              <span v-if='scope.row.inOutFlag==2'>{{ scope.row.secretaryWeigher }}</span>
+              <span v-if='scope.row.inOutFlag==1'>{{ scope.row.skinInspector }}</span>
+            </template>
           </el-table-column>
-          <el-table-column prop="backOffice" label="操作人" width="120px">
+          <el-table-column prop="backOffice" label="质检员" width="120px">
+            <template slot-scope="scope">
+              <span v-if='scope.row.inOutFlag==2'>{{ scope.row.agent }}</span>
+              <span v-if='scope.row.inOutFlag==1'>{{ scope.row.backOffice }}</span>
+            </template>
           </el-table-column>
           <el-table-column prop="addressUrl" label="操作" width="100px">
             <template slot-scope="scope">