mirror of
https://github.com/weizhiqiang1995/erp-pro.git
synced 2024-09-20 23:16:01 +08:00
流水修改
This commit is contained in:
parent
4c3fcd9c83
commit
400943e8c1
|
@ -189,12 +189,8 @@
|
|||
CONVERT (d.oper_time, CHAR) operTime,
|
||||
CONVERT (d.create_time, CHAR) createTime,
|
||||
FORMAT(IFNULL(CASE WHEN d.sub_type IN (1,2,3,4) THEN -abs(d.total_price) ELSE d.total_price END,0), 2) totalPrice,
|
||||
s.supplier,
|
||||
FORMAT((IFNULL(d.discount_money,0) + IFNULL(d.discount_last_money,0)) ,2) taxLastMoneyPrice
|
||||
FROM
|
||||
erp_depothead d,
|
||||
erp_supplier s
|
||||
FORMAT(d.total_price, 2) totalPrice,
|
||||
FORMAT((IFNULL(d.discount_money,0) + IFNULL(d.discount_last_money,0)) ,2) taxLastMoneyPrice,
|
||||
d.type,
|
||||
c.supplier supplierName,
|
||||
d.pay_type payType,
|
||||
d.remark,
|
||||
|
@ -205,8 +201,7 @@
|
|||
erp_depothead d
|
||||
LEFT JOIN erp_supplier c ON d.organ_id = c.id
|
||||
WHERE
|
||||
d.organ_id = s.id
|
||||
AND d.account_id = #{id}
|
||||
d.account_id = #{id}
|
||||
AND d.tenant_id = #{userId}
|
||||
AND d.delete_flag = 0
|
||||
AND d.sub_type NOT IN(10,11)
|
||||
|
|
|
@ -210,6 +210,7 @@
|
|||
IFNULL(SUM(c.oper_number * (CASE d.sub_type
|
||||
WHEN 10 THEN 0
|
||||
WHEN 11 THEN 0
|
||||
WHEN 12 THEN (CASE c.m_type WHEN 1 THEN -1 ELSE 1 END)
|
||||
ELSE CASE d.type WHEN 2 THEN 1 ELSE -1 END
|
||||
END)), 0) currentTock
|
||||
FROM
|
||||
|
@ -399,8 +400,7 @@
|
|||
AND a.depot_id = #{depotId}
|
||||
AND a.m_unit_id = #{mUnitId}
|
||||
AND a.header_id = b.id
|
||||
AND b.sub_type != '10'
|
||||
AND b.sub_type != '11'
|
||||
AND b.sub_type NOT IN(10, 11)
|
||||
GROUP BY a.m_unit_id
|
||||
</select>
|
||||
|
||||
|
@ -416,6 +416,10 @@
|
|||
b.sub_type subType,
|
||||
CONVERT(IFNULL(a.tax_last_money, a.all_price), decimal(24, 2)) taxLastMoney,
|
||||
CONVERT (b.oper_time, CHAR) operTime,
|
||||
a.m_type mType,
|
||||
CASE b.sub_type WHEN 1 THEN '采购入库' WHEN 2 THEN '销售退货' WHEN 3 THEN '零售退货' WHEN 4 THEN '其他入库' WHEN 5 THEN '销售出库'
|
||||
WHEN 6 THEN '采购退货' WHEN 7 THEN '调拨' WHEN 8 THEN '零售出库' WHEN 9 THEN '其他出库' WHEN 12 THEN '拆分单'
|
||||
WHEN 13 THEN '组装单' ELSE '' END subTypeName,
|
||||
c.supplier supplierName
|
||||
FROM
|
||||
erp_depotitem a,
|
||||
|
@ -425,8 +429,7 @@
|
|||
a.m_unit_id = #{mUnitId}
|
||||
AND a.tenant_id = #{userId}
|
||||
AND a.delete_flag = '0'
|
||||
AND b.sub_type != '10'
|
||||
AND b.sub_type != '11'
|
||||
AND b.sub_type NOT IN(10, 11)
|
||||
AND a.header_id = b.id
|
||||
AND b.delete_flag = '0'
|
||||
ORDER BY b.oper_time DESC, a.id
|
||||
|
|
|
@ -23,28 +23,6 @@ layui.config({
|
|||
limit: 8,
|
||||
cols: [[
|
||||
{ title: '序号', type: 'numbers'},
|
||||
{ field: 'number', title: '票据号', align: 'center',width: 200},
|
||||
{ field: 'subType', title: '出入库分类', align: 'left',width: 100, templet: function(d){
|
||||
if(d.subType == '1'){
|
||||
return "<span class='state-up'>采购入库</span>";
|
||||
}else if(d.subType == '2'){
|
||||
return "<span class='state-up'>销售退货</span>";
|
||||
}else if(d.subType == '3'){
|
||||
return "<span class='state-up'>零售退货</span>";
|
||||
}else if(d.subType == '4'){
|
||||
return "<span class='state-up'>其他入库</span>";
|
||||
}else if(d.subType == '5'){
|
||||
return "<span class='state-down'>销售出库</span>";
|
||||
}else if(d.subType == '6'){
|
||||
return "<span class='state-down'>采购退货</span>";
|
||||
}else if(d.subType == '7'){
|
||||
return "<span class='state-down'>调拨</span>";
|
||||
}else if(d.subType == '8'){
|
||||
return "<span class='state-down'>零售</span>";
|
||||
}else if(d.subType == '9') {
|
||||
return "<span class='state-down'>其他出库</span>";
|
||||
}
|
||||
}},
|
||||
{ field: 'defaultNumber', title: '单据编号', align: 'left', width: 250, templet: function(d){
|
||||
var str = '<a lay-event="details" class="notice-title-click">' + d.defaultNumber + '</a>';
|
||||
if(!isNull(d.linkNumber)){
|
||||
|
@ -57,27 +35,24 @@ layui.config({
|
|||
}
|
||||
return str;
|
||||
}},
|
||||
{ field: 'subTypeName', title: '单据类型', align: 'left',width: 100},
|
||||
{ field: 'type', title: '类型', align: 'center',width: 80, templet: function (d) {
|
||||
if(d.type == '1'){
|
||||
if(d.type == 1){
|
||||
return "<span class='state-down'>出库</span>";
|
||||
}else if(d.type == '2'){
|
||||
}else if(d.type == 2){
|
||||
return "<span class='state-up'>入库</span>";
|
||||
}else if(d.type == 3){
|
||||
return "<span class='state-up'>其他</span>";
|
||||
}else{
|
||||
return "<span class='state-error'>参数错误</span>";
|
||||
}
|
||||
}},
|
||||
{ field: 'supplier', title: '单位信息', align: 'left',width: 100},
|
||||
{ field: 'totalPrice', title: '合计金额', align: 'left',width: 100},
|
||||
{ field: 'taxLastMoneyPrice', title: '合计价税', align: 'left',width: 100},
|
||||
{ field: 'operTime', title: '出入库日期', align: 'center', width: 180 },
|
||||
{ field: 'subTypeName', title: '单据类型', align: 'left',width: 100},
|
||||
{ field: 'supplierName', title: '状态', align: 'left',width: 120},
|
||||
{ field: 'totalPrice', title: '合计金额', align: 'left',width: 100},
|
||||
{ field: 'supplierName', title: '供应商/客户/会员', align: 'left', width: 140 },
|
||||
{ field: 'payType', title: '付款类型', align: 'center',width: 80, templet: function (d) {
|
||||
if(d.payType == '1'){
|
||||
if(d.payType == 1){
|
||||
return "<span class='state-up'>现金</span>";
|
||||
}else if(d.payType == '2'){
|
||||
}else if(d.payType == 2){
|
||||
return "<span class='state-down'>记账</span>";
|
||||
}else{
|
||||
return "<span class='state-error'>其他</span>";
|
||||
|
|
|
@ -36,14 +36,23 @@ layui.config({
|
|||
}
|
||||
return str;
|
||||
}},
|
||||
{ field: 'subTypeName', title: '单据类型', align: 'left', width: 100},
|
||||
{ field: 'supplierName', title: '供应商', align: 'left', width: 150},
|
||||
{ field: 'unitPrice', title: '入库单价', align: 'left', width: 120 },
|
||||
{ field: 'operNumber', title: '数量', align: 'left', width: 120, templet: function(d){
|
||||
if(d.type == 2){
|
||||
return d.operNumber;
|
||||
}else{
|
||||
return "-" + d.operNumber;
|
||||
}
|
||||
if(d.subType == 12){//拆分单
|
||||
if(d.mType == 2){//普通子件
|
||||
return d.operNumber;
|
||||
}else{
|
||||
return "-" + d.operNumber;
|
||||
}
|
||||
}else{
|
||||
if(d.type == 2){
|
||||
return d.operNumber;
|
||||
}else{
|
||||
return "-" + d.operNumber;
|
||||
}
|
||||
}
|
||||
}},
|
||||
{ field: 'taxLastMoney', title: '含税合计', align: 'left', width: 120 },
|
||||
{ field: 'operTime', title: '单据日期', align: 'center', width: 140 }
|
||||
|
@ -63,11 +72,24 @@ layui.config({
|
|||
//详情
|
||||
function details(data){
|
||||
rowId = data.id;
|
||||
var url = "";
|
||||
if(data.subType == '1'){//采购入库
|
||||
if(data.subType == 1){//采购入库
|
||||
url = "../../tpl/purchaseput/purchaseputdetails.html";
|
||||
}else if(data.subType == '4'){//其他入库
|
||||
}else if(data.subType == 4){//其他入库
|
||||
url = "../../tpl/otherwarehous/otherwarehousdetails.html";
|
||||
}else if(data.subType == 2){//销售退货
|
||||
url = "../../tpl/salesreturns/salesreturnsdetails.html";
|
||||
}else if(data.subType == 6){//采购退货
|
||||
url = "../../tpl/purchasereturns/purchasereturnsdetails.html";
|
||||
}else if(data.subType == 9){//其他出库
|
||||
url = "../../tpl/otheroutlets/otheroutletsdetails.html";
|
||||
}else if(data.subType == 5){//销售出库
|
||||
url = "../../tpl/salesoutlet/salesoutletdetails.html";
|
||||
}else if(data.subType == 8){//零售出库
|
||||
url = "../../tpl/retailoutlet/retailoutletdetails.html";
|
||||
}else if(data.subType == 3){//零售退货
|
||||
url = "../../tpl/retailreturns/retailreturnsdetails.html";
|
||||
}else if(data.subType == 12){//拆分单
|
||||
url = "../../tpl/splitlist/splitlistdetails.html";
|
||||
}
|
||||
_openNewWindows({
|
||||
url: url,
|
||||
|
|
Loading…
Reference in a new issue