wangyi
3 天以前 a09b902158cbeea0c17b1d1f16a0697a176d56bf
容器申请单和容器退库入库单添加了托数
4个文件已修改
204 ■■■■■ 已修改文件
src/views/scMould/warehouse/Sc_MouldInRequestBillList.vue 49 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/scMould/warehouse/Sc_MouldOutRequestBillList.vue 52 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/scMould/warehouse/Sc_MouldProdBackBillList.vue 54 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/scMould/warehouse/Sc_MouldProdOutBillList.vue 49 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/scMould/warehouse/Sc_MouldInRequestBillList.vue
@@ -131,6 +131,10 @@
        <el-button type="primary" icon="el-icon-edit" size="mini" :disabled="single"
          @click="handleEdit(row = rowForm, OperationType = 2)">编辑</el-button>
      </el-col>
       <el-col :span="1.5">
        <el-button type="primary" icon="el-icon-Pallet" size="mini" :disabled="single" @click="set_PalletChange">托数变更
        </el-button>
      </el-col>
      <!-- <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>
@@ -864,6 +868,51 @@
          });
      }).catch(() => { })
    },
    // 托数变更
     set_PalletChange() {
      if (this.rowList.length !== 1) {
        this.$modal.msgWarning('请选择一行数据进行托数变更!')
        return
      }
      const rowData = this.rowList[0]
      const currentPallet = rowData.托数 || 0
      // 将"请输入新托数"作为输入框的placeholder
      this.$prompt(`当前托数:${currentPallet}`, {
        confirmButtonText: '保存',
        cancelButtonText: '取消',
        inputValue: currentPallet,
        inputType: 'number',
        inputValidator: (value) => {
          if (!value) return '请输入托数!'
          const num = parseInt(value)
          if (isNaN(num)) return '请输入有效的数字!'
          if (num.toString() !== value) return '托数不能为小数!'
          if (num <= 0) return '托数必须大于0!'
          return true
        }
      }).then(({ value }) => {
        const newPallet = parseInt(value)
        return axios.post(this.baseURL + '/Sc_MouldOutRequestBill/UpdatePallet', {
          hmainid: rowData.hmainid,
          newPallet: newPallet,
          operator: sessionStorage["HUserName"]
        })
      }).then(response => {
        if (response.data && response.data.count == 1) {
          this.$modal.msgSuccess('托数变更成功!')
          this.getList()
        } else {
          this.$modal.msgError('错误:' + (response.data.Message || '保存失败'))
        }
      }).catch(error => {
        if (error !== 'cancel') {
          this.$modal.msgError('操作失败:' + error.message)
        }
      })
    },
    // 反审核/审核数据
    set_CheckBill(num, form) {
      var InterID = form.hmainid || form.HInterID
src/views/scMould/warehouse/Sc_MouldOutRequestBillList.vue
@@ -131,6 +131,10 @@
        <el-button type="primary" icon="el-icon-edit" size="mini" :disabled="single"
          @click="handleEdit(row = rowForm, OperationType = 2)">编辑</el-button>
      </el-col>
        <el-col :span="1.5">
        <el-button type="primary" icon="el-icon-Pallet" size="mini" :disabled="single" @click="set_PalletChange">托数变更
        </el-button>
      </el-col>
      <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>
@@ -848,7 +852,7 @@
      this.copyType = 0
    },
    /** 删除按钮操作 */
    handleDelete() {
     handleDelete() {
      this.$modal.confirm('确认要删除吗,删除后不能恢复').then(() => {
        axios.get(this.baseURL + "/Sc_MouldOutRequestBillController/GetSc_MouldOutRequestBill_Delete_Json", {
            params: { 'HInterID': this.rowForm.hmainid.toString(), 'HMaker': sessionStorage["HUserName"] }
@@ -864,6 +868,52 @@
          });
      }).catch(() => { })
    },
    //托数变更
    set_PalletChange() {
      if (this.rowList.length !== 1) {
        this.$modal.msgWarning('请选择一行数据进行托数变更!')
        return
      }
      const rowData = this.rowList[0]
      const currentPallet = rowData.托数 || 0
      // 将"请输入新托数"作为输入框的placeholder
      this.$prompt(`当前托数:${currentPallet}`, {
        confirmButtonText: '保存',
        cancelButtonText: '取消',
        inputValue: currentPallet,
        inputType: 'number',
        inputValidator: (value) => {
          if (!value) return '请输入托数!'
          const num = parseInt(value)
          if (isNaN(num)) return '请输入有效的数字!'
          if (num.toString() !== value) return '托数不能为小数!'
          if (num <= 0) return '托数必须大于0!'
          return true
        }
      }).then(({ value }) => {
        const newPallet = parseInt(value)
        return axios.post(this.baseURL + '/Sc_MouldOutRequestBillController/UpdatePallet', {
          hmainid: rowData.hmainid,
          newPallet: newPallet,
          operator: sessionStorage["HUserName"]
        })
      }).then(response => {
        if (response.data && response.data.count == 1) {
          this.$modal.msgSuccess('托数变更成功!')
          this.getList()
        } else {
          this.$modal.msgError('错误:' + (response.data.Message || '保存失败'))
        }
      }).catch(error => {
        if (error !== 'cancel') {
          this.$modal.msgError('操作失败:' + error.message)
        }
      })
    },
    // 反审核/审核数据
    set_CheckBill(num, form) {
      var InterID = form.hmainid || form.HInterID
src/views/scMould/warehouse/Sc_MouldProdBackBillList.vue
@@ -131,6 +131,10 @@
        <el-button type="primary" icon="el-icon-edit" size="mini" :disabled="single"
          @click="handleEdit(row = rowForm, OperationType = 2)">编辑</el-button>
      </el-col>
       <el-col :span="1.5">
        <el-button type="primary" icon="el-icon-Pallet" size="mini" :disabled="single" @click="set_PalletChange">托数变更
        </el-button>
      </el-col>
      <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>
@@ -186,6 +190,7 @@
        <RowSettings :colName="btResList" :HModName="HModName" @rowEditClose="rowSetClose"
          v-if="rowHideShow" />
      </el-dialog>
      <!-- 编辑 -->
      <el-dialog title="编辑容器领用退库单" :visible.sync="openEdit" width="1480px" append-to-body class="xsckdBox" @close="close">
        <edit :OperationType=OperationType :linterid=this.rowForm.hmainid :HSouceBillType=this.rowForm.HSourceBillType
@@ -578,6 +583,9 @@
      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 }) {
@@ -769,6 +777,52 @@
      this.OperationType = 0
      this.copyType = 0
    },
   //托数变更
    set_PalletChange() {
      if (!this.rowForm || !this.rowForm.hmainid) {
        this.$modal.msgError('请先选择一条记录!')
        return
      }
      const rowData = this.rowForm // 使用 rowForm 而不是 rowList
      const currentPallet = rowData.托数 || 0
      // 将"请输入新托数"作为输入框的placeholder
      this.$prompt(`当前托数:${currentPallet}`, {
        confirmButtonText: '保存',
        cancelButtonText: '取消',
        inputValue: currentPallet,
        inputType: 'number',
        inputValidator: (value) => {
          if (!value) return '请输入托数!'
          const num = parseInt(value)
          if (isNaN(num)) return '请输入有效的数字!'
          if (num.toString() !== value) return '托数不能为小数!'
          if (num <= 0) return '托数必须大于0!'
          return true
        }
      }).then(({ value }) => {
        const newPallet = parseInt(value)
        return axios.post(this.baseURL + '/Sc_MouldProdBackBillController/UpdatePallet', {
          hmainid: rowData.hmainid,
          newPallet: newPallet,
          operator: sessionStorage["HUserName"]
        })
      }).then(response => {
        if (response.data && response.data.count == 1) {
          this.$modal.msgSuccess('托数变更成功!')
          this.getList()
        } else {
          this.$modal.msgError('错误:' + (response.data.Message || '保存失败'))
        }
      }).catch(error => {
        if (error !== 'cancel') {
          this.$modal.msgError('操作失败:' + error.message)
        }
      })
    },
    /** 删除按钮操作 */
    handleDelete() {
      this.$modal.confirm('确认要删除吗,删除后不能恢复').then(() => {
src/views/scMould/warehouse/Sc_MouldProdOutBillList.vue
@@ -131,6 +131,10 @@
        <el-button type="primary" icon="el-icon-edit" size="mini" :disabled="single"
          @click="handleEdit(row = rowForm, OperationType = 2)">编辑</el-button>
      </el-col>
       <el-col :span="1.5">
        <el-button type="primary" icon="el-icon-Pallet" size="mini" :disabled="single" @click="set_PalletChange">托数变更
        </el-button>
      </el-col>
      <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>
@@ -806,6 +810,51 @@
        this.$modal.msgError("接口请求失败!");
      });
    },
    set_PalletChange() {
      if (!this.rowForm || !this.rowForm.hmainid) {
        this.$modal.msgError('请先选择一条记录!')
        return
      }
      const rowData = this.rowForm // 使用 rowForm 而不是 rowList
      const currentPallet = rowData.托数 || 0
      // 将"请输入新托数"作为输入框的placeholder
      this.$prompt(`当前托数:${currentPallet}`, {
        confirmButtonText: '保存',
        cancelButtonText: '取消',
        inputValue: currentPallet,
        inputType: 'number',
        inputValidator: (value) => {
          if (!value) return '请输入托数!'
          const num = parseInt(value)
          if (isNaN(num)) return '请输入有效的数字!'
          if (num.toString() !== value) return '托数不能为小数!'
          if (num <= 0) return '托数必须大于0!'
          return true
        }
      }).then(({ value }) => {
        const newPallet = parseInt(value)
        return axios.post(this.baseURL + '/Sc_MouldProdOutBill/UpdatePallet', {
          hmainid: rowData.hmainid,
          newPallet: newPallet,
          operator: sessionStorage["HUserName"]
        })
      }).then(response => {
        if (response.data && response.data.count == 1) {
          this.$modal.msgSuccess('托数变更成功!')
          this.getList()
        } else {
          this.$modal.msgError('错误:' + (response.data.Message || '保存失败'))
        }
      }).catch(error => {
        if (error !== 'cancel') {
          this.$modal.msgError('操作失败:' + error.message)
        }
      })
    },
    //导出
    handleExport() {
      const ws = this.$XLSX.utils.json_to_sheet(this.tyResList); // 将数据转换为工作表