|
|
@@ -1,241 +1,124 @@
|
|
|
<template>
|
|
|
- <div>
|
|
|
- <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:8" :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"
|
|
|
- :before-open="beforeOpen"
|
|
|
- @row-del="rowDel"
|
|
|
- @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-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-scope="{row}" slot="querenshou">
|
|
|
- <el-button type="primary" size="small" @click="">结 算</el-button>
|
|
|
- </template>
|
|
|
- <template slot-scope="scope" slot="menu">
|
|
|
- <el-button
|
|
|
- type="text"
|
|
|
- icon="el-icon-view"
|
|
|
- size="small"
|
|
|
- @click.stop="beforeOpenPage(scope.row,scope.index)"
|
|
|
- >查看
|
|
|
- </el-button>
|
|
|
- <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-edit"
|
|
|
- size="small"
|
|
|
- @click.stop="rowDel(scope.row,scope.index)"
|
|
|
- >移除
|
|
|
- </el-button>
|
|
|
- </template>
|
|
|
- </avue-crud>
|
|
|
- </basic-container>
|
|
|
- </div>
|
|
|
+ <basic-container>
|
|
|
+ <avue-crud
|
|
|
+ ref="crud"
|
|
|
+ :data="data"
|
|
|
+ :option="option"
|
|
|
+ :page.sync="page"
|
|
|
+ :table-loading="loading"
|
|
|
+ :before-open="beforeOpen"
|
|
|
+ @row-del="rowDel"
|
|
|
+ @size-change="sizeChange"
|
|
|
+ @current-change="currentChange"
|
|
|
+ @search-change="searchChange"
|
|
|
+ @refresh-change="refreshChange"
|
|
|
+ @cell-dblclick="cellDblclick"
|
|
|
+ @on-load="getList"
|
|
|
+ @saveColumn="saveColumn"
|
|
|
+ >
|
|
|
+ <template slot-scope="{row,index}" slot="menuLeft">
|
|
|
+ <el-button type="primary"
|
|
|
+ size="small"
|
|
|
+ icon="el-icon-arrow-right"
|
|
|
+ plain
|
|
|
+ @click="">导 出
|
|
|
+ </el-button>
|
|
|
+ <el-button type="success"
|
|
|
+ size="small"
|
|
|
+ icon="el-icon-plus"
|
|
|
+ plain
|
|
|
+ @click="addSettleAccounts">新 单
|
|
|
+ </el-button>
|
|
|
+ </template>
|
|
|
+ <template slot-scope="scope" slot="menu">
|
|
|
+ <el-button icon="el-icon-check" size="small" type="text" @click.stop="beforeOpenPage(scope.row,scope.index)">详 情</el-button>
|
|
|
+ </template>
|
|
|
+ </avue-crud>
|
|
|
+ </basic-container>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
import option from "./configuration/settleAccounts.json";
|
|
|
- import {customerList, typeSave,detail,deleteDetails} from "@/api/basicData/customerCategory"
|
|
|
|
|
|
export default {
|
|
|
- name: "customerInformation",
|
|
|
data() {
|
|
|
return {
|
|
|
- form: {},
|
|
|
+ loading: false,
|
|
|
+ data: [],
|
|
|
option: option,
|
|
|
- parentId:0,
|
|
|
- dataList: [],
|
|
|
page: {
|
|
|
- pageSize: 10,
|
|
|
- pagerCount: 5,
|
|
|
+ currentPage: 1,
|
|
|
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'
|
|
|
- }
|
|
|
- ]
|
|
|
- }
|
|
|
- ],
|
|
|
- },
|
|
|
- }
|
|
|
+ pageSize: 10
|
|
|
+ }
|
|
|
+ };
|
|
|
},
|
|
|
- created() {
|
|
|
-
|
|
|
+ mounted() {
|
|
|
+ option.height = window.innerHeight - 350 ;
|
|
|
},
|
|
|
methods: {
|
|
|
- //新增时跳转页面
|
|
|
- beforeOpen(row){
|
|
|
+ getList() {
|
|
|
+ this.loading = true;
|
|
|
+ setTimeout(() => {
|
|
|
+ this.loading = false;
|
|
|
+ this.data = [
|
|
|
+ {
|
|
|
+ prop1: "TUBAO",
|
|
|
+ prop2: "途宝注册",
|
|
|
+ prop3: "途宝",
|
|
|
+ prop4: "2100",
|
|
|
+ prop5: "1500",
|
|
|
+ prop6: "李俊平",
|
|
|
+ prop7: "XM0001",
|
|
|
+ prop8: "暂存",
|
|
|
+ prop9: "效率高",
|
|
|
+ prop10: "LOLO",
|
|
|
+ prop11: "2021-1-1",
|
|
|
+ prop12: "LOLO",
|
|
|
+ prop13: "2021-1-1",
|
|
|
+ prop14: "15199999999"
|
|
|
+ }
|
|
|
+ ];
|
|
|
+ this.page.total = 1;
|
|
|
+ }, 1000);
|
|
|
+ },
|
|
|
+ //新单打开
|
|
|
+ addSettleAccounts(){
|
|
|
this.$router.push({
|
|
|
- path: "/settleAccounts_editPages",
|
|
|
- query: {id: JSON.stringify(row.fwxm)},
|
|
|
+ path: "/settleAccounts_detailsPage",
|
|
|
+ query: {id: ""},
|
|
|
});
|
|
|
},
|
|
|
- //查看
|
|
|
- beforeOpenPage(row){
|
|
|
+ //新增和修改时打开
|
|
|
+ beforeOpen(row, index){
|
|
|
this.$router.push({
|
|
|
- path: "/settleAccounts_editPages",
|
|
|
- query: {id: JSON.stringify(row.fwxm)},
|
|
|
+ path: "/settleAccounts_detailsPage",
|
|
|
+ query: {id: JSON.stringify(row.prop1)},
|
|
|
});
|
|
|
},
|
|
|
- //修改
|
|
|
- editOpen(row){
|
|
|
+ //打开详情页
|
|
|
+ beforeOpenPage(row,index){
|
|
|
this.$router.push({
|
|
|
- path: "/settleAccounts_editPages",
|
|
|
- query: {id: JSON.stringify(row.fwxm)},
|
|
|
+ path: "/settleAccounts_detailsPage",
|
|
|
+ query: {id: JSON.stringify(row.prop1)},
|
|
|
});
|
|
|
},
|
|
|
+ searchChange(params, done) {
|
|
|
+ this.getList(this.page, params);
|
|
|
+ done();
|
|
|
+ },
|
|
|
+ sizeChange(val) {
|
|
|
+ this.page.pageSize = val;
|
|
|
+ this.getList();
|
|
|
+ },
|
|
|
+ currentChange(val) {
|
|
|
+ this.page.currentPage = val;
|
|
|
+ this.getList();
|
|
|
+ },
|
|
|
+ refreshChange() {
|
|
|
+ this.page.currentPage = 1;
|
|
|
+ this.getList();
|
|
|
+ },
|
|
|
//删除列表后面的删除按钮触发触发(row, index, done)
|
|
|
rowDel(row, index, done) {
|
|
|
this.$confirm("确定将选择数据删除?", {
|
|
|
@@ -251,90 +134,15 @@
|
|
|
done(row);
|
|
|
});
|
|
|
},
|
|
|
- //点击搜索按钮触发
|
|
|
- searchChange(params, done) {
|
|
|
- this.query = params;
|
|
|
- this.page.currentPage = 1;
|
|
|
- params.parentId = 0
|
|
|
- this.onLoad(this.page, params);
|
|
|
- done()
|
|
|
- },
|
|
|
- searchReset() {
|
|
|
- console.log('1')
|
|
|
- },
|
|
|
- selectionChange() {
|
|
|
- console.log('1')
|
|
|
+ cellDblclick(row, column, cell, event) {
|
|
|
+ console.log(row, column, cell, event);
|
|
|
+ this.$refs.crud.rowEdit(row);
|
|
|
},
|
|
|
- currentChange() {
|
|
|
- console.log('1')
|
|
|
- },
|
|
|
- sizeChange() {
|
|
|
- console.log('1')
|
|
|
- },
|
|
|
- refreshChange() {
|
|
|
- console.log('1')
|
|
|
- },
|
|
|
- onLoad(page, params = {}) {
|
|
|
- const {createTimeA} = this.query;
|
|
|
- let values = {
|
|
|
- ...params,
|
|
|
- size:this.page.pageSize,
|
|
|
- current:this.page.currentPage
|
|
|
- };
|
|
|
- if (createTimeA) {
|
|
|
- values = {
|
|
|
- ...params,
|
|
|
- createTime: createTimeA[0] + ' 00:00:00',
|
|
|
- endTime: createTimeA[1] + ' 23:59:59',
|
|
|
- ...this.query,
|
|
|
- size:this.page.pageSize,
|
|
|
- current:this.page.currentPage
|
|
|
- };
|
|
|
- values.createTimeA = null;
|
|
|
- }
|
|
|
- values.parentId = 0
|
|
|
- customerList(values).then(res => {
|
|
|
- this.dataList = [
|
|
|
- {
|
|
|
- fwxm: "食品许可",
|
|
|
- sfjy: "5000",
|
|
|
- jjdw: "次",
|
|
|
- sl:"12",
|
|
|
- bj: "3000",
|
|
|
- hjje: "6000",
|
|
|
- qesf: "8000",
|
|
|
- hejijin:"1500",
|
|
|
- querenshou:"300",
|
|
|
- pinlv:"年",
|
|
|
- tixingri:"2022-11-30",
|
|
|
- beizhu:"132",
|
|
|
- renwubu:"商务部",
|
|
|
- cnegzuoren:"小明",
|
|
|
- },
|
|
|
- {
|
|
|
- fwxm: "食品许可",
|
|
|
- sfjy: "5000",
|
|
|
- jjdw: "次",
|
|
|
- sl:"12",
|
|
|
- bj: "3000",
|
|
|
- hjje: "6000",
|
|
|
- qesf: "8000",
|
|
|
- hejijin:"1500",
|
|
|
- querenshou:"300",
|
|
|
- pinlv:"年",
|
|
|
- tixingri:"2022-11-30",
|
|
|
- beizhu:"132",
|
|
|
- renwubu:"商务部",
|
|
|
- cnegzuoren:"小明",
|
|
|
- }
|
|
|
- ];
|
|
|
- this.page.total = 1;
|
|
|
- })
|
|
|
+ saveColumn(row, column) {
|
|
|
+ console.log(row, column);
|
|
|
},
|
|
|
}
|
|
|
- }
|
|
|
+ };
|
|
|
</script>
|
|
|
|
|
|
-<style scoped>
|
|
|
-
|
|
|
-</style>
|
|
|
+<style></style>
|