Przeglądaj źródła

财务结算 修改BUG

jiayufei 3 lat temu
rodzic
commit
39cb50c778

+ 31 - 33
src/views/modules/Statistics/newPlanStatic/newPlanStatic.vue

@@ -337,6 +337,8 @@ import datePick from '../components/datePick';
 import {TreeSelect} from 'ant-design-vue';
 const SHOW_PARENT = TreeSelect.SHOW_PARENT;
 import ARow from 'ant-design-vue/es/grid/Row';
+import {mapGetters} from 'vuex';
+
 import ACol from 'ant-design-vue/es/grid/Col';
 import moment from 'moment';
 import countTo from 'vue-count-to';
@@ -800,6 +802,7 @@ export default {
 		};
 	},
 	methods: {
+		...mapGetters(['userInfo']),
 		// 导出报表
 		exportExcel() {
 			this.exportloading = true;
@@ -1176,41 +1179,36 @@ export default {
 		},
 
 		// 获取所有运营
-		getAllOperator(key){
-		let url=''
-		this.operateList=[]
-		if(key==1){
-			// 头条
-			url='/ctop/bytedance/newPlan/report/AllOperator'
-		}else{
-			// 快手
-			url='/ctop/kuaishou/newGroup/report/AllOperator'
-		}
-		postAction(url,{}).then(res=>{
-			console.log(res);
-			if(res.success){
-				if(key==1){
-					this.TToperateList=res.result;
-				}else{
-					this.KSoperateList=res.result;
-				}
-
-				if(this.tabKey==1){
-					this.operateList=this.TToperateList
-				}else{
-					this.operateList=this.KSoperateList
-				}
-				let userInfo=localStorage.getItem('pro__Login_Userinfo')
-				if(userInfo){
-					this.userId=JSON.parse(userInfo).value.id;
-					this.operate=this.userId;
-					this.getNewPlan()
+		getAllOperator(key) {
+			this.operateList = [];
+			const paramsData = {
+				userId: this.userInfo().id,
+				userName: this.userInfo().username
+			};
+			// TODO 2021.8.24 和泽宇联调更换的统一接口
+			getAction('/ctop/kuaishou/newGroup/report/AllOperator', paramsData).then(res => {
+				if (res.success) {
+					if (key === 1) {
+						this.TToperateList = res.result;
+					}
+					else {
+						this.KSoperateList = res.result;
+					}
+					if (this.tabKey === 1) {
+						this.operateList = this.TToperateList;
+					}
+					else {
+						this.operateList = this.KSoperateList;
+					}
+					let userInfo = localStorage.getItem('pro__Login_Userinfo');
+					if (userInfo) {
+						this.userId = JSON.parse(userInfo).value.id;
+						this.operate = this.userId;
+						this.getNewPlan();
+					}
 				}
-			}
-		})
+			})
 		},
-
-
 		// 获取展示数据
 		getNewPlan(){
 		let url=''

+ 10 - 7
src/views/modules/settlement-account/settlement-account.vue

@@ -193,10 +193,10 @@
                         >
                             <a-select-option
                                 v-for="item in allAdverListOption"
-                                :key="item.id"
-                                :value="item.id"
+                                :key="item.advertiserId"
+                                :value="item.advertiserId"
                             >
-                                {{ item.name }}
+                                {{ item.advertiserName }}
                             </a-select-option>
                         </a-select>
                     </a-form-model-item>
@@ -385,7 +385,7 @@ export default {
     mounted() {
         this.handleInitTable();
         this.handleGetAllSaleList();
-        this.handleGetAllAdverList();
+        this.handleGetAllAdverList(1);
     },
     methods: {
         ...mapGetters(['userInfo']),
@@ -396,6 +396,7 @@ export default {
             this.policyOperationForm.projectId = undefined;
             this.policyOperationForm.operateType = 1;
             this.policyOperationForm.fileList = [];
+            this.handleGetAllAdverList(e.target.value)
         },
         handleAddTimesChange(date, dateString) {
             this.configForm.time = dateString;
@@ -443,14 +444,16 @@ export default {
             return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0;
         },
         // 获取所有的广告主列表
-        handleGetAllAdverList() {
+        handleGetAllAdverList(type) {
             const paramsData = {
+                userId: this.userInfo().id,
+                mediaId: type,
                 pageNo: 1,
                 pageSize: 1000
             };
-            getAction('/ctop/advertiser/list', paramsData).then(result => {
+            getAction('/ctop/projectMember/participateListV3', paramsData).then(result => {
                 if (result.success) {
-                    this.allAdverListOption = result.result.records || [];
+                    this.allAdverListOption = result.result || [];
                 }
                 else {
                     this.$message.error(result.message);

+ 29 - 14
src/views/modules/settlement-information/settlement-information.vue

@@ -15,10 +15,10 @@
             </div>
             <div>
                 <span v-if="profitBtnStatus" class="add-acount-policy-btn">
-                    <a-button @click="handleDownloadProfit">下载利润表</a-button>
+                    <a-button type="primary" @click="handleDownloadProfit">下载利润表</a-button>
                 </span>
                 <span v-if="settlementBtnStatus" class="add-acount-policy-btn">
-                    <a-button @click="handleDownloadSettlement">下载结算单</a-button>
+                    <a-button type="primary" @click="handleDownloadSettlement">下载结算单</a-button>
                 </span>
                 <span v-if="accountBtnStatus" class="add-acount-policy-btn">
                     <a-button type="primary" @click="handleUploadAccount">上传截图</a-button>
@@ -184,10 +184,10 @@
                         >
                             <a-select-option
                                 v-for="item in allAdverListOption"
-                                :key="item.id"
-                                :value="item.id"
+                                :key="item.advertiserId"
+                                :value="item.advertiserId"
                             >
-                                {{ item.name }}
+                                {{ item.advertiserName }}
                             </a-select-option>
                         </a-select>
                     </a-form-model-item>
@@ -208,7 +208,7 @@
                         </a-select>
                     </a-form-model-item>
                     <a-form-model-item label="选择媒体">
-                        <a-radio-group v-model="policyOperationForm.mediaId" button-style="solid">
+                        <a-radio-group v-model="policyOperationForm.mediaId" button-style="solid" @change="handlePolicyUploadChange">
                             <a-radio-button :value="1">头条</a-radio-button>
                             <a-radio-button :value="2">快手</a-radio-button>
                         </a-radio-group>
@@ -264,10 +264,10 @@
                         >
                             <a-select-option
                                 v-for="item in allAdverListOption"
-                                :key="item.id"
-                                :value="item.id"
+                                :key="item.advertiserId"
+                                :value="item.advertiserId"
                             >
-                                {{ item.name }}
+                                {{ item.advertiserName }}
                             </a-select-option>
                         </a-select>
                     </a-form-model-item>
@@ -509,7 +509,7 @@ export default {
         }
         this.handleInitTable();
         this.handleGetAllSaleList();
-        this.handleGetAllAdverList();
+        this.handleGetAllAdverList(1);
     },
     methods: {
         ...mapGetters(['userInfo']),
@@ -521,8 +521,20 @@ export default {
         handleProductIdChange(e) {
             this.handleGetDownLoadAllNum();
         },
+        handlePolicyUploadChange(e) {
+            this.policyOperationForm.advertiserId = undefined;
+            this.allAdverListOption = [];
+            this.policyOperationForm.productId = undefined;
+            this.allProductListOption = [];
+            this.handleGetAllAdverList(e.target.value);
+        },
         handleMediaIdChange(e) {
+            this.settlementModalForm.advertiserId = undefined;
+            this.allAdverListOption = [];
+            this.settlementModalForm.productId = undefined;
+            this.allProductListOption = [];
             this.handleGetDownLoadAllNum();
+            this.handleGetAllAdverList(e.target.value);
         },
         handleGetDownLoadAllNum() {
             const {advertiserId, productId, mediaId, uploadYears} = this.settlementModalForm;
@@ -545,14 +557,16 @@ export default {
             });
         },
         // 获取所有的广告主列表
-        handleGetAllAdverList() {
+        handleGetAllAdverList(type) {
             const paramsData = {
+                userId: this.userInfo().id,
+                mediaId: type,
                 pageNo: 1,
                 pageSize: 1000
             };
-            getAction('/ctop/advertiser/list', paramsData).then(result => {
+            getAction('/ctop/projectMember/participateListV3', paramsData).then(result => {
                 if (result.success) {
-                    this.allAdverListOption = result.result.records || [];
+                    this.allAdverListOption = result.result || [];
                 }
                 else {
                     this.$message.error(result.message);
@@ -742,7 +756,7 @@ export default {
         },
         handleFileRemove(file) {
             let formData = this.policyOperationForm.settlementList;
-            this.policyOperationForm.settlementList = formData.filter(item => file.uid !== item.uid);
+            this.policyOperationForm.settlementList = formData.filter(item => file.id !== item.id);
         },
         beforeUpload(file) {
             let reg = /[\u4E00-\u9FA5]|[A-Za-z]/g;
@@ -824,6 +838,7 @@ export default {
                     }
                     that.loadingElse = false;
                     that.policyOperationForm.settlementList.push({
+                        id: new Date().getTime(),
                         uid: file.name,
                         name: file.name,
                         status: 'done',

+ 1 - 0
vue.config.js

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