add
This commit is contained in:
parent
433acfacef
commit
d792a9665e
2
.vscode/settings.json
vendored
2
.vscode/settings.json
vendored
@ -1,7 +1,7 @@
|
||||
{
|
||||
"editor.formatOnSave": true,
|
||||
"[vue]": {
|
||||
"editor.defaultFormatter": "Vue.volar"
|
||||
"editor.defaultFormatter": "rvest.vs-code-prettier-eslint"
|
||||
},
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
||||
"[javascript]": {
|
||||
|
@ -239,8 +239,8 @@ import projectTable from '@/components/project/index.vue'
|
||||
import suppliertable from '@/components/supplier/index.vue'
|
||||
import subpackageTable from '@/components/subpackage_budget_detail/index.vue'
|
||||
import { useDictData } from '@/hooks/useDictOptions'
|
||||
import { paymentplanLists } from '@/api/paymentplan'
|
||||
import { apiSubcontractingContractDetailLists } from '@/api/subcontracting_contract_detail'
|
||||
import { paymentplanLists,paymentplanDelete } from '@/api/paymentplan'
|
||||
import { apiSubcontractingContractDetailLists,apiSubcontractingContractDetailDelete } from '@/api/subcontracting_contract_detail'
|
||||
import { apiSubcontractingContractAdd, apiSubcontractingContractEdit, apiSubcontractingContractDetail } from '@/api/subcontracting_contract'
|
||||
let props = defineProps({
|
||||
project: Object
|
||||
@ -279,15 +279,16 @@ const handleAdd = (row: any) => {
|
||||
paymentList.splice(index + 1, 0, {});
|
||||
};
|
||||
|
||||
const handleDelete = (row: any) => {
|
||||
if (paymentList.length <= 1) return
|
||||
const handleDelete = async(row: any) => {
|
||||
if(row.id) await paymentplanDelete({id:row.id})
|
||||
// 删除 row
|
||||
const index = paymentList.indexOf(row);
|
||||
paymentList.splice(index, 1);
|
||||
};
|
||||
|
||||
|
||||
const handleDelete1 = (row: any) => {
|
||||
const handleDelete1 = async(row: any) => {
|
||||
if(row.id) await apiSubcontractingContractDetailDelete({id:row.id})
|
||||
// 删除 row
|
||||
const index = subcontractList.indexOf(row);
|
||||
subcontractList.splice(index, 1);
|
||||
@ -299,26 +300,29 @@ const popupTitle = computed(() => {
|
||||
|
||||
//获取分包明细
|
||||
const procurementList = (id) => {
|
||||
apiSubcontractingContractDetailLists({ 'page_no': 1, 'page_size': 5000, 'contract_id': id }).then((res) => {
|
||||
const data = res.lists.map((item: any) => ({
|
||||
'id': item.id,
|
||||
'subpackage_budget_id': item.subpackage_budget_id,
|
||||
'work_type': item.work_type,
|
||||
'work_content': item.work_content,
|
||||
'project_features': item.project_features,
|
||||
'unit': item.unit,
|
||||
'num': item.num,
|
||||
'price': item.price,
|
||||
'tax_rate': dictData.tax_rate.find((items) => items.name == item.tax_rate)
|
||||
}))
|
||||
subcontractList.splice(0, subcontractList.length, ...data);
|
||||
apiSubcontractingContractDetailLists({'contract_id': id }).then((res) => {
|
||||
// const data = res.lists.map((item: any) => ({
|
||||
// 'id': item.id,
|
||||
// 'subpackage_budget_id': item.subpackage_budget_id,
|
||||
// 'work_type': item.work_type,
|
||||
// 'work_content': item.work_content,
|
||||
// 'project_features': item.project_features,
|
||||
// 'unit': item.unit,
|
||||
// 'num': item.num,
|
||||
// 'price': item.price,
|
||||
// 'tax_rate': dictData.tax_rate.find((items) => items.name == item.tax_rate)
|
||||
// }))
|
||||
// subcontractList.splice(0, subcontractList.length, ...data);
|
||||
Object.assign(subcontractList,res.lists)
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
//获取付款计划
|
||||
const paymentplanList = (id: any) => {
|
||||
paymentplanLists({ 'page_no': 1, 'page_size': 5000, 'contract_type': 1, 'contract_id': id }).then((res) => {
|
||||
paymentplanLists({ 'contract_id': id }).then((res) => {
|
||||
const data = res.lists.map((item: any) => ({
|
||||
id:item.id,
|
||||
'period': item.period,
|
||||
'pay_date': item.pay_date,
|
||||
'amount': item.amount,
|
||||
@ -402,10 +406,6 @@ const retention_money = computed(() => {
|
||||
|
||||
})
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// 表单验证
|
||||
const formRules = reactive<any>({
|
||||
|
||||
@ -429,6 +429,8 @@ const setFormData = async (data: Record<any, any>) => {
|
||||
supplier_name.value = data.supplier_name
|
||||
supplier_code.value = data.supplier_code
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
const getDetail = async (row: Record<string, any>) => {
|
||||
|
@ -24,8 +24,7 @@
|
||||
@click="handleDelete(selectData)">
|
||||
删除
|
||||
</el-button> -->
|
||||
<export-data class="ml-2.5 float-right" :fetch-fun="apiSubcontractingContractDetailLists"
|
||||
:params="queryParams" :page-size="pager.size" />
|
||||
|
||||
<div class="mt-4">
|
||||
<el-table :data="pager.lists" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" />
|
||||
|
Loading…
x
Reference in New Issue
Block a user