产线工段
This commit is contained in:
parent
53caddfa1e
commit
2d1126512c
@ -1,7 +1,7 @@
|
|||||||
<!--
|
<!--
|
||||||
* @Author: Do not edit
|
* @Author: Do not edit
|
||||||
* @Date: 2024-01-09 13:48:42
|
* @Date: 2024-01-09 13:48:42
|
||||||
* @LastEditTime: 2024-01-29 17:17:14
|
* @LastEditTime: 2024-01-30 08:55:04
|
||||||
* @LastEditors: DY
|
* @LastEditors: DY
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
@ -123,16 +123,6 @@ export default {
|
|||||||
} else {
|
} else {
|
||||||
this.lineArray = []
|
this.lineArray = []
|
||||||
}
|
}
|
||||||
// if (res && res.data.data.length > 0) {
|
|
||||||
// this.lineArray = res.data.data.map(item => {
|
|
||||||
// return {
|
|
||||||
// text: item.name,
|
|
||||||
// value: item.id
|
|
||||||
// }
|
|
||||||
// })
|
|
||||||
// } else {
|
|
||||||
// this.lineArray = []
|
|
||||||
// }
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
getSection (value) {
|
getSection (value) {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<!--
|
<!--
|
||||||
* @Author: Do not edit
|
* @Author: Do not edit
|
||||||
* @Date: 2024-01-09 13:49:03
|
* @Date: 2024-01-09 13:49:03
|
||||||
* @LastEditTime: 2024-01-29 17:57:45
|
* @LastEditTime: 2024-01-30 08:56:57
|
||||||
* @LastEditors: DY
|
* @LastEditors: DY
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
@ -59,7 +59,7 @@
|
|||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<div class="whiteForm">
|
<div class="whiteForm">
|
||||||
<el-form-item label="产线" prop="lineId">
|
<el-form-item label="产线" prop="lineId">
|
||||||
<el-select v-model="ruleForm.lineId" filterable clearable placeholder="请选择产线" @focus="focusInput1($event)" style="width: 100%; display: block" @change="getSection()">
|
<el-select v-model="ruleForm.lineId" filterable clearable placeholder="请选择产线" @focus="focusInput1($event)" style="width: 100%; display: block" @change="getSection">
|
||||||
<el-option v-for="(item, index) in lineArray" :key="index" :label="item.name" :value="item.id"></el-option>
|
<el-option v-for="(item, index) in lineArray" :key="index" :label="item.name" :value="item.id"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -95,7 +95,7 @@
|
|||||||
<el-row>
|
<el-row>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<!-- <el-button @click="resetForm('ruleForm')">取消</el-button> -->
|
<!-- <el-button @click="resetForm('ruleForm')">取消</el-button> -->
|
||||||
<el-button class="subButton" type="primary" @click="submitForm('ruleForm')">提交</el-button>
|
<el-button class="subButton" :disabled="disabled" type="primary" @click="submitForm('ruleForm')">提交</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-form>
|
</el-form>
|
||||||
@ -147,8 +147,9 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { workOrderList, scrapDetList, lineList, createScrap, workshopSectionListByLine } from '@/api/quality'
|
import { workOrderList, scrapDetList, createScrap, authList } from '@/api/quality'
|
||||||
import SimpleKeyboard from './components/simpleKeyboard.vue'
|
import SimpleKeyboard from './components/simpleKeyboard.vue'
|
||||||
|
import { getUserId } from '@/utils/auth'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: { SimpleKeyboard },
|
components: { SimpleKeyboard },
|
||||||
@ -179,19 +180,32 @@ export default {
|
|||||||
lineArray: [],
|
lineArray: [],
|
||||||
scrapList: [],
|
scrapList: [],
|
||||||
sectionArray: [],
|
sectionArray: [],
|
||||||
|
disabled: true,
|
||||||
rules: {
|
rules: {
|
||||||
workOrderId: [
|
// workOrderId: [
|
||||||
{ required: true, message: '请选择工单', trigger: 'change' }
|
// { required: true, message: '请选择工单', trigger: 'change' }
|
||||||
],
|
// ],
|
||||||
num: [
|
// num: [
|
||||||
{ required: true, message: '请输入报废数量', trigger: 'blur' }
|
// { required: true, message: '请输入报废数量', trigger: 'blur' }
|
||||||
],
|
// ],
|
||||||
detName: [
|
// detName: [
|
||||||
{ required: true, message: '请选择报废原因', trigger: 'blur' }
|
// { required: true, message: '请选择报废原因', trigger: 'change' }
|
||||||
]
|
// ]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
watch: {
|
||||||
|
ruleForm: {
|
||||||
|
handler (val) {
|
||||||
|
console.log('场次', val)
|
||||||
|
if (val.workOrderId && val.num && val.detName.length > 0) {
|
||||||
|
this.disabled = false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
deep: true
|
||||||
|
// immediate: true
|
||||||
|
}
|
||||||
|
},
|
||||||
computed: {
|
computed: {
|
||||||
inputValue: {
|
inputValue: {
|
||||||
get () {
|
get () {
|
||||||
@ -241,10 +255,14 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getSection () {
|
getSection (value) {
|
||||||
workshopSectionListByLine({ id: this.ruleForm.lineId }).then(res => {
|
const temp = this.lineArray.filter(item => {
|
||||||
this.sectionArray = res.data.data
|
return item.id === value
|
||||||
})
|
})
|
||||||
|
this.sectionArray = temp[0].children
|
||||||
|
// workshopSectionListByLine({ id: this.ruleForm.lineId }).then(res => {
|
||||||
|
// this.sectionArray = res.data.data
|
||||||
|
// })
|
||||||
},
|
},
|
||||||
inputFun () {
|
inputFun () {
|
||||||
this.$emit('input')
|
this.$emit('input')
|
||||||
@ -339,14 +357,22 @@ export default {
|
|||||||
async getDict () {
|
async getDict () {
|
||||||
const workRes = await workOrderList()
|
const workRes = await workOrderList()
|
||||||
this.workOrderList = workRes?.data?.data
|
this.workOrderList = workRes?.data?.data
|
||||||
await lineList().then(res => {
|
// await lineList().then(res => {
|
||||||
this.lineArray = res?.data?.data.map(item => {
|
// this.lineArray = res?.data?.data.map(item => {
|
||||||
return {
|
// return {
|
||||||
name: item.name,
|
// name: item.name,
|
||||||
id: item.id
|
// id: item.id
|
||||||
|
// }
|
||||||
|
// })
|
||||||
|
// })
|
||||||
|
await authList({ userId: getUserId() }).then(res => {
|
||||||
|
console.log('res', res.data.data)
|
||||||
|
if (res && res.data.data.datas.length > 0) {
|
||||||
|
this.lineArray = res.data.data.datas
|
||||||
|
} else {
|
||||||
|
this.lineArray = []
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
|
||||||
const scrapRes = await scrapDetList()
|
const scrapRes = await scrapDetList()
|
||||||
this.scrapList = scrapRes?.data?.data
|
this.scrapList = scrapRes?.data?.data
|
||||||
// this.scrapList.push({
|
// this.scrapList.push({
|
||||||
|
@ -139,7 +139,8 @@ export default {
|
|||||||
@deep: ~'>>>';
|
@deep: ~'>>>';
|
||||||
.hg-theme-default {
|
.hg-theme-default {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
margin-top: 50px;
|
margin-top: -10px;
|
||||||
|
z-index: 1;
|
||||||
// position: absolute;
|
// position: absolute;
|
||||||
// bottom: 0;
|
// bottom: 0;
|
||||||
// left: 0;
|
// left: 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user