chenying 4 年之前
父節點
當前提交
892edf6c46

+ 24 - 0
src/api/warehouse.js

@@ -0,0 +1,24 @@
+import request from '@/utils/httpRequest'
+
+export function workflowUpdate (data) {
+  return request({
+    url: request.adornUrl('/workflow-service/workflow/update'),
+    method: 'POST',
+    data
+  })
+}
+
+export function workflowList (params) {
+  return request({
+    url: request.adornUrl('/workflow-service/workflow/list'),
+    method: 'get',
+    params
+  })
+}
+
+export function workflowInfot (modelId) {
+  return request({
+    url: request.adornUrl(`/workflow-service/workflow/info/${modelId}`),
+    method: 'get'
+  })
+}

+ 8 - 0
src/api/workflow.js

@@ -22,3 +22,11 @@ export function workflowInfot (modelId) {
     method: 'get'
   })
 }
+
+export function workflowDeploy (data) {
+  return request({
+    url: request.adornUrl(`/workflow-service/workflow/deploy`),
+    method: 'post',
+    data
+  })
+}

+ 183 - 0
src/views/modules/cus/customer-add-or-update.vue

@@ -0,0 +1,183 @@
+<template>
+  <el-dialog
+    :title="!id ? '新增' : '修改'"
+    :close-on-click-modal="false"
+    :visible.sync="visible">
+    <el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()" label-width="100px">
+      <h4>基础信息</h4>
+      <el-form-item label="客户名称" prop="customerName">
+        <el-input v-model="dataForm.customerName" placeholder="客户名称"></el-input>
+      </el-form-item>
+      <el-form-item label="客户级别" prop="level">
+        <el-select
+          v-model="dataForm.level"
+          remote
+          placeholder="请选择">
+          <el-option
+            v-for="item in options"
+            :key="item.value"
+            :label="item.label"
+            :value="item.value">
+          </el-option>
+        </el-select>
+      </el-form-item>
+      <el-form-item label="详细地址" prop="address">
+        <el-input v-model="dataForm.address"  placeholder="详细地址"></el-input>
+      </el-form-item>
+      <el-form-item label="电话" prop="tel">
+        <el-input v-model="dataForm.tel"  placeholder="电话"></el-input>
+      </el-form-item>
+      <el-form-item label="邮编">
+        <el-input v-model="dataForm.zipCode" placeholder="邮编"></el-input>
+      </el-form-item>
+      <el-form-item label="传真">
+        <el-input v-model="dataForm.fax" placeholder="传真"></el-input>
+      </el-form-item>
+      <el-form-item label="网址">
+        <el-input v-model="dataForm.url" placeholder="网址"></el-input>
+      </el-form-item>
+      <el-form-item label="公司简介">
+        <el-input v-model="dataForm.introduction" type="textarea" placeholder="公司简介"></el-input>
+      </el-form-item>
+      <h4>业务联系人</h4>
+      <el-form-item label="联系人" prop="contact">
+        <el-input v-model="dataForm.contact"  placeholder="联系人"></el-input>
+      </el-form-item>
+      <el-form-item label="手机号码" prop="contactTel">
+        <el-input v-model="dataForm.contactTel"  placeholder="手机号码"></el-input>
+      </el-form-item>
+      <el-form-item label="职位">
+        <el-input v-model="dataForm.contactPosition"  placeholder="职位"></el-input>
+      </el-form-item>
+      <el-form-item label="邮箱">
+        <el-input v-model="dataForm.contactEmail"  placeholder="邮箱"></el-input>
+      </el-form-item>
+      <el-form-item label="对接业务员" prop="bizManager">
+        <el-input v-model="dataForm.bizManager"  placeholder="对接业务员"></el-input>
+      </el-form-item>
+      <h4>财务信息</h4>
+      <el-form-item label="企业税号" prop="taxNumber">
+        <el-input v-model="dataForm.taxNumber"  placeholder="企业税号"></el-input>
+      </el-form-item>
+      <el-form-item label="发票抬头" prop="invoiceTitle">
+        <el-input v-model="dataForm.invoiceTitle"  placeholder="发票抬头"></el-input>
+      </el-form-item>
+      <el-form-item label="开户银行" prop="bank">
+        <el-input v-model="dataForm.bank"  placeholder="开户银行"></el-input>
+      </el-form-item>
+      <el-form-item label="银行账号" prop="account">
+        <el-input v-model="dataForm.account"  placeholder="银行账号"></el-input>
+      </el-form-item>
+      <el-form-item label="单位地址" prop="billingAddr">
+        <el-input v-model="dataForm.billingAddr"  placeholder="单位地址"></el-input>
+      </el-form-item>
+    </el-form>
+    <span slot="footer" class="dialog-footer">
+      <el-button @click="visible = false">取消</el-button>
+      <el-button type="primary" @click="dataFormSubmit()">确定</el-button>
+    </span>
+  </el-dialog>
+</template>
+
+<script>
+  export default {
+    data () {
+      return {
+        visible: false,
+        options: [
+          {
+            value: 'A',
+            label: 'A'
+          },
+          {
+            value: 'B',
+            label: 'B'
+          }
+        ],
+        id: 0,
+        islook: false,
+        dataForm: {
+          account: '',
+          address: '',
+          bank: '',
+          billingAddr: '',
+          bizManager: '',
+          contact: '',
+          contactEmail: '',
+          contactPosition: '',
+          contactTel: '',
+          customerName: '',
+          customerType: 0,
+          fax: '',
+          introduction: '',
+          invoiceTitle: '',
+          level: '',
+          taxNumber: '',
+          tel: '',
+          url: '',
+          zipCode: ''
+        },
+        dataRule: {
+          customerName: [{ required: true, message: '客户名称不能为空', trigger: 'blur' }],
+          level: [{ required: true, message: '客户级别不能为空', trigger: 'blur' }],
+          address: [{ required: true, message: '详细地址不能为空', trigger: 'blur' }],
+          tel: [{ required: true, message: '电话不能为空', trigger: 'blur' }],
+          contact: [{ required: true, message: '联系人不能为空', trigger: 'blur' }],
+          contactTel: [{ required: true, message: '手机号码不能为空', trigger: 'blur' }],
+          bizManager: [{ required: true, message: '对接业务员不能为空', trigger: 'blur' }],
+          taxNumber: [{ required: true, message: '企业税号不能为空', trigger: 'blur' }],
+          invoiceTitle: [{ required: true, message: '发票抬头不能为空', trigger: 'blur' }],
+          bank: [{ required: true, message: '开户银行不能为空', trigger: 'blur' }],
+          account: [{ required: true, message: '银行账号不能为空', trigger: 'blur' }],
+          billingAddr: [{ required: true, message: '单位地址不能为空', trigger: 'blur' }]
+        }
+      }
+    },
+    methods: {
+      init (id) {
+        this.id = id || 0
+        this.visible = true
+        if (this.id) {
+          this.$http({
+            url: this.$http.adornUrl(`/biz-service/cusCustomer/info/${this.id}`),
+            method: 'get',
+            params: this.$http.adornParams()
+          }).then(({data}) => {
+            if (data && data.code === '200') {
+              this.dataForm = data.data
+            }
+          })
+        }
+      },
+      // 表单提交
+      dataFormSubmit () {
+        this.$refs['dataForm'].validate((valid) => {
+          if (valid) {
+            this.$http({
+              url: this.$http.adornUrl(`/user-service/user/${!this.id ? 'save' : 'update'}`),
+              method: 'post',
+              data: this.$http.adornData(this.dataForm)
+            }).then(({data}) => {
+              if (data && data.code === '200') {
+                this.$message({
+                  message: '操作成功',
+                  type: 'success',
+                  duration: 1500,
+                  onClose: () => {
+                    this.visible = false
+                    this.$emit('refreshDataList')
+                  }
+                })
+              } else {
+                this.$message.error(data.msg)
+              }
+            })
+          }
+        })
+      },
+      validateField (type) {
+        this.$refs.dataForm.validateField(type)
+      }
+    }
+  }
+</script>

+ 124 - 17
src/views/modules/cus/customer.vue

@@ -6,9 +6,8 @@
       </el-form-item>
       <el-form-item label="客户级别">
         <el-select
-          v-model="value"
+          v-model="dataForm.level"
           remote
-          :remote-method="selectCusLevel"
           placeholder="请选择">
           <el-option
             v-for="item in options"
@@ -17,36 +16,65 @@
             :value="item.value">
           </el-option>
         </el-select>
-<!--        <el-input v-model="dataForm.level" placeholder="客户级别" clearable/>-->
       </el-form-item>
       <el-form-item>
         <el-button @click="getDataList()">查询</el-button>
-        <el-button type="primary" @click="test()">新增客户</el-button>
+        <el-button type="primary" @click="addOrUpdateHandle()">新增客户</el-button>
       </el-form-item>
     </el-form>
     <el-table
       :data="dataList"
       border
       v-loading="dataListLoading"
