| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410 |
- <template>
- <!-- 调拨审批 -->
- <view class="plan-approval-container">
- <uni-nav-bar
- fixed="true"
- statusBar="true"
- left-icon="back"
- title="调拨单审批详情"
- @clickLeft="back"
- ></uni-nav-bar>
- <template>
- <view class="tab-title">
- <view
- class="tab-item"
- :class="0 === pickTabIndex ? 'active' : ''"
- @click="changeChartsTab(0)"
- >基本信息
- </view>
- <view
- class="tab-item"
- :class="1 === pickTabIndex ? 'active' : ''"
- @click="changeChartsTab(1)"
- >
- 调拨明细
- </view>
- </view>
- </template>
- <view class="content">
- <!-- 基本信息 -->
- <view class="baseinfo" v-if="pickTabIndex === 0">
- <view class="col">
- <text class="label">调拨单号</text>
- <text class="desc">{{ baseInfo.dialNumber }}</text>
- </view>
- <!-- <view class="col">
- <text class="label">来源类型</text>
- <text class="desc">{{ baseInfo.planName }}</text>
- </view> -->
- <view class="col">
- <text class="label">调拨类型</text>
- <text class="desc">{{ baseInfo.dialType }}</text>
- </view>
- <view class="col">
- <text class="label">调出库</text>
- <text class="desc">{{ baseInfo.warehouseName }}</text>
- </view>
- <view class="col">
- <text class="label">调入库</text>
- <text class="desc">{{ baseInfo.inWarehouseName }}</text>
- </view>
- <view class="col">
- <text class="label">调拨数量</text>
- <text class="desc">{{ planEquiList.length }}</text>
- </view>
- <view class="col">
- <text class="label">申请人</text>
- <text class="desc">{{ baseInfo.createUserName }}</text>
- </view>
- <view class="col">
- <text class="label">创建时间</text>
- <text class="desc">{{ baseInfo.createTime }}</text>
- </view>
- <view class="col">
- <text class="label">提交时间</text>
- <text class="desc">{{ baseInfo.submissionTime }}</text>
- </view>
- <view class="col">
- <text class="label">审核时间</text>
- <text class="desc">{{ baseInfo.auditorTime }}</text>
- </view>
- <view class="col">
- <text class="label">审核说明</text>
- <text class="desc">{{ baseInfo.auditCause }}</text>
- </view>
- </view>
- <view class="equipment" v-if="pickTabIndex === 1">
- <AssetsCard
- v-for="(item, index) in planEquiList"
- class="kd-row"
- type="detail"
- :isApproval="true"
- :key="index"
- :item="item"
- />
- <!-- <view class="info-container" v-for="(item,index) in planEquiList" :key="index">
- <view class="title">
- {{item.assetName}}({{item.assetCode}})
- </view>
- <view class="main-wrap">
- <view class="col">
- <text class="label">批次</text>
- <text class="desc">{{item.batchNo}}</text>
- </view>
- <view class="col">
- <text class="label">牌号/型号</text>
- <text class="desc">{{item.brandNum}}</text>
- </view>
- <view class="col">
- <text class="label">单位</text>
- <text class="desc">{{item.measurementUnit}}{{item.unit}}/{{item.minPackUnit}}</text>
- </view>
- <view class="col">
- <text class="label">桶号</text>
- <text class="desc">{{item.num}}</text>
- </view>
- <view class="col">
- <text class="label">调出:</text>
- <text class="desc">{{ `${item.outWarehouseAreaName}-${item.outWarehouseAreaGoodsCode}-${item.outGoodsAllocationCode}` }}</text>
- </view>
- <view class="col">
- <text class="label">调入:</text>
-
- <text class="desc">{{ `${item.inWarehouseAreaName}-${item.inWarehouseAreaGoodsCode}-${item.inGoodsAllocationCode}` }}</text>
- </view>
- </view>
-
- </view> -->
- </view>
- </view>
- <view
- class="approval-container"
- v-if="isApproval && baseInfo.auditStatus == 1"
- >
- <view class="approval_btn-wrapper">
- <text class="approval-btn refuse" @click="handleRefuse">驳回</text>
- <text class="approval-btn primary" @click="handlePass(true)">通过</text>
- </view>
- <uni-popup ref="inputDialog" type="dialog">
- <uni-popup-dialog
- ref="inputClose"
- mode="input"
- title="驳回原因"
- placeholder="请输入内容"
- :before-close="true"
- @close="handleClose"
- @confirm="timeoutCauseConfirm"
- ></uni-popup-dialog>
- </uni-popup>
- </view>
- </view>
- </template>
- <script>
- import { post, get, postJ } from '@/utils/api.js'
- import Approval from '@/components/Approval.vue'
- import AssetsCard from '@/pages/warehouse/inventoryAllocation/components/AssetsCard.vue'
- import Info from './components/Info'
- import Content from './components/Content'
- export default {
- components: {
- AssetsCard,
- Approval,
- Content,
- Info
- },
- data () {
- return {
- pickTabIndex: 0,
- accordionVal: '',
- options: {
- id: '',
- workOrderId: '',
- planType: '',
- devOpsType: ''
- },
- baseInfo: '',
- planEquiList: [],
- isApproval: false,
- dict: {
- bizScene: {
- 1: '生产调拨',
- 2: '采购调拨',
- 3: '赠送调拨',
- 4: '借用调拨',
- 5: '退还调拨',
- 6: '其他调拨'
- },
- urgent: {
- 1: '普通',
- 2: '重要',
- 3: '紧急'
- }
- }
- }
- },
- onLoad (options) {
- this.options = options
- this.isApproval = options.type === 'approval'
- },
- onShow () {
- this.getInfo()
- },
- methods: {
- //切换选项卡
- changeChartsTab (index) {
- this.pickTabIndex = index
- },
- getInfo () {
- get(
- this.apiUrl +
- `/conventionalStockTransfer/details/conventionalStockTransfer/${this.options.workOrderId}`
- ).then(res => {
- if (res?.success) {
- this.baseInfo = res.data.conventionalStockTransfer || {}
- this.planEquiList = res.data.stockTransferInfoList
- }
- })
- },
- // 审批
- handleRefuse () {
- this.$refs.inputDialog.open()
- },
- handleClose () {
- this.$refs.inputDialog.close()
- },
- handlePass (checked, cause) {
- const params = {
- approlId: this.options.id,
- handleResult: checked ? 2 : 0,
- bizId: this.options.workOrderId,
- handleCause: cause,
- handleStatus: 1
- }
- postJ(
- this.apiUrl + '/conventionalStockTransfer/changeStatus',
- params
- ).then(res => {
- if (res?.success) {
- uni.navigateTo({
- url: `/pages/home/backlog/result?type=${
- checked ? 'approve' : 'refuse'
- }&status=${this.devOpsType}`
- })
- }
- })
- },
- timeoutCauseConfirm (value) {
- if (!value) {
- uni.showToast({
- title: '请输入驳回原因',
- icon: 'none'
- })
- return
- }
- this.handlePass(false, value)
- this.$refs.inputDialog.close()
- }
- // 审批end
- }
- }
- </script>
- <style lang="scss" scoped>
- .tab-title {
- width: 100%;
- padding: 0 30rpx;
- margin-bottom: 12rpx;
- display: flex;
- height: $tab-height;
- line-height: $tab-height;
- background-color: #ffffff;
- border-bottom: 1px solid #f2f2f2;
- box-sizing: border-box;
- .tab-item {
- width: 30%;
- text-align: center;
- font-size: 32rpx;
- color: $uni-text-color-grey;
- }
- .tab-item.active {
- color: $j-primary-border-green;
- border-bottom: 1px solid $j-primary-border-green;
- }
- }
- .plan-approval-container {
- display: flex;
- flex-direction: column;
- padding-bottom: 80rpx;
- /deep/.uni-collapse-item {
- background-color: rgba(21, 122, 44, 0.372549019607843);
- }
- .content {
- flex: 1;
- overflow: auto;
- .baseinfo {
- padding: 0 22rpx;
- font-size: 28rpx;
- .col {
- display: flex;
- padding: 10rpx 0;
- border-bottom: 1rpx dashed #d7d7d7;
- .label {
- display: inline-block;
- width: 200rpx;
- text-align: right;
- margin-right: 20rpx;
- font-weight: bold;
- }
- .desc {
- flex: 1;
- word-break: break-all;
- }
- }
- }
- }
- .collapse-title {
- display: flex;
- justify-content: space-between;
- align-items: center;
- font-size: 28rpx;
- height: 80rpx;
- padding: 8rpx;
- box-sizing: border-box;
- }
- .collapse-item-wrapper {
- padding: 12rpx;
- .info-container {
- margin-bottom: 20rpx;
- display: flex;
- flex-wrap: wrap;
- .col {
- width: 50%;
- &.row {
- width: 100%;
- }
- }
- }
- }
- }
- .pd-list-item {
- padding: 10rpx;
- border-bottom: 1px solid #d7d7d7;
- .item {
- display: flex;
- font-size: 28rpx;
- justify-content: space-between;
- padding: 10rpx;
- }
- }
- .info-container {
- padding: 20rpx;
- border-bottom: 1px solid #f2f2f2;
- .title {
- font-size: 32rpx;
- color: #555;
- }
- .main-wrap {
- display: flex;
- flex-wrap: wrap;
- .col {
- color: #555;
- font-size: 28rpx;
- width: 50%;
- display: flex;
- padding: 20rpx 0;
- .label {
- margin-right: 10rpx;
- }
- }
- }
- }
- .approval-container {
- width: 100vw;
- height: 80rpx;
- .approval_btn-wrapper {
- display: flex;
- position: fixed;
- bottom: 0;
- width: 100vw;
- height: 80rpx;
- background-color: #fff;
- }
- .approval-btn {
- flex: 1;
- line-height: 78rpx;
- text-align: center;
- border: 1rpx solid $j-primary-border-green;
- &.refuse {
- color: red;
- }
- &.primary {
- background-color: $j-primary-border-green;
- color: #fff;
- }
- }
- }
- </style>
|