|
@@ -79,8 +79,8 @@
|
|
|
<el-table-column label="配方编码" min-width="110px" align="center">
|
|
|
<template slot-scope="scope">
|
|
|
<span v-if="scope.row.NoEdit">{{ scope.row.tcode }}</span>
|
|
|
- <el-input v-if="scope.row.Edit" v-model.trim="scope.row.tcode" type="textarea" :autosize="{ minRows: 1.3, maxRows: 4}" maxlength="32" style="width:98%;padding:10px 0;" />
|
|
|
- <!-- <el-input v-if="scope.row.Edit" v-model.trim="scope.row.tcode" type="textarea" :autosize="{ minRows: 1.3, maxRows: 4}" disabled maxlength="32" style="width:98%;padding:10px 0;" /> -->
|
|
|
+ <!-- <el-input v-if="scope.row.Edit" v-model.trim="scope.row.tcode" type="textarea" :autosize="{ minRows: 1.3, maxRows: 4}" maxlength="32" style="width:98%;padding:10px 0;" /> -->
|
|
|
+ <el-input v-if="scope.row.Edit" v-model.trim="scope.row.tcode" type="textarea" :autosize="{ minRows: 1.3, maxRows: 4}" disabled maxlength="32" style="width:98%;padding:10px 0;" />
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="配方颜色" min-width="70px" align="center">
|
|
@@ -790,7 +790,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { GetDataByName, GetDataByNames, PostDataByName, failproccess, checkButtons, GetArrList, ExecDataByConfig, formatNum } from '@/api/common'
|
|
|
+import { GetDataByName, GetDataByNames, PostDataByName, failproccess, checkButtons, postJson, ExecDataByConfig, formatNum } from '@/api/common'
|
|
|
import Sortable from 'sortablejs'
|
|
|
import { MessageBox } from 'element-ui'
|
|
|
import Cookies from 'js-cookie'
|
|
@@ -1067,7 +1067,7 @@ export default {
|
|
|
},
|
|
|
uploadData() {
|
|
|
return {
|
|
|
- name: 'checkfttype,checkbigcowclass,checkFeed,insertFTUpload,insertFTdetailUpload',
|
|
|
+ name: 'checkfttype,checkbigcowclass,checkFeedtemplet,checkFeed,insertFTUpload,insertFTdetailUpload',
|
|
|
importParams: '配方名称,牲畜类别,配方类型,备注,饲料组,饲料名称,重量(kg),搅拌延时(min),是否锁定牛头数比例',
|
|
|
sheetname: 'Sheet1',
|
|
|
// 登录牧场
|
|
@@ -1289,8 +1289,8 @@ export default {
|
|
|
}
|
|
|
this.table.list.unshift({ 'myId': (new Date()).valueOf(), 'Edit': true, 'NoEdit': false, 'isCreate': true, 'isUpdate': false, 'isUpdateSave': false, 'enable': 1, 'tname': '', tcode: '', 'tcolor': '#ccc', 'ccid': '', 'ccname': '', 'fttype': '', 'fttypeid': '', 'source': '自定义', 'remark': '' })
|
|
|
console.log('点击了新增this.table.list====>', this.table.list)
|
|
|
- // this.table.temp = this.table.list[0]
|
|
|
- // this.getTcodeList()
|
|
|
+ this.table.temp = this.table.list[0]
|
|
|
+ this.getTcodeList()
|
|
|
},
|
|
|
getTcodeList() {
|
|
|
this.getTcodeParm.parammaps.pastureid = Cookies.get('pastureid')
|
|
@@ -1838,7 +1838,12 @@ export default {
|
|
|
excel.export_json_to_excel({ header: tHeader, data: data1, filename: '配方模板导入报错信息', autoWidth: true, bookType: 'xlsx' })
|
|
|
})
|
|
|
}
|
|
|
- } else {
|
|
|
+ } else {
|
|
|
+ const isRepeat = new RegExp('Duplicate entry :feedtemplet_tname')
|
|
|
+ if (isRepeat.test(res.data)) {
|
|
|
+ this.$notify({ type: 'error', message: '配方名称不可重复,请重新录入', duration: 2000 })
|
|
|
+ return false
|
|
|
+ }
|
|
|
this.$notify({ title: '失败', message: '上传失败', type: 'danger', duration: 2000 })
|
|
|
}
|
|
|
},
|
|
@@ -2977,8 +2982,10 @@ export default {
|
|
|
} else {
|
|
|
this.rowRecipeRecord.getdataListParm.parammaps.startTime = this.rowRecipeRecord.getdataListParm.parammaps.inputDatetime[0]
|
|
|
this.rowRecipeRecord.getdataListParm.parammaps.stopTime = this.rowRecipeRecord.getdataListParm.parammaps.inputDatetime[1]
|
|
|
- }
|
|
|
- GetArrList(this.rowRecipeRecord.getdataListParm).then(response => {
|
|
|
+ }
|
|
|
+ const url = 'authdata/GetArrList'
|
|
|
+ const data = this.rowRecipeRecord.getdataListParm
|
|
|
+ postJson(url, data).then(response => {
|
|
|
if (response.data.list !== null) {
|
|
|
for (let i = 0; i < response.data.list.length; i++) {
|
|
|
if (response.data.list[i].arrList == null) {
|