添加页面

This commit is contained in:
zhengw
2026-01-29 17:46:14 +08:00
parent df67413bf8
commit 85483c7ca2
44 changed files with 1606 additions and 94 deletions

View File

@@ -8,7 +8,13 @@
"pages/produce/processManageDetail/processManageDetail",
"pages/orders/ordersList/ordersList",
"pages/orders/orderSort/orderSort",
"pages/orders/ordersList/orderPayment/orderPayment"
"pages/orders/ordersList/orderPayment/orderPayment",
"pages/purchase/buyOrder/buyOrder",
"pages/purchase/buyInOrder/buyInOrder",
"pages/finance/outcome/outcome",
"pages/finance/income/income",
"pages/finance/giro/giro",
"pages/finance/flow/flow"
],
"window": {
"navigationBarTextStyle": "black",

View File

@@ -17,3 +17,8 @@ view.t-popup__close {
.t-input__icon--prefix {
display: flex;
}
view.t-cell__title-text {
white-space: nowrap;
flex-shrink: 0;
}

View File

@@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" width="64" height="64" xmlns:xlink="http://www.w3.org/1999/xlink"><path d="M895.36 958.83H128.64c-35.3 0-63.89-28.59-63.89-63.89V447.68c0-35.3 28.59-63.89 63.89-63.89h56.32L323.2 144.35l101.08 58.37L563.34 63.64l320.11 320.14h11.92c35.3 0 63.89 28.59 63.89 63.89v447.26c0 35.31-28.59 63.9-63.9 63.9zM334.89 187.98l-113.06 195.8h452.21l-339.15-195.8z m228.45-79.16L452.93 219.23l285 164.56h100.35L563.34 108.82z m332.02 338.86H128.64v447.26h766.73V447.68zM400.19 639.36c-8.82 0-15.97-7.16-15.97-15.97 0-8.82 7.16-15.97 15.97-15.97h223.63c8.82 0 15.97 7.16 15.97 15.97 0 8.82-7.16 15.97-15.97 15.97h-79.87v63.89h79.87c8.82 0 15.97 7.16 15.97 15.97 0 8.82-7.16 15.97-15.97 15.97h-79.87v31.95c0 17.63-14.31 31.95-31.95 31.95-17.63 0-31.95-14.31-31.95-31.95V735.2h-79.87c-8.82 0-15.97-7.16-15.97-15.97 0-8.82 7.16-15.97 15.97-15.97h79.87v-63.89h-79.86z m199.25-92l-61.11 57.5c-8.56 5.27-19.52 2.14-24.47-7.03-0.99-1.88-1.47-3.93-1.85-5.94-0.38 2.01-0.86 4.06-1.85 5.94-4.95 9.17-15.91 12.3-24.47 7.03l-61.08-57.5c-8.56-5.3-11.5-17.03-6.55-26.2 4.92-9.17 15.88-12.3 24.44-7.03l61.08 57.5c4.66 2.88 7.44 7.64 8.43 12.84 0.99-5.21 3.8-9.97 8.43-12.84l61.08-57.5c8.56-5.27 19.52-2.14 24.47 7.03 4.92 9.17 1.98 20.89-6.55 26.2z" fill="#13227a"></path></svg>

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

@@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" width="64" height="64" xmlns:xlink="http://www.w3.org/1999/xlink"><path d="M950.044444 529.066667s-2.844444 0 0 0h-116.622222V116.622222C833.422222 65.422222 796.444444 28.444444 745.244444 28.444444H278.755556C227.555556 28.444444 190.577778 65.422222 190.577778 116.622222v412.444445H73.955556c-8.533333 0-14.222222 2.844444-14.222223 2.844444-22.755556 5.688889-39.822222 28.444444-39.822222 54.044445 0 14.222222 5.688889 25.6 14.222222 36.977777l392.533334 341.333334c22.755556 19.911111 54.044444 31.288889 85.333333 31.288889 34.133333 0 62.577778-11.377778 88.177778-31.288889l392.533333-344.177778c8.533333-8.533333 14.222222-22.755556 14.222222-36.977778-2.844444-28.444444-25.6-51.2-56.888889-54.044444z m-278.755555 31.288889c22.755556 0 39.822222 17.066667 39.822222 39.822222s-17.066667 39.822222-39.822222 39.822222h-119.466667v93.866667c0 22.755556-17.066667 39.822222-39.822222 39.822222s-39.822222-17.066667-39.822222-39.822222v-93.866667h-119.466667c-22.755556 0-39.822222-17.066667-39.822222-39.822222s17.066667-39.822222 39.822222-39.822222h119.466667v-68.266667h-119.466667c-22.755556 0-39.822222-17.066667-39.822222-39.822222s17.066667-39.822222 39.822222-39.822223h91.022222l-96.711111-96.711111c-14.222222-14.222222-14.222222-39.822222 0-56.888889 14.222222-14.222222 39.822222-14.222222 56.888889 0l105.244445 105.244445c2.844444 2.844444 5.688889 5.688889 5.688888 8.533333 2.844444-2.844444 2.844444-5.688889 5.688889-8.533333L625.777778 258.844444c14.222222-14.222222 39.822222-14.222222 56.888889 0 14.222222 14.222222 14.222222 39.822222 0 56.888889l-96.711111 96.711111h91.022222c22.755556 0 39.822222 17.066667 39.822222 39.822223s-17.066667 39.822222-39.822222 39.822222h-119.466667v68.266667h113.777778z" fill="#FC6010"></path></svg>

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

@@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" width="64" height="64" xmlns:xlink="http://www.w3.org/1999/xlink"><path d="M867.388 0H30.118v831.247h837.27V0z m-54.212 764.988H84.33V66.258h728.847v698.73z m180.706-548.14V1024H126.494V891.482h54.212v60.236H939.67V289.129h-30.118v-72.282h84.33zM421.647 530.07h-120.47v-66.26h120.47V391.53h-120.47v-72.282H409.6l-96.376-120.47 36.14-48.189 102.4 126.494 102.4-126.494 36.142 48.188-96.377 120.471h108.424v66.259h-120.47v72.282h120.47v66.26h-120.47v150.587h-60.236V530.071z" fill="#13227a"></path></svg>

After

Width:  |  Height:  |  Size: 715 B

View File

@@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" width="64" height="64" xmlns:xlink="http://www.w3.org/1999/xlink"><path d="M512 46.545455c257.070545 0 465.454545 208.384 465.454545 465.454545s-208.384 465.454545-465.454545 465.454545S46.545455 769.070545 46.545455 512 254.929455 46.545455 512 46.545455zM139.729455 540.904727c12.427636 157.882182 123.485091 296.354909 283.22909 333.824 197.12 46.266182 393.541818-78.801455 438.644364-279.319272 0.605091-2.792727 1.210182-5.352727 1.582546-8.192 1.256727-9.402182 2.373818-13.358545-7.68-16.058182a1249.559273 1249.559273 0 0 1-55.71491-16.802909c-13.265455-4.654545-15.266909 5.725091-16.523636 12.520727-1.210182 6.795636-1.210182 6.283636-1.908364 9.448727-34.443636 154.205091-188.602182 250.414545-339.316363 214.760727-89.925818-21.224727-159.464727-84.619636-193.768727-165.003636 0 0 43.287273-3.816727 57.064727-5.259636 13.824-1.396364 16.849455-17.594182 4.282182-25.6-12.567273-8.052364-117.387636-68.421818-132.794182-76.613818-19.595636-10.379636-38.772364-4.840727-37.096727 22.341818z m483.281454-211.595636a23.272727 23.272727 0 0 0-28.066909 2.699636l-64.512 59.717818-2.932364 3.258182a23.272727 23.272727 0 0 0-2.187636 23.924364h-18.152727a23.272727 23.272727 0 0 0-5.12-27.182546L437.527273 332.008727a23.272727 23.272727 0 0 0-31.604364 0l-15.127273 13.963637-1.256727 1.303272a23.272727 23.272727 0 0 0 1.256727 32.907637l41.797819 38.679272L395.636364 418.909091a23.272727 23.272727 0 0 0-23.272728 23.272727v23.272727a23.272727 23.272727 0 0 0 23.272728 23.272728l81.408-0.046546v69.818182L395.636364 558.545455a23.272727 23.272727 0 0 0-23.272728 23.272727v23.272727a23.272727 23.272727 0 0 0 23.272728 23.272727l81.408-0.046545 0.046545 97.233454a23.272727 23.272727 0 0 0 23.272727 23.272728h23.272728a23.272727 23.272727 0 0 0 23.272727-23.272728l-0.046546-97.233454 81.501091 0.046545a23.272727 23.272727 0 0 0 23.272728-23.272727v-23.272727a23.272727 23.272727 0 0 0-23.272728-23.272727l-81.501091-0.046546v-69.818182l81.501091 0.046546a23.272727 23.272727 0 0 0 23.272728-23.272728v-23.272727a23.272727 23.272727 0 0 0-23.272728-23.272727l-28.532363-0.046546 41.844363-38.679272 2.792728-3.118546a23.272727 23.272727 0 0 0-1.536-29.789091l-1.256728-1.256727-15.127272-13.963636zM153.6 431.476364c-3.490909 17.221818-0.418909 15.825455 11.031273 21.224727 10.007273 4.654545 37.701818 15.685818 46.173091 16.011636 12.474182 0.512 14.568727-15.220364 14.848-16.523636 34.443636-154.205091 190.370909-255.255273 341.085091-219.648 94.440727 22.341818 166.4 91.136 198.656 177.338182 0 0-52.503273 6.237091-61.812364 7.726545-9.355636 1.489455-12.846545 12.381091-3.677091 21.085091 3.816727 3.630545 124.369455 73.262545 148.945455 73.076364 11.915636-0.139636 22.714182-7.68 20.666181-28.858182-12.194909-158.114909-123.298909-296.913455-283.229091-334.429091-192.698182-45.195636-393.495273 86.946909-432.686545 282.996364z" fill="#FA541C"></path></svg>

After

Width:  |  Height:  |  Size: 3.0 KiB

View File

@@ -6,6 +6,7 @@ Component({
properties: {
label: null,
placeholder: null,
value: null,
},
/**

View File

@@ -1,2 +1,2 @@
<t-input label="{{label||''}}" placeholder="{{placeholder || label || '' }}" bind:change="onChange"
bind:clear="onClear" clearable />
bind:clear="onClear" clearable value="{{value || ''}}" />

View File

@@ -0,0 +1,15 @@
{
"usingComponents": {
"search-popup": "/pages/components/search-popup/search-popup",
"card-plugin": "/pages/components/card-plugin/card-plugin",
"card-item-plugin": "/pages/components/card-item-plugin/card-item-plugin",
"option-cell-plugin": "/pages/components/option-cell-plugin/option-cell-plugin",
"date-picker-plugin": "/pages/components/date-picker-plugin/date-picker-plugin",
"sort-plugin": "/pages/components/sort-plugin/sort-plugin",
"count-plugin": "/pages/components/count-plugin/count-plugin",
"total-bar-plugin": "/pages/components/total-bar-plugin/total-bar-plugin",
"pagination-plugin": "/pages/components/pagination-plugin/pagination-plugin",
"search-input": "/pages/components/search-input/search-input"
},
"navigationBarTitleText": "资金明细"
}

View File

@@ -0,0 +1,171 @@
import { loginStatus, post } from '@/utils/https';
import {
cloneLite,
getAuthInfo,
getDataSet,
showModal,
sleep,
toArray,
toastSuccess,
toNumber,
} from '@/utils/util';
const defaultParams = { curr_page: 1, page_count: 20, head_type: 5 };
Page({
/**
* 页面的初始数据
*/
data: {
params: cloneLite(defaultParams) as any,
list: [] as any[],
count: 0,
states: [
{ value: '', label: '全部' },
{ value: '1', label: '未审核' },
{ value: '2', label: '已审核' },
],
sort: [{ label: '创建日期', value: 'create_date' }],
},
handleLogin(e: any) {
this.setData({ isLogin: e.detail });
if (e.detail) {
this.init();
}
},
init() {
this.setData({ authInfo: getAuthInfo() });
this.getList();
},
searchChange(e: any) {
const key = getDataSet(e).key;
this.data.params[key] = e.detail.value;
this.setData({ params: this.data.params });
},
searchChange2(e: any) {
const key = getDataSet(e).key;
const val = `${e.detail.value || ''}`.trim();
if (val) {
this.data.params[key] = val;
} else {
delete this.data.params[key];
}
this.setData({ params: this.data.params });
},
onOptionChange(e: any) {
const key = getDataSet(e).key;
this.data.params[key] = e.detail.value;
this.setData({ params: this.data.params });
},
datePickerConfirm(e: any) {
const data = getDataSet(e);
this.data.params[data.key] = e.detail.value;
this.setData({ params: this.data.params });
},
searchOk() {
this.getList(1);
},
searchReset() {
this.data.params = cloneLite(defaultParams);
this.getList(1);
},
onSort(e: any) {
this.data.params.order = e.detail.value;
this.setData({ params: this.data.params });
this.getList(1);
},
paginationChange(e: any) {
this.getList(e.detail.curr_page);
},
getList(curr: number = 1) {
this.data.params.curr_page = curr;
this.setData({ params: this.data.params });
const temp = cloneLite(this.data.params);
if (temp.order_step && temp.order_step.length) {
temp.order_step = temp.order_step.join(',');
} else {
delete temp.order_step;
}
if (temp.process_state && temp.process_state.length) {
temp.process_state = temp.process_state.join(',');
} else {
delete temp.process_state;
}
post('ErpAccount/flow', temp).then((res: any) => {
const list = toArray(res.data);
if (list.length == 0 && this.data.params.curr_page > 1) {
this.getList(this.data.params.curr_page - 1);
}
this.setData({
count: toNumber(res.count),
list: list,
});
});
},
onOrderDel(e: any) {
const data = getDataSet(e);
const index = data.index;
const item = this.data.list[index];
showModal({ content: `确认删除 ${item.bill_no} 订单?` }).then(() => {
post('ErpFinance/del', { head_id: item.head_id }).then(() => {
toastSuccess('删除成功');
sleep(() => {
this.getList();
}, 1000);
});
});
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(_options) {},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
this.setData({ loading: true });
loginStatus()
.then(() => {
this.setData({ isLogin: true, loading: false });
this.init();
})
.catch((err) => {
this.setData({ isLogin: false, loading: false });
console.log('调用登录状态请求失败', err);
});
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {},
});

View File

@@ -0,0 +1,54 @@
<page-plugin isAuth="{{authInfo['SF_FINANCE_TRANSFER_VIEW']}}" loading="{{loading}}"
is-login="{{isLogin}}" bind:handleLogin="handleLogin">
<search-popup placeholder="输入单据编号" bind:change="searchChange" bind:ok="searchOk"
bind:reset="searchReset" value="{{params.rel_bill_no}}" data-key="rel_bill_no">
<view slot="content">
<!-- <search-input label="付款账户" value="{{params.account_name}}" data-key="account_name"
bind:change="searchChange2" /> -->
<!-- <option-cell-plugin title="单据状态" value="{{params.state || ''}}" bind:change="onOptionChange"
mode="radio" options="{{states}}" data-key="state" /> -->
<date-picker-plugin title="交易开始日期" value="{{params.pay_dateL}}" data-key="pay_dateL"
bind:confirm="datePickerConfirm" />
<date-picker-plugin title="交易结束日期" value="{{params.pay_dateU}}" data-key="pay_dateU"
bind:confirm="datePickerConfirm" />
<!-- <date-picker-plugin title="创建开始日期" value="{{params.create_dateL}}" data-key="create_dateL"
bind:confirm="datePickerConfirm" />
<date-picker-plugin title="创建结束日期" value="{{params.create_dateU}}" data-key="create_dateU"
bind:confirm="datePickerConfirm" /> -->
</view>
</search-popup>
<count-plugin count="{{count}}">
<!-- <sort-plugin options="{{sort}}" bind:ok="onSort" value="{{params.order}}" slot="right" /> -->
</count-plugin>
<t-empty wx:if="{{list.length == 0}}" icon="info-circle-filled" description="暂无数据"
style="margin-bottom: 24rpx;" />
<block wx:for="{{ list }}" wx:key="info_process_id">
<card-plugin>
<view slot="header">{{ item.rel_bill_no }}</view>
<view slot="content">
<card-item-plugin label="业务类型" value="{{item.type}}" />
<card-item-plugin label="账户" value="{{item.account_name}}" />
<card-item-plugin label="收支类型" value="{{item.pay_type}}" />
<card-item-plugin label="变更金额" value="{{item.amount}}" />
<card-item-plugin label="变更前" value="{{item.before}}" />
<card-item-plugin label="剩余金额" value="{{item.after}}" />
<card-item-plugin label="操作员">
<view slot="value">
{{item.creator_name}}
<text wx:if="{{item.creator_nick_name}}">({{item.creator_nick_name}})</text>
</view>
</card-item-plugin>
<card-item-plugin label="备注" value="{{item.comments}}" />
<card-item-plugin label="交易时间" value="{{item.pay_date}}" />
<card-item-plugin label="创建日期" value="{{item.create_date}}" />
</view>
</card-plugin>
</block>
<pagination-plugin curr_page="{{params.curr_page}}" page_count="{{params.page_count}}"
total="{{count}}" bind:change="paginationChange" />
</page-plugin>

View File

@@ -0,0 +1 @@
/* pages/finance/flow/flow.wxss */

View File

@@ -0,0 +1,15 @@
{
"usingComponents": {
"search-popup": "/pages/components/search-popup/search-popup",
"card-plugin": "/pages/components/card-plugin/card-plugin",
"card-item-plugin": "/pages/components/card-item-plugin/card-item-plugin",
"option-cell-plugin": "/pages/components/option-cell-plugin/option-cell-plugin",
"date-picker-plugin": "/pages/components/date-picker-plugin/date-picker-plugin",
"sort-plugin": "/pages/components/sort-plugin/sort-plugin",
"count-plugin": "/pages/components/count-plugin/count-plugin",
"total-bar-plugin": "/pages/components/total-bar-plugin/total-bar-plugin",
"pagination-plugin": "/pages/components/pagination-plugin/pagination-plugin",
"search-input": "/pages/components/search-input/search-input"
},
"navigationBarTitleText": "转账单"
}

View File

@@ -0,0 +1,171 @@
import { loginStatus, post } from '@/utils/https';
import {
cloneLite,
getAuthInfo,
getDataSet,
showModal,
sleep,
toArray,
toastSuccess,
toNumber,
} from '@/utils/util';
const defaultParams = { curr_page: 1, page_count: 20, head_type: 5 };
Page({
/**
* 页面的初始数据
*/
data: {
params: cloneLite(defaultParams) as any,
list: [] as any[],
count: 0,
states: [
{ value: '', label: '全部' },
{ value: '1', label: '未审核' },
{ value: '2', label: '已审核' },
],
sort: [{ label: '创建日期', value: 'create_date' }],
},
handleLogin(e: any) {
this.setData({ isLogin: e.detail });
if (e.detail) {
this.init();
}
},
init() {
this.setData({ authInfo: getAuthInfo() });
this.getList();
},
searchChange(e: any) {
const key = getDataSet(e).key;
this.data.params[key] = e.detail.value;
this.setData({ params: this.data.params });
},
searchChange2(e: any) {
const key = getDataSet(e).key;
const val = `${e.detail.value || ''}`.trim();
if (val) {
this.data.params[key] = val;
} else {
delete this.data.params[key];
}
this.setData({ params: this.data.params });
},
onOptionChange(e: any) {
const key = getDataSet(e).key;
this.data.params[key] = e.detail.value;
this.setData({ params: this.data.params });
},
datePickerConfirm(e: any) {
const data = getDataSet(e);
this.data.params[data.key] = e.detail.value;
this.setData({ params: this.data.params });
},
searchOk() {
this.getList(1);
},
searchReset() {
this.data.params = cloneLite(defaultParams);
this.getList(1);
},
onSort(e: any) {
this.data.params.order = e.detail.value;
this.setData({ params: this.data.params });
this.getList(1);
},
paginationChange(e: any) {
this.getList(e.detail.curr_page);
},
getList(curr: number = 1) {
this.data.params.curr_page = curr;
this.setData({ params: this.data.params });
const temp = cloneLite(this.data.params);
if (temp.order_step && temp.order_step.length) {
temp.order_step = temp.order_step.join(',');
} else {
delete temp.order_step;
}
if (temp.process_state && temp.process_state.length) {
temp.process_state = temp.process_state.join(',');
} else {
delete temp.process_state;
}
post('ErpFinance/list', temp).then((res: any) => {
const list = toArray(res.data?.list);
if (list.length == 0 && this.data.params.curr_page > 1) {
this.getList(this.data.params.curr_page - 1);
}
this.setData({
count: toNumber(res.data?.count),
list: list,
});
});
},
onOrderDel(e: any) {
const data = getDataSet(e);
const index = data.index;
const item = this.data.list[index];
showModal({ content: `确认删除 ${item.bill_no} 订单?` }).then(() => {
post('ErpFinance/del', { head_id: item.head_id }).then(() => {
toastSuccess('删除成功');
sleep(() => {
this.getList();
}, 1000);
});
});
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(_options) {},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
this.setData({ loading: true });
loginStatus()
.then(() => {
this.setData({ isLogin: true, loading: false });
this.init();
})
.catch((err) => {
this.setData({ isLogin: false, loading: false });
console.log('调用登录状态请求失败', err);
});
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {},
});

View File

@@ -0,0 +1,55 @@
<page-plugin isAuth="{{authInfo['SF_FINANCE_TRANSFER_VIEW']}}" loading="{{loading}}"
is-login="{{isLogin}}" bind:handleLogin="handleLogin">
<search-popup placeholder="输入单据编号" bind:change="searchChange" bind:ok="searchOk"
bind:reset="searchReset" value="{{params.bill_no}}" data-key="bill_no">
<view slot="content">
<search-input label="付款账户" value="{{params.account_name}}" data-key="account_name"
bind:change="searchChange2" />
<option-cell-plugin title="单据状态" value="{{params.state || ''}}" bind:change="onOptionChange"
mode="radio" options="{{states}}" data-key="state" />
<date-picker-plugin title="单据开始日期" value="{{params.bill_dateL}}" data-key="bill_dateL"
bind:confirm="datePickerConfirm" />
<date-picker-plugin title="单据结束日期" value="{{params.bill_dateU}}" data-key="bill_dateU"
bind:confirm="datePickerConfirm" />
<!-- <date-picker-plugin title="创建开始日期" value="{{params.create_dateL}}" data-key="create_dateL"
bind:confirm="datePickerConfirm" />
<date-picker-plugin title="创建结束日期" value="{{params.create_dateU}}" data-key="create_dateU"
bind:confirm="datePickerConfirm" /> -->
</view>
</search-popup>
<count-plugin count="{{count}}">
<!-- <sort-plugin options="{{sort}}" bind:ok="onSort" value="{{params.order}}" slot="right" /> -->
</count-plugin>
<t-empty wx:if="{{list.length == 0}}" icon="info-circle-filled" description="暂无数据"
style="margin-bottom: 24rpx;" />
<block wx:for="{{ list }}" wx:key="info_process_id">
<card-plugin>
<view slot="header">{{ item.bill_no }}</view>
<view slot="content">
<card-item-plugin label="单据日期" value="{{item.bill_date}}" />
<card-item-plugin label="操作员">
<view slot="value">
{{item.creator_name}}
<text wx:if="{{item.creator_nick_name}}">({{item.creator_nick_name}})</text>
</view>
</card-item-plugin>
<card-item-plugin label="付款账户" value="{{item.account_name}}" />
<card-item-plugin label="实付金额" value="{{item.total_amount}}" />
<card-item-plugin label="状态" value="{{item.state_name}}" />
<card-item-plugin label="备注" value="{{item.comments}}" />
<card-item-plugin label="创建日期" value="{{item.create_date}}" />
</view>
<view slot="footer" style="padding-bottom: 16rpx;">
<t-button wx:if="{{authInfo['SF_FINANCE_TRANSFER_DEL']}}" size="small" theme="danger"
bind:tap="onOrderDel" data-index="{{index}}">删除</t-button>
</view>
</card-plugin>
</block>
<pagination-plugin curr_page="{{params.curr_page}}" page_count="{{params.page_count}}"
total="{{count}}" bind:change="paginationChange" />
</page-plugin>

View File

@@ -0,0 +1 @@
/* pages/finance/giro/giro.wxss */

View File

@@ -0,0 +1,15 @@
{
"usingComponents": {
"search-popup": "/pages/components/search-popup/search-popup",
"card-plugin": "/pages/components/card-plugin/card-plugin",
"card-item-plugin": "/pages/components/card-item-plugin/card-item-plugin",
"option-cell-plugin": "/pages/components/option-cell-plugin/option-cell-plugin",
"date-picker-plugin": "/pages/components/date-picker-plugin/date-picker-plugin",
"sort-plugin": "/pages/components/sort-plugin/sort-plugin",
"count-plugin": "/pages/components/count-plugin/count-plugin",
"total-bar-plugin": "/pages/components/total-bar-plugin/total-bar-plugin",
"pagination-plugin": "/pages/components/pagination-plugin/pagination-plugin",
"search-input": "/pages/components/search-input/search-input"
},
"navigationBarTitleText": "收入单"
}

View File

@@ -0,0 +1,171 @@
import { loginStatus, post } from '@/utils/https';
import {
cloneLite,
getAuthInfo,
getDataSet,
showModal,
sleep,
toArray,
toastSuccess,
toNumber,
} from '@/utils/util';
const defaultParams = { curr_page: 1, page_count: 20, head_type: 1 };
Page({
/**
* 页面的初始数据
*/
data: {
params: cloneLite(defaultParams) as any,
list: [] as any[],
count: 0,
states: [
{ value: '', label: '全部' },
{ value: '1', label: '未审核' },
{ value: '2', label: '已审核' },
],
sort: [{ label: '创建日期', value: 'create_date' }],
},
handleLogin(e: any) {
this.setData({ isLogin: e.detail });
if (e.detail) {
this.init();
}
},
init() {
this.setData({ authInfo: getAuthInfo() });
this.getList();
},
searchChange(e: any) {
const key = getDataSet(e).key;
this.data.params[key] = e.detail.value;
this.setData({ params: this.data.params });
},
searchChange2(e: any) {
const key = getDataSet(e).key;
const val = `${e.detail.value || ''}`.trim();
if (val) {
this.data.params[key] = val;
} else {
delete this.data.params[key];
}
this.setData({ params: this.data.params });
},
onOptionChange(e: any) {
const key = getDataSet(e).key;
this.data.params[key] = e.detail.value;
this.setData({ params: this.data.params });
},
datePickerConfirm(e: any) {
const data = getDataSet(e);
this.data.params[data.key] = e.detail.value;
this.setData({ params: this.data.params });
},
searchOk() {
this.getList(1);
},
searchReset() {
this.data.params = cloneLite(defaultParams);
this.getList(1);
},
onSort(e: any) {
this.data.params.order = e.detail.value;
this.setData({ params: this.data.params });
this.getList(1);
},
paginationChange(e: any) {
this.getList(e.detail.curr_page);
},
getList(curr: number = 1) {
this.data.params.curr_page = curr;
this.setData({ params: this.data.params });
const temp = cloneLite(this.data.params);
if (temp.order_step && temp.order_step.length) {
temp.order_step = temp.order_step.join(',');
} else {
delete temp.order_step;
}
if (temp.process_state && temp.process_state.length) {
temp.process_state = temp.process_state.join(',');
} else {
delete temp.process_state;
}
post('ErpFinance/list', temp).then((res: any) => {
const list = toArray(res.data?.list);
if (list.length == 0 && this.data.params.curr_page > 1) {
this.getList(this.data.params.curr_page - 1);
}
this.setData({
count: toNumber(res.data?.count),
list: list,
});
});
},
onOrderDel(e: any) {
const data = getDataSet(e);
const index = data.index;
const item = this.data.list[index];
showModal({ content: `确认删除 ${item.bill_no} 订单?` }).then(() => {
post('ErpFinance/del', { head_id: item.head_id }).then(() => {
toastSuccess('删除成功');
sleep(() => {
this.getList();
}, 1000);
});
});
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(_options) {},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
this.setData({ loading: true });
loginStatus()
.then(() => {
this.setData({ isLogin: true, loading: false });
this.init();
})
.catch((err) => {
this.setData({ isLogin: false, loading: false });
console.log('调用登录状态请求失败', err);
});
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {},
});

View File

@@ -0,0 +1,60 @@
<page-plugin isAuth="{{authInfo['SF_FINANCE_INCOME_VIEW']}}" loading="{{loading}}"
is-login="{{isLogin}}" bind:handleLogin="handleLogin">
<search-popup placeholder="输入单据编号" bind:change="searchChange" bind:ok="searchOk"
bind:reset="searchReset" value="{{params.bill_no}}" data-key="bill_no">
<view slot="content">
<search-input label="销售单号" value="{{params.rel_bill_no}}" data-key="rel_bill_no"
bind:change="searchChange2" />
<search-input label="收入账户" value="{{params.account_name}}" data-key="account_name"
bind:change="searchChange2" />
<search-input label="往来单位" value="{{params.crm_name}}" data-key="crm_name"
bind:change="searchChange2" />
<option-cell-plugin title="单据状态" value="{{params.state || ''}}" bind:change="onOptionChange"
mode="radio" options="{{states}}" data-key="state" />
<date-picker-plugin title="单据开始日期" value="{{params.bill_dateL}}" data-key="bill_dateL"
bind:confirm="datePickerConfirm" />
<date-picker-plugin title="单据结束日期" value="{{params.bill_dateU}}" data-key="bill_dateU"
bind:confirm="datePickerConfirm" />
<!-- <date-picker-plugin title="创建开始日期" value="{{params.create_dateL}}" data-key="create_dateL"
bind:confirm="datePickerConfirm" />
<date-picker-plugin title="创建结束日期" value="{{params.create_dateU}}" data-key="create_dateU"
bind:confirm="datePickerConfirm" /> -->
</view>
</search-popup>
<count-plugin count="{{count}}">
<!-- <sort-plugin options="{{sort}}" bind:ok="onSort" value="{{params.order}}" slot="right" /> -->
</count-plugin>
<t-empty wx:if="{{list.length == 0}}" icon="info-circle-filled" description="暂无数据"
style="margin-bottom: 24rpx;" />
<block wx:for="{{ list }}" wx:key="info_process_id">
<card-plugin>
<view slot="header">{{ item.bill_no }}</view>
<view slot="content">
<card-item-plugin label="关联销售单" value="{{item.rel_bill_no}}" />
<card-item-plugin label="单据日期" value="{{item.bill_date}}" />
<card-item-plugin label="操作员">
<view slot="value">
{{item.creator_name}}
<text wx:if="{{item.creator_nick_name}}">({{item.creator_nick_name}})</text>
</view>
</card-item-plugin>
<card-item-plugin label="往来单位" value="{{item.crm_name}}" />
<card-item-plugin label="收入账户" value="{{item.account_name}}" />
<card-item-plugin label="收入金额" value="{{item.total_amount}}" />
<card-item-plugin label="状态" value="{{item.state_name}}" />
<card-item-plugin label="备注" value="{{item.comments}}" />
<card-item-plugin label="创建日期" value="{{item.create_date}}" />
</view>
<view slot="footer" style="padding-bottom: 16rpx;">
<t-button wx:if="{{authInfo['SF_FINANCE_INCOME_DEL']}}" size="small" theme="danger"
bind:tap="onOrderDel" data-index="{{index}}">删除</t-button>
</view>
</card-plugin>
</block>
<pagination-plugin curr_page="{{params.curr_page}}" page_count="{{params.page_count}}"
total="{{count}}" bind:change="paginationChange" />
</page-plugin>

View File

@@ -0,0 +1,15 @@
{
"usingComponents": {
"search-popup": "/pages/components/search-popup/search-popup",
"card-plugin": "/pages/components/card-plugin/card-plugin",
"card-item-plugin": "/pages/components/card-item-plugin/card-item-plugin",
"option-cell-plugin": "/pages/components/option-cell-plugin/option-cell-plugin",
"date-picker-plugin": "/pages/components/date-picker-plugin/date-picker-plugin",
"sort-plugin": "/pages/components/sort-plugin/sort-plugin",
"count-plugin": "/pages/components/count-plugin/count-plugin",
"total-bar-plugin": "/pages/components/total-bar-plugin/total-bar-plugin",
"pagination-plugin": "/pages/components/pagination-plugin/pagination-plugin",
"search-input": "/pages/components/search-input/search-input"
},
"navigationBarTitleText": "支出单"
}

View File

@@ -0,0 +1,171 @@
import { loginStatus, post } from '@/utils/https';
import {
cloneLite,
getAuthInfo,
getDataSet,
showModal,
sleep,
toArray,
toastSuccess,
toNumber,
} from '@/utils/util';
const defaultParams = { curr_page: 1, page_count: 20, head_type: 2 };
Page({
/**
* 页面的初始数据
*/
data: {
params: cloneLite(defaultParams) as any,
list: [] as any[],
count: 0,
states: [
{ value: '', label: '全部' },
{ value: '1', label: '未审核' },
{ value: '2', label: '已审核' },
],
sort: [{ label: '创建日期', value: 'create_date' }],
},
handleLogin(e: any) {
this.setData({ isLogin: e.detail });
if (e.detail) {
this.init();
}
},
init() {
this.setData({ authInfo: getAuthInfo() });
this.getList();
},
searchChange(e: any) {
const key = getDataSet(e).key;
this.data.params[key] = e.detail.value;
this.setData({ params: this.data.params });
},
searchChange2(e: any) {
const key = getDataSet(e).key;
const val = `${e.detail.value || ''}`.trim();
if (val) {
this.data.params[key] = val;
} else {
delete this.data.params[key];
}
this.setData({ params: this.data.params });
},
onOptionChange(e: any) {
const key = getDataSet(e).key;
this.data.params[key] = e.detail.value;
this.setData({ params: this.data.params });
},
datePickerConfirm(e: any) {
const data = getDataSet(e);
this.data.params[data.key] = e.detail.value;
this.setData({ params: this.data.params });
},
searchOk() {
this.getList(1);
},
searchReset() {
this.data.params = cloneLite(defaultParams);
this.getList(1);
},
onSort(e: any) {
this.data.params.order = e.detail.value;
this.setData({ params: this.data.params });
this.getList(1);
},
paginationChange(e: any) {
this.getList(e.detail.curr_page);
},
getList(curr: number = 1) {
this.data.params.curr_page = curr;
this.setData({ params: this.data.params });
const temp = cloneLite(this.data.params);
if (temp.order_step && temp.order_step.length) {
temp.order_step = temp.order_step.join(',');
} else {
delete temp.order_step;
}
if (temp.process_state && temp.process_state.length) {
temp.process_state = temp.process_state.join(',');
} else {
delete temp.process_state;
}
post('ErpFinance/list', temp).then((res: any) => {
const list = toArray(res.data?.list);
if (list.length == 0 && this.data.params.curr_page > 1) {
this.getList(this.data.params.curr_page - 1);
}
this.setData({
count: toNumber(res.data?.count),
list: list,
});
});
},
onOrderDel(e: any) {
const data = getDataSet(e);
const index = data.index;
const item = this.data.list[index];
showModal({ content: `确认删除 ${item.bill_no} 订单?` }).then(() => {
post('ErpFinance/del', { head_id: item.head_id }).then(() => {
toastSuccess('删除成功');
sleep(() => {
this.getList();
}, 1000);
});
});
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(_options) {},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
this.setData({ loading: true });
loginStatus()
.then(() => {
this.setData({ isLogin: true, loading: false });
this.init();
})
.catch((err) => {
this.setData({ isLogin: false, loading: false });
console.log('调用登录状态请求失败', err);
});
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {},
});

View File

@@ -0,0 +1,60 @@
<page-plugin isAuth="{{authInfo['SF_FINANCE_OUTCOME_VIEW']}}" loading="{{loading}}"
is-login="{{isLogin}}" bind:handleLogin="handleLogin">
<search-popup placeholder="输入单据编号" bind:change="searchChange" bind:ok="searchOk"
bind:reset="searchReset" value="{{params.bill_no}}" data-key="bill_no">
<view slot="content">
<search-input label="销售单号" value="{{params.rel_bill_no}}" data-key="rel_bill_no"
bind:change="searchChange2" />
<search-input label="收入账户" value="{{params.account_name}}" data-key="account_name"
bind:change="searchChange2" />
<search-input label="往来单位" value="{{params.crm_name}}" data-key="crm_name"
bind:change="searchChange2" />
<option-cell-plugin title="单据状态" value="{{params.state || ''}}" bind:change="onOptionChange"
mode="radio" options="{{states}}" data-key="state" />
<date-picker-plugin title="单据开始日期" value="{{params.bill_dateL}}" data-key="bill_dateL"
bind:confirm="datePickerConfirm" />
<date-picker-plugin title="单据结束日期" value="{{params.bill_dateU}}" data-key="bill_dateU"
bind:confirm="datePickerConfirm" />
<!-- <date-picker-plugin title="创建开始日期" value="{{params.create_dateL}}" data-key="create_dateL"
bind:confirm="datePickerConfirm" />
<date-picker-plugin title="创建结束日期" value="{{params.create_dateU}}" data-key="create_dateU"
bind:confirm="datePickerConfirm" /> -->
</view>
</search-popup>
<count-plugin count="{{count}}">
<!-- <sort-plugin options="{{sort}}" bind:ok="onSort" value="{{params.order}}" slot="right" /> -->
</count-plugin>
<t-empty wx:if="{{list.length == 0}}" icon="info-circle-filled" description="暂无数据"
style="margin-bottom: 24rpx;" />
<block wx:for="{{ list }}" wx:key="info_process_id">
<card-plugin>
<view slot="header">{{ item.bill_no }}</view>
<view slot="content">
<card-item-plugin label="关联销售单" value="{{item.rel_bill_no}}" />
<card-item-plugin label="单据日期" value="{{item.bill_date}}" />
<card-item-plugin label="操作员">
<view slot="value">
{{item.creator_name}}
<text wx:if="{{item.creator_nick_name}}">({{item.creator_nick_name}})</text>
</view>
</card-item-plugin>
<card-item-plugin label="往来单位" value="{{item.crm_name}}" />
<card-item-plugin label="收入账户" value="{{item.account_name}}" />
<card-item-plugin label="收入金额" value="{{item.total_amount}}" />
<card-item-plugin label="状态" value="{{item.state_name}}" />
<card-item-plugin label="备注" value="{{item.comments}}" />
<card-item-plugin label="创建日期" value="{{item.create_date}}" />
</view>
<view slot="footer" style="padding-bottom: 16rpx;">
<t-button wx:if="{{authInfo['SF_FINANCE_OUTCOME_DEL']}}" size="small" theme="danger"
bind:tap="onOrderDel" data-index="{{index}}">删除</t-button>
</view>
</card-plugin>
</block>
<pagination-plugin curr_page="{{params.curr_page}}" page_count="{{params.page_count}}"
total="{{count}}" bind:change="paginationChange" />
</page-plugin>

View File

@@ -0,0 +1 @@
/* pages/finance/outcome/outcome.wxss */

View File

@@ -99,7 +99,7 @@ Page({
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
onLoad(_options) {
// console.log(options);
this.setData({ loading: true });

View File

@@ -3,18 +3,13 @@
"search-popup": "/pages/components/search-popup/search-popup",
"card-plugin": "/pages/components/card-plugin/card-plugin",
"card-item-plugin": "/pages/components/card-item-plugin/card-item-plugin",
"option-cell-plugin": "/pages/components/option-cell-plugin/option-cell-plugin",
"date-picker-plugin": "/pages/components/date-picker-plugin/date-picker-plugin",
"sort-plugin": "/pages/components/sort-plugin/sort-plugin",
"count-plugin": "/pages/components/count-plugin/count-plugin",
"total-bar-plugin": "/pages/components/total-bar-plugin/total-bar-plugin",
"t-input": "tdesign-miniprogram/input/input",
"pagination-plugin": "/pages/components/pagination-plugin/pagination-plugin",
"search-input": "/pages/components/search-input/search-input",
"t-cell": "tdesign-miniprogram/cell/cell",
"t-checkbox": "tdesign-miniprogram/checkbox/checkbox",
"t-checkbox-group": "tdesign-miniprogram/checkbox-group/checkbox-group",
"t-radio": "tdesign-miniprogram/radio/radio",
"t-radio-group": "tdesign-miniprogram/radio-group/radio-group"
"search-input": "/pages/components/search-input/search-input"
},
"navigationBarTitleText": "销售订单"
}

View File

@@ -65,7 +65,8 @@ Page({
this.getOrderStep();
},
searchChange(e: any) {
this.data.params.order_no = e.detail.value;
const key = getDataSet(e).key;
this.data.params[key] = e.detail.value;
this.setData({ params: this.data.params });
},
searchChange2(e: any) {
@@ -76,17 +77,11 @@ Page({
} else {
delete this.data.params[key];
}
},
onOrderStepChange(e: any) {
this.data.params.order_step = e.detail.value;
this.setData({ params: this.data.params });
},
onProcessStateChange(e: any) {
this.data.params.process_state = e.detail.value;
this.setData({ params: this.data.params });
},
onPayedStateChange(e: any) {
this.data.params.payed_state = e.detail.value;
onOptionChange(e: any) {
const key = getDataSet(e).key;
this.data.params[key] = e.detail.value;
this.setData({ params: this.data.params });
},
datePickerConfirm(e: any) {
@@ -106,25 +101,25 @@ Page({
this.setData({ params: this.data.params });
this.getList(1);
},
tabChange(e: any) {
const state = getDataSet(e).key;
this.data.params.state = state;
this.getList();
},
paginationChange(e: any) {
this.getList(e.detail.curr_page);
},
getOrderStep() {
post('OrderStep/list').then((res: any) => {
this.setData({ orderStep: toArray(res.data) });
this.setData({
orderStep: toArray(res.data).map((el) => ({
label: el.order_step_name,
value: el.order_step_id,
})),
});
});
},
getList(curr: number = 1) {
this.data.params.curr_page = curr;
this.setData({ params: this.data.params });
const temp = JSON.parse(JSON.stringify(this.data.params));
const temp = cloneLite(this.data.params);
if (temp.order_step && temp.order_step.length) {
temp.order_step = JSON.stringify(temp.order_step);
temp.order_step = temp.order_step.join(',');
} else {
delete temp.order_step;
}
@@ -175,7 +170,7 @@ Page({
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {},
onLoad(_options) {},
/**
* 生命周期函数--监听页面初次渲染完成

View File

@@ -1,47 +1,31 @@
<page-plugin isAuth="{{authInfo['SF_ERP_SALE_ORDERS_VIEW']}}" loading="{{loading}}"
is-login="{{isLogin}}" bind:handleLogin="handleLogin">
<search-popup placeholder="输入销售单号" bind:change="searchChange" bind:ok="searchOk"
bind:reset="searchReset" value="{{params.order_no}}">
bind:reset="searchReset" value="{{params.order_no}}" data-key="order_no">
<view slot="content">
<search-input label="自定义单号" data-key="custom_order_no" bind:change="searchChange2" />
<search-input label="经销商名称" data-key="custom_name" bind:change="searchChange2" />
<search-input label="经销商手机" data-key="custom_phone" bind:change="searchChange2" />
<!-- <search-input label="经销商地址" data-key="custom_address" bind:change="searchChange2" /> -->
<search-input label="客户名称" data-key="end_user_name" bind:change="searchChange2" />
<search-input label="客户手机" data-key="end_user_phone" bind:change="searchChange2" />
<search-input label="客户地址" data-key="end_user_address" bind:change="searchChange2" />
<t-cell title="订单阶段">
<t-checkbox-group slot="note" bind:change="onOrderStepChange" value="{{params.order_step}}">
<block wx:for="{{orderStep}}" wx:key="index">
<t-checkbox icon="rectangle" borderless="{{true}}" block="{{false}}"
value="{{item.order_step_id}}" style="margin-right: 16rpx;">
{{item.order_step_name}}
</t-checkbox>
</block>
</t-checkbox-group>
</t-cell>
<t-cell title="生产状态">
<t-checkbox-group slot="note" bind:change="onProcessStateChange"
value="{{params.process_state}}">
<block wx:for="{{saleOrderProcessStateOption}}" wx:key="index">
<t-checkbox icon="rectangle" borderless="{{true}}" block="{{false}}"
value="{{item.value}}" style="margin-right: 16rpx;">
{{item.label}}
</t-checkbox>
</block>
</t-checkbox-group>
</t-cell>
<t-cell title="收款状态">
<t-radio-group slot="note" bind:change="onPayedStateChange"
value="{{params.payed_state || ''}}">
<block wx:for="{{payedStateOption}}" wx:key="index">
<t-radio borderless="{{true}}" block="{{false}}" value="{{item.value}}"
style="margin-right: 16rpx;">
{{item.label}}
</t-radio>
</block>
</t-radio-group>
</t-cell>
<search-input label="自定义单号" value="{{params.custom_order_no}}" data-key="custom_order_no"
bind:change="searchChange2" />
<search-input label="经销商名称" value="{{params.custom_name}}" data-key="custom_name"
bind:change="searchChange2" />
<search-input label="经销商手机" value="{{params.custom_phone}}" data-key="custom_phone"
bind:change="searchChange2" />
<search-input label="客户名称" value="{{params.end_user_name}}" data-key="end_user_name"
bind:change="searchChange2" />
<search-input label="客户手机" value="{{params.end_user_phone}}" data-key="end_user_phone"
bind:change="searchChange2" />
<search-input label="客户地址" value="{{params.end_user_address}}" data-key="end_user_address"
bind:change="searchChange2" />
<option-cell-plugin title="订单阶段" value="{{params.order_step}}" bind:change="onOptionChange"
mode="checkbox" options="{{orderStep}}" data-key="order_step" />
<option-cell-plugin title="生产状态" value="{{params.process_state}}" bind:change="onOptionChange"
mode="checkbox" data-key="process_state" options="{{saleOrderProcessStateOption}}" />
<option-cell-plugin title="收款状态" value="{{params.payed_state || ''}}"
bind:change="onOptionChange" mode="radio" options="{{payedStateOption}}"
data-key="payed_state" />
<date-picker-plugin title="单据开始日期" value="{{params.document_dateL}}" data-key="document_dateL"
bind:confirm="datePickerConfirm" />
<date-picker-plugin title="单据结束日期" value="{{params.document_dateU}}" data-key="document_dateU"

View File

@@ -1,4 +1 @@
view.t-cell__title-text {
white-space: nowrap;
flex-shrink: 0;
}

View File

@@ -7,6 +7,7 @@ Page({
*/
data: {
process: [] as any[],
isFirstEnter: true,
},
navDetail(e: any) {
const index = getDataSet(e).index.split(',');
@@ -14,7 +15,7 @@ Page({
const cProcess = pProcess.child[index[1]];
const { p_process_name, process_name, process_id } = cProcess;
const title = encodeURIComponent(`${p_process_name} - ${process_name}`);
this.data.isFirstEnter = false;
wx.navigateTo({
url: `/pages/produce/processManageDetail/processManageDetail?process_id=${process_id}&title=${title}`,
});
@@ -58,7 +59,11 @@ Page({
/**
* 生命周期函数--监听页面显示
*/
onShow() {},
onShow() {
if (!this.data.isFirstEnter) {
this.getList();
}
},
/**
* 生命周期函数--监听页面隐藏

View File

@@ -1,25 +1,35 @@
.process-box {
border: 1rpx solid #ddd;
margin-bottom: 24rpx;
border-radius: 8rpx;
}
.process-child-box {
display: flex;
flex-wrap: wrap;
align-items: center;
column-gap: 32rpx;
row-gap: 32rpx;
margin-bottom: 32rpx;
padding: 32rpx 16rpx 24rpx;
}
.p_process_name {
font-size: 1.125em;
font-weight: bold;
margin-bottom: 24rpx;
padding: 16rpx;
border-bottom: 1rpx solid #ddd;
}
.process-child-item-box {
position: relative;
border: 1rpx solid #ddd;
padding: 16rpx;
padding: 12rpx 16rpx;
border-radius: 8rpx;
}
.process-child-item-box:active {
background: #eee;
}
.process-child-item-num {
position: absolute;
top: 0;

View File

@@ -1,12 +1,14 @@
import { loginStatus, post } from '@/utils/https';
import { getAuthInfo, getDataSet, toArray, toastSuccess, toNumber } from '@/utils/util';
import { cloneLite, getAuthInfo, getDataSet, toArray, toastSuccess, toNumber } from '@/utils/util';
const defaultParams = { curr_page: 1, page_count: 20, state: '1', process_id: '' };
Page({
/**
* 页面的初始数据
*/
data: {
params: { curr_page: 1, page_count: 20, state: '1', process_id: '' } as any,
params: cloneLite(defaultParams) as any,
list: [] as any[],
count: 0,
dialog: {
@@ -27,25 +29,31 @@ Page({
this.getList();
},
searchChange(e: any) {
this.data.params.order_no = e.detail.value;
const key = getDataSet(e).key;
this.data.params[key] = e.detail.value;
this.setData({ params: this.data.params });
},
searchChange2(e: any) {
const key = getDataSet(e).key;
const val = `${e.detail.value || ''}`.trim();
console.log(e);
if (val) {
this.data.params[key] = val;
} else {
delete this.data.params[key];
}
this.setData({ params: this.data.params });
},
searchOk() {
this.getList(1);
},
searchReset() {
this.data.params = cloneLite(defaultParams);
this.getList(1);
},
tabChange(e: any) {
const state = getDataSet(e).key;
this.data.params.state = state;
this.getList();
this.getList(1);
},
paginationChange(e: any) {
this.getList(e.detail.curr_page);

View File

@@ -1,14 +1,22 @@
<page-plugin isAuth="{{authInfo['SF_ERP_PRODUCT_PROCESS_VIEW']}}" loading="{{loading}}"
is-login="{{isLogin}}" bind:handleLogin="handleLogin">
<search-popup placeholder="输入销售单号" bind:change="searchChange" bind:ok="searchOk">
<search-popup placeholder="输入销售单号" value="{{params.order_no}}" data-key="order_no"
bind:change="searchChange" bind:ok="searchOk" bind:reset="searchReset">
<view slot="content">
<search-input label="自定义单号" data-key="custom_order_no" bind:change="searchChange2" />
<search-input label="经销商名称" data-key="custom_name" bind:change="searchChange2" />
<search-input label="经销商手机" data-key="custom_phone" bind:change="searchChange2" />
<search-input label="经销商地址" data-key="custom_address" bind:change="searchChange2" />
<search-input label="客户名称" data-key="end_user_name" bind:change="searchChange2" />
<search-input label="客户手机" data-key="end_user_phone" bind:change="searchChange2" />
<search-input label="客户地址" data-key="end_user_address" bind:change="searchChange2" />
<search-input label="自定义单号" value="{{params.custom_order_no}}" data-key="custom_order_no"
bind:change="searchChange2" />
<search-input label="经销商名称" value="{{params.custom_name}}" data-key="custom_name"
bind:change="searchChange2" />
<search-input label="经销商手机" value="{{params.custom_phone}}" data-key="custom_phone"
bind:change="searchChange2" />
<search-input label="经销商地址" value="{{params.custom_address}}" data-key="custom_address"
bind:change="searchChange2" />
<search-input label="客户名称" value="{{params.end_user_name}}" data-key="end_user_name"
bind:change="searchChange2" />
<search-input label="客户手机" value="{{params.end_user_phone}}" data-key="end_user_phone"
bind:change="searchChange2" />
<search-input label="客户地址" value="{{params.end_user_address}}" data-key="end_user_address"
bind:change="searchChange2" />
</view>
</search-popup>

View File

@@ -0,0 +1,14 @@
{
"usingComponents": {
"search-popup": "/pages/components/search-popup/search-popup",
"card-plugin": "/pages/components/card-plugin/card-plugin",
"card-item-plugin": "/pages/components/card-item-plugin/card-item-plugin",
"date-picker-plugin": "/pages/components/date-picker-plugin/date-picker-plugin",
"sort-plugin": "/pages/components/sort-plugin/sort-plugin",
"count-plugin": "/pages/components/count-plugin/count-plugin",
"pagination-plugin": "/pages/components/pagination-plugin/pagination-plugin",
"search-input": "/pages/components/search-input/search-input",
"option-cell-plugin": "/pages/components/option-cell-plugin/option-cell-plugin"
},
"navigationBarTitleText": "采购入库"
}

View File

@@ -0,0 +1,161 @@
import { loginStatus, post } from '@/utils/https';
import {
cloneLite,
getAuthInfo,
getDataSet,
showModal,
sleep,
toArray,
toastSuccess,
toNumber,
} from '@/utils/util';
const defaultParams = { curr_page: 1, page_count: 20, head_type: 3 };
Page({
/**
* 页面的初始数据
*/
data: {
params: cloneLite(defaultParams) as any,
list: [] as any[],
count: 0,
sort: [{ label: '创建日期', value: 'create_date' }],
payState: [
{ value: '', label: '全部' },
{ value: 1, label: '未结算' },
{ value: 2, label: '部分结算' },
{ value: 3, label: '完成结算' },
{ value: 4, label: '无需结算' },
],
},
handleLogin(e: any) {
this.setData({ isLogin: e.detail });
if (e.detail) {
this.init();
}
},
init() {
this.setData({ authInfo: getAuthInfo() });
this.getList();
},
searchChange(e: any) {
const key = getDataSet(e).key;
this.data.params[key] = e.detail.value;
this.setData({ params: this.data.params });
},
searchChange2(e: any) {
const key = getDataSet(e).key;
const val = `${e.detail.value || ''}`.trim();
if (val) {
this.data.params[key] = val;
} else {
delete this.data.params[key];
}
this.setData({ params: this.data.params });
},
onOptionChange(e: any) {
const key = getDataSet(e).key;
this.data.params[key] = e.detail.value;
this.setData({ params: this.data.params });
},
datePickerConfirm(e: any) {
const data = getDataSet(e);
this.data.params[data.key] = e.detail.value;
this.setData({ params: this.data.params });
},
searchOk() {
this.getList(1);
},
searchReset() {
this.data.params = cloneLite(defaultParams);
this.getList(1);
},
onSort(e: any) {
this.data.params.order = e.detail.value;
this.setData({ params: this.data.params });
this.getList(1);
},
paginationChange(e: any) {
this.getList(e.detail.curr_page);
},
getList(curr: number = 1) {
this.data.params.curr_page = curr;
this.setData({ params: this.data.params });
const temp = cloneLite(this.data.params);
post('ErpDepot/depotHeadList', temp).then((res: any) => {
const list = toArray(res.data);
if (list.length == 0 && this.data.params.curr_page > 1) {
this.getList(this.data.params.curr_page - 1);
}
this.setData({
count: toNumber(res.count),
list: list,
});
});
},
onOrderDel(e: any) {
const data = getDataSet(e);
const index = data.index;
const item = this.data.list[index];
showModal({ content: `确认删除 ${item.bill_no} 订单?` }).then(() => {
post('ErpDepot/depotHeadDel', { head_id: item.head_id }).then(() => {
toastSuccess('删除成功');
sleep(() => {
this.getList();
}, 1000);
});
});
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(_options) {},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
this.setData({ loading: true });
loginStatus()
.then(() => {
this.setData({ isLogin: true, loading: false });
this.init();
})
.catch((err) => {
this.setData({ isLogin: false, loading: false });
console.log('调用登录状态请求失败', err);
});
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {},
});

View File

@@ -0,0 +1,61 @@
<page-plugin isAuth="{{authInfo['SF_ERP_PURCHASE_STORE_VIEW']}}" loading="{{loading}}"
is-login="{{isLogin}}" bind:handleLogin="handleLogin">
<search-popup placeholder="输入单据编码" bind:change="searchChange" bind:ok="searchOk"
bind:reset="searchReset" value="{{params.order_no}}" data-key="order_no">
<view slot="content">
<search-input label="供应商名称" value="{{params.crm_name}}" data-key="crm_name"
bind:change="searchChange2" />
<search-input label="关联单据" value="{{params.rel_bill_no}}" data-key="rel_bill_no"
bind:change="searchChange2" />
<option-cell-plugin title="结算状态" bind:change="onOptionChange"
value="{{params.pay_state || ''}}" options="{{payState}}" mode="radio"
data-key="pay_state" />
<date-picker-plugin title="单据开始日期" value="{{params.bill_dateL}}" data-key="bill_dateL"
bind:confirm="datePickerConfirm" />
<date-picker-plugin title="单据结束日期" value="{{params.bill_dateU}}" data-key="bill_dateU"
bind:confirm="datePickerConfirm" />
<!-- <date-picker-plugin title="创建开始日期" value="{{params.create_dateL}}" data-key="create_dateL"
bind:confirm="datePickerConfirm" />
<date-picker-plugin title="创建结束日期" value="{{params.create_dateU}}" data-key="create_dateU"
bind:confirm="datePickerConfirm" /> -->
</view>
</search-popup>
<count-plugin count="{{count}}">
<!-- <sort-plugin options="{{sort}}" bind:ok="onSort" value="{{params.order}}" slot="right" /> -->
</count-plugin>
<t-empty wx:if="{{list.length == 0}}" icon="info-circle-filled" description="暂无数据"
style="margin-bottom: 24rpx;" />
<block wx:for="{{ list }}" wx:key="info_process_id">
<card-plugin>
<view slot="header">{{ item.bill_no }}</view>
<view slot="content">
<card-item-plugin label="供应商名称" value="{{item.crm_name}}" />
<card-item-plugin label="单据日期" value="{{item.bill_date}}" />
<card-item-plugin label="操作员">
<view slot="value">
{{item.creator_name}}
<text wx:if="{{item.creator_nick_name}}">({{item.creator_nick_name}})</text>
</view>
</card-item-plugin>
<card-item-plugin label="数量" value="{{item.total_quantity}}" />
<card-item-plugin label="优惠金额" value="{{item.discount_amount}}" />
<card-item-plugin label="结算金额" value="{{item.total_real_amount}}" />
<card-item-plugin label="已结算金额" value="{{item.finish_amount}}" />
<card-item-plugin label="未结算金额" value="{{item.unsettled_amount}}" />
<card-item-plugin label="备注" value="{{item.comments}}" />
<card-item-plugin label="创建日期" value="{{item.create_date}}" />
</view>
<view slot="footer" style="padding-bottom: 16rpx;">
<t-button wx:if="{{authInfo['SF_ERP_PURCHASE_STORE_DEL']}}" size="small" theme="danger"
bind:tap="onOrderDel" data-index="{{index}}">删除</t-button>
</view>
</card-plugin>
</block>
<pagination-plugin curr_page="{{params.curr_page}}" page_count="{{params.page_count}}"
total="{{count}}" bind:change="paginationChange" />
</page-plugin>

View File

@@ -0,0 +1,14 @@
{
"usingComponents": {
"search-popup": "/pages/components/search-popup/search-popup",
"card-plugin": "/pages/components/card-plugin/card-plugin",
"card-item-plugin": "/pages/components/card-item-plugin/card-item-plugin",
"date-picker-plugin": "/pages/components/date-picker-plugin/date-picker-plugin",
"sort-plugin": "/pages/components/sort-plugin/sort-plugin",
"count-plugin": "/pages/components/count-plugin/count-plugin",
"pagination-plugin": "/pages/components/pagination-plugin/pagination-plugin",
"search-input": "/pages/components/search-input/search-input",
"option-cell-plugin": "/pages/components/option-cell-plugin/option-cell-plugin"
},
"navigationBarTitleText": "采购订单"
}

View File

@@ -0,0 +1,164 @@
import { loginStatus, post } from '@/utils/https';
import {
cloneLite,
getAuthInfo,
getDataSet,
showModal,
sleep,
toArray,
toastSuccess,
toNumber,
} from '@/utils/util';
const defaultParams = { curr_page: 1, page_count: 20, states: [1, 4], head_type: 2 };
Page({
/**
* 页面的初始数据
*/
data: {
params: cloneLite(defaultParams) as any,
list: [] as any[],
count: 0,
states: [
{ value: 1, label: '未入库' },
{ value: 4, label: '部分入库' },
{ value: 3, label: '完成入库' },
],
sort: [{ label: '创建日期', value: 'create_date' }],
},
handleLogin(e: any) {
this.setData({ isLogin: e.detail });
if (e.detail) {
this.init();
}
},
init() {
this.setData({ authInfo: getAuthInfo() });
this.getList();
},
searchChange(e: any) {
const key = getDataSet(e).key;
this.data.params[key] = e.detail.value;
this.setData({ params: this.data.params });
},
searchChange2(e: any) {
const key = getDataSet(e).key;
const val = `${e.detail.value || ''}`.trim();
if (val) {
this.data.params[key] = val;
} else {
delete this.data.params[key];
}
this.setData({ params: this.data.params });
},
onOptionChange(e: any) {
const key = getDataSet(e).key;
this.data.params[key] = e.detail.value;
this.setData({ params: this.data.params });
},
datePickerConfirm(e: any) {
const data = getDataSet(e);
this.data.params[data.key] = e.detail.value;
this.setData({ params: this.data.params });
},
searchOk() {
this.getList(1);
},
searchReset() {
this.data.params = cloneLite(defaultParams);
this.getList(1);
},
onSort(e: any) {
this.data.params.order = e.detail.value;
this.setData({ params: this.data.params });
this.getList(1);
},
paginationChange(e: any) {
this.getList(e.detail.curr_page);
},
getList(curr: number = 1) {
this.data.params.curr_page = curr;
this.setData({ params: this.data.params });
const temp = cloneLite(this.data.params);
if (temp.states && temp.states.length) {
temp.states = temp.states.join(',');
} else {
delete temp.states;
}
post('ErpDepot/depotHeadList', temp).then((res: any) => {
const list = toArray(res.data);
if (list.length == 0 && this.data.params.curr_page > 1) {
this.getList(this.data.params.curr_page - 1);
}
this.setData({
count: toNumber(res.count),
list: list,
});
});
},
onOrderDel(e: any) {
const data = getDataSet(e);
const index = data.index;
const item = this.data.list[index];
showModal({ content: `确认删除 ${item.bill_no} 订单?` }).then(() => {
post('ErpDepot/depotHeadDel', { head_id: item.head_id }).then(() => {
toastSuccess('删除成功');
sleep(() => {
this.getList();
}, 1000);
});
});
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(_options) {},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
this.setData({ loading: true });
loginStatus()
.then(() => {
this.setData({ isLogin: true, loading: false });
this.init();
})
.catch((err) => {
this.setData({ isLogin: false, loading: false });
console.log('调用登录状态请求失败', err);
});
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {},
});

View File

@@ -0,0 +1,60 @@
<page-plugin isAuth="{{authInfo['SF_ERP_PURCHASE_ORDER_VIEW']}}" loading="{{loading}}"
is-login="{{isLogin}}" bind:handleLogin="handleLogin">
<search-popup placeholder="输入单据编码" bind:change="searchChange" bind:ok="searchOk"
bind:reset="searchReset" value="{{params.bill_no}}" data-key="bill_no">
<view slot="content">
<search-input label="供应商名称" value="{{params.crm_name}}" data-key="crm_name"
bind:change="searchChange2" />
<search-input label="结算账户" value="{{params.account_name}}" data-key="account_name"
bind:change="searchChange2" />
<search-input label="关联单据" value="{{params.rel_bill_no}}" data-key="rel_bill_no"
bind:change="searchChange2" />
<option-cell-plugin title="单据状态" bind:change="onOptionChange" value="{{params.states}}"
mode="checkbox" options="{{states}}" data-key="states" />
<date-picker-plugin title="单据开始日期" value="{{params.bill_dateL}}" data-key="bill_dateL"
bind:confirm="datePickerConfirm" />
<date-picker-plugin title="单据结束日期" value="{{params.bill_dateU}}" data-key="bill_dateU"
bind:confirm="datePickerConfirm" />
<!-- <date-picker-plugin title="创建开始日期" value="{{params.create_dateL}}" data-key="create_dateL"
bind:confirm="datePickerConfirm" />
<date-picker-plugin title="创建结束日期" value="{{params.create_dateU}}" data-key="create_dateU"
bind:confirm="datePickerConfirm" /> -->
</view>
</search-popup>
<count-plugin count="{{count}}">
<!-- <sort-plugin options="{{sort}}" bind:ok="onSort" value="{{params.order}}" slot="right" /> -->
</count-plugin>
<t-empty wx:if="{{list.length == 0}}" icon="info-circle-filled" description="暂无数据"
style="margin-bottom: 24rpx;" />
<block wx:for="{{ list }}" wx:key="info_process_id">
<card-plugin>
<view slot="header">{{ item.bill_no }}</view>
<view slot="content">
<card-item-plugin label="供应商名称" value="{{item.crm_name}}" />
<card-item-plugin label="单据日期" value="{{item.bill_date}}" />
<card-item-plugin label="操作员">
<view slot="value">
{{item.creator_name}}
<text wx:if="{{item.creator_nick_name}}">({{item.creator_nick_name}})</text>
</view>
</card-item-plugin>
<card-item-plugin label="数量" value="{{item.total_quantity}}" />
<card-item-plugin label="金额" value="{{item.total_amount}}" />
<card-item-plugin label="状态" value="{{item.state_name}}" />
<card-item-plugin label="备注" value="{{item.comments}}" />
<card-item-plugin label="创建日期" value="{{item.create_date}}" />
</view>
<view slot="footer" style="padding-bottom: 16rpx;">
<t-button wx:if="{{authInfo['SF_ERP_PURCHASE_ORDER_DEL']}}" size="small" theme="danger"
bind:tap="onOrderDel" data-index="{{index}}">删除</t-button>
</view>
</card-plugin>
</block>
<pagination-plugin curr_page="{{params.curr_page}}" page_count="{{params.page_count}}"
total="{{count}}" bind:change="paginationChange" />
</page-plugin>

View File

@@ -40,4 +40,48 @@ export const menuConfig = [
},
],
},
{
title: '采购管理',
icon: 'cart-add',
iconColor: iconColor,
children: [
{
title: '采购订单',
url: '/pages/purchase/buyOrder/buyOrder',
auth: 'SF_ERP_PURCHASE_ORDER_VIEW',
},
{
title: '采购入库',
url: '/pages/purchase/buyInOrder/buyInOrder',
auth: 'SF_ERP_PURCHASE_STORE_VIEW',
},
],
},
{
title: '财务管理',
icon: 'currency-exchange',
iconColor: iconColor,
children: [
{
title: '收入单',
url: '/pages/finance/income/income',
auth: 'SF_FINANCE_INCOME_VIEW',
},
{
title: '支出单',
url: '/pages/finance/outcome/outcome',
auth: 'SF_FINANCE_OUTCOME_VIEW',
},
{
title: '转账单',
url: '/pages/finance/giro/giro',
auth: 'SF_FINANCE_TRANSFER_VIEW',
},
{
title: '资金明细',
url: '/pages/finance/flow/flow',
auth: 'SF_FINANCE_FLOW_VIEW',
},
],
},
];