Browse Source

Merge remote-tracking branch 'origin/master'

master
[li_she] 3 years ago
parent
commit
61deb5e5d4
  1. 7
      src/api/labelSetting/com_add_update_label.js
  2. 4
      src/api/labelSetting/label_setting.js
  3. 267
      src/views/modules/labelSetting/com_add_update_label.vue
  4. 500
      src/views/modules/labelSetting/label_setting.vue
  5. 8
      src/views/modules/yieldReport/com_separate_roll_with_split.vue

7
src/api/labelSetting/com_add_update_label.js

@ -0,0 +1,7 @@
import { createAPI } from "@/utils/httpRequest.js";
// 插入打印标签的信息数据
export const insertLabelSetting = data => createAPI('/label/setting/insertLabelSetting','post',data)
// 修改打印标签的信息数据
export const updateLabelSetting = data => createAPI('/label/setting/updateLabelSetting','post',data)

4
src/api/labelSetting/label_setting.js

@ -0,0 +1,4 @@
import { createAPI } from "@/utils/httpRequest.js";
// 获取打印标签的信息数据
export const getLabelSettingList = data => createAPI('/label/setting/getLabelSettingList','post',data)

267
src/views/modules/labelSetting/com_add_update_label.vue

@ -0,0 +1,267 @@
<template>
<div class="customer-css">
<el-dialog :title="titleCon" :close-on-click-modal="false" :visible.sync="visible" width="380px" style="height: 380px;" class="customer-dialog">
<el-form :inline="true" label-position="top" label-width="80px">
<!-- 标签自定义信息 -->
<el-container>
<fieldset class="customer-fieldset" style="width: 300px;">
<!-- -->
<el-row>
<el-col :span="12">
<el-form-item class="customer-item" :label=labels.labelNo>
<el-input v-model="pageData.labelNo" :readonly="labelNoReadOnly" style="width: 120px;" ></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item class="customer-item" :label=labels.labelType>
<el-input v-model="pageData.labelType" style="width: 150px;" ></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item class="customer-item" :label=labels.labelName>
<el-input v-model="pageData.labelName" style="width: 120px;" ></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item class="customer-item" :label=labels.labelClass>
<el-input v-model="pageData.labelClass" style="width: 150px;" ></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item class="customer-item" :label=labels.remark>
<el-input v-model="pageData.remark" style="width: 310px;" ></el-input>
</el-form-item>
</el-col>
</el-row>
</fieldset>
</el-container>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="saveLabelSetting()">{{ buttons.saveButton }}</el-button>
<el-button type="primary" @click="closeDialog">{{buttons.closeButton}}</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import {
insertLabelSetting,
updateLabelSetting,
} from '@/api/labelSetting/com_add_update_label.js';
import {
searchSysLanguagePackList,
searchSysLanguageParam,
searchFunctionButtonList,
saveButtonList,
searchSysLanguage,
searchLanguageListByLanguageCode,
saveSysLanguageOne,
searchPageLanguageData,
removerLanguage,
saveSysLanguageList
} from "@/api/sysLanguage.js";
var functionId = 'C10000042';
export default {
data() {
return {
titleCon: '标签自定义维护',
showDefault: false,
visible: false,
pageData: {
site: this.$store.state.user.site,
username: this.$store.state.user.name,
labelNo: '',
labelType: '',
labelName: '',
labelClass: '',
remark: '',
addFlag: false,
},
labelNoReadOnly: false,
dataListLoading: false,
buttons: {
saveButton: '保存',
closeButton: '关闭',
},
queryButton: {
functionId: functionId,
table_id: '*',
languageCode: this.$i18n.locale,
objectType: 'button'
},
labels: {
titleCon: '标签自定义维护',
labelNo: '标签编号:',
labelType: '标签类型:',
labelName: '报表文件名:',
labelClass: '标签种类:',
remark: '备注:',
confirmLabel: '确认',
cancelLabel: '取消',
},
queryLabel: {
functionId: functionId,
table_id: '*',
languageCode: this.$i18n.locale,
objectType: 'label'
},
}
},
methods: {
//
init(currentRow) {
//
this.pageData = JSON.parse(JSON.stringify(currentRow));
//
this.visible = true;
//
if(this.pageData.addFlag == 'Y'){
this.labelNoReadOnly = false;
}else{
this.labelNoReadOnly = true;
}
//
//this.getMultiLanguageList(); //
//
this.titleCon = this.labels.titleCon;
},
/*保存标签自定义的信息*/
saveLabelSetting(){
//
let labelNo = this.pageData.labelNo.trim();
let labelType = this.pageData.labelType.trim();
let labelName = this.pageData.labelName.trim();
if(labelNo == null || labelNo === ''){
this.$message.success("标签编号不能为空!");
return false;
}
if(labelType == null || labelType === ''){
this.$message.success("标签类型不能为空!");
return false;
}
if(labelName == null || labelName === ''){
this.$message.success("报表文件名不能为空!");
return false;
}
//
if(this.pageData.addFlag === 'Y'){
this.insertLabelSettingData();
}else{
this.updateLabelSettingData();
}
},
/*数量失去焦点的事件*/
insertLabelSettingData(){
insertLabelSetting(this.pageData).then(({data}) => {
if(data.code == 200){
this.$message.success(data.msg);
setTimeout(this.closeDialog(), 2000);
}else{
this.$message.error(data.msg);
}
})
},
/*验证时长的参数*/
updateLabelSettingData(){
updateLabelSetting(this.pageData).then(({data}) => {
if(data.code == 200){
this.$message.success(data.msg);
setTimeout(this.closeDialog(), 2000);
}else{
this.$message.error(data.msg);
}
})
},
/*关闭modal*/
closeDialog(){
//
this.$emit('refreshPageTables');
//
this.visible = false;
},
/*检查新的工具实例信息*/
checkConnectToolInstanceIdBun(){
/*验证工具的实例*/
if(this.pageData.toolInstanceId == null || this.pageData.toolInstanceId == ''){
this.$message.error(this.labels.pleaseScanToolInstanceId);
return false;
}
/*调用检查的方法检验下*/
checkConnectToolInstanceId(this.pageData).then(({data}) => {
//
if(data.code == 500){
this.$message.error(data.msg);
}else if (data.resultMap.resultCode == 201){
let msg = data.resultMap.resultMsg;
this.$confirm(msg, '提示', {
confirmButtonText: this.labels.confirmLabel,
cancelButtonText: this.labels.cancelLabel,
type: "warning"
}).then(() => {
this.pageData.checkFlag = true;
}).catch(() => {
this.pageData.checkFlag = false;
});
}else{
this.pageData.checkFlag = true;
}
});
},
//
async saveMultiLanguage() {
// button label title
let buttons = this.buttonList;
let labels = this.labelsList;
await saveButtonList(buttons)
await saveButtonList(labels)
},
getMultiLanguageList() {
//
searchFunctionButtonList(this.queryButton).then(({data}) => {
if (data && data.code == 0 ) {
this.buttons = data.data
} else {
// saveButtonList(this.buttonList).then(({data}) => {
// })
}
});
//
searchFunctionButtonList(this.queryLabel).then(({data}) => {
if (data && data.code == 0 ) {
this.labels = data.data
} else {
// saveButtonList(this.buttonList).then(({data}) => {
// })
}
});
},
},
created() {
// this.factoryList()
// this.getLanguageList()
}
}
</script>
<style scoped lang="scss">
</style>

