shenji пре 2 година
родитељ
комит
5a0a4eff0d

+ 125 - 12
src/views/oa/AssetInDetailList.vue

@@ -105,7 +105,7 @@
         ref="table"
         size="middle"
         bordered
-        rowKey="id"
+        rowKey="cdAssetInId"
         :columns="columns"
         :dataSource="dataSource"
         :pagination="ipagination"
@@ -163,6 +163,7 @@
   import { JeecgListMixin } from '@/mixins/JeecgListMixin'
   import AssetInDetailModal from './modules/AssetInDetailModal'
   import AssetInModal from './modules/AssetInModal'
+  import { getAction } from '@api/manage'
 
   export default {
     name: "AssetInDetailList",
@@ -173,7 +174,7 @@
     },
     data () {
       return {
-        description: '固定资产入库明细管理页面',
+        description: '固定资产入库管理页面',
         // 表头
         columns: [
           {
@@ -182,8 +183,13 @@
             key:'rowIndex',
             width:60,
             align:"center",
-            customRender:function (t,r,index) {
-              return parseInt(index)+1;
+            customRender: (value, row, index) => {
+              const obj = {
+                children: parseInt(index)+1,
+                attrs: {},
+              };
+              obj.attrs.rowSpan = this.myArray[index];
+              return obj
             }
           },
           {
@@ -275,33 +281,72 @@
           {
             title:'入库人',
             align:"center",
-            dataIndex: 'operator'
+            dataIndex: 'operator',
+            customRender: (value, row, index) => {
+              const obj = {
+                children: value,
+                attrs: {},
+              };
+              obj.attrs.rowSpan = this.myArray[index];
+              return obj
+            }
           },
           {
             title:'入库部门',
             align:"center",
-            dataIndex: 'operatorDept'
+            dataIndex: 'operatorDept',
+            customRender: (value, row, index) => {
+              const obj = {
+                children: value,
+                attrs: {},
+              };
+              obj.attrs.rowSpan = this.myArray[index];
+              return obj
+            }
           },
           {
             title:'入库日期',
             align:"center",
-            dataIndex: 'operatorDate'
+            dataIndex: 'operatorDate',
+            customRender: (value, row, index) => {
+              const obj = {
+                children: value,
+                attrs: {},
+              };
+              obj.attrs.rowSpan = this.myArray[index];
+              return obj
+            }
           },
           {
             title: '操作',
             dataIndex: 'action',
             align:"center",
-            scopedSlots: { customRender: 'action' }
+            customRender: (value, row, index) => {
+              const obj = {
+                children:
+                  (
+                  <span>
+                  <a id="btn"  onClick={() => this.handleEdit(row.cdAssetInId)}>编辑   </a>
+                    <a-divider type="vertical" />
+                    <a-popconfirm title="确定删除吗?" onConfirm={() => this.handleDelete(row.cdAssetInId)} placement="topRight">
+                         <a>删除</a>
+                       </a-popconfirm>
+                    </span> ),
+                attrs: {},
+              };
+              obj.attrs.rowSpan = this.myArray[index];
+              return obj
+            }
           }
         ],
         url: {
           list: "/oa/assetInDetail/list",
-          delete: "/oa/assetInDetail/delete",
-          deleteBatch: "/oa/assetInDetail/deleteBatch",
-          exportXlsUrl: "/oa/assetInDetail/exportXls",
-          importExcelUrl: "oa/assetInDetail/importExcel",
+          delete: "/oa/assetIn/delete",
+          deleteBatch: "/oa/assetIn/deleteBatch",
+          queryById: "/oa/assetIn/queryById",
         },
         dictOptions:{},
+        myArray:[],
       }
     },
     computed: {
@@ -318,6 +363,74 @@
         this.$refs.multiAddModalForm.disableSubmit = false;
         this.$refs.multiAddModalForm.init();
       },
+      loadData(arg) {
+        if(!this.url.list){
+          this.$message.error("请设置url.list属性!")
+          return
+        }
+        //加载数据 若传入参数1则加载第一页的内容
+        if (arg === 1) {
+          this.ipagination.current = 1;
+        }
+        var params = this.getQueryParams();//查询条件
+        this.loading = true;
+        getAction(this.url.list, params).then((res) => {
+          if (res.success) {
+            this.dataSource = res.result.records;
+            this.setRowSpan(this.dataSource)
+            this.ipagination.total = res.result.total;
+          }
+          if(res.code===510){
+            this.$message.warning(res.message)
+          }
+          this.loading = false;
+        })
+      },
+      // 设置每一行的rowSpan
+      setRowSpan(data){
+        //保存上一个name
+        var x = "";
+        //相同name出现的次数
+        var count = 0;
+        //该name第一次出现的位置
+        var startindex=0;
+        for(var i = 0;i<data.length;i++){
+          console.log(data[i].cdAssetInId);
+          //这里是合并name列,根据各自情况大家可以自己完善
+          var val = data[(i)].cdAssetInId;
+          if(i==0){
+            x=val;
+            count=1;
+            this.myArray[0]=1
+          }else{
+            if(val==x){
+              count++;
+              this.myArray[startindex]=count;
+              this.myArray[i]=0
+            }else{
+              count = 1;
+              x=val;
+              startindex=i;
+              this.myArray[i]=1
+            }
+          }
+        }
+        console.log(this.myArray);
+      },
+      handleEdit: function (id) {
+        getAction(this.url.queryById, {id:id}).then((res) => {
+          if (res.success) {
+            let record = res.result;
+            this.$refs.multiAddModalForm.edit(record);
+            this.$refs.multiAddModalForm.title = "编辑";
+            this.$refs.multiAddModalForm.disableSubmit = false;
+          }
+          if(res.code===510){
+            this.$message.warning(res.message)
+          }
+          this.loading = false;
+        })
+      },
     }
   }
 </script>

+ 136 - 48
src/views/oa/CarfareDetailList.vue

@@ -65,10 +65,10 @@
     <!-- 操作按钮区域 -->
     <div class="table-operator">
       <a-button @click="handleMultiAdd" type="primary" icon="plus">新增</a-button>
-      <a-button type="primary" icon="download" @click="handleExportXls('车辆费用报销明细')">导出</a-button>
+      <!-- <a-button type="primary" icon="download" @click="handleExportXls('车辆费用报销明细')">导出</a-button>
       <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
         <a-button type="primary" icon="import">导入</a-button>
-      </a-upload>
+      </a-upload> -->
       <a-dropdown v-if="selectedRowKeys.length > 0">
         <a-menu slot="overlay">
           <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
@@ -88,7 +88,7 @@
         ref="table"
         size="middle"
         bordered
-        rowKey="id"
+        rowKey="cdCarfareId"
         :columns="columns"
         :dataSource="dataSource"
         :pagination="ipagination"
@@ -147,6 +147,7 @@
   import CarfareDetailModal from './modules/CarfareDetailModal'
   import CarfareModal from './modules/CarfareModal'
   import JDate from '@/components/jeecg/JDate'  
+  import { getAction } from '@api/manage'
 
   export default {
     name: "CarfareDetailList",
@@ -167,24 +168,53 @@
             key:'rowIndex',
             width:60,
             align:"center",
-            customRender:function (t,r,index) {
-              return parseInt(index)+1;
+            customRender: (value, row, index) => {
+              const obj = {
+                children: parseInt(index)+1,
+                attrs: {},
+              };
+              obj.attrs.rowSpan = this.myArray[index];
+              return obj
             }
           },
           {
-            title:'报销日期',
+            title:'登记人',
             align:"center",
-            dataIndex: 'reimbursementDate'
+            dataIndex: 'registrant',
+            customRender: (value, row, index) => {
+              const obj = {
+                children: value,
+                attrs: {},
+              };
+              obj.attrs.rowSpan = this.myArray[index];
+              return obj
+            }
           },
           {
-            title:'支付凭证编号',
+            title:'登记部门',
             align:"center",
-            dataIndex: 'paymentNo'
+            dataIndex: 'registrantDept',
+            customRender: (value, row, index) => {
+              const obj = {
+                children: value,
+                attrs: {},
+              };
+              obj.attrs.rowSpan = this.myArray[index];
+              return obj
+            }
           },
           {
-            title:'车牌号',
+            title:'财务经办人',
             align:"center",
-            dataIndex: 'carNo'
+            dataIndex: 'financeOperator',
+            customRender: (value, row, index) => {
+              const obj = {
+                children: value,
+                attrs: {},
+              };
+              obj.attrs.rowSpan = this.myArray[index];
+              return obj
+            }
           },
           {
             title:'报销人',
@@ -197,9 +227,9 @@
             dataIndex: 'dept'
           },
           {
-            title:'报销内容',
+            title:'报销日期',
             align:"center",
-            dataIndex: 'content'
+            dataIndex: 'reimbursementDate'
           },
           {
             title:'金额',
@@ -207,56 +237,45 @@
             dataIndex: 'amount'
           },
           {
-            title:'附件',
-            align:"center",
-            dataIndex: 'attachment',
-            scopedSlots: {customRender: 'fileSlot'}
-          },
-          {
-            title:'备注',
-            align:"center",
-            dataIndex: 'remark'
-          },
-          {
-            title:'登记人',
-            align:"center",
-            dataIndex: 'registrant'
-          },
-          {
-            title:'登记部门',
-            align:"center",
-            dataIndex: 'registrantDept'
-          },
-          {
-            title:'财务经办人',
-            align:"center",
-            dataIndex: 'financeOperator'
-          },
-          {
-            title:'财务经办部门',
+            title:'支付凭证编号',
             align:"center",
-            dataIndex: 'financeDept'
+            dataIndex: 'paymentNo'
           },
           {
-            title:'财务负责人',
+            title:'车牌号',
             align:"center",
-            dataIndex: 'financeHead'
+            dataIndex: 'carNo'
           },
           {
             title: '操作',
             dataIndex: 'action',
             align:"center",
-            scopedSlots: { customRender: 'action' }
+            customRender: (value, row, index) => {
+              const obj = {
+                children:
+                  (
+                  <span>
+                  <a id="btn"  onClick={() => this.handleEdit(row.cdCarfareId)}>编辑   </a>
+                    <a-divider type="vertical" />
+                    <a-popconfirm title="确定删除吗?" onConfirm={() => this.handleDelete(row.cdCarfareId)} placement="topRight">
+                         <a>删除</a>
+                       </a-popconfirm>
+                    </span> ),
+                attrs: {},
+              };
+              obj.attrs.rowSpan = this.myArray[index];
+              return obj
+            }
           }
         ],
         url: {
           list: "/oa/carfareDetail/list",
-          delete: "/oa/carfareDetail/delete",
-          deleteBatch: "/oa/carfareDetail/deleteBatch",
-          exportXlsUrl: "/oa/carfareDetail/exportXls",
-          importExcelUrl: "oa/carfareDetail/importExcel",
+          delete: "/oa/carfare/delete",
+          deleteBatch: "/oa/carfare/deleteBatch",
+          queryById: "/oa/carfare/queryById",
         },
         dictOptions:{},
