|
@@ -19,26 +19,61 @@
|
|
|
</view>
|
|
|
<view class="part-list">
|
|
|
<!-- 配件列表 -->
|
|
|
- <partList title="配件列表" fromPage="recall" ref="partList" :list="partList" @allChecked="allCheckedCallback"></partList>
|
|
|
+ <!-- <partList title="配件列表" fromPage="recall" ref="partList" :list="partList" @allChecked="allCheckedCallback"></partList> -->
|
|
|
+ <partList title="配件列表" fromPage="recall" ref="partList" :list="partList"></partList>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="cancelStockPages-footer">
|
|
|
- <view>
|
|
|
- <u-checkbox size="40" @change="allCheckeChange" v-model="allChecked" shape="circle">{{allChecked?'取消全选':'全选'}}</u-checkbox>
|
|
|
- </view>
|
|
|
- <view>
|
|
|
- <u-button @click="submit" shape="circle" :custom-style="{background:$config('primaryColor')}" type="primary">确定退库</u-button>
|
|
|
- </view>
|
|
|
+ <u-button @click="submit" shape="circle" :custom-style="{background:$config('primaryColor')}" type="primary">确定退库</u-button>
|
|
|
</view>
|
|
|
<!-- 确认弹框 -->
|
|
|
<common-modal :openModal="confirmModal" content="调回产品将退回至经销商仓库,确认退库吗?" confirmText="确认退库" @confirm="modalConfirm" @close="confirmModal=false" />
|
|
|
+ <!-- 生成销售退货单弹窗 -->
|
|
|
+ <common-modal :showTitle="false" :openModal="refundModal" @confirm="refundModalConfirm" @close="refundModal=false">
|
|
|
+ <view style="font-size: 28upx;">
|
|
|
+ <view style="padding: 10upx;" class="flex align_center justify_between" v-if="basicInfoData">
|
|
|
+ <view>产品总款数:<text style="color: red;">{{basicInfoData.totalCategory}}</text></view>
|
|
|
+ <view>产品总件数:<text style="color: red;">{{basicInfoData.totalQty}}</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.salesReturnNo}}</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>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
import commonModal from '@/pages/common/commonModal.vue'
|
|
|
import partList from '@/pages/common/partList.vue'
|
|
|
- import { shelfRecallFindBySn, shelfRecallDetail, shelfRecallConfirm } from '@/api/shelfRecall.js'
|
|
|
+ import { shelfRecallFindBySn, shelfRecallDetail, shelfRecallConfirm,generateSaleReturnBill } from '@/api/shelfRecall.js'
|
|
|
export default {
|
|
|
components: { commonModal, partList },
|
|
|
data() {
|
|
@@ -48,6 +83,8 @@
|
|
|
basicInfoData: null,
|
|
|
partList: [],
|
|
|
confirmModal: false,
|
|
|
+ refundModal:false,
|
|
|
+ salesOrderList:[]
|
|
|
}
|
|
|
},
|
|
|
onReady() {
|
|
@@ -61,6 +98,9 @@
|
|
|
this.getDetail()
|
|
|
this.getPartList()
|
|
|
},
|
|
|
+ onNavigationBarButtonTap(){
|
|
|
+ this.refundModal = true;
|
|
|
+ },
|
|
|
methods: {
|
|
|
// 全选
|
|
|
// allCheckeChange(e){
|
|
@@ -74,9 +114,11 @@
|
|
|
shelfRecallFindBySn({sn: this.recallBillSn}).then(res => {
|
|
|
if(res.status == 200){
|
|
|
this.basicInfoData = res.data || null
|
|
|
+ this.salesOrderList = res.data.salesReturnBillList ? res.data.salesReturnBillList:[];
|
|
|
}else{
|
|
|
this.basicInfoData = null
|
|
|
}
|
|
|
+
|
|
|
})
|
|
|
},
|
|
|
// 查询配件列表
|
|
@@ -95,18 +137,19 @@
|
|
|
},
|
|
|
// 确定退货
|
|
|
submit(){
|
|
|
- const result =this.$refs.partList.getAllChecked()
|
|
|
- if(result.length){
|
|
|
- this.confirmModal = true
|
|
|
- }else{
|
|
|
- this.toashMsg("请选择配件!")
|
|
|
- }
|
|
|
+ this.confirmModal = true
|
|
|
+ // const result =this.$refs.partList.getAllChecked()
|
|
|
+ // if(result.length){
|
|
|
+ // this.confirmModal = true
|
|
|
+ // }else{
|
|
|
+ // this.toashMsg("请选择配件!")
|
|
|
+ // }
|
|
|
},
|
|
|
// 确认退库 confirm
|
|
|
modalConfirm(){
|
|
|
- const result =this.$refs.partList.getAllChecked()
|
|
|
+ // const result =this.$refs.partList.getAllChecked()
|
|
|
const arr = []
|
|
|
- result.map((item, index) => {
|
|
|
+ this.partList.map((item, index) => {
|
|
|
if (item.confirmQty || item.confirmQty == 0) {
|
|
|
arr.push({
|
|
|
productSn: item.productSn,
|
|
@@ -128,6 +171,22 @@
|
|
|
}
|
|
|
this.toashMsg(res.message)
|
|
|
})
|
|
|
+ },
|
|
|
+ // 生成销售退货单
|
|
|
+ refundModalConfirm(){
|
|
|
+ generateSaleReturnBill({ recallBillSn: this.recallBillSn }).then(res => {
|
|
|
+ if (res.status == 200) {
|
|
|
+ uni.showToast({
|
|
|
+ title:res.message
|
|
|
+ })
|
|
|
+ this.refundModal = false
|
|
|
+ }else{
|
|
|
+ uni.showToast({
|
|
|
+ title:res.message,
|
|
|
+ icon:'none'
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -196,18 +255,15 @@
|
|
|
}
|
|
|
}
|
|
|
.cancelStockPages-footer{
|
|
|
- padding: 26upx 32upx 30upx;
|
|
|
+ padding: 20upx 32upx 26upx;
|
|
|
background-color: #fff;
|
|
|
position: fixed;
|
|
|
left: 0;
|
|
|
bottom: 0;
|
|
|
width: 100%;
|
|
|
box-shadow: 3px 1px 7px #eee;
|
|
|
- display: flex;
|
|
|
- justify-content: space-between;
|
|
|
- align-items: center;
|
|
|
.button{
|
|
|
- width: 45%;
|
|
|
+ width: 100%;
|
|
|
}
|
|
|
}
|
|
|
}
|