|
@@ -1,7 +1,7 @@
|
|
<template>
|
|
<template>
|
|
<view class="replenishment-detail-wrap">
|
|
<view class="replenishment-detail-wrap">
|
|
<u-navbar back-text="补货单详情" :border-bottom="false" :background="{backgroundColor: $config('primaryColor')}" back-icon-color="#fff" :back-text-style="{ color: '#fff' }">
|
|
<u-navbar back-text="补货单详情" :border-bottom="false" :background="{backgroundColor: $config('primaryColor')}" back-icon-color="#fff" :back-text-style="{ color: '#fff' }">
|
|
- <view slot='right' style="padding: 0 30upx;color: #ffffff;" v-if="pageType=='success'">
|
|
|
|
|
|
+ <view slot='right' style="padding: 0 30upx;color: #ffffff;" @click="creatSalesOrder" v-if="pageType=='success'">
|
|
<u-icon name="chuangjiandingdan" custom-prefix="iscm-icon"></u-icon>
|
|
<u-icon name="chuangjiandingdan" custom-prefix="iscm-icon"></u-icon>
|
|
<text style="margin-left: 6rpx;">生成销售单</text>
|
|
<text style="margin-left: 6rpx;">生成销售单</text>
|
|
</view>
|
|
</view>
|
|
@@ -33,22 +33,69 @@
|
|
</view>
|
|
</view>
|
|
<view class="part-list">
|
|
<view class="part-list">
|
|
<!-- 补货产品 -->
|
|
<!-- 补货产品 -->
|
|
- <partList :list="partList" title="补货产品" model="view" :fromPage="pageType=='success'?'replenishmentDetail':'replenishmentDetailc'" ref="partList" noDataText="暂无产品"></partList>
|
|
|
|
|
|
+ <partList :list="partList" title="配件列表" model="view" :fromPage="pageType=='success'?'replenishmentDetail':'replenishmentDetailc'" ref="partList" noDataText="暂无产品"></partList>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
|
|
+ <!-- 生成销售单 -->
|
|
|
|
+ <common-modal v-if="confirmModal" :showTitle="false" :openModal="confirmModal" @confirm="modalConfirm" @close="confirmModal=false">
|
|
|
|
+ <view style="font-size: 28upx;">
|
|
|
|
+ <view style="padding: 10upx;" class="flex align_center justify_between">
|
|
|
|
+ <view>产品总款数:<text style="color: red;">5</text></view>
|
|
|
|
+ <view>产品总件数:<text style="color: red;">15</text></view>
|
|
|
|
+ </view>
|
|
|
|
+ <view v-if="salesOrderList.length">
|
|
|
|
+ <view style="padding: 0 10upx 10upx;">此补货单已经存在对应的销售单?</view>
|
|
|
|
+ <view style="padding: 0 10upx 20upx;">确认再次生成销售单吗?</view>
|
|
|
|
+ <view>
|
|
|
|
+ <view
|
|
|
|
+ v-for="item in salesOrderList"
|
|
|
|
+ :key="item.id"
|
|
|
|
+ style="color: #00aaff;border-bottom: 1px solid #eee;padding: 10upx 0;"
|
|
|
|
+ class="flex align_center justify_between">
|
|
|
|
+ <text>{{item.orderNo}}</text>
|
|
|
|
+ <view>
|
|
|
|
+ <u-icon name="arrow-right"></u-icon>
|
|
|
|
+ </view>
|
|
|
|
+ </view>
|
|
|
|
+ </view>
|
|
|
|
+ </view>
|
|
|
|
+ <view v-else>
|
|
|
|
+ <view style="padding: 0 10upx 20upx;">确认生成销售单?</view>
|
|
|
|
+ <view>
|
|
|
|
+ <view
|
|
|
|
+ v-for="item in salesOrderList" :key="item.id"
|
|
|
|
+ style="color: #00aaff;border-bottom: 1px solid #eee;padding: 10upx 0;"
|
|
|
|
+ class="flex align_center justify_between">
|
|
|
|
+ <text>{{item.orderNo}}</text>
|
|
|
|
+ <view>
|
|
|
|
+ <u-icon name="arrow-right"></u-icon>
|
|
|
|
+ </view>
|
|
|
|
+ </view>
|
|
|
|
+ </view>
|
|
|
|
+ </view>
|
|
|
|
+ </view>
|
|
|
|
+ </common-modal>
|
|
</view>
|
|
</view>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
- import { shelfReplenishDetail, shelfReplenishDetailList, shelfReplenishPutStock } from '@/api/shelfReplenish'
|
|
|
|
|
|
+ import {
|
|
|
|
+ shelfReplenishDetail,
|
|
|
|
+ shelfReplenishDetailList,
|
|
|
|
+ shelfReplenishPutStock,
|
|
|
|
+ queryRelationSalesBill,
|
|
|
|
+ createSalesBill} from '@/api/shelfReplenish'
|
|
import partList from '@/pages/common/partList.vue'
|
|
import partList from '@/pages/common/partList.vue'
|
|
|
|
+ import commonModal from '@/pages/common/commonModal.vue'
|
|
export default {
|
|
export default {
|
|
- components: { partList },
|
|
|
|
|
|
+ components: { partList, commonModal },
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
|
|
+ confirmModal: false,
|
|
replenishBillSn: '',
|
|
replenishBillSn: '',
|
|
basicInfoData:null,
|
|
basicInfoData:null,
|
|
partList: [],
|
|
partList: [],
|
|
|
|
+ salesOrderList:[],
|
|
customStyle: {
|
|
customStyle: {
|
|
borderRadius:'100rpx',
|
|
borderRadius:'100rpx',
|
|
fontSize:'30rpx',
|
|
fontSize:'30rpx',
|
|
@@ -68,6 +115,7 @@
|
|
this.pageType = option.type
|
|
this.pageType = option.type
|
|
this.getDetail()
|
|
this.getDetail()
|
|
this.getPartList()
|
|
this.getPartList()
|
|
|
|
+ this.getSalesOrder()
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
// 查询详情
|
|
// 查询详情
|
|
@@ -91,6 +139,30 @@
|
|
this.partList = []
|
|
this.partList = []
|
|
}
|
|
}
|
|
})
|
|
})
|
|
|
|
+ },
|
|
|
|
+ // 查询关联销售单
|
|
|
|
+ getSalesOrder () {
|
|
|
|
+ queryRelationSalesBill({ replenishBillSn: this.replenishBillSn }).then(res => {
|
|
|
|
+ if (res.status == 200) {
|
|
|
|
+ this.salesOrderList = res.data
|
|
|
|
+ } else {
|
|
|
|
+ this.salesOrderList = []
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ // 生成销售单
|
|
|
|
+ creatSalesOrder(){
|
|
|
|
+ this.confirmModal = true
|
|
|
|
+ },
|
|
|
|
+ modalConfirm(){
|
|
|
|
+ this.showLoading("正在生成销售单...")
|
|
|
|
+ createSalesBill({ replenishBillSn: this.replenishBillSn }).then(res => {
|
|
|
|
+ if (res.status == 200) {
|
|
|
|
+ this.getSalesOrder()
|
|
|
|
+ }
|
|
|
|
+ this.toashMsg(res.message)
|
|
|
|
+ uni.hideLoading()
|
|
|
|
+ })
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|