|
|
@@ -5,6 +5,9 @@
|
|
|
<el-button type="danger" style="border: none;background: none;color: red" icon="el-icon-arrow-left"
|
|
|
@click="backToList">返回列表
|
|
|
</el-button>
|
|
|
+ <el-button class="el-button--small-yh add-customer-btn" type="primary"
|
|
|
+ >保存
|
|
|
+ </el-button>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div style="margin-top: 60px">
|
|
|
@@ -17,9 +20,7 @@
|
|
|
<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-date-picker v-else-if="item.type === 'date'" style="width: 100%;" v-model="form[item.prop]" size="small" type="date" placeholder="选择日期" value-format="yyyy-MM-dd"/>
|
|
|
<el-select v-else-if="item.type === 'select'" style="width: 100%" size="small" placeholder="请选择" clearable filterable></el-select>
|
|
|
- <el-input type="text" v-else-if="item.prop === 'prop5'" v-else v-model="form[item.prop]" size="small" placeholder="请输入">
|
|
|
- <el-button slot="append" icon="el-icon-search" @click="customerDialog = true"></el-button>
|
|
|
- </el-input>
|
|
|
+ <selectComponent v-else-if="item.prop === 'corpId'" v-model="form[item.prop]" :configuration="configuration"/>
|
|
|
<el-input type="age" v-else v-model="form[item.prop]" size="small" autocomplete="off" placeholder="请输入"></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
@@ -39,9 +40,9 @@
|
|
|
@row-save="rowSave"
|
|
|
@size-change="sizeChange"
|
|
|
@current-change="currentChange"
|
|
|
+ @selection-change="selectionChange"
|
|
|
@search-change="searchChange"
|
|
|
@refresh-change="refreshChange"
|
|
|
- @cell-dblclick="cellDblclick"
|
|
|
@on-load="getList"
|
|
|
@saveColumn="saveColumn"
|
|
|
>
|
|
|
@@ -52,27 +53,29 @@
|
|
|
plain
|
|
|
@click="serviceDialog = true">新增明细
|
|
|
</el-button>
|
|
|
- <el-button type="primary"
|
|
|
+ <el-button type="success"
|
|
|
size="small"
|
|
|
- icon="el-icon-arrow-right"
|
|
|
+ icon="el-icon-plus"
|
|
|
plain
|
|
|
- @click="">导 出
|
|
|
+ @click="">新 单
|
|
|
</el-button>
|
|
|
- <el-button type="primary"
|
|
|
+ <el-button type="info"
|
|
|
size="small"
|
|
|
plain
|
|
|
- @click="">打 印
|
|
|
+ @click="">请 核
|
|
|
</el-button>
|
|
|
- <el-button type="success"
|
|
|
+ </template>
|
|
|
+ <template slot="menuRight">
|
|
|
+ <el-button type="primary"
|
|
|
size="small"
|
|
|
- icon="el-icon-plus"
|
|
|
+ icon="el-icon-arrow-right"
|
|
|
plain
|
|
|
- @click="">新 单
|
|
|
+ @click="">导 出
|
|
|
</el-button>
|
|
|
- <el-button type="info"
|
|
|
+ <el-button type="primary"
|
|
|
size="small"
|
|
|
plain
|
|
|
- @click="">请 核
|
|
|
+ @click="">打 印
|
|
|
</el-button>
|
|
|
</template>
|
|
|
<template slot-scope="{row,index}" slot="menu">
|
|
|
@@ -82,14 +85,29 @@
|
|
|
@click="rowCellTwo(row,index)"
|
|
|
>{{row.$cellEdit?'保存':'修改'}}</el-button>
|
|
|
</template>
|
|
|
+ <template slot="userId" slot-scope="{row,index}">
|
|
|
+ <span style="float: left;padding-top: 2px">{{ row.userId }}</span>
|
|
|
+ <el-button type="text" size="mini" style="float: right" @click="selectUser(row)">选择</el-button>
|
|
|
+ </template>
|
|
|
</avue-crud>
|
|
|
</basic-container>
|
|
|
+ <containerTitle title="附件上传"></containerTitle>
|
|
|
+ <basic-container style="margin-bottom: 40px">
|
|
|
+ <avue-crud
|
|
|
+ :option="upLoadOption"
|
|
|
+ v-model="upLoadForm"
|
|
|
+ :data="upLoadData"
|
|
|
+ @row-save="upLoadSave"
|
|
|
+ @row-update="upLoadUpdate"
|
|
|
+ @row-del="upLoadDel"
|
|
|
+ ></avue-crud>
|
|
|
+ </basic-container>
|
|
|
</div>
|
|
|
<el-dialog
|
|
|
- title="选择客户"
|
|
|
+ title="导入服务项目"
|
|
|
append-to-body
|
|
|
class="el-dialogDeep"
|
|
|
- :visible.sync="customerDialog"
|
|
|
+ :visible.sync="serviceDialog"
|
|
|
width="70%"
|
|
|
:close-on-click-modal="false"
|
|
|
:destroy-on-close="true"
|
|
|
@@ -99,84 +117,87 @@
|
|
|
<div>
|
|
|
<el-scrollbar>
|
|
|
<basic-container>
|
|
|
- <avue-tree :option="customerTreeOption" @node-click="customerNodeClick"/>
|
|
|
+ <avue-tree :option="serviceTreeOption" @node-click="serviceNodeClick"/>
|
|
|
</basic-container>
|
|
|
</el-scrollbar>
|
|
|
</div>
|
|
|
</el-col>
|
|
|
<el-col :span="19">
|
|
|
<basic-container>
|
|
|
- <avue-crud ref="customerCrud"
|
|
|
- :page.sync="customerPage"
|
|
|
- :search.sync="customerSearch"
|
|
|
- :option="customerOption"
|
|
|
- :table-loading="customerLoading"
|
|
|
- :data="customerData"
|
|
|
- @row-dblclick="customerConfirm"
|
|
|
- @refresh-change="customerRefreshChange"
|
|
|
- @selection-change="customerSelectionChange"
|
|
|
- @search-change="customerSearchChange"
|
|
|
- @on-load="customerOnLoad">
|
|
|
+ <avue-crud ref="serviceCrud"
|
|
|
+ :page.sync="servicePage"
|
|
|
+ :search.sync="serviceSearch"
|
|
|
+ :option="serviceOption"
|
|
|
+ :table-loading="serviceLoading"
|
|
|
+ :data="serviceData"
|
|
|
+ @refresh-change="serviceRefreshChange"
|
|
|
+ @selection-change="serviceSelectionChange"
|
|
|
+ @search-change="serviceSearchChange"
|
|
|
+ @on-load="serviceOnLoad">
|
|
|
</avue-crud>
|
|
|
</basic-container>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
<span slot="footer" class="dialog-footer">
|
|
|
- <el-button type="primary" @click="customerConfirm('confirm')" :disabled="this.customerSelectList.length == 0|| this.customerSelectList.length >1">确 定</el-button>
|
|
|
- <el-button @click="customerDialog = false">取 消</el-button>
|
|
|
+ <el-button type="primary" @click="serviceConfirm()" :disabled="this.serviceSelectList.length == 0">导 入</el-button>
|
|
|
+ <el-button @click="serviceDialog = false">取 消</el-button>
|
|
|
</span>
|
|
|
</el-dialog>
|
|
|
<el-dialog
|
|
|
- title="导入服务项目"
|
|
|
- append-to-body
|
|
|
+ title="导入用户"
|
|
|
+ :visible.sync="userDialog"
|
|
|
class="el-dialogDeep"
|
|
|
- :visible.sync="serviceDialog"
|
|
|
- width="70%"
|
|
|
- :close-on-click-modal="false"
|
|
|
- :destroy-on-close="true"
|
|
|
- :close-on-press-escape="false">
|
|
|
- <el-row style="height: 0;">
|
|
|
- <el-col :span="5" >
|
|
|
- <div>
|
|
|
+ append-to-body
|
|
|
+ width="80%">
|
|
|
+ <el-row style="margin-top: -5px;height: 0">
|
|
|
+ <el-col :span="5">
|
|
|
+ <div class="box">
|
|
|
<el-scrollbar>
|
|
|
<basic-container>
|
|
|
- <avue-tree :option="serviceTreeOption" @node-click="serviceNodeClick"/>
|
|
|
+ <avue-tree :option="userTreeOption" :data="userTreeData" @node-click="userNodeClick"/>
|
|
|
</basic-container>
|
|
|
</el-scrollbar>
|
|
|
</div>
|
|
|
</el-col>
|
|
|
<el-col :span="19">
|
|
|
<basic-container>
|
|
|
- <avue-crud ref="customerCrud"
|
|
|
- :page.sync="servicePage"
|
|
|
- :search.sync="serviceSearch"
|
|
|
- :option="serviceOption"
|
|
|
- :table-loading="serviceLoading"
|
|
|
- :data="serviceData"
|
|
|
- @refresh-change="serviceRefreshChange"
|
|
|
- @selection-change="serviceSelectionChange"
|
|
|
- @search-change="serviceSearchChange"
|
|
|
- @on-load="serviceOnLoad">
|
|
|
+ <avue-crud ref="userCrud"
|
|
|
+ :option="userOption"
|
|
|
+ :data="userDataList"
|
|
|
+ :table-loading="userLoading"
|
|
|
+ :page.sync="userPage"
|
|
|
+ v-model="userForm"
|
|
|
+ @search-change="userSearchChange"
|
|
|
+ @search-reset="userSearchReset"
|
|
|
+ @refresh-change="userRefreshChange"
|
|
|
+ @selection-change="userSelectionChange"
|
|
|
+ @on-load="userOnLoad"
|
|
|
+ >
|
|
|
</avue-crud>
|
|
|
</basic-container>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
<span slot="footer" class="dialog-footer">
|
|
|
- <el-button type="primary" @click="serviceConfirm()" :disabled="this.serviceSelectList.length == 0">导 入</el-button>
|
|
|
- <el-button @click="serviceDialog = false">取 消</el-button>
|
|
|
- </span>
|
|
|
+ <el-button @click="userDialog = false">取 消</el-button>
|
|
|
+ <el-button type="primary" :disabled="this.userSelection.length == 1 ? false:true" @click="userConfirm" >确 定</el-button>
|
|
|
+ </span>
|
|
|
</el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
import option from "./configuration/detailsPage.json";
|
|
|
- //客户列表接口
|
|
|
- import {customerList, getDeptLazyTree} from "@/api/basicData/customerInformation"
|
|
|
- import customerOption from "./configuration/customerDialogList.json";
|
|
|
+ //上传文件json
|
|
|
+ import upLoadOption from "../../exportTrade/purchaseContract/config/uploadList.json"
|
|
|
//服务列表接口
|
|
|
import {getServiceProjectList,getServiceTypeTree,} from "@/api/workManagement/serviceProject";
|
|
|
import serviceOption from "./configuration/serviceDialogList.json";
|
|
|
+ //任务部门树接口
|
|
|
+ import {getLazyList} from "@/api/system/dept";
|
|
|
+ //用户组件
|
|
|
+ import userOption from "./configuration/userList.json";
|
|
|
+ import { getList } from "@/api/system/user";
|
|
|
+ import { getDeptLazyTree} from "@/api/system/dept";
|
|
|
|
|
|
export default {
|
|
|
data() {
|
|
|
@@ -184,14 +205,30 @@
|
|
|
loading: false,
|
|
|
form:{},
|
|
|
optionFrom:{},
|
|
|
- data: [],
|
|
|
- customerDialog:false,//客户名称窗口
|
|
|
+ data: [
|
|
|
+ {
|
|
|
+ deptId:'',
|
|
|
+ userId:''
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ deptDicData:[],//任务部门数据
|
|
|
serviceDialog:false,//服务导入窗口
|
|
|
+ userDialog:false,//用户导入窗口
|
|
|
+ //客户组件配置控制
|
|
|
+ configuration:{
|
|
|
+ multipleChoices:false,
|
|
|
+ multiple:true,
|
|
|
+ searchShow:true,
|
|
|
+ collapseTags:true,
|
|
|
+ placeholder:'请点击右边按钮选择',
|
|
|
+ dicData:[]
|
|
|
+ },
|
|
|
page: {
|
|
|
currentPage: 1,
|
|
|
total: 0,
|
|
|
pageSize: 10
|
|
|
},
|
|
|
+ detailsSelect: {},
|
|
|
//顶部from数据
|
|
|
basicData: {
|
|
|
column: [
|
|
|
@@ -298,7 +335,7 @@
|
|
|
type:'select',
|
|
|
dataType: "number",
|
|
|
width: 120,
|
|
|
- dicUrl: "/api/blade-system/dict/dictionary?code=payment_term",
|
|
|
+ dicUrl: "/api/blade-system/dict-biz/dictionary?code=payment_term",
|
|
|
props: {
|
|
|
label: "dictValue",
|
|
|
value: "dictKey"
|
|
|
@@ -316,46 +353,16 @@
|
|
|
},
|
|
|
{
|
|
|
label: '备注',
|
|
|
+ span: 24,
|
|
|
prop: 'remark'
|
|
|
}
|
|
|
],
|
|
|
},
|
|
|
optionTable: option,
|
|
|
- //客户窗口定义
|
|
|
- customerTreeOption: {
|
|
|
- nodeKey: 'id',
|
|
|
- lazy: true,
|
|
|
- treeLoad: function (node, resolve) {
|
|
|
- const parentId = (node.level === 0) ? 0 : node.data.id;
|
|
|
- getDeptLazyTree(parentId).then(res => {
|
|
|
- resolve(res.data.data.map(item => {
|
|
|
- return {
|
|
|
- ...item,
|
|
|
- leaf: !item.hasChildren
|
|
|
- }
|
|
|
- }))
|
|
|
- });
|
|
|
- },
|
|
|
- addBtn: false,
|
|
|
- menu: false,
|
|
|
- size: 'small',
|
|
|
- props: {
|
|
|
- labelText: '标题',
|
|
|
- label: 'title',
|
|
|
- value: 'value',
|
|
|
- children: 'children'
|
|
|
- }
|
|
|
- },
|
|
|
- customerOption:customerOption,
|
|
|
- customerLoading:false,
|
|
|
- customerData:[],
|
|
|
- customerPage:{
|
|
|
- currentPage: 1,
|
|
|
- total: 0,
|
|
|
- pageSize: 10},
|
|
|
- customerSearch:{},
|
|
|
- customerTreeDeptId:"",
|
|
|
- customerSelectList:[],
|
|
|
+ //上传文件
|
|
|
+ upLoadOption: upLoadOption,
|
|
|
+ upLoadData:[],
|
|
|
+ upLoadForm:{},
|
|
|
//服务窗口定义
|
|
|
serviceTreeOption: {
|
|
|
nodeKey: 'id',
|
|
|
@@ -394,10 +401,46 @@
|
|
|
serviceSearch:{},
|
|
|
serviceTreeDeptId:"",
|
|
|
serviceSelectList:[],
|
|
|
+ //用户窗口定义
|
|
|
+ userTreeOption: {
|
|
|
+ nodeKey: 'id',
|
|
|
+ lazy: true,
|
|
|
+ treeLoad: function (node, resolve) {
|
|
|
+ const parentId = (node.level === 0) ? 0 : node.data.id;
|
|
|
+ getDeptLazyTree(parentId).then(res => {
|
|
|
+ resolve(res.data.data.map(item => {
|
|
|
+ return {
|
|
|
+ ...item,
|
|
|
+ leaf: !item.hasChildren
|
|
|
+ }
|
|
|
+ }))
|
|
|
+ });
|
|
|
+ },
|
|
|
+ addBtn: false,
|
|
|
+ menu: false,
|
|
|
+ size: 'small',
|
|
|
+ props: {
|
|
|
+ labelText: '标题',
|
|
|
+ label: 'title',
|
|
|
+ value: 'value',
|
|
|
+ children: 'children'
|
|
|
+ }
|
|
|
+ },
|
|
|
+ userTreeData:[],
|
|
|
+ userOption:userOption,
|
|
|
+ userLoading:false,
|
|
|
+ userDataList:[],
|
|
|
+ userSelection:"",
|
|
|
+ userTreeDeptId:"",
|
|
|
+ userForm:{},
|
|
|
+ userPage:{
|
|
|
+ currentPage: 1,
|
|
|
+ total: 0,
|
|
|
+ pageSize: 10
|
|
|
+ },
|
|
|
};
|
|
|
},
|
|
|
mounted() {
|
|
|
- option.height = window.innerHeight - 760 ;
|
|
|
},
|
|
|
methods: {
|
|
|
//删除列表后面的删除按钮触发触发(row, index, done)
|
|
|
@@ -417,41 +460,22 @@
|
|
|
},
|
|
|
//点击修改或保存时触发
|
|
|
rowCellTwo(row,index){
|
|
|
- this.$refs.crud.rowCell(row, index)
|
|
|
+ if(row.$cellEdit){
|
|
|
+ setTimeout(() => {
|
|
|
+ this.$message.success("保存成功");
|
|
|
+ }, 1000);
|
|
|
+ }else{
|
|
|
+ this.$refs.crud.rowCell(row, index);
|
|
|
+ }
|
|
|
},
|
|
|
//新增修改时保存触发
|
|
|
rowSave(row, done, loading) {
|
|
|
- setTimeout(() => {
|
|
|
- this.$message.success("保存成功");
|
|
|
- loading();
|
|
|
- done();
|
|
|
- }, 1000);
|
|
|
+
|
|
|
},
|
|
|
getList() {
|
|
|
this.loading = true;
|
|
|
setTimeout(() => {
|
|
|
this.loading = false;
|
|
|
- this.data = [
|
|
|
- {
|
|
|
- prop1: "食品许可",
|
|
|
- prop2: "500",
|
|
|
- prop3: "次",
|
|
|
- prop4: "1",
|
|
|
- prop5: "1500",
|
|
|
- prop6: "1500",
|
|
|
- prop7: "年",
|
|
|
- prop8: "202202-1-1",
|
|
|
- prop9: "效率高",
|
|
|
- prop10: "商务部",
|
|
|
- prop11: "老周",
|
|
|
- prop12: "2021-1-1",
|
|
|
- prop13: "2021-1-1",
|
|
|
- prop14: "LOL",
|
|
|
- prop15: "2021-1-1",
|
|
|
- prop16: "LOL",
|
|
|
- prop17: "2021-1-1"
|
|
|
- }
|
|
|
- ];
|
|
|
this.page.total = 1;
|
|
|
}, 1000);
|
|
|
},
|
|
|
@@ -471,10 +495,6 @@
|
|
|
this.page.currentPage = 1;
|
|
|
this.getList();
|
|
|
},
|
|
|
- cellDblclick(row, column, cell, event) {
|
|
|
- console.log(row, column, cell, event);
|
|
|
- this.$refs.crud.rowEdit(row);
|
|
|
- },
|
|
|
saveColumn(row, column) {
|
|
|
console.log(row, column);
|
|
|
},
|
|
|
@@ -486,38 +506,39 @@
|
|
|
query: {}
|
|
|
});
|
|
|
},
|
|
|
- //客户窗口事件
|
|
|
- customerNodeClick(data) {
|
|
|
- this.customerTreeDeptId = data.id;
|
|
|
- this.customerOnLoad(this.customerPage);
|
|
|
- },
|
|
|
- customerRefreshChange(){
|
|
|
- this.customerOnLoad(this.customerPage, this.customerSearch)
|
|
|
- },
|
|
|
- customerSearchChange(params, done){
|
|
|
- this.customerOnLoad(this.customerPage, params)
|
|
|
- done();
|
|
|
+ //上传文件保存
|
|
|
+ upLoadSave(row, done, loading){
|
|
|
+ this.upLoadData.push(row)
|
|
|
+ done()
|
|
|
},
|
|
|
- customerSelectionChange(row){
|
|
|
- this.customerSelectList = row;
|
|
|
+ //修改附件上传触发
|
|
|
+ upLoadUpdate(row, done){
|
|
|
+ done(row);
|
|
|
},
|
|
|
- customerOnLoad(page, params = {parentId:0}) {
|
|
|
- this.customerLoading = true;
|
|
|
- let queryParams = Object.assign({}, params, {size: page.pageSize, current: page.currentPage,corpsTypeId:this.customerTreeDeptId})
|
|
|
- customerList(queryParams).then(res => {
|
|
|
- this.customerData = res.data.data.records
|
|
|
- this.customerPage.total = res.data.data.total
|
|
|
- this.customerLoading = false;
|
|
|
+ //删除附件上传触发
|
|
|
+ upLoadDel(row, index,){
|
|
|
+ this.$confirm("确定将选择数据删除?", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning"
|
|
|
+ }).then(() => {
|
|
|
+ if (row.id){
|
|
|
+ corpsbank(row.id).then(res=>{
|
|
|
+ this.$message({
|
|
|
+ type: "success",
|
|
|
+ message: "操作成功!"
|
|
|
+ });
|
|
|
+ this.bankOfDepositData.splice(index, 1);
|
|
|
+ })
|
|
|
+ }else {
|
|
|
+ this.$message({
|
|
|
+ type: "success",
|
|
|
+ message: "操作成功!"
|
|
|
+ });
|
|
|
+ this.bankOfDepositData.splice(index, 1);
|
|
|
+ }
|
|
|
})
|
|
|
},
|
|
|
- customerConfirm(row){
|
|
|
- if(row!='confirm'){
|
|
|
- this.$set(this.form,"prop5",row.cname)
|
|
|
- }else{
|
|
|
- this.$set(this.form,"prop5",this.customerSelectList[0].cname)
|
|
|
- }
|
|
|
- this.customerDialog = false;
|
|
|
- },
|
|
|
//服务窗口事件
|
|
|
serviceNodeClick(data) {
|
|
|
this.serviceTreeDeptId = data.id;
|
|
|
@@ -554,6 +575,42 @@
|
|
|
}
|
|
|
this.serviceSelectList = []
|
|
|
this.serviceDialog = false
|
|
|
+ },
|
|
|
+ //用户窗口事件
|
|
|
+ selectUser(row){
|
|
|
+ this.userDialog = true
|
|
|
+ this.detailsSelect = row.$index;
|
|
|
+ },
|
|
|
+ userSearchChange(params, done){
|
|
|
+ this.userOnLoad(this.userPage, params);
|
|
|
+ done()
|
|
|
+ },
|
|
|
+ userSearchReset(){
|
|
|
+
|
|
|
+ },
|
|
|
+ userRefreshChange(){
|
|
|
+ this.userOnLoad(this.userPage)
|
|
|
+ },
|
|
|
+ userSelectionChange(row){
|
|
|
+ this.userSelection = row;
|
|
|
+ },
|
|
|
+ userOnLoad(page,params={}){
|
|
|
+ this.userLoading = true;
|
|
|
+ getList(page.currentPage, page.pageSize, params, this.userTreeDeptId).then(res => {
|
|
|
+ this.userDataList = res.data.data.records
|
|
|
+ this.userPage.total = res.data.data.total
|
|
|
+ this.userLoading = false;
|
|
|
+ });
|
|
|
+ },
|
|
|
+ userNodeClick(data){
|
|
|
+ this.userTreeDeptId = data.id;
|
|
|
+ this.userOnLoad(this.userPage);
|
|
|
+ },
|
|
|
+ //确定
|
|
|
+ userConfirm(){
|
|
|
+ if(this.userSelection){
|
|
|
+ this.optionFrom[this.detailsSelect].userId = this.userSelection[0].userId;
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
};
|
|
|
@@ -581,4 +638,9 @@
|
|
|
overflow: hidden;
|
|
|
max-height: 660px;
|
|
|
}
|
|
|
+ .add-customer-btn {
|
|
|
+ position: fixed;
|
|
|
+ right: 36px;
|
|
|
+ top: 115px;
|
|
|
+ }
|
|
|
</style>
|