| | |
| | | <!-- æ¥è¯¢åºå --> |
| | | <a-form layout="inline" class="j-inline-form"> |
| | | <!-- åºå®æ¡ä»¶ --> |
| | | <a-form-item :label="(queryParamText||name)"> |
| | | <!-- <a-form-item :label="(queryParamText||name)"> |
| | | <a-input v-model="queryParam[queryParamCode||valueKey]" :placeholder="'请è¾å
¥' + (queryParamText||name)" @pressEnter="searchQuery"/> |
| | | </a-form-item> |
| | | </a-form-item> --> |
| | | <!-- 卿çæçæ¥è¯¢æ¡ä»¶ --> |
| | | <j-select-biz-query-item v-if="queryConfig.length>0" v-show="showMoreQueryItems" :queryParam="queryParam" :queryConfig="queryConfig" @pressEnter="searchQuery"/> |
| | | <j-select-biz-query-item v-if="queryConfig.length>0" :queryParam="queryParam" :queryConfig="queryConfig" @pressEnter="searchQuery"/> |
| | | <!-- æé® --> |
| | | <a-button type="primary" @click="searchQuery" icon="search">æ¥è¯¢</a-button> |
| | | <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">éç½®</a-button> |
| | | <a v-if="queryConfig.length>0" @click="showMoreQueryItems=!showMoreQueryItems" style="margin-left: 8px"> |
| | | <!-- <a v-if="queryConfig.length>0" @click="showMoreQueryItems=!showMoreQueryItems" style="margin-left: 8px"> |
| | | {{ showMoreQueryItems ? 'æ¶èµ·' : 'å±å¼' }} |
| | | <a-icon :type="showMoreQueryItems ? 'up' : 'down'"/> |
| | | </a> |
| | | </a> --> |
| | | </a-form> |
| | | |
| | | <a-table |
| | |
| | | } |
| | | }, |
| | | |
| | | searchQuery() { |
| | | this.loadData(1); |
| | | this.selectedRowKeys = [] |
| | | }, |
| | | searchReset() { |
| | | this.queryParam = {} |
| | | this.loadData(1); |
| | | this.selectedRowKeys = [] |
| | | }, |
| | | |
| | | } |
| | | } |
| | | </script> |
| | |
| | | // 夿¡ä»¶æ¥è¯¢é
ç½® |
| | | queryConfigDefault: [ |
| | | { |
| | | key: 'username', |
| | | label: 'è´¦å·', |
| | | }, |
| | | { |
| | | key: 'sex', |
| | | label: 'æ§å«', |
| | | // 妿å
å« dictCodeï¼é£ä¹å°±ä¼æ¾ç¤ºæä¸ææ¡ |
| | | dictCode: 'sex', |
| | | }, |
| | | { |
| | | key: 'birthday', |
| | | label: 'çæ¥', |
| | | placeholder: 'è¯·éæ©åºçæ¥æ', |
| | | // 妿æ³è¦ä½¿ç¨å±é¨æ³¨åçç»ä»¶ï¼å°±å¿
é¡»è¦ä½¿ç¨ç®å¤´å½æ° |
| | | customRender: ({key, queryParam, options}) => { |
| | | return <j-date {...options} vModel={queryParam[key]} style="width:180px;"/> |
| | | }, |
| | | }, |
| | | // { |
| | | // key: 'birthday', |
| | | // label: 'çæ¥', |
| | | // placeholder: 'è¯·éæ©åºçæ¥æ', |
| | | // // 妿æ³è¦ä½¿ç¨å±é¨æ³¨åçç»ä»¶ï¼å°±å¿
é¡»è¦ä½¿ç¨ç®å¤´å½æ° |
| | | // customRender: ({key, queryParam, options}) => { |
| | | // return <j-date {...options} vModel={queryParam[key]} style="width:180px;"/> |
| | | // }, |
| | | // }, |
| | | ], |
| | | } |
| | | }, |
| | |
| | | </a-row> |
| | | </template> |
| | | <script> |
| | | import UserFactory from './modules/factoryManager/UserFactory' |
| | | import UserFactory from './modules/FactoryManager/UserFactory' |
| | | import { queryFactoryTreeList, searchByKeywords, deleteByFactory } from '@/api/api' |
| | | import { httpAction, deleteAction } from '@/api/manage' |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | import FactoryModal from './modules/factoryManager/FactoryModal' |
| | | import FactoryModal from './modules/FactoryManager/FactoryModal' |
| | | |
| | | export default { |
| | | name: 'FactoryManager', |
| | |
| | | this.iExpandedKeys = expandedKeys |
| | | this.autoExpandParent = false |
| | | }, |
| | | |
| | | |
| | | batchDel: function() { |
| | | this.isIncludesNotLeaf = false |
| | | this.includesNotLeaf(this.factoryTree) |
| | |
| | | <!-- æç´¢åºå --> |
| | | <a-form layout="inline" @keyup.enter.native="searchQuery"> |
| | | <a-row :gutter="24"> |
| | | <a-col :md="12" :sm="8"> |
| | | <a-col :md="6" :sm="8"> |
| | | <a-form-item label="çç»åç§°" :labelCol="{span: 5}" :wrapperCol="{span: 18, offset: 1}"> |
| | | <a-input placeholder="" v-model="queryParam.groupName"></a-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons"> |
| | | <a-col :md="12" :sm="24"> |
| | | <a-col :md="6" :sm="24"> |
| | | <a-button type="primary" @click="searchQuery" icon="search" style="margin-left: 21px">æ¥è¯¢</a-button> |
| | | <a-button type="info" @click="searchReset" icon="reload" style="margin-left: 8px">éç½®</a-button> |
| | | </a-col> |
| | |
| | | <div class="table-page-search-wrapper"> |
| | | <a-form layout="inline" @keyup.enter.native="searchQuery"> |
| | | <a-row :gutter="24"> |
| | | <a-col :xl="4" :lg="7" :md="8" :sm="24"> |
| | | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
| | | <a-form-item label="çæ¬¡ç¼å·"> |
| | | <j-input placeholder="请è¾å
¥ç次ç¼å·" v-model="queryParam.shiftCode"></j-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :xl="4" :lg="7" :md="8" :sm="24"> |
| | | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
| | | <a-form-item label="çæ¬¡åç§°"> |
| | | <j-input placeholder="请è¾å
¥ç次åç§°" v-model="queryParam.shiftName"></j-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :xl="4" :lg="7" :md="8" :sm="24"> |
| | | <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-row :gutter="30"> |
| | | |
| | | <a-col :xl="4" :lg="7" :md="8" :sm="24"> |
| | | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
| | | <a-form-item label="ä¾åºåç¼å·"> |
| | | <j-input |
| | | placeholder="请è¾å
¥ä¾åºåç¼å·æ£ç´¢" |
| | |
| | | </a-form-item> |
| | | </a-col> |
| | | |
| | | <a-col :xl="4" :lg="7" :md="8" :sm="24"> |
| | | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
| | | <a-form-item label="ä¾åºååç§°"> |
| | | <j-input |
| | | placeholder="请è¾å
¥ä¾åºååç§°æ£ç´¢" |
| | |
| | | </a-form-item> |
| | | </a-col> |
| | | |
| | | <a-col :xl="4" :lg="7" :md="8" :sm="24"> |
| | | <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-row :gutter="30"> |
| | | |
| | | <a-col :xl="4" :lg="7" :md="8" :sm="24"> |
| | | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
| | | <a-form-item label="ä»åºç¼å·"> |
| | | <j-input |
| | | placeholder="请è¾å
¥ä»åºç¼å·æ£ç´¢" |
| | |
| | | </a-form-item> |
| | | </a-col> |
| | | |
| | | <a-col :xl="4" :lg="7" :md="8" :sm="24"> |
| | | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
| | | <a-form-item label="ä»åºåç§°"> |
| | | <j-input |
| | | placeholder="请è¾å
¥ä»åºåç§°æ£ç´¢" |
| | |
| | | </a-form-item> |
| | | </a-col> |
| | | |
| | | <a-col :xl="4" :lg="7" :md="8" :sm="24"> |
| | | <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> |
| | |
| | | :bordered="false" |
| | | title="线边åºç©æä¿¡æ¯" |
| | | > |
| | | <a-button @click="handleAdd" type="primary" icon="plus">æ°å¢ç©æä¿¡æ¯-æµè¯</a-button> |
| | | <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.materialNumber"></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.materialName"></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.materialModel"></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 placeholder="请è¾å
¥ç©æç±»å" dictCode="material_category" v-model="queryParam.materialCategory"></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> |
| | | <!-- <a-button @click="handleAdd" type="primary" icon="plus">æ°å¢ç©æä¿¡æ¯-æµè¯</a-button>--> |
| | | <a-spin :spinning="confirmLoading"> |
| | | <div> |
| | | <!-- 主表ååºå --> |
| | |
| | | defaultValue: '' |
| | | }, |
| | | { |
| | | title: 'åºåå°ID', |
| | | key: 'warehouseId', |
| | | title: 'åºåå°', |
| | | key: 'warehouseName', |
| | | type: JVXETypes.input, |
| | | width: '200px', |
| | | placeholder: '请è¾å
¥${title}', |
| | |
| | | ] |
| | | }, |
| | | url: { |
| | | //searchlikeQuery |
| | | list: '/lswmaterial/lswMaterial/list', |
| | | queryById: '/lswmaterial/lswMaterial/queryById', |
| | | lswMaterialInventory: { |
| | |
| | | console.log('test---->', this.selectedRowKeys[0]) |
| | | }, |
| | | async onSelectChange(selectedRowKeys) { |
| | | this.lswMaterialInventoryTable.loading = true |
| | | // å鿍¡å¼ä¸ï¼selectedRowKeys æ¯æ°ç»ï¼ä½é¿åº¦æå¤ä¸º1 |
| | | console.log('ç¹å»äº---->') |
| | | this.selectedRowKeys = selectedRowKeys |
| | | |
| | | this.lswMaterialInventoryTable.dataSource=[] |
| | | // è·åéä¸è¡ç宿´æ°æ® |
| | | if (selectedRowKeys.length > 0) { |
| | | const selectedId = selectedRowKeys[0] // éä¸è¡çid |
| | | const lswMaterialInventoryResult = await getAction(this.url.lswMaterialInventory.list, { 'id': selectedId }) |
| | | this.lswMaterialInventoryTable.dataSource = lswMaterialInventoryResult.result |
| | | this.lswMaterialInventoryTable.loading = 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.materialNumber"></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.materialName"></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.batchNumber"></j-input> |
| | | </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> |
| | |
| | | <!-- æä½æé®åºå --> |
| | | <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> |
| | | <!-- é«çº§æ¥è¯¢åºå --> |
| | | <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> |
| | |
| | | } |
| | | }, |
| | | { |
| | | title:'å 餿 è®°', |
| | | title:'产线', |
| | | align:"center", |
| | | dataIndex: 'delFlag' |
| | | dataIndex: 'factoryId_dictText' |
| | | }, |
| | | { |
| | | title:'产线ID', |
| | | title:'åºåå°', |
| | | align:"center", |
| | | dataIndex: 'factoryId' |
| | | }, |
| | | { |
| | | title:'åºåå°ID', |
| | | align:"center", |
| | | dataIndex: 'warehouseId' |
| | | dataIndex: 'warehouseId_dictText' |
| | | }, |
| | | { |
| | | title:'ç©æç¼ç ', |
| | |
| | | align:"center", |
| | | dataIndex: 'receiveTime' |
| | | }, |
| | | { |
| | | 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: "/lswmaterialinbound/lswMaterialInbound/list", |
| | |
| | | deleteBatch: "/lswmaterialinbound/lswMaterialInbound/deleteBatch", |
| | | exportXlsUrl: "/lswmaterialinbound/lswMaterialInbound/exportXls", |
| | | importExcelUrl: "lswmaterialinbound/lswMaterialInbound/importExcel", |
| | | |
| | | }, |
| | | dictOptions:{}, |
| | | superFieldList:[], |
| | |
| | | }, |
| | | methods: { |
| | | initDictConfig(){ |
| | | |
| | | }, |
| | | getSuperFieldList(){ |
| | | let fieldList=[]; |
| | |
| | | <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.materialNumber"></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.materialName"></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.batchNumber"></j-input> |
| | | </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> |
| | |
| | | <!-- æä½æé®åºå --> |
| | | <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> |
| | | <!-- é«çº§æ¥è¯¢åºå --> |
| | | <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> |
| | |
| | | } |
| | | }, |
| | | { |
| | | title:'å 餿 è®°', |
| | | align:"center", |
| | | dataIndex: 'delFlag' |
| | | }, |
| | | { |
| | | title:'ç©æç¼ç ', |
| | | align:"center", |
| | | dataIndex: 'materialNumber' |
| | |
| | | dataIndex: 'materialName' |
| | | }, |
| | | { |
| | | title:'产线ID', |
| | | title:'产线', |
| | | align:"center", |
| | | dataIndex: 'factoryId' |
| | | dataIndex: 'factoryId_dictText' |
| | | }, |
| | | { |
| | | title:'æ¹æ¬¡å·', |
| | |
| | | dataIndex: 'quantity' |
| | | }, |
| | | { |
| | | title:'å·¥åID', |
| | | title:'å·¥å', |
| | | align:"center", |
| | | dataIndex: 'workOrderId' |
| | | }, |
| | |
| | | }, |
| | | data() { |
| | | return { |
| | | warehouseColOptions: [], |
| | | labelCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 5 }, |
| | |
| | | }, |
| | | // æ°å¢æ¶å表é»è®¤æ·»å å è¡ç©ºæ°æ® |
| | | addDefaultRowNum: 1, |
| | | validatorRules: { |
| | | }, |
| | | refKeys: ['lswMaterialInventory', ], |
| | | tableKeys:['lswMaterialInventory', ], |
| | | activeKey: 'lswMaterialInventory', |
| | |
| | | loading: false, |
| | | dataSource: [], |
| | | columns: [ |
| | | { |
| | | title: 'ç©æID', |
| | | key: 'materialId', |
| | | type: JVXETypes.input, |
| | | width:"200px", |
| | | placeholder: '请è¾å
¥${title}', |
| | | defaultValue:'', |
| | | }, |
| | | { |
| | | title: 'æ¹æ¬¡å·', |
| | | key: 'batchNumber', |
| | |
| | | { |
| | | title: 'åºåç±»å', |
| | | key: 'inventoryCategory', |
| | | type: JVXETypes.input, |
| | | type: JVXETypes.select, |
| | | width:"200px", |
| | | placeholder: '请è¾å
¥${title}', |
| | | placeholder: 'è¯·éæ©${title}', |
| | | defaultValue:'', |
| | | options:[], |
| | | dictCode: 'inventoryCategory' |
| | | }, |
| | | { |
| | | title: 'æ°é', |
| | |
| | | defaultValue:'', |
| | | }, |
| | | { |
| | | title: 'åºåå°ID', |
| | | title: 'åºåå°', |
| | | key: 'warehouseId', |
| | | type: JVXETypes.input, |
| | | width:"200px", |
| | | placeholder: '请è¾å
¥${title}', |
| | | defaultValue:'', |
| | | type: JVXETypes.select, |
| | | width: "200px", |
| | | options: this.warehouseColOptions, |
| | | }, |
| | | { |
| | | title: 'åºåç¶æ', |
| | | key: 'inventoryStatus', |
| | | type: JVXETypes.input, |
| | | type: JVXETypes.select, |
| | | width:"200px", |
| | | placeholder: '请è¾å
¥${title}', |
| | | defaultValue:'', |
| | | options:[], |
| | | dictCode: 'inventory_status' |
| | | }, |
| | | ] |
| | | }, |
| | | validatorRules: { |
| | | materialNumber: [ |
| | | { required: true, message: 'ç©æç¼ç æ¯å¿
é项', trigger: 'change' } |
| | | ], |
| | | materialName: [ |
| | | { required: true, message: 'ç©æåç§°æ¯å¿
é项', trigger: 'change' } |
| | | ], |
| | | materialModel: [ |
| | | { required: true, message: 'ç©æåå·æ¯å¿
é项', trigger: 'change' } |
| | | ], |
| | | materialCategory: [ |
| | | { required: true, message: 'ç©æç±»åæ¯å¿
é项', trigger: 'change' } |
| | | ], |
| | | materialUnit: [ |
| | | { required: true, message: 'å使¯å¿
é项', trigger: 'change' } |
| | | ], |
| | | }, |
| | | url: { |
| | | add: "/lswmaterial/lswMaterial/add", |
| | | edit: "/lswmaterial/lswMaterial/edit", |
| | | queryById: "/lswmaterial/lswMaterial/queryById", |
| | | warehouseList:"/base/lineSideWarehouse/list", |
| | | lswMaterialInventory: { |
| | | list: '/lswmaterial/lswMaterial/queryLswMaterialInventoryByMainId' |
| | | }, |
| | |
| | | }, |
| | | }, |
| | | created () { |
| | | this.loadWarehouseOptions(); |
| | | }, |
| | | methods: { |
| | | async loadWarehouseOptions() { |
| | | try { |
| | | const res = await getAction(this.url.warehouseList); |
| | | console.log("ä»åºAPIååº:", res); |
| | | let data = []; |
| | | data = res.result.records; |
| | | console.log("å¤çåçä»åºæ°æ®:", data); |
| | | const options = data.map(item => ({ |
| | | text: item.warehouseName || `ä»åº(${item.id})`, // æ¾ç¤ºææ¬ |
| | | value: item.id // å®é
å¼ |
| | | })); |
| | | console.log("æ ¼å¼ååçé项:", options); |
| | | const warehouseCol = this.lswMaterialInventoryTable.columns.find( |
| | | col => col.key === 'warehouseId' |
| | | ); |
| | | if (warehouseCol) { |
| | | this.$set(warehouseCol, 'options', options); |
| | | this.warehouseColOptions = warehouseCol.options |
| | | console.log("æ´æ°åçåé项:", warehouseCol.options); |
| | | } |
| | | this.$nextTick(() => { |
| | | this.$forceUpdate(); |
| | | console.log("å·²å¼ºå¶æ´æ°è§å¾"); |
| | | }); |
| | | } catch (error) { |
| | | console.error('å è½½ä»åºå表失败:', error); |
| | | } |
| | | }, |
| | | addBefore(){ |
| | | this.lswMaterialInventoryTable.dataSource=[] |
| | | }, |
| | |
| | | <j-form-container :disabled="formDisabled"> |
| | | <a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail"> |
| | | <a-row> |
| | | <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 :span="12"> |
| | | <a-form-model-item label="å 餿 è®°" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="delFlag"> |
| | | <a-input-number v-model="model.delFlag" placeholder="请è¾å
¥å 餿 è®°" style="width: 100%" /> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="产线ID" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="factoryId"> |
| | | <a-input v-model="model.factoryId" placeholder="请è¾å
¥äº§çº¿ID" ></a-input> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="åºåå°ID" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="warehouseId"> |
| | | <a-input v-model="model.warehouseId" placeholder="请è¾å
¥åºåå°ID" ></a-input> |
| | | <a-form-model-item label="åºåå°" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="warehouseId"> |
| | | <j-search-select-tag v-model="model.warehouseId" placeholder="è¯·éæ©åºåå°" |
| | | dict="base_line_side_warehouse,warehouse_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="materialNumber"> |
| | | <a-input v-model="model.materialNumber" placeholder="请è¾å
¥ç©æç¼ç " ></a-input> |
| | | <a-input v-model="model.materialNumber" placeholder="请è¾å
¥ç©æç¼ç "></a-input> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="ç©æåç§°" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="materialName"> |
| | | <a-input v-model="model.materialName" placeholder="请è¾å
¥ç©æåç§°" ></a-input> |
| | | <a-input v-model="model.materialName" placeholder="请è¾å
¥ç©æåç§°"></a-input> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="æ¹æ¬¡å·" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="batchNumber"> |
| | | <a-input v-model="model.batchNumber" placeholder="请è¾å
¥æ¹æ¬¡å·" ></a-input> |
| | | <a-input v-model="model.batchNumber" placeholder="请è¾å
¥æ¹æ¬¡å·"></a-input> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="æ¥æ¶äºº" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="receiver"> |
| | | <a-input v-model="model.receiver" placeholder="请è¾å
¥æ¥æ¶äºº" ></a-input> |
| | | <j-select-user-by-dep v-model="model.receiver" 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="receiveTime"> |
| | | <j-date placeholder="è¯·éæ©æ¥æ¶æ¶é´" v-model="model.receiveTime" :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" style="width: 100%" /> |
| | | <j-date placeholder="è¯·éæ©æ¥æ¶æ¶é´" v-model="model.receiveTime" :show-time="true" |
| | | date-format="YYYY-MM-DD HH:mm:ss" style="width: 100%" /> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | |
| | | |
| | | <script> |
| | | |
| | | import { httpAction, getAction } from '@/api/manage' |
| | | import { validateDuplicateValue } from '@/utils/util' |
| | | import { httpAction, getAction } from '@/api/manage' |
| | | import { validateDuplicateValue } from '@/utils/util' |
| | | import JDate from '@/components/jeecg/JDate' |
| | | import pick from 'lodash.pick' |
| | | import moment from 'moment' |
| | | import { duplicateCheck } from '@/api/api'//é夿 ¡éª |
| | | import JTreeDict from '@/components/jeecg/JTreeDict'//åç±»åå
¸æ 形䏿ç»ä»¶ |
| | | import JSelectFactory from '../../../../src/components/jeecgbiz/JSelectFactory.vue' |
| | | |
| | | export default { |
| | | name: 'LswMaterialInboundForm', |
| | | components: { |
| | | }, |
| | | props: { |
| | | //表åç¦ç¨ |
| | | disabled: { |
| | | type: Boolean, |
| | | default: false, |
| | | required: false |
| | | export default { |
| | | name: 'LswMaterialInboundForm', |
| | | components: { |
| | | JDate, |
| | | JTreeDict, |
| | | 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' } |
| | | ], |
| | | warehouseId: [ |
| | | { required: true, message: 'åºåå°æ¯å¿
é项', trigger: 'change' } |
| | | ], |
| | | materialNumber: [ |
| | | { required: true, message: 'ç©æç¼ç æ¯å¿
é项', trigger: 'change' } |
| | | ], |
| | | materialName: [ |
| | | { required: true, message: 'ç©æåç§°æ¯å¿
é项', trigger: 'change' } |
| | | ], |
| | | batchNumber: [ |
| | | { required: true, message: 'æ¹æ¬¡å·æ¯å¿
é项', trigger: 'change' } |
| | | ], |
| | | quantity: [ |
| | | { required: true, message: 'å
¥åºæ°éæ¯å¿
é项', trigger: 'change' } |
| | | ], |
| | | receiver: [ |
| | | { required: true, message: 'æ¥æ¶äººæ¯å¿
é项', trigger: 'change' } |
| | | ], |
| | | receiveTime: [ |
| | | { required: true, message: 'æ¥æ¶æ¶é´æ¯å¿
é项', trigger: 'change' } |
| | | ] |
| | | }, |
| | | url: { |
| | | add: '/lswmaterialinbound/lswMaterialInbound/add', |
| | | edit: '/lswmaterialinbound/lswMaterialInbound/edit', |
| | | queryById: '/lswmaterialinbound/lswMaterialInbound/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 |
| | | }) |
| | | }, |
| | | data () { |
| | | return { |
| | | model:{ |
| | | }, |
| | | labelCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 5 }, |
| | | }, |
| | | wrapperCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 16 }, |
| | | }, |
| | | confirmLoading: false, |
| | | validatorRules: { |
| | | }, |
| | | url: { |
| | | add: "/lswmaterialinbound/lswMaterialInbound/add", |
| | | edit: "/lswmaterialinbound/lswMaterialInbound/edit", |
| | | queryById: "/lswmaterialinbound/lswMaterialInbound/queryById" |
| | | } |
| | | } |
| | | add() { |
| | | this.edit(this.modelDefault) |
| | | }, |
| | | computed: { |
| | | formDisabled(){ |
| | | return this.disabled |
| | | }, |
| | | edit(record) { |
| | | this.model = Object.assign({}, record) |
| | | this.visible = true |
| | | }, |
| | | 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; |
| | | }) |
| | | 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> |
| | |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="æ°é" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="quantity"> |
| | | <a-input v-model="model.quantity" placeholder="请è¾å
¥æ°é" ></a-input> |
| | | <a-input-number v-model="model.quantity" placeholder="请è¾å
¥æ°é" ></a-input-number> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | |
| | | <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="delFlag"> |
| | | <a-input-number v-model="model.delFlag" placeholder="请è¾å
¥å 餿 è®°" style="width: 100%" /> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <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 :span="12"> |
| | | <a-form-model-item label="ç©æç¼ç " :labelCol="labelCol" :wrapperCol="wrapperCol" prop="materialNumber"> |
| | | <a-input v-model="model.materialNumber" placeholder="请è¾å
¥ç©æç¼ç " ></a-input> |
| | |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="产线ID" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="factoryId"> |
| | | <a-input v-model="model.factoryId" placeholder="请è¾å
¥äº§çº¿ID" ></a-input> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="æ¹æ¬¡å·" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="batchNumber"> |
| | | <a-input v-model="model.batchNumber" placeholder="请è¾å
¥æ¹æ¬¡å·" ></a-input> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="åºåºäºº" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="outboundStaff"> |
| | | <a-input v-model="model.outboundStaff" placeholder="请è¾å
¥åºåºäºº" ></a-input> |
| | | <j-select-user-by-dep v-model="model.outboundStaff" placeholder="请è¾å
¥åºåºäºº" ></j-select-user-by-dep> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="åºåºæ°é" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="quantity"> |
| | | <a-input v-model="model.quantity" placeholder="请è¾å
¥åºåºæ°é" ></a-input> |
| | | <a-input-number v-model="model.quantity" placeholder="请è¾å
¥åºåºæ°é" ></a-input-number> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | |
| | | |
| | | import { httpAction, getAction } from '@/api/manage' |
| | | import { validateDuplicateValue } from '@/utils/util' |
| | | import JTreeDict from '@/components/jeecg/JTreeDict'//åç±»åå
¸æ 形䏿ç»ä»¶ |
| | | import JSelectFactory from '../../../../src/components/jeecgbiz/JSelectFactory.vue' |
| | | import JDate from '@/components/jeecg/JDate' |
| | | |
| | | export default { |
| | | name: 'LswMaterialOutboundForm', |
| | | components: { |
| | | JDate, |
| | | JTreeDict, |
| | | JSelectFactory |
| | | }, |
| | | props: { |
| | | //表åç¦ç¨ |
| | |
| | | }, |
| | | confirmLoading: false, |
| | | validatorRules: { |
| | | factoryId: [ |
| | | { required: true, message: '产线æ¯å¿
é项', trigger: 'change' } |
| | | ], |
| | | materialNumber: [ |
| | | { required: true, message: 'ç©æç¼ç æ¯å¿
é项', trigger: 'change' } |
| | | ], |
| | | materialName: [ |
| | | { required: true, message: 'ç©æåç§°æ¯å¿
é项', trigger: 'change' } |
| | | ], |
| | | batchNumber: [ |
| | | { required: true, message: 'æ¹æ¬¡å·æ¯å¿
é项', trigger: 'change' } |
| | | ], |
| | | quantity: [ |
| | | { required: true, message: 'åºåºæ°éæ¯å¿
é项', trigger: 'change' } |
| | | ], |
| | | outboundStaff: [ |
| | | { required: true, message: 'åºåºäººæ¯å¿
é项', trigger: 'change' } |
| | | ], |
| | | outboundTime: [ |
| | | { required: true, message: 'åºåºæ¶é´æ¯å¿
é项', trigger: 'change' } |
| | | ], |
| | | workOrderId:[ |
| | | { required: true, message: '工忝å¿
é项', trigger: 'change' } |
| | | ], |
| | | }, |
| | | url: { |
| | | add: "/lswmaterialoutbound/lswMaterialOutbound/add", |
| | |
| | | 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); |
| | | }, |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <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.materialNumber"></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.materialName"></j-input> |
| | | </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> |
| | | <!-- é«çº§æ¥è¯¢åºå --> |
| | | <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: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> |
| | | |
| | | <pms-material-process-modal ref="modalForm" @ok="modalFormOk"></pms-material-process-modal> |
| | | </a-card> |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | import '@/assets/less/TableExpand.less' |
| | | import { mixinDevice } from '@/utils/mixin' |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | import PmsMaterialProcessModal from './modules/PmsMaterialProcessModal' |
| | | |
| | | export default { |
| | | name: 'PmsMaterialProcessList', |
| | | mixins:[JeecgListMixin, mixinDevice], |
| | | components: { |
| | | PmsMaterialProcessModal |
| | | }, |
| | | 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: 'materialNumber' |
| | | }, |
| | | { |
| | | title:'ç©æåç§°', |
| | | align:"center", |
| | | dataIndex: 'materialName' |
| | | }, |
| | | { |
| | | title:'产线ID(SAPå·¥ä½ä¸å¿)', |
| | | align:"center", |
| | | dataIndex: 'factoryId_dictText' |
| | | }, |
| | | { |
| | | title:'å·¥åºå·', |
| | | align:"center", |
| | | dataIndex: 'processCode' |
| | | }, |
| | | { |
| | | title:'å·¥åºåç§°', |
| | | align:"center", |
| | | dataIndex: 'processName' |
| | | }, |
| | | { |
| | | title:'æ§å¶ç ', |
| | | align:"center", |
| | | dataIndex: 'controlCode' |
| | | }, |
| | | { |
| | | title: 'æä½', |
| | | dataIndex: 'action', |
| | | align:"center", |
| | | fixed:"right", |
| | | width:147, |
| | | scopedSlots: { customRender: 'action' } |
| | | } |
| | | ], |
| | | url: { |
| | | list: "/pms/pmsMaterialProcess/list", |
| | | delete: "/pms/pmsMaterialProcess/delete", |
| | | deleteBatch: "/pms/pmsMaterialProcess/deleteBatch", |
| | | exportXlsUrl: "/pms/pmsMaterialProcess/exportXls", |
| | | importExcelUrl: "pms/pmsMaterialProcess/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:'materialNumber',text:'ç©æç¼ç ',dictCode:''}) |
| | | fieldList.push({type:'string',value:'materialName',text:'ç©æåç§°',dictCode:''}) |
| | | fieldList.push({type:'string',value:'factoryId',text:'产线ID(SAPå·¥ä½ä¸å¿)',dictCode:''}) |
| | | fieldList.push({type:'string',value:'processCode',text:'å·¥åºå·',dictCode:''}) |
| | | fieldList.push({type:'string',value:'processName',text:'å·¥åºåç§°',dictCode:''}) |
| | | fieldList.push({type:'string',value:'controlCode',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-row :gutter="24"> |
| | | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
| | | <a-form-item label="ç©æç¼ç "> |
| | | <j-input placeholder="请è¾å
¥ç©æç¼ç " v-model="queryParam.materialNumber"></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.materialName"></j-input> |
| | | </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-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> |
| | | <!-- é«çº§æ¥è¯¢åºå --> |
| | | <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: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> |
| | | |
| | | <pms-process-bill-materials-detail-modal ref="modalForm" @ok="modalFormOk"></pms-process-bill-materials-detail-modal> |
| | | </a-card> |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | import '@/assets/less/TableExpand.less' |
| | | import { mixinDevice } from '@/utils/mixin' |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | import PmsProcessBillMaterialsDetailModal from './modules/PmsProcessBillMaterialsDetailModal' |
| | | |
| | | export default { |
| | | name: 'PmsProcessBillMaterialsDetailList', |
| | | mixins:[JeecgListMixin, mixinDevice], |
| | | components: { |
| | | PmsProcessBillMaterialsDetailModal |
| | | }, |
| | | 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: 'materialId_dictText' |
| | | }, |
| | | { |
| | | title:'ç©æç¼ç ', |
| | | align:"center", |
| | | dataIndex: 'materialNumber' |
| | | }, |
| | | { |
| | | title:'ç©æåç§°', |
| | | align:"center", |
| | | dataIndex: 'materialName' |
| | | }, |
| | | { |
| | | title:'éæ±ç¨é', |
| | | align:"center", |
| | | dataIndex: 'usageUnit' |
| | | }, |
| | | { |
| | | title: 'æä½', |
| | | dataIndex: 'action', |
| | | align:"center", |
| | | fixed:"right", |
| | | width:147, |
| | | scopedSlots: { customRender: 'action' } |
| | | } |
| | | ], |
| | | url: { |
| | | list: "/pms/pmsProcessBillMaterialsDetail/list", |
| | | delete: "/pms/pmsProcessBillMaterialsDetail/delete", |
| | | deleteBatch: "/pms/pmsProcessBillMaterialsDetail/deleteBatch", |
| | | exportXlsUrl: "/pms/pmsProcessBillMaterialsDetail/exportXls", |
| | | importExcelUrl: "pms/pmsProcessBillMaterialsDetail/importExcel", |
| | | |
| | | }, |
| | | dictOptions:{}, |
| | | superFieldList:[], |
| | | } |
| | | }, |
| | | created() { |
| | | this.getSuperFieldList(); |
| | | }, |
| | | computed: { |
| | | importExcelUrl: function(){ |
| | | return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; |
| | | }, |
| | | }, |
| | | methods: { |
| | | initDictConfig(){ |
| | | }, |
| | | getSuperFieldList(){ |
| | | let fieldList=[]; |
| | | fieldList.push({type:'string',value:'materialId',text:'çäº§ç©æID',dictCode:''}) |
| | | fieldList.push({type:'string',value:'materialNumber',text:'ç©æç¼ç ',dictCode:''}) |
| | | fieldList.push({type:'string',value:'materialName',text:'ç©æåç§°',dictCode:''}) |
| | | fieldList.push({type:'double',value:'usageUnit',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-input placeholder="请è¾å
¥ç©æç¼ç " v-model="queryParam.materialNumber"></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.materialName"></j-input> |
| | | </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> |
| | | <!-- é«çº§æ¥è¯¢åºå --> |
| | | <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: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> |
| | | <span slot="figureNum" slot-scope="text, record"> |
| | | <span v-if="record.materialNumber == null || '' == record.materialNumber">æ æ°æ®</span> |
| | | <span v-else> |
| | | <a-popover placement="top" :title="'ç©æåºæ¬ä¿¡æ¯:'" arrow-point-at-center> |
| | | <template slot="content"> |
| | | </template> |
| | | <a-button class="fontweight" style="font-weight: bold;color: inherit;" @click="handleMaterialClick(record)"> |
| | | {{ record.materialNumber }} |
| | | </a-button> |
| | | </a-popover> |
| | | </span> |
| | | </span> |
| | | </a-table> |
| | | </div> |
| | | |
| | | <pms-process-bill-materials-modal ref="modalForm" @ok="modalFormOk"></pms-process-bill-materials-modal> |
| | | <PmsProcessBillMaterialsDetailModal ref="PmsProcessBillMaterialsDetailModal"></PmsProcessBillMaterialsDetailModal> |
| | | </a-card> |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | import '@/assets/less/TableExpand.less' |
| | | import { mixinDevice } from '@/utils/mixin' |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | import PmsProcessBillMaterialsModal from './modules/PmsProcessBillMaterialsModal' |
| | | import PmsProcessBillMaterialsDetailModal from './modules/PmsProcessBillMaterialsDetailModal.vue' |
| | | import { getAction } from '@api/manage' |
| | | |
| | | export default { |
| | | name: 'PmsProcessBillMaterialsList', |
| | | mixins:[JeecgListMixin, mixinDevice], |
| | | components: { |
| | | PmsProcessBillMaterialsModal, |
| | | PmsProcessBillMaterialsDetailModal |
| | | }, |
| | | data () { |
| | | return { |
| | | description: '订åBOM管ç页é¢', |
| | | // 表头 |
| | | columns: [ |
| | | { |
| | | title: '#', |
| | | dataIndex: '', |
| | | key:'rowIndex', |
| | | width:60, |
| | | align:"center", |
| | | customRender:function (t,r,index) { |
| | | return parseInt(index)+1; |
| | | } |
| | | }, |
| | | { |
| | | title:'çæè®¢åID', |
| | | align:"center", |
| | | dataIndex: 'orderId' |
| | | }, |
| | | { |
| | | title:'ç©æç¼ç ', |
| | | align:"center", |
| | | dataIndex: 'materialNumber', |
| | | defaultSortOrder: 'descend', |
| | | scopedSlots: { customRender: 'figureNum', }, |
| | | }, |
| | | { |
| | | title:'ç©æåç§°', |
| | | align:"center", |
| | | dataIndex: 'materialName' |
| | | }, |
| | | { |
| | | title:'BOM代ç ', |
| | | align:"center", |
| | | dataIndex: 'billMaterialsCode' |
| | | }, |
| | | { |
| | | title:'åºæ¬åä½', |
| | | align:"center", |
| | | dataIndex: 'productionUnit' |
| | | }, |
| | | { |
| | | title:'è®¢åæ°é', |
| | | align:"center", |
| | | dataIndex: 'productionQuantity' |
| | | }, |
| | | { |
| | | title: 'æä½', |
| | | dataIndex: 'action', |
| | | align:"center", |
| | | fixed:"right", |
| | | width:147, |
| | | scopedSlots: { customRender: 'action' } |
| | | } |
| | | ], |
| | | url: { |
| | | list: "/pmsprocessbillmaterials/pmsProcessBillMaterials/list", |
| | | delete: "/pmsprocessbillmaterials/pmsProcessBillMaterials/delete", |
| | | deleteBatch: "/pmsprocessbillmaterials/pmsProcessBillMaterials/deleteBatch", |
| | | exportXlsUrl: "/pmsprocessbillmaterials/pmsProcessBillMaterials/exportXls", |
| | | importExcelUrl: "pmsprocessbillmaterials/pmsProcessBillMaterials/importExcel", |
| | | queryByMaterialId:'/pms/pmsProcessBillMaterialsDetail/queryByMaterialId' |
| | | }, |
| | | dictOptions:{}, |
| | | superFieldList:[], |
| | | } |
| | | }, |
| | | created() { |
| | | this.getSuperFieldList(); |
| | | }, |
| | | computed: { |
| | | importExcelUrl: function(){ |
| | | return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; |
| | | }, |
| | | }, |
| | | methods: { |
| | | handleMaterialClick(record){ |
| | | console.log('record----->',record) |
| | | getAction(this.url.queryByMaterialId,{'materialId':record.id}).then(res=>{ |
| | | if(res.success){ |
| | | this.$refs.PmsProcessBillMaterialsDetailModal.edit(res.result); |
| | | this.$refs.PmsProcessBillMaterialsDetailModal.title="ç©ææ¸
å"; |
| | | this.$refs.PmsProcessBillMaterialsDetailModal.disableSubmit = true; |
| | | }else{ |
| | | this.$message.error('没æ¥å°æ°æ®ï¼è¯·è系管çå') |
| | | } |
| | | }) |
| | | }, |
| | | initDictConfig(){ |
| | | }, |
| | | getSuperFieldList(){ |
| | | let fieldList=[]; |
| | | fieldList.push({type:'int',value:'delFlag',text:'å 餿 è®°',dictCode:''}) |
| | | fieldList.push({type:'string',value:'orderId',text:'çæè®¢åID',dictCode:''}) |
| | | fieldList.push({type:'string',value:'materialNumber',text:'ç©æç¼ç ',dictCode:''}) |
| | | fieldList.push({type:'string',value:'materialName',text:'ç©æåç§°',dictCode:''}) |
| | | fieldList.push({type:'string',value:'billMaterialsCode',text:'BOM代ç ',dictCode:''}) |
| | | fieldList.push({type:'string',value:'productionUnit',text:'åºæ¬åä½',dictCode:''}) |
| | | fieldList.push({type:'double',value:'productionQuantity',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="materialNumber"> |
| | | <a-input v-model="model.materialNumber" placeholder="请è¾å
¥ç©æç¼ç " ></a-input> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="ç©æåç§°" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="materialName"> |
| | | <a-input v-model="model.materialName" placeholder="请è¾å
¥ç©æåç§°" ></a-input> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="产线ID(SAPå·¥ä½ä¸å¿)" :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="processCode"> |
| | | <a-input v-model="model.processCode" placeholder="请è¾å
¥å·¥åºå·" ></a-input> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="å·¥åºåç§°" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="processName"> |
| | | <a-input v-model="model.processName" placeholder="请è¾å
¥å·¥åºåç§°" ></a-input> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="æ§å¶ç " :labelCol="labelCol" :wrapperCol="wrapperCol" prop="controlCode"> |
| | | <a-input v-model="model.controlCode" 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' |
| | | import JSelectFactory from '@comp/jeecgbiz/JSelectFactory.vue' |
| | | import JTreeDict from '@/components/jeecg/JTreeDict'//åç±»åå
¸æ 形䏿ç»ä»¶ |
| | | |
| | | export default { |
| | | name: 'PmsMaterialProcessForm', |
| | | components: { |
| | | JSelectFactory, |
| | | JTreeDict |
| | | }, |
| | | 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' } |
| | | ], |
| | | materialNumber: [ |
| | | { required: true, message: 'ç©æç¼ç æ¯å¿
é项', trigger: 'change' } |
| | | ], |
| | | materialName: [ |
| | | { required: true, message: 'ç©æåç§°æ¯å¿
é项', trigger: 'change' } |
| | | ], |
| | | processCode: [ |
| | | { required: true, message: 'å·¥åºå·æ¯å¿
é项', trigger: 'change' } |
| | | ], |
| | | processName: [ |
| | | { required: true, message: 'å·¥åºåç§°æ¯å¿
é项', trigger: 'change' } |
| | | ], |
| | | }, |
| | | url: { |
| | | add: "/pms/pmsMaterialProcess/add", |
| | | edit: "/pms/pmsMaterialProcess/edit", |
| | | queryById: "/pms/pmsMaterialProcess/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="å
³é"> |
| | | <pms-material-process-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></pms-material-process-form> |
| | | </j-modal> |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | import PmsMaterialProcessForm from './PmsMaterialProcessForm' |
| | | export default { |
| | | name: 'PmsMaterialProcessModal', |
| | | components: { |
| | | PmsMaterialProcessForm |
| | | }, |
| | | 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="12"> |
| | | <a-form-model-item label="çäº§ç©æID" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="materialId"> |
| | | <j-search-select-tag v-model="model.materialId" placeholder="请è¾å
¥çäº§ç©æID" dict="pms_process_bill_materials,material_number,id" @change="handleMaterialChange"></j-search-select-tag> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="ç©æç¼ç " :labelCol="labelCol" :wrapperCol="wrapperCol" prop="materialNumber"> |
| | | <a-input v-model="model.materialNumber" placeholder="请è¾å
¥ç©æç¼ç " ></a-input> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="ç©æåç§°" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="materialName"> |
| | | <a-input v-model="model.materialName" placeholder="请è¾å
¥ç©æåç§°" ></a-input> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="éæ±ç¨é" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="usageUnit"> |
| | | <a-input-number v-model="model.usageUnit" placeholder="请è¾å
¥éæ±ç¨é" style="width: 100%" /> |
| | | </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: 'PmsProcessBillMaterialsDetailForm', |
| | | 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: { |
| | | materialId: [ |
| | | { required: true, message: 'çäº§ç©æIDæ¯å¿
é项', trigger: 'change' } |
| | | ], |
| | | materialNumber: [ |
| | | { required: true, message: 'ç©æç¼ç æ¯å¿
é项', trigger: 'change' } |
| | | ], |
| | | materialName: [ |
| | | { required: true, message: 'ç©æåç§°æ¯å¿
é项', trigger: 'change' } |
| | | ], |
| | | usageUnit: [ |
| | | { required: true, message: 'éæ±ç¨éæ¯å¿
é项', trigger: 'change' } |
| | | ], |
| | | }, |
| | | url: { |
| | | add: "/pms/pmsProcessBillMaterialsDetail/add", |
| | | edit: "/pms/pmsProcessBillMaterialsDetail/edit", |
| | | queryById: "/pms/pmsProcessBillMaterialsDetail/queryById", |
| | | queryPmsProcessBillMaterials:"/pmsprocessbillmaterials/pmsProcessBillMaterials/queryById" |
| | | } |
| | | } |
| | | }, |
| | | computed: { |
| | | formDisabled(){ |
| | | return this.disabled |
| | | }, |
| | | }, |
| | | created () { |
| | | //å¤ä»½modelåå§å¼ |
| | | this.modelDefault = JSON.parse(JSON.stringify(this.model)); |
| | | }, |
| | | methods: { |
| | | async handleMaterialChange(value){ |
| | | console.log('value---->',value) |
| | | this.confirmLoading = true |
| | | const res = await getAction(this.url.queryPmsProcessBillMaterials,{'id':value}) |
| | | console.log('res.result---->',res.result) |
| | | this.model.materialNumber = res.result.materialNumber |
| | | this.model.materialName = res.result.materialName |
| | | this.confirmLoading = false |
| | | }, |
| | | 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="å
³é"> |
| | | <pms-process-bill-materials-detail-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></pms-process-bill-materials-detail-form> |
| | | </j-modal> |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | import PmsProcessBillMaterialsDetailForm from './PmsProcessBillMaterialsDetailForm' |
| | | export default { |
| | | name: 'PmsProcessBillMaterialsDetailModal', |
| | | components: { |
| | | PmsProcessBillMaterialsDetailForm |
| | | }, |
| | | 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="12"> |
| | | <a-form-model-item label="çæè®¢å" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="orderId"> |
| | | <a-input v-model="model.orderId" placeholder="请è¾å
¥çæè®¢åID" ></a-input> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="ç©æç¼ç " :labelCol="labelCol" :wrapperCol="wrapperCol" prop="materialNumber"> |
| | | <a-input v-model="model.materialNumber" placeholder="请è¾å
¥ç©æç¼ç " ></a-input> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="ç©æåç§°" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="materialName"> |
| | | <a-input v-model="model.materialName" placeholder="请è¾å
¥ç©æåç§°" ></a-input> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="BOM代ç " :labelCol="labelCol" :wrapperCol="wrapperCol" prop="billMaterialsCode"> |
| | | <a-input v-model="model.billMaterialsCode" placeholder="请è¾å
¥BOM代ç " ></a-input> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="åºæ¬åä½" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="productionUnit"> |
| | | <a-input v-model="model.productionUnit" placeholder="请è¾å
¥åºæ¬åä½" ></a-input> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="è®¢åæ°é" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="productionQuantity"> |
| | | <a-input-number v-model="model.productionQuantity" placeholder="请è¾å
¥è®¢åæ°é" style="width: 100%" /> |
| | | </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: 'PmsProcessBillMaterialsForm', |
| | | 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: { |
| | | orderId: [ |
| | | { required: true, message: 'çæè®¢åæ¯å¿
é项', trigger: 'change' } |
| | | ], |
| | | materialNumber: [ |
| | | { required: true, message: 'ç©æç¼ç æ¯å¿
填项', trigger: 'change' } |
| | | ], |
| | | materialName: [ |
| | | { required: true, message: 'ç©æåç§°æ¯å¿
填项', trigger: 'change' } |
| | | ], |
| | | productionUnit: [ |
| | | { required: true, message: 'åºæ¬å使¯å¿
填项', trigger: 'change' } |
| | | ], |
| | | productionQuantity: [ |
| | | { required: true, message: 'è®¢åæ°éæ¯å¿
填项', trigger: 'change' } |
| | | ], |
| | | }, |
| | | url: { |
| | | add: "/pmsprocessbillmaterials/pmsProcessBillMaterials/add", |
| | | edit: "/pmsprocessbillmaterials/pmsProcessBillMaterials/edit", |
| | | queryById: "/pmsprocessbillmaterials/pmsProcessBillMaterials/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="å
³é"> |
| | | <pms-process-bill-materials-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></pms-process-bill-materials-form> |
| | | </j-modal> |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | import PmsProcessBillMaterialsForm from './PmsProcessBillMaterialsForm' |
| | | export default { |
| | | name: 'PmsProcessBillMaterialsModal', |
| | | components: { |
| | | PmsProcessBillMaterialsForm |
| | | }, |
| | | 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-card |
| | | :bordered="false" |
| | | > |
| | | <!-- æ¥è¯¢åºå --> |
| | | <div class="table-page-search-wrapper"> |
| | | <a-form |
| | | layout="inline" |
| | | @keyup.enter.native="searchQuery" |
| | | > |
| | | <a-row :gutter="30"> |
| | | |
| | | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
| | | <a-form-item label="缺é·ç¼ç "> |
| | | <j-input |
| | | placeholder="请è¾å
¥ç¼ºé·ç¼ç " |
| | | v-model="queryParam.defectCode" |
| | | ></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.defectName" |
| | | ></j-input> |
| | | </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> |
| | | </span> |
| | | </a-col> |
| | | </a-row> |
| | | </a-form> |
| | | </div> |
| | | |
| | | <!-- æä½æé®åºå --> |
| | | <div class="table-operator"> |
| | | <a-button |
| | | @click="handleAdd" |
| | | type="primary" |
| | | icon="plus" |
| | | >æ°å¢</a-button> |
| | | </div> |
| | | |
| | | <!-- tableåºå-begin --> |
| | | <div> |
| | | <a-table |
| | | ref="table" |
| | | size="middle" |
| | | bordered |
| | | rowKey="id" |
| | | filterMultiple="filterMultiple" |
| | | :columns="columns" |
| | | :rowClassName="tableRowClass" |
| | | :dataSource="dataSource" |
| | | :pagination="ipagination" |
| | | :loading="loading" |
| | | > |
| | | <!--ç¶ææ 个æ§å±ç¤º--> |
| | | <span |
| | | slot="status" |
| | | slot-scope="text,record" |
| | | > |
| | | <a-badge |
| | | v-if="record.defectStatus==1" |
| | | status="success" |
| | | /> |
| | | <span |
| | | v-if="record.defectStatus==1" |
| | | class="success" |
| | | >å¯ç¨</span> |
| | | <a-badge |
| | | v-if="record.defectStatus==0" |
| | | status="error" |
| | | /> |
| | | <span |
| | | v-if="record.defectStatus==0" |
| | | class="error" |
| | | >ç¦ç¨</span> |
| | | </span> |
| | | <span |
| | | slot="action" |
| | | slot-scope="text, record" |
| | | > |
| | | <a |
| | | href="javascript:;" |
| | | @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-item v-if="record.defectStatus == 0"> |
| | | <a-popconfirm |
| | | title="ç¡®å®å¯ç¨å?" |
| | | @confirm="() => handleActive(record.id)" |
| | | > |
| | | <a>å¯ç¨</a> |
| | | </a-popconfirm> |
| | | </a-menu-item> |
| | | <a-menu-item v-if="record.defectStatus == 1"> |
| | | <a-popconfirm |
| | | title="ç¡®å®ç¦ç¨å?" |
| | | @confirm="() => handleActive(record.id)" |
| | | > |
| | | <a>ç¦ç¨</a> |
| | | </a-popconfirm> |
| | | </a-menu-item> |
| | | </a-menu> |
| | | </a-dropdown> |
| | | </span> |
| | | |
| | | </a-table> |
| | | </div> |
| | | <!-- tableåºå-end --> |
| | | |
| | | <!-- 表ååºå --> |
| | | <defect-model |
| | | ref="modalForm" |
| | | @ok="modalFormOk" |
| | | ></defect-model> |
| | | </a-card> |
| | | </template> |
| | | |
| | | <script> |
| | | //æéå¼å
¥ ç»ä»¶ |
| | | import DefectModel from './modules/defect/DefectModel' |
| | | |
| | | import { deleteAction, requestPut, getAction } from '@/api/manage' |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | import JEllipsis from '@/components/jeecg/JEllipsis' |
| | | import JInput from '@/components/jeecg/JInput' |
| | | |
| | | export default { |
| | | name: 'DefectList', |
| | | mixins: [JeecgListMixin], |
| | | components: { |
| | | DefectModel, |
| | | JEllipsis, |
| | | JInput, |
| | | }, |
| | | data() { |
| | | return { |
| | | dataSource: [], |
| | | /* å页忰 */ |
| | | ipagination: { |
| | | current: 1, |
| | | pageSize: 5, |
| | | pageSizeOptions: ['5', '10', '20'], |
| | | showTotal: (total, range) => { |
| | | return range[0] + "-" + range[1] + " å
±" + total + "æ¡" |
| | | }, |
| | | total: 0 |
| | | }, |
| | | // 表头 |
| | | columns: [ |
| | | { |
| | | title: '#', |
| | | dataIndex: '', |
| | | key: 'rowIndex', |
| | | width: 60, |
| | | align: "center", |
| | | customRender: function (t, r, index) { |
| | | return parseInt(index) + 1; |
| | | } |
| | | }, |
| | | { |
| | | title: '缺é·ç¼ç ', |
| | | align: "center", |
| | | dataIndex: 'defectCode' |
| | | }, |
| | | { |
| | | title: '缺é·åç§°', |
| | | align: "center", |
| | | dataIndex: 'defectName' |
| | | }, |
| | | { |
| | | title: '缺é·åç±»', |
| | | align: "center", |
| | | dataIndex: 'defectCategory_dictText' |
| | | }, |
| | | { |
| | | title: 'æè¿°', |
| | | align: 'center', |
| | | dataIndex: 'descreption' |
| | | }, |
| | | { |
| | | width: 100, |
| | | title: 'ç¶æ', |
| | | align: 'center', |
| | | scopedSlots: { |
| | | customRender: 'status', |
| | | }, |
| | | dataIndex: 'defectStatus' |
| | | }, |
| | | { |
| | | width: 150, |
| | | title: 'æä½', |
| | | dataIndex: 'action', |
| | | align: 'center', |
| | | scopedSlots: { customRender: 'action' }, |
| | | } |
| | | ], |
| | | url: { |
| | | list: '/qms/defect/list', |
| | | delete: '/qms/defect/delete', |
| | | active: '/qms/defect/active', |
| | | }, |
| | | } |
| | | }, |
| | | mounted() { |
| | | }, |
| | | methods: { |
| | | loadData(arg) { |
| | | if (arg === 1) { |
| | | this.ipagination.current = 1; |
| | | } |
| | | var params = this.getQueryParams();//æ¥è¯¢æ¡ä»¶ |
| | | this.loading = true; |
| | | getAction(this.url.list, params).then((res) => { |
| | | if (res.success) { |
| | | this.dataSource = res.result.records; |
| | | this.ipagination.total = res.result.total; |
| | | } |
| | | if (res.code === 510) { |
| | | this.$message.warning(res.message) |
| | | } |
| | | this.loading = false; |
| | | }) |
| | | }, |
| | | //ç¦ç¨ç¶ææ ·å¼ |
| | | tableRowClass(record, index) { |
| | | if (record.warehouseStatus != "1") { |
| | | return "frozenRowClass"; |
| | | } |
| | | return ""; |
| | | }, |
| | | //å¯ç¨ç¦ç¨ |
| | | handleActive(id) { |
| | | if (!this.url.active) { |
| | | this.$message.error("请设置url.active!") |
| | | return |
| | | } |
| | | let that = this; |
| | | requestPut(that.url.active, {}, { id: id }).then((res) => { |
| | | if (res.success) { |
| | | that.$message.success(res.message); |
| | | that.loadData(); |
| | | } else { |
| | | that.$message.warning(res.message); |
| | | } |
| | | }); |
| | | }, |
| | | }, |
| | | |
| | | } |
| | | </script> |
| | | <style lang="less" scoped> |
| | | @import '~@assets/less/common.less'; |
| | | .frozenRowClass { |
| | | color: #c9c9c9; |
| | | } |
| | | .success { |
| | | color: green; |
| | | } |
| | | .error { |
| | | color: red; |
| | | } |
| | | .fontweight { |
| | | font-weight: bold; |
| | | } |
| | | .ant-card-body .table-operator { |
| | | margin-bottom: 18px; |
| | | } |
| | | |
| | | .ant-table-tbody .ant-table-row td { |
| | | padding-top: 15px; |
| | | padding-bottom: 15px; |
| | | } |
| | | |
| | | .anty-row-operator button { |
| | | margin: 0 5px; |
| | | } |
| | | |
| | | /deep/.ant-btn-danger { |
| | | background-color: #ffffff; |
| | | } |
| | | |
| | | .ant-modal-cust-warp { |
| | | height: 100%; |
| | | } |
| | | |
| | | .ant-modal-cust-warp .ant-modal-body { |
| | | height: calc(100% - 110px) !important; |
| | | overflow-y: auto; |
| | | } |
| | | |
| | | .ant-modal-cust-warp .ant-modal-content { |
| | | height: 90% !important; |
| | | overflow-y: hidden; |
| | | } |
| | | </style> |
| | |
| | | > |
| | | <a-row :gutter="30"> |
| | | |
| | | <a-col :xl="4" :lg="7" :md="8" :sm="24"> |
| | | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
| | | <a-form-item label="æ£éªé¡¹ç®ç¼å·"> |
| | | <j-input |
| | | placeholder="请è¾å
¥æ£éªé¡¹ç®ç¼å·æ£ç´¢" |
| | |
| | | </a-form-item> |
| | | </a-col> |
| | | |
| | | <a-col :xl="4" :lg="7" :md="8" :sm="24"> |
| | | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
| | | <a-form-item label="æ£éªé¡¹ç®åç§°"> |
| | | <j-input |
| | | placeholder="请è¾å
¥æ£éªé¡¹ç®åç§°æ£ç´¢" |
| | |
| | | </a-form-item> |
| | | </a-col> |
| | | |
| | | <a-col :xl="4" :lg="7" :md="8" :sm="24"> |
| | | <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> |
| | |
| | | { |
| | | title: 'æ£éªé¡¹ç®åç±»', |
| | | align: "center", |
| | | dataIndex: 'itemCategory' |
| | | dataIndex: 'itemCategoryName' |
| | | }, |
| | | { |
| | | title: 'å®é/宿§', |
| | | align: "center", |
| | | dataIndex: 'qualitativeOrQuantitative' |
| | | dataIndex: 'qualitativeOrQuantitativeName' |
| | | }, |
| | | { |
| | | title: 'æµéå·¥å
·', |
| | | align: "center", |
| | | dataIndex: 'inspectionTools' |
| | | dataIndex: 'inspectionToolsNames' |
| | | }, |
| | | { |
| | | title: '夿³¨', |
| | |
| | | } |
| | | ], |
| | | url: { |
| | | list: '/qms/inspectionItem/list', |
| | | list: '/qms/inspectionItem/queryList', |
| | | delete: '/qms/inspectionItem/delete', |
| | | active: '/qms/inspectionItem/active', |
| | | }, |
| | |
| | | > |
| | | <a-row :gutter="30"> |
| | | |
| | | <a-col :xl="4" :lg="7" :md="8" :sm="24"> |
| | | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
| | | <a-form-item label="æ£éªå·¥å
·ç¼ç "> |
| | | <j-input |
| | | placeholder="请è¾å
¥æ£éªå·¥å
·ç¼ç æ£ç´¢" |
| | |
| | | </a-form-item> |
| | | </a-col> |
| | | |
| | | <a-col :xl="4" :lg="7" :md="8" :sm="24"> |
| | | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
| | | <a-form-item label="æ£éªå·¥å
·åç§°"> |
| | | <j-input |
| | | placeholder="请è¾å
¥æ£éªå·¥å
·åç§°æ£ç´¢" |
| | |
| | | </a-form-item> |
| | | </a-col> |
| | | |
| | | <a-col :xl="4" :lg="7" :md="8" :sm="24"> |
| | | <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> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <a-card |
| | | :bordered="false" |
| | | > |
| | | <!-- æ¥è¯¢åºå --> |
| | | <div class="table-page-search-wrapper"> |
| | | <a-form |
| | | layout="inline" |
| | | @keyup.enter.native="searchQuery" |
| | | > |
| | | <a-row :gutter="30"> |
| | | |
| | | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
| | | <a-form-item label="è§åç¼ç "> |
| | | <j-input |
| | | placeholder="请è¾å
¥è§åç¼ç æ£ç´¢" |
| | | v-model="queryParam.ruleCode" |
| | | ></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.ruleName" |
| | | ></j-input> |
| | | </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> |
| | | </span> |
| | | </a-col> |
| | | </a-row> |
| | | </a-form> |
| | | </div> |
| | | |
| | | <!-- æä½æé®åºå --> |
| | | <div class="table-operator"> |
| | | <a-button |
| | | @click="handleAdd" |
| | | type="primary" |
| | | icon="plus" |
| | | >æ°å¢</a-button> |
| | | </div> |
| | | |
| | | <!-- tableåºå-begin --> |
| | | <div> |
| | | <a-table |
| | | ref="table" |
| | | size="middle" |
| | | bordered |
| | | rowKey="id" |
| | | filterMultiple="filterMultiple" |
| | | :columns="columns" |
| | | :rowClassName="tableRowClass" |
| | | :dataSource="dataSource" |
| | | :pagination="ipagination" |
| | | :loading="loading" |
| | | > |
| | | <!--ç¶ææ 个æ§å±ç¤º--> |
| | | <span |
| | | slot="status" |
| | | slot-scope="text,record" |
| | | > |
| | | <a-badge |
| | | v-if="record.ruleStatus==1" |
| | | status="success" |
| | | /> |
| | | <span |
| | | v-if="record.ruleStatus==1" |
| | | class="success" |
| | | >å¯ç¨</span> |
| | | <a-badge |
| | | v-if="record.ruleStatus==0" |
| | | status="error" |
| | | /> |
| | | <span |
| | | v-if="record.ruleStatus==0" |
| | | class="error" |
| | | >ç¦ç¨</span> |
| | | </span> |
| | | <span |
| | | slot="action" |
| | | slot-scope="text, record" |
| | | > |
| | | <a |
| | | href="javascript:;" |
| | | @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-item v-if="record.ruleStatus == 0"> |
| | | <a-popconfirm |
| | | title="ç¡®å®å¯ç¨å?" |
| | | @confirm="() => handleActive(record.id)" |
| | | > |
| | | <a>å¯ç¨</a> |
| | | </a-popconfirm> |
| | | </a-menu-item> |
| | | <a-menu-item v-if="record.ruleStatus == 1"> |
| | | <a-popconfirm |
| | | title="ç¡®å®ç¦ç¨å?" |
| | | @confirm="() => handleActive(record.id)" |
| | | > |
| | | <a>ç¦ç¨</a> |
| | | </a-popconfirm> |
| | | </a-menu-item> |
| | | </a-menu> |
| | | </a-dropdown> |
| | | </span> |
| | | |
| | | </a-table> |
| | | </div> |
| | | <!-- tableåºå-end --> |
| | | |
| | | <!-- 表ååºå --> |
| | | <sampling-rules-model |
| | | ref="modalForm" |
| | | @ok="modalFormOk" |
| | | ></sampling-rules-model> |
| | | </a-card> |
| | | </template> |
| | | |
| | | <script> |
| | | //æéå¼å
¥ ç»ä»¶ |
| | | import SamplingRulesModel from './modules/samplingRules/SamplingRulesModel' |
| | | |
| | | import { deleteAction, requestPut, getAction } from '@/api/manage' |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | import JEllipsis from '@/components/jeecg/JEllipsis' |
| | | import JInput from '@/components/jeecg/JInput' |
| | | |
| | | export default { |
| | | name: 'SamplingRulesList', |
| | | mixins: [JeecgListMixin], |
| | | components: { |
| | | SamplingRulesModel, |
| | | JEllipsis, |
| | | JInput, |
| | | }, |
| | | data() { |
| | | return { |
| | | dataSource: [], |
| | | /* å页忰 */ |
| | | ipagination: { |
| | | current: 1, |
| | | pageSize: 5, |
| | | pageSizeOptions: ['5', '10', '20'], |
| | | showTotal: (total, range) => { |
| | | return range[0] + "-" + range[1] + " å
±" + total + "æ¡" |
| | | }, |
| | | total: 0 |
| | | }, |
| | | // 表头 |
| | | columns: [ |
| | | { |
| | | title: '#', |
| | | dataIndex: '', |
| | | key: 'rowIndex', |
| | | width: 60, |
| | | align: "center", |
| | | customRender: function (t, r, index) { |
| | | return parseInt(index) + 1; |
| | | } |
| | | }, |
| | | { |
| | | title: 'æ½æ ·è§åç¼ç ', |
| | | align: "center", |
| | | dataIndex: 'ruleCode' |
| | | }, |
| | | { |
| | | title: 'æ½æ ·è§ååç§°', |
| | | align: "center", |
| | | dataIndex: 'ruleName' |
| | | }, |
| | | { |
| | | title: 'æ½æ ·è§ååç±»', |
| | | align: "center", |
| | | dataIndex: 'ruleCategory_dictText' |
| | | }, |
| | | { |
| | | title: 'æ½æ ·æ°é', |
| | | align: "center", |
| | | dataIndex: 'samplingQuantity' |
| | | }, |
| | | { |
| | | title: 'æ¹éä¸éå¼', |
| | | align: "center", |
| | | dataIndex: 'batchUpperLimit' |
| | | }, |
| | | { |
| | | title: 'æ¹éä¸éå¼', |
| | | align: "center", |
| | | dataIndex: 'batchLowerLimit' |
| | | }, |
| | | { |
| | | title: 'æå¤§ä¸åæ ¼æ°', |
| | | align: "center", |
| | | dataIndex: 'maxUnqualifiedQuantity' |
| | | }, |
| | | { |
| | | title: '夿³¨', |
| | | align: 'center', |
| | | dataIndex: 'remark' |
| | | }, |
| | | { |
| | | width: 100, |
| | | title: 'ç¶æ', |
| | | align: 'center', |
| | | scopedSlots: { |
| | | customRender: 'status', |
| | | }, |
| | | dataIndex: 'ruleStatus' |
| | | }, |
| | | { |
| | | width: 150, |
| | | title: 'æä½', |
| | | dataIndex: 'action', |
| | | align: 'center', |
| | | scopedSlots: { customRender: 'action' }, |
| | | } |
| | | ], |
| | | url: { |
| | | list: '/qms/samplingRules/list', |
| | | delete: '/qms/samplingRules/delete', |
| | | active: '/qms/samplingRules/active', |
| | | }, |
| | | } |
| | | }, |
| | | mounted() { |
| | | }, |
| | | methods: { |
| | | loadData(arg) { |
| | | if (arg === 1) { |
| | | this.ipagination.current = 1; |
| | | } |
| | | var params = this.getQueryParams();//æ¥è¯¢æ¡ä»¶ |
| | | this.loading = true; |
| | | getAction(this.url.list, params).then((res) => { |
| | | if (res.success) { |
| | | this.dataSource = res.result.records; |
| | | this.ipagination.total = res.result.total; |
| | | } |
| | | if (res.code === 510) { |
| | | this.$message.warning(res.message) |
| | | } |
| | | this.loading = false; |
| | | }) |
| | | }, |
| | | //ç¦ç¨ç¶ææ ·å¼ |
| | | tableRowClass(record, index) { |
| | | if (record.warehouseStatus != "1") { |
| | | return "frozenRowClass"; |
| | | } |
| | | return ""; |
| | | }, |
| | | //å¯ç¨ç¦ç¨ |
| | | handleActive(id) { |
| | | if (!this.url.active) { |
| | | this.$message.error("请设置url.active!") |
| | | return |
| | | } |
| | | let that = this; |
| | | requestPut(that.url.active, {}, { id: id }).then((res) => { |
| | | if (res.success) { |
| | | that.$message.success(res.message); |
| | | that.loadData(); |
| | | } else { |
| | | that.$message.warning(res.message); |
| | | } |
| | | }); |
| | | }, |
| | | }, |
| | | |
| | | } |
| | | </script> |
| | | <style lang="less" scoped> |
| | | @import '~@assets/less/common.less'; |
| | | .frozenRowClass { |
| | | color: #c9c9c9; |
| | | } |
| | | .success { |
| | | color: green; |
| | | } |
| | | .error { |
| | | color: red; |
| | | } |
| | | .fontweight { |
| | | font-weight: bold; |
| | | } |
| | | .ant-card-body .table-operator { |
| | | margin-bottom: 18px; |
| | | } |
| | | |
| | | .ant-table-tbody .ant-table-row td { |
| | | padding-top: 15px; |
| | | padding-bottom: 15px; |
| | | } |
| | | |
| | | .anty-row-operator button { |
| | | margin: 0 5px; |
| | | } |
| | | |
| | | /deep/.ant-btn-danger { |
| | | background-color: #ffffff; |
| | | } |
| | | |
| | | .ant-modal-cust-warp { |
| | | height: 100%; |
| | | } |
| | | |
| | | .ant-modal-cust-warp .ant-modal-body { |
| | | height: calc(100% - 110px) !important; |
| | | overflow-y: auto; |
| | | } |
| | | |
| | | .ant-modal-cust-warp .ant-modal-content { |
| | | height: 90% !important; |
| | | overflow-y: hidden; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <a-modal |
| | | :title="title" |
| | | :width="800" |
| | | :visible="visible" |
| | | :confirmLoading="confirmLoading" |
| | | :okButtonProps="{ props: {disabled: disableSubmit} }" |
| | | @ok="handleOk" |
| | | @cancel="handleCancel" |
| | | cancelText="å
³é" |
| | | > |
| | | <a-spin :spinning="confirmLoading"> |
| | | <a-form :form="form"> |
| | | |
| | | <a-row :gutter="24"> |
| | | <a-col :span="24"> |
| | | <a-form-item |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | label="缺é·ç¼ç " |
| | | > |
| | | <a-input |
| | | :disabled="disableSubmit" |
| | | allow-clear |
| | | placeholder="请è¾å
¥ç¼ºé·ç¼ç " |
| | | v-decorator="['defectCode', validatorRules.defectCode ]" |
| | | /> |
| | | </a-form-item> |
| | | </a-col> |
| | | </a-row> |
| | | <a-row :gutter="24"> |
| | | <a-col :span="24"> |
| | | <a-form-item |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | label="缺é·åç§°" |
| | | > |
| | | <a-input |
| | | :disabled="disableSubmit" |
| | | allow-clear |
| | | placeholder="请è¾å
¥ç¼ºé·åç§°" |
| | | v-decorator="['defectName', validatorRules.defectName ]" |
| | | /> |
| | | </a-form-item> |
| | | </a-col> |
| | | </a-row> |
| | | <a-row :gutter="24"> |
| | | <a-col :span="24"> |
| | | <a-form-item |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | label="缺é·åç±»" |
| | | > |
| | | <j-dict-select-tag |
| | | :disabled="disableSubmit" |
| | | placeholder="请è¾å
¥ç¼ºé·åç±»" |
| | | v-decorator="['defectCategory', validatorRules.defectCategory ]" |
| | | dictCode="defect_category" |
| | | /> |
| | | </a-form-item> |
| | | </a-col> |
| | | </a-row> |
| | | <a-row :gutter="24"> |
| | | <a-col :span="24"> |
| | | <a-form-item |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | label="æè¿°" |
| | | > |
| | | <a-textarea :disabled="disableSubmit" placeholder="请è¾å
¥æè¿°" v-decorator="['descreption', validatorRules.descreption ]"/> |
| | | </a-form-item> |
| | | </a-col> |
| | | </a-row> |
| | | </a-form> |
| | | </a-spin> |
| | | </a-modal> |
| | | </template> |
| | | |
| | | <script> |
| | | import { httpAction, getAction } from '@/api/manage' |
| | | import pick from 'lodash.pick' |
| | | import { duplicateCheck } from '@/api/api'//é夿 ¡éª |
| | | import JDictSelectTag from '../../../../components/dict/JDictSelectTag.vue' |
| | | |
| | | export default { |
| | | components: { JDictSelectTag }, |
| | | name: "DefectModal", |
| | | data() { |
| | | return { |
| | | title: "æä½", |
| | | visible: false, |
| | | disableSubmit: false, |
| | | model: {}, |
| | | defectId: "", //ä¿å缺é·id |
| | | labelCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 5 }, |
| | | }, |
| | | wrapperCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 16 }, |
| | | }, |
| | | |
| | | confirmLoading: false, |
| | | form: this.$form.createForm(this), |
| | | validatorRules: { |
| | | defectCode: { |
| | | rules: [ |
| | | { required: true, message: '请è¾å
¥ç¼ºé·ç¼ç ' }, |
| | | { validator: this.validateNum }, |
| | | ] |
| | | }, |
| | | defectName: { |
| | | rules: [ |
| | | { required: true, message: '请è¾å
¥ç¼ºé·åç§°' }, |
| | | { validator: this.validateName }, |
| | | ] |
| | | }, |
| | | defectCategory: { |
| | | rules: [ |
| | | { required: true, message: 'è¯·éæ©ç¼ºé·åç±»' }, |
| | | ] |
| | | }, |
| | | }, |
| | | url: { |
| | | add: "/qms/defect/add", |
| | | edit: "/qms/defect/edit", |
| | | }, |
| | | } |
| | | }, |
| | | created() { |
| | | }, |
| | | methods: { |
| | | add() { |
| | | this.edit({}); |
| | | }, |
| | | edit(record) { |
| | | this.form.resetFields(); |
| | | this.model = Object.assign({}, record); |
| | | this.defectId = record.id; |
| | | this.visible = true; |
| | | this.$nextTick(() => { |
| | | this.form.setFieldsValue( |
| | | pick(this.model, 'defectCode', 'defectName','defectCategory','defectStatus','descreption') |
| | | ) |
| | | }); |
| | | }, |
| | | close() { |
| | | this.$emit('close'); |
| | | this.visible = false; |
| | | }, |
| | | handleOk() { |
| | | const that = this; |
| | | // 触å表åéªè¯ |
| | | this.form.validateFields((err, values) => { |
| | | if (!err) { |
| | | that.confirmLoading = true; |
| | | let httpurl = ''; |
| | | let method = ''; |
| | | if (!this.model.id) { |
| | | httpurl += this.url.add; |
| | | method = 'post'; |
| | | } else { |
| | | httpurl += this.url.edit; |
| | | method = 'put'; |
| | | } |
| | | let formData = Object.assign(this.model, values); |
| | | httpAction(httpurl, formData, method).then((res) => { |
| | | if (res.success) { |
| | | that.$message.success(res.message); |
| | | that.$emit('ok'); |
| | | } else { |
| | | that.$message.warning(res.message); |
| | | } |
| | | }).finally(() => { |
| | | that.confirmLoading = false; |
| | | that.close(); |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | handleCancel() { |
| | | this.close() |
| | | }, |
| | | //éªè¯ ç¼å· |
| | | validateNum(rule, value, callback) { |
| | | var params = { |
| | | tableName: 'qms_defect', |
| | | fieldName: 'defect_code', |
| | | fieldVal: value, |
| | | dataId: this.defectId, |
| | | //æ°æ®åºä¸åå¨å段del_flag并使ç¨è¯¥å段ä½ä¸ºæªå é¤çç¥ï¼çå é¤ï¼false åå é¤ï¼true |
| | | delFlag: 'true', |
| | | }; |
| | | duplicateCheck(params).then((res) => { |
| | | if (res.success) { |
| | | callback(); |
| | | } else { |
| | | callback("缺é·ç¼ç å·²åå¨!"); |
| | | } |
| | | }) |
| | | }, |
| | | //éªè¯ åç§° |
| | | validateName(rule, value, callback) { |
| | | var params = { |
| | | tableName: 'qms_defect', |
| | | fieldName: 'defect_name', |
| | | fieldVal: value, |
| | | dataId: this.defectId, |
| | | //æ°æ®åºä¸åå¨å段del_flag并使ç¨è¯¥å段ä½ä¸ºæªå é¤çç¥ï¼çå é¤ï¼false åå é¤ï¼true |
| | | delFlag: 'true', |
| | | }; |
| | | duplicateCheck(params).then((res) => { |
| | | if (res.success) { |
| | | callback(); |
| | | } else { |
| | | callback("缺é·åç§°å·²åå¨!"); |
| | | } |
| | | }) |
| | | }, |
| | | // å
³éå¼¹çªæ¶æ¸
é¤è¡¨åæ ¡éª |
| | | removeValidate() { |
| | | if (this.$refs.form) this.$refs.form.clearValidate() |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .ant-btn { |
| | | padding: 0 10px; |
| | | margin-left: 3px; |
| | | } |
| | | |
| | | .ant-form-item-control { |
| | | line-height: 0px; |
| | | } |
| | | |
| | | /** 主表åè¡é´è· */ |
| | | .ant-form .ant-form-item { |
| | | margin-bottom: 10px; |
| | | } |
| | | |
| | | /** Tab页é¢è¡é´è· */ |
| | | .ant-tabs-content .ant-form-item { |
| | | margin-bottom: 0px; |
| | | } |
| | | </style> |
| | |
| | | :wrapperCol="wrapperCol" |
| | | label="æµéå·¥å
·" |
| | | > |
| | | <a-input |
| | | :disabled="disableSubmit" |
| | | allow-clear |
| | | placeholder="è¯·éæ©æµéå·¥å
·" |
| | | v-decorator="['inspectionTools', validatorRules.inspectionTools ]" |
| | | /> |
| | | <j-select-multi-inspection-tools |
| | | :disabled="disableSubmit" |
| | | v-decorator="['inspectionTools', validatorRules.inspectionTools ]" |
| | | valueKey="id"> |
| | | </j-select-multi-inspection-tools> |
| | | </a-form-item> |
| | | </a-col> |
| | | </a-row> |
| | |
| | | import { httpAction, getAction } from '@/api/manage' |
| | | import pick from 'lodash.pick' |
| | | import { duplicateCheck } from '@/api/api'//é夿 ¡éª |
| | | import JSelectMultiInspectionTools from './JSelectMultiInspectionTools' |
| | | |
| | | export default { |
| | | name: "InspectionItemModal", |
| | | components: {JSelectMultiInspectionTools}, |
| | | data() { |
| | | return { |
| | | title: "æä½", |
| | |
| | | //éªè¯ åç§° |
| | | validateName(rule, value, callback) { |
| | | var params = { |
| | | tableName: 'qms_inspection_items', |
| | | tableName: 'qms_inspection_item', |
| | | fieldName: 'item_name', |
| | | fieldVal: value, |
| | | dataId: this.inspectionItemId, |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <!-- å®ä¹å¨è¿éç忰齿¯ä¸å¯å¨å¤é¨è¦ççï¼é²æ¢åºç°é®é¢ --> |
| | | <j-select-biz-component |
| | | :value="value" |
| | | :ellipsisLength="25" |
| | | :listUrl="url.list" |
| | | :columns="columns" |
| | | v-on="$listeners" |
| | | v-bind="attrs" |
| | | /> |
| | | </template> |
| | | |
| | | <script> |
| | | import JDate from '@comp/jeecg/JDate' |
| | | import JSelectBizComponent from '../../../../components/jeecgbiz/JSelectBizComponent' |
| | | |
| | | export default { |
| | | name: 'JSelectMultiInspectionTools', |
| | | components: {JDate, JSelectBizComponent}, |
| | | props: { |
| | | value: null, // any type |
| | | queryConfig: { |
| | | type: Array, |
| | | default: () => [] |
| | | }, |
| | | }, |
| | | data() { |
| | | return { |
| | | url: { list: '/qms/inspectionTools/list' }, |
| | | columns: [ |
| | | { title: 'å·¥å
·ç¼ç ', align: 'center', width: '25%', widthRight: '70%', dataIndex: 'toolCode' }, |
| | | { title: 'å·¥å
·åç§°', align: 'center', width: '25%', dataIndex: 'toolName' }, |
| | | { title: 'å·¥å
·ç¶æ', align: 'center', width: '20%', dataIndex: 'toolStatus' }, |
| | | { title: '夿³¨', align: 'center', width: '20%', dataIndex: 'remark' } |
| | | ], |
| | | // å®ä¹å¨è¿éç忰齿¯å¯ä»¥å¨å¤é¨ä¼ éè¦ççï¼å¯ä»¥æ´çµæ´»çå®å¶å使ç¨çç»ä»¶ |
| | | default: { |
| | | name: 'å·¥å
·', |
| | | width: 1200, |
| | | displayKey: 'toolCode', |
| | | returnKeys: ['id', 'toolName'], |
| | | queryParamText: 'å·¥å
·ç¼ç ', |
| | | }, |
| | | // 夿¡ä»¶æ¥è¯¢é
ç½® |
| | | queryConfigDefault: [ |
| | | { |
| | | key: 'toolName', |
| | | label: 'æ£éªå·¥å
·åç§°', |
| | | }, |
| | | ], |
| | | } |
| | | }, |
| | | computed: { |
| | | attrs() { |
| | | return Object.assign(this.default, this.$attrs, { |
| | | queryConfig: this.queryConfigDefault.concat(this.queryConfig) |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="less" scoped></style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <a-modal |
| | | :title="title" |
| | | :width="800" |
| | | :visible="visible" |
| | | :confirmLoading="confirmLoading" |
| | | :okButtonProps="{ props: {disabled: disableSubmit} }" |
| | | @ok="handleOk" |
| | | @cancel="handleCancel" |
| | | cancelText="å
³é" |
| | | > |
| | | <a-spin :spinning="confirmLoading"> |
| | | <a-form :form="form"> |
| | | |
| | | <a-row :gutter="24"> |
| | | <a-col :span="12"> |
| | | <a-form-item |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | label="è§åç¼ç " |
| | | > |
| | | <a-input |
| | | :disabled="disableSubmit" |
| | | allow-clear |
| | | placeholder="请è¾å
¥è§åç¼ç " |
| | | v-decorator="['ruleCode', validatorRules.ruleCode ]" |
| | | /> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-item |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | label="è§ååç§°" |
| | | > |
| | | <a-input |
| | | :disabled="disableSubmit" |
| | | allow-clear |
| | | placeholder="请è¾å
¥è§ååç§°" |
| | | v-decorator="['ruleName', validatorRules.ruleName ]" |
| | | /> |
| | | </a-form-item> |
| | | </a-col> |
| | | </a-row> |
| | | <a-row :gutter="24"> |
| | | <a-col :span="24"> |
| | | <a-form-item |
| | | :labelCol="{ span: 3 }" |
| | | :wrapperCol="{ span: 21 }" |
| | | label="è§ååç±»" |
| | | > |
| | | <j-dict-select-tag |
| | | :disabled="disableSubmit" |
| | | placeholder="请è¾å
¥è§ååç±»" |
| | | v-decorator="['ruleCategory', validatorRules.ruleCategory ]" |
| | | dictCode="rule_category" |
| | | /> |
| | | </a-form-item> |
| | | </a-col> |
| | | </a-row> |
| | | <a-row :gutter="24"> |
| | | <a-col :span="12"> |
| | | <a-form-item |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | label="æ½æ ·æ°é" |
| | | > |
| | | <a-input-number :disabled="disableSubmit" v-decorator="['samplingQuantity', validatorRules.samplingQuantity ]" :min="1" style="width: 100%" placeholder="请è¾å
¥æ½æ ·æ°é" /> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-item |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | label="æå¤§ä¸åæ ¼æ°" |
| | | > |
| | | <a-input-number :disabled="disableSubmit" v-decorator="['maxUnqualifiedQuantity', validatorRules.maxUnqualifiedQuantity ]" :min="1" style="width: 100%" placeholder="请è¾å
¥æå¤§ä¸åæ ¼æ°" /> |
| | | </a-form-item> |
| | | </a-col> |
| | | </a-row> |
| | | <a-row :gutter="24"> |
| | | <a-col :span="12"> |
| | | <a-form-item |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | label="æ¹éä¸éå¼" |
| | | > |
| | | <a-input-number :disabled="disableSubmit" v-decorator="['batchLowerLimit', validatorRules.batchLowerLimit ]" :min="1" style="width: 100%" placeholder="请è¾å
¥æ¹éä¸éå¼" /> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-item |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | label="æ¹éä¸éå¼" |
| | | > |
| | | <a-input-number :disabled="disableSubmit" v-decorator="['batchUpperLimit', validatorRules.batchUpperLimit ]" :min="1" style="width: 100%" placeholder="请è¾å
¥æ¹éä¸éå¼" /> |
| | | </a-form-item> |
| | | </a-col> |
| | | </a-row> |
| | | <a-row :gutter="24"> |
| | | <a-col :span="24"> |
| | | <a-form-item |
| | | :labelCol="{ span: 3 }" |
| | | :wrapperCol="{ span: 21 }" |
| | | label="夿³¨" |
| | | > |
| | | <a-textarea :disabled="disableSubmit" placeholder="请è¾å
¥å¤æ³¨" v-decorator="['remark', validatorRules.remark ]"/> |
| | | </a-form-item> |
| | | </a-col> |
| | | </a-row> |
| | | </a-form> |
| | | </a-spin> |
| | | </a-modal> |
| | | </template> |
| | | |
| | | <script> |
| | | import { httpAction, getAction } from '@/api/manage' |
| | | import pick from 'lodash.pick' |
| | | import { duplicateCheck } from '@/api/api'//é夿 ¡éª |
| | | import JDictSelectTag from '../../../../components/dict/JDictSelectTag.vue' |
| | | |
| | | export default { |
| | | components: { JDictSelectTag }, |
| | | name: "SamplingRulesModal", |
| | | data() { |
| | | return { |
| | | title: "æä½", |
| | | visible: false, |
| | | disableSubmit: false, |
| | | model: {}, |
| | | samplingRulesId: "", //ä¿åæ½æ ·è§åid |
| | | labelCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 6 }, |
| | | }, |
| | | wrapperCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 18 }, |
| | | }, |
| | | |
| | | confirmLoading: false, |
| | | form: this.$form.createForm(this), |
| | | validatorRules: { |
| | | ruleCode: { |
| | | rules: [ |
| | | { required: true, message: '请è¾å
¥è§åç¼ç ' }, |
| | | { validator: this.validateNum }, |
| | | ] |
| | | }, |
| | | ruleName: { |
| | | rules: [ |
| | | { required: true, message: '请è¾å
¥è§ååç§°' }, |
| | | { validator: this.validateName }, |
| | | ] |
| | | }, |
| | | ruleCategory: { |
| | | rules: [ |
| | | { required: true, message: 'è¯·éæ©è§ååç±»' }, |
| | | ] |
| | | }, |
| | | }, |
| | | url: { |
| | | add: "/qms/samplingRules/add", |
| | | edit: "/qms/samplingRules/edit", |
| | | }, |
| | | } |
| | | }, |
| | | created() { |
| | | }, |
| | | methods: { |
| | | add() { |
| | | this.edit({}); |
| | | }, |
| | | edit(record) { |
| | | this.form.resetFields(); |
| | | this.model = Object.assign({}, record); |
| | | this.samplingRulesId = record.id; |
| | | this.visible = true; |
| | | this.$nextTick(() => { |
| | | this.form.setFieldsValue( |
| | | pick(this.model, 'ruleCode', 'ruleName','ruleCategory','ruleStatus','maxUnqualifiedQuantity', |
| | | 'samplingQuantity','batchLowerLimit','batchUpperLimit', 'remark') |
| | | ) |
| | | }); |
| | | }, |
| | | close() { |
| | | this.$emit('close'); |
| | | this.visible = false; |
| | | }, |
| | | handleOk() { |
| | | const that = this; |
| | | // 触å表åéªè¯ |
| | | this.form.validateFields((err, values) => { |
| | | if (!err) { |
| | | that.confirmLoading = true; |
| | | let httpurl = ''; |
| | | let method = ''; |
| | | if (!this.model.id) { |
| | | httpurl += this.url.add; |
| | | method = 'post'; |
| | | } else { |
| | | httpurl += this.url.edit; |
| | | method = 'put'; |
| | | } |
| | | let formData = Object.assign(this.model, values); |
| | | httpAction(httpurl, formData, method).then((res) => { |
| | | if (res.success) { |
| | | that.$message.success(res.message); |
| | | that.$emit('ok'); |
| | | } else { |
| | | that.$message.warning(res.message); |
| | | } |
| | | }).finally(() => { |
| | | that.confirmLoading = false; |
| | | that.close(); |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | handleCancel() { |
| | | this.close() |
| | | }, |
| | | //éªè¯ ç¼å· |
| | | validateNum(rule, value, callback) { |
| | | var params = { |
| | | tableName: 'qms_sampling_rules', |
| | | fieldName: 'rule_code', |
| | | fieldVal: value, |
| | | dataId: this.samplingRulesId, |
| | | //æ°æ®åºä¸åå¨å段del_flag并使ç¨è¯¥å段ä½ä¸ºæªå é¤çç¥ï¼çå é¤ï¼false åå é¤ï¼true |
| | | delFlag: 'true', |
| | | }; |
| | | duplicateCheck(params).then((res) => { |
| | | if (res.success) { |
| | | callback(); |
| | | } else { |
| | | callback("è§åç¼ç å·²åå¨!"); |
| | | } |
| | | }) |
| | | }, |
| | | //éªè¯ åç§° |
| | | validateName(rule, value, callback) { |
| | | var params = { |
| | | tableName: 'qms_sampling_rules', |
| | | fieldName: 'rule_name', |
| | | fieldVal: value, |
| | | dataId: this.samplingRulesId, |
| | | //æ°æ®åºä¸åå¨å段del_flag并使ç¨è¯¥å段ä½ä¸ºæªå é¤çç¥ï¼çå é¤ï¼false åå é¤ï¼true |
| | | delFlag: 'true', |
| | | }; |
| | | duplicateCheck(params).then((res) => { |
| | | if (res.success) { |
| | | callback(); |
| | | } else { |
| | | callback("è§ååç§°å·²åå¨!"); |
| | | } |
| | | }) |
| | | }, |
| | | // å
³éå¼¹çªæ¶æ¸
é¤è¡¨åæ ¡éª |
| | | removeValidate() { |
| | | if (this.$refs.form) this.$refs.form.clearValidate() |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .ant-btn { |
| | | padding: 0 10px; |
| | | margin-left: 3px; |
| | | } |
| | | |
| | | .ant-form-item-control { |
| | | line-height: 0px; |
| | | } |
| | | |
| | | /** 主表åè¡é´è· */ |
| | | .ant-form .ant-form-item { |
| | | margin-bottom: 10px; |
| | | } |
| | | |
| | | /** Tab页é¢è¡é´è· */ |
| | | .ant-tabs-content .ant-form-item { |
| | | margin-bottom: 0px; |
| | | } |
| | | </style> |