瀏覽代碼

前端仓库打印类型

gjy 2 年之前
父節點
當前提交
3edad30ac5

+ 5 - 1
src/api/V2/universalityAudit/index.js

@@ -9,4 +9,8 @@ export const API_ADD_AUDITINFO= '/generalAuditInfo/api/insertGeneralAuditInfo'
 // 列表
 export const API_LIST_AUDITINFO= '/generalAuditInfo/selectGeneralAuditInfo'
 // 类型下拉
-export const API_GET_INFO= '/commonSysParameter/getInfo'
+export const API_GET_INFO= '/commonSysParameter/getInfo'
+// 审核流1
+export const API_GET_workflow= '/newWorkflow/query/workflowsByBusinessCode'
+// 审核流2
+export const API_GET_HIS= '/newWorkflow/query/workflowInfo'

+ 3 - 1
src/api/V2/warehouse/index.js

@@ -148,4 +148,6 @@ export const API_GET_RECORD='/dryWarehouse/selectDryWarehousePage'
 //烘干入库  修改
 export const API_POST_EDITSUBMIT='/dryWarehouse/api/editDryWarehouse'
 //烘干入库  记录删除
-export const API_POST_DELETEINFO='/dryWarehouse/api/deleteDryWarehouse'
+export const API_POST_DELETEINFO='/dryWarehouse/api/deleteDryWarehouse'
+//仓位类型
+export const API_GET_BINTYPE='/warehousePositionInfo/selectBinNumberList'

+ 1 - 1
src/components/WsUpload/index.vue

