From 6c86748e1a987865cbf5bafa9b122c76bd24a695 Mon Sep 17 00:00:00 2001 From: zhaowei <zhaowei> Date: 星期二, 22 七月 2025 11:51:49 +0800 Subject: [PATCH] 技术状态变更及流程 --- src/views/eam/technical/modules/EamTechnicalStatusChangeModal.vue | 342 ++++++++++++----- src/views/eam/technical/EamTechnicalStatusChangeList.vue | 335 +++++++++------- src/views/flowable/workflow/FlowTodo.vue | 20 + src/views/flowable/workflow/TechnicalStatus/TechnicalStatusChangeApprovalModal.vue | 394 ++++++++++++++++++++ src/views/eam/equipment/modules/LxSearchEquipmentSelect.vue | 13 src/views/eam/maintenance/EamSecondMaintenanceOrderList.vue | 2 6 files changed, 855 insertions(+), 251 deletions(-) diff --git a/src/views/eam/equipment/modules/LxSearchEquipmentSelect.vue b/src/views/eam/equipment/modules/LxSearchEquipmentSelect.vue index b5c223c..e04b5bc 100644 --- a/src/views/eam/equipment/modules/LxSearchEquipmentSelect.vue +++ b/src/views/eam/equipment/modules/LxSearchEquipmentSelect.vue @@ -47,6 +47,11 @@ type:Boolean, default:()=>true, required:false + }, + factoryOrgCode:{ + type:String, + default:'', + required:false } }, data() { @@ -80,7 +85,7 @@ initSelectValue() { if(!this.selectedAsyncValue || !this.selectedAsyncValue.key || this.selectedAsyncValue.key!=this.value){ console.log("杩欐墠璇锋眰鍚庡彴") - getAction(`/eam/equipment/asyncLoadEquipment`, { id: this.value }).then(res=>{ + getAction(`/eam/equipment/asyncLoadEquipment`, { id: this.value,factoryOrgCode:this.factoryOrgCode }).then(res=>{ if(res.success){ if(res.result && res.result.length > 0){ let obj = { @@ -101,7 +106,7 @@ this.options = [] this.loading = true // 瀛楀吀code鏍煎紡锛歵able,text,code - getAction(`/eam/equipment/asyncLoadEquipment`, { keyword: value, pageSize: this.pageSize }).then(res => { + getAction(`/eam/equipment/asyncLoadEquipment`, { keyword: value, pageSize: this.pageSize,factoryOrgCode:this.factoryOrgCode }).then(res => { this.loading = false if (res.success) { if (currentLoad != this.lastLoad) { @@ -119,7 +124,7 @@ initDictData() { //寮傛涓�寮�濮嬩篃鍔犺浇涓�鐐规暟鎹� this.loading = true - getAction(`/eam/equipment/asyncLoadEquipment`, { pageSize: this.pageSize, keyword: '' }).then(res => { + getAction(`/eam/equipment/asyncLoadEquipment`, { pageSize: this.pageSize, keyword: '' ,factoryOrgCode:this.factoryOrgCode}).then(res => { this.loading = false if (res.success) { this.options = [...res.result] @@ -137,12 +142,14 @@ this.selectedAsyncValue = selectedObj //update-begin---author:wangshuai ---date:20221115 for锛歔issues/4213]JSearchSelectTag鏀归�犳敮鎸佸閫�------------ this.selectedValue = selectedObj.key + this.$emit('autocompleteForm', this.options.find(item => item.equipmentId === selectedObj.value)) //update-end---author:wangshuai ---date:20221115 for锛歔issues/4213]JSearchSelectTag鏀归�犳敮鎸佸閫�------------ } else { this.selectedAsyncValue = undefined this.selectedValue = undefined this.options = [] this.loadData('') + this.$emit('autocompleteForm', {}) } this.callback() //update-end-author:scott date:20201222 for:銆愭悳绱€�戞悳绱㈡煡璇㈢粍浠讹紝鍒犻櫎鏉′欢锛岄粯璁や笅鎷夎繕鏄笂娆$殑缂撳瓨鏁版嵁锛屼笉濂� JT-191 diff --git a/src/views/eam/maintenance/EamSecondMaintenanceOrderList.vue b/src/views/eam/maintenance/EamSecondMaintenanceOrderList.vue index dd20db6..4e10641 100644 --- a/src/views/eam/maintenance/EamSecondMaintenanceOrderList.vue +++ b/src/views/eam/maintenance/EamSecondMaintenanceOrderList.vue @@ -51,7 +51,7 @@ 棰嗗彇 </a-menu-item> <a-menu-item key="3" @click="handlerBatchRestore"> - <a-icon type="form"/> + <a-icon type="reload"/> 杩樺師 </a-menu-item> </a-menu> diff --git a/src/views/eam/technical/EamTechnicalStatusChangeList.vue b/src/views/eam/technical/EamTechnicalStatusChangeList.vue index acc6201..0cbd6cc 100644 --- a/src/views/eam/technical/EamTechnicalStatusChangeList.vue +++ b/src/views/eam/technical/EamTechnicalStatusChangeList.vue @@ -1,49 +1,41 @@ <template> <a-card :bordered="false"> - <!-- 鏌ヨ鍖哄煙 --> <div class="table-page-search-wrapper"> <a-form layout="inline" @keyup.enter.native="searchQuery"> <a-row :gutter="24"> - - <a-col :xl="6" :lg="7" :md="8" :sm="24"> - <a-form-item label="鍒犻櫎鏍囪"> - <a-input placeholder="璇疯緭鍏ュ垹闄ゆ爣璁�" v-model="queryParam.delFlag"></a-input> - </a-form-item> - </a-col> - <a-col :xl="6" :lg="7" :md="8" :sm="24"> + <a-col :xl="4" :lg="6" :md="8" :sm="12"> <a-form-item label="鍙樻洿鍗曞彿"> <a-input placeholder="璇疯緭鍏ュ彉鏇村崟鍙�" v-model="queryParam.changeOrderNum"></a-input> </a-form-item> </a-col> - <template v-if="toggleSearchStatus"> - <a-col :xl="6" :lg="7" :md="8" :sm="24"> + <a-col :xl="5" :lg="6" :md="8" :sm="12"> <a-form-item label="鍙樻洿鍗曠姸鎬�"> - <a-input placeholder="璇疯緭鍏ュ彉鏇村崟鐘舵��" v-model="queryParam.changeStatus"></a-input> + <j-dict-select-tag dict-code="technical_status_change_order_status" placeholder="璇烽�夋嫨鍙樻洿鍗曠姸鎬�" + v-model="queryParam.changeStatus"/> </a-form-item> </a-col> - <a-col :xl="6" :lg="7" :md="8" :sm="24"> - <a-form-item label="缂栧埗浜�"> - <a-input placeholder="璇疯緭鍏ョ紪鍒朵汉" v-model="queryParam.designer"></a-input> + <a-col :xl="5" :lg="6" :md="8" :sm="12"> + <a-form-item label="鐢宠鍗曚綅"> + <a-tree-select v-model="queryParam.factoryOrgCode" style="width: 100%" :tree-data="productionTreeData" + show-search :replaceFields="{key:'orgCode',value:'orgCode'}" + treeNodeFilterProp="title" searchPlaceholder="璇疯緭鍏ュ叧閿瓧鎼滅储" + :dropdown-style="{ maxHeight: '400px', overflow: 'auto' }" placeholder="璇烽�夋嫨鐢宠鍗曚綅" + allow-clear tree-default-expand-all> + </a-tree-select> </a-form-item> </a-col> - <a-col :xl="6" :lg="7" :md="8" :sm="24"> + <a-col :xl="5" :lg="6" :md="8" :sm="12"> <a-form-item label="缂栧埗鏃堕棿"> - <a-input placeholder="璇疯緭鍏ョ紪鍒舵椂闂�" v-model="queryParam.designerTime"></a-input> + <a-range-picker v-model="queryParam.dates" value-format="YYYY-MM-DD" @change="handleDateRangeChange"/> </a-form-item> </a-col> - </template> - <a-col :xl="6" :lg="7" :md="8" :sm="24"> + <a-col :xl="4" :lg="6" :md="8" :sm="12"> <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons"> <a-button type="primary" @click="searchQuery" icon="search">鏌ヨ</a-button> <a-button type="info" @click="searchReset" icon="reload" style="margin-left: 8px">閲嶇疆</a-button> - <a @click="handleToggleSearch" style="margin-left: 8px"> - {{ toggleSearchStatus ? '鏀惰捣' : '灞曞紑' }} - <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/> - </a> </span> </a-col> - </a-row> </a-form> </div> @@ -51,75 +43,59 @@ <!-- 鎿嶄綔鎸夐挳鍖哄煙 --> <div class="table-operator"> <a-button @click="handleAdd" type="primary" icon="plus">鏂板</a-button> - <a-button type="primary" icon="download" @click="handleExportXls('鎶�鏈姸鎬佸彉鏇寸敵璇�')">瀵煎嚭</a-button> - <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel"> - <a-button type="primary" icon="import">瀵煎叆</a-button> - </a-upload> - <a-dropdown v-if="selectedRowKeys.length > 0"> - <a-menu slot="overlay"> - <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>鍒犻櫎</a-menu-item> - </a-menu> - <a-button style="margin-left: 8px"> 鎵归噺鎿嶄綔 <a-icon type="down" /></a-button> - </a-dropdown> </div> <!-- table鍖哄煙-begin --> - <div> - <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> - <i class="anticon anticon-info-circle ant-alert-icon"></i> 宸查�夋嫨 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>椤� - <a style="margin-left: 24px" @click="onClearSelected">娓呯┖</a> - </div> - - <a-table - ref="table" - size="middle" - bordered - rowKey="id" - :columns="columns" - :dataSource="dataSource" - :pagination="ipagination" - :loading="loading" - class="j-table-force-nowrap" - :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" - @change="handleTableChange"> - + <a-table ref="table" size="middle" bordered rowKey="id" :columns="columns" :dataSource="dataSource" + :pagination="ipagination" :loading="loading" :scroll="{x:'max-content'}"> <span slot="action" slot-scope="text, record"> + <template v-if="record.changeStatus=='WAIT_SUBMIT'"> <a @click="handleEdit(record)">缂栬緫</a> - <a-divider type="vertical" /> - <a-dropdown> - <a class="ant-dropdown-link">鏇村 <a-icon type="down" /></a> - <a-menu slot="overlay"> - <a-menu-item> - <a-popconfirm title="纭畾鍒犻櫎鍚�?" @confirm="() => handleDelete(record.id)"> - <a>鍒犻櫎</a> - </a-popconfirm> - </a-menu-item> - </a-menu> - </a-dropdown> - </span> + <a-divider type="vertical"/> - </a-table> - </div> + <a-popconfirm title="纭畾鎻愪氦鍚楋紵" @confirm="handleSubmit(record.id)"> + <a>鎻愪氦</a> + </a-popconfirm> + + <a-divider type="vertical"/> + + <a-popconfirm title="纭畾浣滃簾鍚楋紵" @confirm="handleAbolish(record.id)"> + <a>浣滃簾</a> + </a-popconfirm> + </template> + + <a @click="handleDetail(record)" + v-if="record.changeStatus!='WAIT_SUBMIT'&&record.changeStatus!='ABOLISH'">璇︽儏</a> + </span> + </a-table> + <!-- table鍖哄煙-end --> <!-- 琛ㄥ崟鍖哄煙 --> - <eamTechnicalStatusChange-modal ref="modalForm" @ok="modalFormOk"></eamTechnicalStatusChange-modal> + <eamTechnicalStatusChange-modal ref="modalForm" @ok="modalFormOk" :productionTreeData="productionTreeData"/> + + <!--鐘舵�佸彉鏇村鎵瑰脊绐�--> + <technical-status-change-approval-modal ref="technicalStatusChangeApprovalModal" + :selectShenpiData="selectedRowData"/> </a-card> </template> <script> - import '@/assets/less/TableExpand.less' import EamTechnicalStatusChangeModal from './modules/EamTechnicalStatusChangeModal' import { JeecgListMixin } from '@/mixins/JeecgListMixin' + import { getAction } from '@/api/manage' + import TechnicalStatusChangeApprovalModal + from '../../flowable/workflow/TechnicalStatus/TechnicalStatusChangeApprovalModal' export default { - name: "EamTechnicalStatusChangeList", - mixins:[JeecgListMixin], + name: 'EamTechnicalStatusChangeList', + mixins: [JeecgListMixin], components: { + TechnicalStatusChangeApprovalModal, EamTechnicalStatusChangeModal }, - data () { + data() { return { description: '鎶�鏈姸鎬佸彉鏇寸敵璇风鐞嗛〉闈�', // 琛ㄥご @@ -127,99 +103,166 @@ { title: '#', dataIndex: '', - key:'rowIndex', - width:60, - align:"center", - customRender:function (t,r,index) { - return parseInt(index)+1; + key: 'rowIndex', + width: 60, + align: 'center', + customRender: function(t, r, index) { + return parseInt(index) + 1 } - }, - { - title: '鍒犻櫎鏍囪', - align:"center", - dataIndex: 'delFlag' - }, - { + }, + { title: '鍙樻洿鍗曞彿', - align:"center", + align: 'center', dataIndex: 'changeOrderNum' - }, - { + }, + { title: '鍙樻洿鍗曠姸鎬�', - align:"center", - dataIndex: 'changeStatus' - }, - { + align: 'center', + dataIndex: 'changeStatus_dictText' + }, + { title: '缂栧埗浜�', - align:"center", - dataIndex: 'designer' - }, - { + align: 'center', + dataIndex: 'designer_dictText' + }, + { title: '缂栧埗鏃堕棿', - align:"center", + align: 'center', dataIndex: 'designerTime' - }, - { - title: '浣跨敤鍗曚綅瀹や富绠$瀛�', - align:"center", + }, + { + title: '浣跨敤鍗曚綅瀹ょ骇涓荤绛惧瓧', + align: 'center', dataIndex: 'departHeaderSignature' - }, - { - title: '浣跨敤鍗曚綅瀹や富绠$瀛楁椂闂�', - align:"center", + }, + { + title: '浣跨敤鍗曚綅瀹ょ骇涓荤绛惧瓧鏃堕棿', + align: 'center', dataIndex: 'departHeaderSignatureTime' - }, - { - title: '浣跨敤鍗曚綅瀹や富绠℃剰瑙�', - align:"center", - dataIndex: 'departHeaderSignatureComment' - }, - { - title: '浣跨敤鍗曚綅閮ㄤ富绠$瀛�', - align:"center", + }, + { + title: '浣跨敤鍗曚綅閮ㄧ骇涓荤绛惧瓧', + align: 'center', dataIndex: 'departLeaderSignature' - }, - { - title: '浣跨敤鍗曚綅閮ㄤ富绠$瀛楁椂闂�', - align:"center", + }, + { + title: '浣跨敤鍗曚綅閮ㄧ骇涓荤绛惧瓧鏃堕棿', + align: 'center', dataIndex: 'departLeaderSignatureTime' - }, - { - title: '浣跨敤鍗曚綅閮ㄤ富绠$瀛�', - align:"center", - dataIndex: 'departLeaderSignatureComment' - }, - { + }, + { title: 'HF缂栫爜', - align:"center", + align: 'center', dataIndex: 'hfCode' - }, + }, { title: '鎿嶄綔', dataIndex: 'action', - align:"center", - scopedSlots: { customRender: 'action' }, + align: 'center', + width: 200, + fixed: 'right', + scopedSlots: { customRender: 'action' } } ], - url: { - list: "/eam/eamTechnicalStatusChange/list", - delete: "/eam/eamTechnicalStatusChange/delete", - deleteBatch: "/eam/eamTechnicalStatusChange/deleteBatch", - exportXlsUrl: "eam/eamTechnicalStatusChange/exportXls", - importExcelUrl: "eam/eamTechnicalStatusChange/importExcel", - }, - } - }, - computed: { - importExcelUrl: function(){ - return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; - } - }, + productionTreeData: [], + selectedRowData: {}, + url: { + list: '/eam/eamTechnicalStatusChange/list', + submit: '/eam/eamTechnicalStatusChange/submit', + abolish: '/eam/eamTechnicalStatusChange/abolish', + getProductionTreeList: '/eam/BaseFactory/queryTreeList' + } + } + }, + created() { + this.getProductionTreeDataByApi() + }, methods: { - + // 鑾峰彇鐢宠鍗曚綅鏍� + getProductionTreeDataByApi() { + getAction(this.url.getProductionTreeList) + .then(res => { + if (res.success) { + this.productionTreeData = res.result + } else { + this.$notification.warning({ + message: '娑堟伅', + description: res.message + }) + } + }) + }, + + /** + * 鎻愪氦鏃惰Е鍙� + * @param id + */ + handleSubmit(id) { + const that = this + that.loading = true + getAction(this.url.submit, { id }) + .then(res => { + if (res.success) { + that.$notification.success({ + message: '娑堟伅', + description: res.message + }) + that.loadData() + } else { + that.$notification.warning({ + message: '娑堟伅', + description: res.message + }) + that.loading = false + } + }) + }, + + /** + * 浣滃簾鏃惰Е鍙� + * @param id + */ + handleAbolish(id) { + const that = this + that.loading = true + getAction(this.url.abolish, { id }) + .then(res => { + if (res.success) { + that.$notification.success({ + message: '娑堟伅', + description: res.message + }) + that.loadData() + } else { + that.$notification.warning({ + message: '娑堟伅', + description: res.message + }) + that.loading = false + } + }) + }, + + /** + * 鐐瑰嚮璇︽儏鏃惰Е鍙戞椂瑙﹀彂 + * @param record + */ + handleDetail(record) { + this.selectedRowData = Object.assign({}, record) + this.$refs.technicalStatusChangeApprovalModal.title = '璇︽儏' + this.$refs.technicalStatusChangeApprovalModal.disableSubmit = true + this.$refs.technicalStatusChangeApprovalModal.visible = true + this.$refs.technicalStatusChangeApprovalModal.handleDetail(record) + }, + + /** + * 鐢宠鏃堕棿鍙戠敓鏀瑰彉鏃惰Е鍙� + * @param dateStringArray + */ + handleDateRangeChange(dateStringArray) { + this.queryParam.dateBegin = dateStringArray[0] + this.queryParam.dateEnd = dateStringArray[1] + } } } -</script> -<style scoped> - @import '~@assets/less/common.less'; -</style> \ No newline at end of file +</script> \ No newline at end of file diff --git a/src/views/eam/technical/modules/EamTechnicalStatusChangeModal.vue b/src/views/eam/technical/modules/EamTechnicalStatusChangeModal.vue index c674e64..7a4b5b1 100644 --- a/src/views/eam/technical/modules/EamTechnicalStatusChangeModal.vue +++ b/src/views/eam/technical/modules/EamTechnicalStatusChangeModal.vue @@ -1,138 +1,276 @@ <template> - <j-modal - :title="title" - :width="800" - :visible="visible" - :confirmLoading="confirmLoading" - switchFullscreen - @ok="handleOk" - @cancel="handleCancel" - cancelText="鍏抽棴"> - - <a-spin :spinning="confirmLoading"> - <a-form-model ref="form" :model="model" :rules="validatorRules"> - - <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="delFlag" label="鍒犻櫎鏍囪"> - <a-input-number v-model="model.delFlag"/> - </a-form-model-item> - <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="changeOrderNum" label="鍙樻洿鍗曞彿"> - <a-input placeholder="璇疯緭鍏ュ彉鏇村崟鍙�" v-model="model.changeOrderNum" /> - </a-form-model-item> - <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="changeStatus" label="鍙樻洿鍗曠姸鎬�"> - <a-input placeholder="璇疯緭鍏ュ彉鏇村崟鐘舵��" v-model="model.changeStatus" /> - </a-form-model-item> - <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="designer" label="缂栧埗浜�"> - <a-input placeholder="璇疯緭鍏ョ紪鍒朵汉" v-model="model.designer" /> - </a-form-model-item> - <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="designerTime" label="缂栧埗鏃堕棿"> - <a-input placeholder="璇疯緭鍏ョ紪鍒舵椂闂�" v-model="model.designerTime" /> - </a-form-model-item> - <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="departHeaderSignature" label="浣跨敤鍗曚綅瀹や富绠$瀛�"> - <a-input placeholder="璇疯緭鍏ヤ娇鐢ㄥ崟浣嶅涓荤绛惧瓧" v-model="model.departHeaderSignature" /> - </a-form-model-item> - <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="departHeaderSignatureTime" label="浣跨敤鍗曚綅瀹や富绠$瀛楁椂闂�"> - <a-input placeholder="璇疯緭鍏ヤ娇鐢ㄥ崟浣嶅涓荤绛惧瓧鏃堕棿" v-model="model.departHeaderSignatureTime" /> - </a-form-model-item> - <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="departHeaderSignatureComment" label="浣跨敤鍗曚綅瀹や富绠℃剰瑙�"> - <a-input placeholder="璇疯緭鍏ヤ娇鐢ㄥ崟浣嶅涓荤鎰忚" v-model="model.departHeaderSignatureComment" /> - </a-form-model-item> - <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="departLeaderSignature" label="浣跨敤鍗曚綅閮ㄤ富绠$瀛�"> - <a-input placeholder="璇疯緭鍏ヤ娇鐢ㄥ崟浣嶉儴涓荤绛惧瓧" v-model="model.departLeaderSignature" /> - </a-form-model-item> - <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="departLeaderSignatureTime" label="浣跨敤鍗曚綅閮ㄤ富绠$瀛楁椂闂�"> - <a-input placeholder="璇疯緭鍏ヤ娇鐢ㄥ崟浣嶉儴涓荤绛惧瓧鏃堕棿" v-model="model.departLeaderSignatureTime" /> - </a-form-model-item> - <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="departLeaderSignatureComment" label="浣跨敤鍗曚綅閮ㄤ富绠$瀛�"> - <a-input placeholder="璇疯緭鍏ヤ娇鐢ㄥ崟浣嶉儴涓荤绛惧瓧" v-model="model.departLeaderSignatureComment" /> - </a-form-model-item> - <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="hfCode" label="HF缂栫爜"> - <a-input placeholder="璇疯緭鍏F缂栫爜" v-model="model.hfCode" /> - </a-form-model-item> - - </a-form-model> + <j-modal :title="title" :width="1200" :visible="visible" :confirmLoading="confirmLoading" switchFullscreen + @ok="handleOk" @cancel="handleCancel" cancelText="鍏抽棴"> + <a-spin :spinning="spinning"> + <div class="table-page-search-wrapper"> + <a-form-model ref="form" :model="model" :rules="validatorRules" :labelCol="labelCol" :wrapperCol="wrapperCol"> + <a-row> + <a-col :span="8"> + <a-form-model-item label="鍙樻洿鍗曞彿"> + <a-input placeholder="绯荤粺鑷姩鐢熸垚" v-model="model.changeOrderNum" disabled/> + </a-form-model-item> + </a-col> + <a-col :span="8"> + <a-form-model-item label="鐢宠鍗曚綅" prop="factoryOrgCode"> + <a-tree-select v-model="model.factoryOrgCode" :tree-data="productionTreeData" + @change="detail.dataSource=[]" + show-search :replaceFields="{key:'orgCode',value:'orgCode'}" + treeNodeFilterProp="title" searchPlaceholder="璇疯緭鍏ュ叧閿瓧鎼滅储" + :dropdown-style="{ maxHeight: '400px', overflow: 'auto' }" placeholder="璇烽�夋嫨鐢宠鍗曚綅" + allow-clear tree-default-expand-all :allow-clear="false"/> + </a-form-model-item> + </a-col> + </a-row> + + <a-row> + <a-col :span="24"> + <a-form-model-item label="澶囨敞" :labelCol="{span:2}" :wrapperCol="{span:20}"> + <a-textarea placeholder="璇疯緭鍏ュ娉�" v-model="model.remark"/> + </a-form-model-item> + </a-col> + </a-row> + </a-form-model> + </div> + + <j-vxe-table ref="editableDetailTable" rowNumber rowSelection bordered alwaysEdit toolbar + v-if="model.factoryOrgCode" + :toolbarConfig="detail.toolbarConfig" keep-source :height="300" + :dataSource="detail.dataSource" :columns="detail.columns"> + <!--缁熶竴缂栫爜--> + <template v-slot:equipmentId="props"> + <lx-search-equipment-select v-model="props.row.equipmentId" placeholder="璇疯緭鍏ョ粺涓�缂栫爜鎴栧悕绉版悳绱�" + :factoryOrgCode="model.factoryOrgCode" + @autocompleteForm="autocompleteForm($event,props.row)" :allowClear="false"/> + </template> + + <!-- 淇濆吇鏃ユ湡--> + <template v-slot:changeDate="props"> + <a-date-picker v-model="props.row.changeDate" value-format="YYYY-MM-DD" :allow-clear="false"/> + </template> + + <!-- 鎿嶄綔--> + <template v-slot:action="props"> + <a :disabled="!props.row.equipmentId" @click="handlePreviewDetail(props.row.standardId)">棰勮鏄庣粏</a> + </template> + </j-vxe-table> </a-spin> </j-modal> </template> <script> - import { httpAction } from '@/api/manage' - import moment from "moment" + import { httpAction, getAction } from '@/api/manage' + import { JVXETypes } from '@comp/jeecg/JVxeTable' + import LxSearchEquipmentSelect from '../../equipment/modules/LxSearchEquipmentSelect' export default { - name: "EamTechnicalStatusChangeModal", - data () { + name: 'EamTechnicalStatusChangeModal', + components: { LxSearchEquipmentSelect }, + props: { + productionTreeData: { + type: Array + } + }, + data() { return { - title:"鎿嶄綔", + title: '鎿嶄綔', visible: false, model: {}, labelCol: { xs: { span: 24 }, - sm: { span: 5 }, + sm: { span: 6 } }, wrapperCol: { xs: { span: 24 }, - sm: { span: 16 }, + sm: { span: 18 } }, - confirmLoading: false, - validatorRules:{ + spinning: false, + validatorRules: { + factoryOrgCode: [{ required: true, message: '璇烽�夋嫨鐢宠鍗曚綅', trigger: 'change' }] + }, + detail: { + dataSource: [], + columns: [ + { + title: 'ID', + key: 'id', + type: JVXETypes.hidden + }, + { + title: '缁熶竴缂栫爜', + key: 'equipmentId', + align: 'center', + type: JVXETypes.slot, + slotName: 'equipmentId', + width: 250, + validateRules: [ + { required: true, message: '璇疯緭鍏�${title}鎴栧悕绉版悳绱�' }, + { unique: true, message: '${title}涓嶈兘閲嶅' } + ] + }, + { + title: '璁惧鍚嶇О', + key: 'equipmentName', + align: 'center', + type: JVXETypes.normal, + width: 200 + }, + { + title: '璁惧鍨嬪彿', + key: 'equipmentModel', + align: 'center', + type: JVXETypes.normal, + width: 200 + }, + { + title: '浣跨敤鍗曚綅', + key: 'factoryName', + align: 'center', + type: JVXETypes.normal, + width: 200 + }, + { + title: '鍙樻洿鍘熷洜', + key: 'changeCategory', + align: 'center', + dictCode: 'technical_status_change_reason', + type: JVXETypes.select, + width: 200, + placeholder: '璇烽�夋嫨${title}', + validateRules: [{ required: true, message: '璇烽�夋嫨${title}' }] + }, + { + title: '鍙樻洿鏃ユ湡', + key: 'changeDate', + align: 'center', + type: JVXETypes.slot, + width: 200, + slotName: 'changeDate', + validateRules: [{ required: true, message: '璇烽�夋嫨${title}' }] + }, + { + title: '鍙樻洿鍚庢妧鏈姸鎬�', + key: 'changeTechnicalStatus', + align: 'center', + dictCode: 'equipment_technology_status', + type: JVXETypes.select, + width: 220, + placeholder: '璇烽�夋嫨${title}', + validateRules: [{ required: true, message: '璇烽�夋嫨${title}' }] + } + ], + toolbarConfig: { + // prefix 鍓嶇紑锛泂uffix 鍚庣紑 + slot: ['prefix', 'suffix'], + // add 鏂板鎸夐挳锛況emove 鍒犻櫎鎸夐挳锛沜learSelection 娓呯┖閫夋嫨鎸夐挳 + btn: ['add', 'remove', 'clearSelection'] + } }, url: { - add: "/eam/eamTechnicalStatusChange/add", - edit: "/eam/eamTechnicalStatusChange/edit", - }, + add: '/eam/eamTechnicalStatusChange/add', + edit: '/eam/eamTechnicalStatusChange/edit', + detail: '/eam/eamTechnicalStatusChangeDetail/queryList' + } } }, - created () { - }, methods: { - add () { + add() { //鍒濆鍖栭粯璁ゅ�� - this.edit({}); + this.edit({}) }, - edit (record) { - this.model = Object.assign({}, record); - this.visible = true; + + edit(record) { + this.model = Object.assign({}, record) + this.visible = true + if (record.id) this.loadDetail(record.id) }, - close () { - this.$emit('close'); - this.visible = false; - this.$refs.form.clearValidate(); + + /** + * 鑾峰彇璁惧鏄庣粏 + * @param orderId + */ + loadDetail(orderId) { + this.spinning = true + this.detail.dataSource = [] + getAction(this.url.detail, { orderId }) + .then(res => { + console.log('res', res) + if (res.success) this.detail.dataSource = res.result + }) + .finally(() => { + this.spinning = false + }) }, - handleOk () { - const that = this; + + autocompleteForm(selectObj, record) { + record.factoryName = selectObj.factoryOrgCode_dictText + record.equipmentName = selectObj.equipmentName + record.equipmentModel = selectObj.equipmentModel + record.changeTechnicalStatus = 'PROHIBITED' + }, + + async handleOk() { + const tableData = this.$refs.editableDetailTable.getTableData() + if (tableData.length == 0) { + this.$notification.warning({ + message: '娑堟伅', + description: '璇疯嚦灏戞柊澧炰竴鏉¤褰�' + }) + return + } + + const errMap = await this.$refs.editableDetailTable.validateTable() + if (errMap) return + + const that = this // 瑙﹀彂琛ㄥ崟楠岃瘉 - this.$refs.form.validate(valid => { + this.$refs.form.validate(valid => { if (valid) { - that.confirmLoading = true; - let httpurl = ''; - let method = ''; - if(!this.model.id){ - httpurl+=this.url.add; - method = 'post'; - }else{ - httpurl+=this.url.edit; - method = 'put'; + that.confirmLoading = that.spinning = true + let httpUrl = '' + let method = '' + if (!this.model.id) { + httpUrl += this.url.add + method = 'post' + } else { + httpUrl += this.url.edit + method = 'put' } - httpAction(httpurl,this.model,method).then((res)=>{ - if(res.success){ - that.$message.success(res.message); - that.$emit('ok'); - }else{ - that.$message.warning(res.message); - } - }).finally(() => { - that.confirmLoading = false; - that.close(); - }) - }else{ - return false; + that.model.tableDetailList = this.$refs.editableDetailTable.getTableData() + httpAction(httpUrl, this.model, method) + .then((res) => { + if (res.success) { + that.$notification.success({ + message: '娑堟伅', + description: res.message + }) + that.$emit('ok') + that.close() + } else { + that.$notification.warning({ + message: '娑堟伅', + description: res.message + }) + } + }) + .finally(() => { + that.confirmLoading = that.spinning = false + }) + } else { + return false } }) }, - handleCancel () { + + handleCancel() { this.close() }, + + close() { + this.$emit('close') + this.visible = false + this.$refs.form.clearValidate() + } } @@ -140,5 +278,7 @@ </script> <style lang="less" scoped> - + /deep/ .ant-select-dropdown-menu { + text-align: left; + } </style> \ No newline at end of file diff --git a/src/views/flowable/workflow/FlowTodo.vue b/src/views/flowable/workflow/FlowTodo.vue index 67c1d04..a3b335e 100644 --- a/src/views/flowable/workflow/FlowTodo.vue +++ b/src/views/flowable/workflow/FlowTodo.vue @@ -106,6 +106,10 @@ <!--缁翠慨宸ュ崟--> <repair-order-approval-modal ref="repairOrderApprovalModal" :selectShenpiData="selectedRowData" @modalFormOk="modalFormOk"/> + + <!--鎶�鏈姸鎬佸彉鏇�--> + <technical-status-change-approval-modal ref="technicalStatusChangeApprovalModal" :selectShenpiData="selectedRowData" + @modalFormOk="modalFormOk"/> </a-card> </template> @@ -121,11 +125,13 @@ import TechnicalStatusEvaluationOrderChangeApprovalModal from './TechnicalStatusEvaluation/TechnicalStatusEvaluationOrderChangeApprovalModal' import RepairOrderApprovalModal from './repairOrder/RepairOrderApprovalModal' + import TechnicalStatusChangeApprovalModal from './TechnicalStatus/TechnicalStatusChangeApprovalModal' export default { name: 'FlowTodo', mixins: [JeecgListMixin], components: { + TechnicalStatusChangeApprovalModal, RepairOrderApprovalModal, TechnicalStatusEvaluationOrderChangeApprovalModal, ThirdMaintenanceApprovalModal, @@ -236,6 +242,9 @@ case 'eam_repair_order': this.handleRepairOrder(record) break + case 'TECHNICAL_STATUS_CHANGE_PROCESS': + this.handleTechnicalStatusChange(record) + break default: alert('娌℃壘鍒拌娴佺▼') } @@ -315,6 +324,17 @@ this.$refs.repairOrderApprovalModal.handleDetail(record) }, + /** + * 鐐瑰嚮鎶�鏈姸鎬佸彉鏇村垎绫绘祦绋嬪鎵规椂瑙﹀彂 + * @param record + */ + handleTechnicalStatusChange(record) { + this.selectedRowData = Object.assign({}, record) + this.$refs.technicalStatusChangeApprovalModal.visible = true + this.$refs.technicalStatusChangeApprovalModal.title = record.name + this.$refs.technicalStatusChangeApprovalModal.handleApprove(record) + }, + batchHandle() { const categorySet = new Set(this.selectionRows.map(item => item.category)) const nameSet = new Set(this.selectionRows.map(item => item.name)) diff --git a/src/views/flowable/workflow/TechnicalStatus/TechnicalStatusChangeApprovalModal.vue b/src/views/flowable/workflow/TechnicalStatus/TechnicalStatusChangeApprovalModal.vue new file mode 100644 index 0000000..b3de472 --- /dev/null +++ b/src/views/flowable/workflow/TechnicalStatus/TechnicalStatusChangeApprovalModal.vue @@ -0,0 +1,394 @@ +<template> + <j-modal :title="title" fullscreen :visible="visible" :confirmLoading="confirmLoading" + :okButtonProps="{ class:{'jee-hidden': disableSubmit} }" @ok="handleOk" + @cancel="handleCancel" cancelText="鍏抽棴"> + <a-spin :spinning="spinning"> + <a-form-model ref="form" :model="model" :rules="validatorRules" :labelCol="labelCol" :wrapperCol="wrapperCol"> + <a-row id="outer-row" :gutter="24"> + <!--宸︿晶鍩虹淇℃伅鍒�--> + <a-col :span="8" class="scroll-col"> + <a-tabs> + <a-tab-pane tab="鍩虹淇℃伅"> + <a-row> + <a-col :span="12"> + <a-form-model-item label="鍙樻洿鍗曞彿"> + <a-input v-model="model.changeOrderNum" readOnly/> + </a-form-model-item> + </a-col> + <a-col :span="12"> + <a-form-model-item label="鐢宠鍗曚綅"> + <a-input v-model="model.factoryOrgCode_dictText" readOnly/> + </a-form-model-item> + </a-col> + </a-row> + + <a-row> + <a-col :span="12"> + <a-form-model-item label="缂栧埗浜�"> + <a-input v-model="model.designer_dictText" readOnly/> + </a-form-model-item> + </a-col> + <a-col :span="12"> + <a-form-model-item label="缂栧埗鏃堕棿"> + <a-input v-model="model.designerTime" readOnly/> + </a-form-model-item> + </a-col> + </a-row> + + <a-row> + <a-col :span="24"> + <a-form-model-item :labelCol="labelColLong" :wrapperCol="wrapperColLong" label="澶囨敞"> + <a-textarea v-model="model.remark" readOnly/> + </a-form-model-item> + </a-col> + </a-row> + </a-tab-pane> + </a-tabs> + </a-col> + + <!-- 涓棿鏄庣粏椤瑰垪--> + <a-col :span="10" class="scroll-col"> + <a-tabs> + <a-tab-pane key="1" tab="璁惧鏄庣粏"> + <j-vxe-table ref="editableDetailTable" rowNumber bordered keep-source :dataSource="detail.dataSource" + :columns="detail.columns"/> + </a-tab-pane> + <a-tab-pane key='2' tab='娴佺▼鍥�' v-if="selectShenpiData.procInstId"> + <img :src="imageSrc" alt="Fetched Image" style="width: 100%" v-if="imageSrc"/> + </a-tab-pane> + </a-tabs> + </a-col> + + <!--鍙充晶瀹℃壒鍒�--> + <a-col :span="6" class="scroll-col"> + <a-tabs v-if="displayDepartHeaderFlag"> + <a-tab-pane tab="浣跨敤鍗曚綅瀹ょ骇棰嗗纭"> + <a-row> + <a-col :span="24"> + <a-form-model-item prop="departHeaderSignatureResult" label="纭绫诲瀷" :labelCol="rightColLabelCol" + :wrapperCol="rightColWrapperCol"> + <j-dict-select-tag type='radio' v-model='model.departHeaderSignatureResult' + dictCode='approve_reject' + :disabled="disableSubmit||(model.changeStatus&&model.changeStatus!='DEPART_HEADER_SIGNING')"/> + </a-form-model-item> + </a-col> + <a-col :span="24"> + <a-form-model-item label="纭鎰忚" :labelCol="rightColLabelCol" :wrapperCol="rightColWrapperCol"> + <a-textarea placeholder="璇疯緭鍏ユ剰瑙�" v-model="model.departHeaderComment" + :disabled="disableSubmit||(model.changeStatus&&model.changeStatus!='DEPART_HEADER_SIGNING')"/> + </a-form-model-item> + </a-col> + </a-row> + </a-tab-pane> + </a-tabs> + + <a-tabs v-if="displayDepartLeaderFlag"> + <a-tab-pane tab="浣跨敤鍗曚綅閮ㄧ骇棰嗗纭"> + <a-row> + <a-col :span="24"> + <a-form-model-item prop="departLeaderSignatureResult" label="纭绫诲瀷" :labelCol="rightColLabelCol" + :wrapperCol="rightColWrapperCol"> + <j-dict-select-tag type='radio' v-model='model.departLeaderSignatureResult' + dictCode='approve_reject' + :disabled="disableSubmit||(model.changeStatus&&model.changeStatus!='DEPART_LEADER_SIGNING')"/> + </a-form-model-item> + </a-col> + <a-col :span="24"> + <a-form-model-item label="纭鎰忚" :labelCol="rightColLabelCol" :wrapperCol="rightColWrapperCol"> + <a-textarea placeholder="璇疯緭鍏ユ剰瑙�" v-model="model.departLeaderComment" + :disabled="disableSubmit||(model.changeStatus&&model.changeStatus!='DEPART_LEADER_SIGNING')"/> + </a-form-model-item> + </a-col> + </a-row> + </a-tab-pane> + </a-tabs> + </a-col> + </a-row> + </a-form-model> + </a-spin> + </j-modal> +</template> + +<script> + import { downFile, getAction, postAction } from '@/api/manage' + import TechnicalStatusEquipmentSelect from '../../../eam/equipment/modules/TechnicalStatusEquipmentSelect' + import { JVXETypes } from '@comp/jeecg/JVxeTable' + + export default { + name: 'TechnicalStatusChangeApprovalModal', + components: { + TechnicalStatusEquipmentSelect + }, + props: { + selectShenpiData: { + type: Object + } + }, + data() { + return { + title: '鎿嶄綔', + visible: false, + model: {}, + labelCol: { + xs: { span: 24 }, + sm: { span: 8 } + }, + wrapperCol: { + xs: { span: 24 }, + sm: { span: 16 } + }, + labelColLong: { + xs: { span: 24 }, + sm: { span: 4 } + }, + wrapperColLong: { + xs: { span: 24 }, + sm: { span: 20 } + }, + rightColLabelCol: { + xs: { span: 24 }, + sm: { span: 6 } + }, + rightColWrapperCol: { + xs: { span: 24 }, + sm: { span: 16 } + }, + confirmLoading: false, + spinning: false, + imageSrc: null, + validatorRules: { + departHeaderSignatureResult: [{ required: true, message: '璇烽�夋嫨纭绫诲瀷' }], + departLeaderSignatureResult: [{ required: true, message: '璇烽�夋嫨纭绫诲瀷' }] + }, + url: { + queryById: '/eam/eamTechnicalStatusChange/queryById', + approval: '/eam/eamTechnicalStatusChange/approval', + detail: '/eam/eamTechnicalStatusChangeDetail/queryList', + diagramView: '/assign/flow/diagramView' + }, + disableSubmit: false, + selectedRowKeys: [], + detail: { + dataSource: [], + columns: [ + { + title: 'ID', + key: 'id', + type: JVXETypes.hidden + }, + { + title: '缁熶竴缂栫爜', + key: 'equipmentCode', + align: 'center', + type: JVXETypes.normal, + width: 200 + }, + { + title: '璁惧鍚嶇О', + key: 'equipmentName', + align: 'center', + type: JVXETypes.normal, + width: 200 + }, + { + title: '璁惧鍨嬪彿', + key: 'equipmentModel', + align: 'center', + type: JVXETypes.normal, + width: 200 + }, + { + title: '浣跨敤鍗曚綅', + key: 'factoryName', + align: 'center', + type: JVXETypes.normal, + width: 200 + }, + { + title: '鍙樻洿鍘熷洜', + key: 'changeCategory_dictText', + align: 'center', + type: JVXETypes.normal, + width: 200 + }, + { + title: '鍙樻洿鏃ユ湡', + key: 'changeDate', + align: 'center', + type: JVXETypes.normal, + width: 200 + }, + { + title: '鍙樻洿鍚庢妧鏈姸鎬�', + key: 'changeTechnicalStatus_dictText', + align: 'center', + type: JVXETypes.normal, + width: 200 + } + ] + } + } + }, + computed: { + displayDepartHeaderFlag() { + return this.model.changeStatus && ['DEPART_HEADER_SIGNING', 'DEPART_LEADER_SIGNING', 'COMPLETED'].includes(this.model.changeStatus) + }, + displayDepartLeaderFlag() { + return this.model.changeStatus && ['DEPART_LEADER_SIGNING', 'COMPLETED'].includes(this.model.changeStatus) + } + }, + methods: { + /** + * 涓婚〉闈㈢偣鍑绘墽琛屽鎵规椂瑙﹀彂 + * @param record 涓婚〉闈㈠垪琛ㄨ璁板綍 + */ + handleApprove(record) { + this.model = {} + this.getBasicInformationByApi(record) + this.getFlowChartImageByApi(record) + }, + + /** + * 涓婚〉闈㈢偣鍑昏鎯呮椂瑙﹀彂 + * @param record 涓婚〉闈㈠垪琛ㄨ璁板綍 + */ + handleDetail(record) { + this.model = Object.assign({}, record) + this.loadDetail(record.id) + }, + + /** + * 鑾峰彇鍩虹淇℃伅 + * @param record 涓婚〉闈㈠垪琛ㄨ璁板綍 + */ + getBasicInformationByApi(record) { + this.spinning = true + const that = this + getAction(this.url.queryById, { id: record.dataId }) + .then(res => { + if (res.success) { + that.model = Object.assign({}, res.result) + that.model.dataId = record.dataId + that.model.taskId = record.id + that.model.userId = record.assignee + that.model.instanceId = record.procInstId + } + else { + that.$notification.warning({ + message: '娑堟伅', + description: res.message + }) + } + }) + .finally(() => { + this.loadDetail(record.dataId) + }) + }, + + /** + * 鑾峰彇娴佺▼鍥� + * @param record 涓婚〉闈㈠垪琛ㄨ璁板綍 + */ + getFlowChartImageByApi(record) { + const { processDefinitionId, processInstanceId, processDefinitionKey } = record + this.imageSrc = null + downFile(this.url.diagramView, { + processDefinitionId, + processInstanceId, + TaskDefinitionKey: processDefinitionKey + }, 'get') + .then((res => { + this.imageSrc = window.URL.createObjectURL(new Blob([res])) + })) + .catch(err => { + this.$notification.error({ + message: '娑堟伅', + description: err.message + }) + }) + }, + + /** + * 鑾峰彇璁惧鏄庣粏 + * @param orderId + */ + loadDetail(orderId) { + this.detail.dataSource = [] + getAction(this.url.detail, { orderId }) + .then(res => { + console.log('res', res) + if (res.success) this.detail.dataSource = res.result + }) + .finally(() => { + this.spinning = false + }) + }, + + async handleOk() { + const that = this + + // 瑙﹀彂琛ㄥ崟楠岃瘉 + this.$refs.form.validate(valid => { + if (valid) { + that.confirmLoading = that.spinning = true + + postAction(that.url.approval, that.model) + .then((res) => { + if (res.success) { + that.$notification.success({ + message: '娑堟伅', + description: res.message + }) + that.$emit('modalFormOk') + that.close() + } else { + that.$notification.warning({ + message: '娑堟伅', + description: res.message + }) + } + }) + .finally(() => { + that.confirmLoading = that.spinning = false + }) + } else { + return false + } + }) + }, + + handleCancel() { + this.close() + }, + + close() { + this.$emit('close') + this.visible = false + this.$refs.form.clearValidate() + } + } + } +</script> + +<style scoped lang="less"> + /deep/ .ant-spin-nested-loading { + height: 100%; + + .ant-spin-container { + height: 100%; + + .ant-form { + height: 100%; + + #outer-row { + height: 100%; + + .scroll-col { + height: 100%; + overflow: auto; + } + } + } + } + } +</style> \ No newline at end of file -- Gitblit v1.9.3