浏览代码

事务管理调整

qinbai 3 年之前
父节点
当前提交
4fbfb023aa

+ 11 - 1
src/api/workManagement/serviceProject.js

@@ -1,6 +1,6 @@
 import request from '@/router/axios';
 
-export const getList = (current, size, params, goodsTypeId) => {
+export const getServiceProjectList = (current, size, params, goodsTypeId) => {
   return request({
     url: '/api/blade-client/affairsdesc/list',
     method: 'get',
@@ -57,3 +57,13 @@ export const getDeptTree = (tenantId) => {
     }
   })
 }
+
+export const getDicData = (code) => {
+  return request({
+    url: '/api/blade-system/dict/dictionary',
+    method: 'get',
+    params: {
+      code,
+    }
+  })
+}

+ 59 - 0
src/views/workManagement/main-items/configuration/customerDialogList.json

@@ -0,0 +1,59 @@
+{
+  "headerAlign": "center",
+  "align": "center",
+  "border": true,
+  "index": true,
+  "lazy": true,
+  "tip": false,
+  "addBtn": false,
+  "searchShow": true,
+  "searchShowBtn": false,
+  "menu": false,
+  "simplePage": true,
+  "searchMenuSpan": 6,
+  "tree": true,
+  "selection": true,
+  "viewBtn": false,
+  "menuWidth": 0,
+  "column":[
+    {
+      "label": "客户编码",
+      "prop": "code",
+      "search": true,
+      "index": 1,
+      "width":100
+    },{
+      "label": "客户全称",
+      "prop": "cname",
+      "search": true,
+      "index": 2,
+      "width":200
+    },{
+      "label": "区域",
+      "prop": "belongtoarea",
+      "search": true,
+      "index": 4,
+      "width":100
+    },{
+      "label": "所属公司",
+      "prop": "belongtocompany",
+      "index": 5,
+      "width":100
+    },{
+      "label": "联系人",
+      "prop": "attn",
+      "index": 6,
+      "width":100
+    },{
+      "label": "代理品牌",
+      "prop": "goodtypes",
+      "index": 7,
+      "width":100
+    },{
+      "label": "客户等级 ",
+      "prop": "creditLevel",
+      "index": 8,
+      "width":100
+    }
+  ]
+}

+ 0 - 2
src/views/workManagement/main-items/configuration/detailsPage.json

@@ -32,7 +32,6 @@
       "prop": "prop2",
       "index": 2,
       "width": 100,
-      "cell": true,
       "rules": [
         {
           "required": true,
@@ -46,7 +45,6 @@
       "prop": "prop3",
       "index": 3,
       "width": 100,
-      "cell": true,
       "rules": [
         {
           "required": true,

+ 91 - 0
src/views/workManagement/main-items/configuration/serviceDialogList.json

@@ -0,0 +1,91 @@
+{
+  "headerAlign": "center",
+  "align": "center",
+  "border": true,
+  "index": true,
+  "lazy": true,
+  "tip": false,
+  "addBtn": false,
+  "searchShow": true,
+  "searchShowBtn": false,
+  "menu": false,
+  "simplePage": true,
+  "searchMenuSpan": 6,
+  "tree": true,
+  "selection": true,
+  "viewBtn": false,
+  "menuWidth": 0,
+  "column": [
+    {
+      "label": "项目编码",
+      "prop": "code",
+      "index": 1,
+      "width": 150
+    },
+    {
+      "label": "项目名称",
+      "prop": "cname",
+      "search": true,
+      "index": 1,
+      "width": 150
+    },
+    {
+      "label": "收费建议",
+      "prop": "remarks",
+      "index": 2,
+      "width": 150
+    },
+    {
+      "label": "计价单位",
+      "prop": "unit",
+      "index": 3,
+      "width": 120
+    },
+    {
+      "label": "频率",
+      "prop": "rate",
+      "index": 5,
+      "width": 120
+    },
+    {
+      "label": "质保期",
+      "type":"date",
+      "prop": "warrantyPeriod",
+      "format": "yyyy-MM-dd",
+      "valueFormat": "timestamp",
+      "index": 6,
+      "width": 150
+    },
+    {
+      "label": "标准工时",
+      "type": "number",
+      "prop": "workingHours",
+      "index": 7,
+      "width": 80
+    },
+    {
+      "label": "创建人",
+      "prop": "createUser",
+      "addDisplay": false,
+      "editDisplay": false,
+      "index": 8,
+      "width": 150
+    },
+    {
+      "label": "创建时间",
+      "prop": "createTime",
+      "editDisplay": false,
+      "addDisplay": false,
+      "index": 9,
+      "width": 150
+    },
+    {
+      "label": "状态",
+      "prop": "status",
+      "hide": true,
+      "editDisplay": false,
+      "addDisplay": false,
+      "search": true
+    }
+  ]
+}

+ 292 - 101
src/views/workManagement/main-items/detailsPage.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="borderless">
-    <div class="customer-head">
-      <div class="customer-back">
+    <div class="main-head">
+      <div class="main-back">
         <el-button type="danger" style="border: none;background: none;color: red" icon="el-icon-arrow-left"
                    @click="backToList">返回列表
         </el-button>
@@ -15,15 +15,14 @@
             <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-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>
                 <el-input type="age" v-else v-model="form[item.prop]" size="small" autocomplete="off" placeholder="请输入"></el-input>
               </el-form-item>
             </el-col>
-            <el-col>
-              <el-form-item>
-                <el-button type="info" style="float: right" @click="">生成账单</el-button>
-              </el-form-item>
-            </el-col>
           </el-row>
         </el-form>
       </basic-container>
@@ -35,6 +34,7 @@
           :option="optionTable"
           :page.sync="page"
           :table-loading="loading"
+          v-model="optionFrom"
           @row-del="rowDel"
           @row-save="rowSave"
           @size-change="sizeChange"
@@ -50,7 +50,7 @@
                        size="small"
                        icon="el-icon-plus"
                        plain
-                       @click="">新增明细
+                       @click="serviceDialog = true">新增明细
             </el-button>
             <el-button type="primary"
                        size="small"
@@ -85,18 +85,113 @@
         </avue-crud>
       </basic-container>
     </div>
+    <el-dialog
+      title="选择客户"
+      append-to-body
+      class="el-dialogDeep"
+      :visible.sync="customerDialog"
+      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>
+            <el-scrollbar>
+              <basic-container>
+                <avue-tree :option="customerTreeOption"  @node-click="customerNodeClick"/>
+              </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>
+          </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>
+        </span>
+    </el-dialog>
+    <el-dialog
+      title="导入服务项目"
+      append-to-body
+      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>
+            <el-scrollbar>
+              <basic-container>
+                <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="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="serviceConfirm()" :disabled="this.serviceSelectList.length == 0">导 入</el-button>
+         <el-button @click="serviceDialog = false">取 消</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";
+  //服务列表接口
+  import {getServiceProjectList,getServiceTypeTree,} from "@/api/workManagement/serviceProject";
+  import serviceOption from "./configuration/serviceDialogList.json";
+
   export default {
     data() {
       return {
         loading: false,
         form:{},
+        optionFrom:{},
         data: [],
-        optionTable: option,
+        customerDialog:false,//客户名称窗口
+        serviceDialog:false,//服务导入窗口
+        page: {
+          currentPage: 1,
+          total: 0,
+          pageSize: 10
+        },
         //顶部from数据
         basicData: {
           column: [
@@ -105,27 +200,6 @@
               prop: 'prop1',
               rules: [
                 {
-                  required: false,
-                  message: ' ',
-                  trigger: 'blur'
-                }
-              ]
-            }, {
-              label: '制单日期',
-              prop: 'prop2',
-              rules: [
-                {
-                  required: true,
-                  message: ' ',
-                  trigger: 'blur'
-                }
-              ]
-            }, {
-              label: '制单人',
-              prop: 'prop3',
-              data: [],
-              rules: [
-                {
                   required: true,
                   message: ' ',
                   trigger: 'blur'
@@ -162,57 +236,39 @@
                   trigger: 'blur'
                 }
               ]
+            },{
+              label: '制单人',
+              prop: 'prop3',
+              data: []
+            }, {
+              label: '制单日期',
+              prop: 'prop2'
             }, {
               label: '责任人',
               prop: 'prop6',
-              data: [],
-              rules: [
-                {
-                  required: true,
-                  message: ' ',
-                  trigger: 'blur'
-                }
-              ]
-            }, {
-              label: '电话',
-              prop: 'prop7',
-              data: [],
-              rules: [
-                {
-                  required: true,
-                  message: ' ',
-                  trigger: 'blur'
-                }
-              ]
+              data: []
             }, {
               label: '承揽人',
               prop: 'prop8',
-              data: [],
-              rules: [
-                {
-                  required: true,
-                  message: ' ',
-                  trigger: 'blur'
-                }
-              ]
+              data: []
             }, {
               label: '合同金额',
               prop: 'prop8',
               rules: [
                 {
-                  required: true,
-                  message: ' ',
+                  pattern: /^(([1-9][0-9]*)|(([0]\.\d{1,2}|[1-9][0-9]*\.\d{1,2})))$/,
+                  message: '请输入数字或小数,且小数位不超过两位',
                   trigger: 'blur'
                 }
               ]
             },
             {
-              label: '收金额',
+              label: '应收金额',
               prop: 'prop9',
               rules: [
                 {
-                  required: true,
-                  message: ' ',
+                  pattern: /^(([1-9][0-9]*)|(([0]\.\d{1,2}|[1-9][0-9]*\.\d{1,2})))$/,
+                  message: '请输入数字或小数,且小数位不超过两位',
                   trigger: 'blur'
                 }
               ]
@@ -222,68 +278,131 @@
               prop: 'prop10',
               rules: [
                 {
-                  required: true,
-                  message: ' ',
+                  pattern: /^(([1-9][0-9]*)|(([0]\.\d{1,2}|[1-9][0-9]*\.\d{1,2})))$/,
+                  message: '请输入数字或小数,且小数位不超过两位',
                   trigger: 'blur'
                 }
               ]
             },
             {
-              label: '开始日期',
-              prop: 'prop11',
-              type:'datetime',
+              label: '收款方式',
+              prop: 'prop13',
+              type:'select',
+              dataType: "number",
+              width: 120,
+              dicUrl: "/api/blade-system/dict/dictionary?code=payment_term",
+              props: {
+                label: "dictValue",
+                value: "dictKey"
+              },
               rules: [
                 {
                   required: true,
-                  message: ' ',
+                  message: '请选择收款方式',
                   trigger: 'blur'
                 }
-              ]
+              ],
+            },
+            {
+              label: '开始日期',
+              prop: 'prop11',
+              type:'date',
             },
             {
               label: '结束日期',
               prop: 'prop12',
-              type:'datetime',
-              rules: [
-                {
-                  required: true,
-                  message: ' ',
-                  trigger: 'blur'
-                }
-              ]
+              type:'date',
             },
             {
-              label: '收款方式',
-              prop: 'prop13',
-              type:'select',
-              rules: [
-                {
-                  required: true,
-                  message: ' ',
-                  trigger: 'blur'
-                }
-              ]
+              label: '电话',
+              prop: 'prop7',
+              data: [],
             },
             {
               label: '备注',
-              prop: 'prop8',
-              rules: [
-                {
-                  required: true,
-                  message: ' ',
-                  trigger: 'blur'
-                }
-              ]
+              prop: 'prop8'
             }
           ],
         },
-        page: {
+        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:[],
+        //服务窗口定义
+        serviceTreeOption: {
+          nodeKey: 'id',
+          lazy: true,
+          treeLoad: function(node, resolve) {
+            const parentId = node.level === 0 ? 0 : node.data.id;
+            getServiceTypeTree(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'
+          }
+        },
+        serviceOption:serviceOption,
+        serviceLoading:false,
+        serviceData:[],
+        servicePage:{
           currentPage: 1,
           total: 0,
           pageSize: 10
-        }
+        },
+        serviceSearch:{},
+        serviceTreeDeptId:"",
+        serviceSelectList:[],
       };
     },
+    mounted() {
+      option.height = window.innerHeight - 760 ;
+    },
     methods: {
       //删除列表后面的删除按钮触发触发(row, index, done)
       rowDel(row, index, done) {
@@ -370,13 +489,82 @@
           path: '/workManagement/main-items/list',
           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();
+      },
+      customerSelectionChange(row){
+        this.customerSelectList = 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;
+        })
+      },
+      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;
+        this.serviceOnLoad(this.servicePage);
+      },
+      serviceRefreshChange(){
+        this.serviceOnLoad(this.servicePage, this.serviceSearch)
+      },
+      serviceSearchChange(params, done){
+        this.serviceOnLoad(this.servicePage, params)
+        done();
+      },
+      serviceSelectionChange(row){
+        this.serviceSelectList = row;
+      },
+      serviceOnLoad(page, params = {}) {
+        this.serviceLoading = true;
+        getServiceProjectList(page.currentPage, page.pageSize, params, this.serviceTreeDeptId).then(res => {
+          this.serviceData = res.data.data.records
+          this.servicePage.total = res.data.data.total
+          this.serviceLoading = false
+        })
+      },
+      serviceConfirm(){
+        if(this.serviceSelectList.length != 0){
+          this.serviceSelectList.forEach((item)=>{
+            item.prop1 = item.code;
+            item.prop2 = item.name;
+            item.prop4 = item.unit;
+            item.prop3 = item.remarks;
+            this.$refs.crud.rowCellAdd(item);
+            this.$refs.crud.rowCell(item, this.optionFrom.length-1)
+          })
+        }
+        this.serviceSelectList = []
+        this.serviceDialog = false
       }
-    }
+    },
   };
 </script>
 
 <style scoped lang="scss">
-  .customer-head {
+  .main-head {
     position: fixed;
     top: 105px;
     width: 100%;
@@ -386,12 +574,15 @@
     box-shadow: 0 4px 12px 0px rgba(232, 232, 235, 1);
     z-index: 999;
   }
-
-  .customer-back {
+  .main-back {
     cursor: pointer;
     line-height: 62px;
     font-size: 16px;
     color: #323233;
     font-weight: 400;
   }
+  .avue-tree {
+    overflow: hidden;
+    max-height: 660px;
+  }
 </style>

+ 1 - 0
src/views/workManagement/receipt/configuration/settleAccountsDetailsPage.json

@@ -9,6 +9,7 @@
   "searchMenuSpan": 6,
   "tree": true,
   "selection": true,
+  "addBtn": false,
   "viewBtn": false,
   "editBtn": false,
   "delBtn": false,

+ 11 - 9
src/views/workManagement/receipt/configuration/statisticalList.json

@@ -7,7 +7,7 @@
   "lazy": true,
   "tip": false,
   "searchShow": true,
-  "searchMenuSpan": 6,
+  "searchMenuSpan": 12,
   "tree": true,
   "selection": true,
   "viewBtn": true,
@@ -19,7 +19,8 @@
       "label": "客户名称",
       "prop": "custmerName",
       "index": 1,
-      "width": 100,
+      "width": 240,
+      "search": true,
       "rules": [
         {
           "required": true,
@@ -32,7 +33,7 @@
       "label": "应收金额",
       "prop": "Ymoney",
       "index": 2,
-      "width": 100,
+      "width": 120,
       "rules": [
         {
           "required": true,
@@ -45,7 +46,7 @@
       "label": "实收金额",
       "prop": "Smoney",
       "index": 3,
-      "width": 100,
+      "width": 120,
       "rules": [
         {
           "required": true,
@@ -58,7 +59,7 @@
       "label": "欠费",
       "prop": "qianfei",
       "index": 4,
-      "width": 100,
+      "width": 120,
       "rules": [
         {
           "required": true,
@@ -71,7 +72,8 @@
       "label": "客户状态",
       "prop": "kehuzt",
       "index": 5,
-      "width": 100,
+      "width": 150,
+      "search": true,
       "rules": [
         {
           "required": true,
@@ -84,7 +86,7 @@
       "label": "备注",
       "prop": "beizhu",
       "index": 6,
-      "width": 100,
+      "width": 220,
       "rules": [
         {
           "required": true,
@@ -97,7 +99,7 @@
       "label": "最新修改人",
       "prop": "zuixinxgr",
       "index": 7,
-      "width": 100,
+      "width": 150,
       "rules": [
         {
           "required": true,
@@ -110,7 +112,7 @@
       "label": "最新修改时间",
       "prop": "zuixinxgsj",
       "index": 8,
-      "width": 100,
+      "width": 220,
       "rules": [
         {
           "required": true,

+ 1 - 7
src/views/workManagement/receipt/settleAccounts.vue

@@ -23,12 +23,6 @@
                    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>
@@ -54,7 +48,7 @@
       };
     },
     mounted() {
-      option.height = window.innerHeight - 350 ;
+      option.height = window.innerHeight - 340 ;
     },
     methods: {
       getList() {

+ 170 - 129
src/views/workManagement/receipt/settleAccountsDetailsPage.vue

@@ -1,75 +1,78 @@
 <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: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>
-    <containerTitle title="明细列表"></containerTitle>
-    <basic-container>
-      <avue-crud :option="option"
-                 :data="dataList"
-                 ref="crud"
-                 v-model="form"
-                 :page.sync="page"
-                 :before-open="beforeOpen"
-                 @row-del="rowDel"
-                 @row-save="rowSave"
-                 @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-edit"
-            size="small"
-            @click.stop="editOpen(scope.row,scope.index)"
-          >{{scope.row.$cellEdit?'保存':'修改'}}
-          </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 class="borderless">
+    <div class="receipt-head">
+      <div class="receipt-back">
+        <el-button type="danger" style="border: none;background: none;color: red" icon="el-icon-arrow-left"
+                   @click="backToList">返回列表
+        </el-button>
+      </div>
+    </div>
+    <div style="margin-top: 60px">
+      <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>
+      <containerTitle title="明细列表"></containerTitle>
+      <basic-container>
+        <avue-crud :option="option"
+                   :data="dataList"
+                   ref="crud"
+                   v-model="form"
+                   :page.sync="page"
+                   @row-del="rowDel"
+                   @row-save="rowSave"
+                   @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>
+          </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-edit"
+              size="small"
+              @click.stop="editOpen(scope.row,scope.index)"
+            >{{scope.row.$cellEdit?'保存':'修改'}}
+            </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>
   </div>
 </template>
 
@@ -94,18 +97,8 @@
         basicData: {
           column: [
             {
-              label: '代码',
-              prop: 'orderNo',
-              rules: [
-                {
-                  required: false,
-                  message: ' ',
-                  trigger: 'blur'
-                }
-              ]
-            }, {
-              label: '项目名称',
-              prop: 'orderNo',
+              label: '系统编号',
+              prop: 'prop1',
               rules: [
                 {
                   required: true,
@@ -114,8 +107,8 @@
                 }
               ]
             }, {
-              label: '客户名称',
-              prop: 'orderNo',
+              label: '项目代码',
+              prop: 'prop3',
               data: [],
               rules: [
                 {
@@ -125,9 +118,8 @@
                 }
               ]
             }, {
-              label: '责任人',
-              prop: 'orderNo',
-              data: [],
+              label: '项目名称',
+              prop: 'prop4',
               rules: [
                 {
                   required: true,
@@ -136,8 +128,8 @@
                 }
               ]
             }, {
-              label: '电话',
-              prop: 'orderNo',
+              label: '客户名称',
+              prop: 'prop5',
               rules: [
                 {
                   required: true,
@@ -145,62 +137,91 @@
                   trigger: 'blur'
                 }
               ]
+            },{
+              label: '制单人',
+              prop: 'prop3',
+              data: []
+            }, {
+              label: '制单日期',
+              prop: 'prop2'
             }, {
-              label: '预收金额',
-              prop: 'orderNo',
+              label: '责任人',
+              prop: 'prop6',
+              data: []
+            }, {
+              label: '承揽人',
+              prop: 'prop8',
+              data: []
+            }, {
+              label: '合同金额',
+              prop: 'prop8',
               rules: [
                 {
-                  required: true,
-                  message: ' ',
+                  pattern: /^(([1-9][0-9]*)|(([0]\.\d{1,2}|[1-9][0-9]*\.\d{1,2})))$/,
+                  message: '请输入数字或小数,且小数位不超过两位',
                   trigger: 'blur'
                 }
               ]
-            }, {
-              label: '开始日期',
-              prop: 'orderNo',
-              type:'datetime',
-              data: [],
+            },
+            {
+              label: '应收金额',
+              prop: 'prop9',
               rules: [
                 {
-                  required: true,
-                  message: ' ',
+                  pattern: /^(([1-9][0-9]*)|(([0]\.\d{1,2}|[1-9][0-9]*\.\d{1,2})))$/,
+                  message: '请输入数字或小数,且小数位不超过两位',
                   trigger: 'blur'
                 }
               ]
-            }, {
-              label: '结束日期',
-              prop: 'orderNo',
-              type:'datetime',
-              data: [],
+            },
+            {
+              label: '未收金额',
+              prop: 'prop10',
               rules: [
                 {
-                  required: true,
-                  message: ' ',
+                  pattern: /^(([1-9][0-9]*)|(([0]\.\d{1,2}|[1-9][0-9]*\.\d{1,2})))$/,
+                  message: '请输入数字或小数,且小数位不超过两位',
                   trigger: 'blur'
                 }
               ]
-            }, {
+            },
+            {
               label: '收款方式',
-              prop: 'orderNo',
+              prop: 'prop13',
               type:'select',
-              data: [],
+              dataType: "number",
+              width: 120,
+              dicUrl: "/api/blade-system/dict/dictionary?code=payment_term",
+              props: {
+                label: "dictValue",
+                value: "dictKey"
+              },
               rules: [
                 {
                   required: true,
-                  message: ' ',
+                  message: '请选择收款方式',
                   trigger: 'blur'
                 }
-              ]
-            }, {
+              ],
+            },
+            {
+              label: '开始日期',
+              prop: 'prop11',
+              type:'date',
+            },
+            {
+              label: '结束日期',
+              prop: 'prop12',
+              type:'date',
+            },
+            {
+              label: '电话',
+              prop: 'prop7',
+              data: [],
+            },
+            {
               label: '备注',
-              prop: 'orderNo',
-              rules: [
-                {
-                  required: true,
-                  message: ' ',
-                  trigger: 'blur'
-                }
-              ]
+              prop: 'prop8',
             }
           ],
         },
@@ -244,12 +265,16 @@
     created() {
 
     },
+    mounted() {
+      option.height = window.innerHeight - 700 ;
+    },
     methods: {
-      //新增时跳转页面
-      beforeOpen(done, type){
-        if (["add"].includes(type)) {
-          this.dataList.push({});
-        }
+      backToList(){
+        this.$router.$avueRouter.closeTag();
+        this.$router.push({
+          path: '/workManagement/receipt/settleAccounts',
+          query: {}
+        });
       },
       //修改
       editOpen(row,index){
@@ -328,6 +353,22 @@
   }
 </script>
 
-<style scoped>
-
+<style scoped  lang="scss">
+  .receipt-head {
+    position: fixed;
+    top: 105px;
+    width: 100%;
+    margin-left: -10px;
+    height: 62px;
+    background: #ffffff;
+    box-shadow: 0 4px 12px 0px rgba(232, 232, 235, 1);
+    z-index: 999;
+  }
+  .receipt-back {
+    cursor: pointer;
+    line-height: 62px;
+    font-size: 16px;
+    color: #323233;
+    font-weight: 400;
+  }
 </style>

+ 3 - 0
src/views/workManagement/receipt/statisticalList.vue

@@ -42,6 +42,9 @@
     created() {
 
     },
+    mounted() {
+      option.height = window.innerHeight - 340 ;
+    },
     methods: {
       //删除列表后面的删除按钮触发触发(row, index, done)
       rowDel(row, index, done) {

+ 5 - 4
src/views/workManagement/service-items/project.vue

@@ -52,7 +52,7 @@
 
 <script>
   import option from "./configuration/projectOption.json";
-  import {getList, remove, submit,detail, getServiceTypeTree,getDeptTree} from "@/api/workManagement/serviceProject";
+  import {getServiceProjectList, remove, submit,detail, getServiceTypeTree,getDeptTree,getDicData} from "@/api/workManagement/serviceProject";
 
 export default {
   data() {
@@ -103,11 +103,13 @@ export default {
     getDeptTree().then(res => {
       this.findObject(this.tableOption.column, "goodsTypeId").dicData = res.data.data;
     });
+    // getDicData("payment_term").then(res =>{
+    // })
   },
   methods: {
     getList(page, params = {}) {
       this.loading = true
-      getList(page.currentPage, page.pageSize, params, this.treeDeptId).then(res => {
+      getServiceProjectList(page.currentPage, page.pageSize, params, this.treeDeptId).then(res => {
         this.data = res.data.data.records
         this.page.total = res.data.data.total
         this.loading = false
@@ -118,7 +120,7 @@ export default {
     // beforeClose(){
 
     // },
-    //点击新增时
+    //点击新增或修改
     beforeOpen(done, type){
       if (["add"].includes(type)) {
         this.tableOption.column.forEach(e=>{
@@ -129,7 +131,6 @@ export default {
 
       }
       if (["edit"].includes(type)) {
-        console.log(456)
         detail(this.form.id).then(res => {
           res.data.data.warrantyPeriod = Date.parse(new Date(res.data.data.warrantyPeriod));
           this.form = res.data.data;