Browse Source

标签打印

master
han\hanst 8 months ago
parent
commit
b6e15b85c3
  1. 252
      src/views/modules/labelPrint/label-hist.vue
  2. 673
      src/views/modules/labelPrint/outer-box-label-roll.vue
  3. 676
      src/views/modules/labelPrint/outer-box-label.vue
  4. 566
      src/views/modules/labelPrint/roll-label.vue

252
src/views/modules/labelPrint/label-hist.vue

@ -1,252 +0,0 @@
<template>
<div class="mod-oss">
<el-form inline="inline" label-position="top">
<el-form-item :label="'用户ID'">
<el-input v-model="query.userid"></el-input>
</el-form-item>
<el-form-item :label="'标签编号'">
<el-input v-model="query.reportid"></el-input>
</el-form-item>
<el-form-item :label="'卷号/订单号'">
<el-input v-model="query.keyinfo"></el-input>
</el-form-item>
<el-form-item :label="'打印功能'">
<el-input v-model="query.printfrom"></el-input>
</el-form-item>
<el-form-item :label="'创建日期'">
<el-date-picker value-format="yyyy-MM-dd 00:00:00" format="yyyy-MM-dd" style="width: 120px;" v-model="query.startDate"></el-date-picker> -
<el-date-picker value-format="yyyy-MM-dd 23:59:59" format="yyyy-MM-dd" style="width: 120px;" v-model="query.endDate"></el-date-picker>
</el-form-item>
<el-form-item>
<el-button style="margin-top: 22px" @click="getDataList()" type="primary">{{ buttons.search }}</el-button>
</el-form-item>
</el-form>
<el-table
:height="height"
:data="dataList"
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"
:min-width="item.columnWidth"
:show-tooltip-when-overflow="true"
: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>
</div>
</template>
<script>
import {
getLabelPrintHistList
} from '@/api/print/labelHist.js';
import {
searchFunctionButtonList,
} from "@/api/sysLanguage.js"
var functionId='100001003';
export default {
data() {
return {
height: 365,
dataListLoading: true,
dataList: [],
query:{
startDate:'',
endDate:'',
userid:'',
printfrom: '',
keyinfo:'',
reportid:'',
},
columnList: [
{
tableId: "common1001",
tableName: "common",
columnProp: "reportid",
columnLabel: "标签编号",
columnHidden: false,
columnImage: false,
columnSortable: false,
columnWidth: null,
format: null,
functionId: this.$route.meta.menuId,
sortLv: 0,
status: true,
fixed: '',
serialNumber: null,
columnType: null,
align: null
}, {
tableId: "common1001",
tableName: "common",
columnProp: "printfrom",
columnLabel: "打印功能",
columnHidden: false,
columnImage: false,
columnSortable: false,
columnWidth: null,
format: null,
functionId: this.$route.meta.menuId,
sortLv: 0,
status: true,
fixed: '',
serialNumber: null,
columnType: null,
align: null
}, {
tableId: "common1001",
tableName: "common",
columnProp: "keyinfo",
columnLabel: "卷号/订单号",
columnHidden: false,
columnImage: false,
columnSortable: false,
columnWidth: null,
format: null,
functionId: this.$route.meta.menuId,
sortLv: 0,
status: true,
fixed: '',
serialNumber: null,
columnType: null,
align: null
}, {
tableId: "common1001",
tableName: "common",
columnProp: "userid",
columnLabel: "用户ID",
columnHidden: false,
columnImage: false,
columnSortable: false,
columnWidth: null,
format: null,
functionId: this.$route.meta.menuId,
sortLv: 0,
status: true,
fixed: '',
serialNumber: null,
columnType: null,
align: null
},{
tableId: "common1001",
tableName: "common",
columnProp: "createdate",
columnLabel: "打印时间",
columnHidden: false,
columnImage: false,
columnSortable: false,
columnWidth: null,
format: null,
functionId: this.$route.meta.menuId,
sortLv: 0,
status: true,
fixed: '',
serialNumber: null,
columnType: null,
align: null
},{
tableId: "common1001",
tableName: "common",
columnProp: "printdetail",
columnLabel: "打印内容备注",
columnHidden: false,
columnImage: false,
columnSortable: false,
columnWidth: null,
format: null,
functionId: this.$route.meta.menuId,
sortLv: 0,
status: true,
fixed: '',
serialNumber: null,
columnType: null,
align: null
},
],
labels: {
userid:'用户ID',
reportid:'标签编号',
keyinfo:'卷号/订单号',
printfrom:'打印功能',
create:'创建日期',
},
buttons:{
search:'查询',
},
queryButton: {
functionId: functionId,
table_id: '*',
languageCode: this.$i18n.locale,
objectType: 'button'
},
queryLabel: {
functionId: functionId,
table_id: '*',
languageCode: this.$i18n.locale,
objectType: 'label'
},
}
},
mounted() {
this.$nextTick(() => {
this.height = window.innerHeight - 150;
})
},
activated() {
this.getDataList()
},
methods: {
//
getDataList() {
getLabelPrintHistList(this.query).then(({data}) =>{
this.dataList = data.dataList
this.dataListLoading = false
})
},
//
getMultiLanguageList() {
//
searchFunctionButtonList(this.queryButton).then(({data}) => {
if (data.code == 0) {
this.buttons = data.data
} else {
// saveButtonList(this.buttonList).then(({data}) => {
// })
}
});
//
searchFunctionButtonList(this.queryLabel).then(({data}) => {
if (data.code == 0) {
this.labels = data.data
} else {
// saveButtonList(this.buttonList).then(({data}) => {
// })
}
});
},
},
created() {
//this.getMultiLanguageList()//
}
}
</script>

673
src/views/modules/labelPrint/outer-box-label-roll.vue

@ -1,673 +0,0 @@
<template>
<div class="sl-el">
<el-container>
<el-main style="width: 75%">
<el-row>
<el-col :span="18">
<el-form @submit.native.prevent label-position="top">
<el-form-item style="width: 60%" :label="labels.pleaseInBoxNo">
<el-input placeholder="请输入内容" v-model="rollNo" class="input-with-select"
@keyup.enter.native="getBoxSoAndReportFile()">
<el-button @click="getBoxSoAndReportFile()" slot="append" icon="el-icon-search"></el-button>
</el-input>
</el-form-item>
</el-form>
</el-col>
<el-col :span="6"></el-col>
</el-row>
<el-row>
<el-col :span="24">
<span>{{labels.chooseLabel}}</span>
<el-table
:data="reportFileList"
border
ref="reportFileTable"
highlight-current-row
@current-change="handleCurrentChange"
height="150px">
<el-table-column
v-for="(item,index) in reportColumnList" :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"
:min-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>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<span>{{labels.printName}}</span>
<el-input type="textarea" v-model="selectReportString" readonly :rows="3"></el-input>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<fieldset class="customer-fieldset" style="width: 100%; margin-left: 0px">
<legend>{{labels.number}}</legend>
<el-form inline="inline" style="width: 100%" label-position="top">
<el-form-item style="width: 23%;" :label="labels.totalQty">
<el-input type="number" v-model="orderInfo.totalQty" min="1"></el-input>
</el-form-item>
<el-form-item style="width: 23%;" :label="labels.perBoxQty">
<el-input type="number" v-model="orderInfo.perBoxQty" min="1"></el-input>
</el-form-item>
<el-form-item style="width: 23%;" :label="labels.boxQty">
<el-input v-model="orderInfo.boxQty" readonly></el-input>
</el-form-item>
<el-form-item style="width: 23%;" :label="labels.lastBoxQty">
<el-input v-model="orderInfo.lastBoxQty" readonly></el-input>
</el-form-item>
</el-form>
</fieldset>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-tabs style="font-size: 14px" v-model="activeName" type="border-card" @tab-click="handleClick"
class="customer-tab">
<el-tab-pane :label="labels.printCan" name="first">
<el-table
:data="reportParamList"
:cell-style="customerCellStyle" :cell-class-name="customerCellClassName"
border
:height="height"
>
<el-table-column
v-for="(item,index) in printParamColumnList" :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"
:min-width="item.columnWidth"
:label="item.columnLabel">
<template slot-scope="scope">
<span v-if="item.columnHidden">
<span v-if="scope.row.valuetypeDb === 'T'">
<el-input v-model='scope.row[item.columnProp]'> </el-input>
</span>
<span v-if="scope.row.valuetypeDb === 'D'">
<el-date-picker style="width: 100%;"
v-model='scope.row[item.columnProp]'> </el-date-picker>
</span>
<span v-if="scope.row.valuetypeDb === 'I'">
<el-input type="number" v-model='scope.row[item.columnProp]' min="1"> </el-input>
</span>
</span>
<span v-else>{{ scope.row[item.columnProp] }}</span>
</template>
</el-table-column>
</el-table>
</el-tab-pane>
<el-tab-pane style="font-size: 12px" :label="labels.labelLook" name="second">
<el-table
border
:height="height"
>
<el-table-column
v-for="(item,index) in reportContextColumnList" :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"
:min-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>
</el-tab-pane>
</el-tabs>
</el-col>
</el-row>
</el-main>
<el-main style="margin-left: 0px">
<el-row>
<el-col :span="6">
<el-form>
<el-form-item style="margin-top: 20px">
</el-form-item>
<el-form-item style="margin-top: 20px">
<el-button type="primary" @click="bartenderPrint">{{buttons.print}}</el-button>
</el-form-item>
</el-form>
</el-col>
</el-row>
</el-main>
</el-container>
</div>
</template>
<script>
import {
getBoxLabelSOByRollNo,
getReportFileByCustomer,
getReportSubFileList,
getReportParameters,
ouBoxPrintLabel
} from '@/api/print/outBoxPrint.js';
import {
searchFunctionButtonList,
} from "@/api/sysLanguage.js"
var functionId='100007002'
export default {
components: {},
data() {
return {
rollNo: '',
activeName: 'first',
height: 200,
//
reportColumnList: [
{
tableId: "common1001",
tableName: "common",
columnProp: "reportid",
columnLabel: "报告编号",
columnHidden: false,
columnImage: false,
columnSortable: false,
columnWidth: null,
format: null,
functionId: this.$route.meta.menuId,
sortLv: 0,
status: true,
fixed: '',
serialNumber: null,
columnType: null,
align: null
}, {
tableId: "common1001",
tableName: "common",
columnProp: "Reportfile",
columnLabel: "报告文件名",
columnHidden: false,
columnImage: false,
columnSortable: false,
columnWidth: null,
format: null,
functionId: this.$route.meta.menuId,
sortLv: 0,
status: true,
fixed: '',
serialNumber: null,
columnType: null,
align: null
}, {
tableId: "common1001",
tableName: "common",
columnProp: "Remark",
columnLabel: "备注",
columnHidden: false,
columnImage: false,
columnSortable: false,
columnWidth: null,
format: null,
functionId: this.$route.meta.menuId,
sortLv: 0,
status: true,
fixed: '',
serialNumber: null,
columnType: null,
align: null
}, {
tableId: "common1001",
tableName: "common",
columnProp: "DefaultFlag",
columnLabel: "默认格式",
columnHidden: false,
columnImage: false,
columnSortable: false,
columnWidth: null,
format: null,
functionId: this.$route.meta.menuId,
sortLv: 0,
status: true,
fixed: '',
serialNumber: null,
columnType: null,
align: null
},
],
//
printParamColumnList: [
{
tableId: "common1001",
tableName: "common",
columnProp: "parametername",
columnLabel: "参数名",
columnHidden: false,
columnImage: false,
columnSortable: false,
columnWidth: null,
format: null,
functionId: this.$route.meta.menuId,
sortLv: 0,
status: true,
fixed: '',
serialNumber: null,
columnType: null,
align: null
}, {
tableId: "common1001",
tableName: "common",
columnProp: "parameterdesc",
columnLabel: "参数标题",
columnHidden: false,
columnImage: false,
columnSortable: false,
columnWidth: null,
format: null,
functionId: this.$route.meta.menuId,
sortLv: 0,
status: true,
fixed: '',
serialNumber: null,
columnType: null,
align: null
}, {
tableId: "common1001",
tableName: "common",
columnProp: "optionvalue",
columnLabel: "参数值",
columnHidden: true,
columnImage: false,
columnSortable: false,
columnWidth: null,
format: null,
functionId: this.$route.meta.menuId,
sortLv: 0,
status: true,
fixed: '',
serialNumber: null,
columnType: null,
align: null
}, {
tableId: "common1001",
tableName: "common",
columnProp: "valuetype",
columnLabel: "参数类型",
columnHidden: false,
columnImage: false,
columnSortable: false,
columnWidth: null,
format: null,
functionId: this.$route.meta.menuId,
sortLv: 0,
status: true,
fixed: '',
serialNumber: null,
columnType: null,
align: null
},
],
//
reportContextColumnList: [
{
tableId: "common1001",
tableName: "common",
columnProp: "functionId",
columnLabel: "报告编号",
columnHidden: false,
columnImage: false,
columnSortable: false,
columnWidth: null,
format: null,
functionId: this.$route.meta.menuId,
sortLv: 0,
status: true,
fixed: '',
serialNumber: null,
columnType: null,
align: null
}, {
tableId: "common1001",
tableName: "common",
columnProp: "functionId",
columnLabel: "内容描述",
columnHidden: false,
columnImage: false,
columnSortable: false,
columnWidth: null,
format: null,
functionId: this.$route.meta.menuId,
sortLv: 0,
status: true,
fixed: '',
serialNumber: null,
columnType: null,
align: null
}, {
tableId: "common1001",
tableName: "common",
columnProp: "functionId",
columnLabel: "Bartender子字符串名",
columnHidden: false,
columnImage: false,
columnSortable: false,
columnWidth: null,
format: null,
functionId: this.$route.meta.menuId,
sortLv: 0,
status: true,
fixed: '',
serialNumber: null,
columnType: null,
align: null
}, {
tableId: "common1001",
tableName: "common",
columnProp: "functionId",
columnLabel: "内容值",
columnHidden: false,
columnImage: false,
columnSortable: false,
columnWidth: null,
format: null,
functionId: this.$route.meta.menuId,
sortLv: 0,
status: true,
fixed: '',
serialNumber: null,
columnType: null,
align: null
},
],
//
//
reportFileList: [],
//
selectReportFileList: [],
selectReportString: '',
//
orderInfo: {
userName: this.$store.state.user.name,
rollNo: '',
customerId: '',
totalQty: 0,
perBoxQty: 0,
boxQty: 0,
lastBoxQty: 0,
//
reportFileList: [],
//
param:[]
},
//
printParamList: [],
//
reportParamList: [],
buttonList:[
],
labelsList:[
],
labels: {
pleaseInBoxNo:'请输入外箱号:',
chooseLabel:'请选择标签:',
printName:'打印格式名称:',
number:'数量',
totalQty:'总数量',
perBoxQty:'每箱数量',
boxQty:'箱数',
lastBoxQty:'末箱数量',
printCan:'打印参数',
labelLook:'标签内容预览',
},
buttons:{
print:'打印',
},
queryButton: {
functionId: functionId,
table_id: '*',
languageCode: this.$i18n.locale,
objectType: 'button'
},
queryLabel: {
functionId: functionId,
table_id: '*',
languageCode: this.$i18n.locale,
objectType: 'label'
},
}
},
watch: {
orderInfo: {
handler: function (val, oldVal) {
if (this.orderInfo.totalQty > 0 && this.orderInfo.perBoxQty > 0) {
this.orderInfo.lastBoxQty = this.decimalUtil.mod(this.orderInfo.totalQty, this.orderInfo.perBoxQty)
if (this.decimalUtil.div(this.orderInfo.totalQty, this.orderInfo.perBoxQty) < 1) {
this.orderInfo.boxQty = 1
} else {
this.orderInfo.boxQty = this.decimalUtil.formatDown(this.decimalUtil.div(this.orderInfo.totalQty, this.orderInfo.perBoxQty), 0)
}
}
},
//
deep: true
},
updateData: {
deep: true,
handler: function (newV, oldV) {
this.updateData.projectID = this.updateData.projectID.toUpperCase();
this.updateData.oriSOOrderNo = this.updateData.oriSOOrderNo.toUpperCase();
this.updateData.orderType = this.updateData.orderType.toUpperCase();
}
}
},
mounted() {
this.$nextTick(() => {
this.height = window.innerHeight - 510;
})
},
methods: {
// bartender
bartenderPrint() {
if (this.selectReportFileList.length === 0) {
this.$message.warning('选择模板进行打印')
return
}
this.orderInfo.reportFileList = this.selectReportFileList
this.orderInfo.param = this.reportParamList
this.printParamList = JSON.parse(JSON.stringify(this.reportParamList))
ouBoxPrintLabel(this.orderInfo).then(({data}) =>{
if (data.code === 0 ){
this.$message.success(data.msg)
}else {
this.$message.warning(data.msg)
}
})
},
//
searchBoxLabelSO() {
this.reportFileList = []
getBoxLabelSOByRollNo(this.rollNo).then(({data}) => {
if (data.code === 0) {
this.orderInfo.customerId = data.data.customerId ? data.data.customerId : '*'
this.orderInfo.totalQty = data.data.sumQty
this.orderInfo.perBoxQty = data.data.boxQty
this.orderInfo.rollNo = this.rollNo
let query = {
customerId: data.data.customerId ? data.data.customerId : '*',
reportFamily: '外箱标签'
}
getReportFileByCustomer(query).then(({data}) => {
if (data.code === 0) {
this.reportFileList = data.dataList
this.$refs.reportFileTable.setCurrentRow(this.reportFileList[0]);
} else {
this.$message.warning(data.msg)
Object.assign(this.$data, this.$options.data.call(this.orderInfo));
Object.assign(this.$data, this.$options.data.call(this.selectReportString));
Object.assign(this.$data, this.$options.data.call(this.reportParamList));
}
})
} else {
this.$message.warning(data.msg)
Object.assign(this.$data, this.$options.data.call(this));
}
})
},
//
getBoxSoAndReportFile() {
this.searchBoxLabelSO()
},
handleClick() {
},
//
handleCurrentChange(val) {
if (!val) return
this.selectReportFileList = []
let query = {
reportId: val.reportid,
defaultFlag: val.DefaultFlag,
reportFile: val.Reportfile,
reportFamily: '外箱标签',
customerId: this.orderInfo.customerId,
}
this.selectReportFileList.push(query)
this.searchReportSubFileList(query)
this.searchReportParameters(query)
},
//
searchReportSubFileList(val) {
let str = ''
str += val.reportId + ' | ' + val.reportFile + '\n'
this.selectReportString = str
getReportSubFileList(val).then(({data}) => {
if (data.code === 0) {
for (let item of data.data) {
str += item.reportid + ' | ' + item.Reportfile + '\n'
let reportFile = {
reportId: item.reportid,
defaultFlag: 'Y',
reportFile: item.Reportfile,
reportFamily: '外箱标签',
customerId: this.orderInfo.customerId,
}
this.selectReportFileList.push(reportFile)
}
this.selectReportString = str
}
})
},
//
searchReportParameters(val) {
let printParamList = JSON.parse(JSON.stringify(this.printParamList))
getReportParameters(val.reportId).then(({data}) => {
if (data.code === 0) {
this.reportParamList = data.data
if (printParamList){
for (let item1 of printParamList) {
for (let item2 of this.reportParamList) {
if (item1.parametername === item2.parametername){
item2.optionvalue = item1.optionvalue
}
}
}
}
}
})
},
/*添加定制的css类*/
customerCellClassName({row, column, rowIndex, columnIndex}) {
if (columnIndex === 2) {
return 'customer-text-cell';
}
},
/*添加定制的cess样式*/
customerCellStyle({row, column, rowIndex, columnIndex}) {
if (columnIndex === 2) {
return 'padding: 0px 0px;';
}
},
//
getMultiLanguageList() {
//
searchFunctionButtonList(this.queryButton).then(({data}) => {
if (data.code == 0) {
this.buttons = data.data
} else {
// saveButtonList(this.buttonList).then(({data}) => {
// })
}
});
//
searchFunctionButtonList(this.queryLabel).then(({data}) => {
if (data.code == 0) {
this.labels = data.data
} else {
// saveButtonList(this.buttonList).then(({data}) => {
// })
}
});
},
},
created() {
//this.getMultiLanguageList()//
}
}
</script>
<style scoped>
/deep/ .customer-tab .el-tabs__content {
padding: 0px !important;
}
/deep/ .sl-el .el-tabs__item {
padding: 0 13px;
height: 26px;
line-height: 26px;
font-size: 12px;
font-weight: 500;
}
/deep/ div.table-input {
padding: 0px 0px;
height: 25px !important;
}
/*table中input*/
div.table-input /deep/ input.el-input__inner {
padding: 0px 0px;
height: 23px !important;
text-align: right;
}
</style>

