|
@@ -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-upload style="float: right;" :headers="headers" :data="uploadData" :action="uploadExcelUrl" :show-file-list="false" :before-upload="beforeImport" :on-success="handleImportSuccess">
|
|
|
<el-button v-if="isRoleEdit" class="import" icon="el-icon-download" style="float: right;">导入</el-button>
|
|
|
</el-upload>
|
|
@@ -790,6 +790,7 @@ export default {
|
|
|
return {
|
|
|
dialogFull: false,
|
|
|
isRoleEdit: [],
|
|
|
+ isSynchronous:[],
|
|
|
headerList: [],
|
|
|
pickerMinDate: '',
|
|
|
pickerOptions: {
|
|
@@ -817,7 +818,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',
|
|
@@ -1142,6 +1144,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
|
|
@@ -3104,12 +3111,19 @@ export default {
|
|
|
console.log(row)
|
|
|
},
|
|
|
handleSynchronous(){
|
|
|
- const url = '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: '已取消软件牛头数同步' })
|
|
|
})
|
|
|
}
|
|
|
}
|