product
tengxi 2 years ago
parent 2dc4527eb9
commit 457a388d08

@ -109,10 +109,10 @@ public class CustomerEntity {
@TableField("PROVINCE") @TableField("PROVINCE")
private String province; private String province;
@TableField("CITY") // @TableField("CITY")
private String city; // private String city;
@TableField("COUNTY") // @TableField("COUNTY")
private String county; // private String county;
} }

@ -101,12 +101,12 @@ public class CustomerMobileEntity {
@TableField("PROVINCE") @TableField("PROVINCE")
private String province; private String province;
//
// @TableField("CITY")
// private String city;
@TableField("CITY") // @TableField("COUNTY")
private String city; // private String county;
@TableField("COUNTY")
private String county;
private BigDecimal settlemenSum; private BigDecimal settlemenSum;

@ -50,7 +50,7 @@
IFNULL( SUM( b.settlement ), 0.0000000000 )* IFNULL( SUM( b.sales_price ), 0.0000000000 ) salesPriceSum IFNULL( SUM( b.settlement ), 0.0000000000 )* IFNULL( SUM( b.sales_price ), 0.0000000000 ) salesPriceSum
FROM FROM
jg_supplier a jg_supplier a
LEFT JOIN jg_poundlist b ON a.id = b.supplier_code LEFT JOIN jg_poundlist b ON a.id = b.supplier_id
WHERE WHERE
( a.delete_mark != 1 OR a.delete_mark IS NULL ) ( a.delete_mark != 1 OR a.delete_mark IS NULL )
AND ( b.delete_mark != 1 OR b.delete_mark IS NULL ) AND ( b.delete_mark != 1 OR b.delete_mark IS NULL )

@ -1,6 +1,6 @@
<template> <template>
<el-dialog :title="!dataForm.id ? '新建' : isDetail ? '详情':'编辑'" :close-on-click-modal="false" append-to-body <el-dialog :title="!dataForm.id ? '新建' : isDetail ? '详情':'编辑'" :close-on-click-modal="false" append-to-body
:visible.sync="visible" class="JNPF-dialog JNPF-dialog_center" lock-scroll width="1000px" > :visible.sync="visible" class="JNPF-dialog JNPF-dialog_center" lock-scroll width="1500px" >
<el-row :gutter="15" class=""> <el-row :gutter="15" class="">
<el-form ref="elForm" :model="dataForm" :rules="rules" size="small" label-width="100px" <el-form ref="elForm" :model="dataForm" :rules="rules" size="small" label-width="100px"
label-position="right"> label-position="right">

@ -6,7 +6,7 @@
<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.mName" placeholder="请输入" clearable> </el-input> <el-input v-model="query.mName" placeholder="请输入" clearable></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
@ -24,24 +24,29 @@
</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-download" @click="">导入
</el-button>
<el-button type="text" icon="el-icon-download" @click="">编辑
</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>
</div> </div>
<div class="JNPF-common-head-right"> <div class="JNPF-common-head-right">
<el-tooltip effect="dark" content="刷新" placement="top"> <el-tooltip effect="dark" content="刷新" placement="top">
<el-link icon="icon-ym icon-ym-Refresh JNPF-common-head-icon" :underline="false" <el-link icon="icon-ym icon-ym-Refresh JNPF-common-head-icon" :underline="false"
@click="reset()" /> @click="reset()"/>
</el-tooltip> </el-tooltip>
<screenfull isContainer /> <screenfull isContainer/>
</div> </div>
</div> </div>
<JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange' has-c <JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange' has-c :hasNO="false"
@selection-change="handleSelectionChange"> @selection-change="handleSelectionChange" border>
<el-table-column prop="mName" label="区域名称" width="0" align="left" /> <el-table-column type="index" width="50" label="序号" fixed="left" align="center" />
<el-table-column prop="creatortime" label="创建时间" width="0" align="left" /> <el-table-column prop="mName" label="区域名称" width="300" align="center"sortable fixed="left" />
<el-table-column prop="creatorusername" label="创建人名称" width="0" align="left" /> <el-table-column prop="creatortime" label="创建时间" width="300" sortablealign="center"/>
<el-table-column prop="lastmodifytime" label="修改时间" width="0" align="left" /> <el-table-column prop="creatorusername" label="创建人名称" width="300" sortablealign="center"/>
<el-table-column prop="lastmodifyusername" label="修改人名称" width="0" align="left" /> <el-table-column prop="lastmodifytime" label="修改时间" width="300" sortablealign="center"/>
<el-table-column prop="lastmodifyusername" label="修改人名称" width="300"sortable align="center"/>
<el-table-column label="操作" fixed="right" width="100"> <el-table-column label="操作" fixed="right" width="100">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" @click="addOrUpdateHandle(scope.row.id)"> <el-button type="text" @click="addOrUpdateHandle(scope.row.id)">
@ -52,12 +57,12 @@
</el-table-column> </el-table-column>
</JNPF-table> </JNPF-table>
<pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize" <pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize"
@pagination="initData" /> @pagination="initData"/>
</div> </div>
</div> </div>
<JNPF-Form v-if="formVisible" ref="JNPFForm" @refresh="refresh" /> <JNPF-Form v-if="formVisible" ref="JNPFForm" @refresh="refresh"/>
<ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download" /> <ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download"/>
<Detail v-if="detailVisible" ref="Detail" @refresh="detailVisible=false" /> <Detail v-if="detailVisible" ref="Detail" @refresh="detailVisible=false"/>
</div> </div>
</template> </template>
@ -83,7 +88,7 @@
return { return {
detailVisible: false, detailVisible: false,
query: { query: {
mName: undefined, mName: undefined
}, },
treeProps: { treeProps: {
children: 'children', children: 'children',
@ -97,8 +102,8 @@
listQuery: { listQuery: {
currentPage: 1, currentPage: 1,
pageSize: 20, pageSize: 20,
sort: "desc", sort: 'desc',
sidx: "", sidx: ''
}, },
formVisible: false, formVisible: false,
exportBoxVisible: false, exportBoxVisible: false,
@ -121,8 +126,8 @@
{ {
prop: 'lastmodifyusername', prop: 'lastmodifyusername',
label: '修改人名称' label: '修改人名称'
}, }
], ]
} }
}, },
computed: { computed: {
@ -150,20 +155,25 @@
this.initData() this.initData()
}, },
initData() { initData() {
this.listLoading = true; this.listLoading = true
let _query = { let _query = {
...this.listQuery, ...this.listQuery,
...this.query, ...this.query,
menuId: this.menuId menuId: this.menuId
}; }
request({ request({
url: `/api/areasetting/Areasetting/getList`, url: `/api/areasetting/Areasetting/getList`,
method: 'post', method: 'post',
data: _query data: _query
}).then(res => { }).then(res => {
var _list = []; var _list = []
for (let i = 0; i < res.data.list.length; i++) { for (let i = 0; i < res.data.list.length; i++) {
let _data = res.data.list[i]; res.data.list[i].creatorTime = res.data.list[i].creatorTime ? res.data.list[i].creatorTime.substring(0,
10) : '';
res.data.list[i].lastmodifytime = res.data.list[i].lastmodifytime ? res.data.list[i].lastmodifytime.substring(0,
10) : '';
let _data = res.data.list[i]
_list.push(_data) _list.push(_data)
} }
this.list = _list this.list = _list
@ -186,9 +196,10 @@
onClose: () => { onClose: () => {
this.initData() this.initData()
} }
});
}) })
}).catch(() => {}); })
}).catch(() => {
})
}, },
handleSelectionChange(val) { handleSelectionChange(val) {
const res = val.map(item => item.id) const res = val.map(item => item.id)
@ -199,7 +210,7 @@
this.$message({ this.$message({
type: 'error', type: 'error',
message: '请选择一条数据', message: '请选择一条数据',
duration: 1500, duration: 1500
}) })
return return
} }
@ -217,9 +228,10 @@
onClose: () => { onClose: () => {
this.initData() this.initData()
} }
});
}) })
}).catch(() => {}) })
}).catch(() => {
})
}, },
addOrUpdateHandle(id, isDetail) { addOrUpdateHandle(id, isDetail) {
this.formVisible = true this.formVisible = true
@ -255,8 +267,8 @@
this.listQuery = { this.listQuery = {
currentPage: 1, currentPage: 1,
pageSize: 20, pageSize: 20,
sort: "desc", sort: 'desc',
sidx: "", sidx: ''
} }
this.initData() this.initData()
}, },

@ -1,16 +1,16 @@
<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 :visible.sync="visible" class="JNPF-dialog JNPF-dialog_center" lock-scroll
width="800px"> width="1500px">
<el-row :gutter="15" class=""> <el-row :gutter="15" class="">
<el-form ref="elForm" :model="dataForm" :rules="rules" size="small" label-width="100px" label-position="right" > <el-form ref="elForm" :model="dataForm" :rules="rules" size="small" label-width="100px" label-position="right">
<template v-if="!loading"> <template v-if="!loading">
<el-col :span="8" > <el-col :span="8">
<el-form-item label="单据编号" <el-form-item label="单据编号"
prop="documentNo" > prop="documentNo">
<el-input v-model="dataForm.documentNo" <el-input v-model="dataForm.documentNo"
placeholder="请输入" clearable :style='{"width":"100%"}'> placeholder="请输入" clearable :style='{"width":"100%"}' :disabled="true">
</el-input> </el-input>
</el-form-item> </el-form-item>
@ -24,119 +24,121 @@
</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="customerName" > prop="customerName">
<el-input v-model="dataForm.customerName" <el-input v-model="dataForm.customerName"
placeholder="请输入" clearable :style='{"width":"100%"}'> 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="amount" > prop="amount">
<el-input v-model="dataForm.amount" <el-input v-model="dataForm.amount "
placeholder="请输入" clearable :style='{"width":"100%"}'> placeholder="请输入" clearable :style='{"width":"100%"}' :disabled="true">
</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="quantity" > prop="quantity">
<el-input v-model="dataForm.quantity" <el-input v-model="dataForm.quantity"
placeholder="请输入" clearable :style='{"width":"100%"}'> placeholder="请输入" clearable :style='{"width":"100%"}' :disabled="true">
</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="invoiceQuantity" > prop="invoiceQuantity">
<el-input v-model="dataForm.invoiceQuantity" <el-input v-model="dataForm.invoiceQuantity"
placeholder="请输入" clearable :style='{"width":"100%"}'> 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="customerTaxNo" > prop="customerTaxNo">
<el-input v-model="dataForm.customerTaxNo" <el-input v-model="dataForm.customerTaxNo"
placeholder="请输入" clearable :style='{"width":"100%"}'> placeholder="请输入" clearable :style='{"width":"100%"}' :disabled="true">
</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="customerAddress" > prop="customerAddress">
<el-input v-model="dataForm.customerAddress" <el-input v-model="dataForm.customerAddress"
placeholder="请输入" clearable :style='{"width":"100%"}'> placeholder="请输入" clearable :style='{"width":"100%"}' :disabled="true">
</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" <el-select v-model="dataForm.currency"
placeholder="请选择" clearable :style='{"width":"100%"}'> placeholder="请选择" clearable :style='{"width":"100%"}' :disabled="true">
<el-option v-for="(item, index) in currencyOptions" :key="index" :label="item.fullName" :value="item.id" :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="remark" > prop="remark">
<el-input v-model="dataForm.remark" <el-input v-model="dataForm.remark"
placeholder="请输入" clearable :style='{"width":"100%"}'> 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="invoiceAmount" > prop="invoiceAmount">
<el-input v-model="dataForm.invoiceAmount" <el-input v-model="dataForm.invoiceAmount"
placeholder="请输入" clearable :style='{"width":"100%"}'> placeholder="请输入" clearable :style='{"width":"100%"}' :disabled="true">
</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="salesOrderNo" > prop="salesOrderNo">
<el-input v-model="dataForm.salesOrderNo" <el-input v-model="dataForm.salesOrderNo"
placeholder="请输入" clearable :style='{"width":"100%"}'> 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="contractName" > prop="contractName">
<el-input v-model="dataForm.contractName" <el-input v-model="dataForm.contractName"
placeholder="请输入" clearable :style='{"width":"100%"}'> 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" <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="8" > <el-col :span="8">
<el-form-item label="制单人" <el-form-item label="制单人"
prop="creatorUserName" > prop="creatorUserName">
<el-input v-model="dataForm.creatorUserName" <el-input v-model="dataForm.creatorUserName"
placeholder="请输入" clearable :style='{"width":"100%"}'> placeholder="请输入" clearable :style='{"width":"100%"}'>
@ -146,15 +148,15 @@
<el-col :span="24"> <el-col :span="24">
<el-tabs v-model="activewkrlwe" tab-position="top" class="mb-20"> <el-tabs v-model="activewkrlwe" tab-position="top" class="mb-20">
<el-tab-pane label="应收明细"> <el-tab-pane label="应收明细">
</el-tab-pane > </el-tab-pane>
<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.arinvoices_item0List" size='mini' > <el-table :data="dataForm.arinvoices_item0List" size='mini'>
<el-table-column type="index" width="50" label="序号" align="center" /> <el-table-column type="index" width="50" label="序号" align="center"/>
<el-table-column prop="invoiceCode" label="发票代码"> <el-table-column prop="invoiceCode" label="发票代码">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-model="scope.row.invoiceCode" <el-input v-model="scope.row.invoiceCode"
@ -173,7 +175,8 @@
<template slot-scope="scope"> <template slot-scope="scope">
<el-select v-model="scope.row.taxRate" <el-select v-model="scope.row.taxRate"
placeholder="请选择" clearable :style='{"width":"100%"}'> placeholder="请选择" clearable :style='{"width":"100%"}'>
<el-option v-for="(item, index) in taxRateOptions" :key="index" :label="item.fullName" :value="item.id" :disabled="item.disabled" ></el-option> <el-option v-for="(item, index) in taxRateOptions" :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>
@ -207,9 +210,11 @@
</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" @click="delarinvoices_item0List(scope.$index)"></el-button> <el-button size="mini" type="text" class="JNPF-table-delBtn"
@click="delarinvoices_item0List(scope.$index)">删除
</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -218,11 +223,11 @@
</div> </div>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-tab-pane > </el-tab-pane>
</el-tabs> </el-tabs>
</el-col> </el-col>
</template> </template>
</el-form> </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>
@ -234,6 +239,7 @@
import request from '@/utils/request' import request from '@/utils/request'
import { getDataInterfaceRes } from '@/api/systemData/dataInterface' import { getDataInterfaceRes } from '@/api/systemData/dataInterface'
import { getDictionaryDataSelector } from '@/api/systemData/dictionary' import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
export default { export default {
components: {}, components: {},
props: [], props: [],
@ -243,76 +249,85 @@
loading: false, loading: false,
isDetail: false, isDetail: false,
dataForm: { dataForm: {
documentNo : '', documentNo: '',
businessDate : '', businessDate: '',
customerName : '', customerName: '',
amount : '', amount: '',
quantity : '', quantity: '',
invoiceQuantity : '', invoiceQuantity: '',
customerTaxNo : '', customerTaxNo: '',
customerAddress : '', customerAddress: '',
currency : "0", currency: '0',
remark : '', remark: '',
invoiceAmount : '', invoiceAmount: '',
salesOrderNo : '', salesOrderNo: '',
contractName : '', contractName: '',
status : "0", status: '0',
creatorUserName : '', creatorUserName: '',
arinvoices_item0List:[], arinvoices_item0List: []
}, },
activewkrlwe:'1', activewkrlwe: '1',
rules: rules:
{ {},
}, currencyOptions: [{ 'fullName': '人民币', 'id': '0' }, { 'fullName': '美元', 'id': '1' }, {
currencyOptions:[{"fullName":"人民币","id":"0"},{"fullName":"美元","id":"1"},{"fullName":"英镑","id":"2"}], 'fullName': '英镑',
statusOptions:[{"fullName":"已保存","id":"0"},{"fullName":"审批中","id":"1"},{"fullName":"已审批","id":"2"}], 'id': '2'
}],
statusOptions: [{ 'fullName': '已保存', 'id': '0' }, { 'fullName': '审批中', 'id': '1' }, {
'fullName': '已审批',
'id': '2'
}],
taxRateOptions:[{"fullName":"13","id":"0"},{"fullName":"9","id":"1"},{"fullName":"6","id":"2"},{"fullName":"5","id":"3"},{"fullName":"3","id":"4"},{"fullName":"0","id":"5"}], taxRateOptions: [{ 'fullName': '13', 'id': '0' }, { 'fullName': '9', 'id': '1' }, {
'fullName': '6',
'id': '2'
}, { 'fullName': '5', 'id': '3' }, { 'fullName': '3', 'id': '4' }, { 'fullName': '0', 'id': '5' }]
} }
}, },
computed: {}, computed: {},
watch: {}, watch: {},
created() { created() {
}, },
mounted() {}, mounted() {
},
methods: { methods: {
arinvoices_item0Exist() { arinvoices_item0Exist() {
let isOk = true; let isOk = true
for(let i=0;i<this.dataForm.arinvoices_item0List.length;i++){ for (let i = 0; i < this.dataForm.arinvoices_item0List.length; i++) {
const e = this.dataForm.arinvoices_item0List[i]; const e = this.dataForm.arinvoices_item0List[i]
} }
return isOk; return isOk
}, },
clearData(data){ clearData(data) {
for (let key in data) { for (let key in data) {
if (data[key] instanceof Array) { if (data[key] instanceof Array) {
data[key] = []; data[key] = []
} else if (data[key] instanceof Object) { } else if (data[key] instanceof Object) {
this.clearData(data[key]); this.clearData(data[key])
} else { } else {
data[key] = ""; data[key] = ''
} }
} }
}, },
init(id, isDetail) { init(id, isDetail) {
this.dataForm.id = id || 0; this.dataForm.id = id || 0
this.visible = true; this.visible = true
this.isDetail = isDetail || false; this.isDetail = isDetail || false
this.$nextTick(() => { this.$nextTick(() => {
this.$refs['elForm'].resetFields(); this.$refs['elForm'].resetFields()
if(this.dataForm.id){ if (this.dataForm.id) {
this.loading = true this.loading = true
request({ request({
url: '/api/arinvoices/Arinvoices/'+this.dataForm.id, url: '/api/arinvoices/Arinvoices/' + this.dataForm.id,
method: 'get' method: 'get'
}).then(res => { }).then(res => {
this.dataInfo(res.data) this.dataInfo(res.data)
this.loading = false this.loading = false
}); })
}else{ } else {
this.clearData(this.dataForm) this.clearData(this.dataForm)
} }
}); })
this.$store.commit('generator/UPDATE_RELATION_DATA', {}) this.$store.commit('generator/UPDATE_RELATION_DATA', {})
}, },
// //
@ -325,7 +340,7 @@
}) })
}, },
request() { request() {
var _data =this.dataList() var _data = this.dataList()
if (!this.dataForm.id) { if (!this.dataForm.id) {
request({ request({
url: '/api/arinvoices/Arinvoices', url: '/api/arinvoices/Arinvoices',
@ -342,9 +357,9 @@
} }
}) })
}) })
}else{ } else {
request({ request({
url: '/api/arinvoices/Arinvoices/'+this.dataForm.id, url: '/api/arinvoices/Arinvoices/' + this.dataForm.id,
method: 'PUT', method: 'PUT',
data: _data data: _data
}).then((res) => { }).then((res) => {
@ -360,35 +375,35 @@
}) })
} }
}, },
addarinvoices_item0List(){ addarinvoices_item0List() {
let item = { let item = {
invoiceCode:undefined, invoiceCode: undefined,
invoiceNo:undefined, invoiceNo: undefined,
taxRate:undefined, taxRate: undefined,
taxAmount:undefined, taxAmount: undefined,
amountNotTax:undefined, amountNotTax: undefined,
creatorUserName:undefined, creatorUserName: undefined
} }
this.dataForm.arinvoices_item0List.push(item) this.dataForm.arinvoices_item0List.push(item)
}, },
delarinvoices_item0List(index) { delarinvoices_item0List(index) {
this.dataForm.arinvoices_item0List.splice(index, 1); this.dataForm.arinvoices_item0List.splice(index, 1)
}, },
dataList(){ dataList() {
var _data = JSON.parse(JSON.stringify(this.dataForm)); var _data = JSON.parse(JSON.stringify(this.dataForm))
for(let i=0;i<_data.arinvoices_item0List.length;i++){ for (let i = 0; i < _data.arinvoices_item0List.length; i++) {
var _list = _data.arinvoices_item0List[i]; var _list = _data.arinvoices_item0List[i]
} }
return _data; return _data
}, },
dataInfo(dataAll){ dataInfo(dataAll) {
let _dataAll =dataAll let _dataAll = dataAll
for(let i=0;i<_dataAll.arinvoices_item0List.length;i++){ for (let i = 0; i < _dataAll.arinvoices_item0List.length; i++) {
var _list = _dataAll.arinvoices_item0List[i]; var _list = _dataAll.arinvoices_item0List[i]
} }
this.dataForm = _dataAll this.dataForm = _dataAll
}, }
}, }
} }
</script> </script>

@ -6,7 +6,7 @@
<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">
@ -22,9 +22,9 @@
<div> <div>
<el-button type="primary" icon="el-icon-plus" @click="addOrUpdateHandle()"> <el-button type="primary" 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="text" icon="el-icon-plus" @click="1"> <el-button type="text" icon="el-icon-plus" @click="1">
</el-button> </el-button>
@ -46,53 +46,67 @@
<screenfull isContainer/> <screenfull isContainer/>
</div> </div>
</div> </div>
<JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange' has-c :hasNO="false" @selection-change="handleSelectionChange" border> <JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange' has-c :hasNO="false"
<el-table-column type="index" width="50" label="序号" fixed="left" align="center" /> @selection-change="handleSelectionChange" border>
<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="documentNo" label="单据编号" sortable width="200" align="center" fixed="left"
/> />
<el-table-column prop="customerName" label="客户名称" sortable width="150" align="center" fixed="left" <el-table-column prop="customerName" label="客户名称" sortable width="150" align="center" fixed="left"
/> />
<el-table-column prop="amount" label="金额" width="120" sortable align="center" <el-table-column prop="amount" label="金额" width="120" sortable align="center"
/> />
<el-table-column prop="quantity" label="数量" width="120" sortable align="center" <el-table-column prop="quantity" label="数量" width="120" sortable align="center"
/> />
<el-table-column label="币别 " width="80" prop="currency" sortable algin="center" <el-table-column label="币别 " width="80" prop="currency" sortable algin="center"
> >
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.currency | dynamicText(currencyOptions) }} {{ scope.row.currency | dynamicText(currencyOptions) }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="invoiceAmount" label="发票金额" sortable width="120" align="center" <el-table-column prop="invoiceAmount" label="发票金额" sortable width="120" align="center"
/> />
<el-table-column prop="invoiceQuantity" label="发票数量" sortable width="120" align="center" <el-table-column prop="invoiceQuantity" label="发票数量" sortable width="120" align="center"
/> />
<el-table-column prop="salesOrderNo" label="销售订单号" sortable width="200" align="center" <el-table-column prop="salesOrderNo" label="销售订单号" sortable width="200" align="center"
/> />
<el-table-column prop="contractName" label="合同名称" sortable width="200" align="center" <el-table-column prop="contractName" label="合同名称" sortable width="200" align="center"
/> />
<el-table-column label="单据状态 " width="120" sortable prop="status" algin="center" <el-table-column label="单据状态 " width="120" sortable prop="status" algin="center"
> >
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.status | dynamicText(statusOptions) }} {{ scope.row.status | dynamicText(statusOptions) }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="creatorUserName" label="制单人" width="120" sortable align="center" <el-table-column prop="creatorUserName" label="制单人" width="120" sortable align="center"
/> />
<el-table-column label="操作" fixed="right" <el-table-column label="操作" fixed="right"
width="150" > width="150">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" <el-button type="text"
@click="addOrUpdateHandle(scope.row.id)" >编辑 @click="addOrUpdateHandle(scope.row.id)">编辑
</el-button> </el-button>
<el-button type="text" class="JNPF-table-delBtn" @click="handleDel(scope.row.id)"> <el-button type="text" class="JNPF-table-delBtn" @click="handleDel(scope.row.id)">
</el-button> </el-button>
<el-button type="text" <el-button type="text"
@click="goDetail(scope.row.id)">详情 @click="goDetail(scope.row.id)">详情
</el-button> </el-button>
<el-button type="text"
@click="goDetail">撤回申请
</el-button>
<el-button type="text"
@click="goDetail">审核
</el-button>
<el-button type="text"
@click="goDetail">弃审
</el-button>
<el-button type="text"
@click="goDetail">提交
</el-button>
</template> </template>
</el-table-column> </el-table-column>
</JNPF-table> </JNPF-table>
<pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize" @pagination="initData"/> <pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize"
@pagination="initData"/>
</div> </div>
</div> </div>
<JNPF-Form v-if="formVisible" ref="JNPFForm" @refresh="refresh"/> <JNPF-Form v-if="formVisible" ref="JNPFForm" @refresh="refresh"/>
@ -103,19 +117,19 @@ width="150" >
<script> <script>
import request from '@/utils/request' import request from '@/utils/request'
import {getDictionaryDataSelector} from '@/api/systemData/dictionary' import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
import JNPFForm from './Form' import JNPFForm from './Form'
import ExportBox from './ExportBox' import ExportBox from './ExportBox'
import {getDataInterfaceRes} from '@/api/systemData/dataInterface' import { getDataInterfaceRes } from '@/api/systemData/dataInterface'
import Detail from './Detail' import Detail from './Detail'
export default { export default {
components: {JNPFForm, ExportBox,Detail}, components: { JNPFForm, ExportBox, Detail },
data() { data() {
return { return {
detailVisible: false, detailVisible: false,
query: { query: {
documentNo:undefined, documentNo: undefined
}, },
treeProps: { treeProps: {
children: 'children', children: 'children',
@ -128,28 +142,34 @@ width="150" >
listQuery: { listQuery: {
currentPage: 1, currentPage: 1,
pageSize: 20, pageSize: 20,
sort: "desc", sort: 'desc',
sidx: "", sidx: ''
}, },
formVisible: false, formVisible: false,
exportBoxVisible: false, exportBoxVisible: false,
columnList: [ columnList: [
{prop: 'documentNo', label: '单据编号'}, { prop: 'documentNo', label: '单据编号' },
{prop: 'customerName', label: '客户名称'}, { prop: 'customerName', label: '客户名称' },
{prop: 'amount', label: '金额'}, { prop: 'amount', label: '金额' },
{prop: 'quantity', label: '数量'}, { prop: 'quantity', label: '数量' },
{prop: 'currency', label: '币别 '}, { prop: 'currency', label: '币别 ' },
{prop: 'invoiceAmount', label: '发票金额'}, { prop: 'invoiceAmount', label: '发票金额' },
{prop: 'invoiceQuantity', label: '发票数量'}, { prop: 'invoiceQuantity', label: '发票数量' },
{prop: 'salesOrderNo', label: '销售订单号'}, { prop: 'salesOrderNo', label: '销售订单号' },
{prop: 'contractName', label: '合同名称'}, { prop: 'contractName', label: '合同名称' },
{prop: 'status', label: '单据状态 '}, { prop: 'status', label: '单据状态 ' },
{prop: 'creatorUserName', label: '制单人'}, { prop: 'creatorUserName', label: '制单人' }
], ],
currencyOptions:[{"fullName":"人民币","id":"0"},{"fullName":"美元","id":"1"},{"fullName":"英镑","id":"2"}], currencyOptions: [{ 'fullName': '人民币', 'id': '0' }, { 'fullName': '美元', 'id': '1' }, {
currencyProps:{"label":"fullName","value":"id"}, 'fullName': '英镑',
statusOptions:[{"fullName":"已保存","id":"0"},{"fullName":"审批中","id":"1"},{"fullName":"已审批","id":"2"}], 'id': '2'
statusProps:{"label":"fullName","value":"id"}, }],
currencyProps: { 'label': 'fullName', 'value': 'id' },
statusOptions: [{ 'fullName': '已保存', 'id': '0' }, { 'fullName': '审批中', 'id': '1' }, {
'fullName': '已审批',
'id': '2'
}],
statusProps: { 'label': 'fullName', 'value': 'id' }
} }
}, },
computed: { computed: {
@ -161,32 +181,32 @@ width="150" >
this.initData() this.initData()
}, },
methods: { methods: {
goDetail(id){ goDetail(id) {
this.detailVisible = true this.detailVisible = true
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.Detail.init(id) this.$refs.Detail.init(id)
}) })
}, },
sortChange({column, prop, order}) { sortChange({ column, prop, order }) {
this.listQuery.sort = order == 'ascending' ? 'asc' : 'desc' this.listQuery.sort = order == 'ascending' ? 'asc' : 'desc'
this.listQuery.sidx = !order ? '' : prop this.listQuery.sidx = !order ? '' : prop
this.initData() this.initData()
}, },
initData() { initData() {
this.listLoading = true; this.listLoading = true
let _query = { let _query = {
...this.listQuery, ...this.listQuery,
...this.query, ...this.query,
menuId:this.menuId menuId: this.menuId
}; }
request({ request({
url: `/api/arinvoices/Arinvoices/getList`, url: `/api/arinvoices/Arinvoices/getList`,
method: 'post', method: 'post',
data: _query data: _query
}).then(res => { }).then(res => {
var _list =[]; var _list = []
for(let i=0;i<res.data.list.length;i++){ for (let i = 0; i < res.data.list.length; i++) {
let _data = res.data.list[i]; let _data = res.data.list[i]
_list.push(_data) _list.push(_data)
} }
this.list = _list this.list = _list
@ -209,10 +229,10 @@ width="150" >
onClose: () => { onClose: () => {
this.initData() this.initData()
} }
}); })
}) })
}).catch(() => { }).catch(() => {
}); })
}, },
handleSelectionChange(val) { handleSelectionChange(val) {
const res = val.map(item => item.id) const res = val.map(item => item.id)
@ -223,7 +243,7 @@ width="150" >
this.$message({ this.$message({
type: 'error', type: 'error',
message: '请选择一条数据', message: '请选择一条数据',
duration: 1500, duration: 1500
}) })
return return
} }
@ -241,7 +261,7 @@ width="150" >
onClose: () => { onClose: () => {
this.initData() this.initData()
} }
}); })
}) })
}).catch(() => { }).catch(() => {
}) })
@ -259,7 +279,7 @@ width="150" >
}) })
}, },
download(data) { download(data) {
let query = {...data, ...this.listQuery, ...this.query,menuId:this.menuId} let query = { ...data, ...this.listQuery, ...this.query, menuId: this.menuId }
request({ request({
url: `/api/arinvoices/Arinvoices/Actions/Export`, url: `/api/arinvoices/Arinvoices/Actions/Export`,
method: 'GET', method: 'GET',
@ -275,8 +295,8 @@ width="150" >
this.listQuery = { this.listQuery = {
currentPage: 1, currentPage: 1,
pageSize: 20, pageSize: 20,
sort: "desc", sort: 'desc',
sidx: "", sidx: ''
} }
this.initData() this.initData()
}, },

@ -1,6 +1,6 @@
<template> <template>
<transition name="el-zoom-in-center"> <transition name="el-zoom-in-center">
<div class="JNPF-preview-main"> <div class="JNPF-preview-main">
<div class="JNPF-common-page-header"> <div class="JNPF-common-page-header">
<el-page-header @back="goBack" <el-page-header @back="goBack"
content="详情"/> content="详情"/>
@ -8,175 +8,175 @@
<el-button @click="goBack"> </el-button> <el-button @click="goBack"> </el-button>
</div> </div>
</div> </div>
<el-row :gutter="15" class=" main" :style="{margin: '0 auto',width: '100%'}"> <el-row :gutter="15" class=" main" :style="{margin: '0 auto',width: '100%'}">
<el-form ref="elForm" :model="dataForm" size="small" label-width="100px" label-position="right" > <el-form ref="elForm" :model="dataForm" size="small" label-width="100px" label-position="right">
<template v-if="!loading"> <template v-if="!loading">
<el-col :span="8" > <el-col :span="8">
<el-form-item label="合同类型 " <el-form-item label="合同类型 "
prop="contractType" > prop="contractType">
<p>{{ dataForm.contractType | dynamicText(contractTypeOptions) }} </p> <p>{{ dataForm.contractType | dynamicText(contractTypeOptions) }} </p>
</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="contractCode" > prop="contractCode">
<p>{{dataForm.contractCode}}</p> <p>{{dataForm.contractCode}}</p>
</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="contractName" > prop="contractName">
<p>{{dataForm.contractName}}</p> <p>{{dataForm.contractName}}</p>
</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">
<p>{{dataForm.status}}</p> <p>{{dataForm.status}}</p>
</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="bidOpeningDate" > prop="bidOpeningDate">
<p>{{jnpf.dateFormat(dataForm.bidOpeningDate)}}</p> <p>{{jnpf.dateFormat(dataForm.bidOpeningDate)}}</p>
</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="startDate" > prop="startDate">
<p>{{jnpf.dateFormat(dataForm.startDate)}}</p> <p>{{jnpf.dateFormat(dataForm.startDate)}}</p>
</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="auditDate" > prop="auditDate">
<p>{{jnpf.dateFormat(dataForm.auditDate)}}</p> <p>{{jnpf.dateFormat(dataForm.auditDate)}}</p>
</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="completionDate" > prop="completionDate">
<p>{{jnpf.dateFormat(dataForm.completionDate)}}</p> <p>{{jnpf.dateFormat(dataForm.completionDate)}}</p>
</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="closingDate" > prop="closingDate">
<p>{{jnpf.dateFormat(dataForm.closingDate)}}</p> <p>{{jnpf.dateFormat(dataForm.closingDate)}}</p>
</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="collectionCycle" > prop="collectionCycle">
<p>{{dataForm.collectionCycle}}</p> <p>{{dataForm.collectionCycle}}</p>
</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="signingDate" > prop="signingDate">
<p>{{jnpf.dateFormat(dataForm.signingDate)}}</p> <p>{{jnpf.dateFormat(dataForm.signingDate)}}</p>
</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="endDate" > prop="endDate">
<p>{{jnpf.dateFormat(dataForm.endDate)}}</p> <p>{{jnpf.dateFormat(dataForm.endDate)}}</p>
</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="code" > prop="code">
<p>{{dataForm.code}}</p> <p>{{dataForm.code}}</p>
</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="name" > prop="name">
<p>{{dataForm.name}}</p> <p>{{dataForm.name}}</p>
</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="contractNo" > prop="contractNo">
<p>{{dataForm.contractNo}}</p> <p>{{dataForm.contractNo}}</p>
</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">
<p>{{dataForm.currency}}</p> <p>{{dataForm.currency}}</p>
</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">
<p>{{dataForm.num}}</p> <p>{{dataForm.num}}</p>
</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">
<p>{{dataForm.amount}}</p> <p>{{dataForm.amount}}</p>
</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="organization" > prop="organization">
<p>{{dataForm.organization}}</p> <p>{{dataForm.organization}}</p>
</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">
<p>{{dataForm.remark}}</p> <p>{{dataForm.remark}}</p>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="24" > <el-col :span="24">
<el-form-item label="合同分类 " <el-form-item label="合同分类 "
prop="classification" > prop="classification">
<p>{{dataForm.classification}}</p> <p>{{dataForm.classification}}</p>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="24" > <el-col :span="24">
<el-form-item label="申报日期" <el-form-item label="申报日期"
prop="declarationDate" > prop="declarationDate">
<p>{{dataForm.declarationDate}}</p> <p>{{dataForm.declarationDate}}</p>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="24" > <el-col :span="24">
<el-form-item label="部门编码" <el-form-item label="部门编码"
prop="deptCode" > prop="deptCode">
<p>{{dataForm.deptCode}}</p> <p>{{dataForm.deptCode}}</p>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="24" > <el-col :span="24">
<el-form-item label="录入人" <el-form-item label="录入人"
prop="creatorusername" > prop="creatorusername">
<p>{{dataForm.creatorusername}}</p> <p>{{dataForm.creatorusername}}</p>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="24" > <el-col :span="24">
<el-form-item label="部门名称" <el-form-item label="部门名称"
prop="deptName" > prop="deptName">
<p>{{dataForm.deptName}}</p> <p>{{dataForm.deptName}}</p>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="24" > <el-col :span="24">
<el-form-item label="集团审批" <el-form-item label="集团审批"
prop="approval" > prop="approval">
<p>{{dataForm.approval}}</p> <p>{{dataForm.approval}}</p>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="24"> <el-col :span="24">
<el-tabs v-model="activemdfrsi" tab-position="top" class="mb-20"> <el-tabs v-model="activemdfrsi" 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.contract_item0List" size='mini' > <el-table :data="dataForm.contract_item0List" size='mini'>
<el-table-column type="index" width="50" label="序号" align="center" /> <el-table-column type="index" width="50" label="序号" align="center"/>
<el-table-column prop="materialCode" label="物料编码"> <el-table-column prop="materialCode" label="物料编码">
<template slot-scope="scope"> <template slot-scope="scope">
<p>{{scope.row.materialCode}}</p> <p>{{scope.row.materialCode}}</p>
@ -235,41 +235,42 @@
</el-table> </el-table>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-tab-pane > </el-tab-pane>
<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.contract_item1List" size='mini' > <el-table :data="dataForm.contract_item1List" size='mini'>
<el-table-column type="index" width="50" label="序号" align="center" /> <el-table-column type="index" width="50" label="序号" align="center"/>
<el-table-column prop="enclosure" label="附件内容"> <el-table-column prop="enclosure" label="附件内容">
<template slot-scope="scope"> <template slot-scope="scope">
<JNPF-UploadFz v-model="scope.row.enclosure" <JNPF-UploadFz v-model="scope.row.enclosure"
disabled disabled
detailed :fileSize="5" sizeUnit="MB" :limit="9" buttonText="点击上传" > detailed :fileSize="5" sizeUnit="MB" :limit="9" buttonText="点击上传">
</JNPF-UploadFz> </JNPF-UploadFz>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-tab-pane > </el-tab-pane>
</el-tabs> </el-tabs>
</el-col> </el-col>
</template> </template>
</el-form> </el-form>
</el-row> </el-row>
</div> </div>
</transition> </transition>
</template> </template>
<script> <script>
import request from '@/utils/request' import request from '@/utils/request'
import PrintBrowse from '@/components/PrintBrowse' import PrintBrowse from '@/components/PrintBrowse'
import jnpf from '@/utils/jnpf' import jnpf from '@/utils/jnpf'
export default { export default {
components: {PrintBrowse}, components: { PrintBrowse },
props: [], props: [],
data() { data() {
return { return {
@ -278,38 +279,38 @@
printBrowseVisible: false, printBrowseVisible: false,
printId: '', printId: '',
dataForm: { dataForm: {
id :'', id: '',
contractType : "", contractType: '',
contractCode : '', contractCode: '',
contractName : '', contractName: '',
status : '', status: '',
bidOpeningDate : '', bidOpeningDate: '',
startDate : '', startDate: '',
auditDate : '', auditDate: '',
completionDate : '', completionDate: '',
closingDate : '', closingDate: '',
collectionCycle : '', collectionCycle: '',
signingDate : '', signingDate: '',
endDate : '', endDate: '',
code : '', code: '',
name : '', name: '',
contractNo : '', contractNo: '',
currency : '', currency: '',
num : '', num: '',
amount : '', amount: '',
organization : '', organization: '',
remark : '', remark: '',
classification : '', classification: '',
declarationDate : '', declarationDate: '',
deptCode : '', deptCode: '',
creatorusername : '', creatorusername: '',
deptName : '', deptName: '',
approval : 0, approval: 0,
contract_item0List:[], contract_item0List: [],
contract_item1List:[], contract_item1List: []
}, },
activemdfrsi:'0', activemdfrsi: '0',
contractTypeOptions:[{"fullName":"选项一","id":"1"},{"fullName":"选项二","id":"2"}], contractTypeOptions: [{ 'fullName': '选项一', 'id': '1' }, { 'fullName': '选项二', 'id': '2' }]
} }
}, },
@ -318,16 +319,17 @@
created() { created() {
}, },
mounted() {}, mounted() {
},
methods: { methods: {
dataInfo(dataAll){ dataInfo(dataAll) {
let _dataAll =dataAll let _dataAll = dataAll
for(let i=0;i<_dataAll.contract_item0List.length;i++){ for (let i = 0; i < _dataAll.contract_item0List.length; i++) {
var _list = _dataAll.contract_item0List[i]; var _list = _dataAll.contract_item0List[i]
} }
for(let i=0;i<_dataAll.contract_item1List.length;i++){ for (let i = 0; i < _dataAll.contract_item1List.length; i++) {
var _list = _dataAll.contract_item1List[i]; var _list = _dataAll.contract_item1List[i]
_list.enclosure = _list.enclosure? JSON.parse(_list.enclosure):[] _list.enclosure = _list.enclosure ? JSON.parse(_list.enclosure) : []
} }
this.dataForm = _dataAll this.dataForm = _dataAll
}, },
@ -336,13 +338,13 @@
this.$emit('refresh') this.$emit('refresh')
}, },
init(id) { init(id) {
this.dataForm.id = id || 0; this.dataForm.id = id || 0
this.visible = true; this.visible = true
this.$nextTick(() => { this.$nextTick(() => {
if(this.dataForm.id){ if (this.dataForm.id) {
this.loading = true this.loading = true
request({ request({
url: '/api/example/ContractFile/detail/'+this.dataForm.id, url: '/api/example/ContractFile/detail/' + this.dataForm.id,
method: 'get' method: 'get'
}).then(res => { }).then(res => {
this.dataInfo(res.data) this.dataInfo(res.data)
@ -351,8 +353,8 @@
} }
}) })
}, }
}, }
} }
</script> </script>

@ -6,12 +6,12 @@
<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.contractCode" placeholder="请输入" clearable> </el-input> <el-input v-model="query.contractCode" 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-input v-model="query.contractName" placeholder="请输入" clearable> </el-input> <el-input v-model="query.contractName" placeholder="请输入" clearable></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
@ -25,45 +25,50 @@
<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="primary" icon="el-icon-plus" @click="addOrUpdateHandle()">-->
<!-- </el-button>--> <!-- </el-button>-->
<!-- <el-button type="text" icon="=el-icon-detail" @click="goDetail(scope.row.id)">--> <!-- <el-button type="text" icon="=el-icon-detail" @click="goDetail(scope.row.id)">-->
<!-- </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>-->
</div> </div>
<div class="JNPF-common-head-right"> <div class="JNPF-common-head-right">
<el-tooltip effect="dark" content="刷新" placement="top"> <el-tooltip effect="dark" content="刷新" placement="top">
<el-link icon="icon-ym icon-ym-Refresh JNPF-common-head-icon" :underline="false" <el-link icon="icon-ym icon-ym-Refresh JNPF-common-head-icon" :underline="false"
@click="reset()" /> @click="reset()"/>
</el-tooltip> </el-tooltip>
<screenfull isContainer /> <screenfull isContainer/>
</div> </div>
</div> </div>
<JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange' has-c <JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange' has-c :hasNO="false"
@selection-change="handleSelectionChange"> @selection-change="handleSelectionChange" border>
<el-table-column prop="contractCode" label="合同编码" width="0" align="left" /> <el-table-column type="index" width="50" label="序号" fixed="left" align="center" />
<el-table-column prop="contractName" label="合同名称" width="0" align="left" /> <el-table-column prop="contractCode" label="合同编码" width="200" align="center" sortable fixed="left"/>
<el-table-column prop="contractNo" label="对方合同号" width="0" align="left" /> <el-table-column prop="contractName" label="合同名称" width="200" align="center" sortable fixed="left"/>
<el-table-column label="合同类型 " width="0" prop="contractType" algin="left"> <el-table-column prop="contractNo" label="对方合同号" width="200" align="center" sortable/>
<el-table-column label="合同类型 " width="120" prop="contractType" algin="center" sortable>
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.contractType | dynamicText(contractTypeOptions) }} {{ scope.row.contractType | dynamicText(contractTypeOptions) }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="classification" label="合同分类 " width="0" align="left" /> <el-table-column prop="classification" label="合同分类 " width="120" align="center" sortable/>
<el-table-column prop="declarationDate" label="申报日期" width="0" align="left" /> <el-table-column prop="declarationDate" label="申报日期" width="120" align="center" sortable/>
<el-table-column prop="name" label="供应商/客户名" width="0" align="left" /> <el-table-column prop="name" label="供应商/客户名" width="200" align="center" sortable/>
<el-table-column prop="num" label="数量" width="0" align="left" /> <el-table-column prop="num" label="数量" width="120" align="center" sortable/>
<el-table-column prop="amount" label="金额" width="0" align="left" /> <el-table-column prop="amount" label="金额" width="120" align="center" sortable/>
<el-table-column prop="deptName" label="部门名称" width="0" align="left" /> <el-table-column prop="deptName" label="部门名称" width="120" align="center" sortable/>
<el-table-column prop="remark" label="备注" width="0" align="left" /> <el-table-column prop="remark" label="备注" width="120" align="center" sortable/>
<el-table-column prop="creatorusername" label="录入人" width="0" align="left" /> <el-table-column prop="creatorusername" label="录入人" width="120" align="center" sortable/>
<el-table-column prop="status" label="合同状态" width="0" align="left" />
<el-table-column prop="status" label="合同状态" width="120" align="center" sortable>
<template slot-scope="scope">
{{ scope.row.status | dynamicText(statusOptions) }}
</template>
</el-table-column>
<el-table-column prop="approval" label="集团审批" width="0" align="left" > <el-table-column prop="approval" label="集团审批" width="120" align="center" sortable>
<template slot-scope="scope"> <template slot-scope="scope">
<el-tag type="danger" disable-transitions v-if="scope.row.approval == '关'"> <el-tag type="danger" disable-transitions v-if="scope.row.approval == '关'">
</el-tag> </el-tag>
@ -76,22 +81,22 @@
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" @click="exportData()"> <el-button type="text" @click="exportData()">
</el-button> </el-button>
<!-- <el-button type="text" @click="addOrUpdateHandle(scope.row.id)">--> <!-- <el-button type="text" @click="addOrUpdateHandle(scope.row.id)">-->
<!-- </el-button>--> <!-- </el-button>-->
<!-- <el-button type="text" class="JNPF-table-delBtn" @click="handleDel(scope.row.id)">--> <!-- <el-button type="text" class="JNPF-table-delBtn" @click="handleDel(scope.row.id)">-->
<!-- </el-button>--> <!-- </el-button>-->
<el-button type="text" @click="goDetail(scope.row.id)"> <el-button type="text" @click="goDetail(scope.row.id)">
</el-button> </el-button>
</template> </template>
</el-table-column> </el-table-column>
</JNPF-table> </JNPF-table>
<pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize" <pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize"
@pagination="initData" /> @pagination="initData"/>
</div> </div>
</div> </div>
<JNPF-Form v-if="formVisible" ref="JNPFForm" @refresh="refresh" /> <JNPF-Form v-if="formVisible" ref="JNPFForm" @refresh="refresh"/>
<ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download" /> <ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download"/>
<Detail v-if="detailVisible" ref="Detail" @refresh="detailVisible=false" /> <Detail v-if="detailVisible" ref="Detail" @refresh="detailVisible=false"/>
</div> </div>
</template> </template>
@ -118,7 +123,7 @@
detailVisible: false, detailVisible: false,
query: { query: {
contractCode: undefined, contractCode: undefined,
contractName: undefined, contractName: undefined
}, },
treeProps: { treeProps: {
children: 'children', children: 'children',
@ -132,8 +137,8 @@
listQuery: { listQuery: {
currentPage: 1, currentPage: 1,
pageSize: 20, pageSize: 20,
sort: "desc", sort: 'desc',
sidx: "", sidx: ''
}, },
formVisible: false, formVisible: false,
exportBoxVisible: false, exportBoxVisible: false,
@ -192,34 +197,40 @@
{ {
prop: 'approval', prop: 'approval',
label: '集团审批' label: '集团审批'
}, }
], ],
contractTypeOptions: [{ contractTypeOptions: [{
"fullName": "采购合同", 'fullName': '采购合同',
"id": "1" 'id': '1'
}, { }, {
"fullName": "销售合同", 'fullName': '销售合同',
"id": "2" 'id': '2'
}, },
{ {
"fullName": "租赁合同", 'fullName': '租赁合同',
"id": "3" 'id': '3'
}, { }, {
"fullName": "仓储合同", 'fullName': '仓储合同',
"id": "4" 'id': '4'
}, { }, {
"fullName": "运输合同", 'fullName': '运输合同',
"id": "5" 'id': '5'
}, },
{ {
"fullName": "施工合同", 'fullName': '施工合同',
"id": "6" 'id': '6'
} }
], ],
statusOptions: [{
"fullName": "进行中",
"id": "1"
}],
contractTypeProps: { contractTypeProps: {
"label": "fullName", 'label': 'fullName',
"value": "id" 'value': 'id'
}, }
} }
}, },
computed: { computed: {
@ -247,20 +258,21 @@
this.initData() this.initData()
}, },
initData() { initData() {
this.listLoading = true; this.listLoading = true
let _query = { let _query = {
...this.listQuery, ...this.listQuery,
...this.query, ...this.query,
menuId: this.menuId menuId: this.menuId
}; }
request({ request({
url: `/api/example/ContractFile/getList`, url: `/api/example/ContractFile/getList`,
method: 'post', method: 'post',
data: _query data: _query
}).then(res => { }).then(res => {
var _list = []; var _list = []
for (let i = 0; i < res.data.list.length; i++) { for (let i = 0; i < res.data.list.length; i++) {
let _data = res.data.list[i]; res.data.list[i].creatorTime = res.data.list[i].creatorTime ? res.data.list[i].creatorTime.substring(0, 10) : '';
let _data = res.data.list[i]
_list.push(_data) _list.push(_data)
} }
this.list = _list this.list = _list
@ -283,9 +295,10 @@
onClose: () => { onClose: () => {
this.initData() this.initData()
} }
});
}) })
}).catch(() => {}); })
}).catch(() => {
})
}, },
handleSelectionChange(val) { handleSelectionChange(val) {
const res = val.map(item => item.id) const res = val.map(item => item.id)
@ -296,7 +309,7 @@
this.$message({ this.$message({
type: 'error', type: 'error',
message: '请选择一条数据', message: '请选择一条数据',
duration: 1500, duration: 1500
}) })
return return
} }
@ -314,9 +327,10 @@
onClose: () => { onClose: () => {
this.initData() this.initData()
} }
});
}) })
}).catch(() => {}) })
}).catch(() => {
})
}, },
addOrUpdateHandle(id, isDetail) { addOrUpdateHandle(id, isDetail) {
this.formVisible = true this.formVisible = true
@ -352,8 +366,8 @@
this.listQuery = { this.listQuery = {
currentPage: 1, currentPage: 1,
pageSize: 20, pageSize: 20,
sort: "desc", sort: 'desc',
sidx: "contractCode", sidx: 'contractCode'
} }
this.initData() this.initData()
}, },

@ -2,7 +2,7 @@
<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 :visible.sync="visible" class="JNPF-dialog JNPF-dialog_center" lock-scroll
width="600px"> width="1500px">
<el-row :gutter="15" class=""> <el-row :gutter="15" class="">
<el-form ref="elForm" :model="dataForm" :rules="rules" size="small" label-width="100px" label-position="right" > <el-form ref="elForm" :model="dataForm" :rules="rules" size="small" label-width="100px" label-position="right" >
<template v-if="!loading"> <template v-if="!loading">

@ -6,23 +6,23 @@
<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.supplierCd" placeholder="请输入" clearable> </el-input> <el-input v-model="query.supplierCd" 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-input v-model="query.supplierNm" placeholder="请输入" clearable> </el-input> <el-input v-model="query.supplierNm" 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-input v-model="query.vatRegistrationNum" placeholder="请输入" clearable> </el-input> <el-input v-model="query.vatRegistrationNum" placeholder="请输入" clearable></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<template v-if="showAll"> <template v-if="showAll">
<el-col :span="6"> <el-col :span="6">
<el-form-item label="联系人"> <el-form-item label="联系人">
<el-input v-model="query.contactName" placeholder="请输入" clearable> </el-input> <el-input v-model="query.contactName" placeholder="请输入" clearable></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
</template> </template>
@ -45,9 +45,11 @@
<div> <div>
<el-button type="primary" icon="el-icon-plus" @click="addOrUpdateHandle()"> <el-button type="primary" 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-download" @click="">导入
</el-button>
<el-button type="text" icon="el-icon-delete" @click="handleBatchRemoveDel()">
</el-button> </el-button>
</div> </div>
<div class="JNPF-common-head-right"> <div class="JNPF-common-head-right">
@ -58,58 +60,60 @@
<screenfull isContainer/> <screenfull isContainer/>
</div> </div>
</div> </div>
<JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange' has-c @selection-change="handleSelectionChange"> <JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange'has-c :hasNO="false"
<el-table-column prop="supplierCd" label="客户编码" width="0" align="left" @selection-change="handleSelectionChange" border>
sortable="custom" /> <el-table-column type="index" width="50" label="序号" fixed="left" align="center" />
<el-table-column prop="supplierNm" label="客户名称" width="0" align="left" <el-table-column prop="supplierCd" label="客户编码" width="200" align="center" sortable fixed="left"
sortable="custom" /> sortable="custom"/>
<el-table-column prop="orgId" label="公司ID" width="0" align="left" <el-table-column prop="supplierNm" label="客户名称" width="200" align="center" sortable fixed="left"
sortable="custom" /> sortable="custom"/>
<el-table-column prop="vatRegistrationNum" label="纳税编号" width="0" align="left" <el-table-column prop="orgId" label="公司ID" width="200" align="center" sortable
/> sortable="custom"/>
<el-table-column label="客户等级" width="0" prop="customerLevel" algin="left" <el-table-column prop="vatRegistrationNum" label="纳税编号" width="200" align="center" sortable
sortable="custom" > />
<el-table-column label="客户等级" width="120" prop="customerLevel" algin="center" sortable
sortable="custom">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.customerLevel | dynamicText(customerLevelOptions) }} {{ scope.row.customerLevel | dynamicText(customerLevelOptions) }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="contactName" label="联系人" width="0" align="left" <el-table-column prop="contactName" label="联系人" width="120" align="center" sortable
sortable="custom" /> sortable="custom"/>
<el-table-column prop="country" label="国家" width="0" align="left" <el-table-column prop="country" label="国家" width="120" align="center" sortable
/> />
<el-table-column prop="contactPhone" label="电话" width="0" align="left" <el-table-column prop="contactPhone" label="电话" width="150" align="center" sortable
sortable="custom" /> sortable="custom"/>
<!-- <el-table-column prop="province" label="省市县" width="0" align="left"--> <!-- <el-table-column prop="province" label="省市县" width="0" align="left"-->
<!--/>--> <!--/>-->
<el-table-column prop="bank" label="开户行" width="0" align="left" <el-table-column prop="bank" label="开户行" width="200" align="left" sortable
/> />
<el-table-column label="是否启用" width="0" prop="status" algin="left" <el-table-column label="是否启用" width="120" prop="status" algin="left" sortable
sortable="custom" > sortable="custom">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.status | dynamicText(statusOptions) }} {{ scope.row.status | dynamicText(statusOptions) }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="bankAccount" label="银行账号" width="0" align="left" <el-table-column prop="bankAccount" label="银行账号" width="0" align="left"
/> />
<el-table-column label="企业性质" width="0" prop="enterprise" algin="left" <el-table-column label="企业性质" width="0" prop="enterprise" algin="left"
> >
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.enterprise | dynamicText(enterpriseOptions) }} {{ scope.row.enterprise | dynamicText(enterpriseOptions) }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="address" label="地址" width="0" align="left" <el-table-column prop="address" label="地址" width="0" align="left"
sortable="custom" /> sortable="custom"/>
<el-table-column label="客户分类" width="0" prop="classification" algin="left" <el-table-column label="客户分类" width="0" prop="classification" algin="left"
> >
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.classification | dynamicText(classificationOptions) }} {{ scope.row.classification | dynamicText(classificationOptions) }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" fixed="right" <el-table-column label="操作" fixed="right"
width="150" > width="150">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" <el-button type="text"
@click="addOrUpdateHandle(scope.row.id)" >编辑 @click="addOrUpdateHandle(scope.row.id)">编辑
</el-button> </el-button>
<el-button type="text" class="JNPF-table-delBtn" @click="handleDel(scope.row.id)"> <el-button type="text" class="JNPF-table-delBtn" @click="handleDel(scope.row.id)">
</el-button> </el-button>
@ -119,7 +123,8 @@ width="150" >
</template> </template>
</el-table-column> </el-table-column>
</JNPF-table> </JNPF-table>
<pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize" @pagination="initData"/> <pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize"
@pagination="initData"/>
</div> </div>
</div> </div>
<JNPF-Form v-if="formVisible" ref="JNPFForm" @refresh="refresh"/> <JNPF-Form v-if="formVisible" ref="JNPFForm" @refresh="refresh"/>
@ -130,23 +135,23 @@ width="150" >
<script> <script>
import request from '@/utils/request' import request from '@/utils/request'
import {getDictionaryDataSelector} from '@/api/systemData/dictionary' import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
import JNPFForm from './Form' import JNPFForm from './Form'
import ExportBox from './ExportBox' import ExportBox from './ExportBox'
import {getDataInterfaceRes} from '@/api/systemData/dataInterface' import { getDataInterfaceRes } from '@/api/systemData/dataInterface'
import Detail from './Detail' import Detail from './Detail'
export default { export default {
components: {JNPFForm, ExportBox,Detail}, components: { JNPFForm, ExportBox, Detail },
data() { data() {
return { return {
showAll: false, showAll: false,
detailVisible: false, detailVisible: false,
query: { query: {
supplierCd:undefined, supplierCd: undefined,
supplierNm:undefined, supplierNm: undefined,
vatRegistrationNum:undefined, vatRegistrationNum: undefined,
contactName:undefined, contactName: undefined
}, },
treeProps: { treeProps: {
children: 'children', children: 'children',
@ -159,36 +164,39 @@ width="150" >
listQuery: { listQuery: {
currentPage: 1, currentPage: 1,
pageSize: 20, pageSize: 20,
sort: "desc", sort: 'desc',
sidx: "creatorTime", sidx: 'creatorTime'
}, },
formVisible: false, formVisible: false,
exportBoxVisible: false, exportBoxVisible: false,
columnList: [ columnList: [
{prop: 'supplierCd', label: '客户编码'}, { prop: 'supplierCd', label: '客户编码' },
{prop: 'supplierNm', label: '客户名称'}, { prop: 'supplierNm', label: '客户名称' },
{prop: 'orgId', label: '公司ID'}, { prop: 'orgId', label: '公司ID' },
{prop: 'vatRegistrationNum', label: '纳税编号'}, { prop: 'vatRegistrationNum', label: '纳税编号' },
{prop: 'customerLevel', label: '客户等级'}, { prop: 'customerLevel', label: '客户等级' },
{prop: 'contactName', label: '联系人'}, { prop: 'contactName', label: '联系人' },
{prop: 'country', label: '国家'}, { prop: 'country', label: '国家' },
{prop: 'contactPhone', label: '电话'}, { prop: 'contactPhone', label: '电话' },
{prop: 'province', label: '省市县'}, { prop: 'province', label: '省市县' },
{prop: 'bank', label: '开户行'}, { prop: 'bank', label: '开户行' },
{prop: 'status', label: '是否启用'}, { prop: 'status', label: '是否启用' },
{prop: 'bankAccount', label: '银行账号'}, { prop: 'bankAccount', label: '银行账号' },
{prop: 'enterprise', label: '企业性质'}, { prop: 'enterprise', label: '企业性质' },
{prop: 'address', label: '地址'}, { prop: 'address', label: '地址' },
{prop: 'classification', label: '客户分类'}, { prop: 'classification', label: '客户分类' }
], ],
customerLevelOptions:[{"fullName":"一级","id":"1"},{"fullName":"二级","id":"2"},{"fullName":"三级","id":"3"}], customerLevelOptions: [{ 'fullName': '一级', 'id': '1' }, { 'fullName': '二级', 'id': '2' }, {
customerLevelProps:{"label":"fullName","value":"id"}, 'fullName': '三级',
statusOptions:[{"fullName":"启用","id":"1"},{"fullName":"禁用","id":"2"}], 'id': '3'
statusProps:{"label":"fullName","value":"id"}, }],
enterpriseOptions:[{"fullName":"民营","id":"0"},{"fullName":"私企","id":"1"}], customerLevelProps: { 'label': 'fullName', 'value': 'id' },
enterpriseProps:{"label":"fullName","value":"id"}, statusOptions: [{ 'fullName': '启用', 'id': '1' }, { 'fullName': '禁用', 'id': '2' }],
classificationOptions:[{"fullName":"国内","id":"0"},{"fullName":"国外","id":"1"}], statusProps: { 'label': 'fullName', 'value': 'id' },
classificationProps:{"label":"fullName","value":"id"}, enterpriseOptions: [{ 'fullName': '民营', 'id': '0' }, { 'fullName': '私企', 'id': '1' }],
enterpriseProps: { 'label': 'fullName', 'value': 'id' },
classificationOptions: [{ 'fullName': '国内', 'id': '0' }, { 'fullName': '国外', 'id': '1' }],
classificationProps: { 'label': 'fullName', 'value': 'id' }
} }
}, },
computed: { computed: {
@ -200,32 +208,32 @@ width="150" >
this.initData() this.initData()
}, },
methods: { methods: {
goDetail(id){ goDetail(id) {
this.detailVisible = true this.detailVisible = true
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.Detail.init(id) this.$refs.Detail.init(id)
}) })
}, },
sortChange({column, prop, order}) { sortChange({ column, prop, order }) {
this.listQuery.sort = order == 'ascending' ? 'asc' : 'desc' this.listQuery.sort = order == 'ascending' ? 'asc' : 'desc'
this.listQuery.sidx = !order ? '' : prop this.listQuery.sidx = !order ? '' : prop
this.initData() this.initData()
}, },
initData() { initData() {
this.listLoading = true; this.listLoading = true
let _query = { let _query = {
...this.listQuery, ...this.listQuery,
...this.query, ...this.query,
menuId:this.menuId menuId: this.menuId
}; }
request({ request({
url: `/api/example/Customer/getList`, url: `/api/example/Customer/getList`,
method: 'post', method: 'post',
data: _query data: _query
}).then(res => { }).then(res => {
var _list =[]; var _list = []
for(let i=0;i<res.data.list.length;i++){ for (let i = 0; i < res.data.list.length; i++) {
let _data = res.data.list[i]; let _data = res.data.list[i]
_list.push(_data) _list.push(_data)
} }
this.list = _list this.list = _list
@ -248,10 +256,10 @@ width="150" >
onClose: () => { onClose: () => {
this.initData() this.initData()
} }
}); })
}) })
}).catch(() => { }).catch(() => {
}); })
}, },
handleSelectionChange(val) { handleSelectionChange(val) {
const res = val.map(item => item.id) const res = val.map(item => item.id)
@ -262,7 +270,7 @@ width="150" >
this.$message({ this.$message({
type: 'error', type: 'error',
message: '请选择一条数据', message: '请选择一条数据',
duration: 1500, duration: 1500
}) })
return return
} }
@ -280,7 +288,7 @@ width="150" >
onClose: () => { onClose: () => {
this.initData() this.initData()
} }
}); })
}) })
}).catch(() => { }).catch(() => {
}) })
@ -298,7 +306,7 @@ width="150" >
}) })
}, },
download(data) { download(data) {
let query = {...data, ...this.listQuery, ...this.query,menuId:this.menuId} let query = { ...data, ...this.listQuery, ...this.query, menuId: this.menuId }
request({ request({
url: `/api/example/Customer/Actions/Export`, url: `/api/example/Customer/Actions/Export`,
method: 'GET', method: 'GET',
@ -314,8 +322,8 @@ width="150" >
this.listQuery = { this.listQuery = {
currentPage: 1, currentPage: 1,
pageSize: 20, pageSize: 20,
sort: "desc", sort: 'desc',
sidx: "creatorTime", sidx: 'creatorTime'
} }
this.initData() this.initData()
}, },

@ -1,140 +1,150 @@
<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 :visible.sync="visible" class="JNPF-dialog JNPF-dialog_center" lock-scroll
width="800px"> width="1500px">
<el-row :gutter="15" class=""> <el-row :gutter="15" class="">
<el-form ref="elForm" :model="dataForm" :rules="rules" size="small" label-width="100px" label-position="right" > <el-form ref="elForm" :model="dataForm" :rules="rules" size="small" label-width="100px" label-position="right">
<template v-if="!loading"> <template v-if="!loading">
<el-col :span="8" > <el-col :span="8">
<el-form-item label="单据编号" <el-form-item label="单据编号"
prop="documentNo" > prop="documentNo">
<el-input v-model="dataForm.documentNo" <el-input v-model="dataForm.documentNo"
placeholder="请输入单据编号" clearable :style='{"width":"100%"}'> placeholder="请输入单据编号" clearable :style='{"width":"100%"}' :disabled="true">
</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="businessDate" > prop="businessDate">
<el-date-picker v-model="dataForm.businessDate" <el-date-picker v-model="dataForm.businessDate"
placeholder="请选择业务日期" clearable :style='{"width":"100%"}' 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="amount" > prop="amount">
<el-input v-model="dataForm.amount" <el-input v-model="dataForm.amount"
placeholder="请输入单据编号" clearable :style='{"width":"100%"}'> placeholder="请输入单据编号" clearable :style='{"width":"100%"}':disabled="true">
</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="quantity" > prop="quantity">
<el-input v-model="dataForm.quantity" <el-input v-model="dataForm.quantity"
placeholder="请输入单据编号" clearable :style='{"width":"100%"}'> placeholder="请输入单据编号" clearable :style='{"width":"100%"}':disabled="true">
</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="invoiceType" > prop="invoiceType">
<el-select v-model="dataForm.invoiceType" <el-select v-model="dataForm.invoiceType"
placeholder="请选择" :style='{"width":"100%"}'> placeholder="请选择" :style='{"width":"100%"}'>
<el-option v-for="(item, index) in invoiceTypeOptions" :key="index" :label="item.fullName" :value="item.id" :disabled="item.disabled" ></el-option> <el-option v-for="(item, index) in invoiceTypeOptions" :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="currency" > prop="currency">
<el-select v-model="dataForm.currency" <el-select v-model="dataForm.currency"
placeholder="请选择" clearable :style='{"width":"100%"}'> placeholder="请选择" clearable :style='{"width":"100%"}' :disabled="true">
<el-option v-for="(item, index) in currencyOptions" :key="index" :label="item.fullName" :value="item.id" :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="remark" > prop="remark">
<el-input v-model="dataForm.remark" <el-input v-model="dataForm.remark"
placeholder="请输入" clearable :style='{"width":"100%"}'> 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="invoiceAmount" > prop="invoiceAmount">
<el-input v-model="dataForm.invoiceAmount" <el-input v-model="dataForm.invoiceAmount"
placeholder="请输入单据编号" clearable :style='{"width":"100%"}'> placeholder="请输入单据编号" clearable :style='{"width":"100%"}':disabled="true">
</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="invoiceQuantity" > prop="invoiceQuantity">
<el-input v-model="dataForm.invoiceQuantity" <el-input v-model="dataForm.invoiceQuantity"
placeholder="请输入单据编号" clearable :style='{"width":"100%"}'> placeholder="请输入单据编号" clearable :style='{"width":"100%"}':disabled="true">
</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" <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="8" > <el-col :span="8">
<el-form-item label="制单人" <el-form-item label="制单人"
prop="creatorUserName" > prop="creatorUserName">
<el-input v-model="dataForm.creatorUserName" <el-input v-model="dataForm.creatorUserName"
placeholder="请输入制单人" clearable :style='{"width":"100%"}'> placeholder="请输入制单人" clearable :style='{"width":"100%"}' :disabled="true">
</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="purchaseorderId" > prop="purchaseorderId">
<popupSelect v-model="dataForm.purchaseorderId" <popupSelect v-model="dataForm.purchaseorderId"
placeholder="请选择" clearable field="purchaseorderId" interfaceId="389673535976550149" :columnOptions="purchaseorderIdcolumnOptions" propsValue="id" relationField="document_no" popupType="dialog" placeholder="请选择" clearable field="purchaseorderId" interfaceId="389673535976550149"
:columnOptions="purchaseorderIdcolumnOptions" propsValue="id" relationField="document_no"
popupType="dialog"
popupTitle="选择数据" popupWidth="800px" popupTitle="选择数据" popupWidth="800px"
> >
</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="contractId" > prop="contractId">
<popupSelect v-model="dataForm.contractId" <popupSelect v-model="dataForm.contractId"
placeholder="请选择" clearable field="contractId" interfaceId="389673903103979269" :columnOptions="contractIdcolumnOptions" propsValue="id" relationField="contract_name" popupType="dialog" placeholder="请选择" clearable field="contractId" interfaceId="389673903103979269"
:columnOptions="contractIdcolumnOptions" propsValue="id" relationField="contract_name"
popupType="dialog"
popupTitle="选择数据" popupWidth="800px" popupTitle="选择数据" popupWidth="800px"
> >
</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="supplierId" > prop="supplierId">
<popupSelect v-model="dataForm.supplierId" <popupSelect v-model="dataForm.supplierId"
placeholder="请选择" clearable field="supplierId" interfaceId="389674191453990661" :columnOptions="supplierIdcolumnOptions" propsValue="id" relationField="supplier_name" popupType="dialog" placeholder="请选择" clearable field="supplierId" interfaceId="389674191453990661"
:columnOptions="supplierIdcolumnOptions" propsValue="id" relationField="supplier_name"
popupType="dialog"
popupTitle="选择数据" popupWidth="800px" popupTitle="选择数据" popupWidth="800px"
> >
@ -144,15 +154,15 @@
<el-col :span="24"> <el-col :span="24">
<el-tabs v-model="activebnrhzx" tab-position="top" class="mb-20"> <el-tabs v-model="activebnrhzx" tab-position="top" class="mb-20">
<el-tab-pane label="应付明细"> <el-tab-pane label="应付明细">
</el-tab-pane > </el-tab-pane>
<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.invoices_item0List" size='mini' > <el-table :data="dataForm.invoices_item0List" size='mini'>
<el-table-column type="index" width="50" label="序号" align="center" /> <el-table-column type="index" width="50" label="序号" align="center"/>
<el-table-column prop="invoiceCode" label="发票代码"> <el-table-column prop="invoiceCode" label="发票代码">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-model="scope.row.invoiceCode" <el-input v-model="scope.row.invoiceCode"
@ -171,7 +181,8 @@
<template slot-scope="scope"> <template slot-scope="scope">
<el-select v-model="scope.row.invoiceStatus" <el-select v-model="scope.row.invoiceStatus"
placeholder="请选择" clearable :style='{"width":"100%"}'> placeholder="请选择" clearable :style='{"width":"100%"}'>
<el-option v-for="(item, index) in invoiceStatusOptions" :key="index" :label="item.fullName" :value="item.id" :disabled="item.disabled" ></el-option> <el-option v-for="(item, index) in invoiceStatusOptions" :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>
@ -185,7 +196,8 @@
<el-table-column prop="invoicingDate" label="开票日期"> <el-table-column prop="invoicingDate" label="开票日期">
<template slot-scope="scope"> <template slot-scope="scope">
<el-date-picker v-model="scope.row.invoicingDate" <el-date-picker v-model="scope.row.invoicingDate"
placeholder="请选择" clearable :style='{"width":"100%"}' 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>
</template> </template>
</el-table-column> </el-table-column>
@ -198,9 +210,11 @@
</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" @click="delinvoices_item0List(scope.$index)"></el-button> <el-button size="mini" type="text" class="JNPF-table-delBtn"
@click="delinvoices_item0List(scope.$index)">删除
</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -209,11 +223,11 @@
</div> </div>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-tab-pane > </el-tab-pane>
</el-tabs> </el-tabs>
</el-col> </el-col>
</template> </template>
</el-form> </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>
@ -225,88 +239,102 @@
import request from '@/utils/request' import request from '@/utils/request'
import { getDataInterfaceRes } from '@/api/systemData/dataInterface' import { getDataInterfaceRes } from '@/api/systemData/dataInterface'
import { getDictionaryDataSelector } from '@/api/systemData/dictionary' import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
export default { export default {
components: {}, components: {},
props: [], props: [],
data() { data() {
return { return {
excludeFields: [],
visible: false, visible: false,
loading: false, loading: false,
isDetail: false, isDetail: false,
dataForm: { dataForm: {
documentNo : '', documentNo: '',
businessDate : '', businessDate: '',
amount : '', amount: '',
quantity : '', quantity: '',
invoiceType : "1", invoiceType: '1',
currency : "", currency: '',
remark : '', remark: '',
invoiceAmount : '', invoiceAmount: '',
invoiceQuantity : '', invoiceQuantity: '',
status : "0", status: '0',
creatorUserName : '', creatorUserName: '',
purchaseorderId : "", purchaseorderId: '',
contractId : "", contractId: '',
supplierId : "", supplierId: '',
invoices_item0List:[], invoices_item0List: []
}, },
activebnrhzx:'1', activebnrhzx: '1',
rules: rules:
{ {},
}, invoiceTypeOptions: [{ 'fullName': '普通增值税发票', 'id': '1' }, {
invoiceTypeOptions:[{"fullName":"普通增值税发票","id":"1"},{"fullName":"专用增值税发票","id":"2"},{"fullName":"增值税电子普通发票","id":"3"},{"fullName":"增值税电子发票","id":"4"}], 'fullName': '专用增值税发票',
currencyOptions:[{"fullName":"人民币","id":"0"},{"fullName":"美元","id":"1"},{"fullName":"英镑","id":"2"}], 'id': '2'
statusOptions:[{"fullName":"已保存","id":"0"},{"fullName":"审批中","id":"1"},{"fullName":"已审批","id":"2"}], }, { 'fullName': '增值税电子普通发票', 'id': '3' }, { 'fullName': '增值税电子发票', 'id': '4' }],
purchaseorderIdcolumnOptions:[ {"label":"采购订单号","value":"document_no"},], currencyOptions: [{ 'fullName': '人民币', 'id': '0' }, { 'fullName': '美元', 'id': '1' }, {
contractIdcolumnOptions:[ {"label":"ID","value":"id"},{"label":"合同名称","value":"contract_name"},], 'fullName': '英镑',
supplierIdcolumnOptions:[ {"label":"ID","value":"id"},{"label":"供应商名称","value":"supplier_name"},], 'id': '2'
}],
statusOptions: [{ 'fullName': '已保存', 'id': '0' }, { 'fullName': '审批中', 'id': '1' }, {
'fullName': '已审批',
'id': '2'
}],
purchaseorderIdcolumnOptions: [{ 'label': '采购订单号', 'value': 'document_no' }],
contractIdcolumnOptions: [{ 'label': 'ID', 'value': 'id' }, { 'label': '合同名称', 'value': 'contract_name' }],
supplierIdcolumnOptions: [{ 'label': 'ID', 'value': 'id' }, { 'label': '供应商名称', 'value': 'supplier_name' }],
invoiceStatusOptions:[{"fullName":"正常","id":"0"},{"fullName":"红冲","id":"1"},{"fullName":"作废","id":"2"}], invoiceStatusOptions: [{ 'fullName': '正常', 'id': '0' }, { 'fullName': '红冲', 'id': '1' }, {
'fullName': '作废',
'id': '2'
}]
} }
}, },
computed: {}, computed: {},
watch: {}, watch: {},
created() { created() {
}, },
mounted() {}, mounted() {
},
methods: { methods: {
invoices_item0Exist() { invoices_item0Exist() {
let isOk = true; let isOk = true
for(let i=0;i<this.dataForm.invoices_item0List.length;i++){ for (let i = 0; i < this.dataForm.invoices_item0List.length; i++) {
const e = this.dataForm.invoices_item0List[i]; const e = this.dataForm.invoices_item0List[i]
} }
return isOk; return isOk
}, },
clearData(data){ clearData(data) {
for (let key in data) { for (let key in data) {
if (data[key] instanceof Array) { if (data[key] instanceof Array) {
data[key] = []; data[key] = []
} else if (data[key] instanceof Object) { } else if (data[key] instanceof Object) {
this.clearData(data[key]); this.clearData(data[key])
} else { } else {
data[key] = ""; data[key] = ''
} }
} }
}, },
init(id, isDetail) { init(id, isDetail) {
this.dataForm.id = id || 0; this.dataForm.id = id || 0
this.visible = true; this.visible = true
this.isDetail = isDetail || false; this.isDetail = isDetail || false
this.$nextTick(() => { this.$nextTick(() => {
this.$refs['elForm'].resetFields(); this.$refs['elForm'].resetFields()
if(this.dataForm.id){ if (this.dataForm.id) {
this.loading = true this.loading = true
request({ request({
url: '/api/invoices/Invoices/'+this.dataForm.id, url: '/api/invoices/Invoices/' + this.dataForm.id,
method: 'get' method: 'get'
}).then(res => { }).then(res => {
this.dataInfo(res.data) this.dataInfo(res.data)
this.loading = false this.loading = false
}); })
}else{ } else {
this.clearData(this.dataForm) this.clearData(this.dataForm)
} }
}); })
this.$store.commit('generator/UPDATE_RELATION_DATA', {}) this.$store.commit('generator/UPDATE_RELATION_DATA', {})
}, },
// //
@ -319,7 +347,7 @@
}) })
}, },
request() { request() {
var _data =this.dataList() var _data = this.dataList()
if (!this.dataForm.id) { if (!this.dataForm.id) {
request({ request({
url: '/api/invoices/Invoices', url: '/api/invoices/Invoices',
@ -336,9 +364,9 @@
} }
}) })
}) })
}else{ } else {
request({ request({
url: '/api/invoices/Invoices/'+this.dataForm.id, url: '/api/invoices/Invoices/' + this.dataForm.id,
method: 'PUT', method: 'PUT',
data: _data data: _data
}).then((res) => { }).then((res) => {
@ -354,34 +382,34 @@
}) })
} }
}, },
addinvoices_item0List(){ addinvoices_item0List() {
let item = { let item = {
invoiceCode:undefined, invoiceCode: undefined,
invoiceNo:undefined, invoiceNo: undefined,
invoiceStatus:undefined, invoiceStatus: undefined,
creatorUserName:undefined, creatorUserName: undefined,
invoicingDate:undefined, invoicingDate: undefined
} }
this.dataForm.invoices_item0List.push(item) this.dataForm.invoices_item0List.push(item)
}, },
delinvoices_item0List(index) { delinvoices_item0List(index) {
this.dataForm.invoices_item0List.splice(index, 1); this.dataForm.invoices_item0List.splice(index, 1)
}, },
dataList(){ dataList() {
var _data = JSON.parse(JSON.stringify(this.dataForm)); var _data = JSON.parse(JSON.stringify(this.dataForm))
for(let i=0;i<_data.invoices_item0List.length;i++){ for (let i = 0; i < _data.invoices_item0List.length; i++) {
var _list = _data.invoices_item0List[i]; var _list = _data.invoices_item0List[i]
} }
return _data; return _data
}, },
dataInfo(dataAll){ dataInfo(dataAll) {
let _dataAll =dataAll let _dataAll = dataAll
for(let i=0;i<_dataAll.invoices_item0List.length;i++){ for (let i = 0; i < _dataAll.invoices_item0List.length; i++) {
var _list = _dataAll.invoices_item0List[i]; var _list = _dataAll.invoices_item0List[i]
} }
this.dataForm = _dataAll this.dataForm = _dataAll
}, }
}, }
} }
</script> </script>

