|
|
|
@ -155,7 +155,6 @@ |
|
|
|
label="已入库数量" |
|
|
|
label="已入库数量" |
|
|
|
v-if="sizeForm.option == 1" |
|
|
|
v-if="sizeForm.option == 1" |
|
|
|
> |
|
|
|
> |
|
|
|
|
|
|
|
|
|
|
|
</el-table-column> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="theInboundQuantity" label="本次入库数量"> |
|
|
|
<el-table-column prop="theInboundQuantity" label="本次入库数量"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
@ -392,8 +391,12 @@ |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<span slot="footer" class="dialog-footer" v-if="!allDisabled"> |
|
|
|
<span slot="footer" class="dialog-footer" v-if="!allDisabled"> |
|
|
|
<el-button @click="handleCloseDetail()">取 消</el-button> |
|
|
|
<el-button @click="handleCloseDetail()">取 消</el-button> |
|
|
|
<el-button type="primary" @click="submit(1)" :loading="isSubmitting">暂存</el-button> |
|
|
|
<el-button type="primary" @click="submit(1)" :loading="isSubmitting" |
|
|
|
<el-button type="primary" @click="submit(2)" :loading="isSubmitting">提交</el-button> |
|
|
|
>暂存</el-button |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<el-button type="primary" @click="submit(2)" :loading="isSubmitting" |
|
|
|
|
|
|
|
>提交</el-button |
|
|
|
|
|
|
|
> |
|
|
|
</span> |
|
|
|
</span> |
|
|
|
</el-dialog> |
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
|
|
|
|
@ -465,7 +468,7 @@ export default { |
|
|
|
}, |
|
|
|
}, |
|
|
|
data() { |
|
|
|
data() { |
|
|
|
return { |
|
|
|
return { |
|
|
|
isSubmitting:false, |
|
|
|
isSubmitting: false, |
|
|
|
inDialogVisible: false, |
|
|
|
inDialogVisible: false, |
|
|
|
sizeForm: { |
|
|
|
sizeForm: { |
|
|
|
orderNo: "", //入库单号 |
|
|
|
orderNo: "", //入库单号 |
|
|
|
@ -526,11 +529,24 @@ export default { |
|
|
|
(item) => |
|
|
|
(item) => |
|
|
|
item.materialCode === stat.materialCode && item.type === stat.type |
|
|
|
item.materialCode === stat.materialCode && item.type === stat.type |
|
|
|
); |
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (stat.type == "YH") { |
|
|
|
|
|
|
|
stat.theInboundQuantity = detail.theInboundQuantity; //本次入库数量 |
|
|
|
|
|
|
|
stat.totalQuantity = stat.num + detail.theInboundQuantity; |
|
|
|
|
|
|
|
stat.unitPrice = detail.unitPrice; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (stat.type == "NY" && stat.num == 0) { |
|
|
|
|
|
|
|
stat.theInboundQuantity = detail.theInboundQuantity; //本次入库数量 |
|
|
|
|
|
|
|
stat.totalQuantity = stat.num + detail.theInboundQuantity; |
|
|
|
|
|
|
|
stat.unitPrice = detail.unitPrice; |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
stat.theInboundQuantity = 0; //本次入库数 |
|
|
|
|
|
|
|
stat.unitPrice = stat.unitPrice; |
|
|
|
|
|
|
|
stat.totalQuantity = stat.num + detail.theInboundQuantity; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return { |
|
|
|
return { |
|
|
|
...stat, |
|
|
|
...stat, |
|
|
|
theInboundQuantity: detail.theInboundQuantity, //本次入库数量 |
|
|
|
|
|
|
|
unitPrice: detail.unitPrice, |
|
|
|
|
|
|
|
totalQuantity: stat.num + detail.theInboundQuantity, |
|
|
|
|
|
|
|
}; |
|
|
|
}; |
|
|
|
}); |
|
|
|
}); |
|
|
|
}); |
|
|
|
}); |
|
|
|
@ -544,11 +560,23 @@ export default { |
|
|
|
(item) => |
|
|
|
(item) => |
|
|
|
item.materialId === stat.materialId && item.type === stat.type |
|
|
|
item.materialId === stat.materialId && item.type === stat.type |
|
|
|
); |
|
|
|
); |
|
|
|
|
|
|
|
if (stat.type == "YH") { |
|
|
|
|
|
|
|
stat.theInboundQuantity = detail.theInboundQuantity; //本次入库数量 |
|
|
|
|
|
|
|
stat.totalQuantity = stat.num + detail.theInboundQuantity; |
|
|
|
|
|
|
|
stat.unitPrice = detail.unitPrice; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (stat.type == "NY" && stat.num == 0) { |
|
|
|
|
|
|
|
stat.theInboundQuantity = detail.theInboundQuantity; //本次入库数量 |
|
|
|
|
|
|
|
stat.totalQuantity = stat.num + detail.theInboundQuantity; |
|
|
|
|
|
|
|
stat.unitPrice = detail.unitPrice; |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
stat.theInboundQuantity = 0; //本次入库数 |
|
|
|
|
|
|
|
stat.unitPrice = stat.unitPrice; |
|
|
|
|
|
|
|
stat.totalQuantity = stat.num + detail.theInboundQuantity; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return { |
|
|
|
return { |
|
|
|
...stat, |
|
|
|
...stat, |
|
|
|
theInboundQuantity: detail.theInboundQuantity, //本次入库数量 |
|
|
|
|
|
|
|
unitPrice: detail.unitPrice, |
|
|
|
|
|
|
|
totalQuantity: stat.num + detail.theInboundQuantity, |
|
|
|
|
|
|
|
}; |
|
|
|
}; |
|
|
|
}); |
|
|
|
}); |
|
|
|
}); |
|
|
|
}); |
|
|
|
@ -844,7 +872,7 @@ export default { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// status == 1 暂存 ,2提交 |
|
|
|
// status == 1 暂存 ,2提交 |
|
|
|
this.isSubmitting = true |
|
|
|
this.isSubmitting = true; |
|
|
|
this.sizeForm.status = index; |
|
|
|
this.sizeForm.status = index; |
|
|
|
if (this.sizeForm.option == 1) { |
|
|
|
if (this.sizeForm.option == 1) { |
|
|
|
// this.sizeForm.singleData = []; |
|
|
|
// this.sizeForm.singleData = []; |
|
|
|
@ -868,13 +896,13 @@ export default { |
|
|
|
// 提交成功后通知父组件更新页面 |
|
|
|
// 提交成功后通知父组件更新页面 |
|
|
|
this.$emit("submitSuccess"); |
|
|
|
this.$emit("submitSuccess"); |
|
|
|
this.handleCloseDetail(); |
|
|
|
this.handleCloseDetail(); |
|
|
|
this.isSubmitting = false |
|
|
|
this.isSubmitting = false; |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
this.$message.error(res.data.message); |
|
|
|
this.$message.error(res.data.message); |
|
|
|
this.isSubmitting = false |
|
|
|
this.isSubmitting = false; |
|
|
|
} |
|
|
|
} |
|
|
|
} catch (error) { |
|
|
|
} catch (error) { |
|
|
|
this.isSubmitting = false |
|
|
|
this.isSubmitting = false; |
|
|
|
this.$message.error(error.message); |
|
|
|
this.$message.error(error.message); |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
@ -884,7 +912,7 @@ export default { |
|
|
|
this.batchType = ""; |
|
|
|
this.batchType = ""; |
|
|
|
this.sizeForm.inTableData = []; |
|
|
|
this.sizeForm.inTableData = []; |
|
|
|
this.sizeForm.singleData = []; |
|
|
|
this.sizeForm.singleData = []; |
|
|
|
this.sizeForm.purchaseEndInfo = ""; |
|
|
|
this.sizeForm.purchaseEndInfo = ""; |
|
|
|
if (this.sizeForm.option == 1) { |
|
|
|
if (this.sizeForm.option == 1) { |
|
|
|
this.inBatchDialogVisible = true; |
|
|
|
this.inBatchDialogVisible = true; |
|
|
|
} |
|
|
|
} |
|
|
|
|