Qukatie 1 rok pred
rodič
commit
4939107b27

+ 404 - 258
src/views/costManagement/index.vue

@@ -1,33 +1,12 @@
 <template>
 <template>
   <div>
   <div>
     <div v-if="pageDisplay" class="app-container">
     <div v-if="pageDisplay" class="app-container">
-      <formComponent
-        v-if="searchWhether"
-        :formOption="formOption"
-        :dataList="dataList"
-        :inDex="inDex"
-        ref="avatar"
-        @submitForm="submitForm"
-        @returnToForm="returnToForm"
-      />
-      <listComponent
-        :tableData="tableData"
-        @selectionbox="selectionbox"
-        @see="viewMethod"
-        @modify="modification"
-        @deletion="deletion"
-        @buttonList="buttonList"
-        @showSearch="showSearch"
-        @feedback="feedback"
-        @getList="getList"
-        :tatolLabel="['金额合计']"
-        :hasPermi="hasPermi"
-        :isItHidden="isItHidden"
-        :customButton="customButton"
-        :listStyle="listStyle"
-        :queryList="queryList"
-        :setRowList="setRowList"
-      />
+      <formComponent v-if="searchWhether" :formOption="formOption" :dataList="dataList" :inDex="inDex" ref="avatar"
+        @submitForm="submitForm" @returnToForm="returnToForm" />
+      <listComponent :tableData="tableData" @selectionbox="selectionbox" @see="viewMethod" @modify="modification"
+        @deletion="deletion" @buttonList="buttonList" @showSearch="showSearch" @feedback="feedback" @getList="getList"
+        :tatolLabel="['金额合计']" :hasPermi="hasPermi" :isItHidden="isItHidden" :customButton="customButton"
+        :listStyle="listStyle" :queryList="queryList" :setRowList="setRowList" />
       <!--      <el-pagination-->
       <!--      <el-pagination-->
       <!--        style="float: right;margin-top: 10px"-->
       <!--        style="float: right;margin-top: 10px"-->
       <!--        @size-change="handleSizeChange"-->
       <!--        @size-change="handleSizeChange"-->
@@ -39,26 +18,15 @@
       <!--        :total="total">-->
       <!--        :total="total">-->
       <!--      </el-pagination>-->
       <!--      </el-pagination>-->
       <div style="float: right;margin-bottom: 10px">
       <div style="float: right;margin-bottom: 10px">
-        <pagination
-          v-show="total > 0"
-          :total="total"
-          :page.sync="formDataList.pageNum"
-          :limit.sync="formDataList.pageSize"
-          :page-sizes="[10,100,200,500,1000]"
-          @pagination="feedback('搜索')"
-        />
+        <pagination v-show="total > 0" :total="total" :page.sync="formDataList.pageNum"
+          :limit.sync="formDataList.pageSize" :page-sizes="[10, 100, 200, 500, 1000]" @pagination="feedback('搜索')" />
       </div>
       </div>
     </div>
     </div>
     <div v-else class="app-container">
     <div v-else class="app-container">
       <div style="display: flex;margin-bottom: 10px">
       <div style="display: flex;margin-bottom: 10px">
         <el-breadcrumb>
         <el-breadcrumb>
           <el-breadcrumb-item>
           <el-breadcrumb-item>
-            <el-button
-              size="mini"
-              type="danger" plain
-              @click="backToList"
-              icon="el-icon-arrow-left"
-            >
+            <el-button size="mini" type="danger" plain @click="backToList" icon="el-icon-arrow-left">
               返回列表
               返回列表
             </el-button>
             </el-button>
           </el-breadcrumb-item>
           </el-breadcrumb-item>
@@ -71,41 +39,14 @@
         </el-breadcrumb>
         </el-breadcrumb>
       </div>
       </div>
       <h1 style="text-align: center;margin-top: -42px">费用管理</h1>
       <h1 style="text-align: center;margin-top: -42px">费用管理</h1>
-      <formComponent
-        v-if="searchWhether"
-        :formOption="contentOption"
-        :dataList="dataList"
-        :inDex="inDex"
-        ref="avatar"
-        @writeOff="writeOff"
-        @submitForm="submitForm"
-        @returnToForm="returnToForm"
-        @submitAndSave="submitAndSave"
-        @selectTrigger="selectTrigger"
-      />
-      <listComponent
-        ref="listComponent"
-        :tableData="contentList"
-        @selectionbox="selectionbox"
-        @see="viewMethod"
-        @modify="modification"
-        @deletion="deletion"
-        @buttonList="buttonList"
-        @showSearch="showSearch"
-        @feedback="feedback"
-        @getList="getList"
-        @deletRows="deletRows"
-        @totalAmount="totalAmount"
-        @change="change"
-        :hasPermi="hasPermi"
-        :tatolLabel="tatolLabel"
-        :isItHidden="isItHidden"
-        :customButton="contentButton"
-        :listStyle="contentStyle"
-        :queryList="purchaseList"
-        :setRowList="setRowList"
-        :listData="listData"
-      />
+      <formComponent v-if="searchWhether" :formOption="contentOption" :dataList="dataList" :inDex="inDex" ref="avatar"
+        @writeOff="writeOff" @submitForm="submitForm" @returnToForm="returnToForm" @submitAndSave="submitAndSave"
+        @selectTrigger="selectTrigger" />
+      <listComponent ref="listComponent" :tableData="contentList" @selectionbox="selectionbox" @see="viewMethod"
+        @modify="modification" @deletion="deletion" @buttonList="buttonList" @showSearch="showSearch" @feedback="feedback"
+        @getList="getList" @deletRows="deletRows" @totalAmount="totalAmount" @change="change" :hasPermi="hasPermi"
+        :tatolLabel="tatolLabel" :isItHidden="isItHidden" :customButton="contentButton" :listStyle="contentStyle"
+        :queryList="purchaseList" :setRowList="setRowList" :listData="listData" />
       <el-collapse>
       <el-collapse>
         <el-collapse-item title="附件管理" name="1">
         <el-collapse-item title="附件管理" name="1">
           <div style="padding-right: 10px">
           <div style="padding-right: 10px">
@@ -114,23 +55,10 @@
         </el-collapse-item>
         </el-collapse-item>
       </el-collapse>
       </el-collapse>
     </div>
     </div>
-    <add-or-update
-      v-if="addOrUpdateVisible"
-      ref="addOrUpdate"
-      @refreshDataList="getDataList"
-    ></add-or-update>
-    <approval-comments
-      v-if="addOrUpdateVisib"
-      ref="ApprovalComments"
-      @refreshDataList="returnData"
-    ></approval-comments>
-    <el-dialog
-      :title="`打印${reverse}`"
-      :visible.sync="dialogVisible"
-      :fullscreen="true"
-      style="padding: 0;margin:0"
-      width="70%"
-    >
+    <add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
+    <approval-comments v-if="addOrUpdateVisib" ref="ApprovalComments" @refreshDataList="returnData"></approval-comments>
+    <el-dialog :title="`打印${reverse}`" :visible.sync="dialogVisible" :fullscreen="true" style="padding: 0;margin:0"
+      width="70%">
       <div ref="print">
       <div ref="print">
         <div style="margin-bottom: 5px">
         <div style="margin-bottom: 5px">
           标题切换:
           标题切换:
@@ -186,7 +114,7 @@
             <td class="column" style="border-top: none;width: 9.5%;">物料</td>
             <td class="column" style="border-top: none;width: 9.5%;">物料</td>
             <td class="column" style="border-top: none;width: 19%;" colspan="2">备注</td>
             <td class="column" style="border-top: none;width: 19%;" colspan="2">备注</td>
           </tr>
           </tr>
-          <tr v-for="(item,index) in contentList" :key="index">
+          <tr v-for="(item, index) in contentList" :key="index">
             <td class="column">{{ Number(index) + 1 }}</td>
             <td class="column">{{ Number(index) + 1 }}</td>
             <td class="column">{{ item.expenseName }}</td>
             <td class="column">{{ item.expenseName }}</td>
             <td class="column">{{ item.amount ? Number(item.amount).toFixed(2) : item.amount }}</td>
             <td class="column">{{ item.amount ? Number(item.amount).toFixed(2) : item.amount }}</td>
@@ -237,6 +165,107 @@
         <el-button type="primary" @click="Printing">打印</el-button>
         <el-button type="primary" @click="Printing">打印</el-button>
       </span>
       </span>
     </el-dialog>
     </el-dialog>
