chrislee 1 жил өмнө
parent
commit
6f85516640

+ 91 - 0
src/views/modules/production/inspect-type-dialog.vue

@@ -0,0 +1,91 @@
+<template>
+  <div>
+    <el-dialog
+      title="检验项目"
+      width="70%"
+      :close-on-click-modal="false"
+      :visible.sync="visible">
+      <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="pageNo"
+          header-align="center"
+          align="center"
+          min-width="140"
+          :show-tooltip-when-overflow="true"
+          label="页次/图区"/>
+        <el-table-column
+          prop="inspectionParam"
+          header-align="center"
+          align="center"
+          min-width="140"
+          :show-tooltip-when-overflow="true"
+          label="检验参数"/>
+        <el-table-column
+          prop="inspectionMethod"
+          header-align="center"
+          align="center"
+          min-width="160"
+          :show-tooltip-when-overflow="true"
+          label="检验方法"/>
+        <el-table-column
+          prop="allowValues"
+          header-align="center"
+          align="center"
+          min-width="80"
+          :show-tooltip-when-overflow="true"
+          label="允许值"/>
+        <el-table-column
+          prop="measureRecord1"
+          header-align="center"
+          align="center"
+          min-width="160"
+          :show-tooltip-when-overflow="true"
+          label="实测记录1"/>
+        <el-table-column
+          prop="measureRecord2"
+          header-align="center"
+          align="center"
+          min-width="160"
+          :show-tooltip-when-overflow="true"
+          label="实测记录2"/>
+      </el-table>
+        <span slot="footer">
+          <el-button @click="onChose">返回</el-button>
+        </span>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+  export default {
+    name: 'inspect-type-dialog',
+    data () {
+      return {
+        visible: false,
+        dataList: []
+      }
+    },
+    methods: {
+      onChose () {
+        this.visible = false
+      },
+      async init (dataList) {
+        this.visible = true
+        this.dataList = dataList
+      }
+    }
+  }
+</script>
+
+<style scoped>
+
+</style>

+ 6 - 5
src/views/modules/production/monitoring.vue

@@ -116,7 +116,7 @@
       </el-pagination>
     </template>
     <!-- 弹窗, 查看 -->
-    <detail v-if="detailsVisible" ref="details" @close="closeDialogEvent" @refreshDataList="getDataList" @onChose="onChose"/>
+    <prod-management-details v-if="detailsVisible" ref="details" @onChose="onChose" @refreshDataList="getDataList"/>
     <purchase-detail v-if="purchaseVisible" ref="purchase" @refreshDataList="getDataList" @onChose="onChose"/>
     <outsource-detail  v-if="outsourceVisible" ref="outsource" @refreshDataList="getDataList" @onChose="onChose"/>
   </div>
@@ -126,10 +126,11 @@
   import Detail from './monitoring-details'
   import { getMonitoringList } from '@/api/production'
   import PurchaseDetail from '@/views/modules/sale/purchase-detail'
