Commit 036905db authored by 赵汉亭's avatar 赵汉亭

Merge branch 'dev' of http://git.local.topsunit.com/mes/mes-ui into dev

parents c6363c06 e244609e
......@@ -42,3 +42,11 @@ export function delReport(abnormalReportId) {
method: 'delete'
})
}
// 完成按钮功能
export function completeReport(abnormalReportId) {
return request({
url: '/qc/report/complete/' + abnormalReportId,
method: 'put'
})
}
......@@ -12,8 +12,9 @@ export function lisWoreHouse(query) {
// 查询刀模版入库详情列表
export function lisWoreHouseDetail(query) {
return request({
url: `/md/warehouse/${query.toolWarehouseid}`,
method: "get"
url: `/md/warehouse/item/list`,
method: "get",
params: query,
});
}
......
......@@ -97,6 +97,11 @@
<dict-tag :options="dict.type.sys_yes_no" :value="scope.row.enableFlag"/>
</template>
</el-table-column>
<el-table-column label="是否故障" align="center" prop="faultFlag" >
<template slot-scope="scope">
<dict-tag :options="dict.type.sys_yes_no" :value="scope.row.faultFlag"/>
</template>
</el-table-column>
<el-table-column label="备注" align="center" prop="remark" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
......@@ -172,6 +177,26 @@
</el-radio-group>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="20">
<el-form-item label="是否故障" label-width="120px">
<el-radio-group v-model="form.faultFlag" disabled v-if="optType=='view'">
<el-radio
v-for="dict in dict.type.sys_yes_no"
:key="dict.value"
:label="dict.value"
>{{dict.label}}</el-radio>
</el-radio-group>
<el-radio-group v-model="form.faultFlag" v-else>
<el-radio
v-for="dict in dict.type.sys_yes_no"
:key="dict.value"
:label="dict.value"
>{{dict.label}}</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="20">
......@@ -230,6 +255,7 @@ export default {
workunitCode: null,
workunitName: null,
enableFlag: null,
faultFlag: null,
},
// 表单参数
form: {
......@@ -239,6 +265,7 @@ export default {
workstation: '',
workunitName: '',
enableFlag: 'Y',
faultFlag: 'N',
},
// 表单校验
rules: {
......@@ -281,6 +308,7 @@ export default {
workstation: '',
workunitName: '',
enableFlag: 'Y',
faultFlag: 'N',
}
this.autoGenFlag = false;
this.resetForm("form");
......
......@@ -105,28 +105,30 @@
>
</template>
</el-table-column>
<el-table-column label="创建人" align="center" prop="createBy"/>
<el-table-column label="创建时间" align="center" prop="createTime"/>
<!-- <el-table-column label="序号" align="center" prop="combinationSort"/>-->
<!-- <el-table-column label="生产工单号" align="center" prop="workorderCode"/>-->
<!-- <el-table-column label="销售订单号" align="center" prop="salesOrderNumber"/>-->
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['pro:combination:edit']"
>修改
</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['pro:combination:remove']"
>删除
</el-button>
</template>
<!-- <el-table-column label="操作" align="center" class-name="small-padding fixed-width">-->
<!-- <template slot-scope="scope">-->
<!-- <el-button-->
<!-- size="mini"-->
<!-- type="text"-->
<!-- icon="el-icon-edit"-->
<!-- @click="handleUpdate(scope.row)"-->
<!-- v-hasPermi="['pro:combination:edit']"-->
<!-- >修改-->
<!-- </el-button>-->
<!-- <el-button-->
<!-- size="mini"-->
<!-- type="text"-->
<!-- icon="el-icon-delete"-->
<!-- @click="handleDelete(scope.row)"-->
<!-- v-hasPermi="['pro:combination:remove']"-->
<!-- >删除-->
<!-- </el-button>-->
<!-- </template>-->
</el-table-column>
</el-table>
......
......@@ -99,7 +99,8 @@
<el-table-column label="组合单号" align="center" prop="combinationCode"/>
<el-table-column label="序号" align="center" width prop="combinationSort">
<template slot-scope="scope">
<el-input-number v-model="scope.row.combinationSort" @change="handleChangeSort(scope.row)" :min="0" style="width: 140px"
<el-input-number v-model="scope.row.combinationSort" @change="handleChangeSort(scope.row)" :min="0"
style="width: 140px"
label="序号"></el-input-number>
</template>
</el-table-column>
......@@ -229,18 +230,23 @@ export default {
watch: {
combinationCode: {
handler(newVal, oldVal) {
if (newVal) {
this.$nextTick(() => {
this.queryParams.combinationCode = newVal;
this.getList();
}
})
},
immediate: true
immediate: true,
deep: true
}
},
created() {
this.getList();
// this.getList();
},
methods: {
changeCombination(combinationCode) {
this.queryParams.combinationCode = combinationCode;
this.getList();
},
handleChangeSort(item) {
updateCombination({...item}).then(response => {
});
......
<template>
<div>
<el-tabs type="border-card">
<el-tab-pane v-for="item in combinationCodes">
<div slot="label" @click="changeCombination(item)">{{ item }}
</div>
<CombinationInfo ref="caonima" :combinationCode="combinationCode"></CombinationInfo>
</el-tab-pane>
</el-tabs>
</div>
</template>
<script>
import CombinationInfo from "./info.vue";
import Da from "element-ui/src/locale/lang/da";
export default {
name: "CombinationInfos",
components: {CombinationInfo},
props: {
combinationCodes: {
type: Array,
default: null
}
},
data() {
return {combinationCode: '', key: ''}
},
watch: {
combinationCodes: {
handler(newVal, oldVal) {
this.$nextTick(() => {
this.combinationCode = this.combinationCodes[0]
})
},
immediate: true
}
},
created() {
},
methods: {
changeCombination(combinationCode) {
this.$nextTick(() => {
this.combinationCode = combinationCode
this.$refs.caonima[0].changeCombination(combinationCode)
})
}
}
};
</script>
<style scoped>
</style>
......@@ -757,8 +757,9 @@
</el-dialog>
<el-dialog title="组合单明细" :visible.sync="combOpen" width="800px" append-to-body @close="getList">
<CombinationInfo :combinationCode="combinationCode"></CombinationInfo>
<el-dialog title="组合单明细" v-if="combOpen" :visible.sync="combOpen" width="800px" append-to-body
@close="getList">
<CombinationInfos :combinationCodes="combinationCodes"></CombinationInfos>
</el-dialog>
</div>
</template>
......@@ -784,7 +785,7 @@ import Treeselect from "@riophae/vue-treeselect";
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
import {getToken} from "@/utils/auth";
import {addCombination, batchAddCombination} from "@/api/mes/pro/combination";
import CombinationInfo from "@/views/mes/pro/combination/info.vue";
import CombinationInfos from "@/views/mes/pro/combination/infos.vue";
import {batchAddArrange} from "@/api/mes/pro/arrange";
export default {
......@@ -795,7 +796,7 @@ export default {
"mes_workorder_type",
],
components: {
CombinationInfo,
CombinationInfos,
Treeselect,
ItemSelect,
ClientSelect,
......@@ -809,7 +810,7 @@ export default {
autoGenFlag: false,
optType: undefined,
combOpen: false,
combinationCode: [],
combinationCodes: [],
// 遮罩层
loading: true,
// 显示搜索条件
......@@ -909,7 +910,7 @@ export default {
methods: {
showCombDetail(combinationCode) {
this.combOpen = true;
this.combinationCode = combinationCode;
this.combinationCodes = [combinationCode];
},
async handleArrange() {
......@@ -936,12 +937,16 @@ export default {
},
async handleCombination() {
let params = []
this.selectedRows.forEach((item, index) => {
if (item.combinationCode != '') {
let hasNonEmptyCombination = false;
this.selectedRows.every((item, index) => {
if (item.combinationCode != '' && item.combinationCode != null) {
this.$modal.msgWarning(`${item.workorderCode}生产单已绑定组合单,不能再绑定!`);
return
hasNonEmptyCombination = true;
return false; // 结束every循环
}
return true; // 继续检查下一个项
});
if (!hasNonEmptyCombination) {
this.selectedRows.forEach((item, index) => {
params.push({
combinationSort: index + 1,
......@@ -953,9 +958,12 @@ export default {
});
batchAddCombination(params).then(response => {
this.combOpen = true
this.combinationCodes = response
this.$modal.msgSuccess("新增组合单成功");
this.getList();
});
}
},
/** 查询生产工单列表 */
getList() {
......
......@@ -134,6 +134,13 @@
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleComplete(scope.row)"
v-hasPermi="['qc:report:edit']"
>完成</el-button>
<el-button
size="mini"
type="primary"
......@@ -249,7 +256,7 @@
</template>
<script>
import { listReport, getReport, delReport, addReport, updateReport } from "@/api/mes/qc/report";
import { listReport, getReport, delReport, addReport, updateReport,completeReport } from "@/api/mes/qc/report";
export default {
dicts: ['qc_submit_status','pc_abnormal_type'],
......@@ -404,6 +411,16 @@ export default {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
},
/** 完成按钮操作 */
handleComplete(row) {
const abnormalReportIds = row.abnormalReportId || this.ids;
this.$modal.confirm('是否确认完成车间异常单编号为"' + abnormalReportIds + '"的数据项?').then(function() {
return completeReport(abnormalReportIds);
}).then(() => {
this.getList();
this.$modal.msgSuccess("提交成功");
}).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
......
......@@ -136,7 +136,7 @@
<el-table v-loading="loading" :data="toolList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="物料编码" width="80" align="center" prop="itemCode" />
<el-table-column label="物料编码" width="120" :show-overflow-tooltip="true" align="center" prop="itemCode" />
<el-table-column label="名称" min-width="180" align="center" prop="toolName" :show-overflow-tooltip="true">
<template slot-scope="scope">
<el-button
......@@ -608,7 +608,7 @@ export default {
printQrCode() {
const qrArr = [];
this.selectRow.forEach(s=>{
qrArr.push({"qrcode": s.itemCode + s.toolCode});
qrArr.push({"qrcode": s.itemCode +'-'+ s.toolCode});
});
postPrintPdf({
"reportName":"mysql:qrcode-100*100",
......
......@@ -51,39 +51,6 @@
v-hasPermi="['tm:toolmachinesrecord:add']"
>新增</el-button>
</el-col>
<!-- <el-col :span="1.5">
<el-button
type="success"
plain
icon="el-icon-edit"
size="mini"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['tm:toolmachinesrecord:edit']"
>修改</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['tm:toolmachinesrecord:remove']"
>删除</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
v-hasPermi="['tm:toolmachinesrecord:export']"
>导出</el-button>
</el-col> -->
<!-- <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> -->
</el-row>
<el-table v-loading="loading" :data="recordList" @selection-change="handleSelectionChange">
......@@ -93,6 +60,17 @@
<el-table-column label="更新人" align="center" prop="updateBy"/>
<el-table-column label="创建时间" align="center" prop="createTime"/>
<el-table-column label="更新时间" align="center" prop="updateTime"/>
<el-table-column label="操作" align="center" width="100" fixed="right" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-view"
@click="handleUpdate(scope.row)"
v-hasPermi="['tm:toolmachinesrecord:edit']"
>详情</el-button>
</template>
</el-table-column>
</el-table>
<pagination
......@@ -103,7 +81,7 @@
@pagination="getList"
/>
<!-- 入库对话框 -->
<!-- 新增和详情对话框 -->
<el-dialog :title="title" :visible.sync="open" width="950px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
<el-row>
......@@ -116,10 +94,10 @@
</el-form>
<el-divider content-position="center">入库申请详细</el-divider>
<el-card shadow="always" class="box-card">
<itemline ref="line" :quantity="form.requestNum" :toolRequestId="form.toolRequestId" :optType="optType"></itemline>
<itemline v-if="open" ref="line" :quantity="form.requestNum" :id="form.toolWarehouseId" :optType="optType"></itemline>
</el-card>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm">确 定</el-button>
<el-button v-if="optType !== 'view'" type="primary" @click="submitForm">确 定</el-button>
<el-button @click="cancel">取 消</el-button>
</div>
</el-dialog>
......@@ -264,7 +242,8 @@ export default {
this.reset();
this.form = Object.assign(row, {})
this.open = true;
this.title = "申请入库";
this.optType = 'view'
this.title = "详情";
},
/** 提交按钮 */
submitForm() {
......
......@@ -8,11 +8,12 @@
size="mini"
@click="$refs['ItemSelectRef'].showFlag = true"
>新增</el-button>
<ItemSelect ref="ItemSelectRef" @onSelected="onItemSelect" />
<ItemSelect v-if="$attrs.optType === 'add'" ref="ItemSelectRef" @onSelected="onItemSelect" />
<el-table v-loading="loading" :data="tmToolRequestItemList" @selection-change="handleSelectionChange">
<!-- <el-table-column type="selection" width="55" align="center" /> -->
<el-table-column
type="index"
label="序号"
width="50"/>
<el-table-column label="物料编码" align="center" prop="itemCode" />
<el-table-column width="100px" label="物料名称" align="center" prop="itemName" />
......@@ -56,7 +57,7 @@
</template>
<script>
import { lisWoreHouseDetail, getTmToolRequestItem, delTmToolRequestItem, addTmToolRequestItem, updateTmToolRequestItem } from "@/api/mes/tm/tmToolRequestItem";
import { lisWoreHouseDetail } from "@/api/mes/tm/warehouse";
import { getTaskIdMaxProcessTool } from "@/api/mes/pro/protask";
import ItemSelect from "./selectmachinesrecord.vue";
export default {
......@@ -66,7 +67,7 @@ export default {
],
components: {ItemSelect},
props:{
toolRequestId:{
id:{
type:String,
default:''
}
......@@ -94,8 +95,8 @@ export default {
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
toolRequestId: null, itemId: null, allQuantity: null, nextMaintenPeriod: null, },
pageSize: 10
},
// 表单参数
form: {},
// 表单校验
......@@ -139,8 +140,9 @@ export default {
},
/** 查询刀模板物料申请单列表 */
getList() {
console.log(this.id, 'ids')
this.loading = true;
this.queryParams.toolWarehouseid = this.toolRequestId;
this.queryParams.toolWarehouseId = this.id;
lisWoreHouseDetail(this.queryParams).then(response => {
this.tmToolRequestItemList = response.rows;
this.total = response.total;
......
......@@ -91,8 +91,8 @@ export default {
queryParams: {
pageNum: 1,
pageSize: 10,
// typeStr: '2',
// warehouseStr: '1'
typeStr: '2',
warehouseStr: '1'
},
};
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment