liuhairui 1 年之前
父节点
当前提交
c78d82f841

+ 1 - 0
src/view/yunyin/chanpinziliao/chanpinziliao.vue

@@ -3115,6 +3115,7 @@ const addcpgy_onclick =  async () => {
 		const getProductGyInfo_edit = await getProductGyInfo({UniqID:_gyrow.value.UniqID})
 		Object.assign(add_gyformData,getProductGyInfo_edit.data);
 	}
+	add_gyformData.Gy0_方案 = 'A';
 	//新增
 	typeGy.value = 'create'
 	addgydialogFormVisible.value=true

+ 25 - 5
src/view/yunyin/shengchanguanli/components/addGongYi.vue

@@ -312,15 +312,35 @@ const selectSHNode = (node,check) => {
 }
 
 
-const open = async (gdbh, gxlist) => {
-  Object.keys(form).forEach(key => {
-    form[key] = '';
-  });
+const open = async (gdbh, gxlist,_gdgyrow) => {
+	console.log(_gdgyrow.value)
+	if(_gdgyrow.value){
+		Object.assign(form,_gdgyrow.value);
+		form['yjno'] = _gdgyrow.value['印件号'];
+		form['工序'] = _gdgyrow.value['工序号'];
+		form['设备编号'] = []
+		//通过车间名称查询机台
+		const MachineList_jitai = await gdzl_MachineList({address:form['车间名称']});
+		gdzl_MachineList_address.value = MachineList_jitai.data;
+		const jitai = _gdgyrow.value['机台编号'].split(' ')
+		jitai.map(item => {
+		  MachineList_jitai.data.map(jt => {
+		    if (jt.indexOf(item) > -1 && item !== '') {
+		      form['设备编号'].push(item)
+		    }
+		  })
+		})
+	}else{
+		Object.keys(form).forEach(key => {
+		  form[key] = '';
+		});
+	}
+	
   visible.value = true
   id.value = gdbh
   const res = await PrintDetailList({workOrder: id.value})
   const apiData = await getDepartName()
-  console.log(apiData)
+  // console.log(apiData)
   function transformDataToTreeFormat(data) {
     return Object.entries(data).map(([key, value]) => {
       // key是车间名称,value是车间内的操作列表

+ 6 - 3
src/view/yunyin/shengchanguanli/gongdanziliao.vue

@@ -2472,7 +2472,7 @@ const addgdgy_onclick = () => {
     let gongxu = gytableData.value.map(item => {
       return item['印件-工序']
     })
-    addGongYiRef.value.open(_Gd_gdbh.value, gongxu)
+    addGongYiRef.value.open(_Gd_gdbh.value, gongxu,_gdgyrow)
   }
 }
 
@@ -3777,9 +3777,12 @@ const _capacityList = async () => {
     gdgyformData['小时产能'] = editProductedit_machine.data;
   }
 
-};
+};
+const _gdgyrow = ref('')
 //截取印件前两位
-const clickybupdate2 = (row,column,event) => {
+const clickybupdate2 = (row,column,event) => {
+	// console.log(row)
+	_gdgyrow.value = row
   currentGy0_yjno.value = row['印件-工序'].substr(0, 2)
 }