|
@@ -19,7 +19,7 @@
|
|
|
</view>
|
|
|
<view class="part-list">
|
|
|
<!-- 配件列表 -->
|
|
|
- <partList ref="partList" :list="partList" @allChecked="allCheckedCallback"></partList>
|
|
|
+ <partList title="配件列表" ref="partList" :list="partList" @allChecked="allCheckedCallback"></partList>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="cancelStockPages-footer">
|
|
@@ -27,14 +27,14 @@
|
|
|
<u-checkbox size="40" @change="allCheckeChange" v-model="allChecked" shape="circle">{{allChecked?'取消全选':'全选'}}</u-checkbox>
|
|
|
</view>
|
|
|
<view>
|
|
|
- <u-button shape="circle" :custom-style="{background:$config('primaryColor')}" type="primary">确定退库</u-button>
|
|
|
+ <u-button @click="submit" shape="circle" :custom-style="{background:$config('primaryColor')}" type="primary">确定退库</u-button>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
- import { shelfRecallFindBySn, detailQueryCount, shelfRecallDetail } from '@/api/shelfRecall.js'
|
|
|
+ import { shelfRecallFindBySn, detailQueryCount, shelfRecallDetail, shelfRecallConfirm } from '@/api/shelfRecall.js'
|
|
|
import partList from '../common/partList.vue'
|
|
|
export default {
|
|
|
components: {
|
|
@@ -67,6 +67,7 @@
|
|
|
allCheckedCallback(val){
|
|
|
this.allChecked = val
|
|
|
},
|
|
|
+ // 查询详情
|
|
|
getDetail(){
|
|
|
shelfRecallFindBySn({sn:this.recallBillSn}).then(res => {
|
|
|
if(res.status == 200){
|
|
@@ -74,12 +75,28 @@
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
+ // 查询配件列表
|
|
|
getPartList(){
|
|
|
shelfRecallDetail({recallBillSn:this.recallBillSn}).then(res => {
|
|
|
if(res.status == 200){
|
|
|
this.partList = res.data.data
|
|
|
}
|
|
|
})
|
|
|
+ },
|
|
|
+ // 确定退货
|
|
|
+ submit(){
|
|
|
+ const result =this.$refs.partList.getAllChecked()
|
|
|
+ if(result.length){
|
|
|
+ shelfRecallConfirm().then(res => {
|
|
|
+ if(res.status == 200){
|
|
|
+ uni.$emit("refreshBL")
|
|
|
+ uni.navigateBack()
|
|
|
+ }
|
|
|
+ this.toashMsg(res.message)
|
|
|
+ })
|
|
|
+ }else{
|
|
|
+ this.toashMsg("请选择配件!")
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|