Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
095f1ed15e
@ -50,12 +50,3 @@ export function resetBaseKnife(baseKnifeId) {
|
||||
method: 'put'
|
||||
})
|
||||
}
|
||||
|
||||
// 重置刀具台账寿命
|
||||
export function submitZdTask(data) {
|
||||
return request({
|
||||
url: '/mes/md/baseKnife/zdTask',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
@ -42,3 +42,21 @@ export function delZdTask(wmsZdTaskId) {
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
// 提交出库任务
|
||||
export function submitOutTask(data) {
|
||||
return request({
|
||||
url: '/mes/wm/zdTask/out',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 提交出库任务
|
||||
export function submitInTask(data) {
|
||||
return request({
|
||||
url: '/mes/wm/zdTask/in',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
@ -104,7 +104,7 @@
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
:disabled="scope.row.itemOrProduct == 'ITEM' || scope.row.resetCount == 0 || scope.row.resetCount == '' || scope.row.resetCount == null"
|
||||
:disabled="scope.row.itemOrProduct != 'PRODUCT' || scope.row.resetCount == 0 || scope.row.resetCount == '' || scope.row.resetCount == null"
|
||||
@click="handleReset(scope.row)"
|
||||
v-hasPermi="['md:baseKnife:remove']"
|
||||
>重置
|
||||
|
@ -210,15 +210,15 @@
|
||||
<el-input v-model="form.itemCode" placeholder="请输入物料编码" maxlength="64" v-else/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label-width="80">
|
||||
<el-switch v-model="autoGenFlag"
|
||||
active-color="#13ce66"
|
||||
active-text="自动生成"
|
||||
@change="handleAutoGenChange(autoGenFlag)" v-if="optType != 'view'">
|
||||
</el-switch>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<!-- <el-col :span="8">-->
|
||||
<!-- <el-form-item label-width="80">-->
|
||||
<!-- <el-switch v-model="autoGenFlag"-->
|
||||
<!-- active-color="#13ce66"-->
|
||||
<!-- active-text="自动生成"-->
|
||||
<!-- @change="handleAutoGenChange(autoGenFlag)" v-if="optType != 'view'">-->
|
||||
<!-- </el-switch>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </el-col>-->
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
@ -291,15 +291,15 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="标准数量" prop="standardNumber">
|
||||
<el-input-number v-model="form.standardNumber" :min="0" :percision="0" :step="1" disabled
|
||||
v-if="optType=='view'"/>
|
||||
<el-input-number v-model="form.standardNumber" :min="0" :percision="0" :step="1"
|
||||
placeholder="请输入标准数量"
|
||||
v-else/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<!-- <el-col :span="12">-->
|
||||
<!-- <el-form-item label="标准数量" prop="standardNumber">-->
|
||||
<!-- <el-input-number v-model="form.standardNumber" :min="0" :percision="0" :step="1" disabled-->
|
||||
<!-- v-if="optType=='view'"/>-->
|
||||
<!-- <el-input-number v-model="form.standardNumber" :min="0" :percision="0" :step="1"-->
|
||||
<!-- placeholder="请输入标准数量"-->
|
||||
<!-- v-else/>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </el-col>-->
|
||||
<el-col :span="12" v-if="resentEnable">
|
||||
<el-form-item label="刀刃数" prop="attr1">
|
||||
<el-input-number v-model="form.attr1" :min="1" :percision="0" :step="1" disabled
|
||||
|
@ -103,14 +103,22 @@
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-help"
|
||||
@click="handleZd(scope.row)"
|
||||
:disabled="scope.row.status == 1"
|
||||
@click="handleOut(scope.row)"
|
||||
v-if="scope.row.status == 0"
|
||||
v-hasPermi="['wm:zdTask:edit']"
|
||||
>组装</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-warning-edit"
|
||||
icon="el-icon-success"
|
||||
@click="handleIn(scope.row)"
|
||||
v-if="scope.row.status == 1"
|
||||
v-hasPermi="['wm:zdTask:edit']"
|
||||
>组装成功</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleInfo(scope.row)"
|
||||
v-hasPermi="['wm:zdTask:edit']"
|
||||
>编辑</el-button>
|
||||
@ -118,7 +126,7 @@
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
:disabled="scope.row.status == 1"
|
||||
:disabled="scope.row.status == 3"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['wm:zdTask:remove']"
|
||||
>删除</el-button>
|
||||
@ -157,7 +165,7 @@
|
||||
:step="1" v-model="form.productIdQty" placeholder="请输入物料数量" :readonly="infoFlag" :disabled="infoFlag" />
|
||||
</el-form-item>
|
||||
<el-form-item label="所属库位" prop="name">
|
||||
<el-select v-model="form.attr3" placeholder="请选择库位" filterable clearable :disabled="form.status == 1">
|
||||
<el-select v-model="form.attr3" placeholder="请选择库位" filterable clearable :disabled="form.status != 0">
|
||||
<el-option :label="item.areaName" :value="item.areaCode.toString()" v-for="item in areaList"
|
||||
:key="item.areaCode">
|
||||
<span style="float: left">{{ item.areaName }}</span>
|
||||
@ -238,7 +246,7 @@
|
||||
</el-table>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="zdSubmit">组 装</el-button>
|
||||
<el-button type="primary" @click="outSubmit">出 库</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
@ -249,7 +257,7 @@
|
||||
import { listZdTask, getZdTask, delZdTask, addZdTask, updateZdTask } from "@/api/mes/wm/zdTask";
|
||||
import {listPLAN} from "@/api/md/PLAN";
|
||||
import {listMdItem} from "@/api/mes/md/mdItem"
|
||||
import {submitZdTask} from "@/api/mes/md/baseKnife"
|
||||
import {submitOutTask, submitInTask} from "@/api/mes/wm/zdTask"
|
||||
import {listROUTE, getROUTE} from "@/api/md/ROUTE"
|
||||
import {listArea} from "@/api/mes/wm/area"
|
||||
|
||||
@ -289,13 +297,21 @@ export default {
|
||||
rules: {
|
||||
code: [
|
||||
{ required: true, message: "编码不能为空", trigger: "blur" }
|
||||
], name: [
|
||||
],
|
||||
name: [
|
||||
{ required: true, message: "名称不能为空", trigger: "blur" }
|
||||
], mProductId: [
|
||||
{ required: true, message: "物料编码不能为空", trigger: "change" }
|
||||
], productIdQty: [
|
||||
{ required: true, message: "物料数量不能为空", trigger: "blur" }
|
||||
], },
|
||||
],
|
||||
mProductId: [
|
||||
{ required: true, message: "请选择物料", trigger: "change" }
|
||||
],
|
||||
productIdQty: [
|
||||
{ required: true, message: "数量不能为0", trigger: "blur" },
|
||||
{ type: "number", min: 1, message: "数量至少为1"}
|
||||
],
|
||||
attr3: [
|
||||
{ required: true, message: "库位不能为空", trigger: "blur" }
|
||||
],
|
||||
},
|
||||
mdItemList: [],
|
||||
mbbProduBomList: [],
|
||||
PLANList: [],
|
||||
@ -366,18 +382,18 @@ export default {
|
||||
this.title = "添加组装任务";
|
||||
this.mbbProduBomList = []
|
||||
},
|
||||
zdSubmit(row){
|
||||
outSubmit(row){
|
||||
if (this.form.attr3 == null || this.form.attr3 == "") {
|
||||
this.$modal.msgWarning("请先选择所属库位");
|
||||
} else {
|
||||
return submitZdTask(this.form).then(() => {
|
||||
return submitOutTask(this.form).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("组装成功!");
|
||||
this.$modal.msgSuccess("基础物料已出库!");
|
||||
this.reset();
|
||||
}).catch(() => {});
|
||||
}
|
||||
},
|
||||
handleZd(row){
|
||||
handleOut(row){
|
||||
if (row.attr3 == null || row.attr3 == "") {
|
||||
this.reset();
|
||||
this.areaShow = true
|
||||
@ -394,14 +410,23 @@ export default {
|
||||
});
|
||||
})
|
||||
} else {
|
||||
this.$modal.confirm('是否确认开始组装任务:' + row.name).then(function() {
|
||||
return submitZdTask(row)
|
||||
this.$modal.confirm('是否确认开始组装:' + row.name).then(function() {
|
||||
return submitOutTask(row)
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("组装成功!");
|
||||
this.$modal.msgSuccess("基础物料已出库!");
|
||||
}).catch(() => {});
|
||||
}
|
||||
},
|
||||
handleIn(row){
|
||||
this.$modal.confirm('是否确认完成组装:' + row.name).then(function() {
|
||||
return submitInTask(row)
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("组装任务已完成!");
|
||||
}).catch(() => {});
|
||||
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleInfo(row) {
|
||||
this.reset();
|
||||
@ -430,6 +455,11 @@ export default {
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
if (this.form.status != 0) {
|
||||
this.open = false
|
||||
return
|
||||
}
|
||||
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.wmsZdTaskId != null) {
|
||||
|
Loading…
Reference in New Issue
Block a user