bug修改

This commit is contained in:
漂泊 2025-07-18 18:37:51 +08:00
parent 2ff57d9798
commit a48cd552f6
3 changed files with 3 additions and 84 deletions

View File

@ -169,7 +169,7 @@
</template> </template>
<script setup name="Trans_group"> <script setup name="Trans_group">
import { listTrans_group, getTrans_group, delTrans_group, addTrans_group, updateTrans_group } from '@/api/produce/manage_sheep/trans_group/trans_group' import { listTrans_group, getTrans_group, delTrans_group, addTrans_group, updateTrans_group } from '@/api/produce/manage_sheep/trans_group'
import { listSheepfold_management as listSheepfold } from '@/api/fileManagement/sheepfold_management' import { listSheepfold_management as listSheepfold } from '@/api/fileManagement/sheepfold_management'
import request from '@/utils/request' import request from '@/utils/request'

View File

@ -167,7 +167,7 @@
</template> </template>
<script setup name="Transition_info"> <script setup name="Transition_info">
import { listTransition_info, getTransition_info, delTransition_info, addTransition_info, updateTransition_info } from "@/api/produce/manage_sheep/transition_info/transition_info" import { listTransition_info, getTransition_info, delTransition_info, addTransition_info, updateTransition_info } from "@/api/produce/manage_sheep/transition_info"
import request from '@/utils/request' import request from '@/utils/request'
const { proxy } = getCurrentInstance() const { proxy } = getCurrentInstance()
@ -310,87 +310,6 @@ function handleDelete(row) {
proxy.$modal.msgSuccess("删除成功") proxy.$modal.msgSuccess("删除成功")
}) })
} }
function handleExport() {
proxy.download('/produce/manage_sheep/transition_info/export',
{ ...queryParams.value },
`transition_info_${new Date().getTime()}.xlsx`)
}
/* -------------------- 审批 -------------------- */
function handleApprove(row) {
approveForm.value = { ...row }
approveDialog.value = true
}
function getTransTypeLabel(val) {
const hit = trans_type.value.find(item => Number(item.value) === val)
return hit ? hit.label : val
}
function handleApproveAgree() {
approveForm.value.status = 1
updateTransition_info(approveForm.value).then(() => {
approveDialog.value = false
proxy.$modal.msgSuccess("审批成功,状态已更新为同意")
getList()
})
}
function handleApproveReject() {
approveForm.value.status = 2
updateTransition_info(approveForm.value).then(() => {
approveDialog.value = false
proxy.$modal.msgSuccess("审批成功,状态已更新为驳回")
getList()
})
}
/* -------------------- 下拉 -------------------- */
function getVarietyOptions() {
request({
url: '/base/variety/list',
method: 'get',
params: { pageNum: 1, pageSize: 9999 }
}).then(res => { varietyOptions.value = res.rows || [] })
}
/** 导出按钮操作 */
function handleExport() {
proxy.download('/produce/manage_sheep/transition_info/export', {
...queryParams.value
}, `transition_info_${new Date().getTime()}.xlsx`)
}
//
const approveDialog = ref(false);
const approveForm = ref({});
//
function handleApprove(row) {
//
approveForm.value = { ...row };
approveDialog.value = true;
}
//
function handleApproveAgree() {
approveForm.value.status = 1; //
updateTransition_info(approveForm.value).then(() => {
approveDialog.value = false;
proxy.$modal.msgSuccess("审批成功,状态已更新为同意");
getList();
}).catch((error) => {
proxy.$modal.msgError(`审批失败:${error}`);
});
}
//
function handleApproveReject() {
approveForm.value.status = 2; //
updateTransition_info(approveForm.value).then(() => {
approveDialog.value = false;
proxy.$modal.msgSuccess("审批成功,状态已更新为驳回");
getList();
}).catch((error) => {
proxy.$modal.msgError(`审批失败:${error}`);
});
}
getList() getList()

View File

@ -111,7 +111,7 @@
</template> </template>
<script setup name="FixHoof"> <script setup name="FixHoof">
import { listFixHoof, getFixHoof, delFixHoof, addFixHoof, updateFixHoof, checkSheepByManageTags, getVarietyOptions } from '@/api/produce/other/fixHoof/fixHoof' import { listFixHoof, getFixHoof, delFixHoof, addFixHoof, updateFixHoof, checkSheepByManageTags, getVarietyOptions } from '@/api/produce/other/fixHoof'
import { listSheepfold_management as listSheepfold } from '@/api/fileManagement/sheepfold_management' import { listSheepfold_management as listSheepfold } from '@/api/fileManagement/sheepfold_management'
// import request from '@/utils/request' // import request from '@/utils/request'