1.
var nu_ll = ';
var kong = ';
var no_nu_null = ';
if (scope. ci_s = = null) {
Nu_ll = scope. ci_s;
}else if (scope. ci_s = = "") {
Kong = scope. ci_s;
}else{
No_nu_null = scope. ci_s;
}
var fiter = "contractid==" "+no_nu_null+" ' | | contractid== ' "+kong +" ' | | contractid== ' "+nu_ll +" ' | | ' " +nu_ll + "' = = '";
var query = {
Tabulartype: "Applicationdata.t_contractinfo",
properties:["Customerlinkerinfo.officetel", "Customerlinkerinfo.mobile1"]
Filter:fiter,
properties:["Contracttype", "Contractid", "Implementstate", "Signeddate", "Requireimplementtime", "ImplementRemark" , "Registedate",
"Serviceenddate", "Invoiceflag", "Contractbalance", "Instaldate", "Contractmemory", "Othermemory", "CustomerLinkerID ",
"T_customerlinkerinfo.linkername", "T_customerlinkerinfo.aliasname", "T_customerlinkerinfo.position",
"T_customerlinkerinfo.officetel", "T_customerlinkerinfo.hometel", "T_customerlinkerinfo.mobile1",
"T_customerlinkerinfo.mobile2", "T_customerlinkerinfo.email",
"Customerinfo.accountno", "Customerinfo.chname", "Customerinfo.customerid", "Customerinfo.selfdefinecode",
"Customerinfo.enname", "Customerinfo.chshortname", "Customerinfo.enshortname", "Customerinfo.spellshortcode",
"Customerinfo.customertype", "Customerinfo.parentgroup", "Customerinfo.salebrand", "customerinfo.sa",
"Customerinfo.provinces", "customerinfo.city", "Customerinfo.area", "customerinfo.address", "CustomerInfo.ZipCost" ,
"Customerinfo.tel", ' Customerinfo.mobile ', "Customerinfo.fax", "Customerinfo.web", "Customerinfo.email", " Customerinfo.property ",
"Customerinfo.accountbank", "Customerinfo.taxno", "Customerinfo.onwer", "Customerinfo.summary", " Collectiondetail.shouldmoney "," Collectiondetail.actualmoney "]//," Collectiondetail.nogetmoney "
properties:["Collectiondetail.contractid", "Collectiondetail.nogetmoney"]
};
Dataservice.dataquery (Query,function (err,result) {
Scope.re =result. Items.length;
if (scope.re>0) {
Scope.a = result. Items[0]. Invoiceflag;
Whether invoicing
For (Var i=0;i<result. items.length;i++) {
if (result. Items[i]. Invoiceflag==1) {
Result. Items[i]. Invoiceflag = "Invoicing";
}else{
Result. Items[i]. Invoiceflag = "Not Invoiced";
}
}
Use of DataQuery in the WinForm framework