소스 검색

生产记录

chris 3 년 전
부모
커밋
38070847d8
5개의 변경된 파일55개의 추가작업 그리고 174개의 파일을 삭제
  1. 9 0
      src/api/production.js
  2. BIN
      src/assets/img/login_bg2.jpg
  3. 4 3
      src/views/common/login.vue
  4. 13 0
      src/views/modules/production/recording-details.vue
  5. 29 171
      src/views/modules/production/recording.vue

+ 9 - 0
src/api/production.js

@@ -17,3 +17,12 @@ export function getMonitoringList (params) {
     params: params
   })
 }
+
+// 获取生产监控列表信息
+export function getRecordingList (params) {
+  return request({
+    url: request.adornUrl(`/biz-service/ProductionRecord/list`),
+    method: 'get',
+    params: params
+  })
+}

BIN
src/assets/img/login_bg2.jpg


+ 4 - 3
src/views/common/login.vue

@@ -3,8 +3,8 @@
       <div class="site-content__wrapper">
         <div class="site-content">
           <div class="brand-info">
-            <h2 class="brand-info__text">智慧机场平台</h2>
-            <p class="brand-info__intro">服务于各大机场,进行智慧管理</p>
+            <h2 class="brand-info__text">重庆木之科技公司</h2>
+            <p class="brand-info__intro">即时生产ERP,服务于各类生产型企业</p>
           </div>
           <div class="login-main">
             <h3 class="login-title">管理员登录</h3>
@@ -122,7 +122,8 @@
       width: 100%;
       height: 100%;
       content: "";
