From c9a0e7808723c7a2534f07de2cfd35d1c9f2758a Mon Sep 17 00:00:00 2001
From: Mr.Zhang <710666463@qq.com>
Date: 星期三, 06 九月 2023 13:56:43 +0800
Subject: [PATCH] 小程序
---
minipro_standard/pages/OutOperation/OutOperation.vue | 322 +++++++++++++++++-----------
minipro_standard/pages/index/index.vue | 40 +--
minipro_standard/util/api/ExWarehouse.js | 2
minipro_standard/common/config.js | 20
minipro_standard/components/InOutInfo.vue | 2
minipro_standard/components/SelectTraMultipleMaterial.vue | 253 +++++++++++++++++++++++
6 files changed, 477 insertions(+), 162 deletions(-)
diff --git a/minipro_standard/common/config.js b/minipro_standard/common/config.js
index fced58f..28019e1 100644
--- a/minipro_standard/common/config.js
+++ b/minipro_standard/common/config.js
@@ -16,15 +16,15 @@
BF: 'APPLIANCE_USELESS'
},
QRCodeType: {
- WL: 'WL',
- CK: 'CK',
- HW: 'HW',
- GD: 'GD',
- GZ: 'GZ',
- SB: 'SB',
- YG: 'YG',
- ZKD: 'ZKD',
- CKD: 'CKD',
- RKD: 'RKD'
+ WL: 0, //0
+ CK: 1, // 1
+ HW: 2, // 2
+ GD: 3, // 3
+ GZ: 4, // 4
+ SB: 5, // 5
+ YG: 6, // 6
+ ZKD: 7, // 7
+ CKD: 8, // 8
+ RKD: 9 // 9
}
}
diff --git a/minipro_standard/components/InOutInfo.vue b/minipro_standard/components/InOutInfo.vue
index 21a99fc..9ceab09 100644
--- a/minipro_standard/components/InOutInfo.vue
+++ b/minipro_standard/components/InOutInfo.vue
@@ -22,7 +22,7 @@
<text class="c6">鐢宠鏃堕棿锛�</text>
{{ info.createTime || '-' }}
</view>
- <view class="rd15 ptb25 plr25 bg_f7">
+ <view v-if="info.remark" class="rd15 ptb25 plr25 bg_f7 mt25">
<view class="f26 b c2">澶囨敞锛�</view>
<view class="mt20">
<u-read-more :showHeight="60" :toggle="true" textIndent="0" closeText="灞曞紑" :shadowStyle="shadowStyle">
diff --git a/minipro_standard/components/SelectTraMultipleMaterial.vue b/minipro_standard/components/SelectTraMultipleMaterial.vue
new file mode 100644
index 0000000..bb48450
--- /dev/null
+++ b/minipro_standard/components/SelectTraMultipleMaterial.vue
@@ -0,0 +1,253 @@
+<template>
+ <u-popup :show="show" :round="10" closeable @close="show=false">
+ <view class="material-content bbox p30 rp">
+ <view class="tc b f24 c2 mb20">閫夋嫨鐗╂枡</view>
+ <v-Search ref="V" @searchInput="searchInput" @submit="submit" :isShow="false" placeholder="鎼滅储鐗╂枡鍚嶇О/缂栫爜">
+ </v-Search>
+ <div class="content_total">鍏眥{pages.total}}鏉℃暟鎹�</div>
+ <view class="scroll-content">
+ <scroll-view scroll-y="true" refresher-enabled="true" :refresher-triggered="refreshing" @scrolltolower="loadMore"
+ @refresherrefresh="onRefresh">
+ <view v-for="(item1, index) in list" :key="index" class="flex mb20" @click="selectMaterialAction(index)">
+ <view class="img36 mr20 pt10">
+ <u-checkbox-group style="display: block;" name="" @change="selectMaterialAction(index)">
+ <u-checkbox :checked="selectIndex.includes(index)"></u-checkbox>
+ </u-checkbox-group>
+ </view>
+ <view class="fx1">
+ <div class="page_content_title_top">
+ <span>{{ item1.materialName + ' | ' + item1.materialCode }}</span>
+ </div>
+ <div class="page_content_title_bottom">
+ <span class="green" v-if="item1.qualityType == 0">
+ 鍚堟牸
+ <text class="c1" decode>{{ splite }}</text>
+ </span>
+ <span class="orange" v-else-if="item1.qualityType == 1">
+ 涓嶈壇
+ <text class="c1" decode>{{ splite }}</text>
+ </span>
+ <span class="red" v-else-if="item1.qualityType == 2">
+ 鎶ュ簾
+ <text class="c1" decode>{{ splite }}</text>
+ </span>
+ <span v-else>
+ -
+ <text class="c1" decode>{{ splite }}</text>
+ </span>
+ <span>
+ {{item1.procedureName ? item1.procedureName : '-'}}
+ <text class="c1" decode>{{ splite }}</text>
+ </span>
+ <span>{{item1.batch ? item1.batch : '-'}}</span>
+ </div>
+ <div class="mt20 plr25 ptb20 bg_f7 f26">
+ <div class="c2 mb10"><span class="c6">璐т綅锛�</span>{{ item1.locationName }}</div>
+ <div class="c2"><span class="c6">鏁伴噺锛�</span>{{ item1.num }}{{ item1.unitName }}</div>
+ </div>
+ </view>
+ </view>
+ </scroll-view>
+ <!-- <u-list @scrolltoupper="scrolltoupper" @scrolltolower="scrolltolower">
+ <u-list-item v-for="(item1, index) in list" :key="index">
+
+ </u-list-item>
+ </u-list> -->
+ </view>
+ <view style="height: 98rpx;"></view>
+ <!-- <view class="">
+ <u-safe-bottom></u-safe-bottom>
+ </view> -->
+ <view class="fixedBottom bottom cY">
+ <view class="fx1 bbox plr30">
+ <u-checkbox-group style="display: block;" name="" @change="selectAll()">
+ <u-checkbox :checked="isAll" label="鍏ㄩ��"></u-checkbox>
+ </u-checkbox-group>
+ </view>
+ <view class="submit sbtn_green bbox tc" @click="submitAction">{{ `鎻愪氦(${selectIndex.length})`}}</view>
+ </view>
+ </view>
+ </u-popup>
+</template>
+
+<script>
+ import vSearch from '@/components/Search.vue'
+ import {
+ choiceStockPageByTransfer
+ } from '@/util/api/ExWarehouse'
+ export default {
+ name: "selectTraMultipleMaterial",
+ components: {
+ vSearch
+ },
+ data() {
+ return {
+ show: false,
+ splite: ' | ',
+ isAll: false,
+ refreshing: false,
+ pages: {
+ capacity: 10,
+ page: 1,
+ total: 0
+ },
+ transferId: '',
+ warehouseId: '',
+ list: [],
+ selectIndex: []
+ };
+ },
+ methods: {
+ open(target) {
+ this.show = true
+ this.refreshing = false
+ this.transferId = target.transferId
+ this.warehouseId = target.warehouseId
+ this.list = []
+ this.selectIndex = []
+
+ // console.log(this.selectIndex);
+ this.pages = {
+ capacity: 10,
+ page: 1,
+ total: 0
+ }
+ this.loadData()
+ },
+ loadData() {
+ choiceStockPageByTransfer({
+ ...this.pages,
+ model: {
+ transferId: this.transferId,
+ deviceId: this.deviceId
+ }
+ }).then(res => {
+ let {data} = res
+ if (data.page == 1) {
+ this.list = [];
+ }
+ this.pages.page = data.page
+ this.pages.total = data.total
+ this.list.push(...data.records)
+ }).catch((err) => {
+
+ })
+ .finally(() => {
+ this.refreshing = false;
+ })
+ },
+ loadMore() {
+ this.pages.page += 1
+ this.loadData()
+ },
+ onRefresh() {
+ if (this.refreshing) return
+ this.refreshing = true;
+ this.pages.page = 1
+ this.loadData()
+ },
+ selectMaterialAction(index) {
+ let i = this.selectIndex.findIndex(item => item==index)
+ if (i == -1 ) {
+ this.selectIndex.push(index)
+ } else {
+ this.selectIndex.splice(i)
+ }
+ },
+ selectAll() {
+ this.selectIndex = []
+ this.selectIndex = [...new Array(this.list.length).keys()]
+ },
+ submitAction () {
+ this.show = false
+ let selectValue = []
+ this.selectIndex.forEach(item => {
+ selectValue.push(this.list[item])
+ })
+ this.$emit('selectes', { materials: selectValue })
+ }
+ }
+ }
+ /*
+ */
+</script>
+
+<style lang="scss" scoped>
+ .material-content {
+ display: flex;
+ flex-direction: column;
+ height: 1200rpx;
+ box-sizing: border-box;
+
+ .scroll-content {
+ height: calc(1100rpx - env(safe-area-inset-bottom));
+ overflow: scroll;
+ }
+ }
+
+ .content_total {
+ margin-top: 20rpx;
+ margin-bottom: 20rpx;
+ // padding: 24rpx 30rpx;
+ // background: #F7F7F7;
+ font-size: 24rpx;
+ font-weight: 400;
+ color: #666666;
+ }
+
+ .page_content_title_top {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+
+ span {
+ &:nth-child(1) {
+ font-size: 30rpx;
+ font-weight: 500;
+ color: #222222;
+ }
+
+ &:nth-child(2) {
+ flex-shrink: 0;
+ font-size: 24rpx;
+ font-weight: 400;
+ color: #333333;
+
+ // span {
+ // font-size: 24rpx;
+ // color: $nav-color;
+ // }
+ }
+ }
+ }
+
+ .page_content_title_bottom {
+ margin-top: 24rpx;
+
+ span {
+ font-size: 24rpx;
+ font-weight: 400;
+ color: #666666;
+ }
+ }
+
+ .page_content_title {
+ display: flex;
+ flex-direction: column;
+ margin-bottom: 10rpx;
+
+
+
+
+ }
+
+ .bottom {
+ height: 98rpx;
+
+ .submit {
+ width: 272rpx;
+ height: 98rpx;
+ line-height: 98rpx;
+ }
+ }
+</style>
diff --git a/minipro_standard/pages/OutOperation/OutOperation.vue b/minipro_standard/pages/OutOperation/OutOperation.vue
index e899d02..83f7e78 100644
--- a/minipro_standard/pages/OutOperation/OutOperation.vue
+++ b/minipro_standard/pages/OutOperation/OutOperation.vue
@@ -2,10 +2,10 @@
<view>
<InOutInfo :info="info" />
<uni-collapse @change="change" @close="close" @open="open">
- <uni-collapse-item v-for="(item, index) in wtransferWarehouseList" :key="index">
+ <uni-collapse-item v-if="type==7" v-for="(item1, index) in warehouseList" :key="index">
<view class="p30 cY" style="border-bottom: 4rpx solid #f7f7f7;" slot="title">
<image src="../../static/chuku_ic_cangku@2x.png" class="img36 mr10" mode=""></image>
- <view>{{ item.warehouseName }}</view>
+ <view>{{ item1.warehouseName }}</view>
</view>
<view class="p30">
<div class="page_dck">
@@ -14,12 +14,12 @@
<span>寰呭嚭搴撶墿鏂�</span>
</div>
</div>
- <div class="page_content" v-for="(item, index) in info.woutboundDetailsWait" :key="index"
+ <div class="page_content" v-for="(item, index) in item1.wtransferDetailList" :key="index"
:name="index">
<div class="page_content_title">
<div class="page_content_title_top">
- <span v-if="item.batch">{{ item.materialName + ' | ' + item.materialCode }}</span>
- <span v-else>{{ item.materialName + ' | ' + item.materialCode }}</span>
+ <span>{{ item.materialName + ' | ' + item.materialCode }}</span>
+ <span>寰呭嚭{{ item.materialName + ' | ' + item.materialCode }}</span>
</div>
<div class="page_content_title_bottom">
<span class="green" v-if="item.qualityType === 0">鍚堟牸 <span
@@ -37,119 +37,117 @@
<div class="page_content_list_item">
<div class="page_content_list_item_label">鍑哄簱璐т綅锛�</div>
<div class="page_content_list_item_nr">
- {{item.locationName ? item.locationName : '-'}}
+ {{item.outLocationName ? item.outLocationName : '-'}}
</div>
</div>
<div class="page_content_list_items">
<div class="page_content_list_item_label">鏁伴噺锛�</div>
- <div class="page_content_list_item_nr">{{item.num ? item.num : '-'}}{{item.unitName}}
+ <div class="page_content_list_item_nr">
+ {{item.outPlannum ? item.outPlannum : '-'}}{{item.unitName}}
</div>
</div>
</div>
</div>
</view>
</uni-collapse-item>
+ <uni-collapse-item v-if="type==8">
+ <view class="p30 cY" style="border-bottom: 4rpx solid #f7f7f7;" slot="title">
+ <image src="../../static/chuku_ic_cangku@2x.png" class="img36 mr10" mode=""></image>
+ <view>{{ info.warehouseName }}</view>
+ </view>
+ <view class="p30">
+ <div class="page_dck">
+ <div class="page_dck_title">
+ <div class="page_dck_title_x"></div>
+ <span>寰呭嚭搴撶墿鏂�</span>
+ </div>
+ </div>
+ <div class="page_content" v-for="(item, index) in woutboundDetailsWait" :key="index" :name="index">
+ <div class="page_content_title">
+ <div class="page_content_title_top">
+ <span>{{ item.materialName + ' | ' + item.materialCode }}</span>
+ <span>寰呭嚭 <span>{{ item.num }}</span> {{ item.unitName }}</span>
+ </div>
+ <div class="page_content_title_bottom">
+ <span class="green" v-if="item.qualityType === 0">鍚堟牸 <span
+ class="black">/</span> </span>
+ <span class="warning" v-else-if="item.qualityType === 1">涓嶈壇 <span
+ class="black">/</span> </span>
+ <span class="error" v-else-if="item.qualityType === 2">鎶ュ簾 <span
+ class="black">/</span> </span>
+ <span v-else>- / </span>
+ <span>{{item.procedureName ? item.procedureName : '-'}} / </span>
+ <span>{{item.batch ? item.batch : '-'}}</span>
+ </div>
+ </div>
+ <div class="page_content_list" v-for="(items, ind) in item.wstockExtListVOList" :key="ind">
+ <div class="page_content_list_item">
+ <div class="page_content_list_item_label">鎵规鍙凤細</div>
+ <div class="page_content_list_item_nr">{{ items.batch ? items.batch : '-' }}</div>
+ </div>
+ <div class="page_content_list_items">
+ <div class="page_content_list_item_label">鏁伴噺锛�</div>
+ <div class="page_content_list_item_nr">{{ items.num }}{{ items.umodel.name }}</div>
+ </div>
+ <div class="page_content_list_item" v-if="items.lmodel">
+ <div class="page_content_list_item_label">鍑哄簱璐т綅锛�</div>
+ <div class="page_content_list_item_nr">{{ items.lmodel.unionName }}</div>
+ </div>
+ </div>
+ </div>
+ </view>
+ </uni-collapse-item>
</uni-collapse>
- <div class="page_h"></div>
+
+ <div class="page_h"></div>
<div class="page_yxwl">
<div class="page_yxwl_title">
<div class="left">
<div class="page_yxwl_title_x"></div>
<span>宸查�夋嫨鐗╂枡</span>
- </div>
-
+ </div>
+
<div class="right" v-if="isZKD" @click="openxz">
<image src="../../static/gongdan_ic_shoudong@2x.png" class="img36" mode=""></image><span>鎵嬪姩鍑哄簱</span>
- <!-- <img src="@/assets/icon/gongdan_ic_shoudong@2x.png" alt=""> -->
</div>
</div>
- <!-- 鍏ュ簱鍗曪紙鍗曚釜浠撳簱锛� -->
- <template
- v-if="route.query.type == 9 && info.woScanMaterialBeanList && info.woScanMaterialBeanList.length > 0">
- <div class="page_yxwl_list">
- <div class="page_yxwl_list_item" v-for="(item, index) in info.woScanMaterialBeanList" :key="index">
- <div class="page_yxwl_list_item_top">
- <!-- <div class="page_yxwl_list_item_top_left" v-if="item.batch">{{item.materialName}} | {{item.materialCode}}锝渰{item.batch}}</div>-->
- <div class="page_yxwl_list_item_top_left">{{item.materialName}} | {{item.materialCode}}
+ <div class="page_yxwl_list" v-if="outboundList.length > 0">
+ <div class="page_yxwl_list_item" v-for="(item, index) in outboundList" :key="index">
+ <div class="page_yxwl_list_item_top">
+ <div class="page_yxwl_list_item_top_left">{{ item.materialName }} | {{ item.materialCode }}
+ </div>
+
+ </div>
+ <div class="page_yxwl_list_item_sx">
+ <span class="green" v-if="item.qualityType == 0">鍚堟牸 <span>/</span></span>
+ <span class="yellow" v-else-if="item.qualityType == 1">涓嶈壇 <span>/</span></span>
+ <span class="red" v-else-if="item.qualityType == 2">鎶ュ簾 <span>/</span></span>
+ <span v-else>- / </span>
+ <span> {{ item.procedureName ? item.procedureName : '-' }} / </span>
+ <span> {{ item.batch ? item.batch : '-' }}</span>
+ </div>
+ <div class="page_yxwl_list_item_num">
+ <div class="item">
+ <div class="label">鍑哄簱璐т綅锛�</div>
+ <div class="nr">
+ <span>{{ item.locationName }}</span>
</div>
</div>
- <div class="page_yxwl_list_item_sx">
- <span class="green" v-if="item.qualityType === 0">鍚堟牸 <span>/</span> </span>
- <span class="warning" v-else-if="item.qualityType === 1">涓嶈壇 <span>/</span> </span>
- <span class="red" v-else-if="item.qualityType === 2">鎶ュ簾 <span>/</span> </span>
- <span>{{item.procedureName ? item.procedureName : '-'}} <span>/</span> </span>
- <span>{{item.batch ? item.batch : '-'}}</span>
+ <div class="item">
+ <div class="label">鏁伴噺锛�</div>
+ <div class="nr">
+ <!-- @input="changeNum(item)" -->
+ <input type="number" v-model="item.num" placeholder="璇疯緭鍏�">
+ <span>{{ item.unitName }}</span>
+ </div>
</div>
- <div class="page_yxwl_list_item_num">
- <div class="dis">
- <div class="item">
- <div class="label">鍑哄簱璐т綅锛�</div>
- <div class="nr">
- <span>{{item.locationName ? item.locationName : '-'}}</span>
- </div>
- </div>
- <div class="items">
- <div class="label">鏁伴噺锛�</div>
- <div class="nr">
- <input type="text" v-model="item.scanNum" placeholder="璇疯緭鍏�" />
- <span>{{item.unitName}}</span>
- </div>
- </div>
- </div>
- <div class="itemy" v-for="(item1, idx) in item.woutboundRedisCodeBeanList" :key="idx">
- <div class="label">宸ヨ{{item1.scanCode}}锛�</div>
- <div class="nr">{{item1.num}}{{item1.unitName}}</div>
- <div class="dele" @click="dele(item1)">
- <image src="../../static/chuku_ic_delete@2x.png" class="img36" mode=""></image>
- </div>
- </div>
+ <div class="dele" @click="dele(index)">
+ <!-- <img src="@/assets/icon/chuku_ic_delete@2x.png" alt="" /> -->
+ <image src="../../static/chuku_ic_delete@2x.png" class="img24" mode=""></image>
</div>
</div>
</div>
- </template>
- <!-- 杞簱鍗曪紙澶氫釜浠撳簱锛� -->
- <template v-else-if="route.query.type == 7 && seleMateriaList.length > 0">
- <!-- <template v-for="(item, index) in info.wtransferWarehouseList" :key="index"> -->
- <div class="page_yxwl_list">
- <div class="page_yxwl_list_item" v-for="(item1, idx) in seleMateriaList" :key="idx">
- <div class="page_yxwl_list_item_top">
- <!-- <div class="page_yxwl_list_item_top_left" v-if="item1.batch">{{item1.materialName}} | {{item1.materialCode}}锝渰{item1.batch}}</div>-->
- <div class="page_yxwl_list_item_top_left">{{item1.materialName}} | {{item1.materialCode}}
- </div>
- </div>
- <div class="page_yxwl_list_item_sx">
- <span class="green" v-if="item1.qualityType === 0">鍚堟牸 <span>/</span> </span>
- <span class="yellow" v-else-if="item1.qualityType === 1">涓嶈壇 <span>/</span> </span>
- <span class="red" v-else-if="item1.qualityType === 2">鎶ュ簾 <span>/</span> </span>
- <span>{{item1.procedureName ? item1.procedureName : '-'}} <span>/</span> </span>
- <span>{{item1.batch ? item1.batch : '-'}}</span>
- </div>
- <div class="page_yxwl_list_item_num">
- <div class="itemy">
- <div class="itemy_item">
- <div class="label">鍏ュ簱璐т綅锛�</div>
- <div class="nr">
- <span>{{item1.locationName}}</span>
- </div>
- </div>
- <div class="itemy_item">
- <div class="label">鏁伴噺锛�</div>
- <div class="nr">
- <!-- @input="inputNum(item1)" -->
- <input type="number" v-model="item1.outActnum" placeholder="璇疯緭鍏�" />
- <span>{{item1.unitName}}</span>
- </div>
- </div>
- <!-- @click="dele()" -->
- <div class="dele" @click="dele(idx)">
- <image src="../../static/chuku_ic_delete@2x.png" class="img36" mode=""></image>
- </div>
- </div>
- </div>
- </div>
- </div>
- <!-- </template> -->
- </template>
+ </div>
<div class="page_yxwl_kong" v-else>鏆傛棤鏁版嵁</div>
</div>
<div class="page_zw"></div>
@@ -158,58 +156,126 @@
<div class="page_footer_ck" @click="submit">
<span>纭鍑哄簱</span>
</div>
- </div>
- <SelectMultipleMaterial ref="selectMultipleMaterial" />
+ </div>
+ <SelectTraMultipleMaterial ref="selectTraMultipleMaterial" />
</view>
</template>
<script>
- import InOutInfo from '@/components/InOutInfo.vue'
- import SelectMultipleMaterial from '@/components/SelectMultipleMaterial.vue'
- import { QRCodeType } from '@/common/config.js'
+ import InOutInfo from '@/components/InOutInfo.vue'
+ import SelectTraMultipleMaterial from '@/components/SelectTraMultipleMaterial.vue'
+ import {
+ QRCodeType
+ } from '@/common/config.js'
+ import {
+ outScanAppliances,
+ wTransferForInOut,
+ wTransferForInOutUpload,
+ wOutBoundForInOut,
+ wOutBoundForUpload,
+ transferToOutNew
+ } from '@/util/api/ExWarehouse'
+ import {
+ getDB
+ } from '@/util/api/agencyAPI'
+ import {
+ logout
+ } from '../../util/api'
export default {
components: {
- InOutInfo,
- SelectMultipleMaterial
+ InOutInfo,
+ SelectTraMultipleMaterial
},
data() {
- return {
- type: '',
- isZKD: false,
+ return {
+ type: '',
+ id: '',
+ dbid: '',
+ isZKD: false,
show: false,
info: {
- outPlandate: '2022/02/14',
- originType: 1,
- wtransferRedisCodeBeanList: [],
- remark: 'Vue鏄墠绔紑鍙戜腑骞挎硾浣跨敤鐨勪竴涓狫avaScript妗嗘灦锛屽畠鍙互璁╂垜浠洿杞绘澗鍦扮鐞嗛〉闈㈢殑鐘舵�併�佹覆鏌撳拰浜や簰銆備絾鏄湪缂栧啓Vue搴旂敤鏃讹紝鏈夋椂浼氶亣鍒扳�淪yntaxError: Unexpected token鈥濇姤閿欙紝杩欎釜閿欒鎻愮ず鎰忓懗鐫�浠g爜涓瓨鍦ㄨ娉曢敊璇紝JavaScript寮曟搸鏃犳硶瑙f瀽锛屼粠鑰屽鑷寸▼搴忚繍琛屽け璐ャ�傛湰绡囨枃绔犲皢浠嬬粛甯歌寮曡捣鈥淪yntaxError: Unexpected token鈥濈殑鍘熷洜浠ュ強瑙e喅鏂规硶銆�'
- },
+
+ },
+ warehouseId: '',
ids: [],
- wtransferWarehouseList: [{
- warehouseName: '娴嬭瘯搴�'
- }]
+ warehouseList: [{
+
+ }],
+ woutboundDetailsWait: [],
+ outboundList: []
};
- },
- onLoad(option) {
- this.type = option.type||'ZKD'
- this.isZKD = this.type==QRCodeType.ZKD
- // console.log(this.type, QRCodeType.ZKD, this.type==QRCodeType.ZKD);
+ },
+ onLoad(option) {
+ this.type = option.type
+ this.id = option.id
+ this.isZKD = this.type == QRCodeType.ZKD
+ if (option.dbid) {
+ this.getDBs(option.dbid)
+ } else {
+ this.getInfo()
+ }
},
methods: {
+ // 鍒ゆ柇鏄惁瀹屾垚
+ getDBs(dbid) {
+ getDB(dbid)
+ .then(res => {
+ let {
+ data
+ } = res
+ if (data.status == 1) {
+ // 宸插畬鎴�
+ } else {
+ this.getInfo()
+ }
+ })
+ .catch(err => {})
+ },
+ getInfo() {
+ let infoAction
+ let data = {
+ id: this.id
+ }
+ if (this.type == QRCodeType.CKD) {
+ infoAction = wOutBoundForInOut
+ data.wOutboundType = '0'
+ } else if (this.type == QRCodeType.ZKD) {
+ infoAction = wTransferForInOut
+ data.wTransferType = '0'
+ }
+ infoAction(data).then(res => {
+ // this.warehouseId = this.info.wtransferWarehouseList[0].warehouseId
+ console.log(this.type == QRCodeType.ZKD);
+ if (this.isZKD) {
+ this.info = res.data.wtransfer
+ this.warehouseList = res.data.wtransferWarehouseList
+ } else {
+ this.info = res.data.woutbound
+ this.woutboundDetailsWait = res.data.woutboundDetailsWait
+ }
+ }).catch(err => {
+ uni.$u.toast(err)
+ uni.navigateBack()
+ })
+ },
change() {},
close() {},
- open() {},
- openxz() {
- let arr = []
- if (this.info.wtransferRedisCodeBeanList.length !== 0) {
- this.info.wtransferRedisCodeBeanList.forEach(element => {
- arr.push(element.appliancesId)
- })
- this.ids = arr.join(',')
- } else {
- this.ids = ''
- }
- this.$refs.selectMultipleMaterial.open({})
- },
+ open() {},
+ openxz() {
+ // let arr = []
+ // if (this.info.wtransferRedisCodeBeanList.length !== 0) {
+ // this.info.wtransferRedisCodeBeanList.forEach(element => {
+ // arr.push(element.appliancesId)
+ // })
+ // this.ids = arr.join(',')
+ // } else {
+ // this.ids = ''
+ // }
+ this.$refs.selectTraMultipleMaterial.open({
+ transferId: this.id,
+ warehouseId: this.warehouseId
+ })
+ },
}
}
</script>
diff --git a/minipro_standard/pages/index/index.vue b/minipro_standard/pages/index/index.vue
index 97d5592..64e35c7 100644
--- a/minipro_standard/pages/index/index.vue
+++ b/minipro_standard/pages/index/index.vue
@@ -21,8 +21,8 @@
</view>
</view>
</u-sticky>
- <scroll-view v-if="projectList.length" scroll-y="true" refresher-enabled="true" :refresher-triggered="triggered"
- :refresher-threshold="100" @refresherpulling="scrolltolower" @refresherrefresh="scrolltoupper"
+ <scroll-view v-if="projectList.length" scroll-y refresher-enabled="true" :refresher-triggered="triggered" @scrolltolower="loadMore"
+ @refresherrefresh="refresh"
>
<view v-for="(item, index) in projectList" :key="index">
<view class="box_list">
@@ -141,7 +141,9 @@
total: 0,
capacity: 10,
page: 1,
- },
+ },
+ triggered: false,
+ finished: false,
projectList: []
}
},
@@ -179,13 +181,18 @@
})
.catch(err => {
+ })
+ .finally(() => {
+ this.triggered = false
})
},
- scrolltolower() {
- this.page.page = 1
+ refresh() {
+ if (this.triggered) return
+ this.triggered = true;
+ this.page.page = 1
this.loadData()
},
- scrolltoupper() {
+ loadMore() {
this.page.page += 1
this.loadData()
},
@@ -194,24 +201,13 @@
this.searchForm.status = status
this.scrolltolower()
},
- jump(item) {
- if ((item.type === 0 || item.type === 2 || item.type === 5) && item.status === 0) { // 璺宠浆鍑哄簱(杞簱鍗�)
+ jump(item) {
+ console.log(item);
+ if ((item.type === 0 || item.type === 2 || item.type === 5) && item.status === 0) { // 璺宠浆鍑哄簱(杞簱鍗�)
+ console.log('鍑哄簱');
uni.navigateTo({
- url: 'pages/OutOperation/OutOperation',
- query: {
- id: item.objId,
- dbid: item.id,
- type: 7
- }
+ url: `/pages/OutOperation/OutOperation?id=${item.objId}&dbid=${item.id}&type=7`
})
- // router.push({
- // name: 'issueOperation',
- // query: {
- // id: item.objId,
- // dbid: item.id,
- // type: 7
- // }
- // })
} else if ((item.type === 0 || item.type === 2 || item.type === 5) && item.status === 1) {
// router.push({
// name: 'wTransferDetail',
diff --git a/minipro_standard/util/api/ExWarehouse.js b/minipro_standard/util/api/ExWarehouse.js
index b861eb5..1ac22e5 100644
--- a/minipro_standard/util/api/ExWarehouse.js
+++ b/minipro_standard/util/api/ExWarehouse.js
@@ -97,7 +97,7 @@
// 鑾峰彇杞簱鍗曚俊鎭�
export function wTransferForInOut(params) {
- return http.get('/ext/wOutboundExt/wTransferForInOut', { params })
+ return http.get('/ext/wTransferExt/wTransferForInOut', { params })
}
// export function wTransferForInOut(params: any): Promise<any> {
// return httpRequest({
--
Gitblit v1.9.3