فهرست منبع

批量修改记账名称

lilei 11 ماه پیش
والد
کامیت
e95d297c95

+ 11 - 0
src/api/expenseManagement.js

@@ -169,6 +169,17 @@ export const expenseAcctDetailSave = (params) => {
     }
   })
 }
+// 批量保存费用明细
+export const updateBatchExpenseAcctDetail = (params) => {
+  return axios({
+    url: `/expenseAcctDetail/updateDetailByAccount`,
+    data: params,
+    method: 'post',
+    headers:{
+      'module': encodeURIComponent('批量修改记账名称')
+    }
+  })
+}
 // 费用类型
 export const expenseTypeList = (params) => {
   return axios({

+ 59 - 11
src/views/expenseManagement/expenseReimbursement/add.vue

@@ -64,6 +64,8 @@
           :rowKey="(record) => record.id"
           :columns="columns"
           :data="loadData"
+          :row-selection="{ columnWidth: 40 }"
+          @rowSelection="rowSelectionFun"
           :defaultLoadData="false"
           :showPagination="false"
           bordered>
@@ -129,6 +131,7 @@
     </div>
     <!-- 费用明细 -->
     <epenseDetailModal
+      ref="epenseDetailForm"
       :openModal="openEpenseDetailModal"
       :expenseAccountSn="$route.params.sn"
       :expenseAccountNo="detailData?detailData.expenseAccountNo:''"
@@ -162,7 +165,7 @@ import productInfoModal from './productInfoModal.vue'
 import baseDataModal from './baseDataModal.vue'
 import ImportGuideModal from './importGuideModal.vue'
 import chooseDepartUserModal from './chooseDepartUserModal.vue'
-import { expenseAccountDetail, expenseAcctDetailDelete, expenseAcctDetailFindList, expenseAccountSubmit, expenseInsertImport } from '@/api/expenseManagement.js'
+import { expenseAccountDetail, expenseAcctDetailDelete, updateBatchExpenseAcctDetail, expenseAcctDetailFindList, expenseAccountSubmit, expenseInsertImport } from '@/api/expenseManagement.js'
 export default {
   name: 'ExpenseReimbursementEdit',
   mixins: [commonMixin],
@@ -205,21 +208,23 @@ export default {
         })
       },
       columns: [
-        { title: '序号', dataIndex: 'no', width: '5%', align: 'center' },
+        { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
         { title: '记账类型', dataIndex: 'accountTypeDictValue', align: 'center', width: '8%', customRender: function (text) { return text || '--' } },
         { title: '记账名称', dataIndex: 'accountName', scopedSlots: { customRender: 'jzname' }, align: 'center', width: '10%' },
-        { title: '所属区域', dataIndex: 'subareaNames', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '所属分区', dataIndex: 'subareaAreaName', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '所属省份', dataIndex: 'provinceName', align: 'center', width: '8%', customRender: function (text) { return text || '--' } },
-        { title: '所属城市', dataIndex: 'cityName', align: 'center', width: '8%', customRender: function (text) { return text || '--' } },
-        { title: '记账费用', dataIndex: 'expense', align: 'center', width: '10%', customRender: function (text) { return (text == 0 || text) ? _this.toThousands(text) : '--' } },
+        { title: '原记账名称', dataIndex: 'origAccountName', align: 'center', width: '10%', customRender: function (text) { return text || '--' } },
+        { title: '所属区域', dataIndex: 'subareaNames', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '所属分区', dataIndex: 'subareaAreaName', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '所属省份', dataIndex: 'provinceName', align: 'center', width: '5%', customRender: function (text) { return text || '--' } },
+        { title: '所属城市', dataIndex: 'cityName', align: 'center', width: '5%', customRender: function (text) { return text || '--' } },
+        { title: '记账费用', dataIndex: 'expense', align: 'center', width: '8%', customRender: function (text) { return (text == 0 || text) ? _this.toThousands(text) : '--' } },
         { title: '费用承担方', scopedSlots: { customRender: 'fycdf' }, align: 'center', width: '15%' },
-        { title: '产品信息', scopedSlots: { customRender: 'cpxx' }, align: 'center', width: '12%' },
+        { title: '产品信息', scopedSlots: { customRender: 'cpxx' }, align: 'center', width: '10%' },
         { title: '销售单号', dataIndex: 'salesBillNo', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '备注', dataIndex: 'remarks', align: 'center', width: '10%', customRender: function (text) { return text || '--' } },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: '100px', align: 'center' }
       ],
-      isBatch: false // 是否变更记账名称
+      isBatch: false, // 是否变更记账名称
+      rowSelectionInfo: null // 批量选择的数据
     }
   },
   methods: {
@@ -227,10 +232,11 @@ export default {
     handleEditBase (event) {
       this.openBaseModal = true
     },
+    // 刷新列表
     refashData () {
       this.getDetail(true)
     },
-    //  费用单基础详情
+    //  获取费用单基础详情
     getDetail (type) {
       this.spinning = true
       this.disabled = true
@@ -248,6 +254,7 @@ export default {
         }
       })
     },
