¶Ô±ÈÐÂÎļþ |
| | |
| | | import request from '@/utils/request' |
| | | |
| | | // æ¥è¯¢åºä½å表 |
| | | export function listLocation(query) { |
| | | return request({ |
| | | url: '/system/location/list', |
| | | method: 'get', |
| | | params: query |
| | | }) |
| | | } |
| | | |
| | | // æ¥è¯¢åºä½è¯¦ç» |
| | | export function getLocation(locationId) { |
| | | return request({ |
| | | url: '/system/location/' + locationId, |
| | | method: 'get' |
| | | }) |
| | | } |
| | | |
| | | // æ°å¢åºä½ |
| | | export function addLocation(data) { |
| | | return request({ |
| | | url: '/system/location', |
| | | method: 'post', |
| | | data: data |
| | | }) |
| | | } |
| | | |
| | | // ä¿®æ¹åºä½ |
| | | export function updateLocation(data) { |
| | | return request({ |
| | | url: '/system/location', |
| | | method: 'put', |
| | | data: data |
| | | }) |
| | | } |
| | | |
| | | // å é¤åºä½ |
| | | export function delLocation(locationId) { |
| | | return request({ |
| | | url: '/system/location/' + locationId, |
| | | method: 'delete' |
| | | }) |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import request from '@/utils/request' |
| | | |
| | | // æ¥è¯¢åºä½ç»å表 |
| | | export function listLocationGroup(query) { |
| | | return request({ |
| | | url: '/system/locationGroup/list', |
| | | method: 'get', |
| | | params: query |
| | | }) |
| | | } |
| | | |
| | | // æ¥è¯¢åºä½ç»è¯¦ç» |
| | | export function getLocationGroup(locationGroupId) { |
| | | return request({ |
| | | url: '/system/locationGroup/' + locationGroupId, |
| | | method: 'get' |
| | | }) |
| | | } |
| | | |
| | | // æ°å¢åºä½ç» |
| | | export function addLocationGroup(data) { |
| | | return request({ |
| | | url: '/system/locationGroup', |
| | | method: 'post', |
| | | data: data |
| | | }) |
| | | } |
| | | |
| | | // ä¿®æ¹åºä½ç» |
| | | export function updateLocationGroup(data) { |
| | | return request({ |
| | | url: '/system/locationGroup', |
| | | method: 'put', |
| | | data: data |
| | | }) |
| | | } |
| | | |
| | | // å é¤åºä½ç» |
| | | export function delLocationGroup(locationGroupId) { |
| | | return request({ |
| | | url: '/system/locationGroup/' + locationGroupId, |
| | | method: 'delete' |
| | | }) |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import request from '@/utils/request' |
| | | |
| | | // æ¥è¯¢ä»åºå表 |
| | | export function listWarehouse(query) { |
| | | return request({ |
| | | url: '/system/warehouse/list', |
| | | method: 'get', |
| | | params: query |
| | | }) |
| | | } |
| | | |
| | | // æ¥è¯¢ä»åºè¯¦ç» |
| | | export function getWarehouse(warehouseId) { |
| | | return request({ |
| | | url: '/system/warehouse/' + warehouseId, |
| | | method: 'get' |
| | | }) |
| | | } |
| | | |
| | | // æ°å¢ä»åº |
| | | export function addWarehouse(data) { |
| | | return request({ |
| | | url: '/system/warehouse', |
| | | method: 'post', |
| | | data: data |
| | | }) |
| | | } |
| | | |
| | | // ä¿®æ¹ä»åº |
| | | export function updateWarehouse(data) { |
| | | return request({ |
| | | url: '/system/warehouse', |
| | | method: 'put', |
| | | data: data |
| | | }) |
| | | } |
| | | |
| | | // å é¤ä»åº |
| | | export function delWarehouse(warehouseId) { |
| | | return request({ |
| | | url: '/system/warehouse/' + warehouseId, |
| | | method: 'delete' |
| | | }) |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div class="app-container"> |
| | | <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> |
| | | <el-form-item label="ä»åº" prop="lgort"> |
| | | <el-input |
| | | v-model="queryParams.lgort" |
| | | placeholder="请è¾å
¥ä»åº" |
| | | clearable |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="å称" prop="locationName"> |
| | | <el-input |
| | | v-model="queryParams.locationName" |
| | | placeholder="请è¾å
¥å称" |
| | | clearable |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="ç¶æ" prop="state"> |
| | | <el-input |
| | | v-model="queryParams.state" |
| | | placeholder="请è¾å
¥ç¶æ" |
| | | clearable |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">æç´¢</el-button> |
| | | <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">éç½®</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | |
| | | <el-row :gutter="10" class="mb8"> |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | | type="primary" |
| | | plain |
| | | icon="el-icon-plus" |
| | | size="mini" |
| | | @click="handleAdd" |
| | | v-hasPermi="['system:location:add']" |
| | | >æ°å¢</el-button> |
| | | </el-col> |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | | type="success" |
| | | plain |
| | | icon="el-icon-edit" |
| | | size="mini" |
| | | :disabled="single" |
| | | @click="handleUpdate" |
| | | v-hasPermi="['system:location:edit']" |
| | | >ä¿®æ¹</el-button> |
| | | </el-col> |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | | type="danger" |
| | | plain |
| | | icon="el-icon-delete" |
| | | size="mini" |
| | | :disabled="multiple" |
| | | @click="handleDelete" |
| | | v-hasPermi="['system:location:remove']" |
| | | >å é¤</el-button> |
| | | </el-col> |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | | type="warning" |
| | | plain |
| | | icon="el-icon-download" |
| | | size="mini" |
| | | @click="handleExport" |
| | | v-hasPermi="['system:location:export']" |
| | | >导åº</el-button> |
| | | </el-col> |
| | | <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> |
| | | </el-row> |
| | | |
| | | <el-table v-loading="loading" :data="locationList" @selection-change="handleSelectionChange"> |
| | | <el-table-column type="selection" width="55" align="center" /> |
| | | <el-table-column label="åºä½ID" align="center" prop="locationId" v-if="true"/> |
| | | <el-table-column label="é¶å±åºä½ID" align="center" prop="parentLocationId" /> |
| | | <el-table-column label="ä»åº" align="center" prop="lgort" /> |
| | | <el-table-column label="åºä½åºå·" align="center" prop="locationNo" /> |
| | | <el-table-column label="å称" align="center" prop="locationName" /> |
| | | <el-table-column label="å·¥å" align="center" prop="werks" /> |
| | | <el-table-column label="ç±»å" align="center" prop="type" /> |
| | | <el-table-column label="ä½ç§¯éå¶" align="center" prop="volumeRestriction" /> |
| | | <el-table-column label="éééå¶" align="center" prop="weightLimit" /> |
| | | <el-table-column label="ç®±æ°éå¶" align="center" prop="containerNumberLimit" /> |
| | | <el-table-column label="æ°ééå¶" align="center" prop="quantitativeRestrictions" /> |
| | | <el-table-column label="æçéå¶" align="center" prop="trayLimit" /> |
| | | <el-table-column label="é¿åº¦" align="center" prop="length" /> |
| | | <el-table-column label="宽" align="center" prop="width" /> |
| | | <el-table-column label="é«" align="center" prop="height" /> |
| | | <el-table-column label="åæ X" align="center" prop="coordinateX" /> |
| | | <el-table-column label="åæ Y" align="center" prop="coordinateY" /> |
| | | <el-table-column label="åæ Z" align="center" prop="coordinateZ" /> |
| | | <el-table-column label="åç´ X" align="center" prop="pixelX" /> |
| | | <el-table-column label="åç´ Y" align="center" prop="pixelY" /> |
| | | <el-table-column label="空é´å±æ°" align="center" prop="paceLayer" /> |
| | | <el-table-column label="1-å
许" align="center" prop="allowMixedProduct" /> |
| | | <el-table-column label="1-å
许" align="center" prop="allowMixedProductLot" /> |
| | | <el-table-column label="å±çº§" align="center" prop="layer" /> |
| | | <el-table-column label="1-åå¨" align="center" prop="hasChild" /> |
| | | <el-table-column label="è·¯å¾" align="center" prop="path" /> |
| | | <el-table-column label="æè¿°" align="center" prop="description" /> |
| | | <el-table-column label="ç¶æ" align="center" prop="state" /> |
| | | <el-table-column label="æåæ´æ°äººid" align="center" prop="lastUpdatedUserId" /> |
| | | <el-table-column label="æåæ´æ°äººå§å" align="center" prop="lastUpdatedUserName" /> |
| | | <el-table-column label="æåæ´æ°æ¶é´" align="center" prop="lastUpdatedDateTime" width="180"> |
| | | <template slot-scope="scope"> |
| | | <span>{{ parseTime(scope.row.lastUpdatedDateTime, '{y}-{m}-{d}') }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="æä½" align="center" class-name="small-padding fixed-width"> |
| | | <template slot-scope="scope"> |
| | | <el-button |
| | | size="mini" |
| | | type="text" |
| | | icon="el-icon-edit" |
| | | @click="handleUpdate(scope.row)" |
| | | v-hasPermi="['system:location:edit']" |
| | | >ä¿®æ¹</el-button> |
| | | <el-button |
| | | size="mini" |
| | | type="text" |
| | | icon="el-icon-delete" |
| | | @click="handleDelete(scope.row)" |
| | | v-hasPermi="['system:location:remove']" |
| | | >å é¤</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | |
| | | <pagination |
| | | v-show="total>0" |
| | | :total="total" |
| | | :page.sync="queryParams.pageNum" |
| | | :limit.sync="queryParams.pageSize" |
| | | @pagination="getList" |
| | | /> |
| | | |
| | | <!-- æ·»å æä¿®æ¹åºä½å¯¹è¯æ¡ --> |
| | | <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> |
| | | <el-form ref="form" :model="form" :rules="rules" label-width="80px"> |
| | | <el-form-item label="é¶å±åºä½ID" prop="parentLocationId"> |
| | | <el-input v-model="form.parentLocationId" placeholder="请è¾å
¥é¶å±åºä½ID" /> |
| | | </el-form-item> |
| | | <el-form-item label="ä»åº" prop="lgort"> |
| | | <el-input v-model="form.lgort" placeholder="请è¾å
¥ä»åº" /> |
| | | </el-form-item> |
| | | <el-form-item label="åºä½åºå·" prop="locationNo"> |
| | | <el-input v-model="form.locationNo" placeholder="请è¾å
¥åºä½åºå·" /> |
| | | </el-form-item> |
| | | <el-form-item label="å称" prop="locationName"> |
| | | <el-input v-model="form.locationName" placeholder="请è¾å
¥å称" /> |
| | | </el-form-item> |
| | | <el-form-item label="å·¥å" prop="werks"> |
| | | <el-input v-model="form.werks" placeholder="请è¾å
¥å·¥å" /> |
| | | </el-form-item> |
| | | <el-form-item label="ä½ç§¯éå¶" prop="volumeRestriction"> |
| | | <el-input v-model="form.volumeRestriction" placeholder="请è¾å
¥ä½ç§¯éå¶" /> |
| | | </el-form-item> |
| | | <el-form-item label="éééå¶" prop="weightLimit"> |
| | | <el-input v-model="form.weightLimit" placeholder="请è¾å
¥éééå¶" /> |
| | | </el-form-item> |
| | | <el-form-item label="ç®±æ°éå¶" prop="containerNumberLimit"> |
| | | <el-input v-model="form.containerNumberLimit" placeholder="请è¾å
¥ç®±æ°éå¶" /> |
| | | </el-form-item> |
| | | <el-form-item label="æ°ééå¶" prop="quantitativeRestrictions"> |
| | | <el-input v-model="form.quantitativeRestrictions" placeholder="请è¾å
¥æ°ééå¶" /> |
| | | </el-form-item> |
| | | <el-form-item label="æçéå¶" prop="trayLimit"> |
| | | <el-input v-model="form.trayLimit" placeholder="请è¾å
¥æçéå¶" /> |
| | | </el-form-item> |
| | | <el-form-item label="é¿åº¦" prop="length"> |
| | | <el-input v-model="form.length" placeholder="请è¾å
¥é¿åº¦" /> |
| | | </el-form-item> |
| | | <el-form-item label="宽" prop="width"> |
| | | <el-input v-model="form.width" placeholder="请è¾å
¥å®½" /> |
| | | </el-form-item> |
| | | <el-form-item label="é«" prop="height"> |
| | | <el-input v-model="form.height" placeholder="请è¾å
¥é«" /> |
| | | </el-form-item> |
| | | <el-form-item label="åæ X" prop="coordinateX"> |
| | | <el-input v-model="form.coordinateX" placeholder="请è¾å
¥åæ X" /> |
| | | </el-form-item> |
| | | <el-form-item label="åæ Y" prop="coordinateY"> |
| | | <el-input v-model="form.coordinateY" placeholder="请è¾å
¥åæ Y" /> |
| | | </el-form-item> |
| | | <el-form-item label="åæ Z" prop="coordinateZ"> |
| | | <el-input v-model="form.coordinateZ" placeholder="请è¾å
¥åæ Z" /> |
| | | </el-form-item> |
| | | <el-form-item label="åç´ X" prop="pixelX"> |
| | | <el-input v-model="form.pixelX" placeholder="请è¾å
¥åç´ X" /> |
| | | </el-form-item> |
| | | <el-form-item label="åç´ Y" prop="pixelY"> |
| | | <el-input v-model="form.pixelY" placeholder="请è¾å
¥åç´ Y" /> |
| | | </el-form-item> |
| | | <el-form-item label="空é´å±æ°" prop="paceLayer"> |
| | | <el-input v-model="form.paceLayer" placeholder="请è¾å
¥ç©ºé´å±æ°" /> |
| | | </el-form-item> |
| | | <el-form-item label="1-å
许" prop="allowMixedProduct"> |
| | | <el-input v-model="form.allowMixedProduct" placeholder="请è¾å
¥1-å
许" /> |
| | | </el-form-item> |
| | | <el-form-item label="1-å
许" prop="allowMixedProductLot"> |
| | | <el-input v-model="form.allowMixedProductLot" placeholder="请è¾å
¥1-å
许" /> |
| | | </el-form-item> |
| | | <el-form-item label="å±çº§" prop="layer"> |
| | | <el-input v-model="form.layer" placeholder="请è¾å
¥å±çº§" /> |
| | | </el-form-item> |
| | | <el-form-item label="1-åå¨" prop="hasChild"> |
| | | <el-input v-model="form.hasChild" placeholder="请è¾å
¥1-åå¨" /> |
| | | </el-form-item> |
| | | <el-form-item label="è·¯å¾" prop="path"> |
| | | <el-input v-model="form.path" placeholder="请è¾å
¥è·¯å¾" /> |
| | | </el-form-item> |
| | | <el-form-item label="æè¿°" prop="description"> |
| | | <el-input v-model="form.description" placeholder="请è¾å
¥æè¿°" /> |
| | | </el-form-item> |
| | | <el-form-item label="ç¶æ" prop="state"> |
| | | <el-input v-model="form.state" placeholder="请è¾å
¥ç¶æ" /> |
| | | </el-form-item> |
| | | <el-form-item label="æåæ´æ°äººid" prop="lastUpdatedUserId"> |
| | | <el-input v-model="form.lastUpdatedUserId" placeholder="请è¾å
¥æåæ´æ°äººid" /> |
| | | </el-form-item> |
| | | <el-form-item label="æåæ´æ°äººå§å" prop="lastUpdatedUserName"> |
| | | <el-input v-model="form.lastUpdatedUserName" placeholder="请è¾å
¥æåæ´æ°äººå§å" /> |
| | | </el-form-item> |
| | | <el-form-item label="æåæ´æ°æ¶é´" prop="lastUpdatedDateTime"> |
| | | <el-date-picker clearable |
| | | v-model="form.lastUpdatedDateTime" |
| | | type="datetime" |
| | | value-format="yyyy-MM-dd HH:mm:ss" |
| | | placeholder="请éæ©æåæ´æ°æ¶é´"> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | </el-form> |
| | | <div slot="footer" class="dialog-footer"> |
| | | <el-button :loading="buttonLoading" type="primary" @click="submitForm">ç¡® å®</el-button> |
| | | <el-button @click="cancel">å æ¶</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import { listLocation, getLocation, delLocation, addLocation, updateLocation } from "@/api/basicData/location"; |
| | | |
| | | export default { |
| | | name: "Location", |
| | | data() { |
| | | return { |
| | | // æé®loading |
| | | buttonLoading: false, |
| | | // é®ç½©å± |
| | | loading: true, |
| | | // éä¸æ°ç» |
| | | ids: [], |
| | | // éå个ç¦ç¨ |
| | | single: true, |
| | | // éå¤ä¸ªç¦ç¨ |
| | | multiple: true, |
| | | // æ¾ç¤ºæç´¢æ¡ä»¶ |
| | | showSearch: true, |
| | | // æ»æ¡æ° |
| | | total: 0, |
| | | // åºä½è¡¨æ ¼æ°æ® |
| | | locationList: [], |
| | | // å¼¹åºå±æ é¢ |
| | | title: "", |
| | | // æ¯å¦æ¾ç¤ºå¼¹åºå± |
| | | open: false, |
| | | // æ¥è¯¢åæ° |
| | | queryParams: { |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | lgort: undefined, |
| | | locationName: undefined, |
| | | type: undefined, |
| | | state: undefined, |
| | | }, |
| | | // 表ååæ° |
| | | form: {}, |
| | | // 表åæ ¡éª |
| | | rules: { |
| | | locationId: [ |
| | | { required: true, message: "åºä½IDä¸è½ä¸ºç©º", trigger: "blur" } |
| | | ], |
| | | parentLocationId: [ |
| | | { required: true, message: "é¶å±åºä½IDä¸è½ä¸ºç©º", trigger: "blur" } |
| | | ], |
| | | lgort: [ |
| | | { required: true, message: "ä»åºä¸è½ä¸ºç©º", trigger: "blur" } |
| | | ], |
| | | locationNo: [ |
| | | { required: true, message: "åºä½åºå·ä¸è½ä¸ºç©º", trigger: "blur" } |
| | | ], |
| | | locationName: [ |
| | | { required: true, message: "å称ä¸è½ä¸ºç©º", trigger: "blur" } |
| | | ], |
| | | werks: [ |
| | | { required: true, message: "å·¥åä¸è½ä¸ºç©º", trigger: "blur" } |
| | | ], |
| | | type: [ |
| | | { required: true, message: "ç±»åä¸è½ä¸ºç©º", trigger: "change" } |
| | | ], |
| | | volumeRestriction: [ |
| | | { required: true, message: "ä½ç§¯éå¶ä¸è½ä¸ºç©º", trigger: "blur" } |
| | | ], |
| | | weightLimit: [ |
| | | { required: true, message: "éééå¶ä¸è½ä¸ºç©º", trigger: "blur" } |
| | | ], |
| | | containerNumberLimit: [ |
| | | { required: true, message: "ç®±æ°éå¶ä¸è½ä¸ºç©º", trigger: "blur" } |
| | | ], |
| | | quantitativeRestrictions: [ |
| | | { required: true, message: "æ°ééå¶ä¸è½ä¸ºç©º", trigger: "blur" } |
| | | ], |
| | | trayLimit: [ |
| | | { required: true, message: "æçéå¶ä¸è½ä¸ºç©º", trigger: "blur" } |
| | | ], |
| | | length: [ |
| | | { required: true, message: "é¿åº¦ä¸è½ä¸ºç©º", trigger: "blur" } |
| | | ], |
| | | width: [ |
| | | { required: true, message: "宽ä¸è½ä¸ºç©º", trigger: "blur" } |
| | | ], |
| | | height: [ |
| | | { required: true, message: "é«ä¸è½ä¸ºç©º", trigger: "blur" } |
| | | ], |
| | | coordinateX: [ |
| | | { required: true, message: "åæ Xä¸è½ä¸ºç©º", trigger: "blur" } |
| | | ], |
| | | coordinateY: [ |
| | | { required: true, message: "åæ Yä¸è½ä¸ºç©º", trigger: "blur" } |
| | | ], |
| | | coordinateZ: [ |
| | | { required: true, message: "åæ Zä¸è½ä¸ºç©º", trigger: "blur" } |
| | | ], |
| | | pixelX: [ |
| | | { required: true, message: "åç´ Xä¸è½ä¸ºç©º", trigger: "blur" } |
| | | ], |
| | | pixelY: [ |
| | | { required: true, message: "åç´ Yä¸è½ä¸ºç©º", trigger: "blur" } |
| | | ], |
| | | paceLayer: [ |
| | | { required: true, message: "空é´å±æ°ä¸è½ä¸ºç©º", trigger: "blur" } |
| | | ], |
| | | allowMixedProduct: [ |
| | | { required: true, message: "1-å
许ä¸è½ä¸ºç©º", trigger: "blur" } |
| | | ], |
| | | allowMixedProductLot: [ |
| | | { required: true, message: "1-å
许ä¸è½ä¸ºç©º", trigger: "blur" } |
| | | ], |
| | | layer: [ |
| | | { required: true, message: "å±çº§ä¸è½ä¸ºç©º", trigger: "blur" } |
| | | ], |
| | | hasChild: [ |
| | | { required: true, message: "1-åå¨ä¸è½ä¸ºç©º", trigger: "blur" } |
| | | ], |
| | | path: [ |
| | | { required: true, message: "è·¯å¾ä¸è½ä¸ºç©º", trigger: "blur" } |
| | | ], |
| | | description: [ |
| | | { required: true, message: "æè¿°ä¸è½ä¸ºç©º", trigger: "blur" } |
| | | ], |
| | | state: [ |
| | | { required: true, message: "ç¶æä¸è½ä¸ºç©º", trigger: "blur" } |
| | | ], |
| | | displayOrder: [ |
| | | { required: true, message: "æåºä¸è½ä¸ºç©º", trigger: "blur" } |
| | | ], |
| | | createdUserId: [ |
| | | { required: true, message: "å建人idä¸è½ä¸ºç©º", trigger: "blur" } |
| | | ], |
| | | createdUserName: [ |
| | | { required: true, message: "å建人å§åä¸è½ä¸ºç©º", trigger: "blur" } |
| | | ], |
| | | createdDateTime: [ |
| | | { required: true, message: "å建æ¥ææ¶é´ä¸è½ä¸ºç©º", trigger: "blur" } |
| | | ], |
| | | lastUpdatedUserId: [ |
| | | { required: true, message: "æåæ´æ°äººidä¸è½ä¸ºç©º", trigger: "blur" } |
| | | ], |
| | | lastUpdatedUserName: [ |
| | | { required: true, message: "æåæ´æ°äººå§åä¸è½ä¸ºç©º", trigger: "blur" } |
| | | ], |
| | | lastUpdatedDateTime: [ |
| | | { required: true, message: "æåæ´æ°æ¶é´ä¸è½ä¸ºç©º", trigger: "blur" } |
| | | ], |
| | | isDeleted: [ |
| | | { required: true, message: "æ¯å¦å é¤ä¸è½ä¸ºç©º", trigger: "blur" } |
| | | ] |
| | | } |
| | | }; |
| | | }, |
| | | created() { |
| | | this.getList(); |
| | | }, |
| | | methods: { |
| | | /** æ¥è¯¢åºä½å表 */ |
| | | getList() { |
| | | this.loading = true; |
| | | listLocation(this.queryParams).then(response => { |
| | | this.locationList = response.rows; |
| | | this.total = response.total; |
| | | this.loading = false; |
| | | }); |
| | | }, |
| | | // åæ¶æé® |
| | | cancel() { |
| | | this.open = false; |
| | | this.reset(); |
| | | }, |
| | | // 表åéç½® |
| | | reset() { |
| | | this.form = { |
| | | locationId: undefined, |
| | | parentLocationId: undefined, |
| | | lgort: undefined, |
| | | locationNo: undefined, |
| | | locationName: undefined, |
| | | werks: undefined, |
| | | type: undefined, |
| | | volumeRestriction: undefined, |
| | | weightLimit: undefined, |
| | | containerNumberLimit: undefined, |
| | | quantitativeRestrictions: undefined, |
| | | trayLimit: undefined, |
| | | length: undefined, |
| | | width: undefined, |
| | | height: undefined, |
| | | coordinateX: undefined, |
| | | coordinateY: undefined, |
| | | coordinateZ: undefined, |
| | | pixelX: undefined, |
| | | pixelY: undefined, |
| | | paceLayer: undefined, |
| | | allowMixedProduct: undefined, |
| | | allowMixedProductLot: undefined, |
| | | layer: undefined, |
| | | hasChild: undefined, |
| | | path: undefined, |
| | | description: undefined, |
| | | state: undefined, |
| | | displayOrder: undefined, |
| | | createdUserId: undefined, |
| | | createdUserName: undefined, |
| | | createdDateTime: undefined, |
| | | lastUpdatedUserId: undefined, |
| | | lastUpdatedUserName: undefined, |
| | | lastUpdatedDateTime: undefined, |
| | | isDeleted: undefined |
| | | }; |
| | | this.resetForm("form"); |
| | | }, |
| | | /** æç´¢æé®æä½ */ |
| | | handleQuery() { |
| | | this.queryParams.pageNum = 1; |
| | | this.getList(); |
| | | }, |
| | | /** éç½®æé®æä½ */ |
| | | resetQuery() { |
| | | this.resetForm("queryForm"); |
| | | this.handleQuery(); |
| | | }, |
| | | // å¤éæ¡éä¸æ°æ® |
| | | handleSelectionChange(selection) { |
| | | this.ids = selection.map(item => item.locationId) |
| | | this.single = selection.length!==1 |
| | | this.multiple = !selection.length |
| | | }, |
| | | /** æ°å¢æé®æä½ */ |
| | | handleAdd() { |
| | | this.reset(); |
| | | this.open = true; |
| | | this.title = "æ·»å åºä½"; |
| | | }, |
| | | /** ä¿®æ¹æé®æä½ */ |
| | | handleUpdate(row) { |
| | | this.loading = true; |
| | | this.reset(); |
| | | const locationId = row.locationId || this.ids |
| | | getLocation(locationId).then(response => { |
| | | this.loading = false; |
| | | this.form = response.data; |
| | | this.open = true; |
| | | this.title = "ä¿®æ¹åºä½"; |
| | | }); |
| | | }, |
| | | /** æ交æé® */ |
| | | submitForm() { |
| | | this.$refs["form"].validate(valid => { |
| | | if (valid) { |
| | | this.buttonLoading = true; |
| | | if (this.form.locationId != null) { |
| | | updateLocation(this.form).then(response => { |
| | | this.$modal.msgSuccess("ä¿®æ¹æå"); |
| | | this.open = false; |
| | | this.getList(); |
| | | }).finally(() => { |
| | | this.buttonLoading = false; |
| | | }); |
| | | } else { |
| | | addLocation(this.form).then(response => { |
| | | this.$modal.msgSuccess("æ°å¢æå"); |
| | | this.open = false; |
| | | this.getList(); |
| | | }).finally(() => { |
| | | this.buttonLoading = false; |
| | | }); |
| | | } |
| | | } |
| | | }); |
| | | }, |
| | | /** å é¤æé®æä½ */ |
| | | handleDelete(row) { |
| | | const locationIds = row.locationId || this.ids; |
| | | this.$modal.confirm('æ¯å¦ç¡®è®¤å é¤åºä½ç¼å·ä¸º"' + locationIds + '"çæ°æ®é¡¹ï¼').then(() => { |
| | | this.loading = true; |
| | | return delLocation(locationIds); |
| | | }).then(() => { |
| | | this.loading = false; |
| | | this.getList(); |
| | | this.$modal.msgSuccess("å é¤æå"); |
| | | }).catch(() => { |
| | | }).finally(() => { |
| | | this.loading = false; |
| | | }); |
| | | }, |
| | | /** 导åºæé®æä½ */ |
| | | handleExport() { |
| | | this.download('system/location/export', { |
| | | ...this.queryParams |
| | | }, `location_${new Date().getTime()}.xlsx`) |
| | | } |
| | | } |
| | | }; |
| | | </script> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div class="app-container"> |
| | | <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> |
| | | <el-form-item label="åºä½ç»ç¼å·" prop="locationGroupNo"> |
| | | <el-input |
| | | v-model="queryParams.locationGroupNo" |
| | | placeholder="请è¾å
¥åºä½ç»ç¼å·" |
| | | clearable |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="åºä½ç»å称" prop="locationGroupName"> |
| | | <el-input |
| | | v-model="queryParams.locationGroupName" |
| | | placeholder="请è¾å
¥åºä½ç»å称" |
| | | clearable |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="ä»åºç¼å·" prop="lgort"> |
| | | <el-input |
| | | v-model="queryParams.lgort" |
| | | placeholder="请è¾å
¥ä»åºç¼å·" |
| | | clearable |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">æç´¢</el-button> |
| | | <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">éç½®</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | |
| | | <el-row :gutter="10" class="mb8"> |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | | type="primary" |
| | | plain |
| | | icon="el-icon-plus" |
| | | size="mini" |
| | | @click="handleAdd" |
| | | v-hasPermi="['system:locationGroup:add']" |
| | | >æ°å¢</el-button> |
| | | </el-col> |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | | type="success" |
| | | plain |
| | | icon="el-icon-edit" |
| | | size="mini" |
| | | :disabled="single" |
| | | @click="handleUpdate" |
| | | v-hasPermi="['system:locationGroup:edit']" |
| | | >ä¿®æ¹</el-button> |
| | | </el-col> |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | | type="danger" |
| | | plain |
| | | icon="el-icon-delete" |
| | | size="mini" |
| | | :disabled="multiple" |
| | | @click="handleDelete" |
| | | v-hasPermi="['system:locationGroup:remove']" |
| | | >å é¤</el-button> |
| | | </el-col> |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | | type="warning" |
| | | plain |
| | | icon="el-icon-download" |
| | | size="mini" |
| | | @click="handleExport" |
| | | v-hasPermi="['system:locationGroup:export']" |
| | | >导åº</el-button> |
| | | </el-col> |
| | | <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> |
| | | </el-row> |
| | | |
| | | <el-table v-loading="loading" :data="locationGroupList" @selection-change="handleSelectionChange"> |
| | | <el-table-column type="selection" width="55" align="center" /> |
| | | <el-table-column label="åºä½ç»ID" align="center" prop="locationGroupId" v-if="true"/> |
| | | <el-table-column label="åºä½ç»ç¼å·" align="center" prop="locationGroupNo" /> |
| | | <el-table-column label="å·¥å" align="center" prop="werks" /> |
| | | <el-table-column label="åºä½ç»å称" align="center" prop="locationGroupName" /> |
| | | <el-table-column label="ä»åºç¼å·" align="center" prop="lgort" /> |
| | | <el-table-column label="æè¿°" align="center" prop="description" /> |
| | | <el-table-column label="ç¶æ" align="center" prop="state" /> |
| | | <el-table-column label="å®¡æ ¸ç¶æ" align="center" prop="auditState" /> |
| | | <el-table-column label="å®¡æ ¸äººID" align="center" prop="auditUserId" /> |
| | | <el-table-column label="å®¡æ ¸äººå§å" align="center" prop="auditUserName" /> |
| | | <el-table-column label="å®¡æ ¸æ¥ææ¶é´" align="center" prop="auditDateTime" width="180"> |
| | | <template slot-scope="scope"> |
| | | <span>{{ parseTime(scope.row.auditDateTime, '{y}-{m}-{d}') }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="å®¡æ ¸æè§" align="center" prop="auditOpinion" /> |
| | | <el-table-column label="æåæ´æ°äººid" align="center" prop="lastUpdatedUserId" /> |
| | | <el-table-column label="æåæ´æ°äººå§å" align="center" prop="lastUpdatedUserName" /> |
| | | <el-table-column label="æåæ´æ°æ¶é´" align="center" prop="lastUpdatedDateTime" width="180"> |
| | | <template slot-scope="scope"> |
| | | <span>{{ parseTime(scope.row.lastUpdatedDateTime, '{y}-{m}-{d}') }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="æä½" align="center" class-name="small-padding fixed-width"> |
| | | <template slot-scope="scope"> |
| | | <el-button |
| | | size="mini" |
| | | type="text" |
| | | icon="el-icon-edit" |
| | | @click="handleUpdate(scope.row)" |
| | | v-hasPermi="['system:locationGroup:edit']" |
| | | >ä¿®æ¹</el-button> |
| | | <el-button |
| | | size="mini" |
| | | type="text" |
| | | icon="el-icon-delete" |
| | | @click="handleDelete(scope.row)" |
| | | v-hasPermi="['system:locationGroup:remove']" |
| | | >å é¤</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | |
| | | <pagination |
| | | v-show="total>0" |
| | | :total="total" |
| | | :page.sync="queryParams.pageNum" |
| | | :limit.sync="queryParams.pageSize" |
| | | @pagination="getList" |
| | | /> |
| | | |
| | | <!-- æ·»å æä¿®æ¹åºä½ç»å¯¹è¯æ¡ --> |
| | | <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> |
| | | <el-form ref="form" :model="form" :rules="rules" label-width="80px"> |
| | | <el-form-item label="åºä½ç»ç¼å·" prop="locationGroupNo"> |
| | | <el-input v-model="form.locationGroupNo" placeholder="请è¾å
¥åºä½ç»ç¼å·" /> |
| | | </el-form-item> |
| | | <el-form-item label="å·¥å" prop="werks"> |
| | | <el-input v-model="form.werks" placeholder="请è¾å
¥å·¥å" /> |
| | | </el-form-item> |
| | | <el-form-item label="åºä½ç»å称" prop="locationGroupName"> |
| | | <el-input v-model="form.locationGroupName" placeholder="请è¾å
¥åºä½ç»å称" /> |
| | | </el-form-item> |
| | | <el-form-item label="ä»åºç¼å·" prop="lgort"> |
| | | <el-input v-model="form.lgort" placeholder="请è¾å
¥ä»åºç¼å·" /> |
| | | </el-form-item> |
| | | <el-form-item label="æè¿°" prop="description"> |
| | | <el-input v-model="form.description" placeholder="请è¾å
¥æè¿°" /> |
| | | </el-form-item> |
| | | <el-form-item label="ç¶æ" prop="state"> |
| | | <el-input v-model="form.state" placeholder="请è¾å
¥ç¶æ" /> |
| | | </el-form-item> |
| | | <el-form-item label="æåæ´æ°äººid" prop="lastUpdatedUserId"> |
| | | <el-input v-model="form.lastUpdatedUserId" placeholder="请è¾å
¥æåæ´æ°äººid" /> |
| | | </el-form-item> |
| | | <el-form-item label="æåæ´æ°äººå§å" prop="lastUpdatedUserName"> |
| | | <el-input v-model="form.lastUpdatedUserName" placeholder="请è¾å
¥æåæ´æ°äººå§å" /> |
| | | </el-form-item> |
| | | <el-form-item label="æåæ´æ°æ¶é´" prop="lastUpdatedDateTime"> |
| | | <el-date-picker clearable |
| | | v-model="form.lastUpdatedDateTime" |
| | | type="datetime" |
| | | value-format="yyyy-MM-dd HH:mm:ss" |
| | | placeholder="请éæ©æåæ´æ°æ¶é´"> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | </el-form> |
| | | <div slot="footer" class="dialog-footer"> |
| | | <el-button :loading="buttonLoading" type="primary" @click="submitForm">ç¡® å®</el-button> |
| | | <el-button @click="cancel">å æ¶</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import { listLocationGroup, getLocationGroup, delLocationGroup, addLocationGroup, updateLocationGroup } from "@/api/basicData/locationGroup"; |
| | | |
| | | export default { |
| | | name: "LocationGroup", |
| | | data() { |
| | | return { |
| | | // æé®loading |
| | | buttonLoading: false, |
| | | // é®ç½©å± |
| | | loading: true, |
| | | // éä¸æ°ç» |
| | | ids: [], |
| | | // éå个ç¦ç¨ |
| | | single: true, |
| | | // éå¤ä¸ªç¦ç¨ |
| | | multiple: true, |
| | | // æ¾ç¤ºæç´¢æ¡ä»¶ |
| | | showSearch: true, |
| | | // æ»æ¡æ° |
| | | total: 0, |
| | | // åºä½ç»è¡¨æ ¼æ°æ® |
| | | locationGroupList: [], |
| | | // å¼¹åºå±æ é¢ |
| | | title: "", |
| | | // æ¯å¦æ¾ç¤ºå¼¹åºå± |
| | | open: false, |
| | | // æ¥è¯¢åæ° |
| | | queryParams: { |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | locationGroupNo: undefined, |
| | | locationGroupName: undefined, |
| | | lgort: undefined, |
| | | }, |
| | | // 表ååæ° |
| | | form: {}, |
| | | // 表åæ ¡éª |
| | | rules: { |
| | | locationGroupId: [ |
| | | { required: true, message: "åºä½ç»IDä¸è½ä¸ºç©º", trigger: "blur" } |
| | | ], |
| | | locationGroupNo: [ |
| | | { required: true, message: "åºä½ç»ç¼å·ä¸è½ä¸ºç©º", trigger: "blur" } |
| | | ], |
| | | werks: [ |
| | | { required: true, message: "å·¥åä¸è½ä¸ºç©º", trigger: "blur" } |
| | | ], |
| | | locationGroupName: [ |
| | | { required: true, message: "åºä½ç»å称ä¸è½ä¸ºç©º", trigger: "blur" } |
| | | ], |
| | | lgort: [ |
| | | { required: true, message: "ä»åºç¼å·ä¸è½ä¸ºç©º", trigger: "blur" } |
| | | ], |
| | | description: [ |
| | | { required: true, message: "æè¿°ä¸è½ä¸ºç©º", trigger: "blur" } |
| | | ], |
| | | state: [ |
| | | { required: true, message: "ç¶æä¸è½ä¸ºç©º", trigger: "blur" } |
| | | ], |
| | | displayOrder: [ |
| | | { required: true, message: "æåºä¸è½ä¸ºç©º", trigger: "blur" } |
| | | ], |
| | | createdUserId: [ |
| | | { required: true, message: "å建人idä¸è½ä¸ºç©º", trigger: "blur" } |
| | | ], |
| | | createdUserName: [ |
| | | { required: true, message: "å建人å§åä¸è½ä¸ºç©º", trigger: "blur" } |
| | | ], |
| | | createdDateTime: [ |
| | | { required: true, message: "å建æ¥ææ¶é´ä¸è½ä¸ºç©º", trigger: "blur" } |
| | | ], |
| | | auditState: [ |
| | | { required: true, message: "å®¡æ ¸ç¶æä¸è½ä¸ºç©º", trigger: "blur" } |
| | | ], |
| | | auditUserId: [ |
| | | { required: true, message: "å®¡æ ¸äººIDä¸è½ä¸ºç©º", trigger: "blur" } |
| | | ], |
| | | auditUserName: [ |
| | | { required: true, message: "å®¡æ ¸äººå§åä¸è½ä¸ºç©º", trigger: "blur" } |
| | | ], |
| | | auditDateTime: [ |
| | | { required: true, message: "å®¡æ ¸æ¥ææ¶é´ä¸è½ä¸ºç©º", trigger: "blur" } |
| | | ], |
| | | auditOpinion: [ |
| | | { required: true, message: "å®¡æ ¸æè§ä¸è½ä¸ºç©º", trigger: "blur" } |
| | | ], |
| | | lastUpdatedUserId: [ |
| | | { required: true, message: "æåæ´æ°äººidä¸è½ä¸ºç©º", trigger: "blur" } |
| | | ], |
| | | lastUpdatedUserName: [ |
| | | { required: true, message: "æåæ´æ°äººå§åä¸è½ä¸ºç©º", trigger: "blur" } |
| | | ], |
| | | lastUpdatedDateTime: [ |
| | | { required: true, message: "æåæ´æ°æ¶é´ä¸è½ä¸ºç©º", trigger: "blur" } |
| | | ], |
| | | isDeleted: [ |
| | | { required: true, message: "æ¯å¦å é¤ä¸è½ä¸ºç©º", trigger: "blur" } |
| | | ] |
| | | } |
| | | }; |
| | | }, |
| | | created() { |
| | | this.getList(); |
| | | }, |
| | | methods: { |
| | | /** æ¥è¯¢åºä½ç»å表 */ |
| | | getList() { |
| | | this.loading = true; |
| | | listLocationGroup(this.queryParams).then(response => { |
| | | this.locationGroupList = response.rows; |
| | | this.total = response.total; |
| | | this.loading = false; |
| | | }); |
| | | }, |
| | | // åæ¶æé® |
| | | cancel() { |
| | | this.open = false; |
| | | this.reset(); |
| | | }, |
| | | // 表åéç½® |
| | | reset() { |
| | | this.form = { |
| | | locationGroupId: undefined, |
| | | locationGroupNo: undefined, |
| | | werks: undefined, |
| | | locationGroupName: undefined, |
| | | lgort: undefined, |
| | | description: undefined, |
| | | state: undefined, |
| | | displayOrder: undefined, |
| | | createdUserId: undefined, |
| | | createdUserName: undefined, |
| | | createdDateTime: undefined, |
| | | auditState: undefined, |
| | | auditUserId: undefined, |
| | | auditUserName: undefined, |
| | | auditDateTime: undefined, |
| | | auditOpinion: undefined, |
| | | lastUpdatedUserId: undefined, |
| | | lastUpdatedUserName: undefined, |
| | | lastUpdatedDateTime: undefined, |
| | | isDeleted: undefined |
| | | }; |
| | | this.resetForm("form"); |
| | | }, |
| | | /** æç´¢æé®æä½ */ |
| | | handleQuery() { |
| | | this.queryParams.pageNum = 1; |
| | | this.getList(); |
| | | }, |
| | | /** éç½®æé®æä½ */ |
| | | resetQuery() { |
| | | this.resetForm("queryForm"); |
| | | this.handleQuery(); |
| | | }, |
| | | // å¤éæ¡éä¸æ°æ® |
| | | handleSelectionChange(selection) { |
| | | this.ids = selection.map(item => item.locationGroupId) |
| | | this.single = selection.length!==1 |
| | | this.multiple = !selection.length |
| | | }, |
| | | /** æ°å¢æé®æä½ */ |
| | | handleAdd() { |
| | | this.reset(); |
| | | this.open = true; |
| | | this.title = "æ·»å åºä½ç»"; |
| | | }, |
| | | /** ä¿®æ¹æé®æä½ */ |
| | | handleUpdate(row) { |
| | | this.loading = true; |
| | | this.reset(); |
| | | const locationGroupId = row.locationGroupId || this.ids |
| | | getLocationGroup(locationGroupId).then(response => { |
| | | this.loading = false; |
| | | this.form = response.data; |
| | | this.open = true; |
| | | this.title = "ä¿®æ¹åºä½ç»"; |
| | | }); |
| | | }, |
| | | /** æ交æé® */ |
| | | submitForm() { |
| | | this.$refs["form"].validate(valid => { |
| | | if (valid) { |
| | | this.buttonLoading = true; |
| | | if (this.form.locationGroupId != null) { |
| | | updateLocationGroup(this.form).then(response => { |
| | | this.$modal.msgSuccess("ä¿®æ¹æå"); |
| | | this.open = false; |
| | | this.getList(); |
| | | }).finally(() => { |
| | | this.buttonLoading = false; |
| | | }); |
| | | } else { |
| | | addLocationGroup(this.form).then(response => { |
| | | this.$modal.msgSuccess("æ°å¢æå"); |
| | | this.open = false; |
| | | this.getList(); |
| | | }).finally(() => { |
| | | this.buttonLoading = false; |
| | | }); |
| | | } |
| | | } |
| | | }); |
| | | }, |
| | | /** å é¤æé®æä½ */ |
| | | handleDelete(row) { |
| | | const locationGroupIds = row.locationGroupId || this.ids; |
| | | this.$modal.confirm('æ¯å¦ç¡®è®¤å é¤åºä½ç»ç¼å·ä¸º"' + locationGroupIds + '"çæ°æ®é¡¹ï¼').then(() => { |
| | | this.loading = true; |
| | | return delLocationGroup(locationGroupIds); |
| | | }).then(() => { |
| | | this.loading = false; |
| | | this.getList(); |
| | | this.$modal.msgSuccess("å é¤æå"); |
| | | }).catch(() => { |
| | | }).finally(() => { |
| | | this.loading = false; |
| | | }); |
| | | }, |
| | | /** 导åºæé®æä½ */ |
| | | handleExport() { |
| | | this.download('system/locationGroup/export', { |
| | | ...this.queryParams |
| | | }, `locationGroup_${new Date().getTime()}.xlsx`) |
| | | } |
| | | } |
| | | }; |
| | | </script> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div class="app-container"> |
| | | <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> |
| | | <el-form-item label="å称" prop="warehouseName"> |
| | | <el-input |
| | | v-model="queryParams.warehouseName" |
| | | placeholder="请è¾å
¥å称" |
| | | clearable |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="å·¥å" prop="werks"> |
| | | <el-input |
| | | v-model="queryParams.werks" |
| | | placeholder="请è¾å
¥å·¥å" |
| | | clearable |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="ç¶æ" prop="state"> |
| | | <el-input |
| | | v-model="queryParams.state" |
| | | placeholder="请è¾å
¥ç¶æ" |
| | | clearable |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">æç´¢</el-button> |
| | | <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">éç½®</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | |
| | | <el-row :gutter="10" class="mb8"> |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | | type="primary" |
| | | plain |
| | | icon="el-icon-plus" |
| | | size="mini" |
| | | @click="handleAdd" |
| | | v-hasPermi="['system:warehouse:add']" |
| | | >æ°å¢</el-button> |
| | | </el-col> |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | | type="success" |
| | | plain |
| | | icon="el-icon-edit" |
| | | size="mini" |
| | | :disabled="single" |
| | | @click="handleUpdate" |
| | | v-hasPermi="['system:warehouse:edit']" |
| | | >ä¿®æ¹</el-button> |
| | | </el-col> |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | | type="danger" |
| | | plain |
| | | icon="el-icon-delete" |
| | | size="mini" |
| | | :disabled="multiple" |
| | | @click="handleDelete" |
| | | v-hasPermi="['system:warehouse:remove']" |
| | | >å é¤</el-button> |
| | | </el-col> |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | | type="warning" |
| | | plain |
| | | icon="el-icon-download" |
| | | size="mini" |
| | | @click="handleExport" |
| | | v-hasPermi="['system:warehouse:export']" |
| | | >导åº</el-button> |
| | | </el-col> |
| | | <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> |
| | | </el-row> |
| | | |
| | | <el-table v-loading="loading" :data="warehouseList" @selection-change="handleSelectionChange"> |
| | | <el-table-column type="selection" width="55" align="center" /> |
| | | <el-table-column label="ä»åºID" align="center" prop="warehouseId" v-if="true"/> |
| | | <el-table-column label="ä»åºç¼å·" align="center" prop="lgort" /> |
| | | <el-table-column label="å称" align="center" prop="warehouseName" /> |
| | | <el-table-column label="å·¥å" align="center" prop="werks" /> |
| | | <el-table-column label="ç±»å«" align="center" prop="type" /> |
| | | <el-table-column label="0,ä¸å¯ç¨ |
| | | 1,å¯ç¨" align="center" prop="isUseLocation" /> |
| | | <el-table-column label="管çåID" align="center" prop="userId" /> |
| | | <el-table-column label="管çåçµè¯" align="center" prop="userPhone" /> |
| | | <el-table-column label="åæ X" align="center" prop="coordinateX" /> |
| | | <el-table-column label="åæ Y" align="center" prop="coordinateY" /> |
| | | <el-table-column label="æè¿°" align="center" prop="description" /> |
| | | <el-table-column label="ç¶æ" align="center" prop="state" /> |
| | | <el-table-column label="æåæ´æ°äººid" align="center" prop="lastUpdatedUserId" /> |
| | | <el-table-column label="æåæ´æ°äººå§å" align="center" prop="lastUpdatedUserName" /> |
| | | <el-table-column label="æåæ´æ°æ¶é´" align="center" prop="lastUpdatedDateTime" width="180"> |
| | | <template slot-scope="scope"> |
| | | <span>{{ parseTime(scope.row.lastUpdatedDateTime, '{y}-{m}-{d}') }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="æä½" align="center" class-name="small-padding fixed-width"> |
| | | <template slot-scope="scope"> |
| | | <el-button |
| | | size="mini" |
| | | type="text" |
| | | icon="el-icon-edit" |
| | | @click="handleUpdate(scope.row)" |
| | | v-hasPermi="['system:warehouse:edit']" |
| | | >ä¿®æ¹</el-button> |
| | | <el-button |
| | | size="mini" |
| | | type="text" |
| | | icon="el-icon-delete" |
| | | @click="handleDelete(scope.row)" |
| | | v-hasPermi="['system:warehouse:remove']" |
| | | >å é¤</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | |
| | | <pagination |
| | | v-show="total>0" |
| | | :total="total" |
| | | :page.sync="queryParams.pageNum" |
| | | :limit.sync="queryParams.pageSize" |
| | | @pagination="getList" |
| | | /> |
| | | |
| | | <!-- æ·»å æä¿®æ¹ä»åºå¯¹è¯æ¡ --> |
| | | <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> |
| | | <el-form ref="form" :model="form" :rules="rules" label-width="80px"> |
| | | <el-form-item label="ä»åºç¼å·" prop="lgort"> |
| | | <el-input v-model="form.lgort" placeholder="请è¾å
¥ä»åºç¼å·" /> |
| | | </el-form-item> |
| | | <el-form-item label="å称" prop="warehouseName"> |
| | | <el-input v-model="form.warehouseName" placeholder="请è¾å
¥å称" /> |
| | | </el-form-item> |
| | | <el-form-item label="å·¥å" prop="werks"> |
| | | <el-input v-model="form.werks" placeholder="请è¾å
¥å·¥å" /> |
| | | </el-form-item> |
| | | <el-form-item label="0,ä¸å¯ç¨ |
| | | 1,å¯ç¨" prop="isUseLocation"> |
| | | <el-input v-model="form.isUseLocation" placeholder="请è¾å
¥0,ä¸å¯ç¨ |
| | | 1,å¯ç¨" /> |
| | | </el-form-item> |
| | | <el-form-item label="管çåID" prop="userId"> |
| | | <el-input v-model="form.userId" placeholder="请è¾å
¥ç®¡çåID" /> |
| | | </el-form-item> |
| | | <el-form-item label="管çåçµè¯" prop="userPhone"> |
| | | <el-input v-model="form.userPhone" placeholder="请è¾å
¥ç®¡çåçµè¯" /> |
| | | </el-form-item> |
| | | <el-form-item label="åæ X" prop="coordinateX"> |
| | | <el-input v-model="form.coordinateX" placeholder="请è¾å
¥åæ X" /> |
| | | </el-form-item> |
| | | <el-form-item label="åæ Y" prop="coordinateY"> |
| | | <el-input v-model="form.coordinateY" placeholder="请è¾å
¥åæ Y" /> |
| | | </el-form-item> |
| | | <el-form-item label="æè¿°" prop="description"> |
| | | <el-input v-model="form.description" placeholder="请è¾å
¥æè¿°" /> |
| | | </el-form-item> |
| | | <el-form-item label="ç¶æ" prop="state"> |
| | | <el-input v-model="form.state" placeholder="请è¾å
¥ç¶æ" /> |
| | | </el-form-item> |
| | | <el-form-item label="æåæ´æ°äººid" prop="lastUpdatedUserId"> |
| | | <el-input v-model="form.lastUpdatedUserId" placeholder="请è¾å
¥æåæ´æ°äººid" /> |
| | | </el-form-item> |
| | | <el-form-item label="æåæ´æ°äººå§å" prop="lastUpdatedUserName"> |
| | | <el-input v-model="form.lastUpdatedUserName" placeholder="请è¾å
¥æåæ´æ°äººå§å" /> |
| | | </el-form-item> |
| | | <el-form-item label="æåæ´æ°æ¶é´" prop="lastUpdatedDateTime"> |
| | | <el-date-picker clearable |
| | | v-model="form.lastUpdatedDateTime" |
| | | type="datetime" |
| | | value-format="yyyy-MM-dd HH:mm:ss" |
| | | placeholder="请éæ©æåæ´æ°æ¶é´"> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | </el-form> |
| | | <div slot="footer" class="dialog-footer"> |
| | | <el-button :loading="buttonLoading" type="primary" @click="submitForm">ç¡® å®</el-button> |
| | | <el-button @click="cancel">å æ¶</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import { listWarehouse, getWarehouse, delWarehouse, addWarehouse, updateWarehouse } from "@/api/basicData/warehouse"; |
| | | |
| | | export default { |
| | | name: "Warehouse", |
| | | data() { |
| | | return { |
| | | // æé®loading |
| | | buttonLoading: false, |
| | | // é®ç½©å± |
| | | loading: true, |
| | | // éä¸æ°ç» |
| | | ids: [], |
| | | // éå个ç¦ç¨ |
| | | single: true, |
| | | // éå¤ä¸ªç¦ç¨ |
| | | multiple: true, |
| | | // æ¾ç¤ºæç´¢æ¡ä»¶ |
| | | showSearch: true, |
| | | // æ»æ¡æ° |
| | | total: 0, |
| | | // ä»åºè¡¨æ ¼æ°æ® |
| | | warehouseList: [], |
| | | // å¼¹åºå±æ é¢ |
| | | title: "", |
| | | // æ¯å¦æ¾ç¤ºå¼¹åºå± |
| | | open: false, |
| | | // æ¥è¯¢åæ° |
| | | queryParams: { |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | warehouseName: undefined, |
| | | werks: undefined, |
| | | type: undefined, |
| | | state: undefined, |
| | | }, |
| | | // 表ååæ° |
| | | form: {}, |
| | | // 表åæ ¡éª |
| | | rules: { |
| | | warehouseId: [ |
| | | { required: true, message: "ä»åºIDä¸è½ä¸ºç©º", trigger: "blur" } |
| | | ], |
| | | lgort: [ |
| | | { required: true, message: "ä»åºç¼å·ä¸è½ä¸ºç©º", trigger: "blur" } |
| | | ], |
| | | warehouseName: [ |
| | | { required: true, message: "å称ä¸è½ä¸ºç©º", trigger: "blur" } |
| | | ], |
| | | werks: [ |
| | | { required: true, message: "å·¥åä¸è½ä¸ºç©º", trigger: "blur" } |
| | | ], |
| | | type: [ |
| | | { required: true, message: "ç±»å«ä¸è½ä¸ºç©º", trigger: "change" } |
| | | ], |
| | | // isUseLocation: [ |
| | | // { required: true, message: "0,ä¸å¯ç¨ |
| | | // 1,å¯ç¨ä¸è½ä¸ºç©º", trigger: "blur" } |
| | | // ], |
| | | userId: [ |
| | | { required: true, message: "管çåIDä¸è½ä¸ºç©º", trigger: "blur" } |
| | | ], |
| | | userPhone: [ |
| | | { required: true, message: "管çåçµè¯ä¸è½ä¸ºç©º", trigger: "blur" } |
| | | ], |
| | | coordinateX: [ |
| | | { required: true, message: "åæ Xä¸è½ä¸ºç©º", trigger: "blur" } |
| | | ], |
| | | coordinateY: [ |
| | | { required: true, message: "åæ Yä¸è½ä¸ºç©º", trigger: "blur" } |
| | | ], |
| | | description: [ |
| | | { required: true, message: "æè¿°ä¸è½ä¸ºç©º", trigger: "blur" } |
| | | ], |
| | | state: [ |
| | | { required: true, message: "ç¶æä¸è½ä¸ºç©º", trigger: "blur" } |
| | | ], |
| | | displayOrder: [ |
| | | { required: true, message: "æåºä¸è½ä¸ºç©º", trigger: "blur" } |
| | | ], |
| | | createdUserId: [ |
| | | { required: true, message: "å建人idä¸è½ä¸ºç©º", trigger: "blur" } |
| | | ], |
| | | createdUserName: [ |
| | | { required: true, message: "å建人å§åä¸è½ä¸ºç©º", trigger: "blur" } |
| | | ], |
| | | createdDateTime: [ |
| | | { required: true, message: "å建æ¥ææ¶é´ä¸è½ä¸ºç©º", trigger: "blur" } |
| | | ], |
| | | lastUpdatedUserId: [ |
| | | { required: true, message: "æåæ´æ°äººidä¸è½ä¸ºç©º", trigger: "blur" } |
| | | ], |
| | | lastUpdatedUserName: [ |
| | | { required: true, message: "æåæ´æ°äººå§åä¸è½ä¸ºç©º", trigger: "blur" } |
| | | ], |
| | | lastUpdatedDateTime: [ |
| | | { required: true, message: "æåæ´æ°æ¶é´ä¸è½ä¸ºç©º", trigger: "blur" } |
| | | ], |
| | | isDeleted: [ |
| | | { required: true, message: "æ¯å¦å é¤ä¸è½ä¸ºç©º", trigger: "blur" } |
| | | ] |
| | | } |
| | | }; |
| | | }, |
| | | created() { |
| | | this.getList(); |
| | | }, |
| | | methods: { |
| | | /** æ¥è¯¢ä»åºå表 */ |
| | | getList() { |
| | | this.loading = true; |
| | | listWarehouse(this.queryParams).then(response => { |
| | | this.warehouseList = response.rows; |
| | | this.total = response.total; |
| | | this.loading = false; |
| | | }); |
| | | }, |
| | | // åæ¶æé® |
| | | cancel() { |
| | | this.open = false; |
| | | this.reset(); |
| | | }, |
| | | // 表åéç½® |
| | | reset() { |
| | | this.form = { |
| | | warehouseId: undefined, |
| | | lgort: undefined, |
| | | warehouseName: undefined, |
| | | werks: undefined, |
| | | type: undefined, |
| | | isUseLocation: undefined, |
| | | userId: undefined, |
| | | userPhone: undefined, |
| | | coordinateX: undefined, |
| | | coordinateY: undefined, |
| | | description: undefined, |
| | | state: undefined, |
| | | displayOrder: undefined, |
| | | createdUserId: undefined, |
| | | createdUserName: undefined, |
| | | createdDateTime: undefined, |
| | | lastUpdatedUserId: undefined, |
| | | lastUpdatedUserName: undefined, |
| | | lastUpdatedDateTime: undefined, |
| | | isDeleted: undefined |
| | | }; |
| | | this.resetForm("form"); |
| | | }, |
| | | /** æç´¢æé®æä½ */ |
| | | handleQuery() { |
| | | this.queryParams.pageNum = 1; |
| | | this.getList(); |
| | | }, |
| | | /** éç½®æé®æä½ */ |
| | | resetQuery() { |
| | | this.resetForm("queryForm"); |
| | | this.handleQuery(); |
| | | }, |
| | | // å¤éæ¡éä¸æ°æ® |
| | | handleSelectionChange(selection) { |
| | | this.ids = selection.map(item => item.warehouseId) |
| | | this.single = selection.length!==1 |
| | | this.multiple = !selection.length |
| | | }, |
| | | /** æ°å¢æé®æä½ */ |
| | | handleAdd() { |
| | | this.reset(); |
| | | this.open = true; |
| | | this.title = "æ·»å ä»åº"; |
| | | }, |
| | | /** ä¿®æ¹æé®æä½ */ |
| | | handleUpdate(row) { |
| | | this.loading = true; |
| | | this.reset(); |
| | | const warehouseId = row.warehouseId || this.ids |
| | | getWarehouse(warehouseId).then(response => { |
| | | this.loading = false; |
| | | this.form = response.data; |
| | | this.open = true; |
| | | this.title = "ä¿®æ¹ä»åº"; |
| | | }); |
| | | }, |
| | | /** æ交æé® */ |
| | | submitForm() { |
| | | this.$refs["form"].validate(valid => { |
| | | if (valid) { |
| | | this.buttonLoading = true; |
| | | if (this.form.warehouseId != null) { |
| | | updateWarehouse(this.form).then(response => { |
| | | this.$modal.msgSuccess("ä¿®æ¹æå"); |
| | | this.open = false; |
| | | this.getList(); |
| | | }).finally(() => { |
| | | this.buttonLoading = false; |
| | | }); |
| | | } else { |
| | | addWarehouse(this.form).then(response => { |
| | | this.$modal.msgSuccess("æ°å¢æå"); |
| | | this.open = false; |
| | | this.getList(); |
| | | }).finally(() => { |
| | | this.buttonLoading = false; |
| | | }); |
| | | } |
| | | } |
| | | }); |
| | | }, |
| | | /** å é¤æé®æä½ */ |
| | | handleDelete(row) { |
| | | const warehouseIds = row.warehouseId || this.ids; |
| | | this.$modal.confirm('æ¯å¦ç¡®è®¤å é¤ä»åºç¼å·ä¸º"' + warehouseIds + '"çæ°æ®é¡¹ï¼').then(() => { |
| | | this.loading = true; |
| | | return delWarehouse(warehouseIds); |
| | | }).then(() => { |
| | | this.loading = false; |
| | | this.getList(); |
| | | this.$modal.msgSuccess("å é¤æå"); |
| | | }).catch(() => { |
| | | }).finally(() => { |
| | | this.loading = false; |
| | | }); |
| | | }, |
| | | /** 导åºæé®æä½ */ |
| | | handleExport() { |
| | | this.download('system/warehouse/export', { |
| | | ...this.queryParams |
| | | }, `warehouse_${new Date().getTime()}.xlsx`) |
| | | } |
| | | } |
| | | }; |
| | | </script> |