排版
This commit is contained in:
@@ -23,6 +23,8 @@
|
||||
data() {
|
||||
return {
|
||||
this_id: '<%= Request["num"] %>',
|
||||
paperlist: [],
|
||||
stylelist:[],
|
||||
options: {},
|
||||
optionsDetail: {
|
||||
multiSort: false,
|
||||
@@ -331,6 +333,45 @@
|
||||
})
|
||||
.catch(
|
||||
error => console.log(error)
|
||||
)
|
||||
|
||||
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 })
|
||||
$("#pageSize").append(`<option value="${x.paperID}">${x.paperName}</option>`);
|
||||
$("#printSize").append(`<option value="${x.paperID}">${x.paperName}</option>`);
|
||||
});
|
||||
}
|
||||
}
|
||||
})
|
||||
.catch(
|
||||
error => console.log(error)
|
||||
)
|
||||
|
||||
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 })
|
||||
$("#defaultStyle").append(`<option value="${x.styleID}">${x.name}</option>`);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
})
|
||||
.catch(
|
||||
error => console.log(error)
|
||||
)
|
||||
}
|
||||
|
||||
@@ -525,6 +566,15 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
selectChange(what) {
|
||||
if (what == "pageSize") {
|
||||
document.getElementById('<%= pageSizeSel.ClientID %>').value = $("#pageSize").val();
|
||||
} else if (what == "printSize") {
|
||||
document.getElementById('<%= printSizeSel.ClientID %>').value = $("#printSize").val();
|
||||
} else if (what=="defaultStyle") {
|
||||
document.getElementById('<%= defaultStyleSel.ClientID %>').value = $("#defaultStyle").val();
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
},
|
||||
@@ -625,6 +675,36 @@
|
||||
<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="pageSize" onchange="VueApp.selectChange('pageSize')">
|
||||
<option value="">請選擇</option>
|
||||
</select>
|
||||
<asp:HiddenField ID="pageSizeSel" runat="server" Value="" />
|
||||
<%--<asp:DropDownList ID="pageSize" runat="server"></asp:DropDownList> --%>
|
||||
</div>
|
||||
<label class="col-sm-2 col-form-label">預設列印尺寸</label>
|
||||
<div class="col-sm-4">
|
||||
<select id="printSize" onchange="VueApp.selectChange('printSize')">
|
||||
<option value="">請選擇</option>
|
||||
</select>
|
||||
<asp:HiddenField ID="printSizeSel" runat="server" Value="" />
|
||||
<%-- <asp:DropDownList ID="printSize" runat="server"></asp:DropDownList> --%>
|
||||
</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="defaultStyle" onchange="VueApp.selectChange('defaultStyle')">
|
||||
<option value="">請選擇</option>
|
||||
</select>
|
||||
<asp:HiddenField ID="defaultStyleSel" runat="server" Value="" />
|
||||
<%--<asp:DropDownList ID="pageSize" runat="server"></asp:DropDownList> --%>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<asp:UpdatePanel ID="UpdatePanel1" runat="server" class="row mb-1 label-sm-right">
|
||||
<ContentTemplate>
|
||||
<label class="col-sm-2 col-form-label"></label>
|
||||
|
||||
@@ -120,7 +120,19 @@ public partial class admin_activity_item_reg : MyWeb.config
|
||||
Model.actItem actItem = new Model.actItem();//新增
|
||||
actItem.subject = subject.Text;
|
||||
actItem.print_init = print_init.Text;
|
||||
actItem.partno = PARTNO.Text;
|
||||
actItem.partno = PARTNO.Text;
|
||||
if (!isStrNull(pageSizeSel.Value))
|
||||
{
|
||||
actItem.pageSize =(pageSizeSel.Value);
|
||||
}
|
||||
if (!isStrNull(printSizeSel.Value))
|
||||
{
|
||||
actItem.printSize = (printSizeSel.Value);
|
||||
}
|
||||
if (!isStrNull(defaultStyleSel.Value))
|
||||
{
|
||||
actItem.defaultStyle = (defaultStyleSel.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; }
|
||||
if (!isStrNull(kind.Value)) { actItem.kind = Val(kind.Value); } else { actItem.kind = null; }
|
||||
@@ -168,6 +180,18 @@ public partial class admin_activity_item_reg : MyWeb.config
|
||||
actItem.subject = subject.Text;
|
||||
actItem.print_init = print_init.Text;
|
||||
actItem.partno = PARTNO.Text;
|
||||
if (!isStrNull(pageSizeSel.Value))
|
||||
{
|
||||
actItem.pageSize = (pageSizeSel.Value);
|
||||
}
|
||||
if (!isStrNull(printSizeSel.Value))
|
||||
{
|
||||
actItem.printSize = (printSizeSel.Value);
|
||||
}
|
||||
if (!isStrNull(defaultStyleSel.Value))
|
||||
{
|
||||
actItem.defaultStyle = (defaultStyleSel.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; }
|
||||
if (!isStrNull(kind.Value)) { actItem.kind = Val(kind.Value); } else { actItem.kind = null; }
|
||||
|
||||
@@ -640,12 +640,14 @@
|
||||
form.appendChild(hiddenField);
|
||||
};
|
||||
|
||||
// Add form fields
|
||||
// Add form fields
|
||||
console.log(this.thisItemSelected.val, this.thisFilesSelected.val,JSON.stringify(list));
|
||||
addHiddenField("item", this.thisItemSelected.val);
|
||||
addHiddenField("file", this.thisFilesSelected.val);
|
||||
addHiddenField("list", JSON.stringify(list));
|
||||
addHiddenField("title", `${this.thisItemSelected.text} / ${this.thisFilesSelected.text}`);
|
||||
//console.log("底家:",this.data_table.selected);
|
||||
localStorage.setItem("item", this.thisItemSelected.val);
|
||||
localStorage.setItem("list", JSON.stringify(this.data_table.selected));
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user