Browse Source

Merge branch 'master' of git.echepei.com:wengyuwen/anpinjingyuan-ui

caojunjie 4 years ago
parent
commit
fafb10dd58

+ 9 - 0
src/api/project/index.js

@@ -64,3 +64,12 @@ export function delProject(fId) {
     method: 'delete'
   })
 }
+
+// 请核
+export function addproject(data) {
+  return request({
+    url: '/anpin/project/submit',
+    method: 'post',
+    data: data
+  })
+}

+ 153 - 0
src/api/warehouse/inStock.js

@@ -0,0 +1,153 @@
+import request from '@/utils/request'
+
+// 查询仓库主(出入库)列表
+export function listInStock(query) {
+  return request({
+    url: '/anpin/stockControl/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询仓库主(出入库)详细
+export function getSave(fId) {
+  return request({
+    url: '/anpin/stockControl/' + fId,
+    method: 'get'
+  })
+}
+
+// 新增仓库主(出入库保存)
+export function addSave(data) {
+  return request({
+    url: '/anpin/stockControl/anPingApply',
+    method: 'post',
+    data: data
+  })
+}
+// 新增仓库主(出入库提交)
+export function getEntry(data) {
+  return request({
+    url: '/anpin/project/projectName',
+    method: 'post',
+    data: data
+  })
+}
+//获取仓库
+export function getwarehouse(query) {
+  return request({
+    url: '/basicdata/warehouse/lists',
+    method: 'get',
+    params: query
+  })
+}
+
+// 获取客户
+export function getustomer(data) {
+  return request({
+    url: '/basicdata/corps/getCorpName',
+    method: 'post',
+    data: data
+  })
+}
+
+// 获取库区
+// 查询部门下拉树结构
+export function getArea(ancestors) {
+  const query = {
+    ancestors
+  }
+  return request({
+    url: '/basicdata/warehouse/treeselect',
+    method: 'get',
+    params: query
+  })
+}
+// 获取品名
+export function getGoodName(query) {
+  return request({
+    url: '/basicdata/fees/list',
+    method: 'get',
+    params: query
+  })
+}
+// 判断是否可以删除
+export function canBedelet(data) {
+  return request({
+    url: '/anpin/stockControl/judge',
+    method: 'post',
+    data: data
+  })
+}
+// 修改仓库主(出入库)
+export function updateWarehousebills(data) {
+  return request({
+    url: '/warehouseBusiness/inStock',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除从表行
+export function delRows(fIds) {
+  return request({
+    url: '/anpin/stockControl/removeFee/' + fIds,
+    method: 'delete'
+  })
+}
+
+// 导出仓库主(出入库)
+export function exportWarehousebills(query) {
+  return request({
+    url: '/warehouseBusiness/inStock/export',
+    method: 'get',
+    params: query
+  })
+}
+// 状态为6撤销(请核)
+export function revoke(fId) {
+  return request({
+    url: '/warehouseBusiness/inStock/withdrawById/' + fId,
+    method: 'get',
+  })
+}
+
+// 状态为4撤销(请核)
+export function revokeTwo(data) {
+  return request({
+    url: '/warehouse/paths/revoke',
+    method: 'post',
+    data: data
+  })
+}
+//查询流水单号
+export function serialNumber() {
+  return request({
+    url: '/warehouseBusiness/inStock/serialNumber',
+    method: 'post',
+  })
+}
+//删除前的判断
+export function delinStock(fId) {
+  return request({
+    url: '/warehouseBusiness/inStock/queryRemove/' + fId,
+    method: 'delete'
+  })
+}
+//删除前的判断2
+export function delinStock_s(fId) {
+  return request({
+    url: '/warehouseBusiness/inStock/queryRemove/' + fId,
+    method: 'delete'
+  })
+}
+
+
+//获取库管员
+export function getWarehousekeeper(query) {
+  return request({
+    url: '/system/user/selectUserByRoleName',
+    method: 'get',
+    params: query
+  })
+}

+ 142 - 0
src/api/warehouse/outStock.js

@@ -0,0 +1,142 @@
+import request from '@/utils/request'
+
+// 查询仓库主(出入库)列表
+export function listWarehousebills(query) {
+  return request({
+    url: '/warehouseBusiness/inStock/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询仓库主(出入库)详细
+export function getWarehousebills(fId) {
+  return request({
+    url: '/warehouseBusiness/inStock/' + fId,
+    method: 'get'
+  })
+}
+
+// 新增仓库主(出入库保存)
+export function addWarehousebills(data) {
+  return request({
+    url: '/warehouseBusiness/inStock/add',
+    method: 'post',
+    data: data
+  })
+}
+// 新增仓库主(出入库提交)
+export function addWarehouse(data) {
+  return request({
+    url: '/warehouseBusiness/inStock/warehouseSubmission',
+    method: 'post',
+    data: data
+  })
+}
+
+
+// 撤销入库
+export function updateCredit(data) {
+  return request({
+    url: '/warehouseBusiness/inStock/updateCredit',
+    method: 'post',
+    data: data
+  })
+}
+
+// 入库确认
+export function addWhgenleg(data) {
+  return request({
+    url: '/warehouseBusiness/inStock/addCredit',
+    method: 'post',
+    data: data
+  })
+}
+// 打印作业单
+export function addJoblist(data) {
+  return request({
+    url: '/warehouseBusiness/inStock/waitWarehousing',
+    method: 'post',
+    data: data
+  })
+}
+// 卸货接口
+export function disChargelist(data) {
+  return request({
+    url: '/warehouseBusiness/inStock/ischargeCargo',
+    method: 'post',
+    data: data
+  })
+}
+// 修改仓库主(出入库)
+export function updateWarehousebills(data) {
+  return request({
+    url: '/warehouseBusiness/inStock',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除仓库主(出入库)
+export function delWarehousebills(fId) {
+  return request({
+    url: '/warehouseBusiness/inStock/' + fId,
+    method: 'delete'
+  })
+}
+
+// 导出仓库主(出入库)
+export function exportWarehousebills(query) {
+  return request({
+    url: '/warehouseBusiness/inStock/export',
+    method: 'get',
+    params: query
+  })
+}
+// 状态为6撤销(请核)
+export function revoke(fId) {
+  return request({
+    url: '/warehouseBusiness/inStock/withdrawById/' + fId,
+    method: 'get',
+  })
+}
+
+// 状态为4撤销(请核)
+export function revokeTwo(data) {
+  return request({
+    url: '/warehouse/paths/revoke',
+    method: 'post',
+    data: data
+  })
+}
+//查询流水单号
+export function serialNumber() {
+  return request({
+    url: '/warehouseBusiness/inStock/serialNumber',
+    method: 'post',
+  })
+}
+//删除前的判断
+export function delinStock(fId) {
+  return request({
+    url: '/warehouseBusiness/inStock/queryRemove/' + fId,
+    method: 'delete'
+  })
+}
+//删除前的判断2
+export function delinStock_s(fId) {
+  return request({
+    url: '/warehouseBusiness/inStock/queryRemove/' + fId,
+    method: 'delete'
+  })
+}
+
+
+//详情列表
+export function detailStock(query) {
+  return request({
+    url: '/warehouseBusiness/whgenleg/detailed/list',
+    method: 'get',
+    params: query
+  })
+}

+ 15 - 10
src/combination/MainForm.vue

@@ -3,8 +3,8 @@
     <el-form label-width="88px" ref="form" :model="form">
       <el-row>
         <el-col v-for="(item,index) in searchdata" :span="item.span" :key="index">
-          <el-form-item :label="item.name" :label-width="item.labelSize + 'px'" :rules="[item.rules]">
-            <el-select v-if="item.form == 1" v-model="form[item.label]" :style="{ width: item.width + 'px' }">
+          <el-form-item :label="item.name" :label-width="item.labelSize + 'px'" :rules="[item.rules]" :prop="item.label">
+            <el-select v-if="item.form == 1" clearable v-model="form[item.label]" :style="{ width: item.width + 'px' }">
               <el-option v-for="(item,index) in item.data"
               :key="index"
               :label="item.label"
@@ -12,22 +12,21 @@
             </el-select>
             <el-input v-if="item.form == 2" v-model="form[item.label]" :style="{ width: item.width + 'px' }"></el-input>
             <el-input v-if="item.form == 4" type="textarea" v-model="form[item.label]" :style="{ width: item.width + 'px' }"></el-input>
-            <el-date-picker v-if="item.form == 3" v-model="form[item.label]" :style="{ width: item.width + 'px' }" type="date" placeholder="选择日期" format="yyyy - MM - dd" value-format="yyyy-MM-dd">
-            </el-date-picker>
+            <el-date-picker v-if="item.form == 3" v-model="form[item.label]" :style="{ width: item.width + 'px' }" type="date" placeholder="选择日期" format="yyyy - MM - dd" value-format="yyyy-MM-dd"></el-date-picker>
+            <span v-if="item.form == 5" v-model="form[item.label]" :style="{ width: item.width + 'px' }"><el-input style="width:50%" v-model="form.first"></el-input><el-input v-model="form.last" style="width:50%"></el-input></span>
           </el-form-item>
         </el-col>
       </el-row>
         <div v-if="show">
           <el-row>
             <el-col v-for="(item,index) in hidedata" :span="item.span" :key="index">
-              <el-form-item :label="item.name" :label-width="item.labelSize + 'px'"
-                            :rules="[item.rules]">
+              <el-form-item :label="item.name" :label-width="item.labelSize + 'px'" :rules="[item.rules]" :prop="item.label">
 
                 <el-select v-if="item.form == 1" v-model="form[item.label]" :style="{ width: item.width + 'px' }">
-                  <el-option v-for="(item,index) in item.data"
+                  <el-option v-for="(it,index) in item.data"
                              :key="index"
-                             :label="item.label"
-                             :value="item.value"/>
+                             :label="it.label"
+                             :value="it.value"/>
                 </el-select>
                 <el-input v-if="item.form == 2" v-model="form[item.label]" :style="{ width: item.width + 'px' }"></el-input>
                 <el-input v-if="item.form == 4" type="textarea" v-model="form[item.label]" :style="{ width: item.width + 'px' }"></el-input>
@@ -50,12 +49,18 @@ export default {
     }
   },
   created() {
-console.log(this.show)
+    console.log(this.searchdata)
   },
   methods:{
     // hide() {
     //   this.$emit('handleClick')
     // },
+    rules(){
+      console.log(this.form)
+      this.$refs["form"].validate((valid) => {
+        this.$emit('verificationRules',valid)
+      })
+    }
   }
 }
 </script>

+ 33 - 5
src/combination/listComponent.vue

@@ -56,6 +56,8 @@
       style="width: 100%"
       @selection-change="handleSelectionChange"
       :row-class-name="rowClassName"
+      show-summary
+      :summary-method="listTotal"
     >
       <el-table-column type="selection" width="55" align="center"/>
       <el-table-column
@@ -76,11 +78,11 @@
               <el-button type="text" @click="deletion(scope)">删除</el-button>
             </span>
             <span v-if="item.operation == 2">
-              <el-button type="text" @click="deleteRow(scope.$index, tableData)">移除</el-button>
+              <el-button type="text" @click="deleteRow(scope.$index, tableData)" :disabled="item.disabled">移除</el-button>
             </span>
           </span>
           <span v-else-if="item.changeable">
-            <el-select v-if="item.changeable == 1" v-model="scope.row[item.label]" slot="prepend" placeholder="请选择">
+            <el-select v-if="item.changeable == 1" :disabled="item.disabled" v-model="scope.row[item.label]" slot="prepend" placeholder="请选择">
               <el-option
                 v-for="(item,index) in item.data"
                 :key="index"
@@ -88,11 +90,12 @@
                 :value="item.value"
               ></el-option>
             </el-select>
-            <el-input v-if="item.changeable == 2" v-model="scope.row[item.label]" placeholder="请输入内容" :onkeyup="item.onabort"></el-input>
+            <el-input v-if="item.changeable == 2" :disabled="item.disabled" v-model="scope.row[item.label]" placeholder="请输入内容" :onkeyup="item.onabort"></el-input>
             <el-date-picker
               v-if="item.changeable == 3"
               v-model="scope.row[item.label]"
               type="date"
+              style="width: 100%"
               placeholder="选择日期"
             >
             </el-date-picker>
@@ -161,7 +164,7 @@ import { addSet, resetModule } from "@/api/system/set";
 import Cookies from "js-cookie";
 export default {
   name: 'listComponent',
-  props: ['tableData', 'listStyle','queryList','customButton','arrow','setRowList','isItHidden'],
+  props: ['tableData', 'listStyle','queryList','customButton','arrow','setRowList','isItHidden','tatolLabel'],
   data() {
     return {
       showSetting: false,
@@ -184,6 +187,31 @@ export default {
     console.log(this.queryList.columnList.length)
   },
   methods: {
+    listTotal(param) {
+      const { columns, data } = param
+      const sums = []
+      for(let item in this.tatolLabel){
+        columns.forEach((column, index) => {
+          if (index === 0) {
+            sums[index] = '合计'
+          } else if (column.label == this.tatolLabel[item]) {
+            const values = data.map((item) => Number(item[column.property]))
+            if (!values.every((value) => isNaN(value))) {
+              sums[index] = values.reduce((prev, curr) => {
+                const value = Number(curr)
+                if (!isNaN(value)) {
+                  return prev + curr
+                } else {
+                  return prev
+                }
+              }, 0)
+            }
+          }
+        })
+      }
+      console.log(sums[columns])
+      return sums
+    },
     initData(){
       this.queryList.columnList = this.queryList.columnList
       console.log(this.queryList.columnList)
@@ -274,7 +302,7 @@ export default {
     },
     //移出
     deleteRow(index, rows) {
-      rows.splice(index, 1);
+      this.$emit('deletRows',index,rows)
     },
     //选择
     handleSelectionChange(selection){

+ 97 - 228
src/views/project/index.vue

@@ -8,83 +8,19 @@
         :form="queryParms"
         @handleClick="handleClick"
       />
-      <el-row :gutter="10" class="mb8">
-        <el-col :span="1.5">
-          <el-button
-            type="primary"
-            icon="el-icon-plus"
-            size="mini"
-            @click="handleAdd"
-            v-hasPermi="['finance:contrast:add']"
-          >新增</el-button
-          >
-        </el-col>
-        <el-col :span="1.5">
-          <el-button
-            type="success"
-            icon="el-icon-edit"
-            size="mini"
-            :disabled="single"
-            @click="handleUpdate"
-            v-hasPermi="['warehouse:contrast:edit']"
-          >修改</el-button
-          >
-        </el-col>
-        <el-col :span="1.5">
-          <el-button
-            type="warning"
-            icon="el-icon-download"
-            size="mini"
-            @click="handleExport"
-            v-hasPermi="['finance:contrast:export']"
-          >导出</el-button
-          >
-        </el-col>
-        <div class="tabSetting">
-          <div style="margin-right: 20px">
-            <el-button
-              type="cyan"
-              icon="el-icon-search"
-              size="mini"
-              @click="handleQuery"
-            >搜索</el-button
-            >
-            <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
-            >重置</el-button
-            >
-            <el-button
-              @click="handleClick"
-              :icon="arrow"
-              size="mini"
-            >展开</el-button
-            >
-          </div>
-          <right-toolbar
-            :showSearch.sync="showSearch"
-            @queryTable="getList"
-          ></right-toolbar>
-          <div style="margin: 0 12px">
-            <el-button
-              icon="el-icon-setting"
-              size="mini"
-              circle
-              @click="showSetting = !showSetting"
-            ></el-button>
-          </div>
-        </div>
-      </el-row>
-      <MainList
-        @pargetRow="getRow"
-        @parsave="save"
-        @pardelRow="delRow"
-        @cancel="cancel"
-        @handleUpdate="handleUpdate"
-        @handleSelecttion="handleSelecttion"
-        ref="MainList"
-        :List="projectList"
-        :tableDate="tableDate"
-        :showSetting="showSetting"
-        :abbreviation="this.abbreviation = true"
+      <listComponent
+        v-if="waitFor"
+        :tableData="tableData"
+        @selectionbox="selectionbox"
+        @see="viewMethod"
+        @modify="modification"
+        @deletion="deletion"
+        @buttonList="buttonList"
+        @showSearch="showSearch"
+        @getList="getList"
+        :customButton="customButton"
+        :listStyle="listStyle"
+        :queryList="queryList"
       />
       <pagination
         v-show="total > 0"
@@ -101,52 +37,19 @@
         :display="display"
         :form="detailForm"
       />
-      <el-row :gutter="10" class="mb8">
-        <el-col :span="1.5">
-          <el-button v-if="cancelButton === true" size="mini" type="danger" icon="el-icon-refresh-left" @click="goBack">返回列表</el-button>
-        </el-col>
-        <el-col :span="1.5">
-          <el-button v-if="cancelButton === false" size="mini" icon="el-icon-refresh-left" type="danger">返回首页</el-button>
-        </el-col>
-        <el-col :span="1.5">
-          <el-button size="mini" icon="el-icon-plus" type="primary" @click="addList">新增</el-button>
-        </el-col>
-        <el-col :span="1.5">
-          <el-button size="mini" icon="el-icon-edit" type="info">修改</el-button>
-        </el-col>
-        <el-col :span="1.5">
-          <el-button size="mini" icon="el-icon-download" type="warning">导出</el-button>
-        </el-col>
-        <el-col :span="1.5">
-          <el-button size="mini" icon="el-icon-check" type="success" @click="submit">保存</el-button>
-        </el-col>
-        <el-col :span="1.5">
-          <el-button size="mini" type="primary">请核</el-button>
-        </el-col>
-        <div style="margin: 0 12px;float: right">
-          <el-button
-            icon="el-icon-setting"
-            size="mini"
-            circle
-            @click="showSetting = !showSetting"
-          ></el-button>
-        </div>
-      </el-row>
-      <MainList
-        @pargetRow="getRow2"
-        @parsave="save2"
-        @pardelRow="delRow2"
-        @cancel="cancel"
-        @onStart="onStart"
-        @onEnd="onEnd"
-        ref="MainList"
-        :tableDate="tableDate2"
-        :List="detailList"
-        :deletion="showOrHide"
-        :option="unitOptions"
-        :showSetting="showSetting"
-        :tatolLabel="tatolLabel"
-        :abbreviation="this.abbreviation = false"
+      <list-component
+        v-if="waitFor"
+        :tableData="tableData"
+        @selectionbox="selectionbox"
+        @see="viewMethod"
+        @modify="modification"
+        @deletion="deletion"
+        @buttonList="buttonList"
+        @showSearch="showSearch"
+        @getList="getList"
+        :customButton="customButton"
+        :listStyle="listStyle"
+        :queryList="queryList"
       />
     </div>
   </div>
@@ -158,13 +61,11 @@ import MainList from '@/views/components/MainList'
 import Cookies from 'js-cookie'
 import { addSet, resetModule, select } from '@/api/system/set'
 import { queryUserVal } from '@/api/system/user'
-import { listCharge, addChange, getChange} from '@/api/project/index'
+import { listCharge, addChange, getChange, getliable } from '@/api/project/index'
 export default {
   name: 'index',
-  components:{ MainForm, MainList},
   created(){
     this.getRow()
-    this.getRow2()
     this.getList()
     this.getDicts('data_unitfees').then((response) => {
       if (response.data) {
@@ -179,6 +80,13 @@ export default {
   },
   data() {
     return {
+      queryList:{
+        tableName:'项目管理',
+        columnList:[]
+      },
+      tableData:[],
+      //判断自定义列是否有值再渲染组件
+      waitFor:true,
       // 非多个禁用
       multiple: true,
       abbreviation:false,
@@ -194,12 +102,6 @@ export default {
       queryParms:{},
       detailList:[],
       mainTabel:false,
-      setRowList: [],
-      getRowList: [],
-      allCheck: false,
-      showSetting: false,
-      // 显示搜索条件
-      showSearch: true,
       // 非单个禁用
       single: true,
       arrow:'el-icon-arrow-up',
@@ -268,7 +170,7 @@ export default {
           rules:''
         }
       ],
-      tableDate: [
+      listStyle: [
         {
           surface: "1",
           label: "fNumber",
@@ -503,6 +405,33 @@ export default {
         //   Changeable:3
         // },
       ],
+      customButton:[
+        {
+          type:'primary',
+          size:'mini',
+          icon:'el-icon-plus',
+          name:'新增',
+          disabled:false,
+        },{
+          type:'success',
+          size:'mini',
+          icon:'el-icon-edit',
+          name:'修改',
+          disabled:true
+        },{
+          type:'danger',
+          size:'mini',
+          icon:'el-icon-delete',
+          name:'删除',
+          disabled:true
+        },{
+          type:'info',
+          size:'mini',
+          icon:'el-icon-plus',
+          name:'复制新增',
+          disabled:false
+        },
+      ],
       projectList:[],
       display:3,
       Lander:'',
@@ -511,6 +440,30 @@ export default {
   },
 
   methods:{
+    // 显示搜索条件、点击后会调用此方法
+    showSearch(){
+      console.log('到我了')
+    },
+    //所以按钮
+    buttonList(row){
+      console.log(row)
+    },
+    //删除
+    deletion(scope){
+      console.log(scope)
+    },
+    //修改
+    modification(scope){
+      console.log(scope)
+    },
+    //查看
+    viewMethod(scope){
+      console.log(scope)
+    },
+    //选择框
+    selectionbox(selection){
+      console.log(selection)
+    },
     //多选框
     handleSelecttion(selection){
       this.selection = selection
@@ -559,10 +512,6 @@ export default {
     goBack(){
       this.mainTabel = false
     },
-    //自定义列取消
-    cancel(){
-      this.showSetting = false
-    },
     //新增
     handleAdd() {
       this.mainTabel = true
@@ -623,67 +572,17 @@ export default {
     },
     //查询列数据
     getRow() {
-      let that = this;
-      this.data = {
-        tableName: "物资主列表",
-        userId: Cookies.get("userName"),
-      };
-      select(this.data).then((res) => {
-        if (res.data.length != 0) {
-          this.$refs.MainList.getRowList = res.data.filter((e) => e.checked == 0);
-          this.$refs.MainList.setRowList = res.data;
-          this.$refs.MainList.setRowList = this.$refs.MainList.setRowList.reduce((res, item) => {
-            res.push({
-              surface: item.surface,
-              label: item.label,
-              name: item.name,
-              checked: item.checked,
-              width: item.width,
-              fixed: item.fixed,
-            });
-            return res;
-          }, []);
-        }
-      });
-    },
-    //保存列设置
-    save() {
-      this.showSetting = false;
       this.data = {
-        tableName: "物资主列表",
-        userId: Cookies.get("userName"),
-        sysTableSetList: this.$refs.MainList.setRowList,
-      };
-      addSet(this.data).then((res) => {
-        // this.getRowList = this.setRowList.filter((e) => e.checked == 0);
-        this.$refs.MainList.getRowList = this.$refs.MainList.setRowList.filter((e) => e.checked == 0);
-      });
-    },
-    //重置列表
-    delRow() {
-      this.data = {
-        tableName: "物资主列表",
-        userId: Cookies.get("userName"),
-      };
-      resetModule(this.data).then((res) => {
-        if (res.code == 200) {
-          this.showSetting = false;
-          this.$refs.MainList.resetTwo(this.$options.data().tableDate)
-        }
-      });
-    },
-    //查询列数据
-    getRow2() {
-      let that = this;
-      this.data = {
-        tableName: "弹窗列表物资",
+        tableName: this.queryList.tableName,
         userId: Cookies.get("userName"),
       };
+
       select(this.data).then((res) => {
+        console.log(res)
         if (res.data.length != 0) {
-          this.$refs.MainList.getRowList = res.data.filter((e) => e.checked == 0);
-          this.$refs.MainList.setRowList = res.data;
-          this.$refs.MainList.setRowList = this.$refs.MainList.setRowList.reduce((res, item) => {
+          this.queryList.columnList = res.data.filter((e) => e.checked == 0);
+          this.queryList.columnList = res.data;
+          this.queryList.columnList = this.queryList.columnList.reduce((res, item) => {
             res.push({
               surface: item.surface,
               label: item.label,
@@ -691,47 +590,17 @@ export default {
               checked: item.checked,
               width: item.width,
               fixed: item.fixed,
-              changeable:item.changeable
             });
             return res;
           }, []);
+          this.waitFor = true
+        }else {
+          this.waitFor = true
+          this.queryList.columnList = this.listStyle
         }
       });
     },
-    //保存列设置
-    save2() {
-      this.showSetting = false;
-      this.data = {
-        tableName: "弹窗列表物资",
-        userId: Cookies.get("userName"),
-        sysTableSetList: this.$refs.MainList.setRowList,
-      };
-      addSet(this.data).then((res) => {
-        this.$refs.MainList.getRowList = this.$refs.MainList.setRowList.filter((e) => e.checked == 0);
-      });
-    },
-    //重置列表
-    delRow2() {
-      this.data = {
-        tableName: "弹窗列表物资",
-        userId: Cookies.get("userName"),
-      };
-      resetModule(this.data).then((res) => {
-        if (res.code == 200) {
-          this.showSetting = false;
-          // this.$refs.MainList.setRowList = this.$refs.MainList.getRowList = this.$options.data().tableDate
-          this.$refs.MainList.resetTwo(this.$options.data().tableDate2)
-        }
-      });
-    },
-    //开始拖拽事件
-    onStart() {
-      this.drag = true;
-    },
-    //拖拽结束事件
-    onEnd() {
-      this.drag = false;
-    },
+
   }
 }
 </script>

+ 14 - 2
src/views/project/index1.vue

@@ -362,7 +362,7 @@
           <el-button size="mini" :disabled="doNot" icon="el-icon-check" type="success" @click="submit">保存</el-button>
         </el-col>
         <el-col :span="1.5">
-          <el-button size="mini" :disabled="doNot" type="primary">请核</el-button>
+          <el-button size="mini" :disabled="doNot" type="primary" @click="approval">请核</el-button>
         </el-col>
         <div style="margin: 0 12px;float: right">
           <el-button
@@ -516,7 +516,7 @@
 <script>
 import Vue from 'vue'
 import draggable from "vuedraggable";
-import { addChange, getChange, listCharge, getCorps, getliable, listmaterial, delProject} from '@/api/project'
+import { addChange, getChange, listCharge, getCorps, getliable, listmaterial, delProject, addproject} from '@/api/project'
 import Cookies from 'js-cookie'
 import { addSet, resetModule, select } from '@/api/system/set'
 Vue.directive('dialogDrag', {
@@ -800,6 +800,18 @@ export default {
 
   },
   methods: {
+    //请核
+    approval(){
+      let formData = new window.FormData();
+      formData.append('tProject', JSON.stringify(this.detailform))
+      formData.append('tCtnpriceItems', JSON.stringify(this.detailList))
+      addproject(formData).then(res=>{
+        console.log(res)
+        this.$message.success("操作成功")
+        this.doNot = false
+      })
+
+    },
     /** 远程模糊查询用户 */
     corpsRemoteMethod(name) {
       let queryParams = { fName: name }

+ 212 - 0
src/views/system/auditConfiguration/index.vue

@@ -0,0 +1,212 @@
+<template>
+  <div class="app-container">
+    <el-form inline :model="dataForm">
+      <el-form-item>
+        <el-select v-model="dataForm.actId" placeholder="请选择活动名" clearable filterable @change="getDataList()">
+          <el-option
+            v-for="item in actList"
+            :key="item.actId"
+            :label="item.name"
+            :value="item.actId">
+          </el-option>
+        </el-select>
+      </el-form-item>
+      <el-form-item>
+        <el-button icon="el-icon-refresh-left" @click="getDataList">搜索</el-button>
+      </el-form-item>
+      <el-form-item>
+        <el-button icon="el-icon-refresh-left" @click="resetSearch">重置</el-button>
+      </el-form-item>
+      <el-form-item>
+        <el-button @click="save" style="float: right">保存</el-button>
+      </el-form-item>
+    </el-form>
+    <el-table :data="dataList" border v-loading="dataListLoading" style="width: 100%;">
+      <el-table-column label="序号" type="index" width="55" align="center"/>
+      <el-table-column
+        prop="branName"
+        header-align="center"
+        align="center"
+        label="承包单位"
+        v-if="loginContractorId === 1">
+      </el-table-column>
+      <el-table-column
+        prop="actId"
+        header-align="center"
+        align="center"
+        width="400"
+        label="活动名">
+        <template slot-scope="scope">
+          <span v-if="scope.row.actId === 110">入库审批流程</span>
+          <span v-if="scope.row.actId === 120">出库审批流程</span>
+          <span v-if="scope.row.actId === 130">货转审批流程</span>
+          <span v-if="scope.row.actId === 140">调拨审批流程</span>
+          <span v-if="scope.row.actId === 150">计算仓储费审批流程</span>
+          <span v-if="scope.row.actId === 160">货物通关审批流程</span>
+          <span v-if="scope.row.actId === 210">对账审批流程</span>
+          <span v-if="scope.row.actId === 220">收费审批流程</span>
+          <span v-if="scope.row.actId === 230">付费审批流程</span>
+          <span v-if="scope.row.actId === 310">协议仓储费审批流程</span>
+          <span v-if="scope.row.actId === 320">协议计划费审批流程</span>
+          <span v-if="scope.row.actId === 410">下单审批流程</span>
+          <span v-if="scope.row.actId === 420">配船审批流程</span>
+          <span v-if="scope.row.actId === 430">凯合对账审批流程</span>
+          <span v-if="scope.row.actId === 440">凯合收费审批流程</span>
+          <span v-if="scope.row.actId === 450">凯合付费审批流程</span>
+          <span v-if="scope.row.actId === 460">凯合费用审批流程</span>
+          <span v-if="scope.row.actId === 470">凯合发票申请审批流程</span>
+        </template>
+      </el-table-column>
+      <el-table-column
+        prop="reviewConditions"
+        header-align="center"
+        align="center"
+        width="250"
+        label="审核条件">
+        <template slot-scope="scope">
+          <span v-if="scope.row.reviewConditions === 'O'">
+            正常流程
+          </span>
+          <span v-if="scope.row.reviewConditions === 'I'">
+            非正常流程
+          </span>
+        </template>
+      </el-table-column>
+      <el-table-column
+        prop="pathId"
+        header-align="center"
+        align="center"
+        label="审核路径">
+        <template slot-scope="scope">
+          <el-select v-model="scope.row.pathId" placeholder="审核路径" filterable style="width: 100%">
+            <el-option
+              v-for="item in optionsPathIds"
+              :key="item.id"
+              :label="item.pathName"
+              :value="item.id">
+            </el-option>
+          </el-select>
+        </template>
+      </el-table-column>
+    </el-table>
+    <pagination
+      v-show="total>0"
+      :total="total"
+      :page.sync="dataForm.pageNum"
+      :limit.sync="dataForm.pageSize"
+      @pagination="getDataList"
+    />
+  </div>
+</template>
+
+<script>
+import {addCharge,preservation} from '@/views/system/auditConfiguration/index'
+export default {
+  data () {
+    return {
+      dataForm: {
+        branchId: this.$store.state.user.loginContractorId,
+        actId: null,
+        pageNum: 1,
+        pageSize: 10,
+      },
+      total:0,
+      dataList: [],
+      optionsBranch: [],
+      optionsPathIds: [],
+      dataListLoading: false,
+      loginContractorId: null,
+      totalPage: 0,
+      actList: [{
+        name: '入库', actId: 110
+      },{
+        name: '出库', actId: 120
+      },{
+        name: '货转', actId: 130
+      },{
+        name: '调拨', actId: 140
+      },{
+        name: '计算仓储费', actId: 150
+      },{
+        name: '货物通关', actId: 160
+      },
+        {
+        name: '对账', actId: 210
+      },{
+        name: '收费', actId: 220
+      },{
+        name: '付费', actId: 230
+      },{
+        name: '仓储费', actId: 310
+      },{
+        name: '计划费', actId: 320
+      }
+      ]
+    }
+  },
+  activated () {
+
+    // this.$http({
+    //   url: this.$http.adornUrl('/sys/user/getLoginContractorId'),
+    //   method: 'post'
+    // }).then(({data}) => {
+    //   this.loginContractorId = data.loginContractorId
+    //   this.$set(this.dataForm, 'branchId', data.loginContractorId)
+    // })
+
+
+    // this.$http({
+    //   url: this.$http.adornUrl('/engineering/bbranchs/selectBranchs'),
+    //   method: 'post',
+    //   data: ({postAddr: 'audit'})
+    // }).then(({data}) => {
+    //   if (typeof data.list !== 'undefined' && data.list !== null) {
+    //     if (typeof data.list.branchs !== 'undefined' && data.list.branchs !== null) {
+    //       this.optionsBranch = data.list.branchs
+    //     }
+    //   }
+    // })
+    this.$nextTick(function () {
+      this.getDataList()
+    })
+  },
+  methods: {
+    // 获取数据列表
+    getDataList () {
+      console.log(this.dataForm)
+      addCharge(this.dataForm).then(data =>{
+        console.log(data)
+        this.dataList = data.auditPathAct
+        this.optionsPathIds = data.auditPath
+        this.total = data.count
+      })
+    },
+    // 保存
+    save () {
+      let formData = new window.FormData()
+      formData.append('auditPathsActs', JSON.stringify(this.dataList))
+      preservation(formData).then(data =>{
+        console.log(data)
+        this.$message.success('保存成功');
+      })
+    },
+    // 每页数
+    sizeChangeHandle (val) {
+      this.dataForm.size = val
+      this.dataForm.current = 1
+      this.getDataList()
+    },
+    // 当前页
+    currentChangeHandle (val) {
+      this.dataForm.current = val
+      this.getDataList()
+    },
+    resetSearch () {
+      this.dataForm.actId = null
+      this.dataForm.current = 1
+      this.dataForm.size = 10
+      this.getDataList()
+    }
+  }
+}
+</script>

+ 325 - 0
src/views/system/toConfigure/auditPaths-add-or-update.vue

@@ -0,0 +1,325 @@
+<template>
+  <el-dialog
+    :title="!dataForm.id ? '新增' : '修改'"
+    :close-on-click-modal="false"
+    :before-close="closeDialog"
+    :visible.sync="visible"
+    :modal="false"
+    width="75%">
+    <el-form :inline="true" :model="dataForm" :rules="dataRule" ref="dataForm">
+      <div class="form-group dialog">
+        <el-form-item label="审核路径名称" prop="pathName">
+          <el-input v-model="dataForm.pathName" placeholder="审核路径名称"></el-input>
+        </el-form-item>
+        <el-form-item label="状态" prop="status">
+          <el-select v-model="dataForm.status" placeholder="状态" style="width: 100%">
+            <el-option
+              v-for="item in optionsStatue"
+              :key="item.id"
+              :label="item.name"
+              :value="item.id">
+            </el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="维护人" prop="opUserName">
+          <el-input v-model="dataForm.opUserName" disabled placeholder="维护人"></el-input>
+        </el-form-item>
+        <el-form-item label="维护时间" prop="opDate">
+          <el-input v-model="dataForm.opDate" disabled placeholder="维护时间"></el-input>
+        </el-form-item>
+        <el-form-item label="备注" class="full" prop="remarks">
+          <el-input v-model="dataForm.remarks" placeholder="备注"></el-input>
+        </el-form-item>
+      </div>
+    </el-form>
+    <el-button @click.prevent="addRow()" style="float: left">添加</el-button>
+    <el-table :data="dataList" tooltip-effect="dark" border stripe style="width: 100%; margin-bottom: 20px">
+      <el-table-column
+        width="80PX"
+        label="级次"
+        type="index">
+      </el-table-column>
+      <el-table-column
+        prop="levelName"
+        header-align="center"
+        align="center"
+        label="路径名称">
+        <template slot-scope="scope">
+          <el-input v-model="scope.row.levelName" placeholder="路径名称" show-word-limit/>
+        </template>
+      </el-table-column>
+      <el-table-column
+        prop="iffixAuditUser"
+        header-align="center"
+        align="center"
+        label="是否指定审批人">
+        <template slot-scope="scope">
+          <el-select v-model="scope.row.iffixAuditUser" placeholder="是否指定审批人" @change="changeIffixAudit(scope.row)"
+                     style="width: 100%">
+            <el-option
+              v-for="item in optionsiffixAudit"
+              :key="item.id"
+              :label="item.name"
+              :value="item.id">
+            </el-option>
+          </el-select>
+        </template>
+      </el-table-column>
+      <el-table-column
+        prop="auditUserId"
+        header-align="center"
+        align="center"
+        label="审核人">
+        <template slot-scope="scope">
+          <el-select v-model="scope.row.auditUserId" v-if="scope.row.iffixAuditUser === 'F'"
+                     filterable multiple collapse-tags placeholder="审核人" style="width: 100%">
+            <el-option
+              v-for="item in optionsUsers"
+              :key="item.userId"
+              :label="item.actualname"
+              :value="item.userId">
+            </el-option>
+          </el-select>
+          <el-select v-model="scope.row.auditUserId" v-if="scope.row.iffixAuditUser === 'T'"
+                     filterable multiple collapse-tags placeholder="审核人" style="width: 100%">
+            <el-option
+              v-for="item in optionsUsers_s"
+              :key="item.userId"
+              :label="item.userName"
+              :value="item.userId">
+            </el-option>
+          </el-select>
+        </template>
+      </el-table-column>
+      <el-table-column
+        prop="iffinalItem"
+        header-align="center"
+        align="center"
+        label="是否最后一级">
+        <template slot-scope="scope">
+          <el-select v-model="scope.row.iffinalItem" placeholder="是否最后一级" style="width: 100%">
+            <el-option
+              v-for="item in optionsIfStatus"
+              :key="item.val"
+              :label="item.name"
+              :value="item.val">
+            </el-option>
+          </el-select>
+        </template>
+      </el-table-column>
+      <el-table-column
+        prop="remarks"
+        header-align="center"
+        align="center"
+        label="备注">
+        <template slot-scope="scope">
+          <el-input v-model="scope.row.remarks" placeholder="备注" show-word-limit/>
+        </template>
+      </el-table-column>
+      <el-table-column
+        header-align="center"
+        align="center"
+        label="操作">
+        <template slot-scope="scope">
+          <el-button @click.native.prevent="deleteRow(scope.$index, dataList)" size="small">移除</el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+    <span slot="footer" class="dialog-footer">
+      <el-button @click="closeDia">取消</el-button>
+      <el-button type="primary" @click="dataFormSubmit()">确定</el-button>
+    </span>
+  </el-dialog>
+</template>
+
+<script>
+import {addCharge,reviewer,modify} from '@/api/system/auditPaths-add-or-update'
+import { queryUserVal } from '@/api/warehouseBusiness/agreement'
+import { listUser } from '@/api/system/user'
+
+  export default {
+    data () {
+      return {
+        dataForm: {
+          status: 'A',
+        },
+        visible: false,
+        dataRule: {},
+        dataList: [],
+        optionsUsers: [],
+        optionsUsers_s:[],
+        optionsiffixAudit: [{
+          id: 'T',
+          name: '是'
+        }, {
+          id: 'F',
+          name: '否'
+        }],
+        optionsIfStatus: [{
+          val: 'F',
+          name: '否'
+        }, {
+          val: 'T',
+          name: '是'
+        }],
+        optionsStatue: [{
+          id: 'A',
+          name: '有效'
+        }, {
+          id: 'S',
+          name: '停用'
+        }]
+      }
+    },
+    methods: {
+      init (val) {
+        this.optionsUsers = []
+        this.visible = true
+        if (typeof val !== 'undefined') {
+          console.log(val)
+          this.queryAuditPath(val)
+          this.queryUsers()
+        } else {
+          this.queryUsers()
+        }
+      },
+      queryUsers () {
+        queryUserVal().then((response)=>{
+          // this.contrastList.createBy = response.user.userName
+          // this.dataForm.opUserName = response.user.userName
+          console.log(response)
+          this.$set(this.dataForm, "opUserName", response.user.userName);
+          this.$set(this.dataForm, "opDate", response.date.slice(0,10));
+        })
+        console.log(this.dataForm)
+        //请求所有审核人角色
+        reviewer().then(data =>{
+          this.optionsUsers = data
+          console.log(data)
+        })
+        //请求所有用户名
+        listUser().then(response => {
+          this.optionsUsers_s = response.rows
+          console.log(response.rows)
+        })
+        // this.$http({
+        //   url: this.$http.adornUrl('/sys/user/selectUser'),
+        //   method: 'post',
+        //   data: ({mobile: 'auditUser'})
+        // }).then(({data}) => {
+        //   if (typeof data.list !== 'undefined' && data.list !== null) {
+        //     if (typeof data.list.users !== 'undefined' && data.list.users !== null) {
+        //       this.optionsUsers = data.list.users
+        //     }
+        //   }
+        // })
+      },
+      queryAuditPath (val) {
+        modify(val).then(res => {
+          console.log(res)
+          let data = res.data.data
+          this.dataForm = data.auditPaths
+          this.dataList = data.auditPathsLevels
+          for (let index in this.dataList){
+            this.dataList[index].auditUserId = data.auditUserIds[index]
+          }
+        })
+      },
+      addRow () {
+        let val = {
+          levelName: null,
+          auditUserId: [],
+          // auditUserName: null,
+          iffixAuditUser: 'T',
+          iffinalItem: 'T',
+          remarks: null
+        }
+        this.dataList.push(val)
+      },
+      deleteRow (index, rows) { // 删除改行
+        rows.splice(index, 1)
+      },
+      changeIffixAudit (row) {
+        row.auditUserId = []
+      },
+      // 表单提交
+      dataFormSubmit () {
+        console.log(this.dataForm)
+        console.log(this.dataList)
+        if (this.dataList.length === 0) {
+          this.$message.error('请维护审批级次')
+          return false
+        }
+        for (let x in this.dataList) {
+          if (this.dataList[x].iffixAuditUser === 'S') {
+            if (this.dataList[x].auditUserId === null || this.dataList[x].auditUserId === '' || this.dataList[x].auditUserId.length === 0) {
+              this.$message.error('请维护第' + (Number(x) + 1) + '级的审核人')
+              return false
+            }
+          }
+        }
+        let formData = new FormData()
+        formData.append('auditPaths', JSON.stringify(this.dataForm))
+        formData.append('auditPathsLevels', JSON.stringify(this.dataList))
+        this.$confirm(`是否提交?`, '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(function() {
+          return addCharge(formData)
+        }).then((data) => {
+          console.log(data)
+            if (data && data.code === 200) {
+              this.$message({
+                message: '操作成功',
+                type: 'success'
+              });
+              this.closeDia()
+            } else {
+              this.$message.error(data.msg)
+            }
+        })
+
+        // this.$confirm(`是否提交?`, '提示', {
+        //   confirmButtonText: '确定',
+        //   cancelButtonText: '取消',
+        //   type: 'warning'
+        // }).then(() => {
+        //   let formData = new FormData()
+        //   formData.append('auditPaths', JSON.stringify(this.dataForm))
+        //   formData.append('auditPathsLevels', JSON.stringify(this.dataList))
+        //   this.$http({
+        //     url: this.$http.adornUrl(`/engineering/auditPaths/save`),
+        //     method: 'post',
+        //     data: formData
+        //   }).then(({data}) => {
+        //     if (data && data.code === 0) {
+        //       this.$message({
+        //         message: '操作成功',
+        //         type: 'success',
+        //         duration: 600,
+        //         onClose: () => {
+        //           this.closeDia()
+        //         }
+        //       })
+        //     } else {
+        //       this.$message.error(data.msg)
+        //     }
+        //   })
+        // })
+      },
+      closeDialog (done) {
+        done()
+        // location.reload()
+        this.visible = false
+        this.$emit('refreshDataList')
+        Object.assign(this.$data, this.$options.data.call(this))
+      },
+      closeDia () {
+        this.visible = false
+        this.$emit('refreshDataList')
+        Object.assign(this.$data, this.$options.data.call(this))
+      }
+    }
+  }
+</script>

+ 238 - 0
src/views/system/toConfigure/index.vue

@@ -0,0 +1,238 @@
+<template>
+  <div class="app-container">
+    <el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
+      <el-form-item label="审核路径名" label-width="85px" prop="pathName">
+        <el-input v-model="dataForm.pathName"></el-input>
+      </el-form-item>
+      <el-form-item>
+        <el-button type="cyan" icon="el-icon-search" size="mini" @click="getDataList">搜索</el-button>
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery_s">重置</el-button>
+      </el-form-item>
+      <el-row :gutter="10" class="mb8">
+        <el-col :span="1.5">
+          <el-button
+            type="primary"
+            icon="el-icon-plus"
+            size="mini"
+            @click="addOrUpdateHandle()"
+          >新增
+          </el-button>
+        </el-col>
+        <right-toolbar @queryTable="getDataList"></right-toolbar>
+      </el-row>
+    </el-form>
+    <el-table :data="dataList" v-loading="dataListLoading" style="width: 100%;">
+      <el-table-column
+        header-align="center"
+        align="center"
+        type="index"
+        width="80"
+        label="序号">
+      </el-table-column>
+      <el-table-column
+        prop="pathName"
+        header-align="center"
+        align="center"
+        width="220"
+        label="审核路径名称">
+      </el-table-column>
+      <el-table-column
+        prop="opUserName"
+        header-align="center"
+        align="center"
+        width="150"
+        label="维护人">
+      </el-table-column>
+      <el-table-column
+        prop="opDate"
+        header-align="center"
+        align="center"
+        width="150"
+        label="维护时间">
+      </el-table-column>
+      <el-table-column
+        prop="status"
+        header-align="center"
+        align="center"
+        width="90"
+        label="状态">
+        <template slot-scope="scope">
+<!--          <span v-if="scope.row.status === 'N'">新建</span>-->
+          <span v-if="scope.row.status === 'A'">有效</span>
+          <span v-if="scope.row.status === 'S'">停用</span>
+          <span v-if="scope.row.status === 'Z'">暂存</span>
+        </template>
+      </el-table-column>
+      <el-table-column
+        prop="remarks"
+        header-align="center"
+        align="center"
+        label="备注">
+      </el-table-column>
+      <el-table-column
+        fixed="right"
+        header-align="center"
+        align="center"
+        width="150"
+        label="操作">
+        <template slot-scope="scope">
+          <el-button type="text" size="small"
+                     @click="addOrUpdateHandle(scope.row.id)">修改
+          </el-button>
+          <el-button type="text" size="small"
+                     @click="deleteHandle(scope.row.id)">删除
+          </el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+    <pagination
+      v-show="total>0"
+      :total="total"
+      :page.sync="dataForm.pageNum"
+      :limit.sync="dataForm.pageSize"
+      @pagination="getDataList"
+    />
+    <!-- 弹窗, 新增 / 修改 -->
+    <add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList" :dataForm="editModel"></add-or-update>
+  </div>
+</template>
+
+<script>
+import AddOrUpdate from './auditPaths-add-or-update'
+import {addCharge,delCharge} from '@/views/system/toConfigure/index'
+
+export default {
+  data () {
+    return {
+      loginContractorId: null,
+      dataForm: {
+        pathId: null,
+        pathName: null,
+        createBy: null,
+        opUserName: null,
+        opDate: null,
+        status: 'A',
+        remarks: null,
+        pageNum: 1,
+        pageSize: 10
+      },
+      total:0,
+      editModel: {},
+      dataList: [],
+      totalPage: 0,
+      dataListLoading: false,
+      addOrUpdateVisible: false
+    }
+  },
+  components: {
+    AddOrUpdate
+  },
+  activated () {
+    // this.$http({
+    //   url: this.$http.adornUrl('/sys/user/getLoginContractorId'),
+    //   method: 'post'
+    // }).then(({data}) => {
+    //   this.loginContractorId = data.loginContractorId
+    // })
+
+    this.getDataList()
+  },
+  methods: {
+    resetQuery_s(){
+      this.dataForm = {
+        pathId: null,
+          pathName: null,
+          createBy: null,
+          opUserName: null,
+          opDate: null,
+          status: 'A',
+          remarks: null,
+          pageNum: 1,
+          pageSize: 10
+      }
+    },
+    // 获取数据列表
+    getDataList () {
+      this.dataListLoading = true
+      addCharge(this.dataForm).then(data => {
+        this.total = data.total
+        console.log(data)
+        if (typeof data.rows !== 'undefined' && data.rows !== null) {
+          this.dataList = data.rows
+          this.totalPage = data.rows.total
+        } else {
+          this.dataList = []
+          this.totalPage = 0
+        }
+        this.dataListLoading = false
+      })
+    },
+    resetSearch () {
+      this.dataForm.pathName = null
+      this.dataForm.opUserName = null
+      this.dataForm.opDate = null
+      this.dataForm.current = 1
+      this.dataForm.size = 10
+      this.getDataList()
+    },
+    // 每页数
+    sizeChangeHandle (val) {
+      this.dataForm.size = val
+      this.dataForm.current = 1
+      this.getDataList()
+    },
+    // 当前页
+    currentChangeHandle (val) {
+      this.dataForm.current = val
+      this.getDataList()
+    },
+    // 新增 / 修改
+    addOrUpdateHandle (val) {
+      this.addOrUpdateVisible = true
+      this.$nextTick(() => {
+        this.$refs.addOrUpdate.init(val)
+      })
+    },
+    // 删除
+    deleteHandle (id) {
+      this.$confirm('是否确认删除财务数据主编号为"' + id + '"的数据项?', '警告', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(function() {
+        return delCharge(id)
+      }).then((res) => {
+        console.log(res)
+        this.msgSuccess('删除成功')
+        this.getDataList()
+      })
+
+      // this.$confirm(`确定进行删除操作?`, '提示', {
+      //   confirmButtonText: '确定',
+      //   cancelButtonText: '取消',
+      //   type: 'warning'
+      // }).then(() => {
+      //   this.$http({
+      //     url: this.$http.adornUrl('/engineering/auditPaths/delete'),
+      //     method: 'post',
+      //     data: (id)
+      //   }).then(({data}) => {
+      //     if (data && data.code === 0) {
+      //       this.$message({
+      //         message: '操作成功',
+      //         type: 'success',
+      //         duration: 600,
+      //         onClose: () => {
+      //           this.getDataList()
+      //         }
+      //       })
+      //     } else {
+      //       this.$message.error(data.msg)
+      //     }
+      //   })
+      // }).catch(() => {
+      // })
+    }
+  }
+}
+</script>

+ 458 - 112
src/views/warehouse/inStock/index.vue

@@ -10,24 +10,24 @@
         :show="show"
         @handleClick="handleClick"
       />
-      <div style="width:40%;margin-left:60%;margin-bottom: -10%">
-        <el-button
-          type="cyan"
-          icon="el-icon-search"
-          size="mini"
-          @click="handleQuery"
-        >搜索</el-button
-        >
-        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
-        >重置</el-button
-        >
-        <el-button
-          @click="handleClick"
-          :icon="arrow"
-          size="mini"
-        >展开</el-button
-        >
-      </div>
+<!--      <div style="width:40%;margin-left:60%;margin-bottom: -10%">-->
+<!--        <el-button-->
+<!--          type="cyan"-->
+<!--          icon="el-icon-search"-->
+<!--          size="mini"-->
+<!--          @click="handleQuery"-->
+<!--        >搜索</el-button-->
+<!--        >-->
+<!--        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"-->
+<!--        >重置</el-button-->
+<!--        >-->
+<!--        <el-button-->
+<!--          @click="handleClick"-->
+<!--          :icon="arrow"-->
+<!--          size="mini"-->
+<!--        >展开</el-button-->
+<!--        >-->
+<!--      </div>-->
       <listComponent
         style="clear:both"
         v-if="waitFor"
@@ -41,18 +41,27 @@
         @getList="getList"
         :customButton="customButton"
         :arrow="arrow"
+        :seachButton="seachButton"
         :listStyle="listStyle"
         :queryList="queryList"/>
+      <pagination
+        v-show="total > 0"
+        :total="total"
+        :page.sync="queryParms.pageNum"
+        :limit.sync="queryParms.pageSize"
+        @pagination="getList"
+      />
     </div>
     <div v-if="MainTable == true">
       <MainForm
-        ref="MainForm"
+        ref="detailForm"
         :searchdata="detailOption"
         :hidedata="hideDetail"
         :display="display"
-        :form="queryParms"
+        :form="detailForm"
         :show="show = true"
         @handleClick="handleClick"
+        @verificationRules="verificationRules"
       />
       <list-component
         v-if="waitFor"
@@ -64,8 +73,13 @@
         @buttonList="buttonList"
         @showSearch="showSearch"
         @getList="getList"
+        @listTotal="listTotal"
+        @deletRows="deletRows"
+        :seachButton="confirmButton"
         :customButton="detailButton"
         :listStyle="mainStyle"
+        :setRowList="detailStyle"
+        :tatolLabel="tatolLabel"
         :queryList="detailList"/>
     </div>
   </div>
@@ -73,11 +87,18 @@
 
 <script>
 import { select } from '@/api/system/set'
+import MainForm from '@/combination/MainForm'
+import { listInStock, addSave, getSave, getArea,
+  getustomer,getEntry, getwarehouse, getGoodName,
+  canBedelet, delRows, getWarehousekeeper} from '@/api/warehouse/inStock'
 import Cookies from 'js-cookie'
 export default {
   name: 'inStock',
   data(){
     return{
+      // 总条数
+      total: 0,
+      tatolLabel:['单价','数量','金额'],
       MainTable:false,
       show: false,
       arrow:'el-icon-arrow-up',
@@ -92,12 +113,19 @@ export default {
       //判断自定义列是否有值再渲染组件
       waitFor:false,
       display:3,
-      queryParms:{},
+      queryParms:{
+        pageNum: 1,
+        pageSize: 10,
+        fBilltype:'RK'
+      },
+      detailForm:{
+
+      },
       //主页面默认显示4个表单数据
       formOption:[
         {
           span:6,
-          label: 'fNumber',
+          label: 'fBillno',
           name:"系统编号",
           form:2,
           width:200,
@@ -106,27 +134,29 @@ export default {
         },
         {
           span:6,
-          label: 'fNumber',
+          label: 'fGoodsid',
           name:"项目名称",
-          form:2,
+          form:1,
           width:200,
           labelSize:'80',
-          rules:''
+          rules:'',
+          data:[]
         },
         {
           span:6,
-          label: 'fNumber',
+          label: 'fCorpid',
           name:"客户名称",
           form:1,
           width:200,
           labelSize:'80',
-          rules:''
+          rules:'',
+          data:[]
         },
         {
           span:6,
-          label: 'fNumber',
+          label: 'moneys',
           name:"金额",
-          form:2,
+          form:5,
           width:200,
           labelSize:'80',
           rules:''
@@ -137,7 +167,7 @@ export default {
       hidedata:[
         {
           span:6,
-          label: 'fNumber',
+          label: 'cLoadDate',
           name:"申请日期",
           form:3,
           width:200,
@@ -146,7 +176,7 @@ export default {
         },
         {
           span:6,
-          label: 'fNumber',
+          label: 'createBy',
           name:"申请人",
           form:2,
           width:200,
@@ -155,7 +185,7 @@ export default {
         },
         {
           span:6,
-          label: 'fNumber',
+          label: 'remark',
           name:"备注",
           form:2,
           width:200,
@@ -173,27 +203,27 @@ export default {
       listStyle: [
         {
           surface: "1",
-          label: "fLineNumber",
+          label: "serialNumber",
           name: "序号",
           checked: 0,
           width: 100,
           onabort:''
         },{
           surface: "2",
-          label: "fMaterial1",
+          label: "fBillno",
           name: "申请编号",
           checked: 0,
           width: 100,
         },{
           surface: "3",
-          label: "fMaterial2",
+          label: "projectName",
           name: "项目名称",
           checked: 0,
           width: 200,
           operation:1
         },{
           surface: "4",
-          label: "fMaterial2",
+          label: "corpName",
           name: "客户名称",
           checked: 0,
           width: 200,
@@ -207,21 +237,21 @@ export default {
           operation:1
         },{
           surface: "6",
-          label: "fMaterial2",
+          label: "cLoadDate",
           name: "申请日期",
           checked: 0,
           width: 200,
           operation:1
         },{
           surface: "7",
-          label: "fMaterial2",
+          label: "createBy",
           name: "申请人",
           checked: 0,
           width: 200,
           operation:1
         },{
           surface: "8",
-          label: "fMaterial2",
+          label: "fBillstatus",
           name: "状态",
           checked: 0,
           width: 200,
@@ -235,7 +265,7 @@ export default {
           operation:1
         },{
           surface: "10",
-          label: "fMaterial2",
+          label: "remark",
           name: "备注",
           checked: 0,
           width: 200,
@@ -261,15 +291,15 @@ export default {
           onabort:''
         },{
           surface: "2",
-          label: "fMaterial1",
+          label: "fFeeid",
           name: "品名",
           checked: 0,
-          width: 100,
+          width: 200,
           changeable:1,
           data:[]
         },{
           surface: "3",
-          label: "fMaterial2",
+          label: "fUnitprice",
           name: "单价",
           checked: 0,
           width: 200,
@@ -277,7 +307,7 @@ export default {
           changeable:2,
         },{
           surface: "4",
-          label: "fMaterial3",
+          label: "fQty",
           name: "数量",
           checked: 0,
           width: 200,
@@ -285,23 +315,25 @@ export default {
           changeable:2,
         },{
           surface: "5",
-          label: "fMaterial4",
+          label: "fFeeunitid",
           name: "计量单位",
           checked: 0,
           width: 200,
           changeable:1,
-          operation:2
+          operation:2,
+          data:[]
         },{
           surface: "6",
-          label: "fMaterial5",
+          label: "fWarehouseid",
           name: "库区",
           checked: 0,
           width: 200,
           operation:2,
-          changeable:1
+          changeable:1,
+          data:[]
         },{
           surface: "7",
-          label: "fMaterial6",
+          label: "fAmount",
           name: "金额",
           checked: 0,
           width: 200,
@@ -309,40 +341,40 @@ export default {
           changeable: 2
         },{
           surface: "8",
-          label: "fMaterial7",
-          name: "状态",
+          label: "fStltypeid",
+          name: "付费方式",
           checked: 0,
           width: 200,
           operation:1,
           changeable: 1,
-          data:[
-            {
-            label:'正常',
-            value:'0'
-          },
-            {
-            label: '停用',
-            value: '1'
-            }
-          ]
+          data:[]
         },{
           surface: "9",
-          label: "fMaterial8",
-          name: "审核日期",
+          label: "remark",
+          name: "备注",
           checked: 0,
           width: 200,
           operation:1,
-          changeable: 3
+          changeable: 2
         },{
           surface: "10",
-          label: "fMaterial9",
-          name: "备注",
+          label: "fReviewDate",
+          name: "审核日期",
           checked: 0,
           width: 200,
           operation:1,
+          changeable: 3
+        },
+        {
+          surface: "11",
+          label: "createBy",
+          name: "申请人",
+          checked: 0,
+          width: 200,
+          operation:2,
           changeable: 2
         },{
-          surface: "11",
+          surface: "12",
           label: "fMaterial10",
           name: "操作",
           checked: 0,
@@ -355,7 +387,7 @@ export default {
       detailOption:[
         {
           span:6,
-          label: 'fNumber',
+          label: 'fBillno',
           name:"系统编号",
           form:2,
           width:200,
@@ -364,41 +396,37 @@ export default {
         },
         {
           span:6,
-          label: 'fNumber',
+          label: 'fCorpid',
           name:"供应商",
           form:1,
           width:200,
           labelSize:'80',
-          rules:'',
-          data:[{
-            label:'盛源嘉',
-            value:1
-          }]
+          rules:{required: false},
+          data:[]
         },
         {
           span:6,
-          label: 'fNumber',
+          label: 'fStorekeeper',
           name:"库管员",
-          form:2,
+          form:1,
           width:200,
           labelSize:'80',
-          rules:''
+          rules:'',
+          data:[]
         },
         {
           span:6,
-          label: 'fNumber',
+          label: 'fWarehouseid',
           name:"仓库",
           form:1,
           width:200,
           labelSize:'80',
-          rules:''
+          rules:{ required: true, message: ' 1asdad', trigger: 'blur' },
+          data:[]
         },
-      ],
-      //详情主表隐藏
-      hideDetail:[
         {
           span:6,
-          label: 'fNumber',
+          label: 'fBsdate',
           name:"入库日期",
           form:3,
           width:200,
@@ -407,63 +435,273 @@ export default {
         },
         {
           span:6,
-          label: 'fNumber',
+          label: 'fSbu',
           name:"付款单位",
           form:1,
           width:200,
           labelSize:'80',
-          rules:''
+          rules:{required: false},
+          data:[]
         },
         {
           span:6,
-          label: 'fNumber',
+          label: 'remark',
           name:"备注",
           form:4,
           width:200,
           labelSize:'80',
           rules:''
         },
-
+      ],
+      //详情主表隐藏
+      hideDetail:[
+      //   {
+      //     span:6,
+      //     label: 'fBsdate',
+      //     name:"入库日期",
+      //     form:3,
+      //     width:200,
+      //     labelSize:'80',
+      //     rules:''
+      //   },
+      //   {
+      //     span:6,
+      //     label: 'fSbu',
+      //     name:"付款单位",
+      //     form:1,
+      //     width:200,
+      //     labelSize:'80',
+      //     rules:'',
+      //     data:[]
+      //   },
+      //   {
+      //     span:6,
+      //     label: 'remark',
+      //     name:"备注",
+      //     form:4,
+      //     width:200,
+      //     labelSize:'80',
+      //     rules:''
+      //   },
+      //
       ],
       //按钮
       customButton:[
         {
           type:'primary',
-          size:'small',
-          icon:'el-icon-edit',
+          size:'mini',
+          icon:'el-icon-plus',
           name:'新增',
           disabled:false,
         },{
-          type:'danger',
-          size:'small',
+          type:'success',
+          size:'mini',
           icon:'el-icon-edit',
           name:'修改',
           disabled:true
+        },{
+          type:'danger',
+          size:'mini',
+          icon:'el-icon-delete',
+          name:'删除',
+          disabled:true
+        },{
+          type:'info',
+          size:'mini',
+          icon:'el-icon-plus',
+          name:'复制新增',
+          disabled:false
+        },
+      ],
+      seachButton:[
+        {
+          type:'',
+          size:'mini',
+          icon:'el-icon-search',
+          name:'搜索',
+          disabled:false,
+        },{
+          type:'',
+          size:'mini',
+          icon:'el-icon-refresh',
+          name:'重置',
+          disabled:false,
+        },{
+          type:'',
+          size:'mini',
+          icon:'el-icon-arrow-up',
+          name:'展开',
+          disabled:false
         }
       ],
       detailButton:[
         {
+          type:'danger',
+          size:'mini',
+          icon:'el-icon-refresh-left',
+          name:'返回列表',
+          disabled:false,
+        },{
           type:'primary',
-          size:'small',
+          size:'mini',
           icon:'el-icon-edit',
           name:'录入',
           disabled:false,
         },{
-          type:'danger',
-          size:'small',
+          type:'success',
+          size:'mini',
           icon:'el-icon-edit',
-          name:'修改',
-          disabled:true
+          name:'保存',
+          disabled:false
+        }
+      ],
+      confirmButton:[
+        {
+          type:'cyan',
+          size:'mini',
+          icon:'',
+          name:'打印',
+          disabled:false,
+        },{
+          type:'info',
+          size:'mini',
+          icon:'',
+          name:'入库确认',
+          disabled:false
         }
       ]
     }
   },
   created() {
     this.getRow()
+    this.getList()
+    this.selectMethods()
   },
   methods:{
+    selectMethods(){
+      this.mainMethods()
+      this.detailMethods()
+    },
+    //主页面下拉获取名称
+    mainMethods(){
+      for(let li in this.formOption){
+        if(this.formOption[li].name == '项目名称'){
+          let queryParams = { pageNum: 1,}
+          getEntry(queryParams).then(res=>{
+            for(let item in res.data){
+              this.formOption[li].data.push({
+                label:res.data[item].projectName,
+                value:res.data[item].fId
+              })
+            }
+          })
+        }else if(this.formOption[li].name == '客户名称'){
+          let queryParams = { pageNum: 1, fTypeid: 1}
+          getustomer(queryParams).then(res => {
+            console.log(res)
+            for(let item in res.data){
+              this.formOption[li].data.push({
+                label:res.data[item].fName,
+                value:res.data[item].fId
+              })
+            }
+          })
+        }
+      }
+    },
+    //弹窗页获取下拉名称
+    detailMethods(){
+      for(let li in this.detailOption){
+        if(this.detailOption[li].name == '仓库'){
+          //获取仓库
+          let queryParams = { pageNum: 1 }
+          getwarehouse(queryParams).then(res=>{
+            for(let item in res.rows){
+              this.detailOption[li].data.push({
+                label:res.rows[item].fName,
+                value:res.rows[item].fId
+              })
+
+            }
+          })
+        }else if(this.detailOption[li].name == '供应商'){
+          //获取供应商
+          let queryParams = { pageNum: 1, fTypeid: 1}
+          getustomer(queryParams).then(res => {
+            for(let item in res.data){
+              this.detailOption[li].data.push({
+                label:res.data[item].fName,
+                value:res.data[item].fId
+              })
+            }
+          })
+        }else if(this.detailOption[li].name == '付款单位'){
+          //获取付款单位
+          let queryParams = { pageNum: 1, fTypeid: 1}
+          getustomer(queryParams).then(res => {
+            for(let item in res.data){
+              this.detailOption[li].data.push({
+                label:res.data[item].fName,
+                value:res.data[item].fId
+              })
+            }
+          })
+        }else if(this.detailOption[li].name == '库管员'){
+          let queryParams = { pageNum: 1,roleName:'库管'}
+          getWarehousekeeper(queryParams).then(res=>{
+            for(let item in res.rows){
+              this.detailOption[li].data.push({
+                label:res.rows[item].userName,
+                value:res.rows[item].userId
+              })
+            }
+          })
+        }
+      }
+      //获取计量单位字典表
+      for(let li in this.detailStyle) {
+        if (this.detailStyle[li].name == '计量单位') {
+          this.getDicts('data_unitfees').then((response) => {
+            if (response.data) {
+              for (let item in response.data) {
+                this.detailStyle[li].data.push({
+                  label: response.data[item].dictLabel,
+                  value: response.data[item].dictValue
+                })
+              }
+            }
+          })
+        } else if (this.detailStyle[li].name == '付费方式') {
+          this.getDicts('f_paymode').then((response) => {
+            if (response.data) {
+              for (let item in response.data) {
+                this.detailStyle[li].data.push({
+                  label: response.data[item].dictLabel,
+                  value: response.data[item].dictValue
+                })
+              }
+            }
+          })
+        }else if(this.detailStyle[li].name == '品名'){
+          let queryParams = { pageNum: 1 }
+          getGoodName(queryParams).then(res=>{
+            for(let item in res.rows){
+              this.detailStyle[li].data.push({
+                label:res.rows[item].fName,
+                value:res.rows[item].fId
+              })
+            }
+          })
+        }
+      }
+    },
     handleClick(){
       this.show = !this.show
+      if(this.show){
+        this.arrow = 'el-icon-arrow-down'
+      }else{
+        this.arrow = 'el-icon-arrow-up'
+      }
     },
     handleQuery(){
 
@@ -478,7 +716,6 @@ export default {
         userId: Cookies.get("userName"),
       };
       select(this.data).then((res) => {
-        console.log(res)
         if (res.data.length != 0) {
           this.queryList.columnList = res.data.filter((e) => e.checked == 0);
           this.queryList.columnList = res.data;
@@ -498,7 +735,6 @@ export default {
           this.waitFor = true
           this.queryList.columnList = this.listStyle
         }
-        console.log(this.getRowList)
       });
     },
     //选择框
@@ -508,6 +744,20 @@ export default {
     //查看
     viewMethod(scope){
       console.log(scope)
+      this.detailList.columnList = this.detailStyle
+      getSave(scope.row.fId).then(res=>{
+        if(res.data.warehouseBills){
+          this.detailForm = res.data.warehouseBills
+        }
+        if(res.data.tWarehousebillsfees){
+          this.detailData = res.data.tWarehousebillsfees
+          for(let li in this.detailData){
+            this.$set(this.detailData[li],'fFeeunitid',JSON.stringify(this.detailData[li].fFeeunitid))
+            this.$set(this.detailData[li],'fStltypeid',JSON.stringify(this.detailData[li].fStltypeid))
+          }
+        }
+        this.MainTable = true
+      })
     },
     //修改
     modification(scope){
@@ -517,27 +767,91 @@ export default {
     deletion(scope){
       console.log(scope)
     },
+    //删除从表行
+    deletRows(index,rows){
+      console.log(this.detailForm.fId)
+      console.log(this.detailData)
+      console.log(index)
+      console.log(rows[index].fId)
+        if(rows[index].fId){
+          let formData = {
+              fId:this.detailForm.fId,
+              fDateChanged:this.detailForm.fDateChanged
+            }
+          canBedelet(formData).then(res=>{
+            return delRows(rows[index].fId)
+          })
+            .then(()=>{
+              this.msgSuccess("删除成功");
+            })
+          .catch(res=>{
+            this.$message.error(res)
+          })
+        }else {
+          rows.splice(index, 1)
+        }
+    },
+    verificationRules(valid){
+      console.log(valid)
+      if(valid){
+        this.detailData.push({
+          serialNumber:null,
+          fFeeid:null,
+          fUnitprice:null,
+          fQty:null,
+          fFeeunitid:null,
+          fWarehouseid:null,
+          fAmount:null,
+          fStltypeid:null,
+          remark:null,
+          fReviewDate:null,
+          createBy:null,
+        })
+        for(let li in this.detailStyle){
+          if(this.detailStyle[li].name == '库区'){
+            getArea(this.detailForm.fWarehouseid).then(res=>{
+              for(let item in res.data){
+                this.detailStyle[li].data.push({
+                  label:res.data[item].fWarehouseInformation,
+                  value:res.data[item].id
+                })
+              }
+            })
+          }
+        }
+      }
+    },
     //所以按钮
     buttonList(row){
       console.log(row)
       console.log(this.detailStyle)
       if(row.name == '新增'){
         this.detailList.columnList = this.detailStyle
-        console.log(this.detailStyle)
+        this.detailForm = {}
+        this.detailData = []
         this.MainTable = true
       }else if(row.name == '录入'){
-        this.detailData.push({
-          fLineNumber:null,
-          fMaterial1:null,
-          fMaterial2:null,
-          fMaterial3:null,
-          fMaterial4:null,
-          fMaterial5:null,
-          fMaterial6:null,
-          fMaterial7:null,
-          fMaterial8:null,
-          fMaterial9:null,
-          fMaterial10:null,
+        this.$refs.detailForm.rules()
+      }else if(row.name == '返回列表'){
+        this.show = false
+        row.icon = 'el-icon-arrow-up'
+        this.MainTable = false
+      }else if(row.name == '展开'){
+        this.show = !this.show
+        if(this.show){
+          row.icon = 'el-icon-arrow-down'
+        }else{
+          row.icon = 'el-icon-arrow-up'
+        }
+      }else if(row.name == '保存'){
+        console.log(this.detailForm)
+        console.log(this.detailData)
+        let formData = new window.FormData();
+        formData.append('tWarehousebills', JSON.stringify(this.detailForm))
+        formData.append('tWarehousebillsfees', JSON.stringify(this.detailData))
+        formData.append('fBilltype', 'RK')
+        addSave(formData).then(res=>{
+          this.$message.error("操作成功")
         })
       }
     },
@@ -548,7 +862,39 @@ export default {
     //点击刷新会调用此方法
     getList(){
       console.log('到我了2')
-    }
+      listInStock(this.queryParms).then(res=>{
+        console.log(res)
+        this.tableData = res.rows
+        this.total = res.total
+      })
+    },
+    listTotal(param) {
+      // const { columns, data } = param
+      // const sums = []
+      // console.log(this.detailData)
+      // for(let item in this.detailData){
+        // columns.forEach((column, index) => {
+        //   console.log(index)
+          // if (index === 0) {
+          //   sums[index] = '合计'
+          // } else if (column.label == '单价' || column.label == '数量') {
+          //   const values = data.map((item) => Number(item[column.property]))
+          //   if (!values.every((value) => isNaN(value))) {
+          //     sums[index] = values.reduce((prev, curr) => {
+          //       const value = Number(curr)
+          //       if (!isNaN(value)) {
+          //         return prev + curr
+          //       } else {
+          //         return prev
+          //       }
+          //     }, 0)
+          //   }
+          // }
+      //   })
+      // }
+
+      return sums
+    },
   }
 }
 </script>

+ 628 - 0
src/views/warehouse/outStock/index.vue

@@ -0,0 +1,628 @@
+<template>
+  <div class="app-container">
+    <div v-if="MainTable == false">
+      <MainForm
+        ref="MainForm"
+        :searchdata="formOption"
+        :hidedata="hidedata"
+        :display="display"
+        :form="queryParms"
+        :show="show"
+        @handleClick="handleClick"
+      />
+      <listComponent
+        style="clear:both"
+        v-if="waitFor"
+        :tableData="tableData"
+        @selectionbox="selectionbox"
+        @see="viewMethod"
+        @modify="modification"
+        @deletion="deletion"
+        @buttonList="buttonList"
+        @showSearch="showSearch"
+        @getList="getList"
+        :customButton="customButton"
+        :arrow="arrow"
+        :seachButton="seachButton"
+        :listStyle="listStyle"
+        :queryList="queryList"/>
+    </div>
+    <div v-if="MainTable == true">
+      <MainForm
+        ref="MainForm"
+        :searchdata="detailOption"
+        :hidedata="hideDetail"
+        :display="display"
+        :form="queryParms"
+        :show="show = true"
+        @handleClick="handleClick"
+      />
+      <list-component
+        v-if="waitFor"
+        :tableData="detailData"
+        @selectionbox="selectionbox"
+        @see="viewMethod"
+        @modify="modification"
+        @deletion="deletion"
+        @buttonList="buttonList"
+        @showSearch="showSearch"
+        @getList="getList"
+        :customButton="detailButton"
+        :listStyle="detailStyle"
+        :queryList="detailList"/>
+    </div>
+  </div>
+</template>
+
+<script>
+import { select } from '@/api/system/set'
+import Cookies from 'js-cookie'
+import { getliable } from '@/api/project'
+export default {
+  name: 'outStock',
+  data(){
+    return{
+      MainTable:false,
+      show: false,
+      arrow:'el-icon-arrow-up',
+      queryList:{
+        tableName:'出库主表',
+        columnList:[]
+      },
+      detailList:{
+        tableName:'1出库详情',
+        columnList:[]
+      },
+      //判断自定义列是否有值再渲染组件
+      waitFor:false,
+      display:3,
+      queryParms:{},
+      //主页面默认显示4个表单数据
+      formOption:[
+        {
+          span:6,
+          label: 'fNumber',
+          name:"系统编号",
+          form:2,
+          width:200,
+          labelSize:'80',
+          rules:''
+        },
+        {
+          span:6,
+          label: 'fNumber',
+          name:"项目名称",
+          form:2,
+          width:200,
+          labelSize:'80',
+          rules:''
+        },
+        {
+          span:6,
+          label: 'fNumber',
+          name:"客户名称",
+          form:1,
+          width:200,
+          data:[],
+          labelSize:'80',
+          rules:''
+        },
+        {
+          span:6,
+          label: 'fNumber',
+          name:"金额",
+          form:5,
+          width:200,
+          labelSize:'80',
+          rules:''
+        },
+
+      ],
+      //隐藏表单数据
+      hidedata:[
+        {
+          span:6,
+          label: 'fNumber',
+          name:"申请日期",
+          form:3,
+          width:200,
+          labelSize:'80',
+          rules:''
+        },
+        {
+          span:6,
+          label: 'fNumber',
+          name:"申请人",
+          form:2,
+          width:200,
+          labelSize:'80',
+          rules:''
+        },
+        {
+          span:6,
+          label: 'fNumber',
+          name:"备注",
+          form:2,
+          width:200,
+          labelSize:'80',
+          rules:''
+        },
+      ],
+      //表名称
+      tableData:[],
+      //从表表名
+      detailData:[],
+      //传输表
+      //表数据
+      listStyle: [
+        {
+          surface: "1",
+          label: "fLineNumber",
+          name: "序号",
+          checked: 0,
+          width: 100,
+          onabort:''
+        },{
+          surface: "2",
+          label: "fMaterial1",
+          name: "申请编号",
+          checked: 0,
+          width: 100,
+        },{
+          surface: "3",
+          label: "fMaterial2",
+          name: "项目名称",
+          checked: 0,
+          width: 200,
+          operation:1
+        },{
+          surface: "4",
+          label: "fMaterial2",
+          name: "客户名称",
+          checked: 0,
+          width: 200,
+          operation:1
+        },{
+          surface: "5",
+          label: "fMaterial2",
+          name: "金额",
+          checked: 0,
+          width: 200,
+          operation:1
+        },{
+          surface: "6",
+          label: "fMaterial2",
+          name: "申请日期",
+          checked: 0,
+          width: 200,
+          operation:1
+        },{
+          surface: "7",
+          label: "fMaterial2",
+          name: "申请人",
+          checked: 0,
+          width: 200,
+          operation:1
+        },{
+          surface: "8",
+          label: "fMaterial2",
+          name: "状态",
+          checked: 0,
+          width: 200,
+          operation:1
+        },{
+          surface: "9",
+          label: "fMaterial2",
+          name: "审核日期",
+          checked: 0,
+          width: 200,
+          operation:1
+        },{
+          surface: "10",
+          label: "fMaterial2",
+          name: "备注",
+          checked: 0,
+          width: 200,
+          operation:1
+        },{
+          surface: "11",
+          label: "fMaterial2",
+          name: "操作",
+          checked: 0,
+          width: 200,
+          operation:1
+        }
+
+      ],
+      //从表数据
+      detailStyle: [
+        {
+          surface: "1",
+          label: "fLineNumber",
+          name: "序号",
+          checked: 0,
+          width: 100,
+          onabort:''
+        },{
+          surface: "2",
+          label: "fMaterial1",
+          name: "品名",
+          checked: 0,
+          width: 100,
+          changeable:1,
+          data:[]
+        },{
+          surface: "3",
+          label: "fMaterial2",
+          name: "单价",
+          checked: 0,
+          width: 200,
+          operation:2,
+          changeable:2,
+        },{
+          surface: "4",
+          label: "fMaterial3",
+          name: "数量",
+          checked: 0,
+          width: 200,
+          operation:2,
+          changeable:2,
+        },{
+          surface: "5",
+          label: "fMaterial4",
+          name: "计量单位",
+          checked: 0,
+          width: 200,
+          changeable:1,
+          operation:2
+        },{
+          surface: "6",
+          label: "fMaterial5",
+          name: "库区",
+          checked: 0,
+          width: 200,
+          operation:2,
+          changeable:1
+        },{
+          surface: "7",
+          label: "fMaterial6",
+          name: "金额",
+          checked: 0,
+          width: 200,
+          operation:1,
+          changeable: 2
+        },{
+          surface: "8",
+          label: "fMaterial7",
+          name: "付费方式",
+          checked: 0,
+          width: 200,
+          operation:1,
+          changeable: 1,
+          data:[]
+        },{
+          surface: "9",
+          label: "fMaterial9",
+          name: "备注",
+          checked: 0,
+          width: 200,
+          operation:1,
+          changeable: 2
+        },{
+          surface: "10",
+          label: "fMaterial8",
+          name: "审核日期",
+          checked: 0,
+          width: 200,
+          operation:1,
+          changeable: 3
+
+        },
+        {
+          surface: "11",
+          label: "fMaterial10",
+          name: "申请人",
+          checked: 0,
+          width: 200,
+          operation:2
+        },{
+          surface: "12",
+          label: "fMaterial10",
+          name: "操作",
+          checked: 0,
+          width: 200,
+          operation:2
+        }
+
+      ],
+      //详情主表
+      detailOption:[
+        {
+          span:6,
+          label: 'fNumber',
+          name:"系统编号",
+          form:2,
+          width:200,
+          labelSize:'80',
+          rules:''
+        },
+        {
+          span:6,
+          label: 'fNumber',
+          name:"供应商",
+          form:1,
+          width:200,
+          labelSize:'80',
+          rules:'',
+          data:[{
+            label:'盛源嘉',
+            value:1
+          }]
+        },
+        {
+          span:6,
+          label: 'fNumber',
+          name:"库管员",
+          form:2,
+          width:200,
+          labelSize:'80',
+          rules:''
+        },
+        {
+          span:6,
+          label: 'fNumber',
+          name:"仓库",
+          form:1,
+          width:200,
+          labelSize:'80',
+          rules:''
+        },
+      ],
+      //详情主表隐藏
+      hideDetail:[
+        {
+          span:6,
+          label: 'fNumber',
+          name:"出库日期",
+          form:3,
+          width:200,
+          labelSize:'80',
+          rules:''
+        },
+        {
+          span:6,
+          label: 'fNumber',
+          name:"付款单位",
+          form:1,
+          width:200,
+          labelSize:'80',
+          rules:''
+        },
+        {
+          span:6,
+          label: 'fNumber',
+          name:"备注",
+          form:4,
+          width:200,
+          labelSize:'80',
+          rules:''
+        },
+
+      ],
+      //按钮
+      customButton:[
+        {
+          type:'primary',
+          size:'mini',
+          icon:'el-icon-plus',
+          name:'新增',
+          disabled:false,
+        },{
+          type:'success',
+          size:'mini',
+          icon:'el-icon-edit',
+          name:'修改',
+          disabled:true
+        },{
+          type:'danger',
+          size:'mini',
+          icon:'el-icon-delete',
+          name:'删除',
+          disabled:true
+        },{
+          type:'info',
+          size:'mini',
+          icon:'el-icon-plus',
+          name:'复制新增',
+          disabled:false
+        },
+      ],
+      seachButton:[
+        {
+          type:'',
+          size:'mini',
+          icon:'el-icon-search',
+          name:'搜索',
+          disabled:false,
+        },{
+          type:'',
+          size:'mini',
+          icon:'el-icon-refresh',
+          name:'重置',
+          disabled:false,
+        },{
+          type:'',
+          size:'mini',
+          icon:'el-icon-arrow-up',
+          name:'展开',
+          disabled:false
+        }
+      ],
+      detailButton:[
+        {
+          type:'danger',
+          size:'mini',
+          icon:'el-icon-refresh-left',
+          name:'返回列表',
+          disabled:false,
+        },{
+          type:'primary',
+          size:'mini',
+          icon:'el-icon-edit',
+          name:'录入',
+          disabled:false,
+        },{
+          type:'warning',
+          size:'mini',
+          icon:'el-icon-check',
+          name:'修改',
+          disabled:false
+        }, {
+          type:'success',
+          size:'mini',
+          icon:'el-icon-check',
+          name:'保存',
+          disabled:false
+        },{
+          type:'cyan',
+          size:'mini',
+          icon:'',
+          name:'打印',
+          disabled:false,
+        },{
+          type:'info',
+          size:'mini',
+          icon:'',
+          name:'出库确认',
+          disabled:false
+        }
+      ],
+    }
+  },
+  created() {
+    this.getRow()
+    this.liableRemoteMethod()
+  },
+  methods:{
+    /** 获取责任人*/
+    liableRemoteMethod(name) {
+      let queryParams = { fName: name }
+      getliable(queryParams).then((response) => {
+        console.log(response)
+        for(let li in this.formOption){
+          if(this.formOption[li].name == '客户名称'){
+            console.log(this.formOption[li].name)
+            for(let item in response.rows){
+              this.formOption[li].data.push({
+                label:response.rows[item].userName,
+                value:response.rows[item].userId
+              })
+            }
+            console.log(this.formOption[li].data)
+          }
+        }
+      })
+    },
+    handleClick(){
+    },
+    handleQuery(){
+
+    },
+    resetQuery(){
+
+    },
+    //查询列数据
+    getRow() {
+      this.data = {
+        tableName: this.queryList.tableName,
+        userId: Cookies.get("userName"),
+      };
+      select(this.data).then((res) => {
+        console.log(res)
+        if (res.data.length != 0) {
+          this.queryList.columnList = res.data.filter((e) => e.checked == 0);
+          this.queryList.columnList = res.data;
+          this.queryList.columnList = this.queryList.columnList.reduce((res, item) => {
+            res.push({
+              surface: item.surface,
+              label: item.label,
+              name: item.name,
+              checked: item.checked,
+              width: item.width,
+              fixed: item.fixed,
+            });
+            return res;
+          }, []);
+          this.waitFor = true
+        }else {
+          this.waitFor = true
+          this.queryList.columnList = this.listStyle
+        }
+      });
+    },
+    //选择框
+    selectionbox(selection){
+      console.log(selection)
+    },
+    //查看
+    viewMethod(scope){
+      console.log(scope)
+    },
+    //修改
+    modification(scope){
+      console.log(scope)
+    },
+    //删除
+    deletion(scope){
+      console.log(scope)
+    },
+    //所以按钮
+    buttonList(row){
+      console.log(row)
+      console.log(this.detailStyle)
+      if(row.name == '新增'){
+        this.detailList.columnList = this.detailStyle
+        console.log(this.detailStyle)
+        this.MainTable = true
+      }else if(row.name == '录入'){
+        this.detailData.push({
+          fLineNumber:null,
+          fMaterial1:null,
+          fMaterial2:null,
+          fMaterial3:null,
+          fMaterial4:null,
+          fMaterial5:null,
+          fMaterial6:null,
+          fMaterial7:null,
+          fMaterial8:null,
+          fMaterial9:null,
+          fMaterial10:null,
+        })
+      }else if(row.name == '返回列表'){
+        this.show = false
+        row.icon = 'el-icon-arrow-up'
+        this.MainTable = false
+      }else if(row.name == '展开'){
+        this.show = !this.show
+        if(this.show){
+          row.icon = 'el-icon-arrow-down'
+        }else{
+          row.icon = 'el-icon-arrow-up'
+        }
+      }
+    },
+    // 显示搜索条件、点击后会调用此方法
+    showSearch(){
+      console.log('到我了')
+    },
+    //点击刷新会调用此方法
+    getList(){
+      console.log('到我了2')
+    }
+  }
+}
+</script>
+
+<style scoped>
+
+</style>