+        myArray:[],
       }
     },
     computed: {
@@ -271,6 +290,75 @@
         this.$refs.multiAddModalForm.add();
         this.$refs.multiAddModalForm.title = "新增";
         this.$refs.multiAddModalForm.disableSubmit = false;
+        this.$refs.multiAddModalForm.initFinanceManager();
+      },
+      loadData(arg) {
+        if(!this.url.list){
+          this.$message.error("请设置url.list属性!")
+          return
+        }
+        //加载数据 若传入参数1则加载第一页的内容
+        if (arg === 1) {
+          this.ipagination.current = 1;
+        }
+        var params = this.getQueryParams();//查询条件
+        this.loading = true;
+        getAction(this.url.list, params).then((res) => {
+          if (res.success) {
+            this.dataSource = res.result.records;
+            this.setRowSpan(this.dataSource)
+            this.ipagination.total = res.result.total;
+          }
+          if(res.code===510){
+            this.$message.warning(res.message)
+          }
+          this.loading = false;
+        })
+      },
+      // 设置每一行的rowSpan
+      setRowSpan(data){
+        //保存上一个name
+        var x = "";
+        //相同name出现的次数
+        var count = 0;
+        //该name第一次出现的位置
+        var startindex=0;
+        for(var i = 0;i<data.length;i++){
+          console.log(data[i].cdCarfareId);
+          //这里是合并name列,根据各自情况大家可以自己完善
+          var val = data[(i)].cdCarfareId;
+          if(i==0){
+            x=val;
+            count=1;
+            this.myArray[0]=1
+          }else{
+            if(val==x){
+              count++;
+              this.myArray[startindex]=count;
+              this.myArray[i]=0
+            }else{
+              count = 1;
+              x=val;
+              startindex=i;
+              this.myArray[i]=1
+            }
+          }
+        }
+        console.log(this.myArray);
+      },
+      handleEdit: function (id) {
+        getAction(this.url.queryById, {id:id}).then((res) => {
+          if (res.success) {
+            let record = res.result;
+            this.$refs.multiAddModalForm.edit(record);
+            this.$refs.multiAddModalForm.title = "编辑";
+            this.$refs.multiAddModalForm.disableSubmit = false;
+          }
+          if(res.code===510){
+            this.$message.warning(res.message)
+          }
+          this.loading = false;
+        })
       },
     }
   }

