|
@@ -47,630 +47,817 @@
|
|
|
<el-button type="primary" :loading="confirmLoading" @click="handleAdd">确 定</el-button>
|
|
|
</span>
|
|
|
</el-dialog>
|
|
|
+ <!-- 冰排使用记录 -->
|
|
|
+ <div class="card_iceTracing">
|
|
|
+ <el-dialog fullscreen title="冰排使用记录追溯" :visible.sync="iceTracingVisible" @close="iceTracingDialog">
|
|
|
+ <div style="box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);border-radius: 8px;">
|
|
|
+ <div class="space_between_in" style="margin: 0px 10px 10px 10px;padding-top: 10px;">
|
|
|
+ <div>
|
|
|
+ <el-form ref="userRecordRuleForm" :inline="true" :model="formInline" class="demo-form-inline">
|
|
|
+ <el-form-item label="编号" prop="code">
|
|
|
+ <el-input v-model="formInline.code" placeholder="请输入冰排编号" @input="codeInput"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="保温箱" prop="coolerBoxId">
|
|
|
+ <el-select v-model="formInline.coolerBoxId" placeholder="选择保温箱" @change="changeSelect"
|
|
|
+ v-loadmore="(params) => handleScroll('coolerBoxId')">
|
|
|
+ <el-option v-for="(element, i) in incubatorData" :label="element.label" :value="`${element.value}`"
|
|
|
+ :key="i" />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="使用日期" prop="dateService">
|
|
|
+ <el-date-picker v-model="formInline.dateService" type="datetimerange" range-separator="至"
|
|
|
+ start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy-MM-dd hh:mm:ss"
|
|
|
+ @change="timeChange">
|
|
|
+ </el-date-picker>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item>
|
|
|
+ <el-button size="medium" icon="el-icon-search" type="primary" @click="searchProtocol">搜索</el-button>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item>
|
|
|
+ <el-button size="medium" icon="el-icon-refresh" @click="searchReset">重置</el-button>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item>
|
|
|
+ <el-button type="success" :loading="exportFlag" @click="download">导出Excel</el-button>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <tables :historyFlag="true" :tableList="usageLogList" :tableData="usageLogData">
|
|
|
+ </tables>
|
|
|
+ <!-- 分页 -->
|
|
|
+ <div v-if="usageLogTotal">
|
|
|
+ <pagination :total="usageLogTotal" :currentPage="usageLogPagination.PageIndex" @changeSize="usageLogSize"
|
|
|
+ @changeCurrent="usageLogCurrent">
|
|
|
+ </pagination>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
- import {
|
|
|
- getIceRaftNewest,
|
|
|
- iceraftIn,
|
|
|
- iceraftOut,
|
|
|
- getIceRaftRecord,
|
|
|
- putIceRaftRecord,
|
|
|
- delIceRaftRecord
|
|
|
- } from '@/api/iceRaft'
|
|
|
- import {
|
|
|
- getIcelocker,
|
|
|
- } from '@/api/refrigerator'
|
|
|
- import {
|
|
|
- getCoolerBox
|
|
|
- } from '@/api/incubator.js'
|
|
|
- import actionBar from '@/components/actionBar'
|
|
|
- import tables from '@/components/tables'
|
|
|
- import pagination from '@/components/pagination'
|
|
|
- import forms from '@/components/forms'
|
|
|
- import {
|
|
|
- employee,
|
|
|
- historyRecord,
|
|
|
- iceRaftRules,
|
|
|
- freezerRules,
|
|
|
- editRules
|
|
|
- } from "./iceRaft.js";
|
|
|
- export default {
|
|
|
- name: 'IceManagement',
|
|
|
- components: {
|
|
|
- actionBar,
|
|
|
- tables,
|
|
|
- pagination,
|
|
|
- forms
|
|
|
- },
|
|
|
- data() {
|
|
|
- return {
|
|
|
- operateList: [{
|
|
|
- type: 'come',
|
|
|
- title: '入库',
|
|
|
+import {
|
|
|
+ getIceRaftNewest,
|
|
|
+ iceraftIn,
|
|
|
+ iceraftOut,
|
|
|
+ getIceRaftRecord,
|
|
|
+ putIceRaftRecord,
|
|
|
+ delIceRaftRecord,
|
|
|
+ getRecording,
|
|
|
+ getExportExecl
|
|
|
+} from '@/api/iceRaft'
|
|
|
+import {
|
|
|
+ getIcelocker,
|
|
|
+} from '@/api/refrigerator'
|
|
|
+import {
|
|
|
+ getCoolerBox
|
|
|
+} from '@/api/incubator.js'
|
|
|
+import actionBar from '@/components/actionBar'
|
|
|
+import tables from '@/components/tables'
|
|
|
+import pagination from '@/components/pagination'
|
|
|
+import forms from '@/components/forms'
|
|
|
+import {
|
|
|
+ employee,
|
|
|
+ historyRecord,
|
|
|
+ iceRaftRules,
|
|
|
+ freezerRules,
|
|
|
+ editRules
|
|
|
+} from "./iceRaft.js";
|
|
|
+export default {
|
|
|
+ name: 'IceManagement',
|
|
|
+ components: {
|
|
|
+ actionBar,
|
|
|
+ tables,
|
|
|
+ pagination,
|
|
|
+ forms
|
|
|
+ },
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ operateList: [{
|
|
|
+ type: 'come',
|
|
|
+ title: '入库',
|
|
|
+ }, {
|
|
|
+ type: 'goOut',
|
|
|
+ title: '出库',
|
|
|
+ }, {
|
|
|
+ type: 'export',
|
|
|
+ colour: 'success',
|
|
|
+ title: '冰排使用记录',
|
|
|
+ }],
|
|
|
+ formList: [{
|
|
|
+ type: 'input',
|
|
|
+ label: '编号',
|
|
|
+ field: 'code',
|
|
|
+ placeholder: '请输入编号',
|
|
|
+ }, {
|
|
|
+ type: 'select',
|
|
|
+ label: '状态',
|
|
|
+ field: 'status',
|
|
|
+ placeholder: '请选择状态',
|
|
|
+ options: [{
|
|
|
+ bgcolor: '#606266',
|
|
|
+ label: '未入库',
|
|
|
+ value: '0',
|
|
|
}, {
|
|
|
- type: 'goOut',
|
|
|
- title: '出库',
|
|
|
- }],
|
|
|
- formList: [{
|
|
|
- type: 'input',
|
|
|
- label: '编号',
|
|
|
- field: 'code',
|
|
|
- placeholder: '请输入编号',
|
|
|
+ bgcolor: '#409EFF',
|
|
|
+ label: '冷冻中',
|
|
|
+ value: '1',
|
|
|
}, {
|
|
|
- type: 'select',
|
|
|
- label: '状态',
|
|
|
- field: 'status',
|
|
|
- placeholder: '请选择状态',
|
|
|
- options: [{
|
|
|
- bgcolor: '#606266',
|
|
|
- label: '未入库',
|
|
|
- value: '0',
|
|
|
- }, {
|
|
|
- bgcolor: '#409EFF',
|
|
|
- label: '冷冻中',
|
|
|
- value: '1',
|
|
|
- }, {
|
|
|
- bgcolor: '#67C23A',
|
|
|
- label: '待使用',
|
|
|
- value: '2',
|
|
|
- }, {
|
|
|
- bgcolor: '#E6A23C',
|
|
|
- label: '使用中',
|
|
|
- value: '3',
|
|
|
- }, {
|
|
|
- bgcolor: '#909399',
|
|
|
- label: '已结束',
|
|
|
- value: '4',
|
|
|
- }]
|
|
|
+ bgcolor: '#67C23A',
|
|
|
+ label: '待使用',
|
|
|
+ value: '2',
|
|
|
}, {
|
|
|
- type: 'select',
|
|
|
- label: '冷冻柜',
|
|
|
- field: 'iceLockerId',
|
|
|
- placeholder: '请选择冷冻柜',
|
|
|
- options: []
|
|
|
+ bgcolor: '#E6A23C',
|
|
|
+ label: '使用中',
|
|
|
+ value: '3',
|
|
|
}, {
|
|
|
- type: 'select',
|
|
|
- label: '保温箱',
|
|
|
- field: 'coolerBoxId',
|
|
|
- placeholder: '请选择保温箱',
|
|
|
- options: []
|
|
|
- }, ],
|
|
|
- searchRuleForm: {
|
|
|
- code: '',
|
|
|
- status: '',
|
|
|
- iceLockerId: null,
|
|
|
- coolerBoxId: null,
|
|
|
- },
|
|
|
- searchValue: {},
|
|
|
- tableList: employee(),
|
|
|
- tableData: [],
|
|
|
- Total: 0,
|
|
|
- Pagination: {
|
|
|
- PageIndex: 1,
|
|
|
- PageSize: 10,
|
|
|
- },
|
|
|
- // 历史记录
|
|
|
- historyList: historyRecord(),
|
|
|
- historyData: [],
|
|
|
- historyTotal: 0,
|
|
|
- historyPagination: {
|
|
|
- PageIndex: 1,
|
|
|
- PageSize: 10,
|
|
|
- },
|
|
|
- operationType: '',
|
|
|
- staffTitle: '添加',
|
|
|
- staffDialogVisible: false,
|
|
|
- formRuleList: {},
|
|
|
- ruleForm: {
|
|
|
- iceLockerId: '',
|
|
|
- freezeClaim: '',
|
|
|
- coolerBoxId: '',
|
|
|
- code: [],
|
|
|
- },
|
|
|
- confirmLoading: false,
|
|
|
- historyVisible: false,
|
|
|
+ bgcolor: '#909399',
|
|
|
+ label: '已结束',
|
|
|
+ value: '4',
|
|
|
+ }]
|
|
|
+ }, {
|
|
|
+ type: 'select',
|
|
|
+ label: '冷冻柜',
|
|
|
+ field: 'iceLockerId',
|
|
|
+ placeholder: '请选择冷冻柜',
|
|
|
+ options: []
|
|
|
+ }, {
|
|
|
+ type: 'select',
|
|
|
+ label: '保温箱',
|
|
|
+ field: 'coolerBoxId',
|
|
|
+ placeholder: '请选择保温箱',
|
|
|
+ options: []
|
|
|
+ },],
|
|
|
+ searchRuleForm: {
|
|
|
+ code: '',
|
|
|
+ status: '',
|
|
|
+ iceLockerId: null,
|
|
|
+ coolerBoxId: null,
|
|
|
+ },
|
|
|
+ searchValue: {},
|
|
|
+ tableList: [],
|
|
|
+ tableData: [],
|
|
|
+ Total: 0,
|
|
|
+ Pagination: {
|
|
|
+ PageIndex: 1,
|
|
|
+ PageSize: 10,
|
|
|
+ },
|
|
|
+ // 历史记录
|
|
|
+ historyList: [],
|
|
|
+ historyData: [],
|
|
|
+ historyTotal: 0,
|
|
|
+ historyPagination: {
|
|
|
+ PageIndex: 1,
|
|
|
+ PageSize: 10,
|
|
|
+ },
|
|
|
+ operationType: '',
|
|
|
+ staffTitle: '添加',
|
|
|
+ staffDialogVisible: false,
|
|
|
+ formRuleList: {},
|
|
|
+ ruleForm: {
|
|
|
+ iceLockerId: '',
|
|
|
+ freezeClaim: '',
|
|
|
+ coolerBoxId: '',
|
|
|
+ code: [],
|
|
|
+ },
|
|
|
+ confirmLoading: false,
|
|
|
+ historyVisible: false,
|
|
|
|
|
|
- page: 1,
|
|
|
- staffName: '',
|
|
|
- limitNo: true,
|
|
|
- limitNoil: true,
|
|
|
- eventSource: null,
|
|
|
- timer: null, //定时器名称
|
|
|
- iceRaftId: null,
|
|
|
+ page: 1,
|
|
|
+ staffName: '',
|
|
|
+ limitNo: true,
|
|
|
+ limitNoil: true,
|
|
|
+ eventSource: null,
|
|
|
+ timer: null, //定时器名称
|
|
|
+ iceRaftId: null,
|
|
|
+
|
|
|
+ innerVisible: false,
|
|
|
+ editRuleList: {},
|
|
|
+ editRuleForm: {
|
|
|
+ code: '',
|
|
|
+ status: '',
|
|
|
+ inStorageTime: '',
|
|
|
+ outStorageTime: '',
|
|
|
+ freezeClaim: '',
|
|
|
+ iceLockerId: '',
|
|
|
+ coolerBoxId: '',
|
|
|
+ },
|
|
|
+ iceRaftCode: '',
|
|
|
+ coldCupboard: {
|
|
|
+ field: 'iceLockerId',
|
|
|
+ label: '冷冻柜',
|
|
|
+ placeholder: '请选择冷冻柜',
|
|
|
+ type: 'searchSelect',
|
|
|
+ colWidth: 24,
|
|
|
+ multiple: false,
|
|
|
+ rules: [{
|
|
|
+ required: true,
|
|
|
+ message: '请选择冷冻柜',
|
|
|
+ trigger: 'blur'
|
|
|
+ }],
|
|
|
+ options: [],
|
|
|
+ },
|
|
|
+ thermostat: {
|
|
|
+ field: 'coolerBoxId',
|
|
|
+ label: '保温箱',
|
|
|
+ placeholder: '请选择保温箱',
|
|
|
+ type: 'searchSelect',
|
|
|
+ colWidth: 24,
|
|
|
+ rules: [{
|
|
|
+ required: true,
|
|
|
+ message: '请选择保温箱',
|
|
|
+ trigger: 'blur'
|
|
|
+ }],
|
|
|
+ options: [],
|
|
|
+ },
|
|
|
+ // 冰排使用记录
|
|
|
+ exportFlag: false,
|
|
|
+ iceTracingVisible: false,
|
|
|
+ value1: '',
|
|
|
+ usageLogList: [],
|
|
|
+ usageLogData: [],
|
|
|
+ usageLogTotal: 0,
|
|
|
+ usageLogPagination: {
|
|
|
+ PageIndex: 1,
|
|
|
+ PageSize: 10,
|
|
|
+ },
|
|
|
+ incubatorData: [],
|
|
|
+ formInline: {
|
|
|
+ code: '',
|
|
|
+ coolerBoxId: null,
|
|
|
+ dateService: []
|
|
|
+ },
|
|
|
+ // 是否释冷
|
|
|
+ iceColdFlag: false,
|
|
|
+ userList: {},
|
|
|
+ }
|
|
|
+ },
|
|
|
+ beforeDestroy() {
|
|
|
+ clearInterval(this.timer); // 清除定时器
|
|
|
+ this.timer = null;
|
|
|
+ },
|
|
|
+ mounted() {
|
|
|
+ const arr = localStorage.getItem('userList')
|
|
|
+ this.userList = JSON.parse(arr)
|
|
|
+ if (this.userList.dept) {
|
|
|
+ this.iceColdFlag = this.userList.dept.isIceReleaseCold
|
|
|
+ }
|
|
|
+ if (!this.iceColdFlag) {
|
|
|
+ var tableList = employee()
|
|
|
+ this.tableList = deleteElementById(tableList, 'multistage')
|
|
|
+ var usageArr = deleteElementById(tableList, 'multistage')
|
|
|
+ var usageArr1 = deleteElementById(usageArr, 'iceRaftRecord.status')
|
|
|
+ this.usageLogList = deleteElementById(usageArr1, 'action')
|
|
|
+ } else {
|
|
|
+ var tableList = employee()
|
|
|
+ this.tableList = tableList
|
|
|
+ var usageArr1 = deleteElementById(tableList, 'iceRaftRecord.status')
|
|
|
+ this.usageLogList = deleteElementById(usageArr1, 'action')
|
|
|
+ }
|
|
|
+ if (!this.iceColdFlag) {
|
|
|
+ var historyList = historyRecord()
|
|
|
+ this.historyList = deleteElementById(historyList, 'multistage')
|
|
|
+ } else {
|
|
|
+ this.historyList = historyRecord()
|
|
|
+ }
|
|
|
|
|
|
- innerVisible: false,
|
|
|
- editRuleList: {},
|
|
|
- editRuleForm: {
|
|
|
- code: '',
|
|
|
- status: '',
|
|
|
- inStorageTime: '',
|
|
|
- outStorageTime: '',
|
|
|
- freezeClaim: '',
|
|
|
- iceLockerId: '',
|
|
|
- coolerBoxId: '',
|
|
|
- },
|
|
|
- iceRaftCode: '',
|
|
|
- coldCupboard: {
|
|
|
- field: 'iceLockerId',
|
|
|
- label: '冷冻柜',
|
|
|
- placeholder: '请选择冷冻柜',
|
|
|
- type: 'searchSelect',
|
|
|
- colWidth: 24,
|
|
|
- multiple: false,
|
|
|
- rules: [{
|
|
|
- required: true,
|
|
|
- message: '请选择冷冻柜',
|
|
|
- trigger: 'blur'
|
|
|
- }],
|
|
|
- options: [],
|
|
|
- },
|
|
|
- thermostat: {
|
|
|
- field: 'coolerBoxId',
|
|
|
- label: '保温箱',
|
|
|
- placeholder: '请选择保温箱',
|
|
|
- type: 'searchSelect',
|
|
|
- colWidth: 24,
|
|
|
- rules: [{
|
|
|
- required: true,
|
|
|
- message: '请选择保温箱',
|
|
|
- trigger: 'blur'
|
|
|
- }],
|
|
|
- options: [],
|
|
|
- },
|
|
|
- // 是否释冷
|
|
|
- iceColdFlag: false,
|
|
|
+ function deleteElementById(arr, id) {
|
|
|
+ return arr.filter((item) => item.field !== id);
|
|
|
+ }
|
|
|
+ this.getList()
|
|
|
+ this.getFreezer()
|
|
|
+ this.getIncubator()
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ // 搜索
|
|
|
+ searchProtocol(value) {
|
|
|
+ this.Pagination.PageIndex = 1
|
|
|
+ this.searchValue = value
|
|
|
+ this.getList()
|
|
|
+ },
|
|
|
+ // 获取冰排列表
|
|
|
+ getList() {
|
|
|
+ var params = {
|
|
|
+ page: this.Pagination.PageIndex,
|
|
|
+ pageSize: this.Pagination.PageSize,
|
|
|
+ ...this.searchValue
|
|
|
+ }
|
|
|
+ getIceRaftNewest(params).then(res => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.tableData = res.data.list
|
|
|
+ this.Total = res.data.count
|
|
|
+ this.timer = setTimeout(() => {
|
|
|
+ this.getList();
|
|
|
+ clearInterval(this.timer); // 清除定时器
|
|
|
+ this.timer = null;
|
|
|
+ }, 60000)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 弹窗表单添加
|
|
|
+ handleAdd() {
|
|
|
+ let flag = this.$refs['childRules'].validateForm();
|
|
|
+ if (flag) {
|
|
|
+ const params = {
|
|
|
+ ...this.ruleForm,
|
|
|
+ }
|
|
|
+ if (this.operationType == 'come') {
|
|
|
+ delete params.coolerBoxId
|
|
|
+ params.iceLockerId = Number(params.iceLockerId)
|
|
|
+ params.freezeClaim = Number(params.freezeClaim)
|
|
|
+ iceraftIn(params).then(res => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.$message({
|
|
|
+ message: res.msg,
|
|
|
+ type: 'success'
|
|
|
+ });
|
|
|
+ this.staffDialogVisible = false
|
|
|
+ this.getList()
|
|
|
+ }
|
|
|
+ })
|
|
|
+ } else if (this.operationType == 'goOut') {
|
|
|
+ delete params.iceLockerId
|
|
|
+ delete params.freezeClaim
|
|
|
+ params.coolerBoxId = Number(params.coolerBoxId)
|
|
|
+ iceraftOut(params).then(res => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.$message({
|
|
|
+ message: res.msg,
|
|
|
+ type: 'success'
|
|
|
+ });
|
|
|
+ this.staffDialogVisible = false
|
|
|
+ this.getList()
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ this.$message.error('表单信息不完整,请继续填写完整');
|
|
|
+ }
|
|
|
+ },
|
|
|
+ openModel(type) {
|
|
|
+ this.operationType = type
|
|
|
+ this.page = 1
|
|
|
+ if (type == 'come') {
|
|
|
+ this.staffDialogVisible = true
|
|
|
+ this.staffTitle = '入库'
|
|
|
+ this.formRuleList = iceRaftRules()
|
|
|
+ this.coldCupboard.options = []
|
|
|
+ this.formRuleList.unshift(this.coldCupboard)
|
|
|
+ this.limitNo = true
|
|
|
+ this.getFreezer()
|
|
|
+ } else if (type == 'goOut') {
|
|
|
+ this.staffDialogVisible = true
|
|
|
+ this.staffTitle = '出库'
|
|
|
+ this.formRuleList = freezerRules()
|
|
|
+ this.thermostat.options = []
|
|
|
+ this.formRuleList.unshift(this.thermostat)
|
|
|
+ this.limitNoil = true
|
|
|
+ this.getIncubator()
|
|
|
+ } else if (type == 'export') {
|
|
|
+ this.iceTracingVisible = true
|
|
|
+ this.incubatorData = []
|
|
|
+ this.limitNoil = true
|
|
|
+ this.getIncubator()
|
|
|
+ this.getraftRecording()
|
|
|
}
|
|
|
+ this.$forceUpdate()
|
|
|
},
|
|
|
- beforeDestroy() {
|
|
|
- console.log(2)
|
|
|
- clearInterval(this.timer); // 清除定时器
|
|
|
- this.timer = null;
|
|
|
+ // 选择保温箱
|
|
|
+ changeSelect(value) {
|
|
|
+ this.getraftRecording()
|
|
|
},
|
|
|
- mounted() {
|
|
|
- this.getList()
|
|
|
- this.getFreezer()
|
|
|
- this.getIncubator()
|
|
|
+ // 时间选择搜索
|
|
|
+ timeChange(event) {
|
|
|
+ this.getraftRecording()
|
|
|
},
|
|
|
- methods: {
|
|
|
- // 搜索
|
|
|
- searchProtocol(value) {
|
|
|
- this.Pagination.PageIndex = 1
|
|
|
- this.searchValue = value
|
|
|
- this.getList()
|
|
|
- },
|
|
|
- // 获取冰排列表
|
|
|
- getList() {
|
|
|
- var params = {
|
|
|
- page: this.Pagination.PageIndex,
|
|
|
- pageSize: this.Pagination.PageSize,
|
|
|
- ...this.searchValue
|
|
|
+ // 重置
|
|
|
+ searchReset() {
|
|
|
+ this.$refs.userRecordRuleForm.resetFields();
|
|
|
+ },
|
|
|
+ // 输入冰排编号搜索
|
|
|
+ codeInput(value){
|
|
|
+ this.getraftRecording()
|
|
|
+ },
|
|
|
+ // 冰排使用记录
|
|
|
+ getraftRecording() {
|
|
|
+ var params = {
|
|
|
+ page: this.usageLogPagination.PageIndex,
|
|
|
+ pageSize: this.usageLogPagination.PageSize,
|
|
|
+ code: this.formInline.code,
|
|
|
+ coolerBoxId: Number(this.formInline.coolerBoxId),
|
|
|
+ startTime: this.formInline.dateService[0],
|
|
|
+ endTime: this.formInline.dateService[1],
|
|
|
+ }
|
|
|
+ getRecording(params).then(res => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.usageLogTotal = res.data.count
|
|
|
+ this.usageLogData = res.data.list
|
|
|
}
|
|
|
- getIceRaftNewest(params).then(res => {
|
|
|
- if (res.code == 200) {
|
|
|
- this.tableData = res.data.list
|
|
|
- this.Total = res.data.count
|
|
|
- this.timer = setTimeout(() => {
|
|
|
- this.getList();
|
|
|
- clearInterval(this.timer); // 清除定时器
|
|
|
- this.timer = null;
|
|
|
- }, 60000)
|
|
|
- }
|
|
|
- })
|
|
|
- },
|
|
|
- // 弹窗表单添加
|
|
|
- handleAdd() {
|
|
|
- let flag = this.$refs['childRules'].validateForm();
|
|
|
- if (flag) {
|
|
|
- const params = {
|
|
|
- ...this.ruleForm,
|
|
|
- }
|
|
|
- if (this.operationType == 'come') {
|
|
|
- delete params.coolerBoxId
|
|
|
- params.iceLockerId = Number(params.iceLockerId)
|
|
|
- params.freezeClaim = Number(params.freezeClaim)
|
|
|
- iceraftIn(params).then(res => {
|
|
|
- if (res.code == 200) {
|
|
|
- this.$message({
|
|
|
- message: res.msg,
|
|
|
- type: 'success'
|
|
|
- });
|
|
|
- this.staffDialogVisible = false
|
|
|
- this.getList()
|
|
|
- }
|
|
|
- })
|
|
|
- } else if (this.operationType == 'goOut') {
|
|
|
- delete params.iceLockerId
|
|
|
- delete params.freezeClaim
|
|
|
- params.coolerBoxId = Number(params.coolerBoxId)
|
|
|
- iceraftOut(params).then(res => {
|
|
|
- if (res.code == 200) {
|
|
|
- this.$message({
|
|
|
- message: res.msg,
|
|
|
- type: 'success'
|
|
|
- });
|
|
|
- this.staffDialogVisible = false
|
|
|
- this.getList()
|
|
|
- }
|
|
|
- })
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 导出冰排使用记录
|
|
|
+ download() {
|
|
|
+ this.exportFlag = true
|
|
|
+ getExportExecl({
|
|
|
+ code: this.formInline.code,
|
|
|
+ coolerBoxId: Number(this.formInline.coolerBoxId),
|
|
|
+ startTime: this.formInline.dateService[0],
|
|
|
+ endTime: this.formInline.dateService[1],
|
|
|
+ }).then(response => {
|
|
|
+ if (response.fileName) {
|
|
|
+ this.pdfDialogVisible = false
|
|
|
+ let fileName = decodeURI(response.fileName);
|
|
|
+ if (window.navigator.msSaveOrOpenBlob) {
|
|
|
+ navigator.msSaveBlob(new Blob([response.data]), fileName);
|
|
|
+ } else {
|
|
|
+ let url = window.URL.createObjectURL(new Blob([response.data]));
|
|
|
+ let link = document.createElement('a');
|
|
|
+ link.style.display = 'none';
|
|
|
+ link.href = url;
|
|
|
+ link.setAttribute('download', fileName);
|
|
|
+ document.body.appendChild(link);
|
|
|
+ link.click();
|
|
|
}
|
|
|
} else {
|
|
|
- this.$message.error('表单信息不完整,请继续填写完整');
|
|
|
+ this.$message.error('未获取到文件名,导出失败');
|
|
|
}
|
|
|
- },
|
|
|
- openModel(type) {
|
|
|
- this.operationType = type
|
|
|
- this.staffDialogVisible = true
|
|
|
- this.page = 1
|
|
|
- if (type == 'come') {
|
|
|
- this.staffTitle = '入库'
|
|
|
- this.formRuleList = iceRaftRules()
|
|
|
- this.coldCupboard.options = []
|
|
|
- this.formRuleList.unshift(this.coldCupboard)
|
|
|
- this.limitNo = true
|
|
|
+ this.exportFlag = false
|
|
|
+ }).catch(() => {
|
|
|
+ this.exportFlag = false
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 重置冷冻柜、保温箱
|
|
|
+ resetSelect() {
|
|
|
+ this.page = 1
|
|
|
+ this.limitNo = true
|
|
|
+ this.limitNoil = true
|
|
|
+ this.staffName = ''
|
|
|
+ },
|
|
|
+ // 触底事件
|
|
|
+ handleScroll(type) {
|
|
|
+ if (this.operationType == 'come') {
|
|
|
+ if (this.limitNo) {
|
|
|
this.getFreezer()
|
|
|
- } else if (type == 'goOut') {
|
|
|
- this.staffTitle = '出库'
|
|
|
- this.formRuleList = freezerRules()
|
|
|
- this.thermostat.options = []
|
|
|
- this.formRuleList.unshift(this.thermostat)
|
|
|
- this.limitNoil = true
|
|
|
+ }
|
|
|
+ } else if (this.operationType == 'goOut') {
|
|
|
+ if (this.limitNoil) {
|
|
|
this.getIncubator()
|
|
|
}
|
|
|
- this.$forceUpdate()
|
|
|
- },
|
|
|
- // 重置冷冻柜、保温箱
|
|
|
- resetSelect() {
|
|
|
- this.page = 1
|
|
|
- this.limitNo = true
|
|
|
- this.limitNoil = true
|
|
|
- this.staffName = ''
|
|
|
- },
|
|
|
- // 触底事件
|
|
|
- handleScroll(type) {
|
|
|
- if (this.operationType == 'come') {
|
|
|
+ } else if (this.operationType == 'edit') {
|
|
|
+ if (this.deposit) {
|
|
|
if (this.limitNo) {
|
|
|
this.getFreezer()
|
|
|
}
|
|
|
- } else if (this.operationType == 'goOut') {
|
|
|
+ } else {
|
|
|
if (this.limitNoil) {
|
|
|
this.getIncubator()
|
|
|
}
|
|
|
- } else if (this.operationType == 'edit') {
|
|
|
- if (this.deposit) {
|
|
|
- if (this.limitNo) {
|
|
|
- this.getFreezer()
|
|
|
- }
|
|
|
- } else {
|
|
|
- if (this.limitNoil) {
|
|
|
- this.getIncubator()
|
|
|
- }
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ if (type == 'iceLockerId' && this.limitNo) {
|
|
|
+ this.getFreezer()
|
|
|
+ } else if (type == 'coolerBoxId' && this.limitNoil) {
|
|
|
+ this.getIncubator()
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 搜索
|
|
|
+ remoteMethod(value) {
|
|
|
+ this.resetSelect()
|
|
|
+ this.staffName = value
|
|
|
+ if (this.operationType == 'edit') {
|
|
|
+ this.editRuleList.forEach(item => {
|
|
|
+ if (item.type == 'searchSelect') {
|
|
|
+ item.options = []
|
|
|
}
|
|
|
+ })
|
|
|
+ if (this.deposit) {
|
|
|
+ this.getFreezer()
|
|
|
} else {
|
|
|
- if (type == 'iceLockerId' && this.limitNo) {
|
|
|
- this.getFreezer()
|
|
|
- } else if (type == 'coolerBoxId' && this.limitNoil) {
|
|
|
- this.getIncubator()
|
|
|
- }
|
|
|
+ this.getIncubator()
|
|
|
}
|
|
|
- },
|
|
|
- // 搜索
|
|
|
- remoteMethod(value) {
|
|
|
- this.resetSelect()
|
|
|
- this.staffName = value
|
|
|
- if (this.operationType == 'edit') {
|
|
|
- this.editRuleList.forEach(item => {
|
|
|
+ } else {
|
|
|
+ if (this.operationType == 'come') {
|
|
|
+ this.formRuleList.forEach(item => {
|
|
|
if (item.type == 'searchSelect') {
|
|
|
item.options = []
|
|
|
}
|
|
|
})
|
|
|
- if (this.deposit) {
|
|
|
- this.getFreezer()
|
|
|
- } else {
|
|
|
- this.getIncubator()
|
|
|
- }
|
|
|
- } else {
|
|
|
- if (this.operationType == 'come') {
|
|
|
- this.formRuleList.forEach(item => {
|
|
|
- if (item.type == 'searchSelect') {
|
|
|
- item.options = []
|
|
|
- }
|
|
|
- })
|
|
|
- this.getFreezer()
|
|
|
- } else if (this.operationType == 'goOut') {
|
|
|
- this.getIncubator()
|
|
|
- }
|
|
|
- }
|
|
|
- },
|
|
|
- // 获取冷冻柜列表
|
|
|
- getFreezer() {
|
|
|
- let arrList = []
|
|
|
- let params = {
|
|
|
- page: this.page,
|
|
|
- pageSize: 10,
|
|
|
- status: '2',
|
|
|
- name: this.staffName,
|
|
|
+ this.getFreezer()
|
|
|
+ } else if (this.operationType == 'goOut') {
|
|
|
+ this.getIncubator()
|
|
|
}
|
|
|
- getIcelocker(params).then(res => {
|
|
|
- if (res.code == 200) {
|
|
|
- let arr = res.data.list
|
|
|
- let arrList = []
|
|
|
- arr.forEach(item1 => {
|
|
|
- var arrData = {
|
|
|
- label: null,
|
|
|
- value: null,
|
|
|
- }
|
|
|
- arrData.label = item1.name
|
|
|
- arrData.value = item1.id
|
|
|
- arrList.push(arrData)
|
|
|
- })
|
|
|
- if (this.limitNo == true) {
|
|
|
- if (this.operationType != '') {
|
|
|
- if (this.operationType == 'come' || this.operationType == 'goOut') {
|
|
|
- this.formRuleList.forEach(item => {
|
|
|
- if (item.type == 'searchSelect') {
|
|
|
- item.options = item.options.concat(arrList)
|
|
|
- }
|
|
|
- })
|
|
|
- } else if (this.operationType == 'edit') {
|
|
|
- this.editRuleList.forEach(item => {
|
|
|
- if (item.type == 'searchSelect') {
|
|
|
- item.options = item.options.concat(arrList)
|
|
|
- }
|
|
|
- })
|
|
|
- }
|
|
|
- } else {
|
|
|
- this.formList.forEach(item => {
|
|
|
- if (item.field == 'iceLockerId') {
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 获取冷冻柜列表
|
|
|
+ getFreezer() {
|
|
|
+ let arrList = []
|
|
|
+ let params = {
|
|
|
+ page: this.page,
|
|
|
+ pageSize: 10,
|
|
|
+ status: '2',
|
|
|
+ name: this.staffName,
|
|
|
+ }
|
|
|
+ getIcelocker(params).then(res => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ let arr = res.data.list
|
|
|
+ let arrList = []
|
|
|
+ arr.forEach(item1 => {
|
|
|
+ var arrData = {
|
|
|
+ label: null,
|
|
|
+ value: null,
|
|
|
+ }
|
|
|
+ arrData.label = item1.name
|
|
|
+ arrData.value = item1.id
|
|
|
+ arrList.push(arrData)
|
|
|
+ })
|
|
|
+ if (this.limitNo == true) {
|
|
|
+ if (this.operationType != '') {
|
|
|
+ if (this.operationType == 'come' || this.operationType == 'goOut') {
|
|
|
+ this.formRuleList.forEach(item => {
|
|
|
+ if (item.type == 'searchSelect') {
|
|
|
+ item.options = item.options.concat(arrList)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ } else if (this.operationType == 'edit') {
|
|
|
+ this.editRuleList.forEach(item => {
|
|
|
+ if (item.type == 'searchSelect') {
|
|
|
item.options = item.options.concat(arrList)
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
- }
|
|
|
- if (arrList.length >= 10) {
|
|
|
- this.page = ++this.page;
|
|
|
} else {
|
|
|
- // 已经没数据了 不需要增加数据
|
|
|
- this.limitNo = false;
|
|
|
+ this.formList.forEach(item => {
|
|
|
+ if (item.field == 'iceLockerId') {
|
|
|
+ item.options = item.options.concat(arrList)
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
}
|
|
|
- })
|
|
|
- },
|
|
|
- // 获取保温箱列表
|
|
|
- getIncubator() {
|
|
|
- let arrList = []
|
|
|
- let params = {
|
|
|
- page: this.page,
|
|
|
- pageSize: 10,
|
|
|
- status: '2',
|
|
|
- name: this.staffName,
|
|
|
+ if (arrList.length >= 10) {
|
|
|
+ this.page = ++this.page;
|
|
|
+ } else {
|
|
|
+ // 已经没数据了 不需要增加数据
|
|
|
+ this.limitNo = false;
|
|
|
+ }
|
|
|
}
|
|
|
- getCoolerBox(params).then(res => {
|
|
|
- if (res.code == 200) {
|
|
|
- let arr = res.data.list
|
|
|
- let arrList = []
|
|
|
- arr.forEach(item1 => {
|
|
|
- var arrData = {
|
|
|
- label: null,
|
|
|
- value: null,
|
|
|
- }
|
|
|
- arrData.label = item1.name
|
|
|
- arrData.value = item1.id
|
|
|
- arrList.push(arrData)
|
|
|
- })
|
|
|
- if (this.limitNoil == true) {
|
|
|
- if (this.operationType != '') {
|
|
|
- if (this.operationType == 'come' || this.operationType == 'goOut') {
|
|
|
- this.formRuleList.forEach(item => {
|
|
|
- if (item.type == 'searchSelect') {
|
|
|
- item.options = item.options.concat(arrList)
|
|
|
- }
|
|
|
- })
|
|
|
- } else if (this.operationType == 'edit') {
|
|
|
- this.editRuleList.forEach(item => {
|
|
|
- if (item.type == 'searchSelect') {
|
|
|
- item.options = item.options.concat(arrList)
|
|
|
- }
|
|
|
- })
|
|
|
- }
|
|
|
- } else {
|
|
|
- this.formList.forEach(item => {
|
|
|
- if (item.field == 'coolerBoxId') {
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 获取保温箱列表
|
|
|
+ getIncubator() {
|
|
|
+ let params = {
|
|
|
+ page: this.page,
|
|
|
+ pageSize: 10,
|
|
|
+ status: '2',
|
|
|
+ name: this.staffName,
|
|
|
+ }
|
|
|
+ getCoolerBox(params).then(res => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ let arr = res.data.list
|
|
|
+ let arrList = []
|
|
|
+ arr.forEach(item1 => {
|
|
|
+ var arrData = {
|
|
|
+ label: null,
|
|
|
+ value: null,
|
|
|
+ }
|
|
|
+ arrData.label = item1.name
|
|
|
+ arrData.value = item1.id
|
|
|
+ arrList.push(arrData)
|
|
|
+ })
|
|
|
+ if (this.limitNoil == true) {
|
|
|
+ if (this.operationType != '') {
|
|
|
+ if (this.operationType == 'come' || this.operationType == 'goOut') {
|
|
|
+ this.formRuleList.forEach(item => {
|
|
|
+ if (item.type == 'searchSelect') {
|
|
|
+ item.options = item.options.concat(arrList)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ } else if (this.operationType == 'edit') {
|
|
|
+ this.editRuleList.forEach(item => {
|
|
|
+ if (item.type == 'searchSelect') {
|
|
|
item.options = item.options.concat(arrList)
|
|
|
}
|
|
|
})
|
|
|
+ } else if (this.operationType == 'export') {
|
|
|
+ this.incubatorData = this.incubatorData.concat(arrList)
|
|
|
}
|
|
|
- // this.thermostat.options = this.thermostat.options.concat(arrList)
|
|
|
- }
|
|
|
- if (arrList.length >= 10) {
|
|
|
- this.page = ++this.page;
|
|
|
} else {
|
|
|
- // 已经没数据了 不需要增加数据
|
|
|
- this.limitNoil = false;
|
|
|
+ this.formList.forEach(item => {
|
|
|
+ if (item.field == 'coolerBoxId') {
|
|
|
+ item.options = item.options.concat(arrList)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ this.incubatorData = this.incubatorData.concat(arrList)
|
|
|
}
|
|
|
+ // this.thermostat.options = this.thermostat.options.concat(arrList)
|
|
|
}
|
|
|
- })
|
|
|
- },
|
|
|
- // 冰排列表
|
|
|
- buttonData(row, type) {
|
|
|
- this.operationType = type
|
|
|
- this.iceRaftId = row.id
|
|
|
- this.iceRaftCode = row.code
|
|
|
- if (type == 'logs') {
|
|
|
- this.historyVisible = true
|
|
|
- this.getHistory()
|
|
|
- }
|
|
|
- },
|
|
|
- // 获取历史记录列表
|
|
|
- getHistory(iceRaftId) {
|
|
|
- var params = {
|
|
|
- page: this.historyPagination.PageIndex,
|
|
|
- pageSize: this.historyPagination.PageSize,
|
|
|
- iceRaftId: this.iceRaftId,
|
|
|
- // ...this.searchValue
|
|
|
- }
|
|
|
- getIceRaftRecord(params).then(res => {
|
|
|
- if (res.code == 200) {
|
|
|
- this.historyData = res.data.list
|
|
|
- this.historyTotal = res.data.count
|
|
|
- }
|
|
|
- })
|
|
|
- },
|
|
|
- // 历史记录操作
|
|
|
- historyButton(row, type) {
|
|
|
- this.operationType = type
|
|
|
- this.limitNo = true
|
|
|
- if (type == 'edit') {
|
|
|
- this.innerVisible = true
|
|
|
- this.page = 1
|
|
|
- this.editRuleList = editRules()
|
|
|
- if (row.outStorageTime == '') {
|
|
|
- this.deposit = true
|
|
|
- this.getFreezer()
|
|
|
- this.editRuleList.push(this.coldCupboard)
|
|
|
- // 冷冻柜
|
|
|
- this.editRuleForm.iceLockerId = String(row.iceLockerId)
|
|
|
+ if (arrList.length >= 10) {
|
|
|
+ this.page = ++this.page;
|
|
|
} else {
|
|
|
- this.deposit = false
|
|
|
- this.getIncubator()
|
|
|
- this.editRuleList.push(this.thermostat)
|
|
|
- // 保温箱
|
|
|
- this.editRuleForm.coolerBoxId = String(row.coolerBoxId)
|
|
|
+ // 已经没数据了 不需要增加数据
|
|
|
+ this.limitNoil = false;
|
|
|
}
|
|
|
- this.editRuleForm.id = row.id
|
|
|
- this.editRuleForm.code = this.iceRaftCode
|
|
|
- this.editRuleForm.status = row.status
|
|
|
- this.editRuleForm.inStorageTime = row.inStorageTime
|
|
|
- this.editRuleForm.outStorageTime = row.outStorageTime
|
|
|
- this.editRuleForm.freezeClaim = row.freezeClaim
|
|
|
- if (row.status == '3') {
|
|
|
- this.editRuleList.forEach(item => {
|
|
|
- if (item.field == 'freezeClaim') {
|
|
|
- item.disabled = true
|
|
|
- }
|
|
|
- })
|
|
|
- }
|
|
|
- } else if (type == 'del') {
|
|
|
- this.delHistory(row.id)
|
|
|
}
|
|
|
- },
|
|
|
- // 编辑历史记录提交
|
|
|
- submit() {
|
|
|
- let flag = this.$refs['editRules'].validateForm();
|
|
|
- if (flag) {
|
|
|
- this.$confirm('确定修改该冰排信息吗, 是否继续?', '提示', {
|
|
|
- confirmButtonText: '确定',
|
|
|
- cancelButtonText: '取消',
|
|
|
- type: 'warning'
|
|
|
- }).then(() => {
|
|
|
- let param = {
|
|
|
- id: '',
|
|
|
- iceLockerId: '',
|
|
|
- coolerBoxId: '',
|
|
|
- freezeClaim: '',
|
|
|
- }
|
|
|
- param.id = this.editRuleForm.id
|
|
|
- param.iceLockerId = Number(this.editRuleForm.iceLockerId)
|
|
|
- param.coolerBoxId = Number(this.editRuleForm.coolerBoxId)
|
|
|
- param.freezeClaim = Number(this.editRuleForm.freezeClaim)
|
|
|
- if (this.editRuleForm.outStorageTime == '') {
|
|
|
- delete param.coolerBoxId
|
|
|
- } else {
|
|
|
- delete param.iceLockerId
|
|
|
- }
|
|
|
- putIceRaftRecord(param).then(res => {
|
|
|
- if (res.code == 200) {
|
|
|
- this.innerVisible = false
|
|
|
- this.$message({
|
|
|
- type: 'success',
|
|
|
- message: res.msg
|
|
|
- });
|
|
|
- this.getHistory()
|
|
|
- }
|
|
|
- })
|
|
|
- }).catch(() => {
|
|
|
- // console.log('取消修改')
|
|
|
- });
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 冰排列表
|
|
|
+ buttonData(row, type) {
|
|
|
+ this.operationType = type
|
|
|
+ this.iceRaftId = row.id
|
|
|
+ this.iceRaftCode = row.code
|
|
|
+ if (type == 'logs') {
|
|
|
+ this.historyVisible = true
|
|
|
+ this.getHistory()
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 获取历史记录列表
|
|
|
+ getHistory(iceRaftId) {
|
|
|
+ var params = {
|
|
|
+ page: this.historyPagination.PageIndex,
|
|
|
+ pageSize: this.historyPagination.PageSize,
|
|
|
+ iceRaftId: this.iceRaftId,
|
|
|
+ // ...this.searchValue
|
|
|
+ }
|
|
|
+ getIceRaftRecord(params).then(res => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.historyData = res.data.list
|
|
|
+ this.historyTotal = res.data.count
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 历史记录操作
|
|
|
+ historyButton(row, type) {
|
|
|
+ this.operationType = type
|
|
|
+ this.limitNo = true
|
|
|
+ if (type == 'edit') {
|
|
|
+ this.innerVisible = true
|
|
|
+ this.page = 1
|
|
|
+ this.editRuleList = editRules()
|
|
|
+ if (row.outStorageTime == '') {
|
|
|
+ this.deposit = true
|
|
|
+ this.getFreezer()
|
|
|
+ this.editRuleList.push(this.coldCupboard)
|
|
|
+ // 冷冻柜
|
|
|
+ this.editRuleForm.iceLockerId = String(row.iceLockerId)
|
|
|
} else {
|
|
|
- this.$message.error('表单信息不完整,请继续填写完整');
|
|
|
+ this.deposit = false
|
|
|
+ this.getIncubator()
|
|
|
+ this.editRuleList.push(this.thermostat)
|
|
|
+ // 保温箱
|
|
|
+ this.editRuleForm.coolerBoxId = String(row.coolerBoxId)
|
|
|
}
|
|
|
- },
|
|
|
- // 删除历史记录
|
|
|
- delHistory(id) {
|
|
|
- this.$confirm('确定删除该冰排信息吗, 是否继续?', '提示', {
|
|
|
+ this.editRuleForm.id = row.id
|
|
|
+ this.editRuleForm.code = this.iceRaftCode
|
|
|
+ this.editRuleForm.status = row.status
|
|
|
+ this.editRuleForm.inStorageTime = row.inStorageTime
|
|
|
+ this.editRuleForm.outStorageTime = row.outStorageTime
|
|
|
+ this.editRuleForm.freezeClaim = row.freezeClaim
|
|
|
+ if (row.status == '3') {
|
|
|
+ this.editRuleList.forEach(item => {
|
|
|
+ if (item.field == 'freezeClaim') {
|
|
|
+ item.disabled = true
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ } else if (type == 'del') {
|
|
|
+ this.delHistory(row.id)
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 编辑历史记录提交
|
|
|
+ submit() {
|
|
|
+ let flag = this.$refs['editRules'].validateForm();
|
|
|
+ if (flag) {
|
|
|
+ this.$confirm('确定修改该冰排信息吗, 是否继续?', '提示', {
|
|
|
confirmButtonText: '确定',
|
|
|
cancelButtonText: '取消',
|
|
|
type: 'warning'
|
|
|
}).then(() => {
|
|
|
- delIceRaftRecord({
|
|
|
- id: id
|
|
|
- }).then(res => {
|
|
|
+ let param = {
|
|
|
+ id: '',
|
|
|
+ iceLockerId: '',
|
|
|
+ coolerBoxId: '',
|
|
|
+ freezeClaim: '',
|
|
|
+ }
|
|
|
+ param.id = this.editRuleForm.id
|
|
|
+ param.iceLockerId = Number(this.editRuleForm.iceLockerId)
|
|
|
+ param.coolerBoxId = Number(this.editRuleForm.coolerBoxId)
|
|
|
+ param.freezeClaim = Number(this.editRuleForm.freezeClaim)
|
|
|
+ if (this.editRuleForm.outStorageTime == '') {
|
|
|
+ delete param.coolerBoxId
|
|
|
+ } else {
|
|
|
+ delete param.iceLockerId
|
|
|
+ }
|
|
|
+ putIceRaftRecord(param).then(res => {
|
|
|
if (res.code == 200) {
|
|
|
+ this.innerVisible = false
|
|
|
this.$message({
|
|
|
- message: '删除成功,请重新入库该冰排!',
|
|
|
- type: 'warning'
|
|
|
+ type: 'success',
|
|
|
+ message: res.msg
|
|
|
});
|
|
|
- const precisePage = Math.ceil((this.historyTotal - 1) / this.historyPagination.PageSize)
|
|
|
- this.historyPagination.PageIndex = this.historyPagination.PageIndex > precisePage ? precisePage :
|
|
|
- this
|
|
|
- .historyPagination.PageIndex
|
|
|
- this.historyPagination.PageIndex = this.historyPagination.PageIndex < 1 ? 1 : this
|
|
|
- .historyPagination.PageIndex
|
|
|
this.getHistory()
|
|
|
- this.getList()
|
|
|
}
|
|
|
})
|
|
|
}).catch(() => {
|
|
|
- // console.log('已取消删除')
|
|
|
+ // console.log('取消修改')
|
|
|
});
|
|
|
- },
|
|
|
- changeSize(val) {
|
|
|
- this.Pagination.PageSize = val
|
|
|
- this.getList()
|
|
|
- },
|
|
|
- changeCurrent(val) {
|
|
|
- this.Pagination.PageIndex = val
|
|
|
- this.getList()
|
|
|
- },
|
|
|
- // 历史记录分页
|
|
|
- historySize(val) {
|
|
|
- this.historyPagination.PageSize = val
|
|
|
- this.getHistory()
|
|
|
- },
|
|
|
- historyCurrent(val) {
|
|
|
- this.historyPagination.PageIndex = val
|
|
|
- this.getHistory()
|
|
|
- },
|
|
|
- // 关闭历史记录
|
|
|
- closeHistory() {
|
|
|
- this.historyPagination.PageIndex = 1
|
|
|
- this.historyVisible = false
|
|
|
- this.getList()
|
|
|
- },
|
|
|
- // 嵌套弹窗
|
|
|
- closeNested() {
|
|
|
- this.staffName = ''
|
|
|
- this.editRuleList.forEach(item => {
|
|
|
- if (item.type == 'searchSelect') {
|
|
|
- item.options = []
|
|
|
+ } else {
|
|
|
+ this.$message.error('表单信息不完整,请继续填写完整');
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 删除历史记录
|
|
|
+ delHistory(id) {
|
|
|
+ this.$confirm('确定删除该冰排信息吗, 是否继续?', '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ }).then(() => {
|
|
|
+ delIceRaftRecord({
|
|
|
+ id: id
|
|
|
+ }).then(res => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.$message({
|
|
|
+ message: '删除成功,请重新入库该冰排!',
|
|
|
+ type: 'warning'
|
|
|
+ });
|
|
|
+ const precisePage = Math.ceil((this.historyTotal - 1) / this.historyPagination.PageSize)
|
|
|
+ this.historyPagination.PageIndex = this.historyPagination.PageIndex > precisePage ? precisePage :
|
|
|
+ this
|
|
|
+ .historyPagination.PageIndex
|
|
|
+ this.historyPagination.PageIndex = this.historyPagination.PageIndex < 1 ? 1 : this
|
|
|
+ .historyPagination.PageIndex
|
|
|
+ this.getHistory()
|
|
|
+ this.getList()
|
|
|
}
|
|
|
})
|
|
|
- },
|
|
|
- // 清空表单
|
|
|
- closeDialog() {
|
|
|
- this.resetSelect()
|
|
|
- this.ruleForm.code = []
|
|
|
- this.$refs.childRules.resetCheck();
|
|
|
- this.coldCupboard.options = []
|
|
|
- this.thermostat.options = []
|
|
|
- },
|
|
|
+ }).catch(() => {
|
|
|
+ // console.log('已取消删除')
|
|
|
+ });
|
|
|
+ },
|
|
|
+ changeSize(val) {
|
|
|
+ this.Pagination.PageSize = val
|
|
|
+ this.getList()
|
|
|
+ },
|
|
|
+ changeCurrent(val) {
|
|
|
+ this.Pagination.PageIndex = val
|
|
|
+ this.getList()
|
|
|
+ },
|
|
|
+ // 历史记录分页
|
|
|
+ historySize(val) {
|
|
|
+ this.historyPagination.PageSize = val
|
|
|
+ this.getHistory()
|
|
|
+ },
|
|
|
+ historyCurrent(val) {
|
|
|
+ this.historyPagination.PageIndex = val
|
|
|
+ this.getHistory()
|
|
|
+ },
|
|
|
+ // 冰排使用记录分页
|
|
|
+ usageLogSize(val) {
|
|
|
+ this.usageLogPagination.PageSize = val
|
|
|
+ this.getraftRecording()
|
|
|
+ },
|
|
|
+ usageLogCurrent(val) {
|
|
|
+ this.usageLogPagination.PageIndex = val
|
|
|
+ this.getraftRecording()
|
|
|
+ },
|
|
|
+ // 关闭历史记录
|
|
|
+ closeHistory() {
|
|
|
+ this.historyPagination.PageIndex = 1
|
|
|
+ this.historyVisible = false
|
|
|
+ this.getList()
|
|
|
+ },
|
|
|
+ // 嵌套弹窗
|
|
|
+ closeNested() {
|
|
|
+ this.staffName = ''
|
|
|
+ this.editRuleList.forEach(item => {
|
|
|
+ if (item.type == 'searchSelect') {
|
|
|
+ item.options = []
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 清空表单
|
|
|
+ closeDialog() {
|
|
|
+ this.resetSelect()
|
|
|
+ this.ruleForm.code = []
|
|
|
+ this.$refs.childRules.resetCheck();
|
|
|
+ this.coldCupboard.options = []
|
|
|
+ this.thermostat.options = []
|
|
|
+ },
|
|
|
+ iceTracingDialog() {
|
|
|
+ this.page = 2
|
|
|
+ this.limitNoil = true
|
|
|
+ this.operationType = ''
|
|
|
}
|
|
|
}
|
|
|
+}
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
- .card_history ::v-deep .el-dialog__body {
|
|
|
- padding: 0px 20px !important;
|
|
|
- }
|
|
|
+.card_history ::v-deep .el-dialog__body {
|
|
|
+ padding: 0px 20px !important;
|
|
|
+}
|
|
|
+
|
|
|
+.card_iceTracing ::v-deep .el-dialog__body {
|
|
|
+ padding: 0px 10px !important;
|
|
|
+}
|
|
|
</style>
|