Merge remote-tracking branch 'origin/yagwly_fa_master' into yagwly_fa_master
| | |
| | | @click="handleEditBtn(row, index)" v-if="[0, 1].includes(row.relatedBillStatus) && row.isConfirmed != 2" |
| | | v-hasPermi="['cwgl:estimatedReceivable:cancel']"> 编辑 |
| | | </el-link> |
| | | <el-link class="link-btn" type="primary" v-if="row.isConfirmed == 1" :underline="false" plain :size="size" |
| | | @click="handleCancel(row)" v-hasPermi="['cwgl:estimatedReceivable:cancel']"> 取消确认 |
| | | <el-link class="link-btn" type="primary" |
| | | v-if="row.isConfirmed == 1 && row.relatedBillStatus != 2 && row.relatedBillStatus != 3" :underline="false" |
| | | plain :size="size" @click="handleCancel(row)" v-hasPermi="['cwgl:estimatedReceivable:cancel']"> 取消确认 |
| | | </el-link> |
| | | <el-link class="link-btn" type="primary" v-if="row.isConfirmed == 0 && ![2, 3].includes(row.relatedBillStatus)" |
| | | :underline="false" plain @click="handleAffirm(row)" v-hasPermi="['cwgl:estimatedReceivable:confirm']"> 确认 |
| | | </el-link> |
| | | <el-link class="link-btn" type="primary" v-if="row.isConfirmed == 1" :underline="false" plain |
| | | @click="handleInvalid(row)" v-hasPermi="['cwgl:estimatedReceivable:invalid']"> 作废 |
| | | <el-link class="link-btn" type="primary" |
| | | v-if="row.isConfirmed == 1 && row.relatedBillStatus != 2 && row.relatedBillStatus != 3" :underline="false" |
| | | plain @click="handleInvalid(row)" v-hasPermi="['cwgl:estimatedReceivable:invalid']"> 作废 |
| | | </el-link> |
| | | <el-link class="link-btn" type="primary" :underline="false" plain @click="handleFlow(row)" |
| | | v-hasPermi="['cwgl:estimatedReceivable:flog']"> 日志 |
| | |
| | | message: "费用系统编号不能为空", trigger: "blur" |
| | | } |
| | | ], |
| | | minWidth: 140, |
| | | search: true, |
| | | addDisplay: false, |
| | | editDisplay: false, |
| | | }, |
| | | dispatchNo: { |
| | | label: '调度单号', |
| | | minWidth: 120, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | |
| | | label: '项目名称', |
| | | search: true, |
| | | disabled: true, |
| | | minWidth: 150, |
| | | }, |
| | | orderDate: { |
| | | label: '下单日期', |
| | | search: true, |
| | | minWidth: 180, |
| | | type: 'datetime', // 改为 datetime 类型 |
| | | format: 'YYYY-MM-DD HH:mm:ss', |
| | | valueFormat: 'YYYY-MM-DD HH:mm:ss', |
| | | }, |
| | | feeName: { |
| | | label: '费用名称', |
| | | minWidth: 120, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | |
| | | }, |
| | | relatedBillName: { |
| | | label: '关联账单名称', |
| | | minWidth: 120, |
| | | addDisplay: false, // 新增时不显示 |
| | | editDisplay: false, // 修改时不显示 |
| | | }, |
| | | relatedBillStatus: { |
| | | label: '关联账单状态', |
| | | search: true, |
| | | minWidth: 120, |
| | | dataType: 'string', |
| | | type: 'select', |
| | | addDisplay: false, // 新增时不显示 |
| | |
| | | }, |
| | | remark: { |
| | | label: '备注', |
| | | minWidth: 120, |
| | | type: 'textarea', minRows: 3, maxRows: 5, |
| | | }, |
| | | |
| | |
| | | minWidth: 120, |
| | | |
| | | }, |
| | | relatedBillName: { |
| | | label: '关联联账单名称', |
| | | isCreate: { |
| | | label: '是否已入账', dataType: 'string', |
| | | type: 'select', |
| | | fixed: 'right', |
| | | minWidth: 120, |
| | | |
| | | search: true, |
| | | dicUrl: '/system/dict/data/type/sys_whether_type', |
| | | }, |
| | | billName: { |
| | | label: '关联账单名称', |
| | | fixed: 'right', |
| | | minWidth: 120, |
| | | search: true, |
| | | }, |
| | | isIncomeMatched: { |
| | | label: '是否匹配收入', |
| | | type: 'select', |
| | | dataType: 'string', |
| | | minWidth: 120, |
| | | |
| | | dicUrl: '/system/dict/data/type/sys_matching_status', |
| | | }, |
| | | isCostMatched: { |
| | |
| | | minWidth: 120, |
| | | dicUrl: '/system/dict/data/type/sys_matching_status', |
| | | }, |
| | | |
| | | isCreate: { |
| | | label: '是否已入账', dataType: 'string', |
| | | type: 'select', |
| | | fixed: 'right', |
| | | minWidth: 120, |
| | | dicUrl: '/system/dict/data/type/sys_whether_type', |
| | | }, |
| | | |
| | | |
| | | relatedBillStatus: { |
| | | minWidth: 120, |
| | | label: '关联账单状态', |
| | |
| | | crudRef.value.rowEdit(selectionList.value[0]); |
| | | }, |
| | | handleSelectionChangeFunc: (selection: any) => { |
| | | if (selection.every((item: any) => item.isCreate == '0')) { |
| | | generateDisabled.value = false; |
| | | } else { |
| | | generateDisabled.value = true; |
| | | if (selection.length > 0) { |
| | | proxy.$message.warning('请选择未入账的记录'); |
| | | if (selection.length > 0) { |
| | | // 检查是否所有记录都是未入账状态(isCreate == '0') |
| | | const allNotCreated = selection.every((item: any) => item.isCreate == '0'); |
| | | // 检查是否所有记录的客户名称都相同 |
| | | const sameCustomer = selection.every((item: any) => item.customerName === selection[0].customerName); |
| | | |
| | | if (allNotCreated && sameCustomer) { |
| | | generateDisabled.value = false; |
| | | } else { |
| | | generateDisabled.value = true; |
| | | if (!allNotCreated) { |
| | | proxy.$message.warning('请选择未入账的记录'); |
| | | } else if (!sameCustomer) { |
| | | proxy.$message.warning('请选择相同客户名称的记录'); |
| | | } |
| | | } |
| | | } else { |
| | | generateDisabled.value = false; |
| | | } |
| | | selectionList.value = selection; |
| | | selectionList.value = selection; |
| | | } |
| | | }) |
| | |
| | | dispatchNo.value = row.dispatchNo; |
| | | dialog.title = '费用明细'; |
| | | if (activeName.value == 'first') { |
| | | listEstimatedReceivable({ dispatchNo: row.dispatchNo, feeType: 1 }).then((res) => { |
| | | listEstimatedReceivable({ dispatchNo: row.dispatchNo, feeType: 1,isConfirmed:1 }).then((res) => { |
| | | if (res.code === 200) { |
| | | dialog.detail = true; |
| | | tableDataList.value = res.rows || []; |
| | |
| | | }) |
| | | } else if (activeName.value == 'second') { |
| | | // 这里可以添加查询收入相关的逻辑 |
| | | listEstimatedReceivable({ dispatchNo: row.dispatchNo, feeType: 0 }).then((res) => { |
| | | listEstimatedReceivable({ dispatchNo: row.dispatchNo, feeType: 0,isConfirmed:1 }).then((res) => { |
| | | if (res.code === 200) { |
| | | dialog.detail = true; |
| | | tableDataList.value = res.rows || []; |
| | |
| | | } |
| | | } |
| | | const getListVable = (dispatchNo, feeType) => { |
| | | listEstimatedReceivable({ dispatchNo: dispatchNo, feeType: feeType }).then((res) => { |
| | | listEstimatedReceivable({ dispatchNo: dispatchNo, feeType: feeType,isConfirmed:1 }).then((res) => { |
| | | if (res.code === 200) { |
| | | tableDataList.value = res.rows || []; |
| | | } |