|
|
|
@ -1,19 +1,41 @@ |
|
|
|
<template> |
|
|
|
<div class="mod-config"> |
|
|
|
<div> |
|
|
|
<div class="sl"> |
|
|
|
<div ref="sl_search"> |
|
|
|
<span @click="favoriteFunction()"> |
|
|
|
<icon-svg :name="favorite?'xiangqufill':'xiangqu'" class="sl-svg"></icon-svg> |
|
|
|
</span> |
|
|
|
|
|
|
|
<el-button @click="searchList()" type="primary">{{ buttons.search }}</el-button> |
|
|
|
<el-button @click="searchShowDiv()" type="primary">{{ buttons.search }}</el-button> |
|
|
|
<el-button @click="userSetting" type="primary">{{ buttons.settingTable }}</el-button> |
|
|
|
<el-button @click="saveColumnList()" type="primary" v-show="showDefault">{{ buttons.defaultTable }} |
|
|
|
<el-button v-if="isAuth('sys:setting')" @click="saveColumnList()" type="primary" v-show="showDefault">{{ buttons.defaultTable }} |
|
|
|
</el-button> |
|
|
|
|
|
|
|
|
|
|
|
<el-form :inline="true" label-position="top" :model="queryData" @keyup.enter.native="searchList()" |
|
|
|
v-show="searchShow"> |
|
|
|
<el-form-item label="箱号"> |
|
|
|
<el-input style="width: 150px" v-model="queryData.boxNo" clearable> |
|
|
|
</el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="销售单号"> |
|
|
|
<el-input style="width: 150px" v-model="queryData.orderNo" clearable> |
|
|
|
</el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="物料编号"> |
|
|
|
<el-input style="width: 150px" v-model="queryData.itemCode" clearable> |
|
|
|
</el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="创建时间"> |
|
|
|
<el-date-picker style="width: 150px" value-format="yyyy-MM-dd HH:mm:ss" type="date" |
|
|
|
v-model="queryData.createdDate"> |
|
|
|
</el-date-picker> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label=" - "> |
|
|
|
<el-button @click="searchList()" type="primary">{{ buttons.select }}</el-button> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
<el-table |
|
|
|
|
|
|
|
:height="height" |
|
|
|
:data="dataList" |
|
|
|
border |
|
|
|
@ -30,9 +52,10 @@ |
|
|
|
: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> |
|
|
|
{{ scope.row[item.columnProp] }} |
|
|
|
<!-- <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 |
|
|
|
@ -40,41 +63,55 @@ |
|
|
|
header-align="center" |
|
|
|
align="center" |
|
|
|
width="150" |
|
|
|
label="操作"> |
|
|
|
:label="buttons.cz"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<a type="text" size="small" @click="openPrintDialog(scope.row)" herf="#">补打标签</a> |
|
|
|
<a type="text" size="small" @click="openPrintDialog(scope.row)" herf="#">{{ buttons.boxPrint }}</a> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
<!-- 设置列 --> |
|
|
|
<column v-if="visible" ref="column" @refreshData="getTableUserColumn"></column> |
|
|
|
|
|
|
|
|
|
|
|
<!-- 模板列表 --> |
|
|
|
<el-dialog |
|
|
|
:title="msgData.printDialog" |
|
|
|
v-drag |
|
|
|
:title="pageLanguageData.printDialog" |
|
|
|
:visible.sync="printVisible" |
|
|
|
width="30%" |
|
|
|
width="220px" |
|
|
|
center> |
|
|
|
<el-select :placeholder="msgData.printTemplateMsg" v-model="reportFileVo"> |
|
|
|
<el-option v-for="(item,index) in printTemplates" :key="index" :label="item.reportFileVo" :value="item"></el-option> |
|
|
|
</el-select> |
|
|
|
<dev style="margin: 0 auto"> |
|
|
|
<el-select style="width: 200px" :placeholder="pageLanguageData.printTemplateMsg" v-model="reportFileVo"> |
|
|
|
<el-option v-for="(item,index) in printTemplates" :key="index" :label="item.reportFileVo" |
|
|
|
:value="item.reportIdVo"></el-option> |
|
|
|
</el-select> |
|
|
|
</dev> |
|
|
|
|
|
|
|
<span slot="footer" class="dialog-footer"> |
|
|
|
<el-button @click="printVisible = false">取 消</el-button> |
|
|
|
<el-button type="primary" @click="printBox()">打印</el-button> |
|
|
|
<el-button type="primary" @click="printBox()">{{ buttons.print }}</el-button> |
|
|
|
<el-button @click="printVisible = false">{{ buttons.close }}</el-button> |
|
|
|
</span> |
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
<!-- 设置列 --> |
|
|
|
<column v-if="visible" ref="column" @refreshData="getTableUserColumn"></column> |
|
|
|
|
|
|
|
|
|
|
|
</div> |
|
|
|
</template> |
|
|
|
|
|
|
|
<script> |
|
|
|
|
|
|
|
import {getSoBoxingList,getReportFileListByCustomerId,getCustomerId,printPacking} from '@/api/finishedProductWarehouse/soBoxes.js' |
|
|
|
import { |
|
|
|
getSoBoxingList, |
|
|
|
getReportFileListByCustomerId, |
|
|
|
getCustomerId, |
|
|
|
printPacking |
|
|
|
} from '@/api/finishedProductWarehouse/soBoxes.js' |
|
|
|
import column from "../common/column"; |
|
|
|
import search from "../common/search"; |
|
|
|
import { |
|
|
|
searchSysLanguageParam, |
|
|
|
searchFunctionButtonList, |
|
|
|
saveButtonList, |
|
|
|
searchPageLanguageData |
|
|
|
} from "@/api/sysLanguage.js" |
|
|
|
import { |
|
|
|
saveTableDefaultList, |
|
|
|
@ -100,16 +137,15 @@ export default { |
|
|
|
visible: false, |
|
|
|
showDefault: false, |
|
|
|
queryData: { |
|
|
|
day: '', |
|
|
|
rollno: '', |
|
|
|
partno: '' |
|
|
|
}, |
|
|
|
reportFileVo:{ |
|
|
|
reportFamily: '', |
|
|
|
reportId: '', |
|
|
|
isCustomer: '' |
|
|
|
boxNo: '', |
|
|
|
orderNo: '', |
|
|
|
itemCode: '', |
|
|
|
createdDate: this.dayjs().format('YYYY-MM-DD HH:mm:ss') |
|
|
|
}, |
|
|
|
reportFileVo: '', |
|
|
|
boxNumber: 0, |
|
|
|
itemCode: '', |
|
|
|
orderNo: '', |
|
|
|
// 打印模板列表 |
|
|
|
printTemplates: [], |
|
|
|
// 语言词典集合 |
|
|
|
@ -310,6 +346,98 @@ export default { |
|
|
|
} |
|
|
|
], |
|
|
|
dataList: [], |
|
|
|
pageLanguageDataList: [ |
|
|
|
{ |
|
|
|
functionId: "1001", |
|
|
|
languageValue: '操作', |
|
|
|
objectId: 'operate', |
|
|
|
objectType: "page", |
|
|
|
tableId: "boxingPrint" |
|
|
|
}, |
|
|
|
{ |
|
|
|
functionId: "1001", |
|
|
|
languageValue: '销售单号', |
|
|
|
objectId: 'shopOrderNo', |
|
|
|
objectType: "page", |
|
|
|
tableId: "boxingPrint" |
|
|
|
}, |
|
|
|
{ |
|
|
|
functionId: "1001", |
|
|
|
languageValue: '箱号', |
|
|
|
objectId: 'boxNo', |
|
|
|
objectType: "page", |
|
|
|
tableId: "boxingPrint" |
|
|
|
}, |
|
|
|
{ |
|
|
|
functionId: "1001", |
|
|
|
languageValue: '物料编号', |
|
|
|
objectId: 'partNo', |
|
|
|
objectType: "page", |
|
|
|
tableId: "boxingPrint" |
|
|
|
}, |
|
|
|
{ |
|
|
|
functionId: "1001", |
|
|
|
languageValue: '创建时间', |
|
|
|
objectId: 'createdDate', |
|
|
|
objectType: "page", |
|
|
|
tableId: "boxingPrint" |
|
|
|
}, |
|
|
|
{ |
|
|
|
functionId: "1001", |
|
|
|
languageValue: '搜索', |
|
|
|
objectId: 'search', |
|
|
|
objectType: "page", |
|
|
|
tableId: "boxingPrint" |
|
|
|
}, |
|
|
|
{ |
|
|
|
functionId: "1001", |
|
|
|
languageValue: '设置列表', |
|
|
|
objectId: 'setting', |
|
|
|
objectType: "page", |
|
|
|
tableId: "boxingPrint" |
|
|
|
}, |
|
|
|
{ |
|
|
|
functionId: "1001", |
|
|
|
languageValue: '取消', |
|
|
|
objectId: 'recall', |
|
|
|
objectType: "page", |
|
|
|
tableId: "boxingPrint" |
|
|
|
}, |
|
|
|
{ |
|
|
|
functionId: "1001", |
|
|
|
languageValue: '打印', |
|
|
|
objectId: 'print', |
|
|
|
objectType: "page", |
|
|
|
tableId: "boxingPrint" |
|
|
|
}, |
|
|
|
{ |
|
|
|
functionId: "1001", |
|
|
|
languageValue: '请选择模板', |
|
|
|
objectId: 'printTemplateMsg', |
|
|
|
objectType: "page", |
|
|
|
tableId: "boxingPrint" |
|
|
|
}, |
|
|
|
{ |
|
|
|
functionId: "1001", |
|
|
|
languageValue: '打印模板选择', |
|
|
|
objectId: 'printDialog', |
|
|
|
objectType: "page", |
|
|
|
tableId: "boxingPrint" |
|
|
|
}, |
|
|
|
{ |
|
|
|
functionId: "1001", |
|
|
|
languageValue: '标签打印', |
|
|
|
objectId: 'labelPrint', |
|
|
|
objectType: "page", |
|
|
|
tableId: "boxingPrint" |
|
|
|
} |
|
|
|
], |
|
|
|
queryPageLang: { |
|
|
|
functionId: "1001", |
|
|
|
objectType: "page", |
|
|
|
tableId: "boxingPrint", |
|
|
|
languageCode: this.$i18n.locale |
|
|
|
}, |
|
|
|
buttons: { |
|
|
|
add: '添加', |
|
|
|
edit: '编辑', |
|
|
|
@ -317,11 +445,15 @@ export default { |
|
|
|
deleteList: '批量删除', |
|
|
|
cz: '操作', |
|
|
|
search: '搜索', |
|
|
|
select: '查询', |
|
|
|
download: '导出', |
|
|
|
settingTable: '设置列表', |
|
|
|
defaultTable: '设置默认配置' |
|
|
|
defaultTable: '设置默认配置', |
|
|
|
print: '打印', |
|
|
|
close: '取消', |
|
|
|
boxPrint: '标签打印' |
|
|
|
}, |
|
|
|
msgData: { |
|
|
|
pageLanguageData: { |
|
|
|
printDialog: "打印模板选择", |
|
|
|
printTemplateMsg: "请选择模板", |
|
|
|
}, |
|
|
|
@ -335,64 +467,83 @@ export default { |
|
|
|
search |
|
|
|
}, |
|
|
|
mounted() { |
|
|
|
this.$nextTick(() => { |
|
|
|
this.height = window.innerHeight - 165; |
|
|
|
}) |
|
|
|
this.getAutoHeight() |
|
|
|
}, |
|
|
|
activated() { |
|
|
|
this.searchList() |
|
|
|
}, |
|
|
|
|
|
|
|
methods: { |
|
|
|
// 打开搜索条件 |
|
|
|
searchShowDiv() { |
|
|
|
if (this.searchShow) { |
|
|
|
this.searchShow = false |
|
|
|
} else { |
|
|
|
this.searchShow = true |
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
// 打开打印模态框 |
|
|
|
openPrintDialog(val){ |
|
|
|
this.boxNumber =val.rollsQty |
|
|
|
openPrintDialog(val) { |
|
|
|
this.boxNumber = val.rollsQty |
|
|
|
this.itemCode = val.itemCode |
|
|
|
this.orderNo = val.orderNo |
|
|
|
this.printVisible = true |
|
|
|
this.getReportFileListByCustomerId(val.itemCode) |
|
|
|
}, |
|
|
|
// 打印 |
|
|
|
printBox(){ |
|
|
|
printBox() { |
|
|
|
this.printVisible = false |
|
|
|
let reportFile = this.reportFileVo.split(":"); |
|
|
|
|
|
|
|
let reportFileVo = { |
|
|
|
reportFamily: this.reportFileVo.reportFamily, |
|
|
|
reportId: this.reportFileVo.reportId, |
|
|
|
isCustomer: this.reportFileVo.isCustomer, |
|
|
|
pickingNumber: this.boxNumber |
|
|
|
reportFile: reportFile[2], |
|
|
|
reportId: reportFile[1], |
|
|
|
isCustomer: reportFile[0], |
|
|
|
pickingNumber: this.boxNumber, |
|
|
|
partNo: this.itemCode, |
|
|
|
orderNo: this.orderNo |
|
|
|
} |
|
|
|
printPacking(reportFileVo).then(({data})=>{ |
|
|
|
if (data.code == 0){ |
|
|
|
printPacking(reportFileVo).then(({data}) => { |
|
|
|
if (data.code == 0) { |
|
|
|
this.$message.success(data.msg) |
|
|
|
} |
|
|
|
if (data.code == 500){ |
|
|
|
if (data.code == 500) { |
|
|
|
this.$message.error(data.msg) |
|
|
|
} |
|
|
|
|
|
|
|
}).error(({data})=>{ |
|
|
|
this.$message.error(data.msg) |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 获取打印模板数据 |
|
|
|
getReportFileListByCustomerId(partNo){ |
|
|
|
getReportFileListByCustomerId(partNo) { |
|
|
|
let vo = { |
|
|
|
partNo: partNo |
|
|
|
} |
|
|
|
getCustomerId(vo).then((data)=>{ |
|
|
|
getCustomerId(vo).then((data) => { |
|
|
|
let reportFileVo = { |
|
|
|
customerId: data. customerId, |
|
|
|
customerId: data.customerId, |
|
|
|
reportFamily: '外箱标签' |
|
|
|
} |
|
|
|
getReportFileListByCustomerId(reportFileVo).then(({data}) =>{ |
|
|
|
this.printTemplates = data.reportFileVos |
|
|
|
getReportFileListByCustomerId(reportFileVo).then(({data}) => { |
|
|
|
this.printTemplates = data.reportFileVos |
|
|
|
this.reportFileVo = data.reportFileVos[0].reportIdVo |
|
|
|
}) |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 获取数据 |
|
|
|
searchList() { |
|
|
|
let soBoxing = {} |
|
|
|
getSoBoxingList(soBoxing).then(({data}) => { |
|
|
|
getSoBoxingList(this.queryData).then(({data}) => { |
|
|
|
this.dataList = data.data |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
// 这个方法用来动态设置 height |
|
|
|
getAutoHeight() { |
|
|
|
// 一定要使用 nextTick 来改变height 不然不会起作用 |
|
|
|
this.$nextTick(() => { |
|
|
|
this.height = window.innerHeight - 174; |
|
|
|
}); |
|
|
|
}, |
|
|
|
// 校验用户是否收藏 |
|
|
|
favoriteIsOk() { |
|
|
|
let userFavorite = { |
|
|
|
@ -435,6 +586,16 @@ export default { |
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
// 获取页面所有语言数据 |
|
|
|
// 获取页面提示信息 |
|
|
|
getPageLanguageData() { |
|
|
|
searchPageLanguageData(this.queryPageLang).then((data) => { |
|
|
|
if (JSON.stringify(data.data) != '{}') { |
|
|
|
this.pageLanguageData = data.data |
|
|
|
} else { |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 获取button的词典 |
|
|
|
getFunctionButtonList() { |
|
|
|
let queryButton = { |
|
|
|
@ -495,6 +656,8 @@ export default { |
|
|
|
this.showDefault = false |
|
|
|
saveButtonList(this.buttonList).then(({data}) => { |
|
|
|
}) |
|
|
|
saveButtonList(this.buttonList).then(({data}) => { |
|
|
|
}) |
|
|
|
saveTableDefaultList(this.columnList).then(({data}) => { |
|
|
|
if (data.code == 0) { |
|
|
|
this.$message.success(data.msg) |
|
|
|
@ -504,8 +667,9 @@ export default { |
|
|
|
this.$message.error(data.msg) |
|
|
|
} |
|
|
|
}) |
|
|
|
this.getFunctionButtonList(); |
|
|
|
this.getColumnList() |
|
|
|
/* this.getFunctionButtonList(); |
|
|
|
this.getPageLanguageData() |
|
|
|
this.getColumnList()*/ |
|
|
|
}, |
|
|
|
// 获取 tableDefault 列 |
|
|
|
getColumnList() { |
|
|
|
@ -533,9 +697,15 @@ export default { |
|
|
|
} |
|
|
|
} |
|
|
|
</script> |
|
|
|
<style scoped> |
|
|
|
<style> |
|
|
|
.sl-svg { |
|
|
|
overflow: hidden; |
|
|
|
float: right; |
|
|
|
} |
|
|
|
|
|
|
|
.el-dialog--center .el-dialog__body { |
|
|
|
text-align: center; |
|
|
|
padding: 0; |
|
|
|
} |
|
|
|
|
|
|
|
</style> |