This commit is contained in:
qijq 2024-11-16 10:54:34 +08:00
parent 5afa2e69ac
commit b4204aea94
6 changed files with 45 additions and 20 deletions

View File

@ -14,7 +14,7 @@
<div class="head-content"> <div class="head-content">
<span class="name">小票机名称</span> <span class="name">小票机名称</span>
<el-input <el-input
placeholder="请输入自提点名称" placeholder="请输入小票机名称"
suffix-icon="el-icon-search" suffix-icon="el-icon-search"
v-model="brandName" v-model="brandName"
size="medium" size="medium"
@ -176,6 +176,7 @@ export default {
layout: 'total, sizes, prev, pager, next, jumper', layout: 'total, sizes, prev, pager, next, jumper',
total: 0, total: 0,
params: { params: {
keyword: '',
pageNum: 1, pageNum: 1,
pageSize: 20, pageSize: 20,
}, },
@ -295,10 +296,8 @@ export default {
}) })
}, },
handleSearch() { handleSearch() {
this.params = { this.params.keyword = this.brandName
keyword: this.brandName,
...this.params,
}
this.getReceiptMachineList() this.getReceiptMachineList()
}, },
handleClear() { handleClear() {

View File

@ -560,7 +560,7 @@
</el-table> </el-table>
</div> </div>
<div class="footer"> <div class="footer">
<el-button class="btn" size="medium">取消</el-button> <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" disabled>
测试打印 测试打印
</el-button> </el-button>
@ -869,6 +869,11 @@ export default {
async handerTestPrint() { async handerTestPrint() {
let res = testPrinter({ orderId: 'DD-20241112-1' }) let res = testPrinter({ orderId: 'DD-20241112-1' })
}, },
handerGoTo() {
this.$router.push({
path: '/plotterManager',
})
},
async handerSubmit() { async handerSubmit() {
let params = { let params = {
model_id: this.form.model_id, model_id: this.form.model_id,

View File

@ -3165,7 +3165,7 @@
</div> </div>
</div> </div>
<div class="footer"> <div class="footer">
<el-button class="btn" size="medium">取消</el-button> <el-button class="btn" size="medium" @click="handerGoTo">取消</el-button>
<el-button class="btn" size="medium" type="primary" @click="onSubmit"> <el-button class="btn" size="medium" type="primary" @click="onSubmit">
保存 保存
</el-button> </el-button>
@ -3260,6 +3260,11 @@ export default {
//console.log(this.printData); //console.log(this.printData);
}, },
methods: { methods: {
handerGoTo() {
this.$router.push({
path: '/templateManagement',
})
},
showItem(blockName, itemName) { showItem(blockName, itemName) {
if (!this.printData == null) return if (!this.printData == null) return
return this.printData[blockName][itemName] != 0 ? true : false return this.printData[blockName][itemName] != 0 ? true : false

View File

@ -49,7 +49,7 @@
删除 删除
</el-button> </el-button>
<el-button type="text" size="small" @click="handerDisabledPrint(row)"> <el-button type="text" size="small" @click="handerDisabledPrint(row)">
{{ row.status == '用' ? '启用' : '禁用' }} {{ row.status == '用' ? '启用' : '禁用' }}
</el-button> </el-button>
</template> </template>
</el-table-column> </el-table-column>
@ -83,6 +83,7 @@ export default {
height: window.innerHeight - 220 - 150, height: window.innerHeight - 220 - 150,
}, },
params: { params: {
keyword: '',
pageNum: 1, pageNum: 1,
pageSize: 20, pageSize: 20,
}, },
@ -95,6 +96,18 @@ export default {
prop: 'model_name', prop: 'model_name',
label: '设备品牌', label: '设备品牌',
}, },
{
prop: 'printer_sn',
label: '打印机编号',
},
{
prop: 'printer_key',
label: '打印机密钥',
},
{
prop: 'website_url',
label: '官网地址',
},
{ {
prop: 'region', prop: 'region',
label: '打印来源', label: '打印来源',
@ -136,12 +149,12 @@ export default {
async handerDisabledPrint(item) { async handerDisabledPrint(item) {
let res = await updatePrnterStatus({ let res = await updatePrnterStatus({
printer_id: item.printer_id, 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({ this.$message({
type: 'success', type: 'success',
message: item.status == '禁用' ? '启动成功' : '禁用成功', message: item.status == '停用' ? '启动成功' : '停用成功',
}) })
this.getPrinterList() this.getPrinterList()
} else { } else {
@ -189,7 +202,7 @@ export default {
if (item.status == 1) { if (item.status == 1) {
item.status = '启用' item.status = '启用'
} else { } else {
item.status = '用' item.status = '用'
} }
}) })
} else { } else {
@ -218,19 +231,17 @@ export default {
}, },
handerColor({ row, column, rowIndex, columnIndex }) { handerColor({ row, column, rowIndex, columnIndex }) {
if (row) { if (row) {
if (row.status == '启用' && columnIndex == 5) { if (row.status == '启用' && columnIndex == 8) {
return 'status-on' return 'status-on'
} }
if (row.status == '停用' && columnIndex == 5) { if (row.status == '停用' && columnIndex == 8) {
return 'status-off' return 'status-off'
} }
} }
}, },
handleSearch() { handleSearch() {
this.params = { this.params.keyword = this.printerName
keyword: this.printerName,
...this.params,
}
this.getPrinterList() this.getPrinterList()
}, },
handleSizeChange(pageSize) { handleSizeChange(pageSize) {

View File

@ -155,7 +155,7 @@
</el-form> </el-form>
</div> </div>
<div class="footer"> <div class="footer">
<el-button class="btn" size="medium">取消</el-button> <el-button class="btn" size="medium" @click="handerGoTo">取消</el-button>
<el-button class="btn" size="medium" type="primary" @click="handerSubmit"> <el-button class="btn" size="medium" type="primary" @click="handerSubmit">
保存 保存
</el-button> </el-button>
@ -279,6 +279,11 @@ export default {
}, },
created() {}, created() {},
methods: { methods: {
handerGoTo() {
this.$router.push({
path: '/selfPickUpSite',
})
},
validateMobile() {}, validateMobile() {},
getAddress(address) { getAddress(address) {
this.form.pickAddress = address.value this.form.pickAddress = address.value

View File

@ -2396,8 +2396,8 @@ export default {
will-change: top, left; will-change: top, left;
top: -174px; top: -174px;
left: 29%; left: 29%;
// opacity: 0; opacity: 0;
// visibility: hidden; visibility: hidden;
transition: opacity 0.5s ease-out; transition: opacity 0.5s ease-out;
z-index: 1; z-index: 1;