+ 123 - 13
src/views/oa/MaterialInDetailList.vue

@@ -83,7 +83,7 @@
         ref="table"
         size="middle"
         bordered
-        rowKey="id"
+        rowKey="cdMaterialInId"
         :columns="columns"
         :dataSource="dataSource"
         :pagination="ipagination"
@@ -142,6 +142,7 @@
   import MaterialInDetailModal from './modules/MaterialInDetailModal'
   import MaterialInModal from './modules/MaterialInModal'
   import JDate from '@/components/jeecg/JDate.vue'
+  import { getAction } from '@api/manage'
 
   export default {
     name: "MaterialInDetailList",
@@ -153,7 +154,7 @@
     },
     data () {
       return {
-        description: '物料入库明细管理页面',
+        description: '物料入库管理页面',
         // 表头
         columns: [
           {
@@ -162,8 +163,13 @@
             key:'rowIndex',
             width:60,
             align:"center",
-            customRender:function (t,r,index) {
-              return parseInt(index)+1;
+            customRender: (value, row, index) => {
+              const obj = {
+                children: parseInt(index)+1,
+                attrs: {},
+              };
+              obj.attrs.rowSpan = this.myArray[index];
+              return obj
             }
           },
           {
@@ -199,36 +205,72 @@
           {
             title:'入库人',
             align:"center",
-            dataIndex: 'operator'
+            dataIndex: 'operator',
+            customRender: (value, row, index) => {
+              const obj = {
+                children: value,
+                attrs: {},
+              };
+              obj.attrs.rowSpan = this.myArray[index];
+              return obj
+            }
           },
           {
             title:'入库部门',
             align:"center",
-            dataIndex: 'operatorDept'
+            dataIndex: 'operatorDept',
+            customRender: (value, row, index) => {
+              const obj = {
+                children: value,
+                attrs: {},
+              };
+              obj.attrs.rowSpan = this.myArray[index];
+              return obj
+            }
           },
           {
             title:'入库日期',
             align:"center",
             dataIndex: 'operateDate',
-            customRender:function (text) {
-              return !text?"":(text.length>10?text.substr(0,10):text)
+            customRender: (value, row, index) => {
+              const obj = {
+                children: !value?"":(value.length>10?value.substr(0,10):value),
+                attrs: {},
+              };
+              obj.attrs.rowSpan = this.myArray[index];
+              return obj
             }
           },
           {
             title: '操作',
             dataIndex: 'action',
             align:"center",
-            scopedSlots: { customRender: 'action' }
+            customRender: (value, row, index) => {
+              const obj = {
+                children:
+                  (
+                  <span>
+                  <a id="btn"  onClick={() => this.handleEdit(row.cdMaterialInId)}>编辑   </a>
+                    <a-divider type="vertical" />
+                    <a-popconfirm title="确定删除吗?" onConfirm={() => this.handleDelete(row.cdMaterialInId)} placement="topRight">
+                         <a>删除</a>
+                       </a-popconfirm>
+                    </span> ),
+                attrs: {},
+              };
+              obj.attrs.rowSpan = this.myArray[index];
+              return obj
+            }
           }
         ],
         url: {
           list: "/oa/materialInDetail/list",
-          delete: "/oa/materialInDetail/delete",
-          deleteBatch: "/oa/materialInDetail/deleteBatch",
-          exportXlsUrl: "/oa/materialInDetail/exportXls",
-          importExcelUrl: "oa/materialInDetail/importExcel",
+          delete: "/oa/materialIn/delete",
+          deleteBatch: "/oa/materialIn/deleteBatch",
+          queryById: "/oa/materialIn/queryById",
         },
         dictOptions:{},
+        myArray:[],
       }
     },
     computed: {
@@ -244,6 +286,74 @@
         this.$refs.multiAddModalForm.title = "新增";
         this.$refs.multiAddModalForm.disableSubmit = false;
       },
+      loadData(arg) {
+        if(!this.url.list){
+          this.$message.error("请设置url.list属性!")
+          return
+        }
+        //加载数据 若传入参数1则加载第一页的内容
+        if (arg === 1) {
+          this.ipagination.current = 1;
+        }
+        var params = this.getQueryParams();//查询条件
+        this.loading = true;
+        getAction(this.url.list, params).then((res) => {
+          if (res.success) {
+            this.dataSource = res.result.records;
+            this.setRowSpan(this.dataSource)
+            this.ipagination.total = res.result.total;
+          }
+          if(res.code===510){
+            this.$message.warning(res.message)
+          }
+          this.loading = false;
+        })
+      },
+      // 设置每一行的rowSpan
+      setRowSpan(data){
+        //保存上一个name
+        var x = "";
+        //相同name出现的次数
+        var count = 0;
+        //该name第一次出现的位置
+        var startindex=0;
+        for(var i = 0;i<data.length;i++){
+          console.log(data[i].cdMaterialInId);
+          //这里是合并name列,根据各自情况大家可以自己完善
+          var val = data[(i)].cdMaterialInId;
+          if(i==0){
+            x=val;
+            count=1;
+            this.myArray[0]=1
+          }else{
+            if(val==x){
+              count++;
+              this.myArray[startindex]=count;
+              this.myArray[i]=0
+            }else{
+              count = 1;
+              x=val;
+              startindex=i;
+              this.myArray[i]=1
+            }
+          }
+        }
+        console.log(this.myArray);
+      },
+      handleEdit: function (id) {
+        getAction(this.url.queryById, {id:id}).then((res) => {
+          if (res.success) {
+            let record = res.result;
+            this.$refs.multiAddModalForm.edit(record);
+            this.$refs.multiAddModalForm.title = "编辑";
+            this.$refs.multiAddModalForm.disableSubmit = false;
+          }
+          if(res.code===510){
+            this.$message.warning(res.message)
+          }
+          this.loading = false;
+        })
+      },
     }
   }
 </script>

+ 8 - 4
src/views/oa/modules/AssetInModal.vue

@@ -34,7 +34,7 @@
           </a-col>
           <a-col :span="8">
             <a-form-item label="创建时间" :labelCol="labelCol" :wrapperCol="wrapperCol">
-              <j-date placeholder="请选择创建时间" v-decorator="[ 'createDate']" :trigger-change="true" style="width: 100%" disabled/>
+              <j-date placeholder="请选择创建时间" v-decorator="[ 'createDate']" :showTime="true" dateFormat="YYYY-MM-DD HH:mm:ss" :trigger-change="true" style="width: 100%" disabled/>
             </a-form-item>
           </a-col>
           <a-col :span="8">
@@ -55,7 +55,7 @@
           </a-col>
           <a-col :span="8">
             <a-form-item label="入库日期" :labelCol="labelCol" :wrapperCol="wrapperCol">
-              <j-date placeholder="请选择入库日期" v-decorator="[ 'operatorDate', validatorRules.operatorDate]" :trigger-change="true" style="width: 100%"/>
+              <j-date placeholder="请选择入库日期" v-decorator="[ 'operatorDate', validatorRules.operatorDate]" :showTime="true" dateFormat="YYYY-MM-DD HH:mm:ss" :trigger-change="true" style="width: 100%"/>
             </a-form-item>
           </a-col>
 
@@ -216,6 +216,9 @@
               width:"200px",
               placeholder: '请输入${title}',
               defaultValue: '',
+              validateRules: [
+                { pattern: /^\d+(\.\d{1,2})?$/, message: '请输入金额(保留两位小数)' },
+              ]
             },
             {
               title: '使用年限',
@@ -275,7 +278,8 @@
               type: FormTypes.input,
               width:"200px",
               placeholder: '请输入${title}',
-              defaultValue: '',
+              defaultValue: '闲置',
+              disabled:true
             },
             {
               title: '备注',
@@ -314,7 +318,7 @@
           this.form.setFieldsValue({
               creater: this.$store.getters.userInfo.realname,
               createrDept: this.$store.getters.userInfo.deptName,
-              createDate: moment().format('YYYY-MM-DD')
+              createDate: moment().format('YYYY-MM-DD HH:mm:ss')
           })
         })
       },

