فهرست منبع

提成发放暂存

qymljy 1 سال پیش
والد
کامیت
c1c3d791fe

+ 10 - 3
src/Form/commissionDistribution/add.vue

@@ -10,13 +10,13 @@
         @close="onClose">
       <div class="drawer__panel">
         <el-row :gutter="20">
-          <el-form :model="form" :rules="rules" ref="formRef" label-width="120px" label-position="right" size="mini">
+          <el-form :model="form" :rules="rules" ref="formRef" label-width="120px" label-position="left" size="mini">
             <el-col :span="24">
               <el-form-item label="请选择收入凭证:" >
               </el-form-item>
              </el-col>
             <el-col :span="24">
-                <tableNewLayout ref="tableRef" :checkbox="true" :layout="tablecols" :data="list" :opwidth="200" height="400px" :width="true" :custom="true" @selectionChange="selectionChange">
+                <tableNewLayout style="margin-bottom: 20px" ref="tableRef" :checkbox="true" :layout="tablecols" :data="list" :opwidth="200" height="400px" :width="true" :custom="true" @selectionChange="selectionChange">
                   <template v-slot:customcol="scope">
                     <div>
                       {{scope.column.data[[scope.column.columnname]] || scope.column.columnname === 'operation'?scope.column.data[[scope.column.columnname]]:'--'}}
@@ -24,6 +24,13 @@
                   </template>
                 </tableNewLayout>
             </el-col>
+            <el-col :span="24">
+              <el-form-item label="备注:" prop="remarks">
+              </el-form-item>
+            </el-col>
+            <el-col :span="24">
+              <el-input v-model="form.remarks" type="textarea" rows="5" placeholder="请输入备注信息"></el-input>
+            </el-col>
           </el-form>
         </el-row>
       </div>