500
src/views/modules/labelSetting/label_setting.vue

@ -0,0 +1,500 @@
<template>
<div class="customer-css">
<!-- 查询时间和产品 -->
<el-form :inline="true" label-position="top" label-width="100px" style="margin-top: 5px;">
<el-form-item :label=labels.labelNo>
<el-input v-model="pageData.labelNo" style="width: 120px"></el-input>
</el-form-item>
<el-form-item :label=labels.labelType>
<el-input v-model="pageData.labelType" style="width: 120px"></el-input>
</el-form-item>
<el-form-item :label=labels.labelName>
<el-input v-model="pageData.labelName" style="width: 120px" ></el-input>
</el-form-item>
<el-form-item style="margin-top: 16px;">
<el-button type="primary" @click="refreshPageTables()" class="customer-bun-mid"
style="margin-left: 10px; margin-bottom: 5px;">{{ buttons.searchButton }}
</el-button>
</el-form-item>
<el-form-item style="margin-top: 16px;">
<el-button type="primary" @click="addLabelSettingModal()" class="customer-bun-mid"
style="margin-left: 10px; margin-bottom: 5px;">{{ buttons.addButton }}
</el-button>
</el-form-item>
</el-form>
<!-- 标签列表数据 -->
<el-main style="margin-left: -20px; margin-top: -20px; width: 104%;">
<el-table @row-click="setCurrentRow"
:height="height"
highlight-current-row
:data="labelArrays"
border
v-loading="dataListLoading"
style="width: 100%;">
<el-table-column
v-for="(item,index) in columnList" :key="index"
:sortable="item.columnSortable"
:prop="item.columnProp"
:header-align="item.headerAlign"
:show-overflow-tooltip="item.showOverflowTooltip"
:align="item.align"
:fixed="item.fixed==''?false:item.fixed"
:width="item.columnWidth"
:label="item.columnLabel">
<template slot-scope="scope">
<span v-if="!item.columnHidden"> {{ scope.row[item.columnProp] }}</span>
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
style="width: 100px; height: 80px"/></span>
</template>
</el-table-column>
<el-table-column
fixed="left"
header-align="center"
align="center"
width="100"
:label=labels.operationLabel>
<template slot-scope="scope">
<a class="customer-a" @click="editLabelSettingModal(scope.row)">{{ labels.editLabel }}</a>
</template>
</el-table-column>
</el-table>
</el-main>
<!-- 动态列 -->
<column v-if="showDefault" ref="column" @refreshData="getTableUserColumn" v-drag></column>
<!-- 新增或者修改的modal -->
<comAddUpdateLabel ref="comAddUpdateLabel" @refreshPageTables="refreshPageTables" v-drag></comAddUpdateLabel>
</div>
</template>
<script>
import {
getLabelSettingList,
} from '@/api/labelSetting/label_setting.js';
/*引入組件*/
import comAddUpdateLabel from "./com_add_update_label";/*新增或者修改的組件*/
/* 动态表头 */
import {
saveTableDefaultList,
getTableDefaultListLanguage,
getTableUserListLanguage,
removerDefault,
removerUser
} from '@/api/table.js'
import {
searchSysLanguagePackList,
searchSysLanguageParam,
searchFunctionButtonList,
saveButtonList,
searchSysLanguage,
searchLanguageListByLanguageCode,
saveSysLanguageOne,
searchPageLanguageData,
removerLanguage,
saveSysLanguageList
} from "@/api/sysLanguage.js";
var functionId = '100008001';
export default {
data() {
return {
height: 800,
authEdit: false,
authAdd: false,
authDelete: false,
menuId: this.$route.meta.menuId,
menuShow: false,
showDefault: false,
pageData: {
site: this.$store.state.user.site,
username: this.$store.state.user.name,
labelNo: '',
labelName: '',
labelType: '',
searchFlag: 'N'
},
currentRow: {},
labelArrays: [],
dataListLoading: false,
columnList: [
{
userId: this.$store.state.user.name,
functionId: 100008001,
serialNumber: '100008001LabelLabelNo',
tableId: '100008001Label',
tableName: '标签自定义列表',
columnProp: 'labelNo',
headerAlign: 'center',
align: 'center',
columnLabel: '标签编号',
columnWidth: 160,
columnHidden: false,
columnImage: false,
columnSortable: true,
sortLv: 0,
status: true,
fixed: ''
},
{
userId: this.$store.state.user.name,
functionId: 100008001,
serialNumber: '100008001LabelLabelType',
tableId: '100008001Label',
tableName: '标签自定义列表',
columnProp: 'labelType',
headerAlign: 'center',
align: 'center',
columnLabel: '标签类型',
columnWidth: 100,
columnHidden: false,
columnImage: false,
columnSortable: true,
sortLv: 0,
status: true,
fixed: ''
},
{
userId: this.$store.state.user.name,
functionId: 100008001,
serialNumber: '100008001LabelLabelName',
tableId: '100008001Label',
tableName: '标签自定义列表',
columnProp: 'labelName',
headerAlign: 'center',
align: 'center',
columnLabel: '报表文件名',
columnWidth: 220,
columnHidden: false,
columnImage: false,
columnSortable: true,
sortLv: 0,
status: true,
fixed: ''
},
{
userId: this.$store.state.user.name,
functionId: 100008001,
serialNumber: '100008001LabelLabelClass',
tableId: '100008001Label',
tableName: '标签自定义列表',
columnProp: 'labelClass',
headerAlign: 'center',
align: 'left',
columnLabel: '标签种类',
columnWidth: 140,
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: ''
},
{
userId: this.$store.state.user.name,
functionId: 100008001,
serialNumber: '100008001LabelRemark',
tableId: '100008001Label',
tableName: '标签自定义列表',
columnProp: 'remark',
headerAlign: 'center',
align: 'left',
columnLabel: '备注',
columnWidth: 300,
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: ''
},
],
queryTable: {
userId: this.$store.state.user.name,
functionId: this.$route.meta.menuId,
tableId: '100008001Label',
languageCode: this.$i18n.locale
},
// table
queryTableUser: {
userId: this.$store.state.user.name,
functionId: this.$route.meta.menuId,
tableId: '100008001Label',
status: true,
languageCode: this.$i18n.locale
},
// table
userColumnList: [],
buttons: {
searchButton: '查询',
addButton: '新增',
},
queryButton: {
functionId: functionId,
table_id: '*',
languageCode: this.$i18n.locale,
objectType: 'button'
},
labels: {
labelNo: '标签编号:',
labelType: '标签类型:',
labelName: '报表文件名:',
operationLabel: '操作',
editLabel: '编辑',
},
queryLabel: {
functionId: functionId,
table_id: '*',
languageCode: this.$i18n.locale,
objectType: 'label'
},
}
},
components: {
comAddUpdateLabel,/*标签新增或者修改的组件*/
},
mounted() {
this.$nextTick(() => {
this.height = window.innerHeight - 165;
})
},
methods: {
/* 刷新页面table */
refreshPageTables() {
this.currentRow = {};
//
this.pageData.searchFlag = 'Y';
this.refreshLabelSettingList();
},
//
refreshLabelSettingList() {
//
getLabelSettingList(this.pageData).then(({data}) => {
//
this.labelArrays = data.rows;
})
},
/*新增标签定义的modal*/
addLabelSettingModal(){
let currentData = {
site: this.$store.state.user.site,
username: this.$store.state.user.name,
labelNo: '',
labelName: '',
labelType: '',
labelClass: '',
remark: '',
addFlag: 'Y'
};
//
this.$nextTick(() => {
this.$refs.comAddUpdateLabel.init(currentData);
})
},
/*修改标签定义的modal*/
editLabelSettingModal(row){
let currentData = row;
currentData.addFlag = 'N';
//
this.$nextTick(() => {
this.$refs.comAddUpdateLabel.init(currentData);
})
},
/* 设置选中行的参数 */
setCurrentRow(row, column, event) {
this.currentRow = JSON.parse(JSON.stringify(row))
},
//
userSetting() {
this.visible = true
let queryTable = {
userId: this.$store.state.user.name,
functionId: this.$route.meta.menuId,
tableId: '100008001Label',
languageCode: this.$i18n.locale
}
this.$nextTick(() => {
this.$refs.column.init(queryTable)
})
},
//
getTableUserColumn() {
getTableUserListLanguage(this.queryTableUser).then(({data}) => {
if (data && data.code == 0 && data.rows.length > 0) {
// this.columnList = []
this.columnList = data.rows
} else {
this.getColumnList()
}
})
},
// tableDefault
getColumnList() {
getTableDefaultListLanguage(this.queryTable).then(({data}) => {
if (data && data.code == 0) {
// this.showDefault = false
this.columnList = data.rows
} else {
// this.showDefault = true
}
})
},
//
getButtonAuthData(){
let updateFlag = this.isAuth(this.menuId+":revise");
let fullControFlag = this.isAuth(this.menuId+":fullContro");
let deleteFlag = this.isAuth(this.menuId+":remove");
//
this.authEdit = !updateFlag && !fullControFlag;
this.authAdd = !fullControFlag;
this.authDelete = !deleteFlag;
},
//
getMultiLanguageList() {
//
searchFunctionButtonList(this.queryButton).then(({data}) => {
if (data && data.code == 0 ) {
this.buttons = data.data
} else {
// saveButtonList(this.buttonList).then(({data}) => {
// })
}
});
//
searchFunctionButtonList(this.queryLabel).then(({data}) => {
if (data && data.code == 0 ) {
this.labels = data.data
} else {
// saveButtonList(this.buttonList).then(({data}) => {
// })
}
});
},
},
created() {
//
this.refreshLabelSettingList();
//
//this.getTableUserColumn()
//
//this.getButtonAuthData();
//this.getMultiLanguageList(); //
}
}
</script>
<style>
.el-textarea__inner {
padding: 5px 5px;
}
</style>
<!--当前页面的标签样式-->
<style scoped lang="scss">
/*针对el-card*/
.customer-card .el-form-item__content {
margin-top: -15px;
}
.customer-card .el-form-item {
height: 22px;
}
.customer-border .el-form-item__content {
margin-top: -30px;
}
/*全局年与日类型 宽度*/
div.el-time-width {
width: 110px !important;
}
/* 全局时间右边框*/
.customer-css input.el-input__inner {
height: 22px !important;
padding-right: 0px !important;
}
/* 控制el-card标签的数据*/
div.customer-el-card {
margin-left: 110px;
margin-top: -15px;
height: 20px;
width: 60px;
}
/* 颜色控制 */
div.customer-el-card-pink {
background: #FF00FF;
}
div.customer-el-card-orange {
background: #FFD700;
}
div.customer-el-card-blue {
background: #0000CD;
}
/*清掉样式*/
.el-radio + .el-radio {
margin-left: 0px;
}
/*当前按钮的通用样式*/
.customer-css .customer-bun-mid {
width: 65px;
text-align: center;
}
/*当前按钮的通用样式*/
.customer-css .el-button--medium {
padding: 5px 5px;
}
/*添加主菜单和明细菜单的样式*/
.customer-css .customer-dropdown .el-button--primary {
padding: 2px;
font-size: 12px;
}
.el-dropdown-menu--medium .el-dropdown-menu__item {
line-height: 18px;
padding: 0 17px;
font-size: 12px;
}
hr {
margin-top: 0px;
}
/*控制上下间距*/
</style>

8
src/views/modules/yieldReport/com_separate_roll_with_split.vue

@ -634,9 +634,9 @@ export default {
this.pageData.seqNo = scheduleData.seqNo;
this.pageData.rollNo = scheduleData.rollNo;
this.pageData.operatorId = operatorData.operatorId;
this.pageData.customerId = this.labels.noneData;
this.pageData.customerId = '无';
this.pageData.customerName = '';
this.pageData.fgPartNo = this.labels.noneData;
this.pageData.fgPartNo = '无';
this.pageData.fgPartDesc = '';
this.pageData.supplierId = '*';
this.pageData.supplierName = '';
@ -786,9 +786,9 @@ export default {
//table
this.getCurrentPageTable();
//
this.pageData.customerId = this.labels.noneData;
this.pageData.customerId = '无';
this.pageData.customerName = '';
this.pageData.fgPartNo = this.labels.noneData;
this.pageData.fgPartNo = '无';
this.pageData.fgPartDesc = '';
this.pageData.supplierId = '*';
this.pageData.supplierName = '';

Loading…
Cancel
Save