Merge branch 'master' of https://e.coding.net/ctcdevteam/ehs/ehs_web
This commit is contained in:
commit
ab3b815832
|
@ -16,17 +16,17 @@ VUE_APP_PJ = ''
|
|||
# VUE_APP_API_BASEURL = http://127.0.0.1:8887/api
|
||||
|
||||
#测试环境
|
||||
VUE_APP_API_BASEURL = http://10.50.211.228:2250/api
|
||||
# VUE_APP_API_BASEURL = http://10.50.211.228:2250/api
|
||||
#VUE_APP_API_BASEURL = http://127.0.0.1:2226/api
|
||||
|
||||
VUE_APP_BASEURL = http://10.50.211.228:2250/
|
||||
# VUE_APP_BASEURL = http://10.50.211.228:2250/
|
||||
|
||||
# VUE_APP_BASEURL = http://127.0.0.1:8887
|
||||
#VUE_APP_BASEURL = http://127.0.0.1:2226
|
||||
|
||||
# #光子
|
||||
# VUE_APP_API_BASEURL = http://49.232.14.174:2226/api
|
||||
# VUE_APP_BASEURL = http://49.232.14.174:2226
|
||||
VUE_APP_API_BASEURL = http://49.232.14.174:2226/api
|
||||
VUE_APP_BASEURL = http://49.232.14.174:2226
|
||||
#
|
||||
# 本地端口
|
||||
VUE_APP_PORT = 2800
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
"dagre-d3": "^0.6.4",
|
||||
"dhtmlx-gantt": "^8.0.6",
|
||||
"echarts": "^5.5.1",
|
||||
"element-plus": "^2.7.4",
|
||||
"element-plus": "^2.8.4",
|
||||
"file-saver": "^2.0.5",
|
||||
"html2canvas": "^1.4.1",
|
||||
"json-editor-vue3": "^1.0.6",
|
||||
|
@ -42,7 +42,6 @@
|
|||
"three": "^0.155.0",
|
||||
"tinymce": "6.3.2",
|
||||
"vue": "3.2.47",
|
||||
"vue-echarts": "^7.0.3",
|
||||
"vue-i18n": "9.2.2",
|
||||
"vue-router": "4.1.6",
|
||||
"vuedraggable": "4.0.3",
|
||||
|
|
|
@ -1,105 +0,0 @@
|
|||
<template>
|
||||
<div>
|
||||
<el-input
|
||||
ref="inputRef0"
|
||||
:value-on-clear="null"
|
||||
style="display: none"
|
||||
v-model="inputValue"
|
||||
>
|
||||
</el-input>
|
||||
<el-input
|
||||
:value-on-clear="null"
|
||||
:readonly="true"
|
||||
ref="inputRef"
|
||||
suffix-icon="el-icon-search"
|
||||
v-model="inputLabel"
|
||||
>
|
||||
</el-input>
|
||||
<div v-if="edit">
|
||||
<el-popover
|
||||
v-model:visible="showPopover"
|
||||
trigger="click"
|
||||
virtual-triggering
|
||||
:virtual-ref="inputRef"
|
||||
:width="tableWidth"
|
||||
>
|
||||
<el-input
|
||||
v-model="keyword"
|
||||
placeholder="关键词查找"
|
||||
@keyup.enter="handleQuery"
|
||||
></el-input>
|
||||
<div style="height: 2px"></div>
|
||||
<scTable
|
||||
ref="table"
|
||||
:apiObj="apiObj"
|
||||
:params="params"
|
||||
:query="query"
|
||||
:height="tableHeight"
|
||||
row-key="id"
|
||||
stripe
|
||||
@row-click="rowClick"
|
||||
:hidePagination="hidePagination"
|
||||
paginationLayout="prev, pager, next"
|
||||
hideDo
|
||||
>
|
||||
<slot></slot>
|
||||
</scTable>
|
||||
</el-popover>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, defineProps, defineEmits, computed } from "vue";
|
||||
|
||||
const props = defineProps({
|
||||
edit: { type: Boolean, default: true },
|
||||
hidePagination: { type: Boolean, default: false },
|
||||
tableWidth: { type: Number, default: 600 },
|
||||
tableHeight: { type: Number, default: 400 },
|
||||
apiObj: { type: Object, default: () => {}, required: true },
|
||||
params: { type: Object, default: () => {} },
|
||||
label: { type: String, default: "" },
|
||||
modelValue: { type: String, default: null },
|
||||
labelField: { type: String, default: "name" },
|
||||
valueField: { type: String, default: "id" },
|
||||
});
|
||||
|
||||
const emit = defineEmits(["update:modelValue", "update:label"]);
|
||||
|
||||
// 控制 popover 显示与隐藏的状态
|
||||
const showPopover = ref(false);
|
||||
const inputRef = ref();
|
||||
const inputRef0 = ref();
|
||||
const table = ref();
|
||||
const inputLabel = computed({
|
||||
get() {
|
||||
return props.label;
|
||||
},
|
||||
set(val) {
|
||||
emit("update:label", val);
|
||||
},
|
||||
});
|
||||
const inputValue = computed({
|
||||
get() {
|
||||
return props.modelValue;
|
||||
},
|
||||
set(val) {
|
||||
emit("update:modelValue", val);
|
||||
},
|
||||
});
|
||||
|
||||
const keyword = ref("");
|
||||
const query = ref({ search: "" });
|
||||
|
||||
const handleQuery = () => {
|
||||
query.value.search = keyword.value;
|
||||
table.value.queryData(query.value);
|
||||
};
|
||||
|
||||
const rowClick = (row) => {
|
||||
inputLabel.value = row[props.labelField];
|
||||
inputValue.value = row[props.valueField];
|
||||
showPopover.value = false;
|
||||
};
|
||||
</script>
|
|
@ -26,7 +26,7 @@
|
|||
</template>
|
||||
</el-table-column>
|
||||
</template>
|
||||
<el-table-column min-width="1"></el-table-column>
|
||||
<!-- <el-table-column min-width="1"></el-table-column> -->
|
||||
|
||||
<template #empty>
|
||||
<el-empty :description="emptyText" :image-size="100"></el-empty>
|
||||
|
@ -35,7 +35,7 @@
|
|||
</div>
|
||||
<div class="scTable-page" v-if="!hidePagination || !hideDo">
|
||||
<div class="scTable-pagination">
|
||||
<el-pagination v-if="!hidePagination" background :small="true" :layout="paginationLayout" :total="total"
|
||||
<el-pagination v-if="!hidePagination" background size="small" :layout="paginationLayout" :total="total"
|
||||
:page-size="scPageSize" :page-sizes="pageSizes" v-model:currentPage="currentPage"
|
||||
@current-change="paginationChange" @update:page-size="pageSizeChange"></el-pagination>
|
||||
</div>
|
||||
|
|
|
@ -0,0 +1,151 @@
|
|||
<template>
|
||||
<div>
|
||||
<el-input ref="inputRef" v-model="selectLabel" :readonly="true">
|
||||
<template #prefix>
|
||||
<el-button
|
||||
text
|
||||
size="small"
|
||||
circle
|
||||
icon="el-icon-search"
|
||||
@click="showPopover=true"
|
||||
></el-button>
|
||||
</template>
|
||||
<template #suffix>
|
||||
<el-button
|
||||
text
|
||||
size="small"
|
||||
circle
|
||||
icon="el-icon-close"
|
||||
v-show="selectLabel && edit"
|
||||
@click="handleClear"
|
||||
></el-button>
|
||||
</template>
|
||||
</el-input>
|
||||
<div v-if="edit">
|
||||
<el-popover
|
||||
v-model:visible="showPopover"
|
||||
trigger="manual"
|
||||
virtual-triggering
|
||||
:virtual-ref="inputRef"
|
||||
:width="tableWidth"
|
||||
>
|
||||
<el-input
|
||||
v-model="keyword"
|
||||
placeholder="关键词查找"
|
||||
@keyup.enter="handleQuery"
|
||||
></el-input>
|
||||
<div style="height: 2px"></div>
|
||||
<scTable
|
||||
v-if="showPopover"
|
||||
ref="table"
|
||||
:apiObj="apiObj"
|
||||
:params="params"
|
||||
:query="query"
|
||||
:height="tableHeight"
|
||||
row-key="id"
|
||||
stripe
|
||||
@row-click="rowClick"
|
||||
:hidePagination="hidePagination"
|
||||
paginationLayout="prev, pager, next"
|
||||
hideDo
|
||||
@dataChange="tdChange"
|
||||
@selection-change="selectionChange"
|
||||
>
|
||||
<el-table-column v-if="multiple" type="selection" width="40" :reserve-selection="true"></el-table-column>
|
||||
<slot></slot>
|
||||
</scTable>
|
||||
</el-popover>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, defineProps, defineEmits, computed } from "vue";
|
||||
|
||||
const props = defineProps({
|
||||
multiple: { type: Boolean, default: false },
|
||||
edit: { type: Boolean, default: true },
|
||||
hidePagination: { type: Boolean, default: false },
|
||||
tableWidth: { type: Number, default: 600 },
|
||||
tableHeight: { type: Number, default: 400 },
|
||||
apiObj: { type: Object, default: () => {}, required: true },
|
||||
params: { type: Object, default: () => {} },
|
||||
label: { type: String, default: "" },
|
||||
obj: { type: Object, default: () => {} },
|
||||
modelValue: { type: String, default: null },
|
||||
labelField: { type: String, default: "name" },
|
||||
valueField: { type: String, default: "id" },
|
||||
});
|
||||
|
||||
const emit = defineEmits(["update:modelValue", "update:label", "update:obj"]);
|
||||
|
||||
// 控制 popover 显示与隐藏的状态
|
||||
const multiple = ref(props.multiple);
|
||||
const obj = ref(props.obj);
|
||||
const showPopover = ref(false);
|
||||
const inputRef = ref();
|
||||
const table = ref();
|
||||
|
||||
const selectObj = computed({
|
||||
get() {
|
||||
return props.obj;
|
||||
},
|
||||
set(val) {
|
||||
emit("update:obj", val);
|
||||
}
|
||||
})
|
||||
|
||||
const selectLabel = computed({
|
||||
get() {
|
||||
return props.label;
|
||||
},
|
||||
set(val) {
|
||||
emit("update:label", val);
|
||||
},
|
||||
});
|
||||
const selectValue = computed({
|
||||
get() {
|
||||
return props.modelValue;
|
||||
},
|
||||
set(val) {
|
||||
emit("update:modelValue", val);
|
||||
},
|
||||
});
|
||||
|
||||
const keyword = ref("");
|
||||
const query = ref({ search: "" });
|
||||
|
||||
const handleQuery = () => {
|
||||
query.value.search = keyword.value;
|
||||
table.value.queryData(query.value);
|
||||
};
|
||||
|
||||
const rowClick = (row) => {
|
||||
if(!multiple.value){
|
||||
selectObj.value = row;
|
||||
selectLabel.value = row[props.labelField];
|
||||
selectValue.value = row[props.valueField];
|
||||
showPopover.value = false;
|
||||
}
|
||||
};
|
||||
|
||||
const handleClear = () => {
|
||||
selectObj.value = {};
|
||||
selectLabel.value = "";
|
||||
selectValue.value = null;
|
||||
};
|
||||
|
||||
const tdChange = (res, tableData) =>{
|
||||
// if(obj.value && multiple){
|
||||
|
||||
// }
|
||||
}
|
||||
|
||||
const selectionChange = (val) => {
|
||||
if(multiple.value){
|
||||
selectObj.value = val;
|
||||
selectLabel.value = val.map(item => item[props.labelField]).join(";");
|
||||
selectValue.value = val.map(item => item[props.valueField]);
|
||||
}
|
||||
};
|
||||
</script>
|
|
@ -0,0 +1,126 @@
|
|||
<template>
|
||||
<div>
|
||||
<el-select v-bind="$attrs" ref="selectRef"
|
||||
v-model="selectValue"
|
||||
:value-key="valueField"
|
||||
>
|
||||
<template #empty>
|
||||
<div :style="{ width: tableWidth + 'px', padding: '2px' }">
|
||||
<el-input
|
||||
v-model="keyword"
|
||||
placeholder="关键词查找"
|
||||
@keyup.enter="handleQuery"
|
||||
></el-input>
|
||||
<div style="height: 2px"></div>
|
||||
<scTable
|
||||
ref="table"
|
||||
:apiObj="apiObj"
|
||||
:params="params"
|
||||
:query="query"
|
||||
:height="tableHeight"
|
||||
row-key="id"
|
||||
stripe
|
||||
@row-click="rowClick"
|
||||
:hidePagination="hidePagination"
|
||||
paginationLayout="prev, pager, next"
|
||||
hideDo
|
||||
@dataChange="tdChange"
|
||||
@selection-change="
|
||||
(selection) => {
|
||||
selections = selection;
|
||||
}
|
||||
"
|
||||
>
|
||||
<el-table-column
|
||||
v-if="multiple"
|
||||
type="selection"
|
||||
width="40"
|
||||
:reserve-selection="true"
|
||||
></el-table-column>
|
||||
<slot></slot>
|
||||
</scTable>
|
||||
</div>
|
||||
</template>
|
||||
</el-select>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, defineProps, defineEmits, computed } from "vue";
|
||||
|
||||
const props = defineProps({
|
||||
multiple: { type: Boolean, default: false },
|
||||
edit: { type: Boolean, default: true },
|
||||
hidePagination: { type: Boolean, default: false },
|
||||
tableWidth: { type: Number, default: 600 },
|
||||
tableHeight: { type: Number, default: 400 },
|
||||
apiObj: { type: Object, default: () => {}, required: true },
|
||||
params: { type: Object, default: () => {} },
|
||||
label: { type: String, default: "" },
|
||||
obj: { type: Object, default: () => {} },
|
||||
modelValue: { type: String, default: null },
|
||||
labelField: { type: String, default: "name" },
|
||||
valueField: { type: String, default: "id" },
|
||||
});
|
||||
|
||||
const emit = defineEmits(["update:modelValue", "update:label", "rowSelect"]);
|
||||
|
||||
// 控制 popover 显示与隐藏的状态
|
||||
const showPopover = ref(false);
|
||||
const table = ref();
|
||||
const selectRef = ref();
|
||||
|
||||
const selectObj = computed({
|
||||
get() {
|
||||
return props.obj;
|
||||
},
|
||||
set(val) {
|
||||
emit("update:obj", val);
|
||||
},
|
||||
});
|
||||
|
||||
const selectLabel = computed({
|
||||
get() {
|
||||
return props.label;
|
||||
},
|
||||
set(val) {
|
||||
emit("update:label", val);
|
||||
},
|
||||
});
|
||||
const selectValue = computed({
|
||||
get() {
|
||||
return props.modelValue;
|
||||
},
|
||||
set(val) {
|
||||
emit("update:modelValue", val);
|
||||
},
|
||||
});
|
||||
|
||||
const keyword = ref("");
|
||||
const query = ref({ search: "" });
|
||||
|
||||
const handleQuery = () => {
|
||||
query.value.search = keyword.value;
|
||||
table.value.queryData(query.value);
|
||||
};
|
||||
|
||||
const rowClick = (row) => {
|
||||
selectObj.value = row;
|
||||
selectLabel.value = row[props.labelField];
|
||||
selectValue.value = row[props.valueField];
|
||||
initOptions();
|
||||
showPopover.value = false;
|
||||
};
|
||||
|
||||
const handleClear = () => {
|
||||
selectObj.value = {};
|
||||
selectLabel.value = "";
|
||||
selectValue.value = null;
|
||||
};
|
||||
|
||||
const initOptions = () => {
|
||||
console.log(selectRef.value)
|
||||
}
|
||||
|
||||
const tdChange = (res, tableData) => {};
|
||||
</script>
|
|
@ -1401,8 +1401,8 @@ const routes = [
|
|||
// component: "wpm_gx/chart",
|
||||
// },
|
||||
// {
|
||||
// name: "printTest",
|
||||
// path: "/wpm_gx/print",
|
||||
// name: "prints",
|
||||
// path: "/wpm_gx/prints",
|
||||
// meta: {
|
||||
// title: "打印测试",
|
||||
// icon: "el-icon-files",
|
||||
|
@ -1420,7 +1420,6 @@ const routes = [
|
|||
// },
|
||||
// component: "setting/print/A4",
|
||||
// },
|
||||
|
||||
{
|
||||
name: "qiepian",
|
||||
path: "/wpm_gx/qiepian",
|
||||
|
@ -1622,13 +1621,23 @@ const routes = [
|
|||
},
|
||||
component: "qm/process",
|
||||
},
|
||||
{
|
||||
name: "qmProcess_gx",
|
||||
path: "/qm/qmProcess_gx",
|
||||
meta: {
|
||||
title: "过程自检",
|
||||
// icon: "el-icon-cellphone",
|
||||
perms: ["ptest_gx"],
|
||||
},
|
||||
component: "qm/process_gx",
|
||||
},
|
||||
{
|
||||
name: "qmProcess2",
|
||||
path: "/qm/qmProcess2",
|
||||
meta: {
|
||||
title: "过程抽检",
|
||||
// icon: "el-icon-cellphone",
|
||||
perms: ["ptest"],
|
||||
perms: ["ptest_cj"],
|
||||
},
|
||||
component: "qm/process2",
|
||||
},
|
||||
|
@ -1678,7 +1687,7 @@ const routes = [
|
|||
meta: {
|
||||
title: "外观检验",
|
||||
// icon: "el-icon-cellphone",
|
||||
perms: ["productstest__wg"],
|
||||
perms: ["productstest_wg"],
|
||||
},
|
||||
component: "qm/products_wg",
|
||||
},
|
||||
|
@ -3035,6 +3044,18 @@ const routes = [
|
|||
},
|
||||
component: "bigScreen/index_photon",
|
||||
},
|
||||
//光芯—数据大屏
|
||||
// {
|
||||
// path: "/bigScreengx",
|
||||
// name: "bigScreengx",
|
||||
// meta: {
|
||||
// title: "数据大屏",
|
||||
// icon: "el-icon-platform",
|
||||
// perms: ["bigScreengx"],
|
||||
// fullpage: true,
|
||||
// },
|
||||
// component: "bigScreen/index_gx",
|
||||
// },
|
||||
//排放——数据大屏
|
||||
{
|
||||
path: "/bigScreenEnp",
|
||||
|
|
11
src/main.js
11
src/main.js
|
@ -3,7 +3,7 @@ import ElementPlus from "element-plus";
|
|||
import "element-plus/dist/index.css";
|
||||
import "element-plus/theme-chalk/display.css";
|
||||
import scui from "./scui";
|
||||
import ehsui from "./ehs";
|
||||
import xui from "./xui";
|
||||
import i18n from "./locales";
|
||||
import router from "./router";
|
||||
import store from "./store";
|
||||
|
@ -18,9 +18,6 @@ import htmlToPdf from "./utils/htmlToPdf";
|
|||
|
||||
import * as Cesium from "cesium";
|
||||
|
||||
import "echarts";
|
||||
import ECharts from 'vue-echarts';
|
||||
|
||||
const app = createApp(App);
|
||||
|
||||
app.use(store);
|
||||
|
@ -29,20 +26,16 @@ app.use(ElementPlus);
|
|||
app.use(Cesium);
|
||||
app.use(i18n);
|
||||
app.use(scui);
|
||||
app.use(ehsui);
|
||||
app.use(xui);
|
||||
app.use(preventReClick);
|
||||
app.use(Print);
|
||||
app.use(Xlsx);
|
||||
app.use(htmlToPdf);
|
||||
app.use(jsBarCode);
|
||||
app.use(DataVVue3);
|
||||
app.component('v-chart', ECharts);
|
||||
|
||||
//挂载app
|
||||
app.mount("#app");
|
||||
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
|
||||
app.component(key, component);
|
||||
}
|
||||
|
||||
const debounce = (fn, delay) => {
|
||||
let timer = null;
|
||||
|
|
|
@ -22,6 +22,7 @@ import scTitle from './components/scTitle'
|
|||
import scWaterMark from './components/scWaterMark'
|
||||
import scQrCode from './components/scQrCode'
|
||||
import scIconSelect from './components/scIconSelect'
|
||||
import scEcharts from './components/scEcharts'
|
||||
|
||||
import scStatusIndicator from './components/scMini/scStatusIndicator'
|
||||
import scTrend from './components/scMini/scTrend'
|
||||
|
@ -70,6 +71,7 @@ export default {
|
|||
app.component('scTrend', scTrend);
|
||||
app.component('scFire', scFire);
|
||||
app.component('scIconSelect', scIconSelect);
|
||||
app.component('scEcharts', scEcharts);
|
||||
|
||||
//注册全局指令
|
||||
app.directive('auth', auth)
|
||||
|
|
|
@ -2,18 +2,20 @@
|
|||
<el-container>
|
||||
<el-aside width="200px">
|
||||
<el-menu>
|
||||
<el-menu-item index="1" @click="currentM='二维码'">二维码</el-menu-item>
|
||||
<el-menu-item index="2" @click="currentM='带默认的选择'">带默认的选择</el-menu-item>
|
||||
<el-menu-item index="3" @click="currentM='图标选择'">图标选择</el-menu-item>
|
||||
<el-menu-item index="4" @click="currentM='xselect'">xselect</el-menu-item>
|
||||
<el-menu-item index="5" @click="currentM='vue-echarts'">vue-echarts</el-menu-item>
|
||||
<el-menu-item
|
||||
v-for="item in menu"
|
||||
:key="item"
|
||||
:index="item"
|
||||
@click="currentM = item"
|
||||
>{{ item }}</el-menu-item
|
||||
>
|
||||
</el-menu>
|
||||
</el-aside>
|
||||
<el-main>
|
||||
<div v-if="currentM=='二维码'">
|
||||
<div v-if="currentM == '二维码'">
|
||||
<scQrCode text="xxxx"></scQrCode>
|
||||
</div>
|
||||
<div v-if="currentM=='带默认的选择'">
|
||||
<div v-if="currentM == 'ehsSelect'">
|
||||
<ehsSelect
|
||||
:apiObj="apiObj"
|
||||
v-model="x"
|
||||
|
@ -23,28 +25,69 @@
|
|||
:params="{ search: '生产' }"
|
||||
></ehsSelect>
|
||||
</div>
|
||||
<div v-if="currentM=='图标选择'">
|
||||
<scIconSelect></scIconSelect>
|
||||
</div>
|
||||
<div v-if="currentM=='xselect'">
|
||||
<xSelect :apiObj="apiObj" v-model="x2" v-model:label="x2_name" style="width: 200px">
|
||||
<div v-if="currentM == 'xSelect'">
|
||||
<xSelect
|
||||
:apiObj="apiObj"
|
||||
v-model="x2"
|
||||
v-model:label="x2_name"
|
||||
v-model:obj="x2_obj"
|
||||
style="width: 500px"
|
||||
:multiple="true"
|
||||
>
|
||||
<el-table-column label="id" prop="id"></el-table-column>
|
||||
<el-table-column label="名称" prop="name"></el-table-column>
|
||||
</xSelect>
|
||||
<!-- <el-button @click="showx2"></el-button> -->
|
||||
|
||||
<div>当前选择:
|
||||
<h1>value: {{ x2 }} </h1>
|
||||
<h1>label: {{ x2_name }} </h1>
|
||||
<h1>obj: {{ x2_obj }}</h1>
|
||||
</div>
|
||||
<div v-if="currentM=='vue-echarts'">
|
||||
<v-chart :option="chartOption" autoresize style="height: 400px; width: 400px"/>
|
||||
</div>
|
||||
<div v-if="currentM == 'scEcharts'">
|
||||
<el-card title="测试图表">
|
||||
<scEcharts
|
||||
:option="chartOption"
|
||||
height="400px"
|
||||
/>
|
||||
</el-card>
|
||||
</div>
|
||||
<div v-if="currentM == 'ehsUserSelect'">
|
||||
<ehsUserSelect :multiple="true" @submit="getMember" />
|
||||
</div>
|
||||
<div v-if="currentM == 'ehsEpSelect'">
|
||||
<ehsEpSelect :multiple="true" @submit="getMember" />
|
||||
</div>
|
||||
<div v-if="currentM == 'ehsTableSelect'">
|
||||
<ehsTableSelect
|
||||
:apiObj="apiObj"
|
||||
v-model="x2"
|
||||
:props="{ value: 'id', label: 'name' }"
|
||||
:multiple="true"
|
||||
>
|
||||
<el-table-column label="id" prop="id"></el-table-column>
|
||||
<el-table-column label="名称" prop="name"></el-table-column>
|
||||
</ehsTableSelect>
|
||||
</div>
|
||||
</el-main>
|
||||
</el-container>
|
||||
</template>
|
||||
<script>
|
||||
// import xSelects from "@/components/xSelect/index2.vue";
|
||||
export default {
|
||||
name: "testx",
|
||||
components: {},
|
||||
data() {
|
||||
return {
|
||||
menu: [
|
||||
"二维码",
|
||||
"xSelect",
|
||||
"ehsSelect",
|
||||
"scEcharts",
|
||||
"ehsUserSelect",
|
||||
"ehsEpSelect",
|
||||
"ehsTableSelect",
|
||||
],
|
||||
currentM: "",
|
||||
apiObj: this.$API.system.dept.list,
|
||||
x: "3607937377546706944",
|
||||
|
@ -53,47 +96,48 @@ export default {
|
|||
apiObj2: this.$API.system.user.list,
|
||||
x2: "3347207082608115712",
|
||||
x2_name: "烧成车间",
|
||||
x2_obj: {},
|
||||
chartOption: {
|
||||
textStyle: {
|
||||
fontFamily: 'Inter, "Helvetica Neue", Arial, sans-serif',
|
||||
},
|
||||
title: {
|
||||
text: 'Traffic Sources',
|
||||
left: 'center',
|
||||
text: "Traffic Sources",
|
||||
left: "center",
|
||||
},
|
||||
tooltip: {
|
||||
trigger: 'item',
|
||||
formatter: '{a} <br/>{b} : {c} ({d}%)',
|
||||
trigger: "item",
|
||||
formatter: "{a} <br/>{b} : {c} ({d}%)",
|
||||
},
|
||||
legend: {
|
||||
orient: 'vertical',
|
||||
left: 'left',
|
||||
orient: "vertical",
|
||||
left: "left",
|
||||
data: [
|
||||
'Direct',
|
||||
'Email',
|
||||
'Ad Networks',
|
||||
'Video Ads',
|
||||
'Search Engines',
|
||||
"Direct",
|
||||
"Email",
|
||||
"Ad Networks",
|
||||
"Video Ads",
|
||||
"Search Engines",
|
||||
],
|
||||
},
|
||||
series: [
|
||||
{
|
||||
name: 'Traffic Sources',
|
||||
type: 'pie',
|
||||
radius: '55%',
|
||||
center: ['50%', '60%'],
|
||||
name: "Traffic Sources",
|
||||
type: "pie",
|
||||
radius: "55%",
|
||||
center: ["50%", "60%"],
|
||||
data: [
|
||||
{ value: 335, name: 'Direct' },
|
||||
{ value: 310, name: 'Email' },
|
||||
{ value: 234, name: 'Ad Networks' },
|
||||
{ value: 135, name: 'Video Ads' },
|
||||
{ value: 1548, name: 'Search Engines' },
|
||||
{ value: 335, name: "Direct" },
|
||||
{ value: 310, name: "Email" },
|
||||
{ value: 234, name: "Ad Networks" },
|
||||
{ value: 135, name: "Video Ads" },
|
||||
{ value: 1548, name: "Search Engines" },
|
||||
],
|
||||
emphasis: {
|
||||
itemStyle: {
|
||||
shadowBlur: 10,
|
||||
shadowOffsetX: 0,
|
||||
shadowColor: 'rgba(0, 0, 0, 0.5)',
|
||||
shadowColor: "rgba(0, 0, 0, 0.5)",
|
||||
},
|
||||
},
|
||||
},
|
||||
|
@ -103,9 +147,12 @@ export default {
|
|||
},
|
||||
mounted() {},
|
||||
methods: {
|
||||
showx2(){
|
||||
getMember(data) {
|
||||
console.log(data);
|
||||
},
|
||||
showx2() {
|
||||
// console.log(this.x2)
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
|
|
@ -70,6 +70,11 @@
|
|||
</el-table-column>
|
||||
<el-table-column label="更新时间" prop="update_time">
|
||||
</el-table-column>
|
||||
<el-table-column width="90">
|
||||
<template #default="scope">
|
||||
<el-button @click="printMaterial(scope.row)" type="text">物料标签</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</scTable>
|
||||
</el-main>
|
||||
</el-container>
|
||||
|
@ -143,6 +148,7 @@ export default {
|
|||
paramsWm: { count__gte: 1, material__type: 10 },
|
||||
// processOptions: [],
|
||||
queryWm: {},
|
||||
printer_name:localStorage.getItem("printer_name")
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
|
@ -169,6 +175,31 @@ export default {
|
|||
resetQuery() {
|
||||
this.query = {};
|
||||
},
|
||||
//打印物料标签
|
||||
printMaterial(row){
|
||||
let that = this;
|
||||
let code = "";
|
||||
that.$API.cm.labelmat.fromMb.req({tid:row.id}).then((res) => {
|
||||
code = res.code_label;
|
||||
let str = [
|
||||
"SIZE 40 mm,70 mm",
|
||||
"GAP 7 mm,7 mm",
|
||||
"CLS",
|
||||
"REFERENCE 0,0",
|
||||
'QRCODE 30,400,H,5,A,0,"' +code +'"',
|
||||
"WINTEXT 200,550,28,90,0,0,Simhei," + res.material_name,
|
||||
"WINTEXT 240,550,28,90,0,0,Simhei," + res.batch,
|
||||
];
|
||||
if(res.notok_sign!==null){
|
||||
str.push("WINTEXT 280,550,28,90,0,0,Simhei," +res.notok_sign_name,)
|
||||
}
|
||||
str.push("PRINT 1",)
|
||||
let obj = {};
|
||||
obj.printer_commands = str;
|
||||
obj.printer_name = that.printer_name;
|
||||
this.$API.wpm.prints.req(obj).then((response) => {});
|
||||
})
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
|
|
@ -70,6 +70,11 @@
|
|||
</el-table-column>
|
||||
<el-table-column label="更新时间" prop="update_time">
|
||||
</el-table-column>
|
||||
<el-table-column width="90">
|
||||
<template #default="scope">
|
||||
<el-button @click="printMaterial(scope.row)" type="text">物料标签</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</scTable>
|
||||
</el-main>
|
||||
</el-container>
|
||||
|
@ -152,6 +157,7 @@ export default {
|
|||
paramsWm: { count__gte: 1 },
|
||||
processOptions: [],
|
||||
queryWm: {},
|
||||
printer_name:localStorage.getItem("printer_name")
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
|
@ -178,6 +184,32 @@ export default {
|
|||
resetQuery() {
|
||||
this.query = {};
|
||||
},
|
||||
//打印物料标签
|
||||
printMaterial(row){
|
||||
let that = this;
|
||||
let code = "";
|
||||
that.$API.cm.labelmat.fromMb.req({tid:row.id}).then((res) => {
|
||||
code = res.code_label;
|
||||
let str = [
|
||||
"SIZE 40 mm,70 mm",
|
||||
"GAP 7 mm,7 mm",
|
||||
"CLS",
|
||||
"REFERENCE 0,0",
|
||||
'QRCODE 30,400,H,5,A,0,"' +code +'"',
|
||||
"WINTEXT 200,550,28,90,0,0,Simhei," + res.material_name,
|
||||
"WINTEXT 240,550,28,90,0,0,Simhei," + res.batch,
|
||||
];
|
||||
if(res.notok_sign!==null){
|
||||
str.push("WINTEXT 280,550,28,90,0,0,Simhei," +res.notok_sign_name,)
|
||||
}
|
||||
str.push("PRINT 1",)
|
||||
let obj = {};
|
||||
obj.printer_commands = str;
|
||||
obj.printer_name = that.printer_name;
|
||||
this.$API.wpm.prints.req(obj).then((response) => {});
|
||||
})
|
||||
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
|
|
@ -57,6 +57,11 @@
|
|||
</el-table-column>
|
||||
<el-table-column label="更新时间" prop="update_time">
|
||||
</el-table-column>
|
||||
<el-table-column width="90">
|
||||
<template #default="scope">
|
||||
<el-button @click="printMaterial(scope.row)" type="text">物料标签</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</scTable>
|
||||
</el-main>
|
||||
</el-container>
|
||||
|
@ -71,6 +76,7 @@ export default {
|
|||
selection: [],
|
||||
query: {},
|
||||
warehouseOptions: [],
|
||||
printer_name:localStorage.getItem("printer_name")
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
|
@ -88,6 +94,32 @@ export default {
|
|||
resetQuery() {
|
||||
this.query = {};
|
||||
},
|
||||
//打印物料标签
|
||||
printMaterial(row){
|
||||
let that = this;
|
||||
let code = "";
|
||||
that.$API.cm.labelmat.fromMb.req({tid:row.id}).then((res) => {
|
||||
code = res.code_label;
|
||||
let str = [
|
||||
"SIZE 40 mm,70 mm",
|
||||
"GAP 7 mm,7 mm",
|
||||
"CLS",
|
||||
"REFERENCE 0,0",
|
||||
'QRCODE 30,400,H,5,A,0,"' +code +'"',
|
||||
"WINTEXT 200,550,28,90,0,0,Simhei," + res.material_name,
|
||||
"WINTEXT 240,550,28,90,0,0,Simhei," + res.batch,
|
||||
];
|
||||
if(res.notok_sign!==null){
|
||||
str.push("WINTEXT 280,550,28,90,0,0,Simhei," +res.notok_sign_name,)
|
||||
}
|
||||
str.push("PRINT 1",)
|
||||
let obj = {};
|
||||
obj.printer_commands = str;
|
||||
obj.printer_name = that.printer_name;
|
||||
this.$API.wpm.prints.req(obj).then((response) => {});
|
||||
})
|
||||
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
|
|
@ -57,6 +57,11 @@
|
|||
</el-table-column>
|
||||
<el-table-column label="更新时间" prop="update_time">
|
||||
</el-table-column>
|
||||
<el-table-column width="90">
|
||||
<template #default="scope">
|
||||
<el-button @click="printMaterial(scope.row)" type="text">物料标签</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</scTable>
|
||||
</el-main>
|
||||
</el-container>
|
||||
|
@ -71,6 +76,7 @@ export default {
|
|||
selection: [],
|
||||
query: {},
|
||||
warehouseOptions: [],
|
||||
printer_name:localStorage.getItem("printer_name")
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
|
@ -88,6 +94,32 @@ export default {
|
|||
resetQuery() {
|
||||
this.query = {};
|
||||
},
|
||||
//打印物料标签
|
||||
printMaterial(row){
|
||||
let that = this;
|
||||
let code = "";
|
||||
that.$API.cm.labelmat.fromMb.req({tid:row.id}).then((res) => {
|
||||
code = res.code_label;
|
||||
let str = [
|
||||
"SIZE 40 mm,70 mm",
|
||||
"GAP 7 mm,7 mm",
|
||||
"CLS",
|
||||
"REFERENCE 0,0",
|
||||
'QRCODE 30,400,H,5,A,0,"' +code +'"',
|
||||
"WINTEXT 200,550,28,90,0,0,Simhei," + res.material_name,
|
||||
"WINTEXT 240,550,28,90,0,0,Simhei," + res.batch,
|
||||
];
|
||||
if(res.notok_sign!==null){
|
||||
str.push("WINTEXT 280,550,28,90,0,0,Simhei," +res.notok_sign_name,)
|
||||
}
|
||||
str.push("PRINT 1",)
|
||||
let obj = {};
|
||||
obj.printer_commands = str;
|
||||
obj.printer_name = that.printer_name;
|
||||
this.$API.wpm.prints.req(obj).then((response) => {});
|
||||
})
|
||||
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
<div style="padding: 8px">
|
||||
<div>
|
||||
<el-card style="width: 100%" header="基本信息" shadow="hover">
|
||||
<el-button type="primary" @click="handlePrint" style="position: absolute;right: 20px;">打印</el-button>
|
||||
<el-button type="primary" @click="handlePrint" style="position: absolute;right: 40px;">打印</el-button>
|
||||
<el-descriptions>
|
||||
<el-descriptions-item label="编号">{{
|
||||
mioObj.number
|
||||
|
@ -210,7 +210,7 @@
|
|||
>
|
||||
</check-dialog>
|
||||
<el-dialog v-model="printVisible" width="1200px">
|
||||
<print :baseData="mioObj" :tableData="tableData" :type="mioObj.type" mtype="20"/>
|
||||
<print :baseData="mioObj" :tableData="tableData" :type="mioObj.type" @closePrint="printVisible=false"/>
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script>
|
||||
|
|
|
@ -51,9 +51,11 @@
|
|||
<el-link type="primary" v-if="scope.row.submit_user==null" @click="table_submit(scope.row)">提交</el-link>
|
||||
<el-divider direction="vertical" v-if="scope.row.submit_user==null"></el-divider>
|
||||
<el-link type="primary" v-if="scope.row.submit_user==null" @click="table_edit(scope.row)">编辑</el-link>
|
||||
<el-link type="primary" v-else @click="table_show(scope.row)">查看</el-link>
|
||||
<el-divider direction="vertical" v-if="scope.row.submit_user==null"></el-divider>
|
||||
<el-link type="danger" v-if="scope.row.submit_user==null" @click="table_del(scope.row)">删除</el-link>
|
||||
<el-link type="primary" v-if="scope.row.submit_user!==null" @click="handlePrint(scope.row)">打印</el-link>
|
||||
<el-divider direction="vertical" v-if="scope.row.submit_user!==null"></el-divider>
|
||||
<el-link type="primary" v-if="scope.row.submit_user!==null" @click="table_show(scope.row)">查看</el-link>
|
||||
<!-- <el-link type="danger" v-else @click="table_revert(scope.row)">撤回</el-link> -->
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
@ -69,9 +71,13 @@
|
|||
@closed="dialog.save = false"
|
||||
>
|
||||
</save-dialog>
|
||||
<el-dialog v-model="printVisible" width="1200px">
|
||||
<print :baseData="rowItem" :type="type" @closePrint="printVisible=false"/>
|
||||
</el-dialog>
|
||||
</el-container>
|
||||
</template>
|
||||
<script>
|
||||
import print from "./../setting/print/A4.vue";
|
||||
import saveDialog from "./products_form.vue";
|
||||
|
||||
export default {
|
||||
|
@ -84,7 +90,7 @@ export default {
|
|||
},
|
||||
name: "mlog",
|
||||
components: {
|
||||
saveDialog,
|
||||
saveDialog,print
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
@ -95,20 +101,25 @@ export default {
|
|||
save: false,
|
||||
detail: false,
|
||||
},
|
||||
type:'',
|
||||
tableData: [],
|
||||
selection: [],
|
||||
rowItem:{},
|
||||
mtask: "",
|
||||
mlogId: "",
|
||||
deptId: null,
|
||||
processId: "",
|
||||
processCate: "",
|
||||
printVisible:false,
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
let that = this;
|
||||
if(that.mgroupName == "size"){
|
||||
this.type = "productstest_cc";
|
||||
this.params.material__process__name = "一次超洗";
|
||||
}else{
|
||||
this.type = "productstest_wg";
|
||||
this.params.material__process__name = "二次超洗";
|
||||
}
|
||||
that.apiObj= this.$API.qm.ftestwork.list;
|
||||
|
@ -185,6 +196,11 @@ export default {
|
|||
this.dialog.save = true;
|
||||
this.$refs.table.refresh();
|
||||
},
|
||||
//打印
|
||||
handlePrint(row){
|
||||
this.rowItem = row;
|
||||
this.printVisible = true;
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
|
|
@ -102,6 +102,16 @@
|
|||
</el-table-column>
|
||||
<el-table-column label="抽检时间" prop="submit_time" width="150">
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="60" fixed="right">
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
type="text"
|
||||
size="small"
|
||||
@click="handlePrint(scope.row)"
|
||||
>打印</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</scTable>
|
||||
</el-main>
|
||||
<el-dialog title="选择物料" v-model="materialsVisible" width="90%">
|
||||
|
@ -111,13 +121,17 @@
|
|||
@choseChange="choseChange"
|
||||
></materials>
|
||||
</el-dialog>
|
||||
<el-dialog v-model="printVisible" width="1200px">
|
||||
<print :baseData="rowItem" type="ptest_gx" @closePrint="printVisible=false"/>
|
||||
</el-dialog>
|
||||
</el-container>
|
||||
</template>
|
||||
<script>
|
||||
import print from "./../setting/print/A4.vue";
|
||||
import materials from "./../mtm/materials.vue";
|
||||
export default {
|
||||
components: {
|
||||
materials,
|
||||
materials,print
|
||||
},
|
||||
name: "rparty",
|
||||
data() {
|
||||
|
@ -137,7 +151,9 @@ export default {
|
|||
10: "",
|
||||
20: "",
|
||||
},
|
||||
rowItem:{},
|
||||
mgroupOption: [],
|
||||
printVisible:false,
|
||||
exportLoading:false,
|
||||
materialsVisible: false,
|
||||
};
|
||||
|
@ -165,6 +181,11 @@ export default {
|
|||
resetQuery() {
|
||||
this.query = {};
|
||||
},
|
||||
//打印
|
||||
handlePrint(row){
|
||||
this.rowItem = row;
|
||||
this.printVisible = true;
|
||||
},
|
||||
exportExcel() {
|
||||
this.exportLoading = true;
|
||||
this.$XLSX('#myTable',"过程抽检表")
|
||||
|
|
|
@ -0,0 +1,180 @@
|
|||
<template>
|
||||
<el-container>
|
||||
<el-header>
|
||||
<div class="left-panel">
|
||||
<el-button type="primary" icon="el-icon-download" v-loading="exportLoading" @click="exportExcel">导出</el-button>
|
||||
</div>
|
||||
<div class="right-panel">
|
||||
<el-select
|
||||
v-model="query.mgroup"
|
||||
clearable
|
||||
style="width: 150px"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in mgroupOption"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
<el-date-picker
|
||||
v-model="query.handle_date"
|
||||
type="date"
|
||||
placeholder="选择日期"
|
||||
value-format="YYYY-MM-DD"
|
||||
style="width: 150px"
|
||||
/>
|
||||
<el-input
|
||||
v-model="query.search"
|
||||
placeholder="批次号"
|
||||
clearable
|
||||
style="width: 150px"
|
||||
></el-input>
|
||||
<el-button type="primary" @click="materialsChoses()"
|
||||
>选择物料</el-button
|
||||
>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-search"
|
||||
@click="handleQuery"
|
||||
>查询</el-button
|
||||
>
|
||||
</div>
|
||||
</el-header>
|
||||
<el-main class="nopadding">
|
||||
<scTable
|
||||
ref="table"
|
||||
:apiObj="apiObj"
|
||||
row-key="id"
|
||||
stripe
|
||||
id="myTable"
|
||||
:query="query"
|
||||
>
|
||||
<el-table-column type="index" width="50" />
|
||||
<el-table-column label="物料" prop="material_out_name" show-overflow-tooltip min-width="120">
|
||||
</el-table-column>
|
||||
<el-table-column label="工序" prop="mgroup_name">
|
||||
</el-table-column>
|
||||
<el-table-column label="生产数" prop="count_real">
|
||||
</el-table-column>
|
||||
<el-table-column label="合格数" prop="count_ok">
|
||||
</el-table-column>
|
||||
<el-table-column label="不合格数" prop="count_notok">
|
||||
</el-table-column>
|
||||
<el-table-column label="不合格原因" align="center">
|
||||
<el-table-column label="厚度" prop="count_n_hd">
|
||||
</el-table-column>
|
||||
<el-table-column label="气泡" prop="count_n_qp">
|
||||
</el-table-column>
|
||||
<el-table-column label="水纹" prop="count_n_swen">
|
||||
</el-table-column>
|
||||
<el-table-column label="崩边" prop="count_n_bb">
|
||||
</el-table-column>
|
||||
<el-table-column label="划伤" prop="count_n_hs">
|
||||
</el-table-column>
|
||||
<el-table-column label="麻点" prop="count_n_md">
|
||||
</el-table-column>
|
||||
<el-table-column label="线痕" prop="count_n_xh">
|
||||
</el-table-column>
|
||||
<el-table-column label="产品外径" prop="count_n_cpwj">
|
||||
</el-table-column>
|
||||
<el-table-column label="产品圆度" prop="count_n_cpyd">
|
||||
</el-table-column>
|
||||
<el-table-column label="产品同心度" prop="count_n_cptxd">
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column label="班组" prop="shift_name">
|
||||
</el-table-column>
|
||||
<el-table-column label="所属车间" prop="belong_dept_name">
|
||||
</el-table-column>
|
||||
<el-table-column label="操作时间" prop="handle_date">
|
||||
</el-table-column>
|
||||
<el-table-column label="处理人" prop="handle_user_name">
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="60" fixed="right">
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
type="text"
|
||||
size="small"
|
||||
@click="handlePrint(scope.row)"
|
||||
>打印</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</scTable>
|
||||
</el-main>
|
||||
<el-dialog title="选择物料" v-model="materialsVisible" width="90%">
|
||||
<materials style="height: 500px" ref="materialsChose" @choseChange="choseChange">
|
||||
</materials>
|
||||
</el-dialog>
|
||||
<el-dialog v-model="printVisible" width="1200px">
|
||||
<print :baseData="rowItem" type="ptest_gx" @closePrint="printVisible=false"/>
|
||||
</el-dialog>
|
||||
</el-container>
|
||||
</template>
|
||||
<script>
|
||||
import print from "./../setting/print/A4.vue";
|
||||
import materials from "./../mtm/materials.vue";
|
||||
export default {
|
||||
components: {
|
||||
materials,print
|
||||
},
|
||||
name: "rparty",
|
||||
data() {
|
||||
return {
|
||||
apiObj: this.$API.wpm.mlog.list,
|
||||
query: {
|
||||
search: "",
|
||||
material: "",
|
||||
mgroup: "",
|
||||
handle_date: "",
|
||||
},
|
||||
selection: [],
|
||||
state_: {
|
||||
10: "",
|
||||
20: "",
|
||||
},
|
||||
rowItem:{},
|
||||
mgroupOption: [],
|
||||
printVisible:false,
|
||||
exportLoading:false,
|
||||
materialsVisible: false,
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.getMgroup();
|
||||
},
|
||||
methods: {
|
||||
materialsChoses() {
|
||||
this.materialsVisible = true;
|
||||
},
|
||||
choseChange(data) {
|
||||
this.query.material = data;
|
||||
this.$refs.table.queryData(this.query);
|
||||
this.materialsVisible = false;
|
||||
},
|
||||
getMgroup() {
|
||||
this.$API.mtm.mgroup.list.req({ page: 0 }).then((res) => {
|
||||
this.mgroupOption = res;
|
||||
});
|
||||
},
|
||||
handleQuery() {
|
||||
this.$refs.table.queryData(this.query);
|
||||
},
|
||||
resetQuery() {
|
||||
this.query = {};
|
||||
},
|
||||
//打印
|
||||
handlePrint(row){
|
||||
this.rowItem = row;
|
||||
this.printVisible = true;
|
||||
},
|
||||
exportExcel() {
|
||||
this.exportLoading = true;
|
||||
this.$XLSX('#myTable',"过程自检记录表")
|
||||
this.exportLoading = false;
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
|
@ -2,27 +2,29 @@
|
|||
<el-container>
|
||||
<!--基本信息!-->
|
||||
<el-main v-loading="mainLoading" style="margin-top: -10px;">
|
||||
<el-button type="primary" @click="handleExport">导出</el-button>
|
||||
<el-button type="primary" @click="handlePrint">打印</el-button>
|
||||
<div id="exportDiv" class="exportDiv">
|
||||
<div id="exportDiv" v-if="codeVisible" class="exportDiv">
|
||||
<scQrCode :text="value"></scQrCode>
|
||||
<!-- <div ref="qrCodeUrl" id="qrcode" v-if="codeVisible"></div> -->
|
||||
<!-- <canvas id="barcode"></canvas> -->
|
||||
<!-- 入库信息 -->
|
||||
<div class="containersDom" v-if="type=='do_in'||type=='pur_in'">
|
||||
<ul class="export_ul">
|
||||
<li class="export_ulli export_ulli_title">入库信息单</li>
|
||||
</ul>
|
||||
<ul class="export_ul">
|
||||
<li class="export_ulli">入库信息单编号</li>
|
||||
<li class="export_ulli">入库日期</li>
|
||||
<li class="export_ulli" v-if="mtype=='10'||mtype=='20'">执行部门-工段</li>
|
||||
<li class="export_ulli" v-if="mtype=='10'||mtype=='20'">交送人</li>
|
||||
<li class="export_ulli">仓库接收人</li>
|
||||
<li class="export_ulli">仓库</li>
|
||||
<li class="export_ulli" v-if="mtype=='30'||mtype=='40'">采购订单</li>
|
||||
<li class="export_ulli" v-if="mtype=='30'||mtype=='40'">供应商名称</li>
|
||||
<li class="export_ulli export_ulli_h">入库信息单编号</li>
|
||||
<li class="export_ulli export_ulli_h">入库日期</li>
|
||||
<li class="export_ulli export_ulli_h" v-if="mtype=='10'||mtype=='20'">执行部门-工段</li>
|
||||
<li class="export_ulli export_ulli_h" v-if="mtype=='10'||mtype=='20'">交送人</li>
|
||||
<li class="export_ulli export_ulli_h">仓库接收人</li>
|
||||
<li class="export_ulli export_ulli_h">仓库</li>
|
||||
<li class="export_ulli export_ulli_h" v-if="mtype=='30'||mtype=='40'">采购订单</li>
|
||||
<li class="export_ulli export_ulli_h" v-if="mtype=='30'||mtype=='40'">供应商名称</li>
|
||||
</ul>
|
||||
<ul class="export_ul">
|
||||
<li class="export_ulli">{{baseData.number}}</li>
|
||||
<li class="export_ulli">{{baseData.submit_time.slice(0,16)}}</li>
|
||||
<li class="export_ulli">{{baseData.inout_date}}</li>
|
||||
<!-- <li class="export_ulli" v-else>{{baseData.submit_time.slice(0,16)}}</li> -->
|
||||
<li class="export_ulli" v-if="mtype=='10'||mtype=='20'">{{baseData.belong_dept_name}}</li>
|
||||
<li class="export_ulli" v-if="mtype=='10'||mtype=='20'">{{baseData.do_user_name}}</li>
|
||||
<li class="export_ulli">{{baseData.mio_user_name}}</li>
|
||||
|
@ -35,17 +37,17 @@
|
|||
<li class="export_ulli export_ulli_title">物料清单</li>
|
||||
</ul>
|
||||
<ul class="export_ul">
|
||||
<li class="export_ulli">物料名称</li>
|
||||
<li class="export_ulli">型号</li>
|
||||
<li class="export_ulli">所在工序</li>
|
||||
<li class="export_ulli">批次号</li>
|
||||
<li class="export_ulli">数量</li>
|
||||
<li class="export_ulli export_ulli_h flex2">物料名称</li>
|
||||
<!-- <li class="export_ulli export_ulli_h">型号</li> -->
|
||||
<li class="export_ulli export_ulli_h">所在工序</li>
|
||||
<li class="export_ulli export_ulli_h flex2">批次号</li>
|
||||
<li class="export_ulli export_ulli_h">数量</li>
|
||||
</ul>
|
||||
<ul class="export_ul" v-for="item in tableData" :key="item.id">
|
||||
<li class="export_ulli">{{ item.material_name }}</li>
|
||||
<li class="export_ulli" v-if="item.material_">{{ item.material_.model }}</li>
|
||||
<li class="export_ulli flex2">{{ item.material_name }}</li>
|
||||
<!-- <li class="export_ulli" v-if="item.material_">{{ item.material_.model }}</li> -->
|
||||
<li class="export_ulli" v-if="item.material_">{{ item.material_.process_name }}</li>
|
||||
<li class="export_ulli">{{ item.batch }}</li>
|
||||
<li class="export_ulli flex2">{{ item.batch }}</li>
|
||||
<li class="export_ulli">{{ item.count }}</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
@ -119,8 +121,8 @@
|
|||
<li class="export_ulli">{{ item.count }}</li>
|
||||
</ul>
|
||||
</div>
|
||||
<!-- 检验结果 -->
|
||||
<div class="containersDom" v-else-if="type=='check_out'">
|
||||
<!-- 过程检验/过程抽检-->
|
||||
<div class="containersDom" v-else-if="type=='ptest_gx'||type=='ptest_cj'">
|
||||
<ul class="export_ul">
|
||||
<li class="export_ulli export_ulli_title">XXX检验结果</li>
|
||||
</ul>
|
||||
|
@ -160,6 +162,7 @@
|
|||
<li class="export_ulli"></li>
|
||||
<li class="export_ulli"></li>
|
||||
</ul>
|
||||
<!-- 过程检验 -->
|
||||
<ul class="export_ul">
|
||||
<li class="export_ulli">厚度</li>
|
||||
<li class="export_ulli">气泡</li>
|
||||
|
@ -184,6 +187,99 @@
|
|||
<li class="export_ulli">{{baseData.count_n_cpyd}}</li>
|
||||
<li class="export_ulli">{{baseData.count_n_cptxd}}</li>
|
||||
</ul>
|
||||
</div>
|
||||
<!-- 尺寸检验/外观检验 -->
|
||||
<div class="containersDom" v-else-if="type=='productstest_cc'||type=='productstest_wg'">
|
||||
<ul class="export_ul">
|
||||
<li class="export_ulli export_ulli_title" v-if="type=='productstest_cc'">尺寸检验</li>
|
||||
<li class="export_ulli export_ulli_title" v-else>外观检验</li>
|
||||
</ul>
|
||||
<ul class="export_ul">
|
||||
<li class="export_ulli">批次号</li>
|
||||
<li class="export_ulli">总数</li>
|
||||
<li class="export_ulli">检验数</li>
|
||||
<li class="export_ulli">检验人</li>
|
||||
<li class="export_ulli">检验日期</li>
|
||||
<li class="export_ulli">班次</li>
|
||||
</ul>
|
||||
<ul class="export_ul">
|
||||
<li class="export_ulli">{{ baseData.material_mame }}</li>
|
||||
<li class="export_ulli">{{ baseData.count_real }}</li>
|
||||
<li class="export_ulli">{{ baseData.count_use }}</li>
|
||||
<li class="export_ulli">{{ baseData.handle_user_name }}</li>
|
||||
<li class="export_ulli">{{ baseData.count_ok }}</li>
|
||||
<li class="export_ulli">{{ baseData.test_time }}</li>
|
||||
</ul>
|
||||
<ul class="export_ul">
|
||||
<li class="export_ulli">合格数</li>
|
||||
<li class="export_ulli">不合格数</li>
|
||||
<li class="export_ulli"></li>
|
||||
<li class="export_ulli"></li>
|
||||
<li class="export_ulli"></li>
|
||||
<li class="export_ulli"></li>
|
||||
</ul>
|
||||
<ul class="export_ul">
|
||||
<li class="export_ulli">{{ baseData.count_ok }}</li>
|
||||
<li class="export_ulli">{{baseData.count_notok}}</li>
|
||||
<li class="export_ulli"></li>
|
||||
<li class="export_ulli"></li>
|
||||
<li class="export_ulli"></li>
|
||||
<li class="export_ulli"></li>
|
||||
</ul>
|
||||
<!-- 尺寸检验 -->
|
||||
<ul class="export_ul" v-if="type=='productstest_cc'">
|
||||
<li class="export_ulli">黑圈内径</li>
|
||||
<li class="export_ulli">黑圈内径圆度</li>
|
||||
<li class="export_ulli">黑圈外径</li>
|
||||
<li class="export_ulli">黑圈外径圆度</li>
|
||||
<li class="export_ulli">产品外径</li>
|
||||
<li class="export_ulli">产品圆度</li>
|
||||
<li class="export_ulli">产品同心度</li>
|
||||
<li class="export_ulli">厚度</li>
|
||||
<li class="export_ulli">准合格</li>
|
||||
<li class="export_ulli">圆准</li>
|
||||
</ul>
|
||||
<!-- 外观检验 -->
|
||||
<ul class="export_ul" v-else>
|
||||
<li class="export_ulli">脏</li>
|
||||
<li class="export_ulli">气泡</li>
|
||||
<li class="export_ulli">水纹</li>
|
||||
<li class="export_ulli">崩边</li>
|
||||
<li class="export_ulli">棕边</li>
|
||||
<li class="export_ulli">棕圈</li>
|
||||
<li class="export_ulli">划伤</li>
|
||||
<li class="export_ulli">麻点</li>
|
||||
<li class="export_ulli">黑圈变形</li>
|
||||
<li class="export_ulli">倒角</li>
|
||||
<li class="export_ulli">破损</li>
|
||||
<li class="export_ulli">蓝圈</li>
|
||||
</ul>
|
||||
<ul class="export_ul" v-if="type=='productstest_cc'">
|
||||
<li class="export_ulli">{{baseData.count_n_hd}}</li>
|
||||
<li class="export_ulli">{{baseData.count_n_qp}}</li>
|
||||
<li class="export_ulli">{{baseData.count_n_swen}}</li>
|
||||
<li class="export_ulli">{{baseData.count_n_bb}}</li>
|
||||
<li class="export_ulli">{{baseData.count_n_hs}}</li>
|
||||
<li class="export_ulli">{{baseData.count_n_md}}</li>
|
||||
<li class="export_ulli">{{baseData.count_n_xh}}</li>
|
||||
<li class="export_ulli">{{baseData.count_n_cpwj}}</li>
|
||||
<li class="export_ulli">{{baseData.count_n_cpyd}}</li>
|
||||
<li class="export_ulli">{{baseData.count_n_cptxd}}</li>
|
||||
</ul>
|
||||
<ul class="export_ul" v-else>
|
||||
<li class="export_ulli">{{baseData.count_n_hd}}</li>
|
||||
<li class="export_ulli">{{baseData.count_n_qp}}</li>
|
||||
<li class="export_ulli">{{baseData.count_n_swen}}</li>
|
||||
<li class="export_ulli">{{baseData.count_n_bb}}</li>
|
||||
<li class="export_ulli">{{baseData.count_n_hs}}</li>
|
||||
<li class="export_ulli">{{baseData.count_n_md}}</li>
|
||||
<li class="export_ulli">{{baseData.count_n_xh}}</li>
|
||||
<li class="export_ulli">{{baseData.count_n_cpwj}}</li>
|
||||
<li class="export_ulli">{{baseData.count_n_cpyd}}</li>
|
||||
<li class="export_ulli">{{baseData.count_n_cptxd}}</li>
|
||||
<li class="export_ulli">{{baseData.count_n_cptxd}}</li>
|
||||
<li class="export_ulli">{{baseData.count_n_cptxd}}</li>
|
||||
</ul>
|
||||
</div>
|
||||
<!-- 任务分解单 -->
|
||||
<div class="containersDom" v-else-if="type=='mtask'">
|
||||
|
@ -192,60 +288,115 @@
|
|||
</ul>
|
||||
<ul class="export_ul">
|
||||
<li class="export_ulli">任务编号</li>
|
||||
<li class="export_ulli">工艺路线</li>
|
||||
<li class="export_ulli">所在工段</li>
|
||||
<li class="export_ulli">产品名称</li>
|
||||
<li class="export_ulli">任务总数量</li>
|
||||
</ul>
|
||||
<ul class="export_ul">
|
||||
<li class="export_ulli">11111111111</li>
|
||||
<li class="export_ulli">CNC</li>
|
||||
<li class="export_ulli">CNC玻璃</li>
|
||||
<li class="export_ulli">100000</li>
|
||||
<li class="export_ulli">{{ baseData.number }}</li>
|
||||
<li class="export_ulli">{{ baseData.mgroup_name }}</li>
|
||||
<li class="export_ulli">{{ baseData.material_out_name }}</li>
|
||||
<li class="export_ulli">{{ baseData.count }}</li>
|
||||
</ul>
|
||||
|
||||
<ul class="export_ul">
|
||||
<li class="export_ulli export_ulli_title">任务分解表</li>
|
||||
</ul>
|
||||
<ul class="export_ul">
|
||||
<li class="export_ulli">子任务编号</li>
|
||||
<li class="export_ulli">人员</li>
|
||||
<li class="export_ulli">数量</li>
|
||||
</ul>
|
||||
<ul class="export_ul">
|
||||
<li class="export_ulli">11111111101</li>
|
||||
<li class="export_ulli">张三</li>
|
||||
<li class="export_ulli">5000</li>
|
||||
<ul class="export_ul" v-for="item in baseData.mtaskb" :key="item.id">
|
||||
<li class="export_ulli">{{ item.handle_user_name }}</li>
|
||||
<li class="export_ulli">{{ item.count }}</li>
|
||||
</ul>
|
||||
</div>
|
||||
<!-- 日志记录 -->
|
||||
<div class="containersDom" v-else-if="type=='mlogs'">
|
||||
<div class="containersDom" v-else-if="type=='mlogs12'">
|
||||
<ul class="export_ul">
|
||||
<li class="export_ulli export_ulli_title">日志记录</li>
|
||||
</ul>
|
||||
<ul class="export_ul">
|
||||
<li class="export_ulli">任务编号</li>
|
||||
<li class="export_ulli">工艺路线</li>
|
||||
<li class="export_ulli">产品名称</li>
|
||||
<li class="export_ulli">任务总数</li>
|
||||
<li class="export_ulli">备注</li>
|
||||
<!-- <li class="export_ulli">任务总数</li> -->
|
||||
</ul>
|
||||
<ul class="export_ul">
|
||||
<li class="export_ulli">11111111111</li>
|
||||
<li class="export_ulli">CNC</li>
|
||||
<li class="export_ulli">CNC玻璃</li>
|
||||
<li class="export_ulli">100000</li>
|
||||
<li class="export_ulli">{{baseData.mtask_number}}</li>
|
||||
<li class="export_ulli">{{baseData.routepack_name}}</li>
|
||||
<li class="export_ulli">{{baseData.note}}</li>
|
||||
<!-- <li class="export_ulli">{{baseData.routepack_name}}</li> -->
|
||||
</ul>
|
||||
<ul class="export_ul">
|
||||
<li class="export_ulli export_ulli_title">物料清单</li>
|
||||
</ul>
|
||||
<!-- 循环子任务 -->
|
||||
<div style="display: flex;">
|
||||
<div style="width: 40px; border-top: 1px solid #aaaaaa;border-left: 1px solid #aaaaaa;">1</div>
|
||||
<div style="display: flex;" v-for="(item,index) in tableData" :key="item.id">
|
||||
<div style="width: 40px; border-top: 1px solid #aaaaaa;border-left: 1px solid #aaaaaa;">{{ index+1 }}</div>
|
||||
<div style="flex: 1;">
|
||||
<ul class="export_ul">
|
||||
<li class="export_ulli">设备编号</li>
|
||||
<li class="export_ulli">操作人</li>
|
||||
<li class="export_ulli">班次</li>
|
||||
<li class="export_ulli">开始时间</li>
|
||||
</ul>
|
||||
<ul class="export_ul">
|
||||
<li class="export_ulli">{{ item.equipment_name }}</li>
|
||||
<li class="export_ulli">{{ item.handle_user_name }}</li>
|
||||
<li class="export_ulli">{{ item.shift_name }}</li>
|
||||
<li class="export_ulli">{{ item.work_start_time }}</li>
|
||||
</ul>
|
||||
<ul class="export_ul">
|
||||
<li class="export_ulli flex2">输入物料批次号</li>
|
||||
<li class="export_ulli">领料数量</li>
|
||||
<li class="export_ulli">加工数量</li>
|
||||
<li class="export_ulli">加工前不良数量</li>
|
||||
<li class="export_ulli flex2">输出物料批次号</li>
|
||||
<li class="export_ulli">合格数量</li>
|
||||
<li class="export_ulli">不合格数量</li>
|
||||
<!-- <li class="export_ulli">不合格原因</li> -->
|
||||
<!-- <li class="export_ulli">工段</li> -->
|
||||
</ul>
|
||||
<ul class="export_ul">
|
||||
<li class="export_ulli flex2" v-if="item.mlogb_full&&item.mlogb_full[0]">{{item.mlogb_full[0].batch}}</li>
|
||||
<li class="export_ulli" v-if="item.mlogb_full&&item.mlogb_full[0]">{{item.mlogb_full[0].count_use}}</li>
|
||||
<li class="export_ulli">{{item.count_real}}</li>
|
||||
<li class="export_ulli">{{ item.count_pn_jgqbl }}</li>
|
||||
<li class="export_ulli flex2" v-if="item.mlogb_full&&item.mlogb_full[1]">{{item.mlogb_full[1].batch}}</li>
|
||||
<li class="export_ulli">{{item.count_ok}}</li>
|
||||
<li class="export_ulli">{{item.count_notok}}</li>
|
||||
<!-- <li class="export_ulli">{{item.mgroup_name}}</li> -->
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 日志记录 -->
|
||||
<div class="containersDom" v-else-if="type=='mlogs23'">
|
||||
<ul class="export_ul">
|
||||
<li class="export_ulli export_ulli_title">日志记录</li>
|
||||
</ul>
|
||||
<ul class="export_ul">
|
||||
<li class="export_ulli">工艺路线</li>
|
||||
<li class="export_ulli">工段</li>
|
||||
<li class="export_ulli flex2">输入物料</li>
|
||||
<li class="export_ulli flex2">输出物料</li>
|
||||
<li class="export_ulli">生产设备</li>
|
||||
<li class="export_ulli">处理人</li>
|
||||
<li class="export_ulli">开始时间</li>
|
||||
|
||||
</ul>
|
||||
<ul class="export_ul">
|
||||
<li class="export_ulli">{{baseData.routepack_name}}</li>
|
||||
<li class="export_ulli">{{baseData.mgroup_name}}</li>
|
||||
<li class="export_ulli flex2">{{baseData.material_in_name}}</li>
|
||||
<li class="export_ulli flex2">{{baseData.material_out_name}}</li>
|
||||
<li class="export_ulli">{{baseData.equipment_name}}</li>
|
||||
<li class="export_ulli">{{baseData.handle_user_name}}</li>
|
||||
<li class="export_ulli">{{baseData.work_start_time}}</li>
|
||||
|
||||
</ul>
|
||||
<ul class="export_ul">
|
||||
<li class="export_ulli" v-if="mgroupName=='黑化'">温度</li>
|
||||
<li class="export_ulli" v-if="mgroupName=='黑化'||mgroupName=='退火'">保温时间</li>
|
||||
<li class="export_ulli" v-if="mgroupName=='黑化'||mgroupName=='退火'">冷却时间</li>
|
||||
|
@ -253,10 +404,6 @@
|
|||
<li class="export_ulli" v-if="mgroupName=='黑化'||mgroupName=='退火'">备注层数</li>
|
||||
</ul>
|
||||
<ul class="export_ul">
|
||||
<li class="export_ulli">TH11101</li>
|
||||
<li class="export_ulli">张三</li>
|
||||
<li class="export_ulli">白班</li>
|
||||
<li class="export_ulli">19:00</li>
|
||||
<li class="export_ulli" v-if="mgroupName=='黑化'">温度</li>
|
||||
<li class="export_ulli" v-if="mgroupName=='黑化'||mgroupName=='退火'">600</li>
|
||||
<li class="export_ulli" v-if="mgroupName=='黑化'||mgroupName=='退火'">120</li>
|
||||
|
@ -264,29 +411,32 @@
|
|||
<li class="export_ulli" v-if="mgroupName=='黑化'||mgroupName=='退火'">1到10层</li>
|
||||
</ul>
|
||||
<ul class="export_ul">
|
||||
<li class="export_ulli">输入物料批次号</li>
|
||||
<li class="export_ulli export_ulli_title">物料清单</li>
|
||||
</ul>
|
||||
<!-- 循环子任务 -->
|
||||
<div style="display: flex;" v-for="(item,index) in tableData" :key="item.id">
|
||||
<div style="width: 40px; border-top: 1px solid #aaaaaa;border-left: 1px solid #aaaaaa;">{{ index+1 }}</div>
|
||||
<div style="flex: 1;">
|
||||
<ul class="export_ul">
|
||||
<li class="export_ulli flex2">输入物料批次号</li>
|
||||
<li class="export_ulli">领料数量</li>
|
||||
<li class="export_ulli">加工数量</li>
|
||||
<li class="export_ulli">加工前不良数量</li>
|
||||
<li class="export_ulli">输出物料批次号</li>
|
||||
<li class="export_ulli">加工前不良数</li>
|
||||
<li class="export_ulli flex2">输出物料批次号</li>
|
||||
<li class="export_ulli">合格数量</li>
|
||||
<li class="export_ulli">不合格数量</li>
|
||||
<li class="export_ulli">不合格原因</li>
|
||||
</ul>
|
||||
<ul class="export_ul">
|
||||
<li class="export_ulli">20241011</li>
|
||||
<li class="export_ulli">5000</li>
|
||||
<li class="export_ulli">4000</li>
|
||||
<li class="export_ulli">10</li>
|
||||
<li class="export_ulli">20241011-TH01</li>
|
||||
<li class="export_ulli">3950</li>
|
||||
<li class="export_ulli">40</li>
|
||||
<li class="export_ulli">崩边</li>
|
||||
|
||||
<li class="export_ulli flex2">{{item.batch}}</li>
|
||||
<li class="export_ulli">{{item.count_use}}</li>
|
||||
<li class="export_ulli">{{item.count_real}}</li>
|
||||
<li class="export_ulli">{{ item.count_pn_jgqbl }}</li>
|
||||
<li class="export_ulli flex2">{{tableData2[index].batch}}</li>
|
||||
<li class="export_ulli">{{tableData2[index].count_ok}}</li>
|
||||
<li class="export_ulli">{{tableData2[index].count_notok}}</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!-- 交接记录 -->
|
||||
<div class="containersDom" v-else-if="type=='handover'">
|
||||
|
@ -303,27 +453,27 @@
|
|||
<li class="export_ulli">备注</li>
|
||||
</ul>
|
||||
<ul class="export_ul">
|
||||
<li class="export_ulli">1111</li>
|
||||
<li class="export_ulli">2222</li>
|
||||
<li class="export_ulli">3333</li>
|
||||
<li class="export_ulli">4444</li>
|
||||
<li class="export_ulli">5555</li>
|
||||
<li class="export_ulli">6666</li>
|
||||
<li class="export_ulli">7777</li>
|
||||
<li class="export_ulli">{{ baseData.send_mgroup_name }}</li>
|
||||
<li class="export_ulli">{{ baseData.send_user_name }}</li>
|
||||
<li class="export_ulli">{{ baseData.recive_mgroup_name }}</li>
|
||||
<li class="export_ulli">{{ baseData.recive_user_name }}</li>
|
||||
<li class="export_ulli">{{ baseData.send_date }}</li>
|
||||
<li class="export_ulli">{{ baseData.recive_date }}</li>
|
||||
<li class="export_ulli">{{ baseData.note }}</li>
|
||||
</ul>
|
||||
|
||||
<ul class="export_ul">
|
||||
<li class="export_ulli export_ulli_title">物料清单</li>
|
||||
</ul>
|
||||
<ul class="export_ul">
|
||||
<li class="export_ulli">物料名称</li>
|
||||
<!-- <li class="export_ulli">物料名称</li> -->
|
||||
<li class="export_ulli">批次号</li>
|
||||
<li class="export_ulli">数量</li>
|
||||
</ul>
|
||||
<ul class="export_ul">
|
||||
<li class="export_ulli">11111111111</li>
|
||||
<li class="export_ulli">22222222222</li>
|
||||
<li class="export_ulli">33333333333</li>
|
||||
<ul class="export_ul" v-for="item in tableData" :key="item.id">
|
||||
<!-- <li class="export_ulli">{{ item.material_name }}</li> -->
|
||||
<li class="export_ulli">{{ item.batch }}</li>
|
||||
<li class="export_ulli">{{ item.count }}</li>
|
||||
</ul>
|
||||
</div>
|
||||
<!-- 成品尺寸检测记录单 -->
|
||||
|
@ -391,6 +541,8 @@
|
|||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<el-button type="primary" @click="handleExport">导出</el-button>
|
||||
<el-button type="primary" @click="handlePrint">打印</el-button>
|
||||
</el-main>
|
||||
</el-container>
|
||||
</template>
|
||||
|
@ -419,6 +571,12 @@
|
|||
return [];
|
||||
},
|
||||
},
|
||||
tableData2: {
|
||||
type: Array,
|
||||
default: () => {
|
||||
return [];
|
||||
},
|
||||
},
|
||||
mgroupId: {
|
||||
type: String,
|
||||
default: "",
|
||||
|
@ -431,37 +589,36 @@
|
|||
data() {
|
||||
return {
|
||||
mainLoading: false,
|
||||
issave: false, //控制基本信息提交
|
||||
search: {
|
||||
keyword: null,
|
||||
},
|
||||
oplcateCode: 'fire',
|
||||
operationId: "",
|
||||
oplId: "",
|
||||
ticketId:'',
|
||||
codeVisible:false,
|
||||
value:''
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
let that = this;
|
||||
this.$nextTick(()=>{})
|
||||
that.printId = that.baseData.id;
|
||||
that.value = that.type + ":" + that.printId+",url:'/wpm_gx/qiepian'";
|
||||
that.codeVisible = true;
|
||||
// var canvas = document.getElementById("barcode");
|
||||
// var context = canvas.getContext("2d");
|
||||
// context.clearRect(0, 0, context.width, context.height);
|
||||
// JsBarcode("#barcode", that.printId, {
|
||||
// format: "CODE128",
|
||||
// displayValue: true,
|
||||
// fontSize: 20,
|
||||
// lineColor: "#000000",
|
||||
// });
|
||||
|
||||
|
||||
// 'BARCODE 0,130,"128",108,0,0,2,4,"'
|
||||
},
|
||||
methods: {
|
||||
handlePrint(){
|
||||
this.$PRINT("#exportDiv");
|
||||
this.$emit('closePrint')
|
||||
},
|
||||
handleExport() {
|
||||
let exportDiv = document.getElementById('exportDiv') // 需要导出部分页面的id名
|
||||
this.pdfDownLoader = new PdfLoader(exportDiv, '作业许可证', 'exportDiv') // fileName -->导出文件名, question-table -->防止被截断的class名
|
||||
this.pdfDownLoader.outPutPdfFn('test');
|
||||
},
|
||||
//作业人员列表
|
||||
getworkerList() {
|
||||
this.$API.opm.worker.list.req({opl: this.oplId, page: 0}).then((res) => {
|
||||
this.workerData = res;
|
||||
});
|
||||
this.$emit('closePrint');
|
||||
},
|
||||
},
|
||||
}
|
||||
|
@ -496,5 +653,17 @@
|
|||
}
|
||||
.export_ulli_title{
|
||||
text-align: center;
|
||||
/* color: #ffffff; */
|
||||
background-color: #e3e3e3;
|
||||
}
|
||||
.export_ulli_h{
|
||||
background-color: #e3e3e3;
|
||||
}
|
||||
.flex2{
|
||||
flex:2
|
||||
}
|
||||
#barcode {
|
||||
width: 200px;
|
||||
height: 60px;
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -0,0 +1,40 @@
|
|||
<template>
|
||||
<div>
|
||||
<el-button type="primary" @click="open" style="margin-left: 10px;">扫码添加</el-button>
|
||||
<el-dialog
|
||||
title="扫描二维码"
|
||||
v-model="visible"
|
||||
destroy-on-close
|
||||
>
|
||||
<el-input
|
||||
ref="codeInput"
|
||||
v-model="codeText"
|
||||
clearable
|
||||
@change="$emit('closed',codeText)"
|
||||
></el-input>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
data(){
|
||||
return{
|
||||
visible:false,
|
||||
codeText:''
|
||||
}
|
||||
},
|
||||
methods:{
|
||||
open(){
|
||||
this.codeText = '';
|
||||
this.visible = true;
|
||||
setTimeout(() => {
|
||||
this.$refs.codeInput.focus();
|
||||
}, 200);
|
||||
return this;
|
||||
},
|
||||
closed(){
|
||||
this.visible = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
|
@ -6,9 +6,10 @@
|
|||
destroy-on-close
|
||||
@closed="$emit('closed')"
|
||||
>
|
||||
<el-container>
|
||||
<el-header style="height:100px;padding:0">
|
||||
<div>
|
||||
<!-- 基本信息 -->
|
||||
<el-card style="width: 100%" header="基本信息" shadow="never">
|
||||
<el-button type="primary" @click="handlePrint" style="position: absolute;right: 20px;">打印</el-button>
|
||||
<el-descriptions>
|
||||
<el-descriptions-item label="工艺路线">{{
|
||||
fmlogItem.routepack_name
|
||||
|
@ -21,13 +22,9 @@
|
|||
}}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</el-card>
|
||||
</el-header>
|
||||
|
||||
<!-- mlog -->
|
||||
<el-main style="padding-top: 40px;position: relative;">
|
||||
<el-card style="width: 100%; margin: 1vh 0" shadow="never" header="日志列表">
|
||||
<el-button
|
||||
type="primary"
|
||||
style="position: absolute;top: 5px;"
|
||||
v-if="fmlogItem.submit_time == null"
|
||||
icon="el-icon-plus"
|
||||
@click="table_add"
|
||||
|
@ -83,6 +80,18 @@
|
|||
<el-descriptions-item label="破损" v-if="props.row.count_n_ps>0">
|
||||
{{props.row.count_n_ps}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="产品外径" v-if="props.row.count_n_wj>0">
|
||||
{{props.row.count_n_wj}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="产品圆度" v-if="props.row.count_n_xh>0">
|
||||
{{props.row.count_n_xh}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="产品同心度" v-if="props.row.count_n_yd>0">
|
||||
{{props.row.count_n_yd}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="其它" v-if="props.row.count_n_qt>0">
|
||||
{{props.row.count_n_ps}}
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</div>
|
||||
</template>
|
||||
|
@ -126,7 +135,31 @@
|
|||
</template>
|
||||
</el-table-column>
|
||||
</scTable>
|
||||
</el-main>
|
||||
</el-card>
|
||||
<!-- 工段物料库存 -->
|
||||
<el-card style="width: 100%; margin: 1vh 0" header="工段物料列表" shadow="never">
|
||||
<scTable
|
||||
ref="tableWm"
|
||||
:apiObj="apiObjWm"
|
||||
:params="paramsWm"
|
||||
stripe
|
||||
hidePagination
|
||||
>
|
||||
<el-table-column label="物料名称" prop="material_name" show-overflow-tooltip>
|
||||
</el-table-column>
|
||||
<el-table-column label="批次号" prop="batch">
|
||||
</el-table-column>
|
||||
<el-table-column label="数量" prop="count">
|
||||
</el-table-column>
|
||||
<el-table-column label="不合格标记" prop="notok_sign_name">
|
||||
</el-table-column>
|
||||
<el-table-column width="100">
|
||||
<template #default="scope">
|
||||
<el-button @click="printMaterial(scope.row)" type="text">物料标签</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</scTable>
|
||||
</el-card>
|
||||
<save-dialog
|
||||
v-if="dialog.save"
|
||||
ref="saveDialog"
|
||||
|
@ -144,12 +177,16 @@
|
|||
@closed="dialog.check = false"
|
||||
>
|
||||
</check-dialog>
|
||||
</el-container>
|
||||
<el-dialog v-model="printVisible" width="1200px">
|
||||
<print :baseData="fmlogItem" :tableData="tableData" type="mlogs12" @closePrint="printVisible=false"/>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</el-drawer>
|
||||
</template>
|
||||
<script>
|
||||
import saveDialog from "./f_mlogs_form.vue";
|
||||
import checkDialog from "./mlogb_check.vue";
|
||||
import print from "./../setting/print/A4.vue";
|
||||
export default {
|
||||
props: {
|
||||
fmlogId: {
|
||||
|
@ -160,6 +197,7 @@ export default {
|
|||
components: {
|
||||
saveDialog,
|
||||
checkDialog,
|
||||
print
|
||||
},
|
||||
emits: ["success", "closed"],
|
||||
data() {
|
||||
|
@ -173,6 +211,12 @@ export default {
|
|||
check: false,
|
||||
},
|
||||
apiObj: null,
|
||||
apiObjWm:null,
|
||||
paramsWm: {
|
||||
page: 0,
|
||||
search:'',
|
||||
mgroup:''
|
||||
},
|
||||
params: {
|
||||
page: 0,
|
||||
fmlog: "",
|
||||
|
@ -192,10 +236,13 @@ export default {
|
|||
强度落球:'',
|
||||
},
|
||||
fileList:[],
|
||||
tableData:[],
|
||||
batchContains:[],
|
||||
test_file:'',
|
||||
deptId: "",
|
||||
visible: false,
|
||||
isSaveing: false,
|
||||
printVisible:false,
|
||||
options: [],
|
||||
saveInDialog: false,
|
||||
ticketDialog:false,
|
||||
|
@ -214,7 +261,6 @@ export default {
|
|||
mounted() {
|
||||
this.getfmlogItem();
|
||||
this.params.fmlog = this.fmlogId;
|
||||
console.log('this.params.fmlog',this.params.fmlog);
|
||||
this.apiObj = this.$API.wpm.mlog.list;
|
||||
},
|
||||
methods: {
|
||||
|
@ -228,6 +274,17 @@ export default {
|
|||
that.fmlogItem = res;
|
||||
that.mgroup = res.mgroup;
|
||||
that.mtask = res.mtask;
|
||||
that.paramsWm.mgroup = res.mgroup;
|
||||
that.$API.wpm.mlog.list.req(that.params).then((res) => {
|
||||
that.tableData = res;
|
||||
if(res.length>0){
|
||||
res.forEach((item) => {
|
||||
that.batchContains+= item.batch + " ";
|
||||
})
|
||||
that.paramsWm.search = that.batchContains;
|
||||
that.apiObjWm = that.$API.wpm.wmaterial.list;
|
||||
}else{}
|
||||
});
|
||||
});
|
||||
},
|
||||
//表单注入数据
|
||||
|
@ -305,6 +362,40 @@ export default {
|
|||
this.selectionFilters = filters;
|
||||
this.setFiltersVisible = true;
|
||||
},
|
||||
handlePrint(){
|
||||
let that = this;
|
||||
that.$nextTick(() => {
|
||||
that.printVisible = true;
|
||||
})
|
||||
// that.$API.wpm.mlog.list.req(that.params).then((res) => {
|
||||
// that.tableData = res;
|
||||
// });
|
||||
},
|
||||
//打印物料标签
|
||||
printMaterial(row){
|
||||
let that = this;
|
||||
that.$API.cm.labelmat.fromWm.req({tid:row.id}).then((res) => {
|
||||
let code = res.code_label;
|
||||
let str = [
|
||||
"SIZE 40 mm,70 mm",
|
||||
"GAP 7 mm,7 mm",
|
||||
"CLS",
|
||||
"REFERENCE 0,0",
|
||||
'QRCODE 30,400,H,5,A,0,"' +code +'"',
|
||||
"WINTEXT 200,550,28,90,0,0,Simhei," + res.material_name,
|
||||
"WINTEXT 240,550,28,90,0,0,Simhei," + res.batch,
|
||||
];
|
||||
if(res.notok_sign!==null){
|
||||
str.push("WINTEXT 280,550,28,90,0,0,Simhei," +res.notok_sign_name,)
|
||||
}
|
||||
str.push("PRINT 1",)
|
||||
let obj = {};
|
||||
obj.printer_commands = str;
|
||||
obj.printer_name = that.printer_name;
|
||||
this.$API.wpm.prints.req(obj).then((response) => {});
|
||||
})
|
||||
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
|
|
@ -226,9 +226,13 @@
|
|||
<el-button type="primary" @click="savePrinter">保存</el-button>
|
||||
</el-footer>
|
||||
</el-dialog>
|
||||
<el-dialog v-model="printVisible" width="1200px">
|
||||
<print :baseData="handoverItem" :tableData="handoverItem.handoverb" :type="'handover'" @closePrint="printVisible=false"/>
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script>
|
||||
import saveDialog from "./handover_form.vue";
|
||||
import print from "./../setting/print/A4.vue";
|
||||
export default {
|
||||
props: {
|
||||
mgroupName: {
|
||||
|
@ -238,7 +242,7 @@ export default {
|
|||
},
|
||||
name: "handover",
|
||||
components: {
|
||||
saveDialog,
|
||||
saveDialog,print
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
@ -263,7 +267,7 @@ export default {
|
|||
options: ["交送", "接收"],
|
||||
tableData: [],
|
||||
selection: [],
|
||||
handoverItem: {},
|
||||
handoverItem:{},
|
||||
values: "交送",
|
||||
deptId:'',
|
||||
mtask: "",
|
||||
|
@ -272,7 +276,9 @@ export default {
|
|||
processId: "",
|
||||
processCate: "",
|
||||
printer_name: "",
|
||||
printVisible:false,
|
||||
setNameVisible: false,
|
||||
testCode: "mat:3689278065261125632",
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
|
@ -320,36 +326,39 @@ export default {
|
|||
printSetting(){
|
||||
this.setNameVisible = true;
|
||||
},
|
||||
handoverPrint() {
|
||||
handoverPrint(row) {
|
||||
let that = this;
|
||||
let str = [
|
||||
"SIZE 70 mm,90 mm",
|
||||
"GAP 2 mm,0 mm",
|
||||
"SIZE 60 mm,90 mm",
|
||||
"GAP 0 mm,0 mm",
|
||||
"CLS",
|
||||
"WINTEXT 50,80,36,0,0,0,Simhei,光芯科技——交接单",
|
||||
'BARCODE 50,140,"128",108,0,0,3,5,"' +
|
||||
that.handoverItem.id +
|
||||
'"',
|
||||
"WINTEXT 50,280,36,0,0,0,Simhei," +
|
||||
that.handoverItem.material_name,
|
||||
"WINTEXT 50,340,36,0,0,0,Simhei,批次:" +
|
||||
that.handoverItem.batch,
|
||||
"WINTEXT 50,400,36,0,0,0,Simhei,数量:" +
|
||||
that.handoverItem.count,
|
||||
"WINTEXT 50,460,36,0,0,0,Simhei,日期:" +
|
||||
that.handoverItem.send_date,
|
||||
"WINTEXT 50,520,36,0,0,0,Simhei,送料:" +
|
||||
that.handoverItem.send_mgroup_name +
|
||||
"——" +
|
||||
that.handoverItem.send_user_name,
|
||||
"WINTEXT 50,580,36,0,0,0,Simhei,收料:" +
|
||||
that.handoverItem.recive_mgroup_name +
|
||||
"——" +
|
||||
that.handoverItem.recive_user_name,
|
||||
"PRINT 1",
|
||||
'QRCODE 0,60,H,5,A,0,"' +that.testCode +'"',
|
||||
"WINTEXT 0,200,36,0,0,0,Simhei," +row.material_name,
|
||||
"WINTEXT 0,240,36,0,0,0,Simhei,批次:" +
|
||||
row.batch,
|
||||
];
|
||||
// 送料:工段-姓名
|
||||
// 收料:工段-姓名
|
||||
if(row.wm_notok_sign!==null){
|
||||
str.push("WINTEXT 0,280,36,0,0,0,Simhei,不合格原因:" +
|
||||
row.wm_notok_sign,)
|
||||
}
|
||||
//供应商----原料、辅料
|
||||
// if(row.type==30||row.type==40){
|
||||
// str.push("WINTEXT 50,460,36,0,0,0,Simhei,供应商:" +
|
||||
// row.supplier_name,)
|
||||
// }
|
||||
str.push("PRINT 1",)
|
||||
// let str = [
|
||||
// "SIZE 60 mm,90 mm",
|
||||
// "GAP 0 mm,0 mm",
|
||||
// "CLS",
|
||||
// "WINTEXT 0,10,36,0,0,0,Simhei," +row.material_name,
|
||||
// 'QRCODE 0,60,H,5,A,0,"' +that.testCode +'"',
|
||||
// "WINTEXT 50,340,36,0,0,0,Simhei,批次:" +
|
||||
// row.batch,
|
||||
// "WINTEXT 50,400,36,0,0,0,Simhei,不合格原因:" +
|
||||
// row.wm_notok_sign,
|
||||
// "PRINT 1",
|
||||
// ];
|
||||
let obj = {};
|
||||
obj.printer_commands = str;
|
||||
obj.printer_name = that.printer_name;
|
||||
|
@ -432,20 +441,22 @@ export default {
|
|||
});
|
||||
},
|
||||
table_print(row) {
|
||||
//打印
|
||||
let that = this;
|
||||
if (
|
||||
that.printer_name == null ||
|
||||
that.printer_name == "" ||
|
||||
that.printer_name == undefined
|
||||
) {
|
||||
this.setNameVisible = true;
|
||||
} else {
|
||||
that.$API.wpm.handover.item.req(row.id).then((res) => {
|
||||
that.handoverItem = res;
|
||||
that.handoverPrint();
|
||||
});
|
||||
}
|
||||
that.handoverItem = row;
|
||||
that.printVisible = true;
|
||||
//打印
|
||||
// if (
|
||||
// that.printer_name == null ||
|
||||
// that.printer_name == "" ||
|
||||
// that.printer_name == undefined
|
||||
// ) {
|
||||
// this.setNameVisible = true;
|
||||
// } else {
|
||||
// that.$API.wpm.handover.item.req(row.id).then((res) => {
|
||||
// that.handoverItem = res;
|
||||
// that.handoverPrint(row);
|
||||
// });
|
||||
// }
|
||||
},
|
||||
savePrinter() {
|
||||
let that = this;
|
||||
|
|
|
@ -113,15 +113,16 @@
|
|||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-form-item label="交接物料">
|
||||
<el-button type="primary" icon="el-icon-plus" @click="addMaterial" v-if="mode!=='show'"></el-button>
|
||||
<el-button type="primary" @click="addMaterial" v-if="mode!=='show'">手动添加</el-button>
|
||||
<scan-dialog ref="scanDialog" @closed="scanClose"> </scan-dialog>
|
||||
<!-- <el-button type="primary" @click="scanCode" v-if="mode!=='show'">扫码添加</el-button> -->
|
||||
</el-form-item>
|
||||
</el-row>
|
||||
<el-row v-for="(listItem,$index) in form.handoverb" :key="listItem">
|
||||
<el-col :span="11">
|
||||
<el-col :span="10">
|
||||
<el-form-item label="交接物料">
|
||||
<el-select
|
||||
v-if="mode!=='show'"
|
||||
|
@ -129,6 +130,7 @@
|
|||
placeholder="交接物料"
|
||||
filterable
|
||||
clearable
|
||||
@change="materialChange($index)"
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-option
|
||||
|
@ -149,13 +151,19 @@
|
|||
<el-input v-else v-model="listItem.batch" disabled></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="11">
|
||||
<el-col :span="5">
|
||||
<el-form-item label="总数量">
|
||||
<span>{{ listItem.counts }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="7">
|
||||
<el-form-item label="交接数量">
|
||||
<el-input-number
|
||||
v-model="listItem.count"
|
||||
controls-position="right"
|
||||
:min="0"
|
||||
step="1"
|
||||
:max="listItem.counts"
|
||||
:disabled="mode==='show'"
|
||||
:step-strictly="true"
|
||||
style="width: 100%"
|
||||
|
@ -170,14 +178,19 @@
|
|||
</el-row>
|
||||
</el-form>
|
||||
<el-footer v-if="mode!=='show'">
|
||||
<el-button type="primary" v-loading="isSaveing" @click="submit"
|
||||
>确定</el-button
|
||||
>
|
||||
<el-button type="primary" v-loading="isSaveing" @click="submit">确定</el-button>
|
||||
<el-button @click="visible = false">取消</el-button>
|
||||
</el-footer>
|
||||
</el-dialog>
|
||||
<!-- <scan-dialog
|
||||
v-if="scanVisible"
|
||||
ref="scanDialog"
|
||||
@closed="scanClose"
|
||||
>
|
||||
</scan-dialog> -->
|
||||
</template>
|
||||
<script>
|
||||
import scanDialog from "./../template/scan.vue";
|
||||
export default {
|
||||
emits: ["success", "closed"],
|
||||
props: {
|
||||
|
@ -194,6 +207,9 @@ export default {
|
|||
default: "",
|
||||
},
|
||||
},
|
||||
components: {
|
||||
scanDialog
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
yseorno: ["是", "否"],
|
||||
|
@ -212,7 +228,7 @@ export default {
|
|||
send_mgroup: null,
|
||||
recive_user: null,
|
||||
recive_mgroup: null,
|
||||
handoverb:[{wm:'',count:''}],
|
||||
handoverb:[],
|
||||
},
|
||||
rules: {
|
||||
batch: [
|
||||
|
@ -270,6 +286,7 @@ export default {
|
|||
mgroupOptions: [],
|
||||
materialOptions: [],
|
||||
visible: false,
|
||||
scanVisible:false,
|
||||
isSaveing: false,
|
||||
setFiltersVisible: false,
|
||||
};
|
||||
|
@ -440,7 +457,7 @@ export default {
|
|||
});
|
||||
},
|
||||
addMaterial(){
|
||||
this.form.handoverb.push({wm:'',count:''});
|
||||
this.form.handoverb.push({wm:'',count:'',counts:null});
|
||||
},
|
||||
delMaterial(index){
|
||||
this.form.handoverb.splice(index,1);
|
||||
|
@ -451,11 +468,14 @@ export default {
|
|||
this.visible = true;
|
||||
return this;
|
||||
},
|
||||
materialChange(val) {
|
||||
materialChange(index) {
|
||||
let val = this.form.handoverb[index].wm;
|
||||
let data = this.materialOptions.filter((item) => {
|
||||
return item.id == val;
|
||||
});
|
||||
this.form.batch = data[0].batch;
|
||||
this.form.handoverb[index].batch = data[0].batch;
|
||||
this.form.handoverb[index].counts = data[0].count;
|
||||
this.form.handoverb[index].count = data[0].count;
|
||||
},
|
||||
//提交
|
||||
submit() {
|
||||
|
@ -514,6 +534,47 @@ export default {
|
|||
this.selectionFilters = filters;
|
||||
this.setFiltersVisible = true;
|
||||
},
|
||||
//扫描
|
||||
scanCode(){
|
||||
let that = this;
|
||||
that.scanVisible = true;
|
||||
// that.$nextTick(() => {
|
||||
// that.$refs.scanDialog.open();
|
||||
// });
|
||||
},
|
||||
scanClose(data){
|
||||
if(data==''||data==undefined||data==null){
|
||||
return;
|
||||
}
|
||||
let that = this;
|
||||
let id =data.split(':')[1];
|
||||
console.log('id',id);
|
||||
this.$API.cm.labelmat.item.req(id).then((res) => {
|
||||
console.log('res',res);
|
||||
let arr = that.form.handoverb.filter((item) => {
|
||||
return item.batch == res.batch;
|
||||
})
|
||||
console.log('arr',arr);
|
||||
if(arr.length>0){
|
||||
that.$message.error("该批次已存在")
|
||||
}else{
|
||||
that.materialOptions.forEach((item) => {
|
||||
if(item.batch == res.batch){
|
||||
let arr = that.form.handoverb
|
||||
let obj = {};
|
||||
obj.wm = item.id;
|
||||
obj.batch = item.batch;
|
||||
obj.counts = item.count;
|
||||
obj.count = item.count;
|
||||
that.form.handoverb.push(obj)
|
||||
that.$refs.scanDialog.closed();
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
//根据扫描内容,获取物料详情匹配当前库存物料
|
||||
this.scanVisible = false;
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
|
|
@ -93,7 +93,7 @@
|
|||
fixed="right"
|
||||
align="center"
|
||||
width="120"
|
||||
v-if="mgroupName!=='size'&&mgroupName!=='facade'"
|
||||
|
||||
>
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
|
@ -101,16 +101,17 @@
|
|||
@click="table_Check(scope.row)"
|
||||
v-auth="'ftestwork.create'"
|
||||
type="primary"
|
||||
v-if="scope.row.notok_sign_name == null"
|
||||
v-if="mgroupName!=='size'&&mgroupName!=='facade'&&scope.row.notok_sign_name == null"
|
||||
>检验
|
||||
</el-button>
|
||||
<el-button
|
||||
link size="small"
|
||||
type="warning"
|
||||
@click="tableCheckList(scope.row)"
|
||||
v-if="scope.row.notok_sign_name == null"
|
||||
v-if="mgroupName!=='size'&&mgroupName!=='facade'&&scope.row.notok_sign_name == null"
|
||||
>检验记录
|
||||
</el-button>
|
||||
<el-button @click="printMaterial(scope.row)" type="text">物料标签</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</scTable>
|
||||
|
@ -208,6 +209,7 @@ export default {
|
|||
process:'',
|
||||
materialType: "wm",
|
||||
visibleDrawer: false,
|
||||
printer_name:localStorage.getItem("printer_name")
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
|
@ -312,6 +314,32 @@ export default {
|
|||
this.dialog.save = false;
|
||||
this.$refs.table.refresh();
|
||||
},
|
||||
//打印物料标签
|
||||
printMaterial(row){
|
||||
let that = this;
|
||||
that.$API.cm.labelmat.fromWm.req({tid:row.id}).then((res) => {
|
||||
console.log(res)
|
||||
let code = res.code_label;
|
||||
let str = [
|
||||
"SIZE 40 mm,70 mm",
|
||||
"GAP 7 mm,7 mm",
|
||||
"CLS",
|
||||
"REFERENCE 0,0",
|
||||
'QRCODE 30,400,H,5,A,0,"' +code +'"',
|
||||
"WINTEXT 200,550,28,90,0,0,Simhei," + res.material_name,
|
||||
"WINTEXT 240,550,28,90,0,0,Simhei," + res.batch,
|
||||
];
|
||||
if(res.notok_sign!==null){
|
||||
str.push("WINTEXT 280,550,28,90,0,0,Simhei," +res.notok_sign_name,)
|
||||
}
|
||||
str.push("PRINT 1",)
|
||||
let obj = {};
|
||||
obj.printer_commands = str;
|
||||
obj.printer_name = that.printer_name;
|
||||
this.$API.wpm.prints.req(obj).then((response) => {});
|
||||
})
|
||||
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
|
|
@ -264,6 +264,11 @@
|
|||
show-overflow-tooltip
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column width="90">
|
||||
<template #default="scope">
|
||||
<el-button @click="printMaterial(scope.row)" type="text">物料标签</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</scTable>
|
||||
</el-card>
|
||||
<save-dialog
|
||||
|
@ -277,7 +282,7 @@
|
|||
@closed="dialog.save = false"
|
||||
></save-dialog>
|
||||
<el-dialog v-model="printVisible" width="1200px">
|
||||
<print :baseData="form" :tableData="tableData" :type="form.type" mtype="20"/>
|
||||
<print :baseData="form" :tableData="tableData" :type="form.type" mtype="20" @closePrint="printVisible=false"/>
|
||||
</el-dialog>
|
||||
</el-drawer>
|
||||
</template>
|
||||
|
@ -336,6 +341,7 @@ export default {
|
|||
userOptions: [],//部门执行人
|
||||
deptOptions: [],
|
||||
mgroupOptions: [],
|
||||
printer_name:localStorage.getItem("printer_name")
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
|
@ -465,9 +471,34 @@ export default {
|
|||
});
|
||||
},
|
||||
submitOut() {},
|
||||
//打印
|
||||
handlePrint(){
|
||||
this.printVisible = true;
|
||||
},//打印
|
||||
},
|
||||
//打印物料标签
|
||||
printMaterial(row){
|
||||
let that = this;
|
||||
that.$API.cm.labelmat.fromMioitem.req({tid:row.id}).then((res) => {
|
||||
let code = res.code_label;
|
||||
let str = [
|
||||
"SIZE 40 mm,70 mm",
|
||||
"GAP 7 mm,7 mm",
|
||||
"CLS",
|
||||
"REFERENCE 0,0",
|
||||
'QRCODE 30,400,H,5,A,0,"' +code +'"',
|
||||
"WINTEXT 200,550,28,90,0,0,Simhei," + res.material_name,
|
||||
"WINTEXT 240,550,28,90,0,0,Simhei," + res.batch,
|
||||
];
|
||||
if(res.notok_sign!==null){
|
||||
str.push("WINTEXT 280,550,28,90,0,0,Simhei," +res.notok_sign_name,)
|
||||
}
|
||||
str.push("PRINT 1",)
|
||||
let obj = {};
|
||||
obj.printer_commands = str;
|
||||
obj.printer_name = that.printer_name;
|
||||
this.$API.wpm.prints.req(obj).then((response) => {});
|
||||
})
|
||||
},
|
||||
//本地更新数据
|
||||
handleSaveSuccess() {
|
||||
this.$refs.tables.refresh();
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
>
|
||||
<div>
|
||||
<el-card style="width: 100%" header="基本信息" shadow="never">
|
||||
<el-button type="primary" @click="handlePrint" style="position: absolute;right: 20px;">打印</el-button>
|
||||
<el-descriptions>
|
||||
<el-descriptions-item label="工艺路线">{{
|
||||
mlogItem.routepack_name
|
||||
|
@ -275,6 +276,30 @@
|
|||
</el-table-column>
|
||||
</scTable>
|
||||
</el-card>
|
||||
<!-- 工段物料库存 -->
|
||||
<el-card style="width: 100%" header="工段物料列表" shadow="never">
|
||||
<scTable
|
||||
ref="tableWm"
|
||||
:apiObj="apiObjWm"
|
||||
:params="paramsWm"
|
||||
stripe
|
||||
hidePagination
|
||||
>
|
||||
<el-table-column label="物料名称" prop="material_name" show-overflow-tooltip>
|
||||
</el-table-column>
|
||||
<el-table-column label="批次号" prop="batch">
|
||||
</el-table-column>
|
||||
<el-table-column label="数量" prop="count">
|
||||
</el-table-column>
|
||||
<el-table-column label="不合格标记" prop="notok_sign_name">
|
||||
</el-table-column>
|
||||
<el-table-column width="100">
|
||||
<template #default="scope">
|
||||
<el-button @click="printMaterial(scope.row)" type="text">物料标签</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</scTable>
|
||||
</el-card>
|
||||
<save-dialog
|
||||
v-if="dialog.save"
|
||||
ref="saveDialog"
|
||||
|
@ -385,6 +410,9 @@
|
|||
>
|
||||
</template>
|
||||
</el-dialog>
|
||||
<el-dialog v-model="printVisible" width="1200px">
|
||||
<print :baseData="mlogItem" :tableData="tableData" :tableData2="tableData2" type="mlogs23" @closePrint="printVisible=false"/>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</el-drawer>
|
||||
</template>
|
||||
|
@ -392,6 +420,7 @@
|
|||
import editDialog from "./mlog_form.vue";
|
||||
import saveDialog from "./mlogb_form.vue";
|
||||
import checkDialog from "./mlogb_check.vue";
|
||||
import print from "./../setting/print/A4.vue";
|
||||
export default {
|
||||
props: {
|
||||
mlogId: {
|
||||
|
@ -403,6 +432,7 @@ export default {
|
|||
editDialog,
|
||||
saveDialog,
|
||||
checkDialog,
|
||||
print
|
||||
},
|
||||
emits: ["success", "closed"],
|
||||
data() {
|
||||
|
@ -416,6 +446,12 @@ export default {
|
|||
check: false,
|
||||
},
|
||||
apiObj: null,
|
||||
apiObjWm:null,
|
||||
paramsWm: {
|
||||
page: 0,
|
||||
search:'',
|
||||
mgroup:''
|
||||
},
|
||||
paramsIn: {
|
||||
page: 0,
|
||||
mlog: "",
|
||||
|
@ -449,13 +485,17 @@ export default {
|
|||
5: "已关闭",
|
||||
},
|
||||
fileList:[],
|
||||
tableDataWm:[],
|
||||
test_file:'',
|
||||
deptId: "",
|
||||
visible: false,
|
||||
isSaveing: false,
|
||||
options: [],
|
||||
tableData:[],
|
||||
tableData2:[],
|
||||
saveInDialog: false,
|
||||
ticketDialog:false,
|
||||
printVisible:false,
|
||||
setFiltersVisible: false,
|
||||
rules: {
|
||||
count_use: [
|
||||
|
@ -466,20 +506,25 @@ export default {
|
|||
},
|
||||
],
|
||||
},
|
||||
batchContains:''
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.getMlogItem();
|
||||
let that = this;
|
||||
this.paramsIn.mlog = this.mlogId;
|
||||
this.paramsOut.mlog = this.mlogId;
|
||||
this.apiObj = this.$API.wpm.mlogb.list;
|
||||
this.getInit();
|
||||
that.$API.wpm.mlogb.list.req(that.paramsIn).then((res) => {
|
||||
that.tableData = res;
|
||||
})
|
||||
that.getMlogItem();
|
||||
|
||||
},
|
||||
methods: {
|
||||
open() {
|
||||
this.visible = true;
|
||||
},
|
||||
|
||||
getMlogItem() {
|
||||
let that = this;
|
||||
that.$API.wpm.mlog.item.req(that.mlogId).then((res) => {
|
||||
|
@ -489,10 +534,22 @@ export default {
|
|||
that.form.test_file = res.test_file;
|
||||
}
|
||||
that.mgroup = res.mgroup;
|
||||
that.paramsWm.mgroup = res.mgroup;
|
||||
that.materialIn = res.material_in;
|
||||
that.deptId = res.belong_dept;
|
||||
that.$API.wpm.mlogb.list.req(that.paramsOut).then((res) => {
|
||||
that.tableData2 = res;
|
||||
if(res.length>0){
|
||||
res.forEach((item) => {
|
||||
that.batchContains+= item.batch + " ";
|
||||
})
|
||||
that.paramsWm.search = that.batchContains;
|
||||
that.apiObjWm = that.$API.wpm.wmaterial.list;
|
||||
}
|
||||
})
|
||||
});
|
||||
},
|
||||
|
||||
//表单注入数据
|
||||
setData(data) {
|
||||
Object.assign(this.form, data);
|
||||
|
@ -638,6 +695,35 @@ export default {
|
|||
this.selectionFilters = filters;
|
||||
this.setFiltersVisible = true;
|
||||
},
|
||||
handlePrint(){
|
||||
let that = this;
|
||||
that.printVisible = true;
|
||||
},
|
||||
//打印物料标签
|
||||
printMaterial(row){
|
||||
let that = this;
|
||||
that.$API.cm.labelmat.fromWm.req({tid:row.id}).then((res) => {
|
||||
let code = res.code_label;
|
||||
let str = [
|
||||
"SIZE 40 mm,70 mm",
|
||||
"GAP 7 mm,7 mm",
|
||||
"CLS",
|
||||
"REFERENCE 0,0",
|
||||
'QRCODE 30,400,H,5,A,0,"' +code +'"',
|
||||
"WINTEXT 200,550,28,90,0,0,Simhei," + res.material_name,
|
||||
"WINTEXT 240,550,28,90,0,0,Simhei," + res.batch,
|
||||
];
|
||||
if(res.notok_sign!==null){
|
||||
str.push("WINTEXT 280,550,28,90,0,0,Simhei," +res.notok_sign_name,)
|
||||
}
|
||||
str.push("PRINT 1",)
|
||||
let obj = {};
|
||||
obj.printer_commands = str;
|
||||
obj.printer_name = that.printer_name;
|
||||
this.$API.wpm.prints.req(obj).then((response) => {});
|
||||
})
|
||||
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
@closed="$emit('closed')"
|
||||
>
|
||||
<div>
|
||||
<el-button type="primary" @click="handlePrint" style="position: absolute;right: 20px;">打印</el-button>
|
||||
<el-card style="width: 100%" header="基本信息" shadow="never">
|
||||
<el-descriptions>
|
||||
<el-descriptions-item label="名称">{{
|
||||
|
@ -67,10 +68,15 @@
|
|||
<el-button type="primary" @click="mtaskb_submit">提交</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<el-dialog v-model="printVisible" width="1200px">
|
||||
<print :baseData="mtaskObj" type="mtask" @closePrint="printVisible=false"/>
|
||||
</el-dialog>
|
||||
</el-drawer>
|
||||
</template>
|
||||
<script>
|
||||
import print from "./../setting/print/A4.vue";
|
||||
export default {
|
||||
components: { print },
|
||||
props: {
|
||||
mgroup: {
|
||||
type: String,
|
||||
|
@ -89,6 +95,7 @@ export default {
|
|||
loading: false,
|
||||
visible: false,
|
||||
isSaveing: false,
|
||||
printVisible:false,
|
||||
mtaskObj:{},
|
||||
userList:[],
|
||||
cUserList:[],//
|
||||
|
@ -182,6 +189,10 @@ export default {
|
|||
this.selectionFilters = filters;
|
||||
this.setFiltersVisible = true;
|
||||
},
|
||||
//打印
|
||||
handlePrint(){
|
||||
this.printVisible = true;
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
|
|
@ -1,12 +1,14 @@
|
|||
import ehsUserSelect from './components/ehsSelect/userselect'
|
||||
import ehsEpSelect from './components/ehsSelect/epselect'
|
||||
import ehsSelect from './components/ehsSelect/select'
|
||||
import xSelect from './components/ehsSelect/xselect.vue'
|
||||
import ehsTableSelect from './components/ehsSelect/tableSelect'
|
||||
import xSelect from './components/xSelect/index.vue'
|
||||
export default {
|
||||
install(app) {
|
||||
app.component('ehsUserSelect', ehsUserSelect);
|
||||
app.component('ehsEpSelect', ehsEpSelect);
|
||||
app.component('ehsSelect', ehsSelect);
|
||||
app.component('ehsTableSelect', ehsTableSelect);
|
||||
app.component('xSelect', xSelect);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue