界面修改,拆零新增损耗出库

20240912_adapter_z
yewj 10 months ago
parent 4e42bcb419
commit 6ed14e5e29

@ -41,3 +41,11 @@ export function destroyOutByCode(query) {
data: query data: query
}); });
} }
export function destroySplitOut(query) {
return axios({
url: "/udiwms/collect/split/desOrder/destroyOut",
method: "post",
data: query
});
}

@ -11,7 +11,7 @@
<el-col :span="18" style="margin-left: 0px" > <el-col :span="18" style="margin-left: 0px" >
<span style="font-size: 16px;color: #409EFF">当前工位:&nbsp&nbsp&nbsp&nbsp<span style="font-size: 16px;color: #000000">{{this.formData.workplaceName}}</span> <span style="font-size: 16px;color: #409EFF">当前工位:&nbsp&nbsp&nbsp&nbsp<span style="font-size: 16px;color: #000000">{{this.formData.workplaceName}}</span>
&nbsp&nbsp&nbsp&nbsp &nbsp&nbsp&nbsp&nbsp
<span :style="{ color: formData.workplaceStatus === 0 ? 'green' : 'red' }"> ({{ formData.workplaceStatus === 0 ? '服务中' : '服务暂停' }} ) </span> <!-- <span :style="{ color: formData.workplaceStatus === 0 ? 'green' : 'red' }"> ({{ formData.workplaceStatus === 0 ? '服务中' : '服务暂停' }} ) </span>-->
<!-- <el-button type="primary" @click="toggleWorkplaceStatus" style="margin-left: 10px;" >切换状态</el-button>--> <!-- <el-button type="primary" @click="toggleWorkplaceStatus" style="margin-left: 10px;" >切换状态</el-button>-->
</span> </span>

@ -224,6 +224,22 @@
@pagination="getList" @pagination="getList"
/> />
</el-card> </el-card>
<el-dialog
title="损耗出库"
:visible.sync="destroyOutDialogVisible"
:close-on-click-modal="false"
:close-on-press-escape="false"
width="60%"
v-if="destroyOutDialogVisible"
>
<destroyOutDialog
:prescribeData="prescribeData"
:destroyType="destroyType"
:closeDialog="closeDialog"
>
</destroyOutDialog>
</el-dialog>
</div> </div>
</template> </template>
@ -293,7 +309,12 @@ export default {
}, },
], ],
}, },
list: [] list: [],
showType: 1,
isLinkDisabled: false,
destroyOutDialogVisible: false,
prescribeData: {},
destroyType: 3,//1 2.code3
} }
}, },
components: {}, components: {},
@ -381,13 +402,30 @@ export default {
this.list = []; this.list = [];
this.total = 0; this.total = 0;
}); });
} },
//
destroyOut(_this, row) {
_this.prescribeData = row
_this.destroyType = 3
_this.destroyOutDialogVisible = true;
},
closeDialog() {
this.destroyOutDialogVisible = false
this.getList()
},
}, },
filters: {}, filters: {},
mounted() { mounted() {
this.getWorkPlaceList(this); this.getWorkPlaceList(this);
}, },
created() { created() {
if (this.$route.query.workplaceId != null) {
this.isLinkDisabled = true
this.filterQuery.workPlaceCode = this.$route.query.workplaceId
this.showType = 2
}
getHead("ioSplitCode", "1").then((re) => { getHead("ioSplitCode", "1").then((re) => {
// //
this.tableObj = re.data; this.tableObj = re.data;

@ -458,7 +458,6 @@
:destroyType="destroyType" :destroyType="destroyType"
:closeDialog="closeDialog" :closeDialog="closeDialog"
> >
</destroyOutDialog> </destroyOutDialog>
</el-dialog> </el-dialog>

@ -325,7 +325,9 @@ export default {
options: { options: {
findWorkPlace: [] findWorkPlace: []
}, },
showType: 1 showType: 1,
isLinkDisabled: false,
} }
}, },
@ -420,6 +422,7 @@ export default {
}, },
created() { created() {
if (this.$route.query.workplaceId != null) { if (this.$route.query.workplaceId != null) {
this.isLinkDisabled = true
this.filterQuery.workPlaceCode = this.$route.query.workplaceId this.filterQuery.workPlaceCode = this.$route.query.workplaceId
this.showType = 2 this.showType = 2
} }

@ -29,11 +29,13 @@
</el-descriptions> </el-descriptions>
<!--<el-button type="primary" icon="el-icon-plus" sty>提交</el-button>--> <!--<el-button type="primary" icon="el-icon-plus" sty>提交</el-button>-->
<el-form :inline="true" :model="formData" class="demo-form-inline" style="margin-top: 30px" :rules="rules" ref="formRef"> <el-form :inline="true" :model="formData" class="demo-form-inline" style="margin-top: 30px" :rules="rules"
ref="formRef">
<el-row :gutter="24"> <el-row :gutter="24">
<el-col :span="10"> <el-col :span="10">
<el-form-item label="损耗出库数量" prop="count"> <el-form-item label="损耗出库数量" prop="count">
<el-input v-model.number="formData.count" placeholder="请填写损耗出库数量" type="number" :min="1" @input="checkCount"></el-input> <el-input v-model.number="formData.count" placeholder="请填写损耗出库数量" type="number" :min="1"
@input="checkCount"></el-input>
<!--<span v-if="countExceeded" class="exceeded-message">10</span>--> <!--<span v-if="countExceeded" class="exceeded-message">10</span>-->
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -58,7 +60,7 @@
</template> </template>
<script> <script>
import { destroyOut, destroyOutByCode } from '@/api/collect/IoDestroy' import {destroyOut, destroyOutByCode, destroySplitOut} from '@/api/collect/IoDestroy'
export default { export default {
name: 'destroyOutDialog', name: 'destroyOutDialog',
@ -135,8 +137,8 @@ export default {
return this.$message.error(res.message) return this.$message.error(res.message)
} }
}) })
}else { } else if (this.destroyType == 1) {
destroyOutByCode(query).then(res => { destroySplitOut(query).then(res => {
if (res.code == 20000) { if (res.code == 20000) {
this.closeDialog() this.closeDialog()
return this.$message.success("损耗出库成功") return this.$message.success("损耗出库成功")
@ -144,6 +146,8 @@ export default {
return this.$message.error("损耗出库失败") return this.$message.error("损耗出库失败")
} }
}) })
} else if (this.destroyType == 3) {
} }
}, },

Loading…
Cancel
Save