陈婷婷
2025-12-03 28e9dc359572b465a3ba6297b50743492e170fbf
调拨申请单修改
2个文件已修改
181 ■■■■■ 已修改文件
src/views/warehouse/transfer/Kf_MoveStockRequestBillEdit.vue 19 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/warehouse/transfer/Kf_MoveStockRequestBillList.vue 162 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/warehouse/transfer/Kf_MoveStockRequestBillEdit.vue
@@ -338,7 +338,7 @@
      deptform: {},//弹窗选中数据
      openData: false,//数据弹窗
      dialogTitle: '',
      organizationList: [],//组织列表
      organizationList: JSON.parse(sessionStorage.getItem('organizationList')),//组织列表
      subDisabled: false,//编辑页面保存按钮是否禁用(true禁用,false可用)
      // OperationType: this.$route.query.OperationType,//保存类型(新增1修改2)
      HInterID: 0,
@@ -420,20 +420,9 @@
    };
  },
  created() {
    this.fetchData()
    this.getdata()
  },
  methods: {
    fetchData() {
      axios.get(this.baseURL + "/Web/GetOrganizations", {
      }).then(response => {
        if (response.data.count == 1) {
          this.organizationList = response.data.data;//组织列表
        }
      }).catch(error => {
        this.$modal.msgError("接口请求失败!");
      });
    },
    getdata() {
      console.log(this.copyType, this.OperationType)
      this.formShow = false
@@ -495,10 +484,13 @@
          this.warehouseShow = false
          this.openData = false
        } else if (num == 3){
          console.log(deptRow)
            this.editData[this.zbIndex].HMaterID = deptRow.HItemID
            this.editData[this.zbIndex].物料代码 = deptRow.物料代码
            this.editData[this.zbIndex].物料名称 = deptRow.物料名称
            this.editData[this.zbIndex].规格型号 = deptRow.规格型号
            this.editData[this.zbIndex].HUnitID = deptRow.HUnitID
            this.editData[this.zbIndex].计量单位 = deptRow.计量单位名称
            this.materialShow = false
            this.openData = false
        } else if (num == 4) {
@@ -668,7 +660,6 @@
        if (response.data.count == 1) {
          var result = response.data
          var data = response.data.data
          console.log(result,data)
          if (this.copyType == 1) {
            this.getHBillNo()
            let date = new Date()
@@ -690,12 +681,10 @@
                , "HSecManagerID": data[0].HSecManagerID
                , "HKeeperName": data[0].保管员
                , "HKeeperID": data[0].HKeeperID
                , "HWHID": data[0].主调入仓库ID
                , "HWHName": data[0].主调入仓库
                , "HSCWHID": data[0].主调出仓库ID
                , "HSCWHName": data[0].主调出仓库
                , "HInnerBillNo": data[0].辅助字段
                , "HRemark": data[0].表头备注
                , "HMaker": data[0].制单人
src/views/warehouse/transfer/Kf_MoveStockRequestBillList.vue
@@ -40,7 +40,7 @@
            </el-form-item>
            <el-form-item label="规格型号" prop="SpecificationModel">
              <el-input v-model="queryParams.SpecificationModel" placeholder="请输入" @keyup.enter.native="handleQuery" />
            </el-form-item>
            </el-form-item>
            <el-form-item label="源单单号" prop="HSourceBillNo">
              <el-input v-model="queryParams.HSourceBillNo" placeholder="请输入" @keyup.enter.native="handleQuery" />
            </el-form-item>
@@ -132,10 +132,10 @@
        <el-button type="primary" icon="el-icon-edit" size="mini" :disabled="single"
          @click="handleEdit(row = rowForm, OperationType = 3)">编辑</el-button>
      </el-col>
      <el-col :span="1.5">
      <!-- <el-col :span="1.5">
        <el-button type="primary" icon="el-icon-document-copy" size="mini" :disabled="single"
          @click="handleEdit(row = rowForm, OperationType = 1, copyType = 1)">复制</el-button>
      </el-col>
      </el-col> -->
      <el-col :span="1.5">
        <el-button type="primary" icon="el-icon-delete" size="mini" :disabled="single" @click="handleDelete">删除
        </el-button>
@@ -147,6 +147,22 @@
      <el-col :span="1.5">
        <el-button type="primary" icon="el-icon-edit-outline" size="mini" :disabled="single"
          @click="set_CheckBill(2, form = rowForm)">返审核</el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button type="primary" icon="el-icon-delete" size="mini" :disabled="single" @click="set_CloseBill(0)">关闭
        </el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button type="primary" icon="el-icon-delete" size="mini" :disabled="single" @click="set_CloseBill(1)">反关闭
        </el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button type="primary" icon="el-icon-delete" size="mini" :disabled="single" @click="set_DropBill(1)">作废
        </el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button type="primary" icon="el-icon-delete" size="mini" :disabled="single" @click="set_DropBill(2)">反作废
        </el-button>
      </el-col>
      <!-- <el-col :span="1.5">
        <el-button type="primary" icon="el-icon-download" size="mini" @click="handleExport">导出</el-button>
@@ -182,10 +198,10 @@
          </el-table-column>
        </template>
      </el-table>
      <pagination v-show="total > 0" :total="total" :page.sync="page" :limit.sync="pageSize" :pageSizes="pageSizes" @pagination="getList" />
      <pagination v-show="total > 0" :total="total" :page.sync="page" :limit.sync="pageSize" :pageSizes="pageSizes"
        @pagination="getList" />
      <el-dialog title="隐藏列设置" :visible.sync="openRowHide" width="816px" append-to-body>
        <RowSettings :colName="btResList" :HModName="HModName" @rowEditClose="rowSetClose"
          v-if="rowHideShow" />
        <RowSettings :colName="btResList" :HModName="HModName" @rowEditClose="rowSetClose" v-if="rowHideShow" />
      </el-dialog>
      <!-- 编辑 -->
      <el-dialog title="编辑调拨申请单" :visible.sync="openEdit" width="1480px" append-to-body class="xsckdBox" @close="close">
@@ -193,8 +209,8 @@
          :copyType="copyType" @editClose="editClose" v-if="editShow" />
      </el-dialog>
      <el-dialog title="打印模板选择" :visible.sync="openPrintList" width="800px" append-to-body>
        <PrintList :linterid=this.rowForm.hmainid :MyMsg=this.rowForm.hmainid :Type='HModName'
          :HModName='HModName' @rowEditClose="rowSetClose" v-if="printListShow" />
        <PrintList :linterid=this.rowForm.hmainid :MyMsg=this.rowForm.hmainid :Type='HModName' :HModName='HModName'
          @rowEditClose="rowSetClose" v-if="printListShow" />
        <!-- <div>111</div> -->
      </el-dialog>
    </div>
@@ -270,15 +286,15 @@
      // 查询参数
      queryParams: {
        HBillNo: '',
        HBillno2:'',
        HBillno2: '',
        HInitTimeCycle: 29,
        HDeptID:'',
        MaterialCode:'',
        MaterialName:'',
        SpecificationModel:'',
        HSourceBillNo:'',
        Warehouse:'',
        Hmaker:'',
        HDeptID: '',
        MaterialCode: '',
        MaterialName: '',
        SpecificationModel: '',
        HSourceBillNo: '',
        Warehouse: '',
        Hmaker: '',
        ColName1: '',
        ColName2: '',
        ColName: '',
@@ -316,7 +332,7 @@
  methods: {
    //重新同步
    set_ResCnz(){
    set_ResCnz() {
      axios.get(this.baseURL + "/Cg_POOrderBill/Resynchronize", {
        params: { "HBillNo": '', "HBillType": 1243 }
      }).then(response => {
@@ -422,7 +438,7 @@
            //获取不需要显示的列(H开头的列不显示)
            var patrn = new RegExp(/^h/i);
            if (patrn.test(data1.list[key].ColmCols)) {
                this.titleData[key] = data1.list[key].ColmCols;
              this.titleData[key] = data1.list[key].ColmCols;
            }
          }
          //在列表左边添加勾选框
@@ -454,15 +470,15 @@
          "HModName": HModName,
          "user": user,
        },
      }).then(res => {
      }).then(res => {
        let data1 = res.data
        if (data1.data.length != 0) {
        if (data1.data.length != 0) {
          var dataCol = [];//数据库查询出的列数据
          var newCols = [[]];//对应数据库列顺序col
          newCols[0].push(option.cols[0][0]);//放入第一个checkbox
          dataCol = data1.data[0].HGridString.split(',');
          //列设置列数与页面列数是否一致
          if (dataCol.length == option.cols[0].length - 1) {
          if (dataCol.length == option.cols[0].length - 1) {
            //遍历寻找列设置对应列按顺序插入
            for (var j = 0; j < option.cols[0].length - 1; j++) {
              for (var i = 0; i < option.cols[0].length - 1; i++) {
@@ -688,26 +704,27 @@
        this.sWhere += " and 单据号 like '%" + this.queryParams.HBillNo + "%'";
      }
      if (this.queryParams.HDeptID) {
          this.sWhere += " and 部门 like '%" + this.queryParams.HDeptID + "%'";
        this.sWhere += " and 部门 like '%" + this.queryParams.HDeptID + "%'";
      }
      if (this.queryParams.MaterialCode) {
          this.sWhere += " and 物料代码 like '%" + this.queryParams.MaterialCode + "%'";
        this.sWhere += " and 物料代码 like '%" + this.queryParams.MaterialCode + "%'";
      }
      if (this.queryParams.MaterialName) {
          this.sWhere += " and 物料名称 like '%" + this.queryParams.MaterialName + "%'";
        this.sWhere += " and 物料名称 like '%" + this.queryParams.MaterialName + "%'";
      }
      if (this.queryParams.SpecificationModel) {
          this.sWhere += " and 规格型号 like '%" + this.queryParams.SpecificationModel + "%'";
        this.sWhere += " and 规格型号 like '%" + this.queryParams.SpecificationModel + "%'";
      }
      if (this.queryParams.HSourceBillNo) {
          this.sWhere += " and 源单单号 like '%" + this.queryParams.HSourceBillNo + "%'";
        this.sWhere += " and 源单单号 like '%" + this.queryParams.HSourceBillNo + "%'";
      }
      if (this.queryParams.Warehouse) {
          this.sWhere += " and 仓库名称 like '%" + this.queryParams.Warehouse + "%'";
        this.sWhere += " and 仓库名称 like '%" + this.queryParams.Warehouse + "%'";
      }
      if (this.queryParams.Hmaker) {
          this.sWhere += " and 制单人 like '%" + this.queryParams.Hmaker + "%'";
        this.sWhere += " and 制单人 like '%" + this.queryParams.Hmaker + "%'";
      }
      this.clearData()
      this.getList()
    },
    /** 重置按钮操作 */
@@ -716,13 +733,13 @@
      this.queryParams = {
        HBillNo: '',
        HInitTimeCycle: 29,
        HDeptID:'',
        MaterialCode:'',
        MaterialName:'',
        SpecificationModel:'',
        HSourceBillNo:'',
        Warehouse:'',
        Hmaker:'',
        HDeptID: '',
        MaterialCode: '',
        MaterialName: '',
        SpecificationModel: '',
        HSourceBillNo: '',
        Warehouse: '',
        Hmaker: '',
        ColName1: '',
        ColName2: '',
        ColName: '',
@@ -734,16 +751,24 @@
        ColContent: '',
      }
      this.riqiChange()
      this.clearData()
      this.resetForm("queryForm")
      this.getList()
    },
    clearData() {
      this.single = true
      this.multiple = true
      this.OperationType = 0
      this.copyType = 0
      this.ids = []
    },
    //退出
    close() {
      // this.reset()
      this.tableShow = true
      this.openEdit = false
      this.editShow = false
      this.clearData()
      this.getList()
    },
    //打开新增组件弹窗
@@ -763,12 +788,14 @@
      this.open = val
      this.editShow = false
      this.openEdit = val
      this.clearData()
      this.getList()
    },
    /** 删除按钮操作 */
    handleDelete() {
      this.$modal.confirm('确认要删除吗,删除后不能恢复').then(() => {
        axios.get(this.baseURL + "/Kf_MoveStockRequestBill/DeltetKf_MoveStockRequestBill", {
        if (this.rowForm.状态 == "创建") {
          axios.get(this.baseURL + "/Kf_MoveStockRequestBill/DeltetKf_MoveStockRequestBill", {
            params: { 'HInterID': this.rowForm.hmainid.toString() }
          }).then(response => {
            if (response.data.count == 1) {
@@ -780,7 +807,12 @@
          }).catch(error => {
            this.$modal.msgError("接口请求失败!");
          });
        } else {
          this.$modal.msgError("此数据不是创建状态,不能删除!");
        }
      }).catch(() => { })
    },
    // 反审核/审核数据
    set_CheckBill(num, form) {
@@ -797,6 +829,44 @@
        else {
          this.$modal.msgError("错误:" + result.code + result.Message,);
        }
        this.clearData()
      }).catch(error => {
        this.$modal.msgError("接口请求失败!");
      });
    },
    set_CloseBill(num) {
      //逻辑关闭方法
      axios.get(this.baseURL + "/Kf_MoveStockRequestBill/CloseKf_MoveStockRequestBill", {
        params: { "HInterID": this.rowForm.hmainid, "Type": num, "user": sessionStorage["HUserName"] }
      }).then(response => {
        let result = response.data
        if (result.code == 1) {
          this.$modal.msgSuccess(result.Message);
          this.getList();
        }
        else {
          this.$modal.msgError("错误:" + result.code + result.Message,);
        }
        this.clearData()
      }).catch(error => {
        console.log(error)
        this.$modal.msgError("接口请求失败!");
      });
    },
    set_DropBill(num) {
      //逻辑作废方法
      axios.get(this.baseURL + "/Kf_MoveStockRequestBill/DropKf_MoveStockRequestBill", {
        params: { "HInterID": this.rowForm.hmainid.toString(), "Type": num, "user": sessionStorage["HUserName"] }
      }).then(response => {
        let result = response.data
        if (result.count == 1) {
          this.$modal.msgSuccess(result.Message);
          this.getList();
        }
        else {
          this.$modal.msgError("错误:" + result.code + result.Message,);
        }
        this.clearData()
      }).catch(error => {
        this.$modal.msgError("接口请求失败!");
      });
@@ -815,22 +885,8 @@
      } else if (this.rowForm.状态 != "已审核" && !this.defaintOperationByCompanyName()) {
        this.$modal.msgError("打印失败!原因:单据状态不为'已审核'状态!!");
      } else {
        axios.get(this.baseURL + "/Kf_SellOutBill/CheckSellOutBill_IsExist", {
          params: { "HInterID": this.rowForm.hmainid }
        }).then(response => {
          var result = response.data
          if (result.count == 1) {
            this.printListShow = true
            this.openPrintList = true
            // this.$router.push({ path:'/printList', query: { linterid: this.rowForm.hmainid,MyMsg:this.rowForm.hmainid,Type:'Kf_SellOutBillList' }})
          } else {
            this.$modal.msgError(result.code + result.Message)
          }
        }).catch(error => {
          this.$modal.msgError("接口请求失败!");
        });
   this.printListShow = true;
                this.openPrintList = true;
      }
      //  var content= ['../../BaseSet/SRM_OpenTmpList.html?linterid=' + data[0].hmainid.toString() + '&MyMsg=' + data[0].hmainid.toString() + '&Type=Kf_SellOutBillList', 'yes']
    },