添加流程页面

This commit is contained in:
zhengw
2026-02-13 12:38:48 +08:00
parent d9fe6c048f
commit b17edae159
13 changed files with 226 additions and 1 deletions

View File

@@ -4,7 +4,9 @@ import {
getAuthInfo,
getDataSet,
searchValueFormat,
sleep,
toArray,
toastSuccess,
toNumber,
} from '@/utils/util';
@@ -154,6 +156,25 @@ Page({
}&title=${encodeURIComponent(item.goods_name)}`,
});
},
onDelete(e: any) {
const data = getDataSet(e);
const index = data.index;
const item = this.data.list[index];
wx.showModal({
title: '提示',
content: `确认删除 ${item.goods_name}?`,
success: (res) => {
if (res.confirm) {
post('ErpGoods/deleteGoods', { goods_id: JSON.stringify([item.goods_id]) }).then(() => {
toastSuccess('删除成功');
sleep(() => {
this.getList(this.data.params.curr_page);
}, 1500);
});
}
},
});
},
/**
* 生命周期函数--监听页面加载

View File

@@ -41,7 +41,10 @@
<card-item-plugin label="创建日期" value="{{item.create_date}}" />
</view>
<view slot="footer" class="card-plugin-footer">
<t-button size="small" theme="primary" bind:tap="onDetail" data-index="{{index}}">子商品
<t-button size="small" theme="primary" bind:tap="onDetail" data-index="{{index}}">查看
</t-button>
<t-button wx:if="{{authInfo['SF_ERP_GOODS_DEL']}}" size="small" theme="danger"
bind:tap="onDelete" data-index="{{index}}">删除
</t-button>
</view>
</card-plugin>