|
@@ -97,286 +97,319 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-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',
|
|
|
+ import {
|
|
|
+ getIceRaftNewest,
|
|
|
+ iceraftIn,
|
|
|
+ iceraftOut,
|
|
|
+ getIceRaftRecord,
|
|
|
+ putIceRaftRecord,
|
|
|
+ delIceRaftRecord,
|
|
|
+ getRecording,
|
|
|
+ getExportExecl,
|
|
|
+ raftIsoutstorage
|
|
|
+ } 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,
|
|
|
+ usageEmployee
|
|
|
+ } from "./iceRaft.js";
|
|
|
+ export default {
|
|
|
+ name: 'IceManagement',
|
|
|
+ components: {
|
|
|
+ actionBar,
|
|
|
+ tables,
|
|
|
+ pagination,
|
|
|
+ forms
|
|
|
+ },
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ operateList: [{
|
|
|
+ type: 'come',
|
|
|
+ title: '入库',
|
|
|
}, {
|
|
|
- bgcolor: '#409EFF',
|
|
|
- label: '冷冻中',
|
|
|
- value: '1',
|
|
|
+ type: 'goOut',
|
|
|
+ title: '出库',
|
|
|
}, {
|
|
|
- bgcolor: '#67C23A',
|
|
|
- label: '待使用',
|
|
|
- value: '2',
|
|
|
+ type: 'export',
|
|
|
+ colour: 'success',
|
|
|
+ title: '冰排使用记录',
|
|
|
+ }],
|
|
|
+ formList: [{
|
|
|
+ type: 'input',
|
|
|
+ label: '编号',
|
|
|
+ field: 'code',
|
|
|
+ placeholder: '请输入编号',
|
|
|
}, {
|
|
|
- bgcolor: '#E6A23C',
|
|
|
- label: '使用中',
|
|
|
- value: '3',
|
|
|
+ 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: '#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,
|
|
|
+ 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: [],
|
|
|
+ },
|
|
|
+ // 冰排使用记录
|
|
|
+ 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 usageList = usageEmployee()
|
|
|
+ var usageArr = deleteElementById(usageList, 'multistage')
|
|
|
+ this.usageLogList = deleteElementById(usageArr, 'action')
|
|
|
+ } else {
|
|
|
+ var tableList = employee()
|
|
|
+ this.tableList = tableList
|
|
|
+ var usageList = usageEmployee()
|
|
|
+ var usageArr1 = deleteElementById(usageList, 'iceRaftRecord.status')
|
|
|
+ this.usageLogList = usageArr1
|
|
|
+ }
|
|
|
+ if (!this.iceColdFlag) {
|
|
|
+ var historyList = historyRecord()
|
|
|
+ this.historyList = deleteElementById(historyList, 'multistage')
|
|
|
+ } else {
|
|
|
+ this.historyList = historyRecord()
|
|
|
+ }
|
|
|
|
|
|
- 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
|
|
|
+ function deleteElementById(arr, id) {
|
|
|
+ return arr.filter((item) => item.field !== id);
|
|
|
+ }
|
|
|
this.getList()
|
|
|
+ this.getFreezer()
|
|
|
+ this.getIncubator()
|
|
|
},
|
|
|
- // 获取冰排列表
|
|
|
- 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)
|
|
|
+ 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
|
|
|
}
|
|
|
- })
|
|
|
- },
|
|
|
- // 弹窗表单添加
|
|
|
- handleAdd() {
|
|
|
- let flag = this.$refs['childRules'].validateForm();
|
|
|
- if (flag) {
|
|
|
- const params = {
|
|
|
- ...this.ruleForm,
|
|
|
+ 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') {
|
|
|
+ raftIsoutstorage({
|
|
|
+ code: params.code,
|
|
|
+ }).then(res => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ if (this.userList.dept) {
|
|
|
+ if (!this.userList.dept.isOutStorage) {
|
|
|
+ this.getOutStorage(params, res.msg)
|
|
|
+ } else {
|
|
|
+ this.$message.error(res.msg);
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ this.$message.error('当前账户无公司信息');
|
|
|
+ }
|
|
|
+ } else if (res.code == 1201) {
|
|
|
+ this.getOutStorage(params, res.msg)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ this.$message.error('表单信息不完整,请继续填写完整');
|
|
|
}
|
|
|
- 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') {
|
|
|
+ },
|
|
|
+ // 冰排出库/装箱
|
|
|
+ getOutStorage(event, msg) {
|
|
|
+ const params = event
|
|
|
+ this.$confirm(msg, '是否继续出库', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ }).then(() => {
|
|
|
delete params.iceLockerId
|
|
|
delete params.freezeClaim
|
|
|
params.coolerBoxId = Number(params.coolerBoxId)
|
|
@@ -390,474 +423,472 @@ export default {
|
|
|
this.getList()
|
|
|
}
|
|
|
})
|
|
|
+ }).catch(() => {
|
|
|
+ console.log('取消出库')
|
|
|
+ });
|
|
|
+ },
|
|
|
+ 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()
|
|
|
}
|
|
|
- } 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.$forceUpdate()
|
|
|
+ },
|
|
|
+ // 选择保温箱
|
|
|
+ changeSelect(value) {
|
|
|
this.getraftRecording()
|
|
|
- }
|
|
|
- this.$forceUpdate()
|
|
|
- },
|
|
|
- // 选择保温箱
|
|
|
- changeSelect(value) {
|
|
|
- this.getraftRecording()
|
|
|
- },
|
|
|
- // 时间选择搜索
|
|
|
- timeChange(event) {
|
|
|
- this.getraftRecording()
|
|
|
- },
|
|
|
- // 重置
|
|
|
- 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
|
|
|
+ },
|
|
|
+ // 时间选择搜索
|
|
|
+ timeChange(event) {
|
|
|
+ this.getraftRecording()
|
|
|
+ },
|
|
|
+ // 重置
|
|
|
+ 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],
|
|
|
}
|
|
|
- })
|
|
|
- },
|
|
|
- // 导出冰排使用记录
|
|
|
- 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);
|
|
|
+ getRecording(params).then(res => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.usageLogTotal = res.data.count
|
|
|
+ this.usageLogData = res.data.list
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 导出冰排使用记录
|
|
|
+ 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) {
|
|
|
+ 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 {
|
|
|
- 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();
|
|
|
+ this.$message.error('未获取到文件名,导出失败');
|
|
|
}
|
|
|
- } else {
|
|
|
- this.$message.error('未获取到文件名,导出失败');
|
|
|
- }
|
|
|
- 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 (this.operationType == 'goOut') {
|
|
|
- if (this.limitNoil) {
|
|
|
- this.getIncubator()
|
|
|
- }
|
|
|
- } else if (this.operationType == 'edit') {
|
|
|
- if (this.deposit) {
|
|
|
+ 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 {
|
|
|
+ } else if (this.operationType == 'goOut') {
|
|
|
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 = []
|
|
|
+ } else if (this.operationType == 'edit') {
|
|
|
+ if (this.deposit) {
|
|
|
+ if (this.limitNo) {
|
|
|
+ this.getFreezer()
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ if (this.limitNoil) {
|
|
|
+ this.getIncubator()
|
|
|
+ }
|
|
|
}
|
|
|
- })
|
|
|
- if (this.deposit) {
|
|
|
- this.getFreezer()
|
|
|
} else {
|
|
|
- this.getIncubator()
|
|
|
+ if (type == 'iceLockerId' && this.limitNo) {
|
|
|
+ this.getFreezer()
|
|
|
+ } else if (type == 'coolerBoxId' && this.limitNoil) {
|
|
|
+ this.getIncubator()
|
|
|
+ }
|
|
|
}
|
|
|
- } else {
|
|
|
- if (this.operationType == 'come') {
|
|
|
- this.formRuleList.forEach(item => {
|
|
|
+ },
|
|
|
+ // 搜索
|
|
|
+ remoteMethod(value) {
|
|
|
+ this.resetSelect()
|
|
|
+ this.staffName = value
|
|
|
+ if (this.operationType == 'edit') {
|
|
|
+ this.editRuleList.forEach(item => {
|
|
|
if (item.type == 'searchSelect') {
|
|
|
item.options = []
|
|
|
}
|
|
|
})
|
|
|
- this.getFreezer()
|
|
|
- } else if (this.operationType == 'goOut') {
|
|
|
- this.getIncubator()
|
|
|
+ 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,
|
|
|
- }
|
|
|
- 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') {
|
|
|
+ },
|
|
|
+ // 获取冷冻柜列表
|
|
|
+ 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)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ this.formList.forEach(item => {
|
|
|
+ if (item.field == 'iceLockerId') {
|
|
|
item.options = item.options.concat(arrList)
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
+ }
|
|
|
+ if (arrList.length >= 10) {
|
|
|
+ this.page = ++this.page;
|
|
|
} else {
|
|
|
- this.formList.forEach(item => {
|
|
|
- if (item.field == 'iceLockerId') {
|
|
|
- item.options = item.options.concat(arrList)
|
|
|
- }
|
|
|
- })
|
|
|
+ // 已经没数据了 不需要增加数据
|
|
|
+ this.limitNo = false;
|
|
|
}
|
|
|
}
|
|
|
- if (arrList.length >= 10) {
|
|
|
- this.page = ++this.page;
|
|
|
- } else {
|
|
|
- // 已经没数据了 不需要增加数据
|
|
|
- this.limitNo = false;
|
|
|
- }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 获取保温箱列表
|
|
|
+ getIncubator() {
|
|
|
+ let params = {
|
|
|
+ page: this.page,
|
|
|
+ pageSize: 10,
|
|
|
+ status: '2',
|
|
|
+ name: this.staffName,
|
|
|
}
|
|
|
- })
|
|
|
- },
|
|
|
- // 获取保温箱列表
|
|
|
- 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') {
|
|
|
+ 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)
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ this.formList.forEach(item => {
|
|
|
+ if (item.field == 'coolerBoxId') {
|
|
|
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.formList.forEach(item => {
|
|
|
- if (item.field == 'coolerBoxId') {
|
|
|
- item.options = item.options.concat(arrList)
|
|
|
- }
|
|
|
- })
|
|
|
- this.incubatorData = this.incubatorData.concat(arrList)
|
|
|
+ // 已经没数据了 不需要增加数据
|
|
|
+ this.limitNoil = false;
|
|
|
}
|
|
|
- // this.thermostat.options = this.thermostat.options.concat(arrList)
|
|
|
- }
|
|
|
- if (arrList.length >= 10) {
|
|
|
- this.page = ++this.page;
|
|
|
- } else {
|
|
|
- // 已经没数据了 不需要增加数据
|
|
|
- this.limitNoil = false;
|
|
|
}
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 冰排列表
|
|
|
+ buttonData(row, type) {
|
|
|
+ this.operationType = type
|
|
|
+ this.iceRaftId = row.id
|
|
|
+ this.iceRaftCode = row.code
|
|
|
+ if (type == 'logs') {
|
|
|
+ this.historyVisible = true
|
|
|
+ this.getHistory()
|
|
|
}
|
|
|
- })
|
|
|
- },
|
|
|
- // 冰排列表
|
|
|
- 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
|
|
|
+ },
|
|
|
+ // 获取历史记录列表
|
|
|
+ getHistory(iceRaftId) {
|
|
|
+ var params = {
|
|
|
+ page: this.historyPagination.PageIndex,
|
|
|
+ pageSize: this.historyPagination.PageSize,
|
|
|
+ iceRaftId: this.iceRaftId,
|
|
|
+ // ...this.searchValue
|
|
|
}
|
|
|
- })
|
|
|
- },
|
|
|
- // 历史记录操作
|
|
|
- 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.deposit = false
|
|
|
- this.getIncubator()
|
|
|
- this.editRuleList.push(this.thermostat)
|
|
|
- // 保温箱
|
|
|
- this.editRuleForm.coolerBoxId = String(row.coolerBoxId)
|
|
|
+ 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.deposit = false
|
|
|
+ this.getIncubator()
|
|
|
+ this.editRuleList.push(this.thermostat)
|
|
|
+ // 保温箱
|
|
|
+ this.editRuleForm.coolerBoxId = String(row.coolerBoxId)
|
|
|
+ }
|
|
|
+ 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)
|
|
|
}
|
|
|
- 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
|
|
|
+ },
|
|
|
+ // 编辑历史记录提交
|
|
|
+ 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('取消修改')
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ this.$message.error('表单信息不完整,请继续填写完整');
|
|
|
}
|
|
|
- } else if (type == 'del') {
|
|
|
- this.delHistory(row.id)
|
|
|
- }
|
|
|
- },
|
|
|
- // 编辑历史记录提交
|
|
|
- submit() {
|
|
|
- let flag = this.$refs['editRules'].validateForm();
|
|
|
- if (flag) {
|
|
|
- this.$confirm('确定修改该冰排信息吗, 是否继续?', '提示', {
|
|
|
+ },
|
|
|
+ // 删除历史记录
|
|
|
+ delHistory(id) {
|
|
|
+ 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 => {
|
|
|
+ delIceRaftRecord({
|
|
|
+ id: id
|
|
|
+ }).then(res => {
|
|
|
if (res.code == 200) {
|
|
|
- this.innerVisible = false
|
|
|
this.$message({
|
|
|
- type: 'success',
|
|
|
- message: res.msg
|
|
|
+ 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()
|
|
|
}
|
|
|
})
|
|
|
}).catch(() => {
|
|
|
- // console.log('取消修改')
|
|
|
+ // console.log('已取消删除')
|
|
|
});
|
|
|
- } 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()
|
|
|
+ },
|
|
|
+ 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 = []
|
|
|
}
|
|
|
})
|
|
|
- }).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 = ''
|
|
|
+ },
|
|
|
+ // 清空表单
|
|
|
+ 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;
|
|
|
-}
|
|
|
+ .card_iceTracing ::v-deep .el-dialog__body {
|
|
|
+ padding: 0px 10px !important;
|
|
|
+ }
|
|
|
</style>
|