¶Ô±ÈÐÂÎļþ |
| | |
| | | <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" slot="suffix" type="close-circle" @click="handleEmpty" title="æ¸
空"/> |
| | | </a-input> |
| | | <j-select-factory-modal |
| | | ref="factorySelectModal" |
| | | :modal-width="modalWidth" |
| | | :multi="multi" |
| | | :rootOpened="rootOpened" |
| | | :factory-id="value" |
| | | :store="storeField" |
| | | :text="textField" |
| | | :treeFactoryOpera="treeFactoryOpera" |
| | | @ok="handleOK" |
| | | @initComp="initComp"> |
| | | |
| | | </j-select-factory-modal> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import JSelectFactoryModal from './modal/JSelectFactoryModal' |
| | | import { underLinetoHump } from '@/components/_util/StringUtil' |
| | | export default { |
| | | name: 'JSelectFactory', |
| | | components:{ |
| | | JSelectFactoryModal |
| | | }, |
| | | 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: '' |
| | | }, |
| | | backProduction: { |
| | | type: Boolean, |
| | | default: false, |
| | | required: false |
| | | }, |
| | | // åå¨å段 [key field] |
| | | store: { |
| | | type: String, |
| | | default: 'id', |
| | | required: false |
| | | }, |
| | | // æ¾ç¤ºå段 [label field] |
| | | text: { |
| | | type: String, |
| | | default: 'factoryName', |
| | | required: false |
| | | }, |
| | | treeFactoryOpera: { |
| | | 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.backProduction===true){ |
| | | 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.factorySelectModal.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() |
| | | }, |
| | | |
| | | 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> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <j-modal |
| | | title="éæ©è½¦é´" |
| | | :width="modalWidth" |
| | | :visible="visible" |
| | | :confirmLoading="confirmLoading" |
| | | @ok="handleSubmit" |
| | | @cancel="handleCancel" |
| | | @update:fullscreen="isFullscreen" |
| | | wrapClassName="j-production-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' |
| | | export default { |
| | | name: 'JSelectFactoryModal', |
| | | props:['modalWidth','multi','rootOpened','factoryId', 'store', 'text','treeOpera'], |
| | | data(){ |
| | | return { |
| | | visible:false, |
| | | confirmLoading:false, |
| | | treeData:[], |
| | | autoExpandParent:true, |
| | | expandedKeys:[], |
| | | dataList:[], |
| | | checkedKeys:[], |
| | | checkedRows:[], |
| | | searchValue:"", |
| | | checkStrictly: false, |
| | | fullscreen:false |
| | | } |
| | | }, |
| | | created(){ |
| | | this.loadFactory(); |
| | | }, |
| | | watch:{ |
| | | factoryId(){ |
| | | this.initFactoryComponent() |
| | | }, |
| | | visible: { |
| | | handler() { |
| | | this.initFactoryComponent(true) |
| | | } |
| | | } |
| | | }, |
| | | computed:{ |
| | | treeScreenClass() { |
| | | return { |
| | | 'my-factory-select-tree': true, |
| | | 'fullscreen': this.fullscreen, |
| | | } |
| | | }, |
| | | }, |
| | | methods:{ |
| | | show(){ |
| | | this.visible=true |
| | | this.checkedRows=[] |
| | | this.checkedKeys=[] |
| | | }, |
| | | loadFactory(){ |
| | | // è¿ä¸ªæ¹æ³æ¯æ¾å°ææç车é´ä¿¡æ¯ |
| | | queryFactoryTreeList().then(res=>{ |
| | | if(res.success){ |
| | | let arr = [...res.result] |
| | | this.reWriterWithSlot(arr) |
| | | this.treeData = arr |
| | | this.initFactoryComponent() |
| | | if(this.rootOpened){ |
| | | this.initExpandedKeys(res.result) |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | initFactoryComponent(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-factory-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> |
| | |
| | | </a-row> |
| | | </template> |
| | | <script> |
| | | import UserFactory from './modules/FactoryManager/UserFactory' |
| | | import UserFactory from './modules/factoryManager/UserFactory' |
| | | import { queryFactoryTreeList, searchByKeywords, deleteByFactory } from '@/api/api' |
| | | import { httpAction, deleteAction } from '@/api/manage' |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | import FactoryModal from './modules/FactoryManager/FactoryModal' |
| | | import FactoryModal from './modules/factoryManager/FactoryModal' |
| | | |
| | | export default { |
| | | name: 'FactoryManager', |
| | |
| | | <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons"> |
| | | <a-col :md="12" :sm="24"> |
| | | <a-button type="primary" @click="searchQuery" icon="search" style="margin-left: 21px">æ¥è¯¢</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> |
| | | </a-col> |
| | | </span> |
| | | </a-row> |
| | |
| | | title: 'çç»åç§°', |
| | | align: 'center', |
| | | dataIndex: 'groupName' |
| | | }, |
| | | { |
| | | title: 'çç»é¿', |
| | | align: 'center', |
| | | dataIndex: 'groupManager_dictText' |
| | | }, |
| | | { |
| | | title: 'çæ¬¡', |
| | | align: 'center', |
| | | dataIndex: 'shiftId_dictText' |
| | | }, |
| | | { |
| | | title: '产线', |
| | | align: 'center', |
| | | dataIndex: 'factoryId_dictText' |
| | | }, |
| | | { |
| | | title: 'å建æ¶é´', |
| | |
| | | this.$message.error('è¯·éæ©ä¸ä¸ªçç»!') |
| | | } else { |
| | | this.$refs.selectUserModal.visible = true |
| | | this.$refs.selectUserModal.selectedRowKeys = [] |
| | | } |
| | | }, |
| | | handleOpen(record) { |
| | |
| | | slot="shiftStatus" |
| | | slot-scope="text, record" |
| | | > |
| | | <span v-if="text == 0" style="color:red;">åç¨</span> |
| | | <span v-if="text == 0" style="color:red;">ç¦ç¨</span> |
| | | <span v-if="text == 1" style="color:green;">å¯ç¨</span> |
| | | </span> |
| | | <span |
| | |
| | | <span v-if="text == '1'">æ¯</span> |
| | | <span v-if="text == '0'">å¦</span> |
| | | </span> |
| | | <span |
| | | |
| | | <span |
| | | slot="action" |
| | | slot-scope="text, record" |
| | | > |
| | | <a v-if="record.shiftStatus == 1" @click="handleEdit(record)">ç¼è¾</a> |
| | | <a-divider type="vertical" v-if="record.shiftStatus == 1"/> |
| | | <a v-if="record.shiftStatus == 0" @click="handleStatus(record.id,1)">å¯ç¨</a> |
| | | <a v-if="record.shiftStatus == 1" @click="handleStatus(record.id,0)">åç¨</a> |
| | | <a-divider type="vertical" /> |
| | | <a @click="handleDelete(record.id)">å é¤</a> |
| | | <a |
| | | href="javascript:;" |
| | | @click="handleDetail(record)" |
| | | >详æ
</a> |
| | | |
| | | <a-divider type="vertical" /> |
| | | <a-dropdown> |
| | | <a class="ant-dropdown-link">æ´å¤ |
| | | <a-icon type="down" /> |
| | | </a> |
| | | <a-menu slot="overlay"> |
| | | <a-menu-item> |
| | | <a v-if="record.shiftStatus == 1" @click="handleEdit(record)">ç¼è¾</a> |
| | | </a-menu-item> |
| | | <a-menu-item> |
| | | <a-popconfirm |
| | | title="ç¡®å®å é¤å?" |
| | | @confirm="() => handleDelete(record.id)" |
| | | > |
| | | <a>å é¤</a> |
| | | </a-popconfirm> |
| | | |
| | | </a-menu-item> |
| | | <a-menu-item v-if="record.shiftStatus == 0"> |
| | | <a-popconfirm |
| | | title="ç¡®å®å¯ç¨å?" |
| | | @confirm="() => handleStatus(record.id,1)" |
| | | > |
| | | <a>å¯ç¨</a> |
| | | </a-popconfirm> |
| | | </a-menu-item> |
| | | <a-menu-item v-if="record.shiftStatus == 1"> |
| | | <a-popconfirm |
| | | title="ç¡®å®ç¦ç¨å?" |
| | | @confirm="() => handleStatus(record.id,0)" |
| | | > |
| | | <a>ç¦ç¨</a> |
| | | </a-popconfirm> |
| | | </a-menu-item> |
| | | </a-menu> |
| | | </a-dropdown> |
| | | </span> |
| | | </a-table> |
| | | </div> |
| | |
| | | <template> |
| | | <a-card |
| | | :bordered="false" |
| | | title="ä¾åºå" |
| | | > |
| | | <!-- æ¥è¯¢åºå --> |
| | | <div class="table-page-search-wrapper"> |
| | |
| | | > |
| | | <a-row :gutter="30"> |
| | | |
| | | <a-col |
| | | :md="6" |
| | | :sm="24" |
| | | > |
| | | <a-col :xl="4" :lg="7" :md="8" :sm="24"> |
| | | <a-form-item label="ä¾åºåç¼å·"> |
| | | <j-input |
| | | placeholder="请è¾å
¥ä¾åºåç¼å·æ£ç´¢" |
| | |
| | | </a-form-item> |
| | | </a-col> |
| | | |
| | | <a-col |
| | | :md="6" |
| | | :sm="24" |
| | | > |
| | | <a-col :xl="4" :lg="7" :md="8" :sm="24"> |
| | | <a-form-item label="ä¾åºååç§°"> |
| | | <j-input |
| | | placeholder="请è¾å
¥ä¾åºååç§°æ£ç´¢" |
| | | v-model="queryParam.supplierName" |
| | | ></j-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | |
| | | <a-col :xl="4" :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 class="table-operator"> |
| | | <a-button |
| | | type="primary" |
| | | @click="searchQuery" |
| | | icon="search" |
| | | >æ¥è¯¢</a-button> |
| | | <a-button |
| | | type="primary" |
| | | @click="searchReset" |
| | | icon="reload" |
| | | >éç½®</a-button> |
| | | <a-button |
| | | @click="handleAdd" |
| | | type="primary" |
| | | icon="plus" |
| | | >æ°å¢</a-button> |
| | | <!-- <a-button type="primary" @click="exportToExcel('ä¾åºåä¿¡æ¯å¯¼å
¥æ¨¡æ¿')" icon="export" style="margin-left: 8px" >ä¸è½½å¯¼å
¥æ¨¡æ¿</a-button> |
| | | <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel"> |
| | | <a-button type="primary" icon="import" :disabled="!nodeSelected.key || nodeSelected.entity.leafFlag === '2'">导å
¥</a-button> |
| | | </a-upload> --> |
| | | </div> |
| | | |
| | | <!-- tableåºå-begin --> |
| | |
| | | :dataSource="dataSource" |
| | | :pagination="ipagination" |
| | | :loading="loading" |
| | | :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange,type:type}" |
| | | @change="handleTableChange" |
| | | :customRow="clickThenCheck" |
| | | > |
| | | <span |
| | | slot="partCount" |
| | | slot-scope="text,record" |
| | | class="fontweight" |
| | | > |
| | | {{record.partCount}} |
| | | </span> |
| | | <!--ç¶ææ 个æ§å±ç¤º--> |
| | | <span |
| | | slot="status" |
| | |
| | | }, |
| | | data() { |
| | | return { |
| | | selectedRowRecord: {}, |
| | | dataSource: [], |
| | | partCount: "", |
| | | /* å页忰 */ |
| | | ipagination: { |
| | | current: 1, |
| | |
| | | scopedSlots: { customRender: 'action' }, |
| | | } |
| | | ], |
| | | type: "radio", |
| | | url: { |
| | | list: '/base/supplier/list', |
| | | delete: '/base/supplier/delete', |
| | |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.$bus.$on('refreshParentPage', (data) => { |
| | | this.loadData(); |
| | | }) |
| | | |
| | | }, |
| | | methods: { |
| | | loadData(arg) { |
| | |
| | | } |
| | | }); |
| | | }, |
| | | clickThenCheck(record) { |
| | | return { |
| | | on: { |
| | | click: (e) => { |
| | | this.selectedRowRecord = record; |
| | | this.onSelectChange(record.id.split(","), [record]); |
| | | } |
| | | exportToExcel(fileName) { |
| | | this.loading = true // æ¾ç¤ºå è½½é®ç½© |
| | | this.queryParam.paraTypeFlag = this.paraTypeFlag |
| | | var params = this.getQueryParams() |
| | | downFile(this.url.loadTemplate,params).then((data)=>{ |
| | | if (!data) { |
| | | this.$message.warning("æä»¶ä¸è½½å¤±è´¥") |
| | | return |
| | | } |
| | | }; |
| | | }, |
| | | onSelectChange(selectedRowKeys) { |
| | | this.selectedRowKeys = selectedRowKeys; |
| | | if (typeof window.navigator.msSaveBlob !== 'undefined') { |
| | | window.navigator.msSaveBlob(new Blob([data],{type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'}), fileName+'.xlsx') |
| | | }else{ |
| | | let url = window.URL.createObjectURL(new Blob([data],{type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'})) |
| | | let link = document.createElement('a') |
| | | link.style.display = 'none' |
| | | link.href = url |
| | | link.setAttribute('download', fileName+'.xlsx') |
| | | document.body.appendChild(link) |
| | | link.click() |
| | | document.body.removeChild(link); //ä¸è½½å®æç§»é¤å
ç´ |
| | | window.URL.revokeObjectURL(url); //éæ¾æblob对象 |
| | | } |
| | | this.loading = false // éèé®ç½© |
| | | }) |
| | | }, |
| | | }, |
| | | |
| | |
| | | <template> |
| | | <a-card |
| | | :bordered="false" |
| | | title="ä¾åºå" |
| | | > |
| | | <!-- æ¥è¯¢åºå --> |
| | | <div class="table-page-search-wrapper"> |
| | |
| | | > |
| | | <a-row :gutter="30"> |
| | | |
| | | <a-col |
| | | :md="6" |
| | | :sm="24" |
| | | > |
| | | <a-col :xl="4" :lg="7" :md="8" :sm="24"> |
| | | <a-form-item label="ä»åºç¼å·"> |
| | | <j-input |
| | | placeholder="请è¾å
¥ä»åºç¼å·æ£ç´¢" |
| | |
| | | </a-form-item> |
| | | </a-col> |
| | | |
| | | <a-col |
| | | :md="6" |
| | | :sm="24" |
| | | > |
| | | <a-col :xl="4" :lg="7" :md="8" :sm="24"> |
| | | <a-form-item label="ä»åºåç§°"> |
| | | <j-input |
| | | placeholder="请è¾å
¥ä»åºåç§°æ£ç´¢" |
| | |
| | | ></j-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | |
| | | <a-col :xl="4" :lg="7" :md="8" :sm="24"> |
| | | <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons"> |
| | | <a-button type="primary" @click="searchQuery" icon="search">æ¥è¯¢</a-button> |
| | | <a-button type="info" @click="searchReset" icon="reload" style="margin-left: 8px">éç½®</a-button> |
| | | </span> |
| | | </a-col> |
| | | </a-row> |
| | | </a-form> |
| | | </div> |
| | | |
| | | <!-- æä½æé®åºå --> |
| | | <div class="table-operator"> |
| | | <a-button |
| | | type="primary" |
| | | @click="searchQuery" |
| | | icon="search" |
| | | >æ¥è¯¢</a-button> |
| | | <a-button |
| | | type="primary" |
| | | @click="searchReset" |
| | | icon="reload" |
| | | >éç½®</a-button> |
| | | <a-button |
| | | @click="handleAdd" |
| | | type="primary" |
| | |
| | | :dataSource="dataSource" |
| | | :pagination="ipagination" |
| | | :loading="loading" |
| | | :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange,type:type}" |
| | | @change="handleTableChange" |
| | | :customRow="clickThenCheck" |
| | | > |
| | | <span |
| | | slot="partCount" |
| | | slot-scope="text,record" |
| | | class="fontweight" |
| | | > |
| | | {{record.partCount}} |
| | | </span> |
| | | <!--ç¶ææ 个æ§å±ç¤º--> |
| | | <span |
| | | slot="status" |
| | |
| | | }, |
| | | data() { |
| | | return { |
| | | selectedRowRecord: {}, |
| | | dataSource: [], |
| | | partCount: "", |
| | | /* å页忰 */ |
| | | ipagination: { |
| | | current: 1, |
| | |
| | | scopedSlots: { customRender: 'action' }, |
| | | } |
| | | ], |
| | | type: "radio", |
| | | url: { |
| | | list: '/base/lineSideWarehouse/list', |
| | | delete: '/base/lineSideWarehouse/delete', |
| | |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.$bus.$on('refreshParentPage', (data) => { |
| | | this.loadData(); |
| | | }) |
| | | |
| | | }, |
| | | methods: { |
| | | loadData(arg) { |
| | |
| | | that.$message.warning(res.message); |
| | | } |
| | | }); |
| | | }, |
| | | clickThenCheck(record) { |
| | | return { |
| | | on: { |
| | | click: (e) => { |
| | | this.selectedRowRecord = record; |
| | | this.onSelectChange(record.id.split(","), [record]); |
| | | } |
| | | } |
| | | }; |
| | | }, |
| | | onSelectChange(selectedRowKeys) { |
| | | this.selectedRowKeys = selectedRowKeys; |
| | | }, |
| | | }, |
| | | |
| | |
| | | |
| | | <a-spin :spinning="confirmLoading"> |
| | | <a-form-model ref="form" v-bind="layout" :model="model" :rules="validatorRules"> |
| | | <a-form-model-item label="çç»ç¼ç " required prop="groupCode"> |
| | | <a-form-model-item label="çç»ç¼ç " required prop="groupCode" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | | <a-input v-model="model.groupCode" :disabled="roleDisabled" placeholder="请è¾å
¥çç»ç¼ç "/> |
| | | </a-form-model-item> |
| | | <a-form-model-item label="çç»åç§°" required prop="groupName"> |
| | | <a-form-model-item label="çç»åç§°" required prop="groupName" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | | <a-input v-model="model.groupName" placeholder="请è¾å
¥çç»åç§°"/> |
| | | </a-form-model-item> |
| | | <a-form-model-item label="çç»é¿" prop="groupManager"> |
| | | <a-form-model-item label="çç»é¿" prop="groupManager" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | | <j-dict-select-tag |
| | | type="list" |
| | | v-model="model.groupManager" |
| | |
| | | placeholder="è¯·éæ©çç»é¿" |
| | | /> |
| | | </a-form-model-item> |
| | | <a-form-model-item label="产线" prop="factoryId"> |
| | | <j-dict-select-tag |
| | | type="list" |
| | | v-model="model.factoryId" |
| | | :trigger-change="true" |
| | | dictCode="base_factory,factory_name,id" |
| | | placeholder="è¯·éæ©äº§çº¿" |
| | | /> |
| | | <a-form-model-item label="产线" prop="factoryId" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | | <j-select-factory |
| | | v-model="model.factoryId" |
| | | :multi="true" |
| | | @back="backFactoryInfo" |
| | | :backProduction="true" |
| | | :treeProductOpera="true" |
| | | ></j-select-factory> |
| | | </a-form-model-item> |
| | | <a-form-model-item label="çæ¬¡" prop="shiftId"> |
| | | <a-form-model-item label="çæ¬¡" prop="shiftId" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | | <j-dict-select-tag |
| | | type="list" |
| | | v-model="model.shiftId" |
| | |
| | | placeholder="è¯·éæ©çæ¬¡" |
| | | /> |
| | | </a-form-model-item> |
| | | <a-form-model-item label="夿³¨" prop="remark"> |
| | | <a-form-model-item label="夿³¨" prop="remark" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | | <a-textarea :rows="5" v-model="model.remark" placeholder="请è¾å
¥å¤æ³¨"/> |
| | | </a-form-model-item> |
| | | </a-form-model> |
| | |
| | | import {duplicateCheck } from '@/api/api' |
| | | import {postAction,requestPut} from '@/api/manage' |
| | | import JDictSelectTag from '@/components/dict/JDictSelectTag' |
| | | import JSelectFactory from '../../../../components/jeecgbiz/JSelectFactory' |
| | | export default { |
| | | name: "GroupModal", |
| | | components: { |
| | | JDictSelectTag, |
| | | JSelectFactory |
| | | }, |
| | | data () { |
| | | return { |
| | |
| | | visible: false, |
| | | roleDisabled: false, |
| | | model: {}, |
| | | layout: { |
| | | labelCol: { span: 3 }, |
| | | wrapperCol: { span: 14 }, |
| | | labelCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 5 }, |
| | | }, |
| | | wrapperCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 16 }, |
| | | }, |
| | | confirmLoading: false, |
| | | validatorRules:{ |
| | |
| | | url: { |
| | | add: "/base/shiftGroup/add", |
| | | edit: "/base/shiftGroup/edit", |
| | | } |
| | | }, |
| | | nextFactoryOptions: [], |
| | | } |
| | | }, |
| | | created () { |
| | |
| | | } |
| | | }); |
| | | } |
| | | } |
| | | }, |
| | | 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 |
| | | }) |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | |
| | | <template> |
| | | <a-modal :title="title" :width="800" :visible="visible" :confirmLoading="confirmLoading" |
| | | <a-modal :title="title" :width="800" :visible="visible" :confirmLoading="confirmLoading" :okButtonProps="{ props: {disabled: disableSubmit} }" |
| | | @ok="handleOk" @cancel="handleCancel" cancelText="å
³é"> |
| | | <a-spin :spinning="confirmLoading"> |
| | | <a-form :form="form"> |
| | | <a-row :gutter="24"> |
| | | <a-col :span="12"> |
| | | <a-form-item label="çæ¬¡ç¼ç " :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | | <a-input allow-clear placeholder="请è¾å
¥ç次ç¼ç " |
| | | <a-input allow-clear placeholder="请è¾å
¥ç次ç¼ç " :disabled="disableSubmit" |
| | | v-decorator="['shiftCode',validatorRules.shiftCode]"/> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-item label="çæ¬¡åç§°" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | | <a-input allow-clear placeholder="请è¾å
¥ç次åç§°" v-decorator="['shiftName',validatorRules.shiftName]"/> |
| | | <a-input allow-clear placeholder="请è¾å
¥ç次åç§°" :disabled="disableSubmit" v-decorator="['shiftName',validatorRules.shiftName]"/> |
| | | </a-form-item> |
| | | </a-col> |
| | | </a-row> |
| | | <a-row :gutter="24"> |
| | | <a-col :span="12"> |
| | | <a-form-item label="å¼å§æ¶é´" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | | <a-time-picker v-decorator="['startTime',validatorRules.startTime]"/> |
| | | <a-time-picker :disabled="disableSubmit" v-decorator="['startTime',validatorRules.startTime]"/> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-item label="ç»ææ¶é´" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | | <a-time-picker v-decorator="['endTime',validatorRules.endTime]"/> |
| | | <a-time-picker :disabled="disableSubmit" v-decorator="['endTime',validatorRules.endTime]"/> |
| | | </a-form-item> |
| | | </a-col> |
| | | </a-row> |
| | |
| | | <a-row :gutter="24"> |
| | | <a-col :span="12"> |
| | | <a-form-item label="工使¶é¿" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | | <a-input-number v-decorator="['workHours',validatorRules.workHours]" placeholder="请è¾å
¥å·¥ä½æ¶é¿(å°æ¶)" style="width: 100%" /> |
| | | <a-input-number :disabled="disableSubmit" v-decorator="['workHours',validatorRules.workHours]" placeholder="请è¾å
¥å·¥ä½æ¶é¿(å°æ¶)" style="width: 100%" /> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-item label="æ¯å¦è·¨å¤©" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | | <a-switch v-model="crossDayFlag" checked-children="æ¯" un-checked-children="å¦"/> |
| | | <a-switch :disabled="disableSubmit" v-model="crossDayFlag" checked-children="æ¯" un-checked-children="å¦"/> |
| | | </a-form-item> |
| | | </a-col> |
| | | </a-row> |
| | |
| | | this.$nextTick(() => { |
| | | this.form.setFieldsValue(pick(this.model, 'shiftCode', 'shiftName', 'startTime', 'endTime','workHours')) |
| | | this.form.setFieldsValue({ |
| | | startTime: moment(this.model.startTime, 'HH:mm:ss'), |
| | | endTime: moment(this.model.endTime, 'HH:mm:ss') |
| | | startTime: moment(this.model.startTime, 'HH:mm'), |
| | | endTime: moment(this.model.endTime, 'HH:mm') |
| | | }) |
| | | if (record.crossDayFlag == '1') { |
| | | this.crossDayFlag = true |
| | |
| | | }else if(that.crossDayFlag == false){ |
| | | formData.crossDayFlag = '0' |
| | | } |
| | | formData.startTime = moment(formData.startTime).format('HH:mm:ss') |
| | | formData.endTime = moment(formData.endTime).format('HH:mm:ss') |
| | | formData.startTime = moment(formData.startTime).format('HH:mm') |
| | | formData.endTime = moment(formData.endTime).format('HH:mm') |
| | | if (formData.crossDayFlag == '0') { |
| | | let startTimeOne = formData.startTime.replace(/:/g, '') |
| | | let endTimeOne = formData.endTime.replace(/:/g, '') |
| | |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | // å
³éå¼¹çªæ¶æ¸
é¤è¡¨åæ ¡éª |
| | | removeValidate() { |
| | | if (this.$refs.form) this.$refs.form.clearValidate() |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | |
| | | label="ä¾åºåç¼å·" |
| | | > |
| | | <a-input |
| | | :readOnly="disableSubmit" |
| | | :disabled="disableSubmit" |
| | | allow-clear |
| | | placeholder="请è¾å
¥ä¾åºåç¼å·" |
| | | v-decorator="['supplierCode', validatorRules.supplierCode ]" |
| | |
| | | label="ä¾åºååç§°" |
| | | > |
| | | <a-input |
| | | :readOnly="disableSubmit" |
| | | :disabled="disableSubmit" |
| | | allow-clear |
| | | placeholder="请è¾å
¥ä¾åºååç§°" |
| | | v-decorator="['supplierName', validatorRules.supplierName ]" |
| | |
| | | label="å½å®¶" |
| | | > |
| | | <a-input |
| | | :readOnly="disableSubmit" |
| | | :disabled="disableSubmit" |
| | | allow-clear |
| | | placeholder="请è¾å
¥å½å®¶" |
| | | v-decorator="['country', validatorRules.country ]" |
| | |
| | | label="ç份" |
| | | > |
| | | <a-input |
| | | :readOnly="disableSubmit" |
| | | :disabled="disableSubmit" |
| | | allow-clear |
| | | placeholder="请è¾å
¥ç份" |
| | | v-decorator="['province', validatorRules.province ]" |
| | |
| | | label="åå¸" |
| | | > |
| | | <a-input |
| | | :readOnly="disableSubmit" |
| | | :disabled="disableSubmit" |
| | | allow-clear |
| | | placeholder="请è¾å
¥åå¸" |
| | | v-decorator="['city', validatorRules.city ]" |
| | |
| | | label="è系人" |
| | | > |
| | | <a-input |
| | | :readOnly="disableSubmit" |
| | | :disabled="disableSubmit" |
| | | allow-clear |
| | | placeholder="请è¾å
¥è系人" |
| | | v-decorator="['contact', validatorRules.contact]" |
| | |
| | | label="详ç»å°å" |
| | | > |
| | | <a-input |
| | | :readOnly="disableSubmit" |
| | | :disabled="disableSubmit" |
| | | allow-clear |
| | | placeholder="请è¾å
¥è¯¦ç»å°å" |
| | | v-decorator="['address', validatorRules.address]" |
| | |
| | | label="é®ç®±" |
| | | > |
| | | <a-input |
| | | :readOnly="disableSubmit" |
| | | :disabled="disableSubmit" |
| | | allow-clear |
| | | placeholder="请è¾å
¥é®ç®±" |
| | | v-decorator="['email', validatorRules.email]" |
| | |
| | | label="é®ç¼" |
| | | > |
| | | <a-input |
| | | :readOnly="disableSubmit" |
| | | :disabled="disableSubmit" |
| | | allow-clear |
| | | placeholder="请è¾å
¥é®ç¼" |
| | | v-decorator="['postcode', validatorRules.postcode]" |
| | |
| | | label="ä¼ ç" |
| | | > |
| | | <a-input |
| | | :readOnly="disableSubmit" |
| | | :disabled="disableSubmit" |
| | | allow-clear |
| | | placeholder="请è¾å
¥ä¼ ç" |
| | | v-decorator="['fax', validatorRules.fax]" |
| | |
| | | label="ææºå·ç " |
| | | > |
| | | <a-input |
| | | :readOnly="disableSubmit" |
| | | :disabled="disableSubmit" |
| | | allow-clear |
| | | placeholder="请è¾å
¥ææºå·ç " |
| | | v-decorator="['phone', validatorRules.phone]" |
| | |
| | | label="å
¬å¸çµè¯" |
| | | > |
| | | <a-input |
| | | :readOnly="disableSubmit" |
| | | :disabled="disableSubmit" |
| | | allow-clear |
| | | placeholder="请è¾å
¥å
¬å¸çµè¯" |
| | | v-decorator="['companyTelephone', validatorRules.companyTelephone]" |
| | |
| | | label="宿¹ç½ç«" |
| | | > |
| | | <a-input |
| | | :readOnly="disableSubmit" |
| | | :disabled="disableSubmit" |
| | | allow-clear |
| | | placeholder="请è¾å
¥å®æ¹ç½ç«" |
| | | v-decorator="['officialWebsite', validatorRules.officialWebsite]" |
| | |
| | | label="夿³¨" |
| | | > |
| | | <a-textarea |
| | | :readOnly="disableSubmit" |
| | | :disabled="disableSubmit" |
| | | placeholder="请è¾å
¥å¤æ³¨" |
| | | allow-clear |
| | | v-decorator="['remark', validatorRules.remark]" |
| | |
| | | } |
| | | } |
| | | }, |
| | | // å
³éå¼¹çªæ¶æ¸
é¤è¡¨åæ ¡éª |
| | | removeValidate() { |
| | | if (this.$refs.form) this.$refs.form.clearValidate() |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | |
| | | <a-row :gutter="24"> |
| | | <a-col :span="24"> |
| | | <a-form-item |
| | | :labelCol="{span:3}" |
| | | :wrapperCol="{span:21}" |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | label="线边åºç¼å·" |
| | | > |
| | | <a-input |
| | | :readOnly="disableSubmit" |
| | | :disabled="disableSubmit" |
| | | allow-clear |
| | | placeholder="请è¾å
¥çº¿è¾¹åºç¼å·" |
| | | v-decorator="['warehouseCode', validatorRules.warehouseCode ]" |
| | |
| | | <a-row :gutter="24"> |
| | | <a-col :span="24"> |
| | | <a-form-item |
| | | :labelCol="{span:3}" |
| | | :wrapperCol="{span:21}" |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | label="线边åºåç§°" |
| | | > |
| | | <a-input |
| | | :readOnly="disableSubmit" |
| | | :disabled="disableSubmit" |
| | | allow-clear |
| | | placeholder="请è¾å
¥çº¿è¾¹åºåç§°" |
| | | v-decorator="['warehouseName', validatorRules.warehouseName ]" |
| | |
| | | </a-col> |
| | | </a-row> |
| | | <a-row :gutter="24"> |
| | | <a-col :span="12"> |
| | | <a-col :span="24"> |
| | | <a-form-item |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | label="产线" |
| | | > |
| | | <j-dict-select-tag |
| | | type="list" |
| | | v-model="model.factoryId" |
| | | :trigger-change="true" |
| | | dictCode="base_factory,factory_name,id" |
| | | placeholder="è¯·éæ©äº§çº¿" |
| | | /> |
| | | <j-select-factory |
| | | :disabled="disableSubmit" |
| | | v-model="model.factoryId" |
| | | :multi="true" |
| | | @back="backFactoryInfo" |
| | | :backProduction="true" |
| | | :treeProductOpera="true" |
| | | ></j-select-factory> |
| | | </a-form-item> |
| | | </a-col> |
| | | </a-row> |
| | |
| | | import moment from 'moment' |
| | | import { duplicateCheck } from '@/api/api'//é夿 ¡éª |
| | | import JTreeDict from '@/components/jeecg/JTreeDict'//åç±»åå
¸æ 形䏿ç»ä»¶ |
| | | import JSelectFactory from '../../../../components/jeecgbiz/JSelectFactory' |
| | | |
| | | export default { |
| | | name: "WarehouseModal", |
| | | components: { |
| | | JDate, |
| | | JTreeDict, |
| | | JSelectFactory |
| | | }, |
| | | data() { |
| | | return { |
| | |
| | | treeData: [], |
| | | warehouseId: "", //ä¿å线边åºid |
| | | labelCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 6 }, |
| | | }, |
| | | wrapperCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 18 }, |
| | | }, |
| | | xs: { span: 24 }, |
| | | sm: { span: 5 }, |
| | | }, |
| | | wrapperCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 16 }, |
| | | }, |
| | | |
| | | confirmLoading: false, |
| | | form: this.$form.createForm(this), |
| | |
| | | add: "/base/lineSideWarehouse/add", |
| | | edit: "/base/lineSideWarehouse/edit", |
| | | }, |
| | | nextFactoryOptions: [], |
| | | } |
| | | }, |
| | | created() { |
| | |
| | | } |
| | | }) |
| | | }, |
| | | 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 |
| | | }) |
| | | }, |
| | | // å
³éå¼¹çªæ¶æ¸
é¤è¡¨åæ ¡éª |
| | | removeValidate() { |
| | | if (this.$refs.form) this.$refs.form.clearValidate() |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | |
| | | <a @click="handleUse(record)">åºç¨</a> |
| | | </a-menu-item> |
| | | <a-menu-item> |
| | | <a @click="handleNotUse(record)">åç¨</a> |
| | | <a @click="handleNotUse(record)">ç¦ç¨</a> |
| | | </a-menu-item> |
| | | |
| | | <a-menu-item> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <a-card |
| | | :bordered="false" |
| | | > |
| | | <!-- æ¥è¯¢åºå --> |
| | | <div class="table-page-search-wrapper"> |
| | | <a-form |
| | | layout="inline" |
| | | @keyup.enter.native="searchQuery" |
| | | > |
| | | <a-row :gutter="30"> |
| | | |
| | | <a-col :xl="4" :lg="7" :md="8" :sm="24"> |
| | | <a-form-item label="æ£éªé¡¹ç®ç¼å·"> |
| | | <j-input |
| | | placeholder="请è¾å
¥æ£éªé¡¹ç®ç¼å·æ£ç´¢" |
| | | v-model="queryParam.itemCode" |
| | | ></j-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.itemName" |
| | | ></j-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | |
| | | <a-col :xl="4" :lg="7" :md="8" :sm="24"> |
| | | <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons"> |
| | | <a-button type="primary" @click="searchQuery" icon="search">æ¥è¯¢</a-button> |
| | | <a-button type="info" @click="searchReset" icon="reload" style="margin-left: 8px">éç½®</a-button> |
| | | </span> |
| | | </a-col> |
| | | </a-row> |
| | | </a-form> |
| | | </div> |
| | | |
| | | <!-- æä½æé®åºå --> |
| | | <div class="table-operator"> |
| | | <a-button |
| | | @click="handleAdd" |
| | | type="primary" |
| | | icon="plus" |
| | | >æ°å¢</a-button> |
| | | </div> |
| | | |
| | | <!-- tableåºå-begin --> |
| | | <div> |
| | | <a-table |
| | | ref="table" |
| | | size="middle" |
| | | bordered |
| | | rowKey="id" |
| | | filterMultiple="filterMultiple" |
| | | :columns="columns" |
| | | :rowClassName="tableRowClass" |
| | | :dataSource="dataSource" |
| | | :pagination="ipagination" |
| | | :loading="loading" |
| | | > |
| | | <!--ç¶ææ 个æ§å±ç¤º--> |
| | | <span |
| | | slot="status" |
| | | slot-scope="text,record" |
| | | > |
| | | <a-badge |
| | | v-if="record.itemStatus==1" |
| | | status="success" |
| | | /> |
| | | <span |
| | | v-if="record.itemStatus==1" |
| | | class="success" |
| | | >å¯ç¨</span> |
| | | <a-badge |
| | | v-if="record.itemStatus==0" |
| | | status="error" |
| | | /> |
| | | <span |
| | | v-if="record.itemStatus==0" |
| | | class="error" |
| | | >ç¦ç¨</span> |
| | | </span> |
| | | <span |
| | | slot="action" |
| | | slot-scope="text, record" |
| | | > |
| | | <a |
| | | href="javascript:;" |
| | | @click="handleDetail(record)" |
| | | >详æ
</a> |
| | | |
| | | <a-divider type="vertical" /> |
| | | <a-dropdown> |
| | | <a class="ant-dropdown-link">æ´å¤ |
| | | <a-icon type="down" /> |
| | | </a> |
| | | <a-menu slot="overlay"> |
| | | <a-menu-item> |
| | | <a @click="handleEdit(record)">ç¼è¾</a> |
| | | </a-menu-item> |
| | | <a-menu-item> |
| | | <a-popconfirm |
| | | title="ç¡®å®å é¤å?" |
| | | @confirm="() => handleDelete(record.id)" |
| | | > |
| | | <a>å é¤</a> |
| | | </a-popconfirm> |
| | | |
| | | </a-menu-item> |
| | | <a-menu-item v-if="record.itemStatus == 0"> |
| | | <a-popconfirm |
| | | title="ç¡®å®å¯ç¨å?" |
| | | @confirm="() => handleActive(record.id)" |
| | | > |
| | | <a>å¯ç¨</a> |
| | | </a-popconfirm> |
| | | </a-menu-item> |
| | | <a-menu-item v-if="record.itemStatus == 1"> |
| | | <a-popconfirm |
| | | title="ç¡®å®ç¦ç¨å?" |
| | | @confirm="() => handleActive(record.id)" |
| | | > |
| | | <a>ç¦ç¨</a> |
| | | </a-popconfirm> |
| | | </a-menu-item> |
| | | </a-menu> |
| | | </a-dropdown> |
| | | </span> |
| | | |
| | | </a-table> |
| | | </div> |
| | | <!-- tableåºå-end --> |
| | | |
| | | <!-- 表ååºå --> |
| | | <inspection-item-model |
| | | ref="modalForm" |
| | | @ok="modalFormOk" |
| | | ></inspection-item-model> |
| | | </a-card> |
| | | </template> |
| | | |
| | | <script> |
| | | //æéå¼å
¥ ç»ä»¶ |
| | | import InspectionItemModel from './modules/inspectionItem/InspectionItemModel' |
| | | |
| | | import { deleteAction, requestPut, getAction } from '@/api/manage' |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | import JEllipsis from '@/components/jeecg/JEllipsis' |
| | | import JInput from '@/components/jeecg/JInput' |
| | | |
| | | export default { |
| | | name: 'InspectionItemList', |
| | | mixins: [JeecgListMixin], |
| | | components: { |
| | | InspectionItemModel, |
| | | JEllipsis, |
| | | JInput, |
| | | }, |
| | | data() { |
| | | return { |
| | | dataSource: [], |
| | | /* å页忰 */ |
| | | ipagination: { |
| | | current: 1, |
| | | pageSize: 5, |
| | | pageSizeOptions: ['5', '10', '20'], |
| | | showTotal: (total, range) => { |
| | | return range[0] + "-" + range[1] + " å
±" + total + "æ¡" |
| | | }, |
| | | total: 0 |
| | | }, |
| | | // 表头 |
| | | columns: [ |
| | | { |
| | | title: '#', |
| | | dataIndex: '', |
| | | key: 'rowIndex', |
| | | width: 60, |
| | | align: "center", |
| | | customRender: function (t, r, index) { |
| | | return parseInt(index) + 1; |
| | | } |
| | | }, |
| | | { |
| | | title: 'æ£éªé¡¹ç®ç¼å·', |
| | | align: "center", |
| | | dataIndex: 'itemCode' |
| | | }, |
| | | { |
| | | title: 'æ£éªé¡¹ç®åç§°', |
| | | align: "center", |
| | | dataIndex: 'itemName' |
| | | }, |
| | | { |
| | | title: 'æ£éªé¡¹ç®åç±»', |
| | | align: "center", |
| | | dataIndex: 'itemCategory' |
| | | }, |
| | | { |
| | | title: 'å®é/宿§', |
| | | align: "center", |
| | | dataIndex: 'qualitativeOrQuantitative' |
| | | }, |
| | | { |
| | | title: 'æµéå·¥å
·', |
| | | align: "center", |
| | | dataIndex: 'inspectionTools' |
| | | }, |
| | | { |
| | | title: '夿³¨', |
| | | align: 'center', |
| | | dataIndex: 'remark' |
| | | }, |
| | | { |
| | | width: 100, |
| | | title: 'ç¶æ', |
| | | align: 'center', |
| | | scopedSlots: { |
| | | customRender: 'status', |
| | | }, |
| | | dataIndex: 'itemStatus' |
| | | }, |
| | | { |
| | | width: 150, |
| | | title: 'æä½', |
| | | dataIndex: 'action', |
| | | align: 'center', |
| | | scopedSlots: { customRender: 'action' }, |
| | | } |
| | | ], |
| | | url: { |
| | | list: '/qms/inspectionItem/list', |
| | | delete: '/qms/inspectionItem/delete', |
| | | active: '/qms/inspectionItem/active', |
| | | }, |
| | | } |
| | | }, |
| | | mounted() { |
| | | }, |
| | | methods: { |
| | | loadData(arg) { |
| | | if (arg === 1) { |
| | | this.ipagination.current = 1; |
| | | } |
| | | var params = this.getQueryParams();//æ¥è¯¢æ¡ä»¶ |
| | | this.loading = true; |
| | | getAction(this.url.list, params).then((res) => { |
| | | if (res.success) { |
| | | this.dataSource = res.result.records; |
| | | this.ipagination.total = res.result.total; |
| | | } |
| | | if (res.code === 510) { |
| | | this.$message.warning(res.message) |
| | | } |
| | | this.loading = false; |
| | | }) |
| | | }, |
| | | //ç¦ç¨ç¶ææ ·å¼ |
| | | tableRowClass(record, index) { |
| | | if (record.warehouseStatus != "1") { |
| | | return "frozenRowClass"; |
| | | } |
| | | return ""; |
| | | }, |
| | | //å¯ç¨ç¦ç¨ |
| | | handleActive(id) { |
| | | if (!this.url.active) { |
| | | this.$message.error("请设置url.active!") |
| | | return |
| | | } |
| | | let that = this; |
| | | requestPut(that.url.active, {}, { id: id }).then((res) => { |
| | | if (res.success) { |
| | | that.$message.success(res.message); |
| | | that.loadData(); |
| | | } else { |
| | | that.$message.warning(res.message); |
| | | } |
| | | }); |
| | | }, |
| | | }, |
| | | |
| | | } |
| | | </script> |
| | | <style lang="less" scoped> |
| | | @import '~@assets/less/common.less'; |
| | | .frozenRowClass { |
| | | color: #c9c9c9; |
| | | } |
| | | .success { |
| | | color: green; |
| | | } |
| | | .error { |
| | | color: red; |
| | | } |
| | | .fontweight { |
| | | font-weight: bold; |
| | | } |
| | | .ant-card-body .table-operator { |
| | | margin-bottom: 18px; |
| | | } |
| | | |
| | | .ant-table-tbody .ant-table-row td { |
| | | padding-top: 15px; |
| | | padding-bottom: 15px; |
| | | } |
| | | |
| | | .anty-row-operator button { |
| | | margin: 0 5px; |
| | | } |
| | | |
| | | /deep/.ant-btn-danger { |
| | | background-color: #ffffff; |
| | | } |
| | | |
| | | .ant-modal-cust-warp { |
| | | height: 100%; |
| | | } |
| | | |
| | | .ant-modal-cust-warp .ant-modal-body { |
| | | height: calc(100% - 110px) !important; |
| | | overflow-y: auto; |
| | | } |
| | | |
| | | .ant-modal-cust-warp .ant-modal-content { |
| | | height: 90% !important; |
| | | overflow-y: hidden; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <a-card |
| | | :bordered="false" |
| | | > |
| | | <!-- æ¥è¯¢åºå --> |
| | | <div class="table-page-search-wrapper"> |
| | | <a-form |
| | | layout="inline" |
| | | @keyup.enter.native="searchQuery" |
| | | > |
| | | <a-row :gutter="30"> |
| | | |
| | | <a-col :xl="4" :lg="7" :md="8" :sm="24"> |
| | | <a-form-item label="æ£éªå·¥å
·ç¼ç "> |
| | | <j-input |
| | | placeholder="请è¾å
¥æ£éªå·¥å
·ç¼ç æ£ç´¢" |
| | | v-model="queryParam.toolCode" |
| | | ></j-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.toolName" |
| | | ></j-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | |
| | | <a-col :xl="4" :lg="7" :md="8" :sm="24"> |
| | | <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons"> |
| | | <a-button type="primary" @click="searchQuery" icon="search">æ¥è¯¢</a-button> |
| | | <a-button type="info" @click="searchReset" icon="reload" style="margin-left: 8px">éç½®</a-button> |
| | | </span> |
| | | </a-col> |
| | | </a-row> |
| | | </a-form> |
| | | </div> |
| | | |
| | | <!-- æä½æé®åºå --> |
| | | <div class="table-operator"> |
| | | <a-button |
| | | @click="handleAdd" |
| | | type="primary" |
| | | icon="plus" |
| | | >æ°å¢</a-button> |
| | | </div> |
| | | |
| | | <!-- tableåºå-begin --> |
| | | <div> |
| | | <a-table |
| | | ref="table" |
| | | size="middle" |
| | | bordered |
| | | rowKey="id" |
| | | filterMultiple="filterMultiple" |
| | | :columns="columns" |
| | | :rowClassName="tableRowClass" |
| | | :dataSource="dataSource" |
| | | :pagination="ipagination" |
| | | :loading="loading" |
| | | > |
| | | <!--ç¶ææ 个æ§å±ç¤º--> |
| | | <span |
| | | slot="status" |
| | | slot-scope="text,record" |
| | | > |
| | | <a-badge |
| | | v-if="record.toolStatus==1" |
| | | status="success" |
| | | /> |
| | | <span |
| | | v-if="record.toolStatus==1" |
| | | class="success" |
| | | >å¯ç¨</span> |
| | | <a-badge |
| | | v-if="record.toolStatus==0" |
| | | status="error" |
| | | /> |
| | | <span |
| | | v-if="record.toolStatus==0" |
| | | class="error" |
| | | >ç¦ç¨</span> |
| | | </span> |
| | | <span |
| | | slot="action" |
| | | slot-scope="text, record" |
| | | > |
| | | <a |
| | | href="javascript:;" |
| | | @click="handleDetail(record)" |
| | | >详æ
</a> |
| | | |
| | | <a-divider type="vertical" /> |
| | | <a-dropdown> |
| | | <a class="ant-dropdown-link">æ´å¤ |
| | | <a-icon type="down" /> |
| | | </a> |
| | | <a-menu slot="overlay"> |
| | | <a-menu-item> |
| | | <a @click="handleEdit(record)">ç¼è¾</a> |
| | | </a-menu-item> |
| | | <a-menu-item> |
| | | <a-popconfirm |
| | | title="ç¡®å®å é¤å?" |
| | | @confirm="() => handleDelete(record.id)" |
| | | > |
| | | <a>å é¤</a> |
| | | </a-popconfirm> |
| | | |
| | | </a-menu-item> |
| | | <a-menu-item v-if="record.toolStatus == 0"> |
| | | <a-popconfirm |
| | | title="ç¡®å®å¯ç¨å?" |
| | | @confirm="() => handleActive(record.id)" |
| | | > |
| | | <a>å¯ç¨</a> |
| | | </a-popconfirm> |
| | | </a-menu-item> |
| | | <a-menu-item v-if="record.toolStatus == 1"> |
| | | <a-popconfirm |
| | | title="ç¡®å®ç¦ç¨å?" |
| | | @confirm="() => handleActive(record.id)" |
| | | > |
| | | <a>ç¦ç¨</a> |
| | | </a-popconfirm> |
| | | </a-menu-item> |
| | | </a-menu> |
| | | </a-dropdown> |
| | | </span> |
| | | |
| | | </a-table> |
| | | </div> |
| | | <!-- tableåºå-end --> |
| | | |
| | | <!-- 表ååºå --> |
| | | <inspection-tools-model |
| | | ref="modalForm" |
| | | @ok="modalFormOk" |
| | | ></inspection-tools-model> |
| | | </a-card> |
| | | </template> |
| | | |
| | | <script> |
| | | //æéå¼å
¥ ç»ä»¶ |
| | | import InspectionToolsModel from './modules/inspectionTools/InspectionToolsModel' |
| | | |
| | | import { deleteAction, requestPut, getAction } from '@/api/manage' |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | import JEllipsis from '@/components/jeecg/JEllipsis' |
| | | import JInput from '@/components/jeecg/JInput' |
| | | |
| | | export default { |
| | | name: 'InspectionToolsList', |
| | | mixins: [JeecgListMixin], |
| | | components: { |
| | | InspectionToolsModel, |
| | | JEllipsis, |
| | | JInput, |
| | | }, |
| | | data() { |
| | | return { |
| | | dataSource: [], |
| | | /* å页忰 */ |
| | | ipagination: { |
| | | current: 1, |
| | | pageSize: 5, |
| | | pageSizeOptions: ['5', '10', '20'], |
| | | showTotal: (total, range) => { |
| | | return range[0] + "-" + range[1] + " å
±" + total + "æ¡" |
| | | }, |
| | | total: 0 |
| | | }, |
| | | // 表头 |
| | | columns: [ |
| | | { |
| | | title: '#', |
| | | dataIndex: '', |
| | | key: 'rowIndex', |
| | | width: 60, |
| | | align: "center", |
| | | customRender: function (t, r, index) { |
| | | return parseInt(index) + 1; |
| | | } |
| | | }, |
| | | { |
| | | title: 'æ£éªå·¥å
·ç¼ç ', |
| | | align: "center", |
| | | dataIndex: 'toolCode' |
| | | }, |
| | | { |
| | | title: 'æ£éªå·¥å
·åç§°', |
| | | align: "center", |
| | | dataIndex: 'toolName' |
| | | }, |
| | | { |
| | | title: '夿³¨', |
| | | align: 'center', |
| | | dataIndex: 'remark' |
| | | }, |
| | | { |
| | | width: 100, |
| | | title: 'ç¶æ', |
| | | align: 'center', |
| | | scopedSlots: { |
| | | customRender: 'status', |
| | | }, |
| | | dataIndex: 'toolStatus' |
| | | }, |
| | | { |
| | | width: 150, |
| | | title: 'æä½', |
| | | dataIndex: 'action', |
| | | align: 'center', |
| | | scopedSlots: { customRender: 'action' }, |
| | | } |
| | | ], |
| | | url: { |
| | | list: '/qms/inspectionTools/list', |
| | | delete: '/qms/inspectionTools/delete', |
| | | active: '/qms/inspectionTools/active', |
| | | }, |
| | | } |
| | | }, |
| | | mounted() { |
| | | }, |
| | | methods: { |
| | | loadData(arg) { |
| | | if (arg === 1) { |
| | | this.ipagination.current = 1; |
| | | } |
| | | var params = this.getQueryParams();//æ¥è¯¢æ¡ä»¶ |
| | | this.loading = true; |
| | | getAction(this.url.list, params).then((res) => { |
| | | if (res.success) { |
| | | this.dataSource = res.result.records; |
| | | this.ipagination.total = res.result.total; |
| | | } |
| | | if (res.code === 510) { |
| | | this.$message.warning(res.message) |
| | | } |
| | | this.loading = false; |
| | | }) |
| | | }, |
| | | //ç¦ç¨ç¶ææ ·å¼ |
| | | tableRowClass(record, index) { |
| | | if (record.warehouseStatus != "1") { |
| | | return "frozenRowClass"; |
| | | } |
| | | return ""; |
| | | }, |
| | | //å¯ç¨ç¦ç¨ |
| | | handleActive(id) { |
| | | if (!this.url.active) { |
| | | this.$message.error("请设置url.active!") |
| | | return |
| | | } |
| | | let that = this; |
| | | requestPut(that.url.active, {}, { id: id }).then((res) => { |
| | | if (res.success) { |
| | | that.$message.success(res.message); |
| | | that.loadData(); |
| | | } else { |
| | | that.$message.warning(res.message); |
| | | } |
| | | }); |
| | | }, |
| | | }, |
| | | |
| | | } |
| | | </script> |
| | | <style lang="less" scoped> |
| | | @import '~@assets/less/common.less'; |
| | | .frozenRowClass { |
| | | color: #c9c9c9; |
| | | } |
| | | .success { |
| | | color: green; |
| | | } |
| | | .error { |
| | | color: red; |
| | | } |
| | | .fontweight { |
| | | font-weight: bold; |
| | | } |
| | | .ant-card-body .table-operator { |
| | | margin-bottom: 18px; |
| | | } |
| | | |
| | | .ant-table-tbody .ant-table-row td { |
| | | padding-top: 15px; |
| | | padding-bottom: 15px; |
| | | } |
| | | |
| | | .anty-row-operator button { |
| | | margin: 0 5px; |
| | | } |
| | | |
| | | /deep/.ant-btn-danger { |
| | | background-color: #ffffff; |
| | | } |
| | | |
| | | .ant-modal-cust-warp { |
| | | height: 100%; |
| | | } |
| | | |
| | | .ant-modal-cust-warp .ant-modal-body { |
| | | height: calc(100% - 110px) !important; |
| | | overflow-y: auto; |
| | | } |
| | | |
| | | .ant-modal-cust-warp .ant-modal-content { |
| | | height: 90% !important; |
| | | overflow-y: hidden; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <a-modal |
| | | :title="title" |
| | | :width="800" |
| | | :visible="visible" |
| | | :confirmLoading="confirmLoading" |
| | | :okButtonProps="{ props: {disabled: disableSubmit} }" |
| | | @ok="handleOk" |
| | | @cancel="handleCancel" |
| | | cancelText="å
³é" |
| | | > |
| | | <a-spin :spinning="confirmLoading"> |
| | | <a-form :form="form"> |
| | | |
| | | <a-row :gutter="24"> |
| | | <a-col :span="24"> |
| | | <a-form-item |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | label="æ£éªé¡¹ç®ç¼å·" |
| | | > |
| | | <a-input |
| | | :disabled="disableSubmit" |
| | | allow-clear |
| | | placeholder="请è¾å
¥æ£éªé¡¹ç®ç¼å·" |
| | | v-decorator="['itemCode', validatorRules.itemCode ]" |
| | | /> |
| | | </a-form-item> |
| | | </a-col> |
| | | </a-row> |
| | | |
| | | <a-row :gutter="24"> |
| | | <a-col :span="24"> |
| | | <a-form-item |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | label="æ£éªé¡¹ç®åç§°" |
| | | > |
| | | <a-input |
| | | :disabled="disableSubmit" |
| | | allow-clear |
| | | placeholder="请è¾å
¥æ£éªé¡¹ç®åç§°" |
| | | v-decorator="['itemName', validatorRules.itemName ]" |
| | | /> |
| | | </a-form-item> |
| | | </a-col> |
| | | </a-row> |
| | | <a-row :gutter="24"> |
| | | <a-col :span="24"> |
| | | <a-form-item |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | label="æ£éªé¡¹ç®åç±»" |
| | | > |
| | | <j-dict-select-tag |
| | | :disabled="disableSubmit" |
| | | placeholder="请è¾å
¥æ£éªé¡¹ç®åç±»" |
| | | v-decorator="['itemCategory', validatorRules.itemCategory ]" |
| | | dictCode="item_category"/> |
| | | </a-form-item> |
| | | </a-col> |
| | | </a-row> |
| | | <a-row :gutter="24"> |
| | | <a-col :span="24"> |
| | | <a-form-item |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | label="å®é/宿§" |
| | | > |
| | | <j-dict-select-tag |
| | | :disabled="disableSubmit" |
| | | placeholder="è¯·éæ©å®é/宿§" |
| | | v-decorator="['qualitativeOrQuantitative', validatorRules.qualitativeOrQuantitative ]" |
| | | dictCode="qualitative_or_quantitative"/> |
| | | </a-form-item> |
| | | </a-col> |
| | | </a-row> |
| | | <a-row :gutter="24"> |
| | | <a-col :span="24"> |
| | | <a-form-item |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | label="æµéå·¥å
·" |
| | | > |
| | | <a-input |
| | | :disabled="disableSubmit" |
| | | allow-clear |
| | | placeholder="è¯·éæ©æµéå·¥å
·" |
| | | v-decorator="['inspectionTools', validatorRules.inspectionTools ]" |
| | | /> |
| | | </a-form-item> |
| | | </a-col> |
| | | </a-row> |
| | | <a-row :gutter="24"> |
| | | <a-col :span="24"> |
| | | <a-form-item |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | label="夿³¨" |
| | | > |
| | | <a-textarea :disabled="disableSubmit" placeholder="请è¾å
¥å¤æ³¨" v-decorator="['remark', validatorRules.remark ]"/> |
| | | </a-form-item> |
| | | </a-col> |
| | | </a-row> |
| | | </a-form> |
| | | </a-spin> |
| | | </a-modal> |
| | | </template> |
| | | |
| | | <script> |
| | | import { httpAction, getAction } from '@/api/manage' |
| | | import pick from 'lodash.pick' |
| | | import { duplicateCheck } from '@/api/api'//é夿 ¡éª |
| | | |
| | | export default { |
| | | name: "InspectionItemModal", |
| | | data() { |
| | | return { |
| | | title: "æä½", |
| | | visible: false, |
| | | disableSubmit: false, |
| | | model: {}, |
| | | inspectionItemId: "", //ä¿åæ£éªé¡¹ç®id |
| | | labelCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 5 }, |
| | | }, |
| | | wrapperCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 16 }, |
| | | }, |
| | | |
| | | confirmLoading: false, |
| | | form: this.$form.createForm(this), |
| | | validatorRules: { |
| | | itemCode: { |
| | | rules: [ |
| | | { required: true, message: '请è¾å
¥æ£éªé¡¹ç®ç¼ç ' }, |
| | | { min: 2, max: 30, message: 'é¿åº¦å¨ 2 å° 30 个å符', trigger: 'blur' }, |
| | | { validator: this.validateNum }, |
| | | ] |
| | | }, |
| | | itemName: { |
| | | rules: [ |
| | | { required: true, message: '请è¾å
¥æ£éªé¡¹ç®åç§°' }, |
| | | { min: 0, max: 64, message: 'é¿åº¦ä¸è¶
è¿ 64 个å符', trigger: 'blur' }, |
| | | { validator: this.validateName }, |
| | | ] |
| | | }, |
| | | }, |
| | | url: { |
| | | add: "/qms/inspectionItem/add", |
| | | edit: "/qms/inspectionItem/edit", |
| | | }, |
| | | } |
| | | }, |
| | | created() { |
| | | }, |
| | | methods: { |
| | | add() { |
| | | this.edit({}); |
| | | }, |
| | | edit(record) { |
| | | this.form.resetFields(); |
| | | this.model = Object.assign({}, record); |
| | | this.inspectionItemId = record.id; |
| | | this.visible = true; |
| | | this.$nextTick(() => { |
| | | this.form.setFieldsValue( |
| | | pick(this.model, 'itemCode', 'itemName','itemCategory','qualitativeOrQuantitative','inspectionTools', 'remark') |
| | | ) |
| | | }); |
| | | }, |
| | | close() { |
| | | this.$emit('close'); |
| | | this.visible = false; |
| | | }, |
| | | handleOk() { |
| | | const that = this; |
| | | // 触å表åéªè¯ |
| | | this.form.validateFields((err, values) => { |
| | | if (!err) { |
| | | that.confirmLoading = true; |
| | | let httpurl = ''; |
| | | let method = ''; |
| | | if (!this.model.id) { |
| | | httpurl += this.url.add; |
| | | method = 'post'; |
| | | } else { |
| | | httpurl += this.url.edit; |
| | | method = 'put'; |
| | | } |
| | | let formData = Object.assign(this.model, values); |
| | | httpAction(httpurl, formData, method).then((res) => { |
| | | if (res.success) { |
| | | that.$message.success(res.message); |
| | | that.$emit('ok'); |
| | | } else { |
| | | that.$message.warning(res.message); |
| | | } |
| | | }).finally(() => { |
| | | that.confirmLoading = false; |
| | | that.close(); |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | handleCancel() { |
| | | this.close() |
| | | }, |
| | | //éªè¯ ç¼å· |
| | | validateNum(rule, value, callback) { |
| | | var params = { |
| | | tableName: 'qms_inspection_item', |
| | | fieldName: 'item_code', |
| | | fieldVal: value, |
| | | dataId: this.inspectionItemId, |
| | | //æ°æ®åºä¸åå¨å段del_flag并使ç¨è¯¥å段ä½ä¸ºæªå é¤çç¥ï¼çå é¤ï¼false åå é¤ï¼true |
| | | delFlag: 'true', |
| | | }; |
| | | duplicateCheck(params).then((res) => { |
| | | if (res.success) { |
| | | callback(); |
| | | } else { |
| | | callback("æ£éªé¡¹ç®ç¼å·å·²åå¨!"); |
| | | } |
| | | }) |
| | | }, |
| | | //éªè¯ åç§° |
| | | validateName(rule, value, callback) { |
| | | var params = { |
| | | tableName: 'qms_inspection_items', |
| | | fieldName: 'item_name', |
| | | fieldVal: value, |
| | | dataId: this.inspectionItemId, |
| | | //æ°æ®åºä¸åå¨å段del_flag并使ç¨è¯¥å段ä½ä¸ºæªå é¤çç¥ï¼çå é¤ï¼false åå é¤ï¼true |
| | | delFlag: 'true', |
| | | }; |
| | | duplicateCheck(params).then((res) => { |
| | | if (res.success) { |
| | | callback(); |
| | | } else { |
| | | callback("æ£éªé¡¹ç®åç§°å·²åå¨!"); |
| | | } |
| | | }) |
| | | }, |
| | | // å
³éå¼¹çªæ¶æ¸
é¤è¡¨åæ ¡éª |
| | | removeValidate() { |
| | | if (this.$refs.form) this.$refs.form.clearValidate() |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .ant-btn { |
| | | padding: 0 10px; |
| | | margin-left: 3px; |
| | | } |
| | | |
| | | .ant-form-item-control { |
| | | line-height: 0px; |
| | | } |
| | | |
| | | /** 主表åè¡é´è· */ |
| | | .ant-form .ant-form-item { |
| | | margin-bottom: 10px; |
| | | } |
| | | |
| | | /** Tab页é¢è¡é´è· */ |
| | | .ant-tabs-content .ant-form-item { |
| | | margin-bottom: 0px; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <a-modal |
| | | :title="title" |
| | | :width="800" |
| | | :visible="visible" |
| | | :confirmLoading="confirmLoading" |
| | | :okButtonProps="{ props: {disabled: disableSubmit} }" |
| | | @ok="handleOk" |
| | | @cancel="handleCancel" |
| | | cancelText="å
³é" |
| | | > |
| | | <a-spin :spinning="confirmLoading"> |
| | | <a-form :form="form"> |
| | | |
| | | <a-row :gutter="24"> |
| | | <a-col :span="24"> |
| | | <a-form-item |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | label="æ£éªå·¥å
·ç¼ç " |
| | | > |
| | | <a-input |
| | | :disabled="disableSubmit" |
| | | allow-clear |
| | | placeholder="请è¾å
¥æ£éªå·¥å
·ç¼ç " |
| | | v-decorator="['toolCode', validatorRules.toolCode ]" |
| | | /> |
| | | </a-form-item> |
| | | </a-col> |
| | | </a-row> |
| | | |
| | | <a-row :gutter="24"> |
| | | <a-col :span="24"> |
| | | <a-form-item |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | label="æ£éªå·¥å
·åç§°" |
| | | > |
| | | <a-input |
| | | :disabled="disableSubmit" |
| | | allow-clear |
| | | placeholder="请è¾å
¥æ£éªå·¥å
·åç§°" |
| | | v-decorator="['toolName', validatorRules.toolName ]" |
| | | /> |
| | | </a-form-item> |
| | | </a-col> |
| | | </a-row> |
| | | <a-row :gutter="24"> |
| | | <a-col :span="24"> |
| | | <a-form-item |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | label="夿³¨" |
| | | > |
| | | <a-textarea :disabled="disableSubmit" placeholder="请è¾å
¥å¤æ³¨" v-decorator="['remark', validatorRules.remark ]"/> |
| | | </a-form-item> |
| | | </a-col> |
| | | </a-row> |
| | | </a-form> |
| | | </a-spin> |
| | | </a-modal> |
| | | </template> |
| | | |
| | | <script> |
| | | import { httpAction, getAction } from '@/api/manage' |
| | | import pick from 'lodash.pick' |
| | | import { duplicateCheck } from '@/api/api'//é夿 ¡éª |
| | | |
| | | export default { |
| | | name: "InspectionToolsModal", |
| | | data() { |
| | | return { |
| | | title: "æä½", |
| | | visible: false, |
| | | disableSubmit: false, |
| | | model: {}, |
| | | inspectionToolsId: "", //ä¿åæ£éªå·¥å
·id |
| | | labelCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 5 }, |
| | | }, |
| | | wrapperCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 16 }, |
| | | }, |
| | | |
| | | confirmLoading: false, |
| | | form: this.$form.createForm(this), |
| | | validatorRules: { |
| | | toolCode: { |
| | | rules: [ |
| | | { required: true, message: '请è¾å
¥æ£éªå·¥å
·ç¼ç ' }, |
| | | { min: 2, max: 30, message: 'é¿åº¦å¨ 2 å° 30 个å符', trigger: 'blur' }, |
| | | { validator: this.validateNum }, |
| | | ] |
| | | }, |
| | | toolName: { |
| | | rules: [ |
| | | { required: true, message: '请è¾å
¥æ£éªå·¥å
·åç§°' }, |
| | | { min: 0, max: 64, message: 'é¿åº¦ä¸è¶
è¿ 64 个å符', trigger: 'blur' }, |
| | | { validator: this.validateName }, |
| | | ] |
| | | }, |
| | | }, |
| | | url: { |
| | | add: "/qms/inspectionTools/add", |
| | | edit: "/qms/inspectionTools/edit", |
| | | }, |
| | | } |
| | | }, |
| | | created() { |
| | | }, |
| | | methods: { |
| | | add() { |
| | | this.edit({}); |
| | | }, |
| | | edit(record) { |
| | | this.form.resetFields(); |
| | | this.model = Object.assign({}, record); |
| | | this.inspectionToolsId = record.id; |
| | | this.visible = true; |
| | | this.$nextTick(() => { |
| | | this.form.setFieldsValue( |
| | | pick(this.model, 'toolCode', 'toolName', 'remark') |
| | | ) |
| | | }); |
| | | }, |
| | | close() { |
| | | this.$emit('close'); |
| | | this.visible = false; |
| | | }, |
| | | handleOk() { |
| | | const that = this; |
| | | // 触å表åéªè¯ |
| | | this.form.validateFields((err, values) => { |
| | | if (!err) { |
| | | that.confirmLoading = true; |
| | | let httpurl = ''; |
| | | let method = ''; |
| | | if (!this.model.id) { |
| | | httpurl += this.url.add; |
| | | method = 'post'; |
| | | } else { |
| | | httpurl += this.url.edit; |
| | | method = 'put'; |
| | | } |
| | | let formData = Object.assign(this.model, values); |
| | | httpAction(httpurl, formData, method).then((res) => { |
| | | if (res.success) { |
| | | that.$message.success(res.message); |
| | | that.$emit('ok'); |
| | | } else { |
| | | that.$message.warning(res.message); |
| | | } |
| | | }).finally(() => { |
| | | that.confirmLoading = false; |
| | | that.close(); |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | handleCancel() { |
| | | this.close() |
| | | }, |
| | | //éªè¯ ç¼å· |
| | | validateNum(rule, value, callback) { |
| | | var params = { |
| | | tableName: 'qms_inspection_tools', |
| | | fieldName: 'tool_code', |
| | | fieldVal: value, |
| | | dataId: this.inspectionToolsId, |
| | | //æ°æ®åºä¸åå¨å段del_flag并使ç¨è¯¥å段ä½ä¸ºæªå é¤çç¥ï¼çå é¤ï¼false åå é¤ï¼true |
| | | delFlag: 'true', |
| | | }; |
| | | duplicateCheck(params).then((res) => { |
| | | if (res.success) { |
| | | callback(); |
| | | } else { |
| | | callback("æ£éªå·¥å
·ç¼ç å·²åå¨!"); |
| | | } |
| | | }) |
| | | }, |
| | | //éªè¯ åç§° |
| | | validateName(rule, value, callback) { |
| | | var params = { |
| | | tableName: 'qms_inspection_tools', |
| | | fieldName: 'tool_name', |
| | | fieldVal: value, |
| | | dataId: this.inspectionToolsId, |
| | | //æ°æ®åºä¸åå¨å段del_flag并使ç¨è¯¥å段ä½ä¸ºæªå é¤çç¥ï¼çå é¤ï¼false åå é¤ï¼true |
| | | delFlag: 'true', |
| | | }; |
| | | duplicateCheck(params).then((res) => { |
| | | if (res.success) { |
| | | callback(); |
| | | } else { |
| | | callback("æ£éªå·¥å
·åç§°å·²åå¨!"); |
| | | } |
| | | }) |
| | | }, |
| | | // å
³éå¼¹çªæ¶æ¸
é¤è¡¨åæ ¡éª |
| | | removeValidate() { |
| | | if (this.$refs.form) this.$refs.form.clearValidate() |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .ant-btn { |
| | | padding: 0 10px; |
| | | margin-left: 3px; |
| | | } |
| | | |
| | | .ant-form-item-control { |
| | | line-height: 0px; |
| | | } |
| | | |
| | | /** 主表åè¡é´è· */ |
| | | .ant-form .ant-form-item { |
| | | margin-bottom: 10px; |
| | | } |
| | | |
| | | /** Tab页é¢è¡é´è· */ |
| | | .ant-tabs-content .ant-form-item { |
| | | margin-bottom: 0px; |
| | | } |
| | | </style> |
| | |
| | | label="车é´åé
" |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | v-show="!productionDisabled" |
| | | v-show="!factoryDisabled" |
| | | > |
| | | <j-select-production |
| | | v-model="model.selectedProduction" |
| | | <j-select-factory |
| | | v-model="model.selectedFactory" |
| | | :multi="true" |
| | | @back="backProductionInfo" |
| | | @back="backFactoryInfo" |
| | | :backProduction="true" |
| | | :treeProductOpera="true" |
| | | ></j-select-production> |
| | | ></j-select-factory> |
| | | </a-form-model-item> |
| | | |
| | | <!--<a-form-model-item--> |
| | | <!--label="éæ©è®¾å¤"--> |
| | | <!--:labelCol="labelCol"--> |
| | | <!--:wrapperCol="wrapperCol"--> |
| | | <!--v-show="!productionDisabled"--> |
| | | <!--v-show="!factoryDisabled"--> |
| | | <!-->--> |
| | | <!--<a-input-search--> |
| | | <!--:readOnly="true"--> |
| | |
| | | <!--@search="deviceSearch"--> |
| | | <!--enter-button--> |
| | | <!--placeholder="è¯·éæ©è®¾å¤"--> |
| | | <!--:disabled="!model.selectedProduction"--> |
| | | <!--:disabled="!model.selectedFactory"--> |
| | | <!--/>--> |
| | | <!--</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, |
| | |
| | | tenantsOptions: [], |
| | | rolesOptions: [], |
| | | nextDepartOptions: [], |
| | | nextProductionOptions: [], |
| | | nextFactoryOptions: [], |
| | | isDepartType: '', |
| | | model: { |
| | | selectedProduction: '' |
| | | selectedFactory: '' |
| | | } |
| | | } |
| | | }, |
| | |
| | | if (value) this.initDictData('password_length') |
| | | } |
| | | }, |
| | | 'model.selectedProduction': { |
| | | 'model.selectedFactory': { |
| | | handler(newVal, oldVal) { |
| | | if (newVal) { |
| | | // å¦æè½¦é´éæ©ååä¸ä¸è´åéç½®éæ©è®¾å¤ |
| | |
| | | userIdentity: 1, |
| | | selectedroles: '', |
| | | selecteddeparts: '', |
| | | selectedProduction: '' |
| | | selectedFactory: '' |
| | | }) |
| | | }, |
| | | edit(record) { |
| | |
| | | // è·å车é´åé
|
| | | getAction(that.url.userProductionList, { 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, 'selectedFactory', selectFactoryKeys.join(',')) |
| | | that.nextFactoryOptions = FactoryOptions |
| | | } |
| | | }) |
| | | //车é´çurl |
| | |
| | | return c |
| | | }) |
| | | }, |
| | | backProductionInfo(info) { |
| | | this.model.productionIds = this.model.selectedProduction |
| | | this.nextProductionOptions = info.map((item, index, arr) => { |
| | | backFactoryInfo(info) { |
| | | this.model.factoryIds = this.model.selectedFactory |
| | | 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() |
| | | }, |