-      @selection-change="selectionChangeHandle"
       style="width: 100%;">
-      <el-table-column
-        type="selection"
-        header-align="center"
-        align="center"
-        width="50">
-      </el-table-column>
       <el-table-column
         label="序号"
         type="index"
         width="50"
         align="center">
       </el-table-column>
+      <el-table-column
+        prop="customerName"
+        header-align="center"
+        align="center"
+        label="客户名称">
+      </el-table-column>
+      <el-table-column
+        prop="level"
+        header-align="center"
+        align="center"
+        label="级别">
+      </el-table-column>
+      <el-table-column
+        prop="contact"
+        header-align="center"
+        align="center"
+        label="联系人">
+      </el-table-column>
+      <el-table-column
+        prop="contactTel"
+        header-align="center"
+        align="center"
+        label="电话">
+      </el-table-column>
+      <el-table-column
+        prop="address"
+        header-align="center"
+        align="center"
+        width="200"
+        label="地址">
+      </el-table-column>
+      <el-table-column
+        prop="bizManager"
+        header-align="center"
+        align="center"
+        label="对接业务员">
+      </el-table-column>
       <el-table-column
         prop="-"
         header-align="center"
         align="center"
-        label="编码">
+        label="备注">
       </el-table-column>
       <el-table-column
         fixed="right"
@@ -55,8 +83,8 @@
         width="150"
         label="操作">
         <template slot-scope="scope">
-          <el-button v-if="isAuth('wh:stock-mg-ctl:info')" type="text" size="small" @click="details(scope.row.customerId)">查看</el-button>
-          <el-button v-if="isAuth('wh:stock-mg-ctl:update')" type="text" size="small" @click="addOrUpdateHandle(scope.row.customerId)">编辑</el-button>
+          <el-button type="text" size="small" @click="details(scope.row.customerId)">查看</el-button>
+          <el-button type="text" size="small" @click="addOrUpdateHandle(scope.row.customerId)">编辑</el-button>
         </template>
       </el-table-column>
     </el-table>
@@ -69,14 +97,93 @@
       :total="totalPage"
       layout="total, sizes, prev, pager, next, jumper">
     </el-pagination>
-    <stock-details v-if="detailVisible" ref="details"/>
-    <stock-add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"/>
+    <!-- 弹窗, 新增 / 修改 -->
+    <add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
   </div>
 </template>
 
 <script>
+  import AddOrUpdate from './customer-add-or-update'
   export default {
-    name: 'customer'
+    name: 'customer',
+    components: {
+      AddOrUpdate
+    },
+    data () {
+      return {
+        addOrUpdateVisible: false,
+        dataForm: {
+          customerName: '',
+          level: ''
+        },
+        options: [
+          {
+            value: 'A',
+            label: 'A'
+          },
+          {
+            value: 'B',
+            label: 'B'
+          }
+        ],
+        dataList: [],
+        pageIndex: 1,
+        pageSize: 10,
+        totalPage: 0,
+        dataListLoading: false,
+        dataListSelections: []
+      }
+    },
+    created () {
+      this.getDataList()
+    },
+    methods: {
+      // 获取数据列表
+      getDataList () {
+        this.dataListLoading = true
+        this.$http({
+          url: this.$http.adornUrl('/biz-service/cusCustomer/list'),
+          method: 'get',
+          params: this.$http.adornParams({
+            'current': this.pageIndex,
+            'size': this.pageSize,
+            'customerName': this.dataForm.customerName,
+            'level': this.dataForm.level
+          })
+        }).then(({data}) => {
+          if (data && data.code === '200') {
+            this.dataList = data.data.records
+            this.totalPage = Number(data.data.total)
+          } else {
+            this.dataList = []
+            this.totalPage = 0
+          }
+          this.dataListLoading = false
+        })
+      },
+      // 每页数
+      sizeChangeHandle (val) {
+        this.pageSize = val
+        this.pageIndex = 1
+        this.getDataList()
+      },
+      // 当前页
+      currentChangeHandle (val) {
+        this.pageIndex = val
+        this.getDataList()
+      },
+      // 多选
+      selectionChangeHandle (val) {
+        this.dataListSelections = val
+      },
+      // 新增 / 修改
+      addOrUpdateHandle (id) {
+        this.addOrUpdateVisible = true
+        this.$nextTick(() => {
+          this.$refs.addOrUpdate.init(id)
+        })
+      }
+    }
   }
 </script>
 

+ 23 - 1
src/views/modules/process/process.vue

@@ -44,6 +44,7 @@
                 </div>
           </div>
           <div class='confirmBox'>
+              <el-button :disabled="list.length == 0" type='success' size='medium' style='padding:8px 18px; margin-left:20px; font-size:14px;' @click="deploy">部署</el-button>
               <el-button :disabled="list.length == 0" type='primary' size='medium' style='padding:8px 18px; margin-left:20px; font-size:14px;' @click="replace">重置</el-button>
               <el-button :disabled="list.length == 0" type='success' size='medium' style='padding:8px 18px; margin-left:20px; font-size:14px;' @click="confirm">提交</el-button>
           </div>
@@ -61,7 +62,7 @@
 <script>
   // import AddOrUpdate from './menu-add-or-update'
   import draggable from 'vuedraggable'
-  import { workflowUpdate, workflowList, workflowInfot } from '@/api/workflow'
+  import { workflowUpdate, workflowList, workflowInfot, workflowDeploy } from '@/api/workflow'
   import UserComponents from '../common/user-components'
   export default {
     data () {
@@ -304,6 +305,27 @@
         this.stepForm = { new_or_edit: 'new', step_name: '', step_type: '', step_func: '' }
         this.templateAddDisable = true
         this.showEndSteps = true
+      },
+      deploy () {
+        this.$confirm(`确定对[流程“${this.item.name}”]进行[部署]操作?`, '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(() => {
+          workflowDeploy({modelId: this.item.modelId}).then(({ data }) => {
+            if (data.code === '200') {
+              this.$message({
+                message: '操作成功',
+                type: 'success',
+                duration: 1500,
+                onClose: () => {
+                }
+              })
+            } else {
+              this.$message.error(data.msg)
+            }
+          })
+        }).catch(() => {})
       }
     }
   }

+ 223 - 0
src/views/modules/warehouse/in-handle.vue

@@ -0,0 +1,223 @@
+<template>
+  <div class="stock-order">
+    <el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
+      <el-form-item label="申请人姓名">
+        <user-component v-model="dataForm.userId"/>
+      </el-form-item>
+      <el-form-item label="入库日期">
+        <el-date-picker
+          v-model="dataForm.date"
+          value-format="yyyy-MM-dd"
+          type="daterange"
+          range-separator="至"
+          start-placeholder="开始日期"
+          end-placeholder="结束日期">
+        </el-date-picker>
+      </el-form-item>
+      <el-form-item>
+        <el-button @click="getDataList()">查询</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="50"
+        align="center">
+      </el-table-column>
+      <el-table-column
+        prop="-"
+        header-align="center"
+        align="center"
+        label="编码">
+      </el-table-column>
+      <el-table-column
+        prop="-"
+        header-align="center"
+        align="center"
+        label="名称">
+      </el-table-column>
+      <el-table-column
+        prop="-"
+        header-align="center"
+        align="center"
+        label="规格">
+      </el-table-column>
+      <el-table-column
+        prop="recordType"
+        header-align="center"
+        align="center"
+        label="数量">
+      </el-table-column>
+      <el-table-column
+        prop="state"
+        header-align="center"
+        align="center"
+        label="单位">
+      </el-table-column>
+      <el-table-column
+        prop="state"
+        header-align="center"
+        align="center"
+        label="单价">
+      </el-table-column>
+      <el-table-column
+        prop="approver"
+        header-align="center"
+        align="center"
+        label="金额">
+      </el-table-column>
+      <el-table-column
+        prop="-"
+        header-align="center"
+        align="center"
+        label="批次号">
+      </el-table-column>
+      <el-table-column
+        prop="-"
+        header-align="center"
+        align="center"
+        label="入库时间">
+      </el-table-column>
+      <el-table-column
+        prop="-"
+        header-align="center"
+        align="center"
+        label="申请人">
+      </el-table-column>
+      <el-table-column
+        prop="-"
+        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="details(scope.row.id)">查看</el-button>
+          <el-button type="text" size="small" @click="exportItem(scope.row.id)">处理</el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+    <el-pagination
+      @size-change="sizeChangeHandle"
+      @current-change="currentChangeHandle"
+      :current-page="pageIndex"
+      :page-sizes="[10, 20, 50, 100]"
+      :page-size="pageSize"
+      :total="totalPage"
+      layout="total, sizes, prev, pager, next, jumper">
+    </el-pagination>
+    <!--    入库-->
+    <stock-order-inbound v-if="inboundVisible" ref="inbound" @refreshDataList="getDataList"></stock-order-inbound>
+    <stock-order-outbound v-if="outboundVisible" ref="outbound" @refreshDataList="getDataList"></stock-order-outbound>
+  </div>
+</template>
+
+<script>
+  import UserComponent from '../common/user-component'
+  import StockOrderInbound from './stock-order-inbound'
+  import StockOrderOutbound from './stock-order-outbound'
+  export default {
+    name: 'stock-order',
+    components: {StockOrderInbound, UserComponent, StockOrderOutbound},
+    data () {
+      return {
+        inboundVisible: false,
+        outboundVisible: false,
+        dataForm: {
+          userId: '',
+          date: '',
+          recordType: null
+        },
+        recordTypeOptions: [
+          {
+            value: null,
+            label: '请选择'
+          },
+          {
+            value: '0',
+            label: '入库'
+          },
+          {
+            value: '1',
+            label: '出库'
+          }
+        ],
+        dataList: [],
+        pageIndex: 1,
+        pageSize: 10,
+        totalPage: 0,
+        dataListLoading: false,
+        dataListSelections: []
+      }
+    },
+    methods: {
+      // 获取数据列表
+      getDataList () {
+        this.dataListLoading = true
+        this.$http({
+          url: this.$http.adornUrl('/biz-service/inbound-record-ctl/list'),
+          method: 'get',
+          params: this.$http.adornParams({
+            'current': this.pageIndex,
+            'size': this.pageSize,
+            'userId': this.dataForm.userId,
+            'beginTime': this.dataForm.date[0],
+            'endTime': this.dataForm.date[1],
+            'recordType': this.dataForm.recordType
+          })
+        }).then(({data}) => {
+          if (data && data.code === '200') {
+            this.dataList = data.data.records
+            this.totalPage = Number(data.data.total)
+          } else {
+            this.dataList = []
+            this.totalPage = 0
+          }
+          this.dataListLoading = false
+        })
+      },
+      // 每页数
+      sizeChangeHandle (val) {
+        this.pageSize = val
+        this.pageIndex = 1
+        this.getDataList()
+      },
+      // 当前页
+      currentChangeHandle (val) {
+        this.pageIndex = val
+        this.getDataList()
+      },
+      // 多选
+      selectionChangeHandle (val) {
+        this.dataListSelections = val
+      },
+      // 入库申请
+      inBound () {
+        this.inboundVisible = true
+        this.$nextTick(() => {
+          this.$refs.inbound.init()
+        })
+      },
+      outBound () {
+        this.outboundVisible = true
+        this.$nextTick(() => {
+          this.$refs.outbound.init()
+        })
+      }
+    }
+  }
+</script>
+
+<style scoped>
+
+</style>

