|
@@ -54,7 +54,7 @@ export default {
|
|
|
data: [],
|
|
|
},
|
|
|
{
|
|
|
- label: "调仓状态",
|
|
|
+ label: "接收状态",
|
|
|
prop: "inStatus",
|
|
|
data: [],
|
|
|
},
|
|
@@ -116,7 +116,7 @@ export default {
|
|
|
methods: {
|
|
|
getList() {
|
|
|
this.loading = true;
|
|
|
- API.transferList(this.queryParams).then(
|
|
|
+ API.transferList1(this.queryParams).then(
|
|
|
(res) => {
|
|
|
this.tableList = res.data.data.records;
|
|
|
this.total = res.data.data.total;
|
|
@@ -165,20 +165,30 @@ export default {
|
|
|
);
|
|
|
},
|
|
|
handleReceive(row) {
|
|
|
+ console.log(row.stockTransferList, "as");
|
|
|
+ const arr = row.stockTransferList.map((x) => ({
|
|
|
+ productName: x.productName,
|
|
|
+ inQuantity: 0,
|
|
|
+ outQuantity: Number(x.outQuantity),
|
|
|
+ id: x.id,
|
|
|
+ inStatus: x.inStatus,
|
|
|
+ }));
|
|
|
this.openOne = true;
|
|
|
this.formOne = {
|
|
|
- id: row.id,
|
|
|
- inQuantity: "",
|
|
|
- canSum: Number(row.outQuantity),
|
|
|
+ stockTransferList: arr,
|
|
|
};
|
|
|
},
|
|
|
handleSubmitOne() {
|
|
|
this.$refs.formOne.validate((valid) => {
|
|
|
if (valid) {
|
|
|
- if (Number(this.formOne.inQuantity) > this.formOne.canSum) {
|
|
|
- return this.msgInfo("数量不可大于调出数量");
|
|
|
+ const list = this.formOne.stockTransferList;
|
|
|
+ for (let i = 0; i < list.length; i++) {
|
|
|
+ const element = list[i];
|
|
|
+ if (element.inQuantity > element.outQuantity) {
|
|
|
+ return this.msgInfo("数量不可大于调出数量");
|
|
|
+ }
|
|
|
}
|
|
|
- API.receive(this.formOne).then(() => {
|
|
|
+ API.receive1(this.formOne.stockTransferList).then(() => {
|
|
|
this.msgSuccess("接收成功");
|
|
|
this.openOne = false;
|
|
|
this.getList();
|
|
@@ -190,7 +200,8 @@ export default {
|
|
|
showAddress(row) {
|
|
|
return (
|
|
|
<div>
|
|
|
- {row.countryName} , {row.provinceName} , {row.cityName}
|
|
|
+ {row.countryName} , {row.provinceName} , {row.cityName} ,{" "}
|
|
|
+ {row.detailedAddress}
|
|
|
</div>
|
|
|
);
|
|
|
},
|
|
@@ -218,71 +229,31 @@ export default {
|
|
|
></query>
|
|
|
<el-table :data="tableList" v-loading="loading">
|
|
|
<el-table-column
|
|
|
- label="物品编码"
|
|
|
+ label="订单编号"
|
|
|
align="left"
|
|
|
prop="code"
|
|
|
width="150"
|
|
|
/>
|
|
|
- <el-table-column label="物品名称" align="left" prop="name" />
|
|
|
- <el-table-column label="规格" align="left" prop="specs" />
|
|
|
- <el-table-column
|
|
|
- label="调出仓库"
|
|
|
- align="left"
|
|
|
- prop="outWarehouseName"
|
|
|
- width="150"
|
|
|
- />
|
|
|
- <el-table-column
|
|
|
- label="调出数量"
|
|
|
- align="left"
|
|
|
- prop="outQuantity"
|
|
|
- width="110"
|
|
|
- />
|
|
|
- <el-table-column
|
|
|
- label="操作人"
|
|
|
- align="left"
|
|
|
- prop="outUserName"
|
|
|
- width="120"
|
|
|
- />
|
|
|
- <el-table-column
|
|
|
- label="调入仓库"
|
|
|
- align="left"
|
|
|
- prop="inWarehouseName"
|
|
|
- width="150"
|
|
|
- />
|
|
|
+ <el-table-column label="订单金额" align="left" prop="amountMoney" />
|
|
|
<el-table-column
|
|
|
- label="接收数量"
|
|
|
+ label="地址"
|
|
|
align="left"
|
|
|
- prop="inQuantity"
|
|
|
- width="120"
|
|
|
- />
|
|
|
- <el-table-column
|
|
|
- label="接收人"
|
|
|
- align="left"
|
|
|
- prop="inUserName"
|
|
|
- width="120"
|
|
|
+ prop="specs"
|
|
|
+ :formatter="showAddress"
|
|
|
/>
|
|
|
+ <el-table-column label="联系人" align="left" prop="contacts" />
|
|
|
+ <el-table-column label="手机号" align="left" prop="phone" width="110" />
|
|
|
<el-table-column
|
|
|
label="状态"
|
|
|
align="left"
|
|
|
prop="inStatus"
|
|
|
- width="100"
|
|
|
- :formatter="
|
|
|
- (row) => {
|
|
|
- if (row.inStatus === 0) {
|
|
|
- return '待接收';
|
|
|
- } else {
|
|
|
- return '已接收';
|
|
|
- }
|
|
|
- }
|
|
|
- "
|
|
|
+ :formatter="(row) => (row.inStatus == 0 ? '未接收' : '已接收')"
|
|
|
/>
|
|
|
<el-table-column label="操作" align="center" width="120">
|
|
|
<template slot-scope="scope">
|
|
|
<el-button
|
|
|
type="text"
|
|
|
- v-if="
|
|
|
- scope.row.inStatus === 0 && Number(scope.row.outQuantity) > 0
|
|
|
- "
|
|
|
+ v-if="scope.row.inStatus === 0"
|
|
|
@click="handleReceive(scope.row)"
|
|
|
>接收
|
|
|
</el-button>
|
|
@@ -329,17 +300,35 @@ export default {
|
|
|
label-width="100px"
|
|
|
label-position="right"
|
|
|
>
|
|
|
- <el-form-item label="调出数量" prop="canSum">
|
|
|
- <el-input v-model="formOne.canSum" size="small" disabled> </el-input>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="接收数量" prop="inQuantity">
|
|
|
- <el-input
|
|
|
- v-model="formOne.inQuantity"
|
|
|
- placeholder="请输入接收数量"
|
|
|
- size="small"
|
|
|
- >
|
|
|
- </el-input>
|
|
|
- </el-form-item>
|
|
|
+ <el-table :data="formOne.stockTransferList">
|
|
|
+ <el-table-column label="物品名称" prop="productName">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="调出数量" prop="outQuantity">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="接收数量" prop="inQuantity">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-form-item
|
|
|
+ :prop="'stockTransferList.' + scope.$index + '.inQuantity'"
|
|
|
+ :rules="rules.inQuantity"
|
|
|
+ :inline-message="true"
|
|
|
+ label-width="0"
|
|
|
+ style="margin-bottom: 0px"
|
|
|
+ >
|
|
|
+ <el-input-number
|
|
|
+ v-model="scope.row.inQuantity"
|
|
|
+ label="请输入"
|
|
|
+ style="width: 100%"
|
|
|
+ size="mini"
|
|
|
+ :controls="false"
|
|
|
+ :min="0"
|
|
|
+ :max="9999999"
|
|
|
+ :disabled="scope.row.inStatus == 1"
|
|
|
+ >
|
|
|
+ </el-input-number>
|
|
|
+ </el-form-item>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
</el-form>
|
|
|
<div style="text-align: center; margin-top: 15px">
|
|
|
<el-button size="small" @click="openOne = false">取消 </el-button>
|