dev2 #1
@ -5,5 +5,5 @@
|
||||
window.ver = "2.0.278";
|
||||
window.SYS = {CONFIG:{}, URL:{}};</script><script>window._AMapSecurityConfig = {
|
||||
securityJsCode:"07788e7ebd7e913985722bfc5986999f"
|
||||
}</script><script src="https://mall.gpxscs.cn/admin/config.js?v=2.0.278"></script><script src="https://mall.gpxscs.cn/admin/im/libs3.6.0.min.js?v=2.0.278"></script><script src="https://mall.gpxscs.cn/admin/im/im.js?v=2.0.278"></script><link href="static/css/chunk-0cde5704.e0277cf5.css" rel="prefetch"><link href="static/css/chunk-19648027.83a11e8c.css" rel="prefetch"><link href="static/css/vab-extra.f3d407d7.css" rel="prefetch"><link href="static/js/chunk-0cde5704.fbb6773a.js" rel="prefetch"><link href="static/js/chunk-19648027.6233a553.js" rel="prefetch"><link href="static/js/vab-extra.29abc81b.js" rel="prefetch"><link href="static/css/app.1f390f7c.css" rel="preload" as="style"><link href="static/css/element-ui.0e3a750b.css" rel="preload" as="style"><link href="static/js/app.45b6bf3d.js" rel="preload" as="script"><link href="static/js/element-ui.4e8e0db4.js" rel="preload" as="script"><link href="static/js/vue.11eaebc3.js" rel="preload" as="script"><link href="static/css/element-ui.0e3a750b.css" rel="stylesheet"><link href="static/css/app.1f390f7c.css" rel="stylesheet"><link rel="icon" type="image/png" sizes="32x32" href="img/icons/favicon-32x32.png"><link rel="icon" type="image/png" sizes="16x16" href="img/icons/favicon-16x16.png"><link rel="manifest" href="manifest.json"><meta name="theme-color" content="#ffffff"><meta name="apple-mobile-web-app-capable" content="yes"><meta name="apple-mobile-web-app-status-bar-style" content="black"><meta name="apple-mobile-web-app-title" content="xiaofa-admin"><link rel="apple-touch-icon" href="img/icons/apple-touch-icon-152x152.png"><link rel="mask-icon" href="img/icons/safari-pinned-tab.svg" color="#ffffff"><meta name="msapplication-TileImage" content="img/icons/msapplication-icon-144x144.png"><meta name="msapplication-TileColor" content="#ffffff"></head><body><noscript></noscript><div id="app"><div class="first-loading-wrp"><div class="loading-wrp"><span class="dot dot-spin"><i></i> <i></i> <i></i> <i></i></span></div><h1>小发同城</h1></div></div><script>if (window.location.hostname !== 'localhost') {
|
||||
}</script><script src="static/js/element-ui.4e8e0db4.js"></script><script src="static/js/vue.11eaebc3.js"></script><script src="static/js/app.45b6bf3d.js"></script></body></html>
|
||||
}</script><script src="https://mall.gpxscs.cn/admin/config.js?v=2.0.278"></script><script src="https://mall.gpxscs.cn/admin/im/libs3.6.0.min.js?v=2.0.278"></script><script src="https://mall.gpxscs.cn/admin/im/im.js?v=2.0.278"></script><link href="static/css/chunk-19648027.83a11e8c.css" rel="prefetch"><link href="static/css/chunk-250d32fa.ad6e6718.css" rel="prefetch"><link href="static/css/vab-extra.f3d407d7.css" rel="prefetch"><link href="static/js/chunk-19648027.6233a553.js" rel="prefetch"><link href="static/js/chunk-250d32fa.ee34e965.js" rel="prefetch"><link href="static/js/vab-extra.29abc81b.js" rel="prefetch"><link href="static/css/app.1f390f7c.css" rel="preload" as="style"><link href="static/css/element-ui.0e3a750b.css" rel="preload" as="style"><link href="static/js/app.7b6be8c5.js" rel="preload" as="script"><link href="static/js/element-ui.4e8e0db4.js" rel="preload" as="script"><link href="static/js/vue.11eaebc3.js" rel="preload" as="script"><link href="static/css/element-ui.0e3a750b.css" rel="stylesheet"><link href="static/css/app.1f390f7c.css" rel="stylesheet"><link rel="icon" type="image/png" sizes="32x32" href="img/icons/favicon-32x32.png"><link rel="icon" type="image/png" sizes="16x16" href="img/icons/favicon-16x16.png"><link rel="manifest" href="manifest.json"><meta name="theme-color" content="#ffffff"><meta name="apple-mobile-web-app-capable" content="yes"><meta name="apple-mobile-web-app-status-bar-style" content="black"><meta name="apple-mobile-web-app-title" content="xiaofa-admin"><link rel="apple-touch-icon" href="img/icons/apple-touch-icon-152x152.png"><link rel="mask-icon" href="img/icons/safari-pinned-tab.svg" color="#ffffff"><meta name="msapplication-TileImage" content="img/icons/msapplication-icon-144x144.png"><meta name="msapplication-TileColor" content="#ffffff"></head><body><noscript></noscript><div id="app"><div class="first-loading-wrp"><div class="loading-wrp"><span class="dot dot-spin"><i></i> <i></i> <i></i> <i></i></span></div><h1>小发同城</h1></div></div><script>if (window.location.hostname !== 'localhost') {
|
||||
}</script><script src="static/js/element-ui.4e8e0db4.js"></script><script src="static/js/vue.11eaebc3.js"></script><script src="static/js/app.7b6be8c5.js"></script></body></html>
|
||||
@ -2376,7 +2376,7 @@ self.__precacheManifest = (self.__precacheManifest || []).concat([
|
||||
"url": "im/libs3.6.0.min.js"
|
||||
},
|
||||
{
|
||||
"revision": "410f5a7aa6c9a4fb51eb761239fd8e67",
|
||||
"revision": "cf9154a132f8f4fd10d64989353a912e",
|
||||
"url": "index.html"
|
||||
},
|
||||
{
|
||||
@ -2392,17 +2392,17 @@ self.__precacheManifest = (self.__precacheManifest || []).concat([
|
||||
"url": "robots.txt"
|
||||
},
|
||||
{
|
||||
"revision": "38e73c4109c0fc20e6bb",
|
||||
"revision": "9093e5e0114d448ce863",
|
||||
"url": "static/css/app.1f390f7c.css"
|
||||
},
|
||||
{
|
||||
"revision": "be151dd15540843d2d26",
|
||||
"url": "static/css/chunk-0cde5704.e0277cf5.css"
|
||||
},
|
||||
{
|
||||
"revision": "f5dd29b853f67685e75d",
|
||||
"url": "static/css/chunk-19648027.83a11e8c.css"
|
||||
},
|
||||
{
|
||||
"revision": "c620221a39684b688176",
|
||||
"url": "static/css/chunk-250d32fa.ad6e6718.css"
|
||||
},
|
||||
{
|
||||
"revision": "7b9212a0410ce12f6058",
|
||||
"url": "static/css/element-ui.0e3a750b.css"
|
||||
@ -2636,17 +2636,17 @@ self.__precacheManifest = (self.__precacheManifest || []).concat([
|
||||
"url": "static/img/xiaofa-logo.20439423.png"
|
||||
},
|
||||
{
|
||||
"revision": "38e73c4109c0fc20e6bb",
|
||||
"url": "static/js/app.45b6bf3d.js"
|
||||
},
|
||||
{
|
||||
"revision": "be151dd15540843d2d26",
|
||||
"url": "static/js/chunk-0cde5704.fbb6773a.js"
|
||||
"revision": "9093e5e0114d448ce863",
|
||||
"url": "static/js/app.7b6be8c5.js"
|
||||
},
|
||||
{
|
||||
"revision": "f5dd29b853f67685e75d",
|
||||
"url": "static/js/chunk-19648027.6233a553.js"
|
||||
},
|
||||
{
|
||||
"revision": "c620221a39684b688176",
|
||||
"url": "static/js/chunk-250d32fa.ee34e965.js"
|
||||
},
|
||||
{
|
||||
"revision": "7b9212a0410ce12f6058",
|
||||
"url": "static/js/element-ui.4e8e0db4.js"
|
||||
@ -14,7 +14,7 @@
|
||||
importScripts("https://storage.googleapis.com/workbox-cdn/releases/4.3.1/workbox-sw.js");
|
||||
|
||||
importScripts(
|
||||
"precache-manifest.c0675c9346646387db72c89398285074.js"
|
||||
"precache-manifest.5a6aa66371ba042aaeb4213a18385bd8.js"
|
||||
);
|
||||
|
||||
workbox.core.setCacheNameDetails({prefix: "xiaofa-admin"});
|
||||
|
||||
File diff suppressed because one or more lines are too long
@ -1,7 +1,7 @@
|
||||
/*!
|
||||
* build: xiaofa-admin
|
||||
* copyright: https://www.lancerdt.com
|
||||
* time: 2025-7-29 18:33:28
|
||||
* time: 2025-8-2 15:53:06
|
||||
*/
|
||||
/*!
|
||||
* Quill Editor v1.3.7
|
||||
|
||||
File diff suppressed because one or more lines are too long
@ -1,5 +1,5 @@
|
||||
/*!
|
||||
* build: xiaofa-admin
|
||||
* copyright: https://www.lancerdt.com
|
||||
* time: 2025-7-29 18:33:28
|
||||
* time: 2025-8-2 15:53:06
|
||||
*/@media only screen and (max-width:767px){.hidden-xs-only{display:none!important}}@media only screen and (min-width:768px){.hidden-sm-and-up{display:none!important}}@media only screen and (min-width:768px) and (max-width:991px){.hidden-sm-only{display:none!important}}@media only screen and (max-width:991px){.hidden-sm-and-down{display:none!important}}@media only screen and (min-width:992px){.hidden-md-and-up{display:none!important}}@media only screen and (min-width:992px) and (max-width:1199px){.hidden-md-only{display:none!important}}@media only screen and (max-width:1199px){.hidden-md-and-down{display:none!important}}@media only screen and (min-width:1200px){.hidden-lg-and-up{display:none!important}}@media only screen and (min-width:1200px) and (max-width:1919px){.hidden-lg-only{display:none!important}}@media only screen and (max-width:1919px){.hidden-lg-and-down{display:none!important}}@media only screen and (min-width:1920px){.hidden-xl-only{display:none!important}}
|
||||
@ -1,5 +1,5 @@
|
||||
/*!
|
||||
* build: xiaofa-admin
|
||||
* copyright: https://www.lancerdt.com
|
||||
* time: 2025-7-29 18:33:28
|
||||
* time: 2025-8-2 15:53:06
|
||||
*/[data-v-28093814]:export{menu-color:#fff;menu-color-active:#fff;menu-background:#282c34;column-second-menu-background:#fff}.vab-avatar-list[data-v-28093814] .el-avatar{display:inline-block;margin-left:-15px;cursor:pointer;border:3px solid #fff}.echarts{width:600px;height:400px}[data-v-7f7baab5]:export{menu-color:#fff;menu-color-active:#fff;menu-background:#282c34;column-second-menu-background:#fff}@media only screen and (max-width:767px){[data-v-7f7baab5] .vab-cropper-canvas{display:block;float:none;margin:0 auto}[data-v-7f7baab5] .vab-cropper-preview{display:none}}[data-v-7f7baab5] .el-textarea{margin-top:20px}[data-v-7f7baab5] .el-dialog__footer{height:72px}[data-v-7f7baab5] .el-dialog__footer:before{display:block;clear:both;content:""}[data-v-7f7baab5] .el-dialog__footer>div>div{display:inline}[data-v-7f7baab5] .el-dialog__footer>div>div .el-upload-list{display:none}[data-v-7f7baab5] .el-dialog__footer>div>div .el-upload--picture-card{float:right;width:auto;height:32px;line-height:32px;vertical-align:middle;background-color:transparent;border:0;border-radius:0}[data-v-7f7baab5] .el-dialog__footer>div .el-button{float:right;margin-left:10px}.icon-selector-popper .el-card__body{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;height:20px;cursor:pointer}.icon-selector-popper .el-card__body i{font-size:28px;color:rgba(0,0,0,.65);text-align:center;vertical-align:middle;pointer-events:none;cursor:pointer}.icon-selector-popper .el-pagination{margin:0}[data-v-3aef4cea]:export{menu-color:#fff;menu-color-active:#fff;menu-background:#282c34;column-second-menu-background:#fff}.upload[data-v-3aef4cea]{height:500px}.upload .upload-content .el-upload__tip[data-v-3aef4cea]{display:block;height:30px;line-height:30px}.upload .upload-content[data-v-3aef4cea] .el-upload--picture-card{width:128px;height:128px;margin:3px 8px 8px 8px;border:2px dashed #c0ccda}.upload .upload-content[data-v-3aef4cea] .el-upload-list--picture{margin-bottom:20px}.upload .upload-content[data-v-3aef4cea] .el-upload-list--picture-card .el-upload-list__item{width:128px;height:128px;margin:3px 8px 8px 8px}
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
6
admin/static/js/chunk-250d32fa.ee34e965.js
Normal file
6
admin/static/js/chunk-250d32fa.ee34e965.js
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -189,11 +189,11 @@ export function updatePrnterStatus(params){
|
||||
* @param {orderId} DD-20241112-1
|
||||
* @returns
|
||||
*/
|
||||
export function testPrinter(params){
|
||||
export function testPrinter(printer_id){
|
||||
return request({
|
||||
url: URL.shop.store.printer.testPrinter,
|
||||
method: 'post',
|
||||
params,
|
||||
params:printer_id,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@ -1065,7 +1065,7 @@ let url = {
|
||||
//商家端-更新打印机状态
|
||||
updatePrnterStatus: api_url + '/admin/shop/store/printer/status/update',
|
||||
//商家端-测试打印
|
||||
testPrinter: api_url + '/admin/shop/store/printer/print/order',
|
||||
testPrinter: api_url + '/admin/shop/store/printer/tryprint',
|
||||
},
|
||||
sameCityTransport: {
|
||||
getSameCityTransport:
|
||||
|
||||
@ -561,9 +561,9 @@
|
||||
</div>
|
||||
<div class="footer">
|
||||
<el-button class="btn" size="medium" @click="handerGoTo">取消</el-button>
|
||||
<el-button class="btn" size="medium" @click="handerTestPrint" disabled>
|
||||
<!-- <el-button class="btn" size="medium" @click="handerTestPrint">
|
||||
测试打印
|
||||
</el-button>
|
||||
</el-button> -->
|
||||
<el-button class="btn" size="medium" type="primary" @click="handerSubmit">
|
||||
保存
|
||||
</el-button>
|
||||
@ -867,7 +867,8 @@ export default {
|
||||
handerStoreCheckbox(index) {},
|
||||
handleTepOptions(item, index) {},
|
||||
async handerTestPrint() {
|
||||
let res = testPrinter({ orderId: 'DD-20241112-1' })
|
||||
let res = testPrinter({ printer_id: '24' })
|
||||
console.log("这是打印机",res);
|
||||
},
|
||||
handerGoTo() {
|
||||
this.$router.push({
|
||||
|
||||
@ -36,12 +36,40 @@
|
||||
:key="index"
|
||||
:prop="item.prop"
|
||||
:label="item.label"
|
||||
:width="item.width"
|
||||
v-if="item.prop !== 'testPrint' && item.prop !== 'operation'"
|
||||
></el-table-column>
|
||||
|
||||
<!-- 单独定义打印机测试列 -->
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="testPrint"
|
||||
label="打印机测试"
|
||||
width="100"
|
||||
>
|
||||
<template #default="{ row, $index }" v-if="item.label == '操作'">
|
||||
<template #default="{ row }">
|
||||
<el-button
|
||||
type="text"
|
||||
size="small"
|
||||
@click="handleSkipEdit(row, $index)"
|
||||
@click="handleTestPrinter(row.printer_id)"
|
||||
>
|
||||
测试
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<!-- 单独定义操作列 -->
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="operation"
|
||||
label="操作"
|
||||
width="200"
|
||||
>
|
||||
<template #default="{ row }">
|
||||
<el-button
|
||||
type="text"
|
||||
size="small"
|
||||
@click="handleSkipEdit(row)"
|
||||
>
|
||||
编辑
|
||||
</el-button>
|
||||
@ -49,11 +77,12 @@
|
||||
删除
|
||||
</el-button>
|
||||
<el-button type="text" size="small" @click="handerDisabledPrint(row)">
|
||||
{{ row.status == '停用' ? '启用' : '禁用' }}
|
||||
{{ row.status === '停用' ? '启用' : '禁用' }}
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<el-pagination
|
||||
background
|
||||
:current-page="params.pageNum"
|
||||
@ -67,12 +96,13 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
import {
|
||||
getPrinterList,
|
||||
delectPrinter,
|
||||
updatePrnterStatus,
|
||||
} from '@/api/printer/printer'
|
||||
export default {
|
||||
testPrinter
|
||||
} from '@/api/printer/printer'
|
||||
export default {
|
||||
name: 'plotterManager',
|
||||
data() {
|
||||
return {
|
||||
@ -87,6 +117,7 @@ export default {
|
||||
pageNum: 1,
|
||||
pageSize: 20,
|
||||
},
|
||||
// 移除tabColumn中的testPrint和operation,因为我们单独处理了
|
||||
tabColumn: [
|
||||
{
|
||||
prop: 'printer_name',
|
||||
@ -124,20 +155,16 @@ export default {
|
||||
prop: 'status',
|
||||
label: '状态',
|
||||
},
|
||||
{
|
||||
prop: 'operation',
|
||||
label: '操作',
|
||||
},
|
||||
],
|
||||
tableData: [
|
||||
{
|
||||
printer_id: 1,
|
||||
printer_name: '飞蛾',
|
||||
model_name: '365云打印S2(编号kdt2)',
|
||||
region: '收银台',
|
||||
paper_with: 58,
|
||||
printReceipt: '',
|
||||
status: 1,
|
||||
operation: '操作',
|
||||
status: '启用',
|
||||
},
|
||||
],
|
||||
}
|
||||
@ -146,15 +173,32 @@ export default {
|
||||
this.getPrinterList()
|
||||
},
|
||||
methods: {
|
||||
// 测试打印方法
|
||||
async handleTestPrinter(printer_id) {
|
||||
let res = await testPrinter({ printer_id: printer_id });
|
||||
if (res && res.status === 200) {
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: '打印机测试成功'
|
||||
})
|
||||
} else {
|
||||
this.$message({
|
||||
type: 'error',
|
||||
message: res.msg || '打印机测试失败'
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
// 其他方法保持不变
|
||||
async handerDisabledPrint(item) {
|
||||
let res = await updatePrnterStatus({
|
||||
printer_id: item.printer_id,
|
||||
status: item.status == '停用' ? 1 : 0,
|
||||
status: item.status === '停用' ? 1 : 0,
|
||||
})
|
||||
if (res && res.status == 200) {
|
||||
if (res && res.status === 200) {
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: item.status == '停用' ? '启动成功' : '停用成功',
|
||||
message: item.status === '停用' ? '启动成功' : '停用成功',
|
||||
})
|
||||
this.getPrinterList()
|
||||
} else {
|
||||
@ -164,6 +208,7 @@ export default {
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
handerDelectPrint(item) {
|
||||
this.$confirm('您确认删除这个打印机吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
@ -172,7 +217,7 @@ export default {
|
||||
})
|
||||
.then(async () => {
|
||||
let res = await delectPrinter({ printer_id: item.printer_id })
|
||||
if (res && res.status == 200) {
|
||||
if (res && res.status === 200) {
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: '删除成功!',
|
||||
@ -192,18 +237,15 @@ export default {
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
async getPrinterList() {
|
||||
let res = await getPrinterList(this.params)
|
||||
if (res.status == 200) {
|
||||
if (res.status === 200) {
|
||||
this.total = res.data.total
|
||||
this.tableData = res.data.items
|
||||
this.tableData.forEach((item) => {
|
||||
item.paper_with += 'mm'
|
||||
if (item.status == 1) {
|
||||
item.status = '启用'
|
||||
} else {
|
||||
item.status = '停用'
|
||||
}
|
||||
item.status = item.status === 1 ? '启用' : '停用'
|
||||
})
|
||||
} else {
|
||||
this.$message({
|
||||
@ -212,48 +254,51 @@ export default {
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
handleSkip() {
|
||||
this.$router.push({ path: '/addCloudPrint' })
|
||||
},
|
||||
|
||||
async handleClear() {
|
||||
this.printerName = ''
|
||||
this.params = {
|
||||
keyword: '',
|
||||
pageNum: 1,
|
||||
paper_with: 20,
|
||||
pageSize: 20,
|
||||
}
|
||||
await this.getPrinterList()
|
||||
},
|
||||
handleSkipEdit(row, index) {
|
||||
|
||||
handleSkipEdit(row) {
|
||||
this.$router.push({
|
||||
path: '/editCloudPrint',
|
||||
query: { id: row.printer_id },
|
||||
})
|
||||
},
|
||||
handerColor({ row, column, rowIndex, columnIndex }) {
|
||||
if (row) {
|
||||
if (row.status == '启用' && columnIndex == 8) {
|
||||
return 'status-on'
|
||||
}
|
||||
if (row.status == '停用' && columnIndex == 8) {
|
||||
return 'status-off'
|
||||
}
|
||||
|
||||
handerColor({ row, column }) {
|
||||
if (row && column && column.prop === 'status') {
|
||||
return row.status === '启用' ? 'status-on' : 'status-off'
|
||||
}
|
||||
},
|
||||
|
||||
handleSearch() {
|
||||
this.params.keyword = this.printerName
|
||||
|
||||
this.params.pageNum = 1
|
||||
this.getPrinterList()
|
||||
},
|
||||
|
||||
handleSizeChange(pageSize) {
|
||||
this.params.pageSize = pageSize
|
||||
this.getPrinterList()
|
||||
},
|
||||
|
||||
handleCurrentChange(pageNum) {
|
||||
this.params.pageNum = pageNum
|
||||
this.getPrinterList()
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
@ -266,11 +311,11 @@ export default {
|
||||
.content {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
text-align: center;
|
||||
margin: 20px 0;
|
||||
|
||||
.name {
|
||||
font-weight: bold;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.input-with-select {
|
||||
@ -279,18 +324,20 @@ export default {
|
||||
}
|
||||
}
|
||||
|
||||
.status- {
|
||||
&on {
|
||||
.status-on {
|
||||
.cell {
|
||||
color: #48c978 !important;
|
||||
}
|
||||
}
|
||||
|
||||
&off {
|
||||
.status-off {
|
||||
.cell {
|
||||
color: red !important;
|
||||
}
|
||||
}
|
||||
|
||||
.el-button + .el-button {
|
||||
margin-left: 10px;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Loading…
Reference in New Issue
Block a user