調整匯款沖帳

This commit is contained in:
2026-05-11 15:59:23 +08:00
parent 3c5617b403
commit 07e29c32aa
6 changed files with 876 additions and 5 deletions
+1 -1
View File
@@ -1,4 +1,4 @@
// 已啟用模型 'C:\project\0.2\17168ERP\web\App_Code\Model\Model.edmx' 的 T4 程式碼產生。
// 已啟用模型 'D:\project\17168ERP\web\App_Code\Model\Model.edmx' 的 T4 程式碼產生。
// 若要啟用舊版程式碼產生,請將 [程式碼產生策略] 設計工具屬性的值
//變更為 [舊版 ObjectContext]。當模型在設計工具中開啟時,這個屬性便可
//以在 [屬性] 視窗中使用。
@@ -10,6 +10,7 @@ using System.Collections;
using MyWeb;
using System.Web.WebPages;
using System.Data.Entity;
using Model;
[ezAuthorize]
public class transfer_registerController : ApiController
@@ -269,6 +270,7 @@ public class transfer_registerController : ApiController
public string check_memo { get; set; }
public string draft { get; set; }
public int? acc_kind { get; set; } // 新增關聯欄位
public int? kind { get; set; }
}
[HttpPost]
@@ -315,7 +317,7 @@ public class transfer_registerController : ApiController
{
uptime = dto.check_date,
category = 1, // 收入
kind = 27, // 固定值:法會收入/功德項目
kind = dto.kind,//27, // 固定值:法會收入/功德項目
kind2 = dto.acc_num,
price = (float)(dto.check_amount ?? 0),
tax = 0,
@@ -346,6 +348,7 @@ public class transfer_registerController : ApiController
item.check_memo = dto.check_memo;
item.draft = dto.draft;
item.acc_kind = dto.acc_kind;
}
}
_db.SaveChanges();
@@ -958,7 +961,10 @@ public class transfer_registerController : ApiController
activity_name = x.activity != null ? x.activity.subject : "",
activity_num = x.activity_num,
acc_name = x.acc_num != null ? _db.accounting_kind2.Where(a => a.num == x.acc_num).Select(a => a.kind).FirstOrDefault() : "",
price_totals=_db.pro_order_detail.
Where(a => _db.pro_order.Where (po=>po.f_num==x.f_num&&po.activity_num==x.activity_num).
Select(po => po.order_no).Any(p=>p.Equals(a.order_no))).Sum(a => a.price*a.qty),
pay_totals=_db.transfer_register.Where(a=>a.activity_num==x.activity_num&&a.f_num==x.f_num).Sum(a=>a.check_amount),
// pro_order_record 資訊 (透過 transfer_id 關聯)
pro_order_records = x.pro_order_record.Select(pr => new {
pr.num,
+822
View File
@@ -0,0 +1,822 @@
<%@ Page Title="匯款/沖帳管" Language="C#" MasterPageFile="~/admin/Templates/TBS5ADM001/MasterPage.master" AutoEventWireup="true" CodeFile="index.aspx.cs" Inherits="admin_bill_index" %>
<asp:Content ID="Content1" ContentPlaceHolderID="page_header" Runat="Server">
<link rel="stylesheet" href="../../js/_bootstrap-icons-1.8.1/bootstrap-icons.css">
<style>
.function-icon {
font-size: 2em;
line-height: 1;
align-content: center;
}
.external-link-icon {
font-size: 0.8em;
}
</style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="page_nav" Runat="Server">
<h2 class="mb-3">匯款/沖帳管理</h2>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<div id="content" class="container py-4">
<div class="row">
<!-- 第一欄:匯款登錄與核對 -->
<div class="col-lg-4 mb-4">
<h5 class="text-primary mb-3">
<i class="bi bi-upload"></i> 匯款登錄與核對
</h5>
<div class="list-group">
<a href="register.aspx" class="list-group-item list-group-item-action" target="_blank">
<div class="d-flex justify-content-between align-items-start">
<div class="d-flex">
<i class="bi bi-plus-circle text-success me-3 function-icon"></i>
<div>
<div>
登錄匯款資料
<i class="bi bi-box-arrow-up-right text-muted ms-1 external-link-icon"></i>
</div>
<small class="text-muted">報名者自行填寫匯款相關資訊</small>
</div>
</div>
<span class="badge bg-primary">報名者</span>
</div>
</a>
<a href="verify.aspx" class="list-group-item list-group-item-action d-none">
<div class="d-flex justify-content-between align-items-start">
<div class="d-flex">
<i class="bi bi-person-check text-info me-3 function-icon"></i>
<div>
<div>出納核對匯款人</div>
<small class="text-muted">核對匯款人身份與報名資料</small>
</div>
</div>
<span class="badge bg-info">出納</span>
</div>
</a>
<a href="verify1.aspx" class="list-group-item list-group-item-action">
<div class="d-flex justify-content-between align-items-start">
<div class="d-flex">
<i class="bi bi-person-check text-info me-3 function-icon"></i>
<div>
<div>出納核對匯款人(階段1</div>
<small class="text-muted">初步核對匯款人身份資料</small>
</div>
</div>
<span class="badge bg-info">出納</span>
</div>
</a>
<a href="verify2.aspx" class="list-group-item list-group-item-action">
<div class="d-flex justify-content-between align-items-start">
<div class="d-flex">
<i class="bi bi-currency-dollar text-warning me-3 function-icon"></i>
<div>
<div>出納核對金額(階段2</div>
<small class="text-muted">核對匯款金額與入帳資料</small>
</div>
</div>
<span class="badge bg-warning text-dark">出納</span>
</div>
</a>
</div>
</div>
<!-- 第二欄:沖帳流程 -->
<div class="col-lg-4 mb-4">
<h5 class="text-primary mb-3">
<i class="bi bi-receipt"></i> 沖帳流程
</h5>
<div class="list-group">
<a href="personal_reconcile.aspx" class="list-group-item list-group-item-action">
<div class="d-flex justify-content-between align-items-start">
<div class="d-flex">
<i class="bi bi-person text-primary me-3 function-icon"></i>
<div>
<div>個人-沖帳流程</div>
<small class="text-muted">處理個人匯款的沖帳作業</small>
</div>
</div>
<span class="badge bg-success">會計</span>
</div>
</a>
<a href="group_reconcile.aspx" class="list-group-item list-group-item-action">
<div class="d-flex justify-content-between align-items-start">
<div class="d-flex">
<i class="bi bi-people text-success me-3 function-icon"></i>
<div>
<div>共同-沖帳流程</div>
<small class="text-muted">處理多人共同支付的沖帳作業</small>
</div>
</div>
<span class="badge bg-success">會計</span>
</div>
</a>
<a href="balance_reconcile.aspx" class="list-group-item list-group-item-action">
<div class="d-flex justify-content-between align-items-start">
<div class="d-flex">
<i class="bi bi-calculator text-danger me-3 function-icon"></i>
<div>
<div>餘額核銷</div>
<small class="text-muted">處理沖帳後剩餘金額的核銷</small>
</div>
</div>
<span class="badge bg-danger">會計</span>
</div>
</a>
</div>
</div>
<!-- 第三欄:查詢功能 -->
<div class="col-lg-4 mb-4">
<h5 class="text-primary mb-3">
<i class="bi bi-search"></i> 查詢功能
</h5>
<div class="list-group">
<a href="verify_order_record_query.aspx" class="list-group-item list-group-item-action">
<div class="d-flex justify-content-between align-items-start">
<div class="d-flex">
<i class="bi bi-journal-check text-info me-3 function-icon"></i>
<div>
<div>沖帳查詢</div>
<small class="text-muted">查詢所有沖帳記錄與明細</small>
</div>
</div>
<span class="badge bg-info">會計</span>
</div>
</a>
<a href="balance_reconcile_query.aspx" class="list-group-item list-group-item-action">
<div class="d-flex justify-content-between align-items-start">
<div class="d-flex">
<i class="bi bi-file-text text-secondary me-3 function-icon"></i>
<div>
<div>餘額核銷查詢</div>
<small class="text-muted">查詢已完成的餘額核銷記錄</small>
</div>
</div>
<span class="badge bg-secondary">會計</span>
</div>
</a>
</div>
</div>
</div>
<!-- 統計資訊 -->
<div class="row mt-4">
<div class="col-12">
<div class="alert alert-info">
<h6 class="alert-heading">
<i class="bi bi-info-circle"></i> 系統說明
</h6>
<ul class="mb-0">
<li><strong>匯款登錄與核對</strong>:處理報名者匯款資料的登錄與出納核對作業</li>
<li><strong>沖帳流程</strong>:處理個人與共同支付的沖帳作業,以及剩餘金額的核銷</li>
<li><strong>查詢功能</strong>:提供各類沖帳記錄的查詢與統計功能</li>
</ul>
</div>
</div>
</div>
</div>
<keep-alive>
<component
:is="currentView" :form-data="$data">
</component>
</keep-alive>
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="offCanvasRight" Runat="Server">
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="footer_script" Runat="Server">
<script>
Vue.component('step-one', {
template: document.getElementById("content"),
props: ['formData'],
data() {
return {
this_act: '<%= Request["act_id"]%>',
options: { multiSort: false },
search_options: { multiSort: false },
data_table: {
loading: true,
list: [],
selected: [],
singleSelect: false,
count: 0,
page: 1,
pageSize: 10,
header: [
{ text: '活動分類', value: 'kindsTxt' },
{ text: '活動名稱', value: 'subject' },
{ text: '開始日期', value: 'startDate_solar' },
{ text: '結束日期', value: 'endDate_solar', align: 'start' },
{ text: '報名人數', value: 'orderCounts' },
{ text: '', value: 'slot_btn', sortable: false, align: 'end' }
],
footer: {
showFirstLastPage: true,
itemsPerPageOptions: [5, 10, 20, 30],
},
},
//列印管理報表
print_conditions: 'yy',
print_search: {
year: '',
month: '',
season: '',
chk_hasact: false,
chk_noact: false,
select_act: '',
select_actitem: '',
},
select_act_list: [],
select_items: {
month: [{
text: "請選擇",
val: 0
},],
season: [{
text: "請選擇",
val: 0
},],
},
print_dialog: {
show: false,
},
search_dialog: {
controls: {
search1: {
id: 'search1',
title: '國籍',
text_prop: 'name_zh',
value_prop: 'id',
keys: [
{ id: 'keyword', title: '關鍵字' },
],
api_url: HTTP_HOST + 'api/country/GetList',
columns: [
{ id: 'id', title: '代碼' },
{ id: 'name_en', title: '英文短名稱' },
{ id: 'name_zh', title: '中文名稱' },
],
selected: {},
select(item, t) {
//console.log("select search1", t);
t.search.country = item.id;
t.search.country2 = '';
}
},
search2: {
id: 'search2',
title: '報名活動',
text_prop: 'subject',
value_prop: 'num',
keys: [
{ id: 'subject', title: '活動名稱', value: '' },
{ id: 'kindTxt', title: '活動分類' },
],
api_url: HTTP_HOST + 'api/activity/GetList',
columns: [
{ id: 'subject', title: '活動名稱' },
{ id: 'kindTxt', title: '活動分類' },
],
selected: {},
select(item, t) {
t.print_search.select_act = item.num;
}
},
search3: {
id: 'search3',
title: '活動品項',
text_prop: 'subject',
value_prop: 'num',
keys: [
{ id: 'subject', title: '項目名稱', value: '' },
{ id: 'kindTxt', title: '項目分類' },
{ id: 'num', visible: false },
],
api_url: HTTP_HOST + 'api/activity/GetOrderList',
columns: [
{ id: 'subject', title: '項目名稱' },
{ id: 'kindTxt', title: '項目分類' },
],
selected: {},
select(item, t) {
t.print_search.select_actitem = item.num;
}
}
}, show: false,
current: {},
list: [],
count: 0,
page: 1,
loading: false,
footer: {
showFirstLastPage: true,
disableItemsPerPage: true,
itemsPerPageAllText: '',
itemsPerPageText: '',
},
},
search: {
keyin1: '',
order_no: '',
subject: '',
u_name: '',
up_time1: '',
up_time2: '',
actItemTxt: '',
introducerTxt: '',
activity_num: '',
country: '',
country2: '',
hasPrice: '',
}
//報到
, check_dialog: {
show: false,
},
check_data: {
f_num: 0,
u_name: '',
activity_num: 0,
activity_name: '',
qty: 1,
status: {
text: '',
val: 1
},
},
keyin1_items: [//狀態
//{
//text: "請選擇",
//val: 0
//},
],
};
},
mounted() {
this.detalKeyinArray();
this.search_dialog.current = this.search_dialog.controls.search1 ///default
if (this.this_act != '')
this.search.activity_num = this.this_act;
//this.initPrintSearch();
//this.initActivity();
const navEntries = performance.getEntriesByType("navigation");
const isReload = navEntries.length > 0 && navEntries[0].type === "reload";
if (isReload) {
sessionStorage.removeItem("orderpage");
}
else {
const savedPage = parseInt(sessionStorage.getItem('orderpage'));
if (savedPage) {
this.options.page = savedPage;
}
}
},
watch: {
options: {
handler() {
this.getDefault()
},
deep: true,
},
search_options: {
handler() {
this.search_get()
},
deep: true,
},
},
methods: {
search_show(curr) {
//console.log("btn_click:", curr, curr.api_url);
this.search_dialog.current = curr;
this.search_clear()
//this.search_get()//清除完自動會重抓, 故取消
this.search_dialog.show = true;
},
search_clear() {
if (!this.search_dialog.current.keys) return;
this.search_dialog.current.keys.forEach((t, i) => { t.value = '' })
this.search_get()
},
search_get() {
if (!this.search_dialog.current.keys) return;
let api_url = this.search_dialog.current.api_url;
let keys = this.search_dialog.current.keys;
//const { page, itemsPerPage } = this.options
//const { sortBy, sortDesc, page, itemsPerPage } = this.options
this.search_dialog.page = this.search_options.page ?? 1
let params = { page: this.search_dialog.page, pageSize: 10 };//url params
var search = {};//post body
keys.forEach((t, i) => {
search[t.id] = t.value;
});
//necessary parameter===
if (this.search_dialog.current.id == 'search2') {
params = { sortBy: 'startDate_solar', sortDesc: true, page: this.search_dialog.page, pageSize: 10 };//url params
}
console.log("search_get", api_url, search, params, this.search_options);
this.search_dialog.loading = true
axios.post(api_url, search, { params: params })
.then(response => {
this.search_dialog.list = response.data.list
this.search_dialog.count = response.data.count
this.search_dialog.loading = false
})
.catch(error => {
console.log(error)
this.search_dialog.list = []
this.search_dialog.count = 0
this.search_dialog.loading = false
this.snackbar.text = "錯誤:" + error
this.snackbar.show = true
})
},
search_headers() {
if (!this.search_dialog.current.columns) return;
r = [];
this.search_dialog.current.columns.forEach((t, i) => {
r.push({
text: t.title,
align: 'start',
sortable: false,
value: t.id,
})
})
return r
},
search_select(row) {
let curr = this.search_dialog.current;
let target = $(`[data-search-control=${curr.id}]`);
curr.selected = row;
target.children("input.search-text").val(curr.selected[curr.text_prop])//text
target.children("input:hidden").val(curr.selected[curr.value_prop])//value
if (curr.select instanceof Function) {
curr.select(row, this);
}
this.search_dialog.show = false;
//console.log(row, row["u_name"], row["f_number"], curr.id, target);
},
getDetail(clearpage = false) {
console.log("test");
const { sortBy, sortDesc, page, itemsPerPage } = this.options
const params = {
sortBy: sortBy[0], sortDesc: sortDesc[0],
page: clearpage ? '1' : page, pageSize: itemsPerPage
};
this.detail_table.loading = true
sessionStorage.setItem('orderpage', clearpage ? '1' : page);
axios
//.post(HTTP_HOST + 'api/order/GetList', this.search, { params: params })
.post(HTTP_HOST + 'api/order/GetList', this.search, { params: params })
.then(response => {
this.detail_table.list = response.data.list
this.detail_table.count = response.data.count;
this.detail_table.loading = false
})
.catch(error => console.log(error))
},
getDefault(clearpage = false) {
const { sortBy, sortDesc, page, itemsPerPage } = this.options
const params = {
sortBy: sortBy[0], sortDesc: sortDesc[0],
page: clearpage ? '1' : page, pageSize: itemsPerPage
};
this.data_table.loading = true
sessionStorage.setItem('orderpage', clearpage ? '1' : page);
axios
//.post(HTTP_HOST + 'api/order/GetList', this.search, { params: params })
.post(HTTP_HOST + 'api/activity/GetList', this.search, { params: params })
.then(response => {
this.data_table.list = response.data.list
this.data_table.count = response.data.count;
this.data_table.loading = false
})
.catch(error => console.log(error))
},
detalKeyinArray() {
var getArray = <%=Newtonsoft.Json.JsonConvert.SerializeObject(_keyin1Item, Newtonsoft.Json.Formatting.Indented) %>;
var keys = Object.keys(getArray);
for (let i = 0; i < keys.length; i++) {
//console.log(`${keys[i]}:${getArray[keys[i]]}`); //value : text
var _tmp = {
text: getArray[keys[i]],
val: parseInt(keys[i]),
}
this.keyin1_items.push(_tmp);
}
},
editItem(item) {
console.log("edit", item);
},
deleteItem(item) {
if (confirm('是否確定刪除此筆資料?')) {
const index = this.data_table.list.indexOf(item)
if (index != -1) {
axios
.delete(HTTP_HOST + 'api/order/' + item.order_no)
.then(response => {
console.log("del", item);
this.data_table.list.splice(index, 1);
this.data_table.count = this.data_table.list.length
})
.catch(error => console.log(error))
}
}
},
deleteAll() {
if (confirm('是否確定刪除已勾選的資料?')) {
axios
.delete(HTTP_HOST + 'api/order/DeleteAll/' + this.data_table.selected.map(x => x.order_no))
.then(response => {
//console.log("delAll");
//for (var i = 0; i < this.data_table.selected.length; i++) {
// const index = this.data_table.list.indexOf(this.data_table.selected[i]);
// this.data_table.list.splice(index, 1);
//}
//this.data_table.selected = [];
//this.data_table.count = this.data_table.list.length
location.reload();
})
.catch(error => console.log(error))
}
},
btn_search() {
this.this_act = '';
this.search.activity_num = '';
this.getDefault(true)
},
btn_all() {
this.this_act = '';
this.search.activity_num = '';
clearObjProps(this.search);
this.btn_search()
},
checkInMsg(item) {
this.check_data.f_num = item.f_num;
this.check_data.u_name = item.u_name;
this.check_data.activity_num = item.activity_num;
this.check_data.activity_name = item.subject;
this.check_dialog.show = true;
},
checkIn() {
if (this.check_data.qty > 0 && this.check_data.status.val > 0) {
var chechdata =
{
f_num: this.check_data.f_num,
activity_num: this.check_data.activity_num,
status: this.check_data.status.val,
qty: this.check_data.qty,
}
axios
.post(HTTP_HOST + 'api/activity/OrderCheckIn', chechdata)
.then(response => {
//清空
this.check_data.f_num = 0;
this.check_data.u_name = '';
this.check_data.activity_num = 0;
this.check_data.activity_name = '';
this.check_data.qty = 1;
this.check_data.status.text = '';
this.check_data.status.val = 1;
this.check_dialog.show = false;
msgtop('簽到成功')
})
.catch(
error => {
console.log(error)
msgtop('簽到失敗', 'error')
}
)
} else {
msgbox('報到資訊請填寫完整');
}
}, goPrint() {
let _qry = "";
Object.keys(this.search).forEach(key => {
//console.log(`${key}: ${this.search[key]}`);
if (this.search[key] != undefined && this.search[key] != null && this.search[key] != '') {
_qry += (_qry != '' ? '&' : '?') + (key + '=' + this.search[key]);
}
});
window.open("print.aspx" + _qry, '_blank');
},
countryChange() {
this.search.country = '';
$('#country_txt').val('')
},
//列印管理報表
print_close() {
this.print_dialog.show = false;
}
,
initPrintSearch() {
//下拉選單
for (let i = 1; i <= 12; i++) {
var _tmp = {
text: i,
val: i,
}
this.select_items.month.push(_tmp);
}
for (let i = 1; i <= 4; i++) {
var _tmp = {
text: i,
val: i,
}
this.select_items.season.push(_tmp);
}
//預設值
const Today = new Date();//現在日期時間
const first_date = new Date(Today.getFullYear(), Today.getMonth(), 1); //本月第一天
const last_month_date = new Date(first_date - 1); //上個月最後一天
this.print_search.year = last_month_date.getFullYear();
this.print_search.month = last_month_date.getMonth() + 1 //預設上個月的年份
let _season = 1;
const _month = first_date.getMonth() + 1; //本月
if (_month >= 1 && _month <= 3) {
_season = 4;
} else if (_month >= 4 && _month <= 6) {
_season = 1;
} else if (_month >= 7 && _month <= 9) {
_season = 2;
} else if (_month >= 10 && _month <= 12) {
_season = 3;
}
this.print_search.season = _season; //預設上一季
},
goPrint2() {
if (this.print_search.year != '') {
if (this.print_search.chk_noact || this.print_search.chk_hasact) {
let _qry = "";
Object.keys(this.print_search).forEach(key => {
if (this.print_search[key] != undefined && this.print_search[key] != null && this.print_search[key] != '') {
if (key == 'month') {
if (this.print_conditions == 'mm') {
_qry += "&month=" + this.print_search.month;
}
} else if (key == 'season') {
if (this.print_conditions == 'ss') {
_qry += "&season=" + this.print_search.season;
}
}
else {
_qry += (_qry != '' ? '&' : '?') + (key + '=' + this.print_search[key]);
}
}
});
this.print_dialog.show = false;
window.open("print.aspx" + _qry, '_blank');
} else {
msgbox('活動/非活動至少勾選一項');
}
} else {
msgbox('請輸入年份');
}
}, chk_hasact_change() {
if (!this.print_search.chk_hasact) {
//$('#activity_num_txt').val('')
//this.print_search.select_act = '';
this.clear_select_act();
$('#activity_num_txt').attr("placeholder", "可選擇單一活動(需先勾選活動報名)");
} else {
$('#activity_num_txt').attr("placeholder", "可選擇單一活動");
}
},
clear_select_act() {
$('#activity_num_txt').val('')
this.print_search.select_act = '';
}, clear_select_actitem() {
$('#actItem_num_txt').val('')
this.print_search.select_actitem = '';
},
initActivity() {
axios.get(HTTP_HOST + 'api/activity')
.then(response => {
this.select_act_list = response.data
})
.catch(error => {
console.log(error)
})
}
},
computed: {
pageCount() {
return Math.ceil(this.data_table.count / this.data_table.pageSize)
},
}
});
let VueApp = new Vue({
el: '#app',
vuetify: new Vuetify(),
data() {
return {
currentView: 'step-one',
selected_act: '',
selected_order: '',
};
}, activated() {
console.log("yes ,go go");
this.getDetail();
},
data() {
return {
options: { multiSort: false },
search_options: { multiSort: false },
sign_table: {
loading: true,
list: [],
selected: [],
singleSelect: false,
count: 0,
page: 1,
pageSize: 10,
header: [
{ text: '單號', value: 'order_no' },
{ text: '姓名', value: 'u_name' },
{ text: '報名日期', value: 'up_time' },
{ text: '單據狀態', value: 'keyin1_txt', align: 'start' },
{ text: '', value: 'slot_btn', sortable: false, align: 'end' }
],
footer: {
showFirstLastPage: true,
itemsPerPageOptions: [5, 10, 20, 30],
},
},
search: {
keyin1: '',
order_no: '',
subject: '',
u_name: '',
up_time1: '',
up_time2: '',
actItemTxt: '',
introducerTxt: '',
activity_num: '',
country: '',
country2: '',
hasPrice: '',
}
};
},
watch: {
options: {
handler() {
this.getDetail()
},
deep: true,
},
},
methods: {
getDetail() {
const { sortBy, sortDesc, page, itemsPerPage } = this.options
const params = {
//sortBy: sortBy == undefined ? "order_no" : sortBy[0],
//sortDesc: sortDesc == undefined ? "" : sortDesc[0],
//page: clearpage ? '1' : page, pageSize: itemsPerPage,
page: '1', pageSize: 10,
};
this.search = { activity_num: this.$root.selected_act }
this.detail_table.loading = true
sessionStorage.setItem('orderpage', '1');// clearpage ? '1' : page
axios
.post(HTTP_HOST + 'api/order/GetList', this.search, { params: params })
.then(response => {
this.detail_table.list = response.data.list
this.detail_table.count = response.data.count;
this.detail_table.loading = false
})
.catch(error => console.log(error))
},
},
computed: {
pageCount() {
return Math.ceil(this.detail_table.count / this.detail_table.pageSize)
},
}
});
</script>
</asp:Content>
+14
View File
@@ -0,0 +1,14 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
public partial class admin_bill_index : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
}
+29 -2
View File
@@ -105,6 +105,23 @@
></v-text-field>
</div>
</template>
<template v-slot:item.kind="{ item }">
<div>
<div class="mb-2">
<span class="badge bg-primary me-1" title="支付方式">收支項目</span>
</div>
</div>
<div>
<v-select
:items="accountingKinds"
v-model="item.kind"
dense
outlined
hide-details
style="max-width: 200px"
></v-select>
</div>
</template>
<template v-slot:item.check_memo="{ item }">
<div class="d-flex align-center my-2" style="min-width: 300px">
<v-text-field
@@ -159,6 +176,7 @@ new Vue({
{ text: '*入帳銀行/帳戶 | 支付資訊/帳號後5碼', value: 'acc_num' },
{ text: '*入帳日期', value: 'check_date' },
{ text: '*入帳金額', value: 'check_amount' },
{ text: '*收支項目', value: 'kind' },
{ text: '備註/狀態 | 核對記錄', value: 'check_memo' }
],
items: [],
@@ -172,7 +190,8 @@ new Vue({
{ text: '其他問題', value: '4' },
{ text: '作廢', value: '5' }
],
bankOptions: [],
bankOptions: [],
accountingKinds:[],
payTypeText: {
1: '現金',
2: '匯款',
@@ -212,6 +231,13 @@ new Vue({
text: x.kind + (x.bank_name ? ' - ' + x.bank_name : '') + (x.bank_id ? ' (' + x.bank_id + ')' : ''),
value: x.num
}));
const kindRes = await axios.post('../../api/accounting/GetTitleKindList', {}, { params: { page: 1, pageSize: 1000 } });
this.accountingKinds = kindRes.data.list.map(x => ({
text: x.kind ,
value: x.num
}));
this.loading = false;
},
async submitData() {
@@ -246,7 +272,8 @@ new Vue({
acc_num: item.acc_num,
check_date: item.check_date,
check_amount: item.check_amount,
check_memo: item.check_memo
check_memo: item.check_memo,
kind: item.kind
}));
try {
const res = await axios.post('../../api/transfer_register/batch_update', updateList);
@@ -65,6 +65,7 @@
</template>
<template v-slot:item.transfer_info="{ item }">
<div>
<div class="font-weight-bold text-primary">應收總額:{{ item.price_totals | currency }}</div>
<div class="font-weight-bold text-primary">入帳金額:{{ item.transfer_check_amount | currency }}</div>
<div class="text-success">沖帳日期:{{ item.transfer_check_date | date }}</div>
<div v-if="item.transfer_remain_amount > 0" class="text-warning">
@@ -202,6 +203,7 @@
<div class="mb-2"><span class="font-weight-bold">入帳帳戶:</span>{{ dialog.selected.acc_name }}</div>
<div class="mb-2"><span class="font-weight-bold">入帳日期:</span>{{ dialog.selected.transfer_check_date | date }}</div>
<div class="mb-2"><span class="font-weight-bold">入帳金額:</span>{{ dialog.selected.transfer_check_amount | currency }}</div>
<div class="mb-2"><span class="font-weight-bold">應收總額:</span>{{ dialog.selected.price_totals | currency }}</div>
</v-col>
</v-row>
<v-divider class="my-4"></v-divider>