开有多个门店的小老板如何记账和给员工发工资?

软件使用场景:

假如你是一个小老板,跟多个合伙人管理多家门店,门店之间的员工存在相互支援工作,A门店的员工可能到B门店做业绩,每天就需要统计每个门店收了多少现金,收了多少网银,需要统计每个门店和每个员工的业绩,多个门店数据也需要汇总。月底了需要给员工发工资,需要看到每家门店的经营情况,甚至需要记录员工的迟到、早退、罚款等情况。门店和员工稍微一多,传统的办法统计业绩和计算工资就会很痛苦,需要专门的财务人员,无形之前又增加了人力成本。许多老板就想到了开发一款记账的软件,很多网络公司的记账软件又不能满足个性化需求,有的价格甚至很高,难以接受,高昂的服务器费用更是难以承受,在这种情况下,非常适合夜鹰教程网的记账结算软件商业版。

先来一波界面截图:

记账的时候多个人的账单一次性的post到后端,实现当天数据批量保存。

记账核心前端代码:

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="TbAddBill.aspx.cs" Inherits="TbAddBill" %>

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>

</title>
  <script src="My97DatePicker/WdatePicker.js" type="text/javascript" charset="utf-8"></script>   
 <link rel="stylesheet" type="text/css" href="css/comm.css" />
 <style type="text/css">

     .formtable {
        width:calc(100% - 6px);
        margin:0 auto;
        border-collapse:collapse;
        margin-top:10px;
     }

    .formtable td {
         height:30px;
         line-height:30px;
         border:solid 1px #333;
         padding:0 5px;
    }

     .formtable td.lable {
        text-align:right;
     }

      .path {
        border:solid 1px #333;
        height:35px;
        line-height:35px;
        margin:2px;
        padding-left:2px;
        position:relative;
    }
     .lable {
        width:235px;
        text-align:right;
     }

     .formtable b{
         color:red;
     }

     table tr:hover{
         background-color:lightgreen!important;
     }
     
  </style>
