|
@@ -129,6 +129,7 @@
|
|
:disabled="dialogStatus==='update'"
|
|
:disabled="dialogStatus==='update'"
|
|
@select="handleformNameSelect"
|
|
@select="handleformNameSelect"
|
|
@blur="blurformNameSelect"
|
|
@blur="blurformNameSelect"
|
|
|
|
+ style="width: 100%;"
|
|
>
|
|
>
|
|
<template slot-scope="{ item }">
|
|
<template slot-scope="{ item }">
|
|
<div class="name" style="display: inline;">{{ item.cardCode }}</div>
|
|
<div class="name" style="display: inline;">{{ item.cardCode }}</div>
|
|
@@ -137,7 +138,7 @@
|
|
|
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
- <el-col :span="8">
|
|
|
|
|
|
+ <el-col :span="8">
|
|
<el-form-item label="单价:" prop="price">
|
|
<el-form-item label="单价:" prop="price">
|
|
<el-input ref="price" v-model="temp.price" />
|
|
<el-input ref="price" v-model="temp.price" />
|
|
</el-form-item>
|
|
</el-form-item>
|
|
@@ -151,19 +152,26 @@
|
|
<el-row>
|
|
<el-row>
|
|
<el-col :span="8">
|
|
<el-col :span="8">
|
|
<el-form-item label="设备名称:" prop="assetName">
|
|
<el-form-item label="设备名称:" prop="assetName">
|
|
- <el-autocomplete ref="assetName" v-model="temp.assetName" value-key="assetName" class="inline-input" :fetch-suggestions="formNameSearch" placeholder="" disabled @select="handleformNameSelect" />
|
|
|
|
|
|
+ <el-autocomplete ref="assetName" style="width: 100%;" v-model="temp.assetName" value-key="assetName" class="inline-input" :fetch-suggestions="formNameSearch" placeholder="" disabled @select="handleformNameSelect" />
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
|
|
|
|
<el-col :span="8">
|
|
<el-col :span="8">
|
|
<el-form-item label="牧场设备编号:" prop="eqCode">
|
|
<el-form-item label="牧场设备编号:" prop="eqCode">
|
|
- <el-autocomplete ref="eqCode" v-model="temp.eqCode" value-key="eqCode" class="inline-input" :fetch-suggestions="formNumberSearch" placeholder="" disabled @select="handleformNameSelect">
|
|
|
|
|
|
+ <el-autocomplete ref="eqCode" style="width: 100%;" v-model="temp.eqCode" value-key="eqCode" class="inline-input" :fetch-suggestions="formNumberSearch" placeholder="" disabled @select="handleformNameSelect">
|
|
<template slot-scope="{ item }">
|
|
<template slot-scope="{ item }">
|
|
<div class="name" style="display: inline;">{{ item.assetNumber }}</div>
|
|
<div class="name" style="display: inline;">{{ item.assetNumber }}</div>
|
|
</template>
|
|
</template>
|
|
</el-autocomplete>
|
|
</el-autocomplete>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
|
|
+ <el-col :span="8">
|
|
|
|
+ <el-form-item label="柴油类型:" prop="oilType">
|
|
|
|
+ <el-select style="width: 100%;" v-model="temp.oilType" placeholder="柴油类型" class="filter-item">
|
|
|
|
+ <el-option v-for="item in dieselTypeList" :key="item.value" :label="item.label" :value="item.value" />
|
|
|
|
+ </el-select>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-col>
|
|
</el-row>
|
|
</el-row>
|
|
<el-row>
|
|
<el-row>
|
|
<el-col :span="8">
|
|
<el-col :span="8">
|
|
@@ -193,7 +201,7 @@
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="8">
|
|
<el-col :span="8">
|
|
<el-form-item label="录入人:" prop="inputId">
|
|
<el-form-item label="录入人:" prop="inputId">
|
|
- <el-select v-model="temp.inputId" placeholder="负责人" :disabled="dialogStatus==='update'" class="filter-item">
|
|
|
|
|
|
+ <el-select v-model="temp.inputId" placeholder="负责人" :disabled="dialogStatus==='update'" style="width: 100%;">
|
|
<el-option v-for="item in findAllEmploye" :key="item.id" :label="item.name" :value="item.id" />
|
|
<el-option v-for="item in findAllEmploye" :key="item.id" :label="item.name" :value="item.id" />
|
|
</el-select>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
@@ -309,7 +317,7 @@
|
|
<script>
|
|
<script>
|
|
// 引入
|
|
// 引入
|
|
require('script-loader!file-saver')
|
|
require('script-loader!file-saver')
|
|
-import { GetDataByName, GetDataByNames, PostDataByName, checkButtons, ExecDataByConfig, failproccess, GetAccount } from '@/api/common'
|
|
|
|
|
|
+import { GetDataByName, GetDataByNames, PostDataByName, checkButtons, ExecDataByConfig, failproccess, GetAccount,getJson } from '@/api/common'
|
|
// import { DownloadExcel, GetDataByNameXlsx } from '@/api/common'
|
|
// import { DownloadExcel, GetDataByNameXlsx } from '@/api/common'
|
|
import waves from '@/directive/waves'
|
|
import waves from '@/directive/waves'
|
|
import { parseTime, sortChange } from '@/utils/index.js'
|
|
import { parseTime, sortChange } from '@/utils/index.js'
|
|
@@ -398,7 +406,8 @@ export default {
|
|
note: '',
|
|
note: '',
|
|
eqId: '',
|
|
eqId: '',
|
|
eqCode: '',
|
|
eqCode: '',
|
|
- oilcardId: ''
|
|
|
|
|
|
+ oilcardId: '',
|
|
|
|
+ oilType:''
|
|
},
|
|
},
|
|
dialogFormVisible: false,
|
|
dialogFormVisible: false,
|
|
dialogStatus: '',
|
|
dialogStatus: '',
|
|
@@ -426,6 +435,7 @@ export default {
|
|
cardNumber: [{ required: true, message: '必填', trigger: 'blur' }],
|
|
cardNumber: [{ required: true, message: '必填', trigger: 'blur' }],
|
|
price: [{ required: true, message: '必填', trigger: 'blur' }],
|
|
price: [{ required: true, message: '必填', trigger: 'blur' }],
|
|
oilAmount: [{ required: true, message: '必填', trigger: 'blur' }],
|
|
oilAmount: [{ required: true, message: '必填', trigger: 'blur' }],
|
|
|
|
+ oilType: [{ required: true, message: '必填', trigger: 'blur' }],
|
|
endAmount: [{ type: 'number', required: true, validator: (rule, value, callback) => {
|
|
endAmount: [{ type: 'number', required: true, validator: (rule, value, callback) => {
|
|
console.log(rule, value, callback)
|
|
console.log(rule, value, callback)
|
|
if (!value) {
|
|
if (!value) {
|
|
@@ -456,7 +466,8 @@ export default {
|
|
isPercentage: false,
|
|
isPercentage: false,
|
|
percentage: 1,
|
|
percentage: 1,
|
|
dialogFormDelete: false,
|
|
dialogFormDelete: false,
|
|
- deleteTemp: {}
|
|
|
|
|
|
+ deleteTemp: {},
|
|
|
|
+ dieselTypeList:[]
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
|
|
@@ -489,9 +500,21 @@ export default {
|
|
})
|
|
})
|
|
this.get_select_list()
|
|
this.get_select_list()
|
|
this.get_table_data()
|
|
this.get_table_data()
|
|
|
|
+ this.getDieselTypeList()
|
|
},
|
|
},
|
|
|
|
|
|
methods: {
|
|
methods: {
|
|
|
|
+ getDieselTypeList(){
|
|
|
|
+ let url = 'authdata/diesel/type/list'
|
|
|
|
+ let data = ''
|
|
|
|
+ getJson(url, data).then(response => {
|
|
|
|
+ if (response.code == 200) {
|
|
|
|
+ this.dieselTypeList = response.data.diesel_type
|
|
|
|
+ } else {
|
|
|
|
+ this.dieselTypeList = []
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ },
|
|
tableSort1(column) {
|
|
tableSort1(column) {
|
|
sortChange(column, this.list)
|
|
sortChange(column, this.list)
|
|
},
|
|
},
|
|
@@ -880,10 +903,13 @@ export default {
|
|
}, 1000)
|
|
}, 1000)
|
|
this.$refs['temp'].validate(valid => {
|
|
this.$refs['temp'].validate(valid => {
|
|
if (valid) {
|
|
if (valid) {
|
|
|
|
+ if(this.temp.oilType){
|
|
|
|
+ var oilName = this.dieselTypeList.find(obj => obj.value == this.temp.oilType).label
|
|
|
|
+ }
|
|
|
|
+ this.$set(this.temp,'oilName',oilName)
|
|
this.postDataPramas.common = { 'returnmap': '0' }
|
|
this.postDataPramas.common = { 'returnmap': '0' }
|
|
this.postDataPramas.data = []
|
|
this.postDataPramas.data = []
|
|
this.postDataPramas.data[0] = { 'name': 'insertDiesel', 'type': 'e', 'parammaps': {
|
|
this.postDataPramas.data[0] = { 'name': 'insertDiesel', 'type': 'e', 'parammaps': {
|
|
-
|
|
|
|
'pastureId': this.temp.pastureId,
|
|
'pastureId': this.temp.pastureId,
|
|
'selTime': this.temp.selTime,
|
|
'selTime': this.temp.selTime,
|
|
'oilClass': this.temp.oilClass,
|
|
'oilClass': this.temp.oilClass,
|
|
@@ -897,9 +923,10 @@ export default {
|
|
'cardNumber': this.temp.cardNumber,
|
|
'cardNumber': this.temp.cardNumber,
|
|
'price': this.temp.price,
|
|
'price': this.temp.price,
|
|
'empId': this.temp.empId,
|
|
'empId': this.temp.empId,
|
|
- 'inputId': this.temp.inputId
|
|
|
|
|
|
+ 'inputId': this.temp.inputId,
|
|
|
|
+ 'oilType':this.temp.oilType,
|
|
|
|
+ 'oilName':this.temp.oilName,
|
|
}}
|
|
}}
|
|
-
|
|
|
|
this.postDataPramas.data[1] = { 'name': 'updateOilCardExecData', 'type': 'e',
|
|
this.postDataPramas.data[1] = { 'name': 'updateOilCardExecData', 'type': 'e',
|
|
'parammaps': {
|
|
'parammaps': {
|
|
'id': this.temp.oilcardId,
|
|
'id': this.temp.oilcardId,
|
|
@@ -935,8 +962,13 @@ export default {
|
|
setTimeout(() => {
|
|
setTimeout(() => {
|
|
this.isokDisable = false
|
|
this.isokDisable = false
|
|
}, 1000)
|
|
}, 1000)
|
|
|
|
+
|
|
this.$refs['temp'].validate(valid => {
|
|
this.$refs['temp'].validate(valid => {
|
|
if (valid) {
|
|
if (valid) {
|
|
|
|
+ if(this.temp.oilType){
|
|
|
|
+ var oilName = this.dieselTypeList.find(obj => obj.value == this.temp.oilType).label
|
|
|
|
+ }
|
|
|
|
+ this.$set(this.temp,'oilName',oilName)
|
|
this.postDataPramas.common = { 'returnmap': '0' }
|
|
this.postDataPramas.common = { 'returnmap': '0' }
|
|
this.postDataPramas.data = []
|
|
this.postDataPramas.data = []
|
|
this.postDataPramas.data[0] = { 'name': 'insertDiesel', 'type': 'e', 'parammaps': {
|
|
this.postDataPramas.data[0] = { 'name': 'insertDiesel', 'type': 'e', 'parammaps': {
|
|
@@ -954,7 +986,9 @@ export default {
|
|
'cardNumber': this.temp.cardNumber,
|
|
'cardNumber': this.temp.cardNumber,
|
|
'price': this.temp.price,
|
|
'price': this.temp.price,
|
|
'empId': this.temp.empId,
|
|
'empId': this.temp.empId,
|
|
- 'inputId': this.temp.inputId
|
|
|
|
|
|
+ 'inputId': this.temp.inputId,
|
|
|
|
+ 'oilType':this.temp.oilType,
|
|
|
|
+ 'oilName':this.temp.oilName,
|
|
}}
|
|
}}
|
|
|
|
|
|
this.postDataPramas.data[1] = { 'name': 'updateOilCardExecData', 'type': 'e',
|
|
this.postDataPramas.data[1] = { 'name': 'updateOilCardExecData', 'type': 'e',
|
|
@@ -996,6 +1030,10 @@ export default {
|
|
edit_dialog_save() {
|
|
edit_dialog_save() {
|
|
this.$refs['temp'].validate(valid => {
|
|
this.$refs['temp'].validate(valid => {
|
|
if (valid) {
|
|
if (valid) {
|
|
|
|
+ if(this.temp.oilType){
|
|
|
|
+ var oilName = this.dieselTypeList.find(obj => obj.value == this.temp.oilType).label
|
|
|
|
+ }
|
|
|
|
+ this.$set(this.temp,'oilName',oilName)
|
|
this.postDataPramas.common = { 'returnmap': '0' }
|
|
this.postDataPramas.common = { 'returnmap': '0' }
|
|
this.postDataPramas.data = []
|
|
this.postDataPramas.data = []
|
|
this.postDataPramas.data[0] = { 'name': 'updateDieselExecData', 'type': 'e', 'parammaps': {
|
|
this.postDataPramas.data[0] = { 'name': 'updateDieselExecData', 'type': 'e', 'parammaps': {
|
|
@@ -1003,7 +1041,9 @@ export default {
|
|
'oilAmount': this.temp.oilAmount,
|
|
'oilAmount': this.temp.oilAmount,
|
|
'note': this.temp.note,
|
|
'note': this.temp.note,
|
|
'nowPrice': this.temp.price * this.temp.oilAmount,
|
|
'nowPrice': this.temp.price * this.temp.oilAmount,
|
|
- 'price': this.temp.price
|
|
|
|
|
|
+ 'price': this.temp.price,
|
|
|
|
+ 'oilType':this.temp.oilType,
|
|
|
|
+ 'oilName':this.temp.oilName,
|
|
}}
|
|
}}
|
|
|
|
|
|
this.postDataPramas.data[1] = { 'name': 'updateOilCardLAExecData', 'type': 'e',
|
|
this.postDataPramas.data[1] = { 'name': 'updateOilCardLAExecData', 'type': 'e',
|