+    <el-dialog title="事务申请单" :visible.sync="dialogVisibleSW" :fullscreen="true" style="padding: 0;margin:0" width="70%">
+      <div ref="print">
+        <table class="table table-striped table-bordered" align="center" valign="center">
+
+          <tr>
+            <td colspan="6"></td>
+            <td colspan="2">打印次数:{{ formList.printTime + 1 }}</td>
+            <td colspan="4">打印日期:{{ formList.printDate }}</td>
+          </tr>
+          <tr>
+            <td style="font-size: 24px;font-weight:bold" class="column" colspan="11">事务申请单</td>
+          </tr>
+          <tr>
+            <td class="column" style="width: 6%;">部门</td>
+            <td class="column" colspan="2" style="width: 19%;">{{ formList.deptName }}</td>
+            <td class="column" style="width: 9%;">报销方式</td>
+            <td class="column" style="width: 9%;">{{ formList.expenseTypeName }}</td>
+            <td class="column" style="width: 9.5%;">业务类型</td>
+            <td class="column" style="width: 9.5%;">{{ formList.businessTypeName }}</td>
+            <td class="column" style="width: 9.5%;">制单人</td>
+            <td class="column" style="width: 9.5%;">{{ formList.createBy }}</td>
+            <td class="column" style="width: 9.5%;">制单日期</td>
+            <td class="column" style="width: 9.5%;">{{ formList.createTime ? formList.createTime.slice(0, 10) : '' }}
+            </td>
+          </tr>
+          <tr>
+            <td class="column">户头</td>
+            <td class="column" colspan="3">{{ formList.account }}</td>
+            <td class="column">开户行</td>
+            <td class="column" colspan="3">{{ formList.openingBank }}</td>
+            <td class="column">账号</td>
+            <td class="column" colspan="2">{{ formList.openingBankAccount }}</td>
+          </tr>
+          <tr>
+            <td class="column">备注</td>
+            <td class="column" colspan="7" style="text-align: left">{{ formList.remark }}</td>
+            <td class="column">付款人</td>
+            <td class="column" colspan="2">{{ formList.payerName }}</td>
+          </tr>
+        </table>
+        <table class="table table-striped table-bordered" align="center" valign="center">
+          <tr>
+            <td class="column" style="border-top: none;width: 6%">序号</td>
+            <td class="column" style="border-top: none;width: 9.5%;">费用名称</td>
+            <td class="column" style="border-top: none;width: 9.5%;">金额</td>
+            <td class="column" style="border-top: none;width: 18%;">项目</td>
+            <td class="column" style="border-top: none;width: 9.5%;">所属人员</td>
+            <td class="column" style="border-top: none;width: 19%;" colspan="2">所属部门</td>
+            <td class="column" style="border-top: none;width: 9.5%;">物料</td>
+            <td class="column" style="border-top: none;width: 19%;" colspan="2">备注</td>
+          </tr>
+          <tr v-for="(item, index) in contentList" :key="index">
+            <td class="column">{{ Number(index) + 1 }}</td>
+            <td class="column">{{ item.expenseName }}</td>
+            <td class="column">{{ item.amount ? Number(item.amount).toFixed(2) : item.amount }}</td>
+            <td class="column">{{ item.belongsProjectName }}</td>
+            <td class="column">{{ item.personnelName }}</td>
+            <td class="column" colspan="2">{{ item.departmentName }}</td>
+            <td class="column">{{ item.matterName }}</td>
+            <td class="column" colspan="2">{{ item.remark }}</td>
+          </tr>
+          <tr>
+            <td class="column" colspan="2" style="width: 15.5%;border-top: none">金额合计(小写):</td>
+            <td class="column" colspan="2" style="text-align: left;border-top: none;">
+              {{ formList.totalAmount ? formList.totalAmount.toFixed(2) : '' }}
+            </td>
+            <td class="column" colspan="3" style="width: 15%;border-top: none">金额合计(大写):</td>
+            <td class="column" colspan="3" style="text-align: left;border-top: none;">
+              {{ formList.totalAmount ? dealBigMoney(formList.totalAmount) : '' }}
+            </td>
+          </tr>
+        </table>
+        <table class="table table-striped table-bordered" align="center" valign="center">
+          <tr>
+            <td class="column" style="width: 15%;border: none">制单人:{{ formList.createBy}}</td>
+            <td class="column" colspan="8" style="text-align: left;border: none;width: 10%"></td>
+            <!-- <td class="column" style="width: 15%;border: none">财务主管:{{ formList.firstLevelReviewerName }}</td> -->
+            <!-- <td class="column" colspan="2" style="text-align: left;border: none;width: 10%"></td> -->
+            <!-- <td class="column" style="width: 15%;border: none">财务经理:{{ formList.secondaryReviewerName }}</td> -->
+            <!-- <td class="column" colspan="2" style="text-align: left;border: none;width: 10%"></td> -->
+            <td class="column" style="text-align: left;border: none;width: 15%">总经理:</td>
+            <td class="column" colspan="2" style="text-align: left;border: none;width: 10%"></td>
+          </tr>
+          <tr>
+            <td class="column" style="width: 15%;border: none"></td>
+            <td class="column" colspan="2" style="text-align: left;border: none;width: 10%"></td>
+            <td class="column" style="width: 15%;border: none"></td>
+            <td class="column" colspan="2" style="text-align: left;border: none;width: 10%"></td>
+            <td class="column" style="width: 15%;border: none"></td>
+            <td class="column" colspan="2" style="text-align: left;border: none;width: 10%"></td>
+            <td class="column" style="text-align: left;border: none;width: 10%"></td>
+            <!-- <td class="column" style="text-align: left;border: none;width: 15%">领款人:</td> -->
+            <td class="column" style="text-align: left;border: none;width: 10%"></td>
+          </tr>
+        </table>
+      </div>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="dialogVisibleSW = false">取 消</el-button>
+        <el-button type="primary" @click="Printing">打印</el-button>
+      </span>
+    </el-dialog>
   </div>
   </div>
 </template>
 </template>
 <script>
 <script>
