llj
2026-01-27 373a695602d097ebfeab50ed14dc0bbf96c691a1
src/views/basic/gytransport/cgContractTransportBillList/Cg_ContractTransportBillList.vue
@@ -1,5 +1,5 @@
<template>
  <div style="padding: 10px;">
  <div style="padding: 10px; position: relative;">
    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" label-width="78px" class="searchBox">
      <el-form-item label="开始日期" style="margin-left: 100px;">
        <el-date-picker v-model="sTime" type="date" placeholder="开始日期" style="width: 150px;">
@@ -18,9 +18,7 @@
      <el-form-item label="单据号" prop="HBillNo">
        <el-input v-model="queryParams.HBillNo" placeholder="请输入单据号" @keyup.enter.native="handleQuery" />
      </el-form-item>
      <el-form-item label="单据号" prop="HBillno2">
        <el-input v-model="queryParams.HBillno2" placeholder="请输入单据号" @keyup.enter.native="handleQuery" />
      </el-form-item>
      <el-form-item label-width="78px">
        <el-button type="primary" icon="el-icon-search" @click="handleQuery"> 搜 索</el-button>
        <el-button icon="el-icon-circle-close" @click="resetQuery">重 置</el-button>
@@ -32,24 +30,7 @@
            <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="MaterialCode">
              <el-input v-model="queryParams.MaterialCode" placeholder="请输入" @keyup.enter.native="handleQuery" />
            </el-form-item>
            <el-form-item label="物料名称" prop="MaterialName">
              <el-input v-model="queryParams.MaterialName" placeholder="请输入" @keyup.enter.native="handleQuery" />
            </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 label="源单单号" prop="HSourceBillNo">
              <el-input v-model="queryParams.HSourceBillNo" placeholder="请输入" @keyup.enter.native="handleQuery" />
            </el-form-item>
            <el-form-item label="仓库" prop="Warehouse">
              <el-input v-model="queryParams.Warehouse" placeholder="请输入" @keyup.enter.native="handleQuery" />
            </el-form-item>
            <el-form-item label="制单人" prop="Hmaker">
              <el-input v-model="queryParams.Hmaker" placeholder="请输入" @keyup.enter.native="handleQuery" />
            </el-form-item>
            <div slot="header" class="clearfix"><span>过滤</span></div>
            <div>
              <el-row>
@@ -182,19 +163,19 @@
          </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">
        <edit :OperationType=OperationType :linterid=this.rowForm.hmainid :HSouceBillType=this.rowForm.HSourceBillType
          :copyType="copyType" @editClose="editClose" v-if="editShow" />
      <el-dialog title="编辑" :visible.sync="openEdit" width="1480px" append-to-body class="xsckdBox" @close="close">
        <edit :OperationType=OperationType :linterid=this.rowForm.HInterID||this.rowForm.hmainid
          :HSouceBillType=this.rowForm.HSourceBillType :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>
