From 1e993780749c9525be74e77e4c81b7db2c88da6f Mon Sep 17 00:00:00 2001
From: Mr.Zhang <710666463@qq.com>
Date: 星期四, 07 九月 2023 09:08:36 +0800
Subject: [PATCH] 小程序
---
h5_standard/src/views/LogInAgain.vue | 20
minipro_standard/components/SelectLoaction.vue | 115 +++++++
minipro_standard/pages/InOperation/InOperation.vue | 172 ++++++++---
minipro_standard/components/materialIn.vue | 225 +++++++++++++++
minipro_standard/components/selectMaterial.vue | 10
minipro_standard/pages/OutOperation/OutOperation.vue | 324 +++++++++++----------
minipro_standard/pages/index/index.vue | 7
minipro_standard/components/SelectTraMultipleMaterial.vue | 22
8 files changed, 663 insertions(+), 232 deletions(-)
diff --git a/h5_standard/src/views/LogInAgain.vue b/h5_standard/src/views/LogInAgain.vue
index b7856d0..f1ff54c 100644
--- a/h5_standard/src/views/LogInAgain.vue
+++ b/h5_standard/src/views/LogInAgain.vue
@@ -91,20 +91,20 @@
// uuid: '0000',
// code: '0000'
// })
- let res = await testLogin({ // 鏂囨
- username: '18656077929',
- password: '123456',
- companyId: '111',
- uuid: '0000',
- code: '0000'
- })
- // let res = await testLogin({ // 鑳″厠涓�
- // username: '17751132561',
+ // let res = await testLogin({ // 鏂囨
+ // username: '18656077929',
// password: '123456',
- // companyId: '1',
+ // companyId: '111',
// uuid: '0000',
// code: '0000'
// })
+ let res = await testLogin({ // 寮犵楂�
+ username: '15256913207',
+ password: '123456',
+ companyId: '8',
+ uuid: '0000',
+ code: '0000'
+ })
// let res = await testLogin({
// username: '15056231084',
diff --git a/minipro_standard/components/SelectLoaction.vue b/minipro_standard/components/SelectLoaction.vue
new file mode 100644
index 0000000..5155130
--- /dev/null
+++ b/minipro_standard/components/SelectLoaction.vue
@@ -0,0 +1,115 @@
+<template>
+ <u-popup :show="show" :round="10" closeable @close="show=false">
+ <view class="loaction-content bbox p30">
+ <scroll-view scroll-y="true" refresher-enabled="true" :refresher-triggered="refreshing"
+ @refresherrefresh="onRefresh">
+ <div class="content_list">
+ <div class="content_list_item" v-for="(item, i) in list" :key="i" @click="jump(item)">
+ <div class="wl">
+ <div class="content_list_item_name">鍏ュ簱璐т綅锛歿{item.unionName}} | {{item.code}}</div>
+ </div>
+ </div>
+ </div>
+ </scroll-view>
+ </view>
+ </u-popup>
+</template>
+
+<script>
+ import {
+ getListByWarehouseId
+ } from '@/util/api/WorkOrderAPI'
+ export default {
+ name: "SelectLoaction",
+ data() {
+ return {
+ show: false,
+ refreshing: false,
+ wareHouseId: '',
+ list: []
+ };
+ },
+ methods: {
+ open(target) {
+ this.show = true
+ this.refreshing = false
+ this.wareHouseId = target.wareHouseId
+ this.onRefresh()
+ },
+
+ onRefresh() {
+ if (this.refreshing) return
+ this.refreshing = true;
+ getListByWarehouseId({
+ wareHouseId: this.wareHouseId
+ }).then(res => {
+ this.list = res.data
+ }).catch((err) => {
+ this.list = []
+ }).finally(() => {
+ this.refreshing = false;
+ })
+ },
+ jump(item) {
+ this.$emit('selected', item)
+ this.show = false
+ }
+ }
+ }
+</script>
+
+<style lang="scss" scoped>
+ .loaction-content {
+ height: 1200rpx;
+ }
+
+ .content_list {
+ width: 100%;
+ height: 100%;
+ display: flex;
+ flex-direction: column;
+
+ .content_list_item {
+ padding: 30rpx;
+ display: flex;
+ flex-direction: column;
+ border-bottom: 1rpx solid #ececec;
+
+ .wl {
+ display: flex;
+ align-items: center;
+
+ .content_list_item_status {
+ font-size: 28rpx;
+ margin-right: 10rpx;
+ }
+
+ .content_list_item_name {
+ font-size: 30rpx;
+ font-weight: 500;
+ color: #111111;
+ }
+ }
+
+ .sx {
+ margin-top: 15rpx;
+
+ span {
+ font-size: 26rpx;
+ font-weight: 400;
+ color: #444444;
+ }
+ }
+
+ .zl {
+ margin-top: 15rpx;
+
+ span {
+ font-size: 24rpx;
+ font-weight: 400;
+ color: #666666;
+ }
+ }
+ }
+ }
+</style>
diff --git a/minipro_standard/components/SelectTraMultipleMaterial.vue b/minipro_standard/components/SelectTraMultipleMaterial.vue
index bb48450..5446bdd 100644
--- a/minipro_standard/components/SelectTraMultipleMaterial.vue
+++ b/minipro_standard/components/SelectTraMultipleMaterial.vue
@@ -2,8 +2,8 @@
<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>
+ <!-- <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"
@@ -71,15 +71,15 @@
</template>
<script>
- import vSearch from '@/components/Search.vue'
+ // import vSearch from '@/components/Search.vue'
import {
choiceStockPageByTransfer
} from '@/util/api/ExWarehouse'
export default {
name: "selectTraMultipleMaterial",
- components: {
- vSearch
- },
+ // components: {
+ // vSearch
+ // },
data() {
return {
show: false,
@@ -100,7 +100,8 @@
methods: {
open(target) {
this.show = true
- this.refreshing = false
+ this.refreshing = false
+ this.isAll = false
this.transferId = target.transferId
this.warehouseId = target.warehouseId
this.list = []
@@ -119,7 +120,7 @@
...this.pages,
model: {
transferId: this.transferId,
- deviceId: this.deviceId
+ warehouseId: this.warehouseId
}
}).then(res => {
let {data} = res
@@ -152,6 +153,11 @@
this.selectIndex.push(index)
} else {
this.selectIndex.splice(i)
+ }
+ if (this.selectIndex.length == this.list.length) {
+ this.isAll = true
+ } else {
+ this.isAll = false
}
},
selectAll() {
diff --git a/minipro_standard/components/materialIn.vue b/minipro_standard/components/materialIn.vue
new file mode 100644
index 0000000..aae23a9
--- /dev/null
+++ b/minipro_standard/components/materialIn.vue
@@ -0,0 +1,225 @@
+<template>
+ <u-popup :show="show" :round="10" closeable @close="show=false">
+ <view class="loaction-content bbox p30">
+ <div class="content_list">
+ <div class="page_content" v-for="(item1, idx) in list" :key="idx" @click="jump(item1)">
+ <div class="page_content_title">
+ <div class="page_content_title_top">
+ <span v-if="item1.batch">{{ item1.materialName + ' | ' + item1.materialCode }}</span>
+ <span v-else>{{ item1.materialName + ' | ' + item1.materialCode }}</span>
+ <span>{{item1.outActnum}}{{item1.unitName}}</span>
+ </div>
+ <div class="page_content_title_bottom">
+ <span class="green" v-if="item1.qualityType === 0">鍚堟牸 <span
+ class="black">/</span> </span>
+ <span class="warning" v-else-if="item1.qualityType === 1">涓嶈壇 <span
+ class="black">/</span> </span>
+ <span class="error" v-else-if="item1.qualityType === 2">鎶ュ簾 <span
+ class="black">/</span> </span>
+ <span v-else>- / </span>
+ <span>{{item1.procedureName ? item1.procedureName : '-'}} / </span>
+ <span>{{item1.batch ? item1.batch : '-'}}</span>
+ </div>
+ </div>
+ </div>
+ </div>
+ </view>
+ </u-popup>
+</template>
+
+<script>
+ export default {
+ name: "materialIn",
+ data() {
+ return {
+ show: false,
+ list: [],
+ };
+ },
+ methods: {
+ open(target) {
+ this.show = true
+ this.list = target.list
+ },
+ jump(item) {
+
+ }
+ }
+ }
+</script>
+
+<style lang="scss" scoped>
+ .loaction-content {
+
+ height: 1200rpx;
+ }
+
+ .content_list {
+ width: 100%;
+ height: 100%;
+ display: flex;
+ padding: 0 30rpx;
+ box-sizing: border-box;
+ flex-direction: column;
+
+ .page_content {
+ margin-top: 36rpx;
+
+ .page_content_title {
+ display: flex;
+ flex-direction: column;
+ margin-bottom: 10rpx;
+
+ .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 {
+ .green {
+ color: $nav-stateColor7 !important;
+
+ .black {
+ color: black !important;
+ }
+ }
+
+ .warning {
+ color: $nav-stateColor5 !important;
+
+ .black {
+ color: black !important;
+ }
+ }
+
+ .error {
+ color: $nav-stateColor4 !important;
+
+ .black {
+ color: black !important;
+ }
+ }
+
+ span {
+ font-size: 24rpx;
+ font-weight: 400;
+ color: #666666;
+ }
+ }
+ }
+
+ .lineBorder {
+ border: none !important;
+ padding-bottom: 0 !important;
+ margin-bottom: 24rpx;
+ }
+
+ .page_content_list {
+ width: 100%;
+ display: flex;
+ align-items: center;
+ flex-wrap: wrap;
+
+ &:first-child {
+ margin: 0;
+ }
+
+ &:last-child {
+ border: none;
+ }
+
+ .page_content_list_nums {
+ width: 30%;
+ display: flex;
+
+ .page_content_list_num_label {
+ font-size: 26rpx;
+ font-weight: 400;
+ color: #666666;
+ }
+
+ .page_content_list_num_nr {
+ font-size: 26rpx;
+ font-weight: 400;
+ color: #222222;
+ }
+ }
+
+ .page_content_list_num {
+ width: 70%;
+ display: flex;
+
+ .page_content_list_num_label {
+ font-size: 26rpx;
+ font-weight: 400;
+ color: #666666;
+ }
+
+ .page_content_list_num_nr {
+ font-size: 26rpx;
+ font-weight: 400;
+ color: #222222;
+ }
+ }
+
+ .page_content_list_items {
+ width: 30%;
+ display: flex;
+ margin-top: 24rpx;
+
+ .page_content_list_item_label {
+ font-size: 26rpx;
+ font-weight: 400;
+ color: #666666;
+ flex-shrink: 0;
+ }
+
+ .page_content_list_item_nr {
+ font-size: 26rpx;
+ font-weight: 400;
+ color: #222222;
+ }
+ }
+
+ .page_content_list_item {
+ width: 70%;
+ display: flex;
+
+ .page_content_list_item_label {
+ font-size: 26rpx;
+ font-weight: 400;
+ color: #666666;
+ flex-shrink: 0;
+ }
+
+ .page_content_list_item_nr {
+ font-size: 26rpx;
+ font-weight: 400;
+ color: #222222;
+ }
+ }
+ }
+ }
+ }
+</style>
diff --git a/minipro_standard/components/selectMaterial.vue b/minipro_standard/components/selectMaterial.vue
index 89224e5..d3439fd 100644
--- a/minipro_standard/components/selectMaterial.vue
+++ b/minipro_standard/components/selectMaterial.vue
@@ -68,16 +68,6 @@
this.loadData()
},
loadData() {
- // this.list = [{
- // batch: '1',
- // materialName: 'dsadas',
- // materialCode: '1m0001',
- // locationName: 'a浠�2鍙蜂綅',
- // num: '1',
- // unitName: '鍧�',
- // qualityType: 0,
- // procedureName: '鍘嬪埗',
- // }]
choiceStockPageForStandard({
...this.pages,
model: {
diff --git a/minipro_standard/pages/InOperation/InOperation.vue b/minipro_standard/pages/InOperation/InOperation.vue
index 08839c6..1f3a8df 100644
--- a/minipro_standard/pages/InOperation/InOperation.vue
+++ b/minipro_standard/pages/InOperation/InOperation.vue
@@ -3,10 +3,11 @@
<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 wtransferWarehouseList" :key="index"
+ :open="item1.wtransferDetailList.length">
<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">
@@ -15,7 +16,7 @@
<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">
@@ -34,31 +35,28 @@
<span>{{item.batch ? item.batch : '-'}}</span>
</div>
</div>
- <div class="page_content_list">
+ <div class="page_content_list" v-for="(childer, idxs) in item.wstockExtListVOList" :key="idxs">
<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 : '-'}}
- </div>
+ <div class="page_content_list_item_nr">{{ childer.locationName }}</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>
+ <div class="page_content_list_item_nr">{{ childer.num }}{{ childer.unitName }}</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=""> -->
@@ -159,58 +157,140 @@
<div class="page_footer_ck" @click="submit">
<span>纭鍏ュ簱</span>
</div>
- </div>
- <SelectMultipleMaterial ref="selectMultipleMaterial" />
+ </div>
+ <SelectMultipleMaterial ref="selectMultipleMaterial" />
+ <SelectLoaction ref="selectLoaction" @selected="selectLocation"/>
+ <MaterialIn ref="materialIn" @selected="selectLocation"/>
</view>
</template>
<script>
- import InOutInfo from '@/components/InOutInfo.vue'
+ import InOutInfo from '@/components/InOutInfo.vue'
import SelectMultipleMaterial from '@/components/SelectMultipleMaterial.vue'
- import { QRCodeType } from '@/common/config.js'
+ import SelectLoaction from '@/components/SelectLoaction.vue'
+ import MaterialIn from '@/components/materialIn.vue'
+ import {
+ QRCodeType
+ } from '@/common/config.js'
+ import {
+ getList,
+ outScanAppliances,
+ getLocationInfo,
+ saveIn,
+ getInByWTransferId,
+ wTransferForInOut,
+ wOutBoundForInOut,
+ wOutBoundForUpload,
+ transferToInNew
+ } from '@/util/api/ExWarehouse'
+ import {
+ wTransferForInOutUpload
+ } from '@/util/api/ExWarehouse'
+ import {
+ getBarcodeContent,
+ getListByCondition,
+ getListByWarehouseId
+ } from '@/util/api/WorkOrderAPI'
+ import {
+ getDB
+ } from '@/util/api/agencyAPI'
export default {
components: {
InOutInfo,
+ SelectLoaction,
+ MaterialIn,
SelectMultipleMaterial
},
data() {
- return {
- type: '',
- isZKD: false,
+ return {
+ type: '',
+ id: '',
+ wareHouseId: '',
+ 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喅鏂规硶銆�'
- },
- ids: [],
- wtransferWarehouseList: [{
- warehouseName: '娴嬭瘯搴�'
- }]
+ info: {},
+ ids: [],
+ location: '',
+ locationName: '',
+ wtransferWarehouseList: [],
+ MateriaList: []
};
- },
- 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
+ }
+ console.log(this.type, QRCodeType.CKD);
+ if (this.type == QRCodeType.CKD) {
+ infoAction = wOutBoundForInOut
+ data.wOutboundType = '1'
+ } else if (this.type == QRCodeType.ZKD) {
+ infoAction = wTransferForInOut
+ data.wTransferType = '1'
+ }
+ infoAction(data).then(res => {
+ if (this.isZKD) {
+ this.info = res.data.wtransfer
+ this.wareHouseId = res.data.wtransfer.inWarehouseId
+ this.wtransferWarehouseList = res.data.wtransferWarehouseList
+ this.MateriaList = res.data.wtransferWarehouseList[0].wtransferDetailList
+ } 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() {
+ getListByWarehouseId({
+ wareHouseId: this.wareHouseId
+ })
+ .then(res => {
+ if (res.data.length === 1) {
+ this.location = res.data[0].id
+ this.locationName = res.data[0].unionName
+ this.$refs.materialIn.open({list: this.MateriaList})
+ } else {
+ this.$refs.selectLoaction.open({wareHouseId: this.wareHouseId})
+ }
+ })
},
+ selectLocation(item) {
+ this.location = item.id
+ this.locationName = item.unionName
+ this.$refs.materialIn.open({list: this.MateriaList})
+ }
}
}
</script>
diff --git a/minipro_standard/pages/OutOperation/OutOperation.vue b/minipro_standard/pages/OutOperation/OutOperation.vue
index 83f7e78..80bb6f3 100644
--- a/minipro_standard/pages/OutOperation/OutOperation.vue
+++ b/minipro_standard/pages/OutOperation/OutOperation.vue
@@ -2,7 +2,7 @@
<view>
<InOutInfo :info="info" />
<uni-collapse @change="change" @close="close" @open="open">
- <uni-collapse-item v-if="type==7" v-for="(item1, index) in warehouseList" :key="index">
+ <uni-collapse-item :open="item1.wtransferDetailList.length" 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>{{ item1.warehouseName }}</view>
@@ -19,7 +19,7 @@
<div class="page_content_title">
<div class="page_content_title_top">
<span>{{ item.materialName + ' | ' + item.materialCode }}</span>
- <span>寰呭嚭{{ item.materialName + ' | ' + item.materialCode }}</span>
+ <span>寰呭嚭<span>{{ item.outPlannum }}</span> {{ item.unitName }}</span>
</div>
<div class="page_content_title_bottom">
<span class="green" v-if="item.qualityType === 0">鍚堟牸 <span
@@ -33,18 +33,18 @@
<span>{{item.batch ? item.batch : '-'}}</span>
</div>
</div>
- <div class="page_content_list">
+ <div class="page_content_list" v-for="(childer, idxs) in item.wstockExtListVOList" :key="idxs">
<div class="page_content_list_item">
<div class="page_content_list_item_label">鍑哄簱璐т綅锛�</div>
- <div class="page_content_list_item_nr">
- {{item.outLocationName ? item.outLocationName : '-'}}
- </div>
+ <div class="page_content_list_item_nr">{{ childer.locationName }}</div>
</div>
<div class="page_content_list_items">
<div class="page_content_list_item_label">鏁伴噺锛�</div>
- <div class="page_content_list_item_nr">
- {{item.outPlannum ? item.outPlannum : '-'}}{{item.unitName}}
- </div>
+ <div class="page_content_list_item_nr">{{ childer.num }}{{ childer.unitName }}</div>
+ </div>
+ <div class="page_content_list_item">
+ <div class="page_content_list_item_label">鎵规鍙凤細</div>
+ <div class="page_content_list_item_nr">{{ childer.batch ? childer.batch : '-' }}</div>
</div>
</div>
</div>
@@ -142,7 +142,7 @@
</div>
</div>
<div class="dele" @click="dele(index)">
- <!-- <img src="@/assets/icon/chuku_ic_delete@2x.png" alt="" /> -->
+ <!-- <img src="@/assets/icon/chuku_ic_delete@2x.png" alt="" /> -->
<image src="../../static/chuku_ic_delete@2x.png" class="img24" mode=""></image>
</div>
</div>
@@ -157,7 +157,7 @@
<span>纭鍑哄簱</span>
</div>
</div>
- <SelectTraMultipleMaterial ref="selectTraMultipleMaterial" />
+ <SelectTraMultipleMaterial ref="selectTraMultipleMaterial" @selectes="selectMaterail" />
</view>
</template>
@@ -262,20 +262,114 @@
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.selectTraMultipleMaterial.open({
- transferId: this.id,
- warehouseId: this.warehouseId
+ this.$refs.selectTraMultipleMaterial.open({
+ transferId: this.id,
+ warehouseId: this.warehouseId
})
},
+ selectMaterail(v) {
+ let tempList = this.warehouseList[0].wtransferDetailList
+ let materials = v.materials
+
+ materials.forEach(materail => {
+ tempList.forEach(item => {
+ if (materail.materialId == item.materialId && materail.procedureId == item
+ .procedureId && materail.qualityType == item.qualityType && materail.batch ==
+ item.batch) {
+ let isExist = false
+ this.outboundList.forEach(selected => {
+ if (selected.newId == materail.id) {
+ isExist = true
+ return
+ }
+ })
+ if (isExist) {
+ uni.$u.toast('璇ョ墿鏂欐壒娆″凡瀛樺湪')
+ return
+ }
+ let obj = JSON.parse(JSON.stringify(materail))
+ obj.newId = item.id
+ this.outboundList.push(obj)
+ }
+ })
+ })
+ },
+ submit() {
+ if (this.type == QRCodeType.ZKD) {
+ if (this.outboundList.length > 0) {
+ let result = this.outboundList.reduce((a, b) => {
+ if (a[b.newId]) {
+ a[b.newId].push(b);
+ } else {
+ a[b.newId] = [b];
+ }
+ return a;
+ }, {});
+ let tempList = this.warehouseList[0].wtransferDetailList
+
+ for (let i = 0; i < tempList.length; i++) {
+ let item = tempList[i]
+ for (let a in result) {
+ if (item.id == a) {
+ let total = 0
+ for (let b = 0; b < result[a].length; b++) {
+ total = Number(total) + Number(result[a][b].num)
+ }
+ if (!total || total <= 0) {
+ uni.$u.toast('鍑哄簱鐗╂枡鏁伴噺蹇呴』澶т簬0')
+ return
+ }
+ console.log(total, item.outPlannum);
+ if (total > item.outPlannum) {
+ uni.$u.toast('鍑哄簱鏁伴噺涓嶈兘澶т簬寰呭嚭搴撴暟閲�')
+ return
+ }
+ }
+ }
+ }
+ let submitTransferOutDetailDTOList = []
+ this.outboundList.forEach(item => {
+ tempList.forEach(child => {
+ if (item.newId == child.id) {
+ submitTransferOutDetailDTOList.push({
+ outNum: item.num,
+ wstockId: item.id,
+ wtransferDetailId: child.id
+ })
+ }
+ })
+ })
+ transferToOutNew({
+ submitTransferOutDetailDTOList,
+ wtransferId: this.id
+ }).then(res => {
+ if (res.code === 200) {
+ this.$store.dispatch.dispatch('getUpcomingNum')
+ uni.$u.toast('鎿嶄綔鎴愬姛')
+ // setTimeout(() => {
+ // router.replace({ name: 'wTransferDetail', query: { id: info.value.wtransfer.id, dbid: route.query.dbid } })
+ // }, 2000)
+ }
+ })
+ } else {
+ uni.$u.toast('璇烽�夋嫨鍑哄簱鐗╂枡')
+ }
+ } else if (this.type === QRCodeType.CKD) {
+ wOutBoundForUpload({
+ id: info.value.woutbound.id,
+ wOutboundType: 0
+ }).then(res => {
+ if (res.code === 200) {
+ this.$store.dispatch.dispatch('getUpcomingNum')
+ uni.$u.toast('鎿嶄綔鎴愬姛')
+ // setTimeout(() => {
+ // // router.go(-1)
+ // router.replace({ name: 'wOutboundDetail', query: { id: info.value.wtransfer.id } })
+ // }, 2000)
+ }
+ })
+ }
+ }
}
}
</script>
@@ -558,135 +652,61 @@
margin-top: 15rpx;
}
- .page_yxwl_list_item_num {
- display: flex;
- flex-direction: column;
-
- // margin-top: 30rpx;
- &:first-child {
- margin-top: 0;
- }
-
- .dis {
- display: flex;
- }
-
- .itemy {
- margin-top: 20rpx;
- width: 100%;
- display: flex;
- align-items: center;
- position: relative;
-
- .itemy_item {
- flex: 1;
- display: flex;
- align-items: center;
-
- .label {
- font-size: 26rpx;
- font-weight: 400;
- color: #666666;
- flex-shrink: 0;
- }
-
- .nr {
- font-size: 26rpx;
- font-weight: 400;
- color: #222222;
-
- input {
- width: 100rpx;
- height: 35rpx;
- border-radius: 8rpx;
- border: 1rpx solid #E5E5E5;
- margin-right: 10rpx;
- margin-left: 5rpx;
- }
-
- span {
- font-size: 26rpx;
- font-weight: 400;
- color: #222222;
- }
- }
- }
-
- .dele {
- position: absolute;
- right: -30rpx;
- width: 48rpx;
- height: 48rpx;
-
- img {
- width: 100%;
- height: 100%;
- }
- }
- }
-
- .items {
- width: 50%;
- display: flex;
- align-items: center;
-
- .label {
- font-size: 26rpx;
- font-weight: 400;
- color: #666666;
- flex-shrink: 0;
- }
-
- .nr {
- font-size: 26rpx;
- font-weight: 400;
- color: #222222;
-
- input {
- width: 100rpx;
- height: 40rpx;
- margin-right: 10rpx;
- }
-
- span {
- font-size: 26rpx;
- font-weight: 400;
- color: #222222;
- }
- }
- }
-
- .item {
- width: 70%;
- display: flex;
- align-items: center;
-
- .label {
- font-size: 26rpx;
- font-weight: 400;
- color: #666666;
- flex-shrink: 0;
- }
-
- .nr {
- font-size: 26rpx;
- font-weight: 400;
- color: #222222;
-
- input {
- width: 100rpx;
- height: 40rpx;
- margin-right: 10rpx;
- }
-
- span {
- font-size: 26rpx;
- font-weight: 400;
- color: #222222;
- }
- }
- }
- }
+ .page_yxwl_list_item_num {
+ display: flex;
+ position: relative;
+ margin-top: 36rpx;
+
+ &:first-child {
+ margin-top: 0;
+ }
+
+ .dele {
+ position: absolute;
+ right: -30rpx;
+ width: 48rpx;
+ height: 48rpx;
+
+ img {
+ width: 100%;
+ height: 100%;
+ }
+ }
+
+ .item {
+ width: 50%;
+ display: flex;
+ align-items: center;
+
+ .label {
+ flex-shrink: 0;
+ font-size: 26rpx;
+ font-weight: 400;
+ color: #666666;
+ flex-shrink: 0;
+ }
+
+ .nr {
+ flex: 1;
+ display: flex;
+ align-items: center;
+
+ input {
+ width: 130rpx;
+ height: 40rpx;
+ border-radius: 8rpx;
+ border: 1rpx solid #E5E5E5;
+ margin-right: 10rpx;
+ }
+
+ span {
+ font-size: 26rpx;
+ font-weight: 400;
+ color: #222222;
+ }
+ }
+ }
+ }
}
}
diff --git a/minipro_standard/pages/index/index.vue b/minipro_standard/pages/index/index.vue
index 64e35c7..ac8f18a 100644
--- a/minipro_standard/pages/index/index.vue
+++ b/minipro_standard/pages/index/index.vue
@@ -233,12 +233,7 @@
return
}
uni.navigateTo({
- url: '/pages/InOperation/InOperation',
- query: {
- id: item.objId,
- dbid: item.id,
- type: 7
- }
+ url: `/pages/InOperation/InOperation?id=${item.objId}&dbid=${item.id}&type=7`
})
// router.push({
// name: 'warehousing',
--
Gitblit v1.9.3