Browse Source

申请发票修改

wengyuwen 4 years ago
parent
commit
54b17f207f

+ 39 - 0
src/api/kaihe/applyForInvoice/feeDetail.js

@@ -7,3 +7,42 @@ export function listCorps(query) {
     params: query
   })
 }
+// 新增
+export function addcontainer(data) {
+  return request({
+    url: '/financial/invoiceApplyFor',
+    method: 'post',
+    data: data
+  })
+}
+export function getfeeList(query) {
+  return request({
+    url: '/financial/contrast/contrastList',
+    method: 'get',
+    params: query
+  })
+}
+//获取客户名称
+export function getcontrastList(query) {
+  return request({
+    url: '/financial/contrast/contrastList',
+    method: 'get',
+    params: query
+  })
+}
+//获取船名
+export function getVesselName(query) {
+  return request({
+    url: '/shipping/vessel/selectTVesselfNumber',
+    method: 'get',
+    params: query
+  })
+}
+//获取航次
+export function getVoyageName(query) {
+  return request({
+    url: '/shipping/voyage/selectTVoyagefNumber',
+    method: 'get',
+    params: query
+  })
+}

+ 1 - 1
src/api/kaihe/applyForInvoice/invoiceInformation.js

@@ -2,7 +2,7 @@ import request from '@/utils/request'
 
 export function listCorps(query) {
   return request({
-    url: '/shipping/cntr/list',
+    url: '/financial/invoiceApplyFor/list',
     method: 'get',
     params: query
   })

+ 1 - 1
src/api/kaihe/domesticTrade/orderInformation.js

@@ -109,7 +109,7 @@ export function getFName(data) {
 //获取审批人
 export function getfee(data) {
   return request({
-    url: '/khwarehouse/warehousebills/ruoYiSubmitMessage',
+    url: '/warehouse/paths/projectEndQueryPendingVal',
     method: 'post',
     data: data
   })

+ 377 - 140
src/views/kaihe/applyForInvoice/feeDetail/index.vue

@@ -219,7 +219,7 @@
       <el-button
         type="success"
         size="small"
-        @click="innerVisible = true"
+        @click="openSearch"
         v-if="feeInfo"
         :disabled="doNot"
       >检索</el-button
@@ -231,6 +231,8 @@
       :data="feeList"
       @selection-change="handleSelectionChange_s"
     >
+      <el-table-column type="selection" width="55" align="center"/>
+      <el-table-column label="序号" type="index" align="center" fixed/>
       <el-table-column
         v-for="(item, index) in getRowList"
         :key="index"
@@ -278,22 +280,31 @@
         :fixed="item.fixed"
       >
         <template slot-scope="scope">
-          <el-input v-model="scope.row.fMblno" v-if="item.label == 'fMblno'"/>
-          <el-input v-model="scope.row.fBscorpno" v-if="item.label == 'fBscorpno'"/>
-          <el-input v-model="scope.row.fProductName" v-if="item.label == 'fProductName'"/>
-          <el-input v-model="scope.row.fBsdate" v-if="item.label == 'fBsdate'"/>
-          <el-input v-model="scope.row.fFeeName" v-if="item.label == 'fFeeName'"/>
-          <el-input v-model="scope.row.fSrcdc" v-if="item.label == 'fSrcdc'"/>
-          <el-input v-model="scope.row.fBilltype" v-if="item.label == 'fBilltype'"/>
-          <el-input v-model="scope.row.fBusinessType" v-if="item.label == 'fBusinessType'"/>
-          <el-input v-model="scope.row.fAmtdr" v-if="item.label == 'fAmtdr'"/>
-          <el-input v-model="scope.row.fAmt" v-if="item.label == 'fAmt'"/>
-          <el-input v-model="scope.row.fRemarks" v-if="item.label == 'fRemarks'"/>
-          <el-input v-model="scope.row.fRemarks" v-if="item.label == 'fRemarks'"/>
-          <el-input v-model="scope.row.fRemarks" v-if="item.label == 'fRemarks'"/>
-          <el-input v-model="scope.row.fRemarks" v-if="item.label == 'fRemarks'"/>
-          <el-input v-model="scope.row.fRemarks" v-if="item.label == 'fRemarks'"/>
-          <el-input v-model="scope.row.fRemarks" v-if="item.label == 'fRemarks'"/>
+          <el-select v-model="scope.row.fFeeName" v-if="item.label == 'fFeeName'">
+              <el-option
+                v-for="(dict, index) in fDNameOptions"
+                :key="index.fId"
+                :label="dict.fName"
+                :value="dict.fId"
+              ></el-option>
+          </el-select>
+          <el-input v-model="scope.row.fModel" v-if="item.label == 'fModel'"/>
+          <el-input v-model="scope.row.fSbuName" v-if="item.label == 'fSbuName'"/>
+          <el-input v-model="scope.row.fNumber" v-if="item.label == 'fNumber'"/>
+          <el-input v-model="scope.row.fUnitprice" v-if="item.label == 'fUnitprice'"/>
+          <el-input v-model="scope.row.fMoney" v-if="item.label == 'fMoney'"/>
+          <el-input v-model="scope.row.fTaxrate" v-if="item.label == 'fTaxrate'"/>
+          <el-input v-model="scope.row.fTax" v-if="item.label == 'fTax'"/>
+          <el-input v-model="scope.row.fAmount" v-if="item.label == 'fAmount'"/>
+          <el-select v-model="scope.row.fStatus" v-if="item.label == 'fStatus'">
+            <el-option label="是" value="0"/>
+            <el-option label="否" value="1"/>
+          </el-select>
+          <el-input v-model="scope.row.remarks" v-if="item.label == 'remarks'"/>
+          <el-input v-model="scope.row.createBy" v-if="item.label == 'createBy'"/>
+          <el-input v-model="scope.row.createTime" v-if="item.label == 'createTime'"/>
+          <el-input v-model="scope.row.updateBy" v-if="item.label ==  'updateBy' && scope.row.fStatus == '0'"/>
+          <el-input v-model="scope.row.updateTime" v-if="item.label == 'updateTime' && scope.row.fStatus == '0'"/>
         </template>
       </el-table-column>
       <el-table-column
@@ -331,21 +342,25 @@
         label-width="80px"
         style="display: flex; flex-wrap: wrap"
       >
-        <el-form-item label="客户名称" prop="fCtrlcorpid">
-          <el-input
-            v-model="queryParams.fCorpid"
+        <el-form-item label="客户名称" prop="fCorpid">
+          <el-select
+            v-model="queryParameter.fCorpid"
             filterable
             remote
-            clearable
-            size="small"
             style="width: 200px"
-            placeholder="请选择货权方"
+            placeholder="客户名称"
           >
-          </el-input>
+            <el-option
+              v-for="item in nameOptions"
+              :key="item.id"
+              :label="item.name"
+              :value="item.id"
+            ></el-option>
+          </el-select>
         </el-form-item>
-        <el-form-item label="提单号" prop="fToCorpid">
+        <el-form-item label="提单号" prop="fMblno">
           <el-input
-            v-model="queryParameter.fToCorpid"
+            v-model="queryParameter.fMblno"
             filterable
             remote
             clearable
@@ -355,88 +370,114 @@
           >
           </el-input>
         </el-form-item>
-        <el-form-item label="业务日期" prop="tMblno">
-          <el-input
-            v-model="queryParameter.fMblno"
-            placeholder="请输入提单号"
-            style="width: 200px"
-            size="small"
-          />
-        </el-form-item>
-        <el-form-item label="审核日期" prop="fStatementNo">
-          <el-input
-            v-model="queryParameter.fStatementNo"
-            placeholder="请输入提单号"
-            size="small"
-            style="width: 200px"
-          />
+        <el-form-item label="审核日期" prop="timeExamine">
+          <el-date-picker
+            v-model="queryParameter.timeExamine"
+            type="daterange"
+            range-separator="至"
+            @change="timeMethods"
+            value-format="yyyy-MM-dd"
+            style="width: 250px"
+            start-placeholder="开始日期"
+            end-placeholder="结束日期">
+          </el-date-picker>
         </el-form-item>
-        <el-form-item label="业务类型" prop="fFeeid">
+        <el-form-item label="业务类型" prop="fBusinessType">
           <template>
-            <el-input
-              v-model="queryParameter.fFeeid"
+            <el-select
+              v-model="queryParameter.fBusinessType"
               filterable
               remote
               size="small"
               style="width: 200px"
-              placeholder="费用名称"
+              placeholder="请选择业务类型"
               multiple
             >
-            </el-input>
+              <el-option
+                v-for="dict in businessTypeOptions"
+                :key="dict.dictValue"
+                :label="dict.dictLabel"
+                :value="dict.dictValue"
+              ></el-option>
+            </el-select>
           </template>
         </el-form-item>
-        <el-form-item label="船名" prop="fFeeid">
+        <el-form-item label="船名" prop="fVslid">
           <el-select
-            v-model="queryParameter.fBilltype"
+            filterable
+            v-model="queryParameter.fVslid"
             size="small"
             style="width: 200px"
             placeholder="请选择仓储业务"
           >
-            <el-option label="入库" value="SJRK"></el-option>
-            <el-option label="出库" value="SJCK"></el-option>
-            <el-option label="货权转移" value="HQZY"></el-option>
+            <el-option
+              v-for="item in vesselOptions"
+              :key="item.fId"
+              :label="item.fName"
+              :value="item.fId"/>
           </el-select>
         </el-form-item>
-        <el-form-item label="航次" prop="fBusinessType">
-          <el-input
-            v-model="queryParameter.fBusinessType"
+        <el-form-item label="航次" prop="fVoyid">
+          <el-select
+            v-model="queryParameter.fVoyid"
             filterable
             remote
             size="small"
             style="width: 200px"
           >
-          </el-input>
+            <el-option
+              v-for="item in voyageOptions"
+              :key="item.fId"
+              :label="item.fNo"
+              :value="item.fId"/>
+          </el-select>
         </el-form-item>
-        <el-form-item label="收/付" prop="timeExamine">
+        <el-form-item label="收/付" prop="fDc">
           <el-select
-            v-model="queryParameter.timeExamine"
+            v-model="queryParameter.fDc"
             filterable
             remote
             size="small"
             style="width: 200px">
             <el-option label="收" value="D"/>
-            <el-option label="付" value="C"/>
+<!--            <el-option label="付" value="C"/>-->
           </el-select>
         </el-form-item>
-        <el-form-item label="费用名称" label-width="85px" prop="fAccbilldate">
-          <el-date-picker
+        <el-form-item label="费用名称" label-width="85px" prop="fFeeid">
+          <el-select
+            v-model="queryParameter.fFeeid"
+            filterable
+            remote
+            clearable
             size="small"
-            style="width: 240px"
-            v-model="queryParameter.timeInterval"
+            style="width: 200px">
+            <el-option
+              v-for="(dict, index) in fDNameOptions"
+              :key="index.fId"
+              :label="dict.fName"
+              :value="dict.fId"
+            ></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="业务日期" prop="createTimeList">
+          <el-date-picker
+            v-model="queryParameter.createTimeList"
             type="daterange"
-            start-placeholder="开始日期"
-            end-placeholder="结束日期"
+            range-separator="至"
+            style="width: 250px"
             value-format="yyyy-MM-dd"
-            :default-time="['00:00:00', '23:59:59']"
-          >
+            @change="changeTime"
+            start-placeholder="开始日期"
+            end-placeholder="结束日期">
           </el-date-picker>
         </el-form-item>
+
         <el-form-item>
           <el-button
             type="cyan"
             icon="el-icon-search"
             size="mini"
-            @click=""
+            @click="getataDList"
           >搜索</el-button
           >
           <el-button icon="el-icon-refresh" size="mini" @click=""
@@ -455,35 +496,35 @@
         <el-table-column label="序号" type="index" width="55" align="center"/>
         <el-table-column label="货权方" align="center" prop="fName" />
         <el-table-column label="提单号" align="center" prop="fMblno" />
-        <el-table-column label="品名" align="center" prop="fProductName" />
+<!--        <el-table-column label="品名" align="center" prop="fProductName" />-->
         <el-table-column label="业务日期" align="center">
-          <template slot-scope="scope" v-if="scope.row.fBsdate">
-            <span>{{ scope.row.fBsdate.slice(0, 10) }}</span>
+          <template slot-scope="scope" v-if="scope.row.createTime">
+            <span>{{ scope.row.createTime.slice(0, 10) }}</span>
           </template>
         </el-table-column>
-        <el-table-column label="业务类型" align="center" prop="fBilltype">
-          <template slot-scope="scope">
-            <span v-if="scope.row.fBilltype == 'SJRK'">入库</span>
-            <span v-else-if="scope.row.fBilltype == 'SJCK'">出库</span>
-            <span v-else>{{ scope.row.fBilltype }}</span>
-          </template>
+        <el-table-column label="业务类型" align="center" prop="businessName">
+<!--          <template slot-scope="scope">-->
+<!--            <span v-if="scope.row.fBilltype == 'SJRK'">入库</span>-->
+<!--            <span v-else-if="scope.row.fBilltype == 'SJCK'">出库</span>-->
+<!--            <span v-else>{{ scope.row.fBilltype }}</span>-->
+<!--          </template>-->
         </el-table-column>
-        <el-table-column label="作业类型" align="center" prop="fBusinessType"/>
+<!--        <el-table-column label="作业类型" align="center" prop="fBusinessType"/>-->
         <el-table-column label="审核日期" align="center" prop="fReviewDate" />
         <el-table-column label="费用名称" align="center" prop="fFeeName" />
         <el-table-column label="金额" align="center" prop="fAmtdr" />
-        <el-table-column label="本次金额" align="center" prop="fAmt" width="100">
-          <template slot-scope="scope">
-            <el-input
-              v-model="scope.row.fAmt"
-              placeholder="请输入本次金额"
-              clearable
-              size="small"
-              oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
-              @change=""
-            />
-          </template>
-        </el-table-column>
+<!--        <el-table-column label="本次金额" align="center" prop="fAmt" width="100">-->
+<!--          <template slot-scope="scope">-->
+<!--            <el-input-->
+<!--              v-model="scope.row.fAmt"-->
+<!--              placeholder="请输入本次金额"-->
+<!--              clearable-->
+<!--              size="small"-->
+<!--              oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'-->
+<!--              @change=""-->
+<!--            />-->
+<!--          </template>-->
+<!--        </el-table-column>-->
         <el-table-column label="备注" align="center" prop="fRemarks">
           <template slot-scope="scope">
             <el-input
@@ -497,7 +538,7 @@
         </el-table-column>
       </el-table>
       <div slot="footer" class="dialog-footer">
-        <el-button type="primary" @click="">确 定</el-button>
+        <el-button type="primary" @click="determine">确 定</el-button>
         <el-button @click="innerVisible = false">取 消</el-button>
       </div>
     </el-dialog>
@@ -509,9 +550,10 @@
 <script>
 import Vue from 'vue'
 import Cookies from 'js-cookie'
-import { listCharge, listCharges } from '@/api/finance/charge'
+import { getVoyageName, getVesselName,getcontrastList } from '@/api/kaihe/applyForInvoice/feeDetail'
 import { addSet, select } from '@/api/system/set'
 import draggable from "vuedraggable";
+import { getFName, listFees } from '@/api/kaihe/domesticTrade/orderInformation'
 
 Vue.directive("dialogDrag", {
   bind(el, binding, vnode, oldVnode) {
@@ -577,83 +619,102 @@ export default {
   },
   data(){
     return{
+      empty: [],
+      nothing: [],
+      pass: {
+        fAmtdr: "", //应收合计
+        fMblno: "", //提单号
+        fName: "", //货权方
+      },
+      voyageOptions:[],
+      vesselOptions:[],
+      businessTypeOptions:[],
+      fDNameOptions: [],
+      nameOptions:[],
       doNot:false,
       tableDate: [
         {
           surface: "1",
-          label: "createBy",
-          name: "申请编号",
+          label: "fBillno",
+          name: "业务编号",
           checked: 0,
           fixed: "left",
           width: 100,
         },
         {
           surface: "2",
-          label: "fBillno",
-          name: "客户名称",
+          label: "boatName",
+          name: "船名",
           checked: 0,
           fixed: "left",
           width: 100,
         },
         {
           surface: "3",
-          label: "fCtrlcorpid",
-          name: "开票单位",
+          label: "voyageName",
+          name: "航次",
           checked: 0,
           width: 100,
         },
         {
           surface: "4",
-          label: "createTime",
-          name: "金额",
+          label: "tMblno",
+          name: "提单号",
           checked: 0,
           width: 100,
         },
         {
           surface: "5",
           label: "fAccbilldate",
-          name: "申请日期",
+          name: "费用名称",
           checked: 0,
           width: 100,
         },
         {
           surface: "6",
-          label: "tMblno",
-          name: "申请人",
+          label: "fCurreny",
+          name: "币别",
           checked: 0,
           width: 100,
         },
         {
           surface: "7",
           label: "chargingMethod",
-          name: "申请单位",
+          name: "金额",
           checked: 0,
           width: 100,
         },
         {
           surface: "8",
           label: "invoiceNo",
-          name: "状态",
+          name: "汇率",
           checked: 0,
           width: 100,
         },
         {
           surface: "9",
           label: "bank",
-          name: "审核日期",
+          name: "业务类型",
           checked: 0,
           width: 100,
         },
         {
           surface: "10",
           label: "waterBillNo",
-          name: "审核人",
+          name: "状态",
           checked: 0,
           width: 100,
         },
         {
           surface: "11",
-          label: "fAmtdr",
+          label: "审核日期",
+          name: "审核日期",
+          checked: 0,
+          width: 100,
+        },
+        {
+          surface: "12",
+          label: "审核日期",
           name: "备注",
           checked: 0,
           width: 100,
@@ -662,112 +723,105 @@ export default {
       tableDate2: [
         {
           surface: "1",
-          label: "fMblno",
+          label: "fFeeName",
           name: "货物或应税劳务、服务名称",
           checked: 0,
           width: 100,
         },
         {
           surface: "2",
-          label: "fBscorpno",
+          label: "fModel",
           name: "规格型号",
           checked: 0,
           width: 100,
         },
         {
           surface: "3",
-          label: "fProductName",
+          label: "fSbuName",
           name: "单位",
           checked: 0,
           width: 100,
         },
         {
           surface: "4",
-          label: "fBsdate",
+          label: "fNumber",
           name: "数量",
           checked: 0,
           width: 100,
         },
         {
           surface: "5",
-          label: "fFeeName",
+          label: "fUnitprice",
           name: "单价(含税)",
           checked: 0,
           width: 100,
         },
         {
           surface: "6",
-          label: "fSrcdc",
-          name: "收/付",
-          checked: 0,
-          width: 100,
-        },
-        {
-          surface: "7",
-          label: "fBilltype",
+          label: "fMoney",
           name: "金额(含税)",
           checked: 0,
           width: 100,
         },
         {
-          surface: "8",
-          label: "fBusinessType",
+          surface: "7",
+          label: "fTaxrate",
           name: "税率",
           checked: 0,
           width: 100,
         },
         {
-          surface: "9",
-          label: "fAmtdr",
+          surface: "8",
+          label: "fTax",
           name: "税额",
           checked: 0,
           width: 100,
         },
         {
-          surface: "10",
-          label: "fAmt",
+          surface: "9",
+          label: "fAmount",
           name: "合计金额",
           checked: 0,
           width: 100,
         },
         {
-          surface: "11",
-          label: "fRemarks",
+          surface: "10",
+          label: "fStatus",
           name: "作废状态",
           checked: 0,
           width: 100,
         },
         {
-          surface: "12",
-          label: "fRemarks",
+          surface: "11",
+          label: "remarks",
           name: "备注",
           checked: 0,
           width: 100,
         },
         {
-          surface: "13",
-          label: "fRemarks",
+          surface: "12",
+          label: "createBy",
           name: "录入人",
           checked: 0,
           width: 100,
         },
         {
-          surface: "14",
-          label: "fRemarks",
+          surface: "13",
+          label: "createTime",
           name: "录入时间",
           checked: 0,
           width: 100,
         },
         {
-          surface: "15",
-          label: "fRemarks",
+          surface: "14",
+          label: "updateBy",
           name: "作废人",
           checked: 0,
           width: 100,
         },
         {
-          surface: "16",
-          label: "fRemarks",
+          surface: "15",
+          label: "updateTime",
           name: "作废时间",
           checked: 0,
           width: 100,
@@ -782,7 +836,17 @@ export default {
       allCheck: false,
       showSetting: false,
       chargeList_s:[],
-      queryParameter:{},
+      queryParameter:{
+        fCorpid:null,
+        fMblno:null,
+        timeExamine:null,
+        fBusinessType:null,
+        fVslid:null,
+        fVoyid:null,
+        fDc:'D',
+        fFeeid:null,
+        createTimeList:null
+      },
       //打开内部弹窗
       innerVisible: false,
       //全屏放大
@@ -796,15 +860,24 @@ export default {
       invoiceInfo:false,
       feeInfo:true,
       queryParams:{},
+      Fee: [],
     }
   },
   created(){
+    this.getDicts("data_billType").then((response) => {
+      if (response.data) {
+        this.businessTypeOptions = response.data
+      }
+    });
     this.setRowList = this.tableDate;
     this.getRowList = this.tableDate;
     this.setRowList2 = this.tableDate2;
     this.getRowList2 = this.tableDate2;
     this.getRow();
-    this.getRow2();
+    this.nameRemoteMethod()
+    this.vessleRemthod()
+    this.voyageRemthods()
+    // this.getRow2();
   },
   activated() {
     if(this.$route.query.data){
@@ -816,6 +889,166 @@ export default {
     }
   },
   methods:{
+    //确定带入从表
+    determine(){
+      console.log(this.selection)
+      this.pass.fAmtdr = 0;
+      for (let item in this.selection) {
+        this.pass.fAmtdr = Number(this.pass.fAmtdr);
+        this.pass.fAmtdr += Number(this.selection[item].fAmtdr);
+      }
+      console.log(this.pass.fAmtdr)
+      if (!this.selection.length) {
+        this.$message.error("未选择导入行");
+      }else{
+        for (let item in this.selection) {
+          console.log(this.selection)
+          this.empty.push(this.selection[item].fMblno);
+          this.nothing.push(this.selection[item].fName);
+          console.log(this.empty, this.nothing)
+
+          if (this.feeList.length === 0) {
+            this.feeList = this.feeList.concat(this.selection);
+            //去重提单号
+            this.empty = new Set(this.empty);
+            this.empty = Array.from(this.empty);
+            //去重货权方
+            this.nothing = new Set(this.nothing);
+            this.nothing = Array.from(this.nothing);
+            if (this.empty.length <= 1) {
+              this.pass.fMblno = this.empty[0];
+            } else {
+              this.pass.fMblno = this.empty[0] + "...";
+            }
+            if (this.nothing.length <= 1) {
+              this.pass.fName = this.nothing[0];
+            } else {
+              this.pass.fName = this.nothing[0] + "...";
+            }
+            // this.queryParams.tMblno = this.pass.fMblno; //提单号
+            this.queryParams.fCtrlcorpid = this.pass.fName;
+            // this.queryParams.fAmtdr = this.pass.fAmtdr;
+            this.innerVisible = false
+            this.chargeList_s = []
+            this.queryParameter = {
+              fCorpid: "",
+              fMblno: "",
+              timeExamine: "",
+              fBusinessType: "",
+              fVslid: "",
+              fVoyid: "",
+              fDc: 'D',
+              fFeeid: "",
+              createTimeList: ""
+            }
+            return
+          }
+        else {
+            for (let li in this.feeList) {
+              if (this.selection[item].fSrcid !== this.feeList[li].fSrcid) {
+                this.Fee = this.feeList.concat(this.selection);
+                let result = [];
+                let obj = {};
+                for (let lis in this.Fee) {
+                  if (!obj[this.Fee[lis].fSrcid]) {
+                    result.push(this.Fee[lis]);
+                    obj[this.Fee[lis].fSrcid] = true;
+                  }
+                }
+                //去重提单号
+                this.empty = new Set(this.empty);
+                this.empty = Array.from(this.empty);
+                //去重货权方
+                this.nothing = new Set(this.nothing);
+                this.nothing = Array.from(this.nothing);
+                if (this.empty.length <= 1) {
+                  this.pass.fMblno = this.empty[0];
+                } else {
+                  this.pass.fMblno = this.empty[0] + "...";
+                }
+                if (this.nothing.length <= 1) {
+                  this.pass.fName = this.nothing[0];
+                } else {
+                  this.pass.fName = this.nothing[0] + "...";
+                }
+                this.innerVisible = false
+                this.chargeList_s = []
+                this.queryParameter = {
+                  fCorpid: "",
+                  fMblno: "",
+                  timeExamine: "",
+                  fBusinessType: "",
+                  fVslid: "",
+                  fVoyid: "",
+                  fDc: 'D',
+                  fFeeid: "",
+                  createTimeList: ""
+                }
+                this.feeList = result
+              }else {
+                let i = Number(item) + 1;
+                this.$message.error("行号为" + i + "重复");
+              }
+            }
+          }
+        }
+        console.log(this.feeList)
+      }
+      // this.chargeList_s = this.feeList
+    },
+    voyageRemthods(){
+      getVoyageName().then(response=>{
+        console.log(response)
+        this.voyageOptions = response.rows
+      })
+    },
+    vessleRemthod(){
+      getVesselName().then(response=>{
+        console.log(response)
+        this.vesselOptions = response.rows
+      })
+    },
+    changeTime(){
+      this.queryParameter.createTimeList[0] = this.queryParameter.createTimeList[0]+" 00:00:00"
+      this.queryParameter.createTimeList[1] = this.queryParameter.createTimeList[1]+" 23:59:59"
+    },
+    timeMethods(){
+      this.queryParameter.timeExamine[0] = this.queryParameter.timeExamine[0]+" 00:00:00"
+      this.queryParameter.timeExamine[1] = this.queryParameter.timeExamine[1]+" 23:59:59"
+    },
+    openSearch(){
+      this.queryParameter = {
+        fCorpid:null,
+          fMblno:null,
+          timeExamine:null,
+          fBusinessType:null,
+          fVslid:null,
+          fVoyid:null,
+          fDc:'D',
+          fFeeid:null,
+          createTimeList:null
+      },
+      this.chargeList_s = []
+      let query = { pageNum: 1, fDc: "D" };
+      listFees(query).then((response) => {
+        this.fDNameOptions = response.rows;
+      });
+      this.innerVisible = true
+    },
+    //获取客户名称下拉
+    nameRemoteMethod(){
+      let queryParams = { pageNum: 1 }
+      getFName(queryParams).then(response=>{
+        this.nameOptions = response.data
+      })
+    },
+    getataDList(){
+      getcontrastList(this.queryParameter).then(res=>{
+        console.log(res)
+        this.chargeList_s = res.rows
+
+      })
+    },
     submit(){
 
     },
@@ -993,6 +1226,10 @@ export default {
     },
     //发票信息新行
     addList(){
+      let query = { pageNum: 1, fDc: "D" };
+      listFees(query).then((response) => {
+        this.fDNameOptions = response.rows;
+      });
       this.invoiceList.push({
 
       })

+ 43 - 68
src/views/kaihe/applyForInvoice/invoiceInformation/index.vue

@@ -7,7 +7,7 @@
       v-show="showSearch"
       label-width="68px"
     >
-      <el-form-item label="申请编号" prop="fCtrlcorpid">
+      <el-form-item label="申请编号" prop="fBillno">
         <el-input
           v-model="queryParams.fBillno"
           placeholder="请输入系统编号"
@@ -17,9 +17,9 @@
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
-      <el-form-item label="客户名称" prop="fCtrlcorpid">
+      <el-form-item label="客户名称" prop="fCorpid">
         <el-input
-          v-model="queryParams.fCtrlcorpid"
+          v-model="queryParams.fCorpid"
           placeholder="请输入货权方"
           clearable
           size="small"
@@ -27,9 +27,9 @@
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
-      <el-form-item label="申请人" prop="fCorpid">
+      <el-form-item label="申请人" prop="creatBy">
         <el-select
-          v-model="queryParams.fCorpid"
+          v-model="queryParams.creatBy"
           filterable
           remote
           clearable
@@ -47,7 +47,7 @@
           ></el-option>
         </el-select>
       </el-form-item>
-      <el-form-item label="备注" prop="timeInterval">
+      <el-form-item label="备注" prop="remark">
         <el-input
           type="daterange"
           size="small"
@@ -56,26 +56,32 @@
         >
         </el-input>
       </el-form-item>
-      <el-form-item label="申请金额" prop="timeInterval">
+      <el-form-item label="申请金额" prop="money">
         <el-input
           type="daterange"
           size="small"
-          style="width: 200px"
-          v-model="queryParams.timeInterval"
+          style="width: 100px"
+          v-model="moneys"
+        >
+        </el-input>
+        <el-input
+          type="daterange"
+          size="small"
+          style="width: 100px"
+          v-model="moneye"
         >
         </el-input>
       </el-form-item>
-      <el-form-item label="申请日期" prop="timeInterval">
+      <el-form-item label="申请日期" prop="applyTime">
         <el-date-picker
           type="daterange"
           size="small"
           style="width: 240px"
-          v-model="queryParams.timeInterval"
+          @change="timeMethods"
+          v-model="queryParams.applyTime"
           start-placeholder="开始日期"
           end-placeholder="结束日期"
-          value-format="yyyy-MM-dd"
-          :default-time="['00:00:00', '23:59:59']"
-        >
+          value-format="yyyy-MM-dd">
         </el-date-picker>
       </el-form-item>
       <el-form-item>
@@ -310,27 +316,8 @@
 </template>
 
 <script>
-import {
-  collectFee,
-  collectFees,
-  listCharge,
-  listCharges,
-  getCharge,
-  getCharges,
-  delCharge,
-  delCharges,
-  addCharge,
-  addCharges,
-  exportCharge,
-  search,
-  searchs,
-  listCorps,
-  delCharge_s,
-  delCharge_ss,
-  backCharge,
-  revocation,
-  exportWarehousebillsitems,
-} from "@/api/finance/charge";
+import { listCharge, delCharge, delCharges, exportCharge, listCorps, delCharge_s, delCharge_ss,exportWarehousebillsitems,
+} from "@/api/kaihe/applyForInvoice/invoiceInformation";
 import { listFees } from "@/api/basicdata/fees";
 import print from "print-js";
 import AddOrUpdate from "@/views/viewApproval";
@@ -414,7 +401,7 @@ export default {
         },
         {
           surface: "2",
-          label: "fCorpid",
+          label: "fCorpidName",
           name: "客户名称",
           fixed:"left",
           checked: 0,
@@ -422,7 +409,7 @@ export default {
         },
         {
           surface: "3",
-          label: "fCtrlcorpid",
+          label: "fCtrlcorpid ",
           name: "开票单位",
           fixed:"left",
           checked: 0,
@@ -438,7 +425,7 @@ export default {
         },
         {
           surface: "5",
-          label: "fOpdate",
+          label: "createTime",
           name: "申请日期",
           fixed:"left",
           checked: 0,
@@ -446,7 +433,7 @@ export default {
         },
         {
           surface: "6",
-          label: "fUserid",
+          label: "createBy",
           name: "申请人",
           fixed:"left",
           checked: 0,
@@ -454,28 +441,28 @@ export default {
         },
         {
           surface: "7",
-          label: "fCorpid",
+          label: "createName",
           name: "申请单位",
           checked: 0,
           width: 120,
         },
         {
           surface: "8",
-          label: "fStatus",
+          label: "fBillstatus",
           name: "状态",
           checked: 0,
           width: 120,
         },
         {
           surface: "9",
-          label: "vslName",
+          label: "updateTime",
           name: "审核日期",
           checked: 0,
           width: 120,
         },
         {
           surface: "10",
-          label: "voyNo",
+          label: "updateBy",
           name: "审核人",
           checked: 0,
           width: 120,
@@ -513,6 +500,8 @@ export default {
       total: 0,
       totAL: 0,
       Ttime: 0,
+      moneys:'',
+      moneye:'',
       // 财务数据主表格数据
       chargeList: [],
       // 弹出层标题
@@ -523,16 +512,11 @@ export default {
         pageNum: 1,
         pageSize: 10,
         fBillno: null,
-        fCtrlcorpid: null,
         fCorpid: null,
-        tMblno: null,
-        fAmtdr: null,
-        fAmtcr: null,
-        fBilltype: null,
-        fBillstatus: null,
-        fRemarks: null,
-        fAccbilldate: null,
-        fDeptid: null,
+        creatBy: null,
+        remark: null,
+        money: [],
+        createTime: null,
       },
     };
   },
@@ -688,29 +672,20 @@ export default {
         selection.map((item) => item.fBillstatus) == 4;
       this.multiple = !selection.length;
     },
+    timeMethods(){
+      this.queryParams.applyTime[0] = this.queryParams.applyTime[0]+" 00:00:00"
+      this.queryParams.applyTime[1] = this.queryParams.applyTime[1]+" 23:59:59"
+    },
     /** 查询财务数据主列表 */
     getList() {
       this.loading = true;
-      if (Cookies.get("sysType") == 1) {
-        //大木
-        listCharge(this.tableFilter).then((response) => {
-          this.chargeList = response.rows;
-          this.total = response.total;
-          this.loading = false;
-        });
-      } else if (Cookies.get("sysType") == 2) {
-        //车队
-        listCharges(this.tableFilter).then((response) => {
-          response.rows.map((e) => {
-            if (e.createTime) {
-              e.createTime = e.createTime.substring(0, 10);
-            }
-          });
+      this.queryParams.money = [this.moneys,this.moneye]
+      console.log(this.queryParams)
+      listCorps(this.queryParams).then((response) => {
           this.chargeList = response.rows;
           this.total = response.total;
           this.loading = false;
         });
-      }
     },
     // 取消按钮
     cancel() {

+ 162 - 48
src/views/kaihe/domesticTrade/orderInformation/index.vue

@@ -21,6 +21,7 @@
                   v-model="form.fMblno"
                   :disabled="modify"
                   size="small"
+
                   style="width: 100%"
                   placeholder="手工输入"
                 />
@@ -502,6 +503,30 @@
                 <el-table-column label="序号" type="index" width="80">
                 </el-table-column>
                 <el-table-column
+                  prop="fBusinessType"
+                  header-align="center"
+                  align="center"
+                  width="180px"
+                  label="业务类型"
+                >
+                  <template slot-scope="scope">
+                    <el-select
+                      v-model="scope.row.fBusinessType"
+                      filterable
+                      remote
+                      :disabled="modify || scope.row.fSrcTypeId != 0"
+                      placeholder="客户名称"
+                    >
+                      <el-option
+                        v-for="dict in businessTypeOptions"
+                        :key="dict.dictValue"
+                        :label="dict.dictLabel"
+                        :value="dict.dictValue"
+                      ></el-option>
+                    </el-select>
+                  </template>
+                </el-table-column>
+                <el-table-column
                   prop="fCorpid"
                   header-align="center"
                   align="center"
@@ -799,6 +824,30 @@
                   header-align="center"
                   align="center"
                   width="180px"
+                  label="业务类型"
+                >
+                  <template slot-scope="scope">
+                    <el-select
+                      v-model="scope.row.fBusinessType"
+                      filterable
+                      remote
+                      :disabled="modify || scope.row.fSrcTypeId != 0"
+                      placeholder="客户名称"
+                    >
+                      <el-option
+                        v-for="dict in businessTypeOptions"
+                        :key="dict.dictValue"
+                        :label="dict.dictLabel"
+                        :value="dict.dictValue"
+                      ></el-option>
+                    </el-select>
+                  </template>
+                </el-table-column>
+                <el-table-column
+                  prop="fCorpid"
+                  header-align="center"
+                  align="center"
+                  width="180px"
                   label="客户名称"
                 >
                   <template slot-scope="scope">
@@ -1048,9 +1097,9 @@
       <approval-comments v-if="addOrUpdateVisib" ref="ApprovalComments" @refreshDataList="returnData"></approval-comments>
       <el-button type="info" v-if="this.form.fBillstatus == 11" @click="modify = false">修 改</el-button>
       <el-button type="success" v-if="this.form.fBillstatus == 11" @click="approval">保 存</el-button>
-      <el-button type="primary" v-if="this.form.fBillstatus == 11" @click="feeSubmission">费用请核</el-button>
+      <el-button type="primary" :disabled="modify" v-if="this.form.fBillstatus == 11" @click="feeSubmission">费用请核</el-button>
       <el-button type="success" v-if="approVal" @click="addOrUpdateHand(form)">审 批</el-button>
-      <el-button type="danger" v-if="form.moneyStatus === 4" @click="revokeTwo">撤销请核</el-button>
+      <el-button type="danger" v-if="form.moneyStatus === 4 && current == before" @click="revokeTwo">撤销请核</el-button>
       <el-button type="primary" v-if="this.form.fBillstatus != 11 || this.form.moneyStatus != null && this.form.moneyStatus != 6"@click="addOrUpdateHandle(form)">查看审批</el-button>
     </div>
 <!--    附件查看-->
@@ -1159,6 +1208,7 @@ import Vue from 'vue'
 import AddOrUpdate from '@/views/viewApproval'
 import ApprovalComments from '@/views/startApproval'
 import { revoke, revokeTwo } from '@/api/warehouseBusiness/warehouseInStock'
+import { queryUserVal } from '@/api/system/user'
 Vue.directive('dialogDrag', {
   bind(el, binding, vnode, oldVnode) {
     const dialogHeaderEl = el.querySelector('.el-dialog__header')
@@ -1222,6 +1272,10 @@ export default {
   },
   data() {
     return {
+      businessTypeOptions:[],
+      id:null,
+      current: "",
+      before: "",
       approVal: false,
       //客户名称下拉模糊
       nameOptions:[],
@@ -1300,26 +1354,40 @@ export default {
       this.approVal = true;
     }else if(this.$route.query.data){
       formDate = JSON.parse(this.$route.query.data)
+      this.id = JSON.parse(this.$route.query.data)
       this.approVal = false;
     }
+
     if (formDate) {
       addmodify(formDate).then(response => {
         console.log(response)
         this.form = response.rows[0]
+        let data = {
+          actId:460,
+          id:this.form.fId
+        }
+        getfee(data).then(response=>{
+          if(response.data.length != 0){
+            this.before = response.data[0].userName
+          }
+        })
+        queryUserVal().then((response) => {
+          this.current = response.user.userName;
+        });
         this.goodsList = response.rows[0].tWarehousebillsCntrList
         this.estimatedTime = response.rows[0].tVoyageL
         this.dataList = response.rows[0].tWarehousebillsCntritemsList
         this.loading = false
-        if (response.rows[0].tWarehousebillsfeesDr){
+        if (response.rows[0].tWarehousebillsfeesDr) {
           this.warehouseDrList = response.rows[0].tWarehousebillsfeesDr
-          for(let item in this.warehouseDrList){
-            this.$set(this.warehouseDrList[item],'fFeeUnitid',JSON.stringify(this.warehouseDrList[item].fFeeunitid))
+          for (let item in this.warehouseDrList) {
+            this.$set(this.warehouseDrList[item], 'fFeeUnitid', JSON.stringify(this.warehouseDrList[item].fFeeunitid))
           }
         }
-        if (response.rows[0].warehousebillsfeesCr){
+        if (response.rows[0].warehousebillsfeesCr) {
           this.warehouseCrList = response.rows[0].warehousebillsfeesCr
-          for(let item in this.warehouseCrList){
-            this.$set(this.warehouseCrList[item],'fFeeUnitid',JSON.stringify(this.warehouseCrList[item].fFeeunitid))
+          for (let item in this.warehouseCrList) {
+            this.$set(this.warehouseCrList[item], 'fFeeUnitid', JSON.stringify(this.warehouseCrList[item].fFeeunitid))
           }
         }
       })
@@ -1346,6 +1414,12 @@ export default {
         this.packgeOptions = response.data
       }
     });
+    this.getDicts("data_billType").then((response) => {
+      console.log(response)
+      if (response.data) {
+        this.businessTypeOptions = response.data
+      }
+    });
     this.cntrtypeRemoteMethod()
     this.goodRemoteMethod()
     this.nameRemoteMethod()
@@ -1358,7 +1432,6 @@ export default {
     listFees(query).then((response) => {
       this.fDNameOptions = response.rows;
     });
-    // this.name()
   },
   methods: {
     //撤销审批
@@ -1371,17 +1444,58 @@ export default {
       revokeTwo(data).then((data) => {
         if (data.code === 200) {
           this.msgSuccess("撤销成功");
-          this.open = false;
-          this.getList();
+          this.$router.push({path: "/domesticTrade/orderInformation"})
           this.reset();
         }
       });
     },
     //费用提交审核
     feeSubmission(){
-      // if(!this.warehouseDrList){
-      //
-      // }
+      if(!this.warehouseDrList && !this.warehouseCrList){
+        this.$message.error("请维护费用")
+        return false
+      }
+      if(this.warehouseDrList){
+        for(let li in this.warehouseDrList){
+          if(!this.warehouseDrList[li].fBusinessType){
+            this.$message.error("应收费用第" + (Number(li)+1) + '行业务类型为空,请维护业务类型')
+            return false
+          }else if(!this.warehouseDrList[li].fCorpid){
+            this.$message.error("应收费用第" + (Number(li)+1) + '行客户名称为空,请维护客户名称')
+            return false
+          }else if(!this.warehouseDrList[li].fFeeid){
+            this.$message.error("应收费用第" + (Number(li)+1) + '行费用名称为空,请维护费用名称')
+            return false
+          }else if(!this.warehouseDrList[li].fQty){
+            this.$message.error("应收费用第" + (Number(li)+1) + '行数量为空,请维护数量')
+            return false
+          }else if(!this.warehouseDrList[li].fUnitprice){
+            this.$message.error("应收费用第" + (Number(li)+1) + '行单价为空,请维护单价')
+            return false
+          }
+        }
+      }
+      if(this.warehouseCrList){
+        for(let li in this.warehouseCrList){
+          if(!this.warehouseCrList[li].fBusinessType){
+            this.$message.error("应付费用第" + (Number(li)+1) + '行业务类型为空,请维护业务类型')
+            return false
+          }else if(!this.warehouseDrList[li].fCorpid){
+            this.$message.error("应付费用第" + (Number(li)+1) + '行客户名称为空,请维护客户名称')
+            return false
+          }else if(!this.warehouseDrList[li].fFeeid){
+            this.$message.error("应付费用第" + (Number(li)+1) + '行费用名称为空,请维护费用名称')
+            return false
+          }else if(!this.warehouseDrList[li].fQty){
+            this.$message.error("应付费用第" + (Number(li)+1) + '行数量为空,请维护数量')
+            return false
+          }else if(!this.warehouseDrList[li].fUnitprice){
+            this.$message.error("应付费用第" + (Number(li)+1) + '行单价为空,请维护单价')
+            return false
+          }
+        }
+      }
+
       let form = {
         fId:this.form.fId,
         fMblno:this.form.fMblno
@@ -1449,23 +1563,19 @@ export default {
     //应付信息新行
     addpayment() {
       this.warehouseCrList.push({
-        fName: null,
-        fFeeid: null,
-        fFeeUnitid: '7',
-        fQty: null,
-        fUnitprice: null,
-        fAmount: null,
-        fCurrency: "RMB",
-        fExrate: "1",
-        fTaxrate: this.fTaxrate,
-        fCxrate: null,
-        fRate: null,
-        remarks: null,
-        fMblno: this.form.fMblno,
-        fProductName: this.form.fProductName,
-        fMarks: this.form.fMarks,
-        fBusinessType: this.form.fBusinessType,
-        fSrcTypeId: 0,
+        fBusinessType:null,
+        fCorpid:null,
+        fFeeid:null,
+        fFeeUnitid:'7',
+        fQty:null,
+        fUnitprice:null,
+        fAmount:null,
+        fStltypeid:null,
+        fCurrency:"RMB",
+        fExrate:"1",
+        fTaxrate:this.fTaxrate,
+        fSrcTypeId:0,
+        remarks:null
       })
     },
     // 数量计算
@@ -1636,23 +1746,19 @@ export default {
     //应收新行
     addCollection(){
       this.warehouseDrList.push({
-        fName: null,
-        fFeeid: null,
-        fFeeUnitid: '7',
-        fQty: null,
-        fUnitprice: null,
-        fAmount: null,
-        fCurrency: "RMB",
-        fExrate: "1",
-        fTaxrate: this.fTaxrate,
-        fCxrate: null,
-        fRate: null,
-        remarks: null,
-        fMblno: this.form.fMblno,
-        fProductName: this.form.fProductName,
-        fMarks: this.form.fMarks,
-        fBusinessType: this.form.fBusinessType,
-        fSrcTypeId: 0,
+        fBusinessType:null,
+        fCorpid:null,
+        fFeeid:null,
+        fFeeUnitid:'7',
+        fQty:null,
+        fUnitprice:null,
+        fAmount:null,
+        fStltypeid:null,
+        fCurrency:"RMB",
+        fExrate:"1",
+        fTaxrate:this.fTaxrate,
+        fSrcTypeId:0,
+        remarks:null
       })
     },
     //提交审批
@@ -1670,10 +1776,18 @@ export default {
         fMblno:this.form.fMblno
       }
       let formData = new window.FormData();
+      for(let li in this.warehouseDrList){
+        this.warehouseDrList[li].fMblno = this.form.fMblno
+      }
+      for(let item in this.warehouseCrList){
+        this.warehouseCrList[item].fMblno = this.form.fMblno
+      }
       formData.append("tWarehousebills",JSON.stringify(form))
       formData.append("tWarehousebillsCntritems",JSON.stringify(this.dataList))
       formData.append("tWarehousebillsfeesDr",JSON.stringify(this.warehouseDrList))
       formData.append("tWarehousebillsfeesCr",JSON.stringify(this.warehouseCrList))
+      console.log(this.warehouseDrList)
+      console.log(this.warehouseCrList)
       postApproval(formData).then(response=>{
         this.msgSuccess("操作成功");
         if(response.data.tWarehouseBills){

+ 1 - 1
vue.config.js

@@ -34,7 +34,7 @@ module.exports = {
     proxy: {
       // detail: https://cli.vuejs.org/config/#devserver-proxy
       [process.env.VUE_APP_BASE_API]: {
-        target: `http://192.168.137.1:9010`,
+        // target: `http://192.168.137.1:9010`,
         // target: `http://engineering.echepei.com:9010/`,
         //  target: `http://test.tms.tubaosoft.com:9010/`,
         //  target: `https://test.fms.tubaosoft.com/prod-api/`,