فهرست منبع

订单列表查询及订单主界面查询新增开票及核销状态字段。订单主界面表体新增已开票金额和已核销金额

沈静伟 4 سال پیش
والد
کامیت
175b0a9502

+ 2 - 0
src/rest/openapi/restcontroller/wechatapp/saorder/SQL/订单主界面查询_表体.sql

@@ -29,6 +29,8 @@ select t1.saorderdetailid,
        t4.fprodline,
        t4.fspecalnote,
        t4.fmaterial,
+       t1.fwriteoffamount,
+       t1.finvoiceamount,
        convert(varchar(10), t1.fneeddate, 120)                            fneeddate,
         convert(varchar(10), t1.fplandate, 120)                            fplandate,
        convert(varchar(10), t1.fbackdate, 120)                            fbackdate,

+ 3 - 0
src/rest/openapi/restcontroller/wechatapp/saorder/SQL/订单主界面查询_表头.sql

@@ -62,6 +62,8 @@ select t1.saorderid,--
        t1.fiswuliao,--是否物料订单
        t1.ffreightstatus,--运费状态
        t1.ffreightmsg,
+       t11.fwriteofstatus,
+       t11.finvoicestatus,
        convert(decimal(16, 2), t6.forderflrate * t1.fisusefl)   forderflrate--订单可使用返利金的比例
 from saorder t1
          left join saorder_totalview t2 on t1.saorderid = t2.fparentid
@@ -74,6 +76,7 @@ from saorder t1
          left join tproject t8 on t1.siteid = t8.siteid and t1.fprojectnum = t8.fprojectnum
          left join tagents t9 on t1.siteid = t9.siteid and t1.fpayagentnum = t9.fagentnum
          left join tagents t10 on t1.siteid = t10.siteid and t1.frecagentnum = t10.fagentnum
+         left join saorder_view1 t11 on t1.saorderid = t11.saorderid
 where t1.fstatus != '删除'
   and t1.fagentnum =$fagentnum$
   and t1.fsonum=$fsonum$

+ 4 - 1
src/rest/openapi/restcontroller/wechatapp/saorder/SQL/订单列表查询.sql

@@ -29,11 +29,14 @@ select t1.ftype,
        t5.fagentname      as                frecagentname,
        t5.fagentshortname as                frecagentshortname,
        t1.fprojectnum,
-       t6.fprojectname
+       t6.fprojectname,
+       t7.fwriteofstatus,
+       t7.finvoicestatus
 from saorder t1
          left join saorder_totalview t2 on t1.saorderid = t2.fparentid
          left join pp_hr t3 on t1.fsaler = t3.hrid
          left join tagents t4 on t1.fpayagentnum = t4.fagentnum and t1.siteid = t4.siteid
          left join tagents t5 on t1.frecagentnum = t5.fagentnum and t1.siteid = t5.siteid
          left join tproject t6 on t1.fprojectnum = t6.fprojectnum and t1.siteid = t6.siteid
+         left join saorder_view1 t7 on t1.saorderid = t7.saorderid
 where t1.fstatus!='ɾ³ý'and t1.fagentnum =$fagentnum$ and $where$ and t1.siteid=$siteid$

+ 4 - 1
src/rest/openapi/restcontroller/wechatapp/saorder/SQL/订单列表查询_业务员.sql

@@ -28,13 +28,16 @@ select t1.ftype,
        t1.frecagentnum,
        t4.fagentname as                              frecagentname,
        t1.fprojectnum,
-       t5.fprojectname
+       t5.fprojectname,
+       t7.fwriteofstatus,
+       t7.finvoicestatus
 from saorder t1
          left join saorder_totalview t2 on t1.saorderid = t2.fparentid
          left join tagents t3 on t1.fpayagentnum = t3.fagentnum and t1.siteid = t3.siteid
          left join tagents t4 on t1.frecagentnum = t4.fagentnum and t1.siteid = t4.siteid
          left join tproject t5 on t1.fprojectnum = t5.fprojectnum and t1.siteid = t5.siteid
          left join pp_hr t6 on t1.fsaler=t6.hrid and t1.siteid = t6.siteid
+         left join saorder_view1 t7 on t1.saorderid = t7.saorderid
 where t1.siteid =$siteid$
   and t1.fstatus not in('н¨','ɾ³ý')
   and t1.ftype!='¹¤¾ß½è³öµ¥'