-      background-image: url(~@/assets/img/login_bg.png);
+      /*background-image: url(~@/assets/img/login_bg.png);*/
+      background-image: url(~@/assets/img/login_bg2.jpg);
       background-size: cover;
     }
     .site-content__wrapper {

+ 13 - 0
src/views/modules/production/recording-details.vue

@@ -0,0 +1,13 @@
+<template>
+
+</template>
+
+<script>
+  export default {
+    name: 'recording-details'
+  }
+</script>
+
+<style scoped>
+
+</style>

+ 29 - 171
src/views/modules/production/recording.vue

@@ -1,49 +1,15 @@
 <!-- 生产记录 -->
 <template>
   <div class="production">
-    <el-form :inline="true" :model="dataForm" @keyup.enter.native="search()">
-      <el-form-item label="采购编码">
-        <el-input v-model="dataForm.purchaseCode" placeholder="采购编码" clearable/>
+    <el-form :inline="true" :model="dataForm" @keyup.enter.native="queryPage()">
+      <el-form-item label="订单编号">
+        <el-input v-model="dataForm.orderCode" placeholder="订单编号" clearable/>
       </el-form-item>
-      <el-form-item label="说明">
-        <el-input v-model="dataForm.notes" placeholder="说明" clearable/>
-      </el-form-item>
-      <el-form-item label="类别">
-        <el-select
-          v-model="dataForm.purchaseType"
-          remote
-          placeholder="请选择">
-          <el-option
-            v-for="item in optionsType"
-            :key="item.code"
-            :label="item.value"
-            :value="item.code">
-          </el-option>
-        </el-select>
-      </el-form-item>
-      <el-form-item label="申请日期">
-        <el-date-picker
-          v-model="dataForm.applyDate"
-          value-format="yyyy-MM-dd"
-          type="date">
-        </el-date-picker>
-      </el-form-item>
-      <el-form-item label="状态">
-        <el-select
-          v-model="dataForm.purchaseState"
-          remote
-          placeholder="请选择">
-          <el-option
-            v-for="item in optionsState"
-            :key="item.code"
-            :label="item.value"
-            :value="item.code">
-          </el-option>
-        </el-select>
+      <el-form-item label="产品名称">
+        <el-input v-model="dataForm.productName" placeholder="产品名称" clearable/>
       </el-form-item>
       <el-form-item>
-        <el-button @click="search()">查询</el-button>
-        <el-button type="primary" @click="addOrUpdateHandle(0, false)">新建采购申请</el-button>
+        <el-button @click="queryPage()">查询</el-button>
       </el-form-item>
     </el-form>
     <el-table
@@ -58,61 +24,28 @@
         align="center">
       </el-table-column>
       <el-table-column
-        prop="purchaseCode"
-        header-align="center"
-        align="center"
-        min-width="100"
-        label="采购编码">
-      </el-table-column>
-      <el-table-column
-        prop="materialName"
+        prop="productName"
         header-align="center"
         align="center"
-        min-width="120"
-        label="物品名称">
+        label="产品名称">
       </el-table-column>
       <el-table-column
-        prop="purchaseType"
+        prop="prodCode"
         header-align="center"
         align="center"
-        :formatter="formatType"
-        label="采购类别">
+        label="产品编号">
       </el-table-column>
       <el-table-column
-        prop="createTime"
+        prop="orderCode"
         header-align="center"
         align="center"
-        min-width="160"
-        label="申请时间">
+        label="订单编号">
       </el-table-column>
       <el-table-column
-        prop="applierName"
+        prop="customerName"
         header-align="center"
         align="center"
-        min-width="100"
-        label="申请人">
-      </el-table-column>
-      <el-table-column
-        prop="deptName"
-        header-align="center"
-        align="center"
-        min-width="100"
-        label="申请部门">
-      </el-table-column>
-      <el-table-column
-        prop="notes"
-        header-align="center"
-        align="center"
-        min-width="180"
-        :show-overflow-tooltip="true"
-        label="说明">
-      </el-table-column>
-      <el-table-column
-        prop="purchaseState"
-        header-align="center"
-        align="center"
-        :formatter="formatState"
-        label="当前状态">
+        label="客户名称">
       </el-table-column>
       <el-table-column
         fixed="right"
@@ -121,9 +54,7 @@
         width="150"
         label="操作">
         <template slot-scope="scope">
-          <el-button type="text" size="small" @click="addOrUpdateHandle(scope.row.purchaseId, true)">查看</el-button>
-          <el-button type="text" size="small" @click="addOrUpdateHandle(scope.row.purchaseId, false)">编辑</el-button>
-          <el-button style="color: red" type="text" size="small" @click="revokeHandle(scope.row.purchaseId)">撤回</el-button>
+          <el-button type="text" size="small" @click="details(scope.row.id)">查看</el-button>
         </template>
       </el-table-column>
     </el-table>
@@ -136,68 +67,35 @@
       :total="totalPage"
       layout="total, sizes, prev, pager, next, jumper">
     </el-pagination>
-    <!-- 弹窗, 新增 / 修改 -->
-<!--    <add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>-->
+    <!-- 弹窗, 查看 -->
+    <detail v-if="detailsVisible" ref="details" @refreshDataList="getDataList"/>
   </div>
 </template>
 
 <script>
-  // import AddOrUpdate from './purchase-add-or-update'
-  import { getDictList } from '@/api/dict'
-  import { getPurchaseList, revokePurchase } from '@/api/sale'
+  import Detail from './recording-details'
+  import { getRecordingList } from '@/api/production'
   export default {
     name: 'recording',
+    components: {Detail},
     data () {
       return {
-        addOrUpdateVisible: false,
+        detailsVisible: false,
         dataForm: {},
         dataList: [],
         pageIndex: 1,
         pageSize: 10,
         totalPage: 0,
         dataListLoading: false,
-        dataListSelections: [],
-        optionsType: [],
-        // 审批状态:0 待提交 1 待审批 2 审批中 3 审批完成 4 审批不通过
-        optionsState: [
-          {
-            code: '0',
-            value: '待提交'
-          },
-          {
-            code: '1',
-            value: '待审批'
-          },
-          {
-            code: '2',
-            value: '审批中'
-          },
-          {
-            code: '3',
-            value: '审批完成'
-          },
-          {
-            code: '4',
-            value: '审批不通过'
-          }
-        ]
+        dataListSelections: []
       }
     },
     created () {
-      this.getTypeList()
       this.getDataList()
     },
     methods: {
-      // 获取采购类别字典
-      getTypeList () {
-        getDictList({type: 'purchase_type'}).then(({data}) => {
-          if (data) {
-            this.optionsType = data
-          }
-        })
-      },
       // 查询
-      search () {
+      queryPage () {
         this.pageIndex = 1
         this.getDataList()
       },
@@ -208,13 +106,10 @@
         let params = {
           'current': this.pageIndex,
           'size': this.pageSize,
-          'applyDate': this.dataForm.applyDate ? this.dataForm.applyDate : null,
-          'notes': this.dataForm.notes ? this.dataForm.notes : null,
-          'purchaseState': this.dataForm.purchaseState ? this.dataForm.purchaseState : null,
-          'purchaseType': this.dataForm.purchaseType ? this.dataForm.purchaseType : null,
-          'purchaseCode': this.dataForm.purchaseCode ? this.dataForm.purchaseCode : null
+          'orderCode': this.dataForm.orderCode ? this.dataForm.orderCode : null,
+          'productName': this.dataForm.productName ? this.dataForm.productName : null
         }
-        getPurchaseList(params).then(({data}) => {
+        getRecordingList(params).then(({data}) => {
           if (data && data.code === '200') {
             this.dataList = data.data.records
             this.totalPage = Number(data.data.total)
@@ -225,30 +120,6 @@
           this.dataListLoading = false
         })
       },
-      revokeHandle (id) {
-        if (!id) return
-        let data = {id: id}
-        this.$confirm(`确定撤回?`, '提示', {
-          confirmButtonText: '确定',
-          cancelButtonText: '取消',
-          type: 'warning'
-        }).then(() => {
-          revokePurchase(data).then(({data}) => {
-            if (data && data.code === '200') {
-              this.$message({
-                message: '操作成功',
-                type: 'success',
-                duration: 1500,
-                onClose: () => {
-                  this.getDataList()
-                }
-              })
-            } else {
-              this.$message.error(data.msg)
-            }
-          })
-        }).catch(() => {})
-      },
       // 每页数
       sizeChangeHandle (val) {
         this.pageSize = val
@@ -265,24 +136,11 @@
         this.dataListSelections = val
       },
       // 新增 / 修改
-      addOrUpdateHandle (id, disable) {
-        this.addOrUpdateVisible = true
+      details (id) {
+        this.detailsVisible = true
         this.$nextTick(() => {
-          this.$refs.addOrUpdate.init(id, disable)
+          this.$refs.details.init(id)
         })
-      },
-      // 转换属性“类别”
-      formatType (row) {
-        if (this.optionsType && row.purchaseType) {
-          const item1 = this.optionsType.find((item) => item.code === row.purchaseType.toString())
-          return item1 ? item1.value : ''
-        }
-      },
-      // 转换属性“是否组合产品”
-      formatState (row) {
-        if (!row.purchaseState) return ''
-        const item1 = this.optionsState.find((item) => item.code === row.purchaseState.toString())
-        return item1 ? item1.value : ''
       }
     }
   }