wangyi
2026-01-19 7fb0a8f0ab16c149484bf043754cd10cfa94de2f
src/views/sell/Kf_ICStockBillMainList/Kf_ICStockBillMainList.vue
@@ -9,29 +9,38 @@
      class="searchBox"
    >
      <el-row>
        <el-form-item label="日期" style="margin-left: 100px">
          <el-date-picker
            v-model="dateRange"
            value-format="yyyy-MM-dd"
            type="daterange"
            range-separator="-"
            start-placeholder="开始日期"
            end-placeholder="结束日期"
          ></el-date-picker>
        </el-form-item>
        <el-form-item label="日期间隔">
          <el-select
            v-model="queryParams.HInitTimeCycle"
            placeholder="请选择"
            @change="riqiChange"
              <el-form-item label="开始日期" style="margin-left: 100px">
        <el-date-picker
          v-model="sTime"
          type="date"
          placeholder="开始日期"
          style="width: 150px"
        >
        </el-date-picker>
      </el-form-item>
      <el-form-item label="结束日期">
        <el-date-picker
          v-model="eTime"
          type="date"
          placeholder="结束日期"
          style="width: 150px"
        >
        </el-date-picker>
      </el-form-item>
      <el-form-item label="日期间隔">
        <el-select
          v-model="queryParams.HInitTimeCycle"
          placeholder="请选择"
          @change="riqiChange"
          style="width: 150px"
        >
          <el-option
            v-for="(item, index) in rqsgList"
            :key="index"
            :label="item.label"
            :value="item.value"
          >
            <el-option
              v-for="(item, index) in rqsgList"
              :key="index"
              :label="item.label"
              :value="item.value"
            >
            </el-option>
          </el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="单据号" prop="HBillNo">
@@ -405,6 +414,9 @@
       <el-col :span="1.5">
        <el-button type="primary" icon="el-icon-printer" size="mini" :disabled="single" @click="get_BarCodeDetail">条码明细</el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button type="primary" icon="el-icon-printer" size="mini" :disabled="single" @click="get_PackStockDetail">包装容器出入库明细</el-button>
      </el-col>
    </el-row>
    <div class="tableBox" v-loading="loading">
      <el-table
@@ -587,6 +599,8 @@
      </el-dialog>
      <!-- 条码明细 -->
      <BarCodeDetail :visible.sync="barCodeDetailShow" ref="barcodeDetail"/>
      <!-- 包装容器出入库明细 -->
      <PackStockDetail :visible.sync="packStockDetailShow" ref="packStockDetail"/>
    </div>
  </div>
</template>
@@ -597,10 +611,11 @@
import Edit from '@/views/sell/Kf_ICStockBillMainList/Kf_ICStockBillMainListEdit'
import BarCodeDetail from '@/views/component/BarCodeDetail'               //条码明细组件
import dayjs from "dayjs";                                                //日期处理库
import PackStockDetail from '@/views/component/PackStockDetail'               //包装明细组件
export default {
  name: "GySource",
  components: { RowSettings,Edit,BarCodeDetail},
  components: { RowSettings,Edit,BarCodeDetail,PackStockDetail},
  props: {
    openPage: { type: String },
  },
@@ -617,6 +632,7 @@
      printListShow: false,
      HClassTag: "ForFilteringSchemes",                     //过滤条件的class类
      barCodeDetailShow: false,                             //条码明细组件容器显示标记
      packStockDetailShow:false,                            //包装容器出入库明细容器显示标记
      HBillType: "1202",
      openBtnHide: false,
      btnHideShow: false,
@@ -696,8 +712,8 @@
        ColContent2: "",
        ColContent: "",
        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"),
        HBeginDate: dayjs(new Date()).subtract(29, "d").format("YYYY-MM-DD"),
        HEndDate: dayjs(new Date()).format("YYYY-MM-DD"),
      },
      // 显示搜索条件
      showSearch: true,