@@ -54,7 +61,7 @@ export default {
       param:{
         "id": 20240117140304,
         "content": {
-          "sa_hrpayapplyid":4,
+          "sa_hrpayapplyid":'',
           "pageNumber": 1,
           "pageSize": 999,
           "where":{

+ 80 - 2
src/Form/commissionDistribution/edit.vue

@@ -1,10 +1,88 @@
 <template>
-
+  <div>
+    <el-button size="small" type="primary"  @click="dialogVisible = true;listData()">编 辑</el-button>
+    <el-drawer
+        title="编辑提成发放清单"
+        :visible.sync="dialogVisible"
+        size="700px"
+        direction="rtl"
+        append-to-body
+        @close="onClose">
+      <div class="drawer__panel">
+        <el-row :gutter="20">
+          <el-form :model="form" :rules="rules" ref="formRef" label-width="120px" label-position="left" size="mini">
+            <el-col :span="24">
+              <el-form-item label="备注:" prop="remarks">
+              </el-form-item>
+            </el-col>
+            <el-col :span="24">
+              <el-input v-model="form.remarks" type="textarea" rows="5" placeholder="请输入备注信息"></el-input>
+            </el-col>
+          </el-form>
+        </el-row>
+      </div>
+      <div class="fixed__btn__panel">
+        <el-button size="small" @click="onClose" class="normal-btn-width">取 消</el-button>
+        <el-button size="small" type="primary"  @click="onSubmit" class="normal-btn-width">确 定</el-button>
+      </div>
+    </el-drawer>
+  </div>
 </template>
 
 <script>
 export default {
-  name: "edit"
+  name: "edit",
+  props:["data"],
+  data(){
+    return {
+      dialogVisible:false,
+      tablecols:[],
+      list:[],
+      form:{
+        "sa_hrpayapplyid":0,
+        "billdate": new Date().getFullYear() + '-' + (new Date().getMonth() + 1) + '-' + new Date().getDate(),
+        "billno":"",
+        "remarks":"",
+        "hrpayapplydetail": []
+      },
+      rules:{},
+    }
+  },
+  methods:{
+    async listData(){
+      const res = await this.$api.requested(this.param)
+      this.list = res.data
+    },
+    selectionChange(row){
+      this.form.hrpayapplydetail = row.map(item=>{
+        return {
+          "sa_hrpayapplydetailid": 0,
+          "remarks": item.remarks,
+          "sa_hrcashbillid": item.sa_hrcashbillid
+        }
+      })
+    },
+    async onSubmit(){
+      const res = await this.$api.requested({
+        "id": "20240117105204",
+        "content": this.form
+      })
+      this.tool.showMessage(res,()=>{
+        this.dialogVisible = false
+        this.$emit('onSuccess')
+      })
+    },
+    onClose(){
+      this.dialogVisible = false
+      this.form = {
+        "sa_hrpayapplyid":0,
+        "billdate": '',
+        "billno":"",
+        "remarks":"",
+        "hrpayapplydetail": []
+      }
+    }
+  },
 }
 </script>
 

+ 122 - 0
src/SDrpManagement/commissionDistribution/detail/components/income.vue

@@ -0,0 +1,122 @@
+<template>
+  <div>
+    <div class="flex-align-stretch">
+      <div class="mt-10">
+        <label  class="search__label">状态:</label>
+        <el-select class="inline-16" v-model="param.content.where.status" placeholder="请选择状态" @change="selectChange" size="small" clearable>
+          <el-option label="新建" value="新建"></el-option>
+          <el-option label="审核" value="审核"></el-option>
+        </el-select>
+      </div>
+      <div class="mt-10 inline-16">
+        <el-input  style="width:200px;" placeholder="搜索" :suffix-icon="param.content.where.condition?param.content.where.condition.length > 0?'':'':'el-icon-search'" v-model="param.content.where.condition" @keyup.native.enter="listData(param.content.pageNumber = 1)" @clear="listData(param.content.pageNumber = 1)" size="small" class="input-with-select inline-16 layout_search__panel" clearable>
+        </el-input>
+      </div>
+    </div>
+    <tableNewLayout :layout="tablecols" :data="list" :opwidth="200" height="calc(100vh - 376px)" :width="true" :custom="true" fixedName="operation">
+      <template v-slot:customcol="scope">
+        <div v-if="scope.column.columnname === 'remarks'">
+          {{scope.column.data.sourcenote !== '' && scope.column.data.remarks !== ''?'系统备注:' + scope.column.data.sourcenote + ';人工备注:' + scope.column.data.remarks :
+            scope.column.data.sourcenote !== ''?'系统备注:' + scope.column.data.sourcenote : scope.column.data.remarks !== ''?'人工备注:' + scope.column.data.remarks:'--'}}
+        </div>
+        <div v-else-if="scope.column.columnname === 'relaamount'">
+          {{tool.formatAmount(scope.column.data[[scope.column.columnname]],2)}}
+        </div>
+        <div v-else>
+          {{scope.column.data[[scope.column.columnname]] || scope.column.columnname === 'operation'?scope.column.data[[scope.column.columnname]]:'--'}}
+        </div>
+      </template>
+      <template v-slot:opreation="scope">
+        <el-button type="text" size="mini" @click="goDetail(scope.data)">详 情</el-button>
+      </template>
+    </tableNewLayout>
+    <div  class="container normal-panel" style="text-align:right">
+      <el-pagination
+          background
+          @size-change="handleSizeChange"
+          @current-change="handleCurrentChange"
+          :current-page="currentPage"
+          :page-sizes="[20, 20, 100, 200]"
+          :page-size="20"
+          layout="total,sizes, prev, pager, next, jumper"
+          :total="total">
+      </el-pagination>
+    </div>
+  </div>
+</template>
+
+<script>
+export default {
+  name: "income",
+  data(){
+    return {
+      param:{
+        "id": "20240117105804",
+        "content": {
+          "sa_hrpayapplyid": '',
+          "pageNumber": 1,
+          "pageSize": 20,
+          "where": {
+            "condition": "",
+            "status":""
+          }
+        }
+      },
+      tablecols:[],
+      list:[],
+      total:0,
+      currentPage:0
+    }
+  },
+  methods:{
+    async listData(){
+      this.param.content.sa_hrpayapplyid = this.$route.query.id
+      const res = await this.$api.requested(this.param)
+      this.list = res.data
+      this.total = res.total
+      this.currentPage = res.pageNumber
+    },
+    selectChange(){
+      this.listData()
+    },
+    handleSizeChange(val) {
+      // console.log(`每页 ${val} 条`);
+      this.param.content.pageSize = val
+      this.listData()
+    },
+    handleCurrentChange(val) {
+      // console.log(`当前页: ${val}`);
+      this.param.content.pageNumber = val
+      this.listData()
+    },
+    goDetail(val){
+      console.log(val)
+      this.$store.dispatch('changeDetailDrawer',false)
+      this.$nextTick(()=>{
+        let route = this.$route
+        if (route.path !== 'salerIncomeDetail') {
+          this.oldRoute = {path:route.path,query:route.query}
+          this.$store.dispatch('setHistoryRouter',this.oldRoute)
+        }
+
+        this.$router.push({
+          path:'/salerIncomeDetail',
+          query:{id:val.sa_hrcashbillid}
+        })
+        this.$store.dispatch('changeDetailDrawer',true)
+      })
+    }
+  },
+  mounted() {
+    this.listData()
+  },
+  created() {
+    console.log(this.tool.tabelCol(this.$route.name).incomesTable.tablecols,'tablecols')
+    this.tablecols = this.tool.tabelCol(this.$route.name).incomesTable.tablecols
+  }
+}
+</script>
+
+<style scoped>
+
+</style>

+ 153 - 2
src/SDrpManagement/commissionDistribution/detail/index.vue

@@ -1,10 +1,161 @@
 <template>
-  <div></div>
+  <div>
+    <basicDetails
+        ref="details"
+        formPath="commissionDistribution"
+        turnPageId="20240117105404"
+        idname="sa_hrpayapplyid"
+        ownertable="sa_hrpayapply"
+        :isBatch="false"
+        :delApiId="20240117105504"
+        :editData="mainData"
+        :mainAreaData="mainAreaData"
+        :titleText="mainData.billno"
+        @pageChange="pageChange"
+        :tabs="['收入','详细信息']"
+        @onEditSuccess="queryMainData"
+        :statusCheck="[{key:'status',value:'发放'}]"
+    >
+      <div slot="customOperation">
+        <toGrant class="inline-16" v-if="tool.checkAuth($route.name,'grant')" @examineSuccess="queryMainData" :status="mainData.status"></toGrant>
+      </div>
+      <div slot="slot0" class="normal-panel">
+        <incomes></incomes>
+      </div>
+      <div slot="slot1" class="normal-panel">
+        <baseInfo  :detailInfo="detailInfo"></baseInfo>
+      </div>
+    </basicDetails>
+  </div>
 </template>
 
 <script>
+import baseInfo from '@/components/baseInfo/index.vue'
+import incomes from './components/income.vue'
+import toGrant from './modules/toGrant.vue'
 export default {
-  name: "index"
+  name: "index",
+  components:{baseInfo,incomes,toGrant},
+  data(){
+    return {
+      mainData:[],
+      mainAreaData:[],
+      detailInfo:''
+    }
+  },
+  methods:{
+    async queryMainData(){
+      const res = await this.$api.requested({
+        "id": "20240117105304",
+        "content": {
+          "sa_hrpayapplyid":this.$route.query.id
+        }
+      })
+      this.mainData = res.data
+      this.changeDataStructure()
+    },
+    // 监听切换数据,上一页,下一页
+    pageChange (id,rowindex) {
+      this.$router.replace({path:'/commissionDistributionDetail',query:{id:id,rowindex:rowindex}})
+      this.queryMainData(id)
+    },
+    changeDataStructure(){
+      this.mainAreaData = [
+        {
+          label:'单号',
+          value:this.mainData.billno
+        },
+        {
+          label:'状态',
+          value:this.mainData.status
+        },
+        {
+          label:'创建人',
+          value:this.mainData.createby
+        },
+        {
+          label:'创建时间',
+          value:this.mainData.createdate
+        },
+        {
+          label:'发放人',
+          value:this.mainData.checkby
+        },
+        {
+          label:'发放时间',
+          value:this.mainData.checkdate
+        },
+        /*{
+          label:'备注',
+          value:this.mainData.sourcenote !== '' && this.mainData.remarks !== ''?'系统备注:' + this.mainData.sourcenote + ';人工备注:' + this.mainData.remarks : this.mainData.sourcenote !== ''?'系统备注:' + this.mainData.sourcenote :
+              this.mainData.remarks !== ''?'人工备注:' + this.mainData.remarks:'--'
+        },*/
+      ]
+      this.detailInfo = {
+        baseInfo: [
+          {
+            label:'单号',
+            value:this.mainData.billno
+          },
+          {
+            label:'状态',
+            value:this.mainData.status
+          },
+          {
+            label:'创建人',
+            value:this.mainData.createby
+          },
+          {
+            label:'创建时间',
+            value:this.mainData.createdate
+          },
+          {
+            label:'发放人',
+            value:this.mainData.checkby
+          },
+          {
+            label:'发放时间',
+            value:this.mainData.checkdate
+          },
+          /*{
+            label:'备注',
+            value:this.mainData.sourcenote !== '' && this.mainData.remarks !== ''?'系统备注:' + this.mainData.sourcenote + ';人工备注:' + this.mainData.remarks : this.mainData.sourcenote !== ''?'系统备注:' + this.mainData.sourcenote :
+                this.mainData.remarks !== ''?'人工备注:' + this.mainData.remarks:'--'
+          },*/
+        ],
+        systemInfo: [
+          {
+            label:'创建人',
+            value:this.mainData.createby
+          },
+          {
+            label:'创建时间',
+            value:this.mainData.createdate
+          },
+          {
+            label:'最近编辑人',
+            value:this.mainData.changeby
+          },
+          {
+            label:'最近编辑时间',
+            value:this.mainData.changedate
+          },
+          {
+            label:'发放人',
+            value:this.mainData.checkby
+          },
+          {
+            label:'发放时间',
+            value:this.mainData.checkdate
+          },
+        ]
+      }
+
+    }
+  },
+  mounted() {
+    this.queryMainData()
+  }
 }
 </script>
 

+ 45 - 0
src/SDrpManagement/commissionDistribution/detail/modules/toGrant.vue

@@ -0,0 +1,45 @@
+<template>
+  <div>
+    <el-button size="mini" :type="status !== '新建'?'':'primary'"  @click="onExamine" :disabled="status !== '新建'">发 放</el-button>
+  </div>
+</template>
+
+<script>
+export default {
+  name: "toExamine",
+  props:["status"],
+  data(){
+    return {
+
+    }
+  },
+  methods:{
+    onExamine(){
+      this.$confirm('确定通过当前提成的发放吗?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(async () => {
+        const res = await this.$api.requested({
+          "id": "20240117105604",
+          "content": {
+            "sa_hrpayapplyid":this.$route.query.id
+          }
+        })
+        this.tool.showMessage(res,()=>{
+          this.$emit('examineSuccess')
+        })
+      }).catch(() => {
+        this.$message({
+          type: 'info',
+          message: '已取消发放'
+        });
+      });
+    }
+  }
+}
+</script>
+
+<style scoped>
+
+</style>

+ 1 - 1
src/router/SDrpManagement.js

@@ -397,7 +397,7 @@ const SDrpManagement = [
     children: [
       {
         path: '/commissionDistributionDetail',
-        name: 'commissionDistributionDetail',
+        name: 'commissionDistribution',
         meta: {
           title: '提成发放详情',
           ast_nav: true,