|
|
@@ -189,26 +189,12 @@
|
|
|
</el-row>
|
|
|
|
|
|
<el-row>
|
|
|
- <!-- <el-col :span="20">
|
|
|
+ <el-col :span="20">
|
|
|
<el-form-item label="收集时间:" prop="operatetime">
|
|
|
<el-date-picker v-model="create.temp.operatetime" :disabled="create.dialogStatus=='update'" type="datetime" placeholder="选择处理时间" format="yyyy-MM-dd HH:mm" value-format="yyyy-MM-dd HH:mm" style="width: 100%;" :clearable="false" />
|
|
|
</el-form-item>
|
|
|
- </el-col> -->
|
|
|
- <el-row>
|
|
|
- <el-col :span="20">
|
|
|
- <el-form-item label="收集时间:" prop="operatetime">
|
|
|
- <el-date-picker
|
|
|
- :disabled="create.dialogStatus=='update'"
|
|
|
- v-model="create.temp.operatetime"
|
|
|
- type="datetime"
|
|
|
- style="width: 100%;"
|
|
|
- value-format="yyyy-MM-dd HH:mm:ss"
|
|
|
- placeholder="选择收集时间">
|
|
|
- </el-date-picker>
|
|
|
- </el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
- </el-row>
|
|
|
<el-row>
|
|
|
<el-col :span="20">
|
|
|
<el-form-item label="操作人:" prop="emp">
|
|
|
@@ -299,7 +285,7 @@ export default {
|
|
|
create: {
|
|
|
dialogFormVisible: false,
|
|
|
dialogStatus: '',
|
|
|
- temp: { pastureid: Cookies.get('pastureid'), operatetime: new Date(), emp: Cookies.get('employename'), barid: '', barname: '', remain: '',dry:0, times: '0' },
|
|
|
+ temp: { pastureid: Cookies.get('pastureid'), operatetime: parseTime(new Date(), '{y}-{m}-{d} {h}:{i}'), emp: Cookies.get('employename'), barid: '', barname: '', remain: '',dry:0, times: '0',remaindate:'' },
|
|
|
rules: {
|
|
|
barid: [{ type: 'string', required: true, message: '必填', trigger: 'blur' }],
|
|
|
remain: [{ type: 'string', required: true, message: '必填', trigger: 'blur' }],
|
|
|
@@ -375,14 +361,14 @@ export default {
|
|
|
uploadData() {
|
|
|
return {
|
|
|
name: 'checkbarname,checktimes,insertBarfeedremainUpload',
|
|
|
- importParams: '栏舍名称,剩料量(kg),干物质,班次(第一班/第二班/第三班),收集时间,操作人',
|
|
|
+ importParams: '栏舍名称,配方名称,剩料量(kg),原剩料所属时间,干物质,班次(一天/第一班/第二班/第三班),收集时间,操作人',
|
|
|
sheetname: 'Sheet1',
|
|
|
// 登录牧场
|
|
|
pastureid: Cookies.get('pastureid'),
|
|
|
// 日期参数
|
|
|
- dateParams: '收集时间',
|
|
|
+ dateParams: '原剩料所属时间',
|
|
|
// 必填参数
|
|
|
- requiredParams: '栏舍名称,剩料量(kg),剩料量(kg),班次(第一班/第二班/第三班)',
|
|
|
+ requiredParams: '栏舍名称,剩料量(kg),班次(一天/第一班/第二班/第三班)',
|
|
|
// 为数值的参数
|
|
|
numParams: '剩料量(kg)'
|
|
|
}
|
|
|
@@ -506,7 +492,7 @@ export default {
|
|
|
|
|
|
// 新增
|
|
|
resetTemp() {
|
|
|
- this.create.temp = { pastureid: Cookies.get('pastureid'), operatetime: new Date(), emp: Cookies.get('employename'), barid: '', barname: '', remain: '',dry:0, times: '0' }
|
|
|
+ this.create.temp = { pastureid: Cookies.get('pastureid'), operatetime: parseTime(new Date(), '{y}-{m}-{d} {h}:{i}'), emp: Cookies.get('employename'), barid: '', barname: '', remain: '',dry:0, times: '0',remaindate:'' }
|
|
|
},
|
|
|
blurEmp(item) {
|
|
|
this.create.temp.emp = item.target.value
|
|
|
@@ -597,7 +583,7 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
createDataAgain() {
|
|
|
- console.log('点击了新增保存')
|
|
|
+ console.log('点击了新增保存',this.create.temp)
|
|
|
this.isokDisable = true
|
|
|
setTimeout(() => {
|
|
|
this.isokDisable = false
|
|
|
@@ -880,8 +866,8 @@ export default {
|
|
|
this.$notify({ title: '失败', message: '导入失败:' + res.data.err_count + '条!', type: 'danger', duration: 2000 })
|
|
|
import('@/vendor/Export2Excel').then(excel => {
|
|
|
const list1 = res.data.result
|
|
|
- const tHeader = ['栏舍名称', '配方名称','原剩料所属时间','剩料量(kg)', '收集', '收集时间', '操作人', '错误信息']
|
|
|
- const filterVal = ['栏舍名称', '配方名称','原剩料所属时间','剩料量(kg)', '收集', '收集时间', '操作人', 'error_msg']
|
|
|
+ const tHeader = ['栏舍名称', '配方名称','原剩料所属时间','剩料量(kg)','干物质', '收集', '收集时间', '操作人', '错误信息']
|
|
|
+ const filterVal = ['栏舍名称', '配方名称','原剩料所属时间','剩料量(kg)','干物质', '收集', '收集时间', '操作人', 'error_msg']
|
|
|
const data1 = this.formatJson(filterVal, list1)
|
|
|
excel.export_json_to_excel({ header: tHeader, data: data1, filename: '栏舍剩料记录导入报错信息', autoWidth: true, bookType: 'xlsx' })
|
|
|
})
|