陈婷婷
82 分钟以前 7b849f06f0b0986b3955c1d1d91a0b2a79fa7ea6
src/views/scMould/warehouse/Sc_MouldMoveStockRequestBillList.vue
@@ -40,8 +40,8 @@
            <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 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" />
@@ -136,8 +136,8 @@
          @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-button type="primary" icon="el-icon-tickets" size="mini"
          @click="handlePush(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">删除
@@ -149,7 +149,7 @@
      </el-col>
      <el-col :span="1.5">
        <el-button type="primary" icon="el-icon-edit-outline" size="mini" :disabled="single"
          @click="set_CheckBill(2, form = rowForm)">返审核</el-button>
          @click="set_CheckBill(2, form = rowForm)">反审核</el-button>
      </el-col>
      <!-- <el-col :span="1.5">
        <el-button type="primary" icon="el-icon-download" size="mini" @click="handleExport">导出</el-button>
@@ -174,7 +174,7 @@
            <template slot-scope="{row,  column }">
              <el-checkbox v-model="checked" v-if="item.type == 'checkbox'"></el-checkbox>
              <div :style="item.style">
                <span v-if="column.property.includes('日期')">{{ parseTime(row[column.property], '{y}-{m}-{d}') }}</span>
                <span v-if="column.property.includes('日期')">{{ parseTime(row[column.property], '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
                <el-button type="text" @click="handleEdit(row, OperationType = 2)"
                  v-else-if="column.property == '单据号'">{{row.单据号}}</el-button>
                <span v-else>{{ row[column.label] }}</span>
@@ -189,14 +189,14 @@
          v-if="rowHideShow" />
      </el-dialog>
      <!-- 编辑 -->
      <el-dialog title="编辑器具调拨申请单" :visible.sync="openEdit" width="1480px" append-to-body class="xsckdBox" @close="close">
      <el-dialog title="编辑容器调拨申请单" :visible.sync="openEdit" width="1480px" append-to-body class="xsckdBox" @close="close">
        <edit :OperationType=OperationType :linterid=this.rowForm.hmainid :HSouceBillType=this.rowForm.HSourceBillType
          :copyType="copyType" @editClose="editClose" v-if="editShow" />
      </el-dialog>
      <!-- 下推 -->
      <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 title="下推容器直接调拨单" :visible.sync="openPush" width="1480px" append-to-body class="xsckdBox" @close="close">
        <push :OperationType='4' :propsData='pushData' :HSouceBillType=BillType
         @editClose="pushClose" v-if="pushShow" />
      </el-dialog>
      <el-dialog title="打印模板选择" :visible.sync="openPrintList" width="800px" append-to-body>
        <PrintList :linterid=this.rowForm.hmainid :MyMsg=this.rowForm.hmainid :Type='HModName'
@@ -211,13 +211,13 @@
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 Push from '@/views/scMould/warehouse/Sc_MouldProdMoveBillEdit'
import PrintList from '@/views/component/printList'
import moment from 'moment';
export default {
  name: 'Sc_MouldMoveStockRequestBillList',
  components: { RowSettings, Edit, Move,PrintList },
  components: { RowSettings, Edit, Push,PrintList },
  props: {
    openPage: { type: String, },
    HOrgID: { type: String, },
@@ -229,9 +229,9 @@
      activeSeach: '',
      editShow: false,
      openEdit: false,
      moveShow: false,
      openMove: false,
      moveData:'',
      pushShow: false,
      openPush: false,
      pushData:'',
      totalNameList: [],
      tableShow: true,
      openPrintList: false,
@@ -403,7 +403,7 @@
        this.pageSize = 50
      }
      // 列表
      axios.get(this.baseURL + '/Sc_MouldMoveStockRequestBillController/page', {
      axios.get(this.$baseUrl + '/Sc_MouldMoveStockRequestBillController/page', {
        params: {
          "sWhere": this.sWhere,
          "user": sessionStorage["HUserName"],
@@ -447,6 +447,8 @@
          option.data = data1.data
          this.dataList = option
          this.DisPlay_HideColumn(this.HModName, sessionStorage["HUserName"], option, this.dataList);
        }else{
          this.$modal.msgError(response.data.Message);
        }
      }).catch(error => {
        this.$modal.msgError("接口请求失败!");
@@ -454,7 +456,7 @@
    },
    DisPlay_HideColumn(HModName, user, option, dataOption) {
      this.totalNameList = []
      axios.get(this.baseURL + '/Xt_grdAlignment_WMES/grdAlignmentWMESList', {
      axios.get(this.$baseUrl + '/Xt_grdAlignment_WMES/grdAlignmentWMESList', {
        params: {
          "HModName": HModName,
          "user": user,
@@ -759,6 +761,8 @@
      this.tableShow = true
      this.openEdit = false
      this.editShow = false
      this.openPush = false
      this.pushShow = false
      this.clearData()
      this.getList()
    },
@@ -775,26 +779,26 @@
      this.openEdit = true
    },
    //打开下推组件弹窗
    handleMove() {
      if (this.rowList.length > 0) {
    handlePush() {
      if (this.rowList && 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].单据号 + "】不为已审核状态,不允许下推!")
                this.$modal.msgError("下推失败!所选单据【" + this.rowList[i].单据号 + "】不为已审核状态,不允许下推!")
                return;
            }
            if (this.rowList[i].HQtyMust <= 0) {
                this.$modal.msgSuccess("下推失败!所选单据【" + this.rowList[i].单据号 + "】对应可下推数量必须大于 0 !")
                this.$modal.msgError("下推失败!所选单据【" + this.rowList[i].单据号 + "】对应可下推数量必须大于 0 !")
                return;
            }
            if (this.rowList[i].HSupTypeID != HSupTypeID_Temp) {
                this.$modal.msgSuccess("下推失败!所选单据对应往来类型必须一致!")
                this.$modal.msgError("下推失败!所选单据对应往来类型必须一致!")
                return;
            }
            if (this.rowList[i].HSTOCKORGINID != HStockInOrgID_Temp) {
                this.$modal.msgSuccess("下推失败!所选单据对应调入组织必须一致!")
                this.$modal.msgError("下推失败!所选单据对应调入组织必须一致!")
                return;
            }
            var temp = {
@@ -807,11 +811,11 @@
        var datajson = {
            "data": dataArray
        };
        this.moveData = JSON.stringify(datajson)
        this.moveShow = true
        this.openMove = true
        this.pushData = JSON.stringify(datajson)
        this.pushShow = true
        this.openPush = true
      } else {
          layer.msg('请选择数据下推!');
          this.$modal.msgError("请选择数据下推!")
      }
    },
    //关闭编辑页面
@@ -823,10 +827,10 @@
      this.getList()
    },
    //关闭下推页面
    moveClose(val) {
    pushClose(val) {
      this.open = val
      this.editShow = false
      this.openEdit = val
      this.pushShow = false
      this.openPush = val
      this.clearData()
      this.getList()
    },
@@ -841,14 +845,14 @@
    /** 删除按钮操作 */
    handleDelete() {
      this.$modal.confirm('确认要删除吗,删除后不能恢复').then(() => {
        axios.get(this.baseURL + "/Sc_MouldMoveStockRequestBillController/GetSc_MouldMoveStockRequestBill_Delete_Json", {
        axios.get(this.$baseUrl + "/Sc_MouldMoveStockRequestBillController/GetSc_MouldMoveStockRequestBill_Delete_Json", {
            params: { 'HInterID': this.rowForm.hmainid.toString(), 'HMaker': sessionStorage["HUserName"] }
          }).then(response => {
            if (response.data.count == 1) {
              this.getList()
              this.$modal.msgSuccess("删除成功")
            } else {
              this.$modal.msgError("错误:" + result.code + result.Message);
              this.$modal.msgError("错误:" + response.data.code + response.data.Message);
            }
          }).catch(error => {
            this.$modal.msgError("接口请求失败!");
@@ -859,7 +863,7 @@
    set_CheckBill(num, form) {
      var InterID = form.hmainid || form.HInterID
      //逻辑审核方法
      axios.get(this.baseURL + "/Sc_MouldMoveStockRequestBillController/GetSc_MouldMoveStockRequestBill_Check_Json", {
      axios.get(this.$baseUrl + "/Sc_MouldMoveStockRequestBillController/GetSc_MouldMoveStockRequestBill_Check_Json", {
        params: { "HInterID": InterID, "Type": num, "HMaker": sessionStorage["HUserName"] }
      }).then(response => {
        let result = response.data
@@ -889,7 +893,7 @@
      } else if (this.rowForm.状态 != "已审核" && !this.defaintOperationByCompanyName()) {
        this.$modal.msgError("打印失败!原因:单据状态不为'已审核'状态!!");
      } else {
        axios.get(this.baseURL + "/Kf_SellOutBill/CheckSellOutBill_IsExist", {
        axios.get(this.$baseUrl + "/Kf_SellOutBill/CheckSellOutBill_IsExist", {
          params: { "HInterID": this.rowForm.hmainid }
        }).then(response => {
          var result = response.data