@@ -154,7 +154,7 @@ export default {
     limit: {
       // 文件总数量限制
       type: Number,
-      default: 10,
+      default: 50,
     },
     sizeLimit: {
       // 文件大小限制

+ 9 - 3
src/model/universalityAudit/index.js

@@ -7,17 +7,23 @@ import {
     API_DEL_AUDITINFO,
     API_ADD_AUDITINFO,
     API_LIST_AUDITINFO,
-    API_GET_INFO
+    API_GET_INFO,
+    API_GET_workflow,
+    API_GET_HIS
 } from '@/api/V2/universalityAudit'
 // 查看
 export const getaduitinfo = appRx.get(API_GET_AUDITINFO, errorCatcher, errorHandle, filter)
 // 编辑
 export const editaduitinfo = appRx.get(API_EDIT_AUDITINFO, errorCatcher, errorHandle, filter)
 // 删除
-export const deladuitinfo = appRx.get(API_DEL_AUDITINFO, errorCatcher, errorHandle, filter)
+export const deladuitinfo = appRx.post(API_DEL_AUDITINFO, errorCatcher, errorHandle, filter)
 // 添加
 export const addaduitinfo = appRx.post(API_ADD_AUDITINFO, errorCatcher, errorHandle, filter)
 // 列表
 export const aduitinfoList = appRx.get(API_LIST_AUDITINFO, errorCatcher, errorHandle, filter)
 // 类型下拉
-export const xiala = appRx.get(API_GET_INFO, errorCatcher, errorHandle, filter)
+export const xiala = appRx.get(API_GET_INFO, errorCatcher, errorHandle, filter)
+// 审核流1
+export const workflow = appRx.get(API_GET_workflow, errorCatcher, errorHandle, filter)
+// 审核流2
+export const gethis = appRx.get(API_GET_HIS, errorCatcher, errorHandle, filter)

+ 4 - 6
src/model/warehouse/index.js

@@ -72,7 +72,8 @@ import {
      API_POST_SUBMIT,
      API_GET_RECORD,
      API_POST_EDITSUBMIT,
-     API_POST_DELETEINFO
+     API_POST_DELETEINFO,
+     API_GET_BINTYPE
     // API_GET_EXPENSEINFO
 } from '@/api/V2/warehouse'
 // import { app } from 'electron'
@@ -223,8 +224,5 @@ export const getRecord = appRx.get(API_GET_RECORD,errorCatcher, errorHandle, fil
 export const editDryWarehouse = appRx.post(API_POST_EDITSUBMIT,errorCatcher, errorHandle, filter)
 //烘干入库  记录删除
 export const delRecord= appRx.post(API_POST_DELETEINFO,errorCatcher, errorHandle, filter)
-
-
-
-
-
+//仓位类型
+export const getbintype= appRx.get(API_GET_BINTYPE,errorCatcher, errorHandle, filter)

+ 16 - 0
src/utils/index.js

@@ -16,7 +16,23 @@ export function getQueryObject (url) {
   })
   return obj
 }
+// 获取全局唯一id
+export function getUuid() {
+  const s = [];
+  const hexDigits = '0123456789abcdef';
+  for (let i = 0; i < 36; i++) {
+    s[i] = hexDigits.substr(Math.floor(Math.random() * 0x10), 1);
+  }
+  s[14] = '4'; // bits 12-15 of the time_hi_and_version field to 0010
+  s[19] = hexDigits.substr((s[19] & 0x3) | 0x8, 1); // bits 6-7 of the clock_seq_hi_and_reserved to 01
+  s[8] = '-';
+  s[13] = '-';
+  s[18] = '-';
+  s[23] = '-';
 
+  const uid = s.join('');
+  return uid;
+}
 /**
  * @param {Sting} input value
  * @returns {number} output value

+ 116 - 29
src/views/houseSelfCollect/inspectionManagementNew.vue

@@ -187,7 +187,7 @@
                   <ws-input :disabled='recheck' v-model="deptBudgetList.titleNoOther" placeholder="请输入封号" maxlength="20"
                     size="small" />
                 </ws-form-item>
-                 <ws-form-item v-if='serviceManagementType == 3 && zjJurisdiction && statusTypetext == "初检"||serviceManagementType == 3 && statusTypetext != "初检"' label="囤位号" span="1"
+                 <ws-form-item v-if='serviceManagementType == 3 && zjJurisdiction && statusTypetext == "初检"||serviceManagementType == 3 && statusTypetext != "初检"' label="囤位号(选填)" span="1"
                   prop="storageTagNo">
                   <ws-input :disabled='recheck' v-model="deptBudgetList.storageTagNo" placeholder="选填,1-10个字符"
                     maxlength="10" size="small" />
@@ -198,7 +198,7 @@
                     size="small" />
                 </ws-form-item> -->
 
-                <ws-form-item v-if='serviceManagementType == 1' label="囤位号" span="1" prop="storageTagNo">
+                <ws-form-item v-if='serviceManagementType == 1' label="囤位号(选填)" span="1" prop="storageTagNo">
                   <ws-input :disabled='recheck' v-model="deptBudgetList.storageTagNo" placeholder="选填,1-10个字符"
                     maxlength="10" size="small" />
                 </ws-form-item>
@@ -434,36 +434,36 @@
                     v-model="deptBudgetList.reImperfectGrain" type="number" @mousewheel.native.prevent
                     placeholder="请输入不完善粒占比" maxlength="40" size="small" />
                 </ws-form-item>
-                <ws-form-item v-if="deptBudgetList.type == '潮粮' && serviceManagementType == 3" label="水分增价(元/公斤)" span="1" prop="imperfectGrain">
-                  <ws-input v-if='statusTypetext != "复检"'
-                    v-model="deptBudgetList.waterPriceIncrease" type="number" @input="deductionchange"
+                <ws-form-item v-if="serviceManagementType == 3" label="水分增价(元/公斤)" span="1" prop="imperfectGrain">
+                  <el-input :disabled='statusTypetext != "初检"'
+                    v-model="deptBudgetList.waterPriceIncrease" type="number" @focus="pricefocus($event,1)" @blur="priceblur($event,1)" @input="deductionchange"
                     placeholder="请输入水分增价" maxlength="40" size="small" />
                 </ws-form-item>
-                <ws-form-item v-if="deptBudgetList.type == '潮粮' && serviceManagementType == 3" label="水分扣价(元/公斤)" span="1" prop="imperfectGrain">
-                  <ws-input v-if='statusTypetext != "复检"'
-                    v-model="deptBudgetList.waterPriceDeduction" type="number" @input="deductionchange"
+                <ws-form-item v-if="serviceManagementType == 3" label="水分扣价(元/公斤)" span="1" prop="imperfectGrain">
+                  <el-input :disabled='statusTypetext != "初检"'
+                    v-model="deptBudgetList.waterPriceDeduction" type="number" @focus="pricefocus($event,2)" @blur="priceblur($event,2)" @input="deductionchange"
                     placeholder="请输入水分扣价" maxlength="40" size="small" />
                 </ws-form-item>
-                <ws-form-item v-if="deptBudgetList.type == '潮粮' && serviceManagementType == 3" label="质量增价(元/公斤)" span="1" prop="imperfectGrain">
-                  <ws-input v-if='statusTypetext != "复检"'
-                    v-model="deptBudgetList.qualityPriceIncrease" type="number" @input="deductionchange"
+                <ws-form-item v-if="serviceManagementType == 3" label="质量增价(元/公斤)" span="1" prop="imperfectGrain">
+                  <el-input :disabled='statusTypetext != "初检"'
+                    v-model="deptBudgetList.qualityPriceIncrease" type="number" @focus="pricefocus($event,3)" @blur="priceblur($event,3)" @input="deductionchange"
                     placeholder="请输入质量增价" maxlength="40" size="small" />
                 </ws-form-item>
-                <ws-form-item v-if="deptBudgetList.type == '潮粮' && serviceManagementType == 3" label="质量扣价(元/公斤)" span="1" prop="imperfectGrain">
-                  <ws-input v-if='statusTypetext != "复检"'
-                    v-model="deptBudgetList.qualityPriceDeduction" type="number" @input="deductionchange"
+                <ws-form-item v-if="serviceManagementType == 3" label="质量扣价(元/公斤)" span="1" prop="imperfectGrain">
+                  <el-input :disabled='statusTypetext != "初检"'
+                    v-model="deptBudgetList.qualityPriceDeduction" type="number" @focus="pricefocus($event,4)" @blur="priceblur($event,4)" @input="deductionchange"
                     placeholder="请输入质量扣价" maxlength="40" size="small" />
                 </ws-form-item>
               </ws-info-table>
               <ws-info-table v-if="zjJurisdiction&&statusTypetext == '初检'||statusTypetext != '初检'">
                 <ws-form-item label="净重单价(元/公斤)" span="1" prop="tidalGrainPrice"
                   v-if="deptBudgetList.type == '潮粮' && serviceManagementType == 3">
-                  <ws-input type="number" @mousewheel.native.prevent v-model="deptBudgetList.tidalGrainPrice"
+                  <ws-input type="number" @mousewheel.native.prevent @input="pricechange" v-model="deptBudgetList.tidalGrainPrice"
                     placeholder="请输入净重单价" maxlength="10" size="small" />
                 </ws-form-item>
                 <ws-form-item label="干粮单价(元/公斤)" span="2" prop="dryGrainPrice"
                   v-if="deptBudgetList.type == '干粮' && serviceManagementType == 3">
-                  <ws-input type="number" @mousewheel.native.prevent v-model="deptBudgetList.dryGrainPrice"
+                  <ws-input type="number" @mousewheel.native.prevent @input="pricechange" v-model="deptBudgetList.dryGrainPrice"
                     placeholder="请输入干粮单价" maxlength="10" size="small" />
                 </ws-form-item>
               </ws-info-table>
@@ -750,6 +750,8 @@ export default {
       value1: false,
       isQy: false,
       isZj: false,
+      dryGrainPrice:0,
+      tidalGrainPrice:0,
       bulkDensityMin:'',
       qyJurisdiction: false,
       zjJurisdiction: false,
@@ -809,9 +811,72 @@ export default {
     }
   },
   methods: {
+    priceblur(e,status){
+				if(status==1){
+					if(this.deptBudgetList.waterPriceIncrease===''){
+						this.deptBudgetList.waterPriceIncrease=0
+						
+					}
+				}else if(status==2){
+					if(this.deptBudgetList.waterPriceDeduction===''){
+						this.deptBudgetList.waterPriceDeduction=0
+						
+					}
+					
+				}else if(status==3){
+					if(this.deptBudgetList.qualityPriceIncrease===''){
+						this.deptBudgetList.qualityPriceIncrease=0
+						
+					}
+					
+				}else if(status==4){
+					if(this.deptBudgetList.qualityPriceDeduction===''){
+						this.deptBudgetList.qualityPriceDeduction=0
+						
+					}
+					
+				}
+				
+			},
+    pricefocus(e,status){
+				if(status==1){
+					if(this.deptBudgetList.waterPriceIncrease===0){
+						this.deptBudgetList.waterPriceIncrease=''
+						
+					}
+				}else if(status==2){
+					if(this.deptBudgetList.waterPriceDeduction===0){
+						this.deptBudgetList.waterPriceDeduction=''
+						
+					}
+					
+				}else if(status==3){
+					if(this.deptBudgetList.qualityPriceIncrease===0){
+						this.deptBudgetList.qualityPriceIncrease=''
+						
+					}
+					
+				}else if(status==4){
+					if(this.deptBudgetList.qualityPriceDeduction===0){
+						this.deptBudgetList.qualityPriceDeduction=''
+						
+					}
+					
+				}
+				
+			},
     deductionchange(){
-      if(this.deptBudgetList.tidalGrainPrice&&this.deptBudgetList.waterPriceIncreas&&this.deptBudgetList.waterPriceDeduction&&this.deptBudgetList.qualityPriceIncrease&&this.deptBudgetList.qualityPriceDeduction){
-        this.deptBudgetList.tidalGrainPrice=this.deptBudgetList.tidalGrainPrice-this.deptBudgetList.waterPriceIncrease-this.deptBudgetList.waterPriceDeduction-this.deptBudgetList.qualityPriceIncrease-this.deptBudgetList.qualityPriceDeduction
+      if(this.deptBudgetList.type=='潮粮'){
+        this.deptBudgetList.tidalGrainPrice=Number(this.tidalGrainPrice+(this.deptBudgetList.waterPriceIncrease/1000)-(this.deptBudgetList.waterPriceDeduction/1000)+(this.deptBudgetList.qualityPriceIncrease/1000)-(this.deptBudgetList.qualityPriceDeduction/1000)).toFixed(3)
+      }else if(this.deptBudgetList.type=='干粮'){
+        this.deptBudgetList.dryGrainPrice=Number(this.dryGrainPrice+(this.deptBudgetList.waterPriceIncrease/1000)-(this.deptBudgetList.waterPriceDeduction/1000)+(this.deptBudgetList.qualityPriceIncrease/1000)-(this.deptBudgetList.qualityPriceDeduction/1000)).toFixed(3)
+      }
+    },
+    pricechange(){
+      if(this.deptBudgetList.type=='潮粮'){
+        this.tidalGrainPrice=this.deptBudgetList.tidalGrainPrice
+      }else if(this.deptBudgetList.type=='干粮'){
+        this.dryGrainPrice=this.deptBudgetList.dryGrainPrice
       }
     },
     shipInfoChange(e){
@@ -1031,9 +1096,13 @@ export default {
               }
             })
         }
-      if(this.deptBudgetList.inOutType=="收购入库"){ //收购入库  价格取至合同
-        return
-      }
+        this.deptBudgetList.waterPriceIncrease=0
+				this.deptBudgetList.waterPriceDeduction=0
+				this.deptBudgetList.qualityPriceIncrease=0
+				this.deptBudgetList.qualityPriceDeduction=0
+      // if(this.deptBudgetList.inOutType=="收购入库"){ //收购入库  价格取至合同
+      //   return
+      // }
       if (this.deptBudgetList.goodsName && type != 'water') {
         if (this.deptBudgetList.goodsName.indexOf('潮粮') != -1) {
           this.deptBudgetList.type = '潮粮'
@@ -1048,6 +1117,7 @@ export default {
             .toPromise()
             .then((response) => {
               this.$set(this.deptBudgetList, 'dryGrainPrice', response)
+              this.dryGrainPrice=response
             })
         }
         // debugger
@@ -1074,9 +1144,14 @@ export default {
           .toPromise()
           .then((response) => {
             if (this.deptBudgetList.paramType == '1') {
-              this.deptBudgetList.tidalGrainPrice = parseFloat(parseFloat(response) - parseFloat(this.deptBudgetList
+              if(this.deptBudgetList.buckleMiscellaneous){
+                this.deptBudgetList.tidalGrainPrice = parseFloat(parseFloat(response) - parseFloat(this.deptBudgetList
+                .buckleMiscellaneous) / 100 * parseFloat(this.deptBudgetList.dryGrainPrice ? this.deptBudgetList
+                  .dryGrainPrice : 0)).toFixed(4)
+                  this.tidalGrainPrice = parseFloat(parseFloat(response) - parseFloat(this.deptBudgetList
                 .buckleMiscellaneous) / 100 * parseFloat(this.deptBudgetList.dryGrainPrice ? this.deptBudgetList
                   .dryGrainPrice : 0)).toFixed(4)
+              }
             } else {
               if (this.inspect.type == '干粮') {
                 if (response == 0) {
@@ -1087,16 +1162,18 @@ export default {
                     .toPromise()
                     .then((response) => {
                       this.$set(this.deptBudgetList, 'dryGrainPrice', response)
+                      this.dryGrainPrice=response
                     })
                 } else {
                   if(response>0){
                   this.deptBudgetList.dryGrainPrice = response
+                  this.dryGrainPrice = response
                   }
                 }
               } else {
                 if(response>0){
                 this.deptBudgetList.tidalGrainPrice = response
-                  
+                this.tidalGrainPrice = response
                 }
               }
             }
@@ -1105,6 +1182,10 @@ export default {
       if (this.deptBudgetList.goodsName && this.deptBudgetList.customerName) { }
     },
     obtainPrice(){
+      this.deptBudgetList.waterPriceIncrease=0
+						 this.deptBudgetList.waterPriceDeduction=0
+						 this.deptBudgetList.qualityPriceIncrease=0
+						 this.deptBudgetList.qualityPriceDeduction=0
       if(this.deptBudgetList.bulkDensity<this.bulkDensityMin){
         this.$alert('容重低于收购标准', '提示', {
           confirmButtonText: '确定',
@@ -1125,6 +1206,8 @@ export default {
           .then((response) => {
             if(response){
              this.deptBudgetList.dryGrainPrice = response
+             this.dryGrainPrice = response
+             
             }
           })
       } 
@@ -2182,12 +2265,14 @@ export default {
       if (this.reader) {
         this.reader.cancel()
       }
-      if(this.deptBudgetList.bulkDensity<this.bulkDensityMin){
-        this.$message({
-            message: '容重低于收购标准',
-            type: 'warning',
-          })
-          return
+      if(this.serviceManagementType==3&&this.zjJurisdiction&&this.statusTypetext=='初检'){
+        if(this.deptBudgetList.bulkDensity<this.bulkDensityMin){
+          this.$message({
+              message: '容重低于收购标准',
+              type: 'warning',
+            })
+            return
+        }
       }
       if(this.qyJurisdiction&&this.serviceManagementType==1&&this.statusTypetext=='初检'&&!this.zjJurisdiction&&!this.fjJurisdiction&&!this.qrJurisdiction){
         this.$message({
@@ -3558,8 +3643,10 @@ export default {
         if(this.outContractNo.priceType == "定价收购"){
             if( this.deptBudgetList.type == "潮粮"){
            this.deptBudgetList.tidalGrainPrice = Number(this.outContractNo.unitContractPrice/1000).toFixed(2)
+           this.tidalGrainPrice = Number(this.outContractNo.unitContractPrice/1000).toFixed(2)
             }else{
             this.deptBudgetList.dryGrainPrice = Number(this.outContractNo.unitContractPrice/1000).toFixed(2)
+            this.dryGrainPrice = Number(this.outContractNo.unitContractPrice/1000).toFixed(2)
             }
           }
           if(this.serviceManagementType==3){

+ 133 - 44
src/views/universalityAudit/audit.vue

@@ -16,7 +16,7 @@
           
         </el-col>
         <el-col style="text-align:right;" :span="12">
-          <el-button style="margin-right:10px" @click="addlist" type="primary">添加</el-button>
+          <el-button  style="margin-right:10px" @click="addlist" type="primary">添加</el-button>
         </el-col>
       </el-row>
       <el-row style='margin-bottom:10px;'>
@@ -31,7 +31,7 @@
             <el-option v-for="item in xialaList"  :key="item.id" :label="item.constValue" :value="item.constValue"
             style="color: #8890b1" />
         </el-select>
-        <i class="el-icon-question"></i>
+        <i @click="aduitflow" class="el-icon-question"></i>
         </el-col>
         <el-col :span="6">
 
@@ -85,12 +85,14 @@
       </el-table-column>
           <el-table-column prop="createDate" label="时间"></el-table-column>
     
-          <el-table-column prop="status" label="状态"></el-table-column>
+          <el-table-column prop="status" label="状态">
+            <template slot-scope="scope">{{scope.row.approveStatus?scope.row.approveStatus:scope.row.status}}<i @click="handlerecord(scope.row)" class="el-icon-s-claim"></i></template>
+          </el-table-column>
           <el-table-column prop="address" label="操作" width="300">
             <template slot-scope="scope">
               
-              <el-button @click="pass(scope.row)" type="primary">通过</el-button>
-              <el-button @click="reject(scope.row)" type="primary">驳回</el-button>
+              <el-button v-if="scope.row.approveStatus&&scope.row.taskId" @click="pass(scope.row)" type="primary">通过</el-button>
+              <el-button v-if="scope.row.approveStatus&&scope.row.taskId" @click="reject(scope.row)" type="primary">驳回</el-button>
               <!-- <div style="display:inline-block;"> -->
                 <el-button v-if="scope.row.status=='已驳回'" @click="del(scope.row)" type="danger">删除</el-button>
               <!-- </div> -->
@@ -130,44 +132,14 @@
 </el-form>
 </el-dialog>
 <el-dialog
-  title="合同结算单"
+  title="审核流详情"
   :visible.sync="show"
   width="30%"
   :before-close="handleClose1">
-  <!--<div>
-     <table class="table">
-          <tr class="row">
-            <td class="col col-bgc">合同编号</td>
-            <td class="col">{{tableData.contractNo}}</td>
-            <td class="col col-bgc">合同类型</td>
-            <td  class="col">{{tableData.agreementType}}</td>
-          </tr>
-          <tr class="row">
-            <td class="col col-bgc">买方</td>
-            <td class="col">{{tableData.buyer}}</td>
-            <td class="col col-bgc">卖方</td>
-            <td class="col">{{tableData.seller}}</td>
-          </tr>
-          <tr class="row">
-            <td class="col col-bgc">结算单价(元/吨)</td>
-            <td class="col">{{tableData.settlementPrice}}</td>
-            <td class="col col-bgc">合计利润(元)</td>
-            <td class="col">{{tableData.profit}}</td>
-          </tr>
-          <tr class="row">
-            <td class="col col-bgc">关联合同</td>
-            <td class="col col-bgc">结算单价(元/吨)</td>
-            <td class="col col-bgc">重量(吨)</td>
-            <td class="col col-bgc">利润(元)</td>
-          </tr>
-          <tr v-for="item in tableData.contractList" class="row">
-            <td class="col">{{item.contractNo}}</td>
-            <td class="col">{{item.settlementPrice}}</td>
-            <td class="col">{{item.weight}}</td>
-            <td class="col">{{item.profit}}</td>
-          </tr>
-        </table>
-    </div> -->
+  <div v-for="item in blocks">
+  <div style="margin:10px 0;">{{item.title}}</div>
+  <div style="display:inline-block;" v-for="(item1,index) in item.subBlocks">{{item1.desc}} <span v-if="index!=item.subBlocks.length-1">----></span>  </div>
+  </div>
 </el-dialog>
 <el-dialog
       :title="title"
@@ -183,7 +155,7 @@
 </el-input>
 </div>
       <span slot="footer" class="dialog-footer">
-        <el-button @click="dialogVisible = false">取 消</el-button>
+        <el-button @click="rejectshow = false">取 消</el-button>
         <el-button type="primary" @click="rejectclick">确 定</el-button>
       </span>
     </el-dialog>
@@ -192,6 +164,19 @@
       <ws-upload ref="upload" :comp-id="compId" :appendix-ids="appendixIdss" :editable="false"
         accept=".jpg, .jpeg, .png, .pdf, .doc, .zip, .rar" />
     </WinseaContentModal>
+    <el-dialog width="50%" :visible.sync="dialogVisible1" title="审核记录">
+      <div style="padding: 20px" v-for="(item, index) in recordList" :style="{
+        'border-bottom':
+          index != recordList.length - 1 ? '1px solid #ccc' : 'none',
+      }">
+          <div style="width: 100%; text-align: left">
+            {{ item.operateUser }}({{item.approveResult==1?'已通过':'已驳回'}})
+          </div>
+        <div style="width: 100%; text-align: left">
+          {{ item.verifyRemark }}
+        </div>
+      </div>
+    </el-dialog>
   </div>
 </template>
 <script>
@@ -199,9 +184,18 @@
     xiala,
     aduitinfoList,
     addaduitinfo,
-    deladuitinfo
+    deladuitinfo,
+    workflow,
+    gethis
   } from '@/model/universalityAudit/index'
+  import { getUuid } from '../../utils'
   import WsUpload from '@/components/WsUpload'
+  import {
+    woekflowhandle
+  } from '@/model/tasksport/index'
+  import {
+  getAuditRecord,
+} from '@/model/profitable/index'
   export default {
     components: {
       WsUpload
@@ -234,8 +228,11 @@
         size:100,
         accessoryTFs:false,
         appendixIdss:'',
+        blocks:[],
         compId:localStorage.getItem('ws-pf_compId'),
-        currectdata:{}
+        currectdata:{},
+        dialogVisible1:false,
+        recordList:[]
       }
     },
     activated() {
@@ -260,7 +257,7 @@
               type: 'success',
             })
             this.rejectshow=false
-            this.$router.go(-1)
+            this.getList()
           }).catch((response) => {
             this.$message({
               message: '驳回失败!',
@@ -279,6 +276,8 @@
                 message: '通过成功!',
                 type: 'success',
               })
+              this.rejectshow=false
+              this.getList()
             }).catch((response) => {
               this.$message({
                 message: '通过失败!',
@@ -288,6 +287,15 @@
         }
         
       },
+      handlerecord(row) {
+      getAuditRecord({ id: row.id, workflowId: row.workflowId })
+        .toPromise()
+        .then((response) => {
+          this.recordList = response
+          this.dialogVisible1 = true
+        })
+        .catch((response) => { })
+    },
       pass(row){
         this.currectdata=row
         this.title='通过'
@@ -298,6 +306,87 @@
         this.title='驳回'
         this.rejectshow=true
       },
+      aduitflow(){
+        workflow({businessCode: 'GENERAL-AUDIT-APPROVE'}).toPromise().then(response => {
+          for (let i = 0; i < response.length; i++) {
+            if(response[i].latest==1){
+              gethis({workflowId:response[i].id}).toPromise().then(response => {
+                const branchSameNodeIds = [];
+              this.convertStepsToBlocks(response.steps ? response.steps : [], this.blocks, branchSameNodeIds, 0, false, false);
+                console.log(this.blocks,branchSameNodeIds)
+              })
+              
+            }
+          }
+          
+        })
+      },
+      convertStepsToBlocks (steps, blocks, branchSameNodeIds, fromIndex, onBranch, shouldAddEndPoint) {
+      let index = fromIndex;
+      let index1 = 0;
+      let arr=[]
+      while (index < steps.length) {
+        const item = steps[index];
+        switch (item.stepType) {
+          case 'NORMAL':
+            if (item.branchNodeLocation !== 'END') { // 普通节点直接加上
+              arr[index1].subBlocks.push({
+              ...item,
+              })
+            } else { // END节点,需要在合适时机给加到主分支节点下面
+              arr[index1].subBlocks.push({
+              ...item,
+              })
+              index1++
+            }
+            break;
+          case 'COUNTERSIGN':
+            arr[index1].subBlocks.push({
+              ...item,
+            })
+            break;
+          case 'CONDITION':
+            if (item.branchSameNodeId==0&&item.branchConditions) { // 新的条件主节点
+              arr[index1]={subBlocks:[],title:item.branchConditions[0].varValue}
+              arr[index1].subBlocks.push({
+              ...item,
+              })
+            }
+            break;
+          default:
+            break;
+        }
+        index++;
+      }
+      this.blocks=arr
+      this.show=true
+      // console.log(arr)
+    },
+      // convertStepsToBlocks (steps, fromIndex) {
+      //   let index = fromIndex;
+      //   while (index < steps.length) {
+      //     const item = steps[index];
+      //     switch (item.stepType) {
+      //     case 'NORMAL':
+      //       if(item.branchNodeLocation !== 'END'){
+      //         this. blocks.push({
+      //           ...item,
+      //           type: 0,
+      //         })
+      //       }else{
+
+      //       }
+      //     break;
+      //     case 'COUNTERSIGN':
+      //     break;
+      //     case 'CONDITION':
+      //     break;
+      //     default:
+      //     break;
+      //     }
+      //     index++
+      //   }
+      // },
       fujian(row) {
         this.id = row.id
         this.accessoryTFs = true

+ 30 - 30
src/views/universalityAudit/component/routers/route.js

@@ -1,36 +1,36 @@
 import Layout from '@/layout/index';
 
-// const profitableRouter = {
-//   path: '/aduitmanagement',
-//   component: Layout,
-//   redirect: '/aduitmanagement',
-//   name: 'aduitmanagement',
-//   alwaysShow: true, // will always show the root menu
-//   meta: {
-//     title: 'aduitmanagement',
-//     module: 'lirunhesuan',
-//     icon: '-caigouguanli'
-//   },
-//   children: [
+const profitableRouter = {
+  path: '/aduitmanagement',
+  component: Layout,
+  redirect: '/aduitmanagement',
+  name: 'aduitmanagement',
+  alwaysShow: true, // will always show the root menu
+  meta: {
+    title: 'aduitmanagement',
+    module: 'generalAudit',
+    icon: '-caigouguanli'
+  },
+  children: [
    
-//       {
-//         path: 'audit',
-//         component: () =>
-//           import(/* webpackChunkName: "applDetail" */ '@/views/universalityAudit/audit'),
-//         name: 'audit',
-//         meta: {
-//           title: 'universalityaudit',
-//           shortcutEntrance: 'profitable',
-//           module: 'lirunhesuan',
-//           permissicon: [],
-//           keepAlive: true,
-//           _title:'通用审核'
-//           // module: 'procurement.sparepart.applDetail'
-//         }
-//       },  
+      {
+        path: 'audit',
+        component: () =>
+          import(/* webpackChunkName: "applDetail" */ '@/views/universalityAudit/audit'),
+        name: 'audit',
+        meta: {
+          title: 'universalityaudit',
+          shortcutEntrance: 'profitable',
+          module: 'generalAudit',
+          permissicon: [],
+          keepAlive: true,
+          _title:'通用审核'
+          // module: 'procurement.sparepart.applDetail'
+        }
+      },  
     
-//   ],
+  ],
 
-// };
+};
 
-// export default profitableRouter;
+export default profitableRouter;

+ 29 - 7
src/views/warehousenew/warehouseManagementList.vue

@@ -235,15 +235,20 @@
             </el-form-item> -->
             <!--仓库名称-->
             <el-form-item label="仓库名称" span="1" prop="warehouseName">
-              <el-select v-model="parameter.warehouseName" placeholder="请选择仓库名称" filterable clearable>
-                 <el-option key="" label="全部仓库" value="全部仓库" />
+              <el-select @change="warehousechange" v-model="parameter.warehouseName" placeholder="请选择仓库名称" filterable clearable>
+                 <el-option v-if="headerText != '打印记录'"  key="" label="全部仓库" value="全部仓库" />
                 <el-option v-for="item in warehouseAllXiaLa" :key="item.warehouseName" :label="item.warehouseName" :value="item.warehouseName" />
               </el-select>
             </el-form-item>
-            <el-form-item label="增量比例(%)" v-if="headerText == '打印记录'">
+            <el-form-item label="仓库类型" span="1" prop="warehouseName">
+              <el-select v-model="parameter.binNumber" placeholder="请选择仓库类型" filterable clearable>
+                <el-option v-for="item in typeList" :key="item.id" :label="item.binNumber" :value="item.binNumber" />
+              </el-select>
+            </el-form-item>
+            <!-- <el-form-item label="增量比例(%)" v-if="headerText == '打印记录'">
               <el-input placeholder="请输入增量比例" v-model="parameter.proportion" clearable class="proportion_css">
               </el-input>
