99 lines
3.2 KiB
Plaintext
99 lines
3.2 KiB
Plaintext
<el-row id="opapp">
|
|
<el-card class="box-card" :span="16">
|
|
<el-table :data="tableData" ref="multipleTable" border style="width: 100%" @@selection-change="handleSelectionChange">
|
|
>
|
|
<el-table-column type="selection"
|
|
width="55">
|
|
</el-table-column>
|
|
<el-table-column prop="boxName" label="周转箱" align="center">
|
|
</el-table-column>
|
|
|
|
<el-table-column label="工位" align="center" prop="label">
|
|
</el-table-column>
|
|
</el-table>
|
|
<div style="margin-top: 20px">
|
|
<el-button type="primary" @@click="inOperation()">启动入库</el-button>
|
|
</div>
|
|
</el-card>
|
|
</el-row>
|
|
|
|
<script>
|
|
var app = new Vue({
|
|
el: "#opapp",
|
|
data() {
|
|
return {
|
|
// 表格数据
|
|
tableData: [
|
|
{
|
|
boxName: 'L01',
|
|
label: '左侧',
|
|
station: '3',
|
|
},
|
|
{
|
|
boxName: 'L02',
|
|
label: '右侧',
|
|
station: '1',
|
|
},
|
|
],
|
|
selectData: []
|
|
};
|
|
},
|
|
mounted: function () {
|
|
// 获取所有单据编码
|
|
// $.ajax({
|
|
// type: "post",
|
|
// dataType: "json",
|
|
// data:{},
|
|
// url: "/receipt/ReceiptIn/SelectReceiptCode",
|
|
// success: function (json) {
|
|
// app.options = json.Data;
|
|
// },
|
|
// error: function (json) {
|
|
// alert("加载失败");
|
|
// }
|
|
// });
|
|
},
|
|
methods: {
|
|
handleSelectionChange(val) {
|
|
this.selectData = val;
|
|
},
|
|
// 启动入库
|
|
inOperation() {
|
|
var _this = this;
|
|
if (_this.selectData.length < 1) {
|
|
this.$message({
|
|
message: "至少选择一个站台!",
|
|
type: "warning",
|
|
duration: "5000",
|
|
});
|
|
return;
|
|
}
|
|
$.ajax({
|
|
type: "post",
|
|
dataType: "json",
|
|
data: { data: _this.selectData },
|
|
url: "/receipt/ReceiptInOperation/InOperation",
|
|
success: function (json) {
|
|
if (json.Code == 200) {
|
|
_this.$message({
|
|
message: "启动成功!",
|
|
type: "success",
|
|
});
|
|
}
|
|
else {
|
|
_this.$message({
|
|
message: json.Msg,
|
|
type: "warning",
|
|
duration: "1000",
|
|
});
|
|
}
|
|
},
|
|
error: function (json) {
|
|
alert("加载失败");
|
|
}
|
|
});
|
|
}
|
|
}
|
|
});
|
|
</script>
|