|
|
@ -31,7 +31,7 @@ |
|
|
@click="onImportAnimal(item, index)">导入动物</el-button> |
|
|
@click="onImportAnimal(item, index)">导入动物</el-button> |
|
|
<CustomTable :ref="`ybsmTableRef${index}`" :columns="ybsmColumns" |
|
|
<CustomTable :ref="`ybsmTableRef${index}`" :columns="ybsmColumns" |
|
|
:showOperation="fillType === 'actFill'" :showAddRow="fillType === 'actFill'" |
|
|
:showOperation="fillType === 'actFill'" :showAddRow="fillType === 'actFill'" |
|
|
:formData="item"> |
|
|
|
|
|
|
|
|
:formData="item" @clickButton="(e, rowIndex,colIndex,ee,data)=>handleClickButton(e, rowIndex,colIndex,ee,data,index)"> |
|
|
<template slot="operation" slot-scope="{ row, rowIndex, columns }"> |
|
|
<template slot="operation" slot-scope="{ row, rowIndex, columns }"> |
|
|
<TableOpertaionDelete :row="row" :rowIndex="rowIndex" :columns="columns" |
|
|
<TableOpertaionDelete :row="row" :rowIndex="rowIndex" :columns="columns" |
|
|
@deleteRow="() => deleteTableRow(rowIndex, `ybsmTableRef${index}`)"> |
|
|
@deleteRow="() => deleteTableRow(rowIndex, `ybsmTableRef${index}`)"> |
|
|
@ -64,6 +64,7 @@ import CustomTable from '@/components/Template/CustomTable.vue'; |
|
|
import { uniqeResource ,uniqeYqOne} from "@/utils/calUnitTools"; |
|
|
import { uniqeResource ,uniqeYqOne} from "@/utils/calUnitTools"; |
|
|
import { getuuid, justUpdateFilledFormData } from "@/utils/index"; |
|
|
import { getuuid, justUpdateFilledFormData } from "@/utils/index"; |
|
|
import { getBaseInfoFormConfig, getStorageFormConfig, getRemarkFormConfig, getYbsmFormConfig, getTableColumns } from "../../formConfig/sp/SP0021"; |
|
|
import { getBaseInfoFormConfig, getStorageFormConfig, getRemarkFormConfig, getYbsmFormConfig, getTableColumns } from "../../formConfig/sp/SP0021"; |
|
|
|
|
|
import { getBalance } from '@/utils/tpph.js'; |
|
|
const refConfig = { |
|
|
const refConfig = { |
|
|
baseInfoRef: "baseInfoRef", |
|
|
baseInfoRef: "baseInfoRef", |
|
|
remarkRef: "remarkRef", |
|
|
remarkRef: "remarkRef", |
|
|
@ -256,6 +257,21 @@ export default { |
|
|
console.log(content); |
|
|
console.log(content); |
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
|
|
|
//第五步表格按钮点击 |
|
|
|
|
|
async handleClickButton(e, rowIndex,colIndex,ee,data,index) { |
|
|
|
|
|
if(e==='calcCqzl'){ |
|
|
|
|
|
const content = this.getFilledFormData() |
|
|
|
|
|
let formData = this.formData; |
|
|
|
|
|
let qy = content.ybsmDataList[index].yqInfo_xztp || formData.ybsmDataList[index].yqInfo_xztp |
|
|
|
|
|
let dw = 'g' |
|
|
|
|
|
let x = await getBalance({yq:qy,dw:dw}) |
|
|
|
|
|
if(x && x.success){ |
|
|
|
|
|
this.$refs[`ybsmTableRef${index}`][0]?.updateDataSourceByRowIndex(rowIndex, { cqzl: x.value },{signData:data,updateFields:['cqzl']}); |
|
|
|
|
|
}else{ |
|
|
|
|
|
this.$message.error(x.message || '称量失败') |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
} |
|
|
} |
|
|
}; |
|
|
}; |
|
|
</script> |
|
|
</script> |
|
|
|