chenhaozhe
2025-11-12 478e4ac9df56ddc6885c3f7c9abce189ecff7924
单据优化
15个文件已修改
881 ■■■■■ 已修改文件
src/router/index.js 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/store/modules/permission.js 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/ICMO/ScICMOBillList.vue 212 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/basic/gyEmployee/gyEmployee.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/basic/gyEmployee/gyEmployeeEdit.vue 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/basic/gyStockPlace/gyStockPlace.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/basic/gyWarehouse/gyWarehouse.vue 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/component/gyDorm/index.vue 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/component/gyDuty/index.vue 124 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/purchase/cgPoInStockBill/cgPoInStockBill.vue 55 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/purchase/cgPoOrderBill/cgPoOrderBill.vue 177 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/sell/XsSeOutStockBackBillList.vue 91 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/sell/XsSeOutStockBill.vue 114 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/sell/sellOutBill/index.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/sell/xsSeOrderBill/xsSeOrderBill.vue 57 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/router/index.js
@@ -243,7 +243,7 @@
    },
    children: [
      {
        path: "/sales/seOrder/xsSeOrderBill",
        path: "/sales/seOrder/xsSeOrderBill",
        component: () => import("@/views/sell/xsSeOrderBill/xsSeOrderBill"),
        name: "XsSeOrderBill",
        meta: { title: "销售订单维护", activeMenu: "sales/seOrder" },
@@ -255,7 +255,7 @@
  {
    path: "/purchase/poOrder/cgPoOrderBill",
    component: Layout,
    hidden: true,
    hidden: true,
    redirect: "noredirect",
    meta: {
      breadcrumb: false, // 如果设置为false,则不会在breadcrumb面包屑中显示
@@ -329,23 +329,28 @@
  },
  // 生产订单
  {
    path: "/ICMO/scIcmoBill/scIcmoBillList",
    path: "/icmo/scIcmoBill/scIcmoBillList",
    component: Layout,
    hidden: true,
    redirect: "noredirect",
    meta: {
      breadcrumb: false, // 如果设置为false,则不会在breadcrumb面包屑中显示
      activeMenu: "/ICMO/scIcmoBill/scIcmoBillList", // 当路由设置了该属性,则会高亮相对应的侧边栏。
      activeMenu: "/icmo/scIcmoBill/scIcmoBillList", // 当路由设置了该属性,则会高亮相对应的侧边栏。
    },
    children: [
      {
        path: "/ICMO/scIcmoBill/scIcmoBillList",
        path: "/icmo/scIcmoBill/scIcmoBillList",
        component: () => import("@/views/ICMO/ScICMOBillList.vue"),
        name: "XsSeOutStockBackBillList",
        meta: { title: "生产订单列表", activeMenu: "/ICMO/scIcmoBill" },
        name: "ScICMOBillList",
        meta: { title: "生产订单列表", activeMenu: "/icmo/scIcmoBill" },
      },
    ],
  },
  {
    path: "/ScICMOBillList",
    component: () => import("@/views/ICMO/ScICMOBillList.vue"),
    hidden: true,
  },
];
// 动态路由,基于用户权限动态去加载
src/store/modules/permission.js
@@ -142,7 +142,7 @@
                  },
                ],
              },
                            {
              {
                meta: {
                  icon: "build",
                  link: null,
@@ -339,7 +339,7 @@
              }
            ],
          },
                    {
          {
            alwaysShow: true,
            component: "Layout",
            meta: {
@@ -350,7 +350,7 @@
            },
            hidden: false,
            name: "ICMO",
            path: "/ICMO",
            path: "/icmo",
            redirect: "noRedirect",
            children: [
              {
src/views/ICMO/ScICMOBillList.vue
@@ -56,10 +56,129 @@
            </el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="单据号" prop="HMaterNumber">
          <el-input
            v-model="queryParams.HMaterNumber"
            placeholder="请输入物料编码"
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="业务状态" prop="HStatus">
          <el-select v-model="queryParams.HStatus" placeholder="请选择业务状态">
            <el-option
              :label="item.label"
              :value="item.value"
              :key="item.label"
              v-for="item in [
                {
                  label: '开工',
                  value: '开工',
                },
                {
                  label: '计划',
                  value: '计划',
                },
                {
                  label: '计划确认',
                  value: '计划确认',
                },
                {
                  label: '下达',
                  value: '下达',
                },
                {
                  label: '全部',
                  value: '0',
                },
                {
                  label: '完工',
                  value: '完工',
                },
                {
                  label: '结案',
                  value: '结案',
                },
              ]"
            ></el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="是否下推生成流转卡" prop="HSF" label-width="180px">
          <el-select v-model="queryParams.HSF">
            <el-option
              :label="item.label"
              :value="item.value"
              :key="item.label"
              v-for="item in [
                {
                  label: '全部',
                  value: '全部',
                },
                {
                  label: '已下推',
                  value: '已下推',
                },
                {
                  label: '未下推',
                  value: '未下推',
                },
              ]"
            ></el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="规格型号" prop="HModel">
          <el-input
            v-model="queryParams.HModel"
            placeholder="请输入规格型号"
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="项目号" prop="HProject">
          <el-select v-model="queryParams.HProject">
            <el-option
              :label="item.label"
              :value="item.value"
              :key="item.label"
              v-for="item in HProjectList"
            ></el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="生产车间" prop="HDeptName">
          <el-select v-model="queryParams.HDeptName">
            <el-option
              :label="item.label"
              :value="item.value"
              :key="item.label"
              v-for="item in HDeptNameList"
            ></el-option>
          </el-select>
        </el-form-item>
      </el-row>
      <el-collapse v-model="activeSeach">
        <el-collapse-item title="更多" name="1">
          <el-form-item label="单据类型" prop="HBillType">
            <el-input
              v-model="queryParams.HBillType"
              placeholder="请输入单据类型"
              @keyup.enter.native="handleQuery"
            />
          </el-form-item>
          <el-form-item label="唯一ID" prop="HErpID">
            <el-input
              v-model="queryParams.HErpID"
              placeholder="请输入唯一ID"
              @keyup.enter.native="handleQuery"
            />
          </el-form-item>
          <el-form-item label="单据号" prop="HBillNo2">
            <el-input
              v-model="HBillNo2"
              placeholder="请输入单据号"
              @keyup.enter.native="syncBill"
            >
              <el-button slot="append" @click="syncBill">重新同步</el-button>
            </el-input>
          </el-form-item>
          <el-card class="box-card">
            <div slot="header" class="clearfix"><span>过滤</span></div>
            <div>
@@ -363,7 +482,16 @@
          >反作废</el-button
        >
      </el-col>
      <el-col :span="1.5">
        <el-button
          type="primary"
          icon="el-icon-edit"
          size="mini"
          :disabled="single"
          @click="push_PackingInStockBill((form = rowForm))"
          >下推包装领用申请单</el-button
        >
      </el-col>
      <el-col :span="1.5">
        <el-button
          type="primary"
@@ -605,6 +733,7 @@
      btnHideShow: false,
      rowHideShow: false,
      openRowHide: false,
      HBillNo2: "",
      copyType: 0,
      comparatorList: [
        { label: "=", value: "=" },
@@ -643,6 +772,8 @@
      materialShow: false, //物料数据组件
      deptform: {}, //弹窗选中数据
      openData: false, //数据弹窗
      HProjectList: [], // 项目号列表
      HDeptNameList: [], // 车间列表
      dialogTitle: "",
      zuzhiId: "",
      organizationList: JSON.parse(sessionStorage.getItem("organizationList")), //组织列表
@@ -678,7 +809,10 @@
        ColContent1: "",
        ColContent2: "",
        ColContent: "",
        timeSpan: 29,
        HStatus: "开工",
        HSF: "全部",
        HProject: "",
        HInitTimeCycle: 29,
        HBeginDate: dayjs(new Date()).subtract(29, "d").format("YYYY-MM-DDTHH:mm:ss"),
        HEndDate: dayjs(new Date()).format("YYYY-MM-DDTHH:mm:ss"),
      },
@@ -738,10 +872,39 @@
  },
  mounted() {},
  created() {
    this.form.Organization = sessionStorage["Organization"];
    this.riqiChange();
    this.get_HProjectList();
    this.get_HDeptNameList();
    this.getList();
  },
  methods: {
    syncBill() {
      axios.get(`${this.baseURL}/Sc_ICMOBill/Sc_ICMOBillViewApi`, {
        params: {
          BillNo: this.HBillNo2,
          BillType: "3710",
        },
      });
    },
    async get_HDeptNameList() {
      let res = await axios.get(`${this.baseURL}/Sc_ICMOBill/GetHDeptList`, {
        params: { HOrgID: sessionStorage["OrganizationID"] },
      });
      console.log(res);
      this.HDeptNameList = res.data.data.map((e) => {
        return { label: e.HName, value: e.HItemID };
      });
    },
    async get_HProjectList() {
      let res = await axios.get(`${this.baseURL}/Gy_Material/Get_HProject`);
      this.HProjectList = res.data.data.map((e) => {
        return { label: e.HName, value: e.HItemID };
      });
    },
    push_PackingInStockBill(row) {
      console.log(row);
    },
    onDateScanOptionChangerHandler(e) {
      this.queryParams.timeSpan = e;
      if (e == -1) {
@@ -902,21 +1065,21 @@
      if (this.pageSize == 0) {
        this.pageSize = 50;
      }
      this.queryParams.HOrgID = sessionStorage["OrganizationID"]
      this.queryParams.HOrgID = sessionStorage["OrganizationID"];
      // this.queryParams.HOrgID = 100038
      // this.sWhere += ` and CONVERT(varchar(100),日期, 23) >= '2020-01-01' and CONVERT(varchar(100),日期, 23) <= '2030-01-01'`;
      // 收料通知单列表
      if (this.dateRange.length > 0) {
        this.sWhere +=
          " and CONVERT(varchar(100),日期, 23) >= '" + this.dateRange[0] + "'";
        this.sWhere +=
          " and CONVERT(varchar(100),日期, 23) <= '" + this.dateRange[1] + "'";
      }
      console.log()
      let Organization = this.organizationList.find(e => e.ID = this.queryParams.HOrgID)?.Name
      try{
      let Organization = this.organizationList.find(
        (e) => (e.ID = this.queryParams.HOrgID)
      )?.Name;
      console.log(Organization);
      try {
        let res = await axios.get(this.baseURL + "/Xs_SeOutStockBill/list_byPage", {
          params: {
            sWhere: this.sWhere,
@@ -1265,20 +1428,29 @@
        }
        this.sWhere += " and " + this.queryParams.ColName2 + " " + com2;
      }
      if (this.queryParams.HNumber) {
        this.sWhere += " and 生产资源代码 like '%" + this.queryParams.HNumber + "%'";
      }
      if (this.queryParams.HName) {
        this.sWhere += " and 生产资源名称 like '%" + this.queryParams.HName + "%'";
      if (this.queryParams.HBillNo) {
        this.sWhere += " and 单据号 like '%" + this.queryParams.HBillNo + "%'";
      }
      if (this.queryParams.HBeginDate && this.queryParams.HEndDate) {
        console.log(this.queryParams.HBeginDate, this.queryParams.HEndDate);
        this.sWhere += `  and CONVERT(varchar(100),日期, 23) >= '${this.queryParams.HBeginDate}' and CONVERT(varchar(100),日期, 23) <= '${this.queryParams.HEndDate}'`;
      if (this.queryParams.HMaterName) {
        this.sWhere += " and 产品代码 like '%" + this.queryParams.HMaterName + "%'";
      }
      if (this.queryParams.HOrgID) {
        this.sWhere += " and HOrgID = '" + this.queryParams.HOrgID + "'";
      if (this.queryParams.HDeptName && this.queryParams.HDeptName != 0) {
        this.sWhere += " and HDeptID = " + HDeptName;
      }
      if (this.queryParams.HStatus && this.queryParams.HStatus != 0) {
        this.sWhere += " and 状态  like '%" + this.queryParams.HStatus + "%'";
      }
      if (this.queryParams.HBillType) {
        this.sWhere += " and 单据类型 like '%" + this.queryParams.HBillType + "%'";
      }
      if (this.queryParams.HErpID) {
        sWhere += " and 唯一ID like '%" + this.queryParams.HErpID + "%'";
      }
      if (this.queryParams.HModel) {
        this.sWhere += " and 规格型号 like '%" + this.queryParams.HModel + "%'";
      }
      this.sWhere += this.addSWhereByOpenType();
      // this.sWhere += this.getOrgIDByUser();
      this.searchOpen = false;
src/views/basic/gyEmployee/gyEmployee.vue
@@ -8,7 +8,7 @@
      class="searchBox"
    >
      <el-row>
        <el-form-item label="职员代码" prop="HNumber">
        <el-form-item label="职员代码" prop="HNumber" style="padding-left: 100px">
          <el-input
            v-model="queryParams.HNumber"
            placeholder="请输入职员代码"
src/views/basic/gyEmployee/gyEmployeeEdit.vue
@@ -89,7 +89,7 @@
                  <el-button
                    slot="append"
                    icon="el-icon-search"
                    @click="openDataDialog(f5)"
                    @click="openDataDialog(5)"
                  ></el-button>
                </el-input>
              </el-form-item>
@@ -257,7 +257,7 @@
            </el-col>
            <el-col :span="8">
              <el-form-item label="宿舍" prop="HDormName">
                <el-input type="text" v-model="form.HDormName">
                <el-input type="text" disabled v-model="form.HDormName">
                  <el-button
                    slot="append"
                    icon="el-icon-search"
@@ -1628,6 +1628,7 @@
      this.classTimePrjShow = false;
      this.dutyShow = false;
      this.groupShow = false;
      this.dormShow = false
    },
    //  打开数据列表弹窗
    openDataDialog(num, row) {
src/views/basic/gyStockPlace/gyStockPlace.vue
@@ -8,7 +8,7 @@
      class="searchBox"
    >
      <el-row>
        <el-form-item label="仓位代码" prop="HNumber">
        <el-form-item label="仓位代码" prop="HNumber" style="padding-left: 100px">
          <el-input
            v-model="queryParams.HNumber"
            placeholder="请输入仓位代码"
src/views/basic/gyWarehouse/gyWarehouse.vue
@@ -1,8 +1,14 @@
<template>
  <div style="padding: 10px">
    <el-form :model="queryParams" ref="queryForm" label-width="98px" :inline="true" class="searchBox">
    <el-form
      :model="queryParams"
      ref="queryForm"
      label-width="98px"
      :inline="true"
      class="searchBox"
    >
      <el-row>
        <el-form-item label="仓库代码" prop="HNumber">
        <el-form-item label="仓库代码" prop="HNumber" style="padding-left: 100px">
          <el-input
            v-model="queryParams.HNumber"
            placeholder="请输入仓库代码"
src/views/component/gyDorm/index.vue
@@ -24,7 +24,7 @@
        sortable
      >
        <template slot-scope="{ row, column }">
          <span>{{ row[column.label] }}</span>
          <span>{{ row[column.property] }}</span>
        </template>
      </el-table-column>
    </el-table>
@@ -90,9 +90,7 @@
      form: {},
      // 表单校验
      rules: {
        客户: [{ required: true, message: "客户不能为空", trigger: "blur" }],
        日期: [{ required: true, message: "日期不能为空", trigger: "blur" }],
        hl: [{ required: true, message: "汇率不能为空", trigger: "blur" }],
      },
      tableColumns: [
src/views/component/gyDuty/index.vue
@@ -1,41 +1,62 @@
<template>
  <div style="padding: 10px">
    <el-table
      v-loading="loading"
      :data="tableData"
      ref="workTypeTable"
      max-height="550"
      @selection-change="handleSelectionChange"
      show-summary
      border
      @row-click="handleRowClick"
      :row-style="rowStyle"
      @cell-dblclick="handleDblclick"
    >
      <el-table-column type="selection" width="55" align="center" />
      <el-table-column align="center" label="sorderid" type="index" sortable width="80" />
      <el-table-column
        align="center"
        v-for="(item, index) in tableColumns"
        :key="index"
        :prop="item.ColmCols"
        :label="item.ColmCols"
        :width="flexWidth(item.ColmCols, tableData, item.ColmCols)"
        sortable
      >
        <template slot-scope="{ row, column }">
          <span>{{ row[column.label] }}</span>
        </template>
      </el-table-column>
    </el-table>
    <pagination
      v-show="total > 0"
      :total="total"
      :page.sync="page"
      :limit.sync="pageSize"
      @pagination="currentPage"
    />
  </div>
  <el-row>
    <el-col :span="4">
      <div style="padding: 10px">
        <el-tree
          :data="treeData"
          :props="treeProps"
          accordion
          @node-click="handleNodeClick"
        >
        </el-tree>
      </div>
    </el-col>
    <el-col :span="20">
      <div style="padding: 10px">
        <el-table
          v-loading="loading"
          :data="tableData"
          ref="workTypeTable"
          max-height="550"
          @selection-change="handleSelectionChange"
          show-summary
          border
          @row-click="handleRowClick"
          :row-style="rowStyle"
          @cell-dblclick="handleDblclick"
        >
          <el-table-column type="selection" width="55" align="center" />
          <el-table-column
            align="center"
            label="sorderid"
            type="index"
            sortable
            width="80"
          />
          <el-table-column
            align="center"
            v-for="(item, index) in tableColumns"
            :key="index"
            :prop="item.ColmCols"
            :label="item.ColmCols"
            :width="flexWidth(item.ColmCols, tableData, item.ColmCols)"
            sortable
          >
            <template slot-scope="{ row, column }">
              <span>{{ row[column.label] }}</span>
            </template>
          </el-table-column>
        </el-table>
        <pagination
          v-show="total > 0"
          :total="total"
          :page.sync="page"
          :limit.sync="pageSize"
          @pagination="currentPage"
        />
      </div>
    </el-col>
  </el-row>
</template>
<script>
@@ -130,9 +151,13 @@
          ColmType: "VARCHAR",
        },
      ],
      treeData: [], // 树状图数据
      treeProps: {}, // 树状图属性
    };
  },
  created() {
  async created() {
    await this.getTreeList();
    this.getList();
  },
  props: {
@@ -142,10 +167,31 @@
    },
  },
  methods: {
    // 工种
    // 树状图节点点击事件
    handleNodeClick(e) {
      console.log(e)
      this.form.userId = e.id
      this.getList()
    },
    // 获取树状图结构
    async getTreeList() {
      this.treeData = []
      let res = await axios.get(this.baseURL + "/Gy_DutyBill/Gy_DutyBillTreeList");
      console.log(res.data.data);
      this.treeData = [...JSON.parse(res.data.data)];
      Object.assign(this.treeProps, {
        children: "children",
        label: 'title',
        key: 'id'
      })
    },
    // 职务
    getList() {
      let sWhere = "";
      this.loading = true;
      if(this.form.userId){
        sWhere += " and 组织架构代码 like'" + this.form.userId + "%' ";
      }
      axios
        .get(this.baseURL + "/Gy_DutyBill/Gy_DutyBillList", {
          params: { sWhere: sWhere, user: this.user },
src/views/purchase/cgPoInStockBill/cgPoInStockBill.vue
@@ -657,9 +657,9 @@
      materialShow: false, //物料数据组件
      deptform: {}, //弹窗选中数据
      openData: false, //数据弹窗
      organizationList: JSON.parse(sessionStorage.getItem("organizationList")), //组织列表
      dialogTitle: "",
      zuzhiId: "",
      organizationList: [], //组织列表
      subDisabled: false, //编辑页面保存按钮是否禁用(true禁用,false可用)
      OperationType: null, //保存类型(新增1修改3)
      HInterID: null,
@@ -692,7 +692,7 @@
        ColContent1: "",
        ColContent2: "",
        ColContent: "",
        timeSpan: 29,
        HInitTimeCycle: 29,
        HBeginDate: dayjs(new Date()).subtract(29, "d").format("YYYY-MM-DDTHH:mm:ss"),
        HEndDate: dayjs(new Date()).format("YYYY-MM-DDTHH:mm:ss"),
      },
@@ -750,7 +750,9 @@
      uploadTotal: 0,
    };
  },
  mounted() {},
  mounted() {
    this.queryParams.HOrgID = sessionStorage["Organization"];
  },
  created() {
    this.riqiChange();
    this.getList();
@@ -880,35 +882,6 @@
    deptClickSub() {
      this.dbEmitData(this.deptform, this.dialogTypeNum);
      this.deptform = {};
    },
    fetchData() {
      //登录用户信息
      axios
        .get(
          "http://47.96.97.237/API/Web/GetUser?UserName=001&PassWord=123456&HOrgName=100038"
        )
        .then((res) => {
          let data = res.data.data[0];
          this.zuzhiId = data.HUSEORGID; //根据登录用户获取默认的组织ID
          this.queryParams.HOrgID = data.HUSEORGID;
          this.user = data.Czymc;
          axios
            .get(this.baseURL + "/Web/GetOrganizations", {})
            .then((res) => {
              if (res.data.count == 1) {
                this.organizationList = res.data.data; //组织列表
              }
              this.handleQuery();
              // this.getList();
            })
            .catch((error) => {
              this.$modal.msgError("接口请求失败!");
            });
        })
        .catch((error) => {
          this.$modal.msgError("接口请求失败!");
        });
    },
    async getList() {
      this.tableShow = false;
@@ -1271,20 +1244,14 @@
        }
        this.sWhere += " and " + this.queryParams.ColName2 + " " + com2;
      }
      if (this.queryParams.HNumber) {
        this.sWhere += " and 生产资源代码 like '%" + this.queryParams.HNumber + "%'";
      }
      if (this.queryParams.HName) {
        this.sWhere += " and 生产资源名称 like '%" + this.queryParams.HName + "%'";
      if (this.queryParams.HBillNo) {
        this.sWhere += " and 单据号 like '%" + this.queryParams.HBillNo + "%'";
      }
      if (this.queryParams.HBeginDate && this.queryParams.HEndDate) {
        console.log(this.queryParams.HBeginDate, this.queryParams.HEndDate);
        this.sWhere += `  and CONVERT(varchar(100),日期, 23) >= '${this.queryParams.HBeginDate}' and CONVERT(varchar(100),日期, 23) <= '${this.queryParams.HEndDate}'`;
      }
      if (this.queryParams.HOrgID) {
        this.sWhere += " and HOrgID = '" + this.queryParams.HOrgID + "'";
      }
      // if (this.queryParams.HOrgID) {
      //   this.sWhere += " and HOrgID = '" + this.queryParams.HOrgID + "'";
      // }
      this.sWhere += this.addSWhereByOpenType();
      // this.sWhere += this.getOrgIDByUser();
      this.searchOpen = false;
src/views/purchase/cgPoOrderBill/cgPoOrderBill.vue
@@ -68,6 +68,34 @@
      <el-collapse v-model="activeSeach">
        <el-collapse-item title="更多" name="1">
          <el-form-item label="业务员" prop="HEmpName">
            <el-input
              v-model="queryParams.HEmpName"
              placeholder="请输入业务员"
              @keyup.enter.native="handleQuery"
            />
          </el-form-item>
          <el-form-item label="物料代码" prop="HMaterNumber">
            <el-input
              v-model="queryParams.HMaterNumber"
              placeholder="请输入物料代码"
              @keyup.enter.native="handleQuery"
            />
          </el-form-item>
          <el-form-item label="物料名称" prop="HMaterName">
            <el-input
              v-model="queryParams.HMaterName"
              placeholder="请输入物料名称"
              @keyup.enter.native="handleQuery"
            />
          </el-form-item>
          <el-form-item label="供应商" prop="HSupName">
            <el-input
              v-model="queryParams.HSupName"
              placeholder="请输入供应商"
              @keyup.enter.native="handleQuery"
            />
          </el-form-item>
          <el-card class="box-card">
            <div slot="header" class="clearfix"><span>过滤</span></div>
            <div>
@@ -209,89 +237,6 @@
      </el-collapse>
    </el-form>
    <el-row>
      <el-form>
        <el-col :span="4" class="inline">
          <el-form-item label="日期间隔" class="form-item-inline">
            <el-select
              v-model="queryParams.timeSpan"
              placeholder="请选择日期间隔"
              @change="onDateScanOptionChangerHandler"
            >
              <el-option
                v-for="(item, index) in [
                  {
                    label: '任意间隔',
                    value: -1,
                  },
                  {
                    label: '今天',
                    value: 0,
                  },
                  {
                    label: '近两天',
                    value: 1,
                  },
                  {
                    label: '近三天',
                    value: 2,
                  },
                  {
                    label: '近四天',
                    value: 3,
                  },
                  {
                    label: '近五天',
                    value: 4,
                  },
                  {
                    label: '近六天',
                    value: 5,
                  },
                  {
                    label: '近七天',
                    value: 6,
                  },
                  {
                    label: '近30天',
                    value: 29,
                  },
                  {
                    label: '近半年',
                    value: 182,
                  },
                  {
                    label: '近一年',
                    value: 365,
                  },
                ]"
                :key="item.id"
                :label="item.label"
                :value="item.value"
              ></el-option>
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :span="4">
          <el-form-item label="开始日期" class="form-item-inline">
            <el-date-picker
              v-model="queryParams.HBeginDate"
              :disabled="disableDataPicker"
              value-format="yyyy-MM-DD"
            ></el-date-picker>
          </el-form-item>
        </el-col>
        <el-col :span="4">
          <el-form-item label="结束日期" class="form-item-inline">
            <el-date-picker
              v-model="queryParams.HEndDate"
              :disabled="disableDataPicker"
              value-format="yyyy-MM-DD"
            ></el-date-picker>
          </el-form-item>
        </el-col>
      </el-form>
    </el-row>
    <el-row :gutter="10" class="mb8">
      <!-- <el-col :span="1.5">
        <el-button
@@ -727,7 +672,7 @@
      openData: false, //数据弹窗
      dialogTitle: "",
      zuzhiId: "",
      organizationList: [], //组织列表
      organizationList: JSON.parse(sessionStorage.getItem("organizationList")), //组织列表
      subDisabled: false, //编辑页面保存按钮是否禁用(true禁用,false可用)
      OperationType: null, //保存类型(新增1修改3)
      HInterID: null,
@@ -760,7 +705,7 @@
        ColContent1: "",
        ColContent2: "",
        ColContent: "",
        timeSpan: 29,
        HInitTimeCycle: 29,
        HBeginDate: dayjs(new Date()).subtract(29, "d").format("YYYY-MM-DDTHH:mm:ss"),
        HEndDate: dayjs(new Date()).format("YYYY-MM-DDTHH:mm:ss"),
      },
@@ -818,7 +763,9 @@
      uploadTotal: 0,
    };
  },
  mounted() {},
  mounted() {
    this.queryParams.HOrgID = sessionStorage["Organization"];
  },
  created() {
    this.riqiChange();
    this.getList();
@@ -948,35 +895,6 @@
      this.dbEmitData(this.deptform, this.dialogTypeNum);
      this.deptform = {};
    },
    fetchData() {
      //登录用户信息
      axios
        .get(
          "http://47.96.97.237/API/Web/GetUser?UserName=001&PassWord=123456&HOrgName=100038"
        )
        .then((response) => {
          let data = response.data.data[0];
          this.zuzhiId = data.HUSEORGID; //根据登录用户获取默认的组织ID
          this.queryParams.HOrgID = data.HUSEORGID;
          this.user = data.Czymc;
          axios
            .get(this.baseURL + "/Web/GetOrganizations", {})
            .then((response) => {
              if (response.data.count == 1) {
                this.organizationList = response.data.data; //组织列表
              }
              this.handleQuery();
              // this.getList();
            })
            .catch((error) => {
              this.$modal.msgError("接口请求失败!");
            });
        })
        .catch((error) => {
          this.$modal.msgError("接口请求失败!");
        });
    },
    getList() {
      this.tableShow = false;
      this.loading = true;
@@ -989,7 +907,6 @@
        this.sWhere +=
          " and CONVERT(varchar(100),日期, 23) <= '" + this.dateRange[1] + "'";
      }
      // this.queryParams.HOrgID = 100038
      // this.sWhere += ` and CONVERT(varchar(100),日期, 23) >= '2020-01-01' and CONVERT(varchar(100),日期, 23) <= '2030-01-01'`;
      //生产资料列表
      axios
@@ -1062,8 +979,8 @@
            var result = data1.data;
            var temp = "";
            for (var i = 0; i < result.length; i++) {
              if (temp != result[i]["HItemID"]) {
                temp = result[i]["HItemID"];
              if (temp != result[i]["hmainid"]) {
                temp = result[i]["hmainid"];
              } else {
                result[i].日期 = null;
                result[i].单据号 = "";
@@ -1342,16 +1259,24 @@
        }
        this.sWhere += " and " + this.queryParams.ColName2 + " " + com2;
      }
      if (this.queryParams.HNumber) {
        this.sWhere += " and 生产资源代码 like '%" + this.queryParams.HNumber + "%'";
      }
      if (this.queryParams.HName) {
        this.sWhere += " and 生产资源名称 like '%" + this.queryParams.HName + "%'";
      if (this.queryParams.HBillNo) {
        this.sWhere += " and 单据号 like '%" + this.queryParams.HBillNo + "%'";
      }
      if (this.queryParams.HBeginDate && this.queryParams.HEndDate) {
        console.log(this.queryParams.HBeginDate, this.queryParams.HEndDate);
        this.sWhere += `  and CONVERT(varchar(100),日期, 23) >= '${this.queryParams.HBeginDate}' and CONVERT(varchar(100),日期, 23) <= '${this.queryParams.HEndDate}'`;
      if (this.queryParams.HEmpName) {
        sWhere += " and 业务员 like '%" + this.queryParams.HEmpName + "%'";
      }
      if (this.queryParams.HMaterNumber) {
        sWhere += " and 物料代码 like '%" + this.queryParams.HMaterNumber + "%'";
      }
      if (this.queryParams.HMaterName) {
        sWhere += " and 物料名称 like '%" + this.queryParams.HMaterName + "%'";
      }
      if (this.queryParams.HSupName) {
        sWhere += " and 供应商 like '%" + this.queryParams.HSupName + "%'";
      }
      // if (this.queryParams.HOrgID) {
      //   this.sWhere += " and HUSEORGID = '" + this.queryParams.HOrgID + "'";
src/views/sell/XsSeOutStockBackBillList.vue
@@ -56,10 +56,40 @@
            </el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="单据号" prop="HBillNo2">
          <el-input
            v-model="form.HBillNo2"
            placeholder="请输入同步单据号"
            @keyup.enter.native="BillSync"
          >
            <el-button slot="append" @click="BillSync">重新同步</el-button>
          </el-input>
        </el-form-item>
      </el-row>
      <el-collapse v-model="activeSeach">
        <el-collapse-item title="更多" name="1">
          <el-form-item label="客户" prop="HCusID">
            <el-input
              v-model="queryParams.HCusID"
              placeholder="请输入客户"
              @keyup.enter.native="handleQuery"
            />
          </el-form-item>
          <el-form-item label="部门" prop="HDeptID">
            <el-input
              v-model="queryParams.HDeptID"
              placeholder="请输入部门"
              @keyup.enter.native="handleQuery"
            />
          </el-form-item>
          <el-form-item label="主管" prop="HMangerID">
            <el-input
              v-model="queryParams.HMangerID"
              placeholder="请输入主管"
              @keyup.enter.native="handleQuery"
            />
          </el-form-item>
          <el-card class="box-card">
            <div slot="header" class="clearfix"><span>过滤</span></div>
            <div>
@@ -742,6 +772,11 @@
    this.getList();
  },
  methods: {
    BillSync() {
      axios.get(`${this.baseURL}/Xs_SeOutStockBackBill/Xs_SeOutStockBackBillViewApi`, {
        params: { BillNo: this.form.HBillno2, BillType: 1403 },
      });
    },
    onDateScanOptionChangerHandler(e) {
      this.queryParams.timeSpan = e;
      if (e == -1) {
@@ -829,7 +864,6 @@
      // const mmE = String(end.getMonth() + 1).padStart(2, "0"); // 月份是从0开始的
      // const ddE = String(end.getDate()).padStart(2, "0");
      this.sTime = start;
      console.log(this.queryParams.HInitTimeCycle)
      this.eTime = end;
      this.dateRange = [this.sTime, this.eTime];
    },
@@ -870,35 +904,6 @@
      this.dbEmitData(this.deptform, this.dialogTypeNum);
      this.deptform = {};
    },
    fetchData() {
      //登录用户信息
      axios
        .get(
          "http://47.96.97.237/API/Web/GetUser?UserName=001&PassWord=123456&HOrgName=100038"
        )
        .then((res) => {
          let data = res.data.data[0];
          this.zuzhiId = data.HUSEORGID; //根据登录用户获取默认的组织ID
          this.queryParams.HOrgID = data.HUSEORGID;
          this.user = data.Czymc;
          axios
            .get(this.baseURL + "/Web/GetOrganizations", {})
            .then((res) => {
              if (res.data.count == 1) {
                this.organizationList = res.data.data; //组织列表
              }
              this.handleQuery();
              // this.getList();
            })
            .catch((error) => {
              this.$modal.msgError("接口请求失败!");
            });
        })
        .catch((error) => {
          this.$modal.msgError("接口请求失败!");
        });
    },
    async getList() {
      this.tableShow = false;
      this.loading = true;
@@ -906,6 +911,9 @@
        this.pageSize = 50;
      }
      this.queryParams.HOrgID = sessionStorage["OrganizationID"] - 0;
      console.log(this.organizationList);
      let HOrgName = this.organizationList.find((e) => e.ID == this.queryParams.HOrgID)
        ?.Name;
      // this.queryParams.HOrgID = 100038
      // this.sWhere += ` and CONVERT(varchar(100),日期, 23) >= '2020-01-01' and CONVERT(varchar(100),日期, 23) <= '2030-01-01'`;
@@ -917,11 +925,13 @@
        this.sWhere +=
          " and CONVERT(varchar(100),日期, 23) <= '" + this.dateRange[1] + "'";
      }
      try {
        let res = await axios.get(this.baseURL + "/Xs_SeOutStockBill/list_byPage", {
          params: {
            sWhere: this.sWhere,
            user: this.user,
            Organization: HOrgName,
            page: this.page,
            size: this.pageSize,
          },
@@ -1265,20 +1275,19 @@
        }
        this.sWhere += " and " + this.queryParams.ColName2 + " " + com2;
      }
      if (this.queryParams.HNumber) {
        this.sWhere += " and 生产资源代码 like '%" + this.queryParams.HNumber + "%'";
      if (this.queryParams.HBillNo) {
        this.sWhere += " and 单据号 like '%" + this.queryParams.HBillNo + "%'";
      }
      if (this.queryParams.HName) {
        this.sWhere += " and 生产资源名称 like '%" + this.queryParams.HName + "%'";
      if (this.queryParams.HCusID) {
        this.sWhere += " and 客户 like '%" + this.queryParams.HCusID + "%'";
      }
      if (this.queryParams.HDeptID) {
        this.sWhere += " and 部门 like '%" + this.queryParams.HDeptID + "%'";
      }
      if (this.queryParams.HMangerID) {
        this.sWhere += " and 主管 like '%" + this.queryParams.HMangerID + "%'";
      }
      if (this.queryParams.HBeginDate && this.queryParams.HEndDate) {
        console.log(this.queryParams.HBeginDate, this.queryParams.HEndDate);
        this.sWhere += `  and CONVERT(varchar(100),日期, 23) >= '${this.queryParams.HBeginDate}' and CONVERT(varchar(100),日期, 23) <= '${this.queryParams.HEndDate}'`;
      }
      if (this.queryParams.HOrgID) {
        this.sWhere += " and HOrgID = '" + this.queryParams.HOrgID + "'";
      }
      this.sWhere += this.addSWhereByOpenType();
      // this.sWhere += this.getOrgIDByUser();
      this.searchOpen = false;
src/views/sell/XsSeOutStockBill.vue
@@ -41,6 +41,13 @@
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="项目编号" prop="HProjectNumber">
          <el-input
            v-model="queryParams.HProjectNumber"
            placeholder="请输入项目编号"
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="组织">
          <el-select
            v-model="queryParams.HOrgID"
@@ -56,10 +63,40 @@
            </el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="单据号" prop="HBillNo2">
          <el-input
            v-model="form.HBillNo2"
            placeholder="请输入同步单据号"
            @keyup.enter.native="BillSync"
          >
            <el-button slot="append" @click="BillSync">重新同步</el-button>
          </el-input>
        </el-form-item>
      </el-row>
      <el-collapse v-model="activeSeach">
        <el-collapse-item title="更多" name="1">
          <el-form-item label="客户" prop="HCusID">
            <el-input
              v-model="queryParams.HCusID"
              placeholder="请输入客户"
              @keyup.enter.native="handleQuery"
            />
          </el-form-item>
          <el-form-item label="部门" prop="HDeptID">
            <el-input
              v-model="queryParams.HDeptID"
              placeholder="请输入部门"
              @keyup.enter.native="handleQuery"
            />
          </el-form-item>
          <el-form-item label="主管" prop="HMangerID">
            <el-input
              v-model="queryParams.HMangerID"
              placeholder="请输入主管"
              @keyup.enter.native="handleQuery"
            />
          </el-form-item>
          <el-card class="box-card">
            <div slot="header" class="clearfix"><span>过滤</span></div>
            <div>
@@ -678,7 +715,7 @@
        ColContent1: "",
        ColContent2: "",
        ColContent: "",
        timeSpan: 29,
        HInitTimeCycle: 29,
        HBeginDate: dayjs(new Date()).subtract(29, "d").format("YYYY-MM-DDTHH:mm:ss"),
        HEndDate: dayjs(new Date()).format("YYYY-MM-DDTHH:mm:ss"),
      },
@@ -738,10 +775,16 @@
  },
  mounted() {},
  created() {
    this.queryParams.HOrgID = sessionStorage["Organization"];
    this.riqiChange();
    this.getList();
  },
  methods: {
    BillSync() {
      axios.get(`${this.baseURL}/Xs_SeOutStockBill/Xs_SeOutStockBillViewApi`, {
        params: { HBillNo: this.form.HBillNo2, BillType: 1402 },
      });
    },
    onDateScanOptionChangerHandler(e) {
      this.queryParams.timeSpan = e;
      if (e == -1) {
@@ -867,56 +910,28 @@
      this.dbEmitData(this.deptform, this.dialogTypeNum);
      this.deptform = {};
    },
    fetchData() {
      //登录用户信息
      axios
        .get(
          "http://47.96.97.237/API/Web/GetUser?UserName=001&PassWord=123456&HOrgName=100038"
        )
        .then((res) => {
          let data = res.data.data[0];
          this.zuzhiId = data.HUSEORGID; //根据登录用户获取默认的组织ID
          this.queryParams.HOrgID = data.HUSEORGID;
          this.user = data.Czymc;
          axios
            .get(this.baseURL + "/Web/GetOrganizations", {})
            .then((res) => {
              if (res.data.count == 1) {
                this.organizationList = res.data.data; //组织列表
              }
              this.handleQuery();
              // this.getList();
            })
            .catch((error) => {
              this.$modal.msgError("接口请求失败!");
            });
        })
        .catch((error) => {
          this.$modal.msgError("接口请求失败!");
        });
    },
    async getList() {
      this.tableShow = false;
      this.loading = true;
      if (this.pageSize == 0) {
        this.pageSize = 50;
      }
      this.queryParams.HOrgID = sessionStorage["OrganizationID"]
      // this.queryParams.HOrgID = 100038
      // this.sWhere += ` and CONVERT(varchar(100),日期, 23) >= '2020-01-01' and CONVERT(varchar(100),日期, 23) <= '2030-01-01'`;
      // 收料通知单列表
      if (this.dateRange.length > 0) {
        this.sWhere +=
          " and CONVERT(varchar(100),日期, 23) >= '" + this.dateRange[0] + "'";
        this.sWhere +=
          " and CONVERT(varchar(100),日期, 23) <= '" + this.dateRange[1] + "'";
      }
      console.log()
      let Organization = this.organizationList.find(e => e.ID = this.queryParams.HOrgID)?.Name
      try{
      let Organization = this.organizationList.find(
        (e) => (e.ID = this.queryParams.HOrgID)
      )?.Name;
      try {
        let res = await axios.get(this.baseURL + "/Xs_SeOutStockBill/list_byPage", {
          params: {
            sWhere: this.sWhere,
@@ -1265,20 +1280,31 @@
        }
        this.sWhere += " and " + this.queryParams.ColName2 + " " + com2;
      }
      if (this.queryParams.HNumber) {
        this.sWhere += " and 生产资源代码 like '%" + this.queryParams.HNumber + "%'";
      }
      if (this.queryParams.HName) {
        this.sWhere += " and 生产资源名称 like '%" + this.queryParams.HName + "%'";
      if (this.queryParams.HBillNo) {
        this.sWhere += " and 单据号 like '%" + this.queryParams.HNumber + "%'";
      }
      if (this.queryParams.HBeginDate && this.queryParams.HEndDate) {
        console.log(this.queryParams.HBeginDate, this.queryParams.HEndDate);
        this.sWhere += `  and CONVERT(varchar(100),日期, 23) >= '${this.queryParams.HBeginDate}' and CONVERT(varchar(100),日期, 23) <= '${this.queryParams.HEndDate}'`;
      if (this.queryParams.HProjectNumber) {
        this.sWhere += " and 项目编码 like '%" + this.queryParams.HProjectNumber + "%'";
      }
      if (this.queryParams.HOrgID) {
        this.sWhere += " and HOrgID = '" + this.queryParams.HOrgID + "'";
      if (this.queryParams.HCusID) {
        this.sWhere += " and 客户 like '%" + this.queryParams.HCusID + "%'";
      }
      if (this.queryParams.HDeptID) {
        this.sWhere += " and 部门 like '%" + this.queryParams.HDeptID + "%'";
      }
      if (this.queryParams.HMangerID) {
        this.sWhere += " and 主管 like '%" + this.queryParams.HMangerID + "%'";
      }
      // if (this.queryParams.HBeginDate && this.queryParams.HEndDate) {
      //   console.log(this.queryParams.HBeginDate, this.queryParams.HEndDate);
      //   this.sWhere += `  and CONVERT(varchar(100),日期, 23) >= '${this.queryParams.HBeginDate}' and CONVERT(varchar(100),日期, 23) <= '${this.queryParams.HEndDate}'`;
      // }
      // if (this.queryParams.HOrgID) {
      //   this.sWhere += " and HOrgID = '" + this.queryParams.HOrgID + "'";
      // }
      this.sWhere += this.addSWhereByOpenType();
      // this.sWhere += this.getOrgIDByUser();
      this.searchOpen = false;
src/views/sell/sellOutBill/index.vue
@@ -353,6 +353,7 @@
      this.sTime = yyyyS + '-' + mmS + '-' + ddS
      this.eTime = yyyyE + '-' + mmE + '-' + ddE
      this.dateRange = [this.sTime, this.eTime]
      console.log(dateRange)
    },
    getList() {
      this.tableShow = false
src/views/sell/xsSeOrderBill/xsSeOrderBill.vue
@@ -60,6 +60,27 @@
      <el-collapse v-model="activeSeach">
        <el-collapse-item title="更多" name="1">
          <el-form-item label="客户" prop="HCusID">
            <el-input
              v-model="queryParams.HCusID"
              placeholder="请输入客户"
              @keyup.enter.native="handleQuery"
            />
          </el-form-item>
          <el-form-item label="物料代码" prop="HMaterNumber">
            <el-input
              v-model="queryParams.HMaterNumber"
              placeholder="请输入物料代码"
              @keyup.enter.native="handleQuery"
            />
          </el-form-item>
          <el-form-item label="物料名称" prop="HMaterName">
            <el-input
              v-model="queryParams.HMaterName"
              placeholder="请输入物料名称"
              @keyup.enter.native="handleQuery"
            />
          </el-form-item>
          <el-card class="box-card">
            <div slot="header" class="clearfix"><span>过滤</span></div>
            <div>
@@ -590,7 +611,7 @@
  },
  data() {
    return {
      activeSeach: '',
      activeSeach: "",
      HModName: "Cg_POOrderBillList",
      editShow: false,
      openEdit: false,
@@ -669,7 +690,7 @@
      dateRange: [],
      // 查询参数
      queryParams: {
        HOrgID: null,
        HOrgID: sessionStorage["Organization"],
        HName: null,
        HNumber: null,
        Comparator1: "",
@@ -678,7 +699,7 @@
        ColContent1: "",
        ColContent2: "",
        ColContent: "",
        timeSpan: 29,
        HInitTimeCycle: 29,
        HBeginDate: dayjs(new Date()).subtract(29, "d").format("YYYY-MM-DDTHH:mm:ss"),
        HEndDate: dayjs(new Date()).format("YYYY-MM-DDTHH:mm:ss"),
      },
@@ -736,7 +757,9 @@
      uploadTotal: 0,
    };
  },
  mounted() {},
  mounted() {
    this.queryParams.HOrgID = sessionStorage["Organization"];
  },
  created() {
    this.riqiChange();
    this.getList();
@@ -1259,20 +1282,26 @@
        }
        this.sWhere += " and " + this.queryParams.ColName2 + " " + com2;
      }
      if (this.queryParams.HNumber) {
        this.sWhere += " and 生产资源代码 like '%" + this.queryParams.HNumber + "%'";
      }
      if (this.queryParams.HName) {
        this.sWhere += " and 生产资源名称 like '%" + this.queryParams.HName + "%'";
      if (this.queryParams.HBillNo) {
        this.sWhere += " and 单据号 like '%" + this.queryParams.HBillNo + "%'";
      }
      if (this.queryParams.HBeginDate && this.queryParams.HEndDate) {
        console.log(this.queryParams.HBeginDate, this.queryParams.HEndDate);
        this.sWhere += `  and CONVERT(varchar(100),日期, 23) >= '${this.queryParams.HBeginDate}' and CONVERT(varchar(100),日期, 23) <= '${this.queryParams.HEndDate}'`;
      if (this.queryParams.HCusID) {
        this.sWhere += " and 客户 like ''%" + this.queryParams.HCusID + "%''";
      }
      if (this.queryParams.HOrgID) {
        this.sWhere += " and HOrgID = '" + this.queryParams.HOrgID + "'";
      if (this.queryParams.HMaterNumber) {
        this.sWhere += " and 物料代码 like ''%" + this.queryParams.HMaterNumber + "%''";
      }
      if (this.queryParams.HMaterName) {
        this.sWhere += " and 物料名称 like ''%" + this.queryParams.HMaterName + "%''";
      }
      // if (this.queryParams.HBeginDate && this.queryParams.HEndDate) {
      //   this.sWhere += `  and CONVERT(varchar(100),日期, 23) >= '${this.queryParams.HBeginDate}' and CONVERT(varchar(100),日期, 23) <= '${this.queryParams.HEndDate}'`;
      // }
      // if (this.queryParams.HOrgID) {
      //   this.sWhere += " and HOrgID = '" + this.queryParams.HOrgID + "'";
      // }
      this.sWhere += this.addSWhereByOpenType();
      // this.sWhere += this.getOrgIDByUser();
      this.searchOpen = false;