| | |
| | | watch: { |
| | | "form.stockId": { |
| | | handler(val) { |
| | | console.log(val) |
| | | var stockIdcolumn = this.findObject(this.option.column, "stockNum"); |
| | | if (val != "") { |
| | | stockIdcolumn.display = true; |
| | |
| | | //获取农资 |
| | | selectStockFa(this.$farmId).then((res) => { |
| | | if (res.data.code == 200) { |
| | | console.log(res,1111111111111) |
| | | var stockIdcolumn = that.findObject(that.option.column, "stockId"); |
| | | stockIdcolumn.dicData = res.data.data; |
| | | } |
| | |
| | | }); |
| | | }, |
| | | beforeOpen(done, type) { |
| | | if(["add"].includes(type)){ |
| | | this.option.disabled=false |
| | | } |
| | | if (["edit", "view"].includes(type)) { |
| | | getDetail(this.form.id).then(res => { |
| | | this.form = res.data.data; |