Merge remote-tracking branch 'origin/master'

This commit is contained in:
猫猫guowen
2025-08-21 11:19:11 +08:00
15 changed files with 354 additions and 62 deletions

View File

@@ -4,10 +4,13 @@
import { getToken } from '@/utils/auth'
export default {
globalData: {
config: {}
},
onLaunch: function() {
this.initApp()
},
onShow: function() {
onShow: function() {
// 检查应用状态,确保从后台恢复时状态一致
this.checkAppState()
},
@@ -30,27 +33,36 @@
}
},
checkAppState() {
// 检查Token状态和页面导航栈状态
console.log('应用从后台切换到前台,检查应用状态')
// 检查Token状态
if (!getToken()) {
console.log('Token不存在,提示并跳转到登录页')
uni.showToast({
icon: 'none',
title: '登录已过期,请重新登录'
})
setTimeout(() => {
uni.reLaunch({ url: loginPage })
}, 1500)
} else {
console.log('Token存在,不做操作')
}
// 注意:应用从后台切换到前台的逻辑已在permission.js中处理
// 这里不需要重复处理,保留此方法以便未来扩展
}
// 检查Token状态和页面导航栈状态
console.log('应用从后台切换到前台,检查应用状态')
// 获取当前页面路径,判断是否在登录页
const pages = getCurrentPages()
const currentPage = pages[pages.length - 1]
const currentPagePath = currentPage ? currentPage.route : ''
// 如果当前页面是登录页,则不检查token
if (currentPagePath === 'pages/login') {
console.log('当前已在登录页面,不进行token检查')
return
}
// 检查Token状态
if (!getToken()) {
console.log('Token不存在,提示并跳转到登录页')
uni.showToast({
icon: 'none',
title: '登录已过期,请重新登录'
})
setTimeout(() => {
uni.reLaunch({ url: '/pages/login' })
}, 1500)
} else {
console.log('Token存在,不做操作')
}
}
}
}

View File

@@ -44,6 +44,11 @@
"desc": "Cycle Count, Spot Check"
}
},
"tabBar": {
"workbench": "Workbench",
"task": "Task",
"mine": "Mine"
},
"login": {
"title": "Login",
"username": "Username",
@@ -94,6 +99,16 @@
"settingsSaved": "Settings saved",
"saveSettingsFailed": "Failed to save settings"
},
"spaceAnalysis": {
"warehouse": "Warehouse:",
"warehousePlaceholder": "Please select a warehouse",
"cargoSpaceStatus": "Cargo Space Status Distribution",
"aisleStatistics": "Aisle Inbound/Outbound Statistics",
"quantity": "Quantity",
"inboundQuantity": "Inbound Quantity",
"outboundQuantity": "Outbound Quantity",
"aisle": "Aisle"
},
"task": {
"list": {
"all": "All",
@@ -450,4 +465,5 @@
"getInventoryListFailed": "Failed to get inventory list"
}
}
}

View File

@@ -44,6 +44,11 @@
"desc": "周期盘点、抽查"
}
},
"tabBar": {
"workbench": "工作台",
"task": "任务",
"mine": "我的"
},
"login": {
"title": "登录",
"username": "用户名",
@@ -94,6 +99,16 @@
"settingsSaved": "设置已保存",
"saveSettingsFailed": "保存设置失败"
},
"spaceAnalysis": {
"warehouse": "仓库:",
"warehousePlaceholder": "请选择仓库",
"cargoSpaceStatus": "货位状态分布",
"aisleStatistics": "巷道出入库统计",
"quantity": "数量",
"inboundQuantity": "入库数量",
"outboundQuantity": "出库数量",
"aisle": "巷道"
},
"task": {
"list": {
"all": "全部",
@@ -451,4 +466,5 @@
"getInventoryListFailed": "获取库存列表失败"
}
}
}

View File

