退货管理修改

This commit is contained in:
zzyuan 2025-07-11 13:15:01 +08:00
parent 5d0aaf05ae
commit 96c922e67c
2 changed files with 24 additions and 21 deletions

View File

@ -26,13 +26,7 @@
<template slot="label">退货时间</template> <template slot="label">退货时间</template>
{{ baseInfo.refundTime }} {{ baseInfo.refundTime }}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item>
<template slot="label">审批状态</template>
<span v-if="baseInfo.approveStatus==1">待审批</span>
<span v-if="baseInfo.approveStatus==2">审批中</span>
<span v-if="baseInfo.approveStatus==3">审批同意</span>
<span v-if="baseInfo.approveStatus==4">审批拒绝</span>
</el-descriptions-item>
</el-descriptions> </el-descriptions>
</div> </div>
@ -43,7 +37,7 @@
</div> </div>
</div> </div>
<div style="width: 100%;height: 400px;overflow-y: auto;"> <div style="width: 100%;height: 400px;overflow-y: auto;">
<el-table v-loading="loading" :data="materialLis" ref="multipleTable" height="380" :row-key="(row)=>{return row.materialId}" @selection-change="handleSelectionChange"> <el-table v-loading="loading" :data="materialList" ref="multipleTable" height="380" :row-key="(row)=>{return row.materialId}" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="50" align="center" :reserve-selection="true" /> <el-table-column type="selection" width="50" align="center" :reserve-selection="true" />
<el-table-column label="序号" align="center" width="80" type="index" /> <el-table-column label="序号" align="center" width="80" type="index" />
<!-- <el-table-column label="图片" align="center" prop="" :show-overflow-tooltip="true" /> --> <!-- <el-table-column label="图片" align="center" prop="" :show-overflow-tooltip="true" /> -->
@ -57,18 +51,24 @@
<span v-if="scope.row.salesMode==2">称重</span> <span v-if="scope.row.salesMode==2">称重</span>
</template> --> </template> -->
</el-table-column> </el-table-column>
<el-table-column label="单价(元)" align="center" prop="singlePrice" :show-overflow-tooltip="true"> <el-table-column label="单价(元)" align="center" prop="unitPrice" :show-overflow-tooltip="true">
</el-table-column>
<el-table-column label="当前可退数量" align="center" prop="purNum" :show-overflow-tooltip="true"/>
<el-table-column label="小计(元)" align="center" prop="totalPrice" :show-overflow-tooltip="true">
<template slot-scope="scope"> <template slot-scope="scope">
<!-- <span>{{ (scope.row.singlePrice/100).toFixed(2) }}</span> --> <span>{{ scope.row.refundNum*scope.row.unitPrice }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="退货数量" align="center" prop="refundNum" :show-overflow-tooltip="true"></el-table-column> <el-table-column label="退货数量" align="center" prop="refundNum" :show-overflow-tooltip="true">
<el-table-column label="小计(元)" align="center" prop="" :show-overflow-tooltip="true">
<template slot-scope="scope"> <template slot-scope="scope">
<!-- <span>{{ scope.row.refundNum*scope.row.singlePrice }}</span> --> <el-input v-model.number="scope.row.refundNum" placeholder="请输入" maxlength="10" clearable @input="(v)=>(scope.row.refundNum=v.replace(/[^\d]/g,''))"/>
</template>
</el-table-column>
<el-table-column label="退货原因" align="center" prop="refundReason" :show-overflow-tooltip="true">
<template slot-scope="scope">
<el-input v-model="scope.row.refundReason" placeholder="请输入" maxlength="20" clearable/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="退货原因" align="center" prop="refundReason" :show-overflow-tooltip="true"></el-table-column>
</el-table> </el-table>
</div> </div>
</div> </div>
@ -82,7 +82,7 @@
<script> <script>
import { getCanteenByAreaApi, } from "@/api/base/stall"; import { getCanteenByAreaApi, } from "@/api/base/stall";
import { supplierPageApi } from "@/api/foodManage/purchaseManage"; import { supplierPageApi } from "@/api/foodManage/purchaseManage";
import { getPurchaseOrderInfoApi } from "@/api/foodManage/purchaseManage"; import { getReturnMaterialInfoApi } from "@/api/foodManage/returnManage";
export default { export default {
name: "orderDetail", name: "orderDetail",
dicts: [], dicts: [],
@ -129,7 +129,7 @@ export default {
return v.getTime() < (new Date().getTime() - 86400000);// - 86400000 return v.getTime() < (new Date().getTime() - 86400000);// - 86400000
} }
}, },
materialLis:[], materialList:[],
openDialog:false, openDialog:false,
materialTreeOptions:[], materialTreeOptions:[],
// //
@ -175,9 +175,12 @@ export default {
refundGoodsId:this.returnRowData.refundGoodsId refundGoodsId:this.returnRowData.refundGoodsId
} }
// //
getPurchaseOrderInfoApi(param).then((response) => { getReturnMaterialInfoApi(param).then((response) => {
this.baseInfo = this.returnRowData; this.baseInfo = this.returnRowData;
this.materialList = response.rows; this.materialList = response.rows;
this.materialList.forEach(item=>{
this.$set(item,"unitPrice",Number(item.unitPrice)/100)
})
}); });
}, },
// //

View File

@ -201,13 +201,13 @@ export default {
{ required: true, message: "供应商不能为空", trigger: "change" } { required: true, message: "供应商不能为空", trigger: "change" }
], ],
refundTime: [ refundTime: [
{ required: true, message: "货时间不能为空", trigger: "change" } { required: true, message: "退货时间不能为空", trigger: "change" }
], ],
refundWarehouseId: [ refundWarehouseId: [
{ required: true, message: "货仓库不能为空", trigger: "change" } { required: true, message: "退货仓库不能为空", trigger: "change" }
], ],
supplyAddress: [ refundContact: [
{ required: true, message: "详细地址不能为空", trigger: "change" } { required: true, message: "退货人不能为空", trigger: "change" }
] ]
}, },
treeAreaOptions:[], treeAreaOptions:[],