-            </el-form-item>
+            </el-form-item> -->
           </el-form>
         </div>
       </div>
@@ -298,7 +303,8 @@
     getResponsible,
     deletewarehouse,
     postInWeight,
-    getwarehousName
+    getwarehousName,
+    getbintype
   } from '@/model/warehouse/index'
   import mapDrag from '@/components/mapdrag/warehouseMap'
   import {
@@ -363,6 +369,7 @@
         },
         isShowPrintType: false, //打印
         headerText: '',
+        typeList:[],
         isShowPrintType1: false,
         headerText1: '导出历史库存记录',
         date: {
@@ -402,6 +409,19 @@
           let minutes = d.getMinutes()<10?'0'+d.getMinutes():d.getMinutes()
           let seconds = d.getSeconds()<10?'0'+d.getSeconds():d.getSeconds()
            this.parameter.printEndDate = year + "-" + month+ "-" +date + " "+hours+":"+minutes+":"+seconds;
+      },
+      warehousechange(e){
+        for (let i = 0; i < this.warehouseAllXiaLa.length; i++) {
+          if(this.warehouseAllXiaLa[i].warehouseName==e){
+            getbintype({baseId:this.warehouseAllXiaLa[i].id}).toPromise()
+            .then((response) => {
+              console.log(response)
+              this.typeList=response
+            })
+          }
+          
+        }
+        
       },
        //导出、打印
       outData(index) {
@@ -421,6 +441,7 @@
         // this.parameter.endDate1 = Date.now()
         this.$forceUpdate();
         this.isShowPrintType = true
+        
       },
        removePrint() {
         this.parameter.warehouseName = ''
@@ -458,7 +479,7 @@
             } = await postExport({
               startDate: this.parameter.printStartDate,
               endDate: this.parameter.printEndDate,
-              warehouseName: this.parameter.warehouseName
+              warehouseName: this.parameter.warehouseName,
             }, {}, {
               responseType: 'blob'
             }).toPromise()
@@ -475,7 +496,7 @@
             } = await postExportOut({
               startDate: this.parameter.printStartDate,
               endDate: this.parameter.printEndDate,
-              warehouseName: this.parameter.warehouseName
+              warehouseName: this.parameter.warehouseName,
             }, {}, {
               responseType: 'blob'
             }).toPromise()
@@ -496,6 +517,7 @@
               searchType: this.parameter.radio,
               currentPage: 1,
               pageSize: 999,
+              statusFlag:3
             }).toPromise()
             .then((response) => {
               if (response.records.length == 0) {