Browse Source

财务模块修改完成

朱鑫波 3 years ago
parent
commit
437870fe63

+ 2 - 2
src/utils/request.js

@@ -20,8 +20,8 @@ else if (process.env.NODE_ENV === 'debug') {
 }
 }
 else if (process.env.NODE_ENV === 'production') {
 else if (process.env.NODE_ENV === 'production') {
 	// axios.defaults.baseURL = 'http://apipre.tjyourong.com.cn/jeecg-boot'; // 预生产
 	// axios.defaults.baseURL = 'http://apipre.tjyourong.com.cn/jeecg-boot'; // 预生产
-	axios.defaults.baseURL = 'http://gateway.tjyourong.com.cn/jeecg-boot';//测试
-	// axios.defaults.baseURL = 'http://api.tjyourong.com.cn/jeecg-boot'; // 生产环境
+	// axios.defaults.baseURL = 'http://gateway.tjyourong.com.cn/jeecg-boot';//测试
+	axios.defaults.baseURL = 'http://api.tjyourong.com.cn/jeecg-boot'; // 生产环境
 	// axios.defaults.baseURL = 'http://gateway.tjyourong.com.cn/jeecg-boot'; // 生产环境
 	// axios.defaults.baseURL = 'http://gateway.tjyourong.com.cn/jeecg-boot'; // 生产环境
 
 
 }
 }

+ 2 - 2
src/views/modules/policy-management/policy-management-server.js

@@ -3,9 +3,9 @@
  * @author jiayufei
  * @author jiayufei
  */
  */
 
 
-//  export const urlAcount = 'http://api.tjyourong.com.cn'; // 线上
+ export const urlAcount = 'http://api.tjyourong.com.cn'; // 线上
 //  export const urlAcount = 'http://gateway.tjyourong.com.cn'; // 测试
 //  export const urlAcount = 'http://gateway.tjyourong.com.cn'; // 测试
 //  export const urlAcount = 'http://192.168.1.43:9999'; // 子安
 //  export const urlAcount = 'http://192.168.1.43:9999'; // 子安
- export const urlAcount = 'http://gateway.tjyourong.com.cn'; // 测试
+//  export const urlAcount = 'http://gateway.tjyourong.com.cn'; // 测试
 //  export const urlAcount = 'http://192.168.1.8:9999'; // 学超
 //  export const urlAcount = 'http://192.168.1.8:9999'; // 学超
  
  

+ 9 - 9
src/views/modules/policy-management/policy-management.less

@@ -136,10 +136,10 @@
 
 
     }
     }
 
 
