退货单和一些小修改
This commit is contained in:
parent
4ec9f5be26
commit
93fd6101da
@ -49,6 +49,7 @@
|
||||
<el-table-column label="供应商" align="center" prop="supplierName"/>
|
||||
<el-table-column label="退货时间" align="center" prop="soTime"
|
||||
width="150"/>
|
||||
<el-table-column label="退货人" align="center" prop="userName" />
|
||||
<el-table-column label="操作" fixed="right" width="180" align="center">
|
||||
<template v-slot="scope">
|
||||
<el-button size="mini" type="text" icon="el-icon-view" @click="handleShow(scope.row)"
|
||||
@ -57,9 +58,6 @@
|
||||
<el-button size="mini" type="text" icon="el-icon-close" @click="handleVoidSo(scope.row)"
|
||||
>作废
|
||||
</el-button>
|
||||
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleVoidSo(scope.row)"
|
||||
>删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@ -71,6 +69,113 @@
|
||||
/>
|
||||
|
||||
<SoReturnForm ref="soReturnRef" @success="getReturnList"/>
|
||||
|
||||
<el-dialog title="单据详情" :visible.sync="dialogVisible" width="80%" v-dialogDrag append-to-body>
|
||||
<el-card class="box-card">
|
||||
<!-- 卡片头 -->
|
||||
<div slot="header" class="clearfix">
|
||||
<i class="el-icon-plus"/>
|
||||
<span>单据信息</span>
|
||||
</div>
|
||||
<!-- 卡片内容 -->
|
||||
<div>
|
||||
<el-descriptions class="margin-top" :column="4" :size="'medium'" border style="margin-bottom: 1rem">
|
||||
<el-descriptions-item>
|
||||
<template slot="label">
|
||||
单号
|
||||
</template>
|
||||
{{info.soNo}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item>
|
||||
<template slot="label">
|
||||
数量
|
||||
</template>
|
||||
{{info.itemCount}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item>
|
||||
<template slot="label">
|
||||
金额
|
||||
</template>
|
||||
{{info.totalPrice}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item>
|
||||
<template slot="label">
|
||||
退货人
|
||||
</template>
|
||||
{{info.userName}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item>
|
||||
<template slot="label">
|
||||
供应商
|
||||
</template>
|
||||
{{info.supplierName}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item>
|
||||
<template slot="label">
|
||||
退货时间
|
||||
</template>
|
||||
{{parseTime(info.createTime, '{y}-{m}-{d}')}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item>
|
||||
<template slot="label">
|
||||
门店
|
||||
</template>
|
||||
{{info.corpName}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item>
|
||||
<template slot="label">
|
||||
备注
|
||||
</template>
|
||||
{{info.remark}}
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</div>
|
||||
</el-card>
|
||||
<el-card class="box-card">
|
||||
<!-- 卡片头 -->
|
||||
<div slot="header" class="clearfix">
|
||||
<i class="el-icon-plus"/>
|
||||
<span>商品信息</span>
|
||||
</div>
|
||||
<!-- 卡片内容 -->
|
||||
<div>
|
||||
<el-table v-loading="loading" :data="info.goodsList" :stripe="true" :show-overflow-tooltip="true">
|
||||
<el-table-column label="序号" align="center">
|
||||
<template scope="scope">
|
||||
<span>{{ scope.$index + 1 }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="商品名称" align="center" prop="repairWares.name" width="180" />
|
||||
<el-table-column label="商品编码" align="center" prop="repairWares.code" width="180" />
|
||||
<el-table-column label="规格" align="center" prop="repairWares.model" width="180" />
|
||||
<el-table-column label="数量" align="center" prop="goodsCount" width="150" />
|
||||
<el-table-column label="价格" align="center" prop="goodsPrice" width="150">
|
||||
<template scope="scope">
|
||||
{{scope.row.goodsPrice}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="合计" align="center" prop="total" width="150">
|
||||
<template scope="scope">
|
||||
{{scope.row.goodsCount * scope.row.goodsPrice}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="供应商" align="center" prop="supplierName" width="180">
|
||||
<template slot-scope="scope">
|
||||
{{info.supplierName}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="仓库" align="center" prop="wareName" width="150">
|
||||
<template slot-scope="scope">
|
||||
{{getWareHoseName(scope.row.wareId)}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</el-card>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogVisible = false">关闭</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -79,7 +184,9 @@ import SupplierChoose from "@/views/repair/Components/SupplierChoose.vue";
|
||||
import StaffChoose from "@/views/repair/Components/StaffChoose.vue";
|
||||
import CorpChoose from "@/views/repair/Components/CorpChoose.vue";
|
||||
import SoReturnForm from "@/views/repair/stockOperate/form/SoReturnForm.vue";
|
||||
import {getRepairSoPage} from "@/api/repair/stockOperate/stockOperate";
|
||||
import {getRepairSoById, getRepairSoPage, voidSo} from "@/api/repair/stockOperate/stockOperate";
|
||||
import {getRepairSoiByIds} from "@/api/repair/stockOperate/stockOperateItem";
|
||||
import {getBaseWarehouseList} from "@/api/base/warehouse";
|
||||
|
||||
export default {
|
||||
name: "SoReturn",
|
||||
@ -97,7 +204,14 @@ export default {
|
||||
list: [],
|
||||
total: 0,
|
||||
loading: false,
|
||||
supplier: null
|
||||
supplier: null,
|
||||
formData: {
|
||||
id: null,
|
||||
remark: null
|
||||
},
|
||||
dialogVisible: false,
|
||||
info: {},
|
||||
warehouseList: []
|
||||
}
|
||||
},
|
||||
watch:{
|
||||
@ -113,6 +227,41 @@ export default {
|
||||
this.getReturnList()
|
||||
},
|
||||
methods: {
|
||||
getWareHoseName(value){
|
||||
return this.warehouseList?.find(item => item.id === value)?.name
|
||||
},
|
||||
async handleShow(row){
|
||||
try {
|
||||
const res1 = await getRepairSoById(row.id)
|
||||
this.dialogVisible = true
|
||||
this.info = res1.data
|
||||
const ids = res1.data.goodsList.map(item => item.id)
|
||||
const res = await getRepairSoiByIds(ids)
|
||||
this.info.goodsList = res.data
|
||||
const response = await getBaseWarehouseList()
|
||||
this.warehouseList = response.data
|
||||
}catch{}
|
||||
},
|
||||
// 作废
|
||||
handleVoidSo(row) {
|
||||
this.$prompt('作废备注', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
}).then(({value}) => {
|
||||
this.formData.id = row.id
|
||||
this.formData.remark = value
|
||||
this.doVoidSo()
|
||||
}).catch(() => {
|
||||
})
|
||||
},
|
||||
async doVoidSo() {
|
||||
try {
|
||||
await voidSo(this.formData)
|
||||
this.$modal.msgSuccess("作废成功")
|
||||
await this.getReturnList()
|
||||
} catch {
|
||||
}
|
||||
},
|
||||
async getReturnList() {
|
||||
try {
|
||||
this.loading = true
|
||||
@ -146,5 +295,7 @@ export default {
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
||||
.box-card {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
</style>
|
||||
|
@ -109,6 +109,11 @@
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog title="采购单" :visible.sync="inStockDialog" width="80%" v-dialogDrag append-to-body>
|
||||
<el-form :inline="true">
|
||||
<el-form-item label="供应商">
|
||||
<SupplierChoose v-model="chooseSupplier"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-descriptions class="margin-top" title="车辆信息" :column="3" border>
|
||||
<el-descriptions-item>
|
||||
<template slot="label">
|
||||
@ -281,10 +286,12 @@ import {getCarBrand} from "@/api/base/carbrand";
|
||||
import {listGoods} from "@/views/partner/api/workOrder";
|
||||
import {getBaseTypeList} from "@/api/base/type";
|
||||
import {listByTicketId} from "@/api/repair/repairworker";
|
||||
import StaffChoose from "@/views/repair/Components/StaffChoose.vue";
|
||||
import SupplierChoose from "@/views/repair/Components/SupplierChoose.vue";
|
||||
|
||||
export default {
|
||||
name: "WaresItem",
|
||||
components: {TicketWaresShow, WarehouseChoose, SoTable},
|
||||
components: {SupplierChoose, StaffChoose, TicketWaresShow, WarehouseChoose, SoTable},
|
||||
props: {
|
||||
type: Boolean,
|
||||
},
|
||||
@ -332,6 +339,7 @@ export default {
|
||||
images: null,
|
||||
chooseStaff: [],
|
||||
staffs: [],
|
||||
chooseSupplier: null
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
@ -475,6 +483,7 @@ export default {
|
||||
i.totalPrice = i.waresCount * i.wares.price
|
||||
})
|
||||
})
|
||||
this.chooseSupplier = null
|
||||
this.inStockDialog = true
|
||||
this.dialogVisible = false
|
||||
} catch {
|
||||
@ -702,6 +711,10 @@ export default {
|
||||
soStatus: "02",
|
||||
remark: this.remark,
|
||||
}
|
||||
if (this.chooseSupplier){
|
||||
this.formData.supplierId = this.chooseSupplier.id
|
||||
this.formData.supplierName = this.chooseSupplier.name
|
||||
}
|
||||
this.formData.goodsList = [...values.map(item => {
|
||||
return {
|
||||
soiType: '01',
|
||||
|
@ -42,6 +42,11 @@
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog title="设置数量" :visible.sync="settingDialog" width="60%" v-dialogDrag append-to-body>
|
||||
<el-form :inline="true">
|
||||
<el-form-item label="备注">
|
||||
<el-input v-model="remark" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-table :data="chooseRows" :stripe="true" :show-overflow-tooltip="true">
|
||||
<el-table-column label="序号" align="center" width="55">
|
||||
<template scope="scope">
|
||||
@ -100,7 +105,8 @@ export default {
|
||||
selectRows: [],
|
||||
isRefresh: false,
|
||||
settingDialog: false,
|
||||
chooseRows: []
|
||||
chooseRows: [],
|
||||
remark: null
|
||||
}
|
||||
},
|
||||
watch:{
|
||||
@ -200,6 +206,7 @@ export default {
|
||||
return newItem;
|
||||
});
|
||||
this.settingDialog = true
|
||||
this.remark = null
|
||||
},
|
||||
async submit(){
|
||||
try {
|
||||
@ -208,6 +215,7 @@ export default {
|
||||
this.$modal.msgError(`${flag[0].wares.name}的退货数量为0`)
|
||||
return
|
||||
}
|
||||
this.formData.remark = this.remark
|
||||
this.formData.soType = "06"
|
||||
this.formData.soNo = createUniqueCodeByHead("TH")
|
||||
this.formData.itemCount = this.chooseRows.length
|
||||
|
Loading…
Reference in New Issue
Block a user