From 4da37d48c483d8c8aeb23925ccb33d57cb5a4ccf Mon Sep 17 00:00:00 2001
From: value <z1292839451@163.com>
Date: 星期二, 02 四月 2024 18:04:45 +0800
Subject: [PATCH] 功能调整
---
src/components/tool/word.vue | 5
src/components/tool/value-table.vue | 4
src/components/view/b1-report-preparation.vue | 424 +++++++++++++++++++++++-----------------------
src/main.js | 2
src/components/do/b1-inspect-order-plan/Inspection.vue | 53 +++--
src/components/view/b1-inspect-order-plan.vue | 8
static/js/menu.js | 4
src/util/date.js | 4
src/assets/api/controller.js | 7
9 files changed, 261 insertions(+), 250 deletions(-)
diff --git a/src/assets/api/controller.js b/src/assets/api/controller.js
index a7d66e9..4c25d3e 100644
--- a/src/assets/api/controller.js
+++ b/src/assets/api/controller.js
@@ -14,7 +14,8 @@
StandardTemplate,
insOrder,
sampleOrder,
- insOrderPlan
+ insOrderPlan,
+ insReport
}
}
@@ -176,3 +177,7 @@
delStandardTemplate: "/StandardTemplate/delStandardTemplate", //鍒犻櫎妫�楠屾ā鏉�
getStandardTemplate: "/StandardTemplate/getStandardTemplate", //鏌ヨ鍘熷璁板綍妯℃澘鏋氫妇
}
+
+const insReport = {
+ pageInsReport: "/insReport/pageInsReport", //鏌ヨ妫�楠屾姤鍛婃暟鎹�
+}
diff --git a/src/components/do/b1-inspect-order-plan/Inspection.vue b/src/components/do/b1-inspect-order-plan/Inspection.vue
index 502e308..292874e 100644
--- a/src/components/do/b1-inspect-order-plan/Inspection.vue
+++ b/src/components/do/b1-inspect-order-plan/Inspection.vue
@@ -449,26 +449,26 @@
this.tableList.forEach(a => {
let dels = []
let ids = []
- a.template.forEach(b => {
- if (b.v.ps != undefined && b.v.ps.value === '妫�楠屽瓙椤�') {
- let count = 0
- for (let i in this.currentSample.insProduct) {
- if (this.currentSample.insProduct[i].inspectionItemSubclass === b.v.v && this.currentSample
- .insProduct[i].templateId === a.templateId) {
- ids.push({
- r: b.r,
- id: this.currentSample.insProduct[i].id,
- product: this.currentSample.insProduct[i]
- })
- break
- }
- count++
- }
- if (count === this.currentSample.insProduct.length) {
- dels.push(b)
- }
- }
- })
+ a.template.forEach(b => {
+ if (b.v.ps != undefined && b.v.ps.value === '妫�楠屽瓙椤�') {
+ let count = 0
+ for (let i in this.currentSample.insProduct) {
+ if (this.currentSample.insProduct[i].inspectionItemSubclass === b.v.v && this.currentSample
+ .insProduct[i].templateId === a.templateId) {
+ ids.push({
+ r: b.r,
+ id: this.currentSample.insProduct[i].id,
+ product: this.currentSample.insProduct[i]
+ })
+ break
+ }
+ count++
+ }
+ if (count === this.currentSample.insProduct.length) {
+ dels.push(b)
+ }
+ }
+ })
dels.forEach(del => {
for (let b = 0; b < a.template.length; b++) {
if (a.template[b].r === del.r) {
@@ -591,11 +591,14 @@
this.param[a.id].insValue[i].u = insValue[i].u
}
}catch(e){}
- try{
- this.param[a.id].equipValue.v.v = a.insProductResult.equipValue
- }catch(e){}
- this.param[a.id].resValue.v.v = a.lastValue
- this.param[a.id].insResult.v.v = a.insResult
+ try{
+ this.param[a.id].equipValue.v.v = a.insProductResult.equipValue
+ }catch(e){}
+ try{
+ this.param[a.id].resValue.v.v = a.lastValue
+ this.param[a.id].insResult.v.v = a.insResult
+ }catch(e){
+ }
})
this.handleExcelMethod()
},
diff --git a/src/components/tool/value-table.vue b/src/components/tool/value-table.vue
index 9efd2dd..f6674cc 100644
--- a/src/components/tool/value-table.vue
+++ b/src/components/tool/value-table.vue
@@ -84,10 +84,10 @@
:span-method="spanMethod">
<el-table-column type="selection" width="65" v-if="data.showSelect" :key="Math.random()">
</el-table-column>
- <el-table-column type="index" align="center" label="搴忓彿" width="70" v-if="data.isIndex" :key="Math.random()">
+ <el-table-column type="index" align="center" label="搴忓彿" width="65" v-if="data.isIndex" :key="Math.random()">
</el-table-column>
<el-table-column :prop="a.label" :label="a.value" :sortable="data.sort==false?false:'custom'"
- v-for="(a, ai) in tableHead" :key="ai" show-overflow-tooltip min-width="160">
+ v-for="(a, ai) in tableHead" :key="ai" show-overflow-tooltip min-width="155">
<template slot-scope="scope">
<div v-if="showType(a.label, data.tagField) != null">
<template v-if="typeof(scope.row[a.label]) == 'object'">
diff --git a/src/components/tool/word.vue b/src/components/tool/word.vue
index 749a06c..3aa4d59 100644
--- a/src/components/tool/word.vue
+++ b/src/components/tool/word.vue
@@ -124,5 +124,8 @@
</script>
<style scoped>
-
+ .tinymce-box{
+ width: 100%;
+ height: 100%;
+ }
</style>
diff --git a/src/components/view/b1-inspect-order-plan.vue b/src/components/view/b1-inspect-order-plan.vue
index e75c561..deabb5e 100644
--- a/src/components/view/b1-inspect-order-plan.vue
+++ b/src/components/view/b1-inspect-order-plan.vue
@@ -245,9 +245,9 @@
font: '澶嶆牳',
type: 'text',
method: 'handleReview',
- disabFun: (row, index) => {
- return row.userId == null || row.insState != 4
- }
+ // disabFun: (row, index) => {
+ // return row.userId == null || row.insState != 4
+ // }
}, {
id: '',
font: '璁ら',
@@ -401,7 +401,7 @@
row,
rowIndex
}) {
- if (this.currentTime === row.appointed) {
+ if (this.currentTime == row.appointed) {
return 'highlight-warning-row-border'
} else if (this.currentTime > row.appointed) {
return 'highlight-danger-row-border'
diff --git a/src/components/view/b1-report-preparation.vue b/src/components/view/b1-report-preparation.vue
index 4579292..e5dc31b 100644
--- a/src/components/view/b1-report-preparation.vue
+++ b/src/components/view/b1-report-preparation.vue
@@ -1,235 +1,235 @@
<style scoped>
- .title {
- height: 60px;
- line-height: 60px;
- }
+ .title {
+ height: 60px;
+ line-height: 60px;
+ }
- .search {
- background-color: #fff;
- height: 80px;
- display: flex;
- align-items: center;
- }
+ .search {
+ background-color: #fff;
+ height: 80px;
+ display: flex;
+ align-items: center;
+ }
- .search_thing {
- display: flex;
- align-items: center;
- height: 50px;
- }
+ .search_thing {
+ display: flex;
+ align-items: center;
+ height: 50px;
+ }
- .search_label {
- width: 120px;
- font-size: 14px;
- text-align: right;
- }
+ .search_label {
+ width: 120px;
+ font-size: 14px;
+ text-align: right;
+ }
- .search_input {
- width: calc(100% - 120px);
- }
+ .search_input {
+ width: calc(100% - 120px);
+ }
- .table {
- margin-top: 10px;
- background-color: #fff;
- width: calc(100% - 40px);
- height: calc(100% - 60px - 80px - 10px - 40px);
- padding: 20px;
- }
+ .table {
+ margin-top: 10px;
+ background-color: #fff;
+ width: calc(100% - 40px);
+ height: calc(100% - 60px - 80px - 10px - 40px);
+ padding: 20px;
+ }
- .el-form-item {
- margin-bottom: 16px;
- }
+ .el-form-item {
+ margin-bottom: 16px;
+ }
</style>
<template>
- <div class="inspection_order">
- <div style="width: 100%;height: 100%;">
- <div>
- <el-row class="title">
- <el-col :span="12" style="padding-left: 20px;">鎶ュ憡缂栧埗</el-col>
- </el-row>
- </div>
- <div class="search">
- <div class="search_thing">
- <div class="search_label">鏍峰搧鍚嶇О锛�</div>
- <div class="search_input"><el-input size="small" placeholder="璇疯緭鍏�" clearable
- v-model="componentData.entity.sample" @keyup.enter.native="refreshTable()"></el-input></div>
- </div>
- <div class="search_thing">
- <div class="search_label">鐘舵�侊細</div>
- <div class="search_input">
- <el-select v-model="componentData.entity.status" placeholder="鍏ㄩ儴" size="small">
- <el-option
- v-for="item in statusList"
- :key="item.value"
- :label="item.label"
- :value="item.value">
- </el-option>
- </el-select>
+ <div class="inspection_order">
+ <div style="width: 100%;height: 100%;">
+ <div>
+ <el-row class="title">
+ <el-col :span="12" style="padding-left: 20px;">鎶ュ憡缂栧埗</el-col>
+ </el-row>
+ </div>
+ <div class="search">
+ <div class="search_thing">
+ <div class="search_label">鎶ュ憡缂栧彿锛�</div>
+ <div class="search_input"><el-input size="small" placeholder="璇疯緭鍏�" clearable
+ v-model="componentData.entity.code" @keyup.enter.native="refreshTable()"></el-input></div>
+ </div>
+ <div class="search_thing">
+ <div class="search_label">濮旀墭缂栧彿锛�</div>
+ <div class="search_input">
+ <el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="componentData.entity.entrustCode"
+ @keyup.enter.native="refreshTable()"></el-input>
</div>
- </div>
- <div class="search_thing" style="padding-left: 30px;">
- <el-button size="small" @click="refresh()">閲� 缃�</el-button>
- <el-button size="small" type="primary" @click="refreshTable()">鏌� 璇�</el-button>
- </div>
- </div>
- <div class="table">
- <ValueTable ref="ValueTable" :url="$api.insOrder.selectInsOrderParameter" :componentData="componentData"
- :key="upIndex" @handleWeave="handleWeave"/>
- </div>
- </div>
+ </div>
+ <div class="search_thing" style="padding-left: 30px;">
+ <el-button size="small" @click="refresh()">閲� 缃�</el-button>
+ <el-button size="small" type="primary" @click="refreshTable()">鏌� 璇�</el-button>
+ </div>
+ </div>
+ <div class="table">
+ <ValueTable ref="ValueTable" :url="$api.insReport.pageInsReport" :componentData="componentData"
+ :key="upIndex" />
+ </div>
+ </div>
<el-dialog title="鍦ㄧ嚎缂栧埗" :visible.sync="claimVisible" width="80%" :modal-append-to-body="false">
- <Word style="height:70vh" v-if="claimVisible" ref="Word"/>
- <span slot="footer" class="dialog-footer">
- <el-button @click="claimVisible = false">鍙� 娑�</el-button>
- <el-button type="primary" @click="confirmClaim">纭� 瀹�</el-button>
- </span>
- </el-dialog>
- </div>
+ <Word style="height:70vh" v-if="claimVisible" ref="Word" />
+ <span slot="footer" class="dialog-footer">
+ <el-button @click="claimVisible = false">鍙� 娑�</el-button>
+ <el-button type="primary" @click="confirmClaim">纭� 瀹�</el-button>
+ </span>
+ </el-dialog>
+ </div>
</template>
<script>
- import ValueTable from '../tool/value-table.vue'
+ import ValueTable from '../tool/value-table.vue'
import Word from '../tool/word.vue'
- export default {
- components: {
- ValueTable,
+ export default {
+ components: {
+ ValueTable,
Word,
- },
- data() {
- return {
- componentData: {
- entity: {
- entrustCode: null,
- sample: null,
- state: 1,
- orderBy: {
- field: 'id',
- order: 'asc'
- }
- },
- isIndex: true,
- showSelect: false,
- select: false,
- do: [{
- id: 'handleWeave',
- font: '鍦ㄧ嚎缂栧埗',
- type: 'text',
- method: 'handleWeave',
- disabFun: (row, index) => {
- return row.state != 1
- }
- }, {
- id: 'download',
- font: '涓嬭浇',
- type: 'text',
- method: 'download',
- disabFun: (row, index) => {
- return row.state != 1
- }
- }, {
- id: 'handleUpload',
- font: '涓婁紶',
- type: 'text',
- method: 'handleUpload',
- disabFun: (row, index) => {
- return row.state != 0
- }
- }, {
- id: 'handlRestore',
- font: '杩樺師',
- type: 'text',
- method: 'handleRestore'
- }, {
+ },
+ data() {
+ return {
+ componentData: {
+ entity: {
+ entrustCode: null,
+ code: null,
+ orderBy: {
+ field: 'id',
+ order: 'desc'
+ }
+ },
+ isIndex: true,
+ showSelect: false,
+ select: false,
+ do: [{
+ id: 'handleWeave',
+ font: '鍦ㄧ嚎缂栧埗',
+ type: 'text',
+ method: 'handleWeave',
+ disabFun: (row, index) => {
+ return row.isExamine != null
+ }
+ }, {
+ id: 'download',
+ font: '涓嬭浇',
+ type: 'text',
+ method: 'download'
+ }, {
+ id: 'handleUpload',
+ font: '涓婁紶',
+ type: 'text',
+ method: 'handleUpload',
+ disabFun: (row, index) => {
+ return row.isExamine != null
+ }
+ }, {
+ id: 'handlRestore',
+ font: '杩樺師',
+ type: 'text',
+ method: 'handleRestore',
+ disabFun: (row, index) => {
+ return row.isExamine != null
+ }
+ }, {
id: 'handleIssued',
- font: '瀹℃牳',
- type: 'text',
- method: 'handleIssued',
- disabFun: (row, index) => {
- return row.state != 1 || row.sendTime != null
- }
- }, {
+ font: '瀹℃牳',
+ type: 'text',
+ method: 'handleIssued',
+ disabFun: (row, index) => {
+ return row.isExamine != null
+ }
+ }, {
id: 'handleApprove',
- font: '鎵瑰噯',
- type: 'text',
- method: 'handleApprove',
- disabFun: (row, index) => {
- return row.state != 1 || row.sendTime != null
- }
- }],
- linkEvent:{
- entrustCode:{
- method:'selectAllByOne'
- }
- },
- tagField: {
- type: {
- select: [{
- value: 0,
- type: 'success',
- label: '鏅��'
- }, {
- value: 1,
- type: 'warning',
- label: '浼樺厛'
- }, {
- value: 2,
- type: 'danger',
- label: '绱ф��'
- }]
- },
- createUser: {
- select: []
- }
- },
- selectField: {},
- requiredAdd: [],
- requiredUp: []
- },
- entityCopy: {},
- upIndex: 0,
- statusList:[],
- claimVisible:false
- }
- },
- mounted() {
- this.entityCopy = this.HaveJson(this.componentData.entity)
- this.getPower()
- },
- methods: {
- refreshTable() {
- this.$refs['ValueTable'].selectList()
- },
- refresh() {
- this.componentData.entity = this.HaveJson(this.entityCopy)
- this.upIndex++
- },
- handleWeave(){
+ font: '鎵瑰噯',
+ type: 'text',
+ method: 'handleApprove',
+ disabFun: (row, index) => {
+ return row.isRatify != null
+ }
+ }],
+ linkEvent: {
+ code: {
+ method: 'selectAllByOne'
+ }
+ },
+ tagField: {
+ isRatify: {
+ select: [{
+ value: 0,
+ type: 'danger',
+ label: '涓嶆壒鍑�'
+ }, {
+ value: 1,
+ type: 'success',
+ label: '鎵瑰噯'
+ }]
+ },
+ isExamine: {
+ select: [{
+ value: 0,
+ type: 'danger',
+ label: '涓嶉�氳繃'
+ }, {
+ value: 1,
+ type: 'success',
+ label: '閫氳繃'
+ }]
+ }
+ },
+ selectField: {},
+ requiredAdd: [],
+ requiredUp: []
+ },
+ entityCopy: {},
+ upIndex: 0,
+ statusList: [],
+ claimVisible: false
+ }
+ },
+ mounted() {
+ this.entityCopy = this.HaveJson(this.componentData.entity)
+ this.getPower()
+ },
+ methods: {
+ refreshTable() {
+ this.$refs['ValueTable'].selectList()
+ },
+ refresh() {
+ this.componentData.entity = this.HaveJson(this.entityCopy)
+ this.upIndex++
+ },
+ handleWeave() {
this.claimVisible = true;
},
- // 鏉冮檺鍒嗛厤
- getPower(radio) {
- let power = JSON.parse(sessionStorage.getItem('power'))
- let up = false
- let del = false
- let add = false
- for (var i = 0; i < power.length; i++) {
- if (power[i].menuMethod == 'upInsOrder') {
- up = true
- }
- if (power[i].menuMethod == 'addInsOrder') {
- add = true
- }
- }
- if (!up) {
- this.componentData.do.splice(4, 1)
- }
- },
- handleClose() {
- this.upLoad = false;
- },
- confirmClaim(){
- console.log(11111111111,this.$refs.Word.getValue())
+ // 鏉冮檺鍒嗛厤
+ getPower(radio) {
+ let power = JSON.parse(sessionStorage.getItem('power'))
+ let up = false
+ let del = false
+ let add = false
+ for (var i = 0; i < power.length; i++) {
+ if (power[i].menuMethod == 'upInsOrder') {
+ up = true
+ }
+ if (power[i].menuMethod == 'addInsOrder') {
+ add = true
+ }
+ }
+ if (!up) {
+ this.componentData.do.splice(4, 1)
+ }
+ },
+ handleClose() {
+ this.upLoad = false;
+ },
+ confirmClaim() {
+ console.log(this.$refs.Word.getValue())
+ },
+ selectAllByOne(row){
+ console.log(row);
}
- }
- }
+ }
+ }
</script>
diff --git a/src/main.js b/src/main.js
index def9d78..7c453f6 100644
--- a/src/main.js
+++ b/src/main.js
@@ -13,7 +13,7 @@
//鏈湴
Vue.prototype.LOCATIONVUE = "http://127.0.0.1:80";
-const javaApi = 'http://192.168.0.10:8001';//鏉�
+const javaApi = 'http://127.0.0.1:8001';//鏉�
// const javaApi = 'http://114.132.189.42:9006';//娴嬭瘯鏈�
//鑳滀簯鏈嶅姟鍣�
// Vue.prototype.LOCATIONVUE = "http://syxt.shxiao2.cn";
diff --git a/src/util/date.js b/src/util/date.js
index 5135a21..427486b 100644
--- a/src/util/date.js
+++ b/src/util/date.js
@@ -13,9 +13,9 @@
year = year + '-'
let days = date.getDate()
if (days < 10) {
- days = '0' + days + '-'
+ days = '0' + days
} else {
- days = days + '-'
+ days = days
}
return (year + month + days)
}
diff --git a/static/js/menu.js b/static/js/menu.js
index 0542805..740eaf2 100644
--- a/static/js/menu.js
+++ b/static/js/menu.js
@@ -13,7 +13,7 @@
{
v: "涓氬姟绠$悊",
i: "font icon-kexueyanjiuheshiyankaifa",
- p: "",
+ p: "selectInsOrderParameter selectInsOrderPlanList pageInsReport",
c: [{
v: "妫�楠屼笅鍗�",
i: "font icon-erjidaohang",
@@ -28,7 +28,7 @@
v: "鎶ュ憡缂栧埗",
i: "font icon-erjidaohang",
u: "b1-report-preparation",
- p: ""
+ p: "pageInsReport"
}, {
v: "璐圭敤缁熻",
i: "font icon-erjidaohang",
--
Gitblit v1.9.3