|
@@ -718,70 +718,19 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
// 复制
|
|
|
- handleCopy() {
|
|
|
- console.log('点击了复制')
|
|
|
- if (this.selectList.length == 0) {
|
|
|
- this.$message({ type: 'error', message: '请选择配方干物质', duration: 2000 })
|
|
|
- } else if (this.selectList.length == 1) {
|
|
|
- MessageBox.confirm('是否确认复制此信息?', {
|
|
|
- confirmButtonText: '确认', cancelButtonText: '取消', type: 'warning'
|
|
|
- }).then(() => {
|
|
|
- this.requestParam.name = 'copyFtdry'
|
|
|
- this.requestParam.parammaps = {}
|
|
|
- this.requestParam.parammaps.pastureid = this.selectList[0].pastureid
|
|
|
- this.requestParam.parammaps.id = this.selectList[0].id
|
|
|
- PostDataByName(this.requestParam).then(response => {
|
|
|
- if (response.msg === 'fail') {
|
|
|
- const barid = new RegExp("key 'barid'")
|
|
|
- if (barid.test(response.data)) {
|
|
|
- this.$notify({ type: 'warning', message: '该栏舍该班次今日配方干物质已存在,不可重复生成', duration: 2000 })
|
|
|
- return
|
|
|
- }
|
|
|
- this.$notify({ title: '保存失败', message: response.data, type: 'warning', duration: 2000 })
|
|
|
- } else {
|
|
|
- this.$notify({ title: '成功', message: '保存成功', type: 'success', duration: 2000 })
|
|
|
- this.getList()
|
|
|
- }
|
|
|
- })
|
|
|
- }).catch(() => {
|
|
|
- this.$message({ type: 'info', message: '已取消复制' })
|
|
|
- })
|
|
|
- } else {
|
|
|
- this.$message({ type: 'error', message: '请选择一条配方干物质', duration: 2000 })
|
|
|
- }
|
|
|
- },
|
|
|
-
|
|
|
-
|
|
|
- // 改成多条,后端接口未改正确,先注释
|
|
|
- // handleCopy() {
|
|
|
+ // handleCopy() {
|
|
|
// console.log('点击了复制')
|
|
|
// if (this.selectList.length == 0) {
|
|
|
// this.$message({ type: 'error', message: '请选择配方干物质', duration: 2000 })
|
|
|
- // } else {
|
|
|
+ // } else if (this.selectList.length == 1) {
|
|
|
// MessageBox.confirm('是否确认复制此信息?', {
|
|
|
// confirmButtonText: '确认', cancelButtonText: '取消', type: 'warning'
|
|
|
// }).then(() => {
|
|
|
-
|
|
|
- // var send_data = {
|
|
|
- // "common":{"returnmap":"0"},
|
|
|
- // "data":[
|
|
|
- // {
|
|
|
- // "name":"insertSpotList",
|
|
|
- // "resultmaps":{
|
|
|
- // "list":this.selectList
|
|
|
- // },
|
|
|
- // "children":[
|
|
|
- // {
|
|
|
- // "name":"copyFtdry","type":"e",
|
|
|
- // "parammaps":{
|
|
|
- // "pastureid":"@insertSpotList.pastureid"
|
|
|
- // }
|
|
|
- // }
|
|
|
- // ]
|
|
|
- // }
|
|
|
- // ]
|
|
|
- // }
|
|
|
- // ExecDataByConfig(send_data).then(response => {
|
|
|
+ // this.requestParam.name = 'copyFtdry'
|
|
|
+ // this.requestParam.parammaps = {}
|
|
|
+ // this.requestParam.parammaps.pastureid = this.selectList[0].pastureid
|
|
|
+ // this.requestParam.parammaps.id = this.selectList[0].id
|
|
|
+ // PostDataByName(this.requestParam).then(response => {
|
|
|
// if (response.msg === 'fail') {
|
|
|
// const barid = new RegExp("key 'barid'")
|
|
|
// if (barid.test(response.data)) {
|
|
@@ -797,8 +746,59 @@ export default {
|
|
|
// }).catch(() => {
|
|
|
// this.$message({ type: 'info', message: '已取消复制' })
|
|
|
// })
|
|
|
- // }
|
|
|
+ // } else {
|
|
|
+ // this.$message({ type: 'error', message: '请选择一条配方干物质', duration: 2000 })
|
|
|
+ // }
|
|
|
// },
|
|
|
+
|
|
|
+
|
|
|
+ // 改成多条,后端接口未改正确,先注释
|
|
|
+ handleCopy() {
|
|
|
+ console.log('点击了复制')
|
|
|
+ if (this.selectList.length == 0) {
|
|
|
+ this.$message({ type: 'error', message: '请选择配方干物质', duration: 2000 })
|
|
|
+ } else {
|
|
|
+ MessageBox.confirm('是否确认复制此信息?', {
|
|
|
+ confirmButtonText: '确认', cancelButtonText: '取消', type: 'warning'
|
|
|
+ }).then(() => {
|
|
|
+
|
|
|
+ var send_data = {
|
|
|
+ "common":{"returnmap":"0"},
|
|
|
+ "data":[
|
|
|
+ {
|
|
|
+ "name":"insertSpotList",
|
|
|
+ "resultmaps":{
|
|
|
+ "list":this.selectList
|
|
|
+ },
|
|
|
+ "children":[
|
|
|
+ {
|
|
|
+ "name":"copyFtdry","type":"e",
|
|
|
+ "parammaps":{
|
|
|
+ "pastureid":"@insertSpotList.pastureid"
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ }
|
|
|
+ ExecDataByConfig(send_data).then(response => {
|
|
|
+ if (response.msg === 'fail') {
|
|
|
+ const barid = new RegExp("key 'barid'")
|
|
|
+ if (barid.test(response.data)) {
|
|
|
+ this.$notify({ type: 'warning', message: '该栏舍该班次今日配方干物质已存在,不可重复生成', duration: 2000 })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ this.$notify({ title: '保存失败', message: response.data, type: 'warning', duration: 2000 })
|
|
|
+ } else {
|
|
|
+ this.$notify({ title: '成功', message: '保存成功', type: 'success', duration: 2000 })
|
|
|
+ this.getList()
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }).catch(() => {
|
|
|
+ this.$message({ type: 'info', message: '已取消复制' })
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
|
|
|
|
|
|
|