天津投入产出系统后端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

205 lines
7.6 KiB

<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/AppMaster.Master"
Inherits="System.Web.Mvc.ViewPage<QMAPP.MD.Web.Models.TeamMemberModel>" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
班组成员编辑
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<%=Html.QPEdit("班组成员编辑", string.IsNullOrEmpty(Model.PID) ? QMFrameWork.WebUI.panelType.Add : QMFrameWork.WebUI.panelType.Update)%>
<table id="editTable" cellpadding="0" cellspacing="0">
<tr>
<td>
<table>
<tr>
<th align="right">
<%=Html.QV(p => p.FACTORY_CODE)%>
</th>
<td>
<%=Html.QC(p => p.FACTORY_CODE)%>
</td>
</tr>
<tr>
<th align="right">
<%=Html.QV(p => p.TEAM_CODE)%>
</th>
<td>
<%=Html.QC(p => p.TEAM_CODE)%>
</td>
</tr>
<tr>
<th align="right">
<%=Html.QV(p => p.MEMBER_CODE)%>
</th>
<td>
<%=Html.QC(p => p.MEMBER_CODE)%>
</td>
</tr>
<tr>
<th align="right">
<%=Html.QV(p => p.TEAMTYPE)%>
</th>
<td>
<%=Html.QC(p => p.TEAMTYPE)%>
</td>
</tr>
<tr>
<th align="right">
负责区域
</th>
<td>
<%=Html.QC(p=>p.WORKCELL_CODE)%>
<script type="text/javascript" language="javascript">
$(function () {
$('#WORKCELL_CODE').combobox({
editable: 'false',
valueField: 'id',
textField: 'text'
});
$.ajax({
url: "/Dict/GetAllWorkCenterComboxSource",
dataType: "json",
success: function (data) {
data[0].id = "All";
data[0].text = "不限";
$('#WORKCELL_CODE').combobox("loadData", data);
}
});
});
</script>
</td>
</tr>
<tr>
<th align="right">
<%=Html.QV(p => p.IS_LEADER_CK)%>
</th>
<td>
<%=Html.CheckBoxFor(p=>p.IS_LEADER_CK) %>
</td>
</tr>
<tr>
<th align="right">
<%=Html.QV(p => p.IS_CALL_CK)%>
</th>
<td>
<%=Html.CheckBoxFor(p=>p.IS_CALL_CK) %>
</td>
</tr>
<tr>
<th align="right">
<%=Html.QV(p => p.CALL_LEVEL)%>
</th>
<td>
<%=Html.QC(p => p.CALL_LEVEL)%>
</td>
</tr>
<tr>
<th align="right">
<%=Html.QV(p => p.REMARK)%>
</th>
<td>
<%=Html.QC(p => p.REMARK)%>
</td>
</tr>
</table>
</td>
</tr>
</table>
<%=Html.HiddenFor(p => p.PID)%>
<%=Html.HiddenFor(p => p.TEAM_NAME)%>
<%=Html.HiddenFor(p => p.MEMBER_NAME)%>
<%=Html.QPEnd() %>
<script type="text/javascript">
$(function () {
//修改时:班组赋值
//debugger;
var selectCode = $('#FACTORY_CODE').combobox('getValue');
if (selectCode != "") {
//获取下拉数据源
$('#TEAM_CODE').combobox({
url: "/Dict/GetFactoryTeamComboxSource?factoryCode=" + selectCode,
editable: 'false',
valueField: 'TEAM_CODE',
textField: 'TEAM_NAME'
});
//$('#TEAM_CODE').combobox("setValue", $('#TEAM_CODE').val());
}
else {
$('#TEAM_CODE').combobox("setValue", "");
}
//新增时:级联班组
$('#FACTORY_CODE').combobox({
onSelect: function () {
var selectCode = $('#FACTORY_CODE').combobox('getValue');
if (selectCode != "") {
//获取下拉数据源
$('#TEAM_CODE').combobox({
url: "/Dict/GetFactoryTeamComboxSource?factoryCode=" + selectCode,
editable: 'false',
valueField: 'TEAM_CODE',
textField: 'TEAM_NAME'
});
$('#TEAM_CODE').combobox("setValue", "");
}
else {
//清空工序下拉框
var plantData = [{ 'TEAM_CODE': "", 'TEAM_NAME': ""}];
$('#TEAM_CODE').combobox("loadData", plantData);
$('#TEAM_CODE').combobox("select", "");
}
}
});
});
//联动事件
$('#TEAM_CODE').combobox({
onSelect: function () {
var TEAM_NAME = $('#TEAM_CODE').combobox('getText');
$('#TEAM_NAME').val(TEAM_NAME);
}
});
$('#MEMBER_CODE').combobox({
onSelect: function () {
var MEMBER_NAME = $('#MEMBER_CODE').combobox('getText');
$('#MEMBER_NAME').val(MEMBER_NAME);
}
});
//保存
function Save() {
var code = /^[0-9]*$/;
var teamcode = document.getElementById("CALL_LEVEL").value;
if (isValidate() == false) {
return false;
}
else if (!code.test(teamcode)) {
alert("呼叫等级必须为有效数字");
return false;
}
submitByButton("Save");
}
$(function () {
$('#FACTORY_CODE').combobox({
panelWidth: '350'
});
});
</script>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ToolContent" runat="server">
<table width="100%" cellpadding="0" cellspacing="0">
<tr>
<td>
<%=Html.QTButtonSave("Team", "Save", "return Save();")%>
<%=Html.QTButtonBack("close", "List", "parent.closeAppWindow1();return false;")%>
</td>
</tr>
</table>
</asp:Content>