¶Ô±ÈÐÂÎļþ |
| | |
| | | <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 |
| | | :md="6" |
| | | :sm="8" |
| | | > |
| | | <a-form-item label="éå
·ç¼å·"> |
| | | <j-input placeholder="请è¾å
¥éå
·ç¼å·" v-model="queryParam.toolCode" /> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col |
| | | :md="6" |
| | | :sm="8" |
| | | > |
| | | <a-form-item label="å¯ä¸ç¼ç "> |
| | | <j-input placeholder="请è¾å
¥å¯ä¸ç¼ç " v-model="queryParam.onlyCode" /> |
| | | </a-form-item> |
| | | </a-col> |
| | | |
| | | <a-col :md="6" :sm="8"> |
| | | <a-space> |
| | | <a-button type="primary" @click="searchQuery" icon="search">æ¥è¯¢</a-button> |
| | | <a-button type="primary" @click="searchReset" icon="reload">éç½®</a-button> |
| | | </a-space> |
| | | </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> |
| | | |
| | | <a-table |
| | | ref="table" |
| | | size="middle" |
| | | :scroll="{x:true}" |
| | | bordered |
| | | rowKey="id" |
| | | :columns="columns" |
| | | :dataSource="dataSource" |
| | | :pagination="ipagination" |
| | | :loading="loading" |
| | | :rowSelection="null" |
| | | class="j-table-force-nowrap" |
| | | @change="handleTableChange"> |
| | | |
| | | <span slot="action" slot-scope="text, record"> |
| | | <a @click="handleDetail(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="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> |
| | | |
| | | </a-table> |
| | | </div> |
| | | </a-card> |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | import '@/assets/less/TableExpand.less' |
| | | import { mixinDevice } from '@/utils/mixin' |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | import { getAction } from '../../api/manage' |
| | | |
| | | export default { |
| | | name: 'ToolVerificationList', |
| | | mixins:[JeecgListMixin, mixinDevice], |
| | | components: { |
| | | }, |
| | | 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: 'toolCode', |
| | | }, |
| | | { |
| | | title:'å¯ä¸ç¼ç ', |
| | | align:"center", |
| | | dataIndex: 'toolId', |
| | | }, |
| | | { |
| | | title:'éå
·åç§°', |
| | | align:"center", |
| | | dataIndex: 'toolName' |
| | | }, |
| | | { |
| | | title:'è§æ ¼', |
| | | align:"center", |
| | | dataIndex: 'model' |
| | | }, |
| | | { |
| | | title:'计éå·', |
| | | align:"center", |
| | | dataIndex: 'measureNumber' |
| | | }, |
| | | { |
| | | title:'åºä½å·', |
| | | align:"center", |
| | | dataIndex: 'warehouseCode' |
| | | }, |
| | | { |
| | | title:'䏿¬¡æ£å®æ¥æ', |
| | | align:"center", |
| | | dataIndex: 'nextVerificationDate' |
| | | }, |
| | | { |
| | | title: 'æä½', |
| | | dataIndex: 'action', |
| | | align:"center", |
| | | fixed:"right", |
| | | width:147, |
| | | scopedSlots: { customRender: 'action' } |
| | | } |
| | | ], |
| | | url: { |
| | | list: "/tms/toolVerificationRecord/list", |
| | | delete: "/tms/toolVerificationRecord/delete", |
| | | deleteBatch: "/tms/toolVerificationRecord/deleteBatch", |
| | | exportXlsUrl: "/tms/toolVerificationRecord/exportXls", |
| | | importExcelUrl: "tms/toolVerificationRecord/importExcel", |
| | | |
| | | }, |
| | | dictOptions:{}, |
| | | superFieldList:[], |
| | | } |
| | | }, |
| | | created() { |
| | | this.getSuperFieldList(); |
| | | }, |
| | | computed: { |
| | | importExcelUrl: function(){ |
| | | return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; |
| | | }, |
| | | }, |
| | | methods: { |
| | | searchReset() { |
| | | this.queryParam = {} |
| | | this.loadData(1); |
| | | }, |
| | | filterOption(input, option) { |
| | | return ( |
| | | option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0 |
| | | ); |
| | | }, |
| | | initDictConfig(){ |
| | | }, |
| | | getSuperFieldList(){ |
| | | let fieldList=[]; |
| | | fieldList.push({type:'string',value:'tenantId',text:'ç§æ·å·'}) |
| | | fieldList.push({type:'string',value:'createdBy',text:'å建人'}) |
| | | fieldList.push({type:'date',value:'createdTime',text:'å建æ¶é´'}) |
| | | fieldList.push({type:'string',value:'updatedBy',text:'æ´æ°äºº'}) |
| | | fieldList.push({type:'date',value:'updatedTime',text:'æ´æ°æ¶é´'}) |
| | | fieldList.push({type:'string',value:'onlyCode',text:'å¯ä¸ç¼ç '}) |
| | | fieldList.push({type:'string',value:'measureNumber',text:'计éå·'}) |
| | | fieldList.push({type:'date',value:'nextVerificationDate',text:'䏿¬¡æ£å®æ¥æ'}) |
| | | fieldList.push({type:'date',value:'verificationReportDate',text:'æ£å®æ¥åæ¥æ'}) |
| | | fieldList.push({type:'string',value:'personResponsible',text:'责任人'}) |
| | | fieldList.push({type:'string',value:'result',text:'æ£å®ç»æåæè§'}) |
| | | 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 |
| | | :md="6" |
| | | :sm="8" |
| | | > |
| | | <a-form-item label="éå
·ç¼å·"> |
| | | <j-input placeholder="请è¾å
¥éå
·ç¼å·" v-model="queryParam.toolCode" /> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col |
| | | :md="6" |
| | | :sm="8" |
| | | > |
| | | <a-form-item label="å¯ä¸ç¼ç "> |
| | | <j-input placeholder="请è¾å
¥å¯ä¸ç¼ç " v-model="queryParam.onlyCode" /> |
| | | </a-form-item> |
| | | </a-col> |
| | | |
| | | <a-col :md="6" :sm="8"> |
| | | <a-space> |
| | | <a-button type="primary" @click="searchQuery" icon="search">æ¥è¯¢</a-button> |
| | | <a-button type="primary" @click="searchReset" icon="reload">éç½®</a-button> |
| | | </a-space> |
| | | </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> |
| | | |
| | | <a-table |
| | | ref="table" |
| | | size="middle" |
| | | :scroll="{x:true}" |
| | | bordered |
| | | rowKey="id" |
| | | :columns="columns" |
| | | :dataSource="dataSource" |
| | | :pagination="ipagination" |
| | | :loading="loading" |
| | | :rowSelection="null" |
| | | class="j-table-force-nowrap" |
| | | @change="handleTableChange"> |
| | | |
| | | <span slot="action" slot-scope="text, record"> |
| | | <a @click="handleDetail(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="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> |
| | | |
| | | </a-table> |
| | | </div> |
| | | |
| | | <tool-verification-record-modal ref="modalForm" @ok="modalFormOk"></tool-verification-record-modal> |
| | | </a-card> |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | import '@/assets/less/TableExpand.less' |
| | | import { mixinDevice } from '@/utils/mixin' |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | import ToolVerificationRecordModal from './modules/verification/ToolVerificationRecordModal' |
| | | import { getAction } from '../../api/manage' |
| | | |
| | | export default { |
| | | name: 'ToolVerificationRecordList', |
| | | mixins:[JeecgListMixin, mixinDevice], |
| | | components: { |
| | | ToolVerificationRecordModal |
| | | }, |
| | | 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: 'toolCode', |
| | | }, |
| | | { |
| | | title:'å¯ä¸ç¼ç ', |
| | | align:"center", |
| | | dataIndex: 'toolId', |
| | | }, |
| | | { |
| | | title:'éå
·åç§°', |
| | | align:"center", |
| | | dataIndex: 'toolName' |
| | | }, |
| | | { |
| | | title:'è§æ ¼', |
| | | align:"center", |
| | | dataIndex: 'model' |
| | | }, |
| | | { |
| | | title:'计éå·', |
| | | align:"center", |
| | | dataIndex: 'measureNumber' |
| | | }, |
| | | { |
| | | title:'æ£å®æ¥åæ¥æ', |
| | | align:"center", |
| | | dataIndex: 'verificationReportDate' |
| | | }, |
| | | { |
| | | title:'æ£å®ç»æåæè§', |
| | | align:"center", |
| | | dataIndex: 'result' |
| | | }, |
| | | { |
| | | title:'责任人', |
| | | align:"center", |
| | | dataIndex: 'personResponsible' |
| | | }, |
| | | { |
| | | title:'å建人', |
| | | align:"center", |
| | | dataIndex: 'createBy' |
| | | }, |
| | | { |
| | | title:'å建æ¶é´', |
| | | align:"center", |
| | | dataIndex: 'createTime' |
| | | }, |
| | | { |
| | | title: 'æä½', |
| | | dataIndex: 'action', |
| | | align:"center", |
| | | fixed:"right", |
| | | width:147, |
| | | scopedSlots: { customRender: 'action' } |
| | | } |
| | | ], |
| | | url: { |
| | | list: "/tms/toolVerificationRecord/list", |
| | | delete: "/tms/toolVerificationRecord/delete", |
| | | deleteBatch: "/tms/toolVerificationRecord/deleteBatch", |
| | | exportXlsUrl: "/tms/toolVerificationRecord/exportXls", |
| | | importExcelUrl: "tms/toolVerificationRecord/importExcel", |
| | | |
| | | }, |
| | | dictOptions:{}, |
| | | superFieldList:[], |
| | | } |
| | | }, |
| | | created() { |
| | | this.getSuperFieldList(); |
| | | }, |
| | | computed: { |
| | | importExcelUrl: function(){ |
| | | return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; |
| | | }, |
| | | }, |
| | | methods: { |
| | | searchReset() { |
| | | this.queryParam = {} |
| | | this.loadData(1); |
| | | }, |
| | | filterOption(input, option) { |
| | | return ( |
| | | option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0 |
| | | ); |
| | | }, |
| | | initDictConfig(){ |
| | | }, |
| | | getSuperFieldList(){ |
| | | let fieldList=[]; |
| | | fieldList.push({type:'string',value:'tenantId',text:'ç§æ·å·'}) |
| | | fieldList.push({type:'string',value:'createdBy',text:'å建人'}) |
| | | fieldList.push({type:'date',value:'createdTime',text:'å建æ¶é´'}) |
| | | fieldList.push({type:'string',value:'updatedBy',text:'æ´æ°äºº'}) |
| | | fieldList.push({type:'date',value:'updatedTime',text:'æ´æ°æ¶é´'}) |
| | | fieldList.push({type:'string',value:'onlyCode',text:'å¯ä¸ç¼ç '}) |
| | | fieldList.push({type:'string',value:'measureNumber',text:'计éå·'}) |
| | | fieldList.push({type:'date',value:'nextVerificationDate',text:'䏿¬¡æ£å®æ¥æ'}) |
| | | fieldList.push({type:'date',value:'verificationReportDate',text:'æ£å®æ¥åæ¥æ'}) |
| | | fieldList.push({type:'string',value:'personResponsible',text:'责任人'}) |
| | | fieldList.push({type:'string',value:'result',text:'æ£å®ç»æåæè§'}) |
| | | this.superFieldList = fieldList |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | <style scoped> |
| | | @import '~@assets/less/common.less'; |
| | | </style> |
| | |
| | | </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 |
| | | slot="action" |
| | | slot-scope="text, record" |
| | | > |
| | | <a |
| | | href="javascript:;" |
| | | @click="handlePrint(record)" |
| | | >æå°äºç»´ç </a> |
| | | </span> |
| | | |
| | | </a-table> |
| | |
| | | |
| | | <inbound-model ref="modalForm" @ok="modalFormOk" :nodeSelected="nodeSelected"></inbound-model> |
| | | <inbound-apply-model-list ref="inboundApplyModelList"></inbound-apply-model-list> |
| | | <div id="printArea" style="display: block;"> |
| | | <div v-for="(item, index) in qrList" :key="index" class="qrcode-item"> |
| | | <p>{{ item.onlyCode }}</p> |
| | | <p>{{ item.toolName }}</p> |
| | | <img :src="item.base64" alt="QR Code"> |
| | | </div> |
| | | </div> |
| | | </a-card> |
| | | </template> |
| | | |
| | |
| | | import ParaBladeList from '.././baseTools/ParaBladeList' |
| | | import InboundModel from './InboundModel' |
| | | import InboundApplyModelList from './InboundApplyModelList.vue' |
| | | import printJS from 'print-js'; |
| | | |
| | | export default { |
| | | name: 'InboundListRight', |
| | |
| | | return !text?"":(text.length>10?text.substr(0,10):text) |
| | | } |
| | | }, |
| | | // { |
| | | // title: 'æä½', |
| | | // dataIndex: 'action', |
| | | // align:"center", |
| | | // fixed:"right", |
| | | // width:147, |
| | | // scopedSlots: { customRender: 'action' } |
| | | // } |
| | | { |
| | | title: 'æä½', |
| | | dataIndex: 'action', |
| | | align:"center", |
| | | fixed:"right", |
| | | width:147, |
| | | scopedSlots: { customRender: 'action' } |
| | | } |
| | | ], |
| | | url: { |
| | | list: "/tms/inStoreDetail/list", |
| | |
| | | exportXlsUrl: "/tms/baseTools/exportXls", |
| | | importExcelUrl: "tms/baseTools/importExcel", |
| | | queryParaByToolCode:"/tms/baseTools/queryByToolCode", |
| | | queryByToolCode:"/tms/toolsConfigProperty/queryByToolCode" |
| | | queryByToolCode:"/tms/toolsConfigProperty/queryByToolCode", |
| | | print:'/tms/inStoreDetail/print' |
| | | }, |
| | | dictOptions:{}, |
| | | superFieldList:[], |
| | | nodeSelected: {}, // å½åéä¸çèç¹æ°æ® |
| | | paraTypeFlag:'', |
| | | disableMixinCreated:true |
| | | disableMixinCreated:true, |
| | | qrList: [] |
| | | } |
| | | }, |
| | | created() { |
| | |
| | | this.$refs.paraTurningToolsList.visable = false |
| | | this.$refs.paraBladeList.visable = false |
| | | this.$refs.toolsConfigPropertyList.visable = false |
| | | }, |
| | | handlePrint(record){ |
| | | this.loading = true |
| | | getAction(this.url.print, {onlyCode:record.onlyCode}) |
| | | .then((res) => { |
| | | if (res.success) { |
| | | this.qrList = res.result.map((content, i) => ({ |
| | | onlyCode:res.result[i].onlyCode, |
| | | toolName:res.result[i].toolName, |
| | | base64: res.result[i].image |
| | | })); |
| | | this.handleBacthPrint(); |
| | | this.$emit('ok', new Date()) |
| | | } else { |
| | | this.$message.warning(res.message) |
| | | } |
| | | }) |
| | | .finally(() => { |
| | | this.loading = false |
| | | this.close() |
| | | }) |
| | | }, |
| | | // æ§è¡æå° |
| | | handleBacthPrint() { |
| | | this.$nextTick(() => { |
| | | printJS({ |
| | | printable: 'printArea', |
| | | type: 'html', |
| | | style: ` |
| | | .qrcode-item { |
| | | page-break-inside: avoid; |
| | | margin: 10px; |
| | | text-align: center; |
| | | } |
| | | img { width: 100px; height: 100px; } |
| | | `, |
| | | scanStyles: false |
| | | }); |
| | | }); |
| | | } |
| | | |
| | | }, |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <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="tenantId"> |
| | | <a-input v-model="model.tenantId" placeholder="请è¾å
¥ç§æ·å·" ></a-input> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="24"> |
| | | <a-form-model-item label="å建人" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="createdBy"> |
| | | <a-input v-model="model.createdBy" placeholder="请è¾å
¥å建人" ></a-input> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="24"> |
| | | <a-form-model-item label="å建æ¶é´" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="createdTime"> |
| | | <j-date placeholder="è¯·éæ©å建æ¶é´" v-model="model.createdTime" style="width: 100%" /> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="24"> |
| | | <a-form-model-item label="æ´æ°äºº" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="updatedBy"> |
| | | <a-input v-model="model.updatedBy" placeholder="请è¾å
¥æ´æ°äºº" ></a-input> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="24"> |
| | | <a-form-model-item label="æ´æ°æ¶é´" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="updatedTime"> |
| | | <j-date placeholder="è¯·éæ©æ´æ°æ¶é´" v-model="model.updatedTime" style="width: 100%" /> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="24"> |
| | | <a-form-model-item label="å¯ä¸ç¼ç " :labelCol="labelCol" :wrapperCol="wrapperCol" prop="onlyCode"> |
| | | <a-input v-model="model.onlyCode" placeholder="请è¾å
¥å¯ä¸ç¼ç " ></a-input> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="24"> |
| | | <a-form-model-item label="计éå·" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="measureNumber"> |
| | | <a-input v-model="model.measureNumber" placeholder="请è¾å
¥è®¡éå·" ></a-input> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="24"> |
| | | <a-form-model-item label="䏿¬¡æ£å®æ¥æ" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="nextVerificationDate"> |
| | | <j-date placeholder="è¯·éæ©ä¸æ¬¡æ£å®æ¥æ" v-model="model.nextVerificationDate" style="width: 100%" /> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="24"> |
| | | <a-form-model-item label="æ£å®æ¥åæ¥æ" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="verificationReportDate"> |
| | | <j-date placeholder="è¯·éæ©æ£å®æ¥åæ¥æ" v-model="model.verificationReportDate" style="width: 100%" /> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="24"> |
| | | <a-form-model-item label="责任人" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="personResponsible"> |
| | | <a-input v-model="model.personResponsible" placeholder="请è¾å
¥è´£ä»»äºº" ></a-input> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="24"> |
| | | <a-form-model-item label="æ£å®ç»æåæè§" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="result"> |
| | | <a-input v-model="model.result" 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: 'ToolVerificationRecordForm', |
| | | 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: { |
| | | }, |
| | | url: { |
| | | add: "/tms/toolVerificationRecord/add", |
| | | edit: "/tms/toolVerificationRecord/edit", |
| | | queryById: "/tms/toolVerificationRecord/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="å
³é"> |
| | | <tool-verification-record-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></tool-verification-record-form> |
| | | </j-modal> |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | import ToolVerificationRecordForm from './ToolVerificationRecordForm' |
| | | export default { |
| | | name: 'ToolVerificationRecordModal', |
| | | components: { |
| | | ToolVerificationRecordForm |
| | | }, |
| | | data () { |
| | | return { |
| | | title:'', |
| | | width:800, |
| | | 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> |