修改包材出库修改4

yangwl
mengjiao 10 months ago
parent f32774ca91
commit bd39cc42c9

@ -34,7 +34,14 @@ export function updatePut(data) {
data: data
});
}
//过账
export function SAPPut(data) {
return request({
url: '/wms/put/WmsProductPutByWorkOrderConfirmSAPPosting',
method: 'post',
data: data
});
}
// 删除成品生产入库
export function delPut(id) {
return request({

@ -232,10 +232,10 @@
plain
icon="el-icon-edit"
size="mini"
:disabled="single"
:disabled="multiple"
@click="handleUpdate"
v-hasPermi="['wms:put:edit']"
>修改</el-button>
>过账</el-button>
</el-col>
<el-col :span="1.5">
<el-button
@ -261,29 +261,41 @@
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="putList" @selection-change="handleSelectionChange">
<el-table v-loading="loading" :data="putList" @selection-change="handleSelectionChange" style="width: 100%">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="ID" align="center" prop="id" />
<el-table-column label="报工单号" align="center" prop="workOrder" />
<el-table-column label="ID" align="center" prop="id" v-if="false"/>
<el-table-column label="报工单号" align="center" prop="workOrder" width="200px"/>
<!-- <el-table-column label="工厂编码" align="center" prop="factoryCode" />-->
<el-table-column label="生产工单号" align="center" prop="productOrder" />
<el-table-column label="生产工单号" align="center" prop="productOrder" width="200px"/>
<el-table-column label="仓库编码" align="center" prop="whCode" />
<el-table-column label="库区编码" align="center" prop="waCode" />
<el-table-column label="库位编码" align="center" prop="wlCode" />
<!-- <el-table-column label="产品名称" align="center" prop="productName" />-->
<el-table-column label="库区编码" align="center" prop="waCode" v-if="false"/>
<el-table-column label="库位编码" align="center" prop="wlCode" v-if="false"/>
<el-table-column label="产品名称" align="center" prop="productName" width="200px"/>
<el-table-column label="产品编码" align="center" prop="productCode" />
<el-table-column label="产品分类" align="center" prop="productSort" />
<el-table-column label="产品分类" align="center" prop="productSort" v-if="false"/>
<!-- <el-table-column label="规格型号" align="center" prop="specification" />-->
<!-- <el-table-column label="单位" align="center" prop="unitOfMeasure" />-->
<el-table-column label="单位" align="center" prop="unitOfMeasure" />
<el-table-column label="计划入库数量" align="center" prop="planQuantity" />
<el-table-column label="入库数量" align="center" prop="putQuantity" />
<el-table-column label="入库状态" align="center" prop="status" />
<el-table-column label="过账SAP状态" align="center" prop="sapStatus" />
<el-table-column label="过账SAP凭证" align="center" prop="sapProof" />
<el-table-column label="过账SAP返回信息" align="center" prop="sapMessage" />
<el-table-column label="入库时间" align="center" prop="putDate" width="180">
<!-- <el-table-column label="入库状态" align="center" prop="status" />-->
<el-table-column label="入库状态" align="center" prop="status">
<template slot-scope="scope">
<span v-if="scope.row.status === '0'"></span>
<span v-else-if="scope.row.status === '1'">完成</span>
</template>
</el-table-column>
<el-table-column label="过账SAP状态" align="center" prop="sapStatus" width="200px">
<template slot-scope="scope">
<span v-if="scope.row.sapStatus === '0'"></span>
<span v-else-if="scope.row.sapStatus === '2'">过账失败</span>
<span v-else-if="scope.row.sapStatus === '1'">过账成功</span>
</template>
</el-table-column>
<el-table-column label="过账SAP凭证" align="center" prop="sapProof" width="200px"/>
<el-table-column label="过账SAP返回信息" align="center" prop="sapMessage" width="200px" />
<el-table-column label="入库时间" align="center" prop="createTime" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.putDate, '{y}-{m}-{d}') }}</span>
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<!-- <el-table-column label="预留字段1" align="center" prop="attr1" />-->
@ -420,7 +432,7 @@
</template>
<script>
import { listPut, getPut, delPut, addPut, updatePut } from "@/api/wms/put";
import { listPut, getPut, delPut, addPut, updatePut ,SAPPut} from "@/api/wms/put";
export default {
name: "Put",
@ -568,13 +580,15 @@ export default {
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const id = row.id || this.ids
getPut(id).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改成品生产入库";
});
const ids = row.id || this.ids;
let postData = this.ids.map(id => ({ id: id }));
console.log(postData)
this.$modal.confirm('是否进行过账').then(function() {
return SAPPut(JSON.stringify(postData));
}).then(() => {
this.getList();
this.$modal.msgSuccess("过账完成");
}).catch(() => {});
},
/** 提交按钮 */
submitForm() {

Loading…
Cancel
Save