|
|
@@ -3,30 +3,55 @@
|
|
|
<button class="admin-button-com big blue" style="width:80%;" @click="goBack">返回</button>
|
|
|
<view v-if="!$util.isEmpty(itemList)" style="margin-top:20upx;">
|
|
|
<block v-for="(item, index) in itemList" :key="index">
|
|
|
- <view style="text-align:center;margin-bottom:10upx;">
|
|
|
+ <view style="text-align:center;margin-bottom:10upx;" v-if="item.xhUnitType == 0">
|
|
|
<text style="font-size:30upx;">{{item.name}} 已退{{item.xhNum}}{{item.xhUnitName}}</text>
|
|
|
- <button class="admin-button-com middle" style="margin:10upx auto 0 auto;" @click="wastage(item)">报损</button>
|
|
|
+ <button class="admin-button-com middle" style="margin:10upx auto 0 auto;" @click="beginWastage(item)">报损</button>
|
|
|
</view>
|
|
|
</block>
|
|
|
</view>
|
|
|
+
|
|
|
+ <modal-module :show="wastageLabelShow" @click="confirmWastage" :maskClosable="true" title="数量" padding="30rpx 30rpx" >
|
|
|
+ <template v-slot:content>
|
|
|
+ <div class="app-modal-input-wrap">
|
|
|
+ <div class="inp-list-line">
|
|
|
+ <div class="line-input">
|
|
|
+ <input type="number" ref="input" style="width:61.8%;text-align:center;" @blur="blur" v-model="wastageNum" :adjust-position="false" class="inp-input" />
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </modal-module>
|
|
|
+
|
|
|
</appResult>
|
|
|
</template>
|
|
|
<script>
|
|
|
import appResult from "@/components/app-result";
|
|
|
-import { refundDetail } from "@/api/refund";
|
|
|
+import { refundDetail,refundWaste } from "@/api/refund";
|
|
|
+import ModalModule from "@/components/plugin/modal"
|
|
|
export default {
|
|
|
name: "commonSuccess",
|
|
|
components: {
|
|
|
- appResult
|
|
|
+ appResult,
|
|
|
+ ModalModule
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
title:'操作成功',
|
|
|
info:[],
|
|
|
- itemList:[]
|
|
|
+ itemList:[],
|
|
|
+ wastageItemId:0,
|
|
|
+ wastagePtItemId:0,
|
|
|
+ wastageLabelShow:false,
|
|
|
+ wastageNum:0
|
|
|
};
|
|
|
},
|
|
|
methods: {
|
|
|
+ beginWastage(item){
|
|
|
+ this.wastageLabelShow = true
|
|
|
+ this.wastageNum = item.xhNum
|
|
|
+ this.wastageItemId = item.productId
|
|
|
+ this.wastagePtItemId = item.itemId
|
|
|
+ },
|
|
|
init(){
|
|
|
let that = this
|
|
|
refundDetail({ id: this.option.id }).then(res=>{
|
|
|
@@ -37,8 +62,24 @@ export default {
|
|
|
goBack() {
|
|
|
uni.navigateBack({})
|
|
|
},
|
|
|
- wastage(){
|
|
|
-
|
|
|
+ hideWaste(){
|
|
|
+ this.wastageLabelShow = false
|
|
|
+ this.wastageNum = 0
|
|
|
+ this.wastageItemId = 0
|
|
|
+ this.wastagePtItemId = 0
|
|
|
+ },
|
|
|
+ confirmWastage(val){
|
|
|
+ if (val.index === 0) {
|
|
|
+ this.cancelWaste()
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ let that = this
|
|
|
+ let product = [{"productId":this.wastageItemId,"bigNum":this.wastageNum,"smallNum":0,"classId":0,"itemId":this.wastagePtItemId,"ratio":0}]
|
|
|
+ refundWaste({product:JSON.stringify(product),remark:'退货时报损'}).then(res=>{
|
|
|
+ if(res.code == 1){
|
|
|
+ that.hideWaste()
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
},
|
|
|
};
|