+ 189 - 2
src/views/modules/warehouse/in-record.vue

@@ -1,10 +1,197 @@
 <template>
-    <div>入库记录</div>
+  <div class="stock-order">
+    <el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
+      <el-form-item label="编号">
+        <el-input v-model="dataForm.number" placeholder="编号" clearable></el-input>
+      </el-form-item>
+      <el-form-item label="名称">
+        <el-input v-model="dataForm.name" placeholder="名称" clearable></el-input>
+      </el-form-item>
+      <el-form-item label="入库日期">
+        <el-date-picker
+          v-model="dataForm.date"
+          value-format="yyyy-MM-dd"
+          type="daterange"
+          range-separator="至"
+          start-placeholder="开始日期"
+          end-placeholder="结束日期">
+        </el-date-picker>
+      </el-form-item>
+      <el-form-item>
+        <el-button @click="getDataList()">查询</el-button>
+        <el-button @click="inBound()"  type="primary">导出</el-button>
+      </el-form-item>
+    </el-form>
+    <el-table
+      :data="dataList"
+      border
+      v-loading="dataListLoading"
+      @selection-change="selectionChangeHandle"
+      style="width: 100%;">
+      <el-table-column
+        label="序号"
+        type="index"
+        width="50"
+        align="center">
+      </el-table-column>
+      <el-table-column
+        prop="-"
+        header-align="center"
+        align="center"
+        label="编码">
+      </el-table-column>
+      <el-table-column
+        prop="-"
+        header-align="center"
+        align="center"
+        label="名称">
+      </el-table-column>
+      <el-table-column
+        prop="-"
+        header-align="center"
+        align="center"
+        label="类型">
+      </el-table-column>
+      <el-table-column
+        prop="recordType"
+        header-align="center"
+        align="center"
+        label="数量">
+      </el-table-column>
+      <el-table-column
+        prop="state"
+        header-align="center"
+        align="center"
+        label="单位">
+      </el-table-column>
+      <el-table-column
+        prop="state"
+        header-align="center"
+        align="center"
+        label="单价">
+      </el-table-column>
+      <el-table-column
+        prop="approver"
+        header-align="center"
+        align="center"
+        label="金额">
+      </el-table-column>
+      <el-table-column
+        prop="-"
+        header-align="center"
+        align="center"
+        label="批次号">
+      </el-table-column>
+      <el-table-column
+        prop="-"
+        header-align="center"
+        align="center"
+        label="来源">
+      </el-table-column>
+      <el-table-column
+        prop="-"
+        header-align="center"
+        align="center"
+        label="入库时间">
+      </el-table-column>
+      <el-table-column
+        prop="-"
+        header-align="center"
+        align="center"
+        label="申请人">
+      </el-table-column>
+      <el-table-column
+        prop="-"
+        header-align="center"
+        align="center"
+        label="操作人">
+      </el-table-column>
+      <el-table-column
+        prop="-"
+        header-align="center"
+        align="center"
+        label="备注">
+      </el-table-column>
+    </el-table>
+    <el-pagination
+      @size-change="sizeChangeHandle"
+      @current-change="currentChangeHandle"
+      :current-page="pageIndex"
+      :page-sizes="[10, 20, 50, 100]"
+      :page-size="pageSize"
+      :total="totalPage"
+      layout="total, sizes, prev, pager, next, jumper">
+    </el-pagination>
+  </div>
 </template>
 
 <script>
   export default {
-    name: 'in-record'
+    name: 'stock-order',
+    data () {
+      return {
+        inboundVisible: false,
+        dataForm: {
+          number: '',
+          name: '',
+          date: ''
+        },
+        dataList: [],
+        pageIndex: 1,
+        pageSize: 10,
+        totalPage: 0,
+        dataListLoading: false,
+        dataListSelections: []
+      }
+    },
+    methods: {
+      // 获取数据列表
+      getDataList () {
+        this.dataListLoading = true
+        this.$http({
+          url: this.$http.adornUrl('/biz-service/inbound-record-ctl/list'),
+          method: 'get',
+          params: this.$http.adornParams({
+            'current': this.pageIndex,
+            'size': this.pageSize,
+            'beginTime': this.dataForm.date[0],
+            'endTime': this.dataForm.date[1],
+            'recordType': 0
+          })
+        }).then(({data}) => {
+          if (data && data.code === '200') {
+            this.dataList = data.data.records
+            this.totalPage = Number(data.data.total)
+          } else {
+            this.dataList = []
+            this.totalPage = 0
+          }
+          this.dataListLoading = false
+        })
+      },
+      // 每页数
+      sizeChangeHandle (val) {
+        this.pageSize = val
+        this.pageIndex = 1
+        this.getDataList()
+      },
+      // 当前页
+      currentChangeHandle (val) {
+        this.pageIndex = val
+        this.getDataList()
+      },
+      // 多选
+      selectionChangeHandle (val) {
+        this.dataListSelections = val
+      },
+      // 入库申请
+      inBound () {
+        this.inboundVisible = true
+        this.$nextTick(() => {
+          this.$refs.inbound.init()
+        })
+      }
+    }
   }
 </script>
 

+ 200 - 0
src/views/modules/warehouse/inventory-add.vue

