¶Ô±ÈÐÂÎļþ |
| | |
| | | <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.buttonName"></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.buttonCode"></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 dictCode="button_status" placeholder="请è¾å
¥å®ç¯æé®ç¶æ" v-model="queryParam.buttonStatus"></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="primary" @click="searchReset" icon="reload" style="margin-left: 8px">éç½®</a-button> |
| | | </span> |
| | | </a-col> |
| | | </a-row> |
| | | </a-form> |
| | | </div> |
| | | <!-- æ¥è¯¢åºå-END --> |
| | | |
| | | <!-- æä½æé®åºå --> |
| | | <div class="table-operator"> |
| | | <a-button @click="handleAdd" type="primary" icon="plus">æ°å¢</a-button> |
| | | </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:true}" |
| | | bordered |
| | | rowKey="id" |
| | | :columns="columns" |
| | | :dataSource="dataSource" |
| | | :pagination="ipagination" |
| | | :loading="loading" |
| | | :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" |
| | | class="j-table-force-nowrap" |
| | | @change="handleTableChange"> |
| | | |
| | | <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="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="handleDetail(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> |
| | | |
| | | </a-table> |
| | | </div> |
| | | |
| | | <andon-button-config-modal ref="modalForm" @ok="modalFormOk"></andon-button-config-modal> |
| | | </a-card> |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | import '@/assets/less/TableExpand.less' |
| | | import { mixinDevice } from '@/utils/mixin' |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | import AndonButtonConfigModal from './modules/AndonButtonConfigModal' |
| | | import {filterMultiDictText} from '@/components/dict/JDictSelectUtil' |
| | | |
| | | export default { |
| | | name: 'AndonButtonConfigList', |
| | | mixins:[JeecgListMixin, mixinDevice], |
| | | components: { |
| | | AndonButtonConfigModal |
| | | }, |
| | | data () { |
| | | return { |
| | | description: 'å®ç¯æé®é
置管ç页é¢', |
| | | // 表头 |
| | | columns: [ |
| | | { |
| | | title: '#', |
| | | dataIndex: '', |
| | | key:'rowIndex', |
| | | width:60, |
| | | align:"center", |
| | | customRender:function (t,r,index) { |
| | | return parseInt(index)+1; |
| | | } |
| | | }, |
| | | { |
| | | title:'å®ç¯åç§°', |
| | | align:"center", |
| | | dataIndex: 'buttonName' |
| | | }, |
| | | { |
| | | title:'å®ç¯ç¼ç ', |
| | | align:"center", |
| | | dataIndex: 'buttonCode' |
| | | }, |
| | | { |
| | | title:'å级ååºæ¶é¿(åé)', |
| | | align:"center", |
| | | dataIndex: 'upgradeResponseDuration' |
| | | }, |
| | | { |
| | | title:'å级å¤çæ¶é¿(åé)', |
| | | align:"center", |
| | | dataIndex: 'upgradeProcessDuration' |
| | | }, |
| | | { |
| | | title:'äºæ¬¡å级ååºæ¶é¿(åé)', |
| | | align:"center", |
| | | dataIndex: 'secondUpgradeResponseDuration' |
| | | }, |
| | | { |
| | | title:'äºæ¬¡å级å¤çæ¶é¿(åé)', |
| | | align:"center", |
| | | dataIndex: 'secondUpgradeProcessDuration' |
| | | }, |
| | | { |
| | | title:'å®ç¯æé®ç¶æ', |
| | | align:"center", |
| | | dataIndex: 'buttonStatus_dictText' |
| | | }, |
| | | { |
| | | title:'夿³¨', |
| | | align:"center", |
| | | dataIndex: 'remark' |
| | | }, |
| | | { |
| | | title: 'æä½', |
| | | dataIndex: 'action', |
| | | align:"center", |
| | | fixed:"right", |
| | | width:147, |
| | | scopedSlots: { customRender: 'action' } |
| | | } |
| | | ], |
| | | url: { |
| | | list: "/andonbuttonconfig/andonButtonConfig/list", |
| | | delete: "/andonbuttonconfig/andonButtonConfig/delete", |
| | | deleteBatch: "/andonbuttonconfig/andonButtonConfig/deleteBatch", |
| | | exportXlsUrl: "/andonbuttonconfig/andonButtonConfig/exportXls", |
| | | importExcelUrl: "andonbuttonconfig/andonButtonConfig/importExcel", |
| | | |
| | | }, |
| | | dictOptions:{}, |
| | | superFieldList:[], |
| | | } |
| | | }, |
| | | created() { |
| | | this.getSuperFieldList(); |
| | | }, |
| | | computed: { |
| | | importExcelUrl: function(){ |
| | | return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; |
| | | }, |
| | | }, |
| | | methods: { |
| | | initDictConfig(){ |
| | | }, |
| | | getSuperFieldList(){ |
| | | let fieldList=[]; |
| | | fieldList.push({type:'int',value:'delFlag',text:'å 餿 è®°',dictCode:''}) |
| | | fieldList.push({type:'string',value:'buttonName',text:'å®ç¯åç§°',dictCode:''}) |
| | | fieldList.push({type:'string',value:'buttonCode',text:'å®ç¯ç¼ç ',dictCode:''}) |
| | | fieldList.push({type:'int',value:'upgradeResponseDuration',text:'å级ååºæ¶é¿(åé)',dictCode:''}) |
| | | fieldList.push({type:'int',value:'upgradeProcessDuration',text:'å级å¤çæ¶é¿(åé)',dictCode:''}) |
| | | fieldList.push({type:'int',value:'secondUpgradeResponseDuration',text:'äºæ¬¡å级ååºæ¶é¿(åé)',dictCode:''}) |
| | | fieldList.push({type:'int',value:'secondUpgradeProcessDuration',text:'äºæ¬¡å级å¤çæ¶é¿(åé)',dictCode:''}) |
| | | fieldList.push({type:'string',value:'buttonStatus',text:'å®ç¯æé®ç¶æ',dictCode:'button_status'}) |
| | | 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-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-dict-select-tag dictCode="andon_level" placeholder="请è¾å
¥å®ç¯ç级" v-model="queryParam.andonLevel"></j-dict-select-tag> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
| | | <a-form-item label="å®ç¯ç¶æ"> |
| | | <j-dict-select-tag dictCode="order_status" placeholder="请è¾å
¥å®ç¯ç¶æ" v-model="queryParam.orderStatus"></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="primary" @click="searchReset" icon="reload" style="margin-left: 8px">éç½®</a-button> |
| | | </span> |
| | | </a-col> |
| | | </a-row> |
| | | </a-form> |
| | | </div> |
| | | <!-- æ¥è¯¢åºå-END --> |
| | | |
| | | <!-- æä½æé®åºå --> |
| | | <div class="table-operator"> |
| | | <a-button @click="handleAdd" type="primary" icon="plus">æ°å¢</a-button> |
| | | </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:true}" |
| | | bordered |
| | | rowKey="id" |
| | | :columns="columns" |
| | | :dataSource="dataSource" |
| | | :pagination="ipagination" |
| | | :loading="loading" |
| | | :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" |
| | | class="j-table-force-nowrap" |
| | | @change="handleTableChange"> |
| | | |
| | | <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="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="handleDetail(record)">详æ
</a> |
| | | </a-menu-item> |
| | | <a-menu-item> |
| | | <a-popconfirm title="ç¡®å®å é¤å?" @confirm="() => handleDelete(record.id)"> |
| | | <a>å é¤</a> |
| | | </a-popconfirm> |
| | | </a-menu-item> |
| | | <a-menu-item> |
| | | <a @click="handleResponse(record)">ååº(模æ)</a> |
| | | </a-menu-item> |
| | | <a-menu-item> |
| | | <a @click="handleDispose(record)">å¤ç(模æ)</a> |
| | | </a-menu-item> |
| | | </a-menu> |
| | | </a-dropdown> |
| | | </span> |
| | | |
| | | </a-table> |
| | | </div> |
| | | |
| | | <andon-order-modal ref="modalForm" @ok="modalFormOk"></andon-order-modal> |
| | | </a-card> |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | import '@/assets/less/TableExpand.less' |
| | | import { mixinDevice } from '@/utils/mixin' |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | import AndonOrderModal from './modules/AndonOrderModal' |
| | | import {filterMultiDictText} from '@/components/dict/JDictSelectUtil' |
| | | import { postAction } from '@api/manage' |
| | | import store from '@/store' |
| | | import JSelectFactory from '@comp/jeecgbiz/JSelectFactory.vue' |
| | | |
| | | export default { |
| | | name: 'AndonOrderList', |
| | | mixins:[JeecgListMixin, mixinDevice], |
| | | components: { |
| | | JSelectFactory, |
| | | AndonOrderModal |
| | | }, |
| | | data () { |
| | | return { |
| | | description: 'å®ç¯å·¥å管ç页é¢', |
| | | // 表头 |
| | | columns: [ |
| | | { |
| | | title: '#', |
| | | dataIndex: '', |
| | | key:'rowIndex', |
| | | width:60, |
| | | align:"center", |
| | | customRender:function (t,r,index) { |
| | | return parseInt(index)+1; |
| | | } |
| | | }, |
| | | { |
| | | title:'产线', |
| | | align:"center", |
| | | dataIndex: 'factoryId_dictText' |
| | | }, |
| | | { |
| | | title:'å®ç¯ç±»å', |
| | | align:"center", |
| | | dataIndex: 'buttonId_dictText' |
| | | }, |
| | | { |
| | | title:'å®ç¯äºº', |
| | | align:"center", |
| | | dataIndex: 'operator' |
| | | }, |
| | | { |
| | | title:'å®ç¯æ¶é´', |
| | | align:"center", |
| | | dataIndex: 'operateTime' |
| | | }, |
| | | { |
| | | title:'å®ç¯ç级', |
| | | align:"center", |
| | | dataIndex: 'andonLevel_dictText' |
| | | }, |
| | | { |
| | | title:'ååºäºº', |
| | | align:"center", |
| | | dataIndex: 'responder' |
| | | }, |
| | | { |
| | | title:'ååºæ¶é´', |
| | | align:"center", |
| | | dataIndex: 'responseTime' |
| | | }, |
| | | { |
| | | title:'å¤ç人', |
| | | align:"center", |
| | | dataIndex: 'processor' |
| | | }, |
| | | { |
| | | title:'å¤ç宿æ¶é´', |
| | | align:"center", |
| | | dataIndex: 'processTime' |
| | | }, |
| | | { |
| | | title:'å®ç¯ç¶æ', |
| | | align:"center", |
| | | dataIndex: 'orderStatus_dictText' |
| | | }, |
| | | { |
| | | title:'é®é¢æè¿°', |
| | | align:"center", |
| | | dataIndex: 'problemDescreption' |
| | | }, |
| | | { |
| | | title:'å¤çç»ææè¿°', |
| | | align:"center", |
| | | dataIndex: 'resolutionDescreption' |
| | | }, |
| | | { |
| | | title:'å¤çç»æå¾ç', |
| | | align:"center", |
| | | dataIndex: 'imageFiles', |
| | | scopedSlots: {customRender: 'imgSlot'} |
| | | }, |
| | | { |
| | | title: 'æä½', |
| | | dataIndex: 'action', |
| | | align:"center", |
| | | fixed:"right", |
| | | width:147, |
| | | scopedSlots: { customRender: 'action' } |
| | | } |
| | | ], |
| | | url: { |
| | | list: "/andonorder/andonOrder/list", |
| | | delete: "/andonorder/andonOrder/delete", |
| | | deleteBatch: "/andonorder/andonOrder/deleteBatch", |
| | | exportXlsUrl: "/andonorder/andonOrder/exportXls", |
| | | importExcelUrl: "andonorder/andonOrder/importExcel", |
| | | edit:"/andonorder/andonOrder/edit" |
| | | |
| | | }, |
| | | dictOptions:{}, |
| | | superFieldList:[], |
| | | } |
| | | }, |
| | | created() { |
| | | this.getSuperFieldList(); |
| | | }, |
| | | computed: { |
| | | importExcelUrl: function(){ |
| | | return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; |
| | | }, |
| | | }, |
| | | methods: { |
| | | handleResponse(record){ |
| | | //è·åå½åæ¶é´ |
| | | const now = new Date(); |
| | | const formattedTime = `${now.getFullYear()}-${(now.getMonth()+1).toString().padStart(2,'0')}-${now.getDate().toString().padStart(2,'0')} ${now.getHours().toString().padStart(2,'0')}:${now.getMinutes().toString().padStart(2,'0')}:${now.getSeconds().toString().padStart(2,'0')}`; |
| | | record.orderStatus = "2" |
| | | record.andonLevel = "1" |
| | | record.responseTime = formattedTime |
| | | record.responder = store.getters.userInfo.username |
| | | postAction(this.url.edit,record) |
| | | this.loadData() |
| | | }, |
| | | handleDispose(record){ |
| | | const now = new Date(); |
| | | const formattedTime = `${now.getFullYear()}-${(now.getMonth()+1).toString().padStart(2,'0')}-${now.getDate().toString().padStart(2,'0')} ${now.getHours().toString().padStart(2,'0')}:${now.getMinutes().toString().padStart(2,'0')}:${now.getSeconds().toString().padStart(2,'0')}`; |
| | | record.orderStatus = "3" |
| | | record.andonLevel = "1" |
| | | record.processTime = formattedTime |
| | | record.processor = store.getters.userInfo.username |
| | | postAction(this.url.edit,record) |
| | | this.loadData() |
| | | }, |
| | | initDictConfig(){ |
| | | }, |
| | | getSuperFieldList(){ |
| | | let fieldList=[]; |
| | | fieldList.push({type:'int',value:'delFlag',text:'å 餿 è®°',dictCode:''}) |
| | | fieldList.push({type:'string',value:'factoryId',text:'产线ID',dictCode:''}) |
| | | fieldList.push({type:'string',value:'buttonId',text:'å®ç¯ç±»å',dictCode:''}) |
| | | fieldList.push({type:'string',value:'operator',text:'å®ç¯äºº',dictCode:''}) |
| | | fieldList.push({type:'datetime',value:'operateTime',text:'å®ç¯æ¶é´'}) |
| | | fieldList.push({type:'string',value:'andonLevel',text:'å®ç¯ç级',dictCode:'andon_level'}) |
| | | fieldList.push({type:'string',value:'responder',text:'ååºäºº',dictCode:''}) |
| | | fieldList.push({type:'datetime',value:'responseTime',text:'ååºæ¶é´'}) |
| | | fieldList.push({type:'string',value:'processor',text:'å¤ç人',dictCode:''}) |
| | | fieldList.push({type:'datetime',value:'processTime',text:'å¤ç宿æ¶é´'}) |
| | | fieldList.push({type:'string',value:'orderStatus',text:'å®ç¯ç¶æ',dictCode:'order_status'}) |
| | | fieldList.push({type:'string',value:'problemDescreption',text:'é®é¢æè¿°',dictCode:''}) |
| | | fieldList.push({type:'string',value:'resolutionDescreption',text:'å¤çç»ææè¿°',dictCode:''}) |
| | | fieldList.push({type:'Text',value:'imageFiles',text:'å¤çç»æå¾ç',dictCode:''}) |
| | | this.superFieldList = fieldList |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | <style scoped> |
| | | @import '~@assets/less/common.less'; |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <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-search-select-tag placeholder="请è¾å
¥å®ç¯ç±»å" v-model="queryParam.buttonId" |
| | | dict="andon_button_config,button_name,id" |
| | | ></j-search-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="primary" @click="searchReset" icon="reload" style="margin-left: 8px">éç½®</a-button> |
| | | </span> |
| | | </a-col> |
| | | </a-row> |
| | | </a-form> |
| | | </div> |
| | | <!-- æ¥è¯¢åºå-END --> |
| | | |
| | | <!-- æä½æé®åºå --> |
| | | <div class="table-operator"> |
| | | <a-button @click="handleAdd" type="primary" icon="plus">æ°å¢</a-button> |
| | | </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:true}" |
| | | bordered |
| | | rowKey="id" |
| | | :columns="columns" |
| | | :dataSource="dataSource" |
| | | :pagination="ipagination" |
| | | :loading="loading" |
| | | :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" |
| | | class="j-table-force-nowrap" |
| | | @change="handleTableChange"> |
| | | |
| | | <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="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="handleDetail(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> |
| | | |
| | | </a-table> |
| | | </div> |
| | | |
| | | <andon-response-config-modal ref="modalForm" @ok="modalFormOk"></andon-response-config-modal> |
| | | </a-card> |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | import '@/assets/less/TableExpand.less' |
| | | import { mixinDevice } from '@/utils/mixin' |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | import AndonResponseConfigModal from './modules/AndonResponseConfigModal' |
| | | |
| | | export default { |
| | | name: 'AndonResponseConfigList', |
| | | mixins:[JeecgListMixin, mixinDevice], |
| | | components: { |
| | | AndonResponseConfigModal |
| | | }, |
| | | data () { |
| | | return { |
| | | description: 'å®ç¯ååºé
置管ç页é¢', |
| | | // 表头 |
| | | columns: [ |
| | | { |
| | | title: '#', |
| | | dataIndex: '', |
| | | key:'rowIndex', |
| | | width:60, |
| | | align:"center", |
| | | customRender:function (t,r,index) { |
| | | return parseInt(index)+1; |
| | | } |
| | | }, |
| | | { |
| | | title:'产线ID', |
| | | align:"center", |
| | | dataIndex: 'factoryId_dictText' |
| | | }, |
| | | { |
| | | title:'å®ç¯ç±»å', |
| | | align:"center", |
| | | dataIndex: 'buttonId_dictText' |
| | | }, |
| | | { |
| | | title:'åå§ååºäºº', |
| | | align:"center", |
| | | dataIndex: 'firsterResponder' |
| | | }, |
| | | { |
| | | title:'äºçº§ååºäºº(åçº§ä¸æ¬¡)', |
| | | align:"center", |
| | | dataIndex: 'secondResponder' |
| | | }, |
| | | { |
| | | title:'ä¸çº§ååºäºº(å级两次)', |
| | | align:"center", |
| | | dataIndex: 'thirdResponder' |
| | | }, |
| | | { |
| | | title: 'æä½', |
| | | dataIndex: 'action', |
| | | align:"center", |
| | | fixed:"right", |
| | | width:147, |
| | | scopedSlots: { customRender: 'action' } |
| | | } |
| | | ], |
| | | url: { |
| | | list: "/andonresponseconfig/andonResponseConfig/list", |
| | | delete: "/andonresponseconfig/andonResponseConfig/delete", |
| | | deleteBatch: "/andonresponseconfig/andonResponseConfig/deleteBatch", |
| | | exportXlsUrl: "/andonresponseconfig/andonResponseConfig/exportXls", |
| | | importExcelUrl: "andonresponseconfig/andonResponseConfig/importExcel", |
| | | |
| | | }, |
| | | dictOptions:{}, |
| | | superFieldList:[], |
| | | } |
| | | }, |
| | | created() { |
| | | this.getSuperFieldList(); |
| | | }, |
| | | computed: { |
| | | importExcelUrl: function(){ |
| | | return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; |
| | | }, |
| | | }, |
| | | methods: { |
| | | initDictConfig(){ |
| | | }, |
| | | getSuperFieldList(){ |
| | | let fieldList=[]; |
| | | fieldList.push({type:'int',value:'delFlag',text:'å 餿 è®°',dictCode:''}) |
| | | fieldList.push({type:'string',value:'factoryId',text:'产线ID',dictCode:''}) |
| | | fieldList.push({type:'string',value:'buttonId',text:'å®ç¯ç±»å',dictCode:''}) |
| | | fieldList.push({type:'string',value:'firsterResponder',text:'åå§ååºäºº',dictCode:''}) |
| | | fieldList.push({type:'string',value:'secondResponder',text:'äºçº§ååºäºº(åçº§ä¸æ¬¡)',dictCode:''}) |
| | | fieldList.push({type:'string',value:'thirdResponder',text:'ä¸çº§ååºäºº(å级两次)',dictCode:''}) |
| | | this.superFieldList = fieldList |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | <style scoped> |
| | | @import '~@assets/less/common.less'; |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <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="buttonName"> |
| | | <a-input v-model="model.buttonName" placeholder="请è¾å
¥å®ç¯åç§°" ></a-input> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="å®ç¯ç¼ç " :labelCol="labelCol" :wrapperCol="wrapperCol" prop="buttonCode"> |
| | | <a-input v-model="model.buttonCode" placeholder="请è¾å
¥å®ç¯ç¼ç " ></a-input> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="å级ååºæ¶é¿(åé)" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="upgradeResponseDuration"> |
| | | <a-input-number v-model="model.upgradeResponseDuration" placeholder="请è¾å
¥å级ååºæ¶é¿(åé)" style="width: 100%" /> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="å级å¤çæ¶é¿(åé)" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="upgradeProcessDuration"> |
| | | <a-input-number v-model="model.upgradeProcessDuration" placeholder="请è¾å
¥å级å¤çæ¶é¿(åé)" style="width: 100%" /> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="äºæ¬¡å级ååºæ¶é¿(åé)" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="secondUpgradeResponseDuration"> |
| | | <a-input-number v-model="model.secondUpgradeResponseDuration" placeholder="请è¾å
¥äºæ¬¡å级ååºæ¶é¿(åé)" style="width: 100%" /> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="äºæ¬¡å级å¤çæ¶é¿(åé)" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="secondUpgradeProcessDuration"> |
| | | <a-input-number v-model="model.secondUpgradeProcessDuration" placeholder="请è¾å
¥äºæ¬¡å级å¤çæ¶é¿(åé)" style="width: 100%" /> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="å®ç¯æé®ç¶æ" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="buttonStatus"> |
| | | <j-dict-select-tag type="list" v-model="model.buttonStatus" dictCode="button_status" placeholder="è¯·éæ©å®ç¯æé®ç¶æ" /> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="夿³¨" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="remark"> |
| | | <a-input v-model="model.remark" placeholder="请è¾å
¥å¤æ³¨" ></a-input> |
| | | </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: 'AndonButtonConfigForm', |
| | | components: { |
| | | }, |
| | | props: { |
| | | //表åç¦ç¨ |
| | | disabled: { |
| | | type: Boolean, |
| | | default: false, |
| | | required: false |
| | | } |
| | | }, |
| | | data () { |
| | | return { |
| | | model:{ |
| | | }, |
| | | labelCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 5 }, |
| | | }, |
| | | wrapperCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 16 }, |
| | | }, |
| | | confirmLoading: false, |
| | | validatorRules: { |
| | | buttonName: [ |
| | | { required: true, message: 'å®ç¯åç§°æ¯å¿
é项', trigger: 'change' } |
| | | ], |
| | | buttonCode: [ |
| | | { required: true, message: 'å®ç¯ç¼ç æ¯å¿
é项', trigger: 'change' } |
| | | ], |
| | | upgradeResponseDuration: [ |
| | | { required: true, message: 'å级ååºæ¶é¿æ¯å¿
é项', trigger: 'change' } |
| | | ], |
| | | upgradeProcessDuration: [ |
| | | { required: true, message: 'å级å¤çæ¶é¿æ¯å¿
é项', trigger: 'change' } |
| | | ], |
| | | secondUpgradeResponseDuration: [ |
| | | { required: true, message: 'äºæ¬¡å级ååºæ¶é¿æ¯å¿
é项', trigger: 'change' } |
| | | ], |
| | | secondUpgradeProcessDuration: [ |
| | | { required: true, message: 'äºæ¬¡å级å¤çæ¶é¿æ¯å¿
é项', trigger: 'change' } |
| | | ], |
| | | buttonStatus: [ |
| | | { required: true, message: 'å®ç¯æé®ç¶ææ¯å¿
é项', trigger: 'change' } |
| | | ], |
| | | }, |
| | | url: { |
| | | add: "/andonbuttonconfig/andonButtonConfig/add", |
| | | edit: "/andonbuttonconfig/andonButtonConfig/edit", |
| | | queryById: "/andonbuttonconfig/andonButtonConfig/queryById" |
| | | } |
| | | } |
| | | }, |
| | | computed: { |
| | | formDisabled(){ |
| | | return this.disabled |
| | | }, |
| | | }, |
| | | created () { |
| | | //å¤ä»½modelåå§å¼ |
| | | this.modelDefault = JSON.parse(JSON.stringify(this.model)); |
| | | }, |
| | | methods: { |
| | | 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="å
³é"> |
| | | <andon-button-config-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></andon-button-config-form> |
| | | </j-modal> |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | import AndonButtonConfigForm from './AndonButtonConfigForm' |
| | | export default { |
| | | name: 'AndonButtonConfigModal', |
| | | components: { |
| | | AndonButtonConfigForm |
| | | }, |
| | | data () { |
| | | return { |
| | | title:'', |
| | | width:896, |
| | | 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> |
| | | <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="24"> |
| | | <a-form-model-item label="产线" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="factoryId"> |
| | | <a-row :gutter="24"> |
| | | <a-col :span="24"> |
| | | <a-form-item |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | label="" |
| | | > |
| | | <j-select-factory |
| | | :disabled="disabled" |
| | | v-model="model.factoryId" |
| | | :multi="true" |
| | | @back="backFactoryInfo" |
| | | :backProduction="true" |
| | | :treeProductOpera="true" |
| | | ></j-select-factory> |
| | | </a-form-item> |
| | | </a-col> |
| | | </a-row> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="å®ç¯ç±»å" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="buttonId"> |
| | | <j-search-select-tag v-model="model.buttonId" placeholder="请è¾å
¥å®ç¯ç±»å" |
| | | dict="andon_button_config,button_name,id"></j-search-select-tag> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="å®ç¯äºº" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="operator"> |
| | | <j-select-user-by-dep :multi="false" v-model="model.operator" placeholder="请è¾å
¥å®ç¯äºº" ></j-select-user-by-dep> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="å®ç¯æ¶é´" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="operateTime"> |
| | | <j-date placeholder="è¯·éæ©å®ç¯æ¶é´" v-model="model.operateTime" :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" style="width: 100%" /> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="å®ç¯ç级" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="andonLevel"> |
| | | <j-dict-select-tag type="list" v-model="model.andonLevel" dictCode="andon_level" placeholder="è¯·éæ©å®ç¯ç级" /> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <!-- <a-col :span="12">--> |
| | | <!-- <a-form-model-item label="ååºäºº" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="responder">--> |
| | | <!-- <j-select-user-by-dep v-model="model.responder" placeholder="请è¾å
¥ååºäºº" ></j-select-user-by-dep>--> |
| | | <!-- </a-form-model-item>--> |
| | | <!-- </a-col>--> |
| | | <!-- <a-col :span="12">--> |
| | | <!-- <a-form-model-item label="ååºæ¶é´" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="responseTime">--> |
| | | <!-- <j-date placeholder="è¯·éæ©ååºæ¶é´" v-model="model.responseTime" :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" style="width: 100%" />--> |
| | | <!-- </a-form-model-item>--> |
| | | <!-- </a-col>--> |
| | | <!-- <a-col :span="12">--> |
| | | <!-- <a-form-model-item label="å¤ç人" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="processor">--> |
| | | <!-- <j-select-user-by-dep v-model="model.processor" placeholder="请è¾å
¥å¤ç人" ></j-select-user-by-dep>--> |
| | | <!-- </a-form-model-item>--> |
| | | <!-- </a-col>--> |
| | | <!-- <a-col :span="12">--> |
| | | <!-- <a-form-model-item label="å¤ç宿æ¶é´" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="processTime">--> |
| | | <!-- <j-date placeholder="è¯·éæ©å¤ç宿æ¶é´" v-model="model.processTime" :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" style="width: 100%" />--> |
| | | <!-- </a-form-model-item>--> |
| | | <!-- </a-col>--> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="å®ç¯ç¶æ" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="orderStatus"> |
| | | <j-dict-select-tag type="list" v-model="model.orderStatus" dictCode="order_status" placeholder="è¯·éæ©å®ç¯ç¶æ" /> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="é®é¢æè¿°" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="problemDescreption"> |
| | | <a-textarea v-model="model.problemDescreption" rows="4" placeholder="请è¾å
¥é®é¢æè¿°" /> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="å¤çç»ææè¿°" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="resolutionDescreption"> |
| | | <a-textarea v-model="model.resolutionDescreption" rows="4" placeholder="请è¾å
¥å¤çç»ææè¿°" /> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="å¤çç»æå¾ç" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="imageFiles"> |
| | | <j-image-upload isMultiple v-model="model.imageFiles" ></j-image-upload> |
| | | </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' |
| | | import JSelectFactory from '@comp/jeecgbiz/JSelectFactory.vue' |
| | | |
| | | export default { |
| | | name: 'AndonOrderForm', |
| | | components: { |
| | | JSelectFactory |
| | | }, |
| | | props: { |
| | | //表åç¦ç¨ |
| | | disabled: { |
| | | type: Boolean, |
| | | default: false, |
| | | required: false |
| | | } |
| | | }, |
| | | data () { |
| | | return { |
| | | model:{ |
| | | }, |
| | | labelCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 5 }, |
| | | }, |
| | | wrapperCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 16 }, |
| | | }, |
| | | confirmLoading: false, |
| | | validatorRules: { |
| | | factoryId: [ |
| | | { required: true, message: '产线æ¯å¿
é项', trigger: 'change' } |
| | | ], |
| | | buttonId: [ |
| | | { required: true, message: 'å®ç¯ç±»åæ¯å¿
é项', trigger: 'change' } |
| | | ], |
| | | operator: [ |
| | | { required: true, message: 'å®ç¯äººæ¯å¿
é项', trigger: 'change' } |
| | | ], |
| | | operateTime: [ |
| | | { required: true, message: 'å®ç¯æ¶é´æ¯å¿
é项', trigger: 'change' } |
| | | ], |
| | | andonLevel: [ |
| | | { required: true, message: 'å®ç¯ç级æ¯å¿
é项', trigger: 'change' } |
| | | ], |
| | | orderStatus: [ |
| | | { required: true, message: 'å®ç¯ç¶ææ¯å¿
é项', trigger: 'change' } |
| | | ], |
| | | }, |
| | | url: { |
| | | add: "/andonorder/andonOrder/add", |
| | | edit: "/andonorder/andonOrder/edit", |
| | | queryById: "/andonorder/andonOrder/queryById" |
| | | } |
| | | } |
| | | }, |
| | | computed: { |
| | | formDisabled(){ |
| | | return this.disabled |
| | | }, |
| | | }, |
| | | created () { |
| | | //å¤ä»½modelåå§å¼ |
| | | this.modelDefault = JSON.parse(JSON.stringify(this.model)); |
| | | }, |
| | | methods: { |
| | | backFactoryInfo(info) { |
| | | this.model.factoryIds = this.model.factoryId |
| | | this.nextFactoryOptions = info.map((item, index, arr) => { |
| | | let c = { label: item.text, value: item.value + '' } |
| | | return c |
| | | }) |
| | | }, |
| | | 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="å
³é"> |
| | | <andon-order-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></andon-order-form> |
| | | </j-modal> |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | import AndonOrderForm from './AndonOrderForm' |
| | | export default { |
| | | name: 'AndonOrderModal', |
| | | components: { |
| | | AndonOrderForm |
| | | }, |
| | | data () { |
| | | return { |
| | | title:'', |
| | | width:896, |
| | | 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> |
| | | <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="24"> |
| | | <a-form-model-item label="产线" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="factoryId"> |
| | | <a-row :gutter="24"> |
| | | <a-col :span="24"> |
| | | <a-form-item |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | label="" |
| | | > |
| | | <j-select-factory |
| | | :disabled="disabled" |
| | | v-model="model.factoryId" |
| | | :multi="true" |
| | | @back="backFactoryInfo" |
| | | :backProduction="true" |
| | | :treeProductOpera="true" |
| | | ></j-select-factory> |
| | | </a-form-item> |
| | | </a-col> |
| | | </a-row> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="å®ç¯ç±»å" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="buttonId"> |
| | | <j-search-select-tag v-model="model.buttonId" placeholder="请è¾å
¥å®ç¯ç±»å" |
| | | dict="andon_button_config,button_name,id"></j-search-select-tag> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="åå§ååºäºº" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="firsterResponder"> |
| | | <j-select-user-by-dep :multi="false" v-model="model.firsterResponder" placeholder="请è¾å
¥åå§ååºäºº" ></j-select-user-by-dep> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="äºçº§ååºäºº(åçº§ä¸æ¬¡)" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="secondResponder"> |
| | | <j-select-user-by-dep :multi="false" v-model="model.secondResponder" placeholder="请è¾å
¥äºçº§ååºäºº(åçº§ä¸æ¬¡)" ></j-select-user-by-dep> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="ä¸çº§ååºäºº(å级两次)" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="thirdResponder"> |
| | | <j-select-user-by-dep :multi="false" v-model="model.thirdResponder" placeholder="请è¾å
¥ä¸çº§ååºäºº(å级两次)" ></j-select-user-by-dep> |
| | | </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' |
| | | import JSelectFactory from '@comp/jeecgbiz/JSelectFactory.vue' |
| | | export default { |
| | | name: 'AndonResponseConfigForm', |
| | | components: { |
| | | JSelectFactory |
| | | }, |
| | | props: { |
| | | //表åç¦ç¨ |
| | | disabled: { |
| | | type: Boolean, |
| | | default: false, |
| | | required: false |
| | | } |
| | | }, |
| | | data () { |
| | | return { |
| | | model:{ |
| | | }, |
| | | labelCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 5 }, |
| | | }, |
| | | wrapperCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 16 }, |
| | | }, |
| | | confirmLoading: false, |
| | | validatorRules: { |
| | | factoryId: [ |
| | | { required: true, message: '产线æ¯å¿
é项', trigger: 'change' } |
| | | ], |
| | | buttonId: [ |
| | | { required: true, message: 'å®ç¯ç±»åæ¯å¿
é项', trigger: 'change' } |
| | | ], |
| | | firsterResponder: [ |
| | | { required: true, message: 'åå§ååºäººæ¯å¿
é项', trigger: 'change' } |
| | | ], |
| | | secondResponder: [ |
| | | { required: true, message: 'äºçº§ååºäººæ¯å¿
é项', trigger: 'change' } |
| | | ], |
| | | thirdResponder: [ |
| | | { required: true, message: 'ä¸çº§ååºäººæ¯å¿
é项', trigger: 'change' } |
| | | ], |
| | | }, |
| | | url: { |
| | | add: "/andonresponseconfig/andonResponseConfig/add", |
| | | edit: "/andonresponseconfig/andonResponseConfig/edit", |
| | | queryById: "/andonresponseconfig/andonResponseConfig/queryById" |
| | | } |
| | | } |
| | | }, |
| | | computed: { |
| | | formDisabled(){ |
| | | return this.disabled |
| | | }, |
| | | }, |
| | | created () { |
| | | //å¤ä»½modelåå§å¼ |
| | | this.modelDefault = JSON.parse(JSON.stringify(this.model)); |
| | | }, |
| | | methods: { |
| | | backFactoryInfo(info) { |
| | | this.model.factoryIds = this.model.factoryId |
| | | this.nextFactoryOptions = info.map((item, index, arr) => { |
| | | let c = { label: item.text, value: item.value + '' } |
| | | return c |
| | | }) |
| | | }, |
| | | 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="å
³é"> |
| | | <andon-response-config-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></andon-response-config-form> |
| | | </j-modal> |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | import AndonResponseConfigForm from './AndonResponseConfigForm' |
| | | export default { |
| | | name: 'AndonResponseConfigModal', |
| | | components: { |
| | | AndonResponseConfigForm |
| | | }, |
| | | data () { |
| | | return { |
| | | title:'', |
| | | width:896, |
| | | 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> |