| | |
| | | <template> |
| | | <view class="content"> |
| | | <view class="content2"> |
| | | <view class="order-message"> |
| | | <view class="content_list_item_top"> |
| | | <view class="content_list_item_top_left"> |
| | | <!--<text>入库单号:</text>--> |
| | | <!-- <text>转库单号:</text>--> |
| | | <text>{{ data.code }}</text> |
| | | </view> |
| | | <view class="content_list_item_top_right"> |
| | | <text class="warning" v-if="data.status === 0">待入库</text> |
| | | <text class="green" v-else-if="data.status === 1">已入库</text> |
| | | <text class="info" v-else-if="data.status === 2">已取消</text> |
| | | <text class="created" v-if="data.status === 0">待出库</text> |
| | | <text class="warning" v-else-if="data.status === 1">已出库</text> |
| | | <text class="green" v-else-if="data.status == 2">已入库</text> |
| | | <text class="info" v-else-if="data.status === 3">已取消</text> |
| | | </view> |
| | | </view> |
| | | <!-- item主题信息部分 --> |
| | | <view class="content_list_item_content"> |
| | | <view class="content_list_item_content_item"> |
| | | <view style="margin-top: 0 " class="content_list_item_content_item"> |
| | | <view class="content_list_item_content_item_label">单据类型:</view> |
| | | <view class="content_list_item_content_item_nr"> |
| | | {{ orderTyepToStr(data.billType) }} |
| | | {{ tyepToStr(data.type) }} |
| | | </view> |
| | | </view> |
| | | <view class="content_list_item_content_item"> |
| | | <view class="content_list_item_content_item_label">入货仓库:</view> |
| | | <view class="content_list_item_content_item_label">转出组织:</view> |
| | | <view class="content_list_item_content_item_nr"> |
| | | {{ data.warehouseCode + ' | ' + data.warehouseName }} |
| | | {{ data.outDepartName }} |
| | | </view> |
| | | </view> |
| | | <view class="content_list_item_content_item"> |
| | | <view class="content_list_item_content_item_label">计划日期:</view> |
| | | <view class="content_list_item_content_item_label">转入组织:</view> |
| | | <view class="content_list_item_content_item_nr"> |
| | | {{ data.planDate }} |
| | | {{ data.inDepartName }} |
| | | </view> |
| | | </view> |
| | | <view class="content_list_item_content_item"> |
| | | <view class="content_list_item_content_item_label">来源类型:</view> |
| | | <view class="content_list_item_content_item_label">转出仓库:</view> |
| | | <view class="content_list_item_content_item_nr"> |
| | | {{ tyepToStr(data.originType) }} |
| | | {{ data.outWarehouseName }} |
| | | </view> |
| | | </view> |
| | | <view class="content_list_item_content_item"> |
| | | <view class="content_list_item_content_item_label">来源单号:</view> |
| | | <view class="content_list_item_content_item_label">转出仓管员:</view> |
| | | <view class="content_list_item_content_item_nr"> |
| | | {{ data.originCode ? data.originCode : '-' }} |
| | | {{ data.outUserName }} |
| | | </view> |
| | | </view> |
| | | <view v-if="data.updateName" class="content_list_item_content_item"> |
| | | <view class="content_list_item_content_item_label">操作人:</view> |
| | | <view class="content_list_item_content_item"> |
| | | <view class="content_list_item_content_item_label">转入仓库:</view> |
| | | <view class="content_list_item_content_item_nr"> |
| | | {{ data.updateName + ' - ' + data.updateMobile }} |
| | | {{ data.inWarehouseName }} |
| | | </view> |
| | | </view> |
| | | <view v-if="data.updateTime" class="content_list_item_content_item"> |
| | | <view class="content_list_item_content_item_label">操作时间:</view> |
| | | <view class="content_list_item_content_item"> |
| | | <view class="content_list_item_content_item_label">转入仓管员:</view> |
| | | <view class="content_list_item_content_item_nr"> |
| | | {{ data.updateTime }} |
| | | {{ data.inUserName }} |
| | | </view> |
| | | </view> |
| | | <view class="content_list_item_content_item"> |
| | | <view class="content_list_item_content_item_label">计划转出日期:</view> |
| | | <view class="content_list_item_content_item_nr"> |
| | | {{ data.outPlandate }} |
| | | </view> |
| | | </view> |
| | | <view class="content_list_item_content_item"> |
| | | <view class="content_list_item_content_item_label">计划转入日期:</view> |
| | | <view class="content_list_item_content_item_nr"> |
| | | {{ data.inPlandate }} |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <!-- 转库物料 --> |
| | | <view class="title"> |
| | | <text class="title-prefix"></text> |
| | | <text>{{ data.status==1 ? '已入库物料' : '待入库物料' }}</text> |
| | | </view> |
| | | <view class="material-content"> |
| | | <view class="item-style" v-for="(item, index) in materailArray" :key="index"> |
| | | <view class="item-title-style"> |
| | | <text style="font-weight: 500;">{{ item.materialName + ' | ' + item.materialCode}}</text> |
| | | <!-- 转库物料 --> |
| | | <view class="material-title"> |
| | | <view class="title"> |
| | | <text class="title-prefix"></text> |
| | | <text>转库物料</text> |
| | | </view> |
| | | <view class="item-content-style"> |
| | | <view class="content_list_item_content_item"> |
| | | <text class="content_list_item_content_item_label">批次号:</text> |
| | | <text class="content_list_item_content_item_nr">{{ item.batch || '-' }}</text> |
| | | </view> |
| | | <view class="material-content"> |
| | | <view class="item-style" v-for="(item, index) in data.wtransferDetailList" :key="index"> |
| | | <view class="item-title-style"> |
| | | <text style="font-weight: 500;">{{ item.materialName + ' | ' + item.materialCode}}</text> |
| | | </view> |
| | | <view class="content_list_item_content_item"> |
| | | <text class="content_list_item_content_item_label">数量:</text> |
| | | <text class="content_list_item_content_item_nr">{{ item.doneNum + item.unitName }}</text> |
| | | </view> |
| | | <view class="content_list_item_content_item"> |
| | | <text class="content_list_item_content_item_label">工序:</text> |
| | | <text class="content_list_item_content_item_nr">{{ item.procedureName || '-' }}</text> |
| | | </view> |
| | | <view class="content_list_item_content_item"> |
| | | <view class="content_list_item_content_item_label">质量:</view> |
| | | <view class="content_list_item_content_item_nr"> |
| | | <text v-if="item.qualityType == 0" class="green">合格</text> |
| | | <text v-else-if="item.qualityType == 1" class="yellow">不良</text> |
| | | <text v-else-if="item.qualityType == 2" class="red">报废</text> |
| | | <text v-else>-</text> |
| | | <view class="item-content-style"> |
| | | <view class="content_list_item_content_item"> |
| | | <view class="content_list_item_content_item_label">批次号:</view> |
| | | <view class="content_list_item_content_item_nr"> |
| | | {{ item.batch ? item.batch : '-' }} |
| | | </view> |
| | | </view> |
| | | <view class="content_list_item_content_item"> |
| | | <view class="content_list_item_content_item_label">工序:</view> |
| | | <view class="content_list_item_content_item_nr"> |
| | | {{ item.procedureName || '-' }} |
| | | </view> |
| | | </view> |
| | | <view class="content_list_item_content_item"> |
| | | <view class="content_list_item_content_item_label">质量:</view> |
| | | <view class="content_list_item_content_item_nr"> |
| | | <text v-if="item.qualityType==0" class="green">合格</text> |
| | | <text v-else-if="item.qualityType==1" class="yellow">不良</text> |
| | | <text v-else-if="item.qualityType==2" class="red">报废</text> |
| | | <text v-else>-</text> |
| | | </view> |
| | | </view> |
| | | <view class="content_list_item_content_item"> |
| | | <view class="content_list_item_content_item_label">计划转库数量:</view> |
| | | <view class="content_list_item_content_item_nr"> |
| | | {{ item.outPlannum + item.unitName }} |
| | | </view> |
| | | </view> |
| | | <view class="content_list_item_content_item"> |
| | | <view class="content_list_item_content_item_label">实际转出数量:</view> |
| | | <view class="content_list_item_content_item_nr"> |
| | | {{ item.outActnum + item.unitName }} |
| | | </view> |
| | | </view> |
| | | <view class="content_list_item_content_item"> |
| | | <view class="content_list_item_content_item_label">实际转入数量:</view> |
| | | <view class="content_list_item_content_item_nr"> |
| | | {{ item.inActnum + item.unitName }} |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view class="content_list_item_content_item"> |
| | | <text class="content_list_item_content_item_label">入库货位:</text> |
| | | <text |
| | | class="content_list_item_content_item_nr">{{ item.locationName ? item.locationName : '-' }}</text> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view v-if="data.status === 0" style="height:94rpx"></view> |
| | | <view v-if="data.status === 0" class="bottom-button"> |
| | | <button class="button button-cancel" @click="submit">去入库</button> |
| | | <!-- <button class="button button-cancel" @click="cancel">取消</button> --> |
| | | <view v-if="(data.status === 0 || data.status === 1) && show" style="background:#F7F7F7; height:94rpx"></view> |
| | | <view v-if="(data.status === 0 || data.status === 1) && show" class="bottom-button"> |
| | | <button class="button" @click="submit">{{ data.status === 0 ? '去出库' : '去入库' }}</button> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import { orderTyepToStr } from '@/util/constData.js' |
| | | import { |
| | | wTransferExtDetail |
| | | } from '@/util/api/materialStorage' |
| | | export default { |
| | | data() { |
| | | return { |
| | | types: [ |
| | | { name: '全部', id: '', isActive: true }, |
| | | { name: '采购订单', id: '0', isActive: false }, |
| | | { name: '生产工单', id: '1', isActive: false }, |
| | | { name: '销售订单', id: '2', isActive: false }, |
| | | { name: '转库单', id: '3', isActive: false }, |
| | | { name: '盘点单', id: '4', isActive: false }, |
| | | id: null, |
| | | types: [{ |
| | | name: '全部', |
| | | id: '', |
| | | isActive: true |
| | | }, |
| | | { |
| | | name: '采购订单', |
| | | id: '0', |
| | | isActive: false |
| | | }, |
| | | { |
| | | name: '生产工单', |
| | | id: '1', |
| | | isActive: false |
| | | }, |
| | | { |
| | | name: '销售订单', |
| | | id: '2', |
| | | isActive: false |
| | | }, |
| | | { |
| | | name: '转库单', |
| | | id: '3', |
| | | isActive: false |
| | | }, |
| | | { |
| | | name: '盘点单', |
| | | id: '4', |
| | | isActive: false |
| | | }, |
| | | ], |
| | | data: {} |
| | | data: { |
| | | code: "", |
| | | status: 0, |
| | | outDepartName: "", |
| | | inDepartName: "", |
| | | outWarehouseName: "", |
| | | inWarehouseName: "", |
| | | outPlandate: "", |
| | | inPlandate: "", |
| | | wtransferDetailList: [] |
| | | }, |
| | | orderType: [{ |
| | | name: '车间领料', |
| | | id: 1 |
| | | }, |
| | | { |
| | | name: '计划领料', |
| | | id: 2 |
| | | }, |
| | | { |
| | | name: '机台备料', |
| | | id: 3 |
| | | }, |
| | | { |
| | | name: '完工入库', |
| | | id: 4 |
| | | }, |
| | | { |
| | | name: '车间转库', |
| | | id: 5 |
| | | }, |
| | | { |
| | | name: '外协领料转库', |
| | | id: 6 |
| | | }, |
| | | { |
| | | name: '外协完工转库', |
| | | id: 7 |
| | | }, |
| | | { |
| | | name: '成品入库', |
| | | id: 8 |
| | | }, |
| | | { |
| | | name: '成品转库', |
| | | id: 9 |
| | | }, |
| | | { |
| | | name: '让步放行入库', |
| | | id: 10 |
| | | }, |
| | | { |
| | | name: '让步放行转库', |
| | | id: 11 |
| | | }, |
| | | { |
| | | name: '客返返修领料', |
| | | id: 12 |
| | | }, |
| | | { |
| | | name: '客返返修入库', |
| | | id: 13 |
| | | }, |
| | | { |
| | | name: '跨组织转库', |
| | | id: 14 |
| | | }, |
| | | { |
| | | name: '工序报废', |
| | | id: 15 |
| | | }, |
| | | { |
| | | name: '客退返修领料', |
| | | id: 16 |
| | | }, |
| | | { |
| | | name: '客退返修入库', |
| | | id: 17 |
| | | } |
| | | ], |
| | | show: false |
| | | }; |
| | | }, |
| | | onLoad(option) { |
| | | this.id = option.id |
| | | wTransferExtDetail(option.id) |
| | | .then(res => { |
| | | this.data = res.data |
| | | if (res.data.inUserId == this.$store.state.userInfo.id) { |
| | | this.show = true |
| | | } |
| | | }) |
| | | }, |
| | | methods: { |
| | | // 跳转出库入库 |
| | | submit() { |
| | | if (this.data.status === 0) { // 出库 |
| | | console.log('出库') |
| | | // router.push({ name: 'issueOperation', query: { id: route.query.id, type: 7 } }) |
| | | uni.navigateTo({ |
| | | url: `/pages/OutOperation/OutOperation?id=${this.id}&type=7` |
| | | }); |
| | | } else if (this.data.status === 1) { // 入库 |
| | | if (this.data.type === 3) { // 备料确认 |
| | | console.log('备料确认') |
| | | // router.push({ name: 'orderStock', query: { id: route.query.id, status: data.value.status, next: 1 } }) |
| | | return |
| | | } |
| | | console.log('入库') |
| | | uni.navigateTo({ |
| | | url: `/pages/InOperation/InOperation?id=${this.id}&type=7` |
| | | }); |
| | | // router.push({ name: 'warehousing', query: { id: route.query.id, type: 7 } }) |
| | | } |
| | | }, |
| | | tyepToStr(type) { |
| | | // <!-- 1、车间领料;2、车间备料;3、其他;4、完工入库 --> |
| | | for (const item of this.types) { |
| | | if (parseInt(item.id) === this.type) { |
| | | for (const item of this.orderType) { |
| | | if (item.id == type) { |
| | | return item.name |
| | | } |
| | | } |
| | |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | .content { |
| | | .content2 { |
| | | background: white; |
| | | |
| | | .order-message { |
| | | padding: 30rpx; |
| | | padding-top: 30rpx; |
| | | // padding: 30rpx; |
| | | display: flex; |
| | | flex-direction: column; |
| | | |
| | | // border-bottom: 1rpx solid #ececec; |
| | | .content_list_item_top { |
| | | padding: 0 30rpx; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | |
| | | .content_list_item_top_left { |
| | | display: flex; |
| | | align-items: center; |
| | | |
| | | // align-items: center; |
| | | text { |
| | | span { |
| | | font-size: 32rpx; |
| | | font-weight: 500; |
| | | color: #333333; |
| | |
| | | } |
| | | } |
| | | |
| | | .material-title { |
| | | // background-color: #f7f7f7; |
| | | margin-top: 10rpx; |
| | | } |
| | | |
| | | .content_list_item_content { |
| | | margin: 0 30rpx; |
| | | padding: 24rpx 30rpx; |
| | | background: #f7f7f7; |
| | | border-radius: 16rpx; |
| | |
| | | justify-content: space-between; |
| | | margin-top: 32rpx; |
| | | |
| | | .content_list_item_content_item:first-child { |
| | | margin-top: 0; |
| | | } |
| | | |
| | | .content_list_item_content_item { |
| | | width: 100%; |
| | | display: flex; |
| | | align-items: center; |
| | | margin-top: 24rpx; |
| | | |
| | | // &:nth-child(1) { |
| | | // margin-top: 0 !important; |
| | | // } |
| | | // &:nth-child(2) { |
| | | // margin-top: 0 !important; |
| | | // } |
| | | .content_list_item_content_item_label { |
| | | font-size: 24rpx; |
| | | font-weight: 400; |
| | |
| | | } |
| | | |
| | | .title { |
| | | background-color: #f7f7f7; |
| | | padding: 30rpx; |
| | | height: 32rpx; |
| | | margin-left: 30rpx; |
| | | padding-top: 40rpx; |
| | | padding-bottom: 24rpx; |
| | | font-size: 30rpx; |
| | | display: flex; |
| | | align-items: center; |
| | | |
| | | .title-prefix { |
| | | display: inline-block; |
| | |
| | | } |
| | | |
| | | .material-content { |
| | | padding: 30rpx; |
| | | |
| | | .item-style { |
| | | width: initial; |
| | | border-bottom: 1rpx solid #ececec; |
| | | margin-top: 30rpx; |
| | | |
| | | &:first-child { |
| | | margin-top: 0 !important; |
| | | } |
| | | border-bottom: 1rpx solid #ECECEC; |
| | | padding-bottom: 30rpx; |
| | | |
| | | &:last-child { |
| | | border: none; |
| | | } |
| | | |
| | | .item-title-style { |
| | | padding: 0 30rpx; |
| | | margin-top: 30rpx; |
| | | margin-bottom: 12rpx; |
| | | font-size: 30rpx; |
| | | } |
| | | |
| | | .item-content-style { |
| | | // padding: 24rpx 30rpx; |
| | | // background-color: #f7f7f7; |
| | | // border-radius: 16rpx; |
| | | margin: 0 30rpx; |
| | | background-color: #f7f7f7; |
| | | border-radius: 16rpx; |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | padding-bottom: 30rpx; |
| | | justify-content: space-between; |
| | | |
| | | &:last-child { |
| | | padding-bottom: 0; |
| | | } |
| | | padding: 1rpx 1rpx 30rpx 1rpx; |
| | | |
| | | .content_list_item_content_item { |
| | | width: 100%; |
| | | display: flex; |
| | | margin-top: 24rpx; |
| | | margin-left: 24rpx; |
| | | |
| | | .content_list_item_content_item_label { |
| | | font-size: 24rpx; |
| | |
| | | width: 100%; |
| | | bottom: 0; |
| | | height: 188rpx; |
| | | display: flex; |
| | | justify-content: space-between; |
| | | |
| | | .button-action { |
| | | background: #fff; |
| | | color: $nav-color; |
| | | } |
| | | |
| | | .button-cancel { |
| | | background: $nav-color; |
| | | color: #FFFFFF; |
| | | } |
| | | |
| | | .button { |
| | | margin: 32rpx 32rpx 68rpx 32rpx; |
| | | height: 88rpx; |
| | | /*width: 668rpx;*/ |
| | | // width: 334rpx; |
| | | font-size: 30rpx; |
| | | width: calc(100% - 64rpx); |
| | | border: none; |
| | | border-radius: 8rpx; |
| | | box-shadow: 0 0 12rpx 0 rgba(0, 0, 0, 0.08); |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | background-color: $nav-color; |
| | | color: #fff; |
| | | } |
| | | } |
| | | } |