现场调试修改 入库 出库 放货重新分配货位
This commit is contained in:
@@ -2,21 +2,21 @@
|
||||
<view class="container">
|
||||
<view class="form-card">
|
||||
<uni-forms>
|
||||
<uni-forms-item :label="$t('settings.ipLabel')">
|
||||
<uni-easyinput v-model="settingformData.ip" :placeholder="$t('settings.ipPlaceholder')" />
|
||||
<uni-forms-item label="IP:">
|
||||
<uni-easyinput v-model="settingformData.ip" placeholder="请输入IP地址" />
|
||||
</uni-forms-item>
|
||||
<uni-forms-item :label="$t('settings.portLabel')">
|
||||
<uni-easyinput v-model="settingformData.port" :placeholder="$t('settings.portPlaceholder')" />
|
||||
<uni-forms-item label="端口:">
|
||||
<uni-easyinput v-model="settingformData.port" placeholder="请输入端口号" />
|
||||
</uni-forms-item>
|
||||
</uni-forms>
|
||||
<button class="submit-button" @click="handleSubmit">{{ $t('settings.saveSettings') }}</button>
|
||||
<button class="submit-button" @click="handleSubmit">保存设置</button>
|
||||
|
||||
<view class="divider"></view>
|
||||
|
||||
<view class="language-section">
|
||||
<text class="section-title">{{ $t('settings.languageSettings') }}</text>
|
||||
<!-- <view class="language-section">
|
||||
<text class="section-title">语言设置</text>
|
||||
<language-switcher></language-switcher>
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
@@ -60,32 +60,32 @@
|
||||
// 验证IP地址
|
||||
if (!this.settingformData.ip) {
|
||||
uni.showToast({
|
||||
title: this.$t('settings.ipRequired'),
|
||||
icon: 'none'
|
||||
})
|
||||
title: '请输入IP地址',
|
||||
icon: 'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
if (!this.validateIP(this.settingformData.ip)) {
|
||||
uni.showToast({
|
||||
title: this.$t('settings.invalidIpFormat'),
|
||||
icon: 'none'
|
||||
})
|
||||
title: '请输入正确的IP地址格式',
|
||||
icon: 'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
// 验证端口号
|
||||
if (!this.settingformData.port) {
|
||||
uni.showToast({
|
||||
title: this.$t('settings.portRequired'),
|
||||
icon: 'none'
|
||||
})
|
||||
title: '请输入端口号',
|
||||
icon: 'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
if (!this.validatePort(this.settingformData.port)) {
|
||||
uni.showToast({
|
||||
title: this.$t('settings.invalidPortFormat'),
|
||||
icon: 'none'
|
||||
})
|
||||
title: '请输入正确的端口号(1-65535)',
|
||||
icon: 'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
@@ -98,8 +98,8 @@
|
||||
// getApp().globalData.config = config
|
||||
// console.log("11111",config.baseUrl)
|
||||
uni.showToast({
|
||||
title: this.$t('settings.settingsSaved'),
|
||||
icon: 'success',
|
||||
title: '设置已保存',
|
||||
icon: 'success',
|
||||
complete: () => {
|
||||
// 延迟跳转,确保Toast显示完成
|
||||
setTimeout(() => {
|
||||
@@ -112,9 +112,9 @@
|
||||
} catch (e) {
|
||||
console.error('保存设置失败:', e)
|
||||
uni.showToast({
|
||||
title: this.$t('settings.saveSettingsFailed'),
|
||||
icon: 'none'
|
||||
})
|
||||
title: '保存设置失败',
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user