123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529 |
- <template>
- <view class="query-wrap">
- <uni-easyinput prefixIcon="search" :value="value" placeholder="请输入SN码/RFID" :focus="true" @input="input">
- </uni-easyinput>
- <qs-scanlistener @scan="scan"></qs-scanlistener>
- <view class="inner-item">
- <view class="inventory-item">
- <view class="shuo-item-name">
- <view class="shuo-label-podnme">
- {{formData.prodName||"" }}
- </view>
- <view class="shuo-unit">
- <span>{{ formData.purcUnt }} ({{ formData.convrat
- }}{{formData.prcUnt}}/{{ formData.purcUnt }})</span>
- </view>
- </view>
- </view>
- <view class="inventory-item">
- <view class="shuo-item-name">
- <view class="shuo-label">
- 规格:
- </view>
- <view class="shuo-cont">
- {{formData.spec}}
- </view>
- </view>
- </view>
- <view class="inventory-item">
- <view class="shuo-item-name">
- <view class="shuo-label">
- 型号:
- </view>
- <view class="shuo-cont">
- {{formData.mol}}
- </view>
- </view>
- </view>
- <view class="inventory-item">
- <view class="shuo-item-name">
- <view class="shuo-label">
- 出库数量:
- </view>
- <view class="shuo-unit">
- {{formData.stooutCnt}}
- </view>
- </view>
- </view>
- </view>
- <view class="inner-item" v-for="(item,idex) in listData" :key="idex">
- <view class="text-title">
- {{idex+1}}
- </view>
- <liu-swipe-action :index="idex" @clickItem="clickItem(idex)" :disable="stas=='A'?false:true">
- <view class="inventory-item">
- <view class="shuo-item">
- <view class="shuo-label">
- sn编码:
- </view>
- <view class="shuo-cont">
- {{item.id}}
- </view>
- </view>
- <view class="shuo-item">
- <view class="shuo-label">
- RFIF码:
- </view>
- <view class="shuo-cont">
- {{item.rfid}}
- </view>
- </view>
- </view>
- <view class="inventory-item">
- <view class="shuo-item">
- <view class="shuo-label">
- 批次:
- </view>
- <view class="shuo-cont">
- {{item.lotNum}}
- </view>
- </view>
- <view class="shuo-item">
- <view class="shuo-label">
- 包装单位:
- </view>
- <view class="shuo-cont">
- <span>{{ item.pacunt }}({{item.pacCnt }}{{ item.prcUnt }}/{{ item.pacunt }})</span>
- </view>
- </view>
- </view>
- <view class="inventory-item">
- <view class="shuo-item-name">
- <view class="shuo-label">
- 有效期至:
- </view>
- <view class="shuo-cont">
- {{item.prodExpy}}
- </view>
- </view>
- </view>
- </liu-swipe-action>
- </view>
- <view class="empty-cont" v-if="listData.length==0">
- 暂无明细
- </view>
- <uni-popup ref="popup">
- <uni-popup-dialog type="warn" :before-close="true" cancelText="取消" confirmText="确定" content="你确定删除当前记录吗?"
- @confirm="dialogConfirm" @close="dialogClose"></uni-popup-dialog>
- </uni-popup>
- <view class="botm-btn" v-if="type=='outbond'">
- <button type="default" plain="true" style="width:240rpx;line-height: 70rpx;background: #01A992;color:#fff"
- @click.stop="subMitData()">确定</button>
- </view>
- </view>
- </template>
- <script>
- import {
- mapState,
- mapMutations,
- mapActions
- } from 'vuex';
- import moment from "moment";
- const paging = {
- current: 1,
- size: 10000
- };
- export default {
- data() {
- return {
- value: "",
- listData: [],
- formData: {},
- type: "",
- stas:"",
- delIndex: 0,
- icontext: "还没触发"
- }
- },
- computed: {
- ...mapState(['refusaData', 'udiData'])
- },
- onShow() {
- let that = this;
- this.$forceUpdate();
- uni.getStorage({
- key: 'pickIngData',
- success: function(res) {
- //soucStroomId
- that.formData = res.data;
- that.type = res.data.type;
- that.stas=res.data.stas;
- }
- });
- },
- mounted() {
- if (this.type != 'outbond') {
- this.getData();
- }
- },
- methods: {
- getData() {
- this.$http('delivery.getPickData', {
- prodCode: this.formData.prodCode,
- size: 1000,
- stooutId: this.formData.stooutId
- }, '加载中', true).then((res) => {
- if (res.success == true) {
- this.listData = res.data.records;
- }
- })
- },
- //确定删除
- clickItem(idx) {
- this.delIndex = idx;
- this.$refs.popup.open();
- },
- dialogClose() {
- this.$refs.popup.close();
- },
- requsData(e) {
- if (!e) return;
- this.$http('outbound.outbQueryData', {
- prodCode: this.formData.prodCode,
- soucStroomId: this.formData.soucStroomId,
- stooutId: this.formData.stooutId,
- sn: e
- }, '加载中', true).then((res) => {
- if (res.success == true) {
- res.data.records.length > 0 &&
- res.data.records.forEach((item) => {
- item["stooutId"] = this.formData.stooutId;
- item["sn"] = item.id;
- });
- let filterData = this.listData.filter((item) => {
- return item.id == res.data.records[0].id;
- });
- if (filterData.length <= 0) {
- this.listData = [...this.listData, ...res.data.records]
- } else {
- uni.showToast({
- title: '重复数据',
- icon: 'none',
- duration: 1000,
- });
- }
- }
- })
- },
- //拣货查询
- input(e) {
- this.requsData(e);
- },
- // 确定删除当前记录
- dialogConfirm() {
- if (this.type != 'outbond') {
- this.deteteAreadyData();
- }
- let delData = [...this.listData];
- delData.splice(this.delIndex, 1);
- this.listData = delData;
- this.$refs.popup.close();
- },
- //删除已拣耗材
- deteteAreadyData(){
- this.$http('outbound.deAreayData', {
- id: this.listData[this.delIndex].id,
- stooutId: this.formData.stooutId
- }, '加载中', true).then((res)=>{
- if(res.success==true){
- this.getData();
- }
- })
- },
- //拣货确认
- subMitData() {
- this.$http('outbound.confrimPickIng', this.listData, '加载中', true).then((res) => {
- if (res.success == true) {
- uni.showToast({
- title: '拣货成功',
- icon: 'none',
- duration: 1000,
- });
- uni.redirectTo({
- url: '/pages/picking-details/index'
- });
- }
- })
- },
- scan(code) {
- this.value = code;
- this.requsData(code.trim());
- }
- },
- watch: {
- }
- }
- </script>
- <style lang="scss" scoped>
- .query-wrap {
- width: 100%;
- height: 100%;
- padding: 20rpx;
- box-sizing: border-box;
- background-color: #F1F1F1;
- overflow-y: scroll;
- overflow-x: hidden;
- position: relative;
- padding-bottom: 200rpx;
- .botm-btn {
- width: 100%;
- height: 120rpx;
- background-color: #fff;
- position: fixed;
- left: 0;
- bottom: 0;
- padding-top: 40rpx;
- }
- .empty-cont {
- width: 100%;
- height: 500rpx;
- display: flex;
- align-items: center;
- justify-content: center;
- }
- .inner-item {
- width: 100%;
- height: auto;
- border-bottom: 2rpx solid #BDBDBD;
- padding: 20rpx 20rpx 20rpx 70rpx;
- box-sizing: border-box;
- position: relative;
- background-color: #fff;
- border-radius: 20rpx;
- margin-top: 10rpx;
- .text-title {
- width: 40rpx;
- height: 100%;
- color: #01A992;
- font-size: 32rpx;
- text-align: left;
- font-family: PingFangSC-semiBold;
- position: absolute;
- left: 0;
- top: 0;
- z-index: 100;
- display: flex;
- align-items: center;
- justify-content: center;
- border-right: 1px solid #000;
- }
- .item-stats {
- position: absolute;
- right: 20rpx;
- top: 30rpx;
- width: 96rpx;
- height: 46rpx;
- line-height: 46rpx;
- color: rgba(1, 169, 146, 1);
- font-size: 32rpx;
- text-align: left;
- font-family: PingFangSC-bold;
- }
- .inventory-item {
- width: 100%;
- height: 40rpx;
- color: rgba(16, 16, 16, 1);
- font-size: 28rpx;
- text-align: left;
- font-family: PingFangSC-semiBold;
- margin-top: 15rpx;
- 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;
- height: 50rpx;
- line-height: 50rpx;
- overflow: hidden;
- white-space: nowrap;
- text-overflow: ellipsis
- }
- .shuo-cont-blue {
- color: #00BBFF;
- font-size: 25rpx;
- text-align: left;
- font-family: PingFangSC-regular;
- font-weight: bold;
- margin-left: 10rpx;
- }
- .shuo-cont,
- .suces,
- .shuo-error {
- color: rgba(16, 16, 16, 1);
- font-size: 25rpx;
- text-align: left;
- height: 40rpx;
- line-height: 40rpx;
- font-family: PingFangSC-regular;
- margin-left: 20rpx;
- overflow: hidden;
- white-space: nowrap;
- text-overflow: ellipsis
- }
- .suces {
- color: rgba(0, 193, 0, 1.0);
- font-weight: bold;
- }
- .shuo-error {
- color: red;
- font-weight: bold;
- }
- .shuo-item-name {
- width: 100%;
- height: 100%;
- line-height: 20rpx;
- display: flex;
- align-items: center;
- .shuo-label {
- 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;
- height: 50rpx;
-
- line-height: 50rpx;
- overflow: hidden;
- white-space: nowrap;
- text-overflow: ellipsis
- }
- .shuo-cont {
- color: rgba(16, 16, 16, 1);
- font-size: 25rpx;
- text-align: left;
- font-family: PingFangSC-regular;
- margin-left: 10rpx;
- overflow: hidden;
- white-space: nowrap;
- text-overflow: ellipsis;
- }
- }
- .shuo-item-tcl {
- width: 100%;
- height: 100%;
- line-height: 20rpx;
- display: flex;
- align-items: center;
- .shuo-label {
- width: 150rpx;
- 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: 150rpx;
- color: rgba(16, 16, 16, 1);
- font-size: 28rpx;
- text-align: left;
- font-family: PingFangSC-regular;
- 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%;
- background-color: #F1F1F1;
- ;
- }
- </style>
|