|
@@ -7,12 +7,14 @@
|
|
|
<el-form-item
|
|
<el-form-item
|
|
|
label="应付日期"
|
|
label="应付日期"
|
|
|
prop="payableDate"
|
|
prop="payableDate"
|
|
|
- style="margin-bottom: 22px">
|
|
|
|
|
|
|
+ style="margin-bottom: 22px"
|
|
|
|
|
+ >
|
|
|
<el-date-picker
|
|
<el-date-picker
|
|
|
style="width: 100%"
|
|
style="width: 100%"
|
|
|
v-model="form.payableDate"
|
|
v-model="form.payableDate"
|
|
|
type="date"
|
|
type="date"
|
|
|
- value-format="yyyy-MM-dd">
|
|
|
|
|
|
|
+ value-format="yyyy-MM-dd"
|
|
|
|
|
+ >
|
|
|
</el-date-picker>
|
|
</el-date-picker>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
@@ -20,10 +22,16 @@
|
|
|
<el-form-item
|
|
<el-form-item
|
|
|
label="应付金额"
|
|
label="应付金额"
|
|
|
prop="payableTotalPrice"
|
|
prop="payableTotalPrice"
|
|
|
- style="margin-bottom: 22px">
|
|
|
|
|
- <el-input-number disabled v-model="form.payableTotalPrice" :precision="2" :controls="false"
|
|
|
|
|
- style="width: 100%"
|
|
|
|
|
- :min="0"></el-input-number>
|
|
|
|
|
|
|
+ style="margin-bottom: 22px"
|
|
|
|
|
+ >
|
|
|
|
|
+ <el-input-number
|
|
|
|
|
+ disabled
|
|
|
|
|
+ v-model="form.payableTotalPrice"
|
|
|
|
|
+ :precision="2"
|
|
|
|
|
+ :controls="false"
|
|
|
|
|
+ style="width: 100%"
|
|
|
|
|
+ :min="0"
|
|
|
|
|
+ ></el-input-number>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
</el-row>
|
|
</el-row>
|
|
@@ -32,7 +40,8 @@
|
|
|
<el-form-item
|
|
<el-form-item
|
|
|
label="会计科目"
|
|
label="会计科目"
|
|
|
prop="accountingSubjectId"
|
|
prop="accountingSubjectId"
|
|
|
- style="margin-bottom: 22px">
|
|
|
|
|
|
|
+ style="margin-bottom: 22px"
|
|
|
|
|
+ >
|
|
|
<ele-tree-select
|
|
<ele-tree-select
|
|
|
clearable
|
|
clearable
|
|
|
filterable
|
|
filterable
|
|
@@ -51,46 +60,55 @@
|
|
|
<el-form-item
|
|
<el-form-item
|
|
|
label="发票编码"
|
|
label="发票编码"
|
|
|
prop="invoiceCode"
|
|
prop="invoiceCode"
|
|
|
- style="margin-bottom: 22px">
|
|
|
|
|
|
|
+ style="margin-bottom: 22px"
|
|
|
|
|
+ >
|
|
|
<el-input disabled v-model="form.invoiceCode"></el-input>
|
|
<el-input disabled v-model="form.invoiceCode"></el-input>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
</el-row>
|
|
</el-row>
|
|
|
<el-row :gutter="12">
|
|
<el-row :gutter="12">
|
|
|
<el-col :span="12">
|
|
<el-col :span="12">
|
|
|
<el-form-item
|
|
<el-form-item
|
|
|
label="来源类型"
|
|
label="来源类型"
|
|
|
prop="sourceType"
|
|
prop="sourceType"
|
|
|
- style="margin-bottom: 22px">
|
|
|
|
|
- <el-input :value="form.sourceType==2?'合同':form.sourceType==3?'采购订单':'对账单'" disabled></el-input>
|
|
|
|
|
|
|
+ style="margin-bottom: 22px"
|
|
|
|
|
+ >
|
|
|
|
|
+ <el-input
|
|
|
|
|
+ :value="
|
|
|
|
|
+ form.sourceType == 2
|
|
|
|
|
+ ? '合同'
|
|
|
|
|
+ : form.sourceType == 3
|
|
|
|
|
+ ? '采购订单'
|
|
|
|
|
+ : '对账单'
|
|
|
|
|
+ "
|
|
|
|
|
+ disabled
|
|
|
|
|
+ ></el-input>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
<el-col :span="12">
|
|
|
<el-form-item
|
|
<el-form-item
|
|
|
label="来源编码"
|
|
label="来源编码"
|
|
|
prop="sourceCode"
|
|
prop="sourceCode"
|
|
|
- style="margin-bottom: 22px">
|
|
|
|
|
|
|
+ style="margin-bottom: 22px"
|
|
|
|
|
+ >
|
|
|
<el-input v-model="form.sourceCode" disabled></el-input>
|
|
<el-input v-model="form.sourceCode" disabled></el-input>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
</el-row>
|
|
</el-row>
|
|
|
|
|
|
|
|
-
|
|
|
|
|
<el-row :gutter="12">
|
|
<el-row :gutter="12">
|
|
|
<el-col :span="12">
|
|
<el-col :span="12">
|
|
|
<el-form-item
|
|
<el-form-item
|
|
|
label="公司名称"
|
|
label="公司名称"
|
|
|
prop="contactName"
|
|
prop="contactName"
|
|
|
- style="margin-bottom: 22px">
|
|
|
|
|
|
|
+ style="margin-bottom: 22px"
|
|
|
|
|
+ >
|
|
|
<el-input disabled v-model="form.contactName"></el-input>
|
|
<el-input disabled v-model="form.contactName"></el-input>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
<el-col :span="12">
|
|
|
<el-form-item label="附件">
|
|
<el-form-item label="附件">
|
|
|
- <fileMain v-model="form.files" ></fileMain>
|
|
|
|
|
-
|
|
|
|
|
|
|
+ <fileMain v-model="form.files"></fileMain>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
</el-row>
|
|
</el-row>
|
|
@@ -99,126 +117,134 @@
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
-import {getFile} from '@/api/system/file';
|
|
|
|
|
-import dictMixins from '@/mixins/dictMixins';
|
|
|
|
|
-import fileUpload from "@/components/upload/fileUpload.vue";
|
|
|
|
|
-
|
|
|
|
|
-import personSelect from "@/components/CommomSelect/person-select.vue";
|
|
|
|
|
|
|
+ import { getFile } from '@/api/system/file';
|
|
|
|
|
+ import dictMixins from '@/mixins/dictMixins';
|
|
|
|
|
+ import fileUpload from '@/components/upload/fileUpload.vue';
|
|
|
|
|
|
|
|
-import {invoiceApplyInfoAPI} from "@/api/bpm/components/financialManage/invoiceManage";
|
|
|
|
|
-import tableInfo from "@/views/bpm/handleTask/components/financialManage/invoiceManage/components/tableInfo.vue";
|
|
|
|
|
-import {finPayableUpdateAPI, getFinPayableInfoAPI} from "@/api/bpm/components/financialManage/payableManage";
|
|
|
|
|
-import {getTreeByPid} from "@/api/classifyManage";
|
|
|
|
|
-import fileMain from "@/components/addDoc/index.vue";
|
|
|
|
|
|
|
+ import personSelect from '@/components/CommomSelect/person-select.vue';
|
|
|
|
|
|
|
|
|
|
+ import { invoiceApplyInfoAPI } from '@/api/bpm/components/financialManage/invoiceManage';
|
|
|
|
|
+ import tableInfo from '@/views/bpm/handleTask/components/financialManage/invoiceManage/components/tableInfo.vue';
|
|
|
|
|
+ import {
|
|
|
|
|
+ finPayableUpdateAPI,
|
|
|
|
|
+ getFinPayableInfoAPI
|
|
|
|
|
+ } from '@/api/bpm/components/financialManage/payableManage';
|
|
|
|
|
+ import { getTreeByPid } from '@/api/classifyManage';
|
|
|
|
|
+ import fileMain from '@/components/addDoc/index.vue';
|
|
|
|
|
|
|
|
-export default {
|
|
|
|
|
- mixins: [dictMixins],
|
|
|
|
|
- components: {
|
|
|
|
|
- fileMain,
|
|
|
|
|
- tableInfo,
|
|
|
|
|
- personSelect,
|
|
|
|
|
- fileUpload
|
|
|
|
|
- },
|
|
|
|
|
- data() {
|
|
|
|
|
- return {
|
|
|
|
|
- dialogType: '',
|
|
|
|
|
- form: {
|
|
|
|
|
- accountingSubjectCode: "",
|
|
|
|
|
- accountingSubjectId: '',
|
|
|
|
|
- accountingSubjectName: "",
|
|
|
|
|
- contactId: '',
|
|
|
|
|
- contactName: "",
|
|
|
|
|
- files: [],
|
|
|
|
|
- id: '',
|
|
|
|
|
- invoiceCode: "",
|
|
|
|
|
- payableDate: "",
|
|
|
|
|
- payableTotalPrice: '',
|
|
|
|
|
- receivedTotalPrice: '',
|
|
|
|
|
- remark: "",
|
|
|
|
|
- sourceCode: "",
|
|
|
|
|
- sourceId: "",
|
|
|
|
|
- sourceType: '',
|
|
|
|
|
- unreceiveTotalPrice: 0
|
|
|
|
|
- },
|
|
|
|
|
- accountingSubjectList: [],
|
|
|
|
|
- rules: {
|
|
|
|
|
- accountingSubjectId: {required: true, message: '请选择', trigger: 'change'},
|
|
|
|
|
- payableDate: {required: true, message: '请选择', trigger: 'change'},
|
|
|
|
|
- }
|
|
|
|
|
- };
|
|
|
|
|
- },
|
|
|
|
|
- props: {
|
|
|
|
|
- businessId: {
|
|
|
|
|
- default: ''
|
|
|
|
|
- },
|
|
|
|
|
- taskDefinitionKey: {
|
|
|
|
|
- default: ''
|
|
|
|
|
|
|
+ export default {
|
|
|
|
|
+ mixins: [dictMixins],
|
|
|
|
|
+ components: {
|
|
|
|
|
+ fileMain,
|
|
|
|
|
+ tableInfo,
|
|
|
|
|
+ personSelect,
|
|
|
|
|
+ fileUpload
|
|
|
},
|
|
},
|
|
|
- },
|
|
|
|
|
- async created() {
|
|
|
|
|
- await this.getInfo(this.businessId)
|
|
|
|
|
- },
|
|
|
|
|
- methods: {
|
|
|
|
|
- //获取详情
|
|
|
|
|
- async getInfo(id) {
|
|
|
|
|
- await this.getClassifyList(24, 'accountingSubjectList')
|
|
|
|
|
- let data = await getFinPayableInfoAPI(id)
|
|
|
|
|
- this.form = data
|
|
|
|
|
- let invoiceData = await invoiceApplyInfoAPI(data.invoiceId)
|
|
|
|
|
- this.form.accountingSubjectCode = invoiceData.accountingSubjectCode
|
|
|
|
|
- this.form.accountingSubjectId = invoiceData.accountingSubjectId
|
|
|
|
|
- this.form.accountingSubjectName = invoiceData.accountingSubjectName
|
|
|
|
|
|
|
+ data() {
|
|
|
|
|
+ return {
|
|
|
|
|
+ dialogType: '',
|
|
|
|
|
+ form: {
|
|
|
|
|
+ accountingSubjectCode: '',
|
|
|
|
|
+ accountingSubjectId: '',
|
|
|
|
|
+ accountingSubjectName: '',
|
|
|
|
|
+ contactId: '',
|
|
|
|
|
+ contactName: '',
|
|
|
|
|
+ files: [],
|
|
|
|
|
+ id: '',
|
|
|
|
|
+ invoiceCode: '',
|
|
|
|
|
+ payableDate: '',
|
|
|
|
|
+ payableTotalPrice: '',
|
|
|
|
|
+ receivedTotalPrice: '',
|
|
|
|
|
+ remark: '',
|
|
|
|
|
+ sourceCode: '',
|
|
|
|
|
+ sourceId: '',
|
|
|
|
|
+ sourceType: '',
|
|
|
|
|
+ unreceiveTotalPrice: 0
|
|
|
|
|
+ },
|
|
|
|
|
+ accountingSubjectList: [],
|
|
|
|
|
+ rules: {
|
|
|
|
|
+ accountingSubjectId: {
|
|
|
|
|
+ required: true,
|
|
|
|
|
+ message: '请选择',
|
|
|
|
|
+ trigger: 'change'
|
|
|
|
|
+ },
|
|
|
|
|
+ payableDate: { required: true, message: '请选择', trigger: 'change' }
|
|
|
|
|
+ }
|
|
|
|
|
+ };
|
|
|
},
|
|
},
|
|
|
- downloadFile(file) {
|
|
|
|
|
- getFile({objectName: file.storePath}, file.name);
|
|
|
|
|
- },
|
|
|
|
|
-
|
|
|
|
|
- //获取分类管理中的数据
|
|
|
|
|
- async getClassifyList(id, listName) {
|
|
|
|
|
- let res = await getTreeByPid(id)
|
|
|
|
|
- this[listName] = res.data
|
|
|
|
|
|
|
+ props: {
|
|
|
|
|
+ businessId: {
|
|
|
|
|
+ default: ''
|
|
|
|
|
+ },
|
|
|
|
|
+ taskDefinitionKey: {
|
|
|
|
|
+ default: ''
|
|
|
|
|
+ }
|
|
|
},
|
|
},
|
|
|
- //获取会计科目选中数据
|
|
|
|
|
- changeSubjectInfo(val) {
|
|
|
|
|
- if (!val) return this.form.accountingSubjectName = ''
|
|
|
|
|
- let data = this.$refs.treeSelect?.$refs?.tree?.getCurrentNode() || {}
|
|
|
|
|
- this.form.accountingSubjectName = data.name
|
|
|
|
|
|
|
+ async created() {
|
|
|
|
|
+ await this.getInfo(this.businessId);
|
|
|
},
|
|
},
|
|
|
- getTableValue() {
|
|
|
|
|
- return new Promise((resolve, reject) => {
|
|
|
|
|
- this.$refs.form.validate(async valid => {
|
|
|
|
|
- if (!valid) return this.$message.warning('有必填项未填,请检查')
|
|
|
|
|
- const API = finPayableUpdateAPI
|
|
|
|
|
- const res = await API(this.form)
|
|
|
|
|
- res.code == '0' ? resolve('1') : reject(new Error(data.message))
|
|
|
|
|
- })
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ methods: {
|
|
|
|
|
+ //获取详情
|
|
|
|
|
+ async getInfo(id) {
|
|
|
|
|
+ await this.getClassifyList(24, 'accountingSubjectList');
|
|
|
|
|
+ let data = await getFinPayableInfoAPI(id);
|
|
|
|
|
+ this.form = data;
|
|
|
|
|
+ let invoiceData = {};
|
|
|
|
|
+ if (data.invoiceId) {
|
|
|
|
|
+ invoiceData = await invoiceApplyInfoAPI(data.invoiceId);
|
|
|
|
|
+ }
|
|
|
|
|
+ this.form.accountingSubjectCode = invoiceData.accountingSubjectCode;
|
|
|
|
|
+ this.form.accountingSubjectId = invoiceData.accountingSubjectId;
|
|
|
|
|
+ this.form.accountingSubjectName = invoiceData.accountingSubjectName;
|
|
|
|
|
+ },
|
|
|
|
|
+ downloadFile(file) {
|
|
|
|
|
+ getFile({ objectName: file.storePath }, file.name);
|
|
|
|
|
+ },
|
|
|
|
|
|
|
|
- },
|
|
|
|
|
- cancel() {
|
|
|
|
|
- this.$emit('update:detailDialogFlag', false)
|
|
|
|
|
|
|
+ //获取分类管理中的数据
|
|
|
|
|
+ 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;
|
|
|
|
|
+ },
|
|
|
|
|
+ getTableValue() {
|
|
|
|
|
+ return new Promise((resolve, reject) => {
|
|
|
|
|
+ this.$refs.form.validate(async (valid) => {
|
|
|
|
|
+ if (!valid) return this.$message.warning('有必填项未填,请检查');
|
|
|
|
|
+ const API = finPayableUpdateAPI;
|
|
|
|
|
+ const res = await API(this.form);
|
|
|
|
|
+ res.code == '0' ? resolve('1') : reject(new Error(data.message));
|
|
|
|
|
+ });
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
|
|
+ cancel() {
|
|
|
|
|
+ this.$emit('update:detailDialogFlag', false);
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
- }
|
|
|
|
|
-};
|
|
|
|
|
|
|
+ };
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|
|
|
<style scoped lang="scss">
|
|
<style scoped lang="scss">
|
|
|
-.ele-dialog-form {
|
|
|
|
|
- .el-form-item {
|
|
|
|
|
- margin-bottom: 10px;
|
|
|
|
|
|
|
+ .ele-dialog-form {
|
|
|
|
|
+ .el-form-item {
|
|
|
|
|
+ margin-bottom: 10px;
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
-}
|
|
|
|
|
|
|
|
|
|
-.headbox {
|
|
|
|
|
- display: flex;
|
|
|
|
|
- justify-content: flex-start;
|
|
|
|
|
- align-items: center;
|
|
|
|
|
|
|
+ .headbox {
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ justify-content: flex-start;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
|
|
|
- .amount {
|
|
|
|
|
- font-size: 14px;
|
|
|
|
|
- font-weight: bold;
|
|
|
|
|
- margin-right: 20px;
|
|
|
|
|
|
|
+ .amount {
|
|
|
|
|
+ font-size: 14px;
|
|
|
|
|
+ font-weight: bold;
|
|
|
|
|
+ margin-right: 20px;
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
-}
|
|
|
|
|
</style>
|
|
</style>
|