问题修改

master
zhangdi 2 months ago
parent 6455f45a9d
commit 359cd02a56
  1. 162
      src/views/firstOrder/components/inDialog.vue
  2. 2
      src/views/firstOrder/inbound.vue

@ -151,13 +151,11 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="inboundQuantity" prop="yetInboundQuantity"
label="已入库数量" label="已入库数量"
v-if="sizeForm.option == 1" v-if="sizeForm.option == 1"
> >
<template slot-scope="scope">
{{ scope.row.inboundQuantity || 0 }}
</template>
</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">
@ -272,6 +270,9 @@
label="已入库数量" label="已入库数量"
v-if="sizeForm.option == 1" v-if="sizeForm.option == 1"
> >
<template slot-scope="scope">
{{ scope.row.inboundQuantity || 0 }}
</template>
</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">
@ -305,134 +306,6 @@
<div class="form-title" v-if="inDialogType !== 'details'"> <div class="form-title" v-if="inDialogType !== 'details'">
入库账目表格 入库账目表格
</div> </div>
<!-- 批量选择 -->
<!-- <el-table :data="sizeForm.inTableData" border style="width: 100%"
v-show="sizeForm.option == 1 && inDialogType !== 'details'">
<el-table-column prop="date" label="当前库存">
<el-table-column prop="inboundDetailCode" label="入库明细单号" v-if="inDialogType == 'details'">
</el-table-column>
<el-table-column prop="materialCode" label="物资编码">
</el-table-column>
<el-table-column prop="materialName" label="物资名称">
</el-table-column>
<el-table-column prop="model" label="规格">
</el-table-column>
<el-table-column prop="unit" label="单位">
</el-table-column>
<el-table-column prop="type" label="类别">
<template slot-scope="scope">
{{ scope.row.type === "NY" ? "耐用品" : (scope.row.type === "YH" ? "易耗品" : "") }}
</template>
</el-table-column>
<el-table-column prop="inboundQuantity" label="数量">
<template slot-scope="scope">
{{ scope.row.inboundQuantity || 0 }}
</template>
</el-table-column>
<el-table-column prop="unitPrice" label="单价">
<template slot-scope="scope">
<span v-if='scope.row.type === "YH"'>-</span>
<span v-else>{{ scope.row.unitPrice || 0 }}</span>
</template>
</el-table-column>
</el-table-column>
<el-table-column prop="date" label="入库信息">
<el-table-column prop="theInboundQuantity" label="数量">
</el-table-column>
<el-table-column prop="unitPrice" label="单价">
<template slot-scope="scope">
<span v-if='scope.row.type === "YH"'>-</span>
<span v-else>{{ scope.row.unitPrice || 0 }}</span>
</template>
</el-table-column>
</el-table-column>
<el-table-column prop="date" label="入库后库存">
<el-table-column label="数量">
<template slot-scope="scope">
{{ Number(scope.row.inboundQuantity || 0) + Number(scope.row.theInboundQuantity || 0) }}
</template>
</el-table-column>
<el-table-column prop="unitPrice" label="单价">
<template slot-scope="scope">
<span v-if='scope.row.type === "YH"'>-</span>
<span v-else>{{ scope.row.unitPrice || 0 }}</span>
</template>s
</el-table-column>
</el-table-column>
<el-table-column prop="date" label="入库信息">
<el-table-column label="入库人">
<template slot-scope="scope">
{{ scope.row.userInfoVO ? scope.row.userInfoVO.name : sizeForm.userInfoVO.name }}
</template>
</el-table-column>
<el-table-column prop="inDate" label="入库时间" width="150">
<template slot-scope="scope">
{{ inDate }}
</template>
</el-table-column>
</el-table-column>
</el-table> -->
<!-- 单项选择 -->
<!-- <el-table :data="sizeForm.singleData" border style="width: 100%"
v-show="sizeForm.option == 2 && inDialogType !== 'details'">
<el-table-column prop="date" label="当前库存">
<el-table-column prop="inboundDetailCode" label="入库明细单号" v-if="inDialogType == 'details'">
</el-table-column>
<el-table-column prop="materialCode" label="物资编码">
</el-table-column>
<el-table-column prop="materialName" label="物资名称">
</el-table-column>
<el-table-column prop="model" label="规格"></el-table-column>
<el-table-column prop="type" label="类别">
<template slot-scope="scope">
{{ scope.row.type === "NY" ? "耐用品" : (scope.row.type === "YH" ? "易耗品" : "") }}
</template>
</el-table-column>
<el-table-column prop="unit" label="单位"></el-table-column>
<el-table-column prop="unitPrice" label="单价">
<template slot-scope="scope">
<span v-if='scope.row.type === "YH"'>-</span>
<span v-else>{{ scope.row.unitPrice || 0 }}</span>
</template>
</el-table-column>
</el-table-column>
<el-table-column prop="date" label="入库信息">
<el-table-column prop="theInboundQuantity" label="数量">
</el-table-column>
<el-table-column prop="unitPrice" label="单价">
<template slot-scope="scope">
<span v-if='scope.row.type === "YH"'>-</span>
<span v-else>{{ scope.row.unitPrice || 0 }}</span>
</template>
</el-table-column>
</el-table-column>
<el-table-column prop="date" label="入库后库存">
<el-table-column label="数量">
<template slot-scope="scope">
{{ Number(scope.row.inboundQuantity || 0) + Number(scope.row.theInboundQuantity || 0) }}
</template>
</el-table-column>
<el-table-column prop="unitPrice" label="单价">
<template slot-scope="scope">
<span v-if='scope.row.type === "YH"'>-</span>
<span v-else>{{ scope.row.unitPrice || 0 }}</span>
</template>
</el-table-column>
</el-table-column>
<el-table-column prop="date" label="入库信息">
<el-table-column label="入库人">
<template slot-scope="scope">
{{ scope.row.userInfoVO ? scope.row.userInfoVO.name : sizeForm.userInfoVO.name }}
</template>
</el-table-column>
<el-table-column prop="inDate" label="入库时间" width="150">
<template slot-scope="scope">
{{ inDate }}
</template>
</el-table-column>
</el-table-column>
</el-table> -->
<el-table <el-table
:data="statisticsList" :data="statisticsList"
border border
@ -519,8 +392,8 @@
</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)">暂存</el-button> <el-button type="primary" @click="submit(1)" :loading="isSubmitting">暂存</el-button>
<el-button type="primary" @click="submit(2)">提交</el-button> <el-button type="primary" @click="submit(2)" :loading="isSubmitting">提交</el-button>
</span> </span>
</el-dialog> </el-dialog>
@ -592,6 +465,7 @@ export default {
}, },
data() { data() {
return { return {
isSubmitting:false,
inDialogVisible: false, inDialogVisible: false,
sizeForm: { sizeForm: {
orderNo: "", // orderNo: "", //
@ -816,7 +690,7 @@ export default {
this.sizeForm.inTableData = res.data.result; this.sizeForm.inTableData = res.data.result;
this.sizeForm.inTableData.forEach((item) => { this.sizeForm.inTableData.forEach((item) => {
// item.theInboundQuantity = 0; // item.theInboundQuantity = 0;
this.$set(item,'theInboundQuantity',0) this.$set(item, "theInboundQuantity", 0);
if (item.type == "YH") { if (item.type == "YH") {
item.unitPrice = 0; item.unitPrice = 0;
} }
@ -919,11 +793,11 @@ export default {
return; return;
} }
if ( if (
row.theInboundQuantity + row.inboundQuantity > row.theInboundQuantity + row.yetInboundQuantity >
row.requiredQuantity && row.requiredQuantity &&
!row.remark !row.remark
) { ) {
this.$message.error( this.$message.warning(
row.materialName + row.materialName +
"本次入库数量不能大于采购单计划数量,请填写备注原因" "本次入库数量不能大于采购单计划数量,请填写备注原因"
); );
@ -965,18 +839,19 @@ export default {
} }
// status == 1 2 // status == 1 2
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 = [];
this.sizeForm.ldOnePutStorageDetailVOList = this.sizeForm.inTableData; this.sizeForm.ldOnePutStorageDetailVOList = this.sizeForm.inTableData;
this.sizeForm.options = this.sizeForm.option; this.sizeForm.options = this.sizeForm.option;
this.sizeForm.purchaseEndInfo = this.sizeForm.quarterName; this.sizeForm.purchaseEndInfo = this.sizeForm.quarterName;
this.sizeForm.option = ""; // this.sizeForm.option = "";
} else if (this.sizeForm.option == 2) { } else if (this.sizeForm.option == 2) {
this.sizeForm.inTableData = []; this.sizeForm.inTableData = [];
this.sizeForm.ldOnePutStorageDetailVOList = this.sizeForm.singleData; this.sizeForm.ldOnePutStorageDetailVOList = this.sizeForm.singleData;
this.sizeForm.options = this.sizeForm.option; this.sizeForm.options = this.sizeForm.option;
this.sizeForm.option = ""; // this.sizeForm.option = "";
} }
try { try {
const res = await submitData(this.sizeForm); const res = await submitData(this.sizeForm);
@ -988,11 +863,14 @@ export default {
// //
this.$emit("submitSuccess"); this.$emit("submitSuccess");
this.handleCloseDetail(); this.handleCloseDetail();
this.isSubmitting = false
} else { } else {
this.$message.error(res.data.message || "提交失败"); this.$message.error(res.data.message);
this.isSubmitting = false
} }
} catch (error) { } catch (error) {
this.$message.error(error.message || "服务器错误"); this.isSubmitting = false
this.$message.error(error.message);
} }
}, },

@ -342,7 +342,7 @@ export default {
}, },
// //
handleSubmitSuccess() { handleSubmitSuccess() {
this.onLoad(this.page); this.onLoad(this.page, this.query);
}, },
// //
onLoad(page, params = {}) { onLoad(page, params = {}) {

Loading…
Cancel
Save