llj
2025-12-04 9423b2691810c0355f3919ebe981b31cfe5b762a
Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-VUEUI
9个文件已修改
1423 ■■■■■ 已修改文件
src/views/scMould/warehouse/Sc_MouldInRequestBillList.vue 51 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/scMould/warehouse/Sc_MouldMoveStockRequestBillEdit.vue 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/scMould/warehouse/Sc_MouldMoveStockRequestBillList.vue 157 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/scMould/warehouse/Sc_MouldOutRequestBillEdit.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/scMould/warehouse/Sc_MouldOutRequestBillList.vue 53 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/scMould/warehouse/Sc_MouldProdBackBillList.vue 111 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/scMould/warehouse/Sc_MouldProdMoveBillEdit.vue 766 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/scMould/warehouse/Sc_MouldProdMoveBillList.vue 143 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/scMould/warehouse/Sc_MouldProdOutBillList.vue 115 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/scMould/warehouse/Sc_MouldInRequestBillList.vue
@@ -46,12 +46,13 @@
            <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 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>
@@ -64,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>
@@ -74,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>
@@ -87,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>
@@ -96,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>
@@ -108,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>
@@ -393,7 +396,8 @@
          "sWhere": this.sWhere,
          "user": sessionStorage["HUserName"],
          "page": this.page,
          "size": this.pageSize
          "size": this.pageSize,
          "Type": '3851'
        },
      }).then(response => {
        this.tyResList = response.data.data//总数据
@@ -589,7 +593,7 @@
    //双击行
    handleDblclick(row, column, cell, event) {
      this.OperationType = 2
      this.handleEdit()
      this.handleEdit(row)
    },
    // 多选框选中数据
    handleSelectionChange(selection) {
@@ -667,6 +671,22 @@
        }
        this.sWhere += " and " + this.queryParams.ColName2 + " " + com2;
      }
      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 + "'";
@@ -687,6 +707,7 @@
      if (this.queryParams.HSupName) {
          this.sWhere += " and 往来单位 like '%" + this.queryParams.HSupName + "%'";
      }
      this.clearData()
      this.getList()
    },
    /** 重置按钮操作 */
@@ -712,6 +733,7 @@
      }
      this.riqiChange()
      this.resetForm("queryForm")
      this.clearData()
      this.getList()
    },
@@ -721,6 +743,7 @@
      this.tableShow = true
      this.openEdit = false
      this.editShow = false
      this.clearData()
      this.getList()
    },
    //打开新增组件弹窗
@@ -740,7 +763,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() {
@@ -769,6 +801,7 @@
        let result = response.data
        if (result.count == 1) {
          this.$modal.msgSuccess('操作成功');
          this.clearData()
          this.getList();
        }
        else {
src/views/scMould/warehouse/Sc_MouldMoveStockRequestBillEdit.vue
@@ -3,7 +3,7 @@
    <div style=" margin-bottom: 10px; border-bottom: 1px solid #f6f6f6;">
      <!-- <el-button type="primary" @click="handleAdd(OperationType = 1)" v-if="addBtnShow">新增</el-button> -->
      <el-button type="primary" @click="submitForm" :disabled="subDisabled">保 存</el-button>
      <!-- <el-button type="primary" @click="set_CheckBill(1, form)">审 核</el-button> -->
      <el-button type="primary" @click="set_CheckBill(1, form)">审 核</el-button>
      <el-button type="primary" @click="close">退 出</el-button>
      <!-- <el-button @click="cancel">取 消</el-button> -->
    </div>
@@ -334,7 +334,7 @@
  name: 'Sc_MouldMoveStockRequestBillEdit',
  components: { Dept, Warehouse, RowSettings, GyEmployee,GySupplier,GyCustomer,GyMould,GyStockPlace },
  props: {
    OperationType: { type: Number, },
    OperationType: { type: Number, },//操作类型(1新增、2编辑、3复制、4下推)
    linterid: { type: Number, },
    HSouceBillType: { type: String, },
    propsData: { type: String, },
@@ -862,6 +862,12 @@
          , "HSCSPID": "0"
          , "HSCSPNumber": ""
          , "HSCSPName": ""
          , "HSourceInterID": "0"
          , "HSourceEntryID": "0"
          , "HSourceBillType": ""
          , "HSourceBillNo": ""
          , "HRelationQty": "0"
          , "HRelationMoney": "0"
          , "HRemark": ""
          , "HPropertyID": "0"
          , "HSecUnitID": "0"
@@ -882,11 +888,11 @@
          , "HICMOInterID": "0"
          , "HICMOEntryID": "0"
          , "HICMOBillNo": ""
          , "HSTOCKORGID": "0"
          , "HOWNERID": "0"
          , "HSTOCKORGID": this.form.HStockOutOrgID
          , "HOWNERID": this.form.HStockOutOrgID
          , "HOWNERTYPEID": ""
          , "HSTOCKORGINID": "0"
          , "HOWNERINID": "0"
          , "HSTOCKORGINID": this.form.HStockInOrgID
          , "HOWNERINID": this.form.HStockInOrgID
          , "HOWNERTYPEINID": ""
          , "HBASEUNITID": "0"
          , "HEXTAUXUNITID": "0"
@@ -1021,12 +1027,13 @@
    set_CheckBill(num, form) {
      var InterID = form.hmainid || form.HInterID
      //逻辑审核方法
      axios.get(this.baseURL + "/Sc_MouldProdMoveBill/AuditMouldProdMoveBill", {
        params: { "HInterID": InterID, "flag": num, "user": sessionStorage["HUserName"] }
      axios.get(this.baseURL + "/Sc_MouldMoveStockRequestBillController/GetSc_MouldMoveStockRequestBill_Check_Json", {
        params: { "HInterID": InterID, "Type": num, "HMaker": sessionStorage["HUserName"] }
      }).then(response => {
        let result = response.data
        if (result.code == 1) {
          this.$modal.msgSuccess('操作成功');
          this.close()
        }
        else {
          this.$modal.msgError("错误:" + result.code + result.Message,);
src/views/scMould/warehouse/Sc_MouldMoveStockRequestBillList.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;">
@@ -46,12 +46,13 @@
            <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 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>
@@ -64,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>
@@ -74,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>
@@ -87,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>
@@ -96,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>
@@ -108,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>
@@ -131,6 +134,10 @@
      <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 :span="1.5">
        <el-button type="primary" icon="el-icon-tickets" size="mini" :disabled="single"
          @click="handleMove(row = rowForm, OperationType = 4)">下推(器具直接调拨单)</el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button type="primary" icon="el-icon-delete" size="mini" :disabled="single" @click="handleDelete">删除
@@ -169,9 +176,7 @@
              <div :style="item.style">
                <span v-if="column.property.includes('日期')">{{ parseTime(row[column.property], '{y}-{m}-{d}') }}</span>
                <el-button type="text" @click="handleEdit(row, OperationType = 2)"
                  v-else-if="column.property == '单据号'">{{
                    row.单据号
                  }}</el-button>
                  v-else-if="column.property == '单据号'">{{row.单据号}}</el-button>
                <span v-else>{{ row[column.label] }}</span>
              </div>
            </template>
@@ -188,6 +193,11 @@
        <edit :OperationType=OperationType :linterid=this.rowForm.hmainid :HSouceBillType=this.rowForm.HSourceBillType
          :copyType="copyType" @editClose="editClose" v-if="editShow" />
      </el-dialog>
      <!-- 下推 -->
      <el-dialog title="下推器具直接调拨单" :visible.sync="openMove" width="1480px" append-to-body class="xsckdBox" @close="close">
        <move :OperationType='4' :propsData='moveData' :HSouceBillType=BillType
         @editClose="moveClose" v-if="moveShow" />
      </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" />
@@ -201,18 +211,27 @@
import axios from 'axios'
import RowSettings from '@/views/component/rowSettings'
import Edit from '@/views/scMould/warehouse/Sc_MouldMoveStockRequestBillEdit'
import Move from '@/views/scMould/warehouse/Sc_MouldProdMoveBillEdit'
import PrintList from '@/views/component/printList'
import moment from 'moment';
export default {
  name: 'Sc_MouldMoveStockRequestBillList',
  components: { RowSettings, Edit, PrintList },
  components: { RowSettings, Edit, Move,PrintList },
  props: {
    openPage: { type: String, },
    HOrgID: { type: String, },
  },
  data() {
    return {
      HModName: "Sc_MouldMoveStockRequestBillList",
      rowList:[],
      activeSeach: '',
      editShow: false,
      openEdit: false,
      moveShow: false,
      openMove: false,
      moveData:'',
      totalNameList: [],
      tableShow: true,
      openPrintList: false,
@@ -301,10 +320,14 @@
      page: 1,
      pageSize: 0,
      total: 0,
      BillType:'3850',
    };
  },
  created() {
    // this.fetchData()
    if(this.openPage && this.HOrgID){
      this.queryParams.HStockOutOrgID = this.HOrgID
    }
    this.riqiChange()
    this.getList();
  },
@@ -379,13 +402,14 @@
      if (this.pageSize == 0) {
        this.pageSize = 50
      }
      // 销售出库单列表
      // 列表
      axios.get(this.baseURL + '/Sc_MouldMoveStockRequestBillController/page', {
        params: {
          "sWhere": this.sWhere,
          "user": sessionStorage["HUserName"],
          "page": this.page,
          "size": this.pageSize
          "size": this.pageSize,
          "Type": this.BillType,
        },
      }).then(response => {
        this.tyResList = response.data.data//总数据
@@ -571,22 +595,26 @@
      this.selectedRow = row; // 记录当前选中的行
      this.lastSelectedRowIndex = this.tableData.indexOf(row);
      this.$refs.tableData.toggleRowSelection(row);
      if (this.openPage) {
        this.$emit('deptEmit', this.rowList, this.BillType)
      }
    },
    //选中行高亮样式
    rowStyle({ row, rowIndex }) {
      if (this.ids.includes(row.hmainid)) {
      if (this.ids.includes(row.sorderid)) {
        return { "background": "#ecf5ff" }
      }
    },
    //双击行
    handleDblclick(row, column, cell, event) {
      this.OperationType = 2
      this.handleEdit()
      this.handleEdit(row);
    },
    // 多选框选中数据
    handleSelectionChange(selection) {
      // this.rowForm = {}
      this.ids = selection.map(item => item.hmainid)
      this.rowList=selection
      this.ids = selection.map(item => item.sorderid)
      this.single = selection.length != 1
      this.multiple = !selection.length
      if (!this.single) {
@@ -659,6 +687,22 @@
        }
        this.sWhere += " and " + this.queryParams.ColName2 + " " + com2;
      }
      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 + "'";
@@ -674,11 +718,12 @@
          this.sWhere += " and 部门 like '%" + this.queryParams.HDept + "%'";
      }
      if (this.queryParams.HModelNumber) {
          this.sWhere += " and 模具代码 like '%" + this.queryParams.HModelNumber + "%'";
          this.sWhere += " and 器具代码 like '%" + this.queryParams.HModelNumber + "%'";
      }
      if (this.queryParams.HSupName) {
          this.sWhere += " and 往来单位 like '%" + this.queryParams.HSupName + "%'";
      }
      this.clearData()
      this.getList()
    },
    /** 重置按钮操作 */
@@ -702,6 +747,7 @@
        ColContent2: '',
        ColContent: '',
      }
      this.clearData()
      this.riqiChange()
      this.resetForm("queryForm")
      this.getList()
@@ -713,6 +759,7 @@
      this.tableShow = true
      this.openEdit = false
      this.editShow = false
      this.clearData()
      this.getList()
    },
    //打开新增组件弹窗
@@ -727,12 +774,69 @@
      this.editShow = true
      this.openEdit = true
    },
    //打开下推组件弹窗
    handleMove() {
      if (this.rowList.length > 0) {
        var dataArray = [];
        var HSupTypeID_Temp = this.rowList[0].HSupTypeID
        var HStockInOrgID_Temp = this.rowList[0].HSTOCKORGINID
        for (var i = 0; i < this.rowList.length; i++) {
            if (this.rowList[i].单据状态 != "已审核") {
                this.$modal.msgSuccess("下推失败!所选单据【" + this.rowList[i].单据号 + "】不为已审核状态,不允许下推!")
                return;
            }
            if (this.rowList[i].HQtyMust <= 0) {
                this.$modal.msgSuccess("下推失败!所选单据【" + this.rowList[i].单据号 + "】对应可下推数量必须大于 0 !")
                return;
            }
            if (this.rowList[i].HSupTypeID != HSupTypeID_Temp) {
                this.$modal.msgSuccess("下推失败!所选单据对应往来类型必须一致!")
                return;
            }
            if (this.rowList[i].HSTOCKORGINID != HStockInOrgID_Temp) {
                this.$modal.msgSuccess("下推失败!所选单据对应调入组织必须一致!")
                return;
            }
            var temp = {
                "hmainid": this.rowList[i].hmainid
                , "hsubid": this.rowList[i].hsubid
                , "HBillType": this.rowList[i].HBillType
            }
            dataArray.push(temp);
        }
        var datajson = {
            "data": dataArray
        };
        this.moveData = JSON.stringify(datajson)
        this.moveShow = true
        this.openMove = true
      } else {
          layer.msg('请选择数据下推!');
      }
    },
    //关闭编辑页面
    editClose(val) {
      this.open = val
      this.editShow = false
      this.openEdit = val
      this.clearData()
      this.getList()
    },
    //关闭下推页面
    moveClose(val) {
      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() {
@@ -761,6 +865,7 @@
        let result = response.data
        if (result.count == 1) {
          this.$modal.msgSuccess('操作成功');
          this.clearData()
          this.getList();
        }
        else {
@@ -802,22 +907,6 @@
      }
      //  var content= ['../../BaseSet/SRM_OpenTmpList.html?linterid=' + data[0].hmainid.toString() + '&MyMsg=' + data[0].hmainid.toString() + '&Type=Kf_SellOutBillList', 'yes']
    },
    //#region 获取公司名,根据公司进行定制化开发
    defaintOperationByCompanyName() {
      var result = false;
      axios.get(this.baseURL + '/Xt_getInfo/getCompanyName').then(response => {
        var data1 = response.data
        if (data1.count == 1) {
          if (data1.data == "水务") {
            result = true;
          }
        }
      }).catch(error => {
        this.$modal.msgError("接口请求失败!");
      });
      return result;
    },
  }
};
src/views/scMould/warehouse/Sc_MouldOutRequestBillEdit.vue
@@ -96,14 +96,14 @@
          <el-row>
            <el-col :span="6">
              <el-form-item label="源单类型" prop="HSourceBillType">
                <el-select v-model="form.HSourceBillType" placeholder="请选择往来类型">
                <el-select v-model="form.HSourceBillType" placeholder="请选择">
                  <el-option v-for="(item, index) in HSourceBillTypes" :key="index" :label="item.HSourceBillTypeName" :value="item.HSourceBillType">
                  </el-option>
                </el-select>
              </el-form-item>
            </el-col>
            <el-col :span="6">
              <el-form-item label="源单单号" prop="HRemark">
              <el-form-item label="源单单号" prop="HSourceBillNo">
                <el-input placeholder="请选择源单单号" disabled>
                  <el-button slot="append" icon="el-icon-search" @click="get_checkMainSource()"></el-button>
                </el-input>
src/views/scMould/warehouse/Sc_MouldOutRequestBillList.vue
@@ -46,12 +46,13 @@
            <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 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>
@@ -64,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>
@@ -74,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>
@@ -87,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>
@@ -96,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>
@@ -108,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>
@@ -393,7 +396,8 @@
          "sWhere": this.sWhere,
          "user": sessionStorage["HUserName"],
          "page": this.page,
          "size": this.pageSize
          "size": this.pageSize,
          "Type":"3849",
        },
      }).then(response => {
        this.tyResList = response.data.data//总数据
@@ -589,7 +593,7 @@
    //双击行
    handleDblclick(row, column, cell, event) {
      this.OperationType = 2
      this.handleEdit()
      this.handleEdit(row)
    },
    // 多选框选中数据
    handleSelectionChange(selection) {
@@ -667,6 +671,22 @@
        }
        this.sWhere += " and " + this.queryParams.ColName2 + " " + com2;
      }
      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 + "'";
@@ -682,11 +702,12 @@
        this.sWhere += " and 部门 like '%" + this.queryParams.HDept + "%'";
      }
      if (this.queryParams.HModelNumber) {
        this.sWhere += " and 模具代码 like '%" + this.queryParams.HModelNumber + "%'";
        this.sWhere += " and 器具代码 like '%" + this.queryParams.HModelNumber + "%'";
      }
      if (this.queryParams.HSupName) {
        this.sWhere += " and 往来单位 like '%" + this.queryParams.HSupName + "%'";
      }
      this.clearData()
      this.getList()
    },
    /** 重置按钮操作 */
@@ -712,6 +733,7 @@
      }
      this.riqiChange()
      this.resetForm("queryForm")
      this.clearData()
      this.getList()
    },
