From 125b765551a31599e7e6f289ab722c28e98a8bfa Mon Sep 17 00:00:00 2001
From: zouyu <2723363702@qq.com>
Date: 星期三, 01 十一月 2023 20:25:47 +0800
Subject: [PATCH] Merge branch 'master' of http://114.132.189.42:9002/r/mes-ocea-before

---
 src/views/quality/processInspect/index.vue |  298 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 298 insertions(+), 0 deletions(-)

diff --git a/src/views/quality/processInspect/index.vue b/src/views/quality/processInspect/index.vue
new file mode 100644
index 0000000..fdc05d8
--- /dev/null
+++ b/src/views/quality/processInspect/index.vue
@@ -0,0 +1,298 @@
+<template>
+	<div class="content-main">
+		<div class="rawPage">
+            <basic-container>
+                <ttable 
+                :table="table"
+                @handleSelectionChange="handleSelectionChange"
+                :prelang="prelang"
+                :options="options"
+                :ajaxFun="ajaxFun"
+                ref="processInspect">
+                <template #toolbar></template>
+                </ttable>
+            </basic-container>
+		</div>
+	</div>
+</template>
+
+<script>
+    import ttable from '@/views/common/ztt-table.vue'
+    import * as fecha from 'element-ui/lib/utils/date'
+	import processInspectForm from './processInspect-form'
+    import { page,deleteById } from '@/api/quality/processInspect'
+	export default {
+		components: {
+			processInspectForm,
+            ttable
+		},
+		data() {
+			return {
+                result:[{label:'鍏ㄩ儴',value: ''},{label:'鍚堟牸',value: '1'},{label:'涓嶅悎鏍�',value: '0'}],
+                type: [1],
+                prelang: 'processInspect',
+                ajaxFun: page,
+                options: {
+                    height: 300, // 榛樿楂樺害-涓轰簡琛ㄥご鍥哄畾
+                    stripe: true, // 鏄惁涓烘枒椹汗 table
+                    highlightCurrentRow: false, // 鏄惁瑕侀珮浜綋鍓嶈
+                    border: true, // 鏄惁鏈夌旱鍚戣竟妗�
+                    lazy: false, // 鏄惁闇�瑕佹噿鍔犺浇
+                    fit: true, // 鍒楃殑瀹藉害鏄惁鑷拺寮�
+                    multiSelect: true, //
+                    seqNo: true,
+                    isRefresh: true, // 鏄惁鏄剧ず鍒锋柊鎸夐挳
+                    isShowHide: true, // 鏄惁鏄剧ず鏄惧奖鎸夐挳H
+                    isSearch: true, // 楂樼骇鏌ヨ鎸夐挳
+                    defaultOrderBy: { column: 'createTime', direction: 'desc' },
+                },
+                table: {
+                    total: 0,
+                    currentPage: 1,
+                    pageSize: 20,
+                    data: [],
+                    // 鏍囬
+                    column: [
+                        {
+                            minWidth: '120',
+                            prop: 'orderNumber',
+                            label: '璁㈠崟缂栧彿',
+                            isTrue: true,
+                            isSearch: true,
+                            searchInfoType: 'text',
+                            render: { fun: this.addOrUpdateHandle }
+                        },
+                        {
+                            minWidth: '120',
+                            prop: 'material',
+                            label: '浜у搧鍚嶇О',
+                            isTrue: true,
+                            isSearch: true,
+                            searchInfoType: 'text'
+                        },
+                        {
+                            minWidth: '130',
+                            width: '150',
+                            prop: 'specs',
+                            label: '瑙勬牸鍨嬪彿',
+                            sort: true,
+                            isTrue: true,
+                            isSearch: true,
+                            searchInfoType: 'text',
+                        },
+                        {
+                            minWidth: '120',
+                            prop: 'operaName',
+                            label: '宸ュ簭',
+                            isTrue: true,
+                            isSearch: true,
+                            searchInfoType: 'text'
+                        },
+                        {
+                            minWidth: '120',
+                            prop: 'unit',
+                            label: '鍗曚綅',
+                            isTrue: true,
+                            isSearch: true,
+                            searchInfoType: 'text'
+                        },
+                        {
+                            minWidth: '120',
+                            prop: 'quantity',
+                            label: '鏁伴噺',
+                            isTrue: true,
+                            isSearch: true,
+                            searchInfoType: 'text'
+                        },
+                        {
+                            minWidth: '120',
+                            prop: 'createTime',
+                            label: '鎶ユ鏃ユ湡',
+                            sort: true,
+                            isTrue: true,
+                            isSearch: true,
+                            searchInfoType: 'datetimerange',
+                            formatter: this.formatDateTime,
+                        },
+                        {
+                            minWidth: '120',
+                            prop: 'createUser',
+                            label: '鎶ユ浜�',
+                            isTrue: true,
+                            isSearch: true,
+                            searchInfoType: 'text'
+                        },
+                        {
+                            minWidth: '120',
+                            prop: 'updateTime',
+                            label: '妫�娴嬫棩鏈�',
+                            sort: true,
+                            isTrue: true,
+                            isSearch: true,
+                            searchInfoType: 'datetimerange',
+                            formatter: this.formatDateTime,
+                        },
+                        {
+                            minWidth: '120',
+                            prop: 'result',
+                            label: '鍚堟牸鐘舵��',
+                            isTrue: true,
+                            isSearch: true,
+                            searchInfoType: 'select',
+                            formatter: this.formatResult,
+                            optList: () => {
+                                return this.result
+                            }
+                        },
+                    ],
+                    toolbar: [
+                    {
+                        text: '鏂板',
+                        type: 'primary',
+                        fun: this.addOrUpdateHandle
+                    },
+                    {
+                        text: '瀵煎嚭',
+                    }
+                    ],
+                    operator: [{
+                        text: '浣滃簾',
+                        type: 'text',
+                        size: 'small',
+                        fun: this.deleteHandle
+                    }],
+                    operatorConfig: {
+                    fixed: 'right',
+                    label: '鎿嶄綔',
+                    width: 100,
+                    minWidth: 100
+                    },
+                },
+			}
+		},
+		created() { },
+		methods: {
+			deleteHandle(row){
+				this.$confirm('纭鍒犻櫎璇ユ暟鎹悧锛�', '鎻愮ず', {
+				confirmButtonText: '纭畾',
+				cancelButtonText: '鍙栨秷',
+				type: 'warning',
+				}).then(()=>{
+					deleteById(row.id).then(res=>{
+						if(res.data.code == 0){
+							this.$message.success("鍒犻櫎鎴愬姛")
+						}else{
+							this.$message.error("鍒犻櫎澶辫触")
+						}
+						this.getData()
+					})
+				})
+			},
+			// 鏂板 / 淇敼
+			addOrUpdateHandle(row) {
+				this.$router.push({
+					name: 'processInspectForm',
+					query: { id: row == null ? null : row.id,resultVal : row == null ? null : row.result },
+				})
+			},
+            formatResult(row, column, cellValue){
+                if(cellValue != undefined || cellValue != null){
+                    if(cellValue == 0){
+                        return "<span style='color:#E84738;'>涓嶅悎鏍�</span>"
+                    }else if(cellValue == 1){
+                        return "<span style='color:#34BD66;'>鍚堟牸</span>"
+                    }
+                }
+            },
+            formatDateTime(row, column, cellValue) {
+                return cellValue ? fecha.format(new Date(cellValue), 'yyyy-MM-dd') : ''
+            },
+            handleSelectionChange(){ },
+			getData() {
+				this.$refs.processInspect.getDataList()
+			},
+		}
+
+	}
+</script>
+
+<style scope="scope">
+	.title {
+		padding: 12px;
+
+	}
+
+	.nav {
+		display: flex;
+		padding: 20px 20px;
+		align-items: center;
+		background-color: #fff;
+	}
+
+	.nav * {
+		font-size: 14px;
+	}
+
+	.content-body {
+		background-color: #fff;
+		overflow: hidden;
+		margin-top: 12px;
+	}
+
+	.inspectionTable {
+		padding: 20px 20px;
+	}
+
+	.pagination {
+		float: right;
+		margin-right: 20px;
+	}
+
+	.newPage {
+		overflow: hidden;
+	}
+
+	.header {
+		padding: 12px;
+	}
+
+	.addInspectionform {
+		background-color: #fff;
+	}
+
+	.addInspectionform .formwrapper {
+		padding: 20px 0px;
+		margin-left: 100px;
+	}
+
+	.inspectionProject span {
+		display: block;
+		padding: 5px 0px;
+	}
+
+	.inspectionProject .el-table {
+		background-color: #fff;
+		padding: 10px 12px;
+	}
+
+	.inspectionResult span {
+		display: block;
+		padding: 5px 0px;
+	}
+
+	.inspectionResult .el-table {
+		background-color: #fff;
+		padding: 10px 12px;
+	}
+
+	.rawPage {
+		height: 100%;
+		display: flex;
+		flex-direction: column;
+		overflow-y: scroll;
+	}
+
+	.rawPage .content-body {
+		flex: 1;
+	}
+</style>
\ No newline at end of file

--
Gitblit v1.9.3