浏览代码

设置开联联数

曹鹤洋 1 年之前
父节点
当前提交
b36af3691d
共有 2 个文件被更改,包括 22 次插入16 次删除
  1. 8 0
      src/api/yunyin/yunying.js
  2. 14 16
      src/view/yunyin/chanpinziliao/chanpinziliao.vue

+ 8 - 0
src/api/yunyin/yunying.js

@@ -800,6 +800,14 @@ export const getCouplet = (params) => {
         method: 'get',
         params
     })
+}
+//获取开数联数
+export const ProductgetCouplet = (params) => {
+    return service({
+        url: '/mes_server/product/getCouplet',
+        method: 'get',
+        params
+    })
 }
 //班组人员及分配比例
 export const Team = (params) => {

+ 14 - 16
src/view/yunyin/chanpinziliao/chanpinziliao.vue

@@ -1567,7 +1567,8 @@ import {
   ProcessDel,
   addProduct,
   ProcessEdit,
-  getCouplet,
+  getCouplet,
+  ProductgetCouplet
 } from '@/api/yunyin/yunying'
 defineOptions({   name: 'Company'})
 import { useUserStore } from '@/pinia/modules/user'
@@ -3670,21 +3671,18 @@ const ent = (event,id1,id2,id3) => {
 
 //印件号回车带出开联开数
 const getKlKs = () =>{
-	console.log(add_gyformData)
-	console.log(_Gd_gdbh.value)
-	return
-	const response = getCouplet({ gdbh:id.value,yjno:add_gyformData.Gy0_yjno});
-	console.log(response)
-	
-	add_gyformData.Gy0_Ks = response.data['开数']
-	add_gyformData.Gy0_ls = response.data['联数']
-	// if(yjList.value !== undefined){
-	//   const node = yjList.value.find(item => item.no ===form['yjno'])
-	//   if (! node) {
-	//     yjdisplay.value = true
-	//   }
-	//   document.getElementById(id3).focus()
-	// }
+	ProductgetCouplet({ product:_Gd_gdbh.value,yjno:add_gyformData.Gy0_yjno}).then( response => {
+		if(response.code==0){
+			if(response.data){
+				add_gyformData.Gy0_Ks = response.data['开数']
+				add_gyformData.Gy0_ls = response.data['联数']
+			}else{
+				add_gyformData.Gy0_Ks = ''
+				add_gyformData.Gy0_ls = ''
+			}
+			
+		}
+	});
 }
 // const  _yjdh = ref(null);
 const yj_ent = (event,id1,id2,id3) => {