浏览代码

修改bug

QuKatie 3 年之前
父节点
当前提交
42f5e56164

+ 14 - 0
src/api/finance/kaihe/charge.js

@@ -105,4 +105,18 @@ export function revoke(data) {
     method: 'post',
     data:data
   })
+}
+//kaihe-查看详情
+export function getExcel() {
+  return request({
+    url: '/shipping/financialCharges/export',
+    method:'get'
+  })
+}
+//kaihe-查看详情
+export function getExcelInfo(id) {
+  return request({
+    url: '/shipping/financialCharges/exportItems/'+id,
+    method:'get'
+  })
 }

+ 14 - 0
src/api/finance/kaihe/contrast.js

@@ -105,4 +105,18 @@ export function revoke(data) {
     method: 'post',
     data:data
   })
+}
+//kaihe-查看详情
+export function getExcel() {
+  return request({
+    url: '/shipping/financial/export',
+    method:'get'
+  })
+}
+//kaihe-查看详情
+export function getExcelInfo(id) {
+  return request({
+    url: '/shipping/financial/exportItems/'+id,
+    method:'get'
+  })
 }

+ 14 - 0
src/api/finance/kaihe/payment.js

@@ -105,4 +105,18 @@ export function revoke(data) {
     method: 'post',
     data:data
   })
+}
+//kaihe-查看详情
+export function getExcel() {
+  return request({
+    url: '/shipping/financialPay/export',
+    method:'get'
+  })
+}
+//kaihe-查看详情
+export function getExcelInfo(id) {
+  return request({
+    url: '/shipping/financialPay/exportItems/'+id,
+    method:'get'
+  })
 }

+ 21 - 8
src/views/finance/charge/add-or-update.vue

@@ -12,7 +12,11 @@
           style="width: 100%"
           @selection-change="selectionChange"
         >
-          <el-table-column type="selection" width="50" />
+          <el-table-column
+            type="selection"
+            width="50"
+            :selectable="selectable"
+          />
           <el-table-column label="序号" type="index" width="50" />
           <el-table-column
             v-for="(item, index) in tableOption"
@@ -36,9 +40,7 @@
       </span>
       <span slot="footer" class="dialog-footer">
         <el-button @click="dialogVisible = false">取 消</el-button>
-        <el-button type="primary" @click="importDate"
-          >导 入</el-button
-        >
+        <el-button type="primary" @click="importDate">导 入</el-button>
       </span>
     </el-dialog>
   </div>
@@ -60,12 +62,21 @@ export default {
       },
       selectionList: [],
       tableData: [],