-    .ant-modal-body {
-        height: 440px;
-        overflow-y: auto;
-    }
+    // .ant-modal-body {
+    //     height: 440px;
+    //     overflow-y: auto;
+    // }
 
 
     .audit-policy-icon {
     .audit-policy-icon {
         position: absolute;
         position: absolute;
@@ -151,7 +151,7 @@
 
 
     .policy-line-quen {
     .policy-line-quen {
         display: flex;
         display: flex;
-        height: 345px;
+        // height: 345px;
 
 
         .line-quen-left,
         .line-quen-left,
         .line-quen-right {
         .line-quen-right {
@@ -190,10 +190,10 @@
 }
 }
 ::v-deep .policy-operation-class {
 ::v-deep .policy-operation-class {
     width: 1000px !important;
     width: 1000px !important;
-    .ant-modal-body {
-        height: 600px;
-        overflow-y: auto;
-    }
+    // .ant-modal-body {
+    //     height: 600px;
+    //     overflow-y: auto;
+    // }
     .policy-operation-form {
     .policy-operation-form {
         display: flex;
         display: flex;
         .group-abbreviation-class {
         .group-abbreviation-class {

+ 178 - 64
src/views/modules/policy-management/policy-management.vue

@@ -91,10 +91,10 @@
                         >
                         >
                             <a-select-option
                             <a-select-option
                                 v-for="item in allSaleListOption"
                                 v-for="item in allSaleListOption"
-                                :key="item.userId"
-                                :value="item.userName"
+                                :key="item.saleId"
+                                :value="item.saleName"
                             >
                             >
-                                {{ item.userName }}
+                                {{ item.saleName }}
                             </a-select-option>
                             </a-select-option>
                         </a-select>
                         </a-select>
                     </a-form-item>
                     </a-form-item>
@@ -259,11 +259,11 @@
                     <div class="line-quen-left">
                     <div class="line-quen-left">
                         <div class="policy-line-left">
                         <div class="policy-line-left">
                             <span class="line-left-spn">公司名称:</span>
                             <span class="line-left-spn">公司名称:</span>
-                            <span class="line-right-spn">{{ queryByIdList.companyName || '-' }}</span>
+                            <span class="line-right-spn-else">{{ queryByIdList.companyName || '-' }}</span>
                         </div>
                         </div>
                         <div class="policy-line-left">
                         <div class="policy-line-left">
                             <span class="line-left-spn">广告主:</span>
                             <span class="line-left-spn">广告主:</span>
-                            <span class="line-right-spn">{{ queryByIdList.advertiserName || '-' }}</span>
+                            <span class="line-right-spn-else">{{ queryByIdList.advertiserName || '-' }}</span>
                         </div>
                         </div>
                         <div class="policy-line-left">
                         <div class="policy-line-left">
                             <span class="line-left-spn">产品名称:</span>
                             <span class="line-left-spn">产品名称:</span>
@@ -299,7 +299,7 @@
                         </div>
                         </div>
                         <div class="policy-line-left">
                         <div class="policy-line-left">
                             <span class="line-left-spn">集团简称:</span>
                             <span class="line-left-spn">集团简称:</span>
-                            <span class="line-right-spn">{{ queryByIdList.groupAbbreviation || '-' }}</span>
+                            <span class="line-right-spn-else">{{ queryByIdList.groupAbbreviation || '-' }}</span>
                         </div>
                         </div>
                     </div>
                     </div>
                     <div class="line-quen-right">
                     <div class="line-quen-right">
@@ -327,7 +327,7 @@
                             <div v-if="queryByIdList.isDianPay === 1">
                             <div v-if="queryByIdList.isDianPay === 1">
                                 <div class="policy-line-right">
                                 <div class="policy-line-right">
                                     <span class="line-left-spn">垫付公司:</span>
                                     <span class="line-left-spn">垫付公司:</span>
-                                    <span class="line-right-spn">{{ queryByIdList.dianPayCompanyName }}</span>
+                                    <span class="line-right-spn-else">{{ queryByIdList.dianPayCompanyName }}</span>
                                 </div>
                                 </div>
                                 <div class="policy-line-right">
                                 <div class="policy-line-right">
                                     <span class="line-left-spn">垫付返点:</span>
                                     <span class="line-left-spn">垫付返点:</span>
@@ -343,11 +343,18 @@
                             <span class="line-left-spn">备注:</span>
                             <span class="line-left-spn">备注:</span>
                             <span class="line-right-spn-else">{{ queryByIdList.remarks || '-' }}</span>
                             <span class="line-right-spn-else">{{ queryByIdList.remarks || '-' }}</span>
                         </div>
                         </div>
+                        <div class="policy-line-right" v-if="queryByIdList.theBossContent">
+                            <span class="line-left-spn">领导审核原因:</span>
+                            <span class="line-right-spn-else">{{ queryByIdList.theBossContent || '-' }}</span>
+                        </div>
+                         
                     </div>
                     </div>
                 </div>
                 </div>
-                <div v-if="queryByIdList.updateOperation.includes('审核拒绝')" solt="footer" class="audit-policy-footer">
-                    <div></div>
-                    <div>
+                <div solt="footer" class="audit-policy-footer" style="justify-content: flex-end;">
+                    <div v-if="queryByIdList.theBossRight == 'yes'">
+                        <a-button type="primary" @click="toLeader" class="cancel-btn">转领导审批</a-button>
+                    </div>
+                    <div  v-if="queryByIdList.updateOperation.includes('审核拒绝')">
                         <a-button type="default" class="cancel-btn" @click="handleAuditCancel">审核拒绝</a-button>
                         <a-button type="default" class="cancel-btn" @click="handleAuditCancel">审核拒绝</a-button>
                         <a-button type="primary" @click="handleAuditSure">审核通过</a-button>
                         <a-button type="primary" @click="handleAuditSure">审核通过</a-button>
                     </div>
                     </div>
@@ -381,6 +388,36 @@
                 </a-form-model>
                 </a-form-model>
             </div>
             </div>
         </a-modal>
         </a-modal>
+
+
+        <!-- 领导审核原因 -->
+        <a-modal
+            v-if="toLeaderVisible"
+            title="推送领导审核原因"
+            dialog-class="rejection-reason-class"
+            :visible="toLeaderVisible"
+            @ok="handleLeader"
+            @cancel="handleRejectCancel"
+        >
+            <div>
+                <div class="reason-class-header">请输入领导审核原因:</div>
+                <a-form-model
+                    ref="rejectRuleForm"
+                    :model="reasonForm"
+                    :rules="reasonRules"
+                >
+                    <a-form-model-item label="" prop="desc">
+                        <a-input
+                            class="rejection-textarea-msg"
+                            v-model="reasonForm.desc"
+                            type="textarea"
+                            placeholder="请输入至少五个字符"
+                        />
+                    </a-form-model-item>
+                </a-form-model>
+            </div>
+        </a-modal>
+        
         <!-- 新增、编辑政策 -->
         <!-- 新增、编辑政策 -->
         <a-modal
         <a-modal
             v-if="policyOperationStatus"
             v-if="policyOperationStatus"
@@ -463,13 +500,14 @@
                             </a-select>
                             </a-select>
                         </a-form-model-item>
                         </a-form-model-item>
                         <a-form-model-item label="销售" prop="createUserId">
                         <a-form-model-item label="销售" prop="createUserId">
+                            <!-- @change="showAreaInfo" -->
                             <a-select
                             <a-select
                                 v-model="policyOperationForm.createUserId"
                                 v-model="policyOperationForm.createUserId"
                                 style="width: 100px"
                                 style="width: 100px"
                                 show-search
                                 show-search
                                 allow-clear
                                 allow-clear
                                 :filter-option="handleFilterOption"
                                 :filter-option="handleFilterOption"
-                                @change="showAreaInfo"
+
                             >
                             >
                                 <a-select-option
                                 <a-select-option
                                     v-for="item in saleShowOption"
                                     v-for="item in saleShowOption"
@@ -481,8 +519,8 @@
                                 </a-select-option>
                                 </a-select-option>
                             </a-select>
                             </a-select>
                         </a-form-model-item>
                         </a-form-model-item>
-                        <a-form-model-item label="区域" prop="areaInfo" v-if="policyOperationForm.areaInfo">
-                            <!-- <a-select
+                        <a-form-model-item label="区域" prop="areaInfo">
+                            <a-select
                                 v-model="policyOperationForm.areaInfo"
                                 v-model="policyOperationForm.areaInfo"
                                 placeholder="请选择区域"
                                 placeholder="请选择区域"
                                 allow-clear
                                 allow-clear
@@ -494,8 +532,8 @@
                                 >
                                 >
                                     {{ item }}
                                     {{ item }}
                                 </a-select-option>
                                 </a-select-option>
-                            </a-select> -->
-                            {{policyOperationForm.areaInfo}}
+                            </a-select>
+                            <!-- {{policyOperationForm.areaInfo}} -->
                         </a-form-model-item>
                         </a-form-model-item>
                         <a-form-model-item label="我司主体" prop="companySubjectName">
                         <a-form-model-item label="我司主体" prop="companySubjectName">
                             <a-select
                             <a-select
@@ -533,12 +571,11 @@
                                 <template slot="title">由销售人员自行定义的集团系列产品简称</template>
                                 <template slot="title">由销售人员自行定义的集团系列产品简称</template>
                                 <a-icon class="settlement-header-icon" type="question-circle"/>
                                 <a-icon class="settlement-header-icon" type="question-circle"/>
                             </a-tooltip>
                             </a-tooltip>
-                            <a-form-model-item label="集团简称">
+                            <a-form-model-item label="集团简称" prop="groupAbbreviation">
                                 <a-input
                                 <a-input
                                     v-model="policyOperationForm.groupAbbreviation"
                                     v-model="policyOperationForm.groupAbbreviation"
                                     placeholder="请输入集团简称"
                                     placeholder="请输入集团简称"
                                     allow-clear
                                     allow-clear
-                                    @change="handleGroupAbbreviationChange"
                                 />
                                 />
                             </a-form-model-item>
                             </a-form-model-item>
                             <div v-if="subTitleMsgStatus" style="color: #f00;margin-left: 140px">只能输入30个汉字</div>
                             <div v-if="subTitleMsgStatus" style="color: #f00;margin-left: 140px">只能输入30个汉字</div>
@@ -622,7 +659,7 @@
                                 @change="handleAddTimesChange"
                                 @change="handleAddTimesChange"
                             />
                             />
                         </a-form-model-item>
                         </a-form-model-item>
-                        <a-form-model-item label="备注">
+                        <a-form-model-item label="备注" prop="remarks">
                             <a-input
                             <a-input
                                 v-model="policyOperationForm.remarks"
                                 v-model="policyOperationForm.remarks"
                                 placeholder="请输入备注"
                                 placeholder="请输入备注"
@@ -630,7 +667,6 @@
                                 @change="handleRemarksChange"
                                 @change="handleRemarksChange"
                             />
                             />
                         </a-form-model-item>
                         </a-form-model-item>
-                        <div v-if="remarksStatus" style="color: #f00;margin-left: 140px">只能输入200个汉字</div>
                     </a-row>
                     </a-row>
                 </a-form-model>
                 </a-form-model>
             </div>
             </div>
@@ -645,7 +681,7 @@
             :width="1000"
             :width="1000"
             :footer="null"
             :footer="null"
         >
         >
-            <a-button type="default" style="margin-bottom:10px" id="mybtn" @click="addSaleInfo">新增</a-button>
+            <a-button  type="primary" style="margin-bottom:10px" id="mybtn" @click="addSaleInfo">新增</a-button>
             <br>
             <br>
             设定对应关系后,该销售助理可以查看、创建对应销售的政策以及下载该销售负责账户的结算单
             设定对应关系后,该销售助理可以查看、创建对应销售的政策以及下载该销售负责账户的结算单
             <a-table
             <a-table
@@ -653,7 +689,7 @@
             :data-source="saleInfoList"
             :data-source="saleInfoList"
             bordered
             bordered
             tableLayout="auto"
             tableLayout="auto"
-            :pagination="ipagination"
+            :pagination="false"
             :loading='saleLoading'
             :loading='saleLoading'
             style="word-break: break-all;"
             style="word-break: break-all;"
             >
             >
@@ -706,6 +742,15 @@
                 </div>
                 </div>
 
 
             </a-table>
             </a-table>
+            <a-pagination
+                style="display: flex;
+                justify-content: flex-end;
+                margin-top: 10px;"
+                :total="ipagination.total"
+                :show-total="total => `共 ${ipagination.total} 条`"
+                size="small"
+                @change="handleCurrey"
+            />
         </a-modal>
         </a-modal>
     </div>
     </div>
 </template>
 </template>
@@ -859,12 +904,18 @@ export default {
                     {validator: handleCharacterLen30, trigger: 'blur'}
                     {validator: handleCharacterLen30, trigger: 'blur'}
                 ],
                 ],
                 dianPayCompanyRebateRate: [{required: true, message: '请输入垫付返点', trigger: 'blur'}],
                 dianPayCompanyRebateRate: [{required: true, message: '请输入垫付返点', trigger: 'blur'}],
-                addTimes: [{required: true, message: '请选择时间', trigger: 'change'}]
+                addTimes: [{required: true, message: '请选择时间', trigger: 'change'}],
+                remarks:[
+                    { min: 0, max: 200, message: '只能输入200个汉字', trigger: 'blur' },
+                ],
+                groupAbbreviation:[
+                    { min: 0, max: 30, message: '只能输入30个汉字', trigger: 'blur' },
+                ],
             },
             },
             reasonRules: {
             reasonRules: {
                 desc: [
                 desc: [
                     {required: true, message: '请输入审核拒绝理由', trigger: 'blur'},
                     {required: true, message: '请输入审核拒绝理由', trigger: 'blur'},
-                    {validator: handleCharacterLen100, trigger: 'blur'}
+                    { min: 5, max: 100, message: '请输入最少五个汉字', trigger: 'blur' },
                 ]
                 ]
             },
             },
             dataSource: [],
             dataSource: [],
@@ -1060,6 +1111,7 @@ export default {
                     this.getSaleList()
                     this.getSaleList()
                 }
                 }
             },
             },
+            toLeaderVisible: false,
         };
         };
     },
     },
     created() {
     created() {
@@ -1073,8 +1125,20 @@ export default {
     methods: {
     methods: {
         ...mapGetters(['userInfo']),
         ...mapGetters(['userInfo']),
         moment,
         moment,
+        toLeader () {
+            // this.queryByIdList
+            this.toLeaderVisible = true
+        },
+        handleCurrey (current, pageSize)  {
+            // 切换分页时的回调,
+            // 当在页面定义change事件时,切记要把此处的事件清除,因为这两个事件重叠了,可能到时候会导致一些莫名的bug
+            this.ipagination.current = current;
+            this.ipagination.pageSize= pageSize;
+            this.getSaleList()
+        },
         //新建销售对应人员
         //新建销售对应人员
         handleAddSale(){
         handleAddSale(){
+            this.ipagination.current = 1
             this.saleVisible = true
             this.saleVisible = true
             this.getSaleList()
             this.getSaleList()
             this.getSalePersonList()
             this.getSalePersonList()
@@ -1084,7 +1148,7 @@ export default {
             params.userId = this.userInfo().id
             params.userId = this.userInfo().id
             
             
             this.getAction(urlAcount + '/finance/cwjsSaleAssistantInfo/getSaleListByUserDepart', params).then(result => {
             this.getAction(urlAcount + '/finance/cwjsSaleAssistantInfo/getSaleListByUserDepart', params).then(result => {
-                if(result.code === 0) {
+                if(result.success) {
                     this.salePersonList = result.result.map(item => {
                     this.salePersonList = result.result.map(item => {
                         return {
                         return {
                             key: item.saleId,
                             key: item.saleId,
@@ -1118,7 +1182,7 @@ export default {
             this.saleLoading = true
             this.saleLoading = true
             this.getAction(urlAcount + '/finance/cwjsSaleAssistantInfo/list', params).then(result => {
             this.getAction(urlAcount + '/finance/cwjsSaleAssistantInfo/list', params).then(result => {
                 this.saleLoading = false
                 this.saleLoading = false
-                if(result.code === 0) {
+                if(result.success) {
                     this.saleInfoList = result.result.records.map(item => {
                     this.saleInfoList = result.result.records.map(item => {
                         return {
                         return {
                             ...item,
                             ...item,
@@ -1148,38 +1212,55 @@ export default {
             params.id = id
             params.id = id
             this.getAction(urlAcount + '/finance/cwjsSaleAssistantInfo/delete', params).then(result => {
             this.getAction(urlAcount + '/finance/cwjsSaleAssistantInfo/delete', params).then(result => {
                 if(result.success) {
                 if(result.success) {
-                    this.getSaleList()
+                    // this.getSaleList()
+
+                    if(this.saleInfoList.length < 2 && this.ipagination.current > 1) {
+                        this.ipagination.current = this.ipagination.current - 1
+                        this.getSaleList()
+                    }
+                    else{
+                        this.getSaleList() 
+                    }
+                   
                 }
                 }
             })
             })
         },
         },
         //销售对应人员确定按钮
         //销售对应人员确定按钮
         handleSale(item){
         handleSale(item){
-            let params = {}
-            params.id = item.id?item.id:null
-            params.saleId = item.saleIdContent.key
-            params.saleName = item.saleIdContent.label.replace(/[\r\n]/g, "").trim();
-            params.assistantId = item.assistantIdContent.key
-            params.assistantName = item.assistantIdContent.label.replace(/[\r\n]/g, "").trim();
-            params.createUserId = this.userInfo().id
-            if(item.id) {
-                this.postDataAction(urlAcount + '/finance/cwjsSaleAssistantInfo/edit', params).then(result => {
-                    if(result.success) {
-                        this.getSaleList()
-                    }
-                    else{
-                        this.$message.error(result.message)
-                    }
-                })
+            if(item.saleIdContent){
+                let params = {}
+                params.id = item.id?item.id:null
+                params.saleId = item.saleIdContent.key
+                params.saleName = item.saleIdContent.label.replace(/[\r\n]/g, "").trim();
+                params.assistantId = item.assistantIdContent.key
+                params.assistantName = item.assistantIdContent.label.replace(/[\r\n]/g, "").trim();
+                params.createUserId = this.userInfo().id
+                if(item.id) {
+                    this.postDataAction(urlAcount + '/finance/cwjsSaleAssistantInfo/edit', params).then(result => {
+                        if(result.success) {
+                            this.getSaleList()
+                        }
+                        else{
+                            this.$message.error(result.message)
+                        }
+                    })
+                }
+                else {
+                
+                        this.postDataAction(urlAcount + '/finance/cwjsSaleAssistantInfo/add', params).then(result => {
+                            if(result.success) {
+                                this.getSaleList()
+                            }
+                            else{
+                                this.$message.error(result.message)
+                            }
+                        })
+                
+                    
+                }   
             }
             }
             else {
             else {
-                this.postDataAction(urlAcount + '/finance/cwjsSaleAssistantInfo/add', params).then(result => {
-                    if(result.success) {
-                        this.getSaleList()
-                    }
-                    else{
-                        this.$message.error(result.message)
-                    }
-                })
+                this.$message.error('请选择人员')
             }
             }
             
             
         },
         },
@@ -1243,9 +1324,33 @@ export default {
             getAction(urlAcount + '/finance/cwjsPolicyInfo/queryAeraByUserId', paramsData).then(result => {
             getAction(urlAcount + '/finance/cwjsPolicyInfo/queryAeraByUserId', paramsData).then(result => {
                 if (result.code === 0) {
                 if (result.code === 0) {
                     const defaultList = result.result[0].UserCompany;
                     const defaultList = result.result[0].UserCompany;
-                    // this.saleShowOption = defaultList;
+                    this.saleShowOption = defaultList.map(item=>{
+                        return {
+                            saleId: item.userId,
+                            saleName: item.userName
+                        }
+                    });
                     this.addAreaList = defaultList[0].nickName.split(',');
                     this.addAreaList = defaultList[0].nickName.split(',');
                     this.addSubjectList = result.result[0].companySubjects;
                     this.addSubjectList = result.result[0].companySubjects;
+                    getAction(urlAcount + '/finance/cwjsSaleAssistantInfo/getCwSaleAndAssistantList', paramsData).then(result => {
+                        if (result.code === 0) {
+                            for (let i = 0; i < result.result.length; i++) {
+                                if( this.saleShowOption[0].saleId == result.result[i].saleId){
+                                    
+                                }
+                                else {
+                                    this.saleShowOption.push(result.result[i])
+                                }
+                                
+                            }
+                            
+                        }
+                        else {
+                            this.$message.error(result.message);
+                        }
+                    }).catch(error => {
+                        console.log(error, 'eeee');
+                    });
                 }
                 }
                 else {
                 else {
                     this.$message.error(result.message);
                     this.$message.error(result.message);
@@ -1253,16 +1358,7 @@ export default {
             }).catch(error => {
             }).catch(error => {
                 console.log(error, 'eeee');
                 console.log(error, 'eeee');
             });
             });
-            getAction(urlAcount + '/finance/cwjsSaleAssistantInfo/getCwSaleAndAssistantList', paramsData).then(result => {
-                if (result.code === 0) {
-                    this.saleShowOption = result.result
-                }
-                else {
-                    this.$message.error(result.message);
-                }
-            }).catch(error => {
-                console.log(error, 'eeee');
-            });
+           
             
             
         },
         },
         handleExamineAll(data) {
         handleExamineAll(data) {
@@ -1291,8 +1387,8 @@ export default {
             const paramsData = {
             const paramsData = {
                 userId: this.userInfo().id
                 userId: this.userInfo().id
             };
             };
-            getAction(urlAcount + '/finance/cwjsPolicyInfo/getAllSaleList', paramsData).then(result => {
-                if (result.code === 200) {
+            getAction(urlAcount + '/finance/cwjsSaleAssistantInfo/getSaleListByUserDepart', paramsData).then(result => {
+                if (result.success) {
                     this.allSaleListOption = result.result || [];
                     this.allSaleListOption = result.result || [];
                 }
                 }
                 else {
                 else {
@@ -1490,7 +1586,7 @@ export default {
         // 新增政策按钮
         // 新增政策按钮
         handleAddAccountPolicy() {
         handleAddAccountPolicy() {
             this.addType = 'add';
             this.addType = 'add';
-            this.policyOperationForm.createUserId = this.saleShowOption[0].userId || '';
+            this.policyOperationForm.createUserId = this.userInfo().id;
             this.policyOperationStatus = true;
             this.policyOperationStatus = true;
         },
         },
         // 新增政策确定按钮
         // 新增政策确定按钮
@@ -1595,10 +1691,28 @@ export default {
                 }
                 }
             });
             });
         },
         },
+        //领导审核理由
+        handleLeader() {
+            this.$refs.rejectRuleForm.validate(valid => {
+                if (valid) {
+                    const params = {
+                        id: this.tableOnlyId || this.queryByIdList.id,
+                        type: 4,
+                        value: this.reasonForm.desc
+                    };
+                    this.handleExamineAll(params);
+                    this.handleRejectCancel();
+                }
+                else {
+                    return false;
+                }
+            });
+        },
         // 审核拒绝取消按钮
         // 审核拒绝取消按钮
         handleRejectCancel() {
         handleRejectCancel() {
             this.reasonForm.desc = '';
             this.reasonForm.desc = '';
             this.rejectAuditStatus = false;
             this.rejectAuditStatus = false;
+            this.toLeaderVisible = false
         },
         },
         // 查看的按钮
         // 查看的按钮
         handleDetail(list) {
         handleDetail(list) {

+ 5 - 5
src/views/modules/settlement-account/settlement-account.vue

@@ -65,10 +65,10 @@
                         >
                         >
                             <a-select-option
                             <a-select-option
                                 v-for="item in allSaleListOption"
                                 v-for="item in allSaleListOption"
-                                :key="item.id"
-                                :value="item.realname"
+                                :key="item.saleId"
+                                :value="item.saleName"
                             >
                             >
-                                {{ item.realname }}
+                                {{ item.saleName }}
                             </a-select-option>
                             </a-select-option>
                         </a-select>
                         </a-select>
                     </a-form-item>
                     </a-form-item>
@@ -467,8 +467,8 @@ export default {
             const paramsData = {
             const paramsData = {
                 userId: this.userInfo().id
                 userId: this.userInfo().id
             };
             };
-            getAction(urlAcount + '/finance/settLementController/getResponsibleUserByIds', paramsData).then(result => {
-                if (result.code === 0) {
+            getAction(urlAcount + '/finance/cwjsSaleAssistantInfo/getSaleListByUserDepart', paramsData).then(result => {
+                if (result.success) {
                     this.allSaleListOption = result.result || [];
                     this.allSaleListOption = result.result || [];
                 }
                 }
                 else {
                 else {

+ 66 - 5
src/views/modules/settlement-information/settlement-information.vue

@@ -273,7 +273,7 @@
                     <a-form-model-item label="选择广告主公司名称" prop="advertiserId">
                     <a-form-model-item label="选择广告主公司名称" prop="advertiserId">
                         <a-select
                         <a-select
                             v-model="settlementModalForm.advertiserId"
                             v-model="settlementModalForm.advertiserId"
-                            placeholder="请选择广告名称"
+                            placeholder="请选择广告公司名称"
                             :filter-option="handleFilterOption"
                             :filter-option="handleFilterOption"
                             show-search
                             show-search
                             @change="handleAdverOptionChange"
                             @change="handleAdverOptionChange"
@@ -304,6 +304,23 @@
                             </a-select-option>
                             </a-select-option>
                         </a-select>
                         </a-select>
                     </a-form-model-item>
                     </a-form-model-item>
+                    <a-form-model-item label="选择项目名称" prop="projectId">
+                        <!-- /ctop/projectMember/participateListV2 -->
+                        <a-select
+                            v-model="settlementModalForm.projectId"
+                            placeholder="请选择项目名称"
+                            :filter-option="handleFilterOption"
+                            show-search
+                        >
+                            <a-select-option
+                                v-for="item in allProjectListOption"
+                                :key="item.projectId"
+                                :value="item.projectId"
+                            >
+                                {{ item.projectName }}
+                            </a-select-option>
+                        </a-select>
+                    </a-form-model-item>
                     <a-form-model-item label="时间" prop="uploadYears">
                     <a-form-model-item label="时间" prop="uploadYears">
                         <a-month-picker
                         <a-month-picker
                             v-model="settlementModalForm.uploadYears"
                             v-model="settlementModalForm.uploadYears"
@@ -387,6 +404,7 @@ export default {
             mode2: ['month', 'month'],
             mode2: ['month', 'month'],
             allAdverListOption: [],
             allAdverListOption: [],
             allProductListOption: [],
             allProductListOption: [],
+            allProjectListOption: [],
             controlLoading: false,
             controlLoading: false,
             allSaleListOption: [],
             allSaleListOption: [],
             profitModalForm: {
             profitModalForm: {
@@ -404,11 +422,13 @@ export default {
                 advertiserId: undefined,
                 advertiserId: undefined,
                 productId: undefined,
                 productId: undefined,
                 mediaId: 1,
                 mediaId: 1,
-                uploadYears: ''
+                uploadYears: '',
+                projectId: undefined
             },
             },
             settlementModalRules: {
             settlementModalRules: {
                 advertiserId: [{required: true, message: '请选择广告主公司名称', trigger: 'change'}],
                 advertiserId: [{required: true, message: '请选择广告主公司名称', trigger: 'change'}],
                 productId: [{required: true, message: '请选择产品名称', trigger: 'change'}],
                 productId: [{required: true, message: '请选择产品名称', trigger: 'change'}],
+                projectId: [{required: true, message: '请选择项目名称', trigger: 'change'}],
                 name8: [{required: true, message: '请选择项目名称', trigger: 'change'}],
                 name8: [{required: true, message: '请选择项目名称', trigger: 'change'}],
                 uploadYears: [{required: true, message: '请选择时间', trigger: 'change'}]
                 uploadYears: [{required: true, message: '请选择时间', trigger: 'change'}]
             },
             },
@@ -417,12 +437,14 @@ export default {
                 productId: undefined,
                 productId: undefined,
                 mediaId: 1,
                 mediaId: 1,
                 uploadYears: '',
                 uploadYears: '',
-                settlementList: []
+                settlementList: [],
+                projectId: undefined
             },
             },
             policyOperationRules: {
             policyOperationRules: {
                 advertiserId: [{required: true, message: '请选择广告主公司名称', trigger: 'change'}],
                 advertiserId: [{required: true, message: '请选择广告主公司名称', trigger: 'change'}],
                 productId: [{required: true, message: '请选择产品名称', trigger: 'change'}],
                 productId: [{required: true, message: '请选择产品名称', trigger: 'change'}],
-                uploadYears: [{required: true, message: '请选择时间', trigger: 'change'}]
+                uploadYears: [{required: true, message: '请选择时间', trigger: 'change'}],
+                projectId: [{required: true, message: '请选择项目名称', trigger: 'change'}],
             },
             },
             policyOperationStatus: false,
             policyOperationStatus: false,
             tablePag: {
             tablePag: {
@@ -535,6 +557,7 @@ export default {
             if (this.settlementModalForm.uploadYears) {
             if (this.settlementModalForm.uploadYears) {
                 this.handleGetDownLoadAllNum();
                 this.handleGetDownLoadAllNum();
             }
             }
+            this.handleProductOptionChange(e)
         },
         },
         handlePolicyUploadChange(e) {
         handlePolicyUploadChange(e) {
             this.policyOperationForm.advertiserId = undefined;
             this.policyOperationForm.advertiserId = undefined;
@@ -547,7 +570,9 @@ export default {
             this.settlementModalForm.advertiserId = undefined;
             this.settlementModalForm.advertiserId = undefined;
             this.allAdverListOption = [];
             this.allAdverListOption = [];
             this.settlementModalForm.productId = undefined;
             this.settlementModalForm.productId = undefined;
+            this.settlementModalForm.projectId = undefined;
             this.allProductListOption = [];
             this.allProductListOption = [];
+            this.allProjectListOption = [];
             this.downLoadAccountNum = 0;
             this.downLoadAccountNum = 0;
             this.downLoadImgNum = 0;
             this.downLoadImgNum = 0;
             this.settlementModalForm.uploadYears = '';
             this.settlementModalForm.uploadYears = '';
@@ -592,6 +617,7 @@ export default {
         handleAdverOptionChange(e) {
         handleAdverOptionChange(e) {
             this.policyOperationForm.productId = undefined;
             this.policyOperationForm.productId = undefined;
             this.settlementModalForm.productId = undefined;
             this.settlementModalForm.productId = undefined;
+            this.settlementModalForm.projectId = undefined;
             const paramsData = {
             const paramsData = {
                 pageNo: 1,
                 pageNo: 1,
                 pageSize: 1000,
                 pageSize: 1000,
@@ -608,6 +634,38 @@ export default {
                 console.log(error, 'eeee');
                 console.log(error, 'eeee');
             });
             });
         },
         },
+        handleProductOptionChange(e) {
+            this.policyOperationForm.projectId = undefined;
+            this.settlementModalForm.projectId = undefined;
+            const paramsData = {
+                pageNo: 1,
+                pageSize: 1000,
+                productId: e,
+                userId: this.userInfo().id,
+            };
+            getAction('/ctop/projectMember/participateListV2', paramsData).then(result => {
+                if (result.success) {
+                    var data = result.result.records || [];
+                    
+                    if(this.settlementModalForm.mediaId == 1) {
+                        this.allProjectListOption = data.filter(item=>{
+                            return item.mediaId == '1' || item.mediaId == '3'
+                        })
+                       
+                    }
+                    else if(this.settlementModalForm.mediaId == 2) {
+                        this.allProjectListOption = data.filter(item=>{
+                            return item.mediaId == '2' || item.mediaId == '4'
+                        })
+                    }
+                }
+                else {
+                    this.$message.error(result.message);
+                }
+            }).catch(error => {
+                console.log(error, 'eeee');
+            });
+        },
         handleAddTimesChange(data) {
         handleAddTimesChange(data) {
             this.configForm.time = data;
             this.configForm.time = data;
         },
         },
@@ -736,11 +794,12 @@ export default {
             this.$refs.settlementModalForm.validate(valid => {
             this.$refs.settlementModalForm.validate(valid => {
                 if (valid) {
                 if (valid) {
                     this.settlementConfirmLoad = true;
                     this.settlementConfirmLoad = true;
-                    const {advertiserId, productId, mediaId, uploadYears} = this.settlementModalForm;
+                    const {advertiserId, productId,projectId, mediaId, uploadYears} = this.settlementModalForm;
                     const paramsData = {
                     const paramsData = {
                         advertiserId,
                         advertiserId,
                         productId,
                         productId,
                         mediaId,
                         mediaId,
+                        projectId,
                         uploadYears: moment(uploadYears).format('YYYY-MM'),
                         uploadYears: moment(uploadYears).format('YYYY-MM'),
                         userId: this.userInfo().id
                         userId: this.userInfo().id
                     };
                     };
@@ -769,6 +828,7 @@ export default {
             this.settlementModalForm = {
             this.settlementModalForm = {
                 advertiserId: undefined,
                 advertiserId: undefined,
                 productId: undefined,
                 productId: undefined,
+                projectId: undefined,
                 mediaId: 1,
                 mediaId: 1,
                 uploadYears: ''
                 uploadYears: ''
             };
             };
@@ -958,6 +1018,7 @@ export default {
             this.policyOperationForm = {
             this.policyOperationForm = {
                 advertiserId: undefined,
                 advertiserId: undefined,
                 productId: undefined,
                 productId: undefined,
+                projectId: undefined,
                 mediaId: 1,
                 mediaId: 1,
                 uploadYears: '',
                 uploadYears: '',
                 settlementList: []
                 settlementList: []

+ 2 - 2
vue.config.js

@@ -114,9 +114,9 @@ module.exports = {
         //  target: 'http://adsp.tjyourong.com.cn/', //请求本地 需要jeecg-boot后台项目
         //  target: 'http://adsp.tjyourong.com.cn/', //请求本地 需要jeecg-boot后台项目
         // target: 'http://192.168.1.251/', //请求本地 需要jeecg-boot后台项目
         // target: 'http://192.168.1.251/', //请求本地 需要jeecg-boot后台项目
         // target:'http://118.24.244.213:8804',
         // target:'http://118.24.244.213:8804',
-        // target: 'http://192.168.1.43:9999', // 子安
+        target: 'http://192.168.1.43:9999', // 子安
         // target: 'http://192.168.1.8:9999', // 学超
         // target: 'http://192.168.1.8:9999', // 学超
-        target:'http://gateway.tjyourong.com.cn', //测试
+        // target:'http://gateway.tjyourong.com.cn', //测试
         // target:'http://apipre.tjyourong.com.cn', //预生产
         // target:'http://apipre.tjyourong.com.cn', //预生产
         // target: 'http://192.168.1.134:7001', //请求本地 需要jeecg-boot后台项目  周泽宇
         // target: 'http://192.168.1.134:7001', //请求本地 需要jeecg-boot后台项目  周泽宇