@@ -34,7 +34,8 @@ let BillsTemplateSchema = {
//计算基数
calcBase: String,
//费率ID
- feeRateID:Number
+ feeRateID:Number,
+ quantity: String,
};
mongoose.model(collectionName, new Schema(BillsTemplateSchema, {versionKey: false, collection: collectionName}));
@@ -118,3 +118,29 @@ var CommonAjax = {
});
}
+
+async function ajaxPost(url, data) {
+ return new Promise(function (resolve, reject) {
+ $.ajax({
+ type:"POST",
+ url: url,
+ data: {'data': JSON.stringify(data)},
+ dataType: 'json',
+ cache: false,
+ timeout: 50000,
+ success: function(result){
+ if (result.error === 0) {
+ resolve(result.data);
+ } else {
+ alert('error: ' + result.message);
+ reject(result.message);
+ }
+ },
+ error: function(jqXHR, textStatus, errorThrown){
+ ajaxErrorInfo(jqXHR, textStatus, errorThrown);
+ reject("请求错误");
+ });
+}
@@ -78,6 +78,24 @@ let TEMPLATE_BILLS_SETTING = {
"font":"Arail"
}, {
+ "width":80,
+ "readOnly":false,
+ "head":{
+ "titleNames":["工程量"],
+ "spanCols":[1],
+ "spanRows":[1],
+ "vAlign":[1],
+ "hAlign":[1],
+ "font":["Arial"]
+ "data":{
+ "field":"quantity",
+ "type":'Number',
+ "vAlign":0,
+ "hAlign":2,
+ "font":"Arail"
+ }, {
"width":200,
"readOnly":false,
"head":{