+      checkList: [],
     };
   },
   components: {},
   created() {},
   methods: {
-    init(data) {
+    selectable(row) {
+      if (this.checkList.some((e) => e.fSrcid == row.fSrcid)) {
+        return false;
+      } else {
+        return true;
+      }
+    },
+    init(data, list) {
+      this.checkList = list;
       this.dialogVisible = true;
       this.form = data;
       this.getList();
@@ -84,9 +95,11 @@ export default {
     selectionChange(rows) {
       this.selectionList = rows;
     },
-    importDate(){
-      this.dialogVisible=false,
-      this.$emit('imporData',this.selectionList)
+    importDate() {
+      if (this.selectionList.length == 0) {
+        return this.$message.error("请选择数据");
+      }
+      (this.dialogVisible = false), this.$emit("imporData", this.selectionList);
     },
     close() {
       this.form = this.$options.data().form;

+ 53 - 28
src/views/finance/charge/kaihe-detail.vue

@@ -41,6 +41,7 @@
               :disabled="
                 form.fBillstatus >= 4 || readOnly == 0 || tableData.length > 0
               "
+              style="width: 100%"
             >
               <el-option
                 v-for="item in corpList"
@@ -61,6 +62,7 @@
               format="yyyy-MM-dd"
               value-format="yyyy-MM-dd"
               :disabled="form.fBillstatus >= 4 || readOnly == 0"
+              style="width: 100%"
             />
           </el-form-item>
         </el-col>
@@ -72,6 +74,7 @@
               placeholder="请选择"
               clearable
               :disabled="form.fBillstatus >= 4 || readOnly == 0"
+              style="width: 100%"
             >
               <el-option
                 v-for="item in TVesselfs"
@@ -90,6 +93,7 @@
               placeholder="请选择"
               clearable
               :disabled="form.fBillstatus >= 4 || readOnly == 0"
+              style="width: 100%"
             >
               <el-option
                 v-for="item in TVoyagefs"
@@ -101,16 +105,6 @@
           </el-form-item>
         </el-col>
         <el-col :span="6">
-          <el-form-item label="系统编号">
-            <el-input
-              v-model="form.srcBillNo"
-              size="small"
-              placeholder="请输入"
-              disabled
-            ></el-input>
-          </el-form-item>
-        </el-col>
-        <el-col :span="6">
           <el-form-item label="提单号">
             <el-input
               v-model="form.tMblno"
@@ -128,6 +122,7 @@
               placeholder="请选择"
               clearable
               :disabled="form.fBillstatus >= 4 || readOnly == 0"
+              style="width: 100%"
             >
               <el-option
                 v-for="item in portNames"
@@ -146,6 +141,7 @@
               placeholder="请选择"
               clearable
               :disabled="form.fBillstatus >= 4 || readOnly == 0"
+              style="width: 100%"
             >
               <el-option
                 v-for="item in portNames"
@@ -187,12 +183,33 @@
           </el-form-item>
         </el-col>
         <el-col :span="6">
+          <el-form-item label="备注">
+            <el-input
+              v-model="form.fRemarks"
+              size="small"
+              placeholder="请输入"
+              :disabled="form.fBillstatus >= 4 || readOnly == 0"
+            ></el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :span="6">
+          <el-form-item label="系统编号">
+            <el-input
+              v-model="form.srcBillNo"
+              size="small"
+              placeholder="请输入"
+              disabled
+            ></el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :span="6">
           <el-form-item label="应收应付" prop="fDc">
             <el-select
               v-model="form.fDc"
               size="small"
               clearable
               disabled
+              style="width: 100%"
             >
               <el-option label="应收" value="D" />
               <el-option label="应付" value="C" />
@@ -218,19 +235,10 @@
               format="yyyy-MM-dd"
               value-format="yyyy-MM-dd 00:00:00"
               disabled
+              style="width: 100%"
             />
           </el-form-item>
         </el-col>
-        <el-col :span="6">
-          <el-form-item label="备注">
-            <el-input
-              v-model="form.fRemarks"
-              size="small"
-              placeholder="请输入"
-              :disabled="form.fBillstatus >= 4 || readOnly == 0"
-            ></el-input>
-          </el-form-item>
-        </el-col>
       </el-row>
     </el-form>
     <div class="head-but">
@@ -278,7 +286,14 @@
         >
           保存
         </el-button>
-        <el-button type="warning" size="mini"> 导出 </el-button>
+        <el-button
+          type="warning"
+          size="mini"
+          :disabled="!form.fId"
+          @click="handleExport"
+        >
+          导出
+        </el-button>
         <el-button
           type="cyan"
           icon="el-icon-search"
@@ -435,6 +450,7 @@ import {
   getdetail,
   infoRemove,
   revoke,
+  getExcelInfo,
 } from "@/api/finance/kaihe/charge";
 import ApprovalComments from "@/views/startApproval";
 import addOrUpdate from "./add-or-update.vue";
@@ -474,6 +490,21 @@ export default {
   },
   created() {},
   methods: {
+    /** 导出按钮操作 */
+    handleExport() {
+      let _this = this;
+      this.$confirm("是否确认导出明细数据?", "警告", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+        .then(function () {
+          return getExcelInfo(_this.form.fId);
+        })
+        .then((response) => {
+          this.download(response.msg);
+        });
+    },
     getRowdata(list) {
       this.tableOption = list;
     },
@@ -681,7 +712,7 @@ export default {
       };
       this.$refs["form"].validate((valid) => {
         if (valid) {
-          this.$refs.addOrUpdate.init(data);
+          this.$refs.addOrUpdate.init(data, this.tableData);
         } else {
           this.$message.error("请选择客户名称");
           return false;
@@ -806,10 +837,4 @@ export default {
   display: flex;
   justify-content: flex-end;
 }
-::v-deep .el-select {
-  width: 100%;
-}
-::v-deep .el-date-editor {
-  width: 100%;
-}
 </style>

+ 28 - 7
src/views/finance/charge/kaihe-index.vue

@@ -11,6 +11,7 @@
                 size="small"
                 placeholder="请选择"
                 clearable
+                style="width: 100%"
               >
                 <el-option
                   v-for="item in corpList"
@@ -30,6 +31,7 @@
                 placeholder="请选择日期"
                 format="yyyy-MM-dd"
                 value-format="yyyy-MM-dd"
+                style="width: 100%"
               />
             </el-form-item>
           </el-col>
@@ -39,6 +41,7 @@
                 v-model="form.fVslid"
                 size="small"
                 placeholder="请选择"
+                style="width: 100%"
               >
                 <el-option
                   v-for="item in TVesselfs"
@@ -55,6 +58,7 @@
                 v-model="form.fVoyid"
                 size="small"
                 placeholder="请选择"
+                style="width: 100%"
               >
                 <el-option
                   v-for="item in TVoyagefs"
@@ -92,6 +96,7 @@
                   v-model="form.fLoadportid"
                   size="small"
                   placeholder="请选择"
+                  style="width: 100%"
                 >
                   <el-option
                     v-for="item in portNames"
@@ -108,6 +113,7 @@
                   v-model="form.fDestportid"
                   size="small"
                   placeholder="请选择"
+                  style="width: 100%"
                 >
                   <el-option
                     v-for="item in portNames"
@@ -154,6 +160,7 @@
                   placeholder="请选择"
                   format="yyyy-MM-dd"
                   value-format="yyyy-MM-dd"
+                  style="width: 100%"
                 />
               </el-form-item>
             </el-col>
@@ -195,7 +202,12 @@
             :disabled="selectionList.length != 1"
             >修改</el-button
           >
-          <el-button type="warning" icon="el-icon-download" size="mini">
+          <el-button
+            type="warning"
+            icon="el-icon-download"
+            size="mini"
+            @click="handleExport"
+          >
             导出
           </el-button>
           <el-button
@@ -340,6 +352,7 @@ import {
   listCorps,
   remove,
   rowRemove,
+  getExcel,
 } from "@/api/finance/kaihe/charge";
 import kaiheDetail from "./kaihe-detail.vue";
 import columnSetting from "@/components/ColumnSetting/index";
@@ -391,6 +404,20 @@ export default {
     this.$refs.columnSetting.getRow(this.tableOption);
   },
   methods: {
+    /** 导出按钮操作 */
+    handleExport() {
+      this.$confirm("是否确认导出所有财务数据主数据项?", "警告", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+        .then(function () {
+          return getExcel();
+        })
+        .then((response) => {
+          this.download(response.msg);
+        });
+    },
     getRowdata(list) {
       this.tableOption = list;
     },
@@ -539,10 +566,4 @@ export default {
   display: flex;
   justify-content: flex-end;
 }
-::v-deep .el-select {
-  width: 100%;
-}
-::v-deep .el-date-editor {
-  width: 100%;
-}
 </style>

+ 21 - 8
src/views/finance/contrast/add-or-update.vue

@@ -12,7 +12,11 @@
           style="width: 100%"
           @selection-change="selectionChange"
         >
-          <el-table-column type="selection" width="50" />
+          <el-table-column
+            type="selection"
+            width="50"
+            :selectable="selectable"
+          />
           <el-table-column label="序号" type="index" width="50" />
           <el-table-column
             v-for="(item, index) in tableOption"
@@ -36,9 +40,7 @@
       </span>
       <span slot="footer" class="dialog-footer">
         <el-button @click="dialogVisible = false">取 消</el-button>
-        <el-button type="primary" @click="importDate"
-          >导 入</el-button
-        >
+        <el-button type="primary" @click="importDate">导 入</el-button>
       </span>
     </el-dialog>
   </div>
@@ -60,12 +62,21 @@ export default {
       },
       selectionList: [],
       tableData: [],
+      checkList: [],
     };
   },
   components: {},
   created() {},
   methods: {
-    init(data) {
+    selectable(row) {
+      if (this.checkList.some((e) => e.fSrcid == row.fSrcid)) {
+        return false;
+      } else {
+        return true;
+      }
+    },
+    init(data, list) {
+      this.checkList = list;
       this.dialogVisible = true;
       this.form = data;
       this.getList();
@@ -84,9 +95,11 @@ export default {
     selectionChange(rows) {
       this.selectionList = rows;
     },
-    importDate(){
-      this.dialogVisible=false,
-      this.$emit('imporData',this.selectionList)
+    importDate() {
+      if (this.selectionList.length == 0) {
+        return this.$message.error("请选择数据");
+      }
+      (this.dialogVisible = false), this.$emit("imporData", this.selectionList);
     },
     close() {
       this.form = this.$options.data().form;

+ 56 - 33
src/views/finance/contrast/kaihe-detail.vue

@@ -41,6 +41,7 @@
               :disabled="
                 form.fBillstatus >= 4 || readOnly == 0 || tableData.length > 0
               "
+              style="width: 100%"
             >
               <el-option
                 v-for="item in corpList"
@@ -61,6 +62,7 @@
               format="yyyy-MM-dd"
               value-format="yyyy-MM-dd"
               :disabled="form.fBillstatus >= 4 || readOnly == 0"
+              style="width: 100%"
             />
           </el-form-item>
         </el-col>
@@ -72,6 +74,7 @@
               placeholder="请选择"
               clearable
               :disabled="form.fBillstatus >= 4 || readOnly == 0"
+              style="width: 100%"
             >
               <el-option
                 v-for="item in TVesselfs"
@@ -90,6 +93,7 @@
               placeholder="请选择"
               clearable
               :disabled="form.fBillstatus >= 4 || readOnly == 0"
+              style="width: 100%"
             >
               <el-option
                 v-for="item in TVoyagefs"
@@ -101,16 +105,6 @@
           </el-form-item>
         </el-col>
         <el-col :span="6">
-          <el-form-item label="系统编号">
-            <el-input
-              v-model="form.srcBillNo"
-              size="small"
-              placeholder="请输入"
-              disabled
-            ></el-input>
-          </el-form-item>
-        </el-col>
-        <el-col :span="6">
           <el-form-item label="提单号">
             <el-input
               v-model="form.tMblno"
@@ -128,6 +122,7 @@
               placeholder="请选择"
               clearable
               :disabled="form.fBillstatus >= 4 || readOnly == 0"
+              style="width: 100%"
             >
               <el-option
                 v-for="item in portNames"
@@ -146,6 +141,7 @@
               placeholder="请选择"
               clearable
               :disabled="form.fBillstatus >= 4 || readOnly == 0"
+              style="width: 100%"
             >
               <el-option
                 v-for="item in portNames"
@@ -163,6 +159,7 @@
               size="small"
               clearable
               :disabled="form.fBillstatus >= 4 || readOnly == 0"
+              style="width: 100%"
             >
               <el-option label="是" value="1" />
               <el-option label="否" value="0" />
@@ -176,6 +173,7 @@
               size="small"
               clearable
               :disabled="form.fBillstatus >= 4 || readOnly == 0"
+              style="width: 100%"
             >
               <el-option label="应收" value="D" />
               <el-option label="应付" value="C" />
@@ -183,6 +181,26 @@
           </el-form-item>
         </el-col>
         <el-col :span="6">
+          <el-form-item label="系统编号">
+            <el-input
+              v-model="form.srcBillNo"
+              size="small"
+              placeholder="请输入"
+              disabled
+            ></el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :span="6">
+          <el-form-item label="备注">
+            <el-input
+              v-model="form.fRemarks"
+              size="small"
+              placeholder="请输入"
+              :disabled="form.fBillstatus >= 4 || readOnly == 0"
+            ></el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :span="6">
           <el-form-item label="制单人">
             <el-input
               v-model="form.createBy"
@@ -201,19 +219,10 @@
               format="yyyy-MM-dd"
               value-format="yyyy-MM-dd 00:00:00"
               disabled
+              style="width: 100%"
             />
           </el-form-item>
         </el-col>
-        <el-col :span="6">
-          <el-form-item label="备注">
-            <el-input
-              v-model="form.fRemarks"
-              size="small"
-              placeholder="请输入"
-              :disabled="form.fBillstatus >= 4 || readOnly == 0"
-            ></el-input>
-          </el-form-item>
-        </el-col>
       </el-row>
     </el-form>
     <div class="head-but">
@@ -261,7 +270,14 @@
         >
           保存
         </el-button>
-        <el-button type="warning" size="mini"> 导出 </el-button>
+        <el-button
+          type="warning"
+          size="mini"
+          :disabled="!form.fId"
+          @click="handleExport"
+        >
+          导出
+        </el-button>
         <el-button
           type="cyan"
           icon="el-icon-search"
@@ -418,6 +434,7 @@ import {
   getdetail,
   infoRemove,
   revoke,
+  getExcelInfo,
 } from "@/api/finance/kaihe/contrast";
 import ApprovalComments from "@/views/startApproval";
 import addOrUpdate from "./add-or-update.vue";
@@ -458,6 +475,21 @@ export default {
   },
   created() {},
   methods: {
+    /** 导出按钮操作 */
+    handleExport() {
+      let _this = this;
+      this.$confirm("是否确认导出明细数据?", "警告", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+        .then(function () {
+          return getExcelInfo(_this.form.fId);
+        })
+        .then((response) => {
+          this.download(response.msg);
+        });
+    },
     getRowdata(list) {
       this.tableOption = list;
     },
@@ -485,9 +517,9 @@ export default {
       listCorps().then((res) => {
         this.corpList = res;
       });
-      setTimeout(e=>{
+      setTimeout((e) => {
         this.$refs.columnSetting.getRow(this.tableOption);
-      },100)
+      }, 100);
     },
     fAmtChange(row) {
       if (Number(row.fAmt) > Number(row.fAmtdr)) {
@@ -665,7 +697,7 @@ export default {
       };
       this.$refs["form"].validate((valid) => {
         if (valid) {
-          this.$refs.addOrUpdate.init(data);
+          this.$refs.addOrUpdate.init(data, this.tableData);
         } else {
           this.$message.error("请选择客户名称");
           return false;
@@ -725,9 +757,6 @@ export default {
           this.form.fCtrlcorpid = e.fName;
         }
       });
-      if (this.tableData.length == 0) {
-        return this.$message.error("明细表不能为空");
-      }
       if (this.form.date) {
         this.form.fFromDate = this.form.date[0];
         this.form.fToDate = this.form.date[1];
@@ -790,10 +819,4 @@ export default {
   display: flex;
   justify-content: flex-end;
 }
-::v-deep .el-select {
-  width: 100%;
-}
-::v-deep .el-date-editor {
-  width: 100%;
-}
 </style>

+ 28 - 7
src/views/finance/contrast/kaihe-index.vue

@@ -11,6 +11,7 @@
                 size="small"
                 placeholder="请选择"
                 clearable
+                style="width: 100%"
               >
                 <el-option
                   v-for="item in corpList"
@@ -30,6 +31,7 @@
                 placeholder="请选择日期"
                 format="yyyy-MM-dd"
                 value-format="yyyy-MM-dd"
+                style="width: 100%"
               />
             </el-form-item>
           </el-col>
@@ -39,6 +41,7 @@
                 v-model="form.fVslid"
                 size="small"
                 placeholder="请选择"
+                style="width: 100%"
               >
                 <el-option
                   v-for="item in TVesselfs"
@@ -55,6 +58,7 @@
                 v-model="form.fVoyid"
                 size="small"
                 placeholder="请选择"
+                style="width: 100%"
               >
                 <el-option
                   v-for="item in TVoyagefs"
@@ -92,6 +96,7 @@
                   v-model="form.fLoadportid"
                   size="small"
                   placeholder="请选择"
+                  style="width: 100%"
                 >
                   <el-option
                     v-for="item in portNames"
@@ -108,6 +113,7 @@
                   v-model="form.fDestportid"
                   size="small"
                   placeholder="请选择"
+                  style="width: 100%"
                 >
                   <el-option
                     v-for="item in portNames"
@@ -127,6 +133,7 @@
                   placeholder="请选择"
                   format="yyyy-MM-dd"
                   value-format="yyyy-MM-dd"
+                  style="width: 100%"
                 />
               </el-form-item>
             </el-col>
@@ -168,7 +175,12 @@
             :disabled="selectionList.length != 1"
             >修改</el-button
           >
-          <el-button type="warning" icon="el-icon-download" size="mini">
+          <el-button
+            type="warning"
+            icon="el-icon-download"
+            size="mini"
+            @click="handleExport"
+          >
             导出
           </el-button>
           <el-button
@@ -313,6 +325,7 @@ import {
   listCorps,
   remove,
   rowRemove,
+  getExcel,
 } from "@/api/finance/kaihe/contrast";
 import kaiheDetail from "./kaihe-detail.vue";
 import columnSetting from "@/components/ColumnSetting/index";
@@ -364,6 +377,20 @@ export default {
     this.$refs.columnSetting.getRow(this.tableOption);
   },
   methods: {
+    /** 导出按钮操作 */
+    handleExport() {
+      this.$confirm("是否确认导出所有财务数据主数据项?", "警告", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+        .then(function () {
+          return getExcel();
+        })
+        .then((response) => {
+          this.download(response.msg);
+        });
+    },
     getRowdata(list) {
       this.tableOption = list;
     },
@@ -512,10 +539,4 @@ export default {
   display: flex;
   justify-content: flex-end;
 }
-::v-deep .el-select {
-  width: 100%;
-}
-::v-deep .el-date-editor {
-  width: 100%;
-}
 </style>

+ 21 - 8
src/views/finance/payment/add-or-update.vue

@@ -12,7 +12,11 @@
           style="width: 100%"
           @selection-change="selectionChange"
         >
-          <el-table-column type="selection" width="50" />
+          <el-table-column
+            type="selection"
+            width="50"
+            :selectable="selectable"
+          />
           <el-table-column label="序号" type="index" width="50" />
           <el-table-column
             v-for="(item, index) in tableOption"
@@ -36,9 +40,7 @@
       </span>
       <span slot="footer" class="dialog-footer">
         <el-button @click="dialogVisible = false">取 消</el-button>
-        <el-button type="primary" @click="importDate"
-          >导 入</el-button
-        >
+        <el-button type="primary" @click="importDate">导 入</el-button>
       </span>
     </el-dialog>
   </div>
@@ -60,12 +62,21 @@ export default {
       },
       selectionList: [],
       tableData: [],
+      checkList: [],
     };
   },
   components: {},
   created() {},
   methods: {
-    init(data) {
+    selectable(row) {
+      if (this.checkList.some((e) => e.fSrcid == row.fSrcid)) {
+        return false;
+      } else {
+        return true;
+      }
+    },
+    init(data, list) {
+      this.checkList = list;
       this.dialogVisible = true;
       this.form = data;
       this.getList();
@@ -84,9 +95,11 @@ export default {
     selectionChange(rows) {
       this.selectionList = rows;
     },
-    importDate(){
-      this.dialogVisible=false,
-      this.$emit('imporData',this.selectionList)
+    importDate() {
+      if (this.selectionList.length == 0) {
+        return this.$message.error("请选择数据");
+      }
+      (this.dialogVisible = false), this.$emit("imporData", this.selectionList);
     },
     close() {
       this.form = this.$options.data().form;

+ 53 - 28
src/views/finance/payment/kaihe-detail.vue

@@ -41,6 +41,7 @@
               :disabled="
                 form.fBillstatus >= 4 || readOnly == 0 || tableData.length > 0
               "
+              style="width: 100%"
             >
               <el-option
                 v-for="item in corpList"
@@ -61,6 +62,7 @@
               format="yyyy-MM-dd"
               value-format="yyyy-MM-dd"
               :disabled="form.fBillstatus >= 4 || readOnly == 0"
+              style="width: 100%"
             />
           </el-form-item>
         </el-col>
@@ -72,6 +74,7 @@
               placeholder="请选择"
               clearable
               :disabled="form.fBillstatus >= 4 || readOnly == 0"
+              style="width: 100%"
             >
               <el-option
                 v-for="item in TVesselfs"
@@ -90,6 +93,7 @@
               placeholder="请选择"
               clearable
               :disabled="form.fBillstatus >= 4 || readOnly == 0"
+              style="width: 100%"
             >
               <el-option
                 v-for="item in TVoyagefs"
@@ -101,16 +105,6 @@
           </el-form-item>
         </el-col>
         <el-col :span="6">
-          <el-form-item label="系统编号">
-            <el-input
-              v-model="form.srcBillNo"
-              size="small"
-              placeholder="请输入"
-              disabled
-            ></el-input>
-          </el-form-item>
-        </el-col>
-        <el-col :span="6">
           <el-form-item label="提单号">
             <el-input
               v-model="form.tMblno"
@@ -128,6 +122,7 @@
               placeholder="请选择"
               clearable
               :disabled="form.fBillstatus >= 4 || readOnly == 0"
+              style="width: 100%"
             >
               <el-option
                 v-for="item in portNames"
@@ -146,6 +141,7 @@
               placeholder="请选择"
               clearable
               :disabled="form.fBillstatus >= 4 || readOnly == 0"
+              style="width: 100%"
             >
               <el-option
                 v-for="item in portNames"
@@ -187,12 +183,33 @@
           </el-form-item>
         </el-col>
         <el-col :span="6">
+          <el-form-item label="备注">
+            <el-input
+              v-model="form.fRemarks"
+              size="small"
+              placeholder="请输入"
+              :disabled="form.fBillstatus >= 4 || readOnly == 0"
+            ></el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :span="6">
+          <el-form-item label="系统编号">
+            <el-input
+              v-model="form.srcBillNo"
+              size="small"
+              placeholder="请输入"
+              disabled
+            ></el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :span="6">
           <el-form-item label="应收应付" prop="fDc">
             <el-select
               v-model="form.fDc"
               size="small"
               clearable
               disabled
+              style="width: 100%"
             >
               <el-option label="应收" value="D" />
               <el-option label="应付" value="C" />
@@ -218,19 +235,10 @@
               format="yyyy-MM-dd"
               value-format="yyyy-MM-dd 00:00:00"
               disabled
+              style="width: 100%"
             />
           </el-form-item>
         </el-col>
-        <el-col :span="6">
-          <el-form-item label="备注">
-            <el-input
-              v-model="form.fRemarks"
-              size="small"
-              placeholder="请输入"
-              :disabled="form.fBillstatus >= 4 || readOnly == 0"
-            ></el-input>
-          </el-form-item>
-        </el-col>
       </el-row>
     </el-form>
     <div class="head-but">
@@ -278,7 +286,14 @@
         >
           保存
         </el-button>
-        <el-button type="warning" size="mini"> 导出 </el-button>
+        <el-button
+          type="warning"
+          size="mini"
+          :disabled="!form.fId"
+          @click="handleExport"
+        >
+          导出
+        </el-button>
         <el-button
           type="cyan"
           icon="el-icon-search"
@@ -435,6 +450,7 @@ import {
   getdetail,
   infoRemove,
   revoke,
+  getExcelInfo,
 } from "@/api/finance/kaihe/payment";
 import ApprovalComments from "@/views/startApproval";
 import addOrUpdate from "./add-or-update.vue";
@@ -474,6 +490,21 @@ export default {
   },
   created() {},
   methods: {
+    /** 导出按钮操作 */
+    handleExport() {
+      let _this = this;
+      this.$confirm("是否确认导出明细数据?", "警告", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+        .then(function () {
+          return getExcelInfo(_this.form.fId);
+        })
+        .then((response) => {
+          this.download(response.msg);
+        });
+    },
     getRowdata(list) {
       this.tableOption = list;
     },
@@ -681,7 +712,7 @@ export default {
       };
       this.$refs["form"].validate((valid) => {
         if (valid) {
-          this.$refs.addOrUpdate.init(data);
+          this.$refs.addOrUpdate.init(data, this.tableData);
         } else {
           this.$message.error("请选择客户名称");
           return false;
@@ -806,10 +837,4 @@ export default {
   display: flex;
   justify-content: flex-end;
 }
-::v-deep .el-select {
-  width: 100%;
-}
-::v-deep .el-date-editor {
-  width: 100%;
-}
 </style>

+ 28 - 7
src/views/finance/payment/kaihe-index.vue

@@ -11,6 +11,7 @@
                 size="small"
                 placeholder="请选择"
                 clearable
+                style="width: 100%"
               >
                 <el-option
                   v-for="item in corpList"
@@ -30,6 +31,7 @@
                 placeholder="请选择日期"
                 format="yyyy-MM-dd"
                 value-format="yyyy-MM-dd"
+                style="width: 100%"
               />
             </el-form-item>
           </el-col>
@@ -39,6 +41,7 @@
                 v-model="form.fVslid"
                 size="small"
                 placeholder="请选择"
+                style="width: 100%"
               >
                 <el-option
                   v-for="item in TVesselfs"
@@ -55,6 +58,7 @@
                 v-model="form.fVoyid"
                 size="small"
                 placeholder="请选择"
+                style="width: 100%"
               >
                 <el-option
                   v-for="item in TVoyagefs"
@@ -92,6 +96,7 @@
                   v-model="form.fLoadportid"
                   size="small"
                   placeholder="请选择"
+                  style="width: 100%"
                 >
                   <el-option
                     v-for="item in portNames"
@@ -108,6 +113,7 @@
                   v-model="form.fDestportid"
                   size="small"
                   placeholder="请选择"
+                  style="width: 100%"
                 >
                   <el-option
                     v-for="item in portNames"
@@ -154,6 +160,7 @@
                   placeholder="请选择"
                   format="yyyy-MM-dd"
                   value-format="yyyy-MM-dd"
+                  style="width: 100%"
                 />
               </el-form-item>
             </el-col>
@@ -195,7 +202,12 @@
             :disabled="selectionList.length != 1"
             >修改</el-button
           >
-          <el-button type="warning" icon="el-icon-download" size="mini">
+          <el-button
+            type="warning"
+            icon="el-icon-download"
+            size="mini"
+            @click="handleExport"
+          >
             导出
           </el-button>
           <el-button
@@ -340,6 +352,7 @@ import {
   listCorps,
   remove,
   rowRemove,
+  getExcel,
 } from "@/api/finance/kaihe/payment";
 import kaiheDetail from "./kaihe-detail.vue";
 import columnSetting from "@/components/ColumnSetting/index";
@@ -391,6 +404,20 @@ export default {
     this.$refs.columnSetting.getRow(this.tableOption);
   },
   methods: {
+    /** 导出按钮操作 */
+    handleExport() {
+      this.$confirm("是否确认导出所有财务数据主数据项?", "警告", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+        .then(function () {
+          return getExcel();
+        })
+        .then((response) => {
+          this.download(response.msg);
+        });
+    },
     getRowdata(list) {
       this.tableOption = list;
     },
@@ -539,10 +566,4 @@ export default {
   display: flex;
   justify-content: flex-end;
 }
-::v-deep .el-select {
-  width: 100%;
-}
-::v-deep .el-date-editor {
-  width: 100%;
-}
 </style>