Merge remote-tracking branch 'origin/main'

product
chuang 2 years ago
commit 5a496e868a

@ -3,6 +3,8 @@ package jnpf.base.model.dataInterface;
import jnpf.base.Pagination; import jnpf.base.Pagination;
import lombok.Data; import lombok.Data;
import java.util.List;
/** /**
* *
* @author Allen Pan * @author Allen Pan
@ -24,4 +26,6 @@ public class DataInterfacePage extends Pagination {
private String bissId; private String bissId;
private List<String> excludeFields;
} }

@ -196,6 +196,9 @@ public class DataInterfaceServiceImpl extends ServiceImpl<DataInterfaceMapper, D
DataInterfaceActionVo actionVo = (DataInterfaceActionVo) result.getData(); DataInterfaceActionVo actionVo = (DataInterfaceActionVo) result.getData();
if (actionVo.getData() instanceof List) { if (actionVo.getData() instanceof List) {
dataList = (List<Map<String, Object>>) actionVo.getData(); dataList = (List<Map<String, Object>>) actionVo.getData();
if(page.getExcludeFields() != null && page.getExcludeFields().size() > 0){
dataList = dataList.stream().filter(datas -> !(page.getExcludeFields().contains(datas.get("license_num")))).collect(Collectors.toList());
}
total = dataList.size(); total = dataList.size();
} }
dataList = PageUtil.getListPage((int) page.getCurrentPage(), (int) page.getPageSize(), dataList); dataList = PageUtil.getListPage((int) page.getCurrentPage(), (int) page.getPageSize(), dataList);

21660
SC-web/package-lock.json generated

File diff suppressed because it is too large Load Diff

@ -130,6 +130,14 @@ export default {
type: String, type: String,
default: '' default: ''
}, },
includeFields: {
type: String,
default: ''
},
excludeFields: {
type: Array,
default: () => []
},
placeholder: { placeholder: {
type: String, type: String,
default: '请选择' default: '请选择'
@ -238,6 +246,8 @@ export default {
...this.listQuery, ...this.listQuery,
interfaceId: this.interfaceId, interfaceId: this.interfaceId,
bissId: this.bissId, bissId: this.bissId,
includeFields: this.includeFields,
excludeFields: this.excludeFields,
propsValue: this.propsValue, propsValue: this.propsValue,
relationField: this.relationField, relationField: this.relationField,
} }
@ -297,6 +307,8 @@ export default {
id: this.value, id: this.value,
interfaceId: this.interfaceId, interfaceId: this.interfaceId,
bissId: this.bissId, bissId: this.bissId,
includeFields: this.includeFields,
excludeFields: this.excludeFields,
propsValue: this.propsValue, propsValue: this.propsValue,
relationField: this.relationField, relationField: this.relationField,
} }

@ -1,441 +1,487 @@
<template> <template>
<el-dialog :title="!dataForm.id ? '新建' : isDetail ? '详情':'编辑'" <el-dialog :title="!dataForm.id ? '新建' : isDetail ? '详情':'编辑'" :close-on-click-modal="false" append-to-body
:close-on-click-modal="false" append-to-body :visible.sync="visible" class="JNPF-dialog JNPF-dialog_center" lock-scroll width="1500px">
:visible.sync="visible" class="JNPF-dialog JNPF-dialog_center" lock-scroll <el-row :gutter="15" class="">
width="1000px"> <el-form ref="elForm" :model="dataForm" :rules="rules" size="small" label-width="100px" label-position="right">
<el-row :gutter="15" class=""> <template v-if="!loading">
<el-form ref="elForm" :model="dataForm" :rules="rules" size="small" label-width="100px" label-position="right" > <el-col :span="8">
<template v-if="!loading"> <el-form-item label="单据编号" prop="documentno">
<el-col :span="8" > <el-input v-model="dataForm.documentno" placeholder="系统自动生成" readonly>
<el-form-item label="单据编号"
prop="documentno" >
<el-input v-model="dataForm.documentno"
placeholder="系统自动生成" readonly >
</el-input> </el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8" > <el-col :span="8">
<el-form-item label="供应商" <el-form-item label="供应商" required prop="suppliername">
prop="suppliername" > <el-input v-model="dataForm.suppliername" placeholder="请输入付款账户" clearable :style='{"width":"100%"}'>
<el-input v-model="dataForm.suppliername"
placeholder="请输入付款账户" clearable :style='{"width":"100%"}'>
</el-input> </el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8" > <el-col :span="8">
<el-form-item label="付款类型" <el-form-item label="付款类型" prop="paymenttype">
prop="paymenttype" > <el-select v-model="dataForm.paymenttype" placeholder="请选择付款类型" clearable :style='{"width":"100%"}'>
<el-select v-model="dataForm.paymenttype" <el-option v-for="(item, index) in paymenttypeOptions" :key="index" :label="item.fullName"
placeholder="请选择付款类型" clearable :style='{"width":"100%"}'> :value="item.id" :disabled="item.disabled"></el-option>
<el-option v-for="(item, index) in paymenttypeOptions" :key="index" :label="item.fullName" :value="item.id" :disabled="item.disabled" ></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8" > <el-col :span="8">
<el-form-item label="付款账户" <el-form-item label="付款账户" prop="paymentaccount">
prop="paymentaccount" > <el-input v-model="dataForm.paymentaccount" placeholder="请输入付款账户" clearable :style='{"width":"100%"}'>
<el-input v-model="dataForm.paymentaccount"
placeholder="请输入付款账户" clearable :style='{"width":"100%"}'>
</el-input> </el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8" > <el-col :span="8">
<el-form-item label="付款银行" <el-form-item label="付款银行" prop="paymentbank">
prop="paymentbank" > <el-input v-model="dataForm.paymentbank" placeholder="请输入付款银行" clearable :style='{"width":"100%"}'>
<el-input v-model="dataForm.paymentbank"
placeholder="请输入付款银行" clearable :style='{"width":"100%"}'>
</el-input> </el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8" > <el-col :span="8">
<el-form-item label="付款金额" <el-form-item label="付款金额" prop="paymentamount">
prop="paymentamount" > <el-input v-model="dataForm.paymentamount" placeholder="请输入付款金额" clearable :style='{"width":"100%"}'>
<el-input v-model="dataForm.paymentamount"
placeholder="请输入付款金额" clearable :style='{"width":"100%"}'>
</el-input> </el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8" > <el-col :span="8">
<el-form-item label="收款账户" <el-form-item label="收款账户" prop="collectionaccount">
prop="collectionaccount" > <el-input v-model="dataForm.collectionaccount" placeholder="请输入" clearable :style='{"width":"100%"}'>
<el-input v-model="dataForm.collectionaccount"
placeholder="请输入" clearable :style='{"width":"100%"}'>
</el-input> </el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8" > <el-col :span="8">
<el-form-item label="收款银行" <el-form-item label="收款银行" prop="collectionbank">
prop="collectionbank" > <el-input v-model="dataForm.collectionbank" placeholder="请输入" clearable :style='{"width":"100%"}'>
<el-input v-model="dataForm.collectionbank"
placeholder="请输入" clearable :style='{"width":"100%"}'>
</el-input> </el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8" > <el-col :span="8">
<el-form-item label="申请金额" <el-form-item label="申请金额" prop="requestedamount">
prop="requestedamount" > <el-input v-model="dataForm.requestedamount" placeholder="请输入" clearable :style='{"width":"100%"}'>
<el-input v-model="dataForm.requestedamount"
placeholder="请输入" clearable :style='{"width":"100%"}'>
</el-input> </el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8" > <el-col :span="8">
<el-form-item label="应付日期" <el-form-item label="应付日期" prop="duedate">
prop="duedate" > <el-date-picker v-model="dataForm.duedate" placeholder="请选择" clearable :style='{"width":"100%"}'
<el-date-picker v-model="dataForm.duedate" type="date" format="yyyy-MM-dd" value-format="timestamp">
placeholder="请选择" clearable :style='{"width":"100%"}' type="date" format="yyyy-MM-dd" value-format="timestamp" >
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8" > <el-col :span="8">
<el-form-item label="币别 " <el-form-item label="币别 " prop="currency">
prop="currency" > <el-select v-model="dataForm.currency" placeholder="请选择" clearable :style='{"width":"100%"}'>
<el-select v-model="dataForm.currency" <el-option v-for="(item, index) in currencyOptions" :key="index" :label="item.fullName" :value="item.id"
placeholder="请选择" clearable :style='{"width":"100%"}'> :disabled="item.disabled"></el-option>
<el-option v-for="(item, index) in currencyOptions" :key="index" :label="item.fullName" :value="item.id" :disabled="item.disabled" ></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8" > <el-col :span="8">
<el-form-item label="结算类型" <el-form-item label="结算类型" required prop="settlementtype">
prop="settlementtype" > <el-select v-model="dataForm.settlementtype" placeholder="请选择" clearable :style='{"width":"100%"}'>
<el-select v-model="dataForm.settlementtype" <el-option v-for="(item, index) in settlementtypeOptions" :key="index" :label="item.fullName"
placeholder="请选择" clearable :style='{"width":"100%"}'> :value="item.id" :disabled="item.disabled"></el-option>
<el-option v-for="(item, index) in settlementtypeOptions" :key="index" :label="item.fullName" :value="item.id" :disabled="item.disabled" ></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8" > <el-col :span="8">
<el-form-item label="来源单号" <el-form-item label="来源单号" prop="paymentno">
prop="paymentno" > <el-input v-model="dataForm.paymentno" placeholder="请输入" clearable :style='{"width":"100%"}'>
<el-input v-model="dataForm.paymentno"
placeholder="请输入" clearable :style='{"width":"100%"}'>
</el-input> </el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="16" > <el-col :span="16">
<el-form-item label="备注" <el-form-item label="备注" prop="remark">
prop="remark" > <el-input v-model="dataForm.remark" placeholder="请输入" clearable :style='{"width":"100%"}'>
<el-input v-model="dataForm.remark"
placeholder="请输入" clearable :style='{"width":"100%"}'>
</el-input> </el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8" > <el-col :span="8">
<el-form-item label="单据状态" <el-form-item label="单据状态" prop="status">
prop="status" > <el-select v-model="dataForm.status" placeholder="请选择" clearable :style='{"width":"100%"}'>
<el-select v-model="dataForm.status" <el-option v-for="(item, index) in statusOptions" :key="index" :label="item.fullName" :value="item.id"
placeholder="请选择" clearable :style='{"width":"100%"}'> :disabled="item.disabled"></el-option>
<el-option v-for="(item, index) in statusOptions" :key="index" :label="item.fullName" :value="item.id" :disabled="item.disabled" ></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="24"> <el-col :span="24">
<el-tabs v-model="activeivpzpd" tab-position="top" class="mb-20"> <el-tabs v-model="activeivpzpd" tab-position="top" class="mb-20">
<el-tab-pane label="申请明细"> <el-tab-pane label="申请明细">
<el-col :span="24" > <el-col :span="24">
<el-form-item label-width="0"> <el-form-item label-width="0">
<div class="JNPF-common-title"> <div class="JNPF-common-title">
<h2></h2> <h2></h2>
</div> </div>
<el-table :data="dataForm.payment_item0List" size='mini' > <el-table :data="dataForm.payment_item0List" size='mini' show-summary>
<el-table-column type="index" width="50" label="序号" align="center" /> <el-table-column type="index" width="50" label="序号" align="center" />
<el-table-column prop="amount" label="付款金额"> <el-table-column prop="amount" label="付款金额" align="center" >
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-model="scope.row.amount" <el-input v-model="scope.row.amount" placeholder="请输入" clearable :style='{"width":"100%"}'>
placeholder="请输入" clearable :style='{"width":"100%"}'> </el-input>
</el-input> </template>
</template> </el-table-column>
</el-table-column> <!-- <el-table-column prop="creatorUserId" label="申请金额">-->
<!-- <el-table-column prop="creatorUserId" label="申请金额">--> <!-- <template slot-scope="scope">-->
<!-- <template slot-scope="scope">--> <!-- <el-input v-model="scope.row.creatorUserId"-->
<!-- <el-input v-model="scope.row.creatorUserId"--> <!-- placeholder="请输入" clearable :style='{"width":"100%"}'>-->
<!-- placeholder="请输入" clearable :style='{"width":"100%"}'>--> <!-- </el-input>-->
<!-- </el-input>--> <!-- </template>-->
<!-- </template>--> <!-- </el-table-column>-->
<!-- </el-table-column>--> <!-- <el-table-column prop="creatorUserName" label="订单金额">-->
<!-- <el-table-column prop="creatorUserName" label="订单金额">--> <!-- <template slot-scope="scope">-->
<!-- <template slot-scope="scope">--> <!-- <el-input v-model="scope.row.creatorUserName"-->
<!-- <el-input v-model="scope.row.creatorUserName"--> <!-- placeholder="请输入" clearable :style='{"width":"100%"}'>-->
<!-- placeholder="请输入" clearable :style='{"width":"100%"}'>--> <!-- </el-input>-->
<!-- </el-input>--> <!-- </template>-->
<!-- </template>--> <!-- </el-table-column>-->
<!-- </el-table-column>--> <!-- <el-table-column prop="lastModifyUserId" label="已付金额" align="center" >
<el-table-column prop="lastModifyUserId" label="已付金额"> <template slot-scope="scope">
<template slot-scope="scope"> <el-input v-model="scope.row.payPrice" placeholder="请输入" clearable :style='{"width":"100%"}'>
<el-input v-model="scope.row.payPrice" </el-input>
placeholder="请输入" clearable :style='{"width":"100%"}'> </template>
</el-input> </el-table-column> -->
</template> <el-table-column prop="payPrice" label="已付金额" align="center" >
</el-table-column> <template slot-scope="scope">
<el-table-column prop="lastModifyUserName" label="订单编号"> <el-input v-model="scope.row.payPrice" placeholder="请输入" clearable :style='{"width":"100%"}'>
<template slot-scope="scope"> </el-input>
<el-input v-model="scope.row.documentNo" </template>
placeholder="请输入" clearable :style='{"width":"100%"}'> </el-table-column>
</el-input> <el-table-column prop="documentNo" label="订单编号" align="center" >
</template> <template slot-scope="scope">
</el-table-column> <el-input v-model="scope.row.documentNo" placeholder="请输入" clearable
<el-table-column prop="lastModifyTime" label="合同编码"> :style='{"width":"100%"}'>
<template slot-scope="scope"> </el-input>
<el-input v-model="scope.row.contractCode" </template>
placeholder="请输入" clearable :style='{"width":"100%"}'> </el-table-column>
</el-input> <el-table-column prop="lastModifyTime" label="合同编码" align="center" >
</template> <template slot-scope="scope">
</el-table-column> <el-input v-model="scope.row.contractCode" placeholder="请输入" clearable
<el-table-column prop="deleteUserId" label="重量"> :style='{"width":"100%"}'>
<template slot-scope="scope"> </el-input>
<el-input v-model="scope.row.num" </template>
placeholder="请输入" clearable :style='{"width":"100%"}'> </el-table-column>
</el-input> <el-table-column prop="deleteUserId" label="重量" align="center" >
</template> <template slot-scope="scope">
</el-table-column> <el-input v-model="scope.row.num" placeholder="请输入" clearable :style='{"width":"100%"}'>
<el-table-column prop="deleteTime" label="垫资金额"> </el-input>
<template slot-scope="scope"> </template>
<el-input v-model="scope.row.advanceAmount" </el-table-column>
placeholder="请输入" clearable :style='{"width":"100%"}'> <el-table-column prop="deleteTime" label="垫资金额" align="center" >
</el-input> <template slot-scope="scope">
</template> <el-input v-model="scope.row.advanceAmount" placeholder="请输入" clearable
</el-table-column> :style='{"width":"100%"}'>
<el-table-column prop="orgnizeId" label="税额"> </el-input>
<template slot-scope="scope"> </template>
<el-input v-model="scope.row.rate" </el-table-column>
placeholder="请输入" clearable :style='{"width":"100%"}'> <el-table-column prop="orgnizeId" label="税额" align="center" >
</el-input> <template slot-scope="scope">
</template> <el-input v-model="scope.row.rate" placeholder="请输入" clearable :style='{"width":"100%"}'>
</el-table-column> </el-input>
<el-table-column prop="departmentId" label="不含税金额"> </template>
<template slot-scope="scope"> </el-table-column>
<el-input v-model="scope.row.notAmount" <el-table-column prop="departmentId" label="不含税金额" align="center" >
placeholder="请输入" clearable :style='{"width":"100%"}'> <template slot-scope="scope">
</el-input> <el-input v-model="scope.row.notAmount" placeholder="请输入" clearable :style='{"width":"100%"}'>
</template> </el-input>
</el-table-column> </template>
<el-table-column prop="creatorTime" label="业务日期"> </el-table-column>
<template slot-scope="scope"> <el-table-column prop="creatorTime" label="业务日期" align="center" width="160" >
<el-date-picker v-model="scope.row.creatorTime" <template slot-scope="scope">
placeholder="请选择" clearable :style='{"width":"100%"}' type="date" format="yyyy-MM-dd" value-format="timestamp" > <el-date-picker v-model="scope.row.creatorTime" placeholder="请选择" clearable
</el-date-picker> :style='{"width":"100%"}' type="date" format="yyyy-MM-dd" value-format="timestamp">
</template> </el-date-picker>
</el-table-column> </template>
<el-table-column label="操作" width="50" > </el-table-column>
<template slot-scope="scope"> <el-table-column label="操作" width="50" align="center" >
<el-button size="mini" type="text" class="JNPF-table-delBtn" @click="delpayment_item0List(scope.$index)"></el-button> <template slot-scope="scope">
</template> <el-button size="mini" type="text" class="JNPF-table-delBtn"
</el-table-column> @click="delpayment_item0List(scope.$index)">删除</el-button>
</el-table> </template>
<div class="table-actions" @click="addpayment_item0List()"> </el-table-column>
<el-button type="text" icon="el-icon-plus">添加</el-button> </el-table>
</div> <div class="table-actions" @click="addpayment_item0List()">
</el-form-item> <el-button type="text" icon="el-icon-plus">添加</el-button>
</el-col> </div>
</el-tab-pane > </el-form-item>
</el-tabs>
</el-col> </el-col>
</template> </el-tab-pane>
</el-form> </el-tabs>
</el-col>
</template>
</el-form>
</el-row> </el-row>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button @click="visible = false"> </el-button> <el-button @click="visible = false"> </el-button>
<el-button type="primary" @click="dataFormSubmit()" v-if="!isDetail"> </el-button> <el-button type="primary" @click="dataFormSubmit()" v-if="!isDetail"> </el-button>
</span> </span>
</el-dialog> </el-dialog>
</template> </template>
<script> <script>
import request from '@/utils/request' import request from '@/utils/request'
import { getDataInterfaceRes } from '@/api/systemData/dataInterface' import {
import { getDictionaryDataSelector } from '@/api/systemData/dictionary' getDataInterfaceRes
export default { } from '@/api/systemData/dataInterface'
components: {}, import {
props: [], getDictionaryDataSelector
data() { } from '@/api/systemData/dictionary'
return { export default {
visible: false, components: {},
loading: false, props: [],
isDetail: false, data() {
dataForm: { return {
documentno : '', visible: false,
suppliername : '', loading: false,
paymenttype : "0", isDetail: false,
paymentaccount : '', dataForm: {
paymentbank : '', documentno: '',
paymentamount : '', suppliername: '',
collectionaccount : '', paymenttype: "0",
collectionbank : '', paymentaccount: '',
requestedamount : '', paymentbank: '',
duedate : '', paymentamount: '',
currency : "0", collectionaccount: '',
settlementtype : "0", collectionbank: '',
paymentno : '', requestedamount: '',
remark : '', duedate: '',
status : "0", currency: "0",
payment_item0List:[], settlementtype: "0",
}, paymentno: '',
activeivpzpd:'0', remark: '',
rules: status: "0",
{ payment_item0List: [],
suppliername: [
],
paymentaccount: [
],
paymentamount: [
{
required: true,
message: '请输入付款金额',
trigger: 'blur'
},
{
pattern: /^[1-9]\d*\.\d*|0\.\d*[1-9]\d*|0?\.0+|0$/,
message: '请输入正确的金额',
trigger: 'blur'
},
],
},
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"}],
}
}, },
computed: {}, activeivpzpd: '0',
watch: {}, rules: {
created() { suppliername: [],
}, paymentaccount: [],
mounted() {}, paymentamount: [{
methods: { required: true,
payment_item0Exist() { message: '请输入付款金额',
let isOk = true; trigger: 'blur'
for(let i=0;i<this.dataForm.payment_item0List.length;i++){
const e = this.dataForm.payment_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/payment/Payment/'+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() { pattern: /^[1-9]\d*\.\d*|0\.\d*[1-9]\d*|0?\.0+|0$/,
this.$refs['elForm'].validate((valid) => { message: '请输入正确的金额',
if (valid) { trigger: 'blur'
if (!this.payment_item0Exist()) return
this.request()
}
})
},
request() {
var _data =this.dataList()
if (!this.dataForm.id) {
request({
url: '/api/payment/Payment',
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/payment/Payment/'+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)
}
})
})
}
},
addpayment_item0List(){
let item = {
amount:undefined,
creatorUserId:undefined,
creatorUserName:undefined,
lastModifyUserId:undefined,
lastModifyUserName:undefined,
lastModifyTime:undefined,
deleteUserId:undefined,
deleteTime:undefined,
orgnizeId:undefined,
departmentId:undefined,
creatorTime:undefined,
}
this.dataForm.payment_item0List.push(item)
},
delpayment_item0List(index) {
this.dataForm.payment_item0List.splice(index, 1);
},
dataList(){
var _data = JSON.parse(JSON.stringify(this.dataForm));
for(let i=0;i<_data.payment_item0List.length;i++){
var _list = _data.payment_item0List[i];
}
return _data;
},
dataInfo(dataAll){
let _dataAll =dataAll
for(let i=0;i<_dataAll.payment_item0List.length;i++){
var _list = _dataAll.payment_item0List[i];
}
this.dataForm = _dataAll
}, },
],
}, },
} 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"
}],
}
},
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))) {
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;
},
payment_item0Exist() {
let isOk = true;
for (let i = 0; i < this.dataForm.payment_item0List.length; i++) {
const e = this.dataForm.payment_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/payment/Payment/' + 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.payment_item0Exist()) return
this.request()
}
})
},
request() {
var _data = this.dataList()
if (!this.dataForm.id) {
request({
url: '/api/payment/Payment',
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/payment/Payment/' + 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)
}
})
})
}
},
addpayment_item0List() {
let item = {
amount: undefined,
creatorUserId: undefined,
creatorUserName: undefined,
lastModifyUserId: undefined,
lastModifyUserName: undefined,
lastModifyTime: undefined,
deleteUserId: undefined,
deleteTime: undefined,
orgnizeId: undefined,
departmentId: undefined,
creatorTime: undefined,
}
this.dataForm.payment_item0List.push(item)
},
delpayment_item0List(index) {
this.dataForm.payment_item0List.splice(index, 1);
},
dataList() {
var _data = JSON.parse(JSON.stringify(this.dataForm));
for (let i = 0; i < _data.payment_item0List.length; i++) {
var _list = _data.payment_item0List[i];
}
return _data;
},
dataInfo(dataAll) {
let _dataAll = dataAll
for (let i = 0; i < _dataAll.payment_item0List.length; i++) {
var _list = _dataAll.payment_item0List[i];
}
this.dataForm = _dataAll
},
},
}
</script> </script>

@ -1,326 +1,427 @@
<template> <template>
<div class="JNPF-common-layout"> <div class="JNPF-common-layout">
<div class="JNPF-common-layout-center"> <div class="JNPF-common-layout-center">
<el-row class="JNPF-common-search-box" :gutter="16"> <el-row class="JNPF-common-search-box" :gutter="16">
<el-form @submit.native.prevent> <el-form @submit.native.prevent>
<el-col :span="6"> <el-col :span="6">
<el-form-item label="单据编号"> <el-form-item label="单据编号">
<el-input v-model="query.documentno" placeholder="请输入" clearable> </el-input> <el-input v-model="query.documentno" placeholder="请输入" clearable> </el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" @click="search()"></el-button> <el-button type="primary" icon="el-icon-search" @click="search()"></el-button>
<el-button icon="el-icon-refresh-right" @click="reset()"></el-button> <el-button icon="el-icon-refresh-right" @click="reset()"></el-button>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-form> </el-form>
</el-row> </el-row>
<div class="JNPF-common-layout-main JNPF-flex-main"> <div class="JNPF-common-layout-main JNPF-flex-main">
<div class="JNPF-common-head"> <div class="JNPF-common-head">
<div> <div>
<el-button type="primary" icon="el-icon-plus" @click="addOrUpdateHandle()"> <el-button type="text" icon="el-icon-plus" @click="addOrUpdateHandle()">
</el-button> </el-button>
<el-button type="text" icon="el-icon-download" @click="exportData()" >导出 <el-button type="text" icon="el-icon-download" @click="exportData()">
</el-button> </el-button>
<el-button type="text" icon="el-icon-delete" @click="handleBatchRemoveDel()" >批量删除 <el-button type="text" icon="el-icon-delete" @click="handleBatchRemoveDel()">
</el-button> </el-button>
<el-button type="primary" icon="el-icon-plus" @click="confirmprice()"> <el-button type="text" icon="el-icon-check" @click="exportData()">
</el-button> </el-button>
</div> <el-button type="text" icon="el-icon-close" @click="exportData()">
<div class="JNPF-common-head-right"> </el-button>
<el-tooltip effect="dark" content="刷新" placement="top"> <el-button type="text" icon="el-icon-check" @click="exportData()">
<el-link icon="icon-ym icon-ym-Refresh JNPF-common-head-icon" :underline="false" </el-button>
@click="reset()"/> <el-button type="text" icon="el-icon-check" @click="confirmprice()">
</el-tooltip> </el-button>
<screenfull isContainer/> </div>
</div> <div class="JNPF-common-head-right">
</div> <el-tooltip effect="dark" content="刷新" placement="top">
<JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange' has-c @selection-change="handleSelectionChange"> <el-link icon="icon-ym icon-ym-Refresh JNPF-common-head-icon" :underline="false" @click="reset()" />
<el-table-column prop="paymentno" label="来源单号" width="0" align="left" </el-tooltip>
/> <screenfull isContainer />
<el-table-column prop="documentno" label="单据编号" width="0" align="left" </div>
/>
<el-table-column prop="suppliername" label="供应商" width="0" align="left"
/>
<el-table-column label="币别 " width="0" prop="currency" algin="left"
>
<template slot-scope="scope">
{{ scope.row.currency | dynamicText(currencyOptions) }}
</template>
</el-table-column>
<el-table-column prop="paymentamount" label="付款金额" width="0" align="left"
/>
<el-table-column prop="requestedamount" label="申请金额" width="0" align="left"
/>
<el-table-column prop="paymentaccount" label="付款账户" width="0" align="left"
/>
<el-table-column prop="paymentbank" label="付款银行" width="0" align="left"
/>
<el-table-column label="付款类型" width="0" prop="paymenttype" algin="left"
>
<template slot-scope="scope">
{{ scope.row.paymenttype | dynamicText(paymenttypeOptions) }}
</template>
</el-table-column>
<el-table-column label="结算类型" width="0" prop="settlementtype" algin="left"
>
<template slot-scope="scope">
{{ scope.row.settlementtype | dynamicText(settlementtypeOptions) }}
</template>
</el-table-column>
<el-table-column label="单据状态" width="0" prop="status" algin="left"
>
<template slot-scope="scope">
{{ scope.row.status | dynamicText(statusOptions) }}
</template>
</el-table-column>
<el-table-column label="操作" fixed="right"
width="150" >
<template slot-scope="scope">
<el-button type="text"
@click="addOrUpdateHandle(scope.row.id)" >编辑
</el-button>
<el-button type="text" class="JNPF-table-delBtn" @click="handleDel(scope.row.id)">
</el-button>
<el-button type="text"
@click="goDetail(scope.row.id)">详情
</el-button>
</template>
</el-table-column>
</JNPF-table>
<pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize" @pagination="initData"/>
</div>
</div> </div>
<JNPF-Form v-if="formVisible" ref="JNPFForm" @refresh="refresh"/> <JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange' has-c :hasNO="false"
<ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download"/> @selection-change="handleSelectionChange" border>
<Detail v-if="detailVisible" ref="Detail" @refresh="detailVisible=false"/> <el-table-column prop="paymentno" label="来源单号" fixed="left" sortable width="200" align="center" />
<el-table-column prop="documentno" label="单据编号" fixed="left" sortable width="200" align="center" />
<el-table-column prop="suppliername" label="供应商" fixed="left" sortable width="150" align="center" />
<el-table-column label="币别 " width="80" prop="currency" sortable align="center" >
<template slot-scope="scope">
{{ scope.row.currency | dynamicText(currencyOptions) }}
</template>
</el-table-column>
<el-table-column prop="paymentamount" label="付款金额" sortable width="140" align="center" />
<el-table-column prop="requestedamount" label="申请金额" sortable width="140" align="center" />
<el-table-column prop="paymentaccount" label="付款账户" sortable width="140" align="center" />
<el-table-column prop="paymentbank" label="付款银行" sortable width="150" align="center" />
<el-table-column label="付款类型" sortable width="140" prop="paymenttype" align="center" >
<template slot-scope="scope">
{{ scope.row.paymenttype | dynamicText(paymenttypeOptions) }}
</template>
</el-table-column>
<el-table-column label="结算类型" sortable width="140" prop="settlementtype" align="center" >
<template slot-scope="scope">
{{ scope.row.settlementtype | dynamicText(settlementtypeOptions) }}
</template>
</el-table-column>
<el-table-column label="单据状态" sortable width="140" prop="status" align="center" >
<template slot-scope="scope">
{{ scope.row.status | dynamicText(statusOptions) }}
</template>
</el-table-column>
<el-table-column label="操作" fixed="right" width="150" align="center" >
<template slot-scope="scope">
<el-button type="text" @click="addOrUpdateHandle(scope.row.id)">
</el-button>
<el-button type="text" class="JNPF-table-delBtn" @click="handleDel(scope.row.id)">
</el-button>
<el-button type="text" @click="goDetail(scope.row.id)">
</el-button>
</template>
</el-table-column>
</JNPF-table>
<pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize"
@pagination="initData" />
</div>
</div> </div>
<JNPF-Form v-if="formVisible" ref="JNPFForm" @refresh="refresh" />
<ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download" />
<Detail v-if="detailVisible" ref="Detail" @refresh="detailVisible=false" />
</div>
</template> </template>
<script> <script>
import request from '@/utils/request' import request from '@/utils/request'
import {getDictionaryDataSelector} from '@/api/systemData/dictionary' import {
import JNPFForm from './Form' getDictionaryDataSelector
import ExportBox from './ExportBox' } from '@/api/systemData/dictionary'
import {getDataInterfaceRes} from '@/api/systemData/dataInterface' import JNPFForm from './Form'
import Detail from './Detail' import ExportBox from './ExportBox'
import {
getDataInterfaceRes
} from '@/api/systemData/dataInterface'
import Detail from './Detail'
export default { export default {
components: {JNPFForm, ExportBox,Detail}, components: {
data() { JNPFForm,
return { ExportBox,
detailVisible: false, Detail
query: { },
documentno:undefined, data() {
}, return {
treeProps: { detailVisible: false,
children: 'children', query: {
label: 'fullName', documentno: undefined,
value: 'id'
},
list: [],
listLoading: true,
multipleSelection: [], total: 0,
listQuery: {
currentPage: 1,
pageSize: 20,
sort: "desc",
sidx: "businessdate",
},
formVisible: false,
exportBoxVisible: false,
columnList: [
{prop: 'paymentno', label: '来源单号'},
{prop: 'documentno', label: '单据编号'},
{prop: 'suppliername', label: '供应商'},
{prop: 'currency', label: '币别 '},
{prop: 'paymentamount', label: '付款金额'},
{prop: 'requestedamount', label: '申请金额'},
{prop: 'paymentaccount', label: '付款账户'},
{prop: 'paymentbank', label: '付款银行'},
{prop: 'paymenttype', label: '付款类型'},
{prop: 'settlementtype', label: '结算类型'},
{prop: 'status', label: '单据状态'},
],
paymenttypeOptions:[{"fullName":"贷款","id":"0"},{"fullName":"运费","id":"1"},{"fullName":"仓储","id":"2"}],
paymenttypeProps:{"label":"fullName","value":"id"},
currencyOptions:[{"fullName":"人民币","id":"0"},{"fullName":"美元","id":"1"},{"fullName":"英镑","id":"2"}],
currencyProps:{"label":"fullName","value":"id"},
settlementtypeOptions:[{"fullName":"现金","id":"0"},{"fullName":"赊购","id":"1"},{"fullName":"网银","id":"2"},{"fullName":"银企直连","id":"3"},{"fullName":"银票","id":"4"},{"fullName":"商票","id":"5"}],
settlementtypeProps:{"label":"fullName","value":"id"},
statusOptions:[{"fullName":"已保存","id":"0"},{"fullName":"审批中","id":"1"},{"fullName":"已审批","id":"2"},{"fullName":"已付款","id":"3"}],
statusProps:{"label":"fullName","value":"id"},
}
}, },
computed: { treeProps: {
menuId() { children: 'children',
return this.$route.meta.modelId || '' label: 'fullName',
} value: 'id'
}, },
created() { list: [],
this.initData() listLoading: true,
multipleSelection: [],
total: 0,
listQuery: {
currentPage: 1,
pageSize: 20,
sort: "desc",
sidx: "businessdate",
}, },
methods: { formVisible: false,
goDetail(id){ exportBoxVisible: false,
this.detailVisible = true columnList: [{
this.$nextTick(() => { prop: 'paymentno',
this.$refs.Detail.init(id) label: '来源单号'
}) },
}, {
sortChange({column, prop, order}) { prop: 'documentno',
this.listQuery.sort = order == 'ascending' ? 'asc' : 'desc' label: '单据编号'
this.listQuery.sidx = !order ? '' : prop },
this.initData() {
}, prop: 'suppliername',
initData() { label: '供应商'
this.listLoading = true; },
let _query = { {
...this.listQuery, prop: 'currency',
...this.query, label: '币别 '
menuId:this.menuId },
}; {
request({ prop: 'paymentamount',
url: `/api/payment/Payment/getList`, label: '付款金额'
method: 'post', },
data: _query {
}).then(res => { prop: 'requestedamount',
var _list =[]; label: '申请金额'
for(let i=0;i<res.data.list.length;i++){ },
let _data = res.data.list[i]; {
_list.push(_data) prop: 'paymentaccount',
} label: '付款账户'
this.list = _list },
this.total = res.data.pagination.total {
prop: 'paymentbank',
this.listLoading = false label: '付款银行'
})
},
handleDel(id) {
this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
type: 'warning'
}).then(() => {
request({
url: `/api/payment/Payment/${id}`,
method: 'DELETE'
}).then(res => {
this.$message({
type: 'success',
message: res.msg,
onClose: () => {
this.initData()
}
});
})
}).catch(() => {
});
},
handleSelectionChange(val) {
const res = val.map(item => item.id)
this.multipleSelection = res
},
handleBatchRemoveDel() {
if (!this.multipleSelection.length) {
this.$message({
type: 'error',
message: '请选择一条数据',
duration: 1500,
})
return
}
const ids = this.multipleSelection.join()
this.$confirm('您确定要删除这些数据吗, 是否继续?', '提示', {
type: 'warning'
}).then(() => {
request({
url: `/api/payment/Payment/batchRemove/${ids}`,
method: 'DELETE'
}).then(res => {
this.$message({
type: 'success',
message: res.msg,
onClose: () => {
this.initData()
}
});
})
}).catch(() => {
})
},
confirmprice(){
if (!this.multipleSelection.length) {
this.$message({
type: 'error',
message: '请选择一条数据',
duration: 1500,
})
return
}
let id = this.multipleSelection.join()
let param = {};
param = this.list.find(function(param) {
debugger
return param.id == id;
})
request({
url: `/api/payment/Payment/confirmprice`,
method: 'POST',
data: param
}).then(res => {
this.$message({
type: 'success',
message: res.msg,
onClose: () => {
this.initData()
}
});
})
}, },
addOrUpdateHandle(id, isDetail) { {
this.formVisible = true prop: 'paymenttype',
this.$nextTick(() => { label: '付款类型'
this.$refs.JNPFForm.init(id, isDetail) },
}) {
}, prop: 'settlementtype',
exportData() { label: '结算类型'
this.exportBoxVisible = true },
this.$nextTick(() => { {
this.$refs.ExportBox.init(this.columnList) prop: 'status',
}) label: '单据状态'
}, },
download(data) { ],
let query = {...data, ...this.listQuery, ...this.query,menuId:this.menuId} paymenttypeOptions: [{
request({ "fullName": "贷款",
url: `/api/payment/Payment/Actions/Export`, "id": "0"
method: 'GET', }, {
data: query "fullName": "运费",
}).then(res => { "id": "1"
if (!res.data.url) return }, {
this.jnpf.downloadFile(res.data.url) "fullName": "仓储",
this.$refs.ExportBox.visible = false "id": "2"
this.exportBoxVisible = false }],
}) paymenttypeProps: {
}, "label": "fullName",
search() { "value": "id"
this.listQuery = { },
currentPage: 1, currencyOptions: [{
pageSize: 20, "fullName": "人民币",
sort: "desc", "id": "0"
sidx: "businessdate", }, {
} "fullName": "美元",
"id": "1"
}, {
"fullName": "英镑",
"id": "2"
}],
currencyProps: {
"label": "fullName",
"value": "id"
},
settlementtypeOptions: [{
"fullName": "现金",
"id": "0"
}, {
"fullName": "赊购",
"id": "1"
}, {
"fullName": "网银",
"id": "2"
}, {
"fullName": "银企直连",
"id": "3"
}, {
"fullName": "银票",
"id": "4"
}, {
"fullName": "商票",
"id": "5"
}],
settlementtypeProps: {
"label": "fullName",
"value": "id"
},
statusOptions: [{
"fullName": "已保存",
"id": "0"
}, {
"fullName": "审批中",
"id": "1"
}, {
"fullName": "已审批",
"id": "2"
}, {
"fullName": "已付款",
"id": "3"
}],
statusProps: {
"label": "fullName",
"value": "id"
},
}
},
computed: {
menuId() {
return this.$route.meta.modelId || ''
}
},
created() {
this.initData()
},
methods: {
goDetail(id) {
this.detailVisible = true
this.$nextTick(() => {
this.$refs.Detail.init(id)
})
},
sortChange({
column,
prop,
order
}) {
this.listQuery.sort = order == 'ascending' ? 'asc' : 'desc'
this.listQuery.sidx = !order ? '' : prop
this.initData()
},
initData() {
this.listLoading = true;
let _query = {
...this.listQuery,
...this.query,
menuId: this.menuId
};
request({
url: `/api/payment/Payment/getList`,
method: 'post',
data: _query
}).then(res => {
var _list = [];
for (let i = 0; i < res.data.list.length; i++) {
let _data = res.data.list[i];
_list.push(_data)
}
this.list = _list
this.total = res.data.pagination.total
this.listLoading = false
})
},
handleDel(id) {
this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
type: 'warning'
}).then(() => {
request({
url: `/api/payment/Payment/${id}`,
method: 'DELETE'
}).then(res => {
this.$message({
type: 'success',
message: res.msg,
onClose: () => {
this.initData()
}
});
})
}).catch(() => {});
},
handleSelectionChange(val) {
const res = val.map(item => item.id)
this.multipleSelection = res
},
handleBatchRemoveDel() {
if (!this.multipleSelection.length) {
this.$message({
type: 'error',
message: '请选择一条数据',
duration: 1500,
})
return
}
const ids = this.multipleSelection.join()
this.$confirm('您确定要删除这些数据吗, 是否继续?', '提示', {
type: 'warning'
}).then(() => {
request({
url: `/api/payment/Payment/batchRemove/${ids}`,
method: 'DELETE'
}).then(res => {
this.$message({
type: 'success',
message: res.msg,
onClose: () => {
this.initData() this.initData()
}, }
refresh(isrRefresh) { });
this.formVisible = false })
if (isrRefresh) this.reset() }).catch(() => {})
}, },
reset() { confirmprice() {
for (let key in this.query) { if (!this.multipleSelection.length) {
this.query[key] = undefined this.$message({
} type: 'error',
this.search() message: '请选择一条数据',
duration: 1500,
})
return
}
let id = this.multipleSelection.join()
let param = {};
param = this.list.find(function(param) {
debugger
return param.id == id;
})
request({
url: `/api/payment/Payment/confirmprice`,
method: 'POST',
data: param
}).then(res => {
this.$message({
type: 'success',
message: res.msg,
onClose: () => {
this.initData()
} }
});
})
},
addOrUpdateHandle(id, isDetail) {
this.formVisible = true
this.$nextTick(() => {
this.$refs.JNPFForm.init(id, isDetail)
})
},
exportData() {
this.exportBoxVisible = true
this.$nextTick(() => {
this.$refs.ExportBox.init(this.columnList)
})
},
download(data) {
let query = {
...data,
...this.listQuery,
...this.query,
menuId: this.menuId
}
request({
url: `/api/payment/Payment/Actions/Export`,
method: 'GET',
data: query
}).then(res => {
if (!res.data.url) return
this.jnpf.downloadFile(res.data.url)
this.$refs.ExportBox.visible = false
this.exportBoxVisible = false
})
},
search() {
this.listQuery = {
currentPage: 1,
pageSize: 20,
sort: "desc",
sidx: "businessdate",
}
this.initData()
},
refresh(isrRefresh) {
this.formVisible = false
if (isrRefresh) this.reset()
},
reset() {
for (let key in this.query) {
this.query[key] = undefined
} }
this.search()
}
} }
}
</script> </script>

@ -1,433 +1,580 @@
<template> <template>
<el-dialog :title="!dataForm.id ? '新建' : isDetail ? '详情':'编辑'" <el-dialog :title="!dataForm.id ? '新建' : isDetail ? '详情':'编辑'" :close-on-click-modal="false" append-to-body
:close-on-click-modal="false" append-to-body :visible.sync="visible" class="JNPF-dialog JNPF-dialog_center" lock-scroll width="1500px">
:visible.sync="visible" class="JNPF-dialog JNPF-dialog_center" lock-scroll <el-row :gutter="15" class="">
width="1000px"> <el-form ref="elForm" :model="dataForm" :rules="rules" size="small" label-width="100px" label-position="right">
<el-row :gutter="15" class=""> <template v-if="!loading">
<el-form ref="elForm" :model="dataForm" :rules="rules" size="small" label-width="100px" label-position="right" > <el-col :span="8">
<template v-if="!loading"> <el-form-item label="单据编号" prop="documentno">
<el-col :span="8" > <el-input v-model="dataForm.documentno" placeholder="系统自动生成" readonly>
<el-form-item label="单据编号"
prop="documentno" >
<el-input v-model="dataForm.documentno"
placeholder="系统自动生成" readonly >
</el-input> </el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8" > <el-col :span="8">
<el-form-item label="业务类型" <el-form-item label="业务类型" required prop="type">
prop="type" > <el-select v-model="dataForm.type" placeholder="请选择业务类型" clearable :style='{"width":"100%"}'>
<el-select v-model="dataForm.type" <el-option v-for="(item, index) in typeOptions" :key="index" :label="item.fullName" :value="item.id"
placeholder="请选择业务类型" clearable :style='{"width":"100%"}'> :disabled="item.disabled"></el-option>
<el-option v-for="(item, index) in typeOptions" :key="index" :label="item.fullName" :value="item.id" :disabled="item.disabled" ></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8" > <el-col :span="8">
<el-form-item label="来源单号" <el-form-item label="来源单号" required prop="souceno">
prop="souceno" > <popupSelect v-model="dataForm.souceno" placeholder="请选择" clearable field="souceno"
<popupSelect v-model="dataForm.souceno" interfaceId="392931756640102277" :columnOptions="soucenocolumnOptions" propsValue="document_no"
placeholder="请选择" clearable field="souceno" interfaceId="392931756640102277" :columnOptions="soucenocolumnOptions" propsValue="document_no" relationField="document_no" popupType="dialog" relationField="document_no" popupType="dialog" popupTitle="选择数据" popupWidth="800px"
popupTitle="选择数据" popupWidth="800px" @change="popupSelect" @change="popupSelect">
>
</popupSelect> </popupSelect>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8" > <el-col :span="8">
<el-form-item label="入库金额" <el-form-item label="入库金额" prop="receiptamount">
prop="receiptamount" > <el-input v-model="dataForm.receiptamount" placeholder="请输入入库金额" readonly>
<el-input v-model="dataForm.receiptamount"
placeholder="请输入入库金额" readonly>
</el-input> </el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8" > <el-col :span="8">
<el-form-item label="币别" <el-form-item label="币别" prop="currency">
prop="currency" > <el-select v-model="dataForm.currency" placeholder="请选择币别" readonly>
<el-select v-model="dataForm.currency" <el-option v-for="(item, index) in currencyOptions" :key="index" :label="item.fullName" :value="item.id"
placeholder="请选择币别" readonly> :disabled="item.disabled"></el-option>
<el-option v-for="(item, index) in currencyOptions" :key="index" :label="item.fullName" :value="item.id" :disabled="item.disabled" ></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8" > <el-col :span="8">
<el-form-item label="入库数量" <el-form-item label="入库数量" prop="receiptnum">
prop="receiptnum" > <el-input v-model="dataForm.receiptnum" placeholder="请输入入库数量" readonly>
<el-input v-model="dataForm.receiptnum"
placeholder="请输入入库数量" readonly>
</el-input> </el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8" > <el-col :span="8">
<el-form-item label="供应商名称" <el-form-item label="供应商名称" prop="suppliername">
prop="suppliername" > <el-input v-model="dataForm.suppliername" placeholder="请输入供应商名称" readonly>
<el-input v-model="dataForm.suppliername"
placeholder="请输入供应商名称" readonly>
</el-input> </el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="16" > <el-col :span="16">
<el-form-item label="备注" <el-form-item label="备注" prop="remark">
prop="remark" > <el-input v-model="dataForm.remark" placeholder="请输入供应商名称" clearable :style='{"width":"100%"}'>
<el-input v-model="dataForm.remark"
placeholder="请输入供应商名称" clearable :style='{"width":"100%"}'>
</el-input> </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="入库日期"-->
<!-- prop="warehousingdate" >--> <!-- prop="warehousingdate" >-->
<!-- <el-date-picker v-model="dataForm.warehousingdate"--> <!-- <el-date-picker v-model="dataForm.warehousingdate"-->
<!-- placeholder="请选择入库日期" clearable :style='{"width":"100%"}' type="datetime" format="yyyy-MM-dd HH:mm:ss" value-format="timestamp" >--> <!-- placeholder="请选择入库日期" clearable :style='{"width":"100%"}' type="datetime" format="yyyy-MM-dd HH:mm:ss" value-format="timestamp" >-->
<!-- </el-date-picker>--> <!-- </el-date-picker>-->
<!-- </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="单据状态"-->
<!-- prop="status" >--> <!-- prop="status" >-->
<!-- <el-select v-model="dataForm.status"--> <!-- <el-select v-model="dataForm.status"-->
<!-- placeholder="请选择单据状态" clearable :style='{"width":"100%"}'>--> <!-- placeholder="请选择单据状态" clearable :style='{"width":"100%"}'>-->
<!-- <el-option v-for="(item, index) in statusOptions" :key="index" :label="item.fullName" :value="item.id" :disabled="item.disabled" ></el-option>--> <!-- <el-option v-for="(item, index) in statusOptions" :key="index" :label="item.fullName" :value="item.id" :disabled="item.disabled" ></el-option>-->
<!-- </el-select>--> <!-- </el-select>-->
<!-- </el-form-item>--> <!-- </el-form-item>-->
<!-- </el-col>--> <!-- </el-col>-->
<el-col :span="24"> <el-col :span="24">
<el-tabs v-model="activevpzhms" tab-position="top" class="mb-20"> <el-tabs v-model="activevpzhms" tab-position="top" class="mb-20">
<el-tab-pane label="磅单明细"> <el-tab-pane label="磅单明细">
<el-col :span="24" > <el-col :span="24">
<el-form-item label-width="0"> <el-form-item label-width="0">
<div class="JNPF-common-title"> <div class="JNPF-common-title">
<h2></h2> <h2></h2>
</div> </div>
<el-table :data="dataForm.receiptin_item0List" size='mini' > <el-table :data="dataForm.receiptin_item0List" size='mini' show-summary :summary-method="getSummaries">
<el-table-column type="index" width="50" label="序号" align="center" /> <el-table-column type="index" width="50" label="序号" align="center" />
<el-table-column prop="licenseno" label="车牌号"> <el-table-column prop="licenseno" width="140" label="车牌号" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<popupSelect v-model="scope.row.licenseno" <popupSelect v-model="scope.row.licenseno" placeholder="请选择" clearable
placeholder="请选择" clearable :field="'licenseno'+scope.$index" :bissId="dataForm.souceno" interfaceId="392933121244325765" :columnOptions="receiptin_item0licensenocolumnOptions" propsValue="license_num" relationField="license_num" popupType="dialog" :field="'licenseno'+scope.$index"
popupWidth="800px" @change="popupSelect2" interfaceId="392933121244325765" :columnOptions="receiptin_item0licensenocolumnOptions"
> propsValue="license_num" relationField="license_num" popupType="dialog" popupWidth="1000px" popupTitle="选择车牌"
</popupSelect> :bissId="dataForm.souceno" :excludeFields="excludeFields"
</template> @change="popupSelect2">
</el-table-column> </popupSelect>
<el-table-column prop="materialname" label="物料名称"> </template>
<template slot-scope="scope"> </el-table-column>
<el-input v-model="scope.row.materialname" <el-table-column prop="materialname" width="140" label="物料名称" align="center">
placeholder="请输入" :disabled="true"> <template slot-scope="scope">
</el-input> <el-input v-model="scope.row.materialname" placeholder="请输入" :disabled="true">
</template> </el-input>
</el-table-column> </template>
<el-table-column prop="reservoirareaId" label="库区名称"> </el-table-column>
<template slot-scope="scope"> <el-table-column prop="reservoirareaId" width="140" label="库区名称" align="center">
<popupSelect v-model="scope.row.reservoirareaId" <template slot-scope="scope">
placeholder="请选择" clearable :field="'reservoirareaId'+scope.$index" interfaceId="392939299932268421" :columnOptions="receiptin_item0reservoirareaIdcolumnOptions" propsValue="id" relationField="areaname" popupType="dialog" <popupSelect v-model="scope.row.reservoirareaId" placeholder="请选择" clearable
popupWidth="800px" @change="popupSelect3" :field="'reservoirareaId'+scope.$index" interfaceId="392939299932268421"
> :columnOptions="receiptin_item0reservoirareaIdcolumnOptions" propsValue="id"
</popupSelect> relationField="areaname" popupType="dialog" popupWidth="800px" @change="popupSelect3">
</template> </popupSelect>
</el-table-column> </template>
<el-table-column prop="warehouseId" label="仓库名称"> </el-table-column>
<template slot-scope="scope"> <el-table-column prop="warehouseId" width="140" label="仓库名称" align="center">
<el-input v-model="scope.row.warehouseId" <template slot-scope="scope">
placeholder="请输入" clearable :style='{"width":"200%"}'> <el-input v-model="scope.row.warehouseId" placeholder="请输入" clearable :disabled="true" >
</el-input> </el-input>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="num" label="入库重量"> <el-table-column prop="num" width="140" label="入库数量" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-model="scope.row.num" <el-input v-model="scope.row.num" placeholder="请输入" clearable @input="inputChange()" :disabled="true">
placeholder="请输入" clearable :style='{"width":"200%"}'> </el-input>
</el-input> </template>
</template> </el-table-column>
</el-table-column> <el-table-column prop="unit" width="140" label="计量单位" align="center">
<el-table-column prop="unit" label="计量单位"> <template slot-scope="scope">
<template slot-scope="scope"> <el-select v-model="scope.row.unit" placeholder="请选择" clearable :disabled="true">
<el-select v-model="scope.row.unit" <el-option v-for="(item, index) in unitOptions" :key="index" :label="item.fullName"
placeholder="请选择" clearable :style='{"width":"200%"}'> :value="item.id" :disabled="item.disabled"></el-option>
<el-option v-for="(item, index) in unitOptions" :key="index" :label="item.fullName" :value="item.id" :disabled="item.disabled" ></el-option> </el-select>
</el-select> </template>
</template> </el-table-column>
</el-table-column> <el-table-column prop="price" width="140" label="单价" align="center">
<el-table-column prop="price" label="单价"> <template slot-scope="scope">
<template slot-scope="scope"> <el-input v-model="scope.row.price" placeholder="请输入" clearable :disabled="true">
<el-input v-model="scope.row.price" </el-input>
placeholder="请输入" clearable :style='{"width":"200%"}'> </template>
</el-input> </el-table-column>
</template> <el-table-column prop="rate" width="140" label="税率" align="center">
</el-table-column> <template slot-scope="scope">
<el-table-column prop="rate" label="税率"> <el-select v-model="scope.row.rate" placeholder="请选择" clearable :disabled="true">
<template slot-scope="scope"> <el-option v-for="(item, index) in rateOptions" :key="index" :label="item.fullName"
<el-select v-model="scope.row.rate" :value="item.id" :disabled="item.disabled"></el-option>
placeholder="请选择" clearable :style='{"width":"200%"}'> </el-select>
<el-option v-for="(item, index) in rateOptions" :key="index" :label="item.fullName" :value="item.id" :disabled="item.disabled" ></el-option> </template>
</el-select> </el-table-column>
</template> <el-table-column prop="amount" width="140" label="金额" align="center">
</el-table-column> <template slot-scope="scope">
<el-table-column prop="amount" label="金额"> <el-input v-model="scope.row.amount" placeholder="请输入" clearable @input="inputChange()" :disabled="true">
<template slot-scope="scope"> </el-input>
<el-input v-model="scope.row.amount" </template>
placeholder="请输入" clearable :style='{"width":"200%"}'> </el-table-column>
</el-input> <el-table-column prop="rateamount" width="140" label="税额" align="center">
</template> <template slot-scope="scope">
</el-table-column> <el-input v-model="scope.row.rateamount" placeholder="请输入" clearable :disabled="true">
<el-table-column prop="rateamount" label="税额"> </el-input>
<template slot-scope="scope"> </template>
<el-input v-model="scope.row.rateamount" </el-table-column>
placeholder="请输入" clearable :style='{"width":"200%"}'> <el-table-column prop="batchno" width="140" label="批次号" align="center">
</el-input> <template slot-scope="scope">
</template> <el-input v-model="scope.row.batchno" placeholder="请输入" clearable :disabled="true">
</el-table-column> </el-input>
<el-table-column prop="batchno" label="批次号"> </template>
<template slot-scope="scope"> </el-table-column>
<el-input v-model="scope.row.batchno" <el-table-column prop="poundType" width="140" label="磅单类型" align="center">
placeholder="请输入" clearable :style='{"width":"200%"}'> <template slot-scope="scope">
</el-input> <el-select v-model="scope.row.poundType" placeholder="请选择" clearable :disabled="true">
</template> <el-option v-for="(item, index) in poundTypeOptions" :key="index" :label="item.fullName"
</el-table-column> :value="item.id" :disabled="item.disabled"></el-option>
<el-table-column prop="poundType" label="磅单类型"> </el-select>
<template slot-scope="scope"> </template>
<el-select v-model="scope.row.poundType" </el-table-column>
placeholder="请选择" clearable :style='{"width":"200%"}'> <el-table-column label="操作" width="50" align="center">
<el-option v-for="(item, index) in poundTypeOptions" :key="index" :label="item.fullName" :value="item.id" :disabled="item.disabled" ></el-option> <template slot-scope="scope">
</el-select> <el-button size="mini" type="text" class="JNPF-table-delBtn"
</template> @click="delreceiptin_item0List(scope.$index)">删除</el-button>
</el-table-column> </template>
<el-table-column label="操作" width="50" > </el-table-column>
<template slot-scope="scope"> </el-table>
<el-button size="mini" type="text" class="JNPF-table-delBtn" @click="delreceiptin_item0List(scope.$index)"></el-button> <div class="table-actions" @click="addreceiptin_item0List()">
</template> <el-button type="text" icon="el-icon-plus">添加</el-button>
</el-table-column> </div>
</el-table> </el-form-item>
<div class="table-actions" @click="addreceiptin_item0List()">
<el-button type="text" icon="el-icon-plus">添加</el-button>
</div>
</el-form-item>
</el-col>
</el-tab-pane >
</el-tabs>
</el-col> </el-col>
</template> </el-tab-pane>
</el-form> </el-tabs>
</el-col>
</template>
</el-form>
</el-row> </el-row>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button @click="visible = false"> </el-button> <el-button @click="visible = false"> </el-button>
<el-button type="primary" @click="dataFormSubmit()" v-if="!isDetail"> </el-button> <el-button type="primary" @click="dataFormSubmit()" v-if="!isDetail"> </el-button>
</span> </span>
</el-dialog> </el-dialog>
</template> </template>
<script> <script>
import request from '@/utils/request' import request from '@/utils/request'
import { getDataInterfaceRes } from '@/api/systemData/dataInterface' import {
import { getDictionaryDataSelector } from '@/api/systemData/dictionary' getDataInterfaceRes
export default { } from '@/api/systemData/dataInterface'
components: {}, import {
props: [], getDictionaryDataSelector
data() { } from '@/api/systemData/dictionary'
return { export default {
visible: false, components: {},
loading: false, props: [],
isDetail: false, data() {
dataForm: { return {
documentno : '', excludeFields: [],
type : "", visible: false,
souceno : "", loading: false,
receiptamount : '', isDetail: false,
currency : "0", dataForm: {
receiptnum : '', documentno: '',
suppliername : '', type: "",
remark : '', souceno: "",
warehousingdate : '', receiptamount: 0,
status : "0", currency: "0",
creatorTime : "", receiptnum: 0,
creatorUserName : "", suppliername: '',
receiptin_item0List:[], remark: '',
}, warehousingdate: '',
activevpzhms:'0', status: "0",
rules: creatorTime: "",
{ creatorUserName: "",
receiptamount: [ receiptin_item0List: [],
], },
receiptnum: [ activevpzhms: '0',
], rules: {},
}, typeOptions: [{
typeOptions:[{"fullName":"采购入库","id":"0"},{"fullName":"购销入库","id":"1"}], "fullName": "采购入库",
soucenocolumnOptions:[ {"label":"采购订单","value":"document_no"}, {"label":"供应商名称","value":"supplier_name"}, {"label":"币别","value":"currency"},], "id": "0"
currencyOptions:[{"fullName":"人民币","id":"0"},{"fullName":"美元","id":"1"},{"fullName":"英镑","id":"2"}], }, {
statusOptions:[{"fullName":"已保存","id":"0"},{"fullName":"审批中","id":"1"},{"fullName":"已审批","id":"2"}], "fullName": "购销入库",
"id": "1"
}],
soucenocolumnOptions: [{
"label": "采购订单",
"value": "document_no"
}, {
"label": "供应商名称",
"value": "supplier_name"
}, {
"label": "币别",
"value": "currencyLabel"
}, ],
currencyOptions: [{
"fullName": "人民币",
"id": "0"
}, {
"fullName": "美元",
"id": "1"
}, {
"fullName": "英镑",
"id": "2"
}],
statusOptions: [{
"fullName": "已保存",
"id": "0"
}, {
"fullName": "审批中",
"id": "1"
}, {
"fullName": "已审批",
"id": "2"
}],
receiptin_item0licensenocolumnOptions:[ {"label":"车牌号","value":"license_num"}, {"label":"物料名称","value":"material_name"}, {"label":"库区名称","value":"in_area"}, {"label":"仓库名称","value":"name"}, {"label":"入库数量","value":"settlement"}, {"label":"计量单位","value":"unit"}, {"label":"单价","value":"price"}, {"label":"税率","value":"rate"}, {"label":"金额","value":"amount"}, {"label":"批次号","value":"poundlist_id"}, {"label":"磅单类型","value":"pount_type"},], receiptin_item0licensenocolumnOptions: [{
receiptin_item0reservoirareaIdcolumnOptions:[ {"label":"库区编码","value":"areacode"}, {"label":"库区名称","value":"areaname"}, {"label":"最高库存","value":"maximum"}, {"label":"安全库存","value":"safety"}, {"label":"最低库存","value":"minimum"}, {"label":"计量单位","value":"unit"}, {"label":"仓库名称","value":"name"},], "label": "车牌号",
unitOptions:[{"fullName":"吨","id":"0"},{"fullName":"千克","id":"1"}], "value": "license_num"
rateOptions:[{"fullName":"13","id":"0"},{"fullName":"9","id":"1"},{"fullName":"6","id":"2"},{"fullName":"5","id":"3"},{"fullName":"3","id":"4"},{"fullName":"0","id":"5"}], }, {
poundTypeOptions:[{"fullName":"吨","id":"0"},{"fullName":"千克","id":"1"}], "label": "物料名称",
"value": "material_name"
}, {
"label": "库区名称",
"value": "in_area"
}, {
"label": "仓库名称",
"value": "name"
}, {
"label": "入库数量",
"value": "settlement"
}, {
"label": "计量单位",
"value": "unit"
}, {
"label": "单价",
"value": "price"
}, {
"label": "税率",
"value": "rate"
}, {
"label": "金额",
"value": "amount"
}, {
"label": "批次号",
"value": "poundlist_id"
}, {
"label": "磅单类型",
"value": "pount_type"
}, ],
receiptin_item0reservoirareaIdcolumnOptions: [{
"label": "库区编码",
"value": "areacode"
}, {
"label": "库区名称",
"value": "areaname"
}, {
"label": "最高库存",
"value": "maximum"
}, {
"label": "安全库存",
"value": "safety"
}, {
"label": "最低库存",
"value": "minimum"
}, {
"label": "计量单位",
"value": "unit"
}, {
"label": "仓库名称",
"value": "name"
}, ],
unitOptions: [{
"fullName": "吨",
"id": "0"
}, {
"fullName": "千克",
"id": "1"
}],
rateOptions: [{
"fullName": "13",
"id": "0"
}, {
"fullName": "9",
"id": "1"
}, {
"fullName": "6",
"id": "2"
}, {
"fullName": "5",
"id": "3"
}, {
"fullName": "3",
"id": "4"
}, {
"fullName": "0",
"id": "5"
}],
poundTypeOptions: [{
"fullName": "吨",
"id": "0"
}, {
"fullName": "千克",
"id": "1"
}],
}
},
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 === 5 || index === 9 || index === 10)) {
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;
},
inputChange(value){
var num = 0;
var amount = 0;
for (let i = 0; i < this.dataForm.receiptin_item0List.length; i++) {
num = num + parseFloat(this.dataForm.receiptin_item0List[i].num);
amount = amount + parseFloat(this.dataForm.receiptin_item0List[i].amount);
} }
}, this.dataForm.receiptamount = amount;
computed: {}, this.dataForm.receiptnum = num;
watch: { },
}, popupSelect(e, d) {
created() { this.dataForm.currency = d.currency;
}, this.dataForm.suppliername = d.supplier_name;
mounted() {}, this.excludeFields = [];
methods: { this.dataForm.receiptin_item0List = [];
popupSelect(e,d){ },
this.dataForm.currency = d.currency; popupSelect2(a, b) {
this.dataForm.suppliername = d.supplier_name; var excludeFields = [];
}, var num = 0;
popupSelect2(a, b){ var amount = 0;
for (let i = 0; i < this.dataForm.receiptin_item0List.length; i++) { for (let i = 0; i < this.dataForm.receiptin_item0List.length; i++) {
if(a == this.dataForm.receiptin_item0List[i].licenseno){ excludeFields.push(this.dataForm.receiptin_item0List[i].licenseno);
this.dataForm.receiptin_item0List[i].materialname = b.material_name; if (a == this.dataForm.receiptin_item0List[i].licenseno) {
this.dataForm.receiptin_item0List[i].reservoirareaId = b.in_area; this.dataForm.receiptin_item0List[i].licenseno = b.license_num;
this.dataForm.receiptin_item0List[i].warehouseId = b.name; this.dataForm.receiptin_item0List[i].materialname = b.material_name;
this.dataForm.receiptin_item0List[i].num = b.settlement; this.dataForm.receiptin_item0List[i].reservoirareaId = b.in_area;
this.dataForm.receiptin_item0List[i].unit = b.unit; this.dataForm.receiptin_item0List[i].warehouseId = b.name;
this.dataForm.receiptin_item0List[i].price = b.price; this.dataForm.receiptin_item0List[i].num = b.settlement;
this.dataForm.receiptin_item0List[i].rate = b.rate; this.dataForm.receiptin_item0List[i].unit = b.unit;
this.dataForm.receiptin_item0List[i].amount = b.amount; this.dataForm.receiptin_item0List[i].price = b.price;
this.dataForm.receiptin_item0List[i].batchno = b.poundlist_id; this.dataForm.receiptin_item0List[i].rate = b.rate;
this.dataForm.receiptin_item0List[i].poundType = b.pound_type; this.dataForm.receiptin_item0List[i].amount = b.amount;
this.dataForm.receiptin_item0List[i].rateamount = b.amount*b.rate; this.dataForm.receiptin_item0List[i].batchno = b.poundlist_id;
this.dataForm.receiptamount = parseFloat(this.dataForm.receiptamount) + parseFloat(b.amount); this.dataForm.receiptin_item0List[i].poundType = b.pound_type;
this.dataForm.receiptnum = parseFloat(this.dataForm.receiptnum) + parseFloat(b.settlement); this.rateOptions.forEach((column, index) => {
if(column.id == b.rate){
this.dataForm.receiptin_item0List[i].rateamount = b.amount * column.fullName;
} }
} });
}, }
popupSelect3(j,k){ num = num + parseFloat(this.dataForm.receiptin_item0List[i].num);
for (let i = 0; i < this.dataForm.receiptin_item0List.length; i++) { amount = amount + parseFloat(this.dataForm.receiptin_item0List[i].amount);
if (j == this.dataForm.receiptin_item0List[i].reservoirareaId){ }
this.dataForm.receiptin_item0List[i].warehouseId = k.name; this.dataForm.receiptamount = amount;
this.dataForm.receiptnum = num;
this.excludeFields = excludeFields;
},
popupSelect3(j, k) {
for (let i = 0; i < this.dataForm.receiptin_item0List.length; i++) {
if (j == this.dataForm.receiptin_item0List[i].reservoirareaId) {
this.dataForm.receiptin_item0List[i].warehouseId = k.name;
}
}
},
receiptin_item0Exist() {
let isOk = true;
for (let i = 0; i < this.dataForm.receiptin_item0List.length; i++) {
const e = this.dataForm.receiptin_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 if (data[key] instanceof Number) {
data[key] = 0;
} 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/receiptin/Receiptin/' + this.dataForm.id,
method: 'get'
}).then(res => {
this.dataInfo(res.data)
this.loading = false
});
} else {
this.clearData(this.dataForm)
this.dataForm.receiptamount = 0.0;
this.dataForm.receiptnum = 0.0;
}
});
this.$store.commit('generator/UPDATE_RELATION_DATA', {})
},
//
dataFormSubmit() {
this.$refs['elForm'].validate((valid) => {
if (valid) {
if (!this.receiptin_item0Exist()) return
this.request()
}
})
},
request() {
var _data = this.dataList()
if (!this.dataForm.id) {
request({
url: '/api/receiptin/Receiptin',
method: 'post',
data: _data
}).then((res) => {
this.$message({
message: res.msg,
type: 'success',
duration: 1000,
onClose: () => {
this.visible = false
this.$emit('refresh', true)
} }
} })
}, })
receiptin_item0Exist() { } else {
let isOk = true; request({
for(let i=0;i<this.dataForm.receiptin_item0List.length;i++){ url: '/api/receiptin/Receiptin/' + this.dataForm.id,
const e = this.dataForm.receiptin_item0List[i]; method: 'PUT',
} data: _data
return isOk; }).then((res) => {
}, this.$message({
clearData(data){ message: res.msg,
for (let key in data) { type: 'success',
if (data[key] instanceof Array) { duration: 1000,
data[key] = []; onClose: () => {
} else if (data[key] instanceof Object) { this.visible = false
this.clearData(data[key]); this.$emit('refresh', true)
} else { }
data[key] = ""; })
} })
} }
}, },
init(id, isDetail) { addreceiptin_item0List() {
this.dataForm.id = id || 0; let item = {
this.visible = true; licenseno: undefined,
this.isDetail = isDetail || false; materialname: undefined,
this.$nextTick(() => { reservoirareaId: undefined,
this.$refs['elForm'].resetFields(); warehouseId: undefined,
if(this.dataForm.id){ num: undefined,
this.loading = true unit: undefined,
request({ price: undefined,
url: '/api/receiptin/Receiptin/'+this.dataForm.id, rate: undefined,
method: 'get' amount: undefined,
}).then(res => { rateamount: undefined,
this.dataInfo(res.data) batchno: undefined,
this.loading = false poundType: undefined,
}); }
}else{ this.dataForm.receiptin_item0List.push(item)
this.clearData(this.dataForm) },
} delreceiptin_item0List(index) {
}); this.dataForm.receiptin_item0List.splice(index, 1);
this.$store.commit('generator/UPDATE_RELATION_DATA', {}) },
}, dataList() {
// var _data = JSON.parse(JSON.stringify(this.dataForm));
dataFormSubmit() { for (let i = 0; i < _data.receiptin_item0List.length; i++) {
this.$refs['elForm'].validate((valid) => { var _list = _data.receiptin_item0List[i];
if (valid) { }
if (!this.receiptin_item0Exist()) return return _data;
this.request() },
} dataInfo(dataAll) {
}) let _dataAll = dataAll
}, for (let i = 0; i < _dataAll.receiptin_item0List.length; i++) {
request() { var _list = _dataAll.receiptin_item0List[i];
var _data =this.dataList() }
if (!this.dataForm.id) { this.dataForm = _dataAll
request({ },
url: '/api/receiptin/Receiptin', },
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/receiptin/Receiptin/'+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)
}
})
})
}
},
addreceiptin_item0List(){
let item = {
licenseno:undefined,
materialname:undefined,
reservoirareaId:undefined,
warehouseId:undefined,
num:undefined,
unit:undefined,
price:undefined,
rate:undefined,
amount:undefined,
rateamount:undefined,
batchno:undefined,
poundType:undefined,
}
this.dataForm.receiptin_item0List.push(item)
},
delreceiptin_item0List(index) {
this.dataForm.receiptin_item0List.splice(index, 1);
},
dataList(){
var _data = JSON.parse(JSON.stringify(this.dataForm));
for(let i=0;i<_data.receiptin_item0List.length;i++){
var _list = _data.receiptin_item0List[i];
}
return _data;
},
dataInfo(dataAll){
let _dataAll =dataAll
for(let i=0;i<_dataAll.receiptin_item0List.length;i++){
var _list = _dataAll.receiptin_item0List[i];
}
this.dataForm = _dataAll
},
},
}
</script> </script>

@ -1,303 +1,380 @@
<template> <template>
<div class="JNPF-common-layout"> <div class="JNPF-common-layout">
<div class="JNPF-common-layout-center"> <div class="JNPF-common-layout-center">
<el-row class="JNPF-common-search-box" :gutter="16"> <el-row class="JNPF-common-search-box" :gutter="16">
<el-form @submit.native.prevent> <el-form @submit.native.prevent>
<el-col :span="6"> <el-col :span="6">
<el-form-item label="单据编号"> <el-form-item label="单据编号">
<el-input v-model="query.documentno" placeholder="请输入" clearable> </el-input> <el-input v-model="query.documentno" placeholder="请输入" clearable> </el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item label="单据状态"> <el-form-item label="单据状态">
<el-select v-model="query.status" placeholder="请选择单据状态" <el-select v-model="query.status" placeholder="请选择单据状态" clearable>
clearable> <el-option v-for="(item, index) in statusOptions" :key="index" :label="item.fullName" :value="item.id"
<el-option v-for="(item, index) in statusOptions" :key="index" :disabled="item.disabled"></el-option>
:label="item.fullName" :value="item.id" </el-select>
:disabled="item.disabled"></el-option> </el-form-item>
</el-select> </el-col>
</el-form-item> <el-col :span="6">
</el-col> <el-form-item>
<el-col :span="6"> <el-button type="primary" icon="el-icon-search" @click="search()"></el-button>
<el-form-item> <el-button icon="el-icon-refresh-right" @click="reset()"></el-button>
<el-button type="primary" icon="el-icon-search" @click="search()"></el-button> </el-form-item>
<el-button icon="el-icon-refresh-right" @click="reset()"></el-button> </el-col>
</el-form-item> </el-form>
</el-col> </el-row>
</el-form> <div class="JNPF-common-layout-main JNPF-flex-main">
</el-row> <div class="JNPF-common-head">
<div class="JNPF-common-layout-main JNPF-flex-main"> <div>
<div class="JNPF-common-head"> <el-button type="text" icon="el-icon-plus" @click="addOrUpdateHandle()">
<div> </el-button>
<el-button type="primary" icon="el-icon-plus" @click="addOrUpdateHandle()"> <el-button type="text" icon="el-icon-download" @click="exportData()">
</el-button> </el-button>
<el-button type="text" icon="el-icon-download" @click="exportData()" >导出 <el-button type="text" icon="el-icon-delete" @click="handleBatchRemoveDel()">
</el-button> </el-button>
<el-button type="text" icon="el-icon-delete" @click="handleBatchRemoveDel()" >批量删除 <el-button type="text" icon="el-icon-check" @click="exportData()">
</el-button> </el-button>
</div> <el-button type="text" icon="el-icon-close" @click="exportData()">
<div class="JNPF-common-head-right"> </el-button>
<el-tooltip effect="dark" content="刷新" placement="top"> </div>
<el-link icon="icon-ym icon-ym-Refresh JNPF-common-head-icon" :underline="false" <div class="JNPF-common-head-right">
@click="reset()"/> <el-tooltip effect="dark" content="刷新" placement="top">
</el-tooltip> <el-link icon="icon-ym icon-ym-Refresh JNPF-common-head-icon" :underline="false" @click="reset()" />
<screenfull isContainer/> </el-tooltip>
</div> <screenfull isContainer />
</div> </div>
<JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange' has-c @selection-change="handleSelectionChange">
<el-table-column prop="documentno" label="单据编号" width="0" align="left"
/>
<el-table-column prop="suppliername" label="供应商名称" width="0" align="left"
/>
<el-table-column prop="receiptamount" label="入库金额" width="0" align="left"
/>
<el-table-column prop="receiptnum" label="入库数量" width="0" align="left"
/>
<el-table-column label="币别" width="0" prop="currency" algin="left"
>
<template slot-scope="scope">
{{ scope.row.currency | dynamicText(currencyOptions) }}
</template>
</el-table-column>
<el-table-column prop="warehousingdate" label="入库日期" width="0" align="left"
/>
<el-table-column prop="souceno" label="来源单号" width="0" align="left"
/>
<el-table-column label="业务类型" width="0" prop="type" algin="left"
>
<template slot-scope="scope">
{{ scope.row.type | dynamicText(typeOptions) }}
</template>
</el-table-column>
<el-table-column prop="remark" label="备注" width="0" align="left"
/>
<el-table-column label="单据状态" width="0" prop="status" algin="left"
>
<template slot-scope="scope">
{{ scope.row.status | dynamicText(statusOptions) }}
</template>
</el-table-column>
<el-table-column prop="creatorTime" label="创建日期" width="0" align="left"
/>
<el-table-column prop="creatorUserName" label="创建人" width="0" align="left"
/>
<el-table-column label="操作" fixed="right"
width="150" >
<template slot-scope="scope">
<el-button type="text"
@click="addOrUpdateHandle(scope.row.id)" >编辑
</el-button>
<el-button type="text" class="JNPF-table-delBtn" @click="handleDel(scope.row.id)">
</el-button>
<el-button type="text"
@click="goDetail(scope.row.id)">详情
</el-button>
</template>
</el-table-column>
</JNPF-table>
<pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize" @pagination="initData"/>
</div>
</div> </div>
<JNPF-Form v-if="formVisible" ref="JNPFForm" @refresh="refresh"/> <JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange' has-c :hasNO="false"
<ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download"/> @selection-change="handleSelectionChange" border>
<Detail v-if="detailVisible" ref="Detail" @refresh="detailVisible=false"/> <el-table-column type="index" width="50" label="序号" fixed="left" align="center" />
<el-table-column prop="documentno" label="单据编号" sortable width="200" align="center" fixed="left" />
<el-table-column prop="suppliername" label="供应商名称" sortable width="150" align="center" fixed="left" />
<el-table-column prop="receiptamount" label="入库金额" sortable width="120" align="center" />
<el-table-column prop="receiptnum" label="入库数量" sortable width="120" align="center" />
<el-table-column prop="currency" label="币别" sortable width="80" align="center">
<template slot-scope="scope">
{{ scope.row.currency | dynamicText(currencyOptions) }}
</template>
</el-table-column>
<el-table-column prop="warehousingdate" sortable label="入库日期" width="120" align="center" />
<el-table-column prop="souceno" sortable label="来源单号" width="200" align="center" />
<el-table-column prop="type" sortable label="业务类型" width="120" align="center">
<template slot-scope="scope">
{{ scope.row.type | dynamicText(typeOptions) }}
</template>
</el-table-column>
<el-table-column prop="remark" sortable label="备注" width="120" align="center" />
<el-table-column prop="status" sortable label="单据状态" width="120" align="center">
<template slot-scope="scope">
{{ scope.row.status | dynamicText(statusOptions) }}
</template>
</el-table-column>
<el-table-column prop="creatorTime" sortable label="创建日期" width="120" align="center" />
<el-table-column prop="creatorUserName" sortable label="创建人" width="120" align="center" />
<el-table-column label="操作" fixed="right" width="150" align="center">
<template slot-scope="scope">
<el-button type="text" @click="addOrUpdateHandle(scope.row.id)">
</el-button>
<el-button type="text" class="JNPF-table-delBtn" @click="handleDel(scope.row.id)">
</el-button>
<el-button type="text" @click="goDetail(scope.row.id)">
</el-button>
</template>
</el-table-column>
</JNPF-table>
<pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize"
@pagination="initData" />
</div>
</div> </div>
<JNPF-Form v-if="formVisible" ref="JNPFForm" @refresh="refresh" />
<ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download" />
<Detail v-if="detailVisible" ref="Detail" @refresh="detailVisible=false" />
</div>
</template> </template>
<script> <script>
import request from '@/utils/request' import request from '@/utils/request'
import {getDictionaryDataSelector} from '@/api/systemData/dictionary' import {
import JNPFForm from './Form' getDictionaryDataSelector
import ExportBox from './ExportBox' } from '@/api/systemData/dictionary'
import {getDataInterfaceRes} from '@/api/systemData/dataInterface' import JNPFForm from './Form'
import Detail from './Detail' import ExportBox from './ExportBox'
import {
getDataInterfaceRes
} from '@/api/systemData/dataInterface'
import Detail from './Detail'
export default { export default {
components: {JNPFForm, ExportBox,Detail}, components: {
data() { JNPFForm,
return { ExportBox,
detailVisible: false, Detail
query: { },
documentno:undefined, data() {
status:undefined, return {
}, detailVisible: false,
treeProps: { query: {
children: 'children', documentno: undefined,
label: 'fullName', status: undefined,
value: 'id'
},
list: [],
listLoading: true,
multipleSelection: [], total: 0,
listQuery: {
currentPage: 1,
pageSize: 20,
sort: "desc",
sidx: "creatorTime",
},
formVisible: false,
exportBoxVisible: false,
columnList: [
{prop: 'documentno', label: '单据编号'},
{prop: 'suppliername', label: '供应商名称'},
{prop: 'receiptamount', label: '入库金额'},
{prop: 'receiptnum', label: '入库数量'},
{prop: 'currency', label: '币别'},
{prop: 'warehousingdate', label: '入库日期'},
{prop: 'souceno', label: '来源单号'},
{prop: 'type', label: '业务类型'},
{prop: 'remark', label: '备注'},
{prop: 'status', label: '单据状态'},
{prop: 'creatorTime', label: '创建日期'},
{prop: 'creatorUserName', label: '创建人'},
],
typeOptions:[{"fullName":"采购入库","id":"0"},{"fullName":"购销入库","id":"1"}],
typeProps:{"label":"fullName","value":"id"},
currencyOptions:[{"fullName":"人民币","id":"0"},{"fullName":"美元","id":"1"},{"fullName":"英镑","id":"2"}],
currencyProps:{"label":"fullName","value":"id"},
statusOptions:[{"fullName":"已保存","id":"0"},{"fullName":"审批中","id":"1"},{"fullName":"已审批","id":"2"}],
statusProps:{"label":"fullName","value":"id"},
}
}, },
computed: { treeProps: {
menuId() { children: 'children',
return this.$route.meta.modelId || '' label: 'fullName',
} value: 'id'
}, },
created() { list: [],
this.initData() listLoading: true,
multipleSelection: [],
total: 0,
listQuery: {
currentPage: 1,
pageSize: 20,
sort: "desc",
sidx: "creatorTime",
}, },
methods: { formVisible: false,
goDetail(id){ exportBoxVisible: false,
this.detailVisible = true columnList: [{
this.$nextTick(() => { prop: 'documentno',
this.$refs.Detail.init(id) label: '单据编号'
}) },
}, {
sortChange({column, prop, order}) { prop: 'suppliername',
this.listQuery.sort = order == 'ascending' ? 'asc' : 'desc' label: '供应商名称'
this.listQuery.sidx = !order ? '' : prop },
this.initData() {
}, prop: 'receiptamount',
initData() { label: '入库金额'
this.listLoading = true; },
let _query = { {
...this.listQuery, prop: 'receiptnum',
...this.query, label: '入库数量'
menuId:this.menuId },
}; {
request({ prop: 'currency',
url: `/api/receiptin/Receiptin/getList`, label: '币别'
method: 'post', },
data: _query {
}).then(res => { prop: 'warehousingdate',
var _list =[]; label: '入库日期'
for(let i=0;i<res.data.list.length;i++){ },
let _data = res.data.list[i]; {
_list.push(_data) prop: 'souceno',
} label: '来源单号'
this.list = _list },
this.total = res.data.pagination.total {
prop: 'type',
label: '业务类型'
},
{
prop: 'remark',
label: '备注'
},
{
prop: 'status',
label: '单据状态'
},
{
prop: 'creatorTime',
label: '创建日期'
},
{
prop: 'creatorUserName',
label: '创建人'
},
],
typeOptions: [{
"fullName": "采购入库",
"id": "0"
}, {
"fullName": "购销入库",
"id": "1"
}],
typeProps: {
"label": "fullName",
"value": "id"
},
currencyOptions: [{
"fullName": "人民币",
"id": "0"
}, {
"fullName": "美元",
"id": "1"
}, {
"fullName": "英镑",
"id": "2"
}],
currencyProps: {
"label": "fullName",
"value": "id"
},
statusOptions: [{
"fullName": "已保存",
"id": "0"
}, {
"fullName": "审批中",
"id": "1"
}, {
"fullName": "已审批",
"id": "2"
}],
statusProps: {
"label": "fullName",
"value": "id"
},
}
},
computed: {
menuId() {
return this.$route.meta.modelId || ''
}
},
created() {
this.initData()
},
methods: {
goDetail(id) {
this.detailVisible = true
this.$nextTick(() => {
this.$refs.Detail.init(id)
})
},
sortChange({
column,
prop,
order
}) {
this.listQuery.sort = order == 'ascending' ? 'asc' : 'desc'
this.listQuery.sidx = !order ? '' : prop
this.initData()
},
initData() {
this.listLoading = true;
let _query = {
...this.listQuery,
...this.query,
menuId: this.menuId
};
request({
url: `/api/receiptin/Receiptin/getList`,
method: 'post',
data: _query
}).then(res => {
var _list = [];
for (let i = 0; i < res.data.list.length; i++) {
res.data.list[i].creatorTime = res.data.list[i].creatorTime ? res.data.list[i].creatorTime.substring(0,
10) : '';
res.data.list[i].warehousingdate = res.data.list[i].warehousingdate ? res.data.list[i].warehousingdate
.substring(0, 10) : '';
let _data = res.data.list[i];
_list.push(_data)
}
this.list = _list
this.total = res.data.pagination.total
this.listLoading = false this.listLoading = false
}) })
}, },
handleDel(id) { handleDel(id) {
this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', { this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
request({ request({
url: `/api/receiptin/Receiptin/${id}`, url: `/api/receiptin/Receiptin/${id}`,
method: 'DELETE' method: 'DELETE'
}).then(res => { }).then(res => {
this.$message({ this.$message({
type: 'success', type: 'success',
message: res.msg, message: res.msg,
onClose: () => { onClose: () => {
this.initData()
}
});
})
}).catch(() => {
});
},
handleSelectionChange(val) {
const res = val.map(item => item.id)
this.multipleSelection = res
},
handleBatchRemoveDel() {
if (!this.multipleSelection.length) {
this.$message({
type: 'error',
message: '请选择一条数据',
duration: 1500,
})
return
}
const ids = this.multipleSelection.join()
this.$confirm('您确定要删除这些数据吗, 是否继续?', '提示', {
type: 'warning'
}).then(() => {
request({
url: `/api/receiptin/Receiptin/batchRemove/${ids}`,
method: 'DELETE'
}).then(res => {
this.$message({
type: 'success',
message: res.msg,
onClose: () => {
this.initData()
}
});
})
}).catch(() => {
})
},
addOrUpdateHandle(id, isDetail) {
this.formVisible = true
this.$nextTick(() => {
this.$refs.JNPFForm.init(id, isDetail)
})
},
exportData() {
this.exportBoxVisible = true
this.$nextTick(() => {
this.$refs.ExportBox.init(this.columnList)
})
},
download(data) {
let query = {...data, ...this.listQuery, ...this.query,menuId:this.menuId}
request({
url: `/api/receiptin/Receiptin/Actions/Export`,
method: 'GET',
data: query
}).then(res => {
if (!res.data.url) return
this.jnpf.downloadFile(res.data.url)
this.$refs.ExportBox.visible = false
this.exportBoxVisible = false
})
},
search() {
this.listQuery = {
currentPage: 1,
pageSize: 20,
sort: "desc",
sidx: "creatorTime",
}
this.initData() this.initData()
}, }
refresh(isrRefresh) { });
this.formVisible = false })
if (isrRefresh) this.reset() }).catch(() => {});
}, },
reset() { handleSelectionChange(val) {
for (let key in this.query) { const res = val.map(item => item.id)
this.query[key] = undefined this.multipleSelection = res
} },
this.search() handleBatchRemoveDel() {
} if (!this.multipleSelection.length) {
this.$message({
type: 'error',
message: '请选择一条数据',
duration: 1500,
})
return
}
const ids = this.multipleSelection.join()
this.$confirm('您确定要删除这些数据吗, 是否继续?', '提示', {
type: 'warning'
}).then(() => {
request({
url: `/api/receiptin/Receiptin/batchRemove/${ids}`,
method: 'DELETE'
}).then(res => {
this.$message({
type: 'success',
message: res.msg,
onClose: () => {
this.initData()
}
});
})
}).catch(() => {})
},
addOrUpdateHandle(id, isDetail) {
this.formVisible = true
this.$nextTick(() => {
this.$refs.JNPFForm.init(id, isDetail)
})
},
exportData() {
this.exportBoxVisible = true
this.$nextTick(() => {
this.$refs.ExportBox.init(this.columnList)
})
},
download(data) {
let query = {
...data,
...this.listQuery,
...this.query,
menuId: this.menuId
}
request({
url: `/api/receiptin/Receiptin/Actions/Export`,
method: 'GET',
data: query
}).then(res => {
if (!res.data.url) return
this.jnpf.downloadFile(res.data.url)
this.$refs.ExportBox.visible = false
this.exportBoxVisible = false
})
},
search() {
this.listQuery = {
currentPage: 1,
pageSize: 20,
sort: "desc",
sidx: "creatorTime",
}
this.initData()
},
refresh(isrRefresh) {
this.formVisible = false
if (isrRefresh) this.reset()
},
reset() {
for (let key in this.query) {
this.query[key] = undefined
} }
this.search()
}
} }
}
</script> </script>

@ -1,446 +1,574 @@
<template> <template>
<el-dialog :title="!dataForm.id ? '新建' : isDetail ? '详情':'编辑'" <el-dialog :title="!dataForm.id ? '新建' : isDetail ? '详情':'编辑'" :close-on-click-modal="false" append-to-body
:close-on-click-modal="false" append-to-body :visible.sync="visible" class="JNPF-dialog JNPF-dialog_center" lock-scroll width="1500px">
:visible.sync="visible" class="JNPF-dialog JNPF-dialog_center" lock-scroll <el-row :gutter="15" class="">
width="1500px"> <el-form ref="elForm" :model="dataForm" :rules="rules" size="small" label-width="100px" label-position="right">
<el-row :gutter="15" class=""> <template v-if="!loading">
<el-form ref="elForm" :model="dataForm" :rules="rules" size="small" label-width="100px" label-position="right" > <el-col :span="8">
<template v-if="!loading"> <el-form-item label="单据编号" prop="documentNo">
<el-col :span="8" > <el-input v-model="dataForm.documentNo" placeholder="系统自动生成" readonly>
<el-form-item label="单据编号"
prop="documentNo" >
<el-input v-model="dataForm.documentNo"
placeholder="系统自动生成" readonly >
</el-input> </el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8" > <el-col :span="8">
<el-form-item label="业务类型" <el-form-item label="业务类型" prop="type">
prop="type" > <el-select v-model="dataForm.type" placeholder="请选择" clearable :style='{"width":"100%"}'>
<el-select v-model="dataForm.type" <el-option v-for="(item, index) in typeOptions" :key="index" :label="item.fullName" :value="item.id"
placeholder="请选择" clearable :style='{"width":"100%"}'> :disabled="item.disabled"></el-option>
<el-option v-for="(item, index) in typeOptions" :key="index" :label="item.fullName" :value="item.id" :disabled="item.disabled" ></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8" > <el-col :span="8">
<el-form-item label="来源单号" <el-form-item label="来源单号" prop="sourceNo">
prop="sourceNo" > <popupSelect v-model="dataForm.sourceNo" placeholder="请选择" clearable field="sourceNo"
<popupSelect v-model="dataForm.sourceNo" interfaceId="392956668264114117" :columnOptions="sourceNocolumnOptions" propsValue="document_no"
placeholder="请选择" clearable field="sourceNo" interfaceId="392956668264114117" :columnOptions="sourceNocolumnOptions" propsValue="document_no" relationField="document_no" popupType="dialog" relationField="document_no" popupType="dialog" popupTitle="选择数据" popupWidth="800px" hasPage
popupTitle="选择数据" popupWidth="800px" :pageSize="20" @change="popupSelectChangeSourceNo">
hasPage :pageSize="20" @change="popupSelectChangeSourceNo" >
</popupSelect> </popupSelect>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8" > <el-col :span="8">
<el-form-item label="出库金额" <el-form-item label="出库金额" prop="amount">
prop="amount" > <el-input v-model="dataForm.amount" placeholder="请输入出库金额" readonly clearable :style='{"width":"100%"}'>
<el-input v-model="dataForm.amount"
placeholder="请输入出库金额" readonly clearable :style='{"width":"100%"}'>
</el-input> </el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8" > <el-col :span="8">
<el-form-item label="币别" <el-form-item label="币别" prop="currency">
prop="currency" > <el-select v-model="dataForm.currency" placeholder="请选择" clearable :style='{"width":"100%"}'>
<el-select v-model="dataForm.currency" <el-option v-for="(item, index) in currencyOptions" :key="index" :label="item.fullName" :value="item.id"
placeholder="请选择" clearable :style='{"width":"100%"}'> :disabled="item.disabled"></el-option>
<el-option v-for="(item, index) in currencyOptions" :key="index" :label="item.fullName" :value="item.id" :disabled="item.disabled" ></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8" > <el-col :span="8">
<el-form-item label="出库数量" <el-form-item label="出库数量" prop="num">
prop="num" > <el-input v-model="dataForm.num" placeholder="请输入出库数量" readonly clearable :style='{"width":"100%"}'>
<el-input v-model="dataForm.num"
placeholder="请输入出库数量" readonly clearable :style='{"width":"100%"}'>
</el-input> </el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8" > <el-col :span="8">
<el-form-item label="客户名称" <el-form-item label="客户名称" prop="customerName">
prop="customerName" > <el-input v-model="dataForm.customerName" placeholder="请输入" clearable :style='{"width":"100%"}'>
<el-input v-model="dataForm.customerName"
placeholder="请输入" clearable :style='{"width":"100%"}'>
</el-input> </el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="16" > <el-col :span="16">
<el-form-item label="备注" <el-form-item label="备注" prop="remark">
prop="remark" > <el-input v-model="dataForm.remark" placeholder="请输入" clearable :style='{"width":"100%"}'>
<el-input v-model="dataForm.remark"
placeholder="请输入" clearable :style='{"width":"100%"}'>
</el-input> </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="出库日期" prop="issueDate">
prop="issueDate" > <el-date-picker v-model="dataForm.issueDate" placeholder="请选择出库日期" clearable :style='{"width":"100%"}'
<el-date-picker v-model="dataForm.issueDate" type="datetime" format="yyyy-MM-dd HH:mm:ss" value-format="timestamp">
placeholder="请选择出库日期" clearable :style='{"width":"100%"}' type="datetime" format="yyyy-MM-dd HH:mm:ss" value-format="timestamp" >
</el-date-picker> </el-date-picker>
</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="单据状态" prop="status">
prop="status" > <el-select v-model="dataForm.status" placeholder="请选择" clearable :style='{"width":"100%"}'>
<el-select v-model="dataForm.status" <el-option v-for="(item, index) in statusOptions" :key="index" :label="item.fullName" :value="item.id"
placeholder="请选择" clearable :style='{"width":"100%"}'> :disabled="item.disabled"></el-option>
<el-option v-for="(item, index) in statusOptions" :key="index" :label="item.fullName" :value="item.id" :disabled="item.disabled" ></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col> -->
<el-col :span="24"> <el-col :span="24">
<el-tabs v-model="activefqhgdj" tab-position="top" class="mb-20"> <el-tabs v-model="activefqhgdj" tab-position="top" class="mb-20">
<el-tab-pane label="磅单明细"> <el-tab-pane label="磅单明细">
<el-col :span="24" > <el-col :span="24">
<el-form-item label-width="0"> <el-form-item label-width="0">
<div class="JNPF-common-title"> <div class="JNPF-common-title">
<h2>设计子表</h2> <h2></h2>
</div> </div>
<el-table :data="dataForm.receiptout_item0List" size='mini' > <el-table :data="dataForm.receiptout_item0List" size='mini' show-summary :summary-method="getSummaries">
<el-table-column type="index" width="50" label="序号" align="center" /> <el-table-column type="index" width="50" label="序号" align="center" />
<el-table-column prop="licenseNo" label="车牌号"> <el-table-column prop="licenseNo" width="140" label="车牌号" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<popupSelect v-model="scope.row.licenseNo" <popupSelect v-model="scope.row.licenseNo" placeholder="请选择" clearable
placeholder="请选择" clearable :field="'licenseNo'+scope.$index" interfaceId="392933248017164229" :bissId="dataForm.sourceNo" :columnOptions="receiptout_item0licenseNocolumnOptions" propsValue="license_num" relationField="license_num" popupType="dialog" :field="'licenseNo'+scope.$index" interfaceId="392933248017164229"
popupWidth="800px" :bissId="dataForm.sourceNo" :excludeFields="excludeFields" :columnOptions="receiptout_item0licenseNocolumnOptions"
hasPage :pageSize="20" @change="popupSelectlicenseNo" > propsValue="license_num" relationField="license_num" popupType="dialog" popupWidth="800px"
</popupSelect> hasPage :pageSize="20" @change="popupSelectlicenseNo">
</template> </popupSelect>
</el-table-column> </template>
<el-table-column prop="materialName" label="物料名称"> </el-table-column>
<template slot-scope="scope"> <el-table-column prop="materialName" label="物料名称" width="140" align="center">
<el-input v-model="scope.row.materialName" <template slot-scope="scope">
placeholder="请输入" clearable :style='{"width":"100%"}'> <el-input v-model="scope.row.materialName" placeholder="请输入" clearable :disabled="true">
</el-input> </el-input>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="reservoirareaId" label="库区id"> <el-table-column prop="reservoirareaId" label="库区名称" width="140" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<popupSelect v-model="scope.row.reservoirareaId" <popupSelect v-model="scope.row.reservoirareaId" placeholder="请选择" clearable
placeholder="请选择" clearable :field="'reservoirareaId'+scope.$index" interfaceId="392939299932268421" :columnOptions="receiptout_item0reservoirareaIdcolumnOptions" propsValue="id" relationField="areaname" popupType="dialog" :field="'reservoirareaId'+scope.$index" interfaceId="392939299932268421"
popupWidth="800px" @change="popupSelectChangeReservoirarea" :columnOptions="receiptout_item0reservoirareaIdcolumnOptions" propsValue="id"
> relationField="areaname" popupType="dialog" popupWidth="800px"
</popupSelect> @change="popupSelectChangeReservoirarea">
</template> </popupSelect>
</el-table-column> </template>
<el-table-column prop="warehouseId" label="仓库id"> </el-table-column>
<template slot-scope="scope"> <el-table-column prop="warehouseId" label="仓库名称" width="140" align="center">
<el-input v-model="scope.row.warehouseId" <template slot-scope="scope">
placeholder="请输入" clearable :style='{"width":"100%"}'> <el-input v-model="scope.row.warehouseId" placeholder="请输入" clearable :disabled="true"
</el-input> :style='{"width":"100%"}'>
</template> </el-input>
</el-table-column> </template>
<el-table-column prop="deliveryNum" label="出库数量"> </el-table-column>
<template slot-scope="scope"> <el-table-column prop="deliveryNum" label="出库数量" width="140" align="center">
<el-input v-model="scope.row.deliveryNum" <template slot-scope="scope">
placeholder="请输入" clearable :style='{"width":"100%"}'> <el-input v-model="scope.row.deliveryNum" placeholder="请输入" clearable :disabled="true"
</el-input> :style='{"width":"100%"}'>
</template> </el-input>
</el-table-column> </template>
<el-table-column prop="unit" label="计量单位"> </el-table-column>
<template slot-scope="scope"> <el-table-column prop="unit" label="计量单位" width="140" align="center">
<el-select v-model="scope.row.unit" <template slot-scope="scope">
placeholder="请选择" clearable :style='{"width":"100%"}'> <el-select v-model="scope.row.unit" placeholder="请选择" clearable :style='{"width":"100%"}' :disabled="true">
<el-option v-for="(item, index) in unitOptions" :key="index" :label="item.fullName" :value="item.id" :disabled="item.disabled" ></el-option> <el-option v-for="(item, index) in unitOptions" :key="index" :label="item.fullName"
</el-select> :value="item.id" :disabled="item.disabled"></el-option>
</template> </el-select>
</el-table-column> </template>
<el-table-column prop="price" label="单价"> </el-table-column>
<template slot-scope="scope"> <el-table-column prop="price" label="单价" width="140" align="center">
<el-input v-model="scope.row.price" <template slot-scope="scope">
placeholder="请输入" clearable :style='{"width":"100%"}'> <el-input v-model="scope.row.price" placeholder="请输入" clearable :style='{"width":"100%"}' :disabled="true">
</el-input> </el-input>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="rate" label="税率"> <el-table-column prop="rate" label="税率(%)" width="140" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-select v-model="scope.row.rate" <el-select v-model="scope.row.rate" placeholder="请选择" clearable :style='{"width":"100%"}' :disabled="true">
placeholder="请选择" clearable :style='{"width":"100%"}'> <el-option v-for="(item, index) in rateOptions" :key="index" :label="item.fullName"
<el-option v-for="(item, index) in rateOptions" :key="index" :label="item.fullName" :value="item.id" :disabled="item.disabled" ></el-option> :value="item.id" :disabled="item.disabled"></el-option>
</el-select> </el-select>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="amount" label="金额"> <el-table-column prop="amount" label="金额" width="140" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-model="scope.row.amount" <el-input v-model="scope.row.amount" placeholder="请输入" clearable :style='{"width":"100%"}' :disabled="true">
placeholder="请输入" clearable :style='{"width":"100%"}'> </el-input>
</el-input> </template>
</template> </el-table-column>
</el-table-column> <el-table-column prop="rateAmount" label="税额" width="140" align="center">
<el-table-column prop="rateAmount" label="税额"> <template slot-scope="scope">
<template slot-scope="scope"> <el-input v-model="scope.row.rateAmount" placeholder="请输入" clearable :disabled="true"
<el-input v-model="scope.row.rateAmount" :style='{"width":"100%"}'>
placeholder="请输入" clearable :style='{"width":"100%"}'> </el-input>
</el-input> </template>
</template> </el-table-column>
</el-table-column> <el-table-column prop="batchNo" label="批次号" width="140" align="center">
<el-table-column prop="batchNo" label="批次号"> <template slot-scope="scope">
<template slot-scope="scope"> <el-input v-model="scope.row.batchNo" placeholder="请输入" clearable :style='{"width":"100%"}' :disabled="true" >
<el-input v-model="scope.row.batchNo" </el-input>
placeholder="请输入" clearable :style='{"width":"100%"}'> </template>
</el-input> </el-table-column>
</template> <el-table-column prop="deleteUserId" label="磅单类型" width="140" align="center">
</el-table-column> <template slot-scope="scope">
<el-table-column prop="deleteUserId" label="磅单类型"> <el-select v-model="scope.row.deleteUserId" placeholder="请选择" clearable :disabled="true"
<template slot-scope="scope"> :style='{"width":"100%"}'>
<el-select v-model="scope.row.deleteUserId" <el-option v-for="(item, index) in deleteUserIdOptions" :key="index" :label="item.fullName"
placeholder="请选择" clearable :style='{"width":"100%"}'> :value="item.id" :disabled="item.disabled"></el-option>
<el-option v-for="(item, index) in deleteUserIdOptions" :key="index" :label="item.fullName" :value="item.id" :disabled="item.disabled" ></el-option> </el-select>
</el-select> </template>
</template> </el-table-column>
</el-table-column> <el-table-column label="操作" width="50">
<el-table-column label="操作" width="50" > <template slot-scope="scope">
<template slot-scope="scope"> <el-button size="mini" type="text" class="JNPF-table-delBtn"
<el-button size="mini" type="text" class="JNPF-table-delBtn" @click="delreceiptout_item0List(scope.$index)"></el-button> @click="delreceiptout_item0List(scope.$index)">删除</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<div class="table-actions" @click="addreceiptout_item0List()"> <div class="table-actions" @click="addreceiptout_item0List()">
<el-button type="text" icon="el-icon-plus">添加</el-button> <el-button type="text" icon="el-icon-plus">添加</el-button>
</div> </div>
</el-form-item> </el-form-item>
</el-col>
</el-tab-pane >
</el-tabs>
</el-col> </el-col>
</template> </el-tab-pane>
</el-form> </el-tabs>
</el-col>
</template>
</el-form>
</el-row> </el-row>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button @click="visible = false"> </el-button> <el-button @click="visible = false"> </el-button>
<el-button type="primary" @click="dataFormSubmit()" v-if="!isDetail"> </el-button> <el-button type="primary" @click="dataFormSubmit()" v-if="!isDetail"> </el-button>
</span> </span>
</el-dialog> </el-dialog>
</template> </template>
<script> <script>
import request from '@/utils/request' import request from '@/utils/request'
import { getDataInterfaceRes } from '@/api/systemData/dataInterface' import {
import { getDictionaryDataSelector } from '@/api/systemData/dictionary' getDataInterfaceRes
export default { } from '@/api/systemData/dataInterface'
components: {}, import {
props: [], getDictionaryDataSelector
data() { } from '@/api/systemData/dictionary'
return { export default {
visible: false, components: {},
loading: false, props: [],
isDetail: false, data() {
dataForm: { return {
documentNo : '', excludeFields: [],
type : "0", visible: false,
sourceNo : "XS002", loading: false,
amount : '', isDetail: false,
currency : "0", dataForm: {
num : '', documentNo: '',
customerName : '', type: "0",
remark : '', sourceNo: "XS002",
issueDate : '', amount: '',
status : "0", currency: "0",
creatorTime : "", num: '',
creatorUserName : "", customerName: '',
lastModifyTime : "", remark: '',
lastModifyUserName : "", issueDate: '',
receiptout_item0List:[], status: "0",
}, creatorTime: "",
activefqhgdj:'0', creatorUserName: "",
rules: lastModifyTime: "",
{ lastModifyUserName: "",
type: [ receiptout_item0List: [],
{
required: true,
message: '请至少选择一个',
trigger: 'change'
},
],
sourceNo: [
{
required: true,
message: '请至少选择一个',
trigger: 'change'
},
],
},
typeOptions:[{"fullName":"销售出库","id":"0"},{"fullName":"购销出库","id":"1"}],
sourceNocolumnOptions:[ {"label":"单据编号","value":"document_no"}, {"label":"币别","value":"currency"}, {"label":"客户名称","value":"costomer_name"},],
currencyOptions:[{"fullName":"人民币","id":"0"},{"fullName":"美元","id":"1"},{"fullName":"英镑","id":"2"}],
statusOptions:[{"fullName":"已保存","id":"0"},{"fullName":"审批中","id":"1"},{"fullName":"已审批","id":"2"}],
receiptout_item0licenseNocolumnOptions:[ {"label":"车辆号","value":"license_no"}, {"label":"库区名称","value":"out_area"}, {"label":"物料名称","value":"material_name"}, {"label":"出库数量","value":"settlement"}, {"label":"计量单位","value":"unit"}, {"label":"含税单价","value":"unit_price"}, {"label":"税率","value":"rate"}, {"label":"金额","value":"price"}, {"label":"批次号","value":"poundlist_id"}, {"label":"磅单类型","value":"pound_type"},],
receiptout_item0reservoirareaIdcolumnOptions:[ {"label":"库区名称","value":"areaname"}, {"label":"最高库存","value":"maximum"}, {"label":"安全库存","value":"safety"}, {"label":"最低库存","value":"minimum"}, {"label":"仓库名称","value":"name"},],
unitOptions:[{"fullName":"吨","id":"0"},{"fullName":"千克","id":"1"}],
rateOptions:[{"fullName":"13","id":"0"},{"fullName":"9","id":"1"},{"fullName":"6","id":"2"},{"fullName":"5","id":"3"},{"fullName":"3","id":"4"},{"fullName":"0","id":"5"}],
deleteUserIdOptions:[{"fullName":"贸易","id":"0"},{"fullName":"其它","id":"1"}],
}
}, },
computed: {}, activefqhgdj: '0',
watch: {}, rules: {
created() { type: [{
required: true,
message: '请至少选择一个',
trigger: 'change'
}, ],
sourceNo: [{
required: true,
message: '请至少选择一个',
trigger: 'change'
}, ],
}, },
mounted() {}, typeOptions: [{
methods: { "fullName": "销售出库",
popupSelectChangeSourceNo(e,d){ "id": "0"
this.dataForm.customerName = d.costomer_name; }, {
this.dataForm.currency = d.currency; "fullName": "购销出库",
}, "id": "1"
popupSelectlicenseNo(a, b){ }],
for (let i = 0; i < this.dataForm.receiptout_item0List.length; i++) { sourceNocolumnOptions: [{
if(a == this.dataForm.receiptout_item0List[i].licenseNo){ "label": "单据编号",
this.dataForm.receiptout_item0List[i].materialName = b.material_name; "value": "document_no"
this.dataForm.receiptout_item0List[i].deliveryNum = b.settlement; }, {
this.dataForm.receiptout_item0List[i].unit = b.unit; "label": "币别",
this.dataForm.receiptout_item0List[i].price = b.unit_price; "value": "currencyLabel"
this.dataForm.receiptout_item0List[i].rate = b.rate; }, {
this.dataForm.receiptout_item0List[i].amount = b.price; "label": "客户名称",
this.dataForm.receiptout_item0List[i].batchNo = b.poundlist_id; "value": "costomer_name"
this.dataForm.receiptout_item0List[i].deleteUserId = b.pound_type; }, ],
this.dataForm.receiptout_item0List[i].rateAmount = b.price * b.rate; currencyOptions: [{
"fullName": "人民币",
"id": "0"
}, {
"fullName": "美元",
"id": "1"
}, {
"fullName": "英镑",
"id": "2"
}],
statusOptions: [{
"fullName": "已保存",
"id": "0"
}, {
"fullName": "审批中",
"id": "1"
}, {
"fullName": "已审批",
"id": "2"
}],
this.dataForm.receiptout_item0List[i].reservoirareaId = b.out_area; receiptout_item0licenseNocolumnOptions: [{
"label": "车辆号",
"value": "license_num"
}, {
"label": "库区名称",
"value": "out_area"
}, {
"label": "物料名称",
"value": "material_name"
}, {
"label": "出库数量",
"value": "settlement"
}, {
"label": "计量单位",
"value": "unit"
}, {
"label": "含税单价",
"value": "unit_price"
}, {
"label": "税率",
"value": "rate"
}, {
"label": "金额",
"value": "price"
}, {
"label": "批次号",
"value": "poundlist_id"
}, {
"label": "磅单类型",
"value": "pound_type"
}, ],
receiptout_item0reservoirareaIdcolumnOptions: [{
"label": "库区名称",
"value": "areaname"
}, {
"label": "最高库存",
"value": "maximum"
}, {
"label": "安全库存",
"value": "safety"
}, {
"label": "最低库存",
"value": "minimum"
}, {
"label": "仓库名称",
"value": "name"
}, ],
unitOptions: [{
"fullName": "吨",
"id": "0"
}, {
"fullName": "千克",
"id": "1"
}],
rateOptions: [{
"fullName": "13",
"id": "0"
}, {
"fullName": "9",
"id": "1"
}, {
"fullName": "6",
"id": "2"
}, {
"fullName": "5",
"id": "3"
}, {
"fullName": "3",
"id": "4"
}, {
"fullName": "0",
"id": "5"
}],
deleteUserIdOptions: [{
"fullName": "贸易",
"id": "0"
}, {
"fullName": "其它",
"id": "1"
}],
}
},
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 === 5 || index === 9 || index === 10)) {
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr);
if (!isNaN(value)) {
return prev + curr;
} else {
return prev;
} }
} }, 0);
}, } else {
sums[index] = '';
}
});
popupSelectChangeReservoirarea(a,b){ return sums;
for (let i = 0; i < this.dataForm.receiptout_item0List.length; i++) { },
if(a == this.dataForm.receiptout_item0List[i].reservoirareaId){ popupSelectChangeSourceNo(e, d) {
this.dataForm.receiptout_item0List[i].warehouseId = b.name; this.dataForm.customerName = d.costomer_name;
this.dataForm.currency = d.currency;
this.excludeFields = [];
this.dataForm.receiptout_item0List = [];
},
popupSelectlicenseNo(a, b) {
var excludeFields = [];
var num = 0;
var amount = 0;
for (let i = 0; i < this.dataForm.receiptout_item0List.length; i++) {
excludeFields.push(this.dataForm.receiptout_item0List[i].licenseNo);
if (a == this.dataForm.receiptout_item0List[i].licenseNo) {
this.dataForm.receiptout_item0List[i].materialName = b.material_name;
this.dataForm.receiptout_item0List[i].deliveryNum = b.settlement;
this.dataForm.receiptout_item0List[i].unit = b.unit;
this.dataForm.receiptout_item0List[i].price = b.unit_price;
this.dataForm.receiptout_item0List[i].rate = b.rate;
this.dataForm.receiptout_item0List[i].amount = b.price;
this.dataForm.receiptout_item0List[i].batchNo = b.poundlist_id;
this.dataForm.receiptout_item0List[i].deleteUserId = b.pound_type;
this.dataForm.receiptout_item0List[i].rateAmount = b.price * b.rate;
this.dataForm.receiptout_item0List[i].reservoirareaId = b.out_area;
}
num = num + parseFloat(this.dataForm.receiptout_item0List[i].deliveryNum);
amount = amount + parseFloat(this.dataForm.receiptout_item0List[i].amount);
}
this.dataForm.amount = amount;
this.dataForm.num = num;
this.excludeFields = excludeFields;
},
} popupSelectChangeReservoirarea(a, b) {
} for (let i = 0; i < this.dataForm.receiptout_item0List.length; i++) {
}, if (a == this.dataForm.receiptout_item0List[i].reservoirareaId) {
this.dataForm.receiptout_item0List[i].warehouseId = b.name;
}
}
},
receiptout_item0Exist() {
let isOk = true;
for(let i=0;i<this.dataForm.receiptout_item0List.length;i++){
const e = this.dataForm.receiptout_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/example/Receiptout/'+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.receiptout_item0Exist()) return
this.request()
}
})
},
request() {
var _data =this.dataList()
if (!this.dataForm.id) {
request({
url: '/api/example/Receiptout',
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/example/Receiptout/'+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)
}
})
})
}
},
addreceiptout_item0List(){
let item = {
licenseNo:undefined,
materialName:undefined,
reservoirareaId:undefined,
warehouseId:undefined,
deliveryNum:undefined,
unit:undefined,
price:undefined,
rate:undefined,
amount:undefined,
rateAmount:undefined,
batchNo:undefined,
deleteUserId:undefined,
}
this.dataForm.receiptout_item0List.push(item)
},
delreceiptout_item0List(index) {
this.dataForm.receiptout_item0List.splice(index, 1);
},
dataList(){
var _data = JSON.parse(JSON.stringify(this.dataForm));
for(let i=0;i<_data.receiptout_item0List.length;i++){
var _list = _data.receiptout_item0List[i];
}
return _data;
},
dataInfo(dataAll){
let _dataAll =dataAll
for(let i=0;i<_dataAll.receiptout_item0List.length;i++){
var _list = _dataAll.receiptout_item0List[i];
}
this.dataForm = _dataAll
},
},
}
receiptout_item0Exist() {
let isOk = true;
for (let i = 0; i < this.dataForm.receiptout_item0List.length; i++) {
const e = this.dataForm.receiptout_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 if (data[key] instanceof Number) {
data[key] = 0;
} 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/example/Receiptout/' + this.dataForm.id,
method: 'get'
}).then(res => {
this.dataInfo(res.data)
this.loading = false
});
} else {
this.clearData(this.dataForm)
this.dataForm.amount = 0.0;
this.dataForm.num = 0.0;
}
});
this.$store.commit('generator/UPDATE_RELATION_DATA', {})
},
//
dataFormSubmit() {
this.$refs['elForm'].validate((valid) => {
if (valid) {
if (!this.receiptout_item0Exist()) return
this.request()
}
})
},
request() {
var _data = this.dataList()
if (!this.dataForm.id) {
request({
url: '/api/example/Receiptout',
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/example/Receiptout/' + 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)
}
})
})
}
},
addreceiptout_item0List() {
let item = {
licenseNo: undefined,
materialName: undefined,
reservoirareaId: undefined,
warehouseId: undefined,
deliveryNum: undefined,
unit: undefined,
price: undefined,
rate: undefined,
amount: undefined,
rateAmount: undefined,
batchNo: undefined,
deleteUserId: undefined,
}
this.dataForm.receiptout_item0List.push(item)
},
delreceiptout_item0List(index) {
this.dataForm.receiptout_item0List.splice(index, 1);
},
dataList() {
var _data = JSON.parse(JSON.stringify(this.dataForm));
for (let i = 0; i < _data.receiptout_item0List.length; i++) {
var _list = _data.receiptout_item0List[i];
}
return _data;
},
dataInfo(dataAll) {
let _dataAll = dataAll
for (let i = 0; i < _dataAll.receiptout_item0List.length; i++) {
var _list = _dataAll.receiptout_item0List[i];
}
this.dataForm = _dataAll
},
},
}
</script> </script>

@ -1,309 +1,386 @@
<template> <template>
<div class="JNPF-common-layout"> <div class="JNPF-common-layout">
<div class="JNPF-common-layout-center"> <div class="JNPF-common-layout-center">
<el-row class="JNPF-common-search-box" :gutter="16"> <el-row class="JNPF-common-search-box" :gutter="16">
<el-form @submit.native.prevent> <el-form @submit.native.prevent>
<el-col :span="6"> <el-col :span="6">
<el-form-item label="单据编号"> <el-form-item label="单据编号">
<el-input v-model="query.documentNo" placeholder="请输入" clearable> </el-input> <el-input v-model="query.documentNo" placeholder="请输入" clearable> </el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item label="业务类型"> <el-form-item label="业务类型">
<el-select v-model="query.type" placeholder="请选择" <el-select v-model="query.type" placeholder="请选择" clearable>
clearable> <el-option v-for="(item, index) in typeOptions" :key="index" :label="item.fullName" :value="item.id"
<el-option v-for="(item, index) in typeOptions" :key="index" :disabled="item.disabled"></el-option>
:label="item.fullName" :value="item.id" </el-select>
:disabled="item.disabled"></el-option> </el-form-item>
</el-select> </el-col>
</el-form-item> <el-col :span="6">
</el-col> <el-form-item label="客户名称">
<el-col :span="6"> <el-input v-model="query.customerName" placeholder="请输入" clearable> </el-input>
<el-form-item label="客户名称"> </el-form-item>
<el-input v-model="query.customerName" placeholder="请输入" clearable> </el-input> </el-col>
</el-form-item> <el-col :span="6">
</el-col> <el-form-item>
<el-col :span="6"> <el-button type="primary" icon="el-icon-search" @click="search()"></el-button>
<el-form-item> <el-button icon="el-icon-refresh-right" @click="reset()"></el-button>
<el-button type="primary" icon="el-icon-search" @click="search()"></el-button> </el-form-item>
<el-button icon="el-icon-refresh-right" @click="reset()"></el-button> </el-col>
</el-form-item> </el-form>
</el-col> </el-row>
</el-form> <div class="JNPF-common-layout-main JNPF-flex-main">
</el-row> <div class="JNPF-common-head">
<div class="JNPF-common-layout-main JNPF-flex-main"> <div>
<div class="JNPF-common-head"> <el-button type="text" icon="el-icon-plus" @click="addOrUpdateHandle()">
<div> </el-button>
<el-button type="primary" icon="el-icon-plus" @click="addOrUpdateHandle()"> <el-button type="text" icon="el-icon-download" @click="exportData()">
</el-button> </el-button>
<el-button type="text" icon="el-icon-download" @click="exportData()" >导出 <el-button type="text" icon="el-icon-delete" @click="handleBatchRemoveDel()">
</el-button> </el-button>
<el-button type="text" icon="el-icon-delete" @click="handleBatchRemoveDel()" >批量删除 <el-button type="text" icon="el-icon-check" @click="exportData()">
</el-button> </el-button>
</div> <el-button type="text" icon="el-icon-close" @click="exportData()">
<div class="JNPF-common-head-right"> </el-button>
<el-tooltip effect="dark" content="刷新" placement="top"> </div>
<el-link icon="icon-ym icon-ym-Refresh JNPF-common-head-icon" :underline="false" <div class="JNPF-common-head-right">
@click="reset()"/> <el-tooltip effect="dark" content="刷新" placement="top">
</el-tooltip> <el-link icon="icon-ym icon-ym-Refresh JNPF-common-head-icon" :underline="false" @click="reset()" />
<screenfull isContainer/> </el-tooltip>
</div> <screenfull isContainer />
</div> </div>
<JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange' has-c @selection-change="handleSelectionChange">
<el-table-column prop="documentNo" label="单据编号" width="0" align="left"
/>
<el-table-column prop="customerName" label="客户名称" width="0" align="left"
/>
<el-table-column prop="amount" label="出库金额" width="0" align="left"
/>
<el-table-column prop="num" label="出库数量" width="0" align="left"
/>
<el-table-column label="币别" width="0" prop="currency" algin="left"
>
<template slot-scope="scope">
{{ scope.row.currency | dynamicText(currencyOptions) }}
</template>
</el-table-column>
<el-table-column prop="issueDate" label="出库日期" width="0" align="left"
sortable="custom" />
<el-table-column prop="sourceNo" label="来源单号" width="0" align="left"
/>
<el-table-column label="业务类型" width="0" prop="type" algin="left"
>
<template slot-scope="scope">
{{ scope.row.type | dynamicText(typeOptions) }}
</template>
</el-table-column>
<el-table-column prop="remark" label="备注" width="0" align="left"
/>
<el-table-column label="单据状态" width="0" prop="status" algin="left"
>
<template slot-scope="scope">
{{ scope.row.status | dynamicText(statusOptions) }}
</template>
</el-table-column>
<el-table-column prop="creatorTime" label="创建时间" width="0" align="left"
/>
<el-table-column prop="creatorUserName" label="创建人名称" width="0" align="left"
/>
<el-table-column label="操作" fixed="right"
width="150" >
<template slot-scope="scope">
<el-button type="text"
@click="addOrUpdateHandle(scope.row.id)" >编辑
</el-button>
<el-button type="text" class="JNPF-table-delBtn" @click="handleDel(scope.row.id)">
</el-button>
<el-button type="text"
@click="goDetail(scope.row.id)">详情
</el-button>
</template>
</el-table-column>
</JNPF-table>
<pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize" @pagination="initData"/>
</div>
</div> </div>
<JNPF-Form v-if="formVisible" ref="JNPFForm" @refresh="refresh"/> <JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange' has-c :hasNO="false"
<ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download"/> @selection-change="handleSelectionChange" border>
<Detail v-if="detailVisible" ref="Detail" @refresh="detailVisible=false"/> <el-table-column type="index" width="50" label="序号" fixed="left" align="center" />
<el-table-column prop="documentNo" label="单据编号" width="200" sortable align="center" fixed="left" />
<el-table-column prop="customerName" label="客户名称" width="150" sortable align="center" fixed="left" />
<el-table-column prop="amount" label="出库金额" width="120" sortable align="center" />
<el-table-column prop="num" label="出库数量" width="120" sortable align="center" />
<el-table-column label="币别" width="80" sortable prop="currency" align="center" >
<template slot-scope="scope">
{{ scope.row.currency | dynamicText(currencyOptions) }}
</template>
</el-table-column>
<el-table-column prop="issueDate" label="出库日期" width="120" sortable align="center" sortable="custom" />
<el-table-column prop="sourceNo" label="来源单号" width="200" sortable align="center" />
<el-table-column label="业务类型" width="120" sortable prop="type" align="center" >
<template slot-scope="scope">
{{ scope.row.type | dynamicText(typeOptions) }}
</template>
</el-table-column>
<el-table-column prop="remark" label="备注" width="120" sortable align="center" />
<el-table-column label="单据状态" width="120" sortable prop="status" align="center" >
<template slot-scope="scope">
{{ scope.row.status | dynamicText(statusOptions) }}
</template>
</el-table-column>
<el-table-column prop="creatorTime" label="创建时间" width="120" sortable align="center" />
<el-table-column prop="creatorUserName" label="创建人名称" width="120" sortable align="center" />
<el-table-column label="操作" fixed="right" width="150">
<template slot-scope="scope">
<el-button type="text" @click="addOrUpdateHandle(scope.row.id)">
</el-button>
<el-button type="text" class="JNPF-table-delBtn" @click="handleDel(scope.row.id)">
</el-button>
<el-button type="text" @click="goDetail(scope.row.id)">
</el-button>
</template>
</el-table-column>
</JNPF-table>
<pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize"
@pagination="initData" />
</div>
</div> </div>
<JNPF-Form v-if="formVisible" ref="JNPFForm" @refresh="refresh" />
<ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download" />
<Detail v-if="detailVisible" ref="Detail" @refresh="detailVisible=false" />
</div>
</template> </template>
<script> <script>
import request from '@/utils/request' import request from '@/utils/request'
import {getDictionaryDataSelector} from '@/api/systemData/dictionary' import {
import JNPFForm from './Form' getDictionaryDataSelector
import ExportBox from './ExportBox' } from '@/api/systemData/dictionary'
import {getDataInterfaceRes} from '@/api/systemData/dataInterface' import JNPFForm from './Form'
import Detail from './Detail' import ExportBox from './ExportBox'
import {
getDataInterfaceRes
} from '@/api/systemData/dataInterface'
import Detail from './Detail'
export default { export default {
components: {JNPFForm, ExportBox,Detail}, components: {
data() { JNPFForm,
return { ExportBox,
detailVisible: false, Detail
query: { },
documentNo:undefined, data() {
type:undefined, return {
customerName:undefined, detailVisible: false,
}, query: {
treeProps: { documentNo: undefined,
children: 'children', type: undefined,
label: 'fullName', customerName: undefined,
value: 'id'
},
list: [],
listLoading: true,
multipleSelection: [], total: 0,
listQuery: {
currentPage: 1,
pageSize: 20,
sort: "desc",
sidx: "",
},
formVisible: false,
exportBoxVisible: false,
columnList: [
{prop: 'documentNo', label: '单据编号'},
{prop: 'customerName', label: '客户名称'},
{prop: 'amount', label: '出库金额'},
{prop: 'num', label: '出库数量'},
{prop: 'currency', label: '币别'},
{prop: 'issueDate', label: '出库日期'},
{prop: 'sourceNo', label: '来源单号'},
{prop: 'type', label: '业务类型'},
{prop: 'remark', label: '备注'},
{prop: 'status', label: '单据状态'},
{prop: 'creatorTime', label: '创建时间'},
{prop: 'creatorUserName', label: '创建人名称'},
],
typeOptions:[{"fullName":"销售出库","id":"0"},{"fullName":"购销出库","id":"1"}],
typeProps:{"label":"fullName","value":"id"},
currencyOptions:[{"fullName":"人民币","id":"0"},{"fullName":"美元","id":"1"},{"fullName":"英镑","id":"2"}],
currencyProps:{"label":"fullName","value":"id"},
statusOptions:[{"fullName":"已保存","id":"0"},{"fullName":"审批中","id":"1"},{"fullName":"已审批","id":"2"}],
statusProps:{"label":"fullName","value":"id"},
}
}, },
computed: { treeProps: {
menuId() { children: 'children',
return this.$route.meta.modelId || '' label: 'fullName',
} value: 'id'
}, },
created() { list: [],
this.initData() listLoading: true,
multipleSelection: [],
total: 0,
listQuery: {
currentPage: 1,
pageSize: 20,
sort: "desc",
sidx: "",
}, },
methods: { formVisible: false,
goDetail(id){ exportBoxVisible: false,
this.detailVisible = true columnList: [{
this.$nextTick(() => { prop: 'documentNo',
this.$refs.Detail.init(id) label: '单据编号'
}) },
}, {
sortChange({column, prop, order}) { prop: 'customerName',
this.listQuery.sort = order == 'ascending' ? 'asc' : 'desc' label: '客户名称'
this.listQuery.sidx = !order ? '' : prop },
this.initData() {
}, prop: 'amount',
initData() { label: '出库金额'
this.listLoading = true; },
let _query = { {
...this.listQuery, prop: 'num',
...this.query, label: '出库数量'
menuId:this.menuId },
}; {
request({ prop: 'currency',
url: `/api/example/Receiptout/getList`, label: '币别'
method: 'post', },
data: _query {
}).then(res => { prop: 'issueDate',
var _list =[]; label: '出库日期'
for(let i=0;i<res.data.list.length;i++){ },
let _data = res.data.list[i]; {
_list.push(_data) prop: 'sourceNo',
} label: '来源单号'
this.list = _list },
this.total = res.data.pagination.total {
prop: 'type',
label: '业务类型'
},
{
prop: 'remark',
label: '备注'
},
{
prop: 'status',
label: '单据状态'
},
{
prop: 'creatorTime',
label: '创建时间'
},
{
prop: 'creatorUserName',
label: '创建人名称'
},
],
typeOptions: [{
"fullName": "销售出库",
"id": "0"
}, {
"fullName": "购销出库",
"id": "1"
}],
typeProps: {
"label": "fullName",
"value": "id"
},
currencyOptions: [{
"fullName": "人民币",
"id": "0"
}, {
"fullName": "美元",
"id": "1"
}, {
"fullName": "英镑",
"id": "2"
}],
currencyProps: {
"label": "fullName",
"value": "id"
},
statusOptions: [{
"fullName": "已保存",
"id": "0"
}, {
"fullName": "审批中",
"id": "1"
}, {
"fullName": "已审批",
"id": "2"
}],
statusProps: {
"label": "fullName",
"value": "id"
},
}
},
computed: {
menuId() {
return this.$route.meta.modelId || ''
}
},
created() {
this.initData()
},
methods: {
goDetail(id) {
this.detailVisible = true
this.$nextTick(() => {
this.$refs.Detail.init(id)
})
},
sortChange({
column,
prop,
order
}) {
this.listQuery.sort = order == 'ascending' ? 'asc' : 'desc'
this.listQuery.sidx = !order ? '' : prop
this.initData()
},
initData() {
this.listLoading = true;
let _query = {
...this.listQuery,
...this.query,
menuId: this.menuId
};
request({
url: `/api/example/Receiptout/getList`,
method: 'post',
data: _query
}).then(res => {
var _list = [];
for (let i = 0; i < res.data.list.length; i++) {
res.data.list[i].creatorTime = res.data.list[i].creatorTime ? res.data.list[i].creatorTime.substring(0,
10) : '';
res.data.list[i].issueDate = res.data.list[i].issueDate ? res.data.list[i].issueDate
.substring(0, 10) : '';
let _data = res.data.list[i];
_list.push(_data)
}
this.list = _list
this.total = res.data.pagination.total
this.listLoading = false this.listLoading = false
}) })
}, },
handleDel(id) { handleDel(id) {
this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', { this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
request({ request({
url: `/api/example/Receiptout/${id}`, url: `/api/example/Receiptout/${id}`,
method: 'DELETE' method: 'DELETE'
}).then(res => { }).then(res => {
this.$message({ this.$message({
type: 'success', type: 'success',
message: res.msg, message: res.msg,
onClose: () => { onClose: () => {
this.initData()
}
});
})
}).catch(() => {
});
},
handleSelectionChange(val) {
const res = val.map(item => item.id)
this.multipleSelection = res
},
handleBatchRemoveDel() {
if (!this.multipleSelection.length) {
this.$message({
type: 'error',
message: '请选择一条数据',
duration: 1500,
})
return
}
const ids = this.multipleSelection.join()
this.$confirm('您确定要删除这些数据吗, 是否继续?', '提示', {
type: 'warning'
}).then(() => {
request({
url: `/api/example/Receiptout/batchRemove/${ids}`,
method: 'DELETE'
}).then(res => {
this.$message({
type: 'success',
message: res.msg,
onClose: () => {
this.initData()
}
});
})
}).catch(() => {
})
},
addOrUpdateHandle(id, isDetail) {
this.formVisible = true
this.$nextTick(() => {
this.$refs.JNPFForm.init(id, isDetail)
})
},
exportData() {
this.exportBoxVisible = true
this.$nextTick(() => {
this.$refs.ExportBox.init(this.columnList)
})
},
download(data) {
let query = {...data, ...this.listQuery, ...this.query,menuId:this.menuId}
request({
url: `/api/example/Receiptout/Actions/Export`,
method: 'GET',
data: query
}).then(res => {
if (!res.data.url) return
this.jnpf.downloadFile(res.data.url)
this.$refs.ExportBox.visible = false
this.exportBoxVisible = false
})
},
search() {
this.listQuery = {
currentPage: 1,
pageSize: 20,
sort: "desc",
sidx: "",
}
this.initData() this.initData()
}, }
refresh(isrRefresh) { });
this.formVisible = false })
if (isrRefresh) this.reset() }).catch(() => {});
}, },
reset() { handleSelectionChange(val) {
for (let key in this.query) { const res = val.map(item => item.id)
this.query[key] = undefined this.multipleSelection = res
} },
this.search() handleBatchRemoveDel() {
} if (!this.multipleSelection.length) {
this.$message({
type: 'error',
message: '请选择一条数据',
duration: 1500,
})
return
}
const ids = this.multipleSelection.join()
this.$confirm('您确定要删除这些数据吗, 是否继续?', '提示', {
type: 'warning'
}).then(() => {
request({
url: `/api/example/Receiptout/batchRemove/${ids}`,
method: 'DELETE'
}).then(res => {
this.$message({
type: 'success',
message: res.msg,
onClose: () => {
this.initData()
}
});
})
}).catch(() => {})
},
addOrUpdateHandle(id, isDetail) {
this.formVisible = true
this.$nextTick(() => {
this.$refs.JNPFForm.init(id, isDetail)
})
},
exportData() {
this.exportBoxVisible = true
this.$nextTick(() => {
this.$refs.ExportBox.init(this.columnList)
})
},
download(data) {
let query = {
...data,
...this.listQuery,
...this.query,
menuId: this.menuId
}
request({
url: `/api/example/Receiptout/Actions/Export`,
method: 'GET',
data: query
}).then(res => {
if (!res.data.url) return
this.jnpf.downloadFile(res.data.url)
this.$refs.ExportBox.visible = false
this.exportBoxVisible = false
})
},
search() {
this.listQuery = {
currentPage: 1,
pageSize: 20,
sort: "desc",
sidx: "",
}
this.initData()
},
refresh(isrRefresh) {
this.formVisible = false
if (isrRefresh) this.reset()
},
reset() {
for (let key in this.query) {
this.query[key] = undefined
} }
this.search()
}
} }
}
</script> </script>

Loading…
Cancel
Save