123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480 |
- <template>
- <view class="query-wrap">
- <uni-easyinput prefixIcon="search" :value="value" placeholder="请输入或扫描入库单号" @iconClick="iconClick" :focus="true"
- @input="input" @blur="blur" @confirm="confirm">
- </uni-easyinput>
- <v-tabs v-model="index" :tabs="tabList" @change="changeTab" :scroll="false"></v-tabs>
- <z-paging ref="paging" @query="queryList" v-model="dataList" :use-page-scroll="true">
- <view class="inner-item" v-for="(item,index) in listData" :key="index" @click="itemDetails(item)">
- <view class="inventory-item">
- <view class="shuo-item-name">
- <view class="shuo-label">
- {{item.name}}
- </view>
- <view class="shuo-unit">
- {{item.unit}}
- </view>
- </view>
- </view>
- <view class="inventory-item">
- <view class="shuo-item">
- <view class="shuo-label">
- 规格:
- </view>
- <view class="shuo-cont">
- {{item.guige}}
- </view>
- </view>
- <view class="shuo-item">
- <view class="shuo-label">
- 型号:
- </view>
- <view class="shuo-cont">
- {{item.xinghao}}
- </view>
- </view>
- </view>
- <view class="inventory-item">
- <view class="shuo-item">
- <view class="shuo-label">
- 耗材类别:
- </view>
- <view class="shuo-cont-blue">
- {{item.liebie}}
- </view>
- </view>
- <view class="shuo-item">
- <view class="shuo-label">
- 生产来源:
- </view>
- <view class="shuo-cont-blue">
- {{item.laiyuan}}
- </view>
- </view>
- </view>
- <view class="inventory-item">
- <view class="shuo-item-qy">
- <view class="shuo-label">
- 生产企业:
- </view>
- <view class="shuo-cont">
- {{item.qiye}}
- </view>
- </view>
- </view>
- <view class="inventory-item">
- <view class="shuo-item-qy">
- <view class="shuo-label">
- 供应商:
- </view>
- <view class="shuo-cont">
- {{item.suozaikw}}
- </view>
- </view>
- </view>
- <view class="inventory-item">
- <view class="shuo-item">
- <view class="shuo-label">
- RFID码:
- </view>
- <view class="shuo-cont-blue">
- {{item.bianma}}
- </view>
- </view>
- <view class="shuo-item">
- <view class="shuo-label">
- SN编码:
- </view>
- <view class="shuo-cont-blue">
- {{item.bianma}}
- </view>
- </view>
- </view>
- <view class="inventory-item">
- <view class="shuo-item">
- <view class="shuo-label">
- 上架货位:
- </view>
- <view class="shuo-cont-blue">
- {{item.xianykc}}
- </view>
- </view>
- <view class="shuo-item">
- <view class="shuo-label">
- 状态:
- </view>
- <view class="shuo-cont-blue">
- {{item.xianykc}}
- </view>
- </view>
- </view>
- <uv-button text="上架" plain size="normal" type="primary" style="margin-top:20rpx;"
- @click.native.stop="handleShelf(item)"></uv-button>
- </view>
- </z-paging>
- <uni-popup ref="inputDialog" type="dialog">
- <uni-popup-dialog ref="inputClose" mode="input" title="上架" @confirm="dialogInputConfirm"
- :beforeClose="beforeClose" @close="oncloseList">
- <uni-data-picker :localdata="items" popup-title="库位" @change="onchange" v-model="classes"
- @popupclosed="onpopupclosed" @nodeclick="onnodeclick"></uni-data-picker>
- </uni-popup-dialog>
- </uni-popup>
- </view>
- </template>
- <script>
- import {
- listData
- } from "./home.js";
- import {
- mapState,
- mapMutations,
- mapActions
- } from 'vuex';
- import {
- debounced
- } from '@/utils/debounced.js';
- import ZPMixin from '@/uni_modules/z-paging/components/z-paging/js/z-paging-mixin.js';
- export default {
- mixins: [ZPMixin],
- data() {
- return {
- index: 0,
- value1: "",
- value: "",
- dataList: [],
- inputVal: "",
- codeVal: "",
- confirmVal: "",
- changeVal: "",
- classes: [],
- listData: listData,
- tabList: ['待上架', '已上架'],
- valueList: 0,
- beforeClose: true,
- items: [{
- text: "一级",
- value: "1-0",
- children: [{
- text: "1.1班",
- value: "1-1"
- },
- {
- text: "1.2班",
- value: "1-2"
- }
- ]
- },
- {
- text: "二级",
- value: "2-0",
- children: [{
- text: "2.1班",
- value: "2-1"
- },
- {
- text: "2.2班",
- value: "2-2"
- }
- ]
- },
- {
- text: "三级",
- value: "3-0",
- children: [{
- text: "3.1班",
- value: "3-1"
- },
- {
- text: "3.2班",
- value: "3-2"
- }
- ]
- }
- ],
- }
- },
- computed: {
- // ...mapState(['groundData'])
- },
- onShow() {
- uni.$once('update', function(data) {
- // uni.redirectTo({
- // url: '/pages/grounding/grounding' //写你的路径
- // });
- })
- },
- mounted() {},
- methods: {
- ...mapActions(['getGroundData']),
- ...mapMutations(['setMentItemData']),
- queryList(pageNo, pageSize) {
- // this.getGroundData();
- this.$refs.paging.complete(this.listData);
- },
- //跳转上架详情
- itemDetails(item) {
- this.setMentItemData([item]);
- uni.navigateTo({
- url: '/pages/groundetials/groundetials',
- success: function(res) {
- console.log(res, "res")
- }
- });
- },
- input(e) {
- this.$nextTick(() => {
- // this.value = e;
- // this.inputVal = e;
- })
- this.getGroundData({
- id_instock: e,
- type: ""
- })
- },
- iconClick(e) {
- console.log(e, '点击搜索拿到的数据');
- },
- blur(e) {
- this.$nextTick(() => {
- // this.value = e.target.value;
- })
- },
- confirm(e) {
- this.$nextTick(() => {
- // this.value = e;
- // this.confirmVal = e;
- })
- },
- changeTab(index) {
- console.log('当前选中的项:' + index)
- },
- oncloseList() {
- this.$refs.inputDialog.close()
- },
- handleShelf(item) {
- this.$refs.inputDialog.open();
- console.log(111, item)
- },
- dialogInputConfirm() {
- if (this.classes.length === 0) {
- uni.showToast({
- title: '请选择库位',
- icon: 'none',
- });
- this.beforeClose = true;
- return;
- } else {
- this.classes = "";
- this.beforeClose = false;
- this.$refs.inputDialog.close();
- }
- },
- changeList(e) {
- // console.log(e)
- },
- onchange(e) {
- // console.log(e, 44)
- },
- onnodeclick(node) {
- console.log(node, "node");
- },
- onpopupclosed(e) {
- // console.log(e, 33)
- }
- },
- watch: {
- groundData(newData, flodData) {
- this.$refs.paging.complete(newData);
- },
- }
- }
- </script>
- <style lang="scss" scoped>
- .query-wrap {
- width: 100%;
- padding: 20rpx;
- box-sizing: border-box;
- background-color: #F1F1F1;
- overflow-y: scroll;
- overflow-x: hidden;
- .inner-item {
- width: 100%;
- height: 500rpx;
- border-bottom: 2rpx solid #BDBDBD;
- padding: 20rpx 20rpx 20rpx 50rpx;
- box-sizing: border-box;
- position: relative;
- background-color: #fff;
- border-radius: 20rpx;
- position: relative;
- margin-top: 10rpx;
- .inventory-item {
- width: 105%;
- height: 40rpx;
- color: rgba(16, 16, 16, 1);
- font-size: 28rpx;
- text-align: left;
- font-family: PingFangSC-semiBold;
- margin-top: 10rpx;
- display: flex;
- align-items: center;
- .shuo-label {
- color: rgba(16, 16, 16, 1);
- font-size: 28rpx;
- text-align: left;
- font-family: PingFangSC-regular;
- font-weight: bold;
- }
- .shuo-unit {
- color: rgba(0, 193, 0, 1.0);
- font-weight: bold;
- }
- .shuo-cont-blue {
- color: #00BBFF;
- font-size: 25rpx;
- text-align: left;
- font-family: PingFangSC-regular;
- font-weight: bold;
- margin-left: 10rpx;
- }
- .shuo-cont {
- color: rgba(16, 16, 16, 1);
- font-size: 25rpx;
- text-align: left;
- font-family: PingFangSC-regular;
- margin-left: 20rpx;
- }
- .shuo-item-qy {
- width: 100%;
- height: 100%;
- line-height: 20rpx;
- display: flex;
- align-items: center;
- .shuo-label {
- width: 130rpx;
- color: rgba(16, 16, 16, 1);
- font-size: 28rpx;
- text-align: left;
- font-family: PingFangSC-regular;
- text-align: justify;
- text-align-last: justify;
- }
- .shuo-cont {
- color: rgba(16, 16, 16, 1);
- font-size: 25rpx;
- text-align: left;
- font-family: PingFangSC-regular;
- margin-left: 10rpx;
- }
- }
- .shuo-item-name {
- width: 100%;
- height: 100%;
- line-height: 20rpx;
- display: flex;
- align-items: center;
- .shuo-label {
- width: 200rpx;
- color: rgba(16, 16, 16, 1);
- font-size: 28rpx;
- text-align: left;
- font-family: PingFangSC-regular;
- text-align: justify;
- text-align-last: justify;
- margin-right: 20rpx;
- }
- .shuo-cont {
- color: rgba(16, 16, 16, 1);
- font-size: 25rpx;
- text-align: left;
- font-family: PingFangSC-regular;
- margin-left: 20rpx;
- }
- }
- .shuo-item {
- width: 50%;
- height: 100%;
- line-height: 20rpx;
- display: flex;
- align-items: center;
- .shuo-label {
- width: 130rpx;
- color: rgba(16, 16, 16, 1);
- font-size: 28rpx;
- text-align: left;
- font-family: PingFangSC-regular;
- text-align: justify;
- text-align-last: justify;
- }
- .shuo-cont {
- color: rgba(16, 16, 16, 1);
- font-size: 25rpx;
- text-align: left;
- font-family: PingFangSC-regular;
- margin-left: 10rpx;
- }
- .shuo-await {
- color: rgba(255, 191, 107, 1);
- font-size: 28rpx;
- text-align: left;
- font-family: PingFangSC-regular;
- margin-left: 20rpx;
- }
- .shuo-ready {
- color: rgba(162, 239, 77, 1);
- font-size: 28rpx;
- text-align: left;
- font-family: PingFangSC-regular;
- margin-left: 20rpx;
- }
- }
- .shuo-one-cont {
- width: 60%;
- }
- .shuo-min {
- width: 33%;
- }
- .max-item {
- width: 68%;
- margin-left: 10rpx;
- .shuo-cont {
- font-size: 20rpx;
- }
- }
- }
- }
- }
- uni-page-body {
- width: 100%;
- height: 100%;
- }
- </style>
|