@@ -269,8 +298,8 @@ import cUpload from '@/components/cUpload/index.vue'
 
 
 import { setPrintTime } from '@/api/costManagement/index'
 import { setPrintTime } from '@/api/costManagement/index'
 
 
-import { company as clientCompany} from '@/api/purchaseIssue/index'
-
+import { company as clientCompany } from '@/api/purchaseIssue/index'
+// import { company, queryItem } from '@/api/purchaseIssue'
 
 
 export default {
 export default {
   name: 'index',
   name: 'index',
@@ -303,6 +332,7 @@ export default {
       formList: {},
       formList: {},
       tatolLabel: ['金额'],
       tatolLabel: ['金额'],
       dialogVisible: false,
       dialogVisible: false,
+      dialogVisibleSW: false,
       listData: {
       listData: {
         itemExpenseId: [],
         itemExpenseId: [],
         businessType: [],
         businessType: [],
@@ -328,7 +358,9 @@ export default {
         createById: [],
         createById: [],
         itemDepartment: [],
         itemDepartment: [],
         itemBelongsProjectId: [],
         itemBelongsProjectId: [],
-        openingBankAccount: []
+        account: [],
+        payerId: [],
+        reimburserId: []
       },
       },
       tEnclosure: [],
       tEnclosure: [],
       contentList: [],
       contentList: [],
@@ -421,6 +453,14 @@ export default {
         },
         },
         {
         {
           surface: '8',
           surface: '8',
+          label: 'payerName',
+          name: '付款人',
+          checked: 0,
+          width: 100,
+          onabort: ''
+        },
+        {
+          surface: '8',
           label: 'remark',
           label: 'remark',
           name: '备注',
           name: '备注',
           checked: 0,
           checked: 0,
@@ -684,113 +724,120 @@ export default {
           name: '查看审批',
           name: '查看审批',
           disabled: false
           disabled: false
         }
         }
+        , {
+          type: 'info',
+          size: 'mini',
+          icon: 'el-icon-edit-outline',
+          name: '事务申请单',
+          disabled: false
+        }
       ],
       ],
       formOption: [{
       formOption: [{
-          span: 6,
-          label: 'businessTimeList',
-          name: '业务日期',
-          inputType: 3,
-          width: 300,
-          labelSize: '80',
-          rules: [{ required: false, message: ' ' }]
-        },
-        {
-          span: 6,
-          label: 'businessType',
-          name: '业务类型',
-          inputType: 1,
-          width: 200,
-          labelSize: '80',
-          rules: [{ required: false, message: ' ' }]
-        },
-        {
-          span: 6,
-          label: 'expenseType',
-          name: '报销方式',
-          inputType: 1,
-          width: 200,
-          labelSize: '80',
-          rules: [{ required: false, message: ' ' }]
-        },
-        {
-          span: 6,
-          label: 'itemExpenseId',
-          name: '费用名称',
-          inputType: 1,
-          width: 200,
-          labelSize: '80',
-          rules: [{ required: false, message: ' ' }]
-        },
+        span: 6,
+        label: 'businessTimeList',
+        name: '业务日期',
+        inputType: 3,
+        width: 300,
+        labelSize: '80',
+        rules: [{ required: false, message: ' ' }]
+      },
+      {
+        span: 6,
+        label: 'businessType',
+        name: '业务类型',
+        inputType: 1,
+        width: 200,
+        labelSize: '80',
+        rules: [{ required: false, message: ' ' }]
+      },
+      {
+        span: 6,
+        label: 'expenseType',
+        name: '报销方式',
+        inputType: 1,
+        width: 200,
+        labelSize: '80',
+        rules: [{ required: false, message: ' ' }]
+      },
+      {
+        span: 6,
+        label: 'itemExpenseId',
+        name: '费用名称',
+        inputType: 1,
+        width: 200,
+        labelSize: '80',
+        rules: [{ required: false, message: ' ' }]
+      },
 
 
 
 
-        {
-          span: 6,
-          label: 'deptId',
-          name: '部门',
-          inputType: 8,
-          width: 200,
-          labelSize: '80',
-          rules: [{ required: false, message: ' ' }]
-        },
+      {
+        span: 6,
+        label: 'deptId',
+        name: '部门',
+        inputType: 8,
+        width: 200,
+        labelSize: '80',
+        rules: [{ required: false, message: ' ' }]
+      },
 
 
-        {
-          span: 6,
-          label: 'createDept',
-          name: '制单部门',
-          inputType: 1,
-          width: 200,
-          labelSize: '80',
-          rules: [{ required: false, message: ' ' }]
-        }, {
-          span: 6,
-          label: 'createById',
-          name: '制单人',
-          inputType: 1,
-          width: 200,
-          labelSize: '80',
-          rules: [{ required: false, message: ' ' }]
-        }, {
-          span: 6,
-          label: 'itemBelongsProjectId',
-          name: '项目',
-          inputType: 1,
-          width: 200,
-          labelSize: '80',
-          rules: [{ required: false, message: ' ' }]
-        },
-        {
-          span: 6,
-          label: 'itemDepartment',
-          name: '所属部门',
-          inputType: 1,
-          width: 200,
-          labelSize: '80',
-          rules: [{ required: false, message: ' ' }]
-        }, {
-          span: 6,
-          label: 'itemPersonnel',
-          name: '所属人员',
-          inputType: 1,
-          width: 200,
-          labelSize: '80',
-          rules: [{ required: false, message: ' ' }]
-        }, {
-          span: 6,
-          label: 'itemMatterName',
-          name: '物料',
-          inputType: 2,
-          width: 200,
-          labelSize: '80',
-          rules: [{ required: false, message: ' ' }]
-        }, {
-          span: 6,
-          label: 'remark',
-          name: '备注',
-          inputType: 4,
-          width: 200,
-          labelSize: '80',
-          rules: [{ required: false, message: ' ' }]
-        }
+      {
+        span: 6,
+        label: 'createDept',
+        name: '制单部门',
+        inputType: 1,
+        width: 200,
+        labelSize: '80',
+        rules: [{ required: false, message: ' ' }]
+      }, {
+        span: 6,
+        label: 'createById',
+        name: '制单人',
+        inputType: 1,
+        width: 200,
+        labelSize: '80',
+        rules: [{ required: false, message: ' ' }]
+      }, {
+        span: 6,
+        label: 'itemBelongsProjectId',
+        name: '项目',
+        inputType: 1,
+        width: 200,
+        labelSize: '80',
+        rules: [{ required: false, message: ' ' }]
+      },
+      {
+        span: 6,
+        label: 'itemDepartment',
+        name: '所属部门',
+        inputType: 1,
+        width: 200,
+        labelSize: '80',
+        rules: [{ required: false, message: ' ' }]
+      }, {
+        span: 6,
+        label: 'itemPersonnel',
+        name: '所属人员',
+        inputType: 1,
+        width: 200,
+        labelSize: '80',
+        rules: [{ required: false, message: ' ' }]
+      }, {
+        span: 6,
+        label: 'itemMatterName',
+        name: '物料',
+        inputType: 2,
+        width: 200,
+        labelSize: '80',
+        rules: [{ required: false, message: ' ' }]
+      }, {
+        span: 6,
+        label: 'remark',
+        name: '备注',
+        inputType: 4,
+        width: 200,
+        labelSize: '80',
+        rules: [{ required: false, message: ' ' }]
+      }
       ],
       ],
       contentOption: [
       contentOption: [
         {
         {
@@ -883,12 +930,13 @@ export default {
         {
         {
           index: '9',
           index: '9',
           span: 6,
           span: 6,
-          label: 'reimburser',
+          label: 'reimburserId',
           name: '报销人',
           name: '报销人',
-          inputType: 2,
+          inputType: 1,
           width: 200,
           width: 200,
           labelSize: '80',
           labelSize: '80',
-          disabled: true
+          disabled: true,
+          rules: [{ required: true, message: ' ' }]
         },
         },
         {
         {
           index: '9',
           index: '9',
@@ -899,18 +947,27 @@ export default {
           width: 200,
           width: 200,
           disabled: true,
           disabled: true,
           labelSize: '80'
           labelSize: '80'
+        },
+        {
+          index: '10',
+          span: 6,
+          label: 'payerId',
+          name: '付款人',
+          inputType: 1,
+          width: 200,
+          disabled: true,
+          labelSize: '80'
         }
         }
       ],
       ],
       pushList: [{
       pushList: [{
-        index: '10',
+        index: '12',
         span: 6,
         span: 6,
-        label: 'openingBankAccount',
-        name: '账号',
+        label: 'account',
+        name: '户头',
         inputType: 1,
         inputType: 1,
         width: 200,
         width: 200,
         disabled: false,
         disabled: false,
         labelSize: '80'
         labelSize: '80'
-
       }, {
       }, {
         index: '11',
         index: '11',
         span: 6,
         span: 6,
@@ -921,14 +978,15 @@ export default {
         disabled: false,
         disabled: false,
         labelSize: '80'
         labelSize: '80'
       }, {
       }, {
-        index: '12',
+        index: '10',
         span: 6,
         span: 6,
-        label: 'account',
-        name: '户头',
+        label: 'openingBankAccount',
+        name: '账号',
         inputType: 2,
         inputType: 2,
         width: 200,
         width: 200,
         disabled: false,
         disabled: false,
         labelSize: '80'
         labelSize: '80'
+
       }],
       }],
       pendingPage: ''
       pendingPage: ''
     }
     }
@@ -955,6 +1013,15 @@ export default {
     treeselect().then(response => {
     treeselect().then(response => {
       this.dataList.deptId = response.data
       this.dataList.deptId = response.data
     })
     })
+    company(3).then(res => {
+      this.dataList.payerId = []
+      for (let item in res.data) {
+        this.dataList.payerId.push({
+          label: res.data[item].fName,
+          value: res.data[item].fId
+        })
+      }
+    })
     listDept().then(res => {
     listDept().then(res => {
       for (let item in res.data) {
       for (let item in res.data) {
         this.listData.departmentId.push({
         this.listData.departmentId.push({
@@ -985,6 +1052,12 @@ export default {
           label: res.rows[item].userName,
           label: res.rows[item].userName,
           value: res.rows[item].userId
           value: res.rows[item].userId
         })
         })
+        this.dataList.reimburserId.push({
+          label: res.rows[item].userName,
+          value: res.rows[item].userId,
+          deptId: res.rows[item].deptId,
+          deptName: res.rows[item].deptName,
+        })
       }
       }
     })
     })
     corpsList({ fTypeid: 205 }).then(res => {
     corpsList({ fTypeid: 205 }).then(res => {
@@ -1030,12 +1103,16 @@ export default {
 
 
     clientCompany(6).then(res => {
     clientCompany(6).then(res => {
       for (var item in res.data) {
       for (var item in res.data) {
-        this.dataList.openingBankAccount.push({
-          label: res.data[item].fBankno,
-          value: res.data[item].fBankno,
+        if(res.data[item].accountTitle){
+          this.dataList.account.push({
+          label: res.data[item].accountTitle,
+          value: res.data[item].accountTitle,
           id: res.data[item].fId,
           id: res.data[item].fId,
-          data: res.data[item]
+          fBankname: res.data[item].fBankname,
+          fBankno: res.data[item].fBankno,
         })
         })
+        }
+
       }
       }
 
 
       console.log(res.data, 123321)
       console.log(res.data, 123321)
@@ -1190,7 +1267,7 @@ export default {
     },
     },
     //查询主页列数据
     //查询主页列数据
     query(data) {
     query(data) {
-      console.log(data,1157)
+      console.log(data, 1157)
       listQuery(data).then(res => {
       listQuery(data).then(res => {
         this.tableData = res.rows
         this.tableData = res.rows
         this.total = res.total
         this.total = res.total
@@ -1200,9 +1277,9 @@ export default {
     },
     },
     //查询列数据
     //查询列数据
     getRow(data, list, add, i) {
     getRow(data, list, add, i) {
-      console.log(data, list, add,i,1167)
-      console.log(this.contentOption,1168)
-      console.log(this.pushList,1169)
+      console.log(data, list, add, i, 1167)
+      console.log(this.contentOption, 1168)
+      console.log(this.pushList, 1169)
       for (let item in this.contentOption) {
       for (let item in this.contentOption) {
         for (let li in this.pushList) {
         for (let li in this.pushList) {
           if (this.contentOption[item].label === this.pushList[li].label) {
           if (this.contentOption[item].label === this.pushList[li].label) {
@@ -1253,7 +1330,7 @@ export default {
           this.$refs.avatar.form = list.tCostManagement
           this.$refs.avatar.form = list.tCostManagement
           this.contentList = list.tCostManagementItem
           this.contentList = list.tCostManagementItem
           this.contentButton = this.$options.data().contentButton
           this.contentButton = this.$options.data().contentButton
-          console.log(this.contentList,1220)
+          console.log(this.contentList, 1220)
           this.tEnclosure = list.tEnclosure
           this.tEnclosure = list.tEnclosure
           if (this.pendingPage.name) {
           if (this.pendingPage.name) {
             this.contentButton.push(JSON.parse(this.$route.query.list))
             this.contentButton.push(JSON.parse(this.$route.query.list))
@@ -1349,6 +1426,9 @@ export default {
                 item.disabled = true
                 item.disabled = true
               }
               }
             }
             }
+            if (item.name == '事务申请单') {
+              item.disabled = false
+            }
           })
           })
         }
         }
         if (i == 1) this.submitAnd()
         if (i == 1) this.submitAnd()
@@ -1359,7 +1439,7 @@ export default {
     },
     },
     //查看-列表
     //查看-列表
     viewMethod(scope, res, i) {
     viewMethod(scope, res, i) {
-      console.log(scope,res,i,1324)
+      console.log(scope, res, i, 1324)
       if (res) {
       if (res) {
         this.contentButton.forEach(item => {
         this.contentButton.forEach(item => {
           item.disabled = false
           item.disabled = false
@@ -1582,11 +1662,25 @@ export default {
     //表单选中后触发
     //表单选中后触发
     selectTrigger(name, list, id) {
     selectTrigger(name, list, id) {
       console.log(name, list, id)
       console.log(name, list, id)
-      if (name == 'openingBankAccount') {
-        for (const data of this.dataList.openingBankAccount) {
+      if (name == 'account') {
+        for (const data of this.dataList.account) {
           if (data.value == id) {
           if (data.value == id) {
-            this.$refs.avatar.form.openingBank = data.data.fBankname
-            this.$refs.avatar.form.account = data.data.accountTitle
+            this.$refs.avatar.form.openingBank = data.fBankname
+            this.$refs.avatar.form.openingBankAccount = data.fBankno
+          }
+        }
+      }
+      if (name == 'reimburserId') {
+        for (let item in list) {
+          if (list[item].value == id) {
+            this.$refs.avatar.form.reimburser = list[item].label
+          }
+        }
+      }
+      if (name == 'payerId') {
+        for (let item in list) {
+          if (list[item].value == id) {
+            this.$refs.avatar.form.payerName = list[item].label
           }
           }
         }
         }
       }
       }
@@ -1623,8 +1717,8 @@ export default {
     Printing() {
     Printing() {
       // 添加打印次数
       // 添加打印次数
       let data = {
       let data = {
-        id : this.formList.fId + '',
-        printDate : this.formList.printDate
+        id: this.formList.fId + '',
+        printDate: this.formList.printDate
       };
       };
       setPrintTime(data).then(res => {
       setPrintTime(data).then(res => {
         if (res.code === 200) {
         if (res.code === 200) {
@@ -1724,26 +1818,26 @@ export default {
         case '导出包含明细':
         case '导出包含明细':
           const exportData = this.formDataList;
           const exportData = this.formDataList;
           this.$confirm('是否确认导出所有导出包含明细数据项?', "警告", {
           this.$confirm('是否确认导出所有导出包含明细数据项?', "警告", {
-              confirmButtonText: "确定",
-              cancelButtonText: "取消",
-              type: "warning"
-            }).then(function() {
-              return exportContact(exportData);
-            }).then(response => {
-              this.download(response.msg);
-            })
+            confirmButtonText: "确定",
+            cancelButtonText: "取消",
+            type: "warning"
+          }).then(function () {
+            return exportContact(exportData);
+          }).then(response => {
+            this.download(response.msg);
+          })
           break
           break
         case '导出':
         case '导出':
           const exportAll = this.formDataList;
           const exportAll = this.formDataList;
           this.$confirm('是否确认导出所有数据项?', "警告", {
           this.$confirm('是否确认导出所有数据项?', "警告", {
-              confirmButtonText: "确定",
-              cancelButtonText: "取消",
-              type: "warning"
-            }).then(function() {
-              return exportAllContact(exportAll);
-            }).then(response => {
-              this.download(response.msg);
-            })
+            confirmButtonText: "确定",
+            cancelButtonText: "取消",
+            type: "warning"
+          }).then(function () {
+            return exportAllContact(exportAll);
+          }).then(response => {
+            this.download(response.msg);
+          })
           break
           break
         case '打印':
         case '打印':
           if (Number(this.$refs.avatar.form.fStatus) >= 3) {
           if (Number(this.$refs.avatar.form.fStatus) >= 3) {
@@ -1840,20 +1934,73 @@ export default {
           })
           })
           break
           break
         case '录入明细':
         case '录入明细':
-          this.contentList.push({
-            fFeeid: '',
-            fPurchase: '',
-            fFeeunitid: '',
-            fStltypeid: '',
-            remark: '',
-            createTime: 0,
-            fAmount: 0,
-            fQty: 0,
-            fUnitprice: 0,
-            createBy: Cookies.get('userName'),
-            fReviewDate: '',
-            operation: ''
-          })
+          if (!this.$refs.avatar.form.reimburserId) {
+            this.contentList.push({
+              fFeeid: '',
+              fPurchase: '',
+              fFeeunitid: '',
+              fStltypeid: '',
+              remark: '',
+              createTime: 0,
+              fAmount: 0,
+              fQty: 0,
+              fUnitprice: 0,
+              createBy: Cookies.get('userName'),
+              fReviewDate: '',
+              operation: '',
+            })
+            break
+          } else {
+            this.dataList.reimburserId.forEach(e => {
+              if (this.$refs.avatar.form.reimburserId == e.value) {
+                this.contentList.push({
+                  fFeeid: '',
+                  fPurchase: '',
+                  fFeeunitid: '',
+                  fStltypeid: '',
+                  remark: '',
+                  createTime: 0,
+                  fAmount: 0,
+                  fQty: 0,
+                  fUnitprice: 0,
+                  createBy: Cookies.get('userName'),
+                  fReviewDate: '',
+                  operation: '',
+                  personnelId: e.value,
+                  departmentId: e.deptId
+                })
+              }
+            })
+            break
+          }
+        case '事务申请单':
+          if (!this.contentList || this.contentList.length == 0) {
+            return this.$message.error('明细不能为空')
+          }
+          for (let item in this.contentList) {
+            for (let li in this.listData.fFeeid) {
+              if (this.contentList[item].fFeeid == this.listData.fFeeid[li].value) {
+                this.contentList[item].feeName = this.listData.fFeeid[li].label
+              }
+            }
+            for (let i in this.listData.fFeeunitid) {
+              if (this.contentList[item].fFeeunitid == this.listData.fFeeunitid[i].value) {
+                this.contentList[item].fFeeunitName = this.listData.fFeeunitid[i].label
+              }
+            }
+          }
+          if (!this.$refs.avatar.form.fId) {
+            this.$message.error('未保存,不允许打印')
+          } else {
+            this.formList = this.$refs.avatar.form
+
+            this.formList.firstLevelReviewerName = this.treasurer
+            this.formList.secondaryReviewerName = this.financeManager
+
+            let printDate = new Date();
+            this.formList.printDate = printDate.toLocaleString();
+            this.dialogVisibleSW = true
+          }
           break
           break
         case '查看审批':
         case '查看审批':
           this.addOrUpdateHandle()
           this.addOrUpdateHandle()
@@ -1869,7 +2016,7 @@ export default {
           }
           }
           break
           break
         case '复制新单':
         case '复制新单':
-          console.log(row,1829)
+          console.log(row, 1829)
           if (row.nameTwo === '详情页') {
           if (row.nameTwo === '详情页') {
             this.$refs.avatar.submitForm('submit', 3)
             this.$refs.avatar.submitForm('submit', 3)
           } else {
           } else {
@@ -2082,7 +2229,6 @@ export default {
 </script>
 </script>
 
 
 <style scoped>
 <style scoped>
-
 .table {
 .table {
   border-collapse: collapse;
   border-collapse: collapse;
   border-spacing: 0;
   border-spacing: 0;
@@ -2105,7 +2251,7 @@ export default {
   border: 1px solid #000;
   border: 1px solid #000;
 }
 }
 
 
-.app-container >>> .el-form-item {
+.app-container>>>.el-form-item {
   margin-bottom: 0;
   margin-bottom: 0;
 }
 }
 </style>
 </style>

+ 1 - 1
src/views/purchaseIssue/index.vue

@@ -549,7 +549,7 @@ export default {
   name: "index",
   name: "index",
   data() {
   data() {
     return {
     return {
-      reverse: '出库单',
+      reverse: '送货单',
       form: {},
       form: {},
       before: "",
       before: "",
       hasPermi: {
       hasPermi: {