676
src/views/modules/labelPrint/outer-box-label.vue

@ -1,676 +0,0 @@
<template>
<div class="sl-el">
<el-container>
<el-main style="width: 75%">
<el-row>
<el-col :span="18">
<el-form @submit.native.prevent label-position="top">
<el-form-item style="width: 60%" :label="labels.pleaseInOrder">
<el-input placeholder="请输入内容" v-model="orderNo" class="input-with-select"
@keyup.enter.native="getBoxSoAndReportFile()">
<el-button @click="getBoxSoAndReportFile()" slot="append" icon="el-icon-search"></el-button>
</el-input>
</el-form-item>
</el-form>
</el-col>
<el-col :span="6"></el-col>
</el-row>
<el-row>
<el-col :span="24">
<span>{{labels.chooseLabel}}</span>
<el-table
:data="reportFileList"
border
ref="reportFileTable"
highlight-current-row
@current-change="handleCurrentChange"
height="150px">
<el-table-column
v-for="(item,index) in reportColumnList" :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"
:min-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>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<span>{{labels.printName}}</span>
<el-input type="textarea" v-model="selectReportString" readonly :rows="3"></el-input>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<fieldset class="customer-fieldset" style="width: 100%; margin-left: 0px">
<legend>{{labels.number}}</legend>
<el-form inline="inline" style="width: 100%" label-position="top">
<el-form-item style="width: 23%;" :label="labels.totalQty">
<el-input type="number" v-model="orderInfo.totalQty" min="1"></el-input>
</el-form-item>
<el-form-item style="width: 23%;" :label="labels.perBoxQty">
<el-input type="number" v-model="orderInfo.perBoxQty" min="1"></el-input>
</el-form-item>
<el-form-item style="width: 23%;" :label="labels.boxQty">
<el-input v-model="orderInfo.boxQty" readonly></el-input>
</el-form-item>
<el-form-item style="width: 23%;" :label="labels.lastBoxQty">
<el-input v-model="orderInfo.lastBoxQty" readonly></el-input>
</el-form-item>
</el-form>
</fieldset>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-tabs style="font-size: 14px" v-model="activeName" type="border-card" @tab-click="handleClick"
class="customer-tab">
<el-tab-pane :label="labels.printCan" name="first">
<el-table
:data="reportParamList"
:cell-style="customerCellStyle" :cell-class-name="customerCellClassName"
border
:height="height"
>
<el-table-column
v-for="(item,index) in printParamColumnList" :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"
:min-width="item.columnWidth"
:label="item.columnLabel">
<template slot-scope="scope">
<span v-if="item.columnHidden">
<span v-if="scope.row.valuetypeDb === 'T'">
<el-input v-model='scope.row[item.columnProp]'> </el-input>
</span>
<span v-if="scope.row.valuetypeDb === 'D'">
<el-date-picker style="width: 100%;"
v-model='scope.row[item.columnProp]'> </el-date-picker>
</span>
<span v-if="scope.row.valuetypeDb === 'I'">
<el-input type="number" v-model='scope.row[item.columnProp]' min="1"> </el-input>
</span>
</span>
<span v-else>{{ scope.row[item.columnProp] }}</span>
</template>
</el-table-column>
</el-table>
</el-tab-pane>
<el-tab-pane style="font-size: 12px" :label="labels.labelLook" name="second">
<el-table
border
:height="height"
>
<el-table-column
v-for="(item,index) in reportContextColumnList" :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"
:min-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>
</el-tab-pane>
</el-tabs>
</el-col>
</el-row>
</el-main>
<el-main style="margin-left: 0px">
<el-row>
<el-col :span="6">
<el-form>
<el-form-item style="margin-top: 20px">
</el-form-item>
<el-form-item style="margin-top: 20px">
<el-button type="primary" @click="bartenderPrint">{{buttons.print}}</el-button>
</el-form-item>
</el-form>
</el-col>
</el-row>
</el-main>
</el-container>
</div>
</template>
<script>
import {
getBoxLabelSO,
getReportFileByCustomer,
getReportSubFileList,
getReportParameters,
ouBoxPrintLabel
} from '@/api/print/outBoxPrint.js';
import {
searchFunctionButtonList,
} from "@/api/sysLanguage.js"
var functionId='100007001'
export default {
components: {},
data() {
return {
orderNo: '',
activeName: 'first',
height: 200,
//
reportColumnList: [
{
tableId: "common1001",
tableName: "common",
columnProp: "reportid",
columnLabel: "报告编号",
columnHidden: false,
columnImage: false,
columnSortable: false,
columnWidth: null,
format: null,
functionId: this.$route.meta.menuId,
sortLv: 0,
status: true,
fixed: '',
serialNumber: null,
columnType: null,
align: null
}, {
tableId: "common1001",
tableName: "common",
columnProp: "Reportfile",
columnLabel: "报告文件名",
columnHidden: false,
columnImage: false,
columnSortable: false,
columnWidth: null,
format: null,
functionId: this.$route.meta.menuId,
sortLv: 0,
status: true,
fixed: '',
serialNumber: null,
columnType: null,
align: null
}, {
tableId: "common1001",
tableName: "common",
columnProp: "Remark",
columnLabel: "备注",
columnHidden: false,
columnImage: false,
columnSortable: false,
columnWidth: null,
format: null,
functionId: this.$route.meta.menuId,
sortLv: 0,
status: true,
fixed: '',
serialNumber: null,
columnType: null,
align: null
}, {
tableId: "common1001",
tableName: "common",
columnProp: "DefaultFlag",
columnLabel: "默认格式",
columnHidden: false,
columnImage: false,
columnSortable: false,
columnWidth: null,
format: null,
functionId: this.$route.meta.menuId,
sortLv: 0,
status: true,
fixed: '',
serialNumber: null,
columnType: null,
align: null
},
],
//
printParamColumnList: [
{
tableId: "common1001",
tableName: "common",
columnProp: "parametername",
columnLabel: "参数名",
columnHidden: false,
columnImage: false,
columnSortable: false,
columnWidth: null,
format: null,
functionId: this.$route.meta.menuId,
sortLv: 0,
status: true,
fixed: '',
serialNumber: null,
columnType: null,
align: null
}, {
tableId: "common1001",
tableName: "common",
columnProp: "parameterdesc",
columnLabel: "参数标题",
columnHidden: false,
columnImage: false,
columnSortable: false,
columnWidth: null,
format: null,
functionId: this.$route.meta.menuId,
sortLv: 0,
status: true,
fixed: '',
serialNumber: null,
columnType: null,
align: null
}, {
tableId: "common1001",
tableName: "common",
columnProp: "optionvalue",
columnLabel: "参数值",
columnHidden: true,
columnImage: false,
columnSortable: false,
columnWidth: null,
format: null,
functionId: this.$route.meta.menuId,
sortLv: 0,
status: true,
fixed: '',
serialNumber: null,
columnType: null,
align: null
}, {
tableId: "common1001",
tableName: "common",
columnProp: "valuetype",
columnLabel: "参数类型",
columnHidden: false,
columnImage: false,
columnSortable: false,
columnWidth: null,
format: null,
functionId: this.$route.meta.menuId,
sortLv: 0,
status: true,
fixed: '',
serialNumber: null,
columnType: null,
align: null
},
],
//
reportContextColumnList: [
{
tableId: "common1001",
tableName: "common",
columnProp: "functionId",
columnLabel: "报告编号",
columnHidden: false,
columnImage: false,
columnSortable: false,
columnWidth: null,
format: null,
functionId: this.$route.meta.menuId,
sortLv: 0,
status: true,
fixed: '',
serialNumber: null,
columnType: null,
align: null
}, {
tableId: "common1001",
tableName: "common",
columnProp: "functionId",
columnLabel: "内容描述",
columnHidden: false,
columnImage: false,
columnSortable: false,
columnWidth: null,
format: null,
functionId: this.$route.meta.menuId,
sortLv: 0,
status: true,
fixed: '',
serialNumber: null,
columnType: null,
align: null
}, {
tableId: "common1001",
tableName: "common",
columnProp: "functionId",
columnLabel: "Bartender子字符串名",
columnHidden: false,
columnImage: false,
columnSortable: false,
columnWidth: null,
format: null,
functionId: this.$route.meta.menuId,
sortLv: 0,
status: true,
fixed: '',
serialNumber: null,
columnType: null,
align: null
}, {
tableId: "common1001",
tableName: "common",
columnProp: "functionId",
columnLabel: "内容值",
columnHidden: false,
columnImage: false,
columnSortable: false,
columnWidth: null,
format: null,
functionId: this.$route.meta.menuId,
sortLv: 0,
status: true,
fixed: '',
serialNumber: null,
columnType: null,
align: null
},
],
//
//
reportFileList: [],
//
selectReportFileList: [],
selectReportString: '',
//
orderInfo: {
userName: this.$store.state.user.name,
orderNo: '',
customerId: '',
totalQty: 0,
perBoxQty: 0,
boxQty: 0,
lastBoxQty: 0,
//
reportFileList: [],
//
param: []
},
//
reportParamList: [],
//
printParamList: [],
buttonList:[
],
labelsList:[
],
labels: {
pleaseInOrder:'请输入订单号:',
chooseLabel:'请选择标签:',
printName:'打印格式名称',
number:'数量',
totalQty:'总数量',
perBoxQty:'每箱数量',
boxQty:'箱数',
lastBoxQty:'末箱数量',
printCan:'打印参数',
labelLook:'标签内容预览',
},
buttons:{
print:'打印',
},
queryButton: {
functionId: functionId,
table_id: '*',
languageCode: this.$i18n.locale,
objectType: 'button'
},
queryLabel: {
functionId: functionId,
table_id: '*',
languageCode: this.$i18n.locale,
objectType: 'label'
},
}
},
watch: {
orderInfo: {
handler: function (val, oldVal) {
if (this.orderInfo.totalQty > 0 && this.orderInfo.perBoxQty > 0) {
this.orderInfo.lastBoxQty = this.decimalUtil.mod(this.orderInfo.totalQty, this.orderInfo.perBoxQty)
if (this.decimalUtil.div(this.orderInfo.totalQty, this.orderInfo.perBoxQty) < 1) {
this.orderInfo.boxQty = 1
} else {
this.orderInfo.boxQty = this.decimalUtil.formatDown(this.decimalUtil.div(this.orderInfo.totalQty, this.orderInfo.perBoxQty), 0)
}
}
},
//
deep: true
},
updateData: {
deep: true,
handler: function (newV, oldV) {
this.updateData.projectID = this.updateData.projectID.toUpperCase();
this.updateData.oriSOOrderNo = this.updateData.oriSOOrderNo.toUpperCase();
this.updateData.orderType = this.updateData.orderType.toUpperCase();
}
}
},
mounted() {
this.$nextTick(() => {
this.height = window.innerHeight - 510;
})
},
methods: {
// bartender
bartenderPrint() {
if (this.selectReportFileList.length === 0) {
this.$message.warning('选择模板进行打印')
return
}
this.orderInfo.reportFileList = this.selectReportFileList
this.orderInfo.param = this.reportParamList
this.printParamList = JSON.parse(JSON.stringify(this.reportParamList))
ouBoxPrintLabel(this.orderInfo).then(({data}) => {
if (data.code === 0) {
this.$message.success(data.msg)
} else {
this.$message.warning(data.msg)
}
})
},
//
searchBoxLabelSO() {
this.reportFileList = []
getBoxLabelSO(this.orderNo).then(({data}) => {
if (data.code === 0) {
this.orderInfo.customerId = data.data.customerId ? data.data.customerId : '*'
this.orderInfo.totalQty = data.data.sumQty
this.orderInfo.perBoxQty = data.data.boxQty
this.orderInfo.orderNo = this.orderNo
let query = {
customerId: data.data.customerId ? data.data.customerId : '*',
reportFamily: '外箱标签'
}
getReportFileByCustomer(query).then(({data}) => {
if (data.code === 0) {
this.reportFileList = data.dataList
this.$refs.reportFileTable.setCurrentRow(this.reportFileList[0]);
} else {
this.$message.warning(data.msg)
Object.assign(this.$data, this.$options.data.call(this.orderInfo));
Object.assign(this.$data, this.$options.data.call(this.selectReportString));
Object.assign(this.$data, this.$options.data.call(this.reportParamList));
}
})
} else {
this.$message.warning(data.msg)
Object.assign(this.$data, this.$options.data.call(this));
}
})
},
//
getBoxSoAndReportFile() {
this.searchBoxLabelSO()
},
handleClick() {
},
//
handleCurrentChange(val) {
if (!val) return
this.selectReportFileList = []
let query = {
reportId: val.reportid,
defaultFlag: val.DefaultFlag,
reportFile: val.Reportfile,
reportFamily: '外箱标签',
customerId: this.orderInfo.customerId,
}
this.selectReportFileList.push(query)
this.searchReportSubFileList(query)
this.searchReportParameters(query)
},
//
searchReportSubFileList(val) {
let str = ''
str += val.reportId + ' | ' + val.reportFile + '\n'
this.selectReportString = str
getReportSubFileList(val).then(({data}) => {
if (data.code === 0) {
for (let item of data.data) {
str += item.reportid + ' | ' + item.Reportfile + '\n'
let reportFile = {
reportId: item.reportid,
defaultFlag: 'Y',
reportFile: item.Reportfile,
reportFamily: '外箱标签',
customerId: this.orderInfo.customerId,
}
this.selectReportFileList.push(reportFile)
}
this.selectReportString = str
}
})
},
//
searchReportParameters(val) {
let printParamList = JSON.parse(JSON.stringify(this.printParamList))
//
getReportParameters(val.reportId).then(({data}) => {
if (data.code === 0) {
//
this.reportParamList = data.data
if (printParamList){
for (let item1 of printParamList) {
for (let item2 of this.reportParamList) {
if (item1.parametername === item2.parametername){
item2.optionvalue = item1.optionvalue
}
}
}
}
}
})
},
/*添加定制的css类*/
customerCellClassName({row, column, rowIndex, columnIndex}) {
if (columnIndex === 2) {
return 'customer-text-cell';
}
},
/*添加定制的cess样式*/
customerCellStyle({row, column, rowIndex, columnIndex}) {
if (columnIndex === 2) {
return 'padding: 0px 0px;';
}
},
//
getMultiLanguageList() {
//
searchFunctionButtonList(this.queryButton).then(({data}) => {
if (data.code == 0) {
this.buttons = data.data
} else {
// saveButtonList(this.buttonList).then(({data}) => {
// })
}
});
//
searchFunctionButtonList(this.queryLabel).then(({data}) => {
if (data.code == 0) {
this.labels = data.data
} else {
// saveButtonList(this.buttonList).then(({data}) => {
// })
}
});
},
},
created() {
// this.getMultiLanguageList()//
}
}
</script>
<style scoped>
/deep/ .customer-tab .el-tabs__content {
padding: 0px !important;
}
/deep/ .sl-el .el-tabs__item {
padding: 0 13px;
height: 26px;
line-height: 26px;
font-size: 12px;
font-weight: 500;
}
/deep/ div.table-input {
padding: 0px 0px;
height: 25px !important;
}
/*table中input*/
div.table-input /deep/ input.el-input__inner {
padding: 0px 0px;
height: 23px !important;
text-align: right;
}
</style>

566
src/views/modules/labelPrint/roll-label.vue

@ -1,566 +0,0 @@
<template>
<div class="sl-el">
<el-container>
<el-main style="width: 75%">
<el-row>
<el-col :span="18">
<el-form @submit.native.prevent label-position="top">
<el-form-item style="width: 60%" :label="labels.pleaseInRollNo">
<el-input placeholder="请输入内容" v-model="rollNos" class="input-with-select"
@keyup.enter.native="getBoxSoAndReportFile()">
<el-button @click="getBoxSoAndReportFile()" slot="append" icon="el-icon-search"></el-button>
</el-input>
</el-form-item>
</el-form>
</el-col>
<el-col :span="6"></el-col>
</el-row>
<el-row>
<el-col :span="24">
<span>{{labels.chooseLabel}}</span>
<el-table
:data="reportFileList"
border
ref="reportFileTable"
highlight-current-row
@current-change="handleCurrentChange"
height="150px">
<el-table-column
v-for="(item,index) in reportColumnList" :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"
:min-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>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<span>{{labels.printName}}</span>
<el-input type="textarea" v-model="selectReportString" readonly :rows="3"></el-input>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-tabs style="font-size: 14px" v-model="activeName" type="border-card" @tab-click="handleClick"
class="customer-tab">
<el-tab-pane :label="labels.printCan" name="first">
<el-table
:data="reportParamList"
:cell-style="customerCellStyle" :cell-class-name="customerCellClassName"
border
:height="height"
>
<el-table-column
v-for="(item,index) in printParamColumnList" :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"
:min-width="item.columnWidth"
:label="item.columnLabel">
<template slot-scope="scope">
<span v-if="item.columnHidden">
<span v-if="scope.row.valuetypeDb === 'T'">
<el-input v-model='scope.row[item.columnProp]'> </el-input>
</span>
<span v-if="scope.row.valuetypeDb === 'D'">
<el-date-picker style="width: 100%;"
v-model='scope.row[item.columnProp]'> </el-date-picker>
</span>
<span v-if="scope.row.valuetypeDb === 'I'">
<el-input type="number" v-model='scope.row[item.columnProp]' min="1"> </el-input>
</span>
</span>
<span v-else>{{ scope.row[item.columnProp] }}</span>
</template>
</el-table-column>
</el-table>
</el-tab-pane>
</el-tabs>
</el-col>
</el-row>
</el-main>
<el-main style="margin-left: 0px">
<el-row>
<el-col :span="6">
<el-form>
<el-form-item style="margin-top: 20px">
</el-form-item>
<el-form-item style="margin-top: 20px">
<el-button type="primary" @click="bartenderPrint">{{buttons.print}}</el-button>
</el-form-item>
</el-form>
</el-col>
</el-row>
</el-main>
</el-container>
</div>
</template>
<script>
var functionId='100007004'
import {
checkRollCustomer,
getRollCustomer,
getReportFileByCustomer,
getReportSubFileList,
getReportParameters,
printLabel
} from '@/api/print/rollPrint.js';
import {
searchFunctionButtonList,
} from "@/api/sysLanguage.js"
export default {
components: {},
data() {
return {
rollNos: '',
activeName: 'first',
height: 200,
//
reportColumnList: [
{
tableId: "common1001",
tableName: "common",
columnProp: "reportid",
columnLabel: "报告编号",
columnHidden: false,
columnImage: false,
columnSortable: false,
columnWidth: null,
format: null,
functionId: this.$route.meta.menuId,
sortLv: 0,
status: true,
fixed: '',
serialNumber: null,
columnType: null,
align: null
}, {
tableId: "common1001",
tableName: "common",
columnProp: "Reportfile",
columnLabel: "报告文件名",
columnHidden: false,
columnImage: false,
columnSortable: false,
columnWidth: null,
format: null,
functionId: this.$route.meta.menuId,
sortLv: 0,
status: true,
fixed: '',
serialNumber: null,
columnType: null,
align: null
}, {
tableId: "common1001",
tableName: "common",
columnProp: "Remark",
columnLabel: "备注",
columnHidden: false,
columnImage: false,
columnSortable: false,
columnWidth: null,
format: null,
functionId: this.$route.meta.menuId,
sortLv: 0,
status: true,
fixed: '',
serialNumber: null,
columnType: null,
align: null
}, {
tableId: "common1001",
tableName: "common",
columnProp: "DefaultFlag",
columnLabel: "默认格式",
columnHidden: false,
columnImage: false,
columnSortable: false,
columnWidth: null,
format: null,
functionId: this.$route.meta.menuId,
sortLv: 0,
status: true,
fixed: '',
serialNumber: null,
columnType: null,
align: null
},
],
//
printParamColumnList: [
{
tableId: "common1001",
tableName: "common",
columnProp: "parametername",
columnLabel: "参数名",
columnHidden: false,
columnImage: false,
columnSortable: false,
columnWidth: null,
format: null,
functionId: this.$route.meta.menuId,
sortLv: 0,
status: true,
fixed: '',
serialNumber: null,
columnType: null,
align: null
}, {
tableId: "common1001",
tableName: "common",
columnProp: "parameterdesc",
columnLabel: "参数标题",
columnHidden: false,
columnImage: false,
columnSortable: false,
columnWidth: null,
format: null,
functionId: this.$route.meta.menuId,
sortLv: 0,
status: true,
fixed: '',
serialNumber: null,
columnType: null,
align: null
}, {
tableId: "common1001",
tableName: "common",
columnProp: "optionvalue",
columnLabel: "参数值",
columnHidden: true,
columnImage: false,
columnSortable: false,
columnWidth: null,
format: null,
functionId: this.$route.meta.menuId,
sortLv: 0,
status: true,
fixed: '',
serialNumber: null,
columnType: null,
align: null
}, {
tableId: "common1001",
tableName: "common",
columnProp: "valuetype",
columnLabel: "参数类型",
columnHidden: false,
columnImage: false,
columnSortable: false,
columnWidth: null,
format: null,
functionId: this.$route.meta.menuId,
sortLv: 0,
status: true,
fixed: '',
serialNumber: null,
columnType: null,
align: null
},
],
//
//
reportFileList: [],
//
selectReportFileList: [],
selectReportString: '',
//
orderInfo: {
userName: this.$store.state.user.name,
rollNo: '',
customerId: '0000',
totalQty: 0,
perBoxQty: 0,
boxQty: 0,
lastBoxQty: 0,
rollNos:[],
//
reportFileList: [],
//
param: []
},
//
printParamList: [],
//
reportParamList: [],
buttonList:[
],
labelsList:[
],
labels: {
pleaseInRollNo:'请输入卷号:',
chooseLabel:'请选择标签:',
printName:'打印格式名称:',
printCan:'打印参数',
labelLook:'标签内容预览',
},
buttons:{
print:'打印',
},
queryButton: {
functionId: functionId,
table_id: '*',
languageCode: this.$i18n.locale,
objectType: 'button'
},
queryLabel: {
functionId: functionId,
table_id: '*',
languageCode: this.$i18n.locale,
objectType: 'label'
},
}
},
watch: {
orderInfo: {
handler: function (val, oldVal) {
if (this.orderInfo.totalQty > 0 && this.orderInfo.perBoxQty > 0) {
this.orderInfo.lastBoxQty = this.decimalUtil.mod(this.orderInfo.totalQty, this.orderInfo.perBoxQty)
if (this.decimalUtil.div(this.orderInfo.totalQty, this.orderInfo.perBoxQty) < 1) {
this.orderInfo.boxQty = 1
} else {
this.orderInfo.boxQty = this.decimalUtil.formatDown(this.decimalUtil.div(this.orderInfo.totalQty, this.orderInfo.perBoxQty), 0)
}
}
},
//
deep: true
},
updateData: {
deep: true,
handler: function (newV, oldV) {
this.updateData.projectID = this.updateData.projectID.toUpperCase();
this.updateData.oriSOOrderNo = this.updateData.oriSOOrderNo.toUpperCase();
this.updateData.orderType = this.updateData.orderType.toUpperCase();
}
}
},
mounted() {
this.$nextTick(() => {
this.height = window.innerHeight - 450;
})
},
methods: {
// bartender
bartenderPrint() {
if (!this.rollNos) {
this.$message.warning('请输入卷号')
return
}
if (this.selectReportFileList.length === 0) {
this.$message.warning('选择模板进行打印')
return
}
let rollNoList = this.rollNos.split(";")
this.orderInfo.reportFileList = this.selectReportFileList
this.orderInfo.param = this.reportParamList
this.orderInfo.rollNos = rollNoList
this.printParamList = JSON.parse(JSON.stringify(this.reportParamList))
printLabel(this.orderInfo).then(({data}) =>{
if (data.code === 0 ){
this.$message.success(data.msg)
}else {
this.$message.warning(data.msg)
}
})
},
//
searchBoxLabelSO() {
if (!this.rollNos) {
this.$message.warning('请输入卷号')
return
}
let rollNoList = this.rollNos.split(";")
this.reportFileList = []
checkRollCustomer(rollNoList).then(({data}) => {
if (data.code === 0) {
getRollCustomer(rollNoList[0]).then(({data}) => {
if (data.code === 0){
this.orderInfo.customerId = data.data.customerId ? data.data.customerId : '*'
let query = {
customerId: data.data.customerId ? data.data.customerId : '*',
reportFamily: '卷标签'
}
getReportFileByCustomer(query).then(({data}) => {
if (data.code === 0) {
this.reportFileList = data.dataList
this.$refs.reportFileTable.setCurrentRow(this.reportFileList[0]);
} else {
this.$message.warning(data.msg)
Object.assign(this.$data, this.$options.data.call(this.orderInfo));
Object.assign(this.$data, this.$options.data.call(this.selectReportString));
Object.assign(this.$data, this.$options.data.call(this.reportParamList));
}
})
}else {
this.$message.warning(data.msg)
}
})
} else {
this.$message.warning(data.msg)
}
})
},
//
getBoxSoAndReportFile() {
this.searchBoxLabelSO()
},
handleClick() {
},
//
handleCurrentChange(val) {
if (!val) return
this.selectReportFileList = []
let query = {
reportId: val.reportid,
defaultFlag: val.DefaultFlag,
reportFile: val.Reportfile,
reportFamily: '卷标签',
customerId: this.orderInfo.customerId,
}
this.selectReportFileList.push(query)
this.searchReportSubFileList(query)
this.searchReportParameters(query)
},
//
searchReportSubFileList(val) {
let str = ''
str += val.reportId + ' | ' + val.reportFile + '\n'
this.selectReportString = str
getReportSubFileList(val).then(({data}) => {
if (data.code === 0) {
for (let item of data.data) {
str += item.reportid + ' | ' + item.Reportfile + '\n'
let reportFile = {
reportId: item.reportid,
defaultFlag: 'Y',
reportFile: item.Reportfile,
reportFamily: '外箱标签',
customerId: this.orderInfo.customerId,
}
this.selectReportFileList.push(reportFile)
}
this.selectReportString = str
}
})
},
//
searchReportParameters(val) {
let printParamList = JSON.parse(JSON.stringify(this.printParamList))
getReportParameters(val.reportId).then(({data}) => {
if (data.code === 0) {
this.reportParamList = data.data
if (printParamList) {
for (let item1 of printParamList) {
for (let item2 of this.reportParamList) {
if (item1.parametername === item2.parametername) {
item2.optionvalue = item1.optionvalue
}
}
}
}
}
})
},
/*添加定制的css类*/
customerCellClassName({row, column, rowIndex, columnIndex}) {
if (columnIndex === 2) {
return 'customer-text-cell';
}
},
/*添加定制的cess样式*/
customerCellStyle({row, column, rowIndex, columnIndex}) {
if (columnIndex === 2) {
return 'padding: 0px 0px;';
}
},
//
getMultiLanguageList() {
//
searchFunctionButtonList(this.queryButton).then(({data}) => {
if (data.code == 0) {
this.buttons = data.data
} else {
// saveButtonList(this.buttonList).then(({data}) => {
// })
}
});
//
searchFunctionButtonList(this.queryLabel).then(({data}) => {
if (data.code == 0) {
this.labels = data.data
} else {
// saveButtonList(this.buttonList).then(({data}) => {
// })
}
});
},
},
created() {
// this.getMultiLanguageList()//
}
}
</script>
<style scoped>
/deep/ .customer-tab .el-tabs__content {
padding: 0px !important;
}
/deep/ .sl-el .el-tabs__item {
padding: 0 13px;
height: 26px;
line-height: 26px;
font-size: 12px;
font-weight: 500;
}
/deep/ div.table-input {
padding: 0px 0px;
height: 25px !important;
}
/*table中input*/
div.table-input /deep/ input.el-input__inner {
padding: 0px 0px;
height: 23px !important;
text-align: right;
}
</style>
Loading…
Cancel
Save