<!doctype html>
<html style="height:100%;font-size:14px;">
<head>
<meta name="spreadjs culture" content="zh-cn" />
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" type="text/css" href="http://cdn.grapecity.com/spreadjs/hosted/css/gc.spread.sheets.excel2013white.12.1.0.css">
<script src="http://code.jquery.com/jquery-1.8.2.min.js" type="text/javascript"></script>
<script src="http://cdn.grapecity.com/spreadjs/hosted/scripts/gc.spread.sheets.all.12.1.0.min.js" type="text/javascript"></script>
<script src="http://cdn.grapecity.com/spreadjs/hosted/scripts/resources/zh/gc.spread.sheets.resources.zh.12.1.0.min.js" type="text/javascript"></script>
<style>
* {
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}
.sample-tutorial {
position: relative;
height: 100%;
overflow: hidden;
}
</style>
</head>
<body style="margin:0;position:absolute;top:0;bottom:0;left:0;right:0;font-size:14px;user-select:none;-webkit-user-select: none;overflow:hidden;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'">
<div class="sample-tutorial">
<div id="ss" style="width:100%;height:100%"></div>
</div>
<script type="text/javascript">
var _lines = ["Computers", "Washers", "Stoves"];
var _colors = ["Red", "Green", "Blue", "White"];
var _ratings = ["Terrible", "Bad", "Average", "Good", "Great", "Epic"];
var spread = new GC.Spread.Sheets.Workbook(document.getElementById("ss"), {
sheetCount: 1
});
var sheet = spread.getActiveSheet()
var data = [{
"操作": "",
"估价单号": "",
"版本": "",
"序号": "",
"产品号": "",
"prtid": "",
"成品": "",
"描述": "",
"图号": "",
"报价单版本": "",
"图号版本": "",
"零件数量": 1,
"要求材料": "",
"表面处理内容": "",
"原价": "",
"材料费": 0,
"机加工费": 0,
"钣金费": 0,
"后处理费": 0,
"设计费": 0,
"标准件费": 0,
"委外费": 0,
"装配费": 0,
"材料费占比": 0,
"机加工费占比": 0,
"钣金费占比": 0,
"后处理费占比": 0,
"标准件费占比": 0,
"设计费占比": "",
"委外费占比": 0,
"装配费占比": 0,
"其它": "",
"单价": 0,
"总价": 0,
"备注": "",
"报价材料": "",
"难度等级": "",
"材料类": "",
"密度": 1,
"材料价": "",
"下料数量": "",
"毛重": {
"_calcError": "#NAME?",
"_code": 29
},
"板材长": 0,
"板材宽": 0,
"板材高": 0,
"棒材直径": 0,
"棒材长度": 0,
"镭射": "",
"剪切": "",
"折弯": "",
"数冲": "",
"普冲": "",
"焊": "",
"热处理": "",
"表面处理": "",
"抛光": "",
"刻字": "",
"工序1": "",
"工时1": "",
"金额1": "",
"工序2": "",
"工时2": "",
"金额2": "",
"工序3": "",
"工时3": "",
"金额3": "",
"工序4": "",
"工时4": "",
"金额4": "",
"工序5": "",
"工时5": "",
"金额5": "",
"工序6": "",
"工时6": "",
"金额6": "",
"工序7": "",
"工时7": "",
"金额7": "",
"工序8": "",
"工时8": "",
"金额8": "",
"工序9": "",
"工时9": "",
"金额9": "",
"工序10": "",
"工时10": "",
"金额10": "",
"删状态": "",
"删日期": "",
"删除人": "",
"单据类别": "",
"是否退图": "",
"退图人": "",
"退图时间": "",
"责任人": "",
"责任人分配时间": "",
"审图处理时间": "",
"审图处理结果": "",
"审图人": "",
"提供外协信息时间": "",
"外协询价完成时间": "",
"采购责任人": "",
"工序委外": "",
"报价工程师": "",
"所属公司": "",
"客户类型": "",
"状态": "",
"公司代码": "",
"工厂代码": "",
"报价单行id": "",
"成id": "MIJR9sOCkPuYKcCUOQKLtjSNlUVoLBg8"
}]
sheet.setDataSource(data);
for (var i = 0; i < sheet.getRowCount(); i++) {
var maozhong = "=IF(COUNTIF(AL" + (i + 1) + ",'棒材'),AQ" + (i + 1) + "*AR" + (i + 1) + "*AS" + (i + 1) + "*AM" + (i + 1) + ",(AT" + (i + 1) + "/2)*AU" + (i + 1) + ")"
sheet.getCell(i, 41).formula(maozhong) //毛重
}
countGSAll(sheet)
</script>
</body>
</html>
|
-
|