@@ -0,0 +1,200 @@
+<template>
+  <el-dialog
+    title="查看模板出库"
+    width="70%"
+    :close-on-click-modal="false"
+    :visible.sync="visible">
+    <el-form :model="dataForm" :rules="dataRule" ref="dataForm" label-width="auto">
+      <el-row class="my-row">
+        <el-col :span="12">
+          <el-form-item label="盘点员">
+            <el-input v-model="dataForm.code"  placeholder="盘点员"></el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :span="12" style="padding-left: 20px">
+          <el-form-item label="复核员">
+            <el-input v-model="dataForm.code"  placeholder="复核员"></el-input>
+          </el-form-item>
+        </el-col>
+      </el-row>
+      <el-row class="my-row">
+        <el-form-item label="备注说明">
+            <el-input v-model="dataForm.code"  placeholder="备注说明"></el-input>
+          </el-form-item>
+      </el-row>
+      <el-row>
+        <el-table
+          :data="dataList"
+          border
+          style="width: 100%;">
+          <el-table-column
+            label="序号"
+            type="index"
+            width="50"
+            align="center">
+          </el-table-column>
+          <el-table-column
+            prop="-"
+            header-align="center"
+            align="center"
+            label="仓库名称">
+          </el-table-column>
+          <el-table-column
+            prop="-"
+            header-align="center"
+            align="center"
+            label="物品名称">
+          </el-table-column>
+          <el-table-column
+            prop="recordType"
+            header-align="center"
+            align="center"
+            label="规格">
+          </el-table-column>
+          <el-table-column
+            prop="state"
+            header-align="center"
+            align="center"
+            label="数量">
+          </el-table-column>
+          <el-table-column
+            prop="approver"
+            header-align="center"
+            align="center"
+            label="单位">
+          </el-table-column>
+          <el-table-column
+            prop="-"
+            header-align="center"
+            align="center"
+            label="仓库库存数量">
+          </el-table-column>
+          <el-table-column
+            prop="-"
+            header-align="center"
+            align="center"
+            label="请选择数量">
+          </el-table-column>
+          <el-table-column
+            prop="-"
+            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 v-if="isAuth('wh:inbound-record-ctl:info')" type="text" size="small" @click="details(scope.row.id)">完成</el-button>
+            <el-button type="text" size="small" @click="exportItem(scope.row.id)">开始盘点</el-button>
+          </template>
+          </el-table-column>
+        </el-table>
+      </el-row>
+    </el-form>
+    <span slot="footer" class="dialog-footer">
+      <el-button @click="visible = false">取消</el-button>
+      <el-button type="primary" @click="dataFormSubmit()">确定</el-button>
+    </span>
+  </el-dialog>
+</template>
+
+<script>
+  import UserComponent from '../common/user-component'
+  import DictSelect from '../sys/dict-select'
+  import {getUUID} from '../../../utils'
+  export default {
+    name: 'stock-order-inbound',
+    components: {DictSelect, UserComponent},
+    data () {
+      return {
+        visible: false,
+        dictType: 'material_type',
+        dataList: [],
+        dataForm: {
+          id: '',
+          amount: 0,
+          applicant: ''
+        },
+        dataRule: {
+        }
+      }
+    },
+    methods: {
+      init () {
+        this.visible = true
+        this.dataForm.code = getUUID()
+      },
+      // 表单提交
+      dataFormSubmit () {
+        this.$refs['dataForm'].validate((valid) => {
+          if (valid) {
+            this.$http({
+              url: this.$http.adornUrl(`/biz-service/in-out-bound-ctl/inbound`),
+              method: 'post',
+              data: this.$http.adornData({
+                'amount': this.dataForm.amount,
+                'applicant': this.dataForm.applicant,
+                'approver': this.dataForm.approver,
+                'batchNumber': this.dataForm.batchNumber,
+                'cnt': this.dataForm.cnt,
+                'materialId': this.dataForm.materialId,
+                'materialName': this.dataForm.materialName,
+                'notes': this.dataForm.notes,
+                'price': this.dataForm.price,
+                'orgId': this.dataForm.orgId,
+                'recordType': this.dataForm.recordType,
+                'source': this.dataForm.source,
+                'state': this.dataForm.state,
+                'templateItemPlanId': this.dataForm.templateItemPlanId,
+                'usage': this.dataForm.usage,
+                'userId': this.dataForm.userId,
+                'creatorId': this.$store.state.user.id
+              })
+            }).then(({data}) => {
+              if (data && data.code === '200') {
+                this.$message({
+                  message: '操作成功',
+                  type: 'success',
+                  duration: 1500,
+                  onClose: () => {
+                    this.visible = false
+                    this.$emit('refreshDataList')
+                  }
+                })
+              } else {
+                this.$message.error(data.msg)
+              }
+            })
+          }
+        })
+      },
+      validateField (type) {
+        this.$refs.dataForm.validateField(type)
+      },
+      userChanged (userId) {
+        this.$http({
+          url: this.$http.adornUrl('/user-service/user/info/' + userId),
+          method: 'get'
+        }).then(({data}) => {
+          if (data && data.code === '200') {
+            this.dataForm.orgId = data.data.orgId
+            this.dataForm.orgName = data.data.orgName
+          } else {
+            this.$message.error(data.msg)
+          }
+        })
+      }
+    }
+  }
+</script>
+
+<style scoped>
+.my-line{
+  border-bottom: 1px solid #c0c4cc;
+  margin-bottom: 10px;
+}
+</style>

+ 176 - 2
src/views/modules/warehouse/inventory.vue

@@ -1,10 +1,184 @@
 <template>
-    <div>盘点管理</div>
+  <div class="stock-order">
+    <el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
+      <el-form-item label="盘点日期">
+        <el-date-picker
+          v-model="dataForm.date"
+          value-format="yyyy-MM-dd"
+          type="daterange"
+          range-separator="至"
+          start-placeholder="开始日期"
+          end-placeholder="结束日期">
+        </el-date-picker>
+      </el-form-item>
+      <el-form-item>
+        <el-button @click="getDataList()">查询</el-button>
+        <el-button @click="inBound()"  type="primary">开始盘点</el-button>
+      </el-form-item>
+    </el-form>
+    <el-table
+      :data="dataList"
+      border
+      v-loading="dataListLoading"
+      @selection-change="selectionChangeHandle"
+      style="width: 100%;">
+      <el-table-column
+        label="序号"
+        type="index"
+        width="50"
+        align="center">
+      </el-table-column>
+      <el-table-column
+        prop="-"
+        header-align="center"
+        align="center"
+        label="编码">
+      </el-table-column>
+      <el-table-column
+        prop="recordType"
+        header-align="center"
+        align="center"
+        label="开始日期">
+      </el-table-column>
+      <el-table-column
+        prop="state"
+        header-align="center"
+        align="center"
+        label="结束日期">
+      </el-table-column>
+      <el-table-column
+        prop="approver"
+        header-align="center"
+        align="center"
+        label="状态">
+      </el-table-column>
+      <el-table-column
+        prop="-"
+        header-align="center"
+        align="center"
+        label="盘点员">
+      </el-table-column>
+      <el-table-column
+        prop="-"
+        header-align="center"
+        align="center"
+        label="复核员">
+      </el-table-column>
+      <el-table-column
+        prop="-"
+        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 v-if="isAuth('wh:inbound-record-ctl:info')" type="text" size="small" @click="details(scope.row.id)">查看</el-button>
+          <el-button type="text" size="small" @click="exportItem(scope.row.id)">继续</el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+    <el-pagination
+      @size-change="sizeChangeHandle"
+      @current-change="currentChangeHandle"
+      :current-page="pageIndex"
+      :page-sizes="[10, 20, 50, 100]"
+      :page-size="pageSize"
+      :total="totalPage"
+      layout="total, sizes, prev, pager, next, jumper">
+    </el-pagination>
+    <!--    入库-->
+    <inventory-add v-if="inboundVisible" ref="inbound" @refreshDataList="getDataList"></inventory-add>
+  </div>
 </template>
 
 <script>
+  import inventoryAdd from './inventory-add'
   export default {
-    name: 'inventory'
+    name: 'stock-order',
+    components: {inventoryAdd},
+    data () {
+      return {
+        inboundVisible: false,
+        dataForm: {
+          name: '',
+          date: ''
+        },
+        recordTypeOptions: [
+          {
+            value: null,
+            label: '请选择'
+          },
+          {
+            value: '0',
+            label: '入库'
+          },
+          {
+            value: '1',
+            label: '出库'
+          }
+        ],
+        dataList: [],
+        pageIndex: 1,
+        pageSize: 10,
+        totalPage: 0,
+        dataListLoading: false,
+        dataListSelections: []
+      }
+    },
+    methods: {
+      // 获取数据列表
+      getDataList () {
+        this.dataListLoading = true
+        this.$http({
+          url: this.$http.adornUrl('/biz-service/inbound-record-ctl/list'),
+          method: 'get',
+          params: this.$http.adornParams({
+            'current': this.pageIndex,
+            'size': this.pageSize,
+            'userId': this.dataForm.userId,
+            'beginTime': this.dataForm.date[0],
+            'endTime': this.dataForm.date[1],
+            'recordType': this.dataForm.recordType
+          })
+        }).then(({data}) => {
+          if (data && data.code === '200') {
+            this.dataList = data.data.records
+            this.totalPage = Number(data.data.total)
+          } else {
+            this.dataList = []
+            this.totalPage = 0
+          }
+          this.dataListLoading = false
+        })
+      },
+      // 每页数
+      sizeChangeHandle (val) {
+        this.pageSize = val
+        this.pageIndex = 1
+        this.getDataList()
+      },
+      // 当前页
+      currentChangeHandle (val) {
+        this.pageIndex = val
+        this.getDataList()
+      },
+      // 多选
+      selectionChangeHandle (val) {
+        this.dataListSelections = val
+      },
+      // 入库申请
+      inBound () {
+        this.inboundVisible = true
+        this.$nextTick(() => {
+          this.$refs.inbound.init()
+        })
+      }
+    }
   }
 </script>
 