-import OutsourceDetail from '@/views/modules/sale/outsource-detail'
+  import OutsourceDetail from '@/views/modules/sale/outsource-detail'
+  import ProdManagementDetails from '@/views/modules/production/prod-management-details'
 export default {
     name: 'monitoring',
-    components: {OutsourceDetail, PurchaseDetail, Detail},
+    components: {ProdManagementDetails, OutsourceDetail, PurchaseDetail, Detail},
     data () {
       return {
         detailsVisible: false,
@@ -208,10 +209,10 @@ export default {
         this.dataListSelections = val
       },
       // 新增 / 修改
-      detail (id, prodCode, disable) {
+      detail (id) {
         this.detailsVisible = true
         this.$nextTick(() => {
-          this.$refs.details.init(id, prodCode, disable)
+          this.$refs.details.init(id)
         })
       },
       outsourceDetail (row) {

+ 201 - 0
src/views/modules/production/prod-management-details.vue

@@ -0,0 +1,201 @@
+<template>
+  <div class="production">
+      <div class="my-title">生产监控详情</div>
+    <div v-for="(item, index) in dataList">
+      <el-table
+        :data="item.nodeList"
+        border
+        style="width: 100%;">
+        <el-table-column
+          label="序号"
+          type="index"
+          width="50"
+          align="center">
+        </el-table-column>
+        <el-table-column
+          prop="nodeName"
+          header-align="center"
+          align="center"
+          min-width="120"
+          :show-tooltip-when-overflow="true"
+          label="工序名称"/>
+        <el-table-column
+          prop="require"
+          header-align="center"
+          align="center"
+          min-width="120"
+          :show-tooltip-when-overflow="true"
+          label="工序要求"/>
+        <el-table-column
+          prop="explain"
+          header-align="center"
+          align="center"
+          min-width="120"
+          :show-tooltip-when-overflow="true"
+          label="工序说明"/>
+        <el-table-column
+          prop="workTypeName"
+          header-align="center"
+          align="center"
+          min-width="120"
+          :show-tooltip-when-overflow="true"
+          label="工种"/>
+        <el-table-column
+          header-align="center"
+          align="center"
+          label="参考附件">
+          <template slot-scope="scope">
+            <el-button :disabled="!scope.row.attachList || scope.row.attachList.length === 0" type="text" size="small" @click="attachDetails(scope.row.attachList)">查看</el-button>
+          </template>
+        </el-table-column>
+        <el-table-column
+          prop="operatorName"
+          header-align="center"
+          align="center"
+          min-width="80"
+          :show-tooltip-when-overflow="true"
+          label="操作人"/>
+        <el-table-column
+          prop="state"
+          header-align="center"
+          align="center"
+          min-width="80"
+          :show-tooltip-when-overflow="true"
+          label="完成状态">
+          <template slot-scope="scope">{{stateFormat(scope.row)}}</template>
+        </el-table-column>
+        <el-table-column
+          prop="planCompletionTime"
+          header-align="center"
+          align="center"
+          min-width="160"
+          :show-tooltip-when-overflow="true"
+          label="要求完成时间"/>
+        <el-table-column
+          prop="completionTime"
+          header-align="center"
+          align="center"
+          min-width="160"
+          :show-tooltip-when-overflow="true"
+          label="实际完成时间"/>
+        <el-table-column
+          prop="preTaskTime"
+          header-align="center"
+          align="center"
+          min-width="100"
+          :show-tooltip-when-overflow="true"
+          label="工艺预估工时"/>
+        <el-table-column
+          prop="actualTime"
+          header-align="center"
+          align="center"
+          min-width="100"
+          :show-tooltip-when-overflow="true"
+          label="实际完成工时"/>
+        <el-table-column
+          prop="operationRecords"
+          header-align="center"
+          align="center"
+          min-width="140"
+          :show-tooltip-when-overflow="true"
+          label="完成记录"/>
+        <el-table-column
+          prop="notes"
+          header-align="center"
+          align="center"
+          min-width="160"
+          :show-tooltip-when-overflow="true"
+          label="备注"/>
+        <el-table-column
+          header-align="center"
+          align="center"
+          label="总检记录">
+          <template slot-scope="scope">
+            <el-button :disabled="!scope.row.prodProductionRequireList || scope.row.prodProductionRequireList.length === 0" type="text" size="small" @click="inspectDetails(scope.row.prodProductionRequireList)">查看</el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+    </div>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="onChose">返回</el-button>
+      </span>
+    <attach-detail-dialog v-if="attachVisible" ref="attachDetail" @onChose="onChose"/>
+    <inspect-type-dialog v-if="inspectVisible" ref="inspectDetail" @onChose="onChose"/>
+  </div>
+</template>
+
+<script>
+import { getMonitoringDetail } from '@/api/production'
+import AttachDetail from '@/views/modules/common/attach-detail'
+import AttachDetailDialog from '@/views/modules/common/attach-detail-dialog'
+import InspectTypeDialog from '@/views/modules/production/inspect-type-dialog'
+export default {
+  name: 'prod-management-details',
+  components: {InspectTypeDialog, AttachDetailDialog, AttachDetail},
+  data () {
+    return {
+      attachVisible: false,
+      inspectVisible: false,
+      dataList: [],
+      optionsState: [
+        {
+          code: '0', value: '已完成'
+        },
+        {
+          code: '1', value: '未完成'
+        }
+      ]
+    }
+  },
+  methods: {
+    onChose () {
+      this.attachVisible = false
+      this.inspectVisible = false
+      this.$emit('onChose')
+    },
+    // 初始化表单
+    async init (id) {
+      await getMonitoringDetail(id).then(async ({ data }) => {
+        if (data && data.code === '200') {
+          this.dataList = data.data
+        } else {
+          this.$message.error(data.msg)
+          this.handleClose()
+        }
+      })
+    },
+    handleClose () {
+      this.$emit('close')
+    },
+    // 转换属性“状态”
+    stateFormat (row) {
+      if (this.optionsState) {
+        for (let i = 0; i < this.optionsState.length; i++) {
+          if (this.optionsState[i].code === row.state) {
+            return this.optionsState[i].value
+          }
+        }
+      }
+    },
+    attachDetails (attachList) {
+      this.attachVisible = true
+      this.$nextTick(() => {
+        this.$refs.attachDetail.init(attachList)
+      })
+    },
+    inspectDetails (inspectList) {
+      this.inspectVisible = true
+      this.$nextTick(() => {
+        this.$refs.inspectDetail.init(inspectList)
+      })
+    }
+  }
+}
+</script>
+
+<style scoped lang="scss">
+/deep/ .my-row .super-flow__node {
+  width: 180px;
+  height: 80px;
+}
+</style>