开始对接后台

This commit is contained in:
qianhao.xu
2023-11-14 11:29:05 +08:00
parent 5a191af8a6
commit 57e9b714ae
3 changed files with 60 additions and 7 deletions

View File

@@ -0,0 +1,24 @@
using Microsoft.AspNetCore.Mvc;
using ZR.Model.mes.md;
using ZR.Service.MES.md;
namespace ZR.Admin.WebApi.Controllers.MES.pro
{
[Route("mes/pro/workplan")]
public class ProWorkplanController : BaseController
{
[HttpGet("list")]
public IActionResult List(int pageNum, int pageSize, int year , int week,string partNumber="",string color="")
{
(int, List<MdBom>) data = (0,null);
return ToResponse(new ApiResult(200, "success", data));
}
}
}

View File

@@ -0,0 +1,10 @@
import request from '@/utils/request'
import { downFile } from '@/utils/request'
export function getWorkplanList(query) {
return request({
url: '/mes/pro/workplan/list',
method: 'get',
params: query,
})
}

View File

@@ -23,7 +23,7 @@
<el-col :span="16"> <el-button type="primary">新建生产计划</el-button> </el-col>
</el-row>
<el-table border stripe :data="workplanList" style="width: 100%" height="500" highlight-current-row @current-change="handleCurrentChange">
<el-table border stripe :data="workplanList" v-loading="loading_1" style="width: 100%" height="500" highlight-current-row @current-change="handleCurrentChange">
<el-table-column prop="id" label="流水号" sortable></el-table-column>
<el-table-column prop="year" label="年"> </el-table-column>
<el-table-column prop="week" label="周"> </el-table-column>
@@ -53,7 +53,7 @@
</el-table-column>
</el-table>
<pagination
v-show="total > 0"
v-show="pagination.total > 0"
:total="pagination.total"
:page.sync="pagination.pageNum"
:limit.sync="pagination.pageSize"
@@ -98,6 +98,7 @@
</template>
<script>
import { getWorkplanList } from '@/api/productManagement/workplan.js'
export default {
name: 'workplan',
data() {
@@ -154,22 +155,40 @@ export default {
remark: 12,
},
], //生产计划列表
pagination: {},
pagination: {
total: 0,
pageNum: 1,
pageSize: 10,
},
loading_1:true
}
},
mounted() {},
methods: {},
mounted() {
this.getList();
},
methods: {
getList() {
const query = { ...this.search, ...this.pagination }
getWorkplanList(query).then((res)=>{
if(res.code==200){
this.loading_1=false;
this.workplanList=res.data;
this.pagination.total=res.total
}
})
},
},
}
</script>
<style lang="scss" scoped>
.workplantable {
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.12), 0 0 6px rgba(0, 0, 0, 0.04);
}
.workordertable {
margin-top: 50px;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.12), 0 0 6px rgba(0, 0, 0, 0.04);
}
</style>