From 9f9f339c44f1904da0126e4418309b2363e87e10 Mon Sep 17 00:00:00 2001 From: lyh <925863403@qq.com> Date: 星期四, 10 四月 2025 15:20:05 +0800 Subject: [PATCH] 修改 --- src/views/eam/maintenance/EamInspectionOrderList.vue | 506 +++++++++++++++++++++++++++++-------------------------- 1 files changed, 264 insertions(+), 242 deletions(-) diff --git a/src/views/eam/maintenance/EamInspectionOrderList.vue b/src/views/eam/maintenance/EamInspectionOrderList.vue index 11083ce..085ec74 100644 --- a/src/views/eam/maintenance/EamInspectionOrderList.vue +++ b/src/views/eam/maintenance/EamInspectionOrderList.vue @@ -112,7 +112,7 @@ <a @click="handleDetail(record)">璇︽儏</a> </a-menu-item> <a-menu-item v-if="record.inspectionStatus === '1'" > - <a-popconfirm title="纭畾浣滃簾鍚�?" @confirm="() => handleDelete(record.id)"> + <a-popconfirm title="纭畾浣滃簾鍚�?" @confirm="() => handleOrReceive(record.id)"> <a>浣滃簾</a> </a-popconfirm> </a-menu-item> @@ -130,261 +130,283 @@ <script> - import '@/assets/less/TableExpand.less' - import { mixinDevice } from '@/utils/mixin' - import { JeecgListMixin } from '@/mixins/JeecgListMixin' - import EamInspectionOrderModal from './modules/EamInspectionOrderModal' - import EamInspectionOrderModalXq from './modules/EamInspectionOrderModalXq.vue' - import { deleteAction, getAction } from '@api/manage' +import '@/assets/less/TableExpand.less' +import { mixinDevice } from '@/utils/mixin' +import { JeecgListMixin } from '@/mixins/JeecgListMixin' +import EamInspectionOrderModal from './modules/EamInspectionOrderModal' +import EamInspectionOrderModalXq from './modules/EamInspectionOrderModalXq.vue' +import { deleteAction, getAction } from '@api/manage' - export default { - name: 'EamInspectionOrderList', - mixins:[JeecgListMixin, mixinDevice], - components: { - EamInspectionOrderModal, - EamInspectionOrderModalXq - }, - data () { - return { - description: 'eam_inspection_order绠$悊椤甸潰', - // 琛ㄥご - columns: [ - { - title: '#', - dataIndex: '', - key:'rowIndex', - width:60, - align:"center", - customRender:function (t,r,index) { - return parseInt(index)+1; - } - }, - { - title:'宸ュ崟鍙�', - align:"center", - dataIndex: 'orderNum' - }, - { - title:'璁惧缂栧彿', - align:"center", - dataIndex: 'equipmentId_dictText' - }, - { - title:'鏍囧噯缂栫爜', - align:"center", - dataIndex: 'standardId_dictText' - }, - { - title:'鐐规鏃ユ湡', - align:"center", - dataIndex: 'inspectionDate', - customRender:function (text) { - return !text?"":(text.length>10?text.substr(0,10):text) - } - }, - { - title:'鐐规杩囨湡鏃堕棿', - align:"center", - dataIndex: 'expirationTime', - customRender:function (text) { - return !text?"":(text.length>10?text.substr(0,10):text) - } - }, - { - title:'鍒涘缓鏂瑰紡', - align:"center", - dataIndex: 'creationMethod_dictText' - }, - { - title:'鐐规鐘舵��', - align:"center", - dataIndex: 'inspectionStatus_dictText' - }, - { - title:'鐐规鏃堕棿', - align:"center", - dataIndex: 'operateTime', - customRender:function (text) { - return !text?"":(text.length>10?text.substr(0,10):text) - } - }, - { - title:'鐐规浜�', - align:"center", - dataIndex: 'operator_dictText' - }, - { - title:'鐝粍闀跨‘璁�', - align:"center", - dataIndex: 'confirmUser' - }, - { - title:'纭鏃堕棿', - align:"center", - dataIndex: 'confirmTime', - customRender:function (text) { - return !text?"":(text.length>10?text.substr(0,10):text) - } - }, - { - title: '鎿嶄綔', - dataIndex: 'action', - align:"center", - fixed:"right", - width:147, - scopedSlots: { customRender: 'action' } +export default { + name: 'EamInspectionOrderList', + mixins:[JeecgListMixin, mixinDevice], + components: { + EamInspectionOrderModal, + EamInspectionOrderModalXq + }, + data () { + return { + description: 'eam_inspection_order绠$悊椤甸潰', + // 琛ㄥご + columns: [ + { + title: '#', + dataIndex: '', + key:'rowIndex', + width:60, + align:"center", + customRender:function (t,r,index) { + return parseInt(index)+1; } - ], - url: { - list: "/eam/eamInspectionOrder/list", - delete: "/eam/eamInspectionOrder/cancelInspectionOrder", - deleteBatch: "/eam/eamInspectionOrder/deleteBatch", - exportXlsUrl: "/eam/eamInspectionOrder/exportXls", - importExcelUrl: "eam/eamInspectionOrder/importExcel", - receiveInspectionOrder : "eam/eamInspectionOrder/receiveInspectionOrder", - cancelOrReceive: "eam/eamInspectionOrder/cancelOrReceive" }, - dictOptions:{}, - superFieldList:[], - } - }, - created() { + { + title:'宸ュ崟鍙�', + align:"center", + dataIndex: 'orderNum' + }, + { + title:'璁惧缂栧彿', + align:"center", + dataIndex: 'equipmentId_dictText' + }, + { + title:'鏍囧噯缂栫爜', + align:"center", + dataIndex: 'standardId_dictText' + }, + { + title:'鐐规鏃ユ湡', + align:"center", + dataIndex: 'inspectionDate', + customRender:function (text) { + return !text?"":(text.length>10?text.substr(0,10):text) + } + }, + { + title:'鐐规杩囨湡鏃堕棿', + align:"center", + dataIndex: 'expirationTime', + customRender:function (text) { + return !text?"":(text.length>10?text.substr(0,10):text) + } + }, + { + title:'鍒涘缓鏂瑰紡', + align:"center", + dataIndex: 'creationMethod_dictText' + }, + { + title:'鐐规鐘舵��', + align:"center", + dataIndex: 'inspectionStatus_dictText' + }, + { + title:'鐐规鏃堕棿', + align:"center", + dataIndex: 'operateTime', + customRender:function (text) { + return !text?"":(text.length>10?text.substr(0,10):text) + } + }, + { + title:'鐐规浜�', + align:"center", + dataIndex: 'operator_dictText' + }, + { + title:'鐝粍闀跨‘璁�', + align:"center", + dataIndex: 'confirmUser' + }, + { + title:'纭鏃堕棿', + align:"center", + dataIndex: 'confirmTime', + customRender:function (text) { + return !text?"":(text.length>10?text.substr(0,10):text) + } + }, + { + title: '鎿嶄綔', + dataIndex: 'action', + align:"center", + fixed:"right", + width:147, + scopedSlots: { customRender: 'action' } + } + ], + url: { + list: "/eam/eamInspectionOrder/list", + cancelInspectionOrder: "/eam/eamInspectionOrder/cancelInspectionOrder", + deleteBatch: "/eam/eamInspectionOrder/deleteBatch", + exportXlsUrl: "/eam/eamInspectionOrder/exportXls", + importExcelUrl: "eam/eamInspectionOrder/importExcel", + receiveInspectionOrder : "eam/eamInspectionOrder/receiveInspectionOrder", + cancelOrReceive: "eam/eamInspectionOrder/cancelOrReceive" + }, + dictOptions:{}, + superFieldList:[], + } + }, + created() { this.getSuperFieldList(); + }, + computed: { + importExcelUrl: function(){ + return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; }, - computed: { - importExcelUrl: function(){ - return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; - }, + }, + methods: { + initDictConfig(){ }, - methods: { - initDictConfig(){ - }, - getSuperFieldList(){ - let fieldList=[]; - fieldList.push({type:'string',value:'orderNum',text:'宸ュ崟鍙�',dictCode:''}) - fieldList.push({type:'string',value:'equipmentId',text:'璁惧ID',dictCode:''}) - fieldList.push({type:'string',value:'standardId',text:'鏍囧噯ID',dictCode:''}) - fieldList.push({type:'date',value:'inspectionDate',text:'鐐规鏃ユ湡'}) - fieldList.push({type:'date',value:'operateTime',text:'鐐规鏃堕棿'}) - fieldList.push({type:'string',value:'operator',text:'鐐规浜�',dictCode:''}) - fieldList.push({type:'date',value:'expirationTime',text:'鐐规杩囨湡鏃堕棿'}) - fieldList.push({type:'string',value:'creationMethod',text:'鍒涘缓鏂瑰紡',dictCode:''}) - fieldList.push({type:'string',value:'inspectionStatus',text:'鐐规鐘舵��',dictCode:''}) - fieldList.push({type:'string',value:'confirmUser',text:'璁惧绠$悊鍛樼‘璁�',dictCode:''}) - fieldList.push({type:'date',value:'confirmTime',text:'纭鏃堕棿'}) - fieldList.push({type:'string',value:'remark',text:'澶囨敞',dictCode:''}) - fieldList.push({type:'string',value:'imageFiles',text:'鐓х墖鏂囦欢ids;id浠ラ�楀彿鍒嗛殧',dictCode:''}) - this.superFieldList = fieldList - }, - //璇︽儏 - handleDetail: function(record) { - this.$refs.modalFormXq.edit(record); - this.$refs.modalFormXq.title = "璇︽儏"; - this.$refs.modalFormXq.disableSubmit = true; - }, - handleInspection(id) { - if (!this.url.receiveInspectionOrder) { - this.$message.error("璇疯缃畊rl.receiveInspectionOrder!") - return + getSuperFieldList(){ + let fieldList=[]; + fieldList.push({type:'string',value:'orderNum',text:'宸ュ崟鍙�',dictCode:''}) + fieldList.push({type:'string',value:'equipmentId',text:'璁惧ID',dictCode:''}) + fieldList.push({type:'string',value:'standardId',text:'鏍囧噯ID',dictCode:''}) + fieldList.push({type:'date',value:'inspectionDate',text:'鐐规鏃ユ湡'}) + fieldList.push({type:'date',value:'operateTime',text:'鐐规鏃堕棿'}) + fieldList.push({type:'string',value:'operator',text:'鐐规浜�',dictCode:''}) + fieldList.push({type:'date',value:'expirationTime',text:'鐐规杩囨湡鏃堕棿'}) + fieldList.push({type:'string',value:'creationMethod',text:'鍒涘缓鏂瑰紡',dictCode:''}) + fieldList.push({type:'string',value:'inspectionStatus',text:'鐐规鐘舵��',dictCode:''}) + fieldList.push({type:'string',value:'confirmUser',text:'璁惧绠$悊鍛樼‘璁�',dictCode:''}) + fieldList.push({type:'date',value:'confirmTime',text:'纭鏃堕棿'}) + fieldList.push({type:'string',value:'remark',text:'澶囨敞',dictCode:''}) + fieldList.push({type:'string',value:'imageFiles',text:'鐓х墖鏂囦欢ids;id浠ラ�楀彿鍒嗛殧',dictCode:''}) + this.superFieldList = fieldList + }, + //璇︽儏 + handleDetail: function(record) { + this.$refs.modalFormXq.edit(record); + this.$refs.modalFormXq.title = "璇︽儏"; + this.$refs.modalFormXq.disableSubmit = true; + }, + handleInspection(id) { + if (!this.url.receiveInspectionOrder) { + this.$message.error("璇疯缃畊rl.receiveInspectionOrder!") + return + } + var that = this; + getAction(that.url.receiveInspectionOrder, { id: id }).then((res) => { + if (res.success) { + that.$notification.success({ + message: '娑堟伅', + description: res.message + }); + that.loadData(); + } else { + // that.$message.warning(res.message); + that.$notification.warning({ + message: '娑堟伅', + description: res.message + }); + } + }); + }, + handleOrReceive(id){ + if (!this.url.cancelInspectionOrder) { + this.$message.error("璇疯缃畊rl.cancelInspectionOrder!") + return + } + var that = this; + getAction(that.url.cancelInspectionOrder, { id: id }).then((res) => { + if (res.success) { + that.$notification.success({ + message: '娑堟伅', + description: res.message + }); + that.loadData(); + } else { + // that.$message.warning(res.message); + that.$notification.warning({ + message: '娑堟伅', + description: res.message + }); + } + }); + }, + batchZf(type){ + if (this.selectedRowKeys.length <= 0) { + this.$notification.warning({ + message:'娑堟伅', + description:"璇烽�夋嫨涓�鏉¤褰�" + }); + } else { + var ids = ""; + for (var a = 0; a < this.selectedRowKeys.length; a++) { + ids += this.selectedRowKeys[a] + ","; } var that = this; - getAction(that.url.receiveInspectionOrder, { id: id }).then((res) => { - if (res.success) { - that.$notification.success({ - message: '娑堟伅', - description: res.message - }); - that.loadData(); - } else { - // that.$message.warning(res.message); - that.$notification.warning({ - message: '娑堟伅', - description: res.message + this.$confirm({ + title: "纭浣滃簾", + content: "鏄惁浣滃簾閫変腑鏁版嵁锛屽彧鏈夊緟鐐规鐘舵�佺殑鏁版嵁鎵嶅彲浣滃簾鎴愬姛?", + onOk: function () { + that.loading = true; + getAction(that.url.cancelOrReceive, {ids: ids,type:type}).then((res) => { + if (res.success) { + that.$notification.success({ + message:'娑堟伅', + description:res.message + }); + that.loadData(); + that.onClearSelected(); + } else { + // that.$message.warning(res.message); + that.$notification.warning({ + message:'娑堟伅', + description:res.message + }); + } + }).finally(() => { + that.loading = false; }); } }); - }, - batchZf(type){ - if (this.selectedRowKeys.length <= 0) { - this.$notification.warning({ - message:'娑堟伅', - description:"璇烽�夋嫨涓�鏉¤褰�" - }); - } else { - var ids = ""; - for (var a = 0; a < this.selectedRowKeys.length; a++) { - ids += this.selectedRowKeys[a] + ","; - } - var that = this; - this.$confirm({ - title: "纭浣滃簾", - content: "鏄惁浣滃簾閫変腑鏁版嵁锛屽彧鏈夊緟鐐规鐘舵�佺殑鏁版嵁鎵嶅彲浣滃簾鎴愬姛?", - onOk: function () { - that.loading = true; - getAction(that.url.cancelOrReceive, {ids: ids,type:type}).then((res) => { - if (res.success) { - that.$notification.success({ - message:'娑堟伅', - description:res.message - }); - that.loadData(); - that.onClearSelected(); - } else { - // that.$message.warning(res.message); - that.$notification.warning({ - message:'娑堟伅', - description:res.message - }); - } - }).finally(() => { - that.loading = false; - }); - } - }); + } + }, + batchLq(type){ + if (this.selectedRowKeys.length <= 0) { + this.$notification.warning({ + message:'娑堟伅', + description:"璇烽�夋嫨涓�鏉¤褰�" + }); + } else { + var ids = ""; + for (var a = 0; a < this.selectedRowKeys.length; a++) { + ids += this.selectedRowKeys[a] + ","; } - }, - batchLq(type){ - if (this.selectedRowKeys.length <= 0) { - this.$notification.warning({ - message:'娑堟伅', - description:"璇烽�夋嫨涓�鏉¤褰�" - }); - } else { - var ids = ""; - for (var a = 0; a < this.selectedRowKeys.length; a++) { - ids += this.selectedRowKeys[a] + ","; + var that = this; + this.$confirm({ + title: "纭棰嗗彇", + content: "鏄惁棰嗗彇閫変腑鏁版嵁锛屽彧鏈夊緟鐐规鐘舵�佺殑鏁版嵁鎵嶅彲棰嗗彇鎴愬姛?", + onOk: function () { + that.loading = true; + getAction(that.url.cancelOrReceive, {ids: ids,type:type}).then((res) => { + if (res.success) { + that.$notification.success({ + message:'娑堟伅', + description:res.message + }); + that.loadData(); + that.onClearSelected(); + } else { + // that.$message.warning(res.message); + that.$notification.warning({ + message:'娑堟伅', + description:res.message + }); + } + }).finally(() => { + that.loading = false; + }); } - var that = this; - this.$confirm({ - title: "纭棰嗗彇", - content: "鏄惁棰嗗彇閫変腑鏁版嵁锛屽彧鏈夊緟鐐规鐘舵�佺殑鏁版嵁鎵嶅彲棰嗗彇鎴愬姛?", - onOk: function () { - that.loading = true; - getAction(that.url.cancelOrReceive, {ids: ids,type:type}).then((res) => { - if (res.success) { - that.$notification.success({ - message:'娑堟伅', - description:res.message - }); - that.loadData(); - that.onClearSelected(); - } else { - // that.$message.warning(res.message); - that.$notification.warning({ - message:'娑堟伅', - description:res.message - }); - } - }).finally(() => { - that.loading = false; - }); - } - }); - } - }, - } + }); + } + }, } +} </script> <style scoped> - @import '~@assets/less/common.less'; +@import '~@assets/less/common.less'; </style> \ No newline at end of file -- Gitblit v1.9.3