123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109 |
- <template>
- <view class="content">
- <view class="search-bar">
- <u--form :model="searchForm" ref="searchForm">
- <u-form-item label="仓房名称:" prop="storehouseName" label-width="80px">
- <u--input v-model="searchForm.storehouseName"></u--input>
- <u-button type="primary" text="查询" class="btn" @tap="search"></u-button>
- <u-button text="重置" class="btn" @tap="reset"></u-button>
- </u-form-item>
- </u--form>
- </view>
- <uni-table border stripe emptyText="暂无更多数据" :loading="this.loading">
- <!-- 表头行 -->
- <uni-tr>
- <uni-th align="center">序号</uni-th>
- <uni-th align="center">库点名称</uni-th>
- <uni-th align="center">仓房名称</uni-th>
- <uni-th align="center">货位名称</uni-th>
- <uni-th align="center">检查人</uni-th>
- <uni-th align="center">检查日期</uni-th>
- <uni-th align="center" width="200">操作</uni-th>
- </uni-tr>
- <!-- 表格数据行 -->
- <uni-tr v-for="(item, index) in tableData" :key="item.id">
- <uni-td align="center">{{ index + 1 }}</uni-td>
- <uni-td align="center">{{ item.orgName }}</uni-td>
- <uni-td align="center">{{ item.storehouseName }}</uni-td>
- <uni-td align="center">{{ item.warehouseName }}</uni-td>
- <uni-td align="center">{{ item.checkPeople }}</uni-td>
- <uni-td align="center">{{ item.checkDate }}</uni-td>
- <uni-td align="center">
- <view class="opts">
- <u-button text="查看" @tap="view(item)" class="btn"></u-button>
- <u-button v-if="couldEdit(item)" text="修改" @tap="edit(item)" class="btn"></u-button>
- </view>
- </uni-td>
- </uni-tr>
- </uni-table>
- <uni-pagination show-icon="true" :total="pageInfo.total" :current="pageInfo.current" class="pagination"
- @change="paginationChang"></uni-pagination>
- </view>
- </template>
- <script>
- import simpleList from '@/components/simple-list/index'
- import {
- getList,
- } from '@/api/safePruductInspect.js'
- import {
- server_host
- } from '@/config/system'
- import {
- errorMsg, isNull
- } from '@/utils/tools'
- export default {
- mixins: [simpleList],
- data() {
- return {
- editPath: '/pages/safePruductInspect/safePruductInspectEdit',
- searchForm: {
- storehouseName: null,
- },
- }
- },
- methods: {
- getListFun() {
- return getList
- },
- couldEdit(data) {
- return isNull(data.storehouseName) && isNull(data.warehouseName) && isNull(data.inspector) && isNull(data.inspectionDate)
- },
- }
- }
- </script>
- <style scoped lang="scss">
- .content {
- padding: 10px;
- .btn {
- width: 100px;
- margin-left: 5px;
- }
- .tip {
- color: red;
- }
- .exports {
- margin-bottom: 10px;
- }
- }
- .msg {
- padding-left: 10px;
- }
- .opts {
- width: 100%;
- display: flex;
- justify-content: center;
- align-items: center;
- }
- .search-bar {}
- </style>
|