chenhaozhe
2025-12-05 bb40eba5dd2ec75a6fa2cd2c8eb41d769c092fca
src/views/scMould/warehouse/Sc_MouldProdMoveBillList.vue
@@ -25,36 +25,34 @@
      <el-collapse v-model="activeSeach">
        <el-collapse-item title="更多" name="1">
          <el-card class="box-card">
            <el-form-item label="组织名称" prop="HStockOrgName">
              <el-input v-model="queryParams.HStockOrgName" placeholder="请输入组织名称" @keyup.enter.native="handleQuery" />
            </el-form-item>
            <!-- <el-form-item label="组织">
              <el-select v-model="queryParams.HOrgID" placeholder="请选择">
                <el-option v-for="(item, index) in organizationList" :key="index" :label="item.Name" :value="item.ID">
                </el-option>
              </el-select>
            </el-form-item> -->
            <el-form-item label="部门信息" prop="HDept">
              <el-input v-model="queryParams.HDept" 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="HModelNumber">
              <el-input v-model="queryParams.HModelNumber" placeholder="请输入器具代码" @keyup.enter.native="handleQuery" />
            </el-form-item>
            <el-form-item label="仓库" prop="HWhName">
              <el-input v-model="queryParams.HWhName" 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>
            <div slot="header" class="clearfix"><span>过滤</span></div>
              <el-form-item label="状态" prop="HStatus">
                <el-select v-model="queryParams.HStatus" placeholder="请选择状态">
                  <el-option v-for="(item, index) in HStatusList" :key="index" :label="item.name" :value="item.value">
                  </el-option>
                </el-select>
              </el-form-item>
              <el-form-item label="调出组织">
                <el-select v-model="queryParams.HStockOutOrgID" placeholder="请选择">
                  <el-option v-for="(item, index) in organizationList" :key="index" :label="item.Name" :value="item.ID">
                  </el-option>
                </el-select>
              </el-form-item>
              <el-form-item label="部门信息" prop="HDept">
                <el-input v-model="queryParams.HDept" placeholder="请输入部门信息" @keyup.enter.native="handleQuery" />
              </el-form-item>
              <el-form-item label="器具代码" prop="HModelNumber">
                <el-input v-model="queryParams.HModelNumber" 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>
            <div slot="header" class="clearfix"><span>其他条件</span></div>
            <div>
              <el-row>
                <el-form-item label-width="0">
                  <el-row>
                    <el-col :span="7">
                    <el-col :span="2"><span>过滤</span></el-col>
                    <el-col :span="6">
                      <el-select v-model="queryParams.ColName1" placeholder="请选择" @change="riqiChange">
                        <span v-for="(item, index) in btList" :key="index">
                          <el-option :label="item.field" :value="item.field" v-if="!item.hide"></el-option>
@@ -67,7 +65,7 @@
                          :value="item.value"></el-option>
                      </el-select>
                    </el-col>
                    <el-col :span="11">
                    <el-col :span="10">
                      <el-input v-model="queryParams.ColContent1" placeholder="请输入" clearable
                        @keyup.enter.native="handleQuery" />
                    </el-col>
@@ -77,7 +75,8 @@
              <el-row>
                <el-form-item label-width="0">
                  <el-row>
                    <el-col :span="7">
                    <el-col :span="2"><span>过滤</span></el-col>
                    <el-col :span="6">
                      <el-select v-model="queryParams.ColName2" placeholder="请选择" @change="riqiChange">
                        <span v-for="(item, index) in btList" :key="index">
                          <el-option :label="item.field" :value="item.field" v-if="!item.hide"></el-option>
@@ -90,7 +89,7 @@
                          :value="item.value"></el-option>
                      </el-select>
                    </el-col>
                    <el-col :span="11">
                    <el-col :span="10">
                      <el-input v-model="queryParams.ColContent2" placeholder="请输入" clearable
                        @keyup.enter.native="handleQuery" />
                    </el-col>
@@ -99,7 +98,8 @@
              </el-row>
              <el-form-item label-width="0">
                <el-row>
                  <el-col :span="7">
                  <el-col :span="2"><span>过滤</span></el-col>
                  <el-col :span="6">
                    <el-select v-model="queryParams.ColName" placeholder="请选择" @change="riqiChange">
                      <el-option v-for="(item, index) in btList" :key="index" :label="item.field"
                        :value="item.field"></el-option>
@@ -111,7 +111,7 @@
                        :value="item.value"></el-option>
                    </el-select>
                  </el-col>
                  <el-col :span="11">
                  <el-col :span="10">
                    <el-input v-model="queryParams.ColContent" placeholder="请输入" clearable
                      @keyup.enter.native="handleQuery" />
                  </el-col>
@@ -253,7 +253,7 @@
        { label: '近一年', value: 365 },
      ],
      organizationList: JSON.parse(sessionStorage.getItem('organizationList')),//组织列表
      hPriceTypeList: ['成本价', '结算价'],
      HStatusList: [{name:'全部',value:'-1'},{name:'未审核',value:'0'},{name:'已审核',value:'1'},{name:'已关闭',value:'2'}],
      addBtnShow: false,
      dialogTitle: '',
      OperationType: null,//保存类型(新增1修改3)
