Compare commits

...

14 Commits

Author SHA1 Message Date
ab56bc354a 周转标签打印50% 2024-05-07 09:01:32 +08:00
1c7c10205e Merge pull request 'projects/mesxc-dy' (#379) from projects/mesxc-dy into projects/mesxc-test
Some checks failed
continuous-integration/drone/push Build is failing
Reviewed-on: #379
2024-04-29 17:00:48 +08:00
helloDy
74003e9d89 Merge branch 'projects/mesxc-test' into projects/mesxc-dy 2024-04-29 16:58:15 +08:00
helloDy
cb72e2b68a bug 2024-04-29 16:57:45 +08:00
025b061ec2 Merge pull request 'projects/mesxc-dy' (#378) from projects/mesxc-dy into projects/mesxc-test
Some checks failed
continuous-integration/drone/push Build is failing
Reviewed-on: #378
2024-04-29 09:04:59 +08:00
helloDy
f2912eaee1 merge 2024-04-28 17:10:28 +08:00
helloDy
8025d00709 原片时间,bug 2024-04-28 17:04:22 +08:00
60edd8f2c4 Merge pull request 'projects/mesxc-zjl' (#377) from projects/mesxc-zjl into projects/mesxc-test
Some checks failed
continuous-integration/drone/push Build is failing
Reviewed-on: #377
2024-04-27 10:46:40 +08:00
c0214c9eb7 24包装 2024-04-27 10:45:20 +08:00
da85e5211a Merge branch 'projects/mesxc-test' into projects/mesxc-zjl 2024-04-26 16:44:55 +08:00
23afb0db0d 质量样式 2024-04-26 16:44:01 +08:00
d0adf3a63e Merge pull request '报表确认, bug' (#376) from projects/mesxc-dy into projects/mesxc-test
Some checks failed
continuous-integration/drone/push Build is failing
Reviewed-on: #376
2024-04-26 16:40:31 +08:00
helloDy
b81c95f796 报表确认, bug 2024-04-26 16:14:47 +08:00
e7f21456a3 Merge pull request 'projects/mesxc-zhp' (#375) from projects/mesxc-zhp into projects/mesxc-test
Some checks failed
continuous-integration/drone/push Build is failing
Reviewed-on: #375
2024-04-26 13:59:41 +08:00
33 changed files with 2473 additions and 1722 deletions

View File

@@ -12,8 +12,9 @@ ENV = 'development'
VUE_APP_TITLE = MES系统 VUE_APP_TITLE = MES系统
# 芋道管理系统/开发环境 # 芋道管理系统/开发环境
VUE_APP_BASE_API = 'http://192.168.0.33:48082' # VUE_APP_BASE_API = 'http://192.168.0.33:48082'
# VUE_APP_BASE_API = 'http://192.168.1.104:48082' VUE_APP_BASE_API = 'http://192.168.1.104:48082'
# VUE_APP_BASE_API = 'http://10.70.2.2:8080'
# 积木报表指向地址 # 积木报表指向地址
VUE_APP_JIMU_API = 'http://192.168.1.101:48082' VUE_APP_JIMU_API = 'http://192.168.1.101:48082'

View File

@@ -204,6 +204,7 @@ export default {
}); });
}, },
changeChoose(val) { changeChoose(val) {
console.log(val);
this.$emit('changeChoose', val); this.$emit('changeChoose', val);
}, },
}, },

View File

@@ -46,17 +46,18 @@ const tableProps = [
showOverflowtooltip: true, showOverflowtooltip: true,
}, },
{ {
prop: 'lineId', prop: 'lineName',
label: '产线', label: '产线',
showOverflowtooltip: true, showOverflowtooltip: true,
}, },
{ {
prop: 'specifications', prop: 'specifications',
label: '规格', label: '规格',
minWidth: 140,
showOverflowtooltip: true, showOverflowtooltip: true,
}, },
{ {
prop: 'check', prop: 'checkGoodName',
label: '判定', label: '判定',
showOverflowtooltip: true, showOverflowtooltip: true,
}, },
@@ -74,12 +75,12 @@ const tableProps = [
{ {
prop: 'remark', prop: 'remark',
label: '备注1', label: '备注1',
minWidth: 120,
showOverflowtooltip: true, showOverflowtooltip: true,
}, },
{ {
prop: 'printStatus', prop: 'printStatusName',
label: '打印状态', label: '打印状态',
filter: (val) => (val == 1 ? '未打印' : '已打印'),
}, },
{ {
prop: 'createTime', prop: 'createTime',
@@ -106,27 +107,30 @@ export default {
return { return {
printMsg1: { printMsg1: {
customerId: '', customerId: '',
customerName: '',
sealWorker: '', sealWorker: '',
packWorker: '', packWorker: '',
processCard: '', processCard: '',
pallet: '', pallet: '',
remark: '', remarkT: '',
}, },
printMsg2: { printMsg2: {
customerId: '', customerId: '',
customerName: '',
sealWorker: '', sealWorker: '',
packWorker: '', packWorker: '',
processCard: '', processCard: '',
pallet: '', pallet: '',
remark: '', remarkT: '',
}, },
printMsg3: { printMsg3: {
customerId: '', customerId: '',
customerName: '',
sealWorker: '', sealWorker: '',
packWorker: '', packWorker: '',
processCard: '', processCard: '',
pallet: '', pallet: '',
remark: '', remarkT: '',
}, },
chooseMsg: 1, // chooseMsg: 1, //
formConfig: [ formConfig: [
@@ -157,6 +161,16 @@ export default {
color: 'primary', color: 'primary',
}, },
], ],
lineList: [],
printStatusList: [
{ id: 1, name: '未打印' },
{ id: 2, name: '已打印' },
{ id: 3, name: '已重打' },
],
checkGoodList: [
{ id: 0, name: '否' },
{ id: 1, name: '是' },
],
// //
queryParams: { queryParams: {
pageNo: 1, pageNo: 1,
@@ -242,18 +256,39 @@ export default {
}, },
mounted() { mounted() {
this.getLineList(); this.getLineList();
console.log(printTemplate); this.getTopTitle();
console.log(JSON.stringify(printTemplate));
console.log('================printTemplate'); console.log('================printTemplate');
}, },
methods: { methods: {
getLineList() { getLineList() {
getCorePLList().then((res) => { getCorePLList().then((res) => {
this.formConfig[0].selectOptions = res.data; this.formConfig[0].selectOptions = res.data || [];
this.lineList = res.data || [];
this.getList();
}); });
}, },
getList() { getList() {
getPackingPage({ ...this.queryParams }).then((res) => { getPackingPage({ ...this.queryParams }).then((res) => {
this.list = res.data.records || []; let arr = res.data.records || [];
arr.map((item) => {
this.lineList.map((subItem) => {
if (item.lineId === subItem.id) {
item.lineName = subItem.name;
}
});
this.printStatusList.map((subItem2) => {
if (item.printStatus === subItem2.id) {
item.printStatusName = subItem2.name;
}
});
this.checkGoodList.map((subItem3) => {
if (item.checkGood === subItem3.id) {
item.checkGoodName = subItem3.name;
}
});
});
this.list = arr;
this.total = res.data.total; this.total = res.data.total;
}); });
}, },
@@ -276,9 +311,13 @@ export default {
this.saveNum(val.data); this.saveNum(val.data);
break; break;
case 'view': case 'view':
this.preView(); //
this.saveTopTitle();
this.preView(val.data);
break; break;
case 'print': case 'print':
//
this.saveTopTitle();
this.printTemp(); this.printTemp();
break; break;
default: default:
@@ -302,11 +341,18 @@ export default {
this.list[val._pageIndex - 1][val.prop] = val[val.prop]; this.list[val._pageIndex - 1][val.prop] = val[val.prop];
}, },
// //
preView() { preView(data) {
let topMsg =
this.chooseMsg === 1
? this.printMsg1
: this.chooseMsg === 2
? this.printMsg2
: this.printMsg3;
let printData = { ...data, ...topMsg };
var hiprintTemplate = new hiprint.PrintTemplate({ var hiprintTemplate = new hiprint.PrintTemplate({
template: printTemplate, template: printTemplate,
}); });
this.$refs.preView.show(hiprintTemplate); this.$refs.preView.show(hiprintTemplate, printData);
}, },
// //
printTemp() { printTemp() {
@@ -327,6 +373,37 @@ export default {
); );
console.log(hiprintTemplate); console.log(hiprintTemplate);
}, },
//
saveTopTitle() {
switch (this.chooseMsg) {
case 1:
localStorage.setItem('printMsg1', JSON.stringify(this.printMsg1));
break;
case 2:
localStorage.setItem('printMsg2', JSON.stringify(this.printMsg2));
break;
case 3:
localStorage.setItem('printMsg3', JSON.stringify(this.printMsg3));
break;
default:
throw new Error(`${this.chooseMsg}的值不正确,请检查!`);
}
},
// top
getTopTitle() {
let pm1 = localStorage.getItem('printMsg1');
let pm2 = localStorage.getItem('printMsg2');
let pm3 = localStorage.getItem('printMsg3');
if (pm1) {
this.printMsg1 = JSON.parse(pm1);
}
if (pm2) {
this.printMsg2 = JSON.parse(pm2);
}
if (pm3) {
this.printMsg3 = JSON.parse(pm3);
}
},
}, },
}; };
</script> </script>

View File

@@ -1,344 +1,47 @@
<!--
* @Author: zwq
* @Date: 2023-08-01 14:55:51
* @LastEditors: zhp
* @LastEditTime: 2024-04-10 16:34:40
* @Description:
-->
<template> <template>
<div class="app-container"> <div class="packagingPrintLog-box">
<search-bar :formConfigs="formConfig" ref="searchBarForm" @headBtnClick="buttonClick" /> <div style="width: 100%">
<base-table :max-height="tableH" :table-props="tableProps" :page="listQuery.pageNo" :limit="listQuery.pageSize" <ButtonNav
:table-data="tableData"> :menus="['未打印', '已打印']"
<method-btn v-if="tableBtn.length" slot="handleBtn" :width="120" label="操作" :method-list="tableBtn" :button-mode="true"
@clickBtn="handleClick" /> @change="currentMenu"></ButtonNav>
</base-table> </div>
<pagination :limit.sync="listQuery.pageSize" :page.sync="listQuery.pageNo" :total="listQuery.total" <!-- 未打印 -->
@pagination="getDataList" /> <UnPrint v-if="activeMenu == '未打印'" />
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList" /> <!-- 已打印 -->
</div> <Printed v-else />
</div>
</template> </template>
<script> <script>
import AddOrUpdate from './add-or-updata'; import ButtonNav from '@/components/ButtonNav';
// import unitDict from './unitDict'; import UnPrint from './components/UnPrint';
import basicPage from '../mixins/basic-page'; import Printed from './components/Printed';
import { parseTime } from '../mixins/code-filter';
import tableHeightMixin from '@/mixins/lb/tableHeightMixin';
import {
getPackingModel,
} from '@/api/base/printModel.js'
import {
deletePacking,
getPackingPage,
getWorkOrderList,
exportPackingExcel,
} from '@/api/base/packingInfo';
const tableProps = [
{
prop: 'packagingCode',
label: '包装流水号'
},
{
prop: 'packagingBarCode',
label: '包装条码'
},
{
prop: 'workOrderName',
label: '所属工单'
},
{
prop: 'customerName',
label: '客户'
},
{
prop: 'content',
label: '内容',
// subcomponent: unitDict,
},
{
prop: 'modelName',
label: '标签模板',
// subcomponent: unitDict,
},
{
prop: 'printStatus',
label: '打印状态',
filter: (val) => val == 1 ? '未打印' : '已打印',
},
{
prop: 'createTime',
label: '生成日期',
filter: parseTime
},
];
export default { export default {
mixins: [basicPage, tableHeightMixin], name: 'packagingPrintLog',
components: { ButtonNav, UnPrint, Printed },
data() { data() {
return { return {
urlOptions: { activeMenu: '未打印',
getDataListURL: getPackingPage,
deleteURL: deletePacking,
exportURL: exportPackingExcel,
},
tableProps,
tableBtn: [
{
type: 'print',
btnName: '打印',
},
this.$auth.hasPermi(`base:packaging-print-log:update`)
? {
type: 'edit',
btnName: '编辑',
}
: undefined,
this.$auth.hasPermi(`base:packaging-print-log:delete`)
? {
type: 'delete',
btnName: '删除',
}
: undefined,
].filter((v) => v),
tableData: [],
formConfig: [
{
type: 'select',
label: '工单',
selectOptions: [],
labelField: 'name',
valueField: 'id',
param: 'workOrderId',
filterable: true,
},
{
// parent: 'dateFilterType',
// 时间段选择
type: 'datePicker',
// label: '时间段',
dateType: 'daterange',
format: 'yyyy-MM-dd HH:mm:ss',
valueFormat: 'yyyy-MM-dd HH:mm:ss',
defaultTime: ['00:00:00', '00:00:00'],
rangeSeparator: '-',
startPlaceholder: '开始时间',
endPlaceholder: '结束时间',
param: 'createTime',
},
{
type: this.$auth.hasPermi('base:packaging-print-log:query') ? 'button' : '',
btnName: '搜索',
name: 'search',
color: 'primary',
},
// {
// type: 'separate',
// },
// {
// type: 'button',
// btnName: '重置',
// name: 'reset',
// },
{
type: this.$auth.hasPermi('base:packaging-print-log:create') ? 'separate' : '',
},
{
type: this.$auth.hasPermi('base:packaging-print-log:create') ? 'button' : '',
btnName: '新增',
name: 'add',
color: 'success',
plain: true,
},
// {
// type: 'separate',
// type: this.$auth.hasPermi('base:product:create') ? 'separate' : '',
// },
// {
// type: this.$auth.hasPermi('base:product:export') ? 'button' : '',
// btnName: '导出',
// name: 'export',
// color: 'warning',
// },
],
}; };
}, },
components: { methods: {
AddOrUpdate, currentMenu(val) {
}, console.log(val);
created() { this.activeMenu = val;
this.getDict()
},
methods: {
getDataList() {
this.dataListLoading = true;
this.urlOptions.getDataListURL(this.listQuery).then(response => {
this.tableData = response.data.records;
this.listQuery.total = response.data.total;
this.dataListLoading = false;
});
},
getDict() {
// 获取产品的属性列表
// getCustomerList().then((response) => {
// console.log(response);
// this.customerList = response.data
// // this.listQuery.total = response.data.total;
// })
// getModelList().then((response) => {
// console.log(response);
// this.modelList = response.data
// // this.listQuery.total = response.data.total;
// })
getWorkOrderList().then((response) => {
// console.log(response);
this.formConfig[0].selectOptions = response.data.map((item) => {
return {
name: item.name,
id: item.id
}
})
console.log(this.formConfig[0].selectOptions);
// this.listQuery.total = response.data.total;
})
},
deleteHandle(id, name, index, packagingCode) {
this.$confirm(`是否确认删除${'[' + packagingCode + ']'}数据项?`, "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.urlOptions.deleteURL(id).then(({ data }) => {
this.$message({
message: "操作成功",
type: "success",
duration: 1500,
onClose: () => {
this.getDataList();
},
});
});
})
.catch(() => { });
},
handlePrint(id) {
if (id) {
getPackingModel(id).then(res => {
var obj = {
code: '11111222',
test: '11111',
test2: '3333333',
test1: '222222',
}
console.log(res);
// getPackingListInfo({
// size: 20,
// current: 1,
// boxNo: printModel.boxNo
// }).then(result => {
// this.substrateList = result.data.records
// var obj = {
// // time: this.getNewDate(),
// boxNo: this.currentData.boxNo,
// orderNum: this.currentData.orderNum,
// powerLevel: this.currentData.powerLevel,
// sapMaterial: this.currentData.sapMaterial,
// img: 'data:image/png;base64,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',
// // lineBody: this.currentData.lineBody == 1 ? 'F ' : 'S',
// createTime: moment(this.currentData.createTime).format('YYYY-MM-DD HH:mm:ss')
// // modul1: '20210320000012',
// // modul2: '20210320000012',
// // modul3: '20210320000012'
// }
// for (var i = 0; i < this.substrateList.length; i++) {
// var model = 'model' + Number(i + 1)
// var pmpp = 'PMPP' + Number(i + 1)
// var m = 'm' + Number(i + 1)
// console.log(model)
// // console.log(this.list[i].woSubstrateId)
// // console.log(this.list[i].woSubstrateId)
// obj['' + model + ''] = this.substrateList[i].woSubstrateId
// obj['' + pmpp + ''] = this.substrateList[i].pmpp
// obj['' + m + ''] = i + 1
// }
// console.log(obj)
// this.printPreview('预览', res.data)
const hiprintTemplate = this.$print(undefined, JSON.parse(res.data.content), obj, {}, {
// styleHandler: () => {
// const css = '<link href="http://hiprint.io/Content/hiprint/css/print-lock.css" media="print" rel="stylesheet">'
// return css
// }
})
hiprintTemplate.on('printSuccess', function () {
console.log(1111);
// that.$notification.success({
// // key: key,
// placement: 'topRight',
// message: key + ' 打印成功',
// description: 'Api单独直接打印回调',
// });
});
console.log(hiprintTemplate)
})
} else {
this.$message({
message: '请选择打印标签模板',
type: 'warning'
});
}
},
closeCallback(vue) {
console.log('关闭了打印工具')
},
buttonClick(val) {
switch (val.btnName) {
case 'search':
this.listQuery.pageNo = 1;
this.listQuery.pageSize = 20;
this.listQuery.workOrderId = val.workOrderId;
if (val.createTime && val.createTime.length != 0) {
this.listQuery.createTime = val.createTime
// this.listQuery.createTime[1] = val.timeVal[1]
} else {
this.listQuery.createTime = undefined
// this.listQuery.endTime = undefined
}
this.getDataList();
console.log(this.tableData)
break;
case 'reset':
this.$refs.searchBarForm.resetForm();
this.listQuery = {
pageSize: 20,
pageNo: 1,
total: 1,
};
this.getDataList();
break;
case 'add':
this.addOrEditTitle = '新增';
this.addOrUpdateVisible = true;
this.addOrUpdateHandle();
break;
case 'export':
this.handleExport();
break;
default:
console.log(val);
}
},
otherMethods(val) {
this.handlePrint(val.data.modelId)
// this.addOrUpdateVisible = true;
// this.addOrEditTitle = '详情';
// this.$nextTick(() => {
// this.$refs.addOrUpdate.init(val.data.id, true);
// });
}, },
}, },
}; };
</script> </script>
<style lang="scss" scoped>
.packagingPrintLog-box {
min-height: calc(100vh - 120px - 8px);
background-color: #f2f4f9;
.show-box {
min-height: calc(100vh - 128px - 52px);
margin-top: 8px;
padding: 16px;
border-radius: 8px;
background-color: #fff;
}
}
</style>

View File

@@ -0,0 +1,889 @@
export default {
"panels":[
{
"index":0,
"name":1,
"height":125,
"width":95,
"paperHeader":0,
"paperFooter":354.33070866141736,
"printElements":[
{
"options":{
"left":5,
"top":5,
"height":30,
"width":256.5,
"right":262.2421875,
"bottom":34.9921875,
"vCenter":133.9921875,
"hCenter":19.9921875,
"coordinateSync":false,
"widthHeightSync":false,
"borderColor":"green",
"backgroundColor":"green"
},
"printElementType":{
"title":"矩形",
"type":"rect"
}
},
{
"options":{
"left":35,
"top":15,
"height":20,
"width":195,
"title":"厂内镀膜/钢化片周转标签",
"coordinateSync":false,
"widthHeightSync":false,
"fontSize":16.5,
"color":"#ffffff",
"qrCodeLevel":0,
"right":232.9921875,
"bottom":35.24609375,
"vCenter":135.4921875,
"hCenter":25.24609375
},
"printElementType":{
"title":"文本",
"type":"text"
}
},
{
"options":{
"left":50,
"top":35,
"height":52.5,
"width":9
},
"printElementType":{
"title":"竖线",
"type":"vline"
}
},
{
"options":{
"left":5,
"top":35,
"height":309,
"width":256.5,
"right":261.4921875,
"bottom":343.9921875,
"vCenter":133.2421875,
"hCenter":189.4921875
},
"printElementType":{
"title":"矩形",
"type":"rect"
}
},
{
"options":{
"left":10,
"top":42.5,
"height":18,
"width":36,
"title":"线别",
"coordinateSync":false,
"widthHeightSync":false,
"fontSize":12,
"qrCodeLevel":0,
"right":45.99609375,
"bottom":60.4921875,
"vCenter":27.99609375,
"hCenter":51.4921875
},
"printElementType":{
"title":"文本",
"type":"text"
}
},
{
"options":{
"left":55,
"top":42.5,
"height":18,
"width":200,
"title":"判定",
"coordinateSync":false,
"widthHeightSync":false,
"fontSize":12,
"qrCodeLevel":0,
"right":93.4921875,
"bottom":59.25,
"vCenter":75.4921875,
"hCenter":50.25,
"field":"checkGoodName"
},
"printElementType":{
"title":"文本",
"type":"text"
}
},
{
"options":{
"left":5,
"top":62.5,
"height":9,
"width":256.5,
"right":259.9921875,
"bottom":72.4921875,
"vCenter":132.4921875,
"hCenter":67.9921875
},
"printElementType":{
"title":"横线",
"type":"hline"
}
},
{
"options":{
"left":55,
"top":70,
"height":18,
"width":199.5,
"title":"备注",
"coordinateSync":false,
"widthHeightSync":false,
"fontSize":12,
"qrCodeLevel":0,
"right":91.2421875,
"bottom":86.25,
"vCenter":73.2421875,
"hCenter":77.25,
"field":"remarkT"
},
"printElementType":{
"title":"文本",
"type":"text"
}
},
{
"options":{
"left":190,
"top":87.5,
"height":169.5,
"width":9,
"right":199.74609375,
"bottom":255.75,
"vCenter":195.24609375,
"hCenter":171
},
"printElementType":{
"title":"竖线",
"type":"vline"
}
},
{
"options":{
"left":5,
"top":87.5,
"height":9,
"width":256.5,
"right":260.7421875,
"bottom":96.75,
"vCenter":132.4921875,
"hCenter":92.25
},
"printElementType":{
"title":"横线",
"type":"hline"
}
},
{
"options":{
"left":77.5,
"top":90,
"height":15,
"width":36,
"title":"规格",
"coordinateSync":false,
"widthHeightSync":false,
"fontSize":12,
"qrCodeLevel":0,
"right":113.49609375,
"bottom":105.4921875,
"vCenter":95.49609375,
"hCenter":97.9921875
},
"printElementType":{
"title":"文本",
"type":"text"
}
},
{
"options":{
"left":207.5,
"top":100,
"height":18,
"width":36,
"title":"用户",
"coordinateSync":false,
"widthHeightSync":false,
"fontSize":12,
"qrCodeLevel":0,
"right":242.7421875,
"bottom":116.25,
"vCenter":224.7421875,
"hCenter":107.25
},
"printElementType":{
"title":"文本",
"type":"text"
}
},
{
"options":{
"left":25,
"top":102.5,
"height":15,
"width":156,
"title":"长*宽*厚度单位mm",
"coordinateSync":false,
"widthHeightSync":false,
"fontSize":12,
"qrCodeLevel":0,
"right":179.25,
"bottom":117.4921875,
"vCenter":101.25,
"hCenter":109.9921875
},
"printElementType":{
"title":"文本",
"type":"text"
}
},
{
"options":{
"left":5,
"top":117.5,
"height":9,
"width":256.5,
"right":263.7421875,
"bottom":125.7421875,
"vCenter":135.4921875,
"hCenter":121.2421875
},
"printElementType":{
"title":"横线",
"type":"hline"
}
},
{
"options":{
"left":130,
"top":145,
"height":55.5,
"width":9,
"right":138.99609375,
"bottom":199.5,
"vCenter":134.49609375,
"hCenter":171.75
},
"printElementType":{
"title":"竖线",
"type":"vline"
}
},
{
"options":{
"left":5,
"top":145,
"height":9,
"width":256.5,
"right":260.25,
"bottom":154.2421875,
"vCenter":132,
"hCenter":149.7421875
},
"printElementType":{
"title":"横线",
"type":"hline"
}
},
{
"options":{
"left":45,
"top":155,
"height":18,
"width":36,
"title":"编号",
"coordinateSync":false,
"widthHeightSync":false,
"fontSize":12,
"qrCodeLevel":0,
"right":82.2421875,
"bottom":171.75,
"vCenter":64.2421875,
"hCenter":162.75
},
"printElementType":{
"title":"文本",
"type":"text"
}
},
{
"options":{
"left":135,
"top":155,
"height":18,
"width":49.5,
"title":"工位号",
"coordinateSync":false,
"widthHeightSync":false,
"fontSize":12,
"qrCodeLevel":0,
"right":186,
"bottom":172.9921875,
"vCenter":161.25,
"hCenter":163.9921875
},
"printElementType":{
"title":"文本",
"type":"text"
}
},
{
"options":{
"left":197.5,
"top":155,
"height":18,
"width":60,
"title":"流程卡号",
"coordinateSync":false,
"widthHeightSync":false,
"fontSize":12,
"qrCodeLevel":0,
"right":256.74609375,
"bottom":143.7421875,
"vCenter":226.74609375,
"hCenter":134.7421875
},
"printElementType":{
"title":"文本",
"type":"text"
}
},
{
"options":{
"left":5,
"top":175,
"height":9,
"width":256.5,
"right":259.2421875,
"bottom":183.75,
"vCenter":130.9921875,
"hCenter":179.25
},
"printElementType":{
"title":"横线",
"type":"hline"
}
},
{
"options":{
"left":50,
"top":200,
"height":58.5,
"width":9,
"right":58.9921875,
"bottom":259.5,
"vCenter":54.4921875,
"hCenter":230.25
},
"printElementType":{
"title":"竖线",
"type":"vline"
}
},
{
"options":{
"left":110,
"top":200,
"height":58.5,
"width":9,
"right":117.75,
"bottom":256.9921875,
"vCenter":113.25,
"hCenter":227.7421875
},
"printElementType":{
"title":"竖线",
"type":"vline"
}
},
{
"options":{
"left":5,
"top":200,
"height":9,
"width":256.5,
"right":262.9921875,
"bottom":210.24609375,
"vCenter":134.7421875,
"hCenter":205.74609375
},
"printElementType":{
"title":"横线",
"type":"hline"
}
},
{
"options":{
"left":10,
"top":210,
"height":18,
"width":36,
"title":"日期",
"coordinateSync":false,
"widthHeightSync":false,
"fontSize":12,
"qrCodeLevel":0,
"right":45.99609375,
"bottom":228,
"vCenter":27.99609375,
"hCenter":219
},
"printElementType":{
"title":"文本",
"type":"text"
}
},
{
"options":{
"left":67.5,
"top":210,
"height":18,
"width":36,
"title":"班次",
"coordinateSync":false,
"widthHeightSync":false,
"fontSize":12,
"qrCodeLevel":0,
"right":103.5,
"bottom":228,
"vCenter":85.5,
"hCenter":219
},
"printElementType":{
"title":"文本",
"type":"text"
}
},
{
"options":{
"left":207.5,
"top":210,
"height":18,
"width":36,
"title":"片数",
"coordinateSync":false,
"widthHeightSync":false,
"fontSize":12,
"qrCodeLevel":0,
"right":243.4921875,
"bottom":228,
"vCenter":225.4921875,
"hCenter":219
},
"printElementType":{
"title":"文本",
"type":"text"
}
},
{
"options":{
"left":5,
"top":230,
"height":9,
"width":256.5,
"right":261.4921875,
"bottom":239.25,
"vCenter":133.2421875,
"hCenter":234.75
},
"printElementType":{
"title":"横线",
"type":"hline"
}
},
{
"options":{
"left":5,
"top":257.5,
"height":9,
"width":256.5,
"right":261.4921875,
"bottom":266.49609375,
"vCenter":133.2421875,
"hCenter":261.99609375
},
"printElementType":{
"title":"横线",
"type":"hline"
}
},
{
"options":{
"left":10,
"top":262.5,
"height":18,
"width":243,
"title":"封箱人员工号",
"coordinateSync":false,
"widthHeightSync":false,
"fontSize":12,
"qrCodeLevel":0,
"right":46.9921875,
"bottom":279.24609375,
"vCenter":28.9921875,
"hCenter":270.24609375,
"field":"sealWorker"
},
"printElementType":{
"title":"文本",
"type":"text"
}
},
{
"options":{
"left":5,
"top":280,
"height":9,
"width":256.5,
"right":262.2421875,
"bottom":289.2421875,
"vCenter":133.9921875,
"hCenter":284.7421875
},
"printElementType":{
"title":"横线",
"type":"hline"
}
},
{
"options":{
"left":10,
"top":285,
"height":18,
"width":244.5,
"title":"打包人员工号",
"coordinateSync":false,
"widthHeightSync":false,
"fontSize":12,
"qrCodeLevel":0,
"right":96.4921875,
"bottom":301.74609375,
"vCenter":52.9921875,
"hCenter":292.74609375,
"field":"packWorker"
},
"printElementType":{
"title":"文本",
"type":"text"
}
},
{
"options":{
"left":5,
"top":300,
"height":9,
"width":256.5,
"right":264.4921875,
"bottom":308.49609375,
"vCenter":136.2421875,
"hCenter":303.99609375
},
"printElementType":{
"title":"横线",
"type":"hline"
}
},
{
"options":{
"left":10,
"top":305,
"height":18,
"width":247.5,
"title":"备注1单层镀/双层镀/丝印打孔/打孔钢片",
"coordinateSync":false,
"widthHeightSync":false,
"fontSize":12,
"qrCodeLevel":0,
"right":96.99609375,
"bottom":322.9921875,
"vCenter":53.49609375,
"hCenter":313.9921875
},
"printElementType":{
"title":"文本",
"type":"text"
}
},
{
"options":{
"left":5,
"top":322.5,
"height":9,
"width":256.5,
"right":262.2421875,
"bottom":332.7421875,
"vCenter":133.9921875,
"hCenter":328.2421875
},
"printElementType":{
"title":"横线",
"type":"hline"
}
},
{
"options":{
"left":10,
"top":327.5,
"height":18,
"width":244.5,
"title":"备注2",
"coordinateSync":false,
"widthHeightSync":false,
"fontSize":12,
"qrCodeLevel":0,
"right":97.9921875,
"bottom":343.74609375,
"vCenter":54.4921875,
"hCenter":334.74609375
},
"printElementType":{
"title":"文本",
"type":"text"
}
},
{
"options":{
"left":20,
"top":122.5,
"height":18,
"width":157.5,
"coordinateSync":false,
"widthHeightSync":false,
"fontSize":12,
"qrCodeLevel":0,
"right":54.99609375,
"bottom":142.5,
"vCenter":36.99609375,
"hCenter":133.5,
"field":"specifications",
"hideTitle":true
},
"printElementType":{
"title":"文本",
"type":"text"
}
},
{
"options":{
"left":195,
"top":122.5,
"height":18,
"width":58.5,
"coordinateSync":false,
"widthHeightSync":false,
"fontSize":12,
"qrCodeLevel":0,
"right":250.9921875,
"bottom":140.49609375,
"vCenter":223.2421875,
"hCenter":131.49609375,
"field":"customerName",
"hideTitle":true
},
"printElementType":{
"title":"文本",
"type":"text"
}
},
{
"options":{
"left":12.5,
"top":177.5,
"height":18,
"width":112.5,
"coordinateSync":false,
"widthHeightSync":false,
"fontSize":12,
"qrCodeLevel":0,
"right":48.24609375,
"bottom":195,
"vCenter":30.24609375,
"hCenter":186,
"field":"packagingCode",
"hideTitle":true
},
"printElementType":{
"title":"文本",
"type":"text"
}
},
{
"options":{
"left":135,
"top":177.5,
"height":18,
"width":49.5,
"coordinateSync":false,
"widthHeightSync":false,
"fontSize":12,
"qrCodeLevel":0,
"right":186.24609375,
"bottom":196.5,
"vCenter":161.49609375,
"hCenter":187.5,
"field":"workStation",
"hideTitle":true
},
"printElementType":{
"title":"文本",
"type":"text"
}
},
{
"options":{
"left":195,
"top":177.5,
"height":18,
"width":60,
"coordinateSync":false,
"widthHeightSync":false,
"fontSize":12,
"qrCodeLevel":0,
"right":254.7421875,
"bottom":194.25,
"vCenter":224.7421875,
"hCenter":185.25,
"field":"processCard",
"hideTitle":true
},
"printElementType":{
"title":"文本",
"type":"text"
}
},
{
"options":{
"left":10,
"top":235,
"height":18,
"width":36,
"coordinateSync":false,
"widthHeightSync":false,
"fontSize":12,
"qrCodeLevel":0,
"right":46.9921875,
"bottom":252.24609375,
"vCenter":28.9921875,
"hCenter":243.24609375,
"field":"date",
"hideTitle":true
},
"printElementType":{
"title":"文本",
"type":"text"
}
},
{
"options":{
"left":60,
"top":235,
"height":18,
"width":48,
"coordinateSync":false,
"widthHeightSync":false,
"fontSize":12,
"qrCodeLevel":0,
"right":97.2421875,
"bottom":253.9921875,
"vCenter":79.2421875,
"hCenter":244.9921875,
"field":"groupClass",
"hideTitle":true
},
"printElementType":{
"title":"文本",
"type":"text"
}
},
{
"options":{
"left":120,
"top":235,
"height":18,
"width":64.5,
"coordinateSync":false,
"widthHeightSync":false,
"fontSize":12,
"qrCodeLevel":0,
"right":167.49609375,
"bottom":253.9921875,
"vCenter":143.49609375,
"hCenter":244.9921875,
"field":"time",
"hideTitle":true
},
"printElementType":{
"title":"文本",
"type":"text"
}
},
{
"options":{
"left":202.5,
"top":235,
"height":18,
"width":48,
"coordinateSync":false,
"widthHeightSync":false,
"fontSize":12,
"qrCodeLevel":0,
"right":250.74609375,
"bottom":253.2421875,
"vCenter":226.74609375,
"hCenter":244.2421875,
"field":"num",
"hideTitle":true
},
"printElementType":{
"title":"文本",
"type":"text"
}
},
{
"options":{
"left":7.5,
"top":62.5,
"height":18,
"width":36,
"coordinateSync":false,
"widthHeightSync":false,
"fontSize":12,
"qrCodeLevel":0,
"right":44.7421875,
"bottom":81.24609375,
"vCenter":26.7421875,
"hCenter":72.24609375,
"field":"lineName",
"hideTitle":true
},
"printElementType":{
"title":"文本",
"type":"text"
}
}
],
"paperNumberLeft":372.5,
"paperNumberTop":337.5,
"paperNumberContinue":true,
"watermarkOptions":{
}
}
]
}

