瀏覽代碼

平台费率配置修改

LiFei 4 年之前
父節點
當前提交
9dfd5ba006

+ 9 - 4
src/views/hlwcpmanager/modules/HlwCpSubSubcontractList.vue

@@ -110,8 +110,13 @@
         // 表头
         columns: [
           {
+            title: '平台',
+            dataIndex: 'cpName',
+            align:"left",
+          },
+          {
             title: '费率',
-            align: 'center',
+            align: 'left',
             dataIndex: 'serviceRate',
             customRender(text,record) {
               return text+"%"
@@ -120,7 +125,7 @@
           },
           {
             title: '合同有效期',
-            align: 'center',
+            align: 'left',
             dataIndex: 'startDate',
             customRender(text,record) {
               return record.startDate+"~"+record.endDate
@@ -128,14 +133,14 @@
           },
           {
             title: '合同文件',
-            align: 'center',
+            align: 'left',
             dataIndex: 'subcontract',
             scopedSlots: { customRender: 'action3' }
           },
           {
             title: '操作',
             dataIndex: 'action',
-            align:"center",
+            align:"left",
             scopedSlots: { customRender: 'action' },
           },
 

+ 45 - 1
src/views/hlwcpmanager/modules/HlwCpSubcontractorModal.vue

@@ -12,6 +12,10 @@
       <a-form :form="form">
 
 
+        <a-form-item label="平台选择" :labelCol="labelCol" :wrapperCol="wrapperCol">
+          <a-select type="list" v-decorator="['cpId',validatorRules.cpId]" :trigger-change="true" @change="changeBelong"
+                    :options="selectOption.options" placeholder="平台选择" style="width: 100%"/>
+        </a-form-item>
 
 
         <a-form-item label="服务费率" :labelCol="labelCol" :wrapperCol="wrapperCol">
@@ -54,13 +58,14 @@
 
 <script>
   import Vue from 'vue'
-  import { httpAction,getAction } from '@/api/manage'
+  import { httpAction,getAction ,putAction} from '@/api/manage'
   import pick from 'lodash.pick'
   import { validateDuplicateValue } from '@/utils/util'
   import JDate from '@/components/jeecg/JDate'
   import SubcontractorSelectWindowInCondition from '../../hlwsubcontractor/modules/SubcontractorSelectWindowInCondition'
   import { ACCESS_TOKEN } from '@/store/mutation-types'
   const validateTime = (params) => getAction('/wisdom/hlwCpSubcontractor/validateTime', params)
+  const findList = (params) => putAction('/wisdom/hlwCpSetting/getCpList', params)
 
 
   const FILE_TYPE_ALL = "all"
@@ -84,6 +89,11 @@
     },
     data () {
       return {
+        selectOption: {
+          options: [
+
+          ]
+        },
         headers: {},
         fileList: [],
         form: this.$form.createForm(this),
@@ -127,6 +137,12 @@
               { required: true, message: '请输入创建者!'},
             ]
           },
+          cpId: {
+            rules: [
+              { required: true, message: '请选择平台'},
+            ]
+          },
+
         },
         url: {
           add: "/wisdom/hlwCpSubcontractor/add",
@@ -165,6 +181,7 @@
       edit (record) {
         this.form = this.$form.createForm(this)
         this.model = Object.assign({}, record);
+        this.querySubcontratorList()
         this.visible = true;
         this.$nextTick(() => {
           this.form.setFieldsValue(pick(this.model,'cpId','subcontractorId','serviceRate','createTime','createBy','updateTime','updateBy','hlwSubcontractorName',"startDate","endDate","subcontract"))
@@ -335,6 +352,33 @@
         })
       },
 
+
+
+      changeBelong(val){
+        this.model.cpId=val
+      },
+
+      //查询慧盈配置
+      querySubcontratorList() {
+        findList({}).then((res) => {
+          if (res.success) {
+            this.selectOption.options=[]
+            this.form.setFieldsValue({cpId:null})
+            for(let i = 0;i<res.result.length;i++){
+              this.selectOption.options.push({label: res.result[i].cpAbbreviation, value:res.result[i].id })
+              if(this.model.cpId){
+                this.isDisabled=true
+                this.$nextTick(() => {
+                  this.form.setFieldsValue({ cpId:this.model.cpId})
+                })
+              }
+
+            }
+          }
+        })
+      },
+
+
       
     }
   }