feat: 更新仓库枚举值和过滤条件,添加不等操作符支持
refactor: 重构任务和库存相关界面的查询逻辑
fix: 修复库存状态过滤条件错误问题
style: 统一代码格式和命名规范
| | |
| | | |
| | | //此js文件是用来自定义扩展业务代码,可以扩展一些自定义页面或者重新配置生成的代码 |
| | | import gridBody from './extend/taskExecuteDetail.vue' |
| | | import gridBody from "./extend/taskExecuteDetail.vue"; |
| | | let extension = { |
| | | components: { |
| | | //查询界面扩展组件 |
| | | gridHeader: '', |
| | | gridHeader: "", |
| | | gridBody: gridBody, |
| | | gridFooter: '', |
| | | gridFooter: "", |
| | | //新建、编辑弹出框扩展组件 |
| | | modelHeader: '', |
| | | modelBody: '', |
| | | modelFooter: '' |
| | | modelHeader: "", |
| | | modelBody: "", |
| | | modelFooter: "", |
| | | }, |
| | | tableAction: '', //指定某张表的权限(这里填写表名,默认不用填写) |
| | | tableAction: "", //指定某张表的权限(这里填写表名,默认不用填写) |
| | | buttons: { view: [], box: [], detail: [] }, //扩展的按钮 |
| | | methods: { |
| | | //下面这些方法可以保留也可以删除 |
| | |
| | | |
| | | //扩展页面初始化操作 |
| | | this.columns.push({ |
| | | field: '操作', |
| | | title: '操作', |
| | | field: "操作", |
| | | title: "操作", |
| | | width: 70, |
| | | fixed: 'right', |
| | | align: 'center', |
| | | fixed: "right", |
| | | align: "center", |
| | | formatter: (row) => { |
| | | return ( |
| | | '<i style="cursor: pointer;color: #2d8cf0;"class="el-icon-view">查看</i>' |
| | | ); |
| | | return '<i style="cursor: pointer;color: #2d8cf0;"class="el-icon-view">查看</i>'; |
| | | }, |
| | | click: (row) => { |
| | | this.$refs.gridBody.open(row); |
| | | } |
| | | }, |
| | | }); |
| | | }, |
| | | onInited() { |
| | |
| | | searchBefore(param) { |
| | | //界面查询前,可以给param.wheres添加查询参数 |
| | | //返回false,则不会执行查询 |
| | | // 第一个过滤条件 |
| | | const roadwayFilter1 = { |
| | | name: "roadway", |
| | | value: "ZJSC1", |
| | | displayType: "notequal", |
| | | }; |
| | | |
| | | // 第二个过滤条件 |
| | | const roadwayFilter2 = { |
| | | name: "roadway", |
| | | value: "FJSC1", |
| | | displayType: "notequal", |
| | | }; |
| | | |
| | | if (!param.wheres) { |
| | | param.wheres = []; |
| | | } |
| | | |
| | | // 将两个过滤条件添加到查询参数中 |
| | | param.wheres.push(roadwayFilter1); |
| | | param.wheres.push(roadwayFilter2); |
| | | return true; |
| | | }, |
| | | searchAfter(result) { |
| | |
| | | //(3)this.editFormFields.字段='xxx'; |
| | | //如果需要给下拉框设置默认值,请遍历this.editFormOptions找到字段配置对应data属性的key值 |
| | | //看不懂就把输出看:console.log(this.editFormOptions) |
| | | } |
| | | } |
| | | }, |
| | | }, |
| | | }; |
| | | export default extension; |
| | |
| | | // 框架初始化配置后
|
| | | },
|
| | | searchBefore(param) {
|
| | | const locationCodeFilter = {
|
| | | const stockStatusFilter = {
|
| | | name: "stockStatus",
|
| | | value: "1",
|
| | | displayType: "int"
|
| | |
| | | param.wheres = [];
|
| | | }
|
| | | // 将过滤条件添加到查询参数中
|
| | | param.wheres.push(locationCodeFilter);
|
| | | param.wheres.push(stockStatusFilter);
|
| | | return true;
|
| | | },
|
| | | searchAfter(result) {
|
| | |
| | | } |
| | | }, |
| | | searchBefore(param) { |
| | | const stockStatusFilter = { |
| | | name: "stockStatus", |
| | | value: "1", |
| | | displayType: "notequal" |
| | | }; |
| | | if (!param.wheres) { |
| | | param.wheres = []; |
| | | } |
| | | // 将过滤条件添加到查询参数中 |
| | | param.wheres.push(stockStatusFilter); |
| | | return true; |
| | | }, |
| | | searchAfter(result) { |
| | |
| | | let extension = { |
| | | components: { |
| | | //查询界面扩展组件 |
| | | gridHeader: '', |
| | | gridBody: '', |
| | | gridFooter: '', |
| | | gridHeader: "", |
| | | gridBody: "", |
| | | gridFooter: "", |
| | | //新建、编辑弹出框扩展组件 |
| | | modelHeader: '', |
| | | modelBody: '', |
| | | modelFooter: '' |
| | | modelHeader: "", |
| | | modelBody: "", |
| | | modelFooter: "", |
| | | }, |
| | | tableAction: '', |
| | | tableAction: "", |
| | | buttons: { view: [], box: [], detail: [] }, |
| | | methods: { |
| | | onInit() { |
| | | // 添加MES操作列 |
| | | this.columns.push({ |
| | | title: '操作', |
| | | field: '操作', |
| | | align: 'center', |
| | | title: "操作", |
| | | field: "操作", |
| | | align: "center", |
| | | width: 200, |
| | | fixed: 'right', |
| | | fixed: "right", |
| | | render: (h, { row, column, index }) => { |
| | | return ( |
| | | <div> |
| | | <el-button |
| | | type="primary" |
| | | size="small" |
| | | onClick={($e) => { this.handleInbound(row); }} |
| | | >进站</el-button> |
| | | onClick={($e) => { |
| | | this.handleInbound(row); |
| | | }} |
| | | > |
| | | 进站 |
| | | </el-button> |
| | | <el-button |
| | | type="success" |
| | | size="small" |
| | | style="margin-left: 8px" |
| | | onClick={($e) => { this.handleOutbound(row); }} |
| | | >出站</el-button> |
| | | onClick={($e) => { |
| | | this.handleOutbound(row); |
| | | }} |
| | | > |
| | | 出站 |
| | | </el-button> |
| | | </div> |
| | | ); |
| | | } |
| | | }, |
| | | }); |
| | | }, |
| | | |
| | | // 托盘进站操作 |
| | | async handleInbound(row) { |
| | | try { |
| | | await this.$confirm(`确认执行托盘进站操作?\n托盘编号:${row.palletCode}`, "进站确认", { |
| | | await this.$confirm( |
| | | `确认执行托盘进站操作?\n托盘编号:${row.palletCode}`, |
| | | "进站确认", |
| | | { |
| | | confirmButtonText: "确认", |
| | | cancelButtonText: "取消", |
| | | type: "warning" |
| | | }); |
| | | type: "warning", |
| | | }, |
| | | ); |
| | | |
| | | const result = await this.http.post("/api/StockInfo/inboundInContainer", { |
| | | const result = await this.http.post( |
| | | "/api/StockInfo/inboundInContainer", |
| | | { |
| | | palletCode: row.palletCode, |
| | | stockId: row.id |
| | | }, "正在调用MES接口..."); |
| | | stockId: row.id, |
| | | }, |
| | | "正在调用MES接口...", |
| | | ); |
| | | |
| | | if (result.status) { |
| | | this.$Message.success(result.message || "托盘进站成功"); |
| | |
| | | // 托盘出站操作 |
| | | async handleOutbound(row) { |
| | | try { |
| | | await this.$confirm(`确认执行托盘出站操作?\n托盘编号:${row.palletCode}`, "出站确认", { |
| | | await this.$confirm( |
| | | `确认执行托盘出站操作?\n托盘编号:${row.palletCode}`, |
| | | "出站确认", |
| | | { |
| | | confirmButtonText: "确认", |
| | | cancelButtonText: "取消", |
| | | type: "warning" |
| | | }); |
| | | type: "warning", |
| | | }, |
| | | ); |
| | | |
| | | const result = await this.http.post("/api/StockInfo/outboundInContainer", { |
| | | const result = await this.http.post( |
| | | "/api/StockInfo/outboundInContainer", |
| | | { |
| | | palletCode: row.palletCode, |
| | | stockId: row.id |
| | | }, "正在调用MES接口..."); |
| | | stockId: row.id, |
| | | }, |
| | | "正在调用MES接口...", |
| | | ); |
| | | |
| | | if (result.status) { |
| | | this.$Message.success(result.message || "托盘出站成功"); |
| | |
| | | // 框架初始化配置后 |
| | | }, |
| | | searchBefore(param) { |
| | | const stockStatusFilter = { |
| | | name: "stockStatus", |
| | | value: "1", |
| | | displayType: "notequal", |
| | | }; |
| | | if (!param.wheres) { |
| | | param.wheres = []; |
| | | } |
| | | // 将过滤条件添加到查询参数中 |
| | | param.wheres.push(stockStatusFilter); |
| | | return true; |
| | | }, |
| | | searchAfter(result) { |
| | |
| | | }, |
| | | modelOpenAfter(row) { |
| | | // 点击编辑、新建按钮弹出框后 |
| | | } |
| | | } |
| | | }, |
| | | }, |
| | | }; |
| | | |
| | | export default extension; |
| | |
| | | // 第一个过滤条件
|
| | | const roadwayFilter1 = {
|
| | | name: "roadway",
|
| | | value: "ZJ1",
|
| | | value: "ZJSC1",
|
| | | displayType: "like",
|
| | | };
|
| | |
|
| | | // 第二个过滤条件
|
| | | const roadwayFilter2 = {
|
| | | name: "roadway",
|
| | | value: "FJ1",
|
| | | value: "FJSC1",
|
| | | displayType: "like",
|
| | | };
|
| | |
|
| | |
| | | |
| | | //此js文件是用来自定义扩展业务代码,可以扩展一些自定义页面或者重新配置生成的代码 |
| | | import gridBodyExtension from './extend/gridBodyExtension.vue' |
| | | import gridBodyExtension from "./extend/gridBodyExtension.vue"; |
| | | |
| | | let extension = { |
| | | components: { |
| | | //查询界面扩展组件 |
| | | gridHeader: '', |
| | | gridHeader: "", |
| | | gridBody: gridBodyExtension, |
| | | gridFooter: '', |
| | | gridFooter: "", |
| | | //新建、编辑弹出框扩展组件 |
| | | modelHeader: '', |
| | | modelBody: '', |
| | | modelFooter: '', |
| | | modelHeader: "", |
| | | modelBody: "", |
| | | modelFooter: "", |
| | | }, |
| | | tableAction: '', //指定某张表的权限(这里填写表名,默认不用填写) |
| | | tableAction: "", //指定某张表的权限(这里填写表名,默认不用填写) |
| | | buttons: { view: [], box: [], detail: [] }, //扩展的按钮 |
| | | methods: { |
| | | //下面这些方法可以保留也可以删除 |
| | | onInit() { |
| | | //添加"手动创建任务"按钮 |
| | | this.buttons.push({ |
| | | name: '手动创建任务', |
| | | icon: 'el-icon-plus', |
| | | type: 'primary', |
| | | value: 'ManualCreateTask', |
| | | name: "手动创建任务", |
| | | icon: "el-icon-plus", |
| | | type: "primary", |
| | | value: "ManualCreateTask", |
| | | onClick: () => { |
| | | this.$refs.gridBody.open(); |
| | | } |
| | | }, |
| | | }); |
| | | //添加"手动下发"按钮 |
| | | this.buttons.push({ |
| | | name: '手动下发', |
| | | icon: 'el-icon-s-promotion', |
| | | type: 'primary', |
| | | value: 'DispatchTasksToWCS', |
| | | name: "手动下发", |
| | | icon: "el-icon-s-promotion", |
| | | type: "primary", |
| | | value: "DispatchTasksToWCS", |
| | | onClick: () => { |
| | | let rows = this.$refs.table.getSelected(); |
| | | if (rows.length == 0) return this.$error("请先选择任务"); |
| | | this.$refs.gridBody.openDispatch(rows); |
| | | } |
| | | }, |
| | | }); |
| | | |
| | | let TaskHandCancelBtn = this.buttons.find(x => x.value == 'TaskHandCancel'); |
| | | let TaskHandCancelBtn = this.buttons.find( |
| | | (x) => x.value == "TaskHandCancel", |
| | | ); |
| | | if (TaskHandCancelBtn) { |
| | | TaskHandCancelBtn.onClick = function () { |
| | | let rows = this.$refs.table.getSelected(); |
| | |
| | | .post("api/Task/TaskCancel?taskNum="+param, "数据处理中...") |
| | | .then((x) => { |
| | | if (x.status) { |
| | | this.$Message.success('任务取消成功.'); |
| | | this.$Message.success("任务取消成功."); |
| | | this.refresh(); |
| | | } else { |
| | | return this.$error(x.message); |
| | | } |
| | | }); |
| | | }; |
| | | } |
| | | } |
| | | let TaskHandCompletedBtn = this.buttons.find(x => x.value == 'TaskHandCompleted'); |
| | | let TaskHandCompletedBtn = this.buttons.find( |
| | | (x) => x.value == "TaskHandCompleted", |
| | | ); |
| | | if (TaskHandCompletedBtn) { |
| | | TaskHandCompletedBtn.onClick = function () { |
| | | let rows = this.$refs.table.getSelected(); |
| | |
| | | .post("api/Task/TaskCompleted?taskNum="+param, "数据处理中...") |
| | | .then((x) => { |
| | | if (x.status) { |
| | | this.$Message.success('任务手动完成'); |
| | | this.$Message.success("任务手动完成"); |
| | | this.refresh(); |
| | | } else { |
| | | return this.$error(x.message); |
| | | } |
| | | }); |
| | | } |
| | | }; |
| | | } |
| | | }, |
| | | onInited() { |
| | |
| | | searchBefore(param) { |
| | | //界面查询前,可以给param.wheres添加查询参数 |
| | | //返回false,则不会执行查询 |
| | | |
| | | // 第一个过滤条件 |
| | | const roadwayFilter1 = { |
| | | name: "roadway", |
| | | value: "ZJSC1", |
| | | displayType: "notequal", |
| | | }; |
| | | |
| | | // 第二个过滤条件 |
| | | const roadwayFilter2 = { |
| | | name: "roadway", |
| | | value: "FJSC1", |
| | | displayType: "notequal", |
| | | }; |
| | | |
| | | if (!param.wheres) { |
| | | param.wheres = []; |
| | | } |
| | | |
| | | // 将两个过滤条件添加到查询参数中 |
| | | param.wheres.push(roadwayFilter1); |
| | | param.wheres.push(roadwayFilter2); |
| | | return true; |
| | | }, |
| | | searchAfter(result) { |
| | |
| | | //(3)this.editFormFields.字段='xxx'; |
| | | //如果需要给下拉框设置默认值,请遍历this.editFormOptions找到字段配置对应data属性的key值 |
| | | //看不懂就把输出看:console.log(this.editFormOptions) |
| | | } |
| | | } |
| | | }, |
| | | }, |
| | | }; |
| | | export default extension; |
| | |
| | | sortName: "id", |
| | | }); |
| | | const editFormFields = ref({ |
| | | locationCode: "", |
| | | warehouseId: "", |
| | | roadwayNo: "", |
| | | locationType: "", |
| | | enableStatus: "", |
| | | locationStatus: "", |
| | | row: "", |
| | | column: "", |
| | | layer: "", |
| | | }); |
| | | const editFormOptions = ref([ |
| | | [ |
| | |
| | |
|
| | | const editFormFields = ref({
|
| | | palletCode: "",
|
| | | palletType: 0,
|
| | | warehouseId: 0,
|
| | | mesUploadStatus: "",
|
| | | stockStatus: "",
|
| | | locationCode: "",
|
| | | locationDetails: ""
|
| | | });
|
| | |
|
| | |
|
| | | const editFormOptions = ref([
|
| | | [
|
| | | { field: "palletCode", title: TEXT.palletCode, type: "string" },
|
| | | { field: "stockStatus", title: TEXT.stockStatus, type: "select", dataKey: "stockStatusEmun", data: []},
|
| | | { field: "locationCode", title: TEXT.locationCode, type: "string" },
|
| | | ],
|
| | | ]);
|
| | |
|
| | | const searchFormFields = ref({
|
| | | palletCode: "",
|
| | | stockStatus: "",
|
| | | locationCode: "",
|
| | | });
|
| | |
|
| | | const searchFormOptions = ref([
|
| | | [
|
| | | { title: TEXT.palletCode, field: "palletCode", type: "like" },
|
| | | { title: TEXT.stockStatus, field: "stockStatus", type: "selectList", dataKey: "stockStatusEmun", data: [] },
|
| | | { title: TEXT.locationCode, field: "locationCode", type: "like" },
|
| | | ],
|
| | | ]);
|
| | |
| | | |
| | | const editFormFields = ref({ |
| | | palletCode: "", |
| | | palletType: 0, |
| | | warehouseId: 0, |
| | | mesUploadStatus: "", |
| | | stockStatus: "", |
| | | locationCode: "", |
| | | locationDetails: "" |
| | | }); |
| | | |
| | | |
| | | const editFormOptions = ref([ |
| | | [ |
| | | { field: "palletCode", title: TEXT.palletCode, type: "string" }, |
| | | { field: "stockStatus", title: TEXT.stockStatus, type: "select", dataKey: "stockStatusEmun", data: []}, |
| | | { field: "locationCode", title: TEXT.locationCode, type: "string" }, |
| | | ], |
| | | ]); |
| | | |
| | | const searchFormFields = ref({ |
| | | palletCode: "", |
| | | stockStatus: "", |
| | | locationCode: "", |
| | | }); |
| | | |
| | | const searchFormOptions = ref([ |
| | | [ |
| | | { title: TEXT.palletCode, field: "palletCode", type: "like" }, |
| | | { title: TEXT.stockStatus, field: "stockStatus", type: "selectList", dataKey: "stockStatusEmun", data: [] }, |
| | | { title: TEXT.locationCode, field: "locationCode", type: "like" }, |
| | | ], |
| | | ]); |
| | |
| | | /// 分容1号仓库 |
| | | /// </summary> |
| | | [Description("分容1号仓库")] |
| | | HCFR1 = 3, |
| | | HCSC1 = 3, |
| | | /// <summary> |
| | | /// 高温2号仓库 |
| | | /// </summary> |
| | | [Description("高温2号仓库")] |
| | | GW2 = 4, |
| | | GWSC2 = 4, |
| | | /// <summary> |
| | | /// 正极卷仓 |
| | | /// </summary> |
| | | [Description("正极卷仓")] |
| | | ZJ1 = 5, |
| | | ZJ1 = 6, |
| | | /// <summary> |
| | | /// 负极卷仓 |
| | | /// </summary> |
| | | [Description("负极卷仓")] |
| | | FJ1 = 6 |
| | | FJ1 = 7 |
| | | } |
| | | } |
| | |
| | | public const string textarea = "textarea"; |
| | | public const string thanorequal = "thanorequal"; |
| | | public const string lessorequal = "lessorequal"; |
| | | |
| | | public const string notequal = "notequal"; |
| | | |
| | | public const string gt = "gt"; |
| | | public const string lt = "lt"; |
| | |
| | | public const string LessOrequal = "<="; |
| | | public const string Contains = "in"; |
| | | public const string Equal = "="; |
| | | public const string NotEqual = "!=";
|
| | | } |
| | | } |
| | |
| | | case HtmlElementType.like: |
| | | linqExpression = LinqExpressionType.Contains; |
| | | break; |
| | | case HtmlElementType.thanorequal:
|
| | | linqExpression = LinqExpressionType.ThanOrEqual;
|
| | | break;
|
| | | case HtmlElementType.lessorequal:
|
| | | linqExpression = LinqExpressionType.LessThanOrEqual;
|
| | | break; |
| | | case HtmlElementType.notequal:
|
| | | linqExpression = LinqExpressionType.NotEqual;
|
| | | break; |
| | | default: |
| | | linqExpression = LinqExpressionType.Equal; |
| | | break; |