条件查询,前端分页

This commit is contained in:
zgf 2023-12-22 12:15:31 +08:00
parent 75c580115c
commit 720cf26a59
10 changed files with 648 additions and 81 deletions

View File

@ -33,9 +33,36 @@ public class XWMSMFMController : BaseController
}
[ActionDescription("Sys.Search")]
public ActionResult Search()
public ActionResult Search(string address, string zjcode, string materialcode, string gdbill, int gdline = 0, int ms = 0)
{
var data = OracleHelper.GetDataSet("select * from QREQ3.XWMSMFM where rownum <=30").Tables[0];
var sql = @"select * from QREQ3.XWMSMFM where 1=1";
if (!string.IsNullOrEmpty(address))
{
sql += $" and MFGFCY_0 = '{address}'";
}
if (!string.IsNullOrEmpty(zjcode))
{
sql += $" and MFIITMREF_0 like '%{zjcode}%'";
}
if (!string.IsNullOrEmpty(materialcode))
{
sql += $"and ITMREF_0 like '%{materialcode}%'";
}
if (!string.IsNullOrEmpty(gdbill))
{
sql += $" and MFGNUM_0 like '%{gdbill}%'";
}
if (gdline != 0)
{
sql += $" and MFGLIN_0 = '{gdline}'";
}
if (ms != 0)
{
sql += $" and STOCOD_0 = '{ms}'";
}
var data = OracleHelper.GetDataSet(sql).Tables[0];
var list = data.AsEnumerable().Select
(x => new
{

View File

@ -52,7 +52,7 @@ public class XWMSPOHController : BaseController
{
sql += $"and ITMREF_0 like '%{materialcode}%'";
}
sql += " and rownum <=30";
var data = OracleHelper.GetDataSet(sql).Tables[0];
var list = data.AsEnumerable().Select
(x => new
@ -83,6 +83,7 @@ public class XWMSPOHController : BaseController
STA_0 = x.Field<string>("STA_0"),
}
).ToList();
return JsonMore(list);
}

View File

@ -33,9 +33,31 @@ public class XWMSPTHController : BaseController
}
[ActionDescription("Sys.Search")]
public ActionResult Search()
public ActionResult Search(string address, string billno, string supply, string materialcode, string cgsh)
{
var data = OracleHelper.GetDataSet("select * from QREQ3.XWMSPTH where rownum <=30").Tables[0];
var sql = @"select * from QREQ3.XWMSPTH where 1=1";
if (!string.IsNullOrEmpty(address))
{
sql += $" and PRHFCY_0 = '{address}'";
}
if (!string.IsNullOrEmpty(billno))
{
sql += $" and POHNUM_0 like '%{billno}%'";
}
if (!string.IsNullOrEmpty(supply))
{
sql += $" and BPSNUM_0 like '%{supply}%'";
}
if (!string.IsNullOrEmpty(materialcode))
{
sql += $"and ITMREF_0 like '%{materialcode}%'";
}
if (!string.IsNullOrEmpty(cgsh))
{
sql += $"and PTHNUM_0 like '%{cgsh}%'";
}
var data = OracleHelper.GetDataSet(sql).Tables[0];
var list = data.AsEnumerable().Select
(x => new
{

View File

@ -33,9 +33,27 @@ public class XWMSSHIPController : BaseController
}
[ActionDescription("Sys.Search")]
public ActionResult Search()
public ActionResult Search(string address, string billno, string sbill, string materialcode)
{
var data = OracleHelper.GetDataSet("select * from QREQ3.XWMSSHIP where rownum <=30").Tables[0];
var sql = @"select * from QREQ3.XWMSSHIP where 1=1";
if (!string.IsNullOrEmpty(address))
{
sql += $" and FCY_0 = '{address}'";
}
if (!string.IsNullOrEmpty(billno))
{
sql += $" and POHNUM_0 like '%{billno}%'";
}
if (!string.IsNullOrEmpty(sbill))
{
sql += $" and SDHNUM_0 like '%{sbill}%'";
}
if (!string.IsNullOrEmpty(materialcode))
{
sql += $"and ITMREF_0 like '%{materialcode}%'";
}
var data = OracleHelper.GetDataSet(sql).Tables[0];
var list = data.AsEnumerable().Select
(x => new
{

View File

@ -33,9 +33,28 @@ public class XWMSSOHController : BaseController
}
[ActionDescription("Sys.Search")]
public ActionResult Search()
public ActionResult Search(string address, string billno, string cust, string materialcode)
{
var data = OracleHelper.GetDataSet("select * from QREQ3.XWMSSOH where rownum <=30").Tables[0];
var sql = @"select * from QREQ3.XWMSSOH where 1=1";
if (!string.IsNullOrEmpty(address))
{
sql += $" and SALFCY_0 = '{address}'";
}
if (!string.IsNullOrEmpty(billno))
{
sql += $" and SOHNUM_0 like '%{billno}%'";
}
if (!string.IsNullOrEmpty(cust))
{
sql += $" and BPCNAM_0 like '%{cust}%'";
}
if (!string.IsNullOrEmpty(materialcode))
{
sql += $"and ITMREF_0 like '%{materialcode}%'";
}
var data = OracleHelper.GetDataSet(sql).Tables[0];
var list = data.AsEnumerable().Select
(x => new
{

View File

@ -23,11 +23,49 @@
}
</style>
<el-row id="XWMSMFM">
<el-table :data="billTable" height="750" stripe border
<el-form :inline="true" :model="form">
<el-col span="24">
<el-button type="primary" icon="el-icon-plus" @@click="create">创建单据</el-button>
</el-col>
<el-form-item>
<el-select v-model="form.address" placeholder="地点">
<el-option v-for="item in addressList"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-input v-model="form.zjcode" placeholder="组件编码"></el-input>
</el-form-item>
<el-form-item>
<el-input v-model="form.materialcode" placeholder="产品编码"></el-input>
</el-form-item>
<el-form-item>
<el-input v-model="form.gdbill" placeholder="工单单号"></el-input>
</el-form-item>
<el-form-item>
<el-input v-model="form.gdline" placeholder="工单行号"></el-input>
</el-form-item>
<el-form-item>
<el-select v-model="form.ms" placeholder="追踪模式">
<el-option v-for="item in msList"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button icon="el-icon-search" @@click="search" circle></el-button>
</el-form-item>
</el-form>
<el-table :data="tableData.slice((currentPage-1)*pageSize,currentPage*pageSize)" height="650" stripe border
style="width: 100%"
size="small"
@@cell-mouse-enter="handleCellEnter"
@@cell-mouse-leave="handleCellLeave">
@@cell-mouse-leave="handleCellLeave"
@@selection-change="handleSelectionChange">
<el-table-column type="selection"
width="55">
</el-table-column>
@ -53,6 +91,15 @@
<el-table-column label="存货追踪模式" width="100" align="center" prop="STOCOD_0"></el-table-column>
</el-table>
<el-pagination align='center'
@@size-change="handleSizeChange"
@@current-change="handleCurrentChange"
:current-page="currentPage"
:page-sizes="[1,5,10,20]"
:page-size="pageSize"
layout="total, sizes, prev, pager, next, jumper"
:total="tableData.length">
</el-pagination>
</el-row>
<script>
@ -60,25 +107,55 @@
el: "#XWMSMFM",
data() {
return {
billTable: [],
form: {
address: '',
zjcode: '',
materialcode: '',
gdbill: '',
gdline:'',
ms:''
},
//1:正常扣料,2:倒扣料,3:不管理
msList: [{
value: '1',
label: '正常扣料'
}, {
value: '2',
label: '倒扣料'
}, {
value: '3',
label: '不管理'
}],
addressList: [{
value: 'QCT',
label: 'QCT'
}, {
value: 'SBD',
label: 'SBD'
}],
tableData: [],
currentPage: 1, // 当前页码
total: 20, // 总条数
pageSize: 20, // 每页的数据条数
multipleSelection: [],
// 需要编辑的属性
editProp: ['POHFCY_0']
};
},
mounted: function () {
// 获取所有单据编码
$.ajax({
type: "post",
dataType: "json",
data: {},
url: "/xwms/XWMSMFM/Search",
success: function (json) {
app.billTable = json.Data;
},
error: function (json) {
alert("加载失败");
}
});
// $.ajax({
// type: "post",
// dataType: "json",
// data: {},
// url: "/xwms/XWMSMFM/Search",
// success: function (json) {
// app.tableData = json.Data;
// },
// error: function (json) {
// alert("加载失败");
// }
// });
},
computed: {
foodLabel() {
@ -103,6 +180,62 @@
cell.querySelector('.item__input').style.display = 'none'
cell.querySelector('.item__txt').style.display = 'block'
}
},
//每页条数改变时触发 选择一页显示多少行
handleSizeChange(val) {
this.currentPage = 1;
this.pageSize = val;
},
//当前页改变时触发 跳转其他页
handleCurrentChange(val) {
this.currentPage = val;
},
handleSelectionChange(val) {
this.multipleSelection = val;
},
search() {
var _this = this;
$.ajax({
type: "post",
dataType: "json",
data: {
address: _this.form.address,
zjcode: _this.form.zjcode,
materialcode: _this.form.materialcode,
gdbill: _this.form.gdbill,
gdline: _this.form.gdline,
ms: _this.form.ms
},
url: "/xwms/XWMSMFM/Search",
success: function (json) {
app.tableData = json.Data;
},
error: function (json) {
alert("加载失败");
}
});
},
create() {
var _this = this;
$.ajax({
type: "post",
dataType: "json",
data: {
data: _this.multipleSelection
},
url: "/xwms/XWMSMFM/Create",
success: function (json) {
if (json.Code == 200) {
_this.$message({
message: "创建成功!"
});
_this.$refs.multipleTable.clearSelection();
}
},
error: function (json) {
alert("加载失败");
}
});
}
},
});

View File

@ -192,7 +192,8 @@
</el-form-item>
</el-form>
<el-table :data="billTable" height="750" stripe border
<el-table :data="tableData.slice((currentPage-1)*pageSize,currentPage*pageSize)"
height="650" stripe border
style="width: 100%"
size="small"
@@cell-mouse-enter="handleCellEnter"
@ -252,6 +253,16 @@
<el-table-column label="备注" align="center" prop="YITMDES4_0" show-overflow-tooltip></el-table-column>
</el-table>
<el-pagination align='center'
@@size-change="handleSizeChange"
@@current-change="handleCurrentChange"
:current-page="currentPage"
:page-sizes="[1,5,10,20]"
:page-size="pageSize"
layout="total, sizes, prev, pager, next, jumper"
:total="tableData.length">
</el-pagination>
</el-row>
<script>
@ -282,7 +293,10 @@
value: 'R',
label: 'R'
}],
billTable: [],
tableData: [],
currentPage: 1, // 当前页码
total: 20, // 总条数
pageSize: 20, // 每页的数据条数
// 需要编辑的属性
editProp: ['THISQTYUOM', 'THISQTYSTU', 'STA_0'],
multipleSelection: []
@ -296,7 +310,7 @@
// data: {},
// url: "/xwms/XWMSPOH/Search",
// success: function (json) {
// app.billTable = json.Data;
// app.tableData = json.Data;
// },
// error: function (json) {
// alert("加载失败");
@ -327,9 +341,15 @@
cell.querySelector('.item__txt').style.display = 'block'
}
},
// handleCellClick(row, column, cell, event) {
// console.log(row.STA_0);
// },
//每页条数改变时触发 选择一页显示多少行
handleSizeChange(val) {
this.currentPage = 1;
this.pageSize = val;
},
//当前页改变时触发 跳转其他页
handleCurrentChange(val) {
this.currentPage = val;
},
handleSelectionChange(val) {
this.multipleSelection = val;
},
@ -338,14 +358,15 @@
$.ajax({
type: "post",
dataType: "json",
data: { address: _this.form.address,
data: {
address: _this.form.address,
billno: _this.form.billno,
supply: _this.form.supply,
materialcode: _this.form.materialcode
},
url: "/xwms/XWMSPOH/Search",
success: function (json) {
app.billTable = json.Data;
app.tableData = json.Data;
},
error: function (json) {
alert("加载失败");
@ -353,8 +374,6 @@
});
},
create() {
var _this = this;
console.log(_this.multipleSelection);
var _this = this;
$.ajax({
type: "post",

View File

@ -23,16 +23,47 @@
}
</style>
<el-row id="XWMSPTH">
<el-table :data="billTable" height="750" stripe border
<el-form :inline="true" :model="form">
<el-col span="24">
<el-button type="primary" icon="el-icon-plus" @@click="create">采购退货</el-button>
</el-col>
<el-form-item>
<el-select v-model="form.address" placeholder="地点">
<el-option v-for="item in addressList"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-input v-model="form.materialcode" placeholder="物料编码"></el-input>
</el-form-item>
<el-form-item>
<el-input v-model="form.cgsh" placeholder="采购收货"></el-input>
</el-form-item>
<el-form-item>
<el-input v-model="form.billno" placeholder="采购订单"></el-input>
</el-form-item>
<el-form-item>
<el-input v-model="form.supply" placeholder="供应商编码"></el-input>
</el-form-item>
<el-form-item>
<el-button icon="el-icon-search" @@click="search" circle></el-button>
</el-form-item>
</el-form>
<el-table :data="tableData.slice((currentPage-1)*pageSize,currentPage*pageSize)" height="650" stripe border
style="width: 100%"
size="small"
@@cell-mouse-enter="handleCellEnter"
@@cell-mouse-leave="handleCellLeave">
@@cell-mouse-leave="handleCellLeave"
@@selection-change="handleSelectionChange">
<el-table-column type="selection"
width="55">
</el-table-column>
<el-table-column label="地点" align="center" prop="PRHFCY_0"></el-table-column>
<el-table-column label="收货日期" width="100" align="center" prop="ORDDAT_0"></el-table-column>
<el-table-column label="收货日期" width="100" align="center" prop="RCPDAT_0"></el-table-column>
@* <el-table-column label="供应商" align="center" prop="BPSNUM_0"></el-table-column> *@
<el-table-column label="供应商名称" width="150" align="center" prop="BPSNAM_0" show-overflow-tooltip></el-table-column>
<el-table-column label="采购收货号" width="150" align="center" prop="PTHNUM_0"></el-table-column>
@ -58,6 +89,15 @@
<el-table-column label="本次退货量(库存单位)" width="100" align="center" prop="THISQTYSTU"></el-table-column>
<el-table-column label="退货量(采购单位)" width="100" align="center" prop="THISQTYUOM"></el-table-column>
</el-table>
<el-pagination align='center'
@@size-change="handleSizeChange"
@@current-change="handleCurrentChange"
:current-page="currentPage"
:page-sizes="[1,5,10,20]"
:page-size="pageSize"
layout="total, sizes, prev, pager, next, jumper"
:total="tableData.length">
</el-pagination>
</el-row>
<script>
@ -65,25 +105,43 @@
el: "#XWMSPTH",
data() {
return {
billTable: [],
form: {
address: '',
billno: '',
supply: '',
materialcode: '',
cgsh: ''
},
addressList: [{
value: 'QCT',
label: 'QCT'
}, {
value: 'SBD',
label: 'SBD'
}],
tableData: [],
currentPage: 1, // 当前页码
total: 20, // 总条数
pageSize: 20, // 每页的数据条数
multipleSelection: [],
// 需要编辑的属性
editProp: ['POHFCY_0']
};
},
mounted: function () {
// 获取所有单据编码
$.ajax({
type: "post",
dataType: "json",
data: {},
url: "/xwms/XWMSPTH/Search",
success: function (json) {
app.billTable = json.Data;
},
error: function (json) {
alert("加载失败");
}
});
// $.ajax({
// type: "post",
// dataType: "json",
// data: {},
// url: "/xwms/XWMSPTH/Search",
// success: function (json) {
// app.tableData = json.Data;
// },
// error: function (json) {
// alert("加载失败");
// }
// });
},
computed: {
foodLabel() {
@ -108,6 +166,61 @@
cell.querySelector('.item__input').style.display = 'none'
cell.querySelector('.item__txt').style.display = 'block'
}
},
//每页条数改变时触发 选择一页显示多少行
handleSizeChange(val) {
this.currentPage = 1;
this.pageSize = val;
},
//当前页改变时触发 跳转其他页
handleCurrentChange(val) {
this.currentPage = val;
},
handleSelectionChange(val) {
this.multipleSelection = val;
},
search() {
var _this = this;
$.ajax({
type: "post",
dataType: "json",
data: {
address: _this.form.address,
billno: _this.form.billno,
supply: _this.form.supply,
materialcode: _this.form.materialcode,
cgsh: _this.form.cgsh,
},
url: "/xwms/XWMSPTH/Search",
success: function (json) {
app.tableData = json.Data;
},
error: function (json) {
alert("加载失败");
}
});
},
create() {
var _this = this;
$.ajax({
type: "post",
dataType: "json",
data: {
data: _this.multipleSelection
},
url: "/xwms/XWMSPTH/Create",
success: function (json) {
if (json.Code == 200) {
_this.$message({
message: "创建成功!"
});
_this.$refs.multipleTable.clearSelection();
}
},
error: function (json) {
alert("加载失败");
}
});
}
},
});

