|
|
@@ -1,282 +1,122 @@
|
|
|
<template>
|
|
|
- <div>
|
|
|
- <containerTitle title="基础信息"></containerTitle>
|
|
|
- <basic-container>
|
|
|
- <el-form :model="form" ref="form" label-width="130px">
|
|
|
- <el-row>
|
|
|
- <el-col v-for="(item, index) in basicData.column" :span="item.span?item.span:6" :key="index">
|
|
|
- <el-form-item :label="item.label" :prop="item.prop" :rules="item.rules">
|
|
|
- <el-date-picker v-if="item.type === 'datetime'" style="width: 100%;" v-model="form[item.prop]" size="small" type="datetime" placeholder="选择日期" value-format="yyyy-MM-dd HH:mm:ss"/>
|
|
|
- <el-select v-else-if="item.type === 'select'" style="width: 100%" size="small" placeholder="请选择" clearable filterable></el-select>
|
|
|
- <el-input type="age" v-else v-model="form[item.prop]" size="small" autocomplete="off" placeholder="请输入"></el-input>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- </el-form>
|
|
|
- </basic-container>
|
|
|
- <basic-container>
|
|
|
- <avue-crud :option="option"
|
|
|
- :data="dataList"
|
|
|
- ref="crud"
|
|
|
- v-model="form"
|
|
|
- :page.sync="page"
|
|
|
- @search-reset="searchReset"
|
|
|
- @selection-change="selectionChange"
|
|
|
- @current-change="currentChange"
|
|
|
- @size-change="sizeChange"
|
|
|
- @refresh-change="refreshChange"
|
|
|
- @on-load="onLoad">
|
|
|
- <template slot="menuLeft">
|
|
|
- <el-button type="primary"
|
|
|
- size="small"
|
|
|
- icon="el-icon-arrow-right"
|
|
|
- plain
|
|
|
- @click="">选择采购合同
|
|
|
- </el-button>
|
|
|
- <el-button type="primary"
|
|
|
- size="small"
|
|
|
- plain
|
|
|
- @click="">保存
|
|
|
- </el-button>
|
|
|
- <el-button type="info"
|
|
|
- size="small"
|
|
|
- plain
|
|
|
- @click="">打印
|
|
|
- </el-button>
|
|
|
- </template>
|
|
|
- <template slot="menuRight">
|
|
|
- <el-button type="info"
|
|
|
- size="small"
|
|
|
- plain
|
|
|
- @click="">请核
|
|
|
- </el-button>
|
|
|
- </template>
|
|
|
- <template slot-scope="scope" slot="menu">
|
|
|
- <el-button
|
|
|
- type="text"
|
|
|
- icon="el-icon-view"
|
|
|
- size="small"
|
|
|
- @click.stop=""
|
|
|
- >费用确认
|
|
|
- </el-button>
|
|
|
- <el-button
|
|
|
- type="text"
|
|
|
- icon="el-icon-edit"
|
|
|
- size="small"
|
|
|
- @click.stop=""
|
|
|
- >移除数据
|
|
|
- </el-button>
|
|
|
- </template>
|
|
|
- </avue-crud>
|
|
|
- </basic-container>
|
|
|
- </div>
|
|
|
+ <basic-container>
|
|
|
+ <avue-crud :option="option"
|
|
|
+ :data="dataList"
|
|
|
+ ref="crud"
|
|
|
+ v-model="form"
|
|
|
+ :page.sync="page"
|
|
|
+ :table-loading="loading"
|
|
|
+ @search-change="searchChange"
|
|
|
+ @search-reset="searchReset"
|
|
|
+ @selection-change="selectionChange"
|
|
|
+ @current-change="currentChange"
|
|
|
+ @size-change="sizeChange"
|
|
|
+ @refresh-change="refreshChange"
|
|
|
+ @on-load="onLoad">
|
|
|
+ <template slot="menuLeft">
|
|
|
+ <el-button type="primary"
|
|
|
+ size="small"
|
|
|
+ icon="el-icon-plus"
|
|
|
+ @click="addReceipt">新 单
|
|
|
+ </el-button>
|
|
|
+ <el-button size="small"
|
|
|
+ type="success"
|
|
|
+ @click.stop=""
|
|
|
+ >复制新单
|
|
|
+ </el-button>
|
|
|
+ <el-button size="small"
|
|
|
+ type="info"
|
|
|
+ @click.stop="openReport()"
|
|
|
+ >导出报表
|
|
|
+ </el-button>
|
|
|
+ </template>
|
|
|
+ <template slot-scope="scope" slot="menu">
|
|
|
+ <el-button
|
|
|
+ type="text"
|
|
|
+ icon="el-icon-edit"
|
|
|
+ size="small"
|
|
|
+ @click.stop="editOpen(scope.row, scope.index)"
|
|
|
+ >编辑
|
|
|
+ </el-button>
|
|
|
+ <el-button
|
|
|
+ type="text"
|
|
|
+ icon="el-icon-delete"
|
|
|
+ size="small"
|
|
|
+ @click.stop="rowDel(scope.row, scope.index)"
|
|
|
+ >删除
|
|
|
+ </el-button>
|
|
|
+ </template>
|
|
|
+ </avue-crud>
|
|
|
+ </basic-container>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
- import option from "./configuration/mainList.json";
|
|
|
+ import option from "./configuration/paymentList.json";
|
|
|
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
+ loading : false,
|
|
|
form: {},
|
|
|
option: option,
|
|
|
parentId:0,
|
|
|
- dataList: [],
|
|
|
+ dataList: [{
|
|
|
+ canem:""
|
|
|
+ }],
|
|
|
page: {
|
|
|
pageSize: 10,
|
|
|
pagerCount: 5,
|
|
|
total: 0,
|
|
|
},
|
|
|
- query:{},
|
|
|
- //顶部from数据
|
|
|
- basicData: {
|
|
|
- column: [
|
|
|
- {
|
|
|
- label: '系统号',
|
|
|
- prop: 'orderNo',
|
|
|
- rules: [
|
|
|
- {
|
|
|
- required: false,
|
|
|
- message: ' ',
|
|
|
- trigger: 'blur'
|
|
|
- }
|
|
|
- ]
|
|
|
- }, {
|
|
|
- label: '制单日期',
|
|
|
- prop: 'orderNo',
|
|
|
- rules: [
|
|
|
- {
|
|
|
- required: true,
|
|
|
- message: ' ',
|
|
|
- trigger: 'blur'
|
|
|
- }
|
|
|
- ]
|
|
|
- }, {
|
|
|
- label: '单据状态',
|
|
|
- prop: 'orderNo',
|
|
|
- data: [],
|
|
|
- rules: [
|
|
|
- {
|
|
|
- required: true,
|
|
|
- message: ' ',
|
|
|
- trigger: 'blur'
|
|
|
- }
|
|
|
- ]
|
|
|
- }, {
|
|
|
- label: '制单人',
|
|
|
- prop: 'orderNo',
|
|
|
- data: [],
|
|
|
- rules: [
|
|
|
- {
|
|
|
- required: true,
|
|
|
- message: ' ',
|
|
|
- trigger: 'blur'
|
|
|
- }
|
|
|
- ]
|
|
|
- }, {
|
|
|
- label: '供应商',
|
|
|
- prop: 'orderNo',
|
|
|
- rules: [
|
|
|
- {
|
|
|
- required: true,
|
|
|
- message: ' ',
|
|
|
- trigger: 'blur'
|
|
|
- }
|
|
|
- ]
|
|
|
- }, {
|
|
|
- label: '要求付款日期',
|
|
|
- prop: 'orderNo',
|
|
|
- rules: [
|
|
|
- {
|
|
|
- required: true,
|
|
|
- message: ' ',
|
|
|
- trigger: 'blur'
|
|
|
- }
|
|
|
- ]
|
|
|
- }, {
|
|
|
- label: '金额',
|
|
|
- prop: 'orderNo',
|
|
|
- type:'datetime',
|
|
|
- data: [],
|
|
|
- rules: [
|
|
|
- {
|
|
|
- required: true,
|
|
|
- message: ' ',
|
|
|
- trigger: 'blur'
|
|
|
- }
|
|
|
- ]
|
|
|
- }, {
|
|
|
- label: '银行户头',
|
|
|
- prop: 'orderNo',
|
|
|
- type:'datetime',
|
|
|
- data: [],
|
|
|
- rules: [
|
|
|
- {
|
|
|
- required: true,
|
|
|
- message: ' ',
|
|
|
- trigger: 'blur'
|
|
|
- }
|
|
|
- ]
|
|
|
- }, {
|
|
|
- label: '银行名称',
|
|
|
- prop: 'orderNo',
|
|
|
- type:'select',
|
|
|
- data: [],
|
|
|
- rules: [
|
|
|
- {
|
|
|
- required: true,
|
|
|
- message: ' ',
|
|
|
- trigger: 'blur'
|
|
|
- }
|
|
|
- ]
|
|
|
- }, {
|
|
|
- label: '银行账号',
|
|
|
- prop: 'orderNo',
|
|
|
- rules: [
|
|
|
- {
|
|
|
- required: true,
|
|
|
- message: ' ',
|
|
|
- trigger: 'blur'
|
|
|
- }
|
|
|
- ]
|
|
|
- },
|
|
|
- {
|
|
|
- label: '币别',
|
|
|
- prop: 'orderNo',
|
|
|
- rules: [
|
|
|
- {
|
|
|
- required: true,
|
|
|
- message: ' ',
|
|
|
- trigger: 'blur'
|
|
|
- }
|
|
|
- ]
|
|
|
- },
|
|
|
- {
|
|
|
- label: '汇率',
|
|
|
- prop: 'orderNo',
|
|
|
- rules: [
|
|
|
- {
|
|
|
- required: true,
|
|
|
- message: ' ',
|
|
|
- trigger: 'blur'
|
|
|
- }
|
|
|
- ]
|
|
|
- },
|
|
|
- {
|
|
|
- label: '手续费',
|
|
|
- prop: 'orderNo',
|
|
|
- rules: [
|
|
|
- {
|
|
|
- required: true,
|
|
|
- message: ' ',
|
|
|
- trigger: 'blur'
|
|
|
- }
|
|
|
- ]
|
|
|
- },
|
|
|
- {
|
|
|
- label: '实际付款日期',
|
|
|
- prop: 'orderNo',
|
|
|
- rules: [
|
|
|
- {
|
|
|
- required: true,
|
|
|
- message: ' ',
|
|
|
- trigger: 'blur'
|
|
|
- }
|
|
|
- ]
|
|
|
- },
|
|
|
- {
|
|
|
- label: '合同号',
|
|
|
- prop: 'orderNo',
|
|
|
- rules: [
|
|
|
- {
|
|
|
- required: true,
|
|
|
- message: ' ',
|
|
|
- trigger: 'blur'
|
|
|
- }
|
|
|
- ]
|
|
|
- },
|
|
|
- {
|
|
|
- label: '备注',
|
|
|
- prop: 'orderNo',
|
|
|
- rules: [
|
|
|
- {
|
|
|
- required: true,
|
|
|
- message: ' ',
|
|
|
- trigger: 'blur'
|
|
|
- }
|
|
|
- ]
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
+ query:{}
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
|
|
|
|
},
|
|
|
mounted() {
|
|
|
- option.height = window.innerHeight - 640 ;
|
|
|
+ option.height = window.innerHeight - 350 ;
|
|
|
},
|
|
|
methods: {
|
|
|
+ //新单打开
|
|
|
+ addReceipt(){
|
|
|
+ this.$router.push({
|
|
|
+ path: "/payment_detailsPage",
|
|
|
+ query: {id: ''},
|
|
|
+ });
|
|
|
+ },
|
|
|
+ //编辑打开
|
|
|
+ editOpen(row, index){
|
|
|
+ this.$router.push({
|
|
|
+ path: "/payment_detailsPage",
|
|
|
+ query: {id:row.id},
|
|
|
+ });
|
|
|
+ },
|
|
|
+ rowDel(row, index, done) {
|
|
|
+ if(row.id){
|
|
|
+ this.$confirm("确定将选择数据删除?", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning"
|
|
|
+ }).then(() => {
|
|
|
+ deleteMain(row.id).then(res =>{
|
|
|
+ this.$message({
|
|
|
+ type: "success",
|
|
|
+ message: "操作成功!"
|
|
|
+ });
|
|
|
+ })
|
|
|
+ // 数据回调进行刷新
|
|
|
+ this.onLoad(this.page);
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },
|
|
|
+ //点击搜索按钮触发
|
|
|
+ searchChange(params, done) {
|
|
|
+ this.query = params;
|
|
|
+ this.page.currentPage = 1;
|
|
|
+ this.onLoad(this.page, params);
|
|
|
+ done()
|
|
|
+ },
|
|
|
searchReset() {
|
|
|
console.log('1')
|
|
|
},
|
|
|
@@ -293,23 +133,16 @@
|
|
|
console.log('1')
|
|
|
},
|
|
|
onLoad(page, params = {}) {
|
|
|
- this.dataList = [
|
|
|
- {
|
|
|
- cname: "采购合同",
|
|
|
- sort: "5000",
|
|
|
- createTime: "次",
|
|
|
- createUser:"12",
|
|
|
- remark: "3000",
|
|
|
- },
|
|
|
- {
|
|
|
- cname: "采购合同",
|
|
|
- sort: "5000",
|
|
|
- createTime: "次",
|
|
|
- createUser:"12",
|
|
|
- remark: "3000",
|
|
|
- }
|
|
|
- ];
|
|
|
- this.page.total = 1;
|
|
|
+ if(!params.status){
|
|
|
+ params.status = "1,4,5";
|
|
|
+ }
|
|
|
+ this.loading = true
|
|
|
+ // getFlowList(page.currentPage, page.pageSize,params).then(res =>{
|
|
|
+ // this.dataList = res.data.data.records
|
|
|
+ // this.page.total = res.data.data.total
|
|
|
+ // this.loading = false
|
|
|
+ // })
|
|
|
+ this.loading = false
|
|
|
},
|
|
|
}
|
|
|
}
|