|
|
@@ -166,16 +166,29 @@ _username.value = userStore.userInfo.userName + '/' + userStore.userInfo.nickNam
|
|
|
//新增工艺资料弹窗 键盘 input框跳转
|
|
|
const add_gyzlent = async (event,id1,id2,id3) => {
|
|
|
if (id2==='印件编号' && event.key==='Tab' || id2 === '印件编号' && event.key=== 'Enter') {
|
|
|
- const node = yjList.value.find(item => item.no ===form['yjno'])
|
|
|
- if (! node) {
|
|
|
- yjdisplay.value = true
|
|
|
+ if(yjList.value !== undefined){
|
|
|
+ const node = yjList.value.find(item => item.no ===form['yjno'])
|
|
|
+ if (! node) {
|
|
|
+ yjdisplay.value = true
|
|
|
+ }
|
|
|
+ document.getElementById(id3).focus()
|
|
|
}
|
|
|
- document.getElementById(id3).focus()
|
|
|
+
|
|
|
}
|
|
|
- if (id2 === '车间名称' && event.key==='Tab' || id2 === '车间名称' && event.key=== 'Enter') {
|
|
|
+ if (id2 === '车间名称' && event.key==='Tab') {
|
|
|
document.getElementById(id3).focus()
|
|
|
cjdisplay.value = true
|
|
|
}
|
|
|
+
|
|
|
+ if (id2 === '车间名称' && event.key=== 'Enter') {
|
|
|
+ form['工艺名称'] = form['车间名称']
|
|
|
+ form['设备编号'] = []
|
|
|
+ //通过车间名称查询机台
|
|
|
+ const MachineList_jitai = await gdzl_MachineList({address:form['车间名称']});
|
|
|
+ gdzl_MachineList_address.value = MachineList_jitai.data;
|
|
|
+ form['shdh'] = ''
|
|
|
+ form['工序损耗名称'] = ''
|
|
|
+ }
|
|
|
if (id2 === '工序损耗' && event.key==='Tab' || id2 === '工序损耗' && event.key=== 'Enter') {
|
|
|
if(form['车间名称']){
|
|
|
await getGxshList();
|
|
|
@@ -209,27 +222,31 @@ const add_gyzlent = async (event,id1,id2,id3) => {
|
|
|
}
|
|
|
|
|
|
const open = async (gdbh, gxlist) => {
|
|
|
+ visible.value = true
|
|
|
+
|
|
|
id.value = gdbh
|
|
|
const res = await PrintDetailList({workOrder: id.value})
|
|
|
const chejian = await getDepartName()
|
|
|
- cjList.value = [
|
|
|
- {
|
|
|
- label: '标准工艺',
|
|
|
- value: '标准工艺',
|
|
|
- children: []
|
|
|
- }
|
|
|
- ]
|
|
|
- initChejian(chejian.data['标准工艺'])
|
|
|
+ if (chejian && Array.isArray(chejian.data) && chejian.data.length === 0) {
|
|
|
+ } else {
|
|
|
+ cjList.value = [
|
|
|
+ {
|
|
|
+ label: '标准工艺',
|
|
|
+ value: '标准工艺',
|
|
|
+ children: []
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ initChejian(chejian.data['标准工艺'])
|
|
|
+ }
|
|
|
yjList.value = res.data
|
|
|
gxList.value = gxlist
|
|
|
- console.log("打开了弹窗")
|
|
|
- visible.value = true
|
|
|
}
|
|
|
|
|
|
//工序损耗列表
|
|
|
const gxshList = ref([])
|
|
|
const getGxshList = async ()=>{
|
|
|
const WastageList_data = await WastageList({search: form['车间名称']})
|
|
|
+ console.log(WastageList_data)
|
|
|
gxshList.value = [{
|
|
|
label: form['车间名称'],
|
|
|
value: form['车间名称'],
|
|
|
@@ -319,6 +336,7 @@ const sbbhclick = () => {
|
|
|
|
|
|
|
|
|
const _capacityList = async () => {
|
|
|
+ console.log(111)
|
|
|
if(form['设备编号'] === ''){
|
|
|
return false;
|
|
|
}else{
|