|
|
|
@ -1,18 +1,4 @@
|
|
|
|
|
<template>
|
|
|
|
|
<<<<<<< HEAD
|
|
|
|
|
<el-dialog :title="!dataForm.id ? '新建' : isDetail ? '详情':'编辑'"
|
|
|
|
|
:close-on-click-modal="false" append-to-body
|
|
|
|
|
:visible.sync="visible" class="JNPF-dialog JNPF-dialog_center" lock-scroll
|
|
|
|
|
width="1500px">
|
|
|
|
|
<el-row :gutter="15" class="">
|
|
|
|
|
<el-form ref="elForm" :model="dataForm" :rules="rules" size="small" label-width="100px" label-position="right" >
|
|
|
|
|
<template v-if="!loading">
|
|
|
|
|
<el-col :span="8" >
|
|
|
|
|
<el-form-item label="单据编号"
|
|
|
|
|
prop="documentNo" >
|
|
|
|
|
<el-input v-model="dataForm.documentNo"
|
|
|
|
|
placeholder="系统自动生成" readonly>
|
|
|
|
|
=======
|
|
|
|
|
<el-dialog :title="!dataForm.id ? '新建' : isDetail ? '详情':'编辑'" :close-on-click-modal="false" append-to-body
|
|
|
|
|
:visible.sync="visible" class="JNPF-dialog JNPF-dialog_center" lock-scroll width="1500px">
|
|
|
|
|
<el-row :gutter="15" class="">
|
|
|
|
@ -21,7 +7,6 @@
|
|
|
|
|
<el-col :span="8">
|
|
|
|
|
<el-form-item label="单据编号" prop="documentNo">
|
|
|
|
|
<el-input v-model="dataForm.documentNo" placeholder="系统自动生成" readonly>
|
|
|
|
|
>>>>>>> ddaf1c11476266e400901543653df705c0f58f87
|
|
|
|
|
|
|
|
|
|
</el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
@ -103,123 +88,6 @@
|
|
|
|
|
<el-option v-for="(item, index) in statusOptions" :key="index" :label="item.fullName" :value="item.id"
|
|
|
|
|
:disabled="item.disabled"></el-option>
|
|
|
|
|
|
|
|
|
|
<<<<<<< HEAD
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="8" >
|
|
|
|
|
<el-form-item label="制单人"
|
|
|
|
|
prop="creatorUserName" >
|
|
|
|
|
<el-input v-model="dataForm.creatorUserName"
|
|
|
|
|
placeholder="系统自动生成" readonly>
|
|
|
|
|
|
|
|
|
|
</el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="24">
|
|
|
|
|
<el-tabs v-model="activeojnisi" tab-position="top" class="mb-20">
|
|
|
|
|
<el-tab-pane label="收款明细">
|
|
|
|
|
<el-col :span="24" >
|
|
|
|
|
<el-form-item label-width="0">
|
|
|
|
|
<div class="JNPF-common-title">
|
|
|
|
|
<h2></h2>
|
|
|
|
|
</div>
|
|
|
|
|
<el-table :data="dataForm.collection_item0List" size='mini' show-summary :summary-method="getSummaries" >
|
|
|
|
|
<el-table-column type="index" width="50" label="序号" align="center" />
|
|
|
|
|
<el-table-column prop="amount" label="收款金额" width="120" align="center">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-input v-model="scope.row.amount"
|
|
|
|
|
placeholder="请输入" clearable :style='{"width":"200%"}'>
|
|
|
|
|
</el-input>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column prop="creatorUserId" label="订单金额" width="130" align="center">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-input v-model="scope.row.price"
|
|
|
|
|
placeholder="请输入" clearable :style='{"width":"200%"}'>
|
|
|
|
|
</el-input>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column prop="creatorUserName" label="已收款金额" width="130" align="center">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-input v-model="scope.row.amountCollected"
|
|
|
|
|
placeholder="请输入" clearable :style='{"width":"200%"}'>
|
|
|
|
|
</el-input>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column prop="deleteTime" label="销售订单编号" width="130" align="center">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<popupSelect v-model="scope.row.documentNo"
|
|
|
|
|
placeholder="请选择" clearable :field="'deleteTime'+scope.$index" interfaceId="393372436705378053" :columnOptions="jg_collection_item0deleteTimecolumnOptions" propsValue="document_no" relationField="document_no" popupType="dialog"
|
|
|
|
|
popupWidth="800px" :bissId="dataForm.customerCode" :excludeFields="excludeFields" @change="popupSelect2"
|
|
|
|
|
>
|
|
|
|
|
</popupSelect>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column prop="lastModifyUserId" label="合同编号" width="130" align="center">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-input v-model="scope.row.contractCode"
|
|
|
|
|
placeholder="请输入" clearable :style='{"width":"200%"}'>
|
|
|
|
|
</el-input>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column prop="lastModifyUserName" label="重量" width="130" align="center">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-input v-model="scope.row.num"
|
|
|
|
|
placeholder="请输入" clearable :style='{"width":"200%"}'>
|
|
|
|
|
</el-input>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<!-- <el-table-column prop="taxRate" label="税率">-->
|
|
|
|
|
<!-- <template slot-scope="scope">-->
|
|
|
|
|
<!-- <el-select v-model="scope.row.taxRate"-->
|
|
|
|
|
<!-- placeholder="请选择" clearable :style='{"width":"100%"}'>-->
|
|
|
|
|
<!-- <el-option v-for="(item, index) in taxRateOptions" :key="index" :label="item.fullName" :value="item.id" :disabled="item.disabled" ></el-option>-->
|
|
|
|
|
<!-- </el-select>-->
|
|
|
|
|
<!-- </template>-->
|
|
|
|
|
<!-- </el-table-column>-->
|
|
|
|
|
<el-table-column prop="lastModifyTime" label="垫资金额" width="130" align="center">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-input v-model="scope.row.advanceAmount"
|
|
|
|
|
placeholder="请输入" clearable :style='{"width":"200%"}'>
|
|
|
|
|
</el-input>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column prop="deleteUserId" label="税额" width="130" align="center">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-input v-model="scope.row.rate"
|
|
|
|
|
placeholder="请输入" clearable :style='{"width":"200%"}'>
|
|
|
|
|
</el-input>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column prop="deleteUserName" label="不含税金额" width="130" align="center">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-input v-model="scope.row.notPrice"
|
|
|
|
|
placeholder="请输入" clearable :style='{"width":"200%"}'>
|
|
|
|
|
</el-input>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column prop="creatorTime" label="业务日期" width="130" align="center">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-date-picker v-model="scope.row.creatorTime"
|
|
|
|
|
placeholder="请选择" clearable :style='{"width":"200%"}' type="date" format="yyyy-MM-dd" value-format="timestamp" >
|
|
|
|
|
</el-date-picker>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="操作" width="50" align="center">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-button size="mini" type="text" class="JNPF-table-delBtn" @click="delcollection_item0List(scope.$index)">删除</el-button>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
</el-table>
|
|
|
|
|
<div class="table-actions" @click="addcollection_item0List()">
|
|
|
|
|
<el-button type="text" icon="el-icon-plus">添加</el-button>
|
|
|
|
|
</div>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-tab-pane >
|
|
|
|
|
</el-tabs>
|
|
|
|
|
=======
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
@ -327,7 +195,6 @@
|
|
|
|
|
<el-button type="text" icon="el-icon-plus">添加</el-button>
|
|
|
|
|
</div>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
>>>>>>> ddaf1c11476266e400901543653df705c0f58f87
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-tab-pane>
|
|
|
|
|
</el-tabs>
|
|
|
|
@ -342,49 +209,6 @@
|
|
|
|
|
</el-dialog>
|
|
|
|
|
</template>
|
|
|
|
|
<script>
|
|
|
|
|
<<<<<<< HEAD
|
|
|
|
|
import request from '@/utils/request'
|
|
|
|
|
import { getDataInterfaceRes } from '@/api/systemData/dataInterface'
|
|
|
|
|
import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
|
|
|
|
|
export default {
|
|
|
|
|
components: {},
|
|
|
|
|
props: [],
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
excludeFields: [],
|
|
|
|
|
visible: false,
|
|
|
|
|
loading: false,
|
|
|
|
|
isDetail: false,
|
|
|
|
|
dataForm: {
|
|
|
|
|
customerCode : '',
|
|
|
|
|
documentNo : '',
|
|
|
|
|
customerName : '',
|
|
|
|
|
amountCollected : '',
|
|
|
|
|
collectionCount : '',
|
|
|
|
|
collectionBank : '',
|
|
|
|
|
paymentType : "0",
|
|
|
|
|
currency : "0",
|
|
|
|
|
settlementType : "0",
|
|
|
|
|
remark : '',
|
|
|
|
|
voucher : [],
|
|
|
|
|
status : "0",
|
|
|
|
|
creatorUserName : '',
|
|
|
|
|
collection_item0List:[],
|
|
|
|
|
},
|
|
|
|
|
activeojnisi:'0',
|
|
|
|
|
rules:
|
|
|
|
|
{
|
|
|
|
|
},
|
|
|
|
|
customerNamecolumnOptions:[ {"label":"客户编码","value":"supplier_cd"}, {"label":"客户名称","value":"supplier_nm"}, {"label":"客户地点名称","value":"supplier_site_code"}, {"label":"客户等级","value":"customer_level"},],
|
|
|
|
|
jg_collection_item0deleteTimecolumnOptions:[ {"label":"销售订单ID","value":"id"},{"label":"销售订单编号","value":"document_no"}, {"label":"合同编号","value":"contract_code"},
|
|
|
|
|
{"label":"订单金额","value":"price"}, {"label":"已收款金额","value":"amount_collected"},
|
|
|
|
|
{"label":"重量","value":"num"}, {"label":"垫资金额","value":"advance_amount"},
|
|
|
|
|
{"label":"税额","value":"rate"}, {"label":"不含税金额","value":"not_price"}, {"label":"业务日期","value":"creator_time"},],
|
|
|
|
|
paymentTypeOptions:[{"fullName":"货款","id":"0"},{"fullName":"运费","id":"1"},{"fullName":"仓储","id":"2"}],
|
|
|
|
|
currencyOptions:[{"fullName":"人民币","id":"0"},{"fullName":"美元","id":"1"},{"fullName":"英镑","id":"2"}],
|
|
|
|
|
settlementTypeOptions:[{"fullName":"现金","id":"0"},{"fullName":"赊购","id":"1"},{"fullName":"网银","id":"2"},{"fullName":"银企直连","id":"3"},{"fullName":"银票","id":"4"},{"fullName":"商票","id":"5"}],
|
|
|
|
|
statusOptions:[{"fullName":"已保存","id":"0"},{"fullName":"审批中","id":"1"},{"fullName":"已审批","id":"2"},{"fullName":"已付款","id":"3"}],
|
|
|
|
|
=======
|
|
|
|
|
import request from '@/utils/request'
|
|
|
|
|
import {
|
|
|
|
|
getDataInterfaceRes
|
|
|
|
@ -518,7 +342,6 @@
|
|
|
|
|
"fullName": "已付款",
|
|
|
|
|
"id": "3"
|
|
|
|
|
}],
|
|
|
|
|
>>>>>>> ddaf1c11476266e400901543653df705c0f58f87
|
|
|
|
|
|
|
|
|
|
taxRateOptions: [{
|
|
|
|
|
"fullName": "13",
|
|
|
|
@ -563,185 +386,6 @@
|
|
|
|
|
this.dataForm.collection_item0List[i].creatorTime = b.creator_time;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
<<<<<<< HEAD
|
|
|
|
|
},
|
|
|
|
|
computed: {},
|
|
|
|
|
watch: {},
|
|
|
|
|
created() {
|
|
|
|
|
},
|
|
|
|
|
mounted() {},
|
|
|
|
|
methods: {
|
|
|
|
|
getSummaries(param) {
|
|
|
|
|
const { columns, data } = param;
|
|
|
|
|
const sums = [];
|
|
|
|
|
columns.forEach((column, index) => {
|
|
|
|
|
if (index === 0) {
|
|
|
|
|
sums[index] = '合计';
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
const values = data.map(item => Number(item[column.property]));
|
|
|
|
|
if (!values.every(value => isNaN(value)) && (index === 1)) {
|
|
|
|
|
sums[index] = values.reduce((prev, curr) => {
|
|
|
|
|
const value = Number(curr);
|
|
|
|
|
if (!isNaN(value)) {
|
|
|
|
|
return prev + curr;
|
|
|
|
|
} else {
|
|
|
|
|
return prev;
|
|
|
|
|
}
|
|
|
|
|
}, 0);
|
|
|
|
|
} else {
|
|
|
|
|
sums[index] = '';
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
return sums;
|
|
|
|
|
},
|
|
|
|
|
popupSelect(e,d){
|
|
|
|
|
this.excludeFields = [];
|
|
|
|
|
this.dataForm.collection_item0List = [];
|
|
|
|
|
this.dataForm.customerCode = d.id;
|
|
|
|
|
},
|
|
|
|
|
popupSelect2(a,b) {
|
|
|
|
|
var excludeFields = [];
|
|
|
|
|
for (let i = 0; i < this.dataForm.collection_item0List.length; i++) {
|
|
|
|
|
excludeFields.push(this.dataForm.collection_item0List[i].documentNo);
|
|
|
|
|
if (a == this.dataForm.collection_item0List[i].documentNo) {
|
|
|
|
|
this.dataForm.collection_item0List[i].id = b.id;
|
|
|
|
|
this.dataForm.collection_item0List[i].price = b.price;
|
|
|
|
|
this.dataForm.collection_item0List[i].amountCollected = b.amount_collected;
|
|
|
|
|
this.dataForm.collection_item0List[i].contractCode = b.contract_code;
|
|
|
|
|
this.dataForm.collection_item0List[i].num = b.num;
|
|
|
|
|
this.dataForm.collection_item0List[i].advanceAmount = b.advance_amount;
|
|
|
|
|
this.dataForm.collection_item0List[i].rate = b.rate;
|
|
|
|
|
this.dataForm.collection_item0List[i].notPrice = b.not_price;
|
|
|
|
|
this.dataForm.collection_item0List[i].creatorTime = b.creator_time;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
this.excludeFields = excludeFields;
|
|
|
|
|
},
|
|
|
|
|
collection_item0Exist() {
|
|
|
|
|
let isOk = true;
|
|
|
|
|
for(let i=0;i<this.dataForm.collection_item0List.length;i++){
|
|
|
|
|
const e = this.dataForm.collection_item0List[i];
|
|
|
|
|
}
|
|
|
|
|
return isOk;
|
|
|
|
|
},
|
|
|
|
|
clearData(data){
|
|
|
|
|
for (let key in data) {
|
|
|
|
|
if (data[key] instanceof Array) {
|
|
|
|
|
data[key] = [];
|
|
|
|
|
} else if (data[key] instanceof Object) {
|
|
|
|
|
this.clearData(data[key]);
|
|
|
|
|
} else {
|
|
|
|
|
data[key] = "";
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
init(id, isDetail) {
|
|
|
|
|
this.dataForm.id = id || 0;
|
|
|
|
|
this.visible = true;
|
|
|
|
|
this.isDetail = isDetail || false;
|
|
|
|
|
this.$nextTick(() => {
|
|
|
|
|
this.$refs['elForm'].resetFields();
|
|
|
|
|
if(this.dataForm.id){
|
|
|
|
|
this.loading = true
|
|
|
|
|
request({
|
|
|
|
|
url: '/api/collection/Collection/'+this.dataForm.id,
|
|
|
|
|
method: 'get'
|
|
|
|
|
}).then(res => {
|
|
|
|
|
this.dataInfo(res.data)
|
|
|
|
|
this.loading = false
|
|
|
|
|
});
|
|
|
|
|
}else{
|
|
|
|
|
this.clearData(this.dataForm)
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
this.$store.commit('generator/UPDATE_RELATION_DATA', {})
|
|
|
|
|
},
|
|
|
|
|
// 表单提交
|
|
|
|
|
dataFormSubmit() {
|
|
|
|
|
this.$refs['elForm'].validate((valid) => {
|
|
|
|
|
if (valid) {
|
|
|
|
|
if (!this.collection_item0Exist()) return
|
|
|
|
|
this.request()
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
request() {
|
|
|
|
|
var _data =this.dataList()
|
|
|
|
|
if (!this.dataForm.id) {
|
|
|
|
|
request({
|
|
|
|
|
url: '/api/collection/Collection',
|
|
|
|
|
method: 'post',
|
|
|
|
|
data: _data
|
|
|
|
|
}).then((res) => {
|
|
|
|
|
this.$message({
|
|
|
|
|
message: res.msg,
|
|
|
|
|
type: 'success',
|
|
|
|
|
duration: 1000,
|
|
|
|
|
onClose: () => {
|
|
|
|
|
this.visible = false
|
|
|
|
|
this.$emit('refresh', true)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
}else{
|
|
|
|
|
request({
|
|
|
|
|
url: '/api/collection/Collection/'+this.dataForm.id,
|
|
|
|
|
method: 'PUT',
|
|
|
|
|
data: _data
|
|
|
|
|
}).then((res) => {
|
|
|
|
|
this.$message({
|
|
|
|
|
message: res.msg,
|
|
|
|
|
type: 'success',
|
|
|
|
|
duration: 1000,
|
|
|
|
|
onClose: () => {
|
|
|
|
|
this.visible = false
|
|
|
|
|
this.$emit('refresh', true)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
addcollection_item0List(){
|
|
|
|
|
let item = {
|
|
|
|
|
amount:undefined,
|
|
|
|
|
creatorUserId:undefined,
|
|
|
|
|
creatorUserName:undefined,
|
|
|
|
|
deleteTime:undefined,
|
|
|
|
|
lastModifyUserId:undefined,
|
|
|
|
|
lastModifyUserName:undefined,
|
|
|
|
|
taxRate:undefined,
|
|
|
|
|
lastModifyTime:undefined,
|
|
|
|
|
deleteUserId:undefined,
|
|
|
|
|
deleteUserName:undefined,
|
|
|
|
|
creatorTime:undefined,
|
|
|
|
|
}
|
|
|
|
|
this.dataForm.collection_item0List.push(item)
|
|
|
|
|
},
|
|
|
|
|
delcollection_item0List(index) {
|
|
|
|
|
this.dataForm.collection_item0List.splice(index, 1);
|
|
|
|
|
},
|
|
|
|
|
dataList(){
|
|
|
|
|
var _data = JSON.parse(JSON.stringify(this.dataForm));
|
|
|
|
|
_data.voucher = JSON.stringify(_data.voucher)
|
|
|
|
|
for(let i=0;i<_data.collection_item0List.length;i++){
|
|
|
|
|
var _list = _data.collection_item0List[i];
|
|
|
|
|
}
|
|
|
|
|
return _data;
|
|
|
|
|
},
|
|
|
|
|
dataInfo(dataAll){
|
|
|
|
|
let _dataAll =dataAll
|
|
|
|
|
_dataAll.voucher = JSON.parse( _dataAll.voucher)
|
|
|
|
|
for(let i=0;i<_dataAll.collection_item0List.length;i++){
|
|
|
|
|
var _list = _dataAll.collection_item0List[i];
|
|
|
|
|
}
|
|
|
|
|
this.dataForm = _dataAll
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
=======
|
|
|
|
|
},
|
|
|
|
|
collection_item0Exist() {
|
|
|
|
|
let isOk = true;
|
|
|
|
@ -864,5 +508,4 @@
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
>>>>>>> ddaf1c11476266e400901543653df705c0f58f87
|
|
|
|
|
</script>
|
|
|
|
|