完成手动组刀

This commit is contained in:
Stang 2024-11-15 10:43:44 +08:00
parent 095f1ed15e
commit e5c355c41f
2 changed files with 48 additions and 13 deletions

View File

@ -50,3 +50,12 @@ export function resetBaseKnife(baseKnifeId) {
method: 'put'
})
}
// 提交出库任务
export function submitZdTask(data) {
return request({
url: '/mes/md/baseKnife/zdTask',
method: 'put',
data: data
})
}

View File

@ -77,9 +77,9 @@
<!-- <el-table-column label="主键" align="center" prop="wmsZdTaskId" />-->
<el-table-column label="编码" align="center" prop="code" />
<el-table-column label="名称" align="center" prop="name" />
<el-table-column label="物料" align="center" prop="attr2" />
<el-table-column label="物料" align="center" prop="itemName" />
<el-table-column label="物料数量" align="center" prop="productIdQty" />
<el-table-column label="库位编码" align="center" prop="attr3" />
<el-table-column label="所属库位" align="center" prop="areaName" />
<!-- <el-table-column label="计划出库单" align="center" prop="planOutId" />-->
<el-table-column label="已完成数量" align="center" prop="qtyOk" />
<el-table-column label="完成状态" align="center" prop="status" >
@ -87,7 +87,7 @@
<dict-tag :options="dict.type.zd_task_status" :value="scope.row.status"/>
</template>
</el-table-column>
<el-table-column label="计划单" align="center" prop="attr4" />
<el-table-column label="计划单" align="center" prop="planSheet" />
<el-table-column label="备注" align="center" prop="remark" />
<!-- <el-table-column label="预留字段1" align="center" prop="attr1" />-->
<!-- <el-table-column label="预留字段2" align="center" prop="attr2" />-->
@ -126,7 +126,7 @@
size="mini"
type="text"
icon="el-icon-delete"
:disabled="scope.row.status == 3"
:disabled="scope.row.status != 0"
@click="handleDelete(scope.row)"
v-hasPermi="['wm:zdTask:remove']"
>删除</el-button>
@ -165,9 +165,9 @@
: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 != 0">
<el-option :label="item.areaName" :value="item.areaCode.toString()" v-for="item in areaList"
:key="item.areaCode">
<el-select v-model="form.areaId" placeholder="请选择库位" filterable clearable :disabled="form.status != 0">
<el-option :label="item.areaName" :value="item.areaId" v-for="item in areaList"
:key="item.areaId">
<span style="float: left">{{ item.areaName }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.areaCode }}</span>
</el-option>
@ -223,9 +223,9 @@
:step="1" v-model="form.productIdQty" placeholder="请输入物料数量" readonly disabled />
</el-form-item>
<el-form-item label="所属库位" prop="name">
<el-select v-model="form.attr3" placeholder="请选择库位" filterable clearable :disabled="form.status == 1">
<el-option :label="item.areaName" :value="item.areaCode.toString()" v-for="item in areaList"
:key="item.areaCode">
<el-select v-model="form.areaId" placeholder="请选择库位" filterable clearable :disabled="form.status == 1">
<el-option :label="item.areaName" :value="item.areaId" v-for="item in areaList"
:key="item.areaId">
<span style="float: left">{{ item.areaName }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.areaCode }}</span>
</el-option>
@ -258,6 +258,7 @@ import { listZdTask, getZdTask, delZdTask, addZdTask, updateZdTask } from "@/api
import {listPLAN} from "@/api/md/PLAN";
import {listMdItem} from "@/api/mes/md/mdItem"
import {submitOutTask, submitInTask} from "@/api/mes/wm/zdTask"
import {submitZdTask} from "@/api/mes/md/baseKnife"
import {listROUTE, getROUTE} from "@/api/md/ROUTE"
import {listArea} from "@/api/mes/wm/area"
@ -383,7 +384,7 @@ export default {
this.mbbProduBomList = []
},
outSubmit(row){
if (this.form.attr3 == null || this.form.attr3 == "") {
if (this.form.areaId == null || this.form.areaId == "") {
this.$modal.msgWarning("请先选择所属库位");
} else {
return submitOutTask(this.form).then(() => {
@ -393,6 +394,31 @@ export default {
}).catch(() => {});
}
},
handleZd(row){
if (row.areaId == null || row.areaId == "") {
this.reset();
this.areaShow = true
const wmsZdTaskId = row.wmsZdTaskId || this.ids
getZdTask(wmsZdTaskId).then(response => {
this.form = response.data;
this.title = "组装任务明细";
listROUTE({"mdItemId": this.form.mProductId}).then(response => {
let bomId = response.rows[0].bomRouteId
getROUTE(bomId).then(response => {
this.mbbProduBomList = response.data.mbbProduBomList;
});
});
})
} else {
this.$modal.confirm('是否确认开始组装:' + row.name).then(function() {
return submitZdTask(row)
}).then(() => {
this.getList();
this.$modal.msgSuccess("组装完成!");
}).catch(() => {});
}
},
handleOut(row){
if (row.attr3 == null || row.attr3 == "") {
this.reset();
@ -447,8 +473,8 @@ export default {
},
reloadBom(){
listROUTE({"mdItemId": this.form.mProductId}).then(response => {
this.form.attr1 = response.rows[0].bomRouteId
getROUTE(this.form.attr1).then(response => {
this.form.bomId = response.rows[0].bomRouteId
getROUTE(this.form.bomId).then(response => {
this.mbbProduBomList = response.data.mbbProduBomList;
});
});