調整
This commit is contained in:
@@ -1396,8 +1396,13 @@ string sortBy = "", bool sortDesc = false)
|
||||
{
|
||||
int i = 1;
|
||||
var qry2 = _db.activity_kind_detail.Where(o => o.activity_kind_num == kind);
|
||||
qry2 = qry2.OrderBy(o => o.num);
|
||||
var count2 = qry2.Count(); //pageSize = count2;//一次取回??
|
||||
var qry2List = (pageSize > 0) ? qry2.ToPagedList(page, pageSize).ToList() : qry2.ToList();
|
||||
IEnumerable<Model.activity_kind_detail> qry2List = null;
|
||||
if (pageSize > 0)
|
||||
qry2List = qry2.ToPagedList(page, pageSize);
|
||||
else
|
||||
qry2List=qry2.ToList();
|
||||
var ret = new
|
||||
{
|
||||
list = qry2List.Select(x => new
|
||||
|
||||
@@ -311,7 +311,8 @@ public class receiptController: ApiController
|
||||
|
||||
try
|
||||
{
|
||||
string templatePath = HttpContext.Current.Server.MapPath("~/rpt/sample/receipt_sample01.docx");
|
||||
string sample = $"~/rpt/sample/receipt_sample{string.Format("{0:D2}",data.style_num)}.docx";
|
||||
string templatePath = HttpContext.Current.Server.MapPath(sample);
|
||||
|
||||
if (!File.Exists(templatePath))
|
||||
{
|
||||
@@ -411,7 +412,7 @@ public class receiptController: ApiController
|
||||
}
|
||||
if (textNode.Text.Contains("$ReceiptDate"))
|
||||
{
|
||||
textNode.Text = textNode.Text.Replace("$ReceiptDate", data.receipt_date ?? "");
|
||||
textNode.Text = textNode.Text.Replace("$ReceiptDate", data.details[i].receipt_date ?? "");
|
||||
}
|
||||
if (textNode.Text.Contains("$ReceiptTitle"))
|
||||
{
|
||||
@@ -429,7 +430,10 @@ public class receiptController: ApiController
|
||||
{
|
||||
textNode.Text = textNode.Text.Replace("$Caseofficer", data.details[i].caseofficer ?? "");
|
||||
}
|
||||
|
||||
if (textNode.Text.Contains("$ReceiptItem"))
|
||||
{
|
||||
textNode.Text = textNode.Text.Replace("$ReceiptItem", data.details[i].receipt_item ?? "");
|
||||
}
|
||||
}
|
||||
|
||||
currentAnchor= body.InsertAfter(newTable, currentAnchor);
|
||||
|
||||
@@ -496,6 +496,14 @@
|
||||
}, 300)
|
||||
},
|
||||
bom_addNew() {
|
||||
|
||||
if (this.prod_bom_num === undefined || this.prod_bom_num ===0) {
|
||||
this.snackbar.text = "請先點選設定或儲存子項目,點選前先確定此為群組功德項目"
|
||||
this.snackbar.show = true;
|
||||
return
|
||||
} else {
|
||||
console.log(this.prod_bom_num === undefined || this.prod_bom_num === 0);
|
||||
}
|
||||
this.spliceNullData();
|
||||
|
||||
//addObj.id = this.desserts.length + 1;
|
||||
@@ -798,8 +806,10 @@
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<asp:button class="btn btn-primary" id="setBom" runat="server"
|
||||
OnClientClick="if (!confirm('警告!!是否確定此為群組功德項目??')) return false;"
|
||||
Text="設定子項目" OnClick="setBom_Click" Visible="true"></asp:button>
|
||||
<asp:button class="btn btn-primary" id="saveBom" runat="server"
|
||||
OnClientClick="if (!confirm('警告!!是否確定此為群組功德項目??')) return false;"
|
||||
Text="儲存子項目" OnClick="saveBom_Click" Visible="true"></asp:button>
|
||||
</div>
|
||||
<div class="packageNum">
|
||||
|
||||
@@ -272,6 +272,7 @@ public partial class admin_activity_item_reg : MyWeb.config
|
||||
actBom.memo = bom_memo.Text;
|
||||
_db.act_bom.Add(actBom);
|
||||
_db.SaveChanges();
|
||||
prod_bom_num=actBom.num;
|
||||
Response.Redirect("item_reg.aspx?num=" + _num);
|
||||
}
|
||||
}
|
||||
@@ -290,6 +291,7 @@ public partial class admin_activity_item_reg : MyWeb.config
|
||||
prodBom.qty = Val(bom_qty.Text);
|
||||
prodBom.memo = bom_memo.Text;
|
||||
_db.SaveChanges();
|
||||
prod_bom_num=prodBom.num;
|
||||
//Response.Redirect("item_reg.aspx?num=" + _num);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -913,6 +913,7 @@
|
||||
this.editedItem = $.extend(true, {}, item);
|
||||
//console.log("editTabletNew:",this.editedItem,item)
|
||||
try {
|
||||
console.log("editTabletNew:",this.editItem)
|
||||
//document.getElementById("tablet_edit_new_iframe").contentWindow.location.reload();
|
||||
// 如果是新項目,先保存
|
||||
if (this.editedItem.num <= 0 || this.editedItem.num === null || this.editedItem.num === undefined) {
|
||||
@@ -2057,7 +2058,7 @@
|
||||
:footer-props="footersDetail"
|
||||
:search="searchDetail"
|
||||
:options.sync="optionsDetail" class="elevation-1" fixed-header height="350px"
|
||||
item-key="num"
|
||||
<%--item-key="num"--%>
|
||||
<%-- :server-items-length="desserts_count"--%>
|
||||
>
|
||||
<v-divider inset></v-divider>
|
||||
|
||||
@@ -38,8 +38,8 @@
|
||||
{{ getSourceName(item.source) }}
|
||||
</template>
|
||||
<template #item.slot_btn="{ item }">
|
||||
<a @click.prevent="viewReceipt(item)" class="btn btn-outline-secondary btn-sm"><i class="mdi mdi-pencil-box-outline"></i>明細</a>
|
||||
<a @click.prevent="editReceipt(item)" class="btn btn-outline-secondary btn-sm"><i class="mdi mdi-printer"></i>編輯</a>
|
||||
<a @click.prevent="viewReceipt(item)" class="btn btn-outline-secondary btn-sm"><i class="mdi mdi-view-list-outline"></i>明細</a>
|
||||
<a @click.prevent="editReceipt(item)" class="btn btn-outline-secondary btn-sm"><i class="mdi mdi-pencil-box-outline"></i>編輯</a>
|
||||
<a @click.prevent="printReceipt(item)" class="btn btn-outline-secondary btn-sm"><i class="mdi mdi-printer"></i>列印</a>
|
||||
<%--<a :href="'reg.aspx?order_no='+item.order_no" class="btn btn-outline-secondary btn-sm"><i class="mdi mdi-pencil-box-outline"></i>編輯</a>--%>
|
||||
<%--<a @click="deleteItem(item)" class="btn btn-outline-secondary btn-sm"><i class="mdi mdi-trash-can"></i>刪除</a>--%>
|
||||
|
||||
@@ -110,7 +110,7 @@
|
||||
transition="scale-transition"
|
||||
offset-y
|
||||
min-width="auto"
|
||||
:disabled="mode=='view'||mode=='edit'">
|
||||
:disabled="mode=='view'">
|
||||
<template v-slot:activator="{ on, attrs }">
|
||||
<v-text-field v-model="newDetail.receipt_date"
|
||||
prepend-icon="mdi-calendar"
|
||||
@@ -164,7 +164,42 @@
|
||||
<v-text-field v-model="d.amt" label="金額" :disabled="mode=='view'"></v-text-field>
|
||||
</div>
|
||||
<div class="col-12 col-md-2">
|
||||
<v-text-field v-model="d.receipt_date" label="開立日期" :disabled="mode=='view'||mode=='edit'"></v-text-field>
|
||||
<!-- <v-text-field v-model="d.receipt_date" label="開立日期" :disabled="mode=='view'"></v-text-field>-->
|
||||
<v-menu ref="menu"
|
||||
v-model="menu"
|
||||
:close-on-content-click="false"
|
||||
:return-value.sync="d.receipt_date"
|
||||
transition="scale-transition"
|
||||
offset-y
|
||||
min-width="auto"
|
||||
:disabled="mode=='view'">
|
||||
<template v-slot:activator="{ on, attrs }">
|
||||
<v-text-field v-model="d.receipt_date"
|
||||
prepend-icon="mdi-calendar"
|
||||
readonly
|
||||
label="開立日期"
|
||||
v-bind="attrs"
|
||||
v-on="on"></v-text-field>
|
||||
</template>
|
||||
<v-date-picker v-model="d.receipt_date"
|
||||
:active-picker.sync="activePicker"
|
||||
:max="(new Date(Date.now() - (new Date()).getTimezoneOffset() * 60000)).toISOString().substring(0, 10)"
|
||||
min="1950-01-01">
|
||||
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn text
|
||||
color="primary"
|
||||
@click.prevent="menu = false">
|
||||
Cancel
|
||||
</v-btn>
|
||||
<v-btn text
|
||||
color="primary"
|
||||
@click.prevent="$refs.menu.save(d.receipt_date)">
|
||||
OK
|
||||
</v-btn>
|
||||
</v-date-picker>
|
||||
</v-menu>
|
||||
|
||||
</div>
|
||||
<div class="col-12 col-md-6">
|
||||
<v-text-field v-model="d.receipt_item" label="功德項目" :disabled="mode=='view'"></v-text-field>
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user