|
|
@@ -8,21 +8,62 @@
|
|
|
<el-form-item
|
|
|
label="发票类型"
|
|
|
prop="type"
|
|
|
- style="margin-bottom: 22px">
|
|
|
- <el-select v-model="form.type" @change="handleSelType" disabled clearable style="width: 100%">
|
|
|
+
|
|
|
+ >
|
|
|
+ <el-select
|
|
|
+ v-model="form.type"
|
|
|
+ @change="handleSelType"
|
|
|
+ disabled
|
|
|
+ clearable
|
|
|
+ style="width: 100%"
|
|
|
+ >
|
|
|
<el-option label="开票" :value="1"></el-option>
|
|
|
<el-option label="收票" :value="2"></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="来源类型" prop="sourceType">
|
|
|
+ <el-select
|
|
|
+ v-model="form.sourceType"
|
|
|
+ :disabled="true"
|
|
|
+ style="width: 100%"
|
|
|
+ >
|
|
|
+ <el-option label="对账单" :value="1"></el-option>
|
|
|
+ <el-option label="合同" :value="2"></el-option>
|
|
|
+ <el-option label="订单" :value="3"></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="12" v-if="form.sourceType == 1">
|
|
|
+ <el-form-item label="对账单" prop="sourceCode">
|
|
|
+ <el-input v-model="form.sourceCode" :disabled="true"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="12" v-if="form.sourceType == 2">
|
|
|
+ <el-form-item label="合同" prop="sourceCode">
|
|
|
+ <el-input v-model="form.sourceCode" :disabled="true"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="12" v-if="form.sourceType == 3">
|
|
|
+ <el-form-item label="订单" prop="sourceCode">
|
|
|
+ <el-input v-model="form.sourceCode" :disabled="true"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
<el-col :span="12">
|
|
|
<el-form-item
|
|
|
label="金额"
|
|
|
prop="amount"
|
|
|
- style="margin-bottom: 22px">
|
|
|
- <el-input-number v-model="form.amount" :precision="2" :disabled="taskDefinitionKey!='starter'"
|
|
|
- :controls="false" style="width: 100%"
|
|
|
- :min="0"></el-input-number>
|
|
|
+
|
|
|
+ >
|
|
|
+ <el-input-number
|
|
|
+ v-model="form.amount"
|
|
|
+ :precision="2"
|
|
|
+ :disabled="taskDefinitionKey != 'starter'"
|
|
|
+ :controls="false"
|
|
|
+ style="width: 100%"
|
|
|
+ :min="0"
|
|
|
+ ></el-input-number>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
@@ -30,10 +71,10 @@
|
|
|
<el-form-item
|
|
|
label="申请部门"
|
|
|
prop="applyDeptId"
|
|
|
- style="margin-bottom: 22px"
|
|
|
+
|
|
|
>
|
|
|
<ele-tree-select
|
|
|
- :disabled="taskDefinitionKey!='starter'"
|
|
|
+ :disabled="taskDefinitionKey != 'starter'"
|
|
|
clearable
|
|
|
:data="deptTreeList"
|
|
|
v-model="form.applyDeptId"
|
|
|
@@ -49,38 +90,35 @@
|
|
|
<el-form-item
|
|
|
label="申请人"
|
|
|
prop="applyUserId"
|
|
|
- style="margin-bottom: 22px"
|
|
|
+
|
|
|
>
|
|
|
<personSelect
|
|
|
- :disabled="taskDefinitionKey!='starter'"
|
|
|
+ :disabled="taskDefinitionKey != 'starter'"
|
|
|
ref="directorRef"
|
|
|
v-model="form.applyUserId"
|
|
|
@selfChange="changeUserInfo"
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
- </el-row>
|
|
|
-
|
|
|
- <el-row :gutter="12">
|
|
|
+
|
|
|
<el-col :span="12">
|
|
|
- <el-form-item
|
|
|
- label="预计开票日期"
|
|
|
- style="margin-bottom: 22px">
|
|
|
+ <el-form-item label="预计开票日期" >
|
|
|
<el-date-picker
|
|
|
- :disabled="taskDefinitionKey!='starter'"
|
|
|
+ :disabled="taskDefinitionKey != 'starter'"
|
|
|
style="width: 100%"
|
|
|
v-model="form.expectInvoiceDate"
|
|
|
type="date"
|
|
|
- value-format="yyyy-MM-dd">
|
|
|
+ value-format="yyyy-MM-dd"
|
|
|
+ >
|
|
|
</el-date-picker>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
|
<el-form-item
|
|
|
- v-if="taskDefinitionKey!='starter'"
|
|
|
+ v-if="taskDefinitionKey != 'starter'"
|
|
|
label="会计科目"
|
|
|
prop="accountingSubjectId"
|
|
|
- style="margin-bottom: 22px"
|
|
|
+
|
|
|
>
|
|
|
<ele-tree-select
|
|
|
clearable
|
|
|
@@ -96,17 +134,16 @@
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
- </el-row>
|
|
|
- <el-row :gutter="12" v-if="taskDefinitionKey!='starter'">
|
|
|
- <el-col :span="12">
|
|
|
+
|
|
|
+ <el-col :span="12" :gutter="12" v-if="taskDefinitionKey != 'starter'">
|
|
|
<el-form-item prop="files" label="发票附件">
|
|
|
- <fileMain v-model="form.files" ></fileMain>
|
|
|
-<!-- <fileUpload-->
|
|
|
-<!-- v-model="form.files"-->
|
|
|
-<!-- module="main"-->
|
|
|
-<!-- :showLib="false"-->
|
|
|
-<!-- :limit="10"-->
|
|
|
-<!-- />-->
|
|
|
+ <fileMain v-model="form.files"></fileMain>
|
|
|
+ <!-- <fileUpload-->
|
|
|
+ <!-- v-model="form.files"-->
|
|
|
+ <!-- module="main"-->
|
|
|
+ <!-- :showLib="false"-->
|
|
|
+ <!-- :limit="10"-->
|
|
|
+ <!-- />-->
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
@@ -116,40 +153,52 @@
|
|
|
<el-form-item
|
|
|
label="公司名称"
|
|
|
prop="companyName"
|
|
|
- style="margin-bottom: 22px">
|
|
|
- <el-input v-model="form.companyName" :disabled="taskDefinitionKey!='starter'"></el-input>
|
|
|
+
|
|
|
+ >
|
|
|
+ <el-input
|
|
|
+ v-model="form.companyName"
|
|
|
+ :disabled="taskDefinitionKey != 'starter'"
|
|
|
+ ></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
|
<el-form-item
|
|
|
label="统一社会信用代码"
|
|
|
prop="companyUsc"
|
|
|
- style="margin-bottom: 22px">
|
|
|
- <el-input v-model="form.companyUsc" :disabled="taskDefinitionKey!='starter'"></el-input>
|
|
|
+
|
|
|
+ >
|
|
|
+ <el-input
|
|
|
+ v-model="form.companyUsc"
|
|
|
+ :disabled="taskDefinitionKey != 'starter'"
|
|
|
+ ></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
-
|
|
|
-
|
|
|
</el-row>
|
|
|
<el-row :gutter="12">
|
|
|
<el-col :span="12">
|
|
|
<el-form-item
|
|
|
label="开户银行"
|
|
|
prop="companyBankBranchNo"
|
|
|
- style="margin-bottom: 22px">
|
|
|
- <el-input v-model="form.companyBankBranchNo" :disabled="taskDefinitionKey!='starter'"></el-input>
|
|
|
+
|
|
|
+ >
|
|
|
+ <el-input
|
|
|
+ v-model="form.companyBankBranchNo"
|
|
|
+ :disabled="taskDefinitionKey != 'starter'"
|
|
|
+ ></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
|
-
|
|
|
<el-form-item
|
|
|
label="银行账户"
|
|
|
prop="companyBankAccount"
|
|
|
- style="margin-bottom: 22px">
|
|
|
- <el-input v-model="form.companyBankAccount" :disabled="taskDefinitionKey!='starter'"></el-input>
|
|
|
+
|
|
|
+ >
|
|
|
+ <el-input
|
|
|
+ v-model="form.companyBankAccount"
|
|
|
+ :disabled="taskDefinitionKey != 'starter'"
|
|
|
+ ></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
-
|
|
|
</el-row>
|
|
|
|
|
|
<el-row :gutter="12">
|
|
|
@@ -157,39 +206,52 @@
|
|
|
<el-form-item
|
|
|
label="单位地址"
|
|
|
prop="companyAddress"
|
|
|
- style="margin-bottom: 22px">
|
|
|
- <el-input v-model="form.companyAddress" :disabled="taskDefinitionKey!='starter'"></el-input>
|
|
|
+
|
|
|
+ >
|
|
|
+ <el-input
|
|
|
+ v-model="form.companyAddress"
|
|
|
+ :disabled="taskDefinitionKey != 'starter'"
|
|
|
+ ></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
|
<el-form-item
|
|
|
label="电话号码"
|
|
|
prop="companyTel"
|
|
|
- style="margin-bottom: 22px">
|
|
|
- <el-input v-model="form.companyTel" :disabled="taskDefinitionKey!='starter'"></el-input>
|
|
|
+
|
|
|
+ >
|
|
|
+ <el-input
|
|
|
+ v-model="form.companyTel"
|
|
|
+ :disabled="taskDefinitionKey != 'starter'"
|
|
|
+ ></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
<headerTitle title="收票信息"></headerTitle>
|
|
|
|
|
|
-
|
|
|
<el-row :gutter="12">
|
|
|
<el-col :span="12">
|
|
|
<el-form-item
|
|
|
label="收票人"
|
|
|
prop="receiverName"
|
|
|
- style="margin-bottom: 22px"
|
|
|
+
|
|
|
>
|
|
|
- <el-input v-model="form.receiverName" :disabled="taskDefinitionKey!='starter'"></el-input>
|
|
|
+ <el-input
|
|
|
+ v-model="form.receiverName"
|
|
|
+ :disabled="taskDefinitionKey != 'starter'"
|
|
|
+ ></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
|
<el-form-item
|
|
|
label="收票人地址"
|
|
|
prop="receiverAddress"
|
|
|
- style="margin-bottom: 22px"
|
|
|
+
|
|
|
>
|
|
|
- <el-input v-model="form.receiverAddress" :disabled="taskDefinitionKey!='starter'"></el-input>
|
|
|
+ <el-input
|
|
|
+ v-model="form.receiverAddress"
|
|
|
+ :disabled="taskDefinitionKey != 'starter'"
|
|
|
+ ></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
@@ -198,186 +260,194 @@
|
|
|
<el-form-item
|
|
|
label="联系方式"
|
|
|
prop="receiverTel"
|
|
|
- style="margin-bottom: 22px">
|
|
|
- <el-input v-model="form.receiverTel" :disabled="taskDefinitionKey!='starter'"></el-input>
|
|
|
+
|
|
|
+ >
|
|
|
+ <el-input
|
|
|
+ v-model="form.receiverTel"
|
|
|
+ :disabled="taskDefinitionKey != 'starter'"
|
|
|
+ ></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
</el-form>
|
|
|
<headerTitle title="关联信息"></headerTitle>
|
|
|
- <table-info v-if="form.detailList.length" :dialogType="taskDefinitionKey!='starter'?'view':'update'"
|
|
|
- :form="form" ref="table" @setPrice="setPrice"></table-info>
|
|
|
+ <table-info
|
|
|
+ v-if="form.detailList.length"
|
|
|
+ :dialogType="taskDefinitionKey != 'starter' ? 'view' : 'update'"
|
|
|
+ :form="form"
|
|
|
+ ref="table"
|
|
|
+ @setPrice="setPrice"
|
|
|
+ ></table-info>
|
|
|
</div>
|
|
|
-
|
|
|
</template>
|
|
|
<script>
|
|
|
-import personSelect from "@/components/CommomSelect/person-select.vue";
|
|
|
-import {listOrganizations} from "@/api/system/organization";
|
|
|
-import {mapGetters} from "vuex";
|
|
|
-import fileUpload from "@/components/upload/fileUpload.vue";
|
|
|
-import tableInfo from "./tableInfo.vue";
|
|
|
-import {getTreeByPid} from "@/api/classifyManage";
|
|
|
-import {
|
|
|
- invoiceApplyInfoAPI,
|
|
|
- invoiceApplyUpdateAPI
|
|
|
-} from "@/api/bpm/components/financialManage/invoiceManage";
|
|
|
-import fileMain from "@/components/addDoc/index.vue";
|
|
|
-
|
|
|
+ import personSelect from '@/components/CommomSelect/person-select.vue';
|
|
|
+ import { listOrganizations } from '@/api/system/organization';
|
|
|
+ import { mapGetters } from 'vuex';
|
|
|
+ import fileUpload from '@/components/upload/fileUpload.vue';
|
|
|
+ import tableInfo from './tableInfo.vue';
|
|
|
+ import { getTreeByPid } from '@/api/classifyManage';
|
|
|
+ import {
|
|
|
+ invoiceApplyInfoAPI,
|
|
|
+ invoiceApplyUpdateAPI
|
|
|
+ } from '@/api/bpm/components/financialManage/invoiceManage';
|
|
|
+ import fileMain from '@/components/addDoc/index.vue';
|
|
|
|
|
|
-export default {
|
|
|
- name: "add-or-edit-dialog",
|
|
|
- components: {
|
|
|
- fileMain,
|
|
|
- fileUpload,
|
|
|
- personSelect,
|
|
|
- tableInfo
|
|
|
- },
|
|
|
- props: {
|
|
|
- businessId: {
|
|
|
- default: ''
|
|
|
+ export default {
|
|
|
+ name: 'add-or-edit-dialog',
|
|
|
+ components: {
|
|
|
+ fileMain,
|
|
|
+ fileUpload,
|
|
|
+ personSelect,
|
|
|
+ tableInfo
|
|
|
},
|
|
|
- taskDefinitionKey: {
|
|
|
- default: ''
|
|
|
- },
|
|
|
- },
|
|
|
- provide() {
|
|
|
- return {
|
|
|
- invoiceType: () => this.form.type
|
|
|
- }
|
|
|
- },
|
|
|
- computed: {
|
|
|
- ...mapGetters(['user'])
|
|
|
- },
|
|
|
- data() {
|
|
|
- return {
|
|
|
- dialogType: '',
|
|
|
- title: '',
|
|
|
- form: {
|
|
|
- accountingSubjectCode: "",
|
|
|
- accountingSubjectId: '',
|
|
|
- accountingSubjectName: "",
|
|
|
- amount: undefined,
|
|
|
- applyDeptId: '',
|
|
|
- applyDeptName: "",
|
|
|
- applyUserId: '',
|
|
|
- applyUserName: "",
|
|
|
- companyAddress: "",
|
|
|
- companyBankAccount: "",
|
|
|
- companyUsc: "",
|
|
|
- expectInvoiceDate: "",
|
|
|
- companyBankBranchNo: "",
|
|
|
- companyName: "",
|
|
|
- receiverAddress: "",
|
|
|
- receiverName: "",
|
|
|
- receiverTel: "",
|
|
|
- companyTel: "",
|
|
|
- detailList: [],
|
|
|
- drawerId: '',
|
|
|
- drawerName: "",
|
|
|
- files: [],
|
|
|
- invoiceStatus: '',
|
|
|
- link: [],
|
|
|
- remark: "",
|
|
|
- settlementAccountId: '',
|
|
|
- settlementAccountName: "",
|
|
|
- type: ''
|
|
|
+ props: {
|
|
|
+ businessId: {
|
|
|
+ default: ''
|
|
|
},
|
|
|
- feeTypeList: [],
|
|
|
- accountingSubjectList: [],
|
|
|
- deptList: [],
|
|
|
- deptTreeList: [],
|
|
|
- rules: {
|
|
|
- applyDeptId: {required: true, message: '请选择', trigger: 'change'},
|
|
|
- applyUserId: {required: true, message: '请选择', trigger: 'change'},
|
|
|
- accountingSubjectId: {required: true, message: '请选择', trigger: 'change'},
|
|
|
- feeTypeId: {required: true, message: '请选择', trigger: 'change'},
|
|
|
- amount: {required: true, message: '请输入', trigger: 'blur'},
|
|
|
- type: {required: true, message: '请选择', trigger: 'change'},
|
|
|
+ taskDefinitionKey: {
|
|
|
+ default: ''
|
|
|
}
|
|
|
- }
|
|
|
- },
|
|
|
- created() {
|
|
|
- this.init()
|
|
|
- },
|
|
|
- methods: {
|
|
|
- //初始化
|
|
|
- async init() {
|
|
|
- await this.getClassifyList(24, 'accountingSubjectList')
|
|
|
- await this.getDeptList()
|
|
|
- await this.getInfo(this.businessId)
|
|
|
- this.$nextTick(async () => {
|
|
|
- await this.getUserList(this.form.applyDeptId);
|
|
|
- })
|
|
|
- },
|
|
|
- //获取详情
|
|
|
- async getInfo(id) {
|
|
|
- this.form = await invoiceApplyInfoAPI(id)
|
|
|
},
|
|
|
- //获取分类管理中的数据
|
|
|
- async getClassifyList(id, listName) {
|
|
|
- let res = await getTreeByPid(id)
|
|
|
- this[listName] = res.data
|
|
|
+ provide() {
|
|
|
+ return {
|
|
|
+ invoiceType: () => this.form.type
|
|
|
+ };
|
|
|
},
|
|
|
- //获取会计科目选中数据
|
|
|
- changeSubjectInfo(val) {
|
|
|
- if (!val) return this.form.accountingSubjectName = ''
|
|
|
- let data = this.$refs.treeSelect?.$refs?.tree?.getCurrentNode() || {}
|
|
|
- this.form.accountingSubjectName = data.name
|
|
|
+ computed: {
|
|
|
+ ...mapGetters(['user'])
|
|
|
},
|
|
|
- // 获取部门数据
|
|
|
- getDeptList() {
|
|
|
- listOrganizations().then((list) => {
|
|
|
- this.deptList = list;
|
|
|
- this.deptTreeList = this.$util.toTreeData({
|
|
|
- data: list,
|
|
|
- idField: 'id',
|
|
|
- parentIdField: 'parentId'
|
|
|
- });
|
|
|
- });
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ dialogType: '',
|
|
|
+ title: '',
|
|
|
+ form: {
|
|
|
+ accountingSubjectCode: '',
|
|
|
+ accountingSubjectId: '',
|
|
|
+ accountingSubjectName: '',
|
|
|
+ amount: undefined,
|
|
|
+ applyDeptId: '',
|
|
|
+ applyDeptName: '',
|
|
|
+ applyUserId: '',
|
|
|
+ applyUserName: '',
|
|
|
+ companyAddress: '',
|
|
|
+ companyBankAccount: '',
|
|
|
+ companyUsc: '',
|
|
|
+ expectInvoiceDate: '',
|
|
|
+ companyBankBranchNo: '',
|
|
|
+ companyName: '',
|
|
|
+ receiverAddress: '',
|
|
|
+ receiverName: '',
|
|
|
+ receiverTel: '',
|
|
|
+ companyTel: '',
|
|
|
+ detailList: [],
|
|
|
+ drawerId: '',
|
|
|
+ drawerName: '',
|
|
|
+ files: [],
|
|
|
+ invoiceStatus: '',
|
|
|
+ link: [],
|
|
|
+ remark: '',
|
|
|
+ settlementAccountId: '',
|
|
|
+ settlementAccountName: '',
|
|
|
+ type: ''
|
|
|
+ },
|
|
|
+ feeTypeList: [],
|
|
|
+ accountingSubjectList: [],
|
|
|
+ deptList: [],
|
|
|
+ deptTreeList: [],
|
|
|
+ rules: {
|
|
|
+ applyDeptId: { required: true, message: '请选择', trigger: 'change' },
|
|
|
+ applyUserId: { required: true, message: '请选择', trigger: 'change' },
|
|
|
+ accountingSubjectId: {
|
|
|
+ required: true,
|
|
|
+ message: '请选择',
|
|
|
+ trigger: 'change'
|
|
|
+ },
|
|
|
+ feeTypeId: { required: true, message: '请选择', trigger: 'change' },
|
|
|
+ amount: { required: true, message: '请输入', trigger: 'blur' },
|
|
|
+ type: { required: true, message: '请选择', trigger: 'change' }
|
|
|
+ }
|
|
|
+ };
|
|
|
},
|
|
|
- // 选择负责人部门
|
|
|
- changeDeptInfo(id) {
|
|
|
- const info = this.deptList.find((e) => e.id == id) || {};
|
|
|
- this.form.applyDeptName = info.name;
|
|
|
- this.form.applyUserId = '';
|
|
|
- this.form.applyUserName = '';
|
|
|
- this.getUserList(id);
|
|
|
+ created() {
|
|
|
+ this.init();
|
|
|
},
|
|
|
- // 获取人员数据
|
|
|
- getUserList(deptId) {
|
|
|
- if (deptId) {
|
|
|
- this.$refs.directorRef.getList({deptId});
|
|
|
+ methods: {
|
|
|
+ //初始化
|
|
|
+ async init() {
|
|
|
+ await this.getClassifyList(24, 'accountingSubjectList');
|
|
|
+ await this.getDeptList();
|
|
|
+ await this.getInfo(this.businessId);
|
|
|
+ this.$nextTick(async () => {
|
|
|
+ await this.getUserList(this.form.applyDeptId);
|
|
|
+ });
|
|
|
+ },
|
|
|
+ //获取详情
|
|
|
+ async getInfo(id) {
|
|
|
+ this.form = await invoiceApplyInfoAPI(id);
|
|
|
+ },
|
|
|
+ //获取分类管理中的数据
|
|
|
+ async getClassifyList(id, listName) {
|
|
|
+ let res = await getTreeByPid(id);
|
|
|
+ this[listName] = res.data;
|
|
|
+ },
|
|
|
+ //获取会计科目选中数据
|
|
|
+ changeSubjectInfo(val) {
|
|
|
+ if (!val) return (this.form.accountingSubjectName = '');
|
|
|
+ let data = this.$refs.treeSelect?.$refs?.tree?.getCurrentNode() || {};
|
|
|
+ this.form.accountingSubjectName = data.name;
|
|
|
+ },
|
|
|
+ // 获取部门数据
|
|
|
+ getDeptList() {
|
|
|
+ listOrganizations().then((list) => {
|
|
|
+ this.deptList = list;
|
|
|
+ this.deptTreeList = this.$util.toTreeData({
|
|
|
+ data: list,
|
|
|
+ idField: 'id',
|
|
|
+ parentIdField: 'parentId'
|
|
|
+ });
|
|
|
+ });
|
|
|
+ },
|
|
|
+ // 选择负责人部门
|
|
|
+ changeDeptInfo(id) {
|
|
|
+ const info = this.deptList.find((e) => e.id == id) || {};
|
|
|
+ this.form.applyDeptName = info.name;
|
|
|
+ this.form.applyUserId = '';
|
|
|
+ this.form.applyUserName = '';
|
|
|
+ this.getUserList(id);
|
|
|
+ },
|
|
|
+ // 获取人员数据
|
|
|
+ getUserList(deptId) {
|
|
|
+ if (deptId) {
|
|
|
+ this.$refs.directorRef.getList({ deptId });
|
|
|
+ }
|
|
|
+ },
|
|
|
+ //选择人员数据
|
|
|
+ changeUserInfo(val, info) {
|
|
|
+ this.form.applyUserName = info.name;
|
|
|
+ },
|
|
|
+ //
|
|
|
+ handleSelType(val) {
|
|
|
+ this.$refs.table.clearTable();
|
|
|
+ },
|
|
|
+ setPrice(val) {
|
|
|
+ this.form.amount = val;
|
|
|
+ },
|
|
|
+ //
|
|
|
+ getTableValue() {
|
|
|
+ return new Promise((resolve, reject) => {
|
|
|
+ this.$refs.form.validate(async (valid) => {
|
|
|
+ if (!valid) return this.$message.warning('有必填项未填,请检查');
|
|
|
+ let tableData = await this.$refs.table.getTableValidate();
|
|
|
+ this.form.link = tableData.link;
|
|
|
+ this.form.detailList = tableData.detailList;
|
|
|
+ const API = invoiceApplyUpdateAPI;
|
|
|
+ const res = await API(this.form);
|
|
|
+ res.code == '0' ? resolve('1') : reject(new Error(data.message));
|
|
|
+ });
|
|
|
+ });
|
|
|
}
|
|
|
- },
|
|
|
- //选择人员数据
|
|
|
- changeUserInfo(val, info) {
|
|
|
- this.form.applyUserName = info.name;
|
|
|
- },
|
|
|
- //
|
|
|
- handleSelType(val) {
|
|
|
- this.$refs.table.clearTable()
|
|
|
- },
|
|
|
- setPrice(val) {
|
|
|
- this.form.amount = val
|
|
|
- },
|
|
|
- //
|
|
|
- getTableValue() {
|
|
|
- return new Promise((resolve, reject) => {
|
|
|
- this.$refs.form.validate(async valid => {
|
|
|
- if (!valid) return this.$message.warning('有必填项未填,请检查')
|
|
|
- let tableData = await this.$refs.table.getTableValidate()
|
|
|
- this.form.link = tableData.link
|
|
|
- this.form.detailList = tableData.detailList
|
|
|
- const API = invoiceApplyUpdateAPI
|
|
|
- const res = await API(this.form)
|
|
|
- res.code == '0' ? resolve('1') : reject(new Error(data.message))
|
|
|
- })
|
|
|
- })
|
|
|
-
|
|
|
- },
|
|
|
- }
|
|
|
-}
|
|
|
+ }
|
|
|
+ };
|
|
|
</script>
|
|
|
-<style scoped lang="scss">
|
|
|
-
|
|
|
-</style>
|
|
|
+<style scoped lang="scss"></style>
|