| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148 |
- //通用弹出式文件上传
- function commonUpload(callback){
- $.dialog({
- content: "url:systemController.do?commonUpload",
- lock : true,
- title:"文件上传",
- zIndex:2100,
- width:700,
- height: 200,
- parent:windowapi,
- cache:false,
- ok: function(){
- var iframe = this.iframe.contentWindow;
- iframe.uploadCallback(callback);
- return true;
- },
- cancelVal: '关闭',
- cancel: function(){
- }
- });
- }
- function browseImages(inputId, Img) {// 图片管理器,可多个上传共用
- }
- function browseFiles(inputId, file) {// 文件管理器,可多个上传共用
- }
- function decode(value, id) {//value传入值,id接受值
- var last = value.lastIndexOf("/");
- var filename = value.substring(last + 1, value.length);
- $("#" + id).text(decodeURIComponent(filename));
- }
- function calTotalAmount(){
- var saleamount = parseFloat($('#saleamount').val())|| 0;
- var taxamount = parseFloat($('#taxamount').val())|| 0;
- var amount = Math.round((saleamount+taxamount) * 100) / 100;
- $('#invoiceamount').val(amount);
- }
- //选择项目名称,列表================
- function openProjectSelect() {
- //$.dialog.setting.zIndex = getzIndex();
- var orgIds = $("#projectid").val();
- /* var orgCode = $("#orgCode").val();*/
- $.dialog({
- content: 'url:publicpageController.do?projectSelect&ids='+orgIds, zIndex: getzIndex(), title: '项目名称列表', lock: true, width: '600px', height: '350px', opacity: 0.4, button: [
- {name: '确定', callback: function (){
- var iframe = this.iframe.contentWindow;
- if(iframe.getReason().length>0){
- var strData=eval(iframe.getReason());
- for(var key in strData[0]){
- if(key=="strId"){
- $("#projectid").val(strData[0][key]);
- }else if(key=="strName"){
- $("#projectname").val(strData[0][key]);
- }
- }
- $("#projectname").focus();
- }
- }, focus: true},
- {name: '取消', callback: function (){}}
-
- ]}).zindex();
- }
- function callbackCleanProject(){
- $('#projectname').val('');
- $('#projectid').val('');
- }
- //选择客户
- function openCustomerSelect() {
- //$.dialog.setting.zIndex = getzIndex();
- var partnerIds = $("#customerid").val();
- /* var orgCode = $("#orgCode").val();*/
- $.dialog({
- content: 'url:publicpageController.do?customerSelect&ids='+partnerIds, zIndex: getzIndex(), title: '客户列表', lock: true, width: '600px', height: '350px', opacity: 0.4, button: [
- {name: '确定', callback: function (){
- var iframe = this.iframe.contentWindow;
- if(iframe.getReason().length>0){
- var strData=eval(iframe.getReason());
- for(var key in strData[0]){
- if(key=="strId"){
- $("#customerid").val(strData[0][key]);
- }else if(key=="strPartnerName"){
- $("#customername").val(strData[0][key]);
- }
- }
- $("#customername").focus();
- }
- }, focus: true},
- {name: '取消', callback: function (){}}
-
- ]}).zindex();
- }
- function callbackCleanCustomer(){
- $('#customername').val('');
- $('#customerid').val('');
- }
- function changeToCHN(event) {
- var chn = convertCurrency(event.currentTarget.value);
- //event.currentTarget.validform_lastval
- var label = document.getElementById("totalamountCHN");
- label.innerText = chn;
- }
- function selectContract(){
- var url = 'contractSaleController.do?selectlist';
- $.dialog({
- title:'选取销售合同',
- content: 'url:'+ url,
- zIndex: getzIndex(),
- lock: true,
- width: window.top.document.body.offsetWidth-200 ,
- height: window.top.document.body.offsetHeight-200,
- cache:false,
- button: [
- {
- name: '确定',
- callback: function(){
- //获得子页面getReason()方法中的值
- var iframe = this.iframe.contentWindow;
- if(iframe.getReason().length>0){
- var strData=eval(iframe.getReason());
- var cID="";
- var cname="";
- for(var key in strData[0]){
- if(key=="id"){
- $("#contractid").val(strData[0][key]);
- }
- if(key=="code"){
- $("#contractname").val(strData[0][key]);
- }
- }
- $("#contractname").focus();
- }
- },
- focus: true
- },
- {
- name: '关闭',
- callback: function(){}
- }
- ]
- });
- }
|