@@ -771,7 +787,7 @@
      }, 300);
    },
    BillSync() {
      axios.get(`${this.baseURL}/Kf_ICStockBillMain/GetCStockBillList`, {
      axios.get(`${this.$baseUrl}/Kf_ICStockBillMain/GetCStockBillList`, {
        params: { BillNo: this.form.HBillno2, BillType: 1403 },
      });
    },
@@ -815,7 +831,7 @@
    defaintOperationByCompanyName() {
      var result = false;
      axios
        .get(this.baseURL + "/Xt_getInfo/getCompanyName")
        .get(this.$baseUrl + "/Xt_getInfo/getCompanyName")
        .then((res) => {
          var data1 = res.data;
          if (data1.count == 1) {
@@ -854,15 +870,11 @@
      const start = dayjs(new Date())
        .subtract(this.queryParams.HInitTimeCycle, "d")
        .format("YYYY-MM-DD");
      // start.setTime(start.getTime() - 3600 * 1000 * 24 * this.queryParams.HInitTimeCycle);
      // const yyyyS = start.getFullYear();
      // const mmS = String(start.getMonth() + 1).padStart(2, "0"); // 月份是从0开始的
      // const ddS = String(start.getDate()).padStart(2, "0");
      // const yyyyE = end.getFullYear();
      // const mmE = String(end.getMonth() + 1).padStart(2, "0"); // 月份是从0开始的
      // const ddE = String(end.getDate()).padStart(2, "0");
      this.sTime = start;
      this.eTime = end;
      this.queryParams.HBeginDate = start;
      this.queryParams.HEndDate = end;
      this.dateRange = [this.sTime, this.eTime];
    },
    organizationChange(val) {
@@ -917,15 +929,15 @@
      // this.sWhere += ` and CONVERT(varchar(100),日期, 23) >= '2020-01-01' and CONVERT(varchar(100),日期, 23) <= '2030-01-01'`;
      // 收料通知单列表
      if (this.dateRange.length > 0) {
      if (this.queryParams.HBeginDate && this.queryParams.HEndDate) {
        this.sWhere +=
          " and CONVERT(varchar(100),日期, 23) >= '" + this.dateRange[0] + "'";
          " and CONVERT(varchar(100),日期, 23) >= '" + this.queryParams.HBeginDate + "'";
        this.sWhere +=
          " and CONVERT(varchar(100),日期, 23) <= '" + this.dateRange[1] + "'";
          " and CONVERT(varchar(100),日期, 23) <= '" + this.queryParams.HEndDate + "'";
      }
      try {
        let res = await axios.get(this.baseURL + "/Kf_ICStockBackBill/GetKf_ICStockBackBillList", {
        let res = await axios.get(this.$baseUrl + "/Kf_ICStockBackBill/GetKf_ICStockBackBillList", {
          params: {
            sWhere: this.sWhere,
            user: this.user,
@@ -1026,7 +1038,7 @@
    DisPlay_HideColumn(HModName, user, option, dataOption) {
      this.totalNameList = [];
      axios
        .get(this.baseURL + "/Xt_grdAlignment_WMES/grdAlignmentWMESList", {
        .get(this.$baseUrl + "/Xt_grdAlignment_WMES/grdAlignmentWMESList", {
          params: {
            HModName: HModName,
            user: user,
@@ -1177,7 +1189,7 @@
    },
    //选中行高亮样式
    rowStyle({ row, rowIndex }) {
      if (this.ids.includes(row.HItemID)) {
      if (this.ids.includes(row.hmainid)) {
        return { background: "#ecf5ff" };
      }
    },
@@ -1189,7 +1201,7 @@
    // 多选框选中数据
    handleSelectionChange(selection) {
      // this.rowForm = {}
      this.ids = selection.map((item) => item.HItemID);
      this.ids = selection.map((item) => item.hmainid);
      this.single = selection.length != 1;
      this.multiple = !selection.length;
      if (!this.single) {
@@ -1306,7 +1318,7 @@
    getOrgIDByUser() {
      var res = "";
      axios
        .get(this.baseURL + "/Xt_User/getOrgIDListByUser", {
        .get(this.$baseUrl + "/Xt_User/getOrgIDListByUser", {
          params: {
            HModName: this.HModName,
            user: this.user,
@@ -1413,7 +1425,7 @@
        .then(() => {
          if (!this.rowForm.审核人) {
            axios
              .get(this.baseURL + "Kf_ICStockBackBill/DropKf_ICStockBackBill", {
              .get(this.$baseUrl + "Kf_ICStockBackBill/DropKf_ICStockBackBill", {
                params: {
                  HInterID: form.hmainid.toString(),
                  HsupId: form.hsubid,
@@ -1445,7 +1457,7 @@
      var InterID = form.HItemID || form.HInterID || form.hmainid;
      //逻辑审核方法
      axios
        .get(this.baseURL + "/Kf_ICStockBackBill/AuditKf_ICStockBackBill", {
        .get(this.$baseUrl + "/Kf_ICStockBackBill/AuditKf_ICStockBackBill", {
          params: { HInterID: InterID, IsAudit: num, CurUserName: this.user },
        })
        .then((res) => {
@@ -1466,7 +1478,7 @@
      let HInterID = form.HItemID || form.HInterID || form.hmainid;
      try {
        let res = await axios.get(
          this.baseURL+"/Kf_ICStockBackBill/CloseKf_ICStockBackBill",
          this.$baseUrl+"/Kf_ICStockBackBill/CloseKf_ICStockBackBill",
          {
            params: {
              HInterID: HInterID, IsAudit: num, CurUserName: this.user
@@ -1491,7 +1503,7 @@
      let HInterID = form.HItemID || form.HInterID || form.hmainid;
      try {
        let res = await axios.get(
          this.baseURL+"Kf_ICStockBackBill/DeleteKf_ICStockBackBill",
          this.$baseUrl+"Kf_ICStockBackBill/DeleteKf_ICStockBackBill",
          {
            params: {
              HInterID: HInterID, IsAudit: num, CurUserName: this.user
@@ -1515,7 +1527,7 @@
      var InterID = form.HItemID || form.HInterID;
      //逻辑审核方法
      axios
        .get(this.baseURL + "/Gy_Employee/StopGy_Employee", {
        .get(this.$baseUrl + "/Gy_Employee/StopGy_Employee", {
          params: { HInterID: InterID, IsAudit: num, CurUserName: this.user },
        })
        .then((res) => {
@@ -1570,6 +1582,18 @@
        );
      }
    },
      //#region 包装容器出入库明细
    get_PackStockDetail() {
      // if (this.selectedRow.length !== 1) {
      //   this.$message.warning('请选择一行数据查看条码明细!')
      //   return
      // }
      this.packStockDetailShow = true
      this.$nextTick(() => {
        this.$refs.packStockDetail.open(this.rowForm)
      })
      },
    //#endregion
    // 提交上传文件
    submitFileForm() {
      this.$refs.upload.submit();
@@ -1585,7 +1609,7 @@
      var sMainSub = sSubStr + "&和" + this.user;
      axios({
        method: "post",
        url: this.baseURL + "/Gy_Source/Gy_Source_btnSave",
        url: this.$baseUrl + "/Gy_Source/Gy_Source_btnSave",
        data: {
          sMainSub: sMainSub,
        },