@@ -271,11 +271,10 @@
      queryParams: {
        HBillNo: '',
        HInitTimeCycle: 29,
        HStockOrgName: '',
        HStockOutOrgID: sessionStorage["OrganizationID"] - 0,
        HStatus:'-1',
        HDept:'',
        HMaterNumber: '',
        HModelNumber:'',
        HWhName:'',
        HSupName:'',
        ColName1: '',
        ColName2: '',
@@ -374,20 +373,23 @@
      this.tableShow = false
      this.loading = true
      if (this.sTime && !this.sWhere) {
        this.sWhere += " and CONVERT(varchar(100),日期, 23) >= '" + this.sTime + "'"
        this.sWhere += " and CONVERT(varchar(100),日期, 23) <= '" + this.eTime + "'"
        this.sTime = moment(this.sTime).format('YYYY-MM-DD')
        this.eTime = moment(this.eTime).format('YYYY-MM-DD')
        this.sWhere += " and 日期 >= '" + this.sTime + "'";
        this.sWhere += " and 日期 <= '" + this.eTime + "'";
      }
      this.sWhere += " and HSTOCKORGID=" + this.queryParams.HStockOutOrgID;
      if (this.pageSize == 0) {
        this.pageSize = 50
      }
      // 销售出库单列表
      axios.get(this.baseURL + '/Sc_MouldProdMoveBill/page', {
      axios.get(this.baseURL + '/Sc_MouldProdMoveBillController/page', {
        params: {
          "sWhere": this.sWhere,
          "user": sessionStorage["HUserName"],
          "Organization": sessionStorage["Organization"],
          "page": this.page,
          "size": this.pageSize
          "size": this.pageSize,
          "Type": '3814',
        },
      }).then(response => {
        this.tyResList = response.data.data//总数据
@@ -583,7 +585,7 @@
    //双击行
    handleDblclick(row, column, cell, event) {
      this.OperationType = 3
      this.handleEdit()
      this.handleEdit(row)
    },
    // 多选框选中数据
    handleSelectionChange(selection) {
@@ -661,34 +663,44 @@
        }
        this.sWhere += " and " + this.queryParams.ColName2 + " " + com2;
      }
      if (this.sTime) {
        this.sTime = moment(this.sTime).format('YYYY-MM-DD')
        this.eTime = moment(this.eTime).format('YYYY-MM-DD')
        console.log(this.sTime, this.eTime)
        this.sWhere += " and CONVERT(varchar(100),日期, 23) >= '" + this.sTime + "'" + " and CONVERT(varchar(100),日期, 23) <= '" + this.eTime + "'";
      if (this.queryParams.HStatus) {
          switch (this.queryParams.HStatus) {
              case '-1':   //全部
                  this.sWhere += "";
                  break;
              case '0':    //未审核
                  this.sWhere += " and 审核人=''";
                  break;
              case '1':    //已审核
                  this.sWhere += " and 审核人<>''";
                  break;
              case '2':    //已关闭
                  this.sWhere += " and 关闭人<>''";
              default:
          }
      }
      if (this.sTime) {
          this.sTime = moment(this.sTime).format('YYYY-MM-DD')
          this.sWhere += " and 日期 >= '" + this.sTime + "'";
      }
      if (this.eTime) {
          this.eTime = moment(this.eTime).format('YYYY-MM-DD')
          this.sWhere += " and 日期 <= '" + this.eTime + "'";
      }
      if (this.queryParams.HBillNo) {
        this.sWhere += " and 单据号 like '%" + this.queryParams.HBillNo + "%'";
      }
      if (this.queryParams.HStockOrgName) {
        this.sWhere += " and 组织名称 like '%" + this.queryParams.HStockOrgName + "%'";
      }
      if (this.queryParams.HDept) {
          this.sWhere += " and 部门 like '%" + this.queryParams.HDept + "%'";
      }
      if (this.queryParams.HMaterNumber) {
          this.sWhere += " and 物料代码 like '%" + this.queryParams.HMaterNumber + "%'";
      }
      if (this.queryParams.HModelNumber) {
          this.sWhere += " and 模具代码 like '%" + this.queryParams.HModelNumber + "%'";
      }
      if (this.queryParams.HWhName) {
          this.sWhere += " and 仓库 like '%" + this.queryParams.HWhName + "%'";
          this.sWhere += " and 器具代码 like '%" + this.queryParams.HModelNumber + "%'";
      }
      if (this.queryParams.HSupName) {
          this.sWhere += " and 往来单位 like '%" + this.queryParams.HSupName + "%'";
      }
      this.clearData()
      this.getList()
    },
    /** 重置按钮操作 */
@@ -697,11 +709,10 @@
      this.queryParams = {
        HBillNo: '',
        HInitTimeCycle: 29,
        HStockOrgName: '',
        HStockOutOrgID: sessionStorage["OrganizationID"] - 0,
        HStatus:'-1',
        HDept:'',
        HMaterNumber: '',
        HModelNumber:'',
        HWhName:'',
        HSupName:'',
        ColName1: '',
        ColName2: '',
@@ -715,6 +726,7 @@
      }
      this.riqiChange()
      this.resetForm("queryForm")
      this.clearData()
      this.getList()
    },
@@ -724,6 +736,7 @@
      this.tableShow = true
      this.openEdit = false
      this.editShow = false
      this.clearData()
      this.getList()
    },
    //打开新增组件弹窗
@@ -743,7 +756,16 @@
      this.open = val
      this.editShow = false
      this.openEdit = val
      this.clearData()
      this.getList()
    },
    //清除选中数据的缓存
    clearData(){
      this.ids = []
      this.multiple = true
      this.single = true
      this.OperationType = 0
      this.copyType = 0
    },
    /** 删除按钮操作 */
    handleDelete() {
@@ -772,6 +794,7 @@
        let result = response.data
        if (result.count == 1) {
          this.$modal.msgSuccess('操作成功');
          this.clearData()
          this.getList();
        }
        else {