|
|
@@ -577,10 +577,7 @@ const onrelevancy = () => {
|
|
|
const Setting = async (date,code) => {
|
|
|
|
|
|
const res = await setting({date:date,code:code})
|
|
|
- if (res.code === 0) {
|
|
|
- if(!res.data.length){
|
|
|
- return
|
|
|
- }
|
|
|
+ if (res.code === 0) {
|
|
|
relevancyselectData.value = res.data
|
|
|
formData.value.日期 = res.data[0].日期.replace(/\./g, "-")
|
|
|
formData.value.关联人员工号 = res.data[0].关联人员工号
|
|
|
@@ -599,9 +596,9 @@ const GetYg = async () => {
|
|
|
const response = await getYg({sczl_bh:formData.value.关联人员工号});
|
|
|
console.log(response)
|
|
|
if (response.code === 0) {
|
|
|
- console.log(response.data.ygxm)
|
|
|
- formData.value.关联人员姓名=response.data.ygxm
|
|
|
- formData.value.关联人员工号=response.data.员工编号
|
|
|
+ formData.value.关联人员姓名=response.data[0].ygxm
|
|
|
+ formData.value.关联人员工号=response.data[0].员工编号
|
|
|
+ Setting(formData.value.日期,formData.value.关联人员工号)
|
|
|
}
|
|
|
}
|
|
|
function onflushed() {
|
|
|
@@ -798,8 +795,12 @@ const batchup = () => {
|
|
|
BatchAdd()
|
|
|
}
|
|
|
//提交数组
|
|
|
-const BatchAdd= async () => {
|
|
|
- const response = await batchAdd(batchaddSelection.value);
|
|
|
+const BatchAdd= async () => {
|
|
|
+
|
|
|
+ const batch = batchaddSelection.value.map((item) => {
|
|
|
+ return { sys_id: sys_id, ...item};
|
|
|
+ });
|
|
|
+ const response = await batchAdd(batch);
|
|
|
if (response.code === 0) {
|
|
|
Setting(formData.value.日期,formData.value.关联人员工号)
|
|
|
batchaddshow.value=false
|