朱鑫波 vor 3 Jahren
Ursprung
Commit
a128fa4e24

+ 10 - 2
src/views/modules/Statistics/videoStatics/TTvideoStatics.vue

@@ -166,7 +166,7 @@
 				<p>剪辑:{{record.clip || '无'}}</p>
 				<p>拍摄:{{record.shot || '无'}}</p>
 				<p>编导:{{record.plan || '无'}}</p>
-				<p>负责人:{{record.leader || '无'}}</p>
+				<p>负责人:{{record.teamLeader || '无'}}</p>
 		</span>
 
 		</a-table>
@@ -279,7 +279,14 @@ const columnsFixd = [
     align: 'center',
     sorter: () => {}
   },
-
+      {
+    title:'首购率',
+    dataIndex:'firstPurchase',
+    key:'firstPurchase',
+    scopedSlots: { customRender: 'firstPurchase' },
+    align: 'center',
+    width:120,
+  },
   
 
 ]
@@ -315,6 +322,7 @@ let detailColumn=[
 ]
 
 const initVariableColimns=[
+
   {
     title: '消耗',
     dataIndex: 'cost',

+ 20 - 14
src/views/modules/policy-management/policy-management.less

@@ -3,7 +3,13 @@
     height: calc(100vh - 137px);
     padding: 20px;
     overflow-y: auto;
-
+    .line-table-width {
+        display: inline-block;
+        width: 100%;
+        overflow: hidden;
+        white-space: nowrap;
+        text-overflow: ellipsis;
+    }
     .control-con-title {
         height: 50px;
         display: flex;
@@ -130,10 +136,10 @@
 
     }
 
-    .ant-modal-body {
-        height: 440px;
-        overflow-y: auto;
-    }
+    // .ant-modal-body {
+    //     height: 440px;
+    //     overflow-y: auto;
+    // }
 
     .audit-policy-icon {
         position: absolute;
@@ -145,7 +151,7 @@
 
     .policy-line-quen {
         display: flex;
-        height: 345px;
+        // height: 345px;
 
         .line-quen-left,
         .line-quen-right {
@@ -172,7 +178,7 @@
                 .line-right-spn-else {
                     display: inline-block;
                     width: 280px;
-                    max-height: 130px;
+                    max-height: 100px;
                     overflow: auto;
                 }
 
@@ -184,10 +190,10 @@
 }
 ::v-deep .policy-operation-class {
     width: 1000px !important;
-    .ant-modal-body {
-        height: 600px;
-        overflow-y: auto;
-    }
+    // .ant-modal-body {
+    //     height: 600px;
+    //     overflow-y: auto;
+    // }
     .policy-operation-form {
         display: flex;
         .group-abbreviation-class {
@@ -240,9 +246,9 @@
             .isActive {
                 padding-left: 139px;
             }
-            // ::v-deep .ant-col-14 {
-            //     width: 100%;
-            // }
+            ::v-deep .ant-col-14 {
+                width: 100%;
+            }
         }
     }
 }

+ 426 - 26
src/views/modules/policy-management/policy-management.vue

@@ -5,6 +5,9 @@
                 <span class="policy-export-btn">销售政策列表</span>
             </div>
             <div>
+                <span v-if="userInfo().roleName == '管理员'||userInfo().roleName == '销售总监'" class="add-acount-policy-btn">
+                    <a-button @click="handleAddSale">销售对应人员</a-button>
+                </span>
                 <span v-if="userInfo().roleName !== '财务'" class="add-acount-policy-btn">
                     <a-button type="primary" @click="handleAddAccountPolicy">新增政策</a-button>
                 </span>
@@ -88,10 +91,10 @@
                         >
                             <a-select-option
                                 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>
                     </a-form-item>
@@ -185,7 +188,13 @@
                     <span>{{ text }} 至 {{ record.policyEndDate }}</span>
                 </span>
                 <span slot="remarks" slot-scope="text">
-                    <span>{{ text ? text : '-' }}</span>
+                     <a-tooltip>
+                        <template slot="title" v-if="text">
+                        {{text}}
+                        </template>
+                        <span class="line-table-width">{{ text ? text : '-' }}</span>
+                    </a-tooltip>
+                    
                 </span>
                 <span slot="action" slot-scope="text, record">
                     <a v-if="record.updateOperation.includes('查看')" @click="handleDetail(record)">操作</a>
@@ -250,11 +259,11 @@
                     <div class="line-quen-left">
                         <div class="policy-line-left">
                             <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 class="policy-line-left">
                             <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 class="policy-line-left">
                             <span class="line-left-spn">产品名称:</span>
@@ -290,7 +299,7 @@
                         </div>
                         <div class="policy-line-left">
                             <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 class="line-quen-right">
@@ -318,7 +327,7 @@
                             <div v-if="queryByIdList.isDianPay === 1">
                                 <div class="policy-line-right">
                                     <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 class="policy-line-right">
                                     <span class="line-left-spn">垫付返点:</span>
@@ -334,11 +343,18 @@
                             <span class="line-left-spn">备注:</span>
                             <span class="line-right-spn-else">{{ queryByIdList.remarks || '-' }}</span>
                         </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 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="primary" @click="handleAuditSure">审核通过</a-button>
                     </div>
@@ -372,6 +388,36 @@
                 </a-form-model>
             </div>
         </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
             v-if="policyOperationStatus"
@@ -454,19 +500,22 @@
                             </a-select>
                         </a-form-model-item>
                         <a-form-model-item label="销售" prop="createUserId">
+                            <!-- @change="showAreaInfo" -->
                             <a-select
                                 v-model="policyOperationForm.createUserId"
                                 style="width: 100px"
                                 show-search
                                 allow-clear
                                 :filter-option="handleFilterOption"
+
                             >
                                 <a-select-option
                                     v-for="item in saleShowOption"
-                                    :key="item.userId"
-                                    :value="item.userId"
+                                    :key="item.saleId"
+                                    :value="item.saleId"
+                                   
                                 >
-                                    {{ item.userName }}
+                                    {{ item.saleName }}
                                 </a-select-option>
                             </a-select>
                         </a-form-model-item>
@@ -484,6 +533,7 @@
                                     {{ item }}
                                 </a-select-option>
                             </a-select>
+                            <!-- {{policyOperationForm.areaInfo}} -->
                         </a-form-model-item>
                         <a-form-model-item label="我司主体" prop="companySubjectName">
                             <a-select
@@ -521,12 +571,11 @@
                                 <template slot="title">由销售人员自行定义的集团系列产品简称</template>
                                 <a-icon class="settlement-header-icon" type="question-circle"/>
                             </a-tooltip>
-                            <a-form-model-item label="集团简称">
+                            <a-form-model-item label="集团简称" prop="groupAbbreviation">
                                 <a-input
                                     v-model="policyOperationForm.groupAbbreviation"
                                     placeholder="请输入集团简称"
                                     allow-clear
-                                    @change="handleGroupAbbreviationChange"
                                 />
                             </a-form-model-item>
                             <div v-if="subTitleMsgStatus" style="color: #f00;margin-left: 140px">只能输入30个汉字</div>
@@ -555,7 +604,13 @@
                                 <a-select-option :value="3">服务费</a-select-option>
                             </a-select>
                         </a-form-model-item>
-                        <a-form-model-item label="返点比例" prop="rebateRate">
+                        <a-form-model-item :label="policyOperationForm.rebateType == 3?'服务费':'返点比例'" prop="rebateRate"
+                        :rules="{
+                            required: true,
+                            message: policyOperationForm.rebateType == 3?'请输入服务费比例':'请输入返点比例',
+                            trigger: 'blur',
+                        }"
+                        >
                             <a-input-number
                                 v-model="policyOperationForm.rebateRate"
                                 :step="0.01"
@@ -604,7 +659,7 @@
                                 @change="handleAddTimesChange"
                             />
                         </a-form-model-item>
-                        <a-form-model-item label="备注">
+                        <a-form-model-item label="备注" prop="remarks">
                             <a-input
                                 v-model="policyOperationForm.remarks"
                                 placeholder="请输入备注"
@@ -612,11 +667,91 @@
                                 @change="handleRemarksChange"
                             />
                         </a-form-model-item>
-                        <div v-if="remarksStatus" style="color: #f00;margin-left: 140px">只能输入100个汉字</div>
                     </a-row>
                 </a-form-model>
             </div>
         </a-modal>
+
+        <!-- 销售对应人员 -->
+        <a-modal
+            v-if="saleVisible"
+            title="销售对应人员"
+            :visible="saleVisible"
+            @cancel="handleSaleCancel"
+            :width="1000"
+            :footer="null"
+        >
+            <a-button  type="primary" style="margin-bottom:10px" id="mybtn" @click="addSaleInfo">新增</a-button>
+            <br>
+            设定对应关系后,该销售助理可以查看、创建对应销售的政策以及下载该销售负责账户的结算单
+            <a-table
+            :columns="saleInfoColumns"
+            :data-source="saleInfoList"
+            bordered
+            tableLayout="auto"
+            :pagination="false"
+            :loading='saleLoading'
+            style="word-break: break-all;"
+            >
+                <div slot="saleName" slot-scope="text, records">
+                    <span v-if="!records.edit">{{ text }}</span>
+                    <a-select
+                        v-else
+                        show-search
+                        v-model="records.saleIdContent"
+                        placeholder="请选择销售"
+                        option-filter-prop="children"
+                        style="width: 200px"
+                        :filter-option="filterOption"
+                        :labelInValue="true"
+                    >
+                        <a-select-option v-for="(item, index) in salePersonList" :key="index" :value="item.key" :disabled="records.assistantIdContent?records.assistantIdContent.key == item.key:false">
+                            {{item.label}}
+                        </a-select-option>
+                    </a-select>
+                </div>
+                <div slot="assistantName" slot-scope="text, records">
+                    <span v-if="!records.edit">{{ text }}</span>
+                    <a-select
+                        v-else
+                        show-search
+                        v-model="records.assistantIdContent"
+                        placeholder="请选择销售助理"
+                        option-filter-prop="children"
+                        style="width: 200px"
+                        :filter-option="filterOption"
+                        :labelInValue="true"
+                    >
+                        <a-select-option v-for="(item, index) in salePersonList" :key="index" :value="item.key" :disabled="records.saleIdContent?records.saleIdContent.key == item.key:false">
+                            {{item.label}}
+                        </a-select-option>
+                    </a-select>
+                </div>
+                <div slot="action" slot-scope="text, records">
+                    <div v-if="!records.edit">
+                        <a @click="handleEdit(records)">编辑</a>
+                        <a-divider type="vertical"/>
+                        <a-popconfirm title="是否确认删除?" @confirm="() => handleDelete(records.id)">
+                            <a>删除</a>
+                        </a-popconfirm>
+                    </div>
+                    <div v-else>
+                        <a-button type="primary" @click="handleSale(records)">保存</a-button>
+                        <a-button style="margin-left: 8px" @click="handleSaleCancelOne(records)">取消</a-button>
+                    </div>
+                </div>
+
+            </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>
     </div>
 </template>
 <script>
@@ -762,18 +897,25 @@ export default {
                 areaInfo: [{required: true, message: '请选择区域', trigger: 'change'}],
                 companySubjectName: [{required: true, message: '请选择我司主体', trigger: 'change'}],
                 rebateRate: [{required: true, message: '请输入返点比例', trigger: 'blur'}],
+                rebateRateElse: [{required: true, message: '请输入请输入服务费比例', trigger: 'blur'}],
                 accountingPeriod: [{required: true, message: '请输入账期', trigger: 'blur'}],
                 dianPayCompanyName: [
                     {required: true, message: '请输入垫付公司', trigger: 'blur'},
                     {validator: handleCharacterLen30, 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: {
                 desc: [
                     {required: true, message: '请输入审核拒绝理由', trigger: 'blur'},
-                    {validator: handleCharacterLen100, trigger: 'blur'}
+                    { min: 5, max: 100, message: '请输入5-100个字符', trigger: 'blur' },
                 ]
             },
             dataSource: [],
@@ -924,7 +1066,52 @@ export default {
             saleShowOption: [],
             addSubjectList: [],
             rejectionReasonList: {},
-            tableOnlyId: ''
+            tableOnlyId: '',
+            saleVisible: false,
+            saleInfoList: [],
+            salePersonList: [],
+            saleLoading:false,
+            saleInfoColumns: [
+                {
+                    title: '销售名称',
+                    dataIndex: 'saleName',
+                    align: 'center',
+                    key: 'saleName',
+                    scopedSlots: { customRender: 'saleName' }
+                },
+                {
+                    title: '销售助理名称',
+                    dataIndex: 'assistantName',
+                    align: 'center',
+                    scopedSlots: { customRender: 'assistantName' }
+                },
+                {
+                    title: '操作',
+                    dataIndex: 'action',
+                    align: 'center',
+                    scopedSlots: { customRender: 'action' }
+                },
+            ],
+            ipagination: {
+                current: 1,
+                pageSize: 10,
+                
+                showTotal: (total, range) => {
+                    return range[0] + "-" + range[1] + " 共" + total + "条"
+                },
+                showQuickJumper: true,
+                showSizeChanger:true,
+                pageSizeOptions: ['10', '30', '50'],
+                total: 0,
+                onChange: (current, pageSize) => {
+                    // 切换分页时的回调,
+                    // 当在页面定义change事件时,切记要把此处的事件清除,因为这两个事件重叠了,可能到时候会导致一些莫名的bug
+                    this.ipagination.current = current;
+                    this.ipagination.pageSize= pageSize;
+                    this.getSaleList()
+                }
+            },
+            toLeaderVisible: false,
         };
     },
     created() {
@@ -938,6 +1125,160 @@ export default {
     methods: {
         ...mapGetters(['userInfo']),
         moment,
+        toLeader () {
+            // this.queryByIdList
+            this.toLeaderVisible = true
+        },
+        handleCurrey (current, pageSize)  {
+            // 切换分页时的回调,
+            // 当在页面定义change事件时,切记要把此处的事件清除,因为这两个事件重叠了,可能到时候会导致一些莫名的bug
+            this.ipagination.current = current;
+            this.ipagination.pageSize= pageSize;
+            this.getSaleList()
+        },
+        //新建销售对应人员
+        handleAddSale(){
+            this.ipagination.current = 1
+            this.saleVisible = true
+            this.getSaleList()
+            this.getSalePersonList()
+        },
+        getSalePersonList(){
+            let params = {}
+            params.userId = this.userInfo().id
+            
+            this.getAction(urlAcount + '/finance/cwjsSaleAssistantInfo/getSaleListByUserDepart', params).then(result => {
+                if(result.success) {
+                    this.salePersonList = result.result.map(item => {
+                        return {
+                            key: item.saleId,
+                            label: item.saleName
+                        }
+                    })
+                }
+                else {
+                    this.$message.error(result.message)
+                }
+            }).catch(() => {
+
+            })
+        },
+        //新增
+        addSaleInfo(){
+            this.saleInfoList.push( {
+                saleId:undefined,
+                assistantId:undefined,
+                edit: true,
+                saleIdContent: undefined,
+                assistantIdContent: undefined
+            }) 
+        },
+        //获取销售对应列表
+        getSaleList(){
+            let params = {}
+            params.userId = this.userInfo().id
+            params.pageNo = this.ipagination.current
+            params.pageSize = this.ipagination.pageSize
+            this.saleLoading = true
+            this.getAction(urlAcount + '/finance/cwjsSaleAssistantInfo/list', params).then(result => {
+                this.saleLoading = false
+                if(result.success) {
+                    this.saleInfoList = result.result.records.map(item => {
+                        return {
+                            ...item,
+                            edit: false,
+                            saleIdContent: undefined,
+                            assistantIdContent: undefined
+                        }
+                    }) || []
+                    this.ipagination.total = result.result.total || 0
+                }
+                else {
+                    this.$message.error(result.message)
+                }
+            }).catch(() => {
+
+            })
+        },
+        //编辑销售对应人员按钮
+        handleEdit(item){
+            item.edit = true
+            item.saleIdContent = {key: item.saleId, label: item.saleName}
+            item.assistantIdContent = {key: item.assistantId, label: item.assistantName}
+        },
+        //删除销售对应人员按钮
+        handleDelete(id){
+            let params = {}
+            params.id = id
+            this.getAction(urlAcount + '/finance/cwjsSaleAssistantInfo/delete', params).then(result => {
+                if(result.success) {
+                    // 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){
+            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 {
+                this.$message.error('请选择人员')
+            }
+            
+        },
+        //销售对应人员取消确定按钮
+        handleSaleCancelOne(item){
+            
+            if(item.id){
+                item.edit = false
+            }
+            else{
+                this.saleInfoList.pop()
+            }
+        },
+        //销售对应人员取消按钮
+        handleSaleCancel(){
+            this.saleVisible = false
+        },
+
         calculationScope(data) {
             let defaultScope = '';
             switch (data) {
@@ -958,9 +1299,24 @@ export default {
         handleFilterOption(input, option) {
             return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0;
         },
+        filterOption(input, option) {
+            return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0;
+        },
         handleAddTimesChange(date, dateString) {
             this.policyOperationForm.addTimes = dateString;
         },
+        showAreaInfo(data){
+            if(data){
+                var dataShow = this.saleShowOption.filter(item=>{
+                    return item.saleId == data
+                })
+                this.policyOperationForm.areaInfo = dataShow[0].nickName
+            }
+            else {
+                this.policyOperationForm.areaInfo = undefined
+            }
+           
+        },
         handleAddGetArea(data) {
             const paramsData = {
                 userId: this.userInfo().id
@@ -968,9 +1324,33 @@ export default {
             getAction(urlAcount + '/finance/cwjsPolicyInfo/queryAeraByUserId', paramsData).then(result => {
                 if (result.code === 0) {
                     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.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 {
                     this.$message.error(result.message);
@@ -978,6 +1358,8 @@ export default {
             }).catch(error => {
                 console.log(error, 'eeee');
             });
+           
+            
         },
         handleExamineAll(data) {
             const paramsData = {
@@ -1005,8 +1387,8 @@ export default {
             const paramsData = {
                 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 || [];
                 }
                 else {
@@ -1204,7 +1586,7 @@ export default {
         // 新增政策按钮
         handleAddAccountPolicy() {
             this.addType = 'add';
-            this.policyOperationForm.createUserId = this.saleShowOption[0].userId || '';
+            this.policyOperationForm.createUserId = this.userInfo().id;
             this.policyOperationStatus = true;
         },
         // 新增政策确定按钮
@@ -1309,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() {
             this.reasonForm.desc = '';
             this.rejectAuditStatus = false;
+            this.toLeaderVisible = false
         },
         // 查看的按钮
         handleDetail(list) {

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

@@ -65,10 +65,10 @@
                         >
                             <a-select-option
                                 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>
                     </a-form-item>
@@ -467,8 +467,8 @@ export default {
             const paramsData = {
                 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 || [];
                 }
                 else {

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

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

+ 1 - 1
vue.config.js

@@ -105,7 +105,7 @@ module.exports = {
         // target: 'http://192.168.1.43:8088', //请求本地 需要jeecg-boot后台项目  毕洁泉
         // target: 'http://192.168.1.43:8806', //请求本地 需要jeecg-boot后台项目  毕洁泉
         // target: 'http://192.168.0.252:8098', //请求本地 需要jeecg-boot后台项目  毕洁泉
-        // target: 'http://192.168.1.219:7701', //请求本地 需要jeecg-boot后台项目  赵西安
+        // target: 'http://192.168.1.59:7001', //请求本地 需要jeecg-boot后台项目  赵西安
         // target: 'http://192.168.1.193:8080', //请求本地 需要jeecg-boot后台项目  李煜一
         // target: 'http://192.168.1.193:31012', //请求本地 需要jeecg-boot后台项目  李煜一
         target: 'http://api.tjyourong.com.cn', //请求本地 需要jeecg-boot后台项目