¶Ô±ÈÐÂÎļþ |
| | |
| | | <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="éè´è®¡åç¼ç "> |
| | | <j-input placeholder="请è¾å
¥éè´è®¡åç¼ç " v-model="queryParam.planCode"></j-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
| | | <a-form-item label="éè´è®¡ååç§°"> |
| | | <j-input placeholder="请è¾å
¥éè´è®¡ååç§°" v-model="queryParam.planName"></j-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
| | | <a-form-item label="管çåç±»"> |
| | | <j-dict-select-tag dict-code="equipment_abc_flag" placeholder="è¯·éæ©ç®¡çåç±»" |
| | | v-model="queryParam.equipmentImportance"></j-dict-select-tag> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :xl="6" :lg="7" :md="8" :sm="24" v-if="toggleSearchStatus"> |
| | | <a-form-item label="计åç¶æ"> |
| | | <j-dict-select-tag dict-code="equipment_purchase_plan_status" placeholder="è¯·éæ©è®¡åç¶æ" |
| | | v-model="queryParam.planStatus"></j-dict-select-tag> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
| | | <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> |
| | | <!-- æ¥è¯¢åºå-END --> |
| | | |
| | | <!-- æä½æé®åºå --> |
| | | <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-button type="primary" icon="download" @click="handleTemplateXlsDownload">导å
¥æ¨¡æ¿ä¸è½½</a-button> |
| | | <!-- é«çº§æ¥è¯¢åºå --> |
| | | <!-- <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>--> |
| | | <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" |
| | | :scroll="{ x: 'max-content' }" |
| | | bordered |
| | | rowKey="id" |
| | | :columns="columns" |
| | | :dataSource="dataSource" |
| | | :pagination="ipagination" |
| | | :loading="loading" |
| | | :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" |
| | | class="j-table-force-nowrap" |
| | | @change="handleTableChange" |
| | | :customRow="customTableRow" |
| | | > |
| | | |
| | | <template slot="htmlSlot" slot-scope="text"> |
| | | <div v-html="text"></div> |
| | | </template> |
| | | <template slot="imgSlot" slot-scope="text,record"> |
| | | <span v-if="!text" style="font-size: 12px;font-style: italic;">æ å¾ç</span> |
| | | <img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/> |
| | | </template> |
| | | <template slot="fileSlot" slot-scope="text"> |
| | | <span v-if="!text" style="font-size: 12px;font-style: italic;">æ æä»¶</span> |
| | | <a-button |
| | | v-else |
| | | :ghost="true" |
| | | type="primary" |
| | | icon="download" |
| | | size="small" |
| | | @click="downloadFile(text)"> |
| | | ä¸è½½ |
| | | </a-button> |
| | | </template> |
| | | |
| | | <span slot="action" slot-scope="text, record"> |
| | | <a @click="handleDetail(record)">详æ
</a> |
| | | <span v-if="record.planStatus === 'NEWLY'"> |
| | | <a-divider type="vertical" /> |
| | | <a-popconfirm title="ç¡®å®æäº¤å?" @confirm="() => handleSubmit(record.id)"> |
| | | <a>æäº¤</a> |
| | | </a-popconfirm> |
| | | </span> |
| | | <span v-else-if="record.planStatus === 'PENDING_AUDIT'"> |
| | | <a-divider type="vertical" /> |
| | | <a @click="handleAudit(record)">å®¡æ ¸</a> |
| | | </span> |
| | | <span v-if="record.planStatus === 'NEWLY'"> |
| | | <a-divider type="vertical" /> |
| | | <a-dropdown> |
| | | <a class="ant-dropdown-link">æ´å¤ <a-icon type="down" /></a> |
| | | <a-menu slot="overlay"> |
| | | <a-menu-item> |
| | | <a @click="handleEdit(record)">ç¼è¾</a> |
| | | </a-menu-item> |
| | | <a-menu-item> |
| | | <a-popconfirm title="ç¡®å®å é¤å?" @confirm="() => handleDelete(record.id)"> |
| | | <a>å é¤</a> |
| | | </a-popconfirm> |
| | | </a-menu-item> |
| | | </a-menu> |
| | | </a-dropdown> |
| | | </span> |
| | | </span> |
| | | </a-table> |
| | | </div> |
| | | |
| | | <a-tabs defaultActiveKey="1"> |
| | | <a-tab-pane tab="设å¤éè´è®¡åéä»¶" key="1" > |
| | | <eam-purchase-plan-attachment-list ref="eamPurchasePlanAttachmentList"></eam-purchase-plan-attachment-list> |
| | | </a-tab-pane> |
| | | </a-tabs> |
| | | |
| | | <eam-equipment-purchase-plan-modal ref="modalForm" @ok="modalFormOk"></eam-equipment-purchase-plan-modal> |
| | | <eam-equipment-purchase-plan-audit-modal ref="modalAuditForm" @ok="modalFormOk"></eam-equipment-purchase-plan-audit-modal> |
| | | </a-card> |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | import '@/assets/less/TableExpand.less' |
| | | import { mixinDevice } from '@/utils/mixin' |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | import EamEquipmentPurchasePlanModal from './modules/EamEquipmentPurchasePlanModal' |
| | | import EamEquipmentPurchasePlanAuditModal from './modules/EamEquipmentPurchasePlanAuditModal.vue' |
| | | import EamPurchasePlanAttachmentList from './EamPurchasePlanAttachmentList.vue' |
| | | import OutboundDetailList from '../../tms/OutboundDetailList.vue' |
| | | import { getAction, templateXlsDownload } from '../../../api/manage' |
| | | |
| | | export default { |
| | | name: 'EamEquipmentPurchasePlanList', |
| | | mixins:[JeecgListMixin, mixinDevice], |
| | | components: { |
| | | OutboundDetailList, |
| | | EamEquipmentPurchasePlanModal, |
| | | EamEquipmentPurchasePlanAuditModal, |
| | | EamPurchasePlanAttachmentList |
| | | }, |
| | | data () { |
| | | return { |
| | | description: 'eam_equipment_purchase_plan管ç页é¢', |
| | | // 表头 |
| | | columns: [ |
| | | { |
| | | title: '#', |
| | | dataIndex: '', |
| | | key:'rowIndex', |
| | | width:60, |
| | | align:"center", |
| | | customRender:function (t,r,index) { |
| | | return parseInt(index)+1; |
| | | }, |
| | | fixed: 'left' |
| | | }, |
| | | { |
| | | title:'éè´è®¡åç¼ç ', |
| | | align:"center", |
| | | dataIndex: 'planCode', |
| | | fixed: 'left' |
| | | }, |
| | | { |
| | | title:'éè´è®¡ååç§°', |
| | | align:"center", |
| | | dataIndex: 'planName', |
| | | fixed: 'left' |
| | | }, |
| | | { |
| | | title:'计åç¶æ', |
| | | align:"center", |
| | | dataIndex: 'planStatus_dictText' |
| | | }, |
| | | { |
| | | title:'åå·', |
| | | align:"center", |
| | | dataIndex: 'equipmentModel' |
| | | }, |
| | | { |
| | | title:'éè´æ°é', |
| | | align:"center", |
| | | dataIndex: 'purchaseNumber' |
| | | }, |
| | | { |
| | | title:'é¢è®¡åä»·', |
| | | align:"center", |
| | | dataIndex: 'estimatedUnitPrice' |
| | | }, |
| | | { |
| | | title:'æ»ä»·', |
| | | align:"center", |
| | | dataIndex: 'totalPrice' |
| | | }, |
| | | { |
| | | title:'ååæ»éé¢', |
| | | align:"center", |
| | | dataIndex: 'overallContractAmount' |
| | | }, |
| | | { |
| | | title:'管çåç±»', |
| | | align:"center", |
| | | dataIndex: 'equipmentImportance' |
| | | }, |
| | | // { |
| | | // title:'计åç±»å«', |
| | | // align:"center", |
| | | // dataIndex: 'planCategory' |
| | | // }, |
| | | { |
| | | title:'ç³è¯·äºº', |
| | | align:"center", |
| | | dataIndex: 'applicant' |
| | | }, |
| | | { |
| | | title:'ç³è¯·è½¦é´', |
| | | align:"center", |
| | | dataIndex: 'applicantProduction_dictText' |
| | | }, |
| | | { |
| | | title:'计åå¼å§æ¥æ', |
| | | align:"center", |
| | | dataIndex: 'planStartDate' |
| | | }, |
| | | { |
| | | title:'计åå®ææ¥æ', |
| | | align:"center", |
| | | dataIndex: 'planEndDate' |
| | | }, |
| | | { |
| | | title:'计åæè¿°', |
| | | align:"center", |
| | | dataIndex: 'planDescription' |
| | | }, |
| | | { |
| | | title:'宿½ååå©é¨é¨', |
| | | align:"center", |
| | | dataIndex: 'relatedDeparts' |
| | | }, |
| | | { |
| | | title:'夿³¨', |
| | | align:"center", |
| | | dataIndex: 'remark' |
| | | }, |
| | | { |
| | | title: 'æä½', |
| | | dataIndex: 'action', |
| | | align:"center", |
| | | fixed:"right", |
| | | width:147, |
| | | scopedSlots: { customRender: 'action' } |
| | | } |
| | | ], |
| | | url: { |
| | | list: "/eam/eamEquipmentPurchasePlan/list", |
| | | submit: "/eam/eamEquipmentPurchasePlan/submit", |
| | | audit: "/eam/eamEquipmentPurchasePlan/audit", |
| | | delete: "/eam/eamEquipmentPurchasePlan/delete", |
| | | deleteBatch: "/eam/eamEquipmentPurchasePlan/deleteBatch", |
| | | exportXlsUrl: "/eam/eamEquipmentPurchasePlan/exportXls", |
| | | importExcelUrl: "eam/eamEquipmentPurchasePlan/importExcel", |
| | | templateXlsDownloadUrl: '导å
¥æ¨¡æ¿/设å¤éè´è®¡å导å
¥æ¨¡æ¿_v1.1.xlsx' |
| | | |
| | | }, |
| | | dictOptions:{}, |
| | | superFieldList:[], |
| | | } |
| | | }, |
| | | created() { |
| | | this.getSuperFieldList(); |
| | | }, |
| | | computed: { |
| | | importExcelUrl: function(){ |
| | | return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; |
| | | }, |
| | | }, |
| | | methods: { |
| | | handleTemplateXlsDownload() { |
| | | templateXlsDownload(this.url.templateXlsDownloadUrl) |
| | | }, |
| | | handleSubmit(id) { |
| | | getAction(this.url.submit,{ id: id }).then((res)=>{ |
| | | if(res.success){ |
| | | this.$message.success(res.message); |
| | | this.loadData(this.queryParam); |
| | | }else{ |
| | | this.$message.warning(res.message); |
| | | } |
| | | }) |
| | | }, |
| | | handleAudit(record) { |
| | | this.$refs.modalAuditForm.edit(record); |
| | | this.$refs.modalAuditForm.title="å®¡æ ¸"; |
| | | this.$refs.modalAuditForm.disableSubmit = true; |
| | | }, |
| | | onClearSelected() { |
| | | this.selectedRowKeys = []; |
| | | this.selectionRows = []; |
| | | this.$refs.eamPurchasePlanAttachmentList.dataSource = [] |
| | | this.$refs.eamPurchasePlanAttachmentList.onClearSelected() |
| | | }, |
| | | customTableRow(record) { |
| | | return { |
| | | style: { |
| | | cursor: 'pointer' |
| | | }, |
| | | on: { |
| | | click: () => { |
| | | this.onSelectChange([record.id]) |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | onSelectChange(selectedRowKeys, selectionRows) { |
| | | this.selectedRowKeys = selectedRowKeys |
| | | this.selectionRows = selectionRows |
| | | this.$refs.eamPurchasePlanAttachmentList.queryParam.planId = selectedRowKeys[0] |
| | | this.$refs.eamPurchasePlanAttachmentList.dataSource = [] |
| | | this.$refs.eamPurchasePlanAttachmentList.onClearSelected() |
| | | if (selectedRowKeys.length === 1) { |
| | | this.$refs.eamPurchasePlanAttachmentList.loadData() |
| | | } |
| | | }, |
| | | initDictConfig(){ |
| | | }, |
| | | getSuperFieldList(){ |
| | | let fieldList=[]; |
| | | fieldList.push({type:'string',value:'planName',text:'éè´è®¡ååç§°',dictCode:''}) |
| | | fieldList.push({type:'string',value:'planCode',text:'éè´è®¡åç¼ç ',dictCode:''}) |
| | | fieldList.push({type:'string',value:'planStatus',text:'计åç¶æ',dictCode:''}) |
| | | fieldList.push({type:'string',value:'equipmentModel',text:'åå·',dictCode:''}) |
| | | fieldList.push({type:'int',value:'purchaseNumber',text:'éè´æ°é',dictCode:''}) |
| | | fieldList.push({type:'BigDecimal',value:'estimatedUnitPrice',text:'é¢è®¡åä»·',dictCode:''}) |
| | | fieldList.push({type:'BigDecimal',value:'totalPrice',text:'æ»ä»·',dictCode:''}) |
| | | fieldList.push({type:'BigDecimal',value:'overallContractAmount',text:'ååæ»éé¢',dictCode:''}) |
| | | fieldList.push({type:'string',value:'equipmentImportance',text:'ABCæ è¯(管çåç±»)',dictCode:''}) |
| | | fieldList.push({type:'string',value:'planCategory',text:'计åç±»å«',dictCode:''}) |
| | | fieldList.push({type:'string',value:'applicant',text:'ç³è¯·äºº',dictCode:''}) |
| | | fieldList.push({type:'string',value:'applicantProduction',text:'ç³è¯·è½¦é´',dictCode:''}) |
| | | fieldList.push({type:'date',value:'planStartDate',text:'计åå¼å§æ¥æ'}) |
| | | fieldList.push({type:'date',value:'planEndDate',text:'计åå®ææ¥æ'}) |
| | | fieldList.push({type:'string',value:'planDescription',text:'计åæè¿°',dictCode:''}) |
| | | fieldList.push({type:'string',value:'relatedDeparts',text:'宿½ååå©é¨é¨',dictCode:''}) |
| | | fieldList.push({type:'string',value:'remark',text:'夿³¨',dictCode:''}) |
| | | this.superFieldList = fieldList |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | <style scoped> |
| | | @import '~@assets/less/common.less'; |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <a-card :bordered="false"> |
| | | <!-- æä½æé®åºå --> |
| | | <div class="table-operator"> |
| | | <a-button @click="handleAdd" type="primary" icon="plus">æ°å¢</a-button> |
| | | <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"> |
| | | |
| | | <span slot="action" slot-scope="text, record"> |
| | | <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 @click="handlePreview(record)">é¢è§</a> |
| | | </a-menu-item> |
| | | <a-menu-item> |
| | | <a-popconfirm title="ç¡®å®ä¸è½½æä»¶å?" @confirm="() => handleDownload(record)"> |
| | | <a>ä¸è½½</a> |
| | | </a-popconfirm> |
| | | </a-menu-item> |
| | | <a-menu-item> |
| | | <a-popconfirm title="ç¡®å®å é¤å?" @confirm="() => handleDelete(record.id)"> |
| | | <a>å é¤</a> |
| | | </a-popconfirm> |
| | | </a-menu-item> |
| | | </a-menu> |
| | | </a-dropdown> |
| | | </span> |
| | | |
| | | </a-table> |
| | | </div> |
| | | <!-- tableåºå-end --> |
| | | |
| | | <!-- 表ååºå --> |
| | | <eam-purchase-plan-attachment-modal ref="modalForm" @ok="modalFormOk" :planId="queryParam.planId"></eam-purchase-plan-attachment-modal> |
| | | <lx-file-preview ref="lxFilePreview" :fileUrl="fileUrl"></lx-file-preview> |
| | | </a-card> |
| | | </template> |
| | | |
| | | <script> |
| | | import '@/assets/less/TableExpand.less' |
| | | import EamPurchasePlanAttachmentModal from './modules/EamPurchasePlanAttachmentModal.vue' |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | import { downFile } from '@api/manage' |
| | | |
| | | export default { |
| | | name: 'EamPurchasePlanAttachmentList', |
| | | mixins: [JeecgListMixin], |
| | | components: { |
| | | EamPurchasePlanAttachmentModal |
| | | }, |
| | | data() { |
| | | return { |
| | | description: '设å¤éè´è®¡åé件管ç页é¢', |
| | | disableMixinCreated: true, |
| | | fileUrl: '', |
| | | queryParam: {}, |
| | | // 表头 |
| | | columns: [ |
| | | { |
| | | title: '#', |
| | | dataIndex: '', |
| | | key: 'rowIndex', |
| | | width: 60, |
| | | align: 'center', |
| | | customRender: function(t, r, index) { |
| | | return parseInt(index) + 1 |
| | | } |
| | | }, |
| | | { |
| | | title: 'æä»¶å å¯å', |
| | | align: 'center', |
| | | dataIndex: 'fileEncodeName', |
| | | ellipsis: true, |
| | | }, |
| | | { |
| | | title: 'æä»¶åç§°', |
| | | align: 'center', |
| | | dataIndex: 'fileName', |
| | | ellipsis: true, |
| | | }, |
| | | { |
| | | title: 'æä»¶è·¯å¾', |
| | | align: 'center', |
| | | dataIndex: 'filePath', |
| | | ellipsis: true, |
| | | }, |
| | | { |
| | | title: 'æä»¶åç¼å', |
| | | align: 'center', |
| | | dataIndex: 'fileSuffix' |
| | | }, |
| | | { |
| | | title: 'æä»¶å¤§å°', |
| | | align: 'center', |
| | | dataIndex: 'fileSize' |
| | | }, |
| | | { |
| | | title: 'æè¿°', |
| | | align: 'center', |
| | | dataIndex: 'description', |
| | | ellipsis: true, |
| | | }, |
| | | { |
| | | title: 'æä½', |
| | | dataIndex: 'action', |
| | | align: 'center', |
| | | scopedSlots: { customRender: 'action' } |
| | | } |
| | | ], |
| | | url: { |
| | | list: '/eam/eamPurchasePlanAttachment/list', |
| | | delete: '/eam/eamPurchasePlanAttachment/delete', |
| | | deleteBatch: '/eam/eamPurchasePlanAttachment/deleteBatch', |
| | | download: '/eam/eamPurchasePlanAttachment/downloadFile', |
| | | } |
| | | } |
| | | }, |
| | | computed: { |
| | | }, |
| | | methods: { |
| | | handleDownload(record) { |
| | | downFile(this.url.download, { id: record.id }).then((res) => { |
| | | if (!res) { |
| | | this.$message.warning('æä»¶ä¸è½½å¤±è´¥') |
| | | return |
| | | } else { |
| | | let fileName = record.fileName; |
| | | if (typeof window.navigator.msSaveBlob !== 'undefined') { |
| | | window.navigator.msSaveBlob(new Blob([res]), fileName); |
| | | } else { |
| | | let url = window.URL.createObjectURL(new Blob([res])); |
| | | let link = document.createElement('a'); |
| | | link.style.display = 'none'; |
| | | link.href = url; |
| | | link.setAttribute('download', fileName); |
| | | document.body.appendChild(link); |
| | | link.click() |
| | | document.body.removeChild(link) //ä¸è½½å®æç§»é¤å
ç´ |
| | | window.URL.revokeObjectURL(url) //éæ¾æblob对象 |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | handlePreview: function (record) { |
| | | this.$refs.lxFilePreview.preview(record.filePath); |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | | <style scoped> |
| | | @import '~@assets/less/common.less'; |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <j-modal |
| | | :title="title" |
| | | :width="width" |
| | | :visible="visible" |
| | | switchFullscreen |
| | | @ok="handleOk" |
| | | :okButtonProps="{ class:{'jee-hidden': disableSubmit} }" |
| | | @cancel="handleCancel" |
| | | cancelText="å
³é"> |
| | | |
| | | <template slot="footer"> |
| | | <a-button type="primary" @click="audit('COMPLETED')">éè¿</a-button> |
| | | <a-button type="danger" @click="audit('REJECT')">驳å</a-button> |
| | | </template> |
| | | |
| | | <eam-equipment-purchase-plan-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></eam-equipment-purchase-plan-form> |
| | | </j-modal> |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | import EamEquipmentPurchasePlanForm from './EamEquipmentPurchasePlanForm' |
| | | import { postAction } from '../../../../api/manage' |
| | | export default { |
| | | name: 'EamEquipmentPurchasePlanModal', |
| | | components: { |
| | | EamEquipmentPurchasePlanForm |
| | | }, |
| | | data () { |
| | | return { |
| | | title:'', |
| | | width:1200, |
| | | visible: false, |
| | | disableSubmit: false, |
| | | url: { |
| | | audit: "/eam/eamEquipmentPurchasePlan/audit" |
| | | } |
| | | } |
| | | }, |
| | | methods: { |
| | | audit (status) { |
| | | console.log(status) |
| | | const id = this.$refs.realForm.model.id |
| | | postAction(this.url.audit,{ id: id, planStatus: status }).then((res)=>{ |
| | | if (res.success) { |
| | | this.$message.success(res.message) |
| | | this.submitCallback() |
| | | } else { |
| | | this.$message.warning(res.message) |
| | | } |
| | | }) |
| | | }, |
| | | add () { |
| | | this.visible=true |
| | | this.$nextTick(()=>{ |
| | | this.$refs.realForm.add(); |
| | | }) |
| | | }, |
| | | edit (record) { |
| | | this.visible=true |
| | | this.$nextTick(()=>{ |
| | | this.$refs.realForm.edit(record); |
| | | }) |
| | | }, |
| | | close () { |
| | | this.$emit('close'); |
| | | this.visible = false; |
| | | }, |
| | | handleOk () { |
| | | this.$refs.realForm.submitForm(); |
| | | }, |
| | | submitCallback(){ |
| | | this.$emit('ok'); |
| | | this.visible = false; |
| | | }, |
| | | handleCancel () { |
| | | this.close() |
| | | } |
| | | } |
| | | } |
| | | </script> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <a-spin :spinning="confirmLoading"> |
| | | <j-form-container :disabled="formDisabled"> |
| | | <a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail"> |
| | | <a-row> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="éè´è®¡åç¼ç " :labelCol="labelCol" :wrapperCol="wrapperCol" prop="planCode"> |
| | | <a-input v-model="model.planCode" placeholder="ç³»ç»èªå¨çæ" disabled ></a-input> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="éè´è®¡ååç§°" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="planName"> |
| | | <a-input v-model="model.planName" placeholder="请è¾å
¥éè´è®¡ååç§°" ></a-input> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12" v-if="disabled"> |
| | | <a-form-model-item label="计åç¶æ" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="planStatus"> |
| | | <j-dict-select-tag dict-code="equipment_purchase_plan_status" placeholder="è¯·éæ©è®¡åç¶æ" |
| | | v-model="model.planStatus" /> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="åå·" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="equipmentModel"> |
| | | <a-input v-model="model.equipmentModel" placeholder="请è¾å
¥åå·" ></a-input> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="éè´æ°é" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="purchaseNumber"> |
| | | <a-input-number v-model="model.purchaseNumber" placeholder="请è¾å
¥éè´æ°é" style="width: 100%" /> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="é¢è®¡åä»·" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="estimatedUnitPrice"> |
| | | <a-input-number v-model="model.estimatedUnitPrice" placeholder="请è¾å
¥é¢è®¡åä»·" style="width: 100%" /> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="æ»ä»·" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="totalPrice"> |
| | | <a-input-number v-model="model.totalPrice" placeholder="请è¾å
¥æ»ä»·" style="width: 100%" /> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="ååæ»éé¢" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="overallContractAmount"> |
| | | <a-input-number v-model="model.overallContractAmount" placeholder="请è¾å
¥ååæ»éé¢" style="width: 100%" /> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="管çåç±»" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="equipmentImportance"> |
| | | <j-dict-select-tag dict-code="equipment_abc_flag" placeholder="è¯·éæ©ç®¡çåç±»" |
| | | v-model="model.equipmentImportance" /> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <!-- <a-col :span="12">--> |
| | | <!-- <a-form-model-item label="计åç±»å«" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="planCategory">--> |
| | | <!-- <a-input v-model="model.planCategory" placeholder="请è¾å
¥è®¡åç±»å«" ></a-input>--> |
| | | <!-- </a-form-model-item>--> |
| | | <!-- </a-col>--> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="ç³è¯·äºº" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="applicant"> |
| | | <j-search-select-tag placeholder="è¯·éæ©ç³è¯·äºº" v-model="model.applicant" dict="sys_user,realname, username, del_flag=0 and status=1"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="ç³è¯·è½¦é´" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="applicantProduction"> |
| | | <a-tree-select v-model="model.applicantProduction" |
| | | style="width: 100%" |
| | | :tree-data="treeData" |
| | | :dropdown-style="{ maxHeight: '400px', overflow: 'auto' }" |
| | | placeholder="è¯·éæ©ä½¿ç¨è½¦é´" |
| | | allow-clear |
| | | tree-default-expand-all |
| | | > |
| | | </a-tree-select> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="计åå¼å§æ¥æ" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="planStartDate"> |
| | | <j-date :show-time="true" dateFormat="YYYY-MM-DD HH" placeholder="è¯·éæ©è®¡åå¼å§æ¥æ" v-model="model.planStartDate" style="width: 100%" /> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="计åå®ææ¥æ" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="planEndDate"> |
| | | <j-date :show-time="true" dateFormat="YYYY-MM-DD HH" placeholder="è¯·éæ©è®¡åå®ææ¥æ" v-model="model.planEndDate" style="width: 100%" /> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="计åæè¿°" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="planDescription"> |
| | | <a-textarea v-model="model.planDescription" placeholder="请è¾å
¥è®¡åæè¿°" ></a-textarea> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="宿½ååå©é¨é¨" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="relatedDeparts"> |
| | | <a-input v-model="model.relatedDeparts" placeholder="请è¾å
¥å®æ½ååå©é¨é¨" ></a-input> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="夿³¨" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="remark"> |
| | | <a-textarea v-model="model.remark" placeholder="请è¾å
¥å¤æ³¨" ></a-textarea> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | </a-form-model> |
| | | </j-form-container> |
| | | </a-spin> |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | import { httpAction, getAction } from '@/api/manage' |
| | | import { validateDuplicateValue } from '@/utils/util' |
| | | |
| | | export default { |
| | | name: 'EamEquipmentPurchasePlanForm', |
| | | components: { |
| | | }, |
| | | props: { |
| | | //表åç¦ç¨ |
| | | disabled: { |
| | | type: Boolean, |
| | | default: false, |
| | | required: false |
| | | } |
| | | }, |
| | | data () { |
| | | return { |
| | | model:{ |
| | | }, |
| | | treeData: [], |
| | | labelCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 5 }, |
| | | }, |
| | | wrapperCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 16 }, |
| | | }, |
| | | confirmLoading: false, |
| | | validatorRules: { |
| | | planName: [ |
| | | { required: true, message: '请è¾å
¥éè´è®¡ååç§°!'}, |
| | | ], |
| | | equipmentModel: [ |
| | | { required: true, message: '请è¾å
¥åå·!'}, |
| | | ], |
| | | purchaseNumber: [ |
| | | { required: true, message: '请è¾å
¥éè´æ°é!'}, |
| | | ], |
| | | estimatedUnitPrice: [ |
| | | { required: true, message: '请è¾å
¥é¢è®¡åä»·!'}, |
| | | ], |
| | | totalPrice: [ |
| | | { required: true, message: '请è¾å
¥æ»ä»·!'}, |
| | | ], |
| | | overallContractAmount: [ |
| | | { required: true, message: '请è¾å
¥ååæ»éé¢!'}, |
| | | ], |
| | | planStartDate: [ |
| | | { required: true, message: '请è¾å
¥è®¡åå¼å§æ¥æ!'}, |
| | | ], |
| | | planEndDate: [ |
| | | { required: true, message: '请è¾å
¥è®¡åå®ææ¥æ!'}, |
| | | ], |
| | | }, |
| | | url: { |
| | | add: "/eam/eamEquipmentPurchasePlan/add", |
| | | edit: "/eam/eamEquipmentPurchasePlan/edit", |
| | | queryById: "/eam/eamEquipmentPurchasePlan/queryById", |
| | | loadWorkShopOptions:'/mdc/mdcProduction/loadProductionTreeOptions' |
| | | } |
| | | } |
| | | }, |
| | | computed: { |
| | | formDisabled(){ |
| | | return this.disabled |
| | | }, |
| | | }, |
| | | created () { |
| | | //å¤ä»½modelåå§å¼ |
| | | this.modelDefault = JSON.parse(JSON.stringify(this.model)); |
| | | this.loadWorkShopTree() |
| | | }, |
| | | methods: { |
| | | loadWorkShopTree() { |
| | | //å 载车é´éæ©æ |
| | | getAction(this.url.loadWorkShopOptions).then(res => { |
| | | if (res.success) { |
| | | this.treeData = [...res.result] |
| | | }else { |
| | | that.$message.warning(res.message) |
| | | } |
| | | }) |
| | | }, |
| | | add () { |
| | | this.edit(this.modelDefault); |
| | | }, |
| | | edit (record) { |
| | | this.model = Object.assign({}, record); |
| | | this.visible = true; |
| | | }, |
| | | submitForm () { |
| | | const that = this; |
| | | // 触å表åéªè¯ |
| | | 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'; |
| | | } |
| | | 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; |
| | | }) |
| | | } |
| | | |
| | | }) |
| | | }, |
| | | } |
| | | } |
| | | </script> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <j-modal |
| | | :title="title" |
| | | :width="width" |
| | | :visible="visible" |
| | | switchFullscreen |
| | | @ok="handleOk" |
| | | :okButtonProps="{ class:{'jee-hidden': disableSubmit} }" |
| | | @cancel="handleCancel" |
| | | cancelText="å
³é"> |
| | | |
| | | <eam-equipment-purchase-plan-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></eam-equipment-purchase-plan-form> |
| | | </j-modal> |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | import EamEquipmentPurchasePlanForm from './EamEquipmentPurchasePlanForm' |
| | | export default { |
| | | name: 'EamEquipmentPurchasePlanModal', |
| | | components: { |
| | | EamEquipmentPurchasePlanForm |
| | | }, |
| | | data () { |
| | | return { |
| | | title:'', |
| | | width:1200, |
| | | visible: false, |
| | | disableSubmit: false |
| | | } |
| | | }, |
| | | methods: { |
| | | add () { |
| | | this.visible=true |
| | | this.$nextTick(()=>{ |
| | | this.$refs.realForm.add(); |
| | | }) |
| | | }, |
| | | edit (record) { |
| | | this.visible=true |
| | | this.$nextTick(()=>{ |
| | | this.$refs.realForm.edit(record); |
| | | }) |
| | | }, |
| | | close () { |
| | | this.$emit('close'); |
| | | this.visible = false; |
| | | }, |
| | | handleOk () { |
| | | this.$refs.realForm.submitForm(); |
| | | }, |
| | | submitCallback(){ |
| | | this.$emit('ok'); |
| | | this.visible = false; |
| | | }, |
| | | handleCancel () { |
| | | this.close() |
| | | } |
| | | } |
| | | } |
| | | </script> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <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 |
| | | label="ä¸ä¼ " |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | v-if="!editable" |
| | | prop="fileList"> |
| | | <lx-upload :returnUrl="false" |
| | | :isMultiple="false" |
| | | v-model="model.fileList" |
| | | biz="test"> |
| | | </lx-upload> |
| | | </a-form-model-item> |
| | | <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="fileName" label="æä»¶åç§°" v-if="editable"> |
| | | <a-input placeholder="请è¾å
¥æä»¶åç§°" v-model="model.fileName" /> |
| | | </a-form-model-item> |
| | | <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="description" label="æè¿°"> |
| | | <a-textarea placeholder="请è¾å
¥æè¿°" v-model="model.description" /> |
| | | </a-form-model-item> |
| | | </a-form-model> |
| | | </a-spin> |
| | | </j-modal> |
| | | </template> |
| | | |
| | | <script> |
| | | import { httpAction } from '@/api/manage' |
| | | |
| | | export default { |
| | | name: "EamPurchasePlanAttachmentModal", |
| | | props: { |
| | | planId: { |
| | | type: String, |
| | | required: false, |
| | | default: '-1' |
| | | } |
| | | }, |
| | | data () { |
| | | return { |
| | | title:"æä½", |
| | | visible: false, |
| | | model: {}, |
| | | labelCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 5 }, |
| | | }, |
| | | wrapperCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 16 }, |
| | | }, |
| | | |
| | | confirmLoading: false, |
| | | validatorRules:{ |
| | | fileName: [ |
| | | { required: true, message: '请è¾å
¥æä»¶åç§°!' } |
| | | ] |
| | | }, |
| | | url: { |
| | | add: "/eam/eamPurchasePlanAttachment/add", |
| | | edit: "/eam/eamPurchasePlanAttachment/edit", |
| | | }, |
| | | editable: false, |
| | | } |
| | | }, |
| | | created () { |
| | | }, |
| | | methods: { |
| | | add () { |
| | | this.editable = false; |
| | | //åå§åé»è®¤å¼ |
| | | this.model = {}; |
| | | this.visible = true |
| | | }, |
| | | edit (record) { |
| | | this.editable = true; |
| | | this.model = Object.assign({}, record) |
| | | this.visible = true |
| | | }, |
| | | close () { |
| | | this.$emit('close'); |
| | | this.visible = false; |
| | | this.$refs.form.clearValidate(); |
| | | }, |
| | | handleOk () { |
| | | // 触å表åéªè¯ |
| | | this.$refs.form.validate(valid => { |
| | | console.log(this.planId) |
| | | if (valid) { |
| | | if (this.planId == null || this.planId === '-1') { |
| | | this.$message.warning('请å
éæ©éè´è®¡å!'); |
| | | return |
| | | } |
| | | this.confirmLoading = true; |
| | | let httpurl = ''; |
| | | let method = ''; |
| | | if(!this.model.id){ |
| | | httpurl+=this.url.add; |
| | | method = 'post'; |
| | | }else{ |
| | | httpurl+=this.url.edit; |
| | | method = 'put'; |
| | | } |
| | | this.model.planId = this.planId; |
| | | console.log(this.model) |
| | | httpAction(httpurl, this.model, method).then((res)=>{ |
| | | if(res.success){ |
| | | this.$message.success(res.message); |
| | | this.$emit('ok'); |
| | | this.close(); |
| | | }else{ |
| | | this.$message.warning(res.message); |
| | | } |
| | | }).finally(() => { |
| | | this.confirmLoading = false; |
| | | }) |
| | | }else{ |
| | | return false; |
| | | } |
| | | }) |
| | | }, |
| | | handleCancel () { |
| | | this.close() |
| | | }, |
| | | |
| | | |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="less" scoped> |
| | | |
| | | </style> |