@ -1,4 +1,4 @@
<template> <template>
<div class="JNPF-common-layout"> <div class="JNPF-common-layout">
<div class="JNPF-common-layout-center"> <div class="JNPF-common-layout-center">
@ -6,7 +6,7 @@
<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">
@ -22,9 +22,18 @@
<div> <div>
<el-button type="primary" icon="el-icon-plus" @click="addOrUpdateHandle()"> <el-button type="primary" 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="">编辑
</el-button> </el-button>
<el-button type="text" icon="el-icon-delete" @click="handleBatchRemoveDel()" >批量删除 <el-button type="text" icon="el-icon-download" @click="">查看
</el-button>
<el-button type="text" icon="el-icon-download" @click="">审核
</el-button>
<el-button type="text" icon="el-icon-download" @click="">弃审
</el-button>
<el-button type="text" icon="el-icon-download" @click="">提交
</el-button>
<el-button type="text" icon="el-icon-delete" @click="handleBatchRemoveDel()">
</el-button> </el-button>
</div> </div>
<div class="JNPF-common-head-right"> <div class="JNPF-common-head-right">
@ -35,54 +44,70 @@
<screenfull isContainer/> <screenfull isContainer/>
</div> </div>
</div> </div>
<JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange' has-c @selection-change="handleSelectionChange"> <JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange' has-c :hasNO="false"
<el-table-column prop="businessDate" label="业务日期" width="0" align="left" @selection-change="handleSelectionChange" border>
/> <el-table-column type="index" width="50" label="序号" fixed="left" align="center" />
<el-table-column prop="documentNo" label="单据编号" width="0" align="left" <el-table-column prop="businessDate" label="业务日期" width="120" align="center" fixed="left" sortable
/> />
<el-table-column prop="amount" label="金额" width="0" align="left" <el-table-column prop="documentNo" label="单据编号" width="200" align="center" fixed="left" sortable
/> />
<el-table-column prop="quantity" label="数量" width="0" align="left" <el-table-column prop="amount" label="金额" width="150" align="center" sortable
/> />
<el-table-column label="币别 " width="0" prop="currency" algin="left" <el-table-column prop="quantity" label="数量" width="120" align="center" sortable
> />
<el-table-column label="币别 " width="120" prop="currency" algin="center" sortable
>
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.currency | dynamicText(currencyOptions) }} {{ scope.row.currency | dynamicText(currencyOptions) }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="invoiceAmount" label="发票金额" width="0" align="left" <el-table-column prop="invoiceAmount" label="发票金额" width="150" align="center" sortable
/> />
<el-table-column prop="invoiceQuantity" label="发票数量" width="0" align="left" <el-table-column prop="invoiceQuantity" label="发票数量" width="120" align="center" sortable
/> />
<el-table-column label="发票类型" width="0" prop="invoiceType" algin="left" <el-table-column label="发票类型" width="120" prop="invoiceType" algin="center" sortable
> >
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.invoiceType | dynamicText(invoiceTypeOptions) }} {{ scope.row.invoiceType | dynamicText(invoiceTypeOptions) }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="单据状态" width="0" prop="status" algin="left" <el-table-column label="单据状态" width="120" prop="status" algin="center" sortable
> >
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.status | dynamicText(statusOptions) }} {{ scope.row.status | dynamicText(statusOptions) }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="creatorUserName" label="制单人" width="0" align="left" <el-table-column prop="creatorUserName" label="制单人" width="120" align="center" sortable
/> />
<el-table-column label="操作" fixed="right" <el-table-column label="操作" fixed="right"
width="150" > width="200">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" <el-button type="text"
@click="addOrUpdateHandle(scope.row.id)" >编辑 @click="addOrUpdateHandle(scope.row.id)">编辑
</el-button> </el-button>
<el-button type="text" class="JNPF-table-delBtn" @click="handleDel(scope.row.id)"> <el-button type="text" class="JNPF-table-delBtn" @click="handleDel(scope.row.id)">
</el-button> </el-button>
<el-button type="text" <el-button type="text"
@click="goDetail(scope.row.id)">详情 @click="goDetail(scope.row.id)">详情
</el-button> </el-button>
<el-button type="text"
@click="">撤回申请
</el-button>
<el-button type="text"
@click="">审核
</el-button>
<el-button type="text"
@click="">弃审
</el-button>
<el-button type="text"
@click="">提交
</el-button>
</template> </template>
</el-table-column> </el-table-column>
</JNPF-table> </JNPF-table>
<pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize" @pagination="initData"/> <pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize"
@pagination="initData"/>
</div> </div>
</div> </div>
<JNPF-Form v-if="formVisible" ref="JNPFForm" @refresh="refresh"/> <JNPF-Form v-if="formVisible" ref="JNPFForm" @refresh="refresh"/>
@ -93,19 +118,19 @@ width="150" >
<script> <script>
import request from '@/utils/request' import request from '@/utils/request'
import {getDictionaryDataSelector} from '@/api/systemData/dictionary' import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
import JNPFForm from './Form' import JNPFForm from './Form'
import ExportBox from './ExportBox' import ExportBox from './ExportBox'
import {getDataInterfaceRes} from '@/api/systemData/dataInterface' import { getDataInterfaceRes } from '@/api/systemData/dataInterface'
import Detail from './Detail' import Detail from './Detail'
export default { export default {
components: {JNPFForm, ExportBox,Detail}, components: { JNPFForm, ExportBox, Detail },
data() { data() {
return { return {
detailVisible: false, detailVisible: false,
query: { query: {
documentNo:undefined, documentNo: undefined
}, },
treeProps: { treeProps: {
children: 'children', children: 'children',
@ -118,29 +143,38 @@ width="150" >
listQuery: { listQuery: {
currentPage: 1, currentPage: 1,
pageSize: 20, pageSize: 20,
sort: "desc", sort: 'desc',
sidx: "", sidx: ''
}, },
formVisible: false, formVisible: false,
exportBoxVisible: false, exportBoxVisible: false,
columnList: [ columnList: [
{prop: 'businessDate', label: '业务日期'}, { prop: 'businessDate', label: '业务日期' },
{prop: 'documentNo', label: '单据编号'}, { prop: 'documentNo', label: '单据编号' },
{prop: 'amount', label: '金额'}, { prop: 'amount', label: '金额' },
{prop: 'quantity', label: '数量'}, { prop: 'quantity', label: '数量' },
{prop: 'currency', label: '币别 '}, { prop: 'currency', label: '币别 ' },
{prop: 'invoiceAmount', label: '发票金额'}, { prop: 'invoiceAmount', label: '发票金额' },
{prop: 'invoiceQuantity', label: '发票数量'}, { prop: 'invoiceQuantity', label: '发票数量' },
{prop: 'invoiceType', label: '发票类型'}, { prop: 'invoiceType', label: '发票类型' },
{prop: 'status', label: '单据状态'}, { prop: 'status', label: '单据状态' },
{prop: 'creatorUserName', label: '制单人'}, { prop: 'creatorUserName', label: '制单人' }
], ],
invoiceTypeOptions:[{"fullName":"普通增值税发票","id":"1"},{"fullName":"专用增值税发票","id":"2"},{"fullName":"增值税电子普通发票","id":"3"},{"fullName":"增值税电子发票","id":"4"}], invoiceTypeOptions: [{ 'fullName': '普通增值税发票', 'id': '1' }, {
invoiceTypeProps:{"label":"fullName","value":"id"}, 'fullName': '专用增值税发票',
currencyOptions:[{"fullName":"人民币","id":"0"},{"fullName":"美元","id":"1"},{"fullName":"英镑","id":"2"}], 'id': '2'
currencyProps:{"label":"fullName","value":"id"}, }, { 'fullName': '增值税电子普通发票', 'id': '3' }, { 'fullName': '增值税电子发票', 'id': '4' }],
statusOptions:[{"fullName":"已保存","id":"0"},{"fullName":"审批中","id":"1"},{"fullName":"已审批","id":"2"}], invoiceTypeProps: { 'label': 'fullName', 'value': 'id' },
statusProps:{"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: { computed: {
@ -152,32 +186,38 @@ width="150" >
this.initData() this.initData()
}, },
methods: { methods: {
goDetail(id){ goDetail(id) {
this.detailVisible = true this.detailVisible = true
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.Detail.init(id) this.$refs.Detail.init(id)
}) })
}, },
sortChange({column, prop, order}) { sortChange({ column, prop, order }) {
this.listQuery.sort = order == 'ascending' ? 'asc' : 'desc' this.listQuery.sort = order == 'ascending' ? 'asc' : 'desc'
this.listQuery.sidx = !order ? '' : prop this.listQuery.sidx = !order ? '' : prop
this.initData() this.initData()
}, },
initData() { initData() {
this.listLoading = true; this.listLoading = true
let _query = { let _query = {
...this.listQuery, ...this.listQuery,
...this.query, ...this.query,
menuId:this.menuId menuId: this.menuId
}; }
request({ request({
url: `/api/invoices/Invoices/getList`, url: `/api/invoices/Invoices/getList`,
method: 'post', method: 'post',
data: _query data: _query
}).then(res => { }).then(res => {
var _list =[]; var _list = []
for(let i=0;i<res.data.list.length;i++){ for (let i = 0; i < res.data.list.length; i++) {
let _data = res.data.list[i];
res.data.list[i].creatorTime = res.data.list[i].creatorTime ? res.data.list[i].creatorTime.substring(0,
10) : '';
res.data.list[i].businessDate = res.data.list[i].businessDate ? res.data.list[i].businessDate
.substring(0, 10) : '';
let _data = res.data.list[i]
_list.push(_data) _list.push(_data)
} }
this.list = _list this.list = _list
@ -200,10 +240,10 @@ width="150" >
onClose: () => { onClose: () => {
this.initData() this.initData()
} }
}); })
}) })
}).catch(() => { }).catch(() => {
}); })
}, },
handleSelectionChange(val) { handleSelectionChange(val) {
const res = val.map(item => item.id) const res = val.map(item => item.id)
@ -214,7 +254,7 @@ width="150" >
this.$message({ this.$message({
type: 'error', type: 'error',
message: '请选择一条数据', message: '请选择一条数据',
duration: 1500, duration: 1500
}) })
return return
} }
@ -232,7 +272,7 @@ width="150" >
onClose: () => { onClose: () => {
this.initData() this.initData()
} }
}); })
}) })
}).catch(() => { }).catch(() => {
}) })
@ -250,7 +290,7 @@ width="150" >
}) })
}, },
download(data) { download(data) {
let query = {...data, ...this.listQuery, ...this.query,menuId:this.menuId} let query = { ...data, ...this.listQuery, ...this.query, menuId: this.menuId }
request({ request({
url: `/api/invoices/Invoices/Actions/Export`, url: `/api/invoices/Invoices/Actions/Export`,
method: 'GET', method: 'GET',
@ -266,8 +306,8 @@ width="150" >
this.listQuery = { this.listQuery = {
currentPage: 1, currentPage: 1,
pageSize: 20, pageSize: 20,
sort: "desc", sort: 'desc',
sidx: "", sidx: ''
} }
this.initData() this.initData()
}, },

@ -2,7 +2,7 @@
<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 :visible.sync="visible" class="JNPF-dialog JNPF-dialog_center" lock-scroll
width="800px"> width="1500px">
<el-row :gutter="15" class=""> <el-row :gutter="15" class="">
<el-form ref="elForm" :model="dataForm" :rules="rules" size="small" label-width="100px" label-position="right"> <el-form ref="elForm" :model="dataForm" :rules="rules" size="small" label-width="100px" label-position="right">
<template v-if="!loading"> <template v-if="!loading">

@ -6,7 +6,7 @@
<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.mName" placeholder="请输入" clearable> </el-input> <el-input v-model="query.mName" placeholder="请输入" clearable></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
@ -32,9 +32,13 @@
<div> <div>
<el-button type="primary" icon="el-icon-plus" @click="addOrUpdateHandle()"> <el-button type="primary" 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-download" @click="">导入
</el-button>
<el-button type="text" icon="el-icon-download" @click="">编辑
</el-button>
<el-button type="text" icon="el-icon-delete" @click="handleBatchRemoveDel()">
</el-button> </el-button>
</div> </div>
<div class="JNPF-common-head-right"> <div class="JNPF-common-head-right">
@ -45,39 +49,42 @@
<screenfull isContainer/> <screenfull isContainer/>
</div> </div>
</div> </div>
<JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange' has-c @selection-change="handleSelectionChange"> <JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange' has-c :hasNO="false"
<el-table-column prop="mName" label="设备名称" width="0" align="left" @selection-change="handleSelectionChange" border>
/> <el-table-column type="index" width="50" label="序号" fixed="left" align="center" />
<el-table-column prop="serialnumber" label="设备序列号" width="0" align="left" <el-table-column prop="mName" label="设备名称" width="300" align="center" sortable fixed="left"
/> />
<el-table-column prop="monitoringId" label="区域" width="0" align="left" <el-table-column prop="serialnumber" label="设备序列号" width="300" align="center" sortable fixed="left"
/> />
<el-table-column label="设备状态:" width="0" prop="mStatus" algin="left" <el-table-column prop="monitoringId" label="区域" width="200" align="center" sortable
> />
<el-table-column label="设备状态:" width="200" prop="mStatus" algin="center" sortable
>
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.mStatus | dynamicText(mStatusOptions) }} {{ scope.row.mStatus | dynamicText(mStatusOptions) }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="channelNumber" label="设备通道号" width="0" align="left" <el-table-column prop="channelNumber" label="设备通道号" width="200" align="center" sortable
/> />
<el-table-column label="是否显示" width="0" prop="isEnable" algin="left" <el-table-column label="是否显示" width="200" prop="isEnable" algin="center" sortable
> >
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.isEnable | dynamicText(isEnableOptions) }} {{ scope.row.isEnable | dynamicText(isEnableOptions) }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" fixed="right" <el-table-column label="操作" fixed="right"
width="100" > width="100">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" <el-button type="text"
@click="addOrUpdateHandle(scope.row.id)" >编辑 @click="addOrUpdateHandle(scope.row.id)">编辑
</el-button> </el-button>
<el-button type="text" class="JNPF-table-delBtn" @click="handleDel(scope.row.id)"> <el-button type="text" class="JNPF-table-delBtn" @click="handleDel(scope.row.id)">
</el-button> </el-button>
</template> </template>
</el-table-column> </el-table-column>
</JNPF-table> </JNPF-table>
<pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize" @pagination="initData"/> <pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize"
@pagination="initData"/>
</div> </div>
</div> </div>
<JNPF-Form v-if="formVisible" ref="JNPFForm" @refresh="refresh"/> <JNPF-Form v-if="formVisible" ref="JNPFForm" @refresh="refresh"/>
@ -88,20 +95,20 @@
<script> <script>
import request from '@/utils/request' import request from '@/utils/request'
import {getDictionaryDataSelector} from '@/api/systemData/dictionary' import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
import JNPFForm from './Form' import JNPFForm from './Form'
import ExportBox from './ExportBox' import ExportBox from './ExportBox'
import {getDataInterfaceRes} from '@/api/systemData/dataInterface' import { getDataInterfaceRes } from '@/api/systemData/dataInterface'
import Detail from './Detail' import Detail from './Detail'
export default { export default {
components: {JNPFForm, ExportBox,Detail}, components: { JNPFForm, ExportBox, Detail },
data() { data() {
return { return {
detailVisible: false, detailVisible: false,
query: { query: {
mName:undefined, mName: undefined,
monitoringId:undefined, monitoringId: undefined
}, },
treeProps: { treeProps: {
children: 'children', children: 'children',
@ -114,25 +121,25 @@
listQuery: { listQuery: {
currentPage: 1, currentPage: 1,
pageSize: 20, pageSize: 20,
sort: "desc", sort: 'desc',
sidx: "creatorTime", sidx: 'creatorTime'
}, },
formVisible: false, formVisible: false,
exportBoxVisible: false, exportBoxVisible: false,
columnList: [ columnList: [
{prop: 'mName', label: '设备名称'}, { prop: 'mName', label: '设备名称' },
{prop: 'serialnumber', label: '设备序列号'}, { prop: 'serialnumber', label: '设备序列号' },
{prop: 'monitoringId', label: '区域'}, { prop: 'monitoringId', label: '区域' },
{prop: 'mStatus', label: '设备状态:'}, { prop: 'mStatus', label: '设备状态:' },
{prop: 'channelNumber', label: '设备通道号'}, { prop: 'channelNumber', label: '设备通道号' },
{prop: 'isEnable', label: '是否显示'}, { prop: 'isEnable', label: '是否显示' }
], ],
monitoringIdOptions:[], monitoringIdOptions: [],
monitoringIdProps:{"label":"m_name","value":"id"}, monitoringIdProps: { 'label': 'm_name', 'value': 'id' },
mStatusOptions:[{"fullName":"在线","id":"1"},{"fullName":"不在线","id":"0"}], mStatusOptions: [{ 'fullName': '在线', 'id': '1' }, { 'fullName': '不在线', 'id': '0' }],
mStatusProps:{"label":"fullName","value":"id"}, mStatusProps: { 'label': 'fullName', 'value': 'id' },
isEnableOptions:[{"fullName":"显示","id":"1"},{"fullName":"不显示","id":"0"}], isEnableOptions: [{ 'fullName': '显示', 'id': '1' }, { 'fullName': '不显示', 'id': '0' }],
isEnableProps:{"label":"fullName","value":"id"}, isEnableProps: { 'label': 'fullName', 'value': 'id' }
} }
}, },
computed: { computed: {
@ -142,7 +149,7 @@
}, },
created() { created() {
this.initData() this.initData()
this.getmonitoringIdOptions(); this.getmonitoringIdOptions()
}, },
methods: { methods: {
getmonitoringIdOptions() { getmonitoringIdOptions() {
@ -151,32 +158,33 @@
this.monitoringIdOptions = data this.monitoringIdOptions = data
}) })
}, },
goDetail(id){ goDetail(id) {
this.detailVisible = true this.detailVisible = true
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.Detail.init(id) this.$refs.Detail.init(id)
}) })
}, },
sortChange({column, prop, order}) { sortChange({ column, prop, order }) {
this.listQuery.sort = order == 'ascending' ? 'asc' : 'desc' this.listQuery.sort = order == 'ascending' ? 'asc' : 'desc'
this.listQuery.sidx = !order ? '' : prop this.listQuery.sidx = !order ? '' : prop
this.initData() this.initData()
}, },
initData() { initData() {
this.listLoading = true; this.listLoading = true
let _query = { let _query = {
...this.listQuery, ...this.listQuery,
...this.query, ...this.query,
menuId:this.menuId menuId: this.menuId
}; }
request({ request({
url: `/api/example/Monitoringitem/getList`, url: `/api/example/Monitoringitem/getList`,
method: 'post', method: 'post',
data: _query data: _query
}).then(res => { }).then(res => {
var _list =[]; var _list = []
for(let i=0;i<res.data.list.length;i++){ for (let i = 0; i < res.data.list.length; i++) {
let _data = res.data.list[i]; res.data.list[i].creatorTime = res.data.list[i].creatorTime ? res.data.list[i].creatorTime.substring(0, 10) : '';
let _data = res.data.list[i]
_list.push(_data) _list.push(_data)
} }
this.list = _list this.list = _list
@ -199,10 +207,10 @@
onClose: () => { onClose: () => {
this.initData() this.initData()
} }
}); })
}) })
}).catch(() => { }).catch(() => {
}); })
}, },
handleSelectionChange(val) { handleSelectionChange(val) {
const res = val.map(item => item.id) const res = val.map(item => item.id)
@ -213,7 +221,7 @@
this.$message({ this.$message({
type: 'error', type: 'error',
message: '请选择一条数据', message: '请选择一条数据',
duration: 1500, duration: 1500
}) })
return return
} }
@ -231,7 +239,7 @@
onClose: () => { onClose: () => {
this.initData() this.initData()
} }
}); })
}) })
}).catch(() => { }).catch(() => {
}) })
@ -249,7 +257,7 @@
}) })
}, },
download(data) { download(data) {
let query = {...data, ...this.listQuery, ...this.query,menuId:this.menuId} let query = { ...data, ...this.listQuery, ...this.query, menuId: this.menuId }
request({ request({
url: `/api/example/Monitoringitem/Actions/Export`, url: `/api/example/Monitoringitem/Actions/Export`,
method: 'GET', method: 'GET',
@ -265,8 +273,8 @@
this.listQuery = { this.listQuery = {
currentPage: 1, currentPage: 1,
pageSize: 20, pageSize: 20,
sort: "desc", sort: 'desc',
sidx: "creatorTime", sidx: 'creatorTime'
} }
this.initData() this.initData()
}, },

@ -1,65 +1,66 @@
<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 :visible.sync="visible" class="JNPF-dialog JNPF-dialog_center" lock-scroll
width="600px"> width="800px">
<el-row :gutter="15" class=""> <el-row :gutter="15" class="">
<el-form ref="elForm" :model="dataForm" :rules="rules" size="small" label-width="100px" label-position="right" > <el-form ref="elForm" :model="dataForm" :rules="rules" size="small" label-width="100px" label-position="right">
<template v-if="!loading"> <template v-if="!loading">
<el-col :span="24" > <el-col :span="24">
<el-form-item label-width="0"> <el-form-item label-width="0">
<JNPF-Text :style='{"width":"100%"}' <JNPF-Text :style='{"width":"100%"}'
:textStyle='{"color":"#000000","font-weight":"normal","text-decoration":"none","font-size":18,"line-height":32,"font-style":"normal","text-align":"left"}' value="自然人档案"> :textStyle='{"color":"#000000","font-weight":"normal","text-decoration":"none","font-size":18,"line-height":32,"font-style":"normal","text-align":"left"}'
value="自然人档案">
</JNPF-Text> </JNPF-Text>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="24" > <el-col :span="24">
<el-form-item label="姓名" <el-form-item label="姓名"
prop="name" > prop="name">
<el-input v-model="dataForm.name" <el-input v-model="dataForm.name"
placeholder="请输入姓名" clearable :style='{"width":"100%"}'> placeholder="请输入姓名" clearable :style='{"width":"100%"}'>
</el-input> </el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="24" > <el-col :span="24">
<el-form-item label="地址" <el-form-item label="地址"
prop="adress" > prop="adress">
<el-input v-model="dataForm.adress" <el-input v-model="dataForm.adress"
placeholder="请输入地址" clearable :style='{"width":"100%"}'> placeholder="请输入地址" clearable :style='{"width":"100%"}'>
</el-input> </el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="24" > <el-col :span="24">
<el-form-item label="手机号" <el-form-item label="手机号"
prop="contact" > prop="contact">
<el-input v-model="dataForm.contact" <el-input v-model="dataForm.contact"
placeholder="请输入手机号" clearable :style='{"width":"100%"}'> 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="creatorUserName" > <!-- prop="creatorUserName">-->
<el-input v-model="dataForm.creatorUserName" <!-- <el-input v-model="dataForm.creatorUserName"-->
placeholder="请输入录入人" clearable :style='{"width":"100%"}'> <!-- 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="creatorTime" > <!-- prop="creatorTime">-->
<el-input v-model="dataForm.creatorTime" <!-- <el-input v-model="dataForm.creatorTime"-->
placeholder="系统自动生成" readonly > <!-- placeholder="系统自动生成" readonly>-->
</el-input> <!-- </el-input>-->
</el-form-item> <!-- </el-form-item>-->
</el-col> <!-- </el-col>-->
</template> </template>
</el-form> </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>
@ -71,6 +72,7 @@
import request from '@/utils/request' import request from '@/utils/request'
import { getDataInterfaceRes } from '@/api/systemData/dataInterface' import { getDataInterfaceRes } from '@/api/systemData/dataInterface'
import { getDictionaryDataSelector } from '@/api/systemData/dictionary' import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
export default { export default {
components: {}, components: {},
props: [], props: [],
@ -80,11 +82,11 @@
loading: false, loading: false,
isDetail: false, isDetail: false,
dataForm: { dataForm: {
name : '', name: '',
adress : '', adress: '',
contact : '', contact: '',
creatorUserName : '', creatorUserName: '',
creatorTime : "", creatorTime: ''
}, },
rules: rules:
{ {
@ -93,9 +95,9 @@
required: true, required: true,
message: '请输入姓名', message: '请输入姓名',
trigger: 'blur' trigger: 'blur'
}, }
], ]
}, }
} }
}, },
@ -103,38 +105,39 @@
watch: {}, watch: {},
created() { created() {
}, },
mounted() {}, mounted() {
},
methods: { methods: {
clearData(data){ clearData(data) {
for (let key in data) { for (let key in data) {
if (data[key] instanceof Array) { if (data[key] instanceof Array) {
data[key] = []; data[key] = []
} else if (data[key] instanceof Object) { } else if (data[key] instanceof Object) {
this.clearData(data[key]); this.clearData(data[key])
} else { } else {
data[key] = ""; data[key] = ''
} }
} }
}, },
init(id, isDetail) { init(id, isDetail) {
this.dataForm.id = id || 0; this.dataForm.id = id || 0
this.visible = true; this.visible = true
this.isDetail = isDetail || false; this.isDetail = isDetail || false
this.$nextTick(() => { this.$nextTick(() => {
this.$refs['elForm'].resetFields(); this.$refs['elForm'].resetFields()
if(this.dataForm.id){ if (this.dataForm.id) {
this.loading = true this.loading = true
request({ request({
url: '/api/example/Jg_natural/'+this.dataForm.id, url: '/api/example/Jg_natural/' + this.dataForm.id,
method: 'get' method: 'get'
}).then(res => { }).then(res => {
this.dataInfo(res.data) this.dataInfo(res.data)
this.loading = false this.loading = false
}); })
}else{ } else {
this.clearData(this.dataForm) this.clearData(this.dataForm)
} }
}); })
this.$store.commit('generator/UPDATE_RELATION_DATA', {}) this.$store.commit('generator/UPDATE_RELATION_DATA', {})
}, },
// //
@ -146,7 +149,7 @@
}) })
}, },
request() { request() {
var _data =this.dataList() var _data = this.dataList()
if (!this.dataForm.id) { if (!this.dataForm.id) {
request({ request({
url: '/api/example/Jg_natural', url: '/api/example/Jg_natural',
@ -163,9 +166,9 @@
} }
}) })
}) })
}else{ } else {
request({ request({
url: '/api/example/Jg_natural/'+this.dataForm.id, url: '/api/example/Jg_natural/' + this.dataForm.id,
method: 'PUT', method: 'PUT',
data: _data data: _data
}).then((res) => { }).then((res) => {
@ -181,15 +184,15 @@
}) })
} }
}, },
dataList(){ dataList() {
var _data = JSON.parse(JSON.stringify(this.dataForm)); var _data = JSON.parse(JSON.stringify(this.dataForm))
return _data; return _data
}, },
dataInfo(dataAll){ dataInfo(dataAll) {
let _dataAll =dataAll let _dataAll = dataAll
this.dataForm = _dataAll this.dataForm = _dataAll
}, }
}, }
} }
</script> </script>

@ -6,12 +6,12 @@
<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.name" placeholder="请输入" clearable> </el-input> <el-input v-model="query.name" 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-input v-model="query.contact" placeholder="请输入" clearable> </el-input> <el-input v-model="query.contact" placeholder="请输入" clearable></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
@ -27,9 +27,11 @@
<div> <div>
<el-button type="primary" icon="el-icon-plus" @click="addOrUpdateHandle()"> <el-button type="primary" 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-download" @click="">导入
</el-button>
<el-button type="text" icon="el-icon-delete" @click="handleBatchRemoveDel()">
</el-button> </el-button>
</div> </div>
<div class="JNPF-common-head-right"> <div class="JNPF-common-head-right">
@ -40,29 +42,32 @@
<screenfull isContainer/> <screenfull isContainer/>
</div> </div>
</div> </div>
<JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange' has-c @selection-change="handleSelectionChange"> <JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange' has-c :hasNO="false"
<el-table-column prop="name" label="姓名" width="0" align="left" @selection-change="handleSelectionChange" border>
/> <el-table-column type="index" width="50" label="序号" fixed="left" align="center" />
<el-table-column prop="adress" label="地址" width="0" align="left" <el-table-column prop="name" label="姓名" width="300" align="center" fixed="left" sortable
/> />
<el-table-column prop="contact" label="手机号" width="0" align="left" <el-table-column prop="adress" label="地址" width="300" align="center" sortable
/> />
<el-table-column prop="creatorUserName" label="录入人" width="0" align="left" <el-table-column prop="contact" label="手机号" width="300" align="center" sortable
/> />
<el-table-column prop="creatorTime" label="创建时间" width="0" align="left" <el-table-column prop="creatorUserName" label="录入人" width="300" align="center" sortable
/> />
<el-table-column prop="creatorTime" label="创建时间" width="300" align="center" sortable
/>
<el-table-column label="操作" fixed="right" <el-table-column label="操作" fixed="right"
width="100" > width="100">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" <el-button type="text"
@click="addOrUpdateHandle(scope.row.id)" >编辑 @click="addOrUpdateHandle(scope.row.id)">编辑
</el-button> </el-button>
<el-button type="text" class="JNPF-table-delBtn" @click="handleDel(scope.row.id)"> <el-button type="text" class="JNPF-table-delBtn" @click="handleDel(scope.row.id)">
</el-button> </el-button>
</template> </template>
</el-table-column> </el-table-column>
</JNPF-table> </JNPF-table>
<pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize" @pagination="initData"/> <pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize"
@pagination="initData"/>
</div> </div>
</div> </div>
<JNPF-Form v-if="formVisible" ref="JNPFForm" @refresh="refresh"/> <JNPF-Form v-if="formVisible" ref="JNPFForm" @refresh="refresh"/>
@ -73,20 +78,20 @@
<script> <script>
import request from '@/utils/request' import request from '@/utils/request'
import {getDictionaryDataSelector} from '@/api/systemData/dictionary' import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
import JNPFForm from './Form' import JNPFForm from './Form'
import ExportBox from './ExportBox' import ExportBox from './ExportBox'
import {getDataInterfaceRes} from '@/api/systemData/dataInterface' import { getDataInterfaceRes } from '@/api/systemData/dataInterface'
import Detail from './Detail' import Detail from './Detail'
export default { export default {
components: {JNPFForm, ExportBox,Detail}, components: { JNPFForm, ExportBox, Detail },
data() { data() {
return { return {
detailVisible: false, detailVisible: false,
query: { query: {
name:undefined, name: undefined,
contact:undefined, contact: undefined
}, },
treeProps: { treeProps: {
children: 'children', children: 'children',
@ -99,18 +104,18 @@
listQuery: { listQuery: {
currentPage: 1, currentPage: 1,
pageSize: 20, pageSize: 20,
sort: "desc", sort: 'desc',
sidx: "creatorTime", sidx: 'creatorTime'
}, },
formVisible: false, formVisible: false,
exportBoxVisible: false, exportBoxVisible: false,
columnList: [ columnList: [
{prop: 'name', label: '姓名'}, { prop: 'name', label: '姓名' },
{prop: 'adress', label: '地址'}, { prop: 'adress', label: '地址' },
{prop: 'contact', label: '手机号'}, { prop: 'contact', label: '手机号' },
{prop: 'creatorUserName', label: '录入人'}, { prop: 'creatorUserName', label: '录入人' },
{prop: 'creatorTime', label: '创建时间'}, { prop: 'creatorTime', label: '创建时间' }
], ]
} }
}, },
computed: { computed: {
@ -122,32 +127,32 @@
this.initData() this.initData()
}, },
methods: { methods: {
goDetail(id){ goDetail(id) {
this.detailVisible = true this.detailVisible = true
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.Detail.init(id) this.$refs.Detail.init(id)
}) })
}, },
sortChange({column, prop, order}) { sortChange({ column, prop, order }) {
this.listQuery.sort = order == 'ascending' ? 'asc' : 'desc' this.listQuery.sort = order == 'ascending' ? 'asc' : 'desc'
this.listQuery.sidx = !order ? '' : prop this.listQuery.sidx = !order ? '' : prop
this.initData() this.initData()
}, },
initData() { initData() {
this.listLoading = true; this.listLoading = true
let _query = { let _query = {
...this.listQuery, ...this.listQuery,
...this.query, ...this.query,
menuId:this.menuId menuId: this.menuId
}; }
request({ request({
url: `/api/example/Jg_natural/getList`, url: `/api/example/Jg_natural/getList`,
method: 'post', method: 'post',
data: _query data: _query
}).then(res => { }).then(res => {
var _list =[]; var _list = []
for(let i=0;i<res.data.list.length;i++){ for (let i = 0; i < res.data.list.length; i++) {
let _data = res.data.list[i]; let _data = res.data.list[i]
_list.push(_data) _list.push(_data)
} }
this.list = _list this.list = _list
@ -170,10 +175,10 @@
onClose: () => { onClose: () => {
this.initData() this.initData()
} }
}); })
}) })
}).catch(() => { }).catch(() => {
}); })
}, },
handleSelectionChange(val) { handleSelectionChange(val) {
const res = val.map(item => item.id) const res = val.map(item => item.id)
@ -184,7 +189,7 @@
this.$message({ this.$message({
type: 'error', type: 'error',
message: '请选择一条数据', message: '请选择一条数据',
duration: 1500, duration: 1500
}) })
return return
} }
@ -202,7 +207,7 @@
onClose: () => { onClose: () => {
this.initData() this.initData()
} }
}); })
}) })
}).catch(() => { }).catch(() => {
}) })
@ -220,7 +225,7 @@
}) })
}, },
download(data) { download(data) {
let query = {...data, ...this.listQuery, ...this.query,menuId:this.menuId} let query = { ...data, ...this.listQuery, ...this.query, menuId: this.menuId }
request({ request({
url: `/api/example/Jg_natural/Actions/Export`, url: `/api/example/Jg_natural/Actions/Export`,
method: 'GET', method: 'GET',
@ -236,8 +241,8 @@
this.listQuery = { this.listQuery = {
currentPage: 1, currentPage: 1,
pageSize: 20, pageSize: 20,
sort: "desc", sort: 'desc',
sidx: "creatorTime", sidx: 'creatorTime'
} }
this.initData() this.initData()
}, },

@ -8,7 +8,7 @@
<el-col :span="8"> <el-col :span="8">
<el-form-item label="单据编号" prop="documentNo"> <el-form-item label="单据编号" prop="documentNo">
<el-input v-model="dataForm.documentNo" placeholder="请输入" clearable <el-input v-model="dataForm.documentNo" placeholder="请输入" clearable
:style='{"width":"100%"}'> :style='{"width":"100%"}' :disabled="true">
</el-input> </el-input>
</el-form-item> </el-form-item>
@ -17,7 +17,7 @@
<el-form-item label="采购订单" prop="purchaseOrderId"> <el-form-item label="采购订单" prop="purchaseOrderId">
<popupSelect v-model="dataForm.purchaseOrderId" placeholder="请选择" clearable <popupSelect v-model="dataForm.purchaseOrderId" placeholder="请选择" clearable
field="purchaseOrderId" interfaceId="383149471917185157" field="purchaseOrderId" interfaceId="383149471917185157"
:columnOptions="purchaseOrderIdcolumnOptions" propsValue="id" :columnOptions="purchaseOrderIdcolumnOptions" :excludeFields="excludeFields" propsValue="id"
relationField="document_no" popupType="dialog" popupTitle="选择数据" popupWidth="800px" @change="popupSelectChange"> relationField="document_no" popupType="dialog" popupTitle="选择数据" popupWidth="800px" @change="popupSelectChange">
</popupSelect> </popupSelect>
@ -35,14 +35,14 @@
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="退货金额" prop="refundAmount"> <el-form-item label="退货金额" prop="refundAmount">
<el-input v-model="dataForm.refundAmount" clearable :style='{"width":"100%"}'> <el-input v-model="dataForm.refundAmount" clearable :style='{"width":"100%"}' :disabled="true">
</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="退货数量" prop="refundNum"> <el-form-item label="退货数量" prop="refundNum">
<el-input v-model="dataForm.refundNum" clearable :style='{"width":"100%"}'> <el-input v-model="dataForm.refundNum" clearable :style='{"width":"100%"}' :disabled="true">
</el-input> </el-input>
</el-form-item> </el-form-item>
@ -68,7 +68,7 @@
<template slot-scope="scope"> <template slot-scope="scope">
<popupSelect v-model="scope.row.licenseNum" placeholder="请选择" <popupSelect v-model="scope.row.licenseNum" placeholder="请选择"
clearable :field="'licenseNum'+scope.$index" clearable :field="'licenseNum'+scope.$index"
interfaceId="383214061812227333" interfaceId="383214061812227333" :excludeFields="excludeFields"
:bissId="dataForm.purchaseOrderId" :bissId="dataForm.purchaseOrderId"
:columnOptions="purchaseback_item0licenseNumcolumnOptions" :columnOptions="purchaseback_item0licenseNumcolumnOptions"
propsValue="license_num" relationField="license_num" propsValue="license_num" relationField="license_num"
@ -187,6 +187,7 @@
data() { data() {
return { return {
bissId: '380716763022647941', bissId: '380716763022647941',
excludeFields: [],
formVisible: false, formVisible: false,
visible: false, visible: false,
loading: false, loading: false,
@ -324,7 +325,10 @@
mounted() {}, mounted() {},
methods: { methods: {
popupSelectChange2(a, b){ popupSelectChange2(a, b){
var excludeFields = [];
for (let i = 0; i < this.dataForm.purchaseback_item0List.length; i++) { for (let i = 0; i < this.dataForm.purchaseback_item0List.length; i++) {
excludeFields.push(this.dataForm.purchaseback_item0List[i].licenseNo);
if(a == this.dataForm.purchaseback_item0List[i].licenseNum){ if(a == this.dataForm.purchaseback_item0List[i].licenseNum){
this.dataForm.purchaseback_item0List[i].materialName = b.material_name; this.dataForm.purchaseback_item0List[i].materialName = b.material_name;
this.dataForm.purchaseback_item0List[i].settlement = b.settlement; this.dataForm.purchaseback_item0List[i].settlement = b.settlement;
@ -337,9 +341,12 @@
this.dataForm.purchaseback_item0List[i].pountType = b.pount_type; this.dataForm.purchaseback_item0List[i].pountType = b.pount_type;
} }
} }
this.excludeFields = excludeFields;
}, },
popupSelectChange(e,d){ popupSelectChange(e,d){
this.dataForm.currency = d.currency; this.dataForm.currency = d.currency;
this.excludeFields = [];
this.dataForm.receiptout_item0List = [];
}, },
purchaseback_item0Exist() { purchaseback_item0Exist() {
let isOk = true; let isOk = true;

@ -6,7 +6,7 @@
<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">
@ -22,6 +22,10 @@
<div> <div>
<el-button type="primary" icon="el-icon-plus" @click="addOrUpdateHandle()"> <el-button type="primary" icon="el-icon-plus" @click="addOrUpdateHandle()">
</el-button> </el-button>
<el-button type="text" icon="el-icon-download" @click="">编辑
</el-button>
<el-button type="text" icon="el-icon-download" @click="">查看
</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()">
@ -30,32 +34,33 @@
<div class="JNPF-common-head-right"> <div class="JNPF-common-head-right">
<el-tooltip effect="dark" content="刷新" placement="top"> <el-tooltip effect="dark" content="刷新" placement="top">
<el-link icon="icon-ym icon-ym-Refresh JNPF-common-head-icon" :underline="false" <el-link icon="icon-ym icon-ym-Refresh JNPF-common-head-icon" :underline="false"
@click="reset()" /> @click="reset()"/>
</el-tooltip> </el-tooltip>
<screenfull isContainer /> <screenfull isContainer/>
</div> </div>
</div> </div>
<JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange' has-c <JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange' has-c :hasNO="false"
@selection-change="handleSelectionChange"> @selection-change="handleSelectionChange" border>
<el-table-column prop="documentNo" label="单据编号" width="0" align="left" /> <el-table-column type="index" width="50" label="序号" fixed="left" align="center" />
<el-table-column prop="jg_purchaseorder.contractName" label="合同名称" width="0" align="left" /> <el-table-column prop="documentNo" label="单据编号" width="200" align="center"sortable fixed="left" />
<el-table-column prop="jg_purchaseorder.supplierName" label="供应商名称" width="0" align="left" /> <el-table-column prop="jg_purchaseorder.contractName" label="合同名称" width="200" align="center"sortable/>
<el-table-column prop="refundAmount" label="退货金额" width="0" align="left" /> <el-table-column prop="jg_purchaseorder.supplierName" label="供应商名称" width="200" align="center"sortable/>
<el-table-column prop="actualAmount" label="实退金额" width="0" align="left" /> <el-table-column prop="refundAmount" label="退货金额" width="120" align="center"sortable/>
<el-table-column label="币别 " width="0" prop="currency" algin="left"> <el-table-column prop="actualAmount" label="实退金额" width="120" align="center"sortable/>
<el-table-column label="币别 " width="120" prop="currency" algin="center" sortable>
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.currency | dynamicText(currencyOptions) }} {{ scope.row.currency | dynamicText(currencyOptions) }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="refundNum" label="退货数量" width="0" align="left" /> <el-table-column prop="refundNum" label="退货数量" width="120" align="center"sortable/>
<el-table-column label="单据状态 " width="0" prop="status" algin="left"> <el-table-column label="单据状态 " width="120" prop="status" algin="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.status | dynamicText(statusOptions) }} {{ scope.row.status | dynamicText(statusOptions) }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="creatorTime" label="创建时间" width="0" align="left" /> <el-table-column prop="creatorTime" label="创建时间" width="120" align="center"sortable/>
<el-table-column prop="creatorUserName" label="创建人" width="0" align="left" /> <el-table-column prop="creatorUserName" label="创建人" width="120" align="center"sortable/>
<el-table-column prop="remark" label="备注" width="0" align="left" /> <el-table-column prop="remark" label="备注" width="0" align="center"sortable/>
<el-table-column label="操作" fixed="right" width="150"> <el-table-column label="操作" fixed="right" width="150">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" @click="addOrUpdateHandle(scope.row.id)"> <el-button type="text" @click="addOrUpdateHandle(scope.row.id)">
@ -68,12 +73,12 @@
</el-table-column> </el-table-column>
</JNPF-table> </JNPF-table>
<pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize" <pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize"
@pagination="initData" /> @pagination="initData"/>
</div> </div>
</div> </div>
<JNPF-Form v-if="formVisible" ref="JNPFForm" @refresh="refresh" /> <JNPF-Form v-if="formVisible" ref="JNPFForm" @refresh="refresh"/>
<ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download" /> <ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download"/>
<Detail v-if="detailVisible" ref="Detail" @refresh="detailVisible=false" /> <Detail v-if="detailVisible" ref="Detail" @refresh="detailVisible=false"/>
</div> </div>
</template> </template>
@ -99,7 +104,7 @@
return { return {
detailVisible: false, detailVisible: false,
query: { query: {
documentNo: undefined, documentNo: undefined
}, },
treeProps: { treeProps: {
children: 'children', children: 'children',
@ -113,8 +118,8 @@
listQuery: { listQuery: {
currentPage: 1, currentPage: 1,
pageSize: 20, pageSize: 20,
sort: "desc", sort: 'desc',
sidx: "", sidx: ''
}, },
formVisible: false, formVisible: false,
exportBoxVisible: false, exportBoxVisible: false,
@ -161,36 +166,36 @@
{ {
prop: 'remark', prop: 'remark',
label: '备注' label: '备注'
}, }
], ],
currencyOptions: [{ currencyOptions: [{
"fullName": "人民币", 'fullName': '人民币',
"id": "0" 'id': '0'
}, { }, {
"fullName": "美元", 'fullName': '美元',
"id": "1" 'id': '1'
}, { }, {
"fullName": "英镑", 'fullName': '英镑',
"id": "2" 'id': '2'
}], }],
currencyProps: { currencyProps: {
"label": "fullName", 'label': 'fullName',
"value": "id" 'value': 'id'
}, },
statusOptions: [{ statusOptions: [{
"fullName": "已保存", 'fullName': '已保存',
"id": "0" 'id': '0'
}, { }, {
"fullName": "审批中", 'fullName': '审批中',
"id": "1" 'id': '1'
}, { }, {
"fullName": "已审批", 'fullName': '已审批',
"id": "2" 'id': '2'
}], }],
statusProps: { statusProps: {
"label": "fullName", 'label': 'fullName',
"value": "id" 'value': 'id'
}, }
} }
}, },
computed: { computed: {
@ -218,20 +223,23 @@
this.initData() this.initData()
}, },
initData() { initData() {
this.listLoading = true; this.listLoading = true
let _query = { let _query = {
...this.listQuery, ...this.listQuery,
...this.query, ...this.query,
menuId: this.menuId menuId: this.menuId
}; }
request({ request({
url: `/api/purchaseback/Purchaseback/getList`, url: `/api/purchaseback/Purchaseback/getList`,
method: 'post', method: 'post',
data: _query data: _query
}).then(res => { }).then(res => {
var _list = []; var _list = []
for (let i = 0; i < res.data.list.length; i++) { for (let i = 0; i < res.data.list.length; i++) {
let _data = res.data.list[i]; res.data.list[i].creatorTime = res.data.list[i].creatorTime ? res.data.list[i].creatorTime.substring(0,
10) : '';
let _data = res.data.list[i]
_list.push(_data) _list.push(_data)
} }
this.list = _list this.list = _list
@ -254,9 +262,10 @@
onClose: () => { onClose: () => {
this.initData() this.initData()
} }
});
}) })
}).catch(() => {}); })
}).catch(() => {
})
}, },
handleSelectionChange(val) { handleSelectionChange(val) {
const res = val.map(item => item.id) const res = val.map(item => item.id)
@ -267,7 +276,7 @@
this.$message({ this.$message({
type: 'error', type: 'error',
message: '请选择一条数据', message: '请选择一条数据',
duration: 1500, duration: 1500
}) })
return return
} }
@ -285,9 +294,10 @@
onClose: () => { onClose: () => {
this.initData() this.initData()
} }
});
}) })
}).catch(() => {}) })
}).catch(() => {
})
}, },
addOrUpdateHandle(id, isDetail) { addOrUpdateHandle(id, isDetail) {
this.formVisible = true this.formVisible = true
@ -323,8 +333,8 @@
this.listQuery = { this.listQuery = {
currentPage: 1, currentPage: 1,
pageSize: 20, pageSize: 20,
sort: "desc", sort: 'desc',
sidx: "", sidx: ''
} }
this.initData() this.initData()
}, },

