|  | @@ -317,7 +317,7 @@
 | 
	
		
			
				|  |  |  <script>
 | 
	
		
			
				|  |  |  // 引入
 | 
	
		
			
				|  |  |  require('script-loader!file-saver')
 | 
	
		
			
				|  |  | -import { GetDataByName, GetDataByNames, PostDataByName, checkButtons, ExecDataByConfig, failproccess, GetAccount,getJson } from '@/api/common'
 | 
	
		
			
				|  |  | +import { GetDataByName, GetDataByNames, PostDataByName,postJson, checkButtons, ExecDataByConfig, failproccess, GetAccount,getJson } from '@/api/common'
 | 
	
		
			
				|  |  |  // import {  DownloadExcel, GetDataByNameXlsx } from '@/api/common'
 | 
	
		
			
				|  |  |  import waves from '@/directive/waves'
 | 
	
		
			
				|  |  |  import { parseTime, sortChange } from '@/utils/index.js'
 | 
	
	
		
			
				|  | @@ -482,14 +482,14 @@ export default {
 | 
	
		
			
				|  |  |      uploadData() {
 | 
	
		
			
				|  |  |        return {
 | 
	
		
			
				|  |  |          name: 'importDiesel',
 | 
	
		
			
				|  |  | -        importParams: '牧场,油卡编号,设备名称,设备编号,加油日期,加油量(升),单价,录入人,加油人,加油工班,备注',
 | 
	
		
			
				|  |  | +        importParams: '牧场,油卡编号,设备名称,设备编号,加油日期,加油量(升),单价,录入人,加油人,加油工班,备注,柴油类型',
 | 
	
		
			
				|  |  |          sheetname: 'SheetJS'
 | 
	
		
			
				|  |  |        }
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |      // 设置上传地址
 | 
	
		
			
				|  |  |      uploadExcelUrl() {
 | 
	
		
			
				|  |  |        // process.env.VUE_APP_BASE_API是服务器的路径,也是axios的基本路径
 | 
	
		
			
				|  |  | -      return process.env.VUE_APP_BASE_API + 'authdata/ImportExcel'
 | 
	
		
			
				|  |  | +      return process.env.VUE_APP_BASE_API + 'authdata/diese/import/excel'
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |    },
 | 
	
		
			
				|  |  |    created() {
 | 
	
	
		
			
				|  | @@ -717,10 +717,10 @@ export default {
 | 
	
		
			
				|  |  |              const list1 = response.data.list
 | 
	
		
			
				|  |  |              console.log(list1,'list1')
 | 
	
		
			
				|  |  |              const tHeader = [
 | 
	
		
			
				|  |  | -              '编号', '牧场', '油卡编号', '设备名称', '设备编号', '加油日期', '加油量(升)', '单价', '录入人', '加油人', '加油工班', '备注'
 | 
	
		
			
				|  |  | +              '编号', '牧场', '油卡编号', '设备名称', '设备编号', '加油日期', '加油量(升)', '单价', '录入人', '加油人', '加油工班', '备注','柴油类型'
 | 
	
		
			
				|  |  |              ]
 | 
	
		
			
				|  |  |              const filterVal = [
 | 
	
		
			
				|  |  | -              'i', 'pastureName', 'cardNumber', 'assetName', 'assetNumber', 'day', '加油量(L)', '单价', 'name', '加油人', '加油工班', '备注'
 | 
	
		
			
				|  |  | +              'i', 'pastureName', 'cardNumber', 'assetName', 'assetNumber', 'day', '加油量(L)', '单价', 'name', '加油人', '加油工班', '备注','柴油类型'
 | 
	
		
			
				|  |  |              ]
 | 
	
		
			
				|  |  |              const data1 = this.formatJson(filterVal, list1)
 | 
	
		
			
				|  |  |              excel.export_json_to_excel({
 | 
	
	
		
			
				|  | @@ -907,34 +907,32 @@ export default {
 | 
	
		
			
				|  |  |              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.data = []
 | 
	
		
			
				|  |  | -          this.postDataPramas.data[0] = { 'name': 'insertDiesel', 'type': 'e', 'parammaps': {
 | 
	
		
			
				|  |  | -            'pastureId': this.temp.pastureId,
 | 
	
		
			
				|  |  | -            'selTime': this.temp.selTime,
 | 
	
		
			
				|  |  | -            'oilClass': this.temp.oilClass,
 | 
	
		
			
				|  |  | -            'oilAmount': this.temp.oilAmount,
 | 
	
		
			
				|  |  | -            'eqId': this.temp.eqId,
 | 
	
		
			
				|  |  | -            'eqCode': this.temp.eqCode,
 | 
	
		
			
				|  |  | -            'departmentId': this.temp.departmentId,
 | 
	
		
			
				|  |  | -            'note': this.temp.note,
 | 
	
		
			
				|  |  | -            'nowPrice': this.temp.price * this.temp.oilAmount,
 | 
	
		
			
				|  |  | -            'oilcardId': this.temp.oilcardId,
 | 
	
		
			
				|  |  | -            'cardNumber': this.temp.cardNumber,
 | 
	
		
			
				|  |  | -            'price': this.temp.price,
 | 
	
		
			
				|  |  | -            'empId': this.temp.empId,
 | 
	
		
			
				|  |  | -            'inputId': this.temp.inputId,
 | 
	
		
			
				|  |  | -            'oilType':this.temp.oilType,
 | 
	
		
			
				|  |  | -            'oilName':this.temp.oilName,
 | 
	
		
			
				|  |  | -          }}
 | 
	
		
			
				|  |  | -          this.postDataPramas.data[1] = { 'name': 'updateOilCardExecData', 'type': 'e',
 | 
	
		
			
				|  |  | -            'parammaps': {
 | 
	
		
			
				|  |  | -              'id': this.temp.oilcardId,
 | 
	
		
			
				|  |  | -              'nowPrice': this.temp.price * this.temp.oilAmount
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -            }}
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -          ExecDataByConfig(this.postDataPramas).then(response => {
 | 
	
		
			
				|  |  | +          if(this.temp.eqId == '' || this.temp.eqId == null || this.temp.eqId == undefined){
 | 
	
		
			
				|  |  | +            this.temp.eqId = 0
 | 
	
		
			
				|  |  | +          }else{
 | 
	
		
			
				|  |  | +            this.temp.eqId = parseFloat(this.temp.eqId)
 | 
	
		
			
				|  |  | +          }
 | 
	
		
			
				|  |  | +          let url = 'authdata/diese/add'
 | 
	
		
			
				|  |  | +          let data = {
 | 
	
		
			
				|  |  | +            pastureId:this.temp.pastureId,
 | 
	
		
			
				|  |  | +            selTime: this.temp.selTime,
 | 
	
		
			
				|  |  | +            oilClass:this.temp.oilClass,
 | 
	
		
			
				|  |  | +            oilAmount: this.temp.oilAmount,
 | 
	
		
			
				|  |  | +            eqId: this.temp.eqId,
 | 
	
		
			
				|  |  | +            eqCode: this.temp.eqCode,
 | 
	
		
			
				|  |  | +            departmentId: this.temp.departmentId,
 | 
	
		
			
				|  |  | +            note: this.temp.note,
 | 
	
		
			
				|  |  | +            nowPrice: this.temp.price * this.temp.oilAmount,
 | 
	
		
			
				|  |  | +            oilcardId: this.temp.oilcardId,
 | 
	
		
			
				|  |  | +            cardNumber: this.temp.cardNumber,
 | 
	
		
			
				|  |  | +            price: this.temp.price,
 | 
	
		
			
				|  |  | +            empId: this.temp.empId,
 | 
	
		
			
				|  |  | +            inputId: this.temp.inputId,
 | 
	
		
			
				|  |  | +            oilType:this.temp.oilType,
 | 
	
		
			
				|  |  | +            oilName:this.temp.oilName,
 | 
	
		
			
				|  |  | +          }
 | 
	
		
			
				|  |  | +          postJson(url,data).then(response => {
 | 
	
		
			
				|  |  | +          // ExecDataByConfig(this.postDataPramas).then(response => {
 | 
	
		
			
				|  |  |              if (response.msg === 'fail') {
 | 
	
		
			
				|  |  |                this.$notify({
 | 
	
		
			
				|  |  |                  title: '保存失败',
 | 
	
	
		
			
				|  | @@ -969,35 +967,31 @@ export default {
 | 
	
		
			
				|  |  |              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.data = []
 | 
	
		
			
				|  |  | -          this.postDataPramas.data[0] = { 'name': 'insertDiesel', 'type': 'e', 'parammaps': {
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -            'pastureId': this.temp.pastureId,
 | 
	
		
			
				|  |  | -            'selTime': this.temp.selTime,
 | 
	
		
			
				|  |  | -            'oilClass': this.temp.oilClass,
 | 
	
		
			
				|  |  | -            'oilAmount': this.temp.oilAmount,
 | 
	
		
			
				|  |  | -            'eqId': this.temp.eqId,
 | 
	
		
			
				|  |  | -            'eqCode': this.temp.eqCode,
 | 
	
		
			
				|  |  | -            'departmentId': this.temp.departmentId,
 | 
	
		
			
				|  |  | -            'note': this.temp.note,
 | 
	
		
			
				|  |  | -            'nowPrice': this.temp.price * this.temp.oilAmount,
 | 
	
		
			
				|  |  | -            'oilcardId': this.temp.oilcardId,
 | 
	
		
			
				|  |  | -            'cardNumber': this.temp.cardNumber,
 | 
	
		
			
				|  |  | -            'price': this.temp.price,
 | 
	
		
			
				|  |  | -            'empId': this.temp.empId,
 | 
	
		
			
				|  |  | -            'inputId': this.temp.inputId,
 | 
	
		
			
				|  |  | -            'oilType':this.temp.oilType,
 | 
	
		
			
				|  |  | -            'oilName':this.temp.oilName,
 | 
	
		
			
				|  |  | -          }}
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -          this.postDataPramas.data[1] = { 'name': 'updateOilCardExecData', 'type': 'e',
 | 
	
		
			
				|  |  | -            'parammaps': {
 | 
	
		
			
				|  |  | -              'id': this.temp.oilcardId,
 | 
	
		
			
				|  |  | -              'nowPrice': this.temp.price * this.temp.oilAmount
 | 
	
		
			
				|  |  | -            }}
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -          ExecDataByConfig(this.postDataPramas).then(response => {
 | 
	
		
			
				|  |  | +          if(this.temp.eqId == '' || this.temp.eqId == null || this.temp.eqId == undefined){
 | 
	
		
			
				|  |  | +            this.temp.eqId = 0
 | 
	
		
			
				|  |  | +          }else{
 | 
	
		
			
				|  |  | +            this.temp.eqId = parseFloat(this.temp.eqId)
 | 
	
		
			
				|  |  | +          }
 | 
	
		
			
				|  |  | +          let url = 'authdata/diese/add'
 | 
	
		
			
				|  |  | +          let data = {
 | 
	
		
			
				|  |  | +            pastureId:this.temp.pastureId,
 | 
	
		
			
				|  |  | +            selTime: this.temp.selTime,
 | 
	
		
			
				|  |  | +            oilClass:this.temp.oilClass,
 | 
	
		
			
				|  |  | +            oilAmount: this.temp.oilAmount,
 | 
	
		
			
				|  |  | +            eqId: this.temp.eqId,
 | 
	
		
			
				|  |  | +            eqCode: this.temp.eqCode,
 | 
	
		
			
				|  |  | +            departmentId: this.temp.departmentId,
 | 
	
		
			
				|  |  | +            note: this.temp.note,
 | 
	
		
			
				|  |  | +            nowPrice: this.temp.price * this.temp.oilAmount,
 | 
	
		
			
				|  |  | +            oilcardId: this.temp.oilcardId,
 | 
	
		
			
				|  |  | +            cardNumber: this.temp.cardNumber,
 | 
	
		
			
				|  |  | +            price: this.temp.price,
 | 
	
		
			
				|  |  | +            empId: this.temp.empId,
 | 
	
		
			
				|  |  | +            inputId: this.temp.inputId,
 | 
	
		
			
				|  |  | +            oilType:this.temp.oilType,
 | 
	
		
			
				|  |  | +            oilName:this.temp.oilName,
 | 
	
		
			
				|  |  | +          }
 | 
	
		
			
				|  |  | +          postJson(url,data).then(response => {
 | 
	
		
			
				|  |  |              if (response.msg !== 'fail') {
 | 
	
		
			
				|  |  |                this.form_reset()
 | 
	
		
			
				|  |  |                this.$nextTick(() => {
 |