|
@@ -14,7 +14,7 @@
|
|
|
<!-- <el-input v-model="table.getdataListParm.parammaps.tname" placeholder="请输入配方名称" style="width: 180px;" class="filter-item" /> -->
|
|
|
<el-button class="successBorder" @click="form_search">查询</el-button>
|
|
|
<el-button v-if="isRoleEdit" class="successBorder" @click="handleDryMatterRegulation">干物质调节</el-button>
|
|
|
- <el-button v-if="isRoleEdit" class="successBorder" @click="handleSynchronous">软件牛头数同步</el-button>
|
|
|
+ <el-button v-if="isRoleEdit && isSynchronous" class="successBorder" @click="handleSynchronous">软件牛头数同步</el-button>
|
|
|
<el-button v-if="isRoleEdit && !isproportion" class="successBorder" @click="handle_batchEdit">批量编辑</el-button>
|
|
|
<el-button v-if="isRoleEdit && isproportion" icon="el-icon-folder-checked" class="success" @click="handle_batchEdit_save">保存</el-button>
|
|
|
<el-button v-if="isRoleEdit && isproportion" icon="el-icon-close" class="sortCancel" @click="cancelChangeEdit">取消</el-button>
|
|
@@ -797,6 +797,7 @@ export default {
|
|
|
isproportion:false,
|
|
|
dialogFull: false,
|
|
|
isRoleEdit: [],
|
|
|
+ isSynchronous:[],
|
|
|
headerList: [],
|
|
|
pickerMinDate: '',
|
|
|
pickerOptions: {
|
|
@@ -824,7 +825,8 @@ export default {
|
|
|
{ name: 'getFTSWLSList', offset: 0, pagecount: 0, parammaps: { pastureid: Cookies.get('pastureid') }},
|
|
|
{ name: 'getFTBLList', offset: 0, pagecount: 0, parammaps: { pastureid: Cookies.get('pastureid') }},
|
|
|
{ name: 'getCowclassListEnable', offset: 0, pagecount: 0, parammaps: { pastureid: Cookies.get('pastureid') }},
|
|
|
- { name: 'getBarListEnable', offset: 0, pagecount: 0, parammaps: { pastureid: Cookies.get('pastureid') }}
|
|
|
+ { name: 'getBarListEnable', offset: 0, pagecount: 0, parammaps: { pastureid: Cookies.get('pastureid') }},
|
|
|
+ { name: 'getSysoptEnable', offset: 0, pagecount: 0, parammaps: { pastureid: Cookies.get('pastureid'),"inforname":"udFeedpSync" }}
|
|
|
],
|
|
|
getFeedTempletNameListParm: {
|
|
|
name: 'getFeedTempletName',
|
|
@@ -1150,6 +1152,11 @@ export default {
|
|
|
},
|
|
|
getDownList() {
|
|
|
GetDataByNames(this.requestParams).then(response => {
|
|
|
+ if(response.data.getSysoptEnable.list[0].inforvalue == 1){
|
|
|
+ this.isSynchronous = true
|
|
|
+ }else{
|
|
|
+ this.isSynchronous = false
|
|
|
+ }
|
|
|
this.recipeTemplateList = response.data.getFTSWLSList.list
|
|
|
this.feedingFormulaList = response.data.getFTBLList.list
|
|
|
this.livestockTypeList = response.data.getCowclassListEnable.list
|
|
@@ -3123,12 +3130,18 @@ export default {
|
|
|
this.$refs.mychild.restTemp()
|
|
|
},
|
|
|
handleSynchronous(){
|
|
|
- const url = 'authdata/ud/feedp/sync'
|
|
|
- const data = {}
|
|
|
- postJson(url, data).then(response => {
|
|
|
- if(response.msg !== 'fail'){
|
|
|
- this.$notify({ title: '成功', message: '保存成功', type: 'success', duration: 2000 })
|
|
|
- }
|
|
|
+ MessageBox.confirm('是否进行软件牛头数同步?', {
|
|
|
+ confirmButtonText: '确认', cancelButtonText: '取消', type: 'warning'
|
|
|
+ }).then(() => {
|
|
|
+ const url = 'authdata/ud/feedp/sync'
|
|
|
+ const data = {}
|
|
|
+ postJson(url, data).then(response => {
|
|
|
+ if(response.msg !== 'fail'){
|
|
|
+ this.$notify({ title: '成功', message: '保存成功', type: 'success', duration: 2000 })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }).catch(() => {
|
|
|
+ this.$message({ type: 'info', message: '已取消软件牛头数同步' })
|
|
|
})
|
|
|
},
|
|
|
handle_batchEdit(){
|