| | |
| | | <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" /> |
| | |
| | | <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-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> |
| | | </el-col> --> |
| | | <el-col :span="1.5"> |
| | | <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">删除 |
| | |
| | | <el-button type="primary" icon="el-icon-edit-outline" size="mini" :disabled="single" |
| | | @click="set_CheckBill(2, form = rowForm)">返审核</el-button> |
| | | </el-col> |
| | | <el-col :span="1.5"> |
| | | <!-- <el-col :span="1.5"> |
| | | <el-button type="primary" icon="el-icon-edit-outline" size="mini" :disabled="multiple" |
| | | @click="set_CheckBillAll(1, ids)">审核(批量)</el-button> |
| | | </el-col> |
| | | <el-col :span="1.5"> |
| | | <el-button type="primary" icon="el-icon-edit-outline" size="mini" :disabled="multiple" |
| | | @click="set_CheckBillAll(2, ids)">返审核(批量)</el-button> |
| | | </el-col> |
| | | </el-col> --> |
| | | <!-- <el-col :span="1.5"> |
| | | <el-button type="primary" icon="el-icon-download" size="mini" @click="handleExport">导出</el-button> |
| | | </el-col> --> |
| | |
| | | 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="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' |
| | |
| | | import axios from 'axios' |
| | | import RowSettings from '@/views/component/rowSettings' |
| | | import Edit from '@/views/scMould/warehouse/Sc_MouldInRequestBillEdit' |
| | | import Push from '@/views/scMould/warehouse/Sc_MouldProdBackBillEdit' |
| | | import PrintList from '@/views/component/printList' |
| | | import moment from 'moment'; |
| | | |
| | | export default { |
| | | name: 'Sc_MouldInRequestBillList', |
| | | components: { RowSettings, Edit, PrintList }, |
| | | components: { RowSettings, Edit, Push,PrintList }, |
| | | props: { |
| | | openPage: { type: String, }, |
| | | HOrgID: { type: String, }, |
| | | }, |
| | | data() { |
| | | return { |
| | | HModName: "Sc_MouldInRequestBillList", |
| | | rowList:[], |
| | | activeSeach: '', |
| | | editShow: false, |
| | | openEdit: false, |
| | | pushShow: false, |
| | | openPush: false, |
| | | pushData:'', |
| | | totalNameList: [], |
| | | tableShow: true, |
| | | openPrintList: false, |
| | |
| | | page: 1, |
| | | pageSize: 0, |
| | | total: 0, |
| | | BillType:'3851', |
| | | }; |
| | | }, |
| | | created() { |
| | | // this.fetchData() |
| | | if(this.openPage && this.HOrgID){ |
| | | this.queryParams.HStockOrgID = this.HOrgID |
| | | } |
| | | this.riqiChange() |
| | | this.getList(); |
| | | }, |
| | |
| | | this.pageSize = 50 |
| | | } |
| | | // 销售出库单列表 |
| | | axios.get(this.baseURL + '/Sc_MouldInRequestBillController/page', { |
| | | axios.get(this.$baseUrl + '/Sc_MouldInRequestBillController/page', { |
| | | params: { |
| | | "sWhere": this.sWhere, |
| | | "user": sessionStorage["HUserName"], |
| | | "page": this.page, |
| | | "size": this.pageSize, |
| | | "Type": '3851' |
| | | "Type": this.BillType, |
| | | }, |
| | | }).then(response => { |
| | | this.tyResList = response.data.data//总数据 |
| | |
| | | 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("接口请求失败!"); |
| | |
| | | }, |
| | | 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, |
| | |
| | | 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" } |
| | | } |
| | | }, |
| | |
| | | // 多选框选中数据 |
| | | 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) { |
| | |
| | | this.tableShow = true |
| | | this.openEdit = false |
| | | this.editShow = false |
| | | this.openPush = false |
| | | this.pushShow = false |
| | | this.clearData() |
| | | this.getList() |
| | | }, |
| | |
| | | this.editShow = true |
| | | this.openEdit = true |
| | | }, |
| | | //打开下推组件弹窗 |
| | | handlePush() { |
| | | if (this.rowList && this.rowList.length > 0) { |
| | | var dataArray = []; |
| | | var HSupTypeID_Temp = this.rowList[0].HSupTypeID |
| | | for (var i = 0; i < this.rowList.length; i++) { |
| | | if (this.rowList[i].单据状态 != "已审核") { |
| | | this.$modal.msgError("下推失败!所选单据【" + this.rowList[i].单据号 + "】不为已审核状态,不允许下推!") |
| | | return; |
| | | } |
| | | if (this.rowList[i].HQtyMust <= 0) { |
| | | this.$modal.msgError("下推失败!所选单据【" + this.rowList[i].单据号 + "】对应可下推数量必须大于 0 !") |
| | | return; |
| | | } |
| | | if (this.rowList[i].HSupTypeID != HSupTypeID_Temp) { |
| | | this.$modal.msgError("下推失败!所选单据对应往来类型必须一致!") |
| | | 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.pushData = JSON.stringify(datajson) |
| | | this.pushShow = true |
| | | this.openPush = true |
| | | } else { |
| | | this.$modal.msgError("请选择数据下推!") |
| | | } |
| | | }, |
| | | //关闭编辑页面 |
| | | editClose(val) { |
| | | this.open = val |
| | | this.editShow = false |
| | | this.openEdit = val |
| | | this.clearData() |
| | | this.getList() |
| | | }, |
| | | //关闭下推页面 |
| | | pushClose(val) { |
| | | this.open = val |
| | | this.pushShow = false |
| | | this.openPush = val |
| | | this.clearData() |
| | | this.getList() |
| | | }, |
| | |
| | | /** 删除按钮操作 */ |
| | | handleDelete() { |
| | | this.$modal.confirm('确认要删除吗,删除后不能恢复').then(() => { |
| | | axios.get(this.baseURL + "/Sc_MouldInRequestBillController/GetSc_MouldInRequestBill_Delete_Json", { |
| | | axios.get(this.$baseUrl + "/Sc_MouldInRequestBillController/GetSc_MouldInRequestBill_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("接口请求失败!"); |
| | | }); |
| | | }).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 |
| | | //逻辑审核方法 |
| | | axios.get(this.baseURL + "/Sc_MouldInRequestBillController/GetSc_MouldInRequestBill_Check_Json", { |
| | | axios.get(this.$baseUrl + "/Sc_MouldInRequestBillController/GetSc_MouldInRequestBill_Check_Json", { |
| | | params: { "HInterID": InterID, "Type": num, "HMaker": sessionStorage["HUserName"] } |
| | | }).then(response => { |
| | | let result = response.data |
| | |
| | | // 批量反审核/审核数据 |
| | | set_CheckBillAll(num, ids) { |
| | | //逻辑审核方法 |
| | | axios.get(this.baseURL + "/Sc_MouldInRequestBillController/CheckAll", { |
| | | axios.get(this.$baseUrl + "/Sc_MouldInRequestBillController/CheckAll", { |
| | | params: { "ids": ids, "Type": num, "HMaker": sessionStorage["HUserName"] } |
| | | }).then(response => { |
| | | let result = response.data |
| | |
| | | } 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 |
| | |
| | | //#region 获取公司名,根据公司进行定制化开发 |
| | | defaintOperationByCompanyName() { |
| | | var result = false; |
| | | axios.get(this.baseURL + '/Xt_getInfo/getCompanyName').then(response => { |
| | | axios.get(this.$baseUrl + '/Xt_getInfo/getCompanyName').then(response => { |
| | | var data1 = response.data |
| | | if (data1.count == 1) { |
| | | if (data1.data == "水务") { |