+ 6 - 1
src/views/oa/modules/AssetModal.vue

@@ -29,7 +29,12 @@
           <a-input v-decorator="[ 'userDept', validatorRules.userDept]" placeholder="请输入使用部门"></a-input>
         </a-form-item>
         <a-form-item label="资产状态" :labelCol="labelCol" :wrapperCol="wrapperCol">
-          <a-input v-decorator="[ 'state', validatorRules.state]" placeholder="请输入资产状态"></a-input>
+          <a-select  v-decorator="[ 'state', validatorRules.state]">
+            <a-select-option value="正在使用">正在使用</a-select-option>
+            <a-select-option value="闲置">闲置</a-select-option>
+            <a-select-option value="报废">报废</a-select-option>
+            <a-select-option value="报损">报损</a-select-option>
+          </a-select>
         </a-form-item>
 
       </a-form>

+ 40 - 4
src/views/oa/modules/CarfareModal.vue

@@ -31,7 +31,7 @@
           </a-col>
           <a-col :span="8">
             <a-form-item label="报销总额" :labelCol="labelCol" :wrapperCol="wrapperCol">
-              <a-input-number v-decorator="[ 'totalAmount', validatorRules.totalAmount]" placeholder="请输入报销总额" style="width: 100%"/>
+              <a-input-number v-decorator="[ 'totalAmount', validatorRules.totalAmount]" placeholder="请输入报销总额" style="width: 100%" disabled/>
             </a-form-item>
           </a-col>
           <a-col :span="8">
