数量退料
This commit is contained in:
parent
2f8e602865
commit
5cc7a9f280
|
|
@ -1,39 +1,68 @@
|
||||||
<template>
|
<template>
|
||||||
<view>
|
<view>
|
||||||
<view class="form-area">
|
<view class="form-area">
|
||||||
<view>
|
<view class="view-item">
|
||||||
<h4>类型名称</h4>
|
<h4>类型名称</h4>
|
||||||
<span>{{ upperInfo.typeName }}</span>
|
<span>{{ upperInfo.typeName }}</span>
|
||||||
</view>
|
</view>
|
||||||
<view>
|
<view class="view-item">
|
||||||
<h4>规格型号</h4>
|
<h4>规格型号</h4>
|
||||||
<span>{{ upperInfo.typeCode }}</span>
|
<span>{{ upperInfo.typeCode }}</span>
|
||||||
</view>
|
</view>
|
||||||
<view>
|
<view class="view-item">
|
||||||
<h4>待入库数量</h4>
|
<h4>待入库数量</h4>
|
||||||
<span>{{ upperInfo.num }}</span>
|
<span>{{ upperInfo.num }}</span>
|
||||||
</view>
|
</view>
|
||||||
<view>
|
<view class="view-item">
|
||||||
<h4>合格数量</h4>
|
<h4>合格数量</h4>
|
||||||
<uni-easyinput
|
<uni-easyinput
|
||||||
type="number"
|
type="number"
|
||||||
v-model="lowerIpt.passedNum"
|
v-model="lowerIpt.passedNum"
|
||||||
placeholder="请输入数量"></uni-easyinput>
|
placeholder="请输入数量"></uni-easyinput>
|
||||||
</view>
|
</view>
|
||||||
<view>
|
<view class="view-item">
|
||||||
<h4>待修数量</h4>
|
<h4>待修数量</h4>
|
||||||
<uni-easyinput
|
<uni-easyinput
|
||||||
type="number"
|
type="number"
|
||||||
v-model="lowerIpt.waitRepairNum"
|
v-model="lowerIpt.waitRepairNum"
|
||||||
placeholder="请输入数量"></uni-easyinput>
|
placeholder="请输入数量"></uni-easyinput>
|
||||||
</view>
|
</view>
|
||||||
<view>
|
<view class="view-item">
|
||||||
|
<h4>待修备注</h4>
|
||||||
|
<uni-easyinput
|
||||||
|
v-model="lowerIpt.repairRemark"
|
||||||
|
placeholder="请输入待修备注"></uni-easyinput>
|
||||||
|
</view>
|
||||||
|
<view class="view-item">
|
||||||
<h4>待报废数量</h4>
|
<h4>待报废数量</h4>
|
||||||
<uni-easyinput
|
<uni-easyinput
|
||||||
type="number"
|
type="number"
|
||||||
v-model="lowerIpt.waitCrashNum"
|
v-model="lowerIpt.waitCrashNum"
|
||||||
placeholder="请输入数量"></uni-easyinput>
|
placeholder="请输入数量"></uni-easyinput>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="view-item">
|
||||||
|
<h4>报废原因</h4>
|
||||||
|
<uni-data-select
|
||||||
|
v-model="lowerIpt.scrapReason"
|
||||||
|
:localdata="range"
|
||||||
|
></uni-data-select>
|
||||||
|
</view>
|
||||||
|
<view class="view-item">
|
||||||
|
<h4>待报废备注</h4>
|
||||||
|
<uni-easyinput
|
||||||
|
v-model="lowerIpt.scrapRemark"
|
||||||
|
placeholder="请输入待报废备注"></uni-easyinput>
|
||||||
|
</view>
|
||||||
|
<div class="view-item">
|
||||||
|
<h4>附件</h4>
|
||||||
|
<uni-file-picker
|
||||||
|
v-model="lowerIpt.fileList"
|
||||||
|
@select="uploadPhoto"
|
||||||
|
@delete="deletePhoto"
|
||||||
|
limit="9"
|
||||||
|
:del-icon="false"
|
||||||
|
></uni-file-picker>
|
||||||
|
</div>
|
||||||
</view>
|
</view>
|
||||||
<view class="sub-btn" @click="subForm"> 确认 </view>
|
<view class="sub-btn" @click="subForm"> 确认 </view>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -53,8 +82,16 @@
|
||||||
passedNum: "",
|
passedNum: "",
|
||||||
waitRepairNum: "",
|
waitRepairNum: "",
|
||||||
waitCrashNum: "",
|
waitCrashNum: "",
|
||||||
|
repairRemark: '', // 待修备注
|
||||||
|
scrapReason: '', // 报废原因
|
||||||
|
scrapRemark: '', // 报废备注
|
||||||
|
fileList: [], // 附件
|
||||||
},
|
},
|
||||||
totalNum: 0,
|
totalNum: 0,
|
||||||
|
range: [
|
||||||
|
{value: 1, text: '人为'},
|
||||||
|
{value: 2, text: '自然损坏'},
|
||||||
|
]
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
@ -102,6 +139,7 @@
|
||||||
.backMaterialSetNumBack({
|
.backMaterialSetNumBack({
|
||||||
taskId: this.upperInfo.taskId,
|
taskId: this.upperInfo.taskId,
|
||||||
arr: this.handleSubmitData(),
|
arr: this.handleSubmitData(),
|
||||||
|
fileList: this.lowerIpt.fileList,
|
||||||
})
|
})
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
console.log("res===", res);
|
console.log("res===", res);
|
||||||
|
|
@ -130,10 +168,13 @@
|
||||||
let repairInfo = {
|
let repairInfo = {
|
||||||
backStatus: 2,
|
backStatus: 2,
|
||||||
backNum: this.lowerIpt.waitRepairNum,
|
backNum: this.lowerIpt.waitRepairNum,
|
||||||
|
repairRemark: this.lowerIpt.repairRemark, // 待维修备注
|
||||||
};
|
};
|
||||||
let crashInfo = {
|
let crashInfo = {
|
||||||
backStatus: 3,
|
backStatus: 3,
|
||||||
backNum: this.lowerIpt.waitCrashNum,
|
backNum: this.lowerIpt.waitCrashNum,
|
||||||
|
scrapReason: this.lowerIpt.scrapReason, // 报废原因
|
||||||
|
scrapRemark: this.lowerIpt.scrapRemark, // 待报废备注
|
||||||
};
|
};
|
||||||
|
|
||||||
if (this.lowerIpt.passedNum) {
|
if (this.lowerIpt.passedNum) {
|
||||||
|
|
@ -159,6 +200,27 @@
|
||||||
}
|
}
|
||||||
return list;
|
return list;
|
||||||
},
|
},
|
||||||
|
uploadPhoto (e) {
|
||||||
|
this.lowerIpt.fileList = []
|
||||||
|
console.log('🚀 ~ uploadPhoto ~ e:', e)
|
||||||
|
let that = this
|
||||||
|
// 上传图片
|
||||||
|
for (let i = 0; i < e.tempFilePaths.length; i++) {
|
||||||
|
that.$api.fix.uploadPic(e.tempFilePaths[i]).then(res => {
|
||||||
|
let dealedData = JSON.parse(res.data)
|
||||||
|
if (dealedData.code == 200) {
|
||||||
|
this.lowerIpt.fileList.push({
|
||||||
|
fileName: dealedData.data.fileName,
|
||||||
|
fileUrl: dealedData.data.fileUrl,
|
||||||
|
typeId: this.upperInfo.modelId,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
console.log('🚀 ~ this.lowerIpt.fileList ~ e:', this.lowerIpt.fileList)
|
||||||
|
}).catch(err => {
|
||||||
|
console.log(err);
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
},
|
},
|
||||||
onLoad(params) {
|
onLoad(params) {
|
||||||
console.log("ev", params);
|
console.log("ev", params);
|
||||||
|
|
@ -167,14 +229,14 @@
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss" scoped>
|
||||||
.form-area {
|
.form-area {
|
||||||
width: 90%;
|
width: 90%;
|
||||||
margin: 40rpx auto;
|
margin: 40rpx auto;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
|
||||||
view {
|
.view-item {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
@ -191,7 +253,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
view:last-child {
|
.view-item:last-child {
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue