农资库存管理,已出库待使用农资,根据农场变化数据变化
| | |
| | | data () { |
| | | return { |
| | | form: {}, |
| | | farm:{}, |
| | | query: {}, |
| | | loading: true, |
| | | page: { |
| | |
| | | } |
| | | }, |
| | | computed: { |
| | | ...mapGetters(["permission"]), |
| | | ...mapGetters(["permission","$farmId"]), |
| | | permissionList () { |
| | | return { |
| | | addBtn: this.vaildData(this.permission.soldrecord_add, false), |
| | |
| | | }) |
| | | return ids.join(",") |
| | | } |
| | | }, |
| | | watch: { |
| | | '$farmId':{ |
| | | handler (newName, oldName) { |
| | | this.farm.id = newName |
| | | this.onLoad(this.page) |
| | | } |
| | | } |
| | | }, |
| | | created () { |
| | | this.farm.id = this.$farmId |
| | | }, |
| | | methods: { |
| | | rowSave (row, done, loading) { |
| | |
| | | this.loading = true |
| | | var datas = this.$route.query |
| | | params.stockId1 = datas.sid |
| | | params["deptId"] = this.farm.id |
| | | getListbg(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => { |
| | | const data = res.data.data |
| | | this.page.total = data.total |
| | |
| | | formC: {}, |
| | | formR: {}, |
| | | formK: {}, |
| | | farm:{}, |
| | | specsValue1: "", |
| | | query: {}, |
| | | loading: true, |
| | |
| | | }; |
| | | }, |
| | | computed: { |
| | | ...mapGetters(["permission","userInfo"]), |
| | | ...mapGetters(["permission","userInfo","$farmId"]), |
| | | permissionList() { |
| | | return { |
| | | addBtn: this.vaildData(this.permission.stock_add, false), |
| | |
| | | }, |
| | | created() { |
| | | //初始化页面数据 |
| | | this.farm.id = this.$farmId |
| | | this.onLoad(this.page); |
| | | }, |
| | | watch: { |
| | | '$farmId':{ |
| | | handler (newName, oldName) { |
| | | this.farm.id = newName |
| | | //地块页面 |
| | | this.onLoad(this.page) |
| | | } |
| | | } |
| | | }, |
| | | methods: { |
| | | //库存明细 |
| | | kc(item) { |
| | |
| | | }, |
| | | //农资入库按钮 |
| | | submitK(row, done, loading) { |
| | | row.deptId=this.userInfo.dept_id; |
| | | row.deptId=this.farm.id; |
| | | if(row.amount<0 || row.specs <0){ |
| | | this.$message({ |
| | | type:"warning", |
| | |
| | | }, |
| | | //入库 |
| | | submitR(row, done, loading) { |
| | | row.deptId=this.userInfo.dept_id; |
| | | row.deptId=this.farm.id; |
| | | var that = this; |
| | | if(row.amount1<0){ |
| | | this.$message({ |
| | |
| | | //出库 |
| | | submitC(row, done, loading) { |
| | | var that = this; |
| | | row.deptId=this.userInfo.dept_id; |
| | | row.deptId=this.farm.id; |
| | | if(row.amount1<0 || row.num<row.amount1){ |
| | | this.$message({ |
| | | type:"warning", |
| | |
| | | // var type = this.$route.query.type; |
| | | params.sid=datas; |
| | | // params.stype=type; |
| | | params['deptId'] = this.farm.id |
| | | getList( |
| | | page.currentPage, |
| | | page.pageSize, |
| | |
| | | state: "0", |
| | | keyword: "", |
| | | }, |
| | | farm:{}, |
| | | specsValue1: "", |
| | | query: {}, |
| | | loading: true, |
| | |
| | | }; |
| | | }, |
| | | computed: { |
| | | ...mapGetters(["permission"]), |
| | | ...mapGetters(["permission","$farmId"]), |
| | | permissionList() { |
| | | return { |
| | | addBtn: this.vaildData(this.permission.stock_add, false), |
| | |
| | | }, |
| | | }, |
| | | created() { |
| | | this.farm.id = this.$farmId |
| | | //初始化页面数据 |
| | | this.onLoad(this.page); |
| | | }, |
| | | watch: { |
| | | '$farmId':{ |
| | | handler (newName, oldName) { |
| | | this.farm.id = newName |
| | | this.onLoad(this.page) |
| | | } |
| | | } |
| | | }, |
| | | methods: { |
| | | kc(item) { |
| | | this.$router.push({ |
| | |
| | | }, |
| | | onLoad(page, params = {}) { |
| | | this.loading = true; |
| | | params["deptId"] = this.farm.id |
| | | getList( |
| | | page.currentPage, |
| | | page.pageSize, |
| | |
| | | data() { |
| | | return { |
| | | form: {}, |
| | | farm:{}, |
| | | query: {}, |
| | | loading: true, |
| | | page: { |
| | |
| | | }; |
| | | }, |
| | | computed: { |
| | | ...mapGetters(["permission"]), |
| | | ...mapGetters(["permission","$farmId"]), |
| | | permissionList() { |
| | | return { |
| | | addBtn: this.vaildData(this.permission.stockrecord_add, false), |
| | |
| | | }); |
| | | return ids.join(","); |
| | | } |
| | | }, |
| | | watch: { |
| | | '$farmId':{ |
| | | handler (newName, oldName) { |
| | | this.farm.id = newName |
| | | this.onLoad(this.page) |
| | | } |
| | | } |
| | | }, |
| | | created () { |
| | | this.farm.id = this.$farmId |
| | | }, |
| | | methods: { |
| | | // rowSave(row, done, loading) { |
| | |
| | | }, |
| | | onLoad(page, params = {}) { |
| | | this.loading = true; |
| | | params['deptId'] = this.farm.id |
| | | getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => { |
| | | const data = res.data.data; |
| | | this.page.total = data.total; |