</head>
<body data-rolename="<%=BasePage.GetCurrentRoleName()%>">
    <form id="form1" runat="server">
          <div class="path">当前位置:记账管理 >> 新增记账 </div>
        <table class="formtable">
             <tr><td class="lable">门店</td><td><asp:DropDownList ID="ddl_Departments" runat="server"></asp:DropDownList></td></tr>        
             <tr><td class="lable">记账时间</td><td><asp:TextBox ID="tbBillTime" runat="server" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd'})"  CssClass="Wdate"></asp:TextBox></td></tr>
        </table>
         <table class="formtable" id="personbox">
             
            <tr><td class="lable">姓名</td><td>个人业绩</td></tr>
            <asp:Repeater ID="Repeater1" runat="server">
                <ItemTemplate>
                    <tr class="depart-<%#Eval("DepartId")%>" style="background-color:<%#Eval("BgColor")%>;"><td class="lable">[<%#Eval("DepartName")%>]<%#Eval("TrueName")%></td><td><input type="text" value="" data-userid="<%#Eval("ID")%>" data-truename="<%#Eval("TrueName")%>" class="pp1"  name="personmoney"/> &nbsp;<input type="checkbox"  value="1" name="iswork"/>&nbsp;是否上班 </td></tr>
                </ItemTemplate>
            </asp:Repeater>
             
           
        </table>
     <table class="formtable">
       
        <tr><td class="lable">网银收入</td><td><asp:TextBox ID="tbIncomeBank" runat="server" style="width:200px;" CssClass="initem"></asp:TextBox>  <b>*必填</b></td></tr>        
        <tr><td class="lable">调货收入网银</td><td><asp:TextBox ID="tbGoodsBank" runat="server" style="width:200px;" CssClass="initem" ></asp:TextBox> <b>*必填</b></td></tr>
        <tr><td class="lable">调货收入现金</td><td><asp:TextBox ID="tbGoodsCash" runat="server" style="width:200px;" CssClass="initem"></asp:TextBox> <b>*必填</b></td></tr>
        <tr><td class="lable">支出网银</td><td><asp:TextBox ID="tbOutBank" runat="server" style="width:200px;" CssClass="initem"></asp:TextBox> <b>*必填</b> 支出原因<asp:TextBox ID="tbReasonBank" runat="server" style="width:300px;"></asp:TextBox></td></tr>
        <tr><td class="lable">支出现金</td><td><asp:TextBox ID="tbOutCash" runat="server" style="width:200px;" CssClass="initem"></asp:TextBox> <b>*必填</b> 支出原因<asp:TextBox ID="tbReasonCash" runat="server" style="width:300px;"></asp:TextBox></td></tr>        
        <tr><td class="lable">纯毛利</td><td><asp:TextBox ID="tbCunProfits" runat="server" style="width:200px;" Enabled="false"></asp:TextBox> 备注:个人业绩总和</td></tr>
        <tr><td class="lable">成本</td><td><asp:TextBox ID="tbcengben" runat="server" style="width:200px;" CssClass="initem" ></asp:TextBox> <b>*必填</b></td></tr>
        <tr><td class="lable">总业绩</td><td><asp:TextBox ID="tbAllYeJi" runat="server" style="width:200px;" Enabled="false"></asp:TextBox> 备注:个人业绩+成本</td></tr>
        <tr><td class="lable">应收现金</td><td><asp:TextBox ID="tbYingShou" runat="server" style="width:200px;" Enabled="false" ></asp:TextBox> 备注:总业绩-网银收入 </td></tr>
        <tr><td class="lable">差额销账</td><td><asp:TextBox ID="tbCha" runat="server" style="width:200px;" Enabled="false"></asp:TextBox> 备注:实收现金 - 应收现金  <b style="color:red; display:none; ">(如果差额不为0,将显示为红色,差额大于<span id="maxchavaluebox"><asp:Literal ID="ltr_max" runat="server"></asp:Literal> </span>,将不能保存)</b></td></tr>         
        <tr><td class="lable">实收现金</td><td><asp:TextBox ID="tbShiJi" runat="server" style="width:200px;" CssClass="initem"></asp:TextBox> <b>*必填</b></td></tr>         
        <tr><td class="lable">实际总业绩</td><td><asp:TextBox ID="tbShiJiAll" runat="server" style="width:200px;" Enabled="false" ></asp:TextBox> 备注:总业绩 - 差额  </td></tr>        
        <tr><td>&nbsp;</td><td><input type="button" value="保存" id="btnsave" /></td></tr>
    </table>
       
       <script src="js/jquery-1.11.0.js"></script>
       <script>
           //计算总业绩
           function zongyeji() {
               var sum = 0;//个人业绩+成本
               var personsum = 0;//个人业绩总和
               $("#personbox input[name='iswork']:checked").each(function (index,item) {
                   var v = $(item).parent().find("input[name='personmoney']").val();
                   console.log(v);
                   if (v==""||isNaN(v)) {
                       v = 0;
                   }
                   v = parseFloat(v);
                   sum += v;     
                   personsum += v;
               });
               $("#tbCunProfits").val(personsum);
               var chengben = $("#tbcengben").val();
               console.log("成本"+chengben);
               if (chengben==""||isNaN(chengben)) {
                   chengben = 0;
                   console.log("===============");
               }
               chengben = parseFloat(chengben);               
               sum += chengben;
               console.log(sum);
               $("#tbAllYeJi").val(sum);
           }

           //计算应收现金
           function yingshouxianjin() {
               var allv = $("#tbAllYeJi").val();
               var IncomeBankv = $("#tbIncomeBank").val();
               allv = parseFloat(allv);
               IncomeBankv = parseFloat(IncomeBankv);
               var yingshou = allv - IncomeBankv;
               $("#tbYingShou").val(yingshou);
           }
           //计算差额销账
           function chaxiaozhang() {

               var shijiv = $("#tbShiJi").val();
               var YingShouv = $("#tbYingShou").val();
               shijiv = parseFloat(shijiv);
               YingShouv = parseFloat(YingShouv);
               var cha = shijiv - YingShouv;
               console.log(cha);
               $("#tbCha").val(cha);
               shijizongyeji();
           }

           //计算实际总业绩
           function shijizongyeji() {

               var zongyeji = $("#tbAllYeJi").val();
               var Cha = $("#tbCha").val();
               zongyeji = parseFloat(zongyeji);
               Cha = parseFloat(Cha);
               var shijizongyeji = zongyeji + Cha;
               console.log(shijizongyeji);
               $("#tbShiJiAll").val(shijizongyeji);
           }

           $("#personbox input[name='personmoney']").on("input",function () {
               zongyeji();
               yingshouxianjin();
               chaxiaozhang();
           });
           $("input[name='iswork']").click(function () {
               zongyeji();
               yingshouxianjin();
               chaxiaozhang();
           });

           $(".initem").on("input", function () {
               zongyeji();
               yingshouxianjin();
               chaxiaozhang();
           });

           $("#tbIncomeBank").on("input", function () {
               zongyeji();
               yingshouxianjin();
               chaxiaozhang();
           });

           $("#tbShiJi").on("input", function () {
               zongyeji();
               yingshouxianjin();
               chaxiaozhang();
           });

           $("#btnsave").click(function (e) {
               var flag = true;//验证是否通过
               var issavemsg = true;
               var msg = "";

               //验证时间必须填写
               var createtime = $("#tbBillTime").val();
               if (!(createtime.length > 0)) {
                   msg = "请选择记账时间";
                   $("#tbBillTime").focus();
                   flag = false;
                   issavemsg = false;
               }
               //验证个人业绩
               $(".pp1").each(function (index, item) {
                   if ($(item).parent().find("input[name='iswork']").is(":checked")&& (!($(item).val().length > 0))) {
                       flag = false;
                       if (issavemsg) {
                           msg = "请填写" + $(item).parent().parent().find("td.lable").text()+"的业绩";
                           $(item).focus();
                           issavemsg = false;
                       }
                   }
               });


               //验证填写了业绩,必须勾选上班。
               $("input[name='personmoney']").each(function (indexp, itemp) {
                   if (issavemsg) {
                       if ($(itemp).val().length > 0) {
                           if (!($(itemp).siblings("input[name='iswork']").is(":checked"))) {
                               flag = false;
                               msg = "填写了业绩就必须勾选上班选项!";
                               $(itemp).focus();
                               issavemsg = false;
                           }
                       }
                   }
               });

               //验证必填项目
               $(".initem").each(function (index2,item2) {
                   if(!($(item2).val().length > 0))
                   {
                       flag = false;
                       if (issavemsg) {
                           msg = "请填写" + $(item2).parent().parent().find("td.lable").text();
                           $(item2).focus();
                           issavemsg = false;
                       }
                   }
               });

              



               var chavalue = $("#tbCha").val();
               var maxchavalue = $("#maxchavaluebox").text();
               //chavalue = parseFloat(Math.abs(chavalue));
               chavalue = parseFloat(chavalue);
               maxchavalue = parseFloat(maxchavalue);
               if (chavalue<maxchavalue) {
                   if (!($("body").attr("data-rolename") == "超级管理员" || $("body").attr("data-rolename") == "一级店长")) {
                       flag = false;
                       //msg = "差额销账中的差额不能大于" + maxchavalue;
                       msg = "差额销账项不能保存,请联系一级店长!";
                   }                  
               }

               if (!flag) {
                   alert(msg);
                   return false;
               }
               else {
                   savedata();
               }

           });


           function savedata() {
               var PersonArrayObjs = []; 
               $("#personbox input[name='iswork']:checked").each(function (index, item) {
                   var v = $(item).parent().find("input[name='personmoney']").val();
                   var truename = $(item).parent().find("input[name='personmoney']").attr("data-truename");
                   var userid = $(item).parent().find("input[name='personmoney']").attr("data-userid");
                   if (v == "" || isNaN(v)) {
                       v = 0;
                   }
                   v = parseFloat(v);
                   var itemobj = {};  
                   itemobj["YeJi"] = v;
                   itemobj["userid"] = userid;    
                   itemobj["truename"] = truename;    
                   PersonArrayObjs.push(itemobj);
                   console.log(itemobj);
               });


               var billobj = {};
               billobj["DepartId"] = $("#ddl_Departments").val();
               billobj["BillTime"] = $("#tbBillTime").val();
               billobj["IncomeBank"] = $("#tbIncomeBank").val();
               billobj["GoodsBank"] = $("#tbGoodsBank").val();
               billobj["GoodsCash"] = $("#tbGoodsCash").val();
               billobj["OutBank"] = $("#tbOutBank").val();
               billobj["OutCash"] = $("#tbOutCash").val();
               billobj["CunProfits"] = $("#tbCunProfits").val();
               billobj["BillChengBen"] = $("#tbcengben").val();
               billobj["AllYeJi"] = $("#tbAllYeJi").val();
               billobj["IncomeCashYingShou"] = $("#tbYingShou").val();
               billobj["BillCha"] = $("#tbCha").val();
               billobj["IncomeCashShiji"] = $("#tbShiJi").val();
               billobj["OutAll"] = $("#tbShiJiAll").val();
               billobj["ReasonBank"] = $("#tbReasonBank").val();
               billobj["ReasonCash"] = $("#tbReasonCash").val();
               console.log(billobj);

               //店长保存每天的数据
               $.ajax({
                   type: "post",
                   url: "Ajax.ashx",
                   data: { w: "savedatabydianzhang", jsondatastr: JSON.stringify(PersonArrayObjs), billobjstr: JSON.stringify(billobj)},
                   timeout:10000,
                   dataType: "json",
                   async:true,//默认设置为true,所有请求均为异步请求
                   cache: false,//默认为true(当dataType为script时,默认为false)设置为false将不会从浏览器缓存中加载请求信息。
                   success: function (data) {
                       console.log(data);
                       alert(data.result);
                       if (data.isrepeat == "0") {
                           location.reload();
                       }
                      
                   }
               });

              

           }

       </script>

    </form>
</body>
</html>

记账核心代码部分:源码

using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Data.SqlClient;
using System.Text;
namespace YYCMS
{
    /// <summary>  
    ///TbBillRecords类 
    /// </summary>  
    public class TbBillRecords
    {
        public TbBillRecords()
        { }
        #region Model 
        public int ID { set; get; }
        public string CreateTime { set; get; }
        public string BillTime { set; get; }
        public int? UserId { set; get; }
        public string UserName { set; get; }
        public int? DepartsId { set; get; }
        public decimal? IncomeBank { set; get; }
        public decimal? GoodsBank { set; get; }
        public decimal? GoodsCash { set; get; }
        public decimal? OutBank { set; get; }
        public decimal? OutCash { set; get; }
        public decimal? CunProfits { set; get; }
        public decimal? BillChengBen { set; get; }
        public decimal? AllYeJi { set; get; }
        public decimal? IncomeCashYingShou { set; get; }
        public decimal? BillCha { set; get; }
        public decimal? IncomeCashShiji { set; get; }
        public decimal? OutAll { set; get; }
        public string ReasonBank { set; get; }
        public string ReasonCash { set; get; }
        #endregion Model 
        #region 方法成员 
        /// <summary> 
        /// 增加一条数据 
        /// </summary> 
        public int Add()
        {
            StringBuilder strSql = new StringBuilder();
            strSql.Append("insert into TbBillRecords(");
            strSql.Append("CreateTime,BillTime,UserId,UserName,DepartsId,IncomeBank,GoodsBank,GoodsCash,OutBank,OutCash,CunProfits,BillChengBen,AllYeJi,IncomeCashYingShou,BillCha,IncomeCashShiji,OutAll,ReasonBank,ReasonCash");
            strSql.Append(") values (");
            strSql.Append("@CreateTime,@BillTime,@UserId,@UserName,@DepartsId,@IncomeBank,@GoodsBank,@GoodsCash,@OutBank,@OutCash,@CunProfits,@BillChengBen,@AllYeJi,@IncomeCashYingShou,@BillCha,@IncomeCashShiji,@OutAll,@ReasonBank,@ReasonCash");
            strSql.Append(")");
            strSql.Append(";select @@IDENTITY");
            SqlParameter[] parameters = {
      new SqlParameter("@CreateTime",SqlDbType.NVarChar,50),
      new SqlParameter("@BillTime",SqlDbType.NVarChar,50),
      new SqlParameter("@UserId",SqlDbType.Int),
      new SqlParameter("@UserName",SqlDbType.NVarChar,50),
      new SqlParameter("@DepartsId",SqlDbType.Int),
      new SqlParameter("@IncomeBank",SqlDbType.Decimal),
      new SqlParameter("@GoodsBank",SqlDbType.Decimal),
      new SqlParameter("@GoodsCash",SqlDbType.Decimal),
      new SqlParameter("@OutBank",SqlDbType.Decimal),
      new SqlParameter("@OutCash",SqlDbType.Decimal),
      new SqlParameter("@CunProfits",SqlDbType.Decimal),
      new SqlParameter("@BillChengBen",SqlDbType.Decimal),
      new SqlParameter("@AllYeJi",SqlDbType.Decimal),
      new SqlParameter("@IncomeCashYingShou",SqlDbType.Decimal),
      new SqlParameter("@BillCha",SqlDbType.Decimal),
      new SqlParameter("@IncomeCashShiji",SqlDbType.Decimal),
      new SqlParameter("@OutAll",SqlDbType.Decimal),
      new SqlParameter("@ReasonBank",SqlDbType.NVarChar,50),
      new SqlParameter("@ReasonCash",SqlDbType.NVarChar,50)
     };
            parameters[0].Value = CreateTime;
            parameters[1].Value = BillTime;
            parameters[2].Value = UserId;
            parameters[3].Value = UserName;
            parameters[4].Value = DepartsId;
            parameters[5].Value = IncomeBank;
            parameters[6].Value = GoodsBank;
            parameters[7].Value = GoodsCash;
            parameters[8].Value = OutBank;
            parameters[9].Value = OutCash;
            parameters[10].Value = CunProfits;
            parameters[11].Value = BillChengBen;
            parameters[12].Value = AllYeJi;
            parameters[13].Value = IncomeCashYingShou;
            parameters[14].Value = BillCha;
            parameters[15].Value = IncomeCashShiji;
            parameters[16].Value = OutAll;
            parameters[17].Value = ReasonBank;
            parameters[18].Value = ReasonCash;
            object obj = DbHelperSQL.GetSingle(strSql.ToString(), parameters);
            if (obj == null)
            {
                return 1;
            }
            else
            {
                return Convert.ToInt32(obj);
            }
        }

        /// <summary> 
        /// 修改一条数据
        /// </summary> 
        public int UpdateYeJi()
        {
            StringBuilder strSql = new StringBuilder();
            strSql.Append("update TbBillRecords set ");          
            strSql.Append("IncomeBank=@IncomeBank,");
            strSql.Append("GoodsBank=@GoodsBank,");
            strSql.Append("GoodsCash=@GoodsCash,");
            strSql.Append("OutBank=@OutBank,");
            strSql.Append("OutCash=@OutCash,");
            strSql.Append("CunProfits=@CunProfits,");
            strSql.Append("BillChengBen=@BillChengBen,");
            strSql.Append("AllYeJi=@AllYeJi,");
            strSql.Append("IncomeCashYingShou=@IncomeCashYingShou,");
            strSql.Append("BillCha=@BillCha,");
            strSql.Append("IncomeCashShiji=@IncomeCashShiji,");
            strSql.Append("BillTime=@BillTime,");
            strSql.Append("OutAll=@OutAll,");
            strSql.Append("ReasonBank=@ReasonBank,");
            strSql.Append("ReasonCash=@ReasonCash");

            strSql.Append(" where ID=@Id");
            SqlParameter[] parameters = {
              new SqlParameter("@ID",SqlDbType.Int),
              new SqlParameter("@IncomeBank",SqlDbType.Decimal),
              new SqlParameter("@GoodsBank",SqlDbType.Decimal),
              new SqlParameter("@GoodsCash",SqlDbType.Decimal),
              new SqlParameter("@OutBank",SqlDbType.Decimal),
              new SqlParameter("@OutCash",SqlDbType.Decimal),
              new SqlParameter("@CunProfits",SqlDbType.Decimal),
              new SqlParameter("@BillChengBen",SqlDbType.Decimal),
              new SqlParameter("@AllYeJi",SqlDbType.Decimal),
              new SqlParameter("@IncomeCashYingShou",SqlDbType.Decimal),
              new SqlParameter("@BillCha",SqlDbType.Decimal),
              new SqlParameter("@IncomeCashShiji",SqlDbType.Decimal),
              new SqlParameter("@BillTime",SqlDbType.NVarChar),
              new SqlParameter("@OutAll",SqlDbType.Decimal),
              new SqlParameter("@ReasonBank",SqlDbType.NVarChar,50),
              new SqlParameter("@ReasonCash",SqlDbType.NVarChar,50)
            };
            parameters[0].Value = ID;
            parameters[1].Value = IncomeBank;
            parameters[2].Value = GoodsBank;
            parameters[3].Value = GoodsCash;
            parameters[4].Value = OutBank;
            parameters[5].Value = OutCash;
            parameters[6].Value = CunProfits;
            parameters[7].Value = BillChengBen;
            parameters[8].Value = AllYeJi;
            parameters[9].Value = IncomeCashYingShou;
            parameters[10].Value = BillCha;
            parameters[11].Value = IncomeCashShiji;
            parameters[12].Value = BillTime;
            parameters[13].Value = OutAll;
            parameters[14].Value = ReasonBank;
            parameters[15].Value = ReasonCash;
            return DbHelperSQL.ExecuteSql(strSql.ToString(), parameters);
        }


        /// <summary> 
        /// 修改一条数据
        /// </summary> 
        public int Update()
        {
            StringBuilder strSql = new StringBuilder();
            strSql.Append("update TbBillRecords set ");
            strSql.Append("CreateTime=@CreateTime,");
            strSql.Append("BillTime=@BillTime,");
            strSql.Append("UserId=@UserId,");
            strSql.Append("UserName=@UserName,");
            strSql.Append("DepartsId=@DepartsId,");
            strSql.Append("IncomeBank=@IncomeBank,");
            strSql.Append("GoodsBank=@GoodsBank,");
            strSql.Append("GoodsCash=@GoodsCash,");
            strSql.Append("OutBank=@OutBank,");
            strSql.Append("OutCash=@OutCash,");
            strSql.Append("CunProfits=@CunProfits,");
            strSql.Append("BillChengBen=@BillChengBen,");
            strSql.Append("AllYeJi=@AllYeJi,");
            strSql.Append("IncomeCashYingShou=@IncomeCashYingShou,");
            strSql.Append("BillCha=@BillCha,");
            strSql.Append("IncomeCashShiji=@IncomeCashShiji,");
            strSql.Append("OutAll=@OutAll,");
            strSql.Append("ReasonBank=@ReasonBank,");
            strSql.Append("ReasonCash=@ReasonCash");
            strSql.Append(" where ID=@Id");
            SqlParameter[] parameters = {
      new SqlParameter("@ID",SqlDbType.Int),
      new SqlParameter("@CreateTime",SqlDbType.NVarChar,50),
      new SqlParameter("@BillTime",SqlDbType.NVarChar,50),
      new SqlParameter("@UserId",SqlDbType.Int),
      new SqlParameter("@UserName",SqlDbType.NVarChar,50),
      new SqlParameter("@DepartsId",SqlDbType.Int),
      new SqlParameter("@IncomeBank",SqlDbType.Decimal),
      new SqlParameter("@GoodsBank",SqlDbType.Decimal),
      new SqlParameter("@GoodsCash",SqlDbType.Decimal),
      new SqlParameter("@OutBank",SqlDbType.Decimal),
      new SqlParameter("@OutCash",SqlDbType.Decimal),
      new SqlParameter("@CunProfits",SqlDbType.Decimal),
      new SqlParameter("@BillChengBen",SqlDbType.Decimal),
      new SqlParameter("@AllYeJi",SqlDbType.Decimal),
      new SqlParameter("@IncomeCashYingShou",SqlDbType.Decimal),
      new SqlParameter("@BillCha",SqlDbType.Decimal),
      new SqlParameter("@IncomeCashShiji",SqlDbType.Decimal),
      new SqlParameter("@OutAll",SqlDbType.Decimal),
      new SqlParameter("@ReasonBank",SqlDbType.NVarChar,50),
      new SqlParameter("@ReasonCash",SqlDbType.NVarChar,50)
      };
            parameters[0].Value = ID;
            parameters[1].Value = CreateTime;
            parameters[2].Value = BillTime;
            parameters[3].Value = UserId;
            parameters[4].Value = UserName;
            parameters[5].Value = DepartsId;
            parameters[6].Value = IncomeBank;
            parameters[7].Value = GoodsBank;
            parameters[8].Value = GoodsCash;
            parameters[9].Value = OutBank;
            parameters[10].Value = OutCash;
            parameters[11].Value = CunProfits;
            parameters[12].Value = BillChengBen;
            parameters[13].Value = AllYeJi;
            parameters[14].Value = IncomeCashYingShou;
            parameters[15].Value = BillCha;
            parameters[16].Value = IncomeCashShiji;
            parameters[17].Value = OutAll;
            parameters[18].Value = ReasonBank;
            parameters[19].Value = ReasonCash;
            return DbHelperSQL.ExecuteSql(strSql.ToString(), parameters);
        }
        /// <summary> 
        /// 删除一条数据 
        /// </summary> 
        public int delete()
        {
            StringBuilder strSql = new StringBuilder();
            strSql.Append("delete from TbBillRecords ");
            strSql.Append(" where ID=@ID ");
            SqlParameter[] parameters = {
new SqlParameter("@ID", SqlDbType.Int,4)
};
            parameters[0].Value = ID;
            return DbHelperSQL.ExecuteSql(strSql.ToString(), parameters);
        }
        /// <summary> 
        /// 获取数据列表 
        /// </summary> 
        public DataSet GetList(string strWhere)
        {
            StringBuilder strSql = new StringBuilder();
            strSql.Append(" select * from TbBillRecords ");
            if (strWhere.Trim() != "")
            {
                strSql.Append(" where " + strWhere);
            }
            return DbHelperSQL.Query(strSql.ToString());
        }
        /// <summary> 
        /// 分页查询 
        /// </summary> 
        /// <param name="PageIndex">当前第几页</param> 
        /// <param name="PageSize">每页条数</param> 
        /// <param name="strWhere">条件</param> 
        /// <param name="Recordcount">记录总条数</param> 
        /// <returns></returns> 
        public DataSet Pager(int PageIndex, int PageSize, string strWhere, out int Recordcount)
        {
            string strSql = string.Empty;
            if (string.IsNullOrEmpty(strWhere))
            {
                strWhere = " 1=1 ";
            }
            strSql = string.Format("select top {0} * from V_TbBillRecords where id not in (select top {1} id from V_TbBillRecords where {2} order by BillTime desc) and ({2}) order by BillTime desc", PageSize, PageSize * (PageIndex - 1), strWhere);
            DataSet ds = DbHelperSQL.Query(strSql);
            string strSql2 = string.Format("select id from V_TbBillRecords where {0}", strWhere);
            DataSet dsCount = DbHelperSQL.Query(strSql2);
            try
            {
                Recordcount = dsCount.Tables[0].Rows.Count;
            }
            catch
            {
                Recordcount = 0;
            }
            return DbHelperSQL.Query(strSql.ToString());
        }
        /// <summary> 
        /// 批量删除数据 
        /// </summary> 
        public int BatchDelete(string _idstr)
        {
            StringBuilder strSql = new StringBuilder();
            strSql.Append(" delete from TbBillRecords ");
            strSql.Append(string.Format(" where ID in ({0}) ", _idstr));
            return DbHelperSQL.ExecuteSql(strSql.ToString());
        }
        #endregion 方法成员
    }
}

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
软件简介小老板财务管理专门针对个体经营者、家庭经营者和小型企业等设计开发。适用于经营者没有独立的财务管理岗位,又不方便使用复杂的财务软件管理账务。此软件可以非常方便的为您记录日常账务,分析您的经营历程。 软件特点: 三套帐本 --- 现金账\银行存款账、往来账、库存账 穿透查询 --- 所有报表查询都可以实现穿透查询,方便查看详细明细 毛利率法 --- 成本核算采用毛利率法,只管金额不管数量 适合行业: 管理库存行业 --- 服装、百货、食品、五金、日化、建筑材料、音像、电脑、手机、耗材等实物营销行业。 无库存行业 --- 服务行业(酒店、餐饮、律师、诊所)、软件等虚拟行业 有库存+服务业 --- 管理部分库存,并以服务行业增值为主的其他行业。 主要功能: 日历提醒 ---日历提醒功能 支出预算 ---预算控制您的支出。 营业收入 ---记录您的每笔营业收入,不必再为以前零乱的账目头痛。 费用支出 ---记录经营过程中的成本投入和费用支出,使您对经营利润心中有数。 应收应付 ---记录和提醒您的应收应付款,有效的管理您的资金。 库存进销 ---根据收支自动登记库存采购、销售及毛利。 欠款管理 ---管理您的借出借入款,和还款情况。 分析报表 ---全面的报表分析功能,可以从各个角度分析您的经营历史。为您分析出珍贵的数据。
针对这家水果便利店的三个销售渠道,需要增加以下内容: 1. 有赞小程序销售额、订单量分析:分析有赞小程序的销售额、订单量占比,比较与前几个月的数据,评估有赞小程序的销售情况和变化趋势,提出有赞小程序的改进和优化建议。 2. 美团外卖销售额、订单量分析:分析美团外卖的销售额、订单量占比,比较与前几个月的数据,评估美团外卖的销售情况和变化趋势,提出美团外卖的改进和优化建议。 3. 线下门店销售额、客流量分析:分析线下门店的销售额、客流量占比,比较与前几个月的数据,评估线下门店的销售情况和变化趋势,提出线下门店的改进和优化建议。 4. 渠道成本分析:分析三个销售渠道的成本情况,包括平台服务费、推广费用等,比较成本的变化趋势及其对毛利润的影响,提出降低成本和提高效率的建议。 5. 渠道效果分析:分析三个销售渠道的销售效果,包括渠道的转化率、客户复购率、订单满意度等,评估渠道的效果和优化空间,提出改进和优化建议。 6. 渠道协同分析:分析三个销售渠道之间的协同效应,包括不同渠道间的销售转化、客户跨渠道购买等情况,评估协同效应和优化空间,提出协同营销的策略和建议。 7. 结论和建议:对三个销售渠道进行综合分析和评估,提出关键问题和建议,为水果便利店的多渠道经营提供指导。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

夜鹰教程网

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值