浏览代码

账户列表 联调

jiayufei 3 年之前
父节点
当前提交
7f7e9ca8ea

+ 2 - 2
src/utils/request.js

@@ -19,8 +19,8 @@ else if (process.env.NODE_ENV === 'debug') {
 }
 else if (process.env.NODE_ENV === 'production') {
 	// 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'; // 生产环境
 }
 const service = axios.create({
 	// baseURL: '/jeecg-boot', // api base_url

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

@@ -1,5 +1,5 @@
 /**
- * @file 账户配置API
+ * @file 政策管理模块配置API
  * @author jiayufei
  */
 

+ 91 - 0
src/views/modules/policy-management/policy-management.less

@@ -3,70 +3,138 @@
     height: calc(100vh - 137px);
     padding: 20px;
     overflow-y: auto;
+
     .control-con-title {
         height: 50px;
         display: flex;
         justify-content: space-between;
         align-items: center;
+
         .add-acount-policy-btn {
             margin-left: 15px;
         }
+
         .policy-export-btn {
             font-size: 18px;
             font-weight: bold;
         }
+
     }
     .control-con-header {
         margin-bottom: 20px;
         position: relative;
+
         .grid-form-options {
             margin-bottom: 10px;
         }
+
         .acount-search-class {
             width: 450px;
         }
+
         .reset-class {
             margin-right: 10px !important;
         }
+
         .upload-person {
             position: absolute;
             right: 10px;
             top: 0;
         }
+
     }
+
+    // .control-con-table {
+    //     /* 设置滚动条的样式 */
+    //     ::-webkit-scrollbar {
+    //         width:12px;
+    //         background: #fff !important;
+    //     }
+    //     /* 滚动槽 */
+    //     ::-webkit-scrollbar-track {
+    //         background: #fff !important;
+    //     }
+    //     /* 滚动条滑块 */
+    //     ::-webkit-scrollbar-thumb {
+    //         border-radius:10px;
+    //         background:#000;
+    //     }
+    //     ::-webkit-scrollbar-thumb:window-inactive {
+    //         background:#ccc;
+    //     }
+    //     ::-webkit-scrollbar-button:hover {  
+    //         /*当鼠标在水平滚动条下面的按钮上的状态*/ 
+    //         background:#f00 
+    //     }  
+    // }
+
     .pagin-table-class {
         display: flex;
         justify-content: flex-end;
         margin-top: 20px;
     }
+
 }
 /deep/ .rejection-reason-class {
     width: 600px !important;
+
+    .audit-policy-icon {
+        position: absolute;
+        right: 22px;
+        top: 20px;
+        font-size: 15px;
+        cursor: pointer;
+    }
+
+    .audit-policy-footer {
+        display: flex;
+        justify-content: space-between;
+        align-items: center;
+        border-top: 1px solid #e8e8e8;
+
+        .cancel-btn {
+            margin-right: 12px;
+            margin-top: 12px;
+        }
+
+    }
+
     .reason-class-header {
         margin-bottom: 18px;
         font-size: 16px;
         font-weight: bold;
     }
+
+    .reason-class-content {
+        height: 100px;
+    }
+
     .rejection-textarea-msg {
         height: 150px;
     }
+
 }
 /deep/ .audit-policy-class {
     width: 930px !important;
+
     .audit-policy-footer {
         display: flex;
         justify-content: space-between;
         align-items: center;
         border-top: 1px solid #e8e8e8;
+
         .cancel-btn {
             margin-right: 12px;
             margin-top: 12px;
         }
+
     }
+
     .ant-modal-body {
         height: 440px;
         overflow-y: auto;
     }
+
     .audit-policy-icon {
         position: absolute;
         right: 22px;
@@ -74,22 +142,27 @@
         font-size: 15px;
         cursor: pointer;
     }
+
     .policy-line-quen {
         display: flex;
         height: 345px;
         overflow-y: auto;
+
         .line-quen-left,
         .line-quen-right {
             flex: 1;
+
             .policy-line-left,
             .policy-line-right {
                 display: flex;
                 margin-bottom: 16px;
+
                 .line-left-spn {
                     display: inline-block;
                     width: 120px;
                     text-align: right;
                 }
+
                 .line-right-spn {
                     display: inline-block;
                     width: 220px;
@@ -97,8 +170,11 @@
                     white-space: nowrap;
                     text-overflow: ellipsis;
                 }
+
             }
+
         }
+
     }
 }
 /deep/ .policy-operation-class {
@@ -109,6 +185,21 @@
     }
     .policy-operation-form {
         display: flex;
+        .group-abbreviation-class {
+            display: flex;
+            .settlement-header-icon {
+                margin-left: 47px;
+                margin-top: 12px;
+            }
+        }
+        .promotion-type-class {
+            position: relative;
+            .settlement-header-icon {
+                position: absolute;
+                left: -90px;
+                top: 3px;
+            }
+        }
         .policy-operation-form-left,
         .policy-operation-form-right {
             flex: 1;

+ 155 - 59
src/views/modules/policy-management/policy-management.vue

@@ -1,10 +1,12 @@
 <template>
     <div class="policy-management-content">
         <div class="control-con-title">
-            <div><span class="policy-export-btn">销售政策列表</span></div>
+            <div>
+                <span class="policy-export-btn">销售政策列表</span>
+            </div>
             <div>
                 <span v-if="userInfo().roleName !== '财务'" class="add-acount-policy-btn">
-                    <a-button type="primary" @click="handleAddAccountPolicy">创建账户政策</a-button>
+                    <a-button type="primary" @click="handleAddAccountPolicy">新增政策</a-button>
                 </span>
             </div>
         </div>
@@ -38,7 +40,11 @@
                         <a-input v-model="configForm.productName" placeholder="请输入产品名称" allow-clear/>
                     </a-form-item>
                     <a-form-item label="媒体:">
-                        <a-select v-model="configForm.creativeMedia" style="width: 100px" allow-clear>
+                        <a-select
+                            v-model="configForm.creativeMedia"
+                            style="width: 100px"
+                            allow-clear
+                        >
                             <a-select-option
                                 v-for="item in creativeMediaOptions"
                                 :key="item.id"
@@ -49,7 +55,11 @@
                         </a-select>
                     </a-form-item>
                     <a-form-item label="返点类型:">
-                        <a-select v-model="configForm.creativeRebate" style="width: 140px" allow-clear>
+                        <a-select
+                            v-model="configForm.creativeRebate"
+                            style="width: 140px"
+                            allow-clear
+                        >
                             <a-select-option
                                 v-for="item in creativeRebateOptions"
                                 :key="item.id"
@@ -86,17 +96,17 @@
                         </a-select>
                     </a-form-item>
                     <a-form-item label="运营方式:">
-                        <a-select v-model="configForm.creativeOperate" style="width: 100px" allow-clear>
+                        <a-select
+                            v-model="configForm.creativeOperate"
+                            style="width: 100px"
+                            allow-clear
+                        >
                             <a-select-option value="no">不限</a-select-option>
                             <a-select-option :value="0">自运营</a-select-option>
                             <a-select-option :value="1">代运营</a-select-option>
                         </a-select>
                     </a-form-item>
-                    <a-form-item
-                        class="grid-form-item"
-                        label="时间:"
-                        :colon="false"
-                    >
+                    <a-form-item class="grid-form-item" label="时间:" :colon="false">
                         <a-range-picker
                             v-model="configForm.time"
                             format="YYYY-MM-DD"
@@ -104,7 +114,11 @@
                         />
                     </a-form-item>
                     <a-form-item label="状态:">
-                        <a-select v-model="configForm.searchStatus" style="width: 100px" allow-clear>
+                        <a-select
+                            v-model="configForm.searchStatus"
+                            style="width: 100px"
+                            allow-clear
+                        >
                             <a-select-option
                                 v-for="item in searchStatusOptions"
                                 :key="item.id"
@@ -150,7 +164,7 @@
                     <span>{{ text === 0 ? '否' : '是' }}</span>
                 </span>
                 <span slot="isDianPay" slot-scope="text">
-                    <span>{{ text === 0 ? '否' : '是' }}</span>
+                    <span>{{ calculationScope(text) }}</span>
                 </span>
                 <span slot="updateApprovedStatus" slot-scope="text">
                     <a>{{ text }}</a>
@@ -159,10 +173,13 @@
                     <span>{{ text ? text : '-' }}</span>
                 </span>
                 <span slot="dianPayCompanyRebateRate" slot-scope="text">
-                    <span>{{ text ? text : '-' }}</span>
+                    <span>{{ text ? text + '%' : '-' }}</span>
                 </span>
                 <span slot="accountingPeriod" slot-scope="text">
-                    <span>{{ text }}</span>
+                    <span>{{ text ? text + '天' : '-' }}</span>
+                </span>
+                <span slot="rebateRate" slot-scope="text">
+                    <span>{{ text ? text + '%' : '-' }}</span>
                 </span>
                 <span slot="policyStartDate" slot-scope="text, record">
                     <span>{{ text }} 至 {{ record.policyEndDate }}</span>
@@ -200,24 +217,31 @@
         <a-modal
             v-if="rejectionReasonStatus"
             title="审核不通过"
-            :visible="rejectionReasonStatus"
             dialog-class="rejection-reason-class"
-            @ok="handleModeSure"
-            @cancel="handleModeCancel"
+            :visible="rejectionReasonStatus"
+            :footer="null"
+            :closable="false"
         >
             <div>
+                <span class="audit-policy-icon" @click="handleModeCancel"><a-icon type="close"/></span>
                 <div class="reason-class-header">审核不通过的理由:</div>
-                <div>{{ rejectionReasonList.approvalContent }}</div>
+                <div class="reason-class-content">{{ rejectionReasonList.approvalContent }}</div>
+                <div solt="footer" class="audit-policy-footer">
+                    <div></div>
+                    <div>
+                        <a-button type="default" class="cancel-btn" @click="handleModeCancel">取消</a-button>
+                    </div>
+                </div>
             </div>
         </a-modal>
         <!-- 查看详情 -->
         <a-modal
             v-if="auditPolicyStatus"
             title="审核政策"
+            dialog-class="audit-policy-class"
             :visible="auditPolicyStatus"
             :closable="false"
             :footer="null"
-            dialog-class="audit-policy-class"
         >
             <div>
                 <span class="audit-policy-icon" @click="handleCloseAuditPolicy"><a-icon type="close"/></span>
@@ -279,12 +303,12 @@
                         </div>
                         <div class="policy-line-right">
                             <span class="line-left-spn">返点比例:</span>
-                            <span class="line-right-spn">{{ queryByIdList.rebateRate }}</span>
+                            <span class="line-right-spn">{{ queryByIdList.rebateRate + '%' }}</span>
                         </div>
                         <div v-if="queryByIdList.advancePay === 0">
                             <div class="policy-line-right">
                                 <span class="line-left-spn">账期:</span>
-                                <span class="line-right-spn">{{ queryByIdList.accountingPeriod }}</span>
+                                <span class="line-right-spn">{{ queryByIdList.accountingPeriod && queryByIdList.accountingPeriod + '天' }}</span>
                             </div>
                             <div class="policy-line-right">
                                 <span class="line-left-spn">是否第三方垫付:</span>
@@ -297,7 +321,7 @@
                                 </div>
                                 <div class="policy-line-right">
                                     <span class="line-left-spn">垫付返点:</span>
-                                    <span class="line-right-spn">{{ queryByIdList.dianPayCompanyRebateRate }}</span>
+                                    <span class="line-right-spn">{{ queryByIdList.dianPayCompanyRebateRate && queryByIdList.dianPayCompanyRebateRate + '%' }}</span>
                                 </div>
                             </div>
                         </div>
@@ -324,8 +348,8 @@
         <a-modal
             v-if="rejectAuditStatus"
             title="审核不通过"
-            :visible="rejectAuditStatus"
             dialog-class="rejection-reason-class"
+            :visible="rejectAuditStatus"
             @ok="handleRejectSure"
             @cancel="handleRejectCancel"
         >
@@ -350,9 +374,9 @@
         <!-- 新增、编辑政策 -->
         <a-modal
             v-if="policyOperationStatus"
+            dialog-class="policy-operation-class"
             :title="addType === 'add' ? '新增政策' : '编辑政策'"
             :visible="policyOperationStatus"
-            dialog-class="policy-operation-class"
             :confirmLoading="confirmLoading"
             @ok="handlePolicyOperationSure"
             @cancel="handlePolicyOperationCancel"
@@ -381,21 +405,47 @@
                                 allow-clear
                             />
                         </a-form-model-item>
-                        <div class="product-name-class" v-for="(item, index) in policyOperationForm.defaultFormList" :key="item.id">
+                        <div
+                            class="product-name-class"
+                            v-for="(item, index) in policyOperationForm.defaultFormList"
+                            :key="item.id"
+                        >
                             <a-form-model-item
                                 :label="index === 0 ? '产品名称' : ''"
                                 :class="{'isActive': index > 0 }"
                                 :prop="'defaultFormList.' + index + '.value'"
                                 :rules="changeRules"
                             >
-                                <a-input class="input-common-short" v-model="item.value" placeholder="请输入" allow-clear/>
-                                <a-icon v-if="index === 0" class="circle-icon-class circle-icon-plus" type="plus-circle" @click="handleAddOrigin"/>
-                                <a-icon v-if="policyOperationForm.defaultFormList.length > 1 && index === 0" class="circle-icon-class circle-icon-minus" type="minus-circle" @click="handleDelOrigin(item)"/>
-                                <a-icon v-if="policyOperationForm.defaultFormList.length > 1 && index > 0" class="circle-icon-class circle-icon-plus" type="minus-circle" @click="handleDelOrigin(item)"/>
+                                <a-input
+                                    class="input-common-short"
+                                    v-model="item.value"
+                                    placeholder="请输入"
+                                    allow-clear
+                                />
+                                <a-icon
+                                    v-if="index === 0"
+                                    class="circle-icon-class circle-icon-plus"
+                                    type="plus-circle"
+                                    @click="handleAddOrigin"
+                                />
+                                <a-icon
+                                    v-if="policyOperationForm.defaultFormList.length > 1 && index === 0" class="circle-icon-class circle-icon-minus"
+                                    type="minus-circle"
+                                    @click="handleDelOrigin(item)"
+                                />
+                                <a-icon
+                                    v-if="policyOperationForm.defaultFormList.length > 1 && index > 0" class="circle-icon-class circle-icon-plus"
+                                    type="minus-circle"
+                                    @click="handleDelOrigin(item)"
+                                />
                             </a-form-model-item>
                         </div>
                         <a-form-model-item label="媒体" prop="mediaType">
-                            <a-select v-model="policyOperationForm.mediaType" placeholder="请选择投放媒体" allow-clear>
+                            <a-select
+                                v-model="policyOperationForm.mediaType"
+                                placeholder="请选择投放媒体"
+                                allow-clear
+                            >
                                 <a-select-option :value="1">头条</a-select-option>
                                 <a-select-option :value="2">快手</a-select-option>
                             </a-select>
@@ -404,9 +454,9 @@
                             <a-select
                                 v-model="policyOperationForm.createUserId"
                                 style="width: 100px"
-                                :filter-option="handleFilterOption"
                                 show-search
                                 allow-clear
+                                :filter-option="handleFilterOption"
                             >
                                 <a-select-option
                                     v-for="item in saleShowOption"
@@ -418,7 +468,11 @@
                             </a-select>
                         </a-form-model-item>
                         <a-form-model-item label="区域" prop="areaInfo">
-                            <a-select v-model="policyOperationForm.areaInfo" placeholder="请选择区域" allow-clear>
+                            <a-select
+                                v-model="policyOperationForm.areaInfo"
+                                placeholder="请选择区域"
+                                allow-clear
+                            >
                                 <a-select-option
                                     v-for="item in addAreaList"
                                     :key="item"
@@ -432,9 +486,9 @@
                             <a-select
                                 v-model="policyOperationForm.companySubjectName"
                                 placeholder="请选择我司主体"
-                                :filter-option="handleFilterOption"
                                 show-search
                                 allow-clear
+                                :filter-option="handleFilterOption"
                             >
                                 <a-select-option
                                     v-for="item in addSubjectList"
@@ -445,31 +499,53 @@
                                 </a-select-option>
                             </a-select>
                         </a-form-model-item>
-                        <a-form-model-item label="运营方式" prop="promotionType">
+                        <a-form-model-item
+                            class="promotion-type-class"
+                            label="运营方式"
+                            prop="promotionType"
+                        >
                             <a-radio-group v-model="policyOperationForm.promotionType" button-style="solid">
                                 <a-radio-button :value="0">自运营</a-radio-button>
                                 <a-radio-button :value="1">代运营</a-radio-button>
                             </a-radio-group>
+                            <a-tooltip>
+                                <template slot="title">自运营是客户自己运营,代运营由我们帮助客户运营账户</template>
+                                <a-icon class="settlement-header-icon" type="question-circle"/>
+                            </a-tooltip>
                         </a-form-model-item>
-                        <a-form-model-item label="集团简称">
-                            <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>
+                        <div class="group-abbreviation-class">
+                            <a-tooltip>
+                                <template slot="title">由销售人员自行定义的集团系列产品简称</template>
+                                <a-icon class="settlement-header-icon" type="question-circle"/>
+                            </a-tooltip>
+                            <a-form-model-item label="集团简称">
+                                <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>
+                        </div>
                     </a-row>
                     <a-row class="policy-operation-form-right">
                         <a-form-model-item label="是否预付" prop="advancePay">
-                            <a-radio-group v-model="policyOperationForm.advancePay" button-style="solid" @change="handlePrepaidNotChange">
+                            <a-radio-group
+                                v-model="policyOperationForm.advancePay"
+                                button-style="solid"
+                                @change="handlePrepaidNotChange"
+                            >
                                 <a-radio-button :value="1">是</a-radio-button>
                                 <a-radio-button :value="0">否</a-radio-button>
                             </a-radio-group>
                         </a-form-model-item>
                         <a-form-model-item label="返点类型:" prop="rebateType">
-                            <a-select v-model="policyOperationForm.rebateType" placeholder="请选择返点类型" allow-clear>
+                            <a-select
+                                v-model="policyOperationForm.rebateType"
+                                placeholder="请选择返点类型"
+                                allow-clear
+                            >
                                 <a-select-option :value="0">返现</a-select-option>
                                 <a-select-option :value="1">返货</a-select-option>
                                 <a-select-option :value="2">返现+返货</a-select-option>
@@ -482,15 +558,20 @@
                                 :precision="2"
                             /> %
                         </a-form-model-item>
-                        <a-form-model-item v-if="policyOperationForm.advancePay === 0" label="账期" prop="accountingPeriod">
-                            <a-input-number
-                                v-model="policyOperationForm.accountingPeriod"
-                                :precision="0"
-                            /> 天
+                        <a-form-model-item
+                            v-if="policyOperationForm.advancePay === 0"
+                            label="账期"
+                            prop="accountingPeriod"
+                        >
+                            <a-input-number v-model="policyOperationForm.accountingPeriod" :precision="0"/> 天
                         </a-form-model-item>
                         <div v-if="policyOperationForm.advancePay === 0">
-                            <a-form-model-item label="是否第三方垫付" prop="isDianPay" @change="handleIsDianPayChange">
-                                <a-radio-group v-model="policyOperationForm.isDianPay" button-style="solid">
+                            <a-form-model-item label="是否第三方垫付" prop="isDianPay">
+                                <a-radio-group
+                                    v-model="policyOperationForm.isDianPay"
+                                    button-style="solid"
+                                    @change="handleIsDianPayChange"
+                                >
                                     <a-radio-button :value="1">是</a-radio-button>
                                     <a-radio-button :value="0">否</a-radio-button>
                                 </a-radio-group>
@@ -535,9 +616,10 @@
     </div>
 </template>
 <script>
+import moment from 'moment';
+
 import {getAction, postAction} from '@/api/manage';
 import {mapGetters} from 'vuex';
-import moment from 'moment';
 import {urlAcount} from './policy-management-server.js';
 
 export default {
@@ -744,7 +826,8 @@ export default {
                     title: '返点比例',
                     align: 'center',
                     dataIndex: 'rebateRate',
-                    width: 150
+                    width: 150,
+                    scopedSlots: {customRender: 'rebateRate'}
                 },
                 {
                     title: '是否垫付',
@@ -814,7 +897,7 @@ export default {
                 creativeAdvance: undefined,
                 creativeSale: undefined,
                 creativeOperate: 'no',
-                time: [],
+                time: [moment().subtract(6, 'days').format('YYYY-MM-DD'), moment().format('YYYY-MM-DD')],
                 searchStatus: 'no'
             },
             tablePag: {
@@ -839,6 +922,20 @@ export default {
     methods: {
         ...mapGetters(['userInfo']),
         moment,
+        calculationScope(data) {
+            let defaultScope = '';
+            switch (data) {
+                case 0:
+                    defaultScope = '否';
+                    break;
+                case 1:
+                    defaultScope = '是';
+                    break;
+                default:
+                    defaultScope = '-';
+            }
+            return defaultScope;
+        },
         handleLaunchData(date, dateString) {
             this.configForm.time = dateString;
         },
@@ -1006,14 +1103,14 @@ export default {
         handleIsDianPayChange(e) {
             if (e.target.value === 0) {
                 this.policyOperationForm.dianPayCompanyName = '';
-                this.policyOperationForm.dianPayCompanyRebateRate = '';
+                this.policyOperationForm.dianPayCompanyRebateRate = 0;
             }
         },
         handlePrepaidNotChange(e) {
             if (e.target.value === 1) {
                 this.policyOperationForm.accountingPeriod = '';
                 this.policyOperationForm.dianPayCompanyName = '';
-                this.policyOperationForm.dianPayCompanyRebateRate = '';
+                this.policyOperationForm.dianPayCompanyRebateRate = 0;
                 this.policyOperationForm.isDianPay = undefined;
             }
             else if (e.target.value === 0) {
@@ -1189,7 +1286,6 @@ export default {
                     this.handleRejectCancel();
                 }
                 else {
-                    console.log('error submit!!');
                     return false;
                 }
             });
@@ -1277,7 +1373,7 @@ export default {
                 creativeAdvance: undefined,
                 creativeSale: undefined,
                 creativeOperate: 'no',
-                time: [],
+                time: [moment().subtract(6, 'days').format('YYYY-MM-DD'), moment().format('YYYY-MM-DD')],
                 searchStatus: 'no'
             };
             this.tablePag = {

+ 2 - 2
src/views/modules/settlement-account/settlement-account-server.js

@@ -5,7 +5,7 @@
 
 //  export const urlAcount = 'http://118.24.244.213:8808'; // 线上
 //  export const urlAcount = 'http://gateway.tjyourong.com.cn'; // 测试
-export const urlAcount = 'http://192.168.1.43:9999'; // 子安
-//  export const urlAcount = 'http://gateway.tjyourong.com.cn'; // 测试
+// export const urlAcount = 'http://192.168.1.43:9999'; // 子安
+ export const urlAcount = 'http://gateway.tjyourong.com.cn'; // 测试
 // export const urlAcount = 'http://192.168.1.8:9999'; // 学超
  

+ 35 - 13
src/views/modules/settlement-account/settlement-account.vue

@@ -63,10 +63,10 @@
                         >
                             <a-select-option
                                 v-for="item in allSaleListOption"
-                                :key="item.userId"
-                                :value="item.userName"
+                                :key="item.id"
+                                :value="item.realname"
                             >
-                                {{ item.userName }}
+                                {{ item.realname }}
                             </a-select-option>
                         </a-select>
                     </a-form-item>
@@ -85,6 +85,7 @@
                         <a-range-picker
                             v-model="configForm.time"
                             format="YYYY-MM-DD"
+                            @change="handleAddTimesChange"
                         />
                     </a-form-item>
                     <a-form-item class="form-handle-btn">
@@ -145,6 +146,7 @@
             title="账户上传"
             :visible="policyOperationStatus"
             dialog-class="settlement-modal-class"
+            :confirmLoading="confirmLoading"
             @ok="handlePolicyOperationSure"
             @cancel="handlePolicyOperationCancel"
         >
@@ -157,6 +159,12 @@
                     :label-col="labelCol"
                     :wrapper-col="wrapperCol"
                 >
+                    <a-form-model-item label="选择媒体">
+                        <a-radio-group v-model="policyOperationForm.mediaId" button-style="solid" @change="handleMediaIdChange">
+                            <a-radio-button :value="1">头条</a-radio-button>
+                            <a-radio-button :value="2">快手</a-radio-button>
+                        </a-radio-group>
+                    </a-form-model-item>
                     <a-form-model-item label="选择广告主公司名称" prop="advertiserId">
                         <a-select
                             v-model="policyOperationForm.advertiserId"
@@ -207,12 +215,6 @@
                             </a-select-option>
                         </a-select>
                     </a-form-model-item>
-                    <a-form-model-item label="选择媒体">
-                        <a-radio-group v-model="policyOperationForm.mediaId" button-style="solid">
-                            <a-radio-button :value="1">头条</a-radio-button>
-                            <a-radio-button :value="2">快手</a-radio-button>
-                        </a-radio-group>
-                    </a-form-model-item>
                     <a-form-model-item label="运营方式">
                         <a-radio-group v-model="policyOperationForm.operateType" button-style="solid">
                             <a-radio-button :value="1">自运营</a-radio-button>
@@ -238,6 +240,7 @@
 </template>
 <script>
 import {mapGetters} from 'vuex';
+import moment from 'moment';
 import {getAction, postFileAction} from '@/api/manage';
 import {urlAcount} from './settlement-account-server.js';
 
@@ -245,6 +248,7 @@ export default {
     name: 'settlement-account',
     data() {
         return {
+            confirmLoading: false,
             allProjectListOption: [],
             allAdverListOption: [],
             allProductListOption: [],
@@ -344,7 +348,7 @@ export default {
                 accountName: '',
                 creativeSale: 2,
                 mediaId: 'no',
-                time: []
+                time: [moment().subtract(7, 'days').format('YYYY-MM-DD'), moment().format('YYYY-MM-DD')]
             },
             tablePag: {
                 page: 1,
@@ -362,10 +366,23 @@ export default {
     },
     methods: {
         ...mapGetters(['userInfo']),
+        moment,
+        handleMediaIdChange(e) {
+            this.policyOperationForm.advertiserId = undefined;
+            this.policyOperationForm.productId = undefined;
+            this.policyOperationForm.projectId = undefined;
+            this.policyOperationForm.operateType = 1;
+            this.policyOperationForm.fileList = [];
+        },
+        handleAddTimesChange(date, dateString) {
+            this.configForm.time = dateString;
+        },
         handleProductOptionChange(e) {
+            this.policyOperationForm.projectId = undefined;
             const paramsData = {
                 pageNo: 1,
                 pageSize: 1000,
+                mediaId: this.policyOperationForm.mediaId === 1 ? '1,3' : '2,4',
                 advertiserId: this.policyOperationForm.advertiserId,
                 productId: e
             };
@@ -381,6 +398,8 @@ export default {
             });
         },
         handleAdverOptionChange(e) {
+            this.policyOperationForm.productId = undefined;
+            this.policyOperationForm.projectId = undefined;
             const paramsData = {
                 pageNo: 1,
                 pageSize: 1000,
@@ -422,8 +441,8 @@ export default {
             const paramsData = {
                 userId: this.userInfo().id
             };
-            getAction(urlAcount + '/finance/cwjsPolicyInfo/getAllSaleList', paramsData).then(result => {
-                if (result.code === 200) {
+            getAction(urlAcount + '/finance/settLementController/getResponsibleUserByIds', paramsData).then(result => {
+                if (result.code === 0) {
                     this.allSaleListOption = result.result || [];
                 }
                 else {
@@ -509,6 +528,7 @@ export default {
                     paramsData.append('mediaId', mediaId);
                     paramsData.append('operateType', operateType);
                     paramsData.append('file', fileList[0]);
+                    this.confirmLoading = true;
                     postFileAction(urlAcount + '/finance/settLementController/settlementAccountImport', paramsData, {
                         headers: {
                             'Content-Type': 'multipart/form-data'
@@ -524,6 +544,8 @@ export default {
                         }
                     }).catch(error => {
                         console.log(error, 'eeee');
+                    }).finally(() => {
+                        this.confirmLoading = false;
                     });
                 }
                 else {
@@ -611,7 +633,7 @@ export default {
                 accountName: '',
                 creativeSale: 2,
                 mediaId: 'no',
-                time: []
+                time: [moment().subtract(7, 'days').format('YYYY-MM-DD'), moment().format('YYYY-MM-DD')]
             };
             this.tablePag = {
                 page: 1,

+ 18 - 28
src/views/modules/settlement-information/settlement-information.vue

@@ -5,7 +5,7 @@
                 <span class="policy-export-btn">结算单信息</span>
                 <span>
                     <a-tooltip>
-                        <template slot="title">由销售人员上传需要进行结算的客户自运营的账户信息,需要注意开户主体需要是我司</template>
+                        <template slot="title">显示运营人员上传账户消耗截图,运营人员可查看自己所上传数据,销售人员可查看自己所负责产品的消耗截图数据</template>
                         <a-icon class="settlement-header-icon" type="question-circle"/>
                     </a-tooltip>
                     显示列表信息,销售人员只能操作与自己相关的项目
@@ -30,24 +30,24 @@
                         label="产品名称:"
                         :colon="false"
                     >
-                        <a-input v-model="configForm.creativeAdvance11" placeholder="请输入产品名称"/>
+                        <a-input v-model="configForm.productName" placeholder="请输入产品名称"/>
                     </a-form-item>
                     <a-form-item
                         class="grid-form-item"
                         label="项目名称:"
                         :colon="false"
                     >
-                        <a-input v-model="configForm.creativeAdvance22" placeholder="请输入项目名称"/>
+                        <a-input v-model="configForm.projectName" placeholder="请输入项目名称"/>
                     </a-form-item>
                     <a-form-item
                         class="grid-form-item"
                         label="账户名称:"
                         :colon="false"
                     >
-                        <a-input v-model="configForm.creativeAdvance33" placeholder="请输入账户名称"/>
+                        <a-input v-model="configForm.accountName" placeholder="请输入账户名称"/>
                     </a-form-item>
                     <a-form-item label="运营:">
-                        <a-select v-model="configForm.creativeSale" style="width: 100px">
+                        <a-select v-model="configForm.createUserName" style="width: 100px">
                             <a-select-option :value="2">不限</a-select-option>
                             <a-select-option value="CREATIVE_IMAGE_MODE_VIDEO_VERTICAL">竖版视频</a-select-option>
                             <a-select-option value="CREATIVE_IMAGE_MODE_LARGE">大图横图</a-select-option>
@@ -58,10 +58,10 @@
                 </a-row>
                 <a-row>
                     <a-form-item label="媒体:">
-                        <a-select v-model="configForm.creativeMedia" style="width: 100px">
-                            <a-select-option :value="2">不限</a-select-option>
-                            <a-select-option value="CREATIVE_IMAGE_MODE_VIDEO_VERTICAL">快手</a-select-option>
-                            <a-select-option value="CREATIVE_IMAGE_MODE_LARGE">头条</a-select-option>
+                        <a-select v-model="configForm.mediaId" style="width: 100px">
+                            <a-select-option value="no">不限</a-select-option>
+                            <a-select-option :value="1">头条</a-select-option>
+                            <a-select-option :value="2">快手</a-select-option>
                         </a-select>
                     </a-form-item>
                     <a-form-item
@@ -319,40 +319,30 @@ export default {
                 size: 10
             },
             totalAll: 100,
-            dataSource: [
-                {
-                    name1: '腾讯科技有限公司', 
-                    name2: '腾讯科技有限公司', 
-                    name3: '产品名称', 
-                    name4: '快手', 
-                    name5: '何甜甜', 
-                    name6: '待审核', 
-                    name7: '是'
-                }
-            ],
+            dataSource: [],
             settlementColumns: [
                 {
                     title: '广告主主体名称',
                     align: 'center',
-                    dataIndex: 'name1',
+                    dataIndex: 'advertiserName',
                     width: 180
                 },
                 {
                     title: '产品名称',
                     align: 'center',
-                    dataIndex: 'name2',
+                    dataIndex: 'productName',
                     width: 180
                 },
                 {
                     title: '媒体',
                     align: 'center',
-                    dataIndex: 'name3',
+                    dataIndex: 'mediaId',
                     width: 150
                 },
                 {
                     title: '上传人',
                     align: 'center',
-                    dataIndex: 'name4',
+                    dataIndex: 'createUserName',
                     width: 150
                 },
                 {
@@ -384,11 +374,11 @@ export default {
             ],
             configForm: {
                 creativeAdvance: '',
-                creativeAdvance11: '',
-                creativeAdvance22: '',
-                creativeAdvance33: '',
+                productName: '',
+                projectName: '',
+                accountName: '',
                 creativeSale: 2,
-                creativeMedia: 2,
+                mediaId: 2,
                 time: []
             }
         };

+ 4 - 4
src/views/modules/user-manage-operation/user-manage-operation-server.js

@@ -3,8 +3,8 @@
  * @author jiayufei
  */
 
-//  export const urlAcount = 'http://118.24.244.213:8808'; // 线上
+ export const urlAcount = 'http://118.24.244.213:8808'; // 线上
  // export const urlAcount = 'http://apipre.tjyourong.com.cn'; // 预生产
-//  export const urlAcount = 'http://192.168.1.43:8080'; // 子安
- export const urlAcount = 'http://139.186.165.84:8808'; // 测试
-//  export const urlAcount = 'http://192.168.1.8:8080'; // 学超
+//  export const urlAcount = 'http://192.168.1.43:'; // 子安
+//  export const urlAcount = 'http://139.186.165.84:8808'; // 测试
+//  export const urlAcount = 'http://192.168.1.8:9999'; // 学超