From fcbba75febaa36d23c6c49473ab5bcee0e1a2c04 Mon Sep 17 00:00:00 2001
From: spring <2396852758@qq.com>
Date: 星期二, 08 四月 2025 09:37:11 +0800
Subject: [PATCH] 检验项目新增是否委托要求字段
---
src/views/statisticalCharts/itemInspectionAnalysis/index.vue | 156 +++++++++++++++++++++-------------------------------
1 files changed, 63 insertions(+), 93 deletions(-)
diff --git a/src/views/statisticalCharts/itemInspectionAnalysis/index.vue b/src/views/statisticalCharts/itemInspectionAnalysis/index.vue
index 29616cd..39c9d7d 100644
--- a/src/views/statisticalCharts/itemInspectionAnalysis/index.vue
+++ b/src/views/statisticalCharts/itemInspectionAnalysis/index.vue
@@ -3,16 +3,8 @@
<div v-if="!isShowDataCom">
<el-form ref="entity" size="small" :inline="true">
<el-form-item style="width: 16%;">
- <el-date-picker
- v-model="datePicker"
- end-placeholder="缁撴潫鏃ユ湡"
- format="yyyy-MM-dd"
- placeholder="閫夋嫨鏃ユ湡"
- range-separator="鑷�"
- size="small"
- start-placeholder="寮�濮嬫棩鏈�"
- style="width: 100%;"
- type="daterange"
+ <el-date-picker v-model="datePicker" end-placeholder="缁撴潫鏃ユ湡" format="yyyy-MM-dd" placeholder="閫夋嫨鏃ユ湡"
+ range-separator="鑷�" size="small" start-placeholder="寮�濮嬫棩鏈�" style="width: 100%;" type="daterange"
value-format="yyyy-MM-dd">
</el-date-picker>
</el-form-item>
@@ -26,13 +18,9 @@
<el-input v-model="supplierName" clearable placeholder="璇疯緭鍏ヤ緵搴斿晢鍚嶇О" size="small"></el-input>
</el-form-item>
<el-form-item label="妫�楠岄」鍚嶇О" prop="supplierName">
- <el-select v-model="itemNames" :loading="selectLoading" clearable multiple placeholder="璇烽�夋嫨"
- size="small" style="width: 90%;" @focus="getItemList">
- <el-option
- v-for="item in itemNamesList"
- :key="item.value"
- :label="item.label"
- :value="item.value">
+ <el-select v-model="itemNames" :loading="selectLoading" clearable multiple placeholder="璇烽�夋嫨" size="small"
+ style="width: 90%;" @focus="getItemList">
+ <el-option v-for="item in itemNamesList" :key="item.value" :label="item.label" :value="item.value">
</el-option>
</el-select>
</el-form-item>
@@ -49,10 +37,8 @@
<div>鍘熸潗鏂欓」妫�鍒嗘瀽鍒楄〃</div>
<el-button size="small" type="primary" @click="openShowData">鏌ョ湅鏁版嵁鍒嗘瀽</el-button>
</div>
- <lims-table :tableData="editTableData" :column="editColumn"
- height="400" key="tableData" :isSelection="true"
- :handleSelectionChange="handleSelectionChange"
- :tableLoading="editLoading"></lims-table>
+ <lims-table :tableData="editTableData" :column="editColumn" height="400" key="tableData" :isSelection="true"
+ :handleSelectionChange="handleSelectionChange" :tableLoading="editLoading"></lims-table>
</div>
</el-col>
</el-row>
@@ -60,14 +46,9 @@
<el-col :span="6" style="padding-top: 14px">
<div style="display: flex;margin-left: 10px;align-items: center">
<span style="width: 100px">鍒嗙粍绫诲瀷锛�</span>
- <el-select v-model="groupType" clearable placeholder="璇烽�夋嫨"
- size="small"
- style="width: 90%;" @change="getBarInfo">
- <el-option
- v-for="item in groupTypeList"
- :key="item.value"
- :label="item.label"
- :value="item.value">
+ <el-select v-model="groupType" clearable placeholder="璇烽�夋嫨" size="small" style="width: 90%;"
+ @change="getBarInfo">
+ <el-option v-for="item in groupTypeList" :key="item.value" :label="item.label" :value="item.value">
</el-option>
</el-select>
</div>
@@ -77,16 +58,8 @@
<el-col :span="24">
<div class="inspection-card">
<div class="title">妫�楠岄」鏁版嵁瀵规瘮</div>
- <Echarts ref="chart"
- :chartStyle="chartStyle"
- :dataset="dataset"
- :grid="grid"
- :options="echartsOptions"
- :series="echartsSeries"
- :tooltip="tooltip"
- :xAxis="xAxis"
- :yAxis="yAxis"
- style="height: 40vh;"></Echarts>
+ <Echarts ref="chart" :chartStyle="chartStyle" :dataset="dataset" :grid="grid" :options="echartsOptions"
+ :series="echartsSeries" :tooltip="tooltip" :xAxis="xAxis" :yAxis="yAxis" style="height: 40vh;"></Echarts>
</div>
</el-col>
</el-row>
@@ -94,29 +67,21 @@
<el-col :span="24">
<div class="inspection-card">
<div class="title">鍘熸潗鏂欓」妫�鍚堟牸鐜�</div>
- <Echarts ref="chart"
- :chartStyle="chartStyle"
- :dataset="dataset1"
- :grid="grid"
- :options="echartsOptions1"
- :series="echartsSeries1"
- :tooltip="tooltip"
- :xAxis="xAxis"
- :yAxis="yAxis1"
- style="height: 40vh;"></Echarts>
+ <Echarts ref="chart" :chartStyle="chartStyle" :dataset="dataset1" :grid="grid" :options="echartsOptions1"
+ :series="echartsSeries1" :tooltip="tooltip" :xAxis="xAxis" :yAxis="yAxis1" style="height: 40vh;">
+ </Echarts>
</div>
</el-col>
</el-row>
</div>
<el-dialog :visible.sync="dataDialogVisible" title="鏁版嵁鏌ョ湅" width="80%">
<div v-if="dataDialogVisible" style="height: 70vh;overflow-y: auto;">
- <lims-table :tableData="tableData" :column="column"
- @pagination="pagination" key="tableData"
- :page="page" :tableLoading="tableLoading"></lims-table>
+ <lims-table :tableData="tableData" :column="column" @pagination="pagination" key="tableData" :page="page"
+ :tableLoading="tableLoading"></lims-table>
</div>
</el-dialog>
- <DataComparison v-if="isShowDataCom" :comparisonData="comparisonData"
- :selectRow="selectRow" @goBack="goBack"></DataComparison>
+ <DataComparison v-if="isShowDataCom" :comparisonData="comparisonData" :selectRow="selectRow" @goBack="goBack">
+ </DataComparison>
</div>
</template>
@@ -130,20 +95,20 @@
getRawProductAnalysisAllList,
getRawProductAnalysisRawPass, getRawSupplierCompare
} from "@/api/statisticalCharts/dataAnalysis";
-import {selectSampleAndProductByOrderId} from "@/api/business/rawMaterialOrder";
+import { selectSampleAndProductByOrderId } from "@/api/business/rawMaterialOrder";
export default {
name: "ItemInspectionAnalysis",
// import 寮曞叆鐨勭粍浠堕渶瑕佹敞鍏ュ埌瀵硅薄涓墠鑳戒娇鐢�
- components: {limsTable, Echarts, DataComparison},
+ components: { limsTable, Echarts, DataComparison },
data() {
// 杩欓噷瀛樻斁鏁版嵁
return {
selectChangeRows: [], // 閫変腑鐨勬暟鎹�
groupTypeList: [
- {label: '鏍峰搧', value: '0'},
- {label: '鍚屼竴鍘傚, 鍚屼竴鍨嬪彿, 涓嶅悓鎵规', value: '1'},
- {label: '鍚屼竴鍨嬪彿, 涓嶅悓鍘傚', value: '2'},
+ { label: '鏍峰搧', value: '0' },
+ { label: '鍚屼竴鍘傚, 鍚屼竴鍨嬪彿, 涓嶅悓鎵规', value: '1' },
+ { label: '鍚屼竴鍨嬪彿, 涓嶅悓鍘傚', value: '2' },
],
itemNames: [], // 妫�楠岄」鍚嶇О
itemNamesList: [],
@@ -241,15 +206,15 @@
label: '鏍峰搧鍨嬪彿',
minWidth: '300px',
prop: 'sampleModel'
- },{
+ }, {
label: '涓嬪彂鏃堕棿',
minWidth: '120px',
prop: 'sendTime'
- },{
+ }, {
label: '鎶佃揪鐨勯噰璐暟閲�',
minWidth: '130px',
prop: 'qtyArrived'
- },{
+ }, {
label: '鍗曚綅',
minWidth: '120px',
prop: 'buyUnitMeas'
@@ -276,17 +241,17 @@
tableData: [],
tableLoading: false,
column: [
- {label: '鏍峰搧缂栧彿', prop: 'sampleCode'},
- {label: '鏍峰搧鍚嶇О', prop: 'sample'},
- {label: '妫�楠岄」鍒嗙被', prop: 'inspectionItemClass'},
- {label: '妫�楠岄」', prop: 'inspectionItem'},
- {label: '妫�楠屽瓙椤�', prop: 'inspectionItemSubclass'},
- {label: '鍗曚綅', prop: 'unit'},
- {label: '鏍峰搧鍨嬪彿', prop: 'model'},
- {label: '鏉′欢', prop: 'radius'},
- {label: '鐢电紗鏍囪瘑', prop: 'cableTag'},
- {label: '璇曢獙瑕佹眰', prop: 'tell'},
- {label: '妫�楠岀粨鏋�', prop: 'lastValue'},
+ { label: '鏍峰搧缂栧彿', prop: 'sampleCode' },
+ { label: '鏍峰搧鍚嶇О', prop: 'sample' },
+ { label: '妫�楠岄」鍒嗙被', prop: 'inspectionItemClass' },
+ { label: '妫�楠岄」', prop: 'inspectionItem' },
+ { label: '妫�楠屽瓙椤�', prop: 'inspectionItemSubclass' },
+ { label: '鍗曚綅', prop: 'unit' },
+ { label: '鏍峰搧鍨嬪彿', prop: 'model' },
+ { label: '鏉′欢', prop: 'radius' },
+ { label: '鐢电紗鏍囪瘑', prop: 'cableTag' },
+ { label: '璇曢獙瑕佹眰', prop: 'tell' },
+ { label: '妫�楠岀粨鏋�', prop: 'lastValue' },
{
dataType: 'tag',
label: '缁撴灉鍒ゅ畾',
@@ -309,16 +274,17 @@
return 'danger'
} else if (params == 3) {
return ''
- } else {
+ } else {
return null
}
}
- }
+ },
+ { label: "妫�楠屼汉", prop: "checkUserName" },
],
page: {
- total:0,
- size:10,
- current:1
+ total: 0,
+ size: 10,
+ current: 1
},
currentRow: {},
isShowDataCom: false,
@@ -331,7 +297,7 @@
},
// 鏂规硶闆嗗悎
methods: {
- getBarInfo (val) {
+ getBarInfo(val) {
if (val === '1') {
if (!this.modelName || !this.supplierName) {
this.$message.warning('鍨嬪彿鎴栦緵搴斿晢涓嶈兘涓虹┖')
@@ -371,10 +337,12 @@
return
}
for (let i = 0; i < res.data.itemNames.length; i++) {
- this.echartsSeries.push({type: 'line', label: {
+ this.echartsSeries.push({
+ type: 'line', label: {
show: true,
position: 'top'
- },})
+ },
+ })
}
this.dataset.dimensions = this.HaveJson(res.data.itemNames)
this.dataset.dimensions.unshift('product')
@@ -399,15 +367,17 @@
return
}
for (let i = 0; i < res.data.itemNames.length; i++) {
- this.echartsSeries1.push({type: 'line',tooltip: {
+ this.echartsSeries1.push({
+ type: 'line', tooltip: {
valueFormatter: function (value) {
return value + '%';
}
- },label: {
+ }, label: {
show: true,
position: 'top',
formatter: (params) => params.value[params.dimensionNames[params.encode.y[0]]] + '%'
- },})
+ },
+ })
}
this.dataset1.dimensions = this.HaveJson(res.data.itemNames)
this.dataset1.dimensions.unshift('product')
@@ -423,7 +393,7 @@
},
// 鏌ヨ鍥炶皟
refreshTable(row) {
- selectSampleAndProductByOrderId({id: row.id}).then(res => {
+ selectSampleAndProductByOrderId({ id: row.id, ...this.page }).then(res => {
this.tableLoading = false
if (res.code === 200) {
this.tableData = res.data.records
@@ -433,11 +403,11 @@
this.tableLoading = false
})
},
- pagination (page) {
+ pagination(page) {
this.page.size = page.limit
this.refreshTable(this.currentRow)
},
- changeData () {
+ changeData() {
if (this.datePicker !== null && this.datePicker.length > 0) {
this.beginDate = this.datePicker[0] + ' 00:00:00'
this.endDate = this.datePicker[1] + ' 23:59:59'
@@ -449,7 +419,7 @@
this.getBar1()
this.getTableData()
},
- getTableData () {
+ getTableData() {
this.editLoading = true
const params = {
beginDate: this.beginDate,
@@ -467,7 +437,7 @@
})
},
// 鑾峰彇妫�楠岄」涓嬫媺妗�
- getItemList () {
+ getItemList() {
this.selectLoading = true
this.itemNamesList = []
const params = {
@@ -490,10 +460,10 @@
this.selectLoading = false
})
},
- goBack () {
+ goBack() {
this.isShowDataCom = false
},
- openShowData () {
+ openShowData() {
if (this.selectChangeRows.length !== 5) {
this.$message.warning('璇烽�夋嫨5鏉℃暟鎹�')
return
@@ -520,7 +490,7 @@
this.isShowDataCom = true
})
},
- handleSelectionChange (val) {
+ handleSelectionChange(val) {
this.selectChangeRows = val
},
},
@@ -528,7 +498,7 @@
</script>
<style scoped>
-.inspection-card{
+.inspection-card {
width: 100%;
margin-top: 10px;
}
--
Gitblit v1.9.3