fix:玻纤日志相关调整

This commit is contained in:
shijing 2025-01-07 09:47:06 +08:00
parent 36a7c029b0
commit 295ed27bac
4 changed files with 75 additions and 11 deletions

View File

@ -241,6 +241,7 @@ export default {
},
selectBatchChange(item) {
this.form.batch = item.batch;
this.form.mb = item.id;
this.form.warehouse = item.warehouse;
},
//
@ -254,6 +255,7 @@ export default {
},
selectBatchClear() {
this.form.batch = "";
this.form.mb = "";
this.form.warehouse = "";
},
//

View File

@ -82,7 +82,7 @@
row-key="id"
stripe
:params="paramsIn"
hidePagination
hidePagination
>
<el-table-column type="index" width="50" />
<el-table-column
@ -113,13 +113,18 @@
link
type="primary"
@click="table_in_edit(scope.row)"
:disabled="mlogItem.submit_time !== null||mlogItem.ticket!==null||(mlogItem.ticket_&&mlogItem.ticket_.state_.type==1)"
v-if="mlogItem.submit_time== null&&mlogItem.material_in_&&mlogItem.material_in_.tracking==10"
>
编辑
</el-button>
<el-button
link type="primary"
v-if="mlogItem.submit_time == null&&mlogItem.material_in_&&mlogItem.material_in_.tracking==20"
@click="table_out_check_single(scope.row,'ins')"
>详情</el-button>
<el-button
link
:disabled="mlogItem.submit_time !== null||mlogItem.ticket!==null||(mlogItem.ticket_&&mlogItem.ticket_.state_.type==1)"
:disabled="mlogItem.submit_time !== null"
type="danger"
@click="table_in_del(scope.row)"
>
@ -228,7 +233,7 @@
<el-button
link type="primary"
v-if="mlogItem.submit_time == null&&mlogItem.material_out_&&mlogItem.material_out_.tracking==20"
@click="table_out_check_single(scope.row)"
@click="table_out_check_single(scope.row,'outs')"
>详情</el-button>
</template>
</el-table-column>
@ -263,6 +268,7 @@
ref="saveDialog"
:mlog="mlogId"
:mgroup="mgroup"
:tracking="tracking"
:materialIn="materialIn"
@success="handleSaveSuccess"
@closed="dialog.save = false"
@ -280,6 +286,7 @@
v-if="dialog.check_single"
ref="checkDialogSingle"
:mlogb="mlogb"
:wm = "wm"
@success="handlesCheckSuccess"
@closed="dialog.check_single = false"
>
@ -349,6 +356,7 @@ export default {
mlog: "",
material_out__isnull: 0,
},
tracking:'10',
mlogb:"",
mgroup: "",
mlogItem: {},
@ -378,6 +386,7 @@ export default {
},
],
},
wm:'',
materialOut:'',
batchContains:'',
apiObjPrint:this.$API.cm.labelmat.fromWm,
@ -402,6 +411,8 @@ export default {
let that = this;
that.$API.wpm.mlog.item.req(that.mlogId).then((res) => {
that.mlogItem = res;
console.log('that.mlogItem',that.mlogItem);
this.tracking = this.mlogItem.material_in_.tracking;
if(res.test_file!==null){
that.fileList = [{name:res.test_file,url:res.test_file}];
that.form.test_file = res.test_file;
@ -495,14 +506,15 @@ export default {
this.$refs.checkDialog.open(obj);
});
},
table_out_check_single(row){
table_out_check_single(row,type){
this.dialog.check_single = true;
this.mlogb = row.id;
this.wm = row.wm_in;
let obj = {};
Object.assign(obj, row);
obj.mgroup_name = this.mlogItem.mgroup_name;
this.$nextTick(() => {
this.$refs.checkDialogSingle.open(obj);
this.$refs.checkDialogSingle.open(type);
});
},
//

View File

@ -40,7 +40,7 @@
<el-input-number ref="codeInput" v-model="form.count_use" clearable></el-input-number>
</el-form-item>
</el-form>
<el-footer v-if="mgroup_code == 'paiyicibang'||mgroup_code == 'paiercibang'">
<el-footer v-if="tracking == 10">
<el-button type="primary" :loading="isSaveing" @click="submit">提交</el-button>
<el-button @click="visibleDrawer = false">取消</el-button>
</el-footer>
@ -68,6 +68,10 @@ export default {
type: String,
default: "",
},
tracking:{
type: Number,
default: 10,
},
materialIn: {
type: String,
default: "",
@ -142,7 +146,8 @@ export default {
});
if (arr.length > 0) {
that.form.wm_in = arr[0].id;
if(that.mgroup_code == 'paiyicibang'||that.mgroup_code == 'paiercibang'){}else{
that.form.count_use = arr[0].count;
if(that.tracking==10){}else{
that.submit();//
}
}else{

View File

@ -1,6 +1,6 @@
<template>
<el-drawer
title="输出物料详情"
:title="headTitle[mode]"
v-model="visible"
:size="'80%'"
destroy-on-close
@ -16,7 +16,23 @@
<el-table-column prop="number" label="物料编号">
<template #default="scope">
<span v-if="!scope.row.isEdit">{{ scope.row.number }}</span>
<el-input v-else v-model="scope.row.number" placeholder="物料编号"></el-input>
<el-input v-if="scope.row.isEdit&&mode == 'outs'" v-model="scope.row.number" placeholder="物料编号"></el-input>
<el-select
v-if="scope.row.isEdit&&mode == 'ins'"
v-model="scope.row.wpr"
placeholder="动态成品"
clearable
style="width: 100%"
@change="optionChange(scope.row)"
>
<el-option
v-for="item in options"
:key="item.id"
:label="item.number"
:value="item.id"
>
</el-option>
</el-select>
</template>
</el-table-column>
<el-table-column prop="note" label="备注">
@ -65,16 +81,26 @@ export default {
type: String,
default: "",
},
wm: {
type: String,
default: "",
},
},
emits: ["success", "closed"],
data() {
return {
loading: false,
headTitle:{
ins:'输入物料详情',
outs:'输出物料详情',
},
mode:'ins',
//
form: {},
mgroup: "",
params: {mlogb:'',page:0},
visible: false,
options:[],
mlogbwlist:[],
addTemplate:{
mlogb: "",
@ -90,11 +116,30 @@ export default {
let that = this;
that.params.mlogb = that.addTemplate.mlogb = that.mlogb;
that.getList();
that.getOptions();
},
methods: {
open() {
open(mode = "ins") {
this.mode = mode;
console.log(this.mode);
this.visible = true;
},
getOptions(){
let that = this;
that.$API.wpm.wpr.req({wm:that.wm,page:0}).then((res) => {
that.options = res;
})
},
optionChange(row){
let that = this;
that.options.forEach((item) => {
if(item.id == row.wpr){
console.log('item',item);
let index = that.mlogbwlist.indexOf(row);
that.mlogbwlist[index].number = item.number;
}
})
},
getList(){
let that = this;
that.mlogbwlist = [];