feat: 修改

20240912_adapter_z
chenhc 8 months ago
parent a2defe181b
commit d8ba602a02

@ -0,0 +1,145 @@
<template>
<div>
<!-- 分割线 -->
<el-form :model="filterQuery" class="query-form" size="mini" label-width="100px" :inline="true" style="margin-top: 15px">
<el-form-item prop="key" label="工位信息:">
<el-input v-model="filterQuery.key" clearable placeholder="请输入或扫描工位二维码" style="width: 400px" ref="inputField" ></el-input>
</el-form-item>
<el-form-item prop="key" label="往来单位:">
<el-input v-model="filterQuery.key" clearable placeholder="请输入往来单位" style="width: 300px" ref="inputField" ></el-input>
</el-form-item>
<el-form-item>
<el-button-group style="margin-left: 10px;display:flex;">
<el-button type="primary" icon="el-icon-search" @click.native.stop="getList()">搜索</el-button>
</el-button-group>
</el-form-item>
</el-form>
<el-row :gutter="8">
<el-col v-for="(info, index) in list" :key="index" :xs="12" :sm="8" :md="8" :lg="6">
<el-card :body-style="{margin:'20px'}"
style="margin:20px 20px 20px 20px;height: 200px;background-color: #e1f3fb;border-radius: 12px; position: relative;"
>
<template #header>
<el-form class="query-form" size="mini" style="height: 200px;" >
<el-form-item class="query-form-item" label-width="28%" label="单据编号:">
<el-input
v-model="info.billNo"
placeholder=""
clearable
class="custom-disabled-input"
disabled
style="width: 80%;"
>
</el-input>
</el-form-item>
<el-form-item class="query-form-item" label-width="28%" label="工位名称:">
<el-input
v-model="info.workplaceName"
placeholder=""
clearable
style="width: 80%;"
class="custom-disabled-input"
disabled
>
</el-input>
</el-form-item>
<el-form-item class="query-form-item" label-width="28%" label="来源系统:">
<el-input
v-model="info.fromTypeName"
placeholder=""
clearable
style="width: 80%;"
class="custom-disabled-input"
disabled
>
</el-input>
</el-form-item>
<el-form-item label-width="28%" >
<el-button-group style=" float: right;">
<el-button type="primary" @click="handleClick(index)" style="margin-left: 10px ;"
icon="el-icon-thumb"
>开始处理
</el-button>
</el-button-group>
</el-form-item>
</el-form>
</template>
</el-card>
</el-col>
</el-row>
</div>
</template>
<script>
import {deleteByOrder, orderPage} from "@/api/collect/collectOrder";
import QRCode from 'qrcodejs2'
export default {
name: 'fieldOperation',
data() {
return {
filterQuery:{
key: '',
tagStatus: 1,
// invCode: this.$store.getters.locInvCode,
page: 1,
limit: 200
},
//
list: [],
total: 0,
loading: false
};
},
created() {
//list
this.getList()
},
methods: {
handleClick(index) {
let url = window.location.origin + `#/tagCodeBlank?workplaceId=` + this.stationList[index].workplaceId
// this.$router.push( workplaceId)
window.open(url, '_blank');
},
getList() {
this.loading = true;
orderPage(this.filterQuery).then(res => {
this.loading = false
this.list = res.data.list || []
this.total = res.data.total || 0
}).catch(() => {
this.loading = false
this.list = []
this.total = 0
})
},
},
mounted() {
}
}
</script>
<style >
.custom-disabled-input input.el-input__inner:disabled {
color: #000000; /* 修改为需要的颜色 */
}
/* 添加样式来定位左上角的删除按钮 */
.close-button {
position: absolute;
top: 10px; /* 你可以根据需要调整这个值 */
right: 10px; /* 你可以根据需要调整这个值 */
z-index: 1; /* 确保按钮在卡片内容之上 */
}
</style>

@ -23,67 +23,38 @@
<el-col v-for="(info, index) in stationList" :key="index" :xs="12" :sm="8" :md="8" :lg="6">
<el-card :body-style="{margin:'20px'}"
style="margin:20px 20px 20px 20px;height: 200px;background-color: #e1f3fb;border-radius: 12px; position: relative;"
@click="handleClick(index)"
>
<template #header>
<el-form class="query-form" size="mini" style="height: 200px;" >
<el-form-item class="query-form-item" label-width="28%" label="工位名称:">
<el-input
v-model="info.workplaceName"
placeholder=""
clearable
class="custom-disabled-input"
disabled
style="width: 80%;"
>
</el-input>
</el-form-item>
<el-form-item class="query-form-item" label-width="28%" label="工位用户:">
<el-input
v-model="info.employeeName"
placeholder=""
clearable
style="width: 80%;"
class="custom-disabled-input"
disabled
>
</el-input>
</el-form-item>
<el-form-item class="query-form-item" label-width="28%" label="工位描述:">
<el-input
v-model="info.remake"
placeholder=""
clearable
style="width: 80%;"
class="custom-disabled-input"
disabled
>
</el-input>
</el-form-item>
<el-form-item label-width="28%" >
<el-button-group style=" float: right;">
<el-button type="primary" @click="handleClick(index)" style="margin-left: 10px ;"
icon="el-icon-thumb"
>开始作业
</el-button>
</el-button-group>
</el-form-item>
</el-form>
</template>
<div style="display: flex; justify-content: space-between; align-items: center; height: 66px; /* 约为 200px 的 1/3 */">
<p style="font-size: 20px;background-color: #e1f3fb;font-weight: bold;">{{ info.workplaceName }}</p> <!-- 假设你的信息对象中包含一个title属性 -->
<!-- <div style="width: 60px; height: 60px; display: flex; justify-content: center; align-items: center;">-->
<!-- &lt;!&ndash; 二维码占位这里用灰色方块代替 &ndash;&gt;-->
<!--&lt;!&ndash; <span>QR</span>&ndash;&gt;-->
<!-- <div ref="qrcode" :id="'qrcode-'+index" style="width: 60px;height: 60px;"></div>-->
<!-- </div>-->
</div>
<div style="flex: 1; display: flex; flex-direction: column; justify-content: flex-end; padding-top: 10px;">
<!-- 假设这里有一些信息内容 -->
<p style="font-size: 14px;background-color: #e1f3fb">{{ info.remake }}</p>
<el-button type="primary" style="position: absolute; bottom: 20px; right: 20px;" icon="el-icon-thumb" @click="handleClick(index)"></el-button>
</div>
</el-card>
</el-col>
</el-row>
</div>
</template>
<script>
import {listPage} from "@/api/basic/sysWorkplaceManage.js";
import QRCode from 'qrcodejs2'
export default {
name: 'fieldOperation',
@ -103,8 +74,21 @@ export default {
created() {
//list
this.getStationList()
// this.generateQRCodes()
},
methods: {
generateQRCodes() {
this.stationList.forEach((info, index) => {
new QRCode(document.getElementById(`qrcode-${index}`), {
text: info.workplaceId,
width: 60,
height: 60,
colorDark: "#000000",
colorLight: "transparent",
correctLevel: QRCode.CorrectLevel.H
});
});
},
handleClick(index) {
let url = window.location.origin + `#/tagCodeBlank?workplaceId=` + this.stationList[index].workplaceId
// this.$router.push( workplaceId)
@ -113,10 +97,14 @@ export default {
getStationList() {
listPage(this.query).then(res => {
this.stationList = res.data?.list || []
// this.generateQRCodes
})
},
},
mounted() {
// this.getStationList()
// this.generateQRCodes();
this.$nextTick(() => {
this.$refs.inputField.focus();
});

Loading…
Cancel
Save