Browse Source

Merge branch 'master' of http://git.echepei.com/zhujiawei/Warehouse_management_ui

tong 4 năm trước cách đây
mục cha
commit
d5686bdced

+ 8 - 0
src/api/finance/charge.js

@@ -92,3 +92,11 @@ export function backCharge(queryParameter) {
     data: queryParameter
   })
 }
+// 撤销审批
+export function revocation(data) {
+  return request({
+    url: '/warehouse/paths/revoke',
+    method: 'post',
+    data: data
+  })
+}

+ 10 - 1
src/api/finance/contrast.js

@@ -8,7 +8,7 @@ export function listFee(query) {
     params: query
   })
 }
- 
+
 // 查询财务数据主详细
 export function getFee(fId) {
   return request({
@@ -90,3 +90,12 @@ export function backFee(TWareHouseFees) {
     data: TWareHouseFees
   })
 }
+
+//撤销审批
+export function RevocationApproval(data){
+  return request({
+    url:'/warehouse/paths/revoke',
+    method:'post',
+    data:data
+  })
+}

+ 8 - 0
src/api/finance/payment.js

@@ -92,3 +92,11 @@ export function backCharge(queryParameter) {
     data: queryParameter
   })
 }
+// 撤销审批
+export function revocation(data) {
+  return request({
+    url: '/warehouse/payment/revoke',
+    method: 'post',
+    data: data
+  })
+}

+ 69 - 12
src/views/finance/charge/index.vue

@@ -198,7 +198,7 @@
     />
 
     <!-- 添加或修改财务数据主对话框 -->
-    <el-dialog :close-on-click-modal="false" :title="title" :visible.sync="open" width="70%" append-to-body>
+    <el-dialog :close-on-click-modal="false" :title="title" :show-close="Xbutton" :visible.sync="open" width="70%" append-to-body>
       <el-form :model="queryParams" :rules="ruless" ref="ruless" :inline="true" v-show="showSearch"
                label-width="68px"
       >
@@ -269,7 +269,7 @@
         <el-button type="success" size="small" @click="revokeCharge" v-if="queryParams.fBillstatus === '6'">撤销收费</el-button>
         <el-button type="info" size="small" @click="printing" :disabled="notChange">打印</el-button>
 <!--        <el-button type="danger" size="small" :disabled="notChange" v-show="Lander == Operator">撤销审批</el-button>-->
-        <el-button type="danger" size="small" :disabled="tablefilter" v-show="queryParams.fBillstatus === '4'">撤销审批</el-button>
+        <el-button type="danger" size="small" :disabled="tablefilter" @click="approvalRevocation" v-show="queryParams.fBillstatus === '4'">撤销审批</el-button>
       </div>
       <el-table v-loading="loading" :data="increase_s" @selection-change="handleSelectionChange_s">
         <!-- <el-table-column type="selection" width="55" align="center"/> -->
@@ -314,11 +314,13 @@
         </el-table-column>
       </el-table>
       <div slot="footer" class="dialog-footer">
-        <el-button v-if="approve === true">审批</el-button>
+        <el-button v-if="approve === true" @click="immediateApproval">审批</el-button>
         <el-button type="primary" v-if="notChange" @click="addOrUpdateHandle">查看审批流</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 type="primary" @click="submitForm" :disabled="notChange">保 存</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 :close-on-click-modal="false" width="70%" :visible.sync="innerVisible" title="导入数据" append-to-body>
         <el-form ref="form" :model="queryParameter" :rules="rules" label-width="80px"
@@ -517,13 +519,15 @@ import {
   search,
   listCorps,
   delCharge_s,
-  backCharge
+  backCharge,
+  revocation
 } from '@/api/finance/charge'
 import { listFees } from '@/api/basicdata/fees'
 import print from 'print-js'
 import AddOrUpdate from '@/views/viewApproval'
 import ApprovalComments from '@/views/startApproval'
 import { queryUserVal } from '@/api/warehouseBusiness/agreement'
+import Global from '@/layout/components/global'
 
 export default {
   name: 'Charge',
@@ -554,6 +558,7 @@ export default {
       chargeList_s: [],
       selection: '',
       increase_s: [],
+      cancelButton:true,
       // 选中数组
       ids: [],
       // 非单个禁用
@@ -591,6 +596,7 @@ export default {
         fMblno: '',    //提单号
         fName: ''      //货权方
       },
+      Xbutton:true,
       // 查询参数
       queryParams: {
         fId: null,
@@ -608,6 +614,7 @@ export default {
         fAccbilldate: null,
         fDeptid: null
       },
+      addOrUpdateVisib: false,
       // 主表查询参数
       tableFilter: {
         pageNum: 1,
@@ -666,18 +673,39 @@ export default {
   created() {
     this.getList()
     this.register()
+
+  },
+  activated(){
     this.adoPt()
   },
   methods: {
+    approvalRevocation(){
+      let  data = {
+        id:this.queryParams.fId,
+        actId:this.contrastId,
+        billId:this.queryParams.fId
+      }
+      console.log(this.queryParams)
+      revocation(data).then(data =>{
+        console.log(data)
+        if (data.code === 200){
+          this.$message.success('撤销成功');
+          this.open = false
+        }
+      })
+    },
+    returnData(){
+      this.addOrUpdateVisib = false
+    },
     adoPt(){
       this.approval = this.$route.query.data
-      // this.approval = JSON.parse()
-      console.log(this.approval)
       if (this.approval){
-        console.log('张三')
+        this.Xbutton = false
+        this.approval = JSON.parse(this.approval)
         this.hide = false
         this.notChange = true
         this.approve = true
+        this.cancelButton = false
         this.reset()
         this.pass = {
           fAmtdr: '',    //应收合计
@@ -687,7 +715,7 @@ export default {
           fFeesName: '',   //结算单位
           fCorpid: ''     //结算单位ID
         }
-        getCharge(32).then(response => {
+        getCharge(this.approval.billId).then(response => {
           console.log(response)
           this.Operator = response.data.tFee.createBy
           this.increase_s = response.data.feeDoList
@@ -700,11 +728,39 @@ export default {
         })
       }
     },
+    homePage(){
+      this.open = false
+      let view = {
+        fullPath: "/finance/charge",
+        hash: "",
+        matched: Array(2),
+        meta: Object,
+        name: "Charge",
+        params: Object,
+        path: "/finance/charge",
+        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);
+    },
     register(){
       queryUserVal().then((response)=>{
         this.Lander = response.user.userName
       })
     },
+    immediateApproval(){
+      this.addOrUpdateVisib = true
+      console.log(this.approval)
+      this.$nextTick(() => {
+        this.$refs.ApprovalComments.init(this.approval.billId,this.approval.actId)
+      })
+    },
     getDataList(){
       this.addOrUpdateVisible = false
     },
@@ -726,9 +782,8 @@ export default {
       let formDate = new window.FormData()
       formDate.append('tFee', JSON.stringify(this.queryParams))
       formDate.append('tFeeDo', JSON.stringify(this.increase_s))
-
       backCharge(formDate).then(response => {
-        console.log(response)
+        this.open = false
         this.msgSuccess('操作成功')
         this.getList()
       })
@@ -750,10 +805,11 @@ export default {
         this.title = '收费列表'
         console.log(this.Lander)
         console.log(this.Operator)
+        this.tablefilter = true
         if (res == 1){
           this.notChange = true
-          this.tablefilter = false
           if (this.Operator == this.Lander){
+            this.tablefilter = false
             this.reset()
             this.pass = {
               fAmtdr: '',    //应收合计
@@ -1117,6 +1173,7 @@ export default {
     /** 修改按钮操作 */
     handleUpdate(row) {
       console.log(row)
+      this.approve = false
       this.hide = false
       this.notChange = false
       this.reset()

+ 84 - 184
src/views/finance/contrast/index.vue

@@ -19,13 +19,6 @@
           :remote-method="corpsRemoteMethod"
           />
 
-          <!-- <el-option
-            v-for="(dict, index) in fMblnoOptions"
-            :key="index.fId"
-            :label="dict.fName"
-            :value="dict.fId"
-          ></el-option>
-        </el-select> -->
       </el-form-item>
 
       <el-form-item label="结算单位" prop="fCorpid">
@@ -48,46 +41,6 @@
         </el-select>
       </el-form-item>
 
-<!--      <el-form-item label="录入人" prop="createBy">-->
-<!--        <el-input-->
-<!--          v-model="queryParams_s.createBy"-->
-<!--          size="small"-->
-<!--          disabled-->
-<!--        />-->
-<!--      </el-form-item>-->
-
-      <!-- <el-form-item label="提单号" prop="tMblno">
-        <el-input
-          v-model="queryParams.tMblno"
-          placeholder="请输入提单号"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>-->
-      <!-- <el-form-item label="应收合计" prop="fAmtdr">
-        <el-input
-          v-model="queryParams.fAmtdr"
-          placeholder="请输入应收合计"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item> -->
-      <!-- <el-form-item label="应付合计" prop="fAmtcr">
-        <el-input
-          v-model="queryParams.fAmtcr"
-          placeholder="请输入应付合计"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item> -->
-      <!-- <el-form-item label="单据类型" prop="fBilltype">
-        <el-select v-model="queryParams.fBilltype" placeholder="请选择单据类型" clearable size="small">
-          <el-option label="请选择字典生成" value="" />
-        </el-select>
-      </el-form-item> -->
 
       <el-form-item label="对账日期" prop="dateRange">
         <el-date-picker
@@ -102,27 +55,6 @@
         ></el-date-picker>
       </el-form-item>
 
-<!--      <el-form-item label="状态" prop="fBillstatus">-->
-<!--        <el-select v-model="queryParams_s.fBillstatus" placeholder="请选择">-->
-<!--          <el-option-->
-<!--            -->
-<!--            v-for="item in options"-->
-<!--            :key="item.value"-->
-<!--            :label="item.dictLabel"-->
-<!--            :value="item.dictValue"-->
-<!--          >-->
-<!--          </el-option>-->
-<!--        </el-select>-->
-<!--      </el-form-item>-->
-      <!-- <el-form-item label="备注" prop="fRemarks">
-        <el-input
-          v-model="queryParams.fRemarks"
-          placeholder="请输入备注"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>-->
       <el-form-item label="系统编号" prop="fBillno">
         <el-input
           v-model="tablefilter.fBillno"
@@ -133,9 +65,6 @@
         />
       </el-form-item>
 
-      <!-- <el-form-item label="制单部门" prop="fDeptid">
-        <el-input label="请选择字典生成" value="" v-model="queryParams.fDeptid" placeholder="请选择制单部门" clearable size="small"/>
-      </el-form-item> -->
       <el-form-item>
         <el-button
           type="cyan"
@@ -291,6 +220,7 @@
       width="70%"
       append-to-body
       :close-on-click-modal="false"
+      :show-close="colseButton"
     >
       <el-form
         ref="ruless"
@@ -349,15 +279,6 @@
           </el-date-picker>
         </el-form-item>
 
-        <!-- <el-form-item label="单据日期">
-        <el-date-picker
-          v-model="value4"
-          size="small"
-          style="width: 240px"
-          value-format="yyyy-MM-dd"
-          type="date">
-        </el-date-picker>
-      </el-form-item> -->
 
         <el-form-item label="系统编号" prop="fBillno">
           <el-input
@@ -395,8 +316,6 @@
         :data="DzfeeList"
         @selection-change="handleSelectionChange_s"
       >
-        <!-- <el-table-column type="selection" width="55" align="center" /> -->
-        <!-- <el-table-column label="制单部门" align="center" prop="fId" /> -->
         <el-table-column label="行号" align="center" type="index" />
         <el-table-column label="提单号" align="center" prop="fMblno" />
         <el-table-column label="业务日期" align="center" prop="fBsdate">
@@ -438,13 +357,13 @@
       </el-table>
 
       <div slot="footer" class="dialog-footer">
-        <el-button v-if="approve === true" @click="addOrUpdateHand">审批</el-button>
-        <el-button type="info" v-show="notChange" @click="addOrUpdateHandle()">查看审批流</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="info" v-if="notChange" @click="addOrUpdateHandle()">查看审批流</el-button>
         <el-button type="primary" @click="submitForm" :disabled="notChange">保 存</el-button>
-        <el-button @click="cancel">取 消</el-button>
-<!--        <el-button>取1消</el-button>-->
+        <el-button v-if="cancelButton === true" @click="cancel">取 消</el-button>
+        <el-button v-if="cancelButton === false" @click="homePage">取消</el-button>
       </div>
 
       <!-- 添加或修改财务数据主对话框 -->
@@ -462,9 +381,6 @@
           label-width="80px"
           :inline="true"
         >
-          <!-- <el-form-item label="业务编号" prop="fBillno">
-          <el-input v-model="form.fBillno" placeholder="请输入业务编号" />
-        </el-form-item> -->
 
           <el-form-item
             label="货权方"
@@ -658,41 +574,6 @@
             </el-table-column>
           </el-table>
 
-          <!-- <el-form-item label="应收合计" prop="fAmtdr">
-          <el-input v-model="form.fAmtdr" placeholder="请输入应收合计" />
-        </el-form-item>
-        <el-form-item label="应付合计" prop="fAmtcr">
-          <el-input v-model="form.fAmtcr" placeholder="请输入应付合计" />
-        </el-form-item>
-        <el-form-item label="单据类型" prop="fBilltype">
-          <el-select v-model="form.fBilltype" placeholder="请选择单据类型">
-            <el-option label="请选择字典生成" value="" />
-          </el-select>
-        </el-form-item>
-        <el-form-item label="状态">
-          <el-radio-group v-model="form.fBillstatus">
-            <el-radio label="1">请选择字典生成</el-radio>
-          </el-radio-group>
-        </el-form-item>
-        <el-form-item label="备注" prop="fRemarks">
-          <el-input v-model="form.fRemarks" placeholder="请输入备注" />
-        </el-form-item>
-        <el-form-item label="账单日期" prop="fAccbilldate">
-          <el-date-picker clearable size="small" style="width: 200px"
-                          v-model="form.fAccbilldate"
-                          type="date"
-                          value-format="yyyy-MM-dd"
-                          placeholder="选择账单日期">
-          </el-date-picker>
-        </el-form-item>
-        <el-form-item label="删除状态" prop="delFlag">
-          <el-input v-model="form.delFlag" placeholder="请输入删除状态" />
-        </el-form-item>
-        <el-form-item label="制单部门" prop="fDeptid">
-          <el-select v-model="form.fDeptid" placeholder="请选择制单部门">
-            <el-option label="请选择字典生成" value="" />
-          </el-select>
-        </el-form-item> -->
         </el-form>
         <div slot="footer" class="dialog-footer">
           <el-button type="primary" @click="confirmImport">确 定</el-button>
@@ -751,7 +632,7 @@
 </template>
 
 <script>
-import { backFee, detailFee, Cfee, listFee, getFee, delFee, addFee, updateFee, exportFee, importFee} from "@/api/finance/contrast";
+import { RevocationApproval, backFee, detailFee, Cfee, listFee, getFee, delFee, addFee, updateFee, exportFee, importFee} from "@/api/finance/contrast";
 import { listCorps } from '@/api/basicdata/corps'
 import { listFees } from '@/api/basicdata/fees'
 import AddOrUpdate from '@/views/viewApproval'
@@ -759,11 +640,14 @@ import { queryUserVal } from '@/api/warehouseBusiness/agreement'
 import moment from 'moment'
 import print from "print-js"
 import ApprovalComments from '@/views/startApproval'
+import Global from '@/layout/components/global'
 export default {
   name: "Fee",
 
   data() {
     return {
+      colseButton:true,
+      approval:[],
       disappear:false,
       addIndex:[],
       addOrUpdateVisible: false,
@@ -781,10 +665,6 @@ export default {
       notChange:false,
       browseStatus:false,
       options:'',
-      value1:"",
-      value2:"",
-      value3:"",
-      value4:"",
       dateRange:"",
       // 遮罩层
       loading: true,
@@ -811,7 +691,7 @@ export default {
       selection: '',
       // 弹出层标题
       title: "",
-      //  操作人
+      // 操作人
       Operator:'',
       // 是否显示弹出层
       open: false,
@@ -832,6 +712,7 @@ export default {
         fCorpid:''     //结算单位ID
       },
       hide:false,
+      cancelButton:true,
       // 传值对象
       TWareHouseFees:{
         fCorpid:'',
@@ -919,9 +800,78 @@ export default {
     this.getList()
     this.register()
   },
+  activated(){
+    this.Jump()
+  },
   methods: {
+    // 审批跳转
+    Jump(){
+      this.approval = this.$route.query.data
+      console.log(this.approval)
+      if(this.approval){
+        this.closeButton = false
+        this.approval = JSON.parse(this.approval)
+        this.hide = false
+        this.notChange = true
+        this.approve = true
+        this.disappear = true
+        this.cancelButton = false
+        this.reset()
+        this.pass = {
+          fAmtdr: '',    //应收合计
+          fAmtcr: '',    //应付合计
+          fMblno: '',    //提单号
+          fName: '',      //货权方
+          fFeesName: '',   //结算单位
+          fCorpid: ''     //结算单位ID
+        }
+        getFee(this.approval.billId).then(response => {
+          this.Operator = response.data.tFee.createBy
+          this.DzfeeList = response.data.feeDoList
+          this.fWbuOptions = response.data.feesList
+          this.queryParams = response.data.tFee
+          this.fWbuOptions = response.data.feesList
+          this.fMblnoOptions = response.data.corps
+          this.open = true;
+          this.title = "修改财务数据主"
+        })
+      }
+    },
+    homePage() {
+      this.open = false
+      let view = {
+        fullPath: "/finance/contrast",
+        hash: "",
+        matched: Array(2),
+        meta: Object,
+        name: "contrast",
+        params: Object,
+        path: "/finance/contrast",
+        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.queryParams.fId,
+        actId:this.contrastId,
+        billId:this.queryParams.fId
+      }
+      RevocationApproval(data).then(response => {
+        console.log(response)
+        this.msgSuccess("撤销审批成功")
+        this.disappear = true
+        this.open = false
+        this.getList()
+      })
     },
     returnData(){
       this.addOrUpdateVisib = false
@@ -930,14 +880,10 @@ export default {
     this.addOrUpdateVisible = false
   },
     // 审批按钮
-    addOrUpdateHand(){
+    goApproval(){
       this.addOrUpdateVisib = true
-      this.addOrUpdateVisible = false
-      let id = '448'
-      let actId = '110'
+      console.log(this.approval)
       this.$nextTick(() => {
-        console.log(this.queryParams.fId)
-        console.log(this.contrastId)
         this.$refs.ApprovalComments.init(this.queryParams.fId,this.contrastId)
       })
     },
@@ -947,7 +893,6 @@ export default {
       this.addOrUpdateVisib = false
       let id = '448'
       let actId = '110'
-      console.log(this.queryParams.fId)
       this.$nextTick(() => {
         this.$refs.addOrUpdate.init(this.queryParams.fId,this.contrastId)
       })
@@ -960,7 +905,6 @@ export default {
         formDate.append("tFeeDo", JSON.stringify(this.DzfeeList))
 
         backFee(formDate).then(response=>{
-          console.log(response)
           this.msgSuccess("撤回成功")
 
         })
@@ -979,11 +923,9 @@ export default {
     },
     // 确认打印
     printSomething() {
-      console.log("22222");
       // 此处的style即为打印时的样式
       const style ='table tr td,th { border-collapse: collapse;padding:15px;border:.5px #000 solid;text-align:center;}'
         // "@media print {} }";
-
       print({
         printable: "print_area2",
         type: "html",
@@ -1004,7 +946,6 @@ export default {
             formDate.append("tFeeDo", JSON.stringify(this.DzfeeList))
 
             Cfee(formDate).then(response=>{
-            console.log(response)
             this.open = false
             this.msgSuccess("操作成功")
             this.getList()
@@ -1018,8 +959,6 @@ export default {
     // 对账按钮功能
     reconciliation(){
       this.TWareHouseFees.fToCorpid = this.queryParams.fCorpid
-      console.log(this.TWareHouseFees)
-      console.log(this.queryParams.fCorpid)
       this.innerVisible = true
     },
     // 默认录入人
@@ -1077,13 +1016,10 @@ export default {
     // },
     // 导入搜索
     searchFee() {
-      console.log(this.TWareHouseFees)
       // this.feeList = []
       this.$refs['feeListRules'].validate(valid => {
-        console.log(valid)
         if (valid){
           importFee(this.TWareHouseFees).then(response =>{
-          console.log(response)
           this.feeList = response.rows
          })
         }
@@ -1102,7 +1038,6 @@ export default {
         this.options = response.data
       });
       listFee(this.tableFilter).then(response => {
-        console.log(response)
         this.contrastList = response.rows
         this.total = response.total
         this.loading = false
@@ -1141,10 +1076,8 @@ export default {
     },
     /** 搜索按钮操作 */
     handleQuery() {
-      console.log(this.queryParams_s)
       this.queryParams.pageNum = 1;
       this.getList();
-      console.log(this.contrastList)
       // this.searchFee()
     },
     /** 重置按钮操作 */
@@ -1166,7 +1099,6 @@ export default {
           fAccbilldate: null,
           fDeptid: null,
       }
-      console.log(this.queryParams_s)
       this.queryParams_s = {
         pageNum: 1,
         pageSize: 10,
@@ -1183,7 +1115,6 @@ export default {
         fAccbilldate: null,
         fDeptid: null
       }
-      console.log(this.queryParams_s)
       this.handleQuery();
       this.TWareHouseFees={
         fCorpid:'',
@@ -1301,14 +1232,10 @@ export default {
         this.open = true;
         this.disappear = true
         this.title = "修改财务数据主";
-        console.log(this.Operator)
-        console.log(this.Lander)
         if (res == 1) {
           this.notChange = true
-          console.log(this.notChange)
           if (this.Operator == this.Lander) {
             this.disappear = false
-            console.log(res)
             this.reset()
             this.pass = {
               fAmtdr: '',    //应收合计
@@ -1319,7 +1246,6 @@ export default {
               fCorpid: ''     //结算单位ID
             }
             const fId = row.fId || this.ids
-            console.log(fId)
             getFee(fId).then(response => {
               this.DzfeeList = response.data.feeDoList
               this.fWbuOptions = response.data.feesList
@@ -1343,7 +1269,6 @@ export default {
             fCorpid: ''     //结算单位ID
           }
           const fId = row.fId || this.ids
-          console.log(fId)
           getFee(fId).then(response => {
             this.DzfeeList = response.data.feeDoList
             this.fWbuOptions = response.data.feesList
@@ -1369,22 +1294,15 @@ export default {
         fCorpid:''     //结算单位ID
       }
       const fId = row.fId || this.ids
-      console.log(fId)
       getFee(fId).then(response => {
-        console.log(this.DzfeeList)
-        console.log(response)
-        console.log(response.data.tFee.createBy)
         this.Operator = response.data.tFee.createBy
-        console.log(this.Operator)
         this.DzfeeList = response.data.feeDoList
         this.fWbuOptions = response.data.feesList
         this.queryParams = response.data.tFee
-        console.log(this.queryParams)
         this.fMblnoOptions = response.data.corps
         this.open = true;
         this.title = "修改财务数据主";
       });
-      console.log(this.queryParams)
     },
     /** 远程模糊查询用户 */
     corpsRemoteMethod(name) {
@@ -1400,13 +1318,9 @@ export default {
 
     /** 提交按钮 */
     submitForm() {
-      console.log(this.queryParams)
-      console.log(this.DzfeeList)
-      // console.log(this.feeList)
       this.$refs["ruless"].validate(valid => {
         if (valid) {
           if (!this.queryParams.fId) {
-            console.log(this.queryParams)
             this.queryParams.fBillstatus = '1'
             let formDate = new window.FormData()
             formDate.append('tFee',JSON.stringify(this.queryParams))
@@ -1414,7 +1328,6 @@ export default {
 
 
             updateFee(formDate).then(response => {
-              console.log(response)
               this.queryParams = response.data.tFee
               this.msgSuccess("新增成功");
               // this.DzfeeList = []
@@ -1427,7 +1340,6 @@ export default {
             let formDate = new window.FormData()
             formDate.append('tFee',JSON.stringify(this.queryParams))
             formDate.append("tFeeDo", JSON.stringify(this.DzfeeList))
-            console.log(this.queryParams)
             addFee(formDate).then(response => {
               this.msgSuccess("修改成功");
               // this.DzfeeList = []
@@ -1453,21 +1365,14 @@ export default {
         this.pass.fAmtdr = Number(this.pass.fAmtdr)
         this.pass.fAmtcr += Number(this.selection[item].fAmt)
         this.pass.fAmtdr += Number(this.selection[item].fAmtdr)
-        // console.log(Number(this.pass.fAmtcr))
-        // console.log(this.pass)
-        // console.log(this.pass.fAmtcr)
-        // console.log(this.pass.fAmtdr)
       }
-      console.log(this.pass)
+
       if(this.state_s == true) {
         if (this.selection.length == '0') {
           console.log('未选择')//写入提示
           this.$message.error('未选择导入行');
         } else {
-          console.log(this.selection[0].fMblno)
           for (let item in this.selection){
-            console.log(this.selection[item])
-            console.log(this.selection[item].fMblno)
             this.empty.push(this.selection[item].fMblno)
             this.nothing.push(this.selection[item].fName)
           }
@@ -1477,21 +1382,16 @@ export default {
           //去重货权方
           this.nothing = new Set(this.nothing)
           this.nothing = Array.from(this.nothing)
-          console.log(this.nothing)
 
           if(this.empty.length <= 1){
             this.pass.fMblno = this.empty[0]
-            console.log(this.pass.fMblno)
           }else {
             this.pass.fMblno = this.empty[0] + "..."
-            console.log(this.pass.fMblno)
           }
           if (this.nothing.length <= 1){
             this.pass.fName = this.nothing[0]
-            console.log(this.nothing)
           }else {
             this.pass.fName = this.nothing[0] + "..."
-            console.log(this.nothing)
           }
           // if (this.nothing.length <= 1){
           //   this.pass.fCorpid = this.nothing[0]

+ 120 - 24
src/views/finance/payment/index.vue

@@ -19,15 +19,6 @@
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
-      <el-form-item label="对账日期" prop="fAccbilldate">
-        <el-date-picker clearable size="small" style="width: 200px"
-                        v-model="tableFilter.fAccbilldate"
-                        type="date"
-                        value-format="yyyy-MM-dd"
-                        placeholder="选择账单日期"
-        >
-        </el-date-picker>
-      </el-form-item>
       <el-form-item label="结算单位" prop="fCorpid">
         <el-select
           v-model="tableFilter.fCorpid"
@@ -47,6 +38,19 @@
           ></el-option>
         </el-select>
       </el-form-item>
+      <el-form-item label="对账日期" prop="fAccbilldate">
+        <el-date-picker
+          type="daterange"
+          size="small"
+          style="width: 300px"
+          v-model="tableFilter.fAccbilldate"
+          start-placeholder="开始日期"
+          end-placeholder="结束日期"
+          value-format="yyyy-MM-dd"
+          :default-time="['00:00:00', '23:59:59']"
+        >
+        </el-date-picker>
+      </el-form-item>
       <el-form-item>
         <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
         <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
@@ -194,7 +198,7 @@
     />
 
     <!-- 添加或修改财务数据主对话框 -->
-    <el-dialog :close-on-click-modal="false" :title="title" :visible.sync="open" width="70%" append-to-body>
+    <el-dialog :close-on-click-modal="false" :title="title" :show-close="Xbutton" :visible.sync="open" width="70%" append-to-body>
       <el-form :model="queryParams" :rules="ruless" ref="ruless" :inline="true" v-show="showSearch"
                label-width="68px"
       >
@@ -260,12 +264,12 @@
         </el-form-item>
       </el-form>
       <div style="width: 100%;">
-        <el-button type="warning" size="small" @click="charGe" :disabled="notChange" v-if="queryParams.fBillstatus < '4'">费</el-button>
-        <el-button type="primary" size="small" @click="confirmCharge" :disabled="notChange" v-if="queryParams.fBillstatus < '4'">确认费</el-button>
-        <el-button type="success" size="small" @click="revokeCharge" v-if="queryParams.fBillstatus === '6'">撤销费</el-button>
+        <el-button type="warning" size="small" @click="charGe" :disabled="notChange" v-if="queryParams.fBillstatus < '4'">费</el-button>
+        <el-button type="primary" size="small" @click="confirmCharge" :disabled="notChange" v-if="queryParams.fBillstatus < '4'">确认费</el-button>
+        <el-button type="success" size="small" @click="revokeCharge" v-if="queryParams.fBillstatus === '6'">撤销费</el-button>
         <el-button type="info" size="small" @click="printing" :disabled="notChange">打印</el-button>
         <!--        <el-button type="danger" size="small" :disabled="notChange" v-show="Lander == Operator">撤销审批</el-button>-->
-        <el-button type="danger" size="small" :disabled="tablefilter" v-show="queryParams.fBillstatus === '4'">撤销审批</el-button>
+        <el-button type="danger" size="small" :disabled="tablefilter" @click="approvalRevocation" v-show="queryParams.fBillstatus === '4'">撤销审批</el-button>
       </div>
       <el-table v-loading="loading" :data="increase_s" @selection-change="handleSelectionChange_s">
         <!-- <el-table-column type="selection" width="55" align="center"/> -->
@@ -310,11 +314,13 @@
         </el-table-column>
       </el-table>
       <div slot="footer" class="dialog-footer">
-        <el-button v-if="approve = false" @click="addOrUpdateHand">审批</el-button>
-        <el-button type="info" v-if="notChange" @click="addOrUpdateHandle">查看审批流</el-button>
+        <el-button v-if="approve === true" @click="immediateApproval">审批</el-button>
+        <el-button type="primary" v-if="notChange" @click="addOrUpdateHandle">查看审批流</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 type="primary" @click="submitForm" :disabled="notChange">保 存</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 :close-on-click-modal="false" width="70%" :visible.sync="innerVisible" title="导入数据" append-to-body>
         <el-form ref="form" :model="queryParameter" :rules="rules" label-width="80px"
@@ -513,13 +519,15 @@ import {
   search,
   listCorps,
   delCharge_s,
-  backCharge
+  backCharge,
+  revocation
 } from '@/api/finance/payment'
 import { listFees } from '@/api/basicdata/fees'
 import print from 'print-js'
 import AddOrUpdate from '@/views/viewApproval'
 import ApprovalComments from '@/views/startApproval'
 import { queryUserVal } from '@/api/warehouseBusiness/agreement'
+import Global from '@/layout/components/global'
 
 export default {
   name: 'Charge',
@@ -527,7 +535,7 @@ export default {
     return {
       Lander:'',
       Operator:'',
-      approve:true,
+      approve:false,
       addOrUpdateVisible: false,
       contrastId:220,
       tablefilter:false,
@@ -550,6 +558,7 @@ export default {
       chargeList_s: [],
       selection: '',
       increase_s: [],
+      cancelButton:true,
       // 选中数组
       ids: [],
       // 非单个禁用
@@ -587,6 +596,7 @@ export default {
         fMblno: '',    //提单号
         fName: ''      //货权方
       },
+      Xbutton:true,
       // 查询参数
       queryParams: {
         fId: null,
@@ -604,6 +614,7 @@ export default {
         fAccbilldate: null,
         fDeptid: null
       },
+      addOrUpdateVisib: false,
       // 主表查询参数
       tableFilter: {
         pageNum: 1,
@@ -620,6 +631,7 @@ export default {
         fAccbilldate: null,
         fDeptid: null
       },
+      approval:[],
       // 表单参数
       form: {},
       // 表单校验
@@ -661,13 +673,94 @@ export default {
   created() {
     this.getList()
     this.register()
+
+  },
+  activated(){
+    this.adoPt()
   },
   methods: {
+    approvalRevocation(){
+      let  data = {
+        id:this.queryParams.fId,
+        actId:this.contrastId,
+        billId:this.queryParams.fId
+      }
+      console.log(this.queryParams)
+      revocation(data).then(data =>{
+        console.log(data)
+        if (data.code === 200){
+          this.$message.success('撤销成功');
+          this.open = false
+        }
+      })
+    },
+    returnData(){
+      this.addOrUpdateVisib = false
+    },
+    adoPt(){
+      this.approval = this.$route.query.data
+      if (this.approval){
+        this.Xbutton = false
+        this.approval = JSON.parse(this.approval)
+        this.hide = false
+        this.notChange = true
+        this.approve = true
+        this.cancelButton = false
+        this.reset()
+        this.pass = {
+          fAmtdr: '',    //应收合计
+          fAmtcr: '',    //应付合计
+          fMblno: '',    //提单号
+          fName: '',      //货权方
+          fFeesName: '',   //结算单位
+          fCorpid: ''     //结算单位ID
+        }
+        getCharge(this.approval.billId).then(response => {
+          console.log(response)
+          this.Operator = response.data.tFee.createBy
+          this.increase_s = response.data.feeDoList
+          this.fWbuOptions = response.data.feesList
+          this.queryParams = response.data.tFee
+          this.fWbuOptions = response.data.feesList
+          this.fMblnoOptions = response.data.corps
+          this.open = true
+          this.title = '修改收费列表'
+        })
+      }
+    },
+    homePage(){
+      this.open = false
+      let view = {
+        fullPath: "/finance/charge",
+        hash: "",
+        matched: Array(2),
+        meta: Object,
+        name: "Charge",
+        params: Object,
+        path: "/finance/charge",
+        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);
+    },
     register(){
       queryUserVal().then((response)=>{
         this.Lander = response.user.userName
       })
     },
+    immediateApproval(){
+      this.addOrUpdateVisib = true
+      console.log(this.approval)
+      this.$nextTick(() => {
+        this.$refs.ApprovalComments.init(this.approval.billId,this.approval.actId)
+      })
+    },
     getDataList(){
       this.addOrUpdateVisible = false
     },
@@ -689,9 +782,8 @@ export default {
       let formDate = new window.FormData()
       formDate.append('tFee', JSON.stringify(this.queryParams))
       formDate.append('tFeeDo', JSON.stringify(this.increase_s))
-
       backCharge(formDate).then(response => {
-        console.log(response)
+        this.open = false
         this.msgSuccess('操作成功')
         this.getList()
       })
@@ -710,13 +802,14 @@ export default {
         this.fWbuOptions = response.data.feesList
         this.fMblnoOptions = response.data.corps
         this.open = true
-        this.title = '费列表'
+        this.title = '费列表'
         console.log(this.Lander)
         console.log(this.Operator)
+        this.tablefilter = true
         if (res == 1){
           this.notChange = true
-          this.tablefilter = false
           if (this.Operator == this.Lander){
+            this.tablefilter = false
             this.reset()
             this.pass = {
               fAmtdr: '',    //应收合计
@@ -932,6 +1025,7 @@ export default {
     // 取消按钮
     cancel() {
       this.open = false
+      this.approve = false
       this.reset()
     },
     // 表单重置
@@ -961,6 +1055,7 @@ export default {
     handleQuery() {
       this.queryParams.pageNum = 1
       this.getList()
+      console.log(this.tableFilter)
     },
     /** 导入搜索 */
     importSearch() {
@@ -1078,6 +1173,7 @@ export default {
     /** 修改按钮操作 */
     handleUpdate(row) {
       console.log(row)
+      this.approve = false
       this.hide = false
       this.notChange = false
       this.reset()
@@ -1100,7 +1196,7 @@ export default {
         this.fWbuOptions = response.data.feesList
         this.fMblnoOptions = response.data.corps
         this.open = true
-        this.title = '修改费列表'
+        this.title = '修改费列表'
       })
     },
     /** 提交按钮 */

+ 15 - 12
src/views/index.vue

@@ -82,7 +82,8 @@
         <el-table-column prop="refno1" :show-overflow-tooltip="true" label="委托方"></el-table-column>
         <el-table-column prop="auditItem" :show-overflow-tooltip="true" label="日期">
           <template slot-scope="scope">
-            <span>{{ scope.row.auditItem.slice(0,10) }}</span>
+            <span v-if="!scope.row.auditItem">无时间</span>
+            <span v-else>{{ scope.row.auditItem.slice(0,10) }}</span>
           </template>
         </el-table-column>
         <el-table-column prop="refno3" :show-overflow-tooltip="true" label="提单号"></el-table-column>
@@ -174,6 +175,9 @@ export default {
     AddOrUpdate,
     ApprovalComments
   },
+  activated() {
+    this.getList()
+  },
   created() {
     this.getList()
     this.warehouses()
@@ -185,44 +189,43 @@ export default {
     approval(row){
       switch (row.refno2){
         case 'SJRK':{
-          this.$router.push({ path: '/business/inStock',query:{data:row}})
+          this.$router.push({ path: '/business/inStock',query:{data:JSON.stringify(row)}})
           break
         }
         case 'SJCK':{
-          this.$router.push({ path: '/business/outStock',query:{data:row}})
+          this.$router.push({ path: '/business/outStock',query:{data:JSON.stringify(row)}})
           break
         }
         case 'HQZY':{
-          this.$router.push({ path: '/business/goodsTransfer',query:{data:row}})
+          this.$router.push({ path: '/business/goodsTransfer',query:{data:JSON.stringify(row)}})
           break
         }
         case 'CKDB':{
-          this.$router.push({ path: '/business/transfer',query:{data:row}})
+          this.$router.push({ path: '/business/transfer',query:{data:JSON.stringify(row)}})
           break
         }
         case 'JSCCF':{
-          this.$router.push({ path: '/business/agreement',query:{data:row}})
+          this.$router.push({ path: '/business/agreement',query:{data:JSON.stringify(row)}})
           break
         }
         case 'CCF':{
-          this.$router.push({ path: '/agreement/agreementStorage',query:{data:row}})
+          this.$router.push({ path: '/agreement/agreementStorage',query:{data:JSON.stringify(row)}})
           break
         }
         case 'ZYF':{
-          this.$router.push({ path: '/agreement/agreementTask',query:{data:row}})
+          this.$router.push({ path: '/agreement/agreementTask',query:{data:JSON.stringify(row)}})
           break
         }
         case 'SF':{
-          this.$router.push({ path: '/finance/charge',query:{data:row}})
+          this.$router.push({ path: '/finance/charge',query:{data:JSON.stringify(row)}})
           break
         }
         case 'DZ':{
-          this.$router.push({ path: '/finance/charge',query:{data:row}})
-          // this.$router.push({ path: '/finance/contrast',query:{data:row}})
+          this.$router.push({ path: '/finance/contrast',query:{data:JSON.stringify(row)}})
           break
         }
         case 'FF':{
-          this.$router.push({ path: '/finance/payment',query:{data:row}})
+          this.$router.push({ path: '/finance/payment',query:{data:JSON.stringify(row)}})
           break
         }
         default:{

+ 34 - 6
src/views/startApproval.vue

@@ -35,6 +35,7 @@
 <script>
 import { listCharge } from '@/api/system/startApproval'
 import { queryUserVal } from '@/api/warehouseBusiness/agreement'
+import Global from '@/layout/components/global'
   export default {
     name: 'startApproval',
     data () {
@@ -68,46 +69,73 @@ import { queryUserVal } from '@/api/warehouseBusiness/agreement'
         }
         this.dataForm.id = id
         this.dataForm.actId = actId
+        this.dataForm.billId = id
       },
       approved () {
+        this.dataForm.auditUserId = ''
         this.$confirm(`是否通过审批?`, '提示', {
           confirmButtonText: '确定',
           cancelButtonText: '取消',
           type: 'warning'
         }).then(() => {
           return  listCharge(this.dataForm,'/warehouse/paths/approved')
-          }).then(({data}) => {
-            if (data && data.code === 200) {
+          }).then(data => {
+            if (data && data.code == 200) {
               this.$message({
-                message: '操作成功',
+                message: '审核通过',
                 type: 'success',
                 duration: 600,
                 onClose: () => {
                   this.closeDia()
                 }
               })
+              this.visible = true
+              this.homePage()
             } else {
               this.$message.error(data.msg)
             }
           })
       },
+      homePage(){
+        let view = {
+          fullPath: "/finance/charge",
+          hash: "",
+          matched: Array(2),
+          meta: Object,
+          name: "Charge",
+          params: Object,
+          path: "/finance/charge",
+          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);
+      },
       approvalRejected () {
+        this.dataForm.auditUserId = ''
         this.$confirm(`是否驳回审批?`, '提示', {
           confirmButtonText: '确定',
           cancelButtonText: '取消',
           type: 'warning'
         }).then(() => {
           return listCharge(this.dataForm,'/warehouse/paths/approvalRejected')
-          }).then(({data}) => {
-            if (data && data.code === 0) {
+          }).then(data => {
+          if (data && data.code == 200) {
               this.$message({
-                message: '操作成功',
+                message: '驳回审批',
                 type: 'success',
                 duration: 600,
                 onClose: () => {
                   this.closeDia()
                 }
               })
+              this.visible = true
+              this.homePage()
             } else {
               this.$message.error(data.msg)
             }

+ 27 - 33
src/views/warehouseBusiness/goodsTransfer/index.vue

@@ -1763,6 +1763,7 @@
               fGoodsid: this.dialogWhgenlegList[whgen].fGoodsid,
               fGoodsids: this.dialogWhgenlegList[whgen].fGoodsids,
               fMarks: this.dialogWhgenlegList[whgen].fMarks,
+              fBillingway: this.dialogWhgenlegList[whgen].fBillingway,
               fOriginalbillno: this.dialogWhgenlegList[whgen].fOriginalbillno,
               fOriginalbilldate: this.dialogWhgenlegList[whgen].fOriginalbilldate,
               fWarehouselocid: this.dialogWhgenlegList[whgen].fWarehouseLocationid,
@@ -1961,15 +1962,10 @@
         const fId = row.fId || this.ids
         getGoodsTransfer(fId).then((response) => {
           this.form = response.data.warehousebills
-          if (this.form.fStltypeid) {
-            this.$set(this.form, 'fStltypeid', this.form.fStltypeid + '')
-          }
-          if (this.form.fChargedate) {
-            this.$set(this.form, 'fChargedate', Date.parse(this.form.fChargedate))
-          }
-          if (this.form.fTrademodeid) {
-            this.$set(this.form, 'fTrademodeid', this.form.fTrademodeid + '')
-          }
+          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
@@ -2095,8 +2091,11 @@
               }
             }
             let formData = new window.FormData()
-            formData.append('warehouseBills', JSON.stringify(this.form))
-            formData.append('warehousebillsitems', JSON.stringify(this.dataListSelection))
+            formData.append("warehouseBills", JSON.stringify(this.form));
+            formData.append("tEnclosure", JSON.stringify(this.relevantAttachments));
+            formData.append("warehousebillsitems", JSON.stringify(this.dataListSelection));
+            formData.append("warehousebillsfeesCr", JSON.stringify(this.warehouseCrList));
+            formData.append("warehousebillsfeesDr", JSON.stringify(this.warehouseDrList));
             addWhgenleg(formData).then((response) => {
               this.$refs.tableListRef.clearSelection()
               this.msgSuccess('入账成功')
@@ -2118,8 +2117,11 @@
         // 撤回货转
         let formData = new window.FormData()
         let withdrawList = JSON.parse(JSON.stringify(this.dataWithdrawList))
-        formData.append('warehousebillsitems', JSON.stringify(withdrawList))
-        formData.append('warehouseBills', JSON.stringify(this.form))
+        formData.append("warehouseBills", JSON.stringify(this.form));
+        formData.append("warehousebillsitems", JSON.stringify(withdrawList));
+        formData.append("tEnclosure", JSON.stringify(this.relevantAttachments));
+        formData.append("warehousebillsfeesCr", JSON.stringify(this.warehouseCrList));
+        formData.append("warehousebillsfeesDr", JSON.stringify(this.warehouseDrList));
         updateCredit(formData).then((response) => {
           this.fid = response.data
           this.formBrowseStatus = false
@@ -2232,20 +2234,17 @@
           if (valid) {
             this.form.fBillstatus = 2
             let formData = new window.FormData()
-            // 附件数据
-            formData.append('tWarehouseBills', JSON.stringify(this.form))
-            // 库存明细
-            formData.append('tWarehousebillsitems', JSON.stringify(this.dataList))
-            // 附件数据
-            formData.append('tEnclosure', JSON.stringify(this.relevantAttachments))
-            // 费用明细付款
-            formData.append('tWarehousebillsfeesCr', JSON.stringify(this.warehouseCrList))
-            // 收款
-            formData.append('tWarehousebillsfeesDr', JSON.stringify(this.warehouseDrList))
+            formData.append("warehouseBills", JSON.stringify(this.form));
+            formData.append("warehousebillsitems", JSON.stringify(this.dataList));
+            formData.append("tEnclosure", JSON.stringify(this.relevantAttachments));
+            formData.append("warehousebillsfeesCr", JSON.stringify(this.warehouseCrList));
+            formData.append("warehousebillsfeesDr", JSON.stringify(this.warehouseDrList));
             addGoodsTransfer(formData).then((response) => {
               this.msgSuccess('保存成功')
               this.form = response.data.warehouseBills
               this.$set(this.form, 'fBsdate', Date.parse(this.form.fBsdate))
+              this.$set(this.form, 'fFeetunit', Number(this.form.fFeetunit))
+              this.$set(this.form, 'fStltypeid', this.form.fStltypeid + '')
               this.$set(this.form, 'fTrademodeid', this.form.fTrademodeid + '')
               this.$set(this.form, 'fChargedate', Date.parse(this.form.fChargedate))
               this.dataList = response.data.warehousebillsitems
@@ -2303,16 +2302,11 @@
           if (valid) {
             this.form.fBillstatus = 4
             let formData = new window.FormData()
-            // 附件数据
-            formData.append('tWarehouseBills', JSON.stringify(this.form))
-            // 库存明细
-            formData.append('tWarehousebillsitems', JSON.stringify(this.dataList))
-            // 附件数据
-            formData.append('tEnclosure', JSON.stringify(this.relevantAttachments))
-            // 费用明细付款
-            formData.append('tWarehousebillsfeesCr', JSON.stringify(this.warehouseCrList))
-            // 收款
-            formData.append('tWarehousebillsfeesDr', JSON.stringify(this.warehouseDrList))
+            formData.append("warehouseBills", JSON.stringify(this.form));
+            formData.append("warehousebillsitems", JSON.stringify(this.dataList));
+            formData.append("tEnclosure", JSON.stringify(this.relevantAttachments));
+            formData.append("warehousebillsfeesCr", JSON.stringify(this.warehouseCrList));
+            formData.append("warehousebillsfeesDr", JSON.stringify(this.warehouseDrList));
             warehouseSubmission(formData).then((response) => {
               this.msgSuccess('提交成功')
               this.cancel()

+ 69 - 160
src/views/warehouseBusiness/outStock/index.vue

@@ -197,17 +197,6 @@
           >修改
         </el-button>
       </el-col>
-      <!-- <el-col :span="1.5">
-        <el-button
-          type="danger"
-          icon="el-icon-delete"
-          size="mini"
-          :disabled="multiple"
-          @click="handleDelete"
-          v-hasPermi="['warehouseBusiness:warehousebills:remove']"
-          >删除
-        </el-button>
-      </el-col> -->
       <el-col :span="1.5">
         <el-button
           type="warning"
@@ -234,7 +223,6 @@
         @queryTable="getList"
       ></right-toolbar>
     </el-row>
-
     <el-table
       v-loading="loading"
       :data="warehousebillsList"
@@ -259,17 +247,9 @@
           <span>{{ parseTime(scope.row.fBsdate, "{y}-{m}-{d}") }}</span>
         </template>
       </el-table-column>
-      <!-- <el-table-column
-        label="贸易方式"
-        align="center"
-        prop="fTrademodeid"
-        :formatter="fTrademodeidFormat"
-      /> -->
       <el-table-column label="仓库" align="center" prop="fWarehouseid" />
-
+      <el-table-column label="计划出库件数" align="center" prop="fPlanqty" />
       <el-table-column label="出库件数" align="center" prop="fQty" />
-      <!--      <el-table-column label="入库毛重" align="center" prop="fGrossweight"/>-->
-      <!-- <el-table-column label="货转客户名称" align="center" prop="fTocorpid" /> -->
       <el-table-column label="出库毛重" align="center" prop="fGrossweight" />
       <el-table-column label="出库净重" align="center" prop="fNetweight" />
       <el-table-column
@@ -517,45 +497,40 @@
         </el-row>
         <el-row>
           <el-col :span="8">
-            <el-form-item label="质押" prop="fifpledge">
-              <el-select
-                v-model="form.fIfpledge"
-                placeholder="请选择是否过磅"
-                :disabled="browseStatus || formBrowseStatus"
-                clearable
+            <el-form-item label="计划件数" prop="fPlanqty">
+              <el-input
+                v-model="form.fPlanqty"
                 style="width: 80%"
-              >
-                <el-option
-                  v-for="dict in fIfpledgeOptions"
-                  :key="dict.dictValue"
-                  :label="dict.dictLabel"
-                  :value="dict.dictValue"
-                />
-              </el-select>
+                laceholder="计划件数"
+                oninput='this.value=this.value.replace(/\D/g,"")'
+                :disabled="browseStatus"
+              />
             </el-form-item>
           </el-col>
           <el-col :span="8">
-            <el-form-item label="质押银行" prop="fbankcorpid">
-              <el-select
-                v-model="queryParams.fBankcorpid"
-                filterable
-                remote
-                clearable
+            <el-form-item label="计划净重" prop="fPlannetweight">
+              <el-input
+                v-model="form.fPlannetweight"
                 style="width: 80%"
-                :disabled="browseStatus || formBrowseStatus"
-                @keyup.enter.native="handleQuery"
-                :remote-method="corpsRemoteMethodd"
-                placeholder="请输入模糊查找"
-              >
-                <el-option
-                  v-for="(dict, index) in Pledgebank"
-                  :key="index.fId"
-                  :label="dict.fName"
-                  :value="dict.fId"
-                ></el-option>
-              </el-select>
+                oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
+                laceholder="计划毛重"
+                :disabled="browseStatus"
+              />
+            </el-form-item>
+          </el-col>
+          <el-col :span="8">
+            <el-form-item label="计划毛重" prop="fPlangrossweight">
+              <el-input
+                v-model="form.fPlangrossweight"
+                oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
+                style="width: 80%"
+                laceholder="计划毛重"
+                :disabled="browseStatus"
+              />
             </el-form-item>
           </el-col>
+        </el-row>
+        <el-row>
           <el-col :span="8">
             <el-form-item label="计费单位" prop="fFeetunit">
               <el-select
@@ -619,41 +594,6 @@
               </el-form-item>
             </el-col>
             <el-col :span="8">
-              <el-form-item label="船名航次" prop="fvslvoy">
-                <el-input
-                  v-model="form.fVslvoy"
-                  :disabled="browseStatus || formBrowseStatus"
-                  style="width: 80%"
-                  placeholder="船名航次"
-                />
-              </el-form-item>
-            </el-col>
-          </el-row>
-          <el-row>
-            <el-col :span="8">
-              <el-form-item label="到港日期" prop="feta">
-                <el-date-picker
-                  v-model="form.fEta"
-                  style="width: 80%"
-                  type="date"
-                  :disabled="browseStatus || formBrowseStatus"
-                  value-format="timestamp"
-                  placeholder="到港日期"
-                >
-                </el-date-picker>
-              </el-form-item>
-            </el-col>
-            <el-col :span="8">
-              <el-form-item label="报关单号" prop="fcustomno">
-                <el-input
-                  v-model="form.fCustomno"
-                  style="width: 80%"
-                  :disabled="browseStatus || formBrowseStatus"
-                  laceholder="报关单号"
-                />
-              </el-form-item>
-            </el-col>
-            <el-col :span="8">
               <el-form-item label="贸易方式" prop="fTrademodeid">
                 <el-select
                   v-model="form.fTrademodeid"
@@ -756,7 +696,7 @@
           <!-- <el-button type="primary" :disabled="browseStatus" @click="saveForm">保 存</el-button> -->
           <el-button
             style="background-color: #008000; color: #fff"
-            @click="submitForm(6)"
+            @click="submitForm"
             :disabled="browseStatus"
             >请核</el-button
           >
@@ -979,7 +919,6 @@
         >
           <template slot-scope="scope">
             <el-input
-              oninput="value=value.replace(/[^\d.]/g,'')"
               v-model="scope.row.fTruckno"
               placeholder="车号"
               :disabled="browseStatus || scope.row.fBillstatus === 20 || scope.row.fBillstatus === 30 || scope.row.fBillstatus === 40"
@@ -2245,14 +2184,12 @@ import {
   getWarehousebills,
   delWarehousebills,
   addWarehousebills,
-  warehouseSubmission,
-  updateWarehousebills,
-  exportWarehousebills,
-} from "@/api/warehouseBusiness/warehouseOutStock";
-import {
   updateCredit,
   addJoblist,
   disChargelist,
+  warehouseSubmission,
+  updateWarehousebills,
+  exportWarehousebills,
 } from "@/api/warehouseBusiness/warehouseOutStock";
 import { listAgreement, operationAgreement } from "@/api/agreement/agreement";
 
@@ -2358,7 +2295,6 @@ export default {
       KHblnoOptions: [],
       // 作业费协议
       tasklegList: [],
-      Pledgebank: [],
       fSbuOptions: [],
       // 操作员
       userOptions: [],
@@ -2384,8 +2320,6 @@ export default {
       fStltypeOptions: [],
       // 是否过磅(数据字典)默认 F ,过磅T 否者F 下拉选择字典
       fIfweighOptions: [],
-      // 是否质押(数据字典),默认 F ,质押T 否者F 下拉选择字典
-      fIfpledgeOptions: [],
       // 是否破损(数据字典),默认F否则T字典
       fIfdamageOptions: [],
       // 单据类型(数据字典)SJRK字典
@@ -2468,21 +2402,16 @@ export default {
       rules: {
         fDeptid: [{ required: true, message: " ", trigger: "blur" }],
         fBsdeptid: [{ required: true, message: " ", trigger: "blur" }],
-        fCorpid: [
-          {
-            required: true,
-            message: " ",
-            trigger: "blur",
-          },
-        ],
-        fMarks: [{ required: true, message: " ", trigger: "blur" }],
-
+        fCorpid: [{ required: true, message: " ", trigger: "blur"},],
+        fPlanqty: [{ required: true, message: " ", trigger: "blur"},],
+        fPlannetweight: [{ required: true, message: " ", trigger: "blur"},],
         fFeeUnitid: [{ required: true, message: " ", trigger: "blur" }],
         fChargedate: [{ required: true, message: " ", trigger: "blur" }],
         fBillingway: [{ required: true, message: " ", trigger: "blur" }],
         fBsdate: [{ required: true, message: " ", trigger: "blur" }],
         fTrademodeid: [{ required: true, message: " ", trigger: "blur" }],
         fSbu: [{ required: true, message: " ", trigger: "blur" }],
+        fPlangrossweight: [{ required: true, message: " ", trigger: "blur"},],
         fStorekeeper: {
           required: true,
           message: " ",
@@ -2523,9 +2452,6 @@ export default {
     this.getDicts("data_ifweigh_status").then((response) => {
       this.fIfweighOptions = response.data;
     });
-    this.getDicts("data_ifpledge_status").then((response) => {
-      this.fIfpledgeOptions = response.data;
-    });
     this.getDicts("data_ifdamage_status").then((response) => {
       this.fIfdamageOptions = response.data;
     });
@@ -2747,15 +2673,15 @@ export default {
     },
     // 新增list
     addRelevant() {
-      if (!this.form.fCorpid || !this.form.fTrademodeid || !this.form.fWarehouseid) {
-        this.$message({ message: "请维护货权方、仓库、贸易方式", type: "warning", });
-        return false;
-      }
-      this.whgenlegList = [];
-      this.dialogWhgenlegList = [];
-      this.whgenlegTotal = 0;
-      this.whgenlegVisible = true;
-      this.getWhgenlegList();
+      this.$refs['form'].validate((valid) => {
+        if (valid) {
+          this.whgenlegList = [];
+          this.dialogWhgenlegList = [];
+          this.whgenlegTotal = 0;
+          this.whgenlegVisible = true;
+          this.getWhgenlegList();
+        }
+      })
     },
     // 库存总账导出数据
     whgenlegData() {
@@ -2797,7 +2723,6 @@ export default {
           remark: null,
           fIsPass: 'F'
         });
-        console.log(JSON.stringify(this.dialogWhgenlegList))
       }
       this.whgenlegVisible = false;
     },
@@ -3016,10 +2941,6 @@ export default {
     fIfweighFormat(row, column) {
       return this.selectDictLabel(this.fIfweighOptions, row.fIfweigh);
     },
-    // 是否质押(数据字典),默认 F ,质押T 否者F 下拉选择字典翻译
-    fIfpledgeFormat(row, column) {
-      return this.selectDictLabel(this.fIfpledgeOptions, row.fIfpledge);
-    },
     // 是否破损(数据字典),默认F否则T字典翻译
     fIfdamageFormat(row, column) {
       return this.selectDictLabel(this.fIfdamageOptions, row.fIfdamage);
@@ -3148,7 +3069,6 @@ export default {
           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))
-          console.log(this.form)
         }
         if (response.data.corps) {
           this.fMblnoOptions = response.data.corps;
@@ -3172,7 +3092,6 @@ export default {
             }
             this.$set(this.dataList[list], "fBsdate", Date.parse(this.dataList[list].fBsdate));
           }
-          console.log(JSON.stringify(this.dataList))
         }
         if (response.data.enclosures) {
           this.relevantAttachments = response.data.enclosures;
@@ -3407,7 +3326,10 @@ export default {
           let listSelection = JSON.parse(JSON.stringify(this.dataListSelection))
           let formData = new window.FormData();
           formData.append("warehouseBills", JSON.stringify(this.form));
+          formData.append("tEnclosure", JSON.stringify(this.relevantAttachments));
           formData.append("warehousebillsitems", JSON.stringify(this.dataListSelection));
+          formData.append("warehousebillsfeesCr", JSON.stringify(this.warehouseCrList));
+          formData.append("warehousebillsfeesDr", JSON.stringify(this.warehouseDrList));
           addWhgenleg(formData).then((response) => {
             this.fid = response.data.fPid;
             // 暂时注释掉,后续可能会加回来 仓储费得出的明细
@@ -3439,9 +3361,11 @@ export default {
         if (valid) {
           let listSelection = JSON.parse(JSON.stringify(this.dataListSelection))
           let formData = new window.FormData();
-          console.log(JSON.stringify(this.dataListSelection))
           formData.append("warehouseBills", JSON.stringify(this.form));
+          formData.append("tEnclosure", JSON.stringify(this.relevantAttachments));
           formData.append("warehousebillsitems", JSON.stringify(this.dataListSelection));
+          formData.append("warehousebillsfeesCr", JSON.stringify(this.warehouseCrList));
+          formData.append("warehousebillsfeesDr", JSON.stringify(this.warehouseDrList));
           addJoblist(formData).then((response) => {
             this.formBrowseStatus = true;
             this.$refs.tableDr.clearSelection();
@@ -3465,7 +3389,10 @@ export default {
       // 撤回入库
       let withdrawList = JSON.parse(JSON.stringify(this.dataWithdrawList))
       formData.append("warehouseBills", JSON.stringify(this.form));
+      formData.append("tEnclosure", JSON.stringify(this.relevantAttachments));
       formData.append("warehousebillsitems", JSON.stringify(this.dataWithdrawList));
+      formData.append("warehousebillsfeesCr", JSON.stringify(this.warehouseCrList));
+      formData.append("warehousebillsfeesDr", JSON.stringify(this.warehouseDrList));
       updateCredit(formData).then((response) => {
         this.fid = response.data;
         this.formBrowseStatus = false;
@@ -3511,8 +3438,11 @@ export default {
         if (valid) {
           let withdrawList = JSON.parse(JSON.stringify(this.dataListSelection))
           let formData = new window.FormData()
-          formData.append('warehouseBills', JSON.stringify(this.form))
-          formData.append('warehousebillsitems', JSON.stringify(this.dataListSelection))
+          formData.append("warehouseBills", JSON.stringify(this.form));
+          formData.append("tEnclosure", JSON.stringify(this.relevantAttachments));
+          formData.append("warehousebillsitems", JSON.stringify(this.dataListSelection));
+          formData.append("warehousebillsfeesCr", JSON.stringify(this.warehouseCrList));
+          formData.append("warehousebillsfeesDr", JSON.stringify(this.warehouseDrList));
           for (let li in this.dataListSelection) {
             this.dataListSelection[li].fBillstatus = 30
           }
@@ -3592,16 +3522,11 @@ export default {
         if (valid) {
           this.form.fBillstatus = 2
           let formData = new window.FormData()
-          // 附件数据
-          formData.append('tWarehouseBills', JSON.stringify(this.form))
-          // 库存明细
-          formData.append('tWarehousebillsitems', JSON.stringify(this.dataList))
-          // 附件数据
-          formData.append('tEnclosure', JSON.stringify(this.relevantAttachments))
-          // 费用明细付款
-          formData.append('tWarehousebillsfeesCr', JSON.stringify(this.warehouseCrList))
-          // 收款
-          formData.append('tWarehousebillsfeesDr', JSON.stringify(this.warehouseDrList))
+          formData.append("warehouseBills", JSON.stringify(this.form));
+          formData.append("warehousebillsitems", JSON.stringify(this.dataList));
+          formData.append("tEnclosure", JSON.stringify(this.relevantAttachments));
+          formData.append("warehousebillsfeesCr", JSON.stringify(this.warehouseCrList));
+          formData.append("warehousebillsfeesDr", JSON.stringify(this.warehouseDrList));
           addWarehousebills(formData).then((response) => {
             this.msgSuccess('保存成功')
             this.form = response.data.warehouseBills
@@ -3613,7 +3538,6 @@ export default {
             this.$set(this.form, 'createTime', Date.parse(this.form.createTime))
             this.$set(this.form, 'fChargedate', Date.parse(this.form.fChargedate))
             this.dataList = response.data.warehousebillsitems
-            console.log(JSON.stringify(this.dataList))
           })
         }
       })
@@ -3669,16 +3593,11 @@ export default {
           }
         }
         let formData = new window.FormData()
-        // 附件数据
-        formData.append('tWarehouseBills', JSON.stringify(this.form))
-        // 库存明细
-        formData.append('tWarehousebillsitems', JSON.stringify(this.dataList))
-        // 附件数据
-        formData.append('tEnclosure', JSON.stringify(this.relevantAttachments))
-        // 费用明细付款
-        formData.append('tWarehousebillsfeesCr', JSON.stringify(this.warehouseCrList))
-        // 收款
-        formData.append('tWarehousebillsfeesDr', JSON.stringify(this.warehouseDrList))
+        formData.append("warehouseBills", JSON.stringify(this.form));
+        formData.append("warehousebillsitems", JSON.stringify(this.dataList));
+        formData.append("tEnclosure", JSON.stringify(this.relevantAttachments));
+        formData.append("warehousebillsfeesCr", JSON.stringify(this.warehouseCrList));
+        formData.append("warehousebillsfeesDr", JSON.stringify(this.warehouseDrList));
         warehouseSubmission(formData).then((response) => {
           this.msgSuccess('提交成功')
           this.cancel()
@@ -3810,16 +3729,6 @@ export default {
         this.kqhouseOptions = response.rows;
       });
     },
-    /* 远程模糊查询质押银行 */
-    corpsRemoteMethodd(name) {
-      if (name == null || name === "") {
-        return false;
-      }
-      let queryParams = { pageNum: 1, pageSize: 10, fName: name, type: 5 };
-      listCorps(queryParams).then((response) => {
-        this.Pledgebank = response.rows;
-      });
-    },
     /* 远程模糊查询操作用户 */
     userRemoteMethod(name) {
       if (name == null || name === "") {