@@ -204,16 +185,19 @@
<script>
import axios from 'axios'
import RowSettings from '@/views/component/rowSettings'
import Edit from '@/views/warehouse/transfer/Kf_MoveStockRequestBillEdit.vue'
import Edit from '@/views/basic/gytransport/cgContractTransportBillList/Cg_ContractTransportBillEdit.vue'
import PrintList from '@/views/component/printList'
import moment from 'moment';
export default {
  name: 'Kf_MoveStockRequestBillList',
  name: 'Cg_ContractTransportBillMainList',
  components: { RowSettings, Edit, PrintList },
  props: {
    openPage: { type: String, },
  },
  data() {
    return {
      HModName: "Kf_MoveStockRequestBillList",
      HModName: "Cg_ContractTransportBillMainList",
      activeSeach: '',
      editShow: false,
      openEdit: false,
@@ -270,15 +254,13 @@
      // 查询参数
      queryParams: {
        HBillNo: '',
        HBillno2:'',
        HBillno2: '',
        HInitTimeCycle: 29,
        HDeptID:'',
        MaterialCode:'',
        MaterialName:'',
        SpecificationModel:'',
        HSourceBillNo:'',
        Warehouse:'',
        Hmaker:'',
        HDeptID: '',
        HSourceBillNo: '',
        Warehouse: '',
        Hmaker: '',
        ColName1: '',
        ColName2: '',
        ColName: '',
@@ -317,8 +299,8 @@
  methods: {
    //重新同步
    set_ResCnz(){
      axios.get(this.baseURL + "/Cg_POOrderBill/Resynchronize", {
        params: { "HBillNo": '', "HBillType": 1243 }
      axios.get(this.$baseUrl + "/Cg_POOrderBill/Resynchronize", {
        params: { "HBillNo": '', "HBillType": 1117 }
      }).then(response => {
        let result = response.data
        if (result.count == 1) {
@@ -398,12 +380,10 @@
      if (this.pageSize == 0) {
        this.pageSize = 50
      }
      // 销售出库单列表
      axios.get(this.baseURL + '/Cg_ContractTransportBillListController/getList', {
      axios.get(this.$baseUrl + '/Cg_ContractTransportBillListController/get%EF%BB%BFList', {
        params: {
          "sWhere": this.sWhere,
          "user": sessionStorage["HUserName"],
        },
      }).then(response => {
        this.tyResList = response.data.data//总数据
@@ -421,7 +401,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;
            }
          }
          //在列表左边添加勾选框
@@ -448,20 +428,20 @@
    },
    DisPlay_HideColumn(HModName, user, option, dataOption) {
      this.totalNameList = []
      axios.get(this.baseURL + '/Xt_grdAlignment_WMES/grdAlignmentWMESList', {
      axios.get(this.$baseUrl + '/Xt_grdAlignment_WMES/grdAlignmentWMESList', {
        params: {
          "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++) {
@@ -589,6 +569,9 @@
      this.selectedRow = row; // 记录当前选中的行
      this.lastSelectedRowIndex = this.tableData.indexOf(row);
      this.$refs.tableData.toggleRowSelection(row);
      if (this.openPage) {
        this.$emit('deptEmit', row, 16)
      }
    },
    //选中行高亮样式
    rowStyle({ row, rowIndex }) {
@@ -599,7 +582,11 @@
    //双击行
    handleDblclick(row, column, cell, event) {
      this.OperationType = 3
      this.handleEdit()
      if (this.openPage) {
        this.$emit('deptEmitDb', row, 6)
      } else {
        this.handleEdit()
      }
    },
    // 多选框选中数据
    handleSelectionChange(selection) {
@@ -687,26 +674,9 @@
        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 + "%'";
      }
      if (this.queryParams.MaterialName) {
          this.sWhere += " and 物料名称 like '%" + this.queryParams.MaterialName + "%'";
      }
      if (this.queryParams.SpecificationModel) {
          this.sWhere += " and 规格型号 like '%" + this.queryParams.SpecificationModel + "%'";
      }
      if (this.queryParams.HSourceBillNo) {
          this.sWhere += " and 源单单号 like '%" + this.queryParams.HSourceBillNo + "%'";
      }
      if (this.queryParams.Warehouse) {
          this.sWhere += " and 仓库名称 like '%" + this.queryParams.Warehouse + "%'";
      }
      if (this.queryParams.Hmaker) {
          this.sWhere += " and 制单人 like '%" + this.queryParams.Hmaker + "%'";
      }
      console.log("danjuhao1", this.queryParams.HBillNo)
      this.getList()
    },
    /** 重置按钮操作 */
@@ -715,13 +685,10 @@
      this.queryParams = {
        HBillNo: '',
        HInitTimeCycle: 29,
        HDeptID:'',
        MaterialCode:'',
        MaterialName:'',
        SpecificationModel:'',
        HSourceBillNo:'',
        Warehouse:'',
        Hmaker:'',
        HDeptID: '',
        HSourceBillNo: '',
        Hmaker: '',
        ColName1: '',
        ColName2: '',
        ColName: '',
@@ -767,7 +734,7 @@
    /** 删除按钮操作 */
    handleDelete() {
      this.$modal.confirm('确认要删除吗,删除后不能恢复').then(() => {
        axios.get(this.baseURL + "/Kf_MoveStockRequestBill/DeltetKf_MoveStockRequestBill", {
        axios.get(this.$baseUrl + "/Cg_ContractTransportBillListController/Delete%EF%BB%BFBill", {
            params: { 'HInterID': this.rowForm.hmainid.toString() }
          }).then(response => {
            if (response.data.count == 1) {
@@ -785,7 +752,7 @@
    set_CheckBill(num, form) {
      var InterID = form.hmainid || form.HInterID
      //逻辑审核方法
      axios.get(this.baseURL + "/Kf_MoveStockRequestBill/AuditKf_MoveStockRequestBill", {
      axios.get(this.$baseUrl + "/Cg_ContractTransportBillEdit/AuditCg_ContractTransportBillEdit", {
        params: { "HInterID": InterID, "Type": num, "user": sessionStorage["HUserName"] }
      }).then(response => {
        let result = response.data
@@ -814,7 +781,7 @@
      } else if (this.rowForm.状态 != "已审核" && !this.defaintOperationByCompanyName()) {
        this.$modal.msgError("打印失败!原因:单据状态不为'已审核'状态!!");
      } else {
        axios.get(this.baseURL + "/Kf_SellOutBill/CheckSellOutBill_IsExist", {
        axios.get(this.$baseUrl + "/Kf_SellOutBill/CheckSellOutBill_IsExist", {
          params: { "HInterID": this.rowForm.hmainid }
        }).then(response => {
          var result = response.data
@@ -837,7 +804,7 @@
    //#region 获取公司名,根据公司进行定制化开发
    defaintOperationByCompanyName() {
      var result = false;
      axios.get(this.baseURL + '/Xt_getInfo/getCompanyName').then(response => {
      axios.get(this.$baseUrl + '/Xt_getInfo/getCompanyName').then(response => {
        var data1 = response.data
        if (data1.count == 1) {
          if (data1.data == "水务") {