|
|
@ -256,7 +256,15 @@
|
|
|
|
v-hasPermi="['wms:stocktotal:transfer']"
|
|
|
|
v-hasPermi="['wms:stocktotal:transfer']"
|
|
|
|
>转库存
|
|
|
|
>转库存
|
|
|
|
</el-button>
|
|
|
|
</el-button>
|
|
|
|
|
|
|
|
<el-button
|
|
|
|
|
|
|
|
size="mini"
|
|
|
|
|
|
|
|
type="text"
|
|
|
|
|
|
|
|
icon="el-icon-shopping-cart-1"
|
|
|
|
|
|
|
|
v-if="type === STOCK_TYPE.PRODUCT"
|
|
|
|
|
|
|
|
@click="handleProductStockTotalTransfer(scope.row)"
|
|
|
|
|
|
|
|
v-hasPermi="['wms:stocktotal:transferProduct']"
|
|
|
|
|
|
|
|
>成品转库存
|
|
|
|
|
|
|
|
</el-button>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
</el-table-column>
|
|
|
|
</el-table-column>
|
|
|
|
|
|
|
|
|
|
|
@ -288,7 +296,7 @@
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
|
|
|
|
<el-form-item label="销售订单号" prop="saleorderCode" v-if="form.safeFlag === SAFE_FLAG.NO">
|
|
|
|
<el-form-item label="销售订单号" prop="saleorderCode" v-if="form.safeFlag === SAFE_FLAG.NO">
|
|
|
|
<el-input v-model="form.saleorderCode" placeholder="请点击右侧检索采购订单" readonly>
|
|
|
|
<el-input v-model="form.saleorderCode" placeholder="请点击右侧检索销售订单" readonly>
|
|
|
|
<el-button slot="append" icon="el-icon-search" @click="handleSaleOrderSelect"></el-button>
|
|
|
|
<el-button slot="append" icon="el-icon-search" @click="handleSaleOrderSelect"></el-button>
|
|
|
|
</el-input>
|
|
|
|
</el-input>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
@ -347,7 +355,7 @@ import {
|
|
|
|
transferRaw,
|
|
|
|
transferRaw,
|
|
|
|
transferRawStockTotal,
|
|
|
|
transferRawStockTotal,
|
|
|
|
transferProductStockTotal,
|
|
|
|
transferProductStockTotal,
|
|
|
|
selectMaterialInfosByVirtualMaterialId
|
|
|
|
selectMaterialInfosByVirtualMaterialId, transferProductStock
|
|
|
|
} from "@/api/wms/stocktotal";
|
|
|
|
} from "@/api/wms/stocktotal";
|
|
|
|
import {getWarehouses,} from "@//api/wms/wmslocation";
|
|
|
|
import {getWarehouses,} from "@//api/wms/wmslocation";
|
|
|
|
import selectSaleOrder from '@//views/mes/saleOrder/selectSaleOrder.vue';
|
|
|
|
import selectSaleOrder from '@//views/mes/saleOrder/selectSaleOrder.vue';
|
|
|
@ -687,6 +695,20 @@ export default {
|
|
|
|
this.open = true;
|
|
|
|
this.open = true;
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
handleProductStockTotalTransfer(row) {
|
|
|
|
|
|
|
|
this.reset();
|
|
|
|
|
|
|
|
this.transferType = "2";
|
|
|
|
|
|
|
|
let index = this.rawstockList.indexOf(row)
|
|
|
|
|
|
|
|
this.form.safeFlag = "0";
|
|
|
|
|
|
|
|
this.form.materialId = row.productId
|
|
|
|
|
|
|
|
this.form.productStockId = row.productStockId
|
|
|
|
|
|
|
|
this.form.transferAmount = row.totalAmount
|
|
|
|
|
|
|
|
this.form.stockTotalId = row.stockTotalId;
|
|
|
|
|
|
|
|
this.form.index = index;
|
|
|
|
|
|
|
|
this.rawStockInfosStr = "序号:" + (index + 1) + ",物料编码:" + row.materialCode + " 物料名称:" + row.materialName + " 物料规格:" + row.materialSpec + " 数量:" + row.totalAmount + " 销售订单:" + (row.saleorderCode ? row.saleorderCode : "无");
|
|
|
|
|
|
|
|
this.open = true;
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
// handleTransfer() {
|
|
|
|
// handleTransfer() {
|
|
|
|
// this.reset();
|
|
|
|
// this.reset();
|
|
|
|
// this.transferType = "2";
|
|
|
|
// this.transferType = "2";
|
|
|
@ -731,17 +753,25 @@ export default {
|
|
|
|
this.submitLoading = false;
|
|
|
|
this.submitLoading = false;
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (this.transferType === '1'){
|
|
|
|
|
|
|
|
transferProductStockTotal(this.form).then(response => {
|
|
|
|
|
|
|
|
this.$modal.msgSuccess("转库存成功");
|
|
|
|
transferProductStockTotal(this.form).then(response => {
|
|
|
|
this.open = false;
|
|
|
|
this.$modal.msgSuccess("转库存成功");
|
|
|
|
this.getList();
|
|
|
|
this.open = false;
|
|
|
|
this.getTwoList();
|
|
|
|
this.getList();
|
|
|
|
}).finally(e=>{
|
|
|
|
this.getTwoList();
|
|
|
|
this.submitLoading = false;
|
|
|
|
}).finally(e=>{
|
|
|
|
});
|
|
|
|
this.submitLoading = false;
|
|
|
|
} else if (this.transferType === '2'){
|
|
|
|
});
|
|
|
|
transferProductStock(this.form).then(response => {
|
|
|
|
|
|
|
|
this.$modal.msgSuccess("转库存成功");
|
|
|
|
|
|
|
|
this.open = false;
|
|
|
|
|
|
|
|
this.getList();
|
|
|
|
|
|
|
|
this.getTwoList();
|
|
|
|
|
|
|
|
}).finally(e=>{
|
|
|
|
|
|
|
|
this.submitLoading = false;
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
} else if (this.type === this.STOCK_TYPE.RAW) {
|
|
|
|
} else if (this.type === this.STOCK_TYPE.RAW) {
|
|
|
|
if (this.transferType === '1') {//转总库存的原材料库存
|
|
|
|
if (this.transferType === '1') {//转总库存的原材料库存
|
|
|
|
if(this.form.transferAmount < 1){
|
|
|
|
if(this.form.transferAmount < 1){
|
|
|
|