@@ -721,6 +743,7 @@
      this.tableShow = true
      this.openEdit = false
      this.editShow = false
      this.clearData()
      this.getList()
    },
    //打开新增组件弹窗
@@ -740,7 +763,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() {
@@ -769,6 +801,7 @@
        let result = response.data
        if (result.count == 1) {
          this.$modal.msgSuccess('操作成功');
          this.clearData()
          this.getList();
        }
        else {
src/views/scMould/warehouse/Sc_MouldProdBackBillList.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 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.HOrgID" placeholder="请选择">
            <el-form-item label="组织">
              <el-select v-model="queryParams.HStockOrgID" 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>
            <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>
            <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: '',
        HStockOrgID: sessionStorage["OrganizationID"] - 0,
        HStatus:'-1',
        HDept:'',
        HMaterNumber: '',
        HModelNumber:'',
        HWhName:'',
        HSupName:'',
        ColName1: '',
        ColName2: '',
@@ -374,20 +373,24 @@
      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.HStockOrgID
      if (this.pageSize == 0) {
        this.pageSize = 50
      }
      // 销售出库单列表
      axios.get(this.baseURL + '/Sc_MouldProdBackBill/list_byPage', {
      axios.get(this.baseURL + '/Sc_MouldProdBackBillController/page', {
        params: {
          "sWhere": this.sWhere,
          "user": sessionStorage["HUserName"],
          "Organization": sessionStorage["Organization"],
          "page": this.page,
          "size": this.pageSize
          "size": this.pageSize,
          "Type": '3803'
        },
      }).then(response => {
        this.tyResList = response.data.data//总数据
@@ -583,7 +586,7 @@
    //双击行
    handleDblclick(row, column, cell, event) {
      this.OperationType = 3
      this.handleEdit()
      this.handleEdit(row)
    },
    // 多选框选中数据
    handleSelectionChange(selection) {
@@ -661,34 +664,43 @@
        }
        this.sWhere += " and " + this.queryParams.ColName2 + " " + com2;
      }
      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.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 + "'";
        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: '',
        HStockOrgID: 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 {
src/views/scMould/warehouse/Sc_MouldProdMoveBillEdit.vue
@@ -23,59 +23,112 @@
                </el-date-picker>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="调入组织" prop="HStockInOrgID">
                <el-select v-model="form.HStockInOrgID" placeholder="请选择组织" :disabled="ifOrganizationEdit">
                  <el-option v-for="(item, index) in organizationList" :key="index" :label="item.Name" :value="item.ID">
                  </el-option>
                </el-select>
              </el-form-item>
            </el-col>
          </el-row>
          <el-row>
            <el-col :span="6">
              <el-form-item label="内部单据号" prop="HInnerBillNo">
                <el-input v-model="form.HInnerBillNo" placeholder="请输入内部单据号" />
              <el-form-item label="往来类型" prop="HSupTypeID">
                <el-select v-model="form.HSupTypeID" placeholder="请选择往来类型">
                  <el-option v-for="(item, index) in hSupTypeList" :key="index" :label="item.name" :value="item.id">
                  </el-option>
                </el-select>
              </el-form-item>
            </el-col>
            <el-col :span="6">
              <el-form-item label="器具仓库" prop="HWHName">
                <el-input v-model="form.HWHName" placeholder="请选择器具仓库" disabled>
              <el-form-item label="往来单位" prop="HSupName">
                <el-input v-model="form.HSupName" placeholder="请选择往来单位" disabled>
                  <el-button slot="append" icon="el-icon-search" @click="openDataDialogChoose()"></el-button>
                </el-input>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="调出组织" prop="HStockOutOrgID">
                <el-select v-model="form.HStockOutOrgID" placeholder="请选择组织" :disabled="ifOrganizationEdit">
                  <el-option v-for="(item, index) in organizationList" :key="index" :label="item.Name" :value="item.ID">
                  </el-option>
                </el-select>
              </el-form-item>
            </el-col>
          </el-row>
          <el-row>
            <el-col :span="6">
              <el-form-item label="部门" prop="HDeptName">
                <el-input v-model="form.HDeptName" placeholder="请选择部门" disabled>
                  <el-button slot="append" icon="el-icon-search" @click="openDataDialog(1,deptType=1)"></el-button>
                </el-input>
              </el-form-item>
            </el-col>
            <el-col :span="6">
              <el-form-item label="调入仓库" prop="HWHName">
                <el-input v-model="form.HWHName" placeholder="请选择调入仓库" disabled>
                  <el-button slot="append" icon="el-icon-search" @click="openDataDialog(2,eHWHType=1)"></el-button>
                </el-input>
              </el-form-item>
            </el-col>
            <el-col :span="6">
              <el-form-item label="调出仓库" prop="HSCWHName">
                <el-input v-model="form.HSCWHName" placeholder="请选择调出仓库" disabled>
                  <el-button slot="append" icon="el-icon-search" @click="openDataDialog(2,eHWHType=2)"></el-button>
                </el-input>
              </el-form-item>
            </el-col>
          </el-row>
          <el-row>
            <el-col :span="6">
              <el-form-item label="领料人" prop="HSecManagerName">
                <el-input v-model="form.HSecManagerName" placeholder="请选择领料人" disabled>
              <el-form-item label="业务员" prop="HEmpName">
                <el-input v-model="form.HEmpName" placeholder="请选择" disabled>
                  <el-button slot="append" icon="el-icon-search" @click="openDataDialog(4,empType=1)"></el-button>
                </el-input>
              </el-form-item>
            </el-col>
            <el-col :span="6">
              <el-form-item label="发料人" prop="HKeeperName">
                <el-input v-model="form.HKeeperName" placeholder="请选择发料人" disabled>
              <el-form-item label="负责人" prop="HMangerName">
                <el-input v-model="form.HMangerName" placeholder="请选择" disabled>
                  <el-button slot="append" icon="el-icon-search" @click="openDataDialog(4,empType=2)"></el-button>
                </el-input>
              </el-form-item>
            </el-col>
            <el-col :span="6">
              <el-form-item label="部门" prop="HDeptName">
                <el-input v-model="form.HDeptName" placeholder="请选择部门" disabled>
                  <el-button slot="append" icon="el-icon-search" @click="openDataDialog(1)"></el-button>
              <el-form-item label="验收员" prop="HSecManagerName">
                <el-input v-model="form.HSecManagerName" placeholder="请选择" disabled>
                  <el-button slot="append" icon="el-icon-search" @click="openDataDialog(4,empType=3)"></el-button>
                </el-input>
              </el-form-item>
            </el-col>
            <el-col :span="6">
              <el-form-item label="保管员" prop="HKeeperName">
                <el-input v-model="form.HKeeperName" placeholder="请选择" disabled>
                  <el-button slot="append" icon="el-icon-search" @click="openDataDialog(4,empType=4)"></el-button>
                </el-input>
              </el-form-item>
            </el-col>
          </el-row>
          <el-row>
            <el-col :span="6">
              <el-form-item label="调拨类型" prop="HStockStyle">
                <el-select v-model="form.HStockStyle" placeholder="请选择">
                  <el-option label="同组织调拨" value="同组织调拨" />
                  <el-option label="跨组织调拨" value="跨组织调拨" />
              <el-form-item label="源单类型" prop="HSourceBillType">
                <el-select v-model="form.HSourceBillType" placeholder="请选择">
                  <el-option v-for="(item, index) in HSourceBillTypes" :key="index" :label="item.HSourceBillTypeName" :value="item.HSourceBillType">
                  </el-option>
                </el-select>
              </el-form-item>
            </el-col>
          </el-row>
          <el-row>
            <el-col :span="6">
              <el-form-item label="组织" prop="HOrgID">
                <el-select v-model="form.HOrgID" placeholder="请选择组织" :disabled="zzSelDis">
                  <el-option v-for="(item, index) in organizationList" :key="index" :label="item.Name" :value="item.ID">
                  </el-option>
                </el-select>
              <el-form-item label="源单单号" prop="HSourceBillNo">
                <el-input placeholder="请选择源单单号" disabled>
                  <el-button slot="append" icon="el-icon-search" @click="get_checkMainSource()"></el-button>
                </el-input>
              </el-form-item>
            </el-col>
            <el-col :span="6">
              <el-form-item label="内部单据号" prop="HInnerBillNo">
                <el-input v-model="form.HInnerBillNo" placeholder="请输入" />
              </el-form-item>
            </el-col>
          </el-row>
@@ -177,7 +230,7 @@
            <el-table-column align="center" label="序号" type="index" width="80" />
            <el-table-column align="center" label="器具代码" width="120">
              <template slot-scope="scope">
                <el-input v-model="scope.row.HMaterCode" placeholder="请输入" @keyup.native.f7="openDataDialog(8, scope.row)"
                <el-input v-model="scope.row.HMaterNumber" placeholder="请输入" @keyup.native.f7="openDataDialog(8, scope.row)"
                  @dblclick.native="openDataDialog(8, scope.row)" />
              </template>
            </el-table-column>
@@ -188,37 +241,17 @@
            </el-table-column>
            <el-table-column align="center" label="规格型号" width="120">
              <template slot-scope="scope">
                <span>{{ scope.row.HMaterSpec }}</span>
              </template>
            </el-table-column>
            <el-table-column align="center" label="批次" width="120">
              <template slot-scope="scope">
                <el-input v-model="scope.row.HBatchNo" placeholder="请输入" />
                <span>{{ scope.row.HMaterModel }}</span>
              </template>
            </el-table-column>
            <el-table-column align="center" label="计量单位代码" width="120">
              <template slot-scope="scope">
                <span>{{ scope.row.HUnitCode }}</span>
                <span>{{ scope.row.HUnitNumber }}</span>
              </template>
            </el-table-column>
            <el-table-column align="center" label="计量单位" width="120">
              <template slot-scope="scope">
                <span>{{ scope.row.HUnitName }}</span>
              </template>
            </el-table-column>
            <el-table-column align="center" label="设计寿命" width="120">
              <template slot-scope="scope">
                <el-input v-model="scope.row.HDesignLife" placeholder="请输入" />
              </template>
            </el-table-column>
            <el-table-column align="center" label="剩余寿命" width="120">
              <template slot-scope="scope">
                <el-input v-model="scope.row.HLeaveLife" placeholder="请输入" />
              </template>
            </el-table-column>
            <el-table-column align="center" label="累计使用寿命" width="120">
              <template slot-scope="scope">
                <el-input v-model="scope.row.HUseLife" placeholder="请输入" />
              </template>
            </el-table-column>
            <el-table-column align="center" label="应发数量" width="120">
@@ -232,34 +265,10 @@
                  controls-position="right"></el-input-number>
              </template>
            </el-table-column>
            <el-table-column align="center" label="单价" width="120">
              <template slot-scope="scope">
                <el-input v-model="scope.row.HPrice" placeholder="请输入" />
              </template>
            </el-table-column>
            <el-table-column align="center" label="金额" width="120">
              <template slot-scope="scope">
                <el-input v-model="scope.row.HMoney" placeholder="请输入" />
              </template>
            </el-table-column>
            <el-table-column align="center" label="调入组织代码" width="120">
              <template slot-scope="scope">
                <!-- <el-select v-model="scope.row.HStockOrgCode" placeholder="请选择组织" @change="HStockOrgChange(zbIndex = scope.row.index - 1)">
                  <el-option v-for="(item, index) in organizationList" :key="index" :label="item.Name" :value="item.ID"></el-option>>
                  </el-option>
                </el-select> -->
                <span>{{ scope.row.HStockOrgCode }}</span>
              </template>
            </el-table-column>
            <el-table-column align="center" label="调入组织" width="120">
              <template slot-scope="scope">
                <span>{{ scope.row.HStockOrgName }}</span>
              </template>
            </el-table-column>
            <el-table-column align="center" label="调入仓库代码" width="120">
              <template slot-scope="scope">
                <el-input v-model="scope.row.HWHCode" placeholder="请输入" @keyup.native.f7="openDataDialog(2, scope.row ,eHWHType=2)"
                  @dblclick.native="openDataDialog(2, scope.row ,eHWHType=2)" />
                <el-input v-model="scope.row.HWHNumber" placeholder="请输入" @keyup.native.f7="openDataDialog(2, scope.row ,eHWHType=3)"
                  @dblclick.native="openDataDialog(2, scope.row ,eHWHType=3)" />
              </template>
            </el-table-column>
            <el-table-column align="center" label="调入仓库" width="120">
@@ -269,7 +278,7 @@
            </el-table-column>
            <el-table-column align="center" label="调入仓位代码" width="120">
              <template slot-scope="scope">
                <el-input v-model="scope.row.HSPCode" placeholder="请输入" @keyup.native.f7="openDataDialog(9, scope.row,HSPType=1)"
                <el-input v-model="scope.row.HSPNumber" placeholder="请输入" @keyup.native.f7="openDataDialog(9, scope.row,HSPType=1)"
                  @dblclick.native="openDataDialog(9, scope.row,HSPType=1)" />
              </template>
            </el-table-column>
@@ -280,8 +289,8 @@
            </el-table-column>
            <el-table-column align="center" label="调出仓库代码" width="120">
              <template slot-scope="scope">
                <el-input v-model="scope.row.HSCWHCode" placeholder="请输入" @keyup.native.f7="openDataDialog(2, scope.row ,eHWHType=3)"
                  @dblclick.native="openDataDialog(2, scope.row ,eHWHType=3)" />
                <el-input v-model="scope.row.HSCWHNumber" placeholder="请输入" @keyup.native.f7="openDataDialog(2, scope.row ,eHWHType=4)"
                  @dblclick.native="openDataDialog(2, scope.row ,eHWHType=4)" />
              </template>
            </el-table-column>
            <el-table-column align="center" label="调出仓库" width="120">
@@ -291,7 +300,7 @@
            </el-table-column>
            <el-table-column align="center" label="调出仓位代码" width="120">
              <template slot-scope="scope">
                <el-input v-model="scope.row.HSCSPCode" placeholder="请输入" @keyup.native.f7="openDataDialog(9, scope.row,HSPType=2)"
                <el-input v-model="scope.row.HSCSPNumber" placeholder="请输入" @keyup.native.f7="openDataDialog(9, scope.row,HSPType=2)"
                  @dblclick.native="openDataDialog(9, scope.row,HSPType=2)" />
              </template>
            </el-table-column>
@@ -377,6 +386,7 @@
      <GyCustomer @deptEmitDb="dbEmitData" @deptEmit="emitData" :openPage="HModName" v-if="gyCustomerShow" />
      <GyMould @deptEmitDb="dbEmitData" @deptEmit="emitData" :openPage="HModName" v-if="gyMouldShow" />
      <GyStockPlace @deptEmitDb="dbEmitData" @deptEmit="emitData" :openPage="HModName" v-if="gyStockPlaceShow" />
      <ScMouldMove @deptEmitDb="dbEmitData" @deptEmit="emitData" :openPage="HModName" :HOrgID="form.HStockOutOrgID" v-if="scMouldMoveShow" />
      <div slot="footer" class="dialog-footer">
        <el-button type="primary" @click="deptClickSub">确 定</el-button>
        <el-button @click="deptClose">取 消</el-button>
@@ -398,13 +408,14 @@
import GyCustomer from '@/views/GyCustomer'
import GyMould from '@/views/scMould/basicModeling/Gy_MouldFileList.vue'
import GyStockPlace from '@/views/basic/gyStockPlace/gyStockPlace.vue'
import ScMouldMove from '@/views/scMould/warehouse/Sc_MouldMoveStockRequestBillList.vue'
import moment from 'moment';
export default {
  name: 'Sc_MouldProdMoveBillEdit',
  components: { Dept, Warehouse, RowSettings, GyEmployee,GySupplier,GyCustomer,GyMould,GyStockPlace },
  components: { Dept, Warehouse, RowSettings, GyEmployee,GySupplier,GyCustomer,GyMould,GyStockPlace,ScMouldMove },
  props: {
    OperationType: { type: Number, },
    OperationType: { type: Number, },//(1新增、2编辑、3复制、4下推)
    linterid: { type: Number, },
    HSouceBillType: { type: String, },
    propsData: { type: String, },
@@ -419,6 +430,8 @@
      zzSelDis: false,
      rowHideShow: false,
      openRowHide: false,
      hSupTypeList: [{name:'供应商',id:1,},{name:'客户',id:2},{name:'车间部门',id:3}],
      HSourceBillTypes:[],
      addBtnShow: false,
      zbIndex: null,
      zbSelForm: {},//子表选中数据
@@ -430,15 +443,18 @@
      gyCustomerShow: false,//客户数据组件
      gyMouldShow: false,//器具数据组件
      gyStockPlaceShow: false,//仓位数据组件
      scMouldMoveShow:false,//源单组件
      eHWHType:1,//仓库弹窗区分标志
      empType:1,//职员弹窗区分标志
      HSPType:1,//仓位弹窗区分标志
      deptType:1,//部门弹窗区分标志
      deptform: {},//弹窗选中数据
      openData: false,//数据弹窗
      dialogTitle: '',
      organizationList: [],//组织列表
      ifOrganizationEdit: false,
      subDisabled: false,//编辑页面保存按钮是否禁用(true禁用,false可用)
      // OperationType: this.$route.query.OperationType,//保存类型(新增1修改3)
      // OperationType: this.$route.query.OperationType,//保存类型(1新增、2编辑、3复制、4下推)
      HInterID: 0,
      baseURL: process.env.VUE_APP_BASE_API,
      checkedSysZb: [],
@@ -486,26 +502,30 @@
      form: {},
      // 表单校验
      rules: {
        HBillNo: [
          { required: true, message: "单据号不能为空", trigger: "blur" }
        ],
        HDate: [
          { required: true, message: "日期不能为空", trigger: "blur" }
        ],
        HWHName: [
          { required: true, message: "器具仓库不能为空", trigger: "blur" }
        HStockInOrgID: [
          { required: true, message: "调入组织不能为空", trigger: "blur" }
        ],
        HStockOutOrgID: [
          { required: true, message: "调出组织不能为空", trigger: "blur" }
        ],
        HSecManagerName: [
          { required: true, message: "领料人不能为空", trigger: "blur" }
          { required: true, message: "验收员不能为空", trigger: "blur" }
        ],
        HKeeperName: [
          { required: true, message: "发料人不能为空", trigger: "blur" }
        ],
        HDeptName: [
          { required: true, message: "部门不能为空", trigger: "blur" }
          { required: true, message: "保管员不能为空", trigger: "blur" }
        ]
      }
    };
  },
  created() {
    this.fetchData()
    this.SourceBillType()
    this.getdata()
  },
  methods: {
@@ -519,14 +539,29 @@
        this.$modal.msgError("接口请求失败!");
      });
    },
    SourceBillType(){
      axios.get(this.baseURL + "/Web/GetHSourceBillType", {
        params: { "HName": '器具调拨单', "Num": 2 }//0蓝单 1红单 2不分红蓝单
      }).then(response => {
        if (response.data.count == 1) {
          this.HSourceBillTypes = response.data.data
          this.form.HSourceBillType = this.HSourceBillTypes[0].HSourceBillType
          this.form.HSourceBillTypeName = this.HSourceBillTypes[0].HSourceBillTypeName
        }
      }).catch(error => {
        this.$modal.msgError("接口请求失败!");
      });
    },
    getdata() {
      console.log(this.copyType, this.OperationType)
      this.formShow = false
      this.formLoading = true
      if ((this.OperationType == 1 && this.copyType != 1) || (!this.OperationType && !this.copyType)) {
        this.handleAdd()
      } else if (this.OperationType == 3 || this.copyType == 1) {
      } else if (this.OperationType == 2 || this.copyType == 1) {
        this.handleUpdate()
      } else if (this.OperationType == 4) {
        this.handleMove()
      }
    },
    // 获取参数_传递的JSON格式参数
@@ -553,70 +588,235 @@
      // let options=undefined
      //  this.form=this.organizationList.find(option => option.ID === val)?.Name || '';
    },
    //获取源单数据
    GetSourceBillList(HSourceInterID, HSourceEntryID, HSourceBillType) {
        var res = "none"
        axios.get(this.baseURL + "/Sc_MouldProdMoveBillController/GetSourceBill_MouldProdMove_Json", {
          params: { "HInterID": HSourceInterID, "HEntryID": HSourceEntryID, "HBillType": HSourceBillType }
        }).then(response => {
          if (response.data.count == 1) {
            res = response.data.data[0]
          }else {
            res = "none";
          }
        }).catch(error => {
          this.$modal.msgError("接口请求失败!");
        });
        return res;
    },
    //写入源单数据
    setInitBySourceBill(dataArray){
      var data = dataArray[0]
      this.form.HSupTypeID = data.HSupTypeID
      this.form.HSupID = data.HSupID
      this.form.HSupName = data.HSupName
      this.form.HDeptID = data.HDeptID
      this.form.HDeptName = data.HDeptName
      this.form.HStockInOrgID = data.HStockInOrgID
      this.form.HStockOutOrgID = data.HStockOutOrgID
      this.form.HStockOrgID = data.HStockOutOrgID
      this.form.HStockInOrgID = data.HStockInOrgID == null ? 0 : data.HStockInOrgID
      this.form.HStockOutOrgID = data.HStockOutOrgID == null ? 0 : data.HStockOutOrgID
      this.ifOrganizationEdit = true
      //子表  赋值
      var rowdata = [];
      for (let i = 0; i < dataArray.length; i++) {
          rowdata.push(
              {
                  "HMaterID": dataArray[i].HMaterID == null ? 0 : dataArray[i].HMaterID
                  , "HMaterNumber": dataArray[i].HMaterNumber == null ? "" : dataArray[i].HMaterNumber
                  , "HMaterName": dataArray[i].HMaterName == null ? "" : dataArray[i].HMaterName
                  , "HMaterModel": dataArray[i].HMaterModel == null ? "" : dataArray[i].HMaterModel
                  , "HUnitID": dataArray[i].HUnitID == null ? 0 : dataArray[i].HUnitID
                  , "HUnitNumber": dataArray[i].HUnitNumber == null ? "" : dataArray[i].HUnitNumber
                  , "HUnitName": dataArray[i].HUnitName == null ? "" : dataArray[i].HUnitName
                  , "HBatchNo": ""
                  , "HQty": dataArray[i].HQty == null ? 0 : dataArray[i].HQty
                  , "HWHID": dataArray[i].HWHID == null ? 0 : dataArray[i].HWHID
                  , "HWHNumber": dataArray[i].HWHNumber == null ? "" : dataArray[i].HWHNumber
                  , "HWHName": dataArray[i].HWHName == null ? "" : dataArray[i].HWHName
                  , "HSPID": "0"
                  , "HSPNumber": ""
                  , "HSPName": ""
                  , "HSCWHID": dataArray[i].HSCWHID == null ? 0 : dataArray[i].HSCWHID
                  , "HSCWHNumber": dataArray[i].HSCWHNumber == null ? "" : dataArray[i].HSCWHNumber
                  , "HSCWHName": dataArray[i].HSCWHName == null ? "" : dataArray[i].HSCWHName
                  , "HSCSPID": "0"
                  , "HSCSPNumber": ""
                  , "HSCSPName": ""
                  , "HSourceInterID": dataArray[i].HInterID == null ? 0 : dataArray[i].HInterID
                  , "HSourceEntryID": dataArray[i].HEntryID == null ? 0 : dataArray[i].HEntryID
                  , "HSourceBillType": dataArray[i].HBillType == null ? "" : dataArray[i].HBillType
                  , "HSourceBillNo": dataArray[i].HBillNo == null ? "" : dataArray[i].HBillNo
                  , "HRelationQty": "0"
                  , "HRelationMoney": "0"
                  , "HRemark": ""
                  , "HPropertyID": "0"
                  , "HSecUnitID": "0"
                  , "HSecUnitRate": "0"
                  , "HQtyMust": dataArray[i].HQty == null ? 0 : dataArray[i].HQty
                  , "HPrice": "0"
                  , "HMoney": "0"
                  , "HDesignLife": "0"
                  , "HLeaveLife": "0"
                  , "HPOOrderInterID": "0"
                  , "HPOOrderEntryID": "0"
                  , "HPOOrderBillNo": ""
                  , "HSeOrderInterID": "0"
                  , "HSeOrderEntryID": "0"
                  , "HSeOrderBillNo": ""
                  , "HSTOCKORGID": dataArray[i].HStockOutOrgID == null ? 0 : dataArray[i].HStockOutOrgID
                  , "HOtherOrgID": dataArray[i].HStockInOrgID == null ? 0 : dataArray[i].HStockInOrgID
                  , "HOWNERID": dataArray[i].HStockOutOrgID == null ? 0 : dataArray[i].HStockOutOrgID
                  , "HOWNERTYPEID": ""
                  , "HUseLife": "0"
                  , "HUseLifeQty": "0"
                  , "HNewLifeQty": "0"
                  , "HQtyRel": "0"
                  , "HSPGroupID": "0"
                  , "HNewModel": ""
                  , "HWallThickness": ""
                  , "HHardness": ""
                  , "HLastProdModel": ""
                  , "HDiameter": ""
                  , "HBackFlag": ""
                  , "HBarCode": ""
                  , "HMouldType": "0"
                  , "HInitModel": ""
                  , "HInitDesignLife": "0"
                  , "HLifeUnitID": "0"
                  , "HNowModel": ""
                  , "HNowLife": "0"
                  , "HCorrespondentTypeID": "0"
                  , "HCorrespondentID": "0"
              }
          )
      }
      this.editData = rowdata
    },
    //弹窗赋值
    dbEmitData(deptRow, num) {
      // num=1部门 num=2仓库
      console.log(deptRow)
      if (deptRow.HItemID || deptRow.hmainid) {
        if (num == 1) {
          this.form.HDeptName = deptRow.部门名称
          this.form.HDeptID = deptRow.HItemID
          this.deptShow = false
          this.openData = false
        } else if (num == 2) {
          if(this.eHWHType == 1){
            this.form.HWHName = deptRow.仓库名称
            this.form.HWHID = deptRow.HItemID
            this.form.HWHNumber = deptRow.仓库代码
          }else if(this.eHWHType == 2){
            this.editData[this.zbIndex].HWHID = deptRow.HItemID
            this.editData[this.zbIndex].HWHCode = deptRow.仓库代码
            this.editData[this.zbIndex].HWHName = deptRow.仓库名称
          }else if(this.eHWHType == 3){
            this.editData[this.zbIndex].HSCWHID = deptRow.HItemID
            this.editData[this.zbIndex].HSCWHCode = deptRow.仓库代码
            this.editData[this.zbIndex].HSCWHName = deptRow.仓库名称
      console.log(33,deptRow)
      if(num == 3850){
        if (deptRow.length > 0) {
          var HSupTypeID_Temp = deptRow[0].HSupTypeID
          var HStockInOrgID_Temp = deptRow[0].HStockInOrgID
          for (var i = 0; i < deptRow.length; i++) {
            if (deptRow[i].HSupTypeID != HSupTypeID_Temp) {
              this.$modal.msgError("所选单据对应往来类型必须一致!");
            }
            if (deptRow[i].HStockInOrgID != HStockInOrgID_Temp) {
              this.$modal.msgError("所选单据对应调入组织必须一致!");
            }
          }
          this.warehouseShow = false
          this.openData = false
        } else if (num == 4) {
          if(this.empType == 1){
            this.form.HSecManagerName = deptRow.职员名称
            this.form.HSecManagerID = deptRow.HItemID
          }else{
            this.form.HKeeperName = deptRow.职员名称
            this.form.HKeeperID = deptRow.HItemID
          }
          this.gyEmployeeShow = false
          this.openData = false
        } else if (num == 8){
          this.editData[this.zbIndex].HMaterID = deptRow.hmainid
          this.editData[this.zbIndex].HMaterCode = deptRow.模具编号
          this.editData[this.zbIndex].HMaterName = deptRow.模具名称
          this.editData[this.zbIndex].HMaterSpec = deptRow.模具型号
          this.editData[this.zbIndex].HUnitID = deptRow.HUnitID
          this.editData[this.zbIndex].HUnitCode = deptRow.计量单位代码
          this.editData[this.zbIndex].HUnitName = deptRow.计量单位
          this.editData[this.zbIndex].HQty = 1
          this.gyMouldShow = false
          this.openData = false
        } else if (num == 9){
          if(this.HSPType == 1){
            this.editData[this.zbIndex].HSPID = deptRow.HMainID
            this.editData[this.zbIndex].HSPCode = deptRow.仓位代码
            this.editData[this.zbIndex].HSPName = deptRow.仓位名称
          }else{
            this.editData[this.zbIndex].HSCSPID = deptRow.HMainID
            this.editData[this.zbIndex].HSCSPCode = deptRow.仓位代码
            this.editData[this.zbIndex].HSCSPName = deptRow.仓位名称
          }
          this.gyStockPlaceShow = false
          this.openData = false
        }
      } else {
        this.$modal.msgError("请选择单条数据!");
      }
          var dataArray = [];
          for (var i = 0; i < deptRow.length; i++) {
              var temp = this.GetSourceBillList(deptRow[i].hmainid, deptRow[i].hsubid, deptRow[i].HBillType)
              console.log(718,temp)
              if (temp != "none") {
                  dataArray.push(temp);
              } else {
                this.$modal.msgError("未查询到源单信息,请刷新源单列表后重新选择对应源单!");
              }
          }
          this.setInitBySourceBill(dataArray)
          this.scMouldMoveShow = false
          this.openData = false
        } else {
          this.$modal.msgError("请选择数据!");
        }
      }else{
        if (deptRow.HItemID || deptRow.hmainid) {
          if (num == 1) {
            if(this.deptType == 1){
              this.form.HDeptName = deptRow.部门名称
              this.form.HDeptID = deptRow.HItemID
            }else{
              this.form.HSupName = deptRow.部门名称
              this.form.HSupID = deptRow.HItemID
            }
            this.deptShow = false
            this.openData = false
          } else if (num == 2) {
            if(this.eHWHType == 1){
              this.form.HWHName = deptRow.仓库名称
              this.form.HWHID = deptRow.HItemID
              this.form.HWHNumber = deptRow.仓库代码
            }else if(this.eHWHType == 2){
              this.form.HSCWHName = deptRow.仓库名称
              this.form.HSCWHID = deptRow.HItemID
              this.form.HSCWHNumber = deptRow.仓库代码
            }else if(this.eHWHType == 3){
              this.editData[this.zbIndex].HWHID = deptRow.HItemID
              this.editData[this.zbIndex].HWHNumber = deptRow.仓库代码
              this.editData[this.zbIndex].HWHName = deptRow.仓库名称
            }else if(this.eHWHType == 4){
              this.editData[this.zbIndex].HSCWHID = deptRow.HItemID
              this.editData[this.zbIndex].HSCWHNumber = deptRow.仓库代码
              this.editData[this.zbIndex].HSCWHName = deptRow.仓库名称
            }
            this.warehouseShow = false
            this.openData = false
          } else if (num == 4) {
            if(this.empType == 1){
              this.form.HEmpName = deptRow.职员名称
              this.form.HEmpID = deptRow.HItemID
            }else if(this.empType == 2){
              this.form.HMangerName = deptRow.职员名称
              this.form.HMangerID = deptRow.HItemID
            }else if(this.empType == 3){
              this.form.HSecManagerName = deptRow.职员名称
              this.form.HSecManagerID = deptRow.HItemID
            }else if(this.empType == 4){
              this.form.HKeeperName = deptRow.职员名称
              this.form.HKeeperID = deptRow.HItemID
            }else
            this.gyEmployeeShow = false
            this.openData = false
          } else if (num == 6) {
            this.form.HSupName = deptRow.供应商名称
            this.form.HSupID = deptRow.HItemID
            this.gySupplierShow = false
            this.openData = false
          } else if (num == 7) {
            this.form.HSupName = deptRow.客户名称
            this.form.HSupID = deptRow.HItemID
            this.gyCustomerShow = false
            this.openData = false
          } else if (num == 8){
            this.editData[this.zbIndex].HMaterID = deptRow.hmainid
            this.editData[this.zbIndex].HMaterNumber = deptRow.模具编号
            this.editData[this.zbIndex].HMaterName = deptRow.模具名称
            this.editData[this.zbIndex].HMaterModel = deptRow.模具型号
            this.editData[this.zbIndex].HUnitID = deptRow.HUnitID
            this.editData[this.zbIndex].HUnitNumber = deptRow.计量单位代码
            this.editData[this.zbIndex].HUnitName = deptRow.计量单位
            this.editData[this.zbIndex].HQty = 1
            this.editData[this.zbIndex].HDesignLife = 0
            this.editData[this.zbIndex].HLeaveLife = 0
            this.editData[this.zbIndex].HMoney = 0
            this.gyMouldShow = false
            this.openData = false
          } else if (num == 9){
            if(this.HSPType == 1){
              this.editData[this.zbIndex].HSPID = deptRow.HMainID
              this.editData[this.zbIndex].HSPCode = deptRow.仓位代码
              this.editData[this.zbIndex].HSPName = deptRow.仓位名称
            }else{
              this.editData[this.zbIndex].HSCSPID = deptRow.HMainID
              this.editData[this.zbIndex].HSCSPCode = deptRow.仓位代码
              this.editData[this.zbIndex].HSCSPName = deptRow.仓位名称
            }
            this.gyStockPlaceShow = false
            this.openData = false
          }
        } else {
          this.$modal.msgError("请选择单条数据!");
        }
      }
    },
    emitData(deptRow, num) {
      this.dialogTypeNum = num
@@ -744,69 +944,98 @@
        this.$modal.msgError("接口请求失败!");
      });
    },
    /** 下推打开 */
    handleMove() {
      this.reset()
      //新增获取单据号
      this.getHBillNo()
      let date = new Date()
      this.form.HDate = moment(date).format('YYYY-MM-DDTHH:mm:ss')
      //设置源单类型
      this.form.HSourceBillType = this.HSouceBillType
      //获取源单数据
      var data = this.getUrlVars_JSON().data;
      var dataArray = [];
      for (var i = 0; i < data.length; i++) {
          var temp = this.GetSourceBillList(data[i].hmainid, data[i].hsubid, data[i].HBillType)
          console.log(temp)
          if (temp != "none") {
              dataArray.push(temp);
          } else {
              this.$modal.msgError("未查询到单据可下推数据,请刷新单据列表后重新选择单据下推!");
              return;
          }
      }
      this.$nextTick(() => {
        this.setInitBySourceBill(dataArray);
        this.OperationType = 1;
        this.formShow = true
        this.formLoading = false
      })
    },
    /** 修改按钮操作 */
    handleUpdate() {
      this.reset()
      let rowHmainid = this.linterid
      console.log(this.linterid)
      //主表
      axios.get(this.baseURL + "/Sc_MouldProdMoveBill/Sc_MouldProdMoveBillListCheckDetai", {
        params: { 'HID': rowHmainid }
      axios.get(this.baseURL + "/Sc_MouldStockBillController/GetSc_MouldStockBill_Json", {
        params: { 'HInterID': rowHmainid,"HMaker": sessionStorage["HUserName"] }
      }).then(response => {
        if (response.data.code == 1) {
          var data = response.data.data.h_v_Sc_MouldProdMoveBill_Edit[0]
          console.log(data)
        if (response.data.count == 1) {
          var data = response.data.data[0]
          // console.log(response.data)
          if (this.copyType == 1) {
            this.getHBillNo()
            let date = new Date()
            this.form.HDate = moment(date).format('YYYY-MM-DDTHH:mm:ss')
          } else {
            this.form = {
                  "HBillNo": data.单据号
                , "HDate": data.日期
                , "HInnerBillNo": data.内部单据号
                , "HWHID": data.HWHID1                    //仓库ID
                , "HWHName": data.器具仓库                   //仓库名称
                , "HSecManagerID": data.hsecmanagerid    //验收员ID
                , "HSecManagerName": data.领料人         //验收员名称
                , "HKeeperID": data.hkeeperid            //保管员ID
                , "HKeeperName": data.发料人            //保管员名称
                , "HDeptID": data.HDeptID                 //部门ID
                , "HDeptName": data.部门                //部门名称
                , "HSourceBillType": ""                   //源单类型
                , "XDH": ""                               //选单号
                , "HExplanation": data.摘要              //摘要
                , "HRemark": data.表头备注                    //备注
                , "HStockStyle": data.调拨类型
                , "HMaker": data.制单人
                , "HMakeDate": data.制单日期 == null ? "" : data.制单日期
                , "HChecker": data.审核人
                , "HCheckDate": data.审核日期 == null ? "" : data.审核日期
                , "HUpDater": data.修改人
                , "HUpDateDate": data.修改日期 == null ? "" : data.修改日期
                , "HCloseMan": data.关闭人
                , "HCloseDate": data.关闭日期 == null ? "" : data.关闭日期
                , "HDeleteMan": data.作废人
                , "HDeleteDate": data.作废日期 == null ? "" : data.作废日期
            if (data[0].HSourceInterID != "0") {
              this.ifOrganizationEdit = true
            }
            this.form = {
                "HBillNo": data[0].单据号
                , "HDate": data[0].日期
                , "HSupTypeID": data[0].HSupTypeID
                , "HSupID": data[0].HSupID
                , "HSupName": data[0].往来单位
                , "HDeptID": data[0].HDeptID
                , "HDeptName": data[0].部门
                , "HWHID": data[0].HMainWHID
                , "HWHName": data[0].调入仓库
                , "HSCWHID": data[0].HMainSCWHID
                , "HSCWHName": data[0].调出仓库
                , "HEmpID": data[0].HEmpID
                , "HEmpName": data[0].业务员
                , "HManagerID": data[0].HManagerID
                , "HManagerName": data[0].负责人
                , "HSecManagerID": data[0].HSecManagerID
                , "HSecManagerName": data[0].验收员
                , "HKeeperID": data[0].HKeeperID
                , "HKeeperName": data[0].保管员
                , "HExplanation": data[0].摘要
                , "HRemark": data[0].表头备注
                , "HInnerBillNo": data[0].内部单据号
                , "HStockInOrgID": data[0].HStockInOrgID
                , "HStockOutOrgID": data[0].HStockOutOrgID
                , "HMaker": data[0].制单人
                , "HChecker": data[0].审核人
                , "HCloseMan": data[0].关闭人
                , "HUpDater": data[0].修改人
                , "HDeleteMan": data[0].作废人
                , "HMakeDate": data[0].制单日期 == null ? "" : data[0].制单日期
                , "HCheckDate": data[0].审核日期 == null ? "" : data[0].审核日期
                , "HCloseDate": data[0].关闭日期 == null ? "" : data[0].关闭日期
                , "HUpDateDate": data[0].修改日期 == null ? "" : data[0].修改日期
                , "HDeleteDate": data[0].作废日期 == null ? "" : data[0].作废日期
            }
            this.form.HStockInOrgID = data[0].HStockInOrgID == null ? 0 : data[0].HStockInOrgID;
            this.form.HStockOutOrgID = data[0].HStockOutOrgID == null ? 0 : data[0].HStockOutOrgID;
            //子表  赋值
            this.editData = response.data.data[0];
            this.editData1 = response.data.data[1];
          }
          this.formShow = true
          this.formLoading = false
        }
      }).catch(error => {
        console.log(error)
        this.$modal.msgError("接口请求失败!");
      });
      //子表
      axios.get(this.baseURL + "/Sc_MouldProdMoveBill/Sc_MouldProdMoveBillListProjectDetai", {
        params: { 'sqlWhere': "and hmainid=" + rowHmainid }
      }).then(response => {
        if (response.data.count == 1) {
          var data = response.data
          console.log(data)
          this.editData = data.list[0]
          this.editData1 = data.list[1]
          this.formShow = true
          this.formLoading = false
        }
@@ -825,38 +1054,72 @@
        this.$modal.msgError("请选择一行数据编辑!");
      } else {
        let obj = {
          HBatchNo: "",
          HDesignLife: 0,
          HLeaveLife: 0,
          HMaterCode:"",
          HMaterID:0,
          HMaterName:"",
          HMaterSpec:"",
          HMoney:0,
          HPrice:0,
          HQty:0,
          HQtyMust:0,
          HSPCode:"",
          HSPID:0,
          HSPName:"",
          HOtherOrgID:sessionStorage["OrganizationID"] - 0,//组织id
          HStockOrgID:0,
          HStockOrgCode:"",
          HStockOrgName:"",
          HUnitCode:"",
          HUnitID:0,
          HUnitName:"",
          HUseLife:0,
          HWHCode:"",
          HWHID:0,
          HWHName:"",
          HSCWHID:0,
          HSCWHCode:"",
          HSCWHName:"",
          HSCSPID:0,
          HSCSPCode:"",
          HSCSPName:"",
          HRemark:"",
            "HMaterID": "0"
            , "HMaterNumber": ""
            , "HMaterName": ""
            , "HMaterModel": ""
            , "HUnitID": "0"
            , "HUnitNumber": ""
            , "HUnitName": ""
            , "HBatchNo": ""
            , "HQty": "0"
            , "HWHID": "0"
            , "HWHNumber": ""
            , "HWHName": ""
            , "HSPID": "0"
            , "HSPNumber": ""
            , "HSPName": ""
            , "HSCWHID": "0"
            , "HSCWHNumber": ""
            , "HSCWHName": ""
            , "HSCSPID": "0"
            , "HSCSPNumber": ""
            , "HSCSPName": ""
            , "HSourceInterID": "0"
            , "HSourceEntryID": "0"
            , "HSourceBillType": ""
            , "HSourceBillNo": ""
            , "HRelationQty": "0"
            , "HRelationMoney": "0"
            , "HRemark": ""
            , "HPropertyID": "0"
            , "HSecUnitID": "0"
            , "HSecUnitRate": "0"
            , "HQtyMust": "0"
            , "HPrice": "0"
            , "HMoney": "0"
            , "HDesignLife": "0"
            , "HLeaveLife": "0"
            , "HPOOrderInterID": "0"
            , "HPOOrderEntryID": "0"
            , "HPOOrderBillNo": ""
            , "HSeOrderInterID": "0"
            , "HSeOrderEntryID": "0"
            , "HSeOrderBillNo": ""
            , "HSTOCKORGID": sessionStorage["OrganizationID"] - 0
            , "HOtherOrgID": sessionStorage["OrganizationID"] - 0
            , "HOWNERID": sessionStorage["OrganizationID"] - 0
            , "HOWNERTYPEID": ""
            , "HUseLife": "0"
            , "HUseLifeQty": "0"
            , "HNewLifeQty": "0"
            , "HQtyRel": "0"
            , "HSPGroupID": "0"
            , "HNewModel": ""
            , "HWallThickness": ""
            , "HHardness": ""
            , "HLastProdModel": ""
            , "HDiameter": ""
            , "HBackFlag": ""
            , "HBarCode": ""
            , "HMouldType": "0"
            , "HInitModel": ""
            , "HInitDesignLife": "0"
            , "HLifeUnitID": "0"
            , "HNowModel": ""
            , "HNowLife": "0"
            , "HCorrespondentTypeID": "0"
            , "HCorrespondentID": "0"
        }
        if (index) {
          this.editData.splice(index, 0, obj);
@@ -931,7 +1194,7 @@
          let fhck = false
          if(this.editData.length == 0){
              fhck = true
              this.$modal.msgError("没有物料明细记录!");
              this.$modal.msgError("没有明细记录!");
          }
          this.editData.map((item, index) => {
            if (!item.HMaterID) {
@@ -943,19 +1206,31 @@
            }else if(!item.HSCWHID){
              fhck = true
              this.$modal.msgError("第" + (index + 1) + "行:调出仓库未选择!");
            }else if(!item.HUnitID){
              fhck = true
              this.$modal.msgError("第" + (index + 1) + "行:计量单位为空!");
            }else if(item.HQty == 0){
              fhck = true
              this.$modal.msgError("第" + (index + 1) + "行:数量不能为0!");
            }
          })
          this.$nextTick(() => {
            if (!fhck) {
              if(this.OperationType == 3){
                this.form.HInterID = this.linterid
              var Operation = null
              if(!this.OperationType){
                Operation = 1
              }else{
                Operation = this.OperationType
                if(Operation == 2){
                  this.form.HInterID = this.linterid
                }
              }
              var sMainStr = JSON.stringify(this.form);
              var sSubStr = JSON.stringify(this.editData);
              var sMainSub = sMainStr + ';' + sSubStr + ';' + sessionStorage["HUserName"];
              var sMainSub = sMainStr + ';' + sSubStr + ';' + Operation + ";" + sessionStorage["HUserName"];
              axios({
                method: 'post',
                url: this.baseURL + "/Sc_MouldProdMoveBill/SaveGetMouldProdMoveBillList",
                url: this.baseURL + "/Sc_MouldProdMoveBillController/GetSc_MouldProdMoveBill_Save_Json",
                data: {
                  'msg': sMainSub
                },
@@ -984,12 +1259,13 @@
    set_CheckBill(num, form) {
      var InterID = form.hmainid || form.HInterID
      //逻辑审核方法
      axios.get(this.baseURL + "/Sc_MouldProdMoveBill/AuditMouldProdMoveBill", {
        params: { "HInterID": InterID, "flag": num, "user": sessionStorage["HUserName"] }
      axios.get(this.baseURL + "/Sc_MouldProdMoveBillController/GetSc_MouldProdMoveBill_Check_Json", {
        params: { "HInterID": InterID, "Type": num, "HMaker": sessionStorage["HUserName"] }
      }).then(response => {
        let result = response.data
        if (result.code == 1) {
          this.$modal.msgSuccess('操作成功');
          this.close()
        }
        else {
          this.$modal.msgError("错误:" + result.code + result.Message,);
@@ -1006,6 +1282,7 @@
      this.gyCustomerShow = false
      this.gyMouldShow = false
      this.gyStockPlaceShow = false
      this.scMouldMoveShow = false
    },
    //  打开数据列表弹窗
    openDataDialog(num, row) {
@@ -1046,8 +1323,31 @@
        this.dialogTitle = '仓位列表'
        this.gyStockPlaceShow = true
        this.openData = true
      } else if (num == 3850) {
        this.dialogTitle = '器具调拨申请单列表'
        this.scMouldMoveShow = true
        this.openData = true
      } 
    },
    //根据往来类型判断往来单位
    openDataDialogChoose(){
      if(this.form.HSupTypeID == 1){
        this.openDataDialog(6)
      }else if(this.form.HSupTypeID == 2){
        this.openDataDialog(7)
      }else if(this.form.HSupTypeID == 3){
        this.deptType = 2
        this.openDataDialog(1)
      }
    },
    //选择源单
    get_checkMainSource(){
      if(this.form.HSourceBillType == "3850"){
        this.openDataDialog(3850)
      }else{
        this.$modal.msgError("未查询到所选源单类型相关单据信息!");
      }
    },
  }
};
</script>
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 {
src/views/scMould/warehouse/Sc_MouldProdOutBillList.vue
@@ -25,30 +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 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.HStockOrgID" 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>
            <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>
@@ -61,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>
@@ -71,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>
@@ -84,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>
@@ -93,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>
@@ -105,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>
@@ -246,7 +252,8 @@
        { label: '近半年', value: 180 },
        { label: '近一年', value: 365 },
      ],
      hPriceTypeList: ['成本价', '结算价'],
      organizationList: JSON.parse(sessionStorage.getItem('organizationList')),//组织列表
      HStatusList: [{name:'全部',value:'-1'},{name:'未审核',value:'0'},{name:'已审核',value:'1'},{name:'已关闭',value:'2'}],
      addBtnShow: false,
      dialogTitle: '',
      OperationType: null,//保存类型(新增1修改3)
@@ -264,11 +271,10 @@
      queryParams: {
        HBillNo: '',
        HInitTimeCycle: 29,
        HStockOrgName: '',
        HStockOrgID: sessionStorage["OrganizationID"] - 0,
        HStatus:'-1',
        HDept:'',
        HMaterNumber: '',
        HModelNumber:'',
        HWhName:'',
        HSupName:'',
        ColName1: '',
        ColName2: '',
@@ -367,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.HStockOrgID
      if (this.pageSize == 0) {
        this.pageSize = 50
      }
      // 销售出库单列表
      axios.get(this.baseURL + '/Sc_MouldProdOutBill/list_byPage', {
      // 分页查询
      axios.get(this.baseURL + '/Sc_MouldProdOutBillController/page', {
        params: {
          "sWhere": this.sWhere,
          "user": sessionStorage["HUserName"],
          "Organization": sessionStorage["Organization"],
          "page": this.page,
          "size": this.pageSize
          "size": this.pageSize,
          "Type":'3802',
        },
      }).then(response => {
        this.tyResList = response.data.data//总数据
@@ -577,7 +586,7 @@
    //双击行
    handleDblclick(row, column, cell, event) {
      this.OperationType = 3
      this.handleEdit()
      this.handleEdit(row)
    },
    // 多选框选中数据
    handleSelectionChange(selection) {
@@ -655,34 +664,43 @@
        }
        this.sWhere += " and " + this.queryParams.ColName2 + " " + com2;
      }
      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.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 + "'";
        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()
    },
    /** 重置按钮操作 */
@@ -691,11 +709,10 @@
      this.queryParams = {
        HBillNo: '',
        HInitTimeCycle: 29,
        HStockOrgName: '',
        HStockOrgID: sessionStorage["OrganizationID"] - 0,
        HStatus:'-1',
        HDept:'',
        HMaterNumber: '',
        HModelNumber:'',
        HWhName:'',
        HSupName:'',
        ColName1: '',
        ColName2: '',
@@ -709,6 +726,7 @@
      }
      this.riqiChange()
      this.resetForm("queryForm")
      this.clearData()
      this.getList()
    },
@@ -718,6 +736,7 @@
      this.tableShow = true
      this.openEdit = false
      this.editShow = false
      this.clearData()
      this.getList()
    },
    //打开新增组件弹窗
@@ -737,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() {
@@ -766,6 +794,7 @@
        let result = response.data
        if (result.count == 1) {
          this.$modal.msgSuccess('操作成功');
          this.clearData()
          this.getList();
        }
        else {