开封利通水务前端

seeInvoice.js 2.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. /**
  2. * 开票信息详情
  3. * */
  4. $(function() {
  5. // //获取所属行业//获取税务类别//获取客户信誉等级
  6. // $.when(helper.getDropList.getlistDropByDic($('#customer_subtrade'), 'KHSSHY'),
  7. // helper.getDropList.getlistDropByDic($('#customer_taxCategory'), 'SWLB'),
  8. // helper.getDropList.getlistDropByDic($('#customer_layer'), 'KHLayer'))
  9. // .done(function() {
  10. var edit_id = helper.request.queryString("edit_id");
  11. if (edit_id) {
  12. getCustomer(edit_id);
  13. }
  14. // });
  15. });
  16. //获取详情
  17. function getCustomer(ids) {
  18. $.getJSON(huayi.config.callcenter_url + "WoBill/GetBill", {
  19. billid: ids, //id
  20. token: $.cookie("token")
  21. }, function(data) {
  22. if (data.state.toLowerCase() == "success") {
  23. var dealnames = data.data.dealname;
  24. var res = data.data.dModel;
  25. if (res) {
  26. $('#F_BillType').text(res.F_BillType);// string 发票类型
  27. $('#F_CusName').text(res.F_CusName);// string 客户名称
  28. $('#F_TaxIDNum').text(res.F_TaxIDNum);// string 纳税人识别号
  29. $('#F_Address').text(res.F_Address);// string 地址
  30. // $('#F_Phone').text(helper.filter.cutTel(res.F_Phone));// string 电话
  31. $('#F_Phone').text(res.F_Phone);// string 电话
  32. $('#F_Bank').text(res.F_Bank);// string 开户行
  33. $('#F_BankAccount').text(res.F_BankAccount);// string 开户行账号
  34. $('#F_ProName').text(res.F_ProName);// string 项目名称
  35. $('#F_Models').text(res.F_Models);// string 型号
  36. $('#F_Unit').text(res.F_Unit);// string 单位
  37. $('#F_Amount').text(res.F_Amount);// string 数量
  38. $('#F_UnitPrice').text(res.F_UnitPrice);// string 单价
  39. $('#F_SumPrice').text(res.F_SumPrice);// string 金额
  40. $('#F_TaxRate').text(res.F_TaxRate);// string 税率
  41. $('#F_TaxAmount').text(res.F_TaxAmount);// string 税额
  42. $('#F_State').text(formatterState(res.F_State));// F_State 是否开票 0否1是
  43. $('#F_BillingMethod').text(res.F_BillingMethod);// string 开票方式:快递/自取
  44. $('#F_BillingTime').text(res.F_BillingTime);//string 开票时间
  45. $('#F_remark').html(helper.filter.content(res.F_Remark));// string 备注
  46. if (dealnames){
  47. $('#dealname').text(dealnames + '(' + res.F_DealBy + ')');//处理人
  48. }
  49. if(res.F_DealOn){
  50. $('#F_DealOn').text(res.F_DealOn);//处理时间
  51. }
  52. if (res.F_DealROn){
  53. $('#F_DealROn').text(res.F_DealROn);//接收时间
  54. }
  55. if (res.F_DealContent){
  56. $('#F_DealContent').html(helper.filter.content(res.F_DealContent));//处理备注信息
  57. }
  58. }
  59. }
  60. });
  61. }
  62. //格式化是否开票
  63. function formatterState(val) {
  64. var str = '否';
  65. if (val === 1) {
  66. str = '是';
  67. }
  68. return str;
  69. }