commission--yt-commit

This commit is contained in:
2025-06-03 21:29:15 +08:00
parent eaf4b6c5e5
commit 361f6a89d3
16 changed files with 538 additions and 104 deletions

View File

@ -1,3 +1,5 @@
import { baseUrl } from "../../../request";
// pages/projectModule/settlement/settlement.js
Page({
@ -5,14 +7,61 @@ Page({
* 页面的初始数据
*/
data: {
items: [null, null],
pid: 0, // 项目id
projectSettlementList: [], // 项目结算列表
},
// 获取项目明细列表
getProjectSettlementList() {
const pid = this.data.pid
wx.request({
url: baseUrl + '/projectSettlement/query/all/settle',
method: 'POST',
header: {
Authorization: wx.getStorageSync('token')
},
data: {
id: pid
},
success: res =>{
console.log('---->',res.data);
if (res.data.code === 1) {
}
}
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
this.setData({ pid: options.id })
console.log('项目id--->',options.id);
this.getProjectSettlementList()
// 模拟后端响应数据
const response = {
code: 0,
data: [
{
id: 1,
projectDetailName: "新用户完成首单",
settlementQuantity: 2,
settlementRevenue: 2.34,
workTime: "2025-05-20", // 示例作业时间
settlementTime: "2025-05-22", // 示例结算时间
revenueSource: false
}
],
message: ""
};
if (response.code === 0) {
// 将后端返回的数据赋值给 projectSettlementList
this.setData({
projectSettlementList: response.data
});
}
},
/**
@ -63,4 +112,4 @@ Page({
onShareAppMessage() {
}
})
});

View File

@ -1,14 +1,14 @@
<view class="flex-col page">
<view class="flex-col justify-start items-start text-wrapper"><text class="text">项目:饿了么-超吃卡</text></view>
<view class="flex-col mt-11">
<view class="flex-col list-item mt-20" wx:for="{{items}}" wx:for-item="item" wx:for-index="index" wx:key="index">
<view class="flex-col list-item mt-20" wx:for="{{ projectSettlementList }}" wx:for-item="item" wx:for-index="index" wx:key="index">
<view class="flex-row items-center group">
<view class="flex-row items-center flex-1">
<image
class="shrink-0 image"
src="https://ide.code.fun/api/image?token=68368d354ae84d001230f4d1&name=1ca23eeec01596125d5539fcda13702d.png"
/>
<text class="font text_2 ml-14">美团神券包-春季活动</text>
<text class="font text_2 ml-14">{{ projectSettlementList.projectDetailName}}</text>
</view>
<text class="font text_3 ml-21">业务员:陈新知</text>
</view>
@ -20,22 +20,22 @@
</view>
<view class="flex-col justify-start group_2 mt-10">
<view class="flex-row justify-center items-center relative section_2">
<text class="font_3 text_6 pos">3.6元购买券</text>
<text class="font_4">10</text>
<text class="font_5 pos_2">¥3.00</text>
<text class="font_3 text_6 pos">{{ projectSettlementList.settlementQuantity }}元购买券</text>
<text class="font_4">{{ projectSettlementList.settlementQuantity }}</text>
<text class="font_5 pos_2">¥{{ projectSettlementList.settlementRevenue.toFixed(2) }}</text>
</view>
</view>
</view>
<view class="flex-row group_1">
<view class="group_3">
<text class="font_6 text_7">作业时间:</text>
<text class="font_5">2025-05-20</text>
<text class="font_5">{{ projectSettlementList.workTime || '暂无' }}</text>
</view>
<view class="group_4 ml-47">
<text class="font_6">结算时间:</text>
<text class="font_5">2025-05-22</text>
<text class="font_5">{{ projectSettlementList.settlementTime || '暂无' }}</text>
</view>
</view>
</view>
</view>
</view>
</view>

View File

@ -1,3 +1,5 @@
import { baseUrl } from "../../../request"
// pages/projectModule/userProject/userProject.js
Page({
@ -6,18 +8,53 @@ Page({
*/
data: {
items: [null, null, null],
userProjectList: [],
promotionCode: true // 推广码开启
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
this.getProgram();
},
tiaozhuan(){
// 结算记录
gotoSubSettlement(e) {
const projectId = e.currentTarget.dataset.id;
wx.navigateTo({
url: '/pages/projectModule/projectDetail/projectDetail',
url: `/pages/projectModule/settlement/settlement?id=${projectId}`,
})
},
// 获取项目列表
getProgram() {
wx.request({
url: baseUrl + '/project/query/card',
method: 'POST',
header: {
Authorization: wx.getStorageSync('token')
},
success: res => {
// console.log(res.data);
if(res.data.code === 1) {
this.setData({
userProjectList: res.data.data
})
}
}
})
},
// 跳转项目明细
gotoProjectDetail(e){
// 获取data-id中的值
const projectId = e.currentTarget.dataset.id;
wx.navigateTo({
url: `/pages/projectModule/projectDetail/projectDetail?id=${projectId}`,
})
},
/**

View File

@ -16,18 +16,18 @@
class="image_2"
src="./images/yjt.png"
bind:tap="gotoProjectDetail"
data-id="{{ item.projectId }}"
data-id="{{ item.id }}"
/>
</view>
<view class="mt-14 flex-row group_2 equal-division">
<view class="flex-row justify-center items-center section equal-division-item">
<view class="flex-row justify-center items-center section equal-division-item" bind:tap="gotoProjectDetail" data-id="{{ item.id }}" data-promotionCode="{{ promotionCode }}">
<image
class="image_3"
src="./images/tgm.png"
/>
<text class="ml-4 font_3">推广码</text>
</view>
<view class="ml-14 flex-row items-center section equal-division-item_2" bind:tap="gotoSubSettlement">
<view class="ml-14 flex-row items-center section equal-division-item_2" bind:tap="gotoSubSettlement" data-id="{{ item.id }}">
<image
class="shrink-0 image_4"
src="./images/jsmx.png"