|
|
|
@ -379,6 +379,7 @@
|
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<!-- 添加库存品 --> |
|
|
|
|
<el-dialog v-model="dialogFormVisible" title="添加库存品" style="width: 80%"> |
|
|
|
|
<el-table |
|
|
|
|
ref="table" |
|
|
|
@ -444,6 +445,7 @@
|
|
|
|
|
</template> |
|
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
|
|
<!-- 添加订单 --> |
|
|
|
|
<el-dialog v-model="dialogFormOrderVisible" title="添加订单" style="width: 80%"> |
|
|
|
|
<tablecmt |
|
|
|
|
ref="multipleTable" |
|
|
|
@ -488,7 +490,7 @@
|
|
|
|
|
|
|
|
|
|
<!-- 零担订单信息修改 --> |
|
|
|
|
<el-dialog v-model="dialogFormZeroOrderVisible" title="零担订单信息" center style="width: 50%"> |
|
|
|
|
<template v-if="zeroOrderFormList"> |
|
|
|
|
<!-- <template v-if="zeroOrderFormList"> |
|
|
|
|
<div style="display: flex; align-items: center; text-align: center"> |
|
|
|
|
<div style="width: 120px; display: flex">名称</div> |
|
|
|
|
<div style="display: flex">数量</div> |
|
|
|
@ -501,72 +503,66 @@
|
|
|
|
|
> |
|
|
|
|
<el-input-number :min="0" :max="item.maxNum" v-model="item.quantity" /> |
|
|
|
|
</el-form-item> |
|
|
|
|
</template> |
|
|
|
|
</template> --> |
|
|
|
|
|
|
|
|
|
<el-table :data="zeroOrderFormList" border style="width: 100%"> |
|
|
|
|
<el-table-column fixed prop="firsts" label="名称" /> |
|
|
|
|
<el-table-column prop="quantity" label="数量" /> |
|
|
|
|
<el-table-column prop="libraryQuantity" label="在库数量" /> |
|
|
|
|
<el-table-column prop="deliveryQuantity" label="冻结数量" /> |
|
|
|
|
<!-- <el-table-column prop="deliveryQuantity" label="出库数量" /> --> |
|
|
|
|
<el-table-column label="可用数量"> |
|
|
|
|
<template #default="props"> |
|
|
|
|
<span> {{ props.row.libraryQuantity - props.row.deliveryQuantity }}</span> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<!-- 在库=冻结-出库 --> |
|
|
|
|
|
|
|
|
|
<el-table-column fixed="right" label="数量操作"> |
|
|
|
|
<template #default="scope"> |
|
|
|
|
<el-input-number |
|
|
|
|
size="small" |
|
|
|
|
v-model="scope.row._quantity" |
|
|
|
|
:min="0" |
|
|
|
|
:max="scope.row.maxNum" |
|
|
|
|
/> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
</el-table> |
|
|
|
|
|
|
|
|
|
<div style="text-align: center"> |
|
|
|
|
<el-button type="primary" @click="handleRowZeroOrder">确定</el-button> |
|
|
|
|
<el-button @click="dialogFormZeroOrderVisible = false">取消</el-button> |
|
|
|
|
<el-button type="primary" @click="handleRowZeroOrder">录入数量</el-button> |
|
|
|
|
</div> |
|
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
|
|
<!-- 零担订单信息修改 --> |
|
|
|
|
<!-- 零担订单在库信息修改 --> |
|
|
|
|
<el-dialog v-model="zeroOrderVisible" title="零担品类信息" center width="50%"> |
|
|
|
|
<el-row :gutter="24" class="rows"> |
|
|
|
|
<el-col :xl="4" :lg="7" :md="8" :sm="24"> |
|
|
|
|
<h3> |
|
|
|
|
<!-- <span>在库总数:{{ this.obj.handQuantity }}</span> --> |
|
|
|
|
</h3> |
|
|
|
|
</el-col> |
|
|
|
|
</el-row> |
|
|
|
|
<div Class="iszer"> |
|
|
|
|
<el-table :data="zeroOrderData" border style="width: 100%"> |
|
|
|
|
<el-table-column fixed prop="firsts" label="名称" /> |
|
|
|
|
<el-table-column prop="quantity" label="数量" /> |
|
|
|
|
<el-table-column prop="libraryQuantity" label="在库数量" /> |
|
|
|
|
<el-table-column prop="deliveryQuantity" label="冻结数量" /> |
|
|
|
|
|
|
|
|
|
<template v-if="zeroOrderData != null && zeroOrderData.length !== 0"> |
|
|
|
|
<div v-for="(item, index) in zeroOrderData" :key="index"> |
|
|
|
|
<el-row :gutter="24" class="rows"> |
|
|
|
|
<el-col :xl="4" :lg="7" :md="8" :sm="24"> |
|
|
|
|
<span>名称:{{ item.firsts }}</span> |
|
|
|
|
</el-col> |
|
|
|
|
<el-col :xl="4" :lg="7" :md="8" :sm="24"> |
|
|
|
|
<span>总数量:{{ item.quantity }} </span> |
|
|
|
|
</el-col> |
|
|
|
|
<el-col :xl="4" :lg="7" :md="8" :sm="24"> |
|
|
|
|
<span>在库数量:{{ item.handQuantity }} </span> |
|
|
|
|
</el-col> |
|
|
|
|
<el-col :xl="4" :lg="7" :md="8" :sm="24"> |
|
|
|
|
<span>冻结数量:{{ item.deliveryQuantity }} </span> |
|
|
|
|
</el-col> |
|
|
|
|
<el-col :xl="4" :lg="7" :md="8" :sm="24"> |
|
|
|
|
<span>出库数量:{{ item.outboundQuantity }} </span> |
|
|
|
|
</el-col> |
|
|
|
|
<el-col :xl="4" :lg="7" :md="8" :sm="24"> |
|
|
|
|
<span |
|
|
|
|
>可用数量:{{ |
|
|
|
|
item.handQuantity - item.deliveryQuantity - item.outboundQuantity |
|
|
|
|
}}</span |
|
|
|
|
> |
|
|
|
|
</el-col> |
|
|
|
|
</el-row> |
|
|
|
|
<el-input-number |
|
|
|
|
v-if="this.isrReservationEntry" |
|
|
|
|
v-model="item.reservationNum" |
|
|
|
|
min="0" |
|
|
|
|
:max="item.zeroOrderMax" |
|
|
|
|
placeholder="请输入预约数量" |
|
|
|
|
></el-input-number> |
|
|
|
|
<el-input-number |
|
|
|
|
v-else |
|
|
|
|
v-model="item.number" |
|
|
|
|
min="0" |
|
|
|
|
:max="item.quantity" |
|
|
|
|
placeholder="请输入预约数量" |
|
|
|
|
></el-input-number> |
|
|
|
|
<el-table-column fixed="right" label="数量操作"> |
|
|
|
|
<template #default="scope"> |
|
|
|
|
<el-input-number |
|
|
|
|
size="small" |
|
|
|
|
v-model="scope.row.tiQuantity" |
|
|
|
|
:min="0" |
|
|
|
|
:max="scope.row.maxNum" |
|
|
|
|
/> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
</el-table> |
|
|
|
|
<div style="text-align: center"> |
|
|
|
|
<el-button icon="el-icon-circle-close" @click="zeroOrderVisible = false">返 回</el-button> |
|
|
|
|
<el-button icon="el-icon-check" color="#172e60" type="success" @click="onSubmitZeroOrder" |
|
|
|
|
>维护在库数量</el-button |
|
|
|
|
> |
|
|
|
|
</div> |
|
|
|
|
</template> |
|
|
|
|
<el-form-item style="margin-left: 37%; margin-top: 5px"> |
|
|
|
|
<el-button type="primary" icon="el-icon-check" @click="onSubmitZeroOrder" |
|
|
|
|
>提交(零担订单) |
|
|
|
|
</el-button> |
|
|
|
|
<el-button icon="el-icon-circle-close" @click="zeroOrderVisible = false">返 回</el-button> |
|
|
|
|
</el-form-item> |
|
|
|
|
</div> |
|
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
|
|
<!-- 选择包件 --> |
|
|
|
@ -621,6 +617,7 @@ import {
|
|
|
|
|
update, |
|
|
|
|
remove, |
|
|
|
|
zeroMaterial, |
|
|
|
|
zeroUpdateMaterial, |
|
|
|
|
} from '@/api/distribution/distrilbutionBillLading'; |
|
|
|
|
import { getListOwn, getList, getEditList } from '@/api/distribution/distributionParcelList'; |
|
|
|
|
import option from '@/option/distribution/distrilbutionBillLading'; |
|
|
|
@ -1841,7 +1838,7 @@ export default {
|
|
|
|
|
}, |
|
|
|
|
// 零担在库录入弹窗开启 |
|
|
|
|
zeroOrderVisible: false, |
|
|
|
|
zeroOrderData: [], |
|
|
|
|
zeroOrderData: [{}], |
|
|
|
|
}; |
|
|
|
|
}, |
|
|
|
|
mounted() { |
|
|
|
@ -2590,6 +2587,7 @@ export default {
|
|
|
|
|
// submitFormData.parcelLisList.push(item); |
|
|
|
|
// }); |
|
|
|
|
}); |
|
|
|
|
submitFormData.parcelLisList.forEach(val => (val.quantity = val._quantity)); |
|
|
|
|
} else { |
|
|
|
|
submitFormData.zeroType = '1'; |
|
|
|
|
} |
|
|
|
@ -2990,23 +2988,27 @@ export default {
|
|
|
|
|
const { code, data } = res.data; |
|
|
|
|
if (code === 200) { |
|
|
|
|
this.zeroOrderFormList = data.map(val => { |
|
|
|
|
const zeroOrder = { |
|
|
|
|
// 记录传入行的id |
|
|
|
|
stockArticleId: val.stockArticleId, |
|
|
|
|
// 物料id |
|
|
|
|
id: val.id, |
|
|
|
|
// 物料最大限数 |
|
|
|
|
maxNum: val.quantity, |
|
|
|
|
// 物料件数 |
|
|
|
|
quantity: val.quantity, |
|
|
|
|
// 物料名称 |
|
|
|
|
firsts: val.firsts, |
|
|
|
|
}; |
|
|
|
|
// zeroOrder = { |
|
|
|
|
// stockArticleId: val.stockArticleId, |
|
|
|
|
// // 物料id |
|
|
|
|
// id: val.id, |
|
|
|
|
// // 物料最大限数 |
|
|
|
|
// maxNum: val.quantity, |
|
|
|
|
// // 物料件数 |
|
|
|
|
// quantity: val.quantity, |
|
|
|
|
// // 物料名称 |
|
|
|
|
// firsts: val.firsts, |
|
|
|
|
// }; |
|
|
|
|
const zeroOrder = val; |
|
|
|
|
// 记录传入行的id |
|
|
|
|
zeroOrder.stockArticleId = val.stockArticleId; |
|
|
|
|
// 物料最大限数 |
|
|
|
|
zeroOrder.maxNum = val.libraryQuantity - val.deliveryQuantity; |
|
|
|
|
// 新增时, 检测是否齐套 |
|
|
|
|
if (row.completeSetName !== '是' && Number(this.$route.query.type) === 3) |
|
|
|
|
zeroOrder.quantity = null; |
|
|
|
|
zeroOrder._quantity = null; |
|
|
|
|
else if (val.deliveryQuantity && Number(this.$route.query.type) === 2) { |
|
|
|
|
zeroOrder.quantity = val.deliveryQuantity; |
|
|
|
|
zeroOrder._quantity = val.deliveryQuantity; |
|
|
|
|
} |
|
|
|
|
return zeroOrder; |
|
|
|
|
}); |
|
|
|
@ -3026,15 +3028,69 @@ export default {
|
|
|
|
|
/** |
|
|
|
|
* 显示维护在库零担数量 |
|
|
|
|
*/ |
|
|
|
|
handleStockZeroOrder() { |
|
|
|
|
async handleStockZeroOrder(row) { |
|
|
|
|
// 请求零担数据详情 |
|
|
|
|
const res = await zeroMaterial({ |
|
|
|
|
stockArticleId: row.id, |
|
|
|
|
reservationId: this.$route.query.id, |
|
|
|
|
}); |
|
|
|
|
console.log('res :>> ', res); |
|
|
|
|
const { code, data } = res.data; |
|
|
|
|
if (code === 200) { |
|
|
|
|
this.zeroOrderData = data.map(val => { |
|
|
|
|
// zeroOrder = { |
|
|
|
|
// stockArticleId: val.stockArticleId, |
|
|
|
|
// // 物料id |
|
|
|
|
// id: val.id, |
|
|
|
|
// // 物料最大限数 |
|
|
|
|
// maxNum: val.quantity, |
|
|
|
|
// // 物料件数 |
|
|
|
|
// quantity: val.quantity, |
|
|
|
|
// // 物料名称 |
|
|
|
|
// firsts: val.firsts, |
|
|
|
|
// }; |
|
|
|
|
const zeroOrder = val; |
|
|
|
|
// 记录传入行的id |
|
|
|
|
zeroOrder.stockArticleId = val.stockArticleId; |
|
|
|
|
// 物料最大限数 |
|
|
|
|
zeroOrder.maxNum = val.quantity; |
|
|
|
|
// 新增时, 检测是否齐套 |
|
|
|
|
zeroOrder.tiQuantity = val.libraryQuantity; |
|
|
|
|
return zeroOrder; |
|
|
|
|
}); |
|
|
|
|
console.log('this.zeroOrderFormList :>> ', this.zeroOrderFormList); |
|
|
|
|
} |
|
|
|
|
// 开启零担蒙层弹窗 |
|
|
|
|
this.zeroOrderVisible = true; |
|
|
|
|
console.log('this.zeroOrderVisible :>> ', this.zeroOrderVisible); |
|
|
|
|
console.log('111 :>> ', 111); |
|
|
|
|
}, |
|
|
|
|
/** |
|
|
|
|
* 在库零担维护提交 |
|
|
|
|
*/ |
|
|
|
|
onSubmitZeroOrder() {}, |
|
|
|
|
async onSubmitZeroOrder() { |
|
|
|
|
try { |
|
|
|
|
if (this.zeroOrderData.length === 0) { |
|
|
|
|
return (this.zeroOrderVisible = false); |
|
|
|
|
} |
|
|
|
|
const submitData = { |
|
|
|
|
stockArticleId: this.zeroOrderData[0].stockArticleId, |
|
|
|
|
distributionParcelListZeroVO: [], |
|
|
|
|
}; |
|
|
|
|
submitData.distributionParcelListZeroVO = this.zeroOrderData.map(val => { |
|
|
|
|
val.TiQuantity = val.tiQuantity; |
|
|
|
|
return val; |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
const res = await zeroUpdateMaterial(submitData); |
|
|
|
|
const { code } = res.data; |
|
|
|
|
if (code === 200) { |
|
|
|
|
this.$message.success(res.data.msg); |
|
|
|
|
} |
|
|
|
|
} catch (error) { |
|
|
|
|
console.log('error :>> ', error); |
|
|
|
|
} finally { |
|
|
|
|
this.zeroOrderVisible = false; |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
}; |
|
|
|
|
</script> |
|
|
|
|