@ -6,7 +6,7 @@
<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">
@ -22,14 +22,27 @@
<div> <div>
<el-button type="primary" icon="el-icon-plus" @click="addOrUpdateHandle()"> <el-button type="primary" 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-download" @click="">查看
</el-button> </el-button>
<el-button type="primary" icon="el-icon-plus" @click="pigeonhole()"> <el-button type="text" icon="el-icon-delete" @click="handleBatchRemoveDel()">
</el-button>
<el-button type="text" icon="el-icon-download" @click="">导入
</el-button>
<el-button type="text" icon="el-icon-download" @click="">开票文件下载
</el-button>
<el-button type="text" icon="el-icon-download" @click="">发票录入
</el-button>
<el-button type="text" icon="el-icon-download" @click="">入库
</el-button> </el-button>
<el-button type="primary" icon="el-icon-plus" @click="paymentApply()"> <el-button type="primary" icon="el-icon-plus" @click="paymentApply()">
</el-button> </el-button>
<el-button type="primary" icon="el-icon-plus" @click="pigeonhole()">
</el-button>
<el-button type="text" icon="el-icon-download" @click="">转销售
</el-button>
</div> </div>
<div class="JNPF-common-head-right"> <div class="JNPF-common-head-right">
<el-tooltip effect="dark" content="刷新" placement="top"> <el-tooltip effect="dark" content="刷新" placement="top">
@ -39,57 +52,64 @@
<screenfull isContainer/> <screenfull isContainer/>
</div> </div>
</div> </div>
<JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange' has-c @selection-change="handleSelectionChange"> <JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange' has-c :hasNO="false"
<el-table-column prop="documentNo" label="单据编号" width="0" align="left" @selection-change="handleSelectionChange" border>
/> <el-table-column type="index" width="50" label="序号" fixed="left" align="center" />
<el-table-column prop="erpNo" label="ERP订单号" width="0" align="left" <el-table-column prop="documentNo" label="单据编号" width="200" align="center" fixed="left" sortable
/> />
<el-table-column prop="contractName" label="合同名称" width="0" align="left" <el-table-column prop="erpNo" label="ERP订单号" width="200" align="center" fixed="left" sortable
/> />
<el-table-column prop="supplierName" label="供应商名称" width="0" align="left" <el-table-column prop="contractName" label="合同名称" width="120" align="center" fixed="left" sortable
/> />
<el-table-column prop="amount" label="金额" width="0" align="left" <el-table-column prop="supplierName" label="供应商名称" width="220" align="center" sortable
/> />
<el-table-column prop="num" label="重量" width="0" align="left" <el-table-column prop="amount" label="金额" width="120" align="center" sortable
/> />
<el-table-column label="币种" width="0" prop="currency" algin="left" <el-table-column prop="num" label="重量" width="120" align="center" sortable
> />
<el-table-column label="币种" width="80" prop="currency" algin="center" sortable
>
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.currency | dynamicText(currencyOptions) }} {{ scope.row.currency | dynamicText(currencyOptions) }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="payPrice" label="已付款金额" width="0" align="left" <el-table-column prop="payPrice" label="已付款金额" width="120" align="center" sortable
/> />
<el-table-column prop="invoiceNum" label="发票数量" width="0" align="left" <el-table-column prop="invoiceNum" label="发票数量" width="120" align="center" sortable
/> />
<el-table-column prop="invoiceAmount" label="发票金额" width="0" align="left" <el-table-column prop="invoiceAmount" label="发票金额" width="120" align="center" sortable
/> />
<el-table-column prop="advanceAmount" label="垫资金额" width="0" align="left" <el-table-column prop="advanceAmount" label="垫资金额" width="120" align="center" sortable
/> />
<el-table-column prop="creatorTime" label="制单时间" width="0" align="left" <el-table-column prop="creatorTime" label="制单时间" width="120" align="center" sortable sortable="custom"
/> />
<el-table-column label="单据状态 " width="0" prop="status" algin="left" <el-table-column label="单据状态 " width="120" prop="status" algin="center" sortable
> >
<template slot-scope="scope"> <template slot-scope="scope" >
{{ scope.row.status | dynamicText(statusOptions) }} {{ scope.row.status | dynamicText(statusOptions) }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="creatorUserName" label="制单人" width="0" align="left" <el-table-column prop="creatorUserName" label="制单人" width="120" align="center" sortable
/> />
<el-table-column label="操作" fixed="right" <el-table-column label="操作" fixed="right"
width="100" > width="150">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" <el-button type="text"
@click="addOrUpdateHandle(scope.row.id)" >编辑 @click="addOrUpdateHandle(scope.row.id)">编辑
</el-button> </el-button>
<el-button type="text" class="JNPF-table-delBtn" @click="handleDel(scope.row.id)"> <el-button type="text" class="JNPF-table-delBtn" @click="handleDel(scope.row.id)">
</el-button> </el-button>
<el-button type="text" @click="goDetail(scope.row.id)"> <el-button type="text" @click="goDetail(scope.row.id)">
</el-button> </el-button>
<el-button type="text" @click="">发票上传
</el-button>
<el-button type="text" @click="">退货
</el-button>
</template> </template>
</el-table-column> </el-table-column>
</JNPF-table> </JNPF-table>
<pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize" @pagination="initData"/> <pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize"
@pagination="initData"/>
</div> </div>
</div> </div>
<JNPF-Form v-if="formVisible" ref="JNPFForm" @refresh="refresh"/> <JNPF-Form v-if="formVisible" ref="JNPFForm" @refresh="refresh"/>
@ -100,15 +120,15 @@
<script> <script>
import request from '@/utils/request' import request from '@/utils/request'
import {getDictionaryDataSelector} from '@/api/systemData/dictionary' import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
import JNPFForm from './Form' import JNPFForm from './Form'
import ExportBox from './ExportBox' import ExportBox from './ExportBox'
import {getDataInterfaceRes} from '@/api/systemData/dataInterface' import { getDataInterfaceRes } from '@/api/systemData/dataInterface'
import Detail from './Detail' import Detail from './Detail'
import pament from '@/views/scm/basicInformation/paymentdoc/Form' import pament from '@/views/scm/basicInformation/paymentdoc/Form'
export default { export default {
components: {JNPFForm, ExportBox,Detail}, components: { JNPFForm, ExportBox, Detail },
// routes:[ // routes:[
// { // {
// path:'/paymentdoc', // path:'/paymentdoc',
@ -120,7 +140,7 @@
return { return {
detailVisible: false, detailVisible: false,
query: { query: {
documentNo:undefined, documentNo: undefined
}, },
treeProps: { treeProps: {
children: 'children', children: 'children',
@ -133,31 +153,37 @@
listQuery: { listQuery: {
currentPage: 1, currentPage: 1,
pageSize: 20, pageSize: 20,
sort: "desc", sort: 'desc',
sidx: "", sidx: ''
}, },
formVisible: false, formVisible: false,
exportBoxVisible: false, exportBoxVisible: false,
columnList: [ columnList: [
{prop: 'documentNo', label: '单据编号'}, { prop: 'documentNo', label: '单据编号' },
{prop: 'erpNo', label: 'ERP订单号'}, { prop: 'erpNo', label: 'ERP订单号' },
{prop: 'contractName', label: '合同名称'}, { prop: 'contractName', label: '合同名称' },
{prop: 'supplierName', label: '供应商名称'}, { prop: 'supplierName', label: '供应商名称' },
{prop: 'amount', label: '金额'}, { prop: 'amount', label: '金额' },
{prop: 'num', label: '重量'}, { prop: 'num', label: '重量' },
{prop: 'currency', label: '币种'}, { prop: 'currency', label: '币种' },
{prop: 'payPrice', label: '已付款金额'}, { prop: 'payPrice', label: '已付款金额' },
{prop: 'invoiceNum', label: '发票数量'}, { prop: 'invoiceNum', label: '发票数量' },
{prop: 'invoiceAmount', label: '发票金额'}, { prop: 'invoiceAmount', label: '发票金额' },
{prop: 'advanceAmount', label: '垫资金额'}, { prop: 'advanceAmount', label: '垫资金额' },
{prop: 'creatorTime', label: '制单时间'}, { prop: 'creatorTime', label: '制单时间' },
{prop: 'status', label: '单据状态 '}, { prop: 'status', label: '单据状态 ' },
{prop: 'creatorUserName', label: '制单人'}, { prop: 'creatorUserName', label: '制单人' }
], ],
currencyOptions:[{"fullName":"人民币","id":"0"},{"fullName":"美元","id":"1"},{"fullName":"英镑","id":"2"}], currencyOptions: [{ 'fullName': '人民币', 'id': '0' }, { 'fullName': '美元', 'id': '1' }, {
currencyProps:{"label":"fullName","value":"id"}, 'fullName': '英镑',
statusOptions:[{"fullName":"待开票","id":"0"},{"fullName":"开票中","id":"1"},{"fullName":"付款中","id":"2"},{"fullName":"归档","id":"3"}], 'id': '2'
statusProps:{"label":"fullName","value":"id"}, }],
currencyProps: { 'label': 'fullName', 'value': 'id' },
statusOptions: [{ 'fullName': '待开票', 'id': '0' }, { 'fullName': '开票中', 'id': '1' }, {
'fullName': '付款中',
'id': '2'
}, { 'fullName': '归档', 'id': '3' }],
statusProps: { 'label': 'fullName', 'value': 'id' }
} }
}, },
computed: { computed: {
@ -169,32 +195,35 @@
this.initData() this.initData()
}, },
methods: { methods: {
goDetail(id){ goDetail(id) {
this.detailVisible = true this.detailVisible = true
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.Detail.init(id) this.$refs.Detail.init(id)
}) })
}, },
sortChange({column, prop, order}) { sortChange({ column, prop, order }) {
this.listQuery.sort = order == 'ascending' ? 'asc' : 'desc' this.listQuery.sort = order == 'ascending' ? 'asc' : 'desc'
this.listQuery.sidx = !order ? '' : prop this.listQuery.sidx = !order ? '' : prop
this.initData() this.initData()
}, },
initData() { initData() {
this.listLoading = true; this.listLoading = true
let _query = { let _query = {
...this.listQuery, ...this.listQuery,
...this.query, ...this.query,
menuId:this.menuId menuId: this.menuId
}; }
request({ request({
url: `/api/purchaseorder/Purchaseorder/getList`, url: `/api/purchaseorder/Purchaseorder/getList`,
method: 'post', method: 'post',
data: _query data: _query
}).then(res => { }).then(res => {
var _list =[]; var _list = []
for(let i=0;i<res.data.list.length;i++){ for (let i = 0; i < res.data.list.length; i++) {
let _data = res.data.list[i]; res.data.list[i].creatorTime = res.data.list[i].creatorTime ? res.data.list[i].creatorTime.substring(0,
10) : '';
let _data = res.data.list[i]
_list.push(_data) _list.push(_data)
} }
this.list = _list this.list = _list
@ -217,10 +246,10 @@
onClose: () => { onClose: () => {
this.initData() this.initData()
} }
}); })
}) })
}).catch(() => { }).catch(() => {
}); })
}, },
handleSelectionChange(val) { handleSelectionChange(val) {
const res = val.map(item => item.id) const res = val.map(item => item.id)
@ -231,7 +260,7 @@
this.$message({ this.$message({
type: 'error', type: 'error',
message: '请选择一条数据', message: '请选择一条数据',
duration: 1500, duration: 1500
}) })
return return
} }
@ -249,7 +278,7 @@
onClose: () => { onClose: () => {
this.initData() this.initData()
} }
}); })
}) })
}).catch(() => { }).catch(() => {
}) })
@ -260,19 +289,19 @@
this.$refs.JNPFForm.init(id, isDetail) this.$refs.JNPFForm.init(id, isDetail)
}) })
}, },
pigeonhole(){ pigeonhole() {
if (!this.multipleSelection.length) { if (!this.multipleSelection.length) {
this.$message({ this.$message({
type: 'error', type: 'error',
message: '请选择一条数据', message: '请选择一条数据',
duration: 1500, duration: 1500
}) })
return return
} }
let id = this.multipleSelection.join() let id = this.multipleSelection.join()
let param ={}; let param = {}
param = this.list.find(function(param) { param = this.list.find(function(param) {
return param.id == id; return param.id == id
}) })
request({ request({
url: `/api/purchaseorder/Purchaseorder/pigeonhole`, url: `/api/purchaseorder/Purchaseorder/pigeonhole`,
@ -285,22 +314,22 @@
onClose: () => { onClose: () => {
this.initData() this.initData()
} }
}); })
}) })
}, },
paymentApply(){ paymentApply() {
if (!this.multipleSelection.length) { if (!this.multipleSelection.length) {
this.$message({ this.$message({
type: 'error', type: 'error',
message: '请选择一条数据', message: '请选择一条数据',
duration: 1500, duration: 1500
}) })
return return
} }
let ids = this.multipleSelection.join() let ids = this.multipleSelection.join()
request({ request({
url: `/api/purchaseorder/Purchaseorder/paymentapply/${ids}`, url: `/api/purchaseorder/Purchaseorder/paymentapply/${ids}`,
method: 'put', method: 'put'
}).then(res => { }).then(res => {
this.$message({ this.$message({
type: 'success', type: 'success',
@ -308,9 +337,9 @@
onClose: () => { onClose: () => {
this.initData() this.initData()
} }
});
}) })
/* if (info.amount != info.invoiceAmount){ })
/* if (info.amount != info.invoiceAmount){
this.$message({ this.$message({
type: 'error', type: 'error',
message: '请先开具发票', message: '请先开具发票',
@ -335,7 +364,7 @@
}) })
}, },
download(data) { download(data) {
let query = {...data, ...this.listQuery, ...this.query,menuId:this.menuId} let query = { ...data, ...this.listQuery, ...this.query, menuId: this.menuId }
request({ request({
url: `/api/purchaseorder/Purchaseorder/Actions/Export`, url: `/api/purchaseorder/Purchaseorder/Actions/Export`,
method: 'GET', method: 'GET',
@ -351,8 +380,8 @@
this.listQuery = { this.listQuery = {
currentPage: 1, currentPage: 1,
pageSize: 20, pageSize: 20,
sort: "desc", sort: 'desc',
sidx: "", sidx: ''
} }
this.initData() this.initData()
}, },

@ -1,71 +1,74 @@
<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 :visible.sync="visible" class="JNPF-dialog JNPF-dialog_center" lock-scroll
width="600px"> width="1000px">
<el-row :gutter="15" class=""> <el-row :gutter="15" class="">
<el-form ref="elForm" :model="dataForm" :rules="rules" size="small" label-width="100px" label-position="right" > <el-form ref="elForm" :model="dataForm" :rules="rules" size="small" label-width="100px" label-position="right">
<template v-if="!loading"> <template v-if="!loading">
<el-col :span="24" > <el-col :span="24">
<el-form-item label="库区编码" <el-form-item label="库区编码"
prop="areacode" > prop="areacode">
<el-input v-model="dataForm.areacode" <el-input v-model="dataForm.areacode"
placeholder="请输入" clearable :style='{"width":"100%"}'> placeholder="请输入" clearable :style='{"width":"100%"}'>
</el-input> </el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="24" > <el-col :span="24">
<el-form-item label="库区名称" <el-form-item label="库区名称"
prop="areaname" > prop="areaname">
<el-input v-model="dataForm.areaname" <el-input v-model="dataForm.areaname"
placeholder="请输入" clearable :style='{"width":"100%"}'> placeholder="请输入" clearable :style='{"width":"100%"}'>
</el-input> </el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="24" > <el-col :span="24">
<el-form-item label="最高库存" <el-form-item label="最高库存"
prop="maximum" > prop="maximum">
<el-input-number v-model="dataForm.maximum" <el-input-number v-model="dataForm.maximum"
placeholder="数字文本" :step="1" > placeholder="数字文本" :step="1">
</el-input-number> </el-input-number>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="24" > <el-col :span="24">
<el-form-item label="安全库存" <el-form-item label="安全库存"
prop="safety" > prop="safety">
<el-input-number v-model="dataForm.safety" <el-input-number v-model="dataForm.safety"
placeholder="数字文本" :step="1" > placeholder="数字文本" :step="1">
</el-input-number> </el-input-number>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="24" > <el-col :span="24">
<el-form-item label="最低库存" <el-form-item label="最低库存"
prop="minimum" > prop="minimum">
<el-input-number v-model="dataForm.minimum" <el-input-number v-model="dataForm.minimum"
placeholder="数字文本" :step="1" > placeholder="数字文本" :step="1">
</el-input-number> </el-input-number>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="24" > <el-col :span="24">
<el-form-item label="计量单位" <el-form-item label="计量单位"
prop="unit" > prop="unit">
<el-select v-model="dataForm.unit" <el-select v-model="dataForm.unit"
placeholder="请选择" clearable :style='{"width":"100%"}'> placeholder="请选择" clearable :style='{"width":"100%"}'>
<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" :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-form-item label="仓库" <el-form-item label="仓库"
prop="warehouseId" > prop="warehouseId">
<popupSelect v-model="dataForm.warehouseId" <popupSelect v-model="dataForm.warehouseId"
placeholder="请选择" field="warehouseId" interfaceId="394860934465658373" :columnOptions="warehouseIdcolumnOptions" propsValue="id" relationField="NAME" popupType="dialog" placeholder="请选择" field="warehouseId" interfaceId="394860934465658373"
:columnOptions="warehouseIdcolumnOptions" propsValue="id" relationField="NAME"
popupType="dialog"
popupTitle="选择数据" popupWidth="800px" popupTitle="选择数据" popupWidth="800px"
> >
@ -73,7 +76,7 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</template> </template>
</el-form> </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>
@ -85,6 +88,7 @@
import request from '@/utils/request' import request from '@/utils/request'
import { getDataInterfaceRes } from '@/api/systemData/dataInterface' import { getDataInterfaceRes } from '@/api/systemData/dataInterface'
import { getDictionaryDataSelector } from '@/api/systemData/dictionary' import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
export default { export default {
components: {}, components: {},
props: [], props: [],
@ -94,28 +98,45 @@
loading: false, loading: false,
isDetail: false, isDetail: false,
dataForm: { dataForm: {
areacode : '', areacode: '',
areaname : '', areaname: '',
maximum : 1, maximum: 1,
safety : 1, safety: 1,
minimum : 1, minimum: 1,
unit : "", unit: '',
warehouseId : "", warehouseId: '',
creatorTime : "", creatorTime: '',
lastModifyTime : "", lastModifyTime: ''
}, },
rules: rules:
{ {
warehouseId: [ areacode: [
{ {
required: true, required: true,
message: '请选择', message: '请选择库区编码',
trigger: 'change' trigger: 'change'
}, }
],
areaname: [
{
required: true,
message: '请选择库区名称',
trigger: 'change'
}
], ],
warehouseId: [
{
required: true,
message: '请选择仓库',
trigger: 'change'
}
]
}, },
unitOptions:[{"fullName":"吨","id":"0"},{"fullName":"千克","id":"1"}], unitOptions: [{ 'fullName': '吨', 'id': '0' }, { 'fullName': '千克', 'id': '1' }],
warehouseIdcolumnOptions:[ {"label":"仓库名称","value":"NAME"}, {"label":"ERP库存组织名称","value":"inventory_org_name"}, {"label":"ERP库存组织详情名称","value":"inventory_org_detail_name"},], warehouseIdcolumnOptions: [{ 'label': '仓库名称', 'value': 'NAME' }, {
'label': 'ERP库存组织名称',
'value': 'inventory_org_name'
}, { 'label': 'ERP库存组织详情名称', 'value': 'inventory_org_detail_name' }]
} }
}, },
@ -123,38 +144,39 @@
watch: {}, watch: {},
created() { created() {
}, },
mounted() {}, mounted() {
},
methods: { methods: {
clearData(data){ clearData(data) {
for (let key in data) { for (let key in data) {
if (data[key] instanceof Array) { if (data[key] instanceof Array) {
data[key] = []; data[key] = []
} else if (data[key] instanceof Object) { } else if (data[key] instanceof Object) {
this.clearData(data[key]); this.clearData(data[key])
} else { } else {
data[key] = ""; data[key] = ''
} }
} }
}, },
init(id, isDetail) { init(id, isDetail) {
this.dataForm.id = id || 0; this.dataForm.id = id || 0
this.visible = true; this.visible = true
this.isDetail = isDetail || false; this.isDetail = isDetail || false
this.$nextTick(() => { this.$nextTick(() => {
this.$refs['elForm'].resetFields(); this.$refs['elForm'].resetFields()
if(this.dataForm.id){ if (this.dataForm.id) {
this.loading = true this.loading = true
request({ request({
url: '/api/example/Reservoirarea/'+this.dataForm.id, url: '/api/example/Reservoirarea/' + this.dataForm.id,
method: 'get' method: 'get'
}).then(res => { }).then(res => {
this.dataInfo(res.data) this.dataInfo(res.data)
this.loading = false this.loading = false
}); })
}else{ } else {
this.clearData(this.dataForm) this.clearData(this.dataForm)
} }
}); })
this.$store.commit('generator/UPDATE_RELATION_DATA', {}) this.$store.commit('generator/UPDATE_RELATION_DATA', {})
}, },
// //
@ -166,7 +188,7 @@
}) })
}, },
request() { request() {
var _data =this.dataList() var _data = this.dataList()
if (!this.dataForm.id) { if (!this.dataForm.id) {
request({ request({
url: '/api/example/Reservoirarea', url: '/api/example/Reservoirarea',
@ -183,9 +205,9 @@
} }
}) })
}) })
}else{ } else {
request({ request({
url: '/api/example/Reservoirarea/'+this.dataForm.id, url: '/api/example/Reservoirarea/' + this.dataForm.id,
method: 'PUT', method: 'PUT',
data: _data data: _data
}).then((res) => { }).then((res) => {
@ -201,15 +223,15 @@
}) })
} }
}, },
dataList(){ dataList() {
var _data = JSON.parse(JSON.stringify(this.dataForm)); var _data = JSON.parse(JSON.stringify(this.dataForm))
return _data; return _data
}, },
dataInfo(dataAll){ dataInfo(dataAll) {
let _dataAll =dataAll let _dataAll = dataAll
this.dataForm = _dataAll this.dataForm = _dataAll
}, }
}, }
} }
</script> </script>

@ -6,12 +6,12 @@
<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.areacode" placeholder="请输入" clearable> </el-input> <el-input v-model="query.areacode" 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-input v-model="query.areaname" placeholder="请输入" clearable> </el-input> <el-input v-model="query.areaname" placeholder="请输入" clearable></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
@ -27,9 +27,13 @@
<div> <div>
<el-button type="primary" icon="el-icon-plus" @click="addOrUpdateHandle()"> <el-button type="primary" 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-download" @click="">导入
</el-button>
<el-button type="text" icon="el-icon-delete" @click="handleBatchRemoveDel()">
</el-button> </el-button>
</div> </div>
<div class="JNPF-common-head-right"> <div class="JNPF-common-head-right">
@ -40,37 +44,40 @@
<screenfull isContainer/> <screenfull isContainer/>
</div> </div>
</div> </div>
<JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange' has-c @selection-change="handleSelectionChange"> <JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange' has-c :hasNO="false"
<el-table-column prop="areacode" label="库区编码" width="0" align="left" @selection-change="handleSelectionChange" border>
/> <el-table-column type="index" width="50" label="序号" fixed="left" align="center" />
<el-table-column prop="areaname" label="库区名称" width="0" align="left" <el-table-column prop="areacode" label="库区编码" width="200" align="center" sortable fixed="left"
/> />
<el-table-column prop="maximum" label="最高库存" width="0" align="left" <el-table-column prop="areaname" label="库区名称" width="200" align="center" sortable fixed="left"
/> />
<el-table-column prop="safety" label="安全库存" width="0" align="left" <el-table-column prop="maximum" label="最高库存" width="200" align="center" sortable
/> />
<el-table-column prop="minimum" label="最低库存" width="0" align="left" <el-table-column prop="safety" label="安全库存" width="200" align="center" sortable
/> />
<el-table-column label="计量单位" width="0" prop="unit" algin="left" <el-table-column prop="minimum" label="最低库存" width="200" align="center" sortable
> />
<el-table-column label="计量单位" width="200" prop="unit" algin="center" sortable
>
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.unit | dynamicText(unitOptions) }} {{ scope.row.unit | dynamicText(unitOptions) }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="warehouseId" label="仓库" width="0" align="left" <el-table-column prop="warehouseId" label="仓库" width="200" align="center" sortable
/> />
<el-table-column label="操作" fixed="right" <el-table-column label="操作" fixed="right"
width="100" > width="100">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" <el-button type="text"
@click="addOrUpdateHandle(scope.row.id)" >编辑 @click="addOrUpdateHandle(scope.row.id)">编辑
</el-button> </el-button>
<el-button type="text" class="JNPF-table-delBtn" @click="handleDel(scope.row.id)"> <el-button type="text" class="JNPF-table-delBtn" @click="handleDel(scope.row.id)">
</el-button> </el-button>
</template> </template>
</el-table-column> </el-table-column>
</JNPF-table> </JNPF-table>
<pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize" @pagination="initData"/> <pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize"
@pagination="initData"/>
</div> </div>
</div> </div>
<JNPF-Form v-if="formVisible" ref="JNPFForm" @refresh="refresh"/> <JNPF-Form v-if="formVisible" ref="JNPFForm" @refresh="refresh"/>
@ -81,20 +88,20 @@
<script> <script>
import request from '@/utils/request' import request from '@/utils/request'
import {getDictionaryDataSelector} from '@/api/systemData/dictionary' import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
import JNPFForm from './Form' import JNPFForm from './Form'
import ExportBox from './ExportBox' import ExportBox from './ExportBox'
import {getDataInterfaceRes} from '@/api/systemData/dataInterface' import { getDataInterfaceRes } from '@/api/systemData/dataInterface'
import Detail from './Detail' import Detail from './Detail'
export default { export default {
components: {JNPFForm, ExportBox,Detail}, components: { JNPFForm, ExportBox, Detail },
data() { data() {
return { return {
detailVisible: false, detailVisible: false,
query: { query: {
areacode:undefined, areacode: undefined,
areaname:undefined, areaname: undefined
}, },
treeProps: { treeProps: {
children: 'children', children: 'children',
@ -107,22 +114,22 @@
listQuery: { listQuery: {
currentPage: 1, currentPage: 1,
pageSize: 20, pageSize: 20,
sort: "desc", sort: 'desc',
sidx: "creatorTime", sidx: 'creatorTime'
}, },
formVisible: false, formVisible: false,
exportBoxVisible: false, exportBoxVisible: false,
columnList: [ columnList: [
{prop: 'areacode', label: '库区编码'}, { prop: 'areacode', label: '库区编码' },
{prop: 'areaname', label: '库区名称'}, { prop: 'areaname', label: '库区名称' },
{prop: 'maximum', label: '最高库存'}, { prop: 'maximum', label: '最高库存' },
{prop: 'safety', label: '安全库存'}, { prop: 'safety', label: '安全库存' },
{prop: 'minimum', label: '最低库存'}, { prop: 'minimum', label: '最低库存' },
{prop: 'unit', label: '计量单位'}, { prop: 'unit', label: '计量单位' },
{prop: 'warehouseId', label: '仓库'}, { prop: 'warehouseId', label: '仓库' }
], ],
unitOptions:[{"fullName":"吨","id":"0"},{"fullName":"千克","id":"1"}], unitOptions: [{ 'fullName': '吨', 'id': '0' }, { 'fullName': '千克', 'id': '1' }],
unitProps:{"label":"fullName","value":"id"}, unitProps: { 'label': 'fullName', 'value': 'id' }
} }
}, },
computed: { computed: {
@ -134,32 +141,33 @@
this.initData() this.initData()
}, },
methods: { methods: {
goDetail(id){ goDetail(id) {
this.detailVisible = true this.detailVisible = true
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.Detail.init(id) this.$refs.Detail.init(id)
}) })
}, },
sortChange({column, prop, order}) { sortChange({ column, prop, order }) {
this.listQuery.sort = order == 'ascending' ? 'asc' : 'desc' this.listQuery.sort = order == 'ascending' ? 'asc' : 'desc'
this.listQuery.sidx = !order ? '' : prop this.listQuery.sidx = !order ? '' : prop
this.initData() this.initData()
}, },
initData() { initData() {
this.listLoading = true; this.listLoading = true
let _query = { let _query = {
...this.listQuery, ...this.listQuery,
...this.query, ...this.query,
menuId:this.menuId menuId: this.menuId
}; }
request({ request({
url: `/api/example/Reservoirarea/getList`, url: `/api/example/Reservoirarea/getList`,
method: 'post', method: 'post',
data: _query data: _query
}).then(res => { }).then(res => {
var _list =[]; var _list = []
for(let i=0;i<res.data.list.length;i++){ for (let i = 0; i < res.data.list.length; i++) {
let _data = res.data.list[i]; res.data.list[i].creatorTime = res.data.list[i].creatorTime ? res.data.list[i].creatorTime.substring(0, 10) : '';
let _data = res.data.list[i]
_list.push(_data) _list.push(_data)
} }
this.list = _list this.list = _list
@ -182,10 +190,10 @@
onClose: () => { onClose: () => {
this.initData() this.initData()
} }
}); })
}) })
}).catch(() => { }).catch(() => {
}); })
}, },
handleSelectionChange(val) { handleSelectionChange(val) {
const res = val.map(item => item.id) const res = val.map(item => item.id)
@ -196,7 +204,7 @@
this.$message({ this.$message({
type: 'error', type: 'error',
message: '请选择一条数据', message: '请选择一条数据',
duration: 1500, duration: 1500
}) })
return return
} }
@ -214,7 +222,7 @@
onClose: () => { onClose: () => {
this.initData() this.initData()
} }
}); })
}) })
}).catch(() => { }).catch(() => {
}) })
@ -232,7 +240,7 @@
}) })
}, },
download(data) { download(data) {
let query = {...data, ...this.listQuery, ...this.query,menuId:this.menuId} let query = { ...data, ...this.listQuery, ...this.query, menuId: this.menuId }
request({ request({
url: `/api/example/Reservoirarea/Actions/Export`, url: `/api/example/Reservoirarea/Actions/Export`,
method: 'GET', method: 'GET',
@ -248,8 +256,8 @@
this.listQuery = { this.listQuery = {
currentPage: 1, currentPage: 1,
pageSize: 20, pageSize: 20,
sort: "desc", sort: 'desc',
sidx: "creatorTime", sidx: 'creatorTime'
} }
this.initData() this.initData()
}, },

@ -8,7 +8,7 @@
<el-col :span="8"> <el-col :span="8">
<el-form-item label="单据编号" prop="documentNo"> <el-form-item label="单据编号" prop="documentNo">
<el-input v-model="dataForm.documentNo" placeholder="请输入" clearable <el-input v-model="dataForm.documentNo" placeholder="请输入" clearable
:style='{"width":"100%"}'> :style='{"width":"100%"}' :disabled="true">
</el-input> </el-input>
</el-form-item> </el-form-item>
@ -17,7 +17,7 @@
<el-form-item label="销售订单" prop="salesOrderId"> <el-form-item label="销售订单" prop="salesOrderId">
<popupSelect v-model="dataForm.salesOrderId" placeholder="请选择" clearable <popupSelect v-model="dataForm.salesOrderId" placeholder="请选择" clearable
field="salesOrderId" interfaceId="383568951197606085" field="salesOrderId" interfaceId="383568951197606085"
:columnOptions="salesOrderIdcolumnOptions" propsValue="id" relationField="document_no" :columnOptions="salesOrderIdcolumnOptions" :excludeFields="excludeFields" propsValue="id" relationField="document_no"
popupType="dialog" popupTitle="选择数据" popupWidth="800px" @change="popupSelectChange"> popupType="dialog" popupTitle="选择数据" popupWidth="800px" @change="popupSelectChange">
</popupSelect> </popupSelect>
@ -34,15 +34,15 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="退款金额" prop="refundAmount"> <el-form-item label="退款金额" prop="refundAmount" >
<el-input v-model="dataForm.refundAmount" readonly clearable :style='{"width":"100%"}'> <el-input v-model="dataForm.refundAmount" readonly clearable :style='{"width":"100%"}' :disabled="true">
</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="退货数量" prop="refundNum"> <el-form-item label="退货数量" prop="refundNum" >
<el-input v-model="dataForm.refundNum" readonly clearable :style='{"width":"100%"}'> <el-input v-model="dataForm.refundNum" readonly clearable :style='{"width":"100%"}' :disabled="true">
</el-input> </el-input>
</el-form-item> </el-form-item>
@ -68,7 +68,7 @@
<template slot-scope="scope"> <template slot-scope="scope">
<popupSelect v-model="scope.row.licenseNum" placeholder="请选择" <popupSelect v-model="scope.row.licenseNum" placeholder="请选择"
clearable :field="'licenseNum'+scope.$index" clearable :field="'licenseNum'+scope.$index"
interfaceId="383568082196537541" :bissId="dataForm.salesOrderId" interfaceId="383568082196537541" :bissId="dataForm.salesOrderId" :excludeFields="excludeFields"
:columnOptions="saleback_item0licenseNumcolumnOptions" :columnOptions="saleback_item0licenseNumcolumnOptions"
propsValue="license_num" relationField="license_num" propsValue="license_num" relationField="license_num"
popupType="dialog" popupWidth="800px" @change="popupSelectChange2"> popupType="dialog" popupWidth="800px" @change="popupSelectChange2">
@ -184,6 +184,7 @@
props: [], props: [],
data() { data() {
return { return {
excludeFields: [],
visible: false, visible: false,
loading: false, loading: false,
isDetail: false, isDetail: false,
@ -320,7 +321,9 @@
mounted() {}, mounted() {},
methods: { methods: {
popupSelectChange2(a, b){ popupSelectChange2(a, b){
var excludeFields = [];
for (let i = 0; i < this.dataForm.saleback_item0List.length; i++) { for (let i = 0; i < this.dataForm.saleback_item0List.length; i++) {
excludeFields.push(this.dataForm.saleback_item0List[i].licenseNo);
if(a == this.dataForm.saleback_item0List[i].licenseNum){ if(a == this.dataForm.saleback_item0List[i].licenseNum){
this.dataForm.saleback_item0List[i].materialName = b.material_name; this.dataForm.saleback_item0List[i].materialName = b.material_name;
this.dataForm.saleback_item0List[i].settlement = b.settlement; this.dataForm.saleback_item0List[i].settlement = b.settlement;
@ -333,9 +336,12 @@
this.dataForm.saleback_item0List[i].pountType = b.pound_type; this.dataForm.saleback_item0List[i].pountType = b.pound_type;
} }
} }
this.excludeFields = excludeFields;
}, },
popupSelectChange(e,d){ popupSelectChange(e,d){
this.dataForm.currency = d.currency; this.dataForm.currency = d.currency;
this.excludeFields = [];
this.dataForm.saleback_item0List = [];
}, },
saleback_item0Exist() { saleback_item0Exist() {
let isOk = true; let isOk = true;

@ -6,7 +6,7 @@
<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">
@ -22,9 +22,9 @@
<div> <div>
<el-button type="primary" icon="el-icon-plus" @click="addOrUpdateHandle()"> <el-button type="primary" 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>
</div> </div>
<div class="JNPF-common-head-right"> <div class="JNPF-common-head-right">
@ -35,44 +35,46 @@
<screenfull isContainer/> <screenfull isContainer/>
</div> </div>
</div> </div>
<JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange' has-c @selection-change="handleSelectionChange"> <JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange' has-c :hasNO="false"
<el-table-column prop="documentNo" label="单据编号" width="0" align="left" @selection-change="handleSelectionChange" border>
/> <el-table-column type="index" width="50" label="序号" fixed="left" align="center" />
<el-table-column prop="salesOrderId" label="销售订单" width="0" align="left" <el-table-column prop="documentNo" label="单据编号" width="200" align="center" sortablefixed="left"
/> />
<el-table-column prop="jg_salesorder.contractName" label="合同名称" width="0" align="left" <el-table-column prop="salesOrderId" label="销售订单" width="200" align="center"sortable fixed="left"
/> />
<el-table-column prop="jg_salesorder.costomerName" label="客户名称" width="0" align="left" <el-table-column prop="jg_salesorder.contractName" label="合同名称" width="120"sortable align="center"
/> />
<el-table-column prop="refundAmount" label="退款金额" width="0" align="left" <el-table-column prop="jg_salesorder.costomerName" label="客户名称" width="200" sortable align="center"
/> />
<el-table-column prop="actualAmount" label="实退金额" width="0" align="left" <el-table-column prop="refundAmount" label="退款金额" width="120" align="center" sortable
/> />
<el-table-column label="币别" width="0" prop="currency" algin="left" <el-table-column prop="actualAmount" label="实退金额" width="120" align="center" sortable
> />
<el-table-column label="币别" width="120" prop="currency" algin="center" sortable
>
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.currency | dynamicText(currencyOptions) }} {{ scope.row.currency | dynamicText(currencyOptions) }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="refundNum" label="退货数量" width="0" align="left" <el-table-column prop="refundNum" label="退货数量" width="120" align="center" sortable
/> />
<el-table-column label="单据状态 " width="0" prop="status" algin="left" <el-table-column label="单据状态 " width="120" prop="status" algin="center" sortable
> >
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.status | dynamicText(statusOptions) }} {{ scope.row.status | dynamicText(statusOptions) }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="creatorTime" label="创建时间" width="0" align="left" <el-table-column prop="creatorTime" label="创建时间" width="120" align="center" sortable
/> />
<el-table-column prop="creatorUserName" label="创建人" width="0" align="left" <el-table-column prop="creatorUserName" label="创建人" width="120" align="center" sortable
/> />
<el-table-column prop="remark" label="备注" width="0" align="left" <el-table-column prop="remark" label="备注" width="120" align="center" sortable
/> />
<el-table-column label="操作" fixed="right" <el-table-column label="操作" fixed="right"
width="150" > width="150">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" <el-button type="text"
@click="addOrUpdateHandle(scope.row.id)" >编辑 @click="addOrUpdateHandle(scope.row.id)">编辑
</el-button> </el-button>
<el-button type="text" class="JNPF-table-delBtn" @click="handleDel(scope.row.id)"> <el-button type="text" class="JNPF-table-delBtn" @click="handleDel(scope.row.id)">
</el-button> </el-button>
@ -82,7 +84,8 @@ width="150" >
</template> </template>
</el-table-column> </el-table-column>
</JNPF-table> </JNPF-table>
<pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize" @pagination="initData"/> <pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize"
@pagination="initData"/>
</div> </div>
</div> </div>
<JNPF-Form v-if="formVisible" ref="JNPFForm" @refresh="refresh"/> <JNPF-Form v-if="formVisible" ref="JNPFForm" @refresh="refresh"/>
@ -93,19 +96,19 @@ width="150" >
<script> <script>
import request from '@/utils/request' import request from '@/utils/request'
import {getDictionaryDataSelector} from '@/api/systemData/dictionary' import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
import JNPFForm from './Form' import JNPFForm from './Form'
import ExportBox from './ExportBox' import ExportBox from './ExportBox'
import {getDataInterfaceRes} from '@/api/systemData/dataInterface' import { getDataInterfaceRes } from '@/api/systemData/dataInterface'
import Detail from './Detail' import Detail from './Detail'
export default { export default {
components: {JNPFForm, ExportBox,Detail}, components: { JNPFForm, ExportBox, Detail },
data() { data() {
return { return {
detailVisible: false, detailVisible: false,
query: { query: {
documentNo:undefined, documentNo: undefined
}, },
treeProps: { treeProps: {
children: 'children', children: 'children',
@ -118,29 +121,35 @@ width="150" >
listQuery: { listQuery: {
currentPage: 1, currentPage: 1,
pageSize: 20, pageSize: 20,
sort: "desc", sort: 'desc',
sidx: "", sidx: ''
}, },
formVisible: false, formVisible: false,
exportBoxVisible: false, exportBoxVisible: false,
columnList: [ columnList: [
{prop: 'documentNo', label: '单据编号'}, { prop: 'documentNo', label: '单据编号' },
{prop: 'salesOrderId', label: '销售订单'}, { prop: 'salesOrderId', label: '销售订单' },
{prop: 'jg_salesorder.contractName', label: '合同名称'}, { prop: 'jg_salesorder.contractName', label: '合同名称' },
{prop: 'jg_salesorder.costomerName', label: '客户名称'}, { prop: 'jg_salesorder.costomerName', label: '客户名称' },
{prop: 'refundAmount', label: '退款金额'}, { prop: 'refundAmount', label: '退款金额' },
{prop: 'actualAmount', label: '实退金额'}, { prop: 'actualAmount', label: '实退金额' },
{prop: 'currency', label: '币别'}, { prop: 'currency', label: '币别' },
{prop: 'refundNum', label: '退货数量'}, { prop: 'refundNum', label: '退货数量' },
{prop: 'status', label: '单据状态 '}, { prop: 'status', label: '单据状态 ' },
{prop: 'creatorTime', label: '创建时间'}, { prop: 'creatorTime', label: '创建时间' },
{prop: 'creatorUserName', label: '创建人'}, { prop: 'creatorUserName', label: '创建人' },
{prop: 'remark', label: '备注'}, { prop: 'remark', label: '备注' }
], ],
currencyOptions:[{"fullName":"人民币","id":"0"},{"fullName":"美元","id":"1"},{"fullName":"英镑","id":"2"}], currencyOptions: [{ 'fullName': '人民币', 'id': '0' }, { 'fullName': '美元', 'id': '1' }, {
currencyProps:{"label":"fullName","value":"id"}, 'fullName': '英镑',
statusOptions:[{"fullName":"已保存","id":"0"},{"fullName":"审批中","id":"1"},{"fullName":"已审批","id":"2"}], 'id': '2'
statusProps:{"label":"fullName","value":"id"}, }],
currencyProps: { 'label': 'fullName', 'value': 'id' },
statusOptions: [{ 'fullName': '已保存', 'id': '0' }, { 'fullName': '审批中', 'id': '1' }, {
'fullName': '已审批',
'id': '2'
}],
statusProps: { 'label': 'fullName', 'value': 'id' }
} }
}, },
computed: { computed: {
@ -152,32 +161,34 @@ width="150" >
this.initData() this.initData()
}, },
methods: { methods: {
goDetail(id){ goDetail(id) {
this.detailVisible = true this.detailVisible = true
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.Detail.init(id) this.$refs.Detail.init(id)
}) })
}, },
sortChange({column, prop, order}) { sortChange({ column, prop, order }) {
this.listQuery.sort = order == 'ascending' ? 'asc' : 'desc' this.listQuery.sort = order == 'ascending' ? 'asc' : 'desc'
this.listQuery.sidx = !order ? '' : prop this.listQuery.sidx = !order ? '' : prop
this.initData() this.initData()
}, },
initData() { initData() {
this.listLoading = true; this.listLoading = true
let _query = { let _query = {
...this.listQuery, ...this.listQuery,
...this.query, ...this.query,
menuId:this.menuId menuId: this.menuId
}; }
request({ request({
url: `/api/saleback/Saleback/getList`, url: `/api/saleback/Saleback/getList`,
method: 'post', method: 'post',
data: _query data: _query
}).then(res => { }).then(res => {
var _list =[]; var _list = []
for(let i=0;i<res.data.list.length;i++){ for (let i = 0; i < res.data.list.length; i++) {
let _data = res.data.list[i]; res.data.list[i].creatorTime = res.data.list[i].creatorTime ? res.data.list[i].creatorTime.substring(0,
10) : '';
let _data = res.data.list[i]
_list.push(_data) _list.push(_data)
} }
this.list = _list this.list = _list
@ -200,10 +211,10 @@ width="150" >
onClose: () => { onClose: () => {
this.initData() this.initData()
} }
}); })
}) })
}).catch(() => { }).catch(() => {
}); })
}, },
handleSelectionChange(val) { handleSelectionChange(val) {
const res = val.map(item => item.id) const res = val.map(item => item.id)
@ -214,7 +225,7 @@ width="150" >
this.$message({ this.$message({
type: 'error', type: 'error',
message: '请选择一条数据', message: '请选择一条数据',
duration: 1500, duration: 1500
}) })
return return
} }
@ -232,7 +243,7 @@ width="150" >
onClose: () => { onClose: () => {
this.initData() this.initData()
} }
}); })
}) })
}).catch(() => { }).catch(() => {
}) })
@ -250,7 +261,7 @@ width="150" >
}) })
}, },
download(data) { download(data) {
let query = {...data, ...this.listQuery, ...this.query,menuId:this.menuId} let query = { ...data, ...this.listQuery, ...this.query, menuId: this.menuId }
request({ request({
url: `/api/saleback/Saleback/Actions/Export`, url: `/api/saleback/Saleback/Actions/Export`,
method: 'GET', method: 'GET',
@ -266,8 +277,8 @@ width="150" >
this.listQuery = { this.listQuery = {
currentPage: 1, currentPage: 1,
pageSize: 20, pageSize: 20,
sort: "desc", sort: 'desc',
sidx: "", sidx: ''
} }
this.initData() this.initData()
}, },

@ -6,28 +6,28 @@
<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.supplierCode" placeholder="请输入" clearable> </el-input> <el-input v-model="query.supplierCode" 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-input v-model="query.supplierName" placeholder="请输入" clearable> </el-input> <el-input v-model="query.supplierName" 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-input v-model="query.contactName" placeholder="请输入" clearable> </el-input> <el-input v-model="query.contactName" placeholder="请输入" clearable></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<template v-if="showAll"> <template v-if="showAll">
<el-col :span="6"> <el-col :span="6">
<el-form-item label="联系电话"> <el-form-item label="联系电话">
<el-input v-model="query.contactPhone" placeholder="请输入" clearable> </el-input> <el-input v-model="query.contactPhone" 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-input v-model="query.supplierSiteCode" placeholder="请输入" clearable> </el-input> <el-input v-model="query.supplierSiteCode" placeholder="请输入" clearable></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
</template> </template>
@ -50,9 +50,11 @@
<div> <div>
<el-button type="primary" icon="el-icon-plus" @click="addOrUpdateHandle()"> <el-button type="primary" 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-download" @click="">导入
</el-button>
<el-button type="text" icon="el-icon-delete" @click="handleBatchRemoveDel()">
</el-button> </el-button>
</div> </div>
<div class="JNPF-common-head-right"> <div class="JNPF-common-head-right">
@ -63,91 +65,94 @@
<screenfull isContainer/> <screenfull isContainer/>
</div> </div>
</div> </div>
<JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange' has-c @selection-change="handleSelectionChange"> <JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange' has-c :hasNO="false"
<el-table-column prop="supplierCode" label="供应商编码" width="0" align="left" @selection-change="handleSelectionChange" border>
sortable="custom" /> <el-table-column type="index" width="50" label="序号" fixed="left" align="center" />
<el-table-column prop="companyId" label="所属公司" width="0" align="left" <el-table-column prop="supplierCode" label="供应商编码" width="200" align="center" fixed="left" sortable
sortable="custom" /> sortable="custom"/>
<el-table-column prop="supplierName" label="供应商名称" width="0" align="left" <el-table-column prop="companyId" label="所属公司" width="200" align="center" fixed="left" sortable
sortable="custom" /> sortable="custom"/>
<el-table-column prop="country" label="国家" width="0" align="left" <el-table-column prop="supplierName" label="供应商名称" width="200" align="center" sortable
/> sortable="custom"/>
<el-table-column prop="supply" label="供货指标" width="0" align="left" <el-table-column prop="country" label="国家" width="120" align="center" sortable
/> />
<el-table-column prop="province" label="省" width="0" align="left" <el-table-column prop="supply" label="供货指标" width="120" align="center" sortable
/> />
<el-table-column prop="contactName" label="联系人" width="0" align="left" <el-table-column prop="province" label="省" width="120" align="center" sortable
sortable="custom" /> />
<el-table-column label="供应商等级" width="0" prop="supplierLevel" algin="left" <el-table-column prop="contactName" label="联系人" width="120" align="center" sortable
sortable="custom" > sortable="custom"/>
<el-table-column label="供应商等级" width="120" prop="supplierLevel" algin="center" sortable
sortable="custom">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.supplierLevel | dynamicText(supplierLevelOptions) }} {{ scope.row.supplierLevel | dynamicText(supplierLevelOptions) }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="contactPhone" label="联系电话" width="0" align="left" <el-table-column prop="contactPhone" label="联系电话" width="200" align="center" sortable
sortable="custom" /> sortable="custom"/>
<el-table-column label="供应商性质" width="0" prop="enterprise" algin="left" <el-table-column label="供应商性质" width="120" prop="enterprise" algin="center" sortable
> >
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.enterprise | dynamicText(enterpriseOptions) }} {{ scope.row.enterprise | dynamicText(enterpriseOptions) }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="address" label="地址" width="0" align="left" <el-table-column prop="address" label="地址" width="200" align="center" sortable
sortable="custom" /> sortable="custom"/>
<el-table-column label="供应商类型" width="0" prop="classification" algin="left" <el-table-column label="供应商类型" width="120" prop="classification" algin="center" sortable
> >
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.classification | dynamicText(classificationOptions) }} {{ scope.row.classification | dynamicText(classificationOptions) }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="bank" label="开户行" width="0" align="left" <el-table-column prop="bank" label="开户行" width="200" align="center" sortable
/> />
<el-table-column prop="vatRegistrationNum" label="纳税编号" width="0" align="left" <el-table-column prop="vatRegistrationNum" label="纳税编号" width="200" align="center" sortable
/> />
<el-table-column prop="bankAccount" label="银行账户" width="0" align="left" <el-table-column prop="bankAccount" label="银行账户" width="200" align="center" sortable
/> />
<el-table-column label="默认税码" width="0" prop="taxCode" algin="left" <el-table-column label="默认税码" width="120" prop="taxCode" algin="center" sortable
> >
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.taxCode | dynamicText(taxCodeOptions) }} {{ scope.row.taxCode | dynamicText(taxCodeOptions) }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="payable" label="应付科目" width="0" align="left" <el-table-column prop="payable" label="应付科目" width="120" align="center" sortable
/> />
<el-table-column label="是否采购" width="0" prop="isPurchase" algin="left" <el-table-column label="是否采购" width="120" prop="isPurchase" algin="center" sortable
> >
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.isPurchase | dynamicText(isPurchaseOptions) }} {{ scope.row.isPurchase | dynamicText(isPurchaseOptions) }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="prepaid" label="预付科目" width="0" align="left" <el-table-column prop="prepaid" label="预付科目" width="120" align="center" sortable
/> />
<el-table-column label="是否付款" width="0" prop="isPayment" algin="left" <el-table-column label="是否付款" width="120" prop="isPayment" algin="center" sortable
> >
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.isPayment | dynamicText(isPaymentOptions) }} {{ scope.row.isPayment | dynamicText(isPaymentOptions) }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="是否启用" width="0" prop="status" algin="left" <el-table-column label="是否启用" width="120" prop="status" algin="center" sortable
sortable="custom" > sortable="custom">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.status | dynamicText(statusOptions) }} {{ scope.row.status | dynamicText(statusOptions) }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="supplierSiteCode" label="供应商地点" width="0" align="left" <el-table-column prop="supplierSiteCode" label="供应商地点" width="120" align="center" sortable
sortable="custom" /> sortable="custom"/>
<el-table-column label="操作" fixed="right" <el-table-column label="操作" fixed="right"
width="100" > width="100">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" <el-button type="text"
@click="addOrUpdateHandle(scope.row.id)" >编辑 @click="addOrUpdateHandle(scope.row.id)">编辑
</el-button> </el-button>
<el-button type="text" class="JNPF-table-delBtn" @click="handleDel(scope.row.id)"> <el-button type="text" class="JNPF-table-delBtn" @click="handleDel(scope.row.id)">
</el-button> </el-button>
</template> </template>
</el-table-column> </el-table-column>
</JNPF-table> </JNPF-table>
<pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize" @pagination="initData"/> <pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize"
@pagination="initData"/>
</div> </div>
</div> </div>
<JNPF-Form v-if="formVisible" ref="JNPFForm" @refresh="refresh"/> <JNPF-Form v-if="formVisible" ref="JNPFForm" @refresh="refresh"/>
@ -158,24 +163,24 @@
<script> <script>
import request from '@/utils/request' import request from '@/utils/request'
import {getDictionaryDataSelector} from '@/api/systemData/dictionary' import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
import JNPFForm from './Form' import JNPFForm from './Form'
import ExportBox from './ExportBox' import ExportBox from './ExportBox'
import {getDataInterfaceRes} from '@/api/systemData/dataInterface' import { getDataInterfaceRes } from '@/api/systemData/dataInterface'
import Detail from './Detail' import Detail from './Detail'
export default { export default {
components: {JNPFForm, ExportBox,Detail}, components: { JNPFForm, ExportBox, Detail },
data() { data() {
return { return {
showAll: false, showAll: false,
detailVisible: false, detailVisible: false,
query: { query: {
supplierCode:undefined, supplierCode: undefined,
supplierName:undefined, supplierName: undefined,
contactName:undefined, contactName: undefined,
contactPhone:undefined, contactPhone: undefined,
supplierSiteCode:undefined, supplierSiteCode: undefined
}, },
treeProps: { treeProps: {
children: 'children', children: 'children',
@ -188,49 +193,55 @@
listQuery: { listQuery: {
currentPage: 1, currentPage: 1,
pageSize: 20, pageSize: 20,
sort: "desc", sort: 'desc',
sidx: "creatorTime", sidx: 'creatorTime'
}, },
formVisible: false, formVisible: false,
exportBoxVisible: false, exportBoxVisible: false,
columnList: [ columnList: [
{prop: 'supplierCode', label: '供应商编码'}, { prop: 'supplierCode', label: '供应商编码' },
{prop: 'companyId', label: '所属公司'}, { prop: 'companyId', label: '所属公司' },
{prop: 'supplierName', label: '供应商名称'}, { prop: 'supplierName', label: '供应商名称' },
{prop: 'country', label: '国家'}, { prop: 'country', label: '国家' },
{prop: 'supply', label: '供货指标'}, { prop: 'supply', label: '供货指标' },
{prop: 'province', label: '省'}, { prop: 'province', label: '省' },
{prop: 'contactName', label: '联系人'}, { prop: 'contactName', label: '联系人' },
{prop: 'supplierLevel', label: '供应商等级'}, { prop: 'supplierLevel', label: '供应商等级' },
{prop: 'contactPhone', label: '联系电话'}, { prop: 'contactPhone', label: '联系电话' },
{prop: 'enterprise', label: '供应商性质'}, { prop: 'enterprise', label: '供应商性质' },
{prop: 'address', label: '地址'}, { prop: 'address', label: '地址' },
{prop: 'classification', label: '供应商类型'}, { prop: 'classification', label: '供应商类型' },
{prop: 'bank', label: '开户行'}, { prop: 'bank', label: '开户行' },
{prop: 'vatRegistrationNum', label: '纳税编号'}, { prop: 'vatRegistrationNum', label: '纳税编号' },
{prop: 'bankAccount', label: '银行账户'}, { prop: 'bankAccount', label: '银行账户' },
{prop: 'taxCode', label: '默认税码'}, { prop: 'taxCode', label: '默认税码' },
{prop: 'payable', label: '应付科目'}, { prop: 'payable', label: '应付科目' },
{prop: 'isPurchase', label: '是否采购'}, { prop: 'isPurchase', label: '是否采购' },
{prop: 'prepaid', label: '预付科目'}, { prop: 'prepaid', label: '预付科目' },
{prop: 'isPayment', label: '是否付款'}, { prop: 'isPayment', label: '是否付款' },
{prop: 'status', label: '是否启用'}, { prop: 'status', label: '是否启用' },
{prop: 'supplierSiteCode', label: '供应商地点'}, { prop: 'supplierSiteCode', label: '供应商地点' }
], ],
supplierLevelOptions:[{"fullName":"一级","id":"1"},{"fullName":"二级","id":"2"},{"fullName":"三级","id":"3"},{"fullName":"四级","id":"4"}], supplierLevelOptions: [{ 'fullName': '一级', 'id': '1' }, { 'fullName': '二级', 'id': '2' }, {
supplierLevelProps:{"label":"fullName","value":"id"}, 'fullName': '三级',
enterpriseOptions:[{"fullName":"民营","id":"0"},{"fullName":"私营","id":"1"}], 'id': '3'
enterpriseProps:{"label":"fullName","value":"id"}, }, { 'fullName': '四级', 'id': '4' }],
classificationOptions:[{"fullName":"国内","id":"0"},{"fullName":"国外","id":"1"}], supplierLevelProps: { 'label': 'fullName', 'value': 'id' },
classificationProps:{"label":"fullName","value":"id"}, enterpriseOptions: [{ 'fullName': '民营', 'id': '0' }, { 'fullName': '私营', 'id': '1' }],
taxCodeOptions:[{"fullName":"13个点","id":"0"},{"fullName":"9个点","id":"1"},{"fullName":"6个点","id":"2"},{"fullName":"5个点","id":"3"}], enterpriseProps: { 'label': 'fullName', 'value': 'id' },
taxCodeProps:{"label":"fullName","value":"id"}, classificationOptions: [{ 'fullName': '国内', 'id': '0' }, { 'fullName': '国外', 'id': '1' }],
isPurchaseOptions:[{"fullName":"否","id":"0"},{"fullName":"是","id":"1"}], classificationProps: { 'label': 'fullName', 'value': 'id' },
isPurchaseProps:{"label":"fullName","value":"id"}, taxCodeOptions: [{ 'fullName': '13个点', 'id': '0' }, { 'fullName': '9个点', 'id': '1' }, {
isPaymentOptions:[{"fullName":"否","id":"0"},{"fullName":"是","id":"1"}], 'fullName': '6个点',
isPaymentProps:{"label":"fullName","value":"id"}, 'id': '2'
statusOptions:[{"fullName":"启用","id":"1"},{"fullName":"停用","id":"2"}], }, { 'fullName': '5个点', 'id': '3' }],
statusProps:{"label":"fullName","value":"id"}, taxCodeProps: { 'label': 'fullName', 'value': 'id' },
isPurchaseOptions: [{ 'fullName': '否', 'id': '0' }, { 'fullName': '是', 'id': '1' }],
isPurchaseProps: { 'label': 'fullName', 'value': 'id' },
isPaymentOptions: [{ 'fullName': '否', 'id': '0' }, { 'fullName': '是', 'id': '1' }],
isPaymentProps: { 'label': 'fullName', 'value': 'id' },
statusOptions: [{ 'fullName': '启用', 'id': '1' }, { 'fullName': '停用', 'id': '2' }],
statusProps: { 'label': 'fullName', 'value': 'id' }
} }
}, },
computed: { computed: {
@ -242,32 +253,32 @@
this.initData() this.initData()
}, },
methods: { methods: {
goDetail(id){ goDetail(id) {
this.detailVisible = true this.detailVisible = true
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.Detail.init(id) this.$refs.Detail.init(id)
}) })
}, },
sortChange({column, prop, order}) { sortChange({ column, prop, order }) {
this.listQuery.sort = order == 'ascending' ? 'asc' : 'desc' this.listQuery.sort = order == 'ascending' ? 'asc' : 'desc'
this.listQuery.sidx = !order ? '' : prop this.listQuery.sidx = !order ? '' : prop
this.initData() this.initData()
}, },
initData() { initData() {
this.listLoading = true; this.listLoading = true
let _query = { let _query = {
...this.listQuery, ...this.listQuery,
...this.query, ...this.query,
menuId:this.menuId menuId: this.menuId
}; }
request({ request({
url: `/api/example/Supplier/getList`, url: `/api/example/Supplier/getList`,
method: 'post', method: 'post',
data: _query data: _query
}).then(res => { }).then(res => {
var _list =[]; var _list = []
for(let i=0;i<res.data.list.length;i++){ for (let i = 0; i < res.data.list.length; i++) {
let _data = res.data.list[i]; let _data = res.data.list[i]
_list.push(_data) _list.push(_data)
} }
this.list = _list this.list = _list
@ -290,10 +301,10 @@
onClose: () => { onClose: () => {
this.initData() this.initData()
} }
}); })
}) })
}).catch(() => { }).catch(() => {
}); })
}, },
handleSelectionChange(val) { handleSelectionChange(val) {
const res = val.map(item => item.id) const res = val.map(item => item.id)
@ -304,7 +315,7 @@
this.$message({ this.$message({
type: 'error', type: 'error',
message: '请选择一条数据', message: '请选择一条数据',
duration: 1500, duration: 1500
}) })
return return
} }
@ -322,7 +333,7 @@
onClose: () => { onClose: () => {
this.initData() this.initData()
} }
}); })
}) })
}).catch(() => { }).catch(() => {
}) })
@ -340,7 +351,7 @@
}) })
}, },
download(data) { download(data) {
let query = {...data, ...this.listQuery, ...this.query,menuId:this.menuId} let query = { ...data, ...this.listQuery, ...this.query, menuId: this.menuId }
request({ request({
url: `/api/example/Supplier/Actions/Export`, url: `/api/example/Supplier/Actions/Export`,
method: 'GET', method: 'GET',
@ -356,8 +367,8 @@
this.listQuery = { this.listQuery = {
currentPage: 1, currentPage: 1,
pageSize: 20, pageSize: 20,
sort: "desc", sort: 'desc',
sidx: "creatorTime", sidx: 'creatorTime'
} }
this.initData() this.initData()
}, },

@ -1,85 +1,91 @@
<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 :visible.sync="visible" class="JNPF-dialog JNPF-dialog_center" lock-scroll
width="800px"> width="1500px">
<el-row :gutter="15" class=""> <el-row :gutter="15" class="">
<el-form ref="elForm" :model="dataForm" :rules="rules" size="small" label-width="100px" label-position="right" > <el-form ref="elForm" :model="dataForm" :rules="rules" size="small" label-width="100px" label-position="right">
<template v-if="!loading"> <template v-if="!loading">
<el-col :span="24" > <el-col :span="24">
<el-form-item label="仓库编码" <el-form-item label="仓库编码"
prop="code" > prop="code">
<el-input v-model="dataForm.code" <el-input v-model="dataForm.code"
placeholder="请输入" clearable :style='{"width":"100%"}'> placeholder="请输入" clearable :style='{"width":"100%"}'>
</el-input> </el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="24" > <el-col :span="24">
<el-form-item label="仓库名称" <el-form-item label="仓库名称"
prop="name" > prop="name">
<el-input v-model="dataForm.name" <el-input v-model="dataForm.name"
placeholder="请输入仓库名称" clearable :style='{"width":"100%"}'> placeholder="请输入仓库名称" clearable :style='{"width":"100%"}'>
</el-input> </el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="24" > <el-col :span="24">
<el-form-item label="公司" <el-form-item label="公司"
prop="companyCode" > prop="companyCode">
<popupSelect v-model="dataForm.companyCode" <popupSelect v-model="dataForm.companyCode"
placeholder="请选择公司" clearable field="companyCode" interfaceId="394016341591396805" :columnOptions="companyCodecolumnOptions" propsValue="F_Id" relationField="F_FullName" popupType="dialog" placeholder="请选择公司" clearable field="companyCode" interfaceId="394016341591396805"
:columnOptions="companyCodecolumnOptions" propsValue="F_Id" relationField="F_FullName"
popupType="dialog"
popupTitle="选择数据" popupWidth="800px" popupTitle="选择数据" popupWidth="800px"
> >
</popupSelect> </popupSelect>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="24" > <el-col :span="24">
<el-form-item label="仓库位置" <el-form-item label="仓库位置"
prop="location" > prop="location">
<el-input v-model="dataForm.location" <el-input v-model="dataForm.location"
placeholder="请输入仓库位置" clearable :style='{"width":"100%"}'> placeholder="请输入仓库位置" clearable :style='{"width":"100%"}'>
</el-input> </el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="24" > <el-col :span="24">
<el-form-item label="仓库类型" <el-form-item label="仓库类型"
prop="type" > prop="type">
<el-select v-model="dataForm.type" <el-select v-model="dataForm.type"
placeholder="请选择仓库类型" clearable :style='{"width":"100%"}'> placeholder="请选择仓库类型" clearable :style='{"width":"100%"}'>
<el-option v-for="(item, index) in typeOptions" :key="index" :label="item.fullName" :value="item.id" :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="24" > <el-col :span="24">
<el-form-item label="ERP子库" <el-form-item label="ERP子库"
prop="sublibrary" > prop="sublibrary">
<popupSelect v-model="dataForm.sublibrary" <popupSelect v-model="dataForm.sublibrary"
placeholder="请选择子库" clearable field="sublibrary" interfaceId="394818245032483845" :columnOptions="sublibrarycolumnOptions" propsValue="id" relationField="inventory_org_detail_name" popupType="dialog" placeholder="请选择子库" clearable field="sublibrary" interfaceId="394818245032483845"
:columnOptions="sublibrarycolumnOptions" propsValue="id"
relationField="inventory_org_detail_name" popupType="dialog"
popupTitle="选择数据" popupWidth="800px" popupTitle="选择数据" popupWidth="800px"
> >
</popupSelect> </popupSelect>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="24" > <el-col :span="24">
<el-form-item label="激活状态 " <el-form-item label="激活状态 "
prop="activestate" > prop="activestate">
<el-radio-group v-model="dataForm.activestate" <el-radio-group v-model="dataForm.activestate"
size="small" > size="small">
<el-radio v-for="(item, index) in activestateOptions" :key="index" :label="item.id" :disabled="item.disabled" > <el-radio v-for="(item, index) in activestateOptions" :key="index" :label="item.id"
:disabled="item.disabled">
{{item.fullName}} {{item.fullName}}
</el-radio> </el-radio>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="24" > <el-col :span="24">
<el-form-item label="备注" <el-form-item label="备注"
prop="remark" > prop="remark">
<el-input v-model="dataForm.remark" <el-input v-model="dataForm.remark"
placeholder="请输入备注" clearable :style='{"width":"100%"}'> placeholder="请输入备注" clearable :style='{"width":"100%"}'>
@ -87,7 +93,7 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</template> </template>
</el-form> </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>
@ -99,6 +105,7 @@
import request from '@/utils/request' import request from '@/utils/request'
import { getDataInterfaceRes } from '@/api/systemData/dataInterface' import { getDataInterfaceRes } from '@/api/systemData/dataInterface'
import { getDictionaryDataSelector } from '@/api/systemData/dictionary' import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
export default { export default {
components: {}, components: {},
props: [], props: [],
@ -108,28 +115,72 @@
loading: false, loading: false,
isDetail: false, isDetail: false,
dataForm: { dataForm: {
code : '', code: '',
name : '', name: '',
companyCode : "", companyCode: '',
location : '', location: '',
type : "", type: '',
sublibrary : "", sublibrary: '',
activestate : "2", activestate: '2',
remark : '', remark: '',
creatorUserName : "", creatorUserName: '',
creatorTime : "", creatorTime: '',
lastModifyUserName : "", lastModifyUserName: '',
lastModifyTime : "", lastModifyTime: '',
orgId : "", orgId: '',
departmentId : "", departmentId: ''
}, },
rules: rules:
{ {
code: [
{
required: true,
message: '请输入仓库编码',
trigger: 'change'
}
],
name: [
{
required: true,
message: '请选择公司名称',
trigger: 'change'
}
],
type: [
{
required: true,
message: '请输入库房类型',
trigger: 'change'
}
],
sublibrary: [
{
required: true,
message: '请输入ERP库存组织',
trigger: 'change'
}
],
}, },
companyCodecolumnOptions:[ {"label":"公司名称","value":"F_FullName"}, {"label":"公司编码","value":"F_EnCode"},], companyCodecolumnOptions: [{ 'label': '公司名称', 'value': 'F_FullName' }, {
typeOptions:[{"fullName":"原料库","id":"0"},{"fullName":"中间库","id":"1"},{"fullName":"成品库","id":"2"},{"fullName":"副产品库","id":"3"},{"fullName":"废次品库","id":"4"},{"fullName":"备件辅材库","id":"5"},{"fullName":"贸易虚拟库","id":"6"},{"fullName":"仓储库","id":"7"},{"fullName":"能源库","id":"8"},{"fullName":"其他库","id":"9"},{"fullName":"帐外库","id":"10"}], 'label': '公司编码',
sublibrarycolumnOptions:[ {"label":"编码","value":"inventory_org_detail_code"}, {"label":"库存组织详细名称","value":"inventory_org_detail_name"}, {"label":"库存组织名称","value":"inventory_org_name"},], 'value': 'F_EnCode'
activestateOptions:[{"fullName":"激活","id":"1"},{"fullName":"未激活","id":"0"}], }],
typeOptions: [{ 'fullName': '原料库', 'id': '0' }, { 'fullName': '中间库', 'id': '1' }, {
'fullName': '成品库',
'id': '2'
}, { 'fullName': '副产品库', 'id': '3' }, { 'fullName': '废次品库', 'id': '4' }, {
'fullName': '备件辅材库',
'id': '5'
}, { 'fullName': '贸易虚拟库', 'id': '6' }, { 'fullName': '仓储库', 'id': '7' }, {
'fullName': '能源库',
'id': '8'
}, { 'fullName': '其他库', 'id': '9' }, { 'fullName': '帐外库', 'id': '10' }],
sublibrarycolumnOptions: [{ 'label': '编码', 'value': 'inventory_org_detail_code' }, {
'label': '库存组织详细名称',
'value': 'inventory_org_detail_name'
}, { 'label': '库存组织名称', 'value': 'inventory_org_name' }],
activestateOptions: [{ 'fullName': '激活', 'id': '1' }, { 'fullName': '未激活', 'id': '0' }]
} }
}, },
@ -137,38 +188,39 @@
watch: {}, watch: {},
created() { created() {
}, },
mounted() {}, mounted() {
},
methods: { methods: {
clearData(data){ clearData(data) {
for (let key in data) { for (let key in data) {
if (data[key] instanceof Array) { if (data[key] instanceof Array) {
data[key] = []; data[key] = []
} else if (data[key] instanceof Object) { } else if (data[key] instanceof Object) {
this.clearData(data[key]); this.clearData(data[key])
} else { } else {
data[key] = ""; data[key] = ''
} }
} }
}, },
init(id, isDetail) { init(id, isDetail) {
this.dataForm.id = id || 0; this.dataForm.id = id || 0
this.visible = true; this.visible = true
this.isDetail = isDetail || false; this.isDetail = isDetail || false
this.$nextTick(() => { this.$nextTick(() => {
this.$refs['elForm'].resetFields(); this.$refs['elForm'].resetFields()
if(this.dataForm.id){ if (this.dataForm.id) {
this.loading = true this.loading = true
request({ request({
url: '/api/example/WareHouse/'+this.dataForm.id, url: '/api/example/WareHouse/' + this.dataForm.id,
method: 'get' method: 'get'
}).then(res => { }).then(res => {
this.dataInfo(res.data) this.dataInfo(res.data)
this.loading = false this.loading = false
}); })
}else{ } else {
this.clearData(this.dataForm) this.clearData(this.dataForm)
} }
}); })
this.$store.commit('generator/UPDATE_RELATION_DATA', {}) this.$store.commit('generator/UPDATE_RELATION_DATA', {})
}, },
// //
@ -180,7 +232,7 @@
}) })
}, },
request() { request() {
var _data =this.dataList() var _data = this.dataList()
if (!this.dataForm.id) { if (!this.dataForm.id) {
request({ request({
url: '/api/example/WareHouse', url: '/api/example/WareHouse',
@ -197,9 +249,9 @@
} }
}) })
}) })
}else{ } else {
request({ request({
url: '/api/example/WareHouse/'+this.dataForm.id, url: '/api/example/WareHouse/' + this.dataForm.id,
method: 'PUT', method: 'PUT',
data: _data data: _data
}).then((res) => { }).then((res) => {
@ -215,15 +267,15 @@
}) })
} }
}, },
dataList(){ dataList() {
var _data = JSON.parse(JSON.stringify(this.dataForm)); var _data = JSON.parse(JSON.stringify(this.dataForm))
return _data; return _data
}, },
dataInfo(dataAll){ dataInfo(dataAll) {
let _dataAll =dataAll let _dataAll = dataAll
this.dataForm = _dataAll this.dataForm = _dataAll
}, }
}, }
} }
</script> </script>

@ -6,12 +6,12 @@
<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.code" placeholder="请输入" clearable> </el-input> <el-input v-model="query.code" 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-input v-model="query.name" placeholder="请输入" clearable> </el-input> <el-input v-model="query.name" placeholder="请输入" clearable></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
@ -27,9 +27,11 @@
<div> <div>
<el-button type="primary" icon="el-icon-plus" @click="addOrUpdateHandle()"> <el-button type="primary" 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-download" @click="">导入
</el-button>
<el-button type="text" icon="el-icon-delete" @click="handleBatchRemoveDel()">
</el-button> </el-button>
</div> </div>
<div class="JNPF-common-head-right"> <div class="JNPF-common-head-right">
@ -40,43 +42,46 @@
<screenfull isContainer/> <screenfull isContainer/>
</div> </div>
</div> </div>
<JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange' has-c @selection-change="handleSelectionChange"> <JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange' has-c :hasNO="false"
<el-table-column prop="code" label="仓库编码" width="0" align="left" @selection-change="handleSelectionChange" border>
/> <el-table-column type="index" width="50" label="序号" fixed="left" align="center" />
<el-table-column prop="name" label="仓库名称" width="0" align="left" <el-table-column prop="code" label="仓库编码" width="200" align="center" sortable
/> />
<el-table-column prop="companyCode" label="公司" width="0" align="left" <el-table-column prop="name" label="仓库名称" width="200" align="center" sortable
/> />
<el-table-column prop="location" label="仓库位置" width="0" align="left" <el-table-column prop="companyCode" label="公司" width="200" align="center" sortable
/> />
<el-table-column label="仓库类型" width="0" prop="type" algin="left" <el-table-column prop="location" label="仓库位置" width="200" align="center" sortable
> />
<el-table-column label="仓库类型" width="120" prop="type" algin="center" sortable
>
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.type | dynamicText(typeOptions) }} {{ scope.row.type | dynamicText(typeOptions) }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="sublibrary" label="ERP子库" width="0" align="left" <el-table-column prop="sublibrary" label="ERP子库" width="200" align="center" sortable
/> />
<el-table-column label="激活状态 " width="0" prop="activestate" algin="left" <el-table-column label="激活状态 " width="120" prop="activestate" algin="center" sortable
> >
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.activestate | dynamicText(activestateOptions) }} {{ scope.row.activestate | dynamicText(activestateOptions) }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="remark" label="备注" width="0" align="left" <el-table-column prop="remark" label="备注" width="0" align="center" sortable
/> />
<el-table-column label="操作" fixed="right" <el-table-column label="操作" fixed="right"
width="100" > width="100">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" <el-button type="text"
@click="addOrUpdateHandle(scope.row.id)" >编辑 @click="addOrUpdateHandle(scope.row.id)">编辑
</el-button> </el-button>
<el-button type="text" class="JNPF-table-delBtn" @click="handleDel(scope.row.id)"> <el-button type="text" class="JNPF-table-delBtn" @click="handleDel(scope.row.id)">
</el-button> </el-button>
</template> </template>
</el-table-column> </el-table-column>
</JNPF-table> </JNPF-table>
<pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize" @pagination="initData"/> <pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize"
@pagination="initData"/>
</div> </div>
</div> </div>
<JNPF-Form v-if="formVisible" ref="JNPFForm" @refresh="refresh"/> <JNPF-Form v-if="formVisible" ref="JNPFForm" @refresh="refresh"/>
@ -87,20 +92,20 @@
<script> <script>
import request from '@/utils/request' import request from '@/utils/request'
import {getDictionaryDataSelector} from '@/api/systemData/dictionary' import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
import JNPFForm from './Form' import JNPFForm from './Form'
import ExportBox from './ExportBox' import ExportBox from './ExportBox'
import {getDataInterfaceRes} from '@/api/systemData/dataInterface' import { getDataInterfaceRes } from '@/api/systemData/dataInterface'
import Detail from './Detail' import Detail from './Detail'
export default { export default {
components: {JNPFForm, ExportBox,Detail}, components: { JNPFForm, ExportBox, Detail },
data() { data() {
return { return {
detailVisible: false, detailVisible: false,
query: { query: {
code:undefined, code: undefined,
name:undefined, name: undefined
}, },
treeProps: { treeProps: {
children: 'children', children: 'children',
@ -113,25 +118,34 @@
listQuery: { listQuery: {
currentPage: 1, currentPage: 1,
pageSize: 20, pageSize: 20,
sort: "desc", sort: 'desc',
sidx: "creatorTime", sidx: 'creatorTime'
}, },
formVisible: false, formVisible: false,
exportBoxVisible: false, exportBoxVisible: false,
columnList: [ columnList: [
{prop: 'code', label: '仓库编码'}, { prop: 'code', label: '仓库编码' },
{prop: 'name', label: '仓库名称'}, { prop: 'name', label: '仓库名称' },
{prop: 'companyCode', label: '公司'}, { prop: 'companyCode', label: '公司' },
{prop: 'location', label: '仓库位置'}, { prop: 'location', label: '仓库位置' },
{prop: 'type', label: '仓库类型'}, { prop: 'type', label: '仓库类型' },
{prop: 'sublibrary', label: 'ERP子库'}, { prop: 'sublibrary', label: 'ERP子库' },
{prop: 'activestate', label: '激活状态 '}, { prop: 'activestate', label: '激活状态 ' },
{prop: 'remark', label: '备注'}, { prop: 'remark', label: '备注' }
], ],
typeOptions:[{"fullName":"原料库","id":"0"},{"fullName":"中间库","id":"1"},{"fullName":"成品库","id":"2"},{"fullName":"副产品库","id":"3"},{"fullName":"废次品库","id":"4"},{"fullName":"备件辅材库","id":"5"},{"fullName":"贸易虚拟库","id":"6"},{"fullName":"仓储库","id":"7"},{"fullName":"能源库","id":"8"},{"fullName":"其他库","id":"9"},{"fullName":"帐外库","id":"10"}], typeOptions: [{ 'fullName': '原料库', 'id': '0' }, { 'fullName': '中间库', 'id': '1' }, {
typeProps:{"label":"fullName","value":"id"}, 'fullName': '成品库',
activestateOptions:[{"fullName":"激活","id":"1"},{"fullName":"未激活","id":"0"}], 'id': '2'
activestateProps:{"label":"fullName","value":"id"}, }, { 'fullName': '副产品库', 'id': '3' }, { 'fullName': '废次品库', 'id': '4' }, {
'fullName': '备件辅材库',
'id': '5'
}, { 'fullName': '贸易虚拟库', 'id': '6' }, { 'fullName': '仓储库', 'id': '7' }, {
'fullName': '能源库',
'id': '8'
}, { 'fullName': '其他库', 'id': '9' }, { 'fullName': '帐外库', 'id': '10' }],
typeProps: { 'label': 'fullName', 'value': 'id' },
activestateOptions: [{ 'fullName': '激活', 'id': '1' }, { 'fullName': '未激活', 'id': '0' }],
activestateProps: { 'label': 'fullName', 'value': 'id' }
} }
}, },
computed: { computed: {
@ -143,32 +157,32 @@
this.initData() this.initData()
}, },
methods: { methods: {
goDetail(id){ goDetail(id) {
this.detailVisible = true this.detailVisible = true
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.Detail.init(id) this.$refs.Detail.init(id)
}) })
}, },
sortChange({column, prop, order}) { sortChange({ column, prop, order }) {
this.listQuery.sort = order == 'ascending' ? 'asc' : 'desc' this.listQuery.sort = order == 'ascending' ? 'asc' : 'desc'
this.listQuery.sidx = !order ? '' : prop this.listQuery.sidx = !order ? '' : prop
this.initData() this.initData()
}, },
initData() { initData() {
this.listLoading = true; this.listLoading = true
let _query = { let _query = {
...this.listQuery, ...this.listQuery,
...this.query, ...this.query,
menuId:this.menuId menuId: this.menuId
}; }
request({ request({
url: `/api/example/WareHouse/getList`, url: `/api/example/WareHouse/getList`,
method: 'post', method: 'post',
data: _query data: _query
}).then(res => { }).then(res => {
var _list =[]; var _list = []
for(let i=0;i<res.data.list.length;i++){ for (let i = 0; i < res.data.list.length; i++) {
let _data = res.data.list[i]; let _data = res.data.list[i]
_list.push(_data) _list.push(_data)
} }
this.list = _list this.list = _list
@ -191,10 +205,10 @@
onClose: () => { onClose: () => {
this.initData() this.initData()
} }
}); })
}) })
}).catch(() => { }).catch(() => {
}); })
}, },
handleSelectionChange(val) { handleSelectionChange(val) {
const res = val.map(item => item.id) const res = val.map(item => item.id)
@ -205,7 +219,7 @@
this.$message({ this.$message({
type: 'error', type: 'error',
message: '请选择一条数据', message: '请选择一条数据',
duration: 1500, duration: 1500
}) })
return return
} }
@ -223,7 +237,7 @@
onClose: () => { onClose: () => {
this.initData() this.initData()
} }
}); })
}) })
}).catch(() => { }).catch(() => {
}) })
@ -241,7 +255,7 @@
}) })
}, },
download(data) { download(data) {
let query = {...data, ...this.listQuery, ...this.query,menuId:this.menuId} let query = { ...data, ...this.listQuery, ...this.query, menuId: this.menuId }
request({ request({
url: `/api/example/WareHouse/Actions/Export`, url: `/api/example/WareHouse/Actions/Export`,
method: 'GET', method: 'GET',
@ -257,8 +271,8 @@
this.listQuery = { this.listQuery = {
currentPage: 1, currentPage: 1,
pageSize: 20, pageSize: 20,
sort: "desc", sort: 'desc',
sidx: "creatorTime", sidx: 'creatorTime'
} }
this.initData() this.initData()
}, },

Loading…
Cancel
Save