¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <a-modal |
| | | :title="title" |
| | | :width="width" |
| | | :visible="visible" |
| | | :footer="null" |
| | | @cancel="handCancel" |
| | | > |
| | | <a-card :bordered="false"> |
| | | <div> |
| | | <b>{{ selectShenpiData.description }}</b> |
| | | <br> |
| | | <br> |
| | | <a-tag color="blue"> |
| | | å¤ç人 {{ selectShenpiData.assignee_dictText }} |
| | | </a-tag> |
| | | <a-tag color="blue"> |
| | | å建æ¶é´ {{ selectShenpiData.createTime }} |
| | | </a-tag> |
| | | <br> |
| | | <br> |
| | | <button @click="fetchAndShowBmp" class="btn-custom">æå¼æµç¨å¾</button> |
| | | <div v-if="imageSrc"> |
| | | <img :src="imageSrc" alt="Fetched Image" /> |
| | | </div> |
| | | <hr class="shallow-hr"> |
| | | </div> |
| | | <div> |
| | | <b>æ¥æè¯¦æ
</b> |
| | | <br> |
| | | <a-form :form="form"> |
| | | <a-spin :spinning="spinning"> |
| | | <a-tabs default-active-key="1" @change="callback"> |
| | | <a-tab-pane key="1" tab="æ¥æåºæ¬ä¿¡æ¯"> |
| | | <a-form-model ref="form" :model="tableRowRecord"> |
| | | <a-row> |
| | | <a-col :span="span"> |
| | | <a-form-model-item label="æ¥æååå·" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="outNum"> |
| | | <a-input disabled v-model="tableRowRecord.orderCode"></a-input> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="span"> |
| | | <a-form-model-item label="æ¥æäºº" :labelCol="labelCol" :wrapperCol="wrapperCol" |
| | | prop="outStorehouseType"> |
| | | <j-dict-select-tag disabled |
| | | v-model="tableRowRecord.losser" dictCode="sys_user,realname,id" |
| | | placeholder="è¯·éæ©" /> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | <a-row> |
| | | <a-col :span="span"> |
| | | <a-form-model-item label="æ¥ææ¶é´" :labelCol="labelCol" :wrapperCol="wrapperCol" |
| | | prop="outboundTime"> |
| | | <j-date disabled v-model="tableRowRecord.lossTime" :show-time="true" |
| | | dateFormat="YYYY-MM-DD HH:mm" style="width: 100%" /> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="span"> |
| | | <a-form-model-item label="æ¥æåå " :labelCol="labelCol" :wrapperCol="wrapperCol" |
| | | prop="subjectMatter"> |
| | | <a-input disabled v-model="tableRowRecord.lossReason"></a-input> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | <a-row> |
| | | <a-col :span="span"> |
| | | <a-form-model-item label="ç»æäºº" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="handler"> |
| | | <j-dict-select-tag disabled |
| | | v-model="tableRowRecord.handler" dictCode="sys_user,realname,id" |
| | | placeholder="è¯·éæ©" /> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="span"> |
| | | <a-form-model-item label="夿³¨" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="remark"> |
| | | <a-textarea disabled v-model="tableRowRecord.remark" rows="4" /> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | </a-form-model> |
| | | </a-tab-pane> |
| | | <a-tab-pane key="2" tab="æ¥ææç»ä¿¡æ¯"> |
| | | <a-table |
| | | ref="table" |
| | | size="middle" |
| | | bordered |
| | | rowKey="id" |
| | | :scroll="{x:'max-content'}" |
| | | :columns="columns" |
| | | :dataSource="dataSource" |
| | | :pagination="ipagination" |
| | | :loading="loading" |
| | | :rowSelection="null"> |
| | | </a-table> |
| | | </a-tab-pane> |
| | | <a-tab-pane key="3" tab="æµç¨èç¹"> |
| | | <a-timeline> |
| | | <a-timeline-item v-for="(item,index) in hitaskDataSource" :key="index"> |
| | | <div> |
| | | <h3 style="font-weight: bold;">{{ item.taskName }}</h3> |
| | | <div>å¤ç人ï¼{{ item.assignee_dictText }}</div> |
| | | <div v-if="index !==0">å¤çæ¶é¿ï¼{{ item.duration }}</div> |
| | | <div v-if="item.name !== 'æäº¤ç³è¯·'">å¤çç±»åï¼{{ item.sequenceFlowName }}</div> |
| | | <div v-if="item.description">å¤çæè§ï¼{{ item.description }}</div> |
| | | </div> |
| | | </a-timeline-item> |
| | | </a-timeline> |
| | | </a-tab-pane> |
| | | </a-tabs> |
| | | </a-spin> |
| | | </a-form> |
| | | </div> |
| | | <div v-if="auditVisible"> |
| | | <hr class="shallow-hr"> |
| | | <br> |
| | | <b>审æ¹è¯¦æ
</b> |
| | | <br> |
| | | <a-form-model ref="form" :model="approveData" :rules="validatorRules" slot="detail"> |
| | | <a-row> |
| | | <a-col ::span="span"> |
| | | <a-form-model-item label="ç³è¯·äºº" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="handler_dictText"> |
| | | <a-input :readOnly="inputReadOnly" v-model="tableRowRecord.handler_dictText"></a-input> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col ::span="span"> |
| | | <a-form-model-item label="ç³è¯·æ¶é´" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="createTime"> |
| | | <a-input :readOnly="inputReadOnly" v-model="tableRowRecord.createTime"></a-input> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="24" class="btxx"> |
| | | <a-form-item label="审æ¹ç¶æ" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | | <a-select :disabled="disableSubmit" v-model="assignFileStream.status" placeholder="è¯·éæ©å®¡æ¹ç»æ"> |
| | | <a-select-option value="3">éè¿</a-select-option> |
| | | <a-select-option value="4">驳å</a-select-option> |
| | | </a-select> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :span="24" class="btxx"> |
| | | <a-form-model-item label="å®¡æ¹æè§" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | | <a-textarea :disabled="disableSubmit" v-model="assignFileStream.approvalOpinion" rows="4" |
| | | placeholder="请è¾å
¥å®¡æ¹æè§" /> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | <div class="table-operator" style="text-align: right;"> |
| | | <a-button @click="handleQueXiaoTask" type="primary" icon="close">åæ¶</a-button> |
| | | <a-button :disabled="disableSubmit" @click="submitForm">æäº¤</a-button> |
| | | </div> |
| | | </a-form-model> |
| | | </div> |
| | | </a-card> |
| | | |
| | | |
| | | </a-modal> |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | import '@assets/less/TableExpand.less' |
| | | import { mixinDevice } from '@/utils/mixin' |
| | | import { downFile, getAction, httpAction } from '@api/manage' |
| | | |
| | | export default { |
| | | name: 'lossBoundHandle', |
| | | mixins: [mixinDevice], |
| | | props: { |
| | | selectShenpiData: { |
| | | type: Object, |
| | | required: true |
| | | } |
| | | }, |
| | | |
| | | data() { |
| | | return { |
| | | form: this.$form.createForm(this), |
| | | span: 12, |
| | | span1: 8, |
| | | disableSubmit: false, |
| | | inputReadOnly: true, |
| | | spinning: false, |
| | | tableRowRecord: {}, |
| | | assignFileStream: {}, |
| | | tableDataSource: [], |
| | | usageDataSource: [], |
| | | hitaskDataSource: [], |
| | | dataSource: [], |
| | | bomForm: {}, |
| | | imageSrc: null, |
| | | drawerVisible: true, |
| | | auditVisible: true, |
| | | loading: false, |
| | | labelCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 5 } |
| | | }, |
| | | wrapperCol: { |
| | | xs: { span: 30 }, |
| | | sm: { span: 16 } |
| | | }, |
| | | /* å页忰 */ |
| | | ipagination: { |
| | | current: 1, |
| | | pageSize: 5, |
| | | pageSizeOptions: ['5', '10', '50'], |
| | | showTotal: (total, range) => { |
| | | return range[0] + '-' + range[1] + ' å
±' + total + 'æ¡' |
| | | }, |
| | | showQuickJumper: true, |
| | | showSizeChanger: true, |
| | | total: 0 |
| | | }, |
| | | columns: [ |
| | | { |
| | | title: '#', |
| | | dataIndex: '', |
| | | key: 'rowIndex', |
| | | width: 60, |
| | | align: 'center', |
| | | customRender: function(t, r, index) { |
| | | return parseInt(index) + 1 |
| | | } |
| | | }, |
| | | { |
| | | title: 'åå
·ç¼å·', |
| | | align: 'center', |
| | | dataIndex: 'toolCode' |
| | | }, |
| | | { |
| | | title: 'å·¥å
፱Ȍ', |
| | | align: 'center', |
| | | dataIndex: 'applicationType_dictText' |
| | | }, |
| | | { |
| | | title: 'æ¥æåå ', |
| | | align: 'center', |
| | | dataIndex: 'lossReason' |
| | | }, |
| | | { |
| | | title: 'æ¥ææ°é', |
| | | align: 'center', |
| | | dataIndex: 'lossNumber' |
| | | }, |
| | | { |
| | | title: '䏿åç§°', |
| | | align: 'center', |
| | | dataIndex: 'chineseName' |
| | | }, |
| | | { |
| | | title: 'åå·/å¾å·', |
| | | align: 'center', |
| | | dataIndex: 'toolModel' |
| | | }, |
| | | { |
| | | title: 'åå
·ææ', |
| | | align: 'center', |
| | | dataIndex: 'toolMaterial' |
| | | }, |
| | | { |
| | | title: 'é¶ä»¶ææ', |
| | | align: 'center', |
| | | dataIndex: 'partMaterial' |
| | | }, |
| | | { |
| | | title: 'åå®¶', |
| | | align: 'center', |
| | | dataIndex: 'supplierId' |
| | | }, |
| | | { |
| | | title: 'åå¨ä½ç½®(åºä½å·)', |
| | | align: 'center', |
| | | dataIndex: 'positionCode' |
| | | }, |
| | | |
| | | { |
| | | title: 'å建æ¶é´', |
| | | align: 'center', |
| | | dataIndex: 'createTime' |
| | | }, |
| | | { |
| | | title: '夿³¨', |
| | | align: 'center', |
| | | dataIndex: 'remark' |
| | | } |
| | | ], |
| | | validatorRules: { |
| | | status: { |
| | | rules: [ |
| | | { required: true, message: 'è¯·éæ©å®¡æ¹ç¶æ!' } |
| | | ] |
| | | } |
| | | }, |
| | | approveData: {}, |
| | | flowData: {}, |
| | | title: '审æ¹é¡µé¢', |
| | | width: 1200, |
| | | visible: false, |
| | | // 表头 |
| | | url: { |
| | | queryLossBoundOrder: '/tms/toolsLossBound/queryById', |
| | | queryLossBoundDetailList: '/tms/toolsLossBound/listlossboundDetailByMainId', |
| | | diagramView: '/assign/flow/diagramView', |
| | | queryHisTaskList: '/assign/flow/queryHisTaskList', |
| | | approve: '/tms/toolsLossBound/approval' |
| | | }, |
| | | dictOptions: {}, |
| | | superFieldList: [], |
| | | workflowSource: [] |
| | | } |
| | | }, |
| | | created() { |
| | | }, |
| | | computed: {}, |
| | | methods: { |
| | | callback() { |
| | | }, |
| | | handCancel() { |
| | | this.visible = false |
| | | }, |
| | | clearTableSource() { |
| | | this.tableDataSource = [] |
| | | this.usageDataSource = [] |
| | | }, |
| | | fetchAndShowBmp() { |
| | | console.log('flowData----->', this.flowData) |
| | | try { |
| | | let parm = { |
| | | processDefinitionId: this.flowData.processDefinitionId, |
| | | processInstanceId: this.flowData.processInstanceId, |
| | | TaskDefinitionKey: this.flowData.processDefinitionKey |
| | | } |
| | | downFile(this.url.diagramView, parm, 'get').then((res => { |
| | | console.log('Pica------>', res) |
| | | const urlObject = window.URL.createObjectURL(new Blob([res])) |
| | | this.imageSrc = urlObject |
| | | })) |
| | | } catch (error) { |
| | | console.error('Error fetching image blob:', error) |
| | | alert('æ æ³å è½½å¾çï¼è¯·ç¨ååè¯ã') |
| | | } |
| | | }, |
| | | handleQueXiaoTask() { |
| | | this.visible = false |
| | | this.routeReload() |
| | | }, |
| | | submitForm() { |
| | | const that = this |
| | | if (!that.assignFileStream.status == null || that.assignFileStream.status === undefined) { |
| | | this.$message.warning('è¯·éæ©å®¡æ¹ç¶æï¼') |
| | | return false |
| | | } |
| | | if (!that.assignFileStream.approvalOpinion == null || that.assignFileStream.approvalOpinion === undefined) { |
| | | this.$message.warning('请è¾å
¥å®¡æ¹æè§ï¼') |
| | | return false |
| | | } |
| | | // 触å表åéªè¯ |
| | | this.form.validateFields((err, values) => { |
| | | if (!err) { |
| | | that.confirmLoading = true |
| | | let url = this.url.approve |
| | | let method = 'post' |
| | | let flowTaskVo = {} |
| | | flowTaskVo.status = that.assignFileStream.status |
| | | flowTaskVo.approvalOpinion = that.assignFileStream.approvalOpinion |
| | | flowTaskVo.comment = that.assignFileStream.approvalOpinion |
| | | flowTaskVo.dataId = this.selectShenpiData.dataId |
| | | flowTaskVo.taskId = this.selectShenpiData.id |
| | | flowTaskVo.userId = this.selectShenpiData.assignee |
| | | flowTaskVo.instanceId = this.selectShenpiData.procInstId |
| | | flowTaskVo.targetKey = this.selectShenpiData.taskDefKey |
| | | flowTaskVo.values = this.selectShenpiData.variables |
| | | flowTaskVo.assignee = this.selectShenpiData.assignee |
| | | console.log('表åæäº¤æ°æ®', flowTaskVo) |
| | | httpAction(url, flowTaskVo, method).then((res) => { |
| | | if (res.success) { |
| | | that.$message.success(res.message) |
| | | that.visible = false |
| | | //å·æ°è¡¨æ ¼ |
| | | that.$emit('searchReset') |
| | | } else { |
| | | that.$message.warning(res.message) |
| | | } |
| | | }).finally(() => { |
| | | that.confirmLoading = false |
| | | }) |
| | | } |
| | | |
| | | }) |
| | | }, |
| | | /** |
| | | * è·åæµç¨èç¹åæµç¨å¾ |
| | | * @param record å¾
åè®°å½ä¿¡æ¯ |
| | | */ |
| | | getAllApproveData(item) { |
| | | this.visible = true |
| | | this.loading = true |
| | | console.log('selectShenpiData----->', this.selectShenpiData) |
| | | this.flowData = item |
| | | getAction(this.url.queryHisTaskList, { procInstId: item.procInstId }).then(res => { |
| | | if (res.success) { |
| | | this.hitaskDataSource = res.result |
| | | } |
| | | }) |
| | | getAction(this.url.queryLossBoundOrder, { id: item.dataId }).then((res => { |
| | | if (res.success) { |
| | | this.tableRowRecord = res.result |
| | | } |
| | | })) |
| | | getAction(this.url.queryLossBoundDetailList, { lossBoundId: item.dataId }).then(res => { |
| | | if (res.success) { |
| | | this.dataSource = res.result.records |
| | | if (res.result.total) { |
| | | this.ipagination.total = res.result.total |
| | | } else { |
| | | this.ipagination.total = 0 |
| | | } |
| | | } else { |
| | | this.$message.warning(res.message) |
| | | } |
| | | }).finally(() => { |
| | | this.loading = false |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | <style scoped> |
| | | .shallow-hr { |
| | | border: 0; |
| | | height: 1px; /* åç线çé«åº¦ */ |
| | | background-color: rgba(0, 0, 0, 0.1); /* ä½¿ç¨ RGBA é¢è²ï¼å¹¶è®¾ç½®è¾ä½çéæåº¦ */ |
| | | margin: 20px 0; /* åç线ä¸ä¸çå¤è¾¹è· */ |
| | | } |
| | | |
| | | .btn-custom { |
| | | background-color: #4CAF50; /* 绿è²èæ¯ */ |
| | | color: white; /* ç½è²æå */ |
| | | border: none; /* æ è¾¹æ¡ */ |
| | | padding: 5px 15px; /* å
è¾¹è· */ |
| | | text-align: center; /* æåå±
ä¸ */ |
| | | text-decoration: none; /* æ ä¸å线 */ |
| | | display: inline-block; /* è¡å
åå
ç´ */ |
| | | font-size: 12px; /* åä½å¤§å° */ |
| | | margin: 4px 2px; /* å¤è¾¹è· */ |
| | | cursor: pointer; /* é¼ æ æ¬åæ¶æ¾ç¤ºæå */ |
| | | border-radius: 4px; /* åè§è¾¹æ¡ */ |
| | | } |
| | | |
| | | .bold-large-label { |
| | | font-weight: bold; |
| | | font-size: 20px; /* æä½ éè¦çä»»ä½å¤§å° */ |
| | | } |
| | | |
| | | .left_qiu { |
| | | position: absolute; |
| | | left: -74px; |
| | | top: 0; |
| | | width: 54px; |
| | | border-radius: 50%; |
| | | height: 54px; |
| | | font-size: 13px; |
| | | margin: auto; |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | align-items: center; |
| | | justify-content: center; |
| | | background: #0099ff; |
| | | transform: translate(0, 0); |
| | | } |
| | | |
| | | /deep/ .ant-timeline-item-tail { |
| | | left: -29px !important; |
| | | } |
| | | |
| | | .left_qiu span { |
| | | width: 3em; |
| | | display: block; |
| | | color: #fff; |
| | | text-align: center; |
| | | } |
| | | |
| | | .img { |
| | | width: 75%; |
| | | } |
| | | |
| | | .wrap { |
| | | clear: both; |
| | | width: 100%; |
| | | display: flex; |
| | | height: 50px; |
| | | border: 1px solid #ccc; |
| | | /* background-color: aqua; */ |
| | | } |
| | | |
| | | .box { |
| | | width: 21%; |
| | | height: 50px; |
| | | border-right: 1px solid #ccc; |
| | | line-height: 50px; |
| | | /* background: red; */ |
| | | text-align: center; |
| | | margin: auto; |
| | | } |
| | | |
| | | @import '~@assets/less/common.less'; |
| | | </style> |