完成资产管理以及订单管理前端页面 ,对接售后工单处理功能
This commit is contained in:
parent
6a7e151789
commit
6731063518
@ -2,25 +2,21 @@ import request from '@/utils/request'
|
||||
|
||||
// 客户售后列表
|
||||
export function apiCustomServiceLists(params: any) {
|
||||
return request.get({ url: '/custom_service.custom_service/lists', params })
|
||||
return request.get({ url: '/custom.custom_service/lists', params })
|
||||
}
|
||||
|
||||
// 添加客户售后
|
||||
export function apiCustomServiceAdd(params: any) {
|
||||
return request.post({ url: '/custom_service.custom_service/add', params })
|
||||
return request.post({ url: '/custom.custom_service/add', params })
|
||||
}
|
||||
|
||||
// 编辑客户售后
|
||||
export function apiCustomServiceEdit(params: any) {
|
||||
return request.post({ url: '/custom_service.custom_service/edit', params })
|
||||
// 处理客户售后
|
||||
export function apiCustomServiceSolve(params: any) {
|
||||
return request.post({ url: '/custom.custom_service/solve', params })
|
||||
}
|
||||
|
||||
// 删除客户售后
|
||||
export function apiCustomServiceDelete(params: any) {
|
||||
return request.post({ url: '/custom_service.custom_service/delete', params })
|
||||
}
|
||||
|
||||
// 客户售后详情
|
||||
export function apiCustomServiceDetail(params: any) {
|
||||
return request.get({ url: '/custom_service.custom_service/detail', params })
|
||||
return request.get({ url: '/custom.custom_service/detail', params })
|
||||
}
|
@ -14,18 +14,26 @@
|
||||
<el-card class="!border-none" v-loading="pager.loading" shadow="never">
|
||||
<div class="mt-4">
|
||||
<el-table :data="pager.lists" @cell-click="handleCurrentChange">
|
||||
<el-table-column label="客户名称" property="name" />
|
||||
<el-table-column type="selection" width="55" />
|
||||
|
||||
<el-table-column label="序号" type="index" width="55" />
|
||||
<el-table-column label="客户名称" prop="name" show-overflow-tooltip />
|
||||
<el-table-column label="客户属性" prop="custom_type">
|
||||
<template #default="{ row }">
|
||||
<dict-value :options="dictData.custom_type" :value="row.custom_type" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="信用度" property="credit_rating" />
|
||||
<el-table-column label="省" property="province_name" />
|
||||
<el-table-column label="市" property="city_name" />
|
||||
<el-table-column label="区" property="area_name" />
|
||||
<el-table-column label="主联系人" property="master_name" />
|
||||
<el-table-column label="联系方式" property="master_phone" />
|
||||
<el-table-column label="职务" prop="master_position" show-overflow-tooltip />
|
||||
<el-table-column label="电话" prop="master_phone" show-overflow-tooltip />
|
||||
<el-table-column label="手机" prop="master_telephone" show-overflow-tooltip />
|
||||
<el-table-column label="备注" prop="master_notes" show-overflow-tooltip />
|
||||
<el-table-column label="负责人" prop="master_name" show-overflow-tooltip />
|
||||
<el-table-column label="创建时间" prop="create_time" show-overflow-tooltip />
|
||||
<el-table-column label="最后跟进" prop="last_follow_date" show-overflow-tooltip />
|
||||
<el-table-column label="下次回访日期" prop="next_follow_date" show-overflow-tooltip />
|
||||
</el-table>
|
||||
|
||||
</div>
|
||||
|
283
src/views/AssetManagement/Asset Account/detail.vue
Normal file
283
src/views/AssetManagement/Asset Account/detail.vue
Normal file
@ -0,0 +1,283 @@
|
||||
|
||||
<template>
|
||||
<div class="detail-popup">
|
||||
<popup ref="popupRef" title="开票申请详情" :async="true" width="80%" @confirm="handleSubmit" @close="handleClose">
|
||||
<el-form ref="formRef" :model="formData" label-width="160px">
|
||||
<el-card class="mb-2">
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="项目名称">
|
||||
{{ formData.project_name }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="客户名称">
|
||||
{{ formData.custom.name }}
|
||||
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="项目编码">
|
||||
{{ formData.project_code
|
||||
}}
|
||||
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="合同编号">
|
||||
{{ formData.contract.contract_name }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="合同名称">
|
||||
{{ formData.contract ? formData.contract.contract_code : '暂无数据' }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="合同金额">
|
||||
{{ formData.contract.amount
|
||||
}}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="期次">
|
||||
<dict-value :options="dictData.pay_period" :value="formData.period" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="累计开票金额">
|
||||
{{ formData.accumulate_amount }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="累计回款金额">
|
||||
{{ formData.accumulated_payments_received }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="税率">
|
||||
{{ formData.tax_rate }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="发票类型">
|
||||
|
||||
<dict-value :options="dictData.invoice_type" :value="formData.invoice_type" />
|
||||
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="开票金额(含税)">
|
||||
{{ formData.invoicing_amount }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="金额大写">
|
||||
{{ formData.invoicing_amount_daxie }}
|
||||
</el-form-item>
|
||||
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="开票金额(税额)">
|
||||
{{ formData.invoicing_amount }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="开票金额(非税)">
|
||||
{{ formData.amount_including_tax }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="开票内容">
|
||||
{{ formData.content }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="发票编号">
|
||||
{{ formData.invoice_no }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="开票公司名称">
|
||||
{{ formData.invoicing_company_name }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="纳税人识别号">
|
||||
{{ formData.taxpayer_identification_number }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="开户银行">
|
||||
{{ formData.deposit_bank }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="账号">
|
||||
{{ formData.bank_accnout }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="开户地址及电话">
|
||||
{{ formData.address_phone }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="收票地址">
|
||||
{{ formData.receiving_address }}
|
||||
</el-form-item>
|
||||
</el-col> <el-col :span="8">
|
||||
<el-form-item label="联系人">
|
||||
{{ formData.contacts }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="联系电话">
|
||||
{{ formData.phone }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="邮寄时间">
|
||||
{{ formData.mailing_time }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="邮寄方式">
|
||||
{{ formData.mailing_type }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="邮寄单号">
|
||||
{{ formData.mailing_no }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="备注">
|
||||
{{ formData.remark }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="附件">
|
||||
<div v-for="(item, index) in formDataannex" style="margin-left: 5px;display: block;">
|
||||
<a style="margin-left: 10px; color: #4a5dff; align-self: flex-start" :href="item.uri" target="_blank">{{ item.name }}</a>
|
||||
<span style="cursor: pointer;margin-left: 5px;" @click="delFileFn(index)">x</span>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
|
||||
</el-row>
|
||||
</el-card>
|
||||
</el-form>
|
||||
</popup>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup name="customdetail">
|
||||
|
||||
import type { FormInstance } from 'element-plus'
|
||||
import Popup from '@/components/popup/index.vue'
|
||||
import { apiCustomDetail } from '@/api/custom'
|
||||
import { timeFormat } from '@/utils/util'
|
||||
import type { PropType } from 'vue'
|
||||
defineProps({
|
||||
dictData: {
|
||||
type: Object as PropType<Record<string, any[]>>,
|
||||
default: () => ({})
|
||||
}
|
||||
})
|
||||
const emit = defineEmits(['success', 'close'])
|
||||
const formRef = shallowRef<FormInstance>()
|
||||
const popupRef = shallowRef<InstanceType<typeof Popup>>()
|
||||
const formDataannex = reactive([])
|
||||
const datas = reactive({
|
||||
provinceOptions: [],
|
||||
cityOptions: [],
|
||||
areaOptions: [],
|
||||
});
|
||||
|
||||
|
||||
// 表单数据
|
||||
const formData = reactive({
|
||||
|
||||
})
|
||||
|
||||
|
||||
|
||||
|
||||
// 获取详情
|
||||
const setFormData = async (data: Record<any, any>) => {
|
||||
if (data.annex && data.annex.length > 0) {
|
||||
|
||||
const arry1 = data.annex.map((item: any, index: any) => {
|
||||
return {
|
||||
name: `文件${index + 1}`,
|
||||
uri: item
|
||||
};
|
||||
});
|
||||
Object.assign(formDataannex, arry1)
|
||||
|
||||
}
|
||||
|
||||
// for (const key in formData) {
|
||||
// if (data[key] != null && data[key] != undefined) {
|
||||
// //@ts-ignore
|
||||
// formData[key] = data[key]
|
||||
|
||||
// }
|
||||
|
||||
// }
|
||||
|
||||
Object.assign(formData, data)
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
const getDetail = async (row: Record<string, any>) => {
|
||||
const data = await apiCustomDetail({
|
||||
id: formData.id
|
||||
})
|
||||
setFormData(data)
|
||||
}
|
||||
|
||||
|
||||
// 提交按钮
|
||||
const handleSubmit = async () => {
|
||||
popupRef.value?.close()
|
||||
|
||||
}
|
||||
|
||||
//打开弹窗
|
||||
const open = () => {
|
||||
console.log('1111111')
|
||||
popupRef.value?.open()
|
||||
}
|
||||
|
||||
// 关闭回调
|
||||
const handleClose = () => {
|
||||
emit('close')
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
defineExpose({
|
||||
open,
|
||||
setFormData,
|
||||
getDetail
|
||||
})
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.tit {
|
||||
font-size: 1.2em;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
</style>
|
476
src/views/AssetManagement/Asset Account/edit.vue
Normal file
476
src/views/AssetManagement/Asset Account/edit.vue
Normal file
@ -0,0 +1,476 @@
|
||||
<template>
|
||||
<div class="edit-popup">
|
||||
|
||||
<popup ref="popupRef" :title="popupTitle" :async="true" width="80%" @confirm="handleSubmit" @close="handleClose">
|
||||
|
||||
<div style="display: flex; flex-direction: row-reverse; justify-content: flex-start;margin-bottom: 30px;">
|
||||
|
||||
<el-select class="w-[180px]" v-model="formData.dept_id" clearable placeholder="请选择部门">
|
||||
<el-option v-for="(item, index) in list2" :key="index" :label="item.name" :value="item.id" />
|
||||
</el-select>
|
||||
<el-select class="w-[180px]" v-model="formData.org_id" clearable placeholder="请选择组织" @change="deptrmt">
|
||||
<el-option v-for="(item, index) in list1" :key="index" :label="item.name" :value="item.id" />
|
||||
</el-select>
|
||||
</div>
|
||||
|
||||
<el-form ref="formRef" :model="formData" label-width="auto" :rules="formRules">
|
||||
<el-row :gutter="10">
|
||||
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="资产序列号" prop="contract_id">
|
||||
<el-input v-model="project_name" clearable placeholder="请输入资产序列号" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="资产名称" prop="contract_id">
|
||||
<el-input v-model="project_name" clearable placeholder="请输入资产名称" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="资产编号" prop="contract_id">
|
||||
<el-input v-model="project_name" clearable placeholder="请输入资产编号" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="资产类别" prop="contract_id">
|
||||
<el-input v-model="project_name" clearable placeholder="请输入资产类别" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="计量单位" prop="contract_id">
|
||||
<el-input v-model="project_name" clearable placeholder="请输入计量单位" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="资产价格(元)" prop="contract_id">
|
||||
<el-input v-model="project_name" clearable placeholder="请输入资产价格(元)" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="生产厂家" prop="contract_id">
|
||||
<el-input v-model="project_name" clearable placeholder="请输入生产厂家" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="入账日期" prop="invoicing_date" :rules="[{ required: true, message: '不可为空', trigger: 'change' }]">
|
||||
|
||||
<el-date-picker class="flex-1 !flex" v-model="formData.invoicing_date" clearable type="date" value-format="YYYY-MM-DD" placeholder="选择入账日期">
|
||||
</el-date-picker>
|
||||
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="购入日期" prop="invoicing_date" :rules="[{ required: true, message: '不可为空', trigger: 'change' }]">
|
||||
|
||||
<el-date-picker class="flex-1 !flex" v-model="formData.invoicing_date" clearable type="date" value-format="YYYY-MM-DD" placeholder="选择购入日期">
|
||||
</el-date-picker>
|
||||
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="出厂日期" prop="invoicing_date" :rules="[{ required: true, message: '不可为空', trigger: 'change' }]">
|
||||
|
||||
<el-date-picker class="flex-1 !flex" v-model="formData.invoicing_date" clearable type="date" value-format="YYYY-MM-DD" placeholder="选择出厂日期">
|
||||
</el-date-picker>
|
||||
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="资产来源" prop="contract_id">
|
||||
<el-input v-model="project_name" clearable placeholder="请输入资产序列号" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="预计使用寿命(年)" prop="contract_id">
|
||||
<el-input v-model="project_name" clearable placeholder="请输入预计使用寿命(年)" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="单日成本价(元)" prop="contract_id">
|
||||
<el-input v-model="project_name" clearable placeholder="请输入单日成本价(元)" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="存放地址" prop="contract_id">
|
||||
<el-input v-model="project_name" clearable placeholder="请输入存放地址" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="期初资产金额(元)" prop="contract_id">
|
||||
<el-input v-model="project_name" clearable placeholder="请输入期初资产金额(元)" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="期初折旧(元)" prop="contract_id">
|
||||
<el-input v-model="project_name" clearable placeholder="请输入期初折旧(元)" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="资产状态" prop="contract_id">
|
||||
<el-input v-model="project_name" clearable placeholder="请输入资产序列号" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="formData.remark" type="textarea" clearable placeholder="请输入备注" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<!-- <el-form-item label="附件" prop="annex">
|
||||
<el-input v-model="formData.annex" clearable placeholder="请输入附件" />
|
||||
</el-form-item> -->
|
||||
<el-form-item label="附件" prop="field127">
|
||||
<el-upload accept="doc, docx, xls, xlsx, ppt, pptx, pdf, txt, zip, rar, tar, jpg, png, gif, jpeg, webp, wmv, avi, mpg, mpeg, 3gp, mov, mp4, flv, f4v, rmvb, mkv" class="upload-demo" :show-file-list="false" aria-hidden="true" :headers="{ Token: userStore.token }" :action="base_url + '/upload/file'" :on-success="handleAvatarSuccess_four" ref="upload">
|
||||
<el-button type="primary">
|
||||
上传
|
||||
</el-button>
|
||||
</el-upload>
|
||||
|
||||
<div>
|
||||
<div v-for="(item, index) in formDataannex" style="margin-left: 5px;display: block;">
|
||||
<a style="margin-left: 10px; color: #4a5dff; align-self: flex-start" :href="item.uri" target="_blank">{{ item.name }}</a>
|
||||
<span style="cursor: pointer;margin-left: 5px;" @click="delFileFn(index)">x</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div style="margin: 20px 0;">资产申请明细</div>
|
||||
|
||||
<el-row>
|
||||
|
||||
<el-table :data="tablist1">
|
||||
<el-table-column label="序号">
|
||||
<template #default="{ row }">
|
||||
<el-button @click="handleAdd(row)">+</el-button>
|
||||
<el-button @click="handleDelete(row)">-</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label=" 规格型号" prop="name1">
|
||||
<template #default="{ row, $index }">
|
||||
<el-input v-model="row.name1" readonly @click="subjectmu(row, $index)" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="品牌" prop="remark">
|
||||
<template #default="{ row }">
|
||||
<el-input v-model="row.remark" /> </template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="单位" prop="remark">
|
||||
<template #default="{ row }">
|
||||
<el-input v-model="row.remark" /> </template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="申请数量" prop="remark">
|
||||
<template #default="{ row }">
|
||||
<el-input v-model="row.remark" /> </template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="备注" prop="remark">
|
||||
<template #default="{ row }">
|
||||
<el-input v-model="row.remark" /> </template>
|
||||
</el-table-column>
|
||||
|
||||
</el-table>
|
||||
|
||||
|
||||
</el-row>
|
||||
|
||||
<el-dialog v-model="showDialog1" title="选择项目" width="70%">
|
||||
<projectDialog @customEvent="customEvent1" contract_type="2"></projectDialog>
|
||||
</el-dialog>
|
||||
</el-form>
|
||||
</popup>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup name="projectEdit">
|
||||
import type { FormInstance } from 'element-plus'
|
||||
import Popup from '@/components/popup/index.vue'
|
||||
import { toChinesNum } from "@/utils/util";
|
||||
import projectDialog from '@/components/project/index.vue'
|
||||
import { apiinvoiceapplyAdd, apiinvoiceapplyEdit, apiinvoiceapplyDetail } from '@/api/InvoicingRequests'
|
||||
import { getAllProjectTypes } from '@/api/projecttype'
|
||||
import { timeFormat } from '@/utils/util'
|
||||
import { isEmail, isIdCard, isPhone } from '@/utils/validate'
|
||||
import type { PropType } from 'vue'
|
||||
import configs from "@/config"
|
||||
import useUserStore from "@/stores/modules/user";
|
||||
const base_url = configs.baseUrl + configs.urlPrefix
|
||||
const userStore = useUserStore();
|
||||
const active = ref(0)
|
||||
const formDataannex = reactive([])
|
||||
const contract_name = ref('')
|
||||
const project_name = ref('')
|
||||
const project_code = ref('')
|
||||
const project_amount = ref('')
|
||||
const contract_no = ref('')
|
||||
const custom_name = ref('')
|
||||
const tablist1 = reactive([{}])
|
||||
const list1 = reactive([])
|
||||
const list2 = reactive([])
|
||||
import { deptAll } from '@/api/org/department'
|
||||
import { getAll } from '@/api/org/organization'
|
||||
const next = () => {
|
||||
if (active.value++ > 3) active.value = 0
|
||||
}
|
||||
// 上传文件
|
||||
const handleAvatarSuccess_four = (
|
||||
response,
|
||||
uploadFile
|
||||
) => {
|
||||
if (response.code == 0) {
|
||||
ElMessage.error(response.msg);
|
||||
return;
|
||||
}
|
||||
formDataannex.push(
|
||||
{ uri: response.data.uri, name: response.data.name }
|
||||
|
||||
|
||||
);
|
||||
};
|
||||
|
||||
const handleAdd = (row: any) => {
|
||||
// 在 row 后面插入一行数据
|
||||
const index = tablist1.indexOf(row);
|
||||
tablist1.splice(index + 1, 0, {});
|
||||
};
|
||||
|
||||
const handleDelete = (row: any) => {
|
||||
// 删除 row
|
||||
const index = tablist1.indexOf(row);
|
||||
tablist1.splice(index, 1);
|
||||
};
|
||||
//获取所有组织
|
||||
const getlist = () => {
|
||||
getAll().then((res) => {
|
||||
Object.assign(list1, res)
|
||||
if (res.length > 0 && !formData.org_id) {
|
||||
formData.org_id = res[0].id
|
||||
deptAll({ 'org_id': res[0].id }).then((res) => {
|
||||
if (res.length > 0) {
|
||||
Object.assign(list2, res)
|
||||
formData.dept_id = res[0].id
|
||||
}
|
||||
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
//获取部门
|
||||
const deptrmt = (e: any) => {
|
||||
formData.dept_id = ''
|
||||
getlist1(e)
|
||||
|
||||
}
|
||||
//获取所有部门
|
||||
const getlist1 = (id: any) => {
|
||||
deptAll({ 'org_id': id }).then((res) => {
|
||||
list2.splice(0, list2.length, ...res)
|
||||
})
|
||||
}
|
||||
//验证
|
||||
const checkPhone = (rule: any, value: any, callback: (arg0: Error) => any) => {
|
||||
|
||||
if (value && !/^1\d{10}$/.test(value)) {
|
||||
callback(new Error('请输入正确的手机号码'));
|
||||
} else {
|
||||
callback()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
const userEmail = (rule: any, value: string, callback: (arg0: Error | undefined) => void) => {
|
||||
|
||||
// const mailReg = /^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+(.[a-zA-Z0-9_-])+/
|
||||
// // if (!value) {
|
||||
// // return callback(new Error('邮箱不能为空'))
|
||||
// // }
|
||||
|
||||
|
||||
if (value && !mailReg.test(value)) {
|
||||
callback(new Error('请输入正确的邮箱格式'))
|
||||
} else {
|
||||
callback()
|
||||
}
|
||||
|
||||
};
|
||||
//监听输入
|
||||
const amountinput = (e) => {
|
||||
// console.log(e)
|
||||
if (e && e > 0) {
|
||||
formData.invoicing_amount_daxie = toChinesNum(e)
|
||||
}
|
||||
}
|
||||
// 删除上传的文件
|
||||
const delFileFn = (index: number) => {
|
||||
formDataannex.splice(index, 1)
|
||||
}
|
||||
defineProps({
|
||||
dictData: {
|
||||
type: Object as PropType<Record<string, any[]>>,
|
||||
default: () => ({})
|
||||
}
|
||||
})
|
||||
const emit = defineEmits(['success', 'close'])
|
||||
const formRef = shallowRef<FormInstance>()
|
||||
const popupRef = shallowRef<InstanceType<typeof Popup>>()
|
||||
const mode = ref('add')
|
||||
const showDialog = ref(false)
|
||||
const showDialog1 = ref(false)
|
||||
|
||||
const customEvent = (e: any) => {
|
||||
formData.customer_id = e.id;
|
||||
custom_name.value = e.name;
|
||||
showDialog.value = false;
|
||||
};
|
||||
const customEvent1 = (e: any) => {
|
||||
formData.contract_id = e.id;
|
||||
project_name.value = e.project_name;
|
||||
project_code.value = e.project_code;
|
||||
contract_name.value = e.contract_name;
|
||||
contract_no.value = e.contract_code
|
||||
project_amount.value = e.amount
|
||||
|
||||
showDialog1.value = false;
|
||||
};
|
||||
// 弹窗标题
|
||||
const popupTitle = computed(() => {
|
||||
return mode.value == 'edit' ? '编辑资产采购表' : '新增资产采购表'
|
||||
})
|
||||
|
||||
// 表单数据
|
||||
const formData = reactive({
|
||||
id: '',
|
||||
customer_id: '',
|
||||
contract_id: '',
|
||||
approve_id: '',
|
||||
invoicing_date: "",
|
||||
period: "",
|
||||
accumulate_amount: '',
|
||||
accumulated_payments_received: '',
|
||||
tax_rate: "",
|
||||
invoice_type: '',
|
||||
invoicing_amount: '',
|
||||
invoicing_amount_daxie: "",
|
||||
tax: '',
|
||||
amount_including_tax: '',
|
||||
content: "",
|
||||
invoice_no: "",
|
||||
remark: "",
|
||||
annex: "",
|
||||
invoicing_company_name: "",
|
||||
taxpayer_identification_number: "",
|
||||
deposit_bank: "",
|
||||
bank_accnout: "",
|
||||
address_phone: "",
|
||||
receiving_address: "",
|
||||
contacts: "",
|
||||
phone: "",
|
||||
mailing_time: "",
|
||||
mailing_type: "",
|
||||
mailing_no: ""
|
||||
})
|
||||
|
||||
|
||||
// 表单验证
|
||||
const formRules = reactive<any>({
|
||||
|
||||
})
|
||||
|
||||
|
||||
// 获取详情
|
||||
const setFormData = async (data: Record<any, any>) => {
|
||||
if (data.annex && data.annex.length > 0) {
|
||||
|
||||
const arry1 = data.annex.map((item: any, index: any) => {
|
||||
return {
|
||||
name: `文件${index + 1}`,
|
||||
uri: item
|
||||
};
|
||||
});
|
||||
Object.assign(formDataannex, arry1)
|
||||
|
||||
}
|
||||
|
||||
if (data.dept_id) {
|
||||
getlist1(data.org_id)
|
||||
}
|
||||
for (const key in formData) {
|
||||
if (data[key] != null && data[key] != undefined) {
|
||||
//@ts-ignore
|
||||
formData[key] = data[key]
|
||||
}
|
||||
}
|
||||
if (formData.invoicing_amount) {
|
||||
toChinesNum(formData.invoicing_amount)
|
||||
}
|
||||
custom_name.value = data.custom.name
|
||||
project_name.value = data.contract_name;
|
||||
project_code.value = data.contract_code
|
||||
project_amount.value = data.contract.amount
|
||||
contract_name.value = data.contract.contract_name;
|
||||
contract_no.value = data.contract.contract_code
|
||||
|
||||
|
||||
}
|
||||
const getDetail = async (row: Record<string, any>) => {
|
||||
const data = await apiinvoiceapplyDetail({
|
||||
id: row.id
|
||||
})
|
||||
setFormData(data)
|
||||
}
|
||||
|
||||
|
||||
// 提交按钮
|
||||
const handleSubmit = async () => {
|
||||
if (formDataannex.length > 0) {
|
||||
formData.annex = JSON.stringify(formDataannex.map((item: any) => item.uri))
|
||||
}
|
||||
|
||||
console.log(formRef.value?.validate(), '22222222')
|
||||
await formRef.value?.validate()
|
||||
|
||||
|
||||
const data = { ...formData }
|
||||
mode.value == 'edit'
|
||||
? await apiinvoiceapplyEdit(data)
|
||||
: await apiinvoiceapplyAdd(data)
|
||||
popupRef.value?.close()
|
||||
emit('success')
|
||||
}
|
||||
|
||||
//打开弹窗
|
||||
const open = (type = 'add') => {
|
||||
mode.value = type
|
||||
popupRef.value?.open()
|
||||
getlist()
|
||||
|
||||
}
|
||||
|
||||
// 关闭回调
|
||||
const handleClose = () => {
|
||||
emit('close')
|
||||
}
|
||||
|
||||
|
||||
|
||||
defineExpose({
|
||||
open,
|
||||
setFormData,
|
||||
getDetail
|
||||
})
|
||||
</script>
|
188
src/views/AssetManagement/Asset Account/index.vue
Normal file
188
src/views/AssetManagement/Asset Account/index.vue
Normal file
@ -0,0 +1,188 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-card class="!border-none mb-4" shadow="never">
|
||||
<el-form class="mb-[-16px]" :model="queryParams" inline>
|
||||
<el-form-item label="开票公司名称" prop="invoicing_company_name">
|
||||
<el-input class="w-[280px]" v-model="queryParams.invoicing_company_name" clearable placeholder="请输入开票公司名称" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="客户" prop="customer_id">
|
||||
<el-select class="w-[280px]" v-model="queryParams.customer_id" clearable placeholder="请选择客户">
|
||||
<el-option label="全部" value=""></el-option>
|
||||
<el-option v-for="(item, i) in list1" :key="i" :label="item.name" :value="item.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="合同" prop="contract_id">
|
||||
<el-select class="w-[280px]" v-model="queryParams.contract_id" clearable placeholder="请选择合同">
|
||||
<el-option label="全部" value=""></el-option>
|
||||
<el-option v-for="(item, index) in list" :key="index" :label="item.contract_name" :value="item.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="resetPage">查询</el-button>
|
||||
<el-button @click="resetParams">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-card>
|
||||
<el-card class="!border-none" v-loading="pager.loading" shadow="never">
|
||||
<el-button v-perms="['InvoicingRequests.InvoicingRequests/add']" type="primary" @click="handleAdd">
|
||||
<template #icon>
|
||||
<icon name="el-icon-Plus" />
|
||||
</template>
|
||||
新增
|
||||
</el-button>
|
||||
<el-button v-perms="['InvoicingRequests.InvoicingRequests/delete']" :disabled="!selectData.length" @click="handleDelete(selectData)">
|
||||
删除
|
||||
</el-button>
|
||||
|
||||
<div class="mt-4">
|
||||
<el-table :data="pager.lists" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column label="序号" type="index" width="55" />
|
||||
<el-table-column label="资产序列号" prop="customer_name" show-overflow-tooltip />
|
||||
<el-table-column label="资产编号" prop="customer_name" show-overflow-tooltip />
|
||||
<el-table-column label="资产名称" prop="project_code" show-overflow-tooltip />
|
||||
<el-table-column label="规格型号" prop="tax" show-overflow-tooltip />
|
||||
<el-table-column label="资产类别" prop="tax" show-overflow-tooltip />
|
||||
<el-table-column label="计量单位 " prop="tax" show-overflow-tooltip />
|
||||
<el-table-column label="生产厂家" prop="tax" show-overflow-tooltip />
|
||||
<el-table-column label="入账日期" prop="tax" show-overflow-tooltip />
|
||||
<el-table-column label="购入日期 " prop="tax" show-overflow-tooltip />
|
||||
<el-table-column label="出厂日期" prop="tax" show-overflow-tooltip />
|
||||
<el-table-column label="资产来源" prop="tax" show-overflow-tooltip />
|
||||
<el-table-column label="存放地址 " prop="tax" show-overflow-tooltip />
|
||||
<el-table-column label="资产状态" prop="project_name" show-overflow-tooltip />
|
||||
<el-table-column label="单日成本价" prop="invoicing_date" show-overflow-tooltip />
|
||||
<el-table-column label="资产金额" prop="tax" show-overflow-tooltip />
|
||||
<el-table-column label="期初折旧" prop="tax" show-overflow-tooltip />
|
||||
<el-table-column label="累计折旧 " prop="tax" show-overflow-tooltip />
|
||||
<el-table-column label="处置金额" prop="tax" show-overflow-tooltip />
|
||||
<el-table-column label="净值金额" prop="tax" show-overflow-tooltip />
|
||||
<el-table-column label="操作" width="160" fixed="right">
|
||||
<template #default="{ row }">
|
||||
<el-button v-perms="['InvoicingRequests.InvoicingRequests/edit']" type="primary" link @click="handleEdit(row)">
|
||||
编辑
|
||||
</el-button>
|
||||
<el-button v-perms="['InvoicingRequests.InvoicingRequests/delete']" type="danger" link @click="handleDelete(row.id)">
|
||||
删除
|
||||
</el-button>
|
||||
<el-button v-perms="['InvoicingRequests.InvoicingRequests/detail']" link @click="handledetail(row)">
|
||||
详情
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<div class="flex justify-end mt-4">
|
||||
<pagination v-model="pager" @change="getLists" />
|
||||
</div>
|
||||
</el-card>
|
||||
<edit-popup v-if="showEdit" ref="editRef" :dict-data="dictData" @success="getLists" @close="showEdit = false" />
|
||||
<detail-popup v-if="showDtail" ref="detailRef" :dict-data="dictData" @close="showDtail = false" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup name="projectLists">
|
||||
import { usePaging } from '@/hooks/usePaging'
|
||||
import { useDictData } from '@/hooks/useDictOptions'
|
||||
import { apiinvoiceapplyLists, apiinvoiceapplyDelete, apiinvoiceapplyDetail } from '@/api/InvoicingRequests'
|
||||
import { timeFormat } from '@/utils/util'
|
||||
import { apiContractLists } from '@/api/contract'
|
||||
import { apiCustomLists } from '@/api/custom'
|
||||
import { getAllProjectTypes } from '@/api/projecttype'
|
||||
const protype = reactive([])
|
||||
import feedback from '@/utils/feedback'
|
||||
import EditPopup from './edit.vue'
|
||||
import DetailPopup from './detail.vue'
|
||||
const detailRef = shallowRef<InstanceType<typeof DetailPopup>>()
|
||||
const editRef = shallowRef<InstanceType<typeof EditPopup>>()
|
||||
// 是否显示编辑框
|
||||
const showEdit = ref(false)
|
||||
|
||||
const showDtail = ref(false)
|
||||
|
||||
const list = ref([])
|
||||
const list1 = ref([])
|
||||
|
||||
// 查询条件
|
||||
const queryParams = reactive({
|
||||
invoicing_company_name: '',
|
||||
contract_id: '',
|
||||
customer_id: '',
|
||||
|
||||
|
||||
})
|
||||
|
||||
// 选中数据
|
||||
const selectData = ref<any[]>([])
|
||||
|
||||
// 表格选择后回调事件
|
||||
const handleSelectionChange = (val: any[]) => {
|
||||
selectData.value = val.map(({ id }) => id)
|
||||
}
|
||||
|
||||
// 获取字典数据
|
||||
const { dictData } = useDictData('pay_period,invoice_type')
|
||||
|
||||
// 分页相关
|
||||
const { pager, getLists, resetParams, resetPage } = usePaging({
|
||||
fetchFun: apiinvoiceapplyLists,
|
||||
params: queryParams
|
||||
})
|
||||
|
||||
// 添加
|
||||
const handleAdd = async () => {
|
||||
showEdit.value = true
|
||||
await nextTick()
|
||||
editRef.value?.open('add')
|
||||
}
|
||||
|
||||
// 编辑
|
||||
const handleEdit = async (data: any) => {
|
||||
let res = await apiinvoiceapplyDetail({ id: data.id })
|
||||
showEdit.value = true
|
||||
await nextTick()
|
||||
editRef.value?.open('edit')
|
||||
editRef.value?.setFormData(res)
|
||||
}
|
||||
|
||||
// 删除
|
||||
const handleDelete = async (id: number | any[]) => {
|
||||
await feedback.confirm('确定要删除?')
|
||||
await apiinvoiceapplyDelete({ id })
|
||||
getLists()
|
||||
}
|
||||
//详情
|
||||
const handledetail = async (data: any) => {
|
||||
let res = await apiinvoiceapplyDetail({ id: data.id })
|
||||
showDtail.value = true
|
||||
await nextTick()
|
||||
detailRef.value?.open()
|
||||
detailRef.value?.setFormData(res)
|
||||
}
|
||||
|
||||
//获取客户
|
||||
const getlist1 = () => {
|
||||
apiContractLists().then((res) => {
|
||||
list.value = res.lists
|
||||
})
|
||||
}
|
||||
|
||||
//获取合同
|
||||
const getlist2 = () => {
|
||||
apiCustomLists().then((res) => {
|
||||
// console.log(res)
|
||||
list1.value = res.lists
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
getlist1()
|
||||
getlist2()
|
||||
|
||||
|
||||
getLists()
|
||||
</script>
|
||||
|
283
src/views/AssetManagement/Asset Repair/detail.vue
Normal file
283
src/views/AssetManagement/Asset Repair/detail.vue
Normal file
@ -0,0 +1,283 @@
|
||||
|
||||
<template>
|
||||
<div class="detail-popup">
|
||||
<popup ref="popupRef" title="开票申请详情" :async="true" width="80%" @confirm="handleSubmit" @close="handleClose">
|
||||
<el-form ref="formRef" :model="formData" label-width="160px">
|
||||
<el-card class="mb-2">
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="项目名称">
|
||||
{{ formData.project_name }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="客户名称">
|
||||
{{ formData.custom.name }}
|
||||
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="项目编码">
|
||||
{{ formData.project_code
|
||||
}}
|
||||
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="合同编号">
|
||||
{{ formData.contract.contract_name }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="合同名称">
|
||||
{{ formData.contract ? formData.contract.contract_code : '暂无数据' }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="合同金额">
|
||||
{{ formData.contract.amount
|
||||
}}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="期次">
|
||||
<dict-value :options="dictData.pay_period" :value="formData.period" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="累计开票金额">
|
||||
{{ formData.accumulate_amount }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="累计回款金额">
|
||||
{{ formData.accumulated_payments_received }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="税率">
|
||||
{{ formData.tax_rate }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="发票类型">
|
||||
|
||||
<dict-value :options="dictData.invoice_type" :value="formData.invoice_type" />
|
||||
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="开票金额(含税)">
|
||||
{{ formData.invoicing_amount }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="金额大写">
|
||||
{{ formData.invoicing_amount_daxie }}
|
||||
</el-form-item>
|
||||
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="开票金额(税额)">
|
||||
{{ formData.invoicing_amount }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="开票金额(非税)">
|
||||
{{ formData.amount_including_tax }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="开票内容">
|
||||
{{ formData.content }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="发票编号">
|
||||
{{ formData.invoice_no }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="开票公司名称">
|
||||
{{ formData.invoicing_company_name }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="纳税人识别号">
|
||||
{{ formData.taxpayer_identification_number }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="开户银行">
|
||||
{{ formData.deposit_bank }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="账号">
|
||||
{{ formData.bank_accnout }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="开户地址及电话">
|
||||
{{ formData.address_phone }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="收票地址">
|
||||
{{ formData.receiving_address }}
|
||||
</el-form-item>
|
||||
</el-col> <el-col :span="8">
|
||||
<el-form-item label="联系人">
|
||||
{{ formData.contacts }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="联系电话">
|
||||
{{ formData.phone }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="邮寄时间">
|
||||
{{ formData.mailing_time }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="邮寄方式">
|
||||
{{ formData.mailing_type }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="邮寄单号">
|
||||
{{ formData.mailing_no }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="备注">
|
||||
{{ formData.remark }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="附件">
|
||||
<div v-for="(item, index) in formDataannex" style="margin-left: 5px;display: block;">
|
||||
<a style="margin-left: 10px; color: #4a5dff; align-self: flex-start" :href="item.uri" target="_blank">{{ item.name }}</a>
|
||||
<span style="cursor: pointer;margin-left: 5px;" @click="delFileFn(index)">x</span>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
|
||||
</el-row>
|
||||
</el-card>
|
||||
</el-form>
|
||||
</popup>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup name="customdetail">
|
||||
|
||||
import type { FormInstance } from 'element-plus'
|
||||
import Popup from '@/components/popup/index.vue'
|
||||
import { apiCustomDetail } from '@/api/custom'
|
||||
import { timeFormat } from '@/utils/util'
|
||||
import type { PropType } from 'vue'
|
||||
defineProps({
|
||||
dictData: {
|
||||
type: Object as PropType<Record<string, any[]>>,
|
||||
default: () => ({})
|
||||
}
|
||||
})
|
||||
const emit = defineEmits(['success', 'close'])
|
||||
const formRef = shallowRef<FormInstance>()
|
||||
const popupRef = shallowRef<InstanceType<typeof Popup>>()
|
||||
const formDataannex = reactive([])
|
||||
const datas = reactive({
|
||||
provinceOptions: [],
|
||||
cityOptions: [],
|
||||
areaOptions: [],
|
||||
});
|
||||
|
||||
|
||||
// 表单数据
|
||||
const formData = reactive({
|
||||
|
||||
})
|
||||
|
||||
|
||||
|
||||
|
||||
// 获取详情
|
||||
const setFormData = async (data: Record<any, any>) => {
|
||||
if (data.annex && data.annex.length > 0) {
|
||||
|
||||
const arry1 = data.annex.map((item: any, index: any) => {
|
||||
return {
|
||||
name: `文件${index + 1}`,
|
||||
uri: item
|
||||
};
|
||||
});
|
||||
Object.assign(formDataannex, arry1)
|
||||
|
||||
}
|
||||
|
||||
// for (const key in formData) {
|
||||
// if (data[key] != null && data[key] != undefined) {
|
||||
// //@ts-ignore
|
||||
// formData[key] = data[key]
|
||||
|
||||
// }
|
||||
|
||||
// }
|
||||
|
||||
Object.assign(formData, data)
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
const getDetail = async (row: Record<string, any>) => {
|
||||
const data = await apiCustomDetail({
|
||||
id: formData.id
|
||||
})
|
||||
setFormData(data)
|
||||
}
|
||||
|
||||
|
||||
// 提交按钮
|
||||
const handleSubmit = async () => {
|
||||
popupRef.value?.close()
|
||||
|
||||
}
|
||||
|
||||
//打开弹窗
|
||||
const open = () => {
|
||||
console.log('1111111')
|
||||
popupRef.value?.open()
|
||||
}
|
||||
|
||||
// 关闭回调
|
||||
const handleClose = () => {
|
||||
emit('close')
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
defineExpose({
|
||||
open,
|
||||
setFormData,
|
||||
getDetail
|
||||
})
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.tit {
|
||||
font-size: 1.2em;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
</style>
|
357
src/views/AssetManagement/Asset Repair/edit.vue
Normal file
357
src/views/AssetManagement/Asset Repair/edit.vue
Normal file
@ -0,0 +1,357 @@
|
||||
<template>
|
||||
<div class="edit-popup">
|
||||
|
||||
<popup ref="popupRef" :title="popupTitle" :async="true" width="80%" @confirm="handleSubmit" @close="handleClose">
|
||||
<el-steps :active="active" align-center style="margin-bottom: 20px;">
|
||||
<el-step title="提交申请" description="Some description" />
|
||||
<el-step title="资产管理员" description="Some description" />
|
||||
<el-step title="维修结果反馈" description="Some description" />
|
||||
</el-steps>
|
||||
<div style="display: flex; flex-direction: row-reverse; justify-content: flex-start;margin-bottom: 30px;">
|
||||
|
||||
<el-select class="w-[180px]" v-model="formData.dept_id" clearable placeholder="请选择部门">
|
||||
<el-option v-for="(item, index) in list2" :key="index" :label="item.name" :value="item.id" />
|
||||
</el-select>
|
||||
<el-select class="w-[180px]" v-model="formData.org_id" clearable placeholder="请选择组织" @change="deptrmt">
|
||||
<el-option v-for="(item, index) in list1" :key="index" :label="item.name" :value="item.id" />
|
||||
</el-select>
|
||||
</div>
|
||||
|
||||
<el-form ref="formRef" :model="formData" label-width="auto" :rules="formRules">
|
||||
<el-row :gutter="10">
|
||||
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="资产序列号" prop="contract_id">
|
||||
<el-input v-model="project_name" clearable readonly placeholder="点击选择[空闲]状态的资产" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="资产编号" prop="contract_id">
|
||||
<el-input v-model="project_name" clearable disabled placeholder="系统自动填写" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="资产名称" prop="contract_id">
|
||||
<el-input v-model="project_name" clearable disabled placeholder="系统自动填写" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="规格型号" prop="contract_id">
|
||||
<el-input v-model="project_name" clearable disabled placeholder="系统自动填写" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="资产类别" prop="contract_id">
|
||||
<el-input v-model="project_name" clearable disabled placeholder="系统自动填写" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="计量单位" prop="contract_id">
|
||||
<el-input v-model="project_name" clearable disabled placeholder="系统自动填写" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="生产厂家" prop="contract_id">
|
||||
<el-input v-model="project_name" clearable disabled placeholder="系统自动填写" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="资产来源" prop="contract_id">
|
||||
<el-input v-model="project_name" clearable disabled placeholder="系统自动填写" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="预计使用寿命" prop="contract_id">
|
||||
<el-input v-model="project_name" clearable disabled placeholder="系统自动填写" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="存放地址" prop="contract_id">
|
||||
<el-input v-model="project_name" clearable disabled placeholder="系统自动填写" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="送修日期" prop="invoicing_date" :rules="[{ required: true, message: '不可为空', trigger: 'change' }]">
|
||||
|
||||
<el-date-picker class="flex-1 !flex" v-model="formData.invoicing_date" clearable type="date" value-format="YYYY-MM-DD" placeholder="选择送修日期">
|
||||
</el-date-picker>
|
||||
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="送修人" prop="remark">
|
||||
<el-input v-model="formData.remark" type="textarea" clearable placeholder="请输入送修人" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="formData.remark" type="textarea" clearable placeholder="请输入备注" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<!-- <el-form-item label="附件" prop="annex">
|
||||
<el-input v-model="formData.annex" clearable placeholder="请输入附件" />
|
||||
</el-form-item> -->
|
||||
<el-form-item label="送修前照片" prop="field127">
|
||||
<el-upload accept="doc, docx, xls, xlsx, ppt, pptx, pdf, txt, zip, rar, tar, jpg, png, gif, jpeg, webp, wmv, avi, mpg, mpeg, 3gp, mov, mp4, flv, f4v, rmvb, mkv" class="upload-demo" :show-file-list="false" aria-hidden="true" :headers="{ Token: userStore.token }" :action="base_url + '/upload/file'" :on-success="handleAvatarSuccess_four" ref="upload">
|
||||
<el-button type="primary">
|
||||
上传
|
||||
</el-button>
|
||||
</el-upload>
|
||||
|
||||
<div>
|
||||
<div v-for="(item, index) in formDataannex" style="margin-left: 5px;display: block;">
|
||||
<a style="margin-left: 10px; color: #4a5dff; align-self: flex-start" :href="item.uri" target="_blank">{{ item.name }}</a>
|
||||
<span style="cursor: pointer;margin-left: 5px;" @click="delFileFn(index)">x</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-dialog v-model="showDialog1" title="选择项目" width="70%">
|
||||
<projectDialog @customEvent="customEvent1" contract_type="2"></projectDialog>
|
||||
</el-dialog>
|
||||
</el-form>
|
||||
</popup>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup name="projectEdit">
|
||||
import type { FormInstance } from 'element-plus'
|
||||
import Popup from '@/components/popup/index.vue'
|
||||
import { toChinesNum } from "@/utils/util";
|
||||
import projectDialog from '@/components/project/index.vue'
|
||||
import { apiinvoiceapplyAdd, apiinvoiceapplyEdit, apiinvoiceapplyDetail } from '@/api/InvoicingRequests'
|
||||
import { getAllProjectTypes } from '@/api/projecttype'
|
||||
import { timeFormat } from '@/utils/util'
|
||||
import { isEmail, isIdCard, isPhone } from '@/utils/validate'
|
||||
import type { PropType } from 'vue'
|
||||
import configs from "@/config"
|
||||
import useUserStore from "@/stores/modules/user";
|
||||
const base_url = configs.baseUrl + configs.urlPrefix
|
||||
const userStore = useUserStore();
|
||||
const active = ref(0)
|
||||
const formDataannex = reactive([])
|
||||
const contract_name = ref('')
|
||||
const project_name = ref('')
|
||||
const project_code = ref('')
|
||||
const project_amount = ref('')
|
||||
const contract_no = ref('')
|
||||
const custom_name = ref('')
|
||||
const list1 = reactive([])
|
||||
const list2 = reactive([])
|
||||
import { deptAll } from '@/api/org/department'
|
||||
import { getAll } from '@/api/org/organization'
|
||||
const next = () => {
|
||||
if (active.value++ > 3) active.value = 0
|
||||
}
|
||||
// 上传文件
|
||||
const handleAvatarSuccess_four = (
|
||||
response,
|
||||
uploadFile
|
||||
) => {
|
||||
if (response.code == 0) {
|
||||
ElMessage.error(response.msg);
|
||||
return;
|
||||
}
|
||||
formDataannex.push(
|
||||
{ uri: response.data.uri, name: response.data.name }
|
||||
|
||||
|
||||
);
|
||||
};
|
||||
|
||||
//获取所有组织
|
||||
const getlist = () => {
|
||||
getAll().then((res) => {
|
||||
Object.assign(list1, res)
|
||||
if (res.length > 0 && !formData.org_id) {
|
||||
formData.org_id = res[0].id
|
||||
deptAll({ 'org_id': res[0].id }).then((res) => {
|
||||
if (res.length > 0) {
|
||||
Object.assign(list2, res)
|
||||
formData.dept_id = res[0].id
|
||||
}
|
||||
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
//获取部门
|
||||
const deptrmt = (e: any) => {
|
||||
formData.dept_id = ''
|
||||
getlist1(e)
|
||||
|
||||
}
|
||||
//获取所有部门
|
||||
const getlist1 = (id: any) => {
|
||||
deptAll({ 'org_id': id }).then((res) => {
|
||||
list2.splice(0, list2.length, ...res)
|
||||
})
|
||||
}
|
||||
|
||||
// 删除上传的文件
|
||||
const delFileFn = (index: number) => {
|
||||
formDataannex.splice(index, 1)
|
||||
}
|
||||
defineProps({
|
||||
dictData: {
|
||||
type: Object as PropType<Record<string, any[]>>,
|
||||
default: () => ({})
|
||||
}
|
||||
})
|
||||
const emit = defineEmits(['success', 'close'])
|
||||
const formRef = shallowRef<FormInstance>()
|
||||
const popupRef = shallowRef<InstanceType<typeof Popup>>()
|
||||
const mode = ref('add')
|
||||
const showDialog = ref(false)
|
||||
const showDialog1 = ref(false)
|
||||
|
||||
const customEvent = (e: any) => {
|
||||
formData.customer_id = e.id;
|
||||
custom_name.value = e.name;
|
||||
showDialog.value = false;
|
||||
};
|
||||
const customEvent1 = (e: any) => {
|
||||
formData.contract_id = e.id;
|
||||
project_name.value = e.project_name;
|
||||
project_code.value = e.project_code;
|
||||
contract_name.value = e.contract_name;
|
||||
contract_no.value = e.contract_code
|
||||
project_amount.value = e.amount
|
||||
|
||||
showDialog1.value = false;
|
||||
};
|
||||
// 弹窗标题
|
||||
const popupTitle = computed(() => {
|
||||
return mode.value == 'edit' ? '编辑资产维修表' : '新增资产维修表'
|
||||
})
|
||||
|
||||
// 表单数据
|
||||
const formData = reactive({
|
||||
id: '',
|
||||
customer_id: '',
|
||||
contract_id: '',
|
||||
approve_id: '',
|
||||
invoicing_date: "",
|
||||
period: "",
|
||||
accumulate_amount: '',
|
||||
accumulated_payments_received: '',
|
||||
tax_rate: "",
|
||||
invoice_type: '',
|
||||
invoicing_amount: '',
|
||||
invoicing_amount_daxie: "",
|
||||
tax: '',
|
||||
amount_including_tax: '',
|
||||
content: "",
|
||||
invoice_no: "",
|
||||
remark: "",
|
||||
annex: "",
|
||||
invoicing_company_name: "",
|
||||
taxpayer_identification_number: "",
|
||||
deposit_bank: "",
|
||||
bank_accnout: "",
|
||||
address_phone: "",
|
||||
receiving_address: "",
|
||||
contacts: "",
|
||||
phone: "",
|
||||
mailing_time: "",
|
||||
mailing_type: "",
|
||||
mailing_no: ""
|
||||
})
|
||||
|
||||
|
||||
// 表单验证
|
||||
const formRules = reactive<any>({
|
||||
|
||||
})
|
||||
|
||||
|
||||
// 获取详情
|
||||
const setFormData = async (data: Record<any, any>) => {
|
||||
if (data.annex && data.annex.length > 0) {
|
||||
|
||||
const arry1 = data.annex.map((item: any, index: any) => {
|
||||
return {
|
||||
name: `文件${index + 1}`,
|
||||
uri: item
|
||||
};
|
||||
});
|
||||
Object.assign(formDataannex, arry1)
|
||||
|
||||
}
|
||||
|
||||
if (data.dept_id) {
|
||||
getlist1(data.org_id)
|
||||
}
|
||||
for (const key in formData) {
|
||||
if (data[key] != null && data[key] != undefined) {
|
||||
//@ts-ignore
|
||||
formData[key] = data[key]
|
||||
}
|
||||
}
|
||||
if (formData.invoicing_amount) {
|
||||
toChinesNum(formData.invoicing_amount)
|
||||
}
|
||||
custom_name.value = data.custom.name
|
||||
project_name.value = data.contract_name;
|
||||
project_code.value = data.contract_code
|
||||
project_amount.value = data.contract.amount
|
||||
contract_name.value = data.contract.contract_name;
|
||||
contract_no.value = data.contract.contract_code
|
||||
|
||||
|
||||
}
|
||||
const getDetail = async (row: Record<string, any>) => {
|
||||
const data = await apiinvoiceapplyDetail({
|
||||
id: row.id
|
||||
})
|
||||
setFormData(data)
|
||||
}
|
||||
|
||||
|
||||
// 提交按钮
|
||||
const handleSubmit = async () => {
|
||||
if (formDataannex.length > 0) {
|
||||
formData.annex = JSON.stringify(formDataannex.map((item: any) => item.uri))
|
||||
}
|
||||
|
||||
console.log(formRef.value?.validate(), '22222222')
|
||||
await formRef.value?.validate()
|
||||
|
||||
|
||||
const data = { ...formData }
|
||||
mode.value == 'edit'
|
||||
? await apiinvoiceapplyEdit(data)
|
||||
: await apiinvoiceapplyAdd(data)
|
||||
popupRef.value?.close()
|
||||
emit('success')
|
||||
}
|
||||
|
||||
//打开弹窗
|
||||
const open = (type = 'add') => {
|
||||
mode.value = type
|
||||
popupRef.value?.open()
|
||||
getlist()
|
||||
|
||||
}
|
||||
|
||||
// 关闭回调
|
||||
const handleClose = () => {
|
||||
emit('close')
|
||||
}
|
||||
|
||||
|
||||
|
||||
defineExpose({
|
||||
open,
|
||||
setFormData,
|
||||
getDetail
|
||||
})
|
||||
</script>
|
192
src/views/AssetManagement/Asset Repair/index.vue
Normal file
192
src/views/AssetManagement/Asset Repair/index.vue
Normal file
@ -0,0 +1,192 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-card class="!border-none mb-4" shadow="never">
|
||||
<el-form class="mb-[-16px]" :model="queryParams" inline>
|
||||
<el-form-item label="开票公司名称" prop="invoicing_company_name">
|
||||
<el-input class="w-[280px]" v-model="queryParams.invoicing_company_name" clearable placeholder="请输入开票公司名称" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="客户" prop="customer_id">
|
||||
<el-select class="w-[280px]" v-model="queryParams.customer_id" clearable placeholder="请选择客户">
|
||||
<el-option label="全部" value=""></el-option>
|
||||
<el-option v-for="(item, i) in list1" :key="i" :label="item.name" :value="item.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="合同" prop="contract_id">
|
||||
<el-select class="w-[280px]" v-model="queryParams.contract_id" clearable placeholder="请选择合同">
|
||||
<el-option label="全部" value=""></el-option>
|
||||
<el-option v-for="(item, index) in list" :key="index" :label="item.contract_name" :value="item.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="resetPage">查询</el-button>
|
||||
<el-button @click="resetParams">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-card>
|
||||
<el-card class="!border-none" v-loading="pager.loading" shadow="never">
|
||||
<el-button v-perms="['InvoicingRequests.InvoicingRequests/add']" type="primary" @click="handleAdd">
|
||||
<template #icon>
|
||||
<icon name="el-icon-Plus" />
|
||||
</template>
|
||||
新增
|
||||
</el-button>
|
||||
<el-button v-perms="['InvoicingRequests.InvoicingRequests/delete']" :disabled="!selectData.length" @click="handleDelete(selectData)">
|
||||
删除
|
||||
</el-button>
|
||||
|
||||
<div class="mt-4">
|
||||
<el-table :data="pager.lists" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column label="序号" type="index" width="55" />
|
||||
<el-table-column label="处理流程" prop="customer_name" show-overflow-tooltip />
|
||||
<el-table-column label="流程步骤" prop="customer_name" show-overflow-tooltip />
|
||||
<el-table-column label="资产维修单号" prop="customer_name" show-overflow-tooltip />
|
||||
<el-table-column label="资产序列号" prop="tax" show-overflow-tooltip />
|
||||
<el-table-column label="资产名称 " prop="tax" show-overflow-tooltip />
|
||||
<el-table-column label="资产类别" prop="tax" show-overflow-tooltip />
|
||||
<el-table-column label="规格型号" prop="tax" show-overflow-tooltip />
|
||||
<el-table-column label="计量单位 " prop="tax" show-overflow-tooltip />
|
||||
<el-table-column label="生产厂家" prop="tax" show-overflow-tooltip />
|
||||
<el-table-column label="送修日期" prop="tax" show-overflow-tooltip />
|
||||
<el-table-column label="送修人 " prop="tax" show-overflow-tooltip />
|
||||
<el-table-column label="送修原因" prop="project_name" show-overflow-tooltip />
|
||||
<el-table-column label="送修前照片" prop="tax" show-overflow-tooltip />
|
||||
<el-table-column label="维修完成日期" prop="tax" show-overflow-tooltip />
|
||||
|
||||
<el-table-column label="维修结果" prop="tax" show-overflow-tooltip />
|
||||
<el-table-column label="维修结果说明" prop="tax" show-overflow-tooltip />
|
||||
<el-table-column label="维修费用" prop="tax" show-overflow-tooltip />
|
||||
<el-table-column label="送修后照片" prop="tax" show-overflow-tooltip />
|
||||
|
||||
|
||||
|
||||
|
||||
<el-table-column label="操作" width="160" fixed="right">
|
||||
<template #default="{ row }">
|
||||
<el-button v-perms="['InvoicingRequests.InvoicingRequests/edit']" type="primary" link @click="handleEdit(row)">
|
||||
编辑
|
||||
</el-button>
|
||||
<el-button v-perms="['InvoicingRequests.InvoicingRequests/delete']" type="danger" link @click="handleDelete(row.id)">
|
||||
删除
|
||||
</el-button>
|
||||
<el-button v-perms="['InvoicingRequests.InvoicingRequests/detail']" link @click="handledetail(row)">
|
||||
详情
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<div class="flex justify-end mt-4">
|
||||
<pagination v-model="pager" @change="getLists" />
|
||||
</div>
|
||||
</el-card>
|
||||
<edit-popup v-if="showEdit" ref="editRef" :dict-data="dictData" @success="getLists" @close="showEdit = false" />
|
||||
<detail-popup v-if="showDtail" ref="detailRef" :dict-data="dictData" @close="showDtail = false" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup name="projectLists">
|
||||
import { usePaging } from '@/hooks/usePaging'
|
||||
import { useDictData } from '@/hooks/useDictOptions'
|
||||
import { apiinvoiceapplyLists, apiinvoiceapplyDelete, apiinvoiceapplyDetail } from '@/api/InvoicingRequests'
|
||||
import { timeFormat } from '@/utils/util'
|
||||
import { apiContractLists } from '@/api/contract'
|
||||
import { apiCustomLists } from '@/api/custom'
|
||||
import { getAllProjectTypes } from '@/api/projecttype'
|
||||
const protype = reactive([])
|
||||
import feedback from '@/utils/feedback'
|
||||
import EditPopup from './edit.vue'
|
||||
import DetailPopup from './detail.vue'
|
||||
const detailRef = shallowRef<InstanceType<typeof DetailPopup>>()
|
||||
const editRef = shallowRef<InstanceType<typeof EditPopup>>()
|
||||
// 是否显示编辑框
|
||||
const showEdit = ref(false)
|
||||
|
||||
const showDtail = ref(false)
|
||||
|
||||
const list = ref([])
|
||||
const list1 = ref([])
|
||||
|
||||
// 查询条件
|
||||
const queryParams = reactive({
|
||||
invoicing_company_name: '',
|
||||
contract_id: '',
|
||||
customer_id: '',
|
||||
|
||||
|
||||
})
|
||||
|
||||
// 选中数据
|
||||
const selectData = ref<any[]>([])
|
||||
|
||||
// 表格选择后回调事件
|
||||
const handleSelectionChange = (val: any[]) => {
|
||||
selectData.value = val.map(({ id }) => id)
|
||||
}
|
||||
|
||||
// 获取字典数据
|
||||
const { dictData } = useDictData('pay_period,invoice_type')
|
||||
|
||||
// 分页相关
|
||||
const { pager, getLists, resetParams, resetPage } = usePaging({
|
||||
fetchFun: apiinvoiceapplyLists,
|
||||
params: queryParams
|
||||
})
|
||||
|
||||
// 添加
|
||||
const handleAdd = async () => {
|
||||
showEdit.value = true
|
||||
await nextTick()
|
||||
editRef.value?.open('add')
|
||||
}
|
||||
|
||||
// 编辑
|
||||
const handleEdit = async (data: any) => {
|
||||
let res = await apiinvoiceapplyDetail({ id: data.id })
|
||||
showEdit.value = true
|
||||
await nextTick()
|
||||
editRef.value?.open('edit')
|
||||
editRef.value?.setFormData(res)
|
||||
}
|
||||
|
||||
// 删除
|
||||
const handleDelete = async (id: number | any[]) => {
|
||||
await feedback.confirm('确定要删除?')
|
||||
await apiinvoiceapplyDelete({ id })
|
||||
getLists()
|
||||
}
|
||||
//详情
|
||||
const handledetail = async (data: any) => {
|
||||
let res = await apiinvoiceapplyDetail({ id: data.id })
|
||||
showDtail.value = true
|
||||
await nextTick()
|
||||
detailRef.value?.open()
|
||||
detailRef.value?.setFormData(res)
|
||||
}
|
||||
|
||||
//获取客户
|
||||
const getlist1 = () => {
|
||||
apiContractLists().then((res) => {
|
||||
list.value = res.lists
|
||||
})
|
||||
}
|
||||
|
||||
//获取合同
|
||||
const getlist2 = () => {
|
||||
apiCustomLists().then((res) => {
|
||||
// console.log(res)
|
||||
list1.value = res.lists
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
getlist1()
|
||||
getlist2()
|
||||
|
||||
|
||||
getLists()
|
||||
</script>
|
||||
|
283
src/views/AssetManagement/Asset acquisition/detail.vue
Normal file
283
src/views/AssetManagement/Asset acquisition/detail.vue
Normal file
@ -0,0 +1,283 @@
|
||||
|
||||
<template>
|
||||
<div class="detail-popup">
|
||||
<popup ref="popupRef" title="开票申请详情" :async="true" width="80%" @confirm="handleSubmit" @close="handleClose">
|
||||
<el-form ref="formRef" :model="formData" label-width="160px">
|
||||
<el-card class="mb-2">
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="项目名称">
|
||||
{{ formData.project_name }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="客户名称">
|
||||
{{ formData.custom.name }}
|
||||
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="项目编码">
|
||||
{{ formData.project_code
|
||||
}}
|
||||
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="合同编号">
|
||||
{{ formData.contract.contract_name }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="合同名称">
|
||||
{{ formData.contract ? formData.contract.contract_code : '暂无数据' }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="合同金额">
|
||||
{{ formData.contract.amount
|
||||
}}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="期次">
|
||||
<dict-value :options="dictData.pay_period" :value="formData.period" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="累计开票金额">
|
||||
{{ formData.accumulate_amount }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="累计回款金额">
|
||||
{{ formData.accumulated_payments_received }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="税率">
|
||||
{{ formData.tax_rate }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="发票类型">
|
||||
|
||||
<dict-value :options="dictData.invoice_type" :value="formData.invoice_type" />
|
||||
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="开票金额(含税)">
|
||||
{{ formData.invoicing_amount }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="金额大写">
|
||||
{{ formData.invoicing_amount_daxie }}
|
||||
</el-form-item>
|
||||
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="开票金额(税额)">
|
||||
{{ formData.invoicing_amount }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="开票金额(非税)">
|
||||
{{ formData.amount_including_tax }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="开票内容">
|
||||
{{ formData.content }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="发票编号">
|
||||
{{ formData.invoice_no }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="开票公司名称">
|
||||
{{ formData.invoicing_company_name }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="纳税人识别号">
|
||||
{{ formData.taxpayer_identification_number }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="开户银行">
|
||||
{{ formData.deposit_bank }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="账号">
|
||||
{{ formData.bank_accnout }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="开户地址及电话">
|
||||
{{ formData.address_phone }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="收票地址">
|
||||
{{ formData.receiving_address }}
|
||||
</el-form-item>
|
||||
</el-col> <el-col :span="8">
|
||||
<el-form-item label="联系人">
|
||||
{{ formData.contacts }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="联系电话">
|
||||
{{ formData.phone }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="邮寄时间">
|
||||
{{ formData.mailing_time }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="邮寄方式">
|
||||
{{ formData.mailing_type }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="邮寄单号">
|
||||
{{ formData.mailing_no }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="备注">
|
||||
{{ formData.remark }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="附件">
|
||||
<div v-for="(item, index) in formDataannex" style="margin-left: 5px;display: block;">
|
||||
<a style="margin-left: 10px; color: #4a5dff; align-self: flex-start" :href="item.uri" target="_blank">{{ item.name }}</a>
|
||||
<span style="cursor: pointer;margin-left: 5px;" @click="delFileFn(index)">x</span>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
|
||||
</el-row>
|
||||
</el-card>
|
||||
</el-form>
|
||||
</popup>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup name="customdetail">
|
||||
|
||||
import type { FormInstance } from 'element-plus'
|
||||
import Popup from '@/components/popup/index.vue'
|
||||
import { apiCustomDetail } from '@/api/custom'
|
||||
import { timeFormat } from '@/utils/util'
|
||||
import type { PropType } from 'vue'
|
||||
defineProps({
|
||||
dictData: {
|
||||
type: Object as PropType<Record<string, any[]>>,
|
||||
default: () => ({})
|
||||
}
|
||||
})
|
||||
const emit = defineEmits(['success', 'close'])
|
||||
const formRef = shallowRef<FormInstance>()
|
||||
const popupRef = shallowRef<InstanceType<typeof Popup>>()
|
||||
const formDataannex = reactive([])
|
||||
const datas = reactive({
|
||||
provinceOptions: [],
|
||||
cityOptions: [],
|
||||
areaOptions: [],
|
||||
});
|
||||
|
||||
|
||||
// 表单数据
|
||||
const formData = reactive({
|
||||
|
||||
})
|
||||
|
||||
|
||||
|
||||
|
||||
// 获取详情
|
||||
const setFormData = async (data: Record<any, any>) => {
|
||||
if (data.annex && data.annex.length > 0) {
|
||||
|
||||
const arry1 = data.annex.map((item: any, index: any) => {
|
||||
return {
|
||||
name: `文件${index + 1}`,
|
||||
uri: item
|
||||
};
|
||||
});
|
||||
Object.assign(formDataannex, arry1)
|
||||
|
||||
}
|
||||
|
||||
// for (const key in formData) {
|
||||
// if (data[key] != null && data[key] != undefined) {
|
||||
// //@ts-ignore
|
||||
// formData[key] = data[key]
|
||||
|
||||
// }
|
||||
|
||||
// }
|
||||
|
||||
Object.assign(formData, data)
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
const getDetail = async (row: Record<string, any>) => {
|
||||
const data = await apiCustomDetail({
|
||||
id: formData.id
|
||||
})
|
||||
setFormData(data)
|
||||
}
|
||||
|
||||
|
||||
// 提交按钮
|
||||
const handleSubmit = async () => {
|
||||
popupRef.value?.close()
|
||||
|
||||
}
|
||||
|
||||
//打开弹窗
|
||||
const open = () => {
|
||||
console.log('1111111')
|
||||
popupRef.value?.open()
|
||||
}
|
||||
|
||||
// 关闭回调
|
||||
const handleClose = () => {
|
||||
emit('close')
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
defineExpose({
|
||||
open,
|
||||
setFormData,
|
||||
getDetail
|
||||
})
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.tit {
|
||||
font-size: 1.2em;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
</style>
|
391
src/views/AssetManagement/Asset acquisition/edit.vue
Normal file
391
src/views/AssetManagement/Asset acquisition/edit.vue
Normal file
@ -0,0 +1,391 @@
|
||||
<template>
|
||||
<div class="edit-popup">
|
||||
|
||||
<popup ref="popupRef" :title="popupTitle" :async="true" width="80%" @confirm="handleSubmit" @close="handleClose">
|
||||
<el-steps :active="active" align-center style="margin-bottom: 20px;">
|
||||
<el-step title="提交申请" description="Some description" />
|
||||
<el-step title="项目经理" description="Some description" />
|
||||
<el-step title="资产管理员
|
||||
" description="Some description" />
|
||||
</el-steps>
|
||||
<div style="display: flex; flex-direction: row-reverse; justify-content: flex-start;margin-bottom: 30px;">
|
||||
|
||||
<el-select class="w-[180px]" v-model="formData.dept_id" clearable placeholder="请选择部门">
|
||||
<el-option v-for="(item, index) in list2" :key="index" :label="item.name" :value="item.id" />
|
||||
</el-select>
|
||||
<el-select class="w-[180px]" v-model="formData.org_id" clearable placeholder="请选择组织" @change="deptrmt">
|
||||
<el-option v-for="(item, index) in list1" :key="index" :label="item.name" :value="item.id" />
|
||||
</el-select>
|
||||
</div>
|
||||
|
||||
<el-form ref="formRef" :model="formData" label-width="auto" :rules="formRules">
|
||||
<el-row :gutter="10">
|
||||
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="项目名称" prop="contract_id">
|
||||
<el-input v-model="project_name" clearable placeholder="请输入资产序列号" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="项目编码" prop="contract_id">
|
||||
<el-input v-model="project_name" clearable placeholder="请输入资产名称" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="领用日期" prop="invoicing_date" :rules="[{ required: true, message: '不可为空', trigger: 'change' }]">
|
||||
|
||||
<el-date-picker class="flex-1 !flex" v-model="formData.invoicing_date" clearable type="date" value-format="YYYY-MM-DD" placeholder="选择领用日期">
|
||||
</el-date-picker>
|
||||
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="领用人" prop="contract_id">
|
||||
<el-input v-model="project_name" clearable placeholder="请输入领用人" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="formData.remark" type="textarea" clearable placeholder="请输入备注" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<!-- <el-form-item label="附件" prop="annex">
|
||||
<el-input v-model="formData.annex" clearable placeholder="请输入附件" />
|
||||
</el-form-item> -->
|
||||
<el-form-item label="附件" prop="field127">
|
||||
<el-upload accept="doc, docx, xls, xlsx, ppt, pptx, pdf, txt, zip, rar, tar, jpg, png, gif, jpeg, webp, wmv, avi, mpg, mpeg, 3gp, mov, mp4, flv, f4v, rmvb, mkv" class="upload-demo" :show-file-list="false" aria-hidden="true" :headers="{ Token: userStore.token }" :action="base_url + '/upload/file'" :on-success="handleAvatarSuccess_four" ref="upload">
|
||||
<el-button type="primary">
|
||||
上传
|
||||
</el-button>
|
||||
</el-upload>
|
||||
|
||||
<div>
|
||||
<div v-for="(item, index) in formDataannex" style="margin-left: 5px;display: block;">
|
||||
<a style="margin-left: 10px; color: #4a5dff; align-self: flex-start" :href="item.uri" target="_blank">{{ item.name }}</a>
|
||||
<span style="cursor: pointer;margin-left: 5px;" @click="delFileFn(index)">x</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div style="margin: 20px 0;">资产领用明细</div>
|
||||
|
||||
<el-row>
|
||||
|
||||
<el-table :data="tablist1">
|
||||
<el-table-column label="序号">
|
||||
<template #default="{ row }">
|
||||
<el-button @click="handleAdd(row)">+</el-button>
|
||||
<el-button @click="handleDelete(row)">-</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="资产序列号" prop="name1">
|
||||
<template #default="{ row, $index }">
|
||||
<el-input v-model="row.name1" readonly @click="subjectmu(row, $index)" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="资产编号" prop="remark">
|
||||
<template #default="{ row }">
|
||||
<el-input v-model="row.remark" /> </template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="资产名称" prop="remark">
|
||||
<template #default="{ row }">
|
||||
<el-input v-model="row.remark" /> </template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="规格型号" prop="remark">
|
||||
<template #default="{ row }">
|
||||
<el-input v-model="row.remark" /> </template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="计量单位" prop="remark">
|
||||
<template #default="{ row }">
|
||||
<el-input v-model="row.remark" /> </template>
|
||||
</el-table-column>
|
||||
<el-table-column label="生产厂家" prop="remark">
|
||||
<template #default="{ row }">
|
||||
<el-input v-model="row.remark" /> </template>
|
||||
</el-table-column>
|
||||
<el-table-column label="出厂日期" prop="remark">
|
||||
<template #default="{ row }">
|
||||
<el-input v-model="row.remark" /> </template>
|
||||
</el-table-column>
|
||||
<el-table-column label="存放地点" prop="remark">
|
||||
<template #default="{ row }">
|
||||
<el-input v-model="row.remark" /> </template>
|
||||
</el-table-column>
|
||||
<el-table-column label="预计使用天数" prop="remark">
|
||||
<template #default="{ row }">
|
||||
<el-input v-model="row.remark" /> </template>
|
||||
</el-table-column>
|
||||
<el-table-column label="备注" prop="remark">
|
||||
<template #default="{ row }">
|
||||
<el-input v-model="row.remark" /> </template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
|
||||
</el-row>
|
||||
|
||||
<el-dialog v-model="showDialog1" title="选择项目" width="70%">
|
||||
<projectDialog @customEvent="customEvent1" contract_type="2"></projectDialog>
|
||||
</el-dialog>
|
||||
</el-form>
|
||||
</popup>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup name="projectEdit">
|
||||
import type { FormInstance } from 'element-plus'
|
||||
import Popup from '@/components/popup/index.vue'
|
||||
import { toChinesNum } from "@/utils/util";
|
||||
import projectDialog from '@/components/project/index.vue'
|
||||
import { apiinvoiceapplyAdd, apiinvoiceapplyEdit, apiinvoiceapplyDetail } from '@/api/InvoicingRequests'
|
||||
import { getAllProjectTypes } from '@/api/projecttype'
|
||||
import { timeFormat } from '@/utils/util'
|
||||
import { isEmail, isIdCard, isPhone } from '@/utils/validate'
|
||||
import type { PropType } from 'vue'
|
||||
import configs from "@/config"
|
||||
import useUserStore from "@/stores/modules/user";
|
||||
const base_url = configs.baseUrl + configs.urlPrefix
|
||||
const userStore = useUserStore();
|
||||
const active = ref(0)
|
||||
const formDataannex = reactive([])
|
||||
const contract_name = ref('')
|
||||
const project_name = ref('')
|
||||
const project_code = ref('')
|
||||
const project_amount = ref('')
|
||||
const contract_no = ref('')
|
||||
const custom_name = ref('')
|
||||
const tablist1 = reactive([{}])
|
||||
const list1 = reactive([])
|
||||
const list2 = reactive([])
|
||||
import { deptAll } from '@/api/org/department'
|
||||
import { getAll } from '@/api/org/organization'
|
||||
const next = () => {
|
||||
if (active.value++ > 3) active.value = 0
|
||||
}
|
||||
// 上传文件
|
||||
const handleAvatarSuccess_four = (
|
||||
response,
|
||||
uploadFile
|
||||
) => {
|
||||
if (response.code == 0) {
|
||||
ElMessage.error(response.msg);
|
||||
return;
|
||||
}
|
||||
formDataannex.push(
|
||||
{ uri: response.data.uri, name: response.data.name }
|
||||
|
||||
|
||||
);
|
||||
};
|
||||
|
||||
const handleAdd = (row: any) => {
|
||||
// 在 row 后面插入一行数据
|
||||
const index = tablist1.indexOf(row);
|
||||
tablist1.splice(index + 1, 0, {});
|
||||
};
|
||||
|
||||
const handleDelete = (row: any) => {
|
||||
// 删除 row
|
||||
const index = tablist1.indexOf(row);
|
||||
tablist1.splice(index, 1);
|
||||
};
|
||||
//获取所有组织
|
||||
const getlist = () => {
|
||||
getAll().then((res) => {
|
||||
Object.assign(list1, res)
|
||||
if (res.length > 0 && !formData.org_id) {
|
||||
formData.org_id = res[0].id
|
||||
deptAll({ 'org_id': res[0].id }).then((res) => {
|
||||
if (res.length > 0) {
|
||||
Object.assign(list2, res)
|
||||
formData.dept_id = res[0].id
|
||||
}
|
||||
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
//获取部门
|
||||
const deptrmt = (e: any) => {
|
||||
formData.dept_id = ''
|
||||
getlist1(e)
|
||||
|
||||
}
|
||||
//获取所有部门
|
||||
const getlist1 = (id: any) => {
|
||||
deptAll({ 'org_id': id }).then((res) => {
|
||||
list2.splice(0, list2.length, ...res)
|
||||
})
|
||||
}
|
||||
|
||||
// 删除上传的文件
|
||||
const delFileFn = (index: number) => {
|
||||
formDataannex.splice(index, 1)
|
||||
}
|
||||
defineProps({
|
||||
dictData: {
|
||||
type: Object as PropType<Record<string, any[]>>,
|
||||
default: () => ({})
|
||||
}
|
||||
})
|
||||
const emit = defineEmits(['success', 'close'])
|
||||
const formRef = shallowRef<FormInstance>()
|
||||
const popupRef = shallowRef<InstanceType<typeof Popup>>()
|
||||
const mode = ref('add')
|
||||
const showDialog = ref(false)
|
||||
const showDialog1 = ref(false)
|
||||
|
||||
const customEvent = (e: any) => {
|
||||
formData.customer_id = e.id;
|
||||
custom_name.value = e.name;
|
||||
showDialog.value = false;
|
||||
};
|
||||
const customEvent1 = (e: any) => {
|
||||
formData.contract_id = e.id;
|
||||
project_name.value = e.project_name;
|
||||
project_code.value = e.project_code;
|
||||
contract_name.value = e.contract_name;
|
||||
contract_no.value = e.contract_code
|
||||
project_amount.value = e.amount
|
||||
|
||||
showDialog1.value = false;
|
||||
};
|
||||
// 弹窗标题
|
||||
const popupTitle = computed(() => {
|
||||
return mode.value == 'edit' ? '编辑资产领用表' : '新增资产领用表'
|
||||
})
|
||||
|
||||
// 表单数据
|
||||
const formData = reactive({
|
||||
id: '',
|
||||
customer_id: '',
|
||||
contract_id: '',
|
||||
approve_id: '',
|
||||
invoicing_date: "",
|
||||
period: "",
|
||||
accumulate_amount: '',
|
||||
accumulated_payments_received: '',
|
||||
tax_rate: "",
|
||||
invoice_type: '',
|
||||
invoicing_amount: '',
|
||||
invoicing_amount_daxie: "",
|
||||
tax: '',
|
||||
amount_including_tax: '',
|
||||
content: "",
|
||||
invoice_no: "",
|
||||
remark: "",
|
||||
annex: "",
|
||||
invoicing_company_name: "",
|
||||
taxpayer_identification_number: "",
|
||||
deposit_bank: "",
|
||||
bank_accnout: "",
|
||||
address_phone: "",
|
||||
receiving_address: "",
|
||||
contacts: "",
|
||||
phone: "",
|
||||
mailing_time: "",
|
||||
mailing_type: "",
|
||||
mailing_no: ""
|
||||
})
|
||||
|
||||
|
||||
// 表单验证
|
||||
const formRules = reactive<any>({
|
||||
|
||||
})
|
||||
|
||||
|
||||
// 获取详情
|
||||
const setFormData = async (data: Record<any, any>) => {
|
||||
if (data.annex && data.annex.length > 0) {
|
||||
|
||||
const arry1 = data.annex.map((item: any, index: any) => {
|
||||
return {
|
||||
name: `文件${index + 1}`,
|
||||
uri: item
|
||||
};
|
||||
});
|
||||
Object.assign(formDataannex, arry1)
|
||||
|
||||
}
|
||||
|
||||
if (data.dept_id) {
|
||||
getlist1(data.org_id)
|
||||
}
|
||||
for (const key in formData) {
|
||||
if (data[key] != null && data[key] != undefined) {
|
||||
//@ts-ignore
|
||||
formData[key] = data[key]
|
||||
}
|
||||
}
|
||||
if (formData.invoicing_amount) {
|
||||
toChinesNum(formData.invoicing_amount)
|
||||
}
|
||||
custom_name.value = data.custom.name
|
||||
project_name.value = data.contract_name;
|
||||
project_code.value = data.contract_code
|
||||
project_amount.value = data.contract.amount
|
||||
contract_name.value = data.contract.contract_name;
|
||||
contract_no.value = data.contract.contract_code
|
||||
|
||||
|
||||
}
|
||||
const getDetail = async (row: Record<string, any>) => {
|
||||
const data = await apiinvoiceapplyDetail({
|
||||
id: row.id
|
||||
})
|
||||
setFormData(data)
|
||||
}
|
||||
|
||||
|
||||
// 提交按钮
|
||||
const handleSubmit = async () => {
|
||||
if (formDataannex.length > 0) {
|
||||
formData.annex = JSON.stringify(formDataannex.map((item: any) => item.uri))
|
||||
}
|
||||
|
||||
console.log(formRef.value?.validate(), '22222222')
|
||||
await formRef.value?.validate()
|
||||
|
||||
|
||||
const data = { ...formData }
|
||||
mode.value == 'edit'
|
||||
? await apiinvoiceapplyEdit(data)
|
||||
: await apiinvoiceapplyAdd(data)
|
||||
popupRef.value?.close()
|
||||
emit('success')
|
||||
}
|
||||
|
||||
//打开弹窗
|
||||
const open = (type = 'add') => {
|
||||
mode.value = type
|
||||
popupRef.value?.open()
|
||||
getlist()
|
||||
|
||||
}
|
||||
|
||||
// 关闭回调
|
||||
const handleClose = () => {
|
||||
emit('close')
|
||||
}
|
||||
|
||||
|
||||
|
||||
defineExpose({
|
||||
open,
|
||||
setFormData,
|
||||
getDetail
|
||||
})
|
||||
</script>
|
185
src/views/AssetManagement/Asset acquisition/index.vue
Normal file
185
src/views/AssetManagement/Asset acquisition/index.vue
Normal file
@ -0,0 +1,185 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-card class="!border-none mb-4" shadow="never">
|
||||
<el-form class="mb-[-16px]" :model="queryParams" inline>
|
||||
<el-form-item label="开票公司名称" prop="invoicing_company_name">
|
||||
<el-input class="w-[280px]" v-model="queryParams.invoicing_company_name" clearable placeholder="请输入开票公司名称" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="客户" prop="customer_id">
|
||||
<el-select class="w-[280px]" v-model="queryParams.customer_id" clearable placeholder="请选择客户">
|
||||
<el-option label="全部" value=""></el-option>
|
||||
<el-option v-for="(item, i) in list1" :key="i" :label="item.name" :value="item.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="合同" prop="contract_id">
|
||||
<el-select class="w-[280px]" v-model="queryParams.contract_id" clearable placeholder="请选择合同">
|
||||
<el-option label="全部" value=""></el-option>
|
||||
<el-option v-for="(item, index) in list" :key="index" :label="item.contract_name" :value="item.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="resetPage">查询</el-button>
|
||||
<el-button @click="resetParams">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-card>
|
||||
<el-card class="!border-none" v-loading="pager.loading" shadow="never">
|
||||
<el-button v-perms="['InvoicingRequests.InvoicingRequests/add']" type="primary" @click="handleAdd">
|
||||
<template #icon>
|
||||
<icon name="el-icon-Plus" />
|
||||
</template>
|
||||
新增
|
||||
</el-button>
|
||||
<el-button v-perms="['InvoicingRequests.InvoicingRequests/delete']" :disabled="!selectData.length" @click="handleDelete(selectData)">
|
||||
删除
|
||||
</el-button>
|
||||
|
||||
<div class="mt-4">
|
||||
<el-table :data="pager.lists" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column label="序号" type="index" width="55" />
|
||||
<el-table-column label="资产领用单号" prop="customer_name" show-overflow-tooltip />
|
||||
<el-table-column label="项目名称" prop="customer_name" show-overflow-tooltip />
|
||||
<el-table-column label="领用人" prop="project_code" show-overflow-tooltip />
|
||||
<el-table-column label="领用日期" prop="tax" show-overflow-tooltip />
|
||||
<el-table-column label="资产序列号" prop="tax" show-overflow-tooltip />
|
||||
<el-table-column label="资产名称 " prop="tax" show-overflow-tooltip />
|
||||
<el-table-column label="资产类别" prop="tax" show-overflow-tooltip />
|
||||
<el-table-column label="规格型号" prop="tax" show-overflow-tooltip />
|
||||
<el-table-column label="计量单位 " prop="tax" show-overflow-tooltip />
|
||||
<el-table-column label="生产厂家" prop="tax" show-overflow-tooltip />
|
||||
<el-table-column label="出厂日期" prop="tax" show-overflow-tooltip />
|
||||
<el-table-column label="存放地址 " prop="tax" show-overflow-tooltip />
|
||||
<el-table-column label="预计使用天数" prop="project_name" show-overflow-tooltip />
|
||||
<el-table-column label="备注" prop="invoicing_date" show-overflow-tooltip />
|
||||
<el-table-column label="是否归还" prop="tax" show-overflow-tooltip />
|
||||
|
||||
<el-table-column label="操作" width="160" fixed="right">
|
||||
<template #default="{ row }">
|
||||
<el-button v-perms="['InvoicingRequests.InvoicingRequests/edit']" type="primary" link @click="handleEdit(row)">
|
||||
编辑
|
||||
</el-button>
|
||||
<el-button v-perms="['InvoicingRequests.InvoicingRequests/delete']" type="danger" link @click="handleDelete(row.id)">
|
||||
删除
|
||||
</el-button>
|
||||
<el-button v-perms="['InvoicingRequests.InvoicingRequests/detail']" link @click="handledetail(row)">
|
||||
详情
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<div class="flex justify-end mt-4">
|
||||
<pagination v-model="pager" @change="getLists" />
|
||||
</div>
|
||||
</el-card>
|
||||
<edit-popup v-if="showEdit" ref="editRef" :dict-data="dictData" @success="getLists" @close="showEdit = false" />
|
||||
<detail-popup v-if="showDtail" ref="detailRef" :dict-data="dictData" @close="showDtail = false" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup name="projectLists">
|
||||
import { usePaging } from '@/hooks/usePaging'
|
||||
import { useDictData } from '@/hooks/useDictOptions'
|
||||
import { apiinvoiceapplyLists, apiinvoiceapplyDelete, apiinvoiceapplyDetail } from '@/api/InvoicingRequests'
|
||||
import { timeFormat } from '@/utils/util'
|
||||
import { apiContractLists } from '@/api/contract'
|
||||
import { apiCustomLists } from '@/api/custom'
|
||||
import { getAllProjectTypes } from '@/api/projecttype'
|
||||
const protype = reactive([])
|
||||
import feedback from '@/utils/feedback'
|
||||
import EditPopup from './edit.vue'
|
||||
import DetailPopup from './detail.vue'
|
||||
const detailRef = shallowRef<InstanceType<typeof DetailPopup>>()
|
||||
const editRef = shallowRef<InstanceType<typeof EditPopup>>()
|
||||
// 是否显示编辑框
|
||||
const showEdit = ref(false)
|
||||
|
||||
const showDtail = ref(false)
|
||||
|
||||
const list = ref([])
|
||||
const list1 = ref([])
|
||||
|
||||
// 查询条件
|
||||
const queryParams = reactive({
|
||||
invoicing_company_name: '',
|
||||
contract_id: '',
|
||||
customer_id: '',
|
||||
|
||||
|
||||
})
|
||||
|
||||
// 选中数据
|
||||
const selectData = ref<any[]>([])
|
||||
|
||||
// 表格选择后回调事件
|
||||
const handleSelectionChange = (val: any[]) => {
|
||||
selectData.value = val.map(({ id }) => id)
|
||||
}
|
||||
|
||||
// 获取字典数据
|
||||
const { dictData } = useDictData('pay_period,invoice_type')
|
||||
|
||||
// 分页相关
|
||||
const { pager, getLists, resetParams, resetPage } = usePaging({
|
||||
fetchFun: apiinvoiceapplyLists,
|
||||
params: queryParams
|
||||
})
|
||||
|
||||
// 添加
|
||||
const handleAdd = async () => {
|
||||
showEdit.value = true
|
||||
await nextTick()
|
||||
editRef.value?.open('add')
|
||||
}
|
||||
|
||||
// 编辑
|
||||
const handleEdit = async (data: any) => {
|
||||
let res = await apiinvoiceapplyDetail({ id: data.id })
|
||||
showEdit.value = true
|
||||
await nextTick()
|
||||
editRef.value?.open('edit')
|
||||
editRef.value?.setFormData(res)
|
||||
}
|
||||
|
||||
// 删除
|
||||
const handleDelete = async (id: number | any[]) => {
|
||||
await feedback.confirm('确定要删除?')
|
||||
await apiinvoiceapplyDelete({ id })
|
||||
getLists()
|
||||
}
|
||||
//详情
|
||||
const handledetail = async (data: any) => {
|
||||
let res = await apiinvoiceapplyDetail({ id: data.id })
|
||||
showDtail.value = true
|
||||
await nextTick()
|
||||
detailRef.value?.open()
|
||||
detailRef.value?.setFormData(res)
|
||||
}
|
||||
|
||||
//获取客户
|
||||
const getlist1 = () => {
|
||||
apiContractLists().then((res) => {
|
||||
list.value = res.lists
|
||||
})
|
||||
}
|
||||
|
||||
//获取合同
|
||||
const getlist2 = () => {
|
||||
apiCustomLists().then((res) => {
|
||||
// console.log(res)
|
||||
list1.value = res.lists
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
getlist1()
|
||||
getlist2()
|
||||
|
||||
|
||||
getLists()
|
||||
</script>
|
||||
|
283
src/views/AssetManagement/Asset depreciation/detail.vue
Normal file
283
src/views/AssetManagement/Asset depreciation/detail.vue
Normal file
@ -0,0 +1,283 @@
|
||||
|
||||
<template>
|
||||
<div class="detail-popup">
|
||||
<popup ref="popupRef" title="开票申请详情" :async="true" width="80%" @confirm="handleSubmit" @close="handleClose">
|
||||
<el-form ref="formRef" :model="formData" label-width="160px">
|
||||
<el-card class="mb-2">
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="项目名称">
|
||||
{{ formData.project_name }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="客户名称">
|
||||
{{ formData.custom.name }}
|
||||
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="项目编码">
|
||||
{{ formData.project_code
|
||||
}}
|
||||
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="合同编号">
|
||||
{{ formData.contract.contract_name }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="合同名称">
|
||||
{{ formData.contract ? formData.contract.contract_code : '暂无数据' }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="合同金额">
|
||||
{{ formData.contract.amount
|
||||
}}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="期次">
|
||||
<dict-value :options="dictData.pay_period" :value="formData.period" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="累计开票金额">
|
||||
{{ formData.accumulate_amount }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="累计回款金额">
|
||||
{{ formData.accumulated_payments_received }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="税率">
|
||||
{{ formData.tax_rate }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="发票类型">
|
||||
|
||||
<dict-value :options="dictData.invoice_type" :value="formData.invoice_type" />
|
||||
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="开票金额(含税)">
|
||||
{{ formData.invoicing_amount }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="金额大写">
|
||||
{{ formData.invoicing_amount_daxie }}
|
||||
</el-form-item>
|
||||
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="开票金额(税额)">
|
||||
{{ formData.invoicing_amount }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="开票金额(非税)">
|
||||
{{ formData.amount_including_tax }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="开票内容">
|
||||
{{ formData.content }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="发票编号">
|
||||
{{ formData.invoice_no }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="开票公司名称">
|
||||
{{ formData.invoicing_company_name }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="纳税人识别号">
|
||||
{{ formData.taxpayer_identification_number }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="开户银行">
|
||||
{{ formData.deposit_bank }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="账号">
|
||||
{{ formData.bank_accnout }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="开户地址及电话">
|
||||
{{ formData.address_phone }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="收票地址">
|
||||
{{ formData.receiving_address }}
|
||||
</el-form-item>
|
||||
</el-col> <el-col :span="8">
|
||||
<el-form-item label="联系人">
|
||||
{{ formData.contacts }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="联系电话">
|
||||
{{ formData.phone }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="邮寄时间">
|
||||
{{ formData.mailing_time }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="邮寄方式">
|
||||
{{ formData.mailing_type }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="邮寄单号">
|
||||
{{ formData.mailing_no }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="备注">
|
||||
{{ formData.remark }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="附件">
|
||||
<div v-for="(item, index) in formDataannex" style="margin-left: 5px;display: block;">
|
||||
<a style="margin-left: 10px; color: #4a5dff; align-self: flex-start" :href="item.uri" target="_blank">{{ item.name }}</a>
|
||||
<span style="cursor: pointer;margin-left: 5px;" @click="delFileFn(index)">x</span>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
|
||||
</el-row>
|
||||
</el-card>
|
||||
</el-form>
|
||||
</popup>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup name="customdetail">
|
||||
|
||||
import type { FormInstance } from 'element-plus'
|
||||
import Popup from '@/components/popup/index.vue'
|
||||
import { apiCustomDetail } from '@/api/custom'
|
||||
import { timeFormat } from '@/utils/util'
|
||||
import type { PropType } from 'vue'
|
||||
defineProps({
|
||||
dictData: {
|
||||
type: Object as PropType<Record<string, any[]>>,
|
||||
default: () => ({})
|
||||
}
|
||||
})
|
||||
const emit = defineEmits(['success', 'close'])
|
||||
const formRef = shallowRef<FormInstance>()
|
||||
const popupRef = shallowRef<InstanceType<typeof Popup>>()
|
||||
const formDataannex = reactive([])
|
||||
const datas = reactive({
|
||||
provinceOptions: [],
|
||||
cityOptions: [],
|
||||
areaOptions: [],
|
||||
});
|
||||
|
||||
|
||||
// 表单数据
|
||||
const formData = reactive({
|
||||
|
||||
})
|
||||
|
||||
|
||||
|
||||
|
||||
// 获取详情
|
||||
const setFormData = async (data: Record<any, any>) => {
|
||||
if (data.annex && data.annex.length > 0) {
|
||||
|
||||
const arry1 = data.annex.map((item: any, index: any) => {
|
||||
return {
|
||||
name: `文件${index + 1}`,
|
||||
uri: item
|
||||
};
|
||||
});
|
||||
Object.assign(formDataannex, arry1)
|
||||
|
||||
}
|
||||
|
||||
// for (const key in formData) {
|
||||
// if (data[key] != null && data[key] != undefined) {
|
||||
// //@ts-ignore
|
||||
// formData[key] = data[key]
|
||||
|
||||
// }
|
||||
|
||||
// }
|
||||
|
||||
Object.assign(formData, data)
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
const getDetail = async (row: Record<string, any>) => {
|
||||
const data = await apiCustomDetail({
|
||||
id: formData.id
|
||||
})
|
||||
setFormData(data)
|
||||
}
|
||||
|
||||
|
||||
// 提交按钮
|
||||
const handleSubmit = async () => {
|
||||
popupRef.value?.close()
|
||||
|
||||
}
|
||||
|
||||
//打开弹窗
|
||||
const open = () => {
|
||||
console.log('1111111')
|
||||
popupRef.value?.open()
|
||||
}
|
||||
|
||||
// 关闭回调
|
||||
const handleClose = () => {
|
||||
emit('close')
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
defineExpose({
|
||||
open,
|
||||
setFormData,
|
||||
getDetail
|
||||
})
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.tit {
|
||||
font-size: 1.2em;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
</style>
|
395
src/views/AssetManagement/Asset depreciation/edit.vue
Normal file
395
src/views/AssetManagement/Asset depreciation/edit.vue
Normal file
@ -0,0 +1,395 @@
|
||||
<template>
|
||||
<div class="edit-popup">
|
||||
|
||||
<popup ref="popupRef" :title="popupTitle" :async="true" width="80%" @confirm="handleSubmit" @close="handleClose">
|
||||
<el-steps :active="active" align-center style="margin-bottom: 20px;">
|
||||
<el-step title="提交申请" description="Some description" />
|
||||
<el-step title="财务审核" description="Some description" />
|
||||
|
||||
</el-steps>
|
||||
<div style="display: flex; flex-direction: row-reverse; justify-content: flex-start;margin-bottom: 30px;">
|
||||
|
||||
<el-select class="w-[180px]" v-model="formData.dept_id" clearable placeholder="请选择部门">
|
||||
<el-option v-for="(item, index) in list2" :key="index" :label="item.name" :value="item.id" />
|
||||
</el-select>
|
||||
<el-select class="w-[180px]" v-model="formData.org_id" clearable placeholder="请选择组织" @change="deptrmt">
|
||||
<el-option v-for="(item, index) in list1" :key="index" :label="item.name" :value="item.id" />
|
||||
</el-select>
|
||||
</div>
|
||||
|
||||
<el-form ref="formRef" :model="formData" label-width="auto" :rules="formRules">
|
||||
<el-row :gutter="10">
|
||||
|
||||
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="折旧日期" prop="invoicing_date" :rules="[{ required: true, message: '不可为空', trigger: 'change' }]">
|
||||
|
||||
<el-date-picker class="flex-1 !flex" v-model="formData.invoicing_date" clearable type="datetime" value-format="YYYY-MM-DD HH:mm:ss" placeholder="选择 <el-form-item label=" 折旧日期" prop="invoicing_date" :rules="[{ required: true, message: '不可为空', trigger: 'change' }]">
|
||||
">
|
||||
</el-date-picker>
|
||||
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="折旧人" prop="contract_id">
|
||||
<el-input v-model="project_name" clearable disabled placeholder="系统自动填写" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="formData.remark" type="textarea" clearable placeholder="请输入备注" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<!-- <el-form-item label="附件" prop="annex">
|
||||
<el-input v-model="formData.annex" clearable placeholder="请输入附件" />
|
||||
</el-form-item> -->
|
||||
<el-form-item label="附件" prop="field127">
|
||||
<el-upload accept="doc, docx, xls, xlsx, ppt, pptx, pdf, txt, zip, rar, tar, jpg, png, gif, jpeg, webp, wmv, avi, mpg, mpeg, 3gp, mov, mp4, flv, f4v, rmvb, mkv" class="upload-demo" :show-file-list="false" aria-hidden="true" :headers="{ Token: userStore.token }" :action="base_url + '/upload/file'" :on-success="handleAvatarSuccess_four" ref="upload">
|
||||
<el-button type="primary">
|
||||
上传
|
||||
</el-button>
|
||||
</el-upload>
|
||||
|
||||
<div>
|
||||
<div v-for="(item, index) in formDataannex" style="margin-left: 5px;display: block;">
|
||||
<a style="margin-left: 10px; color: #4a5dff; align-self: flex-start" :href="item.uri" target="_blank">{{ item.name }}</a>
|
||||
<span style="cursor: pointer;margin-left: 5px;" @click="delFileFn(index)">x</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div style="margin: 20px 0;">资产折旧明细</div>
|
||||
|
||||
<el-row>
|
||||
|
||||
<el-table :data="tablist1">
|
||||
<el-table-column label="序号">
|
||||
<template #default="{ row }">
|
||||
<el-button @click="handleAdd(row)">+</el-button>
|
||||
<el-button @click="handleDelete(row)">-</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="资产序列号" prop="name1">
|
||||
<template #default="{ row, $index }">
|
||||
<el-input v-model="row.name1" readonly @click="subjectmu(row, $index)" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="资产名称" prop="remark">
|
||||
<template #default="{ row }">
|
||||
<el-input v-model="row.remark" /> </template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="规格型号" prop="remark">
|
||||
<template #default="{ row }">
|
||||
<el-input v-model="row.remark" /> </template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="计量单位" prop="remark">
|
||||
<template #default="{ row }">
|
||||
<el-input v-model="row.remark" /> </template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="出厂日期" prop="remark">
|
||||
<template #default="{ row }">
|
||||
<el-input v-model="row.remark" /> </template>
|
||||
</el-table-column>
|
||||
<el-table-column label="资产金额" prop="remark">
|
||||
<template #default="{ row }">
|
||||
<el-input v-model="row.remark" /> </template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="期初折旧" prop="remark">
|
||||
<template #default="{ row }">
|
||||
<el-input v-model="row.remark" /> </template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="累计折旧" prop="remark">
|
||||
<template #default="{ row }">
|
||||
<el-input v-model="row.remark" /> </template>
|
||||
</el-table-column>
|
||||
<el-table-column label="净值金额" prop="remark">
|
||||
<template #default="{ row }">
|
||||
<el-input v-model="row.remark" /> </template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="折旧率(%) " prop="remark">
|
||||
<template #default="{ row }">
|
||||
<el-input v-model="row.remark" /> </template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="本次折旧金额" prop="remark">
|
||||
<template #default="{ row }">
|
||||
<el-input v-model="row.remark" /> </template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="备注" prop="remark">
|
||||
<template #default="{ row }">
|
||||
<el-input v-model="row.remark" /> </template>
|
||||
</el-table-column>
|
||||
|
||||
|
||||
</el-table>
|
||||
|
||||
|
||||
</el-row>
|
||||
|
||||
<el-dialog v-model="showDialog1" title="选择项目" width="70%">
|
||||
<projectDialog @customEvent="customEvent1" contract_type="2"></projectDialog>
|
||||
</el-dialog>
|
||||
</el-form>
|
||||
</popup>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup name="projectEdit">
|
||||
import type { FormInstance } from 'element-plus'
|
||||
import Popup from '@/components/popup/index.vue'
|
||||
import { toChinesNum } from "@/utils/util";
|
||||
import projectDialog from '@/components/project/index.vue'
|
||||
import { apiinvoiceapplyAdd, apiinvoiceapplyEdit, apiinvoiceapplyDetail } from '@/api/InvoicingRequests'
|
||||
import { getAllProjectTypes } from '@/api/projecttype'
|
||||
import { timeFormat } from '@/utils/util'
|
||||
import { isEmail, isIdCard, isPhone } from '@/utils/validate'
|
||||
import type { PropType } from 'vue'
|
||||
import configs from "@/config"
|
||||
import useUserStore from "@/stores/modules/user";
|
||||
const base_url = configs.baseUrl + configs.urlPrefix
|
||||
const userStore = useUserStore();
|
||||
const active = ref(0)
|
||||
const formDataannex = reactive([])
|
||||
const contract_name = ref('')
|
||||
const project_name = ref('')
|
||||
const project_code = ref('')
|
||||
const project_amount = ref('')
|
||||
const contract_no = ref('')
|
||||
const custom_name = ref('')
|
||||
const tablist1 = reactive([{}])
|
||||
const list1 = reactive([])
|
||||
const list2 = reactive([])
|
||||
import { deptAll } from '@/api/org/department'
|
||||
import { getAll } from '@/api/org/organization'
|
||||
const next = () => {
|
||||
if (active.value++ > 3) active.value = 0
|
||||
}
|
||||
// 上传文件
|
||||
const handleAvatarSuccess_four = (
|
||||
response,
|
||||
uploadFile
|
||||
) => {
|
||||
if (response.code == 0) {
|
||||
ElMessage.error(response.msg);
|
||||
return;
|
||||
}
|
||||
formDataannex.push(
|
||||
{ uri: response.data.uri, name: response.data.name }
|
||||
|
||||
|
||||
);
|
||||
};
|
||||
|
||||
const handleAdd = (row: any) => {
|
||||
// 在 row 后面插入一行数据
|
||||
const index = tablist1.indexOf(row);
|
||||
tablist1.splice(index + 1, 0, {});
|
||||
};
|
||||
|
||||
const handleDelete = (row: any) => {
|
||||
// 删除 row
|
||||
const index = tablist1.indexOf(row);
|
||||
tablist1.splice(index, 1);
|
||||
};
|
||||
//获取所有组织
|
||||
const getlist = () => {
|
||||
getAll().then((res) => {
|
||||
Object.assign(list1, res)
|
||||
if (res.length > 0 && !formData.org_id) {
|
||||
formData.org_id = res[0].id
|
||||
deptAll({ 'org_id': res[0].id }).then((res) => {
|
||||
if (res.length > 0) {
|
||||
Object.assign(list2, res)
|
||||
formData.dept_id = res[0].id
|
||||
}
|
||||
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
//获取部门
|
||||
const deptrmt = (e: any) => {
|
||||
formData.dept_id = ''
|
||||
getlist1(e)
|
||||
|
||||
}
|
||||
//获取所有部门
|
||||
const getlist1 = (id: any) => {
|
||||
deptAll({ 'org_id': id }).then((res) => {
|
||||
list2.splice(0, list2.length, ...res)
|
||||
})
|
||||
}
|
||||
|
||||
// 删除上传的文件
|
||||
const delFileFn = (index: number) => {
|
||||
formDataannex.splice(index, 1)
|
||||
}
|
||||
defineProps({
|
||||
dictData: {
|
||||
type: Object as PropType<Record<string, any[]>>,
|
||||
default: () => ({})
|
||||
}
|
||||
})
|
||||
const emit = defineEmits(['success', 'close'])
|
||||
const formRef = shallowRef<FormInstance>()
|
||||
const popupRef = shallowRef<InstanceType<typeof Popup>>()
|
||||
const mode = ref('add')
|
||||
const showDialog = ref(false)
|
||||
const showDialog1 = ref(false)
|
||||
|
||||
const customEvent = (e: any) => {
|
||||
formData.customer_id = e.id;
|
||||
custom_name.value = e.name;
|
||||
showDialog.value = false;
|
||||
};
|
||||
const customEvent1 = (e: any) => {
|
||||
formData.contract_id = e.id;
|
||||
project_name.value = e.project_name;
|
||||
project_code.value = e.project_code;
|
||||
contract_name.value = e.contract_name;
|
||||
contract_no.value = e.contract_code
|
||||
project_amount.value = e.amount
|
||||
|
||||
showDialog1.value = false;
|
||||
};
|
||||
// 弹窗标题
|
||||
const popupTitle = computed(() => {
|
||||
return mode.value == 'edit' ? '编辑资产折旧表' : '新增资产折旧表'
|
||||
})
|
||||
|
||||
// 表单数据
|
||||
const formData = reactive({
|
||||
id: '',
|
||||
customer_id: '',
|
||||
contract_id: '',
|
||||
approve_id: '',
|
||||
invoicing_date: "",
|
||||
period: "",
|
||||
accumulate_amount: '',
|
||||
accumulated_payments_received: '',
|
||||
tax_rate: "",
|
||||
invoice_type: '',
|
||||
invoicing_amount: '',
|
||||
invoicing_amount_daxie: "",
|
||||
tax: '',
|
||||
amount_including_tax: '',
|
||||
content: "",
|
||||
invoice_no: "",
|
||||
remark: "",
|
||||
annex: "",
|
||||
invoicing_company_name: "",
|
||||
taxpayer_identification_number: "",
|
||||
deposit_bank: "",
|
||||
bank_accnout: "",
|
||||
address_phone: "",
|
||||
receiving_address: "",
|
||||
contacts: "",
|
||||
phone: "",
|
||||
mailing_time: "",
|
||||
mailing_type: "",
|
||||
mailing_no: ""
|
||||
})
|
||||
|
||||
|
||||
// 表单验证
|
||||
const formRules = reactive<any>({
|
||||
|
||||
})
|
||||
|
||||
|
||||
// 获取详情
|
||||
const setFormData = async (data: Record<any, any>) => {
|
||||
if (data.annex && data.annex.length > 0) {
|
||||
|
||||
const arry1 = data.annex.map((item: any, index: any) => {
|
||||
return {
|
||||
name: `文件${index + 1}`,
|
||||
uri: item
|
||||
};
|
||||
});
|
||||
Object.assign(formDataannex, arry1)
|
||||
|
||||
}
|
||||
|
||||
if (data.dept_id) {
|
||||
getlist1(data.org_id)
|
||||
}
|
||||
for (const key in formData) {
|
||||
if (data[key] != null && data[key] != undefined) {
|
||||
//@ts-ignore
|
||||
formData[key] = data[key]
|
||||
}
|
||||
}
|
||||
if (formData.invoicing_amount) {
|
||||
toChinesNum(formData.invoicing_amount)
|
||||
}
|
||||
custom_name.value = data.custom.name
|
||||
project_name.value = data.contract_name;
|
||||
project_code.value = data.contract_code
|
||||
project_amount.value = data.contract.amount
|
||||
contract_name.value = data.contract.contract_name;
|
||||
contract_no.value = data.contract.contract_code
|
||||
|
||||
|
||||
}
|
||||
const getDetail = async (row: Record<string, any>) => {
|
||||
const data = await apiinvoiceapplyDetail({
|
||||
id: row.id
|
||||
})
|
||||
setFormData(data)
|
||||
}
|
||||
|
||||
|
||||
// 提交按钮
|
||||
const handleSubmit = async () => {
|
||||
if (formDataannex.length > 0) {
|
||||
formData.annex = JSON.stringify(formDataannex.map((item: any) => item.uri))
|
||||
}
|
||||
|
||||
console.log(formRef.value?.validate(), '22222222')
|
||||
await formRef.value?.validate()
|
||||
|
||||
|
||||
const data = { ...formData }
|
||||
mode.value == 'edit'
|
||||
? await apiinvoiceapplyEdit(data)
|
||||
: await apiinvoiceapplyAdd(data)
|
||||
popupRef.value?.close()
|
||||
emit('success')
|
||||
}
|
||||
|
||||
//打开弹窗
|
||||
const open = (type = 'add') => {
|
||||
mode.value = type
|
||||
popupRef.value?.open()
|
||||
getlist()
|
||||
|
||||
}
|
||||
|
||||
// 关闭回调
|
||||
const handleClose = () => {
|
||||
emit('close')
|
||||
}
|
||||
|
||||
|
||||
|
||||
defineExpose({
|
||||
open,
|
||||
setFormData,
|
||||
getDetail
|
||||
})
|
||||
</script>
|
179
src/views/AssetManagement/Asset depreciation/index.vue
Normal file
179
src/views/AssetManagement/Asset depreciation/index.vue
Normal file
@ -0,0 +1,179 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-card class="!border-none mb-4" shadow="never">
|
||||
<el-form class="mb-[-16px]" :model="queryParams" inline>
|
||||
<el-form-item label="开票公司名称" prop="invoicing_company_name">
|
||||
<el-input class="w-[280px]" v-model="queryParams.invoicing_company_name" clearable placeholder="请输入开票公司名称" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="客户" prop="customer_id">
|
||||
<el-select class="w-[280px]" v-model="queryParams.customer_id" clearable placeholder="请选择客户">
|
||||
<el-option label="全部" value=""></el-option>
|
||||
<el-option v-for="(item, i) in list1" :key="i" :label="item.name" :value="item.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="合同" prop="contract_id">
|
||||
<el-select class="w-[280px]" v-model="queryParams.contract_id" clearable placeholder="请选择合同">
|
||||
<el-option label="全部" value=""></el-option>
|
||||
<el-option v-for="(item, index) in list" :key="index" :label="item.contract_name" :value="item.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="resetPage">查询</el-button>
|
||||
<el-button @click="resetParams">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-card>
|
||||
<el-card class="!border-none" v-loading="pager.loading" shadow="never">
|
||||
<el-button v-perms="['InvoicingRequests.InvoicingRequests/add']" type="primary" @click="handleAdd">
|
||||
<template #icon>
|
||||
<icon name="el-icon-Plus" />
|
||||
</template>
|
||||
新增
|
||||
</el-button>
|
||||
<el-button v-perms="['InvoicingRequests.InvoicingRequests/delete']" :disabled="!selectData.length" @click="handleDelete(selectData)">
|
||||
删除
|
||||
</el-button>
|
||||
|
||||
<div class="mt-4">
|
||||
<el-table :data="pager.lists" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column label="序号" type="index" width="55" />
|
||||
<el-table-column label="处理流程" prop="customer_name" show-overflow-tooltip />
|
||||
<el-table-column label="流程步骤" prop="customer_name" show-overflow-tooltip />
|
||||
<el-table-column label="资产申请单号" prop="project_code" show-overflow-tooltip />
|
||||
<el-table-column label="组织名称" prop="project_name" show-overflow-tooltip />
|
||||
<el-table-column label="部门名称" prop="invoicing_date" show-overflow-tooltip />
|
||||
<el-table-column label="申请人" prop="tax" show-overflow-tooltip />
|
||||
<el-table-column label="申请日期" prop="tax" show-overflow-tooltip />
|
||||
<el-table-column label="希望到货日期" prop="tax" show-overflow-tooltip />
|
||||
<el-table-column label="备注" prop="tax" show-overflow-tooltip />
|
||||
<el-table-column label="附件" prop="tax" show-overflow-tooltip />
|
||||
<el-table-column label="操作" width="160" fixed="right">
|
||||
<template #default="{ row }">
|
||||
<el-button v-perms="['InvoicingRequests.InvoicingRequests/edit']" type="primary" link @click="handleEdit(row)">
|
||||
编辑
|
||||
</el-button>
|
||||
<el-button v-perms="['InvoicingRequests.InvoicingRequests/delete']" type="danger" link @click="handleDelete(row.id)">
|
||||
删除
|
||||
</el-button>
|
||||
<el-button v-perms="['InvoicingRequests.InvoicingRequests/detail']" link @click="handledetail(row)">
|
||||
详情
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<div class="flex justify-end mt-4">
|
||||
<pagination v-model="pager" @change="getLists" />
|
||||
</div>
|
||||
</el-card>
|
||||
<edit-popup v-if="showEdit" ref="editRef" :dict-data="dictData" @success="getLists" @close="showEdit = false" />
|
||||
<detail-popup v-if="showDtail" ref="detailRef" :dict-data="dictData" @close="showDtail = false" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup name="projectLists">
|
||||
import { usePaging } from '@/hooks/usePaging'
|
||||
import { useDictData } from '@/hooks/useDictOptions'
|
||||
import { apiinvoiceapplyLists, apiinvoiceapplyDelete, apiinvoiceapplyDetail } from '@/api/InvoicingRequests'
|
||||
import { timeFormat } from '@/utils/util'
|
||||
import { apiContractLists } from '@/api/contract'
|
||||
import { apiCustomLists } from '@/api/custom'
|
||||
import { getAllProjectTypes } from '@/api/projecttype'
|
||||
const protype = reactive([])
|
||||
import feedback from '@/utils/feedback'
|
||||
import EditPopup from './edit.vue'
|
||||
import DetailPopup from './detail.vue'
|
||||
const detailRef = shallowRef<InstanceType<typeof DetailPopup>>()
|
||||
const editRef = shallowRef<InstanceType<typeof EditPopup>>()
|
||||
// 是否显示编辑框
|
||||
const showEdit = ref(false)
|
||||
|
||||
const showDtail = ref(false)
|
||||
|
||||
const list = ref([])
|
||||
const list1 = ref([])
|
||||
|
||||
// 查询条件
|
||||
const queryParams = reactive({
|
||||
invoicing_company_name: '',
|
||||
contract_id: '',
|
||||
customer_id: '',
|
||||
|
||||
|
||||
})
|
||||
|
||||
// 选中数据
|
||||
const selectData = ref<any[]>([])
|
||||
|
||||
// 表格选择后回调事件
|
||||
const handleSelectionChange = (val: any[]) => {
|
||||
selectData.value = val.map(({ id }) => id)
|
||||
}
|
||||
|
||||
// 获取字典数据
|
||||
const { dictData } = useDictData('pay_period,invoice_type')
|
||||
|
||||
// 分页相关
|
||||
const { pager, getLists, resetParams, resetPage } = usePaging({
|
||||
fetchFun: apiinvoiceapplyLists,
|
||||
params: queryParams
|
||||
})
|
||||
|
||||
// 添加
|
||||
const handleAdd = async () => {
|
||||
showEdit.value = true
|
||||
await nextTick()
|
||||
editRef.value?.open('add')
|
||||
}
|
||||
|
||||
// 编辑
|
||||
const handleEdit = async (data: any) => {
|
||||
let res = await apiinvoiceapplyDetail({ id: data.id })
|
||||
showEdit.value = true
|
||||
await nextTick()
|
||||
editRef.value?.open('edit')
|
||||
editRef.value?.setFormData(res)
|
||||
}
|
||||
|
||||
// 删除
|
||||
const handleDelete = async (id: number | any[]) => {
|
||||
await feedback.confirm('确定要删除?')
|
||||
await apiinvoiceapplyDelete({ id })
|
||||
getLists()
|
||||
}
|
||||
//详情
|
||||
const handledetail = async (data: any) => {
|
||||
let res = await apiinvoiceapplyDetail({ id: data.id })
|
||||
showDtail.value = true
|
||||
await nextTick()
|
||||
detailRef.value?.open()
|
||||
detailRef.value?.setFormData(res)
|
||||
}
|
||||
|
||||
//获取客户
|
||||
const getlist1 = () => {
|
||||
apiContractLists().then((res) => {
|
||||
list.value = res.lists
|
||||
})
|
||||
}
|
||||
|
||||
//获取合同
|
||||
const getlist2 = () => {
|
||||
apiCustomLists().then((res) => {
|
||||
// console.log(res)
|
||||
list1.value = res.lists
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
getlist1()
|
||||
getlist2()
|
||||
|
||||
|
||||
getLists()
|
||||
</script>
|
||||
|
283
src/views/AssetManagement/Asset disposal/detail.vue
Normal file
283
src/views/AssetManagement/Asset disposal/detail.vue
Normal file
@ -0,0 +1,283 @@
|
||||
|
||||
<template>
|
||||
<div class="detail-popup">
|
||||
<popup ref="popupRef" title="开票申请详情" :async="true" width="80%" @confirm="handleSubmit" @close="handleClose">
|
||||
<el-form ref="formRef" :model="formData" label-width="160px">
|
||||
<el-card class="mb-2">
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="项目名称">
|
||||
{{ formData.project_name }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="客户名称">
|
||||
{{ formData.custom.name }}
|
||||
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="项目编码">
|
||||
{{ formData.project_code
|
||||
}}
|
||||
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="合同编号">
|
||||
{{ formData.contract.contract_name }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="合同名称">
|
||||
{{ formData.contract ? formData.contract.contract_code : '暂无数据' }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="合同金额">
|
||||
{{ formData.contract.amount
|
||||
}}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="期次">
|
||||
<dict-value :options="dictData.pay_period" :value="formData.period" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="累计开票金额">
|
||||
{{ formData.accumulate_amount }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="累计回款金额">
|
||||
{{ formData.accumulated_payments_received }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="税率">
|
||||
{{ formData.tax_rate }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="发票类型">
|
||||
|
||||
<dict-value :options="dictData.invoice_type" :value="formData.invoice_type" />
|
||||
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="开票金额(含税)">
|
||||
{{ formData.invoicing_amount }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="金额大写">
|
||||
{{ formData.invoicing_amount_daxie }}
|
||||
</el-form-item>
|
||||
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="开票金额(税额)">
|
||||
{{ formData.invoicing_amount }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="开票金额(非税)">
|
||||
{{ formData.amount_including_tax }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="开票内容">
|
||||
{{ formData.content }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="发票编号">
|
||||
{{ formData.invoice_no }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="开票公司名称">
|
||||
{{ formData.invoicing_company_name }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="纳税人识别号">
|
||||
{{ formData.taxpayer_identification_number }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="开户银行">
|
||||
{{ formData.deposit_bank }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="账号">
|
||||
{{ formData.bank_accnout }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="开户地址及电话">
|
||||
{{ formData.address_phone }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="收票地址">
|
||||
{{ formData.receiving_address }}
|
||||
</el-form-item>
|
||||
</el-col> <el-col :span="8">
|
||||
<el-form-item label="联系人">
|
||||
{{ formData.contacts }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="联系电话">
|
||||
{{ formData.phone }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="邮寄时间">
|
||||
{{ formData.mailing_time }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="邮寄方式">
|
||||
{{ formData.mailing_type }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="邮寄单号">
|
||||
{{ formData.mailing_no }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="备注">
|
||||
{{ formData.remark }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="附件">
|
||||
<div v-for="(item, index) in formDataannex" style="margin-left: 5px;display: block;">
|
||||
<a style="margin-left: 10px; color: #4a5dff; align-self: flex-start" :href="item.uri" target="_blank">{{ item.name }}</a>
|
||||
<span style="cursor: pointer;margin-left: 5px;" @click="delFileFn(index)">x</span>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
|
||||
</el-row>
|
||||
</el-card>
|
||||
</el-form>
|
||||
</popup>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup name="customdetail">
|
||||
|
||||
import type { FormInstance } from 'element-plus'
|
||||
import Popup from '@/components/popup/index.vue'
|
||||
import { apiCustomDetail } from '@/api/custom'
|
||||
import { timeFormat } from '@/utils/util'
|
||||
import type { PropType } from 'vue'
|
||||
defineProps({
|
||||
dictData: {
|
||||
type: Object as PropType<Record<string, any[]>>,
|
||||
default: () => ({})
|
||||
}
|
||||
})
|
||||
const emit = defineEmits(['success', 'close'])
|
||||
const formRef = shallowRef<FormInstance>()
|
||||
const popupRef = shallowRef<InstanceType<typeof Popup>>()
|
||||
const formDataannex = reactive([])
|
||||
const datas = reactive({
|
||||
provinceOptions: [],
|
||||
cityOptions: [],
|
||||
areaOptions: [],
|
||||
});
|
||||
|
||||
|
||||
// 表单数据
|
||||
const formData = reactive({
|
||||
|
||||
})
|
||||
|
||||
|
||||
|
||||
|
||||
// 获取详情
|
||||
const setFormData = async (data: Record<any, any>) => {
|
||||
if (data.annex && data.annex.length > 0) {
|
||||
|
||||
const arry1 = data.annex.map((item: any, index: any) => {
|
||||
return {
|
||||
name: `文件${index + 1}`,
|
||||
uri: item
|
||||
};
|
||||
});
|
||||
Object.assign(formDataannex, arry1)
|
||||
|
||||
}
|
||||
|
||||
// for (const key in formData) {
|
||||
// if (data[key] != null && data[key] != undefined) {
|
||||
// //@ts-ignore
|
||||
// formData[key] = data[key]
|
||||
|
||||
// }
|
||||
|
||||
// }
|
||||
|
||||
Object.assign(formData, data)
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
const getDetail = async (row: Record<string, any>) => {
|
||||
const data = await apiCustomDetail({
|
||||
id: formData.id
|
||||
})
|
||||
setFormData(data)
|
||||
}
|
||||
|
||||
|
||||
// 提交按钮
|
||||
const handleSubmit = async () => {
|
||||
popupRef.value?.close()
|
||||
|
||||
}
|
||||
|
||||
//打开弹窗
|
||||
const open = () => {
|
||||
console.log('1111111')
|
||||
popupRef.value?.open()
|
||||
}
|
||||
|
||||
// 关闭回调
|
||||
const handleClose = () => {
|
||||
emit('close')
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
defineExpose({
|
||||
open,
|
||||
setFormData,
|
||||
getDetail
|
||||
})
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.tit {
|
||||
font-size: 1.2em;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
</style>
|
379
src/views/AssetManagement/Asset disposal/edit.vue
Normal file
379
src/views/AssetManagement/Asset disposal/edit.vue
Normal file
@ -0,0 +1,379 @@
|
||||
<template>
|
||||
<div class="edit-popup">
|
||||
|
||||
<popup ref="popupRef" :title="popupTitle" :async="true" width="80%" @confirm="handleSubmit" @close="handleClose">
|
||||
<el-steps :active="active" align-center style="margin-bottom: 20px;">
|
||||
<el-step title="提交申请" description="Some description" />
|
||||
<el-step title="领导审核" description="Some description" />
|
||||
|
||||
</el-steps>
|
||||
<div style="display: flex; flex-direction: row-reverse; justify-content: flex-start;margin-bottom: 30px;">
|
||||
|
||||
<el-select class="w-[180px]" v-model="formData.dept_id" clearable placeholder="请选择部门">
|
||||
<el-option v-for="(item, index) in list2" :key="index" :label="item.name" :value="item.id" />
|
||||
</el-select>
|
||||
<el-select class="w-[180px]" v-model="formData.org_id" clearable placeholder="请选择组织" @change="deptrmt">
|
||||
<el-option v-for="(item, index) in list1" :key="index" :label="item.name" :value="item.id" />
|
||||
</el-select>
|
||||
</div>
|
||||
|
||||
<el-form ref="formRef" :model="formData" label-width="auto" :rules="formRules">
|
||||
<el-row :gutter="10">
|
||||
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="资产序列号" prop="contract_id">
|
||||
<el-input v-model="project_name" clearable readonly placeholder="点击选择[空闲]状态的资产" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="资产编号" prop="contract_id">
|
||||
<el-input v-model="project_name" clearable disabled placeholder="系统自动填写" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="资产名称" prop="contract_id">
|
||||
<el-input v-model="project_name" clearable disabled placeholder="系统自动填写" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="规格型号" prop="contract_id">
|
||||
<el-input v-model="project_name" clearable disabled placeholder="系统自动填写" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="资产类别" prop="contract_id">
|
||||
<el-input v-model="project_name" clearable disabled placeholder="系统自动填写" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="计量单位" prop="contract_id">
|
||||
<el-input v-model="project_name" clearable disabled placeholder="系统自动填写" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="生产厂家" prop="contract_id">
|
||||
<el-input v-model="project_name" clearable disabled placeholder="系统自动填写" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="资产来源" prop="contract_id">
|
||||
<el-input v-model="project_name" clearable disabled placeholder="系统自动填写" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="预计使用寿命" prop="contract_id">
|
||||
<el-input v-model="project_name" clearable disabled placeholder="系统自动填写" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="存放地址" prop="contract_id">
|
||||
<el-input v-model="project_name" clearable disabled placeholder="系统自动填写" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="出厂日期" prop="invoicing_date" :rules="[{ required: true, message: '不可为空', trigger: 'change' }]">
|
||||
|
||||
<el-date-picker class="flex-1 !flex" v-model="formData.invoicing_date" clearable type="date" value-format="YYYY-MM-DD" placeholder="选择出厂日期">
|
||||
</el-date-picker>
|
||||
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="购入日期" prop="invoicing_date" :rules="[{ required: true, message: '不可为空', trigger: 'change' }]">
|
||||
|
||||
<el-date-picker class="flex-1 !flex" v-model="formData.invoicing_date" clearable type="date" value-format="YYYY-MM-DD" placeholder="选择购入日期">
|
||||
</el-date-picker>
|
||||
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="处置日期" prop="invoicing_date" :rules="[{ required: true, message: '不可为空', trigger: 'change' }]">
|
||||
|
||||
<el-date-picker class="flex-1 !flex" v-model="formData.invoicing_date" clearable type="date" value-format="YYYY-MM-DD" placeholder="选择处置日期">
|
||||
</el-date-picker>
|
||||
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="处置方式" prop="remark">
|
||||
<el-input v-model="formData.remark" type="textarea" clearable placeholder="请输入处置方式" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="处置金额" prop="remark">
|
||||
<el-input v-model="formData.remark" type="textarea" clearable placeholder="请输入处置金额" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="处置原因" prop="remark">
|
||||
<el-input v-model="formData.remark" type="textarea" clearable placeholder="请输入处置原因" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="24">
|
||||
<!-- <el-form-item label="附件" prop="annex">
|
||||
<el-input v-model="formData.annex" clearable placeholder="请输入附件" />
|
||||
</el-form-item> -->
|
||||
<el-form-item label="送修前照片" prop="field127">
|
||||
<el-upload accept="doc, docx, xls, xlsx, ppt, pptx, pdf, txt, zip, rar, tar, jpg, png, gif, jpeg, webp, wmv, avi, mpg, mpeg, 3gp, mov, mp4, flv, f4v, rmvb, mkv" class="upload-demo" :show-file-list="false" aria-hidden="true" :headers="{ Token: userStore.token }" :action="base_url + '/upload/file'" :on-success="handleAvatarSuccess_four" ref="upload">
|
||||
<el-button type="primary">
|
||||
上传
|
||||
</el-button>
|
||||
</el-upload>
|
||||
|
||||
<div>
|
||||
<div v-for="(item, index) in formDataannex" style="margin-left: 5px;display: block;">
|
||||
<a style="margin-left: 10px; color: #4a5dff; align-self: flex-start" :href="item.uri" target="_blank">{{ item.name }}</a>
|
||||
<span style="cursor: pointer;margin-left: 5px;" @click="delFileFn(index)">x</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-dialog v-model="showDialog1" title="选择项目" width="70%">
|
||||
<projectDialog @customEvent="customEvent1" contract_type="2"></projectDialog>
|
||||
</el-dialog>
|
||||
</el-form>
|
||||
</popup>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup name="projectEdit">
|
||||
import type { FormInstance } from 'element-plus'
|
||||
import Popup from '@/components/popup/index.vue'
|
||||
import { toChinesNum } from "@/utils/util";
|
||||
import projectDialog from '@/components/project/index.vue'
|
||||
import { apiinvoiceapplyAdd, apiinvoiceapplyEdit, apiinvoiceapplyDetail } from '@/api/InvoicingRequests'
|
||||
import { getAllProjectTypes } from '@/api/projecttype'
|
||||
import { timeFormat } from '@/utils/util'
|
||||
import { isEmail, isIdCard, isPhone } from '@/utils/validate'
|
||||
import type { PropType } from 'vue'
|
||||
import configs from "@/config"
|
||||
import useUserStore from "@/stores/modules/user";
|
||||
const base_url = configs.baseUrl + configs.urlPrefix
|
||||
const userStore = useUserStore();
|
||||
const active = ref(0)
|
||||
const formDataannex = reactive([])
|
||||
const contract_name = ref('')
|
||||
const project_name = ref('')
|
||||
const project_code = ref('')
|
||||
const project_amount = ref('')
|
||||
const contract_no = ref('')
|
||||
const custom_name = ref('')
|
||||
const list1 = reactive([])
|
||||
const list2 = reactive([])
|
||||
import { deptAll } from '@/api/org/department'
|
||||
import { getAll } from '@/api/org/organization'
|
||||
const next = () => {
|
||||
if (active.value++ > 3) active.value = 0
|
||||
}
|
||||
// 上传文件
|
||||
const handleAvatarSuccess_four = (
|
||||
response,
|
||||
uploadFile
|
||||
) => {
|
||||
if (response.code == 0) {
|
||||
ElMessage.error(response.msg);
|
||||
return;
|
||||
}
|
||||
formDataannex.push(
|
||||
{ uri: response.data.uri, name: response.data.name }
|
||||
|
||||
|
||||
);
|
||||
};
|
||||
|
||||
//获取所有组织
|
||||
const getlist = () => {
|
||||
getAll().then((res) => {
|
||||
Object.assign(list1, res)
|
||||
if (res.length > 0 && !formData.org_id) {
|
||||
formData.org_id = res[0].id
|
||||
deptAll({ 'org_id': res[0].id }).then((res) => {
|
||||
if (res.length > 0) {
|
||||
Object.assign(list2, res)
|
||||
formData.dept_id = res[0].id
|
||||
}
|
||||
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
//获取部门
|
||||
const deptrmt = (e: any) => {
|
||||
formData.dept_id = ''
|
||||
getlist1(e)
|
||||
|
||||
}
|
||||
//获取所有部门
|
||||
const getlist1 = (id: any) => {
|
||||
deptAll({ 'org_id': id }).then((res) => {
|
||||
list2.splice(0, list2.length, ...res)
|
||||
})
|
||||
}
|
||||
|
||||
// 删除上传的文件
|
||||
const delFileFn = (index: number) => {
|
||||
formDataannex.splice(index, 1)
|
||||
}
|
||||
defineProps({
|
||||
dictData: {
|
||||
type: Object as PropType<Record<string, any[]>>,
|
||||
default: () => ({})
|
||||
}
|
||||
})
|
||||
const emit = defineEmits(['success', 'close'])
|
||||
const formRef = shallowRef<FormInstance>()
|
||||
const popupRef = shallowRef<InstanceType<typeof Popup>>()
|
||||
const mode = ref('add')
|
||||
const showDialog = ref(false)
|
||||
const showDialog1 = ref(false)
|
||||
|
||||
const customEvent = (e: any) => {
|
||||
formData.customer_id = e.id;
|
||||
custom_name.value = e.name;
|
||||
showDialog.value = false;
|
||||
};
|
||||
const customEvent1 = (e: any) => {
|
||||
formData.contract_id = e.id;
|
||||
project_name.value = e.project_name;
|
||||
project_code.value = e.project_code;
|
||||
contract_name.value = e.contract_name;
|
||||
contract_no.value = e.contract_code
|
||||
project_amount.value = e.amount
|
||||
|
||||
showDialog1.value = false;
|
||||
};
|
||||
// 弹窗标题
|
||||
const popupTitle = computed(() => {
|
||||
return mode.value == 'edit' ? '编辑资产处置表' : '新增资产处置表'
|
||||
})
|
||||
|
||||
// 表单数据
|
||||
const formData = reactive({
|
||||
id: '',
|
||||
customer_id: '',
|
||||
contract_id: '',
|
||||
approve_id: '',
|
||||
invoicing_date: "",
|
||||
period: "",
|
||||
accumulate_amount: '',
|
||||
accumulated_payments_received: '',
|
||||
tax_rate: "",
|
||||
invoice_type: '',
|
||||
invoicing_amount: '',
|
||||
invoicing_amount_daxie: "",
|
||||
tax: '',
|
||||
amount_including_tax: '',
|
||||
content: "",
|
||||
invoice_no: "",
|
||||
remark: "",
|
||||
annex: "",
|
||||
invoicing_company_name: "",
|
||||
taxpayer_identification_number: "",
|
||||
deposit_bank: "",
|
||||
bank_accnout: "",
|
||||
address_phone: "",
|
||||
receiving_address: "",
|
||||
contacts: "",
|
||||
phone: "",
|
||||
mailing_time: "",
|
||||
mailing_type: "",
|
||||
mailing_no: ""
|
||||
})
|
||||
|
||||
|
||||
// 表单验证
|
||||
const formRules = reactive<any>({
|
||||
|
||||
})
|
||||
|
||||
|
||||
// 获取详情
|
||||
const setFormData = async (data: Record<any, any>) => {
|
||||
if (data.annex && data.annex.length > 0) {
|
||||
|
||||
const arry1 = data.annex.map((item: any, index: any) => {
|
||||
return {
|
||||
name: `文件${index + 1}`,
|
||||
uri: item
|
||||
};
|
||||
});
|
||||
Object.assign(formDataannex, arry1)
|
||||
|
||||
}
|
||||
|
||||
if (data.dept_id) {
|
||||
getlist1(data.org_id)
|
||||
}
|
||||
for (const key in formData) {
|
||||
if (data[key] != null && data[key] != undefined) {
|
||||
//@ts-ignore
|
||||
formData[key] = data[key]
|
||||
}
|
||||
}
|
||||
if (formData.invoicing_amount) {
|
||||
toChinesNum(formData.invoicing_amount)
|
||||
}
|
||||
custom_name.value = data.custom.name
|
||||
project_name.value = data.contract_name;
|
||||
project_code.value = data.contract_code
|
||||
project_amount.value = data.contract.amount
|
||||
contract_name.value = data.contract.contract_name;
|
||||
contract_no.value = data.contract.contract_code
|
||||
|
||||
|
||||
}
|
||||
const getDetail = async (row: Record<string, any>) => {
|
||||
const data = await apiinvoiceapplyDetail({
|
||||
id: row.id
|
||||
})
|
||||
setFormData(data)
|
||||
}
|
||||
|
||||
|
||||
// 提交按钮
|
||||
const handleSubmit = async () => {
|
||||
if (formDataannex.length > 0) {
|
||||
formData.annex = JSON.stringify(formDataannex.map((item: any) => item.uri))
|
||||
}
|
||||
|
||||
console.log(formRef.value?.validate(), '22222222')
|
||||
await formRef.value?.validate()
|
||||
|
||||
|
||||
const data = { ...formData }
|
||||
mode.value == 'edit'
|
||||
? await apiinvoiceapplyEdit(data)
|
||||
: await apiinvoiceapplyAdd(data)
|
||||
popupRef.value?.close()
|
||||
emit('success')
|
||||
}
|
||||
|
||||
//打开弹窗
|
||||
const open = (type = 'add') => {
|
||||
mode.value = type
|
||||
popupRef.value?.open()
|
||||
getlist()
|
||||
|
||||
}
|
||||
|
||||
// 关闭回调
|
||||
const handleClose = () => {
|
||||
emit('close')
|
||||
}
|
||||
|
||||
|
||||
|
||||
defineExpose({
|
||||
open,
|
||||
setFormData,
|
||||
getDetail
|
||||
})
|
||||
</script>
|
191
src/views/AssetManagement/Asset disposal/index.vue
Normal file
191
src/views/AssetManagement/Asset disposal/index.vue
Normal file
@ -0,0 +1,191 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-card class="!border-none mb-4" shadow="never">
|
||||
<el-form class="mb-[-16px]" :model="queryParams" inline>
|
||||
<el-form-item label="开票公司名称" prop="invoicing_company_name">
|
||||
<el-input class="w-[280px]" v-model="queryParams.invoicing_company_name" clearable placeholder="请输入开票公司名称" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="客户" prop="customer_id">
|
||||
<el-select class="w-[280px]" v-model="queryParams.customer_id" clearable placeholder="请选择客户">
|
||||
<el-option label="全部" value=""></el-option>
|
||||
<el-option v-for="(item, i) in list1" :key="i" :label="item.name" :value="item.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="合同" prop="contract_id">
|
||||
<el-select class="w-[280px]" v-model="queryParams.contract_id" clearable placeholder="请选择合同">
|
||||
<el-option label="全部" value=""></el-option>
|
||||
<el-option v-for="(item, index) in list" :key="index" :label="item.contract_name" :value="item.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="resetPage">查询</el-button>
|
||||
<el-button @click="resetParams">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-card>
|
||||
<el-card class="!border-none" v-loading="pager.loading" shadow="never">
|
||||
<el-button v-perms="['InvoicingRequests.InvoicingRequests/add']" type="primary" @click="handleAdd">
|
||||
<template #icon>
|
||||
<icon name="el-icon-Plus" />
|
||||
</template>
|
||||
新增
|
||||
</el-button>
|
||||
<el-button v-perms="['InvoicingRequests.InvoicingRequests/delete']" :disabled="!selectData.length" @click="handleDelete(selectData)">
|
||||
删除
|
||||
</el-button>
|
||||
|
||||
<div class="mt-4">
|
||||
<el-table :data="pager.lists" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column label="序号" type="index" width="55" />
|
||||
<el-table-column label="处理流程" prop="customer_name" show-overflow-tooltip />
|
||||
<el-table-column label="流程步骤" prop="customer_name" show-overflow-tooltip />
|
||||
<el-table-column label="资产处置单号" prop="customer_name" show-overflow-tooltip />
|
||||
<el-table-column label="资产序列号" prop="tax" show-overflow-tooltip />
|
||||
<el-table-column label="资产名称 " prop="tax" show-overflow-tooltip />
|
||||
<el-table-column label="资产类别" prop="tax" show-overflow-tooltip />
|
||||
<el-table-column label="规格型号" prop="tax" show-overflow-tooltip />
|
||||
<el-table-column label="计量单位 " prop="tax" show-overflow-tooltip />
|
||||
<el-table-column label="生产厂家" prop="tax" show-overflow-tooltip />
|
||||
<el-table-column label="资产来源" prop="tax" show-overflow-tooltip />
|
||||
<el-table-column label="预计使用寿命 " prop="tax" show-overflow-tooltip />
|
||||
<el-table-column label="存放地址" prop="project_name" show-overflow-tooltip />
|
||||
<el-table-column label="出厂日期" prop="tax" show-overflow-tooltip />
|
||||
<el-table-column label="购入日期" prop="tax" show-overflow-tooltip />
|
||||
<el-table-column label="处置日期" prop="tax" show-overflow-tooltip />
|
||||
<el-table-column label="处置人" prop="tax" show-overflow-tooltip />
|
||||
<el-table-column label="处置方式" prop="tax" show-overflow-tooltip />
|
||||
<el-table-column label="处置原因" prop="tax" show-overflow-tooltip />
|
||||
<el-table-column label="处置金额" prop="tax" show-overflow-tooltip />
|
||||
<el-table-column label="附件" prop="tax" show-overflow-tooltip />
|
||||
|
||||
|
||||
<el-table-column label="操作" width="160" fixed="right">
|
||||
<template #default="{ row }">
|
||||
<el-button v-perms="['InvoicingRequests.InvoicingRequests/edit']" type="primary" link @click="handleEdit(row)">
|
||||
编辑
|
||||
</el-button>
|
||||
<el-button v-perms="['InvoicingRequests.InvoicingRequests/delete']" type="danger" link @click="handleDelete(row.id)">
|
||||
删除
|
||||
</el-button>
|
||||
<el-button v-perms="['InvoicingRequests.InvoicingRequests/detail']" link @click="handledetail(row)">
|
||||
详情
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<div class="flex justify-end mt-4">
|
||||
<pagination v-model="pager" @change="getLists" />
|
||||
</div>
|
||||
</el-card>
|
||||
<edit-popup v-if="showEdit" ref="editRef" :dict-data="dictData" @success="getLists" @close="showEdit = false" />
|
||||
<detail-popup v-if="showDtail" ref="detailRef" :dict-data="dictData" @close="showDtail = false" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup name="projectLists">
|
||||
import { usePaging } from '@/hooks/usePaging'
|
||||
import { useDictData } from '@/hooks/useDictOptions'
|
||||
import { apiinvoiceapplyLists, apiinvoiceapplyDelete, apiinvoiceapplyDetail } from '@/api/InvoicingRequests'
|
||||
import { timeFormat } from '@/utils/util'
|
||||
import { apiContractLists } from '@/api/contract'
|
||||
import { apiCustomLists } from '@/api/custom'
|
||||
import { getAllProjectTypes } from '@/api/projecttype'
|
||||
const protype = reactive([])
|
||||
import feedback from '@/utils/feedback'
|
||||
import EditPopup from './edit.vue'
|
||||
import DetailPopup from './detail.vue'
|
||||
const detailRef = shallowRef<InstanceType<typeof DetailPopup>>()
|
||||
const editRef = shallowRef<InstanceType<typeof EditPopup>>()
|
||||
// 是否显示编辑框
|
||||
const showEdit = ref(false)
|
||||
|
||||
const showDtail = ref(false)
|
||||
|
||||
const list = ref([])
|
||||
const list1 = ref([])
|
||||
|
||||
// 查询条件
|
||||
const queryParams = reactive({
|
||||
invoicing_company_name: '',
|
||||
contract_id: '',
|
||||
customer_id: '',
|
||||
|
||||
|
||||
})
|
||||
|
||||
// 选中数据
|
||||
const selectData = ref<any[]>([])
|
||||
|
||||
// 表格选择后回调事件
|
||||
const handleSelectionChange = (val: any[]) => {
|
||||
selectData.value = val.map(({ id }) => id)
|
||||
}
|
||||
|
||||
// 获取字典数据
|
||||
const { dictData } = useDictData('pay_period,invoice_type')
|
||||
|
||||
// 分页相关
|
||||
const { pager, getLists, resetParams, resetPage } = usePaging({
|
||||
fetchFun: apiinvoiceapplyLists,
|
||||
params: queryParams
|
||||
})
|
||||
|
||||
// 添加
|
||||
const handleAdd = async () => {
|
||||
showEdit.value = true
|
||||
await nextTick()
|
||||
editRef.value?.open('add')
|
||||
}
|
||||
|
||||
// 编辑
|
||||
const handleEdit = async (data: any) => {
|
||||
let res = await apiinvoiceapplyDetail({ id: data.id })
|
||||
showEdit.value = true
|
||||
await nextTick()
|
||||
editRef.value?.open('edit')
|
||||
editRef.value?.setFormData(res)
|
||||
}
|
||||
|
||||
// 删除
|
||||
const handleDelete = async (id: number | any[]) => {
|
||||
await feedback.confirm('确定要删除?')
|
||||
await apiinvoiceapplyDelete({ id })
|
||||
getLists()
|
||||
}
|
||||
//详情
|
||||
const handledetail = async (data: any) => {
|
||||
let res = await apiinvoiceapplyDetail({ id: data.id })
|
||||
showDtail.value = true
|
||||
await nextTick()
|
||||
detailRef.value?.open()
|
||||
detailRef.value?.setFormData(res)
|
||||
}
|
||||
|
||||
//获取客户
|
||||
const getlist1 = () => {
|
||||
apiContractLists().then((res) => {
|
||||
list.value = res.lists
|
||||
})
|
||||
}
|
||||
|
||||
//获取合同
|
||||
const getlist2 = () => {
|
||||
apiCustomLists().then((res) => {
|
||||
// console.log(res)
|
||||
list1.value = res.lists
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
getlist1()
|
||||
getlist2()
|
||||
|
||||
|
||||
getLists()
|
||||
</script>
|
||||
|
283
src/views/AssetManagement/AssetPurchasing/detail.vue
Normal file
283
src/views/AssetManagement/AssetPurchasing/detail.vue
Normal file
@ -0,0 +1,283 @@
|
||||
|
||||
<template>
|
||||
<div class="detail-popup">
|
||||
<popup ref="popupRef" title="开票申请详情" :async="true" width="80%" @confirm="handleSubmit" @close="handleClose">
|
||||
<el-form ref="formRef" :model="formData" label-width="160px">
|
||||
<el-card class="mb-2">
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="项目名称">
|
||||
{{ formData.project_name }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="客户名称">
|
||||
{{ formData.custom.name }}
|
||||
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="项目编码">
|
||||
{{ formData.project_code
|
||||
}}
|
||||
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="合同编号">
|
||||
{{ formData.contract.contract_name }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="合同名称">
|
||||
{{ formData.contract ? formData.contract.contract_code : '暂无数据' }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="合同金额">
|
||||
{{ formData.contract.amount
|
||||
}}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="期次">
|
||||
<dict-value :options="dictData.pay_period" :value="formData.period" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="累计开票金额">
|
||||
{{ formData.accumulate_amount }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="累计回款金额">
|
||||
{{ formData.accumulated_payments_received }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="税率">
|
||||
{{ formData.tax_rate }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="发票类型">
|
||||
|
||||
<dict-value :options="dictData.invoice_type" :value="formData.invoice_type" />
|
||||
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="开票金额(含税)">
|
||||
{{ formData.invoicing_amount }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="金额大写">
|
||||
{{ formData.invoicing_amount_daxie }}
|
||||
</el-form-item>
|
||||
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="开票金额(税额)">
|
||||
{{ formData.invoicing_amount }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="开票金额(非税)">
|
||||
{{ formData.amount_including_tax }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="开票内容">
|
||||
{{ formData.content }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="发票编号">
|
||||
{{ formData.invoice_no }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="开票公司名称">
|
||||
{{ formData.invoicing_company_name }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="纳税人识别号">
|
||||
{{ formData.taxpayer_identification_number }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="开户银行">
|
||||
{{ formData.deposit_bank }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="账号">
|
||||
{{ formData.bank_accnout }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="开户地址及电话">
|
||||
{{ formData.address_phone }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="收票地址">
|
||||
{{ formData.receiving_address }}
|
||||
</el-form-item>
|
||||
</el-col> <el-col :span="8">
|
||||
<el-form-item label="联系人">
|
||||
{{ formData.contacts }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="联系电话">
|
||||
{{ formData.phone }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="邮寄时间">
|
||||
{{ formData.mailing_time }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="邮寄方式">
|
||||
{{ formData.mailing_type }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="邮寄单号">
|
||||
{{ formData.mailing_no }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="备注">
|
||||
{{ formData.remark }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="附件">
|
||||
<div v-for="(item, index) in formDataannex" style="margin-left: 5px;display: block;">
|
||||
<a style="margin-left: 10px; color: #4a5dff; align-self: flex-start" :href="item.uri" target="_blank">{{ item.name }}</a>
|
||||
<span style="cursor: pointer;margin-left: 5px;" @click="delFileFn(index)">x</span>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
|
||||
</el-row>
|
||||
</el-card>
|
||||
</el-form>
|
||||
</popup>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup name="customdetail">
|
||||
|
||||
import type { FormInstance } from 'element-plus'
|
||||
import Popup from '@/components/popup/index.vue'
|
||||
import { apiCustomDetail } from '@/api/custom'
|
||||
import { timeFormat } from '@/utils/util'
|
||||
import type { PropType } from 'vue'
|
||||
defineProps({
|
||||
dictData: {
|
||||
type: Object as PropType<Record<string, any[]>>,
|
||||
default: () => ({})
|
||||
}
|
||||
})
|
||||
const emit = defineEmits(['success', 'close'])
|
||||
const formRef = shallowRef<FormInstance>()
|
||||
const popupRef = shallowRef<InstanceType<typeof Popup>>()
|
||||
const formDataannex = reactive([])
|
||||
const datas = reactive({
|
||||
provinceOptions: [],
|
||||
cityOptions: [],
|
||||
areaOptions: [],
|
||||
});
|
||||
|
||||
|
||||
// 表单数据
|
||||
const formData = reactive({
|
||||
|
||||
})
|
||||
|
||||
|
||||
|
||||
|
||||
// 获取详情
|
||||
const setFormData = async (data: Record<any, any>) => {
|
||||
if (data.annex && data.annex.length > 0) {
|
||||
|
||||
const arry1 = data.annex.map((item: any, index: any) => {
|
||||
return {
|
||||
name: `文件${index + 1}`,
|
||||
uri: item
|
||||
};
|
||||
});
|
||||
Object.assign(formDataannex, arry1)
|
||||
|
||||
}
|
||||
|
||||
// for (const key in formData) {
|
||||
// if (data[key] != null && data[key] != undefined) {
|
||||
// //@ts-ignore
|
||||
// formData[key] = data[key]
|
||||
|
||||
// }
|
||||
|
||||
// }
|
||||
|
||||
Object.assign(formData, data)
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
const getDetail = async (row: Record<string, any>) => {
|
||||
const data = await apiCustomDetail({
|
||||
id: formData.id
|
||||
})
|
||||
setFormData(data)
|
||||
}
|
||||
|
||||
|
||||
// 提交按钮
|
||||
const handleSubmit = async () => {
|
||||
popupRef.value?.close()
|
||||
|
||||
}
|
||||
|
||||
//打开弹窗
|
||||
const open = () => {
|
||||
console.log('1111111')
|
||||
popupRef.value?.open()
|
||||
}
|
||||
|
||||
// 关闭回调
|
||||
const handleClose = () => {
|
||||
emit('close')
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
defineExpose({
|
||||
open,
|
||||
setFormData,
|
||||
getDetail
|
||||
})
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.tit {
|
||||
font-size: 1.2em;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
</style>
|
400
src/views/AssetManagement/AssetPurchasing/edit.vue
Normal file
400
src/views/AssetManagement/AssetPurchasing/edit.vue
Normal file
@ -0,0 +1,400 @@
|
||||
<template>
|
||||
<div class="edit-popup">
|
||||
|
||||
<popup ref="popupRef" :title="popupTitle" :async="true" width="80%" @confirm="handleSubmit" @close="handleClose">
|
||||
<el-steps :active="active" align-center style="margin-bottom: 20px;">
|
||||
<el-step title="提交申请" description="Some description" />
|
||||
<el-step title="采购审核" description="Some description" />
|
||||
|
||||
</el-steps>
|
||||
<div style="display: flex; flex-direction: row-reverse; justify-content: flex-start;margin-bottom: 30px;">
|
||||
|
||||
<el-select class="w-[180px]" v-model="formData.dept_id" clearable placeholder="请选择部门">
|
||||
<el-option v-for="(item, index) in list2" :key="index" :label="item.name" :value="item.id" />
|
||||
</el-select>
|
||||
<el-select class="w-[180px]" v-model="formData.org_id" clearable placeholder="请选择组织" @change="deptrmt">
|
||||
<el-option v-for="(item, index) in list1" :key="index" :label="item.name" :value="item.id" />
|
||||
</el-select>
|
||||
</div>
|
||||
|
||||
<el-form ref="formRef" :model="formData" label-width="auto" :rules="formRules">
|
||||
<el-row :gutter="10">
|
||||
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="申请人" prop="contract_id">
|
||||
<el-input v-model="project_name" clearable disabled placeholder="系统自动填写" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="申请日期" prop="invoicing_date" :rules="[{ required: true, message: '不可为空', trigger: 'change' }]">
|
||||
|
||||
<el-date-picker class="flex-1 !flex" v-model="formData.invoicing_date" clearable type="datetime" value-format="YYYY-MM-DD HH:mm:ss" placeholder="选择申请日期">
|
||||
</el-date-picker>
|
||||
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="希望到货日期" prop="invoicing_date" :rules="[{ required: true, message: '不可为空', trigger: 'change' }]">
|
||||
|
||||
<el-date-picker class="flex-1 !flex" v-model="formData.invoicing_date" clearable type="datetime" value-format="YYYY-MM-DD HH:mm:ss" placeholder="选择希望到货日期">
|
||||
</el-date-picker>
|
||||
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="formData.remark" type="textarea" clearable placeholder="请输入备注" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<!-- <el-form-item label="附件" prop="annex">
|
||||
<el-input v-model="formData.annex" clearable placeholder="请输入附件" />
|
||||
</el-form-item> -->
|
||||
<el-form-item label="附件" prop="field127">
|
||||
<el-upload accept="doc, docx, xls, xlsx, ppt, pptx, pdf, txt, zip, rar, tar, jpg, png, gif, jpeg, webp, wmv, avi, mpg, mpeg, 3gp, mov, mp4, flv, f4v, rmvb, mkv" class="upload-demo" :show-file-list="false" aria-hidden="true" :headers="{ Token: userStore.token }" :action="base_url + '/upload/file'" :on-success="handleAvatarSuccess_four" ref="upload">
|
||||
<el-button type="primary">
|
||||
上传
|
||||
</el-button>
|
||||
</el-upload>
|
||||
|
||||
<div>
|
||||
<div v-for="(item, index) in formDataannex" style="margin-left: 5px;display: block;">
|
||||
<a style="margin-left: 10px; color: #4a5dff; align-self: flex-start" :href="item.uri" target="_blank">{{ item.name }}</a>
|
||||
<span style="cursor: pointer;margin-left: 5px;" @click="delFileFn(index)">x</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div style="margin: 20px 0;">资产申请明细</div>
|
||||
|
||||
<el-row>
|
||||
|
||||
<el-table :data="tablist1">
|
||||
<el-table-column label="序号">
|
||||
<template #default="{ row }">
|
||||
<el-button @click="handleAdd(row)">+</el-button>
|
||||
<el-button @click="handleDelete(row)">-</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label=" 规格型号" prop="name1">
|
||||
<template #default="{ row, $index }">
|
||||
<el-input v-model="row.name1" readonly @click="subjectmu(row, $index)" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="品牌" prop="remark">
|
||||
<template #default="{ row }">
|
||||
<el-input v-model="row.remark" /> </template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="单位" prop="remark">
|
||||
<template #default="{ row }">
|
||||
<el-input v-model="row.remark" /> </template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="申请数量" prop="remark">
|
||||
<template #default="{ row }">
|
||||
<el-input v-model="row.remark" /> </template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="备注" prop="remark">
|
||||
<template #default="{ row }">
|
||||
<el-input v-model="row.remark" /> </template>
|
||||
</el-table-column>
|
||||
|
||||
</el-table>
|
||||
|
||||
|
||||
</el-row>
|
||||
|
||||
<el-dialog v-model="showDialog1" title="选择项目" width="70%">
|
||||
<projectDialog @customEvent="customEvent1" contract_type="2"></projectDialog>
|
||||
</el-dialog>
|
||||
</el-form>
|
||||
</popup>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup name="projectEdit">
|
||||
import type { FormInstance } from 'element-plus'
|
||||
import Popup from '@/components/popup/index.vue'
|
||||
import { toChinesNum } from "@/utils/util";
|
||||
import projectDialog from '@/components/project/index.vue'
|
||||
import { apiinvoiceapplyAdd, apiinvoiceapplyEdit, apiinvoiceapplyDetail } from '@/api/InvoicingRequests'
|
||||
import { getAllProjectTypes } from '@/api/projecttype'
|
||||
import { timeFormat } from '@/utils/util'
|
||||
import { isEmail, isIdCard, isPhone } from '@/utils/validate'
|
||||
import type { PropType } from 'vue'
|
||||
import configs from "@/config"
|
||||
import useUserStore from "@/stores/modules/user";
|
||||
const base_url = configs.baseUrl + configs.urlPrefix
|
||||
const userStore = useUserStore();
|
||||
const active = ref(0)
|
||||
const formDataannex = reactive([])
|
||||
const contract_name = ref('')
|
||||
const project_name = ref('')
|
||||
const project_code = ref('')
|
||||
const project_amount = ref('')
|
||||
const contract_no = ref('')
|
||||
const custom_name = ref('')
|
||||
const tablist1 = reactive([{}])
|
||||
const list1 = reactive([])
|
||||
const list2 = reactive([])
|
||||
import { deptAll } from '@/api/org/department'
|
||||
import { getAll } from '@/api/org/organization'
|
||||
const next = () => {
|
||||
if (active.value++ > 3) active.value = 0
|
||||
}
|
||||
// 上传文件
|
||||
const handleAvatarSuccess_four = (
|
||||
response,
|
||||
uploadFile
|
||||
) => {
|
||||
if (response.code == 0) {
|
||||
ElMessage.error(response.msg);
|
||||
return;
|
||||
}
|
||||
formDataannex.push(
|
||||
{ uri: response.data.uri, name: response.data.name }
|
||||
|
||||
|
||||
);
|
||||
};
|
||||
|
||||
const handleAdd = (row: any) => {
|
||||
// 在 row 后面插入一行数据
|
||||
const index = tablist1.indexOf(row);
|
||||
tablist1.splice(index + 1, 0, {});
|
||||
};
|
||||
|
||||
const handleDelete = (row: any) => {
|
||||
// 删除 row
|
||||
const index = tablist1.indexOf(row);
|
||||
tablist1.splice(index, 1);
|
||||
};
|
||||
//获取所有组织
|
||||
const getlist = () => {
|
||||
getAll().then((res) => {
|
||||
Object.assign(list1, res)
|
||||
if (res.length > 0 && !formData.org_id) {
|
||||
formData.org_id = res[0].id
|
||||
deptAll({ 'org_id': res[0].id }).then((res) => {
|
||||
if (res.length > 0) {
|
||||
Object.assign(list2, res)
|
||||
formData.dept_id = res[0].id
|
||||
}
|
||||
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
//获取部门
|
||||
const deptrmt = (e: any) => {
|
||||
formData.dept_id = ''
|
||||
getlist1(e)
|
||||
|
||||
}
|
||||
//获取所有部门
|
||||
const getlist1 = (id: any) => {
|
||||
deptAll({ 'org_id': id }).then((res) => {
|
||||
list2.splice(0, list2.length, ...res)
|
||||
})
|
||||
}
|
||||
//验证
|
||||
const checkPhone = (rule: any, value: any, callback: (arg0: Error) => any) => {
|
||||
|
||||
if (value && !/^1\d{10}$/.test(value)) {
|
||||
callback(new Error('请输入正确的手机号码'));
|
||||
} else {
|
||||
callback()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
const userEmail = (rule: any, value: string, callback: (arg0: Error | undefined) => void) => {
|
||||
|
||||
// const mailReg = /^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+(.[a-zA-Z0-9_-])+/
|
||||
// // if (!value) {
|
||||
// // return callback(new Error('邮箱不能为空'))
|
||||
// // }
|
||||
|
||||
|
||||
if (value && !mailReg.test(value)) {
|
||||
callback(new Error('请输入正确的邮箱格式'))
|
||||
} else {
|
||||
callback()
|
||||
}
|
||||
|
||||
};
|
||||
//监听输入
|
||||
const amountinput = (e) => {
|
||||
// console.log(e)
|
||||
if (e && e > 0) {
|
||||
formData.invoicing_amount_daxie = toChinesNum(e)
|
||||
}
|
||||
}
|
||||
// 删除上传的文件
|
||||
const delFileFn = (index: number) => {
|
||||
formDataannex.splice(index, 1)
|
||||
}
|
||||
defineProps({
|
||||
dictData: {
|
||||
type: Object as PropType<Record<string, any[]>>,
|
||||
default: () => ({})
|
||||
}
|
||||
})
|
||||
const emit = defineEmits(['success', 'close'])
|
||||
const formRef = shallowRef<FormInstance>()
|
||||
const popupRef = shallowRef<InstanceType<typeof Popup>>()
|
||||
const mode = ref('add')
|
||||
const showDialog = ref(false)
|
||||
const showDialog1 = ref(false)
|
||||
|
||||
const customEvent = (e: any) => {
|
||||
formData.customer_id = e.id;
|
||||
custom_name.value = e.name;
|
||||
showDialog.value = false;
|
||||
};
|
||||
const customEvent1 = (e: any) => {
|
||||
formData.contract_id = e.id;
|
||||
project_name.value = e.project_name;
|
||||
project_code.value = e.project_code;
|
||||
contract_name.value = e.contract_name;
|
||||
contract_no.value = e.contract_code
|
||||
project_amount.value = e.amount
|
||||
|
||||
showDialog1.value = false;
|
||||
};
|
||||
// 弹窗标题
|
||||
const popupTitle = computed(() => {
|
||||
return mode.value == 'edit' ? '编辑资产采购表' : '新增资产采购表'
|
||||
})
|
||||
|
||||
// 表单数据
|
||||
const formData = reactive({
|
||||
id: '',
|
||||
customer_id: '',
|
||||
contract_id: '',
|
||||
approve_id: '',
|
||||
invoicing_date: "",
|
||||
period: "",
|
||||
accumulate_amount: '',
|
||||
accumulated_payments_received: '',
|
||||
tax_rate: "",
|
||||
invoice_type: '',
|
||||
invoicing_amount: '',
|
||||
invoicing_amount_daxie: "",
|
||||
tax: '',
|
||||
amount_including_tax: '',
|
||||
content: "",
|
||||
invoice_no: "",
|
||||
remark: "",
|
||||
annex: "",
|
||||
invoicing_company_name: "",
|
||||
taxpayer_identification_number: "",
|
||||
deposit_bank: "",
|
||||
bank_accnout: "",
|
||||
address_phone: "",
|
||||
receiving_address: "",
|
||||
contacts: "",
|
||||
phone: "",
|
||||
mailing_time: "",
|
||||
mailing_type: "",
|
||||
mailing_no: ""
|
||||
})
|
||||
|
||||
|
||||
// 表单验证
|
||||
const formRules = reactive<any>({
|
||||
|
||||
})
|
||||
|
||||
|
||||
// 获取详情
|
||||
const setFormData = async (data: Record<any, any>) => {
|
||||
if (data.annex && data.annex.length > 0) {
|
||||
|
||||
const arry1 = data.annex.map((item: any, index: any) => {
|
||||
return {
|
||||
name: `文件${index + 1}`,
|
||||
uri: item
|
||||
};
|
||||
});
|
||||
Object.assign(formDataannex, arry1)
|
||||
|
||||
}
|
||||
|
||||
if (data.dept_id) {
|
||||
getlist1(data.org_id)
|
||||
}
|
||||
for (const key in formData) {
|
||||
if (data[key] != null && data[key] != undefined) {
|
||||
//@ts-ignore
|
||||
formData[key] = data[key]
|
||||
}
|
||||
}
|
||||
if (formData.invoicing_amount) {
|
||||
toChinesNum(formData.invoicing_amount)
|
||||
}
|
||||
custom_name.value = data.custom.name
|
||||
project_name.value = data.contract_name;
|
||||
project_code.value = data.contract_code
|
||||
project_amount.value = data.contract.amount
|
||||
contract_name.value = data.contract.contract_name;
|
||||
contract_no.value = data.contract.contract_code
|
||||
|
||||
|
||||
}
|
||||
const getDetail = async (row: Record<string, any>) => {
|
||||
const data = await apiinvoiceapplyDetail({
|
||||
id: row.id
|
||||
})
|
||||
setFormData(data)
|
||||
}
|
||||
|
||||
|
||||
// 提交按钮
|
||||
const handleSubmit = async () => {
|
||||
if (formDataannex.length > 0) {
|
||||
formData.annex = JSON.stringify(formDataannex.map((item: any) => item.uri))
|
||||
}
|
||||
|
||||
console.log(formRef.value?.validate(), '22222222')
|
||||
await formRef.value?.validate()
|
||||
|
||||
|
||||
const data = { ...formData }
|
||||
mode.value == 'edit'
|
||||
? await apiinvoiceapplyEdit(data)
|
||||
: await apiinvoiceapplyAdd(data)
|
||||
popupRef.value?.close()
|
||||
emit('success')
|
||||
}
|
||||
|
||||
//打开弹窗
|
||||
const open = (type = 'add') => {
|
||||
mode.value = type
|
||||
popupRef.value?.open()
|
||||
getlist()
|
||||
|
||||
}
|
||||
|
||||
// 关闭回调
|
||||
const handleClose = () => {
|
||||
emit('close')
|
||||
}
|
||||
|
||||
|
||||
|
||||
defineExpose({
|
||||
open,
|
||||
setFormData,
|
||||
getDetail
|
||||
})
|
||||
</script>
|
179
src/views/AssetManagement/AssetPurchasing/index.vue
Normal file
179
src/views/AssetManagement/AssetPurchasing/index.vue
Normal file
@ -0,0 +1,179 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-card class="!border-none mb-4" shadow="never">
|
||||
<el-form class="mb-[-16px]" :model="queryParams" inline>
|
||||
<el-form-item label="开票公司名称" prop="invoicing_company_name">
|
||||
<el-input class="w-[280px]" v-model="queryParams.invoicing_company_name" clearable placeholder="请输入开票公司名称" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="客户" prop="customer_id">
|
||||
<el-select class="w-[280px]" v-model="queryParams.customer_id" clearable placeholder="请选择客户">
|
||||
<el-option label="全部" value=""></el-option>
|
||||
<el-option v-for="(item, i) in list1" :key="i" :label="item.name" :value="item.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="合同" prop="contract_id">
|
||||
<el-select class="w-[280px]" v-model="queryParams.contract_id" clearable placeholder="请选择合同">
|
||||
<el-option label="全部" value=""></el-option>
|
||||
<el-option v-for="(item, index) in list" :key="index" :label="item.contract_name" :value="item.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="resetPage">查询</el-button>
|
||||
<el-button @click="resetParams">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-card>
|
||||
<el-card class="!border-none" v-loading="pager.loading" shadow="never">
|
||||
<el-button v-perms="['InvoicingRequests.InvoicingRequests/add']" type="primary" @click="handleAdd">
|
||||
<template #icon>
|
||||
<icon name="el-icon-Plus" />
|
||||
</template>
|
||||
新增
|
||||
</el-button>
|
||||
<el-button v-perms="['InvoicingRequests.InvoicingRequests/delete']" :disabled="!selectData.length" @click="handleDelete(selectData)">
|
||||
删除
|
||||
</el-button>
|
||||
|
||||
<div class="mt-4">
|
||||
<el-table :data="pager.lists" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column label="序号" type="index" width="55" />
|
||||
<el-table-column label="处理流程" prop="customer_name" show-overflow-tooltip />
|
||||
<el-table-column label="流程步骤" prop="customer_name" show-overflow-tooltip />
|
||||
<el-table-column label="资产申请单号" prop="project_code" show-overflow-tooltip />
|
||||
<el-table-column label="组织名称" prop="project_name" show-overflow-tooltip />
|
||||
<el-table-column label="部门名称" prop="invoicing_date" show-overflow-tooltip />
|
||||
<el-table-column label="申请人" prop="tax" show-overflow-tooltip />
|
||||
<el-table-column label="申请日期" prop="tax" show-overflow-tooltip />
|
||||
<el-table-column label="希望到货日期" prop="tax" show-overflow-tooltip />
|
||||
<el-table-column label="备注" prop="tax" show-overflow-tooltip />
|
||||
<el-table-column label="附件" prop="tax" show-overflow-tooltip />
|
||||
<el-table-column label="操作" width="160" fixed="right">
|
||||
<template #default="{ row }">
|
||||
<el-button v-perms="['InvoicingRequests.InvoicingRequests/edit']" type="primary" link @click="handleEdit(row)">
|
||||
编辑
|
||||
</el-button>
|
||||
<el-button v-perms="['InvoicingRequests.InvoicingRequests/delete']" type="danger" link @click="handleDelete(row.id)">
|
||||
删除
|
||||
</el-button>
|
||||
<el-button v-perms="['InvoicingRequests.InvoicingRequests/detail']" link @click="handledetail(row)">
|
||||
详情
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<div class="flex justify-end mt-4">
|
||||
<pagination v-model="pager" @change="getLists" />
|
||||
</div>
|
||||
</el-card>
|
||||
<edit-popup v-if="showEdit" ref="editRef" :dict-data="dictData" @success="getLists" @close="showEdit = false" />
|
||||
<detail-popup v-if="showDtail" ref="detailRef" :dict-data="dictData" @close="showDtail = false" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup name="projectLists">
|
||||
import { usePaging } from '@/hooks/usePaging'
|
||||
import { useDictData } from '@/hooks/useDictOptions'
|
||||
import { apiinvoiceapplyLists, apiinvoiceapplyDelete, apiinvoiceapplyDetail } from '@/api/InvoicingRequests'
|
||||
import { timeFormat } from '@/utils/util'
|
||||
import { apiContractLists } from '@/api/contract'
|
||||
import { apiCustomLists } from '@/api/custom'
|
||||
import { getAllProjectTypes } from '@/api/projecttype'
|
||||
const protype = reactive([])
|
||||
import feedback from '@/utils/feedback'
|
||||
import EditPopup from './edit.vue'
|
||||
import DetailPopup from './detail.vue'
|
||||
const detailRef = shallowRef<InstanceType<typeof DetailPopup>>()
|
||||
const editRef = shallowRef<InstanceType<typeof EditPopup>>()
|
||||
// 是否显示编辑框
|
||||
const showEdit = ref(false)
|
||||
|
||||
const showDtail = ref(false)
|
||||
|
||||
const list = ref([])
|
||||
const list1 = ref([])
|
||||
|
||||
// 查询条件
|
||||
const queryParams = reactive({
|
||||
invoicing_company_name: '',
|
||||
contract_id: '',
|
||||
customer_id: '',
|
||||
|
||||
|
||||
})
|
||||
|
||||
// 选中数据
|
||||
const selectData = ref<any[]>([])
|
||||
|
||||
// 表格选择后回调事件
|
||||
const handleSelectionChange = (val: any[]) => {
|
||||
selectData.value = val.map(({ id }) => id)
|
||||
}
|
||||
|
||||
// 获取字典数据
|
||||
const { dictData } = useDictData('pay_period,invoice_type')
|
||||
|
||||
// 分页相关
|
||||
const { pager, getLists, resetParams, resetPage } = usePaging({
|
||||
fetchFun: apiinvoiceapplyLists,
|
||||
params: queryParams
|
||||
})
|
||||
|
||||
// 添加
|
||||
const handleAdd = async () => {
|
||||
showEdit.value = true
|
||||
await nextTick()
|
||||
editRef.value?.open('add')
|
||||
}
|
||||
|
||||
// 编辑
|
||||
const handleEdit = async (data: any) => {
|
||||
let res = await apiinvoiceapplyDetail({ id: data.id })
|
||||
showEdit.value = true
|
||||
await nextTick()
|
||||
editRef.value?.open('edit')
|
||||
editRef.value?.setFormData(res)
|
||||
}
|
||||
|
||||
// 删除
|
||||
const handleDelete = async (id: number | any[]) => {
|
||||
await feedback.confirm('确定要删除?')
|
||||
await apiinvoiceapplyDelete({ id })
|
||||
getLists()
|
||||
}
|
||||
//详情
|
||||
const handledetail = async (data: any) => {
|
||||
let res = await apiinvoiceapplyDetail({ id: data.id })
|
||||
showDtail.value = true
|
||||
await nextTick()
|
||||
detailRef.value?.open()
|
||||
detailRef.value?.setFormData(res)
|
||||
}
|
||||
|
||||
//获取客户
|
||||
const getlist1 = () => {
|
||||
apiContractLists().then((res) => {
|
||||
list.value = res.lists
|
||||
})
|
||||
}
|
||||
|
||||
//获取合同
|
||||
const getlist2 = () => {
|
||||
apiCustomLists().then((res) => {
|
||||
// console.log(res)
|
||||
list1.value = res.lists
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
getlist1()
|
||||
getlist2()
|
||||
|
||||
|
||||
getLists()
|
||||
</script>
|
||||
|
283
src/views/AssetManagement/Assetreturn/detail.vue
Normal file
283
src/views/AssetManagement/Assetreturn/detail.vue
Normal file
@ -0,0 +1,283 @@
|
||||
|
||||
<template>
|
||||
<div class="detail-popup">
|
||||
<popup ref="popupRef" title="开票申请详情" :async="true" width="80%" @confirm="handleSubmit" @close="handleClose">
|
||||
<el-form ref="formRef" :model="formData" label-width="160px">
|
||||
<el-card class="mb-2">
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="项目名称">
|
||||
{{ formData.project_name }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="客户名称">
|
||||
{{ formData.custom.name }}
|
||||
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="项目编码">
|
||||
{{ formData.project_code
|
||||
}}
|
||||
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="合同编号">
|
||||
{{ formData.contract.contract_name }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="合同名称">
|
||||
{{ formData.contract ? formData.contract.contract_code : '暂无数据' }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="合同金额">
|
||||
{{ formData.contract.amount
|
||||
}}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="期次">
|
||||
<dict-value :options="dictData.pay_period" :value="formData.period" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="累计开票金额">
|
||||
{{ formData.accumulate_amount }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="累计回款金额">
|
||||
{{ formData.accumulated_payments_received }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="税率">
|
||||
{{ formData.tax_rate }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="发票类型">
|
||||
|
||||
<dict-value :options="dictData.invoice_type" :value="formData.invoice_type" />
|
||||
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="开票金额(含税)">
|
||||
{{ formData.invoicing_amount }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="金额大写">
|
||||
{{ formData.invoicing_amount_daxie }}
|
||||
</el-form-item>
|
||||
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="开票金额(税额)">
|
||||
{{ formData.invoicing_amount }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="开票金额(非税)">
|
||||
{{ formData.amount_including_tax }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="开票内容">
|
||||
{{ formData.content }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="发票编号">
|
||||
{{ formData.invoice_no }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="开票公司名称">
|
||||
{{ formData.invoicing_company_name }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="纳税人识别号">
|
||||
{{ formData.taxpayer_identification_number }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="开户银行">
|
||||
{{ formData.deposit_bank }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="账号">
|
||||
{{ formData.bank_accnout }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="开户地址及电话">
|
||||
{{ formData.address_phone }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="收票地址">
|
||||
{{ formData.receiving_address }}
|
||||
</el-form-item>
|
||||
</el-col> <el-col :span="8">
|
||||
<el-form-item label="联系人">
|
||||
{{ formData.contacts }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="联系电话">
|
||||
{{ formData.phone }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="邮寄时间">
|
||||
{{ formData.mailing_time }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="邮寄方式">
|
||||
{{ formData.mailing_type }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="邮寄单号">
|
||||
{{ formData.mailing_no }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="备注">
|
||||
{{ formData.remark }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="附件">
|
||||
<div v-for="(item, index) in formDataannex" style="margin-left: 5px;display: block;">
|
||||
<a style="margin-left: 10px; color: #4a5dff; align-self: flex-start" :href="item.uri" target="_blank">{{ item.name }}</a>
|
||||
<span style="cursor: pointer;margin-left: 5px;" @click="delFileFn(index)">x</span>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
|
||||
</el-row>
|
||||
</el-card>
|
||||
</el-form>
|
||||
</popup>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup name="customdetail">
|
||||
|
||||
import type { FormInstance } from 'element-plus'
|
||||
import Popup from '@/components/popup/index.vue'
|
||||
import { apiCustomDetail } from '@/api/custom'
|
||||
import { timeFormat } from '@/utils/util'
|
||||
import type { PropType } from 'vue'
|
||||
defineProps({
|
||||
dictData: {
|
||||
type: Object as PropType<Record<string, any[]>>,
|
||||
default: () => ({})
|
||||
}
|
||||
})
|
||||
const emit = defineEmits(['success', 'close'])
|
||||
const formRef = shallowRef<FormInstance>()
|
||||
const popupRef = shallowRef<InstanceType<typeof Popup>>()
|
||||
const formDataannex = reactive([])
|
||||
const datas = reactive({
|
||||
provinceOptions: [],
|
||||
cityOptions: [],
|
||||
areaOptions: [],
|
||||
});
|
||||
|
||||
|
||||
// 表单数据
|
||||
const formData = reactive({
|
||||
|
||||
})
|
||||
|
||||
|
||||
|
||||
|
||||
// 获取详情
|
||||
const setFormData = async (data: Record<any, any>) => {
|
||||
if (data.annex && data.annex.length > 0) {
|
||||
|
||||
const arry1 = data.annex.map((item: any, index: any) => {
|
||||
return {
|
||||
name: `文件${index + 1}`,
|
||||
uri: item
|
||||
};
|
||||
});
|
||||
Object.assign(formDataannex, arry1)
|
||||
|
||||
}
|
||||
|
||||
// for (const key in formData) {
|
||||
// if (data[key] != null && data[key] != undefined) {
|
||||
// //@ts-ignore
|
||||
// formData[key] = data[key]
|
||||
|
||||
// }
|
||||
|
||||
// }
|
||||
|
||||
Object.assign(formData, data)
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
const getDetail = async (row: Record<string, any>) => {
|
||||
const data = await apiCustomDetail({
|
||||
id: formData.id
|
||||
})
|
||||
setFormData(data)
|
||||
}
|
||||
|
||||
|
||||
// 提交按钮
|
||||
const handleSubmit = async () => {
|
||||
popupRef.value?.close()
|
||||
|
||||
}
|
||||
|
||||
//打开弹窗
|
||||
const open = () => {
|
||||
console.log('1111111')
|
||||
popupRef.value?.open()
|
||||
}
|
||||
|
||||
// 关闭回调
|
||||
const handleClose = () => {
|
||||
emit('close')
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
defineExpose({
|
||||
open,
|
||||
setFormData,
|
||||
getDetail
|
||||
})
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.tit {
|
||||
font-size: 1.2em;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
</style>
|
381
src/views/AssetManagement/Assetreturn/edit.vue
Normal file
381
src/views/AssetManagement/Assetreturn/edit.vue
Normal file
@ -0,0 +1,381 @@
|
||||
<template>
|
||||
<div class="edit-popup">
|
||||
|
||||
<popup ref="popupRef" :title="popupTitle" :async="true" width="80%" @confirm="handleSubmit" @close="handleClose">
|
||||
<el-steps :active="active" align-center style="margin-bottom: 20px;">
|
||||
<el-step title="提交申请" description="Some description" />
|
||||
<el-step title="项目经理" description="Some description" />
|
||||
<el-step title="资产管理员" description="Some description" />
|
||||
</el-steps>
|
||||
<div style="display: flex; flex-direction: row-reverse; justify-content: flex-start;margin-bottom: 30px;">
|
||||
|
||||
<el-select class="w-[180px]" v-model="formData.dept_id" clearable placeholder="请选择部门">
|
||||
<el-option v-for="(item, index) in list2" :key="index" :label="item.name" :value="item.id" />
|
||||
</el-select>
|
||||
<el-select class="w-[180px]" v-model="formData.org_id" clearable placeholder="请选择组织" @change="deptrmt">
|
||||
<el-option v-for="(item, index) in list1" :key="index" :label="item.name" :value="item.id" />
|
||||
</el-select>
|
||||
</div>
|
||||
|
||||
<el-form ref="formRef" :model="formData" label-width="auto" :rules="formRules">
|
||||
<el-row :gutter="10">
|
||||
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="项目名称" prop="contract_id">
|
||||
<el-input v-model="project_name" clearable placeholder="请输入资产序列号" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="项目编码" prop="contract_id">
|
||||
<el-input v-model="project_name" clearable placeholder="请输入资产名称" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="formData.remark" type="textarea" clearable placeholder="请输入备注" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<!-- <el-form-item label="附件" prop="annex">
|
||||
<el-input v-model="formData.annex" clearable placeholder="请输入附件" />
|
||||
</el-form-item> -->
|
||||
<el-form-item label="附件" prop="field127">
|
||||
<el-upload accept="doc, docx, xls, xlsx, ppt, pptx, pdf, txt, zip, rar, tar, jpg, png, gif, jpeg, webp, wmv, avi, mpg, mpeg, 3gp, mov, mp4, flv, f4v, rmvb, mkv" class="upload-demo" :show-file-list="false" aria-hidden="true" :headers="{ Token: userStore.token }" :action="base_url + '/upload/file'" :on-success="handleAvatarSuccess_four" ref="upload">
|
||||
<el-button type="primary">
|
||||
上传
|
||||
</el-button>
|
||||
</el-upload>
|
||||
|
||||
<div>
|
||||
<div v-for="(item, index) in formDataannex" style="margin-left: 5px;display: block;">
|
||||
<a style="margin-left: 10px; color: #4a5dff; align-self: flex-start" :href="item.uri" target="_blank">{{ item.name }}</a>
|
||||
<span style="cursor: pointer;margin-left: 5px;" @click="delFileFn(index)">x</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div style="margin: 20px 0;">资产归还明细</div>
|
||||
|
||||
<el-row>
|
||||
|
||||
<el-table :data="tablist1">
|
||||
<el-table-column label="序号">
|
||||
<template #default="{ row }">
|
||||
<el-button @click="handleAdd(row)">+</el-button>
|
||||
<el-button @click="handleDelete(row)">-</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="资产序列号" prop="name1">
|
||||
<template #default="{ row, $index }">
|
||||
<el-input v-model="row.name1" readonly @click="subjectmu(row, $index)" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="资产名称" prop="remark">
|
||||
<template #default="{ row }">
|
||||
<el-input v-model="row.remark" /> </template>
|
||||
</el-table-column>
|
||||
|
||||
|
||||
<el-table-column label="规格型号" prop="remark">
|
||||
<template #default="{ row }">
|
||||
<el-input v-model="row.remark" /> </template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="计量单位" prop="remark">
|
||||
<template #default="{ row }">
|
||||
<el-input v-model="row.remark" /> </template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="领用日期" prop="remark">
|
||||
<template #default="{ row }">
|
||||
<el-input v-model="row.remark" /> </template>
|
||||
</el-table-column>
|
||||
<el-table-column label="归还日期" prop="remark">
|
||||
<template #default="{ row }">
|
||||
<el-input v-model="row.remark" /> </template>
|
||||
</el-table-column>
|
||||
<el-table-column label="归还人" prop="remark">
|
||||
<template #default="{ row }">
|
||||
<el-input v-model="row.remark" /> </template>
|
||||
</el-table-column>
|
||||
<el-table-column label="使用天数" prop="remark">
|
||||
<template #default="{ row }">
|
||||
<el-input v-model="row.remark" /> </template>
|
||||
</el-table-column>
|
||||
<el-table-column label="单日成本" prop="remark">
|
||||
<template #default="{ row }">
|
||||
<el-input v-model="row.remark" /> </template>
|
||||
</el-table-column>
|
||||
<el-table-column label="成本金额" prop="remark">
|
||||
<template #default="{ row }">
|
||||
<el-input v-model="row.remark" /> </template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="备注" prop="remark">
|
||||
<template #default="{ row }">
|
||||
<el-input v-model="row.remark" /> </template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
|
||||
</el-row>
|
||||
|
||||
<el-dialog v-model="showDialog1" title="选择项目" width="70%">
|
||||
<projectDialog @customEvent="customEvent1" contract_type="2"></projectDialog>
|
||||
</el-dialog>
|
||||
</el-form>
|
||||
</popup>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup name="projectEdit">
|
||||
import type { FormInstance } from 'element-plus'
|
||||
import Popup from '@/components/popup/index.vue'
|
||||
import { toChinesNum } from "@/utils/util";
|
||||
import projectDialog from '@/components/project/index.vue'
|
||||
import { apiinvoiceapplyAdd, apiinvoiceapplyEdit, apiinvoiceapplyDetail } from '@/api/InvoicingRequests'
|
||||
import { getAllProjectTypes } from '@/api/projecttype'
|
||||
import { timeFormat } from '@/utils/util'
|
||||
import { isEmail, isIdCard, isPhone } from '@/utils/validate'
|
||||
import type { PropType } from 'vue'
|
||||
import configs from "@/config"
|
||||
import useUserStore from "@/stores/modules/user";
|
||||
const base_url = configs.baseUrl + configs.urlPrefix
|
||||
const userStore = useUserStore();
|
||||
const active = ref(0)
|
||||
const formDataannex = reactive([])
|
||||
const contract_name = ref('')
|
||||
const project_name = ref('')
|
||||
const project_code = ref('')
|
||||
const project_amount = ref('')
|
||||
const contract_no = ref('')
|
||||
const custom_name = ref('')
|
||||
const tablist1 = reactive([{}])
|
||||
const list1 = reactive([])
|
||||
const list2 = reactive([])
|
||||
import { deptAll } from '@/api/org/department'
|
||||
import { getAll } from '@/api/org/organization'
|
||||
const next = () => {
|
||||
if (active.value++ > 3) active.value = 0
|
||||
}
|
||||
// 上传文件
|
||||
const handleAvatarSuccess_four = (
|
||||
response,
|
||||
uploadFile
|
||||
) => {
|
||||
if (response.code == 0) {
|
||||
ElMessage.error(response.msg);
|
||||
return;
|
||||
}
|
||||
formDataannex.push(
|
||||
{ uri: response.data.uri, name: response.data.name }
|
||||
|
||||
|
||||
);
|
||||
};
|
||||
|
||||
const handleAdd = (row: any) => {
|
||||
// 在 row 后面插入一行数据
|
||||
const index = tablist1.indexOf(row);
|
||||
tablist1.splice(index + 1, 0, {});
|
||||
};
|
||||
|
||||
const handleDelete = (row: any) => {
|
||||
// 删除 row
|
||||
const index = tablist1.indexOf(row);
|
||||
tablist1.splice(index, 1);
|
||||
};
|
||||
//获取所有组织
|
||||
const getlist = () => {
|
||||
getAll().then((res) => {
|
||||
Object.assign(list1, res)
|
||||
if (res.length > 0 && !formData.org_id) {
|
||||
formData.org_id = res[0].id
|
||||
deptAll({ 'org_id': res[0].id }).then((res) => {
|
||||
if (res.length > 0) {
|
||||
Object.assign(list2, res)
|
||||
formData.dept_id = res[0].id
|
||||
}
|
||||
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
//获取部门
|
||||
const deptrmt = (e: any) => {
|
||||
formData.dept_id = ''
|
||||
getlist1(e)
|
||||
|
||||
}
|
||||
//获取所有部门
|
||||
const getlist1 = (id: any) => {
|
||||
deptAll({ 'org_id': id }).then((res) => {
|
||||
list2.splice(0, list2.length, ...res)
|
||||
})
|
||||
}
|
||||
|
||||
// 删除上传的文件
|
||||
const delFileFn = (index: number) => {
|
||||
formDataannex.splice(index, 1)
|
||||
}
|
||||
defineProps({
|
||||
dictData: {
|
||||
type: Object as PropType<Record<string, any[]>>,
|
||||
default: () => ({})
|
||||
}
|
||||
})
|
||||
const emit = defineEmits(['success', 'close'])
|
||||
const formRef = shallowRef<FormInstance>()
|
||||
const popupRef = shallowRef<InstanceType<typeof Popup>>()
|
||||
const mode = ref('add')
|
||||
const showDialog = ref(false)
|
||||
const showDialog1 = ref(false)
|
||||
|
||||
const customEvent = (e: any) => {
|
||||
formData.customer_id = e.id;
|
||||
custom_name.value = e.name;
|
||||
showDialog.value = false;
|
||||
};
|
||||
const customEvent1 = (e: any) => {
|
||||
formData.contract_id = e.id;
|
||||
project_name.value = e.project_name;
|
||||
project_code.value = e.project_code;
|
||||
contract_name.value = e.contract_name;
|
||||
contract_no.value = e.contract_code
|
||||
project_amount.value = e.amount
|
||||
|
||||
showDialog1.value = false;
|
||||
};
|
||||
// 弹窗标题
|
||||
const popupTitle = computed(() => {
|
||||
return mode.value == 'edit' ? '编辑资产归还表' : '新增资产归还表'
|
||||
})
|
||||
|
||||
// 表单数据
|
||||
const formData = reactive({
|
||||
id: '',
|
||||
customer_id: '',
|
||||
contract_id: '',
|
||||
approve_id: '',
|
||||
invoicing_date: "",
|
||||
period: "",
|
||||
accumulate_amount: '',
|
||||
accumulated_payments_received: '',
|
||||
tax_rate: "",
|
||||
invoice_type: '',
|
||||
invoicing_amount: '',
|
||||
invoicing_amount_daxie: "",
|
||||
tax: '',
|
||||
amount_including_tax: '',
|
||||
content: "",
|
||||
invoice_no: "",
|
||||
remark: "",
|
||||
annex: "",
|
||||
invoicing_company_name: "",
|
||||
taxpayer_identification_number: "",
|
||||
deposit_bank: "",
|
||||
bank_accnout: "",
|
||||
address_phone: "",
|
||||
receiving_address: "",
|
||||
contacts: "",
|
||||
phone: "",
|
||||
mailing_time: "",
|
||||
mailing_type: "",
|
||||
mailing_no: ""
|
||||
})
|
||||
|
||||
|
||||
// 表单验证
|
||||
const formRules = reactive<any>({
|
||||
|
||||
})
|
||||
|
||||
|
||||
// 获取详情
|
||||
const setFormData = async (data: Record<any, any>) => {
|
||||
if (data.annex && data.annex.length > 0) {
|
||||
|
||||
const arry1 = data.annex.map((item: any, index: any) => {
|
||||
return {
|
||||
name: `文件${index + 1}`,
|
||||
uri: item
|
||||
};
|
||||
});
|
||||
Object.assign(formDataannex, arry1)
|
||||
|
||||
}
|
||||
|
||||
if (data.dept_id) {
|
||||
getlist1(data.org_id)
|
||||
}
|
||||
for (const key in formData) {
|
||||
if (data[key] != null && data[key] != undefined) {
|
||||
//@ts-ignore
|
||||
formData[key] = data[key]
|
||||
}
|
||||
}
|
||||
if (formData.invoicing_amount) {
|
||||
toChinesNum(formData.invoicing_amount)
|
||||
}
|
||||
custom_name.value = data.custom.name
|
||||
project_name.value = data.contract_name;
|
||||
project_code.value = data.contract_code
|
||||
project_amount.value = data.contract.amount
|
||||
contract_name.value = data.contract.contract_name;
|
||||
contract_no.value = data.contract.contract_code
|
||||
|
||||
|
||||
}
|
||||
const getDetail = async (row: Record<string, any>) => {
|
||||
const data = await apiinvoiceapplyDetail({
|
||||
id: row.id
|
||||
})
|
||||
setFormData(data)
|
||||
}
|
||||
|
||||
|
||||
// 提交按钮
|
||||
const handleSubmit = async () => {
|
||||
if (formDataannex.length > 0) {
|
||||
formData.annex = JSON.stringify(formDataannex.map((item: any) => item.uri))
|
||||
}
|
||||
|
||||
console.log(formRef.value?.validate(), '22222222')
|
||||
await formRef.value?.validate()
|
||||
|
||||
|
||||
const data = { ...formData }
|
||||
mode.value == 'edit'
|
||||
? await apiinvoiceapplyEdit(data)
|
||||
: await apiinvoiceapplyAdd(data)
|
||||
popupRef.value?.close()
|
||||
emit('success')
|
||||
}
|
||||
|
||||
//打开弹窗
|
||||
const open = (type = 'add') => {
|
||||
mode.value = type
|
||||
popupRef.value?.open()
|
||||
getlist()
|
||||
|
||||
}
|
||||
|
||||
// 关闭回调
|
||||
const handleClose = () => {
|
||||
emit('close')
|
||||
}
|
||||
|
||||
|
||||
|
||||
defineExpose({
|
||||
open,
|
||||
setFormData,
|
||||
getDetail
|
||||
})
|
||||
</script>
|
193
src/views/AssetManagement/Assetreturn/index.vue
Normal file
193
src/views/AssetManagement/Assetreturn/index.vue
Normal file
@ -0,0 +1,193 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-card class="!border-none mb-4" shadow="never">
|
||||
<el-form class="mb-[-16px]" :model="queryParams" inline>
|
||||
<el-form-item label="开票公司名称" prop="invoicing_company_name">
|
||||
<el-input class="w-[280px]" v-model="queryParams.invoicing_company_name" clearable placeholder="请输入开票公司名称" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="客户" prop="customer_id">
|
||||
<el-select class="w-[280px]" v-model="queryParams.customer_id" clearable placeholder="请选择客户">
|
||||
<el-option label="全部" value=""></el-option>
|
||||
<el-option v-for="(item, i) in list1" :key="i" :label="item.name" :value="item.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="合同" prop="contract_id">
|
||||
<el-select class="w-[280px]" v-model="queryParams.contract_id" clearable placeholder="请选择合同">
|
||||
<el-option label="全部" value=""></el-option>
|
||||
<el-option v-for="(item, index) in list" :key="index" :label="item.contract_name" :value="item.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="resetPage">查询</el-button>
|
||||
<el-button @click="resetParams">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-card>
|
||||
<el-card class="!border-none" v-loading="pager.loading" shadow="never">
|
||||
<el-button v-perms="['InvoicingRequests.InvoicingRequests/add']" type="primary" @click="handleAdd">
|
||||
<template #icon>
|
||||
<icon name="el-icon-Plus" />
|
||||
</template>
|
||||
新增
|
||||
</el-button>
|
||||
<el-button v-perms="['InvoicingRequests.InvoicingRequests/delete']" :disabled="!selectData.length" @click="handleDelete(selectData)">
|
||||
删除
|
||||
</el-button>
|
||||
|
||||
<div class="mt-4">
|
||||
<el-table :data="pager.lists" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column label="序号" type="index" width="55" />
|
||||
<el-table-column label="资产归还单号" prop="customer_name" show-overflow-tooltip />
|
||||
<el-table-column label="项目名称" prop="customer_name" show-overflow-tooltip />
|
||||
|
||||
<el-table-column label="资产序列号" prop="tax" show-overflow-tooltip />
|
||||
<el-table-column label="资产名称 " prop="tax" show-overflow-tooltip />
|
||||
<el-table-column label="资产类别" prop="tax" show-overflow-tooltip />
|
||||
<el-table-column label="规格型号" prop="tax" show-overflow-tooltip />
|
||||
<el-table-column label="计量单位 " prop="tax" show-overflow-tooltip />
|
||||
<el-table-column label="生产厂家" prop="tax" show-overflow-tooltip />
|
||||
<el-table-column label="出厂日期" prop="tax" show-overflow-tooltip />
|
||||
<el-table-column label="存放地址 " prop="tax" show-overflow-tooltip />
|
||||
<el-table-column label="预计使用天数" prop="project_name" show-overflow-tooltip />
|
||||
<el-table-column label="领用日期" prop="tax" show-overflow-tooltip />
|
||||
<el-table-column label="领用人" prop="tax" show-overflow-tooltip />
|
||||
|
||||
<el-table-column label="归还日期" prop="tax" show-overflow-tooltip />
|
||||
<el-table-column label="归还人" prop="tax" show-overflow-tooltip />
|
||||
<el-table-column label="存放地点" prop="tax" show-overflow-tooltip />
|
||||
<el-table-column label="成本金额" prop="tax" show-overflow-tooltip />
|
||||
|
||||
|
||||
<el-table-column label="备注" prop="invoicing_date" show-overflow-tooltip />
|
||||
|
||||
|
||||
<el-table-column label="操作" width="160" fixed="right">
|
||||
<template #default="{ row }">
|
||||
<el-button v-perms="['InvoicingRequests.InvoicingRequests/edit']" type="primary" link @click="handleEdit(row)">
|
||||
编辑
|
||||
</el-button>
|
||||
<el-button v-perms="['InvoicingRequests.InvoicingRequests/delete']" type="danger" link @click="handleDelete(row.id)">
|
||||
删除
|
||||
</el-button>
|
||||
<el-button v-perms="['InvoicingRequests.InvoicingRequests/detail']" link @click="handledetail(row)">
|
||||
详情
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<div class="flex justify-end mt-4">
|
||||
<pagination v-model="pager" @change="getLists" />
|
||||
</div>
|
||||
</el-card>
|
||||
<edit-popup v-if="showEdit" ref="editRef" :dict-data="dictData" @success="getLists" @close="showEdit = false" />
|
||||
<detail-popup v-if="showDtail" ref="detailRef" :dict-data="dictData" @close="showDtail = false" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup name="projectLists">
|
||||
import { usePaging } from '@/hooks/usePaging'
|
||||
import { useDictData } from '@/hooks/useDictOptions'
|
||||
import { apiinvoiceapplyLists, apiinvoiceapplyDelete, apiinvoiceapplyDetail } from '@/api/InvoicingRequests'
|
||||
import { timeFormat } from '@/utils/util'
|
||||
import { apiContractLists } from '@/api/contract'
|
||||
import { apiCustomLists } from '@/api/custom'
|
||||
import { getAllProjectTypes } from '@/api/projecttype'
|
||||
const protype = reactive([])
|
||||
import feedback from '@/utils/feedback'
|
||||
import EditPopup from './edit.vue'
|
||||
import DetailPopup from './detail.vue'
|
||||
const detailRef = shallowRef<InstanceType<typeof DetailPopup>>()
|
||||
const editRef = shallowRef<InstanceType<typeof EditPopup>>()
|
||||
// 是否显示编辑框
|
||||
const showEdit = ref(false)
|
||||
|
||||
const showDtail = ref(false)
|
||||
|
||||
const list = ref([])
|
||||
const list1 = ref([])
|
||||
|
||||
// 查询条件
|
||||
const queryParams = reactive({
|
||||
invoicing_company_name: '',
|
||||
contract_id: '',
|
||||
customer_id: '',
|
||||
|
||||
|
||||
})
|
||||
|
||||
// 选中数据
|
||||
const selectData = ref<any[]>([])
|
||||
|
||||
// 表格选择后回调事件
|
||||
const handleSelectionChange = (val: any[]) => {
|
||||
selectData.value = val.map(({ id }) => id)
|
||||
}
|
||||
|
||||
// 获取字典数据
|
||||
const { dictData } = useDictData('pay_period,invoice_type')
|
||||
|
||||
// 分页相关
|
||||
const { pager, getLists, resetParams, resetPage } = usePaging({
|
||||
fetchFun: apiinvoiceapplyLists,
|
||||
params: queryParams
|
||||
})
|
||||
|
||||
// 添加
|
||||
const handleAdd = async () => {
|
||||
showEdit.value = true
|
||||
await nextTick()
|
||||
editRef.value?.open('add')
|
||||
}
|
||||
|
||||
// 编辑
|
||||
const handleEdit = async (data: any) => {
|
||||
let res = await apiinvoiceapplyDetail({ id: data.id })
|
||||
showEdit.value = true
|
||||
await nextTick()
|
||||
editRef.value?.open('edit')
|
||||
editRef.value?.setFormData(res)
|
||||
}
|
||||
|
||||
// 删除
|
||||
const handleDelete = async (id: number | any[]) => {
|
||||
await feedback.confirm('确定要删除?')
|
||||
await apiinvoiceapplyDelete({ id })
|
||||
getLists()
|
||||
}
|
||||
//详情
|
||||
const handledetail = async (data: any) => {
|
||||
let res = await apiinvoiceapplyDetail({ id: data.id })
|
||||
showDtail.value = true
|
||||
await nextTick()
|
||||
detailRef.value?.open()
|
||||
detailRef.value?.setFormData(res)
|
||||
}
|
||||
|
||||
//获取客户
|
||||
const getlist1 = () => {
|
||||
apiContractLists().then((res) => {
|
||||
list.value = res.lists
|
||||
})
|
||||
}
|
||||
|
||||
//获取合同
|
||||
const getlist2 = () => {
|
||||
apiCustomLists().then((res) => {
|
||||
// console.log(res)
|
||||
list1.value = res.lists
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
getlist1()
|
||||
getlist2()
|
||||
|
||||
|
||||
getLists()
|
||||
</script>
|
||||
|
283
src/views/AssetManagement/retirements/detail.vue
Normal file
283
src/views/AssetManagement/retirements/detail.vue
Normal file
@ -0,0 +1,283 @@
|
||||
|
||||
<template>
|
||||
<div class="detail-popup">
|
||||
<popup ref="popupRef" title="开票申请详情" :async="true" width="80%" @confirm="handleSubmit" @close="handleClose">
|
||||
<el-form ref="formRef" :model="formData" label-width="160px">
|
||||
<el-card class="mb-2">
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="项目名称">
|
||||
{{ formData.project_name }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="客户名称">
|
||||
{{ formData.custom.name }}
|
||||
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="项目编码">
|
||||
{{ formData.project_code
|
||||
}}
|
||||
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="合同编号">
|
||||
{{ formData.contract.contract_name }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="合同名称">
|
||||
{{ formData.contract ? formData.contract.contract_code : '暂无数据' }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="合同金额">
|
||||
{{ formData.contract.amount
|
||||
}}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="期次">
|
||||
<dict-value :options="dictData.pay_period" :value="formData.period" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="累计开票金额">
|
||||
{{ formData.accumulate_amount }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="累计回款金额">
|
||||
{{ formData.accumulated_payments_received }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="税率">
|
||||
{{ formData.tax_rate }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="发票类型">
|
||||
|
||||
<dict-value :options="dictData.invoice_type" :value="formData.invoice_type" />
|
||||
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="开票金额(含税)">
|
||||
{{ formData.invoicing_amount }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="金额大写">
|
||||
{{ formData.invoicing_amount_daxie }}
|
||||
</el-form-item>
|
||||
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="开票金额(税额)">
|
||||
{{ formData.invoicing_amount }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="开票金额(非税)">
|
||||
{{ formData.amount_including_tax }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="开票内容">
|
||||
{{ formData.content }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="发票编号">
|
||||
{{ formData.invoice_no }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="开票公司名称">
|
||||
{{ formData.invoicing_company_name }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="纳税人识别号">
|
||||
{{ formData.taxpayer_identification_number }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="开户银行">
|
||||
{{ formData.deposit_bank }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="账号">
|
||||
{{ formData.bank_accnout }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="开户地址及电话">
|
||||
{{ formData.address_phone }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="收票地址">
|
||||
{{ formData.receiving_address }}
|
||||
</el-form-item>
|
||||
</el-col> <el-col :span="8">
|
||||
<el-form-item label="联系人">
|
||||
{{ formData.contacts }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="联系电话">
|
||||
{{ formData.phone }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="邮寄时间">
|
||||
{{ formData.mailing_time }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="邮寄方式">
|
||||
{{ formData.mailing_type }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="邮寄单号">
|
||||
{{ formData.mailing_no }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="备注">
|
||||
{{ formData.remark }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="附件">
|
||||
<div v-for="(item, index) in formDataannex" style="margin-left: 5px;display: block;">
|
||||
<a style="margin-left: 10px; color: #4a5dff; align-self: flex-start" :href="item.uri" target="_blank">{{ item.name }}</a>
|
||||
<span style="cursor: pointer;margin-left: 5px;" @click="delFileFn(index)">x</span>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
|
||||
</el-row>
|
||||
</el-card>
|
||||
</el-form>
|
||||
</popup>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup name="customdetail">
|
||||
|
||||
import type { FormInstance } from 'element-plus'
|
||||
import Popup from '@/components/popup/index.vue'
|
||||
import { apiCustomDetail } from '@/api/custom'
|
||||
import { timeFormat } from '@/utils/util'
|
||||
import type { PropType } from 'vue'
|
||||
defineProps({
|
||||
dictData: {
|
||||
type: Object as PropType<Record<string, any[]>>,
|
||||
default: () => ({})
|
||||
}
|
||||
})
|
||||
const emit = defineEmits(['success', 'close'])
|
||||
const formRef = shallowRef<FormInstance>()
|
||||
const popupRef = shallowRef<InstanceType<typeof Popup>>()
|
||||
const formDataannex = reactive([])
|
||||
const datas = reactive({
|
||||
provinceOptions: [],
|
||||
cityOptions: [],
|
||||
areaOptions: [],
|
||||
});
|
||||
|
||||
|
||||
// 表单数据
|
||||
const formData = reactive({
|
||||
|
||||
})
|
||||
|
||||
|
||||
|
||||
|
||||
// 获取详情
|
||||
const setFormData = async (data: Record<any, any>) => {
|
||||
if (data.annex && data.annex.length > 0) {
|
||||
|
||||
const arry1 = data.annex.map((item: any, index: any) => {
|
||||
return {
|
||||
name: `文件${index + 1}`,
|
||||
uri: item
|
||||
};
|
||||
});
|
||||
Object.assign(formDataannex, arry1)
|
||||
|
||||
}
|
||||
|
||||
// for (const key in formData) {
|
||||
// if (data[key] != null && data[key] != undefined) {
|
||||
// //@ts-ignore
|
||||
// formData[key] = data[key]
|
||||
|
||||
// }
|
||||
|
||||
// }
|
||||
|
||||
Object.assign(formData, data)
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
const getDetail = async (row: Record<string, any>) => {
|
||||
const data = await apiCustomDetail({
|
||||
id: formData.id
|
||||
})
|
||||
setFormData(data)
|
||||
}
|
||||
|
||||
|
||||
// 提交按钮
|
||||
const handleSubmit = async () => {
|
||||
popupRef.value?.close()
|
||||
|
||||
}
|
||||
|
||||
//打开弹窗
|
||||
const open = () => {
|
||||
console.log('1111111')
|
||||
popupRef.value?.open()
|
||||
}
|
||||
|
||||
// 关闭回调
|
||||
const handleClose = () => {
|
||||
emit('close')
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
defineExpose({
|
||||
open,
|
||||
setFormData,
|
||||
getDetail
|
||||
})
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.tit {
|
||||
font-size: 1.2em;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
</style>
|
374
src/views/AssetManagement/retirements/edit.vue
Normal file
374
src/views/AssetManagement/retirements/edit.vue
Normal file
@ -0,0 +1,374 @@
|
||||
<template>
|
||||
<div class="edit-popup">
|
||||
|
||||
<popup ref="popupRef" :title="popupTitle" :async="true" width="80%" @confirm="handleSubmit" @close="handleClose">
|
||||
<el-steps :active="active" align-center style="margin-bottom: 20px;">
|
||||
<el-step title="提交申请" description="Some description" />
|
||||
<el-step title="领导审核" description="Some description" />
|
||||
</el-steps>
|
||||
<div style="display: flex; flex-direction: row-reverse; justify-content: flex-start;margin-bottom: 30px;">
|
||||
|
||||
<el-select class="w-[180px]" v-model="formData.dept_id" clearable placeholder="请选择部门">
|
||||
<el-option v-for="(item, index) in list2" :key="index" :label="item.name" :value="item.id" />
|
||||
</el-select>
|
||||
<el-select class="w-[180px]" v-model="formData.org_id" clearable placeholder="请选择组织" @change="deptrmt">
|
||||
<el-option v-for="(item, index) in list1" :key="index" :label="item.name" :value="item.id" />
|
||||
</el-select>
|
||||
</div>
|
||||
|
||||
<el-form ref="formRef" :model="formData" label-width="auto" :rules="formRules">
|
||||
<el-row :gutter="10">
|
||||
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="资产序列号" prop="contract_id">
|
||||
<el-input v-model="project_name" clearable readonly placeholder="点击选择[空闲]状态的资产" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="资产编号" prop="contract_id">
|
||||
<el-input v-model="project_name" clearable disabled placeholder="系统自动填写" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="资产名称" prop="contract_id">
|
||||
<el-input v-model="project_name" clearable disabled placeholder="系统自动填写" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="规格型号" prop="contract_id">
|
||||
<el-input v-model="project_name" clearable disabled placeholder="系统自动填写" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="资产类别" prop="contract_id">
|
||||
<el-input v-model="project_name" clearable disabled placeholder="系统自动填写" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="计量单位" prop="contract_id">
|
||||
<el-input v-model="project_name" clearable disabled placeholder="系统自动填写" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="生产厂家" prop="contract_id">
|
||||
<el-input v-model="project_name" clearable disabled placeholder="系统自动填写" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="资产来源" prop="contract_id">
|
||||
<el-input v-model="project_name" clearable disabled placeholder="系统自动填写" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="预计使用寿命" prop="contract_id">
|
||||
<el-input v-model="project_name" clearable disabled placeholder="系统自动填写" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="存放地址" prop="contract_id">
|
||||
<el-input v-model="project_name" clearable disabled placeholder="系统自动填写" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="出厂日期" prop="invoicing_date" :rules="[{ required: true, message: '不可为空', trigger: 'change' }]">
|
||||
|
||||
<el-date-picker class="flex-1 !flex" v-model="formData.invoicing_date" clearable type="date" value-format="YYYY-MM-DD" placeholder="选择出厂日期">
|
||||
</el-date-picker>
|
||||
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="购入日期" prop="invoicing_date" :rules="[{ required: true, message: '不可为空', trigger: 'change' }]">
|
||||
|
||||
<el-date-picker class="flex-1 !flex" v-model="formData.invoicing_date" clearable type="date" value-format="YYYY-MM-DD" placeholder="选择购入日期">
|
||||
</el-date-picker>
|
||||
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="报废日期" prop="invoicing_date" :rules="[{ required: true, message: '不可为空', trigger: 'change' }]">
|
||||
|
||||
<el-date-picker class="flex-1 !flex" v-model="formData.invoicing_date" clearable type="date" value-format="YYYY-MM-DD" placeholder="选择报废日期">
|
||||
</el-date-picker>
|
||||
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="报废人" prop="remark">
|
||||
<el-input v-model="formData.remark" type="textarea" clearable placeholder="请输入报废人" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="报废原因" prop="remark">
|
||||
<el-input v-model="formData.remark" type="textarea" clearable placeholder="请输入报废原因" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<!-- <el-form-item label="附件" prop="annex">
|
||||
<el-input v-model="formData.annex" clearable placeholder="请输入附件" />
|
||||
</el-form-item> -->
|
||||
<el-form-item label="送修前照片" prop="field127">
|
||||
<el-upload accept="doc, docx, xls, xlsx, ppt, pptx, pdf, txt, zip, rar, tar, jpg, png, gif, jpeg, webp, wmv, avi, mpg, mpeg, 3gp, mov, mp4, flv, f4v, rmvb, mkv" class="upload-demo" :show-file-list="false" aria-hidden="true" :headers="{ Token: userStore.token }" :action="base_url + '/upload/file'" :on-success="handleAvatarSuccess_four" ref="upload">
|
||||
<el-button type="primary">
|
||||
上传
|
||||
</el-button>
|
||||
</el-upload>
|
||||
|
||||
<div>
|
||||
<div v-for="(item, index) in formDataannex" style="margin-left: 5px;display: block;">
|
||||
<a style="margin-left: 10px; color: #4a5dff; align-self: flex-start" :href="item.uri" target="_blank">{{ item.name }}</a>
|
||||
<span style="cursor: pointer;margin-left: 5px;" @click="delFileFn(index)">x</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
|
||||
<el-dialog v-model="showDialog1" title="选择项目" width="70%">
|
||||
<projectDialog @customEvent="customEvent1" contract_type="2"></projectDialog>
|
||||
</el-dialog>
|
||||
</el-form>
|
||||
</popup>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup name="projectEdit">
|
||||
import type { FormInstance } from 'element-plus'
|
||||
import Popup from '@/components/popup/index.vue'
|
||||
import { toChinesNum } from "@/utils/util";
|
||||
import projectDialog from '@/components/project/index.vue'
|
||||
import { apiinvoiceapplyAdd, apiinvoiceapplyEdit, apiinvoiceapplyDetail } from '@/api/InvoicingRequests'
|
||||
import { getAllProjectTypes } from '@/api/projecttype'
|
||||
import { timeFormat } from '@/utils/util'
|
||||
import { isEmail, isIdCard, isPhone } from '@/utils/validate'
|
||||
import type { PropType } from 'vue'
|
||||
import configs from "@/config"
|
||||
import useUserStore from "@/stores/modules/user";
|
||||
const base_url = configs.baseUrl + configs.urlPrefix
|
||||
const userStore = useUserStore();
|
||||
const active = ref(0)
|
||||
const formDataannex = reactive([])
|
||||
const contract_name = ref('')
|
||||
const project_name = ref('')
|
||||
const project_code = ref('')
|
||||
const project_amount = ref('')
|
||||
const contract_no = ref('')
|
||||
const custom_name = ref('')
|
||||
const list1 = reactive([])
|
||||
const list2 = reactive([])
|
||||
import { deptAll } from '@/api/org/department'
|
||||
import { getAll } from '@/api/org/organization'
|
||||
const next = () => {
|
||||
if (active.value++ > 3) active.value = 0
|
||||
}
|
||||
// 上传文件
|
||||
const handleAvatarSuccess_four = (
|
||||
response,
|
||||
uploadFile
|
||||
) => {
|
||||
if (response.code == 0) {
|
||||
ElMessage.error(response.msg);
|
||||
return;
|
||||
}
|
||||
formDataannex.push(
|
||||
{ uri: response.data.uri, name: response.data.name }
|
||||
|
||||
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
//获取所有组织
|
||||
const getlist = () => {
|
||||
getAll().then((res) => {
|
||||
Object.assign(list1, res)
|
||||
if (res.length > 0 && !formData.org_id) {
|
||||
formData.org_id = res[0].id
|
||||
deptAll({ 'org_id': res[0].id }).then((res) => {
|
||||
if (res.length > 0) {
|
||||
Object.assign(list2, res)
|
||||
formData.dept_id = res[0].id
|
||||
}
|
||||
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
//获取部门
|
||||
const deptrmt = (e: any) => {
|
||||
formData.dept_id = ''
|
||||
getlist1(e)
|
||||
|
||||
}
|
||||
//获取所有部门
|
||||
const getlist1 = (id: any) => {
|
||||
deptAll({ 'org_id': id }).then((res) => {
|
||||
list2.splice(0, list2.length, ...res)
|
||||
})
|
||||
}
|
||||
|
||||
// 删除上传的文件
|
||||
const delFileFn = (index: number) => {
|
||||
formDataannex.splice(index, 1)
|
||||
}
|
||||
defineProps({
|
||||
dictData: {
|
||||
type: Object as PropType<Record<string, any[]>>,
|
||||
default: () => ({})
|
||||
}
|
||||
})
|
||||
const emit = defineEmits(['success', 'close'])
|
||||
const formRef = shallowRef<FormInstance>()
|
||||
const popupRef = shallowRef<InstanceType<typeof Popup>>()
|
||||
const mode = ref('add')
|
||||
const showDialog = ref(false)
|
||||
const showDialog1 = ref(false)
|
||||
|
||||
const customEvent = (e: any) => {
|
||||
formData.customer_id = e.id;
|
||||
custom_name.value = e.name;
|
||||
showDialog.value = false;
|
||||
};
|
||||
const customEvent1 = (e: any) => {
|
||||
formData.contract_id = e.id;
|
||||
project_name.value = e.project_name;
|
||||
project_code.value = e.project_code;
|
||||
contract_name.value = e.contract_name;
|
||||
contract_no.value = e.contract_code
|
||||
project_amount.value = e.amount
|
||||
|
||||
showDialog1.value = false;
|
||||
};
|
||||
// 弹窗标题
|
||||
const popupTitle = computed(() => {
|
||||
return mode.value == 'edit' ? '编辑资产报废表' : '新增资产报废表'
|
||||
})
|
||||
|
||||
// 表单数据
|
||||
const formData = reactive({
|
||||
id: '',
|
||||
customer_id: '',
|
||||
contract_id: '',
|
||||
approve_id: '',
|
||||
invoicing_date: "",
|
||||
period: "",
|
||||
accumulate_amount: '',
|
||||
accumulated_payments_received: '',
|
||||
tax_rate: "",
|
||||
invoice_type: '',
|
||||
invoicing_amount: '',
|
||||
invoicing_amount_daxie: "",
|
||||
tax: '',
|
||||
amount_including_tax: '',
|
||||
content: "",
|
||||
invoice_no: "",
|
||||
remark: "",
|
||||
annex: "",
|
||||
invoicing_company_name: "",
|
||||
taxpayer_identification_number: "",
|
||||
deposit_bank: "",
|
||||
bank_accnout: "",
|
||||
address_phone: "",
|
||||
receiving_address: "",
|
||||
contacts: "",
|
||||
phone: "",
|
||||
mailing_time: "",
|
||||
mailing_type: "",
|
||||
mailing_no: ""
|
||||
})
|
||||
|
||||
|
||||
// 表单验证
|
||||
const formRules = reactive<any>({
|
||||
|
||||
})
|
||||
|
||||
|
||||
// 获取详情
|
||||
const setFormData = async (data: Record<any, any>) => {
|
||||
if (data.annex && data.annex.length > 0) {
|
||||
|
||||
const arry1 = data.annex.map((item: any, index: any) => {
|
||||
return {
|
||||
name: `文件${index + 1}`,
|
||||
uri: item
|
||||
};
|
||||
});
|
||||
Object.assign(formDataannex, arry1)
|
||||
|
||||
}
|
||||
|
||||
if (data.dept_id) {
|
||||
getlist1(data.org_id)
|
||||
}
|
||||
for (const key in formData) {
|
||||
if (data[key] != null && data[key] != undefined) {
|
||||
//@ts-ignore
|
||||
formData[key] = data[key]
|
||||
}
|
||||
}
|
||||
if (formData.invoicing_amount) {
|
||||
toChinesNum(formData.invoicing_amount)
|
||||
}
|
||||
custom_name.value = data.custom.name
|
||||
project_name.value = data.contract_name;
|
||||
project_code.value = data.contract_code
|
||||
project_amount.value = data.contract.amount
|
||||
contract_name.value = data.contract.contract_name;
|
||||
contract_no.value = data.contract.contract_code
|
||||
|
||||
|
||||
}
|
||||
const getDetail = async (row: Record<string, any>) => {
|
||||
const data = await apiinvoiceapplyDetail({
|
||||
id: row.id
|
||||
})
|
||||
setFormData(data)
|
||||
}
|
||||
|
||||
|
||||
// 提交按钮
|
||||
const handleSubmit = async () => {
|
||||
if (formDataannex.length > 0) {
|
||||
formData.annex = JSON.stringify(formDataannex.map((item: any) => item.uri))
|
||||
}
|
||||
|
||||
console.log(formRef.value?.validate(), '22222222')
|
||||
await formRef.value?.validate()
|
||||
|
||||
|
||||
const data = { ...formData }
|
||||
mode.value == 'edit'
|
||||
? await apiinvoiceapplyEdit(data)
|
||||
: await apiinvoiceapplyAdd(data)
|
||||
popupRef.value?.close()
|
||||
emit('success')
|
||||
}
|
||||
|
||||
//打开弹窗
|
||||
const open = (type = 'add') => {
|
||||
mode.value = type
|
||||
popupRef.value?.open()
|
||||
getlist()
|
||||
|
||||
}
|
||||
|
||||
// 关闭回调
|
||||
const handleClose = () => {
|
||||
emit('close')
|
||||
}
|
||||
|
||||
|
||||
|
||||
defineExpose({
|
||||
open,
|
||||
setFormData,
|
||||
getDetail
|
||||
})
|
||||
</script>
|
188
src/views/AssetManagement/retirements/index.vue
Normal file
188
src/views/AssetManagement/retirements/index.vue
Normal file
@ -0,0 +1,188 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-card class="!border-none mb-4" shadow="never">
|
||||
<el-form class="mb-[-16px]" :model="queryParams" inline>
|
||||
<el-form-item label="开票公司名称" prop="invoicing_company_name">
|
||||
<el-input class="w-[280px]" v-model="queryParams.invoicing_company_name" clearable placeholder="请输入开票公司名称" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="客户" prop="customer_id">
|
||||
<el-select class="w-[280px]" v-model="queryParams.customer_id" clearable placeholder="请选择客户">
|
||||
<el-option label="全部" value=""></el-option>
|
||||
<el-option v-for="(item, i) in list1" :key="i" :label="item.name" :value="item.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="合同" prop="contract_id">
|
||||
<el-select class="w-[280px]" v-model="queryParams.contract_id" clearable placeholder="请选择合同">
|
||||
<el-option label="全部" value=""></el-option>
|
||||
<el-option v-for="(item, index) in list" :key="index" :label="item.contract_name" :value="item.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="resetPage">查询</el-button>
|
||||
<el-button @click="resetParams">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-card>
|
||||
<el-card class="!border-none" v-loading="pager.loading" shadow="never">
|
||||
<el-button v-perms="['InvoicingRequests.InvoicingRequests/add']" type="primary" @click="handleAdd">
|
||||
<template #icon>
|
||||
<icon name="el-icon-Plus" />
|
||||
</template>
|
||||
新增
|
||||
</el-button>
|
||||
<el-button v-perms="['InvoicingRequests.InvoicingRequests/delete']" :disabled="!selectData.length" @click="handleDelete(selectData)">
|
||||
删除
|
||||
</el-button>
|
||||
|
||||
<div class="mt-4">
|
||||
<el-table :data="pager.lists" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column label="序号" type="index" width="55" />
|
||||
<el-table-column label="处理流程" prop="customer_name" show-overflow-tooltip />
|
||||
<el-table-column label="流程步骤" prop="customer_name" show-overflow-tooltip />
|
||||
<el-table-column label="资产报废单号" prop="customer_name" show-overflow-tooltip />
|
||||
<el-table-column label="资产序列号" prop="tax" show-overflow-tooltip />
|
||||
<el-table-column label="资产名称 " prop="tax" show-overflow-tooltip />
|
||||
<el-table-column label="资产类别" prop="tax" show-overflow-tooltip />
|
||||
<el-table-column label="规格型号" prop="tax" show-overflow-tooltip />
|
||||
<el-table-column label="计量单位 " prop="tax" show-overflow-tooltip />
|
||||
<el-table-column label="生产厂家" prop="tax" show-overflow-tooltip />
|
||||
<el-table-column label="资产来源" prop="tax" show-overflow-tooltip />
|
||||
<el-table-column label="预计使用寿命 " prop="tax" show-overflow-tooltip />
|
||||
<el-table-column label="存放地址" prop="project_name" show-overflow-tooltip />
|
||||
<el-table-column label="出厂日期" prop="tax" show-overflow-tooltip />
|
||||
<el-table-column label="购入日期" prop="tax" show-overflow-tooltip />
|
||||
<el-table-column label="报废日期" prop="tax" show-overflow-tooltip />
|
||||
<el-table-column label="报废原因" prop="tax" show-overflow-tooltip />
|
||||
<el-table-column label="报废人" prop="tax" show-overflow-tooltip />
|
||||
<el-table-column label="附件" prop="tax" show-overflow-tooltip />
|
||||
|
||||
<el-table-column label="操作" width="160" fixed="right">
|
||||
<template #default="{ row }">
|
||||
<el-button v-perms="['InvoicingRequests.InvoicingRequests/edit']" type="primary" link @click="handleEdit(row)">
|
||||
编辑
|
||||
</el-button>
|
||||
<el-button v-perms="['InvoicingRequests.InvoicingRequests/delete']" type="danger" link @click="handleDelete(row.id)">
|
||||
删除
|
||||
</el-button>
|
||||
<el-button v-perms="['InvoicingRequests.InvoicingRequests/detail']" link @click="handledetail(row)">
|
||||
详情
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<div class="flex justify-end mt-4">
|
||||
<pagination v-model="pager" @change="getLists" />
|
||||
</div>
|
||||
</el-card>
|
||||
<edit-popup v-if="showEdit" ref="editRef" :dict-data="dictData" @success="getLists" @close="showEdit = false" />
|
||||
<detail-popup v-if="showDtail" ref="detailRef" :dict-data="dictData" @close="showDtail = false" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup name="projectLists">
|
||||
import { usePaging } from '@/hooks/usePaging'
|
||||
import { useDictData } from '@/hooks/useDictOptions'
|
||||
import { apiinvoiceapplyLists, apiinvoiceapplyDelete, apiinvoiceapplyDetail } from '@/api/InvoicingRequests'
|
||||
import { timeFormat } from '@/utils/util'
|
||||
import { apiContractLists } from '@/api/contract'
|
||||
import { apiCustomLists } from '@/api/custom'
|
||||
import { getAllProjectTypes } from '@/api/projecttype'
|
||||
const protype = reactive([])
|
||||
import feedback from '@/utils/feedback'
|
||||
import EditPopup from './edit.vue'
|
||||
import DetailPopup from './detail.vue'
|
||||
const detailRef = shallowRef<InstanceType<typeof DetailPopup>>()
|
||||
const editRef = shallowRef<InstanceType<typeof EditPopup>>()
|
||||
// 是否显示编辑框
|
||||
const showEdit = ref(false)
|
||||
|
||||
const showDtail = ref(false)
|
||||
|
||||
const list = ref([])
|
||||
const list1 = ref([])
|
||||
|
||||
// 查询条件
|
||||
const queryParams = reactive({
|
||||
invoicing_company_name: '',
|
||||
contract_id: '',
|
||||
customer_id: '',
|
||||
|
||||
|
||||
})
|
||||
|
||||
// 选中数据
|
||||
const selectData = ref<any[]>([])
|
||||
|
||||
// 表格选择后回调事件
|
||||
const handleSelectionChange = (val: any[]) => {
|
||||
selectData.value = val.map(({ id }) => id)
|
||||
}
|
||||
|
||||
// 获取字典数据
|
||||
const { dictData } = useDictData('pay_period,invoice_type')
|
||||
|
||||
// 分页相关
|
||||
const { pager, getLists, resetParams, resetPage } = usePaging({
|
||||
fetchFun: apiinvoiceapplyLists,
|
||||
params: queryParams
|
||||
})
|
||||
|
||||
// 添加
|
||||
const handleAdd = async () => {
|
||||
showEdit.value = true
|
||||
await nextTick()
|
||||
editRef.value?.open('add')
|
||||
}
|
||||
|
||||
// 编辑
|
||||
const handleEdit = async (data: any) => {
|
||||
let res = await apiinvoiceapplyDetail({ id: data.id })
|
||||
showEdit.value = true
|
||||
await nextTick()
|
||||
editRef.value?.open('edit')
|
||||
editRef.value?.setFormData(res)
|
||||
}
|
||||
|
||||
// 删除
|
||||
const handleDelete = async (id: number | any[]) => {
|
||||
await feedback.confirm('确定要删除?')
|
||||
await apiinvoiceapplyDelete({ id })
|
||||
getLists()
|
||||
}
|
||||
//详情
|
||||
const handledetail = async (data: any) => {
|
||||
let res = await apiinvoiceapplyDetail({ id: data.id })
|
||||
showDtail.value = true
|
||||
await nextTick()
|
||||
detailRef.value?.open()
|
||||
detailRef.value?.setFormData(res)
|
||||
}
|
||||
|
||||
//获取客户
|
||||
const getlist1 = () => {
|
||||
apiContractLists().then((res) => {
|
||||
list.value = res.lists
|
||||
})
|
||||
}
|
||||
|
||||
//获取合同
|
||||
const getlist2 = () => {
|
||||
apiCustomLists().then((res) => {
|
||||
// console.log(res)
|
||||
list1.value = res.lists
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
getlist1()
|
||||
getlist2()
|
||||
|
||||
|
||||
getLists()
|
||||
</script>
|
||||
|
283
src/views/Materialmanagement/MaterialPriceLibrary/detail.vue
Normal file
283
src/views/Materialmanagement/MaterialPriceLibrary/detail.vue
Normal file
@ -0,0 +1,283 @@
|
||||
|
||||
<template>
|
||||
<div class="detail-popup">
|
||||
<popup ref="popupRef" title="开票申请详情" :async="true" width="80%" @confirm="handleSubmit" @close="handleClose">
|
||||
<el-form ref="formRef" :model="formData" label-width="160px">
|
||||
<el-card class="mb-2">
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="项目名称">
|
||||
{{ formData.project_name }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="客户名称">
|
||||
{{ formData.custom.name }}
|
||||
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="项目编码">
|
||||
{{ formData.project_code
|
||||
}}
|
||||
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="合同编号">
|
||||
{{ formData.contract.contract_name }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="合同名称">
|
||||
{{ formData.contract ? formData.contract.contract_code : '暂无数据' }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="合同金额">
|
||||
{{ formData.contract.amount
|
||||
}}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="期次">
|
||||
<dict-value :options="dictData.pay_period" :value="formData.period" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="累计开票金额">
|
||||
{{ formData.accumulate_amount }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="累计回款金额">
|
||||
{{ formData.accumulated_payments_received }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="税率">
|
||||
{{ formData.tax_rate }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="发票类型">
|
||||
|
||||
<dict-value :options="dictData.invoice_type" :value="formData.invoice_type" />
|
||||
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="开票金额(含税)">
|
||||
{{ formData.invoicing_amount }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="金额大写">
|
||||
{{ formData.invoicing_amount_daxie }}
|
||||
</el-form-item>
|
||||
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="开票金额(税额)">
|
||||
{{ formData.invoicing_amount }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="开票金额(非税)">
|
||||
{{ formData.amount_including_tax }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="开票内容">
|
||||
{{ formData.content }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="发票编号">
|
||||
{{ formData.invoice_no }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="开票公司名称">
|
||||
{{ formData.invoicing_company_name }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="纳税人识别号">
|
||||
{{ formData.taxpayer_identification_number }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="开户银行">
|
||||
{{ formData.deposit_bank }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="账号">
|
||||
{{ formData.bank_accnout }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="开户地址及电话">
|
||||
{{ formData.address_phone }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="收票地址">
|
||||
{{ formData.receiving_address }}
|
||||
</el-form-item>
|
||||
</el-col> <el-col :span="8">
|
||||
<el-form-item label="联系人">
|
||||
{{ formData.contacts }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="联系电话">
|
||||
{{ formData.phone }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="邮寄时间">
|
||||
{{ formData.mailing_time }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="邮寄方式">
|
||||
{{ formData.mailing_type }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="邮寄单号">
|
||||
{{ formData.mailing_no }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="备注">
|
||||
{{ formData.remark }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="附件">
|
||||
<div v-for="(item, index) in formDataannex" style="margin-left: 5px;display: block;">
|
||||
<a style="margin-left: 10px; color: #4a5dff; align-self: flex-start" :href="item.uri" target="_blank">{{ item.name }}</a>
|
||||
<span style="cursor: pointer;margin-left: 5px;" @click="delFileFn(index)">x</span>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
|
||||
</el-row>
|
||||
</el-card>
|
||||
</el-form>
|
||||
</popup>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup name="customdetail">
|
||||
|
||||
import type { FormInstance } from 'element-plus'
|
||||
import Popup from '@/components/popup/index.vue'
|
||||
import { apiCustomDetail } from '@/api/custom'
|
||||
import { timeFormat } from '@/utils/util'
|
||||
import type { PropType } from 'vue'
|
||||
defineProps({
|
||||
dictData: {
|
||||
type: Object as PropType<Record<string, any[]>>,
|
||||
default: () => ({})
|
||||
}
|
||||
})
|
||||
const emit = defineEmits(['success', 'close'])
|
||||
const formRef = shallowRef<FormInstance>()
|
||||
const popupRef = shallowRef<InstanceType<typeof Popup>>()
|
||||
const formDataannex = reactive([])
|
||||
const datas = reactive({
|
||||
provinceOptions: [],
|
||||
cityOptions: [],
|
||||
areaOptions: [],
|
||||
});
|
||||
|
||||
|
||||
// 表单数据
|
||||
const formData = reactive({
|
||||
|
||||
})
|
||||
|
||||
|
||||
|
||||
|
||||
// 获取详情
|
||||
const setFormData = async (data: Record<any, any>) => {
|
||||
if (data.annex && data.annex.length > 0) {
|
||||
|
||||
const arry1 = data.annex.map((item: any, index: any) => {
|
||||
return {
|
||||
name: `文件${index + 1}`,
|
||||
uri: item
|
||||
};
|
||||
});
|
||||
Object.assign(formDataannex, arry1)
|
||||
|
||||
}
|
||||
|
||||
// for (const key in formData) {
|
||||
// if (data[key] != null && data[key] != undefined) {
|
||||
// //@ts-ignore
|
||||
// formData[key] = data[key]
|
||||
|
||||
// }
|
||||
|
||||
// }
|
||||
|
||||
Object.assign(formData, data)
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
const getDetail = async (row: Record<string, any>) => {
|
||||
const data = await apiCustomDetail({
|
||||
id: formData.id
|
||||
})
|
||||
setFormData(data)
|
||||
}
|
||||
|
||||
|
||||
// 提交按钮
|
||||
const handleSubmit = async () => {
|
||||
popupRef.value?.close()
|
||||
|
||||
}
|
||||
|
||||
//打开弹窗
|
||||
const open = () => {
|
||||
console.log('1111111')
|
||||
popupRef.value?.open()
|
||||
}
|
||||
|
||||
// 关闭回调
|
||||
const handleClose = () => {
|
||||
emit('close')
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
defineExpose({
|
||||
open,
|
||||
setFormData,
|
||||
getDetail
|
||||
})
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.tit {
|
||||
font-size: 1.2em;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
</style>
|
334
src/views/Materialmanagement/MaterialPriceLibrary/edit.vue
Normal file
334
src/views/Materialmanagement/MaterialPriceLibrary/edit.vue
Normal file
@ -0,0 +1,334 @@
|
||||
<template>
|
||||
<div class="edit-popup">
|
||||
|
||||
<popup ref="popupRef" :title="popupTitle" :async="true" width="550px" @confirm="handleSubmit" @close="handleClose">
|
||||
|
||||
<el-form ref="formRef" :model="formData" label-width="auto" :rules="formRules">
|
||||
<el-row :gutter="10">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="组织名称" prop="org_id" :rules="[{ required: true, message: '不可为空', trigger: 'blur' }]">
|
||||
<el-select v-model="formData.org_id" clearable placeholder="请选择组织" @change="deptrmt">
|
||||
<el-option v-for="(item, index) in list1" :key="index" :label="item.name" :value="item.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="24">
|
||||
<el-form-item label="部门名称" prop="dept_id" :rules="[{ required: true, message: '不可为空', trigger: 'blur' }]">
|
||||
<el-select v-model="formData.dept_id" clearable placeholder="请选择部门">
|
||||
<el-option v-for="( item, index ) in list2 " :key="index" :label="item.name" :value="item.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="供应商名称" prop="project_id" @click="showDialog = true">
|
||||
<el-input v-model="project_name" clearable placeholder="点击选择供应商名称" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="供应商编码" prop="project_id" @click="showDialog = true">
|
||||
<el-input v-model="project_code" clearable disabled placeholder="系统自动填写" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="材料编码" prop="project_id" @click="showDialog = true">
|
||||
<el-input v-model="project_name" clearable placeholder="点击选择材料" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="事故类型" prop="type">
|
||||
<el-input v-model="formData.not_our_company_user" clearable disabled placeholder="系统自动填写" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="24">
|
||||
<el-form-item label="材料名称" prop="device_accident">
|
||||
<el-input v-model="formData.not_our_company_user" clearable disabled placeholder="系统自动填写" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="材料大类" prop="contractor_user">
|
||||
<el-input v-model="formData.not_our_company_user" clearable disabled placeholder="系统自动填写" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="材料中类" prop="our_company_user">
|
||||
<el-input v-model="formData.not_our_company_user" clearable disabled placeholder="系统自动填写" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="24">
|
||||
<el-form-item label="材料小类" prop="our_company_user">
|
||||
<el-input v-model="formData.not_our_company_user" clearable disabled placeholder="系统自动填写" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="规格型号" prop="our_company_user">
|
||||
<el-input v-model="formData.not_our_company_user" clearable disabled placeholder="系统自动填写" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="参数说明" prop="our_company_user">
|
||||
<el-input v-model="formData.not_our_company_user" clearable disabled placeholder="系统自动填写" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="材料中类" prop="our_company_user">
|
||||
<el-input v-model="formData.not_our_company_user" clearable disabled placeholder="系统自动填写" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="24">
|
||||
<el-form-item label="品牌" prop="our_company_user">
|
||||
<el-input v-model="formData.not_our_company_user" clearable disabled placeholder="系统自动填写" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
|
||||
<el-col :span="24">
|
||||
<el-form-item label="单位" prop="not_our_company_user">
|
||||
<el-input v-model="formData.not_our_company_user" clearable disabled placeholder="系统自动填写" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
|
||||
<el-col :span="24">
|
||||
<el-form-item label="询价日期" prop="require">
|
||||
<el-date-picker class="flex-1 !flex" v-model="formData.happen_date" clearable type="date" value-format="YYYY-MM-DD" placeholder="选择询价日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="价格" prop="content">
|
||||
<el-input v-model="formData.content" type="number" clearable placeholder="请输入价格" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="24">
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="formData.remark" type="textarea" clearable placeholder="请输入备注" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
|
||||
<el-col :span="24">
|
||||
|
||||
<el-form-item label="附件" prop="field127">
|
||||
<el-upload accept="doc, docx, xls, xlsx, ppt, pptx, pdf, txt, zip, rar, tar, jpg, png, gif, jpeg, webp, wmv, avi, mpg, mpeg, 3gp, mov, mp4, flv, f4v, rmvb, mkv" class="upload-demo" :show-file-list="false" aria-hidden="true" :headers="{ Token: userStore.token }" :action="base_url + '/upload/file'" :on-success="handleAvatarSuccess_four" ref="upload">
|
||||
<el-button type="primary">
|
||||
上传
|
||||
</el-button>
|
||||
</el-upload>
|
||||
|
||||
<div>
|
||||
<div v-for="( item, index ) in formDataannex " style="margin-left: 5px;display: block;">
|
||||
<a style="margin-left: 10px; color: #4a5dff; align-self: flex-start" :href="item.uri" target="_blank">{{ item.name }}</a>
|
||||
<span style="cursor: pointer;margin-left: 5px;" @click="delFileFn(index)">x</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
|
||||
<el-dialog v-model="showDialog" title="选择项目" width="70%">
|
||||
<porjectDialog @customEvent="customEvent"></porjectDialog>
|
||||
</el-dialog>
|
||||
|
||||
|
||||
</el-form>
|
||||
</popup>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup name="projectEdit">
|
||||
import porjectDialog from '@/components/project/index.vue'
|
||||
import type { FormInstance } from 'element-plus'
|
||||
import Popup from '@/components/popup/index.vue'
|
||||
import { qualityaccidentAdd, qualityaccidentEdit, qualityaccidentDetail } from '@/api/quality_accident'
|
||||
import { toChinesNum } from "@/utils/util";
|
||||
import { getAllProjectTypes } from '@/api/projecttype'
|
||||
import { timeFormat } from '@/utils/util'
|
||||
import { isEmail, isIdCard, isPhone } from '@/utils/validate'
|
||||
import type { PropType } from 'vue'
|
||||
import configs from "@/config"
|
||||
import useUserStore from "@/stores/modules/user";
|
||||
const protype = reactive([])
|
||||
const base_url = configs.baseUrl + configs.urlPrefix
|
||||
const userStore = useUserStore();
|
||||
const active = ref(0)
|
||||
const formDataannex = reactive([])
|
||||
const list1 = reactive([])
|
||||
const list2 = reactive([])
|
||||
const showDialog = ref(false)
|
||||
const project_name = ref('')
|
||||
const project_code = ref('')
|
||||
import { deptAll } from '@/api/org/department'
|
||||
import { getAll } from '@/api/org/organization'
|
||||
const userInfo = userStore.userInfo
|
||||
// 上传文件
|
||||
const handleAvatarSuccess_four = (
|
||||
response,
|
||||
uploadFile
|
||||
) => {
|
||||
if (response.code == 0) {
|
||||
ElMessage.error(response.msg);
|
||||
return;
|
||||
}
|
||||
formDataannex.push(
|
||||
{ uri: response.data.uri, name: response.data.name }
|
||||
|
||||
|
||||
);
|
||||
};
|
||||
|
||||
// 删除上传的文件
|
||||
const delFileFn = (index: number) => {
|
||||
formDataannex.splice(index, 1)
|
||||
}
|
||||
defineProps({
|
||||
dictData: {
|
||||
type: Object as PropType<Record<string, any[]>>,
|
||||
default: () => ({})
|
||||
}
|
||||
})
|
||||
const emit = defineEmits(['success', 'close'])
|
||||
const formRef = shallowRef<FormInstance>()
|
||||
const popupRef = shallowRef<InstanceType<typeof Popup>>()
|
||||
const mode = ref('add')
|
||||
//获取值
|
||||
const customEvent = (e: any) => {
|
||||
formData.project_id = e.id;
|
||||
project_name.value = e.name;
|
||||
project_code.value = e.project_code
|
||||
showDialog.value = false;
|
||||
};
|
||||
|
||||
//获取所有组织
|
||||
const getlist = () => {
|
||||
getAll().then((res) => {
|
||||
Object.assign(list1, res)
|
||||
|
||||
})
|
||||
}
|
||||
//获取部门
|
||||
const deptrmt = (e: any) => {
|
||||
formData.dept_id = ''
|
||||
getlist1(e)
|
||||
|
||||
}
|
||||
//获取所有部门
|
||||
const getlist1 = (id: any) => {
|
||||
deptAll({ 'org_id': id }).then((res) => {
|
||||
list2.splice(0, list2.length, ...res)
|
||||
})
|
||||
}
|
||||
|
||||
// 弹窗标题
|
||||
const popupTitle = computed(() => {
|
||||
return mode.value == 'edit' ? '编辑安全事故表' : '新增安全事故表'
|
||||
})
|
||||
|
||||
// 表单数据
|
||||
const formData = reactive({
|
||||
id: '',
|
||||
project_id: "",
|
||||
name: "",
|
||||
happen_date: "",
|
||||
type: "",
|
||||
file: '',
|
||||
remark: "",
|
||||
dept_id: '',
|
||||
org_id: "",
|
||||
device_accident: "",
|
||||
contractor_user: "",
|
||||
not_our_company_user: "",
|
||||
our_company_user: "",
|
||||
content: "",
|
||||
})
|
||||
|
||||
|
||||
// 表单验证
|
||||
const formRules = reactive<any>({
|
||||
|
||||
})
|
||||
|
||||
|
||||
// 获取详情
|
||||
const setFormData = async (data: Record<any, any>) => {
|
||||
if (data.file && data.file.length > 0) {
|
||||
|
||||
const arry1 = data.file.map((item: any, index: any) => {
|
||||
return {
|
||||
name: `文件${index + 1}`,
|
||||
uri: item
|
||||
};
|
||||
});
|
||||
Object.assign(formDataannex, arry1)
|
||||
|
||||
}
|
||||
|
||||
|
||||
for (const key in formData) {
|
||||
if (data[key] != null && data[key] != undefined) {
|
||||
//@ts-ignore
|
||||
formData[key] = data[key]
|
||||
}
|
||||
}
|
||||
if (data.dept_id) {
|
||||
getlist1(data.dept_id
|
||||
)
|
||||
}
|
||||
|
||||
project_name.value = data.project_name
|
||||
|
||||
project_code.value = data.project_code
|
||||
}
|
||||
const getDetail = async (row: Record<string, any>) => {
|
||||
const data = await qualityaccidentDetail({
|
||||
id: row.id
|
||||
})
|
||||
setFormData(data)
|
||||
}
|
||||
|
||||
|
||||
// 提交按钮
|
||||
const handleSubmit = async () => {
|
||||
if (formDataannex.length > 0) {
|
||||
formData.file = JSON.stringify(formDataannex.map((item) => item.uri))
|
||||
}
|
||||
|
||||
await formRef.value?.validate()
|
||||
|
||||
|
||||
const data = { ...formData }
|
||||
mode.value == 'edit'
|
||||
? await qualityaccidentEdit(data)
|
||||
: await qualityaccidentAdd(data)
|
||||
popupRef.value?.close()
|
||||
emit('success')
|
||||
}
|
||||
|
||||
//打开弹窗
|
||||
const open = (type = 'add') => {
|
||||
mode.value = type
|
||||
popupRef.value?.open()
|
||||
getlist()
|
||||
|
||||
}
|
||||
|
||||
// 关闭回调
|
||||
const handleClose = () => {
|
||||
emit('close')
|
||||
}
|
||||
|
||||
|
||||
|
||||
defineExpose({
|
||||
open,
|
||||
setFormData,
|
||||
getDetail
|
||||
})
|
||||
</script>
|
185
src/views/Materialmanagement/MaterialPriceLibrary/index.vue
Normal file
185
src/views/Materialmanagement/MaterialPriceLibrary/index.vue
Normal file
@ -0,0 +1,185 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-card class="!border-none mb-4" shadow="never">
|
||||
<el-form class="mb-[-16px]" :model="queryParams" inline>
|
||||
<el-form-item label="开票公司名称" prop="invoicing_company_name">
|
||||
<el-input class="w-[280px]" v-model="queryParams.invoicing_company_name" clearable placeholder="请输入开票公司名称" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="客户" prop="customer_id">
|
||||
<el-select class="w-[280px]" v-model="queryParams.customer_id" clearable placeholder="请选择客户">
|
||||
<el-option label="全部" value=""></el-option>
|
||||
<el-option v-for="(item, i) in list1" :key="i" :label="item.name" :value="item.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="合同" prop="contract_id">
|
||||
<el-select class="w-[280px]" v-model="queryParams.contract_id" clearable placeholder="请选择合同">
|
||||
<el-option label="全部" value=""></el-option>
|
||||
<el-option v-for="(item, index) in list" :key="index" :label="item.contract_name" :value="item.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="resetPage">查询</el-button>
|
||||
<el-button @click="resetParams">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-card>
|
||||
<el-card class="!border-none" v-loading="pager.loading" shadow="never">
|
||||
<el-button v-perms="['InvoicingRequests.InvoicingRequests/add']" type="primary" @click="handleAdd">
|
||||
<template #icon>
|
||||
<icon name="el-icon-Plus" />
|
||||
</template>
|
||||
新增
|
||||
</el-button>
|
||||
<el-button v-perms="['InvoicingRequests.InvoicingRequests/delete']" :disabled="!selectData.length" @click="handleDelete(selectData)">
|
||||
删除
|
||||
</el-button>
|
||||
|
||||
<div class="mt-4">
|
||||
<el-table :data="pager.lists" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column label="序号" type="index" width="55" />
|
||||
<el-table-column label="供应商名称" prop="customer_name" show-overflow-tooltip />
|
||||
|
||||
<el-table-column label="供应商编码 " prop="project_code" show-overflow-tooltip />
|
||||
<el-table-column label="材料名称" prop="invoicing_date" show-overflow-tooltip />
|
||||
<el-table-column label="材料编码" prop="invoicing_date" show-overflow-tooltip />
|
||||
<el-table-column label="材料类别" prop="invoicing_date" show-overflow-tooltip />
|
||||
<el-table-column label="材料中类" prop="invoicing_date" show-overflow-tooltip />
|
||||
<el-table-column label="材料小类" prop="invoicing_date" show-overflow-tooltip />
|
||||
|
||||
<el-table-column label="规格型号" prop="invoicing_date" show-overflow-tooltip />
|
||||
<el-table-column label="品牌" prop="invoicing_date" show-overflow-tooltip />
|
||||
<el-table-column label="参数说明" prop="invoicing_date" show-overflow-tooltip />
|
||||
<el-table-column label="单位" prop="invoicing_date" show-overflow-tooltip />
|
||||
<el-table-column label="询价日期" prop="invoicing_date" show-overflow-tooltip />
|
||||
<el-table-column label="价格" prop="invoicing_date" show-overflow-tooltip />
|
||||
<el-table-column label="备注" prop="invoicing_date" show-overflow-tooltip />
|
||||
<el-table-column label="操作" width="160" fixed="right">
|
||||
<template #default="{ row }">
|
||||
<el-button v-perms="['InvoicingRequests.InvoicingRequests/edit']" type="primary" link @click="handleEdit(row)">
|
||||
编辑
|
||||
</el-button>
|
||||
<el-button v-perms="['InvoicingRequests.InvoicingRequests/delete']" type="danger" link @click="handleDelete(row.id)">
|
||||
删除
|
||||
</el-button>
|
||||
<el-button v-perms="['InvoicingRequests.InvoicingRequests/detail']" link @click="handledetail(row)">
|
||||
详情
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<div class="flex justify-end mt-4">
|
||||
<pagination v-model="pager" @change="getLists" />
|
||||
</div>
|
||||
</el-card>
|
||||
<edit-popup v-if="showEdit" ref="editRef" :dict-data="dictData" @success="getLists" @close="showEdit = false" />
|
||||
<detail-popup v-if="showDtail" ref="detailRef" :dict-data="dictData" @close="showDtail = false" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup name="projectLists">
|
||||
import { usePaging } from '@/hooks/usePaging'
|
||||
import { useDictData } from '@/hooks/useDictOptions'
|
||||
import { apiinvoiceapplyLists, apiinvoiceapplyDelete, apiinvoiceapplyDetail } from '@/api/InvoicingRequests'
|
||||
import { timeFormat } from '@/utils/util'
|
||||
import { apiContractLists } from '@/api/contract'
|
||||
import { apiCustomLists } from '@/api/custom'
|
||||
import { getAllProjectTypes } from '@/api/projecttype'
|
||||
const protype = reactive([])
|
||||
import feedback from '@/utils/feedback'
|
||||
import EditPopup from './edit.vue'
|
||||
import DetailPopup from './detail.vue'
|
||||
const detailRef = shallowRef<InstanceType<typeof DetailPopup>>()
|
||||
const editRef = shallowRef<InstanceType<typeof EditPopup>>()
|
||||
// 是否显示编辑框
|
||||
const showEdit = ref(false)
|
||||
|
||||
const showDtail = ref(false)
|
||||
|
||||
const list = ref([])
|
||||
const list1 = ref([])
|
||||
|
||||
// 查询条件
|
||||
const queryParams = reactive({
|
||||
invoicing_company_name: '',
|
||||
contract_id: '',
|
||||
customer_id: '',
|
||||
|
||||
|
||||
})
|
||||
|
||||
// 选中数据
|
||||
const selectData = ref<any[]>([])
|
||||
|
||||
// 表格选择后回调事件
|
||||
const handleSelectionChange = (val: any[]) => {
|
||||
selectData.value = val.map(({ id }) => id)
|
||||
}
|
||||
|
||||
// 获取字典数据
|
||||
const { dictData } = useDictData('pay_period,invoice_type')
|
||||
|
||||
// 分页相关
|
||||
const { pager, getLists, resetParams, resetPage } = usePaging({
|
||||
fetchFun: apiinvoiceapplyLists,
|
||||
params: queryParams
|
||||
})
|
||||
|
||||
// 添加
|
||||
const handleAdd = async () => {
|
||||
showEdit.value = true
|
||||
await nextTick()
|
||||
editRef.value?.open('add')
|
||||
}
|
||||
|
||||
// 编辑
|
||||
const handleEdit = async (data: any) => {
|
||||
let res = await apiinvoiceapplyDetail({ id: data.id })
|
||||
showEdit.value = true
|
||||
await nextTick()
|
||||
editRef.value?.open('edit')
|
||||
editRef.value?.setFormData(res)
|
||||
}
|
||||
|
||||
// 删除
|
||||
const handleDelete = async (id: number | any[]) => {
|
||||
await feedback.confirm('确定要删除?')
|
||||
await apiinvoiceapplyDelete({ id })
|
||||
getLists()
|
||||
}
|
||||
//详情
|
||||
const handledetail = async (data: any) => {
|
||||
let res = await apiinvoiceapplyDetail({ id: data.id })
|
||||
showDtail.value = true
|
||||
await nextTick()
|
||||
detailRef.value?.open()
|
||||
detailRef.value?.setFormData(res)
|
||||
}
|
||||
|
||||
//获取客户
|
||||
const getlist1 = () => {
|
||||
apiContractLists().then((res) => {
|
||||
list.value = res.lists
|
||||
})
|
||||
}
|
||||
|
||||
//获取合同
|
||||
const getlist2 = () => {
|
||||
apiCustomLists().then((res) => {
|
||||
// console.log(res)
|
||||
list1.value = res.lists
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
getlist1()
|
||||
getlist2()
|
||||
|
||||
|
||||
getLists()
|
||||
</script>
|
||||
|
283
src/views/Materialmanagement/Selfpurchasereceipt/detail.vue
Normal file
283
src/views/Materialmanagement/Selfpurchasereceipt/detail.vue
Normal file
@ -0,0 +1,283 @@
|
||||
|
||||
<template>
|
||||
<div class="detail-popup">
|
||||
<popup ref="popupRef" title="开票申请详情" :async="true" width="80%" @confirm="handleSubmit" @close="handleClose">
|
||||
<el-form ref="formRef" :model="formData" label-width="160px">
|
||||
<el-card class="mb-2">
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="项目名称">
|
||||
{{ formData.project_name }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="客户名称">
|
||||
{{ formData.custom.name }}
|
||||
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="项目编码">
|
||||
{{ formData.project_code
|
||||
}}
|
||||
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="合同编号">
|
||||
{{ formData.contract.contract_name }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="合同名称">
|
||||
{{ formData.contract ? formData.contract.contract_code : '暂无数据' }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="合同金额">
|
||||
{{ formData.contract.amount
|
||||
}}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="期次">
|
||||
<dict-value :options="dictData.pay_period" :value="formData.period" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="累计开票金额">
|
||||
{{ formData.accumulate_amount }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="累计回款金额">
|
||||
{{ formData.accumulated_payments_received }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="税率">
|
||||
{{ formData.tax_rate }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="发票类型">
|
||||
|
||||
<dict-value :options="dictData.invoice_type" :value="formData.invoice_type" />
|
||||
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="开票金额(含税)">
|
||||
{{ formData.invoicing_amount }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="金额大写">
|
||||
{{ formData.invoicing_amount_daxie }}
|
||||
</el-form-item>
|
||||
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="开票金额(税额)">
|
||||
{{ formData.invoicing_amount }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="开票金额(非税)">
|
||||
{{ formData.amount_including_tax }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="开票内容">
|
||||
{{ formData.content }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="发票编号">
|
||||
{{ formData.invoice_no }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="开票公司名称">
|
||||
{{ formData.invoicing_company_name }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="纳税人识别号">
|
||||
{{ formData.taxpayer_identification_number }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="开户银行">
|
||||
{{ formData.deposit_bank }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="账号">
|
||||
{{ formData.bank_accnout }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="开户地址及电话">
|
||||
{{ formData.address_phone }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="收票地址">
|
||||
{{ formData.receiving_address }}
|
||||
</el-form-item>
|
||||
</el-col> <el-col :span="8">
|
||||
<el-form-item label="联系人">
|
||||
{{ formData.contacts }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="联系电话">
|
||||
{{ formData.phone }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="邮寄时间">
|
||||
{{ formData.mailing_time }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="邮寄方式">
|
||||
{{ formData.mailing_type }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="邮寄单号">
|
||||
{{ formData.mailing_no }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="备注">
|
||||
{{ formData.remark }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="附件">
|
||||
<div v-for="(item, index) in formDataannex" style="margin-left: 5px;display: block;">
|
||||
<a style="margin-left: 10px; color: #4a5dff; align-self: flex-start" :href="item.uri" target="_blank">{{ item.name }}</a>
|
||||
<span style="cursor: pointer;margin-left: 5px;" @click="delFileFn(index)">x</span>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
|
||||
</el-row>
|
||||
</el-card>
|
||||
</el-form>
|
||||
</popup>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup name="customdetail">
|
||||
|
||||
import type { FormInstance } from 'element-plus'
|
||||
import Popup from '@/components/popup/index.vue'
|
||||
import { apiCustomDetail } from '@/api/custom'
|
||||
import { timeFormat } from '@/utils/util'
|
||||
import type { PropType } from 'vue'
|
||||
defineProps({
|
||||
dictData: {
|
||||
type: Object as PropType<Record<string, any[]>>,
|
||||
default: () => ({})
|
||||
}
|
||||
})
|
||||
const emit = defineEmits(['success', 'close'])
|
||||
const formRef = shallowRef<FormInstance>()
|
||||
const popupRef = shallowRef<InstanceType<typeof Popup>>()
|
||||
const formDataannex = reactive([])
|
||||
const datas = reactive({
|
||||
provinceOptions: [],
|
||||
cityOptions: [],
|
||||
areaOptions: [],
|
||||
});
|
||||
|
||||
|
||||
// 表单数据
|
||||
const formData = reactive({
|
||||
|
||||
})
|
||||
|
||||
|
||||
|
||||
|
||||
// 获取详情
|
||||
const setFormData = async (data: Record<any, any>) => {
|
||||
if (data.annex && data.annex.length > 0) {
|
||||
|
||||
const arry1 = data.annex.map((item: any, index: any) => {
|
||||
return {
|
||||
name: `文件${index + 1}`,
|
||||
uri: item
|
||||
};
|
||||
});
|
||||
Object.assign(formDataannex, arry1)
|
||||
|
||||
}
|
||||
|
||||
// for (const key in formData) {
|
||||
// if (data[key] != null && data[key] != undefined) {
|
||||
// //@ts-ignore
|
||||
// formData[key] = data[key]
|
||||
|
||||
// }
|
||||
|
||||
// }
|
||||
|
||||
Object.assign(formData, data)
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
const getDetail = async (row: Record<string, any>) => {
|
||||
const data = await apiCustomDetail({
|
||||
id: formData.id
|
||||
})
|
||||
setFormData(data)
|
||||
}
|
||||
|
||||
|
||||
// 提交按钮
|
||||
const handleSubmit = async () => {
|
||||
popupRef.value?.close()
|
||||
|
||||
}
|
||||
|
||||
//打开弹窗
|
||||
const open = () => {
|
||||
console.log('1111111')
|
||||
popupRef.value?.open()
|
||||
}
|
||||
|
||||
// 关闭回调
|
||||
const handleClose = () => {
|
||||
emit('close')
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
defineExpose({
|
||||
open,
|
||||
setFormData,
|
||||
getDetail
|
||||
})
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.tit {
|
||||
font-size: 1.2em;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
</style>
|
363
src/views/Materialmanagement/Selfpurchasereceipt/edit.vue
Normal file
363
src/views/Materialmanagement/Selfpurchasereceipt/edit.vue
Normal file
@ -0,0 +1,363 @@
|
||||
<template>
|
||||
<div class="edit-popup">
|
||||
|
||||
<popup ref="popupRef" :title="popupTitle" :async="true" width="80%" @confirm="handleSubmit" @close="handleClose">
|
||||
<el-steps :active="active" align-center style="margin-bottom: 20px;">
|
||||
<el-step title="填写入库单" description="Some description" />
|
||||
<el-step title="库管确认" description="Some description" />
|
||||
|
||||
</el-steps>
|
||||
|
||||
<el-form ref="formRef" :model="formData" label-width="auto" :rules="formRules">
|
||||
<el-row :gutter="10">
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="供应商" prop="contract_id">
|
||||
<el-input v-model="project_name" clearable readonly placeholder="点击选择供应商" />
|
||||
</el-form-item>
|
||||
</el-col> <el-col :span="8">
|
||||
<el-form-item label="供应商编码" prop="contract_id">
|
||||
<el-input v-model="project_code" clearable disabled placeholder="系统自动填写" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="项目名称" prop="contract_id">
|
||||
<el-input v-model="project_name" clearable readonly placeholder="点击选择项目" />
|
||||
</el-form-item>
|
||||
</el-col> <el-col :span="8">
|
||||
<el-form-item label="项目编码" prop="contract_id">
|
||||
<el-input v-model="project_code" clearable disabled placeholder="系统自动填写" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="采购合同编号" prop="invoice_no">
|
||||
<el-input v-model="formData.invoice_no" clearable placeholder="请输入采购合同编号" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="入库日期" prop="invoicing_date" :rules="[{ required: true, message: '不可为空', trigger: 'change' }]">
|
||||
|
||||
<el-date-picker class="flex-1 !flex" v-model="formData.invoicing_date" clearable type="datetime" value-format="YYYY-MM-DD HH:mm:ss" placeholder="选择入库日期">
|
||||
</el-date-picker>
|
||||
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="formData.remark" type="textarea" clearable placeholder="请输入备注" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<!-- <el-form-item label="附件" prop="annex">
|
||||
<el-input v-model="formData.annex" clearable placeholder="请输入附件" />
|
||||
</el-form-item> -->
|
||||
<el-form-item label="附件" prop="field127">
|
||||
<el-upload accept="doc, docx, xls, xlsx, ppt, pptx, pdf, txt, zip, rar, tar, jpg, png, gif, jpeg, webp, wmv, avi, mpg, mpeg, 3gp, mov, mp4, flv, f4v, rmvb, mkv" class="upload-demo" :show-file-list="false" aria-hidden="true" :headers="{ Token: userStore.token }" :action="base_url + '/upload/file'" :on-success="handleAvatarSuccess_four" ref="upload">
|
||||
<el-button type="primary">
|
||||
上传
|
||||
</el-button>
|
||||
</el-upload>
|
||||
|
||||
<div>
|
||||
<div v-for="(item, index) in formDataannex" style="margin-left: 5px;display: block;">
|
||||
<a style="margin-left: 10px; color: #4a5dff; align-self: flex-start" :href="item.uri" target="_blank">{{ item.name }}</a>
|
||||
<span style="cursor: pointer;margin-left: 5px;" @click="delFileFn(index)">x</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div style="margin: 20px 0;">入库明细</div>
|
||||
|
||||
<el-row>
|
||||
|
||||
<el-table :data="tablist1">
|
||||
<el-table-column label="序号">
|
||||
<template #default="{ row }">
|
||||
<el-button @click="handleAdd(row)">+</el-button>
|
||||
<el-button @click="handleDelete(row)">-</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="仓库" prop="name1">
|
||||
<template #default="{ row, $index }">
|
||||
<el-input v-model="row.name1" readonly @click="subjectmu(row, $index)" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="材料编码" prop="name2">
|
||||
<template #default="{ row }">
|
||||
<el-input v-model="row.name2" readonly />
|
||||
</template></el-table-column>
|
||||
<el-table-column label="材料名称" prop="use_to">
|
||||
<template #default="{ row }">
|
||||
<el-input v-model="row.use_to" /> </template>
|
||||
</el-table-column>
|
||||
<el-table-column label="规格型号" prop="amount">
|
||||
<template #default="{ row }">
|
||||
<el-input v-model="row.amount" type="number" /> </template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="品牌" prop="remark">
|
||||
<template #default="{ row }">
|
||||
<el-input v-model="row.remark" /> </template>
|
||||
</el-table-column>
|
||||
<el-table-column label="参数说明" prop="remark">
|
||||
<template #default="{ row }">
|
||||
<el-input v-model="row.remark" /> </template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="单位" prop="remark">
|
||||
<template #default="{ row }">
|
||||
<el-input v-model="row.remark" /> </template>
|
||||
</el-table-column>
|
||||
<el-table-column label="数量" prop="remark">
|
||||
<template #default="{ row }">
|
||||
<el-input v-model="row.remark" /> </template>
|
||||
</el-table-column>
|
||||
<el-table-column label="含税单价" prop="remark">
|
||||
<template #default="{ row }">
|
||||
<el-input v-model="row.remark" /> </template>
|
||||
</el-table-column>
|
||||
<el-table-column label="税率" prop="remark">
|
||||
<template #default="{ row }">
|
||||
<el-input v-model="row.remark" /> </template>
|
||||
</el-table-column>
|
||||
<el-table-column label="不含税金额" prop="remark">
|
||||
<template #default="{ row }">
|
||||
<el-input v-model="row.remark" /> </template>
|
||||
</el-table-column>
|
||||
<el-table-column label="含税金额" prop="remark">
|
||||
<template #default="{ row }">
|
||||
<el-input v-model="row.remark" /> </template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
|
||||
</el-row>
|
||||
|
||||
<el-dialog v-model="showDialog1" title="选择项目" width="70%">
|
||||
<projectDialog @customEvent="customEvent1" contract_type="2"></projectDialog>
|
||||
</el-dialog>
|
||||
</el-form>
|
||||
</popup>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup name="projectEdit">
|
||||
import type { FormInstance } from 'element-plus'
|
||||
import Popup from '@/components/popup/index.vue'
|
||||
import { toChinesNum } from "@/utils/util";
|
||||
import projectDialog from '@/components/project/index.vue'
|
||||
import { apiinvoiceapplyAdd, apiinvoiceapplyEdit, apiinvoiceapplyDetail } from '@/api/InvoicingRequests'
|
||||
import { getAllProjectTypes } from '@/api/projecttype'
|
||||
import { timeFormat } from '@/utils/util'
|
||||
import { isEmail, isIdCard, isPhone } from '@/utils/validate'
|
||||
import type { PropType } from 'vue'
|
||||
import configs from "@/config"
|
||||
import useUserStore from "@/stores/modules/user";
|
||||
const protype = reactive([])
|
||||
const base_url = configs.baseUrl + configs.urlPrefix
|
||||
const userStore = useUserStore();
|
||||
const active = ref(0)
|
||||
const formDataannex = reactive([])
|
||||
const contract_name = ref('')
|
||||
const project_name = ref('')
|
||||
const project_code = ref('')
|
||||
const project_amount = ref('')
|
||||
const contract_no = ref('')
|
||||
const custom_name = ref('')
|
||||
const tablist1 = reactive([{}])
|
||||
const next = () => {
|
||||
if (active.value++ > 3) active.value = 0
|
||||
}
|
||||
// 上传文件
|
||||
const handleAvatarSuccess_four = (
|
||||
response,
|
||||
uploadFile
|
||||
) => {
|
||||
if (response.code == 0) {
|
||||
ElMessage.error(response.msg);
|
||||
return;
|
||||
}
|
||||
formDataannex.push(
|
||||
{ uri: response.data.uri, name: response.data.name }
|
||||
|
||||
|
||||
);
|
||||
};
|
||||
|
||||
const handleAdd = (row: any) => {
|
||||
// 在 row 后面插入一行数据
|
||||
const index = tablist1.indexOf(row);
|
||||
tablist1.splice(index + 1, 0, {});
|
||||
};
|
||||
|
||||
const handleDelete = (row: any) => {
|
||||
// 删除 row
|
||||
const index = tablist1.indexOf(row);
|
||||
tablist1.splice(index, 1);
|
||||
}
|
||||
// 删除上传的文件
|
||||
const delFileFn = (index: number) => {
|
||||
formDataannex.splice(index, 1)
|
||||
}
|
||||
defineProps({
|
||||
dictData: {
|
||||
type: Object as PropType<Record<string, any[]>>,
|
||||
default: () => ({})
|
||||
}
|
||||
})
|
||||
const emit = defineEmits(['success', 'close'])
|
||||
const formRef = shallowRef<FormInstance>()
|
||||
const popupRef = shallowRef<InstanceType<typeof Popup>>()
|
||||
const mode = ref('add')
|
||||
const showDialog = ref(false)
|
||||
const showDialog1 = ref(false)
|
||||
|
||||
const customEvent = (e: any) => {
|
||||
formData.customer_id = e.id;
|
||||
custom_name.value = e.name;
|
||||
showDialog.value = false;
|
||||
};
|
||||
const customEvent1 = (e: any) => {
|
||||
formData.contract_id = e.id;
|
||||
project_name.value = e.project_name;
|
||||
project_code.value = e.project_code;
|
||||
contract_name.value = e.contract_name;
|
||||
contract_no.value = e.contract_code
|
||||
project_amount.value = e.amount
|
||||
|
||||
showDialog1.value = false;
|
||||
};
|
||||
// 弹窗标题
|
||||
const popupTitle = computed(() => {
|
||||
return mode.value == 'edit' ? '编辑自购入库单表' : '新增自购入库单表'
|
||||
})
|
||||
|
||||
// 表单数据
|
||||
const formData = reactive({
|
||||
id: '',
|
||||
customer_id: '',
|
||||
contract_id: '',
|
||||
approve_id: '',
|
||||
invoicing_date: "",
|
||||
period: "",
|
||||
accumulate_amount: '',
|
||||
accumulated_payments_received: '',
|
||||
tax_rate: "",
|
||||
invoice_type: '',
|
||||
invoicing_amount: '',
|
||||
invoicing_amount_daxie: "",
|
||||
tax: '',
|
||||
amount_including_tax: '',
|
||||
content: "",
|
||||
invoice_no: "",
|
||||
remark: "",
|
||||
annex: "",
|
||||
invoicing_company_name: "",
|
||||
taxpayer_identification_number: "",
|
||||
deposit_bank: "",
|
||||
bank_accnout: "",
|
||||
address_phone: "",
|
||||
receiving_address: "",
|
||||
contacts: "",
|
||||
phone: "",
|
||||
mailing_time: "",
|
||||
mailing_type: "",
|
||||
mailing_no: ""
|
||||
})
|
||||
|
||||
|
||||
// 表单验证
|
||||
const formRules = reactive<any>({
|
||||
|
||||
})
|
||||
|
||||
|
||||
// 获取详情
|
||||
const setFormData = async (data: Record<any, any>) => {
|
||||
if (data.annex && data.annex.length > 0) {
|
||||
|
||||
const arry1 = data.annex.map((item: any, index: any) => {
|
||||
return {
|
||||
name: `文件${index + 1}`,
|
||||
uri: item
|
||||
};
|
||||
});
|
||||
Object.assign(formDataannex, arry1)
|
||||
|
||||
}
|
||||
|
||||
|
||||
for (const key in formData) {
|
||||
if (data[key] != null && data[key] != undefined) {
|
||||
//@ts-ignore
|
||||
formData[key] = data[key]
|
||||
}
|
||||
}
|
||||
if (formData.invoicing_amount) {
|
||||
toChinesNum(formData.invoicing_amount)
|
||||
}
|
||||
custom_name.value = data.custom.name
|
||||
project_name.value = data.contract_name;
|
||||
project_code.value = data.contract_code
|
||||
project_amount.value = data.contract.amount
|
||||
contract_name.value = data.contract.contract_name;
|
||||
contract_no.value = data.contract.contract_code
|
||||
|
||||
|
||||
}
|
||||
const getDetail = async (row: Record<string, any>) => {
|
||||
const data = await apiinvoiceapplyDetail({
|
||||
id: row.id
|
||||
})
|
||||
setFormData(data)
|
||||
}
|
||||
|
||||
|
||||
// 提交按钮
|
||||
const handleSubmit = async () => {
|
||||
if (formDataannex.length > 0) {
|
||||
formData.annex = JSON.stringify(formDataannex.map((item: any) => item.uri))
|
||||
}
|
||||
|
||||
console.log(formRef.value?.validate(), '22222222')
|
||||
await formRef.value?.validate()
|
||||
|
||||
|
||||
const data = { ...formData }
|
||||
mode.value == 'edit'
|
||||
? await apiinvoiceapplyEdit(data)
|
||||
: await apiinvoiceapplyAdd(data)
|
||||
popupRef.value?.close()
|
||||
emit('success')
|
||||
}
|
||||
|
||||
//打开弹窗
|
||||
const open = (type = 'add') => {
|
||||
mode.value = type
|
||||
popupRef.value?.open()
|
||||
|
||||
getAllProjectTypes().then((res) => {
|
||||
|
||||
protype.splice(0, protype.length, ...res);
|
||||
})
|
||||
}
|
||||
|
||||
// 关闭回调
|
||||
const handleClose = () => {
|
||||
emit('close')
|
||||
}
|
||||
|
||||
|
||||
|
||||
defineExpose({
|
||||
open,
|
||||
setFormData,
|
||||
getDetail
|
||||
})
|
||||
</script>
|
183
src/views/Materialmanagement/Selfpurchasereceipt/index.vue
Normal file
183
src/views/Materialmanagement/Selfpurchasereceipt/index.vue
Normal file
@ -0,0 +1,183 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-card class="!border-none mb-4" shadow="never">
|
||||
<el-form class="mb-[-16px]" :model="queryParams" inline>
|
||||
<el-form-item label="开票公司名称" prop="invoicing_company_name">
|
||||
<el-input class="w-[280px]" v-model="queryParams.invoicing_company_name" clearable placeholder="请输入开票公司名称" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="客户" prop="customer_id">
|
||||
<el-select class="w-[280px]" v-model="queryParams.customer_id" clearable placeholder="请选择客户">
|
||||
<el-option label="全部" value=""></el-option>
|
||||
<el-option v-for="(item, i) in list1" :key="i" :label="item.name" :value="item.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="合同" prop="contract_id">
|
||||
<el-select class="w-[280px]" v-model="queryParams.contract_id" clearable placeholder="请选择合同">
|
||||
<el-option label="全部" value=""></el-option>
|
||||
<el-option v-for="(item, index) in list" :key="index" :label="item.contract_name" :value="item.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="resetPage">查询</el-button>
|
||||
<el-button @click="resetParams">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-card>
|
||||
<el-card class="!border-none" v-loading="pager.loading" shadow="never">
|
||||
<el-button v-perms="['InvoicingRequests.InvoicingRequests/add']" type="primary" @click="handleAdd">
|
||||
<template #icon>
|
||||
<icon name="el-icon-Plus" />
|
||||
</template>
|
||||
新增
|
||||
</el-button>
|
||||
<el-button v-perms="['InvoicingRequests.InvoicingRequests/delete']" :disabled="!selectData.length" @click="handleDelete(selectData)">
|
||||
删除
|
||||
</el-button>
|
||||
|
||||
<div class="mt-4">
|
||||
<el-table :data="pager.lists" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column label="序号" type="index" width="55" />
|
||||
<el-table-column label="处理流程" prop="customer_name" show-overflow-tooltip />
|
||||
<el-table-column label="流程步骤" prop="customer_name" show-overflow-tooltip />
|
||||
<el-table-column label="项目编码" prop="project_code" show-overflow-tooltip />
|
||||
<el-table-column label="项目名称" prop="project_name" show-overflow-tooltip />
|
||||
|
||||
<el-table-column label="询价日期" prop="invoicing_date" show-overflow-tooltip />
|
||||
|
||||
|
||||
|
||||
<el-table-column label="申请人" prop="tax" show-overflow-tooltip />
|
||||
<el-table-column label="备注" prop="tax" show-overflow-tooltip />
|
||||
<el-table-column label="附件" prop="tax" show-overflow-tooltip />
|
||||
<el-table-column label="添加人" prop="tax" show-overflow-tooltip />
|
||||
<el-table-column label="创建日期" prop="tax" show-overflow-tooltip />
|
||||
<el-table-column label="操作" width="160" fixed="right">
|
||||
<template #default="{ row }">
|
||||
<el-button v-perms="['InvoicingRequests.InvoicingRequests/edit']" type="primary" link @click="handleEdit(row)">
|
||||
编辑
|
||||
</el-button>
|
||||
<el-button v-perms="['InvoicingRequests.InvoicingRequests/delete']" type="danger" link @click="handleDelete(row.id)">
|
||||
删除
|
||||
</el-button>
|
||||
<el-button v-perms="['InvoicingRequests.InvoicingRequests/detail']" link @click="handledetail(row)">
|
||||
详情
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<div class="flex justify-end mt-4">
|
||||
<pagination v-model="pager" @change="getLists" />
|
||||
</div>
|
||||
</el-card>
|
||||
<edit-popup v-if="showEdit" ref="editRef" :dict-data="dictData" @success="getLists" @close="showEdit = false" />
|
||||
<detail-popup v-if="showDtail" ref="detailRef" :dict-data="dictData" @close="showDtail = false" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup name="projectLists">
|
||||
import { usePaging } from '@/hooks/usePaging'
|
||||
import { useDictData } from '@/hooks/useDictOptions'
|
||||
import { apiinvoiceapplyLists, apiinvoiceapplyDelete, apiinvoiceapplyDetail } from '@/api/InvoicingRequests'
|
||||
import { timeFormat } from '@/utils/util'
|
||||
import { apiContractLists } from '@/api/contract'
|
||||
import { apiCustomLists } from '@/api/custom'
|
||||
import { getAllProjectTypes } from '@/api/projecttype'
|
||||
const protype = reactive([])
|
||||
import feedback from '@/utils/feedback'
|
||||
import EditPopup from './edit.vue'
|
||||
import DetailPopup from './detail.vue'
|
||||
const detailRef = shallowRef<InstanceType<typeof DetailPopup>>()
|
||||
const editRef = shallowRef<InstanceType<typeof EditPopup>>()
|
||||
// 是否显示编辑框
|
||||
const showEdit = ref(false)
|
||||
|
||||
const showDtail = ref(false)
|
||||
|
||||
const list = ref([])
|
||||
const list1 = ref([])
|
||||
|
||||
// 查询条件
|
||||
const queryParams = reactive({
|
||||
invoicing_company_name: '',
|
||||
contract_id: '',
|
||||
customer_id: '',
|
||||
|
||||
|
||||
})
|
||||
|
||||
// 选中数据
|
||||
const selectData = ref<any[]>([])
|
||||
|
||||
// 表格选择后回调事件
|
||||
const handleSelectionChange = (val: any[]) => {
|
||||
selectData.value = val.map(({ id }) => id)
|
||||
}
|
||||
|
||||
// 获取字典数据
|
||||
const { dictData } = useDictData('pay_period,invoice_type')
|
||||
|
||||
// 分页相关
|
||||
const { pager, getLists, resetParams, resetPage } = usePaging({
|
||||
fetchFun: apiinvoiceapplyLists,
|
||||
params: queryParams
|
||||
})
|
||||
|
||||
// 添加
|
||||
const handleAdd = async () => {
|
||||
showEdit.value = true
|
||||
await nextTick()
|
||||
editRef.value?.open('add')
|
||||
}
|
||||
|
||||
// 编辑
|
||||
const handleEdit = async (data: any) => {
|
||||
let res = await apiinvoiceapplyDetail({ id: data.id })
|
||||
showEdit.value = true
|
||||
await nextTick()
|
||||
editRef.value?.open('edit')
|
||||
editRef.value?.setFormData(res)
|
||||
}
|
||||
|
||||
// 删除
|
||||
const handleDelete = async (id: number | any[]) => {
|
||||
await feedback.confirm('确定要删除?')
|
||||
await apiinvoiceapplyDelete({ id })
|
||||
getLists()
|
||||
}
|
||||
//详情
|
||||
const handledetail = async (data: any) => {
|
||||
let res = await apiinvoiceapplyDetail({ id: data.id })
|
||||
showDtail.value = true
|
||||
await nextTick()
|
||||
detailRef.value?.open()
|
||||
detailRef.value?.setFormData(res)
|
||||
}
|
||||
|
||||
//获取客户
|
||||
const getlist1 = () => {
|
||||
apiContractLists().then((res) => {
|
||||
list.value = res.lists
|
||||
})
|
||||
}
|
||||
|
||||
//获取合同
|
||||
const getlist2 = () => {
|
||||
apiCustomLists().then((res) => {
|
||||
// console.log(res)
|
||||
list1.value = res.lists
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
getlist1()
|
||||
getlist2()
|
||||
|
||||
|
||||
getLists()
|
||||
</script>
|
||||
|
@ -0,0 +1,283 @@
|
||||
|
||||
<template>
|
||||
<div class="detail-popup">
|
||||
<popup ref="popupRef" title="开票申请详情" :async="true" width="80%" @confirm="handleSubmit" @close="handleClose">
|
||||
<el-form ref="formRef" :model="formData" label-width="160px">
|
||||
<el-card class="mb-2">
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="项目名称">
|
||||
{{ formData.project_name }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="客户名称">
|
||||
{{ formData.custom.name }}
|
||||
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="项目编码">
|
||||
{{ formData.project_code
|
||||
}}
|
||||
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="合同编号">
|
||||
{{ formData.contract.contract_name }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="合同名称">
|
||||
{{ formData.contract ? formData.contract.contract_code : '暂无数据' }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="合同金额">
|
||||
{{ formData.contract.amount
|
||||
}}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="期次">
|
||||
<dict-value :options="dictData.pay_period" :value="formData.period" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="累计开票金额">
|
||||
{{ formData.accumulate_amount }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="累计回款金额">
|
||||
{{ formData.accumulated_payments_received }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="税率">
|
||||
{{ formData.tax_rate }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="发票类型">
|
||||
|
||||
<dict-value :options="dictData.invoice_type" :value="formData.invoice_type" />
|
||||
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="开票金额(含税)">
|
||||
{{ formData.invoicing_amount }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="金额大写">
|
||||
{{ formData.invoicing_amount_daxie }}
|
||||
</el-form-item>
|
||||
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="开票金额(税额)">
|
||||
{{ formData.invoicing_amount }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="开票金额(非税)">
|
||||
{{ formData.amount_including_tax }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="开票内容">
|
||||
{{ formData.content }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="发票编号">
|
||||
{{ formData.invoice_no }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="开票公司名称">
|
||||
{{ formData.invoicing_company_name }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="纳税人识别号">
|
||||
{{ formData.taxpayer_identification_number }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="开户银行">
|
||||
{{ formData.deposit_bank }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="账号">
|
||||
{{ formData.bank_accnout }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="开户地址及电话">
|
||||
{{ formData.address_phone }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="收票地址">
|
||||
{{ formData.receiving_address }}
|
||||
</el-form-item>
|
||||
</el-col> <el-col :span="8">
|
||||
<el-form-item label="联系人">
|
||||
{{ formData.contacts }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="联系电话">
|
||||
{{ formData.phone }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="邮寄时间">
|
||||
{{ formData.mailing_time }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="邮寄方式">
|
||||
{{ formData.mailing_type }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="邮寄单号">
|
||||
{{ formData.mailing_no }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="备注">
|
||||
{{ formData.remark }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="附件">
|
||||
<div v-for="(item, index) in formDataannex" style="margin-left: 5px;display: block;">
|
||||
<a style="margin-left: 10px; color: #4a5dff; align-self: flex-start" :href="item.uri" target="_blank">{{ item.name }}</a>
|
||||
<span style="cursor: pointer;margin-left: 5px;" @click="delFileFn(index)">x</span>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
|
||||
</el-row>
|
||||
</el-card>
|
||||
</el-form>
|
||||
</popup>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup name="customdetail">
|
||||
|
||||
import type { FormInstance } from 'element-plus'
|
||||
import Popup from '@/components/popup/index.vue'
|
||||
import { apiCustomDetail } from '@/api/custom'
|
||||
import { timeFormat } from '@/utils/util'
|
||||
import type { PropType } from 'vue'
|
||||
defineProps({
|
||||
dictData: {
|
||||
type: Object as PropType<Record<string, any[]>>,
|
||||
default: () => ({})
|
||||
}
|
||||
})
|
||||
const emit = defineEmits(['success', 'close'])
|
||||
const formRef = shallowRef<FormInstance>()
|
||||
const popupRef = shallowRef<InstanceType<typeof Popup>>()
|
||||
const formDataannex = reactive([])
|
||||
const datas = reactive({
|
||||
provinceOptions: [],
|
||||
cityOptions: [],
|
||||
areaOptions: [],
|
||||
});
|
||||
|
||||
|
||||
// 表单数据
|
||||
const formData = reactive({
|
||||
|
||||
})
|
||||
|
||||
|
||||
|
||||
|
||||
// 获取详情
|
||||
const setFormData = async (data: Record<any, any>) => {
|
||||
if (data.annex && data.annex.length > 0) {
|
||||
|
||||
const arry1 = data.annex.map((item: any, index: any) => {
|
||||
return {
|
||||
name: `文件${index + 1}`,
|
||||
uri: item
|
||||
};
|
||||
});
|
||||
Object.assign(formDataannex, arry1)
|
||||
|
||||
}
|
||||
|
||||
// for (const key in formData) {
|
||||
// if (data[key] != null && data[key] != undefined) {
|
||||
// //@ts-ignore
|
||||
// formData[key] = data[key]
|
||||
|
||||
// }
|
||||
|
||||
// }
|
||||
|
||||
Object.assign(formData, data)
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
const getDetail = async (row: Record<string, any>) => {
|
||||
const data = await apiCustomDetail({
|
||||
id: formData.id
|
||||
})
|
||||
setFormData(data)
|
||||
}
|
||||
|
||||
|
||||
// 提交按钮
|
||||
const handleSubmit = async () => {
|
||||
popupRef.value?.close()
|
||||
|
||||
}
|
||||
|
||||
//打开弹窗
|
||||
const open = () => {
|
||||
console.log('1111111')
|
||||
popupRef.value?.open()
|
||||
}
|
||||
|
||||
// 关闭回调
|
||||
const handleClose = () => {
|
||||
emit('close')
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
defineExpose({
|
||||
open,
|
||||
setFormData,
|
||||
getDetail
|
||||
})
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.tit {
|
||||
font-size: 1.2em;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
</style>
|
315
src/views/Materialmanagement/Selfpurchasereceipt_detail/edit.vue
Normal file
315
src/views/Materialmanagement/Selfpurchasereceipt_detail/edit.vue
Normal file
@ -0,0 +1,315 @@
|
||||
<template>
|
||||
<div class="edit-popup">
|
||||
|
||||
<popup ref="popupRef" :title="popupTitle" :async="true" width="80%" @confirm="handleSubmit" @close="handleClose">
|
||||
<el-steps :active="active" align-center style="margin-bottom: 20px;">
|
||||
<el-step title="Step 1" description="Some description" />
|
||||
<el-step title="Step 2" description="Some description" />
|
||||
<el-step title="Step 3" description="Some description" />
|
||||
<el-step title="Step 4" description="Some description" />
|
||||
</el-steps>
|
||||
|
||||
<el-form ref="formRef" :model="formData" label-width="auto" :rules="formRules">
|
||||
<el-row :gutter="10">
|
||||
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="项目名称" prop="contract_id" @click="showDialog1 = true">
|
||||
<el-input v-model="project_name" clearable disabled placeholder="系统自动填写" />
|
||||
</el-form-item>
|
||||
</el-col> <el-col :span="8">
|
||||
<el-form-item label="项目编码" prop="contract_id">
|
||||
<el-input v-model="project_code" clearable disabled placeholder="系统自动填写" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="formData.remark" type="textarea" clearable placeholder="请输入备注" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="申请日期" prop="invoicing_date" :rules="[{ required: true, message: '不可为空', trigger: 'change' }]">
|
||||
|
||||
<el-date-picker class="flex-1 !flex" v-model="formData.invoicing_date" clearable type="datetime" value-format="YYYY-MM-DD HH:mm:ss" placeholder="选择申请日期">
|
||||
</el-date-picker>
|
||||
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="希望到货日期" prop="invoicing_date" :rules="[{ required: true, message: '不可为空', trigger: 'change' }]">
|
||||
|
||||
<el-date-picker class="flex-1 !flex" v-model="formData.invoicing_date" clearable type="datetime" value-format="YYYY-MM-DD HH:mm:ss" placeholder="选择希望到货日期">
|
||||
</el-date-picker>
|
||||
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<!-- <el-form-item label="附件" prop="annex">
|
||||
<el-input v-model="formData.annex" clearable placeholder="请输入附件" />
|
||||
</el-form-item> -->
|
||||
<el-form-item label="附件" prop="field127">
|
||||
<el-upload accept="doc, docx, xls, xlsx, ppt, pptx, pdf, txt, zip, rar, tar, jpg, png, gif, jpeg, webp, wmv, avi, mpg, mpeg, 3gp, mov, mp4, flv, f4v, rmvb, mkv" class="upload-demo" :show-file-list="false" aria-hidden="true" :headers="{ Token: userStore.token }" :action="base_url + '/upload/file'" :on-success="handleAvatarSuccess_four" ref="upload">
|
||||
<el-button type="primary">
|
||||
上传
|
||||
</el-button>
|
||||
</el-upload>
|
||||
|
||||
<div>
|
||||
<div v-for="(item, index) in formDataannex" style="margin-left: 5px;display: block;">
|
||||
<a style="margin-left: 10px; color: #4a5dff; align-self: flex-start" :href="item.uri" target="_blank">{{ item.name }}</a>
|
||||
<span style="cursor: pointer;margin-left: 5px;" @click="delFileFn(index)">x</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-dialog v-model="showDialog" title="选择客户" width="70%">
|
||||
<customDialog @customEvent="customEvent"></customDialog>
|
||||
</el-dialog>
|
||||
<el-dialog v-model="showDialog1" title="选择合同" width="70%">
|
||||
<projectDialog @customEvent="customEvent1" contract_type="2"></projectDialog>
|
||||
</el-dialog>
|
||||
</el-form>
|
||||
</popup>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup name="projectEdit">
|
||||
import customDialog from '@/components/custom-dialog/index.vue'
|
||||
import type { FormInstance } from 'element-plus'
|
||||
import Popup from '@/components/popup/index.vue'
|
||||
import { toChinesNum } from "@/utils/util";
|
||||
import projectDialog from '@/components/project/index.vue'
|
||||
import { apiinvoiceapplyAdd, apiinvoiceapplyEdit, apiinvoiceapplyDetail } from '@/api/InvoicingRequests'
|
||||
import { getAllProjectTypes } from '@/api/projecttype'
|
||||
import { timeFormat } from '@/utils/util'
|
||||
import { isEmail, isIdCard, isPhone } from '@/utils/validate'
|
||||
import type { PropType } from 'vue'
|
||||
import configs from "@/config"
|
||||
import useUserStore from "@/stores/modules/user";
|
||||
const protype = reactive([])
|
||||
const base_url = configs.baseUrl + configs.urlPrefix
|
||||
const userStore = useUserStore();
|
||||
const active = ref(0)
|
||||
const formDataannex = reactive([])
|
||||
const contract_name = ref('')
|
||||
const project_name = ref('')
|
||||
const project_code = ref('')
|
||||
const project_amount = ref('')
|
||||
const contract_no = ref('')
|
||||
const custom_name = ref('')
|
||||
const next = () => {
|
||||
if (active.value++ > 3) active.value = 0
|
||||
}
|
||||
// 上传文件
|
||||
const handleAvatarSuccess_four = (
|
||||
response,
|
||||
uploadFile
|
||||
) => {
|
||||
if (response.code == 0) {
|
||||
ElMessage.error(response.msg);
|
||||
return;
|
||||
}
|
||||
formDataannex.push(
|
||||
{ uri: response.data.uri, name: response.data.name }
|
||||
|
||||
|
||||
);
|
||||
};
|
||||
//验证
|
||||
const checkPhone = (rule: any, value: any, callback: (arg0: Error) => any) => {
|
||||
|
||||
if (value && !/^1\d{10}$/.test(value)) {
|
||||
callback(new Error('请输入正确的手机号码'));
|
||||
} else {
|
||||
callback()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
const userEmail = (rule: any, value: string, callback: (arg0: Error | undefined) => void) => {
|
||||
|
||||
// const mailReg = /^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+(.[a-zA-Z0-9_-])+/
|
||||
// // if (!value) {
|
||||
// // return callback(new Error('邮箱不能为空'))
|
||||
// // }
|
||||
|
||||
|
||||
if (value && !mailReg.test(value)) {
|
||||
callback(new Error('请输入正确的邮箱格式'))
|
||||
} else {
|
||||
callback()
|
||||
}
|
||||
|
||||
};
|
||||
//监听输入
|
||||
const amountinput = (e) => {
|
||||
// console.log(e)
|
||||
if (e && e > 0) {
|
||||
formData.invoicing_amount_daxie = toChinesNum(e)
|
||||
}
|
||||
}
|
||||
// 删除上传的文件
|
||||
const delFileFn = (index: number) => {
|
||||
formDataannex.splice(index, 1)
|
||||
}
|
||||
defineProps({
|
||||
dictData: {
|
||||
type: Object as PropType<Record<string, any[]>>,
|
||||
default: () => ({})
|
||||
}
|
||||
})
|
||||
const emit = defineEmits(['success', 'close'])
|
||||
const formRef = shallowRef<FormInstance>()
|
||||
const popupRef = shallowRef<InstanceType<typeof Popup>>()
|
||||
const mode = ref('add')
|
||||
const showDialog = ref(false)
|
||||
const showDialog1 = ref(false)
|
||||
|
||||
const customEvent = (e: any) => {
|
||||
formData.customer_id = e.id;
|
||||
custom_name.value = e.name;
|
||||
showDialog.value = false;
|
||||
};
|
||||
const customEvent1 = (e: any) => {
|
||||
formData.contract_id = e.id;
|
||||
project_name.value = e.project_name;
|
||||
project_code.value = e.project_code;
|
||||
contract_name.value = e.contract_name;
|
||||
contract_no.value = e.contract_code
|
||||
project_amount.value = e.amount
|
||||
|
||||
showDialog1.value = false;
|
||||
};
|
||||
// 弹窗标题
|
||||
const popupTitle = computed(() => {
|
||||
return mode.value == 'edit' ? '编辑采购需求目表' : '新增采购需求表'
|
||||
})
|
||||
|
||||
// 表单数据
|
||||
const formData = reactive({
|
||||
id: '',
|
||||
customer_id: '',
|
||||
contract_id: '',
|
||||
approve_id: '',
|
||||
invoicing_date: "",
|
||||
period: "",
|
||||
accumulate_amount: '',
|
||||
accumulated_payments_received: '',
|
||||
tax_rate: "",
|
||||
invoice_type: '',
|
||||
invoicing_amount: '',
|
||||
invoicing_amount_daxie: "",
|
||||
tax: '',
|
||||
amount_including_tax: '',
|
||||
content: "",
|
||||
invoice_no: "",
|
||||
remark: "",
|
||||
annex: "",
|
||||
invoicing_company_name: "",
|
||||
taxpayer_identification_number: "",
|
||||
deposit_bank: "",
|
||||
bank_accnout: "",
|
||||
address_phone: "",
|
||||
receiving_address: "",
|
||||
contacts: "",
|
||||
phone: "",
|
||||
mailing_time: "",
|
||||
mailing_type: "",
|
||||
mailing_no: ""
|
||||
})
|
||||
|
||||
|
||||
// 表单验证
|
||||
const formRules = reactive<any>({
|
||||
|
||||
})
|
||||
|
||||
|
||||
// 获取详情
|
||||
const setFormData = async (data: Record<any, any>) => {
|
||||
if (data.annex && data.annex.length > 0) {
|
||||
|
||||
const arry1 = data.annex.map((item: any, index: any) => {
|
||||
return {
|
||||
name: `文件${index + 1}`,
|
||||
uri: item
|
||||
};
|
||||
});
|
||||
Object.assign(formDataannex, arry1)
|
||||
|
||||
}
|
||||
|
||||
|
||||
for (const key in formData) {
|
||||
if (data[key] != null && data[key] != undefined) {
|
||||
//@ts-ignore
|
||||
formData[key] = data[key]
|
||||
}
|
||||
}
|
||||
if (formData.invoicing_amount) {
|
||||
toChinesNum(formData.invoicing_amount)
|
||||
}
|
||||
custom_name.value = data.custom.name
|
||||
project_name.value = data.contract_name;
|
||||
project_code.value = data.contract_code
|
||||
project_amount.value = data.contract.amount
|
||||
contract_name.value = data.contract.contract_name;
|
||||
contract_no.value = data.contract.contract_code
|
||||
|
||||
|
||||
}
|
||||
const getDetail = async (row: Record<string, any>) => {
|
||||
const data = await apiinvoiceapplyDetail({
|
||||
id: row.id
|
||||
})
|
||||
setFormData(data)
|
||||
}
|
||||
|
||||
|
||||
// 提交按钮
|
||||
const handleSubmit = async () => {
|
||||
if (formDataannex.length > 0) {
|
||||
formData.annex = JSON.stringify(formDataannex.map((item: any) => item.uri))
|
||||
}
|
||||
|
||||
console.log(formRef.value?.validate(), '22222222')
|
||||
await formRef.value?.validate()
|
||||
|
||||
|
||||
const data = { ...formData }
|
||||
mode.value == 'edit'
|
||||
? await apiinvoiceapplyEdit(data)
|
||||
: await apiinvoiceapplyAdd(data)
|
||||
popupRef.value?.close()
|
||||
emit('success')
|
||||
}
|
||||
|
||||
//打开弹窗
|
||||
const open = (type = 'add') => {
|
||||
mode.value = type
|
||||
popupRef.value?.open()
|
||||
|
||||
getAllProjectTypes().then((res) => {
|
||||
|
||||
protype.splice(0, protype.length, ...res);
|
||||
})
|
||||
}
|
||||
|
||||
// 关闭回调
|
||||
const handleClose = () => {
|
||||
emit('close')
|
||||
}
|
||||
|
||||
|
||||
|
||||
defineExpose({
|
||||
open,
|
||||
setFormData,
|
||||
getDetail
|
||||
})
|
||||
</script>
|
@ -0,0 +1,195 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-card class="!border-none mb-4" shadow="never">
|
||||
<el-form class="mb-[-16px]" :model="queryParams" inline>
|
||||
<el-form-item label="开票公司名称" prop="invoicing_company_name">
|
||||
<el-input class="w-[280px]" v-model="queryParams.invoicing_company_name" clearable placeholder="请输入开票公司名称" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="客户" prop="customer_id">
|
||||
<el-select class="w-[280px]" v-model="queryParams.customer_id" clearable placeholder="请选择客户">
|
||||
<el-option label="全部" value=""></el-option>
|
||||
<el-option v-for="(item, i) in list1" :key="i" :label="item.name" :value="item.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="合同" prop="contract_id">
|
||||
<el-select class="w-[280px]" v-model="queryParams.contract_id" clearable placeholder="请选择合同">
|
||||
<el-option label="全部" value=""></el-option>
|
||||
<el-option v-for="(item, index) in list" :key="index" :label="item.contract_name" :value="item.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="resetPage">查询</el-button>
|
||||
<el-button @click="resetParams">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-card>
|
||||
<el-card class="!border-none" v-loading="pager.loading" shadow="never">
|
||||
<el-button v-perms="['InvoicingRequests.InvoicingRequests/add']" type="primary" @click="handleAdd">
|
||||
<template #icon>
|
||||
<icon name="el-icon-Plus" />
|
||||
</template>
|
||||
新增
|
||||
</el-button>
|
||||
<el-button v-perms="['InvoicingRequests.InvoicingRequests/delete']" :disabled="!selectData.length" @click="handleDelete(selectData)">
|
||||
删除
|
||||
</el-button>
|
||||
|
||||
<div class="mt-4">
|
||||
<el-table :data="pager.lists" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column label="序号" type="index" width="55" />
|
||||
|
||||
<el-table-column label="入库单号" prop="customer_name" show-overflow-tooltip />
|
||||
|
||||
<el-table-column label="项目名称" prop="project_name" show-overflow-tooltip />
|
||||
<el-table-column label="采购合同编号" prop="project_code" show-overflow-tooltip />
|
||||
<el-table-column label="供应商名称" prop="customer_name" show-overflow-tooltip />
|
||||
<el-table-column label="入库日期" prop="customer_name" show-overflow-tooltip />
|
||||
<el-table-column label="仓库" prop="invoicing_date" show-overflow-tooltip />
|
||||
<el-table-column label="材料类别" prop="invoicing_date" show-overflow-tooltip />
|
||||
<el-table-column label="材料中类" prop="invoicing_date" show-overflow-tooltip />
|
||||
<el-table-column label="材料小类" prop="invoicing_date" show-overflow-tooltip />
|
||||
<el-table-column label="材料名称" prop="invoicing_date" show-overflow-tooltip />
|
||||
<el-table-column label="材料编码" prop="invoicing_date" show-overflow-tooltip />
|
||||
<el-table-column label="规格型号" prop="invoicing_date" show-overflow-tooltip />
|
||||
<el-table-column label="品牌" prop="invoicing_date" show-overflow-tooltip />
|
||||
<el-table-column label="参数说明" prop="invoicing_date" show-overflow-tooltip />
|
||||
<el-table-column label="单位" prop="invoicing_date" show-overflow-tooltip />
|
||||
<el-table-column label="数量" prop="invoicing_date" show-overflow-tooltip />
|
||||
<el-table-column label="含税单价" prop="invoicing_date" show-overflow-tooltip />
|
||||
<el-table-column label="税率" prop="invoicing_date" show-overflow-tooltip />
|
||||
<el-table-column label="不含税金额" prop="invoicing_date" show-overflow-tooltip />
|
||||
<el-table-column label="含税金额" prop="invoicing_date" show-overflow-tooltip />
|
||||
<el-table-column label="备注" prop="invoicing_date" show-overflow-tooltip />
|
||||
|
||||
|
||||
|
||||
<el-table-column label="操作" width="160" fixed="right">
|
||||
<template #default="{ row }">
|
||||
<el-button v-perms="['InvoicingRequests.InvoicingRequests/edit']" type="primary" link @click="handleEdit(row)">
|
||||
编辑
|
||||
</el-button>
|
||||
<el-button v-perms="['InvoicingRequests.InvoicingRequests/delete']" type="danger" link @click="handleDelete(row.id)">
|
||||
删除
|
||||
</el-button>
|
||||
<el-button v-perms="['InvoicingRequests.InvoicingRequests/detail']" link @click="handledetail(row)">
|
||||
详情
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<div class="flex justify-end mt-4">
|
||||
<pagination v-model="pager" @change="getLists" />
|
||||
</div>
|
||||
</el-card>
|
||||
<edit-popup v-if="showEdit" ref="editRef" :dict-data="dictData" @success="getLists" @close="showEdit = false" />
|
||||
<detail-popup v-if="showDtail" ref="detailRef" :dict-data="dictData" @close="showDtail = false" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup name="projectLists">
|
||||
import { usePaging } from '@/hooks/usePaging'
|
||||
import { useDictData } from '@/hooks/useDictOptions'
|
||||
import { apiinvoiceapplyLists, apiinvoiceapplyDelete, apiinvoiceapplyDetail } from '@/api/InvoicingRequests'
|
||||
import { timeFormat } from '@/utils/util'
|
||||
import { apiContractLists } from '@/api/contract'
|
||||
import { apiCustomLists } from '@/api/custom'
|
||||
import { getAllProjectTypes } from '@/api/projecttype'
|
||||
const protype = reactive([])
|
||||
import feedback from '@/utils/feedback'
|
||||
import EditPopup from './edit.vue'
|
||||
import DetailPopup from './detail.vue'
|
||||
const detailRef = shallowRef<InstanceType<typeof DetailPopup>>()
|
||||
const editRef = shallowRef<InstanceType<typeof EditPopup>>()
|
||||
// 是否显示编辑框
|
||||
const showEdit = ref(false)
|
||||
|
||||
const showDtail = ref(false)
|
||||
|
||||
const list = ref([])
|
||||
const list1 = ref([])
|
||||
|
||||
// 查询条件
|
||||
const queryParams = reactive({
|
||||
invoicing_company_name: '',
|
||||
contract_id: '',
|
||||
customer_id: '',
|
||||
|
||||
|
||||
})
|
||||
|
||||
// 选中数据
|
||||
const selectData = ref<any[]>([])
|
||||
|
||||
// 表格选择后回调事件
|
||||
const handleSelectionChange = (val: any[]) => {
|
||||
selectData.value = val.map(({ id }) => id)
|
||||
}
|
||||
|
||||
// 获取字典数据
|
||||
const { dictData } = useDictData('pay_period,invoice_type')
|
||||
|
||||
// 分页相关
|
||||
const { pager, getLists, resetParams, resetPage } = usePaging({
|
||||
fetchFun: apiinvoiceapplyLists,
|
||||
params: queryParams
|
||||
})
|
||||
|
||||
// 添加
|
||||
const handleAdd = async () => {
|
||||
showEdit.value = true
|
||||
await nextTick()
|
||||
editRef.value?.open('add')
|
||||
}
|
||||
|
||||
// 编辑
|
||||
const handleEdit = async (data: any) => {
|
||||
let res = await apiinvoiceapplyDetail({ id: data.id })
|
||||
showEdit.value = true
|
||||
await nextTick()
|
||||
editRef.value?.open('edit')
|
||||
editRef.value?.setFormData(res)
|
||||
}
|
||||
|
||||
// 删除
|
||||
const handleDelete = async (id: number | any[]) => {
|
||||
await feedback.confirm('确定要删除?')
|
||||
await apiinvoiceapplyDelete({ id })
|
||||
getLists()
|
||||
}
|
||||
//详情
|
||||
const handledetail = async (data: any) => {
|
||||
let res = await apiinvoiceapplyDetail({ id: data.id })
|
||||
showDtail.value = true
|
||||
await nextTick()
|
||||
detailRef.value?.open()
|
||||
detailRef.value?.setFormData(res)
|
||||
}
|
||||
|
||||
//获取客户
|
||||
const getlist1 = () => {
|
||||
apiContractLists().then((res) => {
|
||||
list.value = res.lists
|
||||
})
|
||||
}
|
||||
|
||||
//获取合同
|
||||
const getlist2 = () => {
|
||||
apiCustomLists().then((res) => {
|
||||
// console.log(res)
|
||||
list1.value = res.lists
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
getlist1()
|
||||
getlist2()
|
||||
|
||||
|
||||
getLists()
|
||||
</script>
|
||||
|
@ -5,188 +5,190 @@
|
||||
<div class="detail-popup">
|
||||
<popup ref="popupRef" title="客户详情" :async="true" width="80%" @confirm="handleSubmit" @close="handleClose">
|
||||
<el-form ref="formRef" :model="formData" label-width="90px">
|
||||
<el-card class="mb-2">
|
||||
<div class="tit">客户基本资料1</div>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="客户姓名">
|
||||
{{ formData.name }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick">
|
||||
<el-tab-pane label="客户信息" name="new_name_1">
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="客户属性">
|
||||
{{ formData.custom_type }}
|
||||
<el-card class="mb-2">
|
||||
<div class="tit">客户基本资料1</div>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="客户姓名">
|
||||
{{ formData.name }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="上级公司">
|
||||
{{ formData.parent_company }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="电话" prop="phone" :rules="[{ validator: checkPhone, trigger: 'blur' }]">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="客户属性">
|
||||
{{ formData.custom_type_text
|
||||
}}
|
||||
|
||||
{{ formData.phone }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="上级公司">
|
||||
{{ formData.parent_company }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="电话" prop="phone" :rules="[{ validator: checkPhone, trigger: 'blur' }]">
|
||||
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="16">
|
||||
<el-form-item label="信用度" prop="credit_rating">
|
||||
{{ formData.phone }}
|
||||
|
||||
{{ formData.credit_rating }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item label="省" prop="province" :rules="[{ required: true, message: '不可为空', trigger: 'blur' }]">
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="16">
|
||||
<el-form-item label="信用度" prop="credit_rating_text">
|
||||
|
||||
{{ formData.province }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item label="市" prop="city" :rules="[{ required: true, message: '不可为空', trigger: 'blur' }]">
|
||||
{{ formData.credit_rating_text }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item label="省">
|
||||
|
||||
{{ formData.city }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item label="区" prop="area" :rules="[{ required: true, message: '不可为空', trigger: 'blur' }]">
|
||||
{{ formData.province_name }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item label="市">
|
||||
|
||||
{{ formData.area }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="地址" prop="address">
|
||||
{{ formData.city_name }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item label="区">
|
||||
|
||||
{{ formData.address }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="备注" prop="notes">
|
||||
{{ formData.notes }}
|
||||
</el-form-item>
|
||||
{{ formData.area_name }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="地址" prop="address">
|
||||
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-card>
|
||||
{{ formData.address }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="备注" prop="notes">
|
||||
{{ formData.notes }}
|
||||
</el-form-item>
|
||||
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-card>
|
||||
<el-card class="mb-2">
|
||||
<div class="tit">主要负责人</div>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="姓名" prop="master_name">
|
||||
|
||||
{{ formData.master_name }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="职位" prop="master_position">
|
||||
|
||||
{{ formData.master_position }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="手机" prop="master_phone">
|
||||
|
||||
{{ formData.master_phone }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="邮箱" prop="master_email">
|
||||
|
||||
{{ formData.master_email }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="电话" prop="master_telephone">
|
||||
|
||||
{{ formData.master_telephone }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="备注" prop="master_notes">
|
||||
{{ formData.master_notes }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-card>
|
||||
<el-card class="mb-2">
|
||||
<div class="tit">其他联系人</div>
|
||||
<el-row>
|
||||
<el-table :data="contactsList">
|
||||
|
||||
<el-table-column label="序号" type="index" width="55" />
|
||||
<el-table-column label="组织" prop="org_name" show-overflow-tooltip />
|
||||
<el-table-column label="部门" prop="dept_name" show-overflow-tooltip />
|
||||
<el-table-column label="姓名" prop="name" show-overflow-tooltip />
|
||||
<el-table-column label="职位" prop="position" show-overflow-tooltip />
|
||||
<el-table-column label="手机" prop="phone" show-overflow-tooltip />
|
||||
<el-table-column label="电话" prop="telephone" show-overflow-tooltip />
|
||||
<el-table-column label="邮箱" prop="email" show-overflow-tooltip />
|
||||
<el-table-column label="备注" prop="notes" show-overflow-tooltip />
|
||||
</el-table>
|
||||
|
||||
|
||||
<el-card class="mb-2">
|
||||
<div class="tit">主要负责人</div>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="姓名" prop="master_name">
|
||||
</el-row>
|
||||
|
||||
{{ formData.master_name }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="职位" prop="master_position">
|
||||
</el-card>
|
||||
<el-card class="mb-2">
|
||||
<div class="tit">开票信息</div>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="开票公司" prop="company_name">
|
||||
{{ formData.company_name }}
|
||||
</el-form-item>
|
||||
|
||||
{{ formData.master_position }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="手机" prop="master_phone">
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="纳税人识别" prop="company_tin">
|
||||
{{ formData.company_tin }}
|
||||
</el-form-item>
|
||||
|
||||
{{ formData.master_phone }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="邮箱" prop="master_email">
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="开户地址" prop="bank_open_address">
|
||||
{{ formData.bank_open_address }}
|
||||
</el-form-item>
|
||||
|
||||
{{ formData.master_email }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="电话" prop="master_telephone">
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="公司电话" prop="company_telephone">
|
||||
{{ formData.company_telephone }}
|
||||
</el-form-item>
|
||||
|
||||
{{ formData.master_telephone }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="备注" prop="master_notes">
|
||||
{{ formData.master_notes }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-card>
|
||||
<el-card class="mb-2">
|
||||
<div class="tit">其他联系人</div>
|
||||
<el-row>
|
||||
<template v-for="(item, index) in formData.other_contacts" :key="index">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="姓名" prop="field120">
|
||||
{{ item.name }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="开户银行" prop="bank_name">
|
||||
{{ formData.bank_name }}
|
||||
</el-form-item>
|
||||
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="职务" prop="field121">
|
||||
{{ item.position }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="银行账号" prop="bank_account">
|
||||
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="手机" prop="field122">
|
||||
{{ item.phone }}
|
||||
</el-form-item>
|
||||
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="邮箱">
|
||||
{{ item.email }}
|
||||
</el-form-item>
|
||||
|
||||
</el-col>
|
||||
</template>
|
||||
{{ formData.bank_account }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-card>
|
||||
|
||||
|
||||
</el-row>
|
||||
|
||||
</el-card>
|
||||
<el-card class="mb-2">
|
||||
<div class="tit">开票信息</div>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="开票公司" prop="company_name">
|
||||
{{ formData.company_name }}
|
||||
</el-form-item>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="项目" name="new_name_2">Config</el-tab-pane>
|
||||
<el-tab-pane label="报价" name="new_name_3">Role</el-tab-pane>
|
||||
<el-tab-pane label="合同" name="new_name_4">Task</el-tab-pane>
|
||||
<el-tab-pane label="订单" name="new_name_5">Task</el-tab-pane>
|
||||
<el-tab-pane label="发票" name="new_name_6">Task</el-tab-pane>
|
||||
<el-tab-pane label="回款" name="new_name_7">Task</el-tab-pane>
|
||||
<el-tab-pane label="售后" name="new_name_8">Task</el-tab-pane>
|
||||
</el-tabs>
|
||||
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="纳税人识别" prop="company_tin">
|
||||
{{ formData.company_tin }}
|
||||
</el-form-item>
|
||||
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="开户地址" prop="bank_open_address">
|
||||
{{ formData.bank_open_address }}
|
||||
</el-form-item>
|
||||
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="公司电话" prop="company_telephone">
|
||||
{{ formData.company_telephone }}
|
||||
</el-form-item>
|
||||
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="开户银行" prop="bank_name">
|
||||
{{ formData.bank_name }}
|
||||
</el-form-item>
|
||||
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="银行账号" prop="bank_account">
|
||||
|
||||
{{ formData.bank_account }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-card>
|
||||
</el-form>
|
||||
</popup>
|
||||
</div>
|
||||
@ -200,8 +202,10 @@ import {
|
||||
} from "@/api/common";
|
||||
import type { FormInstance } from 'element-plus'
|
||||
import Popup from '@/components/popup/index.vue'
|
||||
import { apiCustomContactsLists } from '@/api/custom_contacts'
|
||||
import { apiCustomDetail } from '@/api/custom'
|
||||
import { timeFormat } from '@/utils/util'
|
||||
import type { TabsPaneContext } from 'element-plus'
|
||||
import type { PropType } from 'vue'
|
||||
defineProps({
|
||||
dictData: {
|
||||
@ -213,67 +217,52 @@ const emit = defineEmits(['success', 'close'])
|
||||
const formRef = shallowRef<FormInstance>()
|
||||
const popupRef = shallowRef<InstanceType<typeof Popup>>()
|
||||
|
||||
|
||||
const activeName = ref('new_name_1')
|
||||
|
||||
const handleClick = (tab: TabsPaneContext, event: Event) => {
|
||||
console.log(tab, event)
|
||||
}
|
||||
const datas = reactive({
|
||||
provinceOptions: [],
|
||||
cityOptions: [],
|
||||
areaOptions: [],
|
||||
});
|
||||
|
||||
const contactsList = ref([])
|
||||
|
||||
// 表单数据
|
||||
const formData = reactive({
|
||||
id: '',
|
||||
name: '',
|
||||
custom_type: '',
|
||||
parent_company: 5565665,
|
||||
phone: '',
|
||||
credit_rating: '',
|
||||
province: '',
|
||||
city: '',
|
||||
street: '',
|
||||
address: '',
|
||||
notes: '',
|
||||
master_name: '',
|
||||
master_position: '',
|
||||
master_phone: '',
|
||||
master_email: '',
|
||||
master_telephone: '',
|
||||
master_notes: '',
|
||||
company_name: '',
|
||||
company_tin: '',
|
||||
bank_open_address: '',
|
||||
company_telephone: '',
|
||||
bank_name: '',
|
||||
bank_account: '',
|
||||
status: '',
|
||||
other_contacts: [],
|
||||
area: ""
|
||||
|
||||
})
|
||||
|
||||
|
||||
// 获取详情
|
||||
const setFormData = async (data: Record<any, any>) => {
|
||||
for (const key in formData) {
|
||||
if (data[key] != null && data[key] != undefined) {
|
||||
//@ts-ignore
|
||||
formData[key] = data[key]
|
||||
// for (const key in formData) {
|
||||
// if (data[key] != null && data[key] != undefined) {
|
||||
// //@ts-ignore
|
||||
// formData[key] = data[key]
|
||||
|
||||
if (key == 'province') {
|
||||
await getCityList()
|
||||
}
|
||||
if (key == 'city') {
|
||||
await getAreaList()
|
||||
}
|
||||
// if (key == 'province') {
|
||||
// await getCityList()
|
||||
// }
|
||||
// if (key == 'city') {
|
||||
// await getAreaList()
|
||||
// }
|
||||
|
||||
}
|
||||
// }
|
||||
|
||||
}
|
||||
formData.other_contacts = JSON.parse(formData.other_contacts)
|
||||
|
||||
console.log(formData, '2222222222')
|
||||
// }
|
||||
|
||||
Object.assign(formData, data)
|
||||
|
||||
getcontacts(data)
|
||||
}
|
||||
const getcontacts = async (row: Record<string, any>) => {
|
||||
const data = await apiCustomContactsLists({
|
||||
custom_id: row.id
|
||||
})
|
||||
contactsList.value = data.lists
|
||||
}
|
||||
|
||||
const getDetail = async (row: Record<string, any>) => {
|
||||
|
@ -506,8 +506,10 @@ const getDetail = async (row: Record<string, any>) => {
|
||||
|
||||
// 提交按钮
|
||||
const handleSubmit = async () => {
|
||||
if (formData.other_contacts && formData.other_contacts.length > 0) {
|
||||
if (formData.other_contacts && formData.other_contacts.length > 0 && mode.value == 'add') {
|
||||
formData.other_contacts = JSON.stringify(formData.other_contacts)
|
||||
} else {
|
||||
delete formData.other_contacts
|
||||
}
|
||||
|
||||
await formRef.value?.validate()
|
||||
@ -559,8 +561,6 @@ const getAreaList = async () => {
|
||||
|
||||
|
||||
getProvinceList();
|
||||
|
||||
|
||||
defineExpose({
|
||||
open,
|
||||
setFormData,
|
||||
|
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div>
|
||||
<Statistics :list="list"></Statistics>
|
||||
<!-- <Statistics :list="list"></Statistics> -->
|
||||
<el-card class="!border-none mb-4" shadow="never">
|
||||
<el-form class="mb-[-16px]" :model="queryParams" label-width="auto" inline>
|
||||
<el-form-item label="客户名称" prop="name">
|
||||
@ -39,8 +39,6 @@
|
||||
删除
|
||||
</el-button>
|
||||
<div class="mt-4">
|
||||
|
||||
|
||||
<el-table :data="pager.lists" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column label="序号" type="index" width="55" />
|
||||
@ -64,8 +62,8 @@
|
||||
</el-table-column> -->
|
||||
<el-table-column label="省" prop="province_name" show-overflow-tooltip />
|
||||
<el-table-column label="职务" prop="master_position" show-overflow-tooltip />
|
||||
<el-table-column label="电话" prop="master_telephone" show-overflow-tooltip />
|
||||
<el-table-column label="手机" prop="master_phone" show-overflow-tooltip />
|
||||
<el-table-column label="电话" prop="master_telephone" show-overflow-tooltip />
|
||||
<el-table-column label="备注" prop="master_notes" show-overflow-tooltip />
|
||||
<el-table-column label="负责人" prop="master_name" show-overflow-tooltip />
|
||||
<el-table-column label="创建时间" prop="create_time" show-overflow-tooltip />
|
||||
|
@ -45,6 +45,18 @@
|
||||
{{ formData.notes }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="附件" prop="notes">
|
||||
<div v-if="formData.annex && formData.annex.length > 0">
|
||||
<div v-for="(item, index) in formData.annex" style="margin-left: 5px;display: block;">
|
||||
<a style="margin-left: 10px; color: #4a5dff; align-self: flex-start" :href="item.uri" target="_blank">文件{{ index + 1 }} 查看</a>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else>
|
||||
暂无文件
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-card>
|
||||
</el-form>
|
||||
@ -78,50 +90,23 @@ const datas = reactive({
|
||||
|
||||
// 表单数据
|
||||
const formData = reactive({
|
||||
id: '',
|
||||
name: '',
|
||||
custom_type: '',
|
||||
parent_company: 5565665,
|
||||
phone: '',
|
||||
credit_rating: '',
|
||||
province: '',
|
||||
city: '',
|
||||
street: '',
|
||||
address: '',
|
||||
notes: '',
|
||||
master_name: '',
|
||||
master_position: '',
|
||||
master_phone: '',
|
||||
master_email: '',
|
||||
master_telephone: '',
|
||||
master_notes: '',
|
||||
company_name: '',
|
||||
company_tin: '',
|
||||
bank_open_address: '',
|
||||
company_telephone: '',
|
||||
bank_name: '',
|
||||
bank_account: '',
|
||||
status: '',
|
||||
other_contacts: [],
|
||||
area: ""
|
||||
|
||||
})
|
||||
|
||||
|
||||
// 获取详情
|
||||
const setFormData = async (data: Record<any, any>) => {
|
||||
for (const key in formData) {
|
||||
if (data[key] != null && data[key] != undefined) {
|
||||
//@ts-ignore
|
||||
formData[key] = data[key]
|
||||
// for (const key in formData) {
|
||||
// if (data[key] != null && data[key] != undefined) {
|
||||
// //@ts-ignore
|
||||
// formData[key] = data[key]
|
||||
|
||||
}
|
||||
// }
|
||||
|
||||
}
|
||||
// }
|
||||
Object.assign(formData, data)
|
||||
|
||||
|
||||
console.log(formData, '2222222222')
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
@ -4,8 +4,8 @@
|
||||
<el-form ref="formRef" :model="formData" label-width="90px" :rules="formRules">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="客户名称" prop="custom_name">
|
||||
<el-input v-model="formData.custom_name" clearable placeholder="请选择客户" @click="showDialog = true" />
|
||||
<el-form-item label="客户名称" prop="custom_name" @click="showDialog = true">
|
||||
<el-input v-model="formData.custom_name" readonly clearable placeholder="请选择客户" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
@ -24,12 +24,12 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="电话" prop="telephone" :rules="[{ validator: checkPhone, trigger: 'blur' }]">
|
||||
<el-form-item label="电话" prop="telephone">
|
||||
<el-input v-model="formData.telephone" clearable placeholder="请输入电话" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12" :rules="[{ validator: userEmail, trigger: 'blur' }]">
|
||||
<el-form-item label="邮箱" prop="email">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="邮箱" prop="email" :rules="[{ validator: userEmail, trigger: 'blur' }]">
|
||||
<el-input v-model="formData.email" clearable placeholder="请输入邮箱" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@ -175,33 +175,23 @@ const getDetail = async (row: Record<string, any>) => {
|
||||
})
|
||||
setFormData(data)
|
||||
}
|
||||
|
||||
//验证
|
||||
const checkPhone = (rule: any, value: any, callback: (arg0: Error) => any) => {
|
||||
const phoneReg = /^1[3|4|5|7|8][0-9]{9}$/
|
||||
// if (!value) {
|
||||
// return callback(new Error('电话号码不能为空'))
|
||||
// }
|
||||
setTimeout(() => {
|
||||
if (phoneReg.test(value)) {
|
||||
callback()
|
||||
} else {
|
||||
callback(new Error('电话号码格式不正确'))
|
||||
}
|
||||
|
||||
}, 100)
|
||||
if (value && !/^1[3|4|5|7|8][0-9]{9}$/.test(value)) {
|
||||
callback(new Error('请输入正确的手机号码'));
|
||||
} else {
|
||||
callback()
|
||||
}
|
||||
|
||||
}
|
||||
const userEmail = (rule: any, value: string, callback: (arg0: Error | undefined) => void) => {
|
||||
const mailReg = /^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+(.[a-zA-Z0-9_-])+/
|
||||
if (!value) {
|
||||
return callback(new Error('邮箱不能为空'))
|
||||
if (value && !mailReg.test(value)) {
|
||||
return callback(new Error('请输入正确的邮箱格式'))
|
||||
} else {
|
||||
callback()
|
||||
}
|
||||
setTimeout(() => {
|
||||
if (mailReg.test(value)) {
|
||||
callback()
|
||||
} else {
|
||||
callback(new Error('请输入正确的邮箱格式'))
|
||||
}
|
||||
}, 100)
|
||||
};
|
||||
// 提交按钮
|
||||
const handleSubmit = async () => {
|
||||
|
@ -28,7 +28,8 @@
|
||||
<el-table :data="pager.lists" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column label="序号" type="index" width="55" />
|
||||
<el-table-column label="组织" prop="custom_id" show-overflow-tooltip />
|
||||
<el-table-column label="组织" prop="org_name" show-overflow-tooltip />
|
||||
<el-table-column label="部门" prop="dept_name" show-overflow-tooltip />
|
||||
<el-table-column label="姓名" prop="name" show-overflow-tooltip />
|
||||
<el-table-column label="职位" prop="position" show-overflow-tooltip />
|
||||
<el-table-column label="手机" prop="phone" show-overflow-tooltip />
|
||||
|
@ -5,8 +5,8 @@
|
||||
<el-form-item label="主题" prop="name" :rules="[{ required: true, message: '不可为空', trigger: 'blur' }]">
|
||||
<el-input v-model="formData.name" clearable placeholder="请输入主题" />
|
||||
</el-form-item>
|
||||
<el-form-item label="客户名称" prop="custom_name">
|
||||
<el-input v-model="formData.custom_name" @click="showDialog = true" clearable placeholder="请选择客户" />
|
||||
<el-form-item label="客户名称" prop="custom_id" @click="showDialog = true">
|
||||
<el-input v-model="formData.custom_name" readonly clearable placeholder="请选择客户" />
|
||||
</el-form-item>
|
||||
<el-form-item label="联系人" prop="contacts">
|
||||
<el-input v-model="formData.contacts" clearable placeholder="请输入联系人" />
|
||||
|
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div>
|
||||
<Statistics :list="list"></Statistics>
|
||||
<!-- <Statistics :list="list"></Statistics> -->
|
||||
<el-card class="!border-none mb-4" shadow="never">
|
||||
<el-form class="mb-[-16px]" :model="queryParams" inline>
|
||||
<el-form-item label="联系人" prop="contacts">
|
||||
|
@ -1,64 +1,156 @@
|
||||
|
||||
<template>
|
||||
<div class="detail-popup">
|
||||
<popup ref="popupRef" title="售后详情" :async="true" width="80%" @confirm="handleSubmit" @close="handleClose">
|
||||
<el-form ref="formRef" :model="formData" label-width="120px">
|
||||
<popup ref="popupRef" title="售后工单详情" :async="true" width="80%" @confirm="handleSubmit" @close="handleClose">
|
||||
<el-form ref="formRef" :model="formData" label-width="auto">
|
||||
<el-card class="mb-2">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="项目名称">
|
||||
|
||||
{{ formData.name }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="项目编码">
|
||||
|
||||
{{ formData.name }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="客户名称">
|
||||
{{ formData.contacts }}
|
||||
{{ formData.custom_name
|
||||
}}
|
||||
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="合同号">
|
||||
{{ formData.contract_code }}
|
||||
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="联系人">
|
||||
{{ formData.contacts }}
|
||||
{{ formData.custom_master_name }}
|
||||
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="联系电话">
|
||||
{{ formData.phone }}
|
||||
{{ formData.custom_master_phone
|
||||
}}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="分类">
|
||||
|
||||
<dict-value :options="dictData.classification" :value="formData.classification" />
|
||||
{{ formData.classification_text
|
||||
}}
|
||||
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="紧急程度">
|
||||
<dict-value :options="dictData.urgency" :value="formData.urgency" />
|
||||
{{ formData.urgency_text
|
||||
}}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="处理结果">
|
||||
{{ formData.processing_result_text
|
||||
}}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="接待人">
|
||||
{{ formData.receiver }}
|
||||
</el-form-item>
|
||||
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="投诉人">
|
||||
{{ formData.custom_master_name }}
|
||||
</el-form-item>
|
||||
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="指定处理人" prop="notes">
|
||||
{{ formData.processed_user_name
|
||||
}}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="花费工时" prop="notes">
|
||||
{{ formData.processing_hours }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="完成日期" prop="notes">
|
||||
{{ formData.done_date
|
||||
}}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="投诉主题" prop="notes">
|
||||
{{ formData.name }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="问题描述" prop="description">
|
||||
{{ formData.description }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="处理过程" prop="description">
|
||||
{{ formData.processing_process }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="回访确认" prop="description">
|
||||
{{ formData.description }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="备注" prop="notes
|
||||
">
|
||||
{{ formData.notes }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="问题描述" prop="notes">
|
||||
{{ formData.name }}
|
||||
<el-form-item label="附件">
|
||||
<div v-if="formData.annex && formData.annex.length > 0">
|
||||
<div v-for="(item, index) in formData.annex" style="margin-left: 5px;display: block;">
|
||||
<a style="margin-left: 10px; color: #4a5dff; align-self: flex-start" :href="item.uri" target="_blank">文件{{ index + 1 }}查看</a>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div v-else>暂无附件</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<div style="margin-bottom: 20px;">客户评价</div>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="整体评价" prop="score">
|
||||
<el-rate v-model="formData.score" disabled size="large" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="问题是否解决" prop="is_solve_text">
|
||||
{{ formData.is_solve_text }}
|
||||
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="反馈意见" prop="feedback">
|
||||
{{ formData.feedback }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-card>
|
||||
</el-form>
|
||||
@ -92,39 +184,14 @@ const datas = reactive({
|
||||
|
||||
// 表单数据
|
||||
const formData = reactive({
|
||||
id: '',
|
||||
project_id: '',
|
||||
custom_id: '',
|
||||
approve_id: '',
|
||||
contacts: '',
|
||||
phone: '',
|
||||
date: '',
|
||||
classification: '',
|
||||
urgency: '',
|
||||
receiver: '',
|
||||
processed_admin_id: '',
|
||||
name: '',
|
||||
description: '',
|
||||
notes: '',
|
||||
annex: [],
|
||||
status: '',
|
||||
|
||||
})
|
||||
|
||||
|
||||
|
||||
// 获取详情
|
||||
const setFormData = async (data: Record<any, any>) => {
|
||||
for (const key in formData) {
|
||||
if (data[key] != null && data[key] != undefined) {
|
||||
//@ts-ignore
|
||||
formData[key] = data[key]
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
console.log(formData, '2222222222')
|
||||
Object.assign(formData, data)
|
||||
|
||||
|
||||
}
|
||||
|
@ -15,7 +15,7 @@
|
||||
<el-row :gutter="10">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="项目名称" prop="project_id" @click="showDialog = true">
|
||||
<el-input v-model="project_name" readonly clearable placeholder="请输入项目名称" />
|
||||
<el-input v-model="project_name" readonly clearable placeholder="请选择项目" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
@ -24,8 +24,8 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="客户名称" prop="custom_id" @click="showDialog1 = true" :rules="[{ required: true, message: '不可为空', trigger: 'blur' }]">
|
||||
<el-input v-model="custom_name" readonly clearable placeholder="请选择客户名称" />
|
||||
<el-form-item label="客户名称" prop="project_id" :rules="[{ required: true, message: '不可为空', trigger: 'blur' }]">
|
||||
<el-input v-model="custom_name" disabled clearable placeholder="系统自动填写" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
@ -93,6 +93,7 @@
|
||||
<el-input v-model="formData.description" clearable placeholder="请输入问题描述" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item label="备注" prop="notes">
|
||||
<el-input v-model="formData.notes" clearable placeholder="请输入备注" />
|
||||
@ -123,14 +124,14 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<reviewprocess :list="list" />
|
||||
<!-- <reviewprocess :list="list" /> -->
|
||||
</popup>
|
||||
|
||||
<el-dialog v-model="showDialog" title="选择项目" width="70%">
|
||||
<peojectDialog @customEvent="customEvent"></peojectDialog>
|
||||
</el-dialog>
|
||||
<el-dialog v-model="showDialog1" title="选择客户" width="70%">
|
||||
<peojectDialog @customEvent="customEvent1"></peojectDialog>
|
||||
<customDialog @customEvent="customEvent1"></customDialog>
|
||||
</el-dialog>
|
||||
<el-dialog v-model="showDialog2" title="选择销售合同" width="70%">
|
||||
<salescontractDialog @customEvent="customEvent2" contract_type="2"></salescontractDialog>
|
||||
@ -144,7 +145,7 @@ import type { FormInstance } from 'element-plus'
|
||||
import Popup from '@/components/popup/index.vue'
|
||||
import customDialog from '@/components/custom-dialog/index.vue'
|
||||
import salescontractDialog from '@/components/salescontract/index.vue'
|
||||
import { apiCustomServiceAdd, apiCustomServiceEdit, apiCustomServiceDetail } from '@/api/custom_service'
|
||||
import { apiCustomServiceAdd, apiCustomServiceDetail } from '@/api/custom_service'
|
||||
import personnelselector from '@/components/personnelselector/index.vue'
|
||||
import { timeFormat } from '@/utils/util'
|
||||
import type { PropType } from 'vue'
|
||||
@ -172,15 +173,16 @@ const formDataannex = reactive([])
|
||||
const customEvent = (e: any) => {
|
||||
// console.log(e)
|
||||
formData.project_id = e.id
|
||||
project_name.value = e.name
|
||||
custom_name.value = e.name
|
||||
project_name.value = e.custom_name
|
||||
project_code.value = e.project_code
|
||||
showDialog.value = false;
|
||||
|
||||
|
||||
};
|
||||
const customEvent1 = (e: any) => {
|
||||
formData.custom_id = e.custom_id
|
||||
custom_name.value = e.custom_name
|
||||
formData.custom_id = e.id
|
||||
custom_name.value = e.name
|
||||
showDialog1.value = false;
|
||||
|
||||
|
||||
@ -283,8 +285,6 @@ const formData = reactive({
|
||||
dept_id: '',
|
||||
org_id: '',
|
||||
project_id: '',
|
||||
custom_id: '',
|
||||
approve_id: 1,
|
||||
contacts: '',
|
||||
phone: '',
|
||||
date: '',
|
||||
@ -348,9 +348,7 @@ const handleSubmit = async () => {
|
||||
}
|
||||
await formRef.value?.validate()
|
||||
const data = { ...formData, }
|
||||
mode.value == 'edit'
|
||||
? await apiCustomServiceEdit(data)
|
||||
: await apiCustomServiceAdd(data)
|
||||
await apiCustomServiceAdd(data)
|
||||
popupRef.value?.close()
|
||||
emit('success')
|
||||
}
|
||||
|
284
src/views/custom_service/handle.vue
Normal file
284
src/views/custom_service/handle.vue
Normal file
@ -0,0 +1,284 @@
|
||||
<template>
|
||||
<div class="edit-popup">
|
||||
<popup ref="popupRef" title="售后工单处理" :async="true" width="80%" @confirm="handleSubmit" @close="handleClose">
|
||||
<el-form ref="formRef" :model="formData" label-width="auto" :rules="formRules">
|
||||
|
||||
|
||||
<el-row :gutter="10">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="组织" prop="project_id">
|
||||
<el-input v-model="formData.project_name" disabled clearable />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="部门" prop="project_id">
|
||||
<el-input v-model="formData.org_name" disabled clearable />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="项目名称" prop="project_id">
|
||||
<el-input v-model="formData.project_name" disabled clearable placeholder="请选择项目" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="项目编码" prop="project_id">
|
||||
<el-input v-model="formData.project_code" clearable disabled placeholder="系统自动填写" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="客户名称" prop="project_id" :rules="[{ required: true, message: '不可为空', trigger: 'blur' }]">
|
||||
<el-input v-model="formData.custom_name" disabled clearable placeholder="系统自动填写" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="合同号" prop="project_id" @click="showDialog2 = true">
|
||||
<el-input v-model="project_code" clearable disabled placeholder="系统自动填写" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="联系人" prop="contacts">
|
||||
<el-input v-model="formData.contacts" disabled clearable placeholder="请输入联系人" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="联系电话" prop="phone" :rules="[{ validator: checkPhone, trigger: 'blur' }]">
|
||||
<el-input v-model="formData.phone" disabled clearable placeholder="请输入联系电话" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="日期" prop="date" :rules="[{ required: true, message: '不可为空', trigger: 'blur' }]">
|
||||
<el-date-picker class="flex-1 !flex" disabled v-model="formData.date" clearable type="date" value-format="YYYY-MM-DD" placeholder="选择日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="分类" prop="classification" :rules="[{ required: true, message: '不可为空', trigger: 'blur' }]">
|
||||
<el-select class="flex-1" v-model="formData.classification" disabled clearable placeholder="请选择分类">
|
||||
<el-option v-for="(item, index) in dictData.classification" :key="index" :label="item.name" :value="parseInt(item.value)" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="紧急程度" prop="urgency" :rules="[{ required: true, message: '不可为空', trigger: 'blur' }]">
|
||||
<el-radio-group v-model="formData.urgency" disabled placeholder="请选择紧急程度">
|
||||
<el-radio v-for="(item, index) in dictData.urgency" :key="index" :label="parseInt(item.value)">
|
||||
{{ item.name }}
|
||||
</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="接待人" prop="receiver" :rules="[{ required: true, message: '不可为空', trigger: 'blur' }]">
|
||||
<el-input v-model="formData.receiver" disabled clearable placeholder="请输入接待人" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="指定处理人" prop="processed_admin_id" @click="userclick" :rules="[{ required: true, message: '不可为空', trigger: 'blur' }]">
|
||||
<el-input v-model="formData.processed_user_name" disabled clearable readonly placeholder="请输入指定处理人" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="投诉主题" prop="name" :rules="[{ required: true, message: '不可为空', trigger: 'blur' }]">
|
||||
<el-input v-model="formData.name" clearable disabled placeholder="请输入投诉主题" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="问题描述" prop="description">
|
||||
<el-input v-model="formData.description" disabled clearable placeholder="请输入问题描述" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8" v-if="formData.processing_process">
|
||||
<el-form-item label="处理过程" prop="processing_process">
|
||||
<el-input v-model="formData.processing_process" disabled clearable placeholder="请输入处理过程" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8" v-if="formData.done_date">
|
||||
<el-form-item label="完成日期" prop="done_date">
|
||||
<el-input v-model="formData.done_date" disabled clearable placeholder="请输入完成日期" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8" v-if="formData.processing_result_text">
|
||||
<el-form-item label="处理结果" prop="processing_result_text">
|
||||
<el-input v-model="formData.processing_result_text" disabled clearable placeholder="请输入处理结果" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8" v-if="formData.processing_hours">
|
||||
<el-form-item label="花费工时" prop="processing_hours">
|
||||
<el-input v-model="formData.processing_hours" disabled clearable placeholder="请输入处理结果" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="备注" prop="notes">
|
||||
<el-input v-model="formData.notes" disabled type="textarea" clearable placeholder="请输入备注" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
|
||||
<!-- <material-picker v-model="formData.annex" /> -->
|
||||
<el-form-item label="附件" prop="field87">
|
||||
<div v-if="formData.annex && formData.annex.length > 0">
|
||||
<div v-for="(item, index) in formData.annex" style="margin-left: 5px;display: block;">
|
||||
<a style="margin-left: 10px; color: #4a5dff; align-self: flex-start" :href="item.uri" target="_blank">文件{{ index + 1 }}查看</a>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</el-form-item>
|
||||
|
||||
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
</el-form>
|
||||
|
||||
|
||||
|
||||
<el-form ref="formRef1" :model="formData1" label-width="auto" :rules="formRules">
|
||||
<el-row :gutter="10">
|
||||
<el-col :span="8" v-if="!formData.processing_result_text">
|
||||
<el-form-item label="处理结果" prop="processing_result">
|
||||
<el-radio-group v-model="formData1.processing_result" placeholder="请选择处理结果">
|
||||
<el-radio v-for="(item, index) in dictData.custom_service_solv_result" :key="index" :label="parseInt(item.value)">
|
||||
{{ item.name }}
|
||||
</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8" v-if="!formData.processing_process">
|
||||
<el-form-item label="处理过程" prop="processing_process">
|
||||
<el-input v-model="formData1.processing_process" clearable placeholder="请输入处理过程" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8" v-if="!formData.processing_hours">
|
||||
<el-form-item label="花费工时" prop="processing_hours">
|
||||
<el-input v-model="formData1.processing_hours" type="number" clearable placeholder="请输入花费工时" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8" v-if="!formData.done_date">
|
||||
<el-form-item label="完成日期" prop="done_date">
|
||||
<el-date-picker class="flex-1 !flex" v-model="formData1.done_date" clearable type="date" value-format="YYYY-MM-DD" placeholder="选择日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<div style="margin-bottom: 30px;">客户评价</div>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="整体评价" prop="score">
|
||||
<el-rate v-model="formData1.score" size="large" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="问题是否解决" prop="is_solve">
|
||||
|
||||
<el-radio-group v-model="formData1.is_solve" placeholder="问题是否解决">
|
||||
<el-radio v-for="(item, index) in dictData.is_solve" :key="index" :label="parseInt(item.value)">
|
||||
{{ item.name }}
|
||||
</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="反馈意见" prop="feedback">
|
||||
<el-input v-model="formData1.feedback" type="textarea" clearable placeholder="请输入反馈意见" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<!-- <reviewprocess :list="list" /> -->
|
||||
</popup>
|
||||
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup name="customServiceEdit">
|
||||
import type { FormInstance } from 'element-plus'
|
||||
import Popup from '@/components/popup/index.vue'
|
||||
import { apiCustomServiceSolve } from '@/api/custom_service'
|
||||
import { timeFormat } from '@/utils/util'
|
||||
import type { PropType } from 'vue'
|
||||
import useUserStore from "@/stores/modules/user";
|
||||
defineProps({
|
||||
dictData: {
|
||||
type: Object as PropType<Record<string, any[]>>,
|
||||
default: () => ({})
|
||||
}
|
||||
})
|
||||
const emit = defineEmits(['success', 'close'])
|
||||
const formRef = shallowRef<FormInstance>()
|
||||
const formRef1 = shallowRef<FormInstance>()
|
||||
const popupRef = shallowRef<InstanceType<typeof Popup>>()
|
||||
// 表单数据
|
||||
const formData = reactive({
|
||||
|
||||
})
|
||||
|
||||
const formData1 = reactive({
|
||||
id: '',
|
||||
processing_result: '',
|
||||
processing_process: '',
|
||||
processing_hours: '',
|
||||
done_date: '',
|
||||
score: 0,
|
||||
is_solve: '',
|
||||
feedback: '',
|
||||
})
|
||||
|
||||
|
||||
// 表单验证
|
||||
const formRules = reactive<any>({
|
||||
|
||||
})
|
||||
|
||||
|
||||
// 获取详情
|
||||
const setFormData = async (data: Record<any, any>) => {
|
||||
|
||||
|
||||
for (const key in formData1) {
|
||||
console.log(key)
|
||||
if (data[key] != null && data[key] != undefined) {
|
||||
//@ts-ignore
|
||||
formData1[key] = data[key]
|
||||
}
|
||||
|
||||
}
|
||||
console.log(formData1)
|
||||
Object.assign(formData, data)
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// 提交按钮
|
||||
const handleSubmit = async () => {
|
||||
|
||||
await formRef1.value?.validate()
|
||||
const data = { ...formData1, }
|
||||
|
||||
await apiCustomServiceSolve(data)
|
||||
popupRef.value?.close()
|
||||
emit('success')
|
||||
}
|
||||
|
||||
//打开弹窗
|
||||
const open = () => {
|
||||
popupRef.value?.open()
|
||||
}
|
||||
|
||||
// 关闭回调
|
||||
const handleClose = () => {
|
||||
emit('close')
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
open,
|
||||
setFormData
|
||||
|
||||
})
|
||||
</script>
|
@ -1,14 +1,14 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-card class="!border-none mb-4" shadow="never">
|
||||
<el-form class="mb-[-16px]" :model="queryParams" inline>
|
||||
<el-form class="mb-[-16px]" :model="queryParams" label-width="auto" inline>
|
||||
<el-form-item label="项目" prop="project_id">
|
||||
<el-select v-model="queryParams.project_id" clearable placeholder="请选择项目">
|
||||
<el-select class="w-[280px]" v-model="queryParams.project_id" clearable placeholder="请选择项目">
|
||||
<el-option v-for="(item, index) in projectList" :key="index" :label="item.name" :value="parseInt(item.id)" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="客户" prop="custom_id">
|
||||
<el-select v-model="queryParams.custom_id" clearable placeholder="请选择项目">
|
||||
<el-select class="w-[280px]" v-model="queryParams.custom_id" clearable placeholder="请选择项目">
|
||||
<el-option v-for="(item, index) in customList" :key="index" :label="item.name" :value="parseInt(item.id)" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
@ -19,6 +19,29 @@
|
||||
<el-option v-for="(item, index) in dictData.urgency" :key="index" :label="item.name" :value="item.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="分类" prop="classification">
|
||||
<el-select class="w-[280px]" v-model="queryParams.classification" clearable placeholder="请选择紧急程度">
|
||||
<el-option label="全部" value=""></el-option>
|
||||
<el-option v-for="(item, index) in dictData.classification" :key="index" :label="item.name" :value="item.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="处理结果" prop="processing_result">
|
||||
<el-input class="w-[280px]" v-model="queryParams.processing_result" clearable placeholder="请输入处理结果" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="指定处理人" prop="processed_user">
|
||||
<el-input class="w-[280px]" v-model="queryParams.processed_user" clearable placeholder="请输入指定处理人" />
|
||||
</el-form-item>
|
||||
|
||||
|
||||
<el-form-item label="投诉主题" prop="name">
|
||||
<el-input class="w-[280px]" v-model="queryParams.name" clearable placeholder="请输入投诉主题" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="接待人" prop="receiver">
|
||||
<el-input class="w-[280px]" v-model="queryParams.receiver" clearable placeholder="请输入接待人" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="resetPage">查询</el-button>
|
||||
<el-button @click="resetParams">重置</el-button>
|
||||
@ -32,9 +55,9 @@
|
||||
</template>
|
||||
新增
|
||||
</el-button>
|
||||
<el-button v-perms="['custom_service.custom_service/delete']" :disabled="!selectData.length" @click="handleDelete(selectData)">
|
||||
<!-- <el-button v-perms="['custom_service.custom_service/delete']" :disabled="!selectData.length" @click="handleDelete(selectData)">
|
||||
删除
|
||||
</el-button>
|
||||
</el-button> -->
|
||||
<div class="mt-4">
|
||||
<el-table :data="pager.lists" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" />
|
||||
@ -44,42 +67,27 @@
|
||||
<el-table-column label="客户名称" prop="custom_name" />
|
||||
<el-table-column label="项目名称" prop="project_name" />
|
||||
<el-table-column label="项目编码" prop="project_code" show-overflow-tooltip />
|
||||
<el-table-column label="合同编号" prop="" show-overflow-tooltip />
|
||||
<el-table-column label="合同编号" prop="contract_code" show-overflow-tooltip />
|
||||
<el-table-column label="投诉主题" prop="name" show-overflow-tooltip />
|
||||
<el-table-column label="日期" prop="date" show-overflow-tooltip />
|
||||
<el-table-column label="接待人" prop="receiver" show-overflow-tooltip />
|
||||
<el-table-column label="分类" prop="classification">
|
||||
<template #default="{ row }">
|
||||
<dict-value :options="dictData.classification" :value="row.classification" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="投诉人" prop="" show-overflow-tooltip />
|
||||
<el-table-column label="分类" prop="classification" show-overflow-tooltip />
|
||||
<el-table-column label="投诉人" prop="custom_master_name" show-overflow-tooltip />
|
||||
<el-table-column label="联系电话" prop="phone" show-overflow-tooltip />
|
||||
<el-table-column label="处理结果" prop="" show-overflow-tooltip />
|
||||
<el-table-column label="紧急程度" prop="urgency">
|
||||
<el-table-column label="处理结果" prop="processing_result" show-overflow-tooltip />
|
||||
<el-table-column label="紧急程度" prop="urgency" show-overflow-tooltip />
|
||||
<el-table-column label="指定处理人" prop="processed_user" width="105" show-overflow-tooltip />
|
||||
<el-table-column label="问题是否解决" prop="is_solve_text" width="110" show-overflow-tooltip />
|
||||
<el-table-column label="完成日期" prop="done_date" show-overflow-tooltip />
|
||||
<el-table-column label="评分" prop="score" show-overflow-tooltip />
|
||||
<el-table-column label="操作" width="110" fixed="right">
|
||||
<template #default="{ row }">
|
||||
<dict-value :options="dictData.urgency" :value="row.urgency" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="指定处理人" prop="processed_admin_name" show-overflow-tooltip />
|
||||
<el-table-column label="问题是否解决" prop="" show-overflow-tooltip />
|
||||
<el-table-column label="完成日期" prop="" show-overflow-tooltip />
|
||||
<el-table-column label="评分" prop="" show-overflow-tooltip />
|
||||
<el-table-column label="工时" prop="" show-overflow-tooltip />
|
||||
<el-table-column label="单价" prop="" show-overflow-tooltip />
|
||||
<el-table-column label="工时费用" prop="" show-overflow-tooltip />
|
||||
|
||||
|
||||
|
||||
<el-table-column label="操作" width="160" fixed="right">
|
||||
<template #default="{ row }">
|
||||
<el-button v-perms="['custom_service.custom_service/edit']" type="primary" link @click="handleEdit(row)">
|
||||
编辑
|
||||
<el-button v-perms="['custom_service.custom_service/edit']" type="primary" link @click="handleEdit(row)" v-if="row.is_solve != 1">
|
||||
处理
|
||||
</el-button>
|
||||
<el-button v-perms="['custom_service.custom_service/delete']" type="danger" link @click="handleDelete(row.id)">
|
||||
<!-- <el-button v-perms="['custom_service.custom_service/delete']" type="danger" link @click="handleDelete(row.id)">
|
||||
删除
|
||||
</el-button>
|
||||
</el-button> -->
|
||||
<el-button v-perms="['custom_service.custom_service/detail']" link @click="handledetail(row)">
|
||||
详情
|
||||
</el-button>
|
||||
@ -92,6 +100,7 @@
|
||||
</div>
|
||||
</el-card>
|
||||
<edit-popup v-if="showEdit" ref="editRef" :dict-data="dictData" @success="getLists" @close="showEdit = false" />
|
||||
<handle-popup v-if="showHandle" ref="handleRef" :dict-data="dictData" @success="getLists" @close="showEdit = false" />
|
||||
<detail-popup v-if="showDtail" ref="detailRef" :dict-data="dictData" @close="showDtail = false" />
|
||||
</div>
|
||||
</template>
|
||||
@ -99,18 +108,20 @@
|
||||
<script lang="ts" setup name="customServiceLists">
|
||||
import { usePaging } from '@/hooks/usePaging'
|
||||
import { useDictData } from '@/hooks/useDictOptions'
|
||||
import { apiCustomServiceLists, apiCustomServiceDelete, apiCustomServiceDetail } from '@/api/custom_service'
|
||||
import { apiCustomServiceLists, apiCustomServiceDetail } from '@/api/custom_service'
|
||||
import { timeFormat } from '@/utils/util'
|
||||
import feedback from '@/utils/feedback'
|
||||
import { apiProjectLists } from '@/api/project'
|
||||
import { apiCustomLists } from '@/api/custom'
|
||||
import EditPopup from './edit.vue'
|
||||
import HandlePopup from './handle.vue'
|
||||
import DetailPopup from './detail.vue'
|
||||
const detailRef = shallowRef<InstanceType<typeof DetailPopup>>()
|
||||
const editRef = shallowRef<InstanceType<typeof EditPopup>>()
|
||||
const handleRef = shallowRef<InstanceType<typeof HandlePopup>>()
|
||||
// 是否显示编辑框
|
||||
const showEdit = ref(false)
|
||||
|
||||
const showHandle = ref(false)
|
||||
const showDtail = ref(false)
|
||||
const projectList = ref([])
|
||||
const customList = ref([])
|
||||
@ -120,7 +131,11 @@ const queryParams = reactive({
|
||||
project_id: '',
|
||||
custom_id: '',
|
||||
urgency: '',
|
||||
|
||||
receiver: '',
|
||||
name: '',
|
||||
processed_user: '',
|
||||
processing_result: '',
|
||||
classification: '',
|
||||
})
|
||||
|
||||
// 选中数据
|
||||
@ -132,7 +147,7 @@ const handleSelectionChange = (val: any[]) => {
|
||||
}
|
||||
|
||||
// 获取字典数据
|
||||
const { dictData } = useDictData('classification,urgency')
|
||||
const { dictData } = useDictData('classification,urgency,custom_service_solv_result,is_solve')
|
||||
|
||||
// 分页相关
|
||||
const { pager, getLists, resetParams, resetPage } = usePaging({
|
||||
@ -148,20 +163,28 @@ const handleAdd = async () => {
|
||||
}
|
||||
|
||||
// 编辑
|
||||
// const handleEdit = async (data: any) => {
|
||||
// let res = await apiCustomServiceDetail({ id: data.id })
|
||||
// showEdit.value = true
|
||||
// await nextTick()
|
||||
// editRef.value?.open('edit')
|
||||
// editRef.value?.setFormData(res)
|
||||
// }
|
||||
|
||||
//处理
|
||||
const handleEdit = async (data: any) => {
|
||||
let res = await apiCustomServiceDetail({ id: data.id })
|
||||
showEdit.value = true
|
||||
showHandle.value = true
|
||||
await nextTick()
|
||||
editRef.value?.open('edit')
|
||||
editRef.value?.setFormData(res)
|
||||
handleRef.value?.open('edit')
|
||||
handleRef.value?.setFormData(res)
|
||||
}
|
||||
|
||||
// 删除
|
||||
const handleDelete = async (id: number | any[]) => {
|
||||
await feedback.confirm('确定要删除?')
|
||||
await apiCustomServiceDelete({ id })
|
||||
getLists()
|
||||
}
|
||||
// const handleDelete = async (id: number | any[]) => {
|
||||
// await feedback.confirm('确定要删除?')
|
||||
// await apiCustomServiceDelete({ id })
|
||||
// getLists()
|
||||
// }
|
||||
//详情
|
||||
const handledetail = async (data: any) => {
|
||||
let res = await apiCustomServiceDetail({ id: data.id })
|
||||
|
@ -70,7 +70,7 @@
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="发票金额大写" prop="invoice_amount_daxie">
|
||||
<el-input v-model="formData.invoice_amount_daxie" readonly clearable placeholder="请输入金额大写" />
|
||||
<el-input v-model="formData.invoice_amount_daxie" clearable disabled placeholder="请输入金额大写" />
|
||||
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@ -252,7 +252,7 @@ const customEvent1 = (e: any) => {
|
||||
const amountinput = (e) => {
|
||||
// console.log(e)
|
||||
if (e && e > 0) {
|
||||
formData.amount_daxie = toChinesNum(e)
|
||||
formData.invoice_amount_daxie = toChinesNum(e)
|
||||
}
|
||||
}
|
||||
// 弹窗标题
|
||||
@ -300,7 +300,9 @@ const setFormData = async (data: Record<any, any>) => {
|
||||
|
||||
|
||||
}
|
||||
|
||||
if (data.invoice_amount_daxie) {
|
||||
toChinesNum(data.invoice_amount_daxie)
|
||||
}
|
||||
|
||||
for (const key in formData) {
|
||||
if (data[key] != null && data[key] != undefined) {
|
||||
|
283
src/views/ordermanagement/saleorder/detail.vue
Normal file
283
src/views/ordermanagement/saleorder/detail.vue
Normal file
@ -0,0 +1,283 @@
|
||||
|
||||
<template>
|
||||
<div class="detail-popup">
|
||||
<popup ref="popupRef" title="开票申请详情" :async="true" width="80%" @confirm="handleSubmit" @close="handleClose">
|
||||
<el-form ref="formRef" :model="formData" label-width="160px">
|
||||
<el-card class="mb-2">
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="项目名称">
|
||||
{{ formData.project_name }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="客户名称">
|
||||
{{ formData.custom.name }}
|
||||
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="项目编码">
|
||||
{{ formData.project_code
|
||||
}}
|
||||
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="合同编号">
|
||||
{{ formData.contract.contract_name }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="合同名称">
|
||||
{{ formData.contract ? formData.contract.contract_code : '暂无数据' }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="合同金额">
|
||||
{{ formData.contract.amount
|
||||
}}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="期次">
|
||||
<dict-value :options="dictData.pay_period" :value="formData.period" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="累计开票金额">
|
||||
{{ formData.accumulate_amount }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="累计回款金额">
|
||||
{{ formData.accumulated_payments_received }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="税率">
|
||||
{{ formData.tax_rate }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="发票类型">
|
||||
|
||||
<dict-value :options="dictData.invoice_type" :value="formData.invoice_type" />
|
||||
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="开票金额(含税)">
|
||||
{{ formData.invoicing_amount }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="金额大写">
|
||||
{{ formData.invoicing_amount_daxie }}
|
||||
</el-form-item>
|
||||
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="开票金额(税额)">
|
||||
{{ formData.invoicing_amount }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="开票金额(非税)">
|
||||
{{ formData.amount_including_tax }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="开票内容">
|
||||
{{ formData.content }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="发票编号">
|
||||
{{ formData.invoice_no }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="开票公司名称">
|
||||
{{ formData.invoicing_company_name }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="纳税人识别号">
|
||||
{{ formData.taxpayer_identification_number }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="开户银行">
|
||||
{{ formData.deposit_bank }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="账号">
|
||||
{{ formData.bank_accnout }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="开户地址及电话">
|
||||
{{ formData.address_phone }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="收票地址">
|
||||
{{ formData.receiving_address }}
|
||||
</el-form-item>
|
||||
</el-col> <el-col :span="8">
|
||||
<el-form-item label="联系人">
|
||||
{{ formData.contacts }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="联系电话">
|
||||
{{ formData.phone }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="邮寄时间">
|
||||
{{ formData.mailing_time }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="邮寄方式">
|
||||
{{ formData.mailing_type }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="邮寄单号">
|
||||
{{ formData.mailing_no }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="备注">
|
||||
{{ formData.remark }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="附件">
|
||||
<div v-for="(item, index) in formDataannex" style="margin-left: 5px;display: block;">
|
||||
<a style="margin-left: 10px; color: #4a5dff; align-self: flex-start" :href="item.uri" target="_blank">{{ item.name }}</a>
|
||||
<span style="cursor: pointer;margin-left: 5px;" @click="delFileFn(index)">x</span>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
|
||||
</el-row>
|
||||
</el-card>
|
||||
</el-form>
|
||||
</popup>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup name="customdetail">
|
||||
|
||||
import type { FormInstance } from 'element-plus'
|
||||
import Popup from '@/components/popup/index.vue'
|
||||
import { apiCustomDetail } from '@/api/custom'
|
||||
import { timeFormat } from '@/utils/util'
|
||||
import type { PropType } from 'vue'
|
||||
defineProps({
|
||||
dictData: {
|
||||
type: Object as PropType<Record<string, any[]>>,
|
||||
default: () => ({})
|
||||
}
|
||||
})
|
||||
const emit = defineEmits(['success', 'close'])
|
||||
const formRef = shallowRef<FormInstance>()
|
||||
const popupRef = shallowRef<InstanceType<typeof Popup>>()
|
||||
const formDataannex = reactive([])
|
||||
const datas = reactive({
|
||||
provinceOptions: [],
|
||||
cityOptions: [],
|
||||
areaOptions: [],
|
||||
});
|
||||
|
||||
|
||||
// 表单数据
|
||||
const formData = reactive({
|
||||
|
||||
})
|
||||
|
||||
|
||||
|
||||
|
||||
// 获取详情
|
||||
const setFormData = async (data: Record<any, any>) => {
|
||||
if (data.annex && data.annex.length > 0) {
|
||||
|
||||
const arry1 = data.annex.map((item: any, index: any) => {
|
||||
return {
|
||||
name: `文件${index + 1}`,
|
||||
uri: item
|
||||
};
|
||||
});
|
||||
Object.assign(formDataannex, arry1)
|
||||
|
||||
}
|
||||
|
||||
// for (const key in formData) {
|
||||
// if (data[key] != null && data[key] != undefined) {
|
||||
// //@ts-ignore
|
||||
// formData[key] = data[key]
|
||||
|
||||
// }
|
||||
|
||||
// }
|
||||
|
||||
Object.assign(formData, data)
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
const getDetail = async (row: Record<string, any>) => {
|
||||
const data = await apiCustomDetail({
|
||||
id: formData.id
|
||||
})
|
||||
setFormData(data)
|
||||
}
|
||||
|
||||
|
||||
// 提交按钮
|
||||
const handleSubmit = async () => {
|
||||
popupRef.value?.close()
|
||||
|
||||
}
|
||||
|
||||
//打开弹窗
|
||||
const open = () => {
|
||||
console.log('1111111')
|
||||
popupRef.value?.open()
|
||||
}
|
||||
|
||||
// 关闭回调
|
||||
const handleClose = () => {
|
||||
emit('close')
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
defineExpose({
|
||||
open,
|
||||
setFormData,
|
||||
getDetail
|
||||
})
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.tit {
|
||||
font-size: 1.2em;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
</style>
|
587
src/views/ordermanagement/saleorder/edit.vue
Normal file
587
src/views/ordermanagement/saleorder/edit.vue
Normal file
@ -0,0 +1,587 @@
|
||||
<template>
|
||||
<div class="edit-popup">
|
||||
|
||||
<popup ref="popupRef" :title="popupTitle" :async="true" width="80%" @confirm="handleSubmit" @close="handleClose">
|
||||
<el-steps :active="active" align-center style="margin-bottom: 20px;">
|
||||
<el-step title="销售发起" description="Some description" />
|
||||
<el-step title="事业部销售总监" description="Some description" />
|
||||
<el-step title="财务负责人" description="Some description" />
|
||||
<el-step title="事业部副总经理审批" description="Some description" />
|
||||
<el-step title="事业部总经理审批" description="Some description" />
|
||||
<el-step title="销售副总" description="Some description" />
|
||||
</el-steps>
|
||||
<div style="display: flex; flex-direction: row-reverse; justify-content: flex-start;margin-bottom: 30px;">
|
||||
|
||||
<el-select class="w-[180px]" v-model="formData.dept_id" clearable placeholder="请选择部门">
|
||||
<el-option v-for="(item, index) in list2" :key="index" :label="item.name" :value="item.id" />
|
||||
</el-select>
|
||||
<el-select class="w-[180px]" v-model="formData.org_id" clearable placeholder="请选择组织" @change="deptrmt">
|
||||
<el-option v-for="(item, index) in list1" :key="index" :label="item.name" :value="item.id" />
|
||||
</el-select>
|
||||
</div>
|
||||
|
||||
<el-form ref="formRef" :model="formData" label-width="auto" :rules="formRules">
|
||||
<el-row :gutter="10">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="客户名称" prop="contract_id">
|
||||
<el-input v-model="project_name" clearable disabled placeholder="点击选择客户" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="业务负责人" prop="contract_id">
|
||||
<el-input v-model="project_name" clearable disabled placeholder="业务负责人" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="合同编号" prop="contract_id">
|
||||
<el-input v-model="project_name" clearable disabled placeholder="系统自动填写" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="合同名称" prop="contract_id">
|
||||
<el-input v-model="project_name" clearable placeholder="请输入合同名称" />
|
||||
</el-form-item>
|
||||
</el-col> <el-col :span="8">
|
||||
<el-form-item label="甲方" prop="contract_id">
|
||||
<el-input v-model="project_name" clearable placeholder="请输入甲方" />
|
||||
</el-form-item>
|
||||
</el-col> <el-col :span="8">
|
||||
<el-form-item label="乙方" prop="contract_id">
|
||||
<el-input v-model="project_name" clearable placeholder="点击选择签约主体" />
|
||||
</el-form-item>
|
||||
</el-col> <el-col :span="8">
|
||||
<el-form-item label="签约人" prop="contract_id">
|
||||
<el-input v-model="project_name" clearable placeholder="请输入签约人" />
|
||||
</el-form-item>
|
||||
</el-col> <el-col :span="8">
|
||||
<el-form-item label="签约人" prop="contract_id">
|
||||
<el-input v-model="project_name" clearable placeholder="请输入签约人" />
|
||||
</el-form-item>
|
||||
</el-col> <el-col :span="8">
|
||||
<el-form-item label="通讯地址" prop="contract_id">
|
||||
<el-input v-model="project_name" clearable placeholder="请输入通讯地址" />
|
||||
</el-form-item>
|
||||
</el-col> <el-col :span="8">
|
||||
<el-form-item label="通讯地址" prop="contract_id">
|
||||
<el-input v-model="project_name" clearable disabled placeholder="通讯地址" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="联系电话" prop="contract_id">
|
||||
<el-input v-model="project_name" clearable disabled placeholder="联系电话" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="联系电话" prop="contract_id">
|
||||
<el-input v-model="project_name" clearable disabled placeholder="联系电话" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="邮箱" prop="contract_id">
|
||||
<el-input v-model="project_name" clearable disabled placeholder="邮箱" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="邮箱" prop="contract_id">
|
||||
<el-input v-model="project_name" clearable disabled placeholder="邮箱" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="项目名称" prop="contract_id">
|
||||
<el-input v-model="project_name" clearable disabled placeholder="项目名称" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="分类" prop="contract_id">
|
||||
<el-input v-model="project_name" clearable disabled placeholder="分类" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="状态" prop="contract_id">
|
||||
<el-input v-model="project_name" clearable disabled placeholder="状态" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="付款方式" prop="contract_id">
|
||||
<el-input v-model="project_name" clearable disabled placeholder="付款方式" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="开始日期" prop="contract_id">
|
||||
<el-date-picker class="flex-1 !flex" v-model="formData.invoicing_date" clearable type="datetime" value-format="YYYY-MM-DD HH:mm:ss" placeholder="选择结束日期
|
||||
">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="结束日期" prop="contract_id">
|
||||
<el-date-picker class="flex-1 !flex" v-model="formData.invoicing_date" clearable type="datetime" value-format="YYYY-MM-DD HH:mm:ss" placeholder="选择结束日期
|
||||
"> </el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="订单金额" prop="contract_id">
|
||||
<el-input v-model="project_name" clearable disabled placeholder="订单金额" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="税率" prop="contract_id">
|
||||
<el-input v-model="project_name" clearable disabled placeholder="税率" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="运费" prop="contract_id">
|
||||
<el-input v-model="project_name" clearable disabled placeholder="运费" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="其它费用" prop="contract_id">
|
||||
<el-input v-model="project_name" clearable disabled placeholder="其它费用" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="合计金额" prop="contract_id">
|
||||
<el-input v-model="project_name" clearable disabled placeholder="合计金额" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="合计金额大写" prop="contract_id">
|
||||
<el-input v-model="project_name" clearable disabled placeholder="合计金额大写" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
|
||||
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="交付地点" prop="contract_id">
|
||||
<el-input v-model="project_name" clearable disabled placeholder="交付地点" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="签约日期" prop="contract_id">
|
||||
<el-date-picker class="flex-1 !flex" v-model="formData.invoicing_date" clearable type="datetime" value-format="YYYY-MM-DD HH:mm:ss" placeholder="选择签约日期
|
||||
"> </el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="税率" prop="contract_id">
|
||||
<el-input v-model="project_name" clearable disabled placeholder="税率" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="合同条款" prop="contract_id">
|
||||
<el-input v-model="project_name" clearable disabled placeholder="合同条款" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="formData.remark" type="textarea" clearable placeholder="请输入备注" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<!-- <el-form-item label="附件" prop="annex">
|
||||
<el-input v-model="formData.annex" clearable placeholder="请输入附件" />
|
||||
</el-form-item> -->
|
||||
<el-form-item label="附件" prop="field127">
|
||||
<el-upload accept="doc, docx, xls, xlsx, ppt, pptx, pdf, txt, zip, rar, tar, jpg, png, gif, jpeg, webp, wmv, avi, mpg, mpeg, 3gp, mov, mp4, flv, f4v, rmvb, mkv" class="upload-demo" :show-file-list="false" aria-hidden="true" :headers="{ Token: userStore.token }" :action="base_url + '/upload/file'" :on-success="handleAvatarSuccess_four" ref="upload">
|
||||
<el-button type="primary">
|
||||
上传
|
||||
</el-button>
|
||||
</el-upload>
|
||||
|
||||
<div>
|
||||
<div v-for="(item, index) in formDataannex" style="margin-left: 5px;display: block;">
|
||||
<a style="margin-left: 10px; color: #4a5dff; align-self: flex-start" :href="item.uri" target="_blank">{{ item.name }}</a>
|
||||
<span style="cursor: pointer;margin-left: 5px;" @click="delFileFn(index)">x</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div style="margin: 20px 0;">订单明细</div>
|
||||
|
||||
<el-row>
|
||||
|
||||
<el-table :data="tablist1">
|
||||
<el-table-column label="序号">
|
||||
<template #default="{ row }">
|
||||
<el-button @click="handleAdd(row)">+</el-button>
|
||||
<el-button @click="handleDelete(row)">-</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="产品名称" prop="name1">
|
||||
<template #default="{ row, $index }">
|
||||
<el-input v-model="row.name1" readonly @click="subjectmu(row, $index)" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="产品编码" prop="remark">
|
||||
<template #default="{ row }">
|
||||
<el-input v-model="row.remark" /> </template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label=" 规格型号" prop="remark">
|
||||
<template #default="{ row }">
|
||||
<el-input v-model="row.remark" /> </template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="品牌" prop="remark">
|
||||
<template #default="{ row }">
|
||||
<el-input v-model="row.remark" /> </template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label=" 参数说明" prop="remark">
|
||||
<template #default="{ row }">
|
||||
<el-input v-model="row.remark" /> </template>
|
||||
</el-table-column>
|
||||
<el-table-column label="单位" prop="remark">
|
||||
<template #default="{ row }">
|
||||
<el-input v-model="row.remark" /> </template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label=" 数量" prop="remark">
|
||||
<template #default="{ row }">
|
||||
<el-input v-model="row.remark" /> </template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label=" 含税单价" prop="remark">
|
||||
<template #default="{ row }">
|
||||
<el-input v-model="row.remark" /> </template>
|
||||
</el-table-column>
|
||||
<el-table-column label=" 不含税金额" prop="remark">
|
||||
<template #default="{ row }">
|
||||
<el-input v-model="row.remark" /> </template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="含税金额 " prop="remark">
|
||||
<template #default="{ row }">
|
||||
<el-input v-model="row.remark" /> </template>
|
||||
</el-table-column>
|
||||
|
||||
|
||||
<el-table-column label="备注" prop="remark">
|
||||
<template #default="{ row }">
|
||||
<el-input v-model="row.remark" /> </template>
|
||||
</el-table-column>
|
||||
|
||||
|
||||
</el-table>
|
||||
|
||||
|
||||
</el-row>
|
||||
<div style="margin: 20px 0;">回款计划</div>
|
||||
|
||||
<el-row>
|
||||
|
||||
<el-table :data="tablist1">
|
||||
<el-table-column label="序号">
|
||||
<template #default="{ row }">
|
||||
<el-button @click="handleAdd(row)">+</el-button>
|
||||
<el-button @click="handleDelete(row)">-</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="期次" prop="name1">
|
||||
<template #default="{ row, $index }">
|
||||
<el-input v-model="row.name1" readonly @click="subjectmu(row, $index)" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label=" 计划回款日期" prop="remark">
|
||||
<template #default="{ row }">
|
||||
<el-input v-model="row.remark" /> </template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label=" 金额" prop="remark">
|
||||
<template #default="{ row }">
|
||||
<el-input v-model="row.remark" /> </template>
|
||||
</el-table-column>
|
||||
|
||||
|
||||
<el-table-column label="备注" prop="remark">
|
||||
<template #default="{ row }">
|
||||
<el-input v-model="row.remark" /> </template>
|
||||
</el-table-column>
|
||||
|
||||
|
||||
</el-table>
|
||||
|
||||
|
||||
</el-row>
|
||||
<el-dialog v-model="showDialog1" title="选择项目" width="70%">
|
||||
<projectDialog @customEvent="customEvent1" contract_type="2"></projectDialog>
|
||||
</el-dialog>
|
||||
</el-form>
|
||||
</popup>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup name="projectEdit">
|
||||
import type { FormInstance } from 'element-plus'
|
||||
import Popup from '@/components/popup/index.vue'
|
||||
import { toChinesNum } from "@/utils/util";
|
||||
import projectDialog from '@/components/project/index.vue'
|
||||
import { apiinvoiceapplyAdd, apiinvoiceapplyEdit, apiinvoiceapplyDetail } from '@/api/InvoicingRequests'
|
||||
import { getAllProjectTypes } from '@/api/projecttype'
|
||||
import { timeFormat } from '@/utils/util'
|
||||
import { isEmail, isIdCard, isPhone } from '@/utils/validate'
|
||||
import type { PropType } from 'vue'
|
||||
import configs from "@/config"
|
||||
import useUserStore from "@/stores/modules/user";
|
||||
const base_url = configs.baseUrl + configs.urlPrefix
|
||||
const userStore = useUserStore();
|
||||
const active = ref(0)
|
||||
const formDataannex = reactive([])
|
||||
const contract_name = ref('')
|
||||
const project_name = ref('')
|
||||
const project_code = ref('')
|
||||
const project_amount = ref('')
|
||||
const contract_no = ref('')
|
||||
const custom_name = ref('')
|
||||
const tablist1 = reactive([{}])
|
||||
const list1 = reactive([])
|
||||
const list2 = reactive([])
|
||||
import { deptAll } from '@/api/org/department'
|
||||
import { getAll } from '@/api/org/organization'
|
||||
const next = () => {
|
||||
if (active.value++ > 3) active.value = 0
|
||||
}
|
||||
// 上传文件
|
||||
const handleAvatarSuccess_four = (
|
||||
response,
|
||||
uploadFile
|
||||
) => {
|
||||
if (response.code == 0) {
|
||||
ElMessage.error(response.msg);
|
||||
return;
|
||||
}
|
||||
formDataannex.push(
|
||||
{ uri: response.data.uri, name: response.data.name }
|
||||
|
||||
|
||||
);
|
||||
};
|
||||
|
||||
const handleAdd = (row: any) => {
|
||||
// 在 row 后面插入一行数据
|
||||
const index = tablist1.indexOf(row);
|
||||
tablist1.splice(index + 1, 0, {});
|
||||
};
|
||||
|
||||
const handleDelete = (row: any) => {
|
||||
// 删除 row
|
||||
const index = tablist1.indexOf(row);
|
||||
tablist1.splice(index, 1);
|
||||
};
|
||||
//获取所有组织
|
||||
const getlist = () => {
|
||||
getAll().then((res) => {
|
||||
Object.assign(list1, res)
|
||||
if (res.length > 0 && !formData.org_id) {
|
||||
formData.org_id = res[0].id
|
||||
deptAll({ 'org_id': res[0].id }).then((res) => {
|
||||
if (res.length > 0) {
|
||||
Object.assign(list2, res)
|
||||
formData.dept_id = res[0].id
|
||||
}
|
||||
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
//获取部门
|
||||
const deptrmt = (e: any) => {
|
||||
formData.dept_id = ''
|
||||
getlist1(e)
|
||||
|
||||
}
|
||||
//获取所有部门
|
||||
const getlist1 = (id: any) => {
|
||||
deptAll({ 'org_id': id }).then((res) => {
|
||||
list2.splice(0, list2.length, ...res)
|
||||
})
|
||||
}
|
||||
|
||||
// 删除上传的文件
|
||||
const delFileFn = (index: number) => {
|
||||
formDataannex.splice(index, 1)
|
||||
}
|
||||
defineProps({
|
||||
dictData: {
|
||||
type: Object as PropType<Record<string, any[]>>,
|
||||
default: () => ({})
|
||||
}
|
||||
})
|
||||
const emit = defineEmits(['success', 'close'])
|
||||
const formRef = shallowRef<FormInstance>()
|
||||
const popupRef = shallowRef<InstanceType<typeof Popup>>()
|
||||
const mode = ref('add')
|
||||
const showDialog = ref(false)
|
||||
const showDialog1 = ref(false)
|
||||
|
||||
const customEvent = (e: any) => {
|
||||
formData.customer_id = e.id;
|
||||
custom_name.value = e.name;
|
||||
showDialog.value = false;
|
||||
};
|
||||
const customEvent1 = (e: any) => {
|
||||
formData.contract_id = e.id;
|
||||
project_name.value = e.project_name;
|
||||
project_code.value = e.project_code;
|
||||
contract_name.value = e.contract_name;
|
||||
contract_no.value = e.contract_code
|
||||
project_amount.value = e.amount
|
||||
|
||||
showDialog1.value = false;
|
||||
};
|
||||
// 弹窗标题
|
||||
const popupTitle = computed(() => {
|
||||
return mode.value == 'edit' ? '编辑资产折旧表' : '新增资产折旧表'
|
||||
})
|
||||
|
||||
// 表单数据
|
||||
const formData = reactive({
|
||||
id: '',
|
||||
customer_id: '',
|
||||
contract_id: '',
|
||||
approve_id: '',
|
||||
invoicing_date: "",
|
||||
period: "",
|
||||
accumulate_amount: '',
|
||||
accumulated_payments_received: '',
|
||||
tax_rate: "",
|
||||
invoice_type: '',
|
||||
invoicing_amount: '',
|
||||
invoicing_amount_daxie: "",
|
||||
tax: '',
|
||||
amount_including_tax: '',
|
||||
content: "",
|
||||
invoice_no: "",
|
||||
remark: "",
|
||||
annex: "",
|
||||
invoicing_company_name: "",
|
||||
taxpayer_identification_number: "",
|
||||
deposit_bank: "",
|
||||
bank_accnout: "",
|
||||
address_phone: "",
|
||||
receiving_address: "",
|
||||
contacts: "",
|
||||
phone: "",
|
||||
mailing_time: "",
|
||||
mailing_type: "",
|
||||
mailing_no: ""
|
||||
})
|
||||
|
||||
|
||||
// 表单验证
|
||||
const formRules = reactive<any>({
|
||||
|
||||
})
|
||||
|
||||
|
||||
// 获取详情
|
||||
const setFormData = async (data: Record<any, any>) => {
|
||||
if (data.annex && data.annex.length > 0) {
|
||||
|
||||
const arry1 = data.annex.map((item: any, index: any) => {
|
||||
return {
|
||||
name: `文件${index + 1}`,
|
||||
uri: item
|
||||
};
|
||||
});
|
||||
Object.assign(formDataannex, arry1)
|
||||
|
||||
}
|
||||
|
||||
if (data.dept_id) {
|
||||
getlist1(data.org_id)
|
||||
}
|
||||
for (const key in formData) {
|
||||
if (data[key] != null && data[key] != undefined) {
|
||||
//@ts-ignore
|
||||
formData[key] = data[key]
|
||||
}
|
||||
}
|
||||
if (formData.invoicing_amount) {
|
||||
toChinesNum(formData.invoicing_amount)
|
||||
}
|
||||
custom_name.value = data.custom.name
|
||||
project_name.value = data.contract_name;
|
||||
project_code.value = data.contract_code
|
||||
project_amount.value = data.contract.amount
|
||||
contract_name.value = data.contract.contract_name;
|
||||
contract_no.value = data.contract.contract_code
|
||||
|
||||
|
||||
}
|
||||
const getDetail = async (row: Record<string, any>) => {
|
||||
const data = await apiinvoiceapplyDetail({
|
||||
id: row.id
|
||||
})
|
||||
setFormData(data)
|
||||
}
|
||||
|
||||
|
||||
// 提交按钮
|
||||
const handleSubmit = async () => {
|
||||
if (formDataannex.length > 0) {
|
||||
formData.annex = JSON.stringify(formDataannex.map((item: any) => item.uri))
|
||||
}
|
||||
|
||||
console.log(formRef.value?.validate(), '22222222')
|
||||
await formRef.value?.validate()
|
||||
|
||||
|
||||
const data = { ...formData }
|
||||
mode.value == 'edit'
|
||||
? await apiinvoiceapplyEdit(data)
|
||||
: await apiinvoiceapplyAdd(data)
|
||||
popupRef.value?.close()
|
||||
emit('success')
|
||||
}
|
||||
|
||||
//打开弹窗
|
||||
const open = (type = 'add') => {
|
||||
mode.value = type
|
||||
popupRef.value?.open()
|
||||
getlist()
|
||||
|
||||
}
|
||||
|
||||
// 关闭回调
|
||||
const handleClose = () => {
|
||||
emit('close')
|
||||
}
|
||||
|
||||
|
||||
|
||||
defineExpose({
|
||||
open,
|
||||
setFormData,
|
||||
getDetail
|
||||
})
|
||||
</script>
|
179
src/views/ordermanagement/saleorder/index.vue
Normal file
179
src/views/ordermanagement/saleorder/index.vue
Normal file
@ -0,0 +1,179 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-card class="!border-none mb-4" shadow="never">
|
||||
<el-form class="mb-[-16px]" :model="queryParams" inline>
|
||||
<el-form-item label="开票公司名称" prop="invoicing_company_name">
|
||||
<el-input class="w-[280px]" v-model="queryParams.invoicing_company_name" clearable placeholder="请输入开票公司名称" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="客户" prop="customer_id">
|
||||
<el-select class="w-[280px]" v-model="queryParams.customer_id" clearable placeholder="请选择客户">
|
||||
<el-option label="全部" value=""></el-option>
|
||||
<el-option v-for="(item, i) in list1" :key="i" :label="item.name" :value="item.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="合同" prop="contract_id">
|
||||
<el-select class="w-[280px]" v-model="queryParams.contract_id" clearable placeholder="请选择合同">
|
||||
<el-option label="全部" value=""></el-option>
|
||||
<el-option v-for="(item, index) in list" :key="index" :label="item.contract_name" :value="item.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="resetPage">查询</el-button>
|
||||
<el-button @click="resetParams">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-card>
|
||||
<el-card class="!border-none" v-loading="pager.loading" shadow="never">
|
||||
<el-button v-perms="['InvoicingRequests.InvoicingRequests/add']" type="primary" @click="handleAdd">
|
||||
<template #icon>
|
||||
<icon name="el-icon-Plus" />
|
||||
</template>
|
||||
新增
|
||||
</el-button>
|
||||
<el-button v-perms="['InvoicingRequests.InvoicingRequests/delete']" :disabled="!selectData.length" @click="handleDelete(selectData)">
|
||||
删除
|
||||
</el-button>
|
||||
|
||||
<div class="mt-4">
|
||||
<el-table :data="pager.lists" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column label="序号" type="index" width="55" />
|
||||
<el-table-column label="处理流程" prop="customer_name" show-overflow-tooltip />
|
||||
<el-table-column label="流程步骤" prop="customer_name" show-overflow-tooltip />
|
||||
<el-table-column label="资产申请单号" prop="project_code" show-overflow-tooltip />
|
||||
<el-table-column label="组织名称" prop="project_name" show-overflow-tooltip />
|
||||
<el-table-column label="部门名称" prop="invoicing_date" show-overflow-tooltip />
|
||||
<el-table-column label="申请人" prop="tax" show-overflow-tooltip />
|
||||
<el-table-column label="申请日期" prop="tax" show-overflow-tooltip />
|
||||
<el-table-column label="希望到货日期" prop="tax" show-overflow-tooltip />
|
||||
<el-table-column label="备注" prop="tax" show-overflow-tooltip />
|
||||
<el-table-column label="附件" prop="tax" show-overflow-tooltip />
|
||||
<el-table-column label="操作" width="160" fixed="right">
|
||||
<template #default="{ row }">
|
||||
<el-button v-perms="['InvoicingRequests.InvoicingRequests/edit']" type="primary" link @click="handleEdit(row)">
|
||||
编辑
|
||||
</el-button>
|
||||
<el-button v-perms="['InvoicingRequests.InvoicingRequests/delete']" type="danger" link @click="handleDelete(row.id)">
|
||||
删除
|
||||
</el-button>
|
||||
<el-button v-perms="['InvoicingRequests.InvoicingRequests/detail']" link @click="handledetail(row)">
|
||||
详情
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<div class="flex justify-end mt-4">
|
||||
<pagination v-model="pager" @change="getLists" />
|
||||
</div>
|
||||
</el-card>
|
||||
<edit-popup v-if="showEdit" ref="editRef" :dict-data="dictData" @success="getLists" @close="showEdit = false" />
|
||||
<detail-popup v-if="showDtail" ref="detailRef" :dict-data="dictData" @close="showDtail = false" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup name="projectLists">
|
||||
import { usePaging } from '@/hooks/usePaging'
|
||||
import { useDictData } from '@/hooks/useDictOptions'
|
||||
import { apiinvoiceapplyLists, apiinvoiceapplyDelete, apiinvoiceapplyDetail } from '@/api/InvoicingRequests'
|
||||
import { timeFormat } from '@/utils/util'
|
||||
import { apiContractLists } from '@/api/contract'
|
||||
import { apiCustomLists } from '@/api/custom'
|
||||
import { getAllProjectTypes } from '@/api/projecttype'
|
||||
const protype = reactive([])
|
||||
import feedback from '@/utils/feedback'
|
||||
import EditPopup from './edit.vue'
|
||||
import DetailPopup from './detail.vue'
|
||||
const detailRef = shallowRef<InstanceType<typeof DetailPopup>>()
|
||||
const editRef = shallowRef<InstanceType<typeof EditPopup>>()
|
||||
// 是否显示编辑框
|
||||
const showEdit = ref(false)
|
||||
|
||||
const showDtail = ref(false)
|
||||
|
||||
const list = ref([])
|
||||
const list1 = ref([])
|
||||
|
||||
// 查询条件
|
||||
const queryParams = reactive({
|
||||
invoicing_company_name: '',
|
||||
contract_id: '',
|
||||
customer_id: '',
|
||||
|
||||
|
||||
})
|
||||
|
||||
// 选中数据
|
||||
const selectData = ref<any[]>([])
|
||||
|
||||
// 表格选择后回调事件
|
||||
const handleSelectionChange = (val: any[]) => {
|
||||
selectData.value = val.map(({ id }) => id)
|
||||
}
|
||||
|
||||
// 获取字典数据
|
||||
const { dictData } = useDictData('pay_period,invoice_type')
|
||||
|
||||
// 分页相关
|
||||
const { pager, getLists, resetParams, resetPage } = usePaging({
|
||||
fetchFun: apiinvoiceapplyLists,
|
||||
params: queryParams
|
||||
})
|
||||
|
||||
// 添加
|
||||
const handleAdd = async () => {
|
||||
showEdit.value = true
|
||||
await nextTick()
|
||||
editRef.value?.open('add')
|
||||
}
|
||||
|
||||
// 编辑
|
||||
const handleEdit = async (data: any) => {
|
||||
let res = await apiinvoiceapplyDetail({ id: data.id })
|
||||
showEdit.value = true
|
||||
await nextTick()
|
||||
editRef.value?.open('edit')
|
||||
editRef.value?.setFormData(res)
|
||||
}
|
||||
|
||||
// 删除
|
||||
const handleDelete = async (id: number | any[]) => {
|
||||
await feedback.confirm('确定要删除?')
|
||||
await apiinvoiceapplyDelete({ id })
|
||||
getLists()
|
||||
}
|
||||
//详情
|
||||
const handledetail = async (data: any) => {
|
||||
let res = await apiinvoiceapplyDetail({ id: data.id })
|
||||
showDtail.value = true
|
||||
await nextTick()
|
||||
detailRef.value?.open()
|
||||
detailRef.value?.setFormData(res)
|
||||
}
|
||||
|
||||
//获取客户
|
||||
const getlist1 = () => {
|
||||
apiContractLists().then((res) => {
|
||||
list.value = res.lists
|
||||
})
|
||||
}
|
||||
|
||||
//获取合同
|
||||
const getlist2 = () => {
|
||||
apiCustomLists().then((res) => {
|
||||
// console.log(res)
|
||||
list1.value = res.lists
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
getlist1()
|
||||
getlist2()
|
||||
|
||||
|
||||
getLists()
|
||||
</script>
|
||||
|
@ -51,7 +51,7 @@
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="投标时间" prop="bidding_time">
|
||||
<el-date-picker class="flex-1 !flex" v-model="formData.bidding_time" clearable type="datetime" value-format="YYYY-MM-DD HH:mm:ss" placeholder="选择投标时间">
|
||||
<el-date-picker class="flex-1 !flex" v-model="formData.bidding_time" clearable type="date" value-format="YYYY-MM-DD" placeholder="选择投标时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@ -92,7 +92,7 @@
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="发现时间" prop="discovery_time" :rules="[{ required: true, message: '不可为空', trigger: 'blur' }]">
|
||||
<el-date-picker class="flex-1 !flex" v-model="formData.discovery_time" clearable type="datetime" value-format="YYYY-MM-DD HH:mm:ss" placeholder="选择发现时间">
|
||||
<el-date-picker class="flex-1 !flex" v-model="formData.discovery_time" clearable type="datetime" value-format="YYYY-MM-DD" placeholder="选择发现时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@ -335,10 +335,7 @@ const setFormData = async (data: Record<any, any>) => {
|
||||
}
|
||||
//@ts-ignore
|
||||
data.project_content && (formData.project_content = String(data.project_content).split(","))
|
||||
//@ts-ignore
|
||||
formData.bidding_time = timeFormat(formData.bidding_time, 'yyyy-mm-dd hh:MM:ss')
|
||||
//@ts-ignore
|
||||
formData.discovery_time = timeFormat(formData.discovery_time, 'yyyy-mm-dd hh:MM:ss')
|
||||
|
||||
}
|
||||
|
||||
const getDetail = async (row: Record<string, any>) => {
|
||||
|
@ -85,39 +85,12 @@
|
||||
<el-table-column label="项目名称" prop="name" show-overflow-tooltip />
|
||||
<el-table-column label="项目状态" prop="status" show-overflow-tooltip />
|
||||
<el-table-column label="项目所在地" prop="project_address" show-overflow-tooltip />
|
||||
<el-table-column label="项目类型" prop="project_type">
|
||||
<template #default="{ row }">
|
||||
<!-- <dict-value :options="dictData.protype" :value="row.project_type" /> -->
|
||||
{{ protype.find(item => item.id === row.project_type)?.name }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="战略意义" prop="strategic_significance">
|
||||
<template #default="{ row }">
|
||||
<dict-value :options="dictData.strategic_significance" :value="row.strategic_significance" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="所属行业" prop="industry">
|
||||
<template #default="{ row }">
|
||||
<dict-value :options="dictData.industry" :value="row.industry" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="单位性质" prop="unit_nature">
|
||||
<template #default="{ row }">
|
||||
<dict-value :options="dictData.unit_nature" :value="row.unit_nature" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="招标方式" prop="bidding_method">
|
||||
<template #default="{ row }">
|
||||
<dict-value :options="dictData.bidding_method" :value="row.bidding_method" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="信息来源" prop="industry">
|
||||
<template #default="{ row }">
|
||||
<dict-value :options="dictData.information_sources" :value="row.information_sources" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="项目类型" prop="project_type" show-overflow-tooltip />
|
||||
<el-table-column label="战略意义" prop="strategic_significance" show-overflow-tooltip />
|
||||
<el-table-column label="所属行业" prop="industry" show-overflow-tooltip />
|
||||
<el-table-column label="单位性质" prop="unit_nature" show-overflow-tooltip />
|
||||
<el-table-column label="招标方式" prop="bidding_method" show-overflow-tooltip />
|
||||
<el-table-column label="信息来源" prop="information_sources" show-overflow-tooltip />
|
||||
<el-table-column label="负责人" prop="person" show-overflow-tooltip />
|
||||
<el-table-column label="操作" width="160" fixed="right">
|
||||
<template #default="{ row }">
|
||||
|
@ -31,7 +31,8 @@
|
||||
<el-col :span="12">
|
||||
<el-form-item label="添加人">
|
||||
|
||||
{{ formData.add_people }}
|
||||
{{ formData.add_user
|
||||
}}
|
||||
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
@ -347,17 +347,11 @@ const formData = reactive({
|
||||
const formRules = reactive<any>({
|
||||
|
||||
})
|
||||
onMounted(() => {
|
||||
getlist()
|
||||
deparmet()
|
||||
Jobs()
|
||||
})
|
||||
|
||||
|
||||
// 获取详情
|
||||
const setFormData = async (data: Record<any, any>) => {
|
||||
getlist()
|
||||
deparmet()
|
||||
Jobs()
|
||||
|
||||
setTimeout(() => {
|
||||
if (data.technician_ids && data.technician_ids.length > 0) {
|
||||
if (data.technician_ids.includes(",")) {
|
||||
@ -439,6 +433,9 @@ const handleSubmit = async () => {
|
||||
|
||||
//打开弹窗
|
||||
const open = (type = 'add') => {
|
||||
getlist()
|
||||
deparmet()
|
||||
Jobs()
|
||||
mode.value = type
|
||||
popupRef.value?.open()
|
||||
}
|
||||
|
@ -38,7 +38,7 @@
|
||||
<el-table-column label="技术人员" prop="technician" show-overflow-tooltip />
|
||||
<el-table-column label="商务人员" prop="business_people" show-overflow-tooltip />
|
||||
<el-table-column label="跨部门人员" prop="cross_departmental_personnel" show-overflow-tooltip />
|
||||
<el-table-column label="添加人" prop="add_people" show-overflow-tooltip />
|
||||
<el-table-column label="添加人" prop="add_user" show-overflow-tooltip />
|
||||
<el-table-column label="操作" width="160" fixed="right">
|
||||
<template #default="{ row }">
|
||||
<el-button v-perms="['project.project_pre_sales_members/edit']" type="primary" link @click="handleEdit(row)">
|
||||
|
Loading…
x
Reference in New Issue
Block a user