+ 250 - 0
src/views/modules/warehouse/out-handle.vue

@@ -0,0 +1,250 @@
+<template>
+  <div class="stock-order">
+    <el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
+      <el-form-item label="申请人姓名">
+        <user-component v-model="dataForm.userId"/>
+      </el-form-item>
+      <el-form-item label="出库日期">
+        <el-date-picker
+          v-model="dataForm.date"
+          value-format="yyyy-MM-dd"
+          type="daterange"
+          range-separator="至"
+          start-placeholder="开始日期"
+          end-placeholder="结束日期">
+        </el-date-picker>
+      </el-form-item>
+      <el-form-item label="出库方式">
+        <el-radio-group v-model="radio1" size="medium">
+          <el-radio-button label="1">普通出库</el-radio-button>
+          <el-radio-button label="2">模板出库</el-radio-button>
+        </el-radio-group>
+      </el-form-item>
+      <el-form-item>
+        <el-button @click="getDataList()">查询</el-button>
+      </el-form-item>
+    </el-form>
+    <template v-if="radio1 == '1'">
+      <el-table
+        :data="dataList"
+        border
+        v-loading="dataListLoading"
+        style="width: 100%;">
+        <el-table-column
+          label="序号"
+          type="index"
+          width="50"
+          align="center">
+        </el-table-column>
+        <el-table-column
+          prop="-"
+          header-align="center"
+          align="center"
+          label="编码">
+        </el-table-column>
+        <el-table-column
+          prop="recordType"
+          header-align="center"
+          align="center"
+          label="申请人">
+        </el-table-column>
+        <el-table-column
+          prop="state"
+          header-align="center"
+          align="center"
+          label="出库申请时间">
+        </el-table-column>
+        <el-table-column
+          prop="approver"
+          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="details(scope.row.id)">查看</el-button>
+            <el-button type="text" size="small" @click="exportItem(scope.row.id)">处理</el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+    </template>
+    <template v-if="radio1 == '2'">
+      <el-table
+        :data="dataList"
+        border
+        v-loading="dataListLoading"
+        style="width: 100%;">
+        <el-table-column
+          label="序号"
+          type="index"
+          width="50"
+          align="center">
+        </el-table-column>
+        <el-table-column
+          prop="-"
+          header-align="center"
+          align="center"
+          label="编码">
+        </el-table-column>
+        <el-table-column
+          prop="-"
+          header-align="center"
+          align="center"
+          label="模板名称">
+        </el-table-column>
+        <el-table-column
+          prop="recordType"
+          header-align="center"
+          align="center"
+          label="申请人">
+        </el-table-column>
+        <el-table-column
+          prop="state"
+          header-align="center"
+          align="center"
+          label="出库申请时间">
+        </el-table-column>
+        <el-table-column
+          prop="approver"
+          header-align="center"
+          align="center"
+          label="备注">
+        </el-table-column>
+        <el-table-column
+          prop="approver"
+          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="details(scope.row.id)">查看</el-button>
+            <el-button type="text" size="small" @click="exportItem(scope.row.id)">处理</el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+    </template>
+    <el-pagination
+      @size-change="sizeChangeHandle"
+      @current-change="currentChangeHandle"
+      :current-page="pageIndex"
+      :page-sizes="[10, 20, 50, 100]"
+      :page-size="pageSize"
+      :total="totalPage"
+      layout="total, sizes, prev, pager, next, jumper">
+    </el-pagination>
+    <stock-order-inbound v-if="inboundVisible" ref="inbound" @refreshDataList="getDataList"></stock-order-inbound>
+    <stock-order-outbound v-if="outboundVisible" ref="outbound" @refreshDataList="getDataList"></stock-order-outbound>
+  </div>
+</template>
+
+<script>
+  import UserComponent from '../common/user-component'
+  import StockOrderInbound from './stock-order-inbound'
+  import StockOrderOutbound from './stock-order-outbound'
+  export default {
+    name: 'stock-order',
+    components: {StockOrderInbound, UserComponent, StockOrderOutbound},
+    data () {
+      return {
+        inboundVisible: false,
+        outboundVisible: false,
+        radio1: '1',
+        dataForm: {
+          userId: '',
+          date: '',
+          recordType: null
+        },
+        recordTypeOptions: [
+          {
+            value: null,
+            label: '请选择'
+          },
+          {
+            value: '0',
+            label: '入库'
+          },
+          {
+            value: '1',
+            label: '出库'
+          }
+        ],
+        dataList: [],
+        pageIndex: 1,
+        pageSize: 10,
+        totalPage: 0,
+        dataListLoading: false,
+        dataListSelections: []
+      }
+    },
+    methods: {
+      // 获取数据列表
+      getDataList () {
+        this.dataListLoading = true
+        this.$http({
+          url: this.$http.adornUrl('/biz-service/inbound-record-ctl/list'),
+          method: 'get',
+          params: this.$http.adornParams({
+            'current': this.pageIndex,
+            'size': this.pageSize,
+            'userId': this.dataForm.userId,
+            'beginTime': this.dataForm.date[0],
+            'endTime': this.dataForm.date[1],
+            'recordType': this.dataForm.recordType
+          })
+        }).then(({data}) => {
+          if (data && data.code === '200') {
+            this.dataList = data.data.records
+            this.totalPage = Number(data.data.total)
+          } else {
+            this.dataList = []
+            this.totalPage = 0
+          }
+          this.dataListLoading = false
+        })
+      },
+      // 每页数
+      sizeChangeHandle (val) {
+        this.pageSize = val
+        this.pageIndex = 1
+        this.getDataList()
+      },
+      // 当前页
+      currentChangeHandle (val) {
+        this.pageIndex = val
+        this.getDataList()
+      },
+      // 多选
+      selectionChangeHandle (val) {
+        this.dataListSelections = val
+      },
+      // 入库申请
+      inBound () {
+        this.inboundVisible = true
+        this.$nextTick(() => {
+          this.$refs.inbound.init()
+        })
+      },
+      outBound () {
+        this.outboundVisible = true
+        this.$nextTick(() => {
+          this.$refs.outbound.init()
+        })
+      }
+    }
+  }
+</script>
+
+<style scoped>
+
+</style>

+ 177 - 2
src/views/modules/warehouse/out-record.vue

@@ -1,10 +1,185 @@
 <template>
-    <div>出库记录</div>
+  <div class="stock-order">
+    <el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
+      <el-form-item label="编号">
+        <el-input v-model="dataForm.number" placeholder="编号" clearable></el-input>
+      </el-form-item>
+      <el-form-item label="名称">
+        <el-input v-model="dataForm.name" placeholder="名称" clearable></el-input>
+      </el-form-item>
+      <el-form-item label="出库日期">
+        <el-date-picker
+          v-model="dataForm.date"
+          value-format="yyyy-MM-dd"
+          type="daterange"
+          range-separator="至"
+          start-placeholder="开始日期"
+          end-placeholder="结束日期">
+        </el-date-picker>
+      </el-form-item>
+      <el-form-item>
+        <el-button @click="getDataList()">查询</el-button>
+        <el-button @click="inBound()"  type="primary">导出</el-button>
+      </el-form-item>
+    </el-form>
+    <el-table
+      :data="dataList"
+      border
+      v-loading="dataListLoading"
+      @selection-change="selectionChangeHandle"
+      style="width: 100%;">
+      <el-table-column
+        label="序号"
+        type="index"
+        width="50"
+        align="center">
+      </el-table-column>
+      <el-table-column
+        prop="-"
+        header-align="center"
+        align="center"
+        label="编码">
+      </el-table-column>
+      <el-table-column
+        prop="-"
+        header-align="center"
+        align="center"
+        label="名称">
+      </el-table-column>
+      <el-table-column
+        prop="-"
+        header-align="center"
+        align="center"
+        label="类型">
+      </el-table-column>
+      <el-table-column
+        prop="recordType"
+        header-align="center"
+        align="center"
+        label="出库数量">
+      </el-table-column>
+      <el-table-column
+        prop="state"
+        header-align="center"
+        align="center"
+        label="单位">
+      </el-table-column>
+      <el-table-column
+        prop="state"
+        header-align="center"
+        align="center"
+        label="单价">
+      </el-table-column>
+      <el-table-column
+        prop="approver"
+        header-align="center"
+        align="center"
+        label="出库金额">
+      </el-table-column>
+      <el-table-column
+        prop="-"
+        header-align="center"
+        align="center"
+        label="出库时间">
+      </el-table-column>
+      <el-table-column
+        prop="-"
+        header-align="center"
+        align="center"
+        label="领料人">
+      </el-table-column>
+      <el-table-column
+        prop="-"
+        header-align="center"
+        align="center"
+        label="操作人">
+      </el-table-column>
+      <el-table-column
+        prop="-"
+        header-align="center"
+        align="center"
+        label="备注">
+      </el-table-column>
+    </el-table>
+    <el-pagination
+      @size-change="sizeChangeHandle"
+      @current-change="currentChangeHandle"
+      :current-page="pageIndex"
+      :page-sizes="[10, 20, 50, 100]"
+      :page-size="pageSize"
+      :total="totalPage"
+      layout="total, sizes, prev, pager, next, jumper">
+    </el-pagination>
+  </div>
 </template>
 
 <script>
   export default {
-    name: 'out-record'
+    name: 'stock-order',
+    data () {
+      return {
+        inboundVisible: false,
+        dataForm: {
+          number: '',
+          name: '',
+          date: ''
+        },
+        dataList: [],
+        pageIndex: 1,
+        pageSize: 10,
+        totalPage: 0,
+        dataListLoading: false,
+        dataListSelections: []
+      }
+    },
+    methods: {
+      // 获取数据列表
+      getDataList () {
+        this.dataListLoading = true
+        this.$http({
+          url: this.$http.adornUrl('/biz-service/inbound-record-ctl/list'),
+          method: 'get',
+          params: this.$http.adornParams({
+            'current': this.pageIndex,
+            'size': this.pageSize,
+            'beginTime': this.dataForm.date[0],
+            'endTime': this.dataForm.date[1],
+            'recordType': 1
+          })
+        }).then(({data}) => {
+          if (data && data.code === '200') {
+            this.dataList = data.data.records
+            this.totalPage = Number(data.data.total)
+          } else {
+            this.dataList = []
+            this.totalPage = 0
+          }
+          this.dataListLoading = false
+        })
+      },
+      // 每页数
+      sizeChangeHandle (val) {
+        this.pageSize = val
+        this.pageIndex = 1
+        this.getDataList()
+      },
+      // 当前页
+      currentChangeHandle (val) {
+        this.pageIndex = val
+        this.getDataList()
+      },
+      // 多选
+      selectionChangeHandle (val) {
+        this.dataListSelections = val
+      },
+      // 入库申请
+      inBound () {
+        this.inboundVisible = true
+        this.$nextTick(() => {
+          this.$refs.inbound.init()
+        })
+      }
+    }
   }
 </script>
 

