3 files modified
4 files added
| | |
| | | .el-dropdown-menu__item { |
| | | font-size: 12px !important; |
| | | line-height: 28px !important; |
| | | font-size: 12px !important; |
| | | line-height: 28px !important; |
| | | } |
| | | |
| | | //.el-card.is-always-shadow { |
| | | // box-shadow: none; |
| | | // border: none !important; |
| | | //} |
| | | |
| | | .el-scrollbar__view { |
| | | height: 100%; |
| | | height: 100%; |
| | | } |
| | | |
| | | .el-menu--horizontal { |
| | | border-bottom: none !important; |
| | | border-bottom: none !important; |
| | | } |
| | | |
| | | .el-menu { |
| | | border-right: none !important; |
| | | border-right: none !important; |
| | | } |
| | | |
| | | .el-menu--display, |
| | | .el-menu--display + .el-submenu__icon-arrow { |
| | | display: none; |
| | | .el-menu--display+.el-submenu__icon-arrow { |
| | | display: none; |
| | | } |
| | | |
| | | |
| | | .el-message__icon, |
| | | .el-message__content { |
| | | display: inline-block; |
| | | display: inline-block; |
| | | } |
| | | |
| | | .el-date-editor .el-range-input, |
| | | .el-date-editor .el-range-separator { |
| | | height: auto; |
| | | overflow: hidden; |
| | | height: auto; |
| | | overflow: hidden; |
| | | } |
| | | |
| | | .el-dialog__wrapper { |
| | | z-index: 2048; |
| | | z-index: 2048; |
| | | } |
| | | |
| | | .el-col { |
| | | margin-bottom: 8px; |
| | | margin-bottom: 8px; |
| | | } |
| | | |
| | | .el-main { |
| | | padding: 0 !important; |
| | | padding: 0 !important; |
| | | } |
| | | |
| | | .el-dropdown-menu__item--divided:before, .el-menu, .el-menu--horizontal > .el-menu-item:not(.is-disabled):focus, .el-menu--horizontal > .el-menu-item:not(.is-disabled):hover, .el-menu--horizontal > .el-submenu .el-submenu__title:hover { |
| | | background-color: transparent; |
| | | .el-dropdown-menu__item--divided:before, |
| | | .el-menu, |
| | | .el-menu--horizontal>.el-menu-item:not(.is-disabled):focus, |
| | | .el-menu--horizontal>.el-menu-item:not(.is-disabled):hover, |
| | | .el-menu--horizontal>.el-submenu .el-submenu__title:hover { |
| | | background-color: transparent; |
| | | } |
| | | |
| | | |
| | | .el-dropdown-menu__item--divided:before, .el-menu, .el-menu--horizontal > .el-menu-item:not(.is-disabled):focus, .el-menu--horizontal > .el-menu-item:not(.is-disabled):hover, .el-menu--horizontal > .el-submenu .el-submenu__title:hover { |
| | | background-color: transparent !important; |
| | | .el-dropdown-menu__item--divided:before, |
| | | .el-menu, |
| | | .el-menu--horizontal>.el-menu-item:not(.is-disabled):focus, |
| | | .el-menu--horizontal>.el-menu-item:not(.is-disabled):hover, |
| | | .el-menu--horizontal>.el-submenu .el-submenu__title:hover { |
| | | background-color: transparent !important; |
| | | } |
| | | |
| | | .el-card__header { |
| | | padding: 6px 18px !important; |
| | | padding: 6px 18px !important; |
| | | } |
| | | |
| | | .el-card__body { |
| | | //padding: 16px !important; |
| | | //padding: 16px !important; |
| | | } |
| | | |
| | | .el-divider--horizontal { |
| | | margin: 12px 0 !important; |
| | | margin: 12px 0 !important; |
| | | } |
| | | |
| | | .el-pagination.is-background .el-pager li:not(.disabled).active { |
| | | background-color: #5abf78 !important; |
| | | } |
| | | |
| | | .el-pagination.is-background .el-pager li:not(.disabled):hover { |
| | | color: #5abf78 !important; |
| | | } |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | // .el-pagination.is-background .el-pager li:not(.disabled).active { |
| | | // background-color: #5abf78 !important; |
| | | // } |
| | | |
| | | // .el-pagination__total { |
| | | // color: #5abf78 !important; |
| | | // } |
| | | </style> |
| | |
| | | <template> |
| | | <basic-container> |
| | | <avue-crud :option="option" |
| | | :table-loading="loading" |
| | | :data="data" |
| | | :page.sync="page" |
| | | :permission="permissionList" |
| | | :before-open="beforeOpen" |
| | | v-model="form" |
| | | ref="crud" |
| | | @row-update="rowUpdate" |
| | | @row-save="rowSave" |
| | | @row-del="rowDel" |
| | | @search-change="searchChange" |
| | | @search-reset="searchReset" |
| | | @selection-change="selectionChange" |
| | | @current-change="currentChange" |
| | | @size-change="sizeChange" |
| | | @refresh-change="refreshChange" |
| | | @on-load="onLoad"> |
| | | <template slot="menuLeft"> |
| | | <el-button type="danger" |
| | | size="small" |
| | | icon="el-icon-delete" |
| | | plain |
| | | v-if="permission.stock_delete" |
| | | @click="handleDelete">删 除 |
| | | </el-button> |
| | | </template> |
| | | <template slot-scope="{ type, size, row }" slot="menu"> |
| | | <el-button |
| | | icon="el-icon-circle-plus-outline" |
| | | @click="modifiedGrades(row)" |
| | | :size="size" |
| | | :type="type" |
| | | >入库 |
| | | </el-button |
| | | > |
| | | <el-button |
| | | icon="el-icon-edit-outline" |
| | | @click="modifiedGrades1(row)" |
| | | :size="size" |
| | | :type="type" |
| | | >出库 |
| | | </el-button |
| | | > |
| | | <el-button |
| | | icon="el-icon-circle-plus-outline" |
| | | type="text" |
| | | size="mini" |
| | | @click="start(row)" |
| | | :size="size" |
| | | >农资记录 |
| | | </el-button |
| | | > |
| | | <el-button |
| | | icon="el-icon-circle-plus-outline" |
| | | type="text" |
| | | size="mini" |
| | | @click="startc(row)" |
| | | :size="size" |
| | | >已出库农资 |
| | | </el-button |
| | | > |
| | | </template> |
| | | </avue-crud> |
| | | <div class="body"> |
| | | <div class="search"> |
| | | <el-form |
| | | :inline="true" |
| | | :model="formInline" |
| | | class="demo-form-inline" |
| | | size="small" |
| | | > |
| | | |
| | | <el-form-item label=""> |
| | | <el-select v-model="formInline.stype" placeholder="全部分类" @change="stypeChange"> |
| | | <el-option label="全部分类" value="0"></el-option> |
| | | <el-option label="区域二" value="beijing"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label=""> |
| | | <el-select v-model="formInline.state" placeholder="有库存" @change="stateChange"> |
| | | <el-option label="全部" value="2"></el-option> |
| | | <el-option label="有库存" value="0"></el-option> |
| | | <el-option label="无库存" value="1"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label=""> |
| | | <el-input v-model="formInline.keyword" placeholder="请输入名称" @input="keywordChange" clearable></el-input> |
| | | |
| | | </el-form-item> |
| | | <el-button type="success" disabled>成功按钮</el-button> |
| | | <el-button type="success" disabled>成功按钮</el-button> |
| | | <el-button type="success" disabled>成功按钮</el-button> |
| | | </el-form> |
| | | </div> |
| | | <div class="table"> |
| | | <div class="content"> |
| | | <div class="farm" v-for="(item, index) in data" :key="index"> |
| | | <!-- <div class="farm"> --> |
| | | <div class="left"> |
| | | <div class="farm-img"> |
| | | <img src="../../../public/img/stock/fei.png" class="img" /> |
| | | </div> |
| | | <div class="farm-param"> |
| | | <div class="param-spec"> |
| | | <div class="spec-1"><span>肥料</span></div> |
| | | <div class="spec-2"><span>有机肥</span></div> |
| | | <div class="spec-3"><span>{{item.spn}}</span></div> |
| | | </div> |
| | | <div class="param-cen">有机肥</div> |
| | | <div class="param-detail"> |
| | | <img src="../../../public/img/stock/edit.png" /> |
| | | <div class="detail-text">查看库存明细</div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="right"> |
| | | <div class="spec"> |
| | | <span class="num">{{item.amount}}</span>袋<span class="num1" |
| | | >(共940公斤)</span |
| | | > |
| | | </div> |
| | | <div class="btn"> |
| | | <div class="in" @click="modifiedGrades(item)"> |
| | | <img src="../../../public/img/stock/luku.png" /><span |
| | | >入库</span |
| | | > |
| | | </div> |
| | | <div class="out" @click="modifiedGrades1(item)"> |
| | | <img src="../../../public/img/stock/chuku.png" /><span |
| | | >出库</span |
| | | > |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="el-page"> |
| | | <el-pagination |
| | | @size-change="handleSizeChange" |
| | | @current-change="handleCurrentChange" |
| | | :current-page="page.currentPage" |
| | | :hide-on-single-page="value" |
| | | :page-size="page.pageSize" |
| | | background |
| | | layout="total, prev, pager, next" |
| | | :total="page.total" |
| | | > |
| | | </el-pagination> |
| | | </div> |
| | | <el-dialog |
| | | title="农资入库" |
| | | :visible.sync="gradeBoxVisible" |
| | |
| | | </avue-form> |
| | | </div> |
| | | </el-dialog> |
| | | </basic-container> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import {getList, getDetail, add, update, remove} from "@/api/stock/stock"; |
| | | import {add1} from "@/api/stockrecord/stockrecord"; |
| | | import {mapGetters} from "vuex"; |
| | | import { getList, getDetail, add, update, remove } from "@/api/stock/stock"; |
| | | import { add1 } from "@/api/stockrecord/stockrecord"; |
| | | import { mapGetters } from "vuex"; |
| | | |
| | | export default { |
| | | data() { |
| | | return { |
| | | formInline: { |
| | | stype: "0", |
| | | state:"0", |
| | | keyword:"", |
| | | }, |
| | | form: {}, |
| | | formC: {}, |
| | | formR: {}, |
| | | specsValue1: '', |
| | | specsValue1: "", |
| | | query: {}, |
| | | loading: true, |
| | | page: { |
| | | pageSize: 10, |
| | | currentPage: 1, |
| | | total: 0 |
| | | total: 0, |
| | | }, |
| | | selectionList: [], |
| | | option: { |
| | | height: 'auto', |
| | | calcHeight: 30, |
| | | tip: false, |
| | | searchShow: true, |
| | | searchMenuSpan: 3, |
| | | border: true, |
| | | index: true, |
| | | align: "center", |
| | | viewBtn: true, |
| | | selection: true, |
| | | dialogClickModal: false, |
| | | column: [ |
| | | { |
| | | label: "农资", |
| | | prop: "stockId", |
| | | span: 23, |
| | | type: "select", |
| | | dicUrl: "/api/stockfactory/stockfactory/selectStockFa", |
| | | props: { |
| | | label: "dictValue", |
| | | value: "dictKey" |
| | | }, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请输入农资", |
| | | trigger: "blur" |
| | | }] |
| | | }, |
| | | { |
| | | label: "农资类型", |
| | | prop: "stype", |
| | | addDisplay: false, |
| | | searchLabelWidth: 80, |
| | | searchSpan: 4, |
| | | type: "select", |
| | | dicUrl: "/api/blade-system/dict-biz/dictionary?code=stockType", |
| | | props: { |
| | | label: "dictValue", |
| | | value: "dictKey" |
| | | }, |
| | | dataType: "number", |
| | | search: true, |
| | | }, |
| | | { |
| | | label: "厂家名称", |
| | | prop: "factoryName", |
| | | addDisplay: false, |
| | | }, |
| | | { |
| | | label: "规格", |
| | | prop: "spn", |
| | | addDisplay: false, |
| | | }, |
| | | { |
| | | label: "规格", |
| | | hide: true, |
| | | prop: "specs", |
| | | span: 5, |
| | | viewDisplay: false, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请输入规格", |
| | | trigger: "blur" |
| | | }] |
| | | }, |
| | | { |
| | | label: "规格值1", |
| | | hide: true, |
| | | prop: "specsValue1", |
| | | searchSpan: 4, |
| | | span: 6, |
| | | type: "select", |
| | | dicUrl: "/api/blade-system/dict-biz/dictionary?code=stockSpecs1", |
| | | props: { |
| | | label: "dictValue", |
| | | value: "dictKey" |
| | | }, |
| | | dataType: "number", |
| | | search: true, |
| | | viewDisplay: false, |
| | | }, |
| | | { |
| | | label: "规格值2", |
| | | hide: true, |
| | | prop: "specsValue2", |
| | | searchSpan: 4, |
| | | span: 6, |
| | | type: "select", |
| | | dicUrl: "/api/blade-system/dict-biz/dictionary?code=stockSpecs2", |
| | | props: { |
| | | label: "dictValue", |
| | | value: "dictKey" |
| | | }, |
| | | dataType: "number", |
| | | search: true, |
| | | viewDisplay: false, |
| | | }, |
| | | { |
| | | label: "入库数量", |
| | | span: 6, |
| | | type: "number", |
| | | prop: "amount", |
| | | rules: [{ |
| | | required: true, |
| | | message: "请输入入库数量", |
| | | trigger: "blur" |
| | | }] |
| | | }, |
| | | { |
| | | label: "是否库存", |
| | | prop: "state", |
| | | type: "select", |
| | | searchSpan: 4, |
| | | searchLabelWidth: 95, |
| | | search: true, |
| | | addDisplay: false, |
| | | dicData: [ |
| | | { |
| | | label: "有库存", |
| | | value: "0" |
| | | }, |
| | | { |
| | | label: "无库存", |
| | | value: "1" |
| | | } |
| | | ], |
| | | }, |
| | | { |
| | | label: "入库类型", |
| | | prop: "type", |
| | | type: "select", |
| | | span: 12, |
| | | searchSpan: 4, |
| | | dicUrl: "/api/blade-system/dict-biz/dictionary?code=stockPurchase", |
| | | props: { |
| | | label: "dictValue", |
| | | value: "dictKey" |
| | | }, |
| | | dataType: "number", |
| | | search: true, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请输入入库类型", |
| | | trigger: "blur" |
| | | }] |
| | | }, |
| | | { |
| | | label: "入库时间", |
| | | prop: "time", |
| | | type: "date", |
| | | format: "yyyy-MM-dd", |
| | | valueFormat: "yyyy-MM-dd", |
| | | span: 11, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请输入入库时间", |
| | | trigger: "blur" |
| | | }] |
| | | }, |
| | | { |
| | | label: "单据、凭证照片", |
| | | prop: "picture", |
| | | type: "upload", |
| | | labelWidth: 145, |
| | | dataType: "string", |
| | | span: 24, |
| | | limit: 5, |
| | | listType: "picture-card", |
| | | tip: "建议上传手机横屏拍摄的照片,宽高比16:9,最多上传5张", |
| | | canvasOption: { |
| | | text: "", |
| | | ratio: 1.0, |
| | | }, |
| | | propsHttp: { |
| | | res: "data", |
| | | url: "url" |
| | | }, |
| | | action: "/api/blade-resource/oss/endpoint/put-files" |
| | | }, |
| | | { |
| | | label: "备注", |
| | | type: "textarea", |
| | | prop: "remarks", |
| | | span: 23, |
| | | }, |
| | | ] |
| | | }, |
| | | option1: { |
| | | height: 'auto', |
| | | height: "auto", |
| | | calcHeight: 30, |
| | | tip: false, |
| | | searchShow: true, |
| | |
| | | dicUrl: "/api/stockfactory/stockfactory/selectStockFa", |
| | | props: { |
| | | label: "dictValue", |
| | | value: "dictKey" |
| | | value: "dictKey", |
| | | }, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请输入农资", |
| | | trigger: "blur" |
| | | }] |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请输入农资", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: "规格", |
| | |
| | | prop: "specs1", |
| | | span: 5, |
| | | viewDisplay: false, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请输入规格", |
| | | trigger: "blur" |
| | | }] |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请输入规格", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: "规格值1", |
| | |
| | | dicUrl: "/api/blade-system/dict-biz/dictionary?code=stockSpecs1", |
| | | props: { |
| | | label: "dictValue", |
| | | value: "dictKey" |
| | | value: "dictKey", |
| | | }, |
| | | dataType: "number", |
| | | search: true, |
| | |
| | | dicUrl: "/api/blade-system/dict-biz/dictionary?code=stockSpecs2", |
| | | props: { |
| | | label: "dictValue", |
| | | value: "dictKey" |
| | | value: "dictKey", |
| | | }, |
| | | dataType: "number", |
| | | search: true, |
| | |
| | | dicUrl: "/api/blade-system/dict-biz/dictionary?code=stockPurchase", |
| | | props: { |
| | | label: "dictValue", |
| | | value: "dictKey" |
| | | value: "dictKey", |
| | | }, |
| | | dataType: "number", |
| | | search: true, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请输入入库类型", |
| | | trigger: "blur" |
| | | }] |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请输入入库类型", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: "入库时间", |
| | |
| | | format: "yyyy-MM-dd", |
| | | valueFormat: "yyyy-MM-dd", |
| | | span: 11, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请输入入库时间", |
| | | trigger: "blur" |
| | | }] |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请输入入库时间", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: "单据、凭证照片", |
| | |
| | | }, |
| | | propsHttp: { |
| | | res: "data", |
| | | url: "url" |
| | | url: "url", |
| | | }, |
| | | action: "/api/blade-resource/oss/endpoint/put-files" |
| | | action: "/api/blade-resource/oss/endpoint/put-files", |
| | | }, |
| | | { |
| | | label: "备注", |
| | |
| | | prop: "remarks1", |
| | | span: 23, |
| | | }, |
| | | ] |
| | | ], |
| | | }, |
| | | option2: { |
| | | height: 'auto', |
| | | height: "auto", |
| | | calcHeight: 30, |
| | | tip: false, |
| | | searchShow: true, |
| | |
| | | dicUrl: "/api/stockfactory/stockfactory/selectStockFa", |
| | | props: { |
| | | label: "dictValue", |
| | | value: "dictKey" |
| | | value: "dictKey", |
| | | }, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请输入农资", |
| | | trigger: "blur" |
| | | }] |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请输入农资", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: "规格", |
| | |
| | | prop: "specs1", |
| | | span: 5, |
| | | viewDisplay: false, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请输入规格", |
| | | trigger: "blur" |
| | | }] |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请输入规格", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: "规格值1", |
| | |
| | | dicUrl: "/api/blade-system/dict-biz/dictionary?code=stockSpecs1", |
| | | props: { |
| | | label: "dictValue", |
| | | value: "dictKey" |
| | | value: "dictKey", |
| | | }, |
| | | dataType: "number", |
| | | search: true, |
| | |
| | | dicUrl: "/api/blade-system/dict-biz/dictionary?code=stockSpecs2", |
| | | props: { |
| | | label: "dictValue", |
| | | value: "dictKey" |
| | | value: "dictKey", |
| | | }, |
| | | dataType: "number", |
| | | search: true, |
| | |
| | | dicUrl: "/api/blade-system/dict-biz/dictionary?code=stockPurchase1", |
| | | props: { |
| | | label: "dictValue", |
| | | value: "dictKey" |
| | | value: "dictKey", |
| | | }, |
| | | dataType: "number", |
| | | search: true, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请输入出库类型", |
| | | trigger: "blur" |
| | | }] |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请输入出库类型", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: "入库时间", |
| | |
| | | format: "yyyy-MM-dd", |
| | | valueFormat: "yyyy-MM-dd", |
| | | span: 11, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请输入入库时间", |
| | | trigger: "blur" |
| | | }] |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请输入入库时间", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: "单据、凭证照片", |
| | |
| | | }, |
| | | propsHttp: { |
| | | res: "data", |
| | | url: "url" |
| | | url: "url", |
| | | }, |
| | | action: "/api/blade-resource/oss/endpoint/put-files" |
| | | action: "/api/blade-resource/oss/endpoint/put-files", |
| | | }, |
| | | { |
| | | label: "备注", |
| | |
| | | prop: "remarks1", |
| | | span: 23, |
| | | }, |
| | | ] |
| | | ], |
| | | }, |
| | | gradeBoxVisible: false, |
| | | gradeBoxVisible1: false, |
| | | data: [] |
| | | data: [], |
| | | }; |
| | | }, |
| | | computed: { |
| | |
| | | addBtn: this.vaildData(this.permission.stock_add, false), |
| | | viewBtn: this.vaildData(this.permission.stock_view, false), |
| | | delBtn: this.vaildData(this.permission.stock_delete, true), |
| | | editBtn: this.vaildData(this.permission.stock_edit, false) |
| | | editBtn: this.vaildData(this.permission.stock_edit, false), |
| | | }; |
| | | }, |
| | | ids() { |
| | | let ids = []; |
| | | this.selectionList.forEach(ele => { |
| | | this.selectionList.forEach((ele) => { |
| | | ids.push(ele.id); |
| | | }); |
| | | return ids.join(","); |
| | | } |
| | | }, |
| | | }, |
| | | created() { |
| | | //初始化页面数据 |
| | | this.onLoad(this.page); |
| | | }, |
| | | methods: { |
| | | //农资类型select 改变事件 |
| | | stypeChange(value){ |
| | | this.query['stype'] = value; |
| | | this.onLoad(this.page,this.query); |
| | | }, |
| | | //库存 select 改变事件 |
| | | stateChange(value){ |
| | | this.query['state'] = value; |
| | | this.onLoad(this.page,this.query); |
| | | }, |
| | | //keywordChange 输入事件 |
| | | keywordChange(value){ |
| | | this.query['keyword'] = value; |
| | | this.onLoad(this.page,this.query); |
| | | }, |
| | | //分页 |
| | | handleSizeChange(val) { |
| | | this.page.pageSize = val; |
| | | this.onLoad(this.page); |
| | | }, |
| | | //改变页码 |
| | | handleCurrentChange(val) { |
| | | this.page.currentPage = val; |
| | | this.onLoad(this.page); |
| | | }, |
| | | //入库 |
| | | submitR(row, done, loading) { |
| | | var that = this; |
| | |
| | | that.$refs.formR.resetFields(); |
| | | that.$message({ |
| | | type: "success", |
| | | message: "操作成功!" |
| | | message: "操作成功!", |
| | | }); |
| | | that.gradeBoxVisible = false; |
| | | |
| | | done(); |
| | | }, |
| | | error => { |
| | | (error) => { |
| | | window.console.log(error); |
| | | done(); |
| | | } |
| | |
| | | that.$refs.formC.resetFields(); |
| | | that.$message({ |
| | | type: "success", |
| | | message: "操作成功!" |
| | | message: "操作成功!", |
| | | }); |
| | | that.gradeBoxVisible1 = false; |
| | | |
| | | done(); |
| | | }, |
| | | error => { |
| | | (error) => { |
| | | window.console.log(error); |
| | | done(); |
| | | } |
| | |
| | | specsVal1: row.specsValue1, |
| | | specsVal2: row.specsValue1, |
| | | stockType1: 1, |
| | | |
| | | }; |
| | | this.gradeBoxVisible = true; |
| | | }, |
| | |
| | | specsVal1: row.specsValue1, |
| | | specsVal2: row.specsValue1, |
| | | stockType1: 0, |
| | | |
| | | }; |
| | | this.gradeBoxVisible1 = true; |
| | | }, |
| | | rowSave(row, done, loading) { |
| | | add(row).then(() => { |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!" |
| | | }); |
| | | done(); |
| | | }, error => { |
| | | loading(); |
| | | window.console.log(error); |
| | | }); |
| | | add(row).then( |
| | | () => { |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }); |
| | | done(); |
| | | }, |
| | | (error) => { |
| | | loading(); |
| | | window.console.log(error); |
| | | } |
| | | ); |
| | | }, |
| | | rowUpdate(row, index, done, loading) { |
| | | update(row).then(() => { |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!" |
| | | }); |
| | | done(); |
| | | }, error => { |
| | | loading(); |
| | | console.log(error); |
| | | }); |
| | | update(row).then( |
| | | () => { |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }); |
| | | done(); |
| | | }, |
| | | (error) => { |
| | | loading(); |
| | | console.log(error); |
| | | } |
| | | ); |
| | | }, |
| | | rowDel(row) { |
| | | this.$confirm("确定将选择数据删除?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning" |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | return remove(row.id); |
| | |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!" |
| | | message: "操作成功!", |
| | | }); |
| | | }); |
| | | }, |
| | |
| | | this.$confirm("确定将选择数据删除?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning" |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | return remove(this.ids); |
| | |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!" |
| | | message: "操作成功!", |
| | | }); |
| | | this.$refs.crud.toggleSelection(); |
| | | }); |
| | | }, |
| | | beforeOpen(done, type) { |
| | | if (["edit", "view"].includes(type)) { |
| | | getDetail(this.form.id).then(res => { |
| | | getDetail(this.form.id).then((res) => { |
| | | this.form = res.data.data; |
| | | }); |
| | | } |
| | |
| | | start(row) { |
| | | this.$router.push({ |
| | | path: `/stockrecord`, |
| | | query: row |
| | | query: row, |
| | | }); |
| | | }, |
| | | //已出库存农资 |
| | | startc(row) { |
| | | this.$router.push({ |
| | | path: `/soldrecord`, |
| | | query: row |
| | | query: row, |
| | | }); |
| | | }, |
| | | searchReset() { |
| | | this.query = {}; |
| | | this.onLoad(this.page); |
| | | }, |
| | | searchChange(params, done) { |
| | | this.query = params; |
| | | this.page.currentPage = 1; |
| | | this.onLoad(this.page, params); |
| | | done(); |
| | | }, |
| | | selectionChange(list) { |
| | | this.selectionList = list; |
| | | }, |
| | | selectionClear() { |
| | | this.selectionList = []; |
| | | this.$refs.crud.toggleSelection(); |
| | | }, |
| | | currentChange(currentPage) { |
| | | this.page.currentPage = currentPage; |
| | | }, |
| | | sizeChange(pageSize) { |
| | | this.page.pageSize = pageSize; |
| | | }, |
| | | refreshChange() { |
| | | this.onLoad(this.page, this.query); |
| | | }, |
| | | onLoad(page, params = {}) { |
| | | this.loading = true; |
| | | getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => { |
| | | getList( |
| | | page.currentPage, |
| | | page.pageSize, |
| | | Object.assign(params, this.query) |
| | | ).then((res) => { |
| | | const data = res.data.data; |
| | | this.page.total = data.total; |
| | | this.data = data.records; |
| | | this.loading = false; |
| | | this.selectionClear(); |
| | | }); |
| | | } |
| | | } |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |
| | | |
| | | <style> |
| | | <style lang="scss" scoped> |
| | | .body { |
| | | background-color: #fff; |
| | | width: 98%; |
| | | height: 95%; |
| | | margin: 0 auto; |
| | | |
| | | .search { |
| | | padding-top: 40px; |
| | | margin-left: 30px; |
| | | } |
| | | |
| | | .content { |
| | | padding-top: 20px; |
| | | width: 98%; |
| | | height: auto; |
| | | min-height: 630px; |
| | | margin: 0 auto; |
| | | |
| | | .farm { |
| | | border: 1px solid #f3f3f3; |
| | | border-radius: 8px; |
| | | box-shadow: 0px 0px 6px 1px rgba(0, 0, 0, 0.05); |
| | | opacity: 1; |
| | | height: 151px; |
| | | |
| | | .left { |
| | | width: 78%; |
| | | height: 151xp; |
| | | float: left; |
| | | |
| | | .farm-img { |
| | | width: 115px; |
| | | height: 115px; |
| | | line-height: 151px; |
| | | background: #f3f3f3; |
| | | border-radius: 8px 8px 8px 8px; |
| | | opacity: 1; |
| | | text-align: center; |
| | | margin-left: 20px; |
| | | margin-top: 19px; |
| | | float: left; |
| | | |
| | | img { |
| | | width: 100%; |
| | | height: 100%; |
| | | } |
| | | } |
| | | |
| | | .farm-param { |
| | | height: 100%; |
| | | position: relative; |
| | | left: 20px; |
| | | top: 20px; |
| | | |
| | | .param-spec { |
| | | height: 30px; |
| | | |
| | | .spec-1 { |
| | | width: 42px; |
| | | height: 21px; |
| | | background: #fdf2e9; |
| | | border-radius: 11px 11px 11px 11px; |
| | | opacity: 1; |
| | | text-align: center; |
| | | float: left; |
| | | |
| | | span { |
| | | font-size: 12px; |
| | | font-weight: 400; |
| | | color: #ef8a3c; |
| | | font-family: Microsoft YaHei-Regular, Microsoft YaHei; |
| | | } |
| | | } |
| | | |
| | | .spec-2 { |
| | | width: 53px; |
| | | height: 21px; |
| | | background: #fdf2e9; |
| | | border-radius: 11px 11px 11px 11px; |
| | | opacity: 1; |
| | | text-align: center; |
| | | float: left; |
| | | margin-left: 10px; |
| | | |
| | | span { |
| | | font-size: 12px; |
| | | font-weight: 400; |
| | | color: #ef8a3c; |
| | | font-family: Microsoft YaHei-Regular, Microsoft YaHei; |
| | | } |
| | | } |
| | | |
| | | .spec-3 { |
| | | width: 72px; |
| | | height: 21px; |
| | | background: #f4f4f4; |
| | | border-radius: 11px 11px 11px 11px; |
| | | opacity: 1; |
| | | text-align: center; |
| | | margin-left: 10px; |
| | | float: left; |
| | | |
| | | span { |
| | | font-size: 12px; |
| | | font-weight: 400; |
| | | color: #999999; |
| | | font-family: Microsoft YaHei-Regular, Microsoft YaHei; |
| | | } |
| | | } |
| | | } |
| | | |
| | | .param-cen { |
| | | font-size: 20px; |
| | | font-weight: bold; |
| | | color: #333333; |
| | | height: 60px; |
| | | line-height: 60px; |
| | | } |
| | | |
| | | .param-detail { |
| | | height: 28px; |
| | | display: flex; |
| | | align-items: center; |
| | | padding-top: 0px; |
| | | cursor: pointer; |
| | | |
| | | img { |
| | | width: 11.6px; |
| | | height: 13.06px; |
| | | float: left; |
| | | } |
| | | |
| | | .detail-text { |
| | | font-size: 12px; |
| | | font-family: Microsoft YaHei-Regular, Microsoft YaHei; |
| | | font-weight: 400; |
| | | color: #5abf78; |
| | | margin-left: 5px; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | .right { |
| | | height: 100%; |
| | | |
| | | .spec { |
| | | height: 151px; |
| | | line-height: 151px; |
| | | font-size: 26px; |
| | | color: #5abf78; |
| | | float: left; |
| | | |
| | | .num { |
| | | font-size: 29px; |
| | | font-family: DIN-Bold, DIN; |
| | | font-weight: bold; |
| | | color: #5abf78; |
| | | } |
| | | |
| | | .num1 { |
| | | font-size: 14px; |
| | | font-family: Microsoft YaHei-Regular, Microsoft YaHei; |
| | | font-weight: bold; |
| | | color: #5abf78; |
| | | } |
| | | } |
| | | |
| | | .btn { |
| | | height: 151px; |
| | | display: flex; |
| | | flex-direction: column; |
| | | justify-content: center; |
| | | padding-left: 25px; |
| | | |
| | | .in { |
| | | width: 67px; |
| | | height: 25px; |
| | | line-height: 25px; |
| | | background: rgba(90, 191, 120, 0.1); |
| | | border-radius: 13px; |
| | | border: 1px solid #5abf78; |
| | | text-align: center; |
| | | cursor: pointer; |
| | | |
| | | img { |
| | | width: 11.38px; |
| | | height: 11.35px; |
| | | } |
| | | |
| | | span { |
| | | font-size: 12px; |
| | | font-family: Microsoft YaHei-Regular, Microsoft YaHei; |
| | | font-weight: 400; |
| | | color: #5abf78; |
| | | position: relative; |
| | | top: -2px; |
| | | left:3px; |
| | | } |
| | | } |
| | | |
| | | |
| | | .out { |
| | | margin-top: 10px; |
| | | width: 67px; |
| | | height: 25px; |
| | | line-height: 25px; |
| | | background: rgba(90, 191, 120, 0.1); |
| | | border-radius: 13px; |
| | | border: 1px solid #5abf78; |
| | | text-align: center; |
| | | cursor: pointer; |
| | | |
| | | img { |
| | | width: 11.38px; |
| | | height: 11.35px; |
| | | } |
| | | |
| | | span { |
| | | font-size: 12px; |
| | | font-family: Microsoft YaHei-Regular, Microsoft YaHei; |
| | | font-weight: 400; |
| | | color: #5abf78; |
| | | position: relative; |
| | | top: -2px; |
| | | left:3px; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | .el-page { |
| | | padding-top: 30px; |
| | | text-align: center; |
| | | } |
| | | } |
| | | </style> |