数量退料
This commit is contained in:
parent
2f8e602865
commit
5cc7a9f280
|
|
@ -1,39 +1,68 @@
|
|||
<template>
|
||||
<view>
|
||||
<view class="form-area">
|
||||
<view>
|
||||
<view class="view-item">
|
||||
<h4>类型名称</h4>
|
||||
<span>{{ upperInfo.typeName }}</span>
|
||||
</view>
|
||||
<view>
|
||||
<view class="view-item">
|
||||
<h4>规格型号</h4>
|
||||
<span>{{ upperInfo.typeCode }}</span>
|
||||
</view>
|
||||
<view>
|
||||
<view class="view-item">
|
||||
<h4>待入库数量</h4>
|
||||
<span>{{ upperInfo.num }}</span>
|
||||
</view>
|
||||
<view>
|
||||
<view class="view-item">
|
||||
<h4>合格数量</h4>
|
||||
<uni-easyinput
|
||||
type="number"
|
||||
v-model="lowerIpt.passedNum"
|
||||
placeholder="请输入数量"></uni-easyinput>
|
||||
</view>
|
||||
<view>
|
||||
<view class="view-item">
|
||||
<h4>待修数量</h4>
|
||||
<uni-easyinput
|
||||
type="number"
|
||||
v-model="lowerIpt.waitRepairNum"
|
||||
placeholder="请输入数量"></uni-easyinput>
|
||||
</view>
|
||||
<view>
|
||||
<view class="view-item">
|
||||
<h4>待修备注</h4>
|
||||
<uni-easyinput
|
||||
v-model="lowerIpt.repairRemark"
|
||||
placeholder="请输入待修备注"></uni-easyinput>
|
||||
</view>
|
||||
<view class="view-item">
|
||||
<h4>待报废数量</h4>
|
||||
<uni-easyinput
|
||||
type="number"
|
||||
v-model="lowerIpt.waitCrashNum"
|
||||
placeholder="请输入数量"></uni-easyinput>
|
||||
</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 class="sub-btn" @click="subForm"> 确认 </view>
|
||||
</view>
|
||||
|
|
@ -53,8 +82,16 @@
|
|||
passedNum: "",
|
||||
waitRepairNum: "",
|
||||
waitCrashNum: "",
|
||||
repairRemark: '', // 待修备注
|
||||
scrapReason: '', // 报废原因
|
||||
scrapRemark: '', // 报废备注
|
||||
fileList: [], // 附件
|
||||
},
|
||||
totalNum: 0,
|
||||
range: [
|
||||
{value: 1, text: '人为'},
|
||||
{value: 2, text: '自然损坏'},
|
||||
]
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
|
|
@ -102,6 +139,7 @@
|
|||
.backMaterialSetNumBack({
|
||||
taskId: this.upperInfo.taskId,
|
||||
arr: this.handleSubmitData(),
|
||||
fileList: this.lowerIpt.fileList,
|
||||
})
|
||||
.then((res) => {
|
||||
console.log("res===", res);
|
||||
|
|
@ -130,10 +168,13 @@
|
|||
let repairInfo = {
|
||||
backStatus: 2,
|
||||
backNum: this.lowerIpt.waitRepairNum,
|
||||
repairRemark: this.lowerIpt.repairRemark, // 待维修备注
|
||||
};
|
||||
let crashInfo = {
|
||||
backStatus: 3,
|
||||
backNum: this.lowerIpt.waitCrashNum,
|
||||
scrapReason: this.lowerIpt.scrapReason, // 报废原因
|
||||
scrapRemark: this.lowerIpt.scrapRemark, // 待报废备注
|
||||
};
|
||||
|
||||
if (this.lowerIpt.passedNum) {
|
||||
|
|
@ -159,6 +200,27 @@
|
|||
}
|
||||
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) {
|
||||
console.log("ev", params);
|
||||
|
|
@ -167,14 +229,14 @@
|
|||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
<style lang="scss" scoped>
|
||||
.form-area {
|
||||
width: 90%;
|
||||
margin: 40rpx auto;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
view {
|
||||
.view-item {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
|
@ -191,7 +253,7 @@
|
|||
}
|
||||
}
|
||||
|
||||
view:last-child {
|
||||
.view-item:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue