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