View File

@ -23,11 +23,38 @@
}
</style>
<el-row id="XWMSSHIP">
<el-table :data="billTable" height="750" stripe border
<el-form :inline="true" :model="form">
<el-col span="24">
<el-button type="primary" icon="el-icon-plus" @@click="create">创建单据</el-button>
</el-col>
<el-form-item>
<el-select v-model="form.address" placeholder="地点">
<el-option v-for="item in addressList"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-input v-model="form.sbill" placeholder="收货单号"></el-input>
</el-form-item>
<el-form-item>
<el-input v-model="form.billno" placeholder="采购订单"></el-input>
</el-form-item>
<el-form-item>
<el-input v-model="form.materialcode" placeholder="物料编码"></el-input>
</el-form-item>
<el-form-item>
<el-button icon="el-icon-search" @@click="search" circle></el-button>
</el-form-item>
</el-form>
<el-table :data="tableData.slice((currentPage-1)*pageSize,currentPage*pageSize)" height="650" stripe border
style="width: 100%"
size="small"
@@cell-mouse-enter="handleCellEnter"
@@cell-mouse-leave="handleCellLeave">
@@cell-mouse-leave="handleCellLeave"
@@selection-change="handleSelectionChange">
<el-table-column type="selection"
width="55">
</el-table-column>
@ -37,7 +64,7 @@
<el-table-column label="内部供应商名称" width="150" align="center" prop="BPRNAM_0" show-overflow-tooltip></el-table-column>
<el-table-column label="发货单号" width="150" align="center" prop="SDHNUM_0"></el-table-column>
<el-table-column label="发货行号" width="100" align="center" prop="SDDLIN_0"></el-table-column>
<el-table-column label="产品编码" width="100" align="center" prop="ITMREF_0"></el-table-column>
<el-table-column label="产品编码" width="180" align="center" prop="ITMREF_0"></el-table-column>
<el-table-column label="名称" width="150" align="center" prop="ITMDES1_0" show-overflow-tooltip></el-table-column>
<el-table-column label="代号" width="150" align="center" prop="ITMDES2_0" show-overflow-tooltip></el-table-column>
<el-table-column label="备注" width="100" align="center" prop="YITMDES4_0" show-overflow-tooltip></el-table-column>
@ -51,6 +78,15 @@
<el-table-column label="订单行号" width="100" align="center" prop="POPLIN_0"></el-table-column>
</el-table>
<el-pagination align='center'
@@size-change="handleSizeChange"
@@current-change="handleCurrentChange"
:current-page="currentPage"
:page-sizes="[1,5,10,20]"
:page-size="pageSize"
layout="total, sizes, prev, pager, next, jumper"
:total="tableData.length">
</el-pagination>
</el-row>
<script>
@ -58,25 +94,42 @@
el: "#XWMSSHIP",
data() {
return {
billTable: [],
form: {
address: '',
billno: '',
sbill: '',
materialcode: ''
},
addressList: [{
value: 'QCT',
label: 'QCT'
}, {
value: 'SBD',
label: 'SBD'
}],
tableData: [],
currentPage: 1, // 当前页码
total: 20, // 总条数
pageSize: 20, // 每页的数据条数
multipleSelection: [],
// 需要编辑的属性
editProp: ['POHFCY_0']
};
},
mounted: function () {
// 获取所有单据编码
$.ajax({
type: "post",
dataType: "json",
data: {},
url: "/xwms/XWMSSHIP/Search",
success: function (json) {
app.billTable = json.Data;
},
error: function (json) {
alert("加载失败");
}
});
// $.ajax({
// type: "post",
// dataType: "json",
// data: {},
// url: "/xwms/XWMSSHIP/Search",
// success: function (json) {
// app.tableData = json.Data;
// },
// error: function (json) {
// alert("加载失败");
// }
// });
},
computed: {
foodLabel() {
@ -101,6 +154,60 @@
cell.querySelector('.item__input').style.display = 'none'
cell.querySelector('.item__txt').style.display = 'block'
}
},
//每页条数改变时触发 选择一页显示多少行
handleSizeChange(val) {
this.currentPage = 1;
this.pageSize = val;
},
//当前页改变时触发 跳转其他页
handleCurrentChange(val) {
this.currentPage = val;
},
handleSelectionChange(val) {
this.multipleSelection = val;
},
search() {
var _this = this;
$.ajax({
type: "post",
dataType: "json",
data: {
address: _this.form.address,
billno: _this.form.billno,
sbill: _this.form.sbill,
materialcode: _this.form.materialcode
},
url: "/xwms/XWMSSHIP/Search",
success: function (json) {
app.tableData = json.Data;
},
error: function (json) {
alert("加载失败");
}
});
},
create() {
var _this = this;
$.ajax({
type: "post",
dataType: "json",
data: {
data: _this.multipleSelection
},
url: "/xwms/XWMSSHIP/Create",
success: function (json) {
if (json.Code == 200) {
_this.$message({
message: "创建成功!"
});
_this.$refs.multipleTable.clearSelection();
}
},
error: function (json) {
alert("加载失败");
}
});
}
},
});

View File

@ -23,11 +23,39 @@
}
</style>
<el-row id="XWMSSOH">
<el-table :data="billTable" height="750" stripe border
<el-form :inline="true" :model="form">
<el-col span="24">
<el-button type="primary" icon="el-icon-plus" @@click="create">创建单据</el-button>
</el-col>
<el-form-item>
<el-select v-model="form.address" placeholder="地点">
<el-option v-for="item in addressList"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-input v-model="form.materialcode" placeholder="物料编码"></el-input>
</el-form-item>
<el-form-item>
<el-input v-model="form.billno" placeholder="销售订单"></el-input>
</el-form-item>
<el-form-item>
<el-input v-model="form.cust" placeholder="客户名称"></el-input>
</el-form-item>
<el-form-item>
<el-button icon="el-icon-search" @@click="search" circle></el-button>
</el-form-item>
</el-form>
<el-table :data="tableData.slice((currentPage-1)*pageSize,currentPage*pageSize)" height="650" stripe border
style="width: 100%"
size="small"
@@cell-mouse-enter="handleCellEnter"
@@cell-mouse-leave="handleCellLeave">
@@cell-mouse-leave="handleCellLeave"
@@selection-change="handleSelectionChange">
<el-table-column type="selection"
width="55">
</el-table-column>
@ -49,6 +77,15 @@
<el-table-column label="发货地址" width="100" align="center" prop="BPAADD_0"></el-table-column>
</el-table>
<el-pagination align='center'
@@size-change="handleSizeChange"
@@current-change="handleCurrentChange"
:current-page="currentPage"
:page-sizes="[1,5,10,20]"
:page-size="pageSize"
layout="total, sizes, prev, pager, next, jumper"
:total="tableData.length">
</el-pagination>
</el-row>
<script>
@ -56,25 +93,42 @@
el: "#XWMSSOH",
data() {
return {
billTable: [],
form: {
address: '',
billno: '',
cust: '',
materialcode: ''
},
addressList: [{
value: 'QCT',
label: 'QCT'
}, {
value: 'SBD',
label: 'SBD'
}],
tableData: [],
currentPage: 1, // 当前页码
total: 20, // 总条数
pageSize: 20, // 每页的数据条数
multipleSelection: [],
// 需要编辑的属性
editProp: ['POHFCY_0']
};
},
mounted: function () {
// 获取所有单据编码
$.ajax({
type: "post",
dataType: "json",
data: {},
url: "/xwms/XWMSSOH/Search",
success: function (json) {
app.billTable = json.Data;
},
error: function (json) {
alert("加载失败");
}
});
// $.ajax({
// type: "post",
// dataType: "json",
// data: {},
// url: "/xwms/XWMSSOH/Search",
// success: function (json) {
// app.tableData = json.Data;
// },
// error: function (json) {
// alert("加载失败");
// }
// });
},
computed: {
foodLabel() {
@ -99,6 +153,60 @@
cell.querySelector('.item__input').style.display = 'none'
cell.querySelector('.item__txt').style.display = 'block'
}
},
//每页条数改变时触发 选择一页显示多少行
handleSizeChange(val) {
this.currentPage = 1;
this.pageSize = val;
},
//当前页改变时触发 跳转其他页
handleCurrentChange(val) {
this.currentPage = val;
},
handleSelectionChange(val) {
this.multipleSelection = val;
},
search() {
var _this = this;
$.ajax({
type: "post",
dataType: "json",
data: {
address: _this.form.address,
billno: _this.form.billno,
cust: _this.form.cust,
materialcode: _this.form.materialcode
},
url: "/xwms/XWMSSOH/Search",
success: function (json) {
app.tableData = json.Data;
},
error: function (json) {
alert("加载失败");
}
});
},
create() {
var _this = this;
$.ajax({
type: "post",
dataType: "json",
data: {
data: _this.multipleSelection
},
url: "/xwms/XWMSSOH/Create",
success: function (json) {
if (json.Code == 200) {
_this.$message({
message: "创建成功!"
});
_this.$refs.multipleTable.clearSelection();
}
},
error: function (json) {
alert("加载失败");
}
});
}
},
});