|
|
|
@ -203,13 +203,13 @@
|
|
|
|
|
</template>
|
|
|
|
|
<el-row :gutter="20">
|
|
|
|
|
<el-col :span="8" class="el-col">
|
|
|
|
|
<el-form-item label="扫码数量设置:" prop="scanMaxCount" style="margin-bottom: 0">
|
|
|
|
|
<el-form-item label="扫码数量设置:" prop="fixedCount" style="margin-bottom: 0">
|
|
|
|
|
<el-input
|
|
|
|
|
style="width: 90%"
|
|
|
|
|
size="small"
|
|
|
|
|
type='number'
|
|
|
|
|
splaceholder="请输入内容"
|
|
|
|
|
v-model="formData.FixedCount"
|
|
|
|
|
v-model="formData.fixedCount"
|
|
|
|
|
></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
@ -236,8 +236,8 @@
|
|
|
|
|
<!-- </el-form-item>-->
|
|
|
|
|
<!--</el-col>-->
|
|
|
|
|
<el-col :span="8" class="el-col">
|
|
|
|
|
<el-form-item label="是否自动解码:" prop="AutoDecode" style="margin-bottom: 0">
|
|
|
|
|
<el-select v-model="formData.AutoDecode" placeholder="选择是否自动解码">
|
|
|
|
|
<el-form-item label="是否自动解码:" prop="autoDecode" style="margin-bottom: 0">
|
|
|
|
|
<el-select v-model="formData.autoDecode" placeholder="选择是否自动解码">
|
|
|
|
|
<el-option label="否" :value="0"></el-option>
|
|
|
|
|
<el-option label="是" :value="1"></el-option>
|
|
|
|
|
</el-select>
|
|
|
|
@ -245,8 +245,8 @@
|
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
|
|
<el-col :span="8" class="el-col">
|
|
|
|
|
<el-form-item label="输出顺序:" prop="OutputMode" >
|
|
|
|
|
<el-select v-model="formData.OutputMode" placeholder="选择输出顺序">
|
|
|
|
|
<el-form-item label="输出顺序:" prop="outputMode" >
|
|
|
|
|
<el-select v-model="formData.outputMode" placeholder="选择输出顺序">
|
|
|
|
|
<el-option label="不排序" :value="0"></el-option>
|
|
|
|
|
<el-option label="从左到右" :value="1"></el-option>
|
|
|
|
|
<el-option label="从右到左" :value="2"></el-option>
|
|
|
|
@ -369,11 +369,11 @@ export default {
|
|
|
|
|
lastCodeSplit: true,
|
|
|
|
|
isScanCodeCheck: true,
|
|
|
|
|
getSplitConfirm: false,
|
|
|
|
|
FixedCount:null,
|
|
|
|
|
fixedCount:null,
|
|
|
|
|
pdaMaxCount: null,
|
|
|
|
|
ipcMaxCount: null,
|
|
|
|
|
AutoDecode:1,
|
|
|
|
|
OutputMode:1
|
|
|
|
|
autoDecode:1,
|
|
|
|
|
outputMode:1,
|
|
|
|
|
},
|
|
|
|
|
systemParam: null,
|
|
|
|
|
socket:null,
|
|
|
|
@ -393,7 +393,7 @@ export default {
|
|
|
|
|
getSet().then((response) => {
|
|
|
|
|
if (response.code == 20000) {
|
|
|
|
|
this.formData = response.data
|
|
|
|
|
// this.formData.AutoDecode = 1
|
|
|
|
|
// this.formData.autoDecode = 1
|
|
|
|
|
// this.formData.OutputMode = 1
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
@ -402,7 +402,6 @@ export default {
|
|
|
|
|
this.ShelfDisplayFlag = true
|
|
|
|
|
},
|
|
|
|
|
save() {
|
|
|
|
|
|
|
|
|
|
if (isBlank(this.formData.scanMaxCount)){
|
|
|
|
|
this.formData.scanMaxCount = 0
|
|
|
|
|
}
|
|
|
|
@ -412,6 +411,15 @@ export default {
|
|
|
|
|
if (isBlank(this.formData.ipcMaxCount)){
|
|
|
|
|
this.formData.ipcMaxCount = 0
|
|
|
|
|
}
|
|
|
|
|
if (isBlank(this.formData.autoDecode)){
|
|
|
|
|
this.formData.autoDecode = 1
|
|
|
|
|
}
|
|
|
|
|
if (isBlank(this.formData.fixedCount)){
|
|
|
|
|
this.formData.fixedCount = 0
|
|
|
|
|
}
|
|
|
|
|
if (isBlank(this.formData.outputMode)){
|
|
|
|
|
this.formData.outputMode = 1
|
|
|
|
|
}
|
|
|
|
|
updateSet(this.formData)
|
|
|
|
|
.then((response) => {
|
|
|
|
|
if (response.code != 20000) {
|
|
|
|
@ -421,17 +429,40 @@ export default {
|
|
|
|
|
})
|
|
|
|
|
.catch(() => {
|
|
|
|
|
});
|
|
|
|
|
if (this.socket && this.socket.readyState === WebSocket.OPEN){
|
|
|
|
|
if (!isBlank(this.formData.AutoDecode)){
|
|
|
|
|
var setStr = "AutoDecode=" + this.formData.AutoDecode
|
|
|
|
|
this.sendData(setStr)
|
|
|
|
|
}
|
|
|
|
|
if (!isBlank(this.formData.FixedCount)){
|
|
|
|
|
var setStr = "FixedCount=" + this.formData.FixedCount
|
|
|
|
|
this.sendData(setStr)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (this.socket && this.socket.readyState === WebSocket.OPEN) {
|
|
|
|
|
const { autoDecode, fixedCount, outputMode } = this.formData;
|
|
|
|
|
|
|
|
|
|
const settings = [
|
|
|
|
|
{ key: "AutoDecode", value: autoDecode },
|
|
|
|
|
{ key: "FixedCount", value: fixedCount },
|
|
|
|
|
{ key: "OutputMode", value: outputMode }
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
settings.forEach(setting => {
|
|
|
|
|
if (!isBlank(setting.value)) {
|
|
|
|
|
const setStr = `${setting.key}=${setting.value}`;
|
|
|
|
|
this.sendData(setStr);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
// if (this.socket && this.socket.readyState === WebSocket.OPEN){
|
|
|
|
|
// if (!isBlank(this.formData.autoDecode)){
|
|
|
|
|
// var setStr = "AutoDecode=" + this.formData.autoDecode
|
|
|
|
|
// this.sendData(setStr)
|
|
|
|
|
// }
|
|
|
|
|
// if (!isBlank(this.formData.fixedCount)){
|
|
|
|
|
// var setStr = "FixedCount=" + this.formData.fixedCount
|
|
|
|
|
// this.sendData(setStr)
|
|
|
|
|
// }
|
|
|
|
|
//
|
|
|
|
|
// if (!isBlank(this.formData.outputMode) ){
|
|
|
|
|
// var setStr = "OutputMode=" + this.formData.outputMode
|
|
|
|
|
// this.sendData(setStr)
|
|
|
|
|
// }
|
|
|
|
|
//
|
|
|
|
|
// }
|
|
|
|
|
},
|
|
|
|
|
// 连接 WebSocket
|
|
|
|
|
connectWebSocket() {
|
|
|
|
|