| | |
| | | </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) |
| | |
| | | :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> |