Browse Source

财务模块新增页面修改

wengyuwen 4 years ago
parent
commit
d0b8574aac

+ 371 - 346
src/views/finance/charge/index.vue

@@ -1,145 +1,145 @@
 <template>
   <div class="app-container">
-    <el-form
-      :model="tableFilter"
-      ref="queryForm"
-      :inline="true"
-      v-show="showSearch"
-      label-width="68px"
-    >
-      <el-form-item label="系统编号" prop="fCtrlcorpid">
-        <el-input
-          v-model="tableFilter.fBillno"
-          placeholder="请输入系统编号"
-          clearable
-          size="small"
-          style="width: 200px"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="货权方" prop="fCtrlcorpid">
-        <el-input
-          v-model="tableFilter.fCtrlcorpid"
-          placeholder="请输入货权方"
-          clearable
-          size="small"
-          style="width: 200px"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="结算单位" prop="fCorpid">
-        <el-select
-          v-model="tableFilter.fCorpid"
-          filterable
-          remote
-          clearable
-          size="small"
-          style="width: 200px"
-          @keyup.enter.native="handleQuery"
-          :remote-method="corpsRemoteMethod"
-          placeholder="请输入结算单位"
-        >
-          <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="timeInterval">
-        <el-date-picker
-          type="daterange"
-          size="small"
-          style="width: 240px"
-          v-model="tableFilter.timeInterval"
-          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"
+    <div v-show="mainTable == false">
+      <el-form
+        :model="tableFilter"
+        ref="queryForm"
+        :inline="true"
+        v-show="showSearch"
+        label-width="68px"
+      >
+        <el-form-item label="系统编号" prop="fCtrlcorpid">
+          <el-input
+            v-model="tableFilter.fBillno"
+            placeholder="请输入系统编号"
+            clearable
+            size="small"
+            style="width: 200px"
+            @keyup.enter.native="handleQuery"
+          />
+        </el-form-item>
+        <el-form-item label="货权方" prop="fCtrlcorpid">
+          <el-input
+            v-model="tableFilter.fCtrlcorpid"
+            placeholder="请输入货权方"
+            clearable
+            size="small"
+            style="width: 200px"
+            @keyup.enter.native="handleQuery"
+          />
+        </el-form-item>
+        <el-form-item label="结算单位" prop="fCorpid">
+          <el-select
+            v-model="tableFilter.fCorpid"
+            filterable
+            remote
+            clearable
+            size="small"
+            style="width: 200px"
+            @keyup.enter.native="handleQuery"
+            :remote-method="corpsRemoteMethod"
+            placeholder="请输入结算单位"
+          >
+            <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="timeInterval">
+          <el-date-picker
+            type="daterange"
+            size="small"
+            style="width: 240px"
+            v-model="tableFilter.timeInterval"
+            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 icon="el-icon-refresh" size="mini" @click="resetQuery"
           >重置</el-button
-        >
-      </el-form-item>
-    </el-form>
-
-    <el-row :gutter="10" class="mb8">
-      <el-col :span="1.5">
-        <el-button
-          type="primary"
-          icon="el-icon-plus"
-          size="mini"
-          @click="handleAdd"
-          v-hasPermi="['finance:charge:add']"
+          >
+        </el-form-item>
+      </el-form>
+      <el-row :gutter="10" class="mb8">
+        <el-col :span="1.5">
+          <el-button
+            type="primary"
+            icon="el-icon-plus"
+            size="mini"
+            @click="handleAdd"
+            v-hasPermi="['finance:charge:add']"
           >新增
-        </el-button>
-      </el-col>
-      <el-col :span="1.5">
-        <el-button
-          type="success"
-          icon="el-icon-edit"
-          size="mini"
-          :disabled="single"
-          @click="handleUpdate"
-          v-hasPermi="['finance:charge:edit']"
+          </el-button>
+        </el-col>
+        <el-col :span="1.5">
+          <el-button
+            type="success"
+            icon="el-icon-edit"
+            size="mini"
+            :disabled="single"
+            @click="handleUpdate"
+            v-hasPermi="['finance:charge:edit']"
           >修改
-        </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="['finance:charge:remove']"-->
-      <!--        >删除-->
-      <!--        </el-button>-->
-      <!--      </el-col>-->
-      <el-col :span="1.5">
-        <el-button
-          type="warning"
-          icon="el-icon-download"
-          size="mini"
-          @click="handleExport"
-          v-hasPermi="['finance:charge:export']"
-          >导出
-        </el-button>
-      </el-col>
-      <div class="tabSetting">
-        <right-toolbar
-          :showSearch.sync="showSearch"
-          @queryTable="getList"
-        ></right-toolbar>
-        <div style="margin: 0 12px">
+          </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="['finance:charge:remove']"-->
+        <!--        >删除-->
+        <!--        </el-button>-->
+        <!--      </el-col>-->
+        <el-col :span="1.5">
           <el-button
-            icon="el-icon-setting"
+            type="warning"
+            icon="el-icon-download"
             size="mini"
-            circle
-            @click="showSetting = !showSetting"
-          ></el-button>
+            @click="handleExport"
+            v-hasPermi="['finance:charge:export']"
+          >导出
+          </el-button>
+        </el-col>
+        <div class="tabSetting">
+          <right-toolbar
+            :showSearch.sync="showSearch"
+            @queryTable="getList"
+          ></right-toolbar>
+          <div style="margin: 0 12px">
+            <el-button
+              icon="el-icon-setting"
+              size="mini"
+              circle
+              @click="showSetting = !showSetting"
+            ></el-button>
+          </div>
         </div>
-      </div>
-    </el-row>
-    <el-dialog
-      title="自定义列显示"
-      :visible.sync="showSetting"
-      width="700px"
-      v-dialogDrag
-    >
-      <template slot="title">
-        <div class="avue-crud__dialog__header">
+      </el-row>
+      <el-dialog
+        title="自定义列显示"
+        :visible.sync="showSetting"
+        width="700px"
+        v-dialogDrag
+      >
+        <template slot="title">
+          <div class="avue-crud__dialog__header">
           <span class="el-dialog__title">
             <span
               style="
@@ -152,210 +152,167 @@
               "
             ></span>
           </span>
+          </div>
+        </template>
+        <div>配置排序列数据(拖动调整顺序)</div>
+        <div style="margin-left: 17px">
+          <el-checkbox
+            v-model="allCheck"
+            label="全选"
+            @change="allChecked"
+          ></el-checkbox>
         </div>
-      </template>
-      <div>配置排序列数据(拖动调整顺序)</div>
-      <div style="margin-left: 17px">
-        <el-checkbox
-          v-model="allCheck"
-          label="全选"
-          @change="allChecked"
-        ></el-checkbox>
-      </div>
-      <div style="padding: 4px; display: flex; justify-content: center">
-        <draggable
-          v-model="setRowList"
-          group="site"
-          animation="300"
-          @start="onStart"
-          @end="onEnd"
-          handle=".indraggable"
-        >
-          <transition-group>
-            <div
-              v-for="item in setRowList"
-              :key="item.surface"
-              class="listStyle"
-            >
-              <div style="width: 500px" class="indraggable">
-                <div class="progress" :style="{ width: item.width + 'px' }">
-                  <el-checkbox
-                    :label="item.name"
-                    v-model="item.checked"
-                    :true-label="0"
-                    :false-label="1"
+        <div style="padding: 4px; display: flex; justify-content: center">
+          <draggable
+            v-model="setRowList"
+            group="site"
+            animation="300"
+            @start="onStart"
+            @end="onEnd"
+            handle=".indraggable"
+          >
+            <transition-group>
+              <div
+                v-for="item in setRowList"
+                :key="item.surface"
+                class="listStyle"
+              >
+                <div style="width: 500px" class="indraggable">
+                  <div class="progress" :style="{ width: item.width + 'px' }">
+                    <el-checkbox
+                      :label="item.name"
+                      v-model="item.checked"
+                      :true-label="0"
+                      :false-label="1"
                     >{{ item.name }}
-                  </el-checkbox>
+                    </el-checkbox>
+                  </div>
                 </div>