@@ -53,7 +53,7 @@
           </a-col>
           <a-col :span="8">
             <a-form-item label="财务负责人" :labelCol="labelCol" :wrapperCol="wrapperCol">
-              <a-input v-decorator="[ 'financeHead', validatorRules.financeHead]" placeholder="请输入财务负责人"></a-input>
+              <a-input v-decorator="[ 'financeHead', validatorRules.financeHead]" placeholder="请输入财务负责人" disabled></a-input>
             </a-form-item>
           </a-col>
 
@@ -71,7 +71,9 @@
             :maxHeight="300"
             :rowNumber="true"
             :rowSelection="true"
-            :actionButton="true"/>
+            :actionButton="true"
+            @valueChange="calculateTotal"
+            />
         </a-tab-pane>
         
       </a-tabs>
@@ -82,6 +84,7 @@
 
 <script>
 
+  import { httpAction, getAction } from '@/api/manage'
   import pick from 'lodash.pick'
   import { FormTypes,getRefPromise } from '@/utils/JEditableTableUtil'
   import { JEditableTableMixin } from '@/mixins/JEditableTableMixin'
@@ -115,7 +118,7 @@
           registrantDept: {rules: [
           ]},
           totalAmount: {rules: [
-            {required: true, message: '请输入报销总额!'},
+            {required: true, message: '请填写完整报销明细!'},
           ]},
           financeOperator: {rules: [
             {required: true, message: '请选择财务经办人!'},
@@ -193,6 +196,9 @@
               width:"200px",
               placeholder: '请输入${title}',
               defaultValue: '',
+              validateRules: [
+                { pattern: /^\d+(\.\d{1,2})?$/, message: '请输入金额(保留两位小数)' },
+              ]
             },
             {
               title: '附件',
@@ -220,6 +226,9 @@
           carfareDetail: {
             list: '/oa/carfare/queryCarfareDetailByMainId'
           },
+          user:{
+            queryFinanceManager: '/sys/user/queryFinanceManager'
+          }
         }
       }
     },
@@ -255,7 +264,34 @@
      popupCallback(row){
        this.form.setFieldsValue(pick(row,'registrant','registrantDept','totalAmount','financeOperator','financeDept','financeHead'))
      },
+     initFinanceManager(){
+      
+      getAction(this.url.user.queryFinanceManager, { position: '财务经理' }).then((res) => {
+        if (res.success) {
+          this.$nextTick(() => {
+            this.form.setFieldsValue({
+                financeHead: res.result.realname,
+            })
+          })
+        }
+      })
+     },
+     calculateTotal({ type, row, column, value, target }){
+      if(column.key == 'amount'){
+        this.$refs.carfareDetail.getValues((error, values) => {
+          let totalAmount = 0
+          totalAmount = values.map(v=>{
+            return Number(v.amount || 0)
+          }).reduce((sum,v)=>{
+            return sum+v
+          },0)
+          this.form.setFieldsValue({
+            totalAmount: totalAmount.toFixed(2),
+          })
+        })
+      }
 
+     }
     }
   }
 </script>