View File

@@ -0,0 +1,344 @@
<!--
* @Author: zwq
* @Date: 2023-08-01 14:55:51
* @LastEditors: zhp
* @LastEditTime: 2024-04-10 16:34:40
* @Description:
-->
<template>
<div class="app-container">
<search-bar :formConfigs="formConfig" ref="searchBarForm" @headBtnClick="buttonClick" />
<base-table :max-height="tableH" :table-props="tableProps" :page="listQuery.pageNo" :limit="listQuery.pageSize"
:table-data="tableData">
<method-btn v-if="tableBtn.length" slot="handleBtn" :width="120" label="操作" :method-list="tableBtn"
@clickBtn="handleClick" />
</base-table>
<pagination :limit.sync="listQuery.pageSize" :page.sync="listQuery.pageNo" :total="listQuery.total"
@pagination="getDataList" />
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList" />
</div>
</template>
<script>
import AddOrUpdate from './add-or-updata';
// import unitDict from './unitDict';
import basicPage from '../mixins/basic-page';
import { parseTime } from '../mixins/code-filter';
import tableHeightMixin from '@/mixins/lb/tableHeightMixin';
import {
getPackingModel,
} from '@/api/base/printModel.js'
import {
deletePacking,
getPackingPage,
getWorkOrderList,
exportPackingExcel,
} from '@/api/base/packingInfo';
const tableProps = [
{
prop: 'packagingCode',
label: '包装流水号'
},
{
prop: 'packagingBarCode',
label: '包装条码'
},
{
prop: 'workOrderName',
label: '所属工单'
},
{
prop: 'customerName',
label: '客户'
},
{
prop: 'content',
label: '内容',
// subcomponent: unitDict,
},
{
prop: 'modelName',
label: '标签模板',
// subcomponent: unitDict,
},
{
prop: 'printStatus',
label: '打印状态',
filter: (val) => val == 1 ? '未打印' : '已打印',
},
{
prop: 'createTime',
label: '生成日期',
filter: parseTime
},
];
export default {
mixins: [basicPage, tableHeightMixin],
data() {
return {
urlOptions: {
getDataListURL: getPackingPage,
deleteURL: deletePacking,
exportURL: exportPackingExcel,
},
tableProps,
tableBtn: [
{
type: 'print',
btnName: '打印',
},
this.$auth.hasPermi(`base:packaging-print-log:update`)
? {
type: 'edit',
btnName: '编辑',
}
: undefined,
this.$auth.hasPermi(`base:packaging-print-log:delete`)
? {
type: 'delete',
btnName: '删除',
}
: undefined,
].filter((v) => v),
tableData: [],
formConfig: [
{
type: 'select',
label: '工单',
selectOptions: [],
labelField: 'name',
valueField: 'id',
param: 'workOrderId',
filterable: true,
},
{
// parent: 'dateFilterType',
// 时间段选择
type: 'datePicker',
// label: '时间段',
dateType: 'daterange',
format: 'yyyy-MM-dd HH:mm:ss',
valueFormat: 'yyyy-MM-dd HH:mm:ss',
defaultTime: ['00:00:00', '00:00:00'],
rangeSeparator: '-',
startPlaceholder: '开始时间',
endPlaceholder: '结束时间',
param: 'createTime',
},
{
type: this.$auth.hasPermi('base:packaging-print-log:query') ? 'button' : '',
btnName: '搜索',
name: 'search',
color: 'primary',
},
// {
// type: 'separate',
// },
// {
// type: 'button',
// btnName: '重置',
// name: 'reset',
// },
{
type: this.$auth.hasPermi('base:packaging-print-log:create') ? 'separate' : '',
},
{
type: this.$auth.hasPermi('base:packaging-print-log:create') ? 'button' : '',
btnName: '新增',
name: 'add',
color: 'success',
plain: true,
},
// {
// type: 'separate',
// type: this.$auth.hasPermi('base:product:create') ? 'separate' : '',
// },
// {
// type: this.$auth.hasPermi('base:product:export') ? 'button' : '',
// btnName: '导出',
// name: 'export',
// color: 'warning',
// },
],
};
},
components: {
AddOrUpdate,
},
created() {
this.getDict()
},
methods: {
getDataList() {
this.dataListLoading = true;
this.urlOptions.getDataListURL(this.listQuery).then(response => {
this.tableData = response.data.records;
this.listQuery.total = response.data.total;
this.dataListLoading = false;
});
},
getDict() {
// 获取产品的属性列表
// getCustomerList().then((response) => {
// console.log(response);
// this.customerList = response.data
// // this.listQuery.total = response.data.total;
// })
// getModelList().then((response) => {
// console.log(response);
// this.modelList = response.data
// // this.listQuery.total = response.data.total;
// })
getWorkOrderList().then((response) => {
// console.log(response);
this.formConfig[0].selectOptions = response.data.map((item) => {
return {
name: item.name,
id: item.id
}
})
console.log(this.formConfig[0].selectOptions);
// this.listQuery.total = response.data.total;
})
},
deleteHandle(id, name, index, packagingCode) {
this.$confirm(`是否确认删除${'[' + packagingCode + ']'}数据项?`, "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.urlOptions.deleteURL(id).then(({ data }) => {
this.$message({
message: "操作成功",
type: "success",
duration: 1500,
onClose: () => {
this.getDataList();
},
});
});
})
.catch(() => { });
},
handlePrint(id) {
if (id) {
getPackingModel(id).then(res => {
var obj = {
code: '11111222',
test: '11111',
test2: '3333333',
test1: '222222',
}
console.log(res);
// getPackingListInfo({
// size: 20,
// current: 1,
// boxNo: printModel.boxNo
// }).then(result => {
// this.substrateList = result.data.records
// var obj = {
// // time: this.getNewDate(),
// boxNo: this.currentData.boxNo,
// orderNum: this.currentData.orderNum,
// powerLevel: this.currentData.powerLevel,
// sapMaterial: this.currentData.sapMaterial,
// img: 'data:image/png;base64,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',
// // lineBody: this.currentData.lineBody == 1 ? 'F ' : 'S',
// createTime: moment(this.currentData.createTime).format('YYYY-MM-DD HH:mm:ss')
// // modul1: '20210320000012',
// // modul2: '20210320000012',
// // modul3: '20210320000012'
// }
// for (var i = 0; i < this.substrateList.length; i++) {
// var model = 'model' + Number(i + 1)
// var pmpp = 'PMPP' + Number(i + 1)
// var m = 'm' + Number(i + 1)
// console.log(model)
// // console.log(this.list[i].woSubstrateId)
// // console.log(this.list[i].woSubstrateId)
// obj['' + model + ''] = this.substrateList[i].woSubstrateId
// obj['' + pmpp + ''] = this.substrateList[i].pmpp
// obj['' + m + ''] = i + 1
// }
// console.log(obj)
// this.printPreview('预览', res.data)
const hiprintTemplate = this.$print(undefined, JSON.parse(res.data.content), obj, {}, {
// styleHandler: () => {
// const css = '<link href="http://hiprint.io/Content/hiprint/css/print-lock.css" media="print" rel="stylesheet">'
// return css
// }
})
hiprintTemplate.on('printSuccess', function () {
console.log(1111);
// that.$notification.success({
// // key: key,
// placement: 'topRight',
// message: key + ' 打印成功',
// description: 'Api单独直接打印回调',
// });
});
console.log(hiprintTemplate)
})
} else {
this.$message({
message: '请选择打印标签模板',
type: 'warning'
});
}
},
closeCallback(vue) {
console.log('关闭了打印工具')
},
buttonClick(val) {
switch (val.btnName) {
case 'search':
this.listQuery.pageNo = 1;
this.listQuery.pageSize = 20;
this.listQuery.workOrderId = val.workOrderId;
if (val.createTime && val.createTime.length != 0) {
this.listQuery.createTime = val.createTime
// this.listQuery.createTime[1] = val.timeVal[1]
} else {
this.listQuery.createTime = undefined
// this.listQuery.endTime = undefined
}
this.getDataList();
console.log(this.tableData)
break;
case 'reset':
this.$refs.searchBarForm.resetForm();
this.listQuery = {
pageSize: 20,
pageNo: 1,
total: 1,
};
this.getDataList();
break;
case 'add':
this.addOrEditTitle = '新增';
this.addOrUpdateVisible = true;
this.addOrUpdateHandle();
break;
case 'export':
this.handleExport();
break;
default:
console.log(val);
}
},
otherMethods(val) {
this.handlePrint(val.data.modelId)
// this.addOrUpdateVisible = true;
// this.addOrEditTitle = '详情';
// this.$nextTick(() => {
// this.$refs.addOrUpdate.init(val.data.id, true);
// });
},
},
};
</script>

View File

@@ -1,47 +0,0 @@
<template>
<div class="packagingPrintLog-box">
<div style="width: 100%">
<ButtonNav
:menus="['未打印', '已打印']"
:button-mode="true"
@change="currentMenu"></ButtonNav>
</div>
<!-- 未打印 -->
<UnPrint v-if="activeMenu == '未打印'" />
<!-- 已打印 -->
<Printed v-else />
</div>
</template>
<script>
import ButtonNav from '@/components/ButtonNav';
import UnPrint from './components/UnPrint';
import Printed from './components/Printed';
export default {
name: 'packagingPrintLog',
components: { ButtonNav, UnPrint, Printed },
data() {
return {
activeMenu: '未打印',
};
},
methods: {
currentMenu(val) {
console.log(val);
this.activeMenu = val;
},
},
};
</script>
<style lang="scss" scoped>
.packagingPrintLog-box {
min-height: calc(100vh - 120px - 8px);
background-color: #f2f4f9;
.show-box {
min-height: calc(100vh - 128px - 52px);
margin-top: 8px;
padding: 16px;
border-radius: 8px;
background-color: #fff;
}
}
</style>

View File

@@ -1,554 +0,0 @@
export default {
panels: [
{
index: 0,
name: 1,
height: 125,
width: 95,
paperHeader: 0,
paperFooter: 354.33070866141736,
printElements: [
{
options: {
left: 5,
top: 5,
height: 30,
width: 256.5,
right: 262.2421875,
bottom: 34.9921875,
vCenter: 133.9921875,
hCenter: 19.9921875,
coordinateSync: false,
widthHeightSync: false,
borderColor: 'green',
backgroundColor: 'green',
},
printElementType: { title: '矩形', type: 'rect' },
},
{
options: {
left: 35,
top: 15,
height: 20,
width: 195,
title: '厂内镀膜/钢化片周转标签',
coordinateSync: false,
widthHeightSync: false,
fontSize: 16.5,
color: '#ffffff',
qrCodeLevel: 0,
right: 232.9921875,
bottom: 35.24609375,
vCenter: 135.4921875,
hCenter: 25.24609375,
},
printElementType: { title: '文本', type: 'text' },
},
{
options: { left: 50, top: 35, height: 52.5, width: 9 },
printElementType: { title: '竖线', type: 'vline' },
},
{
options: {
left: 5,
top: 35,
height: 309,
width: 256.5,
right: 261.4921875,
bottom: 343.9921875,
vCenter: 133.2421875,
hCenter: 189.4921875,
},
printElementType: { title: '矩形', type: 'rect' },
},
{
options: {
left: 10,
top: 42.5,
height: 18,
width: 36,
title: '线别',
coordinateSync: false,
widthHeightSync: false,
fontSize: 12,
qrCodeLevel: 0,
right: 45.99609375,
bottom: 60.4921875,
vCenter: 27.99609375,
hCenter: 51.4921875,
},
printElementType: { title: '文本', type: 'text' },
},
{
options: {
left: 55,
top: 42.5,
height: 18,
width: 200,
title: '判定:良品/保留/再检',
coordinateSync: false,
widthHeightSync: false,
fontSize: 12,
qrCodeLevel: 0,
right: 93.4921875,
bottom: 59.25,
vCenter: 75.4921875,
hCenter: 50.25,
},
printElementType: { title: '文本', type: 'text' },
},
{
options: {
left: 5,
top: 62.5,
height: 9,
width: 256.5,
right: 259.9921875,
bottom: 72.4921875,
vCenter: 132.4921875,
hCenter: 67.9921875,
},
printElementType: { title: '横线', type: 'hline' },
},
{
options: {
left: 55,
top: 70,
height: 18,
width: 46,
title: '备注:',
coordinateSync: false,
widthHeightSync: false,
fontSize: 12,
qrCodeLevel: 0,
right: 91.2421875,
bottom: 86.25,
vCenter: 73.2421875,
hCenter: 77.25,
},
printElementType: { title: '文本', type: 'text' },
},
{
options: {
left: 190,
top: 87.5,
height: 169.5,
width: 9,
right: 199.74609375,
bottom: 255.75,
vCenter: 195.24609375,
hCenter: 171,
},
printElementType: { title: '竖线', type: 'vline' },
},
{
options: {
left: 5,
top: 87.5,
height: 9,
width: 256.5,
right: 260.7421875,
bottom: 96.75,
vCenter: 132.4921875,
hCenter: 92.25,
},
printElementType: { title: '横线', type: 'hline' },
},
{
options: {
left: 77.5,
top: 90,
height: 15,
width: 36,
title: '规格',
coordinateSync: false,
widthHeightSync: false,
fontSize: 12,
qrCodeLevel: 0,
right: 113.49609375,
bottom: 105.4921875,
vCenter: 95.49609375,
hCenter: 97.9921875,
},
printElementType: { title: '文本', type: 'text' },
},
{
options: {
left: 207.5,
top: 100,
height: 18,
width: 36,
title: '用户',
coordinateSync: false,
widthHeightSync: false,
fontSize: 12,
qrCodeLevel: 0,
right: 242.7421875,
bottom: 116.25,
vCenter: 224.7421875,
hCenter: 107.25,
},
printElementType: { title: '文本', type: 'text' },
},
{
options: {
left: 25,
top: 102.5,
height: 15,
width: 156,
title: '长*宽*厚度单位mm',
coordinateSync: false,
widthHeightSync: false,
fontSize: 12,
qrCodeLevel: 0,
right: 179.25,
bottom: 117.4921875,
vCenter: 101.25,
hCenter: 109.9921875,
},
printElementType: { title: '文本', type: 'text' },
},
{
options: {
left: 5,
top: 117.5,
height: 9,
width: 256.5,
right: 263.7421875,
bottom: 125.7421875,
vCenter: 135.4921875,
hCenter: 121.2421875,
},
printElementType: { title: '横线', type: 'hline' },
},
{
options: {
left: 130,
top: 145,
height: 55.5,
width: 9,
right: 138.99609375,
bottom: 199.5,
vCenter: 134.49609375,
hCenter: 171.75,
},
printElementType: { title: '竖线', type: 'vline' },
},
{
options: {
left: 5,
top: 145,
height: 9,
width: 256.5,
right: 260.25,
bottom: 154.2421875,
vCenter: 132,
hCenter: 149.7421875,
},
printElementType: { title: '横线', type: 'hline' },
},
{
options: {
left: 45,
top: 155,
height: 18,
width: 36,
title: '编号',
coordinateSync: false,
widthHeightSync: false,
fontSize: 12,
qrCodeLevel: 0,
right: 82.2421875,
bottom: 171.75,
vCenter: 64.2421875,
hCenter: 162.75,
},
printElementType: { title: '文本', type: 'text' },
},
{
options: {
left: 135,
top: 155,
height: 18,
width: 49.5,
title: '工位号',
coordinateSync: false,
widthHeightSync: false,
fontSize: 12,
qrCodeLevel: 0,
right: 186,
bottom: 172.9921875,
vCenter: 161.25,
hCenter: 163.9921875,
},
printElementType: { title: '文本', type: 'text' },
},
{
options: {
left: 197.5,
top: 155,
height: 18,
width: 60,
title: '流程卡号',
coordinateSync: false,
widthHeightSync: false,
fontSize: 12,
qrCodeLevel: 0,
right: 256.74609375,
bottom: 143.7421875,
vCenter: 226.74609375,
hCenter: 134.7421875,
},
printElementType: { title: '文本', type: 'text' },
},
{
options: {
left: 5,
top: 175,
height: 9,
width: 256.5,
right: 259.2421875,
bottom: 183.75,
vCenter: 130.9921875,
hCenter: 179.25,
},
printElementType: { title: '横线', type: 'hline' },
},
{
options: {
left: 50,
top: 200,
height: 58.5,
width: 9,
right: 58.9921875,
bottom: 259.5,
vCenter: 54.4921875,
hCenter: 230.25,
},
printElementType: { title: '竖线', type: 'vline' },
},
{
options: {
left: 110,
top: 200,
height: 58.5,
width: 9,
right: 117.75,
bottom: 256.9921875,
vCenter: 113.25,
hCenter: 227.7421875,
},
printElementType: { title: '竖线', type: 'vline' },
},
{
options: {
left: 5,
top: 200,
height: 9,
width: 256.5,
right: 262.9921875,
bottom: 210.24609375,
vCenter: 134.7421875,
hCenter: 205.74609375,
},
printElementType: { title: '横线', type: 'hline' },
},
{
options: {
left: 10,
top: 210,
height: 18,
width: 36,
title: '日期',
coordinateSync: false,
widthHeightSync: false,
fontSize: 12,
qrCodeLevel: 0,
right: 45.99609375,
bottom: 228,
vCenter: 27.99609375,
hCenter: 219,
},
printElementType: { title: '文本', type: 'text' },
},
{
options: {
left: 67.5,
top: 210,
height: 18,
width: 36,
title: '班次',
coordinateSync: false,
widthHeightSync: false,
fontSize: 12,
qrCodeLevel: 0,
right: 103.5,
bottom: 228,
vCenter: 85.5,
hCenter: 219,
},
printElementType: { title: '文本', type: 'text' },
},
{
options: {
left: 207.5,
top: 210,
height: 18,
width: 36,
title: '片数',
coordinateSync: false,
widthHeightSync: false,
fontSize: 12,
qrCodeLevel: 0,
right: 243.4921875,
bottom: 228,
vCenter: 225.4921875,
hCenter: 219,
},
printElementType: { title: '文本', type: 'text' },
},
{
options: {
left: 5,
top: 230,
height: 9,
width: 256.5,
right: 261.4921875,
bottom: 239.25,
vCenter: 133.2421875,
hCenter: 234.75,
},
printElementType: { title: '横线', type: 'hline' },
},
{
options: {
left: 5,
top: 257.5,
height: 9,
width: 256.5,
right: 261.4921875,
bottom: 266.49609375,
vCenter: 133.2421875,
hCenter: 261.99609375,
},
printElementType: { title: '横线', type: 'hline' },
},
{
options: {
left: 10,
top: 262.5,
height: 18,
width: 87,
title: '封箱人员工号:',
coordinateSync: false,
widthHeightSync: false,
fontSize: 12,
qrCodeLevel: 0,
right: 46.9921875,
bottom: 279.24609375,
vCenter: 28.9921875,
hCenter: 270.24609375,
},
printElementType: { title: '文本', type: 'text' },
},
{
options: {
left: 5,
top: 280,
height: 9,
width: 256.5,
right: 262.2421875,
bottom: 289.2421875,
vCenter: 133.9921875,
hCenter: 284.7421875,
},
printElementType: { title: '横线', type: 'hline' },
},
{
options: {
left: 10,
top: 285,
height: 18,
width: 87,
title: '打包人员工号:',
coordinateSync: false,
widthHeightSync: false,
fontSize: 12,
qrCodeLevel: 0,
right: 96.4921875,
bottom: 301.74609375,
vCenter: 52.9921875,
hCenter: 292.74609375,
},
printElementType: { title: '文本', type: 'text' },
},
{
options: {
left: 5,
top: 300,
height: 9,
width: 256.5,
right: 264.4921875,
bottom: 308.49609375,
vCenter: 136.2421875,
hCenter: 303.99609375,
},
printElementType: { title: '横线', type: 'hline' },
},
{
options: {
left: 10,
top: 305,
height: 18,
width: 247.5,
title: '备注1单层镀/双层镀/丝印打孔/打孔钢片',
coordinateSync: false,
widthHeightSync: false,
fontSize: 12,
qrCodeLevel: 0,
right: 96.99609375,
bottom: 322.9921875,
vCenter: 53.49609375,
hCenter: 313.9921875,
},
printElementType: { title: '文本', type: 'text' },
},
{
options: {
left: 5,
top: 322.5,
height: 9,
width: 256.5,
right: 262.2421875,
bottom: 332.7421875,
vCenter: 133.9921875,
hCenter: 328.2421875,
},
printElementType: { title: '横线', type: 'hline' },
},
{
options: {
left: 10,
top: 327.5,
height: 18,
width: 87,
title: '备注2',
coordinateSync: false,
widthHeightSync: false,
fontSize: 12,
qrCodeLevel: 0,
right: 97.9921875,
bottom: 343.74609375,
vCenter: 54.4921875,
hCenter: 334.74609375,
},
printElementType: { title: '文本', type: 'text' },
},
],
paperNumberLeft: 372.5,
paperNumberTop: 337.5,
paperNumberContinue: true,
watermarkOptions: {},
},
]
}

View File

@@ -199,10 +199,9 @@ export default {
this.queryParams.lineName = this.$route.query.lineName this.queryParams.lineName = this.$route.query.lineName
this.searchBarFormConfig[2].defaultSelect = this.$route.query.lineName this.searchBarFormConfig[2].defaultSelect = this.$route.query.lineName
} }
if (this.$route.query.originalGlassOutputTime) { if (this.$route.query.startTime && this.$route.query.endTime) {
console.log('你好', this.$route.query.originalGlassOutputTime) this.queryParams.startTime = parseTime(new Date(Number(this.$route.query.startTime)))
this.queryParams.startTime = parseTime(new Date(Number(this.$route.query.originalGlassOutputTime))) this.queryParams.endTime = parseTime(new Date(Number(this.$route.query.endTime)))
this.queryParams.endTime = parseTime(new Date(Number(this.$route.query.originalGlassOutputTime)))
this.searchBarFormConfig[3].defaultSelect = [ this.searchBarFormConfig[3].defaultSelect = [
this.queryParams.startTime, this.queryParams.startTime,
this.queryParams.endTime, this.queryParams.endTime,

View File

@@ -1,12 +1,12 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2023-11-06 15:15:30 * @Date: 2023-11-06 15:15:30
* @LastEditTime: 2024-04-09 15:14:08 * @LastEditTime: 2024-04-28 17:10:02
* @LastEditors: zhp * @LastEditors: DY
* @Description: * @Description:
--> -->
<template> <template>
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()" label-width="auto"> <!-- <el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()" label-width="auto">
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="8"> <el-col :span="8">
<el-form-item label="工单号" prop="workOrderId"> <el-form-item label="工单号" prop="workOrderId">
@@ -60,7 +60,7 @@
</el-row> </el-row>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="来源" prop="source"> <el-form-item label="来源" prop="source">
<el-select v-model="dataForm.source" placeholder="请选择来源" multiple> <el-select v-model="dataForm.source" placeholder="请选择来源">
<el-option v-for="dict in sourceList" :key="dict.id" :label="dict.name" :value="dict.id" /> <el-option v-for="dict in sourceList" :key="dict.id" :label="dict.name" :value="dict.id" />
</el-select> </el-select>
</el-form-item> </el-form-item>
@@ -70,15 +70,145 @@
<el-input v-model="dataForm.remark" placeholder="备注" /> <el-input v-model="dataForm.remark" placeholder="备注" />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-form> </el-form> -->
<el-form
:model="dataForm"
:rules="dataRule"
ref="dataForm"
@keyup.enter.native="dataFormSubmit()"
label-width="auto">
<el-row :gutter="20">
<el-col :span="12">
<el-form-item
label="工单号"
prop="workOrderId">
<el-select
filterable
v-model="dataForm.workOrderId"
placeholder="请选择工单号"
style="width: 100%">
<el-option
v-for="dict in workOrderList"
:key="dict.id"
:label="dict.name"
:value="dict.id" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item
label="数量"
prop="num"
style="width: 100%">
<el-input
v-model="dataForm.num"
placeholder="请输入数量" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item
label="产线"
prop="lineId">
<el-select
v-model="dataForm.lineId"
placeholder="请选择产线"
@change="getWorksectionById"
style="width: 100%">
<el-option
v-for="dict in lineList"
:key="dict.id"
:label="dict.name"
:value="dict.id" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item
label="工段"
prop="sectionId">
<el-select
v-model="dataForm.sectionId"
placeholder="请选择工段"
style="width: 100%">
<el-option
v-for="dict in sectionList"
:key="dict.id"
:label="dict.name"
:value="dict.id" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item
label="报废时间"
prop="logTime">
<el-date-picker
style="width: 100%"
v-model="dataForm.logTime"
type="datetime"
value-format="timestamp"
placeholder="选择日期"></el-date-picker>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item
label="报废原因"
prop="detId">
<el-select
v-model="dataForm.detId"
placeholder="请选择报废原因"
multiple
style="width: 100%">
<el-option
v-for="dict in detList"
:key="dict.id"
:label="dict.name"
:value="dict.id" />
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="24">
<el-form-item
label="描述"
prop="description">
<el-input
v-model="dataForm.description"
type="textarea"
:rows="4"
placeholder="请输入描述"
style="width: 100%" />
</el-form-item>
</el-col>
</el-row>
<el-col :span="24">
<el-form-item
label="备注"
prop="remark">
<el-input
v-model="dataForm.remark"
placeholder="备注"
style="width: 100%" />
</el-form-item>
</el-col>
</el-form>
</template> </template>
<script> <script>
import basicAdd from './basic-add'; import basicAdd from './basic-add';
import { import {
createQualityScrapLog, updateQualityScrapLog, getQualityScrapLog, getWorkOrderList, createQualityScrapLog,
getTeamList, getDetList,getLineList } from "@/api/base/qualityScrapLog"; updateQualityScrapLog,
import { getList,} from "@/api/base/qualityScrapType"; getQualityScrapLog,
getWorkOrderList,
getTeamList,
getDetList,
getLineList,
} from '@/api/base/qualityScrapLog';
import { getList } from '@/api/base/qualityScrapType';
// import { getMaterialList } from "@/api/base/material"; // import { getMaterialList } from "@/api/base/material";
import moment from 'moment'; import moment from 'moment';
export default { export default {
@@ -86,32 +216,22 @@ export default {
data() { data() {
return { return {
urlOptions: { urlOptions: {
isGetCode: false, isGetCode: false,
// codeURL: getCode, // codeURL: getCode,
createURL: createQualityScrapLog, createURL: createQualityScrapLog,
updateURL: updateQualityScrapLog, updateURL: updateQualityScrapLog,
infoURL: getQualityScrapLog, infoURL: getQualityScrapLog,
}, },
lineList:[], lineList: [],
typeList: [], typeList: [],
workOrderList: [], workOrderList: [],
detList:[], detList: [],
teamList: [], teamList: [],
sectionList:[], sectionList: [],
sourceList: [
{
id: 1,
name: '平板端',
},
{
id: 2,
name: '网页端',
}
],
dataForm: { dataForm: {
id: undefined, id: undefined,
logTime: undefined, logTime: undefined,
source:1, source: 2,
detId: undefined, detId: undefined,
workOrderId: null, workOrderId: null,
teamId: undefined, teamId: undefined,
@@ -120,120 +240,137 @@ export default {
lineId:undefined, lineId:undefined,
description:undefined, description:undefined,
// description: undefined, // description: undefined,
remark: undefined, remark: undefined
// id: undefined,
// logTime: undefined,
// detId: undefined,
// workOrderId: null,
// teamId: undefined,
// num: undefined,
// sectionId: undefined,
// lineId: undefined,
// description: undefined,
// // description: undefined,
// remark: undefined,
}, },
// materialList: [], // materialList: [],
dataRule: { dataRule: {
// materialId: [{ required: true, message: "", trigger: "blur" }], // materialId: [{ required: true, message: "", trigger: "blur" }],
workOrderId: [{ required: true, message: "工单号不能为空", trigger: "change" }], workOrderId: [
num: [{ required: true, message: "数量不能为空", trigger: "blur" }], { required: true, message: '工单号不能为空', trigger: 'change' },
detId: [{ required: true, message: "报废原因不能为空", trigger: "change" }], ],
num: [{ required: true, message: '数量不能为空', trigger: 'blur' }],
detId: [
{ required: true, message: '报废原因不能为空', trigger: 'change' },
],
logTime: [{ required: true, message: "报废时间不能为空", trigger: "change" }], logTime: [
} { required: true, message: '报废时间不能为空', trigger: 'change' },
],
},
}; };
}, },
mounted() { mounted() {
this.getDict() this.getDict();
console.log('我看看', this.dataForm) console.log('我看看', this.dataForm);
// this.getCurrentTime() // this.getCurrentTime()
// this.dataForm.logTime = new Date() // this.dataForm.logTime = new Date()
}, },
methods: { methods: {
// getCurrentTime() { // getCurrentTime() {
// // new Date().Format("yyyy-MM-dd HH:mm:ss") // // new Date().Format("yyyy-MM-dd HH:mm:ss")
// // this.dataForm.logTime = year + "-" + month + "-" + day; // // this.dataForm.logTime = year + "-" + month + "-" + day;
// // console.log(this.dataForm.logTime); // // console.log(this.dataForm.logTime);
// }, // },
async getDict() { async getDict() {
// 物料列表 // 物料列表
const res = await getList() const res = await getList();
this.typeList = res.data this.typeList = res.data;
getWorkOrderList().then((res) => { getWorkOrderList().then((res) => {
console.log(res); console.log(res);
// console.log(response); // console.log(response);
this.workOrderList = res.data.map((item) => { this.workOrderList = res.data.map((item) => {
return { return {
name: item.name, name: item.name,
id: item.id id: item.id,
} };
}) });
// console.log(this.formConfig[0].selectOptions); // console.log(this.formConfig[0].selectOptions);
// this.listQuery.total = response.data.total; // this.listQuery.total = response.data.total;
}) });
getLineList().then((res) => { getLineList().then((res) => {
console.log(res); console.log(res);
// console.log(response); // console.log(response);
this.lineList = res.data.map((item) => { this.lineList = res.data.map((item) => {
return { return {
name: item.name, name: item.name,
id: item.id id: item.id,
} };
}) });
// console.log(this.formConfig[0].selectOptions); // console.log(this.formConfig[0].selectOptions);
// this.listQuery.total = response.data.total; // this.listQuery.total = response.data.total;
}) });
getDetList().then((res) => { getDetList().then((res) => {
console.log(res); console.log(res);
// console.log(response); // console.log(response);
this.detList = res.data.map((item) => { this.detList = res.data.map((item) => {
return { return {
name: item.content, name: item.content,
id: item.id id: item.id,
} };
}) });
// console.log(this.formConfig[0].selectOptions); // console.log(this.formConfig[0].selectOptions);
// this.listQuery.total = response.data.total; // this.listQuery.total = response.data.total;
}) });
getTeamList().then((res) => { getTeamList().then((res) => {
console.log(res); console.log(res);
// console.log(response); // console.log(response);
this.teamList = res.data.map((item) => { this.teamList = res.data.map((item) => {
return { return {
name: item.name, name: item.name,
id: item.id id: item.id,
} };
}) });
// console.log(this.formConfig[0].selectOptions); // console.log(this.formConfig[0].selectOptions);
// this.listQuery.total = response.data.total; // this.listQuery.total = response.data.total;
}) });
}, },
async getWorksectionById(lineId) { async getWorksectionById(lineId) {
if (lineId) { if (lineId) {
const { code, data } = await this.$axios({ const { code, data } = await this.$axios({
url: '/base/core-workshop-section/listByParentId', url: '/base/core-workshop-section/listByParentId',
method: 'get', method: 'get',
params: { params: {
id: lineId, id: lineId,
}, },
}); });
if (code == 0) { if (code == 0) {
console.log(data) console.log(data);
this.sectionList = data.map((item) => { this.sectionList = data.map((item) => {
return { return {
name: item.name, name: item.name,
id: item.id, id: item.id,
}; };
}); });
} }
} else { } else {
this.$axios({ this.$axios({
url: '/base/core-workshop-section/listAll', url: '/base/core-workshop-section/listAll',
method: 'get', method: 'get',
// params: { // params: {
// id: lineId, // id: lineId,
// }, // },
}).then((res) => { }).then((res) => {
// console.log(data) // console.log(data)
this.sectionList = res.data.map((item) => { this.sectionList = res.data.map((item) => {
return { return {
name: item.name, name: item.name,
id: item.id, id: item.id,
}; };
}); });
}) });
} }
}, },
// setMaterialCode() { // setMaterialCode() {
// const chooseM = this.materialList.filter(item => { // const chooseM = this.materialList.filter(item => {
// return item.id === this.dataForm.materialId // return item.id === this.dataForm.materialId

View File

@@ -58,10 +58,6 @@ export default {
this.dataForm.detId = response.data.detIdList this.dataForm.detId = response.data.detIdList
this.getWorksectionById(this.dataForm.lineId) this.getWorksectionById(this.dataForm.lineId)
this.dataForm.logTime = new Date(response.data.logTime) this.dataForm.logTime = new Date(response.data.logTime)
// if (this.setData) {
// this.setDataForm()
// }
}); });
} else { } else {
if (this.urlOptions.isGetCode) { if (this.urlOptions.isGetCode) {

View File

@@ -24,7 +24,7 @@ export default {
}, },
tableData: [], tableData: [],
listQuery: { listQuery: {
pageSize: 10, pageSize: 20,
pageNo: 1, pageNo: 1,
total: 1, total: 1,
}, },

View File

@@ -6,239 +6,322 @@
* @Description: * @Description:
--> -->
<template> <template>
<el-dialog :visible.sync="visible" width="50%"> <el-dialog
<small-title slot="title" :no-padding="true"> :visible.sync="visible"
{{ '详情' }} width="50%">
</small-title> <small-title
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()" slot="title"
label-width="auto"> :no-padding="true">
<el-row :gutter="24"> {{ '详情' }}
<el-col :span="8"> </small-title>
<el-form-item label="工单号" prop="workOrderId"> <el-form
<el-select disabled v-model="dataForm.workOrderId" placeholder="请选择工单号"> :model="dataForm"
<el-option v-for="dict in workOrderList" :key="dict.id" :label="dict.name" :value="dict.id" /> :rules="dataRule"
</el-select> ref="dataForm"
</el-form-item> @keyup.enter.native="dataFormSubmit()"
</el-col> label-width="auto">
<el-col :span="8"> <el-row :gutter="24">
<el-form-item label="数量" prop="num"> <el-col :span="8">
<el-input disabled v-model="dataForm.num" placeholder="请输入数量" /> <el-form-item
</el-form-item> label="工单号"
</el-col> prop="workOrderId">
<el-col :span="8"> <el-select
<el-form-item label="报废时间" prop="logTime"> disabled
<el-date-picker disabled v-model="dataForm.logTime" type="datetime" value-format="yyyy-MM-dd HH:mm:ss" v-model="dataForm.workOrderId"
placeholder="选择日期"> placeholder="选择工单号"
</el-date-picker> style="width: 100%">
</el-form-item> <el-option
</el-col> v-for="dict in workOrderList"
</el-row> :key="dict.id"
<el-row :gutter="20"> :label="dict.name"
<el-col :span="8"> :value="dict.id" />
<el-form-item label="产线" prop="lineId"> </el-select>
<el-select disabled v-model="dataForm.lineId" placeholder="请选择产线" @change="getWorksectionById"> </el-form-item>
<el-option v-for="dict in lineList" :key="dict.id" :label="dict.name" :value="dict.id" /> </el-col>
</el-select> <el-col :span="8">
</el-form-item> <el-form-item
</el-col> label="数量"
<el-col :span="8"> prop="num">
<el-form-item label="工段" prop="sectionId"> <el-input
<el-select v-model="dataForm.sectionId" placeholder="请选择工段" disabled> disabled
<el-option v-for="dict in sectionList" :key="dict.id" :label="dict.name" :value="dict.id" /> v-model="dataForm.num"
</el-select> placeholder="请输入数量"
</el-form-item> style="width: 100%" />
</el-col> </el-form-item>
<el-col :span="8"> </el-col>
<el-form-item label="报废原因" prop="detId"> <el-col :span="8">
<el-select v-model="dataForm.detId" placeholder="请选择报废原因" multiple disabled> <el-form-item
<el-option v-for="dict in detList" :key="dict.id" :label="dict.name" :value="dict.id" /> label="报废时间"
</el-select> prop="logTime"
</el-form-item> style="width: 100%">
</el-col> <el-date-picker
</el-row> disabled
<el-row :gutter="20"> v-model="dataForm.logTime"
<el-col :span="24"> type="datetime"
<el-form-item label="描述" prop="description"> value-format="yyyy-MM-dd HH:mm:ss"
<el-input v-model="dataForm.description" type="textarea" :rows="4" placeholder="请输入描述" /> placeholder="选择日期"></el-date-picker>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-col :span="8"> <el-row :gutter="20">
<el-form-item label="备注" prop="remark"> <el-col :span="8">
<el-input v-model="dataForm.remark" placeholder="备注" /> <el-form-item
</el-form-item> label="产线"
</el-col> prop="lineId">
</el-form> <el-select
</el-dialog> disabled
v-model="dataForm.lineId"
placeholder="请选择产线"
@change="getWorksectionById"
style="width: 100%">
<el-option
v-for="dict in lineList"
:key="dict.id"
:label="dict.name"
:value="dict.id" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item
label="工段"
prop="sectionId">
<el-select
v-model="dataForm.sectionId"
placeholder="请选择工段"
disabled
style="width: 100%">
<el-option
v-for="dict in sectionList"
:key="dict.id"
:label="dict.name"
:value="dict.id" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item
label="报废原因"
prop="detId">
<el-select
v-model="dataForm.detId"
placeholder="请选择报废原因"
multiple
disabled
style="width: 100%">
<el-option
v-for="dict in detList"
:key="dict.id"
:label="dict.name"
:value="dict.id" />
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="24">
<el-form-item
label="描述"
prop="description">
<el-input
v-model="dataForm.description"
type="textarea"
:rows="4"
placeholder="请输入描述" />
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item
label="备注"
prop="remark">
<el-input
v-model="dataForm.remark"
placeholder="备注" />
</el-form-item>
</el-col>
</el-row>
</el-form>
</el-dialog>
</template> </template>
<script> <script>
import basicAdd from './basic-add'; import basicAdd from './basic-add';
import { import {
createQualityScrapLog, updateQualityScrapLog, getQualityScrapLog, getWorkOrderList, createQualityScrapLog,
getTeamList, getDetList,getLineList } from "@/api/base/qualityScrapLog"; updateQualityScrapLog,
import { getList,} from "@/api/base/qualityScrapType"; getQualityScrapLog,
getWorkOrderList,
getTeamList,
getDetList,
getLineList,
} from '@/api/base/qualityScrapLog';
import { getList } from '@/api/base/qualityScrapType';
import SmallTitle from './SmallTitle'; import SmallTitle from './SmallTitle';
export default { export default {
components: { components: {
SmallTitle, SmallTitle,
}, },
mixins: [basicAdd], mixins: [basicAdd],
data() { data() {
return { return {
urlOptions: { urlOptions: {
isGetCode: false, isGetCode: false,
// codeURL: getCode, // codeURL: getCode,
createURL: createQualityScrapLog, createURL: createQualityScrapLog,
updateURL: updateQualityScrapLog, updateURL: updateQualityScrapLog,
infoURL: getQualityScrapLog, infoURL: getQualityScrapLog,
}, },
lineList:[], lineList: [],
typeList: [], typeList: [],
workOrderList: [], workOrderList: [],
detList:[], detList: [],
teamList: [], teamList: [],
sourceList: [ sourceList: [
{ {
id: 1, id: 1,
name: '手动', name: '手动',
}, },
{ {
id: 2, id: 2,
name: '自动', name: '自动',
} },
], ],
sectionList:[], sectionList: [],
visible:false, visible: false,
dataForm: { dataForm: {
id: undefined, id: undefined,
logTime: undefined, logTime: undefined,
source:1, source: 1,
detId: undefined, detId: undefined,
workOrderId: null, workOrderId: null,
teamId: undefined, teamId: undefined,
num: undefined, num: undefined,
lineId:undefined, lineId: undefined,
description:undefined, description: undefined,
// description: undefined, // description: undefined,
remark: undefined, remark: undefined,
}, },
// materialList: [], // materialList: [],
dataRule: { dataRule: {
// materialId: [{ required: true, message: "", trigger: "blur" }], // materialId: [{ required: true, message: "", trigger: "blur" }],
workOrderId: [{ required: true, message: "工单号不能为空", trigger: "change" }], workOrderId: [
num: [{ required: true, message: "数量不能为空", trigger: "blur" }], { required: true, message: '工单号不能为空', trigger: 'change' },
detId: [{ required: true, message: "报废原因不能为空", trigger: "change" }], ],
num: [{ required: true, message: '数量不能为空', trigger: 'blur' }],
detId: [
{ required: true, message: '报废原因不能为空', trigger: 'change' },
],
logTime: [{ required: true, message: "报废时间不能为空", trigger: "change" }], logTime: [
} { required: true, message: '报废时间不能为空', trigger: 'change' },
],
},
}; };
}, },
mounted() { mounted() {
this.getDict() this.getDict();
console.log('我看看', this.dataForm) console.log('我看看', this.dataForm);
// this.getCurrentTime() // this.getCurrentTime()
}, },
methods: { methods: {
// init() { // init() {
// this.dialogVisible = true // this.dialogVisible = true
// }, // },
// getCurrentTime() { // getCurrentTime() {
// // new Date().Format("yyyy-MM-dd HH:mm:ss") // // new Date().Format("yyyy-MM-dd HH:mm:ss")
// this.dataForm.logTime = new Date() // this.dataForm.logTime = new Date()
// // this.dataForm.logTime = year + "-" + month + "-" + day; // // this.dataForm.logTime = year + "-" + month + "-" + day;
// console.log(this.dataForm.logTime); // console.log(this.dataForm.logTime);
// }, // },
async getDict() { async getDict() {
// 物料列表 // 物料列表
const res = await getList() const res = await getList();
this.typeList = res.data this.typeList = res.data;
getWorkOrderList().then((res) => { getWorkOrderList().then((res) => {
console.log(res); console.log(res);
// console.log(response); // console.log(response);
this.workOrderList = res.data.map((item) => { this.workOrderList = res.data.map((item) => {
return { return {
name: item.name, name: item.name,
id: item.id id: item.id,
} };
}) });
// console.log(this.formConfig[0].selectOptions); // console.log(this.formConfig[0].selectOptions);
// this.listQuery.total = response.data.total; // this.listQuery.total = response.data.total;
}) });
getLineList().then((res) => { getLineList().then((res) => {
console.log(res); console.log(res);
// console.log(response); // console.log(response);
this.lineList = res.data.map((item) => { this.lineList = res.data.map((item) => {
return { return {
name: item.name, name: item.name,
id: item.id id: item.id,
} };
}) });
// console.log(this.formConfig[0].selectOptions); // console.log(this.formConfig[0].selectOptions);
// this.listQuery.total = response.data.total; // this.listQuery.total = response.data.total;
}) });
getDetList().then((res) => { getDetList().then((res) => {
console.log(res); console.log(res);
// console.log(response); // console.log(response);
this.detList = res.data.map((item) => { this.detList = res.data.map((item) => {
return { return {
name: item.content, name: item.content,
id: item.id id: item.id,
} };
}) });
// console.log(this.formConfig[0].selectOptions); // console.log(this.formConfig[0].selectOptions);
// this.listQuery.total = response.data.total; // this.listQuery.total = response.data.total;
}) });
getTeamList().then((res) => { getTeamList().then((res) => {
console.log(res); console.log(res);
// console.log(response); // console.log(response);
this.teamList = res.data.map((item) => { this.teamList = res.data.map((item) => {
return { return {
name: item.name, name: item.name,
id: item.id id: item.id,
} };
}) });
// console.log(this.formConfig[0].selectOptions); // console.log(this.formConfig[0].selectOptions);
// this.listQuery.total = response.data.total; // this.listQuery.total = response.data.total;
}) });
}, },
async getWorksectionById(lineId) { async getWorksectionById(lineId) {
if (lineId) { if (lineId) {
const { code, data } = await this.$axios({ const { code, data } = await this.$axios({
url: '/base/core-workshop-section/listByParentId', url: '/base/core-workshop-section/listByParentId',
method: 'get', method: 'get',
params: { params: {
id: lineId, id: lineId,
}, },
}); });
if (code == 0) { if (code == 0) {
console.log(data) console.log(data);
this.sectionList = data.map((item) => { this.sectionList = data.map((item) => {
return { return {
name: item.name, name: item.name,
id: item.id, id: item.id,
}; };
}); });
} }
} else { } else {
this.$axios({ this.$axios({
url: '/base/core-workshop-section/listAll', url: '/base/core-workshop-section/listAll',
method: 'get', method: 'get',
// params: { // params: {
// id: lineId, // id: lineId,
// }, // },
}).then((res) => { }).then((res) => {
// console.log(data) // console.log(data)
this.sectionList = res.data.map((item) => { this.sectionList = res.data.map((item) => {
return { return {
name: item.name, name: item.name,
id: item.id, id: item.id,
}; };
}); });
}) });
} }
}, },
}, },
}; };
</script> </script>

View File

@@ -1,19 +1,45 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<search-bar :formConfigs="formConfig" ref="searchBarForm" @headBtnClick="buttonClick" /> <search-bar
<base-table :max-height="tableH" v-loading="dataListLoading" :table-props="tableProps" :page="listQuery.pageNo" :formConfigs="formConfig"
:limit="listQuery.pageSize" :table-data="tableData"> ref="searchBarForm"
<method-btn v-if="tableBtn.length" slot="handleBtn" :width="120" label="操作" :method-list="tableBtn" @headBtnClick="buttonClick" />
@clickBtn="handleClick" /> <base-table
</base-table> :max-height="tableH"
<pagination :limit.sync="listQuery.pageSize" :page.sync="listQuery.pageNo" :total="listQuery.total" v-loading="dataListLoading"
@pagination="getDataList" /> :table-props="tableProps"
<base-dialog :dialogTitle="addOrEditTitle" :dialogVisible="addOrUpdateVisible" @cancel="handleCancel" :page="listQuery.pageNo"
@confirm="handleConfirm" :before-close="handleCancel" width="50%"> :limit="listQuery.pageSize"
<add-or-update ref="addOrUpdate" @refreshDataList="successSubmit"></add-or-update> :table-data="tableData">
</base-dialog> <method-btn
<detail-or-update v-if="detailOrUpdateVisible" ref="detailOrUpdate" @refreshDataList="successSubmit" /> v-if="tableBtn.length"
</div> slot="handleBtn"
:width="120"
label="操作"
:method-list="tableBtn"
@clickBtn="handleClick" />
</base-table>
<pagination
:limit.sync="listQuery.pageSize"
:page.sync="listQuery.pageNo"
:total="listQuery.total"
@pagination="getDataList" />
<base-dialog
:dialogTitle="addOrEditTitle"
:dialogVisible="addOrUpdateVisible"
@cancel="handleCancel"
@confirm="handleConfirm"
:before-close="handleCancel"
width="50%">
<add-or-update
ref="addOrUpdate"
@refreshDataList="successSubmit"></add-or-update>
</base-dialog>
<detail-or-update
v-if="detailOrUpdateVisible"
ref="detailOrUpdate"
@refreshDataList="successSubmit" />
</div>
</template> </template>
<script> <script>
@@ -23,201 +49,211 @@ import tableHeightMixin from '@/mixins/lb/tableHeightMixin';
import basicPage from './basic-page'; import basicPage from './basic-page';
import { parseTime } from '../../../core/mixins/code-filter'; import { parseTime } from '../../../core/mixins/code-filter';
import { import {
getQualityScrapLogPage, getQualityScrapLogPage,
deleteQualityScrapLog, deleteQualityScrapLog,
getWorkOrderList, getWorkOrderList,
// getTeamList // getTeamList
} from '@/api/base/qualityScrapLog'; } from '@/api/base/qualityScrapLog';
const tableProps = [ const tableProps = [
// {
// prop: 'createTime',
// label: '添加时间',
// filter: parseTime
// },
{
prop: 'createTime',
label: '报废时间',
filter: parseTime
},
{
prop: 'lineName',
label: '产线名称'
},
{
prop: 'sectionName',
label: '工段'
},
{
prop: 'workOrderName',
label: '工单名称'
},
{
prop: 'num',
label: '数量'
},
{ {
prop: 'detContent', prop: 'createTime',
label: '报废原因' label: '报废时间',
}, filter: parseTime,
{ width: 160,
prop: 'source', },
label: '来源', {
filter: (val) => val == 1 ? '平板端' : '网页端' prop: 'lineName',
}, label: '产线名称',
width: 90,
},
{
prop: 'sectionName',
label: '工段',
minWidth: 100,
},
{
prop: 'workOrderName',
label: '工单名称',
minWidth: 160,
},
{
prop: 'num',
label: '数量',
width: 90,
},
{
prop: 'detContent',
label: '报废原因',
minWidth: 160,
},
{
prop: 'source',
label: '来源',
filter: (val) => ['', '平板端', '网页端'][val],
width: 90,
},
]; ];
export default { export default {
mixins: [basicPage, tableHeightMixin], mixins: [basicPage, tableHeightMixin],
data() { data() {
return { return {
urlOptions: { urlOptions: {
getDataListURL: getQualityScrapLogPage, getDataListURL: getQualityScrapLogPage,
deleteURL: deleteQualityScrapLog, deleteURL: deleteQualityScrapLog,
// exportURL: exportFactoryExcel, // exportURL: exportFactoryExcel,
}, },
tableProps, tableProps,
tableBtn: [ tableBtn: [
this.$auth.hasPermi(`base:quality-scrap-log:update`) this.$auth.hasPermi(`base:quality-scrap-log:update`)
? { ? {
type: 'edit', type: 'edit',
btnName: '编辑', btnName: '编辑',
} }
: undefined, : undefined,
this.$auth.hasPermi(`base:quality-scrap-log:detail`) this.$auth.hasPermi(`base:quality-scrap-log:detail`)
? { ? {
type: 'detail', type: 'detail',
btnName: '详情', btnName: '详情',
} }
: undefined, : undefined,
this.$auth.hasPermi(`base:quality-scrap-log:delete`) this.$auth.hasPermi(`base:quality-scrap-log:delete`)
? { ? {
type: 'delete', type: 'delete',
btnName: '删除', btnName: '删除',
} }
: undefined, : undefined,
].filter((v)=>v), ].filter((v) => v),
tableData: [], tableData: [],
detailOrUpdateVisible:false, detailOrUpdateVisible: false,
formConfig: [ formConfig: [
{
type: 'select',
label: '工单',
selectOptions: [],
labelField: 'name',
valueField: 'id',
param: 'workOrderId',
filterable: true
},
// {
// type: 'select',
// label: '班组',
// selectOptions: [],
// labelField: 'name',
// valueField: 'id',
// param: 'teamId',
// filterable: true
// },
{ {
type: this.$auth.hasPermi('base:quality-scrap-det:query') ? 'button' : '', type: 'select',
label: '工单',
selectOptions: [],
labelField: 'name',
valueField: 'id',
param: 'workOrderId',
filterable: true,
},
// {
// type: 'select',
// label: '班组',
// selectOptions: [],
// labelField: 'name',
// valueField: 'id',
// param: 'teamId',
// filterable: true
// },
{
type: this.$auth.hasPermi('base:quality-scrap-det:query')
? 'button'
: '',
btnName: '查询', btnName: '查询',
name: 'search', name: 'search',
color: 'primary', color: 'primary',
}, },
{ {
type: this.$auth.hasPermi('base:quality-scrap-det:create') ? 'separate' : '', type: this.$auth.hasPermi('base:quality-scrap-det:create')
? 'separate'
: '',
// type: 'separate', // type: 'separate',
}, },
{ {
type: this.$auth.hasPermi('base:quality-scrap-det:create') ? 'button' : '', type: this.$auth.hasPermi('base:quality-scrap-det:create')
? 'button'
: '',
btnName: '新增', btnName: '新增',
name: 'add', name: 'add',
color: 'success', color: 'success',
plain: true plain: true,
}, },
], ],
}; };
}, },
components: { components: {
AddOrUpdate, AddOrUpdate,
DetailOrUpdate DetailOrUpdate,
}, },
mounted() { mounted() {
this.getDict() this.getDict();
this.getDataList() this.getDataList();
}, },
methods: { methods: {
otherMethods(val) { otherMethods(val) {
if (val.type === 'detail') { if (val.type === 'detail') {
this.detailOrUpdateVisible = true; this.detailOrUpdateVisible = true;
// this.addOrEditTitle = "详情"; // this.addOrEditTitle = "详情";
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.detailOrUpdate.init(val.data.id, true); this.$refs.detailOrUpdate.init(val.data.id, true);
}); });
} }
}, },
deleteHandle(id, name, index, data) { deleteHandle(id, name, index, data) {
this.$confirm(`确认要删除序号为${index}的数据项?`, "提示", { this.$confirm(`确认要删除序号为${index}的数据项?`, '提示', {
confirmButtonText: "确定", confirmButtonText: '确定',
cancelButtonText: "取消", cancelButtonText: '取消',
type: "warning", type: 'warning',
}) })
.then(() => { .then(() => {
this.urlOptions.deleteURL(id).then(({ data }) => { this.urlOptions.deleteURL(id).then(({ data }) => {
this.$message({ this.$message({
message: "操作成功", message: '操作成功',
type: "success", type: 'success',
duration: 1500, duration: 1500,
onClose: () => { onClose: () => {
this.getDataList(); this.getDataList();
}, },
}); });
}); });
}) })
.catch(() => { }); .catch(() => {});
}, },
// 获取数据列表 // 获取数据列表
getDict() { getDict() {
getWorkOrderList().then((res) => { getWorkOrderList().then((res) => {
console.log(res); console.log(res);
// console.log(response); // console.log(response);
this.formConfig[0].selectOptions = res.data.map((item) => { this.formConfig[0].selectOptions = res.data.map((item) => {
return { return {
name: item.name, name: item.name,
id: item.id id: item.id,
} };
}) });
// console.log(this.formConfig[0].selectOptions); // console.log(this.formConfig[0].selectOptions);
// this.listQuery.total = response.data.total; // this.listQuery.total = response.data.total;
}) });
// getTeamList().then((res) => { // getTeamList().then((res) => {
// console.log(res); // console.log(res);
// // console.log(response); // // console.log(response);
// this.formConfig[1].selectOptions = res.data.map((item) => { // this.formConfig[1].selectOptions = res.data.map((item) => {
// return { // return {
// name: item.name, // name: item.name,
// id: item.id // id: item.id
// } // }
// }) // })
// // console.log(this.formConfig[0].selectOptions); // // console.log(this.formConfig[0].selectOptions);
// // this.listQuery.total = response.data.total; // // this.listQuery.total = response.data.total;
// }) // })
}, },
getDataList() { getDataList() {
this.dataListLoading = true; this.dataListLoading = true;
this.urlOptions.getDataListURL(this.listQuery).then(response => { this.urlOptions.getDataListURL(this.listQuery).then((response) => {
this.tableData = response.data.list; this.tableData = response.data.list;
this.listQuery.total = response.data.total; this.listQuery.total = response.data.total;
this.dataListLoading = false; this.dataListLoading = false;
}); });
}, },
buttonClick(val) { buttonClick(val) {
switch (val.btnName) { switch (val.btnName) {
case 'search': case 'search':
this.listQuery.pageNo = 1; this.listQuery.pageNo = 1;
this.listQuery.pageSize = 20; this.listQuery.pageSize = 20;
this.listQuery.workOrderId = val.workOrderId ? val.workOrderId : undefined; this.listQuery.workOrderId = val.workOrderId
// this.listQuery.teamId = val.teamId ? val.teamId : undefined; ? val.workOrderId
: undefined;
// this.listQuery.teamId = val.teamId ? val.teamId : undefined;
this.getDataList(); this.getDataList();
break; break;
case 'reset': case 'reset':
@@ -227,7 +263,7 @@ export default {
pageNo: 1, pageNo: 1,
total: 1, total: 1,
}; };
this.getDataList() this.getDataList();
break; break;
case 'add': case 'add':
this.addOrEditTitle = '新增'; this.addOrEditTitle = '新增';

View File

@@ -2,7 +2,7 @@
* @Author: zwq * @Author: zwq
* @Date: 2023-08-01 14:55:51 * @Date: 2023-08-01 14:55:51
* @LastEditors: DY * @LastEditors: DY
* @LastEditTime: 2024-04-26 09:58:51 * @LastEditTime: 2024-04-29 15:25:52
* @Description: * @Description:
--> -->
<template> <template>
@@ -47,7 +47,7 @@
</el-form> </el-form>
<!-- <base-table :max-height="tableH" :table-props="tableProps" :page="listQuery.pageNo" :limit="listQuery.pageSize" <!-- <base-table :max-height="tableH" :table-props="tableProps" :page="listQuery.pageNo" :limit="listQuery.pageSize"
:table-data="list"> --> :table-data="list"> -->
<base-table :max-height="tableH" :table-props="tableProps" <base-table :max-height="tableH" :table-props="tableProps" :page="1" :limit="100"
:table-data="list"> :table-data="list">
<method-btn v-if="tableBtn.length" slot="handleBtn" :width="220" label="缺陷操作" :method-list="tableBtn" <method-btn v-if="tableBtn.length" slot="handleBtn" :width="220" label="缺陷操作" :method-list="tableBtn"
@clickBtn="handleClick" /> @clickBtn="handleClick" />
@@ -142,6 +142,7 @@ const tableProps = [
export default { export default {
// mixins: [basicPage], // mixins: [basicPage],
mixins: [tableHeightMixin], mixins: [tableHeightMixin],
name: 'originalGlassRetrace',
data() { data() {
return { return {
lineOptions: [], lineOptions: [],
@@ -282,12 +283,31 @@ export default {
handleClick(raw) { handleClick(raw) {
if (raw.type === 'detail1') { if (raw.type === 'detail1') {
// 原片缺陷 // 原片缺陷
// console.log('你好', raw.data._pageIndex)
// const tempArray = this?.list[raw.data._pageIndex]
// console.log('你好tempArray', tempArray)
// let startTime = raw.data.originalGlassOutputTime
// if (tempArray) {
// startTime = tempArray.originalGlassOutputTime
// }
// console.log('你好', parseTime(raw.data.originalGlassOutputTime))
const startTime = new Date(raw.data.originalGlassOutputTime)
const endTime = new Date(raw.data.originalGlassOutputTime)
startTime.setHours(startTime.getHours() - 1)
startTime.setMinutes(0)
startTime.setSeconds(0)
endTime.setHours(endTime.getHours() + 1)
endTime.setMinutes(0)
// endTime.setSeconds(0)
// console.log('设置时间', startTime, parseTime(startTime))
// console.log('设置时间11', endTime, parseTime(endTime))
this.$router.push({ this.$router.push({
path: '/quality/base/quality-isra', path: '/quality/base/quality-isra',
query: { query: {
// deepProcessingLineId: raw.data.deepProcessingLineId, // deepProcessingLineId: raw.data.deepProcessingLineId,
lineName: raw.data.deepProcessingLineName, lineName: raw.data.deepProcessingLineName,
originalGlassOutputTime: raw.data.originalGlassOutputTime endTime: endTime,
startTime: startTime
}, },
}); });
} else { } else {
@@ -328,7 +348,11 @@ export default {
} else { } else {
if (this.useTime === true) { if (this.useTime === true) {
if (this.listQuery.packTime !== null && this.listQuery.packTime !== '' && this.listQuery.lineName !== null && this.listQuery.lineName !== '') { if (this.listQuery.packTime !== null && this.listQuery.packTime !== '' && this.listQuery.lineName !== null && this.listQuery.lineName !== '') {
getOriginalGlassRetrace({ ...this.listQuery }).then(res => {
getOriginalGlassRetrace({
lineNameList: [this.listQuery.lineName],
...this.listQuery
}).then(res => {
console.log(res); console.log(res);
this.list = res.data || [] this.list = res.data || []
console.log(this.list); console.log(this.list);

View File

@@ -1,26 +1,52 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<!-- 搜索工作栏 --> <!-- 搜索工作栏 -->
<SearchBar :isFold="true" :formConfigs="searchBarFormConfig" ref="search-bar" <SearchBar
@headBtnClick="handleSearchBarBtnClick" /> :isFold="true"
:formConfigs="searchBarFormConfig"
ref="search-bar"
@headBtnClick="handleSearchBarBtnClick" />
<!-- 列表 --> <!-- 列表 -->
<base-table :table-props="tableProps" :page="queryParams.pageNo" :limit="queryParams.pageSize" :table-data="list" <base-table
@emitFun="handleEmitFun"> :table-props="tableProps"
<method-btn v-if="tableBtn.length" slot="handleBtn" label="操作" :width="120" fixed="right" :method-list="tableBtn" :page="queryParams.pageNo"
@clickBtn="handleTableBtnClick" /> :limit="queryParams.pageSize"
</base-table> :table-data="list"
@emitFun="handleEmitFun"
:max-height="tableH">
<method-btn
v-if="tableBtn.length"
slot="handleBtn"
label="操作"
:width="90"
fixed="right"
:method-list="tableBtn"
@clickBtn="handleTableBtnClick" />
</base-table>
<!-- 分页组件 --> <!-- 分页组件 -->
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize" <pagination
@pagination="getList" /> v-show="total > 0"
:total="total"
:page.sync="queryParams.pageNo"
:limit.sync="queryParams.pageSize"
@pagination="getList" />
<!-- 对话框(添加 / 修改) --> <!-- 对话框(添加 / 修改) -->
<base-dialog :dialogTitle="title" :dialogVisible="open" width="50%" @close="cancel" @cancel="cancel" <base-dialog
@confirm="submitForm"> :dialogTitle="title"
<DialogForm v-if="open" ref="form" v-model="form" /> :dialogVisible="open"
</base-dialog> width="50%"
</div> @close="cancel"
@cancel="cancel"
@confirm="submitForm">
<DialogForm
v-if="open"
ref="form"
v-model="form" />
</base-dialog>
</div>
</template> </template>
<script> <script>
@@ -37,27 +63,34 @@ import moment from 'moment';
import DialogForm from './dialogForm.vue'; import DialogForm from './dialogForm.vue';
import basicPageMixin from '@/mixins/lb/basicPageMixin'; import basicPageMixin from '@/mixins/lb/basicPageMixin';
import tableHeightMixin from '@/mixins/lb/tableHeightMixin';
export default { export default {
name: 'QualityInspectionRecord', name: 'QualityInspectionRecord',
components: { components: {
DialogForm, DialogForm,
}, },
mixins: [basicPageMixin], mixins: [basicPageMixin, tableHeightMixin],
data() { data() {
return { return {
rows: [ rows: [
[ [
{ {
select: true, select: true,
label: '工单名称', label: '工单名称',
url: 'base/core-work-order/listbyfilter', url: 'base/core-work-order/listbyfilter',
prop: 'workOrderId', prop: 'workOrderId',
rules: [{ required: true, message: '工单名称不能为空', trigger: 'change' }], rules: [
bind: { {
filterable: true, required: true,
}, message: '工单名称不能为空',
} trigger: 'change',
], },
],
bind: {
filterable: true,
},
},
],
[ [
{ {
select: true, select: true,
@@ -65,7 +98,9 @@ export default {
url: '/base/quality-inspection-det/listAll', url: '/base/quality-inspection-det/listAll',
prop: 'inspectionDetId', prop: 'inspectionDetId',
labelKey: 'content', labelKey: 'content',
rules: [{ required: true, message: '检测内容不能为空', trigger: 'blur' }], rules: [
{ required: true, message: '检测内容不能为空', trigger: 'blur' },
],
bind: { bind: {
filterable: true, filterable: true,
}, },
@@ -93,7 +128,9 @@ export default {
bind: { bind: {
filterable: true, filterable: true,
}, },
rules: [{ required: true, message: '产线不能为空', trigger: 'blur' }], rules: [
{ required: true, message: '产线不能为空', trigger: 'blur' },
],
}, },
{ {
select: true, select: true,
@@ -113,7 +150,6 @@ export default {
label: '检测人员', label: '检测人员',
prop: 'checkPerson', prop: 'checkPerson',
}, },
], ],
[{ textarea: true, label: '描述', prop: 'explainText' }], [{ textarea: true, label: '描述', prop: 'explainText' }],
[{ input: true, label: '备注', prop: 'remark' }], [{ input: true, label: '备注', prop: 'remark' }],
@@ -121,32 +157,32 @@ export default {
searchBarFormConfig: [ searchBarFormConfig: [
{ {
type: 'select', type: 'select',
label: '工单名称', label: '工单名称',
placeholder: '请选择工单名称', placeholder: '请选择工单名称',
param: 'workOrderId', param: 'workOrderId',
selectOptions: [], selectOptions: [],
filterable:true filterable: true,
}, },
{ {
type: 'select', type: 'select',
label: '检测内容', label: '检测内容',
placeholder: '请输入检测内容', placeholder: '请输入检测内容',
selectOptions: [], selectOptions: [],
param: 'inspectionDetContent', param: 'inspectionDetContent',
filterable: true filterable: true,
}, },
{ {
type: 'select', type: 'select',
label: '检测人员', label: '检测人员',
placeholder: '请选择检测人员', placeholder: '请选择检测人员',
selectOptions: [], selectOptions: [],
param: 'checkPerson', param: 'checkPerson',
filterable: true, filterable: true,
multiple:true, multiple: true,
}, },
{ {
type: 'datePicker', type: 'datePicker',
label: '时间', label: '检测时间',
dateType: 'daterange', // datetimerange dateType: 'daterange', // datetimerange
// format: 'yyyy-MM-dd HH:mm:ss', // format: 'yyyy-MM-dd HH:mm:ss',
format: 'yyyy-MM-dd', format: 'yyyy-MM-dd',
@@ -159,27 +195,21 @@ export default {
// width: 350, // width: 350,
}, },
{ {
type: this.$auth.hasPermi( type: this.$auth.hasPermi('base:quality-inspection-record:query')
'base:quality-inspection-record:query' ? 'button'
) : '',
? 'button'
: '',
btnName: '查询', btnName: '查询',
name: 'search', name: 'search',
color: 'primary', color: 'primary',
}, },
{ {
type: this.$auth.hasPermi( type: this.$auth.hasPermi('base:quality-inspection-record:create')
'base:quality-inspection-record:create' ? 'separate'
) : '',
? 'separate'
: '',
// type: 'separate', // type: 'separate',
}, },
{ {
type: this.$auth.hasPermi( type: this.$auth.hasPermi('base:quality-inspection-record:create')
'base:quality-inspection-record:create'
)
? 'button' ? 'button'
: '', : '',
btnName: '新增', btnName: '新增',
@@ -195,7 +225,7 @@ export default {
btnName: '修改', btnName: '修改',
} }
: undefined, : undefined,
this.$auth.hasPermi('base:quality-inspection-record:delete') this.$auth.hasPermi('base:quality-inspection-record:delete')
? { ? {
type: 'delete', type: 'delete',
btnName: '删除', btnName: '删除',
@@ -207,64 +237,66 @@ export default {
prop: 'createTime', prop: 'createTime',
label: '添加时间', label: '添加时间',
fixed: true, fixed: true,
width: 180, width: 160,
filter: (val) => moment(val).format('yyyy-MM-DD HH:mm:ss'), filter: (val) => moment(val).format('yyyy-MM-DD HH:mm:ss'),
}, },
{ {
// width: 128, prop: 'workOrderName',
prop: 'workOrderName', label: '工单名称',
label: '工单名称', minWidth: 180,
}, showOverflowtooltip: true,
{ },
// width: 128,
prop: 'productionLineName',
label: '产线',
},
{
// width: 128,
prop: 'sectionName',
label: '工段',
},
{ {
// width: 128,
prop: 'inspectionDetContent', prop: 'inspectionDetContent',
label: '检测内容', label: '检测内容',
minWidth: 180,
showOverflowtooltip: true,
},
{
prop: 'productionLineName',
label: '产线',
minWidth: 80,
},
{
prop: 'sectionName',
label: '工段',
minWidth: 120,
}, },
// {
// // width: 128,
// prop: 'productionLineName',
// label: '产线',
// },
{ {
// width: 128,
prop: 'checkPerson', prop: 'checkPerson',
label: '检测人员', label: '检测人员',
showOverflowtooltip: true,
}, },
{ {
// width: 160,
prop: 'checkTime', prop: 'checkTime',
label: '检测时间', label: '检测时间',
width: 160,
filter: (val) => filter: (val) =>
val != null ? moment(val).format('yyyy-MM-DD HH:mm:ss') : '-', val != null ? moment(val).format('yyyy-MM-DD HH:mm:ss') : '-',
}, },
{ {
width: 90,
prop: 'source', prop: 'source',
label: '来源', label: '来源',
filter: (val) => val == 1 ? '平板端' : '网页端', width: 80,
filter: (val) => ['', '平板端', '网页端'][val],
}, },
], ],
// 搜索框需要的 keys, 与上面 queryParams 的除 pageNo, pageSize 之外的 key 一一对应 // 搜索框需要的 keys, 与上面 queryParams 的除 pageNo, pageSize 之外的 key 一一对应
searchBarKeys: ['inspectionDetContent', 'checkTime', 'workOrderId','checkPerson'], searchBarKeys: [
'inspectionDetContent',
'checkTime',
'workOrderId',
'checkPerson',
],
form: { form: {
id: undefined, id: undefined,
// workOrderId:undefined, // workOrderId:undefined,
inspectionDetId: undefined, inspectionDetId: undefined,
inspectionDetContent: undefined, inspectionDetContent: undefined,
productionLineId: undefined, productionLineId: undefined,
sectionId: undefined, sectionId: undefined,
checkPerson: undefined, checkPerson: undefined,
workOrderId:undefined, workOrderId: undefined,
checkTime: undefined, checkTime: undefined,
source: undefined, source: undefined,
explainText: undefined, explainText: undefined,
@@ -273,26 +305,26 @@ export default {
// 查询参数 // 查询参数
queryParams: { queryParams: {
pageNo: 1, pageNo: 1,
pageSize: 10, pageSize: 20,
workOrderId:null, workOrderId: null,
inspectionDetContent: null, inspectionDetContent: null,
checkTime: [], checkTime: [],
checkPerson:undefined, checkPerson: undefined,
// productionLineId: null, // productionLineId: null,
}, },
}; };
}, },
created() { created() {
this.getList(); this.getList();
this.getProductLineList() this.getProductLineList();
}, },
watch: { watch: {
form: { form: {
handler: function (val) { handler: function (val) {
console.log('form change:', val); console.log('form change:', val);
}, },
deep: true deep: true,
} },
// 注册弹窗里产线改变时的监听事件 // 注册弹窗里产线改变时的监听事件
// 'form.productionLineId': { // 'form.productionLineId': {
// handler: function (val) { // handler: function (val) {
@@ -318,29 +350,29 @@ export default {
// }, // },
}, },
methods: { methods: {
/** 获取搜索栏的产线列表 */ /** 获取搜索栏的产线列表 */
deleteHandle(id, name, index, data) { deleteHandle(id, name, index, data) {
this.$confirm(`确认要删除序号为${index}的数据项?`, "提示", { this.$confirm(`确认要删除序号为${index}的数据项?`, '提示', {
confirmButtonText: "确定", confirmButtonText: '确定',
cancelButtonText: "取消", cancelButtonText: '取消',
type: "warning", type: 'warning',
}) })
.then(() => { .then(() => {
this.urlOptions.deleteURL(id).then(({ data }) => { this.urlOptions.deleteURL(id).then(({ data }) => {
this.$message({ this.$message({
message: "操作成功", message: '操作成功',
type: "success", type: 'success',
duration: 1500, duration: 1500,
onClose: () => { onClose: () => {
this.getDataList(); this.getDataList();
}, },
}); });
}); });
}) })
.catch(() => { }); .catch(() => {});
}, },
getProductLineList() { getProductLineList() {
this.$axios('/base/core-work-order/listbyfilter').then((response) => { this.$axios('/base/core-work-order/listbyfilter').then((response) => {
this.searchBarFormConfig[0].selectOptions = response.data.map( this.searchBarFormConfig[0].selectOptions = response.data.map(
(item) => { (item) => {
return { return {
@@ -349,34 +381,36 @@ export default {
}; };
} }
); );
}) });
this.$axios('/base/quality-inspection-det/listAll').then((response) => { this.$axios('/base/quality-inspection-det/listAll').then((response) => {
this.searchBarFormConfig[1].selectOptions = response.data.map( this.searchBarFormConfig[1].selectOptions = response.data.map(
(item) => { (item) => {
return { return {
name: item.content, name: item.content,
id: item.content, id: item.content,
}; };
} }
); );
}) });
this.$axios('base/quality-inspection-box-btn-auth/getUserList', { this.$axios('base/quality-inspection-box-btn-auth/getUserList', {
pageNo: 1, pageNo: 1,
pageSize: 999 pageSize: 999,
}).then((res) => { }).then((res) => {
// console.log(response); // console.log(response);
this.searchBarFormConfig[2].selectOptions = res.data.map((item) => ({ this.searchBarFormConfig[2].selectOptions = res.data.map((item) => ({
name: item.username, name: item.username,
id: item.username, id: item.username,
})); }));
}) });
}, },
/** 查询列表 */ /** 查询列表 */
getList() { getList() {
this.loading = true; this.loading = true;
// 执行查询 // 执行查询
let str = this.queryParams.checkPerson ? this.queryParams.checkPerson.join() :undefined let str = this.queryParams.checkPerson
this.queryParams.checkPerson = str ? this.queryParams.checkPerson.join()
: undefined;
this.queryParams.checkPerson = str;
getQualityInspectionRecordPage(this.queryParams).then((response) => { getQualityInspectionRecordPage(this.queryParams).then((response) => {
this.list = response.data.list; this.list = response.data.list;
this.total = response.data.total; this.total = response.data.total;
@@ -396,8 +430,8 @@ export default {
inspectionDetContent: undefined, inspectionDetContent: undefined,
sectionId: undefined, sectionId: undefined,
checkPerson: undefined, checkPerson: undefined,
checkTime: undefined, checkTime: undefined,
workOrderId:undefined, workOrderId: undefined,
source: undefined, source: undefined,
explainText: undefined, explainText: undefined,
remark: undefined, remark: undefined,
@@ -426,14 +460,14 @@ export default {
this.reset(); this.reset();
const id = row.id; const id = row.id;
getQualityInspectionRecord(id).then((response) => { getQualityInspectionRecord(id).then((response) => {
/** 因为后端返回的时间是时间戳格式,需转换 */ /** 因为后端返回的时间是时间戳格式,需转换 */
console.log(response.data); console.log(response.data);
const info = {} const info = {};
Object.keys(this.form).forEach(key => { Object.keys(this.form).forEach((key) => {
info[key] = response.data[key] info[key] = response.data[key];
}); });
this.form = info; this.form = info;
console.log(this.form); console.log(this.form);
this.open = true; this.open = true;
this.title = '修改质量检查信息记录表'; this.title = '修改质量检查信息记录表';
}); });
@@ -444,9 +478,9 @@ export default {
if (!valid) { if (!valid) {
return; return;
} }
// 修改的提交 // 修改的提交
let str = this.form.checkPerson ? this.form.checkPerson.join() : null let str = this.form.checkPerson ? this.form.checkPerson.join() : null;
this.form.checkPerson = str this.form.checkPerson = str;
if (this.form.id != null) { if (this.form.id != null) {
updateQualityInspectionRecord(this.form).then((response) => { updateQualityInspectionRecord(this.form).then((response) => {
this.$modal.msgSuccess('修改成功'); this.$modal.msgSuccess('修改成功');

View File

@@ -68,6 +68,7 @@ export default {
label: '生产线', label: '生产线',
selectOptions: [], selectOptions: [],
param: 'lineId', param: 'lineId',
multiple: true,
}, },
{ {
type: 'select', type: 'select',
@@ -104,6 +105,7 @@ export default {
label: '生产线', label: '生产线',
selectOptions: [], selectOptions: [],
param: 'lineId', param: 'lineId',
multiple: true,
}, },
{ {
type: 'select', type: 'select',
@@ -137,12 +139,12 @@ export default {
queryParams: { queryParams: {
startTime: '', startTime: '',
endTime: '', endTime: '',
lineId: '', lineId: [],
}, },
queryParams2: { queryParams2: {
startTime: '', startTime: '',
endTime: '', endTime: '',
lineId: '', lineId: [],
}, },
tableProp1, tableProp1,
tableProp: [], tableProp: [],
@@ -150,11 +152,11 @@ export default {
tableProp2: [], tableProp2: [],
tableData2: [], tableData2: [],
procedureName: [ procedureName: [
{ name: '压延(拉引量t)', ename: 'calenderingCapacity' }, // { name: '压延(拉引量t)', ename: 'calenderingCapacity' },
{ name: '优化切割(片)', ename: 'cuttingNum' }, { name: '优化切割(片)', ename: 'cuttingNum' },
{ name: '堆垛(片)', ename: 'unloadPieces' }, { name: '堆垛(片)', ename: 'unloadPieces' },
{ name: '堆垛(托)', ename: 'unloadCount' }, { name: '堆垛(托)', ename: 'unloadCount' },
{ name: '良品率(%)', ename: 'rate' }, { name: '优切良品率(%)', ename: 'rate' },
], ],
span: [], //表2第一列合并 span: [], //表2第一列合并
}; };
@@ -311,10 +313,10 @@ export default {
} else { } else {
if (data[i].lineName === data[i - 1].lineName) { if (data[i].lineName === data[i - 1].lineName) {
//相同产线,添加列 //相同产线,添加列
let startNum = 5 * (lineNum - 1); let startNum = 4 * (lineNum - 1);
let endNum = 5 * lineNum - 1; let endNum = 4 * lineNum - 1;
for (let k = startNum; k <= endNum; k++) { for (let k = startNum; k <= endNum; k++) {
let str = this.procedureName[k % 5]; let str = this.procedureName[k % 4];
tempData[k][data[i].timeStr] = data[i][str.ename]; tempData[k][data[i].timeStr] = data[i][str.ename];
} }
} else { } else {
@@ -356,9 +358,9 @@ export default {
// 合并第一列 // 合并第一列
objectSpanMethod({ row, column, rowIndex, columnIndex }) { objectSpanMethod({ row, column, rowIndex, columnIndex }) {
if (columnIndex === 0) { if (columnIndex === 0) {
if (rowIndex % 5 === 0) { if (rowIndex % 4 === 0) {
return { return {
rowspan: 5, rowspan: 4,
colspan: 1, colspan: 1,
}; };
} else { } else {
@@ -380,9 +382,17 @@ export default {
obj.lineName = data[i].lineName; obj.lineName = data[i].lineName;
obj.procedure = data[i].productDet[j].name; obj.procedure = data[i].productDet[j].name;
data[i].productDet[j].data.map((item) => { data[i].productDet[j].data.map((item) => {
obj[item.timeStr] = item.input || null; obj[item.timeStr] = item.output
? item.output
: item.input
? item.input
: null;
}); });
obj.sum = data[i].productDet[j].allInput; obj.sum = data[i].productDet[j].allOutput
? data[i].productDet[j].allOutput
: data[i].productDet[j].allInput
? data[i].productDet[j].allInput
: null;
this.tableData2.push(obj); this.tableData2.push(obj);
} }
} }
@@ -472,7 +482,7 @@ export default {
top: 0; top: 0;
left: 0; left: 0;
background-color: #ebeef5; background-color: #ebeef5;
transform: rotate(-70deg); transform: rotate(-63deg);
-webkit-transform-origin: top; -webkit-transform-origin: top;
transform-origin: top; transform-origin: top;
width: 1px; width: 1px;
@@ -480,11 +490,11 @@ export default {
.el-table thead.is-group tr:last-of-type th:nth-child(1):before { .el-table thead.is-group tr:last-of-type th:nth-child(1):before {
content: ''; content: '';
position: absolute; position: absolute;
height: 67px; height: 93px;
top: 0; top: 0;
left: 75px; left: 55px;
background-color: #ebeef5; background-color: #ebeef5;
transform: rotate(-70deg); transform: rotate(-63deg);
-webkit-transform-origin: top; -webkit-transform-origin: top;
transform-origin: top; transform-origin: top;
width: 1px; width: 1px;

View File

@@ -1,7 +1,7 @@
<!-- <!--
* @Author: Do not edit * @Author: Do not edit
* @Date: 2023-12-13 14:10:04 * @Date: 2023-12-13 14:10:04
* @LastEditTime: 2024-04-23 16:47:21 * @LastEditTime: 2024-04-26 15:59:39
* @LastEditors: DY * @LastEditors: DY
* @Description: * @Description:
--> -->
@@ -38,15 +38,15 @@
import { updateGlass, updateGlassRemark } from '@/api/report/glass'; import { updateGlass, updateGlassRemark } from '@/api/report/glass';
const cols = [ const cols = [
{
prop: 'lineName',
label: '生产线',
},
{ {
prop: 'xc', prop: 'xc',
label: '许昌安彩周原片生产汇总', label: '许昌安彩周原片生产汇总',
align: 'center', // align: '200px',
children: [ children: [
{
prop: 'lineName',
label: '生产线',
},
{ {
prop: 'm', prop: 'm',
label: '拉引量㎡', label: '拉引量㎡',
@@ -181,9 +181,9 @@ const cols = [
deep: true, deep: true,
handler(newv, oldv) { handler(newv, oldv) {
if (newv[0] !== '' && newv[0] !== undefined) { if (newv[0] !== '' && newv[0] !== undefined) {
this.cols[0].label = this.date + '(' + newv[0] + '-' + newv[1] + ')' this.cols[1].label = this.date + '(' + newv[0] + '-' + newv[1] + ')'
} else { } else {
this.cols[0].label = this.date this.cols[1].label = this.date
} }
} }
}, },
@@ -208,15 +208,15 @@ const cols = [
text2 = '上年' text2 = '上年'
text3 = '原片合计(片/年)' text3 = '原片合计(片/年)'
} }
this.cols[0].children[1].children[0].label = text1 this.cols[1].children[0].children[0].label = text1
this.cols[0].children[1].children[1].label = text2 this.cols[1].children[0].children[1].label = text2
this.cols[0].children[2].children[0].label = text1 this.cols[1].children[1].children[0].label = text1
this.cols[0].children[2].children[1].label = text2 this.cols[1].children[1].children[1].label = text2
this.cols[0].children[3].children[0].label = text1 this.cols[1].children[2].children[0].label = text1
this.cols[0].children[3].children[1].label = text2 this.cols[1].children[2].children[1].label = text2
this.cols[0].children[4].children[0].label = text1 this.cols[1].children[3].children[0].label = text1
this.cols[0].children[4].children[1].label = text2 this.cols[1].children[3].children[1].label = text2
this.cols[0].children[2].label = text3 this.cols[1].children[1].label = text3
} }
} }
}, },

View File

@@ -23,7 +23,7 @@
}" class="baseTable" :span-method="objectSpanMethod" :data="tableData" style="width: 100%"> }" class="baseTable" :span-method="objectSpanMethod" :data="tableData" style="width: 100%">
<el-table-column align="center" prop="" :label=" '配料日报' + time " width="120"> <el-table-column align="center" prop="" :label=" '配料日报' + time " width="120">
<el-table-column label="原料样式" align="right" width="150"> <el-table-column label="原料样式" align="right" width="150">
<el-table-column prop="className" label="时间" width="120"> <el-table-column prop="className" label="时间" width="150">
</el-table-column> </el-table-column>
</el-table-column> </el-table-column>
<el-table-column align="center" prop="putType" label="" width="180"> <el-table-column align="center" prop="putType" label="" width="180">
@@ -32,8 +32,7 @@
<el-table-column prop="activityName"></el-table-column> <el-table-column prop="activityName"></el-table-column>
<el-table-column prop="message"></el-table-column> <el-table-column prop="message"></el-table-column>
</el-table-column> --> </el-table-column> -->
<el-table-column align="center" style="text-align: center;" v-for="(item, index) in codeList " :prop="item" <el-table-column align="center" style="text-align: center;" v-for="(item, index) in codeList " :key="index" :prop="item" :label="item">
:label="item">
<!-- <template slot-scope="scope"> <!-- <template slot-scope="scope">
<el-col :span="12"> <el-col :span="12">
{{ codeList[index] }} {{ codeList[index] }}
@@ -170,7 +169,7 @@ export default {
mounted() { mounted() {
// this.formConfig[1].defaultSelect[] // this.formConfig[1].defaultSelect[]
this.listQuery.startTime = Date.now() this.listQuery.startTime = Date.now()
this.time = moment(new Date((Date.now())).setHours(8, 0, 0, 0)).format('YYYY-MM-DD HH:mm:ss') + moment(new Date(Date.now() + 24*60*60*1000).setHours(8, 0, 0, 0)).format('YYYY-MM-DD HH:mm:ss') this.time = moment(new Date((Date.now())).setHours(8, 0, 0)).format('YYYY-MM-DD HH:mm:ss') + moment(new Date(Date.now() + 24*60*60*1000).setHours( 7, 59, 59)).format('YYYY-MM-DD HH:mm:ss')
this.listQuery.endTime = Date.now() this.listQuery.endTime = Date.now()
// this.formConfig[0].defaultSelect[0] = Date.now()-24*60*60-1000 // this.formConfig[0].defaultSelect[0] = Date.now()-24*60*60-1000
this.getDataList() this.getDataList()
@@ -579,14 +578,14 @@ export default {
content: ''; content: '';
position: absolute; position: absolute;
width: 1px; width: 1px;
height: 75px; height: 90px;
/*这里需要自己调整根据td的宽度和高度*/ /*这里需要自己调整根据td的宽度和高度*/
top: 0; top: 0;
left: 0; left: 0;
background-color: grey; background-color: grey;
opacity: 0.3; opacity: 0.3;
display: block; display: block;
transform: rotate(-53deg); transform: rotate(-60deg);
/*这里需要自己调整,根据线的位置*/ /*这里需要自己调整,根据线的位置*/
transform-origin: top; transform-origin: top;
} }
@@ -595,14 +594,14 @@ export default {
content: ''; content: '';
position: absolute; position: absolute;
width: 1px; width: 1px;
height: 75px; height: 90px;
/*这里需要自己调整根据td的宽度和高度*/ /*这里需要自己调整根据td的宽度和高度*/
bottom: 0; bottom: 0;
right: 0; right: 0;
background-color: grey; background-color: grey;
opacity: 0.3; opacity: 0.3;
display: block; display: block;
transform: rotate(-54deg); transform: rotate(-60deg);
/*这里需要自己调整,根据线的位置*/ /*这里需要自己调整,根据线的位置*/
transform-origin: bottom; transform-origin: bottom;
} }

View File

@@ -1,7 +1,7 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2023-12-12 13:45:25 * @Date: 2023-12-12 13:45:25
* @LastEditTime: 2024-04-24 15:29:21 * @LastEditTime: 2024-04-26 16:01:20
* @LastEditors: DY * @LastEditors: DY
* @Description: * @Description:
--> -->
@@ -32,13 +32,19 @@
background: '#F2F4F9', background: '#F2F4F9',
color: '#606266' color: '#606266'
}"> }">
<el-table-column :label="'许昌安彩周成品生产汇总' + '(' + timeTips + ')'" align="center"> <el-table-column prop="lineId" label="生产线" align="center">
<el-table-column prop="lineId" label="生产线" align="center"> <template slot-scope="scope">
<el-input v-if="!disabled" type="number" v-model="scope.row.lineName" :disabled="disabled"></el-input>
<span v-else>{{ scope.row.lineName }} </span>
</template>
</el-table-column>
<el-table-column :label="'许昌安彩周成品生产汇总' + '(' + timeTips + ')'">
<!-- <el-table-column prop="lineId" label="生产线" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-if="!disabled" type="number" v-model="scope.row.lineName" :disabled="disabled"></el-input> <el-input v-if="!disabled" type="number" v-model="scope.row.lineName" :disabled="disabled"></el-input>
<span v-else>{{ scope.row.lineName }} </span> <span v-else>{{ scope.row.lineName }} </span>
</template> </template>
</el-table-column> </el-table-column> -->
<el-table-column label="投入数㎡" align="center"> <el-table-column label="投入数㎡" align="center">
<el-table-column prop="inputNow" label="本周" align="center"> <el-table-column prop="inputNow" label="本周" align="center">
<template slot-scope="scope"> <template slot-scope="scope">

View File

@@ -1,8 +1,8 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2024-04-18 10:01:33 * @Date: 2024-04-18 10:01:33
* @LastEditTime: 2024-04-26 10:44:00 * @LastEditTime: 2024-04-26 15:22:57
* @LastEditors: zhp * @LastEditors: DY
* @Description: * @Description:
--> -->
<template> <template>
@@ -12,14 +12,14 @@
background: '#F2F4F9', background: '#F2F4F9',
color: '#606266' color: '#606266'
}" class="baseTable" :max-height="tableH" id="exportTable" :data="tableData" style="width: 100%"> }" class="baseTable" :max-height="tableH" id="exportTable" :data="tableData" style="width: 100%">
<el-table-column v-for="item in tableProps" :prop="item.prop" :label="item.label" align="center"> <el-table-column v-for="(item, index) in tableProps" :key="index" :prop="item.prop" :label="item.label" align="center">
<el-table-column v-for="it in item.children" :prop="it.prop" :label="it.label" align="center"> <el-table-column v-for="(it, indexNo) in item.children" :key="indexNo" :prop="it.prop" :label="it.label" align="center">
</el-table-column> </el-table-column>
</el-table-column> </el-table-column>
</el-table> </el-table>
<el-table class="baseTable" :max-height="tableH" id="exportTableChild" :data="tableDataChild" style="width: 100%"> <el-table class="baseTable" :max-height="tableH" id="exportTableChild" :data="tableDataChild" style="width: 100%">
<el-table-column v-for="item in tablePropsChild" :prop="item.prop" :label="item.label" align="center"> <el-table-column v-for="(item, indexn) in tablePropsChild" :key="indexn" :prop="item.prop" :label="item.label" align="center">
<el-table-column v-for="it in item.children" :prop="it.prop" :label="it.label" align="center"> <el-table-column v-for="(it, indexi) in item.children" :key="indexi" :prop="it.prop" :label="it.label" align="center">
</el-table-column> </el-table-column>
</el-table-column> </el-table-column>
</el-table> </el-table>
@@ -205,7 +205,7 @@ export default {
labelField: 'name', labelField: 'name',
valueField: 'id', valueField: 'id',
param: 'lineId', param: 'lineId',
multiple:true, // multiple:true,
filterable: true filterable: true
}, },
{ {

View File

@@ -1,8 +1,8 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2024-04-18 14:08:46 * @Date: 2024-04-18 14:08:46
* @LastEditTime: 2024-04-26 09:10:53 * @LastEditTime: 2024-04-26 16:12:51
* @LastEditors: zhp * @LastEditors: DY
* @Description: * @Description:
--> -->
<template> <template>
@@ -49,7 +49,7 @@
<el-table :header-cell-style="{ <el-table :header-cell-style="{
background: '#F2F4F9', background: '#F2F4F9',
color: '#606266' color: '#606266'
}" class=" baseTable" :data="tableData" style="width: 100%"> }" id="exportTable" class="baseTable" :data="tableData" style="width: 100%">
<el-table-column label="时间" align="right" width="150"> <el-table-column label="时间" align="right" width="150">
<el-table-column prop="name" label="缺陷" width="120"> <el-table-column prop="name" label="缺陷" width="120">
</el-table-column> </el-table-column>
@@ -60,7 +60,7 @@
<el-table-column prop="activityName"></el-table-column> <el-table-column prop="activityName"></el-table-column>
<el-table-column prop="message"></el-table-column> <el-table-column prop="message"></el-table-column>
</el-table-column> --> </el-table-column> -->
<el-table-column v-for="(item, index) in codeList " :prop="item.prop" :label="item.label"> <el-table-column v-for="(item, index) in codeList " :key="index" :prop="item.prop" :label="item.label">
</el-table-column> </el-table-column>
</el-table> </el-table>
<!-- <pagination :limit.sync="listQuery.pageSize" :page.sync="listQuery.pageNo" :total="listQuery.total" <!-- <pagination :limit.sync="listQuery.pageSize" :page.sync="listQuery.pageNo" :total="listQuery.total"
@@ -244,7 +244,7 @@ export default {
// this.listQuery.endTime = this.formConfig[0].defaultSelect[1] // this.listQuery.endTime = this.formConfig[0].defaultSelect[1]
// this.formConfig[0].defaultSelect[0] = Date.now()-24*60*60-1000 // this.formConfig[0].defaultSelect[0] = Date.now()-24*60*60-1000
this.listQuery.startTime = new Date() this.listQuery.startTime = new Date()
this.getDataList() // this.getDataList()
this.getDict() this.getDict()
// this.getSpanArr(this.tableData) // this.getSpanArr(this.tableData)
// this.getDict(); // this.getDict();
@@ -310,6 +310,7 @@ export default {
//设置导出文件名称 //设置导出文件名称
"全检检验记录.xlsx" "全检检验记录.xlsx"
); );
this.$message.success('导出成功');
} catch (e) { } catch (e) {
if (typeof console !== "undefined") console.log(e, wbout); if (typeof console !== "undefined") console.log(e, wbout);
} }
@@ -349,7 +350,7 @@ export default {
let arr = [] let arr = []
console.log(res.data) console.log(res.data)
res.data.timeStrList.push('不良合计') res.data?.timeStrList.push('不良合计')
this.codeList = res.data.timeStrList.map((ele, index) => { this.codeList = res.data.timeStrList.map((ele, index) => {
if (ele === '不良合计') { if (ele === '不良合计') {
return { return {

View File

@@ -3,7 +3,8 @@
<!-- 搜索工作栏 --> <!-- 搜索工作栏 -->
<search-bar <search-bar
:formConfigs="formConfig" :formConfigs="formConfig"
@headBtnClick="buttonClick" /> @headBtnClick="buttonClick"
@datepicker-change="datepickerChange" />
<base-table <base-table
class="israLineReportTable1" class="israLineReportTable1"
ref="israLineReportTable11" ref="israLineReportTable11"
@@ -57,14 +58,16 @@ export default {
type: 'datePicker', type: 'datePicker',
label: '时间段', label: '时间段',
dateType: 'daterange', dateType: 'daterange',
format: 'yyyy-MM-dd', format: 'yyyy-MM-dd HH:mm',
valueFormat: 'yyyy-MM-dd', valueFormat: 'yyyy-MM-dd HH:mm:ss',
rangeSeparator: '-', rangeSeparator: '-',
startPlaceholder: '开始时间', startPlaceholder: '开始时间',
endPlaceholder: '结束时间', endPlaceholder: '结束时间',
param: 'timeVal', param: 'timeVal',
defaultSelect: [], defaultSelect: [],
width: 250, width: 300,
onchange: true,
clearable: false,
}, },
{ {
type: 'select', type: 'select',
@@ -106,12 +109,14 @@ export default {
}, },
mounted() { mounted() {
this.tableProp = this.tableProp1; this.tableProp = this.tableProp1;
let start = moment().format('yyyy-MM-DD'); let start = moment(moment().format('yyyy-MM-DD') + ' 07:00:00').format(
let end = moment().format('yyyy-MM-DD'); 'yyyy-MM-DD HH:mm:ss'
);
let end =
moment(moment().valueOf() + 86400000).format('yyyy-MM-DD') + ' 06:59:59';
this.formConfig[0].defaultSelect = [start, end]; this.formConfig[0].defaultSelect = [start, end];
this.queryParams.startTime = this.queryParams.startTime = moment(start).valueOf();
moment(start + ' 00:00:00').valueOf() + 25200000; this.queryParams.endTime = moment(end).valueOf();
this.queryParams.endTime = moment(end + ' 23:59:59').valueOf() + 25200000;
this.getList(); this.getList();
}, },
methods: { methods: {
@@ -237,13 +242,22 @@ export default {
} }
} }
}, },
// 时间选择器change
datepickerChange(val) {
console.log(val);
let start = moment(
moment(val.value[0]).format('yyyy-MM-DD') + ' 07:00:00'
).format('yyyy-MM-DD HH:mm:ss');
let end =
moment(moment(val.value[1]).valueOf() + 86400000).format('yyyy-MM-DD') +
' 06:59:59';
this.formConfig[0].defaultSelect = [start, end];
},
buttonClick(val) { buttonClick(val) {
if (val.btnName === 'search') { if (val.btnName === 'search') {
if (val.timeVal && val.timeVal.length > 0) { if (val.timeVal && val.timeVal.length > 0) {
this.queryParams.startTime = this.queryParams.startTime = moment(val.timeVal[0]).valueOf();
moment(val.timeVal[0] + ' 00:00:00').valueOf() + 25200000; this.queryParams.endTime = moment(val.timeVal[1]).valueOf();
this.queryParams.endTime =
moment(val.timeVal[1] + ' 23:59:59').valueOf() + 25200000;
} }
this.queryParams.lineId = val.lineId; this.queryParams.lineId = val.lineId;
this.getList(); this.getList();

View File

@@ -1,8 +1,8 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2024-04-18 10:01:33 * @Date: 2024-04-18 10:01:33
* @LastEditTime: 2024-04-26 10:44:27 * @LastEditTime: 2024-04-26 15:31:24
* @LastEditors: zhp * @LastEditors: DY
* @Description: * @Description:
--> -->
<template> <template>
@@ -13,8 +13,7 @@
color: '#606266' color: '#606266'
}" class="baseTable" border :max-height="tableH" id="exportTable" :data="tableData" style="width: 100%" }" class="baseTable" border :max-height="tableH" id="exportTable" :data="tableData" style="width: 100%"
:span-method="objectSpanMethod"> :span-method="objectSpanMethod">
<el-table-column :width="item.width" v-for="item in tableProps" :prop="item.prop" :label="item.label" <el-table-column :width="item.width" v-for="(item, index) in tableProps" :key="index" :prop="item.prop" :label="item.label" align="center">
align="center">
</el-table-column> </el-table-column>
</el-table> </el-table>
<!-- <pagination :limit.sync="listQuery.pageSize" :page.sync="listQuery.pageNo" :total="listQuery.total" <!-- <pagination :limit.sync="listQuery.pageSize" :page.sync="listQuery.pageNo" :total="listQuery.total"
@@ -51,7 +50,7 @@ const tableProps = [
// }, // },
{ {
prop: 'lineName', prop: 'lineName',
label: '产线', label: '产线',
width:'100' width:'100'
}, },
{ {
@@ -132,7 +131,7 @@ export default {
startPlaceholder: '开始时间', startPlaceholder: '开始时间',
endPlaceholder: '结束时间', endPlaceholder: '结束时间',
param: 'checkTime', param: 'checkTime',
defaultSelect: [new Date(new Date(Date.now()).setHours(7, 0, 0, 0)).getTime() - 24 * 60 * 60 * 1000, new Date(new Date(Date.now()).setHours(6, 59, 59)).getTime()], defaultSelect: [new Date(new Date(Date.now()).setHours(7, 0, 0, 0)).getTime() - 24 * 60 * 60 * 1000, new Date(new Date(Date.now()).setHours(6, 59, 59, 0)).getTime()],
width: 350 width: 350
}, },
{ {

View File

@@ -1,8 +1,8 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2024-04-18 15:07:53 * @Date: 2024-04-18 15:07:53
* @LastEditTime: 2024-04-26 10:44:41 * @LastEditTime: 2024-04-26 15:20:45
* @LastEditors: zhp * @LastEditors: DY
* @Description: * @Description:
--> -->
<template> <template>
@@ -12,8 +12,7 @@
background: '#F2F4F9', background: '#F2F4F9',
color: '#606266' color: '#606266'
}" class="baseTable" border id="exportTable" :data="tableData" style="width: 100%" :span-method="objectSpanMethod"> }" class="baseTable" border id="exportTable" :data="tableData" style="width: 100%" :span-method="objectSpanMethod">
<el-table-column :width="item.width" v-for="item in tableProps" :prop="item.prop" :label="item.label" <el-table-column :width="item.width" v-for="(item, index) in tableProps" :key="index" :prop="item.prop" :label="item.label" align="center">
align="center">
</el-table-column> </el-table-column>
</el-table> </el-table>
<!-- <pagination :limit.sync="listQuery.pageSize" :page.sync="listQuery.pageNo" :total="listQuery.total" <!-- <pagination :limit.sync="listQuery.pageSize" :page.sync="listQuery.pageNo" :total="listQuery.total"
@@ -56,7 +55,7 @@ const tableProps = [
}, },
{ {
prop: 'dataType', prop: 'dataType',
label: '类', label: '类',
width: '150', width: '150',
}, },
{ {