Merge remote-tracking branch 'origin/master'
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div class="components-input-demo-presuffix"> |
| | | <!----> |
| | | <a-input @click="openModal" placeholder="请ç¹å»éæ©è½¦é´" v-model="textVals" readOnly :disabled="disabled"> |
| | | <a-icon slot="prefix" type="cluster" title="车é´éæ©æ§ä»¶"/> |
| | | <a-icon v-if="storeVals&&!disabled" slot="suffix" type="close-circle" @click="handleEmpty" title="æ¸
空"/> |
| | | </a-input> |
| | | <j-select-equipment-factory-modal |
| | | ref="innerDepartSelectModal" |
| | | :modal-width="modalWidth" |
| | | :multi="multi" |
| | | :rootOpened="rootOpened" |
| | | :factory-id="value" |
| | | :store="storeField" |
| | | :text="textField" |
| | | :treeProductOpera="treeProductOpera" |
| | | @ok="handleOK" |
| | | @initComp="initComp"> |
| | | |
| | | </j-select-equipment-factory-modal> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import JSelectEquipmentFactoryModal from './modal/JSelectEquipmentFactoryModal' |
| | | import { underLinetoHump } from '@comp/_util/StringUtil' |
| | | export default { |
| | | name: 'JSelectEquipmentFactory', |
| | | components:{ |
| | | JSelectEquipmentFactoryModal, |
| | | }, |
| | | props:{ |
| | | modalWidth:{ |
| | | type:Number, |
| | | default:500, |
| | | required:false |
| | | }, |
| | | multi:{ |
| | | type:Boolean, |
| | | default:false, |
| | | required:false |
| | | }, |
| | | rootOpened:{ |
| | | type:Boolean, |
| | | default:true, |
| | | required:false |
| | | }, |
| | | value:{ |
| | | type:String, |
| | | required:false |
| | | }, |
| | | disabled:{ |
| | | type: Boolean, |
| | | required: false, |
| | | default: false |
| | | }, |
| | | // èªå®ä¹è¿ååæ®µï¼é»è®¤è¿å id |
| | | customReturnField: { |
| | | type: String, |
| | | default: '' |
| | | }, |
| | | backFactory: { |
| | | type: Boolean, |
| | | default: false, |
| | | required: false |
| | | }, |
| | | // åå¨å段 [key field] |
| | | store: { |
| | | type: String, |
| | | default: 'id', |
| | | required: false |
| | | }, |
| | | // æ¾ç¤ºå段 [label field] |
| | | text: { |
| | | type: String, |
| | | default: 'factoryName', |
| | | required: false |
| | | }, |
| | | treeProductOpera: { |
| | | type: Boolean, |
| | | default: false, |
| | | required: false |
| | | } |
| | | |
| | | }, |
| | | data(){ |
| | | return { |
| | | visible:false, |
| | | confirmLoading:false, |
| | | storeVals: '', //[key values] |
| | | textVals: '' //[label values] |
| | | } |
| | | }, |
| | | computed:{ |
| | | storeField(){ |
| | | let field = this.customReturnField |
| | | if(!field){ |
| | | field = this.store; |
| | | } |
| | | return underLinetoHump(field) |
| | | }, |
| | | textField(){ |
| | | return underLinetoHump(this.text) |
| | | } |
| | | }, |
| | | mounted(){ |
| | | this.storeVals = this.value |
| | | }, |
| | | watch:{ |
| | | value(val){ |
| | | this.storeVals = val |
| | | } |
| | | }, |
| | | methods:{ |
| | | initComp(textVals){ |
| | | this.textVals = textVals |
| | | }, |
| | | //è¿åéä¸ç车é´ä¿¡æ¯ |
| | | backProductInfo(){ |
| | | if(this.backFactory===true){ |
| | | //LOWCOD-2147 ãç¨æ·ç®¡çãéæ©é¨é¨åä¸çº§ä»¥åï¼è´è´£é¨é¨æ²¡ææ°æ®å¯é (é¶çæ¹é èªå®ä¹è¿ååæ®µå¯¼è´) |
| | | if(this.storeVals && this.storeVals.length>0){ |
| | | let arr1 = this.storeVals.split(',') |
| | | let arr2 = this.textVals.split(',') |
| | | let info = [] |
| | | for(let i=0;i<arr1.length;i++){ |
| | | info.push({ |
| | | value: arr1[i], |
| | | text: arr2[i] |
| | | }) |
| | | } |
| | | this.$emit('back', info) |
| | | } |
| | | } |
| | | }, |
| | | openModal(){ |
| | | this.$refs.innerDepartSelectModal.show() |
| | | }, |
| | | handleOK(rows) { |
| | | if (!rows && rows.length <= 0) { |
| | | this.textVals = '' |
| | | this.storeVals = '' |
| | | } else { |
| | | let arr1 = [] |
| | | let arr2 = [] |
| | | for(let dep of rows){ |
| | | arr1.push(dep[this.storeField]) |
| | | arr2.push(dep[this.textField]) |
| | | } |
| | | this.storeVals = arr1.join(',') |
| | | this.textVals = arr2.join(',') |
| | | } |
| | | this.$emit("change", this.storeVals) |
| | | this.backProductInfo() |
| | | }, |
| | | getDepartNames(){ |
| | | return this.departNames |
| | | }, |
| | | handleEmpty(){ |
| | | this.handleOK('') |
| | | } |
| | | }, |
| | | model: { |
| | | prop: 'value', |
| | | event: 'change' |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .components-input-demo-presuffix .anticon-close-circle { |
| | | cursor: pointer; |
| | | color: #ccc; |
| | | transition: color 0.3s; |
| | | font-size: 12px; |
| | | } |
| | | .components-input-demo-presuffix .anticon-close-circle:hover { |
| | | color: #f5222d; |
| | | } |
| | | .components-input-demo-presuffix .anticon-close-circle:active { |
| | | color: #666; |
| | | } |
| | | </style> |
| | |
| | | type: String, |
| | | default: '' |
| | | }, |
| | | backProduction: { |
| | | backFactory: { |
| | | type: Boolean, |
| | | default: false, |
| | | required: false |
| | |
| | | this.textVals = textVals |
| | | }, |
| | | //è¿åéä¸ç车é´ä¿¡æ¯ |
| | | backProductInfo(){ |
| | | if(this.backProduction===true){ |
| | | backFactoryInfo(){ |
| | | if(this.backFactory===true){ |
| | | if(this.storeVals && this.storeVals.length>0){ |
| | | let arr1 = this.storeVals.split(',') |
| | | let arr2 = this.textVals.split(',') |
| | |
| | | this.textVals = arr2.join(',') |
| | | } |
| | | this.$emit("change", this.storeVals) |
| | | this.backProductInfo() |
| | | this.backFactoryInfo() |
| | | }, |
| | | |
| | | |
| | | handleEmpty(){ |
| | | this.handleOK('') |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <j-modal |
| | | title="éæ©è½¦é´" |
| | | :width="modalWidth" |
| | | :visible="visible" |
| | | :confirmLoading="confirmLoading" |
| | | @ok="handleSubmit" |
| | | @cancel="handleCancel" |
| | | @update:fullscreen="isFullscreen" |
| | | wrapClassName="j-factory-select-modal" |
| | | switchFullscreen |
| | | cancelText="å
³é"> |
| | | <a-spin tip="Loading..." :spinning="false"> |
| | | <a-input-search style="margin-bottom: 1px" placeholder="请è¾å
¥è½¦é´åç§°æå车è¿è¡æç´¢" @search="onSearch" /> |
| | | <a-tree |
| | | checkable |
| | | :class="treeScreenClass" |
| | | :treeData="treeData" |
| | | :checkStrictly="checkStrictly" |
| | | @check="onCheck" |
| | | @select="onSelect" |
| | | @expand="onExpand" |
| | | :autoExpandParent="autoExpandParent" |
| | | :expandedKeys="expandedKeys" |
| | | :checkedKeys="checkedKeys"> |
| | | |
| | | <template slot="title" slot-scope="{title}"> |
| | | <span v-if="title.indexOf(searchValue) > -1"> |
| | | {{title.substr(0, title.indexOf(searchValue))}} |
| | | <span style="color: #f50">{{searchValue}}</span> |
| | | {{title.substr(title.indexOf(searchValue) + searchValue.length)}} |
| | | </span> |
| | | <span v-else>{{title}}</span> |
| | | </template> |
| | | </a-tree> |
| | | </a-spin> |
| | | <!--åºé¨ç¶åå
³èæä½åç¡®è®¤åæ¶æé®--> |
| | | <!--<template slot="footer">--> |
| | | <!--<div class="drawer-bootom-button">--> |
| | | <!--<a-dropdown style="float: left" :trigger="['click']" placement="topCenter">--> |
| | | <!--<a-menu slot="overlay">--> |
| | | <!--<a-menu-item key="1" @click="switchCheckStrictly(1)">ç¶åå
³è</a-menu-item>--> |
| | | <!--<a-menu-item key="2" @click="switchCheckStrictly(2)">åæ¶å
³è</a-menu-item>--> |
| | | <!--</a-menu>--> |
| | | <!--<a-button>--> |
| | | <!--æ æä½ <a-icon type="up" />--> |
| | | <!--</a-button>--> |
| | | <!--</a-dropdown>--> |
| | | <!--<a-button @click="handleCancel" type="primary" style="margin-right: 0.8rem">å
³é</a-button>--> |
| | | <!--<a-button @click="handleSubmit" type="primary" >确认</a-button>--> |
| | | <!--</div>--> |
| | | <!--</template>--> |
| | | </j-modal> |
| | | </template> |
| | | |
| | | <script> |
| | | import { queryFactoryTreeList } from '@/api/api' |
| | | import { getAction } from '@/api/manage' |
| | | export default { |
| | | name: 'JSelectEquipmentFactoryModal', |
| | | props:['modalWidth','multi','rootOpened','factoryId', 'store', 'text','treeOpera'], |
| | | data(){ |
| | | return { |
| | | visible:false, |
| | | confirmLoading:false, |
| | | treeData:[], |
| | | autoExpandParent:true, |
| | | expandedKeys:[], |
| | | dataList:[], |
| | | checkedKeys:[], |
| | | checkedRows:[], |
| | | searchValue:"", |
| | | checkStrictly: true, |
| | | fullscreen:false, |
| | | allTreeKeys:[], |
| | | url:{ |
| | | queryTreeIdList:'/base/factory/queryTreeIdList' |
| | | } |
| | | } |
| | | }, |
| | | created(){ |
| | | this.loadFactoryTree(); |
| | | }, |
| | | watch:{ |
| | | factoryId(){ |
| | | this.initDepartComponent() |
| | | }, |
| | | visible: { |
| | | handler() { |
| | | this.initDepartComponent(true) |
| | | } |
| | | } |
| | | }, |
| | | computed:{ |
| | | treeScreenClass() { |
| | | return { |
| | | 'my-dept-select-tree': true, |
| | | 'fullscreen': this.fullscreen, |
| | | } |
| | | }, |
| | | }, |
| | | methods:{ |
| | | loadFactoryTree(){ |
| | | getAction(this.url.queryTreeIdList).then(res => { |
| | | if (res.success) { |
| | | this.allTreeKeys = res.result |
| | | this.loadDepart() |
| | | } else { |
| | | // this.$message.warning(res.message) |
| | | this.$notification.warning({ |
| | | message:'æ¶æ¯', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }).finally(() => { |
| | | this.loading = false |
| | | }) |
| | | }, |
| | | matterTree(data) { |
| | | for (var i = 0; i < data.length; i++) { |
| | | if(data[i].leaf == false){ |
| | | data[i].disabled = true |
| | | } |
| | | |
| | | // // è¿éé¢å°±æ¯ä½ å¤çæ°æ®çå°æ¹ |
| | | // data[i].width = '200' |
| | | if (data[i].children && data[i].children.length > 0) { |
| | | // childrenè¥ä¸ä¸ºç©ºæ°ç»ï¼åç»§ç» éå½è°ç¨ æ¬æ¹æ³ |
| | | this.matterTree(data[i].children) |
| | | } |
| | | } |
| | | return data |
| | | }, |
| | | show(){ |
| | | this.visible=true |
| | | this.checkedRows=[] |
| | | this.checkedKeys=[] |
| | | }, |
| | | loadDepart(){ |
| | | // è¿ä¸ªæ¹æ³æ¯æ¾å°ææçé¨é¨ä¿¡æ¯ |
| | | queryFactoryTreeList().then(res=>{ |
| | | if(res.success){ |
| | | let arr = [...res.result] |
| | | this.reWriterWithSlot(arr) |
| | | this.treeData = arr |
| | | this.initDepartComponent() |
| | | if(this.rootOpened){ |
| | | this.initExpandedKeys(res.result) |
| | | } |
| | | this.matterTree(this.treeData) |
| | | this.expandedKeys = this.allTreeKeys |
| | | } |
| | | }) |
| | | }, |
| | | initDepartComponent(flag){ |
| | | let arr = [] |
| | | //è¯¥æ¹æ³ä¸¤ä¸ªå°æ¹ç¨ 1.visibleæ¹åäºä»¶éæ°è®¾ç½®éä¸é¡¹ 2.ç»ä»¶ç¼è¾é¡µé¢åæ¾ |
| | | let fieldName = flag==true?'key':this.text |
| | | if(this.factoryId){ |
| | | let arr2 = this.factoryId.split(',') |
| | | for(let item of this.dataList){ |
| | | if(arr2.indexOf(item[this.store])>=0){ |
| | | arr.push(item[fieldName]) |
| | | } |
| | | } |
| | | } |
| | | if(flag==true){ |
| | | this.checkedKeys = [...arr] |
| | | }else{ |
| | | this.$emit("initComp", arr.join(',')) |
| | | } |
| | | }, |
| | | reWriterWithSlot(arr){ |
| | | for(let item of arr){ |
| | | if(item.children && item.children.length>0){ |
| | | this.reWriterWithSlot(item.children) |
| | | let temp = Object.assign({},item) |
| | | temp.children = {} |
| | | this.dataList.push(temp) |
| | | }else{ |
| | | this.dataList.push(item) |
| | | item.scopedSlots={ title: 'title' } |
| | | } |
| | | } |
| | | }, |
| | | initExpandedKeys(arr){ |
| | | if(arr && arr.length>0){ |
| | | let keys = [] |
| | | for(let item of arr){ |
| | | if(item.children && item.children.length>0){ |
| | | keys.push(item.id) |
| | | } |
| | | } |
| | | this.expandedKeys=[...keys] |
| | | //å
¨é¨keys |
| | | //this.allTreeKeys = [...keys] |
| | | }else{ |
| | | this.expandedKeys=[] |
| | | //this.allTreeKeys = [] |
| | | } |
| | | }, |
| | | onCheck (checkedKeys,info) { |
| | | if(!this.multi){ |
| | | let arr = checkedKeys.checked.filter(item => this.checkedKeys.indexOf(item) < 0) |
| | | this.checkedKeys = [...arr] |
| | | this.checkedRows = (this.checkedKeys.length === 0) ? [] : [info.node.dataRef] |
| | | }else{ |
| | | if(this.checkStrictly){ |
| | | this.checkedKeys = checkedKeys.checked |
| | | }else{ |
| | | this.checkedKeys = checkedKeys |
| | | } |
| | | this.checkedRows = this.getCheckedRows(this.checkedKeys) |
| | | } |
| | | }, |
| | | onSelect(selectedKeys,info) { |
| | | //åæ¶å
³èçæ
åµä¸æèµ°onSelectçé»è¾ |
| | | if(this.checkStrictly){ |
| | | let keys = [] |
| | | keys.push(selectedKeys[0]) |
| | | if(!this.checkedKeys || this.checkedKeys.length===0 || !this.multi){ |
| | | this.checkedKeys = [...keys] |
| | | this.checkedRows=[info.node.dataRef] |
| | | }else{ |
| | | let currKey = info.node.dataRef.key |
| | | if(this.checkedKeys.indexOf(currKey)>=0){ |
| | | this.checkedKeys = this.checkedKeys.filter(item=> item !==currKey) |
| | | }else{ |
| | | this.checkedKeys.push(...keys) |
| | | } |
| | | } |
| | | this.checkedRows = this.getCheckedRows(this.checkedKeys) |
| | | } |
| | | }, |
| | | onExpand (expandedKeys) { |
| | | this.expandedKeys = expandedKeys |
| | | this.autoExpandParent = false |
| | | }, |
| | | handleSubmit(){ |
| | | if(!this.checkedKeys || this.checkedKeys.length==0){ |
| | | this.$emit("ok",'') |
| | | }else{ |
| | | let checkRow = this.getCheckedRows(this.checkedKeys) |
| | | let keyStr = this.checkedKeys.join(",") |
| | | this.$emit("ok", checkRow, keyStr) |
| | | } |
| | | this.handleClear() |
| | | }, |
| | | handleCancel(){ |
| | | this.handleClear() |
| | | }, |
| | | handleClear(){ |
| | | this.visible=false |
| | | this.checkedKeys=[] |
| | | }, |
| | | getParentKey(currKey,treeData){ |
| | | let parentKey |
| | | for (let i = 0; i < treeData.length; i++) { |
| | | const node = treeData[i] |
| | | if (node.children) { |
| | | if (node.children.some(item => item.key === currKey)) { |
| | | parentKey = node.key |
| | | } else if (this.getParentKey(currKey, node.children)) { |
| | | parentKey = this.getParentKey(currKey, node.children) |
| | | } |
| | | } |
| | | } |
| | | return parentKey |
| | | }, |
| | | onSearch(value){ |
| | | const expandedKeys = this.dataList.map((item) => { |
| | | if (item.title.indexOf(value) > -1) { |
| | | return this.getParentKey(item.key,this.treeData) |
| | | } |
| | | return null |
| | | }).filter((item, i, self) => item && self.indexOf(item) === i) |
| | | |
| | | Object.assign(this, { |
| | | expandedKeys, |
| | | searchValue: value, |
| | | autoExpandParent: true, |
| | | }) |
| | | |
| | | |
| | | }, |
| | | // æ ¹æ® checkedKeys è·å rows |
| | | getCheckedRows(checkedKeys) { |
| | | const forChildren = (list, key) => { |
| | | for (let item of list) { |
| | | if (item.id === key) { |
| | | return item |
| | | } |
| | | if (item.children instanceof Array) { |
| | | let value = forChildren(item.children, key) |
| | | if (value != null) { |
| | | return value |
| | | } |
| | | } |
| | | } |
| | | return null |
| | | } |
| | | |
| | | let rows = [] |
| | | for (let key of checkedKeys) { |
| | | let row = forChildren(this.treeData, key) |
| | | if (row != null) { |
| | | rows.push(row) |
| | | } |
| | | } |
| | | return rows |
| | | }, |
| | | switchCheckStrictly (v) { |
| | | if(v==1){ |
| | | this.checkStrictly = false |
| | | }else if(v==2){ |
| | | this.checkStrictly = true |
| | | } |
| | | }, |
| | | isFullscreen(val){ |
| | | this.fullscreen=val |
| | | } |
| | | } |
| | | } |
| | | |
| | | </script> |
| | | |
| | | <style lang="less" scoped> |
| | | // éå¶é¨é¨éæ©æ é«åº¦ï¼é¿å
é¨é¨å¤ªå¤æ¶ç¹å»ç¡®å®ä¸ä¾¿ |
| | | .my-dept-select-tree{ |
| | | height:350px; |
| | | |
| | | &.fullscreen{ |
| | | height: calc(100vh - 250px); |
| | | } |
| | | overflow-y: scroll; |
| | | } |
| | | .drawer-bootom-button { |
| | | position: absolute; |
| | | bottom: 0; |
| | | width: 100%; |
| | | border-top: 1px solid #e8e8e8; |
| | | padding: 10px 16px; |
| | | text-align: right; |
| | | left: 0; |
| | | background: #fff; |
| | | border-radius: 0 0 2px 2px; |
| | | } |
| | | </style> |
| | |
| | | import Production from './modules/Production' |
| | | //é¨é¨æ æé |
| | | import DepartTree from './modules/DepartTree' |
| | | import factory from './modules/factory' |
| | | |
| | | Vue.use(Vuex) |
| | | |
| | |
| | | enhance, |
| | | online, |
| | | Production, |
| | | factory, |
| | | DepartTree |
| | | }, |
| | | state: { |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | import Vue from 'vue' |
| | | import { SET_FACTORY } from "@/store/mutation-types" |
| | | import { getAction } from '@/api/manage' |
| | | |
| | | const Factory = { |
| | | state: { |
| | | token: '', |
| | | //产线æ |
| | | FactoryTree:[] |
| | | |
| | | }, |
| | | |
| | | mutations: { |
| | | SET_TOKEN: (state, token) => { |
| | | state.token = token |
| | | }, |
| | | SET_FACTORY:(state,FactoryTree) => { |
| | | state.FactoryTree = FactoryTree |
| | | } |
| | | }, |
| | | |
| | | actions: { |
| | | // 产线æ |
| | | QueryFactory({ commit }) { |
| | | return new Promise((resolve, reject) => { |
| | | getAction("/mdc/mdcEquipment/queryTreeListByFactory").then(response => { |
| | | if(response.success){ |
| | | const result = response.result |
| | | Vue.ls.set(SET_FACTORY, result) |
| | | commit('SET_FACTORY', result) |
| | | resolve(response) |
| | | }else{ |
| | | resolve(response) |
| | | } |
| | | }).catch(error => { |
| | | reject(error) |
| | | }) |
| | | }) |
| | | }, |
| | | |
| | | |
| | | } |
| | | } |
| | | |
| | | export default Factory |
| | |
| | | //产线æ |
| | | export const SYS_PRODUCTION = 'SYS_PRODUCTION' |
| | | //é¨é¨æ æé |
| | | export const SYS_DEPARTTREE = 'SYS_DEPARTTREE' |
| | | export const SYS_DEPARTTREE = 'SYS_DEPARTTREE' |
| | | |
| | | export const SET_FACTORY = 'SET_FACTORY' |
| | |
| | | <script> |
| | | import UserModal from './modules/EquipmentList/UserModal' |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | import { queryProductionTreeListByMdc } from '@/api/api' |
| | | import { queryFactoryTreeList } from '@/api/api' |
| | | import { mapActions } from 'vuex' |
| | | |
| | | export default { |
| | |
| | | width: 200 |
| | | // sorter: true |
| | | }, |
| | | { |
| | | title: 'å®è£
ä½ç½®', |
| | | align: 'center', |
| | | width: 200, |
| | | dataIndex: 'equipmentAddress' |
| | | }, |
| | | // { |
| | | // title: 'å®è£
ä½ç½®', |
| | | // align: 'center', |
| | | // width: 200, |
| | | // dataIndex: 'equipmentAddress' |
| | | // }, |
| | | { |
| | | title: '车é´', |
| | | align: 'center', |
| | |
| | | * è°ç¨æ¥å£è·åæ¥è¯¢åºåè½¦é´æ å表 |
| | | */ |
| | | getWorkshopListByApi() { |
| | | queryProductionTreeListByMdc().then(res => { |
| | | queryFactoryTreeList().then(res => { |
| | | if (res.success) { |
| | | this.workshopTreeData = res.result |
| | | this.treeDefaultExpandedKeys = [...res.result].map(item => item.key) |
| | |
| | | |
| | | <!--车é´åé
--> |
| | | <a-form-model-item label="车é´åé
" :labelCol="labelCol" :wrapperCol="wrapperCol" v-show="!productionDisabled"> |
| | | <j-select-production v-model="model.selectedProduction" :multi="true" @back="backProductionInfo" :backProduction="true" :treeProductOpera="true"></j-select-production> |
| | | <j-select-production v-model="model.selectedFactory" :multi="true" @back="backProductionInfo" :backProduction="true" :treeProductOpera="true"></j-select-production> |
| | | </a-form-model-item> |
| | | |
| | | <a-form-model-item label="è´è´£é¨é¨" :labelCol="labelCol" :wrapperCol="wrapperCol" v-if="departIdShow==true"> |
| | |
| | | this.resetScreenSize(); |
| | | that.userId = record.id; |
| | | that.model = Object.assign({},{selectedroles:'',selecteddeparts:''}, record); |
| | | that.model = Object.assign({},{selectedroles:'',selectedProduction:''}, record); |
| | | that.model = Object.assign({},{selectedroles:'',selectedFactory:''}, record); |
| | | |
| | | //身份为ä¸çº§æ¾ç¤ºè´è´£é¨é¨ï¼å¦å䏿¾ç¤º |
| | | if(this.model.userIdentity==2){ |
| | |
| | | } |
| | | |
| | | that.model.selecteddeparts = selectDepartKeys.join(",") |
| | | that.model.selectedProduction = selectDepartKeys.join(",") |
| | | that.model.selectedFactory = selectDepartKeys.join(",") |
| | | |
| | | that.nextDepartOptions=departOptions; |
| | | console.log('that.nextDepartOptions=',that.nextDepartOptions) |
| | |
| | | }) |
| | | } |
| | | |
| | | that.model.selectedProduction = selectProductKeys.join(",") |
| | | that.model.selectedFactory = selectProductKeys.join(",") |
| | | |
| | | that.nextProductionOptions=ProductionOptions; |
| | | console.log('that.nextProductionOptions=',that.nextProductionOptions) |
| | |
| | | }) |
| | | }, |
| | | backProductionInfo(info) { |
| | | this.model.productionIds = this.model.selectedProduction; |
| | | this.model.productionIds = this.model.selectedFactory; |
| | | this.nextProductionOptions = info.map((item,index,arr)=>{ |
| | | let c = {label:item.text, value: item.value+""} |
| | | return c; |
| | |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="车é´åé
" v-show="!productionDisabled" |
| | | ref="selectedProduction" prop="selectedProduction"> |
| | | <a-form-model-item label="车é´åé
" v-show="!factoryDisabled" |
| | | ref="selectedFactory" prop="selectedFactory"> |
| | | <!--<j-select-equipment-production v-decorator="['selectedProduction',{rules:[{required:true,message:'è¯·éæ©è½¦é´!'}]}]" :multi="false" @back="backProductionInfo" :backProduction="true" :treeProductOpera="true"></j-select-equipment-production>--> |
| | | <j-select-equipment-production :disabled="disableSubmit" v-model="model.selectedProduction" :multi="false" |
| | | @back="backProductionInfo" :backProduction="true" |
| | | :treeProductOpera="true"></j-select-equipment-production> |
| | | <j-select-equipment-factory :disabled="disableSubmit" v-model="model.selectedFactory" :multi="false" |
| | | @back="backFactoryInfo" :backFactory="true" |
| | | :treeProductOpera="true"></j-select-equipment-factory> |
| | | </a-form-model-item> |
| | | |
| | | </a-col> |
| | |
| | | </a-row> |
| | | |
| | | <a-row :gutter="24"> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="ç³»ç»ç±»å"> |
| | | <j-dict-select-tag placeholder="è¯·éæ©ç³»ç»ç±»å" :triggerChange="true" dictCode="system_type" |
| | | :disabled="disableSubmit" |
| | | v-model="model.systemType" allow-clear/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <!-- <a-col :span="12">--> |
| | | <!-- <a-form-model-item label="ç³»ç»ç±»å">--> |
| | | <!-- <j-dict-select-tag placeholder="è¯·éæ©ç³»ç»ç±»å" :triggerChange="true" dictCode="system_type"--> |
| | | <!-- :disabled="true"--> |
| | | <!-- v-model="model.systemType" allow-clear/>--> |
| | | <!-- </a-form-model-item>--> |
| | | <!-- </a-col>--> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="æåº"> |
| | | <a-input :disabled="disableSubmit" :readOnly="disableSubmit" placeholder="请è¾å
¥æåº" |
| | |
| | | </a-col> |
| | | </a-row> |
| | | |
| | | <a-row :gutter="24"> |
| | | <a-col :span='12' v-if="systemType"> |
| | | <a-form-model-item label="ç³»ç»ç±»å"> |
| | | <a-radio-group name="radioGroup" v-model="systemValue" :disabled="disableSubmit"> |
| | | <a-radio value="1">DNC</a-radio> |
| | | <a-radio value="2">MDC</a-radio> |
| | | <a-radio value="3">éç¨</a-radio> |
| | | </a-radio-group> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span='12'> |
| | | <a-form-model-item label="å®è£
ä½ç½®"> |
| | | <a-input v-model="model.equipmentAddress" allow-clear placeholder="请è¾å
¥å®è£
ä½ç½®" :disabled="disableSubmit"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | <!-- <a-row :gutter="24">--> |
| | | <!-- <a-col :span='12' v-if="systemType">--> |
| | | <!-- <a-form-model-item label="ç³»ç»ç±»å">--> |
| | | <!-- <a-radio-group name="radioGroup" v-model="systemValue" :disabled="disableSubmit">--> |
| | | <!-- <a-radio value="1">DNC</a-radio>--> |
| | | <!-- <a-radio value="2">MDC</a-radio>--> |
| | | <!-- <a-radio value="3">éç¨</a-radio>--> |
| | | <!-- </a-radio-group>--> |
| | | <!-- </a-form-model-item>--> |
| | | <!-- </a-col>--> |
| | | <!-- <a-col :span='12'>--> |
| | | <!-- <a-form-model-item label="å®è£
ä½ç½®">--> |
| | | <!-- <a-input v-model="model.equipmentAddress" allow-clear placeholder="请è¾å
¥å®è£
ä½ç½®" :disabled="disableSubmit"/>--> |
| | | <!-- </a-form-model-item>--> |
| | | <!-- </a-col>--> |
| | | <!-- </a-row>--> |
| | | |
| | | |
| | | <a-row :gutter="24"> |
| | |
| | | import { addEquipment, editEquipment } from '@/api/api' |
| | | import { disabledAuthFilter } from '@/utils/authFilter' |
| | | import { duplicateCheck } from '@/api/api' |
| | | import JSelectEquipmentProduction from '../../../../../components/jeecgbiz/JSelectEquipmentProduction' |
| | | import JSelectProduction from '../../../../../components/jeecgbiz/JSelectProduction' |
| | | import JSelectEquipmentFactory from '../../../../../components/jeecgbiz/JSelectEquipmentFactory' |
| | | import JSelectFactory from '../../../../../components/jeecgbiz/JSelectFactory' |
| | | import DeviceListModel from './DeviceListModal' |
| | | import JSelectEquipmentDepart from '../../../../../components/jeecgbiz/JSelectEquipmentDepart' |
| | | import { mapActions } from 'vuex' |
| | |
| | | export default { |
| | | name: 'UserModal', |
| | | components: { |
| | | JSelectProduction, |
| | | JSelectFactory, |
| | | JSelectEquipmentDepart, |
| | | JSelectEquipmentProduction, |
| | | JSelectEquipmentFactory, |
| | | DeviceListModel |
| | | }, |
| | | data() { |
| | | return { |
| | | departDisabled: false, //æ¯å¦æ¯æçé¨é¨è°ç¨è¯¥é¡µé¢ |
| | | productionDisabled: false, //æ¯å¦æ¯æç车é´è°ç¨è¯¥é¡µé¢ |
| | | factoryDisabled: false, //æ¯å¦æ¯æç车é´è°ç¨è¯¥é¡µé¢ |
| | | roleDisabled: false, //æ¯å¦æ¯è§è²ç»´æ¤è°ç¨è¯¥é¡µé¢ |
| | | modalWidth: 800, |
| | | drawerWidth: 700, |
| | |
| | | ], |
| | | // trigger: 'blur' // è§¦åæ¹å¼ |
| | | |
| | | selectedProduction: |
| | | selectedFactory: |
| | | [ |
| | | { |
| | | required: true, message: 'è¯·éæ©è½¦é´ï¼' |
| | |
| | | fileUpload: window._CONFIG['domianURL'] + '/sys/common/upload', |
| | | userWithDepart: '/mdc/mdcEquipment/equipmentDepartList', // å¼å
¥ä¸ºæå®ç¨æ·æ¥çé¨é¨ä¿¡æ¯éè¦çurl |
| | | //å¼å
¥ä¸ºæå®ç¨æ·æ¥ç车é´ä¿¡æ¯éè¦çurl |
| | | userProductionList: '/mdc/mdcEquipment/equipmentProductionList', |
| | | equipmentFactoryList: '/mdc/mdcEquipment/equipmentFactoryList', |
| | | userId: '/sys/user/generateUserId', // å¼å
¥çææ·»å ç¨æ·æ
åµä¸çurl |
| | | syncUserByUserName: '/act/process/extActProcess/doSyncUserByUserName',//åæ¥ç¨æ·å°å·¥ä½æµ |
| | | queryTenantList: '/sys/tenant/queryList', |
| | |
| | | this.headers = { 'X-Access-Token': token } |
| | | this.queryGroup() |
| | | this.queryTreeData() |
| | | this.getAppPlatformName() |
| | | // this.getAppPlatformName() |
| | | // this.initRoleList() |
| | | // this.initTenantList() |
| | | }, |
| | |
| | | }).finally(() => { |
| | | }) |
| | | }, |
| | | getAppPlatformName() { |
| | | getAction(`/system/sysParams/query/by/settingKey?settingKey=system_type`).then(res => { |
| | | if (res.success) { |
| | | this.systemType = res.result.settingValue === '0' |
| | | } |
| | | }) |
| | | }, |
| | | // getAppPlatformName() { |
| | | // getAction(`/system/sysParams/query/by/settingKey?settingKey=system_type`).then(res => { |
| | | // if (res.success) { |
| | | // this.systemType = res.result.settingValue === '0' |
| | | // } |
| | | // }) |
| | | // }, |
| | | queryGroup() { |
| | | getAction(this.url.queryEquipmentType).then(res => { |
| | | if (res.success) { |
| | |
| | | // this.model = Object.assign({}, record) |
| | | |
| | | this.$nextTick(() => { |
| | | this.form.setFieldsValue(pick(that.model, 'selectedDeparts', 'selectedProduction', 'equipmentId', 'equipmentName', 'equipmentModel', 'equipmentType', 'equipmentIp', 'dataPort', |
| | | this.form.setFieldsValue(pick(that.model, 'selectedDeparts', 'selectedFactory', 'equipmentId', 'equipmentName', 'equipmentModel', 'equipmentType', 'equipmentIp', 'dataPort', |
| | | 'driveType', 'sortNo', 'remark', 'systemVersion', 'devicePower', 'controlSystem', 'saveTableName', 'systemValue', 'equipmentAddress')) |
| | | }) |
| | | if (record.hasOwnProperty('id')) { |
| | |
| | | } |
| | | }) |
| | | |
| | | getAction(that.url.userProductionList, { equipmentId: userid }).then((res) => { |
| | | getAction(that.url.equipmentFactoryList, { equipmentId: userid }).then((res) => { |
| | | if (res.success) { |
| | | // console.log(res.result) |
| | | let ProductionOptions = [] |
| | | let factoryOptions = [] |
| | | let selectProductKeys = [] |
| | | // console.log(res.result) |
| | | for (let i = 0; i < res.result.length; i++) { |
| | | selectProductKeys.push(res.result[i].key) |
| | | //æ°å¢è´è´£é¨é¨éæ©ä¸ææ¡ |
| | | ProductionOptions.push({ |
| | | factoryOptions.push({ |
| | | value: res.result[i].key, |
| | | label: res.result[i].title |
| | | }) |
| | | } |
| | | |
| | | that.model.selectedProduction = selectProductKeys.join(',') |
| | | that.model.selectedFactory = selectProductKeys.join(',') |
| | | |
| | | that.nextProductionOptions = ProductionOptions |
| | | that.nextProductionOptions = factoryOptions |
| | | // console.log('that.nextProductionOptions=',that.nextProductionOptions) |
| | | } |
| | | }) |
| | |
| | | return c |
| | | }) |
| | | }, |
| | | backProductionInfo(info) { |
| | | backFactoryInfo(info) { |
| | | // console.log(info) |
| | | this.model.productionIds = this.model.selectedProduction |
| | | this.model.productionIds = this.model.selectedFactory |
| | | this.nextProductionOptions = info.map((item, index, arr) => { |
| | | let c = { label: item.text, value: item.value + '' } |
| | | return c |
| | |
| | | } |
| | | , |
| | | methods: { |
| | | ...mapActions(['QueryProduction']), |
| | | ...mapActions(['QueryFactory']), |
| | | getCurrSelectedTitle() { |
| | | return !this.currSelected.title ? '' : this.currSelected.title |
| | | }, |
| | |
| | | queryTreeData() { |
| | | this.loading = true |
| | | this.cardLoading = true |
| | | this.QueryProduction().then(res => { |
| | | this.QueryFactory().then(res => { |
| | | if (res.success) { |
| | | this.dataList = [] |
| | | this.allTreeKeys = [] |
| | |
| | | </a-col> |
| | | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
| | | <a-form-item label="订åç±»å"> |
| | | <j-dict-select-tag dictCode="orderCategory" placeholder="请è¾å
¥è®¢åç±»å" |
| | | <j-dict-select-tag dictCode="production_order_category" placeholder="è¯·éæ©è®¢åç±»å" |
| | | v-model="queryParam.orderCategory"></j-dict-select-tag> |
| | | </a-form-item> |
| | | </a-col> |
| | |
| | | </a-col> |
| | | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
| | | <a-form-item label="订åç¶æ"> |
| | | <j-dict-select-tag dictCode="order_status" placeholder="请è¾å
¥è®¢åç¶æ" |
| | | v-model="queryParam.order_status"></j-dict-select-tag> |
| | | </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.processRoute"></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.materialListCode"></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.factoryCode"></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.factoryName"></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.customerOrderModel"></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.customer"></j-input> |
| | | <j-dict-select-tag dictCode="production_order_status" placeholder="è¯·éæ©è®¢åç¶æ" |
| | | v-model="queryParam.orderStatus"></j-dict-select-tag> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
| | | <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons"> |
| | | <a-button type="primary" @click="searchQuery" icon="search">æ¥è¯¢</a-button> |
| | | <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">éç½®</a-button> |
| | | <a-button type="info" @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> |
| | |
| | | :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> |
| | | <a @click="handleDetail(record)">详æ
</a> |
| | | </span> |
| | | |
| | | </a-table> |
| | | </div> |
| | | |
| | |
| | | import { mixinDevice } from '@/utils/mixin' |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | import MesProductionOrderModal from './modules/MesProductionOrderModal' |
| | | import { filterMultiDictText } from '@/components/dict/JDictSelectUtil' |
| | | |
| | | export default { |
| | | name: 'MesProductionOrderList', |
| | |
| | | align: 'center', |
| | | customRender: function(t, r, index) { |
| | | return parseInt(index) + 1 |
| | | } |
| | | }, |
| | | fixed: 'left', |
| | | }, |
| | | { |
| | | title: 'ç产订åå·', |
| | | align: 'center', |
| | | dataIndex: 'orderCode' |
| | | dataIndex: 'orderCode', |
| | | fixed: 'left', |
| | | }, |
| | | { |
| | | title: '订åç±»å', |
| | | align: 'center', |
| | | dataIndex: 'orderCategory' |
| | | dataIndex: 'orderCategory_dictText', |
| | | fixed: 'left', |
| | | }, |
| | | { |
| | | title: 'ç©æç¼å·', |
| | | align: 'center', |
| | | dataIndex: 'materialNumber' |
| | | dataIndex: 'materialNumber', |
| | | fixed: 'left', |
| | | }, |
| | | { |
| | | title: 'ç©æåç§°', |
| | |
| | | dataIndex: 'orderQuantity' |
| | | }, |
| | | { |
| | | title: '产ååä½', |
| | | title: 'åºæ¬è®¡éåä½', |
| | | align: 'center', |
| | | dataIndex: 'productionUnit_dictText' |
| | | dataIndex: 'productionUnit' |
| | | }, |
| | | { |
| | | title: '订åç¶æ', |
| | | align: 'center', |
| | | dataIndex: 'orderStatus_dictText' |
| | | dataIndex: 'orderStatus' |
| | | }, |
| | | { |
| | | title: '订åç¶ææè¿°', |
| | | align: 'center', |
| | | dataIndex: 'orderStatusName' |
| | | }, |
| | | { |
| | | title: 'ä¼å
级', |
| | | align: 'center', |
| | | dataIndex: 'priority_dictText' |
| | | dataIndex: 'priority' |
| | | }, |
| | | { |
| | | title: '计åå·¥èºè·¯çº¿', |
| | |
| | | title: 'å·¥ååç§°', |
| | | align: 'center', |
| | | dataIndex: 'factoryName' |
| | | }, |
| | | { |
| | | title: 'è°åº¦åç¼å·', |
| | | align: 'center', |
| | | dataIndex: 'dispatcherCode' |
| | | }, |
| | | { |
| | | title: 'è°åº¦ååç§°', |
| | | align: 'center', |
| | | dataIndex: 'dispatcherName' |
| | | }, |
| | | { |
| | | title: '订ååå»ºæ¥æ', |
| | | align: 'center', |
| | | dataIndex: 'orderCreateDate' |
| | | }, |
| | | { |
| | | title: 'è®¢åæ´æ°æ¥æ', |
| | | align: 'center', |
| | | dataIndex: 'orderUpdateDate' |
| | | }, |
| | | { |
| | | title: 'è®¢åæ´æ°æ¶é´', |
| | | align: 'center', |
| | | dataIndex: 'orderUpdateTime' |
| | | }, |
| | | { |
| | | title: '订åä¿®æ¹äºº', |
| | | align: 'center', |
| | | dataIndex: 'orderUpdateUser' |
| | | }, |
| | | { |
| | | title: '客æ·åå·', |
| | |
| | | } |
| | | ], |
| | | url: { |
| | | list: '/mesproductionwork/mesProductionOrder/list', |
| | | delete: '/mesproductionwork/mesProductionOrder/delete', |
| | | deleteBatch: '/mesproductionwork/mesProductionOrder/deleteBatch', |
| | | exportXlsUrl: '/mesproductionwork/mesProductionOrder/exportXls', |
| | | importExcelUrl: 'mesproductionwork/mesProductionOrder/importExcel' |
| | | |
| | | list: '/mes/productionOrder/list', |
| | | }, |
| | | 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: 'orderCode', text: 'ç产订åå·', dictCode: '' }) |
| | | fieldList.push({ type: 'string', value: 'orderCategory', text: '订åç±»å', dictCode: '' }) |
| | | fieldList.push({ type: 'string', value: 'materialNumber', text: 'ç©æç¼å·', dictCode: '' }) |
| | | fieldList.push({ type: 'string', value: 'materialName', text: 'ç©æåç§°', dictCode: '' }) |
| | | fieldList.push({ type: 'datetime', value: 'planStart', text: '计åå¼å§æ¥æ' }) |
| | | fieldList.push({ type: 'datetime', value: 'planEnd', text: '计åç»ææ¥æ' }) |
| | | fieldList.push({ type: 'double', value: 'orderQuantity', text: 'è®¢åæ°é', dictCode: '' }) |
| | | fieldList.push({ type: 'string', value: 'productionUnit', text: '产ååä½', dictCode: 'production_unit' }) |
| | | fieldList.push({ type: 'string', value: 'orderStatus', text: '订åç¶æ', dictCode: 'order_status' }) |
| | | fieldList.push({ type: 'string', value: 'priority', text: 'ä¼å
级', dictCode: 'priority' }) |
| | | fieldList.push({ type: 'string', value: 'processRoute', text: '计åå·¥èºè·¯çº¿', dictCode: '' }) |
| | | fieldList.push({ type: 'string', value: 'materialListCode', text: '计åç©ææ¸
å', dictCode: '' }) |
| | | fieldList.push({ type: 'string', value: 'factoryCode', text: 'å·¥åç¼ç ', dictCode: '' }) |
| | | fieldList.push({ type: 'string', value: 'factoryName', text: 'å·¥ååç§°', dictCode: '' }) |
| | | fieldList.push({ type: 'string', value: 'customerOrderModel', text: '客æ·åå·', dictCode: '' }) |
| | | fieldList.push({ type: 'string', value: 'customer', text: '客æ·åç§°', dictCode: '' }) |
| | | fieldList.push({ type: 'string', value: 'remark', text: '夿³¨', dictCode: '' }) |
| | | this.superFieldList = fieldList |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | |
| | | <template> |
| | | <a-spin :spinning="confirmLoading"> |
| | | <j-form-container disabled> |
| | | <a-form-model ref="form1" :model="model" :rules="validatorRules" slot="detail"> |
| | | <a-row> |
| | | <a-col :span="8"> |
| | | <a-form-model-item label="ç产订åå·" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="orderCode"> |
| | | <a-input v-model="model.orderCode" ></a-input> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="8"> |
| | | <a-form-model-item label="订åç±»å" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="orderCategory"> |
| | | <j-dict-select-tag v-model="model.orderCategory" dictCode="production_order_category"></j-dict-select-tag> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="8"> |
| | | <a-form-model-item label="ç©æç¼å·" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="materialNumber"> |
| | | <a-input v-model="model.materialNumber"></a-input> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="8"> |
| | | <a-form-model-item label="ç©æåç§°" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="materialName"> |
| | | <a-input v-model="model.materialName"></a-input> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="8"> |
| | | <a-form-model-item label="计åå¼å§æ¥æ" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="planStart"> |
| | | <j-date v-model="model.planStart" :show-time="true" |
| | | date-format="YYYY-MM-DD" style="width: 100%" /> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="8"> |
| | | <a-form-model-item label="计åç»ææ¥æ" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="planEnd"> |
| | | <j-date v-model="model.planEnd" :show-time="true" |
| | | date-format="YYYY-MM-DD" style="width: 100%" /> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="8"> |
| | | <a-form-model-item label="è®¢åæ°é" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="orderQuantity"> |
| | | <a-input-number v-model="model.orderQuantity" style="width: 100%" /> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="8"> |
| | | <a-form-model-item label="åºæ¬è®¡éåä½" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="productionUnit"> |
| | | <a-input v-model="model.productionUnit" /> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="8"> |
| | | <a-form-model-item label="订åç¶æ" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="orderStatus"> |
| | | <a-input v-model="model.orderStatus" /> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="8"> |
| | | <a-form-model-item label="订åç¶ææè¿°" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="orderStatusName"> |
| | | <a-input v-model="model.orderStatusName" /> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="8"> |
| | | <a-form-model-item label="ä¼å
级" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="priority"> |
| | | <a-input v-model="model.priority" /> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="8"> |
| | | <a-form-model-item label="计åå·¥èºè·¯çº¿" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="processRoute"> |
| | | <a-input v-model="model.processRoute" placeholder="请è¾å
¥è®¡åå·¥èºè·¯çº¿"></a-input> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="8"> |
| | | <a-form-model-item label="计åç©ææ¸
å" :labelCol="labelCol" :wrapperCol="wrapperCol" |
| | | prop="materialListCode"> |
| | | <a-input v-model="model.materialListCode"></a-input> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="8"> |
| | | <a-form-model-item label="å·¥åç¼ç " :labelCol="labelCol" :wrapperCol="wrapperCol" prop="factoryCode"> |
| | | <a-input v-model="model.factoryCode"></a-input> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="8"> |
| | | <a-form-model-item label="å·¥ååç§°" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="factoryName"> |
| | | <a-input v-model="model.factoryName" ></a-input> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="8"> |
| | | <a-form-model-item label="è°åº¦åç¼å·" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="dispatcherCode"> |
| | | <a-input v-model="model.dispatcherCode"></a-input> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="8"> |
| | | <a-form-model-item label="è°åº¦ååç§°" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="dispatcherName"> |
| | | <a-input v-model="model.dispatcherName" ></a-input> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="8"> |
| | | <a-form-model-item label="订ååå»ºæ¥æ" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="orderCreateDate"> |
| | | <a-input v-model="model.orderCreateDate"></a-input> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="8"> |
| | | <a-form-model-item label="è®¢åæ´æ°æ¥æ" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="orderUpdateDate"> |
| | | <a-input v-model="model.orderUpdateDate" ></a-input> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="8"> |
| | | <a-form-model-item label="è®¢åæ´æ°æ¶é´" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="orderUpdateTime"> |
| | | <a-input v-model="model.orderUpdateTime"></a-input> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="8"> |
| | | <a-form-model-item label="订åä¿®æ¹äºº" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="orderUpdateUser"> |
| | | <a-input v-model="model.orderUpdateUser" ></a-input> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | </a-form-model> |
| | | </j-form-container> |
| | | <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="orderCode"> |
| | | <a-input v-model="model.orderCode" placeholder="请è¾å
¥ç产订åå·" ></a-input> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="订åç±»å" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="orderCategory"> |
| | | <j-dict-select-tag v-model="model.orderCategory" dictCode="orderCategory" placeholder="请è¾å
¥è®¢åç±»å" ></j-dict-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="planStart"> |
| | | <j-date placeholder="è¯·éæ©è®¡åå¼å§æ¥æ" v-model="model.planStart" :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" style="width: 100%" /> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="计åç»ææ¥æ" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="planEnd"> |
| | | <j-date placeholder="è¯·éæ©è®¡åç»ææ¥æ" v-model="model.planEnd" :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" style="width: 100%" /> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="è®¢åæ°é" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="orderQuantity"> |
| | | <a-input-number v-model="model.orderQuantity" placeholder="请è¾å
¥è®¢åæ°é" style="width: 100%" /> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="产ååä½" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="productionUnit"> |
| | | <j-dict-select-tag type="list" v-model="model.productionUnit" dictCode="production_unit" placeholder="è¯·éæ©äº§ååä½" /> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="订åç¶æ" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="orderStatus"> |
| | | <j-dict-select-tag type="list" v-model="model.orderStatus" dictCode="order_status" placeholder="è¯·éæ©è®¢åç¶æ" /> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="ä¼å
级" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="priority"> |
| | | <j-dict-select-tag type="list" v-model="model.priority" dictCode="priority" placeholder="è¯·éæ©ä¼å
级" /> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="计åå·¥èºè·¯çº¿" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="processRoute"> |
| | | <a-input v-model="model.processRoute" placeholder="请è¾å
¥è®¡åå·¥èºè·¯çº¿" ></a-input> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="计åç©ææ¸
å" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="materialListCode"> |
| | | <a-input v-model="model.materialListCode" placeholder="请è¾å
¥è®¡åç©ææ¸
å" ></a-input> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="å·¥åç¼ç " :labelCol="labelCol" :wrapperCol="wrapperCol" prop="factoryCode"> |
| | | <a-input v-model="model.factoryCode" placeholder="请è¾å
¥å·¥åç¼ç " ></a-input> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="å·¥ååç§°" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="factoryName"> |
| | | <a-input v-model="model.factoryName" placeholder="请è¾å
¥å·¥ååç§°" ></a-input> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="客æ·åå·" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="customerOrderModel"> |
| | | <a-input v-model="model.customerOrderModel" placeholder="请è¾å
¥å®¢æ·åå·" ></a-input> |
| | | <a-input v-model="model.customerOrderModel" placeholder="请è¾å
¥å®¢æ·åå·"></a-input> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="客æ·åç§°" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="customer"> |
| | | <a-input v-model="model.customer" placeholder="请è¾å
¥å®¢æ·åç§°" ></a-input> |
| | | <a-input v-model="model.customer" placeholder="请è¾å
¥å®¢æ·åç§°"></a-input> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="夿³¨" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="remark"> |
| | | <a-input v-model="model.remark" placeholder="请è¾å
¥å¤æ³¨" ></a-input> |
| | | <a-col :span="24"> |
| | | <a-form-model-item label="夿³¨" :labelCol="labelColLong" :wrapperCol="wrapperColLong" prop="remark"> |
| | | <a-textarea v-model="model.remark" placeholder="请è¾å
¥å¤æ³¨"></a-textarea> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | |
| | | |
| | | <script> |
| | | |
| | | import { httpAction, getAction } from '@/api/manage' |
| | | import { validateDuplicateValue } from '@/utils/util' |
| | | import { httpAction } from '@/api/manage' |
| | | |
| | | export default { |
| | | name: 'MesProductionOrderForm', |
| | | components: { |
| | | }, |
| | | props: { |
| | | //表åç¦ç¨ |
| | | disabled: { |
| | | type: Boolean, |
| | | default: false, |
| | | required: false |
| | | export default { |
| | | name: 'MesProductionOrderForm', |
| | | components: {}, |
| | | props: { |
| | | //表åç¦ç¨ |
| | | disabled: { |
| | | type: Boolean, |
| | | default: false, |
| | | required: false |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | model: {}, |
| | | labelCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 6 } |
| | | }, |
| | | wrapperCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 16 } |
| | | }, |
| | | labelColLong: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 3 } |
| | | }, |
| | | wrapperColLong: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 20 } |
| | | }, |
| | | confirmLoading: false, |
| | | validatorRules: {}, |
| | | url: { |
| | | edit: '/mes/productionOrder/edit', |
| | | queryById: '/mes/productionOrder/queryById' |
| | | } |
| | | } |
| | | }, |
| | | computed: { |
| | | formDisabled() { |
| | | return this.disabled |
| | | } |
| | | }, |
| | | created() { |
| | | //å¤ä»½modelåå§å¼ |
| | | this.modelDefault = JSON.parse(JSON.stringify(this.model)) |
| | | }, |
| | | methods: { |
| | | add() { |
| | | this.edit(this.modelDefault) |
| | | }, |
| | | data () { |
| | | return { |
| | | model:{ |
| | | }, |
| | | labelCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 5 }, |
| | | }, |
| | | wrapperCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 16 }, |
| | | }, |
| | | confirmLoading: false, |
| | | validatorRules: { |
| | | }, |
| | | url: { |
| | | add: "/mesproductionwork/mesProductionOrder/add", |
| | | edit: "/mesproductionwork/mesProductionOrder/edit", |
| | | queryById: "/mesproductionwork/mesProductionOrder/queryById" |
| | | } |
| | | } |
| | | edit(record) { |
| | | this.model = Object.assign({}, record) |
| | | this.visible = true |
| | | }, |
| | | 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; |
| | | }) |
| | | 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> |
| | |
| | | :okButtonProps="{ class:{'jee-hidden': disableSubmit} }" |
| | | @cancel="handleCancel" |
| | | cancelText="å
³é"> |
| | | <mes-production-order-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></mes-production-order-form> |
| | | <mes-production-order-form ref="realForm" @ok="submitCallback" |
| | | :disabled="disableSubmit"></mes-production-order-form> |
| | | </j-modal> |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | import MesProductionOrderForm from './MesProductionOrderForm' |
| | | export default { |
| | | name: 'MesProductionOrderModal', |
| | | components: { |
| | | MesProductionOrderForm |
| | | import MesProductionOrderForm from './MesProductionOrderForm' |
| | | |
| | | export default { |
| | | name: 'MesProductionOrderModal', |
| | | components: { |
| | | MesProductionOrderForm |
| | | }, |
| | | data() { |
| | | return { |
| | | title: '', |
| | | width: 1200, |
| | | visible: false, |
| | | disableSubmit: false |
| | | } |
| | | }, |
| | | methods: { |
| | | add() { |
| | | this.visible = true |
| | | this.$nextTick(() => { |
| | | this.$refs.realForm.add() |
| | | }) |
| | | }, |
| | | data () { |
| | | return { |
| | | title:'', |
| | | width:896, |
| | | visible: false, |
| | | disableSubmit: false |
| | | } |
| | | edit(record) { |
| | | this.visible = true |
| | | this.$nextTick(() => { |
| | | this.$refs.realForm.edit(record) |
| | | }) |
| | | }, |
| | | 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() |
| | | } |
| | | close() { |
| | | this.$emit('close') |
| | | this.visible = false |
| | | }, |
| | | handleOk() { |
| | | this.$refs.realForm.submitForm() |
| | | }, |
| | | submitCallback() { |
| | | this.$emit('ok') |
| | | this.visible = false |
| | | }, |
| | | handleCancel() { |
| | | this.close() |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | |
| | | <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-col :xl="4" :lg="7" :md="8" :sm="24"> |
| | | <a-form-item label="订åå·"> |
| | | <a-input placeholder="请è¾å
¥è®¢åå·" v-model="queryParam.orderCode" allowClear></a-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :xl="4" :lg="7" :md="8" :sm="24"> |
| | | <a-form-item label="ç©æç¼ç "> |
| | | <j-input placeholder="请è¾å
¥ç©æç¼ç " v-model="queryParam.materialNumber"></j-input> |
| | | <a-input placeholder="请è¾å
¥ç©æç¼ç " v-model="queryParam.materialNumber" allowClear></a-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-input placeholder="请è¾å
¥ç©æåç§°" v-model="queryParam.materialName" allowClear></a-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :xl="4" :lg="7" :md="8" :sm="24"> |
| | | <a-form-item label="å·¥åºå·"> |
| | | <a-input placeholder="请è¾å
¥å·¥åºå·" v-model="queryParam.processCode" allowClear></a-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> |
| | | <a-button type="info" @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" |
| | |
| | | :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> |
| | | <a @click="handleDetail(record)">详æ
</a> |
| | | </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' |
| | | 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' } |
| | | 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 |
| | | } |
| | | ], |
| | | 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}`; |
| | | { |
| | | title: '订åå·', |
| | | align: 'center', |
| | | dataIndex: 'orderCode' |
| | | }, |
| | | { |
| | | title: 'ç©æç¼ç ', |
| | | align: 'center', |
| | | dataIndex: 'materialNumber' |
| | | }, |
| | | { |
| | | title: 'ç©æåç§°', |
| | | align: 'center', |
| | | dataIndex: 'materialName' |
| | | }, |
| | | { |
| | | 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/materialProcess/list' |
| | | |
| | | }, |
| | | }, |
| | | 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 |
| | | } |
| | | dictOptions: {} |
| | | } |
| | | } |
| | | }, |
| | | created() { |
| | | }, |
| | | computed: {}, |
| | | methods: {} |
| | | } |
| | | </script> |
| | | <style scoped> |
| | | @import '~@assets/less/common.less'; |
| | | @import '~@assets/less/common.less'; |
| | | </style> |
| | |
| | | <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="订åå·"> |
| | | <a-input placeholder="请è¾å
¥è®¢åå·" v-model="queryParam.orderCode" allowClear></a-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.materialNumber"></j-input> |
| | | <a-input placeholder="请è¾å
¥ç©æç¼ç " v-model="queryParam.materialNumber" allowClear></a-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-input placeholder="请è¾å
¥ç©æåç§°" v-model="queryParam.materialName" allowClear></a-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> |
| | | <a-button type="info" @click="searchReset" icon="reload" style="margin-left: 8px">éç½®</a-button> |
| | | </span> |
| | | </a-col> |
| | | </a-row> |
| | |
| | | </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" |
| | |
| | | :dataSource="dataSource" |
| | | :pagination="ipagination" |
| | | :loading="loading" |
| | | :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" |
| | | class="j-table-force-nowrap" |
| | | :expandedRowKeys.sync="expandedRowKeys" |
| | | @expand="handleExpand" |
| | | @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> |
| | | |
| | | <a-table |
| | | slot="expandedRowRender" |
| | | slot-scope="text" |
| | | :scroll="{x:true}" |
| | | :columns="innerColumns" |
| | | :data-source="innerData" |
| | | :pagination="false" |
| | | ></a-table> |
| | | <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> |
| | | <a @click="handleDetail(record)">详æ
</a> |
| | | </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' |
| | | import '@/assets/less/TableExpand.less' |
| | | import { mixinDevice } from '@/utils/mixin' |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | import PmsProcessBillMaterialsModal from './modules/PmsProcessBillMaterialsModal' |
| | | 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' } |
| | | export default { |
| | | name: 'PmsProcessBillMaterialsList', |
| | | mixins: [JeecgListMixin, mixinDevice], |
| | | components: { |
| | | PmsProcessBillMaterialsModal |
| | | }, |
| | | data() { |
| | | return { |
| | | description: '订åBOM管ç页é¢', |
| | | innerData: [], |
| | | expandedRowKeys: [], |
| | | // 表头 |
| | | columns: [ |
| | | { |
| | | title: '#', |
| | | dataIndex: '', |
| | | key: 'rowIndex', |
| | | width: 60, |
| | | align: 'center', |
| | | customRender: function(t, r, index) { |
| | | return parseInt(index) + 1 |
| | | } |
| | | ], |
| | | 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}`; |
| | | { |
| | | title: '订åå·', |
| | | align: 'center', |
| | | dataIndex: 'orderCode' |
| | | }, |
| | | { |
| | | title: 'ç©æç¼ç ', |
| | | align: 'center', |
| | | dataIndex: 'materialNumber' |
| | | }, |
| | | { |
| | | title: 'ç©æåç§°', |
| | | align: 'center', |
| | | dataIndex: 'materialName' |
| | | }, |
| | | { |
| | | title: 'åºæ¬åä½', |
| | | align: 'center', |
| | | dataIndex: 'productionUnit' |
| | | }, |
| | | { |
| | | title: 'è®¢åæ°é', |
| | | align: 'center', |
| | | dataIndex: 'productionQuantity' |
| | | }, |
| | | { |
| | | title: 'æä½', |
| | | dataIndex: 'action', |
| | | align: 'center', |
| | | width: 147, |
| | | scopedSlots: { customRender: 'action' } |
| | | } |
| | | ], |
| | | innerColumns: [ |
| | | { |
| | | 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: 'åºæ¬åä½', |
| | | align: 'center', |
| | | dataIndex: 'productionUnit' |
| | | }, |
| | | { |
| | | title: 'éæ±æ°é', |
| | | align: 'center', |
| | | dataIndex: 'usageQuantity' |
| | | } |
| | | ], |
| | | url: { |
| | | list: '/pms/processBillMaterials/list', |
| | | queryByMaterialId: '/pms/processBillMaterialsDetail/queryByMaterialId' |
| | | }, |
| | | }, |
| | | methods: { |
| | | handleMaterialClick(record){ |
| | | console.log('record----->',record) |
| | | getAction(this.url.queryByMaterialId,{'materialId':record.id}).then(res=>{ |
| | | } |
| | | }, |
| | | created() { |
| | | }, |
| | | computed: {}, |
| | | methods: { |
| | | handleExpand(expanded, record) { |
| | | let that = this |
| | | if(expanded) { |
| | | this.expandedRowKeys = [record.id]; |
| | | getAction(that.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; |
| | | this.innerData = [...res.result]; |
| | | }else{ |
| | | this.$message.error('没æ¥å°æ°æ®ï¼è¯·è系管çå') |
| | | that.$message.warning(res.message); |
| | | this.innerData = []; |
| | | } |
| | | }) |
| | | }, |
| | | 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 |
| | | } else { |
| | | this.expandedRowKeys = []; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | <style scoped> |
| | | @import '~@assets/less/common.less'; |
| | | @import '~@assets/less/common.less'; |
| | | </style> |
| | |
| | | <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="orderCode"> |
| | | <a-input v-model="model.orderCode"></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-input v-model="model.materialNumber"></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-input v-model="model.materialName"></a-input> |
| | | </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-input v-model="model.processCode"></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-input v-model="model.processName"></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-input v-model="model.controlCode"></a-input> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | |
| | | |
| | | <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 |
| | | export default { |
| | | name: 'PmsMaterialProcessForm', |
| | | components: {}, |
| | | props: { |
| | | //表åç¦ç¨ |
| | | disabled: { |
| | | type: Boolean, |
| | | default: false, |
| | | required: false |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | model: {}, |
| | | labelCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 5 } |
| | | }, |
| | | wrapperCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 16 } |
| | | }, |
| | | confirmLoading: false, |
| | | validatorRules: {}, |
| | | url: {} |
| | | } |
| | | }, |
| | | computed: { |
| | | formDisabled() { |
| | | return this.disabled |
| | | } |
| | | }, |
| | | created() { |
| | | //å¤ä»½modelåå§å¼ |
| | | this.modelDefault = JSON.parse(JSON.stringify(this.model)) |
| | | }, |
| | | methods: { |
| | | add() { |
| | | this.edit(this.modelDefault) |
| | | }, |
| | | 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; |
| | | }) |
| | | } |
| | | |
| | | }) |
| | | }, |
| | | edit(record) { |
| | | this.model = Object.assign({}, record) |
| | | this.visible = true |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | |
| | | <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 label="订åå·" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="orderCode"> |
| | | <a-input v-model="model.orderCode"></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-input v-model="model.materialNumber"></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-input v-model="model.materialName"></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-input v-model="model.productionUnit"></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-input-number v-model="model.productionQuantity" 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 } from '@/api/manage' |
| | | |
| | | 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; |
| | | }) |
| | | } |
| | | |
| | | }) |
| | | }, |
| | | 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: { |
| | | }, |
| | | url: { |
| | | } |
| | | } |
| | | }, |
| | | 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 |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | |
| | | :okButtonProps="{ class:{'jee-hidden': disableSubmit} }" |
| | | @cancel="handleCancel" |
| | | cancelText="å
³é"> |
| | | <pms-process-bill-materials-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></pms-process-bill-materials-form> |
| | | <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 |
| | | 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() |
| | | }) |
| | | }, |
| | | data () { |
| | | return { |
| | | title:'', |
| | | width:896, |
| | | visible: false, |
| | | disableSubmit: false |
| | | } |
| | | edit(record) { |
| | | this.visible = true |
| | | this.$nextTick(() => { |
| | | this.$refs.realForm.edit(record) |
| | | }) |
| | | }, |
| | | 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() |
| | | } |
| | | 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="24"> |
| | | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
| | | <a-form-item label="APIåç±»"> |
| | | <j-search-select-tag |
| | | placeholder="è¯·éæ©APIåç±»" |
| | | v-model="queryParam.apiCategory" |
| | | dict="api_log_category" |
| | | /> |
| | | </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.apiName"></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> |
| | | |
| | | <!-- tableåºå-begin --> |
| | | <div> |
| | | <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> |
| | | <i class="anticon anticon-info-circle ant-alert-icon"></i> 已鿩 <a |
| | | style="font-weight: 600">{{ selectedRowKeys.length }}</a>项 |
| | | <a style="margin-left: 24px" @click="onClearSelected">æ¸
空</a> |
| | | </div> |
| | | |
| | | <a-table |
| | | ref="table" |
| | | size="middle" |
| | | bordered |
| | | rowKey="id" |
| | | :columns="columns" |
| | | :dataSource="dataSource" |
| | | :pagination="ipagination" |
| | | :loading="loading" |
| | | :scroll="{ x: 200 }" |
| | | :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" |
| | | @change="handleTableChange"> |
| | | <span slot="action" slot-scope="text, record"> |
| | | <a @click="handleDetail(record)">详æ
</a> |
| | | </span> |
| | | </a-table> |
| | | </div> |
| | | <!-- tableåºå-end --> |
| | | |
| | | <!-- 表ååºå --> |
| | | <sysApiLog-modal ref="modalForm" @ok="modalFormOk"></sysApiLog-modal> |
| | | </a-card> |
| | | </template> |
| | | |
| | | <script> |
| | | import '@/assets/less/TableExpand.less' |
| | | import SysApiLogModal from './modules/SysApiLogModal' |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | |
| | | export default { |
| | | name: 'SysApiLogList', |
| | | mixins: [JeecgListMixin], |
| | | components: { |
| | | SysApiLogModal |
| | | }, |
| | | data() { |
| | | return { |
| | | description: 'ç³»ç»ç¬¬ä¸æ¹éææ¥å£æ¥å¿ç®¡ç页é¢', |
| | | // 表头 |
| | | columns: [ |
| | | { |
| | | title: '#', |
| | | dataIndex: '', |
| | | key: 'rowIndex', |
| | | width: 60, |
| | | align: 'center', |
| | | customRender: function(t, r, index) { |
| | | return parseInt(index) + 1 |
| | | }, |
| | | fixed: 'left', |
| | | }, |
| | | { |
| | | title: 'APIåç±»', |
| | | align: 'center', |
| | | dataIndex: 'apiCategory', |
| | | fixed: 'left', |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: 'æ¥å£åç§°', |
| | | align: 'center', |
| | | dataIndex: 'apiName', |
| | | fixed: 'left', |
| | | width: 200, |
| | | ellipsis: true, |
| | | }, |
| | | { |
| | | title: 'è¯·æ±æ¶é´', |
| | | align: 'center', |
| | | dataIndex: 'requestTime', |
| | | width: 150, |
| | | }, |
| | | { |
| | | title: 'ååºæ¶é´', |
| | | align: 'center', |
| | | dataIndex: 'responseTime', |
| | | width: 150, |
| | | }, |
| | | { |
| | | title: 'è¯·æ±æ¹å¼', |
| | | align: 'center', |
| | | dataIndex: 'requestMethod', |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: '请æ±URL', |
| | | align: 'center', |
| | | dataIndex: 'requestUrl', |
| | | width: 200, |
| | | ellipsis: true, |
| | | }, |
| | | { |
| | | title: '请æ±å¤´', |
| | | align: 'center', |
| | | dataIndex: 'requestHeaders', |
| | | width: 200, |
| | | ellipsis: true, |
| | | }, |
| | | { |
| | | title: '请æ±ä½', |
| | | align: 'center', |
| | | dataIndex: 'requestBody', |
| | | width: 200, |
| | | ellipsis: true, |
| | | }, |
| | | { |
| | | title: 'ååºç¼ç ', |
| | | align: 'center', |
| | | dataIndex: 'responseCode', |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: 'ååºæ¶æ¯', |
| | | align: 'center', |
| | | dataIndex: 'responseMessage', |
| | | width: 200, |
| | | }, |
| | | { |
| | | title: 'ååºä½', |
| | | align: 'center', |
| | | dataIndex: 'responseBody', |
| | | width: 200, |
| | | ellipsis: true, |
| | | }, |
| | | { |
| | | title: 'ç¶æ', |
| | | align: 'center', |
| | | dataIndex: 'requestStatus', |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: 'è°ç¨æ¹æ³', |
| | | align: 'center', |
| | | dataIndex: 'method', |
| | | width: 200, |
| | | ellipsis: true, |
| | | }, |
| | | { |
| | | title: 'æä½', |
| | | dataIndex: 'action', |
| | | align: 'center', |
| | | scopedSlots: { customRender: 'action' }, |
| | | fixed: 'right', |
| | | } |
| | | ], |
| | | url: { |
| | | list: '/system/sysApiLog/list', |
| | | } |
| | | } |
| | | }, |
| | | computed: { |
| | | }, |
| | | methods: {} |
| | | } |
| | | </script> |
| | | <style scoped> |
| | | @import '~@assets/less/common.less'; |
| | | </style> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <j-modal |
| | | :title="title" |
| | | :width="800" |
| | | :visible="visible" |
| | | :confirmLoading="confirmLoading" |
| | | fullscreen |
| | | :okButtonProps="{ class:{'jee-hidden': disableSubmit} }" |
| | | @ok="handleOk" |
| | | @cancel="handleCancel" |
| | | cancelText="å
³é"> |
| | | |
| | | <a-spin :spinning="confirmLoading"> |
| | | <a-form-model ref="form" :model="model" :rules="validatorRules" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | | <a-row> |
| | | <a-col :span="12"> |
| | | <a-form-model-item prop="apiCategory" label="APIåç±»"> |
| | | <a-input v-model="model.apiCategory" readonly /> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-model-item prop="apiName" label="æ¥å£åç§°"> |
| | | <a-input v-model="model.apiName" readonly /> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | <a-row> |
| | | <a-col :span="12"> |
| | | <a-form-model-item prop="requestTime" label="è¯·æ±æ¶é´"> |
| | | <a-input v-model="model.requestTime" readonly /> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-model-item prop="responseTime" label="ååºæ¶é´"> |
| | | <a-input v-model="model.responseTime" readonly /> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | <a-row> |
| | | <a-col :span="12"> |
| | | <a-form-model-item prop="requestMethod" label="è¯·æ±æ¹å¼"> |
| | | <a-input v-model="model.requestMethod" readonly /> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-model-item prop="requestStatus" label="请æ±ç¶æ"> |
| | | <a-input v-model="model.requestStatus" readonly /> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | <a-row> |
| | | <a-col :span="12"> |
| | | <a-form-model-item prop="responseCode" label="ååºç¼ç "> |
| | | <a-input v-model="model.responseCode" readonly /> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-model-item prop="responseMessage" label="ååºæ¶æ¯"> |
| | | <a-input v-model="model.responseMessage" readonly /> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | <a-row> |
| | | <a-form-model-item :labelCol="labelColLong" :wrapperCol="wrapperColLong" prop="requestUrl" |
| | | label="请æ±URL"> |
| | | <a-textarea v-model="model.requestUrl" :rows="1" readonly /> |
| | | </a-form-model-item> |
| | | </a-row> |
| | | <a-row> |
| | | <a-form-model-item :labelCol="labelColLong" :wrapperCol="wrapperColLong" prop="requestHeaders" label="请æ±å¤´"> |
| | | <a-textarea v-model="model.requestHeaders" :rows="2" readonly /> |
| | | </a-form-model-item> |
| | | </a-row> |
| | | <a-row> |
| | | <a-form-model-item :labelCol="labelColLong" :wrapperCol="wrapperColLong" prop="requestBody" label="请æ±ä½"> |
| | | <a-textarea v-model="model.requestBody" :rows="4" readonly /> |
| | | </a-form-model-item> |
| | | </a-row> |
| | | <a-row> |
| | | <a-form-model-item :labelCol="labelColLong" :wrapperCol="wrapperColLong" prop="responseBody" label="ååºä½"> |
| | | <a-textarea v-model="model.responseBody" :rows="4" readonly /> |
| | | </a-form-model-item> |
| | | </a-row> |
| | | <a-row> |
| | | <a-form-model-item :labelCol="labelColLong" :wrapperCol="wrapperColLong" prop="method" |
| | | label="è°ç¨æ¹æ³"> |
| | | <a-textarea v-model="model.method" :rows="1" readonly /> |
| | | </a-form-model-item> |
| | | </a-row> |
| | | </a-form-model> |
| | | </a-spin> |
| | | </j-modal> |
| | | </template> |
| | | |
| | | <script> |
| | | import { httpAction } from '@/api/manage' |
| | | import moment from 'moment' |
| | | |
| | | export default { |
| | | name: 'SysApiLogModal', |
| | | data() { |
| | | return { |
| | | title: 'æä½', |
| | | visible: false, |
| | | disableSubmit: true, |
| | | model: {}, |
| | | labelCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 6 } |
| | | }, |
| | | wrapperCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 16 } |
| | | }, |
| | | labelColLong: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 3 } |
| | | }, |
| | | wrapperColLong: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 20 } |
| | | }, |
| | | confirmLoading: false, |
| | | validatorRules: {}, |
| | | url: { |
| | | add: '/system/sysApiLog/add', |
| | | edit: '/system/sysApiLog/edit' |
| | | } |
| | | } |
| | | }, |
| | | created() { |
| | | }, |
| | | methods: { |
| | | add() { |
| | | //åå§åé»è®¤å¼ |
| | | this.edit({}) |
| | | }, |
| | | edit(record) { |
| | | this.model = Object.assign({}, record) |
| | | this.visible = true |
| | | }, |
| | | close() { |
| | | this.$emit('close') |
| | | this.visible = false |
| | | this.$refs.form.clearValidate() |
| | | }, |
| | | handleOk() { |
| | | 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 |
| | | that.close() |
| | | }) |
| | | } else { |
| | | return false |
| | | } |
| | | }) |
| | | }, |
| | | handleCancel() { |
| | | this.close() |
| | | } |
| | | |
| | | |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="less" scoped> |
| | | |
| | | </style> |
| | |
| | | </a-form-model-item> |
| | | |
| | | <!--车é´åé
--> |
| | | <!-- <a-form-model-item--> |
| | | <!-- label="车é´åé
"--> |
| | | <!-- :labelCol="labelCol"--> |
| | | <!-- :wrapperCol="wrapperCol"--> |
| | | <!-- v-show="!productionDisabled"--> |
| | | <!-- >--> |
| | | <!-- <j-select-production--> |
| | | <!-- v-model="model.selectedProduction"--> |
| | | <!-- :multi="true"--> |
| | | <!-- @back="backProductionInfo"--> |
| | | <!-- :backProduction="true"--> |
| | | <!-- :treeProductOpera="true"--> |
| | | <!-- ></j-select-production>--> |
| | | <!-- </a-form-model-item>--> |
| | | |
| | | <!--ä¸å¿åé
--> |
| | | <a-form-model-item |
| | | label="车é´åé
" |
| | | label="ä¸å¿åé
" |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | v-show="!productionDisabled" |
| | | v-show="!factoryDisabled" |
| | | > |
| | | <j-select-production |
| | | v-model="model.selectedProduction" |
| | | <j-select-factory |
| | | v-model="model.selectedFactorys" |
| | | :multi="true" |
| | | @back="backProductionInfo" |
| | | :backProduction="true" |
| | | :treeProductOpera="true" |
| | | ></j-select-production> |
| | | @back="backFactoryInfo" |
| | | :backFactory="true" |
| | | :treeFactoryOpera="true" |
| | | ></j-select-factory> |
| | | </a-form-model-item> |
| | | |
| | | |
| | | <a-form-model-item |
| | | label="éæ©è®¾å¤" |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | v-show="!productionDisabled" |
| | | > |
| | | <a-tooltip title="éæ©è®¾å¤åï¼ç¨æ·å°±åªæè¿äºè®¾å¤çæéï¼ä¸éæ©è®¾å¤ï¼å伿 ¹æ®è½¦é´åé
æ§å¶è®¾å¤çæéï¼" |
| | | placement="topRight"> |
| | | <a-input-search |
| | | :readOnly="true" |
| | | v-model="model.equipmentIds" |
| | | @search="deviceSearch" |
| | | enter-button |
| | | placeholder="è¯·éæ©è®¾å¤" |
| | | :disabled="!model.selectedProduction" |
| | | /> |
| | | </a-tooltip> |
| | | </a-form-model-item> |
| | | <!-- <a-form-model-item--> |
| | | <!-- label="éæ©è®¾å¤"--> |
| | | <!-- :labelCol="labelCol"--> |
| | | <!-- :wrapperCol="wrapperCol"--> |
| | | <!-- v-show="!productionDisabled"--> |
| | | <!-- >--> |
| | | <!-- <a-tooltip title="éæ©è®¾å¤åï¼ç¨æ·å°±åªæè¿äºè®¾å¤çæéï¼ä¸éæ©è®¾å¤ï¼å伿 ¹æ®è½¦é´åé
æ§å¶è®¾å¤çæéï¼"--> |
| | | <!-- placement="topRight">--> |
| | | <!-- <a-input-search--> |
| | | <!-- :readOnly="true"--> |
| | | <!-- v-model="model.equipmentIds"--> |
| | | <!-- @search="deviceSearch"--> |
| | | <!-- enter-button--> |
| | | <!-- placeholder="è¯·éæ©è®¾å¤"--> |
| | | <!-- :disabled="!model.selectedProduction"--> |
| | | <!-- />--> |
| | | <!-- </a-tooltip>--> |
| | | <!-- </a-form-model-item>--> |
| | | |
| | | |
| | | <!--<a-form-model-item--> |
| | |
| | | import { addUser, editUser, queryUserRole, queryall } from '@/api/api' |
| | | import { disabledAuthFilter } from '@/utils/authFilter' |
| | | import { duplicateCheck } from '@/api/api' |
| | | import JSelectProduction from '../../../components/jeecgbiz/JSelectProduction' |
| | | import JSelectFactory from '../../../components/jeecgbiz/JSelectFactory' |
| | | import { mapActions } from 'vuex' |
| | | import { ajaxGetDictItems, getDictItemsFromCache } from '@/api/api' |
| | | import SelectDeviceModal from './SelectDeviceModal' |
| | |
| | | name: 'UserModal', |
| | | components: { |
| | | SelectDeviceModal, |
| | | JSelectProduction |
| | | JSelectFactory |
| | | }, |
| | | data() { |
| | | return { |
| | | departDisabled: false, //æ¯å¦æ¯æçé¨é¨è°ç¨è¯¥é¡µé¢ |
| | | productionDisabled: false, //æ¯å¦æ¯æç车é´è°ç¨è¯¥é¡µé¢ |
| | | factoryDisabled: false, //æ¯å¦æ¯æç车é´è°ç¨è¯¥é¡µé¢ |
| | | roleDisabled: false, //æ¯å¦æ¯è§è²ç»´æ¤è°ç¨è¯¥é¡µé¢ |
| | | modalWidth: 800, |
| | | drawerWidth: 700, |
| | |
| | | departIdShow: false, |
| | | title: 'æä½', |
| | | visible: false, |
| | | model: {}, |
| | | labelCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 5 } |
| | |
| | | fileUpload: window._CONFIG['domianURL'] + 'sys/common/upload', |
| | | userWithDepart: '/sys/user/userDepartList', // å¼å
¥ä¸ºæå®ç¨æ·æ¥çé¨é¨ä¿¡æ¯éè¦çurl |
| | | //å¼å
¥ä¸ºæå®ç¨æ·æ¥ç车é´ä¿¡æ¯éè¦çurl |
| | | userProductionList: '/sys/user/userProductionList', |
| | | userFactoryList: '/sys/user/userFactorysList', |
| | | userId: '/sys/user/generateUserId', // å¼å
¥çææ·»å ç¨æ·æ
åµä¸çurl |
| | | syncUserByUserName: '/act/process/extActProcess/doSyncUserByUserName',//åæ¥ç¨æ·å°å·¥ä½æµ |
| | | queryTenantList: '/sys/tenant/queryList' |
| | |
| | | tenantsOptions: [], |
| | | rolesOptions: [], |
| | | nextDepartOptions: [], |
| | | nextProductionOptions: [], |
| | | nextFactoryOptions: [], |
| | | isDepartType: '', |
| | | model: { |
| | | selectedProduction: '' |
| | | selectedFactorys: '' |
| | | } |
| | | } |
| | | }, |
| | |
| | | if (value) this.initDictData('password_length') |
| | | } |
| | | }, |
| | | 'model.selectedProduction': { |
| | | 'model.selectedFactorys': { |
| | | handler(newVal, oldVal) { |
| | | if (newVal && this.$refs.selectDeviceModal) { |
| | | // å¦æè½¦é´éæ©ååä¸ä¸è´åéç½®éæ©è®¾å¤ |
| | |
| | | userIdentity: 1, |
| | | selectedroles: '', |
| | | selecteddeparts: '', |
| | | selectedProduction: '' |
| | | selectedFactorys: '' |
| | | }) |
| | | }, |
| | | edit(record) { |
| | |
| | | if (record.hasOwnProperty('id')) { |
| | | that.getUserRoles(record.id) |
| | | that.getUserDeparts(record.id) |
| | | that.getUserFactorys(record.id) |
| | | } |
| | | }, |
| | | isDisabledAuth(code) { |
| | |
| | | that.nextDepartOptions = departOptions |
| | | } |
| | | }) |
| | | |
| | | }, |
| | | getUserFactorys(userid) { |
| | | let that = this |
| | | // è·å车é´åé
|
| | | getAction(that.url.userProductionList, { userId: userid }).then((res) => { |
| | | getAction(that.url.userFactoryList, { userId: userid }).then((res) => { |
| | | if (res.success) { |
| | | let ProductionOptions = [] |
| | | let selectProductKeys = [] |
| | | let factoryOptions = [] |
| | | let selectFactoryKeys = [] |
| | | for (let i = 0; i < res.result.length; i++) { |
| | | selectProductKeys.push(res.result[i].key) |
| | | selectFactoryKeys.push(res.result[i].key) |
| | | //æ°å¢è´è´£é¨é¨éæ©ä¸ææ¡ |
| | | ProductionOptions.push({ |
| | | factoryOptions.push({ |
| | | value: res.result[i].key, |
| | | label: res.result[i].title |
| | | }) |
| | | } |
| | | |
| | | this.$set(this.model, 'selectedProduction', selectProductKeys.join(',')) |
| | | that.nextProductionOptions = ProductionOptions |
| | | this.$set(this.model, 'selectedFactorys', selectFactoryKeys.join(',')) |
| | | that.nextFactoryOptions = factoryOptions |
| | | } |
| | | }) |
| | | //车é´çurl |
| | | }, |
| | | backDepartInfo(info) { |
| | | this.model.departIds = this.model.selecteddeparts |
| | |
| | | return c |
| | | }) |
| | | }, |
| | | backProductionInfo(info) { |
| | | this.model.productionIds = this.model.selectedProduction |
| | | this.nextProductionOptions = info.map((item, index, arr) => { |
| | | backFactoryInfo(info) { |
| | | this.model.productionIds = this.model.selectedFactorys |
| | | this.nextFactoryOptions = info.map((item, index, arr) => { |
| | | let c = { label: item.text, value: item.value + '' } |
| | | return c |
| | | }) |
| | |
| | | refresh() { |
| | | this.userId = '' |
| | | this.nextDepartOptions = [] |
| | | this.nextProductionOptions = [] |
| | | this.nextFactoryOptions = [] |
| | | this.departIdShow = false |
| | | }, |
| | | close() { |
| | |
| | | this.visible = false |
| | | this.disableSubmit = false |
| | | this.nextDepartOptions = [] |
| | | this.nextProductionOptions = [] |
| | | this.nextFactoryOptions = [] |
| | | this.departIdShow = false |
| | | this.$refs.form.resetFields() |
| | | }, |