+                <el-input-number
+                  v-model.number="item.width"
+                  controls-position="right"
+                  :min="1"
+                  :max="500"
+                  size="mini"
+                ></el-input-number>
               </div>
-              <el-input-number
-                v-model.number="item.width"
-                controls-position="right"
-                :min="1"
-                :max="500"
-                size="mini"
-              ></el-input-number>
-            </div>
-          </transition-group>
-        </draggable>
-      </div>
-      <span slot="footer" class="dialog-footer">
+            </transition-group>
+          </draggable>
+        </div>
+        <span slot="footer" class="dialog-footer">
         <el-button @click="showSetting = false">取 消</el-button>
         <el-button @click="delRow" type="danger">重 置</el-button>
         <el-button type="primary" @click="save()">确 定</el-button>
       </span>
-    </el-dialog>
-
-    <el-table
-      v-loading="loading"
-      :data="chargeList"
-      @selection-change="handleSelectionChange"
-      show-summary
-      :summary-method="listTotal"
-    >
-      <el-table-column type="selection" width="100" align="center" />
-      <el-table-column
-        label="序号"
-        type="index"
-        width="55"
-        align="center"
-        fixed
-      />
-      <el-table-column
-        v-for="(item, index) in getRowList"
-        :key="index"
-        :label="item.name"
-        :width="item.width"
-        :prop="item.label"
-        align="center"
-        :show-overflow-tooltip="true"
-        sortable
-        :fixed="item.fixed"
-      />
-      <el-table-column
-        label="操作"
-        align="center"
-        class-name="small-padding fixed-width"
-        min-width="180"
-        fixed="right"
+      </el-dialog>
+      <el-table
+        v-loading="loading"
+        :data="chargeList"
+        @selection-change="handleSelectionChange"
+        show-summary
+        :summary-method="listTotal"
       >
-        <template slot-scope="scope">
-          <el-button
-            size="mini"
-            type="text"
-            icon="el-icon-view"
-            @click="check(scope.row, 0)"
-            v-hasPermi="['finance:contrast:edit']"
+        <el-table-column type="selection" width="100" align="center" />
+        <el-table-column
+          label="序号"
+          type="index"
+          width="55"
+          align="center"
+          fixed
+        />
+        <el-table-column
+          v-for="(item, index) in getRowList"
+          :key="index"
+          :label="item.name"
+          :width="item.width"
+          :prop="item.label"
+          align="center"
+          :show-overflow-tooltip="true"
+          sortable
+          :fixed="item.fixed"
+        />
+        <el-table-column
+          label="操作"
+          align="center"
+          class-name="small-padding fixed-width"
+          min-width="180"
+          fixed="right"
+        >
+          <template slot-scope="scope">
+            <el-button
+              size="mini"
+              type="text"
+              icon="el-icon-view"
+              @click="check(scope.row, 0)"
+              v-hasPermi="['finance:contrast:edit']"
             >查看</el-button
-          >
-          <el-button
-            size="mini"
-            type="text"
-            icon="el-icon-view"
-            @click="check(scope.row, 1)"
-            v-hasPermi="['finance:contrast:edit']"
-            v-if="
+            >
+            <el-button
+              size="mini"
+              type="text"
+              icon="el-icon-view"
+              @click="check(scope.row, 1)"
+              v-hasPermi="['finance:contrast:edit']"
+              v-if="
               scope.row.fBillstatus == '提交审核' ||
               scope.row.fBillstatus == '审核中'
             "
             >审批进度</el-button
-          >
-          <el-button
-            size="mini"
-            type="text"
-            icon="el-icon-edit"
-            @click="handleUpdate(scope.row)"
-            v-hasPermi="['finance:charge:edit']"
-            v-if="
+            >
+            <el-button
+              size="mini"
+              type="text"
+              icon="el-icon-edit"
+              @click="handleUpdate(scope.row)"
+              v-hasPermi="['finance:charge:edit']"
+              v-if="
               scope.row.fBillstatus == '保存' ||
               scope.row.fBillstatus == '暂存' ||
               scope.row.fBillstatus == '审批驳回'
             "
             >修改
-          </el-button>
-          <el-button
-            size="mini"
-            type="text"
-            icon="el-icon-delete"
-            @click="handleDelete(scope.row)"
-            v-hasPermi="['finance:charge:remove']"
-            v-if="
+            </el-button>
+            <el-button
+              size="mini"
+              type="text"
+              icon="el-icon-delete"
+              @click="handleDelete(scope.row)"
+              v-hasPermi="['finance:charge:remove']"
+              v-if="
               scope.row.fBillstatus == '保存' ||
               scope.row.fBillstatus == '暂存' ||
               scope.row.fBillstatus == '审批驳回'
             "
             >删除
-          </el-button>
-          <!--            <el-button-->
-          <!--              size="mini"-->
-          <!--              type="text"-->
-          <!--              icon="el-icon-delete"-->
-          <!--              v-if="scope.row.fBillstatus === 6"-->
-          <!--            >查看-->
-          <!--            </el-button>-->
-          <!--            <el-button-->
-          <!--              size="mini"-->
-          <!--              type="text"-->
-          <!--              icon="el-icon-delete"-->
-          <!--              v-if="scope.row.fBillstatus > 3 && scope.row.fBillstatus < 6"-->
-          <!--            >查看审批流-->
-          <!--            </el-button>-->
-        </template>
-      </el-table-column>
-      <!--      <el-table-column label="单据类型" align="center" prop="fBilltype"/>-->
-      <!--      <el-table-column label="制单部门" align="center" prop="fDeptid"/>-->
-    </el-table>
-
-    <pagination
-      v-show="total > 0"
-      :total="total"
-      :page.sync="queryParams.pageNum"
-      :limit.sync="queryParams.pageSize"
-      @pagination="getList"
-    />
-
-    <!-- 添加或修改财务数据主对话框 -->
-    <el-dialog
-      v-dialogDrag
-      :fullscreen="dialogFull"
-      :close-on-click-modal="false"
-      :title="title"
-      :show-close="Xbutton"
-      :visible.sync="open"
-      width="70%"
-      append-to-body
-    >
-      <template slot="title">
-        <div class="avue-crud__dialog__header">
-          <span class="el-dialog__title">
-            <span
-              style="
-                display: inline-block;
-                width: 3px;
-                height: 20px;
-                margin-right: 5px;
-                float: left;
-                margin-top: 2px;
-              "
-            ></span>
-            添加财务数据主
-          </span>
-          <div class="avue-crud__dialog__menu enlarge" @click="full">
-            <i
-              style="
-                cursor: pointer;
-                display: block;
-                width: 12px;
-                height: 12px;
-                border: 1px solid #909399;
-                border-top: 3px solid #909399;
-                margin-top: -3px;
-              "
-            ></i>
-          </div>
-        </div>
-      </template>
-
+            </el-button>
+            <!--            <el-button-->
+            <!--              size="mini"-->
+            <!--              type="text"-->
+            <!--              icon="el-icon-delete"-->
+            <!--              v-if="scope.row.fBillstatus === 6"-->
+            <!--            >查看-->
+            <!--            </el-button>-->
+            <!--            <el-button-->
+            <!--              size="mini"-->
+            <!--              type="text"-->
+            <!--              icon="el-icon-delete"-->
+            <!--              v-if="scope.row.fBillstatus > 3 && scope.row.fBillstatus < 6"-->
+            <!--            >查看审批流-->
+            <!--            </el-button>-->
+          </template>
+        </el-table-column>
+        <!--      <el-table-column label="单据类型" align="center" prop="fBilltype"/>-->
+        <!--      <el-table-column label="制单部门" align="center" prop="fDeptid"/>-->
+      </el-table>
+      <pagination
+        v-show="total > 0"
+        :total="total"
+        :page.sync="queryParams.pageNum"
+        :limit.sync="queryParams.pageSize"
+        @pagination="getList"
+      />
+    </div>
+    <div v-show="mainTable == true">
       <el-form
         :model="queryParams"
         :rules="ruless"
@@ -505,7 +462,7 @@
             @click="charGe"
             :disabled="notChange"
             v-if="queryParams.fBillstatus < '4'"
-            >检索</el-button
+          >检索</el-button
           >
           <el-button
             type="primary"
@@ -513,17 +470,17 @@
             @click="confirmCharge"
             :disabled="notChange"
             v-if="queryParams.fBillstatus < '4'"
-            >确认收费</el-button
+          >确认收费</el-button
           >
           <el-button type="warning" size="small" @click="handleExportItems"
-            >导出</el-button
+          >导出</el-button
           >
           <el-button
             type="success"
             size="small"
             @click="revokeCharge"
             v-if="queryParams.fBillstatus === '6'"
-            >撤销收费</el-button
+          >撤销收费</el-button
           >
           <!--        <el-button type="info" size="small" @click="printing">打印</el-button>-->
           <!--        <el-button type="danger" size="small" :disabled="notChange" v-show="Lander == Operator">
@@ -534,7 +491,7 @@
             :disabled="tablefilter"
             @click="approvalRevocation"
             v-show="queryParams.fBillstatus === '4'"
-            >撤销审批</el-button
+          >撤销审批</el-button
           >
         </div>
         <div style="margin: 0 12px">
@@ -599,7 +556,7 @@
                       v-model="item.checked"
                       :true-label="0"
                       :false-label="1"
-                      >{{ item.name }}
+                    >{{ item.name }}
                     </el-checkbox>
                   </div>
                 </div>
@@ -677,7 +634,7 @@
               icon="el-icon-delete"
               @click.native.prevent="deleteRow(scope.$index, increase_s)"
               :disabled="notChange"
-              >删除
+            >删除
             </el-button>
           </template>
         </el-table-column>
@@ -694,22 +651,22 @@
           @refreshDataList="returnData"
         ></approval-comments>
         <el-button v-if="approve === true" @click="immediateApproval"
-          >审批</el-button
+        >审批</el-button
         >
         <el-button
           type="primary"
           v-if="queryParams.fBillstatus >= '3'"
           @click="addOrUpdateHandle"
-          >查看审批流</el-button
+        >查看审批流</el-button
         >
         <el-button type="primary" @click="submitForm" :disabled="notChange"
-          >保 存</el-button
+        >保 存</el-button
         >
         <el-button v-if="cancelButton === true" @click="cancel"
-          >取 消</el-button
+        >取 消</el-button
         >
         <el-button v-if="cancelButton === false" @click="homePage"
-          >取 消</el-button
+        >取 消</el-button
         >
       </div>
       <el-dialog
@@ -885,10 +842,10 @@
               icon="el-icon-search"
               size="mini"
               @click="importSearch"
-              >搜索</el-button
+            >搜索</el-button
             >
             <el-button icon="el-icon-refresh" size="mini" @click="resetQuery_s"
-              >重置</el-button
+            >重置</el-button
             >
           </el-form-item>
         </el-form>
@@ -964,7 +921,52 @@
           <el-button @click="signOut">取 消</el-button>
         </div>
       </el-dialog>
-    </el-dialog>
+    </div>
+
+
+    <!-- 添加或修改财务数据主对话框 -->
+<!--    <el-dialog-->
+<!--      v-dialogDrag-->
+<!--      :fullscreen="dialogFull"-->
+<!--      :close-on-click-modal="false"-->
+<!--      :title="title"-->
+<!--      :show-close="Xbutton"-->
+<!--      :visible.sync="open"-->
+<!--      width="70%"-->
+<!--      append-to-body-->
+<!--    >-->
+<!--      <template slot="title">-->
+<!--        <div class="avue-crud__dialog__header">-->
+<!--          <span class="el-dialog__title">-->
+<!--            <span-->
+<!--              style="-->
+<!--                display: inline-block;-->
+<!--                width: 3px;-->
+<!--                height: 20px;-->
+<!--                margin-right: 5px;-->
+<!--                float: left;-->
+<!--                margin-top: 2px;-->
+<!--              "-->
+<!--            ></span>-->
+<!--            添加财务数据主-->
+<!--          </span>-->
+<!--          <div class="avue-crud__dialog__menu enlarge" @click="full">-->
+<!--            <i-->
+<!--              style="-->
+<!--                cursor: pointer;-->
+<!--                display: block;-->
+<!--                width: 12px;-->
+<!--                height: 12px;-->
+<!--                border: 1px solid #909399;-->
+<!--                border-top: 3px solid #909399;-->
+<!--                margin-top: -3px;-->
+<!--              "-->
+<!--            ></i>-->
+<!--          </div>-->
+<!--        </div>-->
+<!--      </template>-->
+
+<!--    </el-dialog>-->
 
     <!--  打印页面-->
     <el-dialog
@@ -1092,6 +1094,7 @@ import Global from "@/layout/components/global";
 import Vue from "vue";
 import Cookies from "js-cookie";
 import { addSet, select,resetModule } from "@/api/system/set";
+import { MessageBox } from 'element-ui'
 Vue.directive("dialogDrag", {
   bind(el, binding, vnode, oldVnode) {
     const dialogHeaderEl = el.querySelector(".el-dialog__header");
@@ -1153,6 +1156,7 @@ export default {
   name: "Charge",
   data() {
     return {
+      mainTable:false,
       //全屏放大
       dialogFull: false,
       drag: false,
@@ -1507,7 +1511,15 @@ export default {
     this.getRow2();
   },
   activated() {
-    this.adoPt();
+    if(this.$route.query.data){
+      let data = JSON.parse(this.$route.query.data)
+      if(data.key === 1){
+        this.handleAdd()
+      }else{
+        this.adoPt();
+      }
+    }
+
   },
   methods: {
     //导出明细
@@ -1548,7 +1560,7 @@ export default {
     getRow() {
       let that = this;
       this.data = {
-        tableName: "收费",
+        tableName: "-收费",
         userId: Cookies.get("userName"),
       };
       select(this.data).then((res) => {
@@ -1573,7 +1585,7 @@ export default {
     save() {
       this.showSetting = false;
       this.data = {
-        tableName: "收费",
+        tableName: "-收费",
         userId: Cookies.get("userName"),
         sysTableSetList: this.setRowList,
       };
@@ -1584,7 +1596,7 @@ export default {
     //重置列表
     delRow() {
       this.data = {
-        tableName: "收费",
+        tableName: "-收费",
         userId: Cookies.get("userName"),
       };
       resetModule(this.data).then((res) => {
@@ -1800,7 +1812,7 @@ export default {
           this.queryParams = response.data.tFee;
           this.fWbuOptions = response.data.feesList;
           this.fMblnoOptions = response.data.corps;
-          this.open = true;
+          this.mainTable = true
           this.title = "修改收费列表";
         });
       }
@@ -1869,6 +1881,7 @@ export default {
     // 查看按钮
     check(row, res) {
       this.notChange = true;
+      this.doNot = true
       if (Cookies.get("sysType") == 1) {
         //大木
         getCharge(row.fId).then((response) => {
@@ -1892,7 +1905,7 @@ export default {
           this.queryParams = response.data.tFee;
           this.fWbuOptions = response.data.feesList;
           this.fMblnoOptions = response.data.corps;
-          this.open = true;
+          this.mainTable = true
           this.title = "收费列表";
           this.tablefilter = true;
           if (res == 1) {
@@ -1929,7 +1942,7 @@ export default {
                 this.queryParams = response.data.tFee;
                 this.fWbuOptions = response.data.feesList;
                 this.fMblnoOptions = response.data.corps;
-                this.open = true;
+                this.mainTable = true
               });
             } else {
               this.notChange = true;
@@ -1967,7 +1980,7 @@ export default {
               this.queryParams = response.data.tFee;
               this.fWbuOptions = response.data.feesList;
               this.fMblnoOptions = response.data.corps;
-              this.open = true;
+              this.mainTable = true
             });
           }
         });
@@ -1994,7 +2007,7 @@ export default {
           this.queryParams = response.data.tFee;
           this.fWbuOptions = response.data.feesList;
           this.fMblnoOptions = response.data.corps;
-          this.open = true;
+          this.mainTable = true
           this.title = "收费列表";
           this.tablefilter = true;
           if (res == 1) {
@@ -2031,7 +2044,7 @@ export default {
                 this.queryParams = response.data.tFee;
                 this.fWbuOptions = response.data.feesList;
                 this.fMblnoOptions = response.data.corps;
-                this.open = true;
+                this.mainTable = true
               });
             } else {
               this.notChange = true;
@@ -2069,7 +2082,7 @@ export default {
               this.queryParams = response.data.tFee;
               this.fWbuOptions = response.data.feesList;
               this.fMblnoOptions = response.data.corps;
-              this.open = true;
+              this.mainTable = true
             });
           }
         });
@@ -2296,10 +2309,21 @@ export default {
     },
     // 取消按钮
     cancel() {
-      this.open = false;
-      this.approve = false;
-      this.getList();
-      this.reset();
+      if(this.notChange == true){
+        this.mainTable = false
+      }else{
+        MessageBox.confirm("是否已保存?",{
+            confirmButtonText: '确定',
+            cancelButtonText: '取消',
+            type: 'warning'
+          }
+        ).then(() => {
+          this.mainTable = false
+          this.approve = false;
+          this.getList();
+          this.reset();
+        })
+      }
     },
     // 表单重置
     reset() {
@@ -2449,6 +2473,7 @@ export default {
     /** 新增按钮操作 */
     handleAdd() {
       this.notChange = false;
+      this.doNot = false
       this.hide = true;
       this.reset();
       (this.pass = {
@@ -2482,7 +2507,7 @@ export default {
         fSystemType: Cookies.get("sysType"),
       };
       this.resetForm("queryParams");
-      this.open = true;
+      this.mainTable = true;
       this.title = "添加财务数据主";
     },
     /** 修改按钮操作 */
@@ -2523,7 +2548,7 @@ export default {
           this.queryParams = response.data.tFee;
           this.fWbuOptions = response.data.feesList;
           this.fMblnoOptions = response.data.corps;
-          this.open = true;
+          this.mainTable = true
           this.title = "修改收费列表";
           if (this.DzfeeList) {
             this.doNot = true;
@@ -2554,7 +2579,7 @@ export default {
           this.queryParams = response.data.tFee;
           this.fWbuOptions = response.data.feesList;
           this.fMblnoOptions = response.data.corps;
-          this.open = true;
+          this.mainTable = true
           this.title = "修改收费列表";
           if (this.DzfeeList) {
             this.doNot = true;

+ 366 - 343
src/views/finance/contrast/index.vue

@@ -1,140 +1,141 @@
 <template>
   <div class="app-container">
-    <el-form
-      :model="tablefilter"
-      ref="queryParams_s"
-      :inline="true"
-      v-show="showSearch"
-      label-width="68px"
-    >
-      <el-form-item label="货权方" prop="fCtrlcorpid">
-        <el-input
-          v-model="tablefilter.fCtrlcorpid"
-          placeholder="请输入客户名称"
-          filterable
-          remote
-          clearable
-          size="small"
-          style="width: 200px"
-          @keyup.enter.native="handleQuery"
-          :remote-method="corpsRemoteMethod"
-        />
-      </el-form-item>
+<!--    主列表页面-->
+    <div v-show="mainTable == false">
+      <el-form
+        :model="tablefilter"
+        ref="queryParams_s"
+        :inline="true"
+        v-show="showSearch"
+        label-width="68px"
+      >
+        <el-form-item label="货权方" prop="fCtrlcorpid">
+          <el-input
+            v-model="tablefilter.fCtrlcorpid"
+            placeholder="请输入客户名称"
+            filterable
+            remote
+            clearable
+            size="small"
+            style="width: 200px"
+            @keyup.enter.native="handleQuery"
+            :remote-method="corpsRemoteMethod"
+          />
+        </el-form-item>
 
-      <el-form-item label="结算单位" prop="fCorpid">
-        <el-select
-          v-model="tablefilter.fCorpid"
-          placeholder="请选择结算单位"
-          filterable
-          remote
-          clearable
-          size="small"
-          style="width: 200px"
-          @keyup.enter.native="handleQuery"
-          :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">
+          <el-select
+            v-model="tablefilter.fCorpid"
+            placeholder="请选择结算单位"
+            filterable
+            remote
+            clearable
+            size="small"
+            style="width: 200px"
+            @keyup.enter.native="handleQuery"
+            :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="timeInterval">
-        <el-date-picker
-          v-model="tablefilter.timeInterval"
-          size="small"
-          style="width: 240px"
-          value-format="yyyy-MM-dd"
-          type="daterange"
-          range-separator="-"
-          start-placeholder="开始日期"
-          end-placeholder="结束日期"
-        ></el-date-picker>
-      </el-form-item>
+        <el-form-item label="对账日期" prop="timeInterval">
+          <el-date-picker
+            v-model="tablefilter.timeInterval"
+            size="small"
+            style="width: 240px"
+            value-format="yyyy-MM-dd"
+            type="daterange"
+            range-separator="-"
+            start-placeholder="开始日期"
+            end-placeholder="结束日期"
+          ></el-date-picker>
+        </el-form-item>
 
-      <el-form-item label="系统编号" prop="fBillno">
-        <el-input
-          v-model="tablefilter.fBillno"
-          placeholder="请输入系统编号"
-          clearable
-          size="small"
-          style="width: 200px"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
+        <el-form-item label="系统编号" prop="fBillno">
+          <el-input
+            v-model="tablefilter.fBillno"
+            placeholder="请输入系统编号"
+            clearable
+            size="small"
+            style="width: 200px"
+            @keyup.enter.native="handleQuery"
+          />
+        </el-form-item>
 
-      <el-form-item>
-        <el-button
-          type="cyan"
-          icon="el-icon-search"
-          size="mini"
-          @click="handleQuery"
+        <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 icon="el-icon-refresh" size="mini" @click="resetQuery"
           >重置</el-button
-        >
-      </el-form-item>
-    </el-form>
-
-    <el-row :gutter="10" class="mb8">
-      <el-col :span="1.5">
-        <el-button
-          type="primary"
-          icon="el-icon-plus"
-          size="mini"
-          @click="handleAdd"
-          v-hasPermi="['finance:contrast:add']"
+          >
+        </el-form-item>
+      </el-form>
+      <el-row :gutter="10" class="mb8">
+        <el-col :span="1.5">
+          <el-button
+            type="primary"
+            icon="el-icon-plus"
+            size="mini"
+            @click="handleAdd"
+            v-hasPermi="['finance:contrast:add']"
           >新增</el-button
-        >
-      </el-col>
-      <el-col :span="1.5">
-        <el-button
-          type="success"
-          icon="el-icon-edit"
-          size="mini"
-          :disabled="single"
-          @click="handleUpdate"
-          v-hasPermi="['warehouse:contrast:edit']"
+          >
+        </el-col>
+        <el-col :span="1.5">
+          <el-button
+            type="success"
+            icon="el-icon-edit"
+            size="mini"
+            :disabled="single"
+            @click="handleUpdate"
+            v-hasPermi="['warehouse:contrast:edit']"
           >修改</el-button
-        >
-      </el-col>
-      <el-col :span="1.5">
-        <el-button
-          type="warning"
-          icon="el-icon-download"
-          size="mini"
-          @click="handleExport"
-          v-hasPermi="['finance:contrast:export']"
-          >导出</el-button
-        >
-      </el-col>
-      <div class="tabSetting">
-        <right-toolbar
-          :showSearch.sync="showSearch"
-          @queryTable="getList"
-        ></right-toolbar>
-        <div style="margin: 0 12px">
+          >
+        </el-col>
+        <el-col :span="1.5">
           <el-button
-            icon="el-icon-setting"
+            type="warning"
+            icon="el-icon-download"
             size="mini"
-            circle
-            @click="showSetting = !showSetting"
-          ></el-button>
+            @click="handleExport"
+            v-hasPermi="['finance:contrast:export']"
+          >导出</el-button
+          >
+        </el-col>
+        <div class="tabSetting">
+          <right-toolbar
+            :showSearch.sync="showSearch"
+            @queryTable="getList"
+          ></right-toolbar>
+          <div style="margin: 0 12px">
+            <el-button
+              icon="el-icon-setting"
+              size="mini"
+              circle
+              @click="showSetting = !showSetting"
+            ></el-button>
+          </div>
         </div>
-      </div>
-    </el-row>
-    <el-dialog
-      title="自定义列显示"
-      :visible.sync="showSetting"
-      width="700px"
-      v-dialogDrag
-    >
-      <template slot="title">
-        <div class="avue-crud__dialog__header">
+      </el-row>
+      <el-dialog
+        title="自定义列显示"
+        :visible.sync="showSetting"
+        width="700px"
+        v-dialogDrag
+      >
+        <template slot="title">
+          <div class="avue-crud__dialog__header">
           <span class="el-dialog__title">
             <span
               style="
@@ -147,213 +148,174 @@
               "
             ></span>
           </span>
+          </div>
+        </template>
+        <div>配置排序列数据(拖动调整顺序)</div>
+        <div style="margin-left: 17px">
+          <el-checkbox
+            v-model="allCheck"
+            label="全选"
+            @change="allChecked"
+          ></el-checkbox>
         </div>
-      </template>
-      <div>配置排序列数据(拖动调整顺序)</div>
-      <div style="margin-left: 17px">
-        <el-checkbox
-          v-model="allCheck"
-          label="全选"
-          @change="allChecked"
-        ></el-checkbox>
-      </div>
-      <div style="padding: 4px; display: flex; justify-content: center">
-        <draggable
-          v-model="setRowList"
-          group="site"
-          animation="300"
-          @start="onStart"
-          @end="onEnd"
-          handle=".indraggable"
-        >
-          <transition-group>
-            <div
-              v-for="item in setRowList"
-              :key="item.surface"
-              class="listStyle"
-            >
-              <div style="width: 500px" class="indraggable">
-                <div class="progress" :style="{ width: item.width + 'px' }">
-                  <el-checkbox
-                    :label="item.name"
-                    v-model="item.checked"
-                    :true-label="0"
-                    :false-label="1"
+        <div style="padding: 4px; display: flex; justify-content: center">
+          <draggable
+            v-model="setRowList"
+            group="site"
+            animation="300"
+            @start="onStart"
+            @end="onEnd"
+            handle=".indraggable"
+          >
+            <transition-group>
+              <div
+                v-for="item in setRowList"
+                :key="item.surface"
+                class="listStyle"
+              >
+                <div style="width: 500px" class="indraggable">
+                  <div class="progress" :style="{ width: item.width + 'px' }">
+                    <el-checkbox
+                      :label="item.name"
+                      v-model="item.checked"
+                      :true-label="0"
+                      :false-label="1"
                     >{{ item.name }}
-                  </el-checkbox>
+                    </el-checkbox>
+                  </div>
                 </div>
+                <el-input-number
+                  v-model.number="item.width"
+                  controls-position="right"
+                  :min="1"
+                  :max="500"
+                  size="mini"
+                ></el-input-number>
               </div>
-              <el-input-number
-                v-model.number="item.width"
-                controls-position="right"
-                :min="1"
-                :max="500"
-                size="mini"
-              ></el-input-number>
-            </div>
-          </transition-group>
-        </draggable>
-      </div>
-      <span slot="footer" class="dialog-footer">
+            </transition-group>
+          </draggable>
+        </div>
+        <span slot="footer" class="dialog-footer">
         <el-button @click="showSetting = false">取 消</el-button>
         <el-button @click="delRow" type="danger">重 置</el-button>
         <el-button type="primary" @click="save()">确 定</el-button>
       </span>
-    </el-dialog>
-
-    <el-table
-      v-loading="loading"
-      :data="contrastList"
-      @selection-change="handleSelectionChange"
-      show-summary
-      :summary-method="listTotal"
-    >
-      <el-table-column width="100" align="center" type="selection" />
-      <!-- <el-table-column label="制单部门" align="center" prop="fId" /> -->
-      <el-table-column label="行号" align="center" type="index" fixed="left" />
+      </el-dialog>
+      <el-table
+        v-loading="loading"
+        :data="contrastList"
+        @selection-change="handleSelectionChange"
+        show-summary
+        :summary-method="listTotal"
+      >
+        <el-table-column width="100" align="center" type="selection" />
+        <!-- <el-table-column label="制单部门" align="center" prop="fId" /> -->
+        <el-table-column label="行号" align="center" type="index" fixed="left" />
 
-      <el-table-column
-        v-for="(item, index) in getRowList"
-        :key="index"
-        :label="item.name"
-        :width="item.width"
-        :prop="item.label"
-        align="center"
-        :fixed="item.fixed"
-        :show-overflow-tooltip="true"
-      />
-      <!--      <el-table-column label="系统编号" align="center" prop="fBillno" show-overflow-tooltip width="120"/>-->
-      <!--      <el-table-column label="货权方" sortable align="center" show-overflow-tooltip prop="fCtrlcorpid" width="220"/>-->
-      <!--      <el-table-column label="结算单位" sortable align="center" prop="fCorpidName" show-overflow-tooltip width="220"/>-->
-      <!--      <el-table-column label="账单日期" sortable align="center" prop="fAccbilldate" width="120">-->
-      <!--        <template slot-scope="scope">-->
-      <!--          <span>{{ parseTime(scope.row.fAccbilldate, "{y}-{m}-{d}") }}</span>-->
-      <!--        </template>-->
-      <!--      </el-table-column>-->
-      <!--      <el-table-column label="提单号" sortable align="center" prop="tMblno" width="216"/>-->
-      <!--      <el-table-column label="金额" align="center" prop="fAmtdr" width="120"/>-->
-      <!--      <el-table-column label="对账金额" align="center" prop="fAmtcr" width="120"/>-->
-      <!--      &lt;!&ndash;       <el-table-column label="单据类型" align="center" prop="fBilltype" />&ndash;&gt;-->
-      <!--      <el-table-column label="备注" align="center" show-overflow-tooltip prop="fRemarks" width="120"/>-->
-      <!--      <el-table-column label="状态" align="center" prop="fBillstatus" width="120">-->
-      <!--        <template slot-scope="scope">-->
-      <!--          <span v-if="scope.row.fBillstatus == '1'">保存</span>-->
-      <!--          <span v-else-if="scope.row.fBillstatus == '2'">暂存</span>-->
-      <!--          <span v-else-if="scope.row.fBillstatus == '3'">审批驳回</span>-->
-      <!--          <span v-else-if="scope.row.fBillstatus == '4'">提交审核</span>-->
-      <!--          <span v-else-if="scope.row.fBillstatus == '5'">审核中</span>-->
-      <!--          <span v-else-if="scope.row.fBillstatus == '6'">审核完成</span>-->
-      <!--        </template>-->
-      <!--      </el-table-column>-->
+        <el-table-column
+          v-for="(item, index) in getRowList"
+          :key="index"
+          :label="item.name"
+          :width="item.width"
+          :prop="item.label"
+          align="center"
+          :fixed="item.fixed"
+          :show-overflow-tooltip="true"
+        />
+        <!--      <el-table-column label="系统编号" align="center" prop="fBillno" show-overflow-tooltip width="120"/>-->
+        <!--      <el-table-column label="货权方" sortable align="center" show-overflow-tooltip prop="fCtrlcorpid" width="220"/>-->
+        <!--      <el-table-column label="结算单位" sortable align="center" prop="fCorpidName" show-overflow-tooltip width="220"/>-->
+        <!--      <el-table-column label="账单日期" sortable align="center" prop="fAccbilldate" width="120">-->
+        <!--        <template slot-scope="scope">-->
+        <!--          <span>{{ parseTime(scope.row.fAccbilldate, "{y}-{m}-{d}") }}</span>-->
+        <!--        </template>-->
+        <!--      </el-table-column>-->
+        <!--      <el-table-column label="提单号" sortable align="center" prop="tMblno" width="216"/>-->
+        <!--      <el-table-column label="金额" align="center" prop="fAmtdr" width="120"/>-->
+        <!--      <el-table-column label="对账金额" align="center" prop="fAmtcr" width="120"/>-->
+        <!--      &lt;!&ndash;       <el-table-column label="单据类型" align="center" prop="fBilltype" />&ndash;&gt;-->
+        <!--      <el-table-column label="备注" align="center" show-overflow-tooltip prop="fRemarks" width="120"/>-->
+        <!--      <el-table-column label="状态" align="center" prop="fBillstatus" width="120">-->
+        <!--        <template slot-scope="scope">-->
+        <!--          <span v-if="scope.row.fBillstatus == '1'">保存</span>-->
+        <!--          <span v-else-if="scope.row.fBillstatus == '2'">暂存</span>-->
+        <!--          <span v-else-if="scope.row.fBillstatus == '3'">审批驳回</span>-->
+        <!--          <span v-else-if="scope.row.fBillstatus == '4'">提交审核</span>-->
+        <!--          <span v-else-if="scope.row.fBillstatus == '5'">审核中</span>-->
+        <!--          <span v-else-if="scope.row.fBillstatus == '6'">审核完成</span>-->
+        <!--        </template>-->
+        <!--      </el-table-column>-->
 
-      <!-- <el-table-column label="制单部门" align="center" prop="fDeptid" /> -->
-      <el-table-column
-        label="操作"
-        align="center"
-        class-name="small-padding fixed-width"
-        min-width="180"
-        fixed="right"
-      >
-        <template slot-scope="scope">
-          <el-button
-            size="mini"
-            type="text"
-            icon="el-icon-view"
-            @click="check(scope.row, 0)"
-            v-hasPermi="['finance:contrast:edit']"
+        <!-- <el-table-column label="制单部门" align="center" prop="fDeptid" /> -->
+        <el-table-column
+          label="操作"
+          align="center"
+          class-name="small-padding fixed-width"
+          min-width="180"
+          fixed="right"
+        >
+          <template slot-scope="scope">
+            <el-button
+              size="mini"
+              type="text"
+              icon="el-icon-view"
+              @click="check(scope.row, 0)"
+              v-hasPermi="['finance:contrast:edit']"
             >查看</el-button
-          >
-          <el-button
-            size="mini"
-            type="text"
-            icon="el-icon-view"
-            @click="check(scope.row, 1)"
-            v-hasPermi="['finance:contrast:edit']"
-            v-if="
+            >
+            <el-button
+              size="mini"
+              type="text"
+              icon="el-icon-view"
+              @click="check(scope.row, 1)"
+              v-hasPermi="['finance:contrast:edit']"
+              v-if="
               scope.row.fBillstatus == '提交审核' ||
               scope.row.fBillstatus == '审核中'
             "
             >审批进度</el-button
-          >
-          <el-button
-            size="mini"
-            type="text"
-            icon="el-icon-edit"
-            @click="handleUpdate(scope.row)"
-            v-hasPermi="['finance:contrast:edit']"
-            v-if="
+            >
+            <el-button
+              size="mini"
+              type="text"
+              icon="el-icon-edit"
+              @click="handleUpdate(scope.row)"
+              v-hasPermi="['finance:contrast:edit']"
+              v-if="
               scope.row.fBillstatus == '保存' ||
               scope.row.fBillstatus == '暂存' ||
               scope.row.fBillstatus == '审批驳回'
             "
-          >
-            修改</el-button
-          >
+            >
+              修改</el-button
+            >
 
-          <el-button
-            size="mini"
-            type="text"
-            icon="el-icon-delete"
-            @click="handleDelete(scope.row)"
-            v-hasPermi="['finance:contrast:remove']"
-            v-if="
+            <el-button
+              size="mini"
+              type="text"
+              icon="el-icon-delete"
+              @click="handleDelete(scope.row)"
+              v-hasPermi="['finance:contrast:remove']"
+              v-if="
               scope.row.fBillstatus == '保存' ||
               scope.row.fBillstatus == '暂存' ||
               scope.row.fBillstatus == '审批驳回'
             "
             >删除</el-button
-          >
-        </template>
-      </el-table-column>
-    </el-table>
-
-    <pagination
-      v-show="total > 0"
-      :total="total"
-      :page.sync="queryParams.pageNum"
-      :limit.sync="queryParams.pageSize"
-      @pagination="getList"
-    />
-
-    <!-- 对账表 -->
-    <el-dialog
-      v-dialogDrag
-      :fullscreen="dialogFull"
-      :visible.sync="open"
-      width="70%"
-      append-to-body
-      :close-on-click-modal="false"
-      :show-close="colseButton"
-    >
-      <template slot="title">
-        <div class="avue-crud__dialog__header">
-          <span class="el-dialog__title">
-            <span
-              style="
-                display: inline-block;
-                width: 3px;
-                height: 20px;
-                margin-right: 5px;
-                float: left;
-                margin-top: 2px;
-              "
-            ></span>
-          </span>
-          <div class="avue-crud__dialog__menu enlarge" @click="full">
-            <i
-              style="
-                cursor: pointer;
-                display: block;
-                width: 12px;
-                height: 12px;
-                border: 1px solid #909399;
-                border-top: 3px solid #909399;
-                margin-top: -3px;
-              "
-            ></i>
-          </div>
-        </div>
-      </template>
+            >
+          </template>
+        </el-table-column>
+      </el-table>
+      <pagination
+        v-show="total > 0"
+        :total="total"
+        :page.sync="queryParams.pageNum"
+        :limit.sync="queryParams.pageSize"
+        @pagination="getList"
+      />
+    </div>
+<!--    新增修改页面-->
+    <div v-show="mainTable == true">
       <el-form
         ref="ruless"
         :model="queryParams"
@@ -461,7 +423,7 @@
               @click="reconciliation"
               :disabled="notChange"
               v-if="queryParams.fBillstatus < '4'"
-              >检索</el-button
+            >检索</el-button
             >
             <el-button
               type="primary"
@@ -469,17 +431,17 @@
               @click="confirmReconciliation"
               :disabled="notChange"
               v-if="queryParams.fBillstatus < '4'"
-              >确认对账</el-button
+            >确认对账</el-button
             >
             <el-button type="warning" size="small" @click="handleExportItems"
-              >导出</el-button
+            >导出</el-button
             >
             <el-button
               type="success"
               size="small"
               @click="backrRconciliation"
               v-if="queryParams.fBillstatus === '6'"
-              >撤销对账</el-button
+            >撤销对账</el-button
             >
             <!--          <el-button type="info" size="small" @click="exportData">导出</el-button>-->
             <el-button
@@ -488,7 +450,7 @@
               :disabled="disappear"
               v-if="queryParams.fBillstatus === '4'"
               @click="backApproval"
-              >撤销审批</el-button
+            >撤销审批</el-button
             >
           </div>
           <div style="margin: 0 12px">
@@ -556,7 +518,7 @@
                       v-model="item.checked"
                       :true-label="0"
                       :false-label="1"
-                      >{{ item.name }}
+                    >{{ item.name }}
                     </el-checkbox>
                   </div>
                 </div>
@@ -662,12 +624,11 @@
               icon="el-icon-delete"
               :disabled="notChange"
               @click.native.prevent="deleteRow(scope.$index, DzfeeList)"
-              >删除
+            >删除
             </el-button>
           </template>
         </el-table-column>
       </el-table>
-
       <div slot="footer" class="dialog-footer">
         <add-or-update
           v-if="addOrUpdateVisible"
@@ -684,22 +645,21 @@
           type="primary"
           v-if="queryParams.fBillstatus >= '3'"
           @click="addOrUpdateHandle()"
-          >查看审批流</el-button
+        >查看审批流</el-button
         >
         <el-button
           type="primary"
           @click="submitForm(typevalue)"
           :disabled="notChange"
-          >保 存</el-button
+        >保 存</el-button
         >
         <el-button v-if="cancelButton === true" @click="cancel"
-          >取 消</el-button
+        >取 消</el-button
         >
         <el-button v-if="cancelButton === false" @click="homePage"
-          >取消</el-button
+        >取消</el-button
         >
       </div>
-
       <!-- 添加或修改财务数据主对话框 -->
       <el-dialog
         v-dialogDrag
@@ -916,10 +876,10 @@
           <el-form-item>
             <!-- <el-button class="btnColor" type="info" size="mini">导入</el-button> -->
             <el-button type="cyan" size="mini" @click="searchFee(typevalue)"
-              >搜索</el-button
+            >搜索</el-button
             >
             <el-button type="info" size="mini" @click="resetQuery_s"
-              >重置</el-button
+            >重置</el-button
             >
           </el-form-item>
 
@@ -968,10 +928,10 @@
                 <span v-else-if="scope.row.fBilltype == '1080'">司机出车</span>
                 <span v-else-if="scope.row.fBilltype == '1040'">司机提箱</span>
                 <span v-else-if="scope.row.fBilltype == '1050'"
-                  >司机装卸柜</span
+                >司机装卸柜</span
                 >
                 <span v-else-if="scope.row.fBilltype == '1060'"
-                  >司机还卸柜</span
+                >司机还卸柜</span
                 >
                 <span v-else-if="scope.row.fBilltype == '1070'">司机回单</span>
                 <span v-else-if="scope.row.fBilltype == '1090'">费用补充</span>
@@ -1025,7 +985,50 @@
           <el-button @click="signOut">取 消</el-button>
         </div>
       </el-dialog>
-    </el-dialog>
+    </div>
+
+
+    <!-- 对账表 -->
+<!--    <el-dialog-->
+<!--      v-dialogDrag-->
+<!--      :fullscreen="dialogFull"-->
+<!--      :visible.sync="open"-->
+<!--      width="70%"-->
+<!--      append-to-body-->
+<!--      :close-on-click-modal="false"-->
+<!--      :show-close="colseButton"-->
+<!--    >-->
+<!--      <template slot="title">-->
+<!--        <div class="avue-crud__dialog__header">-->
+<!--          <span class="el-dialog__title">-->
+<!--            <span-->
+<!--              style="-->
+<!--                display: inline-block;-->
+<!--                width: 3px;-->
+<!--                height: 20px;-->
+<!--                margin-right: 5px;-->
+<!--                float: left;-->
+<!--                margin-top: 2px;-->
+<!--              "-->
+<!--            ></span>-->
+<!--          </span>-->
+<!--          <div class="avue-crud__dialog__menu enlarge" @click="full">-->
+<!--            <i-->
+<!--              style="-->
+<!--                cursor: pointer;-->
+<!--                display: block;-->
+<!--                width: 12px;-->
+<!--                height: 12px;-->
+<!--                border: 1px solid #909399;-->
+<!--                border-top: 3px solid #909399;-->
+<!--                margin-top: -3px;-->
+<!--              "-->
+<!--            ></i>-->
+<!--          </div>-->
+<!--        </div>-->
+<!--      </template>-->
+
+<!--    </el-dialog>-->
 
     <!-- 打印页面 -->
     <!--    <el-dialog-->
@@ -1111,6 +1114,7 @@ import Cookies from "js-cookie";
 import { addSet, select, resetModule } from "@/api/system/set";
 import draggable from "vuedraggable";
 import Vue from "vue";
+import { MessageBox } from 'element-ui'
 Vue.directive("dialogDrag", {
   bind(el, binding, vnode, oldVnode) {
     const dialogHeaderEl = el.querySelector(".el-dialog__header");
@@ -1172,6 +1176,7 @@ export default {
 
   data() {
     return {
+      mainTable:false,
       //全屏放大
       dialogFull: false,
       drag: false,
@@ -1572,7 +1577,14 @@ export default {
     this.getRow2();
   },
   activated() {
-    this.Jump();
+    if(this.$route.query.data){
+      let data = JSON.parse(this.$route.query.data)
+      if(data.key === 1){
+        this.handleAdd()
+      }else{
+        this.Jump();
+      }
+    }
   },
   methods: {
     full() {
@@ -1756,6 +1768,7 @@ export default {
         this.doNot = true;
         this.notChange = true;
         this.approve = true;
+        this.mainTable = true
         this.disappear = true;
         this.cancelButton = false;
         this.reset();
@@ -1794,7 +1807,7 @@ export default {
           this.queryParams = response.data.tFee;
           this.fWbuOptions = response.data.feesList;
           this.fMblnoOptions = response.data.corps;
-          this.open = true;
+          this.mainTable = true;
           this.title = "修改财务数据主";
         });
       }
@@ -2279,11 +2292,21 @@ export default {
 
     // 取消按钮
     cancel() {
-      this.open = false;
-      // this.feeList = []
-      this.reset();
-      this.getList();
-      this.queryParams.fSystemType = "";
+      if(this.notChange == true){
+        this.mainTable = false
+      }else{
+        MessageBox.confirm("是否已保存?",{
+            confirmButtonText: '确定',
+            cancelButtonText: '取消',
+            type: 'warning'
+          }
+        ).then(() => {
+          this.mainTable = false
+          this.reset();
+          this.getList();
+          this.queryParams.fSystemType = "";
+        })
+      }
     },
     // 表单重置
     reset() {
@@ -2402,7 +2425,7 @@ export default {
         fFeesName: "", //结算单位
         fCorpid: "", //结算单位ID
       };
-      this.open = true;
+      this.mainTable = true
       this.title = "添加财务数据主";
       this.queryParams = {
         pageNum: 1,
@@ -2423,6 +2446,7 @@ export default {
         timeReconci: null,
         fSystemType: Cookies.get("sysType"),
       };
+      console.log(Cookies.get("sysType"))
     },
     // 查看按钮
     check(row, res) {
@@ -2457,7 +2481,7 @@ export default {
           this.queryParams.fSystemType = response.data.tFee.fsystemType;
           this.fWbuOptions = response.data.feesList;
           this.fMblnoOptions = response.data.corps;
-          this.open = true;
+          this.mainTable = true;
           this.disappear = true;
           this.title = "修改财务数据主";
           if (res == 1) {
@@ -2501,7 +2525,7 @@ export default {
                 this.queryParams.fSystemType = response.data.tFee.fsystemType;
                 this.fWbuOptions = response.data.feesList;
                 this.fMblnoOptions = response.data.corps;
-                this.open = true;
+                this.mainTable = true;
               });
             } else {
               this.notChange = true;
@@ -2545,8 +2569,7 @@ export default {
               this.queryParams.fSystemType = response.data.tFee.fsystemType;
               this.fWbuOptions = response.data.feesList;
               this.fMblnoOptions = response.data.corps;
-              this.open = true;
-              this.open = true;
+              this.mainTable = true;
             });
           }
         });
@@ -2578,7 +2601,7 @@ export default {
           this.queryParams = response.data.tFee;
           this.fWbuOptions = response.data.feesList;
           this.fMblnoOptions = response.data.corps;
-          this.open = true;
+          this.mainTable = true;
           this.disappear = true;
           this.title = "修改财务数据主";
           if (res == 1) {
@@ -2621,7 +2644,7 @@ export default {
                 this.queryParams = response.data.tFee;
                 this.fWbuOptions = response.data.feesList;
                 this.fMblnoOptions = response.data.corps;
-                this.open = true;
+                this.mainTable = true;
               });
             } else {
               this.notChange = true;
@@ -2665,8 +2688,7 @@ export default {
               this.queryParams = response.data.tFee;
               this.fWbuOptions = response.data.feesList;
               this.fMblnoOptions = response.data.corps;
-              this.open = true;
-              this.open = true;
+              this.mainTable = true;
             });
           }
         });
@@ -2674,6 +2696,7 @@ export default {
     },
     /** 修改按钮操作 */
     handleUpdate(row) {
+      this.mainTable = true
       this.notChange = false;
       this.hide = false;
       this.reset();
@@ -2712,9 +2735,9 @@ export default {
           this.DzfeeList = response.data.feeDoList;
           this.fWbuOptions = response.data.feesList;
           this.queryParams = response.data.tFee;
-          this.queryParams.fSystemType = response.data.tFee.fsystemType;
+          // this.queryParams.fSystemType = response.data.tFee.fsystemType;
           this.fMblnoOptions = response.data.corps;
-          this.open = true;
+          this.mainTable = true;
           this.title = "修改财务数据主";
           if (this.DzfeeList) {
             this.doNot = true;
@@ -2749,7 +2772,7 @@ export default {
           this.fWbuOptions = response.data.feesList;
           this.queryParams = response.data.tFee;
           this.fMblnoOptions = response.data.corps;
-          this.open = true;
+          this.mainTable = true
           this.title = "修改财务数据主";
           if (this.DzfeeList) {
             this.doNot = true;

+ 40 - 21
src/views/finance/payment/index.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="app-container">
 <!--    主列表页面-->
-    <div v-if="mainTable == false">
+    <div v-show="mainTable == false">
       <el-form
         :model="tableFilter"
         ref="queryForm"
@@ -75,7 +75,6 @@
           >
         </el-form-item>
       </el-form>
-
       <el-row :gutter="10" class="mb8">
         <el-col :span="1.5">
           <el-button
@@ -306,7 +305,6 @@
         <!--      <el-table-column label="单据类型" align="center" prop="fBilltype"/>-->
         <!--      <el-table-column label="制单部门" align="center" prop="fDeptid"/>-->
       </el-table>
-
       <pagination
         v-show="total > 0"
         :total="total"
@@ -316,8 +314,7 @@
       />
     </div>
 <!--    新增页面-->
-    <div v-if="mainTable == true">
-
+    <div v-show="mainTable == true">
       <template slot="title">
         <div class="avue-crud__dialog__header">
           <span class="el-dialog__title">
@@ -696,7 +693,7 @@
         <el-button type="primary" @click="submitForm" :disabled="notChange"
         >保 存</el-button
         >
-        <el-button v-if="cancelButton === true" @click="mainTable = false"
+        <el-button v-if="cancelButton === true" @click="cancel"
         >取 消</el-button
         >
         <el-button v-if="cancelButton === false" @click="homePage"
@@ -1783,6 +1780,7 @@ import Global from "@/layout/components/global";
 import Cookies from "js-cookie";
 import Vue from "vue";
 import { addSet, select, resetModule } from "@/api/system/set";
+import { MessageBox } from 'element-ui'
 Vue.directive("dialogDrag", {
   bind(el, binding, vnode, oldVnode) {
     const dialogHeaderEl = el.querySelector(".el-dialog__header");
@@ -2199,7 +2197,14 @@ export default {
     this.getRow2();
   },
   activated() {
-    this.adoPt();
+    if(this.$route.query.data){
+      let data = JSON.parse(this.$route.query.data)
+      if(data.key === 1){
+        this.handleAdd()
+      }else{
+        this.adoPt();
+      }
+    }
   },
   methods: {
     //导出明细
@@ -2494,7 +2499,7 @@ export default {
             this.queryParams = response.data.tFee;
             this.fWbuOptions = response.data.feesList;
             this.fMblnoOptions = response.data.corps;
-            this.open = true;
+            this.mainTable = true;
             this.title = "修改付费列表";
           });
         } else if (Cookies.get("sysType") == 2) {
@@ -2520,7 +2525,7 @@ export default {
             this.queryParams = response.data.tFee;
             this.fWbuOptions = response.data.feesList;
             this.fMblnoOptions = response.data.corps;
-            this.open = true;
+            this.mainTable = true;
             this.title = "修改付费列表";
           });
         }
@@ -2590,6 +2595,7 @@ export default {
     // 查看按钮
     check(row, res) {
       this.notChange = true;
+      this.doNot = true
       if (Cookies.get("sysType") == 1) {
         //大木
         getCharge(row.fId).then((response) => {
@@ -2613,7 +2619,8 @@ export default {
           this.queryParams = response.data.tFee;
           this.fWbuOptions = response.data.feesList;
           this.fMblnoOptions = response.data.corps;
-          this.open = true;
+          this.mainTable = true;
+          this.mainTable = true
           this.title = "付费列表";
           this.tablefilter = true;
           if (res == 1) {
@@ -2650,7 +2657,7 @@ export default {
                 this.queryParams = response.data.tFee;
                 this.fWbuOptions = response.data.feesList;
                 this.fMblnoOptions = response.data.corps;
-                this.open = true;
+                this.mainTable = true;
               });
             } else {
               this.notChange = true;
@@ -2688,7 +2695,7 @@ export default {
               this.queryParams = response.data.tFee;
               this.fWbuOptions = response.data.feesList;
               this.fMblnoOptions = response.data.corps;
-              this.open = true;
+              this.mainTable = true;
             });
           }
         });
@@ -2715,7 +2722,7 @@ export default {
           this.queryParams = response.data.tFee;
           this.fWbuOptions = response.data.feesList;
           this.fMblnoOptions = response.data.corps;
-          this.open = true;
+          this.mainTable = true;
           this.title = "付费列表";
           this.tablefilter = true;
           if (res == 1) {
@@ -2752,7 +2759,7 @@ export default {
                 this.queryParams = response.data.tFee;
                 this.fWbuOptions = response.data.feesList;
                 this.fMblnoOptions = response.data.corps;
-                this.open = true;
+                this.mainTable = true;
               });
             } else {
               this.notChange = true;
@@ -2790,7 +2797,7 @@ export default {
               this.queryParams = response.data.tFee;
               this.fWbuOptions = response.data.feesList;
               this.fMblnoOptions = response.data.corps;
-              this.open = true;
+              this.mainTable = true;
             });
           }
         });
@@ -3012,9 +3019,21 @@ export default {
     },
     // 取消按钮
     cancel() {
-      this.open = false;
-      this.approve = false;
-      this.reset();
+      if(this.notChange == true){
+        this.mainTable = false
+      }else{
+        MessageBox.confirm("是否已保存?",{
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }
+        ).then(()=>{
+          this.mainTable = false
+          this.approve = false;
+          this.getList();
+          this.reset();
+        })
+      }
     },
     // 表单重置
     reset() {
@@ -3198,7 +3217,7 @@ export default {
         fSystemType: Cookies.get("sysType"),
       };
       this.resetForm("queryParams");
-      this.open = true;
+      this.mainTable = true;
       this.title = "添加财务数据主";
     },
     /** 修改按钮操作 */
@@ -3239,7 +3258,7 @@ export default {
           this.queryParams = response.data.tFee;
           this.fWbuOptions = response.data.feesList;
           this.fMblnoOptions = response.data.corps;
-          this.open = true;
+          this.mainTable = true;
           this.title = "修改付费列表";
         });
       } else if (Cookies.get("sysType") == 2) {
@@ -3265,7 +3284,7 @@ export default {
           this.queryParams = response.data.tFee;
           this.fWbuOptions = response.data.feesList;
           this.fMblnoOptions = response.data.corps;
-          this.open = true;
+          this.mainTable = true;
           this.title = "修改付费列表";
         });
       }

+ 13 - 7
src/views/index.vue

@@ -49,7 +49,7 @@
                 <p>调拨</p>
               </div>
             </li>
-            <li @click="jump('/finance/charge')">
+            <li @click="jump('/finance/charge',1)">
               <div>
                 <i
                   class="el-icon-wallet"
@@ -58,7 +58,7 @@
                 <p>收款</p>
               </div>
             </li>
-            <li @click="jump('/finance/payment')">
+            <li @click="jump('/finance/payment',1)">
               <div>
                 <i
                   class="el-icon-money"
@@ -67,7 +67,7 @@
                 <p>付款</p>
               </div>
             </li>
-            <li @click="jump('/finance/contrast')">
+            <li @click="jump('/finance/contrast',1)">
               <div>
                 <i
                   class="el-icon-s-management"
@@ -897,8 +897,14 @@ export default {
         });
       }
     },
-    jump(res) {
-      this.$router.push({ path: res });
+    jump(res,key) {
+      let data = {
+        key:key
+      }
+      this.$router.push({
+        path: res,
+        query:{data:JSON.stringify(data)}
+      });
     },
     //设置单元格边框
     cellStyle({ row, column, rowIndex, columnIndex }) {
@@ -1331,8 +1337,8 @@ export default {
   align-self: center;
   p{
   display: inline-block;
-  white-space: nowrap; 
-  width: 100%; 
+  white-space: nowrap;
+  width: 100%;
   overflow: hidden;
   text-overflow:ellipsis;
   }