@@ -1,5 +1,5 @@
{
"name" : "若依移动端",
"name" : "手持机",
"appid" : "__UNI__A2DE016",
"description" : "",
"versionName" : "1.1.0",

View File

@@ -2,12 +2,12 @@
<view class="container">
<view class="warehouse-selector">
<uni-forms>
<uni-forms-item label="仓库:">
<uni-forms-item :label="$t('spaceAnalysis.warehouse')">
<uni-data-select
v-model="selectedWarehouseId"
:localdata="warehouseList"
:clear="false"
placeholder="请选择仓库"
:placeholder="$t('spaceAnalysis.warehousePlaceholder')"
@change="handleWarehouseChange"
/>
</uni-forms-item>
@@ -58,7 +58,7 @@ export default {
},
pieOpts: {
title: {
name: '货位状态分布',
name: this.$t('spaceAnalysis.cargoSpaceStatus'),
fontSize: 15
},
legend: {
@@ -86,7 +86,7 @@ export default {
},
columnOpts: {
title: {
name: '巷道出入库统计',
name: this.$t('spaceAnalysis.aisleStatistics'),
fontSize: 15
},
legend: {
@@ -96,7 +96,7 @@ export default {
fontSize: 12
},
yAxis: {
name: '数量',
name: this.$t('spaceAnalysis.quantity'),
fontSize: 12
},
extra: {
@@ -159,12 +159,12 @@ export default {
if (res.code === 200 && res.data) {
// 更新柱状图数据
this.columnData = {
categories: ['1巷道'],
categories: [`1${this.$t('spaceAnalysis.aisle')}`],
series: [{
name: '入库数量',
name: this.$t('spaceAnalysis.inboundQuantity'),
data:[res.data["in"]]
},{
name: '出库数量',
name: this.$t('spaceAnalysis.outboundQuantity'),
data:[res.data["out"]]
}]
}

View File

@@ -78,7 +78,8 @@
</template>
<script>
import { getPrepareTask } from '@/api/search/job.js'
import { getPrepareTask } from '@/api/search/job'
export default {
data() {
return {

View File

@@ -874,17 +874,6 @@ public class PdaServiceImp implements PdaService {
BasContainerDetails basContainer = basContainerDetails1.get(0);
return agvRequest(basContainer.getContainerId(), startPoint, endPoint);
//
// String result = HttpUtil.post("http://192.168.1.100:8080/agv/api/receiveAgvMoveJob", "startPoint=" + startPoint + "&endPoint=" + endPoint + "&containerCode=" + basContainer.getContainerId());
// //接口的返回结果为AjaxResult,从result中获取code
//
// //获取code
// int code = JSONObject.parseObject(result).getIntValue("code");
// if (code == 200) {
// return AjaxResult.success(result);
// } else {
// return AjaxResult.warn(JSONObject.parseObject(result).getString("msg"));
// }
}

View File

@@ -99,6 +99,7 @@ public class SysLoginController
public AjaxResult changeLanguage(String lang)
{
return AjaxResult.success();
}
}

View File

@@ -3811,6 +3811,8 @@ export default {
},
// ***************客户管理**************
basCustomer: {
customerManagement:'客户管理',
customerNo: '客户编号',
customerGroupNo: '客户基本分类',
customerName: '客户名称',

View File

@@ -332,6 +332,7 @@ export default {
},
// ***************出库单据管理**************
outStockoutManage: {
customerManagement:'客户管理',
stockoutId: '出库单编号',
outType: '出库类型',
status: '单据状态',
@@ -3811,6 +3812,7 @@ export default {
},
// ***************客户管理**************
basCustomer: {
customerManagement:'客户管理',
customerNo: '客户编号',
customerGroupNo: '客户基本分类',
customerName: '客户名称',

View File

@@ -332,6 +332,7 @@ export default {
},
// ***************出库单据管理**************
outStockoutManage: {
stockoutId: '出库单编号',
outType: '出库类型',
status: '单据状态',
@@ -3811,6 +3812,7 @@ export default {
},
// ***************客户管理**************
basCustomer: {
customerManagement:'客户管理',
customerNo: '客户编号',
customerGroupNo: '客户基本分类',
customerName: '客户名称',

View File

@@ -6,7 +6,7 @@
</div>
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
<el-row>
<el-col :span="8">
<el-col :span="6">
<el-form-item :label="$t('receiveStockinAdd.warehouse')" prop="warehouseId">
<el-select v-model="form.warehouseId" :placeholder="$t('receiveStockinAdd.selectWarehouse')">
<el-option
@@ -18,16 +18,14 @@
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-col :span="6">
<el-form-item :label="$t('receiveStockinAdd.supplier')" prop="supplierId">
<el-select v-model="form.supplierId" :placeholder="$t('receiveStockinAdd.selectSupplier')">
<el-option
v-for="item in supplierOptions"
:key="item.id"
:label="item.simpleName"
:value="item.supplierNo"
/>
</el-select>
<el-input
v-model="form.supplierName"
:placeholder="$t('receiveStockinAdd.selectSupplier')"
@click.native="openSupplierSelector"
readonly
/>
</el-form-item>
</el-col>
<!-- <el-col :span="8">
@@ -35,7 +33,7 @@
<el-input v-model="form.batchNo" placeholder="请输入批次号" />
</el-form-item>
</el-col>-->
<el-col :span="8">
<el-col :span="6">
<el-form-item :label="$t('receiveStockinAdd.remark')" prop="remark">
<el-input v-model="form.remark" :placeholder="$t('receiveStockinAdd.inputRemark')"/>
</el-form-item>
@@ -202,6 +200,67 @@
<el-button @click="upload.open = false">{{ $t('receiveStockinAdd.cancel') }}</el-button>
</div>
</el-dialog>
<!-- 供应商选择对话框 -->
<el-dialog title="选择供应商" :visible.sync="supplierDialog" width="800px" append-to-body>
<el-form :model="supplierQueryParams" ref="supplierQueryForm" :inline="true">
<el-form-item label="供应商编号" prop="supplierNo">
<el-input
v-model="supplierQueryParams.supplierNo"
placeholder="请输入供应商编号"
clearable
size="small"
@keyup.enter.native="handleSupplierQuery"
/>
</el-form-item>
<el-form-item label="供应商名称" prop="supplierName">
<el-input
v-model="supplierQueryParams.supplierName"
placeholder="请输入供应商名称"
clearable
size="small"
@keyup.enter.native="handleSupplierQuery"
/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleSupplierQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetSupplierQuery">重置</el-button>
</el-form-item>
</el-form>
<el-table
ref="supplierTable"
v-loading="supplierLoading"
:data="supplierList"
border
@row-click="handleSupplierRowClick"
highlight-current-row
style="width: 100%"
>
<el-table-column type="index" label="序号" width="50" align="center" />
<el-table-column label="供应商编号" align="center" prop="supplierNo" />
<el-table-column label="供应商名称" align="center" prop="supplierName" />
<el-table-column label="简称" align="center" prop="simpleName" />
<el-table-column label="是否可用" align="center" prop="useable">
<template slot-scope="scope">
<dict-tag :options="dict.type.is_available" :value="scope.row.useable"/>
</template>
</el-table-column>
</el-table>
<pagination
v-show="supplierTotal > 0"
:total="supplierTotal"
:page.sync="supplierQueryParams.pageNum"
:limit.sync="supplierQueryParams.pageSize"
@pagination="getSupplierList"
/>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="confirmSelectSupplier">确定</el-button>
<el-button @click="cancelSelectSupplier">取消</el-button>
</div>
</el-dialog>
</div>
</template>
@@ -215,13 +274,14 @@ import {listWarehouse} from "@/api/bas/warehouse"
export default {
name: "InAdd",
dicts: ['sys_normal_disable', 'is_active', 'storage_cond'],
dicts: ['sys_normal_disable', 'is_active', 'storage_cond', 'is_available'],
data() {
return {
// 表单参数
form: {
warehouseId: undefined,
supplierId: undefined,
supplierName: undefined,
remark: undefined,
totalQuantity: 0,
totalAmount: 0,
@@ -245,6 +305,24 @@ export default {
warehouseOptions: [],
// 供应商选项
supplierOptions: [],
// 供应商选择对话框
supplierDialog: false,
// 供应商列表
supplierList: [],
// 选中的供应商
selectedSupplier: null,
// 供应商总数
supplierTotal: 0,
// 供应商加载状态
supplierLoading: false,
// 供应商查询参数
supplierQueryParams: {
pageNum: 1,
pageSize: 10,
supplierNo: null,
supplierName: null
},
// 物料列表
productList: [],
// 物料选择对话框
@@ -311,12 +389,64 @@ export default {
this.productLoading = false;
});
},
/** 获取供应商列表 */
/** 获取供应商列表(下拉框选项) */
getSupplierList() {
listBasSupplier().then(response => {
this.supplierOptions = response.rows;
});
},
/** 打开供应商选择对话框 */
openSupplierSelector() {
this.getSupplierListForDialog();
this.supplierDialog = true;
},
/** 获取供应商列表(对话框数据) */
getSupplierListForDialog() {
this.supplierLoading = true;
listBasSupplier(this.supplierQueryParams).then(response => {
this.supplierList = response.rows;
this.supplierTotal = response.total;
this.supplierLoading = false;
});
},
/** 供应商查询 */
handleSupplierQuery() {
this.supplierQueryParams.pageNum = 1;
this.getSupplierListForDialog();
},
/** 重置供应商查询 */
resetSupplierQuery() {
this.resetForm("supplierQueryForm");
// this.supplierQueryParams.useable = "0";
this.handleSupplierQuery();
},
/** 供应商行点击事件 */
handleSupplierRowClick(row) {
this.selectedSupplier = row;
this.$refs.supplierTable.setCurrentRow(row);
},
/** 确认选择供应商 */
confirmSelectSupplier() {
if (!this.selectedSupplier) {
this.$modal.msgError("请选择一个供应商");
return;
}
this.form.supplierId = this.selectedSupplier.supplierNo;
this.form.supplierName = this.selectedSupplier.supplierName;
this.supplierDialog = false;
},
/** 取消选择供应商 */
cancelSelectSupplier() {
this.selectedSupplier = null;
this.supplierDialog = false;
},
/** 添加物料按钮操作 */
handleAddProduct() {
@@ -393,6 +523,7 @@ export default {
this.form = {
warehouseId: undefined,
supplierId: undefined,
supplierName: undefined,
remark: undefined,
totalQuantity: 0,
totalAmount: 0,
@@ -402,6 +533,8 @@ export default {
// 重置计数器
this.totalQuantity = 0;
this.totalAmount = 0;
// 清空选中的供应商
this.selectedSupplier = null;
// 重置表单校验结果
this.$refs["form"].resetFields();

View File

@@ -9,7 +9,7 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item :label="$t('inReceiveStockin.materialDesc')" prop="stockSource"><!--物料描述-->
<el-form-item :label="$t('inReceiveStockin.materialDesc')" prop="materialDesc"><!--物料描述-->
<el-input
v-model="queryParams.materialDesc"
:placeholder="$t('inReceiveStockin.inputMaterialDesc')"
@@ -36,7 +36,6 @@
<el-select
v-model="queryParams.status"
:placeholder="$t('inReceiveStockin.selectStatus')"
clearable
@change="handleQuery"
>
<el-option
@@ -327,7 +326,8 @@ export default {
departmentNo: null,
customerNo: null,
classNo: null,
supplierNo: null
supplierNo: null,
materialDesc: null
},
queryDetailParams: {
pageNum: 1,
@@ -391,7 +391,8 @@ export default {
departmentNo: null,
customerNo: null,
classNo: null,
supplierNo: null
supplierNo: null,
materialDesc: null
}
this.resetForm("form")
},

View File

@@ -14,9 +14,11 @@
</el-form-item>
<el-form-item :label="$t('addOutStockout.customer')" prop="customerNo" required><!--客户-->
<el-input
v-model="formData.customerNo"
v-model="formData.customerName"
:placeholder="$t('addOutStockout.inputCustomerNo')"
clearable
@click.native="openCustomerSelector"
readonly
/>
</el-form-item>
<el-form-item :label="$t('addOutStockout.documentType')" prop="outType" required><!--单据类型-->
@@ -105,17 +107,68 @@
<el-button @click="cancelSelectMaterials">{{$t('addOutStockout.cancel')}}<!--取 消--></el-button>
</div>
</el-dialog>
<!-- 选择客户弹窗 -->
<el-dialog :title="$t('basCustomer.customerManagement')" :visible.sync="customerDialog" width="800px" append-to-body>
<el-form :model="customerQueryParams" ref="customerQueryForm" size="small" :inline="true" label-width="100px">
<el-form-item :label="$t('basCustomer.customerNo')" prop="customerNo"><!--客户编号-->
<el-input
v-model="customerQueryParams.customerNo"
:placeholder="$t('basCustomer.inputCustomerNo')"
clearable
@keyup.enter.native="handleCustomerQuery"
/>
</el-form-item>
<el-form-item :label="$t('basCustomer.customerName')" prop="customerName"><!--客户名称-->
<el-input
v-model="customerQueryParams.customerName"
:placeholder="$t('basCustomer.inputCustomerName')"
clearable
@keyup.enter.native="handleCustomerQuery"
/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleCustomerQuery">{{$t('addOutStockout.search')}}<!--搜索--></el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetCustomerQuery">{{$t('addOutStockout.reset')}}<!--重置--></el-button>
</el-form-item>
</el-form>
<el-table ref="customerTable" v-loading="customerLoading" :data="customerList" @row-click="handleCustomerRowClick" highlight-current-row>
<el-table-column :label="$t('basCustomer.customerNo')" align="left" prop="customerNo" /><!--客户编号-->
<el-table-column :label="$t('basCustomer.customerName')" align="left" prop="customerName" /><!--客户名称-->
<!-- <el-table-column :label="$t('basCustomer.simpleName')" align="left" prop="simpleName" />客户简称 -->
<el-table-column :label="$t('basCustomer.useable')" align="left" prop="useable">
<template slot-scope="scope">
<dict-tag :options="dict.type.is_available" :value="scope.row.useable"/>
</template>
</el-table-column><!--是否可用-->
</el-table>
<pagination
v-show="customerTotal > 0"
:total="customerTotal"
:page.sync="customerQueryParams.pageNum"
:limit.sync="customerQueryParams.pageSize"
@pagination="getCustomerList"
/>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="confirmSelectCustomer">{{$t('addOutStockout.confirm')}}<!--确 定--></el-button>
<el-button @click="cancelSelectCustomer">{{$t('addOutStockout.cancel')}}<!--取 消--></el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { listProductAndStock,saveOutStock } from "@/api/out/outStockout";
import {listWarehouse} from "@/api/bas/warehouse";
import { listBasCustomer } from "@/api/bas/BasCustomer";
import Pagination from "@/components/Pagination";
export default {
name: "AddOutStock",
dicts: ['out_bill_type', 'bill_status'],
dicts: ['out_bill_type', 'bill_status', 'is_available'],
components: {
Pagination
},
@@ -124,8 +177,10 @@ export default {
// 遮罩层
loading: false,
materialLoading: false,
customerLoading: false,
// 总条数
total: 0,
customerTotal: 0,
// 表单验证规则
rules: {
warehouseId: [
@@ -142,6 +197,7 @@ export default {
formData: {
warehouseId: null,
customerNo: null,
customerName: null, // 添加客户名称字段,用于显示
outType: null
},
// 仓库选项
@@ -164,6 +220,20 @@ export default {
productName: null,
quantity: null,
warehouseId: null
},
// 客户选择弹窗
customerDialog: false,
// 客户列表数据
customerList: [],
// 当前选中的客户
selectedCustomer: null,
// 客户查询参数
customerQueryParams: {
pageNum: 1,
pageSize: 10,
customerNo: null,
customerName: null,
useable: '1' // 默认只查询可用的客户
}
};
},
@@ -181,6 +251,51 @@ export default {
this.warehouseOptions = response.rows;
});
},
/** 打开客户选择弹窗 */
openCustomerSelector() {
this.customerDialog = true;
this.getCustomerList();
},
/** 获取客户列表 */
getCustomerList() {
this.customerLoading = true;
listBasCustomer(this.customerQueryParams).then(response => {
this.customerList = response.rows;
this.customerTotal = response.total;
this.customerLoading = false;
});
},
/** 客户搜索按钮操作 */
handleCustomerQuery() {
this.customerQueryParams.pageNum = 1;
this.getCustomerList();
},
/** 客户重置按钮操作 */
resetCustomerQuery() {
this.resetForm("customerQueryForm");
this.customerQueryParams.useable = '1'; // 保持默认只查询可用的客户
this.handleCustomerQuery();
},
/** 客户行点击事件 */
handleCustomerRowClick(row) {
this.selectedCustomer = row;
this.$refs['customerTable']?.setCurrentRow(row);
},
/** 确认选择客户 */
confirmSelectCustomer() {
if (!this.selectedCustomer) {
this.$modal.msgError(this.$t('basCustomer.pleaseSelectCustomer'));
return;
}
this.formData.customerNo = this.selectedCustomer.customerNo;
this.formData.customerName = this.selectedCustomer.customerName;
this.customerDialog = false;
},
/** 取消选择客户 */
cancelSelectCustomer() {
this.selectedCustomer = null;
this.customerDialog = false;
},
/** 打开选择物资弹窗 */
handleSelectMaterials() {
if (!this.formData.warehouseId) {
@@ -289,9 +404,11 @@ export default {
this.formData = {
warehouseId: null,
customerNo: null,
customerName: null,
outType: null
};
this.materialList = [];
this.selectedCustomer = null;
},
/** 重新建单 */
handleReload() {