From 904710d226d8dd5253937cbd572ca208be804ea5 Mon Sep 17 00:00:00 2001
From: spring <2396852758@qq.com>
Date: 星期三, 26 二月 2025 17:10:28 +0800
Subject: [PATCH] Merge branch 'dev' of http://114.132.189.42:9002/r/lims-ruoyi-before into dev
---
src/api/cnas/externalService/serviceAndSupplyPro/serviceAndSupplyPro.js | 10
/dev/null | 89 --
src/views/CNAS/resourceDemand/standardMaterialAccept/component/AddRecord.vue | 16
src/views/CNAS/externalService/serviceAndSupplyPro/component/CardPanel.vue | 74 ++
src/api/cnas/process/demand/demand.js | 104 +-
src/views/CNAS/externalService/serviceAndSupplyPro/component/ConsumableOverview.vue | 121 +++
src/views/CNAS/externalService/serviceAndSupplyPro/component/index.vue | 71 ++
src/views/CNAS/process/demand/index.vue | 878 ++++++++++++++++++++++----
src/views/CNAS/resourceDemand/standardMaterialAccept/index.vue | 29
src/views/CNAS/externalService/serviceAndSupplyPro/index.vue | 178 +++++
src/views/CNAS/resourceDemand/standardMaterialAccept/component/Step1.vue | 393 +++++------
src/api/cnas/resourceDemand/standardMaterialAccept/standardMaterialAccept.js | 12
12 files changed, 1,456 insertions(+), 519 deletions(-)
diff --git a/src/api/cnas/externalService/serviceAndSupplyPro/serviceAndSupplyPro.js b/src/api/cnas/externalService/serviceAndSupplyPro/serviceAndSupplyPro.js
new file mode 100644
index 0000000..890fb4e
--- /dev/null
+++ b/src/api/cnas/externalService/serviceAndSupplyPro/serviceAndSupplyPro.js
@@ -0,0 +1,10 @@
+import request from '@/utils/request'
+
+// 鏈嶅姟鍜屼緵搴斿搧閲囪喘
+export function procurementSuppliesList(query) {
+ return request({
+ url: '/procurementSuppliesList/procurementSuppliesList',
+ method: 'get',
+ params: query
+ })
+}
diff --git a/src/api/cnas/process/demand/demand.js b/src/api/cnas/process/demand/demand.js
index 5ab8327..8d007c1 100644
--- a/src/api/cnas/process/demand/demand.js
+++ b/src/api/cnas/process/demand/demand.js
@@ -6,55 +6,67 @@
import request from "@/utils/request";
// 濮旀墭鍗曟楠屽垎椤垫煡璇�
-export const getInspectionOrder = (params) => {
- return request({
- url: "/inspectionOrder/pageInspectionOrder",
- method: "get",
- params: params
- })
+export function pageInspectionOrder(query) {
+ return request({
+ url: '/inspectionOrder/pageInspectionOrder',
+ method: 'get',
+ params: query
+ })
}
-
+// 濮旀墭鍗曟煡璇㈡垚鍝佽鍗�
+export function getInsOrderOnInspection(query) {
+ return request({
+ url: '/inspectionOrder/getInsOrderOnInspection',
+ method: 'get',
+ params: query
+ })
+}
+// 濮旀墭鍗曟楠屾柊澧�
+export function addInspectionOrder(query) {
+ return request({
+ url: '/inspectionOrder/addInspectionOrder',
+ method: 'post',
+ data: query
+ })
+}
+// 濮旀墭鍗曟楠屼慨鏀�
+export function updateInspectionOrder(query) {
+ return request({
+ url: '/inspectionOrder/updateInspectionOrder',
+ method: 'post',
+ data: query
+ })
+}
// 鏂板鏃舵牴鎹垚鍝佽鍗曟煡璇㈠鎵樺崟璇︽儏
-export const getInspectionOrderByInsOderId = (params) => {
- return request({
- url: "/inspectionOrder/getInspectionOrderByInsOderId",
- method: "get",
- params: params
- })
+export function getInspectionOrderByInsOderId(query) {
+ return request({
+ url: '/inspectionOrder/getInspectionOrderByInsOderId',
+ method: 'get',
+ params: query
+ })
}
-
-// 鏌ヨ鍙柊澧炵殑妫�楠屽崟
-export const getInsOrderOnInspection = (data) => {
- return request({
- url: "/inspectionOrder/getInsOrderOnInspection",
- method: "post",
- data: data
- })
+// 濮旀墭鍗曟楠屾煡鐪嬭鎯�
+export function getInspectionOrderOne(query) {
+ return request({
+ url: '/inspectionOrder/getInspectionOrderOne',
+ method: 'get',
+ params: query
+ })
}
-
-// 鏌ョ湅濮旀墭鍗曡鎯�
-export const getInspectionOrderOne = (params) => {
- return request({
- url: "/inspectionOrder/getInspectionOrderOne",
- method: "get",
- params: params
- })
+// 濮旀墭鍗曟楠屽垹闄�
+export function delInspectionOrder(query) {
+ return request({
+ url: '/inspectionOrder/delInspectionOrder',
+ method: 'get',
+ params: query
+ })
}
-
-// 鏂板妫�楠屽崟
-export const addInspectionOrder = (data) => {
- return request({
- url: "/inspectionOrder/addInspectionOrder",
- method: "post",
- data: data
- })
+// 濮旀墭鍗曟楠屽垹闄�
+export function exportInspectionOrder(query) {
+ return request({
+ url: '/inspectionOrder/exportInspectionOrder',
+ method: 'get',
+ params: query,
+ responseType: 'blob'
+ })
}
-
-// 缂栬緫妫�楠屽崟
-export const editInspectionOrder = (data) => {
- return request({
- url: "/inspectionOrder/editInspectionOrder",
- method: "post",
- data: data
- })
-}
\ No newline at end of file
diff --git a/src/api/cnas/resourceDemand/standardMaterialAccept/standardMaterialAccept.js b/src/api/cnas/resourceDemand/standardMaterialAccept/standardMaterialAccept.js
index 707631a..010c461 100644
--- a/src/api/cnas/resourceDemand/standardMaterialAccept/standardMaterialAccept.js
+++ b/src/api/cnas/resourceDemand/standardMaterialAccept/standardMaterialAccept.js
@@ -24,6 +24,18 @@
})
}
+/**
+ * @desc 鏍囧噯鐗╄川娓呭崟
+ */
+export function getStandardSubstanceAll(query) {
+ return request({
+ url: '/feStandardSubstance/getStandardSubstanceAll',
+ method: 'get',
+ params: query
+ })
+}
+
+
diff --git a/src/views/CNAS/externalService/serviceAndSupplyPro/component/CardPanel.vue b/src/views/CNAS/externalService/serviceAndSupplyPro/component/CardPanel.vue
new file mode 100644
index 0000000..ec4034f
--- /dev/null
+++ b/src/views/CNAS/externalService/serviceAndSupplyPro/component/CardPanel.vue
@@ -0,0 +1,74 @@
+<template>
+ <div class="card-container" @click="handleCard">
+ <div class="card-panel" :class="[isActive == index ? 'isActive' : '']">
+ <el-image
+ style="width: 80%; height: 140px"
+ :src="javaApi + '/img/' + data.logo"
+ fit="fill"
+ />
+ </div>
+ <div class="title">
+ {{ data.supplierRef }}
+ </div>
+ </div>
+</template>
+<script>
+
+export default {
+ props: {
+ data: {
+ type: Object,
+ default: () => {}
+ },
+ index: {
+ type: Number,
+ default: -1
+ },
+ isActive: {
+ type: Number,
+ default: -1
+ }
+ },
+ data(){
+ return {
+
+ }
+ },
+ mounted() {
+ // console.log(1111,this.data)
+ },
+ methods: {
+ handleCard() {
+ this.$emit('handleCard', this.data, this.index)
+ }
+ }
+}
+</script>
+<style scoped>
+.card-container {
+ margin: 10px 10px 10px 0;
+ text-align: center;
+}
+.card-panel {
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ width: 90%;
+ height: 180px;
+ box-shadow: 0px 0px 20px 0px #0000001A;
+ cursor: pointer;
+ border-radius: 5px;
+ border: 1px solid transparent;
+}
+.card-panel:hover {
+ border: 1px solid #409EFF;
+ background: #1D56C50D;
+}
+.isActive {
+ border: 1px solid #409EFF;
+ background: #1D56C50D;
+}
+.title {
+ margin-top: 15px;
+}
+</style>
diff --git a/src/views/CNAS/externalService/serviceAndSupplyPro/component/ConsumableOverview.vue b/src/views/CNAS/externalService/serviceAndSupplyPro/component/ConsumableOverview.vue
new file mode 100644
index 0000000..6c465f3
--- /dev/null
+++ b/src/views/CNAS/externalService/serviceAndSupplyPro/component/ConsumableOverview.vue
@@ -0,0 +1,121 @@
+<template>
+ <div>
+ <el-row class="card-box">
+ <el-col :span="4" v-for="(item, index) in cardList" :key="index">
+ <CardPanel
+ :isActive="isActive"
+ :data="item"
+ :index="index"
+ @handleCard="handleCard"
+ />
+ </el-col>
+ <el-col :span="24" v-if="cardList.length==0" style="color: #909399;font-size: 14px;text-align: center;margin-top: 20px;">鏆傛棤鏁版嵁</el-col>
+ </el-row>
+ <TableCard title="鑰楁潗淇℃伅" :showForm="false" style="margin-top: 5px">
+ <template v-slot:table>
+ <limsTable
+ style="margin-top: 18px; padding: 0 15px;"
+ :height="'20vh'"
+ :column="columns"
+ :table-data="tableData"
+ >
+ </limsTable>
+ </template>
+ </TableCard>
+ </div>
+</template>
+<script>
+import CardPanel from './CardPanel.vue';
+import TableCard from './index.vue';
+import { procurementSuppliesList } from "@/api/cnas/externalService/serviceAndSupplyPro/serviceAndSupplyPro"
+import limsTable from '@/components/Table/lims-table.vue'
+import axios from "axios";
+
+export default {
+ components: { CardPanel, TableCard, limsTable },
+ props: {
+ contentsId: {
+ type: Number,
+ default: 0
+ }
+ },
+ data() {
+ return {
+ isActive: -1,
+ columns: [
+ {
+ label: "鑰楁潗缂栧彿",
+ prop: "itemNumber"
+ },
+ {
+ label: "鑰楁潗鍚嶇О",
+ prop: "consumablesName"
+ },
+ {
+ label: "鑰楁潗绫诲瀷",
+ prop: "consumablesType"
+ },
+ {
+ label: "瑙勬牸",
+ prop: "specifications"
+ },
+ {
+ label: "鍗曚綅",
+ prop: "unit"
+ },
+ {
+ label: "鍗曚环",
+ prop: "referencePrice"
+ },
+ {
+ label: "褰撳墠搴撳瓨",
+ prop: "currentAmount"
+ },
+ {
+ label: "璐熻矗浜�",
+ prop: "personInChargeName"
+ },
+ {
+ label: "涓婃鏇存柊鏃堕棿",
+ prop: "updateTime"
+ }
+ ],
+ cardList: [],
+ tableData: []
+ }
+ },
+ watch: {
+ contentsId(newVal, oldVal) {
+ this.getTableData(newVal)
+ }
+ },
+ mounted() {
+ this.getTableData(this.contentsId)
+ },
+ methods: {
+ handleCard(data, index) {
+ this.isActive = index
+ this.tableData = [data]
+ },
+ async getTableData(id) {
+ procurementSuppliesList({contentsId: id}).then(res => {
+ if(res.code == 200) {
+ this.cardList = res.data.records.map(m=>{
+ m.logo = m.consumablesIcon
+ return m
+ })
+ }
+ })
+ }
+ }
+}
+</script>
+<style scoped>
+.card-box {
+ width: 100%;
+ padding-left: 5px;
+ padding-right: 5px;
+ height: 30vh;
+ overflow-y: auto;
+}
+</style>
diff --git a/src/views/CNAS/externalService/serviceAndSupplyPro/component/index.vue b/src/views/CNAS/externalService/serviceAndSupplyPro/component/index.vue
new file mode 100644
index 0000000..67f98a5
--- /dev/null
+++ b/src/views/CNAS/externalService/serviceAndSupplyPro/component/index.vue
@@ -0,0 +1,71 @@
+<template>
+ <div class="table_card">
+ <div v-if="showTitle" class="title">
+ <span style="font-weight: bold">{{ title }}</span>
+ </div>
+ <div>
+ <slot name="tab"></slot>
+ </div>
+ <div v-if="showForm" class="table_card_form">
+ <slot name="form"></slot>
+ </div>
+ <div>
+ <slot name="table"></slot>
+ </div>
+ </div>
+</template>
+<script>
+export default {
+ props: {
+ title: {
+ type: String,
+ default: '鏍囬'
+ },
+ showTitle: {
+ type: Boolean,
+ default: true
+ },
+ showForm: {
+ type: Boolean,
+ default: true
+ }
+ },
+ data() {
+ return {};
+ }
+};
+</script>
+<style scoped>
+.table_card {
+ text-align: left;
+}
+
+.title {
+ position: relative;
+ font-size: 18px;
+ color: #333;
+ font-weight: 400;
+ padding-left: 10px;
+ margin-left: 15px;
+}
+
+.title::before {
+ position: absolute;
+ left: 0;
+ top: 4px;
+ content: '';
+ width: 4px;
+ height: 18px;
+ background-color: #3A7BFA;
+ border-radius: 2px;
+}
+
+.table_card_form {
+ display: flex;
+ justify-content: space-between;
+ height: 34px;
+ padding: 0 15px;
+ margin-bottom: 10px;
+}
+
+</style>
diff --git a/src/views/CNAS/externalService/serviceAndSupplyPro/index.vue b/src/views/CNAS/externalService/serviceAndSupplyPro/index.vue
new file mode 100644
index 0000000..836d07a
--- /dev/null
+++ b/src/views/CNAS/externalService/serviceAndSupplyPro/index.vue
@@ -0,0 +1,178 @@
+<template>
+ <div class="purchase-page">
+ <div class="purchase-left">
+ <el-input
+ v-model="form.nodeName"
+ placeholder="璇疯緭鍏ヨ妭鐐瑰悕绉�"
+ suffix-icon="el-icon-search"
+ size="small"
+ clearable
+ @keyup.enter.native="searchFilter(treeData)"
+ @blur="searchFilter(treeData)"
+ @clear="searchFilter(treeData)"
+ >
+ </el-input>
+ <el-tree
+ ref="tree"
+ :data="treeData"
+ :props="defaultProps"
+ @node-click="handleNodeClick"
+ :default-expanded-keys="expandedKeys"
+ node-key="id"
+ >
+ </el-tree>
+ </div>
+ <div class="purchase-right">
+ <el-tabs v-model="activeName" @tab-click="handleClick">
+ <el-tab-pane label="鑰楁潗鎬昏" name="first" :lazy="true">
+ <ConsumableOverview v-if="activeName == 'first'" :contentsId="contentsId"></ConsumableOverview>
+ </el-tab-pane>
+<!-- <el-tab-pane label="鑰楁潗鍒楄〃" name="second" :lazy="true">-->
+<!-- <ConsumableList v-if="activeName == 'second'" :contentsId="contentsId"></ConsumableList>-->
+<!-- </el-tab-pane>-->
+<!-- <el-tab-pane label="鑰楁潗鍏ュ簱" name="third" :lazy="true">-->
+<!-- <Store v-if="activeName == 'third'" :contentsId="contentsId"></Store>-->
+<!-- </el-tab-pane>-->
+<!-- <el-tab-pane label="鐩綍缁存姢" name="fourth" :lazy="true">-->
+<!-- <Contents-->
+<!-- v-if="activeName == 'fourth'"-->
+<!-- :id="contentsId"-->
+<!-- @contentsUpdate="contentsUpdate"-->
+<!-- :treeData="treeData"-->
+<!-- from="鑰楁潗鏍�"-->
+<!-- ></Contents>-->
+<!-- </el-tab-pane>-->
+ </el-tabs>
+ </div>
+ </div>
+</template>
+<script>
+// import Contents from "@/components/do/a6.service-and-supply-purchase/contents.vue";
+// import Store from "@/components/do/a6.service-and-supply-purchase/store.vue";
+import ConsumableOverview from "../serviceAndSupplyPro/component/ConsumableOverview.vue";
+// import ConsumableList from "@/components/do/a6.service-and-supply-purchase/ConsumableList.vue"
+
+export default {
+ data() {
+ return {
+ tabsKey: 0,
+ contentsId: 0,
+ activeName: "first",
+ form: {
+ nodeName: "",
+ },
+ treeData: [],
+ expandedKeys: [],
+ defaultProps: {
+ children: "children",
+ label: "nodeName",
+ },
+ };
+ },
+ components: {
+ // Contents,
+ // Store,
+ ConsumableOverview
+ // ConsumableList
+ },
+ watch: {
+ contentsId(newVal, oldVal) {
+ if(newVal != oldVal) {
+ this.tabsKey = Math.random();
+ }
+ }
+ },
+ methods: {
+ searchFilter() {
+ this.treeData = JSON.parse(JSON.stringify(this.treeData));
+ this.expandedKeys = [];
+ if(this.form.nodeName == "") {
+ return;
+ }
+ const findNodesWithFiber = (nodes) => {
+ nodes.forEach((node) => {
+ if (node.nodeName && node.nodeName.includes(this.form.nodeName)) {
+ this.expandedKeys.push(node.id);
+ }
+ if (node.children && node.children.length > 0) {
+ findNodesWithFiber(node.children);
+ }
+ });
+ };
+ findNodesWithFiber(this.treeData);
+ },
+
+ // 鐩綍缁存姢鏇存柊
+ contentsUpdate(val, flag = false) {
+ if (val) {
+ this.getTreeData();
+ this.expandedKeys = [];
+ if (flag) {
+ const findNodesWithFiber = (nodes) => {
+ nodes.forEach((item) => {
+ if (item.parentId == val) {
+ this.expandedKeys.push(item.id);
+ }
+ if(item.children && item.children.length > 0) {
+ findNodesWithFiber(item.children);
+ }
+ });
+ };
+ findNodesWithFiber(this.treeData);
+ this.expandedKeys = this.expandedKeys.filter((item) => item !== val);
+ } else {
+ this.expandedKeys.push(val);
+ }
+ }else {
+ this.getTreeData();
+ }
+ },
+ // 鏌ヨ鎵�鏈夌洰褰�
+ getTreeData() {
+ this.$axios
+ .get(this.$api.procurementSuppliesContents.directoryListing)
+ .then((res) => {
+ this.treeData = res.data;
+ });
+ },
+ // 鐐瑰嚮鏍戣妭鐐�
+ handleNodeClick(data) {
+ this.contentsId = data.id;
+ },
+ handleClick(tab, event) {
+ console.log(tab, event);
+ },
+ },
+ created() {
+ this.getTreeData();
+ },
+};
+</script>
+
+<style scoped>
+.purchase-left {
+ width: 250px;
+ height: 100%;
+ background: #fff;
+ margin-right: 10px;
+ border-radius: 16px;
+ box-sizing: border-box;
+ padding: 10px 16px;
+ flex-shrink: 0;
+}
+.purchase-right {
+ background: #fff;
+ width: calc(100% - 15em);
+ height: 100%;
+ border-radius: 16px;
+ box-sizing: border-box;
+ padding: 10px 16px;
+}
+.purchase-page {
+ display: flex;
+ padding-top: 10px;
+ padding-bottom: 10px;
+ box-sizing: border-box;
+ width: 100%;
+}
+</style>
diff --git a/src/views/CNAS/process/demand/AddContracts.vue b/src/views/CNAS/process/demand/AddContracts.vue
deleted file mode 100644
index 22fd026..0000000
--- a/src/views/CNAS/process/demand/AddContracts.vue
+++ /dev/null
@@ -1,465 +0,0 @@
-<template>
- <el-dialog :title="title" :visible.sync="visible" width="1200px">
- <div id="dialogBody">
- <div style="max-height: 75vh;overflow-y: auto;">
- <div id="dialogBody">
- <table border="1" cellpadding="10" class="tables heads">
- <tr>
- <td rowspan="2">
- <img alt="" :src="ZTTLogo" style="width: 80%;">
- </td>
- <td>
- <p>璁板綍鍚嶇О锛氭楠屽鎵樺崟</p>
- </td>
- <td>
- <p>淇濆瓨鏈熼檺锛�6骞�</p>
- </td>
- </tr>
- <tr>
- <td>
- <p>璁板綍缂栧彿锛� ZTT/QR-16-04-a</p>
- </td>
- <td>
- <p>褰掓。閮ㄩ棬锛氱患鍚堝</p>
- </td>
- </tr>
- </table>
- <h4 class="table_h4">
- 妫� 楠� 濮� 鎵� 鍗�
- </h4>
- <p
- v-if="operationType !== 'view'"
- style="margin-left: 560px;display: flex;align-items: center">
- <span style="width: 100px">濮旀墭缂栧彿锛�</span>
- <el-input clearable size="small"></el-input>
- </p>
- <p v-else style="margin-top: 16px;margin-left: 600px;">
- 濮旀墭缂栧彿锛歿{ currentInfo.entrustCode }}
- </p>
- <table border="1" cellpadding="10" class="tables">
- <tr>
- <td colspan="2">
- <p>璇曟牱鍚嶇О</p>
- </td>
- <td >
- <el-input v-if="operationType !== 'view'" v-model="currentInfo.sampleName" clearable size="small"></el-input>
- <span v-else>{{ currentInfo.sampleName }}</span>
- </td>
- <td>
- <p>濮旀墭鏃堕棿</p>
- </td>
- <td>
- <el-date-picker
- v-if="operationType !== 'view'"
- v-model="currentInfo.commissionDate"
- clearable
- format="yyyy-MM-dd"
- placeholder="閫夋嫨鏃ユ湡"
- size="small"
- style="width: 100%"
- type="date"
- value-format="yyyy-MM-dd">
- </el-date-picker>
- <span v-else>{{ currentInfo.commissionDate }}</span>
- </td>
- </tr>
- <tr>
- <td colspan="2">
- <p>鍨� 鍙�</p>
- </td>
- <td>
- <el-input v-if="operationType !== 'view'" v-model="currentInfo.modelNo" clearable size="small"></el-input>
- <span v-else>{{ currentInfo.modelNo }}</span>
- </td>
- <td>
- <p>濮旀墭鍗曚綅</p>
- </td>
- <td>
- <el-input v-if="operationType !== 'view'" v-model="currentInfo.commissionUnit" clearable size="small"></el-input>
- <span v-else>{{ currentInfo.commissionUnit }}</span>
- </td>
- </tr>
- <tr>
- <td colspan="2">
- <p>鐢熶骇鍗曚綅</p>
- </td>
- <td>
- <el-input v-if="operationType !== 'view'" v-model="currentInfo.production" clearable size="small"></el-input>
- <span v-else>{{ currentInfo.production }}</span>
- </td>
- <td>
- <p>濮旀墭浜�</p>
- </td>
- <td>
- <el-input v-if="operationType !== 'view'" v-model="currentInfo.commissionUser" clearable size="small"></el-input>
- <span v-else>{{ currentInfo.commissionUser }}</span>
- </td>
- </tr>
- <tr>
- <td colspan="2">
- <p>鏍峰搧鏁伴噺</p>
- </td>
- <td>
- <el-input v-if="operationType !== 'view'" v-model="currentInfo.quantity" clearable size="small"></el-input>
- <span v-else>{{ currentInfo.quantity }}</span>
- </td>
- <td>
- <p>鏍峰搧鐘舵��</p>
- </td>
- <td>
- <el-input v-if="operationType !== 'view'" v-model="currentInfo.sampleStatus" clearable size="small"></el-input>
- <span v-else>{{ insStateList.find(m=>m.value==currentInfo.sampleStatus)?insStateList.find(m=>m.value==currentInfo.sampleStatus).label:'/' }}</span>
- </td>
- </tr>
- <tr>
- <td colspan="2">
- <p>鏄惁鐣欐牱</p>
- </td>
- <td>
- <el-radio-group
- v-if="operationType !== 'view'"
- v-model="currentInfo.isLeave"
- >
- <el-radio :label="1">鏄�</el-radio>
- <el-radio :label="0">鍚�</el-radio>
- </el-radio-group>
- <div v-else>
- <span v-if="currentInfo.isLeave==1">鏄�</span>
- <span v-else>鍚�</span>
- </div>
- </td>
- <td>
- <p>鏍峰搧澶勭悊鏂瑰紡</p>
- </td>
- <td v-if="operationType !== 'view'">
- <el-radio-group v-model="currentInfo.processing">
- <el-radio :label="0">濮旀墭鍗曚綅鍙栧洖</el-radio>
- <el-radio :label="1">瀹為獙瀹ゅ鐞�</el-radio>
- </el-radio-group>
- </td>
- <td v-else>
- <span v-if="currentInfo.processing==0">濮旀墭鍗曚綅鍙栧洖</span>
- <span v-else>瀹為獙瀹ゅ鐞�</span>
- </td>
- </tr>
- <tr>
- <td colspan="2">
- <p>绾﹀畾瀹屾垚鏃堕棿(鎶ュ憡鏃ユ湡)</p>
- </td>
- <td>
- <el-date-picker
- v-if="operationType !== 'view'"
- v-model="currentInfo.appointed"
- clearable
- format="yyyy-MM-dd"
- placeholder="閫夋嫨鏃ユ湡"
- size="small"
- style="width: 100%"
- type="date"
- value-format="yyyy-MM-dd">
- </el-date-picker>
- <span v-else>
- {{ currentInfo.appointed }}
- </span>
- </td>
- <td>
- <p>鎶ュ憡鍙戦�佹柟寮�</p>
- </td>
- <td >
- <el-radio-group
- v-if="operationType !== 'view'"
- v-model="currentInfo.send"
- >
- <el-radio :label="1">鑷彇</el-radio>
- <el-radio :label="0">鍏朵粬</el-radio>
- </el-radio-group>
- <div v-else>
- <span v-if="currentInfo.send==1">鑷彇</span>
- <span v-else>鍏朵粬</span>
- </div>
- </td>
- </tr>
- <el-button class="add_btn" size="small" type="primary" @click="addOrderDetailList">娣诲姞</el-button>
- <tr>
- <td>
- <p>搴忓彿</p>
- </td>
- <td>
- <p>鏍峰搧缂栧彿</p>
- </td>
- <td>
- <p>璇曢獙椤圭洰</p>
- </td>
- <td>
- <p>妫�楠屼緷鎹�</p>
- </td>
- <td>
- <p>澶囨敞</p>
- </td>
- </tr>
- <tr v-for="(item,index) in currentInfo.orderDetailList" :key="index" >
- <td>{{ index+1 }}</td>
- <td>
- <el-input v-if="operationType !== 'view'" v-model="item.sampleNumber" clearable size="small"></el-input>
- <span v-else>{{ item.sampleNumber }}</span>
- </td>
- <td>
- <el-input v-if="operationType !== 'view'"v-model="item.testItem" clearable size="small"></el-input>
- <span v-else>{{ item.testItem }}</span>
- </td>
- <td>
- <el-input v-if="operationType !== 'view'" v-model="item.testStandard" clearable size="small"></el-input>
- <span v-else>{{ item.testStandard }}</span>
- </td>
- <td>
- <el-input v-if="operationType !== 'view'" v-model="item.remark" clearable size="small"></el-input>
- <span v-else>{{ item.remark }}</span>
- </td>
- </tr>
- <tr>
- <td colspan="2">
- <p>鍒ゅ畾瑙勫垯</p>
- </td>
- <td v-if="operationType !== 'view'" colspan="3">
- <el-radio-group v-model="currentInfo.criterionRule">
- <el-radio :label="0">涓嶈�冭檻涓嶇‘瀹氬害</el-radio>
- <el-radio :label="1">鑰冭檻涓嶇‘瀹氬害</el-radio>
- </el-radio-group>
- <span v-if="currentInfo.criterionRule === 1">
- <el-input v-model="currentInfo.criterionRuleRemark" clearable size="small" style="width: 60px"></el-input>
- %
- </span>
- </td>
- <td v-else colspan="3">
- <span v-if="currentInfo.criterionRule===0">涓嶈�冭檻涓嶇‘瀹氬害</span>
- <span v-if="currentInfo.criterionRule===1">鑰冭檻涓嶇‘瀹氬害</span>
- <span v-if="currentInfo.criterionRule===1">{{ currentInfo.criterionRuleRemark + '%' }}</span>
- </td>
- </tr>
- <tr>
- <td colspan="2">
- <p>濮旀墭浜虹鍚�</p>
- </td>
- <td>
- <el-input v-if="operationType !== 'view'" v-model="currentInfo.commissionUser" clearable size="small"></el-input>
- <span v-else>{{currentInfo.commissionUser}}</span>
- </td>
- <td>
- <p>濮旀墭鏃ユ湡</p>
- </td>
- <td>
- <el-date-picker
- v-if="operationType !== 'view'"
- v-model="currentInfo.commissionDate"
- clearable
- format="yyyy-MM-dd"
- placeholder="閫夋嫨鏃ユ湡"
- size="small"
- style="width: 100%"
- type="date"
- value-format="yyyy-MM-dd">
- </el-date-picker>
- <span v-else>{{ currentInfo.commissionDate }}</span>
- </td>
- </tr>
- <tr>
- <td colspan="2">
- <p>濮旀墭浜鸿仈绯荤數璇�</p>
- </td>
- <td colspan="3">
- <el-input v-if="operationType !== 'view'" v-model="currentInfo.commissionPhone" clearable size="small"></el-input>
- <span v-else>{{ currentInfo.commissionPhone }}</span>
- </td>
- </tr>
- <tr>
- <td colspan="2">
- <p>缁煎悎瀹ょ鍚�</p>
- </td>
- <td>
- <el-input v-if="operationType !== 'view'" v-model="currentInfo.generalOfficeUser" clearable size="small"></el-input>
- <span v-else>{{currentInfo.generalOfficeUser}}</span>
- </td>
- <td>
- <p>鎺ユ敹鏃ユ湡</p>
- </td>
- <td>
- <el-date-picker
- v-if="operationType !== 'view'"
- v-model="currentInfo.receiptData"
- clearable
- format="yyyy-MM-dd"
- placeholder="閫夋嫨鏃ユ湡"
- size="small"
- style="width: 100%"
- type="date"
- value-format="yyyy-MM-dd">
- </el-date-picker>
- <span v-else>{{ currentInfo.receiptData }}</span>
- </td>
- </tr>
- <tr>
- <td colspan="2">
- <p>棰嗘牱鍛樼鍚�</p>
- </td>
- <td>
- <el-input v-if="operationType !== 'view'" v-model="currentInfo.sampleTakerUser" clearable size="small"></el-input>
- <span v-else>{{ currentInfo.sampleTakerUser }}</span>
- </td>
- <td>
- <p>棰嗘牱鏃ユ湡</p>
- </td>
- <td v-if="operationType !== 'view'">
- <el-date-picker
- v-model="currentInfo.sampleData"
- clearable
- format="yyyy-MM-dd"
- placeholder="閫夋嫨鏃ユ湡"
- size="small"
- style="width: 100%"
- type="date"
- value-format="yyyy-MM-dd">
- </el-date-picker>
- </td>
- <td v-else>{{ currentInfo.sampleData }}</td>
- </tr>
- <tr>
- <td colspan="2" rowspan="3">
- <p>妫�娴嬫満鏋勪俊鎭�</p>
- </td>
- <td colspan="3">
- <p>姹熻嫃涓ぉ绉戞妧鑲′唤鏈夐檺鍏徃妫�娴嬩腑蹇�</p>
- </td>
- </tr>
- <tr>
- <td colspan="3">
- <p>鍦板潃锛氭睙鑻忕渷鍗楅�氬競缁忔祹鎶�鏈紑鍙戝尯鏂板紑鍗楄矾 19 鍙�</p>
- </td>
- </tr>
- <tr>
- <td colspan="3">
- <p>鐢佃瘽锛�0513-89059043</p>
- </td>
- </tr>
- </table>
- <p style="margin-top: 10px;margin-left: 20px;">娉細鏈楠屽鎵樺崟涓�寮忎簩浠斤紝涓�浠界患鍚堝褰掓。锛屼竴浠藉鎵樺崟浣嶇暀瀛樸��</p>
- </div>
- </div>
- </div>
- <span v-if="operationType !== 'view'" slot="footer" class="dialog-footer">
- <el-button @click="detailDialogVisible = false">鍙� 娑�</el-button>
- <el-button :loading="buttonLoading" type="primary" @click="handleSubmit">
- 纭� 瀹�
- </el-button>
- </span>
- </el-dialog>
-</template>
-<script>
-import ZTTLogo from "@/assets/logo/ZTTlogo.png"
-import { getInspectionOrderByInsOderId, getInspectionOrderOne, addInspectionOrder, editInspectionOrder } from "@/api/cnas/process/demand/demand.js"
-
-export default {
- name: 'AddContracts',
- props: {
- operationType: {
- type: String,
- default: ''
- },
- },
- data() {
- return {
- title: '',
- ZTTLogo,
- visible: false,
- currentInfo:{
- orderDetailList: []
- },
- buttonLoading: false
- }
- },
- methods: {
- open(row) {
- this.visible = true
- if(operationType == 'add') {
- this.goAddOrder(row)
- } else {
-
- }
- },
- // 鎵撳紑寮圭獥鐨勬椂鍊欙紝鏌ヨ闇�瑕佹柊澧炵殑濮旀墭鍗曡鎯�
- async goAddOrder(row) {
- this.title = '鏂板妫�楠屽鎵樺崟';
- const { code, data } = await getInspectionOrderByInsOderId({
- insOrderId: row.id
- })
- if(code == 200) {
- this.currentInfo = res.data
- this.detailDialogVisible = true
- }
- },
- async goUpdateOrder(row) {
- this.title = '缂栬緫妫�楠屽鎵樺崟';
- const { code, data } = await getInspectionOrderOne({
- insOrderId: row.inspectionOrderId
- })
- if(code == 200) {
- this.currentInfo = res.data
- this.detailDialogVisible = true
- }
- },
- addOrderDetailList() {
- if (this.currentInfo.orderDetailList == null) {
- this.currentInfo.orderDetailList = []
- }
- this.currentInfo.orderDetailList.push({
- sampleNumber: '',
- testItem: '',
- testStandard: '',
- standardMethodList: '',
- remark: '',
- })
- },
-
- async handleSubmit() {
- this.operationType == 'add' ? await addInspectionOrder(this.currentInfo) : await editInspectionOrder(this.currentInfo)
- }
- }
-}
-</script>
-<style lang="scss" scoped>
-.tables {
- table-layout: fixed;
- width: 100%;
- margin-top: 10px;
- border-collapse: collapse; /* 鍏抽敭灞炴�э細鍚堝苟杈规 */
- td {
- height: 40px;
- width: 100px;
- text-align: center;
- font-size: 14px;
- word-wrap: break-word;
- white-space: normal;
- p {
- margin: unset
- }
- }
-}
-.heads {
- td {
- border: 1px dashed black; /* 鍗曞厓鏍肩殑铏氱嚎 */
- padding: 8px;
- text-align: left;
- }
-}
-.table_h4 {
- display: flex;
- align-items: center;
- flex-direction: column;
- justify-content: center;
- font-size: 28px;
- font-weight: bold;
- margin: 10px 0 10px 0;
-}
-.add_btn {
- margin: 10px 0 10px 10px;
-}
-</style>
\ No newline at end of file
diff --git a/src/views/CNAS/process/demand/Edit.vue b/src/views/CNAS/process/demand/Edit.vue
deleted file mode 100644
index 46f3efa..0000000
--- a/src/views/CNAS/process/demand/Edit.vue
+++ /dev/null
@@ -1,89 +0,0 @@
-<template>
- <div>
- <el-dialog title="鏂板妫�楠屼换鍔″崟" :visible.sync="visible">
- <el-form :model="search" :inline="true">
- <el-form-item label="濮旀墭缂栧彿锛�">
- <el-input placeholder="璇疯緭鍏ュ鎵樼紪鍙�"></el-input>
- </el-form-item>
- <el-form-item>
- <el-button type="primary">鏌� 璇�</el-button>
- <el-button>閲� 缃�</el-button>
- </el-form-item>
- </el-form>
- <lims-table
- :column="column"
- :tableData="tableData"
- :page="page"
- />
- </el-dialog>
- <AddContracts ref="addContractsRef" :operationType="operationType" />
- </div>
-</template>
-
-<script>
- import limsTable from "@/components/Table/lims-table.vue";
- import AddContracts from "./AddContracts.vue";
- import { getInsOrderOnInspection } from "@/api/cnas/process/demand/demand.js"
-
- export default {
- name: 'EditDemand',
- components: {
- limsTable,
- AddContracts
- },
- data() {
- return {
- visible: false,
- search: {},
- operationType: '',
- column: [
- { label: '搴忓彿', minWidth: '100px' },
- { label: '濮旀墭缂栧彿', minWidth: '100px' },
- { label: '鏍峰搧鍚嶇О', minWidth: '100px' },
- {
- dataType: "action",
- fixed: "right",
- label: "鎿嶄綔",
- operation: [
- {
- name: "鏂板濮旀墭鍗�",
- type: "text",
- clickFun: (row) => {
- this.operationType = 'add'
- this.$refs.addContractsRef.open(row)
- }
- }
- ],
- },
- ],
- tableData: [{}],
- page: {
- total: 0,
- size: 10,
- current: 1,
- },
- }
- },
- // 鎵撳紑寮圭獥
- methods: {
- open(type) {
- this.visible = true
- this.operationType = type
- this.getTableData()
- },
- openAddContracts(row) {
- this.operationType = 'edit'
- this.$refs.addContractsRef.open(row)
- },
- async getTableData() {
- // 鏌ヨ褰撳墠寮圭獥琛ㄦ暟鎹�
- const { code, data } = await getInsOrderOnInspection({
- ...this.search, ...this.page
- })
- if (code === 200) {
- this.tableData = data
- }
- }
- }
- }
-</script>
\ No newline at end of file
diff --git a/src/views/CNAS/process/demand/index.vue b/src/views/CNAS/process/demand/index.vue
index 137aba5..9667ffa 100644
--- a/src/views/CNAS/process/demand/index.vue
+++ b/src/views/CNAS/process/demand/index.vue
@@ -1,163 +1,737 @@
-<style lang="scss" scoped>
-.standard_method {
- padding: 20px;
-}
-.search {
- background-color: #fff;
- height: 80px;
- display: flex;
- align-items: center;
-}
-
-.search_thing {
-// width: 350px;
- display: flex;
- align-items: center;
-}
-
-.search_label {
- width: 110px;
- font-size: 14px;
- text-align: right;
-}
-
-.search_input {
- width: calc(100% - 110px);
-}
-
-.table {
- margin-top: 10px;
- background-color: #fff;
- width: calc(100% - 40px);
- height: calc(100% - 60px - 80px - 10px - 40px);
- padding: 20px;
-}
-</style>
-
<template>
- <div class="standard_method">
- <el-form :model="model" :inline="true" label-width="auto">
- <el-form-item label="璇曟牱鍚嶇О锛�">
- <el-input size="small"
- placeholder="璇疯緭鍏�"
- clearable
- @change="refreshTable()"
- />
- </el-form-item>
- <el-form-item label="濮旀墭鍗曚綅锛�">
- <el-input size="small"
- placeholder="璇疯緭鍏�"
- clearable
- @change="refreshTable()"
- />
- </el-form-item>
- <el-form-item label="鐢熶骇鍗曚綅锛�">
- <el-input size="small"
- placeholder="璇疯緭鍏�"
- clearable
- @change="refreshTable()"
- />
- </el-form-item>
- <el-form-item label="濮旀墭浜猴細">
- <el-input size="small"
- placeholder="璇疯緭鍏�"
- clearable
- @change="refreshTable()"
- />
- </el-form-item>
- <el-form-item>
- <el-button size="small">
- 閲� 缃�
- </el-button>
- <el-button size="small" type="primary">
- 鏌� 璇�
- </el-button>
- </el-form-item>
- </el-form>
- <div style="margin-bottom: 10px">
- <el-button size="small" type="primary" icon="el-icon-plus" @click="openDialog('add')">
- 鏂� 澧�
- </el-button>
- </div>
- <lims-table
- :column="column"
- :tableData="tableData"
- :height="'calc(100vh - 250px)'"
- :page="page"
- />
- <Edit ref="editRef" />
+ <div class="app-container">
+ <div style="display: flex;justify-content: space-between;">
+ <el-form :model="entitySearch" ref="entitySearch" size="small" :inline="true">
+ <el-form-item label="璇曟牱鍚嶇О" prop="sampleName">
+ <el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="entitySearch.sampleName"
+ @keyup.enter.native="refreshTable"></el-input>
+ </el-form-item>
+ <el-form-item label="濮旀墭鍗曚綅" prop="commissionUnit">
+ <el-input v-model="entitySearch.commissionUnit" clearable placeholder="璇疯緭鍏�" size="small"
+ @keyup.enter.native="refreshTable()"></el-input>
+ </el-form-item>
+ <el-form-item label="鐢熶骇鍗曚綅" prop="production">
+ <el-input v-model="entitySearch.production" clearable placeholder="璇疯緭鍏�" size="small"
+ @keyup.enter.native="refreshTable()"></el-input>
+ </el-form-item>
+ <el-form-item label="濮旀墭浜�" prop="commissionUser">
+ <el-input v-model="entitySearch.commissionUser" clearable placeholder="璇疯緭鍏�" size="small"
+ @keyup.enter.native="refreshTable()"></el-input>
+ </el-form-item>
+ <el-form-item>
+ <el-button icon="el-icon-refresh" size="mini" @click="refresh">閲� 缃�</el-button>
+ <el-button type="primary" icon="el-icon-search" size="mini" @click="refreshTable">鏌� 璇�</el-button>
+ </el-form-item>
+ </el-form>
</div>
+ <div style="text-align: right; margin-bottom: 20px">
+ <el-button size="medium" type="primary" @click="goAdd">鏂板</el-button>
+ </div>
+ <div class="table">
+ <el-table v-loading="tableListLoading" :data="tableList" height="530" style="width: 100%">
+ <el-table-column align="center" label="搴忓彿" type="index" width="60"></el-table-column>
+ <el-table-column label="璇曟牱鍚嶇О" prop="sampleName" show-overflow-tooltip width="120"></el-table-column>
+ <el-table-column label="濮旀墭缂栧彿" prop="entrustCode" show-overflow-tooltip width="120"></el-table-column>
+ <el-table-column label="濮旀墭鏃堕棿" prop="commissionDate" width="120"></el-table-column>
+ <el-table-column label="鍨嬪彿" prop="modelNo"></el-table-column>
+ <el-table-column label="濮旀墭鍗曚綅" prop="commissionUnit" show-overflow-tooltip width="120"></el-table-column>
+ <el-table-column label="鐢熶骇鍗曚綅" prop="production" show-overflow-tooltip width="120"></el-table-column>
+ <el-table-column label="濮旀墭浜�" prop="commissionUser"></el-table-column>
+ <el-table-column label="鏍峰搧鏁伴噺" prop="quantity"></el-table-column>
+ <el-table-column label="鏍峰搧鐘舵��" prop="sampleStatus"></el-table-column>
+ <el-table-column label="鏄惁鐣欐牱" prop="isLeave">
+ <template slot-scope="scope">
+ <span v-if="scope.row.isLeave === 1">鏄�</span>
+ <span v-if="scope.row.isLeave === 0">鍚�</span>
+ </template>
+ </el-table-column>
+ <el-table-column label="鏍峰搧澶勭悊鏂瑰紡" prop="processing">
+ <template slot-scope="scope">
+ <span v-if="scope.row.processing === 1">瀹為獙瀹ゅ鐞�</span>
+ <span v-if="scope.row.processing === 0">濮旀墭鍗曚綅鍙栧洖</span>
+ </template>
+ </el-table-column>
+ <el-table-column align="center" label="鎿嶄綔" width="240" fixed="right">
+ <template slot-scope="scope">
+ <el-button size="mini" type="text" @click="goUpdate(scope.row)">缂栬緫</el-button>
+ <el-button size="mini" type="text" @click="handleLook(scope.row)">鏌ョ湅</el-button>
+ <el-button size="mini" style="color:#F56C6C" type="text" @click="deleteOrder(scope.row)">鍒犻櫎</el-button>
+ <el-button size="mini" type="text" @click="openDownloadDia(scope.row)">涓嬭浇</el-button>
+ <el-upload ref='upload'
+ :action="action"
+ :data="{inspectionOrderId: scope.row.inspectionOrderId}" :headers="uploadHeader"
+ :on-error="onError" :on-success="handleSuccessUp" :show-file-list="false" accept='image/jpg,image/jpeg,image/png,application/pdf,.doc,.docx,.xlsx'
+ name="file" style="background: transparent;display: inline;margin-left: 4px">
+ <span style="color: #409EFF">涓婁紶</span>
+ </el-upload>
+ </template>
+ </el-table-column>
+ </el-table>
+ <el-pagination :current-page="1" :page-size="pages.size" :page-sizes="[10, 20, 30, 50, 100]"
+ :total="total1" layout="->,total, sizes, prev, pager, next"
+ style="margin-top: 10px" background
+ @size-change="handleSizeChange1" @current-change="handleCurrentChange1">
+ </el-pagination>
+ </div>
+ <el-dialog
+ :close-on-click-modal="false" :close-on-press-escape="false"
+ :visible.sync="orderRowsVisible" title="鏂板妫�楠屼换鍔″崟" width="1000px">
+ <div style="display: flex; align-items: center;margin-bottom: 10px">
+ <span style="width: 80px">濮旀墭缂栧彿锛�</span>
+ <el-input v-model="entity.entrustCode" clearable size="small" style="width: 300px;margin-right: 10px"></el-input>
+ <el-button size="small" type="primary" @click="searchTableData">鏌ヨ</el-button>
+ <el-button size="small" @click="refreshTableData">閲� 缃�</el-button>
+ </div>
+ <el-table v-loading="tableLoading" :data="tableData" height="550" style="width: 100%">
+ <el-table-column align="center" label="搴忓彿" type="index" width="60"></el-table-column>
+ <el-table-column label="濮旀墭缂栧彿" prop="entrustCode"></el-table-column>
+ <el-table-column label="鏍峰搧鍚嶇О" prop="sample"></el-table-column>
+ <el-table-column align="center" label="鎿嶄綔">
+ <template slot-scope="scope">
+ <el-button align="center" size="mini" type="text" @click="goAddOrder(scope.row)">鏂板濮旀墭鍗�</el-button>
+ </template>
+ </el-table-column>
+ </el-table>
+ <el-pagination :current-page="1" :page-size="tableSearch.size" :page-sizes="[10, 20, 30, 50, 100]"
+ :total="total" layout="->,total, sizes, prev, pager, next"
+ style="margin-top: 10px" background
+ @size-change="handleSizeChange" @current-change="handleCurrentChange">
+ </el-pagination>
+ </el-dialog>
+ <el-dialog
+ :class="{downPdf:title=='涓嬭浇'}" :close-on-click-modal="false"
+ :close-on-press-escape="false"
+ :modal="title!='涓嬭浇'" :title="title" :visible.sync="detailDialogVisible" top="20px" width="1200px">
+ <div style="max-height: 75vh;overflow-y: auto;">
+ <div id="dialogBody">
+ <table border="1" cellpadding="10" class="tables heads" style="border: 1px dashed black;">
+ <tr>
+ <td rowspan="2">
+ <img alt="" src="@/assets/logo/ZTTlogo.png" style="width: 80%;">
+ </td>
+ <td>
+ <p>璁板綍鍚嶇О锛氭楠屽鎵樺崟</p>
+ </td>
+ <td>
+ <p>淇濆瓨鏈熼檺锛�6骞�</p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>璁板綍缂栧彿锛� ZTT/QR-16-04-a</p>
+ </td>
+ <td>
+ <p>褰掓。閮ㄩ棬锛氱患鍚堝</p>
+ </td>
+ </tr>
+ </table>
+ <h4 style="display: flex;align-items: center;flex-direction: column;justify-content: center;">
+ <span style="font-size: 28px;">妫� 楠� 濮� 鎵� 鍗�</span>
+ </h4>
+ <p v-if="operationType !== 'view'" style="margin-left: 560px;display: flex;align-items: center">
+ <span style="width: 100px">濮旀墭缂栧彿锛�</span>
+ <el-input v-model="currentInfo.entrustCode" clearable size="small"></el-input>
+ </p>
+ <p v-if="operationType === 'view'" style="margin-top: 16px;margin-left: 600px;">濮旀墭缂栧彿锛歿{ currentInfo.entrustCode }}</p>
+ <table border="1" cellpadding="10" class="tables">
+ <tr>
+ <td colspan="2">
+ <p>璇曟牱鍚嶇О</p>
+ </td>
+ <td v-if="operationType !== 'view'"><el-input v-model="currentInfo.sampleName" clearable size="small"></el-input></td>
+ <td v-if="operationType === 'view'">{{ currentInfo.sampleName }}</td>
+ <td>
+ <p>濮旀墭鏃堕棿</p>
+ </td>
+ <td v-if="operationType !== 'view'">
+ <el-date-picker
+ v-model="currentInfo.commissionDate"
+ clearable
+ format="yyyy-MM-dd"
+ placeholder="閫夋嫨鏃ユ湡"
+ size="small"
+ style="width: 100%"
+ type="date"
+ value-format="yyyy-MM-dd">
+ </el-date-picker>
+ </td>
+ <td v-if="operationType === 'view'">{{ currentInfo.commissionDate }}</td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <p>鍨� 鍙�</p>
+ </td>
+ <td v-if="operationType !== 'view'"><el-input v-model="currentInfo.modelNo" clearable size="small"></el-input></td>
+ <td v-if="operationType === 'view'">{{ currentInfo.modelNo }}</td>
+ <td>
+ <p>濮旀墭鍗曚綅</p>
+ </td>
+ <td v-if="operationType !== 'view'"><el-input v-model="currentInfo.commissionUnit" clearable size="small"></el-input></td>
+ <td v-if="operationType === 'view'">{{ currentInfo.commissionUnit }}</td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <p>鐢熶骇鍗曚綅</p>
+ </td>
+ <td v-if="operationType !== 'view'"><el-input v-model="currentInfo.production" clearable size="small"></el-input></td>
+ <td v-if="operationType === 'view'">{{ currentInfo.production }}</td>
+ <td>
+ <p>濮旀墭浜�</p>
+ </td>
+ <td v-if="operationType !== 'view'"><el-input v-model="currentInfo.commissionUser" clearable size="small"></el-input></td>
+ <td v-if="operationType === 'view'">{{ currentInfo.commissionUser }}</td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <p>鏍峰搧鏁伴噺</p>
+ </td>
+ <td v-if="operationType !== 'view'"><el-input v-model="currentInfo.quantity" clearable size="small"></el-input></td>
+ <td v-if="operationType === 'view'">{{ currentInfo.quantity }}</td>
+ <td>
+ <p>鏍峰搧鐘舵��</p>
+ </td>
+ <td v-if="operationType !== 'view'"><el-input v-model="currentInfo.sampleStatus" clearable size="small"></el-input></td>
+ <td v-if="operationType === 'view'">{{ insStateList.find(m=>m.value==currentInfo.sampleStatus)?insStateList.find(m=>m.value==currentInfo.sampleStatus).label:'/' }}</td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <p>鏄惁鐣欐牱</p>
+ </td>
+ <td v-if="operationType !== 'view'">
+ <el-radio-group v-model="currentInfo.isLeave" v-removeAriaHidden>
+ <el-radio :label="1">鏄�</el-radio>
+ <el-radio :label="0">鍚�</el-radio>
+ </el-radio-group>
+ </td>
+ <td v-if="operationType === 'view'">
+ <span v-if="currentInfo.isLeave==1">鏄�</span>
+ <span v-else>鍚�</span>
+ </td>
+ <td>
+ <p>鏍峰搧澶勭悊鏂瑰紡</p>
+ </td>
+ <td v-if="operationType !== 'view'">
+ <el-radio-group v-model="currentInfo.processing" v-removeAriaHidden>
+ <el-radio :label="0">濮旀墭鍗曚綅鍙栧洖</el-radio>
+ <el-radio :label="1">瀹為獙瀹ゅ鐞�</el-radio>
+ </el-radio-group>
+ </td>
+ <td v-if="operationType === 'view'">
+ <span v-if="currentInfo.processing==0">濮旀墭鍗曚綅鍙栧洖</span>
+ <span v-else>瀹為獙瀹ゅ鐞�</span>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <p>绾﹀畾瀹屾垚鏃堕棿(鎶ュ憡鏃ユ湡)</p>
+ </td>
+ <td v-if="operationType !== 'view'">
+ <el-date-picker
+ v-model="currentInfo.appointed"
+ clearable
+ format="yyyy-MM-dd"
+ placeholder="閫夋嫨鏃ユ湡"
+ size="small"
+ style="width: 100%"
+ type="date"
+ value-format="yyyy-MM-dd">
+ </el-date-picker>
+ </td>
+ <td v-if="operationType === 'view'">{{ currentInfo.appointed }}</td>
+ <td>
+ <p>鎶ュ憡鍙戦�佹柟寮�</p>
+ </td>
+ <td v-if="operationType !== 'view'">
+ <el-radio-group v-model="currentInfo.send" v-removeAriaHidden>
+ <el-radio :label="1">鑷彇</el-radio>
+ <el-radio :label="0">鍏朵粬</el-radio>
+ </el-radio-group>
+ </td>
+ <td v-if="operationType === 'view'">
+ <span v-if="currentInfo.send==1">鑷彇</span>
+ <span v-else>鍏朵粬</span>
+ </td>
+ </tr>
+ <el-button size="small" type="primary" @click="addOrderDetailList" v-if="operationType !== 'view'">娣诲姞</el-button>
+ <tr>
+ <td>
+ <p>搴忓彿</p>
+ </td>
+ <td>
+ <p>鏍峰搧缂栧彿</p>
+ </td>
+ <td>
+ <p>璇曢獙椤圭洰</p>
+ </td>
+ <td>
+ <p>妫�楠屼緷鎹�</p>
+ </td>
+ <td>
+ <p>澶囨敞</p>
+ </td>
+ </tr>
+ <tr v-for="(item,index) in currentInfo.orderDetailList" :key="index" >
+ <td>{{ index+1 }}</td>
+ <td v-if="operationType !== 'view'"><el-input v-model="item.sampleNumber" clearable size="small"></el-input></td>
+ <td v-if="operationType === 'view'">{{ item.sampleNumber }}</td>
+ <td v-if="operationType !== 'view'"><el-input v-model="item.testItem" clearable size="small"></el-input></td>
+ <td v-if="operationType === 'view'">{{ item.testItem }}</td>
+ <td v-if="operationType !== 'view'"><el-input v-model="item.testStandard" clearable size="small"></el-input></td>
+ <td v-if="operationType === 'view'">{{ item.testStandard }}</td>
+ <td v-if="operationType !== 'view'"><el-input v-model="item.remark" clearable size="small"></el-input></td>
+ <td v-if="operationType === 'view'">{{ item.remark }}</td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <p>鍒ゅ畾瑙勫垯</p>
+ </td>
+ <td v-if="operationType !== 'view'" colspan="3">
+ <el-radio-group v-model="currentInfo.criterionRule" v-removeAriaHidden>
+ <el-radio :label="0">涓嶈�冭檻涓嶇‘瀹氬害</el-radio>
+ <el-radio :label="1">鑰冭檻涓嶇‘瀹氬害</el-radio>
+ </el-radio-group>
+ <span v-if="currentInfo.criterionRule === 1"><el-input v-model="currentInfo.criterionRuleRemark" clearable size="small" style="width: 60px"></el-input>%</span>
+ </td>
+ <td v-if="operationType === 'view'" colspan="3">
+ <span v-if="currentInfo.criterionRule===0">涓嶈�冭檻涓嶇‘瀹氬害</span>
+ <span v-if="currentInfo.criterionRule===1">鑰冭檻涓嶇‘瀹氬害</span>
+ <span v-if="currentInfo.criterionRule===1">{{ currentInfo.criterionRuleRemark + '%' }}</span>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <p>濮旀墭浜虹鍚�</p>
+ </td>
+ <td v-if="operationType !== 'view'"><el-input v-model="currentInfo.commissionUser" clearable size="small"></el-input></td>
+ <td v-if="operationType === 'view'">
+ {{currentInfo.commissionUser}}
+ </td>
+ <td>
+ <p>濮旀墭鏃ユ湡</p>
+ </td>
+ <td v-if="operationType !== 'view'">
+ <el-date-picker
+ v-model="currentInfo.commissionDate"
+ clearable
+ format="yyyy-MM-dd"
+ placeholder="閫夋嫨鏃ユ湡"
+ size="small"
+ style="width: 100%"
+ type="date"
+ value-format="yyyy-MM-dd">
+ </el-date-picker>
+ </td>
+ <td v-if="operationType === 'view'">{{ currentInfo.commissionDate }}</td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <p>濮旀墭浜鸿仈绯荤數璇�</p>
+ </td>
+ <td v-if="operationType !== 'view'" colspan="3"><el-input v-model="currentInfo.commissionPhone" clearable size="small"></el-input></td>
+ <td v-if="operationType === 'view'" colspan="3">{{ currentInfo.commissionPhone }}</td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <p>缁煎悎瀹ょ鍚�</p>
+ </td>
+ <td v-if="operationType !== 'view'"><el-input v-model="currentInfo.generalOfficeUser" clearable size="small"></el-input></td>
+ <td v-if="operationType === 'view'">{{currentInfo.generalOfficeUser}}</td>
+ <td>
+ <p>鎺ユ敹鏃ユ湡</p>
+ </td>
+ <td v-if="operationType !== 'view'">
+ <el-date-picker
+ v-model="currentInfo.receiptData"
+ clearable
+ format="yyyy-MM-dd"
+ placeholder="閫夋嫨鏃ユ湡"
+ size="small"
+ style="width: 100%"
+ type="date"
+ value-format="yyyy-MM-dd">
+ </el-date-picker>
+ </td>
+ <td v-if="operationType === 'view'">{{ currentInfo.receiptData }}</td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <p>棰嗘牱鍛樼鍚�</p>
+ </td>
+ <td v-if="operationType !== 'view'"><el-input v-model="currentInfo.sampleTakerUser" clearable size="small"></el-input></td>
+ <td v-if="operationType === 'view'">{{ currentInfo.sampleTakerUser }}</td>
+ <td>
+ <p>棰嗘牱鏃ユ湡</p>
+ </td>
+ <td v-if="operationType !== 'view'">
+ <el-date-picker
+ v-model="currentInfo.sampleData"
+ clearable
+ format="yyyy-MM-dd"
+ placeholder="閫夋嫨鏃ユ湡"
+ size="small"
+ style="width: 100%"
+ type="date"
+ value-format="yyyy-MM-dd">
+ </el-date-picker>
+ </td>
+ <td v-if="operationType === 'view'">{{ currentInfo.sampleData }}</td>
+ </tr>
+ <tr>
+ <td colspan="2" rowspan="3">
+ <p>妫�娴嬫満鏋勪俊鎭�</p>
+ </td>
+ <td colspan="3">
+ <p>姹熻嫃涓ぉ绉戞妧鑲′唤鏈夐檺鍏徃妫�娴嬩腑蹇�</p>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="3">
+ <p>鍦板潃锛氭睙鑻忕渷鍗楅�氬競缁忔祹鎶�鏈紑鍙戝尯鏂板紑鍗楄矾 19 鍙�</p>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="3">
+ <p>鐢佃瘽锛�0513-89059043</p>
+ </td>
+ </tr>
+ </table>
+ <p style="margin-top: 10px;margin-left: 20px;">娉細鏈楠屽鎵樺崟涓�寮忎簩浠斤紝涓�浠界患鍚堝褰掓。锛屼竴浠藉鎵樺崟浣嶇暀瀛樸��</p>
+ </div>
+ </div>
+ <span v-if="operationType !== 'view'" slot="footer" class="dialog-footer">
+ <el-button @click="detailDialogVisible = false">鍙� 娑�</el-button>
+ <el-button v-if="operationType === 'add'" :loading="buttonLoading" type="primary" @click="handleAdd">纭� 瀹�</el-button>
+ <el-button v-if="operationType === 'edit'" :loading="buttonLoading" type="primary" @click="handleEdit">纭� 瀹�</el-button>
+ </span>
+ </el-dialog>
+ <el-dialog :visible.sync="downloadDialog" title="涓嬭浇" width="600px">
+ <span>
+ <el-button :loading="outLoading" plain type="primary" @click="orderReportDown">涓嬭浇濮旀墭鍗�</el-button>
+ <el-button :loading="outLoading" plain type="primary" @click="orderFormDown">涓嬭浇濮旀墭鎶ュ憡</el-button>
+ </span>
+ <span slot="footer" class="dialog-footer">
+ <el-button @click="downloadDialog = false">鍙� 娑�</el-button>
+ </span>
+ </el-dialog>
+ </div>
</template>
<script>
+import {
+ addInspectionOrder, delInspectionOrder, exportInspectionOrder,
+ getInsOrderOnInspection, getInspectionOrderByInsOderId, getInspectionOrderOne,
+ pageInspectionOrder,
+ updateInspectionOrder
+} from "@/api/cnas/process/demand/demand";
import limsTable from "@/components/Table/lims-table.vue";
-import Edit from './Edit.vue'
-import { getInspectionOrder } from "@/api/cnas/process/demand/demand.js"
+import {selectUserCondition} from "@/api/business/inspectionTask";
export default {
- name: 'Demand',
- components: {
- limsTable,
- Edit
- },
- data() {
- return {
- queryParams: {
- code: ''
- },
- model: {},
- column: [
- { label: '搴忓彿', minWidth: '100px' },
- { label: '璇曟牱鍚嶇О', minWidth: '100px' },
- { label: '濮旀墭缂栧彿' },
- { label: '濮旀墭鏃堕棿' },
- { label: '鍨嬪彿' },
- { label: '濮旀墭鍗曚綅' },
- { label: '鐢熶骇鍗曚綅' },
- { label: '濮旀墭浜�' },
- { label: '鏍峰搧鏁伴噺' },
- { label: '鏍峰搧鐘舵��' },
- { label: '鏄惁鐣欐牱' },
- { label: '鏍峰搧澶勭悊鏂瑰紡' },
- {
- dataType: "action",
- fixed: "right",
- label: "鎿嶄綔",
- operation: [
- {
- name: "缂� 杈�",
- type: "text",
- clickFun: (row) => {
- this.$refs.editRef.openAddContracts(row)
- }
- }
- ],
- },
- ],
- tableData: [], // 琛ㄦ牸鏁版嵁
- page: {
- total: 0,
- size: 10,
- current: 1,
- },
- }
- },
- mounted() {
- this.refreshTable()
- },
- methods: {
- /**
- * @desc 鍒锋柊琛ㄦ牸
- */
- async refreshTable() {
- await getInspectionOrder({ ...this.page })
+ name: "a7-Inspection-Order-Form",
+ components: {limsTable},
+ data() {
+ return {
+ title:'妫�楠屽鎵樺崟',
+ detailDialogVisible:false,
+ addLoading:false,
+ outLoading:false,
+ currentInfo:{
+ orderDetailList: []
+ },
+ personList:[],
+ insStateList:[
+ {
+ label: '寰呭鏍�',
+ value: 0
+ }, {
+ label: '寰呮楠�',
+ value: 1
},
- /**
- * @desc 鎵撳紑妯℃�佹
- */
- openDialog(type) {
- this.$refs.editRef.open(type)
- }
+ {
+ label: '宸叉楠�',
+ value: 4
+ },
+ {
+ label: '閫�鍥�',
+ value: 2
+ },
+ {
+ label: '鎾ら攢',
+ value: 3
+ },
+ ],
+ operationType: '',
+ orderRowsVisible: false,
+ tableList: [],
+ tableListLoading: false,
+ pages: {
+ current: 1,
+ size: 20,
+ },
+ tableData: [],
+ tableLoading: false,
+ tableSearch: {
+ current: 1,
+ size: 20,
+ },
+ total: 0,
+ total1: 0,
+ entity: {
+ entrustCode: ''
+ },
+ entitySearch: {
+ sampleName: '',
+ commissionUnit: '',
+ production: '',
+ commissionUser: '',
+ },
+ buttonLoading: false,
+ downloadDialog: false,
+ download: {},
+ };
+ },
+ mounted() {
+ // this.getPower()
+ this.getAuthorizedPerson()
+ this.refreshTable()
+ },
+ computed: {
+ action() {
+ return this.javaApi + '/inspectionOrder/uploadInspectionOrderFile'
}
+ },
+ methods: {
+ addOrderDetailList () {
+ if (this.currentInfo.orderDetailList == null) {
+ this.currentInfo.orderDetailList = []
+ }
+ this.currentInfo.orderDetailList.push({
+ sampleNumber: '',
+ testItem: '',
+ testStandard: '',
+ standardMethodList: '',
+ remark: '',
+ })
+ },
+ // 鏌ヨ鍒楄〃
+ refreshTable() {
+ this.tableListLoading = true
+ pageInspectionOrder({
+ ...this.pages,
+ ...this.entitySearch
+ }).then(res => {
+ this.tableListLoading = false
+ this.tableList = res.data.records
+ this.total1 = res.data.total
+ }).catch(err => {
+ this.tableListLoading = false
+ })
+ },
+ // 閲嶇疆
+ refresh() {
+ this.entitySearch = {
+ sampleName: '',
+ commissionUnit: '',
+ production: '',
+ commissionUser: '',
+ }
+ this.pages = {
+ current: 1,
+ size: 20,
+ }
+ this.refreshTable()
+ },
+ // 鎵撳紑鏂板寮规
+ goAdd () {
+ this.operationType = 'add'
+ this.title = '鏂板妫�楠屽鎵樺崟';
+ this.orderRowsVisible = true
+ this.searchTableData()
+ },
+ // 鏌ヨ鍙柊澧炵殑妫�楠屽崟
+ searchTableData () {
+ this.tableLoading = true
+ getInsOrderOnInspection({
+ ...this.tableSearch,
+ ...this.entity
+ }).then(res => {
+ this.tableLoading = false
+ this.tableData = res.data.records
+ this.total = res.data.total
+ }).catch(err => {
+ this.tableLoading = false
+ })
+ },
+ // 閲嶇疆妫�楠屽崟鍒楄〃
+ refreshTableData () {
+ this.entity = {
+ entrustCode: ''
+ }
+ this.tableSearch = {
+ current: 1,
+ size: 20,
+ }
+ this.searchTableData()
+ },
+ // 妫�楠屽崟鍒楄〃鍒嗛〉
+ handleSizeChange(val) {
+ this.tableSearch.size = val
+ this.searchTableData();
+ },
+ handleCurrentChange(val) {
+ this.tableSearch.current = val
+ this.searchTableData();
+ },
+ // 鍒楄〃鍒嗛〉
+ handleSizeChange1(val) {
+ this.pages.size = val
+ this.refreshTable();
+ },
+ handleCurrentChange1(val) {
+ this.pages.current = val
+ this.refreshTable();
+ },
+ // 鎻愪氦鏂板
+ handleAdd () {
+ this.buttonLoading = true
+ addInspectionOrder(this.currentInfo).then(res => {
+ this.buttonLoading = false
+ this.$message.success('鏂板鎴愬姛')
+ this.detailDialogVisible = false
+ this.orderRowsVisible = false
+ this.refreshTable()
+ }).catch(err => {
+ this.buttonLoading = false
+ })
+ },
+ // 鎻愪氦淇敼
+ handleEdit () {
+ this.buttonLoading = true
+ updateInspectionOrder(this.currentInfo).then(res => {
+ this.buttonLoading = false
+ if (res.code === 201) return
+ this.$message.success('鏂板鎴愬姛')
+ this.detailDialogVisible = false
+ this.orderRowsVisible = false
+ this.refreshTable()
+ }).catch(err => {
+ this.buttonLoading = false
+ })
+ },
+ // 鏌ヨ闇�瑕佹柊澧炵殑濮旀墭鍗曡鎯�
+ goAddOrder (row) {
+ getInspectionOrderByInsOderId({insOrderId: row.id}).then(res => {
+ this.currentInfo = res.data
+ this.title = '鏂板妫�楠屽鎵樺崟';
+ this.detailDialogVisible = true
+ }).catch(err => {
+ console.log('err----', err)
+ })
+ },
+ // 鎵撳紑缂栬緫寮规
+ goUpdate (row) {
+ this.operationType = 'edit'
+ getInspectionOrderOne({inspectionOrderId: row.inspectionOrderId}).then(res => {
+ this.currentInfo = res.data
+ this.title = '缂栬緫妫�楠屽鎵樺崟';
+ this.detailDialogVisible = true
+ }).catch(err => {
+ console.log('err----', err)
+ })
+ },
+ // 鏌ョ湅
+ handleLook(row){
+ this.operationType = 'view'
+ getInspectionOrderOne({inspectionOrderId: row.inspectionOrderId}).then(res => {
+ this.currentInfo = res.data
+ this.title = '鏌ョ湅妫�楠屽鎵樺崟';
+ this.detailDialogVisible = true
+ }).catch(err => {
+ console.log('err----', err)
+ })
+ },
+ // 鍒犻櫎
+ deleteOrder (row) {
+ this.$confirm('姝ゆ搷浣滃皢姘镐箙鍒犻櫎璇ユ暟鎹�, 鏄惁缁х画?', '鎻愮ず', {
+ confirmButtonText: '纭畾',
+ cancelButtonText: '鍙栨秷',
+ type: 'warning'
+ }).then(() => {
+ delInspectionOrder({inspectionOrderId: row.inspectionOrderId}).then(res => {
+ this.$message.success('鍒犻櫎鎴愬姛锛�');
+ this.refreshTable();
+ });
+ }).catch(() => {
+ this.$message({
+ type: 'info',
+ message: '宸插彇娑堝垹闄�'
+ });
+ });
+ },
+ // 鎵撳紑涓嬭浇寮规
+ openDownloadDia (row) {
+ this.downloadDialog = true
+ this.download = row
+ },
+ // 濮旀墭鍗曚笅杞�
+ orderFormDown () {
+ let url = this.download.fileUrl;
+ const link = document.createElement('a');
+ link.href = this.javaApi + url;
+ link.target = '_blank';
+ document.body.appendChild(link);
+ link.click();
+ },
+ // 濮旀墭鎶ュ憡涓嬭浇
+ orderReportDown () {
+ this.outLoading = true;
+ exportInspectionOrder({inspectionOrderId: this.download.inspectionOrderId}).then(res => {
+ this.outLoading = false;
+ const blob = new Blob([res], { type: 'application/octet-stream' });
+ this.$download.saveAs(blob, '妫�楠屽鎵樺崟.docx')
+ this.$message.success('瀵煎嚭鎴愬姛');
+
+ }).catch(err => {
+ this.outLoading = false;
+ })
+ },
+ // 涓婁紶
+ handleSuccessUp(response, ) {
+ if (response.code == 200) {
+ this.$message.success('涓婁紶鎴愬姛');
+ this.refreshTable()
+ }
+ },
+ beforeUpload(file) {
+ if (file.size > 1024 * 1024 * 10) {
+ this.$message.error('涓婁紶鏂囦欢涓嶈秴杩�10M');
+ this.$refs.upload.clearFiles()
+ return false;
+ } else {
+ return true;
+ }
+ },
+ onError(err, file, fileList) {
+ this.$message.error('涓婁紶澶辫触')
+ this.$refs.upload.clearFiles()
+ },
+ // 浜哄憳鍒楄〃
+ getAuthorizedPerson() {
+ selectUserCondition().then(res => {
+ let data = []
+ res.data.forEach(a => {
+ data.push({
+ label: a.name,
+ value: a.id
+ })
+ })
+ this.personList = data
+ })
+ },
+
+ },
}
-</script>
\ No newline at end of file
+</script>
+
+<style scoped>
+</style>
diff --git a/src/views/CNAS/resourceDemand/standardMaterialAccept/component/AddRecord.vue b/src/views/CNAS/resourceDemand/standardMaterialAccept/component/AddRecord.vue
index 1e54f5e..bd776c7 100644
--- a/src/views/CNAS/resourceDemand/standardMaterialAccept/component/AddRecord.vue
+++ b/src/views/CNAS/resourceDemand/standardMaterialAccept/component/AddRecord.vue
@@ -1,12 +1,12 @@
<template>
<el-dialog :visible.sync="dialogVisible" title="鏍囧噯鐗╄川楠屾敹璁板綍" width="70%">
- <!-- <el-steps :active="currentStep" finish-status="success">
+ <el-steps :active="currentStep" finish-status="success">
<el-step class="cursor-pointer" v-for="(item, index) in steps" :key="index" :title="item">
</el-step>
- </el-steps> -->
-<!-- <el-form :model="model" label-width="140px" size="small">-->
-<!-- <Step1 :model.sync="model"></Step1>-->
-<!-- </el-form>-->
+ </el-steps>
+ <el-form :model="model" label-width="140px" size="small">
+ <Step1 :model.sync="model"></Step1>
+ </el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false">鍙� 娑�</el-button>
<el-button type="primary" @click="submit">淇� 瀛�</el-button>
@@ -15,16 +15,16 @@
</template>
<script>
-// import Step1 from './Step/Step1.vue'
+import Step1 from './Step1.vue'
export default {
components: {
- // Step1
+ Step1
},
data() {
return {
dialogVisible: false,
currentStep: 0, // 姝ラ鏉℃樉绀虹鍑犳
- // steps: ['鎻愪氦', '寮�绠遍獙鏀跺鏍�', '瀹夎楠屾敹妫�鏌�', '瀹夎楠屾敹澶嶆牳', '楠屾敹鏍告煡', '楠屾敹鏍告煡瀹℃牳'],
+ steps: ['鎻愪氦', '寮�绠遍獙鏀跺鏍�', '瀹夎楠屾敹妫�鏌�', '瀹夎楠屾敹澶嶆牳', '楠屾敹鏍告煡', '楠屾敹鏍告煡瀹℃牳'],
model: {
acceptance: {
id: undefined,
diff --git a/src/views/CNAS/resourceDemand/standardMaterialAccept/component/Step1.vue b/src/views/CNAS/resourceDemand/standardMaterialAccept/component/Step1.vue
index c1f26ad..967c41b 100644
--- a/src/views/CNAS/resourceDemand/standardMaterialAccept/component/Step1.vue
+++ b/src/views/CNAS/resourceDemand/standardMaterialAccept/component/Step1.vue
@@ -1,201 +1,198 @@
-<!--<template>-->
-<!-- <el-card class="card">-->
-<!-- <el-col :span="12">-->
-<!-- <el-form-item label="鍘傚浠h〃">-->
-<!-- <el-input v-model="model.acceptance.producer"></el-input>-->
-<!-- </el-form-item>-->
-<!-- </el-col>-->
-<!-- <el-col :span="12">-->
-<!-- <el-form-item label="鐩稿叧闄勪欢">-->
-<!-- <div class="table-between">-->
-<!-- <el-input v-model="model.acceptance.file" style="width: 82%;"></el-input>-->
-<!-- <el-upload-->
-<!-- ref="upload"-->
-<!-- style="float: left; margin: 0 12px 0 20px;"-->
-<!-- :action="action"-->
-<!-- :show-file-list="false"-->
-<!-- :on-success="onSuccess"-->
-<!-- >-->
-<!-- <el-button type="primary">-->
-<!-- 闄勪欢涓婁紶-->
-<!-- </el-button>-->
-<!-- </el-upload>-->
-<!-- </div>-->
-<!-- </el-form-item>-->
-<!-- </el-col>-->
-<!-- <el-col :span="12">-->
-<!-- <el-form-item label="鎺ユ敹浜�">-->
-<!-- <el-input v-model="model.acceptance.recipient"></el-input>-->
-<!-- </el-form-item>-->
-<!-- </el-col>-->
-<!-- <el-col :span="12">-->
-<!-- <el-form-item label="鎺ュ彈绛惧瓧">-->
-<!-- <el-input v-model="model.acceptance.signature"></el-input>-->
-<!-- </el-form-item>-->
-<!-- </el-col>-->
-<!-- <el-col :span="12">-->
-<!-- <el-form-item label="楠屾敹鎯呭喌">-->
-<!-- <el-input v-model="model.acceptance.situation"></el-input>-->
-<!-- </el-form-item>-->
-<!-- </el-col>-->
-<!-- <el-col :span="12">-->
-<!-- <el-form-item label="瀹夎璋冭瘯鎯呭喌">-->
-<!-- <el-input v-model="model.acceptance.installation"></el-input>-->
-<!-- </el-form-item>-->
-<!-- </el-col>-->
-<!-- <el-col :span="12">-->
-<!-- <el-form-item label="娓呭崟" prop="substanceId" required>-->
-<!-- <el-select v-model="model.acceptance.substanceId" placeholder="璇烽�夋嫨" style="width: 100%">-->
-<!-- <el-option-->
-<!-- v-for="item in options"-->
-<!-- :key="item.value"-->
-<!-- :label="item.name"-->
-<!-- :value="item.id">-->
-<!-- </el-option>-->
-<!-- </el-select>-->
-<!-- </el-form-item>-->
-<!-- </el-col>-->
-<!-- <el-col :span="12">-->
-<!-- <el-form-item label="鍒拌揣鏃ユ湡">-->
-<!-- <el-date-picker-->
-<!-- v-model="model.acceptance.arriveDate"-->
-<!-- align="right"-->
-<!-- type="date"-->
-<!-- placeholder="閫夋嫨鏃ユ湡"-->
-<!-- style="width: 100%"-->
-<!-- value-format="yyyy-MM-dd"-->
-<!-- >-->
-<!-- </el-date-picker>-->
-<!-- </el-form-item>-->
-<!-- </el-col>-->
-<!-- <el-col :span="12">-->
-<!-- <el-form-item label="缁翠慨鍗曚綅">-->
-<!-- <el-input v-model="model.acceptance.maintenanceUnit"></el-input>-->
-<!-- </el-form-item>-->
-<!-- </el-col>-->
-<!-- <el-col :span="24">-->
-<!-- <el-form-item label="澶囦欢纭">-->
-<!-- <el-button type="primary" style="float: right;" @click="addSpareTable">澧炲姞琛�</el-button>-->
-<!-- </el-form-item>-->
-<!-- </el-col>-->
-<!-- <el-col :span="24">-->
-<!-- <el-form-item>-->
-<!-- <ZTTable-->
-<!-- style="margin-bottom: 20px;"-->
-<!-- :column="spareColumns"-->
-<!-- :table-data="model.list"-->
-<!-- >-->
-<!-- <template slot="name" slot-scope="{ row, index }">-->
-<!-- <el-input v-if="row.isEdit" size="small" v-model="row.name"></el-input>-->
-<!-- <span v-else>{{ row.name }}</span>-->
-<!-- </template>-->
-<!-- <template slot="number" slot-scope="{ row, index }">-->
-<!-- <el-input v-if="row.isEdit" size="small" v-model="row.number"></el-input>-->
-<!-- <span v-else>{{ row.number }}</span>-->
-<!-- </template>-->
-<!-- <template slot="action" slot-scope="{ row, index }">-->
-<!-- <div v-if="row.isEdit">-->
-<!-- <el-button type="text" @click="save(index)">淇濆瓨</el-button>-->
-<!-- <el-button type="text">鍙栨秷</el-button>-->
-<!-- </div>-->
-<!-- <div v-else>-->
-<!-- <el-button type="text" @click="edit(index)">淇敼</el-button>-->
-<!-- </div>-->
-<!-- </template>-->
-<!-- </ZTTable>-->
-<!-- </el-form-item>-->
-<!-- </el-col>-->
-<!-- </el-card>-->
-<!--</template>-->
+<template>
+ <el-card class="card">
+ <el-col :span="12">
+ <el-form-item label="鍘傚浠h〃">
+ <el-input v-model="model.acceptance.producer"></el-input>
+ </el-form-item>
+ </el-col>
+ <el-col :span="12">
+ <el-form-item label="鐩稿叧闄勪欢">
+ <div class="table-between">
+ <el-input v-model="model.acceptance.file" style="width: 82%;"></el-input>
+ <el-upload
+ ref="upload"
+ style="float: left; margin: 0 12px 0 20px;"
+ :action="action"
+ :show-file-list="false"
+ :on-success="onSuccess"
+ >
+ <el-button type="primary">
+ 闄勪欢涓婁紶
+ </el-button>
+ </el-upload>
+ </div>
+ </el-form-item>
+ </el-col>
+ <el-col :span="12">
+ <el-form-item label="鎺ユ敹浜�">
+ <el-input v-model="model.acceptance.recipient"></el-input>
+ </el-form-item>
+ </el-col>
+ <el-col :span="12">
+ <el-form-item label="鎺ュ彈绛惧瓧">
+ <el-input v-model="model.acceptance.signature"></el-input>
+ </el-form-item>
+ </el-col>
+ <el-col :span="12">
+ <el-form-item label="楠屾敹鎯呭喌">
+ <el-input v-model="model.acceptance.situation"></el-input>
+ </el-form-item>
+ </el-col>
+ <el-col :span="12">
+ <el-form-item label="瀹夎璋冭瘯鎯呭喌">
+ <el-input v-model="model.acceptance.installation"></el-input>
+ </el-form-item>
+ </el-col>
+ <el-col :span="12">
+ <el-form-item label="娓呭崟" prop="substanceId" required>
+ <el-select v-model="model.acceptance.substanceId" placeholder="璇烽�夋嫨" style="width: 100%">
+ <el-option
+ v-for="item in options"
+ :key="item.value"
+ :label="item.name"
+ :value="item.id">
+ </el-option>
+ </el-select>
+ </el-form-item>
+ </el-col>
+ <el-col :span="12">
+ <el-form-item label="鍒拌揣鏃ユ湡">
+ <el-date-picker
+ v-model="model.acceptance.arriveDate"
+ align="right"
+ type="date"
+ placeholder="閫夋嫨鏃ユ湡"
+ style="width: 100%"
+ value-format="yyyy-MM-dd"
+ >
+ </el-date-picker>
+ </el-form-item>
+ </el-col>
+ <el-col :span="12">
+ <el-form-item label="缁翠慨鍗曚綅">
+ <el-input v-model="model.acceptance.maintenanceUnit"></el-input>
+ </el-form-item>
+ </el-col>
+ <el-col :span="24">
+ <el-form-item label="澶囦欢纭">
+ <el-button type="primary" style="float: right;" @click="addSpareTable">澧炲姞琛�</el-button>
+ </el-form-item>
+ </el-col>
+ <el-col :span="24">
+ <el-form-item>
+ <lims-table :tableData="model.list" :column="spareColumns" :height="'calc(100vh - 250px)'">
+ <template slot="name" slot-scope="{ row, index }">
+ <el-input v-if="row.isEdit" size="small" v-model="row.name"></el-input>
+ <span v-else>{{ row.name }}</span>
+ </template>
+ <template slot="number" slot-scope="{ row, index }">
+ <el-input v-if="row.isEdit" size="small" v-model="row.number"></el-input>
+ <span v-else>{{ row.number }}</span>
+ </template>
+ <template slot="action" slot-scope="{ row, index }">
+ <div v-if="row.isEdit">
+ <el-button type="text" @click="save(index)">淇濆瓨</el-button>
+ <el-button type="text">鍙栨秷</el-button>
+ </div>
+ <div v-else>
+ <el-button type="text" @click="edit(index)">淇敼</el-button>
+ </div>
+ </template>
+ </lims-table>
+ </el-form-item>
+ </el-col>
+ </el-card>
+</template>
-<!--<script>-->
-<!--import ZTTable from '@/components/caorui/ZTTable/index.vue';-->
-<!--import { getStandardSubstanceAll } from "@/assets/api/api";-->
-<!--import axios from 'axios';-->
+<script>
+// import { getStandardSubstanceAll } from "@/assets/api/api";
+import axios from 'axios';
+import limsTable from '@/components/Table/lims-table.vue'
+import {
+ getStandardSubstanceAll
+} from '@/api/cnas/resourceDemand/standardMaterialAccept/standardMaterialAccept'
-<!--export default {-->
-<!-- components: {-->
-<!-- ZTTable-->
-<!-- },-->
-<!-- props: {-->
-<!-- model: {-->
-<!-- type: Object,-->
-<!-- default: () => {}-->
-<!-- }-->
-<!-- },-->
-<!-- data() {-->
-<!-- return {-->
-<!-- spareColumns: [-->
-<!-- {-->
-<!-- label: "鍚嶇О",-->
-<!-- prop: "name",-->
-<!-- align: "center",-->
-<!-- dataType: "slot",-->
-<!-- slot: "name",-->
-<!-- }, {-->
-<!-- label: "鏁伴噺",-->
-<!-- prop: "number",-->
-<!-- align: "center",-->
-<!-- dataType: "slot",-->
-<!-- slot: "number",-->
-<!-- }, {-->
-<!-- label: "鎿嶄綔",-->
-<!-- align: "center",-->
-<!-- dataType: "slot",-->
-<!-- slot: "action",-->
-<!-- width: 150-->
-<!-- }-->
-<!-- ],-->
-<!-- options: []-->
-<!-- }-->
-<!-- },-->
-<!-- computed: {-->
-<!-- action() {-->
-<!-- return `${this.javaApi}/${this.$api.personnel.saveCNASFile}`-->
-<!-- }-->
-<!-- },-->
-<!-- mounted() {-->
-<!-- this.getStand()-->
-<!-- },-->
-<!-- methods: {-->
-<!-- async getStand() {-->
-<!-- const { code, data } = await axios({-->
-<!-- url: getStandardSubstanceAll,-->
-<!-- method: 'get'-->
-<!-- })-->
-<!-- this.options = data-->
-<!-- },-->
-<!-- addSpareTable() {-->
-<!-- this.model.list.push({-->
-<!-- acceptanceId: this.model.acceptance.id,-->
-<!-- name: '',-->
-<!-- number: '',-->
-<!-- isEdit: true-->
-<!-- })-->
-<!-- },-->
-<!-- onSuccess(response) {-->
-<!-- this.model.acceptance.file = response.data-->
-<!-- this.$emit('update:model', this.model)-->
-<!-- },-->
-<!-- save(index) {-->
-<!-- this.model.list[index].isEdit = false-->
-<!-- this.$emit('update:model', this.model)-->
-<!-- },-->
-<!-- edit(index) {-->
-<!-- this.model.list[index].isEdit = true-->
-<!-- }-->
-<!-- }-->
-<!--}-->
-<!--</script>-->
+export default {
+ components: {
+ limsTable
+ },
+ props: {
+ model: {
+ type: Object,
+ default: () => {}
+ }
+ },
+ data() {
+ return {
+ spareColumns: [
+ {
+ label: "鍚嶇О",
+ prop: "name",
+ align: "center",
+ dataType: "slot",
+ slot: "name",
+ }, {
+ label: "鏁伴噺",
+ prop: "number",
+ align: "center",
+ dataType: "slot",
+ slot: "number",
+ }, {
+ label: "鎿嶄綔",
+ align: "center",
+ dataType: "slot",
+ slot: "action",
+ width: 150
+ }
+ ],
+ options: []
+ }
+ },
+ computed: {
+ action() {
+ return `${this.javaApi}/personBasicInfo/saveCNASFile`
+ }
+ },
+ mounted() {
+ this.getStand()
+ },
+ methods: {
+ async getStand() {
+ getStandardSubstanceAll().then(res => {
+ this.options = res.data
+ })
+ },
+ addSpareTable() {
+ this.model.list.push({
+ acceptanceId: this.model.acceptance.id,
+ name: '',
+ number: '',
+ isEdit: true
+ })
+ },
+ onSuccess(response) {
+ this.model.acceptance.file = response.data
+ this.$emit('update:model', this.model)
+ },
+ save(index) {
+ this.model.list[index].isEdit = false
+ this.$emit('update:model', this.model)
+ },
+ edit(index) {
+ this.model.list[index].isEdit = true
+ }
+ }
+}
+</script>
-<!--<style scoped>-->
-<!--.card {-->
-<!-- margin-top: 1em;-->
-<!-- height: 56vh;-->
-<!-- overflow-y: scroll;-->
-<!--}-->
-<!--.table-between {-->
-<!-- display: flex;-->
-<!-- justify-content: space-between;-->
-<!--}-->
-<!--</style>-->
+<style scoped>
+.card {
+ margin-top: 1em;
+ height: 56vh;
+ overflow-y: scroll;
+}
+.table-between {
+ display: flex;
+ justify-content: space-between;
+}
+</style>
diff --git a/src/views/CNAS/resourceDemand/standardMaterialAccept/index.vue b/src/views/CNAS/resourceDemand/standardMaterialAccept/index.vue
index 1a67d66..241a3c0 100644
--- a/src/views/CNAS/resourceDemand/standardMaterialAccept/index.vue
+++ b/src/views/CNAS/resourceDemand/standardMaterialAccept/index.vue
@@ -23,30 +23,6 @@
</div>
<AddRecord ref="addRecordRef" @submit="submit"></AddRecord>
</div>
-
- <!-- <div class="tables">-->
- <!-- <ZTTable-->
- <!-- :column="columns"-->
- <!-- :table-data="tableData"-->
- <!-- >-->
- <!-- <template slot="action" slot-scope="{ row }">-->
- <!-- <el-button type="text" @click="edit(row)">缂栬緫</el-button>-->
- <!-- </template>-->
- <!-- </ZTTable>-->
- <!-- <div class="pagination">-->
- <!-- <div></div>-->
- <!-- <el-pagination-->
- <!-- :page-size="pagination.pageSize"-->
- <!-- :page-sizes="[10, 20, 30, 40]"-->
- <!-- :total="pagination.total"-->
- <!-- layout="total, sizes, prev, pager, next, jumper"-->
- <!-- @current-change="handleCurrent"-->
- <!-- @size-change="handleSize"-->
- <!-- >-->
- <!-- </el-pagination>-->
- <!-- </div>-->
- <!-- </div>-->
- <!-- <AddRecord ref="addRecordRef" @submit="submit"></AddRecord>-->
</template>
<script>
@@ -56,6 +32,7 @@
// import AddRecord from './components/AddRecord.vue';
import limsTable from '@/components/Table/lims-table.vue'
+import AddRecord from './component/AddRecord.vue';
import {
getPageAcceptance,
updateAcceptanc,
@@ -63,8 +40,8 @@
} from '@/api/cnas/resourceDemand/standardMaterialAccept/standardMaterialAccept'
export default {
components: {
- limsTable
-
+ limsTable,
+ AddRecord
},
data() {
return {
--
Gitblit v1.9.3