Procházet zdrojové kódy

不合格品审理单

damon227 před 2 roky
rodič
revize
d5772cf23f

+ 67 - 0
src/views/modules/quality/disqualification-dispose.vue

@@ -0,0 +1,67 @@
+<template>
+  <div>
+    <div class="my-title">处理</div>
+    <el-form
+      :model="dataForm"
+      :rules="dataRule"
+      ref="dataForm"
+      @keyup.enter.native="dataFormSubmit()"
+      label-width="130px"
+    ></el-form>
+    <span slot="footer" class="dialog-footer">
+      <el-button @click="onChose">取消</el-button>
+      <el-button type="primary" @click="dataFormSubmit()">确定</el-button>
+    </span>
+  </div>
+</template>
+
+<script>
+export default {
+  name: 'quality-disqualification-dispose',
+  data () {
+    return {
+      dataForm: {},
+      dataRule: {}
+    }
+  },
+
+  mounted () {},
+
+  methods: {
+    init (item) {
+      this.dataForm = { ...item }
+    },
+    onChose () {
+      this.$emit('onChose')
+    },
+    dataFormSubmit () {
+      this.$refs['dataForm'].validate((valid) => {
+        if (valid) {
+          this.$http({
+            url: this.$http.adornUrl(`/biz-service/disqualification/updateDispose`),
+            method: 'post',
+            data: this.$http.adornData({ ...this.dataForm, orgId: this.orgId })
+          }).then(({ data }) => {
+            if (data && data.code === '200') {
+              this.$message({
+                message: '操作成功',
+                type: 'success',
+                duration: 1500,
+                onClose: () => {
+                  this.onChose()
+                  this.$emit('refreshDataList')
+                }
+              })
+            } else {
+              this.$message.error(data.msg)
+            }
+          })
+        }
+      })
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+</style>

+ 67 - 0
src/views/modules/quality/disqualification-update.vue

@@ -0,0 +1,67 @@
+<template>
+  <div>
+    <div class="my-title">编辑</div>
+    <el-form
+      :model="dataForm"
+      :rules="dataRule"
+      ref="dataForm"
+      @keyup.enter.native="dataFormSubmit()"
+      label-width="130px"
+    ></el-form>
+    <span slot="footer" class="dialog-footer">
+      <el-button @click="onChose">取消</el-button>
+      <el-button type="primary" @click="dataFormSubmit()">确定</el-button>
+    </span>
+  </div>
+</template>
+
+<script>
+export default {
+  name: 'quality-disqualification-update',
+  data () {
+    return {
+      dataForm: {},
+      dataRule: {}
+    }
+  },
+
+  mounted () {},
+
+  methods: {
+    init (item) {
+      this.dataForm = { ...item }
+    },
+    onChose () {
+      this.$emit('onChose')
+    },
+    dataFormSubmit () {
+      this.$refs['dataForm'].validate((valid) => {
+        if (valid) {
+          this.$http({
+            url: this.$http.adornUrl(`/biz-service/disqualification/update`),
+            method: 'post',
+            data: this.$http.adornData({ ...this.dataForm, orgId: this.orgId })
+          }).then(({ data }) => {
+            if (data && data.code === '200') {
+              this.$message({
+                message: '操作成功',
+                type: 'success',
+                duration: 1500,
+                onClose: () => {
+                  this.onChose()
+                  this.$emit('refreshDataList')
+                }
+              })
+            } else {
+              this.$message.error(data.msg)
+            }
+          })
+        }
+      })
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+</style>

+ 67 - 0
src/views/modules/quality/disqualification-verify.vue

@@ -0,0 +1,67 @@
+<template>
+  <div>
+    <div class="my-title">验证</div>
+    <el-form
+      :model="dataForm"
+      :rules="dataRule"
+      ref="dataForm"
+      @keyup.enter.native="dataFormSubmit()"
+      label-width="130px"
+    ></el-form>
+    <span slot="footer" class="dialog-footer">
+      <el-button @click="onChose">取消</el-button>
+      <el-button type="primary" @click="dataFormSubmit()">确定</el-button>
+    </span>
+  </div>
+</template>
+
+<script>
+export default {
+  name: 'quality-disqualification-verify',
+  data () {
+    return {
+      dataForm: {},
+      dataRule: {}
+    }
+  },
+
+  mounted () {},
+
+  methods: {
+    init (item) {
+      this.dataForm = { ...item }
+    },
+    onChose () {
+      this.$emit('onChose')
+    },
+    dataFormSubmit () {
+      this.$refs['dataForm'].validate((valid) => {
+        if (valid) {
+          this.$http({
+            url: this.$http.adornUrl(`/biz-service/disqualification/updateVerify`),
+            method: 'post',
+            data: this.$http.adornData({ ...this.dataForm, orgId: this.orgId })
+          }).then(({ data }) => {
+            if (data && data.code === '200') {
+              this.$message({
+                message: '操作成功',
+                type: 'success',
+                duration: 1500,
+                onClose: () => {
+                  this.onChose()
+                  this.$emit('refreshDataList')
+                }
+              })
+            } else {
+              this.$message.error(data.msg)
+            }
+          })
+        }
+      })
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+</style>

+ 422 - 0
src/views/modules/quality/disqualification.vue

@@ -0,0 +1,422 @@
+<template>
+  <div>
+    <template v-if="!updateVisible && !disposeVisible && !verifyVisible">
+      <el-form :inline="true" :model="dataForm" @keyup.enter.native="search()">
+        <el-form-item label="物料名称">
+          <el-input
+            v-model="dataForm.productName"
+            placeholder="请输入物料名称"
+            clearable
+          />
+        </el-form-item>
+        <el-form-item label="生产批次号">
+          <el-input
+            v-model="dataForm.batchNumber"
+            placeholder="请输入批次号"
+            clearable
+          />
+        </el-form-item>
+        <el-form-item label="任务单编码">
+          <el-input
+            v-model="dataForm.orderCode"
+            placeholder="请输入任务单编码"
+            clearable
+          />
+        </el-form-item>
+        <el-form-item>
+          <el-button @click="search()">查询</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="invoicesCode"
+          header-align="center"
+          align="center"
+          :show-tooltip-when-overflow="true"
+          label="审理编码"
+        >
+        </el-table-column>
+        <el-table-column
+          prop="orderCode"
+          header-align="center"
+          align="center"
+          :show-tooltip-when-overflow="true"
+          label="任务单编码"
+        >
+        </el-table-column>
+         <el-table-column
+          prop="batchNumber"
+          header-align="center"
+          align="center"
+          :show-tooltip-when-overflow="true"
+          label="批次号"
+        >
+        </el-table-column>
+        <el-table-column
+          prop="productName"
+          header-align="center"
+          align="center"
+          :show-tooltip-when-overflow="true"
+          label="物料名称"
+        >
+        </el-table-column>
+        <el-table-column
+          prop="productNumber"
+          header-align="center"
+          align="center"
+          :show-tooltip-when-overflow="true"
+          label="生产编号"
+        >
+        </el-table-column>
+        <el-table-column
+          prop="techName"
+          header-align="center"
+          align="center"
+          :show-tooltip-when-overflow="true"
+          label="工艺名称"
+        >
+        </el-table-column>
+        <el-table-column
+          prop="nodeName"
+          header-align="center"
+          align="center"
+          :show-tooltip-when-overflow="true"
+          label="检验工序节点"
+        >
+        </el-table-column>
+        <el-table-column
+          prop="disqualificationNodeName"
+          header-align="center"
+          align="center"
+          :show-tooltip-when-overflow="true"
+          label="发生工序节点"
+        >
+        </el-table-column>
+        <el-table-column
+          prop="cnt"
+          header-align="center"
+          align="center"
+          :show-tooltip-when-overflow="true"
+          label="交检数量"
+        >
+        </el-table-column>
+        <el-table-column
+          prop="disqualificationCnt"
+          header-align="center"
+          align="center"
+          :show-tooltip-when-overflow="true"
+          label="不合格数量"
+        >
+        </el-table-column>
+        <el-table-column
+          prop="state"
+          header-align="center"
+          align="center"
+          :show-tooltip-when-overflow="true"
+          label="处理状态"
+        >
+        </el-table-column>
+        <el-table-column
+          prop="approver"
+          header-align="center"
+          align="center"
+          :show-tooltip-when-overflow="true"
+          label="当前审理人"
+        >
+        </el-table-column>
+        <el-table-column
+          prop="responsibleName"
+          header-align="center"
+          align="center"
+          :show-tooltip-when-overflow="true"
+          label="责任人"
+        >
+        </el-table-column>
+        <el-table-column
+          prop="disposeAnalyse"
+          header-align="center"
+          align="center"
+          :show-tooltip-when-overflow="true"
+          label="处理分析"
+        >
+        </el-table-column>
+        <el-table-column
+          prop="analyseName"
+          header-align="center"
+          align="center"
+          :show-tooltip-when-overflow="true"
+          label="处理分析人"
+        >
+        </el-table-column>
+        <el-table-column
+          prop="disposeMeasure"
+          header-align="center"
+          align="center"
+          :show-tooltip-when-overflow="true"
+          label="处置措施"
+        >
+        </el-table-column>
+        <el-table-column
+          prop="measureName"
+          header-align="center"
+          align="center"
+          :show-tooltip-when-overflow="true"
+          label="处置措施人"
+        >
+        </el-table-column>
+        <el-table-column
+          prop="verifyConclusion"
+          header-align="center"
+          align="center"
+          :show-tooltip-when-overflow="true"
+          label="验证结论"
+        >
+        </el-table-column>
+        <el-table-column
+          prop="verifyName"
+          header-align="center"
+          align="center"
+          :show-tooltip-when-overflow="true"
+          label="验证人"
+        >
+        </el-table-column>
+        <el-table-column
+          prop="creatorName"
+          header-align="center"
+          align="center"
+          :show-tooltip-when-overflow="true"
+          label="检验员"
+        >
+        </el-table-column>
+        <el-table-column
+          prop="createTime"
+          header-align="center"
+          align="center"
+          :show-tooltip-when-overflow="true"
+          label="检验时间"
+        >
+        </el-table-column>
+        <el-table-column
+          prop="approveState"
+          header-align="center"
+          align="center"
+          :show-tooltip-when-overflow="true"
+          label="审理评审状态"
+        >
+        </el-table-column>
+        <el-table-column
+          prop="reworkCnt"
+          header-align="center"
+          align="center"
+          :show-tooltip-when-overflow="true"
+          label="返工数量"
+        >
+        </el-table-column>
+        <el-table-column
+          prop="repairCnt"
+          header-align="center"
+          align="center"
+          :show-tooltip-when-overflow="true"
+          label="返修数量"
+        >
+        </el-table-column>
+        <el-table-column
+          prop="damageCnt"
+          header-align="center"
+          align="center"
+          :show-tooltip-when-overflow="true"
+          label="不合格/报损数量"
+        >
+        </el-table-column>
+        <el-table-column
+          prop="concessionCnt"
+          header-align="center"
+          align="center"
+          :show-tooltip-when-overflow="true"
+          label="让步接收数量"
+        >
+        </el-table-column>
+        <el-table-column
+          prop="releaseList"
+          header-align="center"
+          align="center"
+          :show-tooltip-when-overflow="true"
+          label="顾客放行表"
+        >
+        <template slot-scope="scope">
+            <el-button
+              :disabled="
+                !scope.row.releaseList || scope.row.releaseList.length === 0
+              "
+              type="text"
+              size="small"
+              @click="attachDetails(scope.row.releaseList)"
+              >查看</el-button
+            >
+          </template>
+        </el-table-column>
+        <el-table-column
+          prop="attachList"
+          header-align="center"
+          align="center"
+          :show-tooltip-when-overflow="true"
+          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
+          fixed="right"
+          header-align="center"
+          align="center"
+          width="150"
+          label="操作"
+        >
+          <template slot-scope="scope">
+            <el-button
+              v-if="isAuth('quality:disqualification:update')"
+              type="text"
+              size="small"
+              @click="updateHandle(scope.row)"
+              >编辑</el-button
+            >
+            <el-button
+              v-if="isAuth('quality:disqualification:updateDispose')"
+              type="text"
+              size="small"
+              @click="disposeHandle(scope.row)"
+              >处理</el-button
+            >
+            <el-button
+              v-if="isAuth('quality:disqualification:updateVerify')"
+              type="text"
+              size="small"
+              @click="verifyHandle(scope.row)"
+              >验证</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>
+    </template>
+    <quality-disqualification-update ref="update" v-if="updateVisible" @onChose="onChose" />
+    <quality-disqualification-dispose ref="dispose" v-if="disposeVisible" @onChose="onChose" />
+    <quality-disqualification-verify ref="verify" v-if="verifyVisible" @onChose="onChose" />
+  </div>
+</template>
+
+<script>
+import {getList} from '@/api/quality'
+import QualityDisqualificationUpdate from './disqualification-update'
+import QualityDisqualificationDispose from './disqualification-dispose'
+import QualityDisqualificationVerify from './disqualification-verify'
+export default {
+  name: 'quality-disqualification',
+  components: {QualityDisqualificationUpdate, QualityDisqualificationDispose, QualityDisqualificationVerify},
+  data () {
+    return {
+      updateVisible: false,
+      disposeVisible: false,
+      verifyVisible: false,
+      dataForm: {},
+      dataList: [{}],
+      pageIndex: 1,
+      pageSize: 10,
+      totalPage: 0,
+      dataListLoading: false
+    }
+  },
+  mounted () {},
+  methods: {
+    onChose () {
+      this.updateVisible = false
+      this.disposeVisible = false
+      this.verifyVisible = false
+    },
+    search () {
+      this.pageIndex = 1
+      this.getDataList()
+    },
+         // 每页数
+    sizeChangeHandle (val) {
+      this.pageSize = val
+      this.pageIndex = 1
+      this.getDataList()
+    },
+    // 当前页
+    currentChangeHandle (val) {
+      this.pageIndex = val
+      this.getDataList()
+    },
+    getDataList () {
+      this.dataListLoading = true
+      let param = {
+        current: this.pageIndex,
+        size: this.pageSize,
+        batchNumber: this.dataForm.batchNumber,
+        productName: this.dataForm.productName
+      }
+      getList(param).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
+      })
+    },
+    updateHandle (item) {
+      this.updateVisible = true
+      this.$nextTick(() => {
+        this.$refs.update.init(item)
+      })
+    },
+    disposeHandle (item) {
+      this.disposeVisible = true
+      this.$nextTick(() => {
+        this.$refs.dispose.init(item)
+      })
+    },
+    verifyHandle (item) {
+      this.verifyVisible = true
+      this.$nextTick(() => {
+        this.$refs.verify.init(item)
+      })
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+</style>

+ 1 - 1
src/views/modules/quality/first.vue

@@ -12,7 +12,7 @@
         <el-form-item label="生产批次号">
           <el-input
             v-model="dataForm.batchNumber"
-            placeholder="请输入号"
+            placeholder="请输入批次号"
             clearable
           />
         </el-form-item>

+ 1 - 0
src/views/modules/tech-manage/process-manage.vue

@@ -296,6 +296,7 @@ export default {
       this.getDataList()
     },
     getDataList () {
+      this.dataListLoading = true
       let param = {
         current: this.pageIndex,
         size: this.pageSize,