+ 2 - 3
src/views/modules/warehouse/stock-order.vue

@@ -26,12 +26,11 @@
       </el-form-item>
       <el-form-item>
         <el-button @click="getDataList()">查询</el-button>
-<!--        <el-button v-if="isAuth('sys:user:save')" type="primary" @click="addOrUpdateHandle()">新增</el-button>-->
-<!--        <el-button v-if="isAuth('sys:user:delete')" type="danger" @click="deleteHandle()" :disabled="dataListSelections.length <= 0">批量删除</el-button>-->
       </el-form-item>
       <el-form-item>
         <el-button v-if="isAuth('wh:in-out-bound-ctl:inbound')" type="primary" @click="inBound()">入库申请</el-button>
         <el-button v-if="isAuth('wh:in-out-bound-ctl:outbound')" type="primary" @click="outBound()">出库申请</el-button>
+        <el-button v-if="isAuth('wh:in-out-bound-ctl:outbound')" type="primary" @click="outBound()">模板出库</el-button>
       </el-form-item>
     </el-form>
     <el-table
@@ -170,7 +169,7 @@
           params: this.$http.adornParams({
             'current': this.pageIndex,
             'size': this.pageSize,
-            'userId': this.dataForm.userId,
+            'userId': this.dataForm.userId ? this.dataForm.userId : '',
             'beginTime': this.dataForm.date[0],
             'endTime': this.dataForm.date[1],
             'recordType': this.dataForm.recordType

+ 188 - 0
src/views/modules/warehouse/template-add.vue

@@ -0,0 +1,188 @@
+<template>
+  <div>
+    <el-dialog
+      title="新增模板"
+      width="70%"
+      :close-on-click-modal="false"
+      :visible.sync="visible">
+      <el-form :model="dataForm" :rules="dataRule" ref="dataForm" label-width="auto">
+        <el-row class="my-row">
+          <el-form-item label="名称">
+            <el-input v-model="dataForm.code"  placeholder="名称"></el-input>
+          </el-form-item>
+        </el-row>
+        <el-row class="my-row">
+          <el-form-item label="备注">
+              <el-input v-model="dataForm.code"  placeholder="备注"></el-input>
+            </el-form-item>
+        </el-row>
+        <el-row>
+          <el-table
+            :data="dataList"
+            border
+            style="width: 100%;">
+            <el-table-column
+              label="序号"
+              type="index"
+              width="50"
+              align="center">
+            </el-table-column>
+            <el-table-column
+              prop="-"
+              header-align="center"
+              align="center"
+              label="物品名称">
+            </el-table-column>
+            <el-table-column
+              prop="recordType"
+              header-align="center"
+              align="center"
+              label="规格">
+            </el-table-column>
+            <el-table-column
+              prop="state"
+              header-align="center"
+              align="center"
+              label="数量">
+            </el-table-column>
+            <el-table-column
+              prop="approver"
+              header-align="center"
+              align="center"
+              label="单位">
+            </el-table-column>
+            <el-table-column
+              prop="-"
+              header-align="center"
+              align="center"
+              label="备注">
+            </el-table-column>
+            <el-table-column
+              fixed="right"
+              header-align="center"
+              align="center"
+              width="100"
+              label="操作">
+              <template slot-scope="scope">
+                <el-button type="text" size="small" @click="exportItem(scope.row.id)">删除</el-button>
+              </template>
+            </el-table-column>
+          </el-table>
+          <el-row style="text-align: center; margin-top: 10px;">
+            <el-button type="primary" icon="el-icon-plus" @click="inBound"></el-button>
+          </el-row>
+        </el-row>
+      </el-form>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="visible = false">取消</el-button>
+        <el-button type="primary" @click="dataFormSubmit()">确定</el-button>
+      </span>
+    </el-dialog>
+    <template-chose v-if="inboundVisible" ref="inbound" />
+  </div>
+</template>
+
+<script>
+  import UserComponent from '../common/user-component'
+  import DictSelect from '../sys/dict-select'
+  import {getUUID} from '../../../utils'
+  import templateChose from './template-chose'
+  export default {
+    name: 'stock-order-inbound',
+    components: {DictSelect, UserComponent, templateChose},
+    data () {
+      return {
+        visible: false,
+        inboundVisible: false,
+        dictType: 'material_type',
+        dataList: [],
+        dataForm: {
+          id: '',
+          amount: 0,
+          applicant: ''
+        },
+        dataRule: {
+        }
+      }
+    },
+    methods: {
+      init () {
+        this.visible = true
+        this.dataForm.code = getUUID()
+      },
+      // 表单提交
+      dataFormSubmit () {
+        this.$refs['dataForm'].validate((valid) => {
+          if (valid) {
+            this.$http({
+              url: this.$http.adornUrl(`/biz-service/in-out-bound-ctl/inbound`),
+              method: 'post',
+              data: this.$http.adornData({
+                'amount': this.dataForm.amount,
+                'applicant': this.dataForm.applicant,
+                'approver': this.dataForm.approver,
+                'batchNumber': this.dataForm.batchNumber,
+                'cnt': this.dataForm.cnt,
+                'materialId': this.dataForm.materialId,
+                'materialName': this.dataForm.materialName,
+                'notes': this.dataForm.notes,
+                'price': this.dataForm.price,
+                'orgId': this.dataForm.orgId,
+                'recordType': this.dataForm.recordType,
+                'source': this.dataForm.source,
+                'state': this.dataForm.state,
+                'templateItemPlanId': this.dataForm.templateItemPlanId,
+                'usage': this.dataForm.usage,
+                'userId': this.dataForm.userId,
+                'creatorId': this.$store.state.user.id
+              })
+            }).then(({data}) => {
+              if (data && data.code === '200') {
+                this.$message({
+                  message: '操作成功',
+                  type: 'success',
+                  duration: 1500,
+                  onClose: () => {
+                    this.visible = false
+                    this.$emit('refreshDataList')
+                  }
+                })
+              } else {
+                this.$message.error(data.msg)
+              }
+            })
+          }
+        })
+      },
+      validateField (type) {
+        this.$refs.dataForm.validateField(type)
+      },
+      userChanged (userId) {
+        this.$http({
+          url: this.$http.adornUrl('/user-service/user/info/' + userId),
+          method: 'get'
+        }).then(({data}) => {
+          if (data && data.code === '200') {
+            this.dataForm.orgId = data.data.orgId
+            this.dataForm.orgName = data.data.orgName
+          } else {
+            this.$message.error(data.msg)
+          }
+        })
+      },
+      inBound () {
+        this.inboundVisible = true
+        this.$nextTick(() => {
+          this.$refs.inbound.init()
+        })
+      }
+    }
+  }
+</script>
+
+<style scoped>
+.my-line{
+  border-bottom: 1px solid #c0c4cc;
+  margin-bottom: 10px;
+}
+</style>

+ 168 - 0
src/views/modules/warehouse/template-chose.vue

@@ -0,0 +1,168 @@
+<template>
+  <el-dialog
+    title="选择材料"
+    width="70%"
+    :close-on-click-modal="false"
+    :visible.sync="visible">
+    <div class="stock-order">
+      <el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
+        <el-form-item label="名称">
+          <el-input v-model="dataForm.name" placeholder="名称" clearable></el-input>
+        </el-form-item>
+        <el-form-item>
+          <el-button @click="getDataList()">查询</el-button>
+          <el-button @click="visible = false" type="primary">返回</el-button>
+        </el-form-item>
+      </el-form>
+      <el-table
+        :data="dataList"
+        border
+        v-loading="dataListLoading"
+        @selection-change="selectionChangeHandle"
+        style="width: 100%;">
+        <el-table-column
+          label="序号"
+          type="index"
+          width="50"
+          align="center">
+        </el-table-column>
+        <el-table-column
+          prop="-"
+          header-align="center"
+          align="center"
+          label="编码">
+        </el-table-column>
+        <el-table-column
+          prop="recordType"
+          header-align="center"
+          align="center"
+          label="名称">
+        </el-table-column>
+        <el-table-column
+          prop="state"
+          header-align="center"
+          align="center"
+          label="类别">
+        </el-table-column>
+        <el-table-column
+          prop="approver"
+          header-align="center"
+          align="center"
+          label="状态">
+        </el-table-column>
+        <el-table-column
+          prop="-"
+          header-align="center"
+          align="center"
+          label="规格">
+        </el-table-column>
+        <el-table-column
+          prop="-"
+          header-align="center"
+          align="center"
+          label="单位">
+        </el-table-column>
+        <el-table-column
+          prop="-"
+          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="exportItem(scope.row.id)">添加</el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+      <el-pagination
+        @size-change="sizeChangeHandle"
+        @current-change="currentChangeHandle"
+        :current-page="pageIndex"
+        :page-sizes="[10, 20, 50, 100]"
+        :page-size="pageSize"
+        :total="totalPage"
+        layout="total, sizes, prev, pager, next, jumper">
+      </el-pagination>
+    </div>
+  </el-dialog>
+</template>
+
+<script>
+  export default {
+    data () {
+      return {
+        visible: false,
+        dataForm: {
+          name: ''
+        },
+        dataList: [],
+        pageIndex: 1,
+        pageSize: 10,
+        totalPage: 0,
+        dataListLoading: false,
+        dataListSelections: []
+      }
+    },
+    methods: {
+      init () {
+        this.visible = true
+      },
+      // 获取数据列表
+      getDataList () {
+        this.dataListLoading = true
+        this.$http({
+          url: this.$http.adornUrl('/biz-service/inbound-record-ctl/list'),
+          method: 'get',
+          params: this.$http.adornParams({
+            'current': this.pageIndex,
+            'size': this.pageSize,
+            'userId': this.dataForm.userId,
+            'beginTime': this.dataForm.date[0],
+            'endTime': this.dataForm.date[1],
+            'recordType': this.dataForm.recordType
+          })
+        }).then(({data}) => {
+          if (data && data.code === '200') {
+            this.dataList = data.data.records
+            this.totalPage = Number(data.data.total)
+          } else {
+            this.dataList = []
+            this.totalPage = 0
+          }
+          this.dataListLoading = false
+        })
+      },
+      // 每页数
+      sizeChangeHandle (val) {
+        this.pageSize = val
+        this.pageIndex = 1
+        this.getDataList()
+      },
+      // 当前页
+      currentChangeHandle (val) {
+        this.pageIndex = val
+        this.getDataList()
+      },
+      // 多选
+      selectionChangeHandle (val) {
+        this.dataListSelections = val
+      },
+      // 入库申请
+      inBound () {
+        this.inboundVisible = true
+        this.$nextTick(() => {
+          this.$refs.inbound.init()
+        })
+      }
+    }
+  }
+</script>
+
+<style scoped>
+
+</style>

+ 4 - 5
src/views/modules/warehouse/template-delivery.vue

@@ -16,7 +16,7 @@
       </el-form-item>
       <el-form-item>
         <el-button @click="getDataList()">查询</el-button>
-        <el-button @click="inBound()">新增</el-button>
+        <el-button type="primary" @click="inBound()">新增</el-button>
       </el-form-item>
     </el-form>
     <el-table
@@ -134,15 +134,14 @@
       getDataList () {
         this.dataListLoading = true
         this.$http({
-          url: this.$http.adornUrl('/biz-service/inbound-record-ctl/list'),
+          url: this.$http.adornUrl('/biz-service/template-outbound-ctl/list'),
           method: 'get',
           params: this.$http.adornParams({
             'current': this.pageIndex,
             'size': this.pageSize,
-            'userId': this.dataForm.userId,
+            'templateName': this.dataForm.name,
             'beginTime': this.dataForm.date[0],
-            'endTime': this.dataForm.date[1],
-            'recordType': this.dataForm.recordType
+            'endTime': this.dataForm.date[1]
           })
         }).then(({data}) => {
           if (data && data.code === '200') {

+ 16 - 11
src/views/modules/warehouse/template.vue

@@ -16,7 +16,7 @@
       </el-form-item>
       <el-form-item>
         <el-button @click="getDataList()">查询</el-button>
-        <el-button @click="inBound()">新增</el-button>
+        <el-button @click="inBound()"  type="primary">新增</el-button>
       </el-form-item>
     </el-form>
     <el-table
@@ -47,19 +47,25 @@
         prop="state"
         header-align="center"
         align="center"
-        label="当前状态">
+        label="使用次数">
       </el-table-column>
       <el-table-column
         prop="approver"
         header-align="center"
         align="center"
-        label="原因">
+        label="创建时间">
       </el-table-column>
       <el-table-column
         prop="-"
         header-align="center"
         align="center"
-        label="创建时间">
+        label="是否产品模版">
+      </el-table-column>
+      <el-table-column
+        prop="-"
+        header-align="center"
+        align="center"
+        label="创建人">
       </el-table-column>
       <el-table-column
         prop="-"
@@ -75,7 +81,7 @@
         label="操作">
         <template slot-scope="scope">
           <el-button v-if="isAuth('wh:inbound-record-ctl:info')" type="text" size="small" @click="details(scope.row.id)">查看</el-button>
-          <el-button type="text" size="small" @click="exportItem(scope.row.id)">出库</el-button>
+          <el-button type="text" size="small" @click="exportItem(scope.row.id)">停用</el-button>
         </template>
       </el-table-column>
     </el-table>
@@ -89,16 +95,16 @@
       layout="total, sizes, prev, pager, next, jumper">
     </el-pagination>
     <!--    入库-->
-    <template-delivery-add v-if="inboundVisible" ref="inbound" @refreshDataList="getDataList"></template-delivery-add>
+    <template-add v-if="inboundVisible" ref="inbound" @refreshDataList="getDataList"></template-add>
     <!-- <stock-order-outbound v-if="outboundVisible" ref="outbound" @refreshDataList="getDataList"></stock-order-outbound> -->
   </div>
 </template>
 
 <script>
-  import templateDeliveryAdd from './template-delivery-add'
+  import templateAdd from './template-add'
   export default {
     name: 'stock-order',
-    components: {templateDeliveryAdd},
+    components: {templateAdd},
     data () {
       return {
         inboundVisible: false,
@@ -134,15 +140,14 @@
       getDataList () {
         this.dataListLoading = true
         this.$http({
-          url: this.$http.adornUrl('/biz-service/inbound-record-ctl/list'),
+          url: this.$http.adornUrl('/biz-service/TemplateMgCtl/list'),
           method: 'get',
           params: this.$http.adornParams({
             'current': this.pageIndex,
             'size': this.pageSize,
-            'userId': this.dataForm.userId,
             'beginTime': this.dataForm.date[0],
             'endTime': this.dataForm.date[1],
-            'recordType': this.dataForm.recordType
+            'templateName': this.dataForm.name
           })
         }).then(({data}) => {
           if (data && data.code === '200') {

+ 144 - 0
src/views/modules/warehouse/unit-add.vue

@@ -0,0 +1,144 @@
+<template>
+  <el-dialog
+    title="新增换算"
+    :close-on-click-modal="false"
+    :visible.sync="visible">
+    <el-form :model="dataForm" :rules="dataRule" ref="dataForm" label-width="auto">
+      <el-row class="my-row">
+        <el-form-item label="编码">
+          <el-input v-model="dataForm.code"  placeholder="编码"></el-input>
+        </el-form-item>
+      </el-row>
+      <el-row class="my-row">
+        <el-col :span="12">
+          <el-form-item label="数量">
+            <el-input v-model="dataForm.code"  placeholder="数量"></el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :span="12" style="padding-left: 20px">
+          <el-form-item label="单位">
+            <el-input v-model="dataForm.code"  placeholder="单位"></el-input>
+          </el-form-item>
+        </el-col>
+      </el-row>
+      <el-row class="my-row">
+        <el-col :span="12">
+          <el-form-item label="转换后数量">
+            <el-input v-model="dataForm.code"  placeholder="转换后数量"></el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :span="12" style="padding-left: 20px">
+          <el-form-item label="单位">
+            <el-input v-model="dataForm.code"  placeholder="转换后单位"></el-input>
+          </el-form-item>
+        </el-col>
+      </el-row>
+      <el-row class="my-row">
+        <el-form-item label="备注说明:">
+          <el-input v-model="dataForm.code"  placeholder="编码"></el-input>
+        </el-form-item>
+      </el-row>
+    </el-form>
+    <span slot="footer" class="dialog-footer">
+      <el-button @click="visible = false">取消</el-button>
+      <el-button type="primary" @click="dataFormSubmit()">确定</el-button>
+    </span>
+  </el-dialog>
+</template>
+
+<script>
+  import UserComponent from '../common/user-component'
+  import DictSelect from '../sys/dict-select'
+  import {getUUID} from '../../../utils'
+  export default {
+    name: 'stock-order-inbound',
+    components: {DictSelect, UserComponent},
+    data () {
+      return {
+        visible: false,
+        dictType: 'material_type',
+        dataList: [],
+        dataForm: {
+          id: '',
+          amount: 0,
+          applicant: ''
+        },
+        dataRule: {
+        }
+      }
+    },
+    methods: {
+      init () {
+        this.visible = true
+        this.dataForm.code = getUUID()
+      },
+      // 表单提交
+      dataFormSubmit () {
+        this.$refs['dataForm'].validate((valid) => {
+          if (valid) {
+            this.$http({
+              url: this.$http.adornUrl(`/biz-service/in-out-bound-ctl/inbound`),
+              method: 'post',
+              data: this.$http.adornData({
+                'amount': this.dataForm.amount,
+                'applicant': this.dataForm.applicant,
+                'approver': this.dataForm.approver,
+                'batchNumber': this.dataForm.batchNumber,
+                'cnt': this.dataForm.cnt,
+                'materialId': this.dataForm.materialId,
+                'materialName': this.dataForm.materialName,
+                'notes': this.dataForm.notes,
+                'price': this.dataForm.price,
+                'orgId': this.dataForm.orgId,
+                'recordType': this.dataForm.recordType,
+                'source': this.dataForm.source,
+                'state': this.dataForm.state,
+                'templateItemPlanId': this.dataForm.templateItemPlanId,
+                'usage': this.dataForm.usage,
+                'userId': this.dataForm.userId,
+                'creatorId': this.$store.state.user.id
+              })
+            }).then(({data}) => {
+              if (data && data.code === '200') {
+                this.$message({
+                  message: '操作成功',
+                  type: 'success',
+                  duration: 1500,
+                  onClose: () => {
+                    this.visible = false
+                    this.$emit('refreshDataList')
+                  }
+                })
+              } else {
+                this.$message.error(data.msg)
+              }
+            })
+          }
+        })
+      },
+      validateField (type) {
+        this.$refs.dataForm.validateField(type)
+      },
+      userChanged (userId) {
+        this.$http({
+          url: this.$http.adornUrl('/user-service/user/info/' + userId),
+          method: 'get'
+        }).then(({data}) => {
+          if (data && data.code === '200') {
+            this.dataForm.orgId = data.data.orgId
+            this.dataForm.orgName = data.data.orgName
+          } else {
+            this.$message.error(data.msg)
+          }
+        })
+      }
+    }
+  }
+</script>
+
+<style scoped>
+.my-line{
+  border-bottom: 1px solid #c0c4cc;
+  margin-bottom: 10px;
+}
+</style>

+ 190 - 2
src/views/modules/warehouse/unit-conversion.vue

@@ -1,10 +1,198 @@
 <template>
-    <div>单位换算管理</div>
+  <div class="stock-order">
+    <el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
+      <el-form-item label="创建人">
+        <el-input v-model="dataForm.name" placeholder="创建人" clearable></el-input>
+      </el-form-item>
+      <el-form-item label="创建时间">
+        <el-date-picker
+          v-model="dataForm.date"
+          value-format="yyyy-MM-dd"
+          type="daterange"
+          range-separator="至"
+          start-placeholder="开始日期"
+          end-placeholder="结束日期">
+        </el-date-picker>
+      </el-form-item>
+      <el-form-item>
+        <el-button @click="getDataList()">查询</el-button>
+        <el-button @click="inBound()"  type="primary">新增换算</el-button>
+      </el-form-item>
+    </el-form>
+    <el-table
+      :data="dataList"
+      border
+      v-loading="dataListLoading"
+      @selection-change="selectionChangeHandle"
+      style="width: 100%;">
+      <el-table-column
+        label="序号"
+        type="index"
+        width="50"
+        align="center">
+      </el-table-column>
+      <el-table-column
+        prop="-"
+        header-align="center"
+        align="center"
+        label="编码">
+      </el-table-column>
+      <el-table-column
+        prop="recordType"
+        header-align="center"
+        align="center"
+        label="数量">
+      </el-table-column>
+      <el-table-column
+        prop="state"
+        header-align="center"
+        align="center"
+        label="单位">
+      </el-table-column>
+      <el-table-column
+        prop="approver"
+        header-align="center"
+        align="center"
+        label="转换数量">
+      </el-table-column>
+      <el-table-column
+        prop="-"
+        header-align="center"
+        align="center"
+        label="转换单位">
+      </el-table-column>
+      <el-table-column
+        prop="-"
+        header-align="center"
+        align="center"
+        label="使用次数">
+      </el-table-column>
+      <el-table-column
+        prop="-"
+        header-align="center"
+        align="center"
+        label="创建人">
+      </el-table-column>
+      <el-table-column
+        prop="-"
+        header-align="center"
+        align="center"
+        label="创建时间">
+      </el-table-column>
+      <el-table-column
+        prop="-"
+        header-align="center"
+        align="center"
+        label="备注">
+      </el-table-column>
+      <el-table-column
+        fixed="right"
+        header-align="center"
+        align="center"
+        width="100"
+        label="操作">
+        <template slot-scope="scope">
+          <el-button type="text" size="small" @click="details(scope.row.id)">查看</el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+    <el-pagination
+      @size-change="sizeChangeHandle"
+      @current-change="currentChangeHandle"
+      :current-page="pageIndex"
+      :page-sizes="[10, 20, 50, 100]"
+      :page-size="pageSize"
+      :total="totalPage"
+      layout="total, sizes, prev, pager, next, jumper">
+    </el-pagination>
+    <!--    入库-->
+    <unit-add v-if="inboundVisible" ref="inbound" @refreshDataList="getDataList"></unit-add>
+  </div>
 </template>
 
 <script>
+  import unitAdd from './unit-add'
   export default {
-    name: 'unit-conversion'
+    name: 'stock-order',
+    components: {unitAdd},
+    data () {
+      return {
+        inboundVisible: false,
+        dataForm: {
+          name: '',
+          date: ''
+        },
+        recordTypeOptions: [
+          {
+            value: null,
+            label: '请选择'
+          },
+          {
+            value: '0',
+            label: '入库'
+          },
+          {
+            value: '1',
+            label: '出库'
+          }
+        ],
+        dataList: [],
+        pageIndex: 1,
+        pageSize: 10,
+        totalPage: 0,
+        dataListLoading: false,
+        dataListSelections: []
+      }
+    },
+    methods: {
+      // 获取数据列表
+      getDataList () {
+        this.dataListLoading = true
+        this.$http({
+          url: this.$http.adornUrl('/biz-service/inbound-record-ctl/list'),
+          method: 'get',
+          params: this.$http.adornParams({
+            'current': this.pageIndex,
+            'size': this.pageSize,
+            'userId': this.dataForm.userId,
+            'beginTime': this.dataForm.date[0],
+            'endTime': this.dataForm.date[1],
+            'recordType': this.dataForm.recordType
+          })
+        }).then(({data}) => {
+          if (data && data.code === '200') {
+            this.dataList = data.data.records
+            this.totalPage = Number(data.data.total)
+          } else {
+            this.dataList = []
+            this.totalPage = 0
+          }
+          this.dataListLoading = false
+        })
+      },
+      // 每页数
+      sizeChangeHandle (val) {
+        this.pageSize = val
+        this.pageIndex = 1
+        this.getDataList()
+      },
+      // 当前页
+      currentChangeHandle (val) {
+        this.pageIndex = val
+        this.getDataList()
+      },
+      // 多选
+      selectionChangeHandle (val) {
+        this.dataListSelections = val
+      },
+      // 入库申请
+      inBound () {
+        this.inboundVisible = true
+        this.$nextTick(() => {
+          this.$refs.inbound.init()
+        })
+      }
+    }
   }
 </script>