快速報名,功德內容設定調整:只要選擇預設版型
This commit is contained in:
@@ -199,19 +199,24 @@
|
||||
val: 0
|
||||
},
|
||||
},
|
||||
style_datas: [],
|
||||
paper_datas: [],
|
||||
defaultStyle: "",
|
||||
paperID: "",
|
||||
printID:""
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.search_dialog.current = this.search_dialog.controls.search1
|
||||
//console.log("mounted");
|
||||
this.initialize()
|
||||
},
|
||||
watch: {
|
||||
options: {
|
||||
handler() {
|
||||
//console.log("watch1", this.search_dialog, this.search_dialog.page);
|
||||
this.search_get()
|
||||
console.log("watch2", this.search_dialog, this.search_dialog.page);
|
||||
},
|
||||
},
|
||||
deep: true,
|
||||
},
|
||||
optionsDetail: {
|
||||
@@ -248,7 +253,6 @@
|
||||
if (this.this_id == "")
|
||||
search['status'] = "Y";//啟用
|
||||
}
|
||||
console.log("search_get", api_url, search, params, this.options);
|
||||
this.search_dialog.loading = true
|
||||
axios.post(api_url, search, { params: params })
|
||||
.then(response => {
|
||||
@@ -289,7 +293,7 @@
|
||||
else {
|
||||
|
||||
}
|
||||
console.log("search_select", row, editem);
|
||||
|
||||
//debugger;
|
||||
target.children("input.search-text").val(curr.selected[curr.text_prop])//text
|
||||
target.children("input:hidden").val(curr.selected[curr.value_prop])//value
|
||||
@@ -336,46 +340,19 @@
|
||||
)
|
||||
}
|
||||
|
||||
axios
|
||||
.post(HTTP_HOST + 'api/tablet/GetPaperSize', {})
|
||||
.then(response => {
|
||||
console.log(response);
|
||||
if (response.status == "200") {
|
||||
let data = response.data;
|
||||
if (data.result == "Y") {
|
||||
data.data.forEach(x => {
|
||||
this.paperlist.push({ name: x.paperName, id: x.paperID, width: x.width, height: x.height })
|
||||
$('#<%= ddlPageSize.ClientID %>').append(`<option value="${x.paperID}">${x.paperName}</option>`);
|
||||
$('#<%= ddlPrintSize.ClientID %>').append(`<option value="${x.paperID}">${x.paperName}</option>`);
|
||||
});
|
||||
|
||||
$('#<%= ddlPageSize.ClientID %>').val($("#<%= hidPageSize.ClientID %>").val())
|
||||
$('#<%= ddlPrintSize.ClientID %>').val($("#<%= hidPrintSize.ClientID %>").val())
|
||||
}
|
||||
}
|
||||
})
|
||||
.catch(
|
||||
error => console.log(error)
|
||||
)
|
||||
this.paper_datas.length = 0
|
||||
this.style_datas.length = 0
|
||||
|
||||
axios
|
||||
.post(HTTP_HOST + 'api/tablet/GetStyleData', {})
|
||||
.then(response => {
|
||||
console.log(response);
|
||||
if (response.status == "200") {
|
||||
let data = response.data;
|
||||
if (data.result == "Y") {
|
||||
data.data.forEach(x => {
|
||||
if (x.styleID != "000001") {
|
||||
this.stylelist.push({ styleID: x.styleID, name: x.name })
|
||||
$('#<%= ddlDefaultStyle.ClientID %>').append(`<option value="${x.styleID}">${x.name}</option>`);
|
||||
//$("#defaultStyle").append(`<option value="${x.styleID}">${x.name}</option>`);
|
||||
}
|
||||
});
|
||||
$('#<%= ddlDefaultStyle.ClientID %>').val($("#<%= hidDefaultStyle.ClientID %>").val())
|
||||
}
|
||||
}
|
||||
})
|
||||
this.style_datas = data.data
|
||||
this.defaultStyle=$("#<%=hidDefaultStyle.ClientID %>").val()
|
||||
}
|
||||
}})
|
||||
.catch(
|
||||
error => console.log(error)
|
||||
)
|
||||
@@ -492,7 +469,7 @@
|
||||
bom_editItem(item) {
|
||||
this.bom_editedIndex = this.bom_list.indexOf(item);
|
||||
this.bom_editedItem = $.extend(true, {}, item);
|
||||
console.log("bom_editItem:", this.bom_editedIndex, this.bom_editedItem);
|
||||
|
||||
//debugger;
|
||||
},
|
||||
bom_deleteItem(item) {
|
||||
@@ -572,13 +549,13 @@
|
||||
}
|
||||
},
|
||||
changeSel(selType) {
|
||||
if (selType=="ddlPageSize") {
|
||||
$("#<%= hidPageSize.ClientID %>").val($("#<%= ddlPageSize.ClientID %>").val())
|
||||
} else if (selType == "ddlPrintSize") {
|
||||
$("#<%= hidPrintSize.ClientID %>").val($("#<%=ddlPrintSize.ClientID %>").val())
|
||||
} else if (selType == "ddlDefaultStyle") {
|
||||
$("#<%= hidDefaultStyle.ClientID %>").val($("#<%= ddlDefaultStyle.ClientID %>").val())
|
||||
}
|
||||
let style = this.style_datas.find(x => x.styleID == this.defaultStyle)
|
||||
this.paperID = style.paperSize
|
||||
this.printID = style.printSize
|
||||
$("#<%= hidPageSize.ClientID %>").val(this.paperID)
|
||||
$("#<%=hidPrintSize.ClientID %>").val(this.printID)
|
||||
$("#<%=hidDefaultStyle.ClientID %>").val(this.defaultStyle)
|
||||
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@@ -659,47 +636,43 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-1 label-sm-right">
|
||||
<label class="col-sm-2 col-form-label">料號</label>
|
||||
<%-- <label class="col-sm-2 col-form-label">料號</label>
|
||||
<div class="col-sm-4">
|
||||
<asp:TextBox ID="PARTNO" MaxLength="100" runat="server" CssClass="form-control" placeholder="請輸入料號"></asp:TextBox>
|
||||
</div>
|
||||
</div>--%>
|
||||
<label class="col-sm-2 col-form-label">項目名稱 *</label>
|
||||
<div class="col-sm-4">
|
||||
<asp:TextBox ID="subject" MaxLength="100" runat="server" CssClass="form-control" placeholder="請輸入品項名稱"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" ControlToValidate="subject" runat="server" ErrorMessage="必填!" Display="Dynamic" SetFocusOnError="true"></asp:RequiredFieldValidator>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-1 label-sm-right">
|
||||
<label class="col-sm-2 col-form-label">牌位編號開頭</label>
|
||||
<div class="col-sm-4">
|
||||
<asp:TextBox ID="print_init" MaxLength="20" runat="server" CssClass="form-control" placeholder="請輸入牌位編號開頭"></asp:TextBox>
|
||||
</div>
|
||||
<asp:TextBox ID="print_init" MaxLength="20" runat="server" CssClass="form-control" placeholder="請輸入牌位編號開頭"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-1 label-sm-right">
|
||||
|
||||
<label class="col-sm-2 col-form-label">預設金額</label>
|
||||
<div class="col-sm-4">
|
||||
<asp:TextBox ID="price" MaxLength="7" runat="server" CssClass="form-control" placeholder="請輸入預設金額"></asp:TextBox>
|
||||
<asp:RegularExpressionValidator ControlToValidate="price" Display="Dynamic" SetFocusOnError="true" ErrorMessage="只能輸入數字" ID="RegularExpressionValidator3" runat="server" ValidationExpression="^(-?\d+)(\.\d+)?$" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-1 label-sm-right">
|
||||
<label class="col-sm-2 col-form-label">預設頁面尺寸</label>
|
||||
<div class="col-sm-4">
|
||||
<select ID="ddlPageSize" runat="server" onchange="VueApp.changeSel('ddlPageSize')"></select>
|
||||
<asp:HiddenField ID="hidPageSize" runat="server" />
|
||||
</div>
|
||||
<label class="col-sm-2 col-form-label">預設列印尺寸</label>
|
||||
|
||||
<label class="col-sm-2 col-form-label">預設版型</label>
|
||||
<div class="col-sm-4">
|
||||
<select ID="ddlPrintSize" runat="server" onchange="VueApp.changeSel('ddlPrintSize')"></select>
|
||||
<asp:HiddenField ID="hidPrintSize" runat="server" />
|
||||
<v-select
|
||||
:items="style_datas"
|
||||
|
||||
item-text="name" @change="changeSel('ddlDefaultStyle')"
|
||||
item-value="styleID" v-model="defaultStyle">
|
||||
</v-select>
|
||||
<%-- <select ID="ddlDefaultStyle" runat="server"
|
||||
onchange="VueApp.changeSel('ddlDefaultStyle')"></select>--%>
|
||||
<asp:HiddenField ID="hidDefaultStyle" runat="server" />
|
||||
<asp:HiddenField ID="hidPrintSize" runat="server" />
|
||||
<asp:HiddenField ID="hidPageSize" runat="server" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-1 label-sm-right">
|
||||
<label class="col-sm-2 col-form-label">預設版型</label>
|
||||
<div class="col-sm-4">
|
||||
<select ID="ddlDefaultStyle" runat="server" onchange="VueApp.changeSel('ddlDefaultStyle')"></select>
|
||||
<asp:HiddenField ID="hidDefaultStyle" runat="server" />
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<asp:UpdatePanel ID="UpdatePanel1" runat="server" class="row mb-1 label-sm-right">
|
||||
<ContentTemplate>
|
||||
@@ -909,7 +882,7 @@
|
||||
</v-card-title>
|
||||
<v-card-text >
|
||||
<v-row>
|
||||
<v-col v-for="item in search_dialog.current.keys"
|
||||
<v-col v-for="item in search_dialog.current.keys" :key="item.value"
|
||||
:cols="search_dialog.current.keys.length>1?6:12" >
|
||||
<v-text-field v-model="item.value" :label="item.title" v-if="item.visible===undefined || item.visible==true "></v-text-field>
|
||||
</v-col>
|
||||
|
||||
@@ -42,21 +42,21 @@ public partial class admin_activity_item_reg : MyWeb.config
|
||||
BuildKind();
|
||||
subject.Text = prod.subject;
|
||||
print_init.Text = prod.print_init;
|
||||
PARTNO.Text = prod.partno;
|
||||
//PARTNO.Text = prod.partno;
|
||||
//kind.SelectedValue = prod.kind.ToString();
|
||||
if (!isStrNull(prod.pageSize))
|
||||
{
|
||||
ddlPageSize.Value = prod.pageSize.ToString();
|
||||
//ddlPageSize.Value = prod.pageSize.ToString();
|
||||
hidPageSize.Value = prod.pageSize.ToString();
|
||||
}
|
||||
if (!isStrNull(prod.printSize))
|
||||
{
|
||||
ddlPrintSize.Value = prod.printSize.ToString();
|
||||
//ddlPrintSize.Value = prod.printSize.ToString();
|
||||
hidPrintSize.Value = prod.printSize.ToString();
|
||||
}
|
||||
if (!isStrNull(prod.defaultStyle))
|
||||
{
|
||||
ddlDefaultStyle.Value = prod.defaultStyle.ToString();
|
||||
//ddlDefaultStyle.Value = prod.defaultStyle.ToString();
|
||||
hidDefaultStyle.Value = prod.defaultStyle.ToString();
|
||||
}
|
||||
if (prod.kind.HasValue)
|
||||
@@ -136,18 +136,18 @@ public partial class admin_activity_item_reg : MyWeb.config
|
||||
int maxSort = _db.actItems.Max(x => (int?)x.sort_order) ?? 0;
|
||||
actItem.subject = subject.Text;
|
||||
actItem.print_init = print_init.Text;
|
||||
actItem.partno = PARTNO.Text;
|
||||
if (!isStrNull(ddlPageSize.Value))
|
||||
//actItem.partno = PARTNO.Text;
|
||||
if (!isStrNull(hidPageSize.Value))
|
||||
{
|
||||
actItem.pageSize = ddlPageSize.Value;
|
||||
actItem.pageSize = hidPageSize.Value;
|
||||
}
|
||||
if (!isStrNull(ddlPrintSize.Value))
|
||||
if (!isStrNull(hidPrintSize.Value))
|
||||
{
|
||||
actItem.printSize = ddlPrintSize.Value;
|
||||
actItem.printSize = hidPrintSize.Value;
|
||||
}
|
||||
if (!isStrNull(ddlDefaultStyle.Value))
|
||||
if (!isStrNull(hidDefaultStyle.Value))
|
||||
{
|
||||
actItem.defaultStyle = (ddlDefaultStyle.Value);
|
||||
actItem.defaultStyle = (hidDefaultStyle.Value);
|
||||
}
|
||||
//if (!isStrNull(kind.SelectedValue)) { actItem.kind = Val(kind.SelectedValue); } else { actItem.kind = null; }
|
||||
if (!isStrNull(category.SelectedValue)) { actItem.category = Val(category.SelectedValue); } else { actItem.category = null; }
|
||||
@@ -196,7 +196,7 @@ public partial class admin_activity_item_reg : MyWeb.config
|
||||
{
|
||||
actItem.subject = subject.Text;
|
||||
actItem.print_init = print_init.Text;
|
||||
actItem.partno = PARTNO.Text;
|
||||
//actItem.partno = PARTNO.Text;
|
||||
if (!isStrNull(hidPageSize.Value))
|
||||
{
|
||||
actItem.pageSize = hidPageSize.Value;
|
||||
|
||||
Reference in New Issue
Block a user