Commit b068b800 authored by 秦嘉's avatar 秦嘉

Merge remote-tracking branch 'origin/master'

parents 37248903 8e39fbf4
......@@ -12,6 +12,15 @@ export function listMaterial(query) {
})
}
// 生产模型查询物料列表
export function listModelMaterial(query) {
return request({
url: '/nltifsmaterial/queryProNltIfsMaterialByPagination',
method: 'get',
params: query
})
}
// 查询物料单表
export function getMaterial(materialId) {
return request({
......
......@@ -2,7 +2,7 @@ import request from '@/utils/request'
// 查询角色列表
export function getTableData(params) {
return request({
url: '坐等接口',
url: '/datamonitor/monitor',
method: 'get',
params
})
......
......@@ -22,7 +22,7 @@ export default {
if (title) {
vnodes.push(
<div style='padding-bottom: 5px;' slot='title'>
<div style='padding-bottom: 5px;position: relative; right: 10px' slot='title'>
<div> {(title.split(';')[0])} </div>
<div style='padding-left: 5px;font-size: 12px;'>{(title.split(';')[1])}</div>
</div>
......@@ -32,3 +32,8 @@ export default {
}
}
</script>
<style>
{
position: relative;
}
</style>
<template>
<div v-if="!item.hidden">
<template v-if="item.showFather !== 'true' && hasOneShowingChild(item.children,item) && (!onlyOneChild.children||onlyOneChild.noShowingChildren)&&!item.alwaysShow">
<template v-if="item.showFather !== 'true' && hasOneShowingChild(item.children,item) && (!onlyOneChild.children || onlyOneChild.noShowingChildren) && !item.alwaysShow">
<app-link v-if="onlyOneChild.meta" :to="resolvePath(onlyOneChild.path)">
<div class="menuTitle">
<el-menu-item style="" :index="resolvePath(onlyOneChild.path)" :class="{'submenu-title-noDropdown':!isNest}">
......@@ -66,8 +66,9 @@ export default {
data() {
// To fix https://github.com/PanJiaChen/vue-admin-template/issues/237
// TODO: refactor with render function
this.onlyOneChild = null
return {}
return {
onlyOneChild: null
}
},
methods: {
hasOneShowingChild(children = [], parent) {
......@@ -83,8 +84,11 @@ export default {
// When there is only one child router, the child router is displayed by default
if (showingChildren.length === 1) {
if (showingChildren[0].path === '/Home') {
return true
}
return false
}
// Show parent if there are no child router to display
if (showingChildren.length === 0) {
......
......@@ -38,7 +38,7 @@
<!-- <i class="el-icon-message-solid" />-->
<!-- </el-badge>-->
<span class="username-text">
[您好,诺兰特移动通信配件{{ $store.getters.contract }}有限公司 {{ userName }}]
[您好,诺兰特移动通信配件{{ $store.getters.contract === 'NB' ? '北京' : $store.getters.contract === 'NOSZ' ? '苏州' : '' }}有限公司 {{ userName }}]
</span>
<el-dropdown class="avatar-container" trigger="click">
<div class="avatar-wrapper">
......
......@@ -89,6 +89,7 @@
&:hover {
background-color: $subMenuHover !important;
color: $font-white
}
}
}
......@@ -278,6 +279,9 @@
&.is-active {
color: white !important;
}
&:hover {
color: white !important;
}
}
}
......
......@@ -73,114 +73,28 @@ export default {
lineNo: ''
},
monitoringData: [],
lineNoList: []
lineNoList: [],
interval: undefined
}
},
created() {
this.getStaTable()
this.monitoringData = [
{
orderNo: '123456',
orderQty: '654321',
column: [
{
label: '产线号',
prop: 'lineNo',
width: '100px' // 0 或 1 代表是动态表头还是固定的 或者给写死个宽度也好
},
{
label: '线别号',
prop: 'lineNumber',
width: '100px'
},
{
label: '开工时间',
prop: 'timeDate',
width: '160px'
},
{
label: 'Scan1',
prop: 'Scan1',
width: '60px'
},
{
label: 'Scan2',
prop: 'Scan2',
width: '60px'
},
{
label: 'Scan3',
prop: 'Scan3',
width: '60px'
},
{
label: 'Scan4',
prop: 'Scan4',
width: '60px'
},
{
label: 'Test1',
prop: 'Test1',
width: '60px'
},
{
label: 'Test2',
prop: 'Test2',
width: '60px'
},
{
label: 'Test3',
prop: 'Test3',
width: '60px'
},
{
label: 'Test4',
prop: 'Test4',
width: '60px'
},
{
label: 'Test5',
prop: 'Test5',
width: '60px'
},
{
label: 'Test6',
prop: 'Test6',
width: '60px'
mounted() {
},
{
label: 'Test7',
prop: 'Test7',
width: '60px'
}
],
tableData: [
{
lineNo: 'Device Line 1',
lineNumber: 'J2E02MAKC',
timeDate: '2022-05-01 07:08:19',
Scan1: '1234',
Scan2: '1234',
Scan3: '1234',
Scan4: '1234',
Test1: '1234',
Test2: '1234',
Test3: '1234',
Test4: '1234',
Test5: '1234',
Test6: '1234',
Test7: '1234'
}
]
}
]
beforeDestroy() {
clearInterval(this.intercal)
},
mounted() {
destroyed() {
clearInterval(this.intercal)
},
methods: {
/** 查询按钮方法 **/
handleQuery() {
clearInterval(this.intercal)
this.intercal = setInterval(_ => {
this.getStaTable()
}, 2000)
},
/** 重置按钮方法 **/
resetQuery() {
......@@ -190,11 +104,12 @@ export default {
// 获取表数据
getStaTable() {
const params = {}
this.intercal = setInterval(_ => {
getTableData(params).then(res => {
this.monitoringData = res.data
}).catch(_ => {
console.log('¿¿¿¿')
})
}, 2000)
}
}
}
......
......@@ -202,12 +202,12 @@
<el-row class="rowMini" v-for="(item1, index1) in item.nltMaterialEditRules" :key="index1">
<el-col :span="13">
<el-form-item label="规则设置" :prop="'nltMaterialEditList.' + index + '.nltMaterialEditRules.' + index1 + '.ruleByte'" :rules="[{ required: true, validator: (rule, value, callback) => {ruleByteRule(rule, value, callback, item, index1)}, trigger: 'blur' }]">
<el-input :maxlength="2" v-model.trim="item1.ruleByte"/>
<el-input :maxlength="2" v-model.trim="item1.ruleByte" placeholder="请输入SN码位数"/>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item class="labelHeight1" :prop="'nltMaterialEditList.' + index + '.nltMaterialEditRules.' + index1 + '.rules'" :rules="[{ required: true, validator: rulesRule, trigger: 'blur' }]">
<el-input :maxlength="1" v-model.trim="item1.rules"/>
<el-input :maxlength="1" v-model.trim="item1.rules" placeholder="请输入一位字符"/>
</el-form-item>
</el-col>
<el-col :span="5">
......@@ -583,11 +583,29 @@ export default {
},
// 删除SN规则方法
delSNRules(item, index) {
this.$confirm('确定删除该SN规则?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.form.nltMaterialEditList.splice(index, 1)
}).catch(() => {
})
},
// 删除SN规则方法2
delSNRule(item, index1) {
this.$confirm('确定删除该规则设置?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
item.nltMaterialEditRules.splice(index1, 1)
this.$message({
type: 'success',
message: '删除成功!'
})
}).catch(() => {
})
},
// 重置表单
reset() {
......@@ -608,7 +626,7 @@ export default {
},
totalDigitsRule(rule, value, callback) {
if (!value) {
callback(new Error('请输入正整数'))
callback(new Error('请输入总位数'))
} else {
const reg = /(^[1-9][0-9]$)|(^100&)|(^[1-9]$)$/
if (reg.test(value)) {
......@@ -620,7 +638,10 @@ export default {
},
ruleByteRule(rule, value, callback, data, index) {
if (!value) {
callback(new Error('请输入正整数'))
callback(new Error('请输入SN码位数'))
} else {
if (parseInt(value) > parseInt(data.totalDigits)) {
callback(new Error('规则设置应小于总位数'))
} else {
const reg = /^([1-9]\d*|[0]{1,1})$/
if (reg.test(value)) {
......@@ -636,10 +657,11 @@ export default {
return callback(new Error('请输入正整数'))
}
}
}
},
rulesRule(rule, value, callback) {
if (!value) {
callback(new Error('请输入规则'))
callback(new Error('请输入规则设置'))
} else {
const reg = /[\u4E00-\u9FA5]/g
if (!reg.test(value)) {
......
......@@ -373,7 +373,7 @@
</template>
<script>
import { listMaterial } from '@/api/material'
import { listModelMaterial } from '@/api/material'
import { listStation } from '@/api/station'
import { getDicts } from '@/api/system/dict/data'
import { nltmodelAdd, nltmodelDetail, nltmodelUpdate, nltordermodelDetail, nltordermodelUpdate } from '@/api/productionInfo'
......@@ -494,7 +494,7 @@ export default {
// 第一工站选择物料集合
this.firstTableData = []
val[0].nltModelStationMaters.forEach(item => {
if ((item.configureOrNot !== null && item.configureOrNot !== undefined && item.configureOrNot !== '')) {
if ((item.configureOrNot !== null && item.configureOrNot !== undefined && item.configureOrNot !== '') || this.htmlType === '1' || this.htmlType === '2') {
this.firstTableData.push(item)
}
})
......@@ -578,6 +578,7 @@ export default {
this.form.modelCode = res.data.materCode
this.form.materId = res.data.materId
this.positionList = this.initTableData(res.data.stationList)
console.log(this.positionList, 'this.positionList')
})
}
},
......@@ -698,7 +699,7 @@ export default {
} else {
delete params['type']
}
listMaterial(params).then(res => {
listModelMaterial(params).then(res => {
this.selectPartNum = res.rows
this.total = res.total
this.loadingCode = false
......@@ -749,6 +750,7 @@ export default {
// 添加工站弹窗
addPosition() {
this.workType = '1'
this.queryParams.page = 1
this.openPosition = true
this.title = '添加工站'
this.addPositionMapOne = {}
......@@ -757,6 +759,7 @@ export default {
// 修改工站弹窗
editPosition(row) {
this.workType = '2'
this.queryParams.page = 1
this.disposeMaterialId = row.businessId
this.openPosition = true
this.title = '修改工站'
......@@ -994,6 +997,7 @@ export default {
type: 'warning'
}).then(() => {
let list = []
console.log(this.selectListId, 'this.selectListId')
list = this.selectListId.filter(item => item === row.businessId)
if (list.length > 0) {
this.$message.error('该物料已被其他工站选用')
......
......@@ -565,6 +565,7 @@ export default {
},
handleImport() {
this.upload.title = '不良导入'
this.fileList = []
this.upload.uploadData = true
},
/** 导出按钮操作 */
......
......@@ -510,7 +510,7 @@
</div>
</el-dialog>
<!-- 用户导入对话框 -->
<el-dialog :close-on-click-modal="false" :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body>
<el-dialog :close-on-click-modal="false" :title="upload.title" :visible.sync="upload.open" width="520px" :append-to-body="false">
<el-upload
accept=".xlsx, .xls"
:headers="upload.headers"
......@@ -533,9 +533,9 @@
</div>
<div slot="tip" class="el-upload__tip">
<!-- <el-checkbox v-model="upload.updateSupport" />是否更新已经存在的用户数据-->
<span type="info" style="font-size: 14px; color: #6bc9f5;cursor: pointer" @click="importTemplate">下载模板</span>
<span type="info" style="font-size: 14px; color: #0A82D2; cursor: pointer" @click="importTemplate">下载模板</span>
</div>
<div slot="tip" class="el-upload__tip" style="color:red">提示:仅允许导入“xls”或“xlsx”格式文件!</div>
<div slot="tip" class="el-upload__tip" style="color:#333; margin-top: 16px;">提示:仅允许导入“xls”或“xlsx”格式文件!</div>
</el-upload>
<div slot="footer" class="dialog-footer">
<el-button class="resetBtn" @click="upload.open = false">取 消 Cancel</el-button>
......@@ -1306,6 +1306,9 @@ export default {
.el-form-item__label-wrap {
margin-left: 0!important;
}
.el-upload-dragger {
width: 480px;
}
}
.userDialog{
.labelHeight{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment