| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430 | <template>	<view class="query-wrap">		<view class="inner-item" v-for="(item,index) in listData" :key="index">			<view class="item-stats">				<span v-if="item.stas == 'A'">待拣货</span>				<span v-if="item.stas == 'B'">已拣货</span>			</view>			<view class="inventory-item">				<view class="shuo-item-name">					<view class="shuo-label">						出库单号:					</view>					<view class="shuo-unit">						{{item.stooutId}}					</view>				</view>			</view>			<view class="inventory-item">				<view class="shuo-item-name">					<view class="shuo-label">						来源订单号:					</view>					<view class="shuo-unit">						{{item.soucId}}					</view>				</view>			</view>			<view class="inventory-item">				<view class="shuo-item">					<view class="shuo-label">						出库品种数:					</view>					<view class="shuo-cont">						{{item.stoCnt}}					</view>				</view>				<view class="shuo-item">					<view class="shuo-label">						出库总数量:					</view>					<view class="shuo-cont">						{{item.devCnt}}					</view>				</view>			</view>			<view class="inventory-item">				<view class="shuo-item-name">					<view class="shuo-label">						出库总金额					</view>					<view class="shuo-unit">						{{item.devAmt}}					</view>				</view>			</view>			<view class="inventory-item">				<view class="shuo-item">					<view class="shuo-label">						出库类型:					</view>					<view class="shuo-cont">						{{item.stoType}}					</view>				</view>				<view class="shuo-item">					<view class="shuo-label">						目标位置					</view>					<view class="shuo-cont">						{{item.deptName}}					</view>				</view>			</view>			<view class="inventory-item">				<view class="shuo-item">					<view class="shuo-label">						出库人:					</view>					<view class="shuo-cont">						{{item.crteUsrName}}					</view>				</view>				<view class="shuo-item">					<view class="shuo-label">						出库时间:					</view>					<view class="shuo-cont">						{{forMatTime(item.crteTime)}}					</view>				</view>			</view>		</view>		<view class="inner-item">			<view class="text-title">				<view class="title-circ">				</view>				<span>手术信息</span>			</view>			<view class="inventory-item">				<view class="shuo-item">					<view class="shuo-label">						手术名称:					</view>					<view class="shuo-cont">						{{listData[0].oprnName||""}}					</view>				</view>				<view class="shuo-item">					<view class="shuo-label">						手术间:					</view>					<view class="shuo-cont">						{{listData[0].oprtRoom||""}}					</view>				</view>			</view>			<view class="inventory-item">				<view class="shuo-item">					<view class="shuo-label">						主治医生:					</view>					<view class="shuo-cont">						{{listData[0].atddr||""}}					</view>				</view>				<view class="shuo-item">					<view class="shuo-label">						手术日期:					</view>					<view class="shuo-cont">						{{listData[0].oprtTime?forMatTime(listData[0].oprtTime):""}}					</view>				</view>			</view>		</view>		<view class="inner-item" v-for="(item,idex) in detailsData" :key="idex"			@click.stop="itemDetails(item,idex,'outbond')"			:style="{background:(item.pickCnt==null||Number(item.pickCnt)<Number(item.stooutCnt)?'red':'#fff')}">			<view class="text-title" v-if="idex==0">				<view class="title-circ">				</view>				<span					:style="{color:(item.pickCnt==null||Number(item.pickCnt)<Number(item.stooutCnt)?'#fff':'#101010')}">					耗材清单				</span>			</view>			<view class="inventory-item">				<view class="shuo-item-name">					<view class="shuo-label-podnme"						:style="{color:(item.pickCnt==null||Number(item.pickCnt)<Number(item.stooutCnt)?'#fff':'#101010')}">						{{item.prodName}}					</view>					<view class="shuo-unit"						:style="{color:(item.pickCnt==null||Number(item.pickCnt)<Number(item.stooutCnt)?'#fff':'#101010')}">						<span>{{ item.purcUnt }} ({{ item.convrat			  			}}{{item.prcUnt}}/{{ item.purcUnt }})</span>					</view>				</view>			</view>			<view class="inventory-item">				<view class="shuo-item-name">					<view class="shuo-label"						:style="{color:(item.pickCnt==null||Number(item.pickCnt)<Number(item.stooutCnt)?'#fff':'#101010')}">						出库数量:					</view>					<view class="shuo-unit"						:style="{color:(item.pickCnt==null||Number(item.pickCnt)<Number(item.stooutCnt)?'#fff':'#101010')}">						{{item.stooutCnt}}					</view>				</view>			</view>			<view class="inventory-item">				<view class="shuo-item-name">					<view class="shuo-label"						:style="{color:(item.pickCnt==null||Number(item.pickCnt)<Number(item.stooutCnt)?'#fff':'#101010')}">						已拣货:					</view>					<view class="shuo-unit" @click.stop="itemDetails(item,idex,'query')" v-if="item.pickCnt"						:style="{color:(item.pickCnt==null||Number(item.pickCnt)<Number(item.stooutCnt)?'#fff':'#5AB7A5')}">						{{item.pickCnt}} (查看)					</view>				</view>			</view>			<view class="inventory-item">				<view class="shuo-item">					<view class="shuo-label"						:style="{color:(item.pickCnt==null||Number(item.pickCnt)<Number(item.stooutCnt)?'#fff':'#101010')}">						规格:					</view>					<view class="shuo-cont"						:style="{color:(item.pickCnt==null||Number(item.pickCnt)<Number(item.stooutCnt)?'#fff':'#101010')}">						{{item.spec}}					</view>				</view>				<view class="shuo-item">					<view class="shuo-label"						:style="{color:(item.pickCnt==null||Number(item.pickCnt)<Number(item.stooutCnt)?'#fff':'#101010')}">						型号:					</view>					<view class="shuo-cont"						:style="{color:(item.pickCnt==null||Number(item.pickCnt)<Number(item.stooutCnt)?'#fff':'#101010')}">						{{item.mol}}					</view>				</view>			</view>			<view class="inventory-item">				<view class="shuo-item-name">					<view class="shuo-label"						:style="{color:(item.pickCnt==null||Number(item.pickCnt)<Number(item.stooutCnt)?'#fff':'#101010')}">						注册证号:					</view>					<view class="shuo-cont"						:style="{color:(item.pickCnt==null||Number(item.pickCnt)<Number(item.stooutCnt)?'#fff':'#101010')}">						{{item.regcertno}}					</view>				</view>			</view>			<view class="inventory-item">				<view class="shuo-item">					<view class="shuo-label"						:style="{color:(item.pickCnt==null||Number(item.pickCnt)<Number(item.stooutCnt)?'#fff':'#101010')}">						耗材类别:					</view>					<view class="shuo-cont"						:style="{color:(item.pickCnt==null||Number(item.pickCnt)<Number(item.stooutCnt)?'#fff':'#101010')}">						<span v-if="item.mcsType == '0'"> 普通耗材 </span>						<span v-if="item.mcsType == '1'"> 高值耗材 </span>						<span v-if="item.mcsType == '2'"> 试剂 </span>						<span v-if="item.mcsType == '3'"> 总务耗材 </span>					</view>				</view>				<view class="shuo-item">					<view class="shuo-label"						:style="{color:(item.pickCnt==null||Number(item.pickCnt)<Number(item.stooutCnt)?'#fff':'#101010')}">						生产来源:					</view>					<view class="shuo-cont"						:style="{color:(item.pickCnt==null||Number(item.pickCnt)<Number(item.stooutCnt)?'#fff':'#101010')}">						<span v-if="item.prodSouc == '1'" type="success"> 国产 </span>						<span v-if="item.prodSouc == '2'" type="danger"> 进口 </span>					</view>				</view>			</view>			<view class="inventory-item">				<view class="shuo-item-name">					<view class="shuo-label"						:style="{color:(item.pickCnt==null||Number(item.pickCnt)<Number(item.stooutCnt)?'#fff':'#101010')}">						生产企业:					</view>					<view class="shuo-cont"						:style="{color:(item.pickCnt==null||Number(item.pickCnt)<Number(item.stooutCnt)?'#fff':'#101010')}">						{{item.prodEntp}}					</view>				</view>			</view>		</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="listData[0].stas=='A'">			<button type=" default" plain="true" style="width:240rpx;line-height: 70rpx;background: #01A992;color:#fff"				@click.stop="orderAcept()">拣货完成</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 {				listData: [],				detailsData: [],				type: ""			}		},		computed: {			...mapState([])		},		onShow() {			let that = this;			this.$forceUpdate();			uni.getStorage({				key: 'picking-details',				success: function(res) {					that.listData = [						res.data					];					that.getData({						stooutId: res.data.stooutId,						soucStroomId: res.data.soucStroomId,					});				}			});		},		mounted() {		},		methods: {			...mapActions([]),			...mapMutations(['setMentItemData', 'setRefusaData']),			async getData(pam) {				await this.$http('outbound.getDetailsData', {					current: 1,					size: 1000,					stooutId: pam.stooutId,					soucStroomId: pam.soucStroomId,				}, '加载中', true).then((res) => {					if (res.success == true) {						res.data.records.map((item) => {							item["stooutId"] = pam.stooutId;						});						this.detailsData = res.data.records;					}				})			},			//确定拣货			dialogConfirm() {				this.$http('outbound.complatePickIng', this.detailsData, '加载中', true).then((res) => {					if (res.success == true) {						this.$refs.popup.close();						uni.redirectTo({							url: '/pages/outbound/outbound',							success: function(res) {								console.log(res, "res")							}						});					} else {						this.$refs.popup.close();					}				})			},			//验收按钮触发			orderAcept(type) {				this.$refs.popup.open();				this.type = type;			},			dialogClose() {				this.$refs.popup.close();			},			//日期格式化			forMatTime(time) {				return moment(time).format("YYYY-MM-DD");			},			//跳转拣货明细详情	 			itemDetails(item, index, type) {				if (type == 'outbond' && this.listData[0].stas == "B") {					return;				}				if (type == 'outbond'&&Number(item.pickCnt) >= Number(item.stooutCnt)) {					return;				}				uni.setStorage({					key: 'pickIngData',					data: {						...item,						type: type,						stooutId: this.listData[0].stooutId,						stas: this.listData[0].stas					}				});				uni.navigateTo({					url: '/pages/pickingview/index',					success: function(res) {						console.log(res, "res")					}				});			},		},		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;		}		.time-view {			height: 350rpx;			background-color: #fff;			padding: 50rpx 50rpx 0 50rpx;			box-sizing: border-box;			.btn-view {				width: 100%;				height: 100rpx;				margin-top: 100rpx;				display: flex;				justify-content: space-around;			}		}	}	uni-page-body {		width: 100%;		height: 100%;	}</style>
 |