Forráskód Böngészése

仓储业务修改02

wengyuwen 4 éve
szülő
commit
8839faf923

+ 8 - 0
src/api/warehouseBusiness/goodsTransfer.js

@@ -96,3 +96,11 @@ export function RevocationApproval(data){
     data:data
   })
 }
+
+// 撤销请核
+export function backFee(fId) {
+  return request({
+    url: '/warehouseBusiness/inStock/withdrawById/' + fId,
+    method: 'get',
+  })
+}

+ 17 - 0
src/api/warehouseBusiness/stockTransfer.js

@@ -87,3 +87,20 @@ export function exportStockTransfer(query) {
     params: query
   })
 }
+
+// 撤销审批
+export function RevocationApproval(data){
+  return request({
+    url:'/warehouse/paths/revoke',
+    method:'post',
+    data:data
+  })
+}
+
+// 撤销请核
+export function backFee(fId) {
+  return request({
+    url: '/warehouseBusiness/stockTransfer/withdrawById/' + fId,
+    method: 'get',
+  })
+}

+ 1 - 1
src/views/index.vue

@@ -205,7 +205,7 @@ export default {
           break
         }
         case 'CKDB': {
-          this.$router.push({ path: '/business/transfer', query: { data: JSON.stringify(row) } })
+          this.$router.push({ path: '/business/stockTransfer', query: { data: JSON.stringify(row) } })
           break
         }
         case 'JSCCF': {

+ 16 - 16
src/views/warehouseBusiness/agreement/index.vue

@@ -723,22 +723,22 @@ export default {
             this.disappear = false
             this.reset()
             const fId = row.fId || this.ids
-            // getAgreement(row.fId).then(response => {
-            //   console.log(response)
-            //   this.deptName = response.data.dept.deptName
-            //   this.form = response.data.tWarehouseAgreement
-            //   this.fMblnoOptions = response.data.corps
-            //   this.agreementitemsList = response.data.tWarehouseAgreementitems
-            //   for (let item in this.agreementitemsList) {
-            //     this.$set(this.agreementitemsList[item], 'fFeeunitid', this.agreementitemsList[item].fFeeunitid + '')
-            //     // this.fWRemoteMethod(this.agreementitemsList[item].fFeeid)
-            //   }
-            //   // console.log(response.data.feesList)
-            //   this.fWbuOptions = response.data.feesList
-            //   this.add = row
-            //   console.log(JSON.stringify(this.agreementitemsList))
-            //   this.open = true
-            // })
+            getAgreement(row.fId).then(response => {
+              console.log(response)
+              this.deptName = response.data.dept.deptName
+              this.form = response.data.tWarehouseAgreement
+              this.fMblnoOptions = response.data.corps
+              this.agreementitemsList = response.data.tWarehouseAgreementitems
+              for (let item in this.agreementitemsList) {
+                this.$set(this.agreementitemsList[item], 'fFeeunitid', this.agreementitemsList[item].fFeeunitid + '')
+                // this.fWRemoteMethod(this.agreementitemsList[item].fFeeid)
+              }
+              // console.log(response.data.feesList)
+              this.fWbuOptions = response.data.feesList
+              this.add = row
+              console.log(JSON.stringify(this.agreementitemsList))
+              this.open = true
+            })
           }else {
             this.notChange = true
           }

+ 189 - 18
src/views/warehouseBusiness/goodsTransfer/index.vue

@@ -285,7 +285,7 @@
             size="mini"
             type="text"
             icon="el-icon-edit"
-            @click="handleUpdate(scope.row, true)"
+            @click="check(scope.row,0)"
             v-hasPermi="['warehouseBusiness:goodsTransfer:edit']"
           >查看
           </el-button>
@@ -303,7 +303,7 @@
             type="text"
             icon="el-icon-edit"
             v-if="scope.row.fBillstatus === 4 || scope.row.fBillstatus === 5"
-            @click="handleUpdate(scope.row, false)"
+            @click="check(scope.row)"
             v-hasPermi="['warehouseBusiness:goodsTransfer:edit']"
           >审批进度
           </el-button>
@@ -333,6 +333,7 @@
       :close-on-click-modal="false"
       width="80%"
       append-to-body
+      :show-close="colseButton"
 
     >
       <el-form ref="form" :model="form" :rules="rules" label-width="120px">
@@ -343,7 +344,7 @@
                 v-model="form.fCorpid"
                 filterable
                 remote
-                :disabled="browseStatus || formBrowseStatus"
+                :disabled="notChange"
                 style="width: 80%"
                 :remote-method="corpsRemoteMethod"
                 placeholder="请选择货权方"
@@ -363,7 +364,7 @@
                 v-model="form.fTocorpid"
                 filterable
                 remote
-                :disabled="browseStatus || formBrowseStatus"
+                :disabled="notChange"
                 style="width: 80%"
                 @change="changefCorpid(form)"
                 :remote-method="corpsRemoteMethod"
@@ -396,7 +397,7 @@
                 v-model="form.fBsdate"
                 style="width: 80%"
                 type="date"
-                :disabled="browseStatus || formBrowseStatus"
+                :disabled="notChange"
                 value-format="timestamp"
                 placeholder="货转日期"
               >
@@ -409,7 +410,7 @@
                 v-model="form.fChargedate"
                 style="width: 80%"
                 type="date"
-                :disabled="browseStatus || formBrowseStatus"
+                :disabled="notChange"
                 value-format="timestamp"
                 placeholder="仓储计费日期">
               </el-date-picker>
@@ -420,7 +421,7 @@
               <el-select
                 v-model="form.fWarehouseid"
                 filterable
-                :disabled="browseStatus || formBrowseStatus"
+                :disabled="notChange"
                 remote
                 style="width: 80%"
                 :remote-method="warehouseRemoteMethod"
@@ -442,7 +443,7 @@
                 v-model="form.fStltypeid"
                 placeholder="请选择结算方式"
                 clearable
-                :disabled="browseStatus || formBrowseStatus"
+                :disabled="notChange"
                 style="width: 80%"
               >
                 <el-option
@@ -460,7 +461,7 @@
                 v-model="form.fFeetunit"
                 placeholder="请选择计费单位"
                 clearable
-                :disabled="browseStatus || formBrowseStatus"
+                :disabled="notChange"
                 style="width: 80%"
               >
                 <el-option
@@ -478,7 +479,7 @@
                 v-model="form.fTrademodeid"
                 placeholder="请选择贸易方式"
                 clearable
-                :disabled="browseStatus || formBrowseStatus"
+                :disabled="notChange"
                 style="width: 80%"
               >
                 <el-option
@@ -561,7 +562,7 @@
           </el-col>
         </el-row>
         <el-button type="primary" :disabled="browseStatus" @click="saveForm">保 存</el-button>
-        <el-button type="primary" :disabled="browseStatus" @click="submitForm">请 核</el-button>
+        <el-button type="primary" :disabled="notChange" @click="submitForm">请 核</el-button>
       </el-form>
       <div class="dialogTableTitle flex a-center jlr">
         <h3>货转明细</h3>
@@ -1383,12 +1384,14 @@
         <add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
         <approval-comments v-if="addOrUpdateVisib" ref="ApprovalComments" @refreshDataList="returnData"></approval-comments>
 
-        <el-button type="primary" @click="saveForm">保 存</el-button>
+        <el-button type="primary" :disabled="notChange" @click="saveForm">保 存</el-button>
         <el-button v-if="approve === true" @click="goApproval">审批</el-button>
+        <el-button type="success" @click="backrRconciliation" v-if="form.fBillstatus == '6'">撤销请核</el-button>
         <el-button type="primary" v-if="notChange" @click="addOrUpdateHandle()">查看审批流</el-button>
-        <el-button type="primary" @click="submitForm">提交审核</el-button>
+        <el-button type="primary" :disabled="notChange" @click="submitForm">提交审核</el-button>
         <el-button type="danger" size="small" :disabled="disappear" v-if="form.fBillstatus === '4'" @click="backApproval">撤销审批</el-button>
-        <el-button @click="cancel">取 消</el-button>
+        <el-button v-if="cancelButton === true" @click="cancel">取 消</el-button>
+        <el-button v-if="cancelButton === false" @click="homePage">取消</el-button>
       </div>
       <!-- 选择库存总账数据 -->
       <el-dialog
@@ -1465,6 +1468,7 @@
 <script>
   import print from 'print-js'
   import {
+    backFee,
     RevocationApproval,
     addWhgenleg,
     listGoodsTransfer,
@@ -1494,6 +1498,8 @@
   import AddOrUpdate from '@/views/viewApproval'
   import ApprovalComments from '@/views/startApproval'
   import Global from '@/layout/components/global'
+  import { getAgreement } from '@/api/warehouseBusiness/agreement'
+
   export default {
     name: 'goodsTransfer',
     components: {
@@ -1503,6 +1509,8 @@
     },
     data() {
       return {
+        colseButton:true,
+        cancelButton:true,
         disappear:false,
         goodsTransferId:130,
         addOrUpdateVisible: false,
@@ -1716,8 +1724,32 @@
       this.getDicts('sys_common_status').then((response) => {
         this.fBillstatusOptions = response.data
       })
+      this.register()
+    },
+    activated(){
+      this.Jump()
     },
     methods: {
+      // 撤销审核
+      backrRconciliation(){
+        this.queryParams.fBillstatus = '1'
+        // let formDate = new window.FormData()
+        // formDate.append('tFee',JSON.stringify(this.queryParams))
+        // formDate.append("tFeeDo", JSON.stringify(this.DzfeeList))
+
+        backFee(this.form.fId).then(response=>{
+          this.msgSuccess("撤回成功")
+
+        })
+        // this.open = false
+        this.getList()
+      },
+      // 默认录入人
+      register() {
+        queryUserVal().then((response)=>{
+          this.Lander = response.user.userName
+        })
+      },
       // 审批按钮
       goApproval(){
         this.addOrUpdateVisib = true
@@ -1731,12 +1763,15 @@
           this.colseButton = false
           this.approval = JSON.parse(this.approval)
           this.hide = false
+          this.open = true
+          this.browseStatus = true
           this.notChange = true
           this.approve = true
           this.disappear = true
           this.cancelButton = false
+
           this.reset()
-          getGoodsTransfer(fId).then((response) => {
+          getGoodsTransfer(this.approval.billId).then((response) => {
             this.form = response.data.warehousebills
             this.$set(this.form, 'fStltypeid', this.form.fStltypeid + '')
             this.$set(this.form, 'fFeetunit', Number(this.form.fFeetunit))
@@ -2069,7 +2104,6 @@
       cancel() {
         this.reset()
         this.open = false
-        this.form = []
         this.getList()
       },
       // 表单重置
@@ -2104,6 +2138,22 @@
       },
       /** 新增按钮操作 */
       handleAdd() {
+        this.form = {
+          fCorpid:'',
+          fTocorpid:'',
+          fBillno:'',
+          fBsdate:'',
+          fChargedate:'',
+          fWarehouseid:'',
+          fStltypeid:'',
+          fFeetunit:'',
+          fTrademodeid:'',
+          fMblno:'',
+          fOriginalbillno:'',
+          orgStorageDate:''
+        }
+        this.notChange = false
+        this.browseStatus = false
         this.reset()
         this.queryUser()
         this.open = true
@@ -2113,9 +2163,126 @@
         this.relevantAttachments = []
         this.title = '货权转移'
       },
+      // 查看按钮
+      check(row, res) {
+        this.notChange = true
+        this.browseStatus = true
+        const fId = row.fId || this.ids
+        getGoodsTransfer(fId).then((response) => {
+          this.form = response.data.warehousebills
+          this.$set(this.form, 'fStltypeid', this.form.fStltypeid + '')
+          this.$set(this.form, 'fFeetunit', Number(this.form.fFeetunit))
+          this.$set(this.form, 'fChargedate', Date.parse(this.form.fChargedate))
+          this.$set(this.form, 'fTrademodeid', this.form.fTrademodeid + '')
+          this.fMblnoOptions = response.data.corps
+          this.KHblnoOptions = response.data.corps
+          this.fWbuOptions = response.data.feesList
+          this.warehouseOptions = response.data.warehouse
+          this.dataList = response.data.warehouseBillsItem
+          for (let list in this.dataList) {
+            if (this.dataList[list].fBillstatus && this.dataList[list].fBillstatus === 6) {
+              this.formBrowseStatus = true
+            }
+            this.$set(this.dataList[list], 'fBsdate', Date.parse(this.dataList[list].fBsdate))
+          }
+          this.goodsOptions = response.data.goodsList
+          if (response.data.warehousebillsfeesDr) {
+            this.warehouseDrList = response.data.warehousebillsfeesDr
+          }
+          if (response.data.warehousebillsfeesCr) {
+            this.warehouseCrList = response.data.warehousebillsfeesCr
+          }
+          if (response.data.enclosures) {
+            this.relevantAttachments = response.data.enclosures;
+          }
+          this.userOptions = response.data.sysUser
+          this.$set(this.form, 'fBsdate', Date.parse(this.form.fBsdate))
+          this.open = true
+          this.title = '修改货存转移'
+          // if (res == 1) {
+          //   this.notChange = true
+          //   if (this.Operator == this.Lander) {
+          //     this.disappear = false
+          //     this.reset()
+          //     const fId = row.fId || this.ids
+          //     getGoodsTransfer(fId).then((response) => {
+          //       this.form = response.data.warehousebills
+          //       this.$set(this.form, 'fStltypeid', this.form.fStltypeid + '')
+          //       this.$set(this.form, 'fFeetunit', Number(this.form.fFeetunit))
+          //       this.$set(this.form, 'fChargedate', Date.parse(this.form.fChargedate))
+          //       this.$set(this.form, 'fTrademodeid', this.form.fTrademodeid + '')
+          //       this.fMblnoOptions = response.data.corps
+          //       this.KHblnoOptions = response.data.corps
+          //       this.fWbuOptions = response.data.feesList
+          //       this.warehouseOptions = response.data.warehouse
+          //       this.dataList = response.data.warehouseBillsItem
+          //       for (let list in this.dataList) {
+          //         if (this.dataList[list].fBillstatus && this.dataList[list].fBillstatus === 6) {
+          //           this.formBrowseStatus = true
+          //         }
+          //         this.$set(this.dataList[list], 'fBsdate', Date.parse(this.dataList[list].fBsdate))
+          //       }
+          //       this.goodsOptions = response.data.goodsList
+          //       if (response.data.warehousebillsfeesDr) {
+          //         this.warehouseDrList = response.data.warehousebillsfeesDr
+          //       }
+          //       if (response.data.warehousebillsfeesCr) {
+          //         this.warehouseCrList = response.data.warehousebillsfeesCr
+          //       }
+          //       if (response.data.enclosures) {
+          //         this.relevantAttachments = response.data.enclosures;
+          //       }
+          //       this.userOptions = response.data.sysUser
+          //       this.$set(this.form, 'fBsdate', Date.parse(this.form.fBsdate))
+          //       this.open = true
+          //       this.title = '修改货存转移'
+          //     })
+          //   } else {
+          //     // this.notChange = true
+          //   }
+          // } else {
+          //   // this.notChange = true
+          //   this.reset()
+          //   const fId = row.fId || this.ids
+          //   getGoodsTransfer(fId).then((response) => {
+          //     this.form = response.data.warehousebills
+          //     this.$set(this.form, 'fStltypeid', this.form.fStltypeid + '')
+          //     this.$set(this.form, 'fFeetunit', Number(this.form.fFeetunit))
+          //     this.$set(this.form, 'fChargedate', Date.parse(this.form.fChargedate))
+          //     this.$set(this.form, 'fTrademodeid', this.form.fTrademodeid + '')
+          //     this.fMblnoOptions = response.data.corps
+          //     this.KHblnoOptions = response.data.corps
+          //     this.fWbuOptions = response.data.feesList
+          //     this.warehouseOptions = response.data.warehouse
+          //     this.dataList = response.data.warehouseBillsItem
+          //     for (let list in this.dataList) {
+          //       if (this.dataList[list].fBillstatus && this.dataList[list].fBillstatus === 6) {
+          //         this.formBrowseStatus = true
+          //       }
+          //       this.$set(this.dataList[list], 'fBsdate', Date.parse(this.dataList[list].fBsdate))
+          //     }
+          //     this.goodsOptions = response.data.goodsList
+          //     if (response.data.warehousebillsfeesDr) {
+          //       this.warehouseDrList = response.data.warehousebillsfeesDr
+          //     }
+          //     if (response.data.warehousebillsfeesCr) {
+          //       this.warehouseCrList = response.data.warehousebillsfeesCr
+          //     }
+          //     if (response.data.enclosures) {
+          //       this.relevantAttachments = response.data.enclosures;
+          //     }
+          //     this.userOptions = response.data.sysUser
+          //     this.$set(this.form, 'fBsdate', Date.parse(this.form.fBsdate))
+          //     this.open = true
+          //     this.title = '修改货存转移'
+          //   })
+          // }
+        })
+      },
+
       /** 修改按钮操作 */
       handleUpdate(row, status) {
-        this.notChange = true
+        this.notChange = false
         this.browseStatus = status
         this.reset()
         const fId = row.fId || this.ids
@@ -2371,6 +2538,8 @@
         this.dataListSelection = row
       },
       saveForm() {
+        this.notChange = true
+        this.browseStatus = true
         this.updateDeduplication()
         this.$refs['form'].validate((valid) => {
           if (this.form.fCorpid === this.form.fTocorpid) {
@@ -2462,7 +2631,7 @@
             }
           }
           if (valid) {
-            this.form.fBillstatus = 4
+            // this.form.fBillstatus = 4
             let formData = new window.FormData()
             formData.append("warehouseBills", JSON.stringify(this.form));
             formData.append("warehousebillsitems", JSON.stringify(this.dataList));
@@ -2471,6 +2640,8 @@
             formData.append("warehousebillsfeesDr", JSON.stringify(this.warehouseDrList));
             warehouseSubmission(formData).then((response) => {
               this.msgSuccess('提交成功')
+              this.browseStatus = true
+              this.notChange = true
               this.cancel()
               this.getList()
             })

+ 303 - 14
src/views/warehouseBusiness/stockTransfer/index.vue

@@ -291,7 +291,7 @@
             size="mini"
             type="text"
             icon="el-icon-edit"
-            @click="handleUpdate(scope.row, true)"
+            @click="check(scope.row, true)"
             v-hasPermi="['warehouseBusiness:warehousebills:edit']"
             >查看
           </el-button>
@@ -299,6 +299,15 @@
             size="mini"
             type="text"
             icon="el-icon-edit"
+            v-if="scope.row.fBillstatus === 4 || scope.row.fBillstatus === 5"
+            @click="check(scope.row, true)"
+            v-hasPermi="['warehouseBusiness:goodsTransfer:edit']"
+          >审批进度
+          </el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-edit"
             v-if="scope.row.fBillstatus <= 3"
             @click="handleUpdate(scope.row, false)"
             v-hasPermi="['warehouseBusiness:warehousebills:edit']"
@@ -330,6 +339,7 @@
       @close='addCloseDialog'
       width="80%"
       append-to-body
+      :show-close="colseButton"
     >
       <el-form ref="form" :model="form" :rules="rules" label-width="120px">
         <el-row>
@@ -339,7 +349,7 @@
                 v-model="form.fCorpid"
                 filterable
                 remote
-                :disabled="browseStatus || formBrowseStatus"
+                :disabled="notChange"
                 @change="changefCorpid(form)"
                 style="width: 80%"
                 :remote-method="corpsRemoteMethod"
@@ -359,7 +369,7 @@
               <el-select
                 v-model="form.fStltypeid"
                 placeholder="请选择结算方式"
-                :disabled="browseStatus || formBrowseStatus"
+                :disabled="notChange"
                 clearable
                 style="width: 80%"
               >
@@ -377,7 +387,7 @@
               <el-input
                 v-model="form.fMblno"
                 style="width: 80%"
-                :disabled="browseStatus || formBrowseStatus"
+                :disabled="notChange"
                 placeholder="手工输入"
               />
             </el-form-item>
@@ -390,7 +400,7 @@
                 v-model="form.fBsdate"
                 style="width: 80%"
                 type="date"
-                :disabled="browseStatus || formBrowseStatus"
+                :disabled="notChange"
                 @change="changefBsdate"
                 value-format="timestamp"
                 placeholder="业务日期"
@@ -404,7 +414,7 @@
                 v-model="form.fStorekeeper"
                 filterable
                 remote
-                :disabled="browseStatus || formBrowseStatus"
+                :disabled="notChange"
                 style="width: 80%"
                 :remote-method="userRemoteMethod"
                 placeholder="请输入模糊查找"
@@ -425,7 +435,7 @@
                 filterable
                 remote
                 @change="changefWarehouseid(form)"
-                :disabled="browseStatus || formBrowseStatus"
+                :disabled="notChange"
                 style="width: 80%"
                 :remote-method="warehouseRemoteMethod"
                 placeholder="请输入模糊查找"
@@ -456,7 +466,7 @@
               <el-select
                 v-model="form.fIfdamage"
                 placeholder="请选择是否破损"
-                :disabled="browseStatus || formBrowseStatus"
+                :disabled="notChange"
                 clearable
                 style="width: 80%"
               >
@@ -474,7 +484,7 @@
               <el-select
                 v-model="form.fIfweigh"
                 placeholder="请选择是否过磅"
-                :disabled="browseStatus || formBrowseStatus"
+                :disabled="notChange"
                 clearable
                 style="width: 80%"
               >
@@ -494,7 +504,7 @@
               <el-select
                 v-model="form.fTrademodeid"
                 placeholder="请选择贸易方式"
-                :disabled="browseStatus || formBrowseStatus"
+                :disabled="notChange"
                 clearable
                 style="width: 80%"
               >
@@ -533,7 +543,7 @@
             <el-input
               style="width: 100%"
               v-model="form.remark"
-              :disabled="browseStatus || formBrowseStatus"
+              :disabled="notChange"
               type="textarea"
               placeholder="请输入内容"
             />
@@ -545,7 +555,7 @@
               <el-form-item label="仓库联系人" prop="fContacts">
                 <el-input
                   v-model="form.fContacts"
-                  :disabled="browseStatus || formBrowseStatus"
+                  :disabled="notChange"
                   style="width: 80%"
                   placeholder="仓库联系人"
                 />
@@ -555,7 +565,7 @@
               <el-form-item label="仓库电话" prop="ftel">
                 <el-input
                   v-model="form.fTel"
-                  :disabled="browseStatus || formBrowseStatus"
+                  :disabled="notChange"
                   style="width: 80%"
                   placeholder="请输仓库入电话"
                 />
@@ -1536,6 +1546,12 @@
         <el-button type="info" prop="打印" :disabled="printinglist.length <= 0 || browseStatus" @click="printJobSheet"
           >作业单
         </el-button>-->
+        <add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
+        <approval-comments v-if="addOrUpdateVisib" ref="ApprovalComments" @refreshDataList="returnData"></approval-comments>
+        <el-button v-if="approve === true" @click="goApproval">审批</el-button>
+        <el-button type="danger" size="small" :disabled="disappear" v-if="form.fBillstatus === '4'" @click="backApproval">撤销审批</el-button>
+        <el-button type="success" @click="backrRconciliation" v-if="form.fBillstatus == '6'">撤销请核</el-button>
+        <el-button type="primary" v-if="notChange" @click="addOrUpdateHandle()">查看审批流</el-button>
         <el-button type="primary" :disabled="browseStatus" @click="saveForm">保 存</el-button>
         <el-button
           style="background-color: #008000; color: #fff"
@@ -1543,7 +1559,8 @@
           :disabled="browseStatus"
           >请核</el-button
         >
-        <el-button @click="cancel">取 消</el-button>
+        <el-button v-if="cancelButton === true" @click="cancel">取 消</el-button>
+        <el-button v-if="cancelButton === false" @click="homePage">取消</el-button>
       </div>
       <!-- 选择库存总账数据 -->
       <el-dialog
@@ -2066,6 +2083,8 @@
 <script>
 import print from "print-js";
 import {
+  backFee,
+  RevocationApproval,
   addWhgenleg,
   getStockTransferList,
   getStockTransfer,
@@ -2098,14 +2117,27 @@ import { listUser, queryUserVal } from "@/api/system/user";
 import UploadFile from "@/components/Uploadfile";
 
 import { listWhgenleg } from "@/api/reportManagement/whgenleg";
+import Global from '@/layout/components/global'
+import AddOrUpdate from '@/views/viewApproval'
+import ApprovalComments from '@/views/startApproval'
 
 export default {
   name: "Warehousebills",
   components: {
     UploadFile,
+    AddOrUpdate,
+    ApprovalComments
   },
   data() {
     return {
+      cancelButton:true,
+      approve:false,
+      disappear:false,
+      colseButton:true,
+      addOrUpdateVisible: false,
+      addOrUpdateVisib:false,
+      stockTransferId:140,
+      notChange:false,
       index: 0,
       fFeeUnitid: null,
       fFeeUnitids: null,
@@ -2337,8 +2369,191 @@ export default {
     this.getDicts("sys_common_status").then((response) => {
       this.fBillstatusOptions = response.data;
     });
+    this.register()
+  },
+  activated(){
+    this.Jump()
   },
   methods: {
+    // 撤销审核
+    backrRconciliation(){
+      this.queryParams.fBillstatus = '1'
+      backFee(this.form.fId).then(response=>{
+        this.msgSuccess("撤回成功")
+
+      })
+      // this.open = false
+      this.getList()
+    },
+    // 默认录入人
+    register() {
+      queryUserVal().then((response)=>{
+        this.Lander = response.user.userName
+      })
+    },
+    // 审批按钮
+    goApproval(){
+      this.addOrUpdateVisib = true
+      this.$nextTick(() => {
+        this.$refs.ApprovalComments.init(this.form.fId,this.stockTransferId)
+      })
+    },
+    Jump(){
+      this.approval = this.$route.query.data
+      if(this.approval){
+        this.colseButton = false
+        this.approval = JSON.parse(this.approval)
+        this.hide = false
+        this.open = true
+        this.browseStatus = true
+        this.notChange = true
+        this.approve = true
+        this.disappear = true
+        this.cancelButton = false
+
+        this.reset()
+        getStockTransfer(this.approval.billId).then((response) => {
+          if (response.data.warehousebills) {
+            this.form = response.data.warehousebills;
+            this.$set(this.form, "fEta", Date.parse(this.form.fEta));
+            this.$set(this.form, "fStltypeid", this.form.fStltypeid + '');
+            this.$set(this.form, 'fFeetunit', Number(this.form.fFeetunit))
+            this.$set(this.form, "fBsdate", Date.parse(this.form.fBsdate));
+            this.$set(this.form, "fTrademodeid", this.form.fTrademodeid + '');
+            this.$set(this.form, 'createTime', Date.parse(this.form.createTime))
+          }
+          if (response.data.corps) {
+            this.fMblnoOptions = response.data.corps;
+            this.KHblnoOptions = response.data.corps;
+            this.fSbuOptions = response.data.corps;
+          }
+          if (response.data.feesList) {
+            this.fWbuOptions = response.data.feesList;
+          }
+          if (response.data.warehouse) {
+            this.warehouseOptions = response.data.warehouse;
+          }
+          if (response.data.warehouseBillsItem) {
+            this.dataList = response.data.warehouseBillsItem;
+            for (let list in this.dataList) {
+              if (!this.form.fMblno) {
+                this.$set(this.form, "fMblno", this.dataList[list].fMblno);
+              }
+              if (this.dataList[list].fBillstatus >= 6) {
+                this.formBrowseStatus = true;
+              }
+              this.$set(this.dataList[list], "fBsdate", Date.parse(this.dataList[list].fBsdate));
+            }
+          }
+          if (response.data.enclosures) {
+            this.relevantAttachments = response.data.enclosures;
+          }
+          if (response.data.warehouse) {
+            this.warehouseDrList = response.data.warehousebillsfeesDr;
+          }
+          if (response.data.warehousebillsfeesCr) {
+            this.warehouseCrList = response.data.warehousebillsfeesCr;
+          }
+          if (response.data.sysUser) {
+            this.userVal = response.data.sysUser
+            this.userOptions = response.data.sysUser;
+          }
+          if (response.data.dept) {
+            this.deptOptions = []
+            this.deptOptions.push(response.data.dept)
+          }
+          if (response.data.feesList) {
+            this.fWbuOptions = response.data.feesList;
+          }
+          if (response.data.goodsList) {
+            this.goodsOptions = response.data.goodsList;
+          }
+          if (response.data.warehouse) {
+            this.warehouseOptions = response.data.warehouse;
+          }
+          if (response.data.warehouseAreas) {
+            this.kqhouseOptions = response.data.warehouseAreas;
+          }
+          this.open = true;
+          this.title = "修改调拨";
+        });
+
+      }
+    },
+
+    homepaGe(){
+      let view = {
+        fullPath: "/business/stockTransfer",
+        hash: "",
+        matched: Array(2),
+        meta: Object,
+        name: "StockTransfer",
+        params: Object,
+        path: "/business/stockTransfer",
+        query: Object,
+        title: "调拨"
+      }
+      this.$router.push({ path: '/index'})
+      this.$store.dispatch('tagsView/delView', view).then(({ visitedViews }) => {
+        if (this.isActive(view)) {
+          this.toLastView(visitedViews, view)
+        }
+      })
+      Global.$emit("removeCache", "closeSelectedTag", view);
+    },
+    homePage() {
+      this.open = false
+      let view = {
+        fullPath: "/business/stockTransfer",
+        hash: "",
+        matched: Array(2),
+        meta: Object,
+        name: "StockTransfer",
+        params: Object,
+        path: "/business/stockTransfer",
+        query: Object,
+        title: "调拨"
+      }
+      this.$router.push({ path: '/index' })
+      this.$store.dispatch('tagsView/delView', view).then(({ visitedViews }) => {
+        if (this.isActive(view)) {
+          this.toLastView(visitedViews, view)
+        }
+      })
+      Global.$emit("removeCache", "closeSelectedTag", view);
+    },
+    // 撤销审批
+    backApproval(){
+      let data = {
+        id:this.form.fId,
+        actId:this.stockTransferId,
+        billId:this.form.fId
+      }
+      RevocationApproval(data).then(response => {
+        this.msgSuccess("撤销审批成功")
+        this.disappear = true
+        this.open = false
+        this.getList()
+      })
+    },
+    returnData(){
+      this.addOrUpdateVisib = false
+      this.open = false
+      this.homepaGe()
+    },
+    getDataList(){
+      this.addOrUpdateVisible = false
+    },
+    // 查看审批流
+    addOrUpdateHandle(){
+      this.addOrUpdateVisible = true
+      this.addOrUpdateVisib = false
+      let id = '448'
+      let actId = '110'
+      this.$nextTick(() => {
+        this.$refs.addOrUpdate.init(this.form.fId,this.stockTransferId)
+      })
+    },
     //关闭弹框的事件
     addCloseDialog(){
       this.getList()
@@ -2955,8 +3170,82 @@ export default {
       this.title = "调拨单";
       this.formBrowseStatus = false;
     },
+    check(row, status){
+      this.notChange = true
+      this.browseStatus = status;
+      this.reset();
+      this.detailsHidden = false;
+      let data = row || this.ids;
+      getStockTransfer(data.fId).then((response) => {
+        if (response.data.warehousebills) {
+          this.form = response.data.warehousebills;
+          this.$set(this.form, "fEta", Date.parse(this.form.fEta));
+          this.$set(this.form, "fStltypeid", this.form.fStltypeid + '');
+          this.$set(this.form, 'fFeetunit', Number(this.form.fFeetunit))
+          this.$set(this.form, "fBsdate", Date.parse(this.form.fBsdate));
+          this.$set(this.form, "fTrademodeid", this.form.fTrademodeid + '');
+          this.$set(this.form, 'createTime', Date.parse(this.form.createTime))
+        }
+        if (response.data.corps) {
+          this.fMblnoOptions = response.data.corps;
+          this.KHblnoOptions = response.data.corps;
+          this.fSbuOptions = response.data.corps;
+        }
+        if (response.data.feesList) {
+          this.fWbuOptions = response.data.feesList;
+        }
+        if (response.data.warehouse) {
+          this.warehouseOptions = response.data.warehouse;
+        }
+        if (response.data.warehouseBillsItem) {
+          this.dataList = response.data.warehouseBillsItem;
+          for (let list in this.dataList) {
+            if (!this.form.fMblno) {
+              this.$set(this.form, "fMblno", this.dataList[list].fMblno);
+            }
+            if (this.dataList[list].fBillstatus >= 6) {
+              this.formBrowseStatus = true;
+            }
+            this.$set(this.dataList[list], "fBsdate", Date.parse(this.dataList[list].fBsdate));
+          }
+        }
+        if (response.data.enclosures) {
+          this.relevantAttachments = response.data.enclosures;
+        }
+        if (response.data.warehouse) {
+          this.warehouseDrList = response.data.warehousebillsfeesDr;
+        }
+        if (response.data.warehousebillsfeesCr) {
+          this.warehouseCrList = response.data.warehousebillsfeesCr;
+        }
+        if (response.data.sysUser) {
+          this.userVal = response.data.sysUser
+          this.userOptions = response.data.sysUser;
+        }
+        if (response.data.dept) {
+          this.deptOptions = []
+          this.deptOptions.push(response.data.dept)
+        }
+        if (response.data.feesList) {
+          this.fWbuOptions = response.data.feesList;
+        }
+        if (response.data.goodsList) {
+          this.goodsOptions = response.data.goodsList;
+        }
+        if (response.data.warehouse) {
+          this.warehouseOptions = response.data.warehouse;
+        }
+        if (response.data.warehouseAreas) {
+          this.kqhouseOptions = response.data.warehouseAreas;
+        }
+        this.open = true;
+        this.title = "修改调拨";
+      });
+
+    },
     /** 修改按钮操作 */
     handleUpdate(row, status) {
+      this.notChange = false
       this.browseStatus = status;
       this.reset();
       this.detailsHidden = false;