+    // 查询列表
     getExpenseDetailList () {
       this.$refs.table.refresh()
     },
@@ -261,10 +268,18 @@ export default {
     },
     // 批量修改明细
     plEdit () {
+      if (!this.rowSelectionInfo || (this.rowSelectionInfo && this.rowSelectionInfo.selectedRowKeys.length < 1)) {
+        this.$message.warning('请在列表勾选后再进行操作!')
+        return
+      }
       this.expenseAccountDetailSn = ''
       this.openEpenseDetailModal = true
       this.isBatch = true
     },
+    // 表格选中项
+    rowSelectionFun (obj) {
+      this.rowSelectionInfo = obj || null
+    },
     // 新增明细
     newExpenseDetail () {
       this.expenseAccountDetailSn = ''
@@ -280,8 +295,41 @@ export default {
       // 如果是批量修改
       if (this.isBatch) {
         console.log(data)
+        const rows = this.rowSelectionInfo && this.rowSelectionInfo.selectedRows || []
+        const params = []
+        if (rows.length) {
+          rows.forEach(item => {
+            params.push({
+              expenseAccountDetailSn: item.expenseAccountDetailSn,
+              origAccountName: item.origAccountName,
+              accountNameSn: data.accountNameSn,
+              accountType: data.accountType,
+              provinceName: data.provinceName,
+              provinceSn: data.provinceSn,
+              subareaArea: data.subareaArea,
+              cityName: data.cityName,
+              citySn: data.citySn,
+              expenseAccountNo: data.expenseAccountNo,
+              expenseAccountSn: data.expenseAccountSn
+            })
+          })
+          // 组织数据
+          updateBatchExpenseAcctDetail(params).then(res => {
+            if (res.status == 200) {
+              this.$message.success(res.message)
+              // 修改成功
+              this.epenseDetailClose()
+              this.getDetail(false)// 刷新列表
+            }
+            this.$refs.epenseDetailForm.spinning = false
+          })
+        } else {
+          this.$message.warning('请在列表勾选后再进行操作!')
+          this.$refs.epenseDetailForm.spinning = false
+        }
       } else {
-        this.openEpenseDetailModal = false
+        // 单个修改成功
+        this.epenseDetailClose()
         this.getDetail(false)// 刷新列表
       }
     },

+ 18 - 14
src/views/expenseManagement/expenseReimbursement/detail.vue

@@ -3,18 +3,19 @@
     <a-spin :spinning="spinning" tip="Loading...">
       <a-page-header :ghost="false" :backIcon="false" class="expenseManagementDetail-cont">
         <template slot="subTitle">
-          <a href="javascript:;" @click="handleBack">
+          <a href="javascript:;" @click="handleBack" id="epenseDetail-back-btn" >
             <a-icon type="left"></a-icon>
             返回列表
           </a>
           <span style="margin: 0 15px;color: #666;font-weight: bold;">单号:{{ detailData&&detailData.expenseAccountNo || '--' }}</span>
           <span style="margin: 0 10px;color: #666;">申请人:{{ detailData&&detailData.applyPersonName }}</span>
-          <a-button type="link" size="small" class="button-default" @click="showDetail=!showDetail">
+          <a-button id="epenseDetail-showDesc-btn" type="link" size="small" class="button-default" @click="showDetail=!showDetail">
             <a-icon :type="showDetail ? 'eye-invisible' : 'eye'"/> {{ showDetail?'隐藏':'查看' }}信息
           </a-button>
         </template>
         <!-- 操作区,位于 title 行的行尾 -->
         <template slot="extra">
+          <a-checkbox v-model="printRemark" id="print-remark">打印备注</a-checkbox>
           <a-button
             :disabled="detailData==null"
             key="1"
@@ -139,17 +140,18 @@ export default {
       printType: '',
       count: 0,
       columns: [
-        { title: '序号', dataIndex: 'no', width: '5%', align: 'center' },
-        { title: '记账类型', dataIndex: 'accountTypeDictValue', align: 'center', width: '8%', customRender: function (text) { return text || '--' } },
-        { title: '记账名称', dataIndex: 'accountName', scopedSlots: { customRender: 'jzname' }, align: 'center', width: '14%' },
+        { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
+        { title: '记账类型', dataIndex: 'accountTypeDictValue', align: 'center', width: '6%', customRender: function (text) { return text || '--' } },
+        { title: '记账名称', dataIndex: 'accountName', scopedSlots: { customRender: 'jzname' }, align: 'center', width: '8%' },
+        { title: '原记账名称', dataIndex: 'origAccountName', align: 'center', width: '8%', customRender: function (text) { return text || '--' } },
         { title: '所属区域', dataIndex: 'subareaNames', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '所属分区', dataIndex: 'subareaAreaName', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '所属省份', dataIndex: 'provinceName', align: 'center', width: '8%', customRender: function (text) { return text || '--' } },
-        { title: '所属城市', dataIndex: 'cityName', align: 'center', width: '8%', customRender: function (text) { return text || '--' } },
-        { title: '记账费用', dataIndex: 'expense', align: 'right', width: '8%', customRender: function (text) { return (text || text == 0) ? _this.toThousands(text) : '--' } },
-        { title: '费用承担方', scopedSlots: { customRender: 'fycdf' }, align: 'center', width: '14%' },
-        { title: '产品信息', scopedSlots: { customRender: 'cpxx' }, align: 'center', width: '12%' },
-        { title: '销售单号', dataIndex: 'salesBillNo', width: '7%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '所属省份', dataIndex: 'provinceName', align: 'center', width: '7%', customRender: function (text) { return text || '--' } },
+        { title: '所属城市', dataIndex: 'cityName', align: 'center', width: '7%', customRender: function (text) { return text || '--' } },
+        { title: '记账费用', dataIndex: 'expense', align: 'center', width: '8%', customRender: function (text) { return (text || text == 0) ? _this.toThousands(text) : '--' } },
+        { title: '费用承担方', scopedSlots: { customRender: 'fycdf' }, align: 'center', width: '12%' },
+        { title: '产品信息', scopedSlots: { customRender: 'cpxx' }, align: 'center', width: '10%' },
+        { title: '销售单号', dataIndex: 'salesBillNo', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '备注', dataIndex: 'remarks', align: 'center', width: '8%', customRender: function (text) { return text || '--' } }
       ],
       // 加载数据方法 必须为 Promise 对象
@@ -170,9 +172,9 @@ export default {
           return data
         })
       },
-      chooseLoadData: [],
-      detailData: null, //  详情数据
-      total: 0
+      detailData: null, // 详情数据
+      total: 0,
+      printRemark: false // 是否打印备注
     }
   },
   methods: {
@@ -194,6 +196,7 @@ export default {
       }
       this.$nextTick(() => {
         this.$refs.printModal.setData([{
+          printRemark: this.printRemark,
           expenseInfo: this.detailData,
           fyListData,
           spListData: spListData || []
@@ -207,6 +210,7 @@ export default {
         this.spinning = false
       })
     },
+    // 打印成功
     printOk (data) {
       if (data && data.status == 200) {
         expenseAccountUpdateBatch([{

+ 1 - 0
src/views/expenseManagement/expenseReimbursement/epenseDetailModal.vue

@@ -292,6 +292,7 @@ export default {
 
           // 如果是批量修改记账名称
           if (this.isBatch) {
+            _this.spinning = true
             _this.$emit('ok', form)
           } else {
             // 校验明细承担人列表

+ 4 - 1
src/views/expenseManagement/expenseReimbursement/list.vue

@@ -96,6 +96,7 @@
         <div class="table-operator">
           <a-button type="primary" v-if="$hasPermissions('B_eRNew')" @click="handleEdit()">新增</a-button>
           <a-button type="primary" :loading="spinning" @click="handlePlPrint()" ghost>批量打印</a-button>
+          <a-checkbox v-model="printRemark" id="print-remark">打印备注</a-checkbox>
           <span style="margin-left: 8px">
             <template v-if="rowSelectionInfo && rowSelectionInfo.selectedRowKeys.length>0">{{ `已选 ${rowSelectionInfo.selectedRowKeys.length} 项` }}</template>
           </span>
@@ -273,7 +274,8 @@ export default {
           return data
         })
       },
-      rowSelectionInfo: null // 批量选择的数据
+      rowSelectionInfo: null, // 批量选择的数据
+      printRemark: false // 是否打印备注
     }
   },
   methods: {
@@ -324,6 +326,7 @@ export default {
           businessSnList.push(rows[i].expenseAccountSn)
         }
         pageData.push({
+          printRemark: this.printRemark,
           expenseInfo: rows[i],
           fyListData: fyListData,
           spListData: []

+ 116 - 113
src/views/expenseManagement/expenseReimbursement/previewModal.vue

@@ -1,126 +1,129 @@
 <template>
-  <div class="container-print-view" 
-  style="width:100%;font-size: 12pt;height: 600px;overflow: auto;" 
+  <div
+    class="container-print-view"
+    style="width:100%;font-size: 12pt;height: 600px;overflow: auto;"
   >
-  <div class="expense-detail-print" style="width:564pt;margin:0 auto;" v-for="item in list" :key="item.expenseInfo.expenseAccountSn">
-    <div class="container-title" style="text-align: center;font-size: 24px;font-weight: 600;margin: 20px 0;">箭冠汽配企业费用报销单</div>
-    <div class="container-info" style="width:564pt;border: 1px solid #000000;">
-      <div class="container-info-basics" v-if="item.expenseInfo">
-        <div class="basics-item" style="width: 100%;border-bottom: 1px solid #000000;padding:0;margin:0;">
-          <span style="display: inline-block;width: 50%;padding: 10px;border-right: 1px solid #000000;">申请人:{{ item.expenseInfo.applyPersonName?item.expenseInfo.applyPersonName:'' }}</span>
-          <span style="display: inline-block;border-right: none;padding: 10px;">申请部门:{{ item.expenseInfo.applyDepartmentName?item.expenseInfo.applyDepartmentName:'' }}</span>
-        </div>
-        <div class="basics-item" style="width: 100%;border-bottom: 1px solid #000000;padding:0;margin:0;">
-          <span style="display: inline-block;width: 50%;padding: 10px;border-right: 1px solid #000000;">费用类型:{{ item.expenseInfo.expenseTypeName?item.expenseInfo.expenseTypeName:'' }}</span>
-          <span style="display: inline-block;border-right: none;padding: 10px;">费用发生月份:{{ item.expenseInfo.expenseDate?item.expenseInfo.expenseDate.substring(0, 7):'' }}</span>
-        </div>
-        <div class="basics-item" style="width: 100%;border-bottom: 1px solid #000000;padding:0;margin:0;">
-          <span style="display: inline-block;width: 50%;padding: 10px;border-right: 1px solid #000000;">费用单号:{{ item.expenseInfo.expenseAccountNo?item.expenseInfo.expenseAccountNo:'' }}{{ item.expenseInfo.stateDictValue?'('+item.expenseInfo.stateDictValue+')':'' }}</span>
-          <span style="display: inline-block;border-right: none;padding: 10px;">合计金额:{{ (item.expenseInfo.applyExpenseTotal ||item.expenseInfo.applyExpenseTotal==0)?item.expenseInfo.applyExpenseTotal+'元':'' }}</span>
-        </div>
-        <div class="basics-item" style="width: 100%;border-bottom: 1px solid #000000;overflow: hidden;">
-          <div style="border-right: none;float: left;padding: 10px 0 10px 10px;">主题:</div>
-          <div style="padding: 10px 10px 10px 50px;text-align: center;font-weight: bold;">
-            {{ item.expenseInfo.title?item.expenseInfo.title:'' }}
+    <div class="expense-detail-print" style="width:564pt;margin:0 auto;" v-for="item in list" :key="item.expenseInfo.expenseAccountSn">
+      <div class="container-title" style="text-align: center;font-size: 24px;font-weight: 600;margin: 20px 0;">箭冠汽配企业费用报销单</div>
+      <div class="container-info" style="width:564pt;border: 1px solid #000000;">
+        <div class="container-info-basics" v-if="item.expenseInfo">
+          <div class="basics-item" style="width: 100%;border-bottom: 1px solid #000000;padding:0;margin:0;">
+            <span style="display: inline-block;width: 50%;padding: 10px;border-right: 1px solid #000000;">申请人:{{ item.expenseInfo.applyPersonName?item.expenseInfo.applyPersonName:'' }}</span>
+            <span style="display: inline-block;border-right: none;padding: 10px;">申请部门:{{ item.expenseInfo.applyDepartmentName?item.expenseInfo.applyDepartmentName:'' }}</span>
           </div>
-        </div>
-        <div class="basics-item" style="width: 100%;border-bottom: 1px solid #000000;padding:0;margin:0;">
-          <span style="display: inline-block;width: 100%;padding: 10px 10px 5px;border-right: 1px solid #000000;border-right: none;">详细说明:</span>
-          <div style="padding:0 20px 10px 40px;">
-            <div v-for="(ditem,index) in item.expenseInfo.content" :key="index+'-content'">
-              {{ ditem || '--' }}
+          <div class="basics-item" style="width: 100%;border-bottom: 1px solid #000000;padding:0;margin:0;">
+            <span style="display: inline-block;width: 50%;padding: 10px;border-right: 1px solid #000000;">费用类型:{{ item.expenseInfo.expenseTypeName?item.expenseInfo.expenseTypeName:'' }}</span>
+            <span style="display: inline-block;border-right: none;padding: 10px;">费用发生月份:{{ item.expenseInfo.expenseDate?item.expenseInfo.expenseDate.substring(0, 7):'' }}</span>
+          </div>
+          <div class="basics-item" style="width: 100%;border-bottom: 1px solid #000000;padding:0;margin:0;">
+            <span style="display: inline-block;width: 50%;padding: 10px;border-right: 1px solid #000000;">费用单号:{{ item.expenseInfo.expenseAccountNo?item.expenseInfo.expenseAccountNo:'' }}{{ item.expenseInfo.stateDictValue?'('+item.expenseInfo.stateDictValue+')':'' }}</span>
+            <span style="display: inline-block;border-right: none;padding: 10px;">合计金额:{{ (item.expenseInfo.applyExpenseTotal ||item.expenseInfo.applyExpenseTotal==0)?item.expenseInfo.applyExpenseTotal+'元':'' }}</span>
+          </div>
+          <div class="basics-item" style="width: 100%;border-bottom: 1px solid #000000;overflow: hidden;">
+            <div style="border-right: none;float: left;padding: 10px 0 10px 10px;">主题:</div>
+            <div style="padding: 10px 10px 10px 50px;text-align: center;font-weight: bold;">
+              {{ item.expenseInfo.title?item.expenseInfo.title:'' }}
+            </div>
+          </div>
+          <div class="basics-item" style="width: 100%;border-bottom: 1px solid #000000;padding:0;margin:0;">
+            <span style="display: inline-block;width: 100%;padding: 10px 10px 5px;border-right: 1px solid #000000;border-right: none;">详细说明:</span>
+            <div style="padding:0 20px 10px 40px;">
+              <div v-for="(ditem,index) in item.expenseInfo.content" :key="index+'-content'">
+                {{ ditem || '--' }}
+              </div>
             </div>
           </div>
         </div>
-      </div>
-      <div class="container-fytable" style="padding:0 10px;" v-if="item.fyListData">
-        <div class="table-title" style="padding: 10px 0;">费用明细:</div>
-        <table
-          border="1"
-          cellspacing="0"
-          cellpadding="0"
-          style="width: 100%;border-collapse: collapse;font-size:10pt;text-align: center;"
-          align="center">
-          <thead>
-            <tr>
-              <th style="padding:5px 0;width:6%;">序号</th>
-              <th style="padding:5px 0;width:22%;">记账方</th>
-              <!-- <th style="padding:5px 0;width:15%;">区域/省/市</th> -->
-              <th style="padding:5px 0;width:10%;">记账费用</th>
-              <th style="padding:5px 0;width:30%;">费用承担方</th>
-              <th style="padding:5px 0;width:22%;">产品信息</th>
-            </tr>
-          </thead>
-          <tbody>
-            <tr v-for="(fyItem,index) in item.fyListData" :key="index">
-              <td style="text-align: center;width:6%;">{{ index+1 }}</td>
-              <td style="text-align: left;width:22%;padding:0 5px;">
-                <div>{{ fyItem.accountTypeDictValue }}</div>
-                <div>{{ fyItem.accountName||'' }}</div>
-                <div v-if="fyItem.accountNameFnumber">({{ fyItem.accountNameFnumber }})</div>
-              </td>
-              <!-- <td style="text-align: left;width:15%;padding:5px 5px;">
+        <div class="container-fytable" style="padding:0 10px;" v-if="item.fyListData">
+          <div class="table-title" style="padding: 10px 0;">费用明细:</div>
+          <table
+            border="1"
+            cellspacing="0"
+            cellpadding="0"
+            style="width: 100%;border-collapse: collapse;font-size:10pt;text-align: center;"
+            align="center">
+            <thead>
+              <tr>
+                <th style="padding:5px 0;width:6%;">序号</th>
+                <th style="padding:5px 0;width:22%;">记账方</th>
+                <!-- <th style="padding:5px 0;width:15%;">区域/省/市</th> -->
+                <th style="padding:5px 0;width:10%;">记账费用</th>
+                <th style="padding:5px 0;width:30%;">费用承担方</th>
+                <th style="padding:5px 0;width:22%;">产品信息</th>
+                <th v-if="item.printRemark">备注</th>
+              </tr>
+            </thead>
+            <tbody>
+              <tr v-for="(fyItem,index) in item.fyListData" :key="index">
+                <td style="text-align: center;width:6%;">{{ index+1 }}</td>
+                <td style="text-align: left;width:22%;padding:0 5px;">
+                  <div>{{ fyItem.accountTypeDictValue }}</div>
+                  <div>{{ fyItem.accountName||'' }}</div>
+                  <div v-if="fyItem.accountNameFnumber">({{ fyItem.accountNameFnumber }})</div>
+                </td>
+                <!-- <td style="text-align: left;width:15%;padding:5px 5px;">
                 <div>{{ fyItem.subareaNames }}</div>
                 <div>{{ fyItem.provinceName }}</div>
                 <div>{{ fyItem.cityName }}</div>
               </td> -->
-              <td style="text-align: right;width:10%;padding:0 5px;">{{ fyItem.expense||fyItem.expense==0?toThousands(fyItem.expense):'' }}</td>
-              <td style="text-align: left;width:30%;padding:0 5px;vertical-align: top;">
-                <div v-for="(ditem,index) in fyItem.detailSplitList" :key="ditem.id+'-'+index" style="padding: 3px 0;" >
-                  {{ ditem.splitObjName }}
-                  <span v-if="ditem.splitObjFnumber">({{ ditem.splitObjFnumber }})</span>
-                  <span v-if="ditem.childDetailSplit&&ditem.childDetailSplit.splitObjName">/</span>
-                  {{ ditem.childDetailSplit?ditem.childDetailSplit.splitObjName:'' }}: {{ ditem.childDetailSplit?toThousands(ditem.childDetailSplit.splitAmount):toThousands(ditem.splitAmount) }}
-                </div>
-              </td>
-              <td style="text-align: left;width:22%;padding:0 5px;vertical-align: top;">
-                <div v-for="ditem in fyItem.detailProductsList" :key="ditem.id" style="padding: 3px 0;">
-                  <div v-if="ditem.productCode">{{ ditem.productCode }}: {{ toThousands(ditem.expense) }}</div>
-                  <div v-else-if="ditem.productBrandName">{{ ditem.productBrandName }}<span v-if="ditem.productTypeShowName">/</span>{{ ditem.productTypeShowName }}: {{ toThousands(ditem.expense) }}</div>
-                  <div v-else>{{ ditem.productTypeShowName }}: {{ toThousands(ditem.expense) }}</div>
-                </div>
-              </td>
-            </tr>
-          </tbody>
-        </table>
-      </div>
-      <div class="container-fytable" style="padding:0 10px 5px;" v-if="item.spListData&&item.spListData.length">
-        <p class="table-title">审批信息:</p>
-        <table
-          border="1"
-          cellspacing="0"
-          cellpadding="0"
-          style="width: 100%;border-collapse: collapse;border: 1px solid black;font-size:10pt;text-align: center;"
-          align="center">
-          <thead>
-            <tr style="height: 30px;padding: 5px;">
-              <th style="padding:5px 0;width:8%;">序号</th>
-              <th style="padding:5px 0;width:15%;">人员姓名</th>
-              <th style="padding:5px 0;width:15%;">人员类型</th>
-              <th style="padding:5px 0;width:10%;">状态</th>
-              <th style="padding:5px 0;width:17%;">审批意见</th>
-              <th style="padding:5px 0;width:15%;">附件</th>
-              <th style="padding:5px 0;width:20%;">时间</th>
-            </tr>
-          </thead>
-          <tbody>
-            <tr style="height: 30px;padding: 5px;" v-for="(spitem,index) in item.spListData" :key="index">
-              <td style="padding:5px 0;">{{ index+1||'' }}</td>
-              <td style="padding:5px 0;">{{ spitem.userName||'' }}</td>
-              <td style="padding:5px 0;">{{ spitem.userType||'' }}</td>
-              <td style="padding:5px 0;">{{ spitem.state||'' }}</td>
-              <td style="padding:5px 0;">{{ spitem.remark||'' }}</td>
-              <td style="padding:5px 0;">{{ spitem.hasAttachments!= '0' ? '请在钉钉中查看附件内容' : '--' }}</td>
-              <td style="padding:5px 0;">{{ spitem.date||'' }}</td>
-            </tr></tbody>
-        </table>
-      </div>
-      <div class="container-fytable" style="padding:0 10px;" v-else>
-        <p class="table-title">审批信息:暂无</p>
+                <td style="text-align: right;width:10%;padding:0 5px;">{{ fyItem.expense||fyItem.expense==0?toThousands(fyItem.expense):'' }}</td>
+                <td style="text-align: left;width:30%;padding:0 5px;vertical-align: top;">
+                  <div v-for="(ditem,index) in fyItem.detailSplitList" :key="ditem.id+'-'+index" style="padding: 3px 0;" >
+                    {{ ditem.splitObjName }}
+                    <span v-if="ditem.splitObjFnumber">({{ ditem.splitObjFnumber }})</span>
+                    <span v-if="ditem.childDetailSplit&&ditem.childDetailSplit.splitObjName">/</span>
+                    {{ ditem.childDetailSplit?ditem.childDetailSplit.splitObjName:'' }}: {{ ditem.childDetailSplit?toThousands(ditem.childDetailSplit.splitAmount):toThousands(ditem.splitAmount) }}
+                  </div>
+                </td>
+                <td style="text-align: left;width:22%;padding:0 5px;vertical-align: top;">
+                  <div v-for="ditem in fyItem.detailProductsList" :key="ditem.id" style="padding: 3px 0;">
+                    <div v-if="ditem.productCode">{{ ditem.productCode }}: {{ toThousands(ditem.expense) }}</div>
+                    <div v-else-if="ditem.productBrandName">{{ ditem.productBrandName }}<span v-if="ditem.productTypeShowName">/</span>{{ ditem.productTypeShowName }}: {{ toThousands(ditem.expense) }}</div>
+                    <div v-else>{{ ditem.productTypeShowName }}: {{ toThousands(ditem.expense) }}</div>
+                  </div>
+                </td>
+                <td v-if="item.printRemark">{{ fyItem.remarks }}</td>
+              </tr>
+            </tbody>
+          </table>
+        </div>
+        <div class="container-fytable" style="padding:0 10px 5px;" v-if="item.spListData&&item.spListData.length">
+          <p class="table-title">审批信息:</p>
+          <table
+            border="1"
+            cellspacing="0"
+            cellpadding="0"
+            style="width: 100%;border-collapse: collapse;border: 1px solid black;font-size:10pt;text-align: center;"
+            align="center">
+            <thead>
+              <tr style="height: 30px;padding: 5px;">
+                <th style="padding:5px 0;width:8%;">序号</th>
+                <th style="padding:5px 0;width:15%;">人员姓名</th>
+                <th style="padding:5px 0;width:15%;">人员类型</th>
+                <th style="padding:5px 0;width:10%;">状态</th>
+                <th style="padding:5px 0;width:17%;">审批意见</th>
+                <th style="padding:5px 0;width:15%;">附件</th>
+                <th style="padding:5px 0;width:20%;">时间</th>
+              </tr>
+            </thead>
+            <tbody>
+              <tr style="height: 30px;padding: 5px;" v-for="(spitem,index) in item.spListData" :key="index">
+                <td style="padding:5px 0;">{{ index+1||'' }}</td>
+                <td style="padding:5px 0;">{{ spitem.userName||'' }}</td>
+                <td style="padding:5px 0;">{{ spitem.userType||'' }}</td>
+                <td style="padding:5px 0;">{{ spitem.state||'' }}</td>
+                <td style="padding:5px 0;">{{ spitem.remark||'' }}</td>
+                <td style="padding:5px 0;">{{ spitem.hasAttachments!= '0' ? '请在钉钉中查看附件内容' : '--' }}</td>
+                <td style="padding:5px 0;">{{ spitem.date||'' }}</td>
+              </tr></tbody>
+          </table>
+        </div>
+        <div class="container-fytable" style="padding:0 10px;" v-else>
+          <p class="table-title">审批信息:暂无</p>
+        </div>
       </div>
     </div>
   </div>
-  </div>
 </template>
 
 <script>
@@ -140,17 +143,17 @@ export default {
       this.list = list
     },
     // 打印
-    prints(){
+    prints () {
       const _this = this
       const html = document.getElementsByClassName('expense-detail-print')
       // 自动排版
-      const result = groupLessThan(html,true)
+      const result = groupLessThan(html, true)
       this.$store.state.app.curActionPermission = 'B_eRPrint'
       // html, type, callback, printLogParams
       jGPlPrint(result, 'print', function (res) {
         _this.$store.state.app.curActionPermission = ''
         _this.$emit('printOk', res)
-      },null,'费用报销单')
+      }, null, '费用报销单')
     }
   }
 }

+ 2 - 2
vue.config.js

@@ -108,9 +108,9 @@ const vueConfig = {
     // If you want to turn on the proxy, please remosve the mockjs /src/main.jsL11
     proxy: {
       '/api': {
-        // target: 'http://192.168.2.117/ocs-admin',
+        target: 'http://192.168.2.113:8660/ocs-admin',
         // target: 'https://t.ocs.360arrow.com/ocs-admin', //  练习
-        target: 'https://p.ocs.360arrow.com/ocs-admin', //  预发布
+        // target: 'https://p.ocs.360arrow.com/ocs-admin', //  预发布
         ws: false,
         changeOrigin: true,
         pathRewrite: {