<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@include file="/common/common.jsp"%>
<head>
<Dst:SMBase type="jquery,eui" pakgagePath="com.dst.slms.contractmange.salecontract.saleContractEdit" uipk="saleContractController" title="营销合同"/>
</head>
<body class="dst-mainbackground">
<div class="dst-container">

<Dst:SMMain title="营销合同">
	<Dst:SMEDBillToolBar >
	   <Dst:SMDGToolBar title="保存" icon="fa fa-save" bindAction="saveAction"/>
	   <Dst:SMDGToolBar title="提交并关闭" icon="fa fa-clipboard" bindAction="submitAction"/>
	   <Dst:SMDGToolBar title="查看流程图" icon="fa fa-cubes" bindAction="viewFlowAction"/>
	   <Dst:SMDGToolBar title="关闭" icon="fa fa-rotate-left" bindAction="closeAction"/>
	</Dst:SMEDBillToolBar> 
	<Dst:SMForm formid="formobj" >
		<input id="id" name="id" type="hidden" value="${model.id }">
		<input id="sourceBillId" name="sourceBillId"  type="hidden" value="${model.sourceBillId }">
		<div class="easyui-panel" title="营销合同" style="width:100%;" data-options="bodyCls:'panle-background',collapsible:true,headerCls:'panel-block-teal panel-description'">
			<div style="padding-top: 10px"></div>
			<div class="dst-row">
				<div class="dst-col-sm4">
					<label class="dst-form-label">组织</label>
					<div class="dst-input-block">
						<Dst:SMBizPromptBox id="orgunit" readonly="true" queryFieldItem="number,name" entityPath="com.dst.slms.system.entity.SysOrgInfo" width="100%" value="${model.orgunit}"/>
					</div>
				</div>
				<div class="dst-col-sm4">
					<label class="dst-form-label">项目</label>
					<div class="dst-input-block">
						<Dst:SMBizPromptBox id="project" readonly="true"  queryFieldItem="number,name" entityPath="com.dst.slms.base.entity.MarketProjectInfo" width="100%" value="${model.project}"/>
					</div>
				</div>
				<div class="dst-col-sm4">
					<label class="dst-form-label">合同类型</label>
					<div class="dst-input-block">
						<Dst:SMBizPromptBox id="contractType" required="true" queryFieldItem="number,name" entityPath="com.dst.slms.base.entity.ContractTypeInfo" width="100%" value="${model.contractType}"/>
					</div>
				</div>
			</div>
			<div class="dst-row">
				<div class="dst-col-sm4">
					<label class="dst-form-label">合同编号</label>
					<div class="dst-input-block">
						<Dst:SMTextBox id="number" required="true"  validType="['maxLength[100]']" width="100%" value="${model.number}"/>
					</div>
				</div>
				<div class="dst-col-sm4">
					<label class="dst-form-label">甲方</label>
					<div class="dst-input-block">
						<Dst:SMBizPromptBox id="partA" required="true"  queryFieldItem="number,name" entityPath="com.dst.slms.system.entity.SysOrgInfo" width="100%" value="${model.partA}"/>
					</div>
				</div>
				<div class="dst-col-sm4">
					<label class="dst-form-label">合同名称</label>
					<div class="dst-input-block">
						<Dst:SMTextBox id="name" required="true"  validType="['maxLength[100]']" width="100%" value="${model.name}"/>
					</div>
				</div>
			</div>
			<div class="dst-row">
				<div class="dst-col-sm4">
					<label class="dst-form-label">供应商</label>
					<div class="dst-input-block">
						<Dst:SMBizPromptBox id="supplier" readonly="true"  queryFieldItem="number,name" entityPath="com.dst.slms.supplierprofile.entity.SupplierProfileInfo" width="100%" value="${model.supplier}"/>
					</div>
				</div>
				<div class="dst-col-sm4">
					<label class="dst-form-label">框架合同</label>
					<div class="dst-input-block">
						<Dst:SMBizPromptBox id="kjcontract"   queryFieldItem="number,name" entityPath="com.dst.slms.contractmange.entity.SaleContractInfo" width="100%" value="${model.kjcontract}"/>
					</div>
				</div>
				<div class="dst-col-sm4">
					<label class="dst-form-label">合同性质</label>
					<div class="dst-input-block">
						<Dst:SMEnumDicBox id="saleConNature" dicGroupCode="saleConNature" width="100%" value="${model.saleConNature}"/>
					</div>
				</div>
			</div>
			<div class="dst-row">
				<div class="dst-col-sm4">
					<label class="dst-form-label">立项单</label>
					<div class="dst-input-block">
						<Dst:SMBizPromptBox id="projectApprove"  readonly="true" disPlayFormatName="number" queryFieldItem="number" entityPath="com.dst.slms.proapproval.entity.ProjectApproveInfo" width="100%" value="${model.projectApprove}"/>
					</div>
				</div>
				<div class="dst-col-sm4">
					<label class="dst-form-label"></label>
					<div class="dst-input-block">
						<Dst:SMCheckBox id="isSettlement"  readonly="true"  label="是否结算"  value="${model.isSettlement}"/>
					</div>
				</div>
				<div class="dst-col-sm4">
					<label class="dst-form-label">结算金额</label>
					<div class="dst-input-block">
						<Dst:SMNumberBox id="settlementAmt"  readonly="true" precision="2" width="100%" value="${model.settlementAmt}"/>
					</div>
				</div>
			</div>
			<div class="dst-row">
				<div class="dst-col-sm4">
					<label class="dst-form-label">责任部门</label>
					<div class="dst-input-block">
						<Dst:SMBizPromptBox id="dutyDep"  required="true" queryFieldItem="number,name" entityPath="com.dst.slms.system.entity.SysOrgInfo" width="100%" value="${model.dutyDep}"/>
					</div>
				</div>
				<div class="dst-col-sm4">
					<label class="dst-form-label">单据状态</label>
					<div class="dst-input-block">
						<Dst:SMEnumDicBox id="state" readonly="true"  dicGroupCode="BILLSTATUS" width="100%" value="${model.state}"/>
					</div>
				</div>
				<div class="dst-col-sm4">
					<label class="dst-form-label">签约日期</label>
					<div class="dst-input-block">
						<Dst:SMDateTimeBox id="signDate"  required="true" width="100%" value="${model.signDate}"/>
					</div>
				</div>
			</div>
			<div class="dst-row">
				<div class="dst-col-sm4">
					<label class="dst-form-label">责任人</label>
					<div class="dst-input-block">
						<Dst:SMBizPromptBox id="dutyPerson" required="true"  queryFieldItem="number,name" entityPath="com.dst.slms.system.entity.SysPersonInfo" width="100%" value="${model.dutyPerson}"/>
					</div>
				</div>
				<div class="dst-col-sm4">
					<label class="dst-form-label">立项金额</label>
					<div class="dst-input-block">
						<Dst:SMNumberBox id="lxAmt"  readonly="true" precision="2" width="100%" value="${model.lxAmt}"/>
					</div>
				</div>
				<div class="dst-col-sm4">
					<label class="dst-form-label">业务日期</label>
					<div class="dst-input-block">
						<Dst:SMDateTimeBox id="bizdate" readonly="true"  width="100%" value="${model.bizdate}"/>
					</div>
				</div>
			</div>
			<div class="dst-row">
				<div class="dst-col-sm4">
					<label class="dst-form-label">营销科目</label>
					<div class="dst-input-block">
						<Dst:SMBizPromptBox id="markAccount" readonly="true"  queryFieldItem="number,name" entityPath="com.dst.slms.base.entity.MarketAccountInfo" width="100%" value="${model.markAccount}"/>
					</div>
				</div>
				<div class="dst-col-sm4">
					<label class="dst-form-label">含税合同金额</label>
					<div class="dst-input-block">
						<Dst:SMNumberBox id="taxConAmt" required="true"  precision="2" width="100%" value="${model.taxConAmt}"/>
					</div>
				</div>
				<div class="dst-col-sm4">
					<label class="dst-form-label">综合税率(%)</label>
					<div class="dst-input-block">
						<Dst:SMNumberBox id="tax" precision="2" readonly="true"  width="100%" value="${model.tax}"/>
					</div>
				</div>
			</div>
			<div class="dst-row">
				<div class="dst-col-sm4">
					<label class="dst-form-label">不含税合同金额</label>
					<div class="dst-input-block">
						<Dst:SMNumberBox id="notaxConAmt"  required="true" precision="2" width="100%" value="${model.notaxConAmt}"/>
					</div>
				</div>
				<div class="dst-col-sm4">
					<label class="dst-form-label">税额</label>
					<div class="dst-input-block">
						<Dst:SMNumberBox id="taxAmt" required="true"  precision="2" width="100%" value="${model.taxAmt}"/>
					</div>
				</div>
			</div>
			<div class="dst-row">
				<div class="dst-col-sm12">
					<label class="dst-form-label">备注</label>
					<div class="dst-input-block">
						<Dst:SMTextBox id="remake" validType="['maxLength[100]']" width="100%" value="${model.remake}"/>
					</div>
				</div>
			</div>
		</div>	
		<div style="padding-top: 10px"></div>
		<Dst:SMEDDatagrid entityPath="com.dst.slms.contractmange.entity.SaleContractTaxEInfo" style="width:100%;height:250px;" enableCellEdit="true" rownumbers="true" 
		ctrlSelect="true" title="营销合同税款明细" data="${model.saleContractTaxE}" id="saleContractTaxE" entry_editChange="saleContractTaxE_editChange" >
			<Dst:SMEDBillToolBar id="saleContractTaxEtb">
				<Dst:SMDGToolBar title="新增" icon="icon-entity-addline" bindAction="addRow"/>
				<Dst:SMDGToolBar title="插入" icon="icon-entity-insertline" bindAction="insRow"/>
				<Dst:SMDGToolBar title="删除" icon="icon-entity-deleteline" bindAction="removeRow"/>
				<Dst:SMDGToolBar title="上移" icon="icon-entity-upline" bindAction="moveUp"/>
				<Dst:SMDGToolBar title="下移" icon="icon-entity-downline" bindAction="moveDown"/>
			</Dst:SMEDBillToolBar>  
			<Dst:SMEDColumnMoreHeaderGroup>
				<Dst:SMEDColumnTextBox title="id" field="id" hidden="true" width="100"/>
				<Dst:SMEDColumnBizPromptBox field="parent" hidden="true" queryFieldItem="number,name" title="父对象关联" entityPath="com.dst.slms.contractmange.entity.SaleContractInfo"></Dst:SMEDColumnBizPromptBox>
				<Dst:SMEDColumnTextBox field="content" required="true"  title="明细内容" width="100"></Dst:SMEDColumnTextBox>
				<Dst:SMEDColumnNumberBox field="taxConAmt" required="true"  title="含税金额" precision="2"></Dst:SMEDColumnNumberBox>
				<Dst:SMEDColumnBizPromptBox field="taxRate" required="true"  queryFieldItem="number,name,taxRate" title="税率(%)" entityPath="com.dst.slms.base.entity.TaxRateInfo"></Dst:SMEDColumnBizPromptBox>
				<Dst:SMEDColumnNumberBox field="noTaxConAmt" readonly="true"  title="不含税金额" precision="2"></Dst:SMEDColumnNumberBox>
				<Dst:SMEDColumnNumberBox field="taxAmt" readonly="true"  title="进项税额" precision="2"></Dst:SMEDColumnNumberBox>
			</Dst:SMEDColumnMoreHeaderGroup>
		</Dst:SMEDDatagrid>
		<div style="padding-top: 10px"></div>
		<Dst:SMEDDatagrid entityPath="com.dst.slms.contractmange.entity.SaleConEconomicsInfo" style="width:100%;height:250px;" enableCellEdit="true" rownumbers="true" 
		ctrlSelect="true" title="合同经济条款" data="${model.saleConEconomics}" id="saleConEconomics" >
			<Dst:SMEDBillToolBar id="saleConEconomicstb">
				<Dst:SMDGToolBar title="新增" icon="icon-sladdnew" bindAction="addRow"/>
				<Dst:SMDGToolBar title="插入" icon="icon-remove_line" bindAction="insRow"/>
				<Dst:SMDGToolBar title="删除" icon="icon-insert_line" bindAction="removeRow"/>
				<Dst:SMDGToolBar title="上移" icon="icon-up_line" bindAction="moveUp"/>
				<Dst:SMDGToolBar title="下移" icon="icon-down_line" bindAction="moveDown"/>
			</Dst:SMEDBillToolBar>  
			<Dst:SMEDColumnMoreHeaderGroup>
				<Dst:SMEDColumnTextBox title="id" field="id" hidden="true" width="100"/>
				<Dst:SMEDColumnBizPromptBox field="parent" hidden="true" queryFieldItem="number,name" title="父对象关联" entityPath="com.dst.slms.contractmange.entity.SaleContractInfo"></Dst:SMEDColumnBizPromptBox>
				<Dst:SMEDColumnDateTimeBox field="bizDate" required="true"  title="日期"></Dst:SMEDColumnDateTimeBox>
				<Dst:SMEDColumnBizPromptBox field="payType" required="true"  queryFieldItem="number,name" title="付款类型" entityPath="com.dst.slms.base.entity.PayTypeInfo"></Dst:SMEDColumnBizPromptBox>
				<Dst:SMEDColumnTextBox field="pay" required="true"  title="付款条件" width="100"></Dst:SMEDColumnTextBox>
				<Dst:SMEDColumnNumberBox field="payScale" required="true"  title="付款比例" precision="2"></Dst:SMEDColumnNumberBox>
				<Dst:SMEDColumnNumberBox field="payAmt" required="true"  title="付款金额" precision="2"></Dst:SMEDColumnNumberBox>
				<Dst:SMEDColumnTextBox field="remark" title="备注" width="100"></Dst:SMEDColumnTextBox>
			</Dst:SMEDColumnMoreHeaderGroup>
		</Dst:SMEDDatagrid>
	</Dst:SMForm>	
</Dst:SMMain>
</div>
</body>
