|
|
@ -26,14 +26,14 @@
|
|
|
|
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd"
|
|
|
|
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd"
|
|
|
|
v-hasPermi="['wms:outorder:add']">新增</el-button>
|
|
|
|
v-hasPermi="['wms:outorder:add']">新增</el-button>
|
|
|
|
</el-col>
|
|
|
|
</el-col>
|
|
|
|
<!-- <el-col :span="1.5">
|
|
|
|
<el-col :span="1.5">
|
|
|
|
<el-button type="success" plain icon="el-icon-edit" size="mini" :disabled="single" @click="handleUpdate"
|
|
|
|
<el-button type="success" plain icon="el-icon-edit" size="mini" @click="handleSAP"
|
|
|
|
v-hasPermi="['wms:outorder:edit']">修改</el-button>
|
|
|
|
>过账</el-button>
|
|
|
|
</el-col>
|
|
|
|
</el-col>
|
|
|
|
<el-col :span="1.5">
|
|
|
|
<!-- <el-col :span="1.5">
|
|
|
|
<el-button type="danger" plain icon="el-icon-delete" size="mini" :disabled="multiple" @click="handleDelete"
|
|
|
|
<el-button type="danger" plain icon="el-icon-delete" size="mini" :disabled="multiple" @click="handleDelete"
|
|
|
|
v-hasPermi="['wms:outorder:remove']">删除</el-button>
|
|
|
|
v-hasPermi="['wms:outorder:remove']">删除</el-button>
|
|
|
|
</el-col> -->
|
|
|
|
</el-col> -->
|
|
|
|
<el-col :span="1.5">
|
|
|
|
<el-col :span="1.5">
|
|
|
|
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport"
|
|
|
|
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport"
|
|
|
|
v-hasPermi="['wms:outorder:export']">导出</el-button>
|
|
|
|
v-hasPermi="['wms:outorder:export']">导出</el-button>
|
|
|
@ -135,7 +135,7 @@
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
<script>
|
|
|
|
import { listOutorder, getOutorder, delOutorder, PurchaseOrderOutboundPda, addPurchaseOrderOutbound, getlistCK } from "@/api/wms/outorder";
|
|
|
|
import { listOutorder, getOutorder, delOutorder, PurchaseOrderOutboundPda, addPurchaseOrderOutbound, getlistCK ,OutboundPostingSAP} from "@/api/wms/outorder";
|
|
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
export default {
|
|
|
|
name: "Outorder",
|
|
|
|
name: "Outorder",
|
|
|
@ -203,11 +203,16 @@ export default {
|
|
|
|
produceCode: '',
|
|
|
|
produceCode: '',
|
|
|
|
warehouseNo: '',
|
|
|
|
warehouseNo: '',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
queryParams2: {
|
|
|
|
queryParams2: {
|
|
|
|
orderNo: '',
|
|
|
|
orderNo: '',
|
|
|
|
|
|
|
|
ken:'',
|
|
|
|
warehouseNo: '',
|
|
|
|
warehouseNo: '',
|
|
|
|
orderLines:[],
|
|
|
|
list:[],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
queryParams3:{
|
|
|
|
|
|
|
|
ID: '',
|
|
|
|
|
|
|
|
},
|
|
|
|
// 表单参数
|
|
|
|
// 表单参数
|
|
|
|
form: {},
|
|
|
|
form: {},
|
|
|
|
// 表单校验
|
|
|
|
// 表单校验
|
|
|
@ -303,7 +308,7 @@ export default {
|
|
|
|
});
|
|
|
|
});
|
|
|
|
},
|
|
|
|
},
|
|
|
|
handleSelectionChange1(selection) {
|
|
|
|
handleSelectionChange1(selection) {
|
|
|
|
this.ids = selection.map(item => item.ID)
|
|
|
|
this.ids = selection.map(item => item.id)
|
|
|
|
this.single = selection.length !== 1
|
|
|
|
this.single = selection.length !== 1
|
|
|
|
this.multiple = !selection.length
|
|
|
|
this.multiple = !selection.length
|
|
|
|
this.selectedRows = selection;
|
|
|
|
this.selectedRows = selection;
|
|
|
@ -377,7 +382,7 @@ export default {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
// 多选框选中数据
|
|
|
|
// 多选框选中数据
|
|
|
|
handleSelectionChange(selection) {
|
|
|
|
handleSelectionChange(selection) {
|
|
|
|
this.ids = selection.map(item => item.ID)
|
|
|
|
this.ids = selection.map(item => item.id)
|
|
|
|
this.single = selection.length !== 1
|
|
|
|
this.single = selection.length !== 1
|
|
|
|
this.multiple = !selection.length
|
|
|
|
this.multiple = !selection.length
|
|
|
|
|
|
|
|
|
|
|
@ -400,6 +405,15 @@ export default {
|
|
|
|
this.title = "修改包材出库单";
|
|
|
|
this.title = "修改包材出库单";
|
|
|
|
});
|
|
|
|
});
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
handleSAP(row){
|
|
|
|
|
|
|
|
console.log(this.ids)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let postData = this.ids.map(id => ({ id: id }));
|
|
|
|
|
|
|
|
console.log(postData)
|
|
|
|
|
|
|
|
OutboundPostingSAP(JSON.stringify(postData)).then(response => {
|
|
|
|
|
|
|
|
this.$modal.msgSuccess("操作完成");
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
},
|
|
|
|
/** 提交按钮 */
|
|
|
|
/** 提交按钮 */
|
|
|
|
submitForm() {
|
|
|
|
submitForm() {
|
|
|
|
const _this = this
|
|
|
|
const _this = this
|
|
|
@ -426,14 +440,14 @@ export default {
|
|
|
|
// });
|
|
|
|
// });
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
this.queryParams2.orderNo = this.queryParams1.produceCode
|
|
|
|
this.queryParams2.orderNo = this.queryParams1.produceCode
|
|
|
|
this.queryParams2.warehouseCode = this.queryParams1.warehouseCode
|
|
|
|
this.queryParams2.warehouseNo = this.queryParams1.warehouseNo
|
|
|
|
this.queryParams2.orderLines = _this.selectedRows
|
|
|
|
this.queryParams2.list = _this.selectedRows
|
|
|
|
|
|
|
|
this.queryParams2.ken= 2
|
|
|
|
addPurchaseOrderOutbound(JSON.stringify(_this.queryParams2)).then(response => {
|
|
|
|
addPurchaseOrderOutbound(JSON.stringify(_this.queryParams2)).then(response => {
|
|
|
|
if (response.data) {
|
|
|
|
|
|
|
|
this.$modal.msgSuccess("新增成功");
|
|
|
|
this.$modal.msgSuccess("新增成功");
|
|
|
|
this.open = false;
|
|
|
|
this.open = false;
|
|